mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
Merge remote-tracking branch 'origin/next' into tom/sb-1079-fix-devbuild-event-firing-too-early-and
This commit is contained in:
commit
18561563a7
@ -3,9 +3,9 @@ import { execSync } from 'child_process';
|
||||
|
||||
execSync('npm install lodash');
|
||||
|
||||
const flatten = require('lodash/flatten');
|
||||
const intersection = require('lodash/intersection');
|
||||
const isEmpty = require('lodash/isEmpty');
|
||||
const flatten = require('lodash/flatten.js');
|
||||
const intersection = require('lodash/intersection.js');
|
||||
const isEmpty = require('lodash/isEmpty.js');
|
||||
|
||||
const pkg = require('../../code/package.json'); // eslint-disable-line import/newline-after-import
|
||||
const prLogConfig = pkg['pr-log'];
|
||||
|
@ -91,12 +91,21 @@ jobs:
|
||||
- restore_cache:
|
||||
name: Restore Yarn cache
|
||||
keys:
|
||||
- build-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
|
||||
- prettydocs-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
|
||||
- run:
|
||||
name: Install
|
||||
command: |
|
||||
cd scripts
|
||||
yarn install
|
||||
- save_cache:
|
||||
name: Save Yarn cache
|
||||
key: prettydocs-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
|
||||
paths:
|
||||
- ~/.yarn/berry/cache
|
||||
- run:
|
||||
name: Prettier
|
||||
command: |
|
||||
cd scripts
|
||||
yarn
|
||||
yarn docs:prettier:check
|
||||
build:
|
||||
executor:
|
||||
@ -637,3 +646,5 @@ workflows:
|
||||
parallelism: 26
|
||||
requires:
|
||||
- build-sandboxes
|
||||
|
||||
# VS Code Extension Version: 1.5.0
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ node_modules
|
||||
.idea
|
||||
*.iml
|
||||
*.sw*
|
||||
!.swcrc
|
||||
dist
|
||||
*.DS_Store
|
||||
.cache
|
||||
|
103
CHANGELOG.md
103
CHANGELOG.md
@ -1,3 +1,106 @@
|
||||
## 7.0.0-beta.19 (January 1, 2023)
|
||||
|
||||
#### Features
|
||||
|
||||
- NextJS: Add next/head support [#20436](https://github.com/storybooks/storybook/pull/20436)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- CLI: Do not use legacy-peer-deps for npm [#20456](https://github.com/storybooks/storybook/pull/20456)
|
||||
- CLI: Use closest lockfile to determine package manager [#20464](https://github.com/storybooks/storybook/pull/20464)
|
||||
- CLI: Use correct package manager for automigrate [#20428](https://github.com/storybooks/storybook/pull/20428)
|
||||
- CLI: Add prop-types dependency if not using TypeScript [#20449](https://github.com/storybooks/storybook/pull/20449)
|
||||
- CLI: Add peer dependency on react [#20459](https://github.com/storybooks/storybook/pull/20459)
|
||||
|
||||
#### Maintenance
|
||||
|
||||
- Vue3: Add TS / legacy TS CLI templates [#20434](https://github.com/storybooks/storybook/pull/20434)
|
||||
- Core: Delete outdated onerror handler [#20462](https://github.com/storybooks/storybook/pull/20462)
|
||||
|
||||
#### Build
|
||||
|
||||
- Build: Add extensions to lodash imports [#20443](https://github.com/storybooks/storybook/pull/20443)
|
||||
|
||||
## 7.0.0-beta.18 (January 1, 2023)
|
||||
|
||||
Bad npm publish
|
||||
|
||||
## 7.0.0-beta.17 (December 30, 2022)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- Svelte: Do not warn about .svelte files in storyStoreV7 [#20442](https://github.com/storybooks/storybook/pull/20442)
|
||||
- Core: Fix import paths on Windows [#20430](https://github.com/storybooks/storybook/pull/20430)
|
||||
- UI: Set min-height relative to the viewport and the zoom level. [#20352](https://github.com/storybooks/storybook/pull/20352)
|
||||
|
||||
#### Maintenance
|
||||
|
||||
- Docs: Use `stories-mdx` and `autodocs` tags instead of `standalone: false` in index [#20424](https://github.com/storybooks/storybook/pull/20424)
|
||||
- Docs: Use `'stories-mdx'` tag to indicate story defined in MDX file [#20417](https://github.com/storybooks/storybook/pull/20417)
|
||||
- Preact-Vite: Minor readme and dependency cleanups [#20432](https://github.com/storybooks/storybook/pull/20432)
|
||||
|
||||
#### Build
|
||||
|
||||
- Tech: ESLint allow devDependencies imports in prebundled packages [#20440](https://github.com/storybooks/storybook/pull/20440)
|
||||
- Fix yarn task command on Windows machines [#20431](https://github.com/storybooks/storybook/pull/20431)
|
||||
|
||||
## 7.0.0-beta.16 (December 29, 2022)
|
||||
|
||||
#### Features
|
||||
|
||||
- Preact-Vite: Add framework [#20390](https://github.com/storybooks/storybook/pull/20390)
|
||||
|
||||
#### Maintenance
|
||||
|
||||
- NextJS: Fix unnecessary addon-actions dev dep [#20426](https://github.com/storybooks/storybook/pull/20426)
|
||||
|
||||
## 7.0.0-beta.15 (December 24, 2022)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- Codemods: Fix peer dependency issue [#20399](https://github.com/storybooks/storybook/pull/20399)
|
||||
- Core: Wrap manager entries to handle exports using a cache directory [#20331](https://github.com/storybooks/storybook/pull/20331)
|
||||
- UI: fix deprecated ReactDOM.findDOMNode calls [#20368](https://github.com/storybooks/storybook/pull/20368)
|
||||
|
||||
#### Maintenance
|
||||
|
||||
- Build: Use tsup for core-server [#20134](https://github.com/storybooks/storybook/pull/20134)
|
||||
|
||||
#### Build
|
||||
|
||||
- Build: Make tests use SWC, not babel [#20397](https://github.com/storybooks/storybook/pull/20397)
|
||||
- Build: Fix trim vulnerability [#20371](https://github.com/storybooks/storybook/pull/20371)
|
||||
|
||||
## 7.0.0-beta.14 (December 23, 2022)
|
||||
|
||||
#### Features
|
||||
|
||||
- CLI: Write into a log file if automigrations fail [#20310](https://github.com/storybooks/storybook/pull/20310)
|
||||
- CLI: Add nodejs check in automigrations [#20342](https://github.com/storybooks/storybook/pull/20342)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- UI: Disable React.strictmode to avoid findNode deprecation warnings [#20345](https://github.com/storybooks/storybook/pull/20345)
|
||||
- Vite: Fix peerDep warning by updating `@joshwooding/vite-plugin-react-docgen-typescript` [#20359](https://github.com/storybooks/storybook/pull/20359)
|
||||
|
||||
#### Maintenance
|
||||
|
||||
- Don't allow setting `Meta of={X}` if `X` is tagged with `'autodocs'` [#20373](https://github.com/storybooks/storybook/pull/20373)
|
||||
- Rename `docsPage` => `autodocs` [#20364](https://github.com/storybooks/storybook/pull/20364)
|
||||
- Rename `docsOptions.enabled` to `docsOptions.disable` [#20363](https://github.com/storybooks/storybook/pull/20363)
|
||||
- Angular: Switch to default to inlineStories=true [#20118](https://github.com/storybooks/storybook/pull/20118)
|
||||
- Types: Add Addon_OptionsParameterV7 type [#20384](https://github.com/storybooks/storybook/pull/20384)
|
||||
|
||||
#### Build
|
||||
|
||||
- Build: regen lockfiles [#20386](https://github.com/storybooks/storybook/pull/20386)
|
||||
- Build: fix prettydocs CI flakyness [#20385](https://github.com/storybooks/storybook/pull/20385)
|
||||
- Build: Update Playwright to 1.29.1 [#20372](https://github.com/storybooks/storybook/pull/20372)
|
||||
- Build: store extra metadata for each sandbox test [#20365](https://github.com/storybooks/storybook/pull/20365)
|
||||
- Build: Remove the non-cross-platform dash-S option [#20360](https://github.com/storybooks/storybook/pull/20360)
|
||||
- Build: sync issues of `next` packages [#20354](https://github.com/storybooks/storybook/pull/20354)
|
||||
|
||||
|
||||
## 6.5.15 (December 20, 2022)
|
||||
|
||||
#### Bug Fixes
|
||||
|
51
MIGRATION.md
51
MIGRATION.md
@ -3,6 +3,7 @@
|
||||
- [From version 6.5.x to 7.0.0](#from-version-65x-to-700)
|
||||
- [Alpha release notes](#alpha-release-notes)
|
||||
- [7.0 breaking changes](#70-breaking-changes)
|
||||
- [Titles are statically computed](#titles-are-statically-computed)
|
||||
- [Removed global client APIs](#removed-global-client-apis)
|
||||
- [Dropped support for Node 15 and below](#dropped-support-for-node-15-and-below)
|
||||
- [React peer dependencies required](#react-peer-dependencies-required)
|
||||
@ -268,6 +269,47 @@ In the meantime, these migration notes are the best available documentation on t
|
||||
|
||||
### 7.0 breaking changes
|
||||
|
||||
#### Titles are statically computed
|
||||
|
||||
Up until version 7.0, it was possible to generate the default export of a CSF story by calling a function, or mixing in variables defined in other ES Modules. For instance:
|
||||
|
||||
```js
|
||||
// Dynamically computed local title
|
||||
const categories = {
|
||||
atoms: 'Atoms',
|
||||
molecules: 'Molecules',
|
||||
// etc.
|
||||
}
|
||||
|
||||
export default {
|
||||
title: `${categories.atoms}/MyComponent`
|
||||
}
|
||||
|
||||
// Title returned by a function
|
||||
import { genDefault } from '../utils/storybook'
|
||||
|
||||
export default genDefault({
|
||||
category: 'Atoms',
|
||||
title: 'MyComponent',
|
||||
})
|
||||
```
|
||||
|
||||
This is no longer possible in Storybook 7.0, as story titles are parsed at build time. In earlier versions, titles were mostly produced manually. Now that [CSF3 auto-title](#csf3-auto-title-improvements) is available, optimisations were made that constrain how `id` and `title` can be defined manually.
|
||||
|
||||
As a result, titles cannot depend on variables or functions, and cannot be dynamically computed (even with local variables). Stories must have a static `title` property, or a static `component` property used by the [CSF3 auto-title](#csf3-auto-title-improvements) feature to compute a title.
|
||||
|
||||
Likewise, the `id` property must be statically defined. The URL defined for a story in the sidebar will be statically computed, so if you dynamically add an `id` through a function call like above, the story URL will not match the one in the sidebar and the story will be unreachable.
|
||||
|
||||
To opt-out of the old behavior you can set the `storyStoreV7` feature flag to `false` in `main.js`. However, a variety of performance optimizations depend on the new behavior, and the old behavior is deprecated and will be removed from Storybook in 8.0.
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
features: {
|
||||
storyStoreV7: false,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Removed global client APIs
|
||||
|
||||
The `addParameters` and `addDecorator` APIs to add global decorators and parameters, exported by the various frameworks (e.g. `@storybook/react`) and `@storybook/client` were deprecated in 6.0 and have been removed in 7.0.
|
||||
@ -1588,7 +1630,7 @@ export const MyStory = () => ({ component: MyComponent, ... })
|
||||
|
||||
#### Deprecated --static-dir CLI flag
|
||||
|
||||
In 6.4 we've replaced the `--static-dir` CLI flag with the the `staticDirs` field in `.storybook/main.js`. Note that the CLI directories are relative to the current working directory, whereas the `staticDirs` are relative to the location of `main.js`.
|
||||
In 6.4 we've replaced the `--static-dir` CLI flag with the `staticDirs` field in `.storybook/main.js`. Note that the CLI directories are relative to the current working directory, whereas the `staticDirs` are relative to the location of `main.js`.
|
||||
|
||||
Before:
|
||||
|
||||
@ -2078,7 +2120,7 @@ Basic.parameters = { ... };
|
||||
Basic.decorators = [ ... ];
|
||||
```
|
||||
|
||||
1. The new syntax is slightly more compact/ergonomic compared the the old one
|
||||
1. The new syntax is slightly more compact/ergonomic compared the old one
|
||||
2. Similar to React's `displayName`, `propTypes`, `defaultProps` annotations
|
||||
3. We're introducing a new feature, [Storybook Args](https://docs.google.com/document/d/1Mhp1UFRCKCsN8pjlfPdz8ZdisgjNXeMXpXvGoALjxYM/edit?usp=sharing), where the new syntax will be significantly more ergonomic
|
||||
|
||||
@ -2284,7 +2326,7 @@ module.exports = {
|
||||
};
|
||||
```
|
||||
|
||||
In earlier versions of Storybook, this would automatically call `@storybook/addon-knobs/register`, which adds the the knobs panel to the Storybook UI. As a user you would also add a decorator:
|
||||
In earlier versions of Storybook, this would automatically call `@storybook/addon-knobs/register`, which adds the knobs panel to the Storybook UI. As a user you would also add a decorator:
|
||||
|
||||
```js
|
||||
import { withKnobs } from '../index';
|
||||
@ -3769,6 +3811,3 @@ If you **are** using these addons, it takes two steps to migrate:
|
||||
|
||||
<!-- markdown-link-check-enable -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
22
README.md
22
README.md
@ -77,7 +77,7 @@ Visit [Storybook's website](https://storybook.js.org) to learn more about Storyb
|
||||
|
||||
### Documentation
|
||||
|
||||
Documentation can be found [Storybook's docs site](https://storybook.js.org/docs).
|
||||
Documentation can be found on [Storybook's docs site](https://storybook.js.org/docs).
|
||||
|
||||
### Examples
|
||||
|
||||
@ -120,8 +120,8 @@ For additional help, join us in the [Storybook Discord](https://discord.gg/story
|
||||
| [a11y](code/addons/a11y/) | Test components for user accessibility in Storybook |
|
||||
| [actions](code/addons/actions/) | Log actions as users interact with components in the Storybook UI |
|
||||
| [backgrounds](code/addons/backgrounds/) | Let users choose backgrounds in the Storybook UI |
|
||||
| [cssresources](https://github.com/storybookjs/addon-cssresources) | Dynamically add/remove css resources to the component iframe |
|
||||
| [design assets](https://github.com/storybookjs/addon-design-assets) | View images, videos, weblinks alongside your story |
|
||||
| [cssresources](https://github.com/storybookjs/addon-cssresources) | Dynamically add/remove CSS resources to the component iframe |
|
||||
| [design assets](https://github.com/storybookjs/addon-design-assets) | View images, videos, and weblinks alongside your story |
|
||||
| [docs](code/addons/docs/) | Add high quality documentation to your components |
|
||||
| [events](https://github.com/storybookjs/addon-events) | Interactively fire events to components that respond to EventEmitter |
|
||||
| [google-analytics](https://github.com/storybookjs/addon-google-analytics) | Reports google analytics on stories |
|
||||
@ -147,11 +147,11 @@ See [Addon / Framework Support Table](https://storybook.js.org/docs/react/api/fr
|
||||
| [notes](https://github.com/storybookjs/deprecated-addons/tree/master/addons/notes) | Annotate Storybook stories with notes |
|
||||
| [options](https://www.npmjs.com/package/@storybook/addon-options) | Customize the Storybook UI in code |
|
||||
|
||||
In order to continue improving your experience, we have to eventually deprecate certain addons in favor of new, better tools.
|
||||
To continue improving your experience, we have to eventually deprecate certain addons in favor of new and better tools.
|
||||
|
||||
If you're using info/notes, we highly recommend you to migrate to [docs](code/addons/docs/) instead, and [here is a guide](code/addons/docs/docs/recipes.md#migrating-from-notesinfo-addons) to help you.
|
||||
If you're using info/notes, we highly recommend you migrate to [docs](code/addons/docs/) instead, and [here is a guide](code/addons/docs/docs/recipes.md#migrating-from-notesinfo-addons) to help you.
|
||||
|
||||
If you're using contexts, we highly recommend you to migrate to [toolbars](https://github.com/storybookjs/storybook/tree/next/code/addons/toolbars) and [here is a guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-addon-contexts) to help you.
|
||||
If you're using contexts, we highly recommend you migrate to [toolbars](https://github.com/storybookjs/storybook/tree/next/code/addons/toolbars) and [here is a guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-addon-contexts) to help you.
|
||||
|
||||
## Badges & Presentation materials
|
||||
|
||||
@ -163,7 +163,7 @@ We have a badge! Link it to your live Storybook example.
|
||||
[](link to site)
|
||||
```
|
||||
|
||||
If you're looking for material to use in your presentation about storybook, like logo's video material and the colors we use etc, you can find all of that at our [brand repo](https://github.com/storybookjs/brand).
|
||||
If you're looking for material to use in your Storybook presentation, such as logos, video material, and the colors we use, you can find it all on our [brand repo](https://github.com/storybookjs/brand).
|
||||
|
||||
## Community
|
||||
|
||||
@ -174,7 +174,7 @@ If you're looking for material to use in your presentation about storybook, like
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome contributions to Storybook!
|
||||
Contributions to Storybook are always welcome!
|
||||
|
||||
- 📥 Pull requests and 🌟 Stars are always welcome.
|
||||
- Read our [contributing guide](CONTRIBUTING.md) to get started,
|
||||
@ -183,7 +183,7 @@ We welcome contributions to Storybook!
|
||||
Looking for a first issue to tackle?
|
||||
|
||||
- We tag issues with [](https://github.com/storybookjs/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) when we think they are well suited for people who are new to the codebase or OSS in general.
|
||||
- [Talk to us](https://discord.gg/storybook), we'll find something to suits your skills and learning interest.
|
||||
- [Talk to us](https://discord.gg/storybook), we'll find something that suits your skills and learning interest.
|
||||
|
||||
### Development scripts
|
||||
|
||||
@ -213,7 +213,7 @@ Storybook is organized as a monorepo using [Lerna](https://lerna.js.org/). Usefu
|
||||
|
||||
### Sponsors
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. \[[Become a sponsor](https://opencollective.com/storybook#sponsor)]
|
||||
Become a sponsor to have your logo and website URL on our README on Github. \[[Become a sponsor](https://opencollective.com/storybook#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/storybook/sponsor/0/website" target="_blank"><img src="https://opencollective.com/storybook/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/storybook/sponsor/1/website" target="_blank"><img src="https://opencollective.com/storybook/sponsor/1/avatar.svg"></a>
|
||||
@ -248,7 +248,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
|
||||
|
||||
### Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. \[[Become a backer](https://opencollective.com/storybook#backer)]
|
||||
By making a recurring donation, you can support us and our work. \[[Become a backer](https://opencollective.com/storybook#backer)]
|
||||
|
||||
<a href="https://opencollective.com/storybook/backer/0/website" target="_blank"><img src="https://opencollective.com/storybook/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/storybook/backer/1/website" target="_blank"><img src="https://opencollective.com/storybook/backer/1/avatar.svg"></a>
|
||||
|
@ -11,7 +11,9 @@ module.exports = {
|
||||
},
|
||||
rules: {
|
||||
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
|
||||
'eslint-comments/no-unused-disable': 'error',
|
||||
'react-hooks/rules-of-hooks': 'off',
|
||||
'import/extensions': 'off', // for mjs, we sometimes need extensions
|
||||
'jest/no-done-callback': 'off',
|
||||
'@typescript-eslint/dot-notation': [
|
||||
'error',
|
||||
@ -66,15 +68,14 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
{
|
||||
// this package uses pre-bundling, dependencies will be bundled, and will be in devDepenencies
|
||||
files: [
|
||||
'**/lib/theming/**/*',
|
||||
'**/lib/router/**/*',
|
||||
'**/ui/manager/**/*',
|
||||
'**/ui/components/**/*',
|
||||
],
|
||||
// these packages use pre-bundling, dependencies will be bundled, and will be in devDepenencies
|
||||
files: ['addons/**/*', 'frameworks/**/*', 'lib/**/*', 'renderers/**/*', 'ui/**/*'],
|
||||
excludedFiles: ['frameworks/angular/**/*', 'frameworks/ember/**/*', 'lib/core-server/**/*'],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': ['error', { bundledDependencies: false }],
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
{ bundledDependencies: false, devDependencies: true },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
1
code/.gitignore
vendored
1
code/.gitignore
vendored
@ -3,6 +3,7 @@ node_modules
|
||||
.idea
|
||||
*.iml
|
||||
*.sw*
|
||||
!.swcrc
|
||||
npm-shrinkwrap.json
|
||||
dist
|
||||
.tern-port
|
||||
|
24
code/.swcrc
Normal file
24
code/.swcrc
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/swcrc",
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"tsx": true
|
||||
},
|
||||
"transform": {
|
||||
"react": {
|
||||
"runtime": "classic",
|
||||
"pragma": "React.createElement",
|
||||
"pragmaFrag": "React.Fragment",
|
||||
"throwIfNamespace": false,
|
||||
"development": false
|
||||
}
|
||||
},
|
||||
"target": "es2020",
|
||||
"loose": false,
|
||||
"externalHelpers": false,
|
||||
// Requires v1.2.50 or upper and requires target to be es2016 or upper.
|
||||
"keepClassNames": false
|
||||
},
|
||||
"minify": false
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-a11y",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Test component compliance with web accessibility standards",
|
||||
"keywords": [
|
||||
"a11y",
|
||||
@ -27,6 +27,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -62,16 +63,16 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-highlight": "7.0.0-beta.13",
|
||||
"@storybook/channels": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/addon-highlight": "7.0.0-beta.19",
|
||||
"@storybook/channels": "7.0.0-beta.19",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"axe-core": "^4.2.0",
|
||||
"lodash": "^4.17.21",
|
||||
"react-resize-detector": "^7.1.2"
|
||||
@ -103,7 +104,7 @@
|
||||
"./src/preview.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Accessibility",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991665-47042f80-3c7c-11eb-8f00-64b5a18f498a.png",
|
||||
|
@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { styled } from '@storybook/theming';
|
||||
import { Badge } from '@storybook/components';
|
||||
import type { CheckResult } from 'axe-core';
|
||||
import ReactResizeDetector from 'react-resize-detector';
|
||||
import { useResizeDetector } from 'react-resize-detector';
|
||||
|
||||
const List = styled.div({
|
||||
display: 'flex',
|
||||
@ -53,6 +53,11 @@ const formatSeverityText = (severity: string) => {
|
||||
};
|
||||
|
||||
const Rule: FC<RuleProps> = ({ rule }) => {
|
||||
const { ref, width } = useResizeDetector({
|
||||
refreshMode: 'debounce',
|
||||
handleHeight: false,
|
||||
handleWidth: true,
|
||||
});
|
||||
let badgeType: any = null;
|
||||
switch (rule.impact) {
|
||||
case ImpactValue.CRITICAL:
|
||||
@ -71,14 +76,10 @@ const Rule: FC<RuleProps> = ({ rule }) => {
|
||||
break;
|
||||
}
|
||||
return (
|
||||
<ReactResizeDetector handleWidth handleHeight refreshMode="debounce">
|
||||
{(size) => (
|
||||
<Item elementWidth={size.width || 0}>
|
||||
<StyledBadge status={badgeType}>{formatSeverityText(rule.impact)}</StyledBadge>
|
||||
<Message>{rule.message}</Message>
|
||||
</Item>
|
||||
)}
|
||||
</ReactResizeDetector>
|
||||
<Item ref={ref} elementWidth={width || 0}>
|
||||
<StyledBadge status={badgeType}>{formatSeverityText(rule.impact)}</StyledBadge>
|
||||
<Message>{rule.message}</Message>
|
||||
</Item>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
||||
|
||||
import { styled } from '@storybook/theming';
|
||||
import type { NodeResult, Result } from 'axe-core';
|
||||
import ReactResizeDetector from 'react-resize-detector';
|
||||
import { useResizeDetector } from 'react-resize-detector';
|
||||
import HighlightToggle from './Report/HighlightToggle';
|
||||
|
||||
import type { RuleType } from './A11YPanel';
|
||||
@ -99,6 +99,11 @@ function retrieveAllNodesFromResults(items: Result[]): NodeResult[] {
|
||||
}
|
||||
|
||||
export const Tabs: React.FC<TabsProps> = ({ tabs }) => {
|
||||
const { ref, width } = useResizeDetector({
|
||||
refreshMode: 'debounce',
|
||||
handleHeight: false,
|
||||
handleWidth: true,
|
||||
});
|
||||
const { tab: activeTab, setTab } = useA11yContext();
|
||||
|
||||
const handleToggle = React.useCallback(
|
||||
@ -111,38 +116,32 @@ export const Tabs: React.FC<TabsProps> = ({ tabs }) => {
|
||||
const highlightToggleId = `${tabs[activeTab].type}-global-checkbox`;
|
||||
const highlightLabel = `Highlight results`;
|
||||
return (
|
||||
<ReactResizeDetector handleWidth handleHeight refreshMode="debounce">
|
||||
{(size) => (
|
||||
<Container>
|
||||
<List>
|
||||
<TabsWrapper>
|
||||
{tabs.map((tab, index) => (
|
||||
<Item
|
||||
/* eslint-disable-next-line react/no-array-index-key */
|
||||
key={index}
|
||||
data-index={index}
|
||||
active={activeTab === index}
|
||||
onClick={handleToggle}
|
||||
>
|
||||
{tab.label}
|
||||
</Item>
|
||||
))}
|
||||
</TabsWrapper>
|
||||
</List>
|
||||
{tabs[activeTab].items.length > 0 ? (
|
||||
<GlobalToggle elementWidth={size.width || 0}>
|
||||
<HighlightToggleLabel htmlFor={highlightToggleId}>
|
||||
{highlightLabel}
|
||||
</HighlightToggleLabel>
|
||||
<HighlightToggle
|
||||
toggleId={highlightToggleId}
|
||||
elementsToHighlight={retrieveAllNodesFromResults(tabs[activeTab].items)}
|
||||
/>
|
||||
</GlobalToggle>
|
||||
) : null}
|
||||
{tabs[activeTab].panel}
|
||||
</Container>
|
||||
)}
|
||||
</ReactResizeDetector>
|
||||
<Container ref={ref}>
|
||||
<List>
|
||||
<TabsWrapper>
|
||||
{tabs.map((tab, index) => (
|
||||
<Item
|
||||
/* eslint-disable-next-line react/no-array-index-key */
|
||||
key={index}
|
||||
data-index={index}
|
||||
active={activeTab === index}
|
||||
onClick={handleToggle}
|
||||
>
|
||||
{tab.label}
|
||||
</Item>
|
||||
))}
|
||||
</TabsWrapper>
|
||||
</List>
|
||||
{tabs[activeTab].items.length > 0 ? (
|
||||
<GlobalToggle elementWidth={width || 0}>
|
||||
<HighlightToggleLabel htmlFor={highlightToggleId}>{highlightLabel}</HighlightToggleLabel>
|
||||
<HighlightToggle
|
||||
toggleId={highlightToggleId}
|
||||
elementsToHighlight={retrieveAllNodesFromResults(tabs[activeTab].items)}
|
||||
/>
|
||||
</GlobalToggle>
|
||||
) : null}
|
||||
{tabs[activeTab].panel}
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-actions",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Get UI feedback when an action is performed on an interactive element",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -23,6 +23,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -76,14 +77,14 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"dequal": "^2.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"polished": "^4.2.2",
|
||||
@ -120,7 +121,7 @@
|
||||
"./src/preview.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Actions",
|
||||
"unsupportedFrameworks": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-backgrounds",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Switch backgrounds to view components in different settings",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -27,6 +27,7 @@
|
||||
"author": "jbaxleyiii",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -75,14 +76,14 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"memoizerific": "^1.11.3",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
@ -111,7 +112,7 @@
|
||||
"./src/preview.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"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.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Interact with component inputs dynamically in the Storybook UI",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -27,6 +27,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -67,15 +68,15 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/blocks": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/blocks": "7.0.0-beta.19",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.8",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"lodash": "^4.17.21",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
@ -101,7 +102,7 @@
|
||||
],
|
||||
"platform": "browser"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Controls",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png",
|
||||
|
@ -207,7 +207,7 @@ And for `MDX` you can modify it as an attribute on the `Story` element:
|
||||
|
||||
## Inline Stories
|
||||
|
||||
Storybook Docs renders all Angular stories inline by default.
|
||||
Storybook Docs renders all Angular stories inline by default.
|
||||
|
||||
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter.
|
||||
|
||||
|
@ -125,7 +125,7 @@ Storybook Docs renders all Ember stories inside `iframe`s, with a default height
|
||||
To update the global default, modify `.storybook/preview.js`:
|
||||
|
||||
```ts
|
||||
export const parameters = { docs: { iframeHeight: 400 } };
|
||||
export const parameters = { docs: { iframeHeight: 400 } };
|
||||
```
|
||||
|
||||
For `DocsPage`, you need to update the parameter locally in a story:
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-docs",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Document component usage and properties in Markdown",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -92,8 +92,7 @@
|
||||
"lit/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts",
|
||||
"!__testfixtures__"
|
||||
"*.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
|
||||
@ -104,17 +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.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/csf-plugin": "7.0.0-beta.13",
|
||||
"@storybook/csf-tools": "7.0.0-beta.13",
|
||||
"@storybook/blocks": "7.0.0-beta.19",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/csf-plugin": "7.0.0-beta.19",
|
||||
"@storybook/csf-tools": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/mdx2-csf": "next",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/postinstall": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/postinstall": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"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": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Docs",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",
|
||||
|
@ -98,7 +98,6 @@ Some **markdown** description, or whatever you want.
|
||||
|
||||
## Inline stories
|
||||
|
||||
|
||||
Storybook Docs renders all React stories inline by default.
|
||||
|
||||
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter.
|
||||
|
@ -140,7 +140,7 @@ However, you can render stories in an iframe, with a default height of `60px` (c
|
||||
To do so for all stories, update `.storybook/preview.js`:
|
||||
|
||||
```js
|
||||
export const parameters = { docs: { inlineStories: false, }, };
|
||||
export const parameters = { docs: { inlineStories: false } };
|
||||
```
|
||||
|
||||
## More resources
|
||||
|
@ -112,7 +112,6 @@ For a full example see the [web-components-kitchen-sink/custom-elements.json](..
|
||||
|
||||
## Stories not inline
|
||||
|
||||
|
||||
Storybook Docs renders all web components stories inline by default.
|
||||
|
||||
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-essentials",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Curated addons to bring out the best of Storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -23,6 +23,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -109,30 +110,32 @@
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"README.md"
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-actions": "7.0.0-beta.13",
|
||||
"@storybook/addon-backgrounds": "7.0.0-beta.13",
|
||||
"@storybook/addon-controls": "7.0.0-beta.13",
|
||||
"@storybook/addon-docs": "7.0.0-beta.13",
|
||||
"@storybook/addon-highlight": "7.0.0-beta.13",
|
||||
"@storybook/addon-measure": "7.0.0-beta.13",
|
||||
"@storybook/addon-outline": "7.0.0-beta.13",
|
||||
"@storybook/addon-toolbars": "7.0.0-beta.13",
|
||||
"@storybook/addon-viewport": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/addon-actions": "7.0.0-beta.19",
|
||||
"@storybook/addon-backgrounds": "7.0.0-beta.19",
|
||||
"@storybook/addon-controls": "7.0.0-beta.19",
|
||||
"@storybook/addon-docs": "7.0.0-beta.19",
|
||||
"@storybook/addon-highlight": "7.0.0-beta.19",
|
||||
"@storybook/addon-measure": "7.0.0-beta.19",
|
||||
"@storybook/addon-outline": "7.0.0-beta.19",
|
||||
"@storybook/addon-toolbars": "7.0.0-beta.19",
|
||||
"@storybook/addon-viewport": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/vue": "7.0.0-beta.13",
|
||||
"@storybook/vue": "7.0.0-beta.19",
|
||||
"typescript": "^4.9.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@ -163,5 +166,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-highlight",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Highlight DOM nodes within your stories",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -25,6 +25,7 @@
|
||||
"author": "winkerVSbecks",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -60,9 +61,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/preview-api": "7.0.0-beta.13"
|
||||
"@storybook/preview-api": "7.0.0-beta.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
@ -77,7 +78,7 @@
|
||||
"./src/preview.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"sbmodern": "dist/modern/index.js",
|
||||
"storybook": {
|
||||
"displayName": "Highlight",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-interactions",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Automate, test and debug user interactions",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -23,6 +23,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -71,16 +72,16 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/instrumenter": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/instrumenter": "7.0.0-beta.19",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"jest-mock": "^27.0.6",
|
||||
"polished": "^4.2.2",
|
||||
"ts-dedent": "^2.2.0"
|
||||
@ -117,7 +118,7 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Interactions",
|
||||
"unsupportedFrameworks": [
|
||||
|
@ -1,4 +1,3 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { ObjectInspector } from '@devtools-ds/object-inspector';
|
||||
import type { Call, CallRef, ElementRef } from '@storybook/instrumenter';
|
||||
import { useTheme } from '@storybook/theming';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-jest",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "React storybook addon that show component jest report",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -29,6 +29,7 @@
|
||||
"author": "Renaud Tertrais <renaud.tertrais@gmail.com> (https://github.com/renaudtertrais)",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -69,13 +70,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"react-resize-detector": "^7.1.2",
|
||||
"upath": "^1.2.0"
|
||||
},
|
||||
@ -104,7 +105,7 @@
|
||||
],
|
||||
"platform": "browser"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Jest",
|
||||
"icon": "https://pbs.twimg.com/profile_images/821713465245102080/mMtKIMax_400x400.jpg",
|
||||
|
@ -2,7 +2,7 @@ import type { FC } from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
import { styled, themes, convert } from '@storybook/theming';
|
||||
import { ScrollArea, TabsState, Link, Placeholder } from '@storybook/components';
|
||||
import ResizeObserver from 'react-resize-detector';
|
||||
import { useResizeDetector } from 'react-resize-detector';
|
||||
import { Result } from './Result';
|
||||
import type { Test } from '../hoc/provideJestResult';
|
||||
import { provideTests as provideJestResult } from '../hoc/provideJestResult';
|
||||
@ -118,150 +118,143 @@ const getColorByType = (type: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
const TestPanel: FC<{ test: Test }> = ({ test }) => {
|
||||
const { ref, width } = useResizeDetector();
|
||||
const { result } = test;
|
||||
if (!result || !result.assertionResults) {
|
||||
return <Placeholder>This story has tests configured, but no file was found</Placeholder>;
|
||||
}
|
||||
|
||||
const testsByType: Map<string, any> = getTestsByTypeMap(result);
|
||||
const entries: any = testsByType.entries();
|
||||
const sortedTestsByCount = [...entries].sort((a, b) => a[1].length - b[1].length);
|
||||
|
||||
return (
|
||||
<section ref={ref}>
|
||||
<SuiteHead>
|
||||
<SuiteTotals {...{ result, width }} />
|
||||
{width > 240 ? (
|
||||
<ProgressWrapper>
|
||||
{sortedTestsByCount.map((entry: any) => {
|
||||
return (
|
||||
<SuiteProgressPortion
|
||||
key={`progress-portion-${entry[0]}`}
|
||||
color={getColorByType(entry[0])}
|
||||
progressPercent={
|
||||
entry[1] ? (entry[1].length / result.assertionResults.length) * 100 : 0
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</ProgressWrapper>
|
||||
) : null}
|
||||
</SuiteHead>
|
||||
<TabsState
|
||||
initial="failing-tests"
|
||||
backgroundColor={convert(themes.light).background.hoverable}
|
||||
>
|
||||
<div
|
||||
id="failing-tests"
|
||||
title={`${
|
||||
testsByType.get(StatusTypes.FAILED_TYPE)
|
||||
? testsByType.get(StatusTypes.FAILED_TYPE).length
|
||||
: 0
|
||||
} Failed`}
|
||||
color={getColorByType(StatusTypes.FAILED_TYPE)}
|
||||
>
|
||||
<List>
|
||||
{testsByType.get(StatusTypes.FAILED_TYPE) ? (
|
||||
testsByType.get(StatusTypes.FAILED_TYPE).map((res: any) => (
|
||||
<Item key={res.fullName || res.title}>
|
||||
<Result {...res} />
|
||||
</Item>
|
||||
))
|
||||
) : (
|
||||
<Placeholder key={`no-tests-${StatusTypes.FAILED_TYPE}`}>
|
||||
This story has no failing tests.
|
||||
</Placeholder>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
<div
|
||||
id="passing-tests"
|
||||
title={`${
|
||||
testsByType.get(StatusTypes.PASSED_TYPE)
|
||||
? testsByType.get(StatusTypes.PASSED_TYPE).length
|
||||
: 0
|
||||
} Passed`}
|
||||
color={getColorByType(StatusTypes.PASSED_TYPE)}
|
||||
>
|
||||
<List>
|
||||
{testsByType.get(StatusTypes.PASSED_TYPE) ? (
|
||||
testsByType.get(StatusTypes.PASSED_TYPE).map((res: any) => (
|
||||
<Item key={res.fullName || res.title}>
|
||||
<Result {...res} />
|
||||
</Item>
|
||||
))
|
||||
) : (
|
||||
<Placeholder key={`no-tests-${StatusTypes.PASSED_TYPE}`}>
|
||||
This story has no passing tests.
|
||||
</Placeholder>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
<div
|
||||
id="pending-tests"
|
||||
title={`${
|
||||
testsByType.get(StatusTypes.PENDING_TYPE)
|
||||
? testsByType.get(StatusTypes.PENDING_TYPE).length
|
||||
: 0
|
||||
} Pending`}
|
||||
color={getColorByType(StatusTypes.PENDING_TYPE)}
|
||||
>
|
||||
<List>
|
||||
{testsByType.get(StatusTypes.PENDING_TYPE) ? (
|
||||
testsByType.get(StatusTypes.PENDING_TYPE).map((res: any) => (
|
||||
<Item key={res.fullName || res.title}>
|
||||
<Result {...res} />
|
||||
</Item>
|
||||
))
|
||||
) : (
|
||||
<Placeholder key={`no-tests-${StatusTypes.PENDING_TYPE}`}>
|
||||
This story has no pending tests.
|
||||
</Placeholder>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
<div
|
||||
id="todo-tests"
|
||||
title={`${
|
||||
testsByType.get(StatusTypes.TODO_TYPE)
|
||||
? testsByType.get(StatusTypes.TODO_TYPE).length
|
||||
: 0
|
||||
} Todo`}
|
||||
color={getColorByType(StatusTypes.TODO_TYPE)}
|
||||
>
|
||||
<List>
|
||||
{testsByType.get(StatusTypes.TODO_TYPE) ? (
|
||||
testsByType.get(StatusTypes.TODO_TYPE).map((res: any) => (
|
||||
<Item key={res.fullName || res.title}>
|
||||
<Result {...res} />
|
||||
</Item>
|
||||
))
|
||||
) : (
|
||||
<Placeholder key={`no-tests-${StatusTypes.TODO_TYPE}`}>
|
||||
This story has no tests todo.
|
||||
</Placeholder>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
</TabsState>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
const Content = styled(({ tests, className }: ContentProps) => (
|
||||
<div className={className}>
|
||||
{tests.map(({ name, result }) => {
|
||||
if (!result || !result.assertionResults) {
|
||||
return (
|
||||
<Placeholder key={name}>
|
||||
This story has tests configured, but no file was found
|
||||
</Placeholder>
|
||||
);
|
||||
}
|
||||
|
||||
const testsByType: Map<string, any> = getTestsByTypeMap(result);
|
||||
const entries: any = testsByType.entries();
|
||||
const sortedTestsByCount = [...entries].sort((a, b) => a[1].length - b[1].length);
|
||||
|
||||
return (
|
||||
<ResizeObserver refreshMode="debounce" key={name}>
|
||||
{(size) => {
|
||||
const { width } = size;
|
||||
return (
|
||||
<section>
|
||||
<SuiteHead>
|
||||
<SuiteTotals {...{ result, width }} />
|
||||
{width > 240 ? (
|
||||
<ProgressWrapper>
|
||||
{sortedTestsByCount.map((entry: any) => {
|
||||
return (
|
||||
<SuiteProgressPortion
|
||||
key={`progress-portion-${entry[0]}`}
|
||||
color={getColorByType(entry[0])}
|
||||
progressPercent={
|
||||
entry[1]
|
||||
? (entry[1].length / result.assertionResults.length) * 100
|
||||
: 0
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</ProgressWrapper>
|
||||
) : null}
|
||||
</SuiteHead>
|
||||
<TabsState
|
||||
initial="failing-tests"
|
||||
backgroundColor={convert(themes.light).background.hoverable}
|
||||
>
|
||||
<div
|
||||
id="failing-tests"
|
||||
title={`${
|
||||
testsByType.get(StatusTypes.FAILED_TYPE)
|
||||
? testsByType.get(StatusTypes.FAILED_TYPE).length
|
||||
: 0
|
||||
} Failed`}
|
||||
color={getColorByType(StatusTypes.FAILED_TYPE)}
|
||||
>
|
||||
<List>
|
||||
{testsByType.get(StatusTypes.FAILED_TYPE) ? (
|
||||
testsByType.get(StatusTypes.FAILED_TYPE).map((res: any) => (
|
||||
<Item key={res.fullName || res.title}>
|
||||
<Result {...res} />
|
||||
</Item>
|
||||
))
|
||||
) : (
|
||||
<Placeholder key={`no-tests-${StatusTypes.FAILED_TYPE}`}>
|
||||
This story has no failing tests.
|
||||
</Placeholder>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
<div
|
||||
id="passing-tests"
|
||||
title={`${
|
||||
testsByType.get(StatusTypes.PASSED_TYPE)
|
||||
? testsByType.get(StatusTypes.PASSED_TYPE).length
|
||||
: 0
|
||||
} Passed`}
|
||||
color={getColorByType(StatusTypes.PASSED_TYPE)}
|
||||
>
|
||||
<List>
|
||||
{testsByType.get(StatusTypes.PASSED_TYPE) ? (
|
||||
testsByType.get(StatusTypes.PASSED_TYPE).map((res: any) => (
|
||||
<Item key={res.fullName || res.title}>
|
||||
<Result {...res} />
|
||||
</Item>
|
||||
))
|
||||
) : (
|
||||
<Placeholder key={`no-tests-${StatusTypes.PASSED_TYPE}`}>
|
||||
This story has no passing tests.
|
||||
</Placeholder>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
<div
|
||||
id="pending-tests"
|
||||
title={`${
|
||||
testsByType.get(StatusTypes.PENDING_TYPE)
|
||||
? testsByType.get(StatusTypes.PENDING_TYPE).length
|
||||
: 0
|
||||
} Pending`}
|
||||
color={getColorByType(StatusTypes.PENDING_TYPE)}
|
||||
>
|
||||
<List>
|
||||
{testsByType.get(StatusTypes.PENDING_TYPE) ? (
|
||||
testsByType.get(StatusTypes.PENDING_TYPE).map((res: any) => (
|
||||
<Item key={res.fullName || res.title}>
|
||||
<Result {...res} />
|
||||
</Item>
|
||||
))
|
||||
) : (
|
||||
<Placeholder key={`no-tests-${StatusTypes.PENDING_TYPE}`}>
|
||||
This story has no pending tests.
|
||||
</Placeholder>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
<div
|
||||
id="todo-tests"
|
||||
title={`${
|
||||
testsByType.get(StatusTypes.TODO_TYPE)
|
||||
? testsByType.get(StatusTypes.TODO_TYPE).length
|
||||
: 0
|
||||
} Todo`}
|
||||
color={getColorByType(StatusTypes.TODO_TYPE)}
|
||||
>
|
||||
<List>
|
||||
{testsByType.get(StatusTypes.TODO_TYPE) ? (
|
||||
testsByType.get(StatusTypes.TODO_TYPE).map((res: any) => (
|
||||
<Item key={res.fullName || res.title}>
|
||||
<Result {...res} />
|
||||
</Item>
|
||||
))
|
||||
) : (
|
||||
<Placeholder key={`no-tests-${StatusTypes.TODO_TYPE}`}>
|
||||
This story has no tests todo.
|
||||
</Placeholder>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
</TabsState>
|
||||
</section>
|
||||
);
|
||||
}}
|
||||
</ResizeObserver>
|
||||
);
|
||||
})}
|
||||
{tests.map((test) => (
|
||||
<TestPanel key={test.name} test={test} />
|
||||
))}
|
||||
</div>
|
||||
))({
|
||||
flex: '1 1 0%',
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-links",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Link stories together to build demos and prototypes with your UI components",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -23,6 +23,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -76,14 +77,14 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/router": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/router": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"prop-types": "^15.7.2",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
@ -113,7 +114,7 @@
|
||||
"./src/react/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"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.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Inspect layouts by visualizing the box model",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -26,6 +26,7 @@
|
||||
"author": "winkerVSbecks",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -74,13 +75,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13"
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~4.9.3"
|
||||
@ -107,7 +108,7 @@
|
||||
"./src/preview.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Measure",
|
||||
"unsupportedFrameworks": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-outline",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Outline all elements with CSS to help with layout placement and alignment",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
@ -29,6 +29,7 @@
|
||||
"author": "winkerVSbecks",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -77,13 +78,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -111,7 +112,7 @@
|
||||
"./src/preview.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Outline",
|
||||
"unsupportedFrameworks": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storyshots",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Take a code snapshot of every story automatically with Jest",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -39,12 +39,12 @@
|
||||
"dependencies": {
|
||||
"@jest/transform": "^29.3.1",
|
||||
"@storybook/babel-plugin-require-context-hook": "1.0.1",
|
||||
"@storybook/client-api": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/core-webpack": "7.0.0-beta.13",
|
||||
"@storybook/client-api": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/core-webpack": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"@types/glob": "^7.1.3",
|
||||
"@types/jest-specific-snapshot": "^0.5.6",
|
||||
"core-js": "^3.8.2",
|
||||
@ -60,11 +60,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.13",
|
||||
"@storybook/angular": "7.0.0-beta.13",
|
||||
"@storybook/react": "7.0.0-beta.13",
|
||||
"@storybook/vue": "7.0.0-beta.13",
|
||||
"@storybook/vue3": "7.0.0-beta.13",
|
||||
"@storybook/addon-docs": "7.0.0-beta.19",
|
||||
"@storybook/angular": "7.0.0-beta.19",
|
||||
"@storybook/react": "7.0.0-beta.19",
|
||||
"@storybook/vue": "7.0.0-beta.19",
|
||||
"@storybook/vue3": "7.0.0-beta.19",
|
||||
"babel-loader": "^8.3.0",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-to-json": "^3.6.1",
|
||||
@ -142,7 +142,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"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.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Image snapshots addition to StoryShots based on puppeteer",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -35,8 +35,8 @@
|
||||
"dependencies": {
|
||||
"@axe-core/puppeteer": "^4.2.0",
|
||||
"@storybook/csf": "next",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"@types/jest-image-snapshot": "^5.1.0",
|
||||
"jest-image-snapshot": "^6.0.0"
|
||||
},
|
||||
@ -45,7 +45,7 @@
|
||||
"puppeteer": "^2.0.0 || ^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@storybook/addon-storyshots": "7.0.0-beta.13",
|
||||
"@storybook/addon-storyshots": "7.0.0-beta.19",
|
||||
"puppeteer": ">=2.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
@ -56,5 +56,5 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ To customize the `source-loader`, pass `loaderOptions`. Valid configurations are
|
||||
|
||||
Storysource will automatically use the light or dark syntax theme based on your storybook theme. See [Theming Storybook](https://storybook.js.org/docs/react/configure/theming) for more information.
|
||||
|
||||

|
||||

|
||||
|
||||
## Displaying full source
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storysource",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "View a story’s source code to see how it works and paste into your app",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -23,6 +23,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -53,13 +54,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/router": "7.0.0-beta.13",
|
||||
"@storybook/source-loader": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/router": "7.0.0-beta.19",
|
||||
"@storybook/source-loader": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"estraverse": "^5.2.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-syntax-highlighter": "^15.5.0"
|
||||
@ -91,7 +92,7 @@
|
||||
"./src/preset.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"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.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Create your own toolbar items that control story rendering",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -27,6 +27,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -67,11 +68,11 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13"
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~4.9.3"
|
||||
@ -98,7 +99,7 @@
|
||||
],
|
||||
"platform": "browser"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"storybook": {
|
||||
"displayName": "Toolbars",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991677-48cdf300-3c7c-11eb-93b4-19b0e3366959.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-viewport",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Build responsive components by adjusting Storybook’s viewport size and orientation",
|
||||
"keywords": [
|
||||
"addon",
|
||||
@ -24,6 +24,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -72,13 +73,13 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"memoizerific": "^1.11.3",
|
||||
"prop-types": "^15.7.2"
|
||||
},
|
||||
@ -108,7 +109,7 @@
|
||||
"./src/preview.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908",
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791",
|
||||
"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.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -34,19 +34,19 @@
|
||||
"prep": "rimraf dist && ../../../scripts/node_modules/.bin/tsc --project tsconfig.build.json && echo \"Preventing passing flags to tsc\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/core-client": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/core-server": "7.0.0-beta.13",
|
||||
"@storybook/core-webpack": "7.0.0-beta.13",
|
||||
"@storybook/docs-tools": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/core-client": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/core-server": "7.0.0-beta.19",
|
||||
"@storybook/core-webpack": "7.0.0-beta.19",
|
||||
"@storybook/docs-tools": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0",
|
||||
"@types/react": "^16.14.34",
|
||||
"@types/react-dom": "^16.9.14",
|
||||
@ -122,5 +122,5 @@
|
||||
"access": "public"
|
||||
},
|
||||
"builders": "dist/builders/builders.json",
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ WithCustomNgComponentOutletWrapper.argTypes = {
|
||||
name: { control: 'text' },
|
||||
color: { control: 'color' },
|
||||
};
|
||||
WithCustomNgComponentOutletWrapper.args = { name: 'Dixie Normous', color: 'green' };
|
||||
WithCustomNgComponentOutletWrapper.args = { name: 'Color', color: 'green' };
|
||||
WithCustomNgComponentOutletWrapper.decorators = [
|
||||
moduleMetadata({
|
||||
declarations: [NgComponentOutletWrapperComponent],
|
||||
|
@ -59,7 +59,7 @@ WithComponentFactoryResolver.argTypes = {
|
||||
name: { control: 'text' },
|
||||
color: { control: 'color' },
|
||||
};
|
||||
WithComponentFactoryResolver.args = { name: 'Dixie Normous', color: 'chartreuse' };
|
||||
WithComponentFactoryResolver.args = { name: 'Color', color: 'chartreuse' };
|
||||
WithComponentFactoryResolver.decorators = [
|
||||
moduleMetadata({
|
||||
declarations: [ComponentFactoryWrapperComponent],
|
||||
|
@ -27,4 +27,4 @@ WithInjectionTokenAndArgs.argTypes = {
|
||||
name: { control: 'text' },
|
||||
color: { control: 'color' },
|
||||
};
|
||||
WithInjectionTokenAndArgs.args = { name: 'Dixie Normous', color: 'red' };
|
||||
WithInjectionTokenAndArgs.args = { name: 'Color', color: 'red' };
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ember",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"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": "node ../../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/docs-tools": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/docs-tools": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"read-pkg-up": "^7.0.1",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
@ -59,5 +59,5 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html-vite",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,18 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"types/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -51,15 +48,15 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "7.0.0-beta.13",
|
||||
"@storybook/builder-vite": "7.0.0-beta.13",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.13",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.13",
|
||||
"@storybook/client-api": "7.0.0-beta.13",
|
||||
"@storybook/core-server": "7.0.0-beta.13",
|
||||
"@storybook/html": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/preview-web": "7.0.0-beta.13",
|
||||
"@storybook/addons": "7.0.0-beta.19",
|
||||
"@storybook/builder-vite": "7.0.0-beta.19",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.19",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.19",
|
||||
"@storybook/client-api": "7.0.0-beta.19",
|
||||
"@storybook/core-server": "7.0.0-beta.19",
|
||||
"@storybook/html": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/preview-web": "7.0.0-beta.19",
|
||||
"magic-string": "^0.26.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -79,5 +76,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,17 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -50,11 +48,11 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/html": "7.0.0-beta.13",
|
||||
"@storybook/preset-html-webpack": "7.0.0-beta.13",
|
||||
"@storybook/html": "7.0.0-beta.19",
|
||||
"@storybook/preset-html-webpack": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -78,5 +76,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -31,6 +31,7 @@
|
||||
- [`useSelectedLayoutSegment` and `useSelectedLayoutSegments` hook](#useselectedlayoutsegment-and-useselectedlayoutsegments-hook)
|
||||
- [Default Navigation Context](#default-navigation-context)
|
||||
- [Actions Integration Caveats](#actions-integration-caveats-1)
|
||||
- [Next.js Head](#nextjs-head)
|
||||
- [Sass/Scss](#sassscss)
|
||||
- [Css/Sass/Scss Modules](#csssassscss-modules)
|
||||
- [Styled JSX](#styled-jsx)
|
||||
@ -54,6 +55,8 @@
|
||||
|
||||
👉 [Next.js Routing (next/router)](#nextjs-routing)
|
||||
|
||||
👉 [Next.js Head (next/head)](#nextjs-head)
|
||||
|
||||
👉 [Next.js Navigation (next/navigation)](#nextjs-navigation)
|
||||
|
||||
👉 [Sass/Scss](#sassscss)
|
||||
@ -599,6 +602,10 @@ export const parameters = {
|
||||
};
|
||||
```
|
||||
|
||||
### Next.js Head
|
||||
|
||||
[next/head](https://nextjs.org/docs/api-reference/next/head) is supported out of the box. You can use it in your stories like you would in your Next.js application. Please keep in mind, that the Head children are placed into the head element of the iframe that Storybook uses to render your stories.
|
||||
|
||||
### Sass/Scss
|
||||
|
||||
[Global sass/scss stylesheets](https://nextjs.org/docs/basic-features/built-in-css-support#sass-support) are supported without any additional configuration as well. Just import them into [preview.js](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering)
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/nextjs",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Next.js",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -22,6 +22,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -49,7 +50,6 @@
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"types/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -60,13 +60,13 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@next/font": "^13.0.7",
|
||||
"@storybook/addon-actions": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/preset-react-webpack": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/react": "7.0.0-beta.13",
|
||||
"@storybook/addon-actions": "7.0.0-beta.19",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/preset-react-webpack": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/react": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0",
|
||||
"find-up": "^5.0.0",
|
||||
"fs-extra": "^9.0.1",
|
||||
@ -84,7 +84,6 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.5",
|
||||
"@babel/types": "^7.20.5",
|
||||
"@storybook/addon-actions": "7.0.0-beta.12",
|
||||
"@types/babel__core": "^7",
|
||||
"next": "^13.0.5",
|
||||
"typescript": "^4.9.3",
|
||||
@ -124,5 +123,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
10
code/frameworks/nextjs/src/head-manager/decorator.tsx
Normal file
10
code/frameworks/nextjs/src/head-manager/decorator.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import HeadManagerProvider from './head-manager-provider';
|
||||
|
||||
export const HeadManagerDecorator = (Story: React.FC): React.ReactNode => {
|
||||
return (
|
||||
<HeadManagerProvider>
|
||||
<Story />
|
||||
</HeadManagerProvider>
|
||||
);
|
||||
};
|
@ -0,0 +1,22 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { HeadManagerContext } from 'next/dist/shared/lib/head-manager-context';
|
||||
import initHeadManager from 'next/dist/client/head-manager';
|
||||
|
||||
type HeadManagerValue = {
|
||||
updateHead?: ((state: JSX.Element[]) => void) | undefined;
|
||||
mountedInstances?: Set<unknown>;
|
||||
updateScripts?: ((state: any) => void) | undefined;
|
||||
scripts?: any;
|
||||
getIsSsr?: () => boolean;
|
||||
appDir?: boolean | undefined;
|
||||
nonce?: string | undefined;
|
||||
};
|
||||
|
||||
const HeadManagerProvider: React.FC = ({ children }) => {
|
||||
const headManager: HeadManagerValue = useMemo(initHeadManager, []);
|
||||
headManager.getIsSsr = () => false;
|
||||
|
||||
return <HeadManagerContext.Provider value={headManager}>{children}</HeadManagerContext.Provider>;
|
||||
};
|
||||
|
||||
export default HeadManagerProvider;
|
@ -2,5 +2,15 @@ import './config/preview';
|
||||
import { RouterDecorator } from './routing/decorator';
|
||||
import { StyledJsxDecorator } from './styledJsx/decorator';
|
||||
import './images/next-image-stub';
|
||||
import { HeadManagerDecorator } from './head-manager/decorator';
|
||||
|
||||
export const decorators = [StyledJsxDecorator, RouterDecorator];
|
||||
function addNextHeadCount() {
|
||||
const meta = document.createElement('meta');
|
||||
meta.name = 'next-head-count';
|
||||
meta.content = '0';
|
||||
document.head.appendChild(meta);
|
||||
}
|
||||
|
||||
addNextHeadCount();
|
||||
|
||||
export const decorators = [StyledJsxDecorator, RouterDecorator, HeadManagerDecorator];
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import Image from 'next/image';
|
||||
// eslint-disable-next-line import/extensions
|
||||
|
||||
import StackAlt from '../../assets/colors.svg';
|
||||
|
||||
export default {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import Image from 'next/future/image';
|
||||
// eslint-disable-next-line import/extensions
|
||||
|
||||
import StackAlt from '../../assets/colors.svg';
|
||||
|
||||
export default {
|
||||
|
@ -0,0 +1,34 @@
|
||||
/* eslint-disable no-undef */
|
||||
import { expect } from '@storybook/jest';
|
||||
import Head from 'next/head';
|
||||
import React from 'react';
|
||||
import { within, userEvent, waitFor } from '@storybook/testing-library';
|
||||
|
||||
function Component() {
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>Next.js Head Title</title>
|
||||
<meta property="og:title" content="My page title" key="title" />
|
||||
</Head>
|
||||
<Head>
|
||||
<meta property="og:title" content="My new title" key="title" />
|
||||
</Head>
|
||||
<p>Hello world!</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default {
|
||||
component: Component,
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
play: async ({ canvasElement }) => {
|
||||
await waitFor(() => expect(document.title).toEqual('Next.js Head Title'));
|
||||
await expect(document.querySelectorAll('meta[property="og:title"]')).toHaveLength(1);
|
||||
await expect(document.querySelector('meta[property="og:title"]').content).toEqual(
|
||||
'My new title'
|
||||
);
|
||||
},
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import Image from 'next/legacy/image';
|
||||
// eslint-disable-next-line import/extensions
|
||||
|
||||
import StackAlt from '../../assets/colors.svg';
|
||||
|
||||
export default {
|
||||
|
47
code/frameworks/preact-vite/README.md
Normal file
47
code/frameworks/preact-vite/README.md
Normal file
@ -0,0 +1,47 @@
|
||||
# Storybook for Preact <!-- omit in toc -->
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Preact](https://preactjs.com/) >= 10.x
|
||||
- [Storybook](https://storybook.js.org/) >= 7.x
|
||||
|
||||
## Getting Started
|
||||
|
||||
### In a project without Storybook
|
||||
|
||||
Follow the prompts after running this command in your Preact project's root directory:
|
||||
|
||||
```bash
|
||||
npx storybook@next init
|
||||
```
|
||||
|
||||
[More on getting started with Storybook](https://storybook.js.org/docs/preact/get-started/install)
|
||||
|
||||
### In a project with Storybook
|
||||
|
||||
This framework is designed to work with Storybook 7. If you’re not already using v7, upgrade with this command:
|
||||
|
||||
```bash
|
||||
npx storybook@next upgrade --prerelease
|
||||
```
|
||||
|
||||
#### Manual migration
|
||||
|
||||
Install the framework:
|
||||
|
||||
```bash
|
||||
yarn add --dev @storybook/preact-vite@next
|
||||
```
|
||||
|
||||
Update your `main.js` to change the framework property:
|
||||
|
||||
```js
|
||||
// .storybook/main.js
|
||||
module.exports = {
|
||||
// ...
|
||||
framework: {
|
||||
name: '@storybook/preact-vite', // <- Change this
|
||||
options: {},
|
||||
},
|
||||
};
|
||||
```
|
7
code/frameworks/preact-vite/jest.config.js
Normal file
7
code/frameworks/preact-vite/jest.config.js
Normal file
@ -0,0 +1,7 @@
|
||||
const path = require('path');
|
||||
const baseConfig = require('../../jest.config.node');
|
||||
|
||||
module.exports = {
|
||||
...baseConfig,
|
||||
displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep),
|
||||
};
|
77
code/frameworks/preact-vite/package.json
Normal file
77
code/frameworks/preact-vite/package.json
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
"name": "@storybook/preact-vite",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
],
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/preact-vite",
|
||||
"bugs": {
|
||||
"url": "https://github.com/storybookjs/storybook/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/storybookjs/storybook.git",
|
||||
"directory": "frameworks/preact-vite"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/storybook"
|
||||
},
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"./preset": {
|
||||
"require": "./dist/preset.js",
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"types/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@preact/preset-vite": "^2.0.0",
|
||||
"@storybook/builder-vite": "7.0.0-beta.19",
|
||||
"@storybook/preact": "7.0.0-beta.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.0.0",
|
||||
"typescript": "~4.9.3",
|
||||
"vite": "^4.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"preact": ">=10",
|
||||
"vite": "^3.0.0 || ^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"bundler": {
|
||||
"entries": [
|
||||
"./src/index.ts",
|
||||
"./src/preset.ts"
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
1
code/frameworks/preact-vite/preset.js
Normal file
1
code/frameworks/preact-vite/preset.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require('./dist/preset');
|
1
code/frameworks/preact-vite/src/index.ts
Normal file
1
code/frameworks/preact-vite/src/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export type { StorybookConfig } from '@storybook/builder-vite';
|
21
code/frameworks/preact-vite/src/preset.ts
Normal file
21
code/frameworks/preact-vite/src/preset.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import type { StorybookConfig } from '@storybook/builder-vite';
|
||||
import { hasVitePlugins } from '@storybook/builder-vite';
|
||||
import preact from '@preact/preset-vite';
|
||||
|
||||
export const core: StorybookConfig['core'] = {
|
||||
builder: '@storybook/builder-vite',
|
||||
renderer: '@storybook/preact',
|
||||
};
|
||||
|
||||
export const viteFinal: StorybookConfig['viteFinal'] = async (config) => {
|
||||
const { plugins = [] } = config;
|
||||
|
||||
// Add Preact plugin if not present
|
||||
if (!(await hasVitePlugins(plugins, ['vite:preact-jsx']))) {
|
||||
plugins.push(preact());
|
||||
}
|
||||
|
||||
// TODO: Add docgen plugin per issue https://github.com/storybookjs/storybook/issues/19739
|
||||
|
||||
return config;
|
||||
};
|
11
code/frameworks/preact-vite/tsconfig.json
Normal file
11
code/frameworks/preact-vite/tsconfig.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"types": ["node"],
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "preact"
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Preact: Develop Preact Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,17 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -50,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/preact": "7.0.0-beta.13",
|
||||
"@storybook/preset-preact-webpack": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/preact": "7.0.0-beta.19",
|
||||
"@storybook/preset-preact-webpack": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -79,5 +77,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-vite",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,18 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"types/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -53,8 +50,8 @@
|
||||
"dependencies": {
|
||||
"@joshwooding/vite-plugin-react-docgen-typescript": "^0.2.1",
|
||||
"@rollup/pluginutils": "^4.2.0",
|
||||
"@storybook/builder-vite": "7.0.0-beta.13",
|
||||
"@storybook/react": "7.0.0-beta.13",
|
||||
"@storybook/builder-vite": "7.0.0-beta.19",
|
||||
"@storybook/react": "7.0.0-beta.19",
|
||||
"@vitejs/plugin-react": "^3.0.0",
|
||||
"ast-types": "^0.14.2",
|
||||
"magic-string": "^0.26.1",
|
||||
@ -71,7 +68,7 @@
|
||||
"vite": "^3.0.0 || ^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.18 || >=16"
|
||||
"node": ">=16"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@ -83,5 +80,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,18 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"types/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -51,9 +48,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/preset-react-webpack": "7.0.0-beta.13",
|
||||
"@storybook/react": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/preset-react-webpack": "7.0.0-beta.19",
|
||||
"@storybook/react": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -86,5 +83,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/server-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,17 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -50,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/preset-server-webpack": "7.0.0-beta.13",
|
||||
"@storybook/server": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/preset-server-webpack": "7.0.0-beta.19",
|
||||
"@storybook/server": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -76,5 +74,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte-vite",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,18 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"types/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -51,9 +48,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/svelte": "7.0.0-beta.13",
|
||||
"@storybook/builder-vite": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/svelte": "7.0.0-beta.19",
|
||||
"@sveltejs/vite-plugin-svelte": "^2.0.0",
|
||||
"magic-string": "^0.26.1",
|
||||
"svelte": "^3.0.0",
|
||||
@ -83,5 +80,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,18 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"templates/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -51,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/preset-svelte-webpack": "7.0.0-beta.13",
|
||||
"@storybook/svelte": "7.0.0-beta.13"
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/preset-svelte-webpack": "7.0.0-beta.19",
|
||||
"@storybook/svelte": "7.0.0-beta.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte": "^3.48.0",
|
||||
@ -81,5 +78,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/sveltekit",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for SvelteKit",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
@ -24,6 +24,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -41,7 +42,6 @@
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"types/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -51,9 +51,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.13",
|
||||
"@storybook/svelte": "7.0.0-beta.13",
|
||||
"@storybook/svelte-vite": "7.0.0-beta.13"
|
||||
"@storybook/builder-vite": "7.0.0-beta.19",
|
||||
"@storybook/svelte": "7.0.0-beta.19",
|
||||
"@storybook/svelte-vite": "7.0.0-beta.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.0.0",
|
||||
@ -76,5 +76,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue-vite",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,17 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -50,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/core-server": "7.0.0-beta.13",
|
||||
"@storybook/vue": "7.0.0-beta.13",
|
||||
"@storybook/builder-vite": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/core-server": "7.0.0-beta.19",
|
||||
"@storybook/vue": "7.0.0-beta.19",
|
||||
"magic-string": "^0.26.1",
|
||||
"vue-docgen-api": "^4.40.0"
|
||||
},
|
||||
@ -81,5 +79,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,17 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -50,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/preset-vue-webpack": "7.0.0-beta.13",
|
||||
"@storybook/vue": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/preset-vue-webpack": "7.0.0-beta.19",
|
||||
"@storybook/vue": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -85,5 +83,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue3-vite",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,18 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"types/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -51,9 +48,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.13",
|
||||
"@storybook/core-server": "7.0.0-beta.13",
|
||||
"@storybook/vue3": "7.0.0-beta.13",
|
||||
"@storybook/builder-vite": "7.0.0-beta.19",
|
||||
"@storybook/core-server": "7.0.0-beta.19",
|
||||
"@storybook/vue3": "7.0.0-beta.19",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"magic-string": "^0.26.1",
|
||||
"vue-docgen-api": "^4.40.0"
|
||||
@ -81,5 +78,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue3-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,17 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -50,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/preset-vue3-webpack": "7.0.0-beta.13",
|
||||
"@storybook/vue3": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/preset-vue3-webpack": "7.0.0-beta.19",
|
||||
"@storybook/vue3": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -82,5 +80,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components-vite",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -30,18 +31,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"types/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -51,10 +48,10 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/builder-vite": "7.0.0-beta.13",
|
||||
"@storybook/core-server": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/web-components": "7.0.0-beta.13",
|
||||
"@storybook/builder-vite": "7.0.0-beta.19",
|
||||
"@storybook/core-server": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/web-components": "7.0.0-beta.19",
|
||||
"magic-string": "^0.26.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -78,5 +75,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"lit-html",
|
||||
@ -23,6 +23,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -32,17 +33,14 @@
|
||||
"import": "./dist/preset.mjs",
|
||||
"types": "./dist/preset.d.ts"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./package.json",
|
||||
"import": "./package.json",
|
||||
"types": "./package.json"
|
||||
}
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -53,10 +51,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/preset-web-components-webpack": "7.0.0-beta.13",
|
||||
"@storybook/web-components": "7.0.0-beta.13",
|
||||
"@storybook/builder-webpack5": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/preset-web-components-webpack": "7.0.0-beta.19",
|
||||
"@storybook/web-components": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -81,5 +79,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -24,23 +24,9 @@ module.exports = {
|
||||
path.resolve('./__mocks__/fileMock.js'),
|
||||
'\\.(css|scss|stylesheet)$': path.resolve('./__mocks__/styleMock.js'),
|
||||
'\\.(md)$': path.resolve('./__mocks__/htmlMock.js'),
|
||||
|
||||
// core-js v2 to v3 mapping
|
||||
'core-js/modules/es6.(.*)': 'core-js/modules/es.$1',
|
||||
'core-js/modules/es7.(.*)': 'core-js/modules/esnext.$1',
|
||||
'core-js/library/fn/(.*)': `core-js/features/$1`,
|
||||
'core-js/es5/(.*)': `core-js/es/$1`,
|
||||
'core-js/es6/(.*)': `core-js/es/$1`,
|
||||
'core-js/es7/reflect': `core-js/proposals/reflect-metadata`,
|
||||
'core-js/es7/(.*)': `core-js/proposals/$1`,
|
||||
'core-js/object$/': `core-js/es/object`,
|
||||
'core-js/object/(.*)': `core-js/es/object/$1`,
|
||||
'babel-runtime/core-js/(.*)': `core-js/es/$1`,
|
||||
// 'babel-runtime/core-js/object/assign'
|
||||
'core-js/library/fn/object/assign': 'core-js/es/object/assign',
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.[jt]sx?$': path.resolve('../scripts/utils/jest-transform-js.js'),
|
||||
'^.+\\.(t|j)sx?$': '@swc/jest',
|
||||
'^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx',
|
||||
},
|
||||
transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|@mdx-js)'],
|
||||
|
@ -2,5 +2,5 @@
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"registry": "https://registry.npmjs.org",
|
||||
"version": "7.0.0-beta.13"
|
||||
"version": "7.0.0-beta.19"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addons",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook addons store",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -22,6 +22,7 @@
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -33,6 +34,7 @@
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"template/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
@ -42,9 +44,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13"
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
@ -58,5 +60,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-manager",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook manager builder",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,6 +21,7 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -33,6 +34,7 @@
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"templates/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
],
|
||||
@ -42,16 +44,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/manager": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/manager": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@types/ejs": "^3.1.1",
|
||||
"@types/find-cache-dir": "^3.2.1",
|
||||
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10",
|
||||
"browser-assert": "^1.2.1",
|
||||
"ejs": "^3.1.8",
|
||||
"esbuild": "^0.16.4",
|
||||
"esbuild-plugin-alias": "^0.2.1",
|
||||
"express": "^4.17.3",
|
||||
"find-cache-dir": "^4.0.0",
|
||||
"fs-extra": "^9.0.1",
|
||||
"process": "^0.11.10",
|
||||
"slash": "^3.0.0",
|
||||
@ -69,5 +73,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import aliasPlugin from 'esbuild-plugin-alias';
|
||||
|
||||
import { getTemplatePath, renderHTML } from './utils/template';
|
||||
import { definitions } from './utils/globals';
|
||||
import { wrapManagerEntries } from './utils/managerEntries';
|
||||
import type {
|
||||
BuilderBuildResult,
|
||||
BuilderFunction,
|
||||
@ -34,10 +35,14 @@ export const getConfig: ManagerBuilder['getConfig'] = async (options) => {
|
||||
getTemplatePath('addon.tsconfig.json'),
|
||||
]);
|
||||
|
||||
const entryPoints = customManagerEntryPoint
|
||||
? [...addonsEntryPoints, customManagerEntryPoint]
|
||||
: addonsEntryPoints;
|
||||
|
||||
const realEntryPoints = await wrapManagerEntries(entryPoints);
|
||||
|
||||
return {
|
||||
entryPoints: customManagerEntryPoint
|
||||
? [...addonsEntryPoints, customManagerEntryPoint]
|
||||
: addonsEntryPoints,
|
||||
entryPoints: realEntryPoints,
|
||||
outdir: join(options.outputDir || './', 'sb-addons'),
|
||||
format: 'esm',
|
||||
write: false,
|
||||
|
38
code/lib/builder-manager/src/utils/managerEntries.ts
Normal file
38
code/lib/builder-manager/src/utils/managerEntries.ts
Normal file
@ -0,0 +1,38 @@
|
||||
import findCacheDirectory from 'find-cache-dir';
|
||||
import fs from 'fs-extra';
|
||||
import { join, parse, relative } from 'node:path';
|
||||
import slash from 'slash';
|
||||
/**
|
||||
* Manager entries should be **self-invoking** bits of code.
|
||||
* They can of-course import from modules, and ESbuild will bundle all of that into a single file.
|
||||
* But they should not export anything. However this can't be enforced, so what we do is wrap the given file, in a bit of code like this:
|
||||
*
|
||||
* ```js
|
||||
* import '<<file>>';
|
||||
* ```
|
||||
*
|
||||
* That way we are indicating to ESbuild that we do not care about this files exports, and they will be dropped in the bundle.
|
||||
*
|
||||
* We do all of that so we can wrap a try-catch around the code.
|
||||
* That would have been invalid syntax had the export statements been left in place.
|
||||
*
|
||||
* We need to wrap each managerEntry with a try-catch because if we do not, a failing managerEntry can stop execution of other managerEntries.
|
||||
*/
|
||||
export async function wrapManagerEntries(entrypoints: string[]) {
|
||||
return Promise.all(
|
||||
entrypoints.map(async (entry) => {
|
||||
const { name, dir } = parse(entry);
|
||||
const cacheLocation = findCacheDirectory({ name: 'sb-manager' });
|
||||
|
||||
if (!cacheLocation) {
|
||||
throw new Error('Could not create/find cache directory');
|
||||
}
|
||||
|
||||
const location = join(cacheLocation, relative(process.cwd(), dir), `${name}-bundle.mjs`);
|
||||
await fs.ensureFile(location);
|
||||
await fs.writeFile(location, `import '${slash(entry)}';`);
|
||||
|
||||
return location;
|
||||
})
|
||||
);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-vite",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "A plugin to run and build Storybooks with Vite",
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/main/code/lib/builder-vite/#readme",
|
||||
"bugs": {
|
||||
@ -19,6 +19,7 @@
|
||||
"author": "Eirik Sletteberg",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -33,6 +34,7 @@
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"input/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
],
|
||||
@ -41,14 +43,14 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/csf-plugin": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/csf-plugin": "7.0.0-beta.19",
|
||||
"@storybook/mdx2-csf": "next",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/preview": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/preview": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"browser-assert": "^1.2.1",
|
||||
"es-module-lexer": "^0.9.3",
|
||||
"express": "^4.17.3",
|
||||
@ -93,5 +95,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ async function toImportFn(stories: string[]) {
|
||||
const objectEntries = stories.map((file) => {
|
||||
const ext = path.extname(file);
|
||||
const relativePath = normalizePath(path.relative(process.cwd(), file));
|
||||
if (!['.js', '.jsx', '.ts', '.tsx', '.mdx'].includes(ext)) {
|
||||
if (!['.js', '.jsx', '.ts', '.tsx', '.mdx', '.svelte'].includes(ext)) {
|
||||
logger.warn(`Cannot process ${ext} file with storyStoreV7: ${relativePath}`);
|
||||
}
|
||||
|
||||
|
@ -94,15 +94,9 @@ export async function pluginConfig(options: ExtendedOptions) {
|
||||
externalGlobals(globals),
|
||||
] as PluginOption[];
|
||||
|
||||
// TODO: framework doesn't exist, should move into framework when/if built
|
||||
if (frameworkName === '@storybook/preact-vite') {
|
||||
// eslint-disable-next-line global-require
|
||||
plugins.push(require('@preact/preset-vite').default());
|
||||
}
|
||||
|
||||
// TODO: framework doesn't exist, should move into framework when/if built
|
||||
if (frameworkName === '@storybook/glimmerx-vite') {
|
||||
// eslint-disable-next-line global-require, import/extensions
|
||||
// eslint-disable-next-line global-require
|
||||
const plugin = require('vite-plugin-glimmerx/index.cjs');
|
||||
plugins.push(plugin.default());
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-webpack5",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -21,16 +21,19 @@
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"./presets/custom-webpack-preset": {
|
||||
"node": "./dist/presets/custom-webpack-preset.js",
|
||||
"require": "./dist/presets/custom-webpack-preset.js",
|
||||
"import": "./dist/presets/custom-webpack-preset.mjs",
|
||||
"types": "./dist/presets/custom-webpack-preset.d.ts"
|
||||
},
|
||||
"./presets/preview-preset": {
|
||||
"node": "./dist/presets/preview-preset.js",
|
||||
"require": "./dist/presets/preview-preset.js",
|
||||
"import": "./dist/presets/preview-preset.mjs",
|
||||
"types": "./dist/presets/preview-preset.d.ts"
|
||||
@ -45,6 +48,7 @@
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"templates/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts"
|
||||
],
|
||||
@ -54,25 +58,25 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@storybook/addons": "7.0.0-beta.13",
|
||||
"@storybook/api": "7.0.0-beta.13",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.13",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.13",
|
||||
"@storybook/channels": "7.0.0-beta.13",
|
||||
"@storybook/client-api": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/components": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/core-webpack": "7.0.0-beta.13",
|
||||
"@storybook/addons": "7.0.0-beta.19",
|
||||
"@storybook/api": "7.0.0-beta.19",
|
||||
"@storybook/channel-postmessage": "7.0.0-beta.19",
|
||||
"@storybook/channel-websocket": "7.0.0-beta.19",
|
||||
"@storybook/channels": "7.0.0-beta.19",
|
||||
"@storybook/client-api": "7.0.0-beta.19",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/components": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/core-webpack": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"@storybook/manager-api": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/preview": "7.0.0-beta.13",
|
||||
"@storybook/preview-api": "7.0.0-beta.13",
|
||||
"@storybook/router": "7.0.0-beta.13",
|
||||
"@storybook/store": "7.0.0-beta.13",
|
||||
"@storybook/theming": "7.0.0-beta.13",
|
||||
"@storybook/manager-api": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/preview": "7.0.0-beta.19",
|
||||
"@storybook/preview-api": "7.0.0-beta.19",
|
||||
"@storybook/router": "7.0.0-beta.19",
|
||||
"@storybook/store": "7.0.0-beta.19",
|
||||
"@storybook/theming": "7.0.0-beta.19",
|
||||
"@types/node": "^16.0.0",
|
||||
"@types/semver": "^7.3.4",
|
||||
"babel-loader": "^8.3.0",
|
||||
@ -87,6 +91,7 @@
|
||||
"path-browserify": "^1.0.1",
|
||||
"process": "^0.11.10",
|
||||
"semver": "^7.3.7",
|
||||
"slash": "^5.0.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"terser-webpack-plugin": "^5.3.1",
|
||||
"ts-dedent": "^2.0.0",
|
||||
@ -126,5 +131,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ import express from 'express';
|
||||
import fs from 'fs-extra';
|
||||
import { PREVIEW_BUILDER_PROGRESS } from '@storybook/core-events';
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import prettyTime from 'pretty-hrtime';
|
||||
|
||||
export * from './types';
|
||||
|
@ -7,6 +7,7 @@ import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
|
||||
import TerserWebpackPlugin from 'terser-webpack-plugin';
|
||||
import VirtualModulePlugin from 'webpack-virtual-modules';
|
||||
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
||||
import slash from 'slash';
|
||||
|
||||
import type { Options, CoreConfig, DocsOptions, PreviewAnnotation } from '@storybook/types';
|
||||
import { globals } from '@storybook/preview/globals';
|
||||
@ -108,7 +109,7 @@ export default async (
|
||||
if (typeof entry === 'object') {
|
||||
return entry.absolute;
|
||||
}
|
||||
return entry;
|
||||
return slash(entry);
|
||||
}
|
||||
),
|
||||
loadPreviewOrConfigFile(options),
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-postmessage",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -22,6 +22,7 @@
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -42,9 +43,9 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/core-events": "7.0.0-beta.13",
|
||||
"@storybook/channels": "7.0.0-beta.19",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/core-events": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"qs": "^6.10.0",
|
||||
"telejson": "^7.0.3"
|
||||
@ -60,5 +61,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channel-websocket",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -22,6 +22,7 @@
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -42,8 +43,8 @@
|
||||
"prep": "../../../scripts/prepare/bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/channels": "7.0.0-beta.13",
|
||||
"@storybook/client-logger": "7.0.0-beta.13",
|
||||
"@storybook/channels": "7.0.0-beta.19",
|
||||
"@storybook/client-logger": "7.0.0-beta.19",
|
||||
"@storybook/global": "^5.0.0",
|
||||
"telejson": "^7.0.3"
|
||||
},
|
||||
@ -58,5 +59,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/channels",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -22,6 +22,7 @@
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/index.js",
|
||||
"require": "./dist/index.js",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
@ -52,5 +53,5 @@
|
||||
"./src/index.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sb",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook CLI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -24,7 +24,7 @@
|
||||
"prep": "node ../../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/cli": "7.0.0-beta.13"
|
||||
"@storybook/cli": "7.0.0-beta.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~4.9.3"
|
||||
@ -32,5 +32,5 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "storybook",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook CLI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -27,7 +27,7 @@
|
||||
"prep": "node ../../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/cli": "7.0.0-beta.13"
|
||||
"@storybook/cli": "7.0.0-beta.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~4.9.3"
|
||||
@ -35,5 +35,5 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// eslint-disable-next-line import/extensions
|
||||
require('../dist/generate.js');
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/cli",
|
||||
"version": "7.0.0-beta.13",
|
||||
"version": "7.0.0-beta.19",
|
||||
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
||||
"keywords": [
|
||||
"cli",
|
||||
@ -43,13 +43,13 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.20.2",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@storybook/codemod": "7.0.0-beta.13",
|
||||
"@storybook/core-common": "7.0.0-beta.13",
|
||||
"@storybook/core-server": "7.0.0-beta.13",
|
||||
"@storybook/csf-tools": "7.0.0-beta.13",
|
||||
"@storybook/node-logger": "7.0.0-beta.13",
|
||||
"@storybook/telemetry": "7.0.0-beta.13",
|
||||
"@storybook/types": "7.0.0-beta.13",
|
||||
"@storybook/codemod": "7.0.0-beta.19",
|
||||
"@storybook/core-common": "7.0.0-beta.19",
|
||||
"@storybook/core-server": "7.0.0-beta.19",
|
||||
"@storybook/csf-tools": "7.0.0-beta.19",
|
||||
"@storybook/node-logger": "7.0.0-beta.19",
|
||||
"@storybook/telemetry": "7.0.0-beta.19",
|
||||
"@storybook/types": "7.0.0-beta.19",
|
||||
"@types/semver": "^7.3.4",
|
||||
"boxen": "^5.1.2",
|
||||
"chalk": "^4.1.0",
|
||||
@ -78,7 +78,7 @@
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/client-api": "7.0.0-beta.13",
|
||||
"@storybook/client-api": "7.0.0-beta.19",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/prompts": "^2.0.9",
|
||||
"@types/puppeteer-core": "^2.1.0",
|
||||
@ -88,6 +88,10 @@
|
||||
"strip-json-comments": "^3.1.1",
|
||||
"typescript": "~4.9.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
@ -97,5 +101,5 @@
|
||||
],
|
||||
"platform": "node"
|
||||
},
|
||||
"gitHead": "ddf86bd126ede0c019d7c9494f99f24a5cad9908"
|
||||
"gitHead": "da902f312eb354d20aa83bf0f0035b9744f93791"
|
||||
}
|
||||
|
@ -74,11 +74,12 @@ export async function add(
|
||||
addon: string,
|
||||
options: { useNpm: boolean; packageManager: PackageManagerName; skipPostinstall: boolean }
|
||||
) {
|
||||
const { useNpm, packageManager: pkgMgr } = options;
|
||||
if (useNpm) {
|
||||
let { packageManager: pkgMgr } = options;
|
||||
if (options.useNpm) {
|
||||
useNpmWarning();
|
||||
pkgMgr = 'npm';
|
||||
}
|
||||
const packageManager = JsPackageManagerFactory.getPackageManager({ useNpm, force: pkgMgr });
|
||||
const packageManager = JsPackageManagerFactory.getPackageManager({ force: pkgMgr });
|
||||
const packageJson = packageManager.retrievePackageJson();
|
||||
const [addonName, versionSpecifier] = getVersionSpecifier(addon);
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { dedent } from 'ts-dedent';
|
||||
import type { ConfigFile } from '@storybook/csf-tools';
|
||||
import { readConfig, writeConfig } from '@storybook/csf-tools';
|
||||
import { getStorybookInfo } from '@storybook/core-common';
|
||||
import type { StorybookConfig } from '@storybook/types';
|
||||
|
||||
import type { Fix } from '../types';
|
||||
|
||||
@ -11,6 +12,7 @@ const logger = console;
|
||||
|
||||
interface AutodocsTrueFrameworkRunOptions {
|
||||
main: ConfigFile;
|
||||
value?: StorybookConfig['docs']['autodocs'];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -32,18 +34,55 @@ export const autodocsTrue: Fix<AutodocsTrueFrameworkRunOptions> = {
|
||||
const main = await readConfig(mainConfig);
|
||||
const docs = main.getFieldValue(['docs']);
|
||||
|
||||
const docsPageToAutodocsMapping = {
|
||||
true: 'tag' as const,
|
||||
automatic: true,
|
||||
false: false,
|
||||
};
|
||||
if (docs?.docsPage) {
|
||||
const oldValue = docs?.docsPage.toString();
|
||||
if (!(oldValue in docsPageToAutodocsMapping))
|
||||
throw new Error(`Unexpected value for docs.docsPage: ${oldValue}`);
|
||||
return {
|
||||
main,
|
||||
value: docsPageToAutodocsMapping[oldValue as keyof typeof docsPageToAutodocsMapping],
|
||||
};
|
||||
}
|
||||
|
||||
return docs?.autodocs === undefined ? { main } : null;
|
||||
},
|
||||
|
||||
prompt() {
|
||||
const AutodocsTrueFormatted = chalk.cyan(`docs: { autodocs: true }`);
|
||||
prompt({ value }) {
|
||||
const autodocsFormatted = chalk.cyan(`docs: { autodocs: ${JSON.stringify(value ?? true)} }`);
|
||||
|
||||
if (value) {
|
||||
return dedent`
|
||||
We've changed the configuration of autodocs (previous docsPage), so now the value:
|
||||
- docs.autodocs: true -- means automatically create docs for every CSF file
|
||||
- docs.autodocs: 'tag' -- means only create autodocs for CSF files with the 'autodocs' tag
|
||||
- docs.autodocs: false -- means never create autodocs
|
||||
|
||||
Based on your prior configuration, we can set the \`docs.autodocs\` to keep your old behaviour:
|
||||
|
||||
${autodocsFormatted}
|
||||
|
||||
${
|
||||
value === 'tag' &&
|
||||
`NOTE: it is important you change all CSF files to use the 'autodocs' tag rather than the 'docsPage' tag.`
|
||||
}
|
||||
|
||||
More info: ${chalk.yellow(
|
||||
'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#autodocs'
|
||||
)}
|
||||
`;
|
||||
}
|
||||
|
||||
return dedent`
|
||||
We've detected that your main.js configuration file has not configured autodocs. In 6.x we
|
||||
we defaulted to having a autodocs for every story, in 7.x you need to opt in per-component.
|
||||
However, we can set the \`docs.autodocs\` to true to approximate the old behaviour:
|
||||
|
||||
${AutodocsTrueFormatted}
|
||||
${autodocsFormatted}
|
||||
|
||||
More info: ${chalk.yellow(
|
||||
'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#autodocs'
|
||||
@ -51,10 +90,11 @@ export const autodocsTrue: Fix<AutodocsTrueFrameworkRunOptions> = {
|
||||
`;
|
||||
},
|
||||
|
||||
async run({ result: { main }, dryRun }) {
|
||||
async run({ result: { main, value }, dryRun }) {
|
||||
logger.info(`✅ Setting 'docs.autodocs' to true in main.js`);
|
||||
if (!dryRun) {
|
||||
main.setFieldValue(['docs', 'autodocs'], true);
|
||||
main.removeField(['docs', 'docsPage']);
|
||||
main.setFieldValue(['docs', 'autodocs'], value ?? true);
|
||||
await writeConfig(main);
|
||||
}
|
||||
},
|
||||
|
@ -7,7 +7,11 @@ import tempy from 'tempy';
|
||||
import dedent from 'ts-dedent';
|
||||
|
||||
import { join } from 'path';
|
||||
import { JsPackageManagerFactory, type PackageManagerName } from '../js-package-manager';
|
||||
import {
|
||||
JsPackageManagerFactory,
|
||||
useNpmWarning,
|
||||
type PackageManagerName,
|
||||
} from '../js-package-manager';
|
||||
|
||||
import type { Fix } from './fixes';
|
||||
import { fixes as allFixes } from './fixes';
|
||||
@ -47,7 +51,7 @@ interface FixOptions {
|
||||
yes?: boolean;
|
||||
dryRun?: boolean;
|
||||
useNpm?: boolean;
|
||||
force?: PackageManagerName;
|
||||
packageManager?: PackageManagerName;
|
||||
}
|
||||
|
||||
enum FixStatus {
|
||||
@ -72,12 +76,25 @@ const logAvailableMigrations = () => {
|
||||
logger.info(`\nThe following migrations are available: ${availableFixes}`);
|
||||
};
|
||||
|
||||
export const automigrate = async ({ fixId, dryRun, yes, useNpm, force, list }: FixOptions = {}) => {
|
||||
export const automigrate = async ({
|
||||
fixId,
|
||||
dryRun,
|
||||
yes,
|
||||
useNpm,
|
||||
packageManager: pkgMgr,
|
||||
list,
|
||||
}: FixOptions = {}) => {
|
||||
if (list) {
|
||||
logAvailableMigrations();
|
||||
return null;
|
||||
}
|
||||
|
||||
if (useNpm) {
|
||||
useNpmWarning();
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
pkgMgr = 'npm';
|
||||
}
|
||||
|
||||
const fixes = fixId ? allFixes.filter((f) => f.id === fixId) : allFixes;
|
||||
|
||||
if (fixId && fixes.length === 0) {
|
||||
@ -88,7 +105,7 @@ export const automigrate = async ({ fixId, dryRun, yes, useNpm, force, list }: F
|
||||
|
||||
augmentLogsToFile();
|
||||
|
||||
const packageManager = JsPackageManagerFactory.getPackageManager({ useNpm, force });
|
||||
const packageManager = JsPackageManagerFactory.getPackageManager({ force: pkgMgr });
|
||||
|
||||
logger.info('🔎 checking possible migrations..');
|
||||
const fixResults = {} as Record<FixId, FixStatus>;
|
||||
|
@ -1,8 +1,16 @@
|
||||
import { detectLanguage } from '../../detect';
|
||||
import { SupportedLanguage } from '../../project_types';
|
||||
import { baseGenerator } from '../baseGenerator';
|
||||
import type { Generator } from '../types';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
await baseGenerator(packageManager, npmOptions, options, 'react');
|
||||
// Add prop-types dependency if not using TypeScript
|
||||
const language = detectLanguage();
|
||||
const extraPackages = language === SupportedLanguage.JAVASCRIPT ? ['prop-types'] : [];
|
||||
|
||||
await baseGenerator(packageManager, npmOptions, options, 'react', {
|
||||
extraPackages,
|
||||
});
|
||||
};
|
||||
|
||||
export default generator;
|
||||
|
@ -266,11 +266,13 @@ const projectTypeInquirer = async (
|
||||
};
|
||||
|
||||
async function doInitiate(options: CommandOptions, pkg: PackageJson): Promise<void> {
|
||||
const { useNpm, packageManager: pkgMgr } = options;
|
||||
if (useNpm) {
|
||||
let { packageManager: pkgMgr } = options;
|
||||
if (options.useNpm) {
|
||||
useNpmWarning();
|
||||
|
||||
pkgMgr = 'npm';
|
||||
}
|
||||
const packageManager = JsPackageManagerFactory.getPackageManager({ useNpm, force: pkgMgr });
|
||||
const packageManager = JsPackageManagerFactory.getPackageManager({ force: pkgMgr });
|
||||
const welcomeMessage = 'storybook init - the simplest way to add a Storybook to your project.';
|
||||
logger.log(chalk.inverse(`\n ${welcomeMessage} \n`));
|
||||
|
||||
@ -327,7 +329,7 @@ async function doInitiate(options: CommandOptions, pkg: PackageJson): Promise<vo
|
||||
telemetry('init', { projectType });
|
||||
}
|
||||
|
||||
await automigrate({ yes: options.yes || process.env.CI === 'true', useNpm, force: pkgMgr });
|
||||
await automigrate({ yes: options.yes || process.env.CI === 'true', packageManager: pkgMgr });
|
||||
|
||||
logger.log('\nTo run your Storybook, type:\n');
|
||||
codeLog([packageManager.getRunStorybookCommand()]);
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { sync as spawnSync } from 'cross-spawn';
|
||||
import { sync as findUpSync } from 'find-up';
|
||||
import path from 'path';
|
||||
import { JsPackageManagerFactory } from './JsPackageManagerFactory';
|
||||
import { NPMProxy } from './NPMProxy';
|
||||
import { PNPMProxy } from './PNPMProxy';
|
||||
@ -11,17 +12,14 @@ const spawnSyncMock = spawnSync as jest.Mock;
|
||||
|
||||
jest.mock('find-up');
|
||||
const findUpSyncMock = findUpSync as unknown as jest.Mock;
|
||||
findUpSyncMock.mockReturnValue(undefined);
|
||||
|
||||
describe('JsPackageManagerFactory', () => {
|
||||
beforeEach(() => {
|
||||
findUpSyncMock.mockReturnValue(undefined);
|
||||
});
|
||||
|
||||
describe('getPackageManager', () => {
|
||||
describe('return an NPM proxy', () => {
|
||||
it('when `useNpm` option is used', () => {
|
||||
expect(JsPackageManagerFactory.getPackageManager({ useNpm: true })).toBeInstanceOf(
|
||||
NPMProxy
|
||||
);
|
||||
});
|
||||
|
||||
it('when `force` option is `npm`', () => {
|
||||
expect(JsPackageManagerFactory.getPackageManager({ force: 'npm' })).toBeInstanceOf(
|
||||
NPMProxy
|
||||
@ -58,9 +56,7 @@ describe('JsPackageManagerFactory', () => {
|
||||
});
|
||||
|
||||
// There is only a package-lock.json
|
||||
findUpSyncMock.mockImplementation((file) =>
|
||||
file === 'package-lock.json' ? 'found' : undefined
|
||||
);
|
||||
findUpSyncMock.mockImplementation(() => '/Users/johndoe/Documents/package-lock.json');
|
||||
|
||||
expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(NPMProxy);
|
||||
});
|
||||
@ -103,15 +99,45 @@ describe('JsPackageManagerFactory', () => {
|
||||
});
|
||||
|
||||
// There is only a pnpm-lock.yaml
|
||||
findUpSyncMock.mockImplementation((file) => {
|
||||
if (file === 'pnpm-lock.yaml') {
|
||||
return 'found';
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
findUpSyncMock.mockImplementation(() => '/Users/johndoe/Documents/pnpm-lock.yaml');
|
||||
|
||||
expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(PNPMProxy);
|
||||
});
|
||||
|
||||
it('when a pnpm-lock.yaml file is closer than a yarn.lock', () => {
|
||||
// Allow find-up to work as normal, we'll set the cwd to our fixture package
|
||||
findUpSyncMock.mockImplementation(jest.requireActual('find-up').sync);
|
||||
|
||||
spawnSyncMock.mockImplementation((command) => {
|
||||
// Yarn is ok
|
||||
if (command === 'yarn') {
|
||||
return {
|
||||
status: 0,
|
||||
output: '1.22.4',
|
||||
};
|
||||
}
|
||||
// NPM is ok
|
||||
if (command === 'npm') {
|
||||
return {
|
||||
status: 0,
|
||||
output: '6.5.12',
|
||||
};
|
||||
}
|
||||
// PNPM is ok
|
||||
if (command === 'pnpm') {
|
||||
return {
|
||||
status: 0,
|
||||
output: '7.9.5',
|
||||
};
|
||||
}
|
||||
// Unknown package manager is ko
|
||||
return {
|
||||
status: 1,
|
||||
};
|
||||
});
|
||||
const fixture = path.join(__dirname, 'fixtures', 'pnpm-workspace', 'package');
|
||||
expect(JsPackageManagerFactory.getPackageManager({}, fixture)).toBeInstanceOf(PNPMProxy);
|
||||
});
|
||||
});
|
||||
|
||||
describe('return a Yarn 1 proxy', () => {
|
||||
@ -184,12 +210,45 @@ describe('JsPackageManagerFactory', () => {
|
||||
});
|
||||
|
||||
// There is a yarn.lock
|
||||
findUpSyncMock.mockImplementation((file) =>
|
||||
file === 'yarn.lock' ? '/Users/johndoe/Documents/yarn.lock' : undefined
|
||||
);
|
||||
findUpSyncMock.mockImplementation(() => '/Users/johndoe/Documents/yarn.lock');
|
||||
|
||||
expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(Yarn1Proxy);
|
||||
});
|
||||
|
||||
it('when multiple lockfiles are in a project, prefers yarn', () => {
|
||||
// Allow find-up to work as normal, we'll set the cwd to our fixture package
|
||||
findUpSyncMock.mockImplementation(jest.requireActual('find-up').sync);
|
||||
|
||||
spawnSyncMock.mockImplementation((command) => {
|
||||
// Yarn is ok
|
||||
if (command === 'yarn') {
|
||||
return {
|
||||
status: 0,
|
||||
output: '1.22.4',
|
||||
};
|
||||
}
|
||||
// NPM is ok
|
||||
if (command === 'npm') {
|
||||
return {
|
||||
status: 0,
|
||||
output: '6.5.12',
|
||||
};
|
||||
}
|
||||
// PNPM is ok
|
||||
if (command === 'pnpm') {
|
||||
return {
|
||||
status: 0,
|
||||
output: '7.9.5',
|
||||
};
|
||||
}
|
||||
// Unknown package manager is ko
|
||||
return {
|
||||
status: 1,
|
||||
};
|
||||
});
|
||||
const fixture = path.join(__dirname, 'fixtures', 'multiple-lockfiles');
|
||||
expect(JsPackageManagerFactory.getPackageManager({}, fixture)).toBeInstanceOf(Yarn1Proxy);
|
||||
});
|
||||
});
|
||||
|
||||
describe('return a Yarn 2 proxy', () => {
|
||||
@ -259,9 +318,7 @@ describe('JsPackageManagerFactory', () => {
|
||||
});
|
||||
|
||||
// There is a yarn.lock
|
||||
findUpSyncMock.mockImplementation((file) =>
|
||||
file === 'yarn.lock' ? '/Users/johndoe/Documents/yarn.lock' : undefined
|
||||
);
|
||||
findUpSyncMock.mockImplementation(() => '/Users/johndoe/Documents/yarn.lock');
|
||||
|
||||
expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(Yarn2Proxy);
|
||||
});
|
||||
|
@ -1,23 +1,26 @@
|
||||
import path from 'node:path';
|
||||
import { sync as spawnSync } from 'cross-spawn';
|
||||
import { sync as findUpSync } from 'find-up';
|
||||
|
||||
import { NPMProxy } from './NPMProxy';
|
||||
|
||||
import { PNPMProxy } from './PNPMProxy';
|
||||
|
||||
import type { JsPackageManager } from './JsPackageManager';
|
||||
import { type PackageManagerName } from './JsPackageManager';
|
||||
|
||||
import { Yarn2Proxy } from './Yarn2Proxy';
|
||||
|
||||
import { Yarn1Proxy } from './Yarn1Proxy';
|
||||
|
||||
const NPM_LOCKFILE = 'package-lock.json';
|
||||
const PNPM_LOCKFILE = 'pnpm-lock.yaml';
|
||||
const YARN_LOCKFILE = 'yarn.lock';
|
||||
|
||||
export class JsPackageManagerFactory {
|
||||
public static getPackageManager(
|
||||
{ force, useNpm }: { force?: PackageManagerName; useNpm?: boolean } = {},
|
||||
{ force }: { force?: PackageManagerName } = {},
|
||||
cwd?: string
|
||||
): JsPackageManager {
|
||||
if (useNpm || force === 'npm') {
|
||||
if (force === 'npm') {
|
||||
return new NPMProxy({ cwd });
|
||||
}
|
||||
if (force === 'pnpm') {
|
||||
@ -31,17 +34,20 @@ export class JsPackageManagerFactory {
|
||||
}
|
||||
|
||||
const yarnVersion = getYarnVersion(cwd);
|
||||
const hasYarnLockFile = Boolean(findUpSync('yarn.lock', { cwd }));
|
||||
const hasPNPMLockFile = Boolean(findUpSync('pnpm-lock.yaml', { cwd }));
|
||||
|
||||
const closestLockfilePath = findUpSync([YARN_LOCKFILE, PNPM_LOCKFILE, NPM_LOCKFILE], {
|
||||
cwd,
|
||||
});
|
||||
const closestLockfile = closestLockfilePath && path.basename(closestLockfilePath);
|
||||
|
||||
const hasNPMCommand = hasNPM(cwd);
|
||||
const hasPNPMCommand = hasPNPM(cwd);
|
||||
|
||||
if (yarnVersion && (hasYarnLockFile || (!hasNPMCommand && !hasPNPMCommand))) {
|
||||
if (yarnVersion && (closestLockfile === YARN_LOCKFILE || (!hasNPMCommand && !hasPNPMCommand))) {
|
||||
return yarnVersion === 1 ? new Yarn1Proxy({ cwd }) : new Yarn2Proxy({ cwd });
|
||||
}
|
||||
|
||||
if (hasPNPMCommand && hasPNPMLockFile) {
|
||||
if (hasPNPMCommand && closestLockfile === PNPM_LOCKFILE) {
|
||||
return new PNPMProxy({ cwd });
|
||||
}
|
||||
|
||||
|
@ -47,16 +47,12 @@ describe('NPM Proxy', () => {
|
||||
});
|
||||
});
|
||||
describe('npm7', () => {
|
||||
it('should run `npm install --legacy-peer-deps`', () => {
|
||||
it('should run `npm install`', () => {
|
||||
const executeCommandSpy = jest.spyOn(npmProxy, 'executeCommand').mockReturnValue('7.1.0');
|
||||
|
||||
npmProxy.installDependencies();
|
||||
|
||||
expect(executeCommandSpy).toHaveBeenLastCalledWith(
|
||||
'npm',
|
||||
['install', '--legacy-peer-deps'],
|
||||
expect.any(String)
|
||||
);
|
||||
expect(executeCommandSpy).toHaveBeenLastCalledWith('npm', ['install'], expect.any(String));
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -83,7 +79,7 @@ describe('NPM Proxy', () => {
|
||||
|
||||
expect(executeCommandSpy).toHaveBeenLastCalledWith(
|
||||
'npm',
|
||||
['install', '--legacy-peer-deps', '-D', '@storybook/preview-api'],
|
||||
['install', '-D', '@storybook/preview-api'],
|
||||
expect.any(String)
|
||||
);
|
||||
});
|
||||
@ -112,7 +108,7 @@ describe('NPM Proxy', () => {
|
||||
|
||||
expect(executeCommandSpy).toHaveBeenLastCalledWith(
|
||||
'npm',
|
||||
['uninstall', '--legacy-peer-deps', '@storybook/preview-api'],
|
||||
['uninstall', '@storybook/preview-api'],
|
||||
expect.any(String)
|
||||
);
|
||||
});
|
||||
|
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