storybook 10.2.0-alpha.8 → 10.2.0-beta.0

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 (97) hide show
  1. package/dist/_browser-chunks/{Color-E5XDEOX4.js → Color-XESOIGZP.js} +57 -3
  2. package/dist/_browser-chunks/chunk-AFVOZMXQ.js +23 -0
  3. package/dist/_browser-chunks/{chunk-3PJE6VLG.js → chunk-ASKQZAOS.js} +1 -12
  4. package/dist/_browser-chunks/chunk-IYCKG66Y.js +171 -0
  5. package/dist/_browser-chunks/chunk-LCHBOIHN.js +64 -0
  6. package/dist/_browser-chunks/{chunk-IPA5A322.js → chunk-MEXTPDJG.js} +1 -1
  7. package/dist/_browser-chunks/{chunk-54PNNATT.js → chunk-NQJGOFZV.js} +18 -1
  8. package/dist/_browser-chunks/{chunk-VUZYLZ4B.js → chunk-QOXZ7W26.js} +31 -15
  9. package/dist/_browser-chunks/{chunk-LOTN4ZCW.js → chunk-SI6AKD4S.js} +2 -2
  10. package/dist/_browser-chunks/chunk-YK43Z22A.js +263 -0
  11. package/dist/_node-chunks/{builder-manager-2XASU3VS.js → builder-manager-JEJE63VV.js} +15 -12
  12. package/dist/_node-chunks/camelcase-HALRJETF.js +62 -0
  13. package/dist/_node-chunks/{chunk-5GRHJJHD.js → chunk-3SKE4CCB.js} +9 -9
  14. package/dist/_node-chunks/chunk-4UYAC7Y2.js +18 -0
  15. package/dist/_node-chunks/{chunk-S7FIFCTX.js → chunk-6UAQEBJX.js} +10 -10
  16. package/dist/_node-chunks/{chunk-ZKB7MQRR.js → chunk-72K4WVI5.js} +18 -14
  17. package/dist/_node-chunks/{chunk-6TJUL42C.js → chunk-7ZX5CX6B.js} +15 -69
  18. package/dist/_node-chunks/{chunk-LEZENLG7.js → chunk-ADTWC7QJ.js} +7 -7
  19. package/dist/_node-chunks/{chunk-2OC7H5MZ.js → chunk-APUXGW3Y.js} +7 -7
  20. package/dist/_node-chunks/{chunk-5WQXPM6D.js → chunk-AXDM43NU.js} +6 -6
  21. package/dist/_node-chunks/{chunk-LOXLI4XT.js → chunk-B422K4XV.js} +6 -6
  22. package/dist/_node-chunks/{chunk-3K6P75SS.js → chunk-BJOXVTWM.js} +12 -571
  23. package/dist/_node-chunks/{chunk-TTGXODEY.js → chunk-BLGRU6F5.js} +7 -7
  24. package/dist/_node-chunks/{chunk-2KSITKBI.js → chunk-CG47ALAV.js} +7 -7
  25. package/dist/_node-chunks/chunk-FH4FRUMP.js +23 -0
  26. package/dist/_node-chunks/{chunk-DTM4A3DJ.js → chunk-GBZ23FIZ.js} +125 -73
  27. package/dist/_node-chunks/{chunk-IJ34563N.js → chunk-IZ3ATSWZ.js} +5262 -1480
  28. package/dist/_node-chunks/{chunk-JWL5NLJU.js → chunk-IZFEBWVB.js} +6 -6
  29. package/dist/_node-chunks/{chunk-5BRYY6XB.js → chunk-KL5CKFPT.js} +9 -9
  30. package/dist/_node-chunks/{chunk-COGO4JMD.js → chunk-MLXCYULR.js} +7 -7
  31. package/dist/_node-chunks/{chunk-7B4JYHGV.js → chunk-MV2QM7P3.js} +6 -6
  32. package/dist/_node-chunks/chunk-PHX5XNP7.js +144 -0
  33. package/dist/_node-chunks/{chunk-VJFHZL2T.js → chunk-QL6L57W7.js} +533 -144
  34. package/dist/_node-chunks/{chunk-Q6WPGVIW.js → chunk-RPBXVPRB.js} +6 -6
  35. package/dist/_node-chunks/{chunk-DYQ6QR45.js → chunk-UH2GWMFP.js} +260 -162
  36. package/dist/_node-chunks/chunk-WNGL2VRJ.js +126 -0
  37. package/dist/_node-chunks/{chunk-WKC523P7.js → chunk-XAL452XB.js} +36 -14
  38. package/dist/_node-chunks/{chunk-UNHOAAXU.js → chunk-YVXXMWQO.js} +7 -7
  39. package/dist/_node-chunks/chunk-YYDL7JOC.js +61 -0
  40. package/dist/_node-chunks/{chunk-MLYPMYG5.js → chunk-Z7FLE2TR.js} +6 -6
  41. package/dist/_node-chunks/{globby-FWMT4OOQ.js → globby-4D4NBVG7.js} +11 -20
  42. package/dist/_node-chunks/{lib-YCGXIMW5.js → lib-RM2DWHZQ.js} +7 -7
  43. package/dist/_node-chunks/{mdx-N42X6CFJ-CRGM5LTU.js → mdx-N42X6CFJ-RAL72UTP.js} +8 -8
  44. package/dist/_node-chunks/{p-limit-UJIYI4QT.js → p-limit-6PUJQL5X.js} +18 -14
  45. package/dist/babel/index.js +10 -10
  46. package/dist/bin/core.js +12 -12
  47. package/dist/bin/dispatcher.js +11 -11
  48. package/dist/bin/loader.js +9 -9
  49. package/dist/cli/index.d.ts +1504 -424
  50. package/dist/cli/index.js +18 -18
  51. package/dist/common/index.d.ts +1319 -271
  52. package/dist/common/index.js +22 -22
  53. package/dist/components/index.d.ts +4 -1
  54. package/dist/components/index.js +228 -227
  55. package/dist/core-events/index.d.ts +23 -7
  56. package/dist/core-events/index.js +5 -1
  57. package/dist/core-server/index.d.ts +108 -4
  58. package/dist/core-server/index.js +3459 -3086
  59. package/dist/core-server/presets/common-manager.js +208 -160
  60. package/dist/core-server/presets/common-override-preset.js +11 -11
  61. package/dist/core-server/presets/common-preset.js +576 -4536
  62. package/dist/csf/index.d.ts +147 -15
  63. package/dist/csf/index.js +52 -23
  64. package/dist/csf-tools/index.d.ts +19 -1
  65. package/dist/csf-tools/index.js +11 -9
  66. package/dist/docs-tools/index.d.ts +2 -2
  67. package/dist/docs-tools/index.js +4 -5
  68. package/dist/manager/globals-runtime.js +2749 -6907
  69. package/dist/manager/runtime.js +2939 -2295
  70. package/dist/manager-api/index.d.ts +89 -21
  71. package/dist/manager-api/index.js +82 -23
  72. package/dist/mocking-utils/index.js +8 -8
  73. package/dist/node-logger/index.d.ts +1453 -108
  74. package/dist/node-logger/index.js +9 -9
  75. package/dist/preview/runtime.js +784 -5059
  76. package/dist/preview-api/index.d.ts +26 -1
  77. package/dist/preview-api/index.js +11 -8
  78. package/dist/router/index.js +5 -4
  79. package/dist/server-errors.js +11 -11
  80. package/dist/telemetry/index.d.ts +14 -2
  81. package/dist/telemetry/index.js +23 -22
  82. package/dist/theming/index.d.ts +5 -5
  83. package/dist/theming/index.js +21 -2
  84. package/dist/types/index.d.ts +24 -11
  85. package/dist/viewport/index.d.ts +5 -3
  86. package/dist/viewport/index.js +12 -3
  87. package/package.json +27 -26
  88. package/dist/_browser-chunks/chunk-2NDLAB5X.js +0 -363
  89. package/dist/_browser-chunks/chunk-CLSHX4VX.js +0 -4140
  90. package/dist/_browser-chunks/chunk-HPYUT3WS.js +0 -199
  91. package/dist/_browser-chunks/chunk-XCZK5QUJ.js +0 -0
  92. package/dist/_node-chunks/camelcase-KIWRHB2G.js +0 -37
  93. package/dist/_node-chunks/chunk-2ANLCK4Y.js +0 -18
  94. package/dist/_node-chunks/chunk-3TW66YXG.js +0 -70
  95. package/dist/_node-chunks/chunk-UFXCGC4W.js +0 -23
  96. package/dist/_node-chunks/chunk-X4YDIHYE.js +0 -61
  97. package/dist/_node-chunks/dist-GICI6ZHU.js +0 -121
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
1
+ import CJS_COMPAT_NODE_URL_phceqgr585q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_phceqgr585q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_phceqgr585q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_phceqgr585q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_phceqgr585q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_phceqgr585q.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
12
12
  import {
13
13
  __commonJS,
14
14
  __toESM
15
- } from "./chunk-5WQXPM6D.js";
15
+ } from "./chunk-AXDM43NU.js";
16
16
 
17
17
  // ../../node_modules/balanced-match/index.js
18
18
  var require_balanced_match = __commonJS({
@@ -993,7 +993,7 @@ minimatch.unescape = unescape;
993
993
  // ../../node_modules/glob/dist/esm/glob.js
994
994
  import { fileURLToPath as fileURLToPath2 } from "node:url";
995
995
 
996
- // ../../node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js
996
+ // ../../node_modules/lru-cache/dist/esm/index.js
997
997
  var perf = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, warned = /* @__PURE__ */ new Set(), PROCESS = typeof process == "object" && process ? process : {}, emitWarning = (msg, type, code, fn) => {
998
998
  typeof PROCESS.emitWarning == "function" ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`);
999
999
  }, AC = globalThis.AbortController, AS = globalThis.AbortSignal;
@@ -1807,14 +1807,14 @@ var shouldWarn = (code) => !warned.has(code), TYPE = Symbol("type"), isPosInt =
1807
1807
  }
1808
1808
  };
1809
1809
 
1810
- // ../../node_modules/path-scurry/dist/esm/index.js
1810
+ // ../../node_modules/glob/node_modules/path-scurry/dist/esm/index.js
1811
1811
  import { posix, win32 } from "node:path";
1812
1812
  import { fileURLToPath } from "node:url";
1813
1813
  import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps } from "fs";
1814
1814
  import * as actualFS from "node:fs";
1815
1815
  import { lstat, readdir, readlink, realpath } from "node:fs/promises";
1816
1816
 
1817
- // ../../node_modules/path-scurry/node_modules/minipass/dist/esm/index.js
1817
+ // ../../node_modules/minipass/dist/esm/index.js
1818
1818
  import { EventEmitter } from "node:events";
1819
1819
  import Stream from "node:stream";
1820
1820
  import { StringDecoder } from "node:string_decoder";
@@ -2373,7 +2373,7 @@ s.pipe !== Stream.Writable.prototype.pipe, isWritable = (s) => !!s && typeof s =
2373
2373
  }
2374
2374
  };
2375
2375
 
2376
- // ../../node_modules/path-scurry/dist/esm/index.js
2376
+ // ../../node_modules/glob/node_modules/path-scurry/dist/esm/index.js
2377
2377
  var realpathSync = rps.native, defaultFS = {
2378
2378
  lstatSync,
2379
2379
  readdir: readdirCB,
@@ -3796,565 +3796,6 @@ var isPatternList = (pl) => pl.length >= 1, isGlobList = (gl) => gl.length >= 1,
3796
3796
  }
3797
3797
  };
3798
3798
 
3799
- // ../../node_modules/glob/node_modules/minipass/dist/esm/index.js
3800
- import { EventEmitter as EventEmitter2 } from "node:events";
3801
- import Stream2 from "node:stream";
3802
- import { StringDecoder as StringDecoder2 } from "node:string_decoder";
3803
- var proc2 = typeof process == "object" && process ? process : {
3804
- stdout: null,
3805
- stderr: null
3806
- }, isStream2 = (s) => !!s && typeof s == "object" && (s instanceof Minipass2 || s instanceof Stream2 || isReadable2(s) || isWritable2(s)), isReadable2 = (s) => !!s && typeof s == "object" && s instanceof EventEmitter2 && typeof s.pipe == "function" && // node core Writable streams have a pipe() method, but it throws
3807
- s.pipe !== Stream2.Writable.prototype.pipe, isWritable2 = (s) => !!s && typeof s == "object" && s instanceof EventEmitter2 && typeof s.write == "function" && typeof s.end == "function", EOF2 = Symbol("EOF"), MAYBE_EMIT_END2 = Symbol("maybeEmitEnd"), EMITTED_END2 = Symbol("emittedEnd"), EMITTING_END2 = Symbol("emittingEnd"), EMITTED_ERROR2 = Symbol("emittedError"), CLOSED2 = Symbol("closed"), READ2 = Symbol("read"), FLUSH2 = Symbol("flush"), FLUSHCHUNK2 = Symbol("flushChunk"), ENCODING2 = Symbol("encoding"), DECODER2 = Symbol("decoder"), FLOWING2 = Symbol("flowing"), PAUSED2 = Symbol("paused"), RESUME2 = Symbol("resume"), BUFFER2 = Symbol("buffer"), PIPES2 = Symbol("pipes"), BUFFERLENGTH2 = Symbol("bufferLength"), BUFFERPUSH2 = Symbol("bufferPush"), BUFFERSHIFT2 = Symbol("bufferShift"), OBJECTMODE2 = Symbol("objectMode"), DESTROYED2 = Symbol("destroyed"), ERROR2 = Symbol("error"), EMITDATA2 = Symbol("emitData"), EMITEND3 = Symbol("emitEnd"), EMITEND22 = Symbol("emitEnd2"), ASYNC2 = Symbol("async"), ABORT2 = Symbol("abort"), ABORTED2 = Symbol("aborted"), SIGNAL2 = Symbol("signal"), DATALISTENERS2 = Symbol("dataListeners"), DISCARDED2 = Symbol("discarded"), defer2 = (fn) => Promise.resolve().then(fn), nodefer2 = (fn) => fn(), isEndish2 = (ev) => ev === "end" || ev === "finish" || ev === "prefinish", isArrayBufferLike2 = (b) => b instanceof ArrayBuffer || !!b && typeof b == "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, isArrayBufferView2 = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b), Pipe2 = class {
3808
- src;
3809
- dest;
3810
- opts;
3811
- ondrain;
3812
- constructor(src, dest, opts) {
3813
- this.src = src, this.dest = dest, this.opts = opts, this.ondrain = () => src[RESUME2](), this.dest.on("drain", this.ondrain);
3814
- }
3815
- unpipe() {
3816
- this.dest.removeListener("drain", this.ondrain);
3817
- }
3818
- // only here for the prototype
3819
- /* c8 ignore start */
3820
- proxyErrors(_er) {
3821
- }
3822
- /* c8 ignore stop */
3823
- end() {
3824
- this.unpipe(), this.opts.end && this.dest.end();
3825
- }
3826
- }, PipeProxyErrors2 = class extends Pipe2 {
3827
- unpipe() {
3828
- this.src.removeListener("error", this.proxyErrors), super.unpipe();
3829
- }
3830
- constructor(src, dest, opts) {
3831
- super(src, dest, opts), this.proxyErrors = (er) => dest.emit("error", er), src.on("error", this.proxyErrors);
3832
- }
3833
- }, isObjectModeOptions2 = (o) => !!o.objectMode, isEncodingOptions2 = (o) => !o.objectMode && !!o.encoding && o.encoding !== "buffer", Minipass2 = class extends EventEmitter2 {
3834
- [FLOWING2] = !1;
3835
- [PAUSED2] = !1;
3836
- [PIPES2] = [];
3837
- [BUFFER2] = [];
3838
- [OBJECTMODE2];
3839
- [ENCODING2];
3840
- [ASYNC2];
3841
- [DECODER2];
3842
- [EOF2] = !1;
3843
- [EMITTED_END2] = !1;
3844
- [EMITTING_END2] = !1;
3845
- [CLOSED2] = !1;
3846
- [EMITTED_ERROR2] = null;
3847
- [BUFFERLENGTH2] = 0;
3848
- [DESTROYED2] = !1;
3849
- [SIGNAL2];
3850
- [ABORTED2] = !1;
3851
- [DATALISTENERS2] = 0;
3852
- [DISCARDED2] = !1;
3853
- /**
3854
- * true if the stream can be written
3855
- */
3856
- writable = !0;
3857
- /**
3858
- * true if the stream can be read
3859
- */
3860
- readable = !0;
3861
- /**
3862
- * If `RType` is Buffer, then options do not need to be provided.
3863
- * Otherwise, an options object must be provided to specify either
3864
- * {@link Minipass.SharedOptions.objectMode} or
3865
- * {@link Minipass.SharedOptions.encoding}, as appropriate.
3866
- */
3867
- constructor(...args) {
3868
- let options = args[0] || {};
3869
- if (super(), options.objectMode && typeof options.encoding == "string")
3870
- throw new TypeError("Encoding and objectMode may not be used together");
3871
- isObjectModeOptions2(options) ? (this[OBJECTMODE2] = !0, this[ENCODING2] = null) : isEncodingOptions2(options) ? (this[ENCODING2] = options.encoding, this[OBJECTMODE2] = !1) : (this[OBJECTMODE2] = !1, this[ENCODING2] = null), this[ASYNC2] = !!options.async, this[DECODER2] = this[ENCODING2] ? new StringDecoder2(this[ENCODING2]) : null, options && options.debugExposeBuffer === !0 && Object.defineProperty(this, "buffer", { get: () => this[BUFFER2] }), options && options.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[PIPES2] });
3872
- let { signal } = options;
3873
- signal && (this[SIGNAL2] = signal, signal.aborted ? this[ABORT2]() : signal.addEventListener("abort", () => this[ABORT2]()));
3874
- }
3875
- /**
3876
- * The amount of data stored in the buffer waiting to be read.
3877
- *
3878
- * For Buffer strings, this will be the total byte length.
3879
- * For string encoding streams, this will be the string character length,
3880
- * according to JavaScript's `string.length` logic.
3881
- * For objectMode streams, this is a count of the items waiting to be
3882
- * emitted.
3883
- */
3884
- get bufferLength() {
3885
- return this[BUFFERLENGTH2];
3886
- }
3887
- /**
3888
- * The `BufferEncoding` currently in use, or `null`
3889
- */
3890
- get encoding() {
3891
- return this[ENCODING2];
3892
- }
3893
- /**
3894
- * @deprecated - This is a read only property
3895
- */
3896
- set encoding(_enc) {
3897
- throw new Error("Encoding must be set at instantiation time");
3898
- }
3899
- /**
3900
- * @deprecated - Encoding may only be set at instantiation time
3901
- */
3902
- setEncoding(_enc) {
3903
- throw new Error("Encoding must be set at instantiation time");
3904
- }
3905
- /**
3906
- * True if this is an objectMode stream
3907
- */
3908
- get objectMode() {
3909
- return this[OBJECTMODE2];
3910
- }
3911
- /**
3912
- * @deprecated - This is a read-only property
3913
- */
3914
- set objectMode(_om) {
3915
- throw new Error("objectMode must be set at instantiation time");
3916
- }
3917
- /**
3918
- * true if this is an async stream
3919
- */
3920
- get async() {
3921
- return this[ASYNC2];
3922
- }
3923
- /**
3924
- * Set to true to make this stream async.
3925
- *
3926
- * Once set, it cannot be unset, as this would potentially cause incorrect
3927
- * behavior. Ie, a sync stream can be made async, but an async stream
3928
- * cannot be safely made sync.
3929
- */
3930
- set async(a) {
3931
- this[ASYNC2] = this[ASYNC2] || !!a;
3932
- }
3933
- // drop everything and get out of the flow completely
3934
- [ABORT2]() {
3935
- this[ABORTED2] = !0, this.emit("abort", this[SIGNAL2]?.reason), this.destroy(this[SIGNAL2]?.reason);
3936
- }
3937
- /**
3938
- * True if the stream has been aborted.
3939
- */
3940
- get aborted() {
3941
- return this[ABORTED2];
3942
- }
3943
- /**
3944
- * No-op setter. Stream aborted status is set via the AbortSignal provided
3945
- * in the constructor options.
3946
- */
3947
- set aborted(_) {
3948
- }
3949
- write(chunk, encoding, cb) {
3950
- if (this[ABORTED2])
3951
- return !1;
3952
- if (this[EOF2])
3953
- throw new Error("write after end");
3954
- if (this[DESTROYED2])
3955
- return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
3956
- typeof encoding == "function" && (cb = encoding, encoding = "utf8"), encoding || (encoding = "utf8");
3957
- let fn = this[ASYNC2] ? defer2 : nodefer2;
3958
- if (!this[OBJECTMODE2] && !Buffer.isBuffer(chunk)) {
3959
- if (isArrayBufferView2(chunk))
3960
- chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
3961
- else if (isArrayBufferLike2(chunk))
3962
- chunk = Buffer.from(chunk);
3963
- else if (typeof chunk != "string")
3964
- throw new Error("Non-contiguous data written to non-objectMode stream");
3965
- }
3966
- return this[OBJECTMODE2] ? (this[FLOWING2] && this[BUFFERLENGTH2] !== 0 && this[FLUSH2](!0), this[FLOWING2] ? this.emit("data", chunk) : this[BUFFERPUSH2](chunk), this[BUFFERLENGTH2] !== 0 && this.emit("readable"), cb && fn(cb), this[FLOWING2]) : chunk.length ? (typeof chunk == "string" && // unless it is a string already ready for us to use
3967
- !(encoding === this[ENCODING2] && !this[DECODER2]?.lastNeed) && (chunk = Buffer.from(chunk, encoding)), Buffer.isBuffer(chunk) && this[ENCODING2] && (chunk = this[DECODER2].write(chunk)), this[FLOWING2] && this[BUFFERLENGTH2] !== 0 && this[FLUSH2](!0), this[FLOWING2] ? this.emit("data", chunk) : this[BUFFERPUSH2](chunk), this[BUFFERLENGTH2] !== 0 && this.emit("readable"), cb && fn(cb), this[FLOWING2]) : (this[BUFFERLENGTH2] !== 0 && this.emit("readable"), cb && fn(cb), this[FLOWING2]);
3968
- }
3969
- /**
3970
- * Low-level explicit read method.
3971
- *
3972
- * In objectMode, the argument is ignored, and one item is returned if
3973
- * available.
3974
- *
3975
- * `n` is the number of bytes (or in the case of encoding streams,
3976
- * characters) to consume. If `n` is not provided, then the entire buffer
3977
- * is returned, or `null` is returned if no data is available.
3978
- *
3979
- * If `n` is greater that the amount of data in the internal buffer,
3980
- * then `null` is returned.
3981
- */
3982
- read(n) {
3983
- if (this[DESTROYED2])
3984
- return null;
3985
- if (this[DISCARDED2] = !1, this[BUFFERLENGTH2] === 0 || n === 0 || n && n > this[BUFFERLENGTH2])
3986
- return this[MAYBE_EMIT_END2](), null;
3987
- this[OBJECTMODE2] && (n = null), this[BUFFER2].length > 1 && !this[OBJECTMODE2] && (this[BUFFER2] = [
3988
- this[ENCODING2] ? this[BUFFER2].join("") : Buffer.concat(this[BUFFER2], this[BUFFERLENGTH2])
3989
- ]);
3990
- let ret = this[READ2](n || null, this[BUFFER2][0]);
3991
- return this[MAYBE_EMIT_END2](), ret;
3992
- }
3993
- [READ2](n, chunk) {
3994
- if (this[OBJECTMODE2])
3995
- this[BUFFERSHIFT2]();
3996
- else {
3997
- let c = chunk;
3998
- n === c.length || n === null ? this[BUFFERSHIFT2]() : typeof c == "string" ? (this[BUFFER2][0] = c.slice(n), chunk = c.slice(0, n), this[BUFFERLENGTH2] -= n) : (this[BUFFER2][0] = c.subarray(n), chunk = c.subarray(0, n), this[BUFFERLENGTH2] -= n);
3999
- }
4000
- return this.emit("data", chunk), !this[BUFFER2].length && !this[EOF2] && this.emit("drain"), chunk;
4001
- }
4002
- end(chunk, encoding, cb) {
4003
- return typeof chunk == "function" && (cb = chunk, chunk = void 0), typeof encoding == "function" && (cb = encoding, encoding = "utf8"), chunk !== void 0 && this.write(chunk, encoding), cb && this.once("end", cb), this[EOF2] = !0, this.writable = !1, (this[FLOWING2] || !this[PAUSED2]) && this[MAYBE_EMIT_END2](), this;
4004
- }
4005
- // don't let the internal resume be overwritten
4006
- [RESUME2]() {
4007
- this[DESTROYED2] || (!this[DATALISTENERS2] && !this[PIPES2].length && (this[DISCARDED2] = !0), this[PAUSED2] = !1, this[FLOWING2] = !0, this.emit("resume"), this[BUFFER2].length ? this[FLUSH2]() : this[EOF2] ? this[MAYBE_EMIT_END2]() : this.emit("drain"));
4008
- }
4009
- /**
4010
- * Resume the stream if it is currently in a paused state
4011
- *
4012
- * If called when there are no pipe destinations or `data` event listeners,
4013
- * this will place the stream in a "discarded" state, where all data will
4014
- * be thrown away. The discarded state is removed if a pipe destination or
4015
- * data handler is added, if pause() is called, or if any synchronous or
4016
- * asynchronous iteration is started.
4017
- */
4018
- resume() {
4019
- return this[RESUME2]();
4020
- }
4021
- /**
4022
- * Pause the stream
4023
- */
4024
- pause() {
4025
- this[FLOWING2] = !1, this[PAUSED2] = !0, this[DISCARDED2] = !1;
4026
- }
4027
- /**
4028
- * true if the stream has been forcibly destroyed
4029
- */
4030
- get destroyed() {
4031
- return this[DESTROYED2];
4032
- }
4033
- /**
4034
- * true if the stream is currently in a flowing state, meaning that
4035
- * any writes will be immediately emitted.
4036
- */
4037
- get flowing() {
4038
- return this[FLOWING2];
4039
- }
4040
- /**
4041
- * true if the stream is currently in a paused state
4042
- */
4043
- get paused() {
4044
- return this[PAUSED2];
4045
- }
4046
- [BUFFERPUSH2](chunk) {
4047
- this[OBJECTMODE2] ? this[BUFFERLENGTH2] += 1 : this[BUFFERLENGTH2] += chunk.length, this[BUFFER2].push(chunk);
4048
- }
4049
- [BUFFERSHIFT2]() {
4050
- return this[OBJECTMODE2] ? this[BUFFERLENGTH2] -= 1 : this[BUFFERLENGTH2] -= this[BUFFER2][0].length, this[BUFFER2].shift();
4051
- }
4052
- [FLUSH2](noDrain = !1) {
4053
- do
4054
- ;
4055
- while (this[FLUSHCHUNK2](this[BUFFERSHIFT2]()) && this[BUFFER2].length);
4056
- !noDrain && !this[BUFFER2].length && !this[EOF2] && this.emit("drain");
4057
- }
4058
- [FLUSHCHUNK2](chunk) {
4059
- return this.emit("data", chunk), this[FLOWING2];
4060
- }
4061
- /**
4062
- * Pipe all data emitted by this stream into the destination provided.
4063
- *
4064
- * Triggers the flow of data.
4065
- */
4066
- pipe(dest, opts) {
4067
- if (this[DESTROYED2])
4068
- return dest;
4069
- this[DISCARDED2] = !1;
4070
- let ended = this[EMITTED_END2];
4071
- return opts = opts || {}, dest === proc2.stdout || dest === proc2.stderr ? opts.end = !1 : opts.end = opts.end !== !1, opts.proxyErrors = !!opts.proxyErrors, ended ? opts.end && dest.end() : (this[PIPES2].push(opts.proxyErrors ? new PipeProxyErrors2(this, dest, opts) : new Pipe2(this, dest, opts)), this[ASYNC2] ? defer2(() => this[RESUME2]()) : this[RESUME2]()), dest;
4072
- }
4073
- /**
4074
- * Fully unhook a piped destination stream.
4075
- *
4076
- * If the destination stream was the only consumer of this stream (ie,
4077
- * there are no other piped destinations or `'data'` event listeners)
4078
- * then the flow of data will stop until there is another consumer or
4079
- * {@link Minipass#resume} is explicitly called.
4080
- */
4081
- unpipe(dest) {
4082
- let p = this[PIPES2].find((p2) => p2.dest === dest);
4083
- p && (this[PIPES2].length === 1 ? (this[FLOWING2] && this[DATALISTENERS2] === 0 && (this[FLOWING2] = !1), this[PIPES2] = []) : this[PIPES2].splice(this[PIPES2].indexOf(p), 1), p.unpipe());
4084
- }
4085
- /**
4086
- * Alias for {@link Minipass#on}
4087
- */
4088
- addListener(ev, handler) {
4089
- return this.on(ev, handler);
4090
- }
4091
- /**
4092
- * Mostly identical to `EventEmitter.on`, with the following
4093
- * behavior differences to prevent data loss and unnecessary hangs:
4094
- *
4095
- * - Adding a 'data' event handler will trigger the flow of data
4096
- *
4097
- * - Adding a 'readable' event handler when there is data waiting to be read
4098
- * will cause 'readable' to be emitted immediately.
4099
- *
4100
- * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
4101
- * already passed will cause the event to be emitted immediately and all
4102
- * handlers removed.
4103
- *
4104
- * - Adding an 'error' event handler after an error has been emitted will
4105
- * cause the event to be re-emitted immediately with the error previously
4106
- * raised.
4107
- */
4108
- on(ev, handler) {
4109
- let ret = super.on(ev, handler);
4110
- if (ev === "data")
4111
- this[DISCARDED2] = !1, this[DATALISTENERS2]++, !this[PIPES2].length && !this[FLOWING2] && this[RESUME2]();
4112
- else if (ev === "readable" && this[BUFFERLENGTH2] !== 0)
4113
- super.emit("readable");
4114
- else if (isEndish2(ev) && this[EMITTED_END2])
4115
- super.emit(ev), this.removeAllListeners(ev);
4116
- else if (ev === "error" && this[EMITTED_ERROR2]) {
4117
- let h = handler;
4118
- this[ASYNC2] ? defer2(() => h.call(this, this[EMITTED_ERROR2])) : h.call(this, this[EMITTED_ERROR2]);
4119
- }
4120
- return ret;
4121
- }
4122
- /**
4123
- * Alias for {@link Minipass#off}
4124
- */
4125
- removeListener(ev, handler) {
4126
- return this.off(ev, handler);
4127
- }
4128
- /**
4129
- * Mostly identical to `EventEmitter.off`
4130
- *
4131
- * If a 'data' event handler is removed, and it was the last consumer
4132
- * (ie, there are no pipe destinations or other 'data' event listeners),
4133
- * then the flow of data will stop until there is another consumer or
4134
- * {@link Minipass#resume} is explicitly called.
4135
- */
4136
- off(ev, handler) {
4137
- let ret = super.off(ev, handler);
4138
- return ev === "data" && (this[DATALISTENERS2] = this.listeners("data").length, this[DATALISTENERS2] === 0 && !this[DISCARDED2] && !this[PIPES2].length && (this[FLOWING2] = !1)), ret;
4139
- }
4140
- /**
4141
- * Mostly identical to `EventEmitter.removeAllListeners`
4142
- *
4143
- * If all 'data' event handlers are removed, and they were the last consumer
4144
- * (ie, there are no pipe destinations), then the flow of data will stop
4145
- * until there is another consumer or {@link Minipass#resume} is explicitly
4146
- * called.
4147
- */
4148
- removeAllListeners(ev) {
4149
- let ret = super.removeAllListeners(ev);
4150
- return (ev === "data" || ev === void 0) && (this[DATALISTENERS2] = 0, !this[DISCARDED2] && !this[PIPES2].length && (this[FLOWING2] = !1)), ret;
4151
- }
4152
- /**
4153
- * true if the 'end' event has been emitted
4154
- */
4155
- get emittedEnd() {
4156
- return this[EMITTED_END2];
4157
- }
4158
- [MAYBE_EMIT_END2]() {
4159
- !this[EMITTING_END2] && !this[EMITTED_END2] && !this[DESTROYED2] && this[BUFFER2].length === 0 && this[EOF2] && (this[EMITTING_END2] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[CLOSED2] && this.emit("close"), this[EMITTING_END2] = !1);
4160
- }
4161
- /**
4162
- * Mostly identical to `EventEmitter.emit`, with the following
4163
- * behavior differences to prevent data loss and unnecessary hangs:
4164
- *
4165
- * If the stream has been destroyed, and the event is something other
4166
- * than 'close' or 'error', then `false` is returned and no handlers
4167
- * are called.
4168
- *
4169
- * If the event is 'end', and has already been emitted, then the event
4170
- * is ignored. If the stream is in a paused or non-flowing state, then
4171
- * the event will be deferred until data flow resumes. If the stream is
4172
- * async, then handlers will be called on the next tick rather than
4173
- * immediately.
4174
- *
4175
- * If the event is 'close', and 'end' has not yet been emitted, then
4176
- * the event will be deferred until after 'end' is emitted.
4177
- *
4178
- * If the event is 'error', and an AbortSignal was provided for the stream,
4179
- * and there are no listeners, then the event is ignored, matching the
4180
- * behavior of node core streams in the presense of an AbortSignal.
4181
- *
4182
- * If the event is 'finish' or 'prefinish', then all listeners will be
4183
- * removed after emitting the event, to prevent double-firing.
4184
- */
4185
- emit(ev, ...args) {
4186
- let data = args[0];
4187
- if (ev !== "error" && ev !== "close" && ev !== DESTROYED2 && this[DESTROYED2])
4188
- return !1;
4189
- if (ev === "data")
4190
- return !this[OBJECTMODE2] && !data ? !1 : this[ASYNC2] ? (defer2(() => this[EMITDATA2](data)), !0) : this[EMITDATA2](data);
4191
- if (ev === "end")
4192
- return this[EMITEND3]();
4193
- if (ev === "close") {
4194
- if (this[CLOSED2] = !0, !this[EMITTED_END2] && !this[DESTROYED2])
4195
- return !1;
4196
- let ret2 = super.emit("close");
4197
- return this.removeAllListeners("close"), ret2;
4198
- } else if (ev === "error") {
4199
- this[EMITTED_ERROR2] = data, super.emit(ERROR2, data);
4200
- let ret2 = !this[SIGNAL2] || this.listeners("error").length ? super.emit("error", data) : !1;
4201
- return this[MAYBE_EMIT_END2](), ret2;
4202
- } else if (ev === "resume") {
4203
- let ret2 = super.emit("resume");
4204
- return this[MAYBE_EMIT_END2](), ret2;
4205
- } else if (ev === "finish" || ev === "prefinish") {
4206
- let ret2 = super.emit(ev);
4207
- return this.removeAllListeners(ev), ret2;
4208
- }
4209
- let ret = super.emit(ev, ...args);
4210
- return this[MAYBE_EMIT_END2](), ret;
4211
- }
4212
- [EMITDATA2](data) {
4213
- for (let p of this[PIPES2])
4214
- p.dest.write(data) === !1 && this.pause();
4215
- let ret = this[DISCARDED2] ? !1 : super.emit("data", data);
4216
- return this[MAYBE_EMIT_END2](), ret;
4217
- }
4218
- [EMITEND3]() {
4219
- return this[EMITTED_END2] ? !1 : (this[EMITTED_END2] = !0, this.readable = !1, this[ASYNC2] ? (defer2(() => this[EMITEND22]()), !0) : this[EMITEND22]());
4220
- }
4221
- [EMITEND22]() {
4222
- if (this[DECODER2]) {
4223
- let data = this[DECODER2].end();
4224
- if (data) {
4225
- for (let p of this[PIPES2])
4226
- p.dest.write(data);
4227
- this[DISCARDED2] || super.emit("data", data);
4228
- }
4229
- }
4230
- for (let p of this[PIPES2])
4231
- p.end();
4232
- let ret = super.emit("end");
4233
- return this.removeAllListeners("end"), ret;
4234
- }
4235
- /**
4236
- * Return a Promise that resolves to an array of all emitted data once
4237
- * the stream ends.
4238
- */
4239
- async collect() {
4240
- let buf = Object.assign([], {
4241
- dataLength: 0
4242
- });
4243
- this[OBJECTMODE2] || (buf.dataLength = 0);
4244
- let p = this.promise();
4245
- return this.on("data", (c) => {
4246
- buf.push(c), this[OBJECTMODE2] || (buf.dataLength += c.length);
4247
- }), await p, buf;
4248
- }
4249
- /**
4250
- * Return a Promise that resolves to the concatenation of all emitted data
4251
- * once the stream ends.
4252
- *
4253
- * Not allowed on objectMode streams.
4254
- */
4255
- async concat() {
4256
- if (this[OBJECTMODE2])
4257
- throw new Error("cannot concat in objectMode");
4258
- let buf = await this.collect();
4259
- return this[ENCODING2] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
4260
- }
4261
- /**
4262
- * Return a void Promise that resolves once the stream ends.
4263
- */
4264
- async promise() {
4265
- return new Promise((resolve, reject) => {
4266
- this.on(DESTROYED2, () => reject(new Error("stream destroyed"))), this.on("error", (er) => reject(er)), this.on("end", () => resolve());
4267
- });
4268
- }
4269
- /**
4270
- * Asynchronous `for await of` iteration.
4271
- *
4272
- * This will continue emitting all chunks until the stream terminates.
4273
- */
4274
- [Symbol.asyncIterator]() {
4275
- this[DISCARDED2] = !1;
4276
- let stopped = !1, stop = async () => (this.pause(), stopped = !0, { value: void 0, done: !0 });
4277
- return {
4278
- next: () => {
4279
- if (stopped)
4280
- return stop();
4281
- let res = this.read();
4282
- if (res !== null)
4283
- return Promise.resolve({ done: !1, value: res });
4284
- if (this[EOF2])
4285
- return stop();
4286
- let resolve, reject, onerr = (er) => {
4287
- this.off("data", ondata), this.off("end", onend), this.off(DESTROYED2, ondestroy), stop(), reject(er);
4288
- }, ondata = (value) => {
4289
- this.off("error", onerr), this.off("end", onend), this.off(DESTROYED2, ondestroy), this.pause(), resolve({ value, done: !!this[EOF2] });
4290
- }, onend = () => {
4291
- this.off("error", onerr), this.off("data", ondata), this.off(DESTROYED2, ondestroy), stop(), resolve({ done: !0, value: void 0 });
4292
- }, ondestroy = () => onerr(new Error("stream destroyed"));
4293
- return new Promise((res2, rej) => {
4294
- reject = rej, resolve = res2, this.once(DESTROYED2, ondestroy), this.once("error", onerr), this.once("end", onend), this.once("data", ondata);
4295
- });
4296
- },
4297
- throw: stop,
4298
- return: stop,
4299
- [Symbol.asyncIterator]() {
4300
- return this;
4301
- }
4302
- };
4303
- }
4304
- /**
4305
- * Synchronous `for of` iteration.
4306
- *
4307
- * The iteration will terminate when the internal buffer runs out, even
4308
- * if the stream has not yet terminated.
4309
- */
4310
- [Symbol.iterator]() {
4311
- this[DISCARDED2] = !1;
4312
- let stopped = !1, stop = () => (this.pause(), this.off(ERROR2, stop), this.off(DESTROYED2, stop), this.off("end", stop), stopped = !0, { done: !0, value: void 0 }), next = () => {
4313
- if (stopped)
4314
- return stop();
4315
- let value = this.read();
4316
- return value === null ? stop() : { done: !1, value };
4317
- };
4318
- return this.once("end", stop), this.once(ERROR2, stop), this.once(DESTROYED2, stop), {
4319
- next,
4320
- throw: stop,
4321
- return: stop,
4322
- [Symbol.iterator]() {
4323
- return this;
4324
- }
4325
- };
4326
- }
4327
- /**
4328
- * Destroy a stream, preventing it from being used for any further purpose.
4329
- *
4330
- * If the stream has a `close()` method, then it will be called on
4331
- * destruction.
4332
- *
4333
- * After destruction, any attempt to write data, read data, or emit most
4334
- * events will be ignored.
4335
- *
4336
- * If an error argument is provided, then it will be emitted in an
4337
- * 'error' event.
4338
- */
4339
- destroy(er) {
4340
- if (this[DESTROYED2])
4341
- return er ? this.emit("error", er) : this.emit(DESTROYED2), this;
4342
- this[DESTROYED2] = !0, this[DISCARDED2] = !0, this[BUFFER2].length = 0, this[BUFFERLENGTH2] = 0;
4343
- let wc = this;
4344
- return typeof wc.close == "function" && !this[CLOSED2] && wc.close(), er ? this.emit("error", er) : this.emit(DESTROYED2), this;
4345
- }
4346
- /**
4347
- * Alias for {@link isStream}
4348
- *
4349
- * Former export location, maintained for backwards compatibility.
4350
- *
4351
- * @deprecated
4352
- */
4353
- static get isStream() {
4354
- return isStream2;
4355
- }
4356
- };
4357
-
4358
3799
  // ../../node_modules/glob/dist/esm/ignore.js
4359
3800
  var defaultPlatform2 = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", Ignore = class {
4360
3801
  relative;
@@ -4764,7 +4205,7 @@ var makeIgnore = (ignore, opts) => typeof ignore == "string" ? new Ignore([ignor
4764
4205
  }, GlobStream = class extends GlobUtil {
4765
4206
  results;
4766
4207
  constructor(patterns, path2, opts) {
4767
- super(patterns, path2, opts), this.results = new Minipass2({
4208
+ super(patterns, path2, opts), this.results = new Minipass({
4768
4209
  signal: this.signal,
4769
4210
  objectMode: !0
4770
4211
  }), this.results.on("drain", () => this.resume()), this.results.on("resume", () => this.resume());
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
1
+ import CJS_COMPAT_NODE_URL_phceqgr585q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_phceqgr585q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_phceqgr585q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_phceqgr585q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_phceqgr585q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_phceqgr585q.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  __commonJS
14
- } from "./chunk-5WQXPM6D.js";
14
+ } from "./chunk-AXDM43NU.js";
15
15
 
16
16
  // ../../node_modules/ts-dedent/dist/index.js
17
17
  var require_dist = __commonJS({