Merge branch 'next' into pr/glitchperfect/6042

This commit is contained in:
Norbert de Langen 2019-03-15 14:22:03 +01:00
commit c70b7adf21
159 changed files with 15173 additions and 2962 deletions

View File

@ -1,3 +1,38 @@
## 5.1.0-alpha.6 (March 14, 2019)
### Features
* Angular: add autoprefixing like angular-cli ([#5612](https://github.com/storybooks/storybook/pull/5612))
### Bug Fixes
* UI: Fixing search item in menu ([#6027](https://github.com/storybooks/storybook/pull/6027))
* Addon-a11y: Run only when a11y tab is active ([#6044](https://github.com/storybooks/storybook/pull/6044))
### Maintenance
* UI: Update syntaxhighlighter stories ([#6054](https://github.com/storybooks/storybook/pull/6054))
## 5.1.0-alpha.5 (March 12, 2019)
### Bug Fixes
* Addon-a11y: Remove bg color from reports ([#6026](https://github.com/storybooks/storybook/pull/6026))
* Addon-knobs: Fix key press debouncing ([#6022](https://github.com/storybooks/storybook/pull/6022))
* Addon-knobs: Fix error when removing value from number knob ([#6043](https://github.com/storybooks/storybook/pull/6043))
### Maintenance
* Theming: Improve typescript typings ([#5988](https://github.com/storybooks/storybook/pull/5988))
### Dependency Upgrades
* build(deps): bump axe-core from 3.2.0 to 3.2.2 ([#6034](https://github.com/storybooks/storybook/pull/6034))
* build(deps): bump css-loader from 2.1.0 to 2.1.1 ([#6033](https://github.com/storybooks/storybook/pull/6033))
* build(deps): bump react-focus-lock from 1.17.7 to 1.18.3 ([#6031](https://github.com/storybooks/storybook/pull/6031))
* Bump react-resize-detector from 3.4.0 to 4.0.2 ([#5899](https://github.com/storybooks/storybook/pull/5899))
## 5.1.0-alpha.4 (March 11, 2019)
### Bug Fixes

View File

@ -164,7 +164,7 @@ storiesOf('Stories', module)
.add('centered', () => 'Hello');
```
The semantics has changed in SB5 so that calling `addDecorator` on a kind adds a decorator to all its stories, no mater the order. So in the previous example, both stories would be centered.
The semantics has changed in SB5 so that calling `addDecorator` on a kind adds a decorator to all its stories, no matter the order. So in the previous example, both stories would be centered.
To allow for a subset of the stories in a kind to be decorated, we've added the ability to add decorators to individual stories using parameters:
@ -309,6 +309,25 @@ https://url-of-storybook?path=/story/<storyId>
The structure of `storyId` is a slugified `<selectedKind>--<selectedStory>` (slugified = lowercase, hyphen-separated). Each `storyId` must be unique. We plan to build more features into Storybook in upcoming versions based on this new structure.
## Rename of the `--secure` cli parameter to `--https`
Storybook for React Native's start commands & the Web versions' start command were a bit different, for no reason.
We've changed the start command for Reactnative to match the other.
This means that when you previously used the `--secure` flag like so:
```sh
start-storybook --secure
# or
start-storybook --s
```
You have to replace it with:
```sh
start-storybook --https
```
## From version 4.0.x to 4.1.x
There are are a few migrations you should be aware of in 4.1, including one unintentionally breaking change for advanced addon usage.

View File

@ -161,7 +161,7 @@ Looking for a first issue to tackle?
- [Talk to us](https://discord.gg/sMFvFsG), we'll find something to suits your skills and learning interest.
### Development scripts
Storybook is organized as a monorepo using [Lerna](https://lernajs.io). Useful scripts include:
#### `yarn bootstrap`
> Installs package dependencies and links packages together - using lerna

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "a11y addon for storybook",
"keywords": [
"a11y",
@ -26,11 +26,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/client-logger": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/client-logger": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"axe-core": "^3.2.2",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",

View File

@ -0,0 +1,219 @@
import React from 'react';
import { mount } from 'enzyme';
import { ThemeProvider, themes, convert } from '@storybook/theming';
import { STORY_RENDERED } from '@storybook/core-events';
import { ScrollArea } from '@storybook/components';
import { A11YPanel } from './A11YPanel.tsx';
import { EVENTS } from '../constants';
function createApi() {
return {
emit: jest.fn(),
on: jest.fn(),
off: jest.fn(),
};
}
const axeResult = {
incomplete: [
{
id: 'color-contrast',
impact: 'serious',
tags: ['cat.color', 'wcag2aa', 'wcag143'],
description:
'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds',
help: 'Elements must have sufficient color contrast',
helpUrl: 'https://dequeuniversity.com/rules/axe/3.2/color-contrast?application=axeAPI',
},
],
passes: [
{
id: 'aria-allowed-attr',
impact: null,
tags: ['cat.aria', 'wcag2a', 'wcag412'],
description: "Ensures ARIA attributes are allowed for an element's role",
help: 'Elements must only use allowed ARIA attributes',
helpUrl: 'https://dequeuniversity.com/rules/axe/3.2/aria-allowed-attr?application=axeAPI',
},
],
violations: [
{
id: 'color-contrast',
impact: 'serious',
tags: ['cat.color', 'wcag2aa', 'wcag143'],
description:
'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds',
help: 'Elements must have sufficient color contrast',
helpUrl: 'https://dequeuniversity.com/rules/axe/3.2/color-contrast?application=axeAPI',
},
],
};
function ThemedA11YPanel(props) {
return (
<ThemeProvider theme={convert(themes.light)}>
<A11YPanel {...props} />
</ThemeProvider>
);
}
describe('A11YPanel', () => {
it('should register STORY_RENDERED and RESULT updater on mount', () => {
// given
const api = createApi();
expect(api.on).not.toHaveBeenCalled();
// when
mount(<ThemedA11YPanel api={api} />);
// then
expect(api.on.mock.calls.length).toBe(2);
expect(api.on.mock.calls[0][0]).toBe(STORY_RENDERED);
expect(api.on.mock.calls[1][0]).toBe(EVENTS.RESULT);
});
it('should request a run on tab activation', () => {
// given
const api = createApi();
const wrapper = mount(<ThemedA11YPanel api={api} />);
expect(api.emit).not.toHaveBeenCalled();
// when
wrapper.setProps({ active: true });
wrapper.update();
// then
expect(api.emit).toHaveBeenCalledWith(EVENTS.REQUEST);
expect(wrapper.find(ScrollArea).length).toBe(0);
});
it('should deregister STORY_RENDERED and RESULT updater on unmount', () => {
// given
const api = createApi();
const wrapper = mount(<ThemedA11YPanel api={api} />);
expect(api.off).not.toHaveBeenCalled();
// when
wrapper.unmount();
// then
expect(api.off.mock.calls.length).toBe(2);
expect(api.off.mock.calls[0][0]).toBe(STORY_RENDERED);
expect(api.off.mock.calls[1][0]).toBe(EVENTS.RESULT);
});
it('should update run result', () => {
// given
const api = createApi();
const wrapper = mount(<ThemedA11YPanel api={api} active />);
const onUpdate = api.on.mock.calls.find(([event]) => event === EVENTS.RESULT)[1];
expect(
wrapper
.find('button')
.last()
.text()
.trim()
).toBe('Rerun tests');
// when
onUpdate(axeResult);
// then
expect(
wrapper
.find('button')
.last()
.text()
.trim()
).toBe('Tests completed');
});
it('should request run', () => {
// given
const api = createApi();
const wrapper = mount(<ThemedA11YPanel api={api} active />);
const request = api.on.mock.calls.find(([event]) => event === STORY_RENDERED)[1];
expect(
wrapper
.find('button')
.last()
.text()
.trim()
).toBe('Rerun tests');
expect(api.emit).not.toHaveBeenCalled();
// when
request();
// then
expect(
wrapper
.find('button')
.last()
.text()
.trim()
).toBe('Running test');
expect(api.emit).toHaveBeenCalledWith(EVENTS.REQUEST);
});
it('should NOT request run on inactive tab', () => {
// given
const api = createApi();
mount(<ThemedA11YPanel api={api} active={false} />);
const request = api.on.mock.calls.find(([event]) => event === STORY_RENDERED)[1];
expect(api.emit).not.toHaveBeenCalled();
// when
request();
// then
expect(api.emit).not.toHaveBeenCalled();
});
it('should render report', () => {
// given
const api = createApi();
const wrapper = mount(<ThemedA11YPanel api={api} active />);
const onUpdate = api.on.mock.calls.find(([event]) => event === EVENTS.RESULT)[1];
// when
onUpdate(axeResult);
// then
expect(wrapper.find(A11YPanel)).toMatchSnapshot();
});
it("should render loader when it's running", () => {
// given
const api = createApi();
const wrapper = mount(<ThemedA11YPanel api={api} active />);
const request = api.on.mock.calls.find(([event]) => event === STORY_RENDERED)[1];
// when
request();
wrapper.update();
// then
expect(wrapper.find('ScrollArea').length).toBe(0);
expect(wrapper.find('Loader').length).toBe(1);
expect(wrapper.find('ActionBar').length).toBe(1);
expect(wrapper.find('Loader')).toMatchSnapshot();
});
it('should NOT anything when tab is not active', () => {
// given
const api = createApi();
// when
const wrapper = mount(<ThemedA11YPanel api={api} active={false} />);
// then
expect(wrapper.find('ScrollArea').length).toBe(0);
expect(wrapper.find('ActionBar').length).toBe(0);
});
});

View File

@ -1,4 +1,5 @@
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import { styled } from '@storybook/theming';
@ -36,6 +37,18 @@ const Incomplete = styled.span(({ theme }) => ({
color: theme.color.warning,
}));
const Loader = styled(({ className }) => (
<div className={className}>
<Icon inline icon="sync" status="running" /> Please wait while a11y scan is running ...
</div>
))({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
});
Loader.displayName = 'Loader';
interface A11YPanelState {
status: string;
passes: Result[];
@ -142,29 +155,33 @@ export class A11YPanel extends Component<A11YPanelProps, A11YPanelState> {
return active ? (
<Fragment>
<ScrollArea vertical horizontal>
<Tabs
key="tabs"
tabs={[
{
label: <Violations>{violations.length} Violations</Violations>,
panel: (
<Report passes={false} items={violations} empty="No a11y violations found." />
),
},
{
label: <Passes>{passes.length} Passes</Passes>,
panel: <Report passes items={passes} empty="No a11y check passed." />,
},
{
label: <Incomplete>{incomplete.length} Incomplete</Incomplete>,
panel: (
<Report passes={false} items={incomplete} empty="No a11y incomplete found." />
),
},
]}
/>
</ScrollArea>
{status === 'running' ? (
<Loader />
) : (
<ScrollArea vertical horizontal>
<Tabs
key="tabs"
tabs={[
{
label: <Violations>{violations.length} Violations</Violations>,
panel: (
<Report passes={false} items={violations} empty="No a11y violations found." />
),
},
{
label: <Passes>{passes.length} Passes</Passes>,
panel: <Report passes items={passes} empty="No a11y check passed." />,
},
{
label: <Incomplete>{incomplete.length} Incomplete</Incomplete>,
panel: (
<Report passes={false} items={incomplete} empty="No a11y incomplete found." />
),
},
]}
/>
</ScrollArea>
)}
<ActionBar key="actionbar" actionItems={[{ title: actionTitle, onClick: this.request }]} />
</Fragment>
) : null;

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,6 @@ import deprecate from 'util-deprecate';
import { stripIndents } from 'common-tags';
import addons, { StoryWrapper } from '@storybook/addons';
import { STORY_RENDERED } from '@storybook/core-events';
import { EVENTS, PARAM_KEY } from './constants';
const channel = addons.getChannel();
@ -56,7 +55,6 @@ export const withA11y: StoryWrapper = (getStory, context) => {
return getStory(context);
};
channel.on(STORY_RENDERED, () => run(setup.element, setup.config, setup.options));
channel.on(EVENTS.REQUEST, () => run(setup.element, setup.config, setup.options));
if (module && module.hot && module.hot.decline) {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Action Logger addon for storybook",
"keywords": [
"storybook"
@ -21,10 +21,10 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"fast-deep-equal": "^2.0.1",
"global": "^4.3.2",
@ -35,11 +35,11 @@
"react-inspector": "^2.3.1",
"uuid": "^3.3.2"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@types/lodash": "^4.14.121",
"@types/uuid": "^3.4.4"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "A storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
@ -25,11 +25,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/client-logger": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/client-logger": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"global": "^4.3.2",
"memoizerific": "^1.11.3",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-centered",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook decorator to center components",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-cssresources",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "A storybook addon to switch between css resources at runtime for your story",
"keywords": [
"addon",
@ -25,9 +25,9 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"global": "^4.3.2",
"react": "^16.8.4"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-events",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Add events to your Storybook stories.",
"keywords": [
"addon",
@ -24,9 +24,9 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"format-json": "^1.0.3",
"prop-types": "^15.7.2",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-graphql",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook addon to display the GraphiQL IDE",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-info",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "A Storybook addon to show additional information for your stories.",
"keywords": [
"addon",
@ -22,10 +22,10 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/client-logger": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/client-logger": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"global": "^4.3.2",
"marksy": "^6.1.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
@ -28,10 +28,10 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"global": "^4.3.2",
"prop-types": "^15.7.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-knobs",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook Addon Prop Editor Component",
"keywords": [
"addon",
@ -22,10 +22,10 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"copy-to-clipboard": "^3.0.8",
"core-js": "^2.6.5",
"escape-html": "^1.0.3",

View File

@ -10,7 +10,7 @@ export default class PropForm extends Component {
makeChangeHandler(name, type) {
const { onFieldChange } = this.props;
return value => {
const change = { name, type, value };
const change = { name, type, value: value || '' };
onFieldChange(change);
};

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Story Links addon for storybook",
"keywords": [
"addon",
@ -22,8 +22,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-notes",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Write notes for your Storybook stories.",
"keywords": [
"addon",
@ -23,11 +23,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/client-logger": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/client-logger": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"markdown-to-jsx": "^6.9.1",
"prop-types": "^15.7.2",

View File

@ -1,7 +1,7 @@
{
"name": "@storybook/addon-ondevice-backgrounds",
"version": "5.1.0-alpha.6",
"private": true,
"version": "5.1.0-alpha.4",
"description": "A storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
@ -25,7 +25,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"prop-types": "^15.7.2"
},

View File

@ -1,7 +1,7 @@
{
"name": "@storybook/addon-ondevice-knobs",
"version": "5.1.0-alpha.6",
"private": true,
"version": "5.1.0-alpha.4",
"description": "Display storybook story knobs on your deviced.",
"keywords": [
"addon",
@ -22,7 +22,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"deep-equal": "^1.0.1",
"prop-types": "^15.7.2",
@ -32,7 +33,7 @@
"react-native-switch": "^1.5.0"
},
"peerDependencies": {
"@storybook/addon-knobs": "5.0.0-alpha.5",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"react": "*",
"react-native": "*"
},

View File

@ -1,7 +1,8 @@
import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import PropTypes from 'prop-types';
import { SELECT_STORY, FORCE_RE_RENDER } from '@storybook/core-events';
import { SET, SET_OPTIONS, RESET, CHANGE, CLICK } from '@storybook/addon-knobs/events';
import GroupTabs from './GroupTabs';
import PropForm from './PropForm';
@ -29,18 +30,16 @@ export default class Panel extends React.Component {
componentDidMount() {
const { channel } = this.props;
channel.on('addon:knobs:setKnobs', this.setKnobs);
channel.on('addon:knobs:setOptions', this.setOptions);
channel.on('selectStory', this.reset);
channel.emit('forceReRender');
channel.on(SET, this.setKnobs);
channel.on(SET_OPTIONS, this.setOptions);
channel.on(SELECT_STORY, this.reset);
channel.emit(FORCE_RE_RENDER);
}
componentWillUnmount() {
const { channel } = this.props;
channel.removeListener('addon:knobs:setKnobs', this.setKnobs);
channel.removeListener('selectStory', this.reset);
channel.removeListener(SET, this.setKnobs);
channel.removeListener(SELECT_STORY, this.reset);
}
onGroupSelect(name) {
@ -60,12 +59,12 @@ export default class Panel extends React.Component {
reset = () => {
const { channel } = this.props;
this.setState({ knobs: {} });
channel.emit('addon:knobs:reset');
channel.emit(RESET);
};
emitChange(changedKnob) {
const { channel } = this.props;
channel.emit('addon:knobs:knobChange', changedKnob);
channel.emit(CHANGE, changedKnob);
}
handleChange(changedKnob) {
@ -86,7 +85,7 @@ export default class Panel extends React.Component {
handleClick(knob) {
const { channel } = this.props;
channel.emit('addon:knobs:knobClick', knob);
channel.emit(CLICK, knob);
}
render() {

View File

@ -1,7 +1,7 @@
{
"name": "@storybook/addon-ondevice-notes",
"version": "5.1.0-alpha.6",
"private": true,
"version": "5.1.0-alpha.4",
"description": "Write notes for your Storybook stories.",
"keywords": [
"addon",
@ -20,7 +20,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"prop-types": "^15.7.2",
"react-native-simple-markdown": "^1.1.0"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-options",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Options addon for storybook",
"keywords": [
"addon",
@ -21,7 +21,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"util-deprecate": "^1.0.2"
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
"keywords": [
"addon",
@ -25,7 +25,7 @@
"storybook": "start-storybook -p 6006"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"glob": "^7.1.3",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots-puppeteer",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Image snappshots addition to StoryShots base on puppeteer",
"keywords": [
"addon",
@ -22,15 +22,15 @@
"prepare": "node ../../../scripts/prepare.js"
},
"dependencies": {
"@storybook/node-logger": "5.1.0-alpha.4",
"@storybook/router": "5.1.0-alpha.4",
"@storybook/node-logger": "5.1.0-alpha.6",
"@storybook/router": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"jest-image-snapshot": "^2.8.1",
"puppeteer": "^1.12.2",
"regenerator-runtime": "^0.12.1"
},
"peerDependencies": {
"@storybook/addon-storyshots": "5.0.0-alpha.5"
"@storybook/addon-storyshots": "5.1.0-alpha.6"
},
"publishConfig": {
"access": "public"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Stories addon for storybook",
"keywords": [
"addon",
@ -22,10 +22,10 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/router": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/router": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"estraverse": "^4.2.0",
"loader-utils": "^1.2.3",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-viewport",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook addon to change the viewport size to mobile",
"keywords": [
"addon",
@ -21,11 +21,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/client-logger": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/client-logger": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"global": "^4.3.2",
"memoizerific": "^1.11.3",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/angular",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -26,8 +26,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "5.1.0-alpha.4",
"@storybook/node-logger": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"@storybook/node-logger": "5.1.0-alpha.6",
"angular2-template-loader": "^0.6.2",
"core-js": "^2.6.5",
"fork-ts-checker-webpack-plugin": "^0.5.2",
@ -49,6 +49,7 @@
"@angular/forms": ">=6.0.0",
"@angular/platform-browser": ">=6.0.0",
"@angular/platform-browser-dynamic": ">=6.0.0",
"autoprefixer": "^8.1.0",
"babel-loader": "^7.0.0 || ^8.0.0",
"zone.js": "^0.8.29"
},

View File

@ -1,5 +1,6 @@
import path from 'path';
import { ContextReplacementPlugin } from 'webpack';
import autoprefixer from 'autoprefixer';
import getTsLoaderOptions from './ts_config';
import createForkTsCheckerInstance from './create-fork-ts-checker-plugin';
@ -32,7 +33,16 @@ export function webpack(config, { configDir }) {
},
{
test: /\.s(c|a)ss$/,
use: [require.resolve('raw-loader'), require.resolve('sass-loader')],
use: [
require.resolve('raw-loader'),
{
loader: require.resolve('postcss-loader'),
options: {
plugins: [autoprefixer()],
},
},
require.resolve('sass-loader'),
],
},
],
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/ember",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
"homepage": "https://github.com/storybooks/storybook/tree/master/app/ember",
"bugs": {
@ -24,7 +24,7 @@
},
"dependencies": {
"@ember/test-helpers": "^1.5.0",
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -25,7 +25,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/marko",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for Marko: Develop Marko Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -26,7 +26,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/mithril",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for Mithril: Develop Mithril Component in isolation.",
"keywords": [
"storybook"
@ -27,7 +27,7 @@
},
"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/polymer",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for Polymer: Develop Polymer components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -25,7 +25,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"@webcomponents/webcomponentsjs": "^1.2.0",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for Preact: Develop Preact Component in isolation.",
"keywords": [
"storybook"
@ -27,7 +27,7 @@
},
"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -0,0 +1,2 @@
docs
.babelrc

3
app/react-native-server/bin/index.js vendored Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env node
require('../dist/server');

View File

@ -0,0 +1,46 @@
{
"name": "@storybook/react-native-server",
"version": "5.1.0-alpha.6",
"description": "A better way to develop React Native Components for your app",
"keywords": [
"react",
"react-native",
"storybook"
],
"homepage": "https://github.com/storybooks/storybook/tree/master/app/react-native-server",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
"license": "MIT",
"bin": {
"start-storybook": "./bin/index.js",
"storybook-server": "./bin/index.js"
},
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/channel-websocket": "5.1.0-alpha.6",
"@storybook/core": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/ui": "5.1.0-alpha.6",
"commander": "^2.19.0",
"global": "^4.3.2",
"react": "^16.6.0",
"react-dom": "^16.8.4",
"uuid": "^3.3.2",
"webpack": "^4.23.1",
"ws": "^6.1.0"
},
"peerDependencies": {
"babel-loader": "^7.0.0 || ^8.0.0"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -0,0 +1,13 @@
# Storybook Server for React Native
Additional package for @storybook/react-native to support a web server and browser UI that runs alongside the RN on-device UI
For more information visit: [storybook.js.org](https://storybook.js.org)
## Usage
After setting up Storybook for React Native install this package.
```shell
npm install --save-dev @storybook/react-native-server
```
Then run `npx storybook start`

View File

@ -11,11 +11,6 @@ export default class ReactProvider extends Provider {
super();
this.options = options;
this.selection = null;
try {
this.channel = addons.getChannel();
} catch (err) {
this.channel = undefined;
}
const { secured, host, port } = options;
const websocketType = secured ? 'wss' : 'ws';
@ -38,30 +33,37 @@ export default class ReactProvider extends Provider {
}
}
renderPreview(kind, story) {
this.selection = { kind, story };
this.channel.emit(Events.SET_CURRENT_STORY, { kind, story });
const renderPreview = addons.getPreview();
getElements(type) {
return addons.getElements(type);
}
const innerPreview = renderPreview ? renderPreview(kind, story) : null;
return innerPreview || <PreviewHelp />;
renderPreview(state, api) {
if (state.storiesHash[state.storyId]) {
const { kind, story } = state.storiesHash[state.storyId];
this.selection = { kind, story };
api.emit(Events.SET_CURRENT_STORY, { kind, story });
// FIXME: getPreview not implemented yet.
if (addons.getPreview) {
const renderPreview = addons.getPreview();
if (renderPreview) {
return renderPreview(kind, story);
}
}
}
return <PreviewHelp />;
}
handleAPI(api) {
addons.loadAddons(api);
api.onStory((kind, story) => {
this.selection = { kind, story };
this.channel.emit(Events.SET_CURRENT_STORY, this.selection);
api.emit(Events.SET_CURRENT_STORY, this.selection);
});
this.channel.on(Events.SELECT_STORY, ({ kind, story }) => {
api.selectStory(kind, story);
api.on(Events.GET_CURRENT_STORY, () => {
api.emit(Events.SET_CURRENT_STORY, this.selection);
});
this.channel.on(Events.SET_STORIES, data => {
api.setStories(data.stories);
});
this.channel.on(Events.GET_CURRENT_STORY, () => {
this.channel.emit(Events.SET_CURRENT_STORY, this.selection);
});
this.channel.emit(Events.GET_STORIES);
addons.loadAddons(api);
api.emit(Events.GET_STORIES);
}
}

View File

@ -0,0 +1,39 @@
import path from 'path';
import program from 'commander';
export function parseList(str) {
return str.split(',');
}
function getCli() {
program
.option('-h, --host <host>', 'host to listen on', 'localhost')
.option('-p, --port <port>', 'port to listen on', 7007)
.option('-e, --environment [environment]', 'DEVELOPMENT/PRODUCTION environment for webpack')
.option('-i, --manual-id', 'allow multiple users to work with same storybook')
.option('-c, --config-dir [dir-name]', 'Directory where to load Storybook configurations from')
.option(
'--https',
'Serve Storybook over HTTPS. Note: You must provide your own certificate information.'
)
.option(
'--ssl-ca <ca>',
'Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)',
parseList
)
.option('--ssl-cert <cert>', 'Provide an SSL certificate. (Required with --https)')
.option('--ssl-key <key>', 'Provide an SSL key. (Required with --https)')
.option('--smoke-test', 'Exit after successful start')
.option('--ci', "CI mode (skip interactive prompts, don't open browser")
.option('--quiet', 'Suppress verbose build output')
.parse(process.argv);
const configDir = path.resolve(program.configDir || './storybook');
return {
...program,
configDir,
};
}
export default getCli;

View File

@ -1,17 +1,24 @@
import express from 'express';
#!/usr/bin/env node
import querystring from 'querystring';
import http from 'http';
import ws from 'ws';
import storybook from './middleware';
import storybook from '@storybook/core/standalone';
import extendOptions from './options';
import getCli from './cli';
export default class Server {
constructor(options) {
this.options = options;
this.httpServer = http.createServer();
this.expressApp = express();
this.expressApp.use(storybook(options));
this.httpServer.on('request', this.expressApp);
this.wsServer = new ws.Server({ server: this.httpServer });
this.attachWS = this.attachWS.bind(this);
this.options = extendOptions(options, this.attachWS);
}
start() {
return storybook(this.options);
}
attachWS(server) {
this.wsServer = new ws.Server({ server });
this.wsServer.on('connection', (s, req) => this.handleWS(s, req));
}
@ -32,8 +39,7 @@ export default class Server {
});
});
}
listen(...args) {
this.httpServer.listen(...args);
}
}
const server = new Server(getCli());
server.start();

View File

@ -0,0 +1,27 @@
import { managerPreset } from '@storybook/core/server';
import packageJson from '../../package.json';
function extendOptions(options, extendServer) {
const { manualId, https: secured, host, port } = options;
const storybookOptions = { manualId, secured, host, port };
return {
...options,
extendServer,
packageJson,
mode: 'dev',
ignorePreview: true,
corePresets: [
{
name: managerPreset,
options: { managerEntry: require.resolve('../client/manager') },
},
{
name: require.resolve('./rn-options-preset.js'),
options: { storybookOptions },
},
],
};
}
export default extendOptions;

View File

@ -0,0 +1,15 @@
import webpack from 'webpack';
export async function managerWebpack(config, options) {
const { storybookOptions } = options;
return {
...config,
plugins: [
...config.plugins,
new webpack.DefinePlugin({
storybookOptions: JSON.stringify(storybookOptions),
}),
],
};
}

View File

@ -84,7 +84,8 @@ RN application, e.g. on a tab or within an admin screen.
## Server support
If you want to support having a storybook server running add following NPM script into your `package.json` file:
If you want to support having a storybook server running install storybook server `npm install --save-dev @storybook/react-native-server`
and add following NPM script into your `package.json` file:
```json
{

View File

@ -1,8 +1,5 @@
# Storybook server
The default usage of React Native Storybook till version 4 involved starting Storybook server.
Starting from v4 we do not expect user to start the server since in most cases it is not really necessary.
In case you still want to run Storybook server simply call `npm run storybook` or `npx storybook start`.
Since storybook v5 the storybook server is a standalone package. To keep using storybook server make sure to install @storybook/react-native-server package.
## Benefits of storybook server

View File

@ -1,7 +1,7 @@
{
"name": "@storybook/react-native",
"version": "5.1.0-alpha.6",
"private": true,
"version": "5.1.0-alpha.4",
"description": "A better way to develop React Native Components for your app",
"keywords": [
"react",
@ -20,62 +20,27 @@
"license": "MIT",
"main": "dist/index.js",
"jsnext:main": "src/index.js",
"bin": {
"storybook": "dist/bin/storybook.js"
},
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/channel-websocket": "5.1.0-alpha.4",
"@storybook/channels": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/ui": "5.1.0-alpha.4",
"babel-loader": "^8.0.4",
"babel-plugin-macros": "^2.4.5",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-minify": "^0.5.0 || 0.6.0-alpha.5",
"babel-preset-react": "^6.24.1",
"babel-runtime": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.2.0",
"commander": "^2.19.0",
"@react-native-community/async-storage": "^1.2.1",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/channel-websocket": "5.1.0-alpha.6",
"@storybook/channels": "5.1.0-alpha.6",
"@storybook/client-api": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"dotenv-webpack": "^1.7.0",
"ejs": "^2.6.1",
"express": "^4.16.4",
"find-cache-dir": "^2.0.0",
"global": "^4.3.2",
"html-webpack-plugin": "^4.0.0-beta.2",
"json5": "^2.1.0",
"lazy-universal-dotenv": "^2.0.0",
"prop-types": "^15.7.2",
"raw-loader": "^1.0.0",
"react-dev-utils": "^8.0.0",
"react-native-swipe-gestures": "^1.0.2",
"shelljs": "^0.8.3",
"url-parse": "^1.4.4",
"uuid": "^3.3.2",
"webpack": "^4.29.6",
"webpack-dev-middleware": "^3.6.0",
"webpack-hot-middleware": "^2.24.3",
"ws": "^6.1.4"
"react-native-swipe-gestures": "^1.0.3",
"rn-host-detect": "^1.1.5"
},
"devDependencies": {
"react-native": "^0.52.2"
"react-native": "^0.57.8"
},
"peerDependencies": {
"babel-core": "^6.26.0 || ^7.0.0-0 || ^7.0.0-bridge.0",
"babel-runtime": ">=6.0.0",
"react": "*",
"react-native": ">=0.51.0"
"react-native": ">=0.57.0"
},
"publishConfig": {
"access": "public"

View File

@ -10,11 +10,14 @@ For more information visit: [storybook.js.org](https://storybook.js.org)
The `storybook` CLI tool can be used to add Storybook to your React Native app. Install the `storybook` tool if necessary and run it from your project directory with these commands:
```sh
```shell
cd my-rn-app
npx -p @storybook/cli sb init
```
During installation it will ask if you want to install storybook server.
It allows you to control the storybook from your web browser.
The next thing you need to do is make Storybook UI visible in your app.
### CRNA, React Native vanilla
@ -42,8 +45,7 @@ module.exports = __DEV__ ? StorybookUI : App;
## Start Storybook server (optional)
If you want to control storybook from browser/VS Code/websockets you need to start the server.
After initial setup start the storybook server with the storybook npm script.
If you want to control storybook from browser/VS Code/websockets you need install and start the server.
```sh
npm run storybook
@ -51,16 +53,6 @@ npm run storybook
Now, you can open `<http://localhost:7007>` to view your storybook menus in the browser.
## Old standalone behavior
Since storybook version v4.0 packager is removed from storybook.
The suggested storybook usage is to include it inside your app.
If you want to keep the old behavior, you have to start the packager yourself with a different project root.
```sh
npm run storybook start -p 7007 | react-native start --projectRoot storybook
```
## Start App
To see your Storybook stories on the device, you should start your mobile app for the `<platform>` of your choice (typically `ios` or `android`). (Note that due to an implementation detail, your stories will only show up in the left pane of your browser window after your device has connected to this storybook server.)
@ -90,7 +82,7 @@ The following parameters can be passed to the start command:
host to listen on
-p, --port <port>
port to listen on
-s, --secured
--https
whether server is running on https
-c, --config-dir [dir-name]
storybook config directory

View File

@ -1,5 +0,0 @@
#!/usr/bin/env node
import program from 'commander';
program.option('-o, --outdir <outdir>', 'location to store built storybook').parse(process.argv);

View File

@ -1,42 +0,0 @@
#!/usr/bin/env node
/* eslint-disable no-console */
import path from 'path';
import program from 'commander';
import Server from '../server';
program
.allowUnknownOption()
.option('-h, --host <host>', 'host to listen on', 'localhost')
.option('-p, --port <port>', 'port to listen on', 7007)
.option('-s, --secured', 'whether server is running on https')
.option('-c, --config-dir [dir-name]', 'storybook config directory')
.option('-e, --environment [environment]', 'DEVELOPMENT/PRODUCTION environment for webpack')
.option('-i, --manual-id', 'allow multiple users to work with same storybook')
.option('--smoke-test', 'Exit after successful start')
.parse(process.argv);
const projectDir = path.resolve();
const configDir = path.resolve(program.configDir || './storybook');
const listenAddr = [program.port];
if (program.host) {
listenAddr.push(program.host);
}
const server = new Server({
projectDir,
configDir,
environment: program.environment,
manualId: program.manualId,
secured: program.secured,
});
server.listen(...listenAddr, err => {
if (err) {
throw err;
}
const address = `http://${program.host}:${program.port}/`;
console.info(`\nReact Native Storybook started on => ${address}\n`);
if (program.smokeTest) {
process.exit(0);
}
});

View File

@ -1,9 +0,0 @@
#!/usr/bin/env node
import program from 'commander';
program
.version(require('../../package.json').version)
.command('start', 'starts storybook webapp', { isDefault: true })
.command('build', 'builds storybook webapp')
.parse(process.argv);

View File

@ -11,7 +11,7 @@ export default class Addons extends PureComponent {
super();
addons.loadAddons({});
this.panels = addons.getPanels();
this.panels = addons.getElements('panel');
this.state = {
addonSelected: Object.keys(this.panels)[0] || null,

View File

@ -1,14 +1,13 @@
/* eslint-disable no-underscore-dangle */
import React from 'react';
import { AsyncStorage, NativeModules } from 'react-native';
import parse from 'url-parse';
import AsyncStorage from '@react-native-community/async-storage';
import getHost from 'rn-host-detect';
import addons from '@storybook/addons';
import Events from '@storybook/core-events';
import Channel from '@storybook/channels';
import createChannel from '@storybook/channel-websocket';
import { StoryStore, ClientApi } from '@storybook/core/client';
import { StoryStore, ClientApi } from '@storybook/client-api';
import OnDeviceUI from './components/OnDeviceUI';
import StoryView from './components/StoryView';
@ -18,7 +17,8 @@ export default class Preview {
constructor() {
this._addons = {};
this._decorators = [];
this._stories = new StoryStore();
this._stories = new StoryStore({});
this._clientApi = new ClientApi({ storyStore: this._stories });
[
@ -62,8 +62,7 @@ export default class Preview {
if (onDeviceUI && params.disableWebsockets) {
channel = new Channel({ async: true });
} else {
const host =
params.host || parse(NativeModules.SourceCode.scriptURL).hostname || 'localhost';
const host = getHost(params.host || 'localhost');
const port = params.port !== false ? `:${params.port || 7007}` : '';
const query = params.query || '';
@ -87,12 +86,14 @@ export default class Preview {
}
addons.setChannel(channel);
this._stories.setChannel(channel);
channel.emit(Events.CHANNEL_CREATED);
}
channel.on(Events.GET_STORIES, () => this._sendSetStories());
channel.on(Events.SET_CURRENT_STORY, d => this._selectStoryEvent(d));
this._sendSetStories();
// If the app is started with server running, set the story as the one selected in the browser
@ -136,6 +137,7 @@ export default class Preview {
const channel = addons.getChannel();
const stories = this._stories.dumpStoryBook();
channel.emit(Events.SET_STORIES, { stories });
channel.emit(Events.STORIES_CONFIGURED);
}
_sendGetCurrentStory() {
@ -187,8 +189,10 @@ export default class Preview {
_selectStoryEvent(selection) {
AsyncStorage.setItem(STORAGE_KEY, JSON.stringify(selection));
const story = this._getStory(selection);
this._selectStory(story);
if (selection) {
const story = this._getStory(selection);
this._selectStory(story);
}
}
_selectStory(story) {

View File

@ -1,136 +0,0 @@
import fs from 'fs';
import path from 'path';
import JSON5 from 'json5';
import findCacheDir from 'find-cache-dir';
import { createDefaultWebpackConfig } from '@storybook/core/server';
// avoid ESLint errors
const logger = console;
function removeReactHmre(presets) {
const index = presets.indexOf('react-hmre');
if (index > -1) {
presets.splice(index, 1);
}
}
// Tries to load a .babelrc and returns the parsed object if successful
function loadBabelConfig(babelConfigPath) {
let config;
if (fs.existsSync(babelConfigPath)) {
const content = fs.readFileSync(babelConfigPath, 'utf-8');
try {
config = JSON5.parse(content);
config.babelrc = false;
} catch (e) {
logger.error(`=> Error parsing .babelrc file: ${e.message}`);
throw e;
}
}
if (!config) return null;
// Remove react-hmre preset.
// It causes issues with react-storybook.
// We don't really need it.
// Earlier, we fix this by runnign storybook in the production mode.
// But, that hide some useful debug messages.
if (config.presets) {
removeReactHmre(config.presets);
}
if (config.env && config.env.development && config.env.development.presets) {
removeReactHmre(config.env.development.presets);
}
return config;
}
// `baseConfig` is a webpack configuration bundled with storybook.
// Storybook will look in the `configDir` directory
// (inside working directory) if a config path is not provided.
export default function(configType, baseConfig, projectDir, configDir) {
const config = baseConfig;
// Search for a .babelrc in project directory, config directory, and storybook
// module directory. If found, use that to extend webpack configurations.
const babelConfigInConfig = loadBabelConfig(path.resolve(configDir, '.babelrc'));
const babelConfigInProject = loadBabelConfig(path.resolve(projectDir, '.babelrc'));
const babelConfigInModule = loadBabelConfig('.babelrc');
let babelConfig = null;
let babelConfigDir = '';
if (babelConfigInConfig) {
logger.info('=> Loading custom .babelrc from config directory.');
babelConfig = babelConfigInConfig;
babelConfigDir = configDir;
} else if (babelConfigInProject) {
logger.info('=> Loading custom .babelrc from project directory.');
babelConfig = babelConfigInProject;
babelConfigDir = projectDir;
} else {
babelConfig = babelConfigInModule;
}
if (babelConfig) {
// If the custom config uses babel's `extends` clause, then replace it with
// an absolute path. `extends` will not work unless we do this.
if (babelConfig.extends) {
babelConfig.extends = babelConfigDir
? path.resolve(babelConfigDir, babelConfig.extends)
: path.resolve(babelConfig.extends);
}
config.module.rules[0].query = babelConfig;
}
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables a cache directory for faster-rebuilds
// `find-cache-dir` will create the cache directory under the node_modules directory.
config.module.rules[0].query.cacheDirectory = findCacheDir({
name: 'react-storybook',
});
// Check whether addons.js file exists inside the storybook.
const storybookCustomAddonsPath = path.resolve(configDir, 'addons.js');
if (fs.existsSync(storybookCustomAddonsPath)) {
logger.info('=> Loading custom addons config.');
config.entry.manager.unshift(storybookCustomAddonsPath);
}
const defaultConfig = createDefaultWebpackConfig(config);
// Check whether user has a custom webpack config file and
// return the (extended) base configuration if it's not available.
const customConfigPath = path.resolve(configDir, 'webpack.config.js');
if (!fs.existsSync(customConfigPath)) {
logger.info('=> Using default webpack setup based on "Create React App".');
return defaultConfig;
}
const customConfig = require(customConfigPath); // eslint-disable-line
if (typeof customConfig === 'function') {
logger.info('=> Loading custom webpack config (full-control mode).');
return customConfig(config, configType, defaultConfig, configDir);
}
logger.info('=> Loading custom webpack config.');
customConfig.module = customConfig.module || {};
return {
...customConfig,
// We'll always load our configurations after the custom config.
// So, we'll always load the stuff we need.
...config,
// We need to use our and custom plugins.
plugins: [...config.plugins, ...(customConfig.plugins || [])],
module: {
...config.module,
// We need to use our and custom rules.
...customConfig.module,
rules: [...config.module.rules, ...(customConfig.module.rules || [])],
},
};
}

View File

@ -1,31 +0,0 @@
module.exports = {
// Don't try to find .babelrc because we want to force this configuration.
babelrc: false,
presets: [
[
require.resolve('babel-preset-env'),
{
modules: process.env.NODE_ENV === 'test' ? 'commonjs' : false,
shippedProposals: true,
},
],
require.resolve('babel-preset-react'),
],
plugins: [
require.resolve('babel-plugin-macros'),
require.resolve('babel-plugin-syntax-trailing-function-commas'),
require.resolve('babel-plugin-syntax-async-functions'),
require.resolve('babel-plugin-transform-class-properties'),
require.resolve('babel-plugin-transform-object-rest-spread'),
require.resolve('babel-plugin-transform-regenerator'),
// Polyfills the runtime needed for async/await and generators
[
require.resolve('babel-plugin-transform-runtime'),
{
helpers: true,
polyfill: true,
regenerator: true,
},
],
],
};

View File

@ -1,30 +0,0 @@
module.exports = {
// Don't try to find .babelrc because we want to force this configuration.
babelrc: false,
presets: [
[
require.resolve('babel-preset-env'),
{
modules: false,
},
],
require.resolve('babel-preset-react'),
require.resolve('babel-preset-minify'),
],
plugins: [
require.resolve('babel-plugin-syntax-trailing-function-commas'),
require.resolve('babel-plugin-syntax-async-functions'),
require.resolve('babel-plugin-transform-class-properties'),
require.resolve('babel-plugin-transform-object-rest-spread'),
require.resolve('babel-plugin-transform-regenerator'),
// Polyfills the runtime needed for async/await and generators
[
require.resolve('babel-plugin-transform-runtime'),
{
helpers: true,
polyfill: true,
regenerator: true,
},
],
],
};

View File

@ -1,33 +0,0 @@
import path from 'path';
import { getEnvironment } from 'lazy-universal-dotenv';
export const includePaths = [path.resolve('./')];
export const excludePaths = [path.resolve('./node_modules')];
export const nodeModulesPaths = path.resolve('./node_modules');
// Load environment variables starts with STORYBOOK_ to the client side.
export function loadEnv(options = {}) {
const defaultNodeEnv = options.production ? 'production' : 'development';
const env = {
NODE_ENV: JSON.stringify(process.env.NODE_ENV || defaultNodeEnv),
// This is to support CRA's public folder feature.
// In production we set this to dot(.) to allow the browser to access these assests
// even when deployed inside a subpath. (like in GitHub pages)
// In development this is just empty as we always serves from the root.
PUBLIC_URL: JSON.stringify(options.production ? '.' : ''),
};
const { stringified } = getEnvironment();
Object.keys(process.env)
.filter(name => /^STORYBOOK_/.test(name))
.forEach(name => {
env[name] = JSON.stringify(process.env[name]);
});
return {
'process.env': Object.assign({}, env, stringified),
};
}

View File

@ -1,75 +0,0 @@
import path from 'path';
import webpack from 'webpack';
import Dotenv from 'dotenv-webpack';
import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import { getManagerHeadHtml } from '@storybook/core/server';
import { includePaths, excludePaths, nodeModulesPaths, loadEnv } from './utils';
import { version } from '../../../package.json';
const getConfig = options => {
const environment = loadEnv();
const entriesMeta = {
manager: {
headHtmlSnippet: getManagerHeadHtml(options.configDir, process.env),
},
};
return {
mode: 'development',
devtool: '#cheap-module-eval-source-map',
entry: {
manager: [require.resolve('../../manager')],
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'static/[name].bundle.js',
publicPath: '/',
},
plugins: [
new HtmlWebpackPlugin({
filename: `index.html`,
chunksSortMode: 'none',
alwaysWriteToDisk: true,
inject: false,
templateParameters: (compilation, files, o) => ({
compilation,
files,
options: o,
version,
dlls: [],
...entriesMeta.manager,
}),
template: require.resolve(`@storybook/core/src/server/templates/index.ejs`),
}),
new webpack.DefinePlugin({
storybookOptions: JSON.stringify(options),
}),
new webpack.HotModuleReplacementPlugin(),
new CaseSensitivePathsPlugin(),
new WatchMissingNodeModulesPlugin(nodeModulesPaths),
new webpack.DefinePlugin(environment),
new Dotenv({ silent: true }),
],
module: {
rules: [
{
test: /\.jsx?$/,
loader: require.resolve('babel-loader'),
query: require('./babel.js'), // eslint-disable-line
include: includePaths,
exclude: excludePaths,
},
{
test: /\.md$/,
loader: require.resolve('raw-loader'),
},
],
},
};
};
export default getConfig;

View File

@ -1,77 +0,0 @@
import path from 'path';
import webpack from 'webpack';
import Dotenv from 'dotenv-webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import { getManagerHeadHtml } from '@storybook/core/dist/server/utils/template';
import { version } from '../../../package.json';
import { includePaths, excludePaths, loadEnv } from './utils';
const getConfig = options => {
const environment = loadEnv({ production: true });
const entriesMeta = {
manager: {
headHtmlSnippet: getManagerHeadHtml(options.configDir, process.env),
},
};
const config = {
mode: 'production',
bail: true,
devtool: '#cheap-module-source-map',
entry: {
manager: [path.resolve(__dirname, '../../manager')],
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'static/[name].bundle.js',
// Here we set the publicPath to ''.
// This allows us to deploy storybook into subpaths like GitHub pages.
// This works with css and image loaders too.
// This is working for storybook since, we don't use pushState urls and
// relative URLs works always.
publicPath: '/',
},
plugins: [
new HtmlWebpackPlugin({
filename: `index.html`,
chunksSortMode: 'none',
alwaysWriteToDisk: true,
inject: false,
templateParameters: (compilation, files, o) => ({
compilation,
files,
options: o,
version,
...entriesMeta.manager,
}),
template: require.resolve(`@storybook/core/src/server/templates/index.ejs`),
}),
new webpack.DefinePlugin({
storybookOptions: JSON.stringify(options),
}),
new webpack.optimize.DedupePlugin(),
new webpack.DefinePlugin(environment),
new Dotenv({ silent: true }),
],
module: {
rules: [
{
test: /\.jsx?$/,
loader: require.resolve('babel-loader'),
query: require('./babel.prod.js'), // eslint-disable-line
include: includePaths,
exclude: excludePaths,
},
{
test: /\.md$/,
loader: require.resolve('raw-loader'),
},
],
},
};
return config;
};
export default getConfig;

View File

@ -1,61 +0,0 @@
import fs from 'fs';
import path from 'path';
import { Router } from 'express';
import webpack from 'webpack';
import webpackDevMiddleware from 'webpack-dev-middleware';
import webpackHotMiddleware from 'webpack-hot-middleware';
import baseConfig from './config/webpack.config';
import baseProductionConfig from './config/webpack.config.prod';
import loadConfig from './config';
function getMiddleware(configDir) {
const middlewarePath = path.resolve(configDir, 'middleware.js');
if (fs.existsSync(middlewarePath)) {
let middlewareModule = require(middlewarePath); // eslint-disable-line
if (middlewareModule.__esModule) { // eslint-disable-line
middlewareModule = middlewareModule.default;
}
return middlewareModule;
}
return () => {};
}
export default function(options) {
const { projectDir, configDir } = options;
// Build the webpack configuration using the `baseConfig`
// custom `.babelrc` file and `webpack.config.js` files
const environment = options.environment || 'DEVELOPMENT';
const isProd = environment === 'PRODUCTION';
const currentWebpackConfig = isProd ? baseProductionConfig(options) : baseConfig(options);
const config = loadConfig(environment, currentWebpackConfig, projectDir, configDir);
// remove the leading '/'
let { publicPath } = config.output;
if (publicPath[0] === '/') {
publicPath = publicPath.slice(1);
}
const compiler = webpack(config);
const devMiddlewareOptions = {
noInfo: true,
publicPath: config.output.publicPath,
watchOptions: config.watchOptions || {},
};
const router = new Router();
const middlewareFn = getMiddleware(configDir);
middlewareFn(router);
router.use(webpackDevMiddleware(compiler, devMiddlewareOptions));
if (!isProd) {
router.use(webpackHotMiddleware(compiler));
}
router.get('/', (req, res) => {
res.set('Content-Type', 'text/html');
res.sendFile(path.join(`${__dirname}/public/index.html`));
});
return router;
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -29,8 +29,8 @@
"@babel/plugin-transform-react-constant-elements": "^7.2.0",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@storybook/core": "5.1.0-alpha.4",
"@storybook/node-logger": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"@storybook/node-logger": "5.1.0-alpha.6",
"@svgr/webpack": "^4.0.3",
"babel-plugin-named-asset-import": "^0.3.1",
"babel-plugin-react-docgen": "^2.0.2",

View File

@ -1,4 +1,4 @@
{
"version": "2.0.0",
"name": "react-scripts"
"name": "react-scripts",
"version": "2.0.0"
}

View File

@ -1,4 +1,4 @@
{
"version": "2.1.0",
"name": "react-scripts"
"name": "react-scripts",
"version": "2.1.0"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/riot",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for riot.js: View riot snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -25,7 +25,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -26,7 +26,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -26,7 +26,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.6",
"common-tags": "^1.8.0",
"core-js": "^2.6.5",
"global": "^4.3.2",

View File

@ -60,6 +60,12 @@ module.exports = {
path: `${__dirname}/src/pages/`,
},
},
{
resolve: `gatsby-plugin-styled-components`,
options: {
repoUrl: 'https://github.com/storybooks/storybook',
},
},
{
resolve: 'gatsby-transformer-remark',
options: {

View File

@ -17,16 +17,18 @@
"storybook": "start-storybook -p 9009 -s src/pages"
},
"dependencies": {
"@storybook/addon-actions": "5.0.0-rc.1",
"@storybook/addon-links": "5.0.0-rc.1",
"@storybook/addons": "5.0.0-rc.1",
"@storybook/react": "5.0.0-rc.1",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/react": "5.1.0-alpha.6",
"babel-loader": "^6.4.1",
"babel-plugin-styled-components": "^1.10.0",
"bootstrap": "^4.3.1",
"common-tags": "^1.8.0",
"gatsby": "^1.9.279",
"gatsby-link": "^1.6.45",
"gatsby-plugin-sharp": "^1.6.48",
"gatsby-plugin-styled-components": "^2.0.0",
"gatsby-remark-autolink-headers": "^1.4.19",
"gatsby-remark-copy-linked-files": "^1.5.37",
"gatsby-remark-images": "^1.5.67",

View File

@ -46,11 +46,11 @@ export const url = {
home: `${docsUrl}/basics/introduction/`,
addonInstruction: `${docsUrl}/addons/writing-addons/`,
},
addons: `${homepageUrl}/addons`,
community: `${homepageUrl}/community`,
useCases: `${homepageUrl}/use-cases`,
support: `${homepageUrl}/support`,
team: `${homepageUrl}/team`,
addons: `${homepageUrl}/addons/`,
community: `${homepageUrl}/community/`,
useCases: `${homepageUrl}/use-cases/`,
support: `${homepageUrl}/support/`,
team: `${homepageUrl}/team/`,
// Social
blog: `https://medium.com/storybookjs`,

View File

@ -7,7 +7,7 @@ Storybook is theme-able! You can change theme variables using the [options param
## Set a theme
You can do this in an decorator, addon or in `.storybook/config.js`. Changing theme at runtime is supported!
You can do this in a decorator, an addon or in `.storybook/config.js`. Changing theme at runtime is also supported!
Just modify `.storybook/config.js` to include your new options:
@ -21,15 +21,15 @@ addParameters({
});
```
When setting a theme, set a full theme object, the theme is replaced, not combined.
When setting a theme, set a full theme object. The theme is replaced not combined.
See more addon options at https://github.com/storybooks/storybook/tree/master/addons/options
## Get a theme
We have created 2 themes for you: "normal" (a light theme) and "dark" (a dark theme).
We have created two themes for you: "normal" (a light theme) and "dark" (a dark theme).
You can get these themes like so:
Here's an example of using the "dark" theme:
```js
import { addParameters, configure } from '@storybook/react';
@ -46,9 +46,9 @@ addParameters({
## Create a theme quickstart
The `storybook/theming` is build using TypeScript, so this should help create a valid theme for typescript users. The types are part of the package itself.
The `storybook/theming` is built using TypeScript, so this should help create a valid theme for typescript users. The types are part of the package itself.
The easiest way to customize Storybook to generate a new theme using `create()`. This function includes shorthands for the most common theme variables. Here's how to use it.
The easiest way to customize Storybook is to generate a new theme using the `create()` function from `storybook/theming`. This function includes shorthands for the most common theme variables. Here's how to use it:
First create a new file in `.storybook` called `yourTheme.js`.
@ -124,7 +124,7 @@ export default create({
Some addons require specific theme variables that a Storybook user must add. If you share your theme with the community make sure to support the official and other popular addons so your users have a consistent experience.
For example, the popular Actions addon uses [react-inspector](https://github.com/xyc/react-inspector/blob/master/src/styles/themes/chromeLight.js) which has themes of it's own. Supply additional theme variables to style it like so:
For example, the popular Actions addon uses [react-inspector](https://github.com/xyc/react-inspector/blob/master/src/styles/themes/chromeLight.js) which has themes of its own. Supply additional theme variables to style it like so:
```js
addonActionsTheme: {

View File

@ -140,7 +140,7 @@ storiesOf('Button', module)
}));
```
Each story is a single state of your component. In the above case, there are two stories for the demo button component:
Each story is a single state of your component. In the above case, there are three stories for the demo button component:
```plaintext
Button

View File

@ -1 +1 @@
{"version":"5.1.0-alpha.4","info":{"plain":"### Bug Fixes\n\n* CLI: Fix welcome component in dark theme ([#5998](https://github.com/storybooks/storybook/pull/5998))\n* Polymer: Fix re-rendering lit-html elements after non-lit-html element ([#5868](https://github.com/storybooks/storybook/pull/5868))\n* Addon-a11y: Fix respect 'element' arg in config ([#5996](https://github.com/storybooks/storybook/pull/5996))\n* Addon-a11y: Fix design icons ([#5991](https://github.com/storybooks/storybook/pull/5991))\n* Addon-viewport: Fix viewport iframe dimensions ([#5993](https://github.com/storybooks/storybook/pull/5993))\n\n### Maintenance\n\n* ADD parameters to compile-js to no longer copy .ts files into dist ([#5844](https://github.com/storybooks/storybook/pull/5844))\n\n### Dependency Upgrades\n\n* build(deps): bump react-is from 16.8.3 to 16.8.4 ([#6010](https://github.com/storybooks/storybook/pull/6010))\n* build(deps): bump react-dev-utils from 7.0.3 to 8.0.0 ([#6011](https://github.com/storybooks/storybook/pull/6011))"}}
{"version":"5.1.0-alpha.6","info":{"plain":"### Features\n\n* Angular: add autoprefixing like angular-cli ([#5612](https://github.com/storybooks/storybook/pull/5612))\n\n### Bug Fixes\n\n* UI: Fixing search item in menu ([#6027](https://github.com/storybooks/storybook/pull/6027))\n* Addon-a11y: Run only when a11y tab is active ([#6044](https://github.com/storybooks/storybook/pull/6044))\n\n### Maintenance\n\n* UI: Update syntaxhighlighter stories ([#6054](https://github.com/storybooks/storybook/pull/6054))"}}

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
{
"presets": ["babel-preset-expo"],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
}
}
}

View File

@ -0,0 +1,16 @@
module.exports = {
env: {
development: {
presets: ['babel-preset-expo'],
plugins: ['@babel/plugin-transform-react-jsx-source'],
},
production: {
presets: ['babel-preset-expo'],
plugins: [],
},
storybook: {
presets: [],
plugins: [],
},
},
};

View File

@ -5,5 +5,10 @@ This project was bootstrapped wit [Expo](https://github.com/expo/expo-cli) and s
## Getting started
1. Install dependencies: `yarn install`
2. Run storybook: `yarn storybook`
3. Run the app: `yarn start`
2. Delete node_modules/@storybook
3. Run the storybook server: `yarn storybook`
4. Run the app: `yarn start`
## Iterate on app/react-native
Changes to the yarn workspace do not currently reflect live in this app. To iterate on the react native pieces of storybook, use `scripts/update-crna-kitchen-sink`.

View File

@ -1,6 +1,6 @@
{
"expo": {
"sdkVersion": "30.0.0",
"sdkVersion": "31.0.0",
"platforms": ["ios", "android"],
"androidStatusBarColor": "#C2185B",
"androidStatusBar": {

View File

@ -8,7 +8,7 @@
"eject": "expo eject",
"ios": "expo start --ios",
"start": "expo start",
"storybook": "storybook start",
"storybook": "BABEL_ENV=storybook node ../../app/react-native-server/bin/index",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
@ -16,12 +16,14 @@
},
"dependencies": {
"expo": "^31.0.4",
"prop-types": "^15.7.2",
"react": "^16.2.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"prop-types": "^15.6.2",
"react": "16.5.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
"@storybook/addon-actions": "file:../../packs/storybook-addon-actions.tgz",
"@storybook/addon-knobs": "file:../../packs/storybook-addon-knobs.tgz",
"@storybook/addon-links": "file:../../packs/storybook-addon-links.tgz",
@ -34,18 +36,22 @@
"@storybook/client-logger": "file:../../packs/storybook-client-logger.tgz",
"@storybook/components": "file:../../packs/storybook-components.tgz",
"@storybook/router": "file:../../packs/storybook-router.tgz",
"@storybook/core": "file:../../packs/storybook-core.tgz",
"@storybook/core": "file:../../lib/core",
"@storybook/core-events": "file:../../packs/storybook-core-events.tgz",
"@storybook/node-logger": "file:../../packs/storybook-node-logger.tgz",
"@storybook/react-native": "file:../../packs/storybook-react-native.tgz",
"@storybook/react-native-server": "file:../../packs/storybook-react-native-server.tgz",
"@storybook/addon-notes": "file:../../packs/storybook-addon-notes.tgz",
"@storybook/addon-ondevice-backgrounds": "file:../../packs/storybook-addon-ondevice-backgrounds.tgz",
"@storybook/addon-ondevice-knobs": "file:../../packs/storybook-addon-ondevice-knobs.tgz",
"@storybook/addon-ondevice-notes": "file:../../packs/storybook-addon-ondevice-notes.tgz",
"@storybook/ui": "file:../../packs/storybook-ui.tgz",
"@storybook/theming": "file:../../packs/storybook-theming.tgz",
"core-js": "^2.5.7",
"babel-loader": "^8.0.4",
"babel-preset-expo": "^5.0.0",
"jest-expo": "^31.0.0",
"react-dom": "^16.2.0",
"react-test-renderer": "^16.6.0"
"schedule": "^0.4.0",
"react-test-renderer": "16.5.1"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,14 @@
{
"name": "angular-cli",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"license": "MIT",
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build": "ng build",
"build-storybook": "npm run storybook:prebuild && build-storybook -s src/assets",
"e2e": "ng e2e",
"ng": "ng",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"start": "ng serve",
"storybook": "npm run storybook:prebuild && start-storybook -p 9008 -s src/assets",
"storybook:prebuild": "npm run test:generate-output",
@ -32,20 +32,20 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.13.4",
"@angular/cli": "^7.3.3",
"@angular/cli": "^7.3.6",
"@angular/compiler-cli": "^7.2.6",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-jest": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/angular": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-jest": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/angular": "5.1.0-alpha.6",
"@types/core-js": "^2.5.0",
"@types/jest": "^24.0.11",
"@types/node": "~11.11.0",

View File

@ -1,12 +1,12 @@
{
"name": "cra-kitchen-sink",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build": "react-scripts build",
"build-storybook": "build-storybook -s public",
"eject": "react-scripts eject",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"start": "react-scripts start",
"storybook": "start-storybook -p 9010 -s public",
"test": "react-scripts test --env=jsdom"
@ -15,25 +15,25 @@
"global": "^4.3.2",
"prop-types": "^15.7.2",
"react": "^16.8.4",
"react-dom": "^16.8.3",
"react-dom": "^16.8.4",
"react-lifecycles-compat": "^3.0.4"
},
"devDependencies": {
"@storybook/addon-a11y": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-events": "5.1.0-alpha.4",
"@storybook/addon-info": "5.1.0-alpha.4",
"@storybook/addon-jest": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/client-logger": "5.1.0-alpha.4",
"@storybook/react": "5.1.0-alpha.4",
"@storybook/addon-a11y": "5.1.0-alpha.6",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-events": "5.1.0-alpha.6",
"@storybook/addon-info": "5.1.0-alpha.6",
"@storybook/addon-jest": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/client-logger": "5.1.0-alpha.6",
"@storybook/react": "5.1.0-alpha.6",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.9.1",
"enzyme-to-json": "^3.3.5",

View File

@ -1,11 +1,11 @@
{
"name": "cra-ts-kitchen-sink",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build-storybook": "build-storybook -s public",
"lint": "tslint src/**/*.ts{,x}",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "start-storybook -p 9010 -s public",
"test": "react-scripts test --env=jsdom"
},
@ -17,14 +17,14 @@
},
"dependencies": {
"react": "^16.8.4",
"react-dom": "^16.8.3"
"react-dom": "^16.8.4"
},
"devDependencies": {
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-info": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/react": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-info": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/react": "5.1.0-alpha.6",
"@types/enzyme": "^3.9.0",
"@types/react": "^16.8.4",
"@types/react-dom": "^16.8.2",

View File

@ -1,12 +1,12 @@
{
"name": "ember-example",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build": "ember build",
"build-storybook": "yarn build && cp -r public/* dist && build-storybook -s dist",
"dev": "ember serve",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "yarn build && start-storybook -p 9009 -s dist",
"storybook:dev": "yarn dev & start-storybook -p 9009 -s dist"
},
@ -15,18 +15,18 @@
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@storybook/addon-a11y": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/ember": "5.1.0-alpha.4",
"@storybook/addon-a11y": "5.1.0-alpha.6",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/ember": "5.1.0-alpha.6",
"babel-loader": "^8",
"broccoli-asset-rev": "^3.0.0",
"cross-env": "^5.2.0",

View File

@ -1,6 +1,6 @@
{
"name": "html-kitchen-sink",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"description": "",
"keywords": [],
@ -8,29 +8,29 @@
"author": "",
"main": "index.js",
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build-storybook": "build-storybook",
"generate-addon-jest-testresults": "jest --config=tests/addon-jest.config.json --json --outputFile=stories/addon-jest.testresults.json",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "start-storybook -p 9006"
},
"devDependencies": {
"@storybook/addon-a11y": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-events": "5.1.0-alpha.4",
"@storybook/addon-jest": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/core": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/html": "5.1.0-alpha.4",
"@storybook/addon-a11y": "5.1.0-alpha.6",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-events": "5.1.0-alpha.6",
"@storybook/addon-jest": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/core": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/html": "5.1.0-alpha.6",
"eventemitter3": "^3.1.0",
"format-json": "^1.0.3",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "marko-cli",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"description": "Demo of how to build an app using marko-starter",
"repository": {
@ -10,9 +10,9 @@
},
"license": "MIT",
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build": "NODE_ENV=production marko-starter build",
"build-storybook": "build-storybook",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"prettier": "prettier src/**/*.{js,css,less} *.js --write",
"serve-static": "NODE_ENV=production marko-starter serve-static",
"start": "marko-starter server",
@ -24,12 +24,12 @@
"marko-starter": "^2.0.4"
},
"devDependencies": {
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/marko": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/marko": "5.1.0-alpha.6",
"prettier": "^1.16.4",
"webpack": "^4.29.6"
}

View File

@ -1,28 +1,28 @@
{
"name": "mithril-example",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build-storybook": "build-storybook",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "start-storybook -p 9007"
},
"dependencies": {
"mithril": "^1.1.6"
},
"devDependencies": {
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/mithril": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/mithril": "5.1.0-alpha.6",
"webpack": "^4.29.6"
}
}

View File

@ -1,41 +1,41 @@
{
"name": "official-storybook",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build-storybook": "build-storybook -c ./ -s built-storybooks",
"chromatic": "chromatic test --storybook-addon --exit-zero-on-changes --app-code ab7m45tp9p",
"do-image-snapshots": "../../node_modules/.bin/jest --projects=./image-snapshots",
"generate-addon-jest-testresults": "jest --config=tests/addon-jest.config.json --json --outputFile=stories/addon-jest.testresults.json",
"graphql": "node ./graphql-server/index.js",
"image-snapshots": "yarn run build-storybook && yarn run do-image-snapshots",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./ -s built-storybooks --no-dll"
},
"devDependencies": {
"@storybook/addon-a11y": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-cssresources": "5.1.0-alpha.4",
"@storybook/addon-events": "5.1.0-alpha.4",
"@storybook/addon-graphql": "5.1.0-alpha.4",
"@storybook/addon-info": "5.1.0-alpha.4",
"@storybook/addon-jest": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addon-storyshots-puppeteer": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/components": "5.1.0-alpha.4",
"@storybook/core-events": "5.1.0-alpha.4",
"@storybook/node-logger": "5.1.0-alpha.4",
"@storybook/react": "5.1.0-alpha.4",
"@storybook/theming": "5.1.0-alpha.4",
"@storybook/addon-a11y": "5.1.0-alpha.6",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-cssresources": "5.1.0-alpha.6",
"@storybook/addon-events": "5.1.0-alpha.6",
"@storybook/addon-graphql": "5.1.0-alpha.6",
"@storybook/addon-info": "5.1.0-alpha.6",
"@storybook/addon-jest": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addon-storyshots-puppeteer": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/components": "5.1.0-alpha.6",
"@storybook/core-events": "5.1.0-alpha.6",
"@storybook/node-logger": "5.1.0-alpha.6",
"@storybook/react": "5.1.0-alpha.6",
"@storybook/theming": "5.1.0-alpha.6",
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"enzyme-to-json": "^3.3.5",
@ -49,7 +49,7 @@
"paths.macro": "^2.0.2",
"prop-types": "^15.7.2",
"react": "^16.8.4",
"react-dom": "^16.8.3",
"react-dom": "^16.8.4",
"storybook-chromatic": "^1.2.6",
"ts-loader": "^5.3.3",
"uuid": "^3.3.2",

View File

@ -8388,6 +8388,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = `
<a
class="emotion-1"
href="./"
target=""
>
<svg
class="emotion-0"
@ -9813,6 +9814,7 @@ exports[`Storyshots UI|Sidebar/Sidebar simple 1`] = `
<a
class="emotion-1"
href="./"
target=""
>
<svg
class="emotion-0"
@ -10393,6 +10395,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading customBrandImage 1`] = `
<a
class="emotion-1"
href="https://example.com"
target="_blank"
>
<img
alt="My Title"
@ -10693,6 +10696,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading linkAndText 1`] = `
<a
class="emotion-0"
href="https://example.com"
target="_blank"
>
My title
</a>
@ -11300,6 +11304,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading menuHighlighted 1`] = `
<a
class="emotion-1"
href="./"
target=""
>
<svg
class="emotion-0"
@ -11930,6 +11935,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading standard 1`] = `
<a
class="emotion-1"
href="./"
target=""
>
<svg
class="emotion-0"

View File

@ -1,24 +1,24 @@
{
"name": "polymer-cli",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build-storybook": "build-storybook",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"start": "webpack-dev-server",
"storybook": "start-storybook -p 9001 -c .storybook"
},
"dependencies": {
"@polymer/polymer": "^2.6.0",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/polymer": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/polymer": "5.1.0-alpha.6",
"@webcomponents/webcomponentsjs": "^1.2.0",
"global": "^4.3.2",
"lit-html": "^1.0.0",

View File

@ -1,12 +1,12 @@
{
"name": "preact-example",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"build-storybook": "build-storybook -s public",
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "start-storybook -p 9009 -s public"
},
"dependencies": {
@ -16,18 +16,18 @@
"devDependencies": {
"@babel/core": "^7.3.4",
"@babel/plugin-transform-runtime": "^7.2.0",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/preact": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/preact": "5.1.0-alpha.6",
"babel-loader": "^8.0.4",
"cross-env": "^5.2.0",
"file-loader": "^3.0.1",

View File

@ -1,12 +1,12 @@
{
"name": "riot-example",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"build-storybook": "build-storybook -s public",
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "start-storybook -p 9009 -s public"
},
"dependencies": {
@ -16,18 +16,18 @@
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/riot": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/riot": "5.1.0-alpha.6",
"babel-loader": "^8.0.4",
"cross-env": "^5.2.0",
"file-loader": "^3.0.1",

View File

@ -1,27 +1,27 @@
{
"name": "svelte-example",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build-storybook": "build-storybook -s public",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "start-storybook -p 9009 -s public"
},
"dependencies": {
"global": "^4.3.2"
},
"devDependencies": {
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/svelte": "5.1.0-alpha.4"
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/svelte": "5.1.0-alpha.6"
}
}

View File

@ -1,12 +1,12 @@
{
"name": "vue-example",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"private": true,
"scripts": {
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"build-storybook": "build-storybook -s public",
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
"storybook": "start-storybook -p 9009 -s public"
},
"dependencies": {
@ -15,18 +15,18 @@
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@storybook/addon-actions": "5.1.0-alpha.4",
"@storybook/addon-backgrounds": "5.1.0-alpha.4",
"@storybook/addon-centered": "5.1.0-alpha.4",
"@storybook/addon-knobs": "5.1.0-alpha.4",
"@storybook/addon-links": "5.1.0-alpha.4",
"@storybook/addon-notes": "5.1.0-alpha.4",
"@storybook/addon-options": "5.1.0-alpha.4",
"@storybook/addon-storyshots": "5.1.0-alpha.4",
"@storybook/addon-storysource": "5.1.0-alpha.4",
"@storybook/addon-viewport": "5.1.0-alpha.4",
"@storybook/addons": "5.1.0-alpha.4",
"@storybook/vue": "5.1.0-alpha.4",
"@storybook/addon-actions": "5.1.0-alpha.6",
"@storybook/addon-backgrounds": "5.1.0-alpha.6",
"@storybook/addon-centered": "5.1.0-alpha.6",
"@storybook/addon-knobs": "5.1.0-alpha.6",
"@storybook/addon-links": "5.1.0-alpha.6",
"@storybook/addon-notes": "5.1.0-alpha.6",
"@storybook/addon-options": "5.1.0-alpha.6",
"@storybook/addon-storyshots": "5.1.0-alpha.6",
"@storybook/addon-storysource": "5.1.0-alpha.6",
"@storybook/addon-viewport": "5.1.0-alpha.6",
"@storybook/addons": "5.1.0-alpha.6",
"@storybook/vue": "5.1.0-alpha.6",
"babel-core": "^7.0.0-bridge.0",
"babel-loader": "^8.0.5",
"cross-env": "^5.2.0",

View File

@ -11,5 +11,5 @@
"npmClient": "yarn",
"useWorkspaces": true,
"registry": "https://registry.npmjs.org",
"version": "5.1.0-alpha.4"
"version": "5.1.0-alpha.6"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addons",
"version": "5.1.0-alpha.4",
"version": "5.1.0-alpha.6",
"description": "Storybook addons store",
"keywords": [
"storybook"
@ -21,8 +21,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/channels": "5.1.0-alpha.4",
"@storybook/client-logger": "5.1.0-alpha.4",
"@storybook/channels": "5.1.0-alpha.6",
"@storybook/client-logger": "5.1.0-alpha.6",
"core-js": "^2.6.5",
"global": "^4.3.2",
"util-deprecate": "^1.0.2"

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