storybook 9.0.14 → 9.0.16
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/bin/index.cjs +43 -43
- package/dist/bin/index.js +43 -43
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +43 -43
- package/dist/common/index.js +43 -43
- package/dist/components/index.cjs +3 -2
- package/dist/components/index.js +4 -3
- package/dist/core-server/index.cjs +601 -601
- package/dist/core-server/index.d.ts +4 -1
- package/dist/core-server/index.js +2195 -2195
- package/dist/core-server/presets/common-manager.js +13 -6
- package/dist/manager/globals-runtime.js +4 -3
- package/dist/manager/runtime.js +27 -22
- package/dist/manager-api/index.cjs +1 -1
- package/dist/manager-api/index.d.ts +4 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/preview/runtime.js +10 -9
- package/dist/preview-api/index.cjs +10 -9
- package/dist/preview-api/index.d.ts +4 -1
- package/dist/preview-api/index.js +791 -790
- package/dist/telemetry/index.cjs +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/viewport/index.d.ts +4 -1
- package/package.json +2 -1
|
@@ -5872,8 +5872,13 @@ var Kn = class Kn extends Ut {
|
|
|
5872
5872
|
document.removeEventListener("keydown", this.onKeydown);
|
|
5873
5873
|
}
|
|
5874
5874
|
onKeydown(t) {
|
|
5875
|
-
t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat
|
|
5876
|
-
|
|
5875
|
+
if (t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat)
|
|
5876
|
+
return;
|
|
5877
|
+
let { inputRefKey: r, inputRefValue: o } = this.state, { addButtonElement: n, handleCancel: i } = this.props;
|
|
5878
|
+
[r, o, n].some(
|
|
5879
|
+
(l) => l === t.target
|
|
5880
|
+
) && ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(), this.onSubmit()), (t.code === "Escape" || t.key === "Escape") &&
|
|
5881
|
+
(t.preventDefault(), i()));
|
|
5877
5882
|
}
|
|
5878
5883
|
onSubmit() {
|
|
5879
5884
|
let { handleAdd: t, onlyValue: r, onSubmitValueParser: o, keyPath: n, deep: i } = this.props, { inputRefKey: s, inputRefValue: l } = this.
|
|
@@ -6148,8 +6153,9 @@ var Xn = class Xn extends Ut {
|
|
|
6148
6153
|
document.removeEventListener("keydown", this.onKeydown);
|
|
6149
6154
|
}
|
|
6150
6155
|
onKeydown(t) {
|
|
6151
|
-
|
|
6152
|
-
|
|
6156
|
+
let { inputRef: r } = this.state;
|
|
6157
|
+
t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat || r !== t.target || ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(),
|
|
6158
|
+
this.handleEdit()), (t.code === "Escape" || t.key === "Escape") && (t.preventDefault(), this.handleCancelEdit()));
|
|
6153
6159
|
}
|
|
6154
6160
|
handleEdit() {
|
|
6155
6161
|
let { handleUpdateValue: t, originalValue: r, logger: o, onSubmitValueParser: n, keyPath: i } = this.props, { inputRef: s, name: l, deep: c } = this.
|
|
@@ -6771,8 +6777,9 @@ var ea = class ea extends Ut {
|
|
|
6771
6777
|
document.removeEventListener("keydown", this.onKeydown);
|
|
6772
6778
|
}
|
|
6773
6779
|
onKeydown(t) {
|
|
6774
|
-
|
|
6775
|
-
|
|
6780
|
+
let { inputRef: r } = this.state;
|
|
6781
|
+
t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat || r !== t.target || ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(),
|
|
6782
|
+
this.handleEdit()), (t.code === "Escape" || t.key === "Escape") && (t.preventDefault(), this.handleCancelEdit()));
|
|
6776
6783
|
}
|
|
6777
6784
|
handleEdit() {
|
|
6778
6785
|
let { handleUpdateValue: t, originalValue: r, logger: o, onSubmitValueParser: n, keyPath: i } = this.props, { inputRef: s, name: l, deep: c } = this.
|
|
@@ -16957,7 +16957,8 @@ var Hy, tW, ro, cs, h3e, g3e, HA, rW = k(() => {
|
|
|
16957
16957
|
), g3e = L.div(
|
|
16958
16958
|
({ hidden: e }) => ({
|
|
16959
16959
|
display: e ? "none" : "inline-block",
|
|
16960
|
-
zIndex: 2147483647
|
|
16960
|
+
zIndex: 2147483647,
|
|
16961
|
+
colorScheme: "light dark"
|
|
16961
16962
|
}),
|
|
16962
16963
|
({ theme: e, color: t, hasChrome: r }) => r ? {
|
|
16963
16964
|
background: t && e.color[t] || t || e.base === "light" ? Gi(e.background.app) : e.background.app,
|
|
@@ -46563,7 +46564,7 @@ var hU = dr({
|
|
|
46563
46564
|
}
|
|
46564
46565
|
})
|
|
46565
46566
|
), gU = /* @__PURE__ */ a((e) => /* @__PURE__ */ Ka.default.createElement(oA, { asChild: !0 }, /* @__PURE__ */ Ka.default.createElement(jp, {
|
|
46566
|
-
...e }, /* @__PURE__ */ Ka.default.createElement(dT, null))), "CloseButton"), V_e = L.div({
|
|
46567
|
+
"aria-label": "Close", ...e }, /* @__PURE__ */ Ka.default.createElement(dT, null))), "CloseButton"), V_e = L.div({
|
|
46567
46568
|
display: "flex",
|
|
46568
46569
|
flexDirection: "column",
|
|
46569
46570
|
margin: 16,
|
|
@@ -51527,7 +51528,7 @@ Ct();
|
|
|
51527
51528
|
var BK = N(Va(), 1), An = N(DK(), 1);
|
|
51528
51529
|
|
|
51529
51530
|
// src/manager-api/version.ts
|
|
51530
|
-
var FK = "9.0.
|
|
51531
|
+
var FK = "9.0.16";
|
|
51531
51532
|
|
|
51532
51533
|
// src/manager-api/modules/versions.ts
|
|
51533
51534
|
var { VERSIONCHECK: QIe } = Z, jK = (0, BK.default)(1)(() => {
|
package/dist/manager/runtime.js
CHANGED
|
@@ -4634,6 +4634,7 @@ startsWith: !1 }, ({ match: t }) => /* @__PURE__ */ s.createElement(Kb, { shown:
|
|
|
4634
4634
|
overflow: "hidden",
|
|
4635
4635
|
display: "flex",
|
|
4636
4636
|
flexDirection: "column",
|
|
4637
|
+
colorScheme: "light dark",
|
|
4637
4638
|
[Qe]: {
|
|
4638
4639
|
display: "grid",
|
|
4639
4640
|
gap: 0,
|
|
@@ -7030,9 +7031,9 @@ var Sc = (0, co.default)(1e3)((e, t) => t[e]), O0 = (0, co.default)(1e3)((e, t)
|
|
|
7030
7031
|
(e, t) => Tc(t, e).map((o) => o.id)
|
|
7031
7032
|
), st = (0, co.default)(1e3)((e, t, o) => {
|
|
7032
7033
|
let i = e[t];
|
|
7033
|
-
return
|
|
7034
|
-
let
|
|
7035
|
-
return !
|
|
7034
|
+
return !i || i.type === "story" || i.type === "docs" || !i.children ? [] : i.children.reduce((r, n) => {
|
|
7035
|
+
let l = e[n];
|
|
7036
|
+
return !l || o && (l.type === "story" || l.type === "docs") || r.push(n, ...st(e, n, o)), r;
|
|
7036
7037
|
}, []);
|
|
7037
7038
|
});
|
|
7038
7039
|
function Cc(e, t) {
|
|
@@ -11455,6 +11456,8 @@ ow, 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0px -5px 20px 10px ${r.background.app})`,
|
|
|
11455
11456
|
zIndex: 1,
|
|
11456
11457
|
borderRadius: e.appBorderRadius,
|
|
11457
11458
|
backgroundColor: e.background.content,
|
|
11459
|
+
display: "flex",
|
|
11460
|
+
flexDirection: "column-reverse",
|
|
11458
11461
|
"&:hover #testing-module-collapse-toggle": {
|
|
11459
11462
|
opacity: 1
|
|
11460
11463
|
}
|
|
@@ -11581,24 +11584,8 @@ ow, 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0px -5px 20px 10px ${r.background.app})`,
|
|
|
11581
11584
|
updated: v,
|
|
11582
11585
|
"data-updated": v
|
|
11583
11586
|
},
|
|
11584
|
-
/* @__PURE__ */ s.createElement($I, null,
|
|
11585
|
-
|
|
11586
|
-
{
|
|
11587
|
-
"data-testid": "collapse",
|
|
11588
|
-
style: {
|
|
11589
|
-
transition: E ? "max-height 250ms" : "max-height 0ms",
|
|
11590
|
-
display: T ? "block" : "none",
|
|
11591
|
-
maxHeight: y ? 0 : b
|
|
11592
|
-
}
|
|
11593
|
-
},
|
|
11594
|
-
/* @__PURE__ */ s.createElement(GI, { ref: h }, Object.values(e).map((C) => {
|
|
11595
|
-
let { render: P, id: D } = C;
|
|
11596
|
-
return P ? /* @__PURE__ */ s.createElement(JI, { key: D, "data-module-id": D }, /* @__PURE__ */ s.createElement(P, null)) : (Fa.warn(
|
|
11597
|
-
`No render function found for test provider with id '${D}', skipping...`
|
|
11598
|
-
), null);
|
|
11599
|
-
}))
|
|
11600
|
-
), /* @__PURE__ */ s.createElement(qI, { ...T ? { onClick: /* @__PURE__ */ a((C) => O(C), "onClick") } : {} }, /* @__PURE__ */ s.createElement(
|
|
11601
|
-
YI, null, T && /* @__PURE__ */ s.createElement(
|
|
11587
|
+
/* @__PURE__ */ s.createElement($I, null, /* @__PURE__ */ s.createElement(qI, { ...T ? { onClick: /* @__PURE__ */ a((C) => O(C), "onClic\
|
|
11588
|
+
k") } : {} }, /* @__PURE__ */ s.createElement(YI, null, T && /* @__PURE__ */ s.createElement(
|
|
11602
11589
|
ve,
|
|
11603
11590
|
{
|
|
11604
11591
|
hasChrome: !1,
|
|
@@ -11723,7 +11710,24 @@ ow, 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0px -5px 20px 10px ${r.background.app})`,
|
|
|
11723
11710
|
},
|
|
11724
11711
|
/* @__PURE__ */ s.createElement(Gn, null)
|
|
11725
11712
|
)
|
|
11726
|
-
)))
|
|
11713
|
+
))), T && /* @__PURE__ */ s.createElement(
|
|
11714
|
+
UI,
|
|
11715
|
+
{
|
|
11716
|
+
"data-testid": "collapse",
|
|
11717
|
+
...y && { inert: "" },
|
|
11718
|
+
style: {
|
|
11719
|
+
transition: E ? "max-height 250ms" : "max-height 0ms",
|
|
11720
|
+
display: T ? "block" : "none",
|
|
11721
|
+
maxHeight: y ? 0 : b
|
|
11722
|
+
}
|
|
11723
|
+
},
|
|
11724
|
+
/* @__PURE__ */ s.createElement(GI, { ref: h }, Object.values(e).map((C) => {
|
|
11725
|
+
let { render: P, id: D } = C;
|
|
11726
|
+
return P ? /* @__PURE__ */ s.createElement(JI, { key: D, "data-module-id": D }, /* @__PURE__ */ s.createElement(P, null)) : (Fa.warn(
|
|
11727
|
+
`No render function found for test provider with id '${D}', skipping...`
|
|
11728
|
+
), null);
|
|
11729
|
+
}))
|
|
11730
|
+
))
|
|
11727
11731
|
);
|
|
11728
11732
|
}, "TestingModule");
|
|
11729
11733
|
|
|
@@ -12072,6 +12076,7 @@ var at = "storybook_internal", gS = x.nav(({ theme: e }) => ({
|
|
|
12072
12076
|
/* @__PURE__ */ s.createElement(
|
|
12073
12077
|
vS,
|
|
12074
12078
|
{
|
|
12079
|
+
"aria-label": "Create a new story",
|
|
12075
12080
|
isMobile: w,
|
|
12076
12081
|
onClick: () => {
|
|
12077
12082
|
S(!0);
|
|
@@ -4403,7 +4403,7 @@ U(wr, {
|
|
|
4403
4403
|
var kt = require("@storybook/global"), on = L(rr(), 1), $ = L(require("semver"), 1);
|
|
4404
4404
|
|
|
4405
4405
|
// src/manager-api/version.ts
|
|
4406
|
-
var tn = "9.0.
|
|
4406
|
+
var tn = "9.0.16";
|
|
4407
4407
|
|
|
4408
4408
|
// src/manager-api/modules/versions.ts
|
|
4409
4409
|
var { VERSIONCHECK: Qs } = kt.global, rn = (0, on.default)(1)(() => {
|
|
@@ -1734,7 +1734,10 @@ declare global {
|
|
|
1734
1734
|
var defaultProjectAnnotations: ProjectAnnotations<any>;
|
|
1735
1735
|
}
|
|
1736
1736
|
type WrappedStoryRef = {
|
|
1737
|
-
__pw_type: 'jsx'
|
|
1737
|
+
__pw_type: 'jsx';
|
|
1738
|
+
props: Record<string, any>;
|
|
1739
|
+
} | {
|
|
1740
|
+
__pw_type: 'importRef';
|
|
1738
1741
|
};
|
|
1739
1742
|
type UnwrappedJSXStoryRef = {
|
|
1740
1743
|
__pw_type: 'jsx';
|
|
@@ -3217,7 +3217,7 @@ import { global as Sr } from "@storybook/global";
|
|
|
3217
3217
|
import $ from "semver";
|
|
3218
3218
|
|
|
3219
3219
|
// src/manager-api/version.ts
|
|
3220
|
-
var No = "9.0.
|
|
3220
|
+
var No = "9.0.16";
|
|
3221
3221
|
|
|
3222
3222
|
// src/manager-api/modules/versions.ts
|
|
3223
3223
|
var { VERSIONCHECK: ca } = Sr, jo = (0, ko.default)(1)(() => {
|
package/dist/preview/runtime.js
CHANGED
|
@@ -41346,15 +41346,16 @@ function CH(e) {
|
|
|
41346
41346
|
|
|
41347
41347
|
More info: https://storybook.js.org/docs/api/portable-stories-playwright
|
|
41348
41348
|
`);
|
|
41349
|
-
|
|
41350
|
-
|
|
41351
|
-
|
|
41352
|
-
|
|
41353
|
-
|
|
41354
|
-
|
|
41355
|
-
|
|
41356
|
-
|
|
41357
|
-
|
|
41349
|
+
let { props: a, ...l } = i;
|
|
41350
|
+
await r.evaluate(async (c) => {
|
|
41351
|
+
let d = await globalThis.__pwUnwrapObject?.(c);
|
|
41352
|
+
return ("__pw_type" in d ? d.type : d)?.load?.();
|
|
41353
|
+
}, l);
|
|
41354
|
+
let u = await t(i, ...s);
|
|
41355
|
+
return await r.evaluate(async (c) => {
|
|
41356
|
+
let d = await globalThis.__pwUnwrapObject?.(c), p = "__pw_type" in d ? d.type : d, f = document.querySelector("#root");
|
|
41357
|
+
return p?.play?.({ canvasElement: f });
|
|
41358
|
+
}, l), u;
|
|
41358
41359
|
});
|
|
41359
41360
|
}, "mount")
|
|
41360
41361
|
});
|
|
@@ -5350,15 +5350,16 @@ function ys(e) {
|
|
|
5350
5350
|
|
|
5351
5351
|
More info: https://storybook.js.org/docs/api/portable-stories-playwright
|
|
5352
5352
|
`);
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5353
|
+
let { props: a, ...l } = n;
|
|
5354
|
+
await r.evaluate(async (d) => {
|
|
5355
|
+
let p = await globalThis.__pwUnwrapObject?.(d);
|
|
5356
|
+
return ("__pw_type" in p ? p.type : p)?.load?.();
|
|
5357
|
+
}, l);
|
|
5358
|
+
let c = await t(n, ...s);
|
|
5359
|
+
return await r.evaluate(async (d) => {
|
|
5360
|
+
let p = await globalThis.__pwUnwrapObject?.(d), u = "__pw_type" in p ? p.type : p, y = document.querySelector("#root");
|
|
5361
|
+
return u?.play?.({ canvasElement: y });
|
|
5362
|
+
}, l), c;
|
|
5362
5363
|
});
|
|
5363
5364
|
}, "mount")
|
|
5364
5365
|
});
|
|
@@ -397,7 +397,10 @@ declare function setProjectAnnotations<TRenderer extends Renderer = Renderer>(pr
|
|
|
397
397
|
declare function composeStory<TRenderer extends Renderer = Renderer, TArgs extends Args = Args>(storyAnnotations: LegacyStoryAnnotationsOrFn<TRenderer>, componentAnnotations: ComponentAnnotations<TRenderer, TArgs>, projectAnnotations?: ProjectAnnotations<TRenderer>, defaultConfig?: ProjectAnnotations<TRenderer>, exportsName?: string): ComposedStoryFn<TRenderer, Partial<TArgs>>;
|
|
398
398
|
declare function composeStories<TModule extends Store_CSFExports>(storiesImport: TModule, globalConfig: ProjectAnnotations<Renderer>, composeStoryFn?: ComposeStoryFn): {};
|
|
399
399
|
type WrappedStoryRef = {
|
|
400
|
-
__pw_type: 'jsx'
|
|
400
|
+
__pw_type: 'jsx';
|
|
401
|
+
props: Record<string, any>;
|
|
402
|
+
} | {
|
|
403
|
+
__pw_type: 'importRef';
|
|
401
404
|
};
|
|
402
405
|
type UnwrappedJSXStoryRef = {
|
|
403
406
|
__pw_type: 'jsx';
|