@component-controls/routes
TypeScript icon, indicating that this package has built-in type declarations

4.0.3 • Public • Published

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: DocType
route: 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: FrameworkRenderFn
data: DocumentData
componentsLookup
[string]: string
MDXPage: any
isMDXComponent: boolean
parameters: any
component
at*:
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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: StoryRenderFn
description: string
arguments: StoryArguments
loc: CodeLocation
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component
at*:
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: StoryRenderFn[]
plugins: any
category: string
components*
[string]:
interface
name*: string
importedName: "default" | "namespace" | string
from: string
request: string
fileName: string
propsInfoFile: string
loc: CodeLocation
package: string
source: string
info: ComponentInfo
externalDependencies: Imports
localDependencies: Imports
jsx: JSXTree
fileInfo: FileInfo
jest: JestTests
packages*
[string]:
interface
fileHash*: string
name: string
version: string
dependencies: PackageDependencies
devDependencies: PackageDependencies
peerDependencies: PackageDependencies
privateNpm: 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: StoryRenderFn
description: string
arguments: StoryArguments
loc: CodeLocation
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component: string | Record<string, unknown> | ElementType<Props>
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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: DocType
route: 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: FrameworkRenderFn
data: DocumentData
componentsLookup
[string]: string
MDXPage: any
isMDXComponent: boolean
parameters: any
component
at*:
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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: StoryRenderFn
description: string
arguments: StoryArguments
loc: CodeLocation
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component
at*:
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: StoryRenderFn[]
plugins: any
category: string
components*
[string]:
interface
name*: string
importedName: "default" | "namespace" | string
from: string
request: string
fileName: string
propsInfoFile: string
loc: CodeLocation
package: string
source: string
info: ComponentInfo
externalDependencies: Imports
localDependencies: Imports
jsx: JSXTree
fileInfo: FileInfo
jest: JestTests
packages*
[string]:
interface
fileHash*: string
name: string
version: string
dependencies: PackageDependencies
devDependencies: PackageDependencies
peerDependencies: PackageDependencies
privateNpm: 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: StoryRenderFn
description: string
arguments: StoryArguments
loc: CodeLocation
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component: string | Record<string, unknown> | ElementType<Props>
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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

RoutePath

type

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

properties

Name Type Parent
type "story" | "blog" | "page" | "tags" | "author" | string DocHomePagesPath
path* string DocHomePagesPath
docId string DocHomePagesPath
storyId string DocHomePagesPath
lastModified string DocHomePagesPath
docIndex boolean DocHomePagesPath
query string DocPagesPath
category string DocPagesPath
activeTab string DocPagesPath

getHomePages

function

defined in @component-controls/routes/core/routes/src/routes/docs-index-pages.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: DocType
route: 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: FrameworkRenderFn
data: DocumentData
componentsLookup
[string]: string
MDXPage: any
isMDXComponent: boolean
parameters: any
component
at*:
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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: StoryRenderFn
description: string
arguments: StoryArguments
loc: CodeLocation
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component
at*:
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: StoryRenderFn[]
plugins: any
category: string
components*
[string]:
interface
name*: string
importedName: "default" | "namespace" | string
from: string
request: string
fileName: string
propsInfoFile: string
loc: CodeLocation
package: string
source: string
info: ComponentInfo
externalDependencies: Imports
localDependencies: Imports
jsx: JSXTree
fileInfo: FileInfo
jest: JestTests
packages*
[string]:
interface
fileHash*: string
name: string
version: string
dependencies: PackageDependencies
devDependencies: PackageDependencies
peerDependencies: PackageDependencies
privateNpm: 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: StoryRenderFn
description: string
arguments: StoryArguments
loc: CodeLocation
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component: string | Record<string, unknown> | ElementType<Props>
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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 DocHomePagesPath[]

getRoutes

function

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

parameters

Name Type
store*
Store
error: string
config*
title: string
logo: string | ReactNode
app
propTypes: WeakValidationMap<P> | undefined
contextTypes: ValidationMap<any> | undefined
defaultProps: Partial<P> | undefined
displayName: string | undefined
description: string
copyright: string
language: string
author: string
image: string
links: (DetailedHTMLProps<>)[]
seo: ReactChild | ReactFragment | ReactPortal | boolean | null | undefined
pages
[string]:
type
basePath*:
sideNav*:
label*:
indexHome*:
topMenu*:
container*:
tabs*:
navSidebar*:
contextSidebar*:
fullPage*:
theme
[string]: any
storySort: function (
a*: string
b*: string
) => number
toolbar
left: ActionItems
right: ActionItems
footer
left: ActionItems
right: ActionItems
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]: ComponentControlText | ComponentControlBoolean | ComponentControlColor | ComponentControlDate | ComponentControlObject<P> | ComponentControlButton | ComponentControlOptions | ComponentControlNumber | ComponentControlArray | ComponentControlFiles
smartControls
smart: boolean
include: string[] | IncludeFn
exclude: string[] | IncludeFn
decorators: StoryRenderFn[]
plugins: any
category: string
renderFn: function (
props*
story*
name*:
storyName*:
id*:
rawId*:
doc*:
storyFn*:
description*:
arguments*:
loc*:
source*:
subtitle*:
dynamic*:
dynamicId*:
component*:
subcomponents*:
controls*:
smartControls*:
decorators*:
plugins*:
category*:
doc
title*:
type*:
route*:
date*:
dateModified*:
status*:
tags*:
keywords*:
description*:
image*:
author*:
order*:
menu*:
template*:
stories*:
source*:
fileName*:
package*:
testFiles*:
testCoverage*:
testData*:
renderFn*:
data*:
componentsLookup*:
MDXPage*:
isMDXComponent*:
parameters*:
component*:
subcomponents*:
controls*:
smartControls*:
decorators*:
plugins*:
category*:
navSidebar*:
contextSidebar*:
fullPage*:
values: ExampleControls
options: any
) => 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*: function (
index*:
) => T | undefined
module: string
stories: string | string[]
files: string | string[]
siteRoot: string
ignore: string[]
categories: DocType[]
siteMap: type | boolean
siteUrl: string
instrument: any
search
indexingModule: string
searchingModule*: string
fields: SearchFields[]
emptySearchDocuments: string[]
hitsPerPage: number
options: any
tokens
figmaAccessToken: string
githubAccessToken: string
docs*
[string]:
type
[string]: any
title*: string
type: DocType
route: 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: function (
props*:
) => any
data
[string]:
componentsLookup
[string]: string
MDXPage: any
isMDXComponent: boolean
parameters: any
component
at*: function (
index*:
) => T | undefined
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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: StoryRenderFn
description: string
arguments: StoryArgument[]
loc
start*:
end*:
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component
at*: function (
index*:
) => T | undefined
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: StoryRenderFn[]
plugins: any
category: string
components*
[string]:
interface
name*: string
importedName: "default" | "namespace" | string
from: string
request: string
fileName: string
propsInfoFile: string
loc
start*:
end*:
package: string
source: string
info
displayName*:
description*:
props*:
externalDependencies
[string]: (Omit<ImportType, "from">)[]
localDependencies
[string]: (Omit<ImportType, "from">)[]
jsx: JSXNode[]
fileInfo
dateCreated*:
dateModified*:
commits*:
sloc*:
jest
results*:
coverage*:
packages*
[string]:
interface
fileHash*: string
name: string
version: string
dependencies
[string]: PackageDependency
devDependencies
[string]: PackageDependency
peerDependencies
[string]: PackageDependency
privateNpm: boolean
repository*
browse: string
docs: string
issues: string
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: StoryRenderFn
description: string
arguments: StoryArgument[]
loc
start*:
end*:
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component: string | Record<string, unknown> | ElementType<Props>
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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*: string
) => void
provider
logo*: ReactNode
url*: string
name*: string
returns RoutePath[]

getUniquesByField

function

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

parameters

Name Type
store*
Store
error: string
config*
title: string
logo: string | ReactNode
app
propTypes: WeakValidationMap<P> | undefined
contextTypes: ValidationMap<any> | undefined
defaultProps: Partial<P> | undefined
displayName: string | undefined
description: string
copyright: string
language: string
author: string
image: string
links: (DetailedHTMLProps<>)[]
seo: ReactChild | ReactFragment | ReactPortal | boolean | null | undefined
pages
[string]:
type
basePath*:
sideNav*:
label*:
indexHome*:
topMenu*:
container*:
tabs*:
navSidebar*:
contextSidebar*:
fullPage*:
theme
[string]: any
storySort: function (
a*: string
b*: string
) => number
toolbar
left: ActionItems
right: ActionItems
footer
left: ActionItems
right: ActionItems
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]: ComponentControlText | ComponentControlBoolean | ComponentControlColor | ComponentControlDate | ComponentControlObject<P> | ComponentControlButton | ComponentControlOptions | ComponentControlNumber | ComponentControlArray | ComponentControlFiles
smartControls
smart: boolean
include: string[] | IncludeFn
exclude: string[] | IncludeFn
decorators: StoryRenderFn[]
plugins: any
category: string
renderFn: function (
props*
story*
name*:
storyName*:
id*:
rawId*:
doc*:
storyFn*:
description*:
arguments*:
loc*:
source*:
subtitle*:
dynamic*:
dynamicId*:
component*:
subcomponents*:
controls*:
smartControls*:
decorators*:
plugins*:
category*:
doc
title*:
type*:
route*:
date*:
dateModified*:
status*:
tags*:
keywords*:
description*:
image*:
author*:
order*:
menu*:
template*:
stories*:
source*:
fileName*:
package*:
testFiles*:
testCoverage*:
testData*:
renderFn*:
data*:
componentsLookup*:
MDXPage*:
isMDXComponent*:
parameters*:
component*:
subcomponents*:
controls*:
smartControls*:
decorators*:
plugins*:
category*:
navSidebar*:
contextSidebar*:
fullPage*:
values: ExampleControls
options: any
) => 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*: function (
index*:
) => T | undefined
module: string
stories: string | string[]
files: string | string[]
siteRoot: string
ignore: string[]
categories: DocType[]
siteMap: type | boolean
siteUrl: string
instrument: any
search
indexingModule: string
searchingModule*: string
fields: SearchFields[]
emptySearchDocuments: string[]
hitsPerPage: number
options: any
tokens
figmaAccessToken: string
githubAccessToken: string
docs*
[string]:
type
[string]: any
title*: string
type: DocType
route: 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: function (
props*:
) => any
data
[string]:
componentsLookup
[string]: string
MDXPage: any
isMDXComponent: boolean
parameters: any
component
at*: function (
index*:
) => T | undefined
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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: StoryRenderFn
description: string
arguments: StoryArgument[]
loc
start*:
end*:
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component
at*: function (
index*:
) => T | undefined
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: StoryRenderFn[]
plugins: any
category: string
components*
[string]:
interface
name*: string
importedName: "default" | "namespace" | string
from: string
request: string
fileName: string
propsInfoFile: string
loc
start*:
end*:
package: string
source: string
info
displayName*:
description*:
props*:
externalDependencies
[string]: (Omit<ImportType, "from">)[]
localDependencies
[string]: (Omit<ImportType, "from">)[]
jsx: JSXNode[]
fileInfo
dateCreated*:
dateModified*:
commits*:
sloc*:
jest
results*:
coverage*:
packages*
[string]:
interface
fileHash*: string
name: string
version: string
dependencies
[string]: PackageDependency
devDependencies
[string]: PackageDependency
peerDependencies
[string]: PackageDependency
privateNpm: boolean
repository*
browse: string
docs: string
issues: string
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: StoryRenderFn
description: string
arguments: StoryArgument[]
loc
start*:
end*:
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component: string | Record<string, unknown> | ElementType<Props>
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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*: string
) => void
provider
logo*: ReactNode
url*: string
name*: string
field* string
returns
type
[string]: number

DocPagesPath

interface

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

properties

Name Type
type "story" | "blog" | "page" | "tags" | "author" | string
path* string
query string
lastModified string
docId string
storyId string
category string
activeTab string

getPageTabs

function

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

parameters

Name Type
page*
PageConfiguration
basePath: string
sideNav
storyPaths: boolean
collapseSingle: boolean
label: string
indexHome: boolean
topMenu: boolean
container: ComponentType | null
tabs: Record<string, TabConfiguration>
navSidebar: boolean
contextSidebar: boolean
fullPage: boolean
returns ((string, undefined))[]

getDocPages

function

defined in @component-controls/routes/core/routes/src/routes/docs-pages.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: DocType
route: 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: FrameworkRenderFn
data: DocumentData
componentsLookup
[string]: string
MDXPage: any
isMDXComponent: boolean
parameters: any
component
at*:
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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: StoryRenderFn
description: string
arguments: StoryArguments
loc: CodeLocation
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component
at*:
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: StoryRenderFn[]
plugins: any
category: string
components*
[string]:
interface
name*: string
importedName: "default" | "namespace" | string
from: string
request: string
fileName: string
propsInfoFile: string
loc: CodeLocation
package: string
source: string
info: ComponentInfo
externalDependencies: Imports
localDependencies: Imports
jsx: JSXTree
fileInfo: FileInfo
jest: JestTests
packages*
[string]:
interface
fileHash*: string
name: string
version: string
dependencies: PackageDependencies
devDependencies: PackageDependencies
peerDependencies: PackageDependencies
privateNpm: 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: StoryRenderFn
description: string
arguments: StoryArguments
loc: CodeLocation
source: string
subtitle: string
dynamic: boolean
dynamicId: string
component: string | Record<string, unknown> | ElementType<Props>
subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>
controls: ComponentControls
smartControls: SmartControls
decorators: 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 DocPagesPath[]

Readme

Keywords

none

Package Sidebar

Install

npm i @component-controls/routes

Weekly Downloads

10

Version

4.0.3

License

MIT

Unpacked Size

282 kB

Total Files

13

Last publish

Collaborators

  • atanasster