diff --git a/.circleci/config.yml b/.circleci/config.yml index 72723c16f30..00f3a552e09 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -623,6 +623,12 @@ workflows: equal: [daily, << pipeline.parameters.workflow >>] jobs: - build + - lint: + requires: + - build + - unit-tests: + requires: + - build - create-sandboxes: parallelism: 27 requires: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f530ca85c9..c4a1a057933 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,37 @@ +## 7.0.0-beta.30 (January 18, 2023) + +#### Features + +- UI: Add Sun, Moon, Sidebyside, and stacked icons [#20621](https://github.com/storybooks/storybook/pull/20621) +- Angular: Add multi-project setup for ng workspaces [#20559](https://github.com/storybooks/storybook/pull/20559) +- Addon-docs: Support @deprecated jsdoc tag [#20154](https://github.com/storybooks/storybook/pull/20154) +- Csf-plugin: Support meta description comments [#20632](https://github.com/storybooks/storybook/pull/20632) + +#### Bug Fixes + +- Core: Fix `core` preset default value [#20646](https://github.com/storybooks/storybook/pull/20646) +- Addon-docs: Fix issue with unattached `.mdx` files [#20661](https://github.com/storybooks/storybook/pull/20661) +- Webpack: aAd error catching when template is not set [#20669](https://github.com/storybooks/storybook/pull/20669) +- Addons: Fix Viewport resetting shortcut key not working [#20167](https://github.com/storybooks/storybook/pull/20167) +- Core: Show "booting" progress until story is specified or errors [#20425](https://github.com/storybooks/storybook/pull/20425) +- Vue: Update events binding in Vue render [#19860](https://github.com/storybooks/storybook/pull/19860) +- Addon-actions: Fix webpack hot reload code in manager bundle [#20649](https://github.com/storybooks/storybook/pull/20649) +- UI: Fix HMR issue in Manager UI [#20654](https://github.com/storybooks/storybook/pull/20654) + +#### Maintenance + +- Docs: Refactor props of Story block [#20530](https://github.com/storybooks/storybook/pull/20530) +- Vite: TypeScript type cleanup [#20642](https://github.com/storybooks/storybook/pull/20642) + +#### Build + +- Add required jobs to daily workflow [#20263](https://github.com/storybooks/storybook/pull/20263) +- Fix typings files to ensure this the check command succeeds [#20598](https://github.com/storybooks/storybook/pull/20598) + +#### Dependency Upgrades + +- Svelte: Remove babel/core peer dep [#20650](https://github.com/storybooks/storybook/pull/20650) + ## 7.0.0-beta.29 (January 17, 2023) #### Features diff --git a/MIGRATION.md b/MIGRATION.md index ca268d4530b..e71d9753d15 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,48 +1,44 @@

Migration

- [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) - - [Postcss removed](#postcss-removed) - - [Vue3 replaced app export with setup](#vue3-replaced-app-export-with-setup) - - [removed auto injection of @storybook/addon-actions decorator](#removed-auto-injection-of-storybookaddon-actions-decorator) - - [register.js removed](#registerjs-removed) - - [Change of root html IDs](#change-of-root-html-ids) - - [No more default export from `@storybook/addons`](#no-more-default-export-from-storybookaddons) - [Modern browser support](#modern-browser-support) - - [No more configuration for manager](#no-more-configuration-for-manager) + - [React peer dependencies required](#react-peer-dependencies-required) - [start-storybook / build-storybook binaries removed](#start-storybook--build-storybook-binaries-removed) - - [storyStoreV7 enabled by default](#storystorev7-enabled-by-default) - - [Webpack4 support discontinued](#webpack4-support-discontinued) - [Framework field mandatory](#framework-field-mandatory) - [frameworkOptions renamed](#frameworkoptions-renamed) - [TypeScript: StorybookConfig type moved](#typescript-storybookconfig-type-moved) + - [Titles are statically computed](#titles-are-statically-computed) - [Framework standalone build moved](#framework-standalone-build-moved) - - [Docs modern inline rendering by default](#docs-modern-inline-rendering-by-default) - - [Babel mode v7 exclusively](#babel-mode-v7-exclusively) - - [7.0 feature flags removed](#70-feature-flags-removed) - - [CLI option `--use-npm` deprecated](#cli-option---use-npm-deprecated) - - [Vite builder uses vite config automatically](#vite-builder-uses-vite-config-automatically) - - [Vite cache moved to node\_modules/.cache/.vite-storybook](#vite-cache-moved-to-node_modulescachevite-storybook) - - [SvelteKit needs the `@storybook/sveltekit` framework](#sveltekit-needs-the-storybooksveltekit-framework) - - [Removed docs.getContainer and getPage parameters](#removed-docsgetcontainer-and-getpage-parameters) - - [Removed STORYBOOK\_REACT\_CLASSES global](#removed-storybook_react_classes-global) - - [Icons API changed](#icons-api-changed) - - ['config' preset entry replaced with 'previewAnnotations'](#config-preset-entry-replaced-with-previewannotations) - - [Dropped support for Angular 12 and below](#dropped-support-for-angular-12-and-below) - - [Addon-backgrounds: Removed deprecated grid parameter](#addon-backgrounds-removed-deprecated-grid-parameter) - - [Addon-docs: Removed deprecated blocks.js entry](#addon-docs-removed-deprecated-blocksjs-entry) - - [Addon-a11y: Removed deprecated withA11y decorator](#addon-a11y-removed-deprecated-witha11y-decorator) + - [Change of root html IDs](#change-of-root-html-ids) - [Stories glob matches MDX files](#stories-glob-matches-mdx-files) - [Add strict mode](#add-strict-mode) + - [Babel mode v7 exclusively](#babel-mode-v7-exclusively) + - [7.0 feature flags removed](#70-feature-flags-removed) + - [Core addons](#core-addons) + - [Removed auto injection of @storybook/addon-actions decorator](#removed-auto-injection-of-storybookaddon-actions-decorator) + - [Addon-backgrounds: Removed deprecated grid parameter](#addon-backgrounds-removed-deprecated-grid-parameter) + - [Addon-a11y: Removed deprecated withA11y decorator](#addon-a11y-removed-deprecated-witha11y-decorator) + - [Vite](#vite) + - [Vite builder uses Vite config automatically](#vite-builder-uses-vite-config-automatically) + - [Vite cache moved to node\_modules/.cache/.vite-storybook](#vite-cache-moved-to-node_modulescachevite-storybook) + - [Webpack](#webpack) + - [Webpack4 support discontinued](#webpack4-support-discontinued) + - [Postcss removed](#postcss-removed) - [Removed DLL flags](#removed-dll-flags) + - [Framework-specific](#framework-specific) - [Angular: Drop support for Angular \< 14](#angular-drop-support-for-angular--14) - [Angular: Drop support for calling Storybook directly](#angular-drop-support-for-calling-storybook-directly) - [Angular: Removed legacy renderer](#angular-removed-legacy-renderer) + - [SvelteKit: needs the `@storybook/sveltekit` framework](#sveltekit-needs-the-storybooksveltekit-framework) + - [Vue3: replaced app export with setup](#vue3-replaced-app-export-with-setup) + - [Addon authors](#addon-authors) + - [register.js removed](#registerjs-removed) + - [No more default export from `@storybook/addons`](#no-more-default-export-from-storybookaddons) + - [No more configuration for manager](#no-more-configuration-for-manager) + - [Icons API changed](#icons-api-changed) + - [Removed global client APIs](#removed-global-client-apis) - [Docs Changes](#docs-changes) - [Standalone docs files](#standalone-docs-files) - [Referencing stories in docs files](#referencing-stories-in-docs-files) @@ -54,15 +50,21 @@ - [Default docs styles will leak into non-story user components](#default-docs-styles-will-leak-into-non-story-user-components) - [Explicit `` elements are no longer syntax highlighted](#explicit-code-elements-are-no-longer-syntax-highlighted) - [Dropped source loader / storiesOf static snippets](#dropped-source-loader--storiesof-static-snippets) + - [Removed docs.getContainer and getPage parameters](#removed-docsgetcontainer-and-getpage-parameters) + - [Addon-docs: Removed deprecated blocks.js entry](#addon-docs-removed-deprecated-blocksjs-entry) - [Dropped addon-docs manual babel configuration](#dropped-addon-docs-manual-babel-configuration) - [Dropped addon-docs manual configuration](#dropped-addon-docs-manual-configuration) - [Autoplay in docs](#autoplay-in-docs) - - [7.0 Deprecations](#70-deprecations) + - [Removed STORYBOOK\_REACT\_CLASSES global](#removed-storybook_react_classes-global) + - [7.0 Deprecations and default changes](#70-deprecations-and-default-changes) + - [storyStoreV7 enabled by default](#storystorev7-enabled-by-default) - [`Story` type deprecated](#story-type-deprecated) - [`ComponentStory`, `ComponentStoryObj`, `ComponentStoryFn` and `ComponentMeta` types are deprecated](#componentstory-componentstoryobj-componentstoryfn-and-componentmeta-types-are-deprecated) - [Renamed `renderToDOM` to `renderToCanvas`](#renamed-rendertodom-to-rendertocanvas) - [Renamed `XFramework` to `XRenderer`](#renamed-xframework-to-xrenderer) - [Renamed `DecoratorFn` to `Decorator`](#renamed-decoratorfn-to-decorator) + - [CLI option `--use-npm` deprecated](#cli-option---use-npm-deprecated) + - ['config' preset entry replaced with 'previewAnnotations'](#config-preset-entry-replaced-with-previewannotations) - [From version 6.4.x to 6.5.0](#from-version-64x-to-650) - [Vue 3 upgrade](#vue-3-upgrade) - [React18 new root API](#react18-new-root-api) @@ -267,14 +269,164 @@ ## From version 6.5.x to 7.0.0 -### Alpha release notes - -Storybook 7.0 is in early alpha. During the alpha, we are making a large number of breaking changes. We may also break the breaking changes based on what we learn during the development cycle. When 7.0 goes to beta, we will start stabilizing and adding various auto-migrations to help users upgrade more easily. - -In the meantime, these migration notes are the best available documentation on things you should know upgrading to 7.0. +A number of these changes can be made automatically by the Storybook CLI. To take advantage of these "automigrations", run `npx storybook@next upgrade --prerelease` or `pnpx storybook@next upgrade --prerelease`. ### 7.0 breaking changes +#### Dropped support for Node 15 and below + +Storybook 7.0 requires **Node 16** or above. If you are using an older version of Node, you will need to upgrade or keep using Storybook 6 in the meantime. + +#### Modern browser support + +Starting in Storybook 7.0, Storybook will no longer support IE11, amongst other legacy browser versions. +We now transpile our code with a target of `chrome >= 100` and node code is transpiled with a target of `node >= 16`. + +This means code-features such as (but not limited to) `async/await`, arrow-functions, `const`,`let`, etc will exist in the code at runtime, and thus the runtime environment must support it. +Not just the runtime needs to support it, but some legacy loaders for Webpack or other transpilation tools might need to be updated as well. For example, certain versions of Webpack 4 had parsers that could not parse the new syntax (e.g. optional chaining). + +Some addons or libraries might depended on this legacy browser support, and thus might break. You might get an error like: + +``` +regeneratorRuntime is not defined +``` + +To fix these errors, the addon will have to be re-released with a newer browser-target for transpilation. This often looks something like this (but it's dependent on the build system the addon uses): + +```js +// babel.config.js +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + shippedProposals: true, + useBuiltIns: 'usage', + corejs: '3', + modules: false, + targets: { chrome: '100' }, + }, + ], + ], +}; +``` + +Here's an example PR to one of the Storybook addons: https://github.com/storybookjs/addon-coverage/pull/3 doing just that. + +#### React peer dependencies required + +_Has automigration_ + +Starting in 7.0, `react` and `react-dom` are now required peer dependencies of Storybook when using addon-docs (or docs via addon-essentials). + +Storybook uses `react` in a variety of docs-related packages. In the past, we've done various trickery hide this from non-React users. However, with stricter peer dependency handling by `npm8`, `npm`, and `yarn pnp` those tricks have started to cause problems for those users. Rather than resorting to even more complicated tricks, we are making `react` and `react-dom` required peer dependencies. + +To upgrade manually, add any version of `react` and `react-dom` as devDependencies using your package manager of choice, e.g. + +``` +npm add react react-dom --dev +``` + +#### start-storybook / build-storybook binaries removed + +_Has automigration_ + +SB6.x framework packages shipped binaries called `start-storybook` and `build-storybook`. + +In SB7.0, we've removed these binaries and replaced them with new commands in Storybook's CLI: `storybook dev` and `storybook build`. These commands will look for the `framework` field in your `.storybook/main.js` config--[which is now required](#framework-field-mandatory)--and use that to determine how to start/build your Storybook. The benefit of this change is that it is now possible to install multiple frameworks in a project without having to worry about hoisting issues. + +A typical Storybook project includes two scripts in your projects `package.json`: + +```json +{ + "scripts": { + "storybook": "start-storybook ", + "build-storybook": "build-storybook " + } +} +``` + +To convert this project to 7.0: + +```json +{ + "scripts": { + "storybook": "storybook dev ", + "build-storybook": "storybook build " + }, + "devDependencies": { + "storybook": "next" + } +} +``` + +The new CLI commands remove the following flags: + +| flag | migration | +| -------- | --------------------------------------------------------------------------------------------- | +| --modern | No migration needed. [All ESM code is modern in SB7](#modern-esm--ie11-support-discontinued). | + +#### Framework field mandatory + +_Has automigration_ + +In 6.4 we introduced a new `main.js` field called [`framework`](#mainjs-framework-field). Starting in 7.0, this field is mandatory. +The value of the `framework` field has also changed. + +In 6.4, valid values included `@storybook/react`, `@storybook/vue`, etc. + +In 7.0, frameworks also specify the builder to be used. For example, The current list of frameworks include: + +- `@storybook/angular` +- `@storybook/ember` +- `@storybook/html-vite` +- `@storybook/html-webpack5` +- `@storybook/nextjs` +- `@storybook/preact-vite` +- `@storybook/preact-webpack5` +- `@storybook/react-vite` +- `@storybook/react-webpack5` +- `@storybook/server-webpack5` +- `@storybook/svelte-vite` +- `@storybook/svelte-webpack5` +- `@storybook/sveltekit` +- `@storybook/vue-vite` +- `@storybook/vue-webpack5` +- `@storybook/vue3-vite` +- `@storybook/vue3-webpack5` +- `@storybook/web-components-vite` +- `@storybook/web-components-webpack5` + +We will be expanding this list over the course of the 7.0 development cycle. More info on the rationale here: [Frameworks RFC](https://www.notion.so/chromatic-ui/Frameworks-RFC-89f8aafe3f0941ceb4c24683859ed65c). + +#### frameworkOptions renamed + +In 7.0, the `main.js` fields `reactOptions` and `angularOptions` have been renamed. They are now options on the `framework` field: + +```js +module.exports = { + framework: { + name: '@storybook/react-webpack5', + options: { fastRefresh: true }, + }, +}; +``` + +#### TypeScript: StorybookConfig type moved + +If you are using TypeScript you should import the `StorybookConfig` type from your framework package. + +For example: + +```ts +import type { StorybookConfig } from '@storybook/react-vite'; +const config: StorybookConfig = { + framework: '@storybook/react-vite', + // ... your configuration +}; +export default config; +``` + #### 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: @@ -316,284 +468,6 @@ module.exports = { }; ``` -#### 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. - -Instead, use `export const parameters = {};` and `export const decorators = [];` in your `.storybook/preview.js`. Addon authors similarly should use such an export in a preview entry file (see [Preview entries](https://github.com/storybookjs/storybook/blob/next/docs/addons/writing-presets.md#preview-entries)). - -#### Dropped support for Node 15 and below - -Storybook 7.0 requires **Node 16** or above. If you are using an older version of Node, you will need to upgrade or keep using Storybook 6 in the meantime. - -#### React peer dependencies required - -Starting in 7.0, `react` and `react-dom` are now required peer dependencies of Storybook. - -Storybook uses `react` in a variety of packages. In the past, we've done various trickery hide this from non-React users. However, with stricter peer dependency handling by `npm8`, `npm`, and `yarn pnp` those tricks have started to cause problems for those users. Rather than resorting to even more complicated tricks, we are making `react` and `react-dom` required peer dependencies. - -To upgrade manually, add any version of `react` and `react-dom` as devDependencies using your package manager of choice, e.g. - -``` -npm add react react-dom --dev -``` - -#### Postcss removed - -Storybook 6.x installed postcss by default. In 7.0 built-in support has been removed. IF you need it, you can add it back using [`@storybook/addon-postcss`](https://github.com/storybookjs/addon-postcss). - -#### Vue3 replaced app export with setup - -In 6.x `@storybook/vue3` exported a Vue application instance called `app`. In 7.0, this has been replaced by a `setup` function that can be used to initialize the application in your `.storybook/preview.js`: - -Before: - -```js -import { app } from '@storybook/vue3'; -import Button from './Button.vue'; - -app.component('GlobalButton', Button); -``` - -After: - -```js -import { setup } from '@storybook/vue3'; -import Button from './Button.vue'; - -setup((app) => { - app.component('GlobalButton', Button); -}); -``` - -#### removed auto injection of @storybook/addon-actions decorator - -The `withActions` decorator is no longer automatically added to stories. This is because it is really only used in the html renderer, for all other renderers it's redundant. -If you are using the html renderer and use the `handles` parameter, you'll need to manually add the `withActions` decorator: - -```diff -import globalThis from 'global'; -+import { withActions } from '@storybook/addon-actions/decorator'; - -export default { - component: globalThis.Components.Button, - args: { - label: 'Click Me!', - }, - parameters: { - chromatic: { disable: true }, - }, -}; -export const Basic = { - parameters: { - handles: [{ click: 'clicked', contextmenu: 'right clicked' }], - }, -+ decorators: [withActions], -}; -``` - -#### register.js removed - -In SB 6.x and earlier, addons exported a `register.js` entry point by convention, and users would import this in `.storybook/manager.js`. This was [deprecated in SB 6.5](#deprecated-registerjs) - -In 7.0, most of Storybook's addons now export a `manager.js` entry point, which is automatically registered in Storybook's manager when the addon is listed in `.storybook/main.js`'s `addons` field. - -If your `.manager.js` config references `register.js` of any of the following addons, you can remove it: `a11y`, `actions`, `backgrounds`, `controls`, `interactions`, `jest`, `links`, `measure`, `outline`, `toolbars`, `viewport`. - -#### Change of root html IDs - -The root ID unto which storybook renders stories is renamed from `root` to `#storybook-root` to avoid conflicts with user's code. - -#### No more default export from `@storybook/addons` - -The default export from `@storybook/addons` has been removed. Please use the named exports instead: - -```js -import { addons } from '@storybook/addons'; -``` - -The named export has been available since 6.0 or earlier, so your updated code will be backwards-compatible with older versions of Storybook. - -#### Modern browser support - -Starting in storybook 7.0, storybook will no longer support IE11, amongst other legacy browser versions. -We now transpile our code with a target of `chrome >= 100` and node code is transpiled with a target of `node >= 16`. - -This means code-features such as (but not limited to) `async/await`, arrow-functions, `const`,`let`, etc will exist in the code at runtime, and thus the runtime environment must support it. -Not just the runtime needs to support it, but some legacy loaders for webpack or other transpilation tools might need to be updated as well. For example, certain versions of webpack 4 had parsers that could not parse the new syntax (e.g. optional chaining). - -Some addons or libraries might depended on this legacy browser support, and thus might break. You might get an error like: - -``` -regeneratorRuntime is not defined -``` - -To fix these errors, the addon will have to be re-released with a newer browser-target for transpilation. This often looks something like this (but it's dependent on the build system the addon uses): - -```js -// babel.config.js -module.exports = { - presets: [ - [ - '@babel/preset-env', - { - shippedProposals: true, - useBuiltIns: 'usage', - corejs: '3', - modules: false, - targets: { chrome: '100' }, - }, - ], - ], -}; -``` - -Here's an example PR to one of the storybook addons: https://github.com/storybookjs/addon-coverage/pull/3 doing just that. - -#### No more configuration for manager - -The storybook manager is no longer built with webpack. Now it's built with esbuild. -Therefore, it's no longer possible to configure the manager. Esbuild comes preconfigured to handle importing CSS, and images. - -If you're currently loading files other than CSS or images into the manager, you'll need to make changes so the files get converted to JS before publishing your addon. - -This means the preset value `managerWebpack` is no longer respected, and should be removed from presets and `main.js` files. - -Addons that run in the manager can depend on `react` and `@storybook/*` packages directly. They do not need to be peerDependencies. -But very importantly, the build system ensures there will only be 1 version of these packages at runtime. The version will come from the `@storybook/ui` package, and not from the addon. -For this reason it's recommended to have these dependencies as `devDependencies` in your addon's `package.json`. - -The full list of packages that Storybook's manager bundler makes available for addons is here: https://github.com/storybookjs/storybook/blob/next/code/lib/ui/src/globals/types.ts - -Addons in the manager will no longer be bundled together anymore, which means that if 1 fails, it doesn't break the whole manager. -Each addon is imported into the manager as an ESM module that's bundled separately. - -#### start-storybook / build-storybook binaries removed - -SB6.x framework packages shipped binaries called `start-storybook` and `build-storybook`. - -In SB7.0, we've removed these binaries and replaced them with new commands in Storybook's CLI: `storybook dev` and `storybook build`. These commands will look for the `framework` field in your `.storybook/main.js` config--[which is now required](#framework-field-mandatory)--and use that to determine how to start/build your storybook. The benefit of this change is that it is now possible to install multiple frameworks in a project without having to worry about hoisting issues. - -A typical storybook project includes two scripts in your projects `package.json`: - -```json -{ - "scripts": { - "storybook": "start-storybook ", - "build-storybook": "build-storybook " - } -} -``` - -To convert this project to 7.0: - -```json -{ - "scripts": { - "storybook": "storybook dev ", - "build-storybook": "storybook build " - }, - "devDependencies": { - "storybook": "next" - } -} -``` - -The new CLI commands remove the following flags: - -| flag | migration | -| -------- | --------------------------------------------------------------------------------------------- | -| --modern | No migration needed. [All ESM code is modern in SB7](#modern-esm--ie11-support-discontinued). | - -#### storyStoreV7 enabled by default - -SB6.4 introduced [Story Store V7](#story-store-v7), an optimization which allows code splitting for faster build and load times. This was an experimental, opt-in change and you can read more about it in [the migration notes below](#story-store-v7). TLDR: you can't use the legacy `storiesOf` API or dynamic titles in CSF. - -Now in 7.0, Story Store V7 is the default. You can opt-out of it by setting the feature flag in `.storybook/main.js`: - -```js -module.exports = { - features: { - storyStoreV7: false, - }, -}; -``` - -During the 7.0 dev cycle we will be preparing recommendations and utilities to make it easier for `storiesOf` users to upgrade. - -#### Webpack4 support discontinued - -SB7.0 no longer supports Webpack4. - -Depending on your project specifics, it might be possible to run your Storybook using the webpack5 builder without error. - -If you are running into errors, you can upgrade your project to Webpack5 or you can try debugging those errors. - -To upgrade: - -- If you're configuring webpack directly, see the Webpack5 [release announcement](https://webpack.js.org/blog/2020-10-10-webpack-5-release/) and [migration guide](https://webpack.js.org/migrate/5). -- If you're using Create React App, see the [migration notes](https://github.com/facebook/create-react-app/blob/main/CHANGELOG.md#migrating-from-40x-to-500) to upgrade from V4 (Webpack4) to 5 - -During the 7.0 dev cycle we will be updating this section with useful resources as we run across them. - -#### Framework field mandatory - -In 6.4 we introduced a new `main.js` field called [`framework`](#mainjs-framework-field). Starting in 7.0, this field is mandatory. -The value of the `framework` field has also changed. - -In 6.4, valid values included `@storybook/react`, `@storybook/vue`, etc. - -In 7.0, frameworks also specify the builder to be used. For example, The current list of frameworks include: - -- `@storybook/angular` -- `@storybook/html-webpack5` -- `@storybook/nextjs` -- `@storybook/preact-webpack5` -- `@storybook/react-webpack5` -- `@storybook/react-vite` -- `@storybook/server-webpack5` -- `@storybook/svelte-webpack5` -- `@storybook/svelte-vite` -- `@storybook/sveltekit` -- `@storybook/vue-webpack5` -- `@storybook/vue-vite` -- `@storybook/vue3-webpack5` -- `@storybook/vue3-vite` -- `@storybook/web-components-webpack5` -- `@storybook/web-components-vite` - -We will be expanding this list over the course of the 7.0 development cycle. More info on the rationale here: [Frameworks RFC](https://www.notion.so/chromatic-ui/Frameworks-RFC-89f8aafe3f0941ceb4c24683859ed65c). - -#### frameworkOptions renamed - -In 7.0, the `main.js` fields `reactOptions` and `angularOptions` have been renamed. They are now options on the `framework` field: - -```js -module.exports = { - framework: { - name: '@storybook/react-webpack5', - options: { fastRefresh: true }, - }, -}; -``` - -#### TypeScript: StorybookConfig type moved - -If you are using TypeScript you should import the `StorybookConfig` type from your framework package. - -For example: - -```ts -import type { StorybookConfig } from '@storybook/react-vite'; - -const config: StorybookConfig = { - framework: '@storybook/react-vite', - // ... your configuration -}; - -export default config; -``` - #### Framework standalone build moved In 7.0 the location of the standalone node API has moved to `@storybook/core-server`. @@ -614,125 +488,9 @@ const options = {}; build(options).then(() => console.log('done')); ``` -#### Docs modern inline rendering by default +#### Change of root html IDs -Storybook docs has a new rendering mode called "modern inline rendering" which unifies the way stories are rendered in Docs mode and in the canvas (aka story mode). It is still being stabilized in 7.0 dev cycle. If you run into trouble with inline rendering in docs, you can opt out of modern inline rendering in your `.storybook/main.js`: - -```js -module.exports = { - features: { - modernInlineRender: false, - }, -}; -``` - -#### Babel mode v7 exclusively - -Storybook now uses [Babel mode v7](#babel-mode-v7) exclusively. In 6.x, Storybook provided its own babel settings out of the box. Now, Storybook's uses your project's babel settings (`.babelrc`, `babel.config.js`, etc.) instead. - -In the new mode, Storybook expects you to provide a configuration file. If you want a configuration file that's equivalent to the 6.x default, you can run the following command in your project directory: - -```sh -npx sb@next babelrc -``` - -This will create a `.babelrc.json` file. This file includes a bunch of babel plugins, so you may need to add new package devDependencies accordingly. - -#### 7.0 feature flags removed - -Storybook uses temporary feature flags to opt-in to future breaking changes or opt-in to legacy behaviors. For example: - -```js -module.exports = { - features: { - emotionAlias: false, - }, -}; -``` - -In 7.0 we've removed the following feature flags: - -| flag | migration instructions | -| ------------------- | ---------------------------------------------------- | -| `emotionAlias` | This flag is no longer needed and should be deleted. | -| `breakingChangesV7` | This flag is no longer needed and should be deleted. | - -#### CLI option `--use-npm` deprecated - -With increased support for more package managers (pnpm), we have introduced the `--package-manager` CLI option. Please use `--package-manager=npm` to force NPM to be used to install dependencies when running Storybook CLI commands. Other valid options are `pnpm`, `yarn1`, and `yarn2` (`yarn2` is for versions 2 and higher). - -#### Vite builder uses vite config automatically - -When using a [Vite-based framework](#framework-field-mandatory), Storybook will automatically use your `vite.config.(ctm)js` config file starting in 7.0. -Some settings will be overridden by storybook so that it can function properly, and the merged settings can be modified using `viteFinal` in `.storybook/main.js` (see the [Storybook Vite configuration docs](https://storybook.js.org/docs/react/builders/vite#configuration)). -If you were using `viteFinal` in 6.5 to simply merge in your project's standard vite config, you can now remove it. - -For Svelte projects this means that the `svelteOptions` property in the `main.js` config should be omitted, as it will be loaded automatically via the project's `vite.config.js`. An exception to this is when the project needs different Svelte options for Storybook than the Vite config provides for the application itself. - -#### Vite cache moved to node_modules/.cache/.vite-storybook - -Previously, Storybook's Vite builder placed cache files in node_modules/.vite-storybook. However, it's more common for tools to place cached files into `node_modules/.cache`, and putting them there makes it quick and easy to clear the cache for multiple tools at once. We don't expect this change will cause any problems, but it's something that users of Storybook Vite projects should know about. It can be configured by setting `cacheDir` in `viteFinal` within `.storybook/main.js` [Storybook Vite configuration docs](https://storybook.js.org/docs/react/builders/vite#configuration)). - -#### SvelteKit needs the `@storybook/sveltekit` framework - -SvelteKit projects need to use the `@storybook/sveltekit` framework in the `main.js` file. Previously it was enough to just setup Storybook with Svelte+Vite, but that is no longer the case. - -```js -// .storybook/main.js -export default { - framework: '@storybook/sveltekit', -}; -``` - -Also see the note in [Vite builder uses vite config automatically](#vite-builder-uses-vite-config-automatically) about removing `svelteOptions`. - -#### Removed docs.getContainer and getPage parameters - -It is no longer possible to set `parameters.docs.getContainer()` and `getPage()`. Instead use `parameters.docs.container` or `parameters.docs.page` directly. - -#### Removed STORYBOOK_REACT_CLASSES global - -This was a legacy global variable from the early days of react docgen. If you were using this variable, you can instead use docgen information which is added directly to components using `.__docgenInfo`. - -#### Icons API changed - -For addon authors who use the `Icons` component, its API has been updated in Storybook 7. - -```diff -export interface IconsProps extends ComponentProps { -- icon?: IconKey; -- symbol?: IconKey; -+ icon: IconType; -+ useSymbol?: boolean; -} -``` - -Full change here: https://github.com/storybookjs/storybook/pull/18809 - -#### 'config' preset entry replaced with 'previewAnnotations' - -The preset field `'config'` has been replaced with `'previewAnnotations'`. `'config'` is now deprecated and will be removed in Storybook 8.0. - -Additionally, the internal field `'previewEntries'` has been removed. If you need a preview entry, just use a `'previewAnnotations'` file and don't export anything. - -#### Dropped support for Angular 12 and below - -Official [Angular 12 LTS support ends Nov 2022](https://angular.io/guide/releases#actively-supported-versions). With that, Storybook also drops its support -for Angular 12 and below. - -In order to use Storybook 7.0, you need to upgrade to at least Angular 13. - -#### Addon-backgrounds: Removed deprecated grid parameter - -Starting in 7.0 the `grid.cellSize` parameter should now be `backgrounds.grid.cellSize`. This was [deprecated in SB 6.1](#deprecated-grid-parameter). - -#### Addon-docs: Removed deprecated blocks.js entry - -Removed `@storybook/addon-docs/blocks` entry. Import directly from `@storybook/blocks` instead. This was [deprecated in SB 6.3](#deprecated-scoped-blocks-imports). - -#### Addon-a11y: Removed deprecated withA11y decorator - -We removed the deprecated `withA11y` decorator. This was [deprecated in 6.0](#removed-witha11y-decorator) +The root ID unto which Storybook renders stories is renamed from `root` to `#storybook-root` to avoid conflicts with user's code. #### Stories glob matches MDX files @@ -764,23 +522,225 @@ Starting in 7.0, Storybook's build tools add [`"use strict"`](https://developer. If user code in `.storybook/preview.js` or stories relies on "sloppy" mode behavior, it will need to be updated. As a workaround, it is sometimes possible to move the sloppy mode code inside a script tag in `.storybook/preview-head.html`. +#### Babel mode v7 exclusively + +_Has automigration_ + +Storybook now uses [Babel mode v7](#babel-mode-v7) exclusively. In 6.x, Storybook provided its own babel settings out of the box. Now, Storybook's uses your project's babel settings (`.babelrc`, `babel.config.js`, etc.) instead. + +In the new mode, Storybook expects you to provide a configuration file. If you want a configuration file that's equivalent to the 6.x default, you can run the following command in your project directory: + +```sh +npx sb@next babelrc +``` + +This will create a `.babelrc.json` file. This file includes a bunch of babel plugins, so you may need to add new package devDependencies accordingly. + +#### 7.0 feature flags removed + +Storybook uses temporary feature flags to opt-in to future breaking changes or opt-in to legacy behaviors. For example: + +```js +module.exports = { + features: { + emotionAlias: false, + }, +}; +``` + +In 7.0 we've removed the following feature flags: + +| flag | migration instructions | +| ------------------- | ----------------------------------------------------------- | +| `emotionAlias` | This flag is no longer needed and should be deleted. | +| `breakingChangesV7` | This flag is no longer needed and should be deleted. | +| `babelModeV7` | See [Babel mode v7 exclusively](#babel-mode-v7-exclusively) | + +### Core addons + +#### Removed auto injection of @storybook/addon-actions decorator + +The `withActions` decorator is no longer automatically added to stories. This is because it is really only used in the html renderer, for all other renderers it's redundant. +If you are using the html renderer and use the `handles` parameter, you'll need to manually add the `withActions` decorator: + +```diff +import globalThis from 'global'; ++import { withActions } from '@storybook/addon-actions/decorator'; + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + parameters: { + chromatic: { disable: true }, + }, +}; +export const Basic = { + parameters: { + handles: [{ click: 'clicked', contextmenu: 'right clicked' }], + }, ++ decorators: [withActions], +}; +``` + +#### Addon-backgrounds: Removed deprecated grid parameter + +Starting in 7.0 the `grid.cellSize` parameter should now be `backgrounds.grid.cellSize`. This was [deprecated in SB 6.1](#deprecated-grid-parameter). + +#### Addon-a11y: Removed deprecated withA11y decorator + +We removed the deprecated `withA11y` decorator. This was [deprecated in 6.0](#removed-witha11y-decorator) + +### Vite + +#### Vite builder uses Vite config automatically + +When using a [Vite-based framework](#framework-field-mandatory), Storybook will automatically use your `vite.config.(ctm)js` config file starting in 7.0. +Some settings will be overridden by Storybook so that it can function properly, and the merged settings can be modified using `viteFinal` in `.storybook/main.js` (see the [Storybook Vite configuration docs](https://storybook.js.org/docs/react/builders/vite#configuration)). +If you were using `viteFinal` in 6.5 to simply merge in your project's standard Vite config, you can now remove it. + +For Svelte projects this means that the `svelteOptions` property in the `main.js` config should be omitted, as it will be loaded automatically via the project's `vite.config.js`. An exception to this is when the project needs different Svelte options for Storybook than the Vite config provides for the application itself. + +#### Vite cache moved to node_modules/.cache/.vite-storybook + +Previously, Storybook's Vite builder placed cache files in node_modules/.vite-storybook. However, it's more common for tools to place cached files into `node_modules/.cache`, and putting them there makes it quick and easy to clear the cache for multiple tools at once. We don't expect this change will cause any problems, but it's something that users of Storybook Vite projects should know about. It can be configured by setting `cacheDir` in `viteFinal` within `.storybook/main.js` [Storybook Vite configuration docs](https://storybook.js.org/docs/react/builders/vite#configuration)). + +### Webpack + +#### Webpack4 support discontinued + +SB7.0 no longer supports Webpack4. + +Depending on your project specifics, it might be possible to run your Storybook using the webpack5 builder without error. + +If you are running into errors, you can upgrade your project to Webpack5 or you can try debugging those errors. + +To upgrade: + +- If you're configuring Webpack directly, see the Webpack5 [release announcement](https://webpack.js.org/blog/2020-10-10-webpack-5-release/) and [migration guide](https://webpack.js.org/migrate/5). +- If you're using Create React App, see the [migration notes](https://github.com/facebook/create-react-app/blob/main/CHANGELOG.md#migrating-from-40x-to-500) to upgrade from V4 (Webpack4) to 5 + +During the 7.0 dev cycle we will be updating this section with useful resources as we run across them. + +#### Postcss removed + +Storybook 6.x installed postcss by default. In 7.0 built-in support has been removed for Webpack-based frameworks. If you need it, you can add it back using [`@storybook/addon-postcss`](https://github.com/storybookjs/addon-postcss). + #### Removed DLL flags Earlier versions of Storybook used Webpack DLLs as a performance crutch. In 6.1, we've removed Storybook's built-in DLLs and have deprecated the command-line parameters `--no-dll` and `--ui-dll`. In 7.0 those options are removed. +### Framework-specific + #### Angular: Drop support for Angular < 14 Starting in 7.0, we drop support for Angular < 14 #### Angular: Drop support for calling Storybook directly -In Storybook 6.4 we have deprecated calling Storybook directly (`npm run storybook`) and removed support for it in Storybook 7.0 entirely. Instead you have to set up -the Storybook builder in your `angular.json` and execute `ng run :storybook` to start Storybook. Please visit https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular to set up Storybook for Angular correctly. +In Storybook 6.4 we have deprecated calling Storybook directly (`npm run storybook`) for Angular. In Storybook 7.0, we've removed it entirely. Instead you have to set up the Storybook builder in your `angular.json` and execute `ng run :storybook` to start Storybook. Please visit https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular to set up Storybook for Angular correctly. #### Angular: Removed legacy renderer The `parameters.angularLegacyRendering` option is removed. You cannot use the old legacy renderer anymore. +#### SvelteKit: needs the `@storybook/sveltekit` framework + +SvelteKit projects need to use the `@storybook/sveltekit` framework in the `main.js` file. Previously it was enough to just setup Storybook with Svelte+Vite, but that is no longer the case. + +```js +// .storybook/main.js +export default { + framework: '@storybook/sveltekit', +}; +``` + +Also see the note in [Vite builder uses Vite config automatically](#vite-builder-uses-vite-config-automatically) about removing `svelteOptions`. + +#### Vue3: replaced app export with setup + +In 6.x `@storybook/vue3` exported a Vue application instance called `app`. In 7.0, this has been replaced by a `setup` function that can be used to initialize the application in your `.storybook/preview.js`: + +Before: + +```js +import { app } from '@storybook/vue3'; +import Button from './Button.vue'; + +app.component('GlobalButton', Button); +``` + +After: + +```js +import { setup } from '@storybook/vue3'; +import Button from './Button.vue'; + +setup((app) => { + app.component('GlobalButton', Button); +}); +``` + +### Addon authors + +#### register.js removed + +In SB 6.x and earlier, addons exported a `register.js` entry point by convention, and users would import this in `.storybook/manager.js`. This was [deprecated in SB 6.5](#deprecated-registerjs) + +In 7.0, most of Storybook's addons now export a `manager.js` entry point, which is automatically registered in Storybook's manager when the addon is listed in `.storybook/main.js`'s `addons` field. + +If your `.manager.js` config references `register.js` of any of the following addons, you can remove it: `a11y`, `actions`, `backgrounds`, `controls`, `interactions`, `jest`, `links`, `measure`, `outline`, `toolbars`, `viewport`. + +#### No more default export from `@storybook/addons` + +The default export from `@storybook/addons` has been removed. Please use the named exports instead: + +```js +import { addons } from '@storybook/addons'; +``` + +The named export has been available since 6.0 or earlier, so your updated code will be backwards-compatible with older versions of Storybook. + +#### No more configuration for manager + +The Storybook manager is no longer built with Webpack. Now it's built with esbuild. +Therefore, it's no longer possible to configure the manager. Esbuild comes preconfigured to handle importing CSS, and images. + +If you're currently loading files other than CSS or images into the manager, you'll need to make changes so the files get converted to JS before publishing your addon. + +This means the preset value `managerWebpack` is no longer respected, and should be removed from presets and `main.js` files. + +Addons that run in the manager can depend on `react` and `@storybook/*` packages directly. They do not need to be peerDependencies. +But very importantly, the build system ensures there will only be 1 version of these packages at runtime. The version will come from the `@storybook/ui` package, and not from the addon. +For this reason it's recommended to have these dependencies as `devDependencies` in your addon's `package.json`. + +The full list of packages that Storybook's manager bundler makes available for addons is here: https://github.com/storybookjs/storybook/blob/next/code/lib/ui/src/globals/types.ts + +Addons in the manager will no longer be bundled together anymore, which means that if 1 fails, it doesn't break the whole manager. +Each addon is imported into the manager as an ESM module that's bundled separately. + +#### Icons API changed + +For addon authors who use the `Icons` component, its API has been updated in Storybook 7. + +```diff +export interface IconsProps extends ComponentProps { +- icon?: IconKey; +- symbol?: IconKey; ++ icon: IconType; ++ useSymbol?: boolean; +} +``` + +Full change here: https://github.com/storybookjs/storybook/pull/18809 + +#### 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. + +Instead, use `export const parameters = {};` and `export const decorators = [];` in your `.storybook/preview.js`. Addon authors similarly should use such an export in a preview entry file (see [Preview entries](https://github.com/storybookjs/storybook/blob/next/docs/addons/writing-presets.md#preview-entries)). + ### Docs Changes The information hierarchy of docs in Storybook has changed in 7.0. The main difference is that each docs is listed in the sidebar as a separate entry, rather than attached to individual stories. @@ -875,7 +835,7 @@ You can change the default template in the same way as in 6.x, using the `docs.p #### Configuring the Docs Container -As in 6.x, you can override the docs container to configure docs further. This the container that each docs entry is rendered inside: +As in 6.x, you can override the docs container to configure docs further. This is the container that each docs entry is rendered inside: ```js // in preview.js @@ -991,11 +951,11 @@ const a = 'This is still a styled code block.'; #### Dropped source loader / storiesOf static snippets -In SB 6.x, Storybook Docs used a webpack loader called `source-loader` to help display static code snippets. This was configurable using the `options.sourceLoaderOptions` field. +In SB 6.x, Storybook Docs used a Webpack loader called `source-loader` to help display static code snippets. This was configurable using the `options.sourceLoaderOptions` field. In SB 7.0, we've moved to a faster, simpler alternative called `csf-plugin` that **only supports CSF**. It is configurable using the `options.csfPluginOptions` field. -If you're using `storiesOf` and want to restore the previous behavior, you can add `source-loader` by hand to your webpack config using the following snippet in `main.js`: +If you're using `storiesOf` and want to restore the previous behavior, you can add `source-loader` by hand to your Webpack config using the following snippet in `main.js`: ```js module.exports = { @@ -1015,13 +975,21 @@ module.exports = { }; ``` +#### Removed docs.getContainer and getPage parameters + +It is no longer possible to set `parameters.docs.getContainer()` and `getPage()`. Instead use `parameters.docs.container` or `parameters.docs.page` directly. + +#### Addon-docs: Removed deprecated blocks.js entry + +Removed `@storybook/addon-docs/blocks` entry. Import directly from `@storybook/blocks` instead. This was [deprecated in SB 6.3](#deprecated-scoped-blocks-imports). + #### Dropped addon-docs manual babel configuration Addon-docs previously accepted `configureJsx` and `mdxBabelOptions` options, which allowed full customization of the babel options used to process markdown and mdx files. This has been simplified in 7.0, with a new option, `jsxOptions`, which can be used to customize the behavior of `@babel/preset-react`. #### Dropped addon-docs manual configuration -Storybook Docs 5.x shipped with instructions for how to manually configure webpack and storybook without the use of Storybook's "presets" feature. Over time, these docs went out of sync. Now in Storybook 7 we have removed support for manual configuration entirely. +Storybook Docs 5.x shipped with instructions for how to manually configure Webpack and Storybook without the use of Storybook's "presets" feature. Over time, these docs went out of sync. Now in Storybook 7 we have removed support for manual configuration entirely. #### Autoplay in docs @@ -1029,7 +997,27 @@ Running play functions in docs is generally tricky, as they can steal focus and If your story depends on a play function to render correctly, _and_ you are confident the function autoplaying won't mess up your docs, you can set `parameters.docs.autoplay = true` to have it auto play. -### 7.0 Deprecations +#### Removed STORYBOOK_REACT_CLASSES global + +This was a legacy global variable from the early days of react docgen. If you were using this variable, you can instead use docgen information which is added directly to components using `.__docgenInfo`. + +### 7.0 Deprecations and default changes + +#### storyStoreV7 enabled by default + +SB6.4 introduced [Story Store V7](#story-store-v7), an optimization which allows code splitting for faster build and load times. This was an experimental, opt-in change and you can read more about it in [the migration notes below](#story-store-v7). TLDR: you can't use the legacy `storiesOf` API or dynamic titles in CSF. + +Now in 7.0, Story Store V7 is the default. You can opt-out of it by setting the feature flag in `.storybook/main.js`: + +```js +module.exports = { + features: { + storyStoreV7: false, + }, +}; +``` + +During the 7.0 dev cycle we will be preparing recommendations and utilities to make it easier for `storiesOf` users to upgrade. #### `Story` type deprecated @@ -1145,6 +1133,16 @@ import type { Args, Decorator } from '@storybook/react'; const withLocale: Decorator = (Story, { args }) => // args has type { [name: string]: any } ``` +#### CLI option `--use-npm` deprecated + +With increased support for more package managers (pnpm), we have introduced the `--package-manager` CLI option. Please use `--package-manager=npm` to force NPM to be used to install dependencies when running Storybook CLI commands. Other valid options are `pnpm`, `yarn1`, and `yarn2` (`yarn2` is for versions 2 and higher). + +#### 'config' preset entry replaced with 'previewAnnotations' + +The preset field `'config'` has been replaced with `'previewAnnotations'`. `'config'` is now deprecated and will be removed in Storybook 8.0. + +Additionally, the internal field `'previewEntries'` has been removed. If you need a preview entry, just use a `'previewAnnotations'` file and don't export anything. + ## From version 6.4.x to 6.5.0 ### Vue 3 upgrade @@ -1198,7 +1196,7 @@ SB6.5 moves framework specializations (e.g. ArgType inference, dynamic snippet r This change should not require any specific migrations on your part if you are using the docs addon as described in the documentation. However, if you are using `react-docgen` or `react-docgen-typescript` information in some custom way outside of `addon-docs`, you should be aware of this change. -In SB6.4, `@storybook/react` added `react-docgen` to its babel settings and `react-docgen-typescript` to its webpack settings. In SB6.5, this only happens if you are using `addon-docs` or `addon-controls`, either directly or indirectly through `addon-essentials`. If you're not using either of those addons, but require that information for some other addon, please configure that manually in your `.storybook/main.js` configuration. You can see the docs configuration here: https://github.com/storybookjs/storybook/blob/next/code/presets/react-webpack/src/framework-preset-react-docs.ts +In SB6.4, `@storybook/react` added `react-docgen` to its babel settings and `react-docgen-typescript` to its Webpack settings. In SB6.5, this only happens if you are using `addon-docs` or `addon-controls`, either directly or indirectly through `addon-essentials`. If you're not using either of those addons, but require that information for some other addon, please configure that manually in your `.storybook/main.js` configuration. You can see the docs configuration here: https://github.com/storybookjs/storybook/blob/next/code/presets/react-webpack/src/framework-preset-react-docs.ts ### Opt-in MDX2 support @@ -1331,7 +1329,7 @@ npx sb@next automigrate ``` -The automigration suite also runs when you create a new project (`sb init`) or when you update storybook (`sb upgrade`). +The automigration suite also runs when you create a new project (`sb init`) or when you update Storybook (`sb upgrade`). ### CRA5 upgrade @@ -1343,7 +1341,7 @@ npx sb@next automigrate ``` -Or you can do the following steps manually to force Storybook to use webpack 5 for building your project: +Or you can do the following steps manually to force Storybook to use Webpack 5 for building your project: ```shell yarn add @storybook/builder-webpack5 @storybook/manager-webpack5 --dev diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index b2a6f9c6c8b..3a2ca3cd57e 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Test component compliance with web accessibility standards", "keywords": [ "a11y", @@ -63,16 +63,16 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/addon-highlight": "7.0.0-beta.29", - "@storybook/channels": "7.0.0-beta.29", - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/addon-highlight": "7.0.0-beta.30", + "@storybook/channels": "7.0.0-beta.30", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "axe-core": "^4.2.0", "lodash": "^4.17.21", "react-resize-detector": "^7.1.2" @@ -104,7 +104,7 @@ "./src/preview.tsx" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Accessibility", "icon": "https://user-images.githubusercontent.com/263385/101991665-47042f80-3c7c-11eb-8f00-64b5a18f498a.png", diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index 9c1bc14550a..84a9dd1926f 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Get UI feedback when an action is performed on an interactive element", "keywords": [ "storybook", @@ -77,14 +77,14 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "dequal": "^2.0.2", "lodash": "^4.17.21", "polished": "^4.2.2", @@ -121,7 +121,7 @@ "./src/preview.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Actions", "unsupportedFrameworks": [ diff --git a/code/addons/actions/src/containers/ActionLogger/index.tsx b/code/addons/actions/src/containers/ActionLogger/index.tsx index 5f3a07941a8..56f12408e08 100644 --- a/code/addons/actions/src/containers/ActionLogger/index.tsx +++ b/code/addons/actions/src/containers/ActionLogger/index.tsx @@ -5,8 +5,8 @@ import type { API } from '@storybook/manager-api'; import { STORY_CHANGED } from '@storybook/core-events'; import { ActionLogger as ActionLoggerComponent } from '../../components/ActionLogger'; -import { EVENT_ID } from '../..'; import type { ActionDisplay } from '../../models'; +import { EVENT_ID } from '../../constants'; interface ActionLoggerProps { active: boolean; diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index b96c6fb5903..28314ff7b31 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Switch backgrounds to view components in different settings", "keywords": [ "addon", @@ -76,14 +76,14 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "memoizerific": "^1.11.3", "ts-dedent": "^2.0.0" }, @@ -112,7 +112,7 @@ "./src/preview.tsx" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Backgrounds", "icon": "https://user-images.githubusercontent.com/263385/101991667-479cc600-3c7c-11eb-96d3-410e936252e7.png", diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index b18e3d20786..6d7ed89481e 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Interact with component inputs dynamically in the Storybook UI", "keywords": [ "addon", @@ -68,15 +68,15 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/blocks": "7.0.0-beta.29", - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/blocks": "7.0.0-beta.30", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "lodash": "^4.17.21", "ts-dedent": "^2.0.0" }, @@ -102,7 +102,7 @@ ], "platform": "browser" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Controls", "icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 83df5234270..212449b4904 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Document component usage and properties in Markdown", "keywords": [ "addon", @@ -103,18 +103,18 @@ "@babel/plugin-transform-react-jsx": "^7.19.0", "@jest/transform": "^29.3.1", "@mdx-js/react": "^2.1.5", - "@storybook/blocks": "7.0.0-beta.29", - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/csf-plugin": "7.0.0-beta.29", - "@storybook/csf-tools": "7.0.0-beta.29", + "@storybook/blocks": "7.0.0-beta.30", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/csf-plugin": "7.0.0-beta.30", + "@storybook/csf-tools": "7.0.0-beta.30", "@storybook/global": "^5.0.0", "@storybook/mdx2-csf": "next", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/postinstall": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/postinstall": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "fs-extra": "^9.0.1", "remark-external-links": "^8.0.0", "remark-slug": "^6.0.0", @@ -141,7 +141,7 @@ "./src/shims/mdx-react-shim.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Docs", "icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png", diff --git a/code/addons/docs/template/stories/stories-mdx/unattached.stories.mdx b/code/addons/docs/template/stories/stories-mdx/unattached.stories.mdx new file mode 100644 index 00000000000..c327ecb7373 --- /dev/null +++ b/code/addons/docs/template/stories/stories-mdx/unattached.stories.mdx @@ -0,0 +1,5 @@ +import { Meta } from '@storybook/addon-docs'; + + + +# Unattached `stories.mdx` file \ No newline at end of file diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 76759a72b59..74304e8e351 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Curated addons to bring out the best of Storybook", "keywords": [ "addon", @@ -119,23 +119,23 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/addon-actions": "7.0.0-beta.29", - "@storybook/addon-backgrounds": "7.0.0-beta.29", - "@storybook/addon-controls": "7.0.0-beta.29", - "@storybook/addon-docs": "7.0.0-beta.29", - "@storybook/addon-highlight": "7.0.0-beta.29", - "@storybook/addon-measure": "7.0.0-beta.29", - "@storybook/addon-outline": "7.0.0-beta.29", - "@storybook/addon-toolbars": "7.0.0-beta.29", - "@storybook/addon-viewport": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", + "@storybook/addon-actions": "7.0.0-beta.30", + "@storybook/addon-backgrounds": "7.0.0-beta.30", + "@storybook/addon-controls": "7.0.0-beta.30", + "@storybook/addon-docs": "7.0.0-beta.30", + "@storybook/addon-highlight": "7.0.0-beta.30", + "@storybook/addon-measure": "7.0.0-beta.30", + "@storybook/addon-outline": "7.0.0-beta.30", + "@storybook/addon-toolbars": "7.0.0-beta.30", + "@storybook/addon-viewport": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", "ts-dedent": "^2.0.0" }, "devDependencies": { - "@storybook/vue": "7.0.0-beta.29", + "@storybook/vue": "7.0.0-beta.30", "typescript": "^4.9.3" }, "peerDependencies": { @@ -166,5 +166,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index eaf10e6879a..92e8226dd88 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Highlight DOM nodes within your stories", "keywords": [ "storybook-addons", @@ -61,9 +61,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.0-beta.29" + "@storybook/preview-api": "7.0.0-beta.30" }, "devDependencies": { "@types/webpack-env": "^1.16.0", @@ -78,7 +78,7 @@ "./src/preview.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "sbmodern": "dist/modern/index.js", "storybook": { "displayName": "Highlight", diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 775277dd91e..5c1ef4f65ce 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Automate, test and debug user interactions", "keywords": [ "storybook-addons", @@ -72,16 +72,16 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/instrumenter": "7.0.0-beta.29", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/instrumenter": "7.0.0-beta.30", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "jest-mock": "^27.0.6", "polished": "^4.2.2", "ts-dedent": "^2.2.0" @@ -118,7 +118,7 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Interactions", "unsupportedFrameworks": [ diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index 253fa258a57..9ac28573ed9 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "React storybook addon that show component jest report", "keywords": [ "addon", @@ -70,13 +70,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", "react-resize-detector": "^7.1.2", "upath": "^1.2.0" }, @@ -105,7 +105,7 @@ ], "platform": "browser" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Jest", "icon": "https://pbs.twimg.com/profile_images/821713465245102080/mMtKIMax_400x400.jpg", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 0d24c501604..e07b24180a9 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Link stories together to build demos and prototypes with your UI components", "keywords": [ "addon", @@ -77,14 +77,14 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/csf": "next", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/router": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/router": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "prop-types": "^15.7.2", "ts-dedent": "^2.0.0" }, @@ -114,7 +114,7 @@ "./src/react/index.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Links", "icon": "https://user-images.githubusercontent.com/263385/101991673-48355c80-3c7c-11eb-9b6e-b627c96a75f6.png", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index c147283d26f..7cf96d64703 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Inspect layouts by visualizing the box model", "keywords": [ "storybook-addons", @@ -75,13 +75,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29" + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30" }, "devDependencies": { "typescript": "~4.9.3" @@ -108,7 +108,7 @@ "./src/preview.tsx" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Measure", "unsupportedFrameworks": [ diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index bdceadc410b..bb4809d1047 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Outline all elements with CSS to help with layout placement and alignment", "keywords": [ "storybook-addons", @@ -78,13 +78,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "ts-dedent": "^2.0.0" }, "devDependencies": { @@ -112,7 +112,7 @@ "./src/preview.tsx" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Outline", "unsupportedFrameworks": [ diff --git a/code/addons/storyshots-core/package.json b/code/addons/storyshots-core/package.json index 501fde00857..6b4128166ba 100644 --- a/code/addons/storyshots-core/package.json +++ b/code/addons/storyshots-core/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Take a code snapshot of every story automatically with Jest", "keywords": [ "addon", @@ -37,12 +37,12 @@ "dependencies": { "@jest/transform": "^29.3.1", "@storybook/babel-plugin-require-context-hook": "1.0.1", - "@storybook/client-api": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/core-webpack": "7.0.0-beta.29", + "@storybook/client-api": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/core-webpack": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "@types/glob": "^7.1.3", "@types/jest-specific-snapshot": "^0.5.6", "core-js": "^3.8.2", @@ -58,11 +58,11 @@ "@angular/core": "^13.3.6", "@angular/platform-browser-dynamic": "^13.3.6", "@emotion/jest": "^11.8.0", - "@storybook/addon-docs": "7.0.0-beta.29", - "@storybook/angular": "7.0.0-beta.29", - "@storybook/react": "7.0.0-beta.29", - "@storybook/vue": "7.0.0-beta.29", - "@storybook/vue3": "7.0.0-beta.29", + "@storybook/addon-docs": "7.0.0-beta.30", + "@storybook/angular": "7.0.0-beta.30", + "@storybook/react": "7.0.0-beta.30", + "@storybook/vue": "7.0.0-beta.30", + "@storybook/vue3": "7.0.0-beta.30", "babel-loader": "^9.1.2", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", @@ -143,7 +143,7 @@ "access": "public" }, "bundler": {}, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Storyshots", "icon": "https://user-images.githubusercontent.com/263385/101991676-48cdf300-3c7c-11eb-8aa1-944dab6ab29b.png", diff --git a/code/addons/storyshots-puppeteer/package.json b/code/addons/storyshots-puppeteer/package.json index ce02ac383c5..0e14adbe9e6 100644 --- a/code/addons/storyshots-puppeteer/package.json +++ b/code/addons/storyshots-puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots-puppeteer", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Image snapshots addition to StoryShots based on puppeteer", "keywords": [ "addon", @@ -36,8 +36,8 @@ "dependencies": { "@axe-core/puppeteer": "^4.2.0", "@storybook/csf": "next", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "@types/jest-image-snapshot": "^5.1.0", "jest-image-snapshot": "^6.0.0" }, @@ -49,7 +49,7 @@ "rimraf": "^3.0.2" }, "peerDependencies": { - "@storybook/addon-storyshots": "7.0.0-beta.29", + "@storybook/addon-storyshots": "7.0.0-beta.30", "puppeteer": ">=2.0.0" }, "peerDependenciesMeta": { @@ -61,5 +61,5 @@ "access": "public" }, "bundler": {}, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index aba9af29eee..139e9086b4a 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "View a story’s source code to see how it works and paste into your app", "keywords": [ "addon", @@ -54,13 +54,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/router": "7.0.0-beta.29", - "@storybook/source-loader": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/router": "7.0.0-beta.30", + "@storybook/source-loader": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", "estraverse": "^5.2.0", "prop-types": "^15.7.2", "react-syntax-highlighter": "^15.5.0" @@ -92,7 +92,7 @@ "./src/preset.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Storysource", "icon": "https://user-images.githubusercontent.com/263385/101991675-48cdf300-3c7c-11eb-9400-58de5ac6daa7.png", diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index 645365cce81..466abf47f32 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Create your own toolbar items that control story rendering", "keywords": [ "addon", @@ -68,11 +68,11 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29" + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30" }, "devDependencies": { "typescript": "~4.9.3" @@ -99,7 +99,7 @@ ], "platform": "browser" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Toolbars", "icon": "https://user-images.githubusercontent.com/263385/101991677-48cdf300-3c7c-11eb-93b4-19b0e3366959.png", diff --git a/code/addons/toolbars/template/stories/preview.ts b/code/addons/toolbars/template/stories/preview.ts index f51f24e743e..c3700955334 100644 --- a/code/addons/toolbars/template/stories/preview.ts +++ b/code/addons/toolbars/template/stories/preview.ts @@ -6,10 +6,10 @@ export const globalTypes = { icon: 'circlehollow', title: 'Theme', items: [ - { value: 'light', icon: 'circlehollow', title: 'light' }, - { value: 'dark', icon: 'circle', title: 'dark' }, - { value: 'side-by-side', icon: 'sidebar', title: 'side by side' }, - { value: 'stacked', icon: 'bottombar', title: 'stacked' }, + { value: 'light', icon: 'sun', title: 'light' }, + { value: 'dark', icon: 'moon', title: 'dark' }, + { value: 'side-by-side', icon: 'sidebyside', title: 'side by side' }, + { value: 'stacked', icon: 'stacked', title: 'stacked' }, ], }, }, diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index 7453665e7d2..aefb7991f96 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Build responsive components by adjusting Storybook’s viewport size and orientation", "keywords": [ "addon", @@ -73,13 +73,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", "memoizerific": "^1.11.3", "prop-types": "^15.7.2" }, @@ -109,7 +109,7 @@ "./src/preview.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59", + "gitHead": "633f95bec79fb65524a7bcae867448b351920831", "storybook": { "displayName": "Viewport", "icon": "https://user-images.githubusercontent.com/263385/101991678-48cdf300-3c7c-11eb-9764-f8af293c1b28.png", diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index cdcad4f7d6f..606eb174dd7 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.", "keywords": [ "storybook", @@ -36,20 +36,20 @@ "prep": "../../../scripts/prepare/tsc.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/cli": "7.0.0-beta.29", - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/core-client": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", - "@storybook/core-server": "7.0.0-beta.29", - "@storybook/core-webpack": "7.0.0-beta.29", - "@storybook/docs-tools": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/cli": "7.0.0-beta.30", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/core-client": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", + "@storybook/core-server": "7.0.0-beta.30", + "@storybook/core-webpack": "7.0.0-beta.30", + "@storybook/docs-tools": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "@types/node": "^16.0.0", "@types/react": "^16.14.34", "@types/react-dom": "^16.9.14", @@ -123,5 +123,5 @@ "bundler": { "tsConfig": "tsconfig.build.json" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index f3b6bd4e912..6acb3288b4b 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.", "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/ember", "bugs": { @@ -31,12 +31,12 @@ "prep": "../../../scripts/prepare/tsc.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/docs-tools": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/docs-tools": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "ts-dedent": "^2.0.0" }, "devDependencies": { @@ -59,5 +59,5 @@ "access": "public" }, "bundler": {}, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index ab09bf92def..8c75541a35b 100644 --- a/code/frameworks/html-vite/package.json +++ b/code/frameworks/html-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-vite", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,15 +48,15 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/addons": "7.0.0-beta.29", - "@storybook/builder-vite": "7.0.0-beta.29", - "@storybook/channel-postmessage": "7.0.0-beta.29", - "@storybook/channel-websocket": "7.0.0-beta.29", - "@storybook/client-api": "7.0.0-beta.29", - "@storybook/core-server": "7.0.0-beta.29", - "@storybook/html": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/preview-web": "7.0.0-beta.29", + "@storybook/addons": "7.0.0-beta.30", + "@storybook/builder-vite": "7.0.0-beta.30", + "@storybook/channel-postmessage": "7.0.0-beta.30", + "@storybook/channel-websocket": "7.0.0-beta.30", + "@storybook/client-api": "7.0.0-beta.30", + "@storybook/core-server": "7.0.0-beta.30", + "@storybook/html": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/preview-web": "7.0.0-beta.30", "magic-string": "^0.26.1" }, "devDependencies": { @@ -76,5 +76,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index 658c11b392e..ed261f4615f 100644 --- a/code/frameworks/html-webpack5/package.json +++ b/code/frameworks/html-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,11 +48,11 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/html": "7.0.0-beta.29", - "@storybook/preset-html-webpack": "7.0.0-beta.29", + "@storybook/html": "7.0.0-beta.30", + "@storybook/preset-html-webpack": "7.0.0-beta.30", "@types/node": "^16.0.0" }, "devDependencies": { @@ -76,5 +76,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index b3012edfa05..1e07d22d540 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Next.js", "keywords": [ "storybook", @@ -60,13 +60,13 @@ }, "dependencies": { "@next/font": "^13.0.7", - "@storybook/addon-actions": "7.0.0-beta.29", - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/preset-react-webpack": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/react": "7.0.0-beta.29", + "@storybook/addon-actions": "7.0.0-beta.30", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/preset-react-webpack": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/react": "7.0.0-beta.30", "@types/node": "^16.0.0", "find-up": "^5.0.0", "fs-extra": "^9.0.1", @@ -123,5 +123,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 6ef52730181..b4466a97b9f 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-vite", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,8 +48,8 @@ }, "dependencies": { "@preact/preset-vite": "^2.0.0", - "@storybook/builder-vite": "7.0.0-beta.29", - "@storybook/preact": "7.0.0-beta.29" + "@storybook/builder-vite": "7.0.0-beta.30", + "@storybook/preact": "7.0.0-beta.30" }, "devDependencies": { "@types/node": "^16.0.0", @@ -73,5 +73,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index 58465fbbbbb..429bc936e5f 100644 --- a/code/frameworks/preact-webpack5/package.json +++ b/code/frameworks/preact-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" @@ -48,10 +48,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/preact": "7.0.0-beta.29", - "@storybook/preset-preact-webpack": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/preact": "7.0.0-beta.30", + "@storybook/preset-preact-webpack": "7.0.0-beta.30", "@types/node": "^16.0.0" }, "devDependencies": { @@ -77,5 +77,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index 9dad100a57c..5883d8264cf 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-vite", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -50,9 +50,9 @@ "dependencies": { "@joshwooding/vite-plugin-react-docgen-typescript": "^0.2.1", "@rollup/pluginutils": "^4.2.0", - "@storybook/builder-vite": "7.0.0-beta.29", - "@storybook/react": "7.0.0-beta.29", - "@vitejs/plugin-react": "^3.0.0", + "@storybook/builder-vite": "7.0.0-beta.30", + "@storybook/react": "7.0.0-beta.30", + "@vitejs/plugin-react": "^3.0.1", "ast-types": "^0.14.2", "magic-string": "^0.26.1", "react-docgen": "6.0.0-alpha.3" @@ -80,5 +80,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index b2777dc1413..6f357ee68af 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,9 +48,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/preset-react-webpack": "7.0.0-beta.29", - "@storybook/react": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/preset-react-webpack": "7.0.0-beta.30", + "@storybook/react": "7.0.0-beta.30", "@types/node": "^16.0.0" }, "devDependencies": { @@ -83,5 +83,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index 111390e9bf8..2f19843fd14 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,10 +48,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/preset-server-webpack": "7.0.0-beta.29", - "@storybook/server": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/preset-server-webpack": "7.0.0-beta.30", + "@storybook/server": "7.0.0-beta.30", "@types/node": "^16.0.0" }, "devDependencies": { @@ -74,5 +74,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index e52836cee57..990ae6742f6 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-vite", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,9 +48,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/svelte": "7.0.0-beta.29", + "@storybook/builder-vite": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/svelte": "7.0.0-beta.30", "@sveltejs/vite-plugin-svelte": "^2.0.0", "magic-string": "^0.26.1", "svelte": "^3.0.0", @@ -80,5 +80,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index 95535e81334..d44b6a66be3 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,10 +48,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/preset-svelte-webpack": "7.0.0-beta.29", - "@storybook/svelte": "7.0.0-beta.29" + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/preset-svelte-webpack": "7.0.0-beta.30", + "@storybook/svelte": "7.0.0-beta.30" }, "devDependencies": { "svelte": "^3.48.0", @@ -78,5 +78,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index d6bbd925703..2e0d582f5e2 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for SvelteKit", "keywords": [ "storybook", @@ -51,9 +51,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.0-beta.29", - "@storybook/svelte": "7.0.0-beta.29", - "@storybook/svelte-vite": "7.0.0-beta.29" + "@storybook/builder-vite": "7.0.0-beta.30", + "@storybook/svelte": "7.0.0-beta.30", + "@storybook/svelte-vite": "7.0.0-beta.30" }, "devDependencies": { "@types/node": "^16.0.0", @@ -76,5 +76,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index 20385b2712d..4bbdf86c8f6 100644 --- a/code/frameworks/vue-vite/package.json +++ b/code/frameworks/vue-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-vite", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,10 +48,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/core-server": "7.0.0-beta.29", - "@storybook/vue": "7.0.0-beta.29", + "@storybook/builder-vite": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/core-server": "7.0.0-beta.30", + "@storybook/vue": "7.0.0-beta.30", "magic-string": "^0.26.1", "vue-docgen-api": "^4.40.0" }, @@ -79,5 +79,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json index 50254fa368e..9f83e4c5678 100644 --- a/code/frameworks/vue-webpack5/package.json +++ b/code/frameworks/vue-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,10 +48,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/preset-vue-webpack": "7.0.0-beta.29", - "@storybook/vue": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/preset-vue-webpack": "7.0.0-beta.30", + "@storybook/vue": "7.0.0-beta.30", "@types/node": "^16.0.0" }, "devDependencies": { @@ -83,5 +83,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index da204cb8068..a2d622eb7dc 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-vite", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,9 +48,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.0-beta.29", - "@storybook/core-server": "7.0.0-beta.29", - "@storybook/vue3": "7.0.0-beta.29", + "@storybook/builder-vite": "7.0.0-beta.30", + "@storybook/core-server": "7.0.0-beta.30", + "@storybook/vue3": "7.0.0-beta.30", "magic-string": "^0.26.1", "vue-docgen-api": "^4.40.0" }, @@ -83,5 +83,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index 1757d842486..39c08c9903e 100644 --- a/code/frameworks/vue3-webpack5/package.json +++ b/code/frameworks/vue3-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,10 +48,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/preset-vue3-webpack": "7.0.0-beta.29", - "@storybook/vue3": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/preset-vue3-webpack": "7.0.0-beta.30", + "@storybook/vue3": "7.0.0-beta.30", "@types/node": "^16.0.0" }, "devDependencies": { @@ -80,5 +80,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 383adaa959d..2cc0c8a5f53 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-vite", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,10 +48,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.0-beta.29", - "@storybook/core-server": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/web-components": "7.0.0-beta.29", + "@storybook/builder-vite": "7.0.0-beta.30", + "@storybook/core-server": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/web-components": "7.0.0-beta.30", "magic-string": "^0.26.1" }, "devDependencies": { @@ -75,5 +75,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index c7e014c898f..15f75c4132f 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit-html", @@ -51,10 +51,10 @@ }, "dependencies": { "@babel/preset-env": "^7.20.2", - "@storybook/builder-webpack5": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/preset-web-components-webpack": "7.0.0-beta.29", - "@storybook/web-components": "7.0.0-beta.29", + "@storybook/builder-webpack5": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/preset-web-components-webpack": "7.0.0-beta.30", + "@storybook/web-components": "7.0.0-beta.30", "@types/node": "^16.0.0" }, "devDependencies": { @@ -79,5 +79,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lerna.json b/code/lerna.json index 00b10a23639..7e4c7295a36 100644 --- a/code/lerna.json +++ b/code/lerna.json @@ -2,5 +2,5 @@ "npmClient": "yarn", "useWorkspaces": true, "registry": "https://registry.npmjs.org", - "version": "7.0.0-beta.29" + "version": "7.0.0-beta.30" } diff --git a/code/lib/addons/package.json b/code/lib/addons/package.json index 4468a2a520f..e4a30937290 100644 --- a/code/lib/addons/package.json +++ b/code/lib/addons/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addons", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook addons store", "keywords": [ "storybook" @@ -44,9 +44,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29" + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", @@ -60,5 +60,5 @@ "./src/index.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/builder-manager/package.json b/code/lib/builder-manager/package.json index dd295f4e731..07f0759ef98 100644 --- a/code/lib/builder-manager/package.json +++ b/code/lib/builder-manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-manager", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook manager builder", "keywords": [ "storybook" @@ -44,9 +44,9 @@ }, "dependencies": { "@fal-works/esbuild-plugin-global-externals": "^2.1.2", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/manager": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/manager": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", "@types/ejs": "^3.1.1", "@types/find-cache-dir": "^3.2.1", "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10", @@ -73,5 +73,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/builder-vite/package.json b/code/lib/builder-vite/package.json index 1456c587fac..fbf6caec9cb 100644 --- a/code/lib/builder-vite/package.json +++ b/code/lib/builder-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-vite", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "A plugin to run and build Storybooks with Vite", "homepage": "https://github.com/storybookjs/storybook/tree/main/code/lib/builder-vite/#readme", "bugs": { @@ -43,14 +43,16 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/csf-plugin": "7.0.0-beta.29", + "@storybook/channel-postmessage": "7.0.0-beta.30", + "@storybook/channel-websocket": "7.0.0-beta.30", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/csf-plugin": "7.0.0-beta.30", "@storybook/mdx2-csf": "next", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/preview": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/preview": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "browser-assert": "^1.2.1", "es-module-lexer": "^0.9.3", "express": "^4.17.3", @@ -67,7 +69,7 @@ "@types/node": "^16.0.0", "rollup": "^3.0.0", "typescript": "~4.9.3", - "vite": "^4.0.0" + "vite": "^4.0.4" }, "peerDependencies": { "@preact/preset-vite": "*", @@ -95,5 +97,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/builder-vite/src/vite-config.ts b/code/lib/builder-vite/src/vite-config.ts index c282601e59e..316d970189a 100644 --- a/code/lib/builder-vite/src/vite-config.ts +++ b/code/lib/builder-vite/src/vite-config.ts @@ -91,7 +91,7 @@ export async function pluginConfig(options: Options) { } }, }, - viteExternalsPlugin(globals, { useWindow: false }), + viteExternalsPlugin(globals, { useWindow: false, disableInServe: true }), ] as PluginOption[]; // TODO: framework doesn't exist, should move into framework when/if built diff --git a/code/lib/builder-webpack5/package.json b/code/lib/builder-webpack5/package.json index 059fac4bcb1..c273c4ce655 100644 --- a/code/lib/builder-webpack5/package.json +++ b/code/lib/builder-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-webpack5", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -58,25 +58,25 @@ }, "dependencies": { "@babel/core": "^7.12.10", - "@storybook/addons": "7.0.0-beta.29", - "@storybook/api": "7.0.0-beta.29", - "@storybook/channel-postmessage": "7.0.0-beta.29", - "@storybook/channel-websocket": "7.0.0-beta.29", - "@storybook/channels": "7.0.0-beta.29", - "@storybook/client-api": "7.0.0-beta.29", - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/components": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", - "@storybook/core-webpack": "7.0.0-beta.29", + "@storybook/addons": "7.0.0-beta.30", + "@storybook/api": "7.0.0-beta.30", + "@storybook/channel-postmessage": "7.0.0-beta.30", + "@storybook/channel-websocket": "7.0.0-beta.30", + "@storybook/channels": "7.0.0-beta.30", + "@storybook/client-api": "7.0.0-beta.30", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/components": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", + "@storybook/core-webpack": "7.0.0-beta.30", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/preview": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/router": "7.0.0-beta.29", - "@storybook/store": "7.0.0-beta.29", - "@storybook/theming": "7.0.0-beta.29", + "@storybook/manager-api": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/preview": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/router": "7.0.0-beta.30", + "@storybook/store": "7.0.0-beta.30", + "@storybook/theming": "7.0.0-beta.30", "@types/node": "^16.0.0", "@types/semver": "^7.3.4", "babel-loader": "^9.0.0", @@ -131,5 +131,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts b/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts index cb85f840dc5..d7449693ddd 100644 --- a/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts +++ b/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts @@ -22,6 +22,7 @@ import { isPreservingSymlinks, } from '@storybook/core-common'; import { toRequireContextString, toImportFn } from '@storybook/core-webpack'; +import { dedent } from 'ts-dedent'; import type { BuilderOptions, TypescriptOptions } from '../types'; import { createBabelLoader } from './babel-loader-preview'; @@ -190,6 +191,15 @@ export default async ( } : {}; + if (!template) { + throw new Error(dedent` + Storybook's Webpack5 builder requires a template to be specified. + Somehow you've ended up with a falsy value for the template option. + + Please file an issue at https://github.com/storybookjs/storybook with a reproduction. + `); + } + return { name: 'preview', mode: isProd ? 'production' : 'development', diff --git a/code/lib/channel-postmessage/package.json b/code/lib/channel-postmessage/package.json index 3e6dcce7950..6ad5487e8fb 100644 --- a/code/lib/channel-postmessage/package.json +++ b/code/lib/channel-postmessage/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-postmessage", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "", "keywords": [ "storybook" @@ -43,9 +43,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channels": "7.0.0-beta.29", - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/channels": "7.0.0-beta.30", + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/global": "^5.0.0", "qs": "^6.10.0", "telejson": "^7.0.3" @@ -61,5 +61,5 @@ "./src/index.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/channel-websocket/package.json b/code/lib/channel-websocket/package.json index e38252c3187..e9956a0bb66 100644 --- a/code/lib/channel-websocket/package.json +++ b/code/lib/channel-websocket/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-websocket", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "", "keywords": [ "storybook" @@ -43,8 +43,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channels": "7.0.0-beta.29", - "@storybook/client-logger": "7.0.0-beta.29", + "@storybook/channels": "7.0.0-beta.30", + "@storybook/client-logger": "7.0.0-beta.30", "@storybook/global": "^5.0.0", "telejson": "^7.0.3" }, @@ -59,5 +59,5 @@ "./src/index.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index 12a2d5706fe..363b4d13fe5 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "", "keywords": [ "storybook" @@ -53,5 +53,5 @@ "./src/index.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index cbc3bfe8e51..3be4db396c2 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook CLI", "keywords": [ "storybook" @@ -21,10 +21,10 @@ "license": "MIT", "bin": "./index.js", "dependencies": { - "@storybook/cli": "7.0.0-beta.29" + "@storybook/cli": "7.0.0-beta.30" }, "publishConfig": { "access": "public" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index d0b594fffb4..022727937cb 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook CLI", "keywords": [ "storybook" @@ -24,10 +24,10 @@ "storybook": "./index.js" }, "dependencies": { - "@storybook/cli": "7.0.0-beta.29" + "@storybook/cli": "7.0.0-beta.30" }, "publishConfig": { "access": "public" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 711f1d049a9..b78e1419c9c 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook's CLI - easiest method of adding storybook to your projects", "keywords": [ "cli", @@ -56,13 +56,13 @@ "dependencies": { "@babel/core": "^7.20.2", "@babel/preset-env": "^7.20.2", - "@storybook/codemod": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/core-server": "7.0.0-beta.29", - "@storybook/csf-tools": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/telemetry": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/codemod": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/core-server": "7.0.0-beta.30", + "@storybook/csf-tools": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/telemetry": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "@types/semver": "^7.3.4", "boxen": "^5.1.2", "chalk": "^4.1.0", @@ -91,7 +91,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "@storybook/client-api": "7.0.0-beta.29", + "@storybook/client-api": "7.0.0-beta.30", "@types/cross-spawn": "^6.0.2", "@types/prompts": "^2.0.9", "@types/puppeteer-core": "^2.1.0", @@ -111,5 +111,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/cli/src/versions.ts b/code/lib/cli/src/versions.ts index 4175a00baee..894c1a9399b 100644 --- a/code/lib/cli/src/versions.ts +++ b/code/lib/cli/src/versions.ts @@ -1,90 +1,90 @@ // auto generated file, do not edit export default { - '@storybook/addon-a11y': '7.0.0-beta.29', - '@storybook/addon-actions': '7.0.0-beta.29', - '@storybook/addon-backgrounds': '7.0.0-beta.29', - '@storybook/addon-controls': '7.0.0-beta.29', - '@storybook/addon-docs': '7.0.0-beta.29', - '@storybook/addon-essentials': '7.0.0-beta.29', - '@storybook/addon-highlight': '7.0.0-beta.29', - '@storybook/addon-interactions': '7.0.0-beta.29', - '@storybook/addon-jest': '7.0.0-beta.29', - '@storybook/addon-links': '7.0.0-beta.29', - '@storybook/addon-measure': '7.0.0-beta.29', - '@storybook/addon-outline': '7.0.0-beta.29', - '@storybook/addon-storyshots': '7.0.0-beta.29', - '@storybook/addon-storyshots-puppeteer': '7.0.0-beta.29', - '@storybook/addon-storysource': '7.0.0-beta.29', - '@storybook/addon-toolbars': '7.0.0-beta.29', - '@storybook/addon-viewport': '7.0.0-beta.29', - '@storybook/addons': '7.0.0-beta.29', - '@storybook/angular': '7.0.0-beta.29', - '@storybook/manager-api': '7.0.0-beta.29', - '@storybook/blocks': '7.0.0-beta.29', - '@storybook/builder-manager': '7.0.0-beta.29', - '@storybook/builder-vite': '7.0.0-beta.29', - '@storybook/builder-webpack5': '7.0.0-beta.29', - '@storybook/channel-postmessage': '7.0.0-beta.29', - '@storybook/channel-websocket': '7.0.0-beta.29', - '@storybook/channels': '7.0.0-beta.29', - '@storybook/cli': '7.0.0-beta.29', - '@storybook/client-api': '7.0.0-beta.29', - '@storybook/client-logger': '7.0.0-beta.29', - '@storybook/codemod': '7.0.0-beta.29', - '@storybook/components': '7.0.0-beta.29', - '@storybook/core-client': '7.0.0-beta.29', - '@storybook/core-common': '7.0.0-beta.29', - '@storybook/core-events': '7.0.0-beta.29', - '@storybook/core-server': '7.0.0-beta.29', - '@storybook/core-webpack': '7.0.0-beta.29', - '@storybook/csf-tools': '7.0.0-beta.29', - '@storybook/docs-tools': '7.0.0-beta.29', - '@storybook/ember': '7.0.0-beta.29', - '@storybook/html': '7.0.0-beta.29', - '@storybook/html-webpack5': '7.0.0-beta.29', - '@storybook/html-vite': '7.0.0-beta.29', - '@storybook/instrumenter': '7.0.0-beta.29', - '@storybook/nextjs': '7.0.0-beta.29', - '@storybook/node-logger': '7.0.0-beta.29', - '@storybook/postinstall': '7.0.0-beta.29', - '@storybook/preact': '7.0.0-beta.29', - '@storybook/preact-vite': '7.0.0-beta.29', - '@storybook/preact-webpack5': '7.0.0-beta.29', - '@storybook/preset-html-webpack': '7.0.0-beta.29', - '@storybook/preset-preact-webpack': '7.0.0-beta.29', - '@storybook/preset-react-webpack': '7.0.0-beta.29', - '@storybook/preset-server-webpack': '7.0.0-beta.29', - '@storybook/preset-svelte-webpack': '7.0.0-beta.29', - '@storybook/preset-vue-webpack': '7.0.0-beta.29', - '@storybook/preset-vue3-webpack': '7.0.0-beta.29', - '@storybook/preset-web-components-webpack': '7.0.0-beta.29', - '@storybook/preview': '7.0.0-beta.29', - '@storybook/preview-api': '7.0.0-beta.29', - '@storybook/preview-web': '7.0.0-beta.29', - '@storybook/react': '7.0.0-beta.29', - '@storybook/react-vite': '7.0.0-beta.29', - '@storybook/react-webpack5': '7.0.0-beta.29', - '@storybook/router': '7.0.0-beta.29', - '@storybook/server': '7.0.0-beta.29', - '@storybook/server-webpack5': '7.0.0-beta.29', - '@storybook/source-loader': '7.0.0-beta.29', - '@storybook/store': '7.0.0-beta.29', - '@storybook/svelte': '7.0.0-beta.29', - '@storybook/sveltekit': '7.0.0-beta.29', - '@storybook/svelte-vite': '7.0.0-beta.29', - '@storybook/svelte-webpack5': '7.0.0-beta.29', - '@storybook/telemetry': '7.0.0-beta.29', - '@storybook/theming': '7.0.0-beta.29', - '@storybook/manager': '7.0.0-beta.29', - '@storybook/vue': '7.0.0-beta.29', - '@storybook/vue-vite': '7.0.0-beta.29', - '@storybook/vue-webpack5': '7.0.0-beta.29', - '@storybook/vue3': '7.0.0-beta.29', - '@storybook/vue3-vite': '7.0.0-beta.29', - '@storybook/vue3-webpack5': '7.0.0-beta.29', - '@storybook/web-components': '7.0.0-beta.29', - '@storybook/web-components-webpack5': '7.0.0-beta.29', - '@storybook/web-components-vite': '7.0.0-beta.29', - sb: '7.0.0-beta.29', - storybook: '7.0.0-beta.29', + '@storybook/addon-a11y': '7.0.0-beta.30', + '@storybook/addon-actions': '7.0.0-beta.30', + '@storybook/addon-backgrounds': '7.0.0-beta.30', + '@storybook/addon-controls': '7.0.0-beta.30', + '@storybook/addon-docs': '7.0.0-beta.30', + '@storybook/addon-essentials': '7.0.0-beta.30', + '@storybook/addon-highlight': '7.0.0-beta.30', + '@storybook/addon-interactions': '7.0.0-beta.30', + '@storybook/addon-jest': '7.0.0-beta.30', + '@storybook/addon-links': '7.0.0-beta.30', + '@storybook/addon-measure': '7.0.0-beta.30', + '@storybook/addon-outline': '7.0.0-beta.30', + '@storybook/addon-storyshots': '7.0.0-beta.30', + '@storybook/addon-storyshots-puppeteer': '7.0.0-beta.30', + '@storybook/addon-storysource': '7.0.0-beta.30', + '@storybook/addon-toolbars': '7.0.0-beta.30', + '@storybook/addon-viewport': '7.0.0-beta.30', + '@storybook/addons': '7.0.0-beta.30', + '@storybook/angular': '7.0.0-beta.30', + '@storybook/manager-api': '7.0.0-beta.30', + '@storybook/blocks': '7.0.0-beta.30', + '@storybook/builder-manager': '7.0.0-beta.30', + '@storybook/builder-vite': '7.0.0-beta.30', + '@storybook/builder-webpack5': '7.0.0-beta.30', + '@storybook/channel-postmessage': '7.0.0-beta.30', + '@storybook/channel-websocket': '7.0.0-beta.30', + '@storybook/channels': '7.0.0-beta.30', + '@storybook/cli': '7.0.0-beta.30', + '@storybook/client-api': '7.0.0-beta.30', + '@storybook/client-logger': '7.0.0-beta.30', + '@storybook/codemod': '7.0.0-beta.30', + '@storybook/components': '7.0.0-beta.30', + '@storybook/core-client': '7.0.0-beta.30', + '@storybook/core-common': '7.0.0-beta.30', + '@storybook/core-events': '7.0.0-beta.30', + '@storybook/core-server': '7.0.0-beta.30', + '@storybook/core-webpack': '7.0.0-beta.30', + '@storybook/csf-tools': '7.0.0-beta.30', + '@storybook/docs-tools': '7.0.0-beta.30', + '@storybook/ember': '7.0.0-beta.30', + '@storybook/html': '7.0.0-beta.30', + '@storybook/html-webpack5': '7.0.0-beta.30', + '@storybook/html-vite': '7.0.0-beta.30', + '@storybook/instrumenter': '7.0.0-beta.30', + '@storybook/nextjs': '7.0.0-beta.30', + '@storybook/node-logger': '7.0.0-beta.30', + '@storybook/postinstall': '7.0.0-beta.30', + '@storybook/preact': '7.0.0-beta.30', + '@storybook/preact-vite': '7.0.0-beta.30', + '@storybook/preact-webpack5': '7.0.0-beta.30', + '@storybook/preset-html-webpack': '7.0.0-beta.30', + '@storybook/preset-preact-webpack': '7.0.0-beta.30', + '@storybook/preset-react-webpack': '7.0.0-beta.30', + '@storybook/preset-server-webpack': '7.0.0-beta.30', + '@storybook/preset-svelte-webpack': '7.0.0-beta.30', + '@storybook/preset-vue-webpack': '7.0.0-beta.30', + '@storybook/preset-vue3-webpack': '7.0.0-beta.30', + '@storybook/preset-web-components-webpack': '7.0.0-beta.30', + '@storybook/preview': '7.0.0-beta.30', + '@storybook/preview-api': '7.0.0-beta.30', + '@storybook/preview-web': '7.0.0-beta.30', + '@storybook/react': '7.0.0-beta.30', + '@storybook/react-vite': '7.0.0-beta.30', + '@storybook/react-webpack5': '7.0.0-beta.30', + '@storybook/router': '7.0.0-beta.30', + '@storybook/server': '7.0.0-beta.30', + '@storybook/server-webpack5': '7.0.0-beta.30', + '@storybook/source-loader': '7.0.0-beta.30', + '@storybook/store': '7.0.0-beta.30', + '@storybook/svelte': '7.0.0-beta.30', + '@storybook/sveltekit': '7.0.0-beta.30', + '@storybook/svelte-vite': '7.0.0-beta.30', + '@storybook/svelte-webpack5': '7.0.0-beta.30', + '@storybook/telemetry': '7.0.0-beta.30', + '@storybook/theming': '7.0.0-beta.30', + '@storybook/manager': '7.0.0-beta.30', + '@storybook/vue': '7.0.0-beta.30', + '@storybook/vue-vite': '7.0.0-beta.30', + '@storybook/vue-webpack5': '7.0.0-beta.30', + '@storybook/vue3': '7.0.0-beta.30', + '@storybook/vue3-vite': '7.0.0-beta.30', + '@storybook/vue3-webpack5': '7.0.0-beta.30', + '@storybook/web-components': '7.0.0-beta.30', + '@storybook/web-components-webpack5': '7.0.0-beta.30', + '@storybook/web-components-vite': '7.0.0-beta.30', + sb: '7.0.0-beta.30', + storybook: '7.0.0-beta.30', }; diff --git a/code/lib/client-api/package.json b/code/lib/client-api/package.json index d9f3af51685..b4df89649b9 100644 --- a/code/lib/client-api/package.json +++ b/code/lib/client-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-api", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook Client API", "keywords": [ "storybook" @@ -42,8 +42,8 @@ "prep": "../../../scripts/prepare/facade.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29" + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30" }, "publishConfig": { "access": "public" @@ -54,5 +54,5 @@ ], "shim": "@storybook/preview-api/dist/client-api" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index 8ed3544a946..b56e419e753 100644 --- a/code/lib/client-logger/package.json +++ b/code/lib/client-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-logger", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "", "keywords": [ "storybook" @@ -56,5 +56,5 @@ "./src/index.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 9e5957f9295..596e4c69772 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "A collection of codemod scripts written with JSCodeshift", "keywords": [ "storybook" @@ -50,9 +50,9 @@ "@babel/preset-env": "^7.20.2", "@babel/types": "^7.20.7", "@storybook/csf": "next", - "@storybook/csf-tools": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/csf-tools": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "cross-spawn": "^7.0.3", "globby": "^11.0.2", "jscodeshift": "^0.13.1", @@ -86,5 +86,5 @@ "./src/transforms/upgrade-hierarchy-separators.js" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/core-client/package.json b/code/lib/core-client/package.json index 6d363304041..9151602aa99 100644 --- a/code/lib/core-client/package.json +++ b/code/lib/core-client/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-client", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -35,8 +35,8 @@ "prep": "../../../scripts/prepare/facade.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29" + "@storybook/client-logger": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30" }, "publishConfig": { "access": "public" @@ -47,5 +47,5 @@ ], "shim": "@storybook/preview-api/dist/core-client" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index 65a6e57fd78..ef05c6d6309 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-common", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -44,8 +44,8 @@ }, "dependencies": { "@babel/core": "^7.20.2", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "@types/babel__core": "^7.1.20", "@types/express": "^4.7.0", "@types/node": "^16.0.0", @@ -83,5 +83,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index 2e0e9e83695..e231c0243fb 100644 --- a/code/lib/core-events/package.json +++ b/code/lib/core-events/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-events", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Event names used in storybook core", "keywords": [ "storybook" @@ -53,5 +53,5 @@ "./src/index.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index a7832b70913..f7790d720cb 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-server", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -58,17 +58,17 @@ "dependencies": { "@aw-web-design/x-default-browser": "1.4.88", "@discoveryjs/json-ext": "^0.5.3", - "@storybook/builder-manager": "7.0.0-beta.29", - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/core-events": "7.0.0-beta.29", + "@storybook/builder-manager": "7.0.0-beta.30", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/core-events": "7.0.0-beta.30", "@storybook/csf": "next", - "@storybook/csf-tools": "7.0.0-beta.29", + "@storybook/csf-tools": "7.0.0-beta.30", "@storybook/docs-mdx": "next", "@storybook/global": "^5.0.0", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/preview-api": "7.0.0-beta.29", - "@storybook/telemetry": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/preview-api": "7.0.0-beta.30", + "@storybook/telemetry": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "@types/detect-port": "^1.3.0", "@types/node": "^16.0.0", "@types/node-fetch": "^2.5.7", @@ -119,5 +119,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/core-server/src/build-dev.ts b/code/lib/core-server/src/build-dev.ts index 05254a86d93..bac27a0069b 100644 --- a/code/lib/core-server/src/build-dev.ts +++ b/code/lib/core-server/src/build-dev.ts @@ -88,10 +88,7 @@ export async function buildDevStandalone( ...options, }); - const { renderer, builder, disableTelemetry } = await presets.apply( - 'core', - undefined - ); + const { renderer, builder, disableTelemetry } = await presets.apply('core', {}); if (!options.disableTelemetry && !disableTelemetry) { if (versionCheck.success && !versionCheck.cached) { diff --git a/code/lib/core-server/src/build-static.ts b/code/lib/core-server/src/build-static.ts index 725c96388ea..78bffa6c28c 100644 --- a/code/lib/core-server/src/build-static.ts +++ b/code/lib/core-server/src/build-static.ts @@ -84,7 +84,7 @@ export async function buildStaticStandalone(options: BuildStaticStandaloneOption }); const [previewBuilder, managerBuilder] = await getBuilders({ ...options, presets }); - const { renderer } = await presets.apply('core', undefined); + const { renderer } = await presets.apply('core', {}); presets = await loadAllPresets({ corePresets: [ diff --git a/code/lib/core-server/src/utils/get-builders.ts b/code/lib/core-server/src/utils/get-builders.ts index 9f71b5e085a..1b43381c02c 100644 --- a/code/lib/core-server/src/utils/get-builders.ts +++ b/code/lib/core-server/src/utils/get-builders.ts @@ -23,8 +23,8 @@ export async function getPreviewBuilder( } export async function getBuilders({ presets, configDir }: Options): Promise[]> { - const core = await presets.apply('core', undefined); - const builderName = typeof core?.builder === 'string' ? core.builder : core?.builder?.name; + const { builder } = await presets.apply('core', {}); + const builderName = typeof builder === 'string' ? builder : builder?.name; return Promise.all([getPreviewBuilder(builderName, configDir), getManagerBuilder()]); } diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index d0e37a5ecee..97359bd1d41 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-webpack", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -43,9 +43,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-common": "7.0.0-beta.29", - "@storybook/node-logger": "7.0.0-beta.29", - "@storybook/types": "7.0.0-beta.29", + "@storybook/core-common": "7.0.0-beta.30", + "@storybook/node-logger": "7.0.0-beta.30", + "@storybook/types": "7.0.0-beta.30", "@types/node": "^16.0.0", "ts-dedent": "^2.0.0" }, @@ -62,5 +62,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index 4d28ae81362..4199a8f216a 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-plugin", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "Enrich CSF files via static analysis", "keywords": [ "storybook" @@ -43,7 +43,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf-tools": "7.0.0-beta.29", + "@storybook/csf-tools": "7.0.0-beta.30", "unplugin": "^0.10.2" }, "devDependencies": { @@ -64,5 +64,5 @@ ], "platform": "node" }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index b24a7af89f2..85e1f79f96f 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-tools", - "version": "7.0.0-beta.29", + "version": "7.0.0-beta.30", "description": "", "keywords": [ "storybook" @@ -45,7 +45,7 @@ "dependencies": { "@babel/types": "^7.20.2", "@storybook/csf": "next", - "@storybook/types": "7.0.0-beta.29", + "@storybook/types": "7.0.0-beta.30", "fs-extra": "^9.0.1", "recast": "^0.23.1", "ts-dedent": "^2.0.0" @@ -67,5 +67,5 @@ "./src/index.ts" ] }, - "gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59" + "gitHead": "633f95bec79fb65524a7bcae867448b351920831" } diff --git a/code/lib/csf-tools/src/CsfFile.ts b/code/lib/csf-tools/src/CsfFile.ts index 075aa83588b..53da26d6680 100644 --- a/code/lib/csf-tools/src/CsfFile.ts +++ b/code/lib/csf-tools/src/CsfFile.ts @@ -169,6 +169,10 @@ export class CsfFile { _storyExports: Record = {}; + _metaStatement: t.Statement | undefined; + + _metaNode: t.Expression | undefined; + _storyStatements: Record = {}; _storyAnnotations: Record> = {}; @@ -259,10 +263,27 @@ export class CsfFile { ExportDefaultDeclaration: { enter({ node, parent }) { let metaNode: t.ObjectExpression; - const decl = - t.isIdentifier(node.declaration) && t.isProgram(parent) - ? findVarInitialization(node.declaration.name, parent) - : node.declaration; + const isVariableReference = t.isIdentifier(node.declaration) && t.isProgram(parent); + let decl; + if (isVariableReference) { + // const meta = { ... }; + // export default meta; + const variableName = (node.declaration as t.Identifier).name; + const isVariableDeclarator = (declaration: t.VariableDeclarator) => + t.isIdentifier(declaration.id) && declaration.id.name === variableName; + + self._metaStatement = self._ast.program.body.find( + (topLevelNode) => + t.isVariableDeclaration(topLevelNode) && + topLevelNode.declarations.find(isVariableDeclarator) + ); + decl = (self._metaStatement as t.VariableDeclaration).declarations.find( + isVariableDeclarator + ).init; + } else { + self._metaStatement = node; + decl = node.declaration; + } if (t.isObjectExpression(decl)) { // export default { ... }; @@ -276,6 +297,7 @@ export class CsfFile { } if (!self._meta && metaNode && t.isProgram(parent)) { + self._metaNode = metaNode; self._parseMeta(metaNode, parent); } }, diff --git a/code/lib/csf-tools/src/enrichCsf.test.ts b/code/lib/csf-tools/src/enrichCsf.test.ts index a0bb3af2db2..f9db130ed6a 100644 --- a/code/lib/csf-tools/src/enrichCsf.test.ts +++ b/code/lib/csf-tools/src/enrichCsf.test.ts @@ -132,7 +132,7 @@ describe('enrichCsf', () => { }); }); - describe('descriptions', () => { + describe('story descriptions', () => { it('skips inline comments', () => { expect( enrich(dedent` @@ -296,6 +296,283 @@ describe('enrichCsf', () => { }); }); + describe('meta descriptions', () => { + it('skips inline comments', () => { + expect( + enrich(dedent` + // The most basic button + export default { + title: 'Button', + } + export const Basic = () => , +}; +``` diff --git a/docs/snippets/react/button-story-with-args.ts-4-9.mdx b/docs/snippets/react/button-story-with-args.ts-4-9.mdx new file mode 100644 index 00000000000..b5410a407a4 --- /dev/null +++ b/docs/snippets/react/button-story-with-args.ts-4-9.mdx @@ -0,0 +1,27 @@ +```tsx +// Button.stories.ts|tsx + +import type { Meta, StoryObj } from '@storybook/react'; + +import { Button, ButtonProps } from './Button'; + +const meta = { + /* πŸ‘‡ The title prop is optional. + * See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading + * to learn how to generate automatic titles + */ + title: 'Button', + + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + primary: true, + label: 'Button', + }, +}; +``` diff --git a/docs/snippets/react/button-story-with-blue-args.ts-4-9.mdx b/docs/snippets/react/button-story-with-blue-args.ts-4-9.mdx new file mode 100644 index 00000000000..bd84ed12f10 --- /dev/null +++ b/docs/snippets/react/button-story-with-blue-args.ts-4-9.mdx @@ -0,0 +1,30 @@ +```tsx +// Button.stories.ts|tsx + +import type { Meta } from '@storybook/react'; + +import { Button } from './Button'; + +const meta = { + /* πŸ‘‡ The title prop is optional. + * See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading + * to learn how to generate automatic titles + */ + title: 'Button', + + component: Button, + + //πŸ‘‡ Creates specific parameters for the story + parameters: { + backgrounds: { + values: [ + { name: 'red', value: '#f00' }, + { name: 'green', value: '#0f0' }, + { name: 'blue', value: '#00f' }, + ], + }, + }, +} satisfies Meta; + +export default meta; +``` diff --git a/docs/snippets/react/button-story-with-emojis.ts-4-9.mdx b/docs/snippets/react/button-story-with-emojis.ts-4-9.mdx new file mode 100644 index 00000000000..d5dfa9bd65d --- /dev/null +++ b/docs/snippets/react/button-story-with-emojis.ts-4-9.mdx @@ -0,0 +1,37 @@ +```tsx +// Button.stories.ts|tsx + +import type { Meta, StoryObj } from '@storybook/react'; + +import { Button } from './Button'; + +const meta = { + /* πŸ‘‡ The title prop is optional. + * See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading + * to learn how to generate automatic titles + */ + title: 'Button', + + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/7.0/react/api/csf + * to learn how to use render functions. + */ +export const Primary: Story = { + render: () =>