mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-31 05:03:21 +08:00
Merge branch 'next' into tech/overhaul-ui
# Conflicts: # addons/a11y/package.json # addons/actions/package.json # addons/backgrounds/package.json # addons/cssresources/package.json # addons/events/package.json # addons/google-analytics/package.json # addons/info/package.json # addons/info/src/__snapshots__/index.test.js.snap # addons/jest/package.json # addons/knobs/package.json # addons/links/package.json # addons/notes/package.json # addons/storyshots/storyshots-core/package.json # addons/storyshots/storyshots-core/src/frameworks/vue/renderTree.js # addons/viewport/package.json # app/angular/package.json # app/ember/package.json # app/html/package.json # app/marko/package.json # app/mithril/package.json # app/polymer/package.json # app/react/package.json # app/riot/package.json # app/svelte/package.json # app/vue/package.json # examples/cra-kitchen-sink/package.json # examples/official-storybook/package.json # examples/preact-kitchen-sink/package.json # examples/vue-kitchen-sink/src/stories/__snapshots__/addon-centered.stories.storyshot # examples/vue-kitchen-sink/src/stories/__snapshots__/custom-decorators.stories.storyshot # lib/addons/package.json # lib/channel-websocket/package.json # lib/components/package.json # lib/core/package.json # lib/ui/package.json # yarn.lock
This commit is contained in:
commit
a2a78238e2
26
CHANGELOG.md
26
CHANGELOG.md
@ -1,3 +1,29 @@
|
||||
## 4.2.0-alpha.6 (December 20, 2018)
|
||||
|
||||
### Features
|
||||
|
||||
* React-Native: Change on-device layout to absolute position ([#4962](https://github.com/storybooks/storybook/pull/4962))
|
||||
* Addon-Info: add css classes for style overrides ([#4589](https://github.com/storybooks/storybook/pull/4589))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Addon-Info: Display description when story name matches component ([#4863](https://github.com/storybooks/storybook/pull/4863))
|
||||
* React-Native: Disable warning if story is not set in async storage ([#5068](https://github.com/storybooks/storybook/pull/5068))
|
||||
* React-Native: Fixed isUIHidden param ([#5067](https://github.com/storybooks/storybook/pull/5067))
|
||||
* Vue: Fix reloading and story decoration ([#5057](https://github.com/storybooks/storybook/pull/5057))
|
||||
|
||||
### Maintenance
|
||||
|
||||
* TypeScript: migrate @storybook/channels to typescript ([#4977](https://github.com/storybooks/storybook/pull/4977))
|
||||
|
||||
### Dependency Upgrades
|
||||
|
||||
* Bump babel-plugin-macros from 2.4.2 to 2.4.3 ([#5060](https://github.com/storybooks/storybook/pull/5060))
|
||||
* Bump @babel/core from 7.2.0 to 7.2.2 ([#5059](https://github.com/storybooks/storybook/pull/5059))
|
||||
* Bump ember-cli-htmlbars-inline-precompile from 1.0.5 to 2.1.0 ([#5064](https://github.com/storybooks/storybook/pull/5064))
|
||||
* Bump react-test-renderer from 16.6.3 to 16.7.0 ([#5063](https://github.com/storybooks/storybook/pull/5063))
|
||||
* Bump autoprefixer from 9.4.2 to 9.4.3 ([#5061](https://github.com/storybooks/storybook/pull/5061))
|
||||
|
||||
## 4.2.0-alpha.5 (December 19, 2018)
|
||||
|
||||
### Bug Fixes
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-a11y",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "a11y addon for storybook",
|
||||
"keywords": [
|
||||
"a11y",
|
||||
@ -26,10 +26,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/client-logger": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/client-logger": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"axe-core": "^3.1.2",
|
||||
"core-js": "^2.5.7",
|
||||
"react": "^16.7.0-alpha.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-actions",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Action Logger addon for storybook",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -22,9 +22,9 @@
|
||||
"dependencies": {
|
||||
"@emotion/core": "^10.0.2",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"emotion-theming": "^10.0.2",
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-backgrounds",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "A storybook addon to show different backgrounds for your preview",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -26,10 +26,10 @@
|
||||
"dependencies": {
|
||||
"@emotion/core": "^10.0.2",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/client-logger": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/client-logger": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"eventemitter3": "^3.1.0",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-centered",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook decorator to center components",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-cssresources",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "A storybook addon to switch between css resources at runtime for your story",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -25,9 +25,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/styled": "10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
"prop-types": "^15.6.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-events",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Add events to your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,8 +24,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"format-json": "^1.0.3",
|
||||
"prop-types": "^15.6.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-google-analytics",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook addon for google analytics",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -20,8 +20,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
"react-ga": "^2.5.3"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-graphql",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook addon to display the GraphiQL IDE",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-info",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "A Storybook addon to show additional information for your stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -22,9 +22,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/client-logger": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/client-logger": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
"marksy": "^6.1.0",
|
||||
|
File diff suppressed because one or more lines are too long
@ -263,12 +263,16 @@ class Story extends Component {
|
||||
}
|
||||
|
||||
_getComponentDescription() {
|
||||
const { context } = this.props;
|
||||
const {
|
||||
context: { kind, story },
|
||||
} = this.props;
|
||||
let retDiv = null;
|
||||
|
||||
const validMatches = [kind, story];
|
||||
|
||||
if (Object.keys(STORYBOOK_REACT_CLASSES).length) {
|
||||
Object.keys(STORYBOOK_REACT_CLASSES).forEach(key => {
|
||||
if (STORYBOOK_REACT_CLASSES[key].name === context.kind) {
|
||||
if (validMatches.includes(STORYBOOK_REACT_CLASSES[key].name)) {
|
||||
const componentDescription = STORYBOOK_REACT_CLASSES[key].docgenInfo.description;
|
||||
retDiv = <div>{this.marksy(componentDescription).tree}</div>;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ describe('addon Info', () => {
|
||||
mount(<Info />);
|
||||
});
|
||||
|
||||
it('should render component description', () => {
|
||||
it('should render component description if story kind matches component', () => {
|
||||
const previousReactClassesValue = global.STORYBOOK_REACT_CLASSES[reactClassPath];
|
||||
Object.assign(global.STORYBOOK_REACT_CLASSES, { [reactClassPath]: storybookReactClassMock });
|
||||
|
||||
@ -92,4 +92,19 @@ describe('addon Info', () => {
|
||||
|
||||
Object.assign(global.STORYBOOK_REACT_CLASSES, { [reactClassPath]: previousReactClassesValue });
|
||||
});
|
||||
|
||||
it('should render component description if story name matches component', () => {
|
||||
const previousReactClassesValue = global.STORYBOOK_REACT_CLASSES[reactClassPath];
|
||||
Object.assign(global.STORYBOOK_REACT_CLASSES, { [reactClassPath]: storybookReactClassMock });
|
||||
|
||||
const Info = () =>
|
||||
withInfo({ inline: true, propTables: false })(storyFn, {
|
||||
kind: 'Test Components',
|
||||
story: 'TestComponent',
|
||||
});
|
||||
|
||||
expect(mount(<Info />)).toMatchSnapshot();
|
||||
|
||||
Object.assign(global.STORYBOOK_REACT_CLASSES, { [reactClassPath]: previousReactClassesValue });
|
||||
});
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-jest",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "React storybook addon that show component jest report",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -28,8 +28,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
"prop-types": "^15.6.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-knobs",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook Addon Prop Editor Component",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -23,9 +23,9 @@
|
||||
"dependencies": {
|
||||
"@emotion/core": "^10.0.2",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"copy-to-clipboard": "^3.0.8",
|
||||
"core-js": "^2.5.7",
|
||||
"escape-html": "^1.0.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-links",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Story Links addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -21,9 +21,9 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-notes",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Write notes for your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,9 +24,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"markdown-to-jsx": "^6.7.4",
|
||||
"prop-types": "^15.6.2",
|
||||
"util-deprecate": "^1.0.2"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-backgrounds",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "A storybook addon to show different backgrounds for your preview",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -23,7 +23,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"prop-types": "^15.6.2"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-knobs",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Display storybook story knobs on your deviced.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -20,7 +20,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"deep-equal": "^1.0.1",
|
||||
"prop-types": "^15.6.2",
|
||||
@ -30,7 +30,7 @@
|
||||
"react-native-switch": "^1.5.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-notes",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Write notes for your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -18,7 +18,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"prop-types": "^15.6.2",
|
||||
"react-native-simple-markdown": "^1.1.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-options",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Options addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -20,7 +20,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,7 +24,7 @@
|
||||
"storybook": "start-storybook -p 6006"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"glob": "^7.1.3",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,13 +1,16 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import Vue from 'vue';
|
||||
|
||||
function getRenderedTree(story, context) {
|
||||
const storyElement = story.render();
|
||||
function getRenderedTree(story) {
|
||||
const component = story.render();
|
||||
|
||||
const Constructor = Vue.extend(storyElement);
|
||||
const vm = new Constructor().$mount();
|
||||
const vm = new Vue({
|
||||
render(h) {
|
||||
return h(component);
|
||||
},
|
||||
});
|
||||
|
||||
return vm.$el;
|
||||
return vm.$mount().$el;
|
||||
}
|
||||
|
||||
export default getRenderedTree;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots-puppeteer",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Image snappshots addition to StoryShots base on puppeteer",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -21,14 +21,14 @@
|
||||
"prepare": "node ../../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/node-logger": "4.2.0-alpha.5",
|
||||
"@storybook/node-logger": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"jest-image-snapshot": "^2.6.0",
|
||||
"puppeteer": "^1.9.0",
|
||||
"regenerator-runtime": "^0.12.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5"
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storysource",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Stories addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -21,8 +21,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"estraverse": "^4.2.0",
|
||||
"loader-utils": "^1.1.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-viewport",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook addon to change the viewport size to mobile",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -22,10 +22,10 @@
|
||||
"dependencies": {
|
||||
"@emotion/core": "^10.0.2",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/client-logger": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/client-logger": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
"memoizerific": "^1.11.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/angular",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,8 +25,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/node-logger": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"@storybook/node-logger": "4.2.0-alpha.6",
|
||||
"angular2-template-loader": "^0.6.2",
|
||||
"core-js": "^2.5.7",
|
||||
"fork-ts-checker-webpack-plugin": "^0.5.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ember",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.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": {
|
||||
@ -23,7 +23,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ember/test-helpers": "^1.0.0",
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -24,7 +24,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/marko",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for Marko: Develop Marko Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,7 +25,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/mithril",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for Mithril: Develop Mithril Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -26,7 +26,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.2.0",
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/polymer",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for Polymer: Develop Polymer components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -24,7 +24,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"@webcomponents/webcomponentsjs": "^1.2.0",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for Preact: Develop Preact Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -26,12 +26,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.2.0",
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.6.0",
|
||||
"react-dom": "^16.6.0",
|
||||
"react-dom": "^16.7.0",
|
||||
"regenerator-runtime": "^0.12.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-native",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "A better way to develop React Native Components for your app",
|
||||
"keywords": [
|
||||
"react",
|
||||
@ -25,12 +25,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/channel-websocket": "4.2.0-alpha.5",
|
||||
"@storybook/channels": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/ui": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/channel-websocket": "4.2.0-alpha.6",
|
||||
"@storybook/channels": "4.2.0-alpha.6",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"@storybook/ui": "4.2.0-alpha.6",
|
||||
"babel-loader": "^8.0.4",
|
||||
"babel-plugin-macros": "^2.4.3",
|
||||
"babel-plugin-syntax-async-functions": "^6.13.0",
|
||||
|
@ -1,13 +1,6 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
Platform,
|
||||
SafeAreaView,
|
||||
Animated,
|
||||
TouchableOpacity,
|
||||
} from 'react-native';
|
||||
import { Keyboard, KeyboardAvoidingView, Platform, Animated, TouchableOpacity } from 'react-native';
|
||||
import Events from '@storybook/core-events';
|
||||
|
||||
import StoryListView from '../StoryListView';
|
||||
@ -150,49 +143,48 @@ export default class OnDeviceUI extends PureComponent {
|
||||
];
|
||||
|
||||
return (
|
||||
<SafeAreaView style={style.flex}>
|
||||
<KeyboardAvoidingView
|
||||
enabled={!shouldDisableKeyboardAvoidingView || tabOpen !== PREVIEW}
|
||||
behavior={IS_IOS ? 'padding' : null}
|
||||
keyboardVerticalOffset={keyboardAvoidingViewVerticalOffset}
|
||||
style={style.flex}
|
||||
<KeyboardAvoidingView
|
||||
enabled={!shouldDisableKeyboardAvoidingView || tabOpen !== PREVIEW}
|
||||
behavior={IS_IOS ? 'padding' : null}
|
||||
keyboardVerticalOffset={keyboardAvoidingViewVerticalOffset}
|
||||
style={style.flex}
|
||||
>
|
||||
<AbsolutePositionedKeyboardAwareView
|
||||
onLayout={this.onLayout}
|
||||
previewHeight={previewHeight}
|
||||
previewWidth={previewWidth}
|
||||
>
|
||||
<AbsolutePositionedKeyboardAwareView
|
||||
onLayout={this.onLayout}
|
||||
previewHeight={previewHeight}
|
||||
previewWidth={previewWidth}
|
||||
>
|
||||
<Animated.View style={previewWrapperStyles}>
|
||||
<Animated.View style={previewStyles}>
|
||||
<TouchableOpacity
|
||||
accessible={false}
|
||||
style={style.flex}
|
||||
disabled={tabOpen === PREVIEW}
|
||||
onPress={this.handleOpenPreview}
|
||||
>
|
||||
<StoryView url={url} events={events} selection={selection} storyFn={storyFn} />
|
||||
</TouchableOpacity>
|
||||
</Animated.View>
|
||||
<Animated.View style={previewWrapperStyles}>
|
||||
<Animated.View style={previewStyles}>
|
||||
<TouchableOpacity
|
||||
accessible={false}
|
||||
style={style.flex}
|
||||
disabled={tabOpen === PREVIEW}
|
||||
onPress={this.handleOpenPreview}
|
||||
>
|
||||
<StoryView url={url} events={events} selection={selection} storyFn={storyFn} />
|
||||
</TouchableOpacity>
|
||||
</Animated.View>
|
||||
<Panel style={getNavigatorPanelPosition(this.animatedValue, previewWidth)}>
|
||||
<StoryListView
|
||||
stories={stories}
|
||||
events={events}
|
||||
selectedKind={selection.kind}
|
||||
selectedStory={selection.story}
|
||||
/>
|
||||
</Panel>
|
||||
<Panel style={getAddonPanelPosition(this.animatedValue, previewWidth)}>
|
||||
<Addons />
|
||||
</Panel>
|
||||
</AbsolutePositionedKeyboardAwareView>
|
||||
<Navigation
|
||||
tabOpen={tabOpen}
|
||||
onChangeTab={this.handleToggleTab}
|
||||
initialUiVisible={!isUIHidden}
|
||||
/>
|
||||
</KeyboardAvoidingView>
|
||||
</SafeAreaView>
|
||||
</Animated.View>
|
||||
<Panel style={getNavigatorPanelPosition(this.animatedValue, previewWidth)}>
|
||||
<StoryListView
|
||||
stories={stories}
|
||||
events={events}
|
||||
selectedKind={selection.kind}
|
||||
selectedStory={selection.story}
|
||||
/>
|
||||
</Panel>
|
||||
<Panel style={getAddonPanelPosition(this.animatedValue, previewWidth)}>
|
||||
<Addons />
|
||||
</Panel>
|
||||
</AbsolutePositionedKeyboardAwareView>
|
||||
|
||||
<Navigation
|
||||
tabOpen={tabOpen}
|
||||
onChangeTab={this.handleToggleTab}
|
||||
initialUiVisible={!isUIHidden}
|
||||
/>
|
||||
</KeyboardAvoidingView>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { View, SafeAreaView, StyleSheet } from 'react-native';
|
||||
import GestureRecognizer from 'react-native-swipe-gestures';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
@ -11,6 +11,15 @@ const SWIPE_CONFIG = {
|
||||
directionalOffsetThreshold: 80,
|
||||
};
|
||||
|
||||
const style = StyleSheet.create({
|
||||
wrapper: {
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
},
|
||||
});
|
||||
|
||||
export default class Navigation extends PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@ -44,17 +53,21 @@ export default class Navigation extends PureComponent {
|
||||
const { isUIVisible } = this.state;
|
||||
|
||||
return (
|
||||
<View>
|
||||
{isUIVisible && (
|
||||
<GestureRecognizer
|
||||
onSwipeLeft={this.handleSwipeLeft}
|
||||
onSwipeRight={this.handleSwipeRight}
|
||||
config={SWIPE_CONFIG}
|
||||
>
|
||||
<Bar index={tabOpen} onPress={onChangeTab} />
|
||||
</GestureRecognizer>
|
||||
)}
|
||||
<VisibilityButton onPress={this.handleToggleUI} />
|
||||
<View style={style.wrapper}>
|
||||
<SafeAreaView>
|
||||
{isUIVisible && (
|
||||
<GestureRecognizer
|
||||
onSwipeLeft={this.handleSwipeLeft}
|
||||
onSwipeRight={this.handleSwipeRight}
|
||||
config={SWIPE_CONFIG}
|
||||
>
|
||||
<Bar index={tabOpen} onPress={onChangeTab} />
|
||||
</GestureRecognizer>
|
||||
)}
|
||||
<View>
|
||||
<VisibilityButton onPress={this.handleToggleUI} />
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ export default class VisibilityButton extends PureComponent {
|
||||
style={style.hideButton}
|
||||
hitSlop={{ top: 5, left: 5, bottom: 5, right: 5 }}
|
||||
>
|
||||
<Text style={[style.hideButtonText]}>□</Text>
|
||||
<Text style={style.hideButtonText}>□</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ export default {
|
||||
position: 'absolute',
|
||||
right: 8,
|
||||
bottom: 12,
|
||||
zIndex: 100,
|
||||
},
|
||||
previewMinimized: {
|
||||
borderWidth: 1,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import { SectionList, Text, TextInput, TouchableOpacity, View } from 'react-native';
|
||||
import { SectionList, Text, TextInput, TouchableOpacity, View, SafeAreaView } from 'react-native';
|
||||
import Events from '@storybook/core-events';
|
||||
import style from './style';
|
||||
|
||||
@ -116,7 +116,7 @@ export default class StoryListView extends Component {
|
||||
const { data } = this.state;
|
||||
|
||||
return (
|
||||
<View style={style.flex}>
|
||||
<SafeAreaView style={style.flex}>
|
||||
<TextInput
|
||||
clearButtonMode="while-editing"
|
||||
disableFullscreenUI
|
||||
@ -127,7 +127,7 @@ export default class StoryListView extends Component {
|
||||
/>
|
||||
<SectionList
|
||||
testID="Storybook.ListView"
|
||||
style={style.flex}
|
||||
style={style.sectionList}
|
||||
renderItem={({ item }) => (
|
||||
<ListItem
|
||||
title={item.name}
|
||||
@ -143,7 +143,7 @@ export default class StoryListView extends Component {
|
||||
sections={data}
|
||||
stickySectionHeadersEnabled={false}
|
||||
/>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,10 @@ export default {
|
||||
flex: {
|
||||
flex: 1,
|
||||
},
|
||||
sectionList: {
|
||||
flex: 1,
|
||||
marginBottom: 40,
|
||||
},
|
||||
header: {
|
||||
paddingVertical: 5,
|
||||
},
|
||||
|
4
app/react-native/src/preview/index.js
vendored
4
app/react-native/src/preview/index.js
vendored
@ -114,7 +114,7 @@ export default class Preview {
|
||||
stories={preview._stories}
|
||||
events={channel}
|
||||
url={webUrl}
|
||||
isUIOpen={params.isUIOpen}
|
||||
isUIHidden={params.isUIHidden}
|
||||
tabOpen={params.tabOpen}
|
||||
getInitialStory={
|
||||
setInitialStory
|
||||
@ -198,14 +198,12 @@ export default class Preview {
|
||||
|
||||
_checkStory(selection) {
|
||||
if (!selection || typeof selection !== 'object' || !selection.kind || !selection.story) {
|
||||
console.warn('invalid storybook selection'); // eslint-disable-line no-console
|
||||
return null;
|
||||
}
|
||||
|
||||
const story = this._getStory(selection);
|
||||
|
||||
if (story.storyFn === null) {
|
||||
console.warn('invalid storybook selection'); // eslint-disable-line no-console
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -29,8 +29,8 @@
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/node-logger": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"@storybook/node-logger": "4.2.0-alpha.6",
|
||||
"@svgr/webpack": "^4.0.3",
|
||||
"babel-plugin-named-asset-import": "^0.2.3",
|
||||
"babel-plugin-react-docgen": "^2.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/riot",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for riot.js: View riot snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -24,7 +24,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,7 +25,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
|
@ -29,3 +29,20 @@ You can also build a [static version](https://storybook.js.org/basics/exporting-
|
||||
## Vue Notes
|
||||
|
||||
- When using global custom components or extension (e.g `Vue.use`). You will need to declare those in the `./storybook/config.js`.
|
||||
|
||||
## Known Limitations
|
||||
|
||||
In Storybook story and decorator components you can not access the Vue instance
|
||||
in factory functions for default prop values:
|
||||
|
||||
```js
|
||||
{
|
||||
props: {
|
||||
foo: {
|
||||
default() {
|
||||
return this.bar; // does not work!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,7 +25,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^2.5.7",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,30 +1,74 @@
|
||||
import { start } from '@storybook/core/client';
|
||||
import Vue from 'vue';
|
||||
|
||||
import './globals';
|
||||
import render from './render';
|
||||
import render, { VALUES } from './render';
|
||||
import { extractProps } from './util';
|
||||
|
||||
const createWrapperComponent = Target => ({
|
||||
functional: true,
|
||||
render(h, c) {
|
||||
return h(Target, c.data, c.children);
|
||||
},
|
||||
});
|
||||
const decorateStory = (getStory, decorators) =>
|
||||
decorators.reduce(
|
||||
(decorated, decorator) => context => {
|
||||
const story = () => decorated(context);
|
||||
let decoratedStory = decorator(story, context);
|
||||
export const WRAPS = 'STORYBOOK_WRAPS';
|
||||
|
||||
if (typeof decoratedStory === 'string') {
|
||||
decoratedStory = { template: decoratedStory };
|
||||
function prepare(rawStory, innerStory) {
|
||||
let story = rawStory;
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
if (!story._isVue) {
|
||||
if (typeof story === 'string') {
|
||||
story = { template: story };
|
||||
}
|
||||
if (innerStory) {
|
||||
story.components = { ...(story.components || {}), story: innerStory };
|
||||
}
|
||||
story = Vue.extend(story);
|
||||
} else if (story.options[WRAPS]) {
|
||||
return story;
|
||||
}
|
||||
|
||||
return Vue.extend({
|
||||
[WRAPS]: story,
|
||||
[VALUES]: { ...(innerStory ? innerStory.options[VALUES] : {}), ...extractProps(story) },
|
||||
functional: true,
|
||||
render(h, { data, parent, children }) {
|
||||
return h(
|
||||
story,
|
||||
{
|
||||
...data,
|
||||
props: { ...(data.props || {}), ...parent.$root[VALUES] },
|
||||
},
|
||||
children
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function decorateStory(getStory, decorators) {
|
||||
return decorators.reduce(
|
||||
(decorated, decorator) => (context = {}) => {
|
||||
let story;
|
||||
|
||||
const decoratedStory = decorator((p = {}) => {
|
||||
story = decorated(
|
||||
Object.assign(
|
||||
context,
|
||||
p,
|
||||
{ parameters: Object.assign(context.parameters || {}, p.parameters) },
|
||||
{ options: Object.assign(context.options || {}, p.options) }
|
||||
)
|
||||
);
|
||||
return story;
|
||||
}, context);
|
||||
|
||||
if (!story) {
|
||||
story = decorated(context);
|
||||
}
|
||||
|
||||
decoratedStory.components = decoratedStory.components || {};
|
||||
decoratedStory.components.story = createWrapperComponent(story());
|
||||
return decoratedStory;
|
||||
if (decoratedStory === story) {
|
||||
return story;
|
||||
}
|
||||
|
||||
return prepare(decoratedStory, story);
|
||||
},
|
||||
getStory
|
||||
context => prepare(getStory(context))
|
||||
);
|
||||
}
|
||||
|
||||
const { clientApi, configApi, forceReRender } = start(render, { decorateStory });
|
||||
|
||||
|
@ -1,27 +1,21 @@
|
||||
import { stripIndents } from 'common-tags';
|
||||
import Vue from 'vue';
|
||||
|
||||
let root = null;
|
||||
export const COMPONENT = 'STORYBOOK_COMPONENT';
|
||||
export const VALUES = 'STORYBOOK_VALUES';
|
||||
|
||||
function getComponentProxy(component) {
|
||||
return Object.entries(component.props || {})
|
||||
.map(([name, def]) => ({ [name]: def.default }))
|
||||
.reduce((wrap, prop) => ({ ...wrap, ...prop }), {});
|
||||
}
|
||||
|
||||
function renderRoot(component, proxy) {
|
||||
root = new Vue({
|
||||
el: '#root',
|
||||
beforeCreate() {
|
||||
this.proxy = proxy;
|
||||
},
|
||||
|
||||
render(h) {
|
||||
const props = this.proxy;
|
||||
return h('div', { attrs: { id: 'root' } }, [h(component, { props })]);
|
||||
},
|
||||
});
|
||||
}
|
||||
const root = new Vue({
|
||||
data() {
|
||||
return {
|
||||
[COMPONENT]: undefined,
|
||||
[VALUES]: {},
|
||||
};
|
||||
},
|
||||
render(h) {
|
||||
const children = this[COMPONENT] ? [h(this[COMPONENT])] : undefined;
|
||||
return h('div', { attrs: { id: 'root' } }, children);
|
||||
},
|
||||
});
|
||||
|
||||
export default function render({
|
||||
story,
|
||||
@ -49,15 +43,14 @@ export default function render({
|
||||
|
||||
showMain();
|
||||
|
||||
const proxy = getComponentProxy(component);
|
||||
|
||||
// at component creation || refresh by HMR
|
||||
if (!root || !forceRender) {
|
||||
if (root) root.$destroy();
|
||||
if (!root[COMPONENT] || !forceRender) {
|
||||
root[COMPONENT] = component;
|
||||
}
|
||||
|
||||
renderRoot(component, proxy);
|
||||
} else {
|
||||
root.proxy = proxy;
|
||||
root.$forceUpdate();
|
||||
root[VALUES] = component.options[VALUES];
|
||||
|
||||
if (!root.$el) {
|
||||
root.$mount('#root');
|
||||
}
|
||||
}
|
||||
|
20
app/vue/src/client/preview/util.js
Normal file
20
app/vue/src/client/preview/util.js
Normal file
@ -0,0 +1,20 @@
|
||||
function getType(fn) {
|
||||
const match = fn && fn.toString().match(/^\s*function (\w+)/);
|
||||
return match ? match[1] : '';
|
||||
}
|
||||
|
||||
// https://github.com/vuejs/vue/blob/dev/src/core/util/props.js#L92
|
||||
function resolveDefault({ type, default: def }) {
|
||||
if (typeof def === 'function' && getType(type) !== 'Function') {
|
||||
// known limitation: we dont have the component instance to pass
|
||||
return def.call();
|
||||
}
|
||||
|
||||
return def;
|
||||
}
|
||||
|
||||
export function extractProps(component) {
|
||||
return Object.entries(component.options.props || {})
|
||||
.map(([name, prop]) => ({ [name]: resolveDefault(prop) }))
|
||||
.reduce((wrap, prop) => ({ ...wrap, ...prop }), {});
|
||||
}
|
@ -19,10 +19,10 @@
|
||||
"prepare": "npm run snyk-protect"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/react": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/react": "4.2.0-alpha.6",
|
||||
"babel-loader": "^6.4.1",
|
||||
"bootstrap": "^4.1.3",
|
||||
"common-tags": "^1.8.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "angular-cli",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
@ -33,18 +33,18 @@
|
||||
"@angular-devkit/build-angular": "^0.10.3",
|
||||
"@angular/cli": "^7.0.3",
|
||||
"@angular/compiler-cli": "^7.0.1",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-jest": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/angular": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-jest": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/angular": "4.2.0-alpha.6",
|
||||
"@types/core-js": "^2.5.0",
|
||||
"@types/jest": "^23.3.9",
|
||||
"@types/node": "~10.12.17",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cra-kitchen-sink",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
@ -14,25 +14,25 @@
|
||||
"global": "^4.3.2",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.6.0",
|
||||
"react-dom": "^16.6.0",
|
||||
"react-dom": "^16.7.0",
|
||||
"react-lifecycles-compat": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-events": "4.2.0-alpha.5",
|
||||
"@storybook/addon-info": "4.2.0-alpha.5",
|
||||
"@storybook/addon-jest": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/client-logger": "4.2.0-alpha.5",
|
||||
"@storybook/react": "4.2.0-alpha.5",
|
||||
"@storybook/addon-a11y": "4.2.0-alpha.6",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-events": "4.2.0-alpha.6",
|
||||
"@storybook/addon-info": "4.2.0-alpha.6",
|
||||
"@storybook/addon-jest": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/client-logger": "4.2.0-alpha.6",
|
||||
"@storybook/react": "4.2.0-alpha.6",
|
||||
"enzyme": "^3.7.0",
|
||||
"enzyme-adapter-react-16": "^1.6.0",
|
||||
"enzyme-to-json": "^3.3.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ember-example",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "ember build",
|
||||
@ -14,18 +14,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@storybook/addon-a11y": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/ember": "4.2.0-alpha.5",
|
||||
"@storybook/addon-a11y": "4.2.0-alpha.6",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/ember": "4.2.0-alpha.6",
|
||||
"babel-loader": "^8",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
"cross-env": "^5.2.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "html-kitchen-sink",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
@ -13,23 +13,23 @@
|
||||
"storybook": "start-storybook -p 9006"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-events": "4.2.0-alpha.5",
|
||||
"@storybook/addon-jest": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/core": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/html": "4.2.0-alpha.5",
|
||||
"@storybook/addon-a11y": "4.2.0-alpha.6",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-events": "4.2.0-alpha.6",
|
||||
"@storybook/addon-jest": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/core": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"@storybook/html": "4.2.0-alpha.6",
|
||||
"eventemitter3": "^3.1.0",
|
||||
"format-json": "^1.0.3",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "marko-cli",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"description": "Demo of how to build an app using marko-starter",
|
||||
"repository": {
|
||||
@ -22,12 +22,12 @@
|
||||
"marko-starter": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/marko": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/marko": "4.2.0-alpha.6",
|
||||
"prettier": "^1.14.3",
|
||||
"webpack": "^4.23.1"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mithril-example",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook",
|
||||
@ -10,18 +10,18 @@
|
||||
"mithril": "^1.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/mithril": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/mithril": "4.2.0-alpha.6",
|
||||
"webpack": "^4.23.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "official-storybook",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -c ./ -s built-storybooks",
|
||||
@ -14,28 +14,28 @@
|
||||
"devDependencies": {
|
||||
"@emotion/core": "^10.0.2",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addon-a11y": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-cssresources": "4.2.0-alpha.5",
|
||||
"@storybook/addon-events": "4.2.0-alpha.5",
|
||||
"@storybook/addon-graphql": "4.2.0-alpha.5",
|
||||
"@storybook/addon-info": "4.2.0-alpha.5",
|
||||
"@storybook/addon-jest": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots-puppeteer": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/node-logger": "4.2.0-alpha.5",
|
||||
"@storybook/react": "4.2.0-alpha.5",
|
||||
"@storybook/addon-a11y": "4.2.0-alpha.6",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-cssresources": "4.2.0-alpha.6",
|
||||
"@storybook/addon-events": "4.2.0-alpha.6",
|
||||
"@storybook/addon-graphql": "4.2.0-alpha.6",
|
||||
"@storybook/addon-info": "4.2.0-alpha.6",
|
||||
"@storybook/addon-jest": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots-puppeteer": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"@storybook/node-logger": "4.2.0-alpha.6",
|
||||
"@storybook/react": "4.2.0-alpha.6",
|
||||
"cors": "^2.8.4",
|
||||
"cross-env": "^5.2.0",
|
||||
"emotion-theming": "^10.0.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "polymer-cli",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook",
|
||||
@ -9,15 +9,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@polymer/polymer": "^2.6.0",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/polymer": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/polymer": "4.2.0-alpha.6",
|
||||
"@webcomponents/webcomponentsjs": "^1.2.0",
|
||||
"global": "^4.3.2",
|
||||
"lit-html": "^0.12.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "preact-example",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
@ -15,18 +15,18 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/plugin-transform-runtime": "^7.2.0",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/preact": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/preact": "4.2.0-alpha.6",
|
||||
"babel-loader": "^8.0.4",
|
||||
"cross-env": "^5.2.0",
|
||||
"file-loader": "^2.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riot-example",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
@ -15,18 +15,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/riot": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/riot": "4.2.0-alpha.6",
|
||||
"babel-loader": "^8.0.4",
|
||||
"cross-env": "^5.2.0",
|
||||
"file-loader": "^2.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "svelte-example",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -s public",
|
||||
@ -10,17 +10,17 @@
|
||||
"global": "^4.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/svelte": "4.2.0-alpha.5"
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/svelte": "4.2.0-alpha.6"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-example",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
@ -14,18 +14,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.5",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/vue": "4.2.0-alpha.5",
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-backgrounds": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storysource": "4.2.0-alpha.6",
|
||||
"@storybook/addon-viewport": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/vue": "4.2.0-alpha.6",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-loader": "^8.0.4",
|
||||
"cross-env": "^5.2.0",
|
||||
|
@ -7,20 +7,12 @@ exports[`Storyshots Addon|Centered rounded 1`] = `
|
||||
<div
|
||||
style="margin: auto; max-height: 100%;"
|
||||
>
|
||||
<div
|
||||
style="position: fixed; top: 0px; left: 0px; bottom: 0px; right: 0px; display: flex; align-items: center; overflow: auto;"
|
||||
<button
|
||||
class="button rounded"
|
||||
style="color: rgb(66, 185, 131); border-color: #42b983;"
|
||||
>
|
||||
<div
|
||||
style="margin: auto; max-height: 100%;"
|
||||
>
|
||||
<button
|
||||
class="button rounded"
|
||||
style="color: rgb(66, 185, 131); border-color: #42b983;"
|
||||
>
|
||||
A Button with rounded edges!
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
A Button with rounded edges!
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
exports[`Storyshots Addon|Knobs All knobs 1`] = `
|
||||
<div
|
||||
style="padding: 8px 22px; border-radius: 8px;"
|
||||
style="border: 2px dotted; padding: 8px 22px; border-radius: 8px;"
|
||||
>
|
||||
<h1>
|
||||
My name is Jane,
|
||||
@ -46,8 +46,6 @@ exports[`Storyshots Addon|Knobs Simple 1`] = `
|
||||
|
||||
exports[`Storyshots Addon|Knobs XSS safety 1`] = `
|
||||
<div>
|
||||
|
||||
<img src=x onerror="alert('XSS Attack')" >
|
||||
|
||||
<img src=x onerror="alert('XSS Attack')" >
|
||||
</div>
|
||||
`;
|
||||
|
@ -5,17 +5,13 @@ exports[`Storyshots Custom|Decorator for Vue render 1`] = `
|
||||
style="border: medium solid blue;"
|
||||
>
|
||||
<div
|
||||
style="border: medium solid blue;"
|
||||
style="border: medium solid red;"
|
||||
>
|
||||
<div
|
||||
style="border: medium solid red;"
|
||||
<button
|
||||
class="button"
|
||||
>
|
||||
<button
|
||||
class="button"
|
||||
>
|
||||
renders component: MyButton!
|
||||
</button>
|
||||
</div>
|
||||
renders component: MyButton!
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@ -25,18 +21,14 @@ exports[`Storyshots Custom|Decorator for Vue template 1`] = `
|
||||
style="border: medium solid blue;"
|
||||
>
|
||||
<div
|
||||
style="border: medium solid blue;"
|
||||
style="border: medium solid red;"
|
||||
>
|
||||
<div
|
||||
style="border: medium solid red;"
|
||||
<button
|
||||
class="button"
|
||||
style="color: rgb(66, 185, 131); border-color: #42b983;"
|
||||
>
|
||||
<button
|
||||
class="button"
|
||||
style="color: rgb(66, 185, 131); border-color: #42b983;"
|
||||
>
|
||||
MyButton with template!
|
||||
</button>
|
||||
</div>
|
||||
MyButton with template!
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -38,53 +38,72 @@ storiesOf('Addon|Knobs', module)
|
||||
},
|
||||
}))
|
||||
.add('All knobs', () => {
|
||||
const name = text('Name', 'Jane');
|
||||
const stock = number('Stock', 20, {
|
||||
range: true,
|
||||
min: 0,
|
||||
max: 30,
|
||||
step: 5,
|
||||
});
|
||||
const fruits = {
|
||||
Apple: 'apples',
|
||||
Banana: 'bananas',
|
||||
Cherry: 'cherries',
|
||||
};
|
||||
const fruit = select('Fruit', fruits, 'apples');
|
||||
const price = number('Price', 2.25);
|
||||
|
||||
const colour = color('Border', 'deeppink');
|
||||
const today = date('Today', new Date('Jan 20 2017 GMT+0'));
|
||||
const items = array('Items', ['Laptop', 'Book', 'Whiskey']);
|
||||
const nice = boolean('Nice', true);
|
||||
|
||||
const stockMessage = stock
|
||||
? `I have a stock of ${stock} ${fruit}, costing $${price} each.`
|
||||
: `I'm out of ${fruit}${nice ? ', Sorry!' : '.'}`;
|
||||
const salutation = nice ? 'Nice to meet you!' : 'Leave me alone!';
|
||||
const dateOptions = { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' };
|
||||
|
||||
button('Arbitrary action', action('You clicked it!'));
|
||||
|
||||
return {
|
||||
props: {
|
||||
name: { default: text('Name', 'Jane') },
|
||||
stock: {
|
||||
default: number('Stock', 20, {
|
||||
range: true,
|
||||
min: 0,
|
||||
max: 30,
|
||||
step: 5,
|
||||
}),
|
||||
},
|
||||
fruit: { default: select('Fruit', fruits, 'apples') },
|
||||
price: { default: number('Price', 2.25) },
|
||||
colour: { default: color('Border', 'deeppink') },
|
||||
today: { default: date('Today', new Date('Jan 20 2017 GMT+0')) },
|
||||
// this is necessary, because we cant use arrays/objects directly in vue prop default values
|
||||
// a factory function is required, but we need to make sure the knob is only called once
|
||||
items: { default: (items => () => items)(array('Items', ['Laptop', 'Book', 'Whiskey'])) },
|
||||
nice: { default: boolean('Nice', true) },
|
||||
},
|
||||
data: () => ({
|
||||
dateOptions: { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' },
|
||||
}),
|
||||
computed: {
|
||||
stockMessage() {
|
||||
return this.stock
|
||||
? `I have a stock of ${this.stock} ${this.fruit}, costing $${this.price} each.`
|
||||
: `I'm out of ${this.fruit}${this.nice ? ', Sorry!' : '.'}`;
|
||||
},
|
||||
salutation() {
|
||||
return this.nice ? 'Nice to meet you!' : 'Leave me alone!';
|
||||
},
|
||||
formattedDate() {
|
||||
return new Date(this.today).toLocaleDateString('en-US', this.dateOptions);
|
||||
},
|
||||
style() {
|
||||
return {
|
||||
'border-color': this.colour,
|
||||
};
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div style="border:2px dotted ${colour}; padding: 8px 22px; border-radius: 8px">
|
||||
<h1>My name is ${name},</h1>
|
||||
<h3>today is ${new Date(today).toLocaleDateString('en-US', dateOptions)}</h3>
|
||||
<p>${stockMessage}</p>
|
||||
<div style="border: 2px dotted; padding: 8px 22px; border-radius: 8px" :style="style">
|
||||
<h1>My name is {{ name }},</h1>
|
||||
<h3>today is {{ formattedDate }}</h3>
|
||||
<p>{{ stockMessage }}</p>
|
||||
<p>Also, I have:</p>
|
||||
<ul>
|
||||
${items.map(item => `<li key=${item}>${item}</li>`).join('')}
|
||||
<li v-for="item in items" :key="item">{{ item }}</li>
|
||||
</ul>
|
||||
<p>${salutation}</p>
|
||||
<p>{{ salutation }}</p>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
})
|
||||
.add('XSS safety', () => ({
|
||||
template: `
|
||||
<div>
|
||||
${text('Rendered string', '<img src=x onerror="alert(\'XSS Attack\')" >')}
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
text: { default: text('Rendered string', '<img src=x onerror="alert(\'XSS Attack\')" >') },
|
||||
},
|
||||
template: '<div v-html="text"></div>',
|
||||
}));
|
||||
|
@ -11,5 +11,5 @@
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"registry": "https://registry.npmjs.org",
|
||||
"version": "4.2.0-alpha.5"
|
||||
"version": "4.2.0-alpha.6"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addons",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook addons store",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -20,7 +20,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "4.2.0-alpha.5",
|
||||
"@storybook/channels": "4.2.0-alpha.6",
|
||||
"global": "^4.3.2",
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-postmessage",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -20,7 +20,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "4.2.0-alpha.5",
|
||||
"@storybook/channels": "4.2.0-alpha.6",
|
||||
"global": "^4.3.2",
|
||||
"telejson": "^1.0.0"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-websocket",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -20,7 +20,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "4.2.0-alpha.5",
|
||||
"@storybook/channels": "4.2.0-alpha.6",
|
||||
"global": "^4.3.2",
|
||||
"json-fn": "^1.1.1"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channels",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/cli",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
||||
"keywords": [
|
||||
"cli",
|
||||
@ -29,7 +29,7 @@
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/preset-env": "^7.2.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"@storybook/codemod": "4.2.0-alpha.5",
|
||||
"@storybook/codemod": "4.2.0-alpha.6",
|
||||
"chalk": "^2.4.1",
|
||||
"commander": "^2.19.0",
|
||||
"core-js": "^2.5.7",
|
||||
@ -43,31 +43,31 @@
|
||||
"update-notifier": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "4.2.0-alpha.5",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.5",
|
||||
"@storybook/addon-graphql": "4.2.0-alpha.5",
|
||||
"@storybook/addon-info": "4.2.0-alpha.5",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.5",
|
||||
"@storybook/addon-links": "4.2.0-alpha.5",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.5",
|
||||
"@storybook/addon-options": "4.2.0-alpha.5",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/angular": "4.2.0-alpha.5",
|
||||
"@storybook/channel-postmessage": "4.2.0-alpha.5",
|
||||
"@storybook/channel-websocket": "4.2.0-alpha.5",
|
||||
"@storybook/channels": "4.2.0-alpha.5",
|
||||
"@storybook/ember": "4.2.0-alpha.5",
|
||||
"@storybook/html": "4.2.0-alpha.5",
|
||||
"@storybook/marko": "4.2.0-alpha.5",
|
||||
"@storybook/mithril": "4.2.0-alpha.5",
|
||||
"@storybook/polymer": "4.2.0-alpha.5",
|
||||
"@storybook/preact": "4.2.0-alpha.5",
|
||||
"@storybook/react": "4.2.0-alpha.5",
|
||||
"@storybook/react-native": "4.2.0-alpha.5",
|
||||
"@storybook/riot": "4.2.0-alpha.5",
|
||||
"@storybook/ui": "4.2.0-alpha.5",
|
||||
"@storybook/vue": "4.2.0-alpha.5"
|
||||
"@storybook/addon-actions": "4.2.0-alpha.6",
|
||||
"@storybook/addon-centered": "4.2.0-alpha.6",
|
||||
"@storybook/addon-graphql": "4.2.0-alpha.6",
|
||||
"@storybook/addon-info": "4.2.0-alpha.6",
|
||||
"@storybook/addon-knobs": "4.2.0-alpha.6",
|
||||
"@storybook/addon-links": "4.2.0-alpha.6",
|
||||
"@storybook/addon-notes": "4.2.0-alpha.6",
|
||||
"@storybook/addon-options": "4.2.0-alpha.6",
|
||||
"@storybook/addon-storyshots": "4.2.0-alpha.6",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/angular": "4.2.0-alpha.6",
|
||||
"@storybook/channel-postmessage": "4.2.0-alpha.6",
|
||||
"@storybook/channel-websocket": "4.2.0-alpha.6",
|
||||
"@storybook/channels": "4.2.0-alpha.6",
|
||||
"@storybook/ember": "4.2.0-alpha.6",
|
||||
"@storybook/html": "4.2.0-alpha.6",
|
||||
"@storybook/marko": "4.2.0-alpha.6",
|
||||
"@storybook/mithril": "4.2.0-alpha.6",
|
||||
"@storybook/polymer": "4.2.0-alpha.6",
|
||||
"@storybook/preact": "4.2.0-alpha.6",
|
||||
"@storybook/react": "4.2.0-alpha.6",
|
||||
"@storybook/react-native": "4.2.0-alpha.6",
|
||||
"@storybook/riot": "4.2.0-alpha.6",
|
||||
"@storybook/ui": "4.2.0-alpha.6",
|
||||
"@storybook/vue": "4.2.0-alpha.6"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/client-logger",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/codemod",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "A collection of codemod scripts written with JSCodeshift",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/components",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Core Storybook Components",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,9 +25,9 @@
|
||||
"@emotion/core": "^10.0.2",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@reach/router": "^1.1.1",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/client-logger": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/client-logger": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"emotion-theming": "^10.0.2",
|
||||
"global": "^4.3.2",
|
||||
"immer": "^1.5.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-events",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Event names used in storybook core",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -25,12 +25,12 @@
|
||||
"@babel/preset-env": "^7.2.0",
|
||||
"@emotion/core": "^10.0.2",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/channel-postmessage": "4.2.0-alpha.5",
|
||||
"@storybook/client-logger": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/node-logger": "4.2.0-alpha.5",
|
||||
"@storybook/ui": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/channel-postmessage": "4.2.0-alpha.6",
|
||||
"@storybook/client-logger": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"@storybook/node-logger": "4.2.0-alpha.6",
|
||||
"@storybook/ui": "4.2.0-alpha.6",
|
||||
"airbnb-js-shims": "^1 || ^2",
|
||||
"babel-plugin-emotion": "^10.0.5",
|
||||
"autoprefixer": "^9.4.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/node-logger",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ui",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"description": "Core Storybook UI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -24,10 +24,10 @@
|
||||
"@emotion/core": "^10.0.2",
|
||||
"@emotion/styled": "^10.0.2",
|
||||
"@reach/router": "^1.1.1",
|
||||
"@storybook/addons": "4.2.0-alpha.5",
|
||||
"@storybook/client-logger": "4.2.0-alpha.5",
|
||||
"@storybook/components": "4.2.0-alpha.5",
|
||||
"@storybook/core-events": "4.2.0-alpha.5",
|
||||
"@storybook/addons": "4.2.0-alpha.6",
|
||||
"@storybook/client-logger": "4.2.0-alpha.6",
|
||||
"@storybook/components": "4.2.0-alpha.6",
|
||||
"@storybook/core-events": "4.2.0-alpha.6",
|
||||
"emotion-theming": "^10.0.2",
|
||||
"eventemitter3": "^3.1.0",
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/root",
|
||||
"version": "4.2.0-alpha.5",
|
||||
"version": "4.2.0-alpha.6",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
10
yarn.lock
10
yarn.lock
@ -19157,15 +19157,15 @@ react-docgen@^3.0.0-rc.1:
|
||||
node-dir "^0.1.10"
|
||||
recast "^0.16.0"
|
||||
|
||||
react-dom@^16.6.0:
|
||||
version "16.6.3"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.6.3.tgz#8fa7ba6883c85211b8da2d0efeffc9d3825cccc0"
|
||||
integrity sha512-8ugJWRCWLGXy+7PmNh8WJz3g1TaTUt1XyoIcFN+x0Zbkoz+KKdUyx1AQLYJdbFXjuF41Nmjn5+j//rxvhFjgSQ==
|
||||
react-dom@^16.7.0:
|
||||
version "16.7.0"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.7.0.tgz#a17b2a7ca89ee7390bc1ed5eb81783c7461748b8"
|
||||
integrity sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
prop-types "^15.6.2"
|
||||
scheduler "^0.11.2"
|
||||
scheduler "^0.12.0"
|
||||
|
||||
react-dom@^16.7.0-alpha.2:
|
||||
version "16.7.0-alpha.2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user