Merge remote-tracking branch 'origin/next' into preview-hooks

# Conflicts:
#	addons/actions/package.json
#	addons/events/package.json
#	addons/ondevice-notes/package.json
#	dev-kits/addon-roundtrip/package.json
#	examples/dev-kits/package.json
#	examples/html-kitchen-sink/package.json
This commit is contained in:
Hypnosphi 2019-07-04 19:11:21 +03:00
commit c8d437b789
121 changed files with 1086 additions and 635 deletions

View File

@ -1,3 +1,9 @@
## 5.2.0-alpha.35 (July 3, 2019)
### Bug Fixes
* React-Native: Fix null story check ([#7243](https://github.com/storybookjs/storybook/pull/7243))
## 5.2.0-alpha.34 (July 2, 2019)
### Bug Fixes

View File

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

View File

@ -2,7 +2,7 @@ import React, { Fragment, FunctionComponent } from 'react';
import { styled } from '@storybook/theming';
import { addons, types } from '@storybook/addons';
import { ADDON_ID, PANEL_ID } from './constants';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
import { ColorBlindness } from './components/ColorBlindness';
import { A11YPanel } from './components/A11YPanel';
@ -94,6 +94,7 @@ addons.register(ADDON_ID, api => {
title: 'Accessibility',
type: types.PANEL,
render: ({ active, key }) => <A11YPanel key={key} api={api} active={active} />,
paramKey: PARAM_KEY,
});
addons.add(PANEL_ID, {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Action Logger addon for storybook",
"keywords": [
"storybook"
@ -21,12 +21,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/api": "5.2.0-alpha.34",
"@storybook/client-api": "5.2.0-alpha.34",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/api": "5.2.0-alpha.35",
"@storybook/client-api": "5.2.0-alpha.35",
"@storybook/components": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"fast-deep-equal": "^2.0.1",
"global": "^4.3.2",

View File

@ -1,3 +1,4 @@
export const PARAM_KEY = 'actions';
export const ADDON_ID = 'storybook/actions';
export const PANEL_ID = `${ADDON_ID}/panel`;
export const EVENT_ID = `${ADDON_ID}/action-event`;

View File

@ -1,13 +1,14 @@
import React from 'react';
import addons from '@storybook/addons';
import ActionLogger from './containers/ActionLogger';
import { ADDON_ID, PANEL_ID } from '.';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
export function register() {
addons.register(ADDON_ID, api => {
addons.addPanel(PANEL_ID, {
title: 'Actions',
render: ({ active, key }) => <ActionLogger key={key} api={api} active={active} />,
paramKey: PARAM_KEY,
});
});
}

View File

@ -2,4 +2,5 @@ export interface ActionOptions {
depth?: number;
clearOnStoryChange?: boolean;
limit?: number;
allowFunction?: boolean;
}

View File

@ -0,0 +1,81 @@
import { ActionOptions } from './ActionOptions';
import { ActionsMap } from './ActionsMap';
export interface ActionsFunction {
<T extends string>(handlerMap: Record<T, string>, options?: ActionOptions): ActionsMap<T>;
<T extends string>(...handlers: T[]): ActionsMap<T>;
<T extends string>(handler1: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(
handler1: T,
handler2: T,
handler3: T,
handler4: T,
options?: ActionOptions
): ActionsMap<T>;
<T extends string>(
handler1: T,
handler2: T,
handler3: T,
handler4: T,
handler5: T,
options?: ActionOptions
): ActionsMap<T>;
<T extends string>(
handler1: T,
handler2: T,
handler3: T,
handler4: T,
handler5: T,
handler6: T,
options?: ActionOptions
): ActionsMap<T>;
<T extends string>(
handler1: T,
handler2: T,
handler3: T,
handler4: T,
handler5: T,
handler6: T,
handler7: T,
options?: ActionOptions
): ActionsMap<T>;
<T extends string>(
handler1: T,
handler2: T,
handler3: T,
handler4: T,
handler5: T,
handler6: T,
handler7: T,
handler8: T,
options?: ActionOptions
): ActionsMap<T>;
<T extends string>(
handler1: T,
handler2: T,
handler3: T,
handler4: T,
handler5: T,
handler6: T,
handler7: T,
handler8: T,
handler9: T,
options?: ActionOptions
): ActionsMap<T>;
<T extends string>(
handler1: T,
handler2: T,
handler3: T,
handler4: T,
handler5: T,
handler6: T,
handler7: T,
handler8: T,
handler9: T,
handler10: T,
options?: ActionOptions
): ActionsMap<T>;
}

View File

@ -1,5 +1,3 @@
import { HandlerFunction } from './HandlerFunction';
export interface ActionsMap {
[key: string]: HandlerFunction;
}
export type ActionsMap<T extends string = string> = Record<T, HandlerFunction>;

View File

@ -1,4 +1,5 @@
export * from './ActionDisplay';
export * from './ActionsFunction';
export * from './ActionOptions';
export * from './ActionsMap';
export * from './DecoratorFunction';

View File

@ -91,3 +91,62 @@ describe('Depth config', () => {
});
});
});
describe('allowFunction config', () => {
it('with global allowFunction false', () => {
const channel = createChannel();
const allowFunction = false;
configureActions({
allowFunction,
});
action('test-action')({
root: {
one: {
a: 1,
b: () => 'foo',
},
},
});
expect(getChannelData(channel)[0]).toEqual({
root: {
one: {
a: 1,
b: expect.any(Function),
},
},
});
});
// TODO: this test is pretty pointless, as the real channel isn't used, nothing is changed
it('with global allowFunction true', () => {
const channel = createChannel();
const allowFunction = true;
configureActions({
allowFunction,
});
action('test-action')({
root: {
one: {
a: 1,
b: () => 'foo',
},
},
});
expect(getChannelData(channel)[0]).toEqual({
root: {
one: {
a: 1,
b: expect.any(Function),
},
},
});
});
});

View File

@ -22,6 +22,7 @@ export function action(name: string, options: ActionOptions = {}): HandlerFuncti
options: {
...actionOptions,
depth: minDepth + (actionOptions.depth || 3),
allowFunction: actionOptions.allowFunction || false,
},
};
channel.emit(EVENT_ID, actionDisplayToEmit);

View File

@ -1,8 +1,8 @@
import { action } from './action';
import { ActionOptions, ActionsMap } from '../models';
import { ActionsFunction, ActionOptions, ActionsMap } from '../models';
import { config } from './configureActions';
export function actions(...args: any[]): ActionsMap {
export const actions: ActionsFunction = (...args: any[]) => {
let options: ActionOptions = config;
const names = args;
// last argument can be options
@ -26,4 +26,4 @@ export function actions(...args: any[]): ActionsMap {
actionsObject[name] = action(namesObject[name], options);
});
return actionsObject;
}
};

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-contexts",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Storybook Addon Contexts",
"keywords": [
"storybook",
@ -28,10 +28,10 @@
"dev:check-types": "tsc --noEmit"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/api": "5.2.0-alpha.34",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/api": "5.2.0-alpha.35",
"@storybook/components": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"core-js": "^3.0.1"
},
"peerDependencies": {

View File

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

View File

@ -1,7 +1,7 @@
import React from 'react';
import { addons, types } from '@storybook/addons';
import { ADDON_ID, PANEL_ID } from './constants';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
import { CssResourcePanel } from './css-resource-panel';
addons.register(ADDON_ID, api => {
@ -10,5 +10,6 @@ addons.register(ADDON_ID, api => {
type: types.PANEL,
title: 'CSS resources',
render: ({ active }) => <CssResourcePanel key={PANEL_ID} api={api} active={active} />,
paramKey: PARAM_KEY,
});
});

View File

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

View File

@ -2,7 +2,7 @@ import React from 'react';
import { addons, types } from '@storybook/addons';
import { AddonPanel } from '@storybook/components';
import { ADDON_ID, PANEL_ID } from './constants';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
import { Panel } from './panel';
addons.register(ADDON_ID, () => {
@ -14,5 +14,6 @@ addons.register(ADDON_ID, () => {
<Panel />
</AddonPanel>
),
paramKey: PARAM_KEY,
});
});

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Superior documentation for your components",
"keywords": [
"addon",
@ -28,11 +28,11 @@
"@mdx-js/loader": "^1.0.0",
"@mdx-js/mdx": "^1.0.0",
"@mdx-js/react": "^1.0.16",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/api": "5.2.0-alpha.34",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/router": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/api": "5.2.0-alpha.35",
"@storybook/components": "5.2.0-alpha.35",
"@storybook/router": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"global": "^4.3.2",
"lodash": "^4.17.11",

View File

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

View File

@ -1,3 +1,5 @@
export const PARAM_KEY = 'events';
export const ADDON_ID = 'storybook/events';
export const PANEL_ID = `${ADDON_ID}/panel`;

View File

@ -2,7 +2,7 @@ import React from 'react';
import addons from '@storybook/addons';
import Panel from './components/Panel';
import { ADDON_ID, PANEL_ID } from './constants';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
export function register() {
addons.register(ADDON_ID, api => {
@ -10,6 +10,7 @@ export function register() {
title: 'Events',
// eslint-disable-next-line react/prop-types
render: ({ active, key }) => <Panel key={key} api={api} active={active} />,
paramKey: PARAM_KEY,
});
});
}

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-graphql",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Storybook addon to display the GraphiQL IDE",
"keywords": [
"addon",
@ -22,8 +22,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/api": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/api": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"global": "^4.3.2",
"graphiql": "^0.13.0",

View File

@ -1,7 +1,7 @@
import { addons, types } from '@storybook/addons';
import GQL from './manager';
import { ADDON_ID } from '.';
import { ADDON_ID, PARAM_KEY } from '.';
export const register = () => {
addons.register(ADDON_ID, () => {
@ -11,6 +11,7 @@ export const register = () => {
route: ({ storyId }) => `/graphql/${storyId}`,
match: ({ viewMode }) => viewMode === 'graphql',
render: GQL,
paramKey: PARAM_KEY,
});
});
};

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-info",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "A Storybook addon to show additional information for your stories.",
"keywords": [
"addon",
@ -22,10 +22,10 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/client-logger": "5.2.0-alpha.34",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/client-logger": "5.2.0-alpha.35",
"@storybook/components": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"global": "^4.3.2",
"jsx-to-string": "^1.4.0",

View File

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

View File

@ -1,6 +1,6 @@
import React from 'react';
import addons from '@storybook/addons';
import { ADDON_ID, PANEL_ID } from './shared';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './shared';
import Panel from './components/Panel';
@ -8,5 +8,6 @@ addons.register(ADDON_ID, api => {
addons.addPanel(PANEL_ID, {
title: 'tests',
render: ({ active, key }) => <Panel key={key} api={api} active={active} />,
paramKey: PARAM_KEY,
});
});

View File

@ -1,4 +1,5 @@
// addons, panels and events get unique names using a prefix
export const PARAM_KEY = 'test';
export const ADDON_ID = 'storybookjs/test';
export const PANEL_ID = `${ADDON_ID}/panel`;

View File

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

View File

@ -1,12 +1,13 @@
import React from 'react';
import addons from '@storybook/addons';
import Panel from './components/Panel';
import { ADDON_ID, PANEL_ID } from './shared';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './shared';
addons.register(ADDON_ID, api => {
addons.addPanel(PANEL_ID, {
title: 'Knobs',
// eslint-disable-next-line react/prop-types
render: ({ active, key }) => <Panel api={api} key={key} active={active} />,
paramKey: PARAM_KEY,
});
});

View File

@ -1,4 +1,5 @@
// addons, panels and events get unique names using a prefix
export const PARAM_KEY = 'knobs';
export const ADDON_ID = 'storybookjs/knobs';
export const PANEL_ID = `${ADDON_ID}/panel`;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Story Links addon for storybook",
"keywords": [
"addon",
@ -22,9 +22,9 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/router": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/router": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-notes",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Write notes for your Storybook stories.",
"keywords": [
"addon",
@ -23,13 +23,13 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/api": "5.2.0-alpha.34",
"@storybook/client-logger": "5.2.0-alpha.34",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/router": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/api": "5.2.0-alpha.35",
"@storybook/client-logger": "5.2.0-alpha.35",
"@storybook/components": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/router": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"global": "^4.3.2",
"markdown-to-jsx": "^6.9.3",

View File

@ -1,7 +1,7 @@
import * as React from 'react';
import addons, { types } from '@storybook/addons';
import { ADDON_ID, PANEL_ID } from './shared';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './shared';
// TODO: fix eslint in tslint (igor said he fixed it, should ask him)
import Panel from './Panel';
@ -14,6 +14,7 @@ export default function register(type: types) {
route: ({ storyId }) => `/info/${storyId}`, // todo add type
match: ({ viewMode }) => viewMode === 'info', // todo add type
render: ({ active }) => <Panel api={api} active={active} />,
paramKey: PARAM_KEY,
});
});
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-ondevice-actions",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Action Logger addon for react-native storybook",
"keywords": [
"storybook"
@ -19,13 +19,13 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"core-js": "^2.5.7",
"fast-deep-equal": "^2.0.1"
},
"devDependencies": {
"@storybook/addon-actions": "5.2.0-alpha.34"
"@storybook/addon-actions": "5.2.0-alpha.35"
},
"peerDependencies": {
"@storybook/addon-actions": "*",

View File

@ -1,6 +1,6 @@
import React from 'react';
import addons from '@storybook/addons';
import { ADDON_ID, PANEL_ID } from '@storybook/addon-actions';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from '@storybook/addon-actions';
import ActionLogger from './containers/ActionLogger';
export function register() {
@ -8,6 +8,7 @@ export function register() {
addons.addPanel(PANEL_ID, {
title: 'Actions',
render: ({ active, key }) => <ActionLogger key={key} active={active} />,
paramKey: PARAM_KEY,
});
});
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-ondevice-backgrounds",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "A react-native storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
@ -24,7 +24,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"prop-types": "^15.7.2"
},

View File

@ -3,7 +3,7 @@ import React, { Component } from 'react';
import { View, Text } from 'react-native';
import Events from '@storybook/core-events';
import Swatch from './Swatch';
import Constants from './constants';
import BackgroundEvents, { PARAM_KEY } from './constants';
const codeSample = `
import { storiesOf } from '@storybook/react-native';
@ -46,7 +46,7 @@ export default class BackgroundPanel extends Component {
}
setBackgroundFromSwatch = background => {
this.props.channel.emit(Constants.UPDATE_BACKGROUND, background);
this.props.channel.emit(BackgroundEvents.UPDATE_BACKGROUND, background);
};
onStorySelected = selection => {
@ -63,7 +63,7 @@ export default class BackgroundPanel extends Component {
const story = api
.store()
.getStoryAndParameters(this.state.selection.kind, this.state.selection.story);
const backgrounds = story.parameters[Constants.PARAM_KEY];
const backgrounds = story.parameters[PARAM_KEY];
return (
<View>

View File

@ -1,3 +1,4 @@
export const PARAM_KEY = 'background';
export const ADDON_ID = 'storybook-addon-background';
export const PANEL_ID = `${ADDON_ID}/background-panel`;
@ -5,5 +6,4 @@ export default {
SET: `${ADDON_ID}:set`,
UNSET: `${ADDON_ID}:unset`,
UPDATE_BACKGROUND: `${ADDON_ID}:update`,
PARAM_KEY: 'backgrounds',
};

View File

@ -1,7 +1,7 @@
import React from 'react';
import addons from '@storybook/addons';
import { ADDON_ID, PANEL_ID } from './constants';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
import BackgroundPanel from './BackgroundPanel';
addons.register(ADDON_ID, api => {
@ -10,5 +10,6 @@ addons.register(ADDON_ID, api => {
title: 'Backgrounds',
// eslint-disable-next-line react/prop-types
render: ({ active }) => <BackgroundPanel channel={channel} api={api} active={active} />,
paramKey: PARAM_KEY,
});
});

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-ondevice-knobs",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Display storybook story knobs on your deviced.",
"keywords": [
"addon",
@ -21,8 +21,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"deep-equal": "^1.0.1",
"prop-types": "^15.7.2",

View File

@ -9,6 +9,7 @@ export function register() {
title: 'Knobs',
// eslint-disable-next-line react/prop-types
render: ({ active, key }) => <Panel key={key} channel={channel} active={active} />,
paramKey: 'knobs',
});
});
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-ondevice-notes",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Write notes for your react-native Storybook stories.",
"keywords": [
"addon",
@ -20,8 +20,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/client-logger": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/client-logger": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"prop-types": "^15.7.2",
"react-native-simple-markdown": "^1.1.0"

View File

@ -49,5 +49,6 @@ addons.register('storybook/notes', api => {
addons.addPanel('storybook/notes/panel', {
title: 'Notes',
render: ({ active, key }) => <Notes key={key} channel={channel} api={api} active={active} />,
paramKey: PARAM_KEY,
});
});

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-options",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Options addon for storybook",
"keywords": [
"addon",
@ -22,7 +22,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"util-deprecate": "^1.0.2"
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-queryparams",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "parameter addon for storybook",
"keywords": [
"addon",
@ -23,12 +23,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/api": "5.2.0-alpha.34",
"@storybook/client-logger": "5.2.0-alpha.34",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/api": "5.2.0-alpha.35",
"@storybook/client-logger": "5.2.0-alpha.35",
"@storybook/components": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots-puppeteer",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Image snappshots addition to StoryShots base on puppeteer",
"keywords": [
"addon",
@ -22,8 +22,8 @@
"prepare": "node ../../../scripts/prepare.js"
},
"dependencies": {
"@storybook/node-logger": "5.2.0-alpha.34",
"@storybook/router": "5.2.0-alpha.34",
"@storybook/node-logger": "5.2.0-alpha.35",
"@storybook/router": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"jest-image-snapshot": "^2.8.2",
"regenerator-runtime": "^0.12.1"

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/angular",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/node-logger": "5.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"@storybook/node-logger": "5.2.0-alpha.35",
"angular2-template-loader": "^0.6.2",
"core-js": "^3.0.1",
"fork-ts-checker-webpack-plugin": "^1.3.4",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/marko",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/mithril",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/polymer",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"@webcomponents/webcomponentsjs": "^1.2.0",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/rax",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Storybook for Rax: Develop Rax Component in isolation.",
"keywords": [
"storybook",
@ -27,7 +27,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/core": "5.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"babel-preset-rax": "^1.0.0-beta.0",
"common-tags": "^1.8.0",
"core-js": "^2.6.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-native-server",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "A better way to develop React Native Components for your app",
"keywords": [
"react",
@ -24,12 +24,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/api": "5.2.0-alpha.34",
"@storybook/channel-websocket": "5.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/ui": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/api": "5.2.0-alpha.35",
"@storybook/channel-websocket": "5.2.0-alpha.35",
"@storybook/core": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/ui": "5.2.0-alpha.35",
"commander": "^2.19.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-native",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "A better way to develop React Native Components for your app",
"keywords": [
"react",
@ -23,11 +23,11 @@
},
"dependencies": {
"@emotion/native": "^10.0.10",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/channel-websocket": "5.2.0-alpha.34",
"@storybook/channels": "5.2.0-alpha.34",
"@storybook/client-api": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/channel-websocket": "5.2.0-alpha.35",
"@storybook/channels": "5.2.0-alpha.35",
"@storybook/client-api": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"react-native-swipe-gestures": "^1.0.3",
"rn-host-detect": "^1.1.5"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/node-logger": "5.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"@storybook/node-logger": "5.2.0-alpha.35",
"@svgr/webpack": "^4.0.3",
"babel-plugin-add-react-displayname": "^0.0.5",
"babel-plugin-named-asset-import": "^0.3.1",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/riot",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.35",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"global": "^4.3.2",

View File

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

View File

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

View File

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

View File

@ -15,10 +15,10 @@
"serve": "gatsby serve"
},
"dependencies": {
"@storybook/components": "5.2.0-alpha.23",
"@storybook/theming": "5.2.0-alpha.23",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.35",
"babel-loader": "^6.4.1",
"babel-plugin-styled-components": "^1.10.1",
"babel-plugin-styled-components": "^1.10.6",
"bootstrap": "^4.3.1",
"common-tags": "^1.8.0",
"gatsby": "^1.9.279",
@ -36,7 +36,7 @@
"html-react-parser": "^0.8.0",
"is-builtin-module": "^3.0.0",
"lodash": "^4.17.11",
"marked": "^0.6.2",
"marked": "^0.6.3",
"polished": "^3.4.1",
"prop-types": "^15.7.2",
"react": "^16.8.6",
@ -47,7 +47,7 @@
"react-router": "^4.3.1",
"react-stack-grid": "^0.7.1",
"recompose": "^0.30.0",
"sitemap": "^2.2.0",
"sitemap": "^3.0.0",
"styled-components": "^4.3.2",
"validatorjs": "^3.15.1"
}

View File

@ -65,6 +65,29 @@ Then you'll be able to see those notes when you are viewing the story.
![Stories with notes](../static/stories-with-notes.png)
## Disable the addon
You can disable an addon panel for a story by adding a `disabled` parameter.
```js
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Button from './Button';
storiesOf('Button', module).add(
'with some emoji',
() => (
<Button onClick={action('clicked')}>
<span role="img" aria-label="so cool">
😀 😎 👍 💯
</span>
</Button>
),
{ notes: { disabled: true } }
);
```
## Global Configuration
Sometimes you might want to configure an addon globally, as in the case of collocating stories with components, or just simply to keep your stories file cleaner. To do that, you can add your decorators to a config file, typically in `.storybook/config.js`. Here's an example of how you might do that.

View File

@ -89,6 +89,7 @@ addons.register(ADDON_ID, api => {
type: types.PANEL,
title,
render,
paramKey: PARAM_KEY,
});
});
```
@ -246,6 +247,34 @@ storiesOf('Button', module)
});
```
### Disabling an addon panel
It's possible to disable an addon panel for a particular story.
To offer that capability, you need to pass the paramKey when you register the panel
```js
addons.register(ADDON_ID, () => {
addons.add(PANEL_ID, {
type: types.PANEL,
title: 'My Addon',
render: () => <div>Addon tab content</div>,
paramKey: 'myAddon',
});
});
```
While adding a story, you can then pass a `disabled` parameter.
```js
storiesOf('Button', module)
.add('with text', () => <Button>Hello Button</Button>, {
myAddon: {
disabled: true,
},
});
```
## Styling your addon
We use [emotion](https://emotion.sh) for styling, AND we provide a theme which can be set by the user!

View File

@ -1 +1 @@
{"version":"5.2.0-alpha.34","info":{"plain":"### Bug Fixes\n\n* CLI: Fix `--preview-url` for static builds ([#7245](https://github.com/storybookjs/storybook/pull/7245))\n* Addon-docs: Fix non-React support & add Vue example ([#7222](https://github.com/storybookjs/storybook/pull/7222))\n* CLI: Move the free port logic so that loadOptions don't override it ([#7237](https://github.com/storybookjs/storybook/pull/7237))"}}
{"version":"5.2.0-alpha.35","info":{"plain":"### Bug Fixes\n\n* React-Native: Fix null story check ([#7243](https://github.com/storybookjs/storybook/pull/7243))"}}

View File

@ -254,17 +254,6 @@
dependencies:
"@ndhoule/each" "^2.0.1"
"@reach/router@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@reach/router/-/router-1.2.1.tgz#34ae3541a5ac44fa7796e5506a5d7274a162be4e"
integrity sha512-kTaX08X4g27tzIFQGRukaHmNbtMYDS3LEWIS8+l6OayGIw6Oyo1HIF/JzeuR2FoF9z6oV+x/wJSVSq4v8tcUGQ==
dependencies:
create-react-context "^0.2.1"
invariant "^2.2.3"
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.4"
warning "^3.0.0"
"@segment/snippet@^4.0.1":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@segment/snippet/-/snippet-4.4.0.tgz#153f17b8048a2764bbb1343a61f3c3c24da038e2"
@ -272,21 +261,27 @@
dependencies:
"@ndhoule/map" "^2.0.1"
"@storybook/client-logger@5.2.0-alpha.23":
version "5.2.0-alpha.23"
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.2.0-alpha.23.tgz#c59078b0041b8f443edeb24841e4b7a4908e3d0c"
integrity sha512-2TdYE+LBfmiiefRPt3DXVfRAxIu28vkc5pksgCbEwk1jscL6rAtD423HvcwhNR2nMdIDTzjBjkxq0ISp5dEmxw==
"@storybook/client-logger@5.2.0-alpha.34":
version "5.2.0-alpha.34"
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.2.0-alpha.34.tgz#9de93faf736fb58b1f3bd04b500f40dc6231e3d9"
integrity sha512-ukvCH+Fudey0RagrbxbVCy/ZwWfScVDFjGe8yieFCXVLRyfMERuEWgz/WBrgwFIVhzGt4JQgewolv27QLDysNg==
dependencies:
core-js "^3.0.1"
"@storybook/components@5.2.0-alpha.23":
version "5.2.0-alpha.23"
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.2.0-alpha.23.tgz#df38d9dc5cf8245025dec25b247f4ce1b593f2c6"
integrity sha512-NaeB+r3eZPoyfZ6FrZk58Sy4zJVoTpVLhUHpc1cAhlQol8chuptUxreBDo6aRFYtVKOd/9rnyU/7B32ddxI+OA==
"@storybook/client-logger@5.2.0-alpha.35":
version "5.2.0-alpha.35"
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.2.0-alpha.35.tgz#73ddcf2bfa5885407da580b0ffac2bcbe904e260"
integrity sha512-/G/nmW2k4H45nl/cghbmfXraixkFAJd0NrZ5Ch9ZsCuZYYsvMLfasF6Y4FQYykzadMCsdlrpK1dVK2P9YqhyNQ==
dependencies:
"@storybook/client-logger" "5.2.0-alpha.23"
"@storybook/router" "5.2.0-alpha.23"
"@storybook/theming" "5.2.0-alpha.23"
core-js "^3.0.1"
"@storybook/components@5.2.0-alpha.34":
version "5.2.0-alpha.34"
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.2.0-alpha.34.tgz#397f146419d6570661d50db6e5638b98803a4b30"
integrity sha512-LStRAgiKSlIouZiK2xtSF430gg42CHD/gwpncdJYQFLY8mWr46Ms0Fzk5YWbXi/xrjFnuX6aQxl7n28CjPmoqg==
dependencies:
"@storybook/client-logger" "5.2.0-alpha.34"
"@storybook/theming" "5.2.0-alpha.34"
core-js "^3.0.1"
global "^4.3.2"
markdown-to-jsx "^6.9.1"
@ -295,7 +290,6 @@
popper.js "^1.14.7"
prop-types "^15.7.2"
react "^16.8.3"
react-addons-create-fragment "^15.6.2"
react-dom "^16.8.3"
react-focus-lock "^1.18.3"
react-helmet-async "^1.0.2"
@ -305,25 +299,32 @@
recompose "^0.30.0"
simplebar-react "^1.0.0-alpha.6"
"@storybook/router@5.2.0-alpha.23":
version "5.2.0-alpha.23"
resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.2.0-alpha.23.tgz#ce3d1bf997ad0e18925fb270d48a92514242e456"
integrity sha512-eTjJUN3GzwCHIR+nXzcVNEqvr/dlJExhC68JmkQ8QuabHXodnhWYLRyrUNc8ATJjUxdlc2VT/PBj0xq+PsUuHg==
dependencies:
"@reach/router" "^1.2.1"
core-js "^3.0.1"
global "^4.3.2"
memoizerific "^1.11.3"
qs "^6.6.0"
"@storybook/theming@5.2.0-alpha.23":
version "5.2.0-alpha.23"
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.2.0-alpha.23.tgz#8f0ae7345416b605db619896656393f567a72396"
integrity sha512-8kUpX7ojq4pZH082MOxTC3lHLBrO7POwKrmviZHMWt+93FvaLfSerl9CK0lbEbWt+L8ZdsG+cXRNJbc+PJEI7A==
"@storybook/theming@5.2.0-alpha.34":
version "5.2.0-alpha.34"
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.2.0-alpha.34.tgz#fa65fa34af6231a5332e2bebd0f4174023f9bb4d"
integrity sha512-F900cTk2JkwrghPr5wFZ95zhAb+Ygp8zKp9MGe0aL4c/2OJrKrNhhA7nvtskdcLg2jJoBXSkwaRqe9rxtzND/g==
dependencies:
"@emotion/core" "^10.0.9"
"@emotion/styled" "^10.0.7"
"@storybook/client-logger" "5.2.0-alpha.23"
"@storybook/client-logger" "5.2.0-alpha.34"
common-tags "^1.8.0"
core-js "^3.0.1"
deep-object-diff "^1.1.0"
emotion-theming "^10.0.9"
global "^4.3.2"
memoizerific "^1.11.3"
polished "^3.3.1"
prop-types "^15.7.2"
resolve-from "^5.0.0"
"@storybook/theming@5.2.0-alpha.35":
version "5.2.0-alpha.35"
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.2.0-alpha.35.tgz#6d97548b7c31e7b50f4e28acbbae8b04cef26111"
integrity sha512-s+6b3BvxPs+LLsU2JIGDEId5+WNd+xkTzyKZAmf5/aS9e6j0p3tSJFiB+7gObt256yyo/SPe9Ke2szQdPfTIUg==
dependencies:
"@emotion/core" "^10.0.9"
"@emotion/styled" "^10.0.7"
"@storybook/client-logger" "5.2.0-alpha.35"
common-tags "^1.8.0"
core-js "^3.0.1"
deep-object-diff "^1.1.0"
@ -1097,10 +1098,10 @@ babel-plugin-macros@^2.0.0:
cosmiconfig "^5.2.0"
resolve "^1.10.0"
"babel-plugin-styled-components@>= 1", babel-plugin-styled-components@^1.10.1:
version "1.10.1"
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.1.tgz#cc89ac5a13476ce675e13fbe53a826f9bb0ca4cd"
integrity sha512-F6R2TnPGNN6iuXCs0xQ+EsrunwNoWI55J5I8Pkd/+fzzbv1I4gFgTaZepMOVpLobYWU2XaLIm+73L0zD3CnOdQ==
"babel-plugin-styled-components@>= 1", babel-plugin-styled-components@^1.10.6:
version "1.10.6"
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.6.tgz#f8782953751115faf09a9f92431436912c34006b"
integrity sha512-gyQj/Zf1kQti66100PhrCRjI5ldjaze9O0M3emXRPAN80Zsf8+e1thpTpaXJXVHXtaM4/+dJEgZHyS9Its+8SA==
dependencies:
"@babel/helper-annotate-as-pure" "^7.0.0"
"@babel/helper-module-imports" "^7.0.0"
@ -2978,12 +2979,7 @@ core-js@^1.0.0, core-js@^1.2.6:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=
core-js@^2.4.0, core-js@^2.5.0:
version "2.6.5"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895"
integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==
core-js@^2.4.1:
core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0:
version "2.6.9"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2"
integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==
@ -3063,14 +3059,6 @@ create-react-context@<=0.2.2:
fbjs "^0.8.0"
gud "^1.0.0"
create-react-context@^0.2.1:
version "0.2.3"
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.3.tgz#9ec140a6914a22ef04b8b09b7771de89567cb6f3"
integrity sha512-CQBmD0+QGgTaxDL3OX1IDXYqjkp2It4RIbcb99jS6AEg27Ga+a9G3JtK6SIu0HBwPLZlmwt9F7UwWA4Bn92Rag==
dependencies:
fbjs "^0.8.0"
gud "^1.0.0"
cross-env@^3.1.1:
version "3.2.4"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.2.4.tgz#9e0585f277864ed421ce756f81a980ff0d698aba"
@ -4410,7 +4398,7 @@ fbjs@1.0.0:
setimmediate "^1.0.5"
ua-parser-js "^0.7.18"
fbjs@^0.8.0, fbjs@^0.8.1, fbjs@^0.8.14, fbjs@^0.8.4, fbjs@^0.8.9:
fbjs@^0.8.0, fbjs@^0.8.1, fbjs@^0.8.14, fbjs@^0.8.9:
version "0.8.17"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=
@ -6112,7 +6100,7 @@ interpret@^1.0.0:
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==
invariant@2.2.4, invariant@^2.2.0, invariant@^2.2.2, invariant@^2.2.3, invariant@^2.2.4:
invariant@2.2.4, invariant@^2.2.0, invariant@^2.2.2, invariant@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
@ -7338,6 +7326,11 @@ lodash.some@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=
lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
lodash.template@^3.0.0:
version "3.6.2"
resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f"
@ -7560,10 +7553,10 @@ markdown-to-jsx@^6.9.1:
prop-types "^15.6.2"
unquote "^1.1.0"
marked@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.2.tgz#c574be8b545a8b48641456ca1dbe0e37b6dccc1a"
integrity sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA==
marked@^0.6.3:
version "0.6.3"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.3.tgz#79babad78af638ba4d522a9e715cdfdd2429e946"
integrity sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ==
math-expression-evaluator@^1.2.14:
version "1.2.17"
@ -9706,11 +9699,6 @@ qs@6.5.2, qs@~6.5.2:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
qs@^6.6.0:
version "6.7.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
query-string@^4.1.0:
version "4.3.4"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
@ -9806,15 +9794,6 @@ react-15@0.2.0:
fbjs "1.0.0"
object-assign "4.1.1"
react-addons-create-fragment@^15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react-addons-create-fragment/-/react-addons-create-fragment-15.6.2.tgz#a394de7c2c7becd6b5475ba1b97ac472ce7c74f8"
integrity sha1-o5TefCx77Na1R1uhuXrEcs58dPg=
dependencies:
fbjs "^0.8.4"
loose-envify "^1.3.1"
object-assign "^4.1.0"
react-clientside-effect@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.0.tgz#db823695f75e9616a5e4dd6d908e5ea627fb2516"
@ -9946,7 +9925,7 @@ react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==
react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4:
react-lifecycles-compat@^3.0.2:
version "3.0.4"
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
@ -11228,14 +11207,14 @@ simplebar@^4.0.0-alpha.9:
resize-observer-polyfill "^1.5.1"
scrollbarwidth "^0.1.3"
sitemap@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-2.2.0.tgz#98b8502762c5d7e8c77c9be5061dce85b326f1b0"
integrity sha512-9Zoi3UBhSIt5jWENDRUbzsqLMJ+Fha3P2aQ2PRghmh0FOivtHsC4FAJdkAEKHvATajd74BWp/57Yh7kz/UA53Q==
sitemap@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-3.0.0.tgz#8533913a282b0da341a1cef86db1b3402ba6fb92"
integrity sha512-sI8X+/9OYNcmTqBxt/i8/fICFuiLAGzxQPdiu5CBCLfLwy2utRlqPpEvVsN9PM618DkX0amiX2vZ8IErhTMlSA==
dependencies:
lodash "^4.17.10"
url-join "^4.0.0"
xmlbuilder "^10.0.0"
lodash "^4.17.11"
whatwg-url "^7.0.0"
xmlbuilder "^13.0.0"
slash@^1.0.0:
version "1.0.0"
@ -12204,6 +12183,13 @@ toxic@^1.0.0:
dependencies:
lodash "^4.17.10"
tr46@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=
dependencies:
punycode "^2.1.0"
traceur@0.0.105:
version "0.0.105"
resolved "https://registry.yarnpkg.com/traceur/-/traceur-0.0.105.tgz#5cf9dee83d6b77861c3d6c44d53859aed7ab0479"
@ -12560,11 +12546,6 @@ urix@^0.1.0:
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
url-join@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a"
integrity sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=
url-loader@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.6.2.tgz#a007a7109620e9d988d14bce677a1decb9a993f7"
@ -12867,6 +12848,11 @@ web-namespaces@^1.0.0:
resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.3.tgz#9bbf5c99ff0908d2da031f1d732492a96571a83f"
integrity sha512-r8sAtNmgR0WKOKOxzuSgk09JsHlpKlB+uHi937qypOu3PZ17UxPrierFKDye/uNHjNTTEshu5PId8rojIPj/tA==
webidl-conversions@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==
webpack-configurator@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/webpack-configurator/-/webpack-configurator-0.3.1.tgz#d16802afa674101a0cbfa6fc344d415c9649540b"
@ -13013,6 +12999,15 @@ whatwg-fetch@>=0.10.0:
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb"
integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==
whatwg-url@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd"
integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==
dependencies:
lodash.sortby "^4.7.0"
tr46 "^1.0.1"
webidl-conversions "^4.0.2"
when@^3.7.5:
version "3.7.8"
resolved "https://registry.yarnpkg.com/when/-/when-3.7.8.tgz#c7130b6a7ea04693e842cdc9e7a1f2aa39a39f82"
@ -13155,10 +13150,10 @@ xml2js@^0.4.5:
sax ">=0.6.0"
xmlbuilder "~9.0.1"
xmlbuilder@^10.0.0:
version "10.1.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-10.1.1.tgz#8cae6688cc9b38d850b7c8d3c0a4161dcaf475b0"
integrity sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==
xmlbuilder@^13.0.0:
version "13.0.2"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7"
integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==
xmlbuilder@~9.0.1:
version "9.0.7"

View File

@ -1,6 +1,6 @@
{
"name": "crna-kitchen-sink",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"main": "node_modules/expo/AppEntry.js",
"scripts": {
@ -24,14 +24,14 @@
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-ondevice-actions": "5.2.0-alpha.34",
"@storybook/addon-ondevice-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-ondevice-knobs": "5.2.0-alpha.34",
"@storybook/addon-ondevice-notes": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/react-native": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-ondevice-actions": "5.2.0-alpha.35",
"@storybook/addon-ondevice-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-ondevice-knobs": "5.2.0-alpha.35",
"@storybook/addon-ondevice-notes": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/react-native": "5.2.0-alpha.35",
"babel-loader": "^8.0.4",
"babel-plugin-module-resolver": "^3.2.0",
"babel-preset-expo": "^5.1.1",

View File

@ -1,6 +1,6 @@
{
"name": "angular-cli",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"license": "MIT",
"scripts": {
@ -34,19 +34,19 @@
"@angular-devkit/build-angular": "^0.13.4",
"@angular/cli": "^7.3.6",
"@angular/compiler-cli": "^7.2.6",
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-jest": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storyshots": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/angular": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-jest": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storyshots": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/angular": "5.2.0-alpha.35",
"@types/core-js": "^2.5.0",
"@types/jest": "^24.0.11",
"@types/node": "~12.0.2",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "cra-react15",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"dependencies": {
"babel-loader": "8.0.6",
@ -19,10 +19,10 @@
"build-storybook": "build-storybook -s public"
},
"devDependencies": {
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/react": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/react": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"babel-core": "6",
"babel-runtime": "6"
}

View File

@ -1,6 +1,6 @@
{
"name": "cra-ts-kitchen-sink",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build-storybook": "build-storybook -s public",
@ -14,12 +14,12 @@
"react-dom": "^16.8.3"
},
"devDependencies": {
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-info": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/react": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-info": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/react": "5.2.0-alpha.35",
"@types/enzyme": "^3.9.0",
"@types/react": "^16.8.3",
"@types/react-dom": "^16.8.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/example-devkits",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build-storybook": "build-storybook -c ./ -s built-storybooks",
@ -8,15 +8,15 @@
"storybook": "start-storybook -p 9011 -c ./"
},
"devDependencies": {
"@storybook/addon-decorator": "5.2.0-alpha.34",
"@storybook/addon-parameter": "5.2.0-alpha.34",
"@storybook/addon-roundtrip": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/node-logger": "5.2.0-alpha.34",
"@storybook/react": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/addon-decorator": "5.2.0-alpha.35",
"@storybook/addon-parameter": "5.2.0-alpha.35",
"@storybook/addon-roundtrip": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/components": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/node-logger": "5.2.0-alpha.35",
"@storybook/react": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"enzyme-to-json": "^3.3.5",

View File

@ -1,6 +1,6 @@
{
"name": "ember-example",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build": "ember build",
@ -15,19 +15,19 @@
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/ember": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/ember": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"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.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"description": "",
"keywords": [],
@ -14,25 +14,25 @@
"storybook": "start-storybook -p 9006 --no-dll"
},
"devDependencies": {
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-events": "5.2.0-alpha.34",
"@storybook/addon-jest": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storyshots": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/client-api": "5.2.0-alpha.34",
"@storybook/core": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/html": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-events": "5.2.0-alpha.35",
"@storybook/addon-jest": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storyshots": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/client-api": "5.2.0-alpha.35",
"@storybook/core": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/html": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"eventemitter3": "^3.1.0",
"format-json": "^1.0.3",
"global": "^4.3.2"

View File

@ -1,6 +1,6 @@
{
"name": "marko-cli",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"description": "Demo of how to build an app using marko-starter",
"repository": {
@ -24,14 +24,14 @@
"marko-starter": "^2.0.4"
},
"devDependencies": {
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/marko": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/marko": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"prettier": "^1.16.4",
"webpack": "^4.33.0"
}

View File

@ -1,6 +1,6 @@
{
"name": "mithril-example",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build-storybook": "build-storybook",
@ -11,20 +11,20 @@
"mithril": "^1.1.6"
},
"devDependencies": {
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storyshots": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/mithril": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storyshots": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/mithril": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"webpack": "^4.33.0"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "official-storybook",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build-storybook": "build-storybook -c ./ -s built-storybooks",
@ -15,34 +15,34 @@
},
"devDependencies": {
"@packtracker/webpack-plugin": "^2.0.1",
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-contexts": "5.2.0-alpha.34",
"@storybook/addon-cssresources": "5.2.0-alpha.34",
"@storybook/addon-design-assets": "5.2.0-alpha.34",
"@storybook/addon-docs": "5.2.0-alpha.34",
"@storybook/addon-events": "5.2.0-alpha.34",
"@storybook/addon-graphql": "5.2.0-alpha.34",
"@storybook/addon-info": "5.2.0-alpha.34",
"@storybook/addon-jest": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-queryparams": "5.2.0-alpha.34",
"@storybook/addon-storyshots": "5.2.0-alpha.34",
"@storybook/addon-storyshots-puppeteer": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/components": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/node-logger": "5.2.0-alpha.34",
"@storybook/react": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-contexts": "5.2.0-alpha.35",
"@storybook/addon-cssresources": "5.2.0-alpha.35",
"@storybook/addon-design-assets": "5.2.0-alpha.35",
"@storybook/addon-docs": "5.2.0-alpha.35",
"@storybook/addon-events": "5.2.0-alpha.35",
"@storybook/addon-graphql": "5.2.0-alpha.35",
"@storybook/addon-info": "5.2.0-alpha.35",
"@storybook/addon-jest": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-queryparams": "5.2.0-alpha.35",
"@storybook/addon-storyshots": "5.2.0-alpha.35",
"@storybook/addon-storyshots-puppeteer": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/components": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/node-logger": "5.2.0-alpha.35",
"@storybook/react": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"enzyme-to-json": "^3.3.5",

View File

@ -139,8 +139,10 @@ export const allTypes = () => {
<Button onClick={() => action('Boolean')(false)}>Boolean</Button>
<Button onClick={() => action('Empty Object')({})}>Empty Object</Button>
<Button onClick={() => action('File')(file)}>File</Button>
<Button onClick={() => action('Function')(A)}>Function A</Button>
<Button onClick={() => action('Function (bound)')(bound)}>Bound Function B</Button>
<Button onClick={() => action('Function', { allowFunction: true })(A)}>Function A</Button>
<Button onClick={() => action('Function (bound)', { allowFunction: true })(bound)}>
Bound Function B
</Button>
<Button onClick={() => action('Infinity')(Infinity)}>Infinity</Button>
<Button onClick={() => action('-Infinity')(-Infinity)}>-Infinity</Button>
<Button onClick={() => action('NaN')(NaN)}>NaN</Button>

View File

@ -1,6 +1,6 @@
{
"name": "polymer-cli",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build-storybook": "build-storybook",
@ -10,17 +10,17 @@
},
"dependencies": {
"@polymer/polymer": "^2.6.0",
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/polymer": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/polymer": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"@webcomponents/webcomponentsjs": "^1.2.0",
"global": "^4.3.2",
"lit-html": "^1.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "preact-example",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
@ -16,21 +16,21 @@
"devDependencies": {
"@babel/core": "^7.3.4",
"@babel/plugin-transform-runtime": "^7.2.0",
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-contexts": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storyshots": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/preact": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-contexts": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storyshots": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/preact": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"babel-loader": "^8.0.4",
"cross-env": "^5.2.0",
"file-loader": "^3.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "rax-kitchen-sink",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"test:generate-output": "jest --json --outputFile=jest-test-results.json --config=./jest-addon.config.js",
@ -24,23 +24,23 @@
"rax-view": "^0.6.5"
},
"devDependencies": {
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-events": "5.2.0-alpha.34",
"@storybook/addon-info": "5.2.0-alpha.34",
"@storybook/addon-jest": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storyshots": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/rax": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-events": "5.2.0-alpha.35",
"@storybook/addon-info": "5.2.0-alpha.35",
"@storybook/addon-jest": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storyshots": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/rax": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"babel-eslint": "^8.2.2",
"babel-preset-rax": "^1.0.0-beta.0",
"rax-scripts": "^1.0.0-beta.10",

View File

@ -1,6 +1,6 @@
{
"name": "riot-example",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
@ -16,20 +16,20 @@
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storyshots": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/riot": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storyshots": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/riot": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"babel-loader": "^8.0.4",
"cross-env": "^5.2.0",
"file-loader": "^3.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "standalone-preview",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"storybook": "parcel ./storybook.html --port 1337"

View File

@ -1,6 +1,6 @@
{
"name": "svelte-example",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"private": true,
"scripts": {
"build-storybook": "build-storybook -s public",
@ -11,19 +11,19 @@
"global": "^4.3.2"
},
"devDependencies": {
"@storybook/addon-a11y": "5.2.0-alpha.34",
"@storybook/addon-actions": "5.2.0-alpha.34",
"@storybook/addon-backgrounds": "5.2.0-alpha.34",
"@storybook/addon-centered": "5.2.0-alpha.34",
"@storybook/addon-knobs": "5.2.0-alpha.34",
"@storybook/addon-links": "5.2.0-alpha.34",
"@storybook/addon-notes": "5.2.0-alpha.34",
"@storybook/addon-options": "5.2.0-alpha.34",
"@storybook/addon-storyshots": "5.2.0-alpha.34",
"@storybook/addon-storysource": "5.2.0-alpha.34",
"@storybook/addon-viewport": "5.2.0-alpha.34",
"@storybook/addons": "5.2.0-alpha.34",
"@storybook/source-loader": "5.2.0-alpha.34",
"@storybook/svelte": "5.2.0-alpha.34"
"@storybook/addon-a11y": "5.2.0-alpha.35",
"@storybook/addon-actions": "5.2.0-alpha.35",
"@storybook/addon-backgrounds": "5.2.0-alpha.35",
"@storybook/addon-centered": "5.2.0-alpha.35",
"@storybook/addon-knobs": "5.2.0-alpha.35",
"@storybook/addon-links": "5.2.0-alpha.35",
"@storybook/addon-notes": "5.2.0-alpha.35",
"@storybook/addon-options": "5.2.0-alpha.35",
"@storybook/addon-storyshots": "5.2.0-alpha.35",
"@storybook/addon-storysource": "5.2.0-alpha.35",
"@storybook/addon-viewport": "5.2.0-alpha.35",
"@storybook/addons": "5.2.0-alpha.35",
"@storybook/source-loader": "5.2.0-alpha.35",
"@storybook/svelte": "5.2.0-alpha.35"
}
}

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addons",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Storybook addons store",
"keywords": [
"storybook"
@ -21,9 +21,9 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/api": "5.2.0-alpha.34",
"@storybook/channels": "5.2.0-alpha.34",
"@storybook/client-logger": "5.2.0-alpha.34",
"@storybook/api": "5.2.0-alpha.35",
"@storybook/channels": "5.2.0-alpha.35",
"@storybook/client-logger": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"global": "^4.3.2",
"util-deprecate": "^1.0.2"

View File

@ -24,6 +24,7 @@ export interface Addon {
route?: (routeOptions: RouteOptions) => string;
match?: (matchOptions: MatchOptions) => boolean;
render: (renderOptions: RenderOptions) => ReactElement<any>;
paramKey?: string;
}
export type Loader = (api: API) => void;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/api",
"version": "5.2.0-alpha.34",
"version": "5.2.0-alpha.35",
"description": "Core Storybook API & Context",
"keywords": [
"storybook"
@ -20,11 +20,11 @@
"prepare": "node ./scripts/generateVersion.js && node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/channels": "5.2.0-alpha.34",
"@storybook/client-logger": "5.2.0-alpha.34",
"@storybook/core-events": "5.2.0-alpha.34",
"@storybook/router": "5.2.0-alpha.34",
"@storybook/theming": "5.2.0-alpha.34",
"@storybook/channels": "5.2.0-alpha.35",
"@storybook/client-logger": "5.2.0-alpha.35",
"@storybook/core-events": "5.2.0-alpha.35",
"@storybook/router": "5.2.0-alpha.35",
"@storybook/theming": "5.2.0-alpha.35",
"core-js": "^3.0.1",
"fast-deep-equal": "^2.0.1",
"global": "^4.3.2",

View File

@ -1,6 +1,6 @@
import { ReactElement } from 'react';
import { Module, State } from '../index';
import { Module } from '../index';
import { Options } from '../store';
export enum types {
@ -31,6 +31,7 @@ export interface Addon {
route?: (routeOptions: RouteOptions) => string;
match?: (matchOptions: MatchOptions) => boolean;
render: (renderOptions: RenderOptions) => ReactElement<any>;
paramKey?: string;
}
export interface Collection {
[key: string]: Addon;
@ -42,9 +43,16 @@ interface Panels {
type StateMerger<S> = (input: S) => S;
interface StoryInput {
parameters: {
[parameterName: string]: any;
};
}
export interface SubAPI {
getElements: (type: Types) => Collection;
getPanels: () => Collection;
getStoryPanels: () => Collection;
getSelectedPanel: () => string;
setSelectedPanel: (panelName: string) => void;
setAddonState<S>(
@ -72,6 +80,28 @@ export default ({ provider, store }: Module) => {
const api: SubAPI = {
getElements: type => provider.getElements(type),
getPanels: () => api.getElements(types.PANEL),
getStoryPanels: () => {
const allPanels = api.getPanels();
const { storyId, storiesHash } = store.getState();
const storyInput = storyId && (storiesHash[storyId] as StoryInput);
if (!allPanels || !storyInput) {
return allPanels;
}
const { parameters } = storyInput;
const filteredPanels: Collection = {};
Object.entries(allPanels).forEach(([id, panel]) => {
const { paramKey } = panel;
if (paramKey && parameters[paramKey] && parameters[paramKey].disabled) {
return;
}
filteredPanels[id] = panel;
});
return filteredPanels;
},
getSelectedPanel: () => {
const { selectedPanel } = store.getState();
return ensurePanel(api.getPanels(), selectedPanel, selectedPanel);

View File

@ -0,0 +1,159 @@
import initAddons, { types } from '../modules/addons';
const PANELS = {
a11y: {
title: 'Accessibility',
paramKey: 'a11y',
},
actions: {
title: 'Actions',
paramKey: 'actions',
},
knobs: {
title: 'Knobs',
paramKey: 'knobs',
},
};
const provider = {
getElements(type) {
if (type === types.PANEL) {
return PANELS;
}
return null;
},
};
const store = {
getState: () => ({
selectedPanel: '',
}),
setState: jest.fn(),
};
describe('Addons API', () => {
describe('#getElements', () => {
it('should return provider elements', () => {
// given
const { api } = initAddons({ provider, store });
// when
const panels = api.getElements(types.PANEL);
// then
expect(panels).toBe(PANELS);
});
});
describe('#getPanels', () => {
it('should return provider panels', () => {
// given
const { api } = initAddons({ provider, store });
// when
const panels = api.getPanels();
// then
expect(panels).toBe(PANELS);
});
});
describe('#getStoryPanels', () => {
it('should return all panels by default', () => {
// given
const { api } = initAddons({ provider, store });
// when
const filteredPanels = api.getStoryPanels();
// then
expect(filteredPanels).toBe(PANELS);
});
it('should filter disabled addons', () => {
// given
const storyId = 'story 1';
const storeWithStory = {
getState: () => ({
storyId,
storiesHash: {
[storyId]: {
parameters: {
a11y: { disabled: true },
},
},
},
}),
setState: jest.fn(),
};
const { api } = initAddons({ provider, store: storeWithStory });
// when
const filteredPanels = api.getStoryPanels();
// then
expect(filteredPanels).toEqual({
actions: PANELS.actions,
knobs: PANELS.knobs,
});
});
});
describe('#getSelectedPanel', () => {
it('should return provider panels', () => {
// given
const storeWithSelectedPanel = {
getState: () => ({
selectedPanel: 'actions',
}),
setState: jest.fn(),
};
const { api } = initAddons({ provider, store: storeWithSelectedPanel });
// when
const selectedPanel = api.getSelectedPanel();
// then
expect(selectedPanel).toBe('actions');
});
it('should return first panel when selected is not a panel', () => {
// given
const storeWithSelectedPanel = {
getState: () => ({
selectedPanel: 'unknown',
}),
setState: jest.fn(),
};
const { api } = initAddons({ provider, store: storeWithSelectedPanel });
// when
const selectedPanel = api.getSelectedPanel();
// then
expect(selectedPanel).toBe('a11y');
});
});
describe('#setSelectedPanel', () => {
it('should set value inn store', () => {
// given
const setState = jest.fn();
const storeWithSelectedPanel = {
getState: () => ({
selectedPanel: 'actions',
}),
setState,
};
const { api } = initAddons({ provider, store: storeWithSelectedPanel });
expect(setState).not.toHaveBeenCalled();
// when
api.setSelectedPanel('knobs');
// then
expect(setState).toHaveBeenCalledWith({ selectedPanel: 'knobs' }, { persistence: 'session' });
});
});
});

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