diff --git a/CHANGELOG.md b/CHANGELOG.md index e836b81e7ad8..60adcc476fb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 8.4.6 + +- Addon Test: Use pathe for better windows support - [#29676](https://github.com/storybookjs/storybook/pull/29676), thanks @yannbf! +- Angular: Default to standalone components in Angular v19 - [#29677](https://github.com/storybookjs/storybook/pull/29677), thanks @ingowagner! +- Frameworks: Add Vite 6 support - [#29710](https://github.com/storybookjs/storybook/pull/29710), thanks @yannbf! +- Portable stories: Support multiple annotation notations from preview - [#29733](https://github.com/storybookjs/storybook/pull/29733), thanks @yannbf! +- React: Upgrade react-docgen-typescript to support Vite 6 - [#29724](https://github.com/storybookjs/storybook/pull/29724), thanks @yannbf! +- Svelte: Support `@sveltejs/vite-plugin-svelte` v5 - [#29731](https://github.com/storybookjs/storybook/pull/29731), thanks @JReinhold! + ## 8.4.5 - Angular: Support v19 - [#29659](https://github.com/storybookjs/storybook/pull/29659), thanks @leosvelperez! diff --git a/code/addons/test/package.json b/code/addons/test/package.json index 5fffb4b477e2..59d1e484d3fe 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -98,6 +98,7 @@ "execa": "^8.0.1", "find-up": "^7.0.0", "formik": "^2.2.9", + "pathe": "^1.1.2", "picocolors": "^1.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/code/addons/test/src/node/boot-test-runner.ts b/code/addons/test/src/node/boot-test-runner.ts index 032be588b107..4acc4995919b 100644 --- a/code/addons/test/src/node/boot-test-runner.ts +++ b/code/addons/test/src/node/boot-test-runner.ts @@ -1,5 +1,4 @@ import { type ChildProcess } from 'node:child_process'; -import { join } from 'node:path'; import type { Channel } from 'storybook/internal/channels'; import { @@ -13,6 +12,7 @@ import { // eslint-disable-next-line depend/ban-dependencies import { execaNode } from 'execa'; +import { join } from 'pathe'; import { TEST_PROVIDER_ID } from '../constants'; import { log } from '../logger'; diff --git a/code/addons/test/src/node/test-manager.test.ts b/code/addons/test/src/node/test-manager.test.ts index 415c9bbc7bb6..e51a4016e6b8 100644 --- a/code/addons/test/src/node/test-manager.test.ts +++ b/code/addons/test/src/node/test-manager.test.ts @@ -3,7 +3,7 @@ import { createVitest } from 'vitest/node'; import { Channel, type ChannelTransport } from '@storybook/core/channels'; -import path from 'path'; +import path from 'pathe'; import { TEST_PROVIDER_ID } from '../constants'; import { TestManager } from './test-manager'; diff --git a/code/addons/test/src/node/vitest-manager.ts b/code/addons/test/src/node/vitest-manager.ts index ab31e1fc7694..84fadfcbf25d 100644 --- a/code/addons/test/src/node/vitest-manager.ts +++ b/code/addons/test/src/node/vitest-manager.ts @@ -1,11 +1,11 @@ import { existsSync } from 'node:fs'; -import path, { normalize } from 'node:path'; import type { TestProject, TestSpecification, Vitest, WorkspaceProject } from 'vitest/node'; import type { Channel } from 'storybook/internal/channels'; import type { TestingModuleRunRequestPayload } from 'storybook/internal/core-events'; +import path, { normalize } from 'pathe'; import slash from 'slash'; import { log } from '../logger'; diff --git a/code/addons/test/src/postinstall.ts b/code/addons/test/src/postinstall.ts index 90595b0e15d6..6c275d7c707b 100644 --- a/code/addons/test/src/postinstall.ts +++ b/code/addons/test/src/postinstall.ts @@ -1,8 +1,6 @@ import { existsSync } from 'node:fs'; import * as fs from 'node:fs/promises'; import { writeFile } from 'node:fs/promises'; -import { dirname, join, relative } from 'node:path'; -import * as path from 'node:path'; import { JsPackageManagerFactory, @@ -16,6 +14,7 @@ import { colors, logger } from 'storybook/internal/node-logger'; // eslint-disable-next-line depend/ban-dependencies import { execa } from 'execa'; import { findUp } from 'find-up'; +import { dirname, extname, join, relative, resolve } from 'pathe'; import picocolors from 'picocolors'; import prompts from 'prompts'; import { coerce, satisfies } from 'semver'; @@ -27,7 +26,8 @@ import { printError, printInfo, printSuccess, step } from './postinstall-logger' const ADDON_NAME = '@storybook/experimental-addon-test' as const; const EXTENSIONS = ['.js', '.jsx', '.ts', '.tsx', '.cts', '.mts', '.cjs', '.mjs'] as const; -const findFile = async (basename: string) => findUp(EXTENSIONS.map((ext) => basename + ext)); +const findFile = async (basename: string, extraExtensions: string[] = []) => + findUp([...EXTENSIONS, ...extraExtensions].map((ext) => basename + ext)); export default async function postInstall(options: PostinstallOptions) { printSuccess( @@ -244,7 +244,10 @@ export default async function postInstall(options: PostinstallOptions) { args: ['playwright', 'install', 'chromium', '--with-deps'], }); - const vitestSetupFile = path.resolve(options.configDir, 'vitest.setup.ts'); + const fileExtension = + allDeps['typescript'] || (await findFile('tsconfig', ['.json'])) ? 'ts' : 'js'; + + const vitestSetupFile = resolve(options.configDir, `vitest.setup.${fileExtension}`); if (existsSync(vitestSetupFile)) { printError( '🚨 Oh no!', @@ -264,9 +267,9 @@ export default async function postInstall(options: PostinstallOptions) { logger.plain(`${step} Creating a Vitest setup file for Storybook:`); logger.plain(colors.gray(` ${vitestSetupFile}`)); - const previewExists = EXTENSIONS.map((ext) => - path.resolve(options.configDir, `preview${ext}`) - ).some((config) => existsSync(config)); + const previewExists = EXTENSIONS.map((ext) => resolve(options.configDir, `preview${ext}`)).some( + (config) => existsSync(config) + ); await writeFile( vitestSetupFile, @@ -331,10 +334,10 @@ export default async function postInstall(options: PostinstallOptions) { if (rootConfig) { // If there's an existing config, we create a workspace file so we can run Storybook tests alongside. - const extname = path.extname(rootConfig); - const browserWorkspaceFile = path.resolve(dirname(rootConfig), `vitest.workspace${extname}`); + const extension = extname(rootConfig); + const browserWorkspaceFile = resolve(dirname(rootConfig), `vitest.workspace${extension}`); // to be set in vitest config - const vitestSetupFilePath = path.relative(path.dirname(browserWorkspaceFile), vitestSetupFile); + const vitestSetupFilePath = relative(dirname(browserWorkspaceFile), vitestSetupFile); logger.line(1); logger.plain(`${step} Creating a Vitest project workspace file:`); @@ -373,9 +376,9 @@ export default async function postInstall(options: PostinstallOptions) { ); } else { // If there's no existing Vitest/Vite config, we create a new Vitest config file. - const newVitestConfigFile = path.resolve('vitest.config.ts'); + const newVitestConfigFile = resolve(`vitest.config.${fileExtension}`); // to be set in vitest config - const vitestSetupFilePath = path.relative(path.dirname(newVitestConfigFile), vitestSetupFile); + const vitestSetupFilePath = relative(dirname(newVitestConfigFile), vitestSetupFile); logger.line(1); logger.plain(`${step} Creating a Vitest project config file:`); @@ -491,14 +494,17 @@ async function getStorybookInfo({ configDir, packageManager: pkgMgr }: Postinsta } const builderPackageJson = await fs.readFile( - `${typeof builder === 'string' ? builder : builder.name}/package.json`, + require.resolve(join(typeof builder === 'string' ? builder : builder.name, 'package.json')), 'utf8' ); const builderPackageName = JSON.parse(builderPackageJson).name; let rendererPackageName: string | undefined; if (renderer) { - const rendererPackageJson = await fs.readFile(`${renderer}/package.json`, 'utf8'); + const rendererPackageJson = await fs.readFile( + require.resolve(join(renderer, 'package.json')), + 'utf8' + ); rendererPackageName = JSON.parse(rendererPackageJson).name; } diff --git a/code/addons/test/src/preset.ts b/code/addons/test/src/preset.ts index 685a56e2baf4..41808c55d21b 100644 --- a/code/addons/test/src/preset.ts +++ b/code/addons/test/src/preset.ts @@ -1,5 +1,4 @@ import { readFileSync } from 'node:fs'; -import { isAbsolute, join } from 'node:path'; import type { Channel } from 'storybook/internal/channels'; import { checkAddonOrder, getFrameworkName, serverRequire } from 'storybook/internal/common'; @@ -11,6 +10,7 @@ import { import { oneWayHash, telemetry } from 'storybook/internal/telemetry'; import type { Options, PresetProperty, StoryId } from 'storybook/internal/types'; +import { isAbsolute, join } from 'pathe'; import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index 968b0e656141..5b7d1e135e93 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -1,6 +1,4 @@ /* eslint-disable no-underscore-dangle */ -import { join, resolve } from 'node:path'; - import type { Plugin } from 'vitest/config'; import { @@ -12,6 +10,8 @@ import { readConfig, vitestTransform } from 'storybook/internal/csf-tools'; import { MainFileMissingError } from 'storybook/internal/server-errors'; import type { StoriesEntry } from 'storybook/internal/types'; +import { join, resolve } from 'pathe'; + import type { InternalOptions, UserOptions } from './types'; const defaultOptions: UserOptions = { @@ -105,9 +105,18 @@ export const storybookTest = (options?: UserOptions): Plugin => { config.test.browser.screenshotFailures ??= false; } + // copying straight from https://github.com/vitejs/vite/blob/main/packages/vite/src/node/constants.ts#L60 + // to avoid having to maintain Vite as a dependency just for this + const viteDefaultClientConditions = ['module', 'browser', 'development|production']; + config.resolve ??= {}; config.resolve.conditions ??= []; - config.resolve.conditions.push('storybook', 'stories', 'test'); + config.resolve.conditions.push( + 'storybook', + 'stories', + 'test', + ...viteDefaultClientConditions + ); config.test.setupFiles ??= []; if (typeof config.test.setupFiles === 'string') { diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index b05e67fa4716..371fe10bbcc7 100644 --- a/code/builders/builder-vite/package.json +++ b/code/builders/builder-vite/package.json @@ -61,7 +61,7 @@ }, "peerDependencies": { "storybook": "workspace:^", - "vite": "^4.0.0 || ^5.0.0" + "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" }, "publishConfig": { "access": "public" diff --git a/code/builders/builder-vite/src/vite-config.test.ts b/code/builders/builder-vite/src/vite-config.test.ts index d88da0305397..973746cfbbe6 100644 --- a/code/builders/builder-vite/src/vite-config.test.ts +++ b/code/builders/builder-vite/src/vite-config.test.ts @@ -10,6 +10,7 @@ import { commonConfig } from './vite-config'; vi.mock('vite', async (importOriginal) => ({ ...(await importOriginal()), loadConfigFromFile: vi.fn(async () => ({})), + defaultClientConditions: undefined, })); const loadConfigFromFileMock = vi.mocked(loadConfigFromFile); diff --git a/code/builders/builder-vite/src/vite-config.ts b/code/builders/builder-vite/src/vite-config.ts index 2ab46f81de8c..8983dfc137b3 100644 --- a/code/builders/builder-vite/src/vite-config.ts +++ b/code/builders/builder-vite/src/vite-config.ts @@ -47,7 +47,9 @@ export async function commonConfig( _type: PluginConfigType ): Promise { const configEnv = _type === 'development' ? configEnvServe : configEnvBuild; - const { loadConfigFromFile, mergeConfig } = await import('vite'); + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore this property only exists in Vite 6 + const { loadConfigFromFile, mergeConfig, defaultClientConditions = [] } = await import('vite'); const { viteConfigPath } = await getBuilderOptions(options); @@ -67,7 +69,7 @@ export async function commonConfig( base: './', plugins: await pluginConfig(options), resolve: { - conditions: ['storybook', 'stories', 'test'], + conditions: ['storybook', 'stories', 'test', ...defaultClientConditions], preserveSymlinks: isPreservingSymlinks(), alias: { assert: require.resolve('browser-assert'), diff --git a/code/core/src/preview-api/modules/store/csf/portable-stories.test.ts b/code/core/src/preview-api/modules/store/csf/portable-stories.test.ts index 6c85760cbd4e..24e286b3b909 100644 --- a/code/core/src/preview-api/modules/store/csf/portable-stories.test.ts +++ b/code/core/src/preview-api/modules/store/csf/portable-stories.test.ts @@ -77,6 +77,25 @@ describe('composeStory', () => { expect(composedStory.parameters.fromAnnotations.asDefaultImport).toEqual(true); }); + it('should compose project annotations when used in named and default exports from the same module', () => { + setProjectAnnotations([ + { + initialGlobals: { namedExportAnnotation: true }, + default: { + parameters: { defaultExportAnnotation: true }, + }, + }, + ]); + + const Story: Story = { + render: () => {}, + }; + + const composedStory = composeStory(Story, meta); + expect(composedStory.parameters.defaultExportAnnotation).toEqual(true); + expect(composedStory.globals.namedExportAnnotation).toEqual(true); + }); + it('should return story with composed annotations from story, meta and project', () => { const decoratorFromProjectAnnotations = vi.fn((StoryFn) => StoryFn()); const decoratorFromStoryAnnotations = vi.fn((StoryFn) => StoryFn()); diff --git a/code/core/src/preview-api/modules/store/csf/portable-stories.ts b/code/core/src/preview-api/modules/store/csf/portable-stories.ts index b9efd7da9792..22b449bd98f0 100644 --- a/code/core/src/preview-api/modules/store/csf/portable-stories.ts +++ b/code/core/src/preview-api/modules/store/csf/portable-stories.ts @@ -61,11 +61,8 @@ function extractAnnotation( // import * as annotations from '.storybook/preview' // import annotations from '.storybook/preview' // in both cases: 1 - the file has a default export; 2 - named exports only - // support imports such as - // import * as annotations from '.storybook/preview' - // import annotations from '.storybook/preview' - // in both cases: 1 - the file has a default export; 2 - named exports only - return 'default' in annotation ? annotation.default : annotation; + // also support when the file has both annotations coming from default and named exports + return composeConfigs([annotation]); } export function setProjectAnnotations( diff --git a/code/frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts b/code/frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts index dc12b820879c..1859bb9ca249 100644 --- a/code/frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts +++ b/code/frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts @@ -11,6 +11,7 @@ import { Provider, ɵReflectionCapabilities as ReflectionCapabilities, importProvidersFrom, + VERSION, } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { @@ -176,15 +177,20 @@ export class PropertyExtractor implements NgModuleMetadata { const isDeclarable = isComponent || isDirective || isPipe; // Check if the hierarchically lowest Component or Directive decorator (the only relevant for importing dependencies) is standalone. - const isStandalone = !!( + + let isStandalone = (isComponent || isDirective) && [...decorators] .reverse() // reflectionCapabilities returns decorators in a hierarchically top-down order .find( (d) => this.isDecoratorInstanceOf(d, 'Component') || this.isDecoratorInstanceOf(d, 'Directive') - )?.standalone - ); + )?.standalone; + + //Starting in Angular 19 the default (in case it's undefined) value for standalone is true + if (isStandalone === undefined) { + isStandalone = !!(VERSION.major && Number(VERSION.major) >= 19); + } return { isDeclarable, isStandalone }; }; diff --git a/code/frameworks/experimental-nextjs-vite/package.json b/code/frameworks/experimental-nextjs-vite/package.json index 44466f2a5f2e..97a5c3ab0c21 100644 --- a/code/frameworks/experimental-nextjs-vite/package.json +++ b/code/frameworks/experimental-nextjs-vite/package.json @@ -112,7 +112,7 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", "storybook": "workspace:^", - "vite": "^5.0.0" + "vite": "^5.0.0 || ^6.0.0" }, "peerDependenciesMeta": { "typescript": { diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index f3861e9b2608..d1add9b6133c 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -47,7 +47,7 @@ "prep": "jiti ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@joshwooding/vite-plugin-react-docgen-typescript": "0.3.0", + "@joshwooding/vite-plugin-react-docgen-typescript": "0.4.2", "@rollup/pluginutils": "^5.0.2", "@storybook/builder-vite": "workspace:*", "@storybook/react": "workspace:*", @@ -66,7 +66,7 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", "storybook": "workspace:^", - "vite": "^4.0.0 || ^5.0.0" + "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" }, "engines": { "node": ">=18.0.0" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 09483ba1cc03..41773274f5e5 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -64,10 +64,10 @@ "vite": "^4.0.0" }, "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0 || ^4.0.0", + "@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", "storybook": "workspace:^", "svelte": "^4.0.0 || ^5.0.0", - "vite": "^4.0.0 || ^5.0.0" + "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" }, "engines": { "node": ">=18.0.0" diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index aee3e6ab83f4..a86fea331414 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -71,7 +71,7 @@ "peerDependencies": { "storybook": "workspace:^", "svelte": "^4.0.0 || ^5.0.0", - "vite": "^4.0.0 || ^5.0.0" + "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" }, "engines": { "node": ">=18.0.0" diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index d3b20d89759e..d51ca75ccef2 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -68,7 +68,7 @@ }, "peerDependencies": { "storybook": "workspace:^", - "vite": "^4.0.0 || ^5.0.0" + "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" }, "engines": { "node": ">=18.0.0" diff --git a/code/package.json b/code/package.json index 54a3a54f6da4..b8fbca0a54b2 100644 --- a/code/package.json +++ b/code/package.json @@ -293,5 +293,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "8.4.6" } diff --git a/code/yarn.lock b/code/yarn.lock index fd065ae707ed..2bef1e924de9 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -3866,21 +3866,19 @@ __metadata: languageName: node linkType: hard -"@joshwooding/vite-plugin-react-docgen-typescript@npm:0.3.0": - version: 0.3.0 - resolution: "@joshwooding/vite-plugin-react-docgen-typescript@npm:0.3.0" +"@joshwooding/vite-plugin-react-docgen-typescript@npm:0.4.2": + version: 0.4.2 + resolution: "@joshwooding/vite-plugin-react-docgen-typescript@npm:0.4.2" dependencies: - glob: "npm:^7.2.0" - glob-promise: "npm:^4.2.0" magic-string: "npm:^0.27.0" react-docgen-typescript: "npm:^2.2.2" peerDependencies: typescript: ">= 4.3.x" - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/31098ad8fcc2440437534599c111d9f2951dd74821e8ba46c521b969bae4c918d830b7bb0484efbad29a51711bb62d3bc623d5a1ed5b1695b5b5594ea9dd4ca0 + checksum: 10c0/355d13ad92a9da786b561a25250e6c94a8e51d235ced345e54ebfe709abc45ab60c2a8d06599df6ec0441fba01720f189883429943cb62dff9a4c31b59f0939c languageName: node linkType: hard @@ -5997,7 +5995,7 @@ __metadata: vite: "npm:^4.0.4" peerDependencies: storybook: "workspace:^" - vite: ^4.0.0 || ^5.0.0 + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 languageName: unknown linkType: soft @@ -6437,6 +6435,7 @@ __metadata: execa: "npm:^8.0.1" find-up: "npm:^7.0.0" formik: "npm:^2.2.9" + pathe: "npm:^1.1.2" picocolors: "npm:^1.1.0" polished: "npm:^4.2.2" prompts: "npm:^2.4.0" @@ -6482,7 +6481,7 @@ __metadata: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: "workspace:^" - vite: ^5.0.0 + vite: ^5.0.0 || ^6.0.0 dependenciesMeta: sharp: optional: true @@ -6923,7 +6922,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/react-vite@workspace:frameworks/react-vite" dependencies: - "@joshwooding/vite-plugin-react-docgen-typescript": "npm:0.3.0" + "@joshwooding/vite-plugin-react-docgen-typescript": "npm:0.4.2" "@rollup/pluginutils": "npm:^5.0.2" "@storybook/builder-vite": "workspace:*" "@storybook/react": "workspace:*" @@ -6939,7 +6938,7 @@ __metadata: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: "workspace:^" - vite: ^4.0.0 || ^5.0.0 + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 languageName: unknown linkType: soft @@ -7233,10 +7232,10 @@ __metadata: typescript: "npm:^5.3.2" vite: "npm:^4.0.0" peerDependencies: - "@sveltejs/vite-plugin-svelte": ^2.0.0 || ^3.0.0 || ^4.0.0 + "@sveltejs/vite-plugin-svelte": ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 storybook: "workspace:^" svelte: ^4.0.0 || ^5.0.0 - vite: ^4.0.0 || ^5.0.0 + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 languageName: unknown linkType: soft @@ -7295,7 +7294,7 @@ __metadata: peerDependencies: storybook: "workspace:^" svelte: ^4.0.0 || ^5.0.0 - vite: ^4.0.0 || ^5.0.0 + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 languageName: unknown linkType: soft @@ -7390,7 +7389,7 @@ __metadata: vue-docgen-api: "npm:^4.75.1" peerDependencies: storybook: "workspace:^" - vite: ^4.0.0 || ^5.0.0 + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 languageName: unknown linkType: soft @@ -8095,7 +8094,7 @@ __metadata: languageName: node linkType: hard -"@types/glob@npm:^7.1.1, @types/glob@npm:^7.1.3": +"@types/glob@npm:^7.1.1": version: 7.2.0 resolution: "@types/glob@npm:7.2.0" dependencies: @@ -16444,17 +16443,6 @@ __metadata: languageName: node linkType: hard -"glob-promise@npm:^4.2.0": - version: 4.2.2 - resolution: "glob-promise@npm:4.2.2" - dependencies: - "@types/glob": "npm:^7.1.3" - peerDependencies: - glob: ^7.1.6 - checksum: 10c0/3eb01bed2901539365df6a4d27800afb8788840647d01f9bf3500b3de756597f2ff4b8c823971ace34db228c83159beca459dc42a70968d4e9c8200ed2cc96bd - languageName: node - linkType: hard - "glob-to-regexp@npm:^0.4.1": version: 0.4.1 resolution: "glob-to-regexp@npm:0.4.1" @@ -16491,7 +16479,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.2.0": +"glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: diff --git a/docs/_assets/contribute/local-storybook-website-dropdown-optimized.mp4 b/docs/_assets/contribute/local-storybook-website-dropdown-optimized.mp4 new file mode 100644 index 000000000000..b165b199c31b Binary files /dev/null and b/docs/_assets/contribute/local-storybook-website-dropdown-optimized.mp4 differ diff --git a/docs/_assets/contribute/local-storybook-website-dropdown-optimized.png b/docs/_assets/contribute/local-storybook-website-dropdown-optimized.png deleted file mode 100644 index 229efa469abf..000000000000 Binary files a/docs/_assets/contribute/local-storybook-website-dropdown-optimized.png and /dev/null differ diff --git a/docs/_snippets/add-localize-package-to-polyfills.md b/docs/_snippets/add-localize-package-to-polyfills.md deleted file mode 100644 index 109a146cb5d3..000000000000 --- a/docs/_snippets/add-localize-package-to-polyfills.md +++ /dev/null @@ -1,4 +0,0 @@ -```ts filename="src/polyfills.ts" renderer="angular" language="ts" -import '@angular/localize/init'; -``` - diff --git a/docs/_snippets/addon-actions-action-function.md b/docs/_snippets/addon-actions-action-function.md index 2bfa724a201b..ac2c1cd93a7d 100644 --- a/docs/_snippets/addon-actions-action-function.md +++ b/docs/_snippets/addon-actions-action-function.md @@ -91,4 +91,3 @@ const meta: Meta { export default meta; ``` - diff --git a/docs/_snippets/addon-backgrounds-grid.md b/docs/_snippets/addon-backgrounds-grid.md index 03c3b7559735..266d4e39d520 100644 --- a/docs/_snippets/addon-backgrounds-grid.md +++ b/docs/_snippets/addon-backgrounds-grid.md @@ -131,4 +131,3 @@ const meta: Meta = { export default meta; ``` - diff --git a/docs/_snippets/addon-consume-and-update-globaltype.md b/docs/_snippets/addon-consume-and-update-globaltype.md index d2e163551ea6..08eed8c3a8bd 100644 --- a/docs/_snippets/addon-consume-and-update-globaltype.md +++ b/docs/_snippets/addon-consume-and-update-globaltype.md @@ -38,4 +38,3 @@ const ExampleToolbar = () => { ); }; ``` - diff --git a/docs/_snippets/addon-consume-globaltype.md b/docs/_snippets/addon-consume-globaltype.md index cbebb92a408d..6a53af2bdc55 100644 --- a/docs/_snippets/addon-consume-globaltype.md +++ b/docs/_snippets/addon-consume-globaltype.md @@ -38,4 +38,3 @@ const ThemePanel = (props) => { ); }; ``` - diff --git a/docs/_snippets/addon-highlight-reset.md b/docs/_snippets/addon-highlight-reset.md index 5cd0e675b9f0..72a5f296a996 100644 --- a/docs/_snippets/addon-highlight-reset.md +++ b/docs/_snippets/addon-highlight-reset.md @@ -240,4 +240,3 @@ export const ResetHighlight: Story = { ], }; ``` - diff --git a/docs/_snippets/addon-test-install.md b/docs/_snippets/addon-test-install.md index b516f291b85f..482a6c00793e 100644 --- a/docs/_snippets/addon-test-install.md +++ b/docs/_snippets/addon-test-install.md @@ -1,4 +1,4 @@ -```shell renderer="common" language="js" packageManager="npx" +```shell renderer="common" language="js" packageManager="npm" npx storybook add @storybook/experimental-addon-test ``` diff --git a/docs/_snippets/angular-install.md b/docs/_snippets/angular-install.md index 25add9054a0d..5333417d45d9 100644 --- a/docs/_snippets/angular-install.md +++ b/docs/_snippets/angular-install.md @@ -9,4 +9,3 @@ pnpm add --save-dev @storybook/angular ```shell renderer="angular" language="js" packageManager="yarn" yarn add --dev @storybook/angular ``` - diff --git a/docs/_snippets/angular-project-compodoc-config.md b/docs/_snippets/angular-project-compodoc-config.md index 161f5cfce106..ce7077448325 100644 --- a/docs/_snippets/angular-project-compodoc-config.md +++ b/docs/_snippets/angular-project-compodoc-config.md @@ -46,4 +46,3 @@ } } ``` - diff --git a/docs/_snippets/api-doc-block-argtypes-parameter.md b/docs/_snippets/api-doc-block-argtypes-parameter.md index f0f64183d994..abd54038f549 100644 --- a/docs/_snippets/api-doc-block-argtypes-parameter.md +++ b/docs/_snippets/api-doc-block-argtypes-parameter.md @@ -63,4 +63,3 @@ const meta: Meta = { export default meta; ``` - diff --git a/docs/_snippets/api-doc-block-canvas-parameter.md b/docs/_snippets/api-doc-block-canvas-parameter.md index 64c77770d0d2..f49d31200bde 100644 --- a/docs/_snippets/api-doc-block-canvas-parameter.md +++ b/docs/_snippets/api-doc-block-canvas-parameter.md @@ -107,4 +107,3 @@ export const Basic: Story = { }, }; ``` - diff --git a/docs/_snippets/api-doc-block-controls-parameter.md b/docs/_snippets/api-doc-block-controls-parameter.md index 229051ffabb8..03f33b83c7ed 100644 --- a/docs/_snippets/api-doc-block-controls-parameter.md +++ b/docs/_snippets/api-doc-block-controls-parameter.md @@ -94,4 +94,3 @@ const meta: Meta = { export default meta; ``` - diff --git a/docs/_snippets/api-doc-block-description-example.md b/docs/_snippets/api-doc-block-description-example.md index 8ae271fdb0af..63221a8078fc 100644 --- a/docs/_snippets/api-doc-block-description-example.md +++ b/docs/_snippets/api-doc-block-description-example.md @@ -4,7 +4,7 @@ import type { Meta, StoryObj } from '@storybook/angular'; import { Button } from './button.component'; /** - * # Button stories + * Button stories * These stories showcase the button */ const meta: Meta