diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 81169f1382f..c23f1075713 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,12 +7,12 @@ /addons/centered/ @kazupon /addons/events/ @z4o4z @ndelangen /addons/graphql/ @mnmtanish -/addons/info/ @theinterned @z4o4z @UsulPro @dangreenisrael @danielduan +/addons/info/ @theinterned @z4o4z @UsulPro @dangreenisrael /addons/jest/ @renaudtertrais /addons/knobs/ @alexandrebodin @theinterned @leonrodenburg @alterx /addons/links/ @ndelangen /addons/notes/ @alexandrebodin -/addons/options/ @danielduan @UsulPro +/addons/options/ @UsulPro /addons/storyshots/ @igor-dv @thomasbertet /addons/storysource/ @igor-dv /addons/viewport/ @saponifi3d @@ -20,7 +20,7 @@ /app/angular/ @alterx @igor-dv /app/polymer/ @ndelangen @naipath @leonrodenburg /app/react/ @xavcz @shilman @thomasbertet -/app/react-native/ @rmevans9 @danielduan @Gongreg @tmeasday +/app/react-native/ @rmevans9 @Gongreg @tmeasday /app/vue/ @thomasbertet @kazupon /app/svelte/ @plumpNation @@ -29,12 +29,12 @@ /examples/angular-cli/ @igor-dv @alterx /examples/cra-kitchen-sink/ @ndelangen @UsulPro /examples/cra-ts-kitchen-sink/ @mucsi96 -/examples/official-storybook/ @danielduan @UsulPro +/examples/official-storybook/ @UsulPro /examples/polymer-cli/ @naipath @igor-dv /examples/vue-kitchen-sink/ @igor-dv @alexandrebodin /examples/svelte-kitchen-sink/ @plumpNation -/examples-native/crna-kitchen-sink/ @Gongreg @danielduan +/examples-native/crna-kitchen-sink/ @Gongreg /lib/addons/ @ndelangen @theinterned /lib/channel-postmessage/ @mnmtanish @ndelangen diff --git a/CHANGELOG.md b/CHANGELOG.md index 548c3caa202..725e0ad0436 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,69 @@ +## 5.2.0-beta.47 (August 30, 2019) + +### Bug Fixes + +* UI: Optimize treeview render/filter performance ([#7910](https://github.com/storybookjs/storybook/pull/7910)) +* Addon-docs: Fix DocsPage to respect displayName ([#7915](https://github.com/storybookjs/storybook/pull/7915)) + +## 5.2.0-beta.46 (August 29, 2019) + +CSF users: this reverts the `makeDisplayName` change introduced in `5.2.0-beta.43` for maintainability reasons. See [#7901](https://github.com/storybookjs/storybook/pull/7901) for full rationale. And apologies for the inconvenience! + +### Bug Fixes + +* React: Fix missing props in the Welcome.tsx demo ([#7774](https://github.com/storybookjs/storybook/pull/7774)) + +### Maintenance + +* CSF: Revert `makeDisplayName` & add stable `storyNameFromExport` ([#7901](https://github.com/storybookjs/storybook/pull/7901)) +* Addon-a11y: Upgrade axe to 3.3.2 which adds/mods rules ([#7888](https://github.com/storybookjs/storybook/pull/7888)) + +## 5.2.0-beta.45 (August 28, 2019) + +### Bug Fixes + +* Addon-docs: Fix MDX Story ID to match new CSF ([#7894](https://github.com/storybookjs/storybook/pull/7894)) + +## 5.2.0-beta.44 (August 28, 2019) + +Publish failed + +## 5.2.0-beta.43 (August 28, 2019) + +CSF users: This is potentially a breaking change. If you want to opt-out of the new default display name calculation (`lodash.startCase`) you can add the following to your SB config: + +```js +addParameters({ options: { makeDisplayName: key => key }}); +``` + +### Features + +* CSF: Transform CSF named exports w/ `makeDisplayName` ([#7878](https://github.com/storybookjs/storybook/pull/7878)) + +## 5.2.0-beta.42 (August 28, 2019) + +Addon-docs users: This is a breaking change if you have been hacking the `docs` parameter manually. If you're using the zero-config option for `DocsPage` or `MDX`, you should be unaffected by it. + +### Maintenance + +* Addon-docs: Make config API consistent with other addons ([#7874](https://github.com/storybookjs/storybook/pull/7874)) + +## 5.2.0-beta.41 (August 27, 2019) + +### Features + +* Addon-info: Add configurable component comparator ([#7409](https://github.com/storybookjs/storybook/pull/7409)) + +### Bug Fixes + +* Addon-viewports: Add back default viewports ([#7448](https://github.com/storybookjs/storybook/pull/7448)) +* Core: Pass a separate hooks context per story ([#7860](https://github.com/storybookjs/storybook/pull/7860)) +* UI: Fix TooltipLinkList not scrollable ([#7865](https://github.com/storybookjs/storybook/pull/7865)) + +### Maintenance + +* UI: Add ignore `first-child` selector warning flag ([#7861](https://github.com/storybookjs/storybook/pull/7861)) + ## 5.2.0-beta.40 (August 23, 2019) ### Bug Fixes diff --git a/MIGRATION.md b/MIGRATION.md index 03a0c652874..059d3ea0f91 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -67,6 +67,21 @@ ## From version 5.1.x to 5.2.x +### default viewports + +The default viewports have been reduced to a smaller set, we think is enough for most usecases. +You can get the old default back by adding the following to your `config.js`: + +```js +import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; + +addParameters({ + viewport: { + viewports: INITIAL_VIEWPORTS, + }, +}); +``` + ### Grid toolbar-feature The grid feature in the toolbar has been relocated to [addon-background](https://github.com/storybookjs/storybook/tree/next/addons/backgrounds), follow the setup intructions on that addon to get the feature again. diff --git a/addons/a11y/package.json b/addons/a11y/package.json index aaa930a4a13..e3554469660 100644 --- a/addons/a11y/package.json +++ b/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "a11y addon for storybook", "keywords": [ "a11y", @@ -26,13 +26,13 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/client-logger": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", - "axe-core": "^3.2.2", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/client-logger": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", + "axe-core": "^3.3.2", "common-tags": "^1.8.0", "core-js": "^3.0.1", "global": "^4.3.2", diff --git a/addons/actions/package.json b/addons/actions/package.json index fca77e1bb54..38c09766a8f 100644 --- a/addons/actions/package.json +++ b/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Action Logger addon for storybook", "keywords": [ "storybook" @@ -21,12 +21,12 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/client-api": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/client-api": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "core-js": "^3.0.1", "fast-deep-equal": "^2.0.1", "global": "^4.3.2", diff --git a/addons/backgrounds/package.json b/addons/backgrounds/package.json index ede1d7bd043..0f997875a23 100644 --- a/addons/backgrounds/package.json +++ b/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "A storybook addon to show different backgrounds for your preview", "keywords": [ "addon", @@ -25,12 +25,12 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/client-logger": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/client-logger": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "core-js": "^3.0.1", "memoizerific": "^1.11.3", "react": "^16.8.3", diff --git a/addons/centered/README.md b/addons/centered/README.md index a5267a7e686..8eddd66bbe1 100644 --- a/addons/centered/README.md +++ b/addons/centered/README.md @@ -4,6 +4,8 @@ Storybook Centered Decorator can be used to center components inside the preview [Framework Support](https://github.com/storybookjs/storybook/blob/master/ADDONS_SUPPORT.md) +⚠️ This addon applies styling to the view in order to center the component. This may impact the look and feel of story. + ### Usage ```sh diff --git a/addons/centered/package.json b/addons/centered/package.json index 7981dba3a18..688159f95f4 100644 --- a/addons/centered/package.json +++ b/addons/centered/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-centered", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Storybook decorator to center components", "keywords": [ "addon", @@ -23,7 +23,7 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", "core-js": "^3.0.1", "global": "^4.3.2", "util-deprecate": "^1.0.2" diff --git a/addons/contexts/package.json b/addons/contexts/package.json index 99c91bb8a51..01fa4fece55 100644 --- a/addons/contexts/package.json +++ b/addons/contexts/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-contexts", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Storybook Addon Contexts", "keywords": [ "storybook", @@ -28,10 +28,10 @@ "dev:check-types": "tsc --noEmit" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", "core-js": "^3.0.1" }, "peerDependencies": { diff --git a/addons/cssresources/package.json b/addons/cssresources/package.json index 0814eddea91..8e2bdc257a1 100644 --- a/addons/cssresources/package.json +++ b/addons/cssresources/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-cssresources", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "A storybook addon to switch between css resources at runtime for your story", "keywords": [ "addon", @@ -25,10 +25,10 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", "core-js": "^3.0.1", "global": "^4.3.2", "react": "^16.8.3" diff --git a/addons/design-assets/package.json b/addons/design-assets/package.json index c0df5f84bb9..fc15b1c4630 100644 --- a/addons/design-assets/package.json +++ b/addons/design-assets/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-design-assets", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Design asset preview for storybook", "keywords": [ "addon", @@ -27,12 +27,12 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/client-logger": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/client-logger": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "common-tags": "^1.8.0", "core-js": "^3.0.1", "global": "^4.3.2", diff --git a/addons/docs/README.md b/addons/docs/README.md index 13984c8e106..25d168c7bb7 100644 --- a/addons/docs/README.md +++ b/addons/docs/README.md @@ -189,8 +189,10 @@ import { addParameters } from '@storybook/react'; import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks'; addParameters({ - docsContainer: DocsContainer, - docs: DocsPage, + docs: { + container: DocsContainer, + page: DocsPage, + }, }); ``` diff --git a/addons/docs/docs/docspage.md b/addons/docs/docs/docspage.md index 7d19942c364..8e0f30c3c62 100644 --- a/addons/docs/docs/docspage.md +++ b/addons/docs/docs/docspage.md @@ -196,7 +196,7 @@ And here are the return type signatures for each of the slot functions What if you don't want a `DocsPage` for your storybook, for a specific component, or even for a specific story? -You can replace DocsPage at any level by overriding the `docs` parameter: +You can replace DocsPage at any level by overriding the `docs.page` parameter: - With `null` to remove docs - [With MDX](#csf-stories-with-mdx-docs) docs @@ -206,7 +206,7 @@ You can replace DocsPage at any level by overriding the `docs` parameter: ```js import { addParameters } from '@storybook/react'; -addParameters({ docs: null }); +addParameters({ docs: { page: null } }); ``` **Component-level (Button.stories.js)** @@ -216,7 +216,7 @@ import { Button } from './Button'; export default { title: 'Demo/Button', component: Button, - parameters: { docs: null }, + parameters: { docs: { page: null } }, }; ``` @@ -227,7 +227,7 @@ import { Button } from './Button'; // export default { ... } export const basic => () => basic.story = { - parameters: { docs: null } + parameters: { docs: { page: null } } } ``` diff --git a/addons/docs/docs/recipes.md b/addons/docs/docs/recipes.md index fcea05acfcf..5c60d9db1a8 100644 --- a/addons/docs/docs/recipes.md +++ b/addons/docs/docs/recipes.md @@ -56,7 +56,9 @@ import mdx from './Button.mdx'; export default { title: 'Demo/Button', parameters: { - docs: mdx, + docs: { + page: mdx, + }, }, }; diff --git a/addons/docs/package.json b/addons/docs/package.json index 6aa161af624..6fc346a58c5 100644 --- a/addons/docs/package.json +++ b/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Superior documentation for your components", "keywords": [ "addon", @@ -29,12 +29,12 @@ "@mdx-js/loader": "^1.1.0", "@mdx-js/mdx": "^1.1.0", "@mdx-js/react": "^1.0.27", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/router": "5.2.0-beta.40", - "@storybook/source-loader": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/router": "5.2.0-beta.47", + "@storybook/source-loader": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "core-js": "^3.0.1", "global": "^4.3.2", "js-string-escape": "^1.0.1", diff --git a/addons/docs/src/blocks/DocsContainer.tsx b/addons/docs/src/blocks/DocsContainer.tsx index f3a3c66ff6e..d61ea3fe2c4 100644 --- a/addons/docs/src/blocks/DocsContainer.tsx +++ b/addons/docs/src/blocks/DocsContainer.tsx @@ -47,7 +47,7 @@ export const DocsContainer: React.FunctionComponent = ({ const parameters = (context && context.parameters) || {}; const options = parameters.options || {}; const theme = ensureTheme(options.theme); - const { components: userComponents = null } = options.docs || {}; + const { components: userComponents = null } = parameters.docs || {}; const components = { ...defaultComponents, ...userComponents }; return ( diff --git a/addons/docs/src/blocks/DocsContext.ts b/addons/docs/src/blocks/DocsContext.ts index 26efed04813..ac71a1d545b 100644 --- a/addons/docs/src/blocks/DocsContext.ts +++ b/addons/docs/src/blocks/DocsContext.ts @@ -6,15 +6,11 @@ export interface DocsContextProps { selectedStory?: string; /** - * mdxKind is a statically-generated "kind" that corresponds to the - * component that's being documented in the MDX file, It's combined - * with the MDX story name `...` to - * generate a storyId. In the case that the user is viewing a non-MDX - * story, the value of `mdxKind` will be the currently-selected kind. - * (I can't remember the corner case in which using the currentl-selected - * kind breaks down in MDX-defined stories, but there is one!) + * mdxStoryNameToId is an MDX-compiler-generated mapping of an MDX story's + * display name to its storyId. It's used internally by the `` + * doc block. */ - mdxKind?: string; + mdxStoryNameToId?: Record; parameters?: any; storyStore?: any; forceRender?: () => void; diff --git a/addons/docs/src/blocks/DocsPage.tsx b/addons/docs/src/blocks/DocsPage.tsx index 0dd243f394f..ea55de4993f 100644 --- a/addons/docs/src/blocks/DocsPage.tsx +++ b/addons/docs/src/blocks/DocsPage.tsx @@ -37,6 +37,7 @@ interface DocsStoryProps { description?: string; expanded?: boolean; withToolbar?: boolean; + parameters?: any; } interface StoryData { @@ -84,9 +85,10 @@ const DocsStory: React.FunctionComponent = ({ description, expanded = true, withToolbar = false, + parameters, }) => ( <> - {expanded && {name}} + {expanded && {(parameters && parameters.displayName) || name}} {expanded && description && } @@ -110,9 +112,7 @@ export const DocsPage: React.FunctionComponent = ({ const propsTableProps = propsSlot(context); const { selectedKind, storyStore } = context; - const componentStories = (storyStore.raw() as StoryData[]).filter( - s => s.kind === selectedKind - ); + const componentStories = storyStore.getStoriesForKind(selectedKind); const primary = primarySlot(componentStories, context); const stories = storiesSlot(componentStories, context); diff --git a/addons/docs/src/blocks/Preview.tsx b/addons/docs/src/blocks/Preview.tsx index bc18d47405c..19276cccb3b 100644 --- a/addons/docs/src/blocks/Preview.tsx +++ b/addons/docs/src/blocks/Preview.tsx @@ -1,6 +1,5 @@ import React, { ReactNodeArray } from 'react'; import { Preview as PurePreview, PreviewProps as PurePreviewProps } from '@storybook/components'; -import { toId } from '@storybook/router'; import { getSourceProps } from './Source'; import { DocsContext, DocsContextProps } from './DocsContext'; @@ -20,7 +19,7 @@ const getPreviewProps = ( children, ...props }: PreviewProps & { children?: React.ReactNode }, - { mdxKind, storyStore }: DocsContextProps + { mdxStoryNameToId, storyStore }: DocsContextProps ): PurePreviewProps => { if (withSource === SourceState.NONE && !children) { return props; @@ -29,7 +28,7 @@ const getPreviewProps = ( const stories = childArray.filter( (c: React.ReactElement) => c.props && (c.props.id || c.props.name) ) as React.ReactElement[]; - const targetIds = stories.map(s => s.props.id || toId(mdxKind, s.props.name)); + const targetIds = stories.map(s => s.props.id || mdxStoryNameToId[s.props.name]); const sourceProps = getSourceProps({ ids: targetIds }, { storyStore }); return { ...props, // pass through columns etc. diff --git a/addons/docs/src/blocks/Props.tsx b/addons/docs/src/blocks/Props.tsx index 53b396cdbc1..b618fb15074 100644 --- a/addons/docs/src/blocks/Props.tsx +++ b/addons/docs/src/blocks/Props.tsx @@ -23,17 +23,16 @@ export const getPropsTableProps = ( { exclude, of }: PropsProps, { parameters }: DocsContextProps ): PropsTableProps => { - const { component } = parameters; try { + const params = parameters || {}; + const { component, framework = null } = params; + const target = of === CURRENT_SELECTION ? component : of; if (!target) { throw new Error(PropsTableError.NO_COMPONENT); } - const { framework = null } = parameters || {}; - const { getPropDefs = inferPropDefs(framework) } = - (parameters && parameters.options && parameters.options.docs) || {}; - + const { getPropDefs = inferPropDefs(framework) } = params.docs || {}; if (!getPropDefs) { throw new Error(PropsTableError.PROPS_UNSUPPORTED); } diff --git a/addons/docs/src/blocks/Story.tsx b/addons/docs/src/blocks/Story.tsx index 6940fbe192b..b098222c3e7 100644 --- a/addons/docs/src/blocks/Story.tsx +++ b/addons/docs/src/blocks/Story.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { toId } from '@storybook/router'; import { Story, StoryProps as PureStoryProps } from '@storybook/components'; import { CURRENT_SELECTION } from './shared'; @@ -32,12 +31,12 @@ const inferInlineStories = (framework: string): boolean => { export const getStoryProps = ( props: StoryProps, - { id: currentId, storyStore, parameters, mdxKind }: DocsContextProps + { id: currentId, storyStore, parameters, mdxStoryNameToId }: DocsContextProps ): PureStoryProps => { const { id } = props as StoryRefProps; const { name } = props as StoryDefProps; const inputId = id === CURRENT_SELECTION ? currentId : id; - const previewId = inputId || toId(mdxKind, name); + const previewId = inputId || mdxStoryNameToId[name]; const { height, inline } = props; const data = storyStore.fromId(previewId); @@ -45,7 +44,7 @@ export const getStoryProps = ( // prefer props, then global options, then framework-inferred values const { inlineStories = inferInlineStories(framework), iframeHeight = undefined } = - (parameters && parameters.options && parameters.options.docs) || {}; + (parameters && parameters.docs) || {}; return { inline: typeof inline === 'boolean' ? inline : inlineStories, id: previewId, diff --git a/addons/docs/src/frameworks/angular/config.js b/addons/docs/src/frameworks/angular/config.js index 2017a4bb6ad..bf960fad550 100644 --- a/addons/docs/src/frameworks/angular/config.js +++ b/addons/docs/src/frameworks/angular/config.js @@ -3,6 +3,8 @@ import { addParameters } from '@storybook/angular'; import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks'; addParameters({ - docsContainer: DocsContainer, - docs: DocsPage, + docs: { + container: DocsContainer, + page: DocsPage, + }, }); diff --git a/addons/docs/src/frameworks/html/config.js b/addons/docs/src/frameworks/html/config.js index 9b7b52320cd..f4c6dd942e3 100644 --- a/addons/docs/src/frameworks/html/config.js +++ b/addons/docs/src/frameworks/html/config.js @@ -3,6 +3,8 @@ import { addParameters } from '@storybook/html'; import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks'; addParameters({ - docsContainer: DocsContainer, - docs: DocsPage, + docs: { + container: DocsContainer, + page: DocsPage, + }, }); diff --git a/addons/docs/src/frameworks/react/config.js b/addons/docs/src/frameworks/react/config.js index 69f35dc6db0..22887966ba3 100644 --- a/addons/docs/src/frameworks/react/config.js +++ b/addons/docs/src/frameworks/react/config.js @@ -3,6 +3,8 @@ import { addParameters } from '@storybook/react'; import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks'; addParameters({ - docsContainer: DocsContainer, - docs: DocsPage, + docs: { + container: DocsContainer, + page: DocsPage, + }, }); diff --git a/addons/docs/src/frameworks/vue/config.js b/addons/docs/src/frameworks/vue/config.js index 17584c29c59..76f22f9cb6e 100644 --- a/addons/docs/src/frameworks/vue/config.js +++ b/addons/docs/src/frameworks/vue/config.js @@ -3,6 +3,8 @@ import { addParameters } from '@storybook/vue'; import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks'; addParameters({ - docsContainer: DocsContainer, - docs: DocsPage, + docs: { + container: DocsContainer, + page: DocsPage, + }, }); diff --git a/addons/docs/src/mdx/__snapshots__/mdx-compiler-plugin.test.js.snap b/addons/docs/src/mdx/__snapshots__/mdx-compiler-plugin.test.js.snap index fd74553dda9..519c6c08745 100644 --- a/addons/docs/src/mdx/__snapshots__/mdx-compiler-plugin.test.js.snap +++ b/addons/docs/src/mdx/__snapshots__/mdx-compiler-plugin.test.js.snap @@ -53,6 +53,7 @@ MDXContent.isMDXComponent = true; export const one = () => ; one.story = {}; +one.story.name = 'one'; one.story.parameters = { mdxSource: '' }; one.story.decorators = [storyFn =>
{storyFn()}
]; @@ -72,12 +73,15 @@ const componentMeta = { includeStories: ['one'], }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = { one: 'button--one' }; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -117,20 +121,23 @@ function MDXContent({ components, ...props }) { MDXContent.isMDXComponent = true; -export const storybookDocsOnly = () => { +export const __page = () => { throw new Error('Docs-only story'); }; -storybookDocsOnly.story = { parameters: { docsOnly: true } }; +__page.story = { parameters: { docsOnly: true } }; -const componentMeta = { title: 'docs-only', includeStories: ['storybookDocsOnly'] }; +const componentMeta = { title: 'docs-only', includeStories: ['__page'] }; + +const mdxStoryNameToId = {}; -const mdxKind = componentMeta.title; componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -177,6 +184,7 @@ MDXContent.isMDXComponent = true; export const one = () => ; one.story = {}; +one.story.name = 'one'; one.story.parameters = { mdxSource: '' }; export const helloStory = () => ; @@ -186,12 +194,15 @@ helloStory.story.parameters = { mdxSource: '' }; const componentMeta = { title: 'Button', includeStories: ['one', 'helloStory'] }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = { one: 'button--one', 'hello story': 'button--hello-story' }; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -268,12 +279,18 @@ const componentMeta = { includeStories: ['componentNotes', 'storyNotes'], }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = { + 'component notes': 'button--component-notes', + 'story notes': 'button--story-notes', +}; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -334,6 +351,7 @@ helloButton.story.parameters = { mdxSource: '' }; export const two = () => ; two.story = {}; +two.story.name = 'two'; two.story.parameters = { mdxSource: '' }; const componentMeta = { @@ -344,12 +362,15 @@ const componentMeta = { includeStories: ['helloButton', 'two'], }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = { 'hello button': 'button--hello-button', two: 'button--two' }; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -386,12 +407,15 @@ MDXContent.isMDXComponent = true; const componentMeta = { includeStories: [] }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = {}; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -431,16 +455,20 @@ MDXContent.isMDXComponent = true; export const text = () => 'Plain text'; text.story = {}; +text.story.name = 'text'; text.story.parameters = { mdxSource: \\"'Plain text'\\" }; const componentMeta = { title: 'Text', includeStories: ['text'] }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = { text: 'text--text' }; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -487,6 +515,7 @@ MDXContent.isMDXComponent = true; export const one = () => ; one.story = {}; +one.story.name = 'one'; one.story.parameters = { mdxSource: '' }; export const helloStory = () => ; @@ -501,12 +530,19 @@ wPunctuation.story.parameters = { mdxSource: '' const componentMeta = { title: 'Button', includeStories: ['one', 'helloStory', 'wPunctuation'] }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = { + one: 'button--one', + 'hello story': 'button--hello-story', + 'w/punctuation': 'button--w-punctuation', +}; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -545,27 +581,30 @@ function MDXContent({ components, ...props }) { MDXContent.isMDXComponent = true; -export const story0 = () => { +export const functionStory = () => { const btn = document.createElement('button'); btn.innerHTML = 'Hello Button'; btn.addEventListener('click', action('Click')); return btn; }; -story0.story = {}; -story0.story.name = 'function'; -story0.story.parameters = { +functionStory.story = {}; +functionStory.story.name = 'function'; +functionStory.story.parameters = { mdxSource: \\"() => {\\\\n const btn = document.createElement('button');\\\\n btn.innerHTML = 'Hello Button';\\\\n btn.addEventListener('click', action('Click'));\\\\n return btn;\\\\n}\\", }; -const componentMeta = { includeStories: ['story0'] }; +const componentMeta = { includeStories: ['functionStory'] }; + +const mdxStoryNameToId = {}; -const mdxKind = componentMeta.title; componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -631,12 +670,15 @@ toStorybook.story.parameters = { const componentMeta = { title: 'MDX|Welcome', includeStories: ['toStorybook'] }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = { 'to storybook': 'mdx-welcome--to-storybook' }; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -673,12 +715,15 @@ MDXContent.isMDXComponent = true; const componentMeta = { includeStories: [] }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = {}; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " @@ -716,12 +761,15 @@ MDXContent.isMDXComponent = true; const componentMeta = { includeStories: [] }; -const mdxKind = componentMeta.title; +const mdxStoryNameToId = {}; + componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => ( - {children} -); -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => ( + {children} + ), + page: MDXContent, +}; export default componentMeta; " diff --git a/addons/docs/src/mdx/mdx-compiler-plugin.js b/addons/docs/src/mdx/mdx-compiler-plugin.js index cacd34a1fd7..5414993eac8 100644 --- a/addons/docs/src/mdx/mdx-compiler-plugin.js +++ b/addons/docs/src/mdx/mdx-compiler-plugin.js @@ -3,6 +3,7 @@ const parser = require('@babel/parser'); const generate = require('@babel/generator').default; const camelCase = require('lodash/camelCase'); const jsStringEscape = require('js-string-escape'); +const { toId, storyNameFromExport } = require('@storybook/router/utils'); // Generate the MDX as is, but append named exports for every // story in the contents @@ -17,17 +18,19 @@ function getAttr(elt, what) { return attr && attr.value; } -function getStoryFn(name, counter) { - if (name) { - const storyFn = camelCase(name.replace(/[^a-z0-9-]/g, '-')); - if (storyFn.length > 1 && !RESERVED.exec(storyFn)) { - return storyFn; - } - } - return `story${counter}`; -} +const isReserved = name => RESERVED.exec(name); -function genStoryExport(ast, counter) { +const sanitizeName = name => { + let key = camelCase(name); + if (isReserved(key)) { + key = `${key}Story`; + } + return key; +}; + +const getStoryKey = (name, counter) => (name ? sanitizeName(name) : `story${counter}`); + +function genStoryExport(ast, context) { let storyName = getAttr(ast.openingElement, 'name'); let storyId = getAttr(ast.openingElement, 'id'); storyName = storyName && storyName.value; @@ -45,7 +48,7 @@ function genStoryExport(ast, counter) { // console.log('genStoryExport', JSON.stringify(ast, null, 2)); const statements = []; - const storyKey = getStoryFn(storyName, counter); + const storyKey = getStoryKey(storyName, context.counter); let body = ast.children.find(n => n.type !== 'JSXText'); let storyCode = null; @@ -72,9 +75,8 @@ function genStoryExport(ast, counter) { } statements.push(`${storyKey}.story = {};`); - if (storyName !== storyKey) { - statements.push(`${storyKey}.story.name = '${storyName}';`); - } + // always preserve the name, since CSF exports can get modified by displayName + statements.push(`${storyKey}.story.name = '${storyName}';`); let parameters = getAttr(ast.openingElement, 'parameters'); parameters = parameters && parameters.expression; @@ -94,23 +96,26 @@ function genStoryExport(ast, counter) { statements.push(`${storyKey}.story.decorators = ${decos};`); } + // eslint-disable-next-line no-param-reassign + context.storyNameToKey[storyName] = storyKey; + return { [storyKey]: statements.join('\n'), }; } -function genPreviewExports(ast, counter) { +function genPreviewExports(ast, context) { // console.log('genPreviewExports', JSON.stringify(ast, null, 2)); - let localCounter = counter; const previewExports = {}; for (let i = 0; i < ast.children.length; i += 1) { const child = ast.children[i]; if (child.type === 'JSXElement' && child.openingElement.name.name === 'Story') { - const storyExport = genStoryExport(child, localCounter); + const storyExport = genStoryExport(child, context); if (storyExport) { Object.assign(previewExports, storyExport); - localCounter += 1; + // eslint-disable-next-line no-param-reassign + context.counter += 1; } } } @@ -163,12 +168,16 @@ function getExports(node, counter) { // insert `mdxKind` into the context so that we can know what "kind" we're rendering into // when we render ..., since this MDX can be attached to any `selectedKind`! const wrapperJs = ` -const mdxKind = componentMeta.title; componentMeta.parameters = componentMeta.parameters || {}; -componentMeta.parameters.docsContainer = ({ context, children }) => {children}; -componentMeta.parameters.docs = MDXContent; +componentMeta.parameters.docs = { + container: ({ context, children }) => {children}, + page: MDXContent, +}; `.trim(); +// Use this rather than JSON.stringify because `Meta`'s attributes +// are already valid code strings, so we want to insert them raw +// rather than add an extra set of quotes function stringifyMeta(meta) { let result = '{ '; Object.entries(meta).forEach(([key, val]) => { @@ -186,16 +195,18 @@ function extractExports(node, options) { const storyExports = []; const includeStories = []; let metaExport = null; - let counter = 0; + const context = { + counter: 0, + storyNameToKey: {}, + }; node.children.forEach(n => { - const exports = getExports(n, counter); + const exports = getExports(n, context); if (exports) { const { stories, meta } = exports; if (stories) { Object.entries(stories).forEach(([key, story]) => { includeStories.push(key); storyExports.push(story); - counter += 1; }); } if (meta) { @@ -208,22 +219,32 @@ function extractExports(node, options) { }); if (metaExport) { if (!storyExports.length) { - storyExports.push( - 'export const storybookDocsOnly = () => { throw new Error("Docs-only story"); };' - ); - storyExports.push('storybookDocsOnly.story = { parameters: { docsOnly: true } };'); - includeStories.push('storybookDocsOnly'); + storyExports.push('export const __page = () => { throw new Error("Docs-only story"); };'); + storyExports.push('__page.story = { parameters: { docsOnly: true } };'); + includeStories.push('__page'); } } else { metaExport = {}; } metaExport.includeStories = JSON.stringify(includeStories); + const { title } = metaExport; + const mdxStoryNameToId = Object.entries(context.storyNameToKey).reduce( + (acc, [storyName, storyKey]) => { + if (title) { + acc[storyName] = toId(title, storyNameFromExport(storyKey)); + } + return acc; + }, + {} + ); + const fullJsx = [ 'import { DocsContainer } from "@storybook/addon-docs/blocks";', defaultJsx, ...storyExports, `const componentMeta = ${stringifyMeta(metaExport)};`, + `const mdxStoryNameToId = ${JSON.stringify(mdxStoryNameToId)};`, wrapperJs, 'export default componentMeta;', ].join('\n\n'); diff --git a/addons/events/package.json b/addons/events/package.json index 5a06b399e14..ec8af0403b2 100644 --- a/addons/events/package.json +++ b/addons/events/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-events", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Add events to your Storybook stories.", "keywords": [ "addon", @@ -24,11 +24,11 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/client-api": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/client-api": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "core-js": "^3.0.1", "format-json": "^1.0.3", "lodash": "^4.17.11", diff --git a/addons/google-analytics/package.json b/addons/google-analytics/package.json index 718f794bd25..6952aad0fc4 100644 --- a/addons/google-analytics/package.json +++ b/addons/google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-google-analytics", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Storybook addon for google analytics", "keywords": [ "addon", @@ -20,8 +20,8 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", "core-js": "^3.0.1", "global": "^4.3.2", "react-ga": "^2.5.7" diff --git a/addons/graphql/package.json b/addons/graphql/package.json index 70e332a32e6..6665fd07e4d 100644 --- a/addons/graphql/package.json +++ b/addons/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-graphql", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Storybook addon to display the GraphiQL IDE", "keywords": [ "addon", @@ -22,8 +22,8 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", "core-js": "^3.0.1", "global": "^4.3.2", "graphiql": "^0.13.0", diff --git a/addons/info/package.json b/addons/info/package.json index bd594c349c6..683626b3d4c 100644 --- a/addons/info/package.json +++ b/addons/info/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-info", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "A Storybook addon to show additional information for your stories.", "keywords": [ "addon", @@ -22,10 +22,10 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/client-logger": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/client-logger": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "core-js": "^3.0.1", "global": "^4.3.2", "jsx-to-string": "^1.4.0", diff --git a/addons/info/src/__snapshots__/index.test.js.snap b/addons/info/src/__snapshots__/index.test.js.snap index 4e0092eaba1..0f02af2f41c 100644 --- a/addons/info/src/__snapshots__/index.test.js.snap +++ b/addons/info/src/__snapshots__/index.test.js.snap @@ -26,6 +26,7 @@ exports[`addon Info should render and external markdown 1`] = ` maxPropObjectKeys={3} maxPropStringLength={50} maxPropsIntoLine={3} + propTableCompare={[Function]} propTables={Array []} propTablesExclude={Array []} showHeader={true} @@ -160,6 +161,7 @@ containing **bold**, *cursive* text, \`code\` and [a link](https://github.com)" maxPropObjectKeys={3} maxPropStringLength={50} maxPropsIntoLine={3} + propTableCompare={[Function]} propTables={Array []} propTablesExclude={Array []} showHeader={true} @@ -292,6 +294,7 @@ exports[`addon Info should render for memoized component 1`] = ` maxPropObjectKeys={3} maxPropStringLength={50} maxPropsIntoLine={3} + propTableCompare={[Function]} propTables={null} propTablesExclude={Array []} showHeader={true} @@ -821,6 +824,7 @@ exports[`addon Info should render component description if story kind matches co maxPropObjectKeys={3} maxPropStringLength={50} maxPropsIntoLine={3} + propTableCompare={[Function]} propTables={null} propTablesExclude={Array []} showHeader={true} @@ -5379,6 +5383,7 @@ exports[`addon Info should render component description if story name matches co maxPropObjectKeys={3} maxPropStringLength={50} maxPropsIntoLine={3} + propTableCompare={[Function]} propTables={null} propTablesExclude={Array []} showHeader={true} diff --git a/addons/info/src/components/Story.js b/addons/info/src/components/Story.js index 237e4a8a053..bbc7b311a7e 100644 --- a/addons/info/src/components/Story.js +++ b/addons/info/src/components/Story.js @@ -302,6 +302,7 @@ class Story extends Component { const { children, propTablesExclude, + propTableCompare, maxPropObjectKeys, maxPropArrayLength, maxPropStringLength, @@ -349,7 +350,7 @@ class Story extends Component { (propTables.length > 0 && // if propTables is set and has items in it !propTables.includes(innerChildren.type)) || // ignore types that are missing from propTables (Array.isArray(propTablesExclude) && // also ignore excluded types - ~propTablesExclude.indexOf(innerChildren.type)) // eslint-disable-line no-bitwise + propTablesExclude.some(Comp => propTableCompare(innerChildren, Comp))) ) { return; } @@ -409,6 +410,7 @@ Story.propTypes = { info: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), propTables: PropTypes.arrayOf(PropTypes.func), propTablesExclude: PropTypes.arrayOf(PropTypes.func), + propTableCompare: PropTypes.func.isRequired, showInline: PropTypes.bool, showHeader: PropTypes.bool, showSource: PropTypes.bool, diff --git a/addons/info/src/index.js b/addons/info/src/index.js index 6f621f021b1..32223bf6693 100644 --- a/addons/info/src/index.js +++ b/addons/info/src/index.js @@ -13,6 +13,12 @@ const defaultOptions = { header: true, source: true, propTables: [], + propTableCompare: (element, Component) => + // https://github.com/gaearon/react-hot-loader#checking-element-types + typeof reactHotLoaderGlobal === 'undefined' + ? element.type === Component + : // eslint-disable-next-line no-undef + reactHotLoaderGlobal.areComponentsEqual(element.type, Component), TableComponent: PropTable, maxPropsIntoLine: 3, maxPropObjectKeys: 3, @@ -73,6 +79,7 @@ function addInfo(storyFn, context, infoOptions) { : s => nestedObjectAssign({}, s, options.styles), propTables: options.propTables, propTablesExclude: options.propTablesExclude, + propTableCompare: options.propTableCompare, PropTable: makeTableComponent(options.TableComponent), components, maxPropObjectKeys: options.maxPropObjectKeys, diff --git a/addons/jest/package.json b/addons/jest/package.json index 99fa7130373..5d0c9bd91d9 100644 --- a/addons/jest/package.json +++ b/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "React storybook addon that show component jest report", "keywords": [ "addon", @@ -28,11 +28,11 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "core-js": "^3.0.1", "global": "^4.3.2", "react": "^16.8.3", diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 8c0d0aa5a4f..8bd2281bbb4 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-knobs", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Storybook Addon Prop Editor Component", "keywords": [ "addon", @@ -22,12 +22,12 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/client-api": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/client-api": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "copy-to-clipboard": "^3.0.8", "core-js": "^3.0.1", "escape-html": "^1.0.3", diff --git a/addons/links/package.json b/addons/links/package.json index 4ef97ff2721..6512ac22480 100644 --- a/addons/links/package.json +++ b/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Story Links addon for storybook", "keywords": [ "addon", @@ -22,9 +22,9 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/router": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/router": "5.2.0-beta.47", "common-tags": "^1.8.0", "core-js": "^3.0.1", "global": "^4.3.2", diff --git a/addons/notes/package.json b/addons/notes/package.json index 11ff92c0ae4..1b6d5dc0e00 100644 --- a/addons/notes/package.json +++ b/addons/notes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-notes", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Write notes for your Storybook stories.", "keywords": [ "addon", @@ -23,13 +23,13 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/client-logger": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/router": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/client-logger": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/router": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "core-js": "^3.0.1", "global": "^4.3.2", "markdown-to-jsx": "^6.10.3", diff --git a/addons/ondevice-actions/package.json b/addons/ondevice-actions/package.json index 1e20ee59c04..5b3e4723251 100644 --- a/addons/ondevice-actions/package.json +++ b/addons/ondevice-actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-ondevice-actions", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Action Logger addon for react-native storybook", "keywords": [ "storybook" @@ -19,13 +19,13 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", "core-js": "^3.0.1", "fast-deep-equal": "^2.0.1" }, "devDependencies": { - "@storybook/addon-actions": "5.2.0-beta.40" + "@storybook/addon-actions": "5.2.0-beta.47" }, "peerDependencies": { "@storybook/addon-actions": "*", diff --git a/addons/ondevice-backgrounds/package.json b/addons/ondevice-backgrounds/package.json index c6966272b6f..5a5a27832a8 100644 --- a/addons/ondevice-backgrounds/package.json +++ b/addons/ondevice-backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-ondevice-backgrounds", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "A react-native storybook addon to show different backgrounds for your preview", "keywords": [ "addon", @@ -24,7 +24,7 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", "core-js": "^3.0.1", "prop-types": "^15.7.2" }, diff --git a/addons/ondevice-knobs/package.json b/addons/ondevice-knobs/package.json index 930b8f81e93..5922f208b57 100644 --- a/addons/ondevice-knobs/package.json +++ b/addons/ondevice-knobs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-ondevice-knobs", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Display storybook story knobs on your deviced.", "keywords": [ "addon", @@ -21,8 +21,8 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", "core-js": "^3.0.1", "deep-equal": "^1.0.1", "prop-types": "^15.7.2", diff --git a/addons/ondevice-notes/package.json b/addons/ondevice-notes/package.json index 27be5341920..1a4a56de309 100644 --- a/addons/ondevice-notes/package.json +++ b/addons/ondevice-notes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-ondevice-notes", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Write notes for your react-native Storybook stories.", "keywords": [ "addon", @@ -20,8 +20,8 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/client-logger": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/client-logger": "5.2.0-beta.47", "core-js": "^3.0.1", "prop-types": "^15.7.2", "react-native-simple-markdown": "^1.1.0" diff --git a/addons/options/package.json b/addons/options/package.json index 4603e340efe..5c2a30c0af1 100644 --- a/addons/options/package.json +++ b/addons/options/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-options", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "Options addon for storybook", "keywords": [ "addon", @@ -22,7 +22,7 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", "core-js": "^3.0.1", "util-deprecate": "^1.0.2" }, diff --git a/addons/queryparams/package.json b/addons/queryparams/package.json index 15d0051ffe2..ae461931acf 100644 --- a/addons/queryparams/package.json +++ b/addons/queryparams/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-queryparams", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "parameter addon for storybook", "keywords": [ "addon", @@ -23,12 +23,12 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", - "@storybook/api": "5.2.0-beta.40", - "@storybook/client-logger": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/api": "5.2.0-beta.47", + "@storybook/client-logger": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "common-tags": "^1.8.0", "core-js": "^3.0.1", "global": "^4.3.2", diff --git a/addons/storyshots/storyshots-core/package.json b/addons/storyshots/storyshots-core/package.json index b5e14c712eb..13d92d2af06 100644 --- a/addons/storyshots/storyshots-core/package.json +++ b/addons/storyshots/storyshots-core/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.", "keywords": [ "addon", @@ -25,7 +25,7 @@ "storybook": "start-storybook -p 6006" }, "dependencies": { - "@storybook/addons": "5.2.0-beta.40", + "@storybook/addons": "5.2.0-beta.47", "core-js": "^3.0.1", "glob": "^7.1.3", "global": "^4.3.2", diff --git a/addons/storyshots/storyshots-core/stories/__snapshots__/storyshot.enzyme.test.js.snap b/addons/storyshots/storyshots-core/stories/__snapshots__/storyshot.enzyme.test.js.snap index 94367ee4014..cae5deca185 100644 --- a/addons/storyshots/storyshots-core/stories/__snapshots__/storyshot.enzyme.test.js.snap +++ b/addons/storyshots/storyshots-core/stories/__snapshots__/storyshot.enzyme.test.js.snap @@ -166,6 +166,7 @@ exports[`Storyshots Welcome to Storybook 1`] = ` onClick={[Function]} > diff --git a/examples/cra-kitchen-sink/package.json b/examples/cra-kitchen-sink/package.json index e307a234da1..8e2c3ee1992 100644 --- a/examples/cra-kitchen-sink/package.json +++ b/examples/cra-kitchen-sink/package.json @@ -1,6 +1,6 @@ { "name": "cra-kitchen-sink", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "scripts": { "build": "react-scripts build", @@ -19,23 +19,23 @@ "react-lifecycles-compat": "^3.0.4" }, "devDependencies": { - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-backgrounds": "5.2.0-beta.40", - "@storybook/addon-centered": "5.2.0-beta.40", - "@storybook/addon-docs": "5.2.0-beta.40", - "@storybook/addon-events": "5.2.0-beta.40", - "@storybook/addon-info": "5.2.0-beta.40", - "@storybook/addon-jest": "5.2.0-beta.40", - "@storybook/addon-knobs": "5.2.0-beta.40", - "@storybook/addon-links": "5.2.0-beta.40", - "@storybook/addon-notes": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addon-storyshots": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/client-logger": "5.2.0-beta.40", - "@storybook/react": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-backgrounds": "5.2.0-beta.47", + "@storybook/addon-centered": "5.2.0-beta.47", + "@storybook/addon-docs": "5.2.0-beta.47", + "@storybook/addon-events": "5.2.0-beta.47", + "@storybook/addon-info": "5.2.0-beta.47", + "@storybook/addon-jest": "5.2.0-beta.47", + "@storybook/addon-knobs": "5.2.0-beta.47", + "@storybook/addon-links": "5.2.0-beta.47", + "@storybook/addon-notes": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addon-storyshots": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/client-logger": "5.2.0-beta.47", + "@storybook/react": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "react-scripts": "^3.0.1" } } diff --git a/examples/cra-kitchen-sink/src/stories/perf.stories.js b/examples/cra-kitchen-sink/src/stories/perf.stories.js new file mode 100644 index 00000000000..d0612b21af1 --- /dev/null +++ b/examples/cra-kitchen-sink/src/stories/perf.stories.js @@ -0,0 +1,24 @@ +import React from 'react'; + +import { storiesOf } from '@storybook/react'; + +import { Button } from '@storybook/react/demo'; + +for (let i = 0; i < 1; i += 1) { + const randomDemoName = Math.random() + .toString(36) + .substring(7); + const stories = storiesOf(`Perf.${randomDemoName}`); + + for (let j = 0; j < 10; j += 1) { + stories + .add(`with text ${j}`, () => ) + .add(`with emoji ${j}`, () => ( + + )); + } +} diff --git a/examples/cra-react15/package.json b/examples/cra-react15/package.json index e748a2399f1..b933e8f0c0c 100644 --- a/examples/cra-react15/package.json +++ b/examples/cra-react15/package.json @@ -1,6 +1,6 @@ { "name": "cra-react15", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "dependencies": { "babel-loader": "8.0.6", @@ -19,10 +19,10 @@ "build-storybook": "build-storybook -s public" }, "devDependencies": { - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-links": "5.2.0-beta.40", - "@storybook/react": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-links": "5.2.0-beta.47", + "@storybook/react": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "babel-core": "6", "babel-runtime": "6" } diff --git a/examples/cra-ts-kitchen-sink/package.json b/examples/cra-ts-kitchen-sink/package.json index fc293974d5a..e2d644f08eb 100644 --- a/examples/cra-ts-kitchen-sink/package.json +++ b/examples/cra-ts-kitchen-sink/package.json @@ -1,6 +1,6 @@ { "name": "cra-ts-kitchen-sink", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "scripts": { "build-storybook": "build-storybook -s public", @@ -14,12 +14,12 @@ "react-dom": "^16.8.3" }, "devDependencies": { - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-info": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/react": "5.2.0-beta.40", + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-info": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/react": "5.2.0-beta.47", "@types/enzyme": "^3.9.0", "@types/react": "^16.8.3", "@types/react-dom": "^16.8.2", diff --git a/examples/dev-kits/package.json b/examples/dev-kits/package.json index 1329a740b7e..9d6b56c788a 100644 --- a/examples/dev-kits/package.json +++ b/examples/dev-kits/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/example-devkits", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "scripts": { "build-storybook": "build-storybook -c ./ -s built-storybooks", @@ -8,15 +8,15 @@ "storybook": "start-storybook -p 9011 -c ./" }, "devDependencies": { - "@storybook/addon-decorator": "5.2.0-beta.40", - "@storybook/addon-parameter": "5.2.0-beta.40", - "@storybook/addon-roundtrip": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/node-logger": "5.2.0-beta.40", - "@storybook/react": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addon-decorator": "5.2.0-beta.47", + "@storybook/addon-parameter": "5.2.0-beta.47", + "@storybook/addon-roundtrip": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/node-logger": "5.2.0-beta.47", + "@storybook/react": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "cors": "^2.8.5", "cross-env": "^5.2.0", "enzyme-to-json": "^3.3.5", diff --git a/examples/ember-cli/package.json b/examples/ember-cli/package.json index 8349e4d32ce..b6f48712383 100644 --- a/examples/ember-cli/package.json +++ b/examples/ember-cli/package.json @@ -1,6 +1,6 @@ { "name": "ember-example", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "scripts": { "build": "ember build", @@ -15,19 +15,19 @@ }, "devDependencies": { "@babel/core": "^7.3.4", - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-backgrounds": "5.2.0-beta.40", - "@storybook/addon-centered": "5.2.0-beta.40", - "@storybook/addon-knobs": "5.2.0-beta.40", - "@storybook/addon-links": "5.2.0-beta.40", - "@storybook/addon-notes": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addon-storysource": "5.2.0-beta.40", - "@storybook/addon-viewport": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/ember": "5.2.0-beta.40", - "@storybook/source-loader": "5.2.0-beta.40", + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-backgrounds": "5.2.0-beta.47", + "@storybook/addon-centered": "5.2.0-beta.47", + "@storybook/addon-knobs": "5.2.0-beta.47", + "@storybook/addon-links": "5.2.0-beta.47", + "@storybook/addon-notes": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addon-storysource": "5.2.0-beta.47", + "@storybook/addon-viewport": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/ember": "5.2.0-beta.47", + "@storybook/source-loader": "5.2.0-beta.47", "babel-loader": "^8", "broccoli-asset-rev": "^3.0.0", "cross-env": "^5.2.0", diff --git a/examples/html-kitchen-sink/.storybook/config.js b/examples/html-kitchen-sink/.storybook/config.js index 4f9203a56c7..2dfefa732c7 100644 --- a/examples/html-kitchen-sink/.storybook/config.js +++ b/examples/html-kitchen-sink/.storybook/config.js @@ -13,9 +13,9 @@ addParameters({ }, options: { hierarchyRootSeparator: /\|/, - docs: { - iframeHeight: '200px', - }, + }, + docs: { + iframeHeight: '200px', }, }); diff --git a/examples/html-kitchen-sink/package.json b/examples/html-kitchen-sink/package.json index c782f65c60f..3af783de5c0 100644 --- a/examples/html-kitchen-sink/package.json +++ b/examples/html-kitchen-sink/package.json @@ -1,6 +1,6 @@ { "name": "html-kitchen-sink", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "description": "", "keywords": [], @@ -14,26 +14,26 @@ "storybook": "start-storybook -p 9006" }, "devDependencies": { - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-backgrounds": "5.2.0-beta.40", - "@storybook/addon-centered": "5.2.0-beta.40", - "@storybook/addon-docs": "5.2.0-beta.40", - "@storybook/addon-events": "5.2.0-beta.40", - "@storybook/addon-jest": "5.2.0-beta.40", - "@storybook/addon-knobs": "5.2.0-beta.40", - "@storybook/addon-links": "5.2.0-beta.40", - "@storybook/addon-notes": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addon-storyshots": "5.2.0-beta.40", - "@storybook/addon-storysource": "5.2.0-beta.40", - "@storybook/addon-viewport": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/client-api": "5.2.0-beta.40", - "@storybook/core": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/html": "5.2.0-beta.40", - "@storybook/source-loader": "5.2.0-beta.40", + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-backgrounds": "5.2.0-beta.47", + "@storybook/addon-centered": "5.2.0-beta.47", + "@storybook/addon-docs": "5.2.0-beta.47", + "@storybook/addon-events": "5.2.0-beta.47", + "@storybook/addon-jest": "5.2.0-beta.47", + "@storybook/addon-knobs": "5.2.0-beta.47", + "@storybook/addon-links": "5.2.0-beta.47", + "@storybook/addon-notes": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addon-storyshots": "5.2.0-beta.47", + "@storybook/addon-storysource": "5.2.0-beta.47", + "@storybook/addon-viewport": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/client-api": "5.2.0-beta.47", + "@storybook/core": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/html": "5.2.0-beta.47", + "@storybook/source-loader": "5.2.0-beta.47", "eventemitter3": "^4.0.0", "format-json": "^1.0.3", "global": "^4.3.2" diff --git a/examples/html-kitchen-sink/tests/__snapshots__/htmlshots.test.js.snap b/examples/html-kitchen-sink/tests/__snapshots__/htmlshots.test.js.snap index f4a8859c0f4..b5409d3afc1 100644 --- a/examples/html-kitchen-sink/tests/__snapshots__/htmlshots.test.js.snap +++ b/examples/html-kitchen-sink/tests/__snapshots__/htmlshots.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Storyshots Addons|Actions Decorated actions + config 1`] = ` +exports[`Storyshots Addons|Actions Story 1 1`] = ` `; -exports[`Storyshots Addons|Actions Decorated actions 1`] = ` +exports[`Storyshots Addons|Actions Story 2 1`] = ` `; -exports[`Storyshots Addons|Actions Hello World 1`] = ` +exports[`Storyshots Addons|Actions Story 3 1`] = ` `; -exports[`Storyshots Addons|Actions Multiple actions + config 1`] = ` +exports[`Storyshots Addons|Actions Story 4 1`] = ` `; -exports[`Storyshots Addons|Actions Multiple actions 1`] = ` - -`; - -exports[`Storyshots Addons|Actions Multiple actions, object + config 1`] = ` - -`; - -exports[`Storyshots Addons|Actions Multiple actions, object 1`] = ` - -`; - -exports[`Storyshots Addons|Actions Multiple actions, selector 1`] = ` +exports[`Storyshots Addons|Actions Story 5 1`] = ` `; -exports[`Storyshots Addons|Backgrounds story 1 1`] = ` +exports[`Storyshots Addons|Actions Story 6 1`] = ` + +`; + +exports[`Storyshots Addons|Actions Story 7 1`] = ` + +`; + +exports[`Storyshots Addons|Actions Story 8 1`] = ` + +`; + +exports[`Storyshots Addons|Backgrounds Story 1 1`] = ` @@ -69,7 +69,7 @@ exports[`Storyshots Addons|Backgrounds story 1 1`] = ` `; -exports[`Storyshots Addons|Backgrounds story 2 1`] = ` +exports[`Storyshots Addons|Backgrounds Story 2 1`] = ` @@ -77,7 +77,7 @@ exports[`Storyshots Addons|Backgrounds story 2 1`] = ` `; -exports[`Storyshots Addons|Centered button in center 1`] = ` +exports[`Storyshots Addons|Centered Story 1 1`] = `
+ John Doe +

+`; + +exports[`Storyshots Addons|Knobs Simple 1`] = ` +
+ I am John Doe and I'm 44 years old. +
+`; + +exports[`Storyshots Addons|Knobs Story 3 1`] = ` +

+ John Doe +

+`; + +exports[`Storyshots Addons|Knobs Story 4 1`] = `
@@ -147,29 +167,9 @@ exports[`Storyshots Addons|Knobs All knobs 1`] = `
`; -exports[`Storyshots Addons|Knobs CSS transitions 1`] = ` -

- John Doe -

-`; +exports[`Storyshots Addons|Knobs Story 5 1`] = `<img src=x onerror="alert('XSS Attack')" >`; -exports[`Storyshots Addons|Knobs DOM 1`] = ` -

- John Doe -

-`; - -exports[`Storyshots Addons|Knobs Simple 1`] = ` -
- I am John Doe and I'm 44 years old. -
-`; - -exports[`Storyshots Addons|Knobs XSS safety 1`] = `<img src=x onerror="alert('XSS Attack')" >`; - -exports[`Storyshots Addons|Notes Simple note 1`] = ` +exports[`Storyshots Addons|Notes Story 1 1`] = `

@@ -185,8 +185,6 @@ exports[`Storyshots Addons|Notes Simple note 1`] = ` exports[`Storyshots Addons|a11y Default 1`] = ` -`; - exports[`Storyshots Addons|a11y Label 1`] = ` `; -exports[`Storyshots Demo button 1`] = ` +exports[`Storyshots Addons|a11y Story 4 1`] = ` + +`; + +exports[`Storyshots Addons|a11y Story 5 1`] = `

`; + +exports[`Storyshots Demo Button 1`] = ` `; -exports[`Storyshots Demo effect 1`] = ` +exports[`Storyshots Demo Effect 1`] = ` `; -exports[`Storyshots Demo heading 1`] = ` +exports[`Storyshots Demo Heading 1`] = `

Hello World

`; -exports[`Storyshots Demo headings 1`] = ` +exports[`Storyshots Demo Headings 1`] = `

Hello World diff --git a/examples/marko-cli/package.json b/examples/marko-cli/package.json index 6c0fdb52c6e..55540b66b05 100644 --- a/examples/marko-cli/package.json +++ b/examples/marko-cli/package.json @@ -1,6 +1,6 @@ { "name": "marko-cli", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "description": "Demo of how to build an app using marko-starter", "repository": { @@ -24,14 +24,14 @@ "marko-starter": "^2.0.4" }, "devDependencies": { - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-knobs": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addon-storysource": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/marko": "5.2.0-beta.40", - "@storybook/source-loader": "5.2.0-beta.40", + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-knobs": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addon-storysource": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/marko": "5.2.0-beta.47", + "@storybook/source-loader": "5.2.0-beta.47", "prettier": "^1.16.4", "webpack": "^4.33.0" } diff --git a/examples/mithril-kitchen-sink/package.json b/examples/mithril-kitchen-sink/package.json index a918bd31c72..41786e67e3a 100644 --- a/examples/mithril-kitchen-sink/package.json +++ b/examples/mithril-kitchen-sink/package.json @@ -1,6 +1,6 @@ { "name": "mithril-example", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "scripts": { "build-storybook": "build-storybook", @@ -11,20 +11,20 @@ "mithril": "^1.1.6" }, "devDependencies": { - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-backgrounds": "5.2.0-beta.40", - "@storybook/addon-centered": "5.2.0-beta.40", - "@storybook/addon-knobs": "5.2.0-beta.40", - "@storybook/addon-links": "5.2.0-beta.40", - "@storybook/addon-notes": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addon-storyshots": "5.2.0-beta.40", - "@storybook/addon-storysource": "5.2.0-beta.40", - "@storybook/addon-viewport": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/mithril": "5.2.0-beta.40", - "@storybook/source-loader": "5.2.0-beta.40", + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-backgrounds": "5.2.0-beta.47", + "@storybook/addon-centered": "5.2.0-beta.47", + "@storybook/addon-knobs": "5.2.0-beta.47", + "@storybook/addon-links": "5.2.0-beta.47", + "@storybook/addon-notes": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addon-storyshots": "5.2.0-beta.47", + "@storybook/addon-storysource": "5.2.0-beta.47", + "@storybook/addon-viewport": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/mithril": "5.2.0-beta.47", + "@storybook/source-loader": "5.2.0-beta.47", "webpack": "^4.33.0" } } diff --git a/examples/official-storybook/config.js b/examples/official-storybook/config.js index 7cabbbb918d..6afad570955 100644 --- a/examples/official-storybook/config.js +++ b/examples/official-storybook/config.js @@ -58,10 +58,15 @@ addParameters({ { name: 'light', value: '#eeeeee' }, { name: 'dark', value: '#222222' }, ], - // eslint-disable-next-line react/prop-types - docs: ({ context }) => ( - `Subtitle: ${selectedKind}`} /> - ), + docs: { + // eslint-disable-next-line react/prop-types + page: ({ context }) => ( + `Subtitle: ${selectedKind}`} + /> + ), + }, }); configure( diff --git a/examples/official-storybook/package.json b/examples/official-storybook/package.json index 14112945214..1e5a32e86df 100644 --- a/examples/official-storybook/package.json +++ b/examples/official-storybook/package.json @@ -1,6 +1,6 @@ { "name": "official-storybook", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "scripts": { "build-storybook": "build-storybook -c ./ -s built-storybooks", @@ -15,34 +15,34 @@ }, "devDependencies": { "@packtracker/webpack-plugin": "^2.0.1", - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-backgrounds": "5.2.0-beta.40", - "@storybook/addon-centered": "5.2.0-beta.40", - "@storybook/addon-contexts": "5.2.0-beta.40", - "@storybook/addon-cssresources": "5.2.0-beta.40", - "@storybook/addon-design-assets": "5.2.0-beta.40", - "@storybook/addon-docs": "5.2.0-beta.40", - "@storybook/addon-events": "5.2.0-beta.40", - "@storybook/addon-graphql": "5.2.0-beta.40", - "@storybook/addon-info": "5.2.0-beta.40", - "@storybook/addon-jest": "5.2.0-beta.40", - "@storybook/addon-knobs": "5.2.0-beta.40", - "@storybook/addon-links": "5.2.0-beta.40", - "@storybook/addon-notes": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addon-queryparams": "5.2.0-beta.40", - "@storybook/addon-storyshots": "5.2.0-beta.40", - "@storybook/addon-storyshots-puppeteer": "5.2.0-beta.40", - "@storybook/addon-storysource": "5.2.0-beta.40", - "@storybook/addon-viewport": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/components": "5.2.0-beta.40", - "@storybook/core-events": "5.2.0-beta.40", - "@storybook/node-logger": "5.2.0-beta.40", - "@storybook/react": "5.2.0-beta.40", - "@storybook/source-loader": "5.2.0-beta.40", - "@storybook/theming": "5.2.0-beta.40", + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-backgrounds": "5.2.0-beta.47", + "@storybook/addon-centered": "5.2.0-beta.47", + "@storybook/addon-contexts": "5.2.0-beta.47", + "@storybook/addon-cssresources": "5.2.0-beta.47", + "@storybook/addon-design-assets": "5.2.0-beta.47", + "@storybook/addon-docs": "5.2.0-beta.47", + "@storybook/addon-events": "5.2.0-beta.47", + "@storybook/addon-graphql": "5.2.0-beta.47", + "@storybook/addon-info": "5.2.0-beta.47", + "@storybook/addon-jest": "5.2.0-beta.47", + "@storybook/addon-knobs": "5.2.0-beta.47", + "@storybook/addon-links": "5.2.0-beta.47", + "@storybook/addon-notes": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addon-queryparams": "5.2.0-beta.47", + "@storybook/addon-storyshots": "5.2.0-beta.47", + "@storybook/addon-storyshots-puppeteer": "5.2.0-beta.47", + "@storybook/addon-storysource": "5.2.0-beta.47", + "@storybook/addon-viewport": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/components": "5.2.0-beta.47", + "@storybook/core-events": "5.2.0-beta.47", + "@storybook/node-logger": "5.2.0-beta.47", + "@storybook/react": "5.2.0-beta.47", + "@storybook/source-loader": "5.2.0-beta.47", + "@storybook/theming": "5.2.0-beta.47", "cors": "^2.8.5", "cross-env": "^5.2.0", "enzyme-to-json": "^3.3.5", @@ -53,6 +53,7 @@ "global": "^4.3.2", "graphql": "^14.1.1", "jest-emotion": "^10.0.11", + "lodash": "^4.17.11", "paths.macro": "^2.0.2", "prop-types": "^15.7.2", "react": "^16.8.3", diff --git a/examples/official-storybook/stories/addon-docs/addon-docs.stories.js b/examples/official-storybook/stories/addon-docs/addon-docs.stories.js index b04e9d9438c..d95b67ef951 100644 --- a/examples/official-storybook/stories/addon-docs/addon-docs.stories.js +++ b/examples/official-storybook/stories/addon-docs/addon-docs.stories.js @@ -13,7 +13,7 @@ export const basic = () =>
Click docs tab to see basic docs
; export const noDocs = () =>
Click docs tab to see no docs error
; noDocs.story = { name: 'no docs', - parameters: { docs: null }, + parameters: { docs: { page: null } }, }; export const withNotes = () =>
Click docs tab to see DocsPage docs
; @@ -34,7 +34,7 @@ export const mdxOverride = () =>
Click docs tab to see MDX-overridden docs< mdxOverride.story = { name: 'mdx override', parameters: { - docs: mdxNotes, + docs: { page: mdxNotes }, }, }; @@ -42,6 +42,6 @@ export const jsxOverride = () =>
Click docs tab to see JSX-overridden docs< jsxOverride.story = { name: 'jsx override', parameters: { - docs: () =>
Hello docs
, + docs: { page: () =>
Hello docs
}, }, }; diff --git a/examples/official-storybook/stories/addon-docs/mdx.stories.js b/examples/official-storybook/stories/addon-docs/mdx.stories.js index 48501bb9e82..8d558fb190b 100644 --- a/examples/official-storybook/stories/addon-docs/mdx.stories.js +++ b/examples/official-storybook/stories/addon-docs/mdx.stories.js @@ -9,6 +9,6 @@ export default { // This renders the contents of the docs panel into story content export const typography = () => { - const Docs = markdown.parameters.docs; + const Docs = markdown.parameters.docs.page; return ; }; diff --git a/examples/official-storybook/stories/hooks.stories.js b/examples/official-storybook/stories/hooks.stories.js new file mode 100644 index 00000000000..7f98f4e00c9 --- /dev/null +++ b/examples/official-storybook/stories/hooks.stories.js @@ -0,0 +1,21 @@ +import React from 'react'; +import { useState } from '@storybook/client-api'; + +export default { + title: 'Hooks', +}; + +export const Checkbox = () => { + const [on, setOn] = useState(false); + return ( + + ); +}; + +export const Input = () => { + const [text, setText] = useState('foo'); + return setText(e.target.value)} />; +}; diff --git a/examples/polymer-cli/package.json b/examples/polymer-cli/package.json index 4409458f72f..1fe792eed51 100644 --- a/examples/polymer-cli/package.json +++ b/examples/polymer-cli/package.json @@ -1,6 +1,6 @@ { "name": "polymer-cli", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "scripts": { "build-storybook": "build-storybook", @@ -10,17 +10,17 @@ }, "dependencies": { "@polymer/polymer": "^2.6.0", - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-backgrounds": "5.2.0-beta.40", - "@storybook/addon-knobs": "5.2.0-beta.40", - "@storybook/addon-links": "5.2.0-beta.40", - "@storybook/addon-notes": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addon-storysource": "5.2.0-beta.40", - "@storybook/addon-viewport": "5.2.0-beta.40", - "@storybook/polymer": "5.2.0-beta.40", - "@storybook/source-loader": "5.2.0-beta.40", + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-backgrounds": "5.2.0-beta.47", + "@storybook/addon-knobs": "5.2.0-beta.47", + "@storybook/addon-links": "5.2.0-beta.47", + "@storybook/addon-notes": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addon-storysource": "5.2.0-beta.47", + "@storybook/addon-viewport": "5.2.0-beta.47", + "@storybook/polymer": "5.2.0-beta.47", + "@storybook/source-loader": "5.2.0-beta.47", "@webcomponents/webcomponentsjs": "^1.2.0", "global": "^4.3.2", "lit-html": "^1.0.0", diff --git a/examples/preact-kitchen-sink/__snapshots__/preactshots.test.js.snap b/examples/preact-kitchen-sink/__snapshots__/preactshots.test.js.snap index b2a8566165f..62ce652fe3f 100644 --- a/examples/preact-kitchen-sink/__snapshots__/preactshots.test.js.snap +++ b/examples/preact-kitchen-sink/__snapshots__/preactshots.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Storyshots Addons|Actions Action and method 1`] = ` +exports[`Storyshots Addons|Actions Action And Method 1`] = `

`; -exports[`Storyshots Addon|Actions Action on view method 1`] = ` +exports[`Storyshots Addon|Actions Action On View Method 1`] = `
@@ -61,7 +61,7 @@ exports[`Storyshots Addon|Actions Action on view method 1`] = `
`; -exports[`Storyshots Addon|Backgrounds story 1 1`] = ` +exports[`Storyshots Addon|Backgrounds Story 1 1`] = `
@@ -103,7 +103,7 @@ exports[`Storyshots Addon|Backgrounds story 1 1`] = `
`; -exports[`Storyshots Addon|Centered rounded 1`] = ` +exports[`Storyshots Addon|Centered Rounded 1`] = `
@@ -122,7 +122,7 @@ exports[`Storyshots Addon|Centered rounded 1`] = `
`; -exports[`Storyshots Addon|Centered with action 1`] = ` +exports[`Storyshots Addon|Centered With Action 1`] = `
@@ -155,7 +155,7 @@ exports[`Storyshots Addon|Knobs Simple 1`] = `
`; -exports[`Storyshots Addon|Links Go to welcome view 1`] = ` +exports[`Storyshots Addon|Links Go To Welcome View 1`] = `
@@ -183,7 +183,7 @@ exports[`Storyshots Addon|Links Go to welcome view 1`] = `
`; -exports[`Storyshots Addon|Notes Note with HTML 1`] = ` +exports[`Storyshots Addon|Notes Note With Html 1`] = `
@@ -225,7 +225,7 @@ exports[`Storyshots Addon|Notes Note with HTML 1`] = `
`; -exports[`Storyshots Addon|Notes Simple note 1`] = ` +exports[`Storyshots Addon|Notes Simple Note 1`] = `
@@ -267,7 +267,7 @@ exports[`Storyshots Addon|Notes Simple note 1`] = `
`; -exports[`Storyshots Button rounded 1`] = ` +exports[`Storyshots Button Rounded 1`] = `
@@ -309,7 +309,7 @@ exports[`Storyshots Button rounded 1`] = `
`; -exports[`Storyshots Button square 1`] = ` +exports[`Storyshots Button Square 1`] = `
diff --git a/examples/svelte-kitchen-sink/package.json b/examples/svelte-kitchen-sink/package.json index a3264374e35..6e037514b60 100644 --- a/examples/svelte-kitchen-sink/package.json +++ b/examples/svelte-kitchen-sink/package.json @@ -1,6 +1,6 @@ { "name": "svelte-example", - "version": "5.2.0-beta.40", + "version": "5.2.0-beta.47", "private": true, "scripts": { "build-storybook": "build-storybook -s public", @@ -11,19 +11,19 @@ "global": "^4.3.2" }, "devDependencies": { - "@storybook/addon-a11y": "5.2.0-beta.40", - "@storybook/addon-actions": "5.2.0-beta.40", - "@storybook/addon-backgrounds": "5.2.0-beta.40", - "@storybook/addon-centered": "5.2.0-beta.40", - "@storybook/addon-knobs": "5.2.0-beta.40", - "@storybook/addon-links": "5.2.0-beta.40", - "@storybook/addon-notes": "5.2.0-beta.40", - "@storybook/addon-options": "5.2.0-beta.40", - "@storybook/addon-storyshots": "5.2.0-beta.40", - "@storybook/addon-storysource": "5.2.0-beta.40", - "@storybook/addon-viewport": "5.2.0-beta.40", - "@storybook/addons": "5.2.0-beta.40", - "@storybook/source-loader": "5.2.0-beta.40", - "@storybook/svelte": "5.2.0-beta.40" + "@storybook/addon-a11y": "5.2.0-beta.47", + "@storybook/addon-actions": "5.2.0-beta.47", + "@storybook/addon-backgrounds": "5.2.0-beta.47", + "@storybook/addon-centered": "5.2.0-beta.47", + "@storybook/addon-knobs": "5.2.0-beta.47", + "@storybook/addon-links": "5.2.0-beta.47", + "@storybook/addon-notes": "5.2.0-beta.47", + "@storybook/addon-options": "5.2.0-beta.47", + "@storybook/addon-storyshots": "5.2.0-beta.47", + "@storybook/addon-storysource": "5.2.0-beta.47", + "@storybook/addon-viewport": "5.2.0-beta.47", + "@storybook/addons": "5.2.0-beta.47", + "@storybook/source-loader": "5.2.0-beta.47", + "@storybook/svelte": "5.2.0-beta.47" } } diff --git a/examples/vue-kitchen-sink/.storybook/config.js b/examples/vue-kitchen-sink/.storybook/config.js index 73989383ab1..ebf142c4b54 100644 --- a/examples/vue-kitchen-sink/.storybook/config.js +++ b/examples/vue-kitchen-sink/.storybook/config.js @@ -12,9 +12,9 @@ Vue.use(Vuex); addParameters({ options: { hierarchyRootSeparator: /\|/, - docs: { - iframeHeight: '60px', - }, + }, + docs: { + iframeHeight: '60px', }, }); diff --git a/examples/vue-kitchen-sink/__snapshots__/vueshots.test.js.snap b/examples/vue-kitchen-sink/__snapshots__/vueshots.test.js.snap index 589366792ca..5e21fe591a2 100644 --- a/examples/vue-kitchen-sink/__snapshots__/vueshots.test.js.snap +++ b/examples/vue-kitchen-sink/__snapshots__/vueshots.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Storyshots Addon|Actions Action and method 1`] = ` +exports[`Storyshots Addon|Actions Action And Method 1`] = ` `; -exports[`Storyshots Addon|Backgrounds story 2 1`] = ` +exports[`Storyshots Addon|Backgrounds Story 2 1`] = ` `; -exports[`Storyshots Addon|Centered rounded 1`] = ` +exports[`Storyshots Addon|Centered Rounded 1`] = `
@@ -77,7 +77,7 @@ exports[`Storyshots Addon|Contexts Languages 1`] = `
`; -exports[`Storyshots Addon|Contexts Simple CSS Theming 1`] = ` +exports[`Storyshots Addon|Contexts Simple Css Theming 1`] = `
@@ -87,7 +87,7 @@ exports[`Storyshots Addon|Contexts Simple CSS Theming 1`] = `
`; -exports[`Storyshots Addon|Knobs All knobs 1`] = ` +exports[`Storyshots Addon|Knobs All Knobs 1`] = `
@@ -131,13 +131,13 @@ exports[`Storyshots Addon|Knobs Simple 1`] = `
`; -exports[`Storyshots Addon|Knobs XSS safety 1`] = ` +exports[`Storyshots Addon|Knobs Xss Safety 1`] = `
<img src=x onerror="alert('XSS Attack')" >
`; -exports[`Storyshots Addon|Links Go to welcome 1`] = ` +exports[`Storyshots Addon|Links Go To Welcome 1`] = `
`; -exports[`Storyshots Button rounded 1`] = ` +exports[`Storyshots Button Rounded 1`] = ` `; -exports[`Storyshots Custom|Method for rendering Vue pre-registered component 1`] = ` +exports[`Storyshots Custom|Method for rendering Vue Pre Registered Component 1`] = `

This component was pre-registered in .storybook/config.js @@ -384,7 +384,13 @@ exports[`Storyshots Custom|Method for rendering Vue pre-registered component 1`]

`; -exports[`Storyshots Custom|Method for rendering Vue render + component 1`] = ` +exports[`Storyshots Custom|Method for rendering Vue Render 1`] = ` +
+ renders a div with some text in it.. +
+`; + +exports[`Storyshots Custom|Method for rendering Vue Render Component 1`] = `