@component-controls/routes v4.0.3
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 | Store error : string config *title : string logo : string | ReactNode app propTypes *: contextTypes *: defaultProps *: displayName *: description : string copyright : string language : string author : string image : string links : (DetailedHTMLProps <>)[]seo : ReactChild | ReactFragment | ReactPortal | boolean | null | undefined pages [string ]: theme [string ]: any storySort : function (a *: string b *: string ) => number toolbar left *: right *: footer left *: right *: sidebar : ActionItem []menu : StaticMenuItem []components : Record <string , unknown >analytics : any component : string | Record <string , unknown > | ElementType <Props >subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls [string ]: ComponentControl <P >smartControls smart *: include *: exclude *: decorators : StoryRenderFn []plugins : any category : string renderFn : function (props *story *: doc *: values *: options *: ) => any webpack : Configuration | WebpackConfigFn finalWebpack : Configuration | WebpackConfigFn presets : RuleType []configPath : string distFolder : string bundleName : string staticFolder : string cssFileName : string logOptions : Partial <LogOptions >mode : "none" | "development" | "production" loaders at *: module *: ident *: loader *: options *: stories : string | string []files : string | string []siteRoot : string ignore : string []categories : DocType []siteMap : type | boolean siteUrl : string instrument : any search indexingModule *: searchingModule *: fields *: emptySearchDocuments *: hitsPerPage *: options *: tokens figmaAccessToken *: githubAccessToken *: docs *[string ]: type [string ]: any title *: string type : DocTyperoute : string date : string dateModified : string status : "draft" | "published" tags : string []keywords : string []description : string | JSX.Element image : string author : string order : number menu : string template bind *: description *: component *: subcomponents *: smartControls *: decorators *: plugins *: category *: source *: storyName *: id *: rawId *: doc *: storyFn *: loc *: subtitle *: dynamic *: dynamicId *: controls *: stories : string []source : string fileName : string package : string testFiles : string []testCoverage : string []testData : string renderFn : FrameworkRenderFndata : DocumentDatacomponentsLookup [string ]: string MDXPage : any isMDXComponent : boolean parameters : any component at *: subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls : ComponentControlssmartControls : SmartControlsdecorators : StoryRenderFn []plugins : any category : string navSidebar : boolean contextSidebar : boolean fullPage : boolean stories *[string ]: type name *: string storyName : string id : string rawId : string doc : string storyFn : StoryRenderFndescription : string arguments : StoryArgumentsloc : CodeLocationsource : string subtitle : string dynamic : boolean dynamicId : string component at *: subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls : ComponentControlssmartControls : SmartControlsdecorators : StoryRenderFn []plugins : any category : string components *[string ]: interface name *: string importedName : "default" | "namespace" | string from : string request : string fileName : string propsInfoFile : string loc : CodeLocationpackage : string source : string info : ComponentInfoexternalDependencies : ImportslocalDependencies : Importsjsx : JSXTreefileInfo : FileInfojest : JestTestspackages *[string ]: interface fileHash *: string name : string version : string dependencies : PackageDependenciesdevDependencies : PackageDependenciespeerDependencies : PackageDependenciesprivateNpm : boolean repository *browse *: docs *: issues *: addObserver *: function (observer *: function (story : Story) => void ) => void removeObserver *: function (observer *: function (story : Story) => void ) => void updateStory *: function (story *name *: string storyName : string id : string rawId : string doc : string storyFn : StoryRenderFndescription : string arguments : StoryArgumentsloc : CodeLocationsource : string subtitle : string dynamic : boolean dynamicId : string component : string | Record <string , unknown > | ElementType <Props >subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls : ComponentControlssmartControls : SmartControlsdecorators : StoryRenderFn []plugins : any category : string ) => void search : function (store *error *: config *: docs *: stories *: components *: packages *: addObserver *: removeObserver *: updateStory *: search *: ) => SearchResult items *: SearchItem []searchFn *: function (search *: ) => void provider logo *: 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 | Store error : string config *title : string logo : string | ReactNode app propTypes *: contextTypes *: defaultProps *: displayName *: description : string copyright : string language : string author : string image : string links : (DetailedHTMLProps <>)[]seo : ReactChild | ReactFragment | ReactPortal | boolean | null | undefined pages [string ]: theme [string ]: any storySort : function (a *: string b *: string ) => number toolbar left *: right *: footer left *: right *: sidebar : ActionItem []menu : StaticMenuItem []components : Record <string , unknown >analytics : any component : string | Record <string , unknown > | ElementType <Props >subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls [string ]: ComponentControl <P >smartControls smart *: include *: exclude *: decorators : StoryRenderFn []plugins : any category : string renderFn : function (props *story *: doc *: values *: options *: ) => any webpack : Configuration | WebpackConfigFn finalWebpack : Configuration | WebpackConfigFn presets : RuleType []configPath : string distFolder : string bundleName : string staticFolder : string cssFileName : string logOptions : Partial <LogOptions >mode : "none" | "development" | "production" loaders at *: module *: stories : string | string []files : string | string []siteRoot : string ignore : string []categories : DocType []siteMap : type | boolean siteUrl : string instrument : any search indexingModule *: searchingModule *: fields *: emptySearchDocuments *: hitsPerPage *: options *: tokens figmaAccessToken *: githubAccessToken *: docs *[string ]: type [string ]: any title *: string type : DocTyperoute : string date : string dateModified : string status : "draft" | "published" tags : string []keywords : string []description : string | JSX.Element image : string author : string order : number menu : string template : Example <Props >stories : string []source : string fileName : string package : string testFiles : string []testCoverage : string []testData : string renderFn : FrameworkRenderFndata : DocumentDatacomponentsLookup [string ]: string MDXPage : any isMDXComponent : boolean parameters : any component at *: subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls : ComponentControlssmartControls : SmartControlsdecorators : StoryRenderFn []plugins : any category : string navSidebar : boolean contextSidebar : boolean fullPage : boolean stories *[string ]: type name *: string storyName : string id : string rawId : string doc : string storyFn : StoryRenderFndescription : string arguments : StoryArgumentsloc : CodeLocationsource : string subtitle : string dynamic : boolean dynamicId : string component at *: subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls : ComponentControlssmartControls : SmartControlsdecorators : StoryRenderFn []plugins : any category : string components *[string ]: interface name *: string importedName : "default" | "namespace" | string from : string request : string fileName : string propsInfoFile : string loc : CodeLocationpackage : string source : string info : ComponentInfoexternalDependencies : ImportslocalDependencies : Importsjsx : JSXTreefileInfo : FileInfojest : JestTestspackages *[string ]: interface fileHash *: string name : string version : string dependencies : PackageDependenciesdevDependencies : PackageDependenciespeerDependencies : PackageDependenciesprivateNpm : boolean repository *browse *: docs *: issues *: addObserver *: function (observer *: function (story : Story) => void ) => void removeObserver *: function (observer *: function (story : Story) => void ) => void updateStory *: function (story *name *: string storyName : string id : string rawId : string doc : string storyFn : StoryRenderFndescription : string arguments : StoryArgumentsloc : CodeLocationsource : string subtitle : string dynamic : boolean dynamicId : string component : string | Record <string , unknown > | ElementType <Props >subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls : ComponentControlssmartControls : SmartControlsdecorators : StoryRenderFn []plugins : any category : string ) => void search : function (store *error *: config *: docs *: stories *: components *: packages *: addObserver *: removeObserver *: updateStory *: search *: ) => SearchResult items *: SearchItem []searchFn *: function (search *: ) => void provider logo *: url *: name *: | Store of stories information in memory after the loader is applied |
returns | HomePageInfo |
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago