diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fc347cfe32ef..bd9c892e3310 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -163,7 +163,7 @@ jobs: yarn release:ensure-next-ahead --main-version "${{ steps.version.outputs.current-version }}" git add .. - git commit -m "Bump next to be one minor ahead of main [skip ci]" + git diff --staged --quiet || git commit -m "Bump next to be one minor ahead of main [skip ci]" git push origin next - name: Sync CHANGELOG.md from `main` to `next` diff --git a/CHANGELOG.md b/CHANGELOG.md index 75cb12161dcd..e424acc666c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## 7.5.2 + +- Addon-themes: Fix globals not being set when using absolute path - [#24596](https://github.com/storybookjs/storybook/pull/24596), thanks [@JReinhold](https://github.com/JReinhold)! +- CLI: Allow Yarn v4 in `link` command - [#24551](https://github.com/storybookjs/storybook/pull/24551), thanks [@yannbf](https://github.com/yannbf)! +- Next.js: Support v14.0.0 - [#24593](https://github.com/storybookjs/storybook/pull/24593), thanks [@nikospapcom](https://github.com/nikospapcom)! + +## 7.5.1 + +- Angular: update wrong type for webpackStatsJson in start-storybook schema.json - [#24494](https://github.com/storybookjs/storybook/pull/24494), thanks [@LucaVazz](https://github.com/LucaVazz)! +- Themes: Run postinstall in shell for windows - [#24389](https://github.com/storybookjs/storybook/pull/24389), thanks [@Integrayshaun](https://github.com/Integrayshaun)! + ## 7.5.0 Storybook 7.5 enhances your Storybook experience with several key updates: diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index f883a4a7836e..3ebcbefe91ba 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,15 @@ +## 7.6.0-alpha.3 + +- Action: Attach spies on actions across stories when defined in meta - [#24451](https://github.com/storybookjs/storybook/pull/24451), thanks [@kasperpeulen](https://github.com/kasperpeulen)! +- Addon A11y: Avoid CSP issue - [#24477](https://github.com/storybookjs/storybook/pull/24477), thanks [@Marklb](https://github.com/Marklb)! +- Addon-themes: Fix globals not being set when using absolute path - [#24596](https://github.com/storybookjs/storybook/pull/24596), thanks [@JReinhold](https://github.com/JReinhold)! +- CLI: Allow Yarn v4 in `link` command - [#24551](https://github.com/storybookjs/storybook/pull/24551), thanks [@yannbf](https://github.com/yannbf)! +- Core-Server: Ignore all node_module folders for watchpack - [#24553](https://github.com/storybookjs/storybook/pull/24553), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Core: Fix pnp support when cache dir is outside working dir - [#24572](https://github.com/storybookjs/storybook/pull/24572), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Manager: Update `store.settings.lastTrackedStoryId` - [#24115](https://github.com/storybookjs/storybook/pull/24115), thanks [@rashidshamloo](https://github.com/rashidshamloo)! +- Next.js: Support v14.0.0 - [#24593](https://github.com/storybookjs/storybook/pull/24593), thanks [@nikospapcom](https://github.com/nikospapcom)! +- Test: Create @storybook/test package based on vitest - [#24392](https://github.com/storybookjs/storybook/pull/24392), thanks [@kasperpeulen](https://github.com/kasperpeulen)! + ## 7.6.0-alpha.2 - Actions: Fix missing crypto module crashing React Native - [#24546](https://github.com/storybookjs/storybook/pull/24546), thanks [@dannyhw](https://github.com/dannyhw)! diff --git a/CODEOWNERS b/CODEOWNERS index de427497aba2..b0e8ad0575d4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -29,6 +29,7 @@ /code/addons/storyshots-core/ @ndelangen /code/addons/storyshots-puppeteer/ @ndelangen /code/addons/storysource/ @ndelangen +/code/addons/themes/ @JReinhold @Integrayshaun /code/addons/toolbars/ @ndelangen @JReinhold /code/addons/viewport/ @yannbf @ndelangen diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 525599185e28..2b635b2abff9 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Test component compliance with web accessibility standards", "keywords": [ "a11y", diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index ac366eb38e84..adbd0ac5ad7d 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Get UI feedback when an action is performed on an interactive element", "keywords": [ "storybook", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 1e2291af3057..1738199adcf7 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Switch backgrounds to view components in different settings", "keywords": [ "addon", diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index 80ec728d98ad..b3992f0705a1 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Interact with component inputs dynamically in the Storybook UI", "keywords": [ "addon", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index af80e156d69a..a75135fde197 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Document component usage and properties in Markdown", "keywords": [ "addon", diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 4a14cb52f7c2..ef565711cb10 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Curated addons to bring out the best of Storybook", "keywords": [ "addon", diff --git a/code/addons/gfm/package.json b/code/addons/gfm/package.json index ff14fdc044ff..d5fa5f53336f 100644 --- a/code/addons/gfm/package.json +++ b/code/addons/gfm/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-mdx-gfm", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "GitHub Flavored Markdown in Storybook", "keywords": [ "addon", diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index f8038aca2156..d6e8dd72260d 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Highlight DOM nodes within your stories", "keywords": [ "storybook-addons", diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 49d7b6a93c5a..1006df6c8208 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Automate, test and debug user interactions", "keywords": [ "storybook-addons", diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index 160f8a6ca514..d5437afd9088 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "React storybook addon that show component jest report", "keywords": [ "addon", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 00a44f9f97c5..ce5b0f9955d2 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Link stories together to build demos and prototypes with your UI components", "keywords": [ "addon", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index 023ef8f71981..aab6e01731bb 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Inspect layouts by visualizing the box model", "keywords": [ "storybook-addons", diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index 32241e541716..0dbe11877145 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Outline all elements with CSS to help with layout placement and alignment", "keywords": [ "storybook-addons", diff --git a/code/addons/storyshots-core/package.json b/code/addons/storyshots-core/package.json index 24cc0f5b3373..d3b70029f54f 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Take a code snapshot of every story automatically with Jest", "keywords": [ "addon", diff --git a/code/addons/storyshots-puppeteer/package.json b/code/addons/storyshots-puppeteer/package.json index 922a2c449563..bd97205d275e 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Image snapshots addition to StoryShots based on puppeteer", "keywords": [ "addon", diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index 54918a66f6bb..02fb9f3e1a5a 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "View a story’s source code to see how it works and paste into your app", "keywords": [ "addon", diff --git a/code/addons/themes/package.json b/code/addons/themes/package.json index dc447da9992b..3e0f448d784f 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-themes", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Switch between multiple themes for you components in Storybook", "keywords": [ "css", diff --git a/code/addons/themes/src/preview.tsx b/code/addons/themes/src/preview.tsx index 88b41773e9db..1ee39be54ed0 100644 --- a/code/addons/themes/src/preview.tsx +++ b/code/addons/themes/src/preview.tsx @@ -1,11 +1,7 @@ import type { Renderer, ProjectAnnotations } from '@storybook/types'; import { GLOBAL_KEY } from './constants'; -const preview: ProjectAnnotations = { - globals: { - // Required to make sure SB picks this up from URL params - [GLOBAL_KEY]: '', - }, +export const globals: ProjectAnnotations['globals'] = { + // Required to make sure SB picks this up from URL params + [GLOBAL_KEY]: '', }; - -export default preview; diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index 6010cc2c54d5..d9c00c78607e 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Create your own toolbar items that control story rendering", "keywords": [ "addon", diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index c8f7a1c7e420..44da576cbd96 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Build responsive components by adjusting Storybook’s viewport size and orientation", "keywords": [ "addon", diff --git a/code/builders/builder-manager/package.json b/code/builders/builder-manager/package.json index f799956d1356..40ba65622445 100644 --- a/code/builders/builder-manager/package.json +++ b/code/builders/builder-manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-manager", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook manager builder", "keywords": [ "storybook" diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index 725c38e91bd8..e1e9203449fc 100644 --- a/code/builders/builder-vite/package.json +++ b/code/builders/builder-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-vite", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "A plugin to run and build Storybooks with Vite", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme", "bugs": { diff --git a/code/builders/builder-webpack5/package.json b/code/builders/builder-webpack5/package.json index 6970022dffaa..d0a5affdbb26 100644 --- a/code/builders/builder-webpack5/package.json +++ b/code/builders/builder-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-webpack5", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -56,7 +56,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/core": "^7.22.0", + "@babel/core": "^7.23.2", "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-common": "workspace:*", diff --git a/code/deprecated/addons/package.json b/code/deprecated/addons/package.json index 5675fb32855f..a53096886a12 100644 --- a/code/deprecated/addons/package.json +++ b/code/deprecated/addons/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addons", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook addons store", "keywords": [ "storybook" diff --git a/code/deprecated/channel-postmessage/package.json b/code/deprecated/channel-postmessage/package.json index 98fa379a9f8a..5c7575c2ca9a 100644 --- a/code/deprecated/channel-postmessage/package.json +++ b/code/deprecated/channel-postmessage/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-postmessage", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/channel-websocket/package.json b/code/deprecated/channel-websocket/package.json index 4fe0148baf99..867b016f8ecd 100644 --- a/code/deprecated/channel-websocket/package.json +++ b/code/deprecated/channel-websocket/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-websocket", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/client-api/package.json b/code/deprecated/client-api/package.json index 392c7581ae60..a03910376b14 100644 --- a/code/deprecated/client-api/package.json +++ b/code/deprecated/client-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-api", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook Client API", "keywords": [ "storybook" diff --git a/code/deprecated/core-client/package.json b/code/deprecated/core-client/package.json index 780496a83a8d..00584a31ff5a 100644 --- a/code/deprecated/core-client/package.json +++ b/code/deprecated/core-client/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-client", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/manager-api-shim/package.json b/code/deprecated/manager-api-shim/package.json index 00904d096c9b..56401af1b7b4 100644 --- a/code/deprecated/manager-api-shim/package.json +++ b/code/deprecated/manager-api-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/api", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook Manager API (facade)", "keywords": [ "storybook" diff --git a/code/deprecated/preview-web/package.json b/code/deprecated/preview-web/package.json index dc14fe5f7a63..24439508961a 100644 --- a/code/deprecated/preview-web/package.json +++ b/code/deprecated/preview-web/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-web", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/store/package.json b/code/deprecated/store/package.json index f1587b08cb71..b04a829ae6fb 100644 --- a/code/deprecated/store/package.json +++ b/code/deprecated/store/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/store", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index 024ef3762a04..f53ac7a94f51 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.", "keywords": [ "storybook", @@ -81,7 +81,7 @@ "@types/cross-spawn": "^6.0.2", "@types/tmp": "^0.2.3", "cross-spawn": "^7.0.3", - "jest": "^29.3.1", + "jest": "^29.7.0", "jest-preset-angular": "^13.0.1", "jest-specific-snapshot": "^8.0.0", "tmp": "^0.2.1", diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index 481a5aaf7731..25d8f77bb1a9 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember", "bugs": { diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index 6ec96e3d8139..cfb5d6869a79 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index d48039faffb8..dd6af1693421 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index d5ba68b05c9f..8c91b28e6143 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Next.js", "keywords": [ "storybook", @@ -74,7 +74,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/core": "^7.22.9", + "@babel/core": "^7.23.2", "@babel/plugin-syntax-bigint": "^7.8.3", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-import-assertions": "^7.22.5", @@ -82,11 +82,11 @@ "@babel/plugin-transform-export-namespace-from": "^7.22.11", "@babel/plugin-transform-numeric-separator": "^7.22.11", "@babel/plugin-transform-object-rest-spread": "^7.22.15", - "@babel/plugin-transform-runtime": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@babel/preset-react": "^7.22.5", - "@babel/preset-typescript": "^7.22.5", - "@babel/runtime": "^7.22.6", + "@babel/plugin-transform-runtime": "^7.23.2", + "@babel/preset-env": "^7.23.2", + "@babel/preset-react": "^7.22.15", + "@babel/preset-typescript": "^7.23.2", + "@babel/runtime": "^7.23.2", "@storybook/addon-actions": "workspace:*", "@storybook/builder-webpack5": "workspace:*", "@storybook/core-common": "workspace:*", @@ -115,7 +115,7 @@ "tsconfig-paths-webpack-plugin": "^4.0.1" }, "devDependencies": { - "@babel/types": "^7.22.5", + "@babel/types": "^7.23.0", "@types/babel__core": "^7", "@types/babel__plugin-transform-runtime": "^7", "@types/babel__preset-env": "^7", diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 5e631e8026fe..d13d3bca0b54 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index d57019050114..134df1698462 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index 9eddc3154f33..c9e069cc4bcc 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index 1eebc9690656..e27ba5be6755 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index 37d4d5fda834..47f3fce958c0 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 2647007c62af..567fdd790508 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index c01aa6e21614..d54a3393f846 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index c7b89401e068..1c0424652bce 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for SvelteKit", "keywords": [ "storybook", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index 80af8a96d1c4..f3d056f67188 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json index 65c2f03660cd..95a29fae038a 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index 71bc253c6b6a..1b39f568b920 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index 4aa9dfc2e31e..f7f27f144a77 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 5a6e108852eb..85000c5d71a5 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 19cc4ba230f3..21244cdbc78d 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", @@ -50,7 +50,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/preset-env": "^7.22.9", + "@babel/preset-env": "^7.23.2", "@storybook/builder-webpack5": "workspace:*", "@storybook/core-common": "workspace:*", "@storybook/preset-web-components-webpack": "workspace:*", diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index 688de8c89c1d..220bc00dcc29 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index e68ae054b4b4..9c94919d37af 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index c0552f22c42d..602dbb73b1de 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 145872d436ae..9a74701a677e 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook's CLI - easiest method of adding storybook to your projects", "keywords": [ "cli", @@ -55,9 +55,9 @@ "test": "jest test/**/*.test.js" }, "dependencies": { - "@babel/core": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@babel/types": "^7.22.5", + "@babel/core": "^7.23.2", + "@babel/preset-env": "^7.23.2", + "@babel/types": "^7.23.0", "@ndelangen/get-tarball": "^3.0.7", "@storybook/codemod": "workspace:*", "@storybook/core-common": "workspace:*", diff --git a/code/lib/cli/src/generators/configure.ts b/code/lib/cli/src/generators/configure.ts index bc70a8f2bfa2..bbc9992be1ed 100644 --- a/code/lib/cli/src/generators/configure.ts +++ b/code/lib/cli/src/generators/configure.ts @@ -1,6 +1,7 @@ import fse from 'fs-extra'; import path from 'path'; import { dedent } from 'ts-dedent'; +import { logger } from '@storybook/node-logger'; import { externalFrameworks, SupportedLanguage } from '../project_types'; interface ConfigureMainOptions { @@ -33,8 +34,6 @@ interface ConfigurePreviewOptions { rendererId: string; } -const logger = console; - /** * We need to clean up the paths in case of pnp * input: "path.dirname(require.resolve(path.join('@storybook/react-webpack5', 'package.json')))" @@ -96,20 +95,25 @@ export async function configureMain({ finalPrefixes.push(`/** @type { import('${frameworkPackage}').StorybookConfig } */`); } - const mainJsContents = mainConfigTemplate + let mainJsContents = mainConfigTemplate .replace('<>', `${imports.join('\n\n')}\n\n`) .replace('<>', finalPrefixes.length > 0 ? `${finalPrefixes.join('\n\n')}\n` : '') .replace('<>', isTypescript ? ': StorybookConfig' : '') .replace('<>', mainContents); - const prettier = (await import('prettier')).default; - const mainPath = `./${storybookConfigFolder}/main.${isTypescript ? 'ts' : 'js'}`; - const prettyMain = prettier.format(dedent(mainJsContents), { - ...prettier.resolveConfig.sync(process.cwd()), - filepath: mainPath, - }); - await fse.writeFile(mainPath, prettyMain, { encoding: 'utf8' }); + + try { + const prettier = (await import('prettier')).default; + mainJsContents = prettier.format(dedent(mainJsContents), { + ...prettier.resolveConfig.sync(process.cwd()), + filepath: mainPath, + }); + } catch { + logger.verbose(`Failed to prettify ${mainPath}`); + } + + await fse.writeFile(mainPath, mainJsContents, { encoding: 'utf8' }); } export async function configurePreview(options: ConfigurePreviewOptions) { @@ -140,7 +144,7 @@ export async function configurePreview(options: ConfigurePreviewOptions) { .filter(Boolean) .join('\n'); - const preview = dedent` + let preview = dedent` ${prefix}${prefix.length > 0 ? '\n' : ''} ${ !isTypescript && rendererPackage @@ -163,11 +167,15 @@ export async function configurePreview(options: ConfigurePreviewOptions) { .replace(' \n', '') .trim(); - const prettier = (await import('prettier')).default; + try { + const prettier = (await import('prettier')).default; + preview = prettier.format(preview, { + ...prettier.resolveConfig.sync(process.cwd()), + filepath: previewPath, + }); + } catch { + logger.verbose(`Failed to prettify ${previewPath}`); + } - const prettyPreview = prettier.format(preview, { - ...prettier.resolveConfig.sync(process.cwd()), - filepath: previewPath, - }); - await fse.writeFile(previewPath, prettyPreview, { encoding: 'utf8' }); + await fse.writeFile(previewPath, preview, { encoding: 'utf8' }); } diff --git a/code/lib/cli/src/versions.ts b/code/lib/cli/src/versions.ts index 7a01d619f980..a93723d2616b 100644 --- a/code/lib/cli/src/versions.ts +++ b/code/lib/cli/src/versions.ts @@ -1,97 +1,97 @@ // auto generated file, do not edit export default { - '@storybook/addon-a11y': '7.6.0-alpha.2', - '@storybook/addon-actions': '7.6.0-alpha.2', - '@storybook/addon-backgrounds': '7.6.0-alpha.2', - '@storybook/addon-controls': '7.6.0-alpha.2', - '@storybook/addon-docs': '7.6.0-alpha.2', - '@storybook/addon-essentials': '7.6.0-alpha.2', - '@storybook/addon-highlight': '7.6.0-alpha.2', - '@storybook/addon-interactions': '7.6.0-alpha.2', - '@storybook/addon-jest': '7.6.0-alpha.2', - '@storybook/addon-links': '7.6.0-alpha.2', - '@storybook/addon-mdx-gfm': '7.6.0-alpha.2', - '@storybook/addon-measure': '7.6.0-alpha.2', - '@storybook/addon-outline': '7.6.0-alpha.2', - '@storybook/addon-themes': '7.6.0-alpha.2', - '@storybook/addon-storyshots': '7.6.0-alpha.2', - '@storybook/addon-storyshots-puppeteer': '7.6.0-alpha.2', - '@storybook/addon-storysource': '7.6.0-alpha.2', - '@storybook/addon-toolbars': '7.6.0-alpha.2', - '@storybook/addon-viewport': '7.6.0-alpha.2', - '@storybook/addons': '7.6.0-alpha.2', - '@storybook/angular': '7.6.0-alpha.2', - '@storybook/api': '7.6.0-alpha.2', - '@storybook/blocks': '7.6.0-alpha.2', - '@storybook/builder-manager': '7.6.0-alpha.2', - '@storybook/builder-vite': '7.6.0-alpha.2', - '@storybook/builder-webpack5': '7.6.0-alpha.2', - '@storybook/channel-postmessage': '7.6.0-alpha.2', - '@storybook/channel-websocket': '7.6.0-alpha.2', - '@storybook/channels': '7.6.0-alpha.2', - '@storybook/cli': '7.6.0-alpha.2', - '@storybook/client-api': '7.6.0-alpha.2', - '@storybook/client-logger': '7.6.0-alpha.2', - '@storybook/codemod': '7.6.0-alpha.2', - '@storybook/components': '7.6.0-alpha.2', - '@storybook/core-client': '7.6.0-alpha.2', - '@storybook/core-common': '7.6.0-alpha.2', - '@storybook/core-events': '7.6.0-alpha.2', - '@storybook/core-server': '7.6.0-alpha.2', - '@storybook/core-webpack': '7.6.0-alpha.2', - '@storybook/csf-plugin': '7.6.0-alpha.2', - '@storybook/csf-tools': '7.6.0-alpha.2', - '@storybook/docs-tools': '7.6.0-alpha.2', - '@storybook/ember': '7.6.0-alpha.2', - '@storybook/html': '7.6.0-alpha.2', - '@storybook/html-vite': '7.6.0-alpha.2', - '@storybook/html-webpack5': '7.6.0-alpha.2', - '@storybook/instrumenter': '7.6.0-alpha.2', - '@storybook/manager': '7.6.0-alpha.2', - '@storybook/manager-api': '7.6.0-alpha.2', - '@storybook/nextjs': '7.6.0-alpha.2', - '@storybook/node-logger': '7.6.0-alpha.2', - '@storybook/postinstall': '7.6.0-alpha.2', - '@storybook/preact': '7.6.0-alpha.2', - '@storybook/preact-vite': '7.6.0-alpha.2', - '@storybook/preact-webpack5': '7.6.0-alpha.2', - '@storybook/preset-create-react-app': '7.6.0-alpha.2', - '@storybook/preset-html-webpack': '7.6.0-alpha.2', - '@storybook/preset-preact-webpack': '7.6.0-alpha.2', - '@storybook/preset-react-webpack': '7.6.0-alpha.2', - '@storybook/preset-server-webpack': '7.6.0-alpha.2', - '@storybook/preset-svelte-webpack': '7.6.0-alpha.2', - '@storybook/preset-vue-webpack': '7.6.0-alpha.2', - '@storybook/preset-vue3-webpack': '7.6.0-alpha.2', - '@storybook/preset-web-components-webpack': '7.6.0-alpha.2', - '@storybook/preview': '7.6.0-alpha.2', - '@storybook/preview-api': '7.6.0-alpha.2', - '@storybook/preview-web': '7.6.0-alpha.2', - '@storybook/react': '7.6.0-alpha.2', - '@storybook/react-dom-shim': '7.6.0-alpha.2', - '@storybook/react-vite': '7.6.0-alpha.2', - '@storybook/react-webpack5': '7.6.0-alpha.2', - '@storybook/router': '7.6.0-alpha.2', - '@storybook/server': '7.6.0-alpha.2', - '@storybook/server-webpack5': '7.6.0-alpha.2', - '@storybook/source-loader': '7.6.0-alpha.2', - '@storybook/store': '7.6.0-alpha.2', - '@storybook/svelte': '7.6.0-alpha.2', - '@storybook/svelte-vite': '7.6.0-alpha.2', - '@storybook/svelte-webpack5': '7.6.0-alpha.2', - '@storybook/sveltekit': '7.6.0-alpha.2', - '@storybook/telemetry': '7.6.0-alpha.2', - '@storybook/theming': '7.6.0-alpha.2', - '@storybook/types': '7.6.0-alpha.2', - '@storybook/vue': '7.6.0-alpha.2', - '@storybook/vue-vite': '7.6.0-alpha.2', - '@storybook/vue-webpack5': '7.6.0-alpha.2', - '@storybook/vue3': '7.6.0-alpha.2', - '@storybook/vue3-vite': '7.6.0-alpha.2', - '@storybook/vue3-webpack5': '7.6.0-alpha.2', - '@storybook/web-components': '7.6.0-alpha.2', - '@storybook/web-components-vite': '7.6.0-alpha.2', - '@storybook/web-components-webpack5': '7.6.0-alpha.2', - sb: '7.6.0-alpha.2', - storybook: '7.6.0-alpha.2', + '@storybook/addon-a11y': '7.6.0-alpha.3', + '@storybook/addon-actions': '7.6.0-alpha.3', + '@storybook/addon-backgrounds': '7.6.0-alpha.3', + '@storybook/addon-controls': '7.6.0-alpha.3', + '@storybook/addon-docs': '7.6.0-alpha.3', + '@storybook/addon-essentials': '7.6.0-alpha.3', + '@storybook/addon-highlight': '7.6.0-alpha.3', + '@storybook/addon-interactions': '7.6.0-alpha.3', + '@storybook/addon-jest': '7.6.0-alpha.3', + '@storybook/addon-links': '7.6.0-alpha.3', + '@storybook/addon-mdx-gfm': '7.6.0-alpha.3', + '@storybook/addon-measure': '7.6.0-alpha.3', + '@storybook/addon-outline': '7.6.0-alpha.3', + '@storybook/addon-themes': '7.6.0-alpha.3', + '@storybook/addon-storyshots': '7.6.0-alpha.3', + '@storybook/addon-storyshots-puppeteer': '7.6.0-alpha.3', + '@storybook/addon-storysource': '7.6.0-alpha.3', + '@storybook/addon-toolbars': '7.6.0-alpha.3', + '@storybook/addon-viewport': '7.6.0-alpha.3', + '@storybook/addons': '7.6.0-alpha.3', + '@storybook/angular': '7.6.0-alpha.3', + '@storybook/api': '7.6.0-alpha.3', + '@storybook/blocks': '7.6.0-alpha.3', + '@storybook/builder-manager': '7.6.0-alpha.3', + '@storybook/builder-vite': '7.6.0-alpha.3', + '@storybook/builder-webpack5': '7.6.0-alpha.3', + '@storybook/channel-postmessage': '7.6.0-alpha.3', + '@storybook/channel-websocket': '7.6.0-alpha.3', + '@storybook/channels': '7.6.0-alpha.3', + '@storybook/cli': '7.6.0-alpha.3', + '@storybook/client-api': '7.6.0-alpha.3', + '@storybook/client-logger': '7.6.0-alpha.3', + '@storybook/codemod': '7.6.0-alpha.3', + '@storybook/components': '7.6.0-alpha.3', + '@storybook/core-client': '7.6.0-alpha.3', + '@storybook/core-common': '7.6.0-alpha.3', + '@storybook/core-events': '7.6.0-alpha.3', + '@storybook/core-server': '7.6.0-alpha.3', + '@storybook/core-webpack': '7.6.0-alpha.3', + '@storybook/csf-plugin': '7.6.0-alpha.3', + '@storybook/csf-tools': '7.6.0-alpha.3', + '@storybook/docs-tools': '7.6.0-alpha.3', + '@storybook/ember': '7.6.0-alpha.3', + '@storybook/html': '7.6.0-alpha.3', + '@storybook/html-vite': '7.6.0-alpha.3', + '@storybook/html-webpack5': '7.6.0-alpha.3', + '@storybook/instrumenter': '7.6.0-alpha.3', + '@storybook/manager': '7.6.0-alpha.3', + '@storybook/manager-api': '7.6.0-alpha.3', + '@storybook/nextjs': '7.6.0-alpha.3', + '@storybook/node-logger': '7.6.0-alpha.3', + '@storybook/postinstall': '7.6.0-alpha.3', + '@storybook/preact': '7.6.0-alpha.3', + '@storybook/preact-vite': '7.6.0-alpha.3', + '@storybook/preact-webpack5': '7.6.0-alpha.3', + '@storybook/preset-create-react-app': '7.6.0-alpha.3', + '@storybook/preset-html-webpack': '7.6.0-alpha.3', + '@storybook/preset-preact-webpack': '7.6.0-alpha.3', + '@storybook/preset-react-webpack': '7.6.0-alpha.3', + '@storybook/preset-server-webpack': '7.6.0-alpha.3', + '@storybook/preset-svelte-webpack': '7.6.0-alpha.3', + '@storybook/preset-vue-webpack': '7.6.0-alpha.3', + '@storybook/preset-vue3-webpack': '7.6.0-alpha.3', + '@storybook/preset-web-components-webpack': '7.6.0-alpha.3', + '@storybook/preview': '7.6.0-alpha.3', + '@storybook/preview-api': '7.6.0-alpha.3', + '@storybook/preview-web': '7.6.0-alpha.3', + '@storybook/react': '7.6.0-alpha.3', + '@storybook/react-dom-shim': '7.6.0-alpha.3', + '@storybook/react-vite': '7.6.0-alpha.3', + '@storybook/react-webpack5': '7.6.0-alpha.3', + '@storybook/router': '7.6.0-alpha.3', + '@storybook/server': '7.6.0-alpha.3', + '@storybook/server-webpack5': '7.6.0-alpha.3', + '@storybook/source-loader': '7.6.0-alpha.3', + '@storybook/store': '7.6.0-alpha.3', + '@storybook/svelte': '7.6.0-alpha.3', + '@storybook/svelte-vite': '7.6.0-alpha.3', + '@storybook/svelte-webpack5': '7.6.0-alpha.3', + '@storybook/sveltekit': '7.6.0-alpha.3', + '@storybook/telemetry': '7.6.0-alpha.3', + '@storybook/theming': '7.6.0-alpha.3', + '@storybook/types': '7.6.0-alpha.3', + '@storybook/vue': '7.6.0-alpha.3', + '@storybook/vue-vite': '7.6.0-alpha.3', + '@storybook/vue-webpack5': '7.6.0-alpha.3', + '@storybook/vue3': '7.6.0-alpha.3', + '@storybook/vue3-vite': '7.6.0-alpha.3', + '@storybook/vue3-webpack5': '7.6.0-alpha.3', + '@storybook/web-components': '7.6.0-alpha.3', + '@storybook/web-components-vite': '7.6.0-alpha.3', + '@storybook/web-components-webpack5': '7.6.0-alpha.3', + sb: '7.6.0-alpha.3', + storybook: '7.6.0-alpha.3', }; diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index 87f49c666ee1..5ad527fa292f 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 8153fb9870d1..096604690c64 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "A collection of codemod scripts written with JSCodeshift", "keywords": [ "storybook" @@ -52,9 +52,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/core": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@babel/types": "^7.22.5", + "@babel/core": "^7.23.2", + "@babel/preset-env": "^7.23.2", + "@babel/types": "^7.23.0", "@storybook/csf": "^0.1.0", "@storybook/csf-tools": "workspace:*", "@storybook/node-logger": "workspace:*", @@ -70,7 +70,7 @@ "devDependencies": { "@types/jscodeshift": "^0.11.6", "ansi-regex": "^5.0.1", - "jest": "^29.3.1", + "jest": "^29.7.0", "jest-specific-snapshot": "^8.0.0", "mdast-util-mdx-jsx": "^2.1.2", "mdast-util-mdxjs-esm": "^1.3.1", diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index c186649da2f6..a8c1af9f443f 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index 8d36e25dcfca..d80846973c8e 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Event names used in storybook core", "keywords": [ "storybook" diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index c1162a46c58e..e24ec0d82bf4 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 290f94d6d05c..96bdfb086bb1 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index f13faa55b8b4..c5fa16545163 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Enrich CSF files via static analysis", "keywords": [ "storybook" diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index f8128ba9c4e0..d6192a65472c 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.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Parse and manipulate CSF and Storybook config files", "keywords": [ "storybook" @@ -42,10 +42,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/generator": "^7.22.9", - "@babel/parser": "^7.22.7", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", + "@babel/generator": "^7.23.0", + "@babel/parser": "^7.23.0", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0", "@storybook/csf": "^0.1.0", "@storybook/types": "workspace:*", "fs-extra": "^11.1.0", diff --git a/code/lib/docs-tools/package.json b/code/lib/docs-tools/package.json index 8dc753289fd2..b017a4651ce0 100644 --- a/code/lib/docs-tools/package.json +++ b/code/lib/docs-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/docs-tools", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Shared utility functions for frameworks to implement docs", "keywords": [ "storybook" @@ -52,7 +52,7 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@babel/core": "^7.22.9", + "@babel/core": "^7.23.2", "jest-specific-snapshot": "^8.0.0", "require-from-string": "^2.0.2", "typescript": "~4.9.3" diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index 37c76c998109..8c885530380f 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index d22621ff8770..801c9616d145 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager-api", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Core Storybook Manager API & Context", "keywords": [ "storybook" diff --git a/code/lib/manager-api/src/version.ts b/code/lib/manager-api/src/version.ts index ce208bb4c814..8eea80a45701 100644 --- a/code/lib/manager-api/src/version.ts +++ b/code/lib/manager-api/src/version.ts @@ -1 +1 @@ -export const version = '7.6.0-alpha.2'; +export const version = '7.6.0-alpha.3'; diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index 8523e249a934..de31ffedac48 100644 --- a/code/lib/node-logger/package.json +++ b/code/lib/node-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/node-logger", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index 13342cadcfdc..1be31fad2e25 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/postinstall", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook addons postinstall utilities", "keywords": [ "api", @@ -45,7 +45,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "devDependencies": { - "jest": "^29.3.1", + "jest": "^29.7.0", "jest-specific-snapshot": "^8.0.0", "jscodeshift": "^0.14.0", "typescript": "~4.9.3" diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index 307f02a506df..7cc8235a4742 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-api", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/lib/preview/package.json b/code/lib/preview/package.json index 7a4a37d92d59..cc2e06b83b5f 100644 --- a/code/lib/preview/package.json +++ b/code/lib/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/lib/react-dom-shim/package.json b/code/lib/react-dom-shim/package.json index 924ddcab0a63..0b9905b221e8 100644 --- a/code/lib/react-dom-shim/package.json +++ b/code/lib/react-dom-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-dom-shim", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index f58cc7b8c316..70f3a92a95b6 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/router", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Core Storybook Router", "keywords": [ "storybook" diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 9c45ead2f736..4066cd709554 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/source-loader", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Source loader", "keywords": [ "lib", diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index 3f769090f85c..f65f5d5c20eb 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/telemetry", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Telemetry logging for crash reports and usage statistics", "keywords": [ "storybook" diff --git a/code/lib/test/package.json b/code/lib/test/package.json index 73b04a6e593f..1de2a016ba9d 100644 --- a/code/lib/test/package.json +++ b/code/lib/test/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/test", - "version": "7.4.0-alpha.0", + "version": "7.6.0-alpha.3", "description": "", "keywords": [ "storybook" diff --git a/code/lib/theming/package.json b/code/lib/theming/package.json index e80055b75eb7..2d64c60cf941 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/theming", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/lib/theming/src/base.ts b/code/lib/theming/src/base.ts index 5f60c0e812df..a322d46470a4 100644 --- a/code/lib/theming/src/base.ts +++ b/code/lib/theming/src/base.ts @@ -47,6 +47,7 @@ export const background = { app: '#F6F9FC', bar: color.lightest, content: color.lightest, + preview: color.lightest, gridCellSize: 10, hoverable: transparentize(0.9, color.secondary), // hover state for items in a list diff --git a/code/lib/theming/src/convert.ts b/code/lib/theming/src/convert.ts index 05ecaaf1f322..fc23399d4a38 100644 --- a/code/lib/theming/src/convert.ts +++ b/code/lib/theming/src/convert.ts @@ -81,6 +81,7 @@ export const convert = (inherit: ThemeVars = themes[getPreferredColorScheme()]): colorSecondary, appBg, appContentBg, + appPreviewBg, appBorderColor, appBorderRadius, fontBase, @@ -116,6 +117,7 @@ export const convert = (inherit: ThemeVars = themes[getPreferredColorScheme()]): app: appBg, bar: barBg, content: appContentBg, + preview: appPreviewBg, gridCellSize: gridCellSize || background.gridCellSize, hoverable: background.hoverable, positive: background.positive, diff --git a/code/lib/theming/src/themes/dark.ts b/code/lib/theming/src/themes/dark.ts index 49fea0807c25..4cb8f19f29bd 100644 --- a/code/lib/theming/src/themes/dark.ts +++ b/code/lib/theming/src/themes/dark.ts @@ -11,6 +11,7 @@ const theme: ThemeVars = { // UI appBg: '#222425', appContentBg: '#1B1C1D', + appPreviewBg: color.lightest, appBorderColor: 'rgba(255,255,255,.1)', appBorderRadius: 4, diff --git a/code/lib/theming/src/themes/light.ts b/code/lib/theming/src/themes/light.ts index 88508b62b8c4..b6b7ca0b26b0 100644 --- a/code/lib/theming/src/themes/light.ts +++ b/code/lib/theming/src/themes/light.ts @@ -11,6 +11,7 @@ const theme: ThemeVars = { // UI appBg: background.app, appContentBg: color.lightest, + appPreviewBg: color.lightest, appBorderColor: color.border, appBorderRadius: 4, diff --git a/code/lib/theming/src/types.ts b/code/lib/theming/src/types.ts index b6f28f8c955f..e7c2827792cb 100644 --- a/code/lib/theming/src/types.ts +++ b/code/lib/theming/src/types.ts @@ -17,6 +17,7 @@ export interface ThemeVarsColors { // UI appBg: string; appContentBg: string; + appPreviewBg: string; appBorderColor: string; appBorderRadius: number; diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 1e4af2586051..808579cc9bde 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/types", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Core Storybook TS Types", "keywords": [ "storybook" diff --git a/code/package.json b/code/package.json index 97c99ba5ed1b..d742d3ab90b5 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -92,11 +92,11 @@ "type-fest": "~2.19" }, "dependencies": { - "@babel/core": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@babel/preset-react": "^7.22.5", - "@babel/preset-typescript": "^7.22.5", - "@babel/runtime": "^7.22.6", + "@babel/core": "^7.23.2", + "@babel/preset-env": "^7.23.2", + "@babel/preset-react": "^7.22.15", + "@babel/preset-typescript": "^7.23.2", + "@babel/runtime": "^7.23.2", "@emotion/jest": "^11.10.0", "@jest/globals": "^29.3.1", "@nx/workspace": "16.2.1", @@ -234,7 +234,7 @@ "glob": "^10.0.0", "http-server": "^14.1.1", "husky": "^4.3.7", - "jest": "^29.5.0", + "jest": "^29.7.0", "jest-environment-jsdom": "^29.5.0", "jest-image-snapshot": "^6.0.0", "jest-junit": "^16.0.0", diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index 51cb80d6bdf7..6d223fe4b967 100644 --- a/code/presets/create-react-app/package.json +++ b/code/presets/create-react-app/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-create-react-app", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Create React App preset", "keywords": [ "storybook" diff --git a/code/presets/html-webpack/package.json b/code/presets/html-webpack/package.json index eb682532d924..f7eae3cde5a3 100644 --- a/code/presets/html-webpack/package.json +++ b/code/presets/html-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-html-webpack", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/preact-webpack/package.json b/code/presets/preact-webpack/package.json index 215eb3610baa..42619ff78004 100644 --- a/code/presets/preact-webpack/package.json +++ b/code/presets/preact-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-preact-webpack", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" @@ -49,8 +49,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.22.5", - "@babel/preset-typescript": "^7.22.5", + "@babel/plugin-transform-react-jsx": "^7.22.15", + "@babel/preset-typescript": "^7.23.2", "@storybook/core-webpack": "workspace:*", "@types/node": "^18.0.0" }, diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index 15654bd75cbc..2eb5e07a103a 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-react-webpack", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading", "keywords": [ "storybook" @@ -64,8 +64,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/preset-flow": "^7.22.5", - "@babel/preset-react": "^7.22.5", + "@babel/preset-flow": "^7.22.15", + "@babel/preset-react": "^7.22.15", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5", "@storybook/core-webpack": "workspace:*", "@storybook/docs-tools": "workspace:*", diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index 2e38bb0578db..fc97f71a8da7 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-server-webpack", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index 35ff00207764..dddd9b9981c9 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-svelte-webpack", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue-webpack/package.json b/code/presets/vue-webpack/package.json index 0ae9ffb8302f..fb9eb4538218 100644 --- a/code/presets/vue-webpack/package.json +++ b/code/presets/vue-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue-webpack", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue3-webpack/package.json b/code/presets/vue3-webpack/package.json index 39116ca14d52..5a9b3474c8f7 100644 --- a/code/presets/vue3-webpack/package.json +++ b/code/presets/vue3-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue3-webpack", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index f33bf2827aec..2b152f658feb 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-web-components-webpack", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", @@ -54,7 +54,7 @@ "dependencies": { "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/preset-env": "^7.22.9", + "@babel/preset-env": "^7.23.2", "@storybook/core-webpack": "workspace:*", "@types/node": "^18.0.0", "babel-loader": "^7.0.0 || ^8.0.0 || ^9.0.0", diff --git a/code/renderers/html/package.json b/code/renderers/html/package.json index e1c3b9e89593..3d042ea5f214 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook HTML renderer", "keywords": [ "storybook" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index b3d72f2d9888..eed4e9bdf033 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook Preact renderer", "keywords": [ "storybook" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index cfb4b0f0b4ce..0a8dad42ae80 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook React renderer", "keywords": [ "storybook" @@ -76,7 +76,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "@babel/core": "^7.22.9", + "@babel/core": "^7.23.2", "@storybook/test": "workspace:*", "@types/util-deprecate": "^1.0.0", "expect-type": "^0.15.0", diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 0760cb47b6e5..879e51a778e6 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook Server renderer", "keywords": [ "storybook" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index 7700df2f020f..4ad9ad3801f5 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook Svelte renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index 9ee7b86e193f..a6df7ed76983 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook Vue renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index a2923715c973..f536aee0c1c1 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook Vue 3 renderer", "keywords": [ "storybook" @@ -64,6 +64,7 @@ "@types/prettier": "2.7.2", "@vue/compiler-core": "^3.3.4", "@vue/vue3-jest": "29", + "babel-jest": "^29.7.0", "typescript": "~4.9.3", "vue": "^3.2.47", "vue-tsc": "latest" diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index 433ae69d55ba..43a43b404127 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook web-components renderer", "keywords": [ "lit", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index f30364fb2bc7..91b854c8521c 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/blocks", - "version": "7.6.0-alpha.2", + "version": "7.6.0-alpha.3", "description": "Storybook Doc Blocks", "keywords": [ "storybook" diff --git a/code/ui/blocks/src/controls/Boolean.stories.tsx b/code/ui/blocks/src/controls/Boolean.stories.tsx index 001a13dcaef7..54344b5850d4 100644 --- a/code/ui/blocks/src/controls/Boolean.stories.tsx +++ b/code/ui/blocks/src/controls/Boolean.stories.tsx @@ -1,6 +1,6 @@ import { expect } from '@storybook/jest'; import type { Meta, StoryObj } from '@storybook/react'; -import { within, fireEvent } from '@storybook/testing-library'; +import { within, fireEvent, waitFor } from '@storybook/testing-library'; import { addons } from '@storybook/preview-api'; import { RESET_STORY_ARGS, STORY_ARGS_UPDATED } from '@storybook/core-events'; import { BooleanControl } from './Boolean'; @@ -15,7 +15,6 @@ const meta = { info: 'This is info for the Boolean control stories', jsx: { useBooleanShorthandSyntax: false }, }, - args: { name: 'boolean' }, } as Meta; export default meta; @@ -23,25 +22,29 @@ export default meta; export const True: StoryObj = { args: { value: true, + name: 'True', }, }; export const False: StoryObj = { args: { value: false, + name: 'False', }, }; export const Undefined: StoryObj = { args: { value: undefined, + name: 'Undefined', }, }; export const Toggling: StoryObj = { args: { value: undefined, + name: 'Toggling', }, - play: async ({ canvasElement, id }) => { + play: async ({ canvasElement, id, args, step }) => { const channel = addons.getChannel(); channel.emit(RESET_STORY_ARGS, { storyId: id }); @@ -50,28 +53,37 @@ export const Toggling: StoryObj = { }); const canvas = within(canvasElement); + await step('Change from Undefined to False', async () => { + const setBooleanControl = canvas.getByText('Set boolean'); + await fireEvent.click(setBooleanControl); - // from Undefined to False - const setBooleanControl = canvas.getByText('Set boolean'); - await fireEvent.click(setBooleanControl); - - let toggle = await canvas.findByTitle('Change to true'); - expect(toggle).toBeInTheDocument(); + const toggle = await canvas.findByLabelText(args.name); + await expect(toggle).toBeVisible(); + }); - // from False to True - await fireEvent.click(toggle); - toggle = await canvas.findByTitle('Change to false'); - expect(toggle).toBeInTheDocument(); + await step('Change from False to True', async () => { + const toggle = canvas.getByRole('switch'); + await fireEvent.click(toggle); + await waitFor(async () => { + await expect(toggle).toBeChecked(); + }); + }); - // from True to False - await fireEvent.click(toggle); - toggle = await canvas.findByTitle('Change to true'); - expect(toggle).toBeInTheDocument(); + await step('Change from True to False', async () => { + const toggle = canvas.getByRole('switch'); + await fireEvent.click(toggle); + await waitFor(async () => { + await expect(toggle).not.toBeChecked(); + }); + }); }, }; export const TogglingInDocs: StoryObj = { ...Toggling, + args: { + name: 'Toggling In Docs', + }, parameters: { docs: { autoplay: true, diff --git a/code/ui/blocks/src/controls/Boolean.tsx b/code/ui/blocks/src/controls/Boolean.tsx index 9d591d1a9c75..54b71b0b30b8 100644 --- a/code/ui/blocks/src/controls/Boolean.tsx +++ b/code/ui/blocks/src/controls/Boolean.tsx @@ -112,16 +112,17 @@ export const BooleanControl: FC = ({ name, value, onChange, onBlur const parsedValue = typeof value === 'string' ? parse(value) : value; return ( -