storybook 9.1.0-alpha.2 → 9.1.0-alpha.4
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/dist/actions/index.cjs +16 -16
- package/dist/actions/index.d.ts +1 -38
- package/dist/actions/index.js +12 -12
- package/dist/actions/preview.cjs +25 -25
- package/dist/actions/preview.d.ts +37 -547
- package/dist/actions/preview.js +18 -18
- package/dist/backgrounds/index.cjs +12 -144
- package/dist/backgrounds/index.d.ts +1 -591
- package/dist/backgrounds/index.js +0 -130
- package/dist/backgrounds/preview.cjs +63 -63
- package/dist/backgrounds/preview.d.ts +40 -542
- package/dist/backgrounds/preview.js +47 -47
- package/dist/bin/index.cjs +50 -50
- package/dist/bin/index.js +50 -50
- package/dist/builder-manager/index.cjs +379 -378
- package/dist/builder-manager/index.d.ts +567 -2
- package/dist/builder-manager/index.js +280 -279
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +87 -79
- package/dist/common/index.d.ts +2 -2
- package/dist/common/index.js +725 -716
- package/dist/component-testing/preview.cjs +12 -12
- package/dist/component-testing/preview.d.ts +2 -2
- package/dist/component-testing/preview.js +7 -7
- package/dist/components/index.cjs +1899 -1895
- package/dist/components/index.js +1343 -1339
- package/dist/controls/index.cjs +16 -16
- package/dist/controls/index.d.ts +1 -36
- package/dist/controls/preview.cjs +17 -17
- package/dist/controls/preview.d.ts +34 -546
- package/dist/controls/preview.js +3 -3
- package/dist/csf/index.cjs +1210 -95
- package/dist/csf/index.d.ts +59 -18
- package/dist/csf/index.js +1214 -90
- package/dist/csf-tools/index.cjs +2 -1
- package/dist/csf-tools/index.js +2 -2
- package/dist/highlight/index.cjs +15 -15
- package/dist/highlight/index.d.ts +1 -12
- package/dist/highlight/index.js +4 -4
- package/dist/highlight/preview.cjs +63 -63
- package/dist/highlight/preview.d.ts +11 -546
- package/dist/highlight/preview.js +11 -10
- package/dist/manager/globals-runtime.js +31934 -31888
- package/dist/manager-api/index.cjs +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/measure/index.cjs +12 -472
- package/dist/measure/index.d.ts +1 -566
- package/dist/measure/index.js +0 -464
- package/dist/measure/preview.cjs +127 -127
- package/dist/measure/preview.d.ts +11 -546
- package/dist/measure/preview.js +117 -117
- package/dist/outline/index.cjs +12 -524
- package/dist/outline/index.d.ts +1 -566
- package/dist/outline/index.js +0 -500
- package/dist/outline/preview.cjs +32 -32
- package/dist/outline/preview.d.ts +11 -546
- package/dist/outline/preview.js +27 -27
- package/dist/preview/runtime.js +9415 -9379
- package/dist/preview-api/index.cjs +1228 -1261
- package/dist/preview-api/index.d.ts +6 -8
- package/dist/preview-api/index.js +927 -963
- package/dist/telemetry/index.cjs +1477 -1288
- package/dist/telemetry/index.js +1503 -1314
- package/dist/test/index.cjs +4437 -4394
- package/dist/test/index.js +3776 -3733
- package/dist/test/preview.cjs +42 -42
- package/dist/test/preview.d.ts +12 -550
- package/dist/test/preview.js +36 -36
- package/dist/types/index.d.ts +5 -3
- package/dist/viewport/index.cjs +17 -24
- package/dist/viewport/index.d.ts +9 -532
- package/dist/viewport/index.js +9 -16
- package/dist/viewport/preview.cjs +22 -22
- package/dist/viewport/preview.d.ts +45 -552
- package/dist/viewport/preview.js +8 -8
- package/package.json +1 -1
package/dist/cli/bin/index.cjs
CHANGED
|
@@ -5831,7 +5831,7 @@ function K(s, e) {
|
|
|
5831
5831
|
d(K, "invariant");
|
|
5832
5832
|
|
|
5833
5833
|
// package.json
|
|
5834
|
-
var Ot = "9.1.0-alpha.
|
|
5834
|
+
var Ot = "9.1.0-alpha.4";
|
|
5835
5835
|
|
|
5836
5836
|
// src/cli/build.ts
|
|
5837
5837
|
var nr = require("storybook/internal/common"), qe = require("storybook/internal/core-server");
|
package/dist/cli/bin/index.js
CHANGED
package/dist/common/index.cjs
CHANGED
|
@@ -18670,56 +18670,56 @@ module.exports = Be(cO);
|
|
|
18670
18670
|
|
|
18671
18671
|
// src/common/versions.ts
|
|
18672
18672
|
var qe = {
|
|
18673
|
-
"@storybook/addon-a11y": "9.1.0-alpha.
|
|
18674
|
-
"@storybook/addon-actions": "9.1.0-alpha.
|
|
18675
|
-
"@storybook/addon-backgrounds": "9.1.0-alpha.
|
|
18676
|
-
"@storybook/addon-controls": "9.1.0-alpha.
|
|
18677
|
-
"@storybook/addon-docs": "9.1.0-alpha.
|
|
18678
|
-
"@storybook/addon-jest": "9.1.0-alpha.
|
|
18679
|
-
"@storybook/addon-links": "9.1.0-alpha.
|
|
18680
|
-
"@storybook/addon-measure": "9.1.0-alpha.
|
|
18681
|
-
"@storybook/addon-onboarding": "9.1.0-alpha.
|
|
18682
|
-
"@storybook/addon-outline": "9.1.0-alpha.
|
|
18683
|
-
"storybook-addon-pseudo-states": "9.1.0-alpha.
|
|
18684
|
-
"@storybook/addon-themes": "9.1.0-alpha.
|
|
18685
|
-
"@storybook/addon-toolbars": "9.1.0-alpha.
|
|
18686
|
-
"@storybook/addon-viewport": "9.1.0-alpha.
|
|
18687
|
-
"@storybook/addon-vitest": "9.1.0-alpha.
|
|
18688
|
-
"@storybook/builder-vite": "9.1.0-alpha.
|
|
18689
|
-
"@storybook/builder-webpack5": "9.1.0-alpha.
|
|
18690
|
-
storybook: "9.1.0-alpha.
|
|
18691
|
-
"@storybook/angular": "9.1.0-alpha.
|
|
18692
|
-
"@storybook/ember": "9.1.0-alpha.
|
|
18693
|
-
"@storybook/html-vite": "9.1.0-alpha.
|
|
18694
|
-
"@storybook/nextjs": "9.1.0-alpha.
|
|
18695
|
-
"@storybook/nextjs-vite": "9.1.0-alpha.
|
|
18696
|
-
"@storybook/preact-vite": "9.1.0-alpha.
|
|
18697
|
-
"@storybook/react-native-web-vite": "9.1.0-alpha.
|
|
18698
|
-
"@storybook/react-vite": "9.1.0-alpha.
|
|
18699
|
-
"@storybook/react-webpack5": "9.1.0-alpha.
|
|
18700
|
-
"@storybook/server-webpack5": "9.1.0-alpha.
|
|
18701
|
-
"@storybook/svelte-vite": "9.1.0-alpha.
|
|
18702
|
-
"@storybook/sveltekit": "9.1.0-alpha.
|
|
18703
|
-
"@storybook/vue3-vite": "9.1.0-alpha.
|
|
18704
|
-
"@storybook/web-components-vite": "9.1.0-alpha.
|
|
18705
|
-
sb: "9.1.0-alpha.
|
|
18706
|
-
"@storybook/cli": "9.1.0-alpha.
|
|
18707
|
-
"@storybook/codemod": "9.1.0-alpha.
|
|
18708
|
-
"@storybook/core-webpack": "9.1.0-alpha.
|
|
18709
|
-
"create-storybook": "9.1.0-alpha.
|
|
18710
|
-
"@storybook/csf-plugin": "9.1.0-alpha.
|
|
18711
|
-
"eslint-plugin-storybook": "9.1.0-alpha.
|
|
18712
|
-
"@storybook/react-dom-shim": "9.1.0-alpha.
|
|
18713
|
-
"@storybook/preset-create-react-app": "9.1.0-alpha.
|
|
18714
|
-
"@storybook/preset-react-webpack": "9.1.0-alpha.
|
|
18715
|
-
"@storybook/preset-server-webpack": "9.1.0-alpha.
|
|
18716
|
-
"@storybook/html": "9.1.0-alpha.
|
|
18717
|
-
"@storybook/preact": "9.1.0-alpha.
|
|
18718
|
-
"@storybook/react": "9.1.0-alpha.
|
|
18719
|
-
"@storybook/server": "9.1.0-alpha.
|
|
18720
|
-
"@storybook/svelte": "9.1.0-alpha.
|
|
18721
|
-
"@storybook/vue3": "9.1.0-alpha.
|
|
18722
|
-
"@storybook/web-components": "9.1.0-alpha.
|
|
18673
|
+
"@storybook/addon-a11y": "9.1.0-alpha.4",
|
|
18674
|
+
"@storybook/addon-actions": "9.1.0-alpha.4",
|
|
18675
|
+
"@storybook/addon-backgrounds": "9.1.0-alpha.4",
|
|
18676
|
+
"@storybook/addon-controls": "9.1.0-alpha.4",
|
|
18677
|
+
"@storybook/addon-docs": "9.1.0-alpha.4",
|
|
18678
|
+
"@storybook/addon-jest": "9.1.0-alpha.4",
|
|
18679
|
+
"@storybook/addon-links": "9.1.0-alpha.4",
|
|
18680
|
+
"@storybook/addon-measure": "9.1.0-alpha.4",
|
|
18681
|
+
"@storybook/addon-onboarding": "9.1.0-alpha.4",
|
|
18682
|
+
"@storybook/addon-outline": "9.1.0-alpha.4",
|
|
18683
|
+
"storybook-addon-pseudo-states": "9.1.0-alpha.4",
|
|
18684
|
+
"@storybook/addon-themes": "9.1.0-alpha.4",
|
|
18685
|
+
"@storybook/addon-toolbars": "9.1.0-alpha.4",
|
|
18686
|
+
"@storybook/addon-viewport": "9.1.0-alpha.4",
|
|
18687
|
+
"@storybook/addon-vitest": "9.1.0-alpha.4",
|
|
18688
|
+
"@storybook/builder-vite": "9.1.0-alpha.4",
|
|
18689
|
+
"@storybook/builder-webpack5": "9.1.0-alpha.4",
|
|
18690
|
+
storybook: "9.1.0-alpha.4",
|
|
18691
|
+
"@storybook/angular": "9.1.0-alpha.4",
|
|
18692
|
+
"@storybook/ember": "9.1.0-alpha.4",
|
|
18693
|
+
"@storybook/html-vite": "9.1.0-alpha.4",
|
|
18694
|
+
"@storybook/nextjs": "9.1.0-alpha.4",
|
|
18695
|
+
"@storybook/nextjs-vite": "9.1.0-alpha.4",
|
|
18696
|
+
"@storybook/preact-vite": "9.1.0-alpha.4",
|
|
18697
|
+
"@storybook/react-native-web-vite": "9.1.0-alpha.4",
|
|
18698
|
+
"@storybook/react-vite": "9.1.0-alpha.4",
|
|
18699
|
+
"@storybook/react-webpack5": "9.1.0-alpha.4",
|
|
18700
|
+
"@storybook/server-webpack5": "9.1.0-alpha.4",
|
|
18701
|
+
"@storybook/svelte-vite": "9.1.0-alpha.4",
|
|
18702
|
+
"@storybook/sveltekit": "9.1.0-alpha.4",
|
|
18703
|
+
"@storybook/vue3-vite": "9.1.0-alpha.4",
|
|
18704
|
+
"@storybook/web-components-vite": "9.1.0-alpha.4",
|
|
18705
|
+
sb: "9.1.0-alpha.4",
|
|
18706
|
+
"@storybook/cli": "9.1.0-alpha.4",
|
|
18707
|
+
"@storybook/codemod": "9.1.0-alpha.4",
|
|
18708
|
+
"@storybook/core-webpack": "9.1.0-alpha.4",
|
|
18709
|
+
"create-storybook": "9.1.0-alpha.4",
|
|
18710
|
+
"@storybook/csf-plugin": "9.1.0-alpha.4",
|
|
18711
|
+
"eslint-plugin-storybook": "9.1.0-alpha.4",
|
|
18712
|
+
"@storybook/react-dom-shim": "9.1.0-alpha.4",
|
|
18713
|
+
"@storybook/preset-create-react-app": "9.1.0-alpha.4",
|
|
18714
|
+
"@storybook/preset-react-webpack": "9.1.0-alpha.4",
|
|
18715
|
+
"@storybook/preset-server-webpack": "9.1.0-alpha.4",
|
|
18716
|
+
"@storybook/html": "9.1.0-alpha.4",
|
|
18717
|
+
"@storybook/preact": "9.1.0-alpha.4",
|
|
18718
|
+
"@storybook/react": "9.1.0-alpha.4",
|
|
18719
|
+
"@storybook/server": "9.1.0-alpha.4",
|
|
18720
|
+
"@storybook/svelte": "9.1.0-alpha.4",
|
|
18721
|
+
"@storybook/vue3": "9.1.0-alpha.4",
|
|
18722
|
+
"@storybook/web-components": "9.1.0-alpha.4"
|
|
18723
18723
|
};
|
|
18724
18724
|
|
|
18725
18725
|
// src/common/presets.ts
|
|
@@ -24034,7 +24034,14 @@ var tB = [
|
|
|
24034
24034
|
"@storybook/addon-svelte-csf",
|
|
24035
24035
|
"@storybook/addon-coverage",
|
|
24036
24036
|
"@storybook/addon-webpack5-compiler-babel",
|
|
24037
|
-
"@storybook/addon-webpack5-compiler-swc"
|
|
24037
|
+
"@storybook/addon-webpack5-compiler-swc",
|
|
24038
|
+
// Storybook for React Native related packages
|
|
24039
|
+
// TODO: For Storybook 10, we should check about possible automigrations
|
|
24040
|
+
"@storybook/addon-ondevice-actions",
|
|
24041
|
+
"@storybook/addon-ondevice-backgrounds",
|
|
24042
|
+
"@storybook/addon-ondevice-controls",
|
|
24043
|
+
"@storybook/addon-ondevice-notes",
|
|
24044
|
+
"@storybook/react-native"
|
|
24038
24045
|
];
|
|
24039
24046
|
|
|
24040
24047
|
// src/common/utils/get-storybook-info.ts
|
|
@@ -27611,54 +27618,55 @@ function Ux(t) {
|
|
|
27611
27618
|
).join("").replace(/^./, (e) => e.toLowerCase());
|
|
27612
27619
|
}
|
|
27613
27620
|
s(Ux, "getAnnotationsName");
|
|
27614
|
-
async function Wp(t) {
|
|
27621
|
+
async function Wp(t, A) {
|
|
27622
|
+
let e = {
|
|
27623
|
+
// core addons will have a function as default export in index entrypoint
|
|
27624
|
+
importPath: t,
|
|
27625
|
+
importName: Ux(t),
|
|
27626
|
+
isCoreAddon: Oa(t)
|
|
27627
|
+
};
|
|
27628
|
+
e.isCoreAddon || (e.importPath = `${t}/preview`);
|
|
27615
27629
|
try {
|
|
27616
|
-
|
|
27617
|
-
// core addons will have a function as default export in index entrypoint
|
|
27618
|
-
importPath: t,
|
|
27619
|
-
importName: Ux(t),
|
|
27620
|
-
isCoreAddon: Oa(t)
|
|
27621
|
-
};
|
|
27622
|
-
return t === "@storybook/addon-essentials" || (A.isCoreAddon || (A.importPath = `${t}/preview`), require.resolve(zp.default.join(t, "pre\
|
|
27623
|
-
view"))), A;
|
|
27630
|
+
require.resolve(zp.default.join(t, "preview"), { paths: [A] });
|
|
27624
27631
|
} catch {
|
|
27632
|
+
return null;
|
|
27625
27633
|
}
|
|
27626
|
-
return
|
|
27634
|
+
return e;
|
|
27627
27635
|
}
|
|
27628
27636
|
s(Wp, "getAddonAnnotations");
|
|
27629
27637
|
|
|
27630
27638
|
// src/common/utils/sync-main-preview-addons.ts
|
|
27631
27639
|
var _x = console;
|
|
27632
|
-
async function Gx(t, A) {
|
|
27633
|
-
let
|
|
27634
|
-
await (0, fi.writeConfig)(
|
|
27640
|
+
async function Gx(t, A, e) {
|
|
27641
|
+
let r = await (0, fi.readConfig)(A), i = await Vp(t, r, e);
|
|
27642
|
+
await (0, fi.writeConfig)(i);
|
|
27635
27643
|
}
|
|
27636
27644
|
s(Gx, "syncStorybookAddons");
|
|
27637
|
-
async function Vp(t, A) {
|
|
27645
|
+
async function Vp(t, A, e) {
|
|
27638
27646
|
if (!(0, fi.isCsfFactoryPreview)(A))
|
|
27639
27647
|
return A;
|
|
27640
|
-
let
|
|
27641
|
-
if (!
|
|
27648
|
+
let i = HI(t);
|
|
27649
|
+
if (!i)
|
|
27642
27650
|
return A;
|
|
27643
|
-
let
|
|
27644
|
-
for (let
|
|
27645
|
-
let
|
|
27646
|
-
if (
|
|
27651
|
+
let n = [], o = A.getFieldNode(["addons"]);
|
|
27652
|
+
for (let g of i) {
|
|
27653
|
+
let C = await Wp(g, e);
|
|
27654
|
+
if (C) {
|
|
27647
27655
|
if (A._ast.program.body.find(
|
|
27648
|
-
(
|
|
27656
|
+
(E) => yr.types.isImportDeclaration(E) && E.source.value === C.importPath
|
|
27649
27657
|
))
|
|
27650
27658
|
continue;
|
|
27651
|
-
(!
|
|
27652
|
-
(
|
|
27653
|
-
)) && (
|
|
27659
|
+
(!o || yr.types.isArrayExpression(o) && !o.elements.some(
|
|
27660
|
+
(E) => yr.types.isIdentifier(E) && E.name === C.importName
|
|
27661
|
+
)) && (n.push(g), C.isCoreAddon ? (A.setImport(C.importName, C.importPath), A.appendNodeToArray(
|
|
27654
27662
|
["addons"],
|
|
27655
|
-
yr.types.callExpression(yr.types.identifier(
|
|
27656
|
-
)) : (A.setImport({ namespace:
|
|
27663
|
+
yr.types.callExpression(yr.types.identifier(C.importName), [])
|
|
27664
|
+
)) : (A.setImport({ namespace: C.importName }, C.importPath), A.appendNodeToArray(["addons"], yr.types.identifier(C.importName))));
|
|
27657
27665
|
}
|
|
27658
27666
|
}
|
|
27659
|
-
return
|
|
27667
|
+
return n.length > 0 && _x.info(
|
|
27660
27668
|
`Synchronizing addons from main config in ${jI.default.cyan(A.fileName)}:
|
|
27661
|
-
${
|
|
27669
|
+
${n.map(jI.default.magenta).join(", ")}`
|
|
27662
27670
|
), A;
|
|
27663
27671
|
}
|
|
27664
27672
|
s(Vp, "getSyncedStorybookAddons");
|
package/dist/common/index.d.ts
CHANGED
|
@@ -940,8 +940,8 @@ declare const posix: (localPath: string, seperator?: string) => string;
|
|
|
940
940
|
|
|
941
941
|
declare const getAddonNames: (mainConfig: StorybookConfig) => string[];
|
|
942
942
|
|
|
943
|
-
declare function syncStorybookAddons(mainConfig: StorybookConfig, previewConfigPath: string): Promise<void>;
|
|
944
|
-
declare function getSyncedStorybookAddons(mainConfig: StorybookConfig, previewConfig: ConfigFile): Promise<ConfigFile>;
|
|
943
|
+
declare function syncStorybookAddons(mainConfig: StorybookConfig, previewConfigPath: string, configDir: string): Promise<void>;
|
|
944
|
+
declare function getSyncedStorybookAddons(mainConfig: StorybookConfig, previewConfig: ConfigFile, configDir: string): Promise<ConfigFile>;
|
|
945
945
|
|
|
946
946
|
/**
|
|
947
947
|
* Helper function to scan for files matching a glob pattern and transform them
|