@storybook/react 10.4.0-alpha.7 → 10.4.0-alpha.9

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.
Files changed (2) hide show
  1. package/dist/preset.js +387 -236
  2. package/package.json +3 -3
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_jlc3z147d6d from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_jlc3z147d6d from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_jlc3z147d6d from "node:module";
1
+ import CJS_COMPAT_NODE_URL_t8s0z5e0wsd from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_t8s0z5e0wsd from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_t8s0z5e0wsd from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_jlc3z147d6d.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_jlc3z147d6d.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_jlc3z147d6d.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_t8s0z5e0wsd.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_t8s0z5e0wsd.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_t8s0z5e0wsd.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -6213,12 +6213,12 @@ var require_dist2 = __commonJS({
6213
6213
  "../../../node_modules/@base2/pretty-print-object/dist/index.js"(exports) {
6214
6214
  "use strict";
6215
6215
  var __assign = exports && exports.__assign || function() {
6216
- return __assign = Object.assign || function(t5) {
6216
+ return __assign = Object.assign || function(t6) {
6217
6217
  for (var s, i = 1, n = arguments.length; i < n; i++) {
6218
6218
  s = arguments[i];
6219
- for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t5[p] = s[p]);
6219
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t6[p] = s[p]);
6220
6220
  }
6221
- return t5;
6221
+ return t6;
6222
6222
  }, __assign.apply(this, arguments);
6223
6223
  }, __spreadArrays = exports && exports.__spreadArrays || function() {
6224
6224
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
@@ -6309,7 +6309,7 @@ var require_dist2 = __commonJS({
6309
6309
  var require_react_is_production_min = __commonJS({
6310
6310
  "../../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
6311
6311
  "use strict";
6312
- var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t5 = Symbol.for("react.offscreen"), u;
6312
+ var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t6 = Symbol.for("react.offscreen"), u;
6313
6313
  u = Symbol.for("react.module.reference");
6314
6314
  function v(a) {
6315
6315
  if (typeof a == "object" && a !== null) {
@@ -6396,7 +6396,7 @@ var require_react_is_production_min = __commonJS({
6396
6396
  return v(a) === n;
6397
6397
  };
6398
6398
  exports.isValidElementType = function(a) {
6399
- return typeof a == "string" || typeof a == "function" || a === d || a === f || a === e || a === m || a === n || a === t5 || typeof a == "object" && a !== null && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || a.getModuleId !== void 0);
6399
+ return typeof a == "string" || typeof a == "function" || a === d || a === f || a === e || a === m || a === n || a === t6 || typeof a == "object" && a !== null && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || a.getModuleId !== void 0);
6400
6400
  };
6401
6401
  exports.typeOf = v;
6402
6402
  }
@@ -7633,12 +7633,12 @@ var require_tsconfig_loader = __commonJS({
7633
7633
  "../../../node_modules/tsconfig-paths/lib/tsconfig-loader.js"(exports) {
7634
7634
  "use strict";
7635
7635
  var __assign = exports && exports.__assign || function() {
7636
- return __assign = Object.assign || function(t5) {
7636
+ return __assign = Object.assign || function(t6) {
7637
7637
  for (var s, i = 1, n = arguments.length; i < n; i++) {
7638
7638
  s = arguments[i];
7639
- for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t5[p] = s[p]);
7639
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t6[p] = s[p]);
7640
7640
  }
7641
- return t5;
7641
+ return t6;
7642
7642
  }, __assign.apply(this, arguments);
7643
7643
  };
7644
7644
  Object.defineProperty(exports, "__esModule", { value: !0 });
@@ -11149,22 +11149,22 @@ var require_createProject = __commonJS({
11149
11149
  // ../../../node_modules/vscode-uri/lib/umd/index.js
11150
11150
  var require_umd = __commonJS({
11151
11151
  "../../../node_modules/vscode-uri/lib/umd/index.js"(exports, module) {
11152
- (function(t5, e) {
11152
+ (function(t6, e) {
11153
11153
  if (typeof exports == "object" && typeof module == "object") module.exports = e();
11154
11154
  else if (typeof define == "function" && define.amd) define([], e);
11155
11155
  else {
11156
11156
  var r = e();
11157
- for (var n in r) (typeof exports == "object" ? exports : t5)[n] = r[n];
11157
+ for (var n in r) (typeof exports == "object" ? exports : t6)[n] = r[n];
11158
11158
  }
11159
11159
  })(exports, (() => (() => {
11160
11160
  "use strict";
11161
- var t5 = { 975: (t6) => {
11162
- function e2(t7) {
11163
- if (typeof t7 != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(t7));
11161
+ var t6 = { 975: (t7) => {
11162
+ function e2(t8) {
11163
+ if (typeof t8 != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(t8));
11164
11164
  }
11165
- function r2(t7, e3) {
11166
- for (var r3, n3 = "", i = 0, o = -1, s = 0, a = 0; a <= t7.length; ++a) {
11167
- if (a < t7.length) r3 = t7.charCodeAt(a);
11165
+ function r2(t8, e3) {
11166
+ for (var r3, n3 = "", i = 0, o = -1, s = 0, a = 0; a <= t8.length; ++a) {
11167
+ if (a < t8.length) r3 = t8.charCodeAt(a);
11168
11168
  else {
11169
11169
  if (r3 === 47) break;
11170
11170
  r3 = 47;
@@ -11184,70 +11184,70 @@ var require_umd = __commonJS({
11184
11184
  }
11185
11185
  }
11186
11186
  e3 && (n3.length > 0 ? n3 += "/.." : n3 = "..", i = 2);
11187
- } else n3.length > 0 ? n3 += "/" + t7.slice(o + 1, a) : n3 = t7.slice(o + 1, a), i = a - o - 1;
11187
+ } else n3.length > 0 ? n3 += "/" + t8.slice(o + 1, a) : n3 = t8.slice(o + 1, a), i = a - o - 1;
11188
11188
  o = a, s = 0;
11189
11189
  } else r3 === 46 && s !== -1 ? ++s : s = -1;
11190
11190
  }
11191
11191
  return n3;
11192
11192
  }
11193
11193
  var n2 = { resolve: function() {
11194
- for (var t7, n3 = "", i = !1, o = arguments.length - 1; o >= -1 && !i; o--) {
11194
+ for (var t8, n3 = "", i = !1, o = arguments.length - 1; o >= -1 && !i; o--) {
11195
11195
  var s;
11196
- o >= 0 ? s = arguments[o] : (t7 === void 0 && (t7 = process.cwd()), s = t7), e2(s), s.length !== 0 && (n3 = s + "/" + n3, i = s.charCodeAt(0) === 47);
11196
+ o >= 0 ? s = arguments[o] : (t8 === void 0 && (t8 = process.cwd()), s = t8), e2(s), s.length !== 0 && (n3 = s + "/" + n3, i = s.charCodeAt(0) === 47);
11197
11197
  }
11198
11198
  return n3 = r2(n3, !i), i ? n3.length > 0 ? "/" + n3 : "/" : n3.length > 0 ? n3 : ".";
11199
- }, normalize: function(t7) {
11200
- if (e2(t7), t7.length === 0) return ".";
11201
- var n3 = t7.charCodeAt(0) === 47, i = t7.charCodeAt(t7.length - 1) === 47;
11202
- return (t7 = r2(t7, !n3)).length !== 0 || n3 || (t7 = "."), t7.length > 0 && i && (t7 += "/"), n3 ? "/" + t7 : t7;
11203
- }, isAbsolute: function(t7) {
11204
- return e2(t7), t7.length > 0 && t7.charCodeAt(0) === 47;
11199
+ }, normalize: function(t8) {
11200
+ if (e2(t8), t8.length === 0) return ".";
11201
+ var n3 = t8.charCodeAt(0) === 47, i = t8.charCodeAt(t8.length - 1) === 47;
11202
+ return (t8 = r2(t8, !n3)).length !== 0 || n3 || (t8 = "."), t8.length > 0 && i && (t8 += "/"), n3 ? "/" + t8 : t8;
11203
+ }, isAbsolute: function(t8) {
11204
+ return e2(t8), t8.length > 0 && t8.charCodeAt(0) === 47;
11205
11205
  }, join: function() {
11206
11206
  if (arguments.length === 0) return ".";
11207
- for (var t7, r3 = 0; r3 < arguments.length; ++r3) {
11207
+ for (var t8, r3 = 0; r3 < arguments.length; ++r3) {
11208
11208
  var i = arguments[r3];
11209
- e2(i), i.length > 0 && (t7 === void 0 ? t7 = i : t7 += "/" + i);
11209
+ e2(i), i.length > 0 && (t8 === void 0 ? t8 = i : t8 += "/" + i);
11210
11210
  }
11211
- return t7 === void 0 ? "." : n2.normalize(t7);
11212
- }, relative: function(t7, r3) {
11213
- if (e2(t7), e2(r3), t7 === r3 || (t7 = n2.resolve(t7)) === (r3 = n2.resolve(r3))) return "";
11214
- for (var i = 1; i < t7.length && t7.charCodeAt(i) === 47; ++i) ;
11215
- for (var o = t7.length, s = o - i, a = 1; a < r3.length && r3.charCodeAt(a) === 47; ++a) ;
11211
+ return t8 === void 0 ? "." : n2.normalize(t8);
11212
+ }, relative: function(t8, r3) {
11213
+ if (e2(t8), e2(r3), t8 === r3 || (t8 = n2.resolve(t8)) === (r3 = n2.resolve(r3))) return "";
11214
+ for (var i = 1; i < t8.length && t8.charCodeAt(i) === 47; ++i) ;
11215
+ for (var o = t8.length, s = o - i, a = 1; a < r3.length && r3.charCodeAt(a) === 47; ++a) ;
11216
11216
  for (var h = r3.length - a, c = s < h ? s : h, f = -1, u = 0; u <= c; ++u) {
11217
11217
  if (u === c) {
11218
11218
  if (h > c) {
11219
11219
  if (r3.charCodeAt(a + u) === 47) return r3.slice(a + u + 1);
11220
11220
  if (u === 0) return r3.slice(a + u);
11221
- } else s > c && (t7.charCodeAt(i + u) === 47 ? f = u : u === 0 && (f = 0));
11221
+ } else s > c && (t8.charCodeAt(i + u) === 47 ? f = u : u === 0 && (f = 0));
11222
11222
  break;
11223
11223
  }
11224
- var l = t7.charCodeAt(i + u);
11224
+ var l = t8.charCodeAt(i + u);
11225
11225
  if (l !== r3.charCodeAt(a + u)) break;
11226
11226
  l === 47 && (f = u);
11227
11227
  }
11228
11228
  var d = "";
11229
- for (u = i + f + 1; u <= o; ++u) u !== o && t7.charCodeAt(u) !== 47 || (d.length === 0 ? d += ".." : d += "/..");
11229
+ for (u = i + f + 1; u <= o; ++u) u !== o && t8.charCodeAt(u) !== 47 || (d.length === 0 ? d += ".." : d += "/..");
11230
11230
  return d.length > 0 ? d + r3.slice(a + f) : (a += f, r3.charCodeAt(a) === 47 && ++a, r3.slice(a));
11231
- }, _makeLong: function(t7) {
11232
- return t7;
11233
- }, dirname: function(t7) {
11234
- if (e2(t7), t7.length === 0) return ".";
11235
- for (var r3 = t7.charCodeAt(0), n3 = r3 === 47, i = -1, o = !0, s = t7.length - 1; s >= 1; --s) if ((r3 = t7.charCodeAt(s)) === 47) {
11231
+ }, _makeLong: function(t8) {
11232
+ return t8;
11233
+ }, dirname: function(t8) {
11234
+ if (e2(t8), t8.length === 0) return ".";
11235
+ for (var r3 = t8.charCodeAt(0), n3 = r3 === 47, i = -1, o = !0, s = t8.length - 1; s >= 1; --s) if ((r3 = t8.charCodeAt(s)) === 47) {
11236
11236
  if (!o) {
11237
11237
  i = s;
11238
11238
  break;
11239
11239
  }
11240
11240
  } else o = !1;
11241
- return i === -1 ? n3 ? "/" : "." : n3 && i === 1 ? "//" : t7.slice(0, i);
11242
- }, basename: function(t7, r3) {
11241
+ return i === -1 ? n3 ? "/" : "." : n3 && i === 1 ? "//" : t8.slice(0, i);
11242
+ }, basename: function(t8, r3) {
11243
11243
  if (r3 !== void 0 && typeof r3 != "string") throw new TypeError('"ext" argument must be a string');
11244
- e2(t7);
11244
+ e2(t8);
11245
11245
  var n3, i = 0, o = -1, s = !0;
11246
- if (r3 !== void 0 && r3.length > 0 && r3.length <= t7.length) {
11247
- if (r3.length === t7.length && r3 === t7) return "";
11246
+ if (r3 !== void 0 && r3.length > 0 && r3.length <= t8.length) {
11247
+ if (r3.length === t8.length && r3 === t8) return "";
11248
11248
  var a = r3.length - 1, h = -1;
11249
- for (n3 = t7.length - 1; n3 >= 0; --n3) {
11250
- var c = t7.charCodeAt(n3);
11249
+ for (n3 = t8.length - 1; n3 >= 0; --n3) {
11250
+ var c = t8.charCodeAt(n3);
11251
11251
  if (c === 47) {
11252
11252
  if (!s) {
11253
11253
  i = n3 + 1;
@@ -11255,79 +11255,79 @@ var require_umd = __commonJS({
11255
11255
  }
11256
11256
  } else h === -1 && (s = !1, h = n3 + 1), a >= 0 && (c === r3.charCodeAt(a) ? --a == -1 && (o = n3) : (a = -1, o = h));
11257
11257
  }
11258
- return i === o ? o = h : o === -1 && (o = t7.length), t7.slice(i, o);
11258
+ return i === o ? o = h : o === -1 && (o = t8.length), t8.slice(i, o);
11259
11259
  }
11260
- for (n3 = t7.length - 1; n3 >= 0; --n3) if (t7.charCodeAt(n3) === 47) {
11260
+ for (n3 = t8.length - 1; n3 >= 0; --n3) if (t8.charCodeAt(n3) === 47) {
11261
11261
  if (!s) {
11262
11262
  i = n3 + 1;
11263
11263
  break;
11264
11264
  }
11265
11265
  } else o === -1 && (s = !1, o = n3 + 1);
11266
- return o === -1 ? "" : t7.slice(i, o);
11267
- }, extname: function(t7) {
11268
- e2(t7);
11269
- for (var r3 = -1, n3 = 0, i = -1, o = !0, s = 0, a = t7.length - 1; a >= 0; --a) {
11270
- var h = t7.charCodeAt(a);
11266
+ return o === -1 ? "" : t8.slice(i, o);
11267
+ }, extname: function(t8) {
11268
+ e2(t8);
11269
+ for (var r3 = -1, n3 = 0, i = -1, o = !0, s = 0, a = t8.length - 1; a >= 0; --a) {
11270
+ var h = t8.charCodeAt(a);
11271
11271
  if (h !== 47) i === -1 && (o = !1, i = a + 1), h === 46 ? r3 === -1 ? r3 = a : s !== 1 && (s = 1) : r3 !== -1 && (s = -1);
11272
11272
  else if (!o) {
11273
11273
  n3 = a + 1;
11274
11274
  break;
11275
11275
  }
11276
11276
  }
11277
- return r3 === -1 || i === -1 || s === 0 || s === 1 && r3 === i - 1 && r3 === n3 + 1 ? "" : t7.slice(r3, i);
11278
- }, format: function(t7) {
11279
- if (t7 === null || typeof t7 != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t7);
11280
- return (function(t8, e3) {
11277
+ return r3 === -1 || i === -1 || s === 0 || s === 1 && r3 === i - 1 && r3 === n3 + 1 ? "" : t8.slice(r3, i);
11278
+ }, format: function(t8) {
11279
+ if (t8 === null || typeof t8 != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t8);
11280
+ return (function(t9, e3) {
11281
11281
  var r3 = e3.dir || e3.root, n3 = e3.base || (e3.name || "") + (e3.ext || "");
11282
11282
  return r3 ? r3 === e3.root ? r3 + n3 : r3 + "/" + n3 : n3;
11283
- })(0, t7);
11284
- }, parse: function(t7) {
11285
- e2(t7);
11283
+ })(0, t8);
11284
+ }, parse: function(t8) {
11285
+ e2(t8);
11286
11286
  var r3 = { root: "", dir: "", base: "", ext: "", name: "" };
11287
- if (t7.length === 0) return r3;
11288
- var n3, i = t7.charCodeAt(0), o = i === 47;
11287
+ if (t8.length === 0) return r3;
11288
+ var n3, i = t8.charCodeAt(0), o = i === 47;
11289
11289
  o ? (r3.root = "/", n3 = 1) : n3 = 0;
11290
- for (var s = -1, a = 0, h = -1, c = !0, f = t7.length - 1, u = 0; f >= n3; --f) if ((i = t7.charCodeAt(f)) !== 47) h === -1 && (c = !1, h = f + 1), i === 46 ? s === -1 ? s = f : u !== 1 && (u = 1) : s !== -1 && (u = -1);
11290
+ for (var s = -1, a = 0, h = -1, c = !0, f = t8.length - 1, u = 0; f >= n3; --f) if ((i = t8.charCodeAt(f)) !== 47) h === -1 && (c = !1, h = f + 1), i === 46 ? s === -1 ? s = f : u !== 1 && (u = 1) : s !== -1 && (u = -1);
11291
11291
  else if (!c) {
11292
11292
  a = f + 1;
11293
11293
  break;
11294
11294
  }
11295
- return s === -1 || h === -1 || u === 0 || u === 1 && s === h - 1 && s === a + 1 ? h !== -1 && (r3.base = r3.name = a === 0 && o ? t7.slice(1, h) : t7.slice(a, h)) : (a === 0 && o ? (r3.name = t7.slice(1, s), r3.base = t7.slice(1, h)) : (r3.name = t7.slice(a, s), r3.base = t7.slice(a, h)), r3.ext = t7.slice(s, h)), a > 0 ? r3.dir = t7.slice(0, a - 1) : o && (r3.dir = "/"), r3;
11295
+ return s === -1 || h === -1 || u === 0 || u === 1 && s === h - 1 && s === a + 1 ? h !== -1 && (r3.base = r3.name = a === 0 && o ? t8.slice(1, h) : t8.slice(a, h)) : (a === 0 && o ? (r3.name = t8.slice(1, s), r3.base = t8.slice(1, h)) : (r3.name = t8.slice(a, s), r3.base = t8.slice(a, h)), r3.ext = t8.slice(s, h)), a > 0 ? r3.dir = t8.slice(0, a - 1) : o && (r3.dir = "/"), r3;
11296
11296
  }, sep: "/", delimiter: ":", win32: null, posix: null };
11297
- n2.posix = n2, t6.exports = n2;
11298
- }, 70: (t6, e2) => {
11297
+ n2.posix = n2, t7.exports = n2;
11298
+ }, 70: (t7, e2) => {
11299
11299
  if (Object.defineProperty(e2, "__esModule", { value: !0 }), e2.isWindows = void 0, typeof process == "object") e2.isWindows = process.platform === "win32";
11300
11300
  else if (typeof navigator == "object") {
11301
- let t7 = navigator.userAgent;
11302
- e2.isWindows = t7.indexOf("Windows") >= 0;
11301
+ let t8 = navigator.userAgent;
11302
+ e2.isWindows = t8.indexOf("Windows") >= 0;
11303
11303
  }
11304
- }, 231: (t6, e2, r2) => {
11304
+ }, 231: (t7, e2, r2) => {
11305
11305
  Object.defineProperty(e2, "__esModule", { value: !0 }), e2.uriToFsPath = e2.URI = void 0;
11306
11306
  let n2 = r2(70), i = /^\w[\w\d+.-]*$/, o = /^\//, s = /^\/\//;
11307
- function a(t7, e3) {
11308
- if (!t7.scheme && e3) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t7.authority}", path: "${t7.path}", query: "${t7.query}", fragment: "${t7.fragment}"}`);
11309
- if (t7.scheme && !i.test(t7.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
11310
- if (t7.path) {
11311
- if (t7.authority) {
11312
- if (!o.test(t7.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
11313
- } else if (s.test(t7.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
11307
+ function a(t8, e3) {
11308
+ if (!t8.scheme && e3) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t8.authority}", path: "${t8.path}", query: "${t8.query}", fragment: "${t8.fragment}"}`);
11309
+ if (t8.scheme && !i.test(t8.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
11310
+ if (t8.path) {
11311
+ if (t8.authority) {
11312
+ if (!o.test(t8.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
11313
+ } else if (s.test(t8.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
11314
11314
  }
11315
11315
  }
11316
11316
  let h = "", c = "/", f = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
11317
11317
  class u {
11318
- static isUri(t7) {
11319
- return t7 instanceof u || !!t7 && typeof t7.authority == "string" && typeof t7.fragment == "string" && typeof t7.path == "string" && typeof t7.query == "string" && typeof t7.scheme == "string" && typeof t7.fsPath == "string" && typeof t7.with == "function" && typeof t7.toString == "function";
11318
+ static isUri(t8) {
11319
+ return t8 instanceof u || !!t8 && typeof t8.authority == "string" && typeof t8.fragment == "string" && typeof t8.path == "string" && typeof t8.query == "string" && typeof t8.scheme == "string" && typeof t8.fsPath == "string" && typeof t8.with == "function" && typeof t8.toString == "function";
11320
11320
  }
11321
11321
  scheme;
11322
11322
  authority;
11323
11323
  path;
11324
11324
  query;
11325
11325
  fragment;
11326
- constructor(t7, e3, r3, n3, i2, o2 = !1) {
11327
- typeof t7 == "object" ? (this.scheme = t7.scheme || h, this.authority = t7.authority || h, this.path = t7.path || h, this.query = t7.query || h, this.fragment = t7.fragment || h) : (this.scheme = /* @__PURE__ */ (function(t8, e4) {
11328
- return t8 || e4 ? t8 : "file";
11329
- })(t7, o2), this.authority = e3 || h, this.path = (function(t8, e4) {
11330
- switch (t8) {
11326
+ constructor(t8, e3, r3, n3, i2, o2 = !1) {
11327
+ typeof t8 == "object" ? (this.scheme = t8.scheme || h, this.authority = t8.authority || h, this.path = t8.path || h, this.query = t8.query || h, this.fragment = t8.fragment || h) : (this.scheme = /* @__PURE__ */ (function(t9, e4) {
11328
+ return t9 || e4 ? t9 : "file";
11329
+ })(t8, o2), this.authority = e3 || h, this.path = (function(t9, e4) {
11330
+ switch (t9) {
11331
11331
  case "https":
11332
11332
  case "http":
11333
11333
  case "file":
@@ -11339,42 +11339,42 @@ var require_umd = __commonJS({
11339
11339
  get fsPath() {
11340
11340
  return v(this, !1);
11341
11341
  }
11342
- with(t7) {
11343
- if (!t7) return this;
11344
- let { scheme: e3, authority: r3, path: n3, query: i2, fragment: o2 } = t7;
11342
+ with(t8) {
11343
+ if (!t8) return this;
11344
+ let { scheme: e3, authority: r3, path: n3, query: i2, fragment: o2 } = t8;
11345
11345
  return e3 === void 0 ? e3 = this.scheme : e3 === null && (e3 = h), r3 === void 0 ? r3 = this.authority : r3 === null && (r3 = h), n3 === void 0 ? n3 = this.path : n3 === null && (n3 = h), i2 === void 0 ? i2 = this.query : i2 === null && (i2 = h), o2 === void 0 ? o2 = this.fragment : o2 === null && (o2 = h), e3 === this.scheme && r3 === this.authority && n3 === this.path && i2 === this.query && o2 === this.fragment ? this : new d(e3, r3, n3, i2, o2);
11346
11346
  }
11347
- static parse(t7, e3 = !1) {
11348
- let r3 = f.exec(t7);
11347
+ static parse(t8, e3 = !1) {
11348
+ let r3 = f.exec(t8);
11349
11349
  return r3 ? new d(r3[2] || h, w(r3[4] || h), w(r3[5] || h), w(r3[7] || h), w(r3[9] || h), e3) : new d(h, h, h, h, h);
11350
11350
  }
11351
- static file(t7) {
11351
+ static file(t8) {
11352
11352
  let e3 = h;
11353
- if (n2.isWindows && (t7 = t7.replace(/\\/g, c)), t7[0] === c && t7[1] === c) {
11354
- let r3 = t7.indexOf(c, 2);
11355
- r3 === -1 ? (e3 = t7.substring(2), t7 = c) : (e3 = t7.substring(2, r3), t7 = t7.substring(r3) || c);
11353
+ if (n2.isWindows && (t8 = t8.replace(/\\/g, c)), t8[0] === c && t8[1] === c) {
11354
+ let r3 = t8.indexOf(c, 2);
11355
+ r3 === -1 ? (e3 = t8.substring(2), t8 = c) : (e3 = t8.substring(2, r3), t8 = t8.substring(r3) || c);
11356
11356
  }
11357
- return new d("file", e3, t7, h, h);
11357
+ return new d("file", e3, t8, h, h);
11358
11358
  }
11359
- static from(t7) {
11360
- let e3 = new d(t7.scheme, t7.authority, t7.path, t7.query, t7.fragment);
11359
+ static from(t8) {
11360
+ let e3 = new d(t8.scheme, t8.authority, t8.path, t8.query, t8.fragment);
11361
11361
  return a(e3, !0), e3;
11362
11362
  }
11363
- toString(t7 = !1) {
11364
- return y(this, t7);
11363
+ toString(t8 = !1) {
11364
+ return y(this, t8);
11365
11365
  }
11366
11366
  toJSON() {
11367
11367
  return this;
11368
11368
  }
11369
- static revive(t7) {
11370
- if (t7) {
11371
- if (t7 instanceof u) return t7;
11369
+ static revive(t8) {
11370
+ if (t8) {
11371
+ if (t8 instanceof u) return t8;
11372
11372
  {
11373
- let e3 = new d(t7);
11374
- return e3._formatted = t7.external, e3._fsPath = t7._sep === l ? t7.fsPath : null, e3;
11373
+ let e3 = new d(t8);
11374
+ return e3._formatted = t8.external, e3._fsPath = t8._sep === l ? t8.fsPath : null, e3;
11375
11375
  }
11376
11376
  }
11377
- return t7;
11377
+ return t8;
11378
11378
  }
11379
11379
  }
11380
11380
  e2.URI = u;
@@ -11385,112 +11385,112 @@ var require_umd = __commonJS({
11385
11385
  get fsPath() {
11386
11386
  return this._fsPath || (this._fsPath = v(this, !1)), this._fsPath;
11387
11387
  }
11388
- toString(t7 = !1) {
11389
- return t7 ? y(this, !0) : (this._formatted || (this._formatted = y(this, !1)), this._formatted);
11388
+ toString(t8 = !1) {
11389
+ return t8 ? y(this, !0) : (this._formatted || (this._formatted = y(this, !1)), this._formatted);
11390
11390
  }
11391
11391
  toJSON() {
11392
- let t7 = { $mid: 1 };
11393
- return this._fsPath && (t7.fsPath = this._fsPath, t7._sep = l), this._formatted && (t7.external = this._formatted), this.path && (t7.path = this.path), this.scheme && (t7.scheme = this.scheme), this.authority && (t7.authority = this.authority), this.query && (t7.query = this.query), this.fragment && (t7.fragment = this.fragment), t7;
11392
+ let t8 = { $mid: 1 };
11393
+ return this._fsPath && (t8.fsPath = this._fsPath, t8._sep = l), this._formatted && (t8.external = this._formatted), this.path && (t8.path = this.path), this.scheme && (t8.scheme = this.scheme), this.authority && (t8.authority = this.authority), this.query && (t8.query = this.query), this.fragment && (t8.fragment = this.fragment), t8;
11394
11394
  }
11395
11395
  }
11396
11396
  let p = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
11397
- function g(t7, e3, r3) {
11397
+ function g(t8, e3, r3) {
11398
11398
  let n3, i2 = -1;
11399
- for (let o2 = 0; o2 < t7.length; o2++) {
11400
- let s2 = t7.charCodeAt(o2);
11401
- if (s2 >= 97 && s2 <= 122 || s2 >= 65 && s2 <= 90 || s2 >= 48 && s2 <= 57 || s2 === 45 || s2 === 46 || s2 === 95 || s2 === 126 || e3 && s2 === 47 || r3 && s2 === 91 || r3 && s2 === 93 || r3 && s2 === 58) i2 !== -1 && (n3 += encodeURIComponent(t7.substring(i2, o2)), i2 = -1), n3 !== void 0 && (n3 += t7.charAt(o2));
11399
+ for (let o2 = 0; o2 < t8.length; o2++) {
11400
+ let s2 = t8.charCodeAt(o2);
11401
+ if (s2 >= 97 && s2 <= 122 || s2 >= 65 && s2 <= 90 || s2 >= 48 && s2 <= 57 || s2 === 45 || s2 === 46 || s2 === 95 || s2 === 126 || e3 && s2 === 47 || r3 && s2 === 91 || r3 && s2 === 93 || r3 && s2 === 58) i2 !== -1 && (n3 += encodeURIComponent(t8.substring(i2, o2)), i2 = -1), n3 !== void 0 && (n3 += t8.charAt(o2));
11402
11402
  else {
11403
- n3 === void 0 && (n3 = t7.substr(0, o2));
11403
+ n3 === void 0 && (n3 = t8.substr(0, o2));
11404
11404
  let e4 = p[s2];
11405
- e4 !== void 0 ? (i2 !== -1 && (n3 += encodeURIComponent(t7.substring(i2, o2)), i2 = -1), n3 += e4) : i2 === -1 && (i2 = o2);
11405
+ e4 !== void 0 ? (i2 !== -1 && (n3 += encodeURIComponent(t8.substring(i2, o2)), i2 = -1), n3 += e4) : i2 === -1 && (i2 = o2);
11406
11406
  }
11407
11407
  }
11408
- return i2 !== -1 && (n3 += encodeURIComponent(t7.substring(i2))), n3 !== void 0 ? n3 : t7;
11408
+ return i2 !== -1 && (n3 += encodeURIComponent(t8.substring(i2))), n3 !== void 0 ? n3 : t8;
11409
11409
  }
11410
- function m(t7) {
11410
+ function m(t8) {
11411
11411
  let e3;
11412
- for (let r3 = 0; r3 < t7.length; r3++) {
11413
- let n3 = t7.charCodeAt(r3);
11414
- n3 === 35 || n3 === 63 ? (e3 === void 0 && (e3 = t7.substr(0, r3)), e3 += p[n3]) : e3 !== void 0 && (e3 += t7[r3]);
11412
+ for (let r3 = 0; r3 < t8.length; r3++) {
11413
+ let n3 = t8.charCodeAt(r3);
11414
+ n3 === 35 || n3 === 63 ? (e3 === void 0 && (e3 = t8.substr(0, r3)), e3 += p[n3]) : e3 !== void 0 && (e3 += t8[r3]);
11415
11415
  }
11416
- return e3 !== void 0 ? e3 : t7;
11416
+ return e3 !== void 0 ? e3 : t8;
11417
11417
  }
11418
- function v(t7, e3) {
11418
+ function v(t8, e3) {
11419
11419
  let r3;
11420
- return r3 = t7.authority && t7.path.length > 1 && t7.scheme === "file" ? `//${t7.authority}${t7.path}` : t7.path.charCodeAt(0) === 47 && (t7.path.charCodeAt(1) >= 65 && t7.path.charCodeAt(1) <= 90 || t7.path.charCodeAt(1) >= 97 && t7.path.charCodeAt(1) <= 122) && t7.path.charCodeAt(2) === 58 ? e3 ? t7.path.substr(1) : t7.path[1].toLowerCase() + t7.path.substr(2) : t7.path, n2.isWindows && (r3 = r3.replace(/\//g, "\\")), r3;
11420
+ return r3 = t8.authority && t8.path.length > 1 && t8.scheme === "file" ? `//${t8.authority}${t8.path}` : t8.path.charCodeAt(0) === 47 && (t8.path.charCodeAt(1) >= 65 && t8.path.charCodeAt(1) <= 90 || t8.path.charCodeAt(1) >= 97 && t8.path.charCodeAt(1) <= 122) && t8.path.charCodeAt(2) === 58 ? e3 ? t8.path.substr(1) : t8.path[1].toLowerCase() + t8.path.substr(2) : t8.path, n2.isWindows && (r3 = r3.replace(/\//g, "\\")), r3;
11421
11421
  }
11422
- function y(t7, e3) {
11423
- let r3 = e3 ? m : g, n3 = "", { scheme: i2, authority: o2, path: s2, query: a2, fragment: h2 } = t7;
11422
+ function y(t8, e3) {
11423
+ let r3 = e3 ? m : g, n3 = "", { scheme: i2, authority: o2, path: s2, query: a2, fragment: h2 } = t8;
11424
11424
  if (i2 && (n3 += i2, n3 += ":"), (o2 || i2 === "file") && (n3 += c, n3 += c), o2) {
11425
- let t8 = o2.indexOf("@");
11426
- if (t8 !== -1) {
11427
- let e4 = o2.substr(0, t8);
11428
- o2 = o2.substr(t8 + 1), t8 = e4.lastIndexOf(":"), t8 === -1 ? n3 += r3(e4, !1, !1) : (n3 += r3(e4.substr(0, t8), !1, !1), n3 += ":", n3 += r3(e4.substr(t8 + 1), !1, !0)), n3 += "@";
11425
+ let t9 = o2.indexOf("@");
11426
+ if (t9 !== -1) {
11427
+ let e4 = o2.substr(0, t9);
11428
+ o2 = o2.substr(t9 + 1), t9 = e4.lastIndexOf(":"), t9 === -1 ? n3 += r3(e4, !1, !1) : (n3 += r3(e4.substr(0, t9), !1, !1), n3 += ":", n3 += r3(e4.substr(t9 + 1), !1, !0)), n3 += "@";
11429
11429
  }
11430
- o2 = o2.toLowerCase(), t8 = o2.lastIndexOf(":"), t8 === -1 ? n3 += r3(o2, !1, !0) : (n3 += r3(o2.substr(0, t8), !1, !0), n3 += o2.substr(t8));
11430
+ o2 = o2.toLowerCase(), t9 = o2.lastIndexOf(":"), t9 === -1 ? n3 += r3(o2, !1, !0) : (n3 += r3(o2.substr(0, t9), !1, !0), n3 += o2.substr(t9));
11431
11431
  }
11432
11432
  if (s2) {
11433
11433
  if (s2.length >= 3 && s2.charCodeAt(0) === 47 && s2.charCodeAt(2) === 58) {
11434
- let t8 = s2.charCodeAt(1);
11435
- t8 >= 65 && t8 <= 90 && (s2 = `/${String.fromCharCode(t8 + 32)}:${s2.substr(3)}`);
11434
+ let t9 = s2.charCodeAt(1);
11435
+ t9 >= 65 && t9 <= 90 && (s2 = `/${String.fromCharCode(t9 + 32)}:${s2.substr(3)}`);
11436
11436
  } else if (s2.length >= 2 && s2.charCodeAt(1) === 58) {
11437
- let t8 = s2.charCodeAt(0);
11438
- t8 >= 65 && t8 <= 90 && (s2 = `${String.fromCharCode(t8 + 32)}:${s2.substr(2)}`);
11437
+ let t9 = s2.charCodeAt(0);
11438
+ t9 >= 65 && t9 <= 90 && (s2 = `${String.fromCharCode(t9 + 32)}:${s2.substr(2)}`);
11439
11439
  }
11440
11440
  n3 += r3(s2, !0, !1);
11441
11441
  }
11442
11442
  return a2 && (n3 += "?", n3 += r3(a2, !1, !1)), h2 && (n3 += "#", n3 += e3 ? h2 : g(h2, !1, !1)), n3;
11443
11443
  }
11444
- function b(t7) {
11444
+ function b(t8) {
11445
11445
  try {
11446
- return decodeURIComponent(t7);
11446
+ return decodeURIComponent(t8);
11447
11447
  } catch {
11448
- return t7.length > 3 ? t7.substr(0, 3) + b(t7.substr(3)) : t7;
11448
+ return t8.length > 3 ? t8.substr(0, 3) + b(t8.substr(3)) : t8;
11449
11449
  }
11450
11450
  }
11451
11451
  e2.uriToFsPath = v;
11452
11452
  let C = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
11453
- function w(t7) {
11454
- return t7.match(C) ? t7.replace(C, ((t8) => b(t8))) : t7;
11453
+ function w(t8) {
11454
+ return t8.match(C) ? t8.replace(C, ((t9) => b(t9))) : t8;
11455
11455
  }
11456
- }, 552: function(t6, e2, r2) {
11457
- var n2 = this && this.__createBinding || (Object.create ? function(t7, e3, r3, n3) {
11456
+ }, 552: function(t7, e2, r2) {
11457
+ var n2 = this && this.__createBinding || (Object.create ? function(t8, e3, r3, n3) {
11458
11458
  n3 === void 0 && (n3 = r3);
11459
11459
  var i2 = Object.getOwnPropertyDescriptor(e3, r3);
11460
11460
  i2 && !("get" in i2 ? !e3.__esModule : i2.writable || i2.configurable) || (i2 = { enumerable: !0, get: function() {
11461
11461
  return e3[r3];
11462
- } }), Object.defineProperty(t7, n3, i2);
11463
- } : function(t7, e3, r3, n3) {
11464
- n3 === void 0 && (n3 = r3), t7[n3] = e3[r3];
11465
- }), i = this && this.__setModuleDefault || (Object.create ? function(t7, e3) {
11466
- Object.defineProperty(t7, "default", { enumerable: !0, value: e3 });
11467
- } : function(t7, e3) {
11468
- t7.default = e3;
11469
- }), o = this && this.__importStar || function(t7) {
11470
- if (t7 && t7.__esModule) return t7;
11462
+ } }), Object.defineProperty(t8, n3, i2);
11463
+ } : function(t8, e3, r3, n3) {
11464
+ n3 === void 0 && (n3 = r3), t8[n3] = e3[r3];
11465
+ }), i = this && this.__setModuleDefault || (Object.create ? function(t8, e3) {
11466
+ Object.defineProperty(t8, "default", { enumerable: !0, value: e3 });
11467
+ } : function(t8, e3) {
11468
+ t8.default = e3;
11469
+ }), o = this && this.__importStar || function(t8) {
11470
+ if (t8 && t8.__esModule) return t8;
11471
11471
  var e3 = {};
11472
- if (t7 != null) for (var r3 in t7) r3 !== "default" && Object.prototype.hasOwnProperty.call(t7, r3) && n2(e3, t7, r3);
11473
- return i(e3, t7), e3;
11472
+ if (t8 != null) for (var r3 in t8) r3 !== "default" && Object.prototype.hasOwnProperty.call(t8, r3) && n2(e3, t8, r3);
11473
+ return i(e3, t8), e3;
11474
11474
  };
11475
11475
  Object.defineProperty(e2, "__esModule", { value: !0 }), e2.Utils = void 0;
11476
11476
  let s = o(r2(975)), a = s.posix || s, h = "/";
11477
11477
  var c;
11478
- (function(t7) {
11479
- t7.joinPath = function(t8, ...e3) {
11480
- return t8.with({ path: a.join(t8.path, ...e3) });
11481
- }, t7.resolvePath = function(t8, ...e3) {
11482
- let r3 = t8.path, n3 = !1;
11478
+ (function(t8) {
11479
+ t8.joinPath = function(t9, ...e3) {
11480
+ return t9.with({ path: a.join(t9.path, ...e3) });
11481
+ }, t8.resolvePath = function(t9, ...e3) {
11482
+ let r3 = t9.path, n3 = !1;
11483
11483
  r3[0] !== h && (r3 = h + r3, n3 = !0);
11484
11484
  let i2 = a.resolve(r3, ...e3);
11485
- return n3 && i2[0] === h && !t8.authority && (i2 = i2.substring(1)), t8.with({ path: i2 });
11486
- }, t7.dirname = function(t8) {
11487
- if (t8.path.length === 0 || t8.path === h) return t8;
11488
- let e3 = a.dirname(t8.path);
11489
- return e3.length === 1 && e3.charCodeAt(0) === 46 && (e3 = ""), t8.with({ path: e3 });
11490
- }, t7.basename = function(t8) {
11491
- return a.basename(t8.path);
11492
- }, t7.extname = function(t8) {
11493
- return a.extname(t8.path);
11485
+ return n3 && i2[0] === h && !t9.authority && (i2 = i2.substring(1)), t9.with({ path: i2 });
11486
+ }, t8.dirname = function(t9) {
11487
+ if (t9.path.length === 0 || t9.path === h) return t9;
11488
+ let e3 = a.dirname(t9.path);
11489
+ return e3.length === 1 && e3.charCodeAt(0) === 46 && (e3 = ""), t9.with({ path: e3 });
11490
+ }, t8.basename = function(t9) {
11491
+ return a.basename(t9.path);
11492
+ }, t8.extname = function(t9) {
11493
+ return a.extname(t9.path);
11494
11494
  };
11495
11495
  })(c || (e2.Utils = c = {}));
11496
11496
  } }, e = {};
@@ -11498,18 +11498,18 @@ var require_umd = __commonJS({
11498
11498
  var i = e[n2];
11499
11499
  if (i !== void 0) return i.exports;
11500
11500
  var o = e[n2] = { exports: {} };
11501
- return t5[n2].call(o.exports, o, o.exports, r), o.exports;
11501
+ return t6[n2].call(o.exports, o, o.exports, r), o.exports;
11502
11502
  }
11503
11503
  var n = {};
11504
11504
  return (() => {
11505
- var t6 = n;
11506
- Object.defineProperty(t6, "__esModule", { value: !0 }), t6.Utils = t6.URI = void 0;
11505
+ var t7 = n;
11506
+ Object.defineProperty(t7, "__esModule", { value: !0 }), t7.Utils = t7.URI = void 0;
11507
11507
  let e2 = r(231);
11508
- Object.defineProperty(t6, "URI", { enumerable: !0, get: function() {
11508
+ Object.defineProperty(t7, "URI", { enumerable: !0, get: function() {
11509
11509
  return e2.URI;
11510
11510
  } });
11511
11511
  let i = r(552);
11512
- Object.defineProperty(t6, "Utils", { enumerable: !0, get: function() {
11512
+ Object.defineProperty(t7, "Utils", { enumerable: !0, get: function() {
11513
11513
  return i.Utils;
11514
11514
  } });
11515
11515
  })(), n;
@@ -12932,13 +12932,13 @@ function _arrayLikeToArray(r, a) {
12932
12932
  function _arrayWithoutHoles(r) {
12933
12933
  if (Array.isArray(r)) return _arrayLikeToArray(r);
12934
12934
  }
12935
- function _defineProperty(e, r, t5) {
12935
+ function _defineProperty(e, r, t6) {
12936
12936
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
12937
- value: t5,
12937
+ value: t6,
12938
12938
  enumerable: !0,
12939
12939
  configurable: !0,
12940
12940
  writable: !0
12941
- }) : e[r] = t5, e;
12941
+ }) : e[r] = t6, e;
12942
12942
  }
12943
12943
  function _iterableToArray(r) {
12944
12944
  if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
@@ -12948,22 +12948,22 @@ function _nonIterableSpread() {
12948
12948
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
12949
12949
  }
12950
12950
  function ownKeys(e, r) {
12951
- var t5 = Object.keys(e);
12951
+ var t6 = Object.keys(e);
12952
12952
  if (Object.getOwnPropertySymbols) {
12953
12953
  var o = Object.getOwnPropertySymbols(e);
12954
12954
  r && (o = o.filter(function(r2) {
12955
12955
  return Object.getOwnPropertyDescriptor(e, r2).enumerable;
12956
- })), t5.push.apply(t5, o);
12956
+ })), t6.push.apply(t6, o);
12957
12957
  }
12958
- return t5;
12958
+ return t6;
12959
12959
  }
12960
12960
  function _objectSpread2(e) {
12961
12961
  for (var r = 1; r < arguments.length; r++) {
12962
- var t5 = arguments[r] != null ? arguments[r] : {};
12963
- r % 2 ? ownKeys(Object(t5), !0).forEach(function(r2) {
12964
- _defineProperty(e, r2, t5[r2]);
12965
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t5)) : ownKeys(Object(t5)).forEach(function(r2) {
12966
- Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t5, r2));
12962
+ var t6 = arguments[r] != null ? arguments[r] : {};
12963
+ r % 2 ? ownKeys(Object(t6), !0).forEach(function(r2) {
12964
+ _defineProperty(e, r2, t6[r2]);
12965
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t6)) : ownKeys(Object(t6)).forEach(function(r2) {
12966
+ Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t6, r2));
12967
12967
  });
12968
12968
  }
12969
12969
  return e;
@@ -12971,18 +12971,18 @@ function _objectSpread2(e) {
12971
12971
  function _toConsumableArray(r) {
12972
12972
  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
12973
12973
  }
12974
- function _toPrimitive(t5, r) {
12975
- if (typeof t5 != "object" || !t5) return t5;
12976
- var e = t5[Symbol.toPrimitive];
12974
+ function _toPrimitive(t6, r) {
12975
+ if (typeof t6 != "object" || !t6) return t6;
12976
+ var e = t6[Symbol.toPrimitive];
12977
12977
  if (e !== void 0) {
12978
- var i = e.call(t5, r || "default");
12978
+ var i = e.call(t6, r || "default");
12979
12979
  if (typeof i != "object") return i;
12980
12980
  throw new TypeError("@@toPrimitive must return a primitive value.");
12981
12981
  }
12982
- return (r === "string" ? String : Number)(t5);
12982
+ return (r === "string" ? String : Number)(t6);
12983
12983
  }
12984
- function _toPropertyKey(t5) {
12985
- var i = _toPrimitive(t5, "string");
12984
+ function _toPropertyKey(t6) {
12985
+ var i = _toPrimitive(t6, "string");
12986
12986
  return typeof i == "symbol" ? i : i + "";
12987
12987
  }
12988
12988
  function _typeof(o) {
@@ -12996,8 +12996,8 @@ function _typeof(o) {
12996
12996
  function _unsupportedIterableToArray(r, a) {
12997
12997
  if (r) {
12998
12998
  if (typeof r == "string") return _arrayLikeToArray(r, a);
12999
- var t5 = {}.toString.call(r).slice(8, -1);
13000
- return t5 === "Object" && r.constructor && (t5 = r.constructor.name), t5 === "Map" || t5 === "Set" ? Array.from(r) : t5 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t5) ? _arrayLikeToArray(r, a) : void 0;
12999
+ var t6 = {}.toString.call(r).slice(8, -1);
13000
+ return t6 === "Object" && r.constructor && (t6 = r.constructor.name), t6 === "Map" || t6 === "Set" ? Array.from(r) : t6 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t6) ? _arrayLikeToArray(r, a) : void 0;
13001
13001
  }
13002
13002
  }
13003
13003
  function safeSortObject(value, seen) {
@@ -13891,7 +13891,7 @@ function typeTokenizer(spacing = "compact") {
13891
13891
  }
13892
13892
  var trim = (x) => x.trim();
13893
13893
  function getJoiner(spacing) {
13894
- return spacing === "compact" ? (t5) => t5.map(trim).join("") : spacing === "preserve" ? (t5) => t5.join(`
13894
+ return spacing === "compact" ? (t6) => t6.map(trim).join("") : spacing === "preserve" ? (t6) => t6.join(`
13895
13895
  `) : spacing;
13896
13896
  }
13897
13897
 
@@ -14833,7 +14833,7 @@ function serializeType(typescript, checker, type, isRequired, depth = 0) {
14833
14833
  return { name: checker.typeToString(type) };
14834
14834
  if (type.isUnion()) {
14835
14835
  let nonUndefinedTypes = type.types.filter(
14836
- (t5) => !(t5.getFlags() & typescript.TypeFlags.Undefined)
14836
+ (t6) => !(t6.getFlags() & typescript.TypeFlags.Undefined)
14837
14837
  ), literalMembers = nonUndefinedTypes.filter(isLiteralType);
14838
14838
  if (literalMembers.length > 0 && literalMembers.length === nonUndefinedTypes.length)
14839
14839
  return {
@@ -16280,7 +16280,8 @@ var baseIdentifier = (component) => component.split(".")[0] ?? component, isType
16280
16280
  csf,
16281
16281
  storyFilePath,
16282
16282
  typescriptOptions = {},
16283
- docgenEngine
16283
+ docgenEngine,
16284
+ additionalComponentNames = []
16284
16285
  }) => {
16285
16286
  let { reactDocgenTypescriptOptions } = typescriptOptions, program = csf._file.path, componentSet = /* @__PURE__ */ new Set(), componentDepth = /* @__PURE__ */ new Map(), localToImport = /* @__PURE__ */ new Map(), jsxDepth = 0;
16286
16287
  program.traverse({
@@ -16308,6 +16309,8 @@ var baseIdentifier = (component) => component.split(".")[0] ?? component, isType
16308
16309
  });
16309
16310
  let metaComp = csf._meta?.component;
16310
16311
  metaComp && componentSet.add(metaComp);
16312
+ for (let componentName of additionalComponentNames)
16313
+ componentSet.add(componentName);
16311
16314
  let components = Array.from(componentSet).sort((a, b) => a.localeCompare(b)), body = program.get("body");
16312
16315
  for (let stmt of body) {
16313
16316
  if (!stmt.isImportDeclaration())
@@ -16561,6 +16564,66 @@ ${message}`
16561
16564
  return merged;
16562
16565
  };
16563
16566
 
16567
+ // src/componentManifest/subcomponents.ts
16568
+ import { types as t4 } from "storybook/internal/babel";
16569
+ function findExactComponentMatch(components, componentName) {
16570
+ if (componentName)
16571
+ return components.find((component) => component.componentName === componentName);
16572
+ }
16573
+ function extractDeclaredSubcomponents(csf) {
16574
+ let rawSubcomponents = unwrapSubcomponentNode(
16575
+ csf._metaAnnotations.subcomponents,
16576
+ csf._ast.program
16577
+ );
16578
+ return !rawSubcomponents || !t4.isObjectExpression(rawSubcomponents) ? [] : rawSubcomponents.properties.flatMap((property) => {
16579
+ if (!t4.isObjectProperty(property))
16580
+ return [];
16581
+ let name = getObjectKeyName(property.key), directComponentName = getComponentExpressionName(property.value), componentExpression = unwrapSubcomponentNode(property.value, csf._ast.program), componentName = getComponentExpressionName(componentExpression) ?? directComponentName;
16582
+ return name && componentName ? [{ name, componentName }] : [];
16583
+ });
16584
+ }
16585
+ function findVariableInitialization(identifier, program) {
16586
+ for (let node of program.body) {
16587
+ let declaration = (t4.isVariableDeclaration(node) ? node.declarations : t4.isExportNamedDeclaration(node) && t4.isVariableDeclaration(node.declaration) ? node.declaration.declarations : void 0)?.find(
16588
+ (decl) => t4.isVariableDeclarator(decl) && t4.isIdentifier(decl.id) && decl.id.name === identifier
16589
+ );
16590
+ if (declaration?.init && t4.isExpression(declaration.init))
16591
+ return declaration.init;
16592
+ }
16593
+ }
16594
+ function unwrapSubcomponentNode(node, program, visitedIdentifiers = /* @__PURE__ */ new Set()) {
16595
+ let current = node;
16596
+ for (; current; ) {
16597
+ if (t4.isIdentifier(current)) {
16598
+ if (visitedIdentifiers.has(current.name))
16599
+ return;
16600
+ visitedIdentifiers.add(current.name), current = findVariableInitialization(current.name, program);
16601
+ continue;
16602
+ }
16603
+ if (t4.isParenthesizedExpression(current) || t4.isTSAsExpression(current) || t4.isTSSatisfiesExpression(current) || t4.isTSNonNullExpression(current)) {
16604
+ current = current.expression;
16605
+ continue;
16606
+ }
16607
+ return current;
16608
+ }
16609
+ }
16610
+ function getObjectKeyName(key) {
16611
+ if (t4.isIdentifier(key))
16612
+ return key.name;
16613
+ if (t4.isStringLiteral(key))
16614
+ return key.value;
16615
+ }
16616
+ function getComponentExpressionName(node) {
16617
+ if (node) {
16618
+ if (t4.isIdentifier(node))
16619
+ return node.name;
16620
+ if (t4.isMemberExpression(node) && !node.computed) {
16621
+ let objectName = getComponentExpressionName(node.object), propertyName = getComponentExpressionName(node.property);
16622
+ return objectName && propertyName ? `${objectName}.${propertyName}` : void 0;
16623
+ }
16624
+ }
16625
+ }
16626
+
16564
16627
  // src/componentManifest/generator.ts
16565
16628
  var componentMetaManager;
16566
16629
  async function createComponentMetaManager(watch2) {
@@ -16594,11 +16657,9 @@ function selectComponentEntries(manifestEntries) {
16594
16657
  }), [...entriesByComponentId.values()];
16595
16658
  }
16596
16659
  function findMatchingComponent(components, componentName, title) {
16597
- if (componentName) {
16598
- let match = components.find((it) => it.componentName === componentName);
16599
- if (match)
16600
- return match;
16601
- }
16660
+ let exactMatch = findExactComponentMatch(components, componentName);
16661
+ if (exactMatch)
16662
+ return exactMatch;
16602
16663
  let trimmedTitle = title.replace(/\s+/g, ""), matches = components.filter(
16603
16664
  (it) => trimmedTitle.includes(it.componentName) || it.localImportName && trimmedTitle.includes(it.localImportName) || it.importName && trimmedTitle.includes(it.importName)
16604
16665
  );
@@ -16625,6 +16686,61 @@ function getPackageInfo(componentPath, fallbackPath) {
16625
16686
  return;
16626
16687
  }
16627
16688
  }
16689
+ function getFallbackImport(packageName, componentName) {
16690
+ let exportName = componentName?.split(".").at(-1);
16691
+ return packageName && exportName ? `import { ${exportName} } from "${packageName}";` : "";
16692
+ }
16693
+ function getComponentDocgenData(component, docgenEngine) {
16694
+ let reactDocgen, reactDocgenTypescript, reactComponentMeta, docgenDescription, docgenJsDocTags, docgenError;
16695
+ if (docgenEngine === "react-docgen") {
16696
+ let result = component?.reactDocgen;
16697
+ reactDocgen = result?.type === "success" ? result.data : void 0, docgenDescription = reactDocgen?.description, docgenError = result?.type === "error" ? result.error : void 0;
16698
+ } else docgenEngine === "react-docgen-typescript" ? (reactDocgenTypescript = component?.reactDocgenTypescript, docgenDescription = reactDocgenTypescript?.description, docgenError = component?.reactDocgenTypescriptError) : (reactComponentMeta = component?.reactComponentMeta, docgenDescription = reactComponentMeta?.description, docgenJsDocTags = component?.componentJsDocTags);
16699
+ return {
16700
+ docgenDescription,
16701
+ docgenError,
16702
+ docgenJsDocTags,
16703
+ reactComponentMeta,
16704
+ reactDocgen,
16705
+ reactDocgenTypescript
16706
+ };
16707
+ }
16708
+ function createSubcomponentManifest({
16709
+ component,
16710
+ declaredName,
16711
+ docgenEngine,
16712
+ packageName,
16713
+ storyFilePath
16714
+ }) {
16715
+ let imports = getImports({ components: component ? [component] : [], packageName }).join(`
16716
+ `).trim() || getFallbackImport(packageName, component?.componentName), {
16717
+ reactDocgen,
16718
+ reactDocgenTypescript,
16719
+ reactComponentMeta,
16720
+ docgenDescription,
16721
+ docgenJsDocTags,
16722
+ docgenError
16723
+ } = getComponentDocgenData(component, docgenEngine), { description, summary, jsDocTags } = extractComponentDescription(
16724
+ void 0,
16725
+ docgenDescription,
16726
+ docgenJsDocTags
16727
+ );
16728
+ return {
16729
+ name: declaredName,
16730
+ path: component?.path ?? storyFilePath,
16731
+ description,
16732
+ summary,
16733
+ import: imports || void 0,
16734
+ jsDocTags,
16735
+ reactDocgen,
16736
+ reactDocgenTypescript,
16737
+ reactComponentMeta,
16738
+ error: docgenError ?? (component ? void 0 : {
16739
+ name: "No component import found",
16740
+ message: `No component file found for the "${declaredName}" subcomponent.`
16741
+ })
16742
+ };
16743
+ }
16628
16744
  function extractStories(csf, componentName, manifestEntries) {
16629
16745
  let manifestEntryIds = new Set(manifestEntries.map((entry) => entry.id));
16630
16746
  return Object.entries(csf._stories).filter(
@@ -16669,12 +16785,20 @@ var manifests = async (existingManifests = {}, options) => {
16669
16785
  let storyFilePath = entry.type === "story" ? entry.importPath : (
16670
16786
  // For attached docs entries, storiesImports[0] points to the stories file being attached to
16671
16787
  entry.storiesImports[0]
16672
- ), storyPath = path.join(process.cwd(), storyFilePath), storyFile = cachedReadTextFileSync(storyPath), csf = loadCsf(storyFile, { makeTitle: () => entry.title }).parse(), componentName = csf._meta?.component, allComponents = await getComponents({
16788
+ ), storyPath = path.join(process.cwd(), storyFilePath), storyFile = cachedReadTextFileSync(storyPath), csf = loadCsf(storyFile, {
16789
+ makeTitle: () => entry.title
16790
+ }).parse(), componentName = csf._meta?.component, declaredSubcomponents = extractDeclaredSubcomponents(csf), allComponents = await getComponents({
16791
+ additionalComponentNames: declaredSubcomponents.map(
16792
+ (subcomponent) => subcomponent.componentName
16793
+ ),
16673
16794
  csf,
16674
16795
  storyFilePath: storyPath,
16675
16796
  typescriptOptions,
16676
16797
  docgenEngine
16677
- }), component = findMatchingComponent(allComponents, componentName, entry.title);
16798
+ }), component = findMatchingComponent(allComponents, componentName, entry.title), subcomponents = declaredSubcomponents.map((declaredSubcomponent) => ({
16799
+ component: findExactComponentMatch(allComponents, declaredSubcomponent.componentName),
16800
+ name: declaredSubcomponent.name
16801
+ }));
16678
16802
  return {
16679
16803
  storyPath,
16680
16804
  component,
@@ -16683,11 +16807,22 @@ var manifests = async (existingManifests = {}, options) => {
16683
16807
  storyFile,
16684
16808
  csf,
16685
16809
  componentName,
16686
- allComponents
16810
+ allComponents,
16811
+ subcomponents
16687
16812
  };
16688
16813
  })
16689
16814
  );
16690
- docgenEngine === "react-component-meta" && manager && manager.batchExtract(resolvedEntries);
16815
+ docgenEngine === "react-component-meta" && manager && manager.batchExtract(
16816
+ resolvedEntries.flatMap(({ storyPath, component, subcomponents }) => [
16817
+ ...component ? [{ storyPath, component }] : [],
16818
+ ...subcomponents.filter(
16819
+ (subcomponent) => subcomponent.component !== void 0
16820
+ ).map((subcomponent) => ({
16821
+ storyPath,
16822
+ component: subcomponent.component
16823
+ }))
16824
+ ])
16825
+ );
16691
16826
  let components = resolvedEntries.map(
16692
16827
  ({
16693
16828
  storyPath,
@@ -16697,9 +16832,10 @@ var manifests = async (existingManifests = {}, options) => {
16697
16832
  storyFile,
16698
16833
  csf,
16699
16834
  componentName,
16700
- allComponents
16835
+ allComponents,
16836
+ subcomponents
16701
16837
  }) => {
16702
- let id = entry.id.split("--")[0], title = entry.title.split("/").at(-1).replace(/\s+/g, ""), packageName = getPackageInfo(component?.path, storyPath), fallbackImport = packageName && componentName ? `import { ${componentName} } from "${packageName}";` : "", imports = getImports({ components: allComponents, packageName }).join(`
16838
+ let id = entry.id.split("--")[0], title = entry.title.split("/").at(-1).replace(/\s+/g, ""), packageName = getPackageInfo(component?.path, storyPath), fallbackImport = getFallbackImport(packageName, componentName), imports = getImports({ components: allComponents, packageName }).join(`
16703
16839
  `).trim() || fallbackImport, stories = extractStories(csf, component?.componentName, manifestEntries), base2 = {
16704
16840
  id,
16705
16841
  name: componentName ?? title,
@@ -16707,11 +16843,14 @@ var manifests = async (existingManifests = {}, options) => {
16707
16843
  stories,
16708
16844
  import: imports,
16709
16845
  jsDocTags: {}
16710
- }, reactDocgen, reactDocgenTypescript, reactComponentMeta, docgenDescription, docgenJsDocTags, docgenError;
16711
- if (docgenEngine === "react-docgen") {
16712
- let result = component?.reactDocgen;
16713
- reactDocgen = result?.type === "success" ? result.data : void 0, docgenDescription = reactDocgen?.description, docgenError = result?.type === "error" ? result.error : void 0;
16714
- } else docgenEngine === "react-docgen-typescript" ? (reactDocgenTypescript = component?.reactDocgenTypescript, docgenDescription = reactDocgenTypescript?.description, docgenError = component?.reactDocgenTypescriptError) : (reactComponentMeta = component?.reactComponentMeta, docgenDescription = reactComponentMeta?.description, docgenJsDocTags = component?.componentJsDocTags);
16846
+ }, {
16847
+ reactDocgen,
16848
+ reactDocgenTypescript,
16849
+ reactComponentMeta,
16850
+ docgenDescription,
16851
+ docgenJsDocTags,
16852
+ docgenError
16853
+ } = getComponentDocgenData(component, docgenEngine);
16715
16854
  if (!reactDocgen && !reactDocgenTypescript && !reactComponentMeta) {
16716
16855
  let error = csf._meta?.component ? {
16717
16856
  name: "No component import found",
@@ -16735,6 +16874,17 @@ ${storyFile}`
16735
16874
  metaJsDoc,
16736
16875
  docgenDescription,
16737
16876
  docgenJsDocTags
16877
+ ), subcomponentEntries = Object.fromEntries(
16878
+ subcomponents.map((subcomponent) => [
16879
+ subcomponent.name,
16880
+ createSubcomponentManifest({
16881
+ component: subcomponent.component,
16882
+ declaredName: subcomponent.name,
16883
+ docgenEngine,
16884
+ packageName,
16885
+ storyFilePath
16886
+ })
16887
+ ])
16738
16888
  );
16739
16889
  return {
16740
16890
  ...base2,
@@ -16745,6 +16895,7 @@ ${storyFile}`
16745
16895
  reactDocgenTypescript,
16746
16896
  reactComponentMeta,
16747
16897
  jsDocTags,
16898
+ ...Object.keys(subcomponentEntries).length > 0 ? { subcomponents: subcomponentEntries } : {},
16748
16899
  error: docgenError
16749
16900
  };
16750
16901
  }
@@ -16768,7 +16919,7 @@ ${storyFile}`
16768
16919
  };
16769
16920
 
16770
16921
  // src/enrichCsf.ts
16771
- import { recast as recast3, types as t4 } from "storybook/internal/babel";
16922
+ import { recast as recast3, types as t5 } from "storybook/internal/babel";
16772
16923
  import { getPrettier } from "storybook/internal/common";
16773
16924
  var enrichCsf = async (input, options) => {
16774
16925
  if ((await options.presets.apply("features")).experimentalCodeExamples)
@@ -16795,34 +16946,34 @@ var enrichCsf = async (input, options) => {
16795
16946
  }
16796
16947
  if (!snippet)
16797
16948
  return;
16798
- let originalParameters = t4.memberExpression(
16799
- csf._metaIsFactory ? t4.memberExpression(t4.identifier(key), t4.identifier("input")) : t4.identifier(key),
16800
- t4.identifier("parameters")
16801
- ), docsParameter = t4.optionalMemberExpression(
16949
+ let originalParameters = t5.memberExpression(
16950
+ csf._metaIsFactory ? t5.memberExpression(t5.identifier(key), t5.identifier("input")) : t5.identifier(key),
16951
+ t5.identifier("parameters")
16952
+ ), docsParameter = t5.optionalMemberExpression(
16802
16953
  originalParameters,
16803
- t4.identifier("docs"),
16954
+ t5.identifier("docs"),
16804
16955
  !1,
16805
16956
  !0
16806
16957
  );
16807
16958
  csf._ast.program.body.push(
16808
- t4.expressionStatement(
16809
- t4.assignmentExpression(
16959
+ t5.expressionStatement(
16960
+ t5.assignmentExpression(
16810
16961
  "=",
16811
16962
  originalParameters,
16812
- t4.objectExpression([
16813
- t4.spreadElement(originalParameters),
16814
- t4.objectProperty(
16815
- t4.identifier("docs"),
16816
- t4.objectExpression([
16817
- t4.spreadElement(docsParameter),
16818
- t4.objectProperty(
16819
- t4.identifier("source"),
16820
- t4.objectExpression([
16821
- t4.objectProperty(t4.identifier("code"), t4.stringLiteral(snippet)),
16822
- t4.spreadElement(
16823
- t4.optionalMemberExpression(
16963
+ t5.objectExpression([
16964
+ t5.spreadElement(originalParameters),
16965
+ t5.objectProperty(
16966
+ t5.identifier("docs"),
16967
+ t5.objectExpression([
16968
+ t5.spreadElement(docsParameter),
16969
+ t5.objectProperty(
16970
+ t5.identifier("source"),
16971
+ t5.objectExpression([
16972
+ t5.objectProperty(t5.identifier("code"), t5.stringLiteral(snippet)),
16973
+ t5.spreadElement(
16974
+ t5.optionalMemberExpression(
16824
16975
  docsParameter,
16825
- t4.identifier("source"),
16976
+ t5.identifier("source"),
16826
16977
  !1,
16827
16978
  !0
16828
16979
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react",
3
- "version": "10.4.0-alpha.7",
3
+ "version": "10.4.0-alpha.9",
4
4
  "description": "Storybook React renderer",
5
5
  "keywords": [
6
6
  "storybook"
@@ -53,7 +53,7 @@
53
53
  ],
54
54
  "dependencies": {
55
55
  "@storybook/global": "^5.0.0",
56
- "@storybook/react-dom-shim": "10.4.0-alpha.7",
56
+ "@storybook/react-dom-shim": "10.4.0-alpha.9",
57
57
  "react-docgen": "^8.0.2",
58
58
  "react-docgen-typescript": "^2.2.2"
59
59
  },
@@ -83,7 +83,7 @@
83
83
  "peerDependencies": {
84
84
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
85
85
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
86
- "storybook": "^10.4.0-alpha.7",
86
+ "storybook": "^10.4.0-alpha.9",
87
87
  "typescript": ">= 4.9.x"
88
88
  },
89
89
  "peerDependenciesMeta": {