storybook 9.0.0-alpha.2 → 9.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/server/base-preview-head.html +1 -3
- package/bin/index.cjs +2 -2
- package/dist/actions/decorator.d.ts +6 -0
- package/dist/actions/decorator.js +134 -0
- package/dist/actions/index.cjs +123 -0
- package/dist/actions/index.d.ts +102 -0
- package/dist/actions/index.js +108 -0
- package/dist/actions/preview.cjs +161 -0
- package/dist/actions/preview.d.ts +54 -0
- package/dist/actions/preview.js +152 -0
- package/dist/babel/index.cjs +822 -816
- package/dist/babel/index.js +822 -816
- package/dist/backgrounds/index.cjs +148 -0
- package/dist/backgrounds/index.d.ts +91 -0
- package/dist/backgrounds/index.js +130 -0
- package/dist/backgrounds/preview.cjs +143 -0
- package/dist/backgrounds/preview.d.ts +54 -0
- package/dist/backgrounds/preview.js +127 -0
- package/dist/bin/index.cjs +49 -70
- package/dist/bin/index.js +49 -70
- package/dist/builder-manager/index.cjs +319 -326
- package/dist/builder-manager/index.js +576 -583
- package/dist/channels/index.cjs +1026 -981
- package/dist/channels/index.js +1258 -1207
- package/dist/cli/bin/index.cjs +483 -483
- package/dist/cli/bin/index.js +495 -495
- package/dist/cli/index.cjs +61735 -7590
- package/dist/cli/index.d.ts +25 -21
- package/dist/cli/index.js +61776 -7631
- package/dist/client-logger/index.cjs +56 -88
- package/dist/client-logger/index.js +41 -47
- package/dist/common/index.cjs +16137 -9085
- package/dist/common/index.d.ts +35 -30
- package/dist/common/index.js +16230 -9172
- package/dist/component-testing/index.cjs +23 -0
- package/dist/component-testing/index.d.ts +3 -0
- package/dist/component-testing/index.js +5 -0
- package/dist/component-testing/preview.cjs +40 -0
- package/dist/component-testing/preview.d.ts +5 -0
- package/dist/component-testing/preview.js +25 -0
- package/dist/components/index.cjs +16268 -24926
- package/dist/components/index.d.ts +98 -347
- package/dist/components/index.js +5905 -19177
- package/dist/controls/decorator.d.ts +5 -0
- package/dist/controls/decorator.js +8 -0
- package/dist/controls/index.cjs +26 -0
- package/dist/controls/index.d.ts +39 -0
- package/dist/controls/index.js +6 -0
- package/dist/controls/preview.cjs +26 -0
- package/dist/controls/preview.d.ts +54 -0
- package/dist/controls/preview.js +9 -0
- package/dist/core-events/index.cjs +91 -106
- package/dist/core-events/index.d.ts +139 -104
- package/dist/core-events/index.js +79 -94
- package/dist/core-server/index.cjs +13898 -13409
- package/dist/core-server/index.d.ts +270 -3
- package/dist/core-server/index.js +13981 -13497
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +12149 -17
- package/dist/core-server/presets/common-preset.cjs +3009 -3155
- package/dist/core-server/presets/common-preset.js +2862 -3009
- package/dist/csf/index.cjs +76 -120
- package/dist/csf/index.d.ts +2 -6
- package/dist/csf/index.js +69 -113
- package/dist/csf-tools/index.cjs +412 -403
- package/dist/csf-tools/index.d.ts +0 -4
- package/dist/csf-tools/index.js +410 -401
- package/dist/docs-tools/index.cjs +2569 -575
- package/dist/docs-tools/index.d.ts +2 -2
- package/dist/docs-tools/index.js +2565 -564
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +61 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +535 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +519 -0
- package/dist/instrumenter/index.cjs +2207 -2342
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +2430 -2603
- package/dist/manager/globals-module-info.cjs +291 -151
- package/dist/manager/globals-module-info.d.ts +1 -1
- package/dist/manager/globals-module-info.js +275 -135
- package/dist/manager/globals-runtime.js +60263 -28383
- package/dist/manager/globals.cjs +23 -19
- package/dist/manager/globals.d.ts +8 -5
- package/dist/manager/globals.js +10 -6
- package/dist/manager/runtime.js +4625 -3921
- package/dist/manager-api/index.cjs +4228 -3833
- package/dist/manager-api/index.d.ts +398 -102
- package/dist/manager-api/index.js +3500 -3084
- package/dist/manager-errors.d.ts +25 -1
- package/dist/manager-errors.js +50 -30
- package/dist/measure/index.cjs +476 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +464 -0
- package/dist/measure/preview.cjs +466 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +450 -0
- package/dist/outline/index.cjs +528 -0
- package/dist/outline/index.d.ts +66 -0
- package/dist/outline/index.js +500 -0
- package/dist/outline/preview.cjs +518 -0
- package/dist/outline/preview.d.ts +59 -0
- package/dist/outline/preview.js +486 -0
- package/dist/preview/globals.cjs +21 -17
- package/dist/preview/globals.d.ts +4 -1
- package/dist/preview/globals.js +6 -2
- package/dist/preview/runtime.js +46311 -6614
- package/dist/preview-api/index.cjs +1363 -1899
- package/dist/preview-api/index.d.ts +81 -395
- package/dist/preview-api/index.js +1711 -2169
- package/dist/preview-errors.cjs +119 -88
- package/dist/preview-errors.d.ts +30 -2
- package/dist/preview-errors.js +192 -142
- package/dist/router/index.cjs +847 -871
- package/dist/router/index.js +193 -199
- package/dist/server-errors.cjs +188 -124
- package/dist/server-errors.d.ts +36 -2
- package/dist/server-errors.js +188 -124
- package/dist/telemetry/index.cjs +1056 -1979
- package/dist/telemetry/index.d.ts +26 -5
- package/dist/telemetry/index.js +1091 -2010
- package/dist/test/index.cjs +35686 -0
- package/dist/test/index.d.ts +186 -0
- package/dist/test/index.js +33840 -0
- package/dist/test/preview.cjs +15870 -0
- package/dist/test/preview.d.ts +48 -0
- package/dist/test/preview.js +14501 -0
- package/dist/test/spy.cjs +258 -0
- package/dist/test/spy.d.ts +66 -0
- package/dist/test/spy.js +240 -0
- package/dist/theming/create.cjs +79 -2269
- package/dist/theming/create.js +67 -841
- package/dist/theming/index.cjs +1065 -3232
- package/dist/theming/index.js +951 -1719
- package/dist/types/index.cjs +11 -12
- package/dist/types/index.d.ts +684 -163
- package/dist/types/index.js +1 -2
- package/dist/viewport/index.cjs +310 -0
- package/dist/viewport/index.d.ts +320 -0
- package/dist/viewport/index.js +290 -0
- package/dist/viewport/preview.cjs +35 -0
- package/dist/viewport/preview.d.ts +68 -0
- package/dist/viewport/preview.js +19 -0
- package/package.json +359 -12
package/dist/common/index.d.ts
CHANGED
|
@@ -7,63 +7,42 @@ import { ConfigFile } from 'storybook/internal/csf-tools';
|
|
|
7
7
|
|
|
8
8
|
declare const _default: {
|
|
9
9
|
'@storybook/addon-a11y': string;
|
|
10
|
-
'@storybook/addon-actions': string;
|
|
11
|
-
'@storybook/addon-backgrounds': string;
|
|
12
|
-
'@storybook/addon-controls': string;
|
|
13
10
|
'@storybook/addon-docs': string;
|
|
14
|
-
'@storybook/addon-essentials': string;
|
|
15
|
-
'@storybook/addon-mdx-gfm': string;
|
|
16
|
-
'@storybook/addon-highlight': string;
|
|
17
|
-
'@storybook/addon-interactions': string;
|
|
18
11
|
'@storybook/addon-jest': string;
|
|
19
12
|
'@storybook/addon-links': string;
|
|
20
|
-
'@storybook/addon-measure': string;
|
|
21
13
|
'@storybook/addon-onboarding': string;
|
|
22
|
-
'
|
|
23
|
-
'@storybook/addon-storysource': string;
|
|
24
|
-
'@storybook/addon-test': string;
|
|
14
|
+
'storybook-addon-pseudo-states': string;
|
|
25
15
|
'@storybook/addon-themes': string;
|
|
26
|
-
'@storybook/addon-
|
|
27
|
-
'@storybook/addon-viewport': string;
|
|
16
|
+
'@storybook/addon-vitest': string;
|
|
28
17
|
'@storybook/builder-vite': string;
|
|
29
18
|
'@storybook/builder-webpack5': string;
|
|
30
19
|
storybook: string;
|
|
31
20
|
'@storybook/angular': string;
|
|
32
21
|
'@storybook/ember': string;
|
|
33
|
-
'@storybook/experimental-nextjs-vite': string;
|
|
34
22
|
'@storybook/html-vite': string;
|
|
35
|
-
'@storybook/html-webpack5': string;
|
|
36
23
|
'@storybook/nextjs': string;
|
|
24
|
+
'@storybook/nextjs-vite': string;
|
|
37
25
|
'@storybook/preact-vite': string;
|
|
38
|
-
'@storybook/preact-webpack5': string;
|
|
39
26
|
'@storybook/react-native-web-vite': string;
|
|
40
27
|
'@storybook/react-vite': string;
|
|
41
28
|
'@storybook/react-webpack5': string;
|
|
42
29
|
'@storybook/server-webpack5': string;
|
|
43
30
|
'@storybook/svelte-vite': string;
|
|
44
|
-
'@storybook/svelte-webpack5': string;
|
|
45
31
|
'@storybook/sveltekit': string;
|
|
46
32
|
'@storybook/vue3-vite': string;
|
|
47
|
-
'@storybook/vue3-webpack5': string;
|
|
48
33
|
'@storybook/web-components-vite': string;
|
|
49
|
-
'@storybook/web-components-webpack5': string;
|
|
50
|
-
'@storybook/blocks': string;
|
|
51
34
|
sb: string;
|
|
52
35
|
'@storybook/cli': string;
|
|
53
36
|
'@storybook/codemod': string;
|
|
54
37
|
'@storybook/core-webpack': string;
|
|
55
38
|
'create-storybook': string;
|
|
56
39
|
'@storybook/csf-plugin': string;
|
|
40
|
+
'eslint-plugin-storybook': string;
|
|
57
41
|
'@storybook/react-dom-shim': string;
|
|
58
42
|
'@storybook/source-loader': string;
|
|
59
|
-
'@storybook/test': string;
|
|
60
43
|
'@storybook/preset-create-react-app': string;
|
|
61
|
-
'@storybook/preset-html-webpack': string;
|
|
62
|
-
'@storybook/preset-preact-webpack': string;
|
|
63
44
|
'@storybook/preset-react-webpack': string;
|
|
64
45
|
'@storybook/preset-server-webpack': string;
|
|
65
|
-
'@storybook/preset-svelte-webpack': string;
|
|
66
|
-
'@storybook/preset-vue3-webpack': string;
|
|
67
46
|
'@storybook/html': string;
|
|
68
47
|
'@storybook/preact': string;
|
|
69
48
|
'@storybook/react': string;
|
|
@@ -83,7 +62,6 @@ declare function filterPresetsConfig(presetsConfig: PresetConfig[]): PresetConfi
|
|
|
83
62
|
*
|
|
84
63
|
* Valid inputs:
|
|
85
64
|
*
|
|
86
|
-
* - `'@storybook/addon-actions/manager' => { type: 'virtual', item }`
|
|
87
65
|
* - `'@storybook/addon-docs/preset' => { type: 'presets', item }`
|
|
88
66
|
* - `'@storybook/addon-docs' => { type: 'presets', item: '@storybook/addon-docs/preset' }`
|
|
89
67
|
* - `{ name: '@storybook/addon-docs(/preset)?', options: { } } => { type: 'presets', item: { name:
|
|
@@ -525,7 +503,6 @@ declare abstract class JsPackageManager {
|
|
|
525
503
|
* ```ts
|
|
526
504
|
* addDependencies(options, [
|
|
527
505
|
* `@storybook/react@${storybookVersion}`,
|
|
528
|
-
* `@storybook/addon-actions@${actionsVersion}`,
|
|
529
506
|
* `@storybook/addon-links@${linksVersion}`,
|
|
530
507
|
* ]);
|
|
531
508
|
* ```
|
|
@@ -538,6 +515,7 @@ declare abstract class JsPackageManager {
|
|
|
538
515
|
skipInstall?: boolean;
|
|
539
516
|
installAsDevDependencies?: boolean;
|
|
540
517
|
packageJson?: PackageJson;
|
|
518
|
+
writeOutputToFile?: boolean;
|
|
541
519
|
}, dependencies: string[]): Promise<void>;
|
|
542
520
|
/**
|
|
543
521
|
* Remove dependencies from a project using `yarn remove` or `npm uninstall`.
|
|
@@ -545,7 +523,7 @@ declare abstract class JsPackageManager {
|
|
|
545
523
|
* @example
|
|
546
524
|
*
|
|
547
525
|
* ```ts
|
|
548
|
-
* removeDependencies(options, [`@storybook/react
|
|
526
|
+
* removeDependencies(options, [`@storybook/react`]);
|
|
549
527
|
* ```
|
|
550
528
|
*
|
|
551
529
|
* @param {Object} options Contains `skipInstall`, `packageJson` and `installAsDevDependencies`
|
|
@@ -601,7 +579,7 @@ declare abstract class JsPackageManager {
|
|
|
601
579
|
addScripts(scripts: Record<string, string>): Promise<void>;
|
|
602
580
|
addPackageResolutions(versions: Record<string, string>): Promise<void>;
|
|
603
581
|
protected abstract runInstall(): Promise<void>;
|
|
604
|
-
protected abstract runAddDeps(dependencies: string[], installAsDevDependencies: boolean): Promise<void>;
|
|
582
|
+
protected abstract runAddDeps(dependencies: string[], installAsDevDependencies: boolean, writeOutputToFile?: boolean): Promise<void>;
|
|
605
583
|
protected abstract runRemoveDeps(dependencies: string[]): Promise<void>;
|
|
606
584
|
protected abstract getResolutions(packageJson: PackageJson, versions: Record<string, string>): Record<string, any>;
|
|
607
585
|
/**
|
|
@@ -952,4 +930,31 @@ declare const getAddonNames: (mainConfig: StorybookConfig) => string[];
|
|
|
952
930
|
declare function syncStorybookAddons(mainConfig: StorybookConfig, previewConfigPath: string): Promise<void>;
|
|
953
931
|
declare function getSyncedStorybookAddons(mainConfig: StorybookConfig, previewConfig: ConfigFile): Promise<ConfigFile>;
|
|
954
932
|
|
|
955
|
-
|
|
933
|
+
/**
|
|
934
|
+
* Helper function to scan for files matching a glob pattern and transform them
|
|
935
|
+
*
|
|
936
|
+
* @param options Configuration options
|
|
937
|
+
* @param transform Function to transform the found files
|
|
938
|
+
* @returns Array of errors encountered during transformation
|
|
939
|
+
*/
|
|
940
|
+
declare function scanAndTransformFiles<T extends Record<string, unknown>>({ promptMessage, defaultGlob, dryRun, force, transformFn, transformOptions, }: {
|
|
941
|
+
promptMessage?: string;
|
|
942
|
+
defaultGlob?: string;
|
|
943
|
+
dryRun: boolean;
|
|
944
|
+
force?: boolean;
|
|
945
|
+
transformFn: (files: string[], options: T, dryRun: boolean) => Promise<Array<{
|
|
946
|
+
file: string;
|
|
947
|
+
error: Error;
|
|
948
|
+
}>>;
|
|
949
|
+
transformOptions: T;
|
|
950
|
+
}): Promise<Array<{
|
|
951
|
+
file: string;
|
|
952
|
+
error: Error;
|
|
953
|
+
}>>;
|
|
954
|
+
|
|
955
|
+
declare const transformImportFiles: (files: string[], renamedImports: Record<string, string>, dryRun?: boolean) => Promise<{
|
|
956
|
+
file: string;
|
|
957
|
+
error: Error;
|
|
958
|
+
}[]>;
|
|
959
|
+
|
|
960
|
+
export { type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, boost, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getInterpretedFileWithExt, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, interopRequireDefault, interpolate, isCorePackage, isPreservingSymlinks, loadAllPresets, loadCustomPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePathInStorybookCache, satisfies, scanAndTransformFiles, serverRequire, serverResolve, stringifyEnvs, stringifyProcessEnvs, stripAbsNodeModulesPath, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
|