@storybook/addon-docs 10.1.0-alpha.1 → 10.1.0-alpha.11
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/Color-S5NAVK5F.js +1096 -0
- package/dist/_browser-chunks/{DocsRenderer-HT7GNKAR.js → DocsRenderer-GHJI37HO.js} +2 -2
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-CYSK6WYR.js +7 -0
- package/dist/_browser-chunks/chunk-DDRHE7EB.js +949 -0
- package/dist/_browser-chunks/{chunk-74ZUTOZN.js → chunk-OATZR77O.js} +9 -22
- package/dist/_browser-chunks/chunk-UUESKCKV.js +31 -0
- package/dist/_node-chunks/chunk-CRYBIEDD.js +168 -0
- package/dist/_node-chunks/{chunk-ZUONB4NC.js → chunk-ETYU6ZWB.js} +13 -19
- package/dist/_node-chunks/chunk-PF5AWRIF.js +22630 -0
- package/dist/_node-chunks/chunk-ZRMSQWBE.js +196 -0
- package/dist/_node-chunks/mdx-plugin-655B5P4B.js +1032 -0
- package/dist/_node-chunks/rehype-external-links-V53KQFON.js +121 -0
- package/dist/_node-chunks/{rehype-slug-BU5JP743.js → rehype-slug-GNVPIIPH.js} +24 -58
- package/dist/angular/index.js +3 -5
- package/dist/blocks.d.ts +5 -2
- package/dist/blocks.js +4660 -6643
- package/dist/ember/index.js +3 -5
- package/dist/index.d.ts +8 -1
- package/dist/index.js +4 -6
- package/dist/manager.js +11 -22
- package/dist/mdx-loader.js +13 -19
- package/dist/preset.js +161 -454
- package/dist/preview.js +2 -2
- package/package.json +6 -6
- package/dist/_browser-chunks/Color-64QXVMR3.js +0 -1675
- package/dist/_browser-chunks/chunk-DMNQCVA2.js +0 -12
- package/dist/_browser-chunks/chunk-UZFOWTVP.js +0 -974
- package/dist/_browser-chunks/chunk-YDZYZRYC.js +0 -39
- package/dist/_node-chunks/chunk-AV2VT7UZ.js +0 -231
- package/dist/_node-chunks/chunk-SD2N3D7I.js +0 -36332
- package/dist/_node-chunks/chunk-Z4H2MKFK.js +0 -248
- package/dist/_node-chunks/mdx-plugin-2AVHNGP4.js +0 -1654
- package/dist/_node-chunks/rehype-external-links-4APV7Y23.js +0 -168
package/dist/preset.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_lch4wox9a5 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_lch4wox9a5 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_lch4wox9a5 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_lch4wox9a5.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_lch4wox9a5.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_lch4wox9a5.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import
|
|
13
|
-
__name
|
|
14
|
-
} from "./_node-chunks/chunk-ZUONB4NC.js";
|
|
12
|
+
import "./_node-chunks/chunk-ETYU6ZWB.js";
|
|
15
13
|
|
|
16
14
|
// src/preset.ts
|
|
17
15
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
@@ -25,459 +23,192 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
25
23
|
import assert from "node:assert";
|
|
26
24
|
import v8 from "node:v8";
|
|
27
25
|
import { format, inspect } from "node:util";
|
|
28
|
-
var own$1 = {}.hasOwnProperty
|
|
29
|
-
var classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
30
|
-
var kTypes = /* @__PURE__ */ new Set([
|
|
26
|
+
var own$1 = {}.hasOwnProperty, classRegExp = /^([A-Z][a-z\d]*)+$/, kTypes = /* @__PURE__ */ new Set([
|
|
31
27
|
"string",
|
|
32
28
|
"function",
|
|
33
29
|
"number",
|
|
34
30
|
"object",
|
|
35
|
-
// Accept 'Function' and 'Object' as alternative to the lower cased version.
|
|
36
31
|
"Function",
|
|
37
32
|
"Object",
|
|
38
33
|
"boolean",
|
|
39
34
|
"bigint",
|
|
40
35
|
"symbol"
|
|
41
|
-
]);
|
|
42
|
-
var messages = /* @__PURE__ */ new Map();
|
|
43
|
-
var nodeInternalPrefix = "__node_internal_";
|
|
44
|
-
var userStackTraceLimit;
|
|
36
|
+
]), messages = /* @__PURE__ */ new Map(), nodeInternalPrefix = "__node_internal_", userStackTraceLimit;
|
|
45
37
|
function formatList(array, type = "and") {
|
|
46
38
|
return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
|
|
47
39
|
}
|
|
48
|
-
__name(formatList, "formatList");
|
|
49
40
|
function createError(sym, value, constructor) {
|
|
50
|
-
messages.set(sym, value);
|
|
51
|
-
return makeNodeErrorWithCode(constructor, sym);
|
|
41
|
+
return messages.set(sym, value), makeNodeErrorWithCode(constructor, sym);
|
|
52
42
|
}
|
|
53
|
-
__name(createError, "createError");
|
|
54
43
|
function makeNodeErrorWithCode(Base, key) {
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Object.defineProperties(error, {
|
|
62
|
-
// Note: no need to implement `kIsNodeError` symbol, would be hard,
|
|
63
|
-
// probably.
|
|
44
|
+
return function(...parameters) {
|
|
45
|
+
let limit = Error.stackTraceLimit;
|
|
46
|
+
isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = 0);
|
|
47
|
+
let error = new Base();
|
|
48
|
+
isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = limit);
|
|
49
|
+
let message = getMessage(key, parameters, error);
|
|
50
|
+
return Object.defineProperties(error, {
|
|
64
51
|
message: {
|
|
65
52
|
value: message,
|
|
66
|
-
enumerable:
|
|
67
|
-
writable:
|
|
68
|
-
configurable:
|
|
53
|
+
enumerable: !1,
|
|
54
|
+
writable: !0,
|
|
55
|
+
configurable: !0
|
|
69
56
|
},
|
|
70
57
|
toString: {
|
|
71
|
-
/** @this {Error} */
|
|
72
58
|
value() {
|
|
73
59
|
return `${this.name} [${key}]: ${this.message}`;
|
|
74
60
|
},
|
|
75
|
-
enumerable:
|
|
76
|
-
writable:
|
|
77
|
-
configurable:
|
|
61
|
+
enumerable: !1,
|
|
62
|
+
writable: !0,
|
|
63
|
+
configurable: !0
|
|
78
64
|
}
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
error.code = key;
|
|
82
|
-
return error;
|
|
83
|
-
}, "NodeError");
|
|
65
|
+
}), captureLargerStackTrace(error), error.code = key, error;
|
|
66
|
+
};
|
|
84
67
|
}
|
|
85
|
-
__name(makeNodeErrorWithCode, "makeNodeErrorWithCode");
|
|
86
68
|
function isErrorStackTraceLimitWritable() {
|
|
87
69
|
try {
|
|
88
|
-
if (v8.startupSnapshot.isBuildingSnapshot())
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
70
|
+
if (v8.startupSnapshot.isBuildingSnapshot()) return !1;
|
|
91
71
|
} catch {
|
|
92
72
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return Object.isExtensible(Error);
|
|
96
|
-
}
|
|
97
|
-
return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
73
|
+
let desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
74
|
+
return desc === void 0 ? Object.isExtensible(Error) : own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
98
75
|
}
|
|
99
|
-
__name(isErrorStackTraceLimitWritable, "isErrorStackTraceLimitWritable");
|
|
100
76
|
function hideStackFrames(wrappedFunction) {
|
|
101
|
-
|
|
102
|
-
Object.defineProperty(wrappedFunction, "name", { value: hidden });
|
|
103
|
-
return wrappedFunction;
|
|
77
|
+
let hidden = nodeInternalPrefix + wrappedFunction.name;
|
|
78
|
+
return Object.defineProperty(wrappedFunction, "name", { value: hidden }), wrappedFunction;
|
|
104
79
|
}
|
|
105
|
-
__name(hideStackFrames, "hideStackFrames");
|
|
106
80
|
var captureLargerStackTrace = hideStackFrames(function(error) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
userStackTraceLimit = Error.stackTraceLimit;
|
|
110
|
-
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
111
|
-
}
|
|
112
|
-
Error.captureStackTrace(error);
|
|
113
|
-
if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
|
|
114
|
-
return error;
|
|
81
|
+
let stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
|
|
82
|
+
return stackTraceLimitIsWritable && (userStackTraceLimit = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(error), stackTraceLimitIsWritable && (Error.stackTraceLimit = userStackTraceLimit), error;
|
|
115
83
|
});
|
|
116
84
|
function getMessage(key, parameters, self) {
|
|
117
|
-
|
|
118
|
-
assert(message !== void 0, "expected `message` to be found")
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`
|
|
124
|
-
);
|
|
125
|
-
return Reflect.apply(message, self, parameters);
|
|
126
|
-
}
|
|
127
|
-
const regex = /%[dfijoOs]/g;
|
|
128
|
-
let expectedLength = 0;
|
|
129
|
-
while (regex.exec(message) !== null) expectedLength++;
|
|
130
|
-
assert(
|
|
131
|
-
expectedLength === parameters.length,
|
|
132
|
-
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`
|
|
133
|
-
);
|
|
134
|
-
if (parameters.length === 0) return message;
|
|
135
|
-
parameters.unshift(message);
|
|
136
|
-
return Reflect.apply(format, null, parameters);
|
|
85
|
+
let message = messages.get(key);
|
|
86
|
+
if (assert.ok(message !== void 0, "expected `message` to be found"), typeof message == "function")
|
|
87
|
+
return assert.ok(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`), Reflect.apply(message, self, parameters);
|
|
88
|
+
let regex = /%[dfijoOs]/g, expectedLength = 0;
|
|
89
|
+
for (; regex.exec(message) !== null; ) expectedLength++;
|
|
90
|
+
return assert.ok(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`), parameters.length === 0 ? message : (parameters.unshift(message), Reflect.apply(format, null, parameters));
|
|
137
91
|
}
|
|
138
|
-
__name(getMessage, "getMessage");
|
|
139
92
|
function determineSpecificType(value) {
|
|
140
|
-
if (value
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
93
|
+
if (value == null) return String(value);
|
|
94
|
+
if (typeof value == "function" && value.name) return `function ${value.name}`;
|
|
95
|
+
if (typeof value == "object")
|
|
96
|
+
return value.constructor && value.constructor.name ? `an instance of ${value.constructor.name}` : `${inspect(value, { depth: -1 })}`;
|
|
97
|
+
let inspected = inspect(value, { colors: !1 });
|
|
98
|
+
return inspected.length > 28 && (inspected = `${inspected.slice(0, 25)}...`), `type ${typeof value} (${inspected})`;
|
|
99
|
+
}
|
|
100
|
+
var ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
|
|
101
|
+
assert.ok(typeof name == "string", "'name' must be a string"), Array.isArray(expected) || (expected = [expected]);
|
|
102
|
+
let message = "The ";
|
|
103
|
+
if (name.endsWith(" argument")) message += `${name} `;
|
|
104
|
+
else {
|
|
105
|
+
let type = name.includes(".") ? "property" : "argument";
|
|
106
|
+
message += `"${name}" ${type} `;
|
|
151
107
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
108
|
+
message += "must be ";
|
|
109
|
+
let types = [], instances = [], other = [];
|
|
110
|
+
for (let value of expected)
|
|
111
|
+
assert.ok(typeof value == "string", "All expected entries have to be of type string"), kTypes.has(value) ? types.push(value.toLowerCase()) : classRegExp.exec(value) === null ? (assert.ok(value !== "object", 'The value "object" should be written as "Object"'), other.push(value)) : instances.push(value);
|
|
112
|
+
if (instances.length > 0) {
|
|
113
|
+
let pos = types.indexOf("object");
|
|
114
|
+
pos !== -1 && (types.slice(pos, 1), instances.push("Object"));
|
|
155
115
|
}
|
|
156
|
-
return
|
|
157
|
-
}
|
|
158
|
-
__name(determineSpecificType, "determineSpecificType");
|
|
159
|
-
createError(
|
|
160
|
-
"ERR_INVALID_ARG_TYPE",
|
|
161
|
-
(name, expected, actual) => {
|
|
162
|
-
assert(typeof name === "string", "'name' must be a string");
|
|
163
|
-
if (!Array.isArray(expected)) {
|
|
164
|
-
expected = [expected];
|
|
165
|
-
}
|
|
166
|
-
let message = "The ";
|
|
167
|
-
if (name.endsWith(" argument")) {
|
|
168
|
-
message += `${name} `;
|
|
169
|
-
} else {
|
|
170
|
-
const type = name.includes(".") ? "property" : "argument";
|
|
171
|
-
message += `"${name}" ${type} `;
|
|
172
|
-
}
|
|
173
|
-
message += "must be ";
|
|
174
|
-
const types = [];
|
|
175
|
-
const instances = [];
|
|
176
|
-
const other = [];
|
|
177
|
-
for (const value of expected) {
|
|
178
|
-
assert(
|
|
179
|
-
typeof value === "string",
|
|
180
|
-
"All expected entries have to be of type string"
|
|
181
|
-
);
|
|
182
|
-
if (kTypes.has(value)) {
|
|
183
|
-
types.push(value.toLowerCase());
|
|
184
|
-
} else if (classRegExp.exec(value) === null) {
|
|
185
|
-
assert(
|
|
186
|
-
value !== "object",
|
|
187
|
-
'The value "object" should be written as "Object"'
|
|
188
|
-
);
|
|
189
|
-
other.push(value);
|
|
190
|
-
} else {
|
|
191
|
-
instances.push(value);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
if (instances.length > 0) {
|
|
195
|
-
const pos = types.indexOf("object");
|
|
196
|
-
if (pos !== -1) {
|
|
197
|
-
types.slice(pos, 1);
|
|
198
|
-
instances.push("Object");
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
if (types.length > 0) {
|
|
202
|
-
message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(
|
|
203
|
-
types,
|
|
204
|
-
"or"
|
|
205
|
-
)}`;
|
|
206
|
-
if (instances.length > 0 || other.length > 0) message += " or ";
|
|
207
|
-
}
|
|
208
|
-
if (instances.length > 0) {
|
|
209
|
-
message += `an instance of ${formatList(instances, "or")}`;
|
|
210
|
-
if (other.length > 0) message += " or ";
|
|
211
|
-
}
|
|
212
|
-
if (other.length > 0) {
|
|
213
|
-
if (other.length > 1) {
|
|
214
|
-
message += `one of ${formatList(other, "or")}`;
|
|
215
|
-
} else {
|
|
216
|
-
if (other[0]?.toLowerCase() !== other[0]) message += "an ";
|
|
217
|
-
message += `${other[0]}`;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
message += `. Received ${determineSpecificType(actual)}`;
|
|
221
|
-
return message;
|
|
222
|
-
},
|
|
223
|
-
TypeError
|
|
224
|
-
);
|
|
225
|
-
var ERR_INVALID_MODULE_SPECIFIER = createError(
|
|
116
|
+
return types.length > 0 && (message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`, (instances.length > 0 || other.length > 0) && (message += " or ")), instances.length > 0 && (message += `an instance of ${formatList(instances, "or")}`, other.length > 0 && (message += " or ")), other.length > 0 && (other.length > 1 ? message += `one of ${formatList(other, "or")}` : (other[0]?.toLowerCase() !== other[0] && (message += "an "), message += `${other[0]}`)), message += `. Received ${determineSpecificType(actual)}`, message;
|
|
117
|
+
}, TypeError), ERR_INVALID_MODULE_SPECIFIER = createError(
|
|
226
118
|
"ERR_INVALID_MODULE_SPECIFIER",
|
|
227
119
|
/**
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
(request, reason, base) => {
|
|
233
|
-
return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
|
|
234
|
-
},
|
|
235
|
-
TypeError
|
|
236
|
-
);
|
|
237
|
-
var ERR_INVALID_PACKAGE_CONFIG = createError(
|
|
238
|
-
"ERR_INVALID_PACKAGE_CONFIG",
|
|
239
|
-
(path2, base, message) => {
|
|
240
|
-
return `Invalid package config ${path2}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
241
|
-
},
|
|
242
|
-
Error
|
|
243
|
-
);
|
|
244
|
-
var ERR_INVALID_PACKAGE_TARGET = createError(
|
|
245
|
-
"ERR_INVALID_PACKAGE_TARGET",
|
|
246
|
-
(packagePath, key, target, isImport = false, base) => {
|
|
247
|
-
const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
248
|
-
if (key === ".") {
|
|
249
|
-
assert(isImport === false);
|
|
250
|
-
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
251
|
-
}
|
|
252
|
-
return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(
|
|
253
|
-
target
|
|
254
|
-
)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
255
|
-
},
|
|
256
|
-
Error
|
|
257
|
-
);
|
|
258
|
-
var ERR_MODULE_NOT_FOUND = createError(
|
|
259
|
-
"ERR_MODULE_NOT_FOUND",
|
|
260
|
-
(path2, base, exactUrl = false) => {
|
|
261
|
-
return `Cannot find ${exactUrl ? "module" : "package"} '${path2}' imported from ${base}`;
|
|
262
|
-
},
|
|
263
|
-
Error
|
|
264
|
-
);
|
|
265
|
-
createError(
|
|
266
|
-
"ERR_NETWORK_IMPORT_DISALLOWED",
|
|
267
|
-
"import of '%s' by %s is not supported: %s",
|
|
268
|
-
Error
|
|
269
|
-
);
|
|
270
|
-
var ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(
|
|
271
|
-
"ERR_PACKAGE_IMPORT_NOT_DEFINED",
|
|
272
|
-
(specifier, packagePath, base) => {
|
|
273
|
-
return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`;
|
|
274
|
-
},
|
|
120
|
+
* @param {string} request
|
|
121
|
+
* @param {string} reason
|
|
122
|
+
* @param {string} [base]
|
|
123
|
+
*/
|
|
124
|
+
(request, reason, base) => `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`,
|
|
275
125
|
TypeError
|
|
276
|
-
)
|
|
277
|
-
|
|
126
|
+
), ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path$1, base, message) => `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`, Error), ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = !1, base) => {
|
|
127
|
+
let relatedError = typeof target == "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
128
|
+
return key === "." ? (assert.ok(isImport === !1), `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`) : `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
129
|
+
}, Error), ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path$1, base, exactUrl = !1) => `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`, Error), ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error), ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`, TypeError), ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
|
|
278
130
|
"ERR_PACKAGE_PATH_NOT_EXPORTED",
|
|
279
131
|
/**
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
(packagePath, subpath, base) => {
|
|
285
|
-
if (subpath === ".")
|
|
286
|
-
return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
287
|
-
return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
288
|
-
},
|
|
132
|
+
* @param {string} packagePath
|
|
133
|
+
* @param {string} subpath
|
|
134
|
+
* @param {string} [base]
|
|
135
|
+
*/
|
|
136
|
+
(packagePath, subpath, base) => subpath === "." ? `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}` : `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`,
|
|
289
137
|
Error
|
|
290
|
-
)
|
|
291
|
-
|
|
292
|
-
"
|
|
293
|
-
|
|
294
|
-
Error
|
|
295
|
-
);
|
|
296
|
-
var ERR_UNSUPPORTED_RESOLVE_REQUEST = createError(
|
|
297
|
-
"ERR_UNSUPPORTED_RESOLVE_REQUEST",
|
|
298
|
-
'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',
|
|
299
|
-
TypeError
|
|
300
|
-
);
|
|
301
|
-
var ERR_UNKNOWN_FILE_EXTENSION = createError(
|
|
302
|
-
"ERR_UNKNOWN_FILE_EXTENSION",
|
|
303
|
-
(extension, path2) => {
|
|
304
|
-
return `Unknown file extension "${extension}" for ${path2}`;
|
|
305
|
-
},
|
|
306
|
-
TypeError
|
|
307
|
-
);
|
|
308
|
-
createError(
|
|
309
|
-
"ERR_INVALID_ARG_VALUE",
|
|
310
|
-
(name, value, reason = "is invalid") => {
|
|
311
|
-
let inspected = inspect(value);
|
|
312
|
-
if (inspected.length > 128) {
|
|
313
|
-
inspected = `${inspected.slice(0, 128)}...`;
|
|
314
|
-
}
|
|
315
|
-
const type = name.includes(".") ? "property" : "argument";
|
|
316
|
-
return `The ${type} '${name}' ${reason}. Received ${inspected}`;
|
|
317
|
-
},
|
|
318
|
-
TypeError
|
|
319
|
-
// Note: extra classes have been shaken out.
|
|
320
|
-
// , RangeError
|
|
321
|
-
);
|
|
322
|
-
var hasOwnProperty$1 = {}.hasOwnProperty;
|
|
138
|
+
), ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error), ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', TypeError), ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1) => `Unknown file extension "${extension}" for ${path$1}`, TypeError), ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
|
|
139
|
+
let inspected = inspect(value);
|
|
140
|
+
return inspected.length > 128 && (inspected = `${inspected.slice(0, 128)}...`), `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
|
|
141
|
+
}, TypeError), hasOwnProperty$1 = {}.hasOwnProperty;
|
|
323
142
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
324
|
-
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
325
|
-
var
|
|
326
|
-
var isWindows = (() => process.platform === "win32")();
|
|
327
|
-
var globalCache = (() => (
|
|
328
|
-
// eslint-disable-next-line unicorn/no-unreadable-iife
|
|
329
|
-
globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map()
|
|
330
|
-
))();
|
|
143
|
+
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.hasOwnProperty;
|
|
144
|
+
var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
|
|
331
145
|
|
|
332
146
|
// ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
333
147
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
334
148
|
function normalizeWindowsPath(input = "") {
|
|
335
|
-
|
|
336
|
-
return input;
|
|
337
|
-
}
|
|
338
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
149
|
+
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
339
150
|
}
|
|
340
|
-
|
|
341
|
-
var
|
|
342
|
-
|
|
343
|
-
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
344
|
-
var normalize = /* @__PURE__ */ __name(function(path2) {
|
|
345
|
-
if (path2.length === 0) {
|
|
151
|
+
var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
152
|
+
var normalize = function(path2) {
|
|
153
|
+
if (path2.length === 0)
|
|
346
154
|
return ".";
|
|
347
|
-
}
|
|
348
155
|
path2 = normalizeWindowsPath(path2);
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
if (path2.length === 0) {
|
|
354
|
-
if (isPathAbsolute) {
|
|
355
|
-
return "/";
|
|
356
|
-
}
|
|
357
|
-
return trailingSeparator ? "./" : ".";
|
|
358
|
-
}
|
|
359
|
-
if (trailingSeparator) {
|
|
360
|
-
path2 += "/";
|
|
361
|
-
}
|
|
362
|
-
if (_DRIVE_LETTER_RE.test(path2)) {
|
|
363
|
-
path2 += "/";
|
|
364
|
-
}
|
|
365
|
-
if (isUNCPath) {
|
|
366
|
-
if (!isPathAbsolute) {
|
|
367
|
-
return `//./${path2}`;
|
|
368
|
-
}
|
|
369
|
-
return `//${path2}`;
|
|
370
|
-
}
|
|
371
|
-
return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
|
|
372
|
-
}, "normalize");
|
|
373
|
-
var join = /* @__PURE__ */ __name(function(...arguments_) {
|
|
374
|
-
if (arguments_.length === 0) {
|
|
156
|
+
let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
|
|
157
|
+
return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
|
|
158
|
+
}, join = function(...arguments_) {
|
|
159
|
+
if (arguments_.length === 0)
|
|
375
160
|
return ".";
|
|
376
|
-
}
|
|
377
161
|
let joined;
|
|
378
|
-
for (
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
} else {
|
|
383
|
-
joined += `/${argument}`;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
if (joined === void 0) {
|
|
388
|
-
return ".";
|
|
389
|
-
}
|
|
390
|
-
return normalize(joined.replace(/\/\/+/g, "/"));
|
|
391
|
-
}, "join");
|
|
162
|
+
for (let argument of arguments_)
|
|
163
|
+
argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
|
|
164
|
+
return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
|
|
165
|
+
};
|
|
392
166
|
function normalizeString(path2, allowAboveRoot) {
|
|
393
|
-
let res = "";
|
|
394
|
-
let lastSegmentLength = 0;
|
|
395
|
-
let lastSlash = -1;
|
|
396
|
-
let dots = 0;
|
|
397
|
-
let char = null;
|
|
167
|
+
let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
|
|
398
168
|
for (let index = 0; index <= path2.length; ++index) {
|
|
399
|
-
if (index < path2.length)
|
|
169
|
+
if (index < path2.length)
|
|
400
170
|
char = path2[index];
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
171
|
+
else {
|
|
172
|
+
if (char === "/")
|
|
173
|
+
break;
|
|
404
174
|
char = "/";
|
|
405
175
|
}
|
|
406
176
|
if (char === "/") {
|
|
407
|
-
if (lastSlash === index - 1 || dots === 1)
|
|
408
|
-
else if (dots === 2) {
|
|
177
|
+
if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
|
|
409
178
|
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
410
179
|
if (res.length > 2) {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
res = "";
|
|
414
|
-
lastSegmentLength = 0;
|
|
415
|
-
} else {
|
|
416
|
-
res = res.slice(0, lastSlashIndex);
|
|
417
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
418
|
-
}
|
|
419
|
-
lastSlash = index;
|
|
420
|
-
dots = 0;
|
|
180
|
+
let lastSlashIndex = res.lastIndexOf("/");
|
|
181
|
+
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
|
|
421
182
|
continue;
|
|
422
183
|
} else if (res.length > 0) {
|
|
423
|
-
res = "";
|
|
424
|
-
lastSegmentLength = 0;
|
|
425
|
-
lastSlash = index;
|
|
426
|
-
dots = 0;
|
|
184
|
+
res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
|
|
427
185
|
continue;
|
|
428
186
|
}
|
|
429
187
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
if (res.length > 0) {
|
|
436
|
-
res += `/${path2.slice(lastSlash + 1, index)}`;
|
|
437
|
-
} else {
|
|
438
|
-
res = path2.slice(lastSlash + 1, index);
|
|
439
|
-
}
|
|
440
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
441
|
-
}
|
|
442
|
-
lastSlash = index;
|
|
443
|
-
dots = 0;
|
|
444
|
-
} else if (char === "." && dots !== -1) {
|
|
445
|
-
++dots;
|
|
446
|
-
} else {
|
|
447
|
-
dots = -1;
|
|
448
|
-
}
|
|
188
|
+
allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
|
|
189
|
+
} else
|
|
190
|
+
res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
|
|
191
|
+
lastSlash = index, dots = 0;
|
|
192
|
+
} else char === "." && dots !== -1 ? ++dots : dots = -1;
|
|
449
193
|
}
|
|
450
194
|
return res;
|
|
451
195
|
}
|
|
452
|
-
|
|
453
|
-
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
196
|
+
var isAbsolute = function(p) {
|
|
454
197
|
return _IS_ABSOLUTE_RE.test(p);
|
|
455
|
-
}
|
|
456
|
-
var dirname =
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
462
|
-
}, "dirname");
|
|
198
|
+
};
|
|
199
|
+
var dirname = function(p) {
|
|
200
|
+
let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
201
|
+
return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
202
|
+
};
|
|
463
203
|
|
|
464
204
|
// ../../core/src/shared/utils/module.ts
|
|
465
|
-
var importMetaResolve =
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
"importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
|
|
469
|
-
);
|
|
470
|
-
return pathToFileURL(args[0]).href;
|
|
471
|
-
}
|
|
472
|
-
return import.meta.resolve(...args);
|
|
473
|
-
}, "importMetaResolve");
|
|
474
|
-
var resolvePackageDir = /* @__PURE__ */ __name((pkg, parent) => {
|
|
475
|
-
return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
|
|
476
|
-
}, "resolvePackageDir");
|
|
205
|
+
var importMetaResolve = (...args) => typeof import.meta.resolve != "function" && process.env.VITEST === "true" ? (console.warn(
|
|
206
|
+
"importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
|
|
207
|
+
), pathToFileURL(args[0]).href) : import.meta.resolve(...args), resolvePackageDir = (pkg, parent) => dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
|
|
477
208
|
|
|
478
209
|
// src/preset.ts
|
|
479
|
-
var getResolvedReact =
|
|
480
|
-
|
|
210
|
+
var getResolvedReact = async (options) => {
|
|
211
|
+
let resolvedReact2 = await options.presets.apply("resolvedReact", {});
|
|
481
212
|
return {
|
|
482
213
|
react: resolvedReact2.react ?? resolvePackageDir("react"),
|
|
483
214
|
reactDom: resolvedReact2.reactDom ?? resolvePackageDir("react-dom"),
|
|
@@ -488,13 +219,9 @@ var getResolvedReact = /* @__PURE__ */ __name(async (options) => {
|
|
|
488
219
|
// Explicitly alias @mdx-js/react to avoid this issue.
|
|
489
220
|
mdx: resolvedReact2.mdx ?? fileURLToPath2(import.meta.resolve("@mdx-js/react"))
|
|
490
221
|
};
|
|
491
|
-
}
|
|
222
|
+
};
|
|
492
223
|
async function webpack(webpackConfig = {}, options) {
|
|
493
|
-
|
|
494
|
-
const { csfPluginOptions = {}, mdxPluginOptions = {} } = options;
|
|
495
|
-
const rehypeSlug = (await import("./_node-chunks/rehype-slug-BU5JP743.js")).default;
|
|
496
|
-
const rehypeExternalLinks = (await import("./_node-chunks/rehype-external-links-4APV7Y23.js")).default;
|
|
497
|
-
const mdxLoaderOptions = await options.presets.apply("mdxLoaderOptions", {
|
|
224
|
+
let { module = {} } = webpackConfig, { csfPluginOptions = {}, mdxPluginOptions = {} } = options, enrichCsf = await options.presets.apply("experimental_enrichCsf"), rehypeSlug = (await import("./_node-chunks/rehype-slug-GNVPIIPH.js")).default, rehypeExternalLinks = (await import("./_node-chunks/rehype-external-links-V53KQFON.js")).default, mdxLoaderOptions = await options.presets.apply("mdxLoaderOptions", {
|
|
498
225
|
...mdxPluginOptions,
|
|
499
226
|
mdxCompileOptions: {
|
|
500
227
|
providerImportSource: import.meta.resolve("@storybook/addon-docs/mdx-react-shim"),
|
|
@@ -506,38 +233,36 @@ async function webpack(webpackConfig = {}, options) {
|
|
|
506
233
|
]
|
|
507
234
|
}
|
|
508
235
|
});
|
|
509
|
-
logger.info(
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
...webpackConfig.resolve?.alias,
|
|
531
|
-
react,
|
|
532
|
-
"react-dom": reactDom,
|
|
533
|
-
"@mdx-js/react": mdx
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
const result = {
|
|
236
|
+
logger.info("Addon-docs: using MDX3");
|
|
237
|
+
let { react, reactDom, mdx } = await getResolvedReact(options), alias;
|
|
238
|
+
return Array.isArray(webpackConfig.resolve?.alias) ? (alias = [...webpackConfig.resolve?.alias], alias.push(
|
|
239
|
+
{
|
|
240
|
+
name: "react",
|
|
241
|
+
alias: react
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: "react-dom",
|
|
245
|
+
alias: reactDom
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "@mdx-js/react",
|
|
249
|
+
alias: mdx
|
|
250
|
+
}
|
|
251
|
+
)) : alias = {
|
|
252
|
+
...webpackConfig.resolve?.alias,
|
|
253
|
+
react,
|
|
254
|
+
"react-dom": reactDom,
|
|
255
|
+
"@mdx-js/react": mdx
|
|
256
|
+
}, {
|
|
537
257
|
...webpackConfig,
|
|
538
258
|
plugins: [
|
|
539
259
|
...webpackConfig.plugins || [],
|
|
540
|
-
...csfPluginOptions ? [
|
|
260
|
+
...csfPluginOptions ? [
|
|
261
|
+
(await import("@storybook/csf-plugin")).webpack({
|
|
262
|
+
...csfPluginOptions,
|
|
263
|
+
enrichCsf
|
|
264
|
+
})
|
|
265
|
+
] : []
|
|
541
266
|
],
|
|
542
267
|
resolve: {
|
|
543
268
|
...webpackConfig.resolve,
|
|
@@ -560,34 +285,22 @@ async function webpack(webpackConfig = {}, options) {
|
|
|
560
285
|
]
|
|
561
286
|
}
|
|
562
287
|
};
|
|
563
|
-
return result;
|
|
564
288
|
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
}
|
|
570
|
-
const result = {
|
|
289
|
+
var docs = (input = {}, options) => {
|
|
290
|
+
if (options?.build?.test?.disableAutoDocs)
|
|
291
|
+
return;
|
|
292
|
+
let result = {
|
|
571
293
|
...input,
|
|
572
294
|
defaultName: "Docs"
|
|
573
|
-
};
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
result.docsMode = docsMode;
|
|
577
|
-
}
|
|
578
|
-
return result;
|
|
579
|
-
}, "docs");
|
|
580
|
-
var addons = [
|
|
295
|
+
}, docsMode = options.docs;
|
|
296
|
+
return docsMode && (result.docsMode = docsMode), result;
|
|
297
|
+
}, addons = [
|
|
581
298
|
import.meta.resolve("@storybook/react-dom-shim/preset")
|
|
582
|
-
]
|
|
583
|
-
|
|
584
|
-
const { plugins = [] } = config;
|
|
585
|
-
const { mdxPlugin } = await import("./_node-chunks/mdx-plugin-2AVHNGP4.js");
|
|
586
|
-
const { react, reactDom, mdx } = await getResolvedReact(options);
|
|
587
|
-
const packageDeduplicationPlugin = {
|
|
299
|
+
], viteFinal = async (config, options) => {
|
|
300
|
+
let { plugins = [] } = config, { mdxPlugin } = await import("./_node-chunks/mdx-plugin-655B5P4B.js"), { react, reactDom, mdx } = await getResolvedReact(options), packageDeduplicationPlugin = {
|
|
588
301
|
name: "storybook:package-deduplication",
|
|
589
302
|
enforce: "pre",
|
|
590
|
-
config:
|
|
303
|
+
config: () => ({
|
|
591
304
|
resolve: {
|
|
592
305
|
alias: {
|
|
593
306
|
react,
|
|
@@ -597,23 +310,17 @@ var viteFinal = /* @__PURE__ */ __name(async (config, options) => {
|
|
|
597
310
|
"@mdx-js/react": mdx
|
|
598
311
|
}
|
|
599
312
|
}
|
|
600
|
-
})
|
|
313
|
+
})
|
|
601
314
|
};
|
|
602
|
-
plugins.unshift(packageDeduplicationPlugin)
|
|
603
|
-
plugins.unshift(mdxPlugin(options));
|
|
604
|
-
return {
|
|
315
|
+
return plugins.unshift(packageDeduplicationPlugin), plugins.unshift(mdxPlugin(options)), {
|
|
605
316
|
...config,
|
|
606
317
|
plugins
|
|
607
318
|
};
|
|
608
|
-
},
|
|
609
|
-
var webpackX = webpack;
|
|
610
|
-
var docsX = docs;
|
|
611
|
-
var resolvedReact = /* @__PURE__ */ __name(async (existing) => ({
|
|
319
|
+
}, webpackX = webpack, docsX = docs, resolvedReact = async (existing) => ({
|
|
612
320
|
react: existing?.react ?? resolvePackageDir("react"),
|
|
613
321
|
reactDom: existing?.reactDom ?? resolvePackageDir("react-dom"),
|
|
614
322
|
mdx: existing?.mdx ?? fileURLToPath2(import.meta.resolve("@mdx-js/react"))
|
|
615
|
-
}),
|
|
616
|
-
var optimizeViteDeps = [
|
|
323
|
+
}), optimizeViteDeps = [
|
|
617
324
|
"@storybook/addon-docs",
|
|
618
325
|
"@storybook/addon-docs/blocks",
|
|
619
326
|
"@storybook/addon-docs > @mdx-js/react"
|