Merge remote-tracking branch 'origin/next' into feature/useChannelToHighlight

This commit is contained in:
Clément Dungler 2020-04-19 18:45:46 +02:00
commit 5226171d56
122 changed files with 872 additions and 647 deletions

View File

@ -1,3 +1,49 @@
## 6.0.0-alpha.39 (April 18, 2020)
### Breaking Changes
- Addon-docs: Inline stories in Vue by default ([#10463](https://github.com/storybookjs/storybook/pull/10463))
### Features
- Addon-docs: Provide better props include/exclude features ([#10464](https://github.com/storybookjs/storybook/pull/10464))
- UI: Improve loading state ([#10444](https://github.com/storybookjs/storybook/pull/10444))
### Bug Fixes
- UI: Fix bad shortcutpage layout ([#10445](https://github.com/storybookjs/storybook/pull/10445))
## 6.0.0-alpha.38 (April 18, 2020)
Failed publish
## 6.0.0-alpha.37 (April 17, 2020)
### Features
- Addon-actions: Make arg auto-generation more aggressive ([#10451](https://github.com/storybookjs/storybook/pull/10451))
### Maintenance
- Examples: Format stringified parameters ([#10435](https://github.com/storybookjs/storybook/pull/10435))
### Dependency Upgrades
- Bump recast from 0.16.2 to 0.19.0 ([#10415](https://github.com/storybookjs/storybook/pull/10415))
## 6.0.0-alpha.36 (April 16, 2020)
### Bug Fixes
- Server: Fix serialization of knobs params back to server ([#10391](https://github.com/storybookjs/storybook/pull/10391))
- Core: Serve correctly hashed static files with the Cache-Control header ([#10390](https://github.com/storybookjs/storybook/pull/10390))
- Addon-a11y: Fix default a11y parameters ([#10439](https://github.com/storybookjs/storybook/pull/10439))
- Core: Fix event source handling ([#10416](https://github.com/storybookjs/storybook/pull/10416))
### Maintenance
- Addon-docs: Add blocks typings ([#10441](https://github.com/storybookjs/storybook/pull/10441))
## 6.0.0-alpha.35 (April 16, 2020) ## 6.0.0-alpha.35 (April 16, 2020)
### Bug Fixes ### Bug Fixes

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-a11y", "name": "@storybook/addon-a11y",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "a11y addon for storybook", "description": "a11y addon for storybook",
"keywords": [ "keywords": [
"a11y", "a11y",
@ -33,14 +33,14 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/channels": "6.0.0-alpha.35", "@storybook/channels": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"axe-core": "^3.5.2", "axe-core": "^3.5.2",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-actions", "name": "@storybook/addon-actions",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Action Logger addon for storybook", "description": "Action Logger addon for storybook",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -28,15 +28,16 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"fast-deep-equal": "^3.1.1", "fast-deep-equal": "^3.1.1",
"global": "^4.3.2", "global": "^4.3.2",
"lodash": "^4.17.15",
"polished": "^3.4.4", "polished": "^3.4.4",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"react": "^16.8.3", "react": "^16.8.3",

View File

@ -17,14 +17,18 @@ describe('actions parameter enhancers', () => {
expect(withDefaultValue(argTypes)).toEqual(['onClick', 'onFocus']); expect(withDefaultValue(argTypes)).toEqual(['onClick', 'onFocus']);
}); });
it('should prioritize pre-existing argTypes', () => { it('should prioritize pre-existing argTypes unless they are null', () => {
const parameters = { const parameters = {
...baseParameters, ...baseParameters,
argTypes: { onClick: { defaultValue: 'pre-existing value' }, onFocus: {} }, argTypes: {
onClick: { defaultValue: 'pre-existing value' },
onFocus: { defaultValue: null },
},
}; };
const argTypes = inferActionsFromArgTypesRegex({ parameters } as StoryContext); const argTypes = inferActionsFromArgTypesRegex({ parameters } as StoryContext);
expect(withDefaultValue(argTypes)).toEqual(['onClick', 'onFocus']); expect(withDefaultValue(argTypes)).toEqual(['onClick', 'onFocus']);
expect(argTypes.onClick.defaultValue).toEqual('pre-existing value'); expect(argTypes.onClick.defaultValue).toEqual('pre-existing value');
expect(argTypes.onFocus.defaultValue).not.toBeNull();
}); });
it('should do nothing if actions are disabled', () => { it('should do nothing if actions are disabled', () => {

View File

@ -1,5 +1,5 @@
import { ArgTypesEnhancer, combineParameters } from '@storybook/client-api'; import mapValues from 'lodash/mapValues';
import { ArgTypes, ArgType } from '@storybook/addons'; import { ArgTypesEnhancer } from '@storybook/client-api';
import { action } from '../index'; import { action } from '../index';
@ -19,14 +19,12 @@ export const inferActionsFromArgTypesRegex: ArgTypesEnhancer = (context) => {
} }
const argTypesRegex = new RegExp(actions.argTypesRegex); const argTypesRegex = new RegExp(actions.argTypesRegex);
const actionArgTypes = Object.keys(argTypes).reduce((acc, name) => { return mapValues(argTypes, (argType, name) => {
if (argTypesRegex.test(name)) { if (!argTypesRegex.test(name)) {
acc[name] = { defaultValue: action(name) }; return argType;
} }
return acc; return { ...argType, defaultValue: argType.defaultValue || action(name) };
}, {} as ArgTypes); });
return combineParameters(actionArgTypes, argTypes) as ArgTypes;
}; };
/** /**
@ -38,16 +36,13 @@ export const addActionsFromArgTypes: ArgTypesEnhancer = (context) => {
return argTypes; return argTypes;
} }
const actionArgTypes = Object.keys(argTypes).reduce((acc, argName) => { return mapValues(argTypes, (argType, name) => {
const argType: ArgType = argTypes[argName]; if (!argType.action) {
if (argType.action) { return argType;
const message = typeof argType.action === 'string' ? argType.action : argName;
acc[argName] = { defaultValue: action(message) };
} }
return acc; const message = typeof argType.action === 'string' ? argType.action : name;
}, {} as ArgTypes); return { ...argType, defaultValue: argType.defaultValue || action(message) };
});
return combineParameters(actionArgTypes, argTypes) as ArgTypes;
}; };
export const argTypesEnhancers = [addActionsFromArgTypes, inferActionsFromArgTypesRegex]; export const argTypesEnhancers = [addActionsFromArgTypes, inferActionsFromArgTypesRegex];

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-backgrounds", "name": "@storybook/addon-backgrounds",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "A storybook addon to show different backgrounds for your preview", "description": "A storybook addon to show different backgrounds for your preview",
"keywords": [ "keywords": [
"addon", "addon",
@ -32,12 +32,12 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"memoizerific": "^1.11.3", "memoizerific": "^1.11.3",
"react": "^16.8.3", "react": "^16.8.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-contexts", "name": "@storybook/addon-contexts",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook Addon Contexts", "description": "Storybook Addon Contexts",
"keywords": [ "keywords": [
"preact", "preact",
@ -28,10 +28,10 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"qs": "^6.6.0", "qs": "^6.6.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-cssresources", "name": "@storybook/addon-cssresources",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "A storybook addon to switch between css resources at runtime for your story", "description": "A storybook addon to switch between css resources at runtime for your story",
"keywords": [ "keywords": [
"addon", "addon",
@ -32,11 +32,11 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"react": "^16.8.3", "react": "^16.8.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-design-assets", "name": "@storybook/addon-design-assets",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Design asset preview for storybook", "description": "Design asset preview for storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -34,12 +34,12 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"react": "^16.8.3", "react": "^16.8.3",

View File

@ -174,7 +174,7 @@ module.exports = {
// will configure everything with a preset) // will configure everything with a preset)
addons: ['@storybook/addon-docs/register'], addons: ['@storybook/addon-docs/register'],
// 2. manually configure webpack, since you're not using the preset // 2. manually configure webpack, since you're not using the preset
webpackFinal: async config => { webpackFinal: async (config) => {
config.module.rules.push({ config.module.rules.push({
// 2a. Load `.stories.mdx` / `.story.mdx` files as CSF and generate // 2a. Load `.stories.mdx` / `.story.mdx` files as CSF and generate
// the docs page from the markdown // the docs page from the markdown
@ -235,7 +235,6 @@ Install the preset with care. If you've already configured Typescript manually,
Want to learn more? Here are some more articles on Storybook Docs: Want to learn more? Here are some more articles on Storybook Docs:
- References: [DocsPage](./docs/docspage.md) / [MDX](./docs/mdx.md) / [FAQ](./docs/faq.md) / [Recipes](./docs/recipes.md) / [Theming](./docs/theming.md) - References: [DocsPage](./docs/docspage.md) / [MDX](./docs/mdx.md) / [FAQ](./docs/faq.md) / [Recipes](./docs/recipes.md) / [Theming](./docs/theming.md) / [Props](./docs/props-tables.md)
- Vision: [Storybook Docs sneak peak](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Announcement: [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -10,11 +10,12 @@ Storybook Docs transforms your Storybook stories into world-class component docu
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Angular specifics, read on! To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Angular specifics, read on!
- [Installation](#installation) - [Storybook Docs for Angular](#storybook-docs-for-angular)
- [DocsPage](#docspage) - [Installation](#installation)
- [MDX](#mdx) - [DocsPage](#docspage)
- [IFrame height](#iframe-height) - [MDX](#mdx)
- [More resources](#more-resources) - [IFrame height](#iframe-height)
- [More resources](#more-resources)
## Installation ## Installation
@ -164,7 +165,6 @@ And for `MDX` you can modify it as an attribute on the `Story` element:
Want to learn more? Here are some more articles on Storybook Docs: Want to learn more? Here are some more articles on Storybook Docs:
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) - References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
- Vision: [Storybook Docs sneak peak](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Announcement: [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

1
addons/docs/blocks.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export * from './dist/blocks.d';

View File

@ -173,7 +173,7 @@ import { addParameters } from '@storybook/vue';
addParameters({ addParameters({
docs: { docs: {
prepareForInline: storyFn => { prepareForInline: (storyFn) => {
const Story = toReact(storyFn()); const Story = toReact(storyFn());
return <Story />; return <Story />;
}, },
@ -185,7 +185,7 @@ With that function, anyone using the docs addon for `@storybook/vue` can make th
## More resources ## More resources
- References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) - References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) / [Props](props-tables.md)
- Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md) - Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md)
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -43,7 +43,7 @@ This is [Component Story Format (CSF)](https://medium.com/storybookjs/component-
## More resources ## More resources
- References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) - References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) / [Props](props-tables.md)
- Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md) - Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md)
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -194,7 +194,7 @@ Be sure to update your Storybook config file to load `.stories.mdx` stories, as
## More resources ## More resources
- References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) - References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) / [Props](props-tables.md)
- Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md) - Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md)
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 KiB

View File

@ -88,7 +88,7 @@ import toReact from '@egoist/vue-to-react';
addParameters({ addParameters({
docs: { docs: {
// `container`, `page`, etc. here // `container`, `page`, etc. here
prepareForInline: storyFn => { prepareForInline: (storyFn) => {
const Story = toReact(storyFn()); const Story = toReact(storyFn());
return <Story />; return <Story />;
}, },
@ -100,7 +100,7 @@ The input is the story function, and the output is a React element, because we r
## More resources ## More resources
- References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) - References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) / [Props](props-tables.md)
- Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md) - Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md)
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -57,7 +57,7 @@ import { MyComponent } from './MyComponent';
Starting in SB 6.0, the `Props` block has built-in controls (formerly known as "knobs") for editing stories dynamically. Starting in SB 6.0, the `Props` block has built-in controls (formerly known as "knobs") for editing stories dynamically.
<center> <center>
<img src="./media/props-tables-controls.png" width="100%" /> <img src="./media/args-controls.gif" width="100%" />
</center> </center>
These controls are implemented appear automatically in the props table when your story accepts [Storybook Args](#https://github.com/storybookjs/storybook/blob/next/docs/src/pages/formats/component-story-format/index.md#args-story-inputs) as its input. These controls are implemented appear automatically in the props table when your story accepts [Storybook Args](#https://github.com/storybookjs/storybook/blob/next/docs/src/pages/formats/component-story-format/index.md#args-story-inputs) as its input.
@ -251,7 +251,7 @@ SB Docs for Ember uses `yui-doc` for prop table information.
## More resources ## More resources
- References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) - References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) / [Props](props-tables.md)
- Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md) - Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md)
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -59,7 +59,7 @@ basic.story = {
```md ```md
import { Meta, Story } from '@storybook/addon-docs/blocks'; import { Meta, Story } from '@storybook/addon-docs/blocks';
import * as stories from './Button.stories.js'; import \* as stories from './Button.stories.js';
import { SomeComponent } from 'path/to/SomeComponent'; import { SomeComponent } from 'path/to/SomeComponent';
<Meta title="Demo/Button" component={Button} /> <Meta title="Demo/Button" component={Button} />
@ -138,8 +138,8 @@ const loadFn = () => {
const req = require.context('../src', true, /\.stories\.js$/); const req = require.context('../src', true, /\.stories\.js$/);
return req return req
.keys() .keys()
.map(fname => req(fname)) .map((fname) => req(fname))
.filter(exp => !!exp.default); .filter((exp) => !!exp.default);
}; };
configure(loadFn, module); configure(loadFn, module);
@ -269,7 +269,7 @@ These two methods are complementary. The former is useful for story-specific, an
## More resources ## More resources
- References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) - References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) / [Props](props-tables.md)
- Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md) - Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md)
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -91,7 +91,7 @@ addParameters({
## More resources ## More resources
- References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) - References: [README](../README.md) / [DocsPage](docspage.md) / [MDX](mdx.md) / [FAQ](faq.md) / [Recipes](recipes.md) / [Theming](theming.md) / [Props](props-tables.md)
- Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md) - Framework-specific docs: [React](../react/README.md) / [Vue](../vue/README.md) / [Angular](../angular/README.md) / [Web components](../web-components/README.md) / [Ember](../ember/README.md)
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -6,11 +6,12 @@ Storybook Docs transforms your Storybook stories into world-class component docu
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Ember specifics, read on! To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Ember specifics, read on!
- [Installation](#installation) - [Storybook Docs for Ember](#storybook-docs-for-ember)
- [DocsPage](#docspage) - [Installation](#installation)
- [MDX](#mdx) - [DocsPage](#docspage)
- [IFrame height](#iframe-height) - [MDX](#mdx)
- [More resources](#more-resources) - [IFrame height](#iframe-height)
- [More resources](#more-resources)
## Installation ## Installation
@ -146,7 +147,6 @@ And for `MDX` you can modify it as an attribute on the `Story` element:
Want to learn more? Here are some more articles on Storybook Docs: Want to learn more? Here are some more articles on Storybook Docs:
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) - References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
- Vision: [Storybook Docs sneak peak](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Announcement: [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-docs", "name": "@storybook/addon-docs",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Superior documentation for your components", "description": "Superior documentation for your components",
"keywords": [ "keywords": [
"addon", "addon",
@ -48,16 +48,16 @@
"@mdx-js/loader": "^1.5.1", "@mdx-js/loader": "^1.5.1",
"@mdx-js/mdx": "^1.5.1", "@mdx-js/mdx": "^1.5.1",
"@mdx-js/react": "^1.5.1", "@mdx-js/react": "^1.5.1",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/csf": "0.0.1", "@storybook/csf": "0.0.1",
"@storybook/node-logger": "6.0.0-alpha.35", "@storybook/node-logger": "6.0.0-alpha.39",
"@storybook/postinstall": "6.0.0-alpha.35", "@storybook/postinstall": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"acorn": "^7.1.0", "acorn": "^7.1.0",
"acorn-jsx": "^5.1.0", "acorn-jsx": "^5.1.0",
"acorn-walk": "^7.0.0", "acorn-walk": "^7.0.0",
@ -83,8 +83,8 @@
"@babel/core": "^7.8.4", "@babel/core": "^7.8.4",
"@emotion/core": "^10.0.20", "@emotion/core": "^10.0.20",
"@emotion/styled": "^10.0.17", "@emotion/styled": "^10.0.17",
"@storybook/react": "6.0.0-alpha.35", "@storybook/react": "6.0.0-alpha.39",
"@storybook/web-components": "6.0.0-alpha.35", "@storybook/web-components": "6.0.0-alpha.39",
"@types/doctrine": "^0.0.3", "@types/doctrine": "^0.0.3",
"@types/enzyme": "^3.10.3", "@types/enzyme": "^3.10.3",
"@types/jest": "^25.1.1", "@types/jest": "^25.1.1",

View File

@ -10,11 +10,12 @@ Storybook Docs transforms your Storybook stories into world-class component docu
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the React specifics, read on! To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the React specifics, read on!
- [Installation](#installation) - [Storybook Docs for React](#storybook-docs-for-react)
- [DocsPage](#docspage) - [Installation](#installation)
- [MDX](#mdx) - [DocsPage](#docspage)
- [Inline stories](#inline-stories) - [MDX](#mdx)
- [More resources](#more-resources) - [Inline Stories](#inline-stories)
- [More resources](#more-resources)
## Installation ## Installation
@ -116,7 +117,6 @@ addParameters({
Want to learn more? Here are some more articles on Storybook Docs: Want to learn more? Here are some more articles on Storybook Docs:
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) - References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
- Vision: [Storybook Docs sneak peak](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Announcement: [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -1,6 +1,7 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import React, { FC, useContext, useEffect, useState, useCallback } from 'react'; import React, { FC, useContext, useEffect, useState, useCallback } from 'react';
import mapValues from 'lodash/mapValues'; import mapValues from 'lodash/mapValues';
import pickBy from 'lodash/pickBy';
import { import {
ArgsTable, ArgsTable,
ArgsTableProps, ArgsTableProps,
@ -18,8 +19,11 @@ import { getComponentName } from './utils';
import { ArgTypesExtractor } from '../lib/docgen/types'; import { ArgTypesExtractor } from '../lib/docgen/types';
import { lookupStoryId } from './Story'; import { lookupStoryId } from './Story';
type PropDescriptor = string[] | RegExp;
interface BaseProps { interface BaseProps {
exclude?: string[]; include?: PropDescriptor;
exclude?: PropDescriptor;
} }
type OfProps = BaseProps & { type OfProps = BaseProps & {
@ -62,15 +66,18 @@ const useArgs = (storyId: string, storyStore: StoryStore): [Args, (args: Args) =
return [args, updateArgs]; return [args, updateArgs];
}; };
const filterArgTypes = (argTypes: ArgTypes, exclude?: string[]) => { const matches = (name: string, descriptor: PropDescriptor) =>
if (!exclude) { Array.isArray(descriptor) ? descriptor.includes(name) : name.match(descriptor);
const filterArgTypes = (argTypes: ArgTypes, include?: PropDescriptor, exclude?: PropDescriptor) => {
if (!include && !exclude) {
return argTypes; return argTypes;
} }
return ( return (
argTypes && argTypes &&
mapValues(argTypes, (argType, key) => { pickBy(argTypes, (argType, key) => {
const name = argType.name || key; const name = argType.name || key;
return exclude.includes(name) ? undefined : argType; return (!include || matches(name, include)) && (!exclude || !matches(name, exclude));
}) })
); );
}; };
@ -78,7 +85,8 @@ const filterArgTypes = (argTypes: ArgTypes, exclude?: string[]) => {
export const extractComponentArgTypes = ( export const extractComponentArgTypes = (
component: Component, component: Component,
{ parameters }: DocsContextProps, { parameters }: DocsContextProps,
exclude?: string[] include?: PropDescriptor,
exclude?: PropDescriptor
): ArgTypes => { ): ArgTypes => {
const params = parameters || {}; const params = parameters || {};
const { extractArgTypes }: { extractArgTypes: ArgTypesExtractor } = params.docs || {}; const { extractArgTypes }: { extractArgTypes: ArgTypesExtractor } = params.docs || {};
@ -86,7 +94,7 @@ export const extractComponentArgTypes = (
throw new Error(ArgsTableError.ARGS_UNSUPPORTED); throw new Error(ArgsTableError.ARGS_UNSUPPORTED);
} }
let argTypes = extractArgTypes(component); let argTypes = extractArgTypes(component);
argTypes = filterArgTypes(argTypes, exclude); argTypes = filterArgTypes(argTypes, include, exclude);
return argTypes; return argTypes;
}; };
@ -110,11 +118,12 @@ const addComponentTabs = (
tabs: Record<string, ArgsTableProps>, tabs: Record<string, ArgsTableProps>,
components: Record<string, Component>, components: Record<string, Component>,
context: DocsContextProps, context: DocsContextProps,
exclude?: string[] include?: PropDescriptor,
exclude?: PropDescriptor
) => ({ ) => ({
...tabs, ...tabs,
...mapValues(components, (comp) => ({ ...mapValues(components, (comp) => ({
rows: extractComponentArgTypes(comp, context, exclude), rows: extractComponentArgTypes(comp, context, include, exclude),
})), })),
}); });
@ -125,7 +134,7 @@ export const StoryTable: FC<StoryProps & { components: Record<string, Component>
parameters: { argTypes }, parameters: { argTypes },
storyStore, storyStore,
} = context; } = context;
const { story, showComponents, components, exclude } = props; const { story, showComponents, components, include, exclude } = props;
let storyArgTypes; let storyArgTypes;
try { try {
let storyId; let storyId;
@ -137,14 +146,14 @@ export const StoryTable: FC<StoryProps & { components: Record<string, Component>
const data = storyStore.fromId(storyId); const data = storyStore.fromId(storyId);
storyArgTypes = data.parameters.argTypes; storyArgTypes = data.parameters.argTypes;
} }
storyArgTypes = filterArgTypes(storyArgTypes, exclude); storyArgTypes = filterArgTypes(storyArgTypes, include, exclude);
const [args, updateArgs] = useArgs(storyId, storyStore); const [args, updateArgs] = useArgs(storyId, storyStore);
let tabs = { Story: { rows: storyArgTypes, args, updateArgs } } as Record< let tabs = { Story: { rows: storyArgTypes, args, updateArgs } } as Record<
string, string,
ArgsTableProps ArgsTableProps
>; >;
if (showComponents) { if (showComponents) {
tabs = addComponentTabs(tabs, components, context, exclude); tabs = addComponentTabs(tabs, components, context, include, exclude);
} }
return <TabbedArgsTable tabs={tabs} />; return <TabbedArgsTable tabs={tabs} />;
@ -155,9 +164,9 @@ export const StoryTable: FC<StoryProps & { components: Record<string, Component>
export const ComponentsTable: FC<ComponentsProps> = (props) => { export const ComponentsTable: FC<ComponentsProps> = (props) => {
const context = useContext(DocsContext); const context = useContext(DocsContext);
const { components, exclude } = props; const { components, include, exclude } = props;
const tabs = addComponentTabs({}, components, context, exclude); const tabs = addComponentTabs({}, components, context, include, exclude);
return <TabbedArgsTable tabs={tabs} />; return <TabbedArgsTable tabs={tabs} />;
}; };
@ -167,7 +176,7 @@ export const Props: FC<PropsProps> = (props) => {
parameters: { subcomponents }, parameters: { subcomponents },
} = context; } = context;
const { exclude, components } = props as ComponentsProps; const { include, exclude, components } = props as ComponentsProps;
const { story } = props as StoryProps; const { story } = props as StoryProps;
let allComponents = components; let allComponents = components;
@ -185,14 +194,14 @@ export const Props: FC<PropsProps> = (props) => {
if (!components && !subcomponents) { if (!components && !subcomponents) {
let mainProps; let mainProps;
try { try {
mainProps = { rows: extractComponentArgTypes(main, context, exclude) }; mainProps = { rows: extractComponentArgTypes(main, context, include, exclude) };
} catch (err) { } catch (err) {
mainProps = { error: err.message }; mainProps = { error: err.message };
} }
return <ArgsTable {...mainProps} />; return <ArgsTable {...mainProps} />;
} }
return <ComponentsTable exclude={exclude} components={allComponents} />; return <ComponentsTable {...(props as ComponentsProps)} components={allComponents} />;
}; };
Props.defaultProps = { Props.defaultProps = {

View File

@ -7,6 +7,7 @@ import { extractComponentDescription } from '../../lib/docgen';
addParameters({ addParameters({
docs: { docs: {
inlineStories: true,
prepareForInline: (storyFn: StoryFn) => { prepareForInline: (storyFn: StoryFn) => {
const Story = toReact(storyFn()); const Story = toReact(storyFn());
return <Story />; return <Story />;

View File

@ -10,11 +10,13 @@ Storybook Docs transforms your Storybook stories into world-class component docu
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Vue specifics, read on! To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Vue specifics, read on!
- [Installation](#installation) - [Storybook Docs for Vue](#storybook-docs-for-vue)
- [DocsPage](#docspage) - [Installation](#installation)
- [MDX](#mdx) - [Preset options](#preset-options)
- [Inline stories](#inline-stories) - [DocsPage](#docspage)
- [More resources](#more-resources) - [MDX](#mdx)
- [Inline Stories](#inline-stories)
- [More resources](#more-resources)
## Installation ## Installation
@ -131,7 +133,7 @@ Yes, it's redundant to declare `component` twice. [Coming soon](https://github.c
Storybook Docs renders all Vue stories inside IFrames, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter). Storybook Docs renders all Vue stories inside IFrames, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter).
Starting in 5.3, you can also render stories inline, and in 6.0 this will become the default behavior. To render inline, update `.storybook/preview.js`: Starting in 5.3, you can also render stories inline, and in 6.0 this has become the default behavior. To render inline, update `.storybook/preview.js`:
```js ```js
import { addParameters } from '@storybook/vue'; import { addParameters } from '@storybook/vue';
@ -147,7 +149,6 @@ addParameters({
Want to learn more? Here are some more articles on Storybook Docs: Want to learn more? Here are some more articles on Storybook Docs:
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) - References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
- Vision: [Storybook Docs sneak peak](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) - Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Announcement: [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system) - Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -92,3 +92,11 @@ or add it to individual stories.
```js ```js
<Story inline={false} /> <Story inline={false} />
``` ```
## More resources
Want to learn more? Here are some more articles on Storybook Docs:
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-essentials", "name": "@storybook/addon-essentials",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Curated addons to bring out the best of Storybook", "description": "Curated addons to bring out the best of Storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -28,11 +28,11 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/node-logger": "6.0.0-alpha.35", "@storybook/node-logger": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"regenerator-runtime": "^0.13.3", "regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1" "ts-dedent": "^1.1.1"

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-events", "name": "@storybook/addon-events",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Add events to your Storybook stories.", "description": "Add events to your Storybook stories.",
"keywords": [ "keywords": [
"addon", "addon",
@ -31,11 +31,11 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"format-json": "^1.0.3", "format-json": "^1.0.3",
"lodash": "^4.17.15", "lodash": "^4.17.15",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-google-analytics", "name": "@storybook/addon-google-analytics",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook addon for google analytics", "description": "Storybook addon for google analytics",
"keywords": [ "keywords": [
"addon", "addon",
@ -20,8 +20,8 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"react-ga": "^2.5.7", "react-ga": "^2.5.7",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-graphql", "name": "@storybook/addon-graphql",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook addon to display the GraphiQL IDE", "description": "Storybook addon to display the GraphiQL IDE",
"keywords": [ "keywords": [
"addon", "addon",
@ -30,8 +30,8 @@
}, },
"dependencies": { "dependencies": {
"@babel/plugin-transform-classes": "^7.9.2", "@babel/plugin-transform-classes": "^7.9.2",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"graphiql": "^0.17.5", "graphiql": "^0.17.5",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-jest", "name": "@storybook/addon-jest",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "React storybook addon that show component jest report", "description": "React storybook addon that show component jest report",
"keywords": [ "keywords": [
"addon", "addon",
@ -35,11 +35,11 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"react": "^16.8.3", "react": "^16.8.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-knobs", "name": "@storybook/addon-knobs",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook Addon Prop Editor Component", "description": "Storybook Addon Prop Editor Component",
"keywords": [ "keywords": [
"addon", "addon",
@ -29,13 +29,13 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/channels": "6.0.0-alpha.35", "@storybook/channels": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"@types/react-color": "^3.0.1", "@types/react-color": "^3.0.1",
"copy-to-clipboard": "^3.0.8", "copy-to-clipboard": "^3.0.8",
"core-js": "^3.0.1", "core-js": "^3.0.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-links", "name": "@storybook/addon-links",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Story Links addon for storybook", "description": "Story Links addon for storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -29,11 +29,11 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/csf": "0.0.1", "@storybook/csf": "0.0.1",
"@storybook/router": "6.0.0-alpha.35", "@storybook/router": "6.0.0-alpha.39",
"@types/qs": "^6.9.0", "@types/qs": "^6.9.0",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",

View File

@ -1,6 +1,6 @@
# storybook-addon-queryparams # storybook-addon-queryparams
This storybook addon can be helpful if your components need special query parameters to work the way you want them. This storybook addon can be helpful if your components need special query parameters to work the way you want them to. It allows you to mock query params per story so that you can easily reproduce different states of your component.
## Getting started ## Getting started
@ -10,7 +10,7 @@ First, install the addon.
$ yarn add @storybook/addon-queryparams --dev $ yarn add @storybook/addon-queryparams --dev
``` ```
Add this line to your `main.js` file (create this file inside your storybook config directory if needed). Register it by adding it in the addons attribute in your `main.js` file (create this file inside your storybook config directory if needed).
```js ```js
module.exports = { module.exports = {
@ -18,6 +18,34 @@ module.exports = {
}; };
``` ```
In your story, add the `withQuery` decorator and define the query parameters you want to mock:
```js
import React from 'react';
import { Button } from '@storybook/react/demo';
import { withQuery } from '@storybook/addon-queryparams';
export default {
title: 'Button',
component: Button,
decorators: [withQuery],
parameters: {
query: {
mock: 'Hello world!',
},
},
};
export const WithMockedSearch = () => {
const urlParams = new URLSearchParams(document.location.search);
const mockedParam = urlParams.get('mock');
return <div>Mocked value: {mockedParam}</div>;
};
```
<details>
<summary>Example with storiesOf API</summary>
```js ```js
import React from 'react'; import React from 'react';
import { storiesOf } from '@storybook/react'; import { storiesOf } from '@storybook/react';
@ -25,12 +53,14 @@ import { storiesOf } from '@storybook/react';
storiesOf('button', module) storiesOf('button', module)
.addParameters({ .addParameters({
query: { query: {
mock: true, mock: 'Hello World!',
} },
}) })
.add('Prints the document.search', () => ( .add('Prints the mocked parameter', () => {
<div> const urlParams = new URLSearchParams(document.location.search);
This is the current document.search: {document.search}, it includes `mock`! const mockedParam = urlParams.get('mock');
</div> return <div>Mocked value: {mockedParam}</div>;
)); });
``` ```
</details>

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-queryparams", "name": "@storybook/addon-queryparams",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "parameter addon for storybook", "description": "parameter addon for storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -30,12 +30,12 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"qs": "^6.6.0", "qs": "^6.6.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-storyshots", "name": "@storybook/addon-storyshots",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.", "description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
"keywords": [ "keywords": [
"addon", "addon",
@ -33,9 +33,9 @@
}, },
"dependencies": { "dependencies": {
"@jest/transform": "^25.2.4", "@jest/transform": "^25.2.4",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@types/glob": "^7.1.1", "@types/glob": "^7.1.1",
"@types/jest": "^25.1.1", "@types/jest": "^25.1.1",
"@types/jest-specific-snapshot": "^0.5.3", "@types/jest-specific-snapshot": "^0.5.3",
@ -50,8 +50,8 @@
"ts-dedent": "^1.1.1" "ts-dedent": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/react": "6.0.0-alpha.35", "@storybook/react": "6.0.0-alpha.39",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"enzyme": "^3.11.0", "enzyme": "^3.11.0",
"enzyme-to-json": "^3.4.1", "enzyme-to-json": "^3.4.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-storyshots-puppeteer", "name": "@storybook/addon-storyshots-puppeteer",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Image snapshots addition to StoryShots based on puppeteer", "description": "Image snapshots addition to StoryShots based on puppeteer",
"keywords": [ "keywords": [
"addon", "addon",
@ -30,7 +30,7 @@
}, },
"dependencies": { "dependencies": {
"@storybook/csf": "0.0.1", "@storybook/csf": "0.0.1",
"@storybook/node-logger": "6.0.0-alpha.35", "@storybook/node-logger": "6.0.0-alpha.39",
"@types/jest-image-snapshot": "^2.8.0", "@types/jest-image-snapshot": "^2.8.0",
"@wordpress/jest-puppeteer-axe": "^1.5.0", "@wordpress/jest-puppeteer-axe": "^1.5.0",
"core-js": "^3.0.1", "core-js": "^3.0.1",
@ -42,7 +42,7 @@
"@types/puppeteer": "^2.0.0" "@types/puppeteer": "^2.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"puppeteer": "^1.12.2 || ^2.0.0" "puppeteer": "^1.12.2 || ^2.0.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-storysource", "name": "@storybook/addon-storysource",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Stories addon for storybook", "description": "Stories addon for storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -29,13 +29,13 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/router": "6.0.0-alpha.35", "@storybook/router": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"estraverse": "^4.2.0", "estraverse": "^4.2.0",
"loader-utils": "^2.0.0", "loader-utils": "^2.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-toolbars", "name": "@storybook/addon-toolbars",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook toolbars addon", "description": "Storybook toolbars addon",
"keywords": [ "keywords": [
"addon", "addon",
@ -30,10 +30,10 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35" "@storybook/components": "6.0.0-alpha.39"
}, },
"peerDependencies": { "peerDependencies": {
"react": "*" "react": "*"

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-viewport", "name": "@storybook/addon-viewport",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook addon to change the viewport size to mobile", "description": "Storybook addon to change the viewport size to mobile",
"keywords": [ "keywords": [
"addon", "addon",
@ -29,12 +29,12 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"memoizerific": "^1.11.3", "memoizerific": "^1.11.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/angular", "name": "@storybook/angular",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.", "description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -34,9 +34,9 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@storybook/node-logger": "6.0.0-alpha.35", "@storybook/node-logger": "6.0.0-alpha.39",
"@types/webpack-env": "^1.15.1", "@types/webpack-env": "^1.15.1",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"fork-ts-checker-webpack-plugin": "^4.0.3", "fork-ts-checker-webpack-plugin": "^4.0.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/ember", "name": "@storybook/ember",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.", "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
"homepage": "https://github.com/storybookjs/storybook/tree/master/app/ember", "homepage": "https://github.com/storybookjs/storybook/tree/master/app/ember",
"bugs": { "bugs": {
@ -32,7 +32,7 @@
}, },
"dependencies": { "dependencies": {
"@ember/test-helpers": "^1.7.0", "@ember/test-helpers": "^1.7.0",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"regenerator-runtime": "^0.13.3", "regenerator-runtime": "^0.13.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/html", "name": "@storybook/html",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -34,8 +34,8 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@types/webpack-env": "^1.15.1", "@types/webpack-env": "^1.15.1",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/marionette", "name": "@storybook/marionette",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Marionette: Develop Marionette.js component in isolation with Hot Reloading.", "description": "Storybook for Marionette: Develop Marionette.js component in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -25,7 +25,7 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"common-tags": "^1.8.0", "common-tags": "^1.8.0",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/marko", "name": "@storybook/marko",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Marko: Develop Marko Component in isolation with Hot Reloading.", "description": "Storybook for Marko: Develop Marko Component in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -34,8 +34,8 @@
}, },
"dependencies": { "dependencies": {
"@marko/webpack": "^2.1.0", "@marko/webpack": "^2.1.0",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"regenerator-runtime": "^0.13.3", "regenerator-runtime": "^0.13.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/mithril", "name": "@storybook/mithril",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Mithril: Develop Mithril Component in isolation.", "description": "Storybook for Mithril: Develop Mithril Component in isolation.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -36,8 +36,8 @@
"dependencies": { "dependencies": {
"@babel/core": "^7.8.4", "@babel/core": "^7.8.4",
"@babel/plugin-transform-react-jsx": "^7.3.0", "@babel/plugin-transform-react-jsx": "^7.3.0",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@types/mithril": "^2.0.0", "@types/mithril": "^2.0.0",
"@types/webpack-env": "^1.15.1", "@types/webpack-env": "^1.15.1",
"core-js": "^3.0.1", "core-js": "^3.0.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/preact", "name": "@storybook/preact",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Preact: Develop Preact Component in isolation.", "description": "Storybook for Preact: Develop Preact Component in isolation.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -35,8 +35,8 @@
}, },
"dependencies": { "dependencies": {
"@babel/plugin-transform-react-jsx": "^7.3.0", "@babel/plugin-transform-react-jsx": "^7.3.0",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@types/webpack-env": "^1.15.1", "@types/webpack-env": "^1.15.1",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/rax", "name": "@storybook/rax",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Rax: Develop Rax Component in isolation.", "description": "Storybook for Rax: Develop Rax Component in isolation.",
"keywords": [ "keywords": [
"rax", "rax",
@ -34,7 +34,7 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"babel-preset-rax": "^1.0.0-beta.0", "babel-preset-rax": "^1.0.0-beta.0",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"driver-dom": "^2.0.0", "driver-dom": "^2.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/react", "name": "@storybook/react",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -37,9 +37,9 @@
"@babel/plugin-transform-react-constant-elements": "^7.6.3", "@babel/plugin-transform-react-constant-elements": "^7.6.3",
"@babel/preset-flow": "^7.0.0", "@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0", "@babel/preset-react": "^7.0.0",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@storybook/node-logger": "6.0.0-alpha.35", "@storybook/node-logger": "6.0.0-alpha.39",
"@svgr/webpack": "^5.1.0", "@svgr/webpack": "^5.1.0",
"@types/webpack-env": "^1.15.1", "@types/webpack-env": "^1.15.1",
"babel-plugin-add-react-displayname": "^0.0.5", "babel-plugin-add-react-displayname": "^0.0.5",
@ -57,7 +57,7 @@
"webpack": "^4.33.0" "webpack": "^4.33.0"
}, },
"devDependencies": { "devDependencies": {
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@types/mini-css-extract-plugin": "^0.9.0", "@types/mini-css-extract-plugin": "^0.9.0",
"@types/node": "^13.9.5", "@types/node": "^13.9.5",
"@types/webpack": "^4.41.9" "@types/webpack": "^4.41.9"

View File

@ -15,7 +15,7 @@ const checkForNewPreset = (presetsList: Preset[]) => {
if (!hasNewPreset) { if (!hasNewPreset) {
logger.warn('Storybook support for Create React App is now a separate preset.'); logger.warn('Storybook support for Create React App is now a separate preset.');
logger.warn( logger.warn(
'To get started with the new preset, simply add `@storybook/preset-create-react-app` to your project.' 'To use the new preset, add `@storybook/preset-create-react-app` to the list of `addons` in your `.storybook/main.js` config file.'
); );
logger.warn('The built-in preset will be disabled in Storybook 6.0.'); logger.warn('The built-in preset will be disabled in Storybook 6.0.');
return false; return false;

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/riot", "name": "@storybook/riot",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for riot.js: View riot snippets in isolation with Hot Reloading.", "description": "Storybook for riot.js: View riot snippets in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -34,7 +34,7 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"raw-loader": "^4.0.0", "raw-loader": "^4.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/server", "name": "@storybook/server",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -34,8 +34,8 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@storybook/node-logger": "^5.2.8", "@storybook/node-logger": "^5.2.8",
"@types/webpack-env": "^1.13.9", "@types/webpack-env": "^1.13.9",
"core-js": "^3.0.1", "core-js": "^3.0.1",

View File

@ -12,7 +12,24 @@
}, },
"knobs": [ "knobs": [
{ "type": "text", "name": "Name", "value": "John Doe", "param": "name"}, { "type": "text", "name": "Name", "value": "John Doe", "param": "name"},
{ "type": "number", "name": "Age", "value": 44, "param": "age"} { "type": "date", "name": "Birthday", "value": "1960-12-25T00:42:03.600Z", "param": "birthday"},
{ "type": "color", "name": "Favorite Color", "value": "red", "param": "favorite_color"},
{ "type": "boolean", "name": "Active", "value": true, "param": "active"},
{ "type": "number", "name": "Pets", "value": 2, "param": "pets"},
{ "type": "array", "name": "Sports", "value": ["football", "baseball"], "param": "sports"},
{
"type": "select",
"name": "Favorite Food",
"value": "Ice Cream",
"options": {
"hot_dog": "Hot Dog",
"pizza": "Pizza",
"burgers": "Burgers",
"ice_cream": "Ice Cream"
},
"param": "favorite_food"
},
{ "type": "object", "name": "Other Things", "value": {"hair": "Brown", "eyes": "Blue"}, "param": "other_thinkgs"}
] ]
} }
] ]

View File

@ -18,7 +18,24 @@ export default {
export const Simple = () => { export const Simple = () => {
return { return {
name: text('Name', 'John Doe'), name: text('Name', 'John Doe'),
age: number('Age', 44, {}), birthday: new Date(date('Birthday', new Date('1960-12-25T00:42:03.600Z'))).toISOString(),
favorite_color: color('Favorite Color', 'red'),
active: boolean('Active', true),
pets: number('Pets', 2, {}),
sports: array('Sports', [
'football',
'baseball'
], ',').join(','),
favorite_food: select('Favorite Food', {
hot_dog: 'Hot Dog',
pizza: 'Pizza',
burgers: 'Burgers',
ice_cream: 'Ice Cream'
}, 'Ice Cream'),
other_thinkgs: JSON.stringify(object('Other Things', {
hair: 'Brown',
eyes: 'Blue'
})),
}; };
}; };
Simple.story = { Simple.story = {

View File

@ -27,14 +27,16 @@ function stringifyKnob(knob: StoryKnob) {
return `number('${name}', ${stringifiedValue}, ${stringifyObject(opts, level)})`; return `number('${name}', ${stringifiedValue}, ${stringifyObject(opts, level)})`;
case 'color': case 'color':
return `color('${name}', ${stringifiedValue})`; return `color('${name}', ${stringifiedValue})`;
case 'array': case 'array': {
return `array('${name}', ${stringifiedValue}).join(',')`; const separator = opts.separator || ',';
return `array('${name}', ${stringifiedValue}, '${separator}').join('${separator}')`;
}
case 'boolean': case 'boolean':
return `boolean('${name}', ${stringifiedValue})`; return `boolean('${name}', ${stringifiedValue})`;
case 'object': case 'object':
return `object('${name}', ${stringifiedValue})`; return `JSON.stringify(object('${name}', ${stringifiedValue}))`;
case 'date': case 'date':
return `date('${name}', new Date(${stringifiedValue}))`; return `new Date(date('${name}', new Date(${stringifiedValue}))).toISOString()`;
case 'select': case 'select':
return `select('${name}', ${stringifyObject(opts.options, level)}, ${stringifiedValue})`; return `select('${name}', ${stringifyObject(opts.options, level)}, ${stringifiedValue})`;
default: default:

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/svelte", "name": "@storybook/svelte",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -34,8 +34,8 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"regenerator-runtime": "^0.13.3", "regenerator-runtime": "^0.13.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/vue", "name": "@storybook/vue",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -34,8 +34,8 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@types/webpack-env": "^1.15.1", "@types/webpack-env": "^1.15.1",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/web-components", "name": "@storybook/web-components",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
"keywords": [ "keywords": [
"lit-html", "lit-html",
@ -38,8 +38,8 @@
"dependencies": { "dependencies": {
"@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0", "@babel/plugin-syntax-import-meta": "^7.2.0",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@types/webpack-env": "^1.15.1", "@types/webpack-env": "^1.15.1",
"babel-plugin-bundled-import-meta": "^0.3.1", "babel-plugin-bundled-import-meta": "^0.3.1",
"core-js": "^3.0.1", "core-js": "^3.0.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-decorator", "name": "@storybook/addon-decorator",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "decorator addon for storybook", "description": "decorator addon for storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -24,8 +24,8 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.4.0" "global": "^4.4.0"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-parameter", "name": "@storybook/addon-parameter",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "parameter addon for storybook", "description": "parameter addon for storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -24,12 +24,12 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"react": "^16.8.3", "react": "^16.8.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-preview-wrapper", "name": "@storybook/addon-preview-wrapper",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "preview wrapper addon for storybook", "description": "preview wrapper addon for storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -24,7 +24,7 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"react": "^16.8.3" "react": "^16.8.3"
}, },
"publishConfig": { "publishConfig": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addon-roundtrip", "name": "@storybook/addon-roundtrip",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "roundtrip addon for storybook", "description": "roundtrip addon for storybook",
"keywords": [ "keywords": [
"addon", "addon",
@ -24,13 +24,13 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"react": "^16.8.3", "react": "^16.8.3",

View File

@ -1 +1 @@
{"version":"6.0.0-alpha.35","info":{"plain":"### Bug Fixes\n\n- Core: Fix static build with DLL ([#10377](https://github.com/storybookjs/storybook/pull/10377))\n- Addon-Docs: Fix Args table generation for story with no component ([#10436](https://github.com/storybookjs/storybook/pull/10436))\n\n### Maintenance\n\n- Yarn 2: Fix compatibility with `.storybook/preview.js` file ([#10342](https://github.com/storybookjs/storybook/pull/10342))\n- Official-storybook: Fix passArgsFirst problems ([#10432](https://github.com/storybookjs/storybook/pull/10432))"}} {"version":"6.0.0-alpha.39","info":{"plain":"### Breaking Changes\n\n- Addon-docs: Inline stories in Vue by default ([#10463](https://github.com/storybookjs/storybook/pull/10463))\n\n### Features\n\n- Addon-docs: Provide better props include/exclude features ([#10464](https://github.com/storybookjs/storybook/pull/10464))\n- UI: Improve loading state ([#10444](https://github.com/storybookjs/storybook/pull/10444))\n\n### Bug Fixes\n\n- UI: Fix bad shortcutpage layout ([#10445](https://github.com/storybookjs/storybook/pull/10445))"}}

View File

@ -1,6 +1,6 @@
{ {
"name": "angular-cli", "name": "angular-cli",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
@ -37,18 +37,18 @@
"@angular/cli": "^9.1.0", "@angular/cli": "^9.1.0",
"@angular/compiler-cli": "^9.1.0", "@angular/compiler-cli": "^9.1.0",
"@compodoc/compodoc": "^1.1.11", "@compodoc/compodoc": "^1.1.11",
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/addon-jest": "6.0.0-alpha.35", "@storybook/addon-jest": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/angular": "6.0.0-alpha.35", "@storybook/angular": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"@types/core-js": "^2.5.0", "@types/core-js": "^2.5.0",
"@types/jest": "^25.1.1", "@types/jest": "^25.1.1",
"@types/node": "^13.9.5", "@types/node": "^13.9.5",

View File

@ -12,7 +12,16 @@ exports[`Storyshots Core/Parameters passed to story 1`] = `
<button <button
_ngcontent-a-c17="" _ngcontent-a-c17=""
> >
Parameters are {"docs":{"iframeHeight":"60px"},"globalParameter":"globalParameter","framework":"angular","chapterParameter":"chapterParameter","storyParameter":"storyParameter","__id":"core-parameters--passed-to-story"} Parameters are {
"docs": {
"iframeHeight": "60px"
},
"globalParameter": "globalParameter",
"framework": "angular",
"chapterParameter": "chapterParameter",
"storyParameter": "storyParameter",
"__id": "core-parameters--passed-to-story"
}
</button> </button>
</storybook-button-component> </storybook-button-component>
</storybook-dynamic-app-root> </storybook-dynamic-app-root>

View File

@ -17,7 +17,7 @@ export default {
export const PassedToStory = ({ parameters: { fileName, ...parameters } }) => ({ export const PassedToStory = ({ parameters: { fileName, ...parameters } }) => ({
component: Button, component: Button,
props: { props: {
text: `Parameters are ${JSON.stringify(parameters)}`, text: `Parameters are ${JSON.stringify(parameters, null, 2)}`,
onClick: () => 0, onClick: () => 0,
}, },
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "cra-kitchen-sink", "name": "cra-kitchen-sink",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "react-scripts build", "build": "react-scripts build",
@ -18,19 +18,19 @@
"react-lifecycles-compat": "^3.0.4" "react-lifecycles-compat": "^3.0.4"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/addon-events": "6.0.0-alpha.35", "@storybook/addon-events": "6.0.0-alpha.39",
"@storybook/addon-jest": "6.0.0-alpha.35", "@storybook/addon-jest": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/react": "6.0.0-alpha.35", "@storybook/react": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"react-scripts": "^3.0.1" "react-scripts": "^3.0.1"
}, },
"storybook": { "storybook": {

View File

@ -1,6 +1,6 @@
{ {
"name": "cra-react15", "name": "cra-react15",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "react-scripts build", "build": "react-scripts build",
@ -18,11 +18,11 @@
"react-scripts": "3.0.1" "react-scripts": "3.0.1"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/react": "6.0.0-alpha.35", "@storybook/react": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"babel-core": "6", "babel-core": "6",
"babel-runtime": "6" "babel-runtime": "6"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "cra-ts-essentials", "name": "cra-ts-essentials",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "react-scripts build", "build": "react-scripts build",
@ -34,10 +34,10 @@
"typescript": "3.8.3" "typescript": "3.8.3"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-essentials": "6.0.0-alpha.35", "@storybook/addon-essentials": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/preset-create-react-app": "^2.1.1", "@storybook/preset-create-react-app": "^2.1.1",
"@storybook/react": "6.0.0-alpha.35" "@storybook/react": "6.0.0-alpha.39"
}, },
"storybook": { "storybook": {
"chromatic": { "chromatic": {

View File

@ -1,6 +1,6 @@
{ {
"name": "cra-ts-kitchen-sink", "name": "cra-ts-kitchen-sink",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "react-scripts build", "build": "react-scripts build",
@ -34,13 +34,13 @@
"typescript": "3.8.3" "typescript": "3.8.3"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/preset-create-react-app": "^2.1.1", "@storybook/preset-create-react-app": "^2.1.1",
"@storybook/react": "6.0.0-alpha.35", "@storybook/react": "6.0.0-alpha.39",
"@types/enzyme": "^3.9.0", "@types/enzyme": "^3.9.0",
"enzyme": "^3.9.0", "enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.9.1", "enzyme-adapter-react-16": "^1.9.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/example-devkits", "name": "@storybook/example-devkits",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./", "build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./",
@ -8,18 +8,18 @@
"storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./ --no-dll" "storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./ --no-dll"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-decorator": "6.0.0-alpha.35", "@storybook/addon-decorator": "6.0.0-alpha.39",
"@storybook/addon-parameter": "6.0.0-alpha.35", "@storybook/addon-parameter": "6.0.0-alpha.39",
"@storybook/addon-preview-wrapper": "6.0.0-alpha.35", "@storybook/addon-preview-wrapper": "6.0.0-alpha.39",
"@storybook/addon-roundtrip": "6.0.0-alpha.35", "@storybook/addon-roundtrip": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/node-logger": "6.0.0-alpha.35", "@storybook/node-logger": "6.0.0-alpha.39",
"@storybook/react": "6.0.0-alpha.35", "@storybook/react": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"cors": "^2.8.5", "cors": "^2.8.5",
"cross-env": "^7.0.0", "cross-env": "^7.0.0",
"enzyme-to-json": "^3.4.1", "enzyme-to-json": "^3.4.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "ember-example", "name": "ember-example",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "ember build --output-path ember-output", "build": "ember build --output-path ember-output",
@ -16,18 +16,18 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.8.4", "@babel/core": "^7.8.4",
"@ember/optional-features": "^1.3.0", "@ember/optional-features": "^1.3.0",
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/ember": "6.0.0-alpha.35", "@storybook/ember": "6.0.0-alpha.39",
"@storybook/ember-cli-storybook": "^0.2.1", "@storybook/ember-cli-storybook": "^0.2.1",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"babel-loader": "^8", "babel-loader": "^8",
"broccoli-asset-rev": "^3.0.0", "broccoli-asset-rev": "^3.0.0",
"cross-env": "^7.0.0", "cross-env": "^7.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "html-kitchen-sink", "name": "html-kitchen-sink",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"description": "", "description": "",
"keywords": [], "keywords": [],
@ -13,23 +13,23 @@
"storybook": "start-storybook -p 9006" "storybook": "start-storybook -p 9006"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/addon-events": "6.0.0-alpha.35", "@storybook/addon-events": "6.0.0-alpha.39",
"@storybook/addon-jest": "6.0.0-alpha.35", "@storybook/addon-jest": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/html": "6.0.0-alpha.35", "@storybook/html": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"eventemitter3": "^4.0.0", "eventemitter3": "^4.0.0",
"format-json": "^1.0.3", "format-json": "^1.0.3",
"global": "^4.3.2", "global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "marko-cli", "name": "marko-cli",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"description": "Demo of how to build an app using marko-starter", "description": "Demo of how to build an app using marko-starter",
"repository": { "repository": {
@ -23,13 +23,13 @@
"marko-starter": "^2.1.0" "marko-starter": "^2.1.0"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/marko": "6.0.0-alpha.35", "@storybook/marko": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"prettier": "^2.0.2", "prettier": "^2.0.2",
"webpack": "^4.33.0" "webpack": "^4.33.0"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "mithril-example", "name": "mithril-example",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build-storybook": "build-storybook", "build-storybook": "build-storybook",
@ -10,17 +10,17 @@
"mithril": "^1.1.6" "mithril": "^1.1.6"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/mithril": "6.0.0-alpha.35", "@storybook/mithril": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"webpack": "^4.33.0" "webpack": "^4.33.0"
}, },
"storybook": { "storybook": {

View File

@ -1,6 +1,6 @@
{ {
"name": "official-storybook", "name": "official-storybook",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./", "build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./",
@ -14,32 +14,32 @@
}, },
"devDependencies": { "devDependencies": {
"@packtracker/webpack-plugin": "^2.0.1", "@packtracker/webpack-plugin": "^2.0.1",
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-contexts": "6.0.0-alpha.35", "@storybook/addon-contexts": "6.0.0-alpha.39",
"@storybook/addon-cssresources": "6.0.0-alpha.35", "@storybook/addon-cssresources": "6.0.0-alpha.39",
"@storybook/addon-design-assets": "6.0.0-alpha.35", "@storybook/addon-design-assets": "6.0.0-alpha.39",
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/addon-events": "6.0.0-alpha.35", "@storybook/addon-events": "6.0.0-alpha.39",
"@storybook/addon-graphql": "6.0.0-alpha.35", "@storybook/addon-graphql": "6.0.0-alpha.39",
"@storybook/addon-jest": "6.0.0-alpha.35", "@storybook/addon-jest": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-queryparams": "6.0.0-alpha.35", "@storybook/addon-queryparams": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storyshots-puppeteer": "6.0.0-alpha.35", "@storybook/addon-storyshots-puppeteer": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-toolbars": "6.0.0-alpha.35", "@storybook/addon-toolbars": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/cli": "6.0.0-alpha.35", "@storybook/cli": "6.0.0-alpha.39",
"@storybook/components": "6.0.0-alpha.35", "@storybook/components": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/node-logger": "6.0.0-alpha.35", "@storybook/node-logger": "6.0.0-alpha.39",
"@storybook/react": "6.0.0-alpha.35", "@storybook/react": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"cors": "^2.8.5", "cors": "^2.8.5",
"cross-env": "^7.0.0", "cross-env": "^7.0.0",
"enzyme-to-json": "^3.4.1", "enzyme-to-json": "^3.4.1",

View File

@ -0,0 +1,24 @@
import { Props, Meta } from '@storybook/addon-docs/blocks';
import { DocgenButton } from '../../components/DocgenButton';
<Meta title="Addons/Docs/IncludeExclude" />
## Include
### Array
<Props of={DocgenButton} include={['disabled', 'label']} />
### Regex
<Props of={DocgenButton} include={/^o.*/} />
## Exclude
### Regex
<Props of={DocgenButton} exclude={/^o.*|^...$/} />
## Mixed
<Props of={DocgenButton} include={/^o.*/} exclude={['one', 'obj']} />

View File

@ -15,7 +15,10 @@ export default {
// I'm not sure what we should recommend regarding propTypes? are they a good idea for examples? // I'm not sure what we should recommend regarding propTypes? are they a good idea for examples?
// Given we sort of control the props, should we export a prop type? // Given we sort of control the props, should we export a prop type?
export const Passed = (_args, { parameters: { options, fileName, ...parameters }, ...rest }) => ( export const Passed = (_args, { parameters: { options, fileName, ...parameters }, ...rest }) => (
<pre>Parameters: {JSON.stringify(parameters, null, 2)}</pre> <div>
Parameters:
<pre>{JSON.stringify(parameters, null, 2)}</pre>
</div>
); );
Passed.story = { Passed.story = {
name: 'passed to story', name: 'passed to story',

View File

@ -1,6 +1,6 @@
{ {
"name": "preact-example", "name": "preact-example",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules", "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
@ -15,18 +15,18 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.8.4", "@babel/core": "^7.8.4",
"@babel/plugin-transform-runtime": "^7.2.0", "@babel/plugin-transform-runtime": "^7.2.0",
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-contexts": "6.0.0-alpha.35", "@storybook/addon-contexts": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/preact": "6.0.0-alpha.35", "@storybook/preact": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"babel-loader": "^8.0.4", "babel-loader": "^8.0.4",
"cross-env": "^7.0.0", "cross-env": "^7.0.0",
"file-loader": "^6.0.0", "file-loader": "^6.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "rax-kitchen-sink", "name": "rax-kitchen-sink",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "build-scripts build", "build": "build-scripts build",
@ -20,20 +20,20 @@
"devDependencies": { "devDependencies": {
"@alib/build-scripts": "^0.1.8", "@alib/build-scripts": "^0.1.8",
"@babel/preset-react": "^7.7.4", "@babel/preset-react": "^7.7.4",
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-events": "6.0.0-alpha.35", "@storybook/addon-events": "6.0.0-alpha.39",
"@storybook/addon-jest": "6.0.0-alpha.35", "@storybook/addon-jest": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/rax": "6.0.0-alpha.35", "@storybook/rax": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"babel-eslint": "^10.0.3", "babel-eslint": "^10.0.3",
"build-plugin-rax-app": "^0.2.0", "build-plugin-rax-app": "^0.2.0",
"stylesheet-loader": "^0.8.0" "stylesheet-loader": "^0.8.0"

View File

@ -1,6 +1,6 @@
{ {
"name": "riot-example", "name": "riot-example",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules", "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
@ -15,17 +15,17 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.8.4", "@babel/core": "^7.8.4",
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/riot": "6.0.0-alpha.35", "@storybook/riot": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"babel-loader": "^8.0.4", "babel-loader": "^8.0.4",
"cross-env": "^7.0.0", "cross-env": "^7.0.0",
"file-loader": "^6.0.0", "file-loader": "^6.0.0",

View File

@ -6,7 +6,18 @@ exports[`Storyshots Core/Parameters passed to story 1`] = `
id="root" id="root"
> >
<div> <div>
Parameters are {"globalParameter":"globalParameter","framework":"riot","chapterParameter":"chapterParameter","__id":"core-parameters--passed-to-story","storyParameter":"storyParameter","id":"root","dataIs":"parameters"} Parameters are
<pre>
{
"globalParameter": "globalParameter",
"framework": "riot",
"chapterParameter": "chapterParameter",
"__id": "core-parameters--passed-to-story",
"storyParameter": "storyParameter",
"id": "root",
"dataIs": "parameters"
}
</pre>
</div> </div>
</div> </div>
`; `;

View File

@ -4,7 +4,13 @@ const globalParameter = 'globalParameter';
const chapterParameter = 'chapterParameter'; const chapterParameter = 'chapterParameter';
const storyParameter = 'storyParameter'; const storyParameter = 'storyParameter';
tag('parameters', '<div>Parameters are {JSON.stringify (this.opts)}</div>', '', '', () => {}); tag(
'parameters',
'<div>Parameters are <pre>{JSON.stringify(this.opts, null, 2)}</pre></div>',
'',
'',
() => {}
);
addParameters({ globalParameter }); addParameters({ globalParameter });

View File

@ -1,6 +1,6 @@
{ {
"name": "server-kitchen-sink", "name": "server-kitchen-sink",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"description": "", "description": "",
"keywords": [], "keywords": [],
@ -14,13 +14,13 @@
"storybook": "SERVER_PORT=1137 start-storybook -p 9006 --quiet" "storybook": "SERVER_PORT=1137 start-storybook -p 9006 --quiet"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/node-logger": "6.0.0-alpha.35", "@storybook/node-logger": "6.0.0-alpha.39",
"@storybook/server": "6.0.0-alpha.35", "@storybook/server": "6.0.0-alpha.39",
"concurrently": "^5.0.2", "concurrently": "^5.0.2",
"cors": "^2.8.5", "cors": "^2.8.5",
"express": "~4.17.1", "express": "~4.17.1",

View File

@ -1,12 +1,12 @@
{ {
"name": "standalone-preview", "name": "standalone-preview",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"storybook": "parcel ./storybook.html --port 1337" "storybook": "parcel ./storybook.html --port 1337"
}, },
"devDependencies": { "devDependencies": {
"@storybook/react": "6.0.0-alpha.35", "@storybook/react": "6.0.0-alpha.39",
"parcel": "^1.12.3", "parcel": "^1.12.3",
"react": "^16.8.4", "react": "^16.8.4",
"react-dom": "^16.8.4" "react-dom": "^16.8.4"

View File

@ -1,6 +1,6 @@
{ {
"name": "svelte-example", "name": "svelte-example",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build-storybook": "build-storybook -s public", "build-storybook": "build-storybook -s public",
@ -10,18 +10,18 @@
"global": "^4.3.2" "global": "^4.3.2"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"@storybook/svelte": "6.0.0-alpha.35" "@storybook/svelte": "6.0.0-alpha.39"
}, },
"storybook": { "storybook": {
"chromatic": { "chromatic": {

View File

@ -9,7 +9,6 @@ Vue.use(Vuex);
addParameters({ addParameters({
docs: { docs: {
inlineStories: true,
iframeHeight: '60px', iframeHeight: '60px',
}, },
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "vue-example", "name": "vue-example",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules", "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
@ -14,19 +14,19 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.8.4", "@babel/core": "^7.8.4",
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-contexts": "6.0.0-alpha.35", "@storybook/addon-contexts": "6.0.0-alpha.39",
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"@storybook/vue": "6.0.0-alpha.35", "@storybook/vue": "6.0.0-alpha.39",
"babel-core": "^7.0.0-bridge.0", "babel-core": "^7.0.0-bridge.0",
"babel-loader": "^8.0.5", "babel-loader": "^8.0.5",
"cross-env": "^7.0.0", "cross-env": "^7.0.0",

View File

@ -2,6 +2,18 @@
exports[`Storyshots Core/Parameters passed to story 1`] = ` exports[`Storyshots Core/Parameters passed to story 1`] = `
<div> <div>
Parameters are {"docs":{"inlineStories":true,"iframeHeight":"60px"},"globalParameter":"globalParameter","framework":"vue","chapterParameter":"chapterParameter","storyParameter":"storyParameter","__id":"core-parameters--passed-to-story"} Parameters are
<pre>
{
"docs": {
"iframeHeight": "60px"
},
"globalParameter": "globalParameter",
"framework": "vue",
"chapterParameter": "chapterParameter",
"storyParameter": "storyParameter",
"__id": "core-parameters--passed-to-story"
}
</pre>
</div> </div>
`; `;

View File

@ -49,7 +49,6 @@ exports[`Storyshots Custom/Decorator for Vue With Data 1`] = `
"story": "With Data", "story": "With Data",
"parameters": { "parameters": {
"docs": { "docs": {
"inlineStories": true,
"iframeHeight": "60px" "iframeHeight": "60px"
}, },
"globalParameter": "globalParameter", "globalParameter": "globalParameter",

View File

@ -14,7 +14,7 @@ export default {
}; };
export const PassedToStory = ({ parameters: { fileName, ...parameters } }) => ({ export const PassedToStory = ({ parameters: { fileName, ...parameters } }) => ({
template: `<div>Parameters are ${JSON.stringify(parameters)}</div>`, template: `<div>Parameters are <pre>${JSON.stringify(parameters, null, 2)}</pre></div>`,
}); });
PassedToStory.story = { PassedToStory.story = {

View File

@ -1,6 +1,6 @@
{ {
"name": "web-components-kitchen-sink", "name": "web-components-kitchen-sink",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"private": true, "private": true,
"description": "", "description": "",
"keywords": [], "keywords": [],
@ -12,23 +12,23 @@
"storybook": "start-storybook -p 9006" "storybook": "start-storybook -p 9006"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-a11y": "6.0.0-alpha.35", "@storybook/addon-a11y": "6.0.0-alpha.39",
"@storybook/addon-actions": "6.0.0-alpha.35", "@storybook/addon-actions": "6.0.0-alpha.39",
"@storybook/addon-backgrounds": "6.0.0-alpha.35", "@storybook/addon-backgrounds": "6.0.0-alpha.39",
"@storybook/addon-docs": "6.0.0-alpha.35", "@storybook/addon-docs": "6.0.0-alpha.39",
"@storybook/addon-events": "6.0.0-alpha.35", "@storybook/addon-events": "6.0.0-alpha.39",
"@storybook/addon-jest": "6.0.0-alpha.35", "@storybook/addon-jest": "6.0.0-alpha.39",
"@storybook/addon-knobs": "6.0.0-alpha.35", "@storybook/addon-knobs": "6.0.0-alpha.39",
"@storybook/addon-links": "6.0.0-alpha.35", "@storybook/addon-links": "6.0.0-alpha.39",
"@storybook/addon-storyshots": "6.0.0-alpha.35", "@storybook/addon-storyshots": "6.0.0-alpha.39",
"@storybook/addon-storysource": "6.0.0-alpha.35", "@storybook/addon-storysource": "6.0.0-alpha.39",
"@storybook/addon-viewport": "6.0.0-alpha.35", "@storybook/addon-viewport": "6.0.0-alpha.39",
"@storybook/addons": "6.0.0-alpha.35", "@storybook/addons": "6.0.0-alpha.39",
"@storybook/client-api": "6.0.0-alpha.35", "@storybook/client-api": "6.0.0-alpha.39",
"@storybook/core": "6.0.0-alpha.35", "@storybook/core": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/source-loader": "6.0.0-alpha.35", "@storybook/source-loader": "6.0.0-alpha.39",
"@storybook/web-components": "6.0.0-alpha.35", "@storybook/web-components": "6.0.0-alpha.39",
"babel-loader": "^8.0.5", "babel-loader": "^8.0.5",
"eventemitter3": "^4.0.0", "eventemitter3": "^4.0.0",
"format-json": "^1.0.3", "format-json": "^1.0.3",

View File

@ -2,5 +2,5 @@
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"registry": "https://registry.npmjs.org", "registry": "https://registry.npmjs.org",
"version": "6.0.0-alpha.35" "version": "6.0.0-alpha.39"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/addons", "name": "@storybook/addons",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Storybook addons store", "description": "Storybook addons store",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -28,12 +28,12 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/api": "6.0.0-alpha.35", "@storybook/api": "6.0.0-alpha.39",
"@storybook/channels": "6.0.0-alpha.35", "@storybook/channels": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/router": "6.0.0-alpha.35", "@storybook/router": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"regenerator-runtime": "^0.13.3" "regenerator-runtime": "^0.13.3"

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/api", "name": "@storybook/api",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "Core Storybook API & Context", "description": "Core Storybook API & Context",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -28,12 +28,12 @@
}, },
"dependencies": { "dependencies": {
"@reach/router": "^1.3.3", "@reach/router": "^1.3.3",
"@storybook/channels": "6.0.0-alpha.35", "@storybook/channels": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"@storybook/csf": "0.0.1", "@storybook/csf": "0.0.1",
"@storybook/router": "6.0.0-alpha.35", "@storybook/router": "6.0.0-alpha.39",
"@storybook/theming": "6.0.0-alpha.35", "@storybook/theming": "6.0.0-alpha.39",
"@types/reach__router": "^1.2.3", "@types/reach__router": "^1.2.3",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"fast-deep-equal": "^3.1.1", "fast-deep-equal": "^3.1.1",

View File

@ -1 +1 @@
export const version = '6.0.0-alpha.35'; export const version = '6.0.0-alpha.39';

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/channel-postmessage", "name": "@storybook/channel-postmessage",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "", "description": "",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -28,9 +28,9 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/channels": "6.0.0-alpha.35", "@storybook/channels": "6.0.0-alpha.39",
"@storybook/client-logger": "6.0.0-alpha.35", "@storybook/client-logger": "6.0.0-alpha.39",
"@storybook/core-events": "6.0.0-alpha.35", "@storybook/core-events": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"telejson": "^3.2.0" "telejson": "^3.2.0"

View File

@ -170,10 +170,11 @@ export class PostmsgTransport {
? `<span style="color: #FF4785">${event.type}</span>` ? `<span style="color: #FF4785">${event.type}</span>`
: `<span style="color: #FFAE00">${event.type}</span>`; : `<span style="color: #FFAE00">${event.type}</span>`;
event.source = source || getEventSourceUrl(rawEvent); event.source =
source || this.config.page === 'preview' ? rawEvent.origin : getEventSourceUrl(rawEvent);
if (!event.source) { if (!event.source) {
logger.error( pretty.error(
`${pageString} received ${eventString} but was unable to determine the source of the event` `${pageString} received ${eventString} but was unable to determine the source of the event`
); );
@ -195,8 +196,7 @@ export class PostmsgTransport {
} }
const getEventSourceUrl = (event: MessageEvent) => { const getEventSourceUrl = (event: MessageEvent) => {
const frames: HTMLIFrameElement[] = [...document.getElementsByTagName('iframe')]; const frames = [...document.querySelectorAll('iframe[data-is-storybook]')];
// try to find the originating iframe by matching it's contentWindow // try to find the originating iframe by matching it's contentWindow
// This might not be cross-origin safe // This might not be cross-origin safe
const [frame, ...remainder] = frames.filter((element) => { const [frame, ...remainder] = frames.filter((element) => {
@ -217,15 +217,19 @@ const getEventSourceUrl = (event: MessageEvent) => {
return origin === event.origin; return origin === event.origin;
}); });
// If we found multiple matches, there's going to be trouble if (frame && remainder.length === 0) {
if (remainder.length) { const src = frame.getAttribute('src');
console.error('unable to locate origin of postmessage'); const { origin, pathname } = new URL(src, document.location);
return null; return origin + pathname;
} }
const src = frame.getAttribute('src'); if (remainder.length > 0) {
const { origin, pathname } = new URL(src, document.location); // If we found multiple matches, there's going to be trouble
return origin + pathname; logger.error('found multiple candidates for event source');
}
// If we found no frames of matches
return null;
}; };
/** /**

View File

@ -1,6 +1,6 @@
{ {
"name": "@storybook/channel-websocket", "name": "@storybook/channel-websocket",
"version": "6.0.0-alpha.35", "version": "6.0.0-alpha.39",
"description": "", "description": "",
"keywords": [ "keywords": [
"storybook" "storybook"
@ -28,7 +28,7 @@
"prepare": "node ../../scripts/prepare.js" "prepare": "node ../../scripts/prepare.js"
}, },
"dependencies": { "dependencies": {
"@storybook/channels": "6.0.0-alpha.35", "@storybook/channels": "6.0.0-alpha.39",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"telejson": "^3.2.0" "telejson": "^3.2.0"

Some files were not shown because too many files have changed in this diff Show More