npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@component-controls/routes

v4.0.3

Published

component-controls routes utilities

Downloads

41

Readme

Table of contents

Overview

Route-related utility functions for component-controls

Installation

This package is usually installed as part of the @component-controls package, but you can also install it standalone:

$ npm install @component-controls/routes --save-dev

HomePageInfo

interface

defined in @component-controls/routes/core/routes/src/routes/index-page.ts

properties

| Name | Type | | -------------- | -------- | | type | string | | docId | string | | storyId | string | | path* | string | | lastModified | string |

getSiteMap

react function

defined in @component-controls/routes/core/routes/src/sitemap/sitemap.ts

parameters

| Name | Type | Description | | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | | store | Storeerror: stringconfig*title: stringlogo: string | ReactNodeapppropTypes*: contextTypes*: defaultProps*: displayName*: description: stringcopyright: stringlanguage: stringauthor: stringimage: stringlinks: (DetailedHTMLProps<>)[]seo: ReactChild | ReactFragment | ReactPortal | boolean | null | undefinedpages[string]: theme[string]: anystorySort: function (a*: stringb*: string) => numbertoolbarleft*: right*: footerleft*: right*: sidebar: ActionItem[]menu: StaticMenuItem[]components: Record<string, unknown>analytics: anycomponent: string | Record<string, unknown> | ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls[string]: ComponentControl<P>smartControlssmart*: include*: exclude*: decorators: StoryRenderFn[]plugins: anycategory: stringrenderFn: function (props*story*: doc*: values*: options*: ) => anywebpack: Configuration | WebpackConfigFnfinalWebpack: Configuration | WebpackConfigFnpresets: RuleType[]configPath: stringdistFolder: stringbundleName: stringstaticFolder: stringcssFileName: stringlogOptions: Partial<LogOptions>mode: "none" | "development" | "production"loadersat*: module*: ident*: loader*: options*: stories: string | string[]files: string | string[]siteRoot: stringignore: string[]categories: DocType[]siteMap: type | booleansiteUrl: stringinstrument: anysearchindexingModule*: searchingModule*: fields*: emptySearchDocuments*: hitsPerPage*: options*: tokensfigmaAccessToken*: githubAccessToken*: docs*[string]: type[string]: anytitle*: stringtype: DocTyperoute: stringdate: stringdateModified: stringstatus: "draft" | "published"tags: string[]keywords: string[]description: string | JSX.Elementimage: stringauthor: stringorder: numbermenu: stringtemplatebind*: description*: component*: subcomponents*: smartControls*: decorators*: plugins*: category*: source*: storyName*: id*: rawId*: doc*: storyFn*: loc*: subtitle*: dynamic*: dynamicId*: controls*: stories: string[]source: stringfileName: stringpackage: stringtestFiles: string[]testCoverage: string[]testData: stringrenderFn: FrameworkRenderFndata: DocumentDatacomponentsLookup[string]: stringMDXPage: anyisMDXComponent: booleanparameters: anycomponentat*: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn[]plugins: anycategory: stringnavSidebar: booleancontextSidebar: booleanfullPage: booleanstories*[string]: typename*: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponentat*: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn[]plugins: anycategory: stringcomponents*[string]: interfacename*: stringimportedName: "default" | "namespace" | stringfrom: stringrequest: stringfileName: stringpropsInfoFile: stringloc: CodeLocationpackage: stringsource: stringinfo: ComponentInfoexternalDependencies: ImportslocalDependencies: Importsjsx: JSXTreefileInfo: FileInfojest: JestTestspackages*[string]: interfacefileHash*: stringname: stringversion: stringdependencies: PackageDependenciesdevDependencies: PackageDependenciespeerDependencies: PackageDependenciesprivateNpm: booleanrepository*browse*: docs*: issues*: addObserver*: function (observer*: function (story: Story) => void) => voidremoveObserver*: function (observer*: function (story: Story) => void) => voidupdateStory*: function (story*name*: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponent: string | Record<string, unknown> | ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn[]plugins: anycategory: string) => voidsearch: function (store*error*: config*: docs*: stories*: components*: packages*: addObserver*: removeObserver*: updateStory*: search*: ) => SearchResultitems*: SearchItem[]searchFn*: function (search*: ) => voidproviderlogo*: url*: name*: | Store of stories information in memory after the loader is applied | | returns | string | |

DocHomePagesPath

interface

defined in @component-controls/routes/core/routes/src/routes/docs-index-pages.ts

properties

| Name | Type | | -------------- | ----------------------------------------------------------------------- | | type | "story" | "blog" | "page" | "tags" | "author" | string | | path* | string | | docId | string | | storyId | string | | lastModified | string | | docIndex | boolean |

getIndexPage

function

defined in @component-controls/routes/core/routes/src/routes/index-page.ts

parameters

| Name | Type | Description | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | | store | Storeerror: stringconfig*title: stringlogo: string | ReactNodeapppropTypes*: contextTypes*: defaultProps*: displayName*: description: stringcopyright: stringlanguage: stringauthor: stringimage: stringlinks: (DetailedHTMLProps<>)[]seo: ReactChild | ReactFragment | ReactPortal | boolean | null | undefinedpages[string]: theme[string]: anystorySort: function (a*: stringb*: string) => numbertoolbarleft*: right*: footerleft*: right*: sidebar: ActionItem[]menu: StaticMenuItem[]components: Record<string, unknown>analytics: anycomponent: string | Record<string, unknown> | ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls[string]: ComponentControl<P>smartControlssmart*: include*: exclude*: decorators: StoryRenderFn[]plugins: anycategory: stringrenderFn: function (props*story*: doc*: values*: options*: ) => anywebpack: Configuration | WebpackConfigFnfinalWebpack: Configuration | WebpackConfigFnpresets: RuleType[]configPath: stringdistFolder: stringbundleName: stringstaticFolder: stringcssFileName: stringlogOptions: Partial<LogOptions>mode: "none" | "development" | "production"loadersat*: module*: stories: string | string[]files: string | string[]siteRoot: stringignore: string[]categories: DocType[]siteMap: type | booleansiteUrl: stringinstrument: anysearchindexingModule*: searchingModule*: fields*: emptySearchDocuments*: hitsPerPage*: options*: tokensfigmaAccessToken*: githubAccessToken*: docs*[string]: type[string]: anytitle*: stringtype: DocTyperoute: stringdate: stringdateModified: stringstatus: "draft" | "published"tags: string[]keywords: string[]description: string | JSX.Elementimage: stringauthor: stringorder: numbermenu: stringtemplate: Example<Props>stories: string[]source: stringfileName: stringpackage: stringtestFiles: string[]testCoverage: string[]testData: stringrenderFn: FrameworkRenderFndata: DocumentDatacomponentsLookup[string]: stringMDXPage: anyisMDXComponent: booleanparameters: anycomponentat*: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn[]plugins: anycategory: stringnavSidebar: booleancontextSidebar: booleanfullPage: booleanstories*[string]: typename*: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponentat*: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn[]plugins: anycategory: stringcomponents*[string]: interfacename*: stringimportedName: "default" | "namespace" | stringfrom: stringrequest: stringfileName: stringpropsInfoFile: stringloc: CodeLocationpackage: stringsource: stringinfo: ComponentInfoexternalDependencies: ImportslocalDependencies: Importsjsx: JSXTreefileInfo: FileInfojest: JestTestspackages*[string]: interfacefileHash*: stringname: stringversion: stringdependencies: PackageDependenciesdevDependencies: PackageDependenciespeerDependencies: PackageDependenciesprivateNpm: booleanrepository*browse*: docs*: issues*: addObserver*: function (observer*: function (story: Story) => void) => voidremoveObserver*: function (observer*: function (story: Story) => void) => voidupdateStory*: function (story*name*: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponent: string | Record<string, unknown> | ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn[]plugins: anycategory: string) => voidsearch: function (store*error*: config*: docs*: stories*: components*: packages*: addObserver*: removeObserver*: updateStory*: search*: ) => SearchResultitems*: SearchItem[]searchFn*: function (search*: ) => voidproviderlogo*: url*: name*: | Store of stories information in memory after the loader is applied | | returns | HomePageInfo