storybook 9.0.0-rc.2 → 9.0.0-rc.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/bin/index.cjs +59 -52
- package/dist/bin/index.js +50 -43
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +1255 -1248
- package/dist/common/index.d.ts +7 -0
- package/dist/common/index.js +50 -43
- package/dist/core-server/presets/common-manager.js +1 -1
- package/dist/core-server/presets/common-preset.cjs +20 -17
- package/dist/core-server/presets/common-preset.js +19 -16
- package/dist/csf-tools/index.cjs +542 -535
- package/dist/csf-tools/index.js +531 -524
- package/dist/docs-tools/index.cjs +38 -40
- package/dist/docs-tools/index.d.ts +3 -5
- package/dist/docs-tools/index.js +94 -96
- package/dist/manager/globals-runtime.js +8404 -8382
- package/dist/manager-api/index.cjs +513 -491
- package/dist/manager-api/index.js +474 -453
- package/dist/preview/runtime.js +1 -3
- package/dist/preview-api/index.cjs +407 -410
- package/dist/preview-api/index.js +1 -3
- package/package.json +1 -1
package/dist/common/index.d.ts
CHANGED
|
@@ -7,12 +7,19 @@ 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;
|
|
10
13
|
'@storybook/addon-docs': string;
|
|
11
14
|
'@storybook/addon-jest': string;
|
|
12
15
|
'@storybook/addon-links': string;
|
|
16
|
+
'@storybook/addon-measure': string;
|
|
13
17
|
'@storybook/addon-onboarding': string;
|
|
18
|
+
'@storybook/addon-outline': string;
|
|
14
19
|
'storybook-addon-pseudo-states': string;
|
|
15
20
|
'@storybook/addon-themes': string;
|
|
21
|
+
'@storybook/addon-toolbars': string;
|
|
22
|
+
'@storybook/addon-viewport': string;
|
|
16
23
|
'@storybook/addon-vitest': string;
|
|
17
24
|
'@storybook/builder-vite': string;
|
|
18
25
|
'@storybook/builder-webpack5': string;
|
package/dist/common/index.js
CHANGED
|
@@ -18599,49 +18599,56 @@ var gK = Ee(() => {
|
|
|
18599
18599
|
|
|
18600
18600
|
// src/common/versions.ts
|
|
18601
18601
|
var gt = {
|
|
18602
|
-
"@storybook/addon-a11y": "9.0.0-rc.
|
|
18603
|
-
"@storybook/addon-
|
|
18604
|
-
"@storybook/addon-
|
|
18605
|
-
"@storybook/addon-
|
|
18606
|
-
"@storybook/addon-
|
|
18607
|
-
"storybook
|
|
18608
|
-
"@storybook/addon-
|
|
18609
|
-
"@storybook/addon-
|
|
18610
|
-
"@storybook/
|
|
18611
|
-
"@storybook/
|
|
18612
|
-
storybook: "9.0.0-rc.
|
|
18613
|
-
"@storybook/
|
|
18614
|
-
"@storybook/
|
|
18615
|
-
"@storybook/
|
|
18616
|
-
"@storybook/
|
|
18617
|
-
"@storybook/
|
|
18618
|
-
"@storybook/
|
|
18619
|
-
|
|
18620
|
-
"@storybook/
|
|
18621
|
-
"@storybook/
|
|
18622
|
-
"@storybook/
|
|
18623
|
-
"@storybook/
|
|
18624
|
-
"@storybook/
|
|
18625
|
-
"@storybook/
|
|
18626
|
-
"@storybook/web-
|
|
18627
|
-
|
|
18628
|
-
"@storybook/
|
|
18629
|
-
"@storybook/
|
|
18630
|
-
"@storybook/
|
|
18631
|
-
"
|
|
18632
|
-
"@storybook/
|
|
18633
|
-
"
|
|
18634
|
-
|
|
18635
|
-
"@storybook/
|
|
18636
|
-
"@storybook/
|
|
18637
|
-
"@storybook/
|
|
18638
|
-
"
|
|
18639
|
-
"@storybook/
|
|
18640
|
-
"
|
|
18641
|
-
"@storybook/
|
|
18642
|
-
"@storybook/
|
|
18643
|
-
"@storybook/
|
|
18644
|
-
"@storybook/
|
|
18602
|
+
"@storybook/addon-a11y": "9.0.0-rc.4",
|
|
18603
|
+
"@storybook/addon-actions": "9.0.0-rc.4",
|
|
18604
|
+
"@storybook/addon-backgrounds": "9.0.0-rc.4",
|
|
18605
|
+
"@storybook/addon-controls": "9.0.0-rc.4",
|
|
18606
|
+
"@storybook/addon-docs": "9.0.0-rc.4",
|
|
18607
|
+
"@storybook/addon-jest": "9.0.0-rc.4",
|
|
18608
|
+
"@storybook/addon-links": "9.0.0-rc.4",
|
|
18609
|
+
"@storybook/addon-measure": "9.0.0-rc.4",
|
|
18610
|
+
"@storybook/addon-onboarding": "9.0.0-rc.4",
|
|
18611
|
+
"@storybook/addon-outline": "9.0.0-rc.4",
|
|
18612
|
+
"storybook-addon-pseudo-states": "9.0.0-rc.4",
|
|
18613
|
+
"@storybook/addon-themes": "9.0.0-rc.4",
|
|
18614
|
+
"@storybook/addon-toolbars": "9.0.0-rc.4",
|
|
18615
|
+
"@storybook/addon-viewport": "9.0.0-rc.4",
|
|
18616
|
+
"@storybook/addon-vitest": "9.0.0-rc.4",
|
|
18617
|
+
"@storybook/builder-vite": "9.0.0-rc.4",
|
|
18618
|
+
"@storybook/builder-webpack5": "9.0.0-rc.4",
|
|
18619
|
+
storybook: "9.0.0-rc.4",
|
|
18620
|
+
"@storybook/angular": "9.0.0-rc.4",
|
|
18621
|
+
"@storybook/ember": "9.0.0-rc.4",
|
|
18622
|
+
"@storybook/html-vite": "9.0.0-rc.4",
|
|
18623
|
+
"@storybook/nextjs": "9.0.0-rc.4",
|
|
18624
|
+
"@storybook/nextjs-vite": "9.0.0-rc.4",
|
|
18625
|
+
"@storybook/preact-vite": "9.0.0-rc.4",
|
|
18626
|
+
"@storybook/react-native-web-vite": "9.0.0-rc.4",
|
|
18627
|
+
"@storybook/react-vite": "9.0.0-rc.4",
|
|
18628
|
+
"@storybook/react-webpack5": "9.0.0-rc.4",
|
|
18629
|
+
"@storybook/server-webpack5": "9.0.0-rc.4",
|
|
18630
|
+
"@storybook/svelte-vite": "9.0.0-rc.4",
|
|
18631
|
+
"@storybook/sveltekit": "9.0.0-rc.4",
|
|
18632
|
+
"@storybook/vue3-vite": "9.0.0-rc.4",
|
|
18633
|
+
"@storybook/web-components-vite": "9.0.0-rc.4",
|
|
18634
|
+
sb: "9.0.0-rc.4",
|
|
18635
|
+
"@storybook/cli": "9.0.0-rc.4",
|
|
18636
|
+
"@storybook/codemod": "9.0.0-rc.4",
|
|
18637
|
+
"@storybook/core-webpack": "9.0.0-rc.4",
|
|
18638
|
+
"create-storybook": "9.0.0-rc.4",
|
|
18639
|
+
"@storybook/csf-plugin": "9.0.0-rc.4",
|
|
18640
|
+
"eslint-plugin-storybook": "9.0.0-rc.4",
|
|
18641
|
+
"@storybook/react-dom-shim": "9.0.0-rc.4",
|
|
18642
|
+
"@storybook/preset-create-react-app": "9.0.0-rc.4",
|
|
18643
|
+
"@storybook/preset-react-webpack": "9.0.0-rc.4",
|
|
18644
|
+
"@storybook/preset-server-webpack": "9.0.0-rc.4",
|
|
18645
|
+
"@storybook/html": "9.0.0-rc.4",
|
|
18646
|
+
"@storybook/preact": "9.0.0-rc.4",
|
|
18647
|
+
"@storybook/react": "9.0.0-rc.4",
|
|
18648
|
+
"@storybook/server": "9.0.0-rc.4",
|
|
18649
|
+
"@storybook/svelte": "9.0.0-rc.4",
|
|
18650
|
+
"@storybook/vue3": "9.0.0-rc.4",
|
|
18651
|
+
"@storybook/web-components": "9.0.0-rc.4"
|
|
18645
18652
|
};
|
|
18646
18653
|
|
|
18647
18654
|
// src/common/presets.ts
|
|
@@ -9775,7 +9775,7 @@ ting-tests/accessibility-testing", NN = `${c1}#why-are-my-tests-failing-in-diffe
|
|
|
9775
9775
|
|
|
9776
9776
|
// ../addons/vitest/src/constants.ts
|
|
9777
9777
|
var Up = "storybook/test", DN = `${Up}/test-provider`, qp = "STORYBOOK_ADDON_TEST_CHANNEL";
|
|
9778
|
-
var p1 = "writing-tests/
|
|
9778
|
+
var p1 = "writing-tests/vitest-addon", BN = `${p1}#what-happens-if-vitest-itself-has-an-error`;
|
|
9779
9779
|
var u1 = {
|
|
9780
9780
|
id: Up,
|
|
9781
9781
|
initialState: {
|
|
@@ -9120,11 +9120,13 @@ t, "unwrap"), va = /* @__PURE__ */ n((t, e) => {
|
|
|
9120
9120
|
* @param fromImport - The module to import from
|
|
9121
9121
|
*/
|
|
9122
9122
|
setRequireImport(e, r) {
|
|
9123
|
-
let i = this._ast.program.body.find(
|
|
9124
|
-
|
|
9125
|
-
a.declarations[0].init) && d.types.isIdentifier(a.declarations[0].init.callee) && a.declarations[0].init.callee.name ===
|
|
9126
|
-
isStringLiteral(a.declarations[0].init.arguments[0]) && a.declarations[0].init.arguments[0].value === r
|
|
9127
|
-
|
|
9123
|
+
let i = this._ast.program.body.find((a) => {
|
|
9124
|
+
let l = d.types.isVariableDeclaration(a) && a.declarations.length === 1 && d.types.isVariableDeclarator(a.declarations[0]) && d.types.
|
|
9125
|
+
isCallExpression(a.declarations[0].init) && d.types.isIdentifier(a.declarations[0].init.callee) && a.declarations[0].init.callee.name ===
|
|
9126
|
+
"require" && d.types.isStringLiteral(a.declarations[0].init.arguments[0]) && (a.declarations[0].init.arguments[0].value === r || a.declarations[0].
|
|
9127
|
+
init.arguments[0].value === r.split("node:")[1]);
|
|
9128
|
+
return l && (r = a.declarations[0].init.arguments[0].value), l;
|
|
9129
|
+
}), s = /* @__PURE__ */ n((a) => d.types.isObjectPattern(i?.declarations[0].id) && i?.declarations[0].id.properties.find(
|
|
9128
9130
|
(l) => d.types.isObjectProperty(l) && d.types.isIdentifier(l.key) && l.key.name === a
|
|
9129
9131
|
), "hasRequireSpecifier"), o = /* @__PURE__ */ n((a, l) => a.declarations.length === 1 && d.types.isVariableDeclarator(a.declarations[0]) &&
|
|
9130
9132
|
d.types.isIdentifier(a.declarations[0].id) && a.declarations[0].id.name === l, "hasDefaultRequireSpecifier");
|
|
@@ -9183,32 +9185,33 @@ t, "unwrap"), va = /* @__PURE__ */ n((t, e) => {
|
|
|
9183
9185
|
* @param fromImport - The module to import from
|
|
9184
9186
|
*/
|
|
9185
9187
|
setImport(e, r) {
|
|
9186
|
-
let i =
|
|
9188
|
+
let i = this._ast.program.body.find((u) => {
|
|
9189
|
+
let c = d.types.isImportDeclaration(u) && (u.source.value === r || u.source.value === r.split("node:")[1]);
|
|
9190
|
+
return c && (r = u.source.value), c;
|
|
9191
|
+
}), s = /* @__PURE__ */ n((u) => d.types.importSpecifier(d.types.identifier(u), d.types.identifier(u)), "getNewImportSpecifier"), o = /* @__PURE__ */ n(
|
|
9187
9192
|
(u, c) => u.specifiers.find(
|
|
9188
9193
|
(h) => d.types.isImportSpecifier(h) && d.types.isIdentifier(h.imported) && h.imported.name === c
|
|
9189
|
-
), "hasImportSpecifier"),
|
|
9194
|
+
), "hasImportSpecifier"), a = /* @__PURE__ */ n((u, c) => u.specifiers.find(
|
|
9190
9195
|
(h) => d.types.isImportNamespaceSpecifier(h) && d.types.isIdentifier(h.local) && h.local.name === c
|
|
9191
|
-
), "hasNamespaceImportSpecifier")
|
|
9196
|
+
), "hasNamespaceImportSpecifier");
|
|
9197
|
+
e === null ? i || this._ast.program.body.unshift(d.types.importDeclaration([], d.types.stringLiteral(r))) : typeof e == "string" ? i ? (/* @__PURE__ */ n(
|
|
9198
|
+
(u, c) => u.specifiers.find(
|
|
9192
9199
|
(h) => d.types.isImportDefaultSpecifier(h) && d.types.isIdentifier(h.local) && h.local.name === c
|
|
9193
|
-
), "hasDefaultImportSpecifier"),
|
|
9194
|
-
(u) => d.types.isImportDeclaration(u) && u.source.value === r
|
|
9195
|
-
);
|
|
9196
|
-
e === null ? l || this._ast.program.body.unshift(d.types.importDeclaration([], d.types.stringLiteral(r))) : typeof e == "string" ? l ? a(
|
|
9197
|
-
l, e) || l.specifiers.push(
|
|
9200
|
+
), "hasDefaultImportSpecifier"))(i, e) || i.specifiers.push(
|
|
9198
9201
|
d.types.importDefaultSpecifier(d.types.identifier(e))
|
|
9199
9202
|
) : this._ast.program.body.unshift(
|
|
9200
9203
|
d.types.importDeclaration(
|
|
9201
9204
|
[d.types.importDefaultSpecifier(d.types.identifier(e))],
|
|
9202
9205
|
d.types.stringLiteral(r)
|
|
9203
9206
|
)
|
|
9204
|
-
) : Array.isArray(e) ?
|
|
9205
|
-
|
|
9207
|
+
) : Array.isArray(e) ? i ? e.forEach((u) => {
|
|
9208
|
+
o(i, u) || i.specifiers.push(s(u));
|
|
9206
9209
|
}) : this._ast.program.body.unshift(
|
|
9207
9210
|
d.types.importDeclaration(
|
|
9208
|
-
e.map(
|
|
9211
|
+
e.map(s),
|
|
9209
9212
|
d.types.stringLiteral(r)
|
|
9210
9213
|
)
|
|
9211
|
-
) : e.namespace && (
|
|
9214
|
+
) : e.namespace && (i ? a(i, e.namespace) || i.specifiers.push(
|
|
9212
9215
|
d.types.importNamespaceSpecifier(d.types.identifier(e.namespace))
|
|
9213
9216
|
) : this._ast.program.body.unshift(
|
|
9214
9217
|
d.types.importDeclaration(
|
|
@@ -9152,11 +9152,13 @@ null, "propKey"), lr = /* @__PURE__ */ n((t) => f.isTSAsExpression(t) || f.isTSS
|
|
|
9152
9152
|
* @param fromImport - The module to import from
|
|
9153
9153
|
*/
|
|
9154
9154
|
setRequireImport(e, r) {
|
|
9155
|
-
let i = this._ast.program.body.find(
|
|
9156
|
-
|
|
9155
|
+
let i = this._ast.program.body.find((a) => {
|
|
9156
|
+
let l = f.isVariableDeclaration(a) && a.declarations.length === 1 && f.isVariableDeclarator(a.declarations[0]) && f.isCallExpression(a.
|
|
9157
9157
|
declarations[0].init) && f.isIdentifier(a.declarations[0].init.callee) && a.declarations[0].init.callee.name === "require" && f.isStringLiteral(
|
|
9158
|
-
a.declarations[0].init.arguments[0]) && a.declarations[0].init.arguments[0].value === r
|
|
9159
|
-
|
|
9158
|
+
a.declarations[0].init.arguments[0]) && (a.declarations[0].init.arguments[0].value === r || a.declarations[0].init.arguments[0].value ===
|
|
9159
|
+
r.split("node:")[1]);
|
|
9160
|
+
return l && (r = a.declarations[0].init.arguments[0].value), l;
|
|
9161
|
+
}), s = /* @__PURE__ */ n((a) => f.isObjectPattern(i?.declarations[0].id) && i?.declarations[0].id.properties.find(
|
|
9160
9162
|
(l) => f.isObjectProperty(l) && f.isIdentifier(l.key) && l.key.name === a
|
|
9161
9163
|
), "hasRequireSpecifier"), o = /* @__PURE__ */ n((a, l) => a.declarations.length === 1 && f.isVariableDeclarator(a.declarations[0]) && f.
|
|
9162
9164
|
isIdentifier(a.declarations[0].id) && a.declarations[0].id.name === l, "hasDefaultRequireSpecifier");
|
|
@@ -9215,32 +9217,33 @@ null, "propKey"), lr = /* @__PURE__ */ n((t) => f.isTSAsExpression(t) || f.isTSS
|
|
|
9215
9217
|
* @param fromImport - The module to import from
|
|
9216
9218
|
*/
|
|
9217
9219
|
setImport(e, r) {
|
|
9218
|
-
let i =
|
|
9220
|
+
let i = this._ast.program.body.find((c) => {
|
|
9221
|
+
let u = f.isImportDeclaration(c) && (c.source.value === r || c.source.value === r.split("node:")[1]);
|
|
9222
|
+
return u && (r = c.source.value), u;
|
|
9223
|
+
}), s = /* @__PURE__ */ n((c) => f.importSpecifier(f.identifier(c), f.identifier(c)), "getNewImportSpecifier"), o = /* @__PURE__ */ n((c, u) => c.
|
|
9219
9224
|
specifiers.find(
|
|
9220
9225
|
(h) => f.isImportSpecifier(h) && f.isIdentifier(h.imported) && h.imported.name === u
|
|
9221
|
-
), "hasImportSpecifier"),
|
|
9226
|
+
), "hasImportSpecifier"), a = /* @__PURE__ */ n((c, u) => c.specifiers.find(
|
|
9222
9227
|
(h) => f.isImportNamespaceSpecifier(h) && f.isIdentifier(h.local) && h.local.name === u
|
|
9223
|
-
), "hasNamespaceImportSpecifier")
|
|
9228
|
+
), "hasNamespaceImportSpecifier");
|
|
9229
|
+
e === null ? i || this._ast.program.body.unshift(f.importDeclaration([], f.stringLiteral(r))) : typeof e == "string" ? i ? (/* @__PURE__ */ n(
|
|
9230
|
+
(c, u) => c.specifiers.find(
|
|
9224
9231
|
(h) => f.isImportDefaultSpecifier(h) && f.isIdentifier(h.local) && h.local.name === u
|
|
9225
|
-
), "hasDefaultImportSpecifier"),
|
|
9226
|
-
(c) => f.isImportDeclaration(c) && c.source.value === r
|
|
9227
|
-
);
|
|
9228
|
-
e === null ? l || this._ast.program.body.unshift(f.importDeclaration([], f.stringLiteral(r))) : typeof e == "string" ? l ? a(l, e) || l.
|
|
9229
|
-
specifiers.push(
|
|
9232
|
+
), "hasDefaultImportSpecifier"))(i, e) || i.specifiers.push(
|
|
9230
9233
|
f.importDefaultSpecifier(f.identifier(e))
|
|
9231
9234
|
) : this._ast.program.body.unshift(
|
|
9232
9235
|
f.importDeclaration(
|
|
9233
9236
|
[f.importDefaultSpecifier(f.identifier(e))],
|
|
9234
9237
|
f.stringLiteral(r)
|
|
9235
9238
|
)
|
|
9236
|
-
) : Array.isArray(e) ?
|
|
9237
|
-
|
|
9239
|
+
) : Array.isArray(e) ? i ? e.forEach((c) => {
|
|
9240
|
+
o(i, c) || i.specifiers.push(s(c));
|
|
9238
9241
|
}) : this._ast.program.body.unshift(
|
|
9239
9242
|
f.importDeclaration(
|
|
9240
|
-
e.map(
|
|
9243
|
+
e.map(s),
|
|
9241
9244
|
f.stringLiteral(r)
|
|
9242
9245
|
)
|
|
9243
|
-
) : e.namespace && (
|
|
9246
|
+
) : e.namespace && (i ? a(i, e.namespace) || i.specifiers.push(
|
|
9244
9247
|
f.importNamespaceSpecifier(f.identifier(e.namespace))
|
|
9245
9248
|
) : this._ast.program.body.unshift(
|
|
9246
9249
|
f.importDeclaration(
|