Merge branch 'next' into tom/sb-1123-sb20250-vite-does-not-show-a-spinner-2

This commit is contained in:
Norbert de Langen 2023-01-18 09:08:32 +01:00
commit d972473b46
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762
596 changed files with 9152 additions and 6712 deletions

View File

@ -623,6 +623,12 @@ workflows:
equal: [daily, << pipeline.parameters.workflow >>]
jobs:
- build
- lint:
requires:
- build
- unit-tests:
requires:
- build
- create-sandboxes:
parallelism: 28
requires:

View File

@ -19,7 +19,7 @@ body:
attributes:
label: To Reproduce
description: >-
Please create a reproduction by running `npx sb@next repro` and
Please create a reproduction by running `npx sb@next sandbox` and
following the instructions. Read our
[documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce)
to learn more about creating reproductions.

View File

@ -1,20 +1,40 @@
Issue:
Issue: #
<!-- Thank you for contributing to Storybook! If your PR is related to an issue, provide the number(s) above, e.g. #1000, #1001 -->
## What I did
<!-- Briefly describe what your PR does -->
## How to test
- [ ] Is this testable with Jest or Chromatic screenshots?
- [ ] Does this need a new example in the kitchen sink apps?
- [ ] Does this need an update to the documentation?
<!-- Please include the steps to test your changes here. For example:
If your answer is yes to any of these, please make sure to include it in your PR.
1. Run a sandbox for template, e.g. `yarn task --task sandbox --start-from auto --template react-vite/default-ts`
2. Open Storybook in your browser
3. Access X story
-->
## Checklist
<!-- Please check (put an "x" inside the "[ ]") the applicable items below to make sure your PR is ready to be reviewed. -->
- [ ] Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
- [ ] Make sure to add/update documentation regarding your changes
- [ ] If you are deprecating/removing a feature, make sure to update
[MIGRATION.MD](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md)
#### Maintainers
- [ ] If this PR should be tested against many or all sandboxes,
make sure to add the `ci:merged` or `ci:daily` GH label to it.
- [ ] Make sure this PR contains **one** of the labels below.
`["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]`
<!--
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 `master` 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
Maintainers: Please tag your pull request with at least one of the following:
`["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]`
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
-->

View File

@ -1,42 +0,0 @@
name: Generate and push repros to the next branch
on:
schedule:
- cron: '2 2 */1 * *'
workflow_dispatch:
# To remove when the branch will be merged
push:
branches:
- vite-frameworks-xyz
jobs:
generate:
runs-on: ubuntu-latest
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
CLEANUP_REPRO_NODE_MODULES: true
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.name "Storybook Bot"
git config --global user.email "bot@storybook.js.org"
- name: Install dependencies
run: node ./scripts/check-dependencies.js
- name: Compile Storybook libraries
run: yarn task --task publish --start-from=auto --no-link
- name: Running local registry
run: yarn local-registry --open &
working-directory: ./code
- name: Wait for registry
run: yarn wait-on http://localhost:6001
working-directory: ./code
- name: Generate repros
run: yarn generate-repros-next --local-registry
working-directory: ./code
- name: Publish repros to GitHub
run: yarn publish-repros --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/repro-templates-temp.git --push
working-directory: ./code

View File

@ -1,4 +1,4 @@
name: Generate And Push Repros
name: Generate and push repros to Github
on:
schedule:
@ -7,13 +7,14 @@ on:
# To remove when the branch will be merged
push:
branches:
- generate-repros
- vite-frameworks-xyz
jobs:
update:
generate:
runs-on: ubuntu-latest
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
CLEANUP_SANDBOX_NODE_MODULES: true
steps:
- uses: actions/setup-node@v3
with:
@ -23,11 +24,19 @@ jobs:
run: |
git config --global user.name "Storybook Bot"
git config --global user.email "bot@storybook.js.org"
- name: Change directory
run: cd code
- name: Install dependencies
run: yarn install
- name: Generate repros with Latest Storybook CLI
run: yarn generate-repros --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/repro-templates.git --push --force-push
- name: Generate repros with Next Storybook CLI
run: yarn generate-repros --next --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/repro-templates.git --push --force-push
run: node ./scripts/check-dependencies.js
- name: Compile Storybook libraries
run: yarn task --task publish --start-from=auto --no-link
- name: Running local registry
run: yarn local-registry --open &
working-directory: ./code
- name: Wait for registry
run: yarn wait-on http://localhost:6001
working-directory: ./code
- name: Generate repros
run: yarn generate-sandboxes --local-registry
working-directory: ./code
- name: Publish sandboxes to GitHub
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push
working-directory: ./code

72
.github/workflows/scorecards.yml vendored Normal file
View File

@ -0,0 +1,72 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
name: Scorecards supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '31 16 * * 5'
push:
branches: [ "next" ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read
steps:
- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
with:
results_file: results.sarif
results_format: sarif
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecards on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 # v2.1.27
with:
sarif_file: results.sarif

View File

@ -1,3 +1,90 @@
## 7.0.0-beta.29 (January 17, 2023)
#### Features
- CLI: Add codemod to upgrade deprecated types [#20618](https://github.com/storybooks/storybook/pull/20618)
- CLI: overhaul `storybook repro` command and rename it to `storybook sandbox` [#20507](https://github.com/storybooks/storybook/pull/20507)
- Vue3: Add source decorator vue template and setup script + supports of multi slots [#20498](https://github.com/storybooks/storybook/pull/20498)
#### Bug Fixes
- Angular: Fix handling of docsMode option in angular builder [#20608](https://github.com/storybooks/storybook/pull/20608)
- UI: Bring back support for `favicon.ico` [#20612](https://github.com/storybooks/storybook/pull/20612)
- CLI: Fix missing css import on Vue3 button [#20470](https://github.com/storybooks/storybook/pull/20470)
- Codemods: Fix `csf-2-to-3` ignores Typescript types [#20273](https://github.com/storybooks/storybook/pull/20273)
- NextJS: Fix image loader [#20615](https://github.com/storybooks/storybook/pull/20615)
- Storyshots: Fix transpilation [#20630](https://github.com/storybooks/storybook/pull/20630)
#### Maintenance
- React: Change deprecated `React.VFC` to `React.FC` [#20619](https://github.com/storybooks/storybook/pull/20619)
#### Dependency Upgrades
- Upgrade babel-loader to ^9.0.0 [#20577](https://github.com/storybooks/storybook/pull/20577)
## 7.0.0-beta.28 (January 14, 2023)
#### Maintenance
- CSF: Remove deprecated ArgTypes.defaultValue [#19492](https://github.com/storybooks/storybook/pull/19492)
#### Dependency Upgrades
- Addon-controls: Fix version of preview api [#20622](https://github.com/storybooks/storybook/pull/20622)
## 7.0.0-beta.27 (January 14, 2023)
#### Features
- CLI: Add "missing-babelrc" automigration [#20341](https://github.com/storybooks/storybook/pull/20341)
#### Bug Fixes
- Angular: Fix isStandaloneComponent check [#20295](https://github.com/storybooks/storybook/pull/20295)
- Blocks: Do not copy code snippet when text inside preview is selected [#19788](https://github.com/storybooks/storybook/pull/19788)
- Vue: Fix type.name check in extractArgTypes [#19956](https://github.com/storybooks/storybook/pull/19956)
- TypeScript: Add children to CanvasProps [#20451](https://github.com/storybooks/storybook/pull/20451)
- CLI: Fix angular/core version in init using devDependencies [#20609](https://github.com/storybooks/storybook/pull/20609)
#### Maintenance
- Svelte: don't add `svelte-loader` nor `svelte` when initializing Svelte projects [#18799](https://github.com/storybooks/storybook/pull/18799)
- Core: prepareMeta function similar to prepareStory [#20592](https://github.com/storybooks/storybook/pull/20592)
#### Build
- Build: Enable Scorecard Github Action and Badge [#19755](https://github.com/storybooks/storybook/pull/19755)
- Build: Add e2e test for static JSON files [#19463](https://github.com/storybooks/storybook/pull/19463)
## 7.0.0-beta.26 (January 14, 2023)
#### Features
- Core: Expose port from buildDevStandalone [#20575](https://github.com/storybooks/storybook/pull/20575)
- CLI: Add auto-migration for MDX html-type comments to JS-type comments [#20349](https://github.com/storybooks/storybook/pull/20349)
#### Bug Fixes
- API: Fix typing on useArgs [#20610](https://github.com/storybooks/storybook/pull/20610)
- Addon-docs: Fix docs crash by simplifying element before stringify [#19188](https://github.com/storybooks/storybook/pull/19188)
- Vite: Fix duplicate code in preview [#20594](https://github.com/storybooks/storybook/pull/20594)
- Addons: Warn when addon is not installed [#20455](https://github.com/storybooks/storybook/pull/20455)
- Blocks: Handle undefined extractComponentDescription [#20590](https://github.com/storybooks/storybook/pull/20590)
#### Maintenance
- CLI: Fix removal of --no-dll flag [#20589](https://github.com/storybooks/storybook/pull/20589)
- SvelteKit: Automatically support Kit-specific features [#20239](https://github.com/storybooks/storybook/pull/20239)
#### Build
- Build: Fix issue with jest projects matching `ui/node_modules` [#20601](https://github.com/storybooks/storybook/pull/20601)
- TypeScript: Fix typings files to ensure check command succeeds [#20605](https://github.com/storybooks/storybook/pull/20605)
- CLI: Fix repros creation not working on windows [#20606](https://github.com/storybooks/storybook/pull/20606)
- Build: Fix template stories to make them work with stricter Typescript settings [#20591](https://github.com/storybooks/storybook/pull/20591)
- Build: Allow creating internal templates that extend others and pass `main.js` options [#20054](https://github.com/storybooks/storybook/pull/20054)
## 7.0.0-beta.25 (January 12, 2023)
#### Features

View File

@ -20,6 +20,7 @@
- [Webpack4 support discontinued](#webpack4-support-discontinued)
- [Framework field mandatory](#framework-field-mandatory)
- [frameworkOptions renamed](#frameworkoptions-renamed)
- [TypeScript: StorybookConfig type moved](#typescript-storybookconfig-type-moved)
- [Framework standalone build moved](#framework-standalone-build-moved)
- [Docs modern inline rendering by default](#docs-modern-inline-rendering-by-default)
- [Babel mode v7 exclusively](#babel-mode-v7-exclusively)
@ -38,6 +39,7 @@
- [Addon-a11y: Removed deprecated withA11y decorator](#addon-a11y-removed-deprecated-witha11y-decorator)
- [Stories glob matches MDX files](#stories-glob-matches-mdx-files)
- [Add strict mode](#add-strict-mode)
- [Removed DLL flags](#removed-dll-flags)
- [Docs Changes](#docs-changes)
- [Standalone docs files](#standalone-docs-files)
- [Referencing stories in docs files](#referencing-stories-in-docs-files)
@ -542,6 +544,7 @@ In 7.0, frameworks also specify the builder to be used. For example, The current
- `@storybook/angular`
- `@storybook/html-webpack5`
- `@storybook/nextjs`
- `@storybook/preact-webpack5`
- `@storybook/react-webpack5`
- `@storybook/react-vite`
@ -571,6 +574,23 @@ module.exports = {
};
```
#### TypeScript: StorybookConfig type moved
If you are using TypeScript you should import the `StorybookConfig` type from your framework package.
For example:
```ts
import type { StorybookConfig } from '@storybook/react-vite';
const config: StorybookConfig = {
framework: '@storybook/react-vite',
// ... your configuration
};
export default config;
```
#### Framework standalone build moved
In 7.0 the location of the standalone node API has moved to `@storybook/core-server`.
@ -741,6 +761,10 @@ Starting in 7.0, Storybook's build tools add [`"use strict"`](https://developer.
If user code in `.storybook/preview.js` or stories relies on "sloppy" mode behavior, it will need to be updated. As a workaround, it is sometimes possible to move the sloppy mode code inside a script tag in `.storybook/preview-head.html`.
#### Removed DLL flags
Earlier versions of Storybook used Webpack DLLs as a performance crutch. In 6.1, we've removed Storybook's built-in DLLs and have deprecated the command-line parameters `--no-dll` and `--ui-dll`. In 7.0 those options are removed.
### Docs Changes
The information hierarchy of docs in Storybook has changed in 7.0. The main difference is that each docs is listed in the sidebar as a separate entry, rather than attached to individual stories.
@ -2319,7 +2343,7 @@ In 5.3 you customized a story description with the `docs.storyDescription` param
The following frameworks now render stories inline on the Docs tab by default, rather than in an iframe: `react`, `vue`, `web-components`, `html`.
To disable inline rendering, set the `docs.inlineStories` parameter to `false`.
To disable inline rendering, set the `docs.stories.inline` parameter to `false`.
### New addon presets

View File

@ -39,6 +39,9 @@
<a href="https://twitter.com/intent/follow?screen_name=storybookjs">
<img src="https://badgen.net/twitter/follow/storybookjs?icon=twitter&label=%40storybookjs" alt="Official Twitter Handle" />
</a>
<a href="https://api.securityscorecards.dev/projects/github.com/storybookjs/storybook">
<img src="https://api.securityscorecards.dev/projects/github.com/storybookjs/storybook/badge" alt="OpenSSF Scorecard"/>
</a>
</p>
<p align="center">

View File

@ -16,7 +16,7 @@ export const WithParams = () => <Button>WithParams</Button>;
WithParams.parameters = { foo: 'bar' }
export const WithDocsParams = () => <Button>WithDocsParams</Button>;
WithDocsParams.parameters = { docs: { iframeHeight: 200 } };
WithDocsParams.parameters = { docs: { story: { iframeHeight: '200px' } } };
export const WithStorySourceParams = () => <Button>WithStorySourceParams</Button>;
WithStorySourceParams.parameters = { storySource: { source: 'foo' } };

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
@ -63,16 +63,16 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addon-highlight": "7.0.0-beta.25",
"@storybook/channels": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/addon-highlight": "7.0.0-beta.29",
"@storybook/channels": "7.0.0-beta.29",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"axe-core": "^4.2.0",
"lodash": "^4.17.21",
"react-resize-detector": "^7.1.2"
@ -104,7 +104,7 @@
"./src/preview.tsx"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Accessibility",
"icon": "https://user-images.githubusercontent.com/263385/101991665-47042f80-3c7c-11eb-8f00-64b5a18f498a.png",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
@ -77,14 +77,14 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"dequal": "^2.0.2",
"lodash": "^4.17.21",
"polished": "^4.2.2",
@ -121,7 +121,7 @@
"./src/preview.ts"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Actions",
"unsupportedFrameworks": [

View File

@ -5,8 +5,8 @@ import type { API } from '@storybook/manager-api';
import { STORY_CHANGED } from '@storybook/core-events';
import { ActionLogger as ActionLoggerComponent } from '../../components/ActionLogger';
import { EVENT_ID } from '../..';
import type { ActionDisplay } from '../../models';
import { EVENT_ID } from '../../constants';
interface ActionLoggerProps {
active: boolean;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
@ -76,14 +76,14 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"memoizerific": "^1.11.3",
"ts-dedent": "^2.0.0"
},
@ -112,7 +112,7 @@
"./src/preview.tsx"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Backgrounds",
"icon": "https://user-images.githubusercontent.com/263385/101991667-479cc600-3c7c-11eb-96d3-410e936252e7.png",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
@ -68,15 +68,15 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/blocks": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.8",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/blocks": "7.0.0-beta.29",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"lodash": "^4.17.21",
"ts-dedent": "^2.0.0"
},
@ -102,7 +102,7 @@
],
"platform": "browser"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Controls",
"icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png",

View File

@ -187,7 +187,7 @@ Storybook Docs renders all Angular stories inside IFrames, with a default height
To update the global default, modify `.storybook/preview.ts`:
```ts
export const parameters = { docs: { iframeHeight: 400 } };
export const parameters = { docs: { story: { iframeHeight: '400px' } } };
```
For `DocsPage`, you need to update the parameter locally in a story:
@ -195,7 +195,7 @@ For `DocsPage`, you need to update the parameter locally in a story:
```ts
export const basic = () => ...
basic.parameters = {
docs: { iframeHeight: 400 }
docs: { story: { iframeHeight: '400px' } },
}
```
@ -209,12 +209,12 @@ And for `MDX` you can modify it as an attribute on the `Story` element:
Storybook Docs renders all Angular stories inline by default.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter.
However, you can render stories in an iframe, with a default height of `100px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.story.inline` parameter.
To do so for all stories, update `.storybook/preview.js`:
```js
export const parameters = { docs: { inlineStories: false } };
export const parameters = { docs: { story: { inline: false } } };
```
## More resources

View File

@ -71,9 +71,7 @@ In the "common" setup, Storybook Docs renders stories inside `iframe`s, with a d
To update the global default, modify `.storybook/preview.js`:
```ts
import { addParameters } from '@storybook/ember';
addParameters({ docs: { iframeHeight: 400 } });
export const parameters = { docs: { story: { iframeHeight: '400px' } } };
```
For `DocsPage`, you need to update the parameter locally in a story:
@ -81,7 +79,7 @@ For `DocsPage`, you need to update the parameter locally in a story:
```ts
export const basic = () => ...
basic.parameters = {
docs: { iframeHeight: 400 }
docs: { story: { iframeHeight: '400px' } }
}
```

View File

@ -125,7 +125,7 @@ Storybook Docs renders all Ember stories inside `iframe`s, with a default height
To update the global default, modify `.storybook/preview.js`:
```ts
export const parameters = { docs: { iframeHeight: 400 } };
export const parameters = { docs: { story: { iframeHeight: '400px' } } };
```
For `DocsPage`, you need to update the parameter locally in a story:
@ -133,7 +133,7 @@ For `DocsPage`, you need to update the parameter locally in a story:
```ts
export const basic = () => ...
basic.parameters = {
docs: { iframeHeight: 400 }
docs: { story: { iframeHeight: '400px' } }
}
```

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
@ -103,18 +103,18 @@
"@babel/plugin-transform-react-jsx": "^7.19.0",
"@jest/transform": "^29.3.1",
"@mdx-js/react": "^2.1.5",
"@storybook/blocks": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/csf-plugin": "7.0.0-beta.25",
"@storybook/csf-tools": "7.0.0-beta.25",
"@storybook/blocks": "7.0.0-beta.29",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/csf-plugin": "7.0.0-beta.29",
"@storybook/csf-tools": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/mdx2-csf": "next",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/postinstall": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/postinstall": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"fs-extra": "^9.0.1",
"remark-external-links": "^8.0.0",
"remark-slug": "^6.0.0",
@ -141,7 +141,7 @@
"./src/shims/mdx-react-shim.ts"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Docs",
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",

View File

@ -100,12 +100,12 @@ Some **markdown** description, or whatever you want.
Storybook Docs renders all React stories inline by default.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.stories.inline` parameter.
To do so for all stories, update `.storybook/preview.js`:
```js
export const parameters = { docs: { inlineStories: false } };
export const parameters = { docs: { story: { inline: false } } };
```
## TypeScript props with `react-docgen`

View File

@ -25,7 +25,7 @@ export const NoAutoplay = {
// Should autoplay
export const Autoplay = {
parameters: { docs: { autoplay: true } },
parameters: { docs: { story: { autoplay: true } } },
play: async ({ canvasElement }) => {
const pre = await within(canvasElement).findByText('Play has not run');
pre.innerText = 'Play has run';

View File

@ -6,7 +6,12 @@ export default {
args: { label: 'Rendered in iframe' },
parameters: {
chromatic: { disable: true },
docs: { iframeHeight: 120, inlineStories: true },
docs: {
story: {
iframeHeight: '120px',
inline: true,
},
},
},
};

View File

@ -135,12 +135,12 @@ Yes, it's redundant to declare `component` twice. [Coming soon](https://github.c
Storybook Docs renders all Vue stories inline by default.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.stories.inline` parameter.
To do so for all stories, update `.storybook/preview.js`:
```js
export const parameters = { docs: { inlineStories: false } };
export const parameters = { docs: { story: { inline: false } } };
```
## More resources

View File

@ -135,12 +135,12 @@ Yes, it's redundant to declare `component` twice. [Coming soon](https://github.c
Storybook Docs renders all Vue stories inline by default.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.stories.inline` parameter.
To do so for all stories, update `.storybook/preview.js`:
```js
export const parameters = { docs: { inlineStories: false } };
export const parameters = { docs: { story: { inline: false } } };
```
## More resources

View File

@ -114,12 +114,12 @@ For a full example see the [web-components-kitchen-sink/custom-elements.json](..
Storybook Docs renders all web components stories inline by default.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter.
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.stories.inline` parameter.
To do so for all stories, update `.storybook/preview.js`:
```js
export const parameters = { docs: { inlineStories: false } };
export const parameters = { docs: { story: { inline: false } } };
```
## More resources

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-essentials",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",
@ -119,23 +119,23 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addon-actions": "7.0.0-beta.25",
"@storybook/addon-backgrounds": "7.0.0-beta.25",
"@storybook/addon-controls": "7.0.0-beta.25",
"@storybook/addon-docs": "7.0.0-beta.25",
"@storybook/addon-highlight": "7.0.0-beta.25",
"@storybook/addon-measure": "7.0.0-beta.25",
"@storybook/addon-outline": "7.0.0-beta.25",
"@storybook/addon-toolbars": "7.0.0-beta.25",
"@storybook/addon-viewport": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/addon-actions": "7.0.0-beta.29",
"@storybook/addon-backgrounds": "7.0.0-beta.29",
"@storybook/addon-controls": "7.0.0-beta.29",
"@storybook/addon-docs": "7.0.0-beta.29",
"@storybook/addon-highlight": "7.0.0-beta.29",
"@storybook/addon-measure": "7.0.0-beta.29",
"@storybook/addon-outline": "7.0.0-beta.29",
"@storybook/addon-toolbars": "7.0.0-beta.29",
"@storybook/addon-viewport": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/vue": "7.0.0-beta.25",
"@storybook/vue": "7.0.0-beta.29",
"typescript": "^4.9.3"
},
"peerDependencies": {
@ -166,5 +166,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-highlight",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Highlight DOM nodes within your stories",
"keywords": [
"storybook-addons",
@ -61,9 +61,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "7.0.0-beta.25"
"@storybook/preview-api": "7.0.0-beta.29"
},
"devDependencies": {
"@types/webpack-env": "^1.16.0",
@ -78,7 +78,7 @@
"./src/preview.ts"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"sbmodern": "dist/modern/index.js",
"storybook": {
"displayName": "Highlight",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-interactions",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Automate, test and debug user interactions",
"keywords": [
"storybook-addons",
@ -72,16 +72,16 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/instrumenter": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/instrumenter": "7.0.0-beta.29",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"jest-mock": "^27.0.6",
"polished": "^4.2.2",
"ts-dedent": "^2.2.0"
@ -118,7 +118,7 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Interactions",
"unsupportedFrameworks": [

View File

@ -58,7 +58,10 @@ const addActionsFromArgTypes: ArgsEnhancer<Renderer> = ({ id, initialArgs }) =>
export const argsEnhancers = [addActionsFromArgTypes];
export const { step: runStep } = instrument(
{ step: (label: StepLabel, play: PlayFunction, context: PlayFunctionContext) => play(context) },
{
step: (label: StepLabel, play: PlayFunction, context: PlayFunctionContext<any>) =>
play(context),
},
{ intercept: true }
);

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
@ -70,13 +70,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"react-resize-detector": "^7.1.2",
"upath": "^1.2.0"
},
@ -105,7 +105,7 @@
],
"platform": "browser"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Jest",
"icon": "https://pbs.twimg.com/profile_images/821713465245102080/mMtKIMax_400x400.jpg",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"addon",
@ -77,14 +77,14 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/csf": "next",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/router": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/router": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"prop-types": "^15.7.2",
"ts-dedent": "^2.0.0"
},
@ -114,7 +114,7 @@
"./src/react/index.ts"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Links",
"icon": "https://user-images.githubusercontent.com/263385/101991673-48355c80-3c7c-11eb-9b6e-b627c96a75f6.png",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-measure",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Inspect layouts by visualizing the box model",
"keywords": [
"storybook-addons",
@ -75,13 +75,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25"
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29"
},
"devDependencies": {
"typescript": "~4.9.3"
@ -108,7 +108,7 @@
"./src/preview.tsx"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Measure",
"unsupportedFrameworks": [

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-outline",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Outline all elements with CSS to help with layout placement and alignment",
"keywords": [
"storybook-addons",
@ -78,13 +78,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
@ -112,7 +112,7 @@
"./src/preview.tsx"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Outline",
"unsupportedFrameworks": [

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Take a code snapshot of every story automatically with Jest",
"keywords": [
"addon",
@ -37,12 +37,12 @@
"dependencies": {
"@jest/transform": "^29.3.1",
"@storybook/babel-plugin-require-context-hook": "1.0.1",
"@storybook/client-api": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/core-webpack": "7.0.0-beta.25",
"@storybook/client-api": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/core-webpack": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"@types/glob": "^7.1.3",
"@types/jest-specific-snapshot": "^0.5.6",
"core-js": "^3.8.2",
@ -58,12 +58,12 @@
"@angular/core": "^13.3.6",
"@angular/platform-browser-dynamic": "^13.3.6",
"@emotion/jest": "^11.8.0",
"@storybook/addon-docs": "7.0.0-beta.25",
"@storybook/angular": "7.0.0-beta.25",
"@storybook/react": "7.0.0-beta.25",
"@storybook/vue": "7.0.0-beta.25",
"@storybook/vue3": "7.0.0-beta.25",
"babel-loader": "^8.3.0",
"@storybook/addon-docs": "7.0.0-beta.29",
"@storybook/angular": "7.0.0-beta.29",
"@storybook/react": "7.0.0-beta.29",
"@storybook/vue": "7.0.0-beta.29",
"@storybook/vue3": "7.0.0-beta.29",
"babel-loader": "^9.1.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-to-json": "^3.6.1",
@ -143,7 +143,7 @@
"access": "public"
},
"bundler": {},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Storyshots",
"icon": "https://user-images.githubusercontent.com/263385/101991676-48cdf300-3c7c-11eb-8aa1-944dab6ab29b.png",

View File

@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"jsx": "preserve",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots-puppeteer",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Image snapshots addition to StoryShots based on puppeteer",
"keywords": [
"addon",
@ -36,8 +36,8 @@
"dependencies": {
"@axe-core/puppeteer": "^4.2.0",
"@storybook/csf": "next",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"@types/jest-image-snapshot": "^5.1.0",
"jest-image-snapshot": "^6.0.0"
},
@ -49,7 +49,7 @@
"rimraf": "^3.0.2"
},
"peerDependencies": {
"@storybook/addon-storyshots": "7.0.0-beta.25",
"@storybook/addon-storyshots": "7.0.0-beta.29",
"puppeteer": ">=2.0.0"
},
"peerDependenciesMeta": {
@ -61,5 +61,5 @@
"access": "public"
},
"bundler": {},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "../../tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
"types": ["node"],

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "View a storys source code to see how it works and paste into your app",
"keywords": [
"addon",
@ -54,13 +54,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/router": "7.0.0-beta.25",
"@storybook/source-loader": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/router": "7.0.0-beta.29",
"@storybook/source-loader": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"estraverse": "^5.2.0",
"prop-types": "^15.7.2",
"react-syntax-highlighter": "^15.5.0"
@ -92,7 +92,7 @@
"./src/preset.ts"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Storysource",
"icon": "https://user-images.githubusercontent.com/263385/101991675-48cdf300-3c7c-11eb-9400-58de5ac6daa7.png",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-toolbars",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Create your own toolbar items that control story rendering",
"keywords": [
"addon",
@ -68,11 +68,11 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25"
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29"
},
"devDependencies": {
"typescript": "~4.9.3"
@ -99,7 +99,7 @@
],
"platform": "browser"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Toolbars",
"icon": "https://user-images.githubusercontent.com/263385/101991677-48cdf300-3c7c-11eb-93b4-19b0e3366959.png",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-viewport",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"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.0.0-beta.25",
"@storybook/components": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/components": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/theming": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/theming": "7.0.0-beta.29",
"memoizerific": "^1.11.3",
"prop-types": "^15.7.2"
},
@ -109,7 +109,7 @@
"./src/preview.ts"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec",
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59",
"storybook": {
"displayName": "Viewport",
"icon": "https://user-images.githubusercontent.com/263385/101991678-48cdf300-3c7c-11eb-9764-f8af293c1b28.png",

View File

@ -0,0 +1,27 @@
import { test, expect } from '@playwright/test';
import process from 'process';
const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';
test.describe('JSON files', () => {
test.beforeEach(async ({ page }) => {
await page.goto(storybookUrl);
});
test('should have index.json', async ({ page }) => {
const json = await page.evaluate(() => fetch('/index.json').then((res) => res.json()));
expect(json).toEqual({
v: expect.any(Number),
entries: expect.objectContaining({
'example-button--primary': expect.objectContaining({
id: 'example-button--primary',
importPath: expect.stringContaining('Button.stories'),
name: 'Primary',
title: 'Example/Button',
type: 'story',
}),
}),
});
});
});

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/angular",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
"keywords": [
"storybook",
@ -36,19 +36,19 @@
"prep": "../../../scripts/prepare/tsc.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/client-logger": "7.0.0-beta.25",
"@storybook/core-client": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/core-events": "7.0.0-beta.25",
"@storybook/core-server": "7.0.0-beta.25",
"@storybook/core-webpack": "7.0.0-beta.25",
"@storybook/docs-tools": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/core-client": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/core-events": "7.0.0-beta.29",
"@storybook/core-server": "7.0.0-beta.29",
"@storybook/core-webpack": "7.0.0-beta.29",
"@storybook/docs-tools": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"@types/node": "^16.0.0",
"@types/react": "^16.14.34",
"@types/react-dom": "^16.9.14",
@ -127,5 +127,5 @@
"bundler": {
"tsConfig": "tsconfig.build.json"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -25,6 +25,7 @@ import { buildStandaloneErrorHandler } from '../utils/build-standalone-errors-ha
export type StorybookBuilderOptions = JsonObject & {
browserTarget?: string | null;
tsConfig?: string;
docsMode: boolean;
compodoc: boolean;
compodocArgs: string[];
styles?: ExtraEntryPoint[];
@ -32,7 +33,7 @@ export type StorybookBuilderOptions = JsonObject & {
} & Pick<
// makes sure the option exists
CLIOptions,
'outputDir' | 'configDir' | 'loglevel' | 'quiet' | 'docs' | 'webpackStatsJson'
'outputDir' | 'configDir' | 'loglevel' | 'quiet' | 'webpackStatsJson'
>;
export type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
@ -59,7 +60,7 @@ function commandBuilder(
stylePreprocessorOptions,
styles,
configDir,
docs,
docsMode,
loglevel,
outputDir,
quiet,
@ -69,7 +70,7 @@ function commandBuilder(
const standaloneOptions: StandaloneOptions = {
packageJson: readUpSync({ cwd: __dirname }).packageJson,
configDir,
docs,
docsMode,
loglevel,
outputDir,
quiet,

View File

@ -25,6 +25,7 @@ import { buildStandaloneErrorHandler } from '../utils/build-standalone-errors-ha
export type StorybookBuilderOptions = JsonObject & {
browserTarget?: string | null;
tsConfig?: string;
docsMode: boolean;
compodoc: boolean;
compodocArgs: string[];
styles?: ExtraEntryPoint[];
@ -42,7 +43,6 @@ export type StorybookBuilderOptions = JsonObject & {
| 'smokeTest'
| 'ci'
| 'quiet'
| 'docs'
>;
export type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
@ -70,7 +70,7 @@ function commandBuilder(
styles,
ci,
configDir,
docs,
docsMode,
host,
https,
port,
@ -85,7 +85,7 @@ function commandBuilder(
packageJson: readUpSync({ cwd: __dirname }).packageJson,
ci,
configDir,
docs,
docsMode,
host,
https,
port,

View File

@ -268,12 +268,57 @@ describe('isStandaloneComponent', () => {
expect(isStandaloneComponent(FooPipe)).toEqual(false);
});
it('should return false with Directive', () => {
it('should return true with a Directive with "standalone: true"', () => {
// TODO: `standalone` is only available in Angular v14. Remove cast to `any` once
// Angular deps are updated to v14.x.x.
@Directive({ standalone: true } as any)
class FooDirective {}
expect(isStandaloneComponent(FooDirective)).toEqual(true);
});
it('should return false with a Directive with "standalone: false"', () => {
// TODO: `standalone` is only available in Angular v14. Remove cast to `any` once
// Angular deps are updated to v14.x.x.
@Directive({ standalone: false } as any)
class FooDirective {}
expect(isStandaloneComponent(FooDirective)).toEqual(false);
});
it('should return false with Directive without the "standalone" property', () => {
@Directive()
class FooDirective {}
expect(isStandaloneComponent(FooDirective)).toEqual(false);
});
it('should return true with a Pipe with "standalone: true"', () => {
// TODO: `standalone` is only available in Angular v14. Remove cast to `any` once
// Angular deps are updated to v14.x.x.
@Pipe({ standalone: true } as any)
class FooPipe {}
expect(isStandaloneComponent(FooPipe)).toEqual(true);
});
it('should return false with a Pipe with "standalone: false"', () => {
// TODO: `standalone` is only available in Angular v14. Remove cast to `any` once
// Angular deps are updated to v14.x.x.
@Pipe({ standalone: false } as any)
class FooPipe {}
expect(isStandaloneComponent(FooPipe)).toEqual(false);
});
it('should return false with Pipe without the "standalone" property', () => {
@Pipe({
name: 'fooPipe',
})
class FooPipe {}
expect(isStandaloneComponent(FooPipe)).toEqual(false);
});
});
describe('getComponentDecoratorMetadata', () => {

View File

@ -116,7 +116,11 @@ export const isStandaloneComponent = (component: any): component is Type<unknown
// TODO: `standalone` is only available in Angular v14. Remove cast to `any` once
// Angular deps are updated to v14.x.x.
return (decorators || []).some((d) => d instanceof Component && (d as any).standalone);
return (decorators || []).some(
(d) =>
(d instanceof Component || d instanceof Directive || d instanceof Pipe) &&
(d as any).standalone
);
};
/**

View File

@ -5,7 +5,7 @@ import { sourceDecorator } from './sourceDecorator';
export const parameters: Parameters = {
docs: {
inlineStories: true,
story: { inline: true },
extractArgTypes,
extractComponentDescription,
source: {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/ember",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
"homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/ember",
"bugs": {
@ -31,12 +31,12 @@
"prep": "../../../scripts/prepare/tsc.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/docs-tools": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/docs-tools": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
@ -59,5 +59,5 @@
"access": "public"
},
"bundler": {},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -3,7 +3,7 @@ import { extractArgTypes, extractComponentDescription } from './jsondoc';
export const parameters = {
docs: {
iframeHeight: 80,
story: { iframeHeight: '80px' },
extractArgTypes,
extractComponentDescription,
},

View File

@ -2,7 +2,7 @@ import { extractArgTypes, extractComponentDescription } from './jsondoc';
export const parameters = {
docs: {
iframeHeight: 80,
story: { iframeHeight: '80px' },
extractArgTypes,
extractComponentDescription,
},

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html-vite",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,15 +48,15 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addons": "7.0.0-beta.25",
"@storybook/builder-vite": "7.0.0-beta.25",
"@storybook/channel-postmessage": "7.0.0-beta.25",
"@storybook/channel-websocket": "7.0.0-beta.25",
"@storybook/client-api": "7.0.0-beta.25",
"@storybook/core-server": "7.0.0-beta.25",
"@storybook/html": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/preview-web": "7.0.0-beta.25",
"@storybook/addons": "7.0.0-beta.29",
"@storybook/builder-vite": "7.0.0-beta.29",
"@storybook/channel-postmessage": "7.0.0-beta.29",
"@storybook/channel-websocket": "7.0.0-beta.29",
"@storybook/client-api": "7.0.0-beta.29",
"@storybook/core-server": "7.0.0-beta.29",
"@storybook/html": "7.0.0-beta.29",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/preview-web": "7.0.0-beta.29",
"magic-string": "^0.26.1"
},
"devDependencies": {
@ -76,5 +76,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1 +1 @@
export type { StorybookConfig } from '@storybook/builder-vite';
export * from './types';

View File

@ -1,6 +1,7 @@
import type { StorybookConfig } from '@storybook/builder-vite';
import type { PresetProperty } from '@storybook/types';
import type { StorybookConfig } from './types';
export const core: StorybookConfig['core'] = {
export const core: PresetProperty<'core', StorybookConfig> = {
builder: '@storybook/builder-vite',
renderer: '@storybook/html',
};

View File

@ -0,0 +1,36 @@
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types';
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
type FrameworkName = '@storybook/html-vite';
type BuilderName = '@storybook/builder-vite';
export type FrameworkOptions = {
builder?: BuilderOptions;
};
type StorybookConfigFramework = {
framework:
| FrameworkName
| {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
builder?:
| BuilderName
| {
name: BuilderName;
options: BuilderOptions;
};
};
};
/**
* The interface for Storybook configuration in `main.ts` files.
*/
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html-webpack5",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,11 +48,11 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/global": "^5.0.0",
"@storybook/html": "7.0.0-beta.25",
"@storybook/preset-html-webpack": "7.0.0-beta.25",
"@storybook/html": "7.0.0-beta.29",
"@storybook/preset-html-webpack": "7.0.0-beta.29",
"@types/node": "^16.0.0"
},
"devDependencies": {
@ -76,5 +76,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/nextjs",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Next.js",
"keywords": [
"storybook",
@ -60,13 +60,13 @@
},
"dependencies": {
"@next/font": "^13.0.7",
"@storybook/addon-actions": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/preset-react-webpack": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/react": "7.0.0-beta.25",
"@storybook/addon-actions": "7.0.0-beta.29",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/preset-react-webpack": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/react": "7.0.0-beta.29",
"@types/node": "^16.0.0",
"find-up": "^5.0.0",
"fs-extra": "^9.0.1",
@ -123,5 +123,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -28,4 +28,4 @@ const nextImageLoaderStub: RawLoaderDefinition<LoaderOptions> = function (conten
nextImageLoaderStub.raw = true;
export default nextImageLoaderStub;
export = nextImageLoaderStub;

View File

@ -7,7 +7,7 @@ type User = {
name: string;
};
export const Page: React.VFC = () => {
export const Page: React.FC = () => {
const [user, setUser] = React.useState<User>();
return (

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact-vite",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,8 +48,8 @@
},
"dependencies": {
"@preact/preset-vite": "^2.0.0",
"@storybook/builder-vite": "7.0.0-beta.25",
"@storybook/preact": "7.0.0-beta.25"
"@storybook/builder-vite": "7.0.0-beta.29",
"@storybook/preact": "7.0.0-beta.29"
},
"devDependencies": {
"@types/node": "^16.0.0",
@ -73,5 +73,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1 +1 @@
export type { StorybookConfig } from '@storybook/builder-vite';
export * from './types';

View File

@ -1,8 +1,9 @@
import type { StorybookConfig } from '@storybook/builder-vite';
import { hasVitePlugins } from '@storybook/builder-vite';
import type { PresetProperty } from '@storybook/types';
import preact from '@preact/preset-vite';
import type { StorybookConfig } from './types';
export const core: StorybookConfig['core'] = {
export const core: PresetProperty<'core', StorybookConfig> = {
builder: '@storybook/builder-vite',
renderer: '@storybook/preact',
};

View File

@ -0,0 +1,36 @@
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types';
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
type FrameworkName = '@storybook/preact-vite';
type BuilderName = '@storybook/builder-vite';
export type FrameworkOptions = {
builder?: BuilderOptions;
};
type StorybookConfigFramework = {
framework:
| FrameworkName
| {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
builder?:
| BuilderName
| {
name: BuilderName;
options: BuilderOptions;
};
};
};
/**
* The interface for Storybook configuration in `main.ts` files.
*/
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact-webpack5",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Preact: Develop Preact Component in isolation.",
"keywords": [
"storybook"
@ -48,10 +48,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/preact": "7.0.0-beta.25",
"@storybook/preset-preact-webpack": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/preact": "7.0.0-beta.29",
"@storybook/preset-preact-webpack": "7.0.0-beta.29",
"@types/node": "^16.0.0"
},
"devDependencies": {
@ -77,5 +77,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-vite",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -50,9 +50,9 @@
"dependencies": {
"@joshwooding/vite-plugin-react-docgen-typescript": "^0.2.1",
"@rollup/pluginutils": "^4.2.0",
"@storybook/builder-vite": "7.0.0-beta.25",
"@storybook/react": "7.0.0-beta.25",
"@vitejs/plugin-react": "^3.0.0",
"@storybook/builder-vite": "7.0.0-beta.29",
"@storybook/react": "7.0.0-beta.29",
"@vitejs/plugin-react": "^3.0.1",
"ast-types": "^0.14.2",
"magic-string": "^0.26.1",
"react-docgen": "6.0.0-alpha.3"
@ -80,5 +80,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1 +1 @@
export type { StorybookConfig } from '@storybook/builder-vite';
export * from './types';

View File

@ -1,8 +1,9 @@
/* eslint-disable global-require */
import type { StorybookConfig } from '@storybook/builder-vite';
import type { PresetProperty } from '@storybook/types';
import { hasVitePlugins } from '@storybook/builder-vite';
import type { StorybookConfig } from './types';
export const core: StorybookConfig['core'] = {
export const core: PresetProperty<'core', StorybookConfig> = {
builder: '@storybook/builder-vite',
renderer: '@storybook/react',
};

View File

@ -0,0 +1,36 @@
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types';
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
type FrameworkName = '@storybook/react-vite';
type BuilderName = '@storybook/builder-vite';
export type FrameworkOptions = {
builder?: BuilderOptions;
};
type StorybookConfigFramework = {
framework:
| FrameworkName
| {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
builder?:
| BuilderName
| {
name: BuilderName;
options: BuilderOptions;
};
};
};
/**
* The interface for Storybook configuration in `main.ts` files.
*/
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-webpack5",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,9 +48,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/preset-react-webpack": "7.0.0-beta.25",
"@storybook/react": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/preset-react-webpack": "7.0.0-beta.29",
"@storybook/react": "7.0.0-beta.29",
"@types/node": "^16.0.0"
},
"devDependencies": {
@ -83,5 +83,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/server-webpack5",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,10 +48,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/preset-server-webpack": "7.0.0-beta.25",
"@storybook/server": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/preset-server-webpack": "7.0.0-beta.29",
"@storybook/server": "7.0.0-beta.29",
"@types/node": "^16.0.0"
},
"devDependencies": {
@ -74,5 +74,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte-vite",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,9 +48,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/svelte": "7.0.0-beta.25",
"@storybook/builder-vite": "7.0.0-beta.29",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/svelte": "7.0.0-beta.29",
"@sveltejs/vite-plugin-svelte": "^2.0.0",
"magic-string": "^0.26.1",
"svelte": "^3.0.0",
@ -80,5 +80,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1 +1 @@
export type { StorybookConfig } from '@storybook/builder-vite';
export * from './types';

View File

@ -1,8 +1,10 @@
import { type StorybookConfig, hasVitePlugins } from '@storybook/builder-vite';
import { hasVitePlugins } from '@storybook/builder-vite';
import type { PresetProperty } from '@storybook/types';
import type { StorybookConfig } from './types';
import { handleSvelteKit } from './utils';
import { svelteDocgen } from './plugins/svelte-docgen';
export const core: StorybookConfig['core'] = {
export const core: PresetProperty<'core', StorybookConfig> = {
builder: '@storybook/builder-vite',
renderer: '@storybook/svelte',
};

View File

@ -0,0 +1,36 @@
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types';
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
type FrameworkName = '@storybook/svelte-vite';
type BuilderName = '@storybook/builder-vite';
export type FrameworkOptions = {
builder?: BuilderOptions;
};
type StorybookConfigFramework = {
framework:
| FrameworkName
| {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
builder?:
| BuilderName
| {
name: BuilderName;
options: BuilderOptions;
};
};
};
/**
* The interface for Storybook configuration in `main.ts` files.
*/
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte-webpack5",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,10 +48,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/preset-svelte-webpack": "7.0.0-beta.25",
"@storybook/svelte": "7.0.0-beta.25"
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/preset-svelte-webpack": "7.0.0-beta.29",
"@storybook/svelte": "7.0.0-beta.29"
},
"devDependencies": {
"svelte": "^3.48.0",
@ -78,5 +78,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -15,6 +15,7 @@ Check out our [Frameworks API](https://storybook.js.org/blog/framework-api/) ann
- [Manual migration](#manual-migration)
- [Troubleshooting](#troubleshooting)
- [Error: `ERR! SyntaxError: Identifier '__esbuild_register_import_meta_url__' has already been declared` when starting Storybook](#error-err-syntaxerror-identifier-__esbuild_register_import_meta_url__-has-already-been-declared-when-starting-storybook)
- [Error: `Cannot read properties of undefined (reading 'disable_scroll_handling')` in preview](#error-cannot-read-properties-of-undefined-reading-disable_scroll_handling-in-preview)
- [Acknowledgements](#acknowledgements)
## Supported features
@ -22,20 +23,20 @@ Check out our [Frameworks API](https://storybook.js.org/blog/framework-api/) ann
All Svelte language features are supported out of the box, as Storybook uses the Svelte compiler underneath.
However SvelteKit has some [Kit-specific modules](https://kit.svelte.dev/docs/modules) that currently aren't supported. It's on our roadmap to support most of them soon:
| **Module** | **Status** |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [`$app/environment`](https://kit.svelte.dev/docs/modules#$app-environment) | 🔜 Coming in 7.0 |
| [`$app/forms`](https://kit.svelte.dev/docs/modules#$app-forms) | ⏳ Planned for 7.1 |
| [`$app/navigation`](https://kit.svelte.dev/docs/modules#$app-navigation) | ⏳ Planned for 7.1. With mocks so the Actions addon will display when the hooks are being called. |
| [`$app/paths`](https://kit.svelte.dev/docs/modules#$app-paths) | ⏳ Planned for 7.1 |
| [`$app/stores`](https://kit.svelte.dev/docs/modules#$app-stores) | 🔜 Coming in 7.0. Mocks are planned for 7.1 so you can set different store values per story. |
| [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private) | ⛔ Not supported. They are meant to only be available server-side, and Storybook renders all components on the client. |
| [`$env/dynamic/public`](https://kit.svelte.dev/docs/modules#$env-dynamic-public) | 🔜 Coming in 7.0 |
| [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private) | ⛔ Not supported. They are meant to only be available server-side, and Storybook renders all components on the client. |
| [`$env/static/public`](https://kit.svelte.dev/docs/modules#$env-static-public) | 🔜 Coming in 7.0 |
| [`$lib`](https://kit.svelte.dev/docs/modules#$lib) | 🔜 Coming in 7.0 |
| [`$service-worker`](https://kit.svelte.dev/docs/modules#$service-worker) | ⛔ Not supported. They are only meant to be used in service workers |
| [`@sveltejs/kit/*`](https://kit.svelte.dev/docs/modules#sveltejs-kit) | ✅ Supported |
| **Module** | **Status** | **Note** |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| [`$app/environment`](https://kit.svelte.dev/docs/modules#$app-environment) | ✅ Supported | `version` is always empty in Storybook. |
| [`$app/forms`](https://kit.svelte.dev/docs/modules#$app-forms) | ⏳ Planned for 7.1 | See [section in Troubleshooting](#error-cannot-read-properties-of-undefined-reading-disable_scroll_handling-in-preview) |
| [`$app/navigation`](https://kit.svelte.dev/docs/modules#$app-navigation) | ⏳ Planned for 7.1. With mocks so the Actions addon will display when the hooks are being called. | See [section in Troubleshooting](#error-cannot-read-properties-of-undefined-reading-disable_scroll_handling-in-preview) |
| [`$app/paths`](https://kit.svelte.dev/docs/modules#$app-paths) | ⏳ Planned for 7.1. | |
| [`$app/stores`](https://kit.svelte.dev/docs/modules#$app-stores) | ✅ Supported | Mocks planned for 7.1, so you can set different store values per story. |
| [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private) | ⛔ Not supported | They are meant to only be available server-side, and Storybook renders all components on the client. |
| [`$env/dynamic/public`](https://kit.svelte.dev/docs/modules#$env-dynamic-public) | 🚧 Partially supported | Only supported in development mode. |
| [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private) | ⛔ Not supported | They are meant to only be available server-side, and Storybook renders all components on the client. |
| [`$env/static/public`](https://kit.svelte.dev/docs/modules#$env-static-public) | ✅ Supported | |
| [`$lib`](https://kit.svelte.dev/docs/modules#$lib) | ✅ Supported | |
| [`$service-worker`](https://kit.svelte.dev/docs/modules#$service-worker) | ⛔ Not supported | They are only meant to be used in service workers |
| [`@sveltejs/kit/*`](https://kit.svelte.dev/docs/modules#sveltejs-kit) | ✅ Supported | |
This is just the beginning. We're close to adding basic support for many of the SvelteKit features. Longer term we're planning on making it an even better experience to [build](https://storybook.js.org/docs/7.0/react/writing-stories/introduction), [test](https://storybook.js.org/docs/7.0/react/writing-tests/introduction) and [document](https://storybook.js.org/docs/7.0/react/writing-docs/introduction) all the SvelteKit goodies like [pages](https://kit.svelte.dev/docs/routing), [forms](https://kit.svelte.dev/docs/form-actions) and [layouts](https://kit.svelte.dev/docs/routing#layout) in Storybook, while still integrating with all the addons and workflows you know and love.
@ -111,6 +112,16 @@ yarn remove @storybook/builder-vite
You'll get this error when manually upgrading from 6.5 to 7.0. You need to remove the `svelteOptions` property in `.storybook/main.cjs`, as that is not supported by Storybook 7.0 + SvelteKit. The property is also not necessary anymore because the Vite and Svelte configurations are loaded automatically in Storybook 7.0.
### Error: `Cannot read properties of undefined (reading 'disable_scroll_handling')` in preview
> Some stories don't load, instead they show the following error in the preview:
>
> ```
> Cannot read properties of undefined (reading 'disable_scroll_handling')
> ```
You'll experience this if anything in your story is importing from `$app/forms` or `$app/navigation`, which is currently not supported. To get around this, separate your component into a shallow parent component that imports what's needed and passes it to a child component via props. This way you can write stories for your child component and mock any of the necessary modules by passing props in.
## Acknowledgements
Integrating with SvelteKit would not have been possible if it weren't for the fantastic efforts by the Svelte core team - especially [Ben McCann](https://twitter.com/benjaminmccann) - to make integrations with the wider ecosystem possible.

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/sveltekit",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for SvelteKit",
"keywords": [
"storybook",
@ -51,9 +51,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.0.0-beta.25",
"@storybook/svelte": "7.0.0-beta.25",
"@storybook/svelte-vite": "7.0.0-beta.25"
"@storybook/builder-vite": "7.0.0-beta.29",
"@storybook/svelte": "7.0.0-beta.29",
"@storybook/svelte-vite": "7.0.0-beta.29"
},
"devDependencies": {
"@types/node": "^16.0.0",
@ -76,5 +76,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1 +1 @@
export * from '@storybook/svelte-vite';
export * from './types';

View File

@ -1,9 +1,10 @@
import { type StorybookConfig } from '@storybook/svelte-vite';
// @ts-expect-error -- TS picks up the type from preset.js instead of dist/preset.d.ts
import { viteFinal as svelteViteFinal } from '@storybook/svelte-vite/preset';
import type { PresetProperty } from '@storybook/types';
import { withoutVitePlugins } from '@storybook/builder-vite';
import { type StorybookConfig } from './types';
export const core: StorybookConfig['core'] = {
export const core: PresetProperty<'core', StorybookConfig> = {
builder: '@storybook/builder-vite',
renderer: '@storybook/svelte',
};
@ -16,10 +17,7 @@ export const viteFinal: NonNullable<StorybookConfig['viteFinal']> = async (confi
// Remove vite-plugin-svelte-kit from plugins if using SvelteKit
// see https://github.com/storybookjs/storybook/issues/19280#issuecomment-1281204341
plugins = await withoutVitePlugins(plugins, [
// pre @sveltejs/kit@1.0.0-next.574
'vite-plugin-svelte-kit',
// @sveltejs/kit@1.0.0-next.582 and later
'vite-plugin-sveltekit-setup',
// @sveltejs/kit@1.0.0-next.587 and later
'vite-plugin-sveltekit-compile',
]);

View File

@ -0,0 +1,36 @@
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types';
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
type FrameworkName = '@storybook/sveltekit';
type BuilderName = '@storybook/builder-vite';
export type FrameworkOptions = {
builder?: BuilderOptions;
};
type StorybookConfigFramework = {
framework:
| FrameworkName
| {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
builder?:
| BuilderName
| {
name: BuilderName;
options: BuilderOptions;
};
};
};
/**
* The interface for Storybook configuration in `main.ts` files.
*/
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue-vite",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,10 +48,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/core-server": "7.0.0-beta.25",
"@storybook/vue": "7.0.0-beta.25",
"@storybook/builder-vite": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/core-server": "7.0.0-beta.29",
"@storybook/vue": "7.0.0-beta.29",
"magic-string": "^0.26.1",
"vue-docgen-api": "^4.40.0"
},
@ -79,5 +79,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1 +1 @@
export type { StorybookConfig } from '@storybook/builder-vite';
export * from './types';

View File

@ -1,6 +1,6 @@
import path from 'path';
import type { PresetProperty } from '@storybook/types';
import type { StorybookConfig } from '@storybook/builder-vite';
import type { StorybookConfig } from './types';
import { vueDocgen } from './plugins/vue-docgen';
export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => {
@ -11,7 +11,7 @@ export const core: PresetProperty<'core', StorybookConfig> = async (config, opti
builder: {
name: path.dirname(
require.resolve(path.join('@storybook/builder-vite', 'package.json'))
) as '@storybook/builder-webpack5',
) as '@storybook/builder-vite',
options: typeof framework === 'string' ? {} : framework?.options.builder || {},
},
renderer: '@storybook/vue',

View File

@ -0,0 +1,36 @@
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types';
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
type FrameworkName = '@storybook/vue-vite';
type BuilderName = '@storybook/builder-vite';
export type FrameworkOptions = {
builder?: BuilderOptions;
};
type StorybookConfigFramework = {
framework:
| FrameworkName
| {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
builder?:
| BuilderName
| {
name: BuilderName;
options: BuilderOptions;
};
};
};
/**
* The interface for Storybook configuration in `main.ts` files.
*/
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue-webpack5",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,10 +48,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/preset-vue-webpack": "7.0.0-beta.25",
"@storybook/vue": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/preset-vue-webpack": "7.0.0-beta.29",
"@storybook/vue": "7.0.0-beta.29",
"@types/node": "^16.0.0"
},
"devDependencies": {
@ -83,5 +83,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue3-vite",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,9 +48,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.0.0-beta.25",
"@storybook/core-server": "7.0.0-beta.25",
"@storybook/vue3": "7.0.0-beta.25",
"@storybook/builder-vite": "7.0.0-beta.29",
"@storybook/core-server": "7.0.0-beta.29",
"@storybook/vue3": "7.0.0-beta.29",
"magic-string": "^0.26.1",
"vue-docgen-api": "^4.40.0"
},
@ -83,5 +83,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1 +1 @@
export type { StorybookConfig } from '@storybook/builder-vite';
export * from './types';

View File

@ -1,8 +1,9 @@
import type { StorybookConfig } from '@storybook/builder-vite';
import { hasVitePlugins } from '@storybook/builder-vite';
import type { PresetProperty } from '@storybook/types';
import type { StorybookConfig } from './types';
import { vueDocgen } from './plugins/vue-docgen';
export const core: StorybookConfig['core'] = {
export const core: PresetProperty<'core', StorybookConfig> = {
builder: '@storybook/builder-vite',
renderer: '@storybook/vue3',
};

View File

@ -0,0 +1,36 @@
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types';
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
type FrameworkName = '@storybook/vue3-vite';
type BuilderName = '@storybook/builder-vite';
export type FrameworkOptions = {
builder?: BuilderOptions;
};
type StorybookConfigFramework = {
framework:
| FrameworkName
| {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
builder?:
| BuilderName
| {
name: BuilderName;
options: BuilderOptions;
};
};
};
/**
* The interface for Storybook configuration in `main.ts` files.
*/
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue3-webpack5",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,10 +48,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/preset-vue3-webpack": "7.0.0-beta.25",
"@storybook/vue3": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/preset-vue3-webpack": "7.0.0-beta.29",
"@storybook/vue3": "7.0.0-beta.29",
"@types/node": "^16.0.0"
},
"devDependencies": {
@ -62,7 +62,7 @@
"peerDependencies": {
"@babel/core": "*",
"@vue/compiler-sfc": "^3.0.0",
"babel-loader": "^7.0.0 || ^8.0.0",
"babel-loader": "^7.0.0 || ^8.0.0 || ^9.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"vue": "^3.0.0"
@ -80,5 +80,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/web-components-vite",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.",
"keywords": [
"storybook"
@ -48,10 +48,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/builder-vite": "7.0.0-beta.25",
"@storybook/core-server": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/web-components": "7.0.0-beta.25",
"@storybook/builder-vite": "7.0.0-beta.29",
"@storybook/core-server": "7.0.0-beta.29",
"@storybook/node-logger": "7.0.0-beta.29",
"@storybook/web-components": "7.0.0-beta.29",
"magic-string": "^0.26.1"
},
"devDependencies": {
@ -75,5 +75,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1 +1 @@
export type { StorybookConfig } from '@storybook/builder-vite';
export * from './types';

View File

@ -1,6 +1,7 @@
import type { StorybookConfig } from '@storybook/builder-vite';
import type { PresetProperty } from '@storybook/types';
import type { StorybookConfig } from './types';
export const core: StorybookConfig['core'] = {
export const core: PresetProperty<'core', StorybookConfig> = {
builder: '@storybook/builder-vite',
renderer: '@storybook/web-components',
};

View File

@ -0,0 +1,36 @@
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types';
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
type FrameworkName = '@storybook/web-components-vite';
type BuilderName = '@storybook/builder-vite';
export type FrameworkOptions = {
builder?: BuilderOptions;
};
type StorybookConfigFramework = {
framework:
| FrameworkName
| {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
builder?:
| BuilderName
| {
name: BuilderName;
options: BuilderOptions;
};
};
};
/**
* The interface for Storybook configuration in `main.ts` files.
*/
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework;

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/web-components-webpack5",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
"keywords": [
"lit-html",
@ -51,10 +51,10 @@
},
"dependencies": {
"@babel/preset-env": "^7.20.2",
"@storybook/builder-webpack5": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/preset-web-components-webpack": "7.0.0-beta.25",
"@storybook/web-components": "7.0.0-beta.25",
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/preset-web-components-webpack": "7.0.0-beta.29",
"@storybook/web-components": "7.0.0-beta.29",
"@types/node": "^16.0.0"
},
"devDependencies": {
@ -79,5 +79,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -13,6 +13,7 @@ const skipOnWindows = [
'addons/storyshots-core/src/frameworks/configure.test.ts',
'lib/core-common/src/utils/__tests__/interpret-files.test.ts',
'lib/cli/src/helpers.test.ts',
'lib/csf-tools/src/enrichCsf.test.ts',
];
module.exports = {

View File

@ -2,5 +2,5 @@
"npmClient": "yarn",
"useWorkspaces": true,
"registry": "https://registry.npmjs.org",
"version": "7.0.0-beta.25"
"version": "7.0.0-beta.29"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addons",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook addons store",
"keywords": [
"storybook"
@ -44,9 +44,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/manager-api": "7.0.0-beta.25",
"@storybook/preview-api": "7.0.0-beta.25",
"@storybook/types": "7.0.0-beta.25"
"@storybook/manager-api": "7.0.0-beta.29",
"@storybook/preview-api": "7.0.0-beta.29",
"@storybook/types": "7.0.0-beta.29"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
@ -60,5 +60,5 @@
"./src/index.ts"
]
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/builder-manager",
"version": "7.0.0-beta.25",
"version": "7.0.0-beta.29",
"description": "Storybook manager builder",
"keywords": [
"storybook"
@ -44,9 +44,9 @@
},
"dependencies": {
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
"@storybook/core-common": "7.0.0-beta.25",
"@storybook/manager": "7.0.0-beta.25",
"@storybook/node-logger": "7.0.0-beta.25",
"@storybook/core-common": "7.0.0-beta.29",
"@storybook/manager": "7.0.0-beta.29",
"@storybook/node-logger": "7.0.0-beta.29",
"@types/ejs": "^3.1.1",
"@types/find-cache-dir": "^3.2.1",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10",
@ -73,5 +73,5 @@
],
"platform": "node"
},
"gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec"
"gitHead": "c6b2e1a65b1a0f65c52819929344602708212a59"
}

View File

@ -119,8 +119,18 @@ const starter: StarterFunction = async function* starterGeneratorFn({
}) {
logger.info('=> Starting manager..');
const { config, customHead, features, instance, refs, template, title, logLevel, docsOptions } =
await getData(options);
const {
config,
favicon,
customHead,
features,
instance,
refs,
template,
title,
logLevel,
docsOptions,
} = await getData(options);
yield;
@ -150,6 +160,7 @@ const starter: StarterFunction = async function* starterGeneratorFn({
const html = await renderHTML(
template,
title,
favicon,
customHead,
cssFiles,
jsFiles,
@ -190,8 +201,18 @@ const builder: BuilderFunction = async function* builderGeneratorFn({ startTime,
throw new Error('outputDir is required');
}
logger.info('=> Building manager..');
const { config, customHead, features, instance, refs, template, title, logLevel, docsOptions } =
await getData(options);
const {
config,
customHead,
favicon,
features,
instance,
refs,
template,
title,
logLevel,
docsOptions,
} = await getData(options);
yield;
const addonsDir = config.outdir;
@ -223,6 +244,7 @@ const builder: BuilderFunction = async function* builderGeneratorFn({ startTime,
const html = await renderHTML(
template,
title,
favicon,
customHead,
cssFiles,
jsFiles,

View File

@ -1,4 +1,4 @@
import { join } from 'path';
import { basename, join } from 'path';
import type { DocsOptions, Options } from '@storybook/types';
import { getRefs } from '@storybook/core-common';
@ -9,6 +9,8 @@ import { safeResolve } from './safeResolve';
export const getData = async (options: Options) => {
const refs = getRefs(options);
const favicon = options.presets.apply<string>('favicon').then((p) => basename(p));
const features = options.presets.apply<Record<string, string | boolean>>('features');
const logLevel = options.presets.apply<string>('logLevel');
const title = options.presets.apply<string>('title');
@ -33,5 +35,6 @@ export const getData = async (options: Options) => {
instance,
config,
logLevel,
favicon,
};
};

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