Merge branch 'next' into 13336-windows-static-dir

This commit is contained in:
Gert Hengeveld 2020-12-01 19:17:23 +01:00 committed by GitHub
commit 65f521c518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
136 changed files with 5693 additions and 7403 deletions

View File

@ -37,7 +37,9 @@ module.exports = {
{
files: ['**/*.tsx', '**/*.ts'],
rules: {
'react/require-default-props': 'off',
'react/prop-types': 'off', // we should use types
'react/forbid-prop-types': 'off', // we should use types
'no-dupe-class-members': 'off', // this is called overloads in typescript
},
},

View File

@ -1,3 +1,35 @@
## 6.2.0-alpha.1 (December 1, 2020)
### Bug Fixes
- Addon-docs: ArgTypes optional on Meta ([#13352](https://github.com/storybookjs/storybook/pull/13352))
- Composition: Filter out disabled refs in getAutoRefs ([#12863](https://github.com/storybookjs/storybook/pull/12863))
- UI: Add support for expand/collapse keyboard shortcuts ([#12980](https://github.com/storybookjs/storybook/pull/12980))
### Maintenance
- Dependencies: Rebuild yarn.lock ([#13289](https://github.com/storybookjs/storybook/pull/13289))
- Core: Add typescript as optional peer dependency ([#13330](https://github.com/storybookjs/storybook/pull/13330))
### Dependency Upgrades
- Bump wait-on from 4.0.2 to 5.2.0 ([#12835](https://github.com/storybookjs/storybook/pull/12835))
- Bump commander from 5.1.0 to 6.2.0 ([#13148](https://github.com/storybookjs/storybook/pull/13148))
## 6.2.0-alpha.0 (December 1, 2020)
### Bug Fixes
- Addon-docs: Fix type aliases and enum types from Angular Compodoc JSON ([#12665](https://github.com/storybookjs/storybook/pull/12665))
- Core: Ensure node `name` does not contain leading/trailing whitespace ([#13275](https://github.com/storybookjs/storybook/pull/13275))
- Angular: Run setProps in the NgZone ([#12382](https://github.com/storybookjs/storybook/pull/12382))
### Maintenance
- Core: Make @babel/core an optional peer dependency ([#13329](https://github.com/storybookjs/storybook/pull/13329))
- Core: Replace preset-env polyfills with babel-polyfills ([#13055](https://github.com/storybookjs/storybook/pull/13055))
- CLI: use Jest to test CLI commands and remove outdated fixtures ([#12936](https://github.com/storybookjs/storybook/pull/12936))
## 6.1.9 (November 29, 2020)
### Bug Fixes

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "a11y addon for storybook",
"keywords": [
"a11y",
@ -22,13 +22,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -40,14 +33,14 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/channels": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/channels": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"axe-core": "^4.0.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
@ -76,5 +69,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -71,8 +71,8 @@ const Rule: FunctionComponent<RuleProps> = ({ rule }) => {
}
return (
<SizeMe refreshMode="debounce">
{({ size }: { size: { width: number; height: number } }) => (
<Item elementWidth={size.width}>
{({ size }) => (
<Item elementWidth={size.width || 0}>
<StyledBadge status={badgeType}>{formatSeverityText(rule.impact)}</StyledBadge>
<Message>{rule.message}</Message>
</Item>

View File

@ -112,7 +112,7 @@ export const Tabs: React.FC<TabsProps> = ({ tabs }) => {
const highlightLabel = `Highlight results`;
return (
<SizeMe refreshMode="debounce">
{({ size }: { size: any }) => (
{({ size }) => (
<Container>
<List>
<TabsWrapper>
@ -130,7 +130,7 @@ export const Tabs: React.FC<TabsProps> = ({ tabs }) => {
</TabsWrapper>
</List>
{tabs[activeTab].items.length > 0 ? (
<GlobalToggle elementWidth={size.width}>
<GlobalToggle elementWidth={size.width || 0}>
<HighlightToggleLabel htmlFor={highlightToggleId}>
{highlightLabel}
</HighlightToggleLabel>

View File

@ -1,2 +1 @@
declare module 'global';
declare module 'react-sizeme';

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Action Logger addon for storybook",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -35,12 +28,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"fast-deep-equal": "^3.1.1",
"global": "^4.3.2",
@ -51,11 +44,10 @@
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2",
"uuid": "^8.0.0"
"uuid-browser": "^3.1.0"
},
"devDependencies": {
"@types/lodash": "^4.14.150",
"@types/uuid": "^7.0.3",
"@types/webpack-env": "^1.15.3"
},
"peerDependencies": {
@ -73,5 +65,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,4 +1,4 @@
import { v4 as uuidv4 } from 'uuid';
import uuidv4 from 'uuid-browser/v4';
import { addons } from '@storybook/addons';
import { EVENT_ID } from '../constants';
import { ActionDisplay, ActionOptions, HandlerFunction } from '../models';

View File

@ -1,3 +1,4 @@
// TODO: following packages need definition files or a TS migration
declare module 'global';
declare module 'react-inspector';
declare module 'uuid-browser/v4';

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "A storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
@ -21,13 +21,6 @@
"author": "jbaxleyiii",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -39,12 +32,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"memoizerific": "^1.11.3",
@ -70,5 +63,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Controls for component properties",
"keywords": [
"addon",
@ -30,12 +30,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/node-logger": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/node-logger": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"ts-dedent": "^2.0.0"
},
@ -54,5 +54,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-cssresources",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "A storybook addon to switch between css resources at runtime for your story",
"keywords": [
"addon",
@ -21,13 +21,6 @@
"author": "nm123github",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -39,11 +32,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.7"
@ -66,5 +59,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -118,65 +118,65 @@ describe('CSSResourcePanel', () => {
expect(getCurrentParameter).toHaveBeenCalledWith(PARAM_KEY);
});
it('should maintain picked attribute for matching ids', () => {
const getCurrentParameter = jest.fn(() => [
{
...defaultParameters[0],
picked: !defaultParameters[0].picked,
},
]);
const { onStoryChange } = renderWithData({
getCurrentParameter: getCurrentParameter as any,
});
expect(
screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` })
).not.toBeChecked();
getCurrentParameter.mockReturnValueOnce([
{
...defaultParameters[0],
picked: defaultParameters[0].picked,
},
]);
onStoryChange('fake-story-id');
expect(
screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` })
).not.toBeChecked();
});
// it('should maintain picked attribute for matching ids', () => {
// const getCurrentParameter = jest.fn(() => [
// {
// ...defaultParameters[0],
// picked: !defaultParameters[0].picked,
// },
// ]);
// const { onStoryChange } = renderWithData({
// getCurrentParameter: getCurrentParameter as any,
// });
// expect(
// screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` })
// ).not.toBeChecked();
// getCurrentParameter.mockReturnValueOnce([
// {
// ...defaultParameters[0],
// picked: defaultParameters[0].picked,
// },
// ]);
// onStoryChange('fake-story-id');
// expect(
// screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` })
// ).not.toBeChecked();
// });
it('should update the list with new picked items', () => {
renderWithData();
expect(screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` })).toBeChecked();
userEvent.click(screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` }));
expect(
screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` })
).not.toBeChecked();
});
// it('should update the list with new picked items', () => {
// renderWithData();
// expect(screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` })).toBeChecked();
// userEvent.click(screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` }));
// expect(
// screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` })
// ).not.toBeChecked();
// });
it('should call emit method with updated list', () => {
const emit = jest.fn();
renderWithData({ emit });
userEvent.click(screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` }));
expect(emit).toHaveBeenLastCalledWith(EVENTS.SET, []);
});
// it('should call emit method with updated list', () => {
// const emit = jest.fn();
// renderWithData({ emit });
// userEvent.click(screen.getByRole('checkbox', { name: `# ${defaultParameters[0].id}` }));
// expect(emit).toHaveBeenLastCalledWith(EVENTS.SET, []);
// });
it('should not render anything when not active', () => {
const { container } = render(<CssResourcePanel api={mockedApi} active={false} />);
expect(container.firstChild).toBeFalsy();
});
it('should render list items', () => {
renderWithData();
// it('should render list items', () => {
// renderWithData();
defaultParameters.forEach((param) => {
expect(screen.getByText(new RegExp(param.id))).toBeInTheDocument();
const checkbox = screen.getByRole('checkbox', { name: `# ${param.id}` });
if (param.picked) {
expect(checkbox).toBeChecked();
} else {
expect(checkbox).not.toBeChecked();
}
});
});
// defaultParameters.forEach((param) => {
// expect(screen.getByText(new RegExp(param.id))).toBeInTheDocument();
// const checkbox = screen.getByRole('checkbox', { name: `# ${param.id}` });
// if (param.picked) {
// expect(checkbox).toBeChecked();
// } else {
// expect(checkbox).not.toBeChecked();
// }
// });
// });
it('should render code for items with the `hideCode` flag', () => {
const getCurrentParameter = jest.fn(() => [

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-design-assets",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Design asset preview for storybook",
"keywords": [
"addon",
@ -23,13 +23,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -41,12 +34,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.7",
@ -68,5 +61,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Superior documentation for your components",
"keywords": [
"addon",
@ -19,13 +19,6 @@
"license": "MIT",
"main": "dist/public_api.js",
"types": "dist/public_api.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"angular/**/*",
@ -55,18 +48,18 @@
"@mdx-js/loader": "^1.6.19",
"@mdx-js/mdx": "^1.6.19",
"@mdx-js/react": "^1.6.19",
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/csf": "0.0.1",
"@storybook/node-logger": "6.1.9",
"@storybook/postinstall": "6.1.9",
"@storybook/source-loader": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/node-logger": "6.2.0-alpha.1",
"@storybook/postinstall": "6.2.0-alpha.1",
"@storybook/source-loader": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"acorn": "^7.1.0",
"acorn-jsx": "^5.1.0",
"acorn-walk": "^7.0.0",
@ -92,9 +85,9 @@
"@babel/core": "^7.12.3",
"@emotion/core": "^10.1.1",
"@emotion/styled": "^10.0.23",
"@storybook/react": "6.1.9",
"@storybook/vue": "6.1.9",
"@storybook/web-components": "6.1.9",
"@storybook/react": "6.2.0-alpha.1",
"@storybook/vue": "6.2.0-alpha.1",
"@storybook/web-components": "6.2.0-alpha.1",
"@types/cross-spawn": "^6.0.1",
"@types/doctrine": "^0.0.3",
"@types/enzyme": "^3.10.3",
@ -123,7 +116,7 @@
},
"peerDependencies": {
"@babel/core": "^7.11.5",
"@storybook/vue": "6.1.9",
"@storybook/vue": "6.2.0-alpha.1",
"babel-loader": "^8.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
@ -154,5 +147,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -15,7 +15,7 @@ interface MetaProps {
decorators?: [Decorator];
parameters?: Parameters;
args?: Args;
argTypes: ArgTypes;
argTypes?: ArgTypes;
}
function getFirstStoryId(docsContext: DocsContextProps): string {
@ -26,7 +26,6 @@ function getFirstStoryId(docsContext: DocsContextProps): string {
function renderAnchor() {
const context = useContext(DocsContext);
// eslint-disable-next-line react/destructuring-assignment
const anchorId = getFirstStoryId(context) || context.id;
return <Anchor storyId={anchorId} />;

View File

@ -1,5 +1,5 @@
import { extractType } from './compodoc';
import { Decorator } from './types';
import { extractType, setCompodocJson } from './compodoc';
import { CompodocJson, Decorator } from './types';
const makeProperty = (compodocType?: string) => ({
type: compodocType,
@ -8,8 +8,96 @@ const makeProperty = (compodocType?: string) => ({
optional: true,
});
const getDummyCompodocJson = () => {
return {
miscellaneous: {
typealiases: [
{
name: 'EnumAlias',
ctype: 'miscellaneous',
subtype: 'typealias',
rawtype: 'EnumNumeric',
file: 'src/stories/component-with-enums/enums.component.ts',
description: '',
kind: 161,
},
{
name: 'TypeAlias',
ctype: 'miscellaneous',
subtype: 'typealias',
rawtype: '"Type Alias 1" | "Type Alias 2" | "Type Alias 3"',
file: 'src/stories/component-with-enums/enums.component.ts',
description: '',
kind: 168,
},
],
enumerations: [
{
name: 'EnumNumeric',
childs: [
{
name: 'FIRST',
},
{
name: 'SECOND',
},
{
name: 'THIRD',
},
],
ctype: 'miscellaneous',
subtype: 'enum',
description: '<p>Button Priority</p>\n',
file: 'src/stories/component-with-enums/enums.component.ts',
},
{
name: 'EnumNumericInitial',
childs: [
{
name: 'UNO',
value: '1',
},
{
name: 'DOS',
},
{
name: 'TRES',
},
],
ctype: 'miscellaneous',
subtype: 'enum',
description: '',
file: 'src/stories/component-with-enums/enums.component.ts',
},
{
name: 'EnumStringValues',
childs: [
{
name: 'PRIMARY',
value: 'PRIMARY',
},
{
name: 'SECONDARY',
value: 'SECONDARY',
},
{
name: 'TERTIARY',
value: 'TERTIARY',
},
],
ctype: 'miscellaneous',
subtype: 'enum',
description: '',
file: 'src/stories/component-with-enums/enums.component.ts',
},
],
},
} as CompodocJson;
};
describe('extractType', () => {
describe('with compodoc type', () => {
setCompodocJson(getDummyCompodocJson());
it.each([
['string', { name: 'string' }],
['boolean', { name: 'boolean' }],
@ -21,6 +109,10 @@ describe('extractType', () => {
['T[]', { name: 'object' }],
['[]', { name: 'object' }],
['"primary" | "secondary"', { name: 'enum', value: ['primary', 'secondary'] }],
['TypeAlias', { name: 'enum', value: ['Type Alias 1', 'Type Alias 2', 'Type Alias 3'] }],
['EnumNumeric', { name: 'object' }],
['EnumNumericInitial', { name: 'object' }],
['EnumStringValues', { name: 'enum', value: ['PRIMARY', 'SECONDARY', 'TERTIARY'] }],
])('%s', (compodocType, expected) => {
expect(extractType(makeProperty(compodocType), null)).toEqual(expected);
});

View File

@ -25,7 +25,7 @@ export const setCompodocJson = (compodocJson: CompodocJson) => {
};
// @ts-ignore
export const getCompdocJson = (): CompodocJson => window.__STORYBOOK_COMPODOC_JSON__;
export const getCompodocJson = (): CompodocJson => window.__STORYBOOK_COMPODOC_JSON__;
export const checkValidComponentOrDirective = (component: Component | Directive) => {
if (!component.name) {
@ -90,7 +90,7 @@ const getComponentData = (component: Component | Directive) => {
return null;
}
checkValidComponentOrDirective(component);
const compodocJson = getCompdocJson();
const compodocJson = getCompodocJson();
checkValidCompodocJson(compodocJson);
const { name } = component;
const metadata = findComponentByName(name, compodocJson);
@ -113,6 +113,13 @@ const extractTypeFromValue = (defaultValue: any) => {
};
const extractEnumValues = (compodocType: any) => {
const compodocJson = getCompodocJson();
const enumType = compodocJson?.miscellaneous.enumerations.find((x) => x.name === compodocType);
if (enumType?.childs.every((x) => x.value)) {
return enumType.childs.map((x) => x.value);
}
if (typeof compodocType !== 'string' || compodocType.indexOf('|') === -1) {
return null;
}
@ -135,7 +142,8 @@ export const extractType = (property: Property, defaultValue: any) => {
case null:
return { name: 'void' };
default: {
const enumValues = extractEnumValues(compodocType);
const resolvedType = resolveTypealias(compodocType);
const enumValues = extractEnumValues(resolvedType);
return enumValues ? { name: 'enum', value: enumValues } : { name: 'object' };
}
}
@ -152,6 +160,12 @@ const extractDefaultValue = (property: Property) => {
}
};
const resolveTypealias = (compodocType: string): string => {
const compodocJson = getCompodocJson();
const typeAlias = compodocJson?.miscellaneous.typealiases.find((x) => x.name === compodocType);
return typeAlias ? resolveTypealias(typeAlias.rawtype) : compodocType;
};
export const extractArgTypesFromData = (componentData: Class | Directive | Injectable | Pipe) => {
const sectionToItems: Record<string, ArgType[]> = {};
const compodocClasses = ['component', 'directive'].includes(componentData.type)

View File

@ -66,10 +66,40 @@ export interface Decorator {
name: string;
}
export interface TypeAlias {
name: string;
ctype: string;
subtype: string;
rawtype: string;
file: string;
kind: number;
description?: string;
rawdescription?: string;
}
export interface EnumType {
name: string;
childs: EnumTypeChild[];
ctype: string;
subtype: string;
file: string;
description?: string;
rawdescription?: string;
}
export interface EnumTypeChild {
name: string;
value?: string;
}
export interface CompodocJson {
directives: Directive[];
components: Component[];
pipes: Pipe[];
injectables: Injectable[];
classes: Class[];
miscellaneous?: {
typealiases?: TypeAlias[];
enumerations?: EnumType[];
};
}

View File

@ -4,7 +4,7 @@ export interface ElemAProps {
size?: 'a' | 'b' | 'c' | 'd';
}
export const Header: React.SFC<ElemAProps> = ({ size = 'a', children }) => (
export const Header: React.FC<ElemAProps> = ({ size = 'a', children }) => (
<div className={size}>{children}</div>
);
@ -12,7 +12,7 @@ export interface ElemBProps {
size?: 'sm' | 'md' | 'lg';
}
export const Paragraph: React.SFC<ElemBProps> = ({ size, children }) => (
export const Paragraph: React.FC<ElemBProps> = ({ size, children }) => (
<div className={size}>{children}</div>
);

View File

@ -1,8 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`react component properties 9626-js-default-values 1`] = `
"import React from 'react'; // eslint-disable-next-line react/prop-types
"import React from 'react';
export const Tag = ({
title = 'Beta'
}) => /*#__PURE__*/React.createElement(\\"div\\", null, title);

View File

@ -1,5 +1,4 @@
import React from 'react';
// eslint-disable-next-line react/prop-types
export const Tag = ({ title = 'Beta' }) => <div>{title}</div>;
export const component = Tag;

View File

@ -1,4 +1,3 @@
/* eslint-disable react/no-this-in-sfc */
import React from 'react';
import Vue from 'vue';
import { StoryFn, StoryContext } from '@storybook/addons';

View File

@ -48,11 +48,9 @@ function genImportStory(ast, storyDef, storyName, context) {
const statements = [`export const ${storyKey} = ${story};`];
if (storyName) {
// eslint-disable-next-line no-param-reassign
context.storyNameToKey[storyName] = storyKey;
statements.push(`${storyKey}.storyName = '${storyName}';`);
} else {
// eslint-disable-next-line no-param-reassign
context.storyNameToKey[storyKey] = storyKey;
ast.openingElement.attributes.push({
type: 'JSXAttribute',
@ -200,7 +198,6 @@ function genStoryExport(ast, context) {
statements.push(`${storyKey}.loaders = ${loaderCode};`);
}
// eslint-disable-next-line no-param-reassign
context.storyNameToKey[storyName] = storyKey;
return {
@ -218,7 +215,6 @@ function genCanvasExports(ast, context) {
child.value = code;
if (storyExport) {
Object.assign(canvasExports, storyExport);
// eslint-disable-next-line no-param-reassign
context.counter += 1;
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-essentials",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",
@ -19,13 +19,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -35,28 +28,28 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addon-actions": "6.1.9",
"@storybook/addon-backgrounds": "6.1.9",
"@storybook/addon-controls": "6.1.9",
"@storybook/addon-docs": "6.1.9",
"@storybook/addon-toolbars": "6.1.9",
"@storybook/addon-viewport": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/node-logger": "6.1.9",
"@storybook/addon-actions": "6.2.0-alpha.1",
"@storybook/addon-backgrounds": "6.2.0-alpha.1",
"@storybook/addon-controls": "6.2.0-alpha.1",
"@storybook/addon-docs": "6.2.0-alpha.1",
"@storybook/addon-toolbars": "6.2.0-alpha.1",
"@storybook/addon-viewport": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/node-logger": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@storybook/vue": "6.1.9",
"@storybook/vue": "6.2.0-alpha.1",
"@types/jest": "^25.1.1",
"@types/webpack-env": "^1.15.3"
},
"peerDependencies": {
"@babel/core": "^7.9.6",
"@storybook/vue": "6.1.9",
"@storybook/vue": "6.2.0-alpha.1",
"babel-loader": "^8.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
@ -79,5 +72,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-events",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Add events to your Storybook stories.",
"keywords": [
"addon",
@ -20,13 +20,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -38,11 +31,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"format-json": "^1.0.3",
"lodash": "^4.17.15",
@ -69,5 +62,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-google-analytics",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook addon for google analytics",
"keywords": [
"addon",
@ -20,8 +20,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"react-ga": "^2.5.7",
@ -42,5 +42,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-graphql",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook addon to display the GraphiQL IDE",
"keywords": [
"addon",
@ -18,13 +18,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -38,8 +31,8 @@
"dependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-transform-classes": "^7.12.1",
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@types/webpack": "^4.41.24",
"babel-loader": "^8.0.6",
"core-js": "^3.0.1",
@ -65,5 +58,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
@ -24,13 +24,6 @@
"author": "Renaud Tertrais <renaud.tertrais@gmail.com> (https://github.com/renaudtertrais)",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -42,11 +35,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"react-sizeme": "^2.5.2",
@ -71,5 +64,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,3 +1,4 @@
/* eslint-disable react/default-props-match-prop-types */
import React, { Fragment } from 'react';
import { styled, themes, convert } from '@storybook/theming';
import { ScrollArea, TabsState, Link, Placeholder } from '@storybook/components';

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-knobs",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook Addon Prop Editor Component",
"keywords": [
"addon",
@ -18,13 +18,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -36,13 +29,13 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/channels": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/channels": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"copy-to-clipboard": "^3.0.8",
"core-js": "^3.0.1",
"escape-html": "^1.0.3",
@ -80,5 +73,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Story Links addon for storybook",
"keywords": [
"addon",
@ -18,13 +18,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -36,11 +29,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/csf": "0.0.1",
"@storybook/router": "6.1.9",
"@storybook/router": "6.2.0-alpha.1",
"@types/qs": "^6.9.0",
"core-js": "^3.0.1",
"global": "^4.3.2",
@ -67,5 +60,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-queryparams",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "parameter addon for storybook",
"keywords": [
"addon",
@ -19,13 +19,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -37,12 +30,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"qs": "^6.6.0",
@ -67,5 +60,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
"keywords": [
"addon",
@ -18,13 +18,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -40,9 +33,9 @@
},
"dependencies": {
"@jest/transform": "^26.0.0",
"@storybook/addons": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@types/glob": "^7.1.1",
"@types/jest": "^25.1.1",
"@types/jest-specific-snapshot": "^0.5.3",
@ -58,8 +51,8 @@
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/addon-docs": "6.1.9",
"@storybook/react": "6.1.9",
"@storybook/addon-docs": "6.2.0-alpha.1",
"@storybook/react": "6.2.0-alpha.1",
"babel-loader": "^8.0.6",
"enzyme": "^3.11.0",
"enzyme-to-json": "^3.4.1",
@ -98,5 +91,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots-puppeteer",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Image snapshots addition to StoryShots based on puppeteer",
"keywords": [
"addon",
@ -18,13 +18,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -37,7 +30,7 @@
},
"dependencies": {
"@storybook/csf": "0.0.1",
"@storybook/node-logger": "6.1.9",
"@storybook/node-logger": "6.2.0-alpha.1",
"@types/jest-image-snapshot": "^2.8.0",
"@wordpress/jest-puppeteer-axe": "^1.5.0",
"core-js": "^3.0.1",
@ -49,7 +42,7 @@
"@types/puppeteer": "^2.0.0"
},
"peerDependencies": {
"@storybook/addon-storyshots": "6.1.9",
"@storybook/addon-storyshots": "6.2.0-alpha.1",
"puppeteer": "^2.0.0 || ^3.0.0"
},
"peerDependenciesMeta": {
@ -60,5 +53,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Stories addon for storybook",
"keywords": [
"addon",
@ -18,13 +18,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -36,13 +29,13 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/router": "6.1.9",
"@storybook/source-loader": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/router": "6.2.0-alpha.1",
"@storybook/source-loader": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"estraverse": "^4.2.0",
"loader-utils": "^2.0.0",
@ -70,5 +63,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-toolbars",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook toolbars addon",
"keywords": [
"addon",
@ -30,10 +30,10 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"core-js": "^3.0.1"
},
"peerDependencies": {
@ -51,5 +51,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-viewport",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook addon to change the viewport size to mobile",
"keywords": [
"addon",
@ -18,13 +18,6 @@
"license": "MIT",
"main": "dist/preview.js",
"types": "dist/preview.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -36,12 +29,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"memoizerific": "^1.11.3",
@ -63,5 +56,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/angular",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -41,9 +34,9 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/node-logger": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@storybook/node-logger": "6.2.0-alpha.1",
"@types/webpack-env": "^1.15.3",
"autoprefixer": "^9.7.6",
"core-js": "^3.0.1",
@ -93,5 +86,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,10 +1,10 @@
// @ts-ignore
import { document } from 'global';
import { enableProdMode, NgModule, Component, NgModuleRef, Type } from '@angular/core';
import { enableProdMode, NgModule, Component, NgModuleRef, Type, NgZone } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BrowserModule } from '@angular/platform-browser';
import { ReplaySubject } from 'rxjs';
import { Observable, ReplaySubject, Subscriber } from 'rxjs';
import { StoryFn } from '@storybook/addons';
import { AppComponent } from './components/app.component';
import { STORY } from './app.token';
@ -18,13 +18,34 @@ declare global {
let platform: any = null;
let promises: Promise<NgModuleRef<any>>[] = [];
let storyData = new ReplaySubject(1);
let storyData = new ReplaySubject<StoryFnAngularReturnType>(1);
const moduleClass = class DynamicModule {};
const componentClass = class DynamicComponent {};
type DynamicComponentType = typeof componentClass;
function storyDataFactory<T>(data: Observable<T>) {
return (ngZone: NgZone) =>
new Observable((subscriber: Subscriber<T>) => {
const sub = data.subscribe(
(v: T) => {
ngZone.run(() => subscriber.next(v));
},
(err) => {
ngZone.run(() => subscriber.error(err));
},
() => {
ngZone.run(() => subscriber.complete());
}
);
return () => {
sub.unsubscribe();
};
});
}
const getModule = (
declarations: (Type<any> | any[])[],
entryComponents: (Type<any> | any[])[],
@ -34,13 +55,16 @@ const getModule = (
) => {
// Complete last ReplaySubject and create a new one for the current module
storyData.complete();
storyData = new ReplaySubject(1);
storyData = new ReplaySubject<StoryFnAngularReturnType>(1);
storyData.next(data);
const moduleMeta = {
declarations: [...declarations, ...(moduleMetadata.declarations || [])],
imports: [BrowserModule, FormsModule, ...(moduleMetadata.imports || [])],
providers: [{ provide: STORY, useValue: storyData }, ...(moduleMetadata.providers || [])],
providers: [
{ provide: STORY, useFactory: storyDataFactory(storyData.asObservable()), deps: [NgZone] },
...(moduleMetadata.providers || []),
],
entryComponents: [...entryComponents, ...(moduleMetadata.entryComponents || [])],
schemas: [...(moduleMetadata.schemas || [])],
bootstrap: [...bootstrap],

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/aurelia",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Aurelia: Develop Aurelia Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -27,10 +27,10 @@
},
"dependencies": {
"@aurelia/webpack-loader": "^0.7.0",
"@storybook/addon-knobs": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/node-logger": "6.1.9",
"@storybook/addon-knobs": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@storybook/node-logger": "6.2.0-alpha.1",
"fork-ts-checker-webpack-plugin": "^4.0.3",
"global": "^4.3.2",
"react": "16.13.1",
@ -60,5 +60,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/ember",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
"homepage": "https://github.com/storybookjs/storybook/tree/master/app/ember",
"bugs": {
@ -14,13 +14,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"jsnext:main": "src/client/index.js",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -39,7 +32,7 @@
},
"dependencies": {
"@ember/test-helpers": "^1.7.0",
"@storybook/core": "6.1.9",
"@storybook/core": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"react": "16.13.1",
@ -59,5 +52,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -41,9 +34,9 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@types/webpack-env": "^1.15.3",
"core-js": "^3.0.1",
"global": "^4.3.2",
@ -62,5 +55,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/marionette",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Marionette: Develop Marionette.js component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -25,7 +25,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "6.1.9",
"@storybook/core": "6.2.0-alpha.1",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",
@ -49,5 +49,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/marko",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Marko: Develop Marko Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -16,13 +16,6 @@
},
"license": "MIT",
"main": "dist/client/index.js",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -41,8 +34,8 @@
},
"dependencies": {
"@marko/webpack": "^6.2.8",
"@storybook/client-logger": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"react": "16.13.1",
@ -61,5 +54,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/mithril",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Mithril: Develop Mithril Component in isolation.",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -43,8 +36,8 @@
"dependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-transform-react-jsx": "^7.12.1",
"@storybook/addons": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@types/mithril": "^2.0.0",
"@types/webpack-env": "^1.15.3",
"core-js": "^3.0.1",
@ -67,5 +60,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Preact: Develop Preact Component in isolation.",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -42,8 +35,8 @@
},
"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.12.1",
"@storybook/addons": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@types/webpack-env": "^1.15.3",
"core-js": "^3.0.1",
"global": "^4.3.2",
@ -65,5 +58,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/rax",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Rax: Develop Rax Component in isolation.",
"keywords": [
"rax",
@ -17,13 +17,6 @@
},
"license": "MIT",
"main": "dist/client/index.js",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -41,7 +34,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "6.1.9",
"@storybook/core": "6.2.0-alpha.1",
"babel-preset-rax": "^1.0.0-beta.0",
"core-js": "^3.0.1",
"driver-dom": "^2.0.0",
@ -61,5 +54,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -17,6 +17,16 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"types-6-0": [
"ts3.4/dist/client/preview/types-6-0.d.ts"
],
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -38,9 +48,9 @@
"@babel/preset-flow": "^7.12.1",
"@babel/preset-react": "^7.12.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.2",
"@storybook/addons": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/node-logger": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@storybook/node-logger": "6.2.0-alpha.1",
"@storybook/semver": "^7.3.2",
"@types/webpack-env": "^1.15.3",
"babel-plugin-add-react-displayname": "^0.0.5",
@ -58,7 +68,7 @@
"webpack": "^4.44.2"
},
"devDependencies": {
"@storybook/client-api": "6.1.9",
"@storybook/client-api": "6.2.0-alpha.1",
"@types/node": "^14.0.10",
"@types/webpack": "^4.41.24"
},
@ -67,21 +77,19 @@
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"peerDependenciesMeta": {
"@babel/core": {
"optional": true
},
"typescript": {
"optional": true
}
},
"engines": {
"node": ">=8.0.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4",
"typesVersions": {
"<3.8": {
"types-6-0": [
"ts3.4/dist/client/preview/types-6-0.d.ts"
],
"*": [
"ts3.4/*"
]
}
}
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -73,6 +73,6 @@ export async function webpackFinal(config: Configuration, options: StorybookOpti
return {
...config,
plugins: [...(config.plugins || []), new ReactRefreshWebpackPlugin()],
plugins: [...config.plugins, new ReactRefreshWebpackPlugin()],
};
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/riot",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for riot.js: View riot snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -16,13 +16,6 @@
},
"license": "MIT",
"main": "dist/client/index.js",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -41,7 +34,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "6.1.9",
"@storybook/core": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"raw-loader": "^4.0.1",
@ -70,5 +63,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/server",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -41,11 +34,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/node-logger": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@storybook/node-logger": "6.2.0-alpha.1",
"@types/webpack-env": "^1.15.3",
"core-js": "^3.0.1",
"global": "^4.3.2",
@ -64,5 +57,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -41,8 +34,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"react": "16.13.1",
@ -67,5 +60,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -41,8 +34,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@types/webpack-env": "^1.15.3",
"core-js": "^3.0.1",
"global": "^4.3.2",
@ -77,5 +70,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/web-components",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
"keywords": [
"lit-html",
@ -19,13 +19,6 @@
"license": "MIT",
"main": "dist/client/index.js",
"types": "dist/client/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"bin": {
"build-storybook": "./bin/build.js",
"start-storybook": "./bin/index.js",
@ -46,9 +39,9 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/preset-env": "^7.12.1",
"@storybook/addons": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/core": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/core": "6.2.0-alpha.1",
"@types/webpack-env": "^1.15.3",
"babel-plugin-bundled-import-meta": "^0.3.1",
"core-js": "^3.0.1",
@ -72,5 +65,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-decorator",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "decorator addon for storybook",
"keywords": [
"addon",
@ -20,24 +20,24 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/client-api": "6.1.9",
"core-js": "^3.0.1",
"global": "^4.4.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
},
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.4.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-parameter",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "parameter addon for storybook",
"keywords": [
"addon",
@ -20,16 +20,23 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"react": "^16.8.0 || ^17.0.0",
@ -38,12 +45,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-preview-wrapper",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "preview wrapper addon for storybook",
"keywords": [
"addon",
@ -20,22 +20,22 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"react": "^16.8.0 || ^17.0.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
},
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.2.0-alpha.1",
"react": "^16.8.0 || ^17.0.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-roundtrip",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "roundtrip addon for storybook",
"keywords": [
"addon",
@ -20,17 +20,24 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"react": "^16.8.0 || ^17.0.0",
@ -39,12 +46,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b"
}

View File

@ -14,7 +14,7 @@ We have added ES2016 support with Babel for transpiling your JS code.
In addition to that, we've added a few additional features, like object spreading and async await.
Check out our [source](https://github.com/storybookjs/storybook/blob/master/lib/core/src/server/common/babel.js) to learn more about these plugins.
Check out our [source](https://github.com/storybookjs/storybook/blob/master/lib/core/src/server/common/babel.ts) to learn more about these plugins.
### Custom config file

View File

@ -4,7 +4,7 @@
import React from 'react';
import { Button, ButtonProps } from './Button';
export const Primary: React.SFC<{}> = () => <Button primary>Button</Button>;
export const Primary: React.VFC<{}> = () => <Button primary>Button</Button>;
Primary.storyName='I am the primary';
```
```

View File

@ -1,8 +1,8 @@
```ts
// Button.stories.tsx
export const Primary: React.SFC<{}> = () => <Button background="#ff0" label="Button" />;
export const Secondary : React.SFC<{}> = () => <Button background="#ff0" label="😄👍😍💯" />;
export const Tertiary: React.SFC<{}> = () => <Button background="#ff0" label="📚📕📈🤓" />;
export const Primary: React.VFC<{}> = () => <Button background="#ff0" label="Button" />;
export const Secondary: React.VFC<{}> = () => <Button background="#ff0" label="😄👍😍💯" />;
export const Tertiary: React.VFC<{}> = () => <Button background="#ff0" label="📚📕📈🤓" />;
```

View File

@ -4,5 +4,5 @@
import React from 'react';
import { Button } from './Button';
export const Primary: React.SFC<{}> = () => <Button primary>Button</Button>;
export const Primary: React.VFC<{}> = () => <Button primary>Button</Button>;
```

View File

@ -1 +1 @@
{"version":"6.1.0-rc.6","info":{"plain":"### Bug Fixes\n\n- Core: Fix using cached manager on the 2nd run ([#13165](https://github.com/storybookjs/storybook/pull/13165))\n- Addon-docs: Fix Preview scaling with transform instead of zoom ([#12845](https://github.com/storybookjs/storybook/pull/12845))"}}
{"version":"6.2.0-alpha.1","info":{"plain":"### Bug Fixes\n\n- Addon-docs: ArgTypes optional on Meta ([#13352](https://github.com/storybookjs/storybook/pull/13352))\n- Composition: Filter out disabled refs in getAutoRefs ([#12863](https://github.com/storybookjs/storybook/pull/12863))\n- UI: Add support for expand/collapse keyboard shortcuts ([#12980](https://github.com/storybookjs/storybook/pull/12980))\n\n### Maintenance\n\n- Dependencies: Rebuild yarn.lock ([#13289](https://github.com/storybookjs/storybook/pull/13289))\n- Core: Add typescript as optional peer dependency ([#13330](https://github.com/storybookjs/storybook/pull/13330))\n\n### Dependency Upgrades\n\n- Bump wait-on from 4.0.2 to 5.2.0 ([#12835](https://github.com/storybookjs/storybook/pull/12835))\n- Bump commander from 5.1.0 to 6.2.0 ([#13148](https://github.com/storybookjs/storybook/pull/13148))"}}

View File

@ -1,6 +1,6 @@
{
"name": "angular-cli",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"license": "MIT",
"scripts": {
@ -37,19 +37,19 @@
"@angular/cli": "^11.0.1",
"@angular/compiler-cli": "^11.0.0",
"@compodoc/compodoc": "^1.1.11",
"@storybook/addon-a11y": "6.1.9",
"@storybook/addon-actions": "6.1.9",
"@storybook/addon-backgrounds": "6.1.9",
"@storybook/addon-controls": "6.1.9",
"@storybook/addon-docs": "6.1.9",
"@storybook/addon-jest": "6.1.9",
"@storybook/addon-knobs": "6.1.9",
"@storybook/addon-links": "6.1.9",
"@storybook/addon-storyshots": "6.1.9",
"@storybook/addon-storysource": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/angular": "6.1.9",
"@storybook/source-loader": "6.1.9",
"@storybook/addon-a11y": "6.2.0-alpha.1",
"@storybook/addon-actions": "6.2.0-alpha.1",
"@storybook/addon-backgrounds": "6.2.0-alpha.1",
"@storybook/addon-controls": "6.2.0-alpha.1",
"@storybook/addon-docs": "6.2.0-alpha.1",
"@storybook/addon-jest": "6.2.0-alpha.1",
"@storybook/addon-knobs": "6.2.0-alpha.1",
"@storybook/addon-links": "6.2.0-alpha.1",
"@storybook/addon-storyshots": "6.2.0-alpha.1",
"@storybook/addon-storysource": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/angular": "6.2.0-alpha.1",
"@storybook/source-loader": "6.2.0-alpha.1",
"@types/core-js": "^2.5.0",
"@types/jest": "^25.1.1",
"@types/node": "^14.0.10",

View File

@ -0,0 +1,32 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Storyshots Enum Types Basic 1`] = `
<storybook-dynamic-app-root
cfr={[Function CodegenComponentFactoryResolver]}
data={[Function Object]}
target={[Function ViewContainerRef_]}
>
<app-enums>
<div>
<div>
unionType: union a
</div>
<div>
aliasedUnionType: Type Alias 1
</div>
<div>
enumNumeric:
</div>
<div>
enumNumericInitial: 1
</div>
<div>
enumStrings: PRIMARY
</div>
<div>
enumAlias:
</div>
</div>
</app-enums>
</storybook-dynamic-app-root>
`;

View File

@ -0,0 +1,8 @@
<div>
<div>unionType: {{ unionType }}</div>
<div>aliasedUnionType: {{ aliasedUnionType }}</div>
<div>enumNumeric: {{ enumNumeric }}</div>
<div>enumNumericInitial: {{ enumNumericInitial }}</div>
<div>enumStrings: {{ enumStrings }}</div>
<div>enumAlias: {{ enumAlias }}</div>
</div>

View File

@ -0,0 +1,25 @@
import { Story, Meta } from '@storybook/angular';
import {
EnumsComponent,
EnumNumeric,
EnumNumericInitial,
EnumStringValues,
} from './enums.component';
export default {
title: 'Enum Types',
component: EnumsComponent,
} as Meta;
export const Basic: Story = (args) => ({
component: EnumsComponent,
props: args,
});
Basic.args = {
unionType: 'union a',
aliasedUnionType: 'Type Alias 1',
enumNumeric: EnumNumeric.FIRST,
enumNumericInitial: EnumNumericInitial.UNO,
enumStrings: EnumStringValues.PRIMARY,
enumAlias: EnumNumeric.FIRST,
};

View File

@ -0,0 +1,53 @@
import { Component, Input } from '@angular/core';
/**
* This component is used for testing the various forms of enum types
*/
@Component({
selector: 'app-enums',
templateUrl: './enums.component.html',
})
export class EnumsComponent {
/** Union Type of string literals */
@Input() unionType: 'Union A' | 'Union B' | 'Union C';
/** Union Type assigned as a Type Alias */
@Input() aliasedUnionType: TypeAlias;
/** Base Enum Type with no assigned values */
@Input() enumNumeric: EnumNumeric;
/** Enum with initial numeric value and auto-incrementing subsequent values */
@Input() enumNumericInitial: EnumNumericInitial;
/** Enum with string values */
@Input() enumStrings: EnumStringValues;
/** Type Aliased Enum Type */
@Input() enumAlias: EnumAlias;
}
/**
* Button Priority
*/
export enum EnumNumeric {
FIRST,
SECOND,
THIRD,
}
export enum EnumNumericInitial {
UNO = 1,
DOS,
TRES,
}
export enum EnumStringValues {
PRIMARY = 'PRIMARY',
SECONDARY = 'SECONDARY',
TERTIARY = 'TERTIARY',
}
export type EnumAlias = EnumNumeric;
type TypeAlias = 'Type Alias 1' | 'Type Alias 2' | 'Type Alias 3';

View File

@ -1,6 +1,6 @@
{
"name": "aurelia-kitchen-sink",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"description": "An Aurelia client application.",
"repository": {
@ -22,18 +22,18 @@
},
"devDependencies": {
"@aurelia/webpack-loader": "^0.7.0",
"@storybook/addon-a11y": "6.1.9",
"@storybook/addon-actions": "6.1.9",
"@storybook/addon-backgrounds": "6.1.9",
"@storybook/addon-docs": "6.1.9",
"@storybook/addon-jest": "6.1.9",
"@storybook/addon-knobs": "6.1.9",
"@storybook/addon-links": "6.1.9",
"@storybook/addon-storyshots": "6.1.9",
"@storybook/addon-storysource": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/aurelia": "6.1.9",
"@storybook/source-loader": "6.1.9",
"@storybook/addon-a11y": "6.2.0-alpha.1",
"@storybook/addon-actions": "6.2.0-alpha.1",
"@storybook/addon-backgrounds": "6.2.0-alpha.1",
"@storybook/addon-docs": "6.2.0-alpha.1",
"@storybook/addon-jest": "6.2.0-alpha.1",
"@storybook/addon-knobs": "6.2.0-alpha.1",
"@storybook/addon-links": "6.2.0-alpha.1",
"@storybook/addon-storyshots": "6.2.0-alpha.1",
"@storybook/addon-storysource": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/aurelia": "6.2.0-alpha.1",
"@storybook/source-loader": "6.2.0-alpha.1",
"@types/node": "^14.0.10",
"css-loader": "^3.0.0",
"file-loader": "^4.2.0",

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "cra-ts-essentials",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"scripts": {
"build": "react-scripts build",
@ -34,10 +34,10 @@
"typescript": "^3.9.3"
},
"devDependencies": {
"@storybook/addon-essentials": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/addon-essentials": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/preset-create-react-app": "^3.1.5",
"@storybook/react": "6.1.9"
"@storybook/react": "6.2.0-alpha.1"
},
"storybook": {
"chromatic": {

View File

@ -1,6 +1,6 @@
{
"name": "cra-ts-kitchen-sink",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"scripts": {
"build": "react-scripts build",
@ -34,14 +34,14 @@
"typescript": "^3.9.3"
},
"devDependencies": {
"@storybook/addon-a11y": "6.1.9",
"@storybook/addon-actions": "6.1.9",
"@storybook/addon-docs": "6.1.9",
"@storybook/addon-knobs": "6.1.9",
"@storybook/addon-links": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/addon-a11y": "6.2.0-alpha.1",
"@storybook/addon-actions": "6.2.0-alpha.1",
"@storybook/addon-docs": "6.2.0-alpha.1",
"@storybook/addon-knobs": "6.2.0-alpha.1",
"@storybook/addon-links": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/preset-create-react-app": "^3.1.5",
"@storybook/react": "6.1.9",
"@storybook/react": "6.2.0-alpha.1",
"@types/enzyme": "^3.9.0",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.9.1",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/example-devkits",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"scripts": {
"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 ./"
},
"devDependencies": {
"@storybook/addon-decorator": "6.1.9",
"@storybook/addon-parameter": "6.1.9",
"@storybook/addon-preview-wrapper": "6.1.9",
"@storybook/addon-roundtrip": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/api": "6.1.9",
"@storybook/client-api": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/node-logger": "6.1.9",
"@storybook/react": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/addon-decorator": "6.2.0-alpha.1",
"@storybook/addon-parameter": "6.2.0-alpha.1",
"@storybook/addon-preview-wrapper": "6.2.0-alpha.1",
"@storybook/addon-roundtrip": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/client-api": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/node-logger": "6.2.0-alpha.1",
"@storybook/react": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"cors": "^2.8.5",
"cross-env": "^7.0.0",
"enzyme-to-json": "^3.4.1",

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
/* eslint-disable react/require-default-props, react/no-unused-prop-types */
// @flow
import React from 'react';

View File

@ -1,3 +1,4 @@
/* eslint-disable react/forbid-prop-types */
import React from 'react';
import PropTypes from 'prop-types';

View File

@ -1,6 +1,6 @@
{
"name": "official-storybook",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"scripts": {
"build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./",
@ -14,33 +14,33 @@
},
"devDependencies": {
"@packtracker/webpack-plugin": "^2.0.1",
"@storybook/addon-a11y": "6.1.9",
"@storybook/addon-actions": "6.1.9",
"@storybook/addon-backgrounds": "6.1.9",
"@storybook/addon-controls": "6.1.9",
"@storybook/addon-cssresources": "6.1.9",
"@storybook/addon-design-assets": "6.1.9",
"@storybook/addon-docs": "6.1.9",
"@storybook/addon-events": "6.1.9",
"@storybook/addon-graphql": "6.1.9",
"@storybook/addon-jest": "6.1.9",
"@storybook/addon-knobs": "6.1.9",
"@storybook/addon-links": "6.1.9",
"@storybook/addon-queryparams": "6.1.9",
"@storybook/addon-storyshots": "6.1.9",
"@storybook/addon-storyshots-puppeteer": "6.1.9",
"@storybook/addon-storysource": "6.1.9",
"@storybook/addon-toolbars": "6.1.9",
"@storybook/addon-viewport": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/cli": "6.1.9",
"@storybook/components": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/addon-a11y": "6.2.0-alpha.1",
"@storybook/addon-actions": "6.2.0-alpha.1",
"@storybook/addon-backgrounds": "6.2.0-alpha.1",
"@storybook/addon-controls": "6.2.0-alpha.1",
"@storybook/addon-cssresources": "6.2.0-alpha.1",
"@storybook/addon-design-assets": "6.2.0-alpha.1",
"@storybook/addon-docs": "6.2.0-alpha.1",
"@storybook/addon-events": "6.2.0-alpha.1",
"@storybook/addon-graphql": "6.2.0-alpha.1",
"@storybook/addon-jest": "6.2.0-alpha.1",
"@storybook/addon-knobs": "6.2.0-alpha.1",
"@storybook/addon-links": "6.2.0-alpha.1",
"@storybook/addon-queryparams": "6.2.0-alpha.1",
"@storybook/addon-storyshots": "6.2.0-alpha.1",
"@storybook/addon-storyshots-puppeteer": "6.2.0-alpha.1",
"@storybook/addon-storysource": "6.2.0-alpha.1",
"@storybook/addon-toolbars": "6.2.0-alpha.1",
"@storybook/addon-viewport": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/cli": "6.2.0-alpha.1",
"@storybook/components": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/design-system": "^5.1.0",
"@storybook/node-logger": "6.1.9",
"@storybook/react": "6.1.9",
"@storybook/source-loader": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/node-logger": "6.2.0-alpha.1",
"@storybook/react": "6.2.0-alpha.1",
"@storybook/source-loader": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"chromatic": "^5.0.0",
"cors": "^2.8.5",
"cross-env": "^7.0.0",

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/example-react-ts",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"scripts": {
"build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./",
@ -8,9 +8,9 @@
"storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./"
},
"dependencies": {
"@storybook/addon-controls": "6.1.9",
"@storybook/addon-essentials": "6.1.9",
"@storybook/react": "6.1.9",
"@storybook/addon-controls": "6.2.0-alpha.1",
"@storybook/addon-essentials": "6.2.0-alpha.1",
"@storybook/react": "6.2.0-alpha.1",
"@types/react": "^16.9.35",
"@types/react-dom": "^16.9.8",
"prop-types": "15.7.2",

View File

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

View File

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

View File

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

View File

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

View File

@ -14,15 +14,13 @@ exports[`Storyshots Addon/Links Go to welcome view 1`] = `
<button
class="link"
>
Return to the
Return to the
<code
class="code"
>
Welcome
</code>
view story.
</button>
</div>
</section>

View File

@ -13,15 +13,12 @@ exports[`Storyshots Welcome Welcome 1`] = `
<p>
This is a UI component dev environment for your svelte app.
This is a UI component dev environment for your svelte app.
</p>
<p>
We've added some basic stories inside the
We've added some basic stories inside the
<code
class="code svelte-5n9a95"
>
@ -35,7 +32,6 @@ exports[`Storyshots Welcome Welcome 1`] = `
and represents a single state of one or more UI components.
You can have as many stories as you want.
</p>
@ -49,8 +45,7 @@ exports[`Storyshots Welcome Welcome 1`] = `
<p>
Just like that, you can add your own components as stories.
Just like that, you can add your own components as stories.
You can also edit those components and see changes right away.
<br />
@ -69,13 +64,11 @@ exports[`Storyshots Welcome Welcome 1`] = `
src/stories/views/Welcome.svelte
</code>
.)
</p>
<p>
Usually we create stories with smaller UI components in the app.
Usually we create stories with smaller UI components in the app.
<br />
Have a look at the
@ -89,7 +82,6 @@ exports[`Storyshots Welcome Welcome 1`] = `
</a>
section in our documentation.
</p>
@ -113,7 +105,6 @@ exports[`Storyshots Welcome Welcome 1`] = `
to add webpack
loaders and plugins you are using in this project.
</p>
</div>
</section>

View File

@ -1,6 +1,6 @@
{
"name": "vue-cli-example",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"scripts": {
"build": "vue-cli-service build",
@ -15,11 +15,11 @@
"vue-property-decorator": "^9.0.0"
},
"devDependencies": {
"@storybook/addon-controls": "6.1.9",
"@storybook/addon-essentials": "6.1.9",
"@storybook/addon-controls": "6.2.0-alpha.1",
"@storybook/addon-essentials": "6.2.0-alpha.1",
"@storybook/preset-scss": "^1.0.2",
"@storybook/source-loader": "6.1.9",
"@storybook/vue": "6.1.9",
"@storybook/source-loader": "6.2.0-alpha.1",
"@storybook/vue": "6.2.0-alpha.1",
"@vue/cli-plugin-babel": "~4.3.0",
"@vue/cli-plugin-typescript": "~4.3.0",
"@vue/cli-service": "~4.3.0",

View File

@ -1,6 +1,6 @@
{
"name": "vue-example",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"private": true,
"scripts": {
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
@ -14,19 +14,19 @@
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@storybook/addon-a11y": "6.1.9",
"@storybook/addon-actions": "6.1.9",
"@storybook/addon-backgrounds": "6.1.9",
"@storybook/addon-controls": "6.1.9",
"@storybook/addon-docs": "6.1.9",
"@storybook/addon-knobs": "6.1.9",
"@storybook/addon-links": "6.1.9",
"@storybook/addon-storyshots": "6.1.9",
"@storybook/addon-storysource": "6.1.9",
"@storybook/addon-viewport": "6.1.9",
"@storybook/addons": "6.1.9",
"@storybook/source-loader": "6.1.9",
"@storybook/vue": "6.1.9",
"@storybook/addon-a11y": "6.2.0-alpha.1",
"@storybook/addon-actions": "6.2.0-alpha.1",
"@storybook/addon-backgrounds": "6.2.0-alpha.1",
"@storybook/addon-controls": "6.2.0-alpha.1",
"@storybook/addon-docs": "6.2.0-alpha.1",
"@storybook/addon-knobs": "6.2.0-alpha.1",
"@storybook/addon-links": "6.2.0-alpha.1",
"@storybook/addon-storyshots": "6.2.0-alpha.1",
"@storybook/addon-storysource": "6.2.0-alpha.1",
"@storybook/addon-viewport": "6.2.0-alpha.1",
"@storybook/addons": "6.2.0-alpha.1",
"@storybook/source-loader": "6.2.0-alpha.1",
"@storybook/vue": "6.2.0-alpha.1",
"@vue/babel-preset-jsx": "^1.1.2",
"babel-loader": "^8.0.5",
"cross-env": "^7.0.0",

View File

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

View File

@ -2,5 +2,5 @@
"npmClient": "yarn",
"useWorkspaces": true,
"registry": "https://registry.npmjs.org",
"version": "6.1.9"
"version": "6.2.0-alpha.1"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addons",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Storybook addons store",
"keywords": [
"storybook"
@ -17,13 +17,6 @@
"license": "MIT",
"main": "dist/public_api.js",
"types": "dist/public_api.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -35,12 +28,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/api": "6.1.9",
"@storybook/channels": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/router": "6.1.9",
"@storybook/theming": "6.1.9",
"@storybook/api": "6.2.0-alpha.1",
"@storybook/channels": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/router": "6.2.0-alpha.1",
"@storybook/theming": "6.2.0-alpha.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.7"
@ -52,5 +45,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/api",
"version": "6.1.9",
"version": "6.2.0-alpha.1",
"description": "Core Storybook API & Context",
"keywords": [
"storybook"
@ -16,13 +16,6 @@
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"README.md",
@ -36,13 +29,13 @@
},
"dependencies": {
"@reach/router": "^1.3.3",
"@storybook/channels": "6.1.9",
"@storybook/client-logger": "6.1.9",
"@storybook/core-events": "6.1.9",
"@storybook/channels": "6.2.0-alpha.1",
"@storybook/client-logger": "6.2.0-alpha.1",
"@storybook/core-events": "6.2.0-alpha.1",
"@storybook/csf": "0.0.1",
"@storybook/router": "6.1.9",
"@storybook/router": "6.2.0-alpha.1",
"@storybook/semver": "^7.3.2",
"@storybook/theming": "6.1.9",
"@storybook/theming": "6.2.0-alpha.1",
"@types/reach__router": "^1.3.5",
"core-js": "^3.0.1",
"fast-deep-equal": "^3.1.1",
@ -68,5 +61,12 @@
"publishConfig": {
"access": "public"
},
"gitHead": "495a468d5eccaac706b6b8b52e9dbc5a484027a4"
"gitHead": "211db5358500cb71c73d6183e86f40df1638752b",
"typesVersions": {
"<3.8": {
"*": [
"ts3.4/*"
]
}
}
}

View File

@ -117,14 +117,6 @@ const warnChangedDefaultHierarchySeparators = deprecate(
`
);
const toKey = (input: string) =>
input.replace(/[^a-z0-9]+([a-z0-9])/gi, (...params) => params[1].toUpperCase());
const toGroup = (name: string) => ({
name,
id: toKey(name),
});
export const denormalizeStoryParameters = ({
globalParameters,
kindParameters,
@ -144,103 +136,89 @@ export const transformStoriesRawToStoriesHash = (
input: StoriesRaw,
{ provider }: { provider: Provider }
): StoriesHash => {
const anyKindMatchesOldHierarchySeparators = Object.values(input)
.filter(Boolean)
.some(({ kind }) => kind.match(/\.|\|/));
const values = Object.values(input).filter(Boolean);
const usesOldHierarchySeparator = values.some(({ kind }) => kind.match(/\.|\|/)); // dot or pipe
const storiesHashOutOfOrder = Object.values(input)
.filter(Boolean)
.reduce((acc, item) => {
const { kind, parameters } = item;
const { showRoots } = provider.getConfig();
const storiesHashOutOfOrder = values.reduce((acc, item) => {
const { kind, parameters } = item;
const { showRoots } = provider.getConfig();
const setShowRoots = typeof showRoots !== 'undefined';
if (anyKindMatchesOldHierarchySeparators && !setShowRoots) {
warnChangedDefaultHierarchySeparators();
}
const setShowRoots = typeof showRoots !== 'undefined';
if (usesOldHierarchySeparator && !setShowRoots) {
warnChangedDefaultHierarchySeparators();
}
let root = '';
let groups: string[];
const parts: string[] = kind.split('/');
// Default showRoots to true if they didn't set it.
if ((!setShowRoots || showRoots) && parts.length > 1) {
[root, ...groups] = parts;
} else {
groups = parts;
}
const groups = kind.split('/').map((part) => part.trim());
const root = (!setShowRoots || showRoots) && groups.length > 1 ? [groups.shift()] : [];
const rootAndGroups = []
.concat(root || [])
.concat(groups)
.map(toGroup)
// Map a bunch of extra fields onto the groups, collecting the path as we go (thus the reduce)
.reduce((soFar, group, index, original) => {
const { name } = group;
const parent = index > 0 && soFar[index - 1].id;
const id = sanitize(parent ? `${parent}-${name}` : name);
if (parent === id) {
throw new Error(
dedent`
const rootAndGroups = [...root, ...groups].reduce((list, name, index) => {
const parent = index > 0 && list[index - 1].id;
const id = sanitize(parent ? `${parent}-${name}` : name);
if (parent === id) {
throw new Error(
dedent`
Invalid part '${name}', leading to id === parentId ('${id}'), inside kind '${kind}'
Did you create a path that uses the separator char accidentally, such as 'Vue <docs/>' where '/' is a separator char? See https://github.com/storybookjs/storybook/issues/6128
`
);
}
);
}
if (!!root && index === 0) {
const result: Root = {
...group,
id,
depth: index,
children: [],
isComponent: false,
isLeaf: false,
isRoot: true,
};
return soFar.concat([result]);
}
const result: Group = {
...group,
id,
parent,
depth: index,
children: [],
isComponent: false,
isLeaf: false,
isRoot: false,
parameters: {
docsOnly: parameters?.docsOnly,
viewMode: parameters?.viewMode,
},
};
return soFar.concat([result]);
}, [] as GroupsList);
const paths = [...rootAndGroups.map((g) => g.id), item.id];
// Ok, now let's add everything to the store
rootAndGroups.forEach((group, index) => {
const child = paths[index + 1];
const { id } = group;
acc[id] = merge(acc[id] || {}, {
...group,
...(child && { children: [child] }),
if (root.length && index === 0) {
list.push({
id,
name,
depth: index,
children: [],
isComponent: false,
isLeaf: false,
isRoot: true,
});
} else {
list.push({
id,
name,
parent,
depth: index,
children: [],
isComponent: false,
isLeaf: false,
isRoot: false,
parameters: {
docsOnly: parameters?.docsOnly,
viewMode: parameters?.viewMode,
},
});
}
return list;
}, [] as GroupsList);
const paths = [...rootAndGroups.map(({ id }) => id), item.id];
// Ok, now let's add everything to the store
rootAndGroups.forEach((group, index) => {
const child = paths[index + 1];
const { id } = group;
acc[id] = merge(acc[id] || {}, {
...group,
...(child && { children: [child] }),
});
});
const story: Story = {
...item,
depth: rootAndGroups.length,
parent: rootAndGroups[rootAndGroups.length - 1].id,
isLeaf: true,
isComponent: false,
isRoot: false,
};
acc[item.id] = story;
const story: Story = {
...item,
depth: rootAndGroups.length,
parent: rootAndGroups[rootAndGroups.length - 1].id,
isLeaf: true,
isComponent: false,
isRoot: false,
};
acc[item.id] = story;
return acc;
}, {} as StoriesHash);
return acc;
}, {} as StoriesHash);
function addItem(acc: StoriesHash, item: Story | Group) {
if (!acc[item.id]) {

View File

@ -205,6 +205,48 @@ describe('stories API', () => {
});
});
it('trims whitespace of group/component names (which originate from the kind)', () => {
const navigate = jest.fn();
const store = createMockStore();
const {
api: { setStories },
} = initStories({ store, navigate, provider });
setStories({
'design-system-some-component--my-story': {
kind: ' Design System / Some Component ', // note the leading/trailing whitespace around each part of the path
name: ' My Story ', // we only trim the path, so this will be kept as-is (it may intentionally have whitespace)
parameters,
path: 'design-system-some-component--my-story',
id: 'design-system-some-component--my-story',
args: {},
},
});
const { storiesHash: storedStoriesHash } = store.getState();
// We need exact key ordering, even if in theory JS doesn't guarantee it
expect(Object.keys(storedStoriesHash)).toEqual([
'design-system',
'design-system-some-component',
'design-system-some-component--my-story',
]);
expect(storedStoriesHash['design-system']).toMatchObject({
isRoot: true,
name: 'Design System', // root name originates from `kind`, so it gets trimmed
});
expect(storedStoriesHash['design-system-some-component']).toMatchObject({
isComponent: true,
name: 'Some Component', // component name originates from `kind`, so it gets trimmed
});
expect(storedStoriesHash['design-system-some-component--my-story']).toMatchObject({
isLeaf: true,
kind: ' Design System / Some Component ', // kind is kept as-is, because it may be used as identifier
name: ' My Story ', // story name is kept as-is, because it's set directly on the story
});
});
it('sets roots when showRoots = true', () => {
const navigate = jest.fn();
const store = createMockStore();

View File

@ -1 +1 @@
export const version = '6.1.9';
export const version = '6.2.0-alpha.1';

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