@storybook/react 11.0.0-rc.1 → 11.0.0-rc.3
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/_browser-chunks/{chunk-XQNZ5YRO.js → chunk-GBFPEOJZ.js} +1 -36
- package/dist/_browser-chunks/chunk-KI7YBTX7.js +42 -0
- package/dist/_browser-chunks/{chunk-RHGZ5MD3.js → chunk-LI5LRSL3.js} +1 -1
- package/dist/_node-chunks/{chunk-LZBEMUVF.js → chunk-4UV6B7T7.js} +4 -2
- package/dist/_node-chunks/{chunk-CJ2XYAXX.js → chunk-M3SEC5XW.js} +321 -27
- package/dist/_node-chunks/chunk-PQZIOGBY.js +1 -1
- package/dist/_node-chunks/{chunk-N7TOZR54.js → chunk-RIMY5QBX.js} +10 -6
- package/dist/_node-chunks/{chunk-ITCF7APG.js → chunk-RNO52GGS.js} +1 -1
- package/dist/_node-chunks/{chunk-2I5WCK5H.js → chunk-XMHC3CJ5.js} +64 -334
- package/dist/_node-chunks/{extractArgTypesFromComponentFile-BBV3XDO4.js → extractArgTypesFromComponentFile-UJJRVMGW.js} +4 -4
- package/dist/_node-chunks/{extractReactDocgenInfo-L44YP4OM.js → extractReactDocgenInfo-Z5DJORGO.js} +2 -2
- package/dist/_node-chunks/{reactDocgen-WMOVFLAX.js → reactDocgen-CS462JSF.js} +2 -2
- package/dist/docgen/docgen-worker.js +8 -4
- package/dist/docs/register-print-hole.js +2 -0
- package/dist/entry-preview-docs.js +2 -1
- package/dist/index.js +3 -2
- package/dist/preset.js +27 -22
- package/dist/preview.js +3 -2
- package/package.json +4 -3
- package/template/cli/js/Button.jsx +0 -2
- package/template/cli/js/Header.jsx +0 -2
- package/template/cli/ts/Button.tsx +0 -2
- package/template/cli/ts/Header.tsx +0 -2
|
@@ -19,40 +19,6 @@ __export(entry_preview_docs_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
import { getSourceSnippetRuntime } from "storybook/internal/docs-tools";
|
|
21
21
|
|
|
22
|
-
// src/docs/print-hole.ts
|
|
23
|
-
import { printValue, unknownHoleKind } from "storybook/internal/docs-tools";
|
|
24
|
-
|
|
25
|
-
// src/snippet-values.ts
|
|
26
|
-
var unmarked = (_, text) => text, isAttributeName = (name) => /^[A-Za-z_][A-Za-z0-9_:-]*$/.test(name), isAttributeText = (text) => !/["&\r\n]/.test(text), isChildText = (text) => !/[{}<>&\r\n]/.test(text), valueCode = (value) => value.kind === "boolean" ? String(value.value) : value.code, printAttribute = (name, value) => value.kind === "boolean" ? value.value ? name : `${name}={false}` : value.kind === "string" && isAttributeText(value.value) ? `${name}="${value.value}"` : `${name}={${value.code}}`, printAttributes = (args, mark = unmarked) => {
|
|
27
|
-
let unnamed = args.filter(([name]) => !isAttributeName(name)), attributes = args.filter(([name]) => isAttributeName(name)).map(([name, value]) => mark({ kind: "attr", arg: name }, printAttribute(name, value)));
|
|
28
|
-
if (unnamed.length !== 0) {
|
|
29
|
-
let members = unnamed.map(
|
|
30
|
-
([name, value]) => `${JSON.stringify(name)}: ${mark({ kind: "value", arg: name }, valueCode(value))}`
|
|
31
|
-
);
|
|
32
|
-
attributes.push(`{...{ ${members.join(", ")} }}`);
|
|
33
|
-
}
|
|
34
|
-
return attributes;
|
|
35
|
-
}, printChildren = (value) => value.kind === "string" && isChildText(value.value) ? value.value : value.kind === "jsx" ? value.code : `{${valueCode(value)}}`;
|
|
36
|
-
|
|
37
|
-
// src/docs/print-hole.ts
|
|
38
|
-
var printHole = (hole, value) => {
|
|
39
|
-
let arg = hole.arg ?? "";
|
|
40
|
-
switch (hole.kind) {
|
|
41
|
-
case "attr":
|
|
42
|
-
return value === void 0 ? "" : printAttribute(hole.name ?? arg, toJsxValue(arg, value));
|
|
43
|
-
case "text":
|
|
44
|
-
return value === void 0 ? "" : printChildren(toJsxValue(arg, value));
|
|
45
|
-
case "value":
|
|
46
|
-
return printValue(value, arg);
|
|
47
|
-
case "attrs":
|
|
48
|
-
return printAttributes(
|
|
49
|
-
Object.entries(value).filter(([name]) => !hole.except.includes(name)).map(([name, item]) => [name, toJsxValue(name, item)])
|
|
50
|
-
).map((attribute) => ` ${attribute}`).join("");
|
|
51
|
-
default:
|
|
52
|
-
return unknownHoleKind(hole);
|
|
53
|
-
}
|
|
54
|
-
}, toJsxValue = (name, value) => typeof value == "boolean" ? { kind: "boolean", value } : typeof value == "string" ? { kind: "string", value, code: printValue(value, name) } : { kind: "code", code: printValue(value, name) };
|
|
55
|
-
|
|
56
22
|
// src/docs/jsxDecorator.tsx
|
|
57
23
|
import React, { createElement, isValidElement } from "react";
|
|
58
24
|
import { logger } from "storybook/internal/client-logger";
|
|
@@ -166,8 +132,7 @@ var applyDecorators2 = (storyFn, decorators2) => {
|
|
|
166
132
|
// src/entry-preview-docs.ts
|
|
167
133
|
var snippetRuntime = getSourceSnippetRuntime(), useCompileTimeSnippets = "FEATURES" in globalThis && globalThis?.FEATURES?.experimentalCodeExamples, decorators = snippetRuntime === "preview" && !useCompileTimeSnippets ? [jsxDecorator] : [], parameters = {
|
|
168
134
|
docs: {
|
|
169
|
-
story: { inline: !0 }
|
|
170
|
-
...snippetRuntime === "server" ? { source: { printHole } } : {}
|
|
135
|
+
story: { inline: !0 }
|
|
171
136
|
}
|
|
172
137
|
};
|
|
173
138
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/docs/register-print-hole.ts
|
|
2
|
+
import { registerPrintHole } from "storybook/internal/docs-tools/snippets";
|
|
3
|
+
|
|
4
|
+
// src/docs/print-hole.ts
|
|
5
|
+
import {
|
|
6
|
+
printValue,
|
|
7
|
+
unknownHoleKind
|
|
8
|
+
} from "storybook/internal/docs-tools/snippets";
|
|
9
|
+
|
|
10
|
+
// src/snippet-values.ts
|
|
11
|
+
var unmarked = (_, text) => text, isAttributeName = (name) => /^[A-Za-z_][A-Za-z0-9_:-]*$/.test(name), isAttributeText = (text) => !/["&\r\n]/.test(text), isChildText = (text) => !/[{}<>&\r\n]/.test(text), valueCode = (value) => value.kind === "boolean" ? String(value.value) : value.code, printAttribute = (name, value) => value.kind === "boolean" ? value.value ? name : `${name}={false}` : value.kind === "string" && isAttributeText(value.value) ? `${name}="${value.value}"` : `${name}={${value.code}}`, printAttributes = (args, mark = unmarked) => {
|
|
12
|
+
let unnamed = args.filter(([name]) => !isAttributeName(name)), attributes = args.filter(([name]) => isAttributeName(name)).map(([name, value]) => mark({ kind: "attr", arg: name }, printAttribute(name, value)));
|
|
13
|
+
if (unnamed.length !== 0) {
|
|
14
|
+
let members = unnamed.map(
|
|
15
|
+
([name, value]) => `${JSON.stringify(name)}: ${mark({ kind: "value", arg: name }, valueCode(value))}`
|
|
16
|
+
);
|
|
17
|
+
attributes.push(`{...{ ${members.join(", ")} }}`);
|
|
18
|
+
}
|
|
19
|
+
return attributes;
|
|
20
|
+
}, printChildren = (value) => value.kind === "string" && isChildText(value.value) ? value.value : value.kind === "jsx" ? value.code : `{${valueCode(value)}}`;
|
|
21
|
+
|
|
22
|
+
// src/docs/print-hole.ts
|
|
23
|
+
var printHole = (hole, value) => {
|
|
24
|
+
let arg = hole.arg ?? "";
|
|
25
|
+
switch (hole.kind) {
|
|
26
|
+
case "attr":
|
|
27
|
+
return value === void 0 ? "" : printAttribute(hole.name ?? arg, toJsxValue(arg, value));
|
|
28
|
+
case "text":
|
|
29
|
+
return value === void 0 ? "" : printChildren(toJsxValue(arg, value));
|
|
30
|
+
case "value":
|
|
31
|
+
return printValue(value, arg);
|
|
32
|
+
case "attrs":
|
|
33
|
+
return printAttributes(
|
|
34
|
+
Object.entries(value).filter(([name]) => !hole.except.includes(name)).map(([name, item]) => [name, toJsxValue(name, item)])
|
|
35
|
+
).map((attribute) => ` ${attribute}`).join("");
|
|
36
|
+
default:
|
|
37
|
+
return unknownHoleKind(hole);
|
|
38
|
+
}
|
|
39
|
+
}, toJsxValue = (name, value) => typeof value == "boolean" ? { kind: "boolean", value } : typeof value == "string" ? { kind: "string", value, code: printValue(value, name) } : { kind: "code", code: printValue(value, name) };
|
|
40
|
+
|
|
41
|
+
// src/docs/register-print-hole.ts
|
|
42
|
+
registerPrintHole(printHole);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildComponentDocgenFromResolved,
|
|
3
3
|
isExtractable,
|
|
4
|
-
posix,
|
|
5
4
|
resolveStoryFileComponents
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XMHC3CJ5.js";
|
|
6
|
+
import {
|
|
7
|
+
posix
|
|
8
|
+
} from "./chunk-M3SEC5XW.js";
|
|
7
9
|
import {
|
|
8
10
|
extractArgTypes
|
|
9
11
|
} from "./chunk-SC3QXTHH.js";
|
|
@@ -1107,8 +1107,8 @@ var require_stringify = __commonJS({
|
|
|
1107
1107
|
// ../../../node_modules/json5/lib/index.js
|
|
1108
1108
|
var require_lib = __commonJS({
|
|
1109
1109
|
"../../../node_modules/json5/lib/index.js"(exports, module) {
|
|
1110
|
-
var
|
|
1111
|
-
parse,
|
|
1110
|
+
var parse2 = require_parse(), stringify = require_stringify(), JSON5 = {
|
|
1111
|
+
parse: parse2,
|
|
1112
1112
|
stringify
|
|
1113
1113
|
};
|
|
1114
1114
|
module.exports = JSON5;
|
|
@@ -1144,12 +1144,12 @@ var require_tsconfig_loader = __commonJS({
|
|
|
1144
1144
|
exports.loadTsconfig = exports.walkForTsConfig = exports.tsConfigLoader = void 0;
|
|
1145
1145
|
var path = __require("path"), fs = __require("fs"), JSON5 = require_lib(), StripBom = require_strip_bom();
|
|
1146
1146
|
function tsConfigLoader(_a) {
|
|
1147
|
-
var getEnv = _a.getEnv,
|
|
1147
|
+
var getEnv = _a.getEnv, cwd2 = _a.cwd, _b = _a.loadSync, loadSync = _b === void 0 ? loadSyncDefault : _b, TS_NODE_PROJECT = getEnv("TS_NODE_PROJECT"), TS_NODE_BASEURL = getEnv("TS_NODE_BASEURL"), loadResult = loadSync(cwd2, TS_NODE_PROJECT, TS_NODE_BASEURL);
|
|
1148
1148
|
return loadResult;
|
|
1149
1149
|
}
|
|
1150
1150
|
exports.tsConfigLoader = tsConfigLoader;
|
|
1151
|
-
function loadSyncDefault(
|
|
1152
|
-
var configPath = resolveConfigPath(
|
|
1151
|
+
function loadSyncDefault(cwd2, filename, baseUrl) {
|
|
1152
|
+
var configPath = resolveConfigPath(cwd2, filename);
|
|
1153
1153
|
if (!configPath)
|
|
1154
1154
|
return {
|
|
1155
1155
|
tsConfigPath: void 0,
|
|
@@ -1163,14 +1163,14 @@ var require_tsconfig_loader = __commonJS({
|
|
|
1163
1163
|
paths: config && config.compilerOptions && config.compilerOptions.paths
|
|
1164
1164
|
};
|
|
1165
1165
|
}
|
|
1166
|
-
function resolveConfigPath(
|
|
1166
|
+
function resolveConfigPath(cwd2, filename) {
|
|
1167
1167
|
if (filename) {
|
|
1168
|
-
var absolutePath = fs.lstatSync(filename).isDirectory() ? path.resolve(filename, "./tsconfig.json") : path.resolve(
|
|
1168
|
+
var absolutePath = fs.lstatSync(filename).isDirectory() ? path.resolve(filename, "./tsconfig.json") : path.resolve(cwd2, filename);
|
|
1169
1169
|
return absolutePath;
|
|
1170
1170
|
}
|
|
1171
|
-
if (fs.statSync(
|
|
1172
|
-
return path.resolve(
|
|
1173
|
-
var configAbsolutePath = walkForTsConfig(
|
|
1171
|
+
if (fs.statSync(cwd2).isFile())
|
|
1172
|
+
return path.resolve(cwd2);
|
|
1173
|
+
var configAbsolutePath = walkForTsConfig(cwd2);
|
|
1174
1174
|
return configAbsolutePath ? path.resolve(configAbsolutePath) : void 0;
|
|
1175
1175
|
}
|
|
1176
1176
|
function walkForTsConfig(directory, readdirSync) {
|
|
@@ -1231,14 +1231,14 @@ var require_config_loader = __commonJS({
|
|
|
1231
1231
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1232
1232
|
exports.configLoader = exports.loadConfig = void 0;
|
|
1233
1233
|
var TsConfigLoader2 = require_tsconfig_loader(), path = __require("path");
|
|
1234
|
-
function loadConfig2(
|
|
1235
|
-
return
|
|
1234
|
+
function loadConfig2(cwd2) {
|
|
1235
|
+
return cwd2 === void 0 && (cwd2 = process.cwd()), configLoader({ cwd: cwd2 });
|
|
1236
1236
|
}
|
|
1237
1237
|
exports.loadConfig = loadConfig2;
|
|
1238
1238
|
function configLoader(_a) {
|
|
1239
|
-
var
|
|
1239
|
+
var cwd2 = _a.cwd, explicitParams = _a.explicitParams, _b = _a.tsConfigLoader, tsConfigLoader = _b === void 0 ? TsConfigLoader2.tsConfigLoader : _b;
|
|
1240
1240
|
if (explicitParams) {
|
|
1241
|
-
var absoluteBaseUrl = path.isAbsolute(explicitParams.baseUrl) ? explicitParams.baseUrl : path.join(
|
|
1241
|
+
var absoluteBaseUrl = path.isAbsolute(explicitParams.baseUrl) ? explicitParams.baseUrl : path.join(cwd2, explicitParams.baseUrl);
|
|
1242
1242
|
return {
|
|
1243
1243
|
resultType: "success",
|
|
1244
1244
|
configFileAbsolutePath: "",
|
|
@@ -1250,7 +1250,7 @@ var require_config_loader = __commonJS({
|
|
|
1250
1250
|
};
|
|
1251
1251
|
}
|
|
1252
1252
|
var loadResult = tsConfigLoader({
|
|
1253
|
-
cwd,
|
|
1253
|
+
cwd: cwd2,
|
|
1254
1254
|
getEnv: function(key) {
|
|
1255
1255
|
return process.env[key];
|
|
1256
1256
|
}
|
|
@@ -1441,9 +1441,9 @@ var require_register = __commonJS({
|
|
|
1441
1441
|
return coreModules;
|
|
1442
1442
|
}
|
|
1443
1443
|
function register(params) {
|
|
1444
|
-
var
|
|
1444
|
+
var cwd2, explicitParams;
|
|
1445
1445
|
if (params)
|
|
1446
|
-
|
|
1446
|
+
cwd2 = params.cwd, (params.baseUrl || params.paths) && (explicitParams = params);
|
|
1447
1447
|
else {
|
|
1448
1448
|
var minimist = require_minimist(), argv = minimist(process.argv.slice(2), {
|
|
1449
1449
|
// eslint-disable-next-line id-denylist
|
|
@@ -1452,10 +1452,10 @@ var require_register = __commonJS({
|
|
|
1452
1452
|
project: ["P"]
|
|
1453
1453
|
}
|
|
1454
1454
|
});
|
|
1455
|
-
|
|
1455
|
+
cwd2 = argv.project;
|
|
1456
1456
|
}
|
|
1457
1457
|
var configLoaderResult = (0, config_loader_1.configLoader)({
|
|
1458
|
-
cwd:
|
|
1458
|
+
cwd: cwd2 ?? process.cwd(),
|
|
1459
1459
|
explicitParams
|
|
1460
1460
|
});
|
|
1461
1461
|
if (configLoaderResult.resultType === "failed")
|
|
@@ -1510,6 +1510,296 @@ var require_lib2 = __commonJS({
|
|
|
1510
1510
|
}
|
|
1511
1511
|
});
|
|
1512
1512
|
|
|
1513
|
+
// ../../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
1514
|
+
var _lazyMatch = () => {
|
|
1515
|
+
var __lib__ = (() => {
|
|
1516
|
+
var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e) => {
|
|
1517
|
+
for (var n in e) m(r, n, { get: e[n], enumerable: !0 });
|
|
1518
|
+
}, H = (r, e, n, a) => {
|
|
1519
|
+
if (e && typeof e == "object" || typeof e == "function") for (let t of G(e)) !T.call(r, t) && t !== n && m(r, t, { get: () => e[t], enumerable: !(a = V(e, t)) || a.enumerable });
|
|
1520
|
+
return r;
|
|
1521
|
+
}, J = (r) => H(m({}, "__esModule", { value: !0 }), r), w = {};
|
|
1522
|
+
q(w, { default: () => re });
|
|
1523
|
+
var A = (r) => Array.isArray(r), d = (r) => typeof r == "function", Q = (r) => r.length === 0, W = (r) => typeof r == "number", K = (r) => typeof r == "object" && r !== null, X = (r) => r instanceof RegExp, b = (r) => typeof r == "string", h = (r) => r === void 0, Y = (r) => {
|
|
1524
|
+
let e = /* @__PURE__ */ new Map();
|
|
1525
|
+
return (n) => {
|
|
1526
|
+
let a = e.get(n);
|
|
1527
|
+
if (a) return a;
|
|
1528
|
+
let t = r(n);
|
|
1529
|
+
return e.set(n, t), t;
|
|
1530
|
+
};
|
|
1531
|
+
}, rr = (r, e, n = {}) => {
|
|
1532
|
+
let a = { cache: {}, input: r, index: 0, indexMax: 0, options: n, output: [] };
|
|
1533
|
+
if (v(e)(a) && a.index === r.length) return a.output;
|
|
1534
|
+
throw new Error(`Failed to parse at index ${a.indexMax}`);
|
|
1535
|
+
}, i = (r, e) => A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e) => {
|
|
1536
|
+
let n = {};
|
|
1537
|
+
for (let a of r) {
|
|
1538
|
+
if (a.length !== 1) throw new Error(`Invalid character: "${a}"`);
|
|
1539
|
+
let t = a.charCodeAt(0);
|
|
1540
|
+
n[t] = !0;
|
|
1541
|
+
}
|
|
1542
|
+
return (a) => {
|
|
1543
|
+
let t = a.index, o = a.input;
|
|
1544
|
+
for (; a.index < o.length && o.charCodeAt(a.index) in n; ) a.index += 1;
|
|
1545
|
+
let u = a.index;
|
|
1546
|
+
if (u > t) {
|
|
1547
|
+
if (!h(e) && !a.options.silent) {
|
|
1548
|
+
let s = a.input.slice(t, u), c = d(e) ? e(s, o, String(t)) : e;
|
|
1549
|
+
h(c) || a.output.push(c);
|
|
1550
|
+
}
|
|
1551
|
+
a.indexMax = Math.max(a.indexMax, a.index);
|
|
1552
|
+
}
|
|
1553
|
+
return !0;
|
|
1554
|
+
};
|
|
1555
|
+
}, nr = (r, e) => {
|
|
1556
|
+
let n = r.source, a = r.flags.replace(/y|$/, "y"), t = new RegExp(n, a);
|
|
1557
|
+
return g((o) => {
|
|
1558
|
+
t.lastIndex = o.index;
|
|
1559
|
+
let u = t.exec(o.input);
|
|
1560
|
+
if (u) {
|
|
1561
|
+
if (!h(e) && !o.options.silent) {
|
|
1562
|
+
let s = d(e) ? e(...u, o.input, String(o.index)) : e;
|
|
1563
|
+
h(s) || o.output.push(s);
|
|
1564
|
+
}
|
|
1565
|
+
return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), !0;
|
|
1566
|
+
} else return !1;
|
|
1567
|
+
});
|
|
1568
|
+
}, ar = (r, e) => (n) => {
|
|
1569
|
+
if (n.input.startsWith(r, n.index)) {
|
|
1570
|
+
if (!h(e) && !n.options.silent) {
|
|
1571
|
+
let t = d(e) ? e(r, n.input, String(n.index)) : e;
|
|
1572
|
+
h(t) || n.output.push(t);
|
|
1573
|
+
}
|
|
1574
|
+
return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), !0;
|
|
1575
|
+
} else return !1;
|
|
1576
|
+
}, C = (r, e, n, a) => {
|
|
1577
|
+
let t = v(r);
|
|
1578
|
+
return g(_(M((o) => {
|
|
1579
|
+
let u = 0;
|
|
1580
|
+
for (; u < n; ) {
|
|
1581
|
+
let s = o.index;
|
|
1582
|
+
if (!t(o) || (u += 1, o.index === s)) break;
|
|
1583
|
+
}
|
|
1584
|
+
return u >= e;
|
|
1585
|
+
})));
|
|
1586
|
+
}, tr = (r, e) => C(r, 0, 1), f = (r, e) => C(r, 0, 1 / 0), x = (r, e) => {
|
|
1587
|
+
let n = r.map(v);
|
|
1588
|
+
return g(_(M((a) => {
|
|
1589
|
+
for (let t = 0, o = n.length; t < o; t++) if (!n[t](a)) return !1;
|
|
1590
|
+
return !0;
|
|
1591
|
+
})));
|
|
1592
|
+
}, l = (r, e) => {
|
|
1593
|
+
let n = r.map(v);
|
|
1594
|
+
return g(_((a) => {
|
|
1595
|
+
for (let t = 0, o = n.length; t < o; t++) if (n[t](a)) return !0;
|
|
1596
|
+
return !1;
|
|
1597
|
+
}));
|
|
1598
|
+
}, M = (r, e = !1) => {
|
|
1599
|
+
let n = v(r);
|
|
1600
|
+
return (a) => {
|
|
1601
|
+
let t = a.index, o = a.output.length, u = n(a);
|
|
1602
|
+
return (!u || e) && (a.index = t, a.output.length !== o && (a.output.length = o)), u;
|
|
1603
|
+
};
|
|
1604
|
+
}, _ = (r, e) => v(r), g = /* @__PURE__ */ (() => {
|
|
1605
|
+
let r = 0;
|
|
1606
|
+
return (e) => {
|
|
1607
|
+
let n = v(e), a = r += 1;
|
|
1608
|
+
return (t) => {
|
|
1609
|
+
var o;
|
|
1610
|
+
if (t.options.memoization === !1) return n(t);
|
|
1611
|
+
let u = t.index, s = (o = t.cache)[a] || (o[a] = /* @__PURE__ */ new Map()), c = s.get(u);
|
|
1612
|
+
if (c === !1) return !1;
|
|
1613
|
+
if (W(c)) return t.index = c, !0;
|
|
1614
|
+
if (c) return t.index = c.index, c.output?.length && t.output.push(...c.output), !0;
|
|
1615
|
+
{
|
|
1616
|
+
let Z = t.output.length;
|
|
1617
|
+
if (n(t)) {
|
|
1618
|
+
let D = t.index, U = t.output.length;
|
|
1619
|
+
if (U > Z) {
|
|
1620
|
+
let ee = t.output.slice(Z, U);
|
|
1621
|
+
s.set(u, { index: D, output: ee });
|
|
1622
|
+
} else s.set(u, D);
|
|
1623
|
+
return !0;
|
|
1624
|
+
} else return s.set(u, !1), !1;
|
|
1625
|
+
}
|
|
1626
|
+
};
|
|
1627
|
+
};
|
|
1628
|
+
})(), E = (r) => {
|
|
1629
|
+
let e;
|
|
1630
|
+
return (n) => (e || (e = v(r())), e(n));
|
|
1631
|
+
}, v = Y((r) => {
|
|
1632
|
+
if (d(r)) return Q(r) ? E(r) : r;
|
|
1633
|
+
if (b(r) || X(r)) return i(r);
|
|
1634
|
+
if (A(r)) return x(r);
|
|
1635
|
+
if (K(r)) return l(Object.values(r));
|
|
1636
|
+
throw new Error("Invalid rule");
|
|
1637
|
+
}), P = "abcdefghijklmnopqrstuvwxyz", ir = (r) => {
|
|
1638
|
+
let e = "";
|
|
1639
|
+
for (; r > 0; ) {
|
|
1640
|
+
let n = (r - 1) % 26;
|
|
1641
|
+
e = P[n] + e, r = Math.floor((r - 1) / 26);
|
|
1642
|
+
}
|
|
1643
|
+
return e;
|
|
1644
|
+
}, O = (r) => {
|
|
1645
|
+
let e = 0;
|
|
1646
|
+
for (let n = 0, a = r.length; n < a; n++) e = e * 26 + P.indexOf(r[n]) + 1;
|
|
1647
|
+
return e;
|
|
1648
|
+
}, S = (r, e) => {
|
|
1649
|
+
if (e < r) return S(e, r);
|
|
1650
|
+
let n = [];
|
|
1651
|
+
for (; r <= e; ) n.push(r++);
|
|
1652
|
+
return n;
|
|
1653
|
+
}, or = (r, e, n) => S(r, e).map((a) => String(a).padStart(n, "0")), R = (r, e) => S(O(r), O(e)).map(ir), p = (r) => r, z = (r) => ur((e) => rr(e, r, { memoization: !1 }).join("")), ur = (r) => {
|
|
1654
|
+
let e = {};
|
|
1655
|
+
return (n) => e[n] ?? (e[n] = r(n));
|
|
1656
|
+
}, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p), hr = i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), dr = i(/^(!!)+/, ""), fr = l([hr, dr]), xr = i(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i(/\/(\*\*)$/, "(?:/.*|$)"), _r = i(/\*\*/, ".*"), j = l([xr, gr, mr, _r]), Sr = i(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i(/\*/, "[^/]*"), N = l([Sr, yr]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Cr = i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`), Mr = i(/[^\]]/, p), Er = l([y, Cr, br, Mr]), B = x([$r, tr(Ar), f(Er), wr]), Pr = i("{", "(?:"), Or = i("}", ")"), Rr = i(/(\d+)\.\.(\d+)/, (r, e, n) => or(+e, +n, Math.min(e.length, n.length)).join("|")), zr = i(/([a-z]+)\.\.([a-z]+)/, (r, e, n) => R(e, n).join("|")), jr = i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n) => R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase()), Nr = l([Rr, zr, jr]), I = x([Pr, Nr, Or]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), Zr = E(() => F), Dr = l([j, N, k, B, I, Zr, y, Fr, Ir, Lr]), F = x([kr, f(Dr), Br]), Ur = f(l([sr, cr, lr, fr, j, N, k, B, I, F, y, pr, vr])), Vr = Ur, Gr = z(Vr), L = Gr, Tr = i(/\\./, p), qr = i(/./, p), Hr = i(/\*\*\*+/, "*"), Jr = i(/([^/{[(!])\*\*/, (r, e) => `${e}*`), Qr = i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e) => `${e}*`), Wr = f(l([Tr, Hr, Jr, Qr, qr])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r, e) => {
|
|
1657
|
+
let n = Array.isArray(r) ? r : [r];
|
|
1658
|
+
if (!n.length) return !1;
|
|
1659
|
+
let a = n.map($.compile), t = n.every((s) => /(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t ? "/" : "");
|
|
1660
|
+
return a.some((s) => s.test(o));
|
|
1661
|
+
};
|
|
1662
|
+
$.compile = (r) => new RegExp(`^${L(Yr(r))}$`, "s");
|
|
1663
|
+
var re = $;
|
|
1664
|
+
return J(w);
|
|
1665
|
+
})();
|
|
1666
|
+
return __lib__.default || __lib__;
|
|
1667
|
+
}, _match, zeptomatch = (path, pattern) => (_match || (_match = _lazyMatch(), _lazyMatch = null), _match(path, pattern)), _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
1668
|
+
function normalizeWindowsPath(input = "") {
|
|
1669
|
+
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
1670
|
+
}
|
|
1671
|
+
var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/, _EXTNAME_RE = /.(\.[^./]+|\.)$/, _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/, sep = "/", normalize = function(path) {
|
|
1672
|
+
if (path.length === 0)
|
|
1673
|
+
return ".";
|
|
1674
|
+
path = normalizeWindowsPath(path);
|
|
1675
|
+
let isUNCPath = path.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path), trailingSeparator = path[path.length - 1] === "/";
|
|
1676
|
+
return path = normalizeString(path, !isPathAbsolute), path.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path += "/"), _DRIVE_LETTER_RE.test(path) && (path += "/"), isUNCPath ? isPathAbsolute ? `//${path}` : `//./${path}` : isPathAbsolute && !isAbsolute(path) ? `/${path}` : path);
|
|
1677
|
+
}, join = function(...segments) {
|
|
1678
|
+
let path = "";
|
|
1679
|
+
for (let seg of segments)
|
|
1680
|
+
if (seg)
|
|
1681
|
+
if (path.length > 0) {
|
|
1682
|
+
let pathTrailing = path[path.length - 1] === "/", segLeading = seg[0] === "/";
|
|
1683
|
+
pathTrailing && segLeading ? path += seg.slice(1) : path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
1684
|
+
} else
|
|
1685
|
+
path += seg;
|
|
1686
|
+
return normalize(path);
|
|
1687
|
+
};
|
|
1688
|
+
function cwd() {
|
|
1689
|
+
return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
|
|
1690
|
+
}
|
|
1691
|
+
var resolve = function(...arguments_) {
|
|
1692
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
1693
|
+
let resolvedPath = "", resolvedAbsolute = !1;
|
|
1694
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
1695
|
+
let path = index >= 0 ? arguments_[index] : cwd();
|
|
1696
|
+
!path || path.length === 0 || (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path));
|
|
1697
|
+
}
|
|
1698
|
+
return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
|
|
1699
|
+
};
|
|
1700
|
+
function normalizeString(path, allowAboveRoot) {
|
|
1701
|
+
let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
|
|
1702
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
1703
|
+
if (index < path.length)
|
|
1704
|
+
char = path[index];
|
|
1705
|
+
else {
|
|
1706
|
+
if (char === "/")
|
|
1707
|
+
break;
|
|
1708
|
+
char = "/";
|
|
1709
|
+
}
|
|
1710
|
+
if (char === "/") {
|
|
1711
|
+
if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
|
|
1712
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
1713
|
+
if (res.length > 2) {
|
|
1714
|
+
let lastSlashIndex = res.lastIndexOf("/");
|
|
1715
|
+
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
|
|
1716
|
+
continue;
|
|
1717
|
+
} else if (res.length > 0) {
|
|
1718
|
+
res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
|
|
1719
|
+
continue;
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
|
|
1723
|
+
} else
|
|
1724
|
+
res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
|
|
1725
|
+
lastSlash = index, dots = 0;
|
|
1726
|
+
} else char === "." && dots !== -1 ? ++dots : dots = -1;
|
|
1727
|
+
}
|
|
1728
|
+
return res;
|
|
1729
|
+
}
|
|
1730
|
+
var isAbsolute = function(p) {
|
|
1731
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
1732
|
+
}, toNamespacedPath = function(p) {
|
|
1733
|
+
return normalizeWindowsPath(p);
|
|
1734
|
+
}, extname = function(p) {
|
|
1735
|
+
if (p === "..") return "";
|
|
1736
|
+
let match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
1737
|
+
return match && match[1] || "";
|
|
1738
|
+
}, relative = function(from, to) {
|
|
1739
|
+
let _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/"), _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
1740
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0])
|
|
1741
|
+
return _to.join("/");
|
|
1742
|
+
let _fromCopy = [..._from];
|
|
1743
|
+
for (let segment of _fromCopy) {
|
|
1744
|
+
if (_to[0] !== segment)
|
|
1745
|
+
break;
|
|
1746
|
+
_from.shift(), _to.shift();
|
|
1747
|
+
}
|
|
1748
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
1749
|
+
}, dirname = function(p) {
|
|
1750
|
+
let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
1751
|
+
return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
1752
|
+
}, format = function(p) {
|
|
1753
|
+
let ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "", segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
|
|
1754
|
+
Boolean
|
|
1755
|
+
);
|
|
1756
|
+
return normalizeWindowsPath(
|
|
1757
|
+
p.root ? resolve(...segments) : segments.join("/")
|
|
1758
|
+
);
|
|
1759
|
+
}, basename = function(p, extension) {
|
|
1760
|
+
let segments = normalizeWindowsPath(p).split("/"), lastSegment = "";
|
|
1761
|
+
for (let i = segments.length - 1; i >= 0; i--) {
|
|
1762
|
+
let val = segments[i];
|
|
1763
|
+
if (val) {
|
|
1764
|
+
lastSegment = val;
|
|
1765
|
+
break;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
1769
|
+
}, parse = function(p) {
|
|
1770
|
+
let root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "", base = basename(p), extension = extname(base);
|
|
1771
|
+
return {
|
|
1772
|
+
root,
|
|
1773
|
+
dir: dirname(p),
|
|
1774
|
+
base,
|
|
1775
|
+
ext: extension,
|
|
1776
|
+
name: base.slice(0, base.length - extension.length)
|
|
1777
|
+
};
|
|
1778
|
+
}, matchesGlob = (path, pattern) => zeptomatch(pattern, normalize(path)), _path = {
|
|
1779
|
+
__proto__: null,
|
|
1780
|
+
basename,
|
|
1781
|
+
dirname,
|
|
1782
|
+
extname,
|
|
1783
|
+
format,
|
|
1784
|
+
isAbsolute,
|
|
1785
|
+
join,
|
|
1786
|
+
matchesGlob,
|
|
1787
|
+
normalize,
|
|
1788
|
+
normalizeString,
|
|
1789
|
+
parse,
|
|
1790
|
+
relative,
|
|
1791
|
+
resolve,
|
|
1792
|
+
sep,
|
|
1793
|
+
toNamespacedPath
|
|
1794
|
+
};
|
|
1795
|
+
|
|
1796
|
+
// ../../../node_modules/pathe/dist/index.mjs
|
|
1797
|
+
var delimiter = globalThis.process?.platform === "win32" ? ";" : ":", _platforms = { posix: void 0, win32: void 0 }, mix = (del = delimiter) => new Proxy(_path, {
|
|
1798
|
+
get(_, prop) {
|
|
1799
|
+
return prop === "delimiter" ? del : prop === "posix" ? posix : prop === "win32" ? win32 : _platforms[prop] || _path[prop];
|
|
1800
|
+
}
|
|
1801
|
+
}), posix = /* @__PURE__ */ mix(":"), win32 = /* @__PURE__ */ mix(";");
|
|
1802
|
+
|
|
1513
1803
|
// src/componentManifest/utils.ts
|
|
1514
1804
|
import { readFileSync, statSync as statSync2 } from "node:fs";
|
|
1515
1805
|
import {
|
|
@@ -1519,22 +1809,22 @@ import {
|
|
|
1519
1809
|
import { logger } from "storybook/internal/node-logger";
|
|
1520
1810
|
|
|
1521
1811
|
// ../../../node_modules/empathic/find.mjs
|
|
1522
|
-
import { join as
|
|
1812
|
+
import { join as join3 } from "node:path";
|
|
1523
1813
|
import { existsSync, statSync } from "node:fs";
|
|
1524
1814
|
|
|
1525
1815
|
// ../../../node_modules/empathic/walk.mjs
|
|
1526
|
-
import { dirname } from "node:path";
|
|
1816
|
+
import { dirname as dirname2 } from "node:path";
|
|
1527
1817
|
|
|
1528
1818
|
// ../../../node_modules/empathic/resolve.mjs
|
|
1529
|
-
import { isAbsolute, join, resolve } from "node:path";
|
|
1819
|
+
import { isAbsolute as isAbsolute2, join as join2, resolve as resolve2 } from "node:path";
|
|
1530
1820
|
function absolute(input, root) {
|
|
1531
|
-
return
|
|
1821
|
+
return isAbsolute2(input) ? input : resolve2(root || ".", input);
|
|
1532
1822
|
}
|
|
1533
1823
|
|
|
1534
1824
|
// ../../../node_modules/empathic/walk.mjs
|
|
1535
1825
|
function up(base, options) {
|
|
1536
|
-
let { last, cwd } = options || {}, tmp = absolute(base,
|
|
1537
|
-
for (; prev !== root && (arr.push(tmp), tmp =
|
|
1826
|
+
let { last, cwd: cwd2 } = options || {}, tmp = absolute(base, cwd2), root = absolute(last || "/", cwd2), prev, arr = [];
|
|
1827
|
+
for (; prev !== root && (arr.push(tmp), tmp = dirname2(prev = tmp), tmp !== prev); )
|
|
1538
1828
|
;
|
|
1539
1829
|
return arr;
|
|
1540
1830
|
}
|
|
@@ -1543,7 +1833,7 @@ function up(base, options) {
|
|
|
1543
1833
|
function up2(name, options) {
|
|
1544
1834
|
let dir, tmp, start = options && options.cwd || "";
|
|
1545
1835
|
for (dir of up(start, options))
|
|
1546
|
-
if (tmp =
|
|
1836
|
+
if (tmp = join3(dir, name), existsSync(tmp)) return tmp;
|
|
1547
1837
|
}
|
|
1548
1838
|
|
|
1549
1839
|
// src/componentManifest/utils.ts
|
|
@@ -1612,7 +1902,7 @@ var memoStore = /* @__PURE__ */ new WeakMap(), asyncMemoStore = /* @__PURE__ */
|
|
|
1612
1902
|
}, cachedFindUp = cached(up2, { name: "findUp" }), cachedResolveImport = cached(resolveImport, {
|
|
1613
1903
|
name: "resolveImport"
|
|
1614
1904
|
}), findTsconfigPath = cached(
|
|
1615
|
-
(
|
|
1905
|
+
(cwd2) => findTsconfigPathCommon(cwd2),
|
|
1616
1906
|
{
|
|
1617
1907
|
name: "findTsconfigPath"
|
|
1618
1908
|
}
|
|
@@ -1648,6 +1938,10 @@ function getImportTag(docgen) {
|
|
|
1648
1938
|
}
|
|
1649
1939
|
|
|
1650
1940
|
export {
|
|
1941
|
+
join,
|
|
1942
|
+
isAbsolute,
|
|
1943
|
+
relative,
|
|
1944
|
+
posix,
|
|
1651
1945
|
groupByToMap,
|
|
1652
1946
|
invariant,
|
|
1653
1947
|
cached,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRequire as
|
|
1
|
+
import { createRequire as CJS_COMPAT_CREATE_REQUIRE_nvv6a8j4fqg } from "node:module";var require = CJS_COMPAT_CREATE_REQUIRE_nvv6a8j4fqg(import.meta.url);
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
cached,
|
|
3
3
|
cachedReadFileSync,
|
|
4
4
|
cachedResolveImport,
|
|
5
|
-
matchPath
|
|
6
|
-
|
|
5
|
+
matchPath,
|
|
6
|
+
relative
|
|
7
|
+
} from "./chunk-M3SEC5XW.js";
|
|
7
8
|
import {
|
|
8
9
|
require_dist
|
|
9
10
|
} from "./chunk-QKPKKS4R.js";
|
|
@@ -1032,12 +1033,12 @@ var require_resolve = __commonJS({
|
|
|
1032
1033
|
});
|
|
1033
1034
|
|
|
1034
1035
|
// src/componentManifest/reactDocgen.ts
|
|
1035
|
-
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
1036
1036
|
import { existsSync } from "node:fs";
|
|
1037
1037
|
import { dirname, sep } from "node:path";
|
|
1038
1038
|
import { supportedExtensions as supportedExtensions2 } from "storybook/internal/common";
|
|
1039
1039
|
import { parseModule } from "storybook/internal/csf-tools";
|
|
1040
1040
|
import { logger } from "storybook/internal/node-logger";
|
|
1041
|
+
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
1041
1042
|
import {
|
|
1042
1043
|
builtinHandlers as docgenHandlers,
|
|
1043
1044
|
builtinResolvers as docgenResolver,
|
|
@@ -1291,7 +1292,7 @@ var parseWithReactDocgen = cached(
|
|
|
1291
1292
|
path,
|
|
1292
1293
|
code: "/* File not found or unreadable */",
|
|
1293
1294
|
name: "Component file could not be read",
|
|
1294
|
-
message: `Could not read the component file located at "${path}".
|
|
1295
|
+
message: `Could not read the component file located at "${relative(process.cwd(), path)}".
|
|
1295
1296
|
Prefer relative imports if possible.`
|
|
1296
1297
|
}
|
|
1297
1298
|
]
|
|
@@ -1321,7 +1322,10 @@ Prefer relative imports if possible.`
|
|
|
1321
1322
|
errors
|
|
1322
1323
|
};
|
|
1323
1324
|
} catch (e) {
|
|
1324
|
-
let message = e instanceof Error ? e.message : String(e)
|
|
1325
|
+
let message = (e instanceof Error ? e.message : String(e)).replaceAll(
|
|
1326
|
+
path,
|
|
1327
|
+
relative(process.cwd(), path)
|
|
1328
|
+
);
|
|
1325
1329
|
return {
|
|
1326
1330
|
docgens,
|
|
1327
1331
|
errors: [
|
|
@@ -1347,7 +1351,7 @@ Prefer relative imports if possible.`
|
|
|
1347
1351
|
name: errors.at(-1)?.name ?? "No component definition found",
|
|
1348
1352
|
message: errors.map(
|
|
1349
1353
|
(e) => import_ts_dedent.dedent`
|
|
1350
|
-
File: ${e.path}
|
|
1354
|
+
File: ${relative(process.cwd(), e.path)}
|
|
1351
1355
|
Error:
|
|
1352
1356
|
${e.message}
|
|
1353
1357
|
Code:
|