@storybook/vue3 11.0.0-alpha.6 → 11.0.0-alpha.7
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/_node-chunks/{chunk-OEMBCZSA.js → chunk-DIGJCCHQ.js} +31 -11
- package/dist/_node-chunks/{chunk-GAJS6ZO4.js → chunk-IUUSMV7H.js} +61 -13
- package/dist/_node-chunks/{chunk-MD3CZS6R.js → chunk-M5XXRPJZ.js} +6 -6
- package/dist/_node-chunks/{chunk-GE5JKOBY.js → chunk-UZY53QU3.js} +7 -7
- package/dist/_node-chunks/{component-meta-EWSWVEAZ.js → component-meta-XFZ6HA3B.js} +7 -7
- package/dist/_node-chunks/{parsers-CLTS5BAL.js → parsers-7Z53IVP2.js} +6 -6
- package/dist/_node-chunks/vue-docgen-api-UWQ3E2FW.js +17 -0
- package/dist/{chunk-PVetFykd.d.ts → chunk-CeOI_Kon.d.ts} +3 -3
- package/dist/docgen/docgen-worker.js +9 -9
- package/dist/docgen/index.d.ts +1 -1
- package/dist/docgen/index.js +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/preset.js +11 -11
- package/package.json +3 -3
- package/dist/_node-chunks/vue-docgen-api-TXD2KQKB.js +0 -17
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -136,7 +136,7 @@ async function applyVueDocgenApiTempFixes(filename, componentsMeta, exportNames)
|
|
|
136
136
|
let parsedComponentDocs = await parseMulti(filename), parsedByExportName = new Map(parsedComponentDocs.map((doc) => [doc.exportName, doc]));
|
|
137
137
|
componentsMeta.forEach((meta, index) => {
|
|
138
138
|
let parsed = parsedByExportName.get(exportNames[index]);
|
|
139
|
-
parsed && ((hasEvents || needsEventRestore) && mergeEventDescriptions(meta, parsed.events), needsEventRestore && restoreMissingRuntimeEvents(meta, parsed.events), needsSlots && mergeTemplateSlots(meta, parsed.slots));
|
|
139
|
+
parsed && ((hasEvents || needsEventRestore) && mergeEventDescriptions(meta, parsed.events), needsEventRestore && restoreMissingRuntimeEvents(meta, parsed.events), needsSlots && mergeTemplateSlots(meta, parsed.slots, source));
|
|
140
140
|
});
|
|
141
141
|
} catch {
|
|
142
142
|
}
|
|
@@ -185,16 +185,36 @@ function hasTemplateSlotGap(filename, componentsMeta, source) {
|
|
|
185
185
|
(meta) => meta.slots.length === 0 || meta.slots.some((slot) => !slot.description)
|
|
186
186
|
) ? !1 : /<slot[\s/>]/.test(source ?? "");
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
var NAME_DIRECTIVE = /(?:^|\s)(?::|v-bind:)name\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
189
|
+
function isDynamicSlotName(slot, source) {
|
|
190
|
+
if (!(slot.bindings?.some((binding) => binding.name === "name") ?? !1) || !source)
|
|
191
|
+
return !1;
|
|
192
|
+
let expression = slot.name.trim();
|
|
193
|
+
for (let match of source.matchAll(NAME_DIRECTIVE))
|
|
194
|
+
if ((match[1] ?? match[2] ?? "").trim() === expression)
|
|
195
|
+
return !0;
|
|
196
|
+
return !1;
|
|
197
|
+
}
|
|
198
|
+
var FOLDABLE_SLOT_NAME = /^\s*[\w$][\w$.]*\s*\?\?\s*(?:'([^']+)'|"([^"]+)")\s*$/;
|
|
199
|
+
function resolveTemplateSlotName(slot, isDynamic) {
|
|
200
|
+
if (!isDynamic)
|
|
201
|
+
return slot.name;
|
|
202
|
+
let fallback = slot.name.match(FOLDABLE_SLOT_NAME);
|
|
203
|
+
return fallback?.[1] || fallback?.[2];
|
|
204
|
+
}
|
|
205
|
+
function mergeTemplateSlots(meta, slots, source) {
|
|
189
206
|
for (let slot of slots ?? []) {
|
|
190
|
-
let
|
|
207
|
+
let isDynamic = isDynamicSlotName(slot, source), slotName = resolveTemplateSlotName(slot, isDynamic);
|
|
208
|
+
if (!slotName)
|
|
209
|
+
continue;
|
|
210
|
+
let existing = meta.slots.find((candidate) => candidate.name === slotName);
|
|
191
211
|
if (existing) {
|
|
192
212
|
!existing.description && slot.description && (existing.description = slot.description);
|
|
193
213
|
continue;
|
|
194
214
|
}
|
|
195
|
-
let bindings = (slot.bindings ?? []).filter((binding) => binding.name).map((binding) => `${binding.name}: ${binding.type?.name ?? "unknown"}`), type = bindings.length > 0 ? `{ ${bindings.join("; ")} }` : "{}";
|
|
215
|
+
let bindings = (slot.bindings ?? []).filter((binding) => binding.name && (!isDynamic || binding.name !== "name")).map((binding) => `${binding.name}: ${binding.type?.name ?? "unknown"}`), type = bindings.length > 0 ? `{ ${bindings.join("; ")} }` : "{}";
|
|
196
216
|
meta.slots.push({
|
|
197
|
-
name:
|
|
217
|
+
name: slotName,
|
|
198
218
|
description: slot.description ?? "",
|
|
199
219
|
type,
|
|
200
220
|
schema: type,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
renderPropLikeArg,
|
|
32
32
|
renderSlotContent,
|
|
33
33
|
wrapSlotContent
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-M5XXRPJZ.js";
|
|
35
35
|
|
|
36
36
|
// src/docgen/story-docs/build-story-docs.ts
|
|
37
37
|
import { readFile } from "node:fs/promises";
|
|
@@ -1226,9 +1226,23 @@ function metaObjectPath(csf) {
|
|
|
1226
1226
|
|
|
1227
1227
|
// ../../core/src/csf-tools/story-shape/normalize-story.ts
|
|
1228
1228
|
function normalizeStoryDeclaration(storyDeclaration) {
|
|
1229
|
-
let storyPath = declarationExpression(storyDeclaration), normalizedPath = bindInitializer(storyDeclaration,
|
|
1229
|
+
let storyPath = declarationExpression(storyDeclaration), resolvedStoryPath = resolveLocalStory(storyDeclaration, storyPath), normalizedPath = bindInitializer(storyDeclaration, resolvedStoryPath) ?? factoryArgumentExpression(resolvedStoryPath), unwrappedPath = unwrapTypeExpression(normalizedPath);
|
|
1230
1230
|
return classifyStoryPath(unwrappedPath);
|
|
1231
1231
|
}
|
|
1232
|
+
function resolveLocalStory(declaration, expression) {
|
|
1233
|
+
let visited = /* @__PURE__ */ new Set(), current = unwrapTypeExpression(expression);
|
|
1234
|
+
for (; current.isIdentifier(); ) {
|
|
1235
|
+
let name = current.node.name;
|
|
1236
|
+
if (visited.has(name) || !current.scope.getBinding(name)?.constant)
|
|
1237
|
+
break;
|
|
1238
|
+
visited.add(name);
|
|
1239
|
+
let resolved = resolveIdentifierInit(declaration, current);
|
|
1240
|
+
if (!resolved)
|
|
1241
|
+
break;
|
|
1242
|
+
current = unwrapTypeExpression(resolved);
|
|
1243
|
+
}
|
|
1244
|
+
return current;
|
|
1245
|
+
}
|
|
1232
1246
|
function declarationExpression(storyDeclaration) {
|
|
1233
1247
|
if (storyDeclaration.isFunctionDeclaration())
|
|
1234
1248
|
return storyDeclaration;
|
|
@@ -1409,10 +1423,15 @@ var membersOf = (object, ctx, visited) => {
|
|
|
1409
1423
|
return importedBinding(ctx, binding.path, visited);
|
|
1410
1424
|
if (!binding.constant)
|
|
1411
1425
|
return;
|
|
1412
|
-
let
|
|
1426
|
+
let rootName = localAliasRoot(ctx, name), rootBinding = ctx.program.scope.getBinding(rootName), declared = declaredBindingMembers(
|
|
1427
|
+
ctx,
|
|
1428
|
+
rootBinding?.path.node ?? binding.path.node,
|
|
1429
|
+
position,
|
|
1430
|
+
visited
|
|
1431
|
+
);
|
|
1413
1432
|
if (declared === void 0)
|
|
1414
1433
|
return;
|
|
1415
|
-
let assigned = assignedMembers(ctx,
|
|
1434
|
+
let assigned = assignedMembers(ctx, localAliases(ctx, rootName), position);
|
|
1416
1435
|
return {
|
|
1417
1436
|
kind: "members",
|
|
1418
1437
|
ctx,
|
|
@@ -1436,6 +1455,14 @@ var membersOf = (object, ctx, visited) => {
|
|
|
1436
1455
|
let factory = factoryCall(unwrapped);
|
|
1437
1456
|
if (factory === void 0 && (t6.isFunction(unwrapped) || isCanonicalCsf2BindCall(unwrapped)))
|
|
1438
1457
|
return { members: complete() };
|
|
1458
|
+
if (t6.isIdentifier(unwrapped)) {
|
|
1459
|
+
let referenced = bindingMembers(ctx, unwrapped.name, position, visited);
|
|
1460
|
+
if (referenced?.kind === "members") {
|
|
1461
|
+
let members = referenced.external ? ctx.externalize && externalized(referenced.members, referenced.ctx) : referenced.members;
|
|
1462
|
+
if (members)
|
|
1463
|
+
return { members, ...referenced.accessor ? { accessor: referenced.accessor } : {} };
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1439
1466
|
if (factory === void 0)
|
|
1440
1467
|
return {
|
|
1441
1468
|
members: { properties: {}, shadowed: [], unresolved: [sourceOf(unwrapped)] }
|
|
@@ -1455,7 +1482,28 @@ var membersOf = (object, ctx, visited) => {
|
|
|
1455
1482
|
},
|
|
1456
1483
|
accessor: "input"
|
|
1457
1484
|
};
|
|
1458
|
-
}, MERGED_ANNOTATIONS = ["args", "argTypes", "parameters", "globals"],
|
|
1485
|
+
}, MERGED_ANNOTATIONS = ["args", "argTypes", "parameters", "globals"], localAliasRoot = (ctx, name) => {
|
|
1486
|
+
let visited = /* @__PURE__ */ new Set(), current = name;
|
|
1487
|
+
for (; !visited.has(current); ) {
|
|
1488
|
+
visited.add(current);
|
|
1489
|
+
let binding = ctx.program.scope.getBinding(current), node = binding?.path.node;
|
|
1490
|
+
if (!binding?.constant || !t6.isVariableDeclarator(node) || !node.init)
|
|
1491
|
+
break;
|
|
1492
|
+
let init = unwrapExpression6(node.init);
|
|
1493
|
+
if (!t6.isIdentifier(init))
|
|
1494
|
+
break;
|
|
1495
|
+
let target = ctx.program.scope.getBinding(init.name);
|
|
1496
|
+
if (!target?.constant || target.kind === "module")
|
|
1497
|
+
break;
|
|
1498
|
+
current = init.name;
|
|
1499
|
+
}
|
|
1500
|
+
return current;
|
|
1501
|
+
}, localAliases = (ctx, root) => {
|
|
1502
|
+
let aliases = /* @__PURE__ */ new Map([[root, Number.NEGATIVE_INFINITY]]);
|
|
1503
|
+
for (let [name, binding] of Object.entries(ctx.program.scope.bindings))
|
|
1504
|
+
name !== root && binding.constant && localAliasRoot(ctx, name) === root && aliases.set(name, binding.path.node.start ?? Number.POSITIVE_INFINITY);
|
|
1505
|
+
return aliases;
|
|
1506
|
+
}, mergedAnnotations = (parent, child) => {
|
|
1459
1507
|
let properties = { ...parent.properties, ...child.properties };
|
|
1460
1508
|
for (let key of MERGED_ANNOTATIONS) {
|
|
1461
1509
|
let from = parent.properties[key], over = child.properties[key];
|
|
@@ -1475,7 +1523,7 @@ var membersOf = (object, ctx, visited) => {
|
|
|
1475
1523
|
parent: csfFactoryReceiver(node).name,
|
|
1476
1524
|
...config && t6.isObjectExpression(config) ? { config } : {}
|
|
1477
1525
|
};
|
|
1478
|
-
}, assignedMembers = (ctx,
|
|
1526
|
+
}, assignedMembers = (ctx, aliases, position) => {
|
|
1479
1527
|
let properties = {}, unresolved = [];
|
|
1480
1528
|
for (let statement of ctx.program.node.body) {
|
|
1481
1529
|
if (!t6.isExpressionStatement(statement) || !t6.isAssignmentExpression(statement.expression))
|
|
@@ -1483,7 +1531,7 @@ var membersOf = (object, ctx, visited) => {
|
|
|
1483
1531
|
let assignment = statement.expression, target = assignment.left, depth = 0, outermost;
|
|
1484
1532
|
for (; t6.isMemberExpression(target); )
|
|
1485
1533
|
depth += 1, outermost = t6.isIdentifier(target.property) && !target.computed ? target.property.name : t6.isStringLiteral(target.property) ? target.property.value : void 0, target = target.object;
|
|
1486
|
-
if (!(depth === 0 || !t6.isIdentifier(target) || target.name
|
|
1534
|
+
if (!(depth === 0 || !t6.isIdentifier(target) || !aliases.has(target.name)) && !((assignment.start ?? 0) < aliases.get(target.name)) && !(position !== void 0 && (assignment.start ?? 0) > position)) {
|
|
1487
1535
|
if (depth > 1 || outermost === void 0 || assignment.operator !== "=") {
|
|
1488
1536
|
unresolved.push(sourceOf(assignment));
|
|
1489
1537
|
continue;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
indent
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-M5XXRPJZ.js";
|
|
15
15
|
|
|
16
16
|
// src/docgen/component-docgen/arg-types/extractArgTypes.ts
|
|
17
17
|
import { convert, extractComponentProps, hasDocgen } from "storybook/internal/docs-tools";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
applyVueDocgenApiTempFixes,
|
|
15
15
|
collectComponentMetaSources,
|
|
16
16
|
createVueComponentMetaChecker
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-DIGJCCHQ.js";
|
|
18
18
|
export {
|
|
19
19
|
CHECKER_OPTIONS,
|
|
20
20
|
applyVueDocgenApiTempFixes,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// src/docgen/vue-docgen-api.ts
|
|
14
|
+
import { parse } from "vue-docgen-api";
|
|
15
|
+
export {
|
|
16
|
+
parse
|
|
17
|
+
};
|
|
@@ -6,9 +6,9 @@ import { Constructor, OmitIndexSignature, SetOptional, Simplify } from "type-fes
|
|
|
6
6
|
import { ComponentProps, ComponentSlots } from "vue-component-type-helpers";
|
|
7
7
|
|
|
8
8
|
//#region code/renderers/vue3/.dts-emit/code/renderers/vue3/src/types.d.ts
|
|
9
|
-
type StoryFnVueReturnType = ConcreteComponent<any
|
|
9
|
+
type StoryFnVueReturnType = ConcreteComponent<any> | FunctionalComponent;
|
|
10
10
|
interface VueRenderer extends WebRenderer {
|
|
11
|
-
component: Omit<ConcreteComponent<this['T']>, 'props'>;
|
|
11
|
+
component: Omit<ConcreteComponent<this['T']>, 'props'> | FunctionalComponent<any>;
|
|
12
12
|
storyResult: StoryFnVueReturnType;
|
|
13
13
|
mount: (Component?: StoryFnVueReturnType, options?: {
|
|
14
14
|
props?: Record<string, any>;
|
|
@@ -55,7 +55,7 @@ type StoryObj<TMetaOrCmpOrArgs = Args> = TMetaOrCmpOrArgs extends {
|
|
|
55
55
|
} ? Simplify<ComponentPropsAndSlots<Component> & ArgsFromMeta<VueRenderer, TMetaOrCmpOrArgs>> extends infer TArgs ? StoryAnnotations<VueRenderer, TArgs, SetOptional<TArgs, Extract<keyof TArgs, keyof DefaultArgs>>> : never : StoryAnnotations<VueRenderer, ComponentPropsOrProps<TMetaOrCmpOrArgs>>;
|
|
56
56
|
type ExtractSlots<C> = AllowNonFunctionSlots<Partial<OmitIndexSignature<ComponentSlots<C>>>>;
|
|
57
57
|
type AllowNonFunctionSlots<Slots> = { [K in keyof Slots]: Slots[K] | VNodeChild };
|
|
58
|
-
type ComponentPropsAndSlots<C> = ComponentProps<C
|
|
58
|
+
type ComponentPropsAndSlots<C> = OmitIndexSignature<ComponentProps<C>> & ExtractSlots<C>;
|
|
59
59
|
type ComponentPropsOrProps<TCmpOrArgs> = TCmpOrArgs extends Constructor<any> ? ComponentPropsAndSlots<TCmpOrArgs> : TCmpOrArgs extends FunctionalComponent<any> ? ComponentPropsAndSlots<TCmpOrArgs> : TCmpOrArgs;
|
|
60
60
|
type Decorator<TArgs = StrictArgs> = DecoratorFunction<VueRenderer, TArgs>;
|
|
61
61
|
type Loader<TArgs = StrictArgs> = LoaderFunction<VueRenderer, TArgs>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
buildApiDescription,
|
|
14
14
|
createNamedTypeDetailResolver,
|
|
15
15
|
extractArgTypes
|
|
16
|
-
} from "../_node-chunks/chunk-
|
|
17
|
-
import "../_node-chunks/chunk-
|
|
16
|
+
} from "../_node-chunks/chunk-UZY53QU3.js";
|
|
17
|
+
import "../_node-chunks/chunk-M5XXRPJZ.js";
|
|
18
18
|
import {
|
|
19
19
|
CHECKER_OPTIONS,
|
|
20
20
|
collectComponentMetaSources
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-DIGJCCHQ.js";
|
|
22
22
|
|
|
23
23
|
// src/docgen/docgen-worker.ts
|
|
24
24
|
import { createLazyDocgenMiddleware } from "storybook/internal/common";
|
package/dist/docgen/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as StoryContext$1 } from "../chunk-
|
|
1
|
+
import { l as StoryContext$1 } from "../chunk-CeOI_Kon.js";
|
|
2
2
|
import { i as collectComponentMetaSources, n as MetaSource, r as applyVueDocgenApiTempFixes, t as CHECKER_OPTIONS } from "../chunk-Dka2iJUy.js";
|
|
3
3
|
import { StoryDocsPayload, StoryDocsProviderInput, StrictArgTypes } from "storybook/internal/types";
|
|
4
4
|
import { ComponentMetaChecker } from "vue-component-meta";
|
package/dist/docgen/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
buildStoryDocsPayload
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-IUUSMV7H.js";
|
|
15
15
|
import {
|
|
16
16
|
buildApiDescription,
|
|
17
17
|
createNamedTypeDetailResolver,
|
|
18
18
|
extractArgTypes
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
20
|
-
import "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-UZY53QU3.js";
|
|
20
|
+
import "../_node-chunks/chunk-M5XXRPJZ.js";
|
|
21
21
|
import {
|
|
22
22
|
CHECKER_OPTIONS,
|
|
23
23
|
applyVueDocgenApiTempFixes,
|
|
24
24
|
collectComponentMetaSources
|
|
25
|
-
} from "../_node-chunks/chunk-
|
|
25
|
+
} from "../_node-chunks/chunk-DIGJCCHQ.js";
|
|
26
26
|
|
|
27
27
|
// src/docgen/story-docs/source-decorator/sourceDecorator.ts
|
|
28
28
|
import { SourceType } from "storybook/internal/docs-tools";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as VueTypes, a as Loader, c as Preview, d as StoryObj, f as StrictArgs, g as VueRenderer, h as VueDocgenPlugin, i as Decorator, l as StoryContext, m as VueDocgenInfoEntry, n as Args, o as Meta, p as VueDocgenInfo, r as ComponentPropsAndSlots, s as Parameters, t as ArgTypes, u as StoryFn } from "./chunk-
|
|
1
|
+
import { _ as VueTypes, a as Loader, c as Preview, d as StoryObj, f as StrictArgs, g as VueRenderer, h as VueDocgenPlugin, i as Decorator, l as StoryContext, m as VueDocgenInfoEntry, n as Args, o as Meta, p as VueDocgenInfo, r as ComponentPropsAndSlots, s as Parameters, t as ArgTypes, u as StoryFn } from "./chunk-CeOI_Kon.js";
|
|
2
2
|
import { Args as Args$1, ArgsStoryFn, ComposedStoryFn, DecoratorFunction, NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations, ProjectAnnotations, Store_CSFExports, StoriesWithPartialProps, StoryAnnotations, StoryAnnotationsOrFn, StoryContext as StoryContext$1 } from "storybook/internal/types";
|
|
3
3
|
import { App } from "vue";
|
|
4
4
|
import { Simplify } from "type-fest";
|
package/dist/preset.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_6gh9awpayy7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_6gh9awpayy7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_6gh9awpayy7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_6gh9awpayy7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_6gh9awpayy7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_6gh9awpayy7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
buildStoryDocsPayload
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
15
|
-
import "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-IUUSMV7H.js";
|
|
15
|
+
import "./_node-chunks/chunk-M5XXRPJZ.js";
|
|
16
16
|
|
|
17
17
|
// src/preset.ts
|
|
18
18
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
@@ -47,8 +47,8 @@ var experimental_storyDocsProvider = createWorkerGatedStoryDocsProvider({
|
|
|
47
47
|
|
|
48
48
|
// src/docgen/engine.ts
|
|
49
49
|
var experimental_vueDocgenEngine = async () => ({
|
|
50
|
-
componentMeta: () => import("./_node-chunks/component-meta-
|
|
51
|
-
vueDocgenApi: () => import("./_node-chunks/vue-docgen-api-
|
|
50
|
+
componentMeta: () => import("./_node-chunks/component-meta-XFZ6HA3B.js"),
|
|
51
|
+
vueDocgenApi: () => import("./_node-chunks/vue-docgen-api-UWQ3E2FW.js")
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
// src/preset.ts
|
|
@@ -67,7 +67,7 @@ var isDocgenProviderEnabled = () => {
|
|
|
67
67
|
docsEnabled ? [fileURLToPath3(import.meta.resolve("@storybook/vue3/entry-preview-docs"))] : []
|
|
68
68
|
);
|
|
69
69
|
}, experimental_importParsers = async (input = []) => {
|
|
70
|
-
let { vueImportParser } = await import("./_node-chunks/parsers-
|
|
70
|
+
let { vueImportParser } = await import("./_node-chunks/parsers-7Z53IVP2.js");
|
|
71
71
|
return [...input, vueImportParser];
|
|
72
72
|
};
|
|
73
73
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/vue3",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.7",
|
|
4
4
|
"description": "Storybook Vue 3 renderer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"vue-tsc": "latest"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"storybook": "^11.0.0-alpha.
|
|
75
|
-
"typescript": "^5.9.0 || ^6.0.0",
|
|
74
|
+
"storybook": "^11.0.0-alpha.7",
|
|
75
|
+
"typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
|
|
76
76
|
"vue": "^3.0.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependenciesMeta": {
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_o98lcndpw1r from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_o98lcndpw1r from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_o98lcndpw1r from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_o98lcndpw1r.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_o98lcndpw1r.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_o98lcndpw1r.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// src/docgen/vue-docgen-api.ts
|
|
14
|
-
import { parse } from "vue-docgen-api";
|
|
15
|
-
export {
|
|
16
|
-
parse
|
|
17
|
-
};
|