@storybook/addon-vitest 11.0.0-beta.0 → 11.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
1
+ import CJS_COMPAT_NODE_URL_ycvuvp62uk from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_ycvuvp62uk from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_ycvuvp62uk from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_ycvuvp62uk.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_ycvuvp62uk.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_ycvuvp62uk.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -14,16 +14,16 @@ import {
14
14
  globalThis_,
15
15
  log,
16
16
  noop
17
- } from "./_node-chunks/chunk-ATRY5NRC.js";
17
+ } from "./_node-chunks/chunk-DX5XAAV3.js";
18
18
  import {
19
19
  require_picocolors
20
- } from "./_node-chunks/chunk-RNV4WF5A.js";
20
+ } from "./_node-chunks/chunk-SXATVQ73.js";
21
21
  import {
22
22
  require_dist
23
- } from "./_node-chunks/chunk-3W3XGTQZ.js";
23
+ } from "./_node-chunks/chunk-YLZRXWKY.js";
24
24
  import {
25
25
  normalize
26
- } from "./_node-chunks/chunk-YGNVYBQM.js";
26
+ } from "./_node-chunks/chunk-H6P4MQ2A.js";
27
27
  import {
28
28
  ADDON_ID2 as ADDON_ID,
29
29
  COVERAGE_DIRECTORY,
@@ -35,882 +35,10 @@ import {
35
35
  TRIGGER_TEST_RUN_REQUEST,
36
36
  TRIGGER_TEST_RUN_RESPONSE,
37
37
  storeOptions
38
- } from "./_node-chunks/chunk-U6IN5TYZ.js";
38
+ } from "./_node-chunks/chunk-M4HPIOHU.js";
39
39
  import {
40
- require_compare,
41
- require_constants,
42
- require_debug,
43
- require_gte,
44
- require_identifiers,
45
- require_parse_options,
46
- require_re,
47
- require_semver
48
- } from "./_node-chunks/chunk-GSEDOCKO.js";
49
- import {
50
- __commonJS,
51
40
  __toESM
52
- } from "./_node-chunks/chunk-4GNOAC4E.js";
53
-
54
- // ../../../node_modules/semver/functions/parse.js
55
- var require_parse = __commonJS({
56
- "../../../node_modules/semver/functions/parse.js"(exports, module) {
57
- "use strict";
58
- var SemVer = require_semver(), parse2 = (version, options, throwErrors = !1) => {
59
- if (version instanceof SemVer)
60
- return version;
61
- try {
62
- return new SemVer(version, options);
63
- } catch (er) {
64
- if (!throwErrors)
65
- return null;
66
- throw er;
67
- }
68
- };
69
- module.exports = parse2;
70
- }
71
- });
72
-
73
- // ../../../node_modules/semver/functions/valid.js
74
- var require_valid = __commonJS({
75
- "../../../node_modules/semver/functions/valid.js"(exports, module) {
76
- "use strict";
77
- var parse2 = require_parse(), valid = (version, options) => {
78
- let v = parse2(version, options);
79
- return v ? v.version : null;
80
- };
81
- module.exports = valid;
82
- }
83
- });
84
-
85
- // ../../../node_modules/semver/functions/clean.js
86
- var require_clean = __commonJS({
87
- "../../../node_modules/semver/functions/clean.js"(exports, module) {
88
- "use strict";
89
- var parse2 = require_parse(), clean = (version, options) => {
90
- let s = parse2(version.trim().replace(/^[=v]+/, ""), options);
91
- return s ? s.version : null;
92
- };
93
- module.exports = clean;
94
- }
95
- });
96
-
97
- // ../../../node_modules/semver/functions/inc.js
98
- var require_inc = __commonJS({
99
- "../../../node_modules/semver/functions/inc.js"(exports, module) {
100
- "use strict";
101
- var SemVer = require_semver(), inc = (version, release, options, identifier, identifierBase) => {
102
- typeof options == "string" && (identifierBase = identifier, identifier = options, options = void 0);
103
- try {
104
- return new SemVer(
105
- version instanceof SemVer ? version.version : version,
106
- options
107
- ).inc(release, identifier, identifierBase).version;
108
- } catch {
109
- return null;
110
- }
111
- };
112
- module.exports = inc;
113
- }
114
- });
115
-
116
- // ../../../node_modules/semver/functions/diff.js
117
- var require_diff = __commonJS({
118
- "../../../node_modules/semver/functions/diff.js"(exports, module) {
119
- "use strict";
120
- var parse2 = require_parse(), diff = (version1, version2) => {
121
- let v1 = parse2(version1, null, !0), v2 = parse2(version2, null, !0), comparison = v1.compare(v2);
122
- if (comparison === 0)
123
- return null;
124
- let v1Higher = comparison > 0, highVersion = v1Higher ? v1 : v2, lowVersion = v1Higher ? v2 : v1, highHasPre = !!highVersion.prerelease.length;
125
- if (!!lowVersion.prerelease.length && !highHasPre) {
126
- if (!lowVersion.patch && !lowVersion.minor)
127
- return "major";
128
- if (lowVersion.compareMain(highVersion) === 0)
129
- return lowVersion.minor && !lowVersion.patch ? "minor" : "patch";
130
- }
131
- let prefix = highHasPre ? "pre" : "";
132
- return v1.major !== v2.major ? prefix + "major" : v1.minor !== v2.minor ? prefix + "minor" : v1.patch !== v2.patch ? prefix + "patch" : "prerelease";
133
- };
134
- module.exports = diff;
135
- }
136
- });
137
-
138
- // ../../../node_modules/semver/functions/major.js
139
- var require_major = __commonJS({
140
- "../../../node_modules/semver/functions/major.js"(exports, module) {
141
- "use strict";
142
- var SemVer = require_semver(), major = (a, loose) => new SemVer(a, loose).major;
143
- module.exports = major;
144
- }
145
- });
146
-
147
- // ../../../node_modules/semver/functions/minor.js
148
- var require_minor = __commonJS({
149
- "../../../node_modules/semver/functions/minor.js"(exports, module) {
150
- "use strict";
151
- var SemVer = require_semver(), minor = (a, loose) => new SemVer(a, loose).minor;
152
- module.exports = minor;
153
- }
154
- });
155
-
156
- // ../../../node_modules/semver/functions/patch.js
157
- var require_patch = __commonJS({
158
- "../../../node_modules/semver/functions/patch.js"(exports, module) {
159
- "use strict";
160
- var SemVer = require_semver(), patch = (a, loose) => new SemVer(a, loose).patch;
161
- module.exports = patch;
162
- }
163
- });
164
-
165
- // ../../../node_modules/semver/functions/prerelease.js
166
- var require_prerelease = __commonJS({
167
- "../../../node_modules/semver/functions/prerelease.js"(exports, module) {
168
- "use strict";
169
- var parse2 = require_parse(), prerelease = (version, options) => {
170
- let parsed = parse2(version, options);
171
- return parsed && parsed.prerelease.length ? parsed.prerelease : null;
172
- };
173
- module.exports = prerelease;
174
- }
175
- });
176
-
177
- // ../../../node_modules/semver/functions/rcompare.js
178
- var require_rcompare = __commonJS({
179
- "../../../node_modules/semver/functions/rcompare.js"(exports, module) {
180
- "use strict";
181
- var compare = require_compare(), rcompare = (a, b, loose) => compare(b, a, loose);
182
- module.exports = rcompare;
183
- }
184
- });
185
-
186
- // ../../../node_modules/semver/functions/compare-loose.js
187
- var require_compare_loose = __commonJS({
188
- "../../../node_modules/semver/functions/compare-loose.js"(exports, module) {
189
- "use strict";
190
- var compare = require_compare(), compareLoose = (a, b) => compare(a, b, !0);
191
- module.exports = compareLoose;
192
- }
193
- });
194
-
195
- // ../../../node_modules/semver/functions/compare-build.js
196
- var require_compare_build = __commonJS({
197
- "../../../node_modules/semver/functions/compare-build.js"(exports, module) {
198
- "use strict";
199
- var SemVer = require_semver(), compareBuild = (a, b, loose) => {
200
- let versionA = new SemVer(a, loose), versionB = new SemVer(b, loose);
201
- return versionA.compare(versionB) || versionA.compareBuild(versionB);
202
- };
203
- module.exports = compareBuild;
204
- }
205
- });
206
-
207
- // ../../../node_modules/semver/functions/sort.js
208
- var require_sort = __commonJS({
209
- "../../../node_modules/semver/functions/sort.js"(exports, module) {
210
- "use strict";
211
- var compareBuild = require_compare_build(), sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
212
- module.exports = sort;
213
- }
214
- });
215
-
216
- // ../../../node_modules/semver/functions/rsort.js
217
- var require_rsort = __commonJS({
218
- "../../../node_modules/semver/functions/rsort.js"(exports, module) {
219
- "use strict";
220
- var compareBuild = require_compare_build(), rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
221
- module.exports = rsort;
222
- }
223
- });
224
-
225
- // ../../../node_modules/semver/functions/gt.js
226
- var require_gt = __commonJS({
227
- "../../../node_modules/semver/functions/gt.js"(exports, module) {
228
- "use strict";
229
- var compare = require_compare(), gt = (a, b, loose) => compare(a, b, loose) > 0;
230
- module.exports = gt;
231
- }
232
- });
233
-
234
- // ../../../node_modules/semver/functions/lt.js
235
- var require_lt = __commonJS({
236
- "../../../node_modules/semver/functions/lt.js"(exports, module) {
237
- "use strict";
238
- var compare = require_compare(), lt = (a, b, loose) => compare(a, b, loose) < 0;
239
- module.exports = lt;
240
- }
241
- });
242
-
243
- // ../../../node_modules/semver/functions/eq.js
244
- var require_eq = __commonJS({
245
- "../../../node_modules/semver/functions/eq.js"(exports, module) {
246
- "use strict";
247
- var compare = require_compare(), eq2 = (a, b, loose) => compare(a, b, loose) === 0;
248
- module.exports = eq2;
249
- }
250
- });
251
-
252
- // ../../../node_modules/semver/functions/neq.js
253
- var require_neq = __commonJS({
254
- "../../../node_modules/semver/functions/neq.js"(exports, module) {
255
- "use strict";
256
- var compare = require_compare(), neq = (a, b, loose) => compare(a, b, loose) !== 0;
257
- module.exports = neq;
258
- }
259
- });
260
-
261
- // ../../../node_modules/semver/functions/lte.js
262
- var require_lte = __commonJS({
263
- "../../../node_modules/semver/functions/lte.js"(exports, module) {
264
- "use strict";
265
- var compare = require_compare(), lte = (a, b, loose) => compare(a, b, loose) <= 0;
266
- module.exports = lte;
267
- }
268
- });
269
-
270
- // ../../../node_modules/semver/functions/cmp.js
271
- var require_cmp = __commonJS({
272
- "../../../node_modules/semver/functions/cmp.js"(exports, module) {
273
- "use strict";
274
- var eq2 = require_eq(), neq = require_neq(), gt = require_gt(), gte = require_gte(), lt = require_lt(), lte = require_lte(), cmp = (a, op, b, loose) => {
275
- switch (op) {
276
- case "===":
277
- return typeof a == "object" && (a = a.version), typeof b == "object" && (b = b.version), a === b;
278
- case "!==":
279
- return typeof a == "object" && (a = a.version), typeof b == "object" && (b = b.version), a !== b;
280
- case "":
281
- case "=":
282
- case "==":
283
- return eq2(a, b, loose);
284
- case "!=":
285
- return neq(a, b, loose);
286
- case ">":
287
- return gt(a, b, loose);
288
- case ">=":
289
- return gte(a, b, loose);
290
- case "<":
291
- return lt(a, b, loose);
292
- case "<=":
293
- return lte(a, b, loose);
294
- default:
295
- throw new TypeError(`Invalid operator: ${op}`);
296
- }
297
- };
298
- module.exports = cmp;
299
- }
300
- });
301
-
302
- // ../../../node_modules/semver/functions/coerce.js
303
- var require_coerce = __commonJS({
304
- "../../../node_modules/semver/functions/coerce.js"(exports, module) {
305
- "use strict";
306
- var SemVer = require_semver(), parse2 = require_parse(), { safeRe: re, t } = require_re(), coerce = (version, options) => {
307
- if (version instanceof SemVer)
308
- return version;
309
- if (typeof version == "number" && (version = String(version)), typeof version != "string")
310
- return null;
311
- options = options || {};
312
- let match = null;
313
- if (!options.rtl)
314
- match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
315
- else {
316
- let coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL], next;
317
- for (; (next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length); )
318
- (!match || next.index + next[0].length !== match.index + match[0].length) && (match = next), coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
319
- coerceRtlRegex.lastIndex = -1;
320
- }
321
- if (match === null)
322
- return null;
323
- let major = match[2], minor = match[3] || "0", patch = match[4] || "0", prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "", build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
324
- return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options);
325
- };
326
- module.exports = coerce;
327
- }
328
- });
329
-
330
- // ../../../node_modules/semver/functions/truncate.js
331
- var require_truncate = __commonJS({
332
- "../../../node_modules/semver/functions/truncate.js"(exports, module) {
333
- "use strict";
334
- var parse2 = require_parse(), constants = require_constants(), SemVer = require_semver(), truncate = (version, truncation, options) => {
335
- if (!constants.RELEASE_TYPES.includes(truncation))
336
- return null;
337
- let clonedVersion = cloneInputVersion(version, options);
338
- return clonedVersion && doTruncation(clonedVersion, truncation);
339
- }, cloneInputVersion = (version, options) => {
340
- let versionStringToParse = version instanceof SemVer ? version.version : version;
341
- return parse2(versionStringToParse, options);
342
- }, doTruncation = (version, truncation) => {
343
- if (isPrerelease(truncation))
344
- return version.version;
345
- switch (version.prerelease = [], truncation) {
346
- case "major":
347
- version.minor = 0, version.patch = 0;
348
- break;
349
- case "minor":
350
- version.patch = 0;
351
- break;
352
- }
353
- return version.format();
354
- }, isPrerelease = (type) => type.startsWith("pre");
355
- module.exports = truncate;
356
- }
357
- });
358
-
359
- // ../../../node_modules/semver/internal/lrucache.js
360
- var require_lrucache = __commonJS({
361
- "../../../node_modules/semver/internal/lrucache.js"(exports, module) {
362
- "use strict";
363
- var LRUCache = class {
364
- constructor() {
365
- this.max = 1e3, this.map = /* @__PURE__ */ new Map();
366
- }
367
- get(key) {
368
- let value = this.map.get(key);
369
- if (value !== void 0)
370
- return this.map.delete(key), this.map.set(key, value), value;
371
- }
372
- delete(key) {
373
- return this.map.delete(key);
374
- }
375
- set(key, value) {
376
- if (!this.delete(key) && value !== void 0) {
377
- if (this.map.size >= this.max) {
378
- let firstKey = this.map.keys().next().value;
379
- this.delete(firstKey);
380
- }
381
- this.map.set(key, value);
382
- }
383
- return this;
384
- }
385
- };
386
- module.exports = LRUCache;
387
- }
388
- });
389
-
390
- // ../../../node_modules/semver/classes/range.js
391
- var require_range = __commonJS({
392
- "../../../node_modules/semver/classes/range.js"(exports, module) {
393
- "use strict";
394
- var SPACE_CHARACTERS = /\s+/g, Range = class _Range {
395
- constructor(range, options) {
396
- if (options = parseOptions(options), range instanceof _Range)
397
- return range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease ? range : new _Range(range.raw, options);
398
- if (range instanceof Comparator)
399
- return this.raw = range.value, this.set = [[range]], this.formatted = void 0, this;
400
- if (this.options = options, this.loose = !!options.loose, this.includePrerelease = !!options.includePrerelease, this.raw = range.trim().replace(SPACE_CHARACTERS, " "), this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length), !this.set.length)
401
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
402
- if (this.set.length > 1) {
403
- let first = this.set[0];
404
- if (this.set = this.set.filter((c) => !isNullSet(c[0])), this.set.length === 0)
405
- this.set = [first];
406
- else if (this.set.length > 1) {
407
- for (let c of this.set)
408
- if (c.length === 1 && isAny(c[0])) {
409
- this.set = [c];
410
- break;
411
- }
412
- }
413
- }
414
- this.formatted = void 0;
415
- }
416
- get range() {
417
- if (this.formatted === void 0) {
418
- this.formatted = "";
419
- for (let i = 0; i < this.set.length; i++) {
420
- i > 0 && (this.formatted += "||");
421
- let comps = this.set[i];
422
- for (let k = 0; k < comps.length; k++)
423
- k > 0 && (this.formatted += " "), this.formatted += comps[k].toString().trim();
424
- }
425
- }
426
- return this.formatted;
427
- }
428
- format() {
429
- return this.range;
430
- }
431
- toString() {
432
- return this.range;
433
- }
434
- parseRange(range) {
435
- range = range.replace(BUILDSTRIPRE, "");
436
- let memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range, cached = cache.get(memoKey);
437
- if (cached)
438
- return cached;
439
- let loose = this.options.loose, hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
440
- range = range.replace(hr, hyphenReplace(this.options.includePrerelease)), debug("hyphen replace", range), range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace), debug("comparator trim", range), range = range.replace(re[t.TILDETRIM], tildeTrimReplace), debug("tilde trim", range), range = range.replace(re[t.CARETTRIM], caretTrimReplace), debug("caret trim", range);
441
- let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
442
- loose && (rangeList = rangeList.filter((comp) => (debug("loose invalid filter", comp, this.options), !!comp.match(re[t.COMPARATORLOOSE])))), debug("range list", rangeList);
443
- let rangeMap = /* @__PURE__ */ new Map(), comparators = rangeList.map((comp) => new Comparator(comp, this.options));
444
- for (let comp of comparators) {
445
- if (isNullSet(comp))
446
- return [comp];
447
- rangeMap.set(comp.value, comp);
448
- }
449
- rangeMap.size > 1 && rangeMap.has("") && rangeMap.delete("");
450
- let result = [...rangeMap.values()];
451
- return cache.set(memoKey, result), result;
452
- }
453
- intersects(range, options) {
454
- if (!(range instanceof _Range))
455
- throw new TypeError("a Range is required");
456
- return this.set.some((thisComparators) => isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => rangeComparators.every((rangeComparator) => thisComparator.intersects(rangeComparator, options)))));
457
- }
458
- // if ANY of the sets match ALL of its comparators, then pass
459
- test(version) {
460
- if (!version)
461
- return !1;
462
- if (typeof version == "string")
463
- try {
464
- version = new SemVer(version, this.options);
465
- } catch {
466
- return !1;
467
- }
468
- for (let i = 0; i < this.set.length; i++)
469
- if (testSet(this.set[i], version, this.options))
470
- return !0;
471
- return !1;
472
- }
473
- };
474
- module.exports = Range;
475
- var LRU = require_lrucache(), cache = new LRU(), parseOptions = require_parse_options(), Comparator = require_comparator(), debug = require_debug(), SemVer = require_semver(), {
476
- safeRe: re,
477
- src,
478
- t,
479
- comparatorTrimReplace,
480
- tildeTrimReplace,
481
- caretTrimReplace
482
- } = require_re(), { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(), BUILDSTRIPRE = new RegExp(src[t.BUILD], "g"), isNullSet = (c) => c.value === "<0.0.0-0", isAny = (c) => c.value === "", isSatisfiable = (comparators, options) => {
483
- let result = !0, remainingComparators = comparators.slice(), testComparator = remainingComparators.pop();
484
- for (; result && remainingComparators.length; )
485
- result = remainingComparators.every((otherComparator) => testComparator.intersects(otherComparator, options)), testComparator = remainingComparators.pop();
486
- return result;
487
- }, parseComparator = (comp, options) => (comp = comp.replace(re[t.BUILD], ""), debug("comp", comp, options), comp = replaceCarets(comp, options), debug("caret", comp), comp = replaceTildes(comp, options), debug("tildes", comp), comp = replaceXRanges(comp, options), debug("xrange", comp), comp = replaceStars(comp, options), debug("stars", comp), comp), isX = (id) => !id || id.toLowerCase() === "x" || id === "*", invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p), replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "), replaceTilde = (comp, options) => {
488
- let r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE], z = options.includePrerelease ? "-0" : "";
489
- return comp.replace(r, (_, M, m, p, pr) => {
490
- debug("tilde", comp, _, M, m, p, pr);
491
- let ret;
492
- return isX(M) ? ret = "" : isX(m) ? ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` : isX(p) ? ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` : pr ? (debug("replaceTilde pr", pr), ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`) : ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`, debug("tilde return", ret), ret;
493
- });
494
- }, replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "), replaceCaret = (comp, options) => {
495
- debug("caret", comp, options);
496
- let r = options.loose ? re[t.CARETLOOSE] : re[t.CARET], z = options.includePrerelease ? "-0" : "";
497
- return comp.replace(r, (_, M, m, p, pr) => {
498
- debug("caret", comp, _, M, m, p, pr);
499
- let ret;
500
- return isX(M) ? ret = "" : isX(m) ? ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` : isX(p) ? M === "0" ? ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` : ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` : pr ? (debug("replaceCaret pr", pr), M === "0" ? m === "0" ? ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0` : ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0` : ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`) : (debug("no pr"), M === "0" ? m === "0" ? ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0` : ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0` : ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`), debug("caret return", ret), ret;
501
- });
502
- }, replaceXRanges = (comp, options) => (debug("replaceXRanges", comp, options), comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ")), replaceXRange = (comp, options) => {
503
- comp = comp.trim();
504
- let r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
505
- return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
506
- if (debug("xRange", comp, ret, gtlt, M, m, p, pr), invalidXRangeOrder(M, m, p))
507
- return comp;
508
- let xM = isX(M), xm = xM || isX(m), xp = xm || isX(p), anyX = xp;
509
- return gtlt === "=" && anyX && (gtlt = ""), pr = options.includePrerelease ? "-0" : "", xM ? gtlt === ">" || gtlt === "<" ? ret = "<0.0.0-0" : ret = "*" : gtlt && anyX ? (xm && (m = 0), p = 0, gtlt === ">" ? (gtlt = ">=", xm ? (M = +M + 1, m = 0, p = 0) : (m = +m + 1, p = 0)) : gtlt === "<=" && (gtlt = "<", xm ? M = +M + 1 : m = +m + 1), gtlt === "<" && (pr = "-0"), ret = `${gtlt + M}.${m}.${p}${pr}`) : xm ? ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` : xp && (ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`), debug("xRange return", ret), ret;
510
- });
511
- }, replaceStars = (comp, options) => (debug("replaceStars", comp, options), comp.trim().replace(re[t.STAR], "")), replaceGTE0 = (comp, options) => (debug("replaceGTE0", comp, options), comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "")), hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => (isX(fM) ? from = "" : isX(fm) ? from = `>=${fM}.0.0${incPr ? "-0" : ""}` : isX(fp) ? from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}` : fpr ? from = `>=${from}` : from = `>=${from}${incPr ? "-0" : ""}`, isX(tM) ? to = "" : isX(tm) ? to = `<${+tM + 1}.0.0-0` : isX(tp) ? to = `<${tM}.${+tm + 1}.0-0` : tpr ? to = `<=${tM}.${tm}.${tp}-${tpr}` : incPr ? to = `<${tM}.${tm}.${+tp + 1}-0` : to = `<=${to}`, `${from} ${to}`.trim()), testSet = (set, version, options) => {
512
- for (let i = 0; i < set.length; i++)
513
- if (!set[i].test(version))
514
- return !1;
515
- if (version.prerelease.length && !options.includePrerelease) {
516
- for (let i = 0; i < set.length; i++)
517
- if (debug(set[i].semver), set[i].semver !== Comparator.ANY && set[i].semver.prerelease.length > 0) {
518
- let allowed = set[i].semver;
519
- if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch)
520
- return !0;
521
- }
522
- return !1;
523
- }
524
- return !0;
525
- };
526
- }
527
- });
528
-
529
- // ../../../node_modules/semver/classes/comparator.js
530
- var require_comparator = __commonJS({
531
- "../../../node_modules/semver/classes/comparator.js"(exports, module) {
532
- "use strict";
533
- var ANY = /* @__PURE__ */ Symbol("SemVer ANY"), Comparator = class _Comparator {
534
- static get ANY() {
535
- return ANY;
536
- }
537
- constructor(comp, options) {
538
- if (options = parseOptions(options), comp instanceof _Comparator) {
539
- if (comp.loose === !!options.loose)
540
- return comp;
541
- comp = comp.value;
542
- }
543
- comp = comp.trim().split(/\s+/).join(" "), debug("comparator", comp, options), this.options = options, this.loose = !!options.loose, this.parse(comp), this.semver === ANY ? this.value = "" : this.value = this.operator + this.semver.version, debug("comp", this);
544
- }
545
- parse(comp) {
546
- let r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR], m = comp.match(r);
547
- if (!m)
548
- throw new TypeError(`Invalid comparator: ${comp}`);
549
- this.operator = m[1] !== void 0 ? m[1] : "", this.operator === "=" && (this.operator = ""), m[2] ? this.semver = new SemVer(m[2], this.options.loose) : this.semver = ANY;
550
- }
551
- toString() {
552
- return this.value;
553
- }
554
- test(version) {
555
- if (debug("Comparator.test", version, this.options.loose), this.semver === ANY || version === ANY)
556
- return !0;
557
- if (typeof version == "string")
558
- try {
559
- version = new SemVer(version, this.options);
560
- } catch {
561
- return !1;
562
- }
563
- return cmp(version, this.operator, this.semver, this.options);
564
- }
565
- intersects(comp, options) {
566
- if (!(comp instanceof _Comparator))
567
- throw new TypeError("a Comparator is required");
568
- return this.operator === "" ? this.value === "" ? !0 : new Range(comp.value, options).test(this.value) : comp.operator === "" ? comp.value === "" ? !0 : new Range(this.value, options).test(comp.semver) : (options = parseOptions(options), options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0") || !options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && comp.operator.startsWith(">") || this.operator.startsWith("<") && comp.operator.startsWith("<") || this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=") || cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<") || cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")));
569
- }
570
- };
571
- module.exports = Comparator;
572
- var parseOptions = require_parse_options(), { safeRe: re, t } = require_re(), cmp = require_cmp(), debug = require_debug(), SemVer = require_semver(), Range = require_range();
573
- }
574
- });
575
-
576
- // ../../../node_modules/semver/functions/satisfies.js
577
- var require_satisfies = __commonJS({
578
- "../../../node_modules/semver/functions/satisfies.js"(exports, module) {
579
- "use strict";
580
- var Range = require_range(), satisfies = (version, range, options) => {
581
- try {
582
- range = new Range(range, options);
583
- } catch {
584
- return !1;
585
- }
586
- return range.test(version);
587
- };
588
- module.exports = satisfies;
589
- }
590
- });
591
-
592
- // ../../../node_modules/semver/ranges/to-comparators.js
593
- var require_to_comparators = __commonJS({
594
- "../../../node_modules/semver/ranges/to-comparators.js"(exports, module) {
595
- "use strict";
596
- var Range = require_range(), toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
597
- module.exports = toComparators;
598
- }
599
- });
600
-
601
- // ../../../node_modules/semver/ranges/max-satisfying.js
602
- var require_max_satisfying = __commonJS({
603
- "../../../node_modules/semver/ranges/max-satisfying.js"(exports, module) {
604
- "use strict";
605
- var SemVer = require_semver(), Range = require_range(), maxSatisfying = (versions, range, options) => {
606
- let max = null, maxSV = null, rangeObj = null;
607
- try {
608
- rangeObj = new Range(range, options);
609
- } catch {
610
- return null;
611
- }
612
- return versions.forEach((v) => {
613
- rangeObj.test(v) && (!max || maxSV.compare(v) === -1) && (max = v, maxSV = new SemVer(max, options));
614
- }), max;
615
- };
616
- module.exports = maxSatisfying;
617
- }
618
- });
619
-
620
- // ../../../node_modules/semver/ranges/min-satisfying.js
621
- var require_min_satisfying = __commonJS({
622
- "../../../node_modules/semver/ranges/min-satisfying.js"(exports, module) {
623
- "use strict";
624
- var SemVer = require_semver(), Range = require_range(), minSatisfying = (versions, range, options) => {
625
- let min = null, minSV = null, rangeObj = null;
626
- try {
627
- rangeObj = new Range(range, options);
628
- } catch {
629
- return null;
630
- }
631
- return versions.forEach((v) => {
632
- rangeObj.test(v) && (!min || minSV.compare(v) === 1) && (min = v, minSV = new SemVer(min, options));
633
- }), min;
634
- };
635
- module.exports = minSatisfying;
636
- }
637
- });
638
-
639
- // ../../../node_modules/semver/ranges/min-version.js
640
- var require_min_version = __commonJS({
641
- "../../../node_modules/semver/ranges/min-version.js"(exports, module) {
642
- "use strict";
643
- var SemVer = require_semver(), Range = require_range(), gt = require_gt(), minVersion = (range, loose) => {
644
- range = new Range(range, loose);
645
- let minver = new SemVer("0.0.0");
646
- if (range.test(minver) || (minver = new SemVer("0.0.0-0"), range.test(minver)))
647
- return minver;
648
- minver = null;
649
- for (let i = 0; i < range.set.length; ++i) {
650
- let comparators = range.set[i], setMin = null;
651
- comparators.forEach((comparator) => {
652
- let compver = new SemVer(comparator.semver.version);
653
- switch (comparator.operator) {
654
- case ">":
655
- compver.prerelease.length === 0 ? compver.patch++ : compver.prerelease.push(0), compver.raw = compver.format();
656
- /* fallthrough */
657
- case "":
658
- case ">=":
659
- (!setMin || gt(compver, setMin)) && (setMin = compver);
660
- break;
661
- case "<":
662
- case "<=":
663
- break;
664
- /* istanbul ignore next */
665
- default:
666
- throw new Error(`Unexpected operation: ${comparator.operator}`);
667
- }
668
- }), setMin && (!minver || gt(minver, setMin)) && (minver = setMin);
669
- }
670
- return minver && range.test(minver) ? minver : null;
671
- };
672
- module.exports = minVersion;
673
- }
674
- });
675
-
676
- // ../../../node_modules/semver/ranges/valid.js
677
- var require_valid2 = __commonJS({
678
- "../../../node_modules/semver/ranges/valid.js"(exports, module) {
679
- "use strict";
680
- var Range = require_range(), validRange = (range, options) => {
681
- try {
682
- return new Range(range, options).range || "*";
683
- } catch {
684
- return null;
685
- }
686
- };
687
- module.exports = validRange;
688
- }
689
- });
690
-
691
- // ../../../node_modules/semver/ranges/outside.js
692
- var require_outside = __commonJS({
693
- "../../../node_modules/semver/ranges/outside.js"(exports, module) {
694
- "use strict";
695
- var SemVer = require_semver(), Comparator = require_comparator(), { ANY } = Comparator, Range = require_range(), satisfies = require_satisfies(), gt = require_gt(), lt = require_lt(), lte = require_lte(), gte = require_gte(), outside = (version, range, hilo, options) => {
696
- version = new SemVer(version, options), range = new Range(range, options);
697
- let gtfn, ltefn, ltfn, comp, ecomp;
698
- switch (hilo) {
699
- case ">":
700
- gtfn = gt, ltefn = lte, ltfn = lt, comp = ">", ecomp = ">=";
701
- break;
702
- case "<":
703
- gtfn = lt, ltefn = gte, ltfn = gt, comp = "<", ecomp = "<=";
704
- break;
705
- default:
706
- throw new TypeError('Must provide a hilo val of "<" or ">"');
707
- }
708
- if (satisfies(version, range, options))
709
- return !1;
710
- for (let i = 0; i < range.set.length; ++i) {
711
- let comparators = range.set[i], high = null, low = null;
712
- if (comparators.forEach((comparator) => {
713
- comparator.semver === ANY && (comparator = new Comparator(">=0.0.0")), high = high || comparator, low = low || comparator, gtfn(comparator.semver, high.semver, options) ? high = comparator : ltfn(comparator.semver, low.semver, options) && (low = comparator);
714
- }), high.operator === comp || high.operator === ecomp || (!low.operator || low.operator === comp) && ltefn(version, low.semver))
715
- return !1;
716
- if (low.operator === ecomp && ltfn(version, low.semver))
717
- return !1;
718
- }
719
- return !0;
720
- };
721
- module.exports = outside;
722
- }
723
- });
724
-
725
- // ../../../node_modules/semver/ranges/gtr.js
726
- var require_gtr = __commonJS({
727
- "../../../node_modules/semver/ranges/gtr.js"(exports, module) {
728
- "use strict";
729
- var outside = require_outside(), gtr = (version, range, options) => outside(version, range, ">", options);
730
- module.exports = gtr;
731
- }
732
- });
733
-
734
- // ../../../node_modules/semver/ranges/ltr.js
735
- var require_ltr = __commonJS({
736
- "../../../node_modules/semver/ranges/ltr.js"(exports, module) {
737
- "use strict";
738
- var outside = require_outside(), ltr = (version, range, options) => outside(version, range, "<", options);
739
- module.exports = ltr;
740
- }
741
- });
742
-
743
- // ../../../node_modules/semver/ranges/intersects.js
744
- var require_intersects = __commonJS({
745
- "../../../node_modules/semver/ranges/intersects.js"(exports, module) {
746
- "use strict";
747
- var Range = require_range(), intersects = (r1, r2, options) => (r1 = new Range(r1, options), r2 = new Range(r2, options), r1.intersects(r2, options));
748
- module.exports = intersects;
749
- }
750
- });
751
-
752
- // ../../../node_modules/semver/ranges/simplify.js
753
- var require_simplify = __commonJS({
754
- "../../../node_modules/semver/ranges/simplify.js"(exports, module) {
755
- "use strict";
756
- var satisfies = require_satisfies(), compare = require_compare();
757
- module.exports = (versions, range, options) => {
758
- let set = [], first = null, prev = null, v = versions.sort((a, b) => compare(a, b, options));
759
- for (let version of v)
760
- satisfies(version, range, options) ? (prev = version, first || (first = version)) : (prev && set.push([first, prev]), prev = null, first = null);
761
- first && set.push([first, null]);
762
- let ranges = [];
763
- for (let [min, max] of set)
764
- min === max ? ranges.push(min) : !max && min === v[0] ? ranges.push("*") : max ? min === v[0] ? ranges.push(`<=${max}`) : ranges.push(`${min} - ${max}`) : ranges.push(`>=${min}`);
765
- let simplified = ranges.join(" || "), original = typeof range.raw == "string" ? range.raw : String(range);
766
- return simplified.length < original.length ? simplified : range;
767
- };
768
- }
769
- });
770
-
771
- // ../../../node_modules/semver/ranges/subset.js
772
- var require_subset = __commonJS({
773
- "../../../node_modules/semver/ranges/subset.js"(exports, module) {
774
- "use strict";
775
- var Range = require_range(), Comparator = require_comparator(), { ANY } = Comparator, satisfies = require_satisfies(), compare = require_compare(), subset = (sub, dom, options = {}) => {
776
- if (sub === dom)
777
- return !0;
778
- sub = new Range(sub, options), dom = new Range(dom, options);
779
- let sawNonNull = !1;
780
- OUTER: for (let simpleSub of sub.set) {
781
- for (let simpleDom of dom.set) {
782
- let isSub = simpleSubset(simpleSub, simpleDom, options);
783
- if (sawNonNull = sawNonNull || isSub !== null, isSub)
784
- continue OUTER;
785
- }
786
- if (sawNonNull)
787
- return !1;
788
- }
789
- return !0;
790
- }, minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")], minimumVersion = [new Comparator(">=0.0.0")], simpleSubset = (sub, dom, options) => {
791
- if (sub === dom)
792
- return !0;
793
- if (sub.length === 1 && sub[0].semver === ANY) {
794
- if (dom.length === 1 && dom[0].semver === ANY)
795
- return !0;
796
- options.includePrerelease ? sub = minimumVersionWithPreRelease : sub = minimumVersion;
797
- }
798
- if (dom.length === 1 && dom[0].semver === ANY) {
799
- if (options.includePrerelease)
800
- return !0;
801
- dom = minimumVersion;
802
- }
803
- let eqSet = /* @__PURE__ */ new Set(), gt, lt;
804
- for (let c of sub)
805
- c.operator === ">" || c.operator === ">=" ? gt = higherGT(gt, c, options) : c.operator === "<" || c.operator === "<=" ? lt = lowerLT(lt, c, options) : eqSet.add(c.semver);
806
- if (eqSet.size > 1)
807
- return null;
808
- let gtltComp;
809
- if (gt && lt) {
810
- if (gtltComp = compare(gt.semver, lt.semver, options), gtltComp > 0)
811
- return null;
812
- if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<="))
813
- return null;
814
- }
815
- for (let eq2 of eqSet) {
816
- if (gt && !satisfies(eq2, String(gt), options) || lt && !satisfies(eq2, String(lt), options))
817
- return null;
818
- for (let c of dom)
819
- if (!satisfies(eq2, String(c), options))
820
- return !1;
821
- return !0;
822
- }
823
- let higher, lower, hasDomLT, hasDomGT, needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : !1, needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : !1;
824
- needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0 && (needDomLTPre = !1);
825
- for (let c of dom) {
826
- if (hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=", hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=", gt) {
827
- if (needDomGTPre && c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch && (needDomGTPre = !1), c.operator === ">" || c.operator === ">=") {
828
- if (higher = higherGT(gt, c, options), higher === c && higher !== gt)
829
- return !1;
830
- } else if (gt.operator === ">=" && !c.test(gt.semver))
831
- return !1;
832
- }
833
- if (lt) {
834
- if (needDomLTPre && c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch && (needDomLTPre = !1), c.operator === "<" || c.operator === "<=") {
835
- if (lower = lowerLT(lt, c, options), lower === c && lower !== lt)
836
- return !1;
837
- } else if (lt.operator === "<=" && !c.test(lt.semver))
838
- return !1;
839
- }
840
- if (!c.operator && (lt || gt) && gtltComp !== 0)
841
- return !1;
842
- }
843
- return !(gt && hasDomLT && !lt && gtltComp !== 0 || lt && hasDomGT && !gt && gtltComp !== 0 || needDomGTPre || needDomLTPre);
844
- }, higherGT = (a, b, options) => {
845
- if (!a)
846
- return b;
847
- let comp = compare(a.semver, b.semver, options);
848
- return comp > 0 ? a : comp < 0 || b.operator === ">" && a.operator === ">=" ? b : a;
849
- }, lowerLT = (a, b, options) => {
850
- if (!a)
851
- return b;
852
- let comp = compare(a.semver, b.semver, options);
853
- return comp < 0 ? a : comp > 0 || b.operator === "<" && a.operator === "<=" ? b : a;
854
- };
855
- module.exports = subset;
856
- }
857
- });
858
-
859
- // ../../../node_modules/semver/index.js
860
- var require_semver2 = __commonJS({
861
- "../../../node_modules/semver/index.js"(exports, module) {
862
- "use strict";
863
- var internalRe = require_re(), constants = require_constants(), SemVer = require_semver(), identifiers = require_identifiers(), parse2 = require_parse(), valid = require_valid(), clean = require_clean(), inc = require_inc(), diff = require_diff(), major = require_major(), minor = require_minor(), patch = require_patch(), prerelease = require_prerelease(), compare = require_compare(), rcompare = require_rcompare(), compareLoose = require_compare_loose(), compareBuild = require_compare_build(), sort = require_sort(), rsort = require_rsort(), gt = require_gt(), lt = require_lt(), eq2 = require_eq(), neq = require_neq(), gte = require_gte(), lte = require_lte(), cmp = require_cmp(), coerce = require_coerce(), truncate = require_truncate(), Comparator = require_comparator(), Range = require_range(), satisfies = require_satisfies(), toComparators = require_to_comparators(), maxSatisfying = require_max_satisfying(), minSatisfying = require_min_satisfying(), minVersion = require_min_version(), validRange = require_valid2(), outside = require_outside(), gtr = require_gtr(), ltr = require_ltr(), intersects = require_intersects(), simplifyRange = require_simplify(), subset = require_subset();
864
- module.exports = {
865
- parse: parse2,
866
- valid,
867
- clean,
868
- inc,
869
- diff,
870
- major,
871
- minor,
872
- patch,
873
- prerelease,
874
- compare,
875
- rcompare,
876
- compareLoose,
877
- compareBuild,
878
- sort,
879
- rsort,
880
- gt,
881
- lt,
882
- eq: eq2,
883
- neq,
884
- gte,
885
- lte,
886
- cmp,
887
- coerce,
888
- truncate,
889
- Comparator,
890
- Range,
891
- satisfies,
892
- toComparators,
893
- maxSatisfying,
894
- minSatisfying,
895
- minVersion,
896
- validRange,
897
- outside,
898
- gtr,
899
- ltr,
900
- intersects,
901
- simplifyRange,
902
- subset,
903
- SemVer,
904
- re: internalRe.re,
905
- src: internalRe.src,
906
- tokens: internalRe.t,
907
- SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
908
- RELEASE_TYPES: constants.RELEASE_TYPES,
909
- compareIdentifiers: identifiers.compareIdentifiers,
910
- rcompareIdentifiers: identifiers.rcompareIdentifiers
911
- };
912
- }
913
- });
41
+ } from "./_node-chunks/chunk-BIBVDNHH.js";
914
42
 
915
43
  // src/preset.ts
916
44
  var import_picocolors = __toESM(require_picocolors(), 1), import_ts_dedent = __toESM(require_dist(), 1);
@@ -1056,7 +184,6 @@ var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.ha
1056
184
  var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
1057
185
 
1058
186
  // ../../core/src/shared/utils/module.ts
1059
- var import_semver = __toESM(require_semver2(), 1);
1060
187
  var importMetaResolve = (...args) => typeof import.meta.resolve != "function" && process.env.VITEST === "true" ? (console.warn(
1061
188
  "importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
1062
189
  ), pathToFileURL(args[0]).href) : import.meta.resolve(...args);
@@ -1420,6 +547,13 @@ var resolvePreviewBuilderName = (core) => typeof core?.builder == "string" ? cor
1420
547
  error
1421
548
  }
1422
549
  })), testProviderStore.setState("test-provider-state:crashed");
550
+ }), testProviderStore.onRunAll(() => {
551
+ store.send({
552
+ type: "TRIGGER_RUN",
553
+ payload: {
554
+ triggeredBy: "run-all"
555
+ }
556
+ });
1423
557
  }), testProviderStore.onClearAll(() => {
1424
558
  store.setState((s) => ({
1425
559
  ...s,
@@ -2101,7 +1235,8 @@ import {
2101
1235
  storyInputArraySchema
2102
1236
  } from "storybook/internal/core-server";
2103
1237
  import {
2104
- defineToolset
1238
+ defineToolset,
1239
+ getSkillCommand
2105
1240
  } from "storybook/open-service";
2106
1241
 
2107
1242
  // src/node/toolset/format.ts
@@ -2495,7 +1630,7 @@ var errorLikeSchema = object({
2495
1630
  description(
2496
1631
  `Stories to test for focused feedback. Omit this field to run tests for all available stories.
2497
1632
  Prefer running tests for specific stories while developing to get faster feedback,
2498
- and only omit this when you explicitly need to run all tests for comprehensive verification.
1633
+ and omit it once before you finish, to verify every story.
2499
1634
  Prefer { storyId } when you don't already have story file context, since this avoids filesystem discovery.
2500
1635
  Use { storyId } when IDs were discovered from documentation tools.
2501
1636
  Use { absoluteStoryPath + exportName } only when you're currently working in a story file and already know those values.`
@@ -2512,8 +1647,10 @@ Use { absoluteStoryPath + exportName } only when you're currently working in a s
2512
1647
  !0
2513
1648
  )
2514
1649
  });
2515
- function describeRun(a11yEnabled) {
2516
- return `Run story tests.
1650
+ function describeRun(a11yEnabled, ctx) {
1651
+ let skill = getSkillCommand(ctx)("test-stories");
1652
+ return `Run story tests.${skill ? `
1653
+ First run ${skill} once and follow it: it has the rules for running the tests and fixing what fails.` : ""}
2517
1654
  Run them after editing anything that changes how the UI looks \u2014 components, stories, styles, CSS, themes, colors, or design tokens \u2014 shell-level substitutes like typecheck, lint, or package.json test scripts do not replace this.
2518
1655
  Provide stories for focused runs (faster while iterating),
2519
1656
  or omit stories to run all tests for full-project verification.
@@ -2572,7 +1709,7 @@ function createTestToolset({
2572
1709
  run: {
2573
1710
  input: runInputSchema,
2574
1711
  title: "Run Storybook tests",
2575
- description: describeRun(a11yEnabled),
1712
+ description: (ctx) => describeRun(a11yEnabled, ctx),
2576
1713
  handler: async (input, ctx) => {
2577
1714
  let done = await queue.wait();
2578
1715
  try {