storybook 9.0.0-alpha.10 → 9.0.0-alpha.12
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/bin/index.cjs +2 -2
- package/dist/actions/manager.js +150 -151
- package/dist/actions/preview.d.ts +0 -1
- package/dist/bin/index.cjs +66 -71
- package/dist/bin/index.js +59 -64
- package/dist/channels/index.cjs +17 -17
- package/dist/channels/index.js +3 -3
- package/dist/cli/bin/index.cjs +80 -80
- package/dist/cli/bin/index.js +83 -83
- package/dist/cli/index.cjs +1904 -1907
- package/dist/cli/index.d.ts +3 -7
- package/dist/cli/index.js +734 -737
- package/dist/common/index.cjs +59 -68
- package/dist/common/index.d.ts +1 -6
- package/dist/common/index.js +91 -100
- 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/manager.css +170 -0
- package/dist/component-testing/manager.js +3126 -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 +5515 -5781
- package/dist/components/index.d.ts +3 -254
- package/dist/components/index.js +7296 -13770
- package/dist/controls/manager.js +989 -941
- package/dist/controls/preview.d.ts +0 -1
- package/dist/core-events/index.cjs +42 -45
- package/dist/core-events/index.d.ts +1 -4
- package/dist/core-events/index.js +38 -41
- package/dist/core-server/index.cjs +2730 -2721
- package/dist/core-server/index.d.ts +32 -23
- package/dist/core-server/index.js +822 -813
- package/dist/core-server/presets/common-preset.cjs +1754 -1730
- package/dist/core-server/presets/common-preset.js +1852 -1828
- package/dist/csf/index.d.ts +0 -2
- package/dist/csf-tools/index.cjs +0 -8
- package/dist/csf-tools/index.d.ts +0 -4
- package/dist/csf-tools/index.js +0 -8
- package/dist/instrumenter/index.cjs +475 -468
- package/dist/instrumenter/index.js +949 -950
- package/dist/manager/globals-module-info.cjs +15 -17
- package/dist/manager/globals-module-info.js +4 -6
- package/dist/manager/globals-runtime.js +56352 -50867
- package/dist/manager/runtime.js +4958 -4440
- package/dist/manager-api/index.cjs +1153 -1136
- package/dist/manager-api/index.d.ts +106 -97
- package/dist/manager-api/index.js +810 -795
- package/dist/preview/runtime.js +38453 -37289
- package/dist/preview-api/index.cjs +1098 -1211
- package/dist/preview-api/index.d.ts +10 -23
- package/dist/preview-api/index.js +1457 -1571
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/types/index.cjs +14 -15
- package/dist/types/index.d.ts +306 -65
- package/dist/types/index.js +1 -2
- package/dist/viewport/preview.d.ts +0 -1
- package/package.json +25 -4
|
@@ -19,7 +19,6 @@ interface ProjectAnnotations<TRenderer extends Renderer> extends ProjectAnnotati
|
|
|
19
19
|
unmount: () => void;
|
|
20
20
|
};
|
|
21
21
|
renderToCanvas?: RenderToCanvas<TRenderer>;
|
|
22
|
-
renderToDOM?: RenderToCanvas<TRenderer>;
|
|
23
22
|
}
|
|
24
23
|
declare type RenderContext<TRenderer extends Renderer = Renderer> = StoryIdentifier & {
|
|
25
24
|
showMain: () => void;
|
package/dist/bin/index.cjs
CHANGED
|
@@ -4,13 +4,13 @@ var k = Object.defineProperty;
|
|
|
4
4
|
var n = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var c = Object.getOwnPropertyNames;
|
|
6
6
|
var d = Object.getPrototypeOf, v = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
7
|
+
var m = (o, e, a, t) => {
|
|
8
8
|
if (e && typeof e == "object" || typeof e == "function")
|
|
9
9
|
for (let l of c(e))
|
|
10
10
|
!v.call(o, l) && l !== a && k(o, l, { get: () => e[l], enumerable: !(t = n(e, l)) || t.enumerable });
|
|
11
11
|
return o;
|
|
12
12
|
};
|
|
13
|
-
var h = (o, e, a) => (a = o != null ? i(d(o)) : {},
|
|
13
|
+
var h = (o, e, a) => (a = o != null ? i(d(o)) : {}, m(
|
|
14
14
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
15
15
|
// file that has been converted to a CommonJS file using a Babel-
|
|
16
16
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -20,79 +20,74 @@ var h = (o, e, a) => (a = o != null ? i(d(o)) : {}, u(
|
|
|
20
20
|
));
|
|
21
21
|
|
|
22
22
|
// src/bin/index.ts
|
|
23
|
-
var y = require("node:child_process"), b = require("node:fs"),
|
|
23
|
+
var y = require("node:child_process"), b = require("node:fs"), r = require("node:path");
|
|
24
24
|
|
|
25
25
|
// src/common/versions.ts
|
|
26
26
|
var p = {
|
|
27
|
-
"@storybook/addon-a11y": "9.0.0-alpha.
|
|
28
|
-
"@storybook/addon-backgrounds": "9.0.0-alpha.
|
|
29
|
-
"@storybook/addon-docs": "9.0.0-alpha.
|
|
30
|
-
"@storybook/addon-essentials": "9.0.0-alpha.
|
|
31
|
-
"@storybook/addon-mdx-gfm": "9.0.0-alpha.
|
|
32
|
-
"@storybook/addon-highlight": "9.0.0-alpha.
|
|
33
|
-
"@storybook/addon-
|
|
34
|
-
"@storybook/addon-
|
|
35
|
-
"@storybook/addon-
|
|
36
|
-
"@storybook/addon-
|
|
37
|
-
"@storybook/addon-
|
|
38
|
-
"@storybook/addon-
|
|
39
|
-
"@storybook/addon-
|
|
40
|
-
"@storybook/addon-
|
|
41
|
-
"@storybook/
|
|
42
|
-
"@storybook/builder-
|
|
43
|
-
|
|
44
|
-
storybook: "9.0.0-alpha.
|
|
45
|
-
"@storybook/
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@storybook/
|
|
48
|
-
"@storybook/
|
|
49
|
-
"@storybook/
|
|
50
|
-
"@storybook/
|
|
51
|
-
"@storybook/
|
|
52
|
-
"@storybook/
|
|
53
|
-
"@storybook/react-
|
|
54
|
-
"@storybook/
|
|
55
|
-
"@storybook/
|
|
56
|
-
"@storybook/
|
|
57
|
-
"@storybook/
|
|
58
|
-
"@storybook/
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@storybook/
|
|
61
|
-
"@storybook/
|
|
62
|
-
|
|
63
|
-
"@storybook/
|
|
64
|
-
"@storybook/
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"@storybook/
|
|
68
|
-
"@storybook/
|
|
69
|
-
"
|
|
70
|
-
"@storybook/
|
|
71
|
-
"@storybook/
|
|
72
|
-
"@storybook/
|
|
73
|
-
"@storybook/preset-
|
|
74
|
-
"@storybook/preset-
|
|
75
|
-
"@storybook/
|
|
76
|
-
"@storybook/
|
|
77
|
-
"@storybook/
|
|
78
|
-
"@storybook/
|
|
79
|
-
"@storybook/
|
|
80
|
-
"@storybook/
|
|
81
|
-
"@storybook/
|
|
82
|
-
"@storybook/react": "9.0.0-alpha.10",
|
|
83
|
-
"@storybook/server": "9.0.0-alpha.10",
|
|
84
|
-
"@storybook/svelte": "9.0.0-alpha.10",
|
|
85
|
-
"@storybook/vue3": "9.0.0-alpha.10",
|
|
86
|
-
"@storybook/web-components": "9.0.0-alpha.10"
|
|
27
|
+
"@storybook/addon-a11y": "9.0.0-alpha.12",
|
|
28
|
+
"@storybook/addon-backgrounds": "9.0.0-alpha.12",
|
|
29
|
+
"@storybook/addon-docs": "9.0.0-alpha.12",
|
|
30
|
+
"@storybook/addon-essentials": "9.0.0-alpha.12",
|
|
31
|
+
"@storybook/addon-mdx-gfm": "9.0.0-alpha.12",
|
|
32
|
+
"@storybook/addon-highlight": "9.0.0-alpha.12",
|
|
33
|
+
"@storybook/addon-jest": "9.0.0-alpha.12",
|
|
34
|
+
"@storybook/addon-links": "9.0.0-alpha.12",
|
|
35
|
+
"@storybook/addon-measure": "9.0.0-alpha.12",
|
|
36
|
+
"@storybook/addon-onboarding": "9.0.0-alpha.12",
|
|
37
|
+
"@storybook/addon-outline": "9.0.0-alpha.12",
|
|
38
|
+
"@storybook/addon-storysource": "9.0.0-alpha.12",
|
|
39
|
+
"@storybook/addon-test": "9.0.0-alpha.12",
|
|
40
|
+
"@storybook/addon-themes": "9.0.0-alpha.12",
|
|
41
|
+
"@storybook/builder-vite": "9.0.0-alpha.12",
|
|
42
|
+
"@storybook/builder-webpack5": "9.0.0-alpha.12",
|
|
43
|
+
storybook: "9.0.0-alpha.12",
|
|
44
|
+
"@storybook/angular": "9.0.0-alpha.12",
|
|
45
|
+
"@storybook/ember": "9.0.0-alpha.12",
|
|
46
|
+
"@storybook/html-vite": "9.0.0-alpha.12",
|
|
47
|
+
"@storybook/html-webpack5": "9.0.0-alpha.12",
|
|
48
|
+
"@storybook/nextjs": "9.0.0-alpha.12",
|
|
49
|
+
"@storybook/nextjs-vite": "9.0.0-alpha.12",
|
|
50
|
+
"@storybook/preact-vite": "9.0.0-alpha.12",
|
|
51
|
+
"@storybook/react-native-web-vite": "9.0.0-alpha.12",
|
|
52
|
+
"@storybook/react-vite": "9.0.0-alpha.12",
|
|
53
|
+
"@storybook/react-webpack5": "9.0.0-alpha.12",
|
|
54
|
+
"@storybook/server-webpack5": "9.0.0-alpha.12",
|
|
55
|
+
"@storybook/svelte-vite": "9.0.0-alpha.12",
|
|
56
|
+
"@storybook/svelte-webpack5": "9.0.0-alpha.12",
|
|
57
|
+
"@storybook/sveltekit": "9.0.0-alpha.12",
|
|
58
|
+
"@storybook/vue3-vite": "9.0.0-alpha.12",
|
|
59
|
+
"@storybook/web-components-vite": "9.0.0-alpha.12",
|
|
60
|
+
"@storybook/web-components-webpack5": "9.0.0-alpha.12",
|
|
61
|
+
"@storybook/blocks": "9.0.0-alpha.12",
|
|
62
|
+
sb: "9.0.0-alpha.12",
|
|
63
|
+
"@storybook/cli": "9.0.0-alpha.12",
|
|
64
|
+
"@storybook/codemod": "9.0.0-alpha.12",
|
|
65
|
+
"@storybook/core-webpack": "9.0.0-alpha.12",
|
|
66
|
+
"create-storybook": "9.0.0-alpha.12",
|
|
67
|
+
"@storybook/csf-plugin": "9.0.0-alpha.12",
|
|
68
|
+
"@storybook/react-dom-shim": "9.0.0-alpha.12",
|
|
69
|
+
"@storybook/source-loader": "9.0.0-alpha.12",
|
|
70
|
+
"@storybook/preset-create-react-app": "9.0.0-alpha.12",
|
|
71
|
+
"@storybook/preset-html-webpack": "9.0.0-alpha.12",
|
|
72
|
+
"@storybook/preset-react-webpack": "9.0.0-alpha.12",
|
|
73
|
+
"@storybook/preset-server-webpack": "9.0.0-alpha.12",
|
|
74
|
+
"@storybook/preset-svelte-webpack": "9.0.0-alpha.12",
|
|
75
|
+
"@storybook/html": "9.0.0-alpha.12",
|
|
76
|
+
"@storybook/preact": "9.0.0-alpha.12",
|
|
77
|
+
"@storybook/react": "9.0.0-alpha.12",
|
|
78
|
+
"@storybook/server": "9.0.0-alpha.12",
|
|
79
|
+
"@storybook/svelte": "9.0.0-alpha.12",
|
|
80
|
+
"@storybook/vue3": "9.0.0-alpha.12",
|
|
81
|
+
"@storybook/web-components": "9.0.0-alpha.12"
|
|
87
82
|
};
|
|
88
83
|
|
|
89
84
|
// src/bin/index.ts
|
|
90
|
-
var
|
|
91
|
-
if (["dev", "build", "index"].includes(
|
|
85
|
+
var s = process.argv.slice(2);
|
|
86
|
+
if (["dev", "build", "index"].includes(s[0]))
|
|
92
87
|
require("storybook/internal/cli/bin");
|
|
93
88
|
else {
|
|
94
89
|
let o;
|
|
95
|
-
if (
|
|
90
|
+
if (s[0] === "init") {
|
|
96
91
|
let a;
|
|
97
92
|
try {
|
|
98
93
|
a = require.resolve("create-storybook/package.json");
|
|
@@ -100,17 +95,17 @@ else {
|
|
|
100
95
|
}
|
|
101
96
|
a ? JSON.parse((0, b.readFileSync)(a, "utf-8")).version === p["create-storybook"] && (o = [
|
|
102
97
|
"node",
|
|
103
|
-
(0,
|
|
104
|
-
...
|
|
105
|
-
]) : o = ["npx", "--yes", `create-storybook@${p.storybook}`, ...
|
|
98
|
+
(0, r.join)((0, r.dirname)(a), "bin", "index.cjs"),
|
|
99
|
+
...s.slice(1)
|
|
100
|
+
]) : o = ["npx", "--yes", `create-storybook@${p.storybook}`, ...s.slice(1)];
|
|
106
101
|
} else {
|
|
107
102
|
let a;
|
|
108
103
|
try {
|
|
109
104
|
a = require.resolve("@storybook/cli/package.json");
|
|
110
105
|
} catch {
|
|
111
106
|
}
|
|
112
|
-
a ? JSON.parse((0, b.readFileSync)(a, "utf-8")).version === p["@storybook/cli"] && (o = ["node", (0,
|
|
113
|
-
index.cjs"), ...
|
|
107
|
+
a ? JSON.parse((0, b.readFileSync)(a, "utf-8")).version === p["@storybook/cli"] && (o = ["node", (0, r.join)((0, r.dirname)(a), "bin", "\
|
|
108
|
+
index.cjs"), ...s]) : o = ["npx", "--yes", `@storybook/cli@${p.storybook}`, ...s];
|
|
114
109
|
}
|
|
115
110
|
o || (console.error("Could not run storybook cli, please report this as a bug"), process.exit(1)), (0, y.spawn)(o[0], o.slice(1), { stdio: "\
|
|
116
111
|
inherit", shell: !0 }).on("exit", (a) => {
|
package/dist/bin/index.js
CHANGED
|
@@ -4,7 +4,7 @@ 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 s = /* @__PURE__ */ ((a) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(a, {
|
|
8
8
|
get: (l, o) => (typeof require < "u" ? require : l)[o]
|
|
9
9
|
}) : a)(function(a) {
|
|
10
10
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
@@ -18,78 +18,73 @@ import { dirname as b, join as k } from "node:path";
|
|
|
18
18
|
|
|
19
19
|
// src/common/versions.ts
|
|
20
20
|
var t = {
|
|
21
|
-
"@storybook/addon-a11y": "9.0.0-alpha.
|
|
22
|
-
"@storybook/addon-backgrounds": "9.0.0-alpha.
|
|
23
|
-
"@storybook/addon-docs": "9.0.0-alpha.
|
|
24
|
-
"@storybook/addon-essentials": "9.0.0-alpha.
|
|
25
|
-
"@storybook/addon-mdx-gfm": "9.0.0-alpha.
|
|
26
|
-
"@storybook/addon-highlight": "9.0.0-alpha.
|
|
27
|
-
"@storybook/addon-
|
|
28
|
-
"@storybook/addon-
|
|
29
|
-
"@storybook/addon-
|
|
30
|
-
"@storybook/addon-
|
|
31
|
-
"@storybook/addon-
|
|
32
|
-
"@storybook/addon-
|
|
33
|
-
"@storybook/addon-
|
|
34
|
-
"@storybook/addon-
|
|
35
|
-
"@storybook/
|
|
36
|
-
"@storybook/builder-
|
|
37
|
-
|
|
38
|
-
storybook: "9.0.0-alpha.
|
|
39
|
-
"@storybook/
|
|
40
|
-
"@storybook/
|
|
41
|
-
"@storybook/
|
|
42
|
-
"@storybook/
|
|
43
|
-
"@storybook/
|
|
44
|
-
"@storybook/
|
|
45
|
-
"@storybook/
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@storybook/react-
|
|
48
|
-
"@storybook/
|
|
49
|
-
"@storybook/
|
|
50
|
-
"@storybook/
|
|
51
|
-
"@storybook/
|
|
52
|
-
"@storybook/
|
|
53
|
-
"@storybook/
|
|
54
|
-
"@storybook/
|
|
55
|
-
"@storybook/
|
|
56
|
-
|
|
57
|
-
"@storybook/
|
|
58
|
-
"@storybook/
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"@storybook/
|
|
62
|
-
"@storybook/
|
|
63
|
-
"
|
|
64
|
-
"@storybook/
|
|
65
|
-
"@storybook/
|
|
66
|
-
"@storybook/
|
|
67
|
-
"@storybook/preset-
|
|
68
|
-
"@storybook/preset-
|
|
69
|
-
"@storybook/
|
|
70
|
-
"@storybook/
|
|
71
|
-
"@storybook/
|
|
72
|
-
"@storybook/
|
|
73
|
-
"@storybook/
|
|
74
|
-
"@storybook/
|
|
75
|
-
"@storybook/
|
|
76
|
-
"@storybook/react": "9.0.0-alpha.10",
|
|
77
|
-
"@storybook/server": "9.0.0-alpha.10",
|
|
78
|
-
"@storybook/svelte": "9.0.0-alpha.10",
|
|
79
|
-
"@storybook/vue3": "9.0.0-alpha.10",
|
|
80
|
-
"@storybook/web-components": "9.0.0-alpha.10"
|
|
21
|
+
"@storybook/addon-a11y": "9.0.0-alpha.12",
|
|
22
|
+
"@storybook/addon-backgrounds": "9.0.0-alpha.12",
|
|
23
|
+
"@storybook/addon-docs": "9.0.0-alpha.12",
|
|
24
|
+
"@storybook/addon-essentials": "9.0.0-alpha.12",
|
|
25
|
+
"@storybook/addon-mdx-gfm": "9.0.0-alpha.12",
|
|
26
|
+
"@storybook/addon-highlight": "9.0.0-alpha.12",
|
|
27
|
+
"@storybook/addon-jest": "9.0.0-alpha.12",
|
|
28
|
+
"@storybook/addon-links": "9.0.0-alpha.12",
|
|
29
|
+
"@storybook/addon-measure": "9.0.0-alpha.12",
|
|
30
|
+
"@storybook/addon-onboarding": "9.0.0-alpha.12",
|
|
31
|
+
"@storybook/addon-outline": "9.0.0-alpha.12",
|
|
32
|
+
"@storybook/addon-storysource": "9.0.0-alpha.12",
|
|
33
|
+
"@storybook/addon-test": "9.0.0-alpha.12",
|
|
34
|
+
"@storybook/addon-themes": "9.0.0-alpha.12",
|
|
35
|
+
"@storybook/builder-vite": "9.0.0-alpha.12",
|
|
36
|
+
"@storybook/builder-webpack5": "9.0.0-alpha.12",
|
|
37
|
+
storybook: "9.0.0-alpha.12",
|
|
38
|
+
"@storybook/angular": "9.0.0-alpha.12",
|
|
39
|
+
"@storybook/ember": "9.0.0-alpha.12",
|
|
40
|
+
"@storybook/html-vite": "9.0.0-alpha.12",
|
|
41
|
+
"@storybook/html-webpack5": "9.0.0-alpha.12",
|
|
42
|
+
"@storybook/nextjs": "9.0.0-alpha.12",
|
|
43
|
+
"@storybook/nextjs-vite": "9.0.0-alpha.12",
|
|
44
|
+
"@storybook/preact-vite": "9.0.0-alpha.12",
|
|
45
|
+
"@storybook/react-native-web-vite": "9.0.0-alpha.12",
|
|
46
|
+
"@storybook/react-vite": "9.0.0-alpha.12",
|
|
47
|
+
"@storybook/react-webpack5": "9.0.0-alpha.12",
|
|
48
|
+
"@storybook/server-webpack5": "9.0.0-alpha.12",
|
|
49
|
+
"@storybook/svelte-vite": "9.0.0-alpha.12",
|
|
50
|
+
"@storybook/svelte-webpack5": "9.0.0-alpha.12",
|
|
51
|
+
"@storybook/sveltekit": "9.0.0-alpha.12",
|
|
52
|
+
"@storybook/vue3-vite": "9.0.0-alpha.12",
|
|
53
|
+
"@storybook/web-components-vite": "9.0.0-alpha.12",
|
|
54
|
+
"@storybook/web-components-webpack5": "9.0.0-alpha.12",
|
|
55
|
+
"@storybook/blocks": "9.0.0-alpha.12",
|
|
56
|
+
sb: "9.0.0-alpha.12",
|
|
57
|
+
"@storybook/cli": "9.0.0-alpha.12",
|
|
58
|
+
"@storybook/codemod": "9.0.0-alpha.12",
|
|
59
|
+
"@storybook/core-webpack": "9.0.0-alpha.12",
|
|
60
|
+
"create-storybook": "9.0.0-alpha.12",
|
|
61
|
+
"@storybook/csf-plugin": "9.0.0-alpha.12",
|
|
62
|
+
"@storybook/react-dom-shim": "9.0.0-alpha.12",
|
|
63
|
+
"@storybook/source-loader": "9.0.0-alpha.12",
|
|
64
|
+
"@storybook/preset-create-react-app": "9.0.0-alpha.12",
|
|
65
|
+
"@storybook/preset-html-webpack": "9.0.0-alpha.12",
|
|
66
|
+
"@storybook/preset-react-webpack": "9.0.0-alpha.12",
|
|
67
|
+
"@storybook/preset-server-webpack": "9.0.0-alpha.12",
|
|
68
|
+
"@storybook/preset-svelte-webpack": "9.0.0-alpha.12",
|
|
69
|
+
"@storybook/html": "9.0.0-alpha.12",
|
|
70
|
+
"@storybook/preact": "9.0.0-alpha.12",
|
|
71
|
+
"@storybook/react": "9.0.0-alpha.12",
|
|
72
|
+
"@storybook/server": "9.0.0-alpha.12",
|
|
73
|
+
"@storybook/svelte": "9.0.0-alpha.12",
|
|
74
|
+
"@storybook/vue3": "9.0.0-alpha.12",
|
|
75
|
+
"@storybook/web-components": "9.0.0-alpha.12"
|
|
81
76
|
};
|
|
82
77
|
|
|
83
78
|
// src/bin/index.ts
|
|
84
79
|
var e = process.argv.slice(2);
|
|
85
80
|
if (["dev", "build", "index"].includes(e[0]))
|
|
86
|
-
|
|
81
|
+
s("storybook/internal/cli/bin");
|
|
87
82
|
else {
|
|
88
83
|
let a;
|
|
89
84
|
if (e[0] === "init") {
|
|
90
85
|
let o;
|
|
91
86
|
try {
|
|
92
|
-
o =
|
|
87
|
+
o = s.resolve("create-storybook/package.json");
|
|
93
88
|
} catch {
|
|
94
89
|
}
|
|
95
90
|
o ? JSON.parse(p(o, "utf-8")).version === t["create-storybook"] && (a = [
|
|
@@ -100,7 +95,7 @@ else {
|
|
|
100
95
|
} else {
|
|
101
96
|
let o;
|
|
102
97
|
try {
|
|
103
|
-
o =
|
|
98
|
+
o = s.resolve("@storybook/cli/package.json");
|
|
104
99
|
} catch {
|
|
105
100
|
}
|
|
106
101
|
o ? JSON.parse(p(o, "utf-8")).version === t["@storybook/cli"] && (a = ["node", k(b(o), "bin", "index.cjs"), ...e]) : a = ["npx", "--yes",
|
package/dist/channels/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ var Ne = Object.create;
|
|
|
3
3
|
var q = Object.defineProperty;
|
|
4
4
|
var Re = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var je = Object.getOwnPropertyNames;
|
|
6
|
-
var
|
|
6
|
+
var Le = Object.getPrototypeOf, De = Object.prototype.hasOwnProperty;
|
|
7
7
|
var o = (t, e) => q(t, "name", { value: e, configurable: !0 });
|
|
8
8
|
var J = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), Me = (t, e) => {
|
|
9
9
|
for (var r in e)
|
|
@@ -11,10 +11,10 @@ var J = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), M
|
|
|
11
11
|
}, pe = (t, e, r, n) => {
|
|
12
12
|
if (e && typeof e == "object" || typeof e == "function")
|
|
13
13
|
for (let a of je(e))
|
|
14
|
-
!
|
|
14
|
+
!De.call(t, a) && a !== r && q(t, a, { get: () => e[a], enumerable: !(n = Re(e, a)) || n.enumerable });
|
|
15
15
|
return t;
|
|
16
16
|
};
|
|
17
|
-
var z = (t, e, r) => (r = t != null ? Ne(
|
|
17
|
+
var z = (t, e, r) => (r = t != null ? Ne(Le(t)) : {}, pe(
|
|
18
18
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
19
|
// file that has been converted to a CommonJS file using a Babel-
|
|
20
20
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -440,7 +440,7 @@ tion]";
|
|
|
440
440
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
441
441
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
442
442
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
443
|
-
}, x = require_function_bind(), R = require_src(), j = x.call(Function.call, Array.prototype.concat),
|
|
443
|
+
}, x = require_function_bind(), R = require_src(), j = x.call(Function.call, Array.prototype.concat), L = x.call(Function.apply, Array.
|
|
444
444
|
prototype.splice), ue = x.call(Function.call, String.prototype.replace), K = x.call(Function.call, String.prototype.slice), Oe = x.call(
|
|
445
445
|
Function.call, RegExp.prototype.exec), we = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
|
|
446
446
|
Pe = /\\(\\)?/g, Ie = /* @__PURE__ */ o(function(g) {
|
|
@@ -450,8 +450,8 @@ tion]";
|
|
|
450
450
|
if (m === "%" && E !== "%")
|
|
451
451
|
throw new n("invalid intrinsic syntax, expected opening `%`");
|
|
452
452
|
var b = [];
|
|
453
|
-
return ue(g, we, function(O,
|
|
454
|
-
b[b.length] = S ? ue(Y, Pe, "$1") :
|
|
453
|
+
return ue(g, we, function(O, D, S, Y) {
|
|
454
|
+
b[b.length] = S ? ue(Y, Pe, "$1") : D || O;
|
|
455
455
|
}), b;
|
|
456
456
|
}, "stringToPath3"), xe = /* @__PURE__ */ o(function(g, E) {
|
|
457
457
|
var m = g, b;
|
|
@@ -474,14 +474,14 @@ tion]";
|
|
|
474
474
|
throw new s('"allowMissing" argument must be a boolean');
|
|
475
475
|
if (Oe(/^%?[^%]*%?$/, g) === null)
|
|
476
476
|
throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
477
|
-
var m = Ie(g), b = m.length > 0 ? m[0] : "", O = xe("%" + b + "%", E),
|
|
478
|
-
te && (b = te[0],
|
|
477
|
+
var m = Ie(g), b = m.length > 0 ? m[0] : "", O = xe("%" + b + "%", E), D = O.name, S = O.value, Y = !1, te = O.alias;
|
|
478
|
+
te && (b = te[0], L(m, j([0, 1], te)));
|
|
479
479
|
for (var X = 1, W = !0; X < m.length; X += 1) {
|
|
480
480
|
var P = m[X], Z = K(P, 0, 1), Q = K(P, -1);
|
|
481
481
|
if ((Z === '"' || Z === "'" || Z === "`" || Q === '"' || Q === "'" || Q === "`") && Z !== Q)
|
|
482
482
|
throw new n("property names with quotes must have matching quotes");
|
|
483
|
-
if ((P === "constructor" || !W) && (Y = !0), b += "." + P,
|
|
484
|
-
S = v[
|
|
483
|
+
if ((P === "constructor" || !W) && (Y = !0), b += "." + P, D = "%" + b + "%", R(v, D))
|
|
484
|
+
S = v[D];
|
|
485
485
|
else if (S != null) {
|
|
486
486
|
if (!(P in S)) {
|
|
487
487
|
if (!E)
|
|
@@ -493,7 +493,7 @@ tion]";
|
|
|
493
493
|
W = !!ee, W && "get" in ee && !("originalValue" in ee.get) ? S = ee.get : S = S[P];
|
|
494
494
|
} else
|
|
495
495
|
W = R(S, P), S = S[P];
|
|
496
|
-
W && !Y && (v[
|
|
496
|
+
W && !Y && (v[D] = S);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
return S;
|
|
@@ -1277,8 +1277,8 @@ var Ue = "UNIVERSAL_STORE:", C = {
|
|
|
1277
1277
|
this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.
|
|
1278
1278
|
prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(
|
|
1279
1279
|
this), this.debug = this.debug.bind(this), this.channel = r?.channel ?? t.preparation.channel, this.environment = r?.environment ?? t.preparation.
|
|
1280
|
-
environment, this.channel && this.environment ?
|
|
1281
|
-
promise.then(this.prepareThis);
|
|
1280
|
+
environment, this.channel && this.environment ? (t.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
|
|
1281
|
+
{ channel: this.channel, environment: this.environment })) : t.preparation.promise.then(this.prepareThis);
|
|
1282
1282
|
}
|
|
1283
1283
|
static {
|
|
1284
1284
|
o(this, "UniversalStore");
|
|
@@ -1520,7 +1520,7 @@ var Ue = "UNIVERSAL_STORE:", C = {
|
|
|
1520
1520
|
};
|
|
1521
1521
|
this.debug("handleChannelEvents: responding to existing state request", {
|
|
1522
1522
|
responseEvent: s
|
|
1523
|
-
}), this.emitToChannel(s, { actor: this.actor });
|
|
1523
|
+
}), this.emitToChannel(s, { actor: this.actor }), this.emitToListeners(s, { actor: this.actor });
|
|
1524
1524
|
break;
|
|
1525
1525
|
case t.InternalEventType.LEADER_CREATED:
|
|
1526
1526
|
a = !1, this.syncing.state = C.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
|
|
@@ -1759,7 +1759,7 @@ var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = {
|
|
|
1759
1759
|
maxDepth: u,
|
|
1760
1760
|
space: y,
|
|
1761
1761
|
lazyEval: d
|
|
1762
|
-
}).filter(([j,
|
|
1762
|
+
}).filter(([j, L]) => typeof L < "u")
|
|
1763
1763
|
), w = {
|
|
1764
1764
|
...ze,
|
|
1765
1765
|
..._.global.CHANNEL_OPTIONS || {},
|
|
@@ -1778,8 +1778,8 @@ var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = {
|
|
|
1778
1778
|
} catch {
|
|
1779
1779
|
U.logger.error("sending over postmessage fail");
|
|
1780
1780
|
}
|
|
1781
|
-
}), Promise.resolve(null)) : new Promise((j,
|
|
1782
|
-
this.buffer.push({ event: e, resolve: j, reject:
|
|
1781
|
+
}), Promise.resolve(null)) : new Promise((j, L) => {
|
|
1782
|
+
this.buffer.push({ event: e, resolve: j, reject: L });
|
|
1783
1783
|
});
|
|
1784
1784
|
}
|
|
1785
1785
|
flush() {
|
package/dist/channels/index.js
CHANGED
|
@@ -282,8 +282,8 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
282
282
|
this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.
|
|
283
283
|
prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(
|
|
284
284
|
this), this.debug = this.debug.bind(this), this.channel = e?.channel ?? h.preparation.channel, this.environment = e?.environment ?? h.preparation.
|
|
285
|
-
environment, this.channel && this.environment ?
|
|
286
|
-
promise.then(this.prepareThis);
|
|
285
|
+
environment, this.channel && this.environment ? (h.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
|
|
286
|
+
{ channel: this.channel, environment: this.environment })) : h.preparation.promise.then(this.prepareThis);
|
|
287
287
|
}
|
|
288
288
|
static setupPreparationPromise() {
|
|
289
289
|
let t, e, n = new Promise(
|
|
@@ -468,7 +468,7 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
468
468
|
};
|
|
469
469
|
this.debug("handleChannelEvents: responding to existing state request", {
|
|
470
470
|
responseEvent: s
|
|
471
|
-
}), this.emitToChannel(s, { actor: this.actor });
|
|
471
|
+
}), this.emitToChannel(s, { actor: this.actor }), this.emitToListeners(s, { actor: this.actor });
|
|
472
472
|
break;
|
|
473
473
|
case h.InternalEventType.LEADER_CREATED:
|
|
474
474
|
o = !1, this.syncing.state = x.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
|