storybook 9.0.0-alpha.2 → 9.0.0-alpha.20
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/bin/index.cjs +2 -2
- package/dist/actions/decorator.d.ts +6 -0
- package/dist/actions/decorator.js +138 -0
- package/dist/actions/index.cjs +126 -0
- package/dist/actions/index.d.ts +102 -0
- package/dist/actions/index.js +111 -0
- package/dist/actions/preview.cjs +164 -0
- package/dist/actions/preview.d.ts +54 -0
- package/dist/actions/preview.js +155 -0
- 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 +66 -89
- package/dist/bin/index.js +62 -85
- package/dist/builder-manager/index.cjs +523 -540
- package/dist/builder-manager/index.js +544 -561
- package/dist/channels/index.cjs +1026 -981
- package/dist/channels/index.js +1194 -1165
- package/dist/cli/bin/index.cjs +483 -483
- package/dist/cli/bin/index.js +495 -495
- package/dist/cli/index.cjs +2279 -2295
- package/dist/cli/index.d.ts +4 -8
- package/dist/cli/index.js +740 -756
- package/dist/client-logger/index.cjs +56 -88
- package/dist/client-logger/index.js +41 -47
- package/dist/common/index.cjs +2496 -2480
- package/dist/common/index.d.ts +5 -29
- package/dist/common/index.js +2679 -2663
- 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 +11709 -20418
- package/dist/components/index.d.ts +94 -346
- package/dist/components/index.js +5827 -19157
- 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 +14413 -13924
- package/dist/core-server/index.d.ts +270 -3
- package/dist/core-server/index.js +14003 -13519
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +12099 -17
- package/dist/core-server/presets/common-preset.cjs +2760 -2914
- package/dist/core-server/presets/common-preset.js +2852 -3007
- 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 +2557 -564
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +17 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +81 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +67 -0
- package/dist/instrumenter/index.cjs +2207 -2342
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +2438 -2620
- package/dist/manager/globals-module-info.cjs +290 -151
- package/dist/manager/globals-module-info.d.ts +1 -1
- package/dist/manager/globals-module-info.js +274 -135
- package/dist/manager/globals-runtime.js +60016 -28331
- 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 +4645 -3946
- package/dist/manager-api/index.cjs +4228 -3833
- package/dist/manager-api/index.d.ts +398 -102
- package/dist/manager-api/index.js +3676 -3291
- package/dist/manager-errors.d.ts +25 -1
- package/dist/manager-errors.js +42 -26
- package/dist/measure/index.cjs +474 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +462 -0
- package/dist/measure/preview.cjs +464 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +448 -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 +45697 -6618
- package/dist/preview-api/index.cjs +1363 -1898
- package/dist/preview-api/index.d.ts +449 -498
- package/dist/preview-api/index.js +1622 -2095
- package/dist/preview-errors.cjs +99 -82
- package/dist/preview-errors.d.ts +25 -1
- package/dist/preview-errors.js +110 -94
- package/dist/router/index.cjs +847 -871
- package/dist/router/index.js +193 -199
- package/dist/server-errors.cjs +156 -125
- package/dist/server-errors.d.ts +28 -2
- package/dist/server-errors.js +150 -119
- package/dist/telemetry/index.cjs +1050 -1977
- package/dist/telemetry/index.d.ts +26 -5
- package/dist/telemetry/index.js +1085 -2008
- package/dist/test/index.cjs +35686 -0
- package/dist/test/index.d.ts +186 -0
- package/dist/test/index.js +33752 -0
- package/dist/test/preview.cjs +15870 -0
- package/dist/test/preview.d.ts +54 -0
- package/dist/test/preview.js +14441 -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 +612 -157
- 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/bin/index.js
CHANGED
|
@@ -4,114 +4,91 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
|
|
|
4
4
|
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = ESM_COMPAT_dirname(__filename);
|
|
6
6
|
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
7
|
-
var
|
|
7
|
+
var t = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, {
|
|
8
8
|
get: (l, o) => (typeof require < "u" ? require : l)[o]
|
|
9
|
-
}) :
|
|
9
|
+
}) : e)(function(e) {
|
|
10
10
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' +
|
|
11
|
+
throw Error('Dynamic require of "' + e + '" is not supported');
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
// src/bin/index.ts
|
|
15
|
-
import { spawn as
|
|
15
|
+
import { spawn as k } from "node:child_process";
|
|
16
16
|
import { readFileSync as p } from "node:fs";
|
|
17
|
-
import { dirname as b, join as
|
|
17
|
+
import { dirname as b, join as i } from "node:path";
|
|
18
18
|
|
|
19
19
|
// src/common/versions.ts
|
|
20
|
-
var
|
|
21
|
-
"@storybook/addon-a11y": "9.0.0-alpha.
|
|
22
|
-
"@storybook/addon-
|
|
23
|
-
"@storybook/addon-
|
|
24
|
-
"@storybook/addon-
|
|
25
|
-
"@storybook/addon-
|
|
26
|
-
"@storybook/addon-
|
|
27
|
-
"@storybook/addon-
|
|
28
|
-
"@storybook/
|
|
29
|
-
"@storybook/
|
|
30
|
-
|
|
31
|
-
"@storybook/
|
|
32
|
-
"@storybook/
|
|
33
|
-
"@storybook/
|
|
34
|
-
"@storybook/
|
|
35
|
-
"@storybook/
|
|
36
|
-
"@storybook/
|
|
37
|
-
"@storybook/
|
|
38
|
-
"@storybook/
|
|
39
|
-
"@storybook/
|
|
40
|
-
"@storybook/
|
|
41
|
-
"@storybook/
|
|
42
|
-
storybook: "9.0.0-alpha.
|
|
43
|
-
"@storybook/
|
|
44
|
-
"@storybook/
|
|
45
|
-
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@storybook/
|
|
48
|
-
"@storybook/
|
|
49
|
-
"
|
|
50
|
-
"@storybook/
|
|
51
|
-
"@storybook/react-
|
|
52
|
-
"@storybook/
|
|
53
|
-
"@storybook/react-
|
|
54
|
-
"@storybook/
|
|
55
|
-
"@storybook/
|
|
56
|
-
"@storybook/
|
|
57
|
-
"@storybook/
|
|
58
|
-
"@storybook/
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@storybook/
|
|
61
|
-
"@storybook/
|
|
62
|
-
"@storybook/
|
|
63
|
-
sb: "9.0.0-alpha.2",
|
|
64
|
-
"@storybook/cli": "9.0.0-alpha.2",
|
|
65
|
-
"@storybook/codemod": "9.0.0-alpha.2",
|
|
66
|
-
"@storybook/core-webpack": "9.0.0-alpha.2",
|
|
67
|
-
"create-storybook": "9.0.0-alpha.2",
|
|
68
|
-
"@storybook/csf-plugin": "9.0.0-alpha.2",
|
|
69
|
-
"@storybook/react-dom-shim": "9.0.0-alpha.2",
|
|
70
|
-
"@storybook/source-loader": "9.0.0-alpha.2",
|
|
71
|
-
"@storybook/test": "9.0.0-alpha.2",
|
|
72
|
-
"@storybook/preset-create-react-app": "9.0.0-alpha.2",
|
|
73
|
-
"@storybook/preset-html-webpack": "9.0.0-alpha.2",
|
|
74
|
-
"@storybook/preset-preact-webpack": "9.0.0-alpha.2",
|
|
75
|
-
"@storybook/preset-react-webpack": "9.0.0-alpha.2",
|
|
76
|
-
"@storybook/preset-server-webpack": "9.0.0-alpha.2",
|
|
77
|
-
"@storybook/preset-svelte-webpack": "9.0.0-alpha.2",
|
|
78
|
-
"@storybook/preset-vue3-webpack": "9.0.0-alpha.2",
|
|
79
|
-
"@storybook/html": "9.0.0-alpha.2",
|
|
80
|
-
"@storybook/preact": "9.0.0-alpha.2",
|
|
81
|
-
"@storybook/react": "9.0.0-alpha.2",
|
|
82
|
-
"@storybook/server": "9.0.0-alpha.2",
|
|
83
|
-
"@storybook/svelte": "9.0.0-alpha.2",
|
|
84
|
-
"@storybook/vue3": "9.0.0-alpha.2",
|
|
85
|
-
"@storybook/web-components": "9.0.0-alpha.2"
|
|
20
|
+
var r = {
|
|
21
|
+
"@storybook/addon-a11y": "9.0.0-alpha.20",
|
|
22
|
+
"@storybook/addon-docs": "9.0.0-alpha.20",
|
|
23
|
+
"@storybook/addon-jest": "9.0.0-alpha.20",
|
|
24
|
+
"@storybook/addon-links": "9.0.0-alpha.20",
|
|
25
|
+
"@storybook/addon-onboarding": "9.0.0-alpha.20",
|
|
26
|
+
"@storybook/addon-themes": "9.0.0-alpha.20",
|
|
27
|
+
"@storybook/addon-vitest": "9.0.0-alpha.20",
|
|
28
|
+
"@storybook/builder-vite": "9.0.0-alpha.20",
|
|
29
|
+
"@storybook/builder-webpack5": "9.0.0-alpha.20",
|
|
30
|
+
storybook: "9.0.0-alpha.20",
|
|
31
|
+
"@storybook/angular": "9.0.0-alpha.20",
|
|
32
|
+
"@storybook/ember": "9.0.0-alpha.20",
|
|
33
|
+
"@storybook/html-vite": "9.0.0-alpha.20",
|
|
34
|
+
"@storybook/nextjs": "9.0.0-alpha.20",
|
|
35
|
+
"@storybook/nextjs-vite": "9.0.0-alpha.20",
|
|
36
|
+
"@storybook/preact-vite": "9.0.0-alpha.20",
|
|
37
|
+
"@storybook/react-native-web-vite": "9.0.0-alpha.20",
|
|
38
|
+
"@storybook/react-vite": "9.0.0-alpha.20",
|
|
39
|
+
"@storybook/react-webpack5": "9.0.0-alpha.20",
|
|
40
|
+
"@storybook/server-webpack5": "9.0.0-alpha.20",
|
|
41
|
+
"@storybook/svelte-vite": "9.0.0-alpha.20",
|
|
42
|
+
"@storybook/sveltekit": "9.0.0-alpha.20",
|
|
43
|
+
"@storybook/vue3-vite": "9.0.0-alpha.20",
|
|
44
|
+
"@storybook/web-components-vite": "9.0.0-alpha.20",
|
|
45
|
+
sb: "9.0.0-alpha.20",
|
|
46
|
+
"@storybook/cli": "9.0.0-alpha.20",
|
|
47
|
+
"@storybook/codemod": "9.0.0-alpha.20",
|
|
48
|
+
"@storybook/core-webpack": "9.0.0-alpha.20",
|
|
49
|
+
"create-storybook": "9.0.0-alpha.20",
|
|
50
|
+
"@storybook/csf-plugin": "9.0.0-alpha.20",
|
|
51
|
+
"@storybook/react-dom-shim": "9.0.0-alpha.20",
|
|
52
|
+
"@storybook/source-loader": "9.0.0-alpha.20",
|
|
53
|
+
"@storybook/preset-create-react-app": "9.0.0-alpha.20",
|
|
54
|
+
"@storybook/preset-react-webpack": "9.0.0-alpha.20",
|
|
55
|
+
"@storybook/preset-server-webpack": "9.0.0-alpha.20",
|
|
56
|
+
"@storybook/html": "9.0.0-alpha.20",
|
|
57
|
+
"@storybook/preact": "9.0.0-alpha.20",
|
|
58
|
+
"@storybook/react": "9.0.0-alpha.20",
|
|
59
|
+
"@storybook/server": "9.0.0-alpha.20",
|
|
60
|
+
"@storybook/svelte": "9.0.0-alpha.20",
|
|
61
|
+
"@storybook/vue3": "9.0.0-alpha.20",
|
|
62
|
+
"@storybook/web-components": "9.0.0-alpha.20"
|
|
86
63
|
};
|
|
87
64
|
|
|
88
65
|
// src/bin/index.ts
|
|
89
|
-
var
|
|
90
|
-
if (["dev", "build", "index"].includes(
|
|
91
|
-
|
|
66
|
+
var a = process.argv.slice(2);
|
|
67
|
+
if (["dev", "build", "index"].includes(a[0]))
|
|
68
|
+
t("storybook/internal/cli/bin");
|
|
92
69
|
else {
|
|
93
|
-
let
|
|
94
|
-
if (
|
|
70
|
+
let e;
|
|
71
|
+
if (a[0] === "init") {
|
|
95
72
|
let o;
|
|
96
73
|
try {
|
|
97
|
-
o =
|
|
74
|
+
o = t.resolve("create-storybook/package.json");
|
|
98
75
|
} catch {
|
|
99
76
|
}
|
|
100
|
-
o ? JSON.parse(p(o, "utf-8")).version ===
|
|
77
|
+
o ? JSON.parse(p(o, "utf-8")).version === r["create-storybook"] && (e = [
|
|
101
78
|
"node",
|
|
102
|
-
|
|
103
|
-
...
|
|
104
|
-
]) :
|
|
79
|
+
i(b(o), "bin", "index.cjs"),
|
|
80
|
+
...a.slice(1)
|
|
81
|
+
]) : e = ["npx", "--yes", `create-storybook@${r.storybook}`, ...a.slice(1)];
|
|
105
82
|
} else {
|
|
106
83
|
let o;
|
|
107
84
|
try {
|
|
108
|
-
o =
|
|
85
|
+
o = t.resolve("@storybook/cli/package.json");
|
|
109
86
|
} catch {
|
|
110
87
|
}
|
|
111
|
-
o ? JSON.parse(p(o, "utf-8")).version ===
|
|
112
|
-
`@storybook/cli@${
|
|
88
|
+
o ? JSON.parse(p(o, "utf-8")).version === r["@storybook/cli"] && (e = ["node", i(b(o), "bin", "index.cjs"), ...a]) : e = ["npx", "--yes",
|
|
89
|
+
`@storybook/cli@${r.storybook}`, ...a];
|
|
113
90
|
}
|
|
114
|
-
|
|
91
|
+
e || (console.error("Could not run storybook cli, please report this as a bug"), process.exit(1)), k(e[0], e.slice(1), { stdio: "inherit",
|
|
115
92
|
shell: !0 }).on("exit", (o) => {
|
|
116
93
|
o != null && process.exit(o), process.exit(1);
|
|
117
94
|
});
|