mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 07:21:16 +08:00
Merge remote-tracking branch 'origin/next' into 16048-v7-storyshots
This commit is contained in:
commit
1eb8aa10da
67
CHANGELOG.md
67
CHANGELOG.md
@ -1,3 +1,70 @@
|
||||
## 6.4.0-beta.31 (November 10, 2021)
|
||||
|
||||
### Features
|
||||
|
||||
* Core: Add feature flag to stop storybook from aliasing emotion ([#16613](https://github.com/storybookjs/storybook/pull/16613))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Core: Fix `staticDirs` and `-s` conflict check ([#16649](https://github.com/storybookjs/storybook/pull/16649))
|
||||
|
||||
### Maintenance
|
||||
|
||||
* Build: Add node-gyp for M1 macs ([#16645](https://github.com/storybookjs/storybook/pull/16645))
|
||||
|
||||
## 6.4.0-beta.30 (November 8, 2021)
|
||||
|
||||
### Features
|
||||
|
||||
- Args: Add ability to specific argType "targets" ([#16333](https://github.com/storybookjs/storybook/pull/16333))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Core: Fix sorting by `__namedExportsOrder` ([#16626](https://github.com/storybookjs/storybook/pull/16626))
|
||||
- Angular: Fix zonejs imports in framework preset ([#16631](https://github.com/storybookjs/storybook/pull/16631))
|
||||
- Core: Change CSF loading problems from warning to error ([#16632](https://github.com/storybookjs/storybook/pull/16632))
|
||||
- Core: Fix args values updated from url to control ([#16508](https://github.com/storybookjs/storybook/pull/16508))
|
||||
- CLI: Fix upgrade error state ([#16622](https://github.com/storybookjs/storybook/pull/16622))
|
||||
|
||||
## 6.4.0-beta.29 (November 6, 2021)
|
||||
|
||||
### Features
|
||||
|
||||
- CSFFile: Handle re-exported stories ([#16607](https://github.com/storybookjs/storybook/pull/16607))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- StoryIndex: Skip files with no default export ([#16606](https://github.com/storybookjs/storybook/pull/16606))
|
||||
- Addon-docs/Source: Fix disabling show code with null ([#16615](https://github.com/storybookjs/storybook/pull/16615))
|
||||
- Core: Handle missing websocket in production build ([#16590](https://github.com/storybookjs/storybook/pull/16590))
|
||||
- Core: Ensure we set `parameters.filePath` in v7 mode ([#16566](https://github.com/storybookjs/storybook/pull/16566))
|
||||
- Core: Fix behavior around missing stories to be more clear ([#16608](https://github.com/storybookjs/storybook/pull/16608))
|
||||
|
||||
## 6.4.0-beta.28 (November 5, 2021)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Interactions: Fix README link ([#16596](https://github.com/storybookjs/storybook/pull/16596))
|
||||
|
||||
## 6.4.0-beta.27 (November 4, 2021)
|
||||
|
||||
### Features
|
||||
|
||||
- Core: Add 'staticDirs' config option ([#15969](https://github.com/storybookjs/storybook/pull/15969))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- TS: Fix type for Refs so they can be disabled ([#16582](https://github.com/storybookjs/storybook/pull/16582))
|
||||
- CLI: Add a check for source-dir in `sb extract` ([#16505](https://github.com/storybookjs/storybook/pull/16505))
|
||||
- UI: Fix links that have no onClick handler ([#16581](https://github.com/storybookjs/storybook/pull/16581))
|
||||
- Core: Continue running play function on rerender ([#16574](https://github.com/storybookjs/storybook/pull/16574))
|
||||
- Ensure we always initialize the story store, even when the index errors. ([#16537](https://github.com/storybookjs/storybook/pull/16537))
|
||||
- Interactions: Fix panel tab icon/count ([#16578](https://github.com/storybookjs/storybook/pull/16578))
|
||||
|
||||
### Dependency Upgrades
|
||||
|
||||
- Pin the version of `history` for `react-router-dom` compat ([#16560](https://github.com/storybookjs/storybook/pull/16560))
|
||||
|
||||
## 6.4.0-beta.26 (November 2, 2021)
|
||||
|
||||
### Bug Fixes
|
||||
|
40
MIGRATION.md
40
MIGRATION.md
@ -16,6 +16,8 @@
|
||||
- [Babel mode v7](#babel-mode-v7)
|
||||
- [Loader behavior with args changes](#loader-behavior-with-args-changes)
|
||||
- [Angular component parameter removed](#angular-component-parameter-removed)
|
||||
- [6.4 deprecations](#64-deprecations)
|
||||
- [Deprecated --static-dir CLI flag](#deprecated---static-dir-cli-flag)
|
||||
- [From version 6.2.x to 6.3.0](#from-version-62x-to-630)
|
||||
- [Webpack 5](#webpack-5)
|
||||
- [Fixing hoisting issues](#fixing-hoisting-issues)
|
||||
@ -189,7 +191,7 @@ Storybook 6.3 supports CRA5 out of the box when you install it fresh. However, i
|
||||
upgrade the configuration. You can do this automatically by running:
|
||||
|
||||
```
|
||||
npx sb@next fix
|
||||
npx sb@next automigrate
|
||||
```
|
||||
|
||||
Or you can do the following steps manually to force Storybook to use webpack 5 for building your project:
|
||||
@ -452,6 +454,29 @@ export const MyStory = () => ({ component: MyComponent, ... })
|
||||
|
||||
[More discussion here.](https://github.com/storybookjs/storybook/pull/16010#issuecomment-917378595)
|
||||
|
||||
### 6.4 deprecations
|
||||
|
||||
#### Deprecated --static-dir CLI flag
|
||||
|
||||
In 6.4 we've replaced the `--static-dir` CLI flag with the the `staticDirs` field in `.storybook/main.js`. Note that the CLI directories are relative to the current working directory, whereas the `staticDirs` are relative to the location of `main.js`.
|
||||
|
||||
Before:
|
||||
|
||||
```sh
|
||||
start-storybook --static-dir ./public,./static,./foo/assets:/assets
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```js
|
||||
// .storybook/main.js
|
||||
module.exports = {
|
||||
staticDirs: ['../public', '../static', { from: '../foo/assets', to: '/assets' }],
|
||||
};
|
||||
```
|
||||
|
||||
The `--static-dir` flag has been deprecated and will be removed in Storybook 7.0.
|
||||
|
||||
## From version 6.2.x to 6.3.0
|
||||
|
||||
### Webpack 5
|
||||
@ -610,7 +635,7 @@ export const Basic = () => ({
|
||||
});
|
||||
```
|
||||
|
||||
The new convention is consistent with how other frameworks and addons work in Storybook. The old way will be supported until 7.0. For a full discussion see https://github.com/storybookjs/storybook/issues/8673.
|
||||
The new convention is consistent with how other frameworks and addons work in Storybook. The old way will be supported until 7.0. For a full discussion see <https://github.com/storybookjs/storybook/issues/8673>.
|
||||
|
||||
#### New Angular renderer
|
||||
|
||||
@ -647,7 +672,7 @@ Instead of continuing to include PostCSS inside the core library, it has been mo
|
||||
|
||||
If you require PostCSS support, please install `@storybook/addon-postcss` in your project, add it to your list of addons inside `.storybook/main.js`, and configure a `postcss.config.js` file.
|
||||
|
||||
Further information is available at https://github.com/storybookjs/storybook/issues/12668 and https://github.com/storybookjs/storybook/pull/13669.
|
||||
Further information is available at <https://github.com/storybookjs/storybook/issues/12668> and <https://github.com/storybookjs/storybook/pull/13669>.
|
||||
|
||||
If you're not using Postcss and you don't want to see the warning, you can disable it by adding the following to your `.storybook/main.js`:
|
||||
|
||||
@ -788,7 +813,7 @@ Starting in 6.1, `react` and `react-dom` are required peer dependencies of `@sto
|
||||
Error: Cannot find module 'react-dom/package.json'
|
||||
```
|
||||
|
||||
They were also peer dependencies in earlier versions, but due to the package structure they would be installed by Storybook if they were not required by the user's project. For more discussion: https://github.com/storybookjs/storybook/issues/13269
|
||||
They were also peer dependencies in earlier versions, but due to the package structure they would be installed by Storybook if they were not required by the user's project. For more discussion: <https://github.com/storybookjs/storybook/issues/13269>
|
||||
|
||||
### 6.1 deprecations
|
||||
|
||||
@ -817,7 +842,7 @@ console.log(unboundStoryFn(context));
|
||||
|
||||
If you're not using loaders, `storyFn` will work as before. If you are, you'll need to use the new approach.
|
||||
|
||||
> NOTE: If you're using `@storybook/addon-docs`, this deprecation warning is triggered by the Docs tab in 6.1. It's safe to ignore and we will be providing a proper fix in a future release. You can track the issue at https://github.com/storybookjs/storybook/issues/13074.
|
||||
> NOTE: If you're using `@storybook/addon-docs`, this deprecation warning is triggered by the Docs tab in 6.1. It's safe to ignore and we will be providing a proper fix in a future release. You can track the issue at <https://github.com/storybookjs/storybook/issues/13074>.
|
||||
|
||||
#### Deprecated onBeforeRender
|
||||
|
||||
@ -2307,9 +2332,11 @@ Storybook now uses webpack 4. If you have a [custom webpack config](https://stor
|
||||
Storybook now uses Babel 7. There's a couple of cases when it can break with your app:
|
||||
|
||||
- If you aren't using Babel yourself, and don't have .babelrc, install following dependencies:
|
||||
|
||||
```
|
||||
npm i -D @babel/core babel-loader@next
|
||||
```
|
||||
|
||||
- If you're using Babel 6, make sure that you have direct dependencies on `babel-core@6` and `babel-loader@7` and that you have a `.babelrc` in your project directory.
|
||||
|
||||
### Create-react-app
|
||||
@ -2560,11 +2587,14 @@ If you **are** using these addons, it takes two steps to migrate:
|
||||
- add the addons you use to your `package.json`.
|
||||
- update your code:
|
||||
change `addons.js` like so:
|
||||
|
||||
```js
|
||||
import '@storybook/addon-actions/register';
|
||||
import '@storybook/addon-links/register';
|
||||
```
|
||||
|
||||
change `x.story.js` like so:
|
||||
|
||||
```js
|
||||
import React from 'react';
|
||||
import { storiesOf } from '@storybook/react';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-a11y",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Test component compliance with web accessibility standards",
|
||||
"keywords": [
|
||||
"a11y",
|
||||
@ -45,14 +45,14 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/channels": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/channels": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"axe-core": "^4.2.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -81,7 +81,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Accessibility",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-actions",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Get UI feedback when an action is performed on an interactive element",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -41,12 +41,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"global": "^4.4.0",
|
||||
@ -79,7 +79,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Actions",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-backgrounds",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Switch backgrounds to view components in different settings",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -45,13 +45,13 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
"memoizerific": "^1.11.3",
|
||||
@ -77,7 +77,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Backgrounds",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-controls",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Interact with component inputs dynamically in the Storybook UI",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -45,15 +45,15 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"lodash": "^4.17.20",
|
||||
"ts-dedent": "^2.0.0"
|
||||
@ -73,7 +73,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/register.js",
|
||||
"storybook": {
|
||||
"displayName": "Controls",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-docs",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Document component usage and properties in Markdown",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -63,21 +63,21 @@
|
||||
"@mdx-js/loader": "^1.6.22",
|
||||
"@mdx-js/mdx": "^1.6.22",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/csf-tools": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/postinstall": "6.4.0-beta.26",
|
||||
"@storybook/preview-web": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/csf-tools": "6.4.0-beta.31",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/postinstall": "6.4.0-beta.31",
|
||||
"@storybook/preview-web": "6.4.0-beta.31",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"acorn": "^7.4.1",
|
||||
"acorn-jsx": "^5.3.1",
|
||||
"acorn-walk": "^7.2.0",
|
||||
@ -106,11 +106,11 @@
|
||||
"@babel/core": "^7.12.10",
|
||||
"@emotion/core": "^10.1.1",
|
||||
"@emotion/styled": "^10.0.27",
|
||||
"@storybook/angular": "6.4.0-beta.26",
|
||||
"@storybook/html": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/vue": "6.4.0-beta.26",
|
||||
"@storybook/web-components": "6.4.0-beta.26",
|
||||
"@storybook/angular": "6.4.0-beta.31",
|
||||
"@storybook/html": "6.4.0-beta.31",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@storybook/vue": "6.4.0-beta.31",
|
||||
"@storybook/web-components": "6.4.0-beta.31",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/doctrine": "^0.0.3",
|
||||
"@types/enzyme": "^3.10.8",
|
||||
@ -140,12 +140,12 @@
|
||||
"zone.js": "^0.11.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@storybook/angular": "6.4.0-beta.26",
|
||||
"@storybook/html": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/vue": "6.4.0-beta.26",
|
||||
"@storybook/vue3": "6.4.0-beta.26",
|
||||
"@storybook/web-components": "6.4.0-beta.26",
|
||||
"@storybook/angular": "6.4.0-beta.31",
|
||||
"@storybook/html": "6.4.0-beta.31",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@storybook/vue": "6.4.0-beta.31",
|
||||
"@storybook/vue3": "6.4.0-beta.31",
|
||||
"@storybook/web-components": "6.4.0-beta.31",
|
||||
"lit": "^2.0.0-rc.1",
|
||||
"lit-html": "^1.4.1 || ^2.0.0-rc.3",
|
||||
"react": "^16.8.0 || ^17.0.0",
|
||||
@ -202,7 +202,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Docs",
|
||||
|
@ -69,7 +69,7 @@ const getSnippet = (snippet: string, story?: Story<any>): string => {
|
||||
|
||||
// if user has hard-coded the snippet, that takes precedence
|
||||
const userCode = parameters.docs?.source?.code;
|
||||
if (userCode) {
|
||||
if (userCode !== undefined) {
|
||||
return userCode;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-essentials",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Curated addons to bring out the best of Storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -39,31 +39,31 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-measure": "6.4.0-beta.26",
|
||||
"@storybook/addon-outline": "6.4.0-beta.26",
|
||||
"@storybook/addon-toolbars": "6.4.0-beta.26",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-measure": "6.4.0-beta.31",
|
||||
"@storybook/addon-outline": "6.4.0-beta.31",
|
||||
"@storybook/addon-toolbars": "6.4.0-beta.31",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@storybook/vue": "6.4.0-beta.26",
|
||||
"@storybook/vue": "6.4.0-beta.31",
|
||||
"@types/jest": "^26.0.16",
|
||||
"@types/webpack-env": "^1.16.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.9.6",
|
||||
"@storybook/vue": "6.4.0-beta.26",
|
||||
"@storybook/web-components": "6.4.0-beta.26",
|
||||
"@storybook/vue": "6.4.0-beta.31",
|
||||
"@storybook/web-components": "6.4.0-beta.31",
|
||||
"babel-loader": "^8.0.0",
|
||||
"lit-html": "^1.4.1 || ^2.0.0-rc.3",
|
||||
"react": "^16.8.0 || ^17.0.0",
|
||||
@ -93,6 +93,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js"
|
||||
}
|
||||
|
@ -22,6 +22,19 @@ module.exports = {
|
||||
|
||||
Note that `@storybook/addon-interactions` must be listed **after** `@storybook/addon-actions` or `@storybook/addon-essentials`.
|
||||
|
||||
## Experimental step debugging
|
||||
|
||||
Step debugging features are experimental and disabled by default. To enable them:
|
||||
|
||||
```js
|
||||
// main.js
|
||||
module.exports = {
|
||||
features: {
|
||||
interactionsDebugger: true,
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Interactions relies on "instrumented" versions of Jest and Testing Library, that you import from `@storybook/jest` and
|
||||
@ -43,8 +56,8 @@ export const Demo = {
|
||||
const canvas = within(canvasElement);
|
||||
await userEvent.click(canvas.getByRole('button'));
|
||||
await expect(args.onClick).toHaveBeenCalled();
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
In order to enable step-through debugging, calls to `userEvent.*`, `fireEvent`, `findBy*`, `waitFor*` and `expect` have to
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-interactions",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Automate, test and debug user interactions",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -41,14 +41,14 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/instrumenter": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/instrumenter": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"global": "^4.4.0",
|
||||
"jest-mock": "^27.0.6",
|
||||
"polished": "^4.0.5",
|
||||
@ -74,7 +74,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Interactions",
|
||||
|
@ -19,7 +19,6 @@ interface AddonPanelProps {
|
||||
|
||||
interface InteractionsPanelProps {
|
||||
active: boolean;
|
||||
showTabIcon?: boolean;
|
||||
interactions: (Call & { state?: CallStates })[];
|
||||
isDisabled?: boolean;
|
||||
hasPrevious?: boolean;
|
||||
@ -45,9 +44,13 @@ const TabIcon = styled(StatusIcon)({
|
||||
marginLeft: 5,
|
||||
});
|
||||
|
||||
const TabStatus = ({ children }: { children: React.ReactChild }) => {
|
||||
const container = global.document.getElementById('tabbutton-interactions');
|
||||
return container && ReactDOM.createPortal(children, container);
|
||||
};
|
||||
|
||||
export const AddonPanelPure: React.FC<InteractionsPanelProps> = React.memo(
|
||||
({
|
||||
showTabIcon,
|
||||
interactions,
|
||||
isDisabled,
|
||||
hasPrevious,
|
||||
@ -65,14 +68,8 @@ export const AddonPanelPure: React.FC<InteractionsPanelProps> = React.memo(
|
||||
endRef,
|
||||
isDebuggingEnabled,
|
||||
...panelProps
|
||||
}) => {
|
||||
return (
|
||||
}) => (
|
||||
<AddonPanel {...panelProps}>
|
||||
{showTabIcon &&
|
||||
ReactDOM.createPortal(
|
||||
<TabIcon status={hasException ? CallStates.ERROR : CallStates.ACTIVE} />,
|
||||
global.document.getElementById('tabbutton-interactions')
|
||||
)}
|
||||
{isDebuggingEnabled && interactions.length > 0 && (
|
||||
<Subnav
|
||||
isDisabled={isDisabled}
|
||||
@ -105,7 +102,7 @@ export const AddonPanelPure: React.FC<InteractionsPanelProps> = React.memo(
|
||||
<Placeholder>
|
||||
No interactions found
|
||||
<Link
|
||||
href="https://storybook.js.org/docs/react/essentials/interactions"
|
||||
href="https://github.com/storybookjs/storybook/blob/next/addons/interactions/README.md"
|
||||
target="_blank"
|
||||
withArrow
|
||||
>
|
||||
@ -114,8 +111,7 @@ export const AddonPanelPure: React.FC<InteractionsPanelProps> = React.memo(
|
||||
</Placeholder>
|
||||
)}
|
||||
</AddonPanel>
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
export const Panel: React.FC<AddonPanelProps> = (props) => {
|
||||
@ -156,6 +152,7 @@ export const Panel: React.FC<AddonPanelProps> = (props) => {
|
||||
|
||||
const isDebuggingEnabled = FEATURES.interactionsDebugger === true;
|
||||
|
||||
const showStatus = log.length > 0 && !isPlaying;
|
||||
const isDebugging = log.some((item) => pendingStates.includes(item.state));
|
||||
const hasPrevious = log.some((item) => completedStates.includes(item.state));
|
||||
const hasNext = log.some((item) => item.state === CallStates.WAITING);
|
||||
@ -165,8 +162,6 @@ export const Panel: React.FC<AddonPanelProps> = (props) => {
|
||||
? hasActive || isLocked || (isPlaying && !isDebugging)
|
||||
: true;
|
||||
|
||||
const showTabIcon = isDebugging || (!isPlaying && hasException);
|
||||
|
||||
const onStart = React.useCallback(() => emit(EVENTS.START, { storyId }), [storyId]);
|
||||
const onPrevious = React.useCallback(() => emit(EVENTS.BACK, { storyId }), [storyId]);
|
||||
const onNext = React.useCallback(() => emit(EVENTS.NEXT, { storyId }), [storyId]);
|
||||
@ -177,8 +172,12 @@ export const Panel: React.FC<AddonPanelProps> = (props) => {
|
||||
);
|
||||
|
||||
return (
|
||||
<React.Fragment key="interactions">
|
||||
<TabStatus>
|
||||
{showStatus &&
|
||||
(hasException ? <TabIcon status={CallStates.ERROR} /> : ` (${interactions.length})`)}
|
||||
</TabStatus>
|
||||
<AddonPanelPure
|
||||
showTabIcon={showTabIcon}
|
||||
interactions={interactions}
|
||||
isDisabled={isDisabled}
|
||||
hasPrevious={hasPrevious}
|
||||
@ -197,5 +196,6 @@ export const Panel: React.FC<AddonPanelProps> = (props) => {
|
||||
onScrollToEnd={scrollTarget && scrollToTarget}
|
||||
{...props}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
};
|
||||
|
@ -8,7 +8,11 @@ import { AccountForm } from './AccountForm';
|
||||
export default {
|
||||
title: 'Addons/Interactions/AccountForm',
|
||||
component: AccountForm,
|
||||
parameters: { layout: 'centered', theme: 'light' },
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
theme: 'light',
|
||||
options: { selectedPanel: 'storybook/interactions/panel' },
|
||||
},
|
||||
argTypes: {
|
||||
onSubmit: { action: true },
|
||||
},
|
||||
@ -58,15 +62,11 @@ export const StandardEmailFailed: CSF3Story = {
|
||||
...Standard,
|
||||
play: async ({ args, canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
await userEvent.type(canvas.getByTestId('email'), 'me');
|
||||
await userEvent.type(canvas.getByTestId('password1'), 'helloyou');
|
||||
await userEvent.type(canvas.getByTestId('email'), 'gert@chromatic');
|
||||
await userEvent.type(canvas.getByTestId('password1'), 'supersecret');
|
||||
await userEvent.click(canvas.getByRole('button', { name: /create account/i }));
|
||||
|
||||
await canvas.findByText(
|
||||
'Please enter a correctly formatted email address',
|
||||
{},
|
||||
{ timeout: 2000 }
|
||||
);
|
||||
await canvas.findByText('Please enter a correctly formatted email address');
|
||||
expect(args.onSubmit).not.toHaveBeenCalled();
|
||||
},
|
||||
};
|
||||
|
@ -31,12 +31,19 @@ const StyledStatusIcon = styled(Icons)<StatusIconProps>(({ theme, status }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StatusIcon: React.FC<StatusIconProps> = ({ status }) => {
|
||||
export const StatusIcon: React.FC<StatusIconProps> = ({ status, className }) => {
|
||||
const icon = {
|
||||
[CallStates.DONE]: 'check',
|
||||
[CallStates.ERROR]: 'stopalt',
|
||||
[CallStates.ACTIVE]: 'play',
|
||||
[CallStates.WAITING]: 'circle',
|
||||
}[status] as IconsProps['icon'];
|
||||
return <StyledStatusIcon data-testid={`icon-${status}`} status={status} icon={icon} />;
|
||||
return (
|
||||
<StyledStatusIcon
|
||||
data-testid={`icon-${status}`}
|
||||
status={status}
|
||||
icon={icon}
|
||||
className={className}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-jest",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "React storybook addon that show component jest report",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -47,11 +47,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
"react-sizeme": "^3.0.1",
|
||||
@ -76,7 +76,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Jest",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-links",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Link stories together to build demos and prototypes with your UI components",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -41,11 +41,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/router": "6.4.0-beta.26",
|
||||
"@storybook/router": "6.4.0-beta.31",
|
||||
"@types/qs": "^6.9.5",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -72,7 +72,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Links",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-measure",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Inspect layouts by visualizing the box model",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -44,11 +44,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0"
|
||||
@ -71,7 +71,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Measure",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-outline",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Outline all elements with CSS to help with layout placement and alignment",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -47,11 +47,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -76,7 +76,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Outline",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Take a code snapshot of every story automatically with Jest",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -45,11 +45,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@jest/transform": "^26.6.2",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-client": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-client": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@types/glob": "^7.1.3",
|
||||
"@types/jest": "^26.0.16",
|
||||
@ -69,11 +69,11 @@
|
||||
"devDependencies": {
|
||||
"@angular/core": "^11.2.0",
|
||||
"@angular/platform-browser-dynamic": "^11.2.0",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/angular": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/vue": "6.4.0-beta.26",
|
||||
"@storybook/vue3": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/angular": "6.4.0-beta.31",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@storybook/vue": "6.4.0-beta.31",
|
||||
"@storybook/vue3": "6.4.0-beta.31",
|
||||
"babel-loader": "^8.0.0",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-to-json": "^3.6.1",
|
||||
@ -151,7 +151,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"storybook": {
|
||||
"displayName": "Storyshots",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991676-48cdf300-3c7c-11eb-8aa1-944dab6ab29b.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots-puppeteer",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Image snapshots addition to StoryShots based on puppeteer",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -42,7 +42,7 @@
|
||||
"dependencies": {
|
||||
"@axe-core/puppeteer": "^4.2.0",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@types/jest-image-snapshot": "^4.1.3",
|
||||
"core-js": "^3.8.2",
|
||||
"jest-image-snapshot": "^4.3.0",
|
||||
@ -53,7 +53,7 @@
|
||||
"@types/puppeteer": "^5.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"puppeteer": "^2.0.0 || ^3.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
@ -64,5 +64,5 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e"
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storysource",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "View a story’s source code to see how it works and paste into your app",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -41,13 +41,13 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/router": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/router": "6.4.0-beta.31",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"estraverse": "^5.2.0",
|
||||
"loader-utils": "^2.0.0",
|
||||
@ -75,7 +75,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Storysource",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-toolbars",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Create your own toolbar items that control story rendering",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -45,10 +45,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"regenerator-runtime": "^0.13.7"
|
||||
},
|
||||
@ -67,7 +67,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/register.js",
|
||||
"storybook": {
|
||||
"displayName": "Toolbars",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-viewport",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Build responsive components by adjusting Storybook’s viewport size and orientation",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -42,12 +42,12 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
"memoizerific": "^1.11.3",
|
||||
@ -69,7 +69,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/preview.js",
|
||||
"storybook": {
|
||||
"displayName": "Viewport",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/angular",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -45,14 +45,14 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"core-js": "^3.8.2",
|
||||
@ -131,5 +131,5 @@
|
||||
"access": "public"
|
||||
},
|
||||
"builders": "dist/ts3.9/builders/builders.json",
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e"
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267"
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import './globals';
|
||||
|
||||
export { render, renderToDOM } from './render';
|
||||
export { decorateStory } from './decorateStory';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ember",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/main/app/ember",
|
||||
"bugs": {
|
||||
@ -43,9 +43,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ember/test-helpers": "^2.1.4",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
"react": "16.14.0",
|
||||
@ -66,6 +66,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -45,13 +45,13 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/preview-web": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/preview-web": "6.4.0-beta.31",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -71,6 +71,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for Preact: Develop Preact Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -46,11 +46,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.12.12",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -74,6 +74,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -49,14 +49,14 @@
|
||||
"@babel/preset-flow": "^7.12.1",
|
||||
"@babel/preset-react": "^7.12.10",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/react-docgen-typescript-plugin": "1.0.2-canary.253f8c1.0",
|
||||
"@storybook/semver": "^7.3.2",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"babel-plugin-add-react-displayname": "^0.0.5",
|
||||
"babel-plugin-named-asset-import": "^0.3.1",
|
||||
@ -73,7 +73,7 @@
|
||||
"webpack": "4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@types/node": "^14.14.20",
|
||||
"@types/prompts": "^2.0.9"
|
||||
},
|
||||
@ -96,6 +96,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -15,12 +15,14 @@ import { ReactFramework } from './types-6-0';
|
||||
|
||||
const { FRAMEWORK_OPTIONS } = global;
|
||||
|
||||
export const render: ArgsStoryFn<ReactFramework> = (args, { id, component: Component }) => {
|
||||
export const render: ArgsStoryFn<ReactFramework> = (args, context) => {
|
||||
const { id, component: Component } = context;
|
||||
if (!Component) {
|
||||
throw new Error(
|
||||
`Unable to render story ${id} as the component annotation is missing from the default export`
|
||||
);
|
||||
}
|
||||
|
||||
return <Component {...args} />;
|
||||
};
|
||||
|
||||
|
@ -130,7 +130,7 @@ Static parameters can be defined using the `params` story parameter. For example
|
||||
}
|
||||
```
|
||||
|
||||
The Red and Green story HTML will be fetched from the urls `server.url/controls/button?color=red&label=Stopr` and `server.url/controls/button?color=green&label=OK`
|
||||
The Red and Green story HTML will be fetched from the urls `server.url/controls/button?color=red&label=Stop` and `server.url/controls/button?color=green&label=OK`
|
||||
|
||||
Like all story parameters server params can be defined in the default export and overridden in stories.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/server",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -45,15 +45,15 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/preview-web": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/preview-web": "6.4.0-beta.31",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -75,6 +75,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -45,11 +45,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
"react": "16.14.0",
|
||||
@ -75,6 +75,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -45,11 +45,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -83,6 +83,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue3",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -45,11 +45,11 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -81,6 +81,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"lit-html",
|
||||
@ -50,13 +50,13 @@
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/preview-web": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/preview-web": "6.4.0-beta.31",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"babel-plugin-bundled-import-meta": "^0.3.1",
|
||||
"core-js": "^3.8.2",
|
||||
@ -79,6 +79,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/client/index.js"
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ Usage: start-storybook [options]
|
||||
| -V, --version | Output the version number | `start-storybook -V` |
|
||||
| -p, --port [number] | Port to run Storybook | `start-storybook -p 9009` |
|
||||
| -h, --host [string] | Host to run Storybook | `start-storybook -h my-host.com` |
|
||||
| -s, --static-dir `<dir-names>` | Directory where to load static files from, comma-separated list | `start-storybook -s public` |
|
||||
| -s, --static-dir `<dir-names>` | **[DEPRECATED]** Directory where to load static files from, comma-separated list | `start-storybook -s public` |
|
||||
| -c, --config-dir [dir-name] | Directory where to load Storybook configurations from | `start-storybook -c .storybook` |
|
||||
| --https | Serve Storybook over HTTPS. Note: You must provide your own certificate information. | `start-storybook --https` |
|
||||
| --ssl-ca `<ca>` | Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate) | `start-storybook --ssl-ca my-certificate` |
|
||||
@ -45,10 +45,10 @@ Usage: build-storybook [options]
|
||||
```
|
||||
|
||||
| Options | Description | Example |
|
||||
| ---------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------- |
|
||||
| ---------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------- |
|
||||
| -h, --help | Output usage information | `build-storybook --help` |
|
||||
| -V, --version | Output the version number | `build-storybook -V` |
|
||||
| -s, --static-dir `<dir-names>` | Directory where to load static files from, comma-separated list | `build-storybook -s public` |
|
||||
| -s, --static-dir `<dir-names>` | **[DEPRECATED]** Directory where to load static files from, comma-separated list | `build-storybook -s public` |
|
||||
| -o, --output-dir [dir-name] | Directory where to store built files | `build-storybook -o /my-deployed-storybook` |
|
||||
| -c, --config-dir [dir-name] | Directory where to load Storybook configurations from | `build-storybook -c .storybook` |
|
||||
| --loglevel [level] | Controls level of logging during build. Can be one of: [silly, verbose, info (default), warn, error, silent] | `build-storybook --loglevel warn` |
|
||||
|
@ -30,27 +30,27 @@ Afterwards you can use any asset in your stories:
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
### Serving static files via Storybook
|
||||
### Serving static files via Storybook Configuration
|
||||
|
||||
We recommend serving static files via Storybook to ensure that your components always have the assets they need to load. This technique is recommended for assets that your components often use like logos, fonts, and icons.
|
||||
|
||||
Configure a directory (or a list of directories) where your assets live when starting Storybook. Use the`-s` flag in your npm script like so:
|
||||
Configure a directory (or a list of directories) where your assets live in your Storybook configuration. Use the `staticDirs` property in your `main.js` or `main.ts` configuration file like so:
|
||||
|
||||
```json
|
||||
```js
|
||||
{
|
||||
"scripts": {
|
||||
"start-storybook": "start-storybook -s ./public -p 9001"
|
||||
}
|
||||
...
|
||||
staticDirs: ['./public'];
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Or when building your Storybook with `build-storybook`:
|
||||
You can map your local static directories to a different path like this:
|
||||
|
||||
```json
|
||||
```js
|
||||
{
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -s public"
|
||||
}
|
||||
...
|
||||
staticDirs: [{ from: './public', to: '/assets' }];
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
@ -76,23 +76,33 @@ Here `./public` is your static directory. Now use it in a component or story lik
|
||||
|
||||
You can also pass a list of directories separated by commas without spaces instead of a single directory.
|
||||
|
||||
```json
|
||||
```js
|
||||
{
|
||||
"scripts": {
|
||||
"start-storybook": "start-storybook -s ./public,./static -p 9001"
|
||||
}
|
||||
...
|
||||
staticDirs: ['./public', './statics'];
|
||||
...
|
||||
}
|
||||
```
|
||||
The same can be applied when you're building your Storybook.
|
||||
|
||||
```json
|
||||
Or you can map each of them to different paths:
|
||||
|
||||
You can map your local static directories to a different path like this:
|
||||
|
||||
```js
|
||||
{
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -s ./public,./static -p 9001"
|
||||
}
|
||||
...
|
||||
staticDirs: [
|
||||
{ from: './public', to: '/assets' },
|
||||
{ from: './statics', to: '/resources' }
|
||||
];
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### **[⚠️ Deprecated]** Serving static files via Storybook CLI
|
||||
|
||||
Using `--static-dir` or `-s` option with Storybook CLI is deprecated. It is recommended to use [Storybook static directory configuration option](#serving-static-files-via-storybook-configuration) instead.
|
||||
|
||||
### Reference assets from a CDN
|
||||
|
||||
Upload your files to an online CDN and reference them. In this example we’re using a placeholder image service.
|
||||
|
BIN
docs/essentials/addon-interactions-installed-registered.png
Normal file
BIN
docs/essentials/addon-interactions-installed-registered.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 192 KiB |
65
docs/essentials/interactions.md
Normal file
65
docs/essentials/interactions.md
Normal file
@ -0,0 +1,65 @@
|
||||
---
|
||||
title: 'Interactions'
|
||||
---
|
||||
|
||||
The `play` function in Storybook allows you to simulate user interactions to run after a story renders. With the Interactions addon, you have a way to visualize and debug these interactions.
|
||||
|
||||
## Play function for interactions
|
||||
|
||||
Stories isolate and capture component states in a structured manner. While developing a component, you can quickly cycle through the stories to verify the look and feel. Each story specifies all the inputs required to reproduce a specific state. You can even mock context and API calls. That allows you to handle most use cases of a component. But what about states that require user interaction?
|
||||
|
||||
For example, clicking a button to open/close a dialog box, dragging a list item to reorder it or filling out a form to check for validation errors. To test those behaviours, you have to interact with the components as a user would. Interactive stories enable you to automate these interactions using a play function. These are small snippets of code that script out the exact steps a human would take to interact with the component. It's then executed as soon as the story is rendered.
|
||||
|
||||
### Powered by Testing Library and Jest
|
||||
|
||||
The interactions are written using a Storybook-instrumented versions of Testing Library and Jest. That gives you a familiar developer-friendly syntax to interact with the DOM and make assertions, but with extra telemetry to help with debugging.
|
||||
|
||||
## Installation
|
||||
|
||||
Since Interactions is still experimental, it doesn't yet ship with Storybook by default. As such, you'll have to install it. You may also want to add our wrappers for Testing Library and Jest.
|
||||
|
||||
```shell
|
||||
yarn add -D @storybook/addon-interactions @storybook/jest @storybook/testing-library
|
||||
```
|
||||
|
||||
Next, update [`.storybook/main.js`](../configure/overview.md#configure-story-rendering) to the following:
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<CodeSnippets
|
||||
paths={[
|
||||
'common/storybook-interactions-addon-registration.js.mdx',
|
||||
]}
|
||||
/>
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<div class="aside">
|
||||
⚠️ <strong>Note</strong>: Make sure to list `@storybook/addon-interactions` **after** `addon-essentials` (or `addon-actions`).
|
||||
</div>
|
||||
|
||||
Now when you run Storybook the Interactions addon will be enabled.
|
||||
|
||||

|
||||
|
||||
## Writing interactions
|
||||
|
||||
Interactions run as part of the `play` function on your stories. We rely on Testing Library to do the heavy lifting.
|
||||
|
||||
Make sure to import the Storybook wrappers for Jest and Testing Library rather than importing Jest and Testing Library directly.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<CodeSnippets
|
||||
paths={[
|
||||
'common/storybook-interactions-play-function.js.mdx',
|
||||
]}
|
||||
/>
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
The above example uses the `canvasElement` to scope your element queries to the current story. This is important if you want your play functions to eventually be compatible with Storybook Docs, which renders multiple components on the same page.
|
||||
|
||||
While you can refer to the [Testing Library documentation](https://testing-library.com/docs/) for details on how to use it, there's an important detail that's different when using the Storybook wrapper: **method invocations must be `await`-ed**. This allows you to step back and forth through your interactions using the debugger.
|
||||
|
||||
Any `args` that have been marked as an Action, either using the [argTypes annotation](./actions.md#action-argtype-annotation) or the [argTypesRegex](./actions.md#automatically-matching-args), will be automatically converted to a [Jest mock function](https://jestjs.io/docs/mock-function-api) (spy). This allows you to make assertions about calls to these functions.
|
@ -1,2 +1,2 @@
|
||||
- You can also setup Storybook manually through the Storybook CLI. Add the `--type mithril` flag when you initialize Storybook in your project.
|
||||
- You can also setup Storybook manually through the Storybook CLI. Add the `--type preact` flag when you initialize Storybook in your project.
|
||||
- If there's an installation problem, check the [README for the Preact framework](../../app/preact/README.md).
|
||||
|
@ -0,0 +1,11 @@
|
||||
```js
|
||||
// .storybook/main.js
|
||||
|
||||
module.exports = {
|
||||
stories: [],
|
||||
addons: [
|
||||
// Other Storybook addons
|
||||
'@storybook/addon-interactions', // 👈 Register the addon
|
||||
],
|
||||
};
|
||||
```
|
@ -0,0 +1,27 @@
|
||||
```js
|
||||
// MyForm.stories.js
|
||||
import { expect } from '@storybook/jest';
|
||||
import { userEvent, waitFor, within } from '@storybook/testing-library';
|
||||
import { MyForm } from './MyForm'
|
||||
|
||||
export default {
|
||||
title: 'MyForm',
|
||||
component: MyForm,
|
||||
argTypes: {
|
||||
onSubmit: { action: true },
|
||||
},
|
||||
};
|
||||
|
||||
const Template = (args) => <MyForm {...args} />;
|
||||
|
||||
const Submitted = Template.bind({});
|
||||
Submitted.play = async ({ args, canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
|
||||
await userEvent.type(canvas.getByTestId('email'), 'hi@example.com');
|
||||
await userEvent.type(canvas.getByTestId('password'), 'supersecret');
|
||||
await userEvent.click(canvas.getByRole('button'));
|
||||
|
||||
await waitFor(() => expect(args.onSubmit).toHaveBeenCalled());
|
||||
};
|
||||
```
|
@ -1 +1 @@
|
||||
{"version":"6.4.0-beta.26","info":{"plain":"### Bug Fixes\n\n- Core: Replace SSE with websockets ([#16504](https://github.com/storybookjs/storybook/pull/16504))\n- UI: Upgrade react-router ([#16554](https://github.com/storybookjs/storybook/pull/16554))\n- Addon-docs/HTML: Fix source snippetization for DOM elements ([#16553](https://github.com/storybookjs/storybook/pull/16553))"}}
|
||||
{"version":"6.4.0-beta.31","info":{"plain":"### Features\n\n* Core: Add feature flag to stop storybook from aliasing emotion ([#16613](https://github.com/storybookjs/storybook/pull/16613))\n\n### Bug Fixes\n\n* Core: Fix `staticDirs` and `-s` conflict check ([#16649](https://github.com/storybookjs/storybook/pull/16649))\n\n### Maintenance\n\n* Build: Add node-gyp for M1 macs ([#16645](https://github.com/storybookjs/storybook/pull/16645))"}}
|
@ -64,7 +64,7 @@ You can also compose Storybooks based on the current development environment. Fo
|
||||
|
||||
### Improve your Storybook composition
|
||||
|
||||
So far we've covered how we can use composition with local or published Storybooks. One thing worth mentioning as your Storybook will grow in time with your own stories, or through composition with other Storybooks, is that you can optimize the deployment process by including the following command in your workflow:
|
||||
So far we've covered how we can use composition with local or published Storybooks. One thing worth mentioning as your Storybook will grow in time with your own stories, or through composition with other Storybooks, is that you can optimize the deployment process by including the following command in your workflow, run from your project root:
|
||||
|
||||
```shell
|
||||
npx sb extract
|
||||
|
@ -39,4 +39,5 @@ module.exports = {
|
||||
url: 'https://storybookjs.netlify.app/cra-ts-essentials',
|
||||
},
|
||||
},
|
||||
staticDirs: ['../src/assets'],
|
||||
};
|
||||
|
@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "angular-cli",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "ng build",
|
||||
"build-storybook": "yarn storybook-prebuild && build-storybook -s src/assets",
|
||||
"build-storybook": "yarn storybook-prebuild && build-storybook",
|
||||
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
|
||||
"e2e": "ng e2e",
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"storybook": "yarn storybook-prebuild && start-storybook -p 9008 -s src/assets --no-manager-cache",
|
||||
"storybook": "yarn storybook-prebuild && start-storybook -p 9008 --no-manager-cache",
|
||||
"storybook-prebuild": "yarn test:generate-output && yarn docs:json",
|
||||
"test": "jest",
|
||||
"test:coverage": "jest --coverage",
|
||||
@ -39,20 +39,20 @@
|
||||
"@angular/compiler-cli": "^11.2.14",
|
||||
"@angular/elements": "^11.2.14",
|
||||
"@compodoc/compodoc": "^1.1.14",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.26",
|
||||
"@storybook/addon-jest": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/angular": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.31",
|
||||
"@storybook/addon-jest": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/angular": "6.4.0-beta.31",
|
||||
"@storybook/jest": "^0.0.2",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"@storybook/testing-library": "^0.0.3",
|
||||
"@types/core-js": "^2.5.4",
|
||||
"@types/jest": "^26.0.16",
|
||||
|
@ -33,4 +33,5 @@ module.exports = {
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
},
|
||||
staticDirs: ['../public'],
|
||||
};
|
||||
|
@ -1,17 +1,17 @@
|
||||
{
|
||||
"name": "cra-kitchen-sink",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"build-storybook": "build-storybook",
|
||||
"eject": "react-scripts eject",
|
||||
"start": "react-scripts start",
|
||||
"storybook": "start-storybook -p 9010 -s public --no-manager-cache",
|
||||
"storybook": "start-storybook -p 9010 --no-manager-cache",
|
||||
"test": "react-scripts test --env=jsdom"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"global": "^4.4.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "16.14.0",
|
||||
@ -21,19 +21,19 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-ie11": "0.0.7--canary.5e87b64.0",
|
||||
"@storybook/addon-jest": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.26",
|
||||
"@storybook/addon-jest": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.31",
|
||||
"@storybook/preset-create-react-app": "^3.1.6",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"webpack": "4"
|
||||
},
|
||||
"storybook": {
|
||||
|
@ -21,4 +21,5 @@ module.exports = {
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
},
|
||||
staticDirs: ['../public'],
|
||||
};
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "cra-react15",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"build-storybook": "build-storybook",
|
||||
"eject": "react-scripts eject",
|
||||
"start": "react-scripts start",
|
||||
"storybook": "start-storybook -p 9009 -s public --no-manager-cache",
|
||||
"storybook": "start-storybook -p 9009 --no-manager-cache",
|
||||
"test": "react-scripts test --env=jsdom"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -19,14 +19,14 @@
|
||||
"react-scripts": "3.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-ie11": "0.0.7--canary.5e87b64.0",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.31",
|
||||
"@storybook/preset-create-react-app": "^3.1.6",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"babel-core": "6",
|
||||
"babel-runtime": "6",
|
||||
"webpack": "4"
|
||||
|
@ -25,4 +25,5 @@ module.exports = {
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
},
|
||||
staticDirs: ['../public'],
|
||||
};
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "cra-ts-essentials",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"build-storybook": "build-storybook",
|
||||
"eject": "react-scripts eject",
|
||||
"start": "react-scripts start",
|
||||
"storybook": "start-storybook -p 9009 -s public --no-manager-cache",
|
||||
"storybook": "start-storybook -p 9009 --no-manager-cache",
|
||||
"test": "react-scripts test"
|
||||
},
|
||||
"browserslist": {
|
||||
@ -34,12 +34,12 @@
|
||||
"typescript": "^3.9.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-essentials": "6.4.0-beta.26",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.31",
|
||||
"@storybook/addon-ie11": "0.0.7--canary.5e87b64.0",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.31",
|
||||
"@storybook/preset-create-react-app": "^3.1.6",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"webpack": "4"
|
||||
},
|
||||
"storybook": {
|
||||
|
@ -29,4 +29,5 @@ module.exports = {
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
},
|
||||
staticDirs: ['../public'],
|
||||
};
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "cra-ts-kitchen-sink",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "react-scripts build",
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"build-storybook": "build-storybook",
|
||||
"eject": "react-scripts eject",
|
||||
"start": "react-scripts start",
|
||||
"storybook": "start-storybook -p 9009 -s public --no-manager-cache",
|
||||
"storybook": "start-storybook -p 9009 --no-manager-cache",
|
||||
"test": "react-scripts test"
|
||||
},
|
||||
"browserslist": {
|
||||
@ -34,15 +34,15 @@
|
||||
"typescript": "^3.9.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-ie11": "0.0.7--canary.5e87b64.0",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.31",
|
||||
"@storybook/preset-create-react-app": "^3.1.6",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@types/enzyme": "^3.10.8",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.9.1",
|
||||
|
@ -29,4 +29,5 @@ module.exports = {
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
},
|
||||
staticDirs: ['../ember-output'],
|
||||
};
|
||||
|
@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "ember-example",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "ember build --output-path ember-output",
|
||||
"build-storybook": "yarn storybook-prebuild && build-storybook -s ember-output",
|
||||
"build-storybook": "yarn storybook-prebuild && build-storybook",
|
||||
"dev": "ember serve",
|
||||
"storybook": "yarn build && start-storybook -p 9009 -s ember-output --no-manager-cache",
|
||||
"storybook": "yarn build && start-storybook -p 9009 --no-manager-cache",
|
||||
"storybook-prebuild": "yarn build && shx cp -r public/* ember-output",
|
||||
"storybook:dev": "yarn dev & start-storybook -p 9009 -s ember-output"
|
||||
"storybook:dev": "yarn dev & start-storybook -p 9009"
|
||||
},
|
||||
"dependencies": {
|
||||
"ember-named-blocks-polyfill": "^0.2.3",
|
||||
@ -17,18 +17,18 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@ember/optional-features": "^2.0.0",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.26",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/ember": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.31",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/ember": "6.4.0-beta.31",
|
||||
"@storybook/ember-cli-storybook": "^0.2.1",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"babel-loader": "^8.0.0",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
@ -45,6 +45,7 @@
|
||||
"ember-resolver": "^7.0.0",
|
||||
"ember-source": "~3.24.0",
|
||||
"loader.js": "^4.7.0",
|
||||
"shx": "^0.3.2",
|
||||
"webpack": "4",
|
||||
"webpack-cli": "^4.2.0"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "html-kitchen-sink",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
@ -13,23 +13,23 @@
|
||||
"storybook": "start-storybook -p 9006 --no-manager-cache"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-jest": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-jest": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-postcss": "^2.0.0",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.26",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/core": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/html": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.31",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@storybook/core": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/html": "6.4.0-beta.31",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"autoprefixer": "^10.0.1",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"format-json": "^1.0.3",
|
||||
|
@ -40,6 +40,11 @@ const config: StorybookConfig = {
|
||||
modernInlineRender: true,
|
||||
interactionsDebugger: true,
|
||||
},
|
||||
staticDirs: [
|
||||
'./statics/public',
|
||||
{ from: './statics/examples/example1', to: '/example1' },
|
||||
{ from: './statics/examples/example2', to: '/example2' },
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "official-storybook",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./",
|
||||
@ -14,31 +14,31 @@
|
||||
"devDependencies": {
|
||||
"@packtracker/webpack-plugin": "^2.3.0",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.26",
|
||||
"@storybook/addon-jest": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots-puppeteer": "6.4.0-beta.26",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.26",
|
||||
"@storybook/addon-toolbars": "6.4.0-beta.26",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/cli": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.31",
|
||||
"@storybook/addon-jest": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots-puppeteer": "6.4.0-beta.31",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.31",
|
||||
"@storybook/addon-toolbars": "6.4.0-beta.31",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/cli": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/design-system": "^5.4.7",
|
||||
"@storybook/jest": "^0.0.2",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/router": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@storybook/router": "6.4.0-beta.31",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"@storybook/testing-library": "^0.0.3",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"@testing-library/dom": "^7.31.2",
|
||||
"@testing-library/user-event": "^13.1.9",
|
||||
"chromatic": "^6.0.2",
|
||||
|
@ -0,0 +1 @@
|
||||
example1!
|
@ -0,0 +1 @@
|
||||
example2!
|
1
examples/official-storybook/statics/public/public.txt
Normal file
1
examples/official-storybook/statics/public/public.txt
Normal file
@ -0,0 +1 @@
|
||||
public!
|
@ -30,3 +30,7 @@ ForceCodeSource.parameters = { docs: { source: { type: 'code' } } };
|
||||
export const CustomSource = Template.bind({});
|
||||
CustomSource.args = { ...Basic.args };
|
||||
CustomSource.parameters = { docs: { source: { code: 'custom source' } } };
|
||||
|
||||
export const NoSource = Template.bind({});
|
||||
NoSource.args = { ...Basic.args };
|
||||
NoSource.parameters = { docs: { source: { code: null } } };
|
||||
|
@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
|
||||
const Component = (props: Record<string, number>) => <pre>{JSON.stringify(props)}</pre>;
|
||||
|
||||
export default {
|
||||
component: Component,
|
||||
argTypes: {
|
||||
a: { target: 'somewhere' },
|
||||
},
|
||||
parameters: {
|
||||
argTypeTarget: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const StoryOne = {
|
||||
args: {
|
||||
a: 1,
|
||||
b: 2,
|
||||
c: 3,
|
||||
},
|
||||
};
|
||||
|
||||
export const StoryTwo = {
|
||||
args: {
|
||||
a: 1,
|
||||
b: 2,
|
||||
c: 3,
|
||||
},
|
||||
argTypes: {
|
||||
c: { target: 'somewhere' },
|
||||
},
|
||||
};
|
@ -24,4 +24,5 @@ module.exports = {
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
},
|
||||
staticDirs: ['../public'],
|
||||
};
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "preact-example",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"build-storybook": "build-storybook",
|
||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
||||
"storybook": "start-storybook -p 9009 -s public --no-manager-cache"
|
||||
"storybook": "start-storybook -p 9009 --no-manager-cache"
|
||||
},
|
||||
"dependencies": {
|
||||
"global": "^4.4.0",
|
||||
@ -15,16 +15,16 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@babel/plugin-transform-runtime": "^7.12.10",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.26",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/preact": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.31",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/preact": "6.4.0-beta.31",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"@types/prop-types": "^15.7.3",
|
||||
"@types/react": "^17",
|
||||
"@types/react-dom": "^17",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/example-react-ts-webpack4",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./",
|
||||
@ -8,10 +8,10 @@
|
||||
"storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./ --no-manager-cache"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.26",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.31",
|
||||
"@storybook/builder-webpack4": "6.4.0-beta.31",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@types/react": "^16.14.2",
|
||||
"@types/react-dom": "^16.9.10",
|
||||
"prop-types": "15.7.2",
|
||||
|
@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "@storybook/example-react-ts",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook",
|
||||
"debug": "cross-env NODE_OPTIONS=--inspect-brk STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011",
|
||||
"storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 --no-manager-cache"
|
||||
"storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 --no-manager-cache",
|
||||
"sb": "node ../../lib/cli/bin/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"formik": "^2.2.9",
|
||||
@ -17,12 +18,13 @@
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/preset-react": "^7.12.10",
|
||||
"@babel/preset-typescript": "^7.12.7",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.31",
|
||||
"@storybook/cli": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"@testing-library/dom": "^7.31.2",
|
||||
"@testing-library/user-event": "^13.1.9",
|
||||
"@types/babel__preset-env": "^7",
|
||||
|
@ -13,6 +13,7 @@ export default {
|
||||
|
||||
export const WithArgs: ComponentStory<typeof Button> = (args) => <Button {...args} />;
|
||||
WithArgs.args = { label: 'With args' };
|
||||
|
||||
export const Basic = () => <Button label="Click me" />;
|
||||
|
||||
export const StoryObject = {
|
||||
@ -36,3 +37,13 @@ CSF2StoryWithPlay.play = () => {
|
||||
console.log('play!!');
|
||||
userEvent.click(screen.getByRole('button'));
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
export const __namedExportsOrder = [
|
||||
'Basic',
|
||||
'WithArgs',
|
||||
'StoryObject',
|
||||
'StoryNoRender',
|
||||
'StoryWithPlay',
|
||||
'CSF2StoryWithPlay',
|
||||
];
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "server-kitchen-sink",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
@ -14,13 +14,13 @@
|
||||
"storybook": "SERVER_PORT=1137 start-storybook -p 9006 --quiet"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/server": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/server": "6.4.0-beta.31",
|
||||
"concurrently": "^5.3.0",
|
||||
"cors": "^2.8.5",
|
||||
"express": "~4.17.1",
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "standalone-preview",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"storybook": "parcel ./storybook.html --port 1337"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/react": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/react": "6.4.0-beta.31",
|
||||
"parcel": "^1.12.4",
|
||||
"react": "16.14.0",
|
||||
"react-dom": "16.14.0"
|
||||
|
@ -36,4 +36,5 @@ module.exports = {
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
},
|
||||
staticDirs: ['../public'],
|
||||
};
|
||||
|
@ -1,29 +1,29 @@
|
||||
{
|
||||
"name": "svelte-example",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"storybook": "start-storybook -p 9009 -s public --no-manager-cache"
|
||||
"build-storybook": "build-storybook",
|
||||
"storybook": "start-storybook -p 9009 --no-manager-cache"
|
||||
},
|
||||
"dependencies": {
|
||||
"global": "^4.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.26",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.31",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/jest": "^0.0.2",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/svelte": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"@storybook/svelte": "6.4.0-beta.31",
|
||||
"@storybook/testing-library": "^0.0.3",
|
||||
"svelte-jester": "1.3.0",
|
||||
"svelte-preprocess": "4.6.8"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-3-cli-example",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "vue-cli-service build",
|
||||
@ -14,14 +14,14 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.26",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.31",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/jest": "^0.0.2",
|
||||
"@storybook/testing-library": "^0.0.3",
|
||||
"@storybook/vue3": "6.4.0-beta.26",
|
||||
"@storybook/vue3": "6.4.0-beta.31",
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-typescript": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-cli-example",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "vue-cli-service build",
|
||||
@ -15,11 +15,11 @@
|
||||
"vue-property-decorator": "^9.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-essentials": "6.4.0-beta.31",
|
||||
"@storybook/preset-scss": "^1.0.3",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/vue": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"@storybook/vue": "6.4.0-beta.31",
|
||||
"@vue/cli-plugin-babel": "~4.3.1",
|
||||
"@vue/cli-plugin-typescript": "~4.3.1",
|
||||
"@vue/cli-service": "~4.3.1",
|
||||
|
@ -15,4 +15,5 @@ module.exports = {
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
},
|
||||
staticDirs: ['../public'],
|
||||
};
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "vue-example",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
"build-storybook": "build-storybook -s public",
|
||||
"build-storybook": "build-storybook",
|
||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
||||
"storybook": "start-storybook -p 9009 -s public --no-manager-cache"
|
||||
"storybook": "start-storybook -p 9009 --no-manager-cache"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^2.6.12",
|
||||
@ -14,21 +14,21 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.26",
|
||||
"@storybook/addon-actions": "6.4.0-beta.26",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.26",
|
||||
"@storybook/addon-controls": "6.4.0-beta.26",
|
||||
"@storybook/addon-docs": "6.4.0-beta.26",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.26",
|
||||
"@storybook/addon-links": "6.4.0-beta.26",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.26",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.26",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/addon-a11y": "6.4.0-beta.31",
|
||||
"@storybook/addon-actions": "6.4.0-beta.31",
|
||||
"@storybook/addon-backgrounds": "6.4.0-beta.31",
|
||||
"@storybook/addon-controls": "6.4.0-beta.31",
|
||||
"@storybook/addon-docs": "6.4.0-beta.31",
|
||||
"@storybook/addon-interactions": "6.4.0-beta.31",
|
||||
"@storybook/addon-links": "6.4.0-beta.31",
|
||||
"@storybook/addon-storyshots": "6.4.0-beta.31",
|
||||
"@storybook/addon-storysource": "6.4.0-beta.31",
|
||||
"@storybook/addon-viewport": "6.4.0-beta.31",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/jest": "^0.0.2",
|
||||
"@storybook/source-loader": "6.4.0-beta.26",
|
||||
"@storybook/source-loader": "6.4.0-beta.31",
|
||||
"@storybook/testing-library": "^0.0.3",
|
||||
"@storybook/vue": "6.4.0-beta.26",
|
||||
"@storybook/vue": "6.4.0-beta.31",
|
||||
"@vue/babel-preset-jsx": "^1.2.4",
|
||||
"babel-loader": "^8.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "web-components-kitchen-sink",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
|
@ -2,5 +2,5 @@
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"registry": "https://registry.npmjs.org",
|
||||
"version": "6.4.0-beta.26"
|
||||
"version": "6.4.0-beta.31"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addons",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook addons store",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -40,13 +40,13 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/channels": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/channels": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/router": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/router": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
@ -59,6 +59,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/public_api.js"
|
||||
}
|
||||
|
@ -92,6 +92,8 @@ export class AddonStore {
|
||||
|
||||
hasChannel = (): boolean => !!this.channel;
|
||||
|
||||
hasServerChannel = (): boolean => !!this.serverChannel;
|
||||
|
||||
setChannel = (channel: Channel): void => {
|
||||
this.channel = channel;
|
||||
this.resolve();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/api",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Core Storybook API & Context",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -38,13 +38,13 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/channels": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
||||
"@storybook/router": "6.4.0-beta.26",
|
||||
"@storybook/router": "6.4.0-beta.31",
|
||||
"@storybook/semver": "^7.3.2",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"global": "^4.4.0",
|
||||
@ -71,6 +71,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js"
|
||||
}
|
||||
|
@ -77,7 +77,11 @@ export const init: ModuleFn = ({ store, fullAPI }) => {
|
||||
logger.warn('received globals from a non-local ref. This is not currently supported.');
|
||||
}
|
||||
|
||||
if (currentGlobals && !deepEqual(globals, currentGlobals)) {
|
||||
if (
|
||||
currentGlobals &&
|
||||
Object.keys(currentGlobals).length !== 0 &&
|
||||
!deepEqual(globals, currentGlobals)
|
||||
) {
|
||||
api.updateGlobals(currentGlobals);
|
||||
}
|
||||
});
|
||||
|
@ -514,7 +514,7 @@ export const init: ModuleFn = ({
|
||||
);
|
||||
|
||||
if (FEATURES?.storyStoreV7) {
|
||||
provider.serverChannel.on(STORY_INDEX_INVALIDATED, () => fullAPI.fetchStoryList());
|
||||
provider.serverChannel?.on(STORY_INDEX_INVALIDATED, () => fullAPI.fetchStoryList());
|
||||
await fullAPI.fetchStoryList();
|
||||
}
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
export const version = '6.4.0-beta.26';
|
||||
export const version = '6.4.0-beta.31';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-webpack4",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -61,22 +61,22 @@
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/preset-react": "^7.12.10",
|
||||
"@babel/preset-typescript": "^7.12.7",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/channel-postmessage": "6.4.0-beta.26",
|
||||
"@storybook/channels": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/preview-web": "6.4.0-beta.26",
|
||||
"@storybook/router": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/channel-postmessage": "6.4.0-beta.31",
|
||||
"@storybook/channels": "6.4.0-beta.31",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/preview-web": "6.4.0-beta.31",
|
||||
"@storybook/router": "6.4.0-beta.31",
|
||||
"@storybook/semver": "^7.3.2",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/ui": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"@storybook/ui": "6.4.0-beta.31",
|
||||
"@types/node": "^14.0.10",
|
||||
"@types/webpack": "^4.41.26",
|
||||
"autoprefixer": "^9.8.6",
|
||||
@ -131,6 +131,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js"
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ export default async (options: Options & Record<string, any>): Promise<Configura
|
||||
modules: ['node_modules'].concat(envs.NODE_PATH || []),
|
||||
mainFields: [modern ? 'sbmodern' : null, 'browser', 'module', 'main'].filter(Boolean),
|
||||
alias: {
|
||||
...themingPaths,
|
||||
...(features?.emotionAlias ? themingPaths : {}),
|
||||
...storybookPaths,
|
||||
react: path.dirname(require.resolve('react/package.json')),
|
||||
'react-dom': path.dirname(require.resolve('react-dom/package.json')),
|
||||
|
@ -17,15 +17,17 @@ const getProjectAnnotations = () =>
|
||||
const channel = createPostMessageChannel({ page: 'preview' });
|
||||
addons.setChannel(channel);
|
||||
|
||||
const serverChannel = createWebSocketChannel({ url: SERVER_CHANNEL_URL, });
|
||||
addons.setServerChannel(serverChannel);
|
||||
if (SERVER_CHANNEL_URL) {
|
||||
const serverChannel = createWebSocketChannel({ url: SERVER_CHANNEL_URL, });
|
||||
addons.setServerChannel(serverChannel);
|
||||
window.__STORYBOOK_SERVER_CHANNEL__ = serverChannel;
|
||||
}
|
||||
|
||||
const preview = new PreviewWeb();
|
||||
|
||||
window.__STORYBOOK_PREVIEW__ = preview;
|
||||
window.__STORYBOOK_STORY_STORE__ = preview.storyStore;
|
||||
window.__STORYBOOK_ADDONS_CHANNEL__ = channel;
|
||||
window.__STORYBOOK_SERVER_CHANNEL__ = serverChannel;
|
||||
window.__STORYBOOK_CLIENT_API__ = new ClientApi({ storyStore: preview.storyStore });
|
||||
|
||||
preview.initialize({ importFn, getProjectAnnotations });
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-webpack5",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -60,21 +60,21 @@
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/preset-react": "^7.12.10",
|
||||
"@babel/preset-typescript": "^7.12.7",
|
||||
"@storybook/addons": "6.4.0-beta.26",
|
||||
"@storybook/api": "6.4.0-beta.26",
|
||||
"@storybook/channel-postmessage": "6.4.0-beta.26",
|
||||
"@storybook/channels": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/components": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/preview-web": "6.4.0-beta.26",
|
||||
"@storybook/router": "6.4.0-beta.26",
|
||||
"@storybook/addons": "6.4.0-beta.31",
|
||||
"@storybook/api": "6.4.0-beta.31",
|
||||
"@storybook/channel-postmessage": "6.4.0-beta.31",
|
||||
"@storybook/channels": "6.4.0-beta.31",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/components": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/preview-web": "6.4.0-beta.31",
|
||||
"@storybook/router": "6.4.0-beta.31",
|
||||
"@storybook/semver": "^7.3.2",
|
||||
"@storybook/store": "6.4.0-beta.26",
|
||||
"@storybook/theming": "6.4.0-beta.26",
|
||||
"@storybook/store": "6.4.0-beta.31",
|
||||
"@storybook/theming": "6.4.0-beta.31",
|
||||
"@types/node": "^14.0.10",
|
||||
"babel-loader": "^8.0.0",
|
||||
"babel-plugin-macros": "^3.0.1",
|
||||
@ -117,6 +117,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js"
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ export default async (options: Options & Record<string, any>): Promise<Configura
|
||||
modules: ['node_modules'].concat(envs.NODE_PATH || []),
|
||||
mainFields: [modern ? 'sbmodern' : null, 'browser', 'module', 'main'].filter(Boolean),
|
||||
alias: {
|
||||
...themingPaths,
|
||||
...(features?.emotionAlias ? themingPaths : {}),
|
||||
...storybookPaths,
|
||||
react: path.dirname(require.resolve('react/package.json')),
|
||||
'react-dom': path.dirname(require.resolve('react-dom/package.json')),
|
||||
|
@ -17,15 +17,17 @@ const getProjectAnnotations = () =>
|
||||
const channel = createPostMessageChannel({ page: 'preview' });
|
||||
addons.setChannel(channel);
|
||||
|
||||
const serverChannel = createWebSocketChannel({ url: SERVER_CHANNEL_URL, });
|
||||
addons.setServerChannel(serverChannel);
|
||||
if (SERVER_CHANNEL_URL) {
|
||||
const serverChannel = createWebSocketChannel({ url: SERVER_CHANNEL_URL, });
|
||||
addons.setServerChannel(serverChannel);
|
||||
window.__STORYBOOK_SERVER_CHANNEL__ = serverChannel;
|
||||
}
|
||||
|
||||
const preview = new PreviewWeb();
|
||||
|
||||
window.__STORYBOOK_PREVIEW__ = preview;
|
||||
window.__STORYBOOK_STORY_STORE__ = preview.storyStore;
|
||||
window.__STORYBOOK_ADDONS_CHANNEL__ = channel;
|
||||
window.__STORYBOOK_SERVER_CHANNEL__ = serverChannel;
|
||||
window.__STORYBOOK_CLIENT_API__ = new ClientApi({ storyStore: preview.storyStore });
|
||||
|
||||
preview.initialize({ importFn, getProjectAnnotations });
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-postmessage",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -40,9 +40,9 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/core-events": "6.4.0-beta.26",
|
||||
"@storybook/channels": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"@storybook/core-events": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
"qs": "^6.10.0",
|
||||
@ -51,6 +51,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-websocket",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -40,8 +40,8 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "6.4.0-beta.26",
|
||||
"@storybook/client-logger": "6.4.0-beta.26",
|
||||
"@storybook/channels": "6.4.0-beta.31",
|
||||
"@storybook/client-logger": "6.4.0-beta.31",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
"telejson": "^5.3.2"
|
||||
@ -49,6 +49,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channels",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -47,6 +47,6 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e",
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267",
|
||||
"sbmodern": "dist/modern/index.js"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sb",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook CLI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -24,10 +24,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/cli": "6.4.0-beta.26"
|
||||
"@storybook/cli": "6.4.0-beta.31"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e"
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "storybook",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook CLI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -27,10 +27,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/cli": "6.4.0-beta.26"
|
||||
"@storybook/cli": "6.4.0-beta.31"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e"
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/cli",
|
||||
"version": "6.4.0-beta.26",
|
||||
"version": "6.4.0-beta.31",
|
||||
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
||||
"keywords": [
|
||||
"cli",
|
||||
@ -48,10 +48,10 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@storybook/codemod": "6.4.0-beta.26",
|
||||
"@storybook/core-common": "6.4.0-beta.26",
|
||||
"@storybook/csf-tools": "6.4.0-beta.26",
|
||||
"@storybook/node-logger": "6.4.0-beta.26",
|
||||
"@storybook/codemod": "6.4.0-beta.31",
|
||||
"@storybook/core-common": "6.4.0-beta.31",
|
||||
"@storybook/csf-tools": "6.4.0-beta.31",
|
||||
"@storybook/node-logger": "6.4.0-beta.31",
|
||||
"@storybook/semver": "^7.3.2",
|
||||
"boxen": "^5.1.2",
|
||||
"chalk": "^4.1.0",
|
||||
@ -76,7 +76,7 @@
|
||||
"update-notifier": "^5.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/client-api": "6.4.0-beta.26",
|
||||
"@storybook/client-api": "6.4.0-beta.31",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/prompts": "^2.0.9",
|
||||
"@types/puppeteer-core": "^2.1.0",
|
||||
@ -92,5 +92,5 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddc43c3b4cf4ae8463a2e284b290e5014e33780e"
|
||||
"gitHead": "17ef07b50965ad82f3c6a5f7442211bb8f140267"
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export const automigrate = async ({ fixId, dryRun, yes }: FixOptions) => {
|
||||
} else {
|
||||
logger.info(`Skipping the ${chalk.cyan(f.id)} fix.`);
|
||||
logger.info();
|
||||
logger.info(`If you change your mind, run '${chalk.cyan('npx sb@next fix')}'`);
|
||||
logger.info(`If you change your mind, run '${chalk.cyan('npx sb@next automigrate')}'`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import path from 'path';
|
||||
import { writeFile } from 'fs-extra';
|
||||
import { writeFile, stat } from 'fs-extra';
|
||||
import puppeteerCore from 'puppeteer-core';
|
||||
import express from 'express';
|
||||
import getPort from 'get-port';
|
||||
@ -28,6 +28,9 @@ const read = async (url: string) => {
|
||||
};
|
||||
|
||||
const useLocation: (input: string) => Promise<[string, () => void]> = async (input: string) => {
|
||||
// check for input's existence
|
||||
await stat(path.resolve(input));
|
||||
|
||||
if (input.match(/^http/)) {
|
||||
return [input, async () => {}];
|
||||
}
|
||||
|
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