mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 16:11:33 +08:00
Merge remote-tracking branch 'origin/next' into add-ignoreArgsUpdates
This commit is contained in:
commit
a2f272b9a3
@ -623,6 +623,12 @@ workflows:
|
||||
equal: [daily, << pipeline.parameters.workflow >>]
|
||||
jobs:
|
||||
- build
|
||||
- lint:
|
||||
requires:
|
||||
- build
|
||||
- unit-tests:
|
||||
requires:
|
||||
- build
|
||||
- create-sandboxes:
|
||||
parallelism: 27
|
||||
requires:
|
||||
|
34
CHANGELOG.md
34
CHANGELOG.md
@ -1,3 +1,37 @@
|
||||
## 7.0.0-beta.30 (January 18, 2023)
|
||||
|
||||
#### Features
|
||||
|
||||
- UI: Add Sun, Moon, Sidebyside, and stacked icons [#20621](https://github.com/storybooks/storybook/pull/20621)
|
||||
- Angular: Add multi-project setup for ng workspaces [#20559](https://github.com/storybooks/storybook/pull/20559)
|
||||
- Addon-docs: Support @deprecated jsdoc tag [#20154](https://github.com/storybooks/storybook/pull/20154)
|
||||
- Csf-plugin: Support meta description comments [#20632](https://github.com/storybooks/storybook/pull/20632)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- Core: Fix `core` preset default value [#20646](https://github.com/storybooks/storybook/pull/20646)
|
||||
- Addon-docs: Fix issue with unattached `.mdx` files [#20661](https://github.com/storybooks/storybook/pull/20661)
|
||||
- Webpack: aAd error catching when template is not set [#20669](https://github.com/storybooks/storybook/pull/20669)
|
||||
- Addons: Fix Viewport resetting shortcut key not working [#20167](https://github.com/storybooks/storybook/pull/20167)
|
||||
- Core: Show "booting" progress until story is specified or errors [#20425](https://github.com/storybooks/storybook/pull/20425)
|
||||
- Vue: Update events binding in Vue render [#19860](https://github.com/storybooks/storybook/pull/19860)
|
||||
- Addon-actions: Fix webpack hot reload code in manager bundle [#20649](https://github.com/storybooks/storybook/pull/20649)
|
||||
- UI: Fix HMR issue in Manager UI [#20654](https://github.com/storybooks/storybook/pull/20654)
|
||||
|
||||
#### Maintenance
|
||||
|
||||
- Docs: Refactor props of Story block [#20530](https://github.com/storybooks/storybook/pull/20530)
|
||||
- Vite: TypeScript type cleanup [#20642](https://github.com/storybooks/storybook/pull/20642)
|
||||
|
||||
#### Build
|
||||
|
||||
- Add required jobs to daily workflow [#20263](https://github.com/storybooks/storybook/pull/20263)
|
||||
- Fix typings files to ensure this the check command succeeds [#20598](https://github.com/storybooks/storybook/pull/20598)
|
||||
|
||||
#### Dependency Upgrades
|
||||
|
||||
- Svelte: Remove babel/core peer dep [#20650](https://github.com/storybooks/storybook/pull/20650)
|
||||
|
||||
## 7.0.0-beta.29 (January 17, 2023)
|
||||
|
||||
#### Features
|
||||
|
878
MIGRATION.md
878
MIGRATION.md
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-a11y",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Test component compliance with web accessibility standards",
|
||||
"keywords": [
|
||||
"a11y",
|
||||
@ -63,16 +63,16 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-highlight": "7.0.0-beta.29",
|
||||
"@storybook/channels": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/addon-highlight": "7.0.0-beta.30",
|
||||
"@storybook/channels": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"axe-core": "^4.2.0",
|
||||
"lodash": "^4.17.21",
|
||||
"react-resize-detector": "^7.1.2"
|
||||
@ -104,7 +104,7 @@
|
||||
"./src/preview.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Accessibility",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991665-47042f80-3c7c-11eb-8f00-64b5a18f498a.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-actions",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Get UI feedback when an action is performed on an interactive element",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -77,14 +77,14 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"dequal": "^2.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"polished": "^4.2.2",
|
||||
@ -121,7 +121,7 @@
|
||||
"./src/preview.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Actions",
|
||||
"unsupportedFrameworks": [
|
||||
|
@ -5,8 +5,8 @@ import type { API } from '@storybook/manager-api';
|
||||
import { STORY_CHANGED } from '@storybook/core-events';
|
||||
|
||||
import { ActionLogger as ActionLoggerComponent } from '../../components/ActionLogger';
|
||||
import { EVENT_ID } from '../..';
|
||||
import type { ActionDisplay } from '../../models';
|
||||
import { EVENT_ID } from '../../constants';
|
||||
|
||||
interface ActionLoggerProps {
|
||||
active: boolean;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-backgrounds",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Switch backgrounds to view components in different settings",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -76,14 +76,14 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"memoizerific": "^1.11.3",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
@ -112,7 +112,7 @@
|
||||
"./src/preview.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Backgrounds",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991667-479cc600-3c7c-11eb-96d3-410e936252e7.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-controls",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Interact with component inputs dynamically in the Storybook UI",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -68,15 +68,15 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/blocks": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/blocks": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"lodash": "^4.17.21",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
@ -102,7 +102,7 @@
|
||||
],
|
||||
"platform": "browser"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Controls",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-docs",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Document component usage and properties in Markdown",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -103,18 +103,18 @@
|
||||
"@babel/plugin-transform-react-jsx": "^7.19.0",
|
||||
"@jest/transform": "^29.3.1",
|
||||
"@mdx-js/react": "^2.1.5",
|
||||
"@storybook/blocks": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/csf-plugin": "7.0.0-beta.29",
|
||||
"@storybook/csf-tools": "7.0.0-beta.29",
|
||||
"@storybook/blocks": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/csf-plugin": "7.0.0-beta.30",
|
||||
"@storybook/csf-tools": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/mdx2-csf": "next",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/postinstall": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/postinstall": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"fs-extra": "^9.0.1",
|
||||
"remark-external-links": "^8.0.0",
|
||||
"remark-slug": "^6.0.0",
|
||||
@ -141,7 +141,7 @@
|
||||
"./src/shims/mdx-react-shim.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Docs",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",
|
||||
|
5
code/addons/docs/template/stories/stories-mdx/unattached.stories.mdx
vendored
Normal file
5
code/addons/docs/template/stories/stories-mdx/unattached.stories.mdx
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { Meta } from '@storybook/addon-docs';
|
||||
|
||||
<Meta title="stories-mdx/unattached" />
|
||||
|
||||
# Unattached `stories.mdx` file
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-essentials",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Curated addons to bring out the best of Storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -119,23 +119,23 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-actions": "7.0.0-beta.29",
|
||||
"@storybook/addon-backgrounds": "7.0.0-beta.29",
|
||||
"@storybook/addon-controls": "7.0.0-beta.29",
|
||||
"@storybook/addon-docs": "7.0.0-beta.29",
|
||||
"@storybook/addon-highlight": "7.0.0-beta.29",
|
||||
"@storybook/addon-measure": "7.0.0-beta.29",
|
||||
"@storybook/addon-outline": "7.0.0-beta.29",
|
||||
"@storybook/addon-toolbars": "7.0.0-beta.29",
|
||||
"@storybook/addon-viewport": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/addon-actions": "7.0.0-beta.30",
|
||||
"@storybook/addon-backgrounds": "7.0.0-beta.30",
|
||||
"@storybook/addon-controls": "7.0.0-beta.30",
|
||||
"@storybook/addon-docs": "7.0.0-beta.30",
|
||||
"@storybook/addon-highlight": "7.0.0-beta.30",
|
||||
"@storybook/addon-measure": "7.0.0-beta.30",
|
||||
"@storybook/addon-outline": "7.0.0-beta.30",
|
||||
"@storybook/addon-toolbars": "7.0.0-beta.30",
|
||||
"@storybook/addon-viewport": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/vue": "7.0.0-beta.29",
|
||||
"@storybook/vue": "7.0.0-beta.30",
|
||||
"typescript": "^4.9.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@ -166,5 +166,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-highlight",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Highlight DOM nodes within your stories",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -61,9 +61,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/preview-api": "7.0.0-beta.29"
|
||||
"@storybook/preview-api": "7.0.0-beta.30"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
@ -78,7 +78,7 @@
|
||||
"./src/preview.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Highlight",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-interactions",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Automate, test and debug user interactions",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -72,16 +72,16 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/instrumenter": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/instrumenter": "7.0.0-beta.30",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"jest-mock": "^27.0.6",
|
||||
"polished": "^4.2.2",
|
||||
"ts-dedent": "^2.2.0"
|
||||
@ -118,7 +118,7 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Interactions",
|
||||
"unsupportedFrameworks": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-jest",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "React storybook addon that show component jest report",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -70,13 +70,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"react-resize-detector": "^7.1.2",
|
||||
"upath": "^1.2.0"
|
||||
},
|
||||
@ -105,7 +105,7 @@
|
||||
],
|
||||
"platform": "browser"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Jest",
|
||||
"icon": "https://pbs.twimg.com/profile_images/821713465245102080/mMtKIMax_400x400.jpg",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-links",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Link stories together to build demos and prototypes with your UI components",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -77,14 +77,14 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/router": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/router": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"prop-types": "^15.7.2",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
@ -114,7 +114,7 @@
|
||||
"./src/react/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Links",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991673-48355c80-3c7c-11eb-9b6e-b627c96a75f6.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-measure",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Inspect layouts by visualizing the box model",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -75,13 +75,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29"
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~4.9.3"
|
||||
@ -108,7 +108,7 @@
|
||||
"./src/preview.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Measure",
|
||||
"unsupportedFrameworks": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-outline",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Outline all elements with CSS to help with layout placement and alignment",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -78,13 +78,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -112,7 +112,7 @@
|
||||
"./src/preview.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Outline",
|
||||
"unsupportedFrameworks": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Take a code snapshot of every story automatically with Jest",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -37,12 +37,12 @@
|
||||
"dependencies": {
|
||||
"@jest/transform": "^29.3.1",
|
||||
"@storybook/babel-plugin-require-context-hook": "1.0.1",
|
||||
"@storybook/client-api": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/core-webpack": "7.0.0-beta.29",
|
||||
"@storybook/client-api": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/core-webpack": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/glob": "^7.1.3",
|
||||
"@types/jest-specific-snapshot": "^0.5.6",
|
||||
"core-js": "^3.8.2",
|
||||
@ -58,11 +58,11 @@
|
||||
"@angular/core": "^13.3.6",
|
||||
"@angular/platform-browser-dynamic": "^13.3.6",
|
||||
"@emotion/jest": "^11.8.0",
|
||||
"@storybook/addon-docs": "7.0.0-beta.29",
|
||||
"@storybook/angular": "7.0.0-beta.29",
|
||||
"@storybook/react": "7.0.0-beta.29",
|
||||
"@storybook/vue": "7.0.0-beta.29",
|
||||
"@storybook/vue3": "7.0.0-beta.29",
|
||||
"@storybook/addon-docs": "7.0.0-beta.30",
|
||||
"@storybook/angular": "7.0.0-beta.30",
|
||||
"@storybook/react": "7.0.0-beta.30",
|
||||
"@storybook/vue": "7.0.0-beta.30",
|
||||
"@storybook/vue3": "7.0.0-beta.30",
|
||||
"babel-loader": "^9.1.2",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.5",
|
||||
@ -143,7 +143,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"bundler": {},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"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": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Image snapshots addition to StoryShots based on puppeteer",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -36,8 +36,8 @@
|
||||
"dependencies": {
|
||||
"@axe-core/puppeteer": "^4.2.0",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/jest-image-snapshot": "^5.1.0",
|
||||
"jest-image-snapshot": "^6.0.0"
|
||||
},
|
||||
@ -49,7 +49,7 @@
|
||||
"rimraf": "^3.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@storybook/addon-storyshots": "7.0.0-beta.29",
|
||||
"@storybook/addon-storyshots": "7.0.0-beta.30",
|
||||
"puppeteer": ">=2.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
@ -61,5 +61,5 @@
|
||||
"access": "public"
|
||||
},
|
||||
"bundler": {},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storysource",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "View a story’s source code to see how it works and paste into your app",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -54,13 +54,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/router": "7.0.0-beta.29",
|
||||
"@storybook/source-loader": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/router": "7.0.0-beta.30",
|
||||
"@storybook/source-loader": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"estraverse": "^5.2.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-syntax-highlighter": "^15.5.0"
|
||||
@ -92,7 +92,7 @@
|
||||
"./src/preset.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Storysource",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991675-48cdf300-3c7c-11eb-9400-58de5ac6daa7.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-toolbars",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Create your own toolbar items that control story rendering",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -68,11 +68,11 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29"
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~4.9.3"
|
||||
@ -99,7 +99,7 @@
|
||||
],
|
||||
"platform": "browser"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Toolbars",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991677-48cdf300-3c7c-11eb-93b4-19b0e3366959.png",
|
||||
|
@ -6,10 +6,10 @@ export const globalTypes = {
|
||||
icon: 'circlehollow',
|
||||
title: 'Theme',
|
||||
items: [
|
||||
{ value: 'light', icon: 'circlehollow', title: 'light' },
|
||||
{ value: 'dark', icon: 'circle', title: 'dark' },
|
||||
{ value: 'side-by-side', icon: 'sidebar', title: 'side by side' },
|
||||
{ value: 'stacked', icon: 'bottombar', title: 'stacked' },
|
||||
{ value: 'light', icon: 'sun', title: 'light' },
|
||||
{ value: 'dark', icon: 'moon', title: 'dark' },
|
||||
{ value: 'side-by-side', icon: 'sidebyside', title: 'side by side' },
|
||||
{ value: 'stacked', icon: 'stacked', title: 'stacked' },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-viewport",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Build responsive components by adjusting Storybook’s viewport size and orientation",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -73,13 +73,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"memoizerific": "^1.11.3",
|
||||
"prop-types": "^15.7.2"
|
||||
},
|
||||
@ -109,7 +109,7 @@
|
||||
"./src/preview.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831",
|
||||
"storybook": {
|
||||
"displayName": "Viewport",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991678-48cdf300-3c7c-11eb-9764-f8af293c1b28.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/angular",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -36,20 +36,20 @@
|
||||
"prep": "../../../scripts/prepare/tsc.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/cli": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-client": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/core-server": "7.0.0-beta.29",
|
||||
"@storybook/core-webpack": "7.0.0-beta.29",
|
||||
"@storybook/docs-tools": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/cli": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/core-client": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/core-server": "7.0.0-beta.30",
|
||||
"@storybook/core-webpack": "7.0.0-beta.30",
|
||||
"@storybook/docs-tools": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0",
|
||||
"@types/react": "^16.14.34",
|
||||
"@types/react-dom": "^16.9.14",
|
||||
@ -123,5 +123,5 @@
|
||||
"bundler": {
|
||||
"tsConfig": "tsconfig.build.json"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ember",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/ember",
|
||||
"bugs": {
|
||||
@ -31,12 +31,12 @@
|
||||
"prep": "../../../scripts/prepare/tsc.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/docs-tools": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/docs-tools": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -59,5 +59,5 @@
|
||||
"access": "public"
|
||||
},
|
||||
"bundler": {},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html-vite",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,15 +48,15 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "7.0.0-beta.29",
|
||||
"@storybook/builder-vite": "7.0.0-beta.29",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.29",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.29",
|
||||
"@storybook/client-api": "7.0.0-beta.29",
|
||||
"@storybook/core-server": "7.0.0-beta.29",
|
||||
"@storybook/html": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview-web": "7.0.0-beta.29",
|
||||
"@storybook/addons": "7.0.0-beta.30",
|
||||
"@storybook/builder-vite": "7.0.0-beta.30",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.30",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.30",
|
||||
"@storybook/client-api": "7.0.0-beta.30",
|
||||
"@storybook/core-server": "7.0.0-beta.30",
|
||||
"@storybook/html": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview-web": "7.0.0-beta.30",
|
||||
"magic-string": "^0.26.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -76,5 +76,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,11 +48,11 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/html": "7.0.0-beta.29",
|
||||
"@storybook/preset-html-webpack": "7.0.0-beta.29",
|
||||
"@storybook/html": "7.0.0-beta.30",
|
||||
"@storybook/preset-html-webpack": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -76,5 +76,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/nextjs",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Next.js",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -60,13 +60,13 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@next/font": "^13.0.7",
|
||||
"@storybook/addon-actions": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/preset-react-webpack": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/react": "7.0.0-beta.29",
|
||||
"@storybook/addon-actions": "7.0.0-beta.30",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/preset-react-webpack": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/react": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0",
|
||||
"find-up": "^5.0.0",
|
||||
"fs-extra": "^9.0.1",
|
||||
@ -123,5 +123,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact-vite",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,8 +48,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@preact/preset-vite": "^2.0.0",
|
||||
"@storybook/builder-vite": "7.0.0-beta.29",
|
||||
"@storybook/preact": "7.0.0-beta.29"
|
||||
"@storybook/builder-vite": "7.0.0-beta.30",
|
||||
"@storybook/preact": "7.0.0-beta.30"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.0.0",
|
||||
@ -73,5 +73,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Preact: Develop Preact Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/preact": "7.0.0-beta.29",
|
||||
"@storybook/preset-preact-webpack": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/preact": "7.0.0-beta.30",
|
||||
"@storybook/preset-preact-webpack": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -77,5 +77,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-vite",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -50,9 +50,9 @@
|
||||
"dependencies": {
|
||||
"@joshwooding/vite-plugin-react-docgen-typescript": "^0.2.1",
|
||||
"@rollup/pluginutils": "^4.2.0",
|
||||
"@storybook/builder-vite": "7.0.0-beta.29",
|
||||
"@storybook/react": "7.0.0-beta.29",
|
||||
"@vitejs/plugin-react": "^3.0.0",
|
||||
"@storybook/builder-vite": "7.0.0-beta.30",
|
||||
"@storybook/react": "7.0.0-beta.30",
|
||||
"@vitejs/plugin-react": "^3.0.1",
|
||||
"ast-types": "^0.14.2",
|
||||
"magic-string": "^0.26.1",
|
||||
"react-docgen": "6.0.0-alpha.3"
|
||||
@ -80,5 +80,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,9 +48,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/preset-react-webpack": "7.0.0-beta.29",
|
||||
"@storybook/react": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/preset-react-webpack": "7.0.0-beta.30",
|
||||
"@storybook/react": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -83,5 +83,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/server-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/preset-server-webpack": "7.0.0-beta.29",
|
||||
"@storybook/server": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/preset-server-webpack": "7.0.0-beta.30",
|
||||
"@storybook/server": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -74,5 +74,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte-vite",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,9 +48,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/svelte": "7.0.0-beta.29",
|
||||
"@storybook/builder-vite": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/svelte": "7.0.0-beta.30",
|
||||
"@sveltejs/vite-plugin-svelte": "^2.0.0",
|
||||
"magic-string": "^0.26.1",
|
||||
"svelte": "^3.0.0",
|
||||
@ -80,5 +80,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/preset-svelte-webpack": "7.0.0-beta.29",
|
||||
"@storybook/svelte": "7.0.0-beta.29"
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/preset-svelte-webpack": "7.0.0-beta.30",
|
||||
"@storybook/svelte": "7.0.0-beta.30"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte": "^3.48.0",
|
||||
@ -78,5 +78,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/sveltekit",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for SvelteKit",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -51,9 +51,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.29",
|
||||
"@storybook/svelte": "7.0.0-beta.29",
|
||||
"@storybook/svelte-vite": "7.0.0-beta.29"
|
||||
"@storybook/builder-vite": "7.0.0-beta.30",
|
||||
"@storybook/svelte": "7.0.0-beta.30",
|
||||
"@storybook/svelte-vite": "7.0.0-beta.30"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.0.0",
|
||||
@ -76,5 +76,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue-vite",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/core-server": "7.0.0-beta.29",
|
||||
"@storybook/vue": "7.0.0-beta.29",
|
||||
"@storybook/builder-vite": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/core-server": "7.0.0-beta.30",
|
||||
"@storybook/vue": "7.0.0-beta.30",
|
||||
"magic-string": "^0.26.1",
|
||||
"vue-docgen-api": "^4.40.0"
|
||||
},
|
||||
@ -79,5 +79,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/preset-vue-webpack": "7.0.0-beta.29",
|
||||
"@storybook/vue": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/preset-vue-webpack": "7.0.0-beta.30",
|
||||
"@storybook/vue": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -83,5 +83,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue3-vite",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,9 +48,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.29",
|
||||
"@storybook/core-server": "7.0.0-beta.29",
|
||||
"@storybook/vue3": "7.0.0-beta.29",
|
||||
"@storybook/builder-vite": "7.0.0-beta.30",
|
||||
"@storybook/core-server": "7.0.0-beta.30",
|
||||
"@storybook/vue3": "7.0.0-beta.30",
|
||||
"magic-string": "^0.26.1",
|
||||
"vue-docgen-api": "^4.40.0"
|
||||
},
|
||||
@ -83,5 +83,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue3-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/preset-vue3-webpack": "7.0.0-beta.29",
|
||||
"@storybook/vue3": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/preset-vue3-webpack": "7.0.0-beta.30",
|
||||
"@storybook/vue3": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -80,5 +80,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components-vite",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.29",
|
||||
"@storybook/core-server": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/web-components": "7.0.0-beta.29",
|
||||
"@storybook/builder-vite": "7.0.0-beta.30",
|
||||
"@storybook/core-server": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/web-components": "7.0.0-beta.30",
|
||||
"magic-string": "^0.26.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -75,5 +75,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"lit-html",
|
||||
@ -51,10 +51,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/preset-web-components-webpack": "7.0.0-beta.29",
|
||||
"@storybook/web-components": "7.0.0-beta.29",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/preset-web-components-webpack": "7.0.0-beta.30",
|
||||
"@storybook/web-components": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -79,5 +79,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -2,5 +2,5 @@
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"registry": "https://registry.npmjs.org",
|
||||
"version": "7.0.0-beta.29"
|
||||
"version": "7.0.0-beta.30"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addons",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook addons store",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -44,9 +44,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29"
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
@ -60,5 +60,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-manager",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook manager builder",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -44,9 +44,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/manager": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/manager": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@types/ejs": "^3.1.1",
|
||||
"@types/find-cache-dir": "^3.2.1",
|
||||
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10",
|
||||
@ -73,5 +73,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-vite",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "A plugin to run and build Storybooks with Vite",
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/main/code/lib/builder-vite/#readme",
|
||||
"bugs": {
|
||||
@ -43,14 +43,16 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/csf-plugin": "7.0.0-beta.29",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.30",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/csf-plugin": "7.0.0-beta.30",
|
||||
"@storybook/mdx2-csf": "next",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"browser-assert": "^1.2.1",
|
||||
"es-module-lexer": "^0.9.3",
|
||||
"express": "^4.17.3",
|
||||
@ -67,7 +69,7 @@
|
||||
"@types/node": "^16.0.0",
|
||||
"rollup": "^3.0.0",
|
||||
"typescript": "~4.9.3",
|
||||
"vite": "^4.0.0"
|
||||
"vite": "^4.0.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@preact/preset-vite": "*",
|
||||
@ -95,5 +97,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ export async function pluginConfig(options: Options) {
|
||||
}
|
||||
},
|
||||
},
|
||||
viteExternalsPlugin(globals, { useWindow: false }),
|
||||
viteExternalsPlugin(globals, { useWindow: false, disableInServe: true }),
|
||||
] as PluginOption[];
|
||||
|
||||
// TODO: framework doesn't exist, should move into framework when/if built
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-webpack5",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -58,25 +58,25 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@storybook/addons": "7.0.0-beta.29",
|
||||
"@storybook/api": "7.0.0-beta.29",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.29",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.29",
|
||||
"@storybook/channels": "7.0.0-beta.29",
|
||||
"@storybook/client-api": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/components": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/core-webpack": "7.0.0-beta.29",
|
||||
"@storybook/addons": "7.0.0-beta.30",
|
||||
"@storybook/api": "7.0.0-beta.30",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.30",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.30",
|
||||
"@storybook/channels": "7.0.0-beta.30",
|
||||
"@storybook/client-api": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/components": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/core-webpack": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/router": "7.0.0-beta.29",
|
||||
"@storybook/store": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/router": "7.0.0-beta.30",
|
||||
"@storybook/store": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0",
|
||||
"@types/semver": "^7.3.4",
|
||||
"babel-loader": "^9.0.0",
|
||||
@ -131,5 +131,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import {
|
||||
isPreservingSymlinks,
|
||||
} from '@storybook/core-common';
|
||||
import { toRequireContextString, toImportFn } from '@storybook/core-webpack';
|
||||
import { dedent } from 'ts-dedent';
|
||||
import type { BuilderOptions, TypescriptOptions } from '../types';
|
||||
import { createBabelLoader } from './babel-loader-preview';
|
||||
|
||||
@ -190,6 +191,15 @@ export default async (
|
||||
}
|
||||
: {};
|
||||
|
||||
if (!template) {
|
||||
throw new Error(dedent`
|
||||
Storybook's Webpack5 builder requires a template to be specified.
|
||||
Somehow you've ended up with a falsy value for the template option.
|
||||
|
||||
Please file an issue at https://github.com/storybookjs/storybook with a reproduction.
|
||||
`);
|
||||
}
|
||||
|
||||
return {
|
||||
name: 'preview',
|
||||
mode: isProd ? 'production' : 'development',
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-postmessage",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -43,9 +43,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/channels": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"qs": "^6.10.0",
|
||||
"telejson": "^7.0.3"
|
||||
@ -61,5 +61,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-websocket",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -43,8 +43,8 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/channels": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"telejson": "^7.0.3"
|
||||
},
|
||||
@ -59,5 +59,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channels",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -53,5 +53,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sb",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook CLI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,10 +21,10 @@
|
||||
"license": "MIT",
|
||||
"bin": "./index.js",
|
||||
"dependencies": {
|
||||
"@storybook/cli": "7.0.0-beta.29"
|
||||
"@storybook/cli": "7.0.0-beta.30"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "storybook",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook CLI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -24,10 +24,10 @@
|
||||
"storybook": "./index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/cli": "7.0.0-beta.29"
|
||||
"@storybook/cli": "7.0.0-beta.30"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/cli",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
||||
"keywords": [
|
||||
"cli",
|
||||
@ -56,13 +56,13 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.20.2",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@storybook/codemod": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/core-server": "7.0.0-beta.29",
|
||||
"@storybook/csf-tools": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/telemetry": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/codemod": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/core-server": "7.0.0-beta.30",
|
||||
"@storybook/csf-tools": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/telemetry": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/semver": "^7.3.4",
|
||||
"boxen": "^5.1.2",
|
||||
"chalk": "^4.1.0",
|
||||
@ -91,7 +91,7 @@
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/client-api": "7.0.0-beta.29",
|
||||
"@storybook/client-api": "7.0.0-beta.30",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/prompts": "^2.0.9",
|
||||
"@types/puppeteer-core": "^2.1.0",
|
||||
@ -111,5 +111,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,90 +1,90 @@
|
||||
// auto generated file, do not edit
|
||||
export default {
|
||||
'@storybook/addon-a11y': '7.0.0-beta.29',
|
||||
'@storybook/addon-actions': '7.0.0-beta.29',
|
||||
'@storybook/addon-backgrounds': '7.0.0-beta.29',
|
||||
'@storybook/addon-controls': '7.0.0-beta.29',
|
||||
'@storybook/addon-docs': '7.0.0-beta.29',
|
||||
'@storybook/addon-essentials': '7.0.0-beta.29',
|
||||
'@storybook/addon-highlight': '7.0.0-beta.29',
|
||||
'@storybook/addon-interactions': '7.0.0-beta.29',
|
||||
'@storybook/addon-jest': '7.0.0-beta.29',
|
||||
'@storybook/addon-links': '7.0.0-beta.29',
|
||||
'@storybook/addon-measure': '7.0.0-beta.29',
|
||||
'@storybook/addon-outline': '7.0.0-beta.29',
|
||||
'@storybook/addon-storyshots': '7.0.0-beta.29',
|
||||
'@storybook/addon-storyshots-puppeteer': '7.0.0-beta.29',
|
||||
'@storybook/addon-storysource': '7.0.0-beta.29',
|
||||
'@storybook/addon-toolbars': '7.0.0-beta.29',
|
||||
'@storybook/addon-viewport': '7.0.0-beta.29',
|
||||
'@storybook/addons': '7.0.0-beta.29',
|
||||
'@storybook/angular': '7.0.0-beta.29',
|
||||
'@storybook/manager-api': '7.0.0-beta.29',
|
||||
'@storybook/blocks': '7.0.0-beta.29',
|
||||
'@storybook/builder-manager': '7.0.0-beta.29',
|
||||
'@storybook/builder-vite': '7.0.0-beta.29',
|
||||
'@storybook/builder-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/channel-postmessage': '7.0.0-beta.29',
|
||||
'@storybook/channel-websocket': '7.0.0-beta.29',
|
||||
'@storybook/channels': '7.0.0-beta.29',
|
||||
'@storybook/cli': '7.0.0-beta.29',
|
||||
'@storybook/client-api': '7.0.0-beta.29',
|
||||
'@storybook/client-logger': '7.0.0-beta.29',
|
||||
'@storybook/codemod': '7.0.0-beta.29',
|
||||
'@storybook/components': '7.0.0-beta.29',
|
||||
'@storybook/core-client': '7.0.0-beta.29',
|
||||
'@storybook/core-common': '7.0.0-beta.29',
|
||||
'@storybook/core-events': '7.0.0-beta.29',
|
||||
'@storybook/core-server': '7.0.0-beta.29',
|
||||
'@storybook/core-webpack': '7.0.0-beta.29',
|
||||
'@storybook/csf-tools': '7.0.0-beta.29',
|
||||
'@storybook/docs-tools': '7.0.0-beta.29',
|
||||
'@storybook/ember': '7.0.0-beta.29',
|
||||
'@storybook/html': '7.0.0-beta.29',
|
||||
'@storybook/html-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/html-vite': '7.0.0-beta.29',
|
||||
'@storybook/instrumenter': '7.0.0-beta.29',
|
||||
'@storybook/nextjs': '7.0.0-beta.29',
|
||||
'@storybook/node-logger': '7.0.0-beta.29',
|
||||
'@storybook/postinstall': '7.0.0-beta.29',
|
||||
'@storybook/preact': '7.0.0-beta.29',
|
||||
'@storybook/preact-vite': '7.0.0-beta.29',
|
||||
'@storybook/preact-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/preset-html-webpack': '7.0.0-beta.29',
|
||||
'@storybook/preset-preact-webpack': '7.0.0-beta.29',
|
||||
'@storybook/preset-react-webpack': '7.0.0-beta.29',
|
||||
'@storybook/preset-server-webpack': '7.0.0-beta.29',
|
||||
'@storybook/preset-svelte-webpack': '7.0.0-beta.29',
|
||||
'@storybook/preset-vue-webpack': '7.0.0-beta.29',
|
||||
'@storybook/preset-vue3-webpack': '7.0.0-beta.29',
|
||||
'@storybook/preset-web-components-webpack': '7.0.0-beta.29',
|
||||
'@storybook/preview': '7.0.0-beta.29',
|
||||
'@storybook/preview-api': '7.0.0-beta.29',
|
||||
'@storybook/preview-web': '7.0.0-beta.29',
|
||||
'@storybook/react': '7.0.0-beta.29',
|
||||
'@storybook/react-vite': '7.0.0-beta.29',
|
||||
'@storybook/react-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/router': '7.0.0-beta.29',
|
||||
'@storybook/server': '7.0.0-beta.29',
|
||||
'@storybook/server-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/source-loader': '7.0.0-beta.29',
|
||||
'@storybook/store': '7.0.0-beta.29',
|
||||
'@storybook/svelte': '7.0.0-beta.29',
|
||||
'@storybook/sveltekit': '7.0.0-beta.29',
|
||||
'@storybook/svelte-vite': '7.0.0-beta.29',
|
||||
'@storybook/svelte-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/telemetry': '7.0.0-beta.29',
|
||||
'@storybook/theming': '7.0.0-beta.29',
|
||||
'@storybook/manager': '7.0.0-beta.29',
|
||||
'@storybook/vue': '7.0.0-beta.29',
|
||||
'@storybook/vue-vite': '7.0.0-beta.29',
|
||||
'@storybook/vue-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/vue3': '7.0.0-beta.29',
|
||||
'@storybook/vue3-vite': '7.0.0-beta.29',
|
||||
'@storybook/vue3-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/web-components': '7.0.0-beta.29',
|
||||
'@storybook/web-components-webpack5': '7.0.0-beta.29',
|
||||
'@storybook/web-components-vite': '7.0.0-beta.29',
|
||||
sb: '7.0.0-beta.29',
|
||||
storybook: '7.0.0-beta.29',
|
||||
'@storybook/addon-a11y': '7.0.0-beta.30',
|
||||
'@storybook/addon-actions': '7.0.0-beta.30',
|
||||
'@storybook/addon-backgrounds': '7.0.0-beta.30',
|
||||
'@storybook/addon-controls': '7.0.0-beta.30',
|
||||
'@storybook/addon-docs': '7.0.0-beta.30',
|
||||
'@storybook/addon-essentials': '7.0.0-beta.30',
|
||||
'@storybook/addon-highlight': '7.0.0-beta.30',
|
||||
'@storybook/addon-interactions': '7.0.0-beta.30',
|
||||
'@storybook/addon-jest': '7.0.0-beta.30',
|
||||
'@storybook/addon-links': '7.0.0-beta.30',
|
||||
'@storybook/addon-measure': '7.0.0-beta.30',
|
||||
'@storybook/addon-outline': '7.0.0-beta.30',
|
||||
'@storybook/addon-storyshots': '7.0.0-beta.30',
|
||||
'@storybook/addon-storyshots-puppeteer': '7.0.0-beta.30',
|
||||
'@storybook/addon-storysource': '7.0.0-beta.30',
|
||||
'@storybook/addon-toolbars': '7.0.0-beta.30',
|
||||
'@storybook/addon-viewport': '7.0.0-beta.30',
|
||||
'@storybook/addons': '7.0.0-beta.30',
|
||||
'@storybook/angular': '7.0.0-beta.30',
|
||||
'@storybook/manager-api': '7.0.0-beta.30',
|
||||
'@storybook/blocks': '7.0.0-beta.30',
|
||||
'@storybook/builder-manager': '7.0.0-beta.30',
|
||||
'@storybook/builder-vite': '7.0.0-beta.30',
|
||||
'@storybook/builder-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/channel-postmessage': '7.0.0-beta.30',
|
||||
'@storybook/channel-websocket': '7.0.0-beta.30',
|
||||
'@storybook/channels': '7.0.0-beta.30',
|
||||
'@storybook/cli': '7.0.0-beta.30',
|
||||
'@storybook/client-api': '7.0.0-beta.30',
|
||||
'@storybook/client-logger': '7.0.0-beta.30',
|
||||
'@storybook/codemod': '7.0.0-beta.30',
|
||||
'@storybook/components': '7.0.0-beta.30',
|
||||
'@storybook/core-client': '7.0.0-beta.30',
|
||||
'@storybook/core-common': '7.0.0-beta.30',
|
||||
'@storybook/core-events': '7.0.0-beta.30',
|
||||
'@storybook/core-server': '7.0.0-beta.30',
|
||||
'@storybook/core-webpack': '7.0.0-beta.30',
|
||||
'@storybook/csf-tools': '7.0.0-beta.30',
|
||||
'@storybook/docs-tools': '7.0.0-beta.30',
|
||||
'@storybook/ember': '7.0.0-beta.30',
|
||||
'@storybook/html': '7.0.0-beta.30',
|
||||
'@storybook/html-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/html-vite': '7.0.0-beta.30',
|
||||
'@storybook/instrumenter': '7.0.0-beta.30',
|
||||
'@storybook/nextjs': '7.0.0-beta.30',
|
||||
'@storybook/node-logger': '7.0.0-beta.30',
|
||||
'@storybook/postinstall': '7.0.0-beta.30',
|
||||
'@storybook/preact': '7.0.0-beta.30',
|
||||
'@storybook/preact-vite': '7.0.0-beta.30',
|
||||
'@storybook/preact-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/preset-html-webpack': '7.0.0-beta.30',
|
||||
'@storybook/preset-preact-webpack': '7.0.0-beta.30',
|
||||
'@storybook/preset-react-webpack': '7.0.0-beta.30',
|
||||
'@storybook/preset-server-webpack': '7.0.0-beta.30',
|
||||
'@storybook/preset-svelte-webpack': '7.0.0-beta.30',
|
||||
'@storybook/preset-vue-webpack': '7.0.0-beta.30',
|
||||
'@storybook/preset-vue3-webpack': '7.0.0-beta.30',
|
||||
'@storybook/preset-web-components-webpack': '7.0.0-beta.30',
|
||||
'@storybook/preview': '7.0.0-beta.30',
|
||||
'@storybook/preview-api': '7.0.0-beta.30',
|
||||
'@storybook/preview-web': '7.0.0-beta.30',
|
||||
'@storybook/react': '7.0.0-beta.30',
|
||||
'@storybook/react-vite': '7.0.0-beta.30',
|
||||
'@storybook/react-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/router': '7.0.0-beta.30',
|
||||
'@storybook/server': '7.0.0-beta.30',
|
||||
'@storybook/server-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/source-loader': '7.0.0-beta.30',
|
||||
'@storybook/store': '7.0.0-beta.30',
|
||||
'@storybook/svelte': '7.0.0-beta.30',
|
||||
'@storybook/sveltekit': '7.0.0-beta.30',
|
||||
'@storybook/svelte-vite': '7.0.0-beta.30',
|
||||
'@storybook/svelte-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/telemetry': '7.0.0-beta.30',
|
||||
'@storybook/theming': '7.0.0-beta.30',
|
||||
'@storybook/manager': '7.0.0-beta.30',
|
||||
'@storybook/vue': '7.0.0-beta.30',
|
||||
'@storybook/vue-vite': '7.0.0-beta.30',
|
||||
'@storybook/vue-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/vue3': '7.0.0-beta.30',
|
||||
'@storybook/vue3-vite': '7.0.0-beta.30',
|
||||
'@storybook/vue3-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/web-components': '7.0.0-beta.30',
|
||||
'@storybook/web-components-webpack5': '7.0.0-beta.30',
|
||||
'@storybook/web-components-vite': '7.0.0-beta.30',
|
||||
sb: '7.0.0-beta.30',
|
||||
storybook: '7.0.0-beta.30',
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/client-api",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook Client API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -42,8 +42,8 @@
|
||||
"prep": "../../../scripts/prepare/facade.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29"
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@ -54,5 +54,5 @@
|
||||
],
|
||||
"shim": "@storybook/preview-api/dist/client-api"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/client-logger",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -56,5 +56,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/codemod",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "A collection of codemod scripts written with JSCodeshift",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -50,9 +50,9 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/types": "^7.20.7",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/csf-tools": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/csf-tools": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"globby": "^11.0.2",
|
||||
"jscodeshift": "^0.13.1",
|
||||
@ -86,5 +86,5 @@
|
||||
"./src/transforms/upgrade-hierarchy-separators.js"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-client",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -35,8 +35,8 @@
|
||||
"prep": "../../../scripts/prepare/facade.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29"
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@ -47,5 +47,5 @@
|
||||
],
|
||||
"shim": "@storybook/preview-api/dist/core-client"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-common",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -44,8 +44,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.20.2",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/babel__core": "^7.1.20",
|
||||
"@types/express": "^4.7.0",
|
||||
"@types/node": "^16.0.0",
|
||||
@ -83,5 +83,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-events",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Event names used in storybook core",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -53,5 +53,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-server",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -58,17 +58,17 @@
|
||||
"dependencies": {
|
||||
"@aw-web-design/x-default-browser": "1.4.88",
|
||||
"@discoveryjs/json-ext": "^0.5.3",
|
||||
"@storybook/builder-manager": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/builder-manager": "7.0.0-beta.30",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/csf-tools": "7.0.0-beta.29",
|
||||
"@storybook/csf-tools": "7.0.0-beta.30",
|
||||
"@storybook/docs-mdx": "next",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/telemetry": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/telemetry": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/detect-port": "^1.3.0",
|
||||
"@types/node": "^16.0.0",
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
@ -119,5 +119,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -88,10 +88,7 @@ export async function buildDevStandalone(
|
||||
...options,
|
||||
});
|
||||
|
||||
const { renderer, builder, disableTelemetry } = await presets.apply<CoreConfig>(
|
||||
'core',
|
||||
undefined
|
||||
);
|
||||
const { renderer, builder, disableTelemetry } = await presets.apply<CoreConfig>('core', {});
|
||||
|
||||
if (!options.disableTelemetry && !disableTelemetry) {
|
||||
if (versionCheck.success && !versionCheck.cached) {
|
||||
|
@ -84,7 +84,7 @@ export async function buildStaticStandalone(options: BuildStaticStandaloneOption
|
||||
});
|
||||
|
||||
const [previewBuilder, managerBuilder] = await getBuilders({ ...options, presets });
|
||||
const { renderer } = await presets.apply<CoreConfig>('core', undefined);
|
||||
const { renderer } = await presets.apply<CoreConfig>('core', {});
|
||||
|
||||
presets = await loadAllPresets({
|
||||
corePresets: [
|
||||
|
@ -23,8 +23,8 @@ export async function getPreviewBuilder(
|
||||
}
|
||||
|
||||
export async function getBuilders({ presets, configDir }: Options): Promise<Builder<unknown>[]> {
|
||||
const core = await presets.apply<CoreConfig>('core', undefined);
|
||||
const builderName = typeof core?.builder === 'string' ? core.builder : core?.builder?.name;
|
||||
const { builder } = await presets.apply<CoreConfig>('core', {});
|
||||
const builderName = typeof builder === 'string' ? builder : builder?.name;
|
||||
|
||||
return Promise.all([getPreviewBuilder(builderName, configDir), getManagerBuilder()]);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-webpack",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -43,9 +43,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/node-logger": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/node-logger": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/node": "^16.0.0",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
@ -62,5 +62,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/csf-plugin",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Enrich CSF files via static analysis",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -43,7 +43,7 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/csf-tools": "7.0.0-beta.29",
|
||||
"@storybook/csf-tools": "7.0.0-beta.30",
|
||||
"unplugin": "^0.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -64,5 +64,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/csf-tools",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -45,7 +45,7 @@
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.20.2",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"fs-extra": "^9.0.1",
|
||||
"recast": "^0.23.1",
|
||||
"ts-dedent": "^2.0.0"
|
||||
@ -67,5 +67,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -169,6 +169,10 @@ export class CsfFile {
|
||||
|
||||
_storyExports: Record<string, t.VariableDeclarator | t.FunctionDeclaration> = {};
|
||||
|
||||
_metaStatement: t.Statement | undefined;
|
||||
|
||||
_metaNode: t.Expression | undefined;
|
||||
|
||||
_storyStatements: Record<string, t.ExportNamedDeclaration> = {};
|
||||
|
||||
_storyAnnotations: Record<string, Record<string, t.Node>> = {};
|
||||
@ -259,10 +263,27 @@ export class CsfFile {
|
||||
ExportDefaultDeclaration: {
|
||||
enter({ node, parent }) {
|
||||
let metaNode: t.ObjectExpression;
|
||||
const decl =
|
||||
t.isIdentifier(node.declaration) && t.isProgram(parent)
|
||||
? findVarInitialization(node.declaration.name, parent)
|
||||
: node.declaration;
|
||||
const isVariableReference = t.isIdentifier(node.declaration) && t.isProgram(parent);
|
||||
let decl;
|
||||
if (isVariableReference) {
|
||||
// const meta = { ... };
|
||||
// export default meta;
|
||||
const variableName = (node.declaration as t.Identifier).name;
|
||||
const isVariableDeclarator = (declaration: t.VariableDeclarator) =>
|
||||
t.isIdentifier(declaration.id) && declaration.id.name === variableName;
|
||||
|
||||
self._metaStatement = self._ast.program.body.find(
|
||||
(topLevelNode) =>
|
||||
t.isVariableDeclaration(topLevelNode) &&
|
||||
topLevelNode.declarations.find(isVariableDeclarator)
|
||||
);
|
||||
decl = (self._metaStatement as t.VariableDeclaration).declarations.find(
|
||||
isVariableDeclarator
|
||||
).init;
|
||||
} else {
|
||||
self._metaStatement = node;
|
||||
decl = node.declaration;
|
||||
}
|
||||
|
||||
if (t.isObjectExpression(decl)) {
|
||||
// export default { ... };
|
||||
@ -276,6 +297,7 @@ export class CsfFile {
|
||||
}
|
||||
|
||||
if (!self._meta && metaNode && t.isProgram(parent)) {
|
||||
self._metaNode = metaNode;
|
||||
self._parseMeta(metaNode, parent);
|
||||
}
|
||||
},
|
||||
|
@ -132,7 +132,7 @@ describe('enrichCsf', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('descriptions', () => {
|
||||
describe('story descriptions', () => {
|
||||
it('skips inline comments', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
@ -296,6 +296,283 @@ describe('enrichCsf', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('meta descriptions', () => {
|
||||
it('skips inline comments', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
// The most basic button
|
||||
export default {
|
||||
title: 'Button',
|
||||
}
|
||||
export const Basic = () => <Button />
|
||||
`)
|
||||
).toMatchInlineSnapshot(`
|
||||
// The most basic button
|
||||
export default {
|
||||
title: 'Button'
|
||||
};
|
||||
export const Basic = () => <Button />;
|
||||
Basic.parameters = {
|
||||
...Basic.parameters,
|
||||
storySource: {
|
||||
source: "() => <Button />",
|
||||
...Basic.parameters?.storySource
|
||||
}
|
||||
};
|
||||
`);
|
||||
});
|
||||
|
||||
it('skips blocks without jsdoc', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
/* The most basic button */
|
||||
export default {
|
||||
title: 'Button',
|
||||
}
|
||||
export const Basic = () => <Button />
|
||||
`)
|
||||
).toMatchInlineSnapshot(`
|
||||
/* The most basic button */
|
||||
export default {
|
||||
title: 'Button'
|
||||
};
|
||||
export const Basic = () => <Button />;
|
||||
Basic.parameters = {
|
||||
...Basic.parameters,
|
||||
storySource: {
|
||||
source: "() => <Button />",
|
||||
...Basic.parameters?.storySource
|
||||
}
|
||||
};
|
||||
`);
|
||||
});
|
||||
|
||||
it('JSDoc single-line', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
/** The most basic button */
|
||||
export default {
|
||||
title: 'Button'
|
||||
}
|
||||
export const Basic = () => <Button />
|
||||
`)
|
||||
).toMatchInlineSnapshot(`
|
||||
/** The most basic button */
|
||||
export default {
|
||||
title: 'Button',
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component: "The most basic button"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
export const Basic = () => <Button />;
|
||||
Basic.parameters = {
|
||||
...Basic.parameters,
|
||||
storySource: {
|
||||
source: "() => <Button />",
|
||||
...Basic.parameters?.storySource
|
||||
}
|
||||
};
|
||||
`);
|
||||
});
|
||||
|
||||
it('JSDoc multi-line', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
/**
|
||||
* The most basic button
|
||||
*
|
||||
* In a block!
|
||||
*/
|
||||
export default {
|
||||
title: 'Button',
|
||||
}
|
||||
export const Basic = () => <Button />
|
||||
`)
|
||||
).toMatchInlineSnapshot(`
|
||||
/**
|
||||
* The most basic button
|
||||
*
|
||||
* In a block!
|
||||
*/
|
||||
export default {
|
||||
title: 'Button',
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component: "The most basic button\\n\\nIn a block!"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
export const Basic = () => <Button />;
|
||||
Basic.parameters = {
|
||||
...Basic.parameters,
|
||||
storySource: {
|
||||
source: "() => <Button />",
|
||||
...Basic.parameters?.storySource
|
||||
}
|
||||
};
|
||||
`);
|
||||
});
|
||||
|
||||
it('preserves indentation', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
/**
|
||||
* - A bullet list
|
||||
* - A sub-bullet
|
||||
* - A second bullet
|
||||
*/
|
||||
export default {
|
||||
title: 'Button',
|
||||
}
|
||||
export const Basic = () => <Button />
|
||||
`)
|
||||
).toMatchInlineSnapshot(`
|
||||
/**
|
||||
* - A bullet list
|
||||
* - A sub-bullet
|
||||
* - A second bullet
|
||||
*/
|
||||
export default {
|
||||
title: 'Button',
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component: "- A bullet list\\n - A sub-bullet\\n- A second bullet"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
export const Basic = () => <Button />;
|
||||
Basic.parameters = {
|
||||
...Basic.parameters,
|
||||
storySource: {
|
||||
source: "() => <Button />",
|
||||
...Basic.parameters?.storySource
|
||||
}
|
||||
};
|
||||
`);
|
||||
});
|
||||
|
||||
it('correctly interleaves parameters', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
/** The most basic button */
|
||||
export default {
|
||||
title: 'Button',
|
||||
parameters: {
|
||||
foo: 'bar',
|
||||
docs: { inlineStories: true }
|
||||
}
|
||||
}
|
||||
export const Basic = () => <Button />
|
||||
`)
|
||||
).toMatchInlineSnapshot(`
|
||||
/** The most basic button */
|
||||
export default {
|
||||
title: 'Button',
|
||||
parameters: {
|
||||
foo: 'bar',
|
||||
docs: {
|
||||
inlineStories: true,
|
||||
description: {
|
||||
component: "The most basic button"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
export const Basic = () => <Button />;
|
||||
Basic.parameters = {
|
||||
...Basic.parameters,
|
||||
storySource: {
|
||||
source: "() => <Button />",
|
||||
...Basic.parameters?.storySource
|
||||
}
|
||||
};
|
||||
`);
|
||||
});
|
||||
|
||||
it('respects user component description', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
/** The most basic button */
|
||||
export default {
|
||||
title: 'Button',
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component: 'hahaha'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export const Basic = () => <Button />
|
||||
`)
|
||||
).toMatchInlineSnapshot(`
|
||||
/** The most basic button */
|
||||
export default {
|
||||
title: 'Button',
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component: 'hahaha'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
export const Basic = () => <Button />;
|
||||
Basic.parameters = {
|
||||
...Basic.parameters,
|
||||
storySource: {
|
||||
source: "() => <Button />",
|
||||
...Basic.parameters?.storySource
|
||||
}
|
||||
};
|
||||
`);
|
||||
});
|
||||
|
||||
it('respects meta variables', () => {
|
||||
expect(
|
||||
enrich(dedent`
|
||||
/** The most basic button */
|
||||
const meta = {
|
||||
title: 'Button'
|
||||
}
|
||||
/** This should be ignored */
|
||||
export default meta;
|
||||
export const Basic = () => <Button />
|
||||
`)
|
||||
).toMatchInlineSnapshot(`
|
||||
/** The most basic button */
|
||||
const meta = {
|
||||
title: 'Button',
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component: "The most basic button"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
/** This should be ignored */
|
||||
export default meta;
|
||||
export const Basic = () => <Button />;
|
||||
Basic.parameters = {
|
||||
...Basic.parameters,
|
||||
storySource: {
|
||||
source: "() => <Button />",
|
||||
...Basic.parameters?.storySource
|
||||
}
|
||||
};
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
||||
describe('options', () => {
|
||||
it('disableSource', () => {
|
||||
expect(
|
||||
|
@ -9,74 +9,127 @@ export interface EnrichCsfOptions {
|
||||
disableDescription?: boolean;
|
||||
}
|
||||
|
||||
export const enrichCsf = (csf: CsfFile, options?: EnrichCsfOptions) => {
|
||||
Object.keys(csf._storyExports).forEach((key) => {
|
||||
const storyExport = csf.getStoryExport(key);
|
||||
const source = !options?.disableSource && extractSource(storyExport);
|
||||
const description =
|
||||
!options?.disableDescription && extractDescription(csf._storyStatements[key]);
|
||||
const parameters = [];
|
||||
const originalParameters = t.memberExpression(t.identifier(key), t.identifier('parameters'));
|
||||
parameters.push(t.spreadElement(originalParameters));
|
||||
export const enrichCsfStory = (csf: CsfFile, key: string, options?: EnrichCsfOptions) => {
|
||||
const storyExport = csf.getStoryExport(key);
|
||||
const source = !options?.disableSource && extractSource(storyExport);
|
||||
const description = !options?.disableDescription && extractDescription(csf._storyStatements[key]);
|
||||
const parameters = [];
|
||||
const originalParameters = t.memberExpression(t.identifier(key), t.identifier('parameters'));
|
||||
parameters.push(t.spreadElement(originalParameters));
|
||||
|
||||
// storySource: { source: %%source%% },
|
||||
if (source) {
|
||||
const optionalStorySource = t.optionalMemberExpression(
|
||||
originalParameters,
|
||||
// storySource: { source: %%source%% },
|
||||
if (source) {
|
||||
const optionalStorySource = t.optionalMemberExpression(
|
||||
originalParameters,
|
||||
t.identifier('storySource'),
|
||||
false,
|
||||
true
|
||||
);
|
||||
|
||||
parameters.push(
|
||||
t.objectProperty(
|
||||
t.identifier('storySource'),
|
||||
false,
|
||||
true
|
||||
);
|
||||
t.objectExpression([
|
||||
t.objectProperty(t.identifier('source'), t.stringLiteral(source)),
|
||||
t.spreadElement(optionalStorySource),
|
||||
])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
parameters.push(
|
||||
t.objectProperty(
|
||||
t.identifier('storySource'),
|
||||
t.objectExpression([
|
||||
t.objectProperty(t.identifier('source'), t.stringLiteral(source)),
|
||||
t.spreadElement(optionalStorySource),
|
||||
])
|
||||
)
|
||||
);
|
||||
}
|
||||
// docs: { description: { story: %%description%% } },
|
||||
if (description) {
|
||||
const optionalDocs = t.optionalMemberExpression(
|
||||
originalParameters,
|
||||
t.identifier('docs'),
|
||||
false,
|
||||
true
|
||||
);
|
||||
|
||||
// docs: { description: { story: %%description%% } },
|
||||
if (description) {
|
||||
const optionalDocs = t.optionalMemberExpression(
|
||||
originalParameters,
|
||||
const optionalDescription = t.optionalMemberExpression(
|
||||
optionalDocs,
|
||||
t.identifier('description'),
|
||||
false,
|
||||
true
|
||||
);
|
||||
|
||||
parameters.push(
|
||||
t.objectProperty(
|
||||
t.identifier('docs'),
|
||||
false,
|
||||
true
|
||||
);
|
||||
t.objectExpression([
|
||||
t.spreadElement(optionalDocs),
|
||||
t.objectProperty(
|
||||
t.identifier('description'),
|
||||
t.objectExpression([
|
||||
t.objectProperty(t.identifier('story'), t.stringLiteral(description)),
|
||||
t.spreadElement(optionalDescription),
|
||||
])
|
||||
),
|
||||
])
|
||||
)
|
||||
);
|
||||
}
|
||||
if (parameters.length > 1) {
|
||||
const addParameter = t.expressionStatement(
|
||||
t.assignmentExpression('=', originalParameters, t.objectExpression(parameters))
|
||||
);
|
||||
csf._ast.program.body.push(addParameter);
|
||||
}
|
||||
};
|
||||
|
||||
const optionalDescription = t.optionalMemberExpression(
|
||||
optionalDocs,
|
||||
t.identifier('description'),
|
||||
false,
|
||||
true
|
||||
);
|
||||
const addComponentDescription = (
|
||||
node: t.ObjectExpression,
|
||||
path: string[],
|
||||
value: t.ObjectProperty
|
||||
) => {
|
||||
if (!path.length) {
|
||||
const hasExistingComponent = node.properties.find(
|
||||
(p) => t.isObjectProperty(p) && t.isIdentifier(p.key) && p.key.name === 'component'
|
||||
);
|
||||
if (!hasExistingComponent) {
|
||||
// make this the lowest-priority so that if the user is object-spreading on top of it,
|
||||
// the users' code will "win"
|
||||
node.properties.unshift(value);
|
||||
}
|
||||
return;
|
||||
}
|
||||
const [first, ...rest] = path;
|
||||
const existing = node.properties.find(
|
||||
(p) =>
|
||||
t.isObjectProperty(p) &&
|
||||
t.isIdentifier(p.key) &&
|
||||
p.key.name === first &&
|
||||
t.isObjectExpression(p.value)
|
||||
);
|
||||
let subNode: t.ObjectExpression;
|
||||
if (existing) {
|
||||
subNode = (existing as t.ObjectProperty).value as t.ObjectExpression;
|
||||
} else {
|
||||
subNode = t.objectExpression([]);
|
||||
node.properties.push(t.objectProperty(t.identifier(first), subNode));
|
||||
}
|
||||
addComponentDescription(subNode, rest, value);
|
||||
};
|
||||
|
||||
parameters.push(
|
||||
t.objectProperty(
|
||||
t.identifier('docs'),
|
||||
t.objectExpression([
|
||||
t.spreadElement(optionalDocs),
|
||||
t.objectProperty(
|
||||
t.identifier('description'),
|
||||
t.objectExpression([
|
||||
t.objectProperty(t.identifier('story'), t.stringLiteral(description)),
|
||||
t.spreadElement(optionalDescription),
|
||||
])
|
||||
),
|
||||
])
|
||||
)
|
||||
export const enrichCsfMeta = (csf: CsfFile, options?: EnrichCsfOptions) => {
|
||||
const description = !options?.disableDescription && extractDescription(csf._metaStatement);
|
||||
// docs: { description: { component: %%description%% } },
|
||||
if (description) {
|
||||
const metaNode = csf._metaNode;
|
||||
if (metaNode && t.isObjectExpression(metaNode)) {
|
||||
addComponentDescription(
|
||||
metaNode,
|
||||
['parameters', 'docs', 'description'],
|
||||
t.objectProperty(t.identifier('component'), t.stringLiteral(description))
|
||||
);
|
||||
}
|
||||
if (parameters.length > 1) {
|
||||
const addParameter = t.expressionStatement(
|
||||
t.assignmentExpression('=', originalParameters, t.objectExpression(parameters))
|
||||
);
|
||||
csf._ast.program.body.push(addParameter);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const enrichCsf = (csf: CsfFile, options?: EnrichCsfOptions) => {
|
||||
enrichCsfMeta(csf, options);
|
||||
Object.keys(csf._storyExports).forEach((key) => {
|
||||
enrichCsfStory(csf, key, options);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/docs-tools",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Shared utility functions for frameworks to implement docs",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -44,9 +44,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/doctrine": "^0.0.3",
|
||||
"doctrine": "^3.0.0",
|
||||
"lodash": "^4.17.21"
|
||||
@ -64,5 +64,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -222,6 +222,22 @@ describe('parseJsDoc', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('@deprecated', () => {
|
||||
it('should ignore invalid @deprecated', () => {
|
||||
const { extractedTags } = parseJsDoc('@deprecated');
|
||||
|
||||
expect(extractedTags.returns).toBeNull();
|
||||
});
|
||||
|
||||
it('should return a @deprecated with a name', () => {
|
||||
const { extractedTags } = parseJsDoc('@deprecated string');
|
||||
|
||||
expect(extractedTags.deprecated).not.toBeNull();
|
||||
expect(extractedTags.deprecated.name).not.toBeNull();
|
||||
expect(extractedTags.deprecated.name).toBe('string');
|
||||
});
|
||||
});
|
||||
|
||||
describe('@returns', () => {
|
||||
it('should ignore invalid @returns', () => {
|
||||
const { extractedTags } = parseJsDoc('@returns');
|
||||
|
@ -9,6 +9,10 @@ export interface ExtractedJsDocParam {
|
||||
getTypeName: () => string;
|
||||
}
|
||||
|
||||
export interface ExtractedJsDocDeprecated {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface ExtractedJsDocReturns {
|
||||
type?: any;
|
||||
description?: string;
|
||||
@ -17,6 +21,7 @@ export interface ExtractedJsDocReturns {
|
||||
|
||||
export interface ExtractedJsDoc {
|
||||
params?: ExtractedJsDocParam[];
|
||||
deprecated?: ExtractedJsDocDeprecated;
|
||||
returns?: ExtractedJsDocReturns;
|
||||
ignore: boolean;
|
||||
}
|
||||
@ -57,7 +62,7 @@ function parse(content: string, tags: string[]): Annotation {
|
||||
}
|
||||
|
||||
const DEFAULT_OPTIONS = {
|
||||
tags: ['param', 'arg', 'argument', 'returns', 'ignore'],
|
||||
tags: ['param', 'arg', 'argument', 'returns', 'ignore', 'deprecated'],
|
||||
};
|
||||
|
||||
export const parseJsDoc: ParseJsDoc = (
|
||||
@ -72,6 +77,7 @@ export const parseJsDoc: ParseJsDoc = (
|
||||
}
|
||||
|
||||
const jsDocAst = parse(value, options.tags);
|
||||
|
||||
const extractedTags = extractJsDocTags(jsDocAst);
|
||||
|
||||
if (extractedTags.ignore) {
|
||||
@ -94,6 +100,7 @@ export const parseJsDoc: ParseJsDoc = (
|
||||
function extractJsDocTags(ast: doctrine.Annotation): ExtractedJsDoc {
|
||||
const extractedTags: ExtractedJsDoc = {
|
||||
params: null,
|
||||
deprecated: null,
|
||||
returns: null,
|
||||
ignore: false,
|
||||
};
|
||||
@ -120,6 +127,13 @@ function extractJsDocTags(ast: doctrine.Annotation): ExtractedJsDoc {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'deprecated': {
|
||||
const deprecatedTag = extractDeprecated(tag);
|
||||
if (deprecatedTag != null) {
|
||||
extractedTags.deprecated = deprecatedTag;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'returns': {
|
||||
const returnsTag = extractReturns(tag);
|
||||
if (returnsTag != null) {
|
||||
@ -164,6 +178,16 @@ function extractParam(tag: doctrine.Tag): ExtractedJsDocParam {
|
||||
return null;
|
||||
}
|
||||
|
||||
function extractDeprecated(tag: doctrine.Tag): ExtractedJsDocDeprecated {
|
||||
if (tag.title != null) {
|
||||
return {
|
||||
name: tag.description,
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function extractReturns(tag: doctrine.Tag): ExtractedJsDocReturns {
|
||||
if (tag.type != null) {
|
||||
return {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/instrumenter",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -43,11 +43,11 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/channels": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"core-js": "^3.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -61,5 +61,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/api",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook Manager API (facade)",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -42,8 +42,8 @@
|
||||
"prep": "../../../scripts/prepare/facade.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/manager-api": "7.0.0-beta.29"
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/manager-api": "7.0.0-beta.30"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@ -54,5 +54,5 @@
|
||||
],
|
||||
"shim": "@storybook/manager-api"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/manager-api",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Core Storybook API & Context",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -42,14 +42,14 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/channels": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/router": "7.0.0-beta.29",
|
||||
"@storybook/theming": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/router": "7.0.0-beta.30",
|
||||
"@storybook/theming": "7.0.0-beta.30",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"dequal": "^2.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"memoizerific": "^1.11.3",
|
||||
@ -78,5 +78,5 @@
|
||||
"./src/index.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -18,13 +18,13 @@ import type {
|
||||
API_DocsEntry,
|
||||
API_GroupEntry,
|
||||
API_HashEntry,
|
||||
API_IndexHash,
|
||||
API_LeafEntry,
|
||||
API_OptionsData,
|
||||
API_ProviderData,
|
||||
API_Refs,
|
||||
API_RootEntry,
|
||||
API_StateMerger,
|
||||
API_StoriesHash,
|
||||
API_StoryEntry,
|
||||
Parameters,
|
||||
StoryId,
|
||||
@ -326,7 +326,9 @@ export function useStorybookApi(): API {
|
||||
}
|
||||
|
||||
export type {
|
||||
API_StoriesHash as StoriesHash,
|
||||
/** @deprecated now IndexHash */
|
||||
API_IndexHash as StoriesHash,
|
||||
API_IndexHash as IndexHash,
|
||||
API_RootEntry as RootEntry,
|
||||
API_GroupEntry as GroupEntry,
|
||||
API_ComponentEntry as ComponentEntry,
|
||||
|
@ -20,7 +20,7 @@ export type KeyboardEventLike = Pick<
|
||||
|
||||
// Map a keyboard event to a keyboard shortcut
|
||||
// NOTE: if we change the fields on the event that we need, we'll need to update the serialization in core/preview/start.js
|
||||
export const eventToShortcut = (e: KeyboardEventLike): API_KeyCollection | null => {
|
||||
export const eventToShortcut = (e: KeyboardEventLike): (string | string[])[] | null => {
|
||||
// Meta key only doesn't map to a shortcut
|
||||
if (['Meta', 'Alt', 'Control', 'Shift'].includes(e.key)) {
|
||||
return null;
|
||||
@ -41,7 +41,17 @@ export const eventToShortcut = (e: KeyboardEventLike): API_KeyCollection | null
|
||||
}
|
||||
|
||||
if (e.key && e.key.length === 1 && e.key !== ' ') {
|
||||
keys.push(e.key.toUpperCase());
|
||||
const key = e.key.toUpperCase();
|
||||
// Using `event.code` to support `alt (option) + <key>` on macos which returns special characters
|
||||
// See full list of event.code here:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values
|
||||
const code = e.code?.toUpperCase().replace('KEY', '').replace('DIGIT', '');
|
||||
|
||||
if (code && code.length === 1 && code !== key) {
|
||||
keys.push([key, code]);
|
||||
} else {
|
||||
keys.push(key);
|
||||
}
|
||||
}
|
||||
if (e.key === ' ') {
|
||||
keys.push('space');
|
||||
@ -66,13 +76,15 @@ export const eventToShortcut = (e: KeyboardEventLike): API_KeyCollection | null
|
||||
};
|
||||
|
||||
export const shortcutMatchesShortcut = (
|
||||
inputShortcut: API_KeyCollection,
|
||||
inputShortcut: (string | string[])[],
|
||||
shortcut: API_KeyCollection
|
||||
): boolean => {
|
||||
if (!inputShortcut || !shortcut) return false;
|
||||
if (inputShortcut.join('') === 'shift/') inputShortcut.shift(); // shift is optional for `/`
|
||||
if (inputShortcut.length !== shortcut.length) return false;
|
||||
return !inputShortcut.find((key, i) => key !== shortcut[i]);
|
||||
return !inputShortcut.find((input, i) =>
|
||||
Array.isArray(input) ? !input.includes(shortcut[i]) : input !== shortcut[i]
|
||||
);
|
||||
};
|
||||
|
||||
// Should this keyboard event trigger this keyboard shortcut?
|
||||
|
@ -15,7 +15,7 @@ import type {
|
||||
API_RootEntry,
|
||||
API_GroupEntry,
|
||||
API_ComponentEntry,
|
||||
API_StoriesHash,
|
||||
API_IndexHash,
|
||||
API_DocsEntry,
|
||||
API_StoryEntry,
|
||||
API_HashEntry,
|
||||
@ -122,7 +122,7 @@ export const transformStoryIndexToStoriesHash = (
|
||||
provider: API_Provider<API>;
|
||||
docsOptions: DocsOptions;
|
||||
}
|
||||
): API_StoriesHash => {
|
||||
): API_IndexHash => {
|
||||
if (!index.v) throw new Error('Composition: Missing stories.json version');
|
||||
|
||||
const v4Index = index.v === 4 ? index : transformStoryIndexV3toV4(index as any);
|
||||
@ -241,10 +241,10 @@ export const transformStoryIndexToStoriesHash = (
|
||||
} as API_DocsEntry | API_StoryEntry;
|
||||
|
||||
return acc;
|
||||
}, {} as API_StoriesHash);
|
||||
}, {} as API_IndexHash);
|
||||
|
||||
// This function adds a "root" or "orphan" and all of its descendents to the hash.
|
||||
function addItem(acc: API_StoriesHash, item: API_HashEntry) {
|
||||
function addItem(acc: API_IndexHash, item: API_HashEntry) {
|
||||
// If we were already inserted as part of a group, that's great.
|
||||
if (acc[item.id]) {
|
||||
return acc;
|
||||
@ -268,7 +268,7 @@ export const transformStoryIndexToStoriesHash = (
|
||||
.reduce(addItem, orphanHash);
|
||||
};
|
||||
|
||||
export const addPreparedStories = (newHash: API_StoriesHash, oldHash?: API_StoriesHash) => {
|
||||
export const addPreparedStories = (newHash: API_IndexHash, oldHash?: API_IndexHash) => {
|
||||
if (!oldHash) return newHash;
|
||||
|
||||
return Object.fromEntries(
|
||||
@ -283,7 +283,7 @@ export const addPreparedStories = (newHash: API_StoriesHash, oldHash?: API_Stori
|
||||
);
|
||||
};
|
||||
|
||||
export const getComponentLookupList = memoize(1)((hash: API_StoriesHash) => {
|
||||
export const getComponentLookupList = memoize(1)((hash: API_IndexHash) => {
|
||||
return Object.entries(hash).reduce((acc, i) => {
|
||||
const value = i[1];
|
||||
if (value.type === 'component') {
|
||||
@ -293,6 +293,6 @@ export const getComponentLookupList = memoize(1)((hash: API_StoriesHash) => {
|
||||
}, [] as StoryId[][]);
|
||||
});
|
||||
|
||||
export const getStoriesLookupList = memoize(1)((hash: API_StoriesHash) => {
|
||||
export const getStoriesLookupList = memoize(1)((hash: API_IndexHash) => {
|
||||
return Object.keys(hash).filter((k) => ['story', 'docs'].includes(hash[k].type));
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ import type {
|
||||
API_Refs,
|
||||
API_SetRefData,
|
||||
SetStoriesStoryData,
|
||||
API_StoriesHash,
|
||||
API_IndexHash,
|
||||
API_StoryMapper,
|
||||
} from '@storybook/types';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
@ -33,7 +33,7 @@ export interface SubAPI {
|
||||
getRefs: () => API_Refs;
|
||||
checkRef: (ref: API_SetRefData) => Promise<void>;
|
||||
changeRefVersion: (id: string, url: string) => void;
|
||||
changeRefState: (id: string, ready: boolean) => void;
|
||||
changeRefState: (id: string, previewInitialized: boolean) => void;
|
||||
}
|
||||
|
||||
export const getSourceType = (source: string, refId: string) => {
|
||||
@ -56,10 +56,10 @@ export const defaultStoryMapper: API_StoryMapper = (b, a) => {
|
||||
return { ...a, kind: a.kind.replace('|', '/') };
|
||||
};
|
||||
|
||||
const addRefIds = (input: API_StoriesHash, ref: API_ComposedRef): API_StoriesHash => {
|
||||
const addRefIds = (input: API_IndexHash, ref: API_ComposedRef): API_IndexHash => {
|
||||
return Object.entries(input).reduce((acc, [id, item]) => {
|
||||
return { ...acc, [id]: { ...item, refId: ref.id } };
|
||||
}, {} as API_StoriesHash);
|
||||
}, {} as API_IndexHash);
|
||||
};
|
||||
|
||||
async function handleRequest(
|
||||
@ -83,8 +83,8 @@ async function handleRequest(
|
||||
}
|
||||
|
||||
return json as API_SetRefData;
|
||||
} catch (error) {
|
||||
return { error };
|
||||
} catch (err) {
|
||||
return { indexError: err };
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,10 +139,10 @@ export const init: ModuleFn<SubAPI, SubState, void> = (
|
||||
|
||||
api.checkRef(ref);
|
||||
},
|
||||
changeRefState: (id, ready) => {
|
||||
changeRefState: (id, previewInitialized) => {
|
||||
const { [id]: ref, ...updated } = api.getRefs();
|
||||
|
||||
updated[id] = { ...ref, ready };
|
||||
updated[id] = { ...ref, previewInitialized };
|
||||
|
||||
store.setState({
|
||||
refs: updated,
|
||||
@ -205,7 +205,7 @@ export const init: ModuleFn<SubAPI, SubState, void> = (
|
||||
// In theory the `/iframe.html` could be private and the `stories.json` could not exist, but in practice
|
||||
// the only private servers we know about (Chromatic) always include `stories.json`. So we can tell
|
||||
// if the ref actually exists by simply checking `stories.json` w/ credentials.
|
||||
loadedData.error = {
|
||||
loadedData.indexError = {
|
||||
message: dedent`
|
||||
Error: Loading of ref failed
|
||||
at fetch (lib/api/src/modules/refs.ts)
|
||||
@ -245,18 +245,18 @@ export const init: ModuleFn<SubAPI, SubState, void> = (
|
||||
const { storyMapper = defaultStoryMapper } = provider.getConfig();
|
||||
const ref = api.getRefs()[id];
|
||||
|
||||
let storiesHash: API_StoriesHash;
|
||||
let index: API_IndexHash;
|
||||
if (setStoriesData) {
|
||||
storiesHash = transformSetStoriesStoryDataToStoriesHash(
|
||||
index = transformSetStoriesStoryDataToStoriesHash(
|
||||
map(setStoriesData, ref, { storyMapper }),
|
||||
{ provider, docsOptions }
|
||||
);
|
||||
} else if (storyIndex) {
|
||||
storiesHash = transformStoryIndexToStoriesHash(storyIndex, { provider, docsOptions });
|
||||
index = transformStoryIndexToStoriesHash(storyIndex, { provider, docsOptions });
|
||||
}
|
||||
if (storiesHash) storiesHash = addRefIds(storiesHash, ref);
|
||||
if (index) index = addRefIds(index, ref);
|
||||
|
||||
api.updateRef(id, { stories: storiesHash, ...rest, ready });
|
||||
api.updateRef(id, { index, ...rest });
|
||||
},
|
||||
|
||||
updateRef: (id, data) => {
|
||||
|
@ -13,8 +13,10 @@ import {
|
||||
STORY_SPECIFIED,
|
||||
STORY_INDEX_INVALIDATED,
|
||||
CONFIG_ERROR,
|
||||
CURRENT_STORY_WAS_SET,
|
||||
STORY_MISSING,
|
||||
} from '@storybook/core-events';
|
||||
import { logger } from '@storybook/client-logger';
|
||||
import { deprecate, logger } from '@storybook/client-logger';
|
||||
|
||||
import type {
|
||||
StoryId,
|
||||
@ -24,9 +26,10 @@ import type {
|
||||
API_LeafEntry,
|
||||
API_PreparedStoryIndex,
|
||||
SetStoriesPayload,
|
||||
API_StoriesHash,
|
||||
API_StoryEntry,
|
||||
StoryIndex,
|
||||
API_LoadedRefData,
|
||||
API_IndexHash,
|
||||
} from '@storybook/types';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { getEventMetadata } from '../lib/events';
|
||||
@ -39,7 +42,7 @@ import {
|
||||
addPreparedStories,
|
||||
} from '../lib/stories';
|
||||
|
||||
import type { ModuleFn } from '../index';
|
||||
import type { ComposedRef, ModuleFn } from '../index';
|
||||
|
||||
const { FEATURES, fetch } = global;
|
||||
const STORY_INDEX_PATH = './index.json';
|
||||
@ -50,11 +53,21 @@ type ParameterName = string;
|
||||
type ViewMode = 'story' | 'info' | 'settings' | string | undefined;
|
||||
type StoryUpdate = Pick<API_StoryEntry, 'parameters' | 'initialArgs' | 'argTypes' | 'args'>;
|
||||
|
||||
export interface SubState {
|
||||
storiesHash: API_StoriesHash;
|
||||
export interface SubState extends API_LoadedRefData {
|
||||
storyId: StoryId;
|
||||
viewMode: ViewMode;
|
||||
|
||||
/**
|
||||
* @deprecated use index
|
||||
*/
|
||||
storiesHash: API_IndexHash;
|
||||
/**
|
||||
* @deprecated use previewInitialized
|
||||
*/
|
||||
storiesConfigured: boolean;
|
||||
/**
|
||||
* @deprecated use indexError
|
||||
*/
|
||||
storiesFailed?: Error;
|
||||
}
|
||||
|
||||
@ -80,16 +93,17 @@ export interface SubAPI {
|
||||
getCurrentParameter<S>(parameterName?: ParameterName): S;
|
||||
updateStoryArgs(story: API_StoryEntry, newArgs: Args): void;
|
||||
resetStoryArgs: (story: API_StoryEntry, argNames?: string[]) => void;
|
||||
findLeafEntry(StoriesHash: API_StoriesHash, storyId: StoryId): API_LeafEntry;
|
||||
findLeafStoryId(StoriesHash: API_StoriesHash, storyId: StoryId): StoryId;
|
||||
findLeafEntry(index: API_IndexHash, storyId: StoryId): API_LeafEntry;
|
||||
findLeafStoryId(index: API_IndexHash, storyId: StoryId): StoryId;
|
||||
findSiblingStoryId(
|
||||
storyId: StoryId,
|
||||
hash: API_StoriesHash,
|
||||
index: API_IndexHash,
|
||||
direction: Direction,
|
||||
toSiblingGroup: boolean // when true, skip over leafs within the same group
|
||||
): StoryId;
|
||||
fetchIndex: () => Promise<void>;
|
||||
updateStory: (storyId: StoryId, update: StoryUpdate, ref?: API_ComposedRef) => Promise<void>;
|
||||
setPreviewInitialized: (ref?: ComposedRef) => Promise<void>;
|
||||
}
|
||||
|
||||
const removedOptions = ['enableShortcuts', 'theme', 'showRoots'];
|
||||
@ -132,11 +146,11 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
return data.type === 'story' ? data.prepared : true;
|
||||
},
|
||||
resolveStory: (storyId, refId) => {
|
||||
const { refs, storiesHash } = store.getState();
|
||||
const { refs, index } = store.getState();
|
||||
if (refId) {
|
||||
return refs[refId].stories ? refs[refId].stories[storyId] : undefined;
|
||||
return refs[refId].index ? refs[refId].index[storyId] : undefined;
|
||||
}
|
||||
return storiesHash ? storiesHash[storyId] : undefined;
|
||||
return index ? index[storyId] : undefined;
|
||||
},
|
||||
getCurrentStoryData: () => {
|
||||
const { storyId, refId } = store.getState();
|
||||
@ -168,7 +182,7 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
return parameters || undefined;
|
||||
},
|
||||
jumpToComponent: (direction) => {
|
||||
const { storiesHash, storyId, refs, refId } = store.getState();
|
||||
const { index, storyId, refs, refId } = store.getState();
|
||||
const story = api.getData(storyId, refId);
|
||||
|
||||
// cannot navigate when there's no current selection
|
||||
@ -176,7 +190,7 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
return;
|
||||
}
|
||||
|
||||
const hash = refId ? refs[refId].stories || {} : storiesHash;
|
||||
const hash = refId ? refs[refId].index || {} : index;
|
||||
const result = api.findSiblingStoryId(storyId, hash, direction, true);
|
||||
|
||||
if (result) {
|
||||
@ -184,7 +198,7 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
}
|
||||
},
|
||||
jumpToStory: (direction) => {
|
||||
const { storiesHash, storyId, refs, refId } = store.getState();
|
||||
const { index, storyId, refs, refId } = store.getState();
|
||||
const story = api.getData(storyId, refId);
|
||||
|
||||
// cannot navigate when there's no current selection
|
||||
@ -192,7 +206,7 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
return;
|
||||
}
|
||||
|
||||
const hash = story.refId ? refs[story.refId].stories : storiesHash;
|
||||
const hash = story.refId ? refs[story.refId].index : index;
|
||||
const result = api.findSiblingStoryId(storyId, hash, direction, false);
|
||||
|
||||
if (result) {
|
||||
@ -200,8 +214,8 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
}
|
||||
},
|
||||
selectFirstStory: () => {
|
||||
const { storiesHash } = store.getState();
|
||||
const firstStory = Object.keys(storiesHash).find((id) => storiesHash[id].type === 'story');
|
||||
const { index } = store.getState();
|
||||
const firstStory = Object.keys(index).find((id) => index[id].type === 'story');
|
||||
|
||||
if (firstStory) {
|
||||
api.selectStory(firstStory);
|
||||
@ -212,9 +226,9 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
},
|
||||
selectStory: (titleOrId = undefined, name = undefined, options = {}) => {
|
||||
const { ref } = options;
|
||||
const { storyId, storiesHash, refs } = store.getState();
|
||||
const { storyId, index, refs } = store.getState();
|
||||
|
||||
const hash = ref ? refs[ref].stories : storiesHash;
|
||||
const hash = ref ? refs[ref].index : index;
|
||||
|
||||
const kindSlug = storyId?.split('--', 2)[0];
|
||||
|
||||
@ -249,50 +263,50 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
}
|
||||
}
|
||||
},
|
||||
findLeafEntry(storiesHash, storyId) {
|
||||
const entry = storiesHash[storyId];
|
||||
findLeafEntry(index, storyId) {
|
||||
const entry = index[storyId];
|
||||
if (entry.type === 'docs' || entry.type === 'story') {
|
||||
return entry;
|
||||
}
|
||||
|
||||
const childStoryId = entry.children[0];
|
||||
return api.findLeafEntry(storiesHash, childStoryId);
|
||||
return api.findLeafEntry(index, childStoryId);
|
||||
},
|
||||
findLeafStoryId(storiesHash, storyId) {
|
||||
return api.findLeafEntry(storiesHash, storyId)?.id;
|
||||
findLeafStoryId(index, storyId) {
|
||||
return api.findLeafEntry(index, storyId)?.id;
|
||||
},
|
||||
findSiblingStoryId(storyId, hash, direction, toSiblingGroup) {
|
||||
findSiblingStoryId(storyId, index, direction, toSiblingGroup) {
|
||||
if (toSiblingGroup) {
|
||||
const lookupList = getComponentLookupList(hash);
|
||||
const index = lookupList.findIndex((i) => i.includes(storyId));
|
||||
const lookupList = getComponentLookupList(index);
|
||||
const position = lookupList.findIndex((i) => i.includes(storyId));
|
||||
|
||||
// cannot navigate beyond fist or last
|
||||
if (index === lookupList.length - 1 && direction > 0) {
|
||||
if (position === lookupList.length - 1 && direction > 0) {
|
||||
return;
|
||||
}
|
||||
if (index === 0 && direction < 0) {
|
||||
if (position === 0 && direction < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (lookupList[index + direction]) {
|
||||
if (lookupList[position + direction]) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return lookupList[index + direction][0];
|
||||
return lookupList[position + direction][0];
|
||||
}
|
||||
return;
|
||||
}
|
||||
const lookupList = getStoriesLookupList(hash);
|
||||
const index = lookupList.indexOf(storyId);
|
||||
const lookupList = getStoriesLookupList(index);
|
||||
const position = lookupList.indexOf(storyId);
|
||||
|
||||
// cannot navigate beyond fist or last
|
||||
if (index === lookupList.length - 1 && direction > 0) {
|
||||
if (position === lookupList.length - 1 && direction > 0) {
|
||||
return;
|
||||
}
|
||||
if (index === 0 && direction < 0) {
|
||||
if (position === 0 && direction < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return lookupList[index + direction];
|
||||
return lookupList[position + direction];
|
||||
},
|
||||
updateStoryArgs: (story, updatedArgs) => {
|
||||
const { id: storyId, refId } = story;
|
||||
@ -325,10 +339,7 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
|
||||
await fullAPI.setIndex(storyIndex);
|
||||
} catch (err) {
|
||||
store.setState({
|
||||
storiesConfigured: true,
|
||||
storiesFailed: err,
|
||||
});
|
||||
await store.setState({ indexError: err });
|
||||
}
|
||||
},
|
||||
// The story index we receive on SET_INDEX is "prepared" in that it has parameters
|
||||
@ -341,13 +352,9 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
});
|
||||
|
||||
// Now we need to patch in the existing prepared stories
|
||||
const oldHash = store.getState().storiesHash;
|
||||
const oldHash = store.getState().index;
|
||||
|
||||
await store.setState({
|
||||
storiesHash: addPreparedStories(newHash, oldHash),
|
||||
storiesConfigured: true,
|
||||
storiesFailed: null,
|
||||
});
|
||||
await store.setState({ index: addPreparedStories(newHash, oldHash) });
|
||||
},
|
||||
updateStory: async (
|
||||
storyId: StoryId,
|
||||
@ -355,19 +362,26 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
ref?: API_ComposedRef
|
||||
): Promise<void> => {
|
||||
if (!ref) {
|
||||
const { storiesHash } = store.getState();
|
||||
storiesHash[storyId] = {
|
||||
...storiesHash[storyId],
|
||||
const { index } = store.getState();
|
||||
index[storyId] = {
|
||||
...index[storyId],
|
||||
...update,
|
||||
} as API_StoryEntry;
|
||||
await store.setState({ storiesHash });
|
||||
await store.setState({ index });
|
||||
} else {
|
||||
const { id: refId, stories } = ref;
|
||||
stories[storyId] = {
|
||||
...stories[storyId],
|
||||
const { id: refId, index } = ref;
|
||||
index[storyId] = {
|
||||
...index[storyId],
|
||||
...update,
|
||||
} as API_StoryEntry;
|
||||
await fullAPI.updateRef(refId, { stories });
|
||||
await fullAPI.updateRef(refId, { index });
|
||||
}
|
||||
},
|
||||
setPreviewInitialized: async (ref?: ComposedRef): Promise<void> => {
|
||||
if (!ref) {
|
||||
store.setState({ previewInitialized: true });
|
||||
} else {
|
||||
fullAPI.updateRef(ref.id, { previewInitialized: true });
|
||||
}
|
||||
},
|
||||
};
|
||||
@ -387,9 +401,9 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
}) {
|
||||
const { sourceType } = getEventMetadata(this, fullAPI);
|
||||
|
||||
if (fullAPI.isSettingsScreenActive()) return;
|
||||
|
||||
if (sourceType === 'local') {
|
||||
if (fullAPI.isSettingsScreenActive()) return;
|
||||
|
||||
// Special case -- if we are already at the story being specified (i.e. the user started at a given story),
|
||||
// we don't need to change URL. See https://github.com/storybookjs/storybook/issues/11677
|
||||
const state = store.getState();
|
||||
@ -400,6 +414,15 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
}
|
||||
);
|
||||
|
||||
// The CURRENT_STORY_WAS_SET event is the best event to use to tell if a ref is ready.
|
||||
// Until the ref has a selection, it will not render anything (e.g. while waiting for
|
||||
// the preview.js file or the index to load). Once it has a selection, it will render its own
|
||||
// preparing spinner.
|
||||
fullAPI.on(CURRENT_STORY_WAS_SET, function handler() {
|
||||
const { ref } = getEventMetadata(this, fullAPI);
|
||||
fullAPI.setPreviewInitialized(ref);
|
||||
});
|
||||
|
||||
fullAPI.on(STORY_CHANGED, function handler() {
|
||||
const { sourceType } = getEventMetadata(this, fullAPI);
|
||||
|
||||
@ -422,18 +445,16 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
fullAPI.setOptions(removeRemovedOptions(options));
|
||||
store.setState({ hasCalledSetOptions: true });
|
||||
}
|
||||
} else {
|
||||
fullAPI.updateRef(ref.id, { ready: true });
|
||||
}
|
||||
|
||||
if (sourceType === 'local') {
|
||||
const { storyId, storiesHash, refId } = store.getState();
|
||||
const { storyId, index, refId } = store.getState();
|
||||
|
||||
// create a list of related stories to be preloaded
|
||||
const toBePreloaded = Array.from(
|
||||
new Set([
|
||||
api.findSiblingStoryId(storyId, storiesHash, 1, true),
|
||||
api.findSiblingStoryId(storyId, storiesHash, -1, true),
|
||||
api.findSiblingStoryId(storyId, index, 1, true),
|
||||
api.findSiblingStoryId(storyId, index, -1, true),
|
||||
])
|
||||
).filter(Boolean);
|
||||
|
||||
@ -499,11 +520,15 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
}
|
||||
);
|
||||
|
||||
// When there's a preview error, we don't show it in the manager, but simply
|
||||
fullAPI.on(CONFIG_ERROR, function handleConfigError(err) {
|
||||
store.setState({
|
||||
storiesConfigured: true,
|
||||
storiesFailed: err,
|
||||
});
|
||||
const { ref } = getEventMetadata(this, fullAPI);
|
||||
fullAPI.setPreviewInitialized(ref);
|
||||
});
|
||||
|
||||
fullAPI.on(STORY_MISSING, function handleConfigError(err) {
|
||||
const { ref } = getEventMetadata(this, fullAPI);
|
||||
fullAPI.setPreviewInitialized(ref);
|
||||
});
|
||||
|
||||
if (FEATURES?.storyStoreV7) {
|
||||
@ -515,11 +540,24 @@ export const init: ModuleFn<SubAPI, SubState, true> = ({
|
||||
return {
|
||||
api,
|
||||
state: {
|
||||
storiesHash: {},
|
||||
storyId: initialStoryId,
|
||||
viewMode: initialViewMode,
|
||||
storiesConfigured: false,
|
||||
hasCalledSetOptions: false,
|
||||
previewInitialized: false,
|
||||
|
||||
// deprecated fields for back-compat
|
||||
get storiesHash() {
|
||||
deprecate('state.storiesHash is deprecated, please use state.index');
|
||||
return this.index || {};
|
||||
},
|
||||
get storiesConfigured() {
|
||||
deprecate('state.storiesConfigured is deprecated, please use state.previewInitialized');
|
||||
return this.previewInitialized;
|
||||
},
|
||||
get storiesFailed() {
|
||||
deprecate('state.storiesFailed is deprecated, please use state.indexError');
|
||||
return this.indexError;
|
||||
},
|
||||
},
|
||||
init: initModule,
|
||||
};
|
||||
|
@ -252,7 +252,9 @@ describe('Refs API', () => {
|
||||
Object {
|
||||
"refs": Object {
|
||||
"fake": Object {
|
||||
"error": Object {
|
||||
"id": "fake",
|
||||
"index": undefined,
|
||||
"indexError": Object {
|
||||
"message": "Error: Loading of ref failed
|
||||
at fetch (lib/api/src/modules/refs.ts)
|
||||
|
||||
@ -263,9 +265,6 @@ describe('Refs API', () => {
|
||||
|
||||
Please check your dev-tools network tab.",
|
||||
},
|
||||
"id": "fake",
|
||||
"ready": false,
|
||||
"stories": undefined,
|
||||
"title": "Fake",
|
||||
"type": "auto-inject",
|
||||
"url": "https://example.com",
|
||||
@ -340,8 +339,7 @@ describe('Refs API', () => {
|
||||
"refs": Object {
|
||||
"fake": Object {
|
||||
"id": "fake",
|
||||
"ready": false,
|
||||
"stories": Object {},
|
||||
"index": Object {},
|
||||
"title": "Fake",
|
||||
"type": "lazy",
|
||||
"url": "https://example.com",
|
||||
@ -418,8 +416,7 @@ describe('Refs API', () => {
|
||||
"refs": Object {
|
||||
"fake": Object {
|
||||
"id": "fake",
|
||||
"ready": false,
|
||||
"stories": Object {},
|
||||
"index": Object {},
|
||||
"title": "Fake",
|
||||
"type": "lazy",
|
||||
"url": "https://example.com",
|
||||
@ -496,9 +493,8 @@ describe('Refs API', () => {
|
||||
"refs": Object {
|
||||
"fake": Object {
|
||||
"id": "fake",
|
||||
"index": undefined,
|
||||
"loginUrl": "https://example.com/login",
|
||||
"ready": false,
|
||||
"stories": undefined,
|
||||
"title": "Fake",
|
||||
"type": "auto-inject",
|
||||
"url": "https://example.com",
|
||||
@ -638,9 +634,8 @@ describe('Refs API', () => {
|
||||
"refs": Object {
|
||||
"fake": Object {
|
||||
"id": "fake",
|
||||
"index": undefined,
|
||||
"loginUrl": "https://example.com/login",
|
||||
"ready": false,
|
||||
"stories": undefined,
|
||||
"title": "Fake",
|
||||
"type": "auto-inject",
|
||||
"url": "https://example.com",
|
||||
@ -720,8 +715,7 @@ describe('Refs API', () => {
|
||||
"refs": Object {
|
||||
"fake": Object {
|
||||
"id": "fake",
|
||||
"ready": false,
|
||||
"stories": Object {},
|
||||
"index": Object {},
|
||||
"title": "Fake",
|
||||
"type": "lazy",
|
||||
"url": "https://example.com",
|
||||
@ -798,8 +792,7 @@ describe('Refs API', () => {
|
||||
"refs": Object {
|
||||
"fake": Object {
|
||||
"id": "fake",
|
||||
"ready": false,
|
||||
"stories": Object {},
|
||||
"index": Object {},
|
||||
"title": "Fake",
|
||||
"type": "lazy",
|
||||
"url": "https://example.com",
|
||||
@ -866,7 +859,7 @@ describe('Refs API', () => {
|
||||
});
|
||||
|
||||
const { refs } = store.setState.mock.calls[0][0];
|
||||
const hash = refs.fake.stories;
|
||||
const hash = refs.fake.index;
|
||||
|
||||
// We need exact key ordering, even if in theory JS doesn't guarantee it
|
||||
expect(Object.keys(hash)).toEqual([
|
||||
@ -922,7 +915,7 @@ describe('Refs API', () => {
|
||||
});
|
||||
|
||||
const { refs } = store.setState.mock.calls[0][0];
|
||||
const hash = refs.fake.stories;
|
||||
const hash = refs.fake.index;
|
||||
|
||||
// We need exact key ordering, even if in theory JS doesn't guarantee it
|
||||
expect(Object.keys(hash)).toEqual(['component-a', 'component-a--docs']);
|
||||
|
@ -43,16 +43,19 @@ describe('eventToShortcut', () => {
|
||||
expect(output).toEqual(['escape']);
|
||||
});
|
||||
test('it capitalizes a letter key through', () => {
|
||||
const output = eventToShortcut(ev({ key: 'a' }));
|
||||
const output = eventToShortcut(ev({ key: 'a', code: 'KeyA' }));
|
||||
expect(output).toEqual(['A']);
|
||||
});
|
||||
test('it passes regular key through', () => {
|
||||
const output = eventToShortcut(ev({ key: '1' }));
|
||||
const output = eventToShortcut(ev({ key: '1', code: 'Digit1' }));
|
||||
expect(output).toEqual(['1']);
|
||||
});
|
||||
test('it passes modified regular key through', () => {
|
||||
const output = eventToShortcut(ev({ altKey: true, key: '1' }));
|
||||
const output = eventToShortcut(ev({ altKey: true, key: '1', code: 'Digit1' }));
|
||||
expect(output).toEqual(['alt', '1']);
|
||||
// on macos
|
||||
const outputMacOs = eventToShortcut(ev({ altKey: true, key: '√', code: 'KeyV' }));
|
||||
expect(outputMacOs).toEqual(['alt', ['√', 'V']]);
|
||||
});
|
||||
});
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
export const version = '7.0.0-beta.29';
|
||||
export const version = '7.0.0-beta.30';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/node-logger",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -60,5 +60,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/postinstall",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Storybook addons postinstall utilities",
|
||||
"keywords": [
|
||||
"api",
|
||||
@ -57,5 +57,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preview-api",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -67,13 +67,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.29",
|
||||
"@storybook/channels": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.30",
|
||||
"@storybook/channels": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/types": "7.0.0-beta.29",
|
||||
"@storybook/types": "7.0.0-beta.30",
|
||||
"@types/qs": "^6.9.5",
|
||||
"dequal": "^2.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
@ -86,7 +86,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^26.6.2",
|
||||
"@storybook/core-common": "7.0.0-beta.29",
|
||||
"@storybook/core-common": "7.0.0-beta.30",
|
||||
"ansi-to-html": "^0.6.11",
|
||||
"react": "^16.14.0"
|
||||
},
|
||||
@ -103,5 +103,5 @@
|
||||
"./src/store.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ export class Preview<TFramework extends Renderer> {
|
||||
await Promise.all(this.storyRenders.filter((r) => r.id === storyId).map((r) => r.remount()));
|
||||
}
|
||||
|
||||
// Used by docs' modernInlineRender to render a story to a given element
|
||||
// Used by docs to render a story to a given element
|
||||
// Note this short-circuits the `prepare()` phase of the StoryRender,
|
||||
// main to be consistent with the previous behaviour. In the future,
|
||||
// we will change it to go ahead and load the story, which will end up being
|
||||
|
@ -277,7 +277,7 @@ export class PreviewWithSelection<TFramework extends Renderer> extends Preview<T
|
||||
if (entry.type === 'story') {
|
||||
this.view.showPreparingStory({ immediate: viewModeChanged });
|
||||
} else {
|
||||
this.view.showPreparingDocs();
|
||||
this.view.showPreparingDocs({ immediate: viewModeChanged });
|
||||
}
|
||||
|
||||
// If the last render is still preparing, let's drop it right now. Either
|
||||
|
@ -10,9 +10,9 @@ export interface View<TStorybookRoot> {
|
||||
|
||||
showNoPreview(): void;
|
||||
|
||||
showPreparingStory(options: { immediate: boolean }): void;
|
||||
showPreparingStory(options?: { immediate: boolean }): void;
|
||||
|
||||
showPreparingDocs(): void;
|
||||
showPreparingDocs(options?: { immediate: boolean }): void;
|
||||
|
||||
showMain(): void;
|
||||
|
||||
|
@ -165,9 +165,13 @@ export class WebView implements View<HTMLElement> {
|
||||
}
|
||||
}
|
||||
|
||||
showPreparingDocs() {
|
||||
showPreparingDocs({ immediate = false } = {}) {
|
||||
clearTimeout(this.preparingTimeout);
|
||||
this.preparingTimeout = setTimeout(() => this.showMode(Mode.PREPARING_DOCS), PREPARING_DELAY);
|
||||
if (immediate) {
|
||||
this.showMode(Mode.PREPARING_DOCS);
|
||||
} else {
|
||||
this.preparingTimeout = setTimeout(() => this.showMode(Mode.PREPARING_DOCS), PREPARING_DELAY);
|
||||
}
|
||||
}
|
||||
|
||||
showMain() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Channel } from '@storybook/channels';
|
||||
import type { Renderer } from '@storybook/types';
|
||||
import type { CSFFile, Renderer } from '@storybook/types';
|
||||
import type { StoryStore } from '../../store';
|
||||
|
||||
import { DocsContext } from './DocsContext';
|
||||
@ -8,6 +8,30 @@ import { csfFileParts } from './test-utils';
|
||||
const channel = new Channel();
|
||||
const renderStoryToElement = jest.fn();
|
||||
|
||||
describe('referenceCSFFile', () => {
|
||||
it('deals with unattached "docsOnly" csf files', () => {
|
||||
const unattachedCsfFile = {
|
||||
stories: {
|
||||
'meta--page': {
|
||||
id: 'meta--page',
|
||||
name: 'Page',
|
||||
parameters: { docsOnly: true },
|
||||
moduleExport: {},
|
||||
},
|
||||
},
|
||||
meta: { id: 'meta', title: 'Meta' },
|
||||
moduleExports: {},
|
||||
} as CSFFile;
|
||||
|
||||
const store = {
|
||||
componentStoriesFromCSFFile: () => [],
|
||||
} as unknown as StoryStore<Renderer>;
|
||||
const context = new DocsContext(channel, store, renderStoryToElement, [unattachedCsfFile]);
|
||||
|
||||
expect(() => context.storyById()).toThrow(/No primary story/);
|
||||
});
|
||||
});
|
||||
|
||||
describe('resolveModuleExport', () => {
|
||||
const { story, csfFile, storyExport, metaExport, moduleExports, component } = csfFileParts();
|
||||
|
||||
|
@ -58,11 +58,9 @@ export class DocsContext<TRenderer extends Renderer> implements DocsContextProps
|
||||
|
||||
const stories = this.store.componentStoriesFromCSFFile({ csfFile });
|
||||
|
||||
Object.values(csfFile.stories).forEach((annotation) => {
|
||||
stories.forEach((story) => {
|
||||
const annotation = csfFile.stories[story.id];
|
||||
this.storyIdToCSFFile.set(annotation.id, csfFile);
|
||||
const story = stories.find((s) => s.id === annotation.id);
|
||||
if (!story)
|
||||
throw new Error(`Unexpected missing story ${annotation.id} from referenced CSF file.`);
|
||||
this.exportToStory.set(annotation.moduleExport, story);
|
||||
});
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ export function csfFileParts() {
|
||||
const story = { id: 'meta--story', moduleExport: storyExport } as PreparedStory;
|
||||
const meta = { id: 'meta', title: 'Meta', component, moduleExports } as CSFFile['meta'];
|
||||
const csfFile = {
|
||||
stories: { story: storyAnnotations },
|
||||
stories: { 'meta--story': storyAnnotations },
|
||||
meta,
|
||||
moduleExports,
|
||||
} as CSFFile;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preview-web",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -42,8 +42,8 @@
|
||||
"prep": "../../../scripts/prepare/facade.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29"
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@ -54,5 +54,5 @@
|
||||
],
|
||||
"shim": "@storybook/preview-api/dist/preview-web"
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preview",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -57,12 +57,12 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.29",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.29",
|
||||
"@storybook/channels": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/core-events": "7.0.0-beta.29",
|
||||
"@storybook/preview-api": "7.0.0-beta.29",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.30",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.30",
|
||||
"@storybook/channels": "7.0.0-beta.30",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"@storybook/core-events": "7.0.0-beta.30",
|
||||
"@storybook/preview-api": "7.0.0-beta.30",
|
||||
"typescript": "~4.9.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
@ -74,5 +74,5 @@
|
||||
"./src/globals.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/router",
|
||||
"version": "7.0.0-beta.29",
|
||||
"version": "7.0.0-beta.30",
|
||||
"description": "Core Storybook Router",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -48,7 +48,7 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.29",
|
||||
"@storybook/client-logger": "7.0.0-beta.30",
|
||||
"memoizerific": "^1.11.3",
|
||||
"qs": "^6.10.0"
|
||||
},
|
||||
@ -74,5 +74,5 @@
|
||||
"./src/utils.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
|
||||
"gitHead": "633f95bec79fb65524a7bcae867448b351920831"
|
||||
}
|
||||
|
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