Merge branch 'next' of github.com:storybookjs/storybook into indexer-api

This commit is contained in:
Jeppe Reinhold 2023-07-27 10:12:08 +02:00
commit d437d74b4e
229 changed files with 3868 additions and 2204 deletions

View File

@ -4,7 +4,7 @@ parameters:
workflow:
description: Which workflow to run
type: enum
enum: ['normal', 'merged', 'daily', 'skipped']
enum: ['normal', 'merged', 'daily', 'skipped', 'docs']
default: 'skipped'
executors:
@ -459,6 +459,11 @@ jobs:
template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)
workflows:
docs:
when:
equal: [docs, << pipeline.parameters.workflow >>]
jobs:
- pretty-docs
normal:
when:
equal: [normal, << pipeline.parameters.workflow >>]

View File

@ -37,3 +37,13 @@ Closes #
Everybody: Please submit all PRs to the `next` branch unless they are specific to the current release. Storybook maintainers cherry-pick bug and documentation fixes into the `main` branch as part of the release process, so you shouldn't need to worry about this. For additional guidance: https://storybook.js.org/docs/react/contribute/how-to-contribute
-->
### 🦋 Canary release
<!-- CANARY_RELEASE_SECTION -->
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the `@storybookjs/core` team here.
_core team members can create a canary release [here](https://github.com/storybookjs/storybook/actions/workflows/canary-release-pr.yml) or locally with `gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>`_
<!-- CANARY_RELEASE_SECTION -->

View File

@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
pr:
description: 'Which pull request number to create a canary release for'
description: 'Pull request number to create a canary release for'
required: true
type: number
@ -14,7 +14,7 @@ env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
concurrency:
group: ${{ github.workflow }}-${{ inputs.pr }}
group: ${{ github.workflow }}-${{ github.event.inputs.pr }}
cancel-in-progress: true
permissions:
@ -25,9 +25,100 @@ jobs:
name: Release canary version
runs-on: ubuntu-latest
environment: release
defaults:
run:
working-directory: scripts
steps:
- name: Do nothing
run: echo "I'm not doing anything"
- name: Fail if triggering actor is not administrator
uses: prince-chrismc/check-actor-permissions-action@v2.0.4
with:
permission: admin
- name: Get pull request information
id: info
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
PR_INFO=$(gh pr view ${{ inputs.pr }} --repo ${{ github.repository }} --json isCrossRepository,headRefOid,headRefName,headRepository,headRepositoryOwner --jq '{isFork: .isCrossRepository, owner: .headRepositoryOwner.login, repoName: .headRepository.name, branch: .headRefName, sha: .headRefOid}')
echo $PR_INFO
# Loop through each key-value pair in PR_INFO and set as step output
for key in $(echo "$PR_INFO" | jq -r 'keys[]'); do
value=$(echo "$PR_INFO" | jq -r ".$key")
echo "$key=$value" >> "$GITHUB_OUTPUT"
done
echo "repository=$(echo "$PR_INFO" | jq -r ".owner")/$(echo "$PR_INFO" | jq -r ".repoName")" >> $GITHUB_OUTPUT
echo "shortSha=$(echo "$PR_INFO" | jq -r ".sha" | cut -c 1-8)" >> $GITHUB_OUTPUT
echo "date=$(date)" >> $GITHUB_OUTPUT
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ steps.info.outputs.isFork == 'true' && steps.info.outputs.repository || null }}
ref: ${{ steps.info.outputs.sha }}
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.yarn/berry/cache
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
restore-keys: |
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
yarn-v1
- name: Install dependencies
run: yarn task --task=install --start-from=install
- name: Set version
id: version
working-directory: scripts
run: |
yarn release:version --exact 0.0.0-pr-${{ inputs.pr }}-sha-${{ steps.info.outputs.shortSha }} --verbose
- name: Publish v${{ steps.version.outputs.next-version }}
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: scripts
run: yarn release:publish --tag canary --verbose
- name: Replace Pull Request Body
# TODO: replace with ivangabriele/find-and-replace-pull-request-body@vX when https://github.com/ivangabriele/find-and-replace-pull-request-body/pull/11 has been released
uses: mcky/find-and-replace-pull-request-body@v1.1.6-mcky
with:
githubToken: ${{ secrets.GH_TOKEN }}
prNumber: ${{ inputs.pr }}
find: 'CANARY_RELEASE_SECTION'
isHtmlCommentTag: true
replace: |
This pull request has been released as version [`${{ steps.version.outputs.next-version }}`](https://npmjs.com/package/@storybook/cli/v/${{ steps.version.outputs.next-version }}). Install it by pinning all your Storybook dependencies to that version.
<details>
<summary>More information</summary>
| | |
| --- | --- |
| **Published version** | [`${{ steps.version.outputs.next-version }}`](https://npmjs.com/package/@storybook/cli/v/${{ steps.version.outputs.next-version }}) |
| **Triggered by** | @${{ github.triggering_actor }} |
| **Repository** | [${{ steps.info.outputs.repository }}](https://github.com/${{ steps.info.outputs.repository }}) |
| **Branch** | [`${{ steps.info.outputs.branch }}`](https://github.com/${{ steps.info.outputs.repository }}/tree/${{ steps.info.outputs.branch }}) |
| **Commit** | [`${{ steps.info.outputs.shortSha }}`](https://github.com/${{ steps.info.outputs.repository }}/commit/${{ steps.info.outputs.sha }}) |
| **Datetime** | ${{ steps.info.outputs.date }} (`${{ steps.info.outputs.timestamp }}`) |
| **Workflow run** | [${{ github.run_id }}](https://github.com/storybookjs/storybook/actions/runs/${{ github.run_id }}) |
To request a new release of this pull request, mention the `@storybookjs/core` team.
_core team members can create a new canary release [here](https://github.com/storybookjs/storybook/actions/workflows/canary-release-pr.yml) or locally with `gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=${{ inputs.pr }}`_
</details>
- name: Create failing comment on PR
if: failure()
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
gh pr comment ${{ inputs.pr }}\
--repo "${{github.repository }}"\
--body "Failed to publish canary version of this pull request, triggered by @${{ github.triggering_actor }}. See the failed workflow run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

View File

@ -55,6 +55,25 @@ jobs:
env:
CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
BRANCH: ${{ needs.get-branch.outputs.branch }}
trigger-docs-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:docs')
steps:
- name: Trigger docs tests
run: >
curl -X POST --location "https://circleci.com/api/v2/project/gh/storybookjs/storybook/pipeline" \
-H "Content-Type: application/json" \
-H "Circle-Token: $CIRCLE_CI_TOKEN" \
-d '{
"branch": "'"$BRANCH"'",
"parameters": {
"workflow": "docs"
}
}'
env:
CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
BRANCH: ${{ needs.get-branch.outputs.branch }}
trigger-merged-tests:
runs-on: ubuntu-latest
needs: get-branch

View File

@ -1,3 +1,9 @@
## 7.1.1
- Angular: Make enableProdMode optional - [#23489](https://github.com/storybookjs/storybook/pull/23489), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- CLI: Gracefully shutdown and cleanup execa child processes - [#23538](https://github.com/storybookjs/storybook/pull/23538), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- CLI: Improve support of mono repositories - [#23458](https://github.com/storybookjs/storybook/pull/23458), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
## 7.1.0 (July 18, 2023)
Storybook 7.1 is here! 🎉

View File

@ -1,8 +1,18 @@
## 7.2.0-rc.0
- Addon: Create @storybook/addon-themes - [#23524](https://github.com/storybookjs/storybook/pull/23524), thanks [@Integrayshaun](https://github.com/Integrayshaun)!
- Angular: Fix initialization of Storybook in Angular 16.1 - [#23598](https://github.com/storybookjs/storybook/pull/23598), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- CLI: Gracefully shutdown and cleanup execa child processes - [#23538](https://github.com/storybookjs/storybook/pull/23538), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Dependencies: Downgrade `jest-mock` - [#23597](https://github.com/storybookjs/storybook/pull/23597), thanks [@ndelangen](https://github.com/ndelangen)!
- Dependencies: Upgrade simple-update-notifier - [#23396](https://github.com/storybookjs/storybook/pull/23396), thanks [@dartess](https://github.com/dartess)!
- Storyshots: fix broken storyshots with angular - [#23555](https://github.com/storybookjs/storybook/pull/23555), thanks [@mattlewis92](https://github.com/mattlewis92)!
- TypeScript: Added `expanded` to `CoreCommon_StorybookRefs` to fix typescript errors - [#23488](https://github.com/storybookjs/storybook/pull/23488), thanks [@DotwoodMedia](https://github.com/DotwoodMedia)!
- TypeScript: Downgrade to the last version of type-fest that doesn't need typescript 5.0 - [#23574](https://github.com/storybookjs/storybook/pull/23574), thanks [@ndelangen](https://github.com/ndelangen)!
- Vue2: Source Decorator reactivity - [#23149](https://github.com/storybookjs/storybook/pull/23149), thanks [@chakAs3](https://github.com/chakAs3)!
## 7.2.0-alpha.0
- Angular: Make enableProdMode optional - [#23489](https://github.com/storybookjs/storybook/pull/23489), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Svelte-vite: Improve error when sveltekit plugins found in non-sveltekit projects - [#23472](https://github.com/storybookjs/storybook/pull/23472), thanks [@yannbf](https://github.com/yannbf)!
- Svelte-vite: Remove unused import - [#23475](https://github.com/storybookjs/storybook/pull/23475), thanks [@yannbf](https://github.com/yannbf)!
- Router: Support RegExp in Route component - [#23292](https://github.com/storybookjs/storybook/pull/23292), thanks [@ndelangen](https://github.com/ndelangen)!
- UI: Improve tabs component, more type correct, allow for FC as title - [#23288](https://github.com/storybookjs/storybook/pull/23288), thanks [@ndelangen](https://github.com/ndelangen)!
- Addons: Improve code quality by using title as FC & sharing state via useAddonState - [#23298](https://github.com/storybookjs/storybook/pull/23298), thanks [@ndelangen](https://github.com/ndelangen)!
@ -167,460 +177,460 @@ Promote beta to rc without any changes. 🎉
#### Bug Fixes
- CLI: Fix upgrade notification message [#22933](https://github.com/storybooks/storybook/pull/22933)
- Core: Fix indexing errors by excluding node_modules stories [#22873](https://github.com/storybooks/storybook/pull/22873)
- CLI: Fix upgrade notification message [#22933](https://github.com/storybooks/storybook/pull/22933)
- Core: Fix indexing errors by excluding node_modules stories [#22873](https://github.com/storybooks/storybook/pull/22873)
## 7.1.0-alpha.28 (June 6, 2023)
#### Bug Fixes
- Docs: E2E tests for Source block update fix [#22835](https://github.com/storybooks/storybook/pull/22835)
- Docs: Fix Source block snippet updates [#22807](https://github.com/storybooks/storybook/pull/22807)
- Docs: E2E tests for Source block update fix [#22835](https://github.com/storybooks/storybook/pull/22835)
- Docs: Fix Source block snippet updates [#22807](https://github.com/storybooks/storybook/pull/22807)
## 7.1.0-alpha.27 (June 4, 2023)
#### Features
- Webpack: Add option to minify using swc [#22843](https://github.com/storybooks/storybook/pull/22843)
- Webpack: Add option to minify using swc [#22843](https://github.com/storybooks/storybook/pull/22843)
#### Bug Fixes
- Server: Fix .stories.yml support [#22906](https://github.com/storybooks/storybook/pull/22906)
- Storysource: Fix StyledSyntaxHighlighter to wrap long lines [#22541](https://github.com/storybooks/storybook/pull/22541)
- Server: Fix .stories.yml support [#22906](https://github.com/storybooks/storybook/pull/22906)
- Storysource: Fix StyledSyntaxHighlighter to wrap long lines [#22541](https://github.com/storybooks/storybook/pull/22541)
#### Maintenance
- TS: Migrate @storybook/web-components to strict TS [#22399](https://github.com/storybooks/storybook/pull/22399)
- TS: Migrate @storybook/addon-storyshots-puppeteer to strict TS [#22407](https://github.com/storybooks/storybook/pull/22407)
- TS: Migrate @storybook/addon-jest to strict TS [#22389](https://github.com/storybooks/storybook/pull/22389)
- TS: Migrate @storybook/addon-mdx-gfm to strict TS [#22659](https://github.com/storybooks/storybook/pull/22659)
- TS: Migrate @storybook/addon-storyshots to strict TS [#22487](https://github.com/storybooks/storybook/pull/22487)
- TS: Migrate @storybook/web-components to strict TS [#22399](https://github.com/storybooks/storybook/pull/22399)
- TS: Migrate @storybook/addon-storyshots-puppeteer to strict TS [#22407](https://github.com/storybooks/storybook/pull/22407)
- TS: Migrate @storybook/addon-jest to strict TS [#22389](https://github.com/storybooks/storybook/pull/22389)
- TS: Migrate @storybook/addon-mdx-gfm to strict TS [#22659](https://github.com/storybooks/storybook/pull/22659)
- TS: Migrate @storybook/addon-storyshots to strict TS [#22487](https://github.com/storybooks/storybook/pull/22487)
#### Build
- Error on YN0060 - INCOMPATIBLE_PEER_DEPENDENCY [#22398](https://github.com/storybooks/storybook/pull/22398)
- Build: upgrade yarn [#22855](https://github.com/storybooks/storybook/pull/22855)
- Add CODEOWNERS [#22869](https://github.com/storybooks/storybook/pull/22869)
- Error on YN0060 - INCOMPATIBLE_PEER_DEPENDENCY [#22398](https://github.com/storybooks/storybook/pull/22398)
- Build: upgrade yarn [#22855](https://github.com/storybooks/storybook/pull/22855)
- Add CODEOWNERS [#22869](https://github.com/storybooks/storybook/pull/22869)
## 7.1.0-alpha.26 (May 31, 2023)
#### Bug Fixes
- Addons: Fix `Addon_BaseAnnotations` type [#22771](https://github.com/storybooks/storybook/pull/22771)
- Viewport: Fix viewport menu [#22829](https://github.com/storybooks/storybook/pull/22829)
- Addons: Fix `Addon_BaseAnnotations` type [#22771](https://github.com/storybooks/storybook/pull/22771)
- Viewport: Fix viewport menu [#22829](https://github.com/storybooks/storybook/pull/22829)
#### Maintenance
- NextJS: Fix types [#22836](https://github.com/storybooks/storybook/pull/22836)
- React: Update babel dependencies to fix sandbox creation [#22824](https://github.com/storybooks/storybook/pull/22824)
- NextJS: Fix types [#22836](https://github.com/storybooks/storybook/pull/22836)
- React: Update babel dependencies to fix sandbox creation [#22824](https://github.com/storybooks/storybook/pull/22824)
#### Build
- Build: sort package json files [#22847](https://github.com/storybooks/storybook/pull/22847)
- Build: cleanup the test-storybooks [#22846](https://github.com/storybooks/storybook/pull/22846)
- Build: fix the theme output during development [#22841](https://github.com/storybooks/storybook/pull/22841)
- Build: move deprecated packages [#22753](https://github.com/storybooks/storybook/pull/22753)
- Build: move builders [#22751](https://github.com/storybooks/storybook/pull/22751)
- Build: sort package json files [#22847](https://github.com/storybooks/storybook/pull/22847)
- Build: cleanup the test-storybooks [#22846](https://github.com/storybooks/storybook/pull/22846)
- Build: fix the theme output during development [#22841](https://github.com/storybooks/storybook/pull/22841)
- Build: move deprecated packages [#22753](https://github.com/storybooks/storybook/pull/22753)
- Build: move builders [#22751](https://github.com/storybooks/storybook/pull/22751)
## 7.1.0-alpha.25 (May 26, 2023)
#### Bug Fixes
- Vue3: Fix TS 5.0 compat with vue-component-type-helpers [#22814](https://github.com/storybooks/storybook/pull/22814)
- Vue3: Fix TS 5.0 compat with vue-component-type-helpers [#22814](https://github.com/storybooks/storybook/pull/22814)
#### Build
- Build: Fix the local storybook [#22805](https://github.com/storybooks/storybook/pull/22805)
- Build: Add more checks to ci:daily workflow [#22815](https://github.com/storybooks/storybook/pull/22815)
- Build: Revert conditional decorator story and downgrade Typescript version [#22812](https://github.com/storybooks/storybook/pull/22812)
- Build: Fix the local storybook [#22805](https://github.com/storybooks/storybook/pull/22805)
- Build: Add more checks to ci:daily workflow [#22815](https://github.com/storybooks/storybook/pull/22815)
- Build: Revert conditional decorator story and downgrade Typescript version [#22812](https://github.com/storybooks/storybook/pull/22812)
## 7.1.0-alpha.24 (May 26, 2023)
#### Bug Fixes
- Vue3: Fix reactive args updates in decorators [#22717](https://github.com/storybooks/storybook/pull/22717)
- Vue3: Fix reactive args updates in decorators [#22717](https://github.com/storybooks/storybook/pull/22717)
#### Build
- Build: Update Nx to latest version [#22694](https://github.com/storybooks/storybook/pull/22694)
- Build: Update Nx to latest version [#22694](https://github.com/storybooks/storybook/pull/22694)
## 7.1.0-alpha.23 (May 24, 2023)
#### Bug Fixes
- Core: Fix `managerHead` preset in `main.ts` [#22701](https://github.com/storybooks/storybook/pull/22701)
- Core: Fix `managerHead` preset in `main.ts` [#22701](https://github.com/storybooks/storybook/pull/22701)
## 7.1.0-alpha.22 (May 24, 2023)
#### Bug Fixes
- Vite: Fix pnpm support by replacing @storybook/global with `window` [#22709](https://github.com/storybooks/storybook/pull/22709)
- Vite: Fix pnpm support by replacing @storybook/global with `window` [#22709](https://github.com/storybooks/storybook/pull/22709)
## 7.1.0-alpha.21 (May 23, 2023)
#### Features
- Webpack: Add option to use swc instead of babel [#22075](https://github.com/storybooks/storybook/pull/22075)
- Webpack: Add option to use swc instead of babel [#22075](https://github.com/storybooks/storybook/pull/22075)
#### Bug Fixes
- UI: Fix `.mp3` support for builder-manager [#22699](https://github.com/storybooks/storybook/pull/22699)
- CLI: Fix support for BROWSER env var [#21473](https://github.com/storybooks/storybook/pull/21473)
- Vite: Fix missing @storybook/global dependency [#22700](https://github.com/storybooks/storybook/pull/22700)
- Next.js: Fix compatibility with Next 13.4.3 [#22697](https://github.com/storybooks/storybook/pull/22697)
- CLI: Fix error parsing on NPM proxy [#22690](https://github.com/storybooks/storybook/pull/22690)
- Core: Only connect to serverChannel in development mode [#22575](https://github.com/storybooks/storybook/pull/22575)
- CLI: Improve error handling when dealing with angular.json files [#22663](https://github.com/storybooks/storybook/pull/22663)
- CLI: Skip prompting for eslint plugin with --yes flag [#22651](https://github.com/storybooks/storybook/pull/22651)
- CLI: Fix upgrade to not upgrade nx packages [#22419](https://github.com/storybooks/storybook/pull/22419)
- CLI: Only handle CTRL + C on init event [#22687](https://github.com/storybooks/storybook/pull/22687)
- Angular: Remove console.log [#22671](https://github.com/storybooks/storybook/pull/22671)
- UI: Fix `.mp3` support for builder-manager [#22699](https://github.com/storybooks/storybook/pull/22699)
- CLI: Fix support for BROWSER env var [#21473](https://github.com/storybooks/storybook/pull/21473)
- Vite: Fix missing @storybook/global dependency [#22700](https://github.com/storybooks/storybook/pull/22700)
- Next.js: Fix compatibility with Next 13.4.3 [#22697](https://github.com/storybooks/storybook/pull/22697)
- CLI: Fix error parsing on NPM proxy [#22690](https://github.com/storybooks/storybook/pull/22690)
- Core: Only connect to serverChannel in development mode [#22575](https://github.com/storybooks/storybook/pull/22575)
- CLI: Improve error handling when dealing with angular.json files [#22663](https://github.com/storybooks/storybook/pull/22663)
- CLI: Skip prompting for eslint plugin with --yes flag [#22651](https://github.com/storybooks/storybook/pull/22651)
- CLI: Fix upgrade to not upgrade nx packages [#22419](https://github.com/storybooks/storybook/pull/22419)
- CLI: Only handle CTRL + C on init event [#22687](https://github.com/storybooks/storybook/pull/22687)
- Angular: Remove console.log [#22671](https://github.com/storybooks/storybook/pull/22671)
## 7.1.0-alpha.20 (May 20, 2023)
#### Bug Fixes
- CLI: Account for windows paths when copying templates [#22644](https://github.com/storybooks/storybook/pull/22644)
- CLI: Fix pnpm init command [#22635](https://github.com/storybooks/storybook/pull/22635)
- UI: Add legacy font formats [#22576](https://github.com/storybooks/storybook/pull/22576)
- Webpack: Remove the alias for `global` [#22393](https://github.com/storybooks/storybook/pull/22393)
- CLI: Account for windows paths when copying templates [#22644](https://github.com/storybooks/storybook/pull/22644)
- CLI: Fix pnpm init command [#22635](https://github.com/storybooks/storybook/pull/22635)
- UI: Add legacy font formats [#22576](https://github.com/storybooks/storybook/pull/22576)
- Webpack: Remove the alias for `global` [#22393](https://github.com/storybooks/storybook/pull/22393)
#### Maintenance
- CLI: Reduce installation noise and improve error handling [#22554](https://github.com/storybooks/storybook/pull/22554)
- Actions: Fix type of withActions [#22455](https://github.com/storybooks/storybook/pull/22455)
- CLI: Reduce installation noise and improve error handling [#22554](https://github.com/storybooks/storybook/pull/22554)
- Actions: Fix type of withActions [#22455](https://github.com/storybooks/storybook/pull/22455)
#### Build
- Build: add discord notification when generating sandboxes fails [#22638](https://github.com/storybooks/storybook/pull/22638)
- Build: set correct ref on sandboxes Github action [#22625](https://github.com/storybooks/storybook/pull/22625)
- Build: Fix sandbox generation scripts [#22620](https://github.com/storybooks/storybook/pull/22620)
- Build: add discord notification when generating sandboxes fails [#22638](https://github.com/storybooks/storybook/pull/22638)
- Build: set correct ref on sandboxes Github action [#22625](https://github.com/storybooks/storybook/pull/22625)
- Build: Fix sandbox generation scripts [#22620](https://github.com/storybooks/storybook/pull/22620)
## 7.1.0-alpha.19 (May 16, 2023)
#### Bug Fixes
- Normalize paths exposed to vite-builder's `storybook-stories.js` file [#22327](https://github.com/storybooks/storybook/pull/22327)
- Normalize paths exposed to vite-builder's `storybook-stories.js` file [#22327](https://github.com/storybooks/storybook/pull/22327)
## 7.1.0-alpha.18 (May 15, 2023)
#### Bug Fixes
- CLI: Fix `getFrameworkPackage` logic [#22559](https://github.com/storybooks/storybook/pull/22559)
- CLI: Remove automigrate reference from init command [#22561](https://github.com/storybooks/storybook/pull/22561)
- CLI: Fix `getFrameworkPackage` logic [#22559](https://github.com/storybooks/storybook/pull/22559)
- CLI: Remove automigrate reference from init command [#22561](https://github.com/storybooks/storybook/pull/22561)
#### Maintenance
- CLI: Detach automigrate command from storybook init [#22523](https://github.com/storybooks/storybook/pull/22523)
- CLI: Detach automigrate command from storybook init [#22523](https://github.com/storybooks/storybook/pull/22523)
## 7.1.0-alpha.17 (May 12, 2023)
#### Bug Fixes
- CLI: Fix storybook upgrade precheckfailure object [#22517](https://github.com/storybooks/storybook/pull/22517)
- CLI: Throw errors instead of rejecting promises [#22515](https://github.com/storybooks/storybook/pull/22515)
- CSF: Expose story id in composeStories [#22471](https://github.com/storybooks/storybook/pull/22471)
- CLI: Remove unsupported frameworks/renderers and improve builder detection [#22492](https://github.com/storybooks/storybook/pull/22492)
- CLI: Fix storybook upgrade precheckfailure object [#22517](https://github.com/storybooks/storybook/pull/22517)
- CLI: Throw errors instead of rejecting promises [#22515](https://github.com/storybooks/storybook/pull/22515)
- CSF: Expose story id in composeStories [#22471](https://github.com/storybooks/storybook/pull/22471)
- CLI: Remove unsupported frameworks/renderers and improve builder detection [#22492](https://github.com/storybooks/storybook/pull/22492)
## 7.1.0-alpha.16 (May 11, 2023)
#### Bug Fixes
- Web-components: Fix source decorator to handle document fragments [#22513](https://github.com/storybooks/storybook/pull/22513)
- Angular: Adjust child process I/O for compodoc command [#22441](https://github.com/storybooks/storybook/pull/22441)
- Core: Fix windows path error in StoryStore v6 [#22512](https://github.com/storybooks/storybook/pull/22512)
- Web-components: Fix source decorator to handle document fragments [#22513](https://github.com/storybooks/storybook/pull/22513)
- Angular: Adjust child process I/O for compodoc command [#22441](https://github.com/storybooks/storybook/pull/22441)
- Core: Fix windows path error in StoryStore v6 [#22512](https://github.com/storybooks/storybook/pull/22512)
#### Maintenance
- CLI: Prompt to force initialization when storybook is detected [#22392](https://github.com/storybooks/storybook/pull/22392)
- UI: Fix css inconsistency in Button and Icon components [#22497](https://github.com/storybooks/storybook/pull/22497)
- CLI: Prompt to force initialization when storybook is detected [#22392](https://github.com/storybooks/storybook/pull/22392)
- UI: Fix css inconsistency in Button and Icon components [#22497](https://github.com/storybooks/storybook/pull/22497)
#### Build
- Sandboxes: Pin @vitejs/plugin-react to avoid conflict [#22501](https://github.com/storybooks/storybook/pull/22501)
- Sandboxes: Pin @vitejs/plugin-react to avoid conflict [#22501](https://github.com/storybooks/storybook/pull/22501)
## 7.1.0-alpha.15 (May 11, 2023)
#### Bug Fixes
- CLI: Do not show a migration summary on sb init [#22109](https://github.com/storybooks/storybook/pull/22109)
- Toolbars: Fix title behavior in UI [#22496](https://github.com/storybooks/storybook/pull/22496)
- UI: Show current search shortcut in search box sidebar [#21619](https://github.com/storybooks/storybook/pull/21619)
- Measure: Deactivate when switching to Docs mode [#21602](https://github.com/storybooks/storybook/pull/21602)
- Outline: Fix additional outline border in docs mode [#21773](https://github.com/storybooks/storybook/pull/21773)
- CLI: Do not show a migration summary on sb init [#22109](https://github.com/storybooks/storybook/pull/22109)
- Toolbars: Fix title behavior in UI [#22496](https://github.com/storybooks/storybook/pull/22496)
- UI: Show current search shortcut in search box sidebar [#21619](https://github.com/storybooks/storybook/pull/21619)
- Measure: Deactivate when switching to Docs mode [#21602](https://github.com/storybooks/storybook/pull/21602)
- Outline: Fix additional outline border in docs mode [#21773](https://github.com/storybooks/storybook/pull/21773)
## 7.1.0-alpha.14 (May 9, 2023)
#### Bug Fixes
- CLI: Scope styles in sample components from the CLI templates [#22162](https://github.com/storybooks/storybook/pull/22162)
- CLI: Fix copyTemplate failures on `init` [#22375](https://github.com/storybooks/storybook/pull/22375)
- CLI: Fix server init [#22443](https://github.com/storybooks/storybook/pull/22443)
- Server: Add json indexer [#22460](https://github.com/storybooks/storybook/pull/22460)
- React: Use correct default annotations for composeStories [#22308](https://github.com/storybooks/storybook/pull/22308)
- UI: Fix opacity of list-item color [#22074](https://github.com/storybooks/storybook/pull/22074)
- CLI: Scope styles in sample components from the CLI templates [#22162](https://github.com/storybooks/storybook/pull/22162)
- CLI: Fix copyTemplate failures on `init` [#22375](https://github.com/storybooks/storybook/pull/22375)
- CLI: Fix server init [#22443](https://github.com/storybooks/storybook/pull/22443)
- Server: Add json indexer [#22460](https://github.com/storybooks/storybook/pull/22460)
- React: Use correct default annotations for composeStories [#22308](https://github.com/storybooks/storybook/pull/22308)
- UI: Fix opacity of list-item color [#22074](https://github.com/storybooks/storybook/pull/22074)
#### Maintenance
- CLI: Refactor package manager methods to be async [#22401](https://github.com/storybooks/storybook/pull/22401)
- Angular: Improve Error message for angular.json not found [#22377](https://github.com/storybooks/storybook/pull/22377)
- TypeScript: Migrate @storybook/instrumenter to strict TS [#22370](https://github.com/storybooks/storybook/pull/22370)
- TypeScript: Migrate @storybook/core-events to strict TS [#22448](https://github.com/storybooks/storybook/pull/22448)
- TypeScript: Migrate @storybook/core-client to strict TS [#22447](https://github.com/storybooks/storybook/pull/22447)
- TypeScript: Migrate @storybook/react-vite and @storybook/preact-vite to strict TS [#22428](https://github.com/storybooks/storybook/pull/22428)
- TypeScript: Migrate @storybook/svelte-vite to strict TS [#22411](https://github.com/storybooks/storybook/pull/22411)
- TypeScript: Migrate @storybook/types to strict TS [#22397](https://github.com/storybooks/storybook/pull/22397)
- TypeScript: Migrate @storybook/addon-storysource to strict TS [#22367](https://github.com/storybooks/storybook/pull/22367)
- TypeScript: Migrate @storybook/client-api to strict TS [#22421](https://github.com/storybooks/storybook/pull/22421)
- TypeScript: Migrate @storybook/sveltekit to strict TS [#22412](https://github.com/storybooks/storybook/pull/22412)
- TypeScript: Migrate @storybook/source-loader to strict TS [#22420](https://github.com/storybooks/storybook/pull/22420)
- CLI: Refactor package manager methods to be async [#22401](https://github.com/storybooks/storybook/pull/22401)
- Angular: Improve Error message for angular.json not found [#22377](https://github.com/storybooks/storybook/pull/22377)
- TypeScript: Migrate @storybook/instrumenter to strict TS [#22370](https://github.com/storybooks/storybook/pull/22370)
- TypeScript: Migrate @storybook/core-events to strict TS [#22448](https://github.com/storybooks/storybook/pull/22448)
- TypeScript: Migrate @storybook/core-client to strict TS [#22447](https://github.com/storybooks/storybook/pull/22447)
- TypeScript: Migrate @storybook/react-vite and @storybook/preact-vite to strict TS [#22428](https://github.com/storybooks/storybook/pull/22428)
- TypeScript: Migrate @storybook/svelte-vite to strict TS [#22411](https://github.com/storybooks/storybook/pull/22411)
- TypeScript: Migrate @storybook/types to strict TS [#22397](https://github.com/storybooks/storybook/pull/22397)
- TypeScript: Migrate @storybook/addon-storysource to strict TS [#22367](https://github.com/storybooks/storybook/pull/22367)
- TypeScript: Migrate @storybook/client-api to strict TS [#22421](https://github.com/storybooks/storybook/pull/22421)
- TypeScript: Migrate @storybook/sveltekit to strict TS [#22412](https://github.com/storybooks/storybook/pull/22412)
- TypeScript: Migrate @storybook/source-loader to strict TS [#22420](https://github.com/storybooks/storybook/pull/22420)
## 7.1.0-alpha.13 (May 5, 2023)
#### Bug Fixes
- Core: Fix virtual modules excluded for babel-loader [#22331](https://github.com/storybooks/storybook/pull/22331)
- Core: Fix virtual modules excluded for babel-loader [#22331](https://github.com/storybooks/storybook/pull/22331)
#### Maintenance
- Angular: Allow TypeScript 4.0.0 and 5.0.0 [#22391](https://github.com/storybooks/storybook/pull/22391)
- Angular: Enable Angular Unit tests [#22355](https://github.com/storybooks/storybook/pull/22355)
- TypeScript: Migrate @storybook/theming to strict TS [#22376](https://github.com/storybooks/storybook/pull/22376)
- TypeScript: Migrate @storybook/channel-websocket to strict TS [#22364](https://github.com/storybooks/storybook/pull/22364)
- TypeScript: Migrate @storybook/addon-outline to strict TS [#22369](https://github.com/storybooks/storybook/pull/22369)
- TypeScript: Migrate @storybook/addon-viewbook to strict ts [#22339](https://github.com/storybooks/storybook/pull/22339)
- TypeScript: Migrate @storybook/channels to strict TS [#22365](https://github.com/storybooks/storybook/pull/22365)
- Angular: Allow TypeScript 4.0.0 and 5.0.0 [#22391](https://github.com/storybooks/storybook/pull/22391)
- Angular: Enable Angular Unit tests [#22355](https://github.com/storybooks/storybook/pull/22355)
- TypeScript: Migrate @storybook/theming to strict TS [#22376](https://github.com/storybooks/storybook/pull/22376)
- TypeScript: Migrate @storybook/channel-websocket to strict TS [#22364](https://github.com/storybooks/storybook/pull/22364)
- TypeScript: Migrate @storybook/addon-outline to strict TS [#22369](https://github.com/storybooks/storybook/pull/22369)
- TypeScript: Migrate @storybook/addon-viewbook to strict ts [#22339](https://github.com/storybooks/storybook/pull/22339)
- TypeScript: Migrate @storybook/channels to strict TS [#22365](https://github.com/storybooks/storybook/pull/22365)
#### Build
- Add Angular Prerelease sandbox [#22379](https://github.com/storybooks/storybook/pull/22379)
- Add Angular Prerelease sandbox [#22379](https://github.com/storybooks/storybook/pull/22379)
## 7.1.0-alpha.12 (May 3, 2023)
#### Bug Fixes
- Migrate: skip the automigration for gf markdown when user isn't using mdx [#22186](https://github.com/storybooks/storybook/pull/22186)
- UI: Addon panel does not update after disabling/enabling an addon [#22258](https://github.com/storybooks/storybook/pull/22258)
- Typescript: Fix bad typings caused by tsup bug [#22261](https://github.com/storybooks/storybook/pull/22261)
- Core: Fix source snippets for stories with mapped args [#22135](https://github.com/storybooks/storybook/pull/22135)
- Migrate: skip the automigration for gf markdown when user isn't using mdx [#22186](https://github.com/storybooks/storybook/pull/22186)
- UI: Addon panel does not update after disabling/enabling an addon [#22258](https://github.com/storybooks/storybook/pull/22258)
- Typescript: Fix bad typings caused by tsup bug [#22261](https://github.com/storybooks/storybook/pull/22261)
- Core: Fix source snippets for stories with mapped args [#22135](https://github.com/storybooks/storybook/pull/22135)
#### Maintenance
- Telemetry: Persist sessionId across runs [#22325](https://github.com/storybooks/storybook/pull/22325)
- Packaging: Move `types` condition to the front in all `package.json.exports` maps [#22321](https://github.com/storybooks/storybook/pull/22321)
- Packaging: Don't generate ESM dist for preset files [#22330](https://github.com/storybooks/storybook/pull/22330)
- Typescript: Migrate `@storybook/csf-tools` to strict TS [#22312](https://github.com/storybooks/storybook/pull/22312)
- Typescript: Migrate @storybook/postinstall and @storybook/router to strict TS [#22200](https://github.com/storybooks/storybook/pull/22200)
- Maintenance: Fix urls for all packages in package.json [#22101](https://github.com/storybooks/storybook/pull/22101)
- Docs: Improve component typings [#22050](https://github.com/storybooks/storybook/pull/22050)
- Telemetry: Persist sessionId across runs [#22325](https://github.com/storybooks/storybook/pull/22325)
- Packaging: Move `types` condition to the front in all `package.json.exports` maps [#22321](https://github.com/storybooks/storybook/pull/22321)
- Packaging: Don't generate ESM dist for preset files [#22330](https://github.com/storybooks/storybook/pull/22330)
- Typescript: Migrate `@storybook/csf-tools` to strict TS [#22312](https://github.com/storybooks/storybook/pull/22312)
- Typescript: Migrate @storybook/postinstall and @storybook/router to strict TS [#22200](https://github.com/storybooks/storybook/pull/22200)
- Maintenance: Fix urls for all packages in package.json [#22101](https://github.com/storybooks/storybook/pull/22101)
- Docs: Improve component typings [#22050](https://github.com/storybooks/storybook/pull/22050)
#### Build
- Build: Comment out flaky test [#22310](https://github.com/storybooks/storybook/pull/22310)
- Build: Migrate `@storybook/web-components-vite` to strict TS [#22309](https://github.com/storybooks/storybook/pull/22309)
- Build: Migrate `@storybook/html-vite` to strict TS [#22293](https://github.com/storybooks/storybook/pull/22293)
- Build: Migrate @storybook/preset-vue-webpack to strict TS [#22320](https://github.com/storybooks/storybook/pull/22320)
- Build: Use `next` branch for sandbox and repro commands [#22238](https://github.com/storybooks/storybook/pull/22238)
- Build: Comment out flaky test [#22310](https://github.com/storybooks/storybook/pull/22310)
- Build: Migrate `@storybook/web-components-vite` to strict TS [#22309](https://github.com/storybooks/storybook/pull/22309)
- Build: Migrate `@storybook/html-vite` to strict TS [#22293](https://github.com/storybooks/storybook/pull/22293)
- Build: Migrate @storybook/preset-vue-webpack to strict TS [#22320](https://github.com/storybooks/storybook/pull/22320)
- Build: Use `next` branch for sandbox and repro commands [#22238](https://github.com/storybooks/storybook/pull/22238)
## 7.1.0-alpha.11 (April 28, 2023)
#### Features
- Feature: Add support for Angular 16 [#22096](https://github.com/storybooks/storybook/pull/22096)
- Feature: Add support for Angular 16 [#22096](https://github.com/storybooks/storybook/pull/22096)
#### Bug Fixes
- Vue3: Rollback v7 breaking change and keep reactive v6-compatible API [#22229](https://github.com/storybooks/storybook/pull/22229)
- Vue3: Rollback v7 breaking change and keep reactive v6-compatible API [#22229](https://github.com/storybooks/storybook/pull/22229)
#### Maintenance
- Core: Add tests for mapping behaviour in #22169 [#22301](https://github.com/storybooks/storybook/pull/22301)
- Core: Add tests for mapping behaviour in #22169 [#22301](https://github.com/storybooks/storybook/pull/22301)
#### Dependency Upgrades
- Update glob to v10.0.0 [#22171](https://github.com/storybooks/storybook/pull/22171)
- Update glob to v10.0.0 [#22171](https://github.com/storybooks/storybook/pull/22171)
## 7.1.0-alpha.10 (April 28, 2023)
#### Bug Fixes
- Vue3: Fix compiler error when there is double tag [#22286](https://github.com/storybooks/storybook/pull/22286)
- Args: Fix multiple mapped args return array of labels [#22169](https://github.com/storybooks/storybook/pull/22169)
- Angular: Fix storyshots by removing deprecated import [#22134](https://github.com/storybooks/storybook/pull/22134)
- Ember: Fix wrong path [#22203](https://github.com/storybooks/storybook/pull/22203)
- CLI: Add web-components webpack5 to missing-babelrc automigration [#22202](https://github.com/storybooks/storybook/pull/22202)
- Docs: Fix inline story style [#21870](https://github.com/storybooks/storybook/pull/21870)
- Vue3: Fix compiler error when there is double tag [#22286](https://github.com/storybooks/storybook/pull/22286)
- Args: Fix multiple mapped args return array of labels [#22169](https://github.com/storybooks/storybook/pull/22169)
- Angular: Fix storyshots by removing deprecated import [#22134](https://github.com/storybooks/storybook/pull/22134)
- Ember: Fix wrong path [#22203](https://github.com/storybooks/storybook/pull/22203)
- CLI: Add web-components webpack5 to missing-babelrc automigration [#22202](https://github.com/storybooks/storybook/pull/22202)
- Docs: Fix inline story style [#21870](https://github.com/storybooks/storybook/pull/21870)
#### Build
- Fix vue-cli/default-js sandbox [#22259](https://github.com/storybooks/storybook/pull/22259)
- Core: Fix `DOCS_RENDERED` test [#22255](https://github.com/storybooks/storybook/pull/22255)
- Add regex to ignore outdated Browserslist in Jest initialization base file [#22260](https://github.com/storybooks/storybook/pull/22260)
- Fix vue-cli/default-js sandbox [#22259](https://github.com/storybooks/storybook/pull/22259)
- Core: Fix `DOCS_RENDERED` test [#22255](https://github.com/storybooks/storybook/pull/22255)
- Add regex to ignore outdated Browserslist in Jest initialization base file [#22260](https://github.com/storybooks/storybook/pull/22260)
## 7.1.0-alpha.9 (April 26, 2023)
#### Features
- NextJS: Allow disabling next/image lazy loading [#21909](https://github.com/storybooks/storybook/pull/21909)
- Core: Allow Flow syntax in stories [#21859](https://github.com/storybooks/storybook/pull/21859)
- NextJS: Allow disabling next/image lazy loading [#21909](https://github.com/storybooks/storybook/pull/21909)
- Core: Allow Flow syntax in stories [#21859](https://github.com/storybooks/storybook/pull/21859)
#### Bug Fixes
- Vue3: Support multiple setup functions [#22170](https://github.com/storybooks/storybook/pull/22170)
- UI: Fix shift + 7 shortcut to focus search field [#22073](https://github.com/storybooks/storybook/pull/22073)
- UI: Fix controls missing when navigating from story [#21967](https://github.com/storybooks/storybook/pull/21967)
- Vue3: Support multiple setup functions [#22170](https://github.com/storybooks/storybook/pull/22170)
- UI: Fix shift + 7 shortcut to focus search field [#22073](https://github.com/storybooks/storybook/pull/22073)
- UI: Fix controls missing when navigating from story [#21967](https://github.com/storybooks/storybook/pull/21967)
#### Maintenance
- Core: Rename manager UI mjs to js [#22247](https://github.com/storybooks/storybook/pull/22247)
- Remove dead code [#22019](https://github.com/storybooks/storybook/pull/22019)
- Vue3: Move TS stories into a separate folder [#22235](https://github.com/storybooks/storybook/pull/22235)
- Core: Rename manager UI mjs to js [#22247](https://github.com/storybooks/storybook/pull/22247)
- Remove dead code [#22019](https://github.com/storybooks/storybook/pull/22019)
- Vue3: Move TS stories into a separate folder [#22235](https://github.com/storybooks/storybook/pull/22235)
#### Build
- Build: Migrate @storybook/addon-docs to strict-ts [#22180](https://github.com/storybooks/storybook/pull/22180)
- Build: Migrate @storybook/highlight to strict TS [#22181](https://github.com/storybooks/storybook/pull/22181)
- Build: Enable strict TS by default [#22143](https://github.com/storybooks/storybook/pull/22143)
- Build: Migrate @storybook/addon-docs to strict-ts [#22180](https://github.com/storybooks/storybook/pull/22180)
- Build: Migrate @storybook/highlight to strict TS [#22181](https://github.com/storybooks/storybook/pull/22181)
- Build: Enable strict TS by default [#22143](https://github.com/storybooks/storybook/pull/22143)
## 7.1.0-alpha.8 (April 24, 2023)
#### Features
- Core: Support custom hosts using window.location server channel URL [#22055](https://github.com/storybooks/storybook/pull/22055)
- Core: Support custom hosts using window.location server channel URL [#22055](https://github.com/storybooks/storybook/pull/22055)
#### Bug Fixes
- Addon-actions: Fix ESM by upgrading from uuid-browser to uuid [#22037](https://github.com/storybooks/storybook/pull/22037)
- Addon-actions: Fix decorator type [#22175](https://github.com/storybooks/storybook/pull/22175)
- NextJS: Fix tsconfig resolution [#22160](https://github.com/storybooks/storybook/pull/22160)
- Core: Pass parameters in `SET_INDEX` for docs entries [#22154](https://github.com/storybooks/storybook/pull/22154)
- Addon-actions: Fix ESM by upgrading from uuid-browser to uuid [#22037](https://github.com/storybooks/storybook/pull/22037)
- Addon-actions: Fix decorator type [#22175](https://github.com/storybooks/storybook/pull/22175)
- NextJS: Fix tsconfig resolution [#22160](https://github.com/storybooks/storybook/pull/22160)
- Core: Pass parameters in `SET_INDEX` for docs entries [#22154](https://github.com/storybooks/storybook/pull/22154)
#### Maintenance
- CSF: Improve error message for bad default export [#22190](https://github.com/storybooks/storybook/pull/22190)
- CLI: Add addon query-params to list of SB7 incompatible addons [#22095](https://github.com/storybooks/storybook/pull/22095)
- CSF: Improve error message for bad default export [#22190](https://github.com/storybooks/storybook/pull/22190)
- CLI: Add addon query-params to list of SB7 incompatible addons [#22095](https://github.com/storybooks/storybook/pull/22095)
#### Build
- Build: Fix sandbox publish script [#22206](https://github.com/storybooks/storybook/pull/22206)
- Build: Fix lit sandboxes [#22201](https://github.com/storybooks/storybook/pull/22201)
- Vite sandboxes: use stable Vite 4.3 [#22183](https://github.com/storybooks/storybook/pull/22183)
- Build: Fix sandbox publish script [#22206](https://github.com/storybooks/storybook/pull/22206)
- Build: Fix lit sandboxes [#22201](https://github.com/storybooks/storybook/pull/22201)
- Vite sandboxes: use stable Vite 4.3 [#22183](https://github.com/storybooks/storybook/pull/22183)
## 7.1.0-alpha.7 (April 19, 2023)
#### Bug Fixes
- Vue3: Fix reactive decorators [#21954](https://github.com/storybooks/storybook/pull/21954)
- Vue3: Fix reactive decorators [#21954](https://github.com/storybooks/storybook/pull/21954)
#### Build
- Build: Improve sandboxes commit message [#22136](https://github.com/storybooks/storybook/pull/22136)
- Build: Improve sandboxes commit message [#22136](https://github.com/storybooks/storybook/pull/22136)
## 7.1.0-alpha.6 (April 18, 2023)
#### Bug Fixes
- Core: Restore Docs `useParameter` using `DOCS_PREPARED` [#22118](https://github.com/storybooks/storybook/pull/22118)
- Core: Add new tags to distinguish docs attachment [#22120](https://github.com/storybooks/storybook/pull/22120)
- Core: Fix `module` guard in non-webpack environments [#22085](https://github.com/storybooks/storybook/pull/22085)
- Core: Restore Docs `useParameter` using `DOCS_PREPARED` [#22118](https://github.com/storybooks/storybook/pull/22118)
- Core: Add new tags to distinguish docs attachment [#22120](https://github.com/storybooks/storybook/pull/22120)
- Core: Fix `module` guard in non-webpack environments [#22085](https://github.com/storybooks/storybook/pull/22085)
#### Build
- Build: Skip docs pages e2e tests for ssv6 examples [#22141](https://github.com/storybooks/storybook/pull/22141)
- Build: Upgrade Playwright to 1.32.3 [#22087](https://github.com/storybooks/storybook/pull/22087)
- Build: Skip docs pages e2e tests for ssv6 examples [#22141](https://github.com/storybooks/storybook/pull/22141)
- Build: Upgrade Playwright to 1.32.3 [#22087](https://github.com/storybooks/storybook/pull/22087)
#### Dependency Upgrades
- Remove unused babel dependencies [#21984](https://github.com/storybooks/storybook/pull/21984)
- Remove unused babel dependencies [#21984](https://github.com/storybooks/storybook/pull/21984)
## 7.1.0-alpha.5 (April 17, 2023)
#### Maintenance
- CLI: Mark qwik as using addon-interactions [#22000](https://github.com/storybooks/storybook/pull/22000)
- CLI: Mark qwik as using addon-interactions [#22000](https://github.com/storybooks/storybook/pull/22000)
#### Build
- Revert "Build: Update dangerfile temporarily to check for patch label" [#22108](https://github.com/storybooks/storybook/pull/22108)
- Revert "Build: Update dangerfile temporarily to check for patch label" [#22108](https://github.com/storybooks/storybook/pull/22108)
## 7.1.0-alpha.4 (April 15, 2023)
#### Bug Fixes
- Docs: Fix source snippets when parameters.docs.source.type = 'code' [#22048](https://github.com/storybooks/storybook/pull/22048)
- CLI: Mention how to setup a monorepo manually in babelrc automigration [#22052](https://github.com/storybooks/storybook/pull/22052)
- Docs: Fix source snippets when parameters.docs.source.type = 'code' [#22048](https://github.com/storybooks/storybook/pull/22048)
- CLI: Mention how to setup a monorepo manually in babelrc automigration [#22052](https://github.com/storybooks/storybook/pull/22052)
## 7.1.0-alpha.3 (April 13, 2023)
#### Bug Fixes
- UI: Fix upgrade command in about page [#22056](https://github.com/storybooks/storybook/pull/22056)
- CLI: Fix sandbox command [#21977](https://github.com/storybooks/storybook/pull/21977)
- UI: Fix upgrade command in about page [#22056](https://github.com/storybooks/storybook/pull/22056)
- CLI: Fix sandbox command [#21977](https://github.com/storybooks/storybook/pull/21977)
## 7.1.0-alpha.2 (April 12, 2023)
#### Features
- UI: Add remount story shortcut [#21401](https://github.com/storybooks/storybook/pull/21401)
- UI: Add remount story shortcut [#21401](https://github.com/storybooks/storybook/pull/21401)
#### Bug Fixes
- CLI: Catch errors thrown on sanity check of SB installs [#22039](https://github.com/storybooks/storybook/pull/22039)
- CLI: Catch errors thrown on sanity check of SB installs [#22039](https://github.com/storybooks/storybook/pull/22039)
#### Maintenance
- Addon-docs: Remove mdx1-csf as optional peer dep [#22038](https://github.com/storybooks/storybook/pull/22038)
- Telemetry: Add CLI version to context [#21999](https://github.com/storybooks/storybook/pull/21999)
- Addon-docs: Remove mdx1-csf as optional peer dep [#22038](https://github.com/storybooks/storybook/pull/22038)
- Telemetry: Add CLI version to context [#21999](https://github.com/storybooks/storybook/pull/21999)
#### Build
- Build: Use vite@beta on sandboxes [#22030](https://github.com/storybooks/storybook/pull/22030)
- Fix e2e tests failing in Firefox [#22022](https://github.com/storybooks/storybook/pull/22022)
- Vite: Use vite 4.3 beta in sandboxes [#21986](https://github.com/storybooks/storybook/pull/21986)
- Build: Use vite@beta on sandboxes [#22030](https://github.com/storybooks/storybook/pull/22030)
- Fix e2e tests failing in Firefox [#22022](https://github.com/storybooks/storybook/pull/22022)
- Vite: Use vite 4.3 beta in sandboxes [#21986](https://github.com/storybooks/storybook/pull/21986)
## 7.1.0-alpha.1 (April 11, 2023)
#### Bug Fixes
- React: Fix default export docgen for React.FC and forwardRef [#22024](https://github.com/storybooks/storybook/pull/22024)
- Viewport: Remove transitions when switching viewports [#21963](https://github.com/storybooks/storybook/pull/21963)
- CLI: Fix JsPackageManager typo [#22006](https://github.com/storybooks/storybook/pull/22006)
- Viewport: Fix the `defaultOrientation` config option [#21962](https://github.com/storybooks/storybook/pull/21962)
- UI: Fix story data access for broken About page [#21951](https://github.com/storybooks/storybook/pull/21951)
- React: Fix default export docgen for React.FC and forwardRef [#22024](https://github.com/storybooks/storybook/pull/22024)
- Viewport: Remove transitions when switching viewports [#21963](https://github.com/storybooks/storybook/pull/21963)
- CLI: Fix JsPackageManager typo [#22006](https://github.com/storybooks/storybook/pull/22006)
- Viewport: Fix the `defaultOrientation` config option [#21962](https://github.com/storybooks/storybook/pull/21962)
- UI: Fix story data access for broken About page [#21951](https://github.com/storybooks/storybook/pull/21951)
#### Maintenance
- CLI: Update template code references to 7.0 [#21845](https://github.com/storybooks/storybook/pull/21845)
- CLI: Update template code references to 7.0 [#21845](https://github.com/storybooks/storybook/pull/21845)
#### Dependency Upgrades
- React-vite: Fix perf regression by pinning vite-plugin-react-docgen-ts [#22013](https://github.com/storybooks/storybook/pull/22013)
- Use future version of satellite repo dependencies [#22026](https://github.com/storybooks/storybook/pull/22026)
- React-vite: Fix perf regression by pinning vite-plugin-react-docgen-ts [#22013](https://github.com/storybooks/storybook/pull/22013)
- Use future version of satellite repo dependencies [#22026](https://github.com/storybooks/storybook/pull/22026)
## 7.1.0-alpha.0 (April 5, 2023)
#### Bug Fixes
- Angular: Fix components disappearing on docs page on property change [#21944](https://github.com/storybooks/storybook/pull/21944)
- React: Don't show decorators in JSX snippets [#21907](https://github.com/storybooks/storybook/pull/21907)
- Docs: Include decorators by default in source decorators [#21902](https://github.com/storybooks/storybook/pull/21902)
- CLI: Fix npm list command [#21947](https://github.com/storybooks/storybook/pull/21947)
- Core: Revert Emotion `:first-child` (etc) workarounds [#21213](https://github.com/storybooks/storybook/pull/21213)
- Addon-actions: Fix non-included type file [#21922](https://github.com/storybooks/storybook/pull/21922)
- Addon GFM: Fix node-logger dependency [#21938](https://github.com/storybooks/storybook/pull/21938)
- Angular: Fix components disappearing on docs page on property change [#21944](https://github.com/storybooks/storybook/pull/21944)
- React: Don't show decorators in JSX snippets [#21907](https://github.com/storybooks/storybook/pull/21907)
- Docs: Include decorators by default in source decorators [#21902](https://github.com/storybooks/storybook/pull/21902)
- CLI: Fix npm list command [#21947](https://github.com/storybooks/storybook/pull/21947)
- Core: Revert Emotion `:first-child` (etc) workarounds [#21213](https://github.com/storybooks/storybook/pull/21213)
- Addon-actions: Fix non-included type file [#21922](https://github.com/storybooks/storybook/pull/21922)
- Addon GFM: Fix node-logger dependency [#21938](https://github.com/storybooks/storybook/pull/21938)
#### Build
- Build: Update trigger circle ci workflow to include main [#21888](https://github.com/storybooks/storybook/pull/21888)
- Build: Update dangerfile temporarily to check for patch label [#21945](https://github.com/storybooks/storybook/pull/21945)
- Build: Re-enable Vue2 Vite sandbox [#21940](https://github.com/storybooks/storybook/pull/21940)
- Build: Fix release badge on repros [#21923](https://github.com/storybooks/storybook/pull/21923)
- Build: fix the workflows to generate sandboxes [#21912](https://github.com/storybooks/storybook/pull/21912)
- Build: bump the node version in CI [#21917](https://github.com/storybooks/storybook/pull/21917)
- Build: no `pnp.cjs` in the root, regen lockfiles [#21908](https://github.com/storybooks/storybook/pull/21908)
- Build: remove pnp sandbox template [#21913](https://github.com/storybooks/storybook/pull/21913)
- Build: make the CI config ready for 7.0 release [#21808](https://github.com/storybooks/storybook/pull/21808)
- Build: Update trigger circle ci workflow to include main [#21888](https://github.com/storybooks/storybook/pull/21888)
- Build: Update dangerfile temporarily to check for patch label [#21945](https://github.com/storybooks/storybook/pull/21945)
- Build: Re-enable Vue2 Vite sandbox [#21940](https://github.com/storybooks/storybook/pull/21940)
- Build: Fix release badge on repros [#21923](https://github.com/storybooks/storybook/pull/21923)
- Build: fix the workflows to generate sandboxes [#21912](https://github.com/storybooks/storybook/pull/21912)
- Build: bump the node version in CI [#21917](https://github.com/storybooks/storybook/pull/21917)
- Build: no `pnp.cjs` in the root, regen lockfiles [#21908](https://github.com/storybooks/storybook/pull/21908)
- Build: remove pnp sandbox template [#21913](https://github.com/storybooks/storybook/pull/21913)
- Build: make the CI config ready for 7.0 release [#21808](https://github.com/storybooks/storybook/pull/21808)
#### Dependency Upgrades
- Update `@emotion/cache` version [#21941](https://github.com/storybooks/storybook/pull/21941)
- Update `@emotion/cache` version [#21941](https://github.com/storybooks/storybook/pull/21941)

View File

@ -6,7 +6,7 @@
.yarnrc.yml @ndelangen @JReinhold
# Docs
docs/ @kylegach @jonniebigodes
/docs/ @kylegach @jonniebigodes
# Scripts
/scripts/ @ndelangen @kasperpeulen
@ -39,8 +39,8 @@ docs/ @kylegach @jonniebigodes
# Frameworks
/code/frameworks/angular/ @valentinpalkovic @yannbf
/code/frameworks/html-vite/ @kasperpeulen @JReinhold
/code/frameworks/html-webpack5/ @kasperpeulen @JReinhold
/code/frameworks/html-vite/ @kasperpeulen @JReinhold
/code/frameworks/html-webpack5/ @kasperpeulen @JReinhold
/code/frameworks/nextjs/ @valentinpalkovic @kasperpeulen @yannbf
/code/frameworks/react-vite/ @valentinpalkovic @kasperpeulen
/code/frameworks/react-webpack5/ @valentinpalkovic @kasperpeulen
@ -61,7 +61,7 @@ docs/ @kylegach @jonniebigodes
/code/lib/codemod/ @kasperpeulen @ndelangen
/code/lib/core-common/ @ndelangen @yannbf
/code/lib/core-events/ @ndelangen @kasperpeulen
/code/lib/core-server/ @ndelangen @JReinhold @tmeasday @shilman
/code/lib/core-server/ @ndelangen @JReinhold @tmeasday @shilman
/code/lib/core-webpack/ @valentinpalkovic @ndelangen
/code/lib/csf-plugin/ @ndelangen @valentinpalkovic
/code/lib/csf-tools/ @kasperpeulen @shilman
@ -71,7 +71,7 @@ docs/ @kylegach @jonniebigodes
/code/lib/node-logger/ @yannbf @ndelangen
/code/lib/preview/ @ndelangen @kasperpeulen
/code/lib/preview-api/ @yannbf @ndelangen @tmeasday
/code/lib/react-dom-shim/ @ndelangen @valentinpalkovic @tmeasday
/code/lib/react-dom-shim/ @ndelangen @valentinpalkovic @tmeasday
/code/lib/router/ @ndelangen @JReinhold
/code/lib/telemetry/ @shilman @yannbf @ndelangen
/code/lib/theming/ @cdedreuille @ndelangen @JReinhold

View File

@ -385,7 +385,48 @@ Before you start you should make sure that your working tree is clean and the re
## Canary Releases
Not implemented yet. Still work in progress, stay tuned.
It's possible to release any pull request as a canary release multiple times during development. This is an effective way to try out changes in standalone projects without linking projects together via package managers.
To create a canary release, a core team member (or anyone else with administrator privileges) must manually trigger the canary release workflow.
**Before creating a canary release from contributors, the core team member must ensure that the code being released is not malicious.**
Creating a canary release can either be done via GitHub's UI or the [CLI](https://cli.github.com/):
### With GitHub UI
1. Open the workflow UI at https://github.com/storybookjs/storybook/actions/workflows/canary-release-pr.yml
2. On the top right corner, click "Run workflow"
3. For "branch", **always select `next`**, regardless of which branch your pull request is on
4. For the pull request number, input the number for the pull request **without a leading #**
### With the CLI
The following command will trigger a workflow run - replace `<PR_NUMBER>` with the actual pull request number:
```bash
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>
```
When the release succeeds, it will update the "Canary release" section of the pull request with information about the release and how to use it (see example [here](https://github.com/storybookjs/storybook/pull/23508)). If it fails, it will create a comment on the pull request, tagging the triggering actor to let them know that it failed (see example [here](https://github.com/storybookjs/storybook/pull/23508#issuecomment-1642850467)).
The canary release will have the following version format: `0.0.0-pr-<PR_NUMBER>-sha-<COMMIT_SHA>`, e.g., `0.0.0-pr-23508-5ec8c1c3`. Using v0.0.0 ensures that no user will accidentally get the canary release when using a canary with prereleases, eg. `^7.2.0-alpha.0`
> ** Note **
> All canary releases are released under the same "canary" dist tag. This means you'll technically be able to install it with `npm install @storybook/cli@canary`. However, this doesn't make sense, as releases from subsequent pull requests will overwrite that tag quickly. Therefore you should always install the specific version string, e.g., `npm install @storybook/cli@0.0.0-pr-23508-sha-5ec8c1c3`.
<details>
<summary>Isn't there a simpler/smarter way to do this?</summary>
The simple approach would be to release canaries for all pull requests automatically; however, this would be insecure as any contributor with Write privileges to the repository (200+ users) could create a malicious pull request that alters the release script to release a malicious release (e.g., release a patch version that adds a crypto miner).
To alleviate this, we only allow the "Release" GitHub environment that contains the npm token to be accessible from workflows running on the protected branches (`next`, `main`, etc.).
You could also be tempted to require approval from admins before running the workflows. However, this would spam the core team with GitHub notifications for workflow runs seeking approval - even when a core team member triggered the workflow. Therefore we are doing it the other way around, requiring contributors and maintainers to ask for a canary release to be created explicitly.
Instead of triggering the workflow manually, you could also do something smart, like trigger it when there's a specific label on the pull request or when someone writes a specific comment on the pull request. However, this would create a lot of unnecessary workflow runs because there isn't a way to filter workflow runs based on labels or comment content. The only way to achieve this would be to trigger the workflow on every comment/labeling, then cancel it if it didn't contain the expected content, which is inefficient.
</details>
## Versioning Scenarios

View File

@ -2,9 +2,9 @@
## Supported Versions
| Version | Supported |
| ------------- | ------------------ |
| 6.3, 6.4, 6.5 | :white_check_mark: |
We release patches for fixing security vulnerabilities, primarily focusing on the latest release only.
In the event of a high-risk vulnerability, we may backport the security fixes to the minor versions of the software, starting from the latest minor version up to the latest major release. The decision to backport security fixes to older versions will be made based on a risk assessment and the feasibility of implementing the patch in those versions.
## Reporting a Vulnerability

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
@ -63,16 +63,16 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addon-highlight": "7.2.0-alpha.0",
"@storybook/channels": "7.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/addon-highlight": "workspace:*",
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
"@storybook/types": "workspace:*",
"axe-core": "^4.2.0",
"lodash": "^4.17.21",
"react-resize-detector": "^7.1.2"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
@ -80,14 +80,14 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
"@storybook/types": "workspace:*",
"dequal": "^2.0.2",
"lodash": "^4.17.21",
"polished": "^4.2.2",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"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.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
"@storybook/types": "workspace:*",
"memoizerific": "^1.11.3",
"ts-dedent": "^2.0.0"
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"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.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/blocks": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/manager-api": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
"@storybook/types": "workspace:*",
"lodash": "^4.17.21",
"ts-dedent": "^2.0.0"
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
@ -99,19 +99,19 @@
"dependencies": {
"@jest/transform": "^29.3.1",
"@mdx-js/react": "^2.1.5",
"@storybook/blocks": "7.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/csf-plugin": "7.2.0-alpha.0",
"@storybook/csf-tools": "7.2.0-alpha.0",
"@storybook/blocks": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/csf-plugin": "workspace:*",
"@storybook/csf-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/mdx2-csf": "^1.0.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/postinstall": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/react-dom-shim": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/node-logger": "workspace:*",
"@storybook/postinstall": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/react-dom-shim": "workspace:*",
"@storybook/theming": "workspace:*",
"@storybook/types": "workspace:*",
"fs-extra": "^11.1.0",
"remark-external-links": "^8.0.0",
"remark-slug": "^6.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-essentials",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",
@ -93,6 +93,16 @@
"require": "./dist/outline/manager.js",
"import": "./dist/outline/manager.mjs"
},
"./themes/manager": {
"types": "./dist/themes/manager.d.ts",
"require": "./dist/themes/manager.js",
"import": "./dist/themes/manager.mjs"
},
"./themes/preview": {
"types": "./dist/themes/preview.d.ts",
"require": "./dist/themes/preview.js",
"import": "./dist/themes/preview.mjs"
},
"./toolbars/manager": {
"types": "./dist/toolbars/manager.d.ts",
"require": "./dist/toolbars/manager.js",
@ -119,23 +129,24 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addon-actions": "7.2.0-alpha.0",
"@storybook/addon-backgrounds": "7.2.0-alpha.0",
"@storybook/addon-controls": "7.2.0-alpha.0",
"@storybook/addon-docs": "7.2.0-alpha.0",
"@storybook/addon-highlight": "7.2.0-alpha.0",
"@storybook/addon-measure": "7.2.0-alpha.0",
"@storybook/addon-outline": "7.2.0-alpha.0",
"@storybook/addon-toolbars": "7.2.0-alpha.0",
"@storybook/addon-viewport": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/addon-actions": "workspace:*",
"@storybook/addon-backgrounds": "workspace:*",
"@storybook/addon-controls": "workspace:*",
"@storybook/addon-docs": "workspace:*",
"@storybook/addon-highlight": "workspace:*",
"@storybook/addon-measure": "workspace:*",
"@storybook/addon-outline": "workspace:*",
"@storybook/addon-themes": "workspace:*",
"@storybook/addon-toolbars": "workspace:*",
"@storybook/addon-viewport": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/manager-api": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/preview-api": "workspace:*",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/vue": "7.2.0-alpha.0",
"@storybook/vue": "workspace:*",
"typescript": "^4.9.3"
},
"peerDependencies": {
@ -162,7 +173,9 @@
"./src/outline/preview.ts",
"./src/outline/manager.ts",
"./src/toolbars/manager.ts",
"./src/viewport/manager.ts"
"./src/viewport/manager.ts",
"./src/themes/manager.ts",
"./src/themes/preview.ts"
],
"platform": "node"
},

View File

@ -3,15 +3,16 @@ import { logger } from '@storybook/node-logger';
import { serverRequire } from '@storybook/core-common';
interface PresetOptions {
configDir: string;
docs?: boolean;
controls?: boolean;
actions?: boolean;
backgrounds?: boolean;
viewport?: boolean;
toolbars?: boolean;
configDir: string;
controls?: boolean;
docs?: boolean;
measure?: boolean;
outline?: boolean;
themes?: boolean;
toolbars?: boolean;
viewport?: boolean;
}
const requireMain = (configDir: string) => {
@ -37,6 +38,8 @@ export function addons(options: PresetOptions) {
};
const main = requireMain(options.configDir);
// NOTE: The order of these addons is important.
return [
'docs',
'controls',
@ -47,6 +50,7 @@ export function addons(options: PresetOptions) {
'measure',
'outline',
'highlight',
'themes',
]
.filter((key) => (options as any)[key] !== false)
.filter((addon) => !checkInstalled(addon, main))

View File

@ -0,0 +1 @@
export * from '@storybook/addon-themes/manager';

View File

@ -0,0 +1,2 @@
// eslint-disable-next-line import/export
export * from '@storybook/addon-themes/preview';

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-mdx-gfm",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "GitHub Flavored Markdown in Storybook",
"keywords": [
"addon",
@ -51,7 +51,7 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/node-logger": "workspace:*",
"remark-gfm": "^3.0.1",
"ts-dedent": "^2.0.0"
},

View File

@ -30,7 +30,7 @@ Highlight DOM nodes by emitting the `HIGHLIGHT` event from within a story or an
import React, { useEffect } from 'react';
import { useChannel } from '@storybook/preview-api';
import { HIGHLIGHT, RESET_HIGHLIGHT } from '@storybook/addon-highlight';
import { MyComponent } form './MyComponent';
import { MyComponent } from './MyComponent';
export default { component: MyComponent };

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-highlight",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Highlight DOM nodes within your stories",
"keywords": [
"storybook-addons",
@ -61,9 +61,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "7.2.0-alpha.0"
"@storybook/preview-api": "workspace:*"
},
"devDependencies": {
"@types/webpack-env": "^1.16.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-interactions",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Automate, test and debug user interactions",
"keywords": [
"storybook-addons",
@ -72,17 +72,17 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/instrumenter": "7.2.0-alpha.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"jest-mock": "^29.5.0",
"@storybook/instrumenter": "workspace:*",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
"@storybook/types": "workspace:*",
"jest-mock": "^27.0.6",
"polished": "^4.2.2",
"ts-dedent": "^2.2.0"
},

View File

@ -1,3 +1,4 @@
/* eslint-disable react/no-array-index-key */
import React from 'react';
import { styled, typography } from '@storybook/theming';
import { Node } from './MethodCall';

View File

@ -1,3 +1,4 @@
/* eslint-disable react/no-array-index-key */
import { ObjectInspector } from '@devtools-ds/object-inspector';
import type { Call, CallRef, ElementRef } from '@storybook/instrumenter';
import { useTheme } from '@storybook/theming';

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"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.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
"react-resize-detector": "^7.1.2",
"tiny-invariant": "^1.3.1",
"upath": "^2.0.1"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"addon",
@ -80,14 +80,14 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "^0.1.0",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/router": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/router": "workspace:*",
"@storybook/types": "workspace:*",
"prop-types": "^15.7.2",
"ts-dedent": "^2.0.0"
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-measure",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"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.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/types": "workspace:*",
"tiny-invariant": "^1.3.1"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-outline",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"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.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/types": "workspace:*",
"ts-dedent": "^2.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Take a code snapshot of every story automatically with Jest",
"keywords": [
"addon",
@ -38,12 +38,12 @@
"dependencies": {
"@jest/transform": "^29.3.1",
"@storybook/babel-plugin-require-context-hook": "1.0.1",
"@storybook/client-api": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/core-webpack": "7.2.0-alpha.0",
"@storybook/client-api": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-webpack": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/preview-api": "workspace:*",
"@storybook/types": "workspace:*",
"@types/jest-specific-snapshot": "^0.5.6",
"glob": "^10.0.0",
"jest-specific-snapshot": "^8.0.0",
@ -57,11 +57,11 @@
"@angular/core": "^16.0.0-rc.4",
"@angular/platform-browser-dynamic": "^16.0.0-rc.4",
"@emotion/jest": "^11.8.0",
"@storybook/addon-docs": "7.2.0-alpha.0",
"@storybook/angular": "7.2.0-alpha.0",
"@storybook/react": "7.2.0-alpha.0",
"@storybook/vue": "7.2.0-alpha.0",
"@storybook/vue3": "7.2.0-alpha.0",
"@storybook/addon-docs": "workspace:*",
"@storybook/angular": "workspace:*",
"@storybook/react": "workspace:*",
"@storybook/vue": "workspace:*",
"@storybook/vue3": "workspace:*",
"babel-loader": "^9.1.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",

View File

@ -2,7 +2,7 @@ import AngularSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-
import HTMLCommentSerializer from 'jest-preset-angular/build/serializers/html-comment';
import { TestBed } from '@angular/core/testing';
import { addSerializer } from 'jest-specific-snapshot';
import { getApplication, storyPropsProvider } from '@storybook/angular/renderer';
import { getApplication, storyPropsProvider, PropertyExtractor } from '@storybook/angular/renderer';
import { BehaviorSubject } from 'rxjs';
addSerializer(HTMLCommentSerializer);
@ -11,11 +11,14 @@ addSerializer(AngularSnapshotSerializer);
function getRenderedTree(story: any) {
const currentStory = story.render();
const analyzedMetadata = new PropertyExtractor(currentStory.moduleMetadata, story.component);
const application = getApplication({
storyFnAngular: currentStory,
component: story.component,
// TODO : To change with the story Id in v7. Currently keep with static id to avoid changes in snapshots
targetSelector: 'storybook-wrapper',
analyzedMetadata,
});
TestBed.configureTestingModule({

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots-puppeteer",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Image snapshots addition to StoryShots based on puppeteer",
"keywords": [
"addon",
@ -37,8 +37,8 @@
"dependencies": {
"@axe-core/puppeteer": "^4.2.0",
"@storybook/csf": "^0.1.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/node-logger": "workspace:*",
"@storybook/types": "workspace:*",
"@types/jest-image-snapshot": "^6.0.0",
"jest-image-snapshot": "^6.0.0"
},
@ -49,7 +49,7 @@
"puppeteer": "^2.0.0 || ^3.0.0"
},
"peerDependencies": {
"@storybook/addon-storyshots": "7.2.0-alpha.0",
"@storybook/addon-storyshots": "workspace:*",
"puppeteer": ">=2.0.0"
},
"peerDependenciesMeta": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "View a storys source code to see how it works and paste into your app",
"keywords": [
"addon",
@ -53,13 +53,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/router": "7.2.0-alpha.0",
"@storybook/source-loader": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/router": "workspace:*",
"@storybook/source-loader": "workspace:*",
"@storybook/theming": "workspace:*",
"estraverse": "^5.2.0",
"prop-types": "^15.7.2",
"react-syntax-highlighter": "^15.5.0",

View File

@ -0,0 +1,72 @@
# `@storybook/addon-themes
Storybook Addon Themes can be used which between multiple themes for components inside the preview in [Storybook](https://storybook.js.org).
![React Storybook Screenshot](https://user-images.githubusercontent.com/42671/98158421-dada2300-1ea8-11eb-8619-af1e7018e1ec.png)
## Usage
Requires Storybook 7.0 or later. Themes is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run:
```sh
npm i -D @storybook/addon-themes
```
Then, add following content to [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project):
```js
export default {
addons: ['@storybook/addon-themes'],
};
```
### 👇 Tool specific configuration
For tool-specific setup, check out the recipes below
- [`@emotion/styled`](https://github.com/storybookjs/storybook/tree/next/code/addons/themes/docs/getting-started/emotion.md)
- [`@mui/material`](https://github.com/storybookjs/storybook/tree/next/code/addons/themes/docs/getting-started/material-ui.md)
- [`bootstrap`](https://github.com/storybookjs/storybook/tree/next/code/addons/themes/docs/getting-started/bootstrap.md)
- [`styled-components`](https://github.com/storybookjs/storybook/tree/next/code/addons/themes/docs/getting-started/styled-components.md)
- [`tailwind`](https://github.com/storybookjs/storybook/tree/next/code/addons/themes/docs/getting-started/tailwind.md)
- [`vuetify@3.x`](https://github.com/storybookjs/storybook/blob/next/code/addons/themes/docs/api.md#writing-a-custom-decorator)
Don't see your favorite tool listed? Don't worry! That doesn't mean this addon isn't for you. Check out the ["Writing a custom decorator"](https://github.com/storybookjs/storybook/blob/next/code/addons/themes/docs/api.md#writing-a-custom-decorator) section of the [api reference](https://github.com/storybookjs/storybook/blob/next/code/addons/themes/docs/api.md).
### ❗️ Overriding theme
If you want to override your theme for a particular component or story, you can use the `themes.themeOverride` parameter.
```js
import React from 'react';
import { Button } from './Button';
export default {
title: 'Example/Button',
component: Button,
parameters: {
themes: {
themeOverride: 'light', // component level override
},
},
};
export const Primary = {
args: {
primary: true,
label: 'Button',
},
};
export const PrimaryDark = {
args: {
primary: true,
label: 'Button',
},
parameters: {
themes: {
themeOverride: 'dark', // Story level override
},
},
};
```

View File

@ -0,0 +1,206 @@
# API
## Decorators
### `withThemeFromJSXProvider`
Takes your provider component, global styles, and theme(s)to wrap your stories in.
```js
import { withThemeFromJSXProvider } from '@storybook/addon-styling';
export const decorators = [
withThemeFromJSXProvider({
themes: {
light: lightTheme,
dark: darkTheme,
},
defaultTheme: 'light',
Provider: ThemeProvider,
GlobalStyles: CssBaseline,
}),
];
```
Available options:
| option | type | required? | Description |
| ------------ | --------------------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| themes | `Record<string, any>` | | An object of theme configurations where the key is the name of the theme and the value is the theme object. If multiple themes are provided, a toolbar item will be added to switch between themes. |
| defaultTheme | `string` | | The name of the default theme to use |
| Provider | | | The JSX component to provide themes |
| GlobalStyles | | | A JSX component containing global css styles. |
### `withThemeByClassName`
Takes your theme class names to apply your parent element to enable your theme(s).
```js
import { withThemeByClassName } from '@storybook/addon-styling';
export const decorators = [
withThemeByClassName({
themes: {
light: 'light-theme',
dark: 'dark-theme',
},
defaultTheme: 'light',
}),
];
```
Available options:
| option | type | required? | Description |
| -------------- | ------------------------ | :-------: | --------------------------------------------------------------------------------------------------------------- |
| themes | `Record<string, string>` | ✅ | An object of theme configurations where the key is the name of the theme and the value is the theme class name. |
| defaultTheme | `string` | ✅ | The name of the default theme to use |
| parentSelector | `string` | | The selector for the parent element that you want to apply your theme class to. Defaults to "html" |
### `withThemeByDataAttribute`
Takes your theme names and data attribute to apply your parent element to enable your theme(s).
```js
import { withThemeByDataAttribute } from '@storybook/addon-styling';
export const decorators = [
withThemeByDataAttribute({
themes: {
light: 'light',
dark: 'dark',
},
defaultTheme: 'light',
attributeName: 'data-bs-theme',
}),
];
```
available options:
| option | type | required? | Description |
| -------------- | ------------------------ | :-------: | ------------------------------------------------------------------------------------------------------------------- |
| themes | `Record<string, string>` | ✅ | An object of theme configurations where the key is the name of the theme and the value is the data attribute value. |
| defaultTheme | `string` | ✅ | The name of the default theme to use |
| parentSelector | `string` | | The selector for the parent element that you want to apply your theme class to. Defaults to "html" |
| attributeName | `string` | | The name of the data attribute to set on the parent element for your theme(s). Defaults to "data-theme" |
## Writing a custom decorator
If none of these decorators work for your library there is still hope. We've provided a collection of helper functions to get access to the theme toggling state so that you can create a decorator of your own.
### `pluckThemeFromContext`
Pulls the selected theme from storybook's global state.
```js
import { DecoratorHelpers } from '@storybook/addon-styling';
const { pluckThemeFromContext } = DecoratorHelpers;
export const myCustomDecorator =
({ themes, defaultState, ...rest }) =>
(storyFn, context) => {
const selectedTheme = pluckThemeFromContext(context);
// Snipped
};
```
### `useThemeParameters`
Returns the theme parameters for this addon.
```js
import { DecoratorHelpers } from '@storybook/addon-styling';
const { useThemeParameters } = DecoratorHelpers;
export const myCustomDecorator =
({ themes, defaultState, ...rest }) =>
(storyFn, context) => {
const { themeOverride } = useThemeParameters();
// Snipped
};
```
### `initializeThemeState`
Used to register the themes and defaultTheme with the addon state.
```js
import { DecoratorHelpers } from '@storybook/addon-styling';
const { initializeThemeState } = DecoratorHelpers;
export const myCustomDecorator = ({ themes, defaultState, ...rest }) => {
initializeThemeState(Object.keys(themes), defaultTheme);
return (storyFn, context) => {
// Snipped
};
};
```
### Putting it all together
Let's use Vuetify as an example. Vuetify uses it's own global state to know which theme to render. To build a custom decorator to accommodate this method we'll need to do the following
```js
// .storybook/withVeutifyTheme.decorator.js
import { DecoratorHelpers } from '@storybook/addon-styling';
import { useTheme } from 'vuetify';
const { initializeThemeState, pluckThemeFromContext, useThemeParameters } = DecoratorHelpers;
export const withVuetifyTheme = ({ themes, defaultTheme }) => {
initializeThemeState(Object.keys(themes), defaultTheme);
return (story, context) => {
const selectedTheme = pluckThemeFromContext(context);
const { themeOverride } = useThemeParameters();
const selected = themeOverride || selectedTheme || defaultTheme;
return {
components: { story },
setup() {
const theme = useTheme();
theme.global.name.value = selected;
return {
theme,
};
},
template: `<v-app><story /></v-app>`,
};
};
};
```
This can then be provided to Storybook in `.storybook/preview.js`:
```js
// .storybook/preview.js
import { setup } from '@storybook/vue3';
import { registerPlugins } from '../src/plugins';
import { withVuetifyTheme } from './withVuetifyTheme.decorator';
setup((app) => {
registerPlugins(app);
});
/* snipped for brevity */
export const decorators = [
withVuetifyTheme({
themes: {
light: 'light',
dark: 'dark',
customTheme: 'myCustomTheme',
},
defaultTheme: 'customTheme', // The key of your default theme
}),
];
```

View File

@ -0,0 +1,90 @@
# 🏁 Getting started with `bootstrap`
## 📦 Install addon
**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import Bootstrap"](#🥾-import-bootstrap).
To get started, **install the package** as a dev dependency
yarn:
```zsh
yarn add -D @storybook/addon-themes
```
npm:
```zsh
npm install -D @storybook/addon-themes
```
pnpm:
```zsh
pnpm add -D @storybook/addon-themes
```
## 🧩 Register Addon
Now, **include the addon** in your `.storybook/main.js` file.
```diff
module.exports = {
stories: [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-essentials",
+ "@storybook/addon-themes"
],
};
```
## 🥾 Import Bootstrap
To give your stories access to Bootstrap's styles and JavaScript, import them into your `.storybook/preview.js` file.
```diff
import { Preview } from "@storybook/your-renderer";
+import "bootstrap/dist/css/bootstrap.min.css";
+import "bootstrap/dist/js/bootstrap.bundle";
const preview: Preview = {
parameters: { /* ... */ },
};
export default preview;
```
## 🎨 Provide your theme(s)
Bootstrap now supports light and dark color modes out of the box as well as the ability to make your own custom modes. These modes can be activated by setting a `data-bs-theme` attribute on a parent element.
To enable switching between these modes in a click for your stories, use our `withThemeByDataAttribute` decorator by adding the following code to your `.storybook/preview.js` file.
```diff
-import { Preview } from "@storybook/your-renderer";
+import { Preview, Renderer } from "@storybook/your-renderer";
+import { withThemeByDataAttribute } from "@storybook/addon-themes";
import "bootstrap/dist/css/bootstrap.min.css";
import "bootstrap/dist/js/bootstrap.bundle";
const preview: Preview = {
parameters: { /* ... */ },
+ decorators: [
+ withThemeByDataAttribute<Renderer>({
+ themes: {
+ light: "light",
+ dark: "dark",
+ },
+ defaultTheme: "light",
+ attributeName: "data-bs-theme",
+ }),
+ ]
};
export default preview;
```

View File

@ -0,0 +1,74 @@
# 🏁 Getting started with `@emotion/styled`
## 📦 Install addon
**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Provide your themes"](#🎨-provide-your-themes).
To get started, **install the package** as a dev dependency
yarn:
```zsh
yarn add -D @storybook/addon-themes
```
npm:
```zsh
npm install -D @storybook/addon-themes
```
pnpm:
```zsh
pnpm add -D @storybook/addon-themes
```
## 🧩 Register Addon
Now, **include the addon** in your `.storybook/main.js` file
```diff
module.exports = {
stories: [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-essentials",
+ "@storybook/addon-themes"
],
};
```
## 🎨 Provide your theme(s)
Finally, provide your theme(s) and global styles component to your stories with our `withThemeFromJSXProvider` decorator.
Make the following changes to your `.storybook/preview.js`
```diff
-import { Preview } from "@storybook/your-renderer";
+import { Preview, Renderer } from "@storybook/your-renderer";
+import { withThemeFromJSXProvider } from "@storybook/addon-themes";
+import { ThemeProvider } from '@emotion/react';
+import { GlobalStyles, lightTheme, darkTheme } from "../src/themes"; // import your custom theme configs
const preview: Preview = {
parameters: { /* ... */ },
+ decorators: [
+ withThemeFromJSXProvider<Renderer>({
+ themes: {
+ light: lightTheme,
+ dark: darkTheme,
+ },
+ defaultTheme: "light",
+ Provider: ThemeProvider,
+ GlobalStyles: GlobalStyles,
+ }),
+ ]
};
export default preview;
```

View File

@ -0,0 +1,103 @@
# 🏁 Getting started with `@mui/material`
## 📦 Install addon
**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import fonts"](#🔤-import-fonts).
To get started, **install the package** as a dev dependency
yarn:
```zsh
yarn add -D @storybook/addon-themes
```
npm:
```zsh
npm install -D @storybook/addon-themes
```
pnpm:
```zsh
pnpm add -D @storybook/addon-themes
```
## 🧩 Register Addon
Now, **include the addon** in your `.storybook/main.js` file
```diff
module.exports = {
stories: [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-essentials",
+ "@storybook/addon-themes",
],
};
```
## 🔤 Import fonts
`@mui/material` requires Google's Roboto and Material Icon fonts to render everything as intended. I'd recommend getting them from [fontsource](https://github.com/fontsource/fontsource) so that they are version locked dependencies that doesn't require a CDN.
These can be imported into your `.storybook/preview.js` file.
```diff
import { Preview } from "@storybook/your-renderer";
+// Load Material UI fonts
+import "@fontsource/roboto/300.css";
+import "@fontsource/roboto/400.css";
+import "@fontsource/roboto/500.css";
+import "@fontsource/roboto/700.css";
+import "@fontsource/material-icons";
const preview: Preview = {
parameters: { /* ... */ },
};
export default preview;
```
## 🎨 Provide your theme(s)
While Material UI comes with a default theme that works out of the box. You can create your own theme(s) and provide them to your stories with our `withThemeFromJSXProvider` decorator.
Make the following changes to your `.storybook/preview.js`
```diff
-import { Preview } from "@storybook/your-renderer";
+import { Preview, Renderer } from "@storybook/your-renderer";
+import { withThemeFromJSXProvider } from "@storybook/addon-themes";
+import { CssBaseline, ThemeProvider } from "@mui/material";
+import { lightTheme, darkTheme } from "../src/themes"; // import your custom theme configs
// Load Roboto fonts
import "@fontsource/roboto/300.css";
import "@fontsource/roboto/400.css";
import "@fontsource/roboto/500.css";
import "@fontsource/roboto/700.css";
import "@fontsource/material-icons";
const preview: Preview = {
parameters: { /* ... */ },
+ decorators: [
+ withThemeFromJSXProvider<Renderer>({
+ themes: {
+ light: lightTheme,
+ dark: darkTheme,
+ },
+ defaultTheme: "light",
+ Provider: ThemeProvider,
+ GlobalStyles: CssBaseline,
+ }),
+ ],
};
export default preview;
```

View File

@ -0,0 +1,73 @@
# 🏁 Getting started with `styled-components`
## 📦 Install addon
**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Provide your themes"](#🎨-provide-your-themes).
To get started, **install the package** as a dev dependency
yarn:
```zsh
yarn add -D @storybook/addon-themes
```
npm:
```zsh
npm install -D @storybook/addon-themes
```
pnpm:
```zsh
pnpm add -D @storybook/addon-themes
```
## 🧩 Register Addon
Now, **include the addon** in your `.storybook/main.js` file
```diff
module.exports = {
stories: [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-essentials",
+ "@storybook/addon-themes"
],
};
```
## 🎨 Provide your theme(s)
Finally, provide your theme(s) and global styles component to your stories with our `withThemeFromJSXProvider` decorator.
Make the following changes to your `.storybook/preview.js`
```diff
-import { Preview } from "@storybook/your-renderer";
+import { Preview, Renderer } from "@storybook/your-renderer";
+import { withThemeFromJSXProvider } from "@storybook/addon-themes";
+import { ThemeProvider } from 'styled-components';
+import { GlobalStyles, lightTheme, darkTheme } from "../src/themes"; // import your custom theme configs
const preview: Preview = {
parameters: { /* ... */ },
+ decorators: [
+ withThemeFromJSXProvider<Renderer>({
+ themes: {
+ light: lightTheme,
+ dark: darkTheme,
+ },
+ defaultTheme: "light",
+ Provider: ThemeProvider,
+ GlobalStyles: GlobalStyles,
+ }),
+ ],
};
export default preview;
```

View File

@ -0,0 +1,117 @@
# 🏁 Getting started with `tailwind.css`
## 📦 Install addon
**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import your css"](#🥾-import-your-css).
To get started, **install the package** as a dev dependency
yarn:
```zsh
yarn add -D @storybook/addon-themes
```
npm:
```zsh
npm install -D @storybook/addon-themes
```
pnpm:
```zsh
pnpm add -D @storybook/addon-themes
```
## 🧩 Register Addon
Now, **include the addon** in your `.storybook/main.js` file.
```diff
module.exports = {
stories: [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-essentials",
+ "@storybook/addon-themes"
],
};
```
## 🥾 Import your CSS
To give your stories access to Tailwind styles, import them into your `.storybook/preview.js` file.
```diff
import { Preview } from "@storybook/your-renderer";
+import "../src/index.css";
const preview: Preview = {
parameters: { /* ... */ },
};
export default preview;
```
## 🎨 Provide your theme(s)
Tailwind supports light and dark color modes out of the box. These modes can be activated by setting a `.dark` class on a parent element.
To enable switching between these modes in a click for your stories, use our `withThemeByClassName` decorator by adding the following code to your `.storybook/preview.js` file.
```diff
-import { Preview } from "@storybook/your-renderer";
+import { Preview, Renderer } from "@storybook/your-renderer";
+import { withThemeByClassName } from "@storybook/addon-themes";
import "../src/index.css";
const preview: Preview = {
parameters: { /* ... */ },
+ decorators: [
+ withThemeByClassName<Renderer>({
+ themes: {
+ light: "",
+ dark: "dark",
+ },
+ defaultTheme: "light",
+ }),
+ ]
};
export default preview;
```
## 🏷️ Using a data-attribute for theme?
If you've configured Tailwind to toggle themes with a data attribute, use our `withThemeByDataAttribute` decorator by adding the following code to your `.storybook/preview.js` file.
```diff
-import { Preview } from "@storybook/your-renderer";
+import { Preview, Renderer } from "@storybook/your-renderer";
+import { withThemeByDataAttribute } from "@storybook/addon-themes";
import "../src/index.css";
const preview: Preview = {
parameters: { /* ... */ },
+ decorators: [
+ withThemeByDataAttribute<Renderer>({
+ themes: {
+ light: "light",
+ dark: "dark",
+ },
+ defaultTheme: "light",
+ attributeName: "data-theme",
+ }),
+ ]
};
export default preview;
```

View File

@ -0,0 +1,7 @@
const path = require('path');
const baseConfig = require('../../jest.config.browser');
module.exports = {
...baseConfig,
displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep),
};

View File

@ -0,0 +1 @@
import './dist/manager';

View File

@ -0,0 +1,117 @@
{
"name": "@storybook/addon-themes",
"version": "7.2.0-rc.0",
"description": "Switch between multiple themes for you components in Storybook",
"keywords": [
"css",
"essentials",
"storybook-addon",
"storybook-addons",
"style",
"themes",
"toggle"
],
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/addons/themes",
"bugs": {
"url": "https://github.com/storybookjs/storybook/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/storybookjs/storybook.git",
"directory": "code/addons/themes"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/storybook"
},
"license": "MIT",
"author": "Shaun Evening",
"exports": {
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./manager": {
"types": "./dist/manager.d.ts",
"require": "./dist/manager.js",
"import": "./dist/manager.mjs"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
"dist/index.d.ts"
],
"manager": [
"dist/manager.d.ts"
],
"preview": [
"dist/preview.d.ts"
]
}
},
"files": [
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
"@storybook/types": "workspace:*",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "~4.9.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"peerDependenciesMeta": {
"react": {
"optional": true
},
"react-dom": {
"optional": true
}
},
"publishConfig": {
"access": "public"
},
"bundler": {
"entries": [
"./src/index.ts",
"./src/manager.tsx",
"./src/preview.tsx"
]
},
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae17",
"storybook": {
"displayName": "Themes",
"unsupportedFrameworks": [
"react-native"
],
"icon": ""
}
}

View File

@ -0,0 +1 @@
export * from './dist/preview';

View File

@ -0,0 +1,6 @@
{
"name": "@storybook/addon-themes",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
}

View File

@ -0,0 +1,24 @@
export const PARAM_KEY = 'themes' as const;
export const ADDON_ID = `storybook/${PARAM_KEY}}` as const;
export const GLOBAL_KEY = 'theme' as const;
export const THEME_SWITCHER_ID = `${ADDON_ID}/theme-switcher` as const;
export interface ThemeAddonState {
themesList: string[];
themeDefault?: string;
}
export const DEFAULT_ADDON_STATE: ThemeAddonState = {
themesList: [],
themeDefault: undefined,
};
export interface ThemeParameters {
themeOverride?: string;
}
export const DEFAULT_THEME_PARAMETERS: ThemeParameters = {};
export const THEMING_EVENTS = {
REGISTER_THEMES: `${ADDON_ID}/REGISTER_THEMES`,
} as const;

View File

@ -0,0 +1,53 @@
import { useEffect } from '@storybook/preview-api';
import type { DecoratorFunction, Renderer } from '@storybook/types';
import { initializeThemeState, pluckThemeFromContext, useThemeParameters } from './helpers';
export interface ClassNameStrategyConfiguration {
themes: Record<string, string>;
defaultTheme: string;
parentSelector?: string;
}
const DEFAULT_ELEMENT_SELECTOR = 'html';
const classStringToArray = (classString: string) => classString.split(' ').filter(Boolean);
export const withThemeByClassName = <TRenderer extends Renderer = Renderer>({
themes,
defaultTheme,
parentSelector = DEFAULT_ELEMENT_SELECTOR,
}: ClassNameStrategyConfiguration): DecoratorFunction<TRenderer> => {
initializeThemeState(Object.keys(themes), defaultTheme);
return (storyFn, context) => {
const { themeOverride } = useThemeParameters();
const selected = pluckThemeFromContext(context);
useEffect(() => {
const selectedThemeName = themeOverride || selected || defaultTheme;
const parentElement = document.querySelector(parentSelector);
if (!parentElement) {
return;
}
Object.entries(themes)
.filter(([themeName]) => themeName !== selectedThemeName)
.forEach(([themeName, className]) => {
const classes = classStringToArray(className);
if (classes.length > 0) {
parentElement.classList.remove(...classes);
}
});
const newThemeClasses = classStringToArray(themes[selectedThemeName]);
if (newThemeClasses.length > 0) {
parentElement.classList.add(...newThemeClasses);
}
}, [themeOverride, selected, parentSelector]);
return storyFn();
};
};

View File

@ -0,0 +1,37 @@
import { useEffect } from '@storybook/preview-api';
import type { DecoratorFunction, Renderer } from '@storybook/types';
import { initializeThemeState, pluckThemeFromContext, useThemeParameters } from './helpers';
export interface DataAttributeStrategyConfiguration {
themes: Record<string, string>;
defaultTheme: string;
parentSelector?: string;
attributeName?: string;
}
const DEFAULT_ELEMENT_SELECTOR = 'html';
const DEFAULT_DATA_ATTRIBUTE = 'data-theme';
export const withThemeByDataAttribute = <TRenderer extends Renderer = Renderer>({
themes,
defaultTheme,
parentSelector = DEFAULT_ELEMENT_SELECTOR,
attributeName = DEFAULT_DATA_ATTRIBUTE,
}: DataAttributeStrategyConfiguration): DecoratorFunction<TRenderer> => {
initializeThemeState(Object.keys(themes), defaultTheme);
return (storyFn, context) => {
const { themeOverride } = useThemeParameters();
const selected = pluckThemeFromContext(context);
useEffect(() => {
const parentElement = document.querySelector(parentSelector);
const themeKey = themeOverride || selected || defaultTheme;
if (parentElement) {
parentElement.setAttribute(attributeName, themes[themeKey]);
}
}, [themeOverride, selected, parentSelector, attributeName]);
return storyFn();
};
};

View File

@ -0,0 +1,24 @@
import { addons, useParameter } from '@storybook/preview-api';
import type { StoryContext } from '@storybook/types';
import type { ThemeParameters } from '../constants';
import { GLOBAL_KEY, PARAM_KEY, THEMING_EVENTS, DEFAULT_THEME_PARAMETERS } from '../constants';
/**
*
* @param StoryContext
* @returns The global theme name set for your stories
*/
export function pluckThemeFromContext({ globals }: StoryContext): string {
return globals[GLOBAL_KEY] || '';
}
export function useThemeParameters(): ThemeParameters {
return useParameter<ThemeParameters>(PARAM_KEY, DEFAULT_THEME_PARAMETERS) as ThemeParameters;
}
export function initializeThemeState(themeNames: string[], defaultTheme: string) {
addons.getChannel().emit(THEMING_EVENTS.REGISTER_THEMES, {
defaultTheme,
themes: themeNames,
});
}

View File

@ -0,0 +1,5 @@
export * from './class-name.decorator';
export * from './data-attribute.decorator';
export * from './provider.decorator';
export * as DecoratorHelpers from './helpers';

View File

@ -0,0 +1,58 @@
import React from 'react';
import { useMemo } from '@storybook/preview-api';
import type { DecoratorFunction, Renderer } from '@storybook/types';
import { initializeThemeState, pluckThemeFromContext, useThemeParameters } from './helpers';
type Theme = Record<string, any>;
type ThemeMap = Record<string, Theme>;
export interface ProviderStrategyConfiguration {
Provider?: any;
GlobalStyles?: any;
defaultTheme?: string;
themes?: ThemeMap;
}
const pluckThemeFromKeyPairTuple = ([_, themeConfig]: [string, Theme]): Theme => themeConfig;
export const withThemeFromJSXProvider = <TRenderer extends Renderer = Renderer>({
Provider,
GlobalStyles,
defaultTheme,
themes = {},
}: ProviderStrategyConfiguration): DecoratorFunction<TRenderer> => {
const themeNames = Object.keys(themes);
const initialTheme = defaultTheme || themeNames[0];
initializeThemeState(themeNames, initialTheme);
// eslint-disable-next-line react/display-name
return (storyFn, context) => {
const { themeOverride } = useThemeParameters();
const selected = pluckThemeFromContext(context);
const theme = useMemo(() => {
const selectedThemeName = themeOverride || selected || initialTheme;
const pairs = Object.entries(themes);
return pairs.length === 1 ? pluckThemeFromKeyPairTuple(pairs[0]) : themes[selectedThemeName];
}, [themes, selected, themeOverride]);
if (!Provider) {
return (
<>
{GlobalStyles && <GlobalStyles />}
{storyFn()}
</>
);
}
return (
<Provider theme={theme}>
{GlobalStyles && <GlobalStyles />}
{storyFn()}
</Provider>
);
};
};

View File

@ -0,0 +1,3 @@
// make it work with --isolatedModules
export default {};
export * from './decorators';

View File

@ -0,0 +1,14 @@
import { addons, types } from '@storybook/manager-api';
import { ADDON_ID, PARAM_KEY, THEME_SWITCHER_ID } from './constants';
import { ThemeSwitcher } from './theme-switcher';
addons.register(ADDON_ID, () => {
addons.add(THEME_SWITCHER_ID, {
title: 'Themes',
type: types.TOOL,
match: ({ viewMode }) => !!(viewMode && viewMode.match(/^(story|docs)$/)),
render: ThemeSwitcher,
paramKey: PARAM_KEY,
});
});

View File

@ -0,0 +1,11 @@
import type { Renderer, ProjectAnnotations } from '@storybook/types';
import { GLOBAL_KEY } from './constants';
const preview: ProjectAnnotations<Renderer> = {
globals: {
// Required to make sure SB picks this up from URL params
[GLOBAL_KEY]: '',
},
};
export default preview;

View File

@ -0,0 +1,83 @@
import React, { Fragment, useMemo } from 'react';
import { useAddonState, useChannel, useGlobals, useParameter } from '@storybook/manager-api';
import { styled } from '@storybook/theming';
import { Icons, IconButton, WithTooltip, TooltipLinkList } from '@storybook/components';
import type { ThemeAddonState, ThemeParameters } from './constants';
import {
PARAM_KEY,
THEME_SWITCHER_ID,
THEMING_EVENTS,
DEFAULT_ADDON_STATE,
DEFAULT_THEME_PARAMETERS,
} from './constants';
const IconButtonLabel = styled.div(({ theme }) => ({
fontSize: theme.typography.size.s2 - 1,
marginLeft: 10,
}));
const hasMultipleThemes = (themesList: ThemeAddonState['themesList']) => themesList.length > 1;
export const ThemeSwitcher = () => {
const { themeOverride } = useParameter<ThemeParameters>(
PARAM_KEY,
DEFAULT_THEME_PARAMETERS
) as ThemeParameters;
const [{ theme: selected }, updateGlobals] = useGlobals();
const [{ themesList, themeDefault }, updateState] = useAddonState<ThemeAddonState>(
THEME_SWITCHER_ID,
DEFAULT_ADDON_STATE
);
useChannel({
[THEMING_EVENTS.REGISTER_THEMES]: ({ themes, defaultTheme }) => {
updateState((state) => ({
...state,
themesList: themes,
themeDefault: defaultTheme,
}));
},
});
const label = useMemo(() => {
if (themeOverride) {
return <>Story override</>;
}
const themeName = selected || themeDefault;
return themeName && <>{`${themeName} theme`}</>;
}, [themeOverride, themeDefault, selected]);
return hasMultipleThemes(themesList) ? (
<Fragment>
<WithTooltip
placement="top"
trigger="click"
closeOnClick
tooltip={({ onHide }) => {
return (
<TooltipLinkList
links={themesList.map((theme) => ({
id: theme,
title: theme,
active: selected === theme,
onClick: () => {
updateGlobals({ theme });
onHide();
},
}))}
/>
);
}}
>
<IconButton key={THEME_SWITCHER_ID} active={!themeOverride} title="Theme">
<Icons icon="paintbrush" />
{label && <IconButtonLabel>{label}</IconButtonLabel>}
</IconButton>
</WithTooltip>
</Fragment>
) : null;
};

View File

@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"strict": true
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-toolbars",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"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.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0"
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*"
},
"devDependencies": {
"typescript": "~4.9.3"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-viewport",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Build responsive components by adjusting Storybooks viewport size and orientation",
"keywords": [
"addon",
@ -73,13 +73,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
"memoizerific": "^1.11.3",
"prop-types": "^15.7.2"
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/builder-manager",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook manager builder",
"keywords": [
"storybook"
@ -44,9 +44,9 @@
},
"dependencies": {
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/manager": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/core-common": "workspace:*",
"@storybook/manager": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@types/ejs": "^3.1.1",
"@types/find-cache-dir": "^3.2.1",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/builder-vite",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "A plugin to run and build Storybooks with Vite",
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme",
"bugs": {
@ -42,15 +42,15 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/channels": "7.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/csf-plugin": "7.2.0-alpha.0",
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/csf-plugin": "workspace:*",
"@storybook/mdx2-csf": "^1.0.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/preview": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/node-logger": "workspace:*",
"@storybook/preview": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/types": "workspace:*",
"@types/find-cache-dir": "^3.2.1",
"browser-assert": "^1.2.1",
"es-module-lexer": "^0.9.3",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/builder-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"
@ -56,22 +56,22 @@
},
"dependencies": {
"@babel/core": "^7.22.9",
"@storybook/addons": "7.2.0-alpha.0",
"@storybook/channels": "7.2.0-alpha.0",
"@storybook/client-api": "7.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/components": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/core-webpack": "7.2.0-alpha.0",
"@storybook/addons": "workspace:*",
"@storybook/channels": "workspace:*",
"@storybook/client-api": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/core-webpack": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/preview": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/router": "7.2.0-alpha.0",
"@storybook/store": "7.2.0-alpha.0",
"@storybook/theming": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/preview": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/router": "workspace:*",
"@storybook/store": "workspace:*",
"@storybook/theming": "workspace:*",
"@swc/core": "^1.3.49",
"@types/node": "^16.0.0",
"@types/semver": "^7.3.4",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addons",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook addons store",
"keywords": [
"storybook"
@ -44,9 +44,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0"
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/types": "workspace:*"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/channel-postmessage",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "",
"keywords": [
"storybook"
@ -43,8 +43,8 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/channels": "7.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0"
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*"
},
"devDependencies": {
"typescript": "~4.9.3"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/channel-websocket",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "",
"keywords": [
"storybook"
@ -43,8 +43,8 @@
"prep": "../../../scripts/prepare/facade.ts"
},
"dependencies": {
"@storybook/channels": "7.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0"
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*"
},
"devDependencies": {
"typescript": "~4.9.3"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/client-api",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook Client API",
"keywords": [
"storybook"
@ -42,8 +42,8 @@
"prep": "../../../scripts/prepare/facade.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0"
"@storybook/client-logger": "workspace:*",
"@storybook/preview-api": "workspace:*"
},
"publishConfig": {
"access": "public"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/core-client",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"
@ -35,8 +35,8 @@
"prep": "../../../scripts/prepare/facade.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0"
"@storybook/client-logger": "workspace:*",
"@storybook/preview-api": "workspace:*"
},
"publishConfig": {
"access": "public"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/api",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook Manager API (facade)",
"keywords": [
"storybook"
@ -42,8 +42,8 @@
"prep": "../../../scripts/prepare/facade.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/manager-api": "7.2.0-alpha.0"
"@storybook/client-logger": "workspace:*",
"@storybook/manager-api": "workspace:*"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preview-web",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "",
"keywords": [
"storybook"
@ -42,8 +42,8 @@
"prep": "../../../scripts/prepare/facade.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0"
"@storybook/client-logger": "workspace:*",
"@storybook/preview-api": "workspace:*"
},
"publishConfig": {
"access": "public"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/store",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "",
"keywords": [
"storybook"
@ -42,8 +42,8 @@
"prep": "../../../scripts/prepare/facade.ts"
},
"dependencies": {
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0"
"@storybook/client-logger": "workspace:*",
"@storybook/preview-api": "workspace:*"
},
"publishConfig": {
"access": "public"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/angular",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"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.2.0-alpha.0",
"@storybook/cli": "7.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/core-server": "7.2.0-alpha.0",
"@storybook/core-webpack": "7.2.0-alpha.0",
"@storybook/docs-tools": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/cli": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/core-webpack": "workspace:*",
"@storybook/docs-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/telemetry": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/manager-api": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/telemetry": "workspace:*",
"@storybook/types": "workspace:*",
"@types/node": "^16.0.0",
"@types/react": "^16.14.34",
"@types/react-dom": "^16.9.14",

View File

@ -12,7 +12,7 @@ export const getApplication = ({
storyFnAngular: StoryFnAngularReturnType;
component?: any;
targetSelector: string;
analyzedMetadata?: PropertyExtractor;
analyzedMetadata: PropertyExtractor;
}) => {
const { props, styles, moduleMetadata = {} } = storyFnAngular;
let { template } = storyFnAngular;

View File

@ -52,7 +52,7 @@ export const createStorybookWrapperComponent = ({
styles: string[];
moduleMetadata: NgModuleMetadata;
initialProps?: ICollection;
analyzedMetadata?: PropertyExtractor;
analyzedMetadata: PropertyExtractor;
}): Type<any> => {
// In ivy, a '' selector is not allowed, therefore we need to just set it to anything if
// storyComponent was not provided.

View File

@ -3,3 +3,4 @@ export { computesTemplateSourceFromComponent } from './client/angular-beta/Compu
export { rendererFactory } from './client/render';
export { AbstractRenderer } from './client/angular-beta/AbstractRenderer';
export { getApplication } from './client/angular-beta/StorybookModule';
export { PropertyExtractor } from './client/angular-beta/utils/PropertyExtractor';

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/ember",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember",
"bugs": {
@ -31,12 +31,12 @@
"prep": "../../../scripts/prepare/tsc.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/docs-tools": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/docs-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/preview-api": "workspace:*",
"@storybook/types": "workspace:*",
"ts-dedent": "^2.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html-vite",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,13 +47,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addons": "7.2.0-alpha.0",
"@storybook/builder-vite": "7.2.0-alpha.0",
"@storybook/client-api": "7.2.0-alpha.0",
"@storybook/core-server": "7.2.0-alpha.0",
"@storybook/html": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/preview-web": "7.2.0-alpha.0",
"@storybook/addons": "workspace:*",
"@storybook/builder-vite": "workspace:*",
"@storybook/client-api": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/html": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/preview-web": "workspace:*",
"magic-string": "^0.30.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,11 +47,11 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/html": "7.2.0-alpha.0",
"@storybook/preset-html-webpack": "7.2.0-alpha.0",
"@storybook/html": "workspace:*",
"@storybook/preset-html-webpack": "workspace:*",
"@types/node": "^16.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/nextjs",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Next.js",
"keywords": [
"storybook",
@ -58,6 +58,7 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/core": "^7.22.9",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
@ -70,13 +71,13 @@
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.6",
"@storybook/addon-actions": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/preset-react-webpack": "7.2.0-alpha.0",
"@storybook/preview-api": "7.2.0-alpha.0",
"@storybook/react": "7.2.0-alpha.0",
"@storybook/addon-actions": "workspace:*",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/preset-react-webpack": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/react": "workspace:*",
"@types/node": "^16.0.0",
"css-loader": "^6.7.3",
"find-up": "^5.0.0",
@ -97,7 +98,6 @@
"tsconfig-paths-webpack-plugin": "^4.0.1"
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@babel/types": "^7.22.5",
"@types/babel__core": "^7",
"@types/babel__plugin-transform-runtime": "^7",
@ -107,7 +107,6 @@
"webpack": "^5.65.0"
},
"peerDependencies": {
"@babel/core": "^7.22.0",
"@next/font": "^13.0.0",
"next": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
@ -115,9 +114,6 @@
"webpack": "^5.0.0"
},
"peerDependenciesMeta": {
"@babel/core": {
"optional": true
},
"@next/font": {
"optional": true
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact-vite",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,8 +47,8 @@
},
"dependencies": {
"@preact/preset-vite": "^2.0.0",
"@storybook/builder-vite": "7.2.0-alpha.0",
"@storybook/preact": "7.2.0-alpha.0"
"@storybook/builder-vite": "workspace:*",
"@storybook/preact": "workspace:*"
},
"devDependencies": {
"@types/node": "^16.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Preact: Develop Preact Component in isolation.",
"keywords": [
"storybook"
@ -47,10 +47,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/preact": "7.2.0-alpha.0",
"@storybook/preset-preact-webpack": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/preact": "workspace:*",
"@storybook/preset-preact-webpack": "workspace:*",
"@types/node": "^16.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-vite",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -49,8 +49,8 @@
"dependencies": {
"@joshwooding/vite-plugin-react-docgen-typescript": "0.2.1",
"@rollup/pluginutils": "^5.0.2",
"@storybook/builder-vite": "7.2.0-alpha.0",
"@storybook/react": "7.2.0-alpha.0",
"@storybook/builder-vite": "workspace:*",
"@storybook/react": "workspace:*",
"@vitejs/plugin-react": "^3.0.1",
"ast-types": "^0.14.2",
"magic-string": "^0.30.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,9 +47,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/preset-react-webpack": "7.2.0-alpha.0",
"@storybook/react": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/preset-react-webpack": "workspace:*",
"@storybook/react": "workspace:*",
"@types/node": "^16.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/server-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,10 +47,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/preset-server-webpack": "7.2.0-alpha.0",
"@storybook/server": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/preset-server-webpack": "workspace:*",
"@storybook/server": "workspace:*",
"@types/node": "^16.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte-vite",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,9 +47,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/svelte": "7.2.0-alpha.0",
"@storybook/builder-vite": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/svelte": "workspace:*",
"@sveltejs/vite-plugin-svelte": "^2.4.2",
"magic-string": "^0.30.0",
"sveltedoc-parser": "^4.2.1",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,10 +47,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/preset-svelte-webpack": "7.2.0-alpha.0",
"@storybook/svelte": "7.2.0-alpha.0"
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/preset-svelte-webpack": "workspace:*",
"@storybook/svelte": "workspace:*"
},
"devDependencies": {
"svelte": "^4.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/sveltekit",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for SvelteKit",
"keywords": [
"storybook",
@ -50,9 +50,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.2.0-alpha.0",
"@storybook/svelte": "7.2.0-alpha.0",
"@storybook/svelte-vite": "7.2.0-alpha.0"
"@storybook/builder-vite": "workspace:*",
"@storybook/svelte": "workspace:*",
"@storybook/svelte-vite": "workspace:*"
},
"devDependencies": {
"@types/node": "^16.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue-vite",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,10 +47,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/core-server": "7.2.0-alpha.0",
"@storybook/vue": "7.2.0-alpha.0",
"@storybook/builder-vite": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/vue": "workspace:*",
"magic-string": "^0.30.0",
"vue-docgen-api": "^4.40.0"
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,10 +47,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/preset-vue-webpack": "7.2.0-alpha.0",
"@storybook/vue": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/preset-vue-webpack": "workspace:*",
"@storybook/vue": "workspace:*",
"@types/node": "^16.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue3-vite",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,9 +47,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.2.0-alpha.0",
"@storybook/core-server": "7.2.0-alpha.0",
"@storybook/vue3": "7.2.0-alpha.0",
"@storybook/builder-vite": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/vue3": "workspace:*",
"@vitejs/plugin-vue": "^4.0.0",
"magic-string": "^0.30.0",
"vue-docgen-api": "^4.40.0"

View File

@ -17,7 +17,7 @@ export const viteFinal: StorybookConfig['viteFinal'] = async (config, { presets
const plugins: PluginOption[] = [];
// Add vue plugin if not present
if (!(await hasVitePlugins(config.plugins, ['vite:vue']))) {
if (!(config.plugins && (await hasVitePlugins(config.plugins, ['vite:vue'])))) {
const { default: vue } = await import('@vitejs/plugin-vue');
plugins.push(vue());
}

View File

@ -5,7 +5,7 @@
"types": ["node"],
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": false
"strict": true
},
"include": ["src/**/*"]
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue3-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,10 +47,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/preset-vue3-webpack": "7.2.0-alpha.0",
"@storybook/vue3": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/preset-vue3-webpack": "workspace:*",
"@storybook/vue3": "workspace:*",
"@types/node": "^16.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/web-components-vite",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -47,10 +47,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.2.0-alpha.0",
"@storybook/core-server": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/web-components": "7.2.0-alpha.0",
"@storybook/builder-vite": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/web-components": "workspace:*",
"magic-string": "^0.30.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/web-components-webpack5",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
"keywords": [
"lit",
@ -51,10 +51,10 @@
},
"dependencies": {
"@babel/preset-env": "^7.22.9",
"@storybook/builder-webpack5": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/preset-web-components-webpack": "7.2.0-alpha.0",
"@storybook/web-components": "7.2.0-alpha.0",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/preset-web-components-webpack": "workspace:*",
"@storybook/web-components": "workspace:*",
"@types/node": "^16.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/channels",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "",
"keywords": [
"storybook"
@ -68,9 +68,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/channels": "7.2.0-alpha.0",
"@storybook/client-logger": "7.2.0-alpha.0",
"@storybook/core-events": "7.2.0-alpha.0",
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"qs": "^6.10.0",
"telejson": "^7.0.3",

View File

@ -1,6 +1,6 @@
{
"name": "sb",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook CLI",
"keywords": [
"storybook"
@ -21,7 +21,7 @@
"license": "MIT",
"bin": "./index.js",
"dependencies": {
"@storybook/cli": "7.2.0-alpha.0"
"@storybook/cli": "workspace:*"
},
"publishConfig": {
"access": "public"

View File

@ -1,6 +1,6 @@
{
"name": "storybook",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook CLI",
"keywords": [
"storybook"
@ -24,7 +24,7 @@
"storybook": "./index.js"
},
"dependencies": {
"@storybook/cli": "7.2.0-alpha.0"
"@storybook/cli": "workspace:*"
},
"publishConfig": {
"access": "public"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/cli",
"version": "7.2.0-alpha.0",
"version": "7.2.0-rc.0",
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
"keywords": [
"cli",
@ -58,13 +58,13 @@
"@babel/preset-env": "^7.22.9",
"@babel/types": "^7.22.5",
"@ndelangen/get-tarball": "^3.0.7",
"@storybook/codemod": "7.2.0-alpha.0",
"@storybook/core-common": "7.2.0-alpha.0",
"@storybook/core-server": "7.2.0-alpha.0",
"@storybook/csf-tools": "7.2.0-alpha.0",
"@storybook/node-logger": "7.2.0-alpha.0",
"@storybook/telemetry": "7.2.0-alpha.0",
"@storybook/types": "7.2.0-alpha.0",
"@storybook/codemod": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/csf-tools": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/telemetry": "workspace:*",
"@storybook/types": "workspace:*",
"@types/semver": "^7.3.4",
"@yarnpkg/fslib": "2.10.3",
"@yarnpkg/libzip": "2.3.0",
@ -89,14 +89,14 @@
"puppeteer-core": "^2.1.1",
"read-pkg-up": "^7.0.1",
"semver": "^7.3.7",
"simple-update-notifier": "^1.0.0",
"simple-update-notifier": "^2.0.0",
"strip-json-comments": "^3.0.1",
"tempy": "^1.0.1",
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@storybook/client-api": "7.2.0-alpha.0",
"@storybook/client-api": "workspace:*",
"@types/cross-spawn": "^6.0.2",
"@types/prompts": "^2.0.9",
"@types/puppeteer-core": "^2.1.0",

View File

@ -19,7 +19,7 @@ export const angularBuildersMultiproject: Fix<AngularBuildersMultiprojectRunOpti
const frameworkPackageName = getFrameworkPackageName(mainConfig);
if (
(await isNxProject(packageManager)) ||
(await isNxProject()) ||
frameworkPackageName !== '@storybook/angular' ||
!angularVersion ||
semver.lt(angularVersion, '14.0.0')

View File

@ -25,7 +25,7 @@ export const angularBuilders: Fix<AngularBuildersRunOptions> = {
// Skip in case of NX
if (
!angularVersion ||
(await isNxProject(packageManager)) ||
(await isNxProject()) ||
framewworkPackageName !== '@storybook/angular'
) {
return null;

View File

@ -212,7 +212,7 @@ export async function detect(
return ProjectType.UNDETECTED;
}
if (await isNxProject(packageManager)) {
if (await isNxProject()) {
return ProjectType.NX;
}

View File

@ -300,7 +300,6 @@ export function getStorybookVersionSpecifier(packageJson: PackageJsonWithDepsAnd
return allDeps[storybookPackage];
}
export async function isNxProject(packageManager: JsPackageManager) {
const nxVersion = await packageManager.getPackageVersion('nx');
return !!nxVersion ?? findUp.sync('nx.json');
export async function isNxProject() {
return findUp.sync('nx.json');
}

Some files were not shown because too many files have changed in this diff Show More