storybook 9.1.2 → 9.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -41
- package/dist/bin/index.cjs +43 -43
- package/dist/bin/index.js +43 -43
- package/dist/cli/bin/index.cjs +1211 -1211
- package/dist/cli/bin/index.js +1214 -1214
- package/dist/common/index.cjs +58 -58
- package/dist/common/index.js +104 -104
- package/dist/core-server/index.cjs +3105 -3094
- package/dist/core-server/index.js +3409 -3398
- package/dist/core-server/presets/common-manager.js +142 -119
- package/dist/core-server/presets/common-preset.cjs +2489 -2483
- package/dist/core-server/presets/common-preset.js +7445 -7439
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.cjs +57 -51
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +60 -52
- package/dist/csf-tools/index.cjs +4 -4
- package/dist/csf-tools/index.js +4 -4
- package/dist/manager/globals-runtime.js +7376 -7365
- package/dist/manager/runtime.js +32 -18
- package/dist/manager-api/index.cjs +546 -535
- package/dist/manager-api/index.js +653 -642
- package/dist/manager-errors.js +44 -33
- package/dist/preview/runtime.js +5559 -5548
- package/dist/preview-api/index.cjs +4 -4
- package/dist/preview-api/index.js +4 -4
- package/dist/preview-errors.cjs +82 -71
- package/dist/preview-errors.js +89 -78
- package/dist/router/index.cjs +1 -1
- package/dist/router/index.js +1 -1
- package/dist/server-errors.cjs +121 -77
- package/dist/server-errors.d.ts +14 -1
- package/dist/server-errors.js +135 -91
- package/dist/telemetry/index.cjs +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/test/index.cjs +1 -1
- package/dist/test/index.js +1 -1
- package/package.json +17 -3
|
@@ -2494,8 +2494,8 @@ e" : e === 9 ? t = "strike" : 29 < e && e < 38 || e === 39 || 89 < e && e < 98 ?
|
|
|
2494
2494
|
var P = Eu(w), N;
|
|
2495
2495
|
try {
|
|
2496
2496
|
for (P.s(); !(N = P.n()).done; ) {
|
|
2497
|
-
var
|
|
2498
|
-
r("display",
|
|
2497
|
+
var q = N.value;
|
|
2498
|
+
r("display", q);
|
|
2499
2499
|
}
|
|
2500
2500
|
} catch (H) {
|
|
2501
2501
|
P.e(H);
|
|
@@ -2917,7 +2917,7 @@ import { styled as $0 } from "storybook/theming";
|
|
|
2917
2917
|
|
|
2918
2918
|
// ../addons/docs/src/blocks/components/ArgsTable/ArgsTable.tsx
|
|
2919
2919
|
or();
|
|
2920
|
-
import
|
|
2920
|
+
import V from "react";
|
|
2921
2921
|
import { once as l0 } from "storybook/internal/client-logger";
|
|
2922
2922
|
import { IconButton as c0, Link as p0, ResetWrapper as u0 } from "storybook/internal/components";
|
|
2923
2923
|
import { includeConditionalArg as d0 } from "storybook/internal/csf";
|
|
@@ -4524,7 +4524,7 @@ var Dm = jt(Ks)({
|
|
|
4524
4524
|
), w = [...v, ...E], { window: P } = globalThis, N = km(async (H) => {
|
|
4525
4525
|
let { createCopyToClipboardFunction: G } = await import("storybook/internal/components");
|
|
4526
4526
|
G();
|
|
4527
|
-
}, []),
|
|
4527
|
+
}, []), q = /* @__PURE__ */ a((H) => {
|
|
4528
4528
|
let G = P.getSelection();
|
|
4529
4529
|
G && G.type === "Range" || (H.preventDefault(), E.filter((Z) => Z.title === "Copied").length === 0 && N(f?.props.code ?? "").then(() => {
|
|
4530
4530
|
S([
|
|
@@ -4562,7 +4562,7 @@ var Dm = jt(Ks)({
|
|
|
4562
4562
|
}
|
|
4563
4563
|
),
|
|
4564
4564
|
/* @__PURE__ */ Re.createElement(On.Provider, { value: { scale: h } }, /* @__PURE__ */ Re.createElement(Mm, { className: "docs-story", onCopyCapture: n &&
|
|
4565
|
-
|
|
4565
|
+
q }, /* @__PURE__ */ Re.createElement(
|
|
4566
4566
|
Pm,
|
|
4567
4567
|
{
|
|
4568
4568
|
isColumn: t || !Array.isArray(o),
|
|
@@ -5086,7 +5086,7 @@ function zg(e = "", t = {}) {
|
|
|
5086
5086
|
return (P === '"' || P === "'") && w.length >= 2 && w[w.length - 1] === P ? w.slice(1, -1) : w;
|
|
5087
5087
|
}(h.slice(b + 1).trim()), E = Zs[x] || x;
|
|
5088
5088
|
if (E === "ref") return y;
|
|
5089
|
-
let S = y[E] = function(w, P, N,
|
|
5089
|
+
let S = y[E] = function(w, P, N, q) {
|
|
5090
5090
|
return P === "style" ? function(H) {
|
|
5091
5091
|
let G = [], Z = "", se = !1, ee = !1, pe = "";
|
|
5092
5092
|
if (!H) return G;
|
|
@@ -5116,8 +5116,8 @@ function zg(e = "", t = {}) {
|
|
|
5116
5116
|
}
|
|
5117
5117
|
return G;
|
|
5118
5118
|
}(N).reduce(function(H, [G, Z]) {
|
|
5119
|
-
return H[G.replace(/(-[a-z])/g, (se) => se[1].toUpperCase())] =
|
|
5120
|
-
}, {}) : Hm.indexOf(P) !== -1 ?
|
|
5119
|
+
return H[G.replace(/(-[a-z])/g, (se) => se[1].toUpperCase())] = q(Z, w, G), H;
|
|
5120
|
+
}, {}) : Hm.indexOf(P) !== -1 ? q(N, w, P) : (N.match(ng) && (N = N.slice(1, N.length - 1)), N === "true" || N !== "false" && N);
|
|
5121
5121
|
}(p, x, v, t.sanitizer);
|
|
5122
5122
|
typeof S == "string" && (Rn.test(S) || jn.test(S)) && (y[E] = o(S.trim()));
|
|
5123
5123
|
} else h !== "style" && (y[Zs[h] || h] = !0);
|
|
@@ -6153,10 +6153,10 @@ var ea = class ea extends zt {
|
|
|
6153
6153
|
beforeUpdateAction: S,
|
|
6154
6154
|
logger: w,
|
|
6155
6155
|
onSubmitValueParser: P
|
|
6156
|
-
} = this.props, { minus: N, plus:
|
|
6156
|
+
} = this.props, { minus: N, plus: q, delimiter: H, ul: G, addForm: Z } = g(t, r, o, n, p), se = d(t, r, o, n, p), ee = x && we(x, {
|
|
6157
6157
|
onClick: this.handleAddMode,
|
|
6158
6158
|
className: "rejt-plus-menu",
|
|
6159
|
-
style:
|
|
6159
|
+
style: q,
|
|
6160
6160
|
"aria-label": `add a new item to the '${String(t)}' array`
|
|
6161
6161
|
}), pe = b && we(b, {
|
|
6162
6162
|
onClick: c,
|
|
@@ -6763,11 +6763,11 @@ var oa = class oa extends zt {
|
|
|
6763
6763
|
beforeUpdateAction: S,
|
|
6764
6764
|
logger: w,
|
|
6765
6765
|
onSubmitValueParser: P
|
|
6766
|
-
} = this.props, { minus: N, plus:
|
|
6766
|
+
} = this.props, { minus: N, plus: q, addForm: H, ul: G, delimiter: Z } = g(t, r, o, n, p), se = Object.getOwnPropertyNames(r), ee = d(t,
|
|
6767
6767
|
r, o, n, p), pe = x && we(x, {
|
|
6768
6768
|
onClick: this.handleAddMode,
|
|
6769
6769
|
className: "rejt-plus-menu",
|
|
6770
|
-
style:
|
|
6770
|
+
style: q,
|
|
6771
6771
|
"aria-label": `add a new property to the object '${String(t)}'`
|
|
6772
6772
|
}), _ = b && we(b, {
|
|
6773
6773
|
onClick: c,
|
|
@@ -7660,8 +7660,15 @@ updateArgs: r, isHovered: o }) => {
|
|
|
7660
7660
|
), g = va(() => l(!1), []), p = va(() => l(!0), []);
|
|
7661
7661
|
if (!i || i.disable) {
|
|
7662
7662
|
let y = i?.disable !== !0 && e?.type?.name !== "function";
|
|
7663
|
-
return o && y ? /* @__PURE__ */ hr.createElement(
|
|
7664
|
-
|
|
7663
|
+
return o && y ? /* @__PURE__ */ hr.createElement(
|
|
7664
|
+
bb,
|
|
7665
|
+
{
|
|
7666
|
+
href: "https://storybook.js.org/docs/essentials/controls?ref=ui",
|
|
7667
|
+
target: "_blank",
|
|
7668
|
+
withArrow: !0
|
|
7669
|
+
},
|
|
7670
|
+
"Setup controls"
|
|
7671
|
+
) : /* @__PURE__ */ hr.createElement(Wc, null);
|
|
7665
7672
|
}
|
|
7666
7673
|
let m = { name: n, argType: e, value: c.value, onChange: d, onBlur: g, onFocus: p }, f = xb[i.type] || Wc;
|
|
7667
7674
|
return /* @__PURE__ */ hr.createElement(f, { ...m, ...i, controlType: i.type });
|
|
@@ -7919,7 +7926,7 @@ Set your story args and you'll see controls appearing here automatically."),
|
|
|
7919
7926
|
footer: /* @__PURE__ */ je.createElement(Yb, null, e && /* @__PURE__ */ je.createElement(je.Fragment, null, /* @__PURE__ */ je.createElement(
|
|
7920
7927
|
op,
|
|
7921
7928
|
{
|
|
7922
|
-
href: "https://storybook.js.org/docs/essentials/controls",
|
|
7929
|
+
href: "https://storybook.js.org/docs/essentials/controls?ref=ui",
|
|
7923
7930
|
target: "_blank",
|
|
7924
7931
|
withArrow: !0
|
|
7925
7932
|
},
|
|
@@ -7928,7 +7935,7 @@ Set your story args and you'll see controls appearing here automatically."),
|
|
|
7928
7935
|
)), !e && /* @__PURE__ */ je.createElement(
|
|
7929
7936
|
op,
|
|
7930
7937
|
{
|
|
7931
|
-
href: "https://storybook.js.org/docs/essentials/controls",
|
|
7938
|
+
href: "https://storybook.js.org/docs/essentials/controls?ref=ui",
|
|
7932
7939
|
target: "_blank",
|
|
7933
7940
|
withArrow: !0
|
|
7934
7941
|
},
|
|
@@ -8213,11 +8220,12 @@ var g0 = Ca.table(({ theme: e, compact: t, inAddonPanel: r }) => ({
|
|
|
8213
8220
|
}
|
|
8214
8221
|
// End awesome table styling
|
|
8215
8222
|
}
|
|
8216
|
-
})), h0 = Ca(
|
|
8217
|
-
|
|
8218
|
-
})
|
|
8219
|
-
|
|
8220
|
-
|
|
8223
|
+
})), h0 = Ca.div({
|
|
8224
|
+
position: "relative"
|
|
8225
|
+
}), y0 = Ca.div({
|
|
8226
|
+
position: "absolute",
|
|
8227
|
+
right: 8,
|
|
8228
|
+
top: 6
|
|
8221
8229
|
});
|
|
8222
8230
|
var b0 = {
|
|
8223
8231
|
alpha: /* @__PURE__ */ a((e, t) => (e.name ?? "").localeCompare(t.name ?? ""), "alpha"),
|
|
@@ -8284,11 +8292,11 @@ redFirst"),
|
|
|
8284
8292
|
} = e;
|
|
8285
8293
|
if ("error" in e) {
|
|
8286
8294
|
let { error: x } = e;
|
|
8287
|
-
return /* @__PURE__ */
|
|
8288
|
-
|
|
8295
|
+
return /* @__PURE__ */ V.createElement(Yr, null, x, "\xA0", /* @__PURE__ */ V.createElement(p0, { href: "http://storybook.js.org/docs/?r\
|
|
8296
|
+
ef=ui", target: "_blank", withArrow: !0 }, /* @__PURE__ */ V.createElement(f0, null), " Read the docs"));
|
|
8289
8297
|
}
|
|
8290
8298
|
if (l)
|
|
8291
|
-
return /* @__PURE__ */
|
|
8299
|
+
return /* @__PURE__ */ V.createElement(lp, null);
|
|
8292
8300
|
let { rows: c, args: u, globals: d } = "rows" in e ? e : { rows: void 0, args: void 0, globals: void 0 }, g = x0(
|
|
8293
8301
|
xn(
|
|
8294
8302
|
c || {},
|
|
@@ -8297,31 +8305,46 @@ redFirst"),
|
|
|
8297
8305
|
s
|
|
8298
8306
|
), p = g.ungrouped.length === 0, m = Object.entries(g.sections).length === 0, f = Object.entries(g.ungroupedSubsections).length === 0;
|
|
8299
8307
|
if (p && m && f)
|
|
8300
|
-
return /* @__PURE__ */
|
|
8308
|
+
return /* @__PURE__ */ V.createElement(ip, { inAddonPanel: n });
|
|
8301
8309
|
let y = 1;
|
|
8302
8310
|
t && (y += 1), o || (y += 2);
|
|
8303
8311
|
let h = Object.keys(g.sections).length > 0, b = { updateArgs: t, compact: o, inAddonPanel: n, initialExpandedArgs: i };
|
|
8304
|
-
return /* @__PURE__ */
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
createElement("th", null, /* @__PURE__ */ W.createElement("span", null, "Description")), o ? null : /* @__PURE__ */ W.createElement("th", null,
|
|
8308
|
-
/* @__PURE__ */ W.createElement("span", null, "Default")), t ? /* @__PURE__ */ W.createElement("th", null, /* @__PURE__ */ W.createElement(
|
|
8309
|
-
y0, null, "Control", " ", !l && r && /* @__PURE__ */ W.createElement(h0, { onClick: () => r(), title: "Reset controls" }, /* @__PURE__ */ W.
|
|
8310
|
-
createElement(m0, { "aria-hidden": !0 })))) : null)), /* @__PURE__ */ W.createElement("tbody", { className: "docblock-argstable-body" }, g.
|
|
8311
|
-
ungrouped.map((x) => /* @__PURE__ */ W.createElement(yr, { key: x.key, row: x, arg: u && u[x.key], ...b })), Object.entries(g.ungroupedSubsections).
|
|
8312
|
-
map(([x, v]) => /* @__PURE__ */ W.createElement(ko, { key: x, label: x, level: "subsection", colSpan: y }, v.map((E) => /* @__PURE__ */ W.
|
|
8313
|
-
createElement(
|
|
8314
|
-
yr,
|
|
8312
|
+
return /* @__PURE__ */ V.createElement(u0, null, /* @__PURE__ */ V.createElement(h0, null, t && !l && r && /* @__PURE__ */ V.createElement(
|
|
8313
|
+
y0, null, /* @__PURE__ */ V.createElement(
|
|
8314
|
+
c0,
|
|
8315
8315
|
{
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8316
|
+
onClick: () => r(),
|
|
8317
|
+
"aria-label": "Reset controls",
|
|
8318
|
+
title: "Reset controls"
|
|
8319
|
+
},
|
|
8320
|
+
/* @__PURE__ */ V.createElement(m0, null)
|
|
8321
|
+
)), /* @__PURE__ */ V.createElement(g0, { compact: o, inAddonPanel: n, className: "docblock-argstable sb-unstyled" }, /* @__PURE__ */ V.createElement(
|
|
8322
|
+
"thead", { className: "docblock-argstable-head" }, /* @__PURE__ */ V.createElement("tr", null, /* @__PURE__ */ V.createElement("th", null,
|
|
8323
|
+
/* @__PURE__ */ V.createElement("span", null, "Name")), o ? null : /* @__PURE__ */ V.createElement("th", null, /* @__PURE__ */ V.createElement(
|
|
8324
|
+
"span", null, "Description")), o ? null : /* @__PURE__ */ V.createElement("th", null, /* @__PURE__ */ V.createElement("span", null, "Defau\
|
|
8325
|
+
lt")), t ? /* @__PURE__ */ V.createElement("th", null, /* @__PURE__ */ V.createElement("span", null, "Control")) : null)), /* @__PURE__ */ V.
|
|
8326
|
+
createElement("tbody", { className: "docblock-argstable-body" }, g.ungrouped.map((x) => /* @__PURE__ */ V.createElement(yr, { key: x.key, row: x,
|
|
8327
|
+
arg: u && u[x.key], ...b })), Object.entries(g.ungroupedSubsections).map(([x, v]) => /* @__PURE__ */ V.createElement(
|
|
8328
|
+
ko,
|
|
8329
|
+
{
|
|
8330
|
+
key: x,
|
|
8331
|
+
label: x,
|
|
8332
|
+
level: "subsection",
|
|
8333
|
+
colSpan: y
|
|
8334
|
+
},
|
|
8335
|
+
v.map((E) => /* @__PURE__ */ V.createElement(
|
|
8336
|
+
yr,
|
|
8337
|
+
{
|
|
8338
|
+
key: E.key,
|
|
8339
|
+
row: E,
|
|
8340
|
+
arg: u && u[E.key],
|
|
8341
|
+
expandable: h,
|
|
8342
|
+
...b
|
|
8343
|
+
}
|
|
8344
|
+
))
|
|
8345
|
+
)), Object.entries(g.sections).map(([x, v]) => /* @__PURE__ */ V.createElement(ko, { key: x, label: x, level: "section", colSpan: y }, v.ungrouped.
|
|
8346
|
+
map((E) => /* @__PURE__ */ V.createElement(yr, { key: E.key, row: E, arg: u && u[E.key], ...b })), Object.entries(v.subsections).map(([E, S]) => /* @__PURE__ */ V.
|
|
8347
|
+
createElement(
|
|
8325
8348
|
ko,
|
|
8326
8349
|
{
|
|
8327
8350
|
key: E,
|
|
@@ -8329,7 +8352,7 @@ rgstable sb-unstyled" }, /* @__PURE__ */ W.createElement("thead", { className: "
|
|
|
8329
8352
|
level: "subsection",
|
|
8330
8353
|
colSpan: y
|
|
8331
8354
|
},
|
|
8332
|
-
S.map((w) => /* @__PURE__ */
|
|
8355
|
+
S.map((w) => /* @__PURE__ */ V.createElement(
|
|
8333
8356
|
yr,
|
|
8334
8357
|
{
|
|
8335
8358
|
key: w.key,
|
|
@@ -8339,7 +8362,7 @@ rgstable sb-unstyled" }, /* @__PURE__ */ W.createElement("thead", { className: "
|
|
|
8339
8362
|
...b
|
|
8340
8363
|
}
|
|
8341
8364
|
))
|
|
8342
|
-
)))))));
|
|
8365
|
+
))))))));
|
|
8343
8366
|
}, "ArgsTable");
|
|
8344
8367
|
|
|
8345
8368
|
// src/controls/constants.ts
|
|
@@ -9529,9 +9552,9 @@ var Bx = /* @__PURE__ */ a(({ rows: e, columns: t, rowsData: r }) => {
|
|
|
9529
9552
|
if (i !== void 0 ? m = p.map((f, y) => typeof f == "object" && f !== null ? [f[i], y] : [void 0, y]) : n && (m = d.map((f, y) => [d[y], y])),
|
|
9530
9553
|
m !== void 0) {
|
|
9531
9554
|
let f = /* @__PURE__ */ a((h, b) => (x, v) => {
|
|
9532
|
-
let E = h(x), S = h(v), w = typeof E, P = typeof S, N = /* @__PURE__ */ a((H, G) => H < G ? -1 : H > G ? 1 : 0, "lt"),
|
|
9555
|
+
let E = h(x), S = h(v), w = typeof E, P = typeof S, N = /* @__PURE__ */ a((H, G) => H < G ? -1 : H > G ? 1 : 0, "lt"), q;
|
|
9533
9556
|
if (w === P)
|
|
9534
|
-
|
|
9557
|
+
q = N(E, S);
|
|
9535
9558
|
else {
|
|
9536
9559
|
let H = {
|
|
9537
9560
|
string: 0,
|
|
@@ -9542,9 +9565,9 @@ var Bx = /* @__PURE__ */ a(({ rows: e, columns: t, rowsData: r }) => {
|
|
|
9542
9565
|
undefined: 5,
|
|
9543
9566
|
function: 6
|
|
9544
9567
|
};
|
|
9545
|
-
|
|
9568
|
+
q = N(H[w], H[P]);
|
|
9546
9569
|
}
|
|
9547
|
-
return b || (
|
|
9570
|
+
return b || (q = -q), q;
|
|
9548
9571
|
}, "comparator"), y = m.sort(f((h) => h[0], s)).map((h) => h[1]);
|
|
9549
9572
|
d = y.map((h) => d[h]), p = y.map((h) => p[h]);
|
|
9550
9573
|
}
|
|
@@ -9982,7 +10005,7 @@ e a play function for your story and you'll see it run here."),
|
|
|
9982
10005
|
}, "Empty");
|
|
9983
10006
|
|
|
9984
10007
|
// src/component-testing/components/Interaction.tsx
|
|
9985
|
-
import * as
|
|
10008
|
+
import * as W from "react";
|
|
9986
10009
|
import { IconButton as TE, TooltipNote as AE, WithTooltip as kE } from "storybook/internal/components";
|
|
9987
10010
|
import { ChevronDownIcon as OE, ChevronUpIcon as IE } from "@storybook/icons";
|
|
9988
10011
|
import { styled as He, typography as en } from "storybook/theming";
|
|
@@ -10224,7 +10247,7 @@ var Lv = ["theme", "hover", "colorScheme", "children", "label", "className", "on
|
|
|
10224
10247
|
}
|
|
10225
10248
|
}
|
|
10226
10249
|
!Pi && ne && b(ne), L || y(!m);
|
|
10227
|
-
}, "handleClick"),
|
|
10250
|
+
}, "handleClick"), q = /* @__PURE__ */ a((T) => {
|
|
10228
10251
|
let L = T.currentTarget;
|
|
10229
10252
|
!L.contains(document.activeElement) && L.getAttribute("role") === "tree" && L.setAttribute("tabindex", "0");
|
|
10230
10253
|
}, "handleBlur"), H = /* @__PURE__ */ a((T) => {
|
|
@@ -10252,7 +10275,7 @@ var Lv = ["theme", "hover", "colorScheme", "children", "label", "className", "on
|
|
|
10252
10275
|
tabIndex: 0,
|
|
10253
10276
|
className: me(xe.tree, xe.group, g, s),
|
|
10254
10277
|
onFocus: H,
|
|
10255
|
-
onBlur:
|
|
10278
|
+
onBlur: q
|
|
10256
10279
|
}, d), /* @__PURE__ */ ge.createElement(Jo.Provider, {
|
|
10257
10280
|
value: {
|
|
10258
10281
|
isChild: !0,
|
|
@@ -10320,7 +10343,7 @@ var od = Ee(qo()), nd = Ee(Wo());
|
|
|
10320
10343
|
import tt, { useState as Mv, useEffect as Bv } from "react";
|
|
10321
10344
|
|
|
10322
10345
|
// ../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectInspector.css.js
|
|
10323
|
-
var
|
|
10346
|
+
var z = { "object-inspector": "ObjectInspector-object-inspector-0c33e82", objectInspector: "ObjectInspector-object-inspector-0c33e82", "obje\
|
|
10324
10347
|
ct-label": "ObjectInspector-object-label-b81482b", objectLabel: "ObjectInspector-object-label-b81482b", text: "ObjectInspector-text-25f57f3",
|
|
10325
10348
|
key: "ObjectInspector-key-4f712bb", value: "ObjectInspector-value-f7ec2e5", string: "ObjectInspector-string-c496000", regex: "ObjectInspecto\
|
|
10326
10349
|
r-regex-59d45a3", error: "ObjectInspector-error-b818698", boolean: "ObjectInspector-boolean-2dd1642", number: "ObjectInspector-number-a6daab\
|
|
@@ -10333,9 +10356,9 @@ light-78bef54" };
|
|
|
10333
10356
|
var Dv = ["ast", "theme", "showKey", "colorScheme", "className"], Ae = /* @__PURE__ */ a((e, t, r, o, n) => {
|
|
10334
10357
|
let i = e.includes("-") ? `"${e}"` : e, s = n <= 0;
|
|
10335
10358
|
return /* @__PURE__ */ tt.createElement("span", {
|
|
10336
|
-
className:
|
|
10359
|
+
className: z.text
|
|
10337
10360
|
}, !s && o && /* @__PURE__ */ tt.createElement(tt.Fragment, null, /* @__PURE__ */ tt.createElement("span", {
|
|
10338
|
-
className:
|
|
10361
|
+
className: z.key
|
|
10339
10362
|
}, i), /* @__PURE__ */ tt.createElement("span", null, ":\xA0")), /* @__PURE__ */ tt.createElement("span", {
|
|
10340
10363
|
className: r
|
|
10341
10364
|
}, t));
|
|
@@ -10351,19 +10374,19 @@ var Dv = ["ast", "theme", "showKey", "colorScheme", "className"], Ae = /* @__PUR
|
|
|
10351
10374
|
} = xt({
|
|
10352
10375
|
theme: r,
|
|
10353
10376
|
colorScheme: n
|
|
10354
|
-
},
|
|
10377
|
+
}, z), [c, u] = Mv(/* @__PURE__ */ tt.createElement("span", null)), d = /* @__PURE__ */ tt.createElement("span", null);
|
|
10355
10378
|
return Bv(() => {
|
|
10356
10379
|
t.value instanceof Promise && (/* @__PURE__ */ a(async (p) => {
|
|
10357
|
-
u(Ae(t.key, `Promise { "${await li(p)}" }`,
|
|
10380
|
+
u(Ae(t.key, `Promise { "${await li(p)}" }`, z.key, o, t.depth));
|
|
10358
10381
|
}, "waitForPromiseResult"))(t.value);
|
|
10359
|
-
}, [t, o]), typeof t.value == "number" || typeof t.value == "bigint" ? d = Ae(t.key, String(t.value),
|
|
10360
|
-
"boolean" ? d = Ae(t.key, String(t.value),
|
|
10361
|
-
t.depth) : typeof t.value > "u" ? d = Ae(t.key, "undefined",
|
|
10362
|
-
toString(),
|
|
10363
|
-
"object" && (t.value === null ? d = Ae(t.key, "null",
|
|
10364
|
-
)`,
|
|
10365
|
-
d = Ae(t.key, t.value.toString(),
|
|
10366
|
-
si(t.value) ? d = Ae(t.key, "{\u2026}",
|
|
10382
|
+
}, [t, o]), typeof t.value == "number" || typeof t.value == "bigint" ? d = Ae(t.key, String(t.value), z.number, o, t.depth) : typeof t.value ==
|
|
10383
|
+
"boolean" ? d = Ae(t.key, String(t.value), z.boolean, o, t.depth) : typeof t.value == "string" ? d = Ae(t.key, `"${t.value}"`, z.string, o,
|
|
10384
|
+
t.depth) : typeof t.value > "u" ? d = Ae(t.key, "undefined", z.undefined, o, t.depth) : typeof t.value == "symbol" ? d = Ae(t.key, t.value.
|
|
10385
|
+
toString(), z.string, o, t.depth) : typeof t.value == "function" ? d = Ae(t.key, `${t.value.name}()`, z.key, o, t.depth) : typeof t.value ==
|
|
10386
|
+
"object" && (t.value === null ? d = Ae(t.key, "null", z.null, o, t.depth) : Array.isArray(t.value) ? d = Ae(t.key, `Array(${t.value.length}\
|
|
10387
|
+
)`, z.key, o, t.depth) : t.value instanceof Date ? d = Ae(t.key, `Date ${t.value.toString()}`, z.value, o, t.depth) : t.value instanceof RegExp ?
|
|
10388
|
+
d = Ae(t.key, t.value.toString(), z.regex, o, t.depth) : t.value instanceof Error ? d = Ae(t.key, t.value.toString(), z.error, o, t.depth) :
|
|
10389
|
+
si(t.value) ? d = Ae(t.key, "{\u2026}", z.key, o, t.depth) : d = Ae(t.key, t.value.constructor.name, z.key, o, t.depth)), /* @__PURE__ */ tt.
|
|
10367
10390
|
createElement("span", (0, od.default)({
|
|
10368
10391
|
className: me(l, i)
|
|
10369
10392
|
}, s), c, d);
|
|
@@ -10428,10 +10451,10 @@ e.children, r, !0), /* @__PURE__ */ D.createElement("span", null, "}")), "getPro
|
|
|
10428
10451
|
} = xt({
|
|
10429
10452
|
theme: r,
|
|
10430
10453
|
colorScheme: i
|
|
10431
|
-
},
|
|
10432
|
-
[
|
|
10454
|
+
}, z), d = t.isPrototype || !1, g = me(z.objectLabel, c, s, {
|
|
10455
|
+
[z.prototype]: d
|
|
10433
10456
|
}), p = t.depth <= 0, m = /* @__PURE__ */ a(() => /* @__PURE__ */ D.createElement("span", {
|
|
10434
|
-
className: d ?
|
|
10457
|
+
className: d ? z.prototype : z.key
|
|
10435
10458
|
}, p ? "" : `${t.key}: `), "Key");
|
|
10436
10459
|
return t.type === "array" ? /* @__PURE__ */ D.createElement("span", (0, Dt.default)({
|
|
10437
10460
|
className: g
|
|
@@ -10439,10 +10462,10 @@ e.children, r, !0), /* @__PURE__ */ D.createElement("span", null, "}")), "getPro
|
|
|
10439
10462
|
{
|
|
10440
10463
|
className: g
|
|
10441
10464
|
}, l), /* @__PURE__ */ D.createElement(m, null), u === "chrome" && /* @__PURE__ */ D.createElement("span", {
|
|
10442
|
-
className:
|
|
10465
|
+
className: z.functionDecorator
|
|
10443
10466
|
}, "\u0192 "), /* @__PURE__ */ D.createElement("span", {
|
|
10444
10467
|
className: me({
|
|
10445
|
-
[
|
|
10468
|
+
[z.function]: !d
|
|
10446
10469
|
})
|
|
10447
10470
|
}, `${t.value.name}()`)) : t.type === "promise" ? /* @__PURE__ */ D.createElement("span", (0, Dt.default)({
|
|
10448
10471
|
className: g
|
|
@@ -10533,13 +10556,13 @@ var Uv = ["data", "expandLevel", "sortKeys", "includePrototypes", "className", "
|
|
|
10533
10556
|
} = xt({
|
|
10534
10557
|
theme: s,
|
|
10535
10558
|
colorScheme: l
|
|
10536
|
-
},
|
|
10559
|
+
}, z);
|
|
10537
10560
|
return qv(() => {
|
|
10538
10561
|
(/* @__PURE__ */ a(async () => {
|
|
10539
10562
|
g(await Du(t, o, n));
|
|
10540
10563
|
}, "runParser"))();
|
|
10541
10564
|
}, [t, o, n]), /* @__PURE__ */ gi.createElement("div", (0, ud.default)({
|
|
10542
|
-
className: me(
|
|
10565
|
+
className: me(z.objectInspector, i, p)
|
|
10543
10566
|
}, u), d && /* @__PURE__ */ gi.createElement(qu, {
|
|
10544
10567
|
theme: m,
|
|
10545
10568
|
colorScheme: f
|
|
@@ -11029,14 +11052,14 @@ var PE = He.div({
|
|
|
11029
11052
|
if (!e)
|
|
11030
11053
|
return null;
|
|
11031
11054
|
if (e.callId === Pe)
|
|
11032
|
-
return /* @__PURE__ */
|
|
11033
|
-
name, ":"), " ", /* @__PURE__ */
|
|
11055
|
+
return /* @__PURE__ */ W.createElement(Ei, null, /* @__PURE__ */ W.createElement("pre", null, /* @__PURE__ */ W.createElement(FE, null, e.
|
|
11056
|
+
name, ":"), " ", /* @__PURE__ */ W.createElement(RE, null, e.message)), /* @__PURE__ */ W.createElement(jE, null, "The component failed \
|
|
11034
11057
|
to render properly. Automated component tests will not run until this is resolved. Check the full error message in Storybook\u2019s canvas to deb\
|
|
11035
11058
|
ug."));
|
|
11036
11059
|
if (ri(e))
|
|
11037
|
-
return /* @__PURE__ */
|
|
11060
|
+
return /* @__PURE__ */ W.createElement(vi, { ...e });
|
|
11038
11061
|
if (ti(e))
|
|
11039
|
-
return /* @__PURE__ */
|
|
11062
|
+
return /* @__PURE__ */ W.createElement(Ei, null, /* @__PURE__ */ W.createElement(
|
|
11040
11063
|
vi,
|
|
11041
11064
|
{
|
|
11042
11065
|
message: `${e.message}${e.diff ? `
|
|
@@ -11044,12 +11067,12 @@ ug."));
|
|
|
11044
11067
|
${e.diff}` : ""}`,
|
|
11045
11068
|
style: { padding: 0 }
|
|
11046
11069
|
}
|
|
11047
|
-
), /* @__PURE__ */
|
|
11070
|
+
), /* @__PURE__ */ W.createElement("p", null, "See the full stack trace in the browser console."));
|
|
11048
11071
|
let r = e.message.split(`
|
|
11049
11072
|
|
|
11050
11073
|
`), o = r.length > 1;
|
|
11051
|
-
return /* @__PURE__ */
|
|
11052
|
-
o && /* @__PURE__ */
|
|
11074
|
+
return /* @__PURE__ */ W.createElement(Ei, null, /* @__PURE__ */ W.createElement("pre", { dangerouslySetInnerHTML: { __html: t.toHtml(r[0]) } }),
|
|
11075
|
+
o && /* @__PURE__ */ W.createElement("p", null, "See the full stack trace in the browser console."));
|
|
11053
11076
|
}, "Exception"), bd = /* @__PURE__ */ a(({
|
|
11054
11077
|
call: e,
|
|
11055
11078
|
callsById: t,
|
|
@@ -11061,9 +11084,9 @@ ${e.diff}` : ""}`,
|
|
|
11061
11084
|
toggleCollapsed: l,
|
|
11062
11085
|
pausedAt: c
|
|
11063
11086
|
}) => {
|
|
11064
|
-
let [u, d] =
|
|
11065
|
-
return i || e.id === Pe ? null : /* @__PURE__ */
|
|
11066
|
-
/* @__PURE__ */
|
|
11087
|
+
let [u, d] = W.useState(!1), g = !o.goto || !e.interceptable || !!e.ancestors?.length;
|
|
11088
|
+
return i || e.id === Pe ? null : /* @__PURE__ */ W.createElement(LE, { call: e, pausedAt: c }, /* @__PURE__ */ W.createElement(NE, { isInteractive: g },
|
|
11089
|
+
/* @__PURE__ */ W.createElement(
|
|
11067
11090
|
_E,
|
|
11068
11091
|
{
|
|
11069
11092
|
"aria-label": "Interaction step",
|
|
@@ -11073,27 +11096,27 @@ ${e.diff}` : ""}`,
|
|
|
11073
11096
|
onMouseEnter: () => o.goto && d(!0),
|
|
11074
11097
|
onMouseLeave: () => o.goto && d(!1)
|
|
11075
11098
|
},
|
|
11076
|
-
/* @__PURE__ */
|
|
11077
|
-
/* @__PURE__ */
|
|
11078
|
-
), /* @__PURE__ */
|
|
11099
|
+
/* @__PURE__ */ W.createElement(Qo, { status: u ? "active" : e.status }),
|
|
11100
|
+
/* @__PURE__ */ W.createElement(PE, { style: { marginLeft: 6, marginBottom: 1 } }, /* @__PURE__ */ W.createElement(Zo, { call: e, callsById: t }))
|
|
11101
|
+
), /* @__PURE__ */ W.createElement(DE, null, (n?.length ?? 0) > 0 && /* @__PURE__ */ W.createElement(
|
|
11079
11102
|
kE,
|
|
11080
11103
|
{
|
|
11081
11104
|
hasChrome: !1,
|
|
11082
|
-
tooltip: /* @__PURE__ */
|
|
11105
|
+
tooltip: /* @__PURE__ */ W.createElement(BE, { note: `${s ? "Show" : "Hide"} interactions` })
|
|
11083
11106
|
},
|
|
11084
|
-
/* @__PURE__ */
|
|
11107
|
+
/* @__PURE__ */ W.createElement(
|
|
11085
11108
|
ME,
|
|
11086
11109
|
{
|
|
11087
11110
|
onClick: l,
|
|
11088
11111
|
"aria-label": s ? "Expand interaction" : "Collapse interaction"
|
|
11089
11112
|
},
|
|
11090
|
-
s ? /* @__PURE__ */
|
|
11113
|
+
s ? /* @__PURE__ */ W.createElement(OE, null) : /* @__PURE__ */ W.createElement(IE, null)
|
|
11091
11114
|
)
|
|
11092
|
-
))), e.status === "error" && e.exception?.callId === e.id && /* @__PURE__ */
|
|
11115
|
+
))), e.status === "error" && e.exception?.callId === e.id && /* @__PURE__ */ W.createElement(HE, { exception: e.exception }));
|
|
11093
11116
|
}, "Interaction");
|
|
11094
11117
|
|
|
11095
11118
|
// src/component-testing/components/Subnav.tsx
|
|
11096
|
-
import
|
|
11119
|
+
import U from "react";
|
|
11097
11120
|
import {
|
|
11098
11121
|
Bar as WE,
|
|
11099
11122
|
Button as GE,
|
|
@@ -11206,10 +11229,10 @@ var nS = $e.div(({ theme: e }) => ({
|
|
|
11206
11229
|
onScrollToEnd: n
|
|
11207
11230
|
}) => {
|
|
11208
11231
|
let i = r === "errored" ? "Scroll to error" : "Scroll to end", s = oS();
|
|
11209
|
-
return /* @__PURE__ */
|
|
11210
|
-
createElement(aS, { "aria-label": "Component tests toolbar" }, /* @__PURE__ */
|
|
11211
|
-
{ status: r }), /* @__PURE__ */
|
|
11212
|
-
createElement(Pr, { trigger: "hover", hasChrome: !1, tooltip: /* @__PURE__ */
|
|
11232
|
+
return /* @__PURE__ */ U.createElement(nS, null, /* @__PURE__ */ U.createElement(WE, { backgroundColor: s.background.app }, /* @__PURE__ */ U.
|
|
11233
|
+
createElement(aS, { "aria-label": "Component tests toolbar" }, /* @__PURE__ */ U.createElement(vd, null, /* @__PURE__ */ U.createElement(xd,
|
|
11234
|
+
{ status: r }), /* @__PURE__ */ U.createElement(pS, { onClick: n, disabled: !n }, i), /* @__PURE__ */ U.createElement(sS, null), /* @__PURE__ */ U.
|
|
11235
|
+
createElement(Pr, { trigger: "hover", hasChrome: !1, tooltip: /* @__PURE__ */ U.createElement(Lr, { note: "Go to start" }) }, /* @__PURE__ */ U.
|
|
11213
11236
|
createElement(
|
|
11214
11237
|
cS,
|
|
11215
11238
|
{
|
|
@@ -11217,37 +11240,37 @@ var nS = $e.div(({ theme: e }) => ({
|
|
|
11217
11240
|
onClick: e.start,
|
|
11218
11241
|
disabled: !t.start
|
|
11219
11242
|
},
|
|
11220
|
-
/* @__PURE__ */
|
|
11221
|
-
)), /* @__PURE__ */
|
|
11222
|
-
/* @__PURE__ */
|
|
11243
|
+
/* @__PURE__ */ U.createElement(tS, null)
|
|
11244
|
+
)), /* @__PURE__ */ U.createElement(Pr, { trigger: "hover", hasChrome: !1, tooltip: /* @__PURE__ */ U.createElement(Lr, { note: "Go back" }) },
|
|
11245
|
+
/* @__PURE__ */ U.createElement(
|
|
11223
11246
|
Nr,
|
|
11224
11247
|
{
|
|
11225
11248
|
"aria-label": "Go back",
|
|
11226
11249
|
onClick: e.back,
|
|
11227
11250
|
disabled: !t.back
|
|
11228
11251
|
},
|
|
11229
|
-
/* @__PURE__ */
|
|
11230
|
-
)), /* @__PURE__ */
|
|
11231
|
-
d" }) }, /* @__PURE__ */
|
|
11252
|
+
/* @__PURE__ */ U.createElement(QE, null)
|
|
11253
|
+
)), /* @__PURE__ */ U.createElement(Pr, { trigger: "hover", hasChrome: !1, tooltip: /* @__PURE__ */ U.createElement(Lr, { note: "Go forwar\
|
|
11254
|
+
d" }) }, /* @__PURE__ */ U.createElement(
|
|
11232
11255
|
Nr,
|
|
11233
11256
|
{
|
|
11234
11257
|
"aria-label": "Go forward",
|
|
11235
11258
|
onClick: e.next,
|
|
11236
11259
|
disabled: !t.next
|
|
11237
11260
|
},
|
|
11238
|
-
/* @__PURE__ */
|
|
11239
|
-
)), /* @__PURE__ */
|
|
11240
|
-
/* @__PURE__ */
|
|
11261
|
+
/* @__PURE__ */ U.createElement(eS, null)
|
|
11262
|
+
)), /* @__PURE__ */ U.createElement(Pr, { trigger: "hover", hasChrome: !1, tooltip: /* @__PURE__ */ U.createElement(Lr, { note: "Go to end" }) },
|
|
11263
|
+
/* @__PURE__ */ U.createElement(
|
|
11241
11264
|
Nr,
|
|
11242
11265
|
{
|
|
11243
11266
|
"aria-label": "Go to end",
|
|
11244
11267
|
onClick: e.end,
|
|
11245
11268
|
disabled: !t.end
|
|
11246
11269
|
},
|
|
11247
|
-
/* @__PURE__ */
|
|
11248
|
-
)), /* @__PURE__ */
|
|
11249
|
-
/* @__PURE__ */
|
|
11250
|
-
createElement(vd, null, /* @__PURE__ */
|
|
11270
|
+
/* @__PURE__ */ U.createElement(ZE, null)
|
|
11271
|
+
)), /* @__PURE__ */ U.createElement(Pr, { trigger: "hover", hasChrome: !1, tooltip: /* @__PURE__ */ U.createElement(Lr, { note: "Rerun" }) },
|
|
11272
|
+
/* @__PURE__ */ U.createElement(uS, { "aria-label": "Rerun", onClick: e.rerun }, /* @__PURE__ */ U.createElement(rS, null)))), o && /* @__PURE__ */ U.
|
|
11273
|
+
createElement(vd, null, /* @__PURE__ */ U.createElement(lS, null, o)))));
|
|
11251
11274
|
}, "Subnav");
|
|
11252
11275
|
|
|
11253
11276
|
// src/component-testing/components/TestDiscrepancyMessage.tsx
|
|
@@ -11486,7 +11509,7 @@ var _r = {
|
|
|
11486
11509
|
{ root: Ai.document.querySelector("#panel-tab-content") }
|
|
11487
11510
|
), P.current && _.observe(P.current)), () => _?.disconnect();
|
|
11488
11511
|
}, []);
|
|
11489
|
-
let N = tn(0),
|
|
11512
|
+
let N = tn(0), q = kS(
|
|
11490
11513
|
{
|
|
11491
11514
|
[ht.CALL]: w,
|
|
11492
11515
|
[ht.SYNC]: (_) => {
|
|
@@ -11549,23 +11572,23 @@ var _r = {
|
|
|
11549
11572
|
}, [l, d]);
|
|
11550
11573
|
let H = Pd(
|
|
11551
11574
|
() => ({
|
|
11552
|
-
start: /* @__PURE__ */ a(() =>
|
|
11553
|
-
back: /* @__PURE__ */ a(() =>
|
|
11554
|
-
goto: /* @__PURE__ */ a((_) =>
|
|
11555
|
-
next: /* @__PURE__ */ a(() =>
|
|
11556
|
-
end: /* @__PURE__ */ a(() =>
|
|
11575
|
+
start: /* @__PURE__ */ a(() => q(ht.START, { storyId: r }), "start"),
|
|
11576
|
+
back: /* @__PURE__ */ a(() => q(ht.BACK, { storyId: r }), "back"),
|
|
11577
|
+
goto: /* @__PURE__ */ a((_) => q(ht.GOTO, { storyId: r, callId: _ }), "goto"),
|
|
11578
|
+
next: /* @__PURE__ */ a(() => q(ht.NEXT, { storyId: r }), "next"),
|
|
11579
|
+
end: /* @__PURE__ */ a(() => q(ht.END, { storyId: r }), "end"),
|
|
11557
11580
|
rerun: /* @__PURE__ */ a(() => {
|
|
11558
|
-
|
|
11581
|
+
q(vS, { storyId: r });
|
|
11559
11582
|
}, "rerun")
|
|
11560
11583
|
}),
|
|
11561
|
-
[
|
|
11584
|
+
[q, r]
|
|
11562
11585
|
), G = OS("fileName", ""), [Z] = G.toString().split("/").slice(-1), se = /* @__PURE__ */ a(() => c?.scrollIntoView({ behavior: "smooth",
|
|
11563
11586
|
block: "end" }), "scrollToTarget"), ee = !!x || !!v || h.some((_) => _.status === "error"), pe = Pd(() => f !== "playing" && (h.length >
|
|
11564
11587
|
0 || ee) ? ee ? "error" : "done" : f === "playing" ? "active" : void 0, [f, h, ee]);
|
|
11565
11588
|
return wi(() => {
|
|
11566
11589
|
if (pe && n && n !== "status-value:pending" && n !== IS[pe]) {
|
|
11567
11590
|
let j = setTimeout(
|
|
11568
|
-
() => m((T) => (T ||
|
|
11591
|
+
() => m((T) => (T || q(Kp, {
|
|
11569
11592
|
type: "test-discrepancy",
|
|
11570
11593
|
payload: {
|
|
11571
11594
|
browserStatus: pe === "done" ? "PASS" : "FAIL",
|
|
@@ -11579,7 +11602,7 @@ var _r = {
|
|
|
11579
11602
|
return () => clearTimeout(j);
|
|
11580
11603
|
} else
|
|
11581
11604
|
m(!1);
|
|
11582
|
-
}, [
|
|
11605
|
+
}, [q, pe, n, r, i]), /* @__PURE__ */ Id.createElement(bS, { key: "component-tests" }, /* @__PURE__ */ Id.createElement(
|
|
11583
11606
|
Od,
|
|
11584
11607
|
{
|
|
11585
11608
|
storyUrl: o,
|