mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 16:11:33 +08:00
Merge branch 'next' into core/options-in-config
This commit is contained in:
commit
1ec4dd8b7c
46
CHANGELOG.md
46
CHANGELOG.md
@ -1,3 +1,49 @@
|
||||
## 5.3.0-beta.7 (November 26, 2019)
|
||||
|
||||
### Features
|
||||
|
||||
* Storyshots-puppeteer: Add afterScreenshot handler ([#8092](https://github.com/storybookjs/storybook/pull/8092))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Core: Upgrade telejson to fix cross-origin frame error ([#8940](https://github.com/storybookjs/storybook/pull/8940))
|
||||
|
||||
### Maintenance
|
||||
|
||||
* Build: Fix image snapshots setup in official-storybook ([#8932](https://github.com/storybookjs/storybook/pull/8932))
|
||||
|
||||
### Dependency Upgrades
|
||||
|
||||
* Core: Add @babel/core peer dependency to @storybook/core ([#8933](https://github.com/storybookjs/storybook/pull/8933))
|
||||
|
||||
## 5.3.0-beta.6 (November 24, 2019)
|
||||
|
||||
### Features
|
||||
|
||||
* Presets: dynamic preset injection ([#8921](https://github.com/storybookjs/storybook/pull/8921))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Revert "feat: use `puppeteer-core` instead of `puppeteer`" ([#8925](https://github.com/storybookjs/storybook/pull/8925))
|
||||
* Addon-docs: Fix props detail tooltip to prevent cutting end of content ([#8923](https://github.com/storybookjs/storybook/pull/8923))
|
||||
|
||||
### Maintenance
|
||||
|
||||
* Addon-docs: Base code to improve the props table for TS ([#8905](https://github.com/storybookjs/storybook/pull/8905))
|
||||
* Build: Fix now deploy ([#8929](https://github.com/storybookjs/storybook/pull/8929))
|
||||
|
||||
### Dependency Upgrades
|
||||
|
||||
* Miscellaneous upgrades ([#8912](https://github.com/storybookjs/storybook/pull/8912))
|
||||
|
||||
## 5.3.0-beta.5 (November 23, 2019)
|
||||
|
||||
Failed npm publish
|
||||
|
||||
## 5.3.0-beta.4 (November 23, 2019)
|
||||
|
||||
Failed npm publish
|
||||
|
||||
## 5.3.0-beta.3 (November 21, 2019)
|
||||
|
||||
### Features
|
||||
|
@ -187,7 +187,7 @@ If you've made a change to storybook's codebase and would want this change to be
|
||||
|
||||
### Updating Tests
|
||||
|
||||
Before any contributes are submitted in a PR, make sure to add or update meaningful tests. A PR that has failing tests will be regarded as a “Work in Progress” and will not be merged until all tests pass.
|
||||
Before any contributions are submitted in a PR, make sure to add or update meaningful tests. A PR that has failing tests will be regarded as a “Work in Progress” and will not be merged until all tests pass.
|
||||
When creating new unit test files, the tests should adhere to a particular folder structure and naming convention, as defined below.
|
||||
|
||||
```sh
|
||||
@ -205,7 +205,7 @@ Before you submit a new PR, make sure you run `yarn test`. Do not submit a PR if
|
||||
|
||||
### Reviewing PRs
|
||||
|
||||
**As a PR submitter**, you should reference the issue if there is one, include a short description of what you contributed and, if it is a code change, instructions for how to manually test out the change. This is informally enforced by our [PR template](https://github.com/storybookjs/storybook/blob/master/.github/PULL_REQUEST_TEMPLATE.md). If your PR is reviewed as only needing trivial changes (e.g. small typos etc), and you have commit access, then you can merge the PR after making those changes.
|
||||
**As a PR submitter**, you should reference the issue if there is one, include a short description of what you contributed and, if it is a code change, instructions for how to manually test out the change. This is informally enforced by our [PR template](https://github.com/storybookjs/storybook/blob/master/.github/PULL_REQUEST_TEMPLATE.md). If your PR is reviewed as only needing trivial changes (e.g. small typos etc), and you have commit access then you can merge the PR after making those changes.
|
||||
|
||||
**As a PR reviewer**, you should read through the changes and comment on any potential problems. If you see something cool, a kind word never hurts either! Additionally, you should follow the testing instructions and manually test the changes. If the instructions are missing, unclear, or overly complex, feel free to request better instructions from the submitter. Unless the PR is tagged with the `do not merge` label, if you approve the review and there is no other required discussion or changes, you should also go ahead and merge the PR.
|
||||
|
||||
@ -215,7 +215,7 @@ If you are looking for a way to help the project, triaging issues is a great pla
|
||||
|
||||
### Responding to issues
|
||||
|
||||
Issues that are tagged `question / support` or `needs reproduction` are great places to help. If you can answer a question, it will help the asker as well as anyone searching. If an issue needs reproduction, you may be able to guide the reporter toward one, or even reproduce it yourself using [this technique](https://github.com/storybookjs/storybook/blob/master/CONTRIBUTING.md#reproductions).
|
||||
Issues that are tagged `question / support` or `needs reproduction` are great places to help. If you can answer a question, it will help the asker as well as anyone who has a similar question. Also in the future if anyone has that same question they can easily find it by searching. If an issue needs reproduction, you may be able to guide the reporter toward one, or even reproduce it yourself using [this technique](https://github.com/storybookjs/storybook/blob/master/CONTRIBUTING.md#reproductions).
|
||||
|
||||
### Triaging issues
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-a11y",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "a11y addon for storybook",
|
||||
"keywords": [
|
||||
"a11y",
|
||||
@ -33,12 +33,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"axe-core": "^3.3.2",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-actions",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Action Logger addon for storybook",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -28,12 +28,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"global": "^4.3.2",
|
||||
@ -44,7 +44,7 @@
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash": "^4.14.129",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/uuid": "^3.4.4"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-backgrounds",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "A storybook addon to show different backgrounds for your preview",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -32,12 +32,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"memoizerific": "^1.11.3",
|
||||
"react": "^16.8.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-centered",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook decorator to center components",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -29,7 +29,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"util-deprecate": "^1.0.2"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-contexts",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook Addon Contexts",
|
||||
"keywords": [
|
||||
"preact",
|
||||
@ -27,10 +27,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"qs": "^6.6.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-cssresources",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "A storybook addon to switch between css resources at runtime for your story",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -32,10 +32,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.8.3"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-design-assets",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Design asset preview for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -34,12 +34,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.8.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-docs",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Superior documentation for your components",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -45,13 +45,13 @@
|
||||
"@mdx-js/loader": "^1.1.0",
|
||||
"@mdx-js/mdx": "^1.1.0",
|
||||
"@mdx-js/react": "^1.0.27",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/postinstall": "5.3.0-beta.3",
|
||||
"@storybook/router": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/postinstall": "5.3.0-beta.7",
|
||||
"@storybook/router": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"acorn": "^7.1.0",
|
||||
"acorn-jsx": "^5.1.0",
|
||||
"acorn-walk": "^7.0.0",
|
||||
|
@ -4,6 +4,7 @@ import { PropDef } from '@storybook/components';
|
||||
import { hasDocgen, extractComponentProps, PropsExtractor, TypeSystem } from '../../lib/docgen';
|
||||
import { Component } from '../../blocks/shared';
|
||||
import { enhancePropTypesProps } from './propTypes/handleProp';
|
||||
import { enhanceTypeScriptProps } from './typeScript/handleProp';
|
||||
|
||||
export interface PropDefMap {
|
||||
[p: string]: PropDef;
|
||||
@ -37,11 +38,14 @@ function getPropDefs(component: Component, section: string): PropDef[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (extractedProps[0].typeSystem === TypeSystem.JAVASCRIPT) {
|
||||
return enhancePropTypesProps(extractedProps, component);
|
||||
switch (extractedProps[0].typeSystem) {
|
||||
case TypeSystem.JAVASCRIPT:
|
||||
return enhancePropTypesProps(extractedProps, component);
|
||||
case TypeSystem.TYPESCRIPT:
|
||||
return enhanceTypeScriptProps(extractedProps);
|
||||
default:
|
||||
return extractedProps.map(x => x.propDef);
|
||||
}
|
||||
|
||||
return extractedProps.map(x => x.propDef);
|
||||
}
|
||||
|
||||
export const extractProps: PropsExtractor = component => ({
|
||||
|
@ -1,79 +0,0 @@
|
||||
export enum InspectionType {
|
||||
IDENTIFIER = 'Identifier',
|
||||
LITERAL = 'Literal',
|
||||
OBJECT = 'Object',
|
||||
ARRAY = 'Array',
|
||||
FUNCTION = 'Function',
|
||||
CLASS = 'Class',
|
||||
ELEMENT = 'Element',
|
||||
UNKNOWN = 'Unknown',
|
||||
}
|
||||
|
||||
export interface BaseInspectionInferedType {
|
||||
type: InspectionType;
|
||||
}
|
||||
|
||||
// TODO: Fix this.
|
||||
// export interface OptionalIdentifierInspectionType extends BaseInspectionInferedType {
|
||||
// identifier?: string;
|
||||
// }
|
||||
|
||||
// export interface RequiredIdentifierInspectionType extends BaseInspectionInferedType {
|
||||
// identifier: string;
|
||||
// }
|
||||
|
||||
// export type IdentifiableInspectionType =
|
||||
// | OptionalIdentifierInspectionType
|
||||
// | RequiredIdentifierInspectionType;
|
||||
|
||||
export interface InspectionIdentifier extends BaseInspectionInferedType {
|
||||
type: InspectionType.IDENTIFIER;
|
||||
identifier: string;
|
||||
}
|
||||
|
||||
export interface InspectionLiteral extends BaseInspectionInferedType {
|
||||
type: InspectionType.LITERAL;
|
||||
}
|
||||
|
||||
export interface InspectionObject extends BaseInspectionInferedType {
|
||||
type: InspectionType.OBJECT;
|
||||
}
|
||||
|
||||
export interface InspectionArray extends BaseInspectionInferedType {
|
||||
type: InspectionType.ARRAY;
|
||||
}
|
||||
|
||||
export interface InspectionClass extends BaseInspectionInferedType {
|
||||
type: InspectionType.CLASS;
|
||||
identifier: string;
|
||||
}
|
||||
|
||||
export interface InspectionFunction extends BaseInspectionInferedType {
|
||||
type: InspectionType.FUNCTION;
|
||||
identifier?: string;
|
||||
hasArguments: boolean;
|
||||
}
|
||||
|
||||
export interface InspectionElement extends BaseInspectionInferedType {
|
||||
type: InspectionType.ELEMENT;
|
||||
identifier?: string;
|
||||
}
|
||||
|
||||
export interface InspectionUnknown extends BaseInspectionInferedType {
|
||||
type: InspectionType.UNKNOWN;
|
||||
}
|
||||
|
||||
export type InspectionInferedType =
|
||||
| InspectionIdentifier
|
||||
| InspectionLiteral
|
||||
| InspectionObject
|
||||
| InspectionArray
|
||||
| InspectionClass
|
||||
| InspectionFunction
|
||||
| InspectionElement
|
||||
| InspectionUnknown;
|
||||
|
||||
export interface InspectionResult {
|
||||
inferedType: InspectionInferedType;
|
||||
ast?: any;
|
||||
}
|
@ -1,25 +1,32 @@
|
||||
import { isNil } from 'lodash';
|
||||
// @ts-ignore
|
||||
import { PropDefaultValue } from '@storybook/components';
|
||||
import { inspectValue } from '../inspection/inspectValue';
|
||||
import { OBJECT_CAPTION, FUNCTION_CAPTION, ELEMENT_CAPTION, ARRAY_CAPTION } from './captions';
|
||||
import {
|
||||
OBJECT_CAPTION,
|
||||
FUNCTION_CAPTION,
|
||||
ELEMENT_CAPTION,
|
||||
ARRAY_CAPTION,
|
||||
} from '../propTypes/captions';
|
||||
import { generateCode } from './generateCode';
|
||||
import {
|
||||
InspectionFunction,
|
||||
InspectionResult,
|
||||
InspectionType,
|
||||
InspectionElement,
|
||||
} from '../inspection/types';
|
||||
InspectionIdentifiableInferedType,
|
||||
inspectValue,
|
||||
} from './inspection';
|
||||
import { isHtmlTag } from './isHtmlTag';
|
||||
import { createSummaryValue, isTooLongForDefaultValueSummary } from '../../../lib';
|
||||
|
||||
// TODO: Fix this any type.
|
||||
function getPrettyIdentifier(inferedType: any): string {
|
||||
function getPrettyIdentifier(inferedType: InspectionIdentifiableInferedType): string {
|
||||
const { type, identifier } = inferedType;
|
||||
|
||||
switch (type) {
|
||||
case InspectionType.FUNCTION:
|
||||
return inferedType.hasArguments ? `${identifier}( ... )` : `${identifier}()`;
|
||||
return (inferedType as InspectionFunction).hasArguments
|
||||
? `${identifier}( ... )`
|
||||
: `${identifier}()`;
|
||||
case InspectionType.ELEMENT:
|
||||
return `<${identifier} />`;
|
||||
default:
|
||||
@ -45,7 +52,10 @@ function generateFunc({ inferedType, ast }: InspectionResult): PropDefaultValue
|
||||
const { identifier } = inferedType as InspectionFunction;
|
||||
|
||||
if (!isNil(identifier)) {
|
||||
return createSummaryValue(getPrettyIdentifier(inferedType), generateCode(ast));
|
||||
return createSummaryValue(
|
||||
getPrettyIdentifier(inferedType as InspectionIdentifiableInferedType),
|
||||
generateCode(ast)
|
||||
);
|
||||
}
|
||||
|
||||
const prettyCaption = generateCode(ast, true);
|
||||
@ -66,7 +76,9 @@ function generateElement(
|
||||
|
||||
if (!isNil(identifier)) {
|
||||
if (!isHtmlTag(identifier)) {
|
||||
const prettyIdentifier = getPrettyIdentifier(inferedType);
|
||||
const prettyIdentifier = getPrettyIdentifier(
|
||||
inferedType as InspectionIdentifiableInferedType
|
||||
);
|
||||
|
||||
return createSummaryValue(
|
||||
prettyIdentifier,
|
@ -7,7 +7,6 @@ import estree from 'estree';
|
||||
import * as acornWalk from 'acorn-walk';
|
||||
import {
|
||||
InspectionType,
|
||||
InspectionInferedType,
|
||||
InspectionLiteral,
|
||||
InspectionElement,
|
||||
InspectionFunction,
|
||||
@ -16,6 +15,7 @@ import {
|
||||
InspectionUnknown,
|
||||
InspectionIdentifier,
|
||||
InspectionArray,
|
||||
InspectionInferedType,
|
||||
} from './types';
|
||||
|
||||
interface ParsingResult<T> {
|
2
addons/docs/src/frameworks/react/lib/inspection/index.ts
Normal file
2
addons/docs/src/frameworks/react/lib/inspection/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './types';
|
||||
export * from './inspectValue';
|
62
addons/docs/src/frameworks/react/lib/inspection/types.ts
Normal file
62
addons/docs/src/frameworks/react/lib/inspection/types.ts
Normal file
@ -0,0 +1,62 @@
|
||||
export enum InspectionType {
|
||||
IDENTIFIER = 'Identifier',
|
||||
LITERAL = 'Literal',
|
||||
OBJECT = 'Object',
|
||||
ARRAY = 'Array',
|
||||
FUNCTION = 'Function',
|
||||
CLASS = 'Class',
|
||||
ELEMENT = 'Element',
|
||||
UNKNOWN = 'Unknown',
|
||||
}
|
||||
|
||||
export interface InspectionInferedType {
|
||||
type: InspectionType;
|
||||
}
|
||||
|
||||
export interface InspectionIdentifier extends InspectionInferedType {
|
||||
type: InspectionType.IDENTIFIER;
|
||||
identifier: string;
|
||||
}
|
||||
|
||||
export interface InspectionLiteral extends InspectionInferedType {
|
||||
type: InspectionType.LITERAL;
|
||||
}
|
||||
|
||||
export interface InspectionObject extends InspectionInferedType {
|
||||
type: InspectionType.OBJECT;
|
||||
}
|
||||
|
||||
export interface InspectionArray extends InspectionInferedType {
|
||||
type: InspectionType.ARRAY;
|
||||
}
|
||||
|
||||
export interface InspectionClass extends InspectionInferedType {
|
||||
type: InspectionType.CLASS;
|
||||
identifier: string;
|
||||
}
|
||||
|
||||
export interface InspectionFunction extends InspectionInferedType {
|
||||
type: InspectionType.FUNCTION;
|
||||
identifier?: string;
|
||||
hasArguments: boolean;
|
||||
}
|
||||
|
||||
export interface InspectionElement extends InspectionInferedType {
|
||||
type: InspectionType.ELEMENT;
|
||||
identifier?: string;
|
||||
}
|
||||
|
||||
export interface InspectionUnknown extends InspectionInferedType {
|
||||
type: InspectionType.UNKNOWN;
|
||||
}
|
||||
|
||||
export type InspectionIdentifiableInferedType =
|
||||
| InspectionIdentifier
|
||||
| InspectionClass
|
||||
| InspectionFunction
|
||||
| InspectionElement;
|
||||
|
||||
export interface InspectionResult {
|
||||
inferedType: InspectionInferedType;
|
||||
ast?: any;
|
||||
}
|
@ -2,8 +2,7 @@ import { isNil } from 'lodash';
|
||||
import { PropSummaryValue, PropType } from '@storybook/components';
|
||||
import { createSummaryValue, isTooLongForTypeSummary } from '../../../lib';
|
||||
import { ExtractedProp, DocgenPropType } from '../../../lib/docgen';
|
||||
import { inspectValue } from '../inspection/inspectValue';
|
||||
import { generateCode } from './generateCode';
|
||||
import { generateCode } from '../lib/generateCode';
|
||||
import { generateFuncSignature } from './generateFuncSignature';
|
||||
import {
|
||||
OBJECT_CAPTION,
|
||||
@ -13,8 +12,8 @@ import {
|
||||
ELEMENT_CAPTION,
|
||||
CUSTOM_CAPTION,
|
||||
} from './captions';
|
||||
import { InspectionType } from '../inspection/types';
|
||||
import { isHtmlTag } from './isHtmlTag';
|
||||
import { InspectionType, inspectValue } from '../lib/inspection';
|
||||
import { isHtmlTag } from '../lib/isHtmlTag';
|
||||
|
||||
enum PropTypesType {
|
||||
CUSTOM = 'custom',
|
||||
|
@ -712,7 +712,7 @@ describe('enhancePropTypesProp', () => {
|
||||
docgenInfo: {
|
||||
...createDocgenProp({
|
||||
name: 'prop',
|
||||
type: { name: 'custom' },
|
||||
type: { name: 'anything-is-fine' },
|
||||
defaultValue: { value: defaultValue },
|
||||
}),
|
||||
},
|
||||
|
@ -2,7 +2,7 @@ import { isNil } from 'lodash';
|
||||
import { PropDef } from '@storybook/components';
|
||||
import { ExtractedProp } from '../../../lib/docgen';
|
||||
import { createType } from './createType';
|
||||
import { createDefaultValue } from './createDefaultValue';
|
||||
import { createDefaultValue } from '../lib/createDefaultValue';
|
||||
import { Component } from '../../../blocks/shared';
|
||||
import { keepOriginalDefinitionOrder } from './sortProps';
|
||||
|
||||
|
223
addons/docs/src/frameworks/react/typeScript/handleProp.test.ts
Normal file
223
addons/docs/src/frameworks/react/typeScript/handleProp.test.ts
Normal file
@ -0,0 +1,223 @@
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
|
||||
import { PropDef } from '@storybook/components';
|
||||
import { Component } from '../../../blocks/shared';
|
||||
import { extractComponentProps, DocgenInfo } from '../../../lib/docgen';
|
||||
import { enhanceTypeScriptProp } from './handleProp';
|
||||
|
||||
const DOCGEN_SECTION = 'props';
|
||||
|
||||
function createDocgenSection(docgenInfo: DocgenInfo): Record<string, any> {
|
||||
return {
|
||||
[DOCGEN_SECTION]: {
|
||||
...docgenInfo,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function createDocgenProp({
|
||||
name,
|
||||
tsType,
|
||||
...others
|
||||
}: Partial<DocgenInfo> & { name: string }): Record<string, any> {
|
||||
return {
|
||||
[name]: {
|
||||
tsType,
|
||||
required: false,
|
||||
...others,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react/forbid-foreign-prop-types
|
||||
function createComponent({ propTypes = {}, defaultProps = {}, docgenInfo = {} }): Component {
|
||||
const component = () => {};
|
||||
component.propTypes = propTypes;
|
||||
component.defaultProps = defaultProps;
|
||||
|
||||
// @ts-ignore
|
||||
component.__docgenInfo = createDocgenSection(docgenInfo);
|
||||
|
||||
return component;
|
||||
}
|
||||
|
||||
function extractPropDef(component: Component): PropDef {
|
||||
return enhanceTypeScriptProp(extractComponentProps(component, DOCGEN_SECTION)[0]);
|
||||
}
|
||||
|
||||
describe('enhanceTypeScriptProp', () => {
|
||||
describe('defaultValue', () => {
|
||||
function createTestComponent(defaultValue: string): Component {
|
||||
return createComponent({
|
||||
docgenInfo: {
|
||||
...createDocgenProp({
|
||||
name: 'prop',
|
||||
tsType: { name: 'anything-is-fine' },
|
||||
defaultValue: { value: defaultValue },
|
||||
}),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
it('should support short object', () => {
|
||||
const component = createTestComponent("{ foo: 'foo', bar: 'bar' }");
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
const expectedSummary = "{ foo: 'foo', bar: 'bar' }";
|
||||
|
||||
expect(defaultValue.summary.replace(/\s/g, '')).toBe(expectedSummary.replace(/\s/g, ''));
|
||||
expect(defaultValue.detail).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should support long object', () => {
|
||||
const component = createTestComponent("{ foo: 'foo', bar: 'bar', another: 'another' }");
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('object');
|
||||
|
||||
const expectedDetail = `{
|
||||
foo: 'foo',
|
||||
bar: 'bar',
|
||||
another: 'another'
|
||||
}`;
|
||||
|
||||
expect(defaultValue.detail.replace(/\s/g, '')).toBe(expectedDetail.replace(/\s/g, ''));
|
||||
});
|
||||
|
||||
it('should support short function', () => {
|
||||
const component = createTestComponent('() => {}');
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('() => {}');
|
||||
expect(defaultValue.detail).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should support long function', () => {
|
||||
const component = createTestComponent(
|
||||
'(foo, bar) => {\n const concat = foo + bar;\n const append = concat + " hey!";\n \n return append;\n}'
|
||||
);
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('func');
|
||||
|
||||
const expectedDetail = `(foo, bar) => {
|
||||
const concat = foo + bar;
|
||||
const append = concat + ' hey!';
|
||||
return append
|
||||
}`;
|
||||
|
||||
expect(defaultValue.detail.replace(/\s/g, '')).toBe(expectedDetail.replace(/\s/g, ''));
|
||||
});
|
||||
|
||||
it('should use the name of function when available and indicate that args are present', () => {
|
||||
const component = createTestComponent('function concat(a, b) {\n return a + b;\n}');
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('concat( ... )');
|
||||
|
||||
const expectedDetail = `function concat(a, b) {
|
||||
return a + b
|
||||
}`;
|
||||
|
||||
expect(defaultValue.detail.replace(/\s/g, '')).toBe(expectedDetail.replace(/\s/g, ''));
|
||||
});
|
||||
|
||||
it('should use the name of function when available', () => {
|
||||
const component = createTestComponent('function hello() {\n return "hello";\n}');
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('hello()');
|
||||
|
||||
const expectedDetail = `function hello() {
|
||||
return 'hello'
|
||||
}`;
|
||||
|
||||
expect(defaultValue.detail.replace(/\s/g, '')).toBe(expectedDetail.replace(/\s/g, ''));
|
||||
});
|
||||
|
||||
it('should support short element', () => {
|
||||
const component = createTestComponent('<div>Hey!</div>');
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('<div>Hey!</div>');
|
||||
expect(defaultValue.detail).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should support long element', () => {
|
||||
const component = createTestComponent(
|
||||
'() => {\n return <div>Inlined FunctionnalComponent!</div>;\n}'
|
||||
);
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('element');
|
||||
|
||||
const expectedDetail = `() => {
|
||||
return <div>Inlined FunctionnalComponent!</div>;
|
||||
}`;
|
||||
|
||||
expect(defaultValue.detail.replace(/\s/g, '')).toBe(expectedDetail.replace(/\s/g, ''));
|
||||
});
|
||||
|
||||
it("should use the name of the React component when it's available", () => {
|
||||
const component = createTestComponent(
|
||||
'function InlinedFunctionalComponent() {\n return <div>Inlined FunctionnalComponent!</div>;\n}'
|
||||
);
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('<InlinedFunctionalComponent />');
|
||||
|
||||
const expectedDetail = `function InlinedFunctionalComponent() {
|
||||
return <div>Inlined FunctionnalComponent!</div>;
|
||||
}`;
|
||||
|
||||
expect(defaultValue.detail.replace(/\s/g, '')).toBe(expectedDetail.replace(/\s/g, ''));
|
||||
});
|
||||
|
||||
it('should not use the name of an HTML element', () => {
|
||||
const component = createTestComponent('<div>Hey!</div>');
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).not.toBe('<div />');
|
||||
});
|
||||
|
||||
it('should support short array', () => {
|
||||
const component = createTestComponent('[1]');
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('[1]');
|
||||
expect(defaultValue.detail).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should support long array', () => {
|
||||
const component = createTestComponent(
|
||||
'[\n {\n thing: {\n id: 2,\n func: () => {},\n arr: [],\n },\n },\n]'
|
||||
);
|
||||
|
||||
const { defaultValue } = extractPropDef(component);
|
||||
|
||||
expect(defaultValue.summary).toBe('array');
|
||||
|
||||
const expectedDetail = `[{
|
||||
thing: {
|
||||
id: 2,
|
||||
func: () => {
|
||||
},
|
||||
arr: []
|
||||
}
|
||||
}]`;
|
||||
|
||||
expect(defaultValue.detail.replace(/\s/g, '')).toBe(expectedDetail.replace(/\s/g, ''));
|
||||
});
|
||||
});
|
||||
});
|
22
addons/docs/src/frameworks/react/typeScript/handleProp.ts
Normal file
22
addons/docs/src/frameworks/react/typeScript/handleProp.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { isNil } from 'lodash';
|
||||
import { PropDef } from '@storybook/components';
|
||||
import { ExtractedProp } from '../../../lib/docgen';
|
||||
import { createDefaultValue } from '../lib/createDefaultValue';
|
||||
|
||||
export function enhanceTypeScriptProp(extractedProp: ExtractedProp): PropDef {
|
||||
const { propDef } = extractedProp;
|
||||
|
||||
const { defaultValue } = extractedProp.docgenInfo;
|
||||
if (!isNil(defaultValue)) {
|
||||
const newDefaultValue = createDefaultValue(defaultValue.value);
|
||||
if (!isNil(newDefaultValue)) {
|
||||
propDef.defaultValue = newDefaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
return propDef;
|
||||
}
|
||||
|
||||
export function enhanceTypeScriptProps(extractedProps: ExtractedProp[]): PropDef[] {
|
||||
return extractedProps.map(enhanceTypeScriptProp);
|
||||
}
|
@ -5,6 +5,7 @@ import { JsDocParsingResult } from '../jsdocParser';
|
||||
import { createSummaryValue } from '../utils';
|
||||
import { createFlowPropDef } from './flow/createPropDef';
|
||||
import { isDefaultValueBlacklisted } from './utils/defaultValue';
|
||||
import { createTsPropDef } from './typeScript/createPropDef';
|
||||
|
||||
export type PropDefFactory = (
|
||||
propName: string,
|
||||
@ -69,7 +70,7 @@ export const javaScriptFactory: PropDefFactory = (propName, docgenInfo, jsDocPar
|
||||
};
|
||||
|
||||
export const tsFactory: PropDefFactory = (propName, docgenInfo, jsDocParsingResult) => {
|
||||
const propDef = createBasicPropDef(propName, docgenInfo.tsType, docgenInfo);
|
||||
const propDef = createTsPropDef(propName, docgenInfo);
|
||||
|
||||
return applyJsDocResult(propDef, jsDocParsingResult);
|
||||
};
|
||||
|
@ -1,22 +1,13 @@
|
||||
import { isNil } from 'lodash';
|
||||
import { createFlowPropDef } from './createPropDef';
|
||||
import { DocgenInfo, DocgenFlowType } from '../types';
|
||||
import { DocgenInfo } from '../types';
|
||||
|
||||
const PROP_NAME = 'propName';
|
||||
|
||||
function createDocgenInfo({
|
||||
type,
|
||||
defaultValue,
|
||||
...rest
|
||||
}: {
|
||||
type: DocgenFlowType;
|
||||
defaultValue?: string;
|
||||
}): DocgenInfo {
|
||||
function createDocgenInfo({ flowType, ...others }: Partial<DocgenInfo>): DocgenInfo {
|
||||
return {
|
||||
flowType: type,
|
||||
defaultValue: !isNil(defaultValue) ? { value: defaultValue } : undefined,
|
||||
flowType,
|
||||
required: false,
|
||||
...rest,
|
||||
...others,
|
||||
};
|
||||
}
|
||||
|
||||
@ -25,7 +16,7 @@ describe('type', () => {
|
||||
x => {
|
||||
it(`should support ${x}`, () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: { name: x },
|
||||
flowType: { name: x },
|
||||
});
|
||||
|
||||
const { type } = createFlowPropDef(PROP_NAME, docgenInfo);
|
||||
@ -39,7 +30,7 @@ describe('type', () => {
|
||||
['Array', 'Class', 'MyClass'].forEach(x => {
|
||||
it(`should support untyped ${x}`, () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: { name: x },
|
||||
flowType: { name: x },
|
||||
});
|
||||
|
||||
const { type } = createFlowPropDef(PROP_NAME, docgenInfo);
|
||||
@ -50,7 +41,7 @@ describe('type', () => {
|
||||
|
||||
it(`should support typed ${x}`, () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: {
|
||||
flowType: {
|
||||
name: x,
|
||||
elements: [
|
||||
{
|
||||
@ -70,7 +61,7 @@ describe('type', () => {
|
||||
|
||||
it('should support short object signature', () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: {
|
||||
flowType: {
|
||||
name: 'signature',
|
||||
type: 'object',
|
||||
raw: '{ foo: string, bar?: mixed }',
|
||||
@ -103,7 +94,7 @@ describe('type', () => {
|
||||
|
||||
it('should support long object signature', () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: {
|
||||
flowType: {
|
||||
name: 'signature',
|
||||
type: 'object',
|
||||
raw: '{ (x: string): void, prop: string }',
|
||||
@ -147,7 +138,7 @@ describe('type', () => {
|
||||
|
||||
it('should support func signature', () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: {
|
||||
flowType: {
|
||||
name: 'signature',
|
||||
type: 'function',
|
||||
raw: '(x: string) => void',
|
||||
@ -175,7 +166,7 @@ describe('type', () => {
|
||||
|
||||
it('should support tuple', () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: {
|
||||
flowType: {
|
||||
name: 'tuple',
|
||||
raw: '[foo, "value", number]',
|
||||
elements: [
|
||||
@ -200,7 +191,7 @@ describe('type', () => {
|
||||
|
||||
it('should support union', () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: {
|
||||
flowType: {
|
||||
name: 'union',
|
||||
raw: 'number | string',
|
||||
elements: [
|
||||
@ -221,7 +212,7 @@ describe('type', () => {
|
||||
|
||||
it('should support intersection', () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
type: {
|
||||
flowType: {
|
||||
name: 'intersection',
|
||||
raw: 'number & string',
|
||||
elements: [
|
||||
|
17
addons/docs/src/lib/docgen/typeScript/createDefaultValue.ts
Normal file
17
addons/docs/src/lib/docgen/typeScript/createDefaultValue.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { PropDefaultValue } from '@storybook/components';
|
||||
import { isNil } from 'lodash';
|
||||
import { DocgenInfo } from '../types';
|
||||
import { createSummaryValue } from '../../utils';
|
||||
import { isDefaultValueBlacklisted } from '../utils/defaultValue';
|
||||
|
||||
export function createDefaultValue({ tsType, defaultValue }: DocgenInfo): PropDefaultValue {
|
||||
if (!isNil(defaultValue)) {
|
||||
const { value } = defaultValue;
|
||||
|
||||
if (!isDefaultValueBlacklisted(value)) {
|
||||
return createSummaryValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
26
addons/docs/src/lib/docgen/typeScript/createPropDef.test.ts
Normal file
26
addons/docs/src/lib/docgen/typeScript/createPropDef.test.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { createTsPropDef } from './createPropDef';
|
||||
import { DocgenInfo } from '../types';
|
||||
|
||||
const PROP_NAME = 'propName';
|
||||
|
||||
function createDocgenInfo({ tsType, ...others }: Partial<DocgenInfo>): DocgenInfo {
|
||||
return {
|
||||
tsType,
|
||||
required: true,
|
||||
...others,
|
||||
};
|
||||
}
|
||||
|
||||
describe('type', () => {
|
||||
it("should remove ' | undefined' from optional props type", () => {
|
||||
const docgenInfo = createDocgenInfo({
|
||||
tsType: { name: 'string | undefined' },
|
||||
required: false,
|
||||
});
|
||||
|
||||
const { type } = createTsPropDef(PROP_NAME, docgenInfo);
|
||||
|
||||
expect(type.summary).toBe('string');
|
||||
expect(type.detail).toBeUndefined();
|
||||
});
|
||||
});
|
15
addons/docs/src/lib/docgen/typeScript/createPropDef.ts
Normal file
15
addons/docs/src/lib/docgen/typeScript/createPropDef.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { PropDefFactory } from '../createPropDef';
|
||||
import { createType } from './createType';
|
||||
import { createDefaultValue } from './createDefaultValue';
|
||||
|
||||
export const createTsPropDef: PropDefFactory = (propName, docgenInfo) => {
|
||||
const { description, required } = docgenInfo;
|
||||
|
||||
return {
|
||||
name: propName,
|
||||
type: createType(docgenInfo),
|
||||
required,
|
||||
description,
|
||||
defaultValue: createDefaultValue(docgenInfo),
|
||||
};
|
||||
};
|
11
addons/docs/src/lib/docgen/typeScript/createType.ts
Normal file
11
addons/docs/src/lib/docgen/typeScript/createType.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { PropType } from '@storybook/components';
|
||||
import { DocgenInfo } from '../types';
|
||||
import { createSummaryValue } from '../../utils';
|
||||
|
||||
export function createType({ tsType, required }: DocgenInfo): PropType {
|
||||
if (!required) {
|
||||
return createSummaryValue(tsType.name.replace(' | undefined', ''));
|
||||
}
|
||||
|
||||
return createSummaryValue(tsType.name);
|
||||
}
|
@ -3,19 +3,19 @@ import { Component } from '../../blocks/shared';
|
||||
|
||||
export type PropsExtractor = (component: Component) => PropsTableProps | null;
|
||||
|
||||
export interface DocgenBaseType {
|
||||
export interface DocgenType {
|
||||
name: string;
|
||||
description?: string;
|
||||
require?: boolean;
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
export interface DocgenPropType extends DocgenBaseType {
|
||||
export interface DocgenPropType extends DocgenType {
|
||||
value?: any;
|
||||
raw?: string;
|
||||
computed?: boolean;
|
||||
}
|
||||
|
||||
export interface DocgenFlowType extends DocgenBaseType {
|
||||
export interface DocgenFlowType extends DocgenType {
|
||||
type?: string;
|
||||
raw?: string;
|
||||
signature?: any;
|
||||
@ -23,9 +23,9 @@ export interface DocgenFlowType extends DocgenBaseType {
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DocgenTypeScriptType extends DocgenBaseType {}
|
||||
export interface DocgenTypeScriptType extends DocgenType {}
|
||||
|
||||
export type DocgenType = DocgenPropType | DocgenFlowType | DocgenTypeScriptType;
|
||||
// export type DocgenType = DocgenPropType | DocgenFlowType | DocgenTypeScriptType;
|
||||
|
||||
export interface DocgenPropDefaultValue {
|
||||
value: string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-events",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Add events to your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -31,11 +31,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"format-json": "^1.0.3",
|
||||
"lodash": "^4.17.15",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-google-analytics",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook addon for google analytics",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -20,8 +20,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"react-ga": "^2.5.7"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-graphql",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook addon to display the GraphiQL IDE",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -29,8 +29,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"graphiql": "^0.16.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-info",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "A Storybook addon to show additional information for your stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -28,10 +28,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"marksy": "^7.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-jest",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "React storybook addon that show component jest report",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -35,11 +35,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.8.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-knobs",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook Addon Prop Editor Component",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -29,12 +29,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"@types/react-color": "^3.0.1",
|
||||
"copy-to-clipboard": "^3.0.8",
|
||||
"core-js": "^3.0.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-links",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Story Links addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -29,10 +29,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/router": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/router": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"prop-types": "^15.7.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-notes",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Write notes for your Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -30,13 +30,13 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/router": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/router": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"markdown-to-jsx": "^6.10.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-actions",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Action Logger addon for react-native storybook",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -26,13 +26,13 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"fast-deep-equal": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "5.3.0-beta.3"
|
||||
"@storybook/addon-actions": "5.3.0-beta.7"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@storybook/addon-actions": "*",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-backgrounds",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "A react-native storybook addon to show different backgrounds for your preview",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -31,9 +31,9 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"prop-types": "^15.7.2"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-knobs",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Display storybook story knobs on your deviced.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -28,8 +28,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/native": "^10.0.14",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"deep-equal": "^1.0.1",
|
||||
"prop-types": "^15.7.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-ondevice-notes",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Write notes for your react-native Storybook stories.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -28,11 +28,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/core": "^10.0.20",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-native-simple-markdown": "^1.1.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-options",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Options addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -29,7 +29,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-queryparams",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "parameter addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -30,12 +30,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"qs": "^6.6.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -33,11 +33,13 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@jest/transform": "^24.9.0",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@types/glob": "^7.1.1",
|
||||
"@types/jest": "^24.0.16",
|
||||
"@types/jest-specific-snapshot": "^0.5.3",
|
||||
"babel-plugin-require-context-hook": "^1.0.0",
|
||||
"core-js": "^3.0.1",
|
||||
"glob": "^7.1.3",
|
||||
"global": "^4.3.2",
|
||||
@ -47,8 +49,8 @@
|
||||
"ts-dedent": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-docs": "5.3.0-beta.3",
|
||||
"@storybook/react": "5.3.0-beta.3",
|
||||
"@storybook/addon-docs": "5.3.0-beta.7",
|
||||
"@storybook/react": "5.3.0-beta.7",
|
||||
"babel-loader": "^8.0.6",
|
||||
"enzyme-to-json": "^3.4.1",
|
||||
"jest-emotion": "^10.0.17",
|
||||
|
@ -12,11 +12,11 @@ type TestMethod = 'beforeAll' | 'beforeEach' | 'afterEach' | 'afterAll';
|
||||
const methods: TestMethod[] = ['beforeAll', 'beforeEach', 'afterEach', 'afterAll'];
|
||||
|
||||
function callTestMethodGlobals(
|
||||
testMethod: { [key in TestMethod]?: Function } & { [key in string]: any }
|
||||
testMethod: { [key in TestMethod]?: Function & { timeout?: number } } & { [key in string]: any }
|
||||
) {
|
||||
methods.forEach(method => {
|
||||
if (typeof testMethod[method] === 'function') {
|
||||
global[method](testMethod[method]);
|
||||
global[method](testMethod[method], testMethod[method].timeout);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -18,15 +18,19 @@ function snapshotTest({ item, asyncJest, framework, testMethod, testMethodParams
|
||||
context,
|
||||
...testMethodParams,
|
||||
})
|
||||
)
|
||||
),
|
||||
testMethod.timeout
|
||||
);
|
||||
} else {
|
||||
it(name, () =>
|
||||
testMethod({
|
||||
story: item,
|
||||
context,
|
||||
...testMethodParams,
|
||||
})
|
||||
it(
|
||||
name,
|
||||
() =>
|
||||
testMethod({
|
||||
story: item,
|
||||
context,
|
||||
...testMethodParams,
|
||||
}),
|
||||
testMethod.timeout
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,13 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import glob from 'glob';
|
||||
import { toRequireContext } from '@storybook/core/server';
|
||||
import registerRequireContextHook from 'babel-plugin-require-context-hook/register';
|
||||
import global from 'global';
|
||||
import { ClientApi } from './Loader';
|
||||
import { StoryshotsOptions } from '../api/StoryshotsOptions';
|
||||
|
||||
registerRequireContextHook();
|
||||
|
||||
const isFile = (file: string): boolean => {
|
||||
try {
|
||||
return fs.lstatSync(file).isFile();
|
||||
@ -64,9 +68,18 @@ function getConfigPathParts(input: string): Output {
|
||||
if (main) {
|
||||
const { stories = [] } = require.requireActual(main);
|
||||
|
||||
const result = stories.reduce((acc: string[], i: string) => [...acc, ...glob.sync(i)], []);
|
||||
|
||||
output.stories = result;
|
||||
output.stories = stories.map(
|
||||
(pattern: string | { path: string; recursive: boolean; match: string }) => {
|
||||
const { path: basePath, recursive, match } = toRequireContext(pattern);
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
return global.__requireContext(
|
||||
configDir,
|
||||
basePath,
|
||||
recursive,
|
||||
new RegExp(match.slice(1, -1))
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return output;
|
||||
@ -94,8 +107,7 @@ function configure(
|
||||
});
|
||||
|
||||
if (stories && stories.length) {
|
||||
// eslint-disable-next-line global-require, import/no-dynamic-require
|
||||
storybook.configure(() => stories.map(f => require(f)), false);
|
||||
storybook.configure(stories, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,3 +2,5 @@ declare module 'global';
|
||||
declare module 'jest-preset-angular/*';
|
||||
declare module 'preact-render-to-json';
|
||||
declare module 'react-test-renderer*';
|
||||
declare module '@storybook/core/server';
|
||||
declare module 'babel-plugin-require-context-hook/register';
|
||||
|
@ -67,7 +67,7 @@ initStoryshots({
|
||||
|
||||
### Specifying options to _jest-image-snapshots_
|
||||
|
||||
If you wish to customize [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot), then you can provide a `getMatchOptions` parameter that should return the options config object. Additionally, you can provide `beforeScreenshot` which is called before the screenshot is captured.
|
||||
If you wish to customize [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot), then you can provide a `getMatchOptions` parameter that should return the options config object. Additionally, you can provide `beforeScreenshot` which is called before the screenshot is captured and a `afterScreenshot` handler which is called after the screenshot and receives the just created image.
|
||||
|
||||
```js
|
||||
import initStoryshots from '@storybook/addon-storyshots';
|
||||
@ -85,9 +85,16 @@ const beforeScreenshot = (page, { context: { kind, story }, url }) => {
|
||||
}, 600)
|
||||
);
|
||||
};
|
||||
const afterScreenshot = ({ image, context }) => {
|
||||
return new Promise(resolve =>
|
||||
setTimeout(() => {
|
||||
resolve();
|
||||
}, 600)
|
||||
);
|
||||
};
|
||||
initStoryshots({
|
||||
suite: 'Image storyshots',
|
||||
test: imageSnapshot({ storybookUrl: 'http://localhost:6006', getMatchOptions, beforeScreenshot }),
|
||||
test: imageSnapshot({ storybookUrl: 'http://localhost:6006', getMatchOptions, beforeScreenshot, afterScreenshot }),
|
||||
});
|
||||
```
|
||||
|
||||
@ -95,6 +102,8 @@ initStoryshots({
|
||||
|
||||
`beforeScreenshot` receives the [Puppeteer page instance](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-page) and an object: `{ context: {kind, story}, url}`. _kind_ is the kind of the story and the _story_ its name. _url_ is the URL the browser will use to screenshot. `beforeScreenshot` is part of the promise chain and is called after the browser navigation is completed but before the screenshot is taken. It allows for triggering events on the page elements and delaying the screenshot and can be used avoid regressions due to mounting animations.
|
||||
|
||||
`afterScreenshot` receives the created image from puppeteer.
|
||||
|
||||
### Specifying options to _goto()_ (puppeteer API)
|
||||
|
||||
You might use `getGotoOptions` to specify options when the storybook is navigating to a story (using the `goto` method). Will be passed to [Puppeteer .goto() fn](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagegotourl-options)
|
||||
@ -196,6 +205,11 @@ initStoryshots({
|
||||
});
|
||||
```
|
||||
|
||||
### Specifying setup and tests timeout
|
||||
|
||||
By default, `@storybook/addon-storyshots-puppeteer` uses 15 second timeouts for browser setup and test functions.
|
||||
Those can be customized with `setupTimeout` and `testTimeout` parameters.
|
||||
|
||||
### Integrate image storyshots with regular app
|
||||
|
||||
You may want to use another Jest project to run your image snapshots as they require more resources: Chrome and Storybook built/served.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots-puppeteer",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Image snapshots addition to StoryShots based on puppeteer",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -29,19 +29,26 @@
|
||||
"prepare": "node ../../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/node-logger": "5.3.0-beta.3",
|
||||
"@storybook/router": "5.3.0-beta.3",
|
||||
"@storybook/node-logger": "5.3.0-beta.7",
|
||||
"@storybook/router": "5.3.0-beta.7",
|
||||
"@types/jest-image-snapshot": "^2.8.0",
|
||||
"@types/puppeteer-core": "^1.9.0",
|
||||
"core-js": "^3.0.1",
|
||||
"jest-image-snapshot": "^2.8.2",
|
||||
"puppeteer-core": "^2.0.0",
|
||||
"regenerator-runtime": "^0.13.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/puppeteer": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.1"
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"puppeteer": "^1.12.2 || ^2.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"puppeteer": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { MatchImageSnapshotOptions } from 'jest-image-snapshot';
|
||||
import { Base64ScreenShotOptions, Browser, DirectNavigationOptions, Page } from 'puppeteer-core';
|
||||
import { Base64ScreenShotOptions, Browser, DirectNavigationOptions, Page } from 'puppeteer';
|
||||
|
||||
export interface Context {
|
||||
kind: string;
|
||||
@ -11,8 +11,11 @@ export interface ImageSnapshotConfig {
|
||||
chromeExecutablePath: string;
|
||||
getMatchOptions: (options: { context: Context; url: string }) => MatchImageSnapshotOptions;
|
||||
getScreenshotOptions: (options: { context: Context; url: string }) => Base64ScreenShotOptions;
|
||||
afterScreenshot: (options: { image: string; context: Context }) => void;
|
||||
beforeScreenshot: (page: Page, options: { context: Context; url: string }) => void;
|
||||
getGotoOptions: (options: { context: Context; url: string }) => DirectNavigationOptions;
|
||||
customizePage: (page: Page) => Promise<void>;
|
||||
getCustomBrowser: () => Promise<Browser>;
|
||||
setupTimeout: number;
|
||||
testTimeout: number;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import puppeteer, { Browser, Page } from 'puppeteer-core';
|
||||
import { Browser, Page } from 'puppeteer';
|
||||
import { toMatchImageSnapshot } from 'jest-image-snapshot';
|
||||
import { logger } from '@storybook/node-logger';
|
||||
import { constructUrl } from './url';
|
||||
@ -18,9 +18,12 @@ const defaultConfig: ImageSnapshotConfig = {
|
||||
getMatchOptions: noop,
|
||||
getScreenshotOptions: defaultScreenshotOptions,
|
||||
beforeScreenshot: noop,
|
||||
afterScreenshot: noop,
|
||||
getGotoOptions: noop,
|
||||
customizePage: asyncNoop,
|
||||
getCustomBrowser: undefined,
|
||||
setupTimeout: 15000,
|
||||
testTimeout: 15000,
|
||||
};
|
||||
|
||||
export const imageSnapshot = (customConfig: Partial<ImageSnapshotConfig> = {}) => {
|
||||
@ -30,9 +33,12 @@ export const imageSnapshot = (customConfig: Partial<ImageSnapshotConfig> = {}) =
|
||||
getMatchOptions,
|
||||
getScreenshotOptions,
|
||||
beforeScreenshot,
|
||||
afterScreenshot,
|
||||
getGotoOptions,
|
||||
customizePage,
|
||||
getCustomBrowser,
|
||||
setupTimeout,
|
||||
testTimeout,
|
||||
} = { ...defaultConfig, ...customConfig };
|
||||
|
||||
let browser: Browser; // holds ref to browser. (ie. Chrome)
|
||||
@ -66,6 +72,7 @@ export const imageSnapshot = (customConfig: Partial<ImageSnapshotConfig> = {}) =
|
||||
await page.goto(url, getGotoOptions({ context, url }));
|
||||
await beforeScreenshot(page, { context, url });
|
||||
image = await page.screenshot(getScreenshotOptions({ context, url }));
|
||||
await afterScreenshot({ image, context });
|
||||
} catch (e) {
|
||||
logger.error(
|
||||
`Error when connecting to ${url}, did you start or build the storybook first? A storybook instance should be running or a static version should be built when using image snapshot feature.`
|
||||
@ -75,19 +82,22 @@ export const imageSnapshot = (customConfig: Partial<ImageSnapshotConfig> = {}) =
|
||||
|
||||
expect(image).toMatchImageSnapshot(getMatchOptions({ context, url }));
|
||||
};
|
||||
testFn.timeout = testTimeout;
|
||||
|
||||
testFn.afterAll = () => {
|
||||
testFn.afterAll = async () => {
|
||||
if (getCustomBrowser && page) {
|
||||
return page.close();
|
||||
await page.close();
|
||||
} else if (browser) {
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
return browser.close();
|
||||
};
|
||||
|
||||
testFn.beforeAll = async () => {
|
||||
const beforeAll = async () => {
|
||||
if (getCustomBrowser) {
|
||||
browser = await getCustomBrowser();
|
||||
} else {
|
||||
// eslint-disable-next-line global-require
|
||||
const puppeteer = require('puppeteer');
|
||||
// add some options "no-sandbox" to make it work properly on some Linux systems as proposed here: https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322851507
|
||||
browser = await puppeteer.launch({
|
||||
args: ['--no-sandbox ', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
|
||||
@ -97,6 +107,8 @@ export const imageSnapshot = (customConfig: Partial<ImageSnapshotConfig> = {}) =
|
||||
|
||||
page = await browser.newPage();
|
||||
};
|
||||
beforeAll.timeout = setupTimeout;
|
||||
testFn.beforeAll = beforeAll;
|
||||
|
||||
return testFn;
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storysource",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Stories addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -28,11 +28,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/router": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/router": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"estraverse": "^4.2.0",
|
||||
"loader-utils": "^1.2.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-viewport",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook addon to change the viewport size to mobile",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -29,12 +29,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"memoizerific": "^1.11.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/angular",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -33,9 +33,9 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/node-logger": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@storybook/node-logger": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"fork-ts-checker-webpack-plugin": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ember",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/master/app/ember",
|
||||
"bugs": {
|
||||
@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ember/test-helpers": "^1.5.0",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -33,8 +33,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@types/webpack-env": "^1.13.9",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/marko",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Marko: Develop Marko Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -33,8 +33,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@marko/webpack": "^2.0.0",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/mithril",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Mithril: Develop Mithril Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -35,8 +35,8 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.6.2",
|
||||
"@babel/plugin-transform-react-jsx": "^7.3.0",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@types/mithril": "^2.0.0",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/polymer",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Polymer: Develop Polymer components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -32,7 +32,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@webcomponents/webcomponentsjs": "^1.2.0",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Preact: Develop Preact Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -34,8 +34,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.3.0",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@types/webpack-env": "^1.13.9",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/rax",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Rax: Develop Rax Component in isolation.",
|
||||
"keywords": [
|
||||
"rax",
|
||||
@ -33,7 +33,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"babel-preset-rax": "^1.0.0-beta.0",
|
||||
"core-js": "^3.0.1",
|
||||
"driver-dom": "^2.0.0",
|
||||
@ -42,7 +42,7 @@
|
||||
"ts-dedent": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rax": "^1.0.0"
|
||||
"rax": "^1.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"babel-loader": "^7.0.0 || ^8.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-native-server",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "A better way to develop React Native Components for your app",
|
||||
"keywords": [
|
||||
"react",
|
||||
@ -31,12 +31,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/channel-websocket": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/ui": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/channel-websocket": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/ui": "5.3.0-beta.7",
|
||||
"commander": "^4.0.1",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-native",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "A better way to develop React Native Components for your app",
|
||||
"keywords": [
|
||||
"react",
|
||||
@ -31,11 +31,11 @@
|
||||
"dependencies": {
|
||||
"@emotion/core": "^10.0.20",
|
||||
"@emotion/native": "^10.0.14",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/channel-websocket": "5.3.0-beta.3",
|
||||
"@storybook/channels": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/channel-websocket": "5.3.0-beta.7",
|
||||
"@storybook/channels": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"emotion-theming": "^10.0.19",
|
||||
"react-native-swipe-gestures": "^1.0.4"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -36,9 +36,9 @@
|
||||
"@babel/plugin-transform-react-constant-elements": "^7.2.0",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/node-logger": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@storybook/node-logger": "5.3.0-beta.7",
|
||||
"@svgr/webpack": "^4.0.3",
|
||||
"@types/webpack-env": "^1.13.7",
|
||||
"babel-plugin-add-react-displayname": "^0.0.5",
|
||||
@ -57,8 +57,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mini-css-extract-plugin": "^0.8.0",
|
||||
"@types/node": "^12.7.9",
|
||||
"@types/webpack": "^4.4.32"
|
||||
"@types/node": "^12.12.11",
|
||||
"@types/webpack": "^4.41.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.1",
|
||||
|
@ -191,6 +191,7 @@ export function applyCRAWebpackConfig(baseConfig: Configuration, configDir: stri
|
||||
// Add css minification for production
|
||||
const plugins = [...baseConfig.plugins];
|
||||
if (baseConfig.mode === 'production') {
|
||||
// @ts-ignore
|
||||
plugins.push(new MiniCssExtractPlugin());
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/riot",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for riot.js: View riot snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -33,7 +33,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"raw-loader": "^3.1.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -33,8 +33,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -33,8 +33,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@types/webpack-env": "^1.13.9",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
@ -44,8 +44,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mini-css-extract-plugin": "^0.8.0",
|
||||
"@types/node": "^12.7.9",
|
||||
"@types/webpack": "^4.4.32",
|
||||
"@types/node": "^12.12.11",
|
||||
"@types/webpack": "^4.41.0",
|
||||
"babel-preset-vue": "^2.0.2",
|
||||
"vue": "^2.6.8",
|
||||
"vue-loader": "^15.7.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"lit-html",
|
||||
@ -37,8 +37,8 @@
|
||||
"dependencies": {
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-syntax-import-meta": "^7.2.0",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@types/webpack-env": "^1.13.9",
|
||||
"babel-plugin-bundled-import-meta": "^0.3.1",
|
||||
"core-js": "^3.0.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-decorator",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "decorator addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,8 +24,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.4.0"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-parameter",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "parameter addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,12 +24,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.8.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-preview-wrapper",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "preview wrapper addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,7 +24,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"react": "^16.8.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-roundtrip",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"description": "roundtrip addon for storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,13 +24,13 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/api": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/api": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"core-js": "^3.0.1",
|
||||
"global": "^4.3.2",
|
||||
"react": "^16.8.3",
|
||||
|
@ -9,7 +9,7 @@ Storybook is theme-able!
|
||||
|
||||
It's possible to theme Storybook globally.
|
||||
|
||||
We've created two basic themes that look good of the box: "normal" (a light theme) and "dark" (a dark theme). Unless you've set your preferred color scheme as dark Storybook will use the light theme as default.
|
||||
We've created two basic themes that look good out of the box: "normal" (a light theme) and "dark" (a dark theme). Unless you've set your preferred color scheme as dark Storybook will use the light theme as default.
|
||||
|
||||
As an example, you can tell Storybook to use the "dark" theme by modifying `.storybook/manager.js`:
|
||||
|
||||
|
@ -1 +1 @@
|
||||
{"version":"5.3.0-beta.3","info":{"plain":"### Features\n\n* Addon-docs: Rich props table UI ([#8887](https://github.com/storybookjs/storybook/pull/8887))\n* Addon-docs: Improve basic support for Flow props ([#8890](https://github.com/storybookjs/storybook/pull/8890))\n* CLI: Avoid id changes after `storiesof-to-csf` migration ([#8856](https://github.com/storybookjs/storybook/pull/8856))\n\n### Bug Fixes\n\n* Addon-docs: Fix props table for sections props ([#8904](https://github.com/storybookjs/storybook/pull/8904))\n* Addon-docs: Fix Description block when no component provided ([#8902](https://github.com/storybookjs/storybook/pull/8902))\n* Angular: Fix project without `architect.build` option ([#6737](https://github.com/storybookjs/storybook/pull/6737))\n\n### Maintenance\n\n* Addon-docs: Docgen lib maintenance ([#8896](https://github.com/storybookjs/storybook/pull/8896))\n* Examples: Fix stories glob in official-storybook ([#8888](https://github.com/storybookjs/storybook/pull/8888))"}}
|
||||
{"version":"5.3.0-beta.6","info":{"plain":"### Features\n\n* Presets: dynamic preset injection ([#8921](https://github.com/storybookjs/storybook/pull/8921))\n\n### Bug Fixes\n\n* Revert \"feat: use `puppeteer-core` instead of `puppeteer`\" ([#8925](https://github.com/storybookjs/storybook/pull/8925))\n* Addon-docs: Fix props detail tooltip to prevent cutting end of content ([#8923](https://github.com/storybookjs/storybook/pull/8923))\n\n### Maintenance\n\n* Addon-docs: Base code to improve the props table for TS ([#8905](https://github.com/storybookjs/storybook/pull/8905))\n* Build: Fix now deploy ([#8929](https://github.com/storybookjs/storybook/pull/8929))\n\n### Dependency Upgrades\n\n* Miscellaneous upgrades ([#8912](https://github.com/storybookjs/storybook/pull/8912))"}}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "crna-kitchen-sink",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"main": "node_modules/expo/AppEntry.js",
|
||||
"workspaces": {
|
||||
@ -24,22 +24,22 @@
|
||||
"dependencies": {
|
||||
"expo": "^33.0.7",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "16.10.1",
|
||||
"react": "16.12.0",
|
||||
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
|
||||
"whatwg-fetch": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-ondevice-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-ondevice-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-ondevice-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-ondevice-notes": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/react-native": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-ondevice-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-ondevice-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-ondevice-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-ondevice-notes": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/react-native": "5.3.0-beta.7",
|
||||
"babel-loader": "^8.0.4",
|
||||
"babel-plugin-module-resolver": "^3.2.0",
|
||||
"babel-preset-expo": "^7.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "angular-cli",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
@ -37,24 +37,24 @@
|
||||
"@angular/cli": "^8.3.6",
|
||||
"@angular/compiler-cli": "^8.2.8",
|
||||
"@compodoc/compodoc": "^1.1.11",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-docs": "5.3.0-beta.3",
|
||||
"@storybook/addon-jest": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/angular": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-docs": "5.3.0-beta.7",
|
||||
"@storybook/addon-jest": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/angular": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"@types/core-js": "^2.5.0",
|
||||
"@types/jest": "^24.0.11",
|
||||
"@types/node": "^12.7.9",
|
||||
"@types/node": "^12.12.11",
|
||||
"@types/webpack-env": "^1.14.0",
|
||||
"babel-plugin-require-context-hook": "^1.0.0",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cra-kitchen-sink",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
@ -18,23 +18,23 @@
|
||||
"react-lifecycles-compat": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-docs": "5.3.0-beta.3",
|
||||
"@storybook/addon-events": "5.3.0-beta.3",
|
||||
"@storybook/addon-info": "5.3.0-beta.3",
|
||||
"@storybook/addon-jest": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/client-logger": "5.3.0-beta.3",
|
||||
"@storybook/react": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-docs": "5.3.0-beta.7",
|
||||
"@storybook/addon-events": "5.3.0-beta.7",
|
||||
"@storybook/addon-info": "5.3.0-beta.7",
|
||||
"@storybook/addon-jest": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/client-logger": "5.3.0-beta.7",
|
||||
"@storybook/react": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"react-scripts": "^3.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cra-react15",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
@ -18,10 +18,10 @@
|
||||
"react-scripts": "3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/react": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/react": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"babel-core": "6",
|
||||
"babel-runtime": "6"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cra-ts-kitchen-sink",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
@ -23,26 +23,26 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/jest": "24.0.19",
|
||||
"@types/node": "12.11.1",
|
||||
"@types/react": "16.9.9",
|
||||
"@types/react-dom": "16.9.2",
|
||||
"@types/jest": "24.0.23",
|
||||
"@types/node": "12.12.11",
|
||||
"@types/react": "16.9.11",
|
||||
"@types/react-dom": "16.9.4",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.10.2",
|
||||
"react-dom": "^16.10.2",
|
||||
"react-scripts": "3.2.0",
|
||||
"typescript": "3.6.4"
|
||||
"typescript": "3.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-info": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-info": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/preset-create-react-app": "^1.3.1",
|
||||
"@storybook/react": "5.3.0-beta.3",
|
||||
"@storybook/react": "5.3.0-beta.7",
|
||||
"@types/enzyme": "^3.9.0",
|
||||
"@types/react": "^16.8.14",
|
||||
"@types/react-dom": "^16.8.2",
|
||||
|
@ -65,6 +65,7 @@ PropTypesProps.propTypes = {
|
||||
classElementInline: PropTypes.element,
|
||||
functionalElementType: PropTypes.elementType,
|
||||
classElementType: PropTypes.elementType,
|
||||
elementWithProps: PropTypes.elementType,
|
||||
/**
|
||||
* `instanceOf` is also supported and the custom type will be shown instead of `instanceOf`
|
||||
*/
|
||||
@ -298,6 +299,7 @@ PropTypesProps.defaultProps = {
|
||||
},
|
||||
functionalElementType: FunctionalComponent,
|
||||
classElementType: ClassComponent,
|
||||
elementWithProps: <ClassComponent className="w8 h8 fill-marine-500" />,
|
||||
instanceOf: new Set(),
|
||||
oneOfString: 'News',
|
||||
oneOfNumeric: 1,
|
||||
|
@ -12,4 +12,4 @@ import { TypeScriptProps, TypeScriptHtmlComponent } from './ts-types';
|
||||
|
||||
<Props of={TypeScriptProps} />
|
||||
|
||||
<Props of={TypeScriptHtmlComponent} />
|
||||
<Props of={TypeScriptHtmlComponent} />
|
@ -1,22 +1,22 @@
|
||||
{
|
||||
"name": "@storybook/example-devkits",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -c ./",
|
||||
"storybook": "start-storybook -p 9011 -c ./"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-decorator": "5.3.0-beta.3",
|
||||
"@storybook/addon-parameter": "5.3.0-beta.3",
|
||||
"@storybook/addon-preview-wrapper": "5.3.0-beta.3",
|
||||
"@storybook/addon-roundtrip": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/node-logger": "5.3.0-beta.3",
|
||||
"@storybook/react": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addon-decorator": "5.3.0-beta.7",
|
||||
"@storybook/addon-parameter": "5.3.0-beta.7",
|
||||
"@storybook/addon-preview-wrapper": "5.3.0-beta.7",
|
||||
"@storybook/addon-roundtrip": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/node-logger": "5.3.0-beta.7",
|
||||
"@storybook/react": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"cors": "^2.8.5",
|
||||
"cross-env": "^6.0.3",
|
||||
"enzyme-to-json": "^3.4.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ember-example",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "ember build",
|
||||
@ -15,19 +15,19 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/ember": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/ember": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"babel-loader": "^8",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
"cross-env": "^6.0.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "html-kitchen-sink",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
@ -13,26 +13,26 @@
|
||||
"storybook": "start-storybook -p 9006"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-docs": "5.3.0-beta.3",
|
||||
"@storybook/addon-events": "5.3.0-beta.3",
|
||||
"@storybook/addon-jest": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/client-api": "5.3.0-beta.3",
|
||||
"@storybook/core": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/html": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-docs": "5.3.0-beta.7",
|
||||
"@storybook/addon-events": "5.3.0-beta.7",
|
||||
"@storybook/addon-jest": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/client-api": "5.3.0-beta.7",
|
||||
"@storybook/core": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/html": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"eventemitter3": "^4.0.0",
|
||||
"format-json": "^1.0.3",
|
||||
"global": "^4.3.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "marko-cli",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"description": "Demo of how to build an app using marko-starter",
|
||||
"repository": {
|
||||
@ -19,18 +19,18 @@
|
||||
"test": "npm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"marko": "^4.16.15",
|
||||
"marko-starter": "^2.0.4"
|
||||
"marko": "^4.18.25",
|
||||
"marko-starter": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/marko": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/marko": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"prettier": "^1.16.4",
|
||||
"webpack": "^4.33.0"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mithril-example",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook",
|
||||
@ -10,20 +10,20 @@
|
||||
"mithril": "^1.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/mithril": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/mithril": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"webpack": "^4.33.0"
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ if (!fs.existsSync(pathToStorybookStatic)) {
|
||||
} else {
|
||||
initStoryshots({
|
||||
suite: 'Image snapshots',
|
||||
storyKindRegex: /^Addons\|Storyshots/,
|
||||
storyKindRegex: /^Addons\/Storyshots/,
|
||||
framework: 'react',
|
||||
configPath: path.join(__dirname, '..'),
|
||||
test: imageSnapshot({
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "official-storybook",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./",
|
||||
@ -13,34 +13,34 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@packtracker/webpack-plugin": "^2.0.1",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-contexts": "5.3.0-beta.3",
|
||||
"@storybook/addon-cssresources": "5.3.0-beta.3",
|
||||
"@storybook/addon-design-assets": "5.3.0-beta.3",
|
||||
"@storybook/addon-docs": "5.3.0-beta.3",
|
||||
"@storybook/addon-events": "5.3.0-beta.3",
|
||||
"@storybook/addon-graphql": "5.3.0-beta.3",
|
||||
"@storybook/addon-info": "5.3.0-beta.3",
|
||||
"@storybook/addon-jest": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-queryparams": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots-puppeteer": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/components": "5.3.0-beta.3",
|
||||
"@storybook/core-events": "5.3.0-beta.3",
|
||||
"@storybook/node-logger": "5.3.0-beta.3",
|
||||
"@storybook/react": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/theming": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-contexts": "5.3.0-beta.7",
|
||||
"@storybook/addon-cssresources": "5.3.0-beta.7",
|
||||
"@storybook/addon-design-assets": "5.3.0-beta.7",
|
||||
"@storybook/addon-docs": "5.3.0-beta.7",
|
||||
"@storybook/addon-events": "5.3.0-beta.7",
|
||||
"@storybook/addon-graphql": "5.3.0-beta.7",
|
||||
"@storybook/addon-info": "5.3.0-beta.7",
|
||||
"@storybook/addon-jest": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-queryparams": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots-puppeteer": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/components": "5.3.0-beta.7",
|
||||
"@storybook/core-events": "5.3.0-beta.7",
|
||||
"@storybook/node-logger": "5.3.0-beta.7",
|
||||
"@storybook/react": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"@storybook/theming": "5.3.0-beta.7",
|
||||
"cors": "^2.8.5",
|
||||
"cross-env": "^6.0.3",
|
||||
"enzyme-to-json": "^3.4.1",
|
||||
@ -61,5 +61,8 @@
|
||||
"ts-loader": "^6.0.0",
|
||||
"uuid": "^3.3.2",
|
||||
"webpack": "^4.33.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"puppeteer": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -88,6 +88,10 @@ export const nonStory2 = () => <Button>Not a story</Button>; // another one
|
||||
<>This is an iframe!</>
|
||||
</Story>
|
||||
|
||||
<Story name="decorator story" decorators={[storyFn => <div style={{ backgroundColor: 'pink' }}>{storyFn()}</div>]}>
|
||||
<>Story decorators</>
|
||||
</Story>
|
||||
|
||||
<Story name="theme">
|
||||
<h1 className="text-lg">Hello Hugh</h1>
|
||||
</Story>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "polymer-cli",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook",
|
||||
@ -9,17 +9,17 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@polymer/polymer": "^2.6.0",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.3",
|
||||
"@storybook/polymer": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.7",
|
||||
"@storybook/polymer": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"@webcomponents/webcomponentsjs": "^1.2.0",
|
||||
"global": "^4.3.2",
|
||||
"lit-html": "^1.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "preact-example",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
@ -15,21 +15,21 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/plugin-transform-runtime": "^7.2.0",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-contexts": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/preact": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-contexts": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/preact": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"babel-loader": "^8.0.4",
|
||||
"cross-env": "^6.0.3",
|
||||
"file-loader": "^4.2.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rax-kitchen-sink",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "rax-scripts build",
|
||||
@ -14,30 +14,30 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"event-emitter": "^0.3.5",
|
||||
"rax": "^1.0.0",
|
||||
"rax": "^1.1.0",
|
||||
"rax-image": "^1.0.0",
|
||||
"rax-link": "^1.0.0",
|
||||
"rax-text": "^1.0.0",
|
||||
"rax-text": "^1.1.2",
|
||||
"rax-view": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-events": "5.3.0-beta.3",
|
||||
"@storybook/addon-info": "5.3.0-beta.3",
|
||||
"@storybook/addon-jest": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/rax": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-events": "5.3.0-beta.7",
|
||||
"@storybook/addon-info": "5.3.0-beta.7",
|
||||
"@storybook/addon-jest": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/rax": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-preset-rax": "^1.0.0-beta.0",
|
||||
"rax-scripts": "^2.0.0",
|
||||
|
@ -13,7 +13,7 @@ Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"Welcome to Rax",
|
||||
@ -28,7 +28,7 @@ Object {
|
||||
},
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"To get started, edit src/components/App.js and save to reload.",
|
||||
|
@ -8,7 +8,7 @@ Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"Welcome to storybook for Rax",
|
||||
@ -49,7 +49,7 @@ Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"This is a UI component dev environment for your Rax app.",
|
||||
@ -73,7 +73,7 @@ Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"We've added some basic stories inside the 'src/stories' directory. A story is a single state of one or more UI components. You can have as many stories as you want. (Basically a story is like a visual test case.)",
|
||||
@ -97,7 +97,7 @@ Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"See these sample",
|
||||
@ -126,7 +126,7 @@ Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"button",
|
||||
@ -153,7 +153,7 @@ Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"for a component called 'Button'.",
|
||||
@ -177,7 +177,7 @@ Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"class": "rax-text",
|
||||
"class": "rax-text ",
|
||||
},
|
||||
"children": Array [
|
||||
"Just like that, you can add your own components as stories. You can also edit those components and see changes right away. (Try editing the 'Button' stories located at 'src/stories/index.js' .)",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riot-example",
|
||||
"version": "5.3.0-beta.3",
|
||||
"version": "5.3.0-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
@ -15,20 +15,20 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.3",
|
||||
"@storybook/addon-actions": "5.3.0-beta.3",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.3",
|
||||
"@storybook/addon-centered": "5.3.0-beta.3",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.3",
|
||||
"@storybook/addon-links": "5.3.0-beta.3",
|
||||
"@storybook/addon-notes": "5.3.0-beta.3",
|
||||
"@storybook/addon-options": "5.3.0-beta.3",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.3",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.3",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.3",
|
||||
"@storybook/addons": "5.3.0-beta.3",
|
||||
"@storybook/riot": "5.3.0-beta.3",
|
||||
"@storybook/source-loader": "5.3.0-beta.3",
|
||||
"@storybook/addon-a11y": "5.3.0-beta.7",
|
||||
"@storybook/addon-actions": "5.3.0-beta.7",
|
||||
"@storybook/addon-backgrounds": "5.3.0-beta.7",
|
||||
"@storybook/addon-centered": "5.3.0-beta.7",
|
||||
"@storybook/addon-knobs": "5.3.0-beta.7",
|
||||
"@storybook/addon-links": "5.3.0-beta.7",
|
||||
"@storybook/addon-notes": "5.3.0-beta.7",
|
||||
"@storybook/addon-options": "5.3.0-beta.7",
|
||||
"@storybook/addon-storyshots": "5.3.0-beta.7",
|
||||
"@storybook/addon-storysource": "5.3.0-beta.7",
|
||||
"@storybook/addon-viewport": "5.3.0-beta.7",
|
||||
"@storybook/addons": "5.3.0-beta.7",
|
||||
"@storybook/riot": "5.3.0-beta.7",
|
||||
"@storybook/source-loader": "5.3.0-beta.7",
|
||||
"babel-loader": "^8.0.4",
|
||||
"cross-env": "^6.0.3",
|
||||
"file-loader": "^4.2.0",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user