storybook 9.0.0-alpha.9 → 9.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/server/base-preview-head.html +1 -3
- package/bin/index.cjs +2 -2
- package/dist/actions/decorator.js +67 -72
- package/dist/actions/index.cjs +27 -31
- package/dist/actions/index.d.ts +0 -3
- package/dist/actions/index.js +27 -31
- package/dist/actions/preview.cjs +23 -27
- package/dist/actions/preview.d.ts +0 -1
- package/dist/actions/preview.js +19 -23
- package/dist/babel/index.cjs +822 -816
- package/dist/babel/index.js +822 -816
- package/dist/backgrounds/index.cjs +148 -0
- package/dist/backgrounds/index.d.ts +91 -0
- package/dist/backgrounds/index.js +130 -0
- package/dist/backgrounds/preview.cjs +143 -0
- package/dist/backgrounds/preview.d.ts +54 -0
- package/dist/backgrounds/preview.js +127 -0
- package/dist/bin/index.cjs +73 -92
- package/dist/bin/index.js +66 -85
- package/dist/builder-manager/index.cjs +316 -296
- package/dist/builder-manager/index.js +567 -547
- package/dist/channels/index.cjs +1020 -950
- package/dist/channels/index.js +1256 -1201
- package/dist/cli/bin/index.cjs +198 -198
- package/dist/cli/bin/index.js +204 -204
- package/dist/cli/index.cjs +61734 -7589
- package/dist/cli/index.d.ts +24 -20
- package/dist/cli/index.js +61775 -7630
- package/dist/common/index.cjs +16133 -9095
- package/dist/common/index.d.ts +32 -24
- package/dist/common/index.js +16227 -9183
- package/dist/component-testing/index.cjs +23 -0
- package/dist/component-testing/index.d.ts +3 -0
- package/dist/component-testing/index.js +5 -0
- package/dist/component-testing/preview.cjs +40 -0
- package/dist/component-testing/preview.d.ts +5 -0
- package/dist/component-testing/preview.js +25 -0
- package/dist/components/index.cjs +6479 -13005
- package/dist/components/index.d.ts +8 -257
- package/dist/components/index.js +6160 -18689
- package/dist/controls/decorator.d.ts +5 -0
- package/dist/controls/decorator.js +8 -0
- package/dist/controls/index.cjs +26 -0
- package/dist/controls/index.d.ts +39 -0
- package/dist/controls/index.js +6 -0
- package/dist/controls/preview.cjs +26 -0
- package/dist/controls/preview.d.ts +54 -0
- package/dist/controls/preview.js +9 -0
- package/dist/core-events/index.cjs +91 -106
- package/dist/core-events/index.d.ts +2 -80
- package/dist/core-events/index.js +79 -94
- package/dist/core-server/index.cjs +12409 -12231
- package/dist/core-server/index.d.ts +32 -23
- package/dist/core-server/index.js +12567 -12389
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +12153 -12
- package/dist/core-server/presets/common-preset.cjs +3004 -3151
- package/dist/core-server/presets/common-preset.js +2833 -2981
- package/dist/csf/index.d.ts +1 -3
- package/dist/csf-tools/index.cjs +412 -403
- package/dist/csf-tools/index.d.ts +0 -4
- package/dist/csf-tools/index.js +410 -401
- package/dist/docs-tools/index.cjs +2569 -575
- package/dist/docs-tools/index.js +2565 -564
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +61 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +535 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +519 -0
- package/dist/instrumenter/index.cjs +1411 -1758
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +1325 -1663
- package/dist/manager/globals-module-info.cjs +22 -33
- package/dist/manager/globals-module-info.js +7 -18
- package/dist/manager/globals-runtime.js +45452 -49541
- package/dist/manager/runtime.js +4392 -3774
- package/dist/manager-api/index.cjs +2622 -2529
- package/dist/manager-api/index.d.ts +109 -114
- package/dist/manager-api/index.js +2603 -2475
- package/dist/manager-errors.js +41 -37
- package/dist/measure/index.cjs +476 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +464 -0
- package/dist/measure/preview.cjs +466 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +450 -0
- package/dist/outline/index.cjs +528 -0
- package/dist/outline/index.d.ts +66 -0
- package/dist/outline/index.js +500 -0
- package/dist/outline/preview.cjs +518 -0
- package/dist/outline/preview.d.ts +59 -0
- package/dist/outline/preview.js +486 -0
- package/dist/preview/runtime.js +41973 -38159
- package/dist/preview-api/index.cjs +1204 -1293
- package/dist/preview-api/index.d.ts +126 -178
- package/dist/preview-api/index.js +1614 -1685
- package/dist/preview-errors.cjs +65 -51
- package/dist/preview-errors.d.ts +6 -2
- package/dist/preview-errors.js +176 -142
- package/dist/server-errors.cjs +160 -113
- package/dist/server-errors.d.ts +12 -2
- package/dist/server-errors.js +157 -110
- package/dist/telemetry/index.cjs +374 -370
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +460 -456
- package/dist/test/index.cjs +1553 -1552
- package/dist/test/index.js +9603 -9514
- package/dist/test/preview.cjs +1906 -1905
- package/dist/test/preview.d.ts +0 -6
- package/dist/test/preview.js +3664 -3603
- package/dist/test/spy.cjs +65 -64
- package/dist/test/spy.js +59 -58
- package/dist/types/index.cjs +11 -12
- package/dist/types/index.d.ts +601 -334
- package/dist/types/index.js +1 -2
- package/dist/viewport/index.cjs +310 -0
- package/dist/viewport/index.d.ts +320 -0
- package/dist/viewport/index.js +290 -0
- package/dist/viewport/preview.cjs +35 -0
- package/dist/viewport/preview.d.ts +68 -0
- package/dist/viewport/preview.js +19 -0
- package/package.json +207 -12
- package/dist/actions/manager.js +0 -1196
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
// src/viewport/constants.ts
|
|
2
|
+
var e = "storybook/viewport", t = "viewport", o = `${e}/panel`, h = `${e}/tool`;
|
|
3
|
+
|
|
4
|
+
// src/viewport/defaults.ts
|
|
5
|
+
var p = {
|
|
6
|
+
iphone5: {
|
|
7
|
+
name: "iPhone 5",
|
|
8
|
+
styles: {
|
|
9
|
+
height: "568px",
|
|
10
|
+
width: "320px"
|
|
11
|
+
},
|
|
12
|
+
type: "mobile"
|
|
13
|
+
},
|
|
14
|
+
iphone6: {
|
|
15
|
+
name: "iPhone 6",
|
|
16
|
+
styles: {
|
|
17
|
+
height: "667px",
|
|
18
|
+
width: "375px"
|
|
19
|
+
},
|
|
20
|
+
type: "mobile"
|
|
21
|
+
},
|
|
22
|
+
iphone6p: {
|
|
23
|
+
name: "iPhone 6 Plus",
|
|
24
|
+
styles: {
|
|
25
|
+
height: "736px",
|
|
26
|
+
width: "414px"
|
|
27
|
+
},
|
|
28
|
+
type: "mobile"
|
|
29
|
+
},
|
|
30
|
+
iphone8p: {
|
|
31
|
+
name: "iPhone 8 Plus",
|
|
32
|
+
styles: {
|
|
33
|
+
height: "736px",
|
|
34
|
+
width: "414px"
|
|
35
|
+
},
|
|
36
|
+
type: "mobile"
|
|
37
|
+
},
|
|
38
|
+
iphonex: {
|
|
39
|
+
name: "iPhone X",
|
|
40
|
+
styles: {
|
|
41
|
+
height: "812px",
|
|
42
|
+
width: "375px"
|
|
43
|
+
},
|
|
44
|
+
type: "mobile"
|
|
45
|
+
},
|
|
46
|
+
iphonexr: {
|
|
47
|
+
name: "iPhone XR",
|
|
48
|
+
styles: {
|
|
49
|
+
height: "896px",
|
|
50
|
+
width: "414px"
|
|
51
|
+
},
|
|
52
|
+
type: "mobile"
|
|
53
|
+
},
|
|
54
|
+
iphonexsmax: {
|
|
55
|
+
name: "iPhone XS Max",
|
|
56
|
+
styles: {
|
|
57
|
+
height: "896px",
|
|
58
|
+
width: "414px"
|
|
59
|
+
},
|
|
60
|
+
type: "mobile"
|
|
61
|
+
},
|
|
62
|
+
iphonese2: {
|
|
63
|
+
name: "iPhone SE (2nd generation)",
|
|
64
|
+
styles: {
|
|
65
|
+
height: "667px",
|
|
66
|
+
width: "375px"
|
|
67
|
+
},
|
|
68
|
+
type: "mobile"
|
|
69
|
+
},
|
|
70
|
+
iphone12mini: {
|
|
71
|
+
name: "iPhone 12 mini",
|
|
72
|
+
styles: {
|
|
73
|
+
height: "812px",
|
|
74
|
+
width: "375px"
|
|
75
|
+
},
|
|
76
|
+
type: "mobile"
|
|
77
|
+
},
|
|
78
|
+
iphone12: {
|
|
79
|
+
name: "iPhone 12",
|
|
80
|
+
styles: {
|
|
81
|
+
height: "844px",
|
|
82
|
+
width: "390px"
|
|
83
|
+
},
|
|
84
|
+
type: "mobile"
|
|
85
|
+
},
|
|
86
|
+
iphone12promax: {
|
|
87
|
+
name: "iPhone 12 Pro Max",
|
|
88
|
+
styles: {
|
|
89
|
+
height: "926px",
|
|
90
|
+
width: "428px"
|
|
91
|
+
},
|
|
92
|
+
type: "mobile"
|
|
93
|
+
},
|
|
94
|
+
iphoneSE3: {
|
|
95
|
+
name: "iPhone SE 3rd generation",
|
|
96
|
+
styles: {
|
|
97
|
+
height: "667px",
|
|
98
|
+
width: "375px"
|
|
99
|
+
},
|
|
100
|
+
type: "mobile"
|
|
101
|
+
},
|
|
102
|
+
iphone13: {
|
|
103
|
+
name: "iPhone 13",
|
|
104
|
+
styles: {
|
|
105
|
+
height: "844px",
|
|
106
|
+
width: "390px"
|
|
107
|
+
},
|
|
108
|
+
type: "mobile"
|
|
109
|
+
},
|
|
110
|
+
iphone13pro: {
|
|
111
|
+
name: "iPhone 13 Pro",
|
|
112
|
+
styles: {
|
|
113
|
+
height: "844px",
|
|
114
|
+
width: "390px"
|
|
115
|
+
},
|
|
116
|
+
type: "mobile"
|
|
117
|
+
},
|
|
118
|
+
iphone13promax: {
|
|
119
|
+
name: "iPhone 13 Pro Max",
|
|
120
|
+
styles: {
|
|
121
|
+
height: "926px",
|
|
122
|
+
width: "428px"
|
|
123
|
+
},
|
|
124
|
+
type: "mobile"
|
|
125
|
+
},
|
|
126
|
+
iphone14: {
|
|
127
|
+
name: "iPhone 14",
|
|
128
|
+
styles: {
|
|
129
|
+
height: "844px",
|
|
130
|
+
width: "390px"
|
|
131
|
+
},
|
|
132
|
+
type: "mobile"
|
|
133
|
+
},
|
|
134
|
+
iphone14pro: {
|
|
135
|
+
name: "iPhone 14 Pro",
|
|
136
|
+
styles: {
|
|
137
|
+
height: "852px",
|
|
138
|
+
width: "393px"
|
|
139
|
+
},
|
|
140
|
+
type: "mobile"
|
|
141
|
+
},
|
|
142
|
+
iphone14promax: {
|
|
143
|
+
name: "iPhone 14 Pro Max",
|
|
144
|
+
styles: {
|
|
145
|
+
height: "932px",
|
|
146
|
+
width: "430px"
|
|
147
|
+
},
|
|
148
|
+
type: "mobile"
|
|
149
|
+
},
|
|
150
|
+
ipad: {
|
|
151
|
+
name: "iPad",
|
|
152
|
+
styles: {
|
|
153
|
+
height: "1024px",
|
|
154
|
+
width: "768px"
|
|
155
|
+
},
|
|
156
|
+
type: "tablet"
|
|
157
|
+
},
|
|
158
|
+
ipad10p: {
|
|
159
|
+
name: "iPad Pro 10.5-in",
|
|
160
|
+
styles: {
|
|
161
|
+
height: "1112px",
|
|
162
|
+
width: "834px"
|
|
163
|
+
},
|
|
164
|
+
type: "tablet"
|
|
165
|
+
},
|
|
166
|
+
ipad11p: {
|
|
167
|
+
name: "iPad Pro 11-in",
|
|
168
|
+
styles: {
|
|
169
|
+
height: "1194px",
|
|
170
|
+
width: "834px"
|
|
171
|
+
},
|
|
172
|
+
type: "tablet"
|
|
173
|
+
},
|
|
174
|
+
ipad12p: {
|
|
175
|
+
name: "iPad Pro 12.9-in",
|
|
176
|
+
styles: {
|
|
177
|
+
height: "1366px",
|
|
178
|
+
width: "1024px"
|
|
179
|
+
},
|
|
180
|
+
type: "tablet"
|
|
181
|
+
},
|
|
182
|
+
galaxys5: {
|
|
183
|
+
name: "Galaxy S5",
|
|
184
|
+
styles: {
|
|
185
|
+
height: "640px",
|
|
186
|
+
width: "360px"
|
|
187
|
+
},
|
|
188
|
+
type: "mobile"
|
|
189
|
+
},
|
|
190
|
+
galaxys9: {
|
|
191
|
+
name: "Galaxy S9",
|
|
192
|
+
styles: {
|
|
193
|
+
height: "740px",
|
|
194
|
+
width: "360px"
|
|
195
|
+
},
|
|
196
|
+
type: "mobile"
|
|
197
|
+
},
|
|
198
|
+
nexus5x: {
|
|
199
|
+
name: "Nexus 5X",
|
|
200
|
+
styles: {
|
|
201
|
+
height: "660px",
|
|
202
|
+
width: "412px"
|
|
203
|
+
},
|
|
204
|
+
type: "mobile"
|
|
205
|
+
},
|
|
206
|
+
nexus6p: {
|
|
207
|
+
name: "Nexus 6P",
|
|
208
|
+
styles: {
|
|
209
|
+
height: "732px",
|
|
210
|
+
width: "412px"
|
|
211
|
+
},
|
|
212
|
+
type: "mobile"
|
|
213
|
+
},
|
|
214
|
+
pixel: {
|
|
215
|
+
name: "Pixel",
|
|
216
|
+
styles: {
|
|
217
|
+
height: "960px",
|
|
218
|
+
width: "540px"
|
|
219
|
+
},
|
|
220
|
+
type: "mobile"
|
|
221
|
+
},
|
|
222
|
+
pixelxl: {
|
|
223
|
+
name: "Pixel XL",
|
|
224
|
+
styles: {
|
|
225
|
+
height: "1280px",
|
|
226
|
+
width: "720px"
|
|
227
|
+
},
|
|
228
|
+
type: "mobile"
|
|
229
|
+
}
|
|
230
|
+
}, x = p, n = "responsive", l = {
|
|
231
|
+
mobile1: {
|
|
232
|
+
name: "Small mobile",
|
|
233
|
+
styles: {
|
|
234
|
+
height: "568px",
|
|
235
|
+
width: "320px"
|
|
236
|
+
},
|
|
237
|
+
type: "mobile"
|
|
238
|
+
},
|
|
239
|
+
mobile2: {
|
|
240
|
+
name: "Large mobile",
|
|
241
|
+
styles: {
|
|
242
|
+
height: "896px",
|
|
243
|
+
width: "414px"
|
|
244
|
+
},
|
|
245
|
+
type: "mobile"
|
|
246
|
+
},
|
|
247
|
+
tablet: {
|
|
248
|
+
name: "Tablet",
|
|
249
|
+
styles: {
|
|
250
|
+
height: "1112px",
|
|
251
|
+
width: "834px"
|
|
252
|
+
},
|
|
253
|
+
type: "tablet"
|
|
254
|
+
},
|
|
255
|
+
desktop: {
|
|
256
|
+
name: "Desktop",
|
|
257
|
+
styles: {
|
|
258
|
+
height: "1024px",
|
|
259
|
+
width: "1280px"
|
|
260
|
+
},
|
|
261
|
+
type: "desktop"
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
// src/viewport/preview.ts
|
|
266
|
+
import { definePreview as r } from "storybook/preview-api";
|
|
267
|
+
var w = {
|
|
268
|
+
[t]: { value: void 0, isRotated: !1 }
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
// src/viewport/responsiveViewport.tsx
|
|
272
|
+
var g = {
|
|
273
|
+
name: "Reset viewport",
|
|
274
|
+
styles: {
|
|
275
|
+
height: "100%",
|
|
276
|
+
width: "100%"
|
|
277
|
+
},
|
|
278
|
+
type: "desktop"
|
|
279
|
+
};
|
|
280
|
+
export {
|
|
281
|
+
e as ADDON_ID,
|
|
282
|
+
n as DEFAULT_VIEWPORT,
|
|
283
|
+
x as INITIAL_VIEWPORTS,
|
|
284
|
+
l as MINIMAL_VIEWPORTS,
|
|
285
|
+
o as PANEL_ID,
|
|
286
|
+
t as PARAM_KEY,
|
|
287
|
+
h as TOOL_ID,
|
|
288
|
+
w as initialGlobals,
|
|
289
|
+
g as responsiveViewport
|
|
290
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var p = Object.defineProperty;
|
|
3
|
+
var c = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var d = Object.getOwnPropertyNames;
|
|
5
|
+
var m = Object.prototype.hasOwnProperty;
|
|
6
|
+
var l = (t, o) => p(t, "name", { value: o, configurable: !0 });
|
|
7
|
+
var x = (t, o) => {
|
|
8
|
+
for (var r in o)
|
|
9
|
+
p(t, r, { get: o[r], enumerable: !0 });
|
|
10
|
+
}, A = (t, o, r, i) => {
|
|
11
|
+
if (o && typeof o == "object" || typeof o == "function")
|
|
12
|
+
for (let e of d(o))
|
|
13
|
+
!m.call(t, e) && e !== r && p(t, e, { get: () => o[e], enumerable: !(i = c(o, e)) || i.enumerable });
|
|
14
|
+
return t;
|
|
15
|
+
};
|
|
16
|
+
var D = (t) => A(p({}, "__esModule", { value: !0 }), t);
|
|
17
|
+
|
|
18
|
+
// src/viewport/preview.ts
|
|
19
|
+
var b = {};
|
|
20
|
+
x(b, {
|
|
21
|
+
default: () => _,
|
|
22
|
+
initialGlobals: () => f
|
|
23
|
+
});
|
|
24
|
+
module.exports = D(b);
|
|
25
|
+
var s = require("storybook/preview-api");
|
|
26
|
+
|
|
27
|
+
// src/viewport/constants.ts
|
|
28
|
+
var a = "storybook/viewport", n = "viewport", P = `${a}/panel`, R = `${a}/tool`;
|
|
29
|
+
|
|
30
|
+
// src/viewport/preview.ts
|
|
31
|
+
var f = {
|
|
32
|
+
[n]: { value: void 0, isRotated: !1 }
|
|
33
|
+
}, _ = /* @__PURE__ */ l(() => (0, s.definePreview)({
|
|
34
|
+
initialGlobals: f
|
|
35
|
+
}), "default");
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Renderer as Renderer$1, ProjectAnnotations as ProjectAnnotations$1, StoryIdentifier, StoryContext, PartialStoryFn, LegacyStoryFn } from 'storybook/internal/csf';
|
|
2
|
+
import { NormalizedProjectAnnotations, ProjectAnnotations as ProjectAnnotations$2, ComposedStoryFn } from 'storybook/internal/types';
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
interface SymbolConstructor {
|
|
6
|
+
readonly observable: symbol;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Renderer extends Renderer$1 {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type MaybePromise<T> = Promise<T> | T;
|
|
14
|
+
type TeardownRenderToCanvas = () => MaybePromise<void>;
|
|
15
|
+
type RenderToCanvas<TRenderer extends Renderer> = (context: RenderContext<TRenderer>, element: TRenderer['canvasElement']) => MaybePromise<void | TeardownRenderToCanvas>;
|
|
16
|
+
interface ProjectAnnotations<TRenderer extends Renderer> extends ProjectAnnotations$1<TRenderer> {
|
|
17
|
+
addons?: ProjectAnnotations<TRenderer>[];
|
|
18
|
+
testingLibraryRender?: (...args: never[]) => {
|
|
19
|
+
unmount: () => void;
|
|
20
|
+
};
|
|
21
|
+
renderToCanvas?: RenderToCanvas<TRenderer>;
|
|
22
|
+
}
|
|
23
|
+
declare type RenderContext<TRenderer extends Renderer = Renderer> = StoryIdentifier & {
|
|
24
|
+
showMain: () => void;
|
|
25
|
+
showError: (error: {
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
}) => void;
|
|
29
|
+
showException: (err: Error) => void;
|
|
30
|
+
forceRemount: boolean;
|
|
31
|
+
storyContext: StoryContext<TRenderer>;
|
|
32
|
+
storyFn: PartialStoryFn<TRenderer>;
|
|
33
|
+
unboundStoryFn: LegacyStoryFn<TRenderer>;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare global {
|
|
37
|
+
var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
|
|
38
|
+
var defaultProjectAnnotations: ProjectAnnotations$2<any>;
|
|
39
|
+
}
|
|
40
|
+
type WrappedStoryRef = {
|
|
41
|
+
__pw_type: 'jsx' | 'importRef';
|
|
42
|
+
};
|
|
43
|
+
type UnwrappedJSXStoryRef = {
|
|
44
|
+
__pw_type: 'jsx';
|
|
45
|
+
type: UnwrappedImportStoryRef;
|
|
46
|
+
};
|
|
47
|
+
type UnwrappedImportStoryRef = ComposedStoryFn;
|
|
48
|
+
declare global {
|
|
49
|
+
function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type GlobalState = {
|
|
53
|
+
/**
|
|
54
|
+
* When set, the viewport is applied and cannot be changed using the toolbar. Must match the key
|
|
55
|
+
* of one of the available viewports.
|
|
56
|
+
*/
|
|
57
|
+
value: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* When true the viewport applied will be rotated 90°, e.g. it will rotate from portrait to
|
|
60
|
+
* landscape orientation.
|
|
61
|
+
*/
|
|
62
|
+
isRotated: boolean;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
declare const initialGlobals: Record<string, GlobalState>;
|
|
66
|
+
declare const _default: () => ProjectAnnotations<Renderer>;
|
|
67
|
+
|
|
68
|
+
export { _default as default, initialGlobals };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var o = (r, p) => i(r, "name", { value: p, configurable: !0 });
|
|
3
|
+
|
|
4
|
+
// src/viewport/preview.ts
|
|
5
|
+
import { definePreview as l } from "storybook/preview-api";
|
|
6
|
+
|
|
7
|
+
// src/viewport/constants.ts
|
|
8
|
+
var t = "storybook/viewport", e = "viewport", s = `${t}/panel`, f = `${t}/tool`;
|
|
9
|
+
|
|
10
|
+
// src/viewport/preview.ts
|
|
11
|
+
var a = {
|
|
12
|
+
[e]: { value: void 0, isRotated: !1 }
|
|
13
|
+
}, x = /* @__PURE__ */ o(() => l({
|
|
14
|
+
initialGlobals: a
|
|
15
|
+
}), "default");
|
|
16
|
+
export {
|
|
17
|
+
x as default,
|
|
18
|
+
a as initialGlobals
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook",
|
|
3
|
-
"version": "9.0.0-
|
|
3
|
+
"version": "9.0.0-beta.0",
|
|
4
4
|
"description": "Storybook framework-agnostic API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"type": "module",
|
|
24
24
|
"imports": {
|
|
25
|
-
"#manager-
|
|
26
|
-
"storybook": "./src/manager/
|
|
27
|
-
"default": "./src/manager/
|
|
25
|
+
"#manager-stores": {
|
|
26
|
+
"storybook": "./src/manager/manager-stores.mock.ts",
|
|
27
|
+
"default": "./src/manager/manager-stores.ts"
|
|
28
28
|
},
|
|
29
29
|
"#utils": {
|
|
30
30
|
"storybook": "./template/stories/utils.mock.ts",
|
|
@@ -83,6 +83,86 @@
|
|
|
83
83
|
"import": "./dist/core-server/presets/common-override-preset.js",
|
|
84
84
|
"require": "./dist/core-server/presets/common-override-preset.cjs"
|
|
85
85
|
},
|
|
86
|
+
"./internal/backgrounds": {
|
|
87
|
+
"types": "./dist/backgrounds/index.d.ts",
|
|
88
|
+
"import": "./dist/backgrounds/index.js",
|
|
89
|
+
"require": "./dist/backgrounds/index.cjs"
|
|
90
|
+
},
|
|
91
|
+
"./backgrounds": {
|
|
92
|
+
"types": "./dist/backgrounds/index.d.ts",
|
|
93
|
+
"import": "./dist/backgrounds/index.js",
|
|
94
|
+
"require": "./dist/backgrounds/index.cjs"
|
|
95
|
+
},
|
|
96
|
+
"./internal/backgrounds/preview": {
|
|
97
|
+
"types": "./dist/backgrounds/preview.d.ts",
|
|
98
|
+
"import": "./dist/backgrounds/preview.js",
|
|
99
|
+
"require": "./dist/backgrounds/preview.cjs"
|
|
100
|
+
},
|
|
101
|
+
"./backgrounds/preview": {
|
|
102
|
+
"types": "./dist/backgrounds/preview.d.ts",
|
|
103
|
+
"import": "./dist/backgrounds/preview.js",
|
|
104
|
+
"require": "./dist/backgrounds/preview.cjs"
|
|
105
|
+
},
|
|
106
|
+
"./internal/measure": {
|
|
107
|
+
"types": "./dist/measure/index.d.ts",
|
|
108
|
+
"import": "./dist/measure/index.js",
|
|
109
|
+
"require": "./dist/measure/index.cjs"
|
|
110
|
+
},
|
|
111
|
+
"./measure": {
|
|
112
|
+
"types": "./dist/measure/index.d.ts",
|
|
113
|
+
"import": "./dist/measure/index.js",
|
|
114
|
+
"require": "./dist/measure/index.cjs"
|
|
115
|
+
},
|
|
116
|
+
"./internal/measure/preview": {
|
|
117
|
+
"types": "./dist/measure/preview.d.ts",
|
|
118
|
+
"import": "./dist/measure/preview.js",
|
|
119
|
+
"require": "./dist/measure/preview.cjs"
|
|
120
|
+
},
|
|
121
|
+
"./measure/preview": {
|
|
122
|
+
"types": "./dist/measure/preview.d.ts",
|
|
123
|
+
"import": "./dist/measure/preview.js",
|
|
124
|
+
"require": "./dist/measure/preview.cjs"
|
|
125
|
+
},
|
|
126
|
+
"./internal/outline": {
|
|
127
|
+
"types": "./dist/outline/index.d.ts",
|
|
128
|
+
"import": "./dist/outline/index.js",
|
|
129
|
+
"require": "./dist/outline/index.cjs"
|
|
130
|
+
},
|
|
131
|
+
"./outline": {
|
|
132
|
+
"types": "./dist/outline/index.d.ts",
|
|
133
|
+
"import": "./dist/outline/index.js",
|
|
134
|
+
"require": "./dist/outline/index.cjs"
|
|
135
|
+
},
|
|
136
|
+
"./internal/outline/preview": {
|
|
137
|
+
"types": "./dist/outline/preview.d.ts",
|
|
138
|
+
"import": "./dist/outline/preview.js",
|
|
139
|
+
"require": "./dist/outline/preview.cjs"
|
|
140
|
+
},
|
|
141
|
+
"./outline/preview": {
|
|
142
|
+
"types": "./dist/outline/preview.d.ts",
|
|
143
|
+
"import": "./dist/outline/preview.js",
|
|
144
|
+
"require": "./dist/outline/preview.cjs"
|
|
145
|
+
},
|
|
146
|
+
"./internal/highlight": {
|
|
147
|
+
"types": "./dist/highlight/index.d.ts",
|
|
148
|
+
"import": "./dist/highlight/index.js",
|
|
149
|
+
"require": "./dist/highlight/index.cjs"
|
|
150
|
+
},
|
|
151
|
+
"./highlight": {
|
|
152
|
+
"types": "./dist/highlight/index.d.ts",
|
|
153
|
+
"import": "./dist/highlight/index.js",
|
|
154
|
+
"require": "./dist/highlight/index.cjs"
|
|
155
|
+
},
|
|
156
|
+
"./internal/highlight/preview": {
|
|
157
|
+
"types": "./dist/highlight/preview.d.ts",
|
|
158
|
+
"import": "./dist/highlight/preview.js",
|
|
159
|
+
"require": "./dist/highlight/preview.cjs"
|
|
160
|
+
},
|
|
161
|
+
"./highlight/preview": {
|
|
162
|
+
"types": "./dist/highlight/preview.d.ts",
|
|
163
|
+
"import": "./dist/highlight/preview.js",
|
|
164
|
+
"require": "./dist/highlight/preview.cjs"
|
|
165
|
+
},
|
|
86
166
|
"./internal/actions": {
|
|
87
167
|
"types": "./dist/actions/index.d.ts",
|
|
88
168
|
"import": "./dist/actions/index.js",
|
|
@@ -103,12 +183,6 @@
|
|
|
103
183
|
"import": "./dist/actions/preview.js",
|
|
104
184
|
"require": "./dist/actions/preview.cjs"
|
|
105
185
|
},
|
|
106
|
-
"./internal/actions/manager": {
|
|
107
|
-
"import": "./dist/actions/manager.js"
|
|
108
|
-
},
|
|
109
|
-
"./actions/manager": {
|
|
110
|
-
"import": "./dist/actions/manager.js"
|
|
111
|
-
},
|
|
112
186
|
"./internal/actions/decorator": {
|
|
113
187
|
"types": "./dist/actions/decorator.d.ts",
|
|
114
188
|
"import": "./dist/actions/decorator.js"
|
|
@@ -117,6 +191,50 @@
|
|
|
117
191
|
"types": "./dist/actions/decorator.d.ts",
|
|
118
192
|
"import": "./dist/actions/decorator.js"
|
|
119
193
|
},
|
|
194
|
+
"./internal/component-testing": {
|
|
195
|
+
"types": "./dist/component-testing/index.d.ts",
|
|
196
|
+
"import": "./dist/component-testing/index.js",
|
|
197
|
+
"require": "./dist/component-testing/index.cjs"
|
|
198
|
+
},
|
|
199
|
+
"./internal/component-testing/preview": {
|
|
200
|
+
"types": "./dist/component-testing/preview.d.ts",
|
|
201
|
+
"import": "./dist/component-testing/preview.js",
|
|
202
|
+
"require": "./dist/component-testing/preview.cjs"
|
|
203
|
+
},
|
|
204
|
+
"./internal/viewport": {
|
|
205
|
+
"types": "./dist/viewport/index.d.ts",
|
|
206
|
+
"import": "./dist/viewport/index.js",
|
|
207
|
+
"require": "./dist/viewport/index.cjs"
|
|
208
|
+
},
|
|
209
|
+
"./viewport": {
|
|
210
|
+
"types": "./dist/viewport/index.d.ts",
|
|
211
|
+
"import": "./dist/viewport/index.js",
|
|
212
|
+
"require": "./dist/viewport/index.cjs"
|
|
213
|
+
},
|
|
214
|
+
"./internal/viewport/preview": {
|
|
215
|
+
"types": "./dist/viewport/preview.d.ts",
|
|
216
|
+
"import": "./dist/viewport/preview.js",
|
|
217
|
+
"require": "./dist/viewport/preview.cjs"
|
|
218
|
+
},
|
|
219
|
+
"./viewport/preview": {
|
|
220
|
+
"types": "./dist/viewport/preview.d.ts",
|
|
221
|
+
"import": "./dist/viewport/preview.js",
|
|
222
|
+
"require": "./dist/viewport/preview.cjs"
|
|
223
|
+
},
|
|
224
|
+
"./internal/controls": {
|
|
225
|
+
"types": "./dist/controls/index.d.ts",
|
|
226
|
+
"import": "./dist/controls/index.js",
|
|
227
|
+
"require": "./dist/controls/index.cjs"
|
|
228
|
+
},
|
|
229
|
+
"./internal/controls/preview": {
|
|
230
|
+
"types": "./dist/controls/preview.d.ts",
|
|
231
|
+
"import": "./dist/controls/preview.js",
|
|
232
|
+
"require": "./dist/controls/preview.cjs"
|
|
233
|
+
},
|
|
234
|
+
"./internal/controls/decorator": {
|
|
235
|
+
"types": "./dist/controls/decorator.d.ts",
|
|
236
|
+
"import": "./dist/controls/decorator.js"
|
|
237
|
+
},
|
|
120
238
|
"./internal/core-events": {
|
|
121
239
|
"types": "./dist/core-events/index.d.ts",
|
|
122
240
|
"import": "./dist/core-events/index.js",
|
|
@@ -312,6 +430,54 @@
|
|
|
312
430
|
"internal/core-server": [
|
|
313
431
|
"./dist/core-server/index.d.ts"
|
|
314
432
|
],
|
|
433
|
+
"internal/backgrounds": [
|
|
434
|
+
"./dist/backgrounds/index.d.ts"
|
|
435
|
+
],
|
|
436
|
+
"backgrounds": [
|
|
437
|
+
"./dist/backgrounds/index.d.ts"
|
|
438
|
+
],
|
|
439
|
+
"internal/backgrounds/preview": [
|
|
440
|
+
"./dist/backgrounds/preview.d.ts"
|
|
441
|
+
],
|
|
442
|
+
"backgrounds/preview": [
|
|
443
|
+
"./dist/backgrounds/preview.d.ts"
|
|
444
|
+
],
|
|
445
|
+
"internal/measure": [
|
|
446
|
+
"./dist/measure/index.d.ts"
|
|
447
|
+
],
|
|
448
|
+
"measure": [
|
|
449
|
+
"./dist/measure/index.d.ts"
|
|
450
|
+
],
|
|
451
|
+
"internal/measure/preview": [
|
|
452
|
+
"./dist/measure/preview.d.ts"
|
|
453
|
+
],
|
|
454
|
+
"measure/preview": [
|
|
455
|
+
"./dist/measure/preview.d.ts"
|
|
456
|
+
],
|
|
457
|
+
"internal/outline": [
|
|
458
|
+
"./dist/outline/index.d.ts"
|
|
459
|
+
],
|
|
460
|
+
"outline": [
|
|
461
|
+
"./dist/outline/index.d.ts"
|
|
462
|
+
],
|
|
463
|
+
"internal/outline/preview": [
|
|
464
|
+
"./dist/outline/preview.d.ts"
|
|
465
|
+
],
|
|
466
|
+
"outline/preview": [
|
|
467
|
+
"./dist/outline/preview.d.ts"
|
|
468
|
+
],
|
|
469
|
+
"internal/highlight": [
|
|
470
|
+
"./dist/highlight/index.d.ts"
|
|
471
|
+
],
|
|
472
|
+
"highlight": [
|
|
473
|
+
"./dist/highlight/index.d.ts"
|
|
474
|
+
],
|
|
475
|
+
"internal/highlight/preview": [
|
|
476
|
+
"./dist/highlight/preview.d.ts"
|
|
477
|
+
],
|
|
478
|
+
"highlight/preview": [
|
|
479
|
+
"./dist/highlight/preview.d.ts"
|
|
480
|
+
],
|
|
315
481
|
"internal/actions": [
|
|
316
482
|
"./dist/actions/index.d.ts"
|
|
317
483
|
],
|
|
@@ -330,6 +496,33 @@
|
|
|
330
496
|
"actions/decorator": [
|
|
331
497
|
"./dist/actions/decorator.d.ts"
|
|
332
498
|
],
|
|
499
|
+
"internal/component-testing": [
|
|
500
|
+
"./dist/component-testing/index.d.ts"
|
|
501
|
+
],
|
|
502
|
+
"internal/component-testing/preview": [
|
|
503
|
+
"./dist/component-testing/preview.d.ts"
|
|
504
|
+
],
|
|
505
|
+
"internal/viewport": [
|
|
506
|
+
"./dist/viewport/index.d.ts"
|
|
507
|
+
],
|
|
508
|
+
"viewport": [
|
|
509
|
+
"./dist/viewport/index.d.ts"
|
|
510
|
+
],
|
|
511
|
+
"internal/viewport/preview": [
|
|
512
|
+
"./dist/viewport/preview.d.ts"
|
|
513
|
+
],
|
|
514
|
+
"viewport/preview": [
|
|
515
|
+
"./dist/viewport/preview.d.ts"
|
|
516
|
+
],
|
|
517
|
+
"internal/controls": [
|
|
518
|
+
"./dist/controls/index.d.ts"
|
|
519
|
+
],
|
|
520
|
+
"internal/controls/preview": [
|
|
521
|
+
"./dist/controls/preview.d.ts"
|
|
522
|
+
],
|
|
523
|
+
"internal/controls/decorator": [
|
|
524
|
+
"./dist/controls/decorator.d.ts"
|
|
525
|
+
],
|
|
333
526
|
"internal/core-events": [
|
|
334
527
|
"./dist/core-events/index.d.ts"
|
|
335
528
|
],
|
|
@@ -450,7 +643,6 @@
|
|
|
450
643
|
"better-opn": "^3.0.2",
|
|
451
644
|
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0",
|
|
452
645
|
"esbuild-register": "^3.5.0",
|
|
453
|
-
"jsdoc-type-pratt-parser": "^4.0.0",
|
|
454
646
|
"polished": "^4.2.2",
|
|
455
647
|
"recast": "^0.23.5",
|
|
456
648
|
"semver": "^7.6.2",
|
|
@@ -465,6 +657,7 @@
|
|
|
465
657
|
"@babel/preset-react": "^7.26.3",
|
|
466
658
|
"@babel/traverse": "^7.26.9",
|
|
467
659
|
"@babel/types": "^7.26.8",
|
|
660
|
+
"@devtools-ds/object-inspector": "^1.1.2",
|
|
468
661
|
"@discoveryjs/json-ext": "^0.5.3",
|
|
469
662
|
"@emotion/cache": "^11.14.0",
|
|
470
663
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
@@ -538,6 +731,7 @@
|
|
|
538
731
|
"globby": "^14.0.1",
|
|
539
732
|
"jiti": "^1.21.6",
|
|
540
733
|
"js-yaml": "^4.1.0",
|
|
734
|
+
"jsdoc-type-pratt-parser": "^4.0.0",
|
|
541
735
|
"lazy-universal-dotenv": "^4.0.0",
|
|
542
736
|
"leven": "^4.0.0",
|
|
543
737
|
"markdown-to-jsx": "^7.7.2",
|
|
@@ -572,8 +766,9 @@
|
|
|
572
766
|
"slash": "^5.0.0",
|
|
573
767
|
"source-map": "^0.7.4",
|
|
574
768
|
"store2": "^2.14.2",
|
|
769
|
+
"strip-ansi": "^7.1.0",
|
|
575
770
|
"strip-json-comments": "^5.0.1",
|
|
576
|
-
"telejson": "
|
|
771
|
+
"telejson": "8.0.0",
|
|
577
772
|
"tiny-invariant": "^1.3.1",
|
|
578
773
|
"tinyspy": "^3.0.2",
|
|
579
774
|
"ts-dedent": "^2.0.0",
|