storybook 9.1.0-alpha.6 → 9.1.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/assets/browser/favicon-wrapper.svg +46 -0
  2. package/assets/browser/favicon.svg +1 -1
  3. package/dist/bin/index.cjs +43 -43
  4. package/dist/bin/index.js +43 -43
  5. package/dist/cli/bin/index.cjs +513 -513
  6. package/dist/cli/bin/index.js +535 -535
  7. package/dist/cli/index.cjs +2454 -2453
  8. package/dist/cli/index.d.ts +10 -3
  9. package/dist/cli/index.js +2436 -2435
  10. package/dist/common/index.cjs +64 -61
  11. package/dist/common/index.d.ts +9 -3
  12. package/dist/common/index.js +64 -61
  13. package/dist/components/index.cjs +1459 -1447
  14. package/dist/components/index.d.ts +1 -0
  15. package/dist/components/index.js +407 -394
  16. package/dist/core-server/index.cjs +5833 -5819
  17. package/dist/core-server/index.d.ts +4 -1
  18. package/dist/core-server/index.js +4848 -4835
  19. package/dist/core-server/presets/common-manager.js +3403 -3332
  20. package/dist/core-server/presets/common-preset.cjs +1831 -1837
  21. package/dist/core-server/presets/common-preset.js +1787 -1792
  22. package/dist/csf/index.cjs +2536 -736
  23. package/dist/csf/index.d.ts +250 -9
  24. package/dist/csf/index.js +2558 -749
  25. package/dist/instrumenter/index.cjs +1150 -1099
  26. package/dist/instrumenter/index.d.ts +1 -0
  27. package/dist/instrumenter/index.js +1261 -1214
  28. package/dist/manager/globals-runtime.js +21313 -23957
  29. package/dist/manager/runtime.js +3713 -3534
  30. package/dist/manager-api/index.cjs +3 -3
  31. package/dist/manager-api/index.d.ts +8 -531
  32. package/dist/manager-api/index.js +3 -3
  33. package/dist/node-logger/index.cjs +1620 -1620
  34. package/dist/node-logger/index.js +1619 -1619
  35. package/dist/preview/runtime.js +13337 -16032
  36. package/dist/preview-api/index.cjs +273 -271
  37. package/dist/preview-api/index.d.ts +4 -1
  38. package/dist/preview-api/index.js +14 -12
  39. package/dist/telemetry/index.cjs +500 -500
  40. package/dist/telemetry/index.js +478 -478
  41. package/dist/test/index.cjs +9136 -9815
  42. package/dist/test/index.js +8339 -9025
  43. package/dist/types/index.d.ts +12 -12
  44. package/package.json +5 -196
  45. package/dist/actions/preview.cjs +0 -159
  46. package/dist/actions/preview.d.ts +0 -45
  47. package/dist/actions/preview.js +0 -149
  48. package/dist/backgrounds/index.cjs +0 -16
  49. package/dist/backgrounds/index.d.ts +0 -2
  50. package/dist/backgrounds/index.js +0 -0
  51. package/dist/backgrounds/preview.cjs +0 -143
  52. package/dist/backgrounds/preview.d.ts +0 -53
  53. package/dist/backgrounds/preview.js +0 -127
  54. package/dist/component-testing/index.cjs +0 -23
  55. package/dist/component-testing/index.d.ts +0 -3
  56. package/dist/component-testing/index.js +0 -5
  57. package/dist/component-testing/preview.cjs +0 -40
  58. package/dist/component-testing/preview.d.ts +0 -5
  59. package/dist/component-testing/preview.js +0 -25
  60. package/dist/controls/preview.cjs +0 -26
  61. package/dist/controls/preview.d.ts +0 -43
  62. package/dist/controls/preview.js +0 -9
  63. package/dist/highlight/preview.cjs +0 -590
  64. package/dist/highlight/preview.d.ts +0 -20
  65. package/dist/highlight/preview.js +0 -575
  66. package/dist/measure/index.cjs +0 -16
  67. package/dist/measure/index.d.ts +0 -2
  68. package/dist/measure/index.js +0 -0
  69. package/dist/measure/preview.cjs +0 -466
  70. package/dist/measure/preview.d.ts +0 -25
  71. package/dist/measure/preview.js +0 -450
  72. package/dist/outline/index.cjs +0 -16
  73. package/dist/outline/index.d.ts +0 -2
  74. package/dist/outline/index.js +0 -0
  75. package/dist/outline/preview.cjs +0 -518
  76. package/dist/outline/preview.d.ts +0 -25
  77. package/dist/outline/preview.js +0 -486
  78. package/dist/test/preview.cjs +0 -73
  79. package/dist/test/preview.d.ts +0 -17
  80. package/dist/test/preview.js +0 -66
  81. package/dist/viewport/preview.cjs +0 -35
  82. package/dist/viewport/preview.d.ts +0 -62
  83. package/dist/viewport/preview.js +0 -19
@@ -1,486 +0,0 @@
1
- var E = Object.defineProperty;
2
- var p = (i, n) => E(i, "name", { value: n, configurable: !0 });
3
-
4
- // src/outline/preview.ts
5
- import { definePreviewAddon as k } from "storybook/internal/csf";
6
-
7
- // src/outline/constants.ts
8
- var x = "outline";
9
-
10
- // src/outline/withOutline.ts
11
- import { useEffect as c, useMemo as M } from "storybook/preview-api";
12
-
13
- // src/outline/helpers.ts
14
- import { global as $ } from "@storybook/global";
15
- var b = /* @__PURE__ */ p((i) => {
16
- (Array.isArray(i) ? i : [i]).forEach(S);
17
- }, "clearStyles"), S = /* @__PURE__ */ p((i) => {
18
- let n = typeof i == "string" ? i : i.join(""), o = $.document.getElementById(n);
19
- o && o.parentElement && o.parentElement.removeChild(o);
20
- }, "clearStyle"), y = /* @__PURE__ */ p((i, n) => {
21
- let o = $.document.getElementById(i);
22
- if (o)
23
- o.innerHTML !== n && (o.innerHTML = n);
24
- else {
25
- let t = $.document.createElement("style");
26
- t.setAttribute("id", i), t.innerHTML = n, $.document.head.appendChild(t);
27
- }
28
- }, "addOutlineStyles");
29
-
30
- // ../node_modules/ts-dedent/esm/index.js
31
- function h(i) {
32
- for (var n = [], o = 1; o < arguments.length; o++)
33
- n[o - 1] = arguments[o];
34
- var t = Array.from(typeof i == "string" ? [i] : i);
35
- t[t.length - 1] = t[t.length - 1].replace(/\r?\n([\t ]*)$/, "");
36
- var m = t.reduce(function(a, s) {
37
- var r = s.match(/\n([\t ]+|(?!\s).)/g);
38
- return r ? a.concat(r.map(function(f) {
39
- var l, u;
40
- return (u = (l = f.match(/[\t ]/g)) === null || l === void 0 ? void 0 : l.length) !== null && u !== void 0 ? u : 0;
41
- })) : a;
42
- }, []);
43
- if (m.length) {
44
- var e = new RegExp(`
45
- [ ]{` + Math.min.apply(Math, m) + "}", "g");
46
- t = t.map(function(a) {
47
- return a.replace(e, `
48
- `);
49
- });
50
- }
51
- t[0] = t[0].replace(/^\r?\n/, "");
52
- var d = t[0];
53
- return n.forEach(function(a, s) {
54
- var r = d.match(/(?:^|\n)( *)$/), f = r ? r[1] : "", l = a;
55
- typeof a == "string" && a.includes(`
56
- `) && (l = String(a).split(`
57
- `).map(function(u, A) {
58
- return A === 0 ? u : "" + f + u;
59
- }).join(`
60
- `)), d += l + t[s + 1];
61
- }), d;
62
- }
63
- p(h, "dedent");
64
-
65
- // src/outline/outlineCSS.ts
66
- function g(i) {
67
- return h`
68
- ${i} body {
69
- outline: 1px solid #2980b9 !important;
70
- }
71
-
72
- ${i} article {
73
- outline: 1px solid #3498db !important;
74
- }
75
-
76
- ${i} nav {
77
- outline: 1px solid #0088c3 !important;
78
- }
79
-
80
- ${i} aside {
81
- outline: 1px solid #33a0ce !important;
82
- }
83
-
84
- ${i} section {
85
- outline: 1px solid #66b8da !important;
86
- }
87
-
88
- ${i} header {
89
- outline: 1px solid #99cfe7 !important;
90
- }
91
-
92
- ${i} footer {
93
- outline: 1px solid #cce7f3 !important;
94
- }
95
-
96
- ${i} h1 {
97
- outline: 1px solid #162544 !important;
98
- }
99
-
100
- ${i} h2 {
101
- outline: 1px solid #314e6e !important;
102
- }
103
-
104
- ${i} h3 {
105
- outline: 1px solid #3e5e85 !important;
106
- }
107
-
108
- ${i} h4 {
109
- outline: 1px solid #449baf !important;
110
- }
111
-
112
- ${i} h5 {
113
- outline: 1px solid #c7d1cb !important;
114
- }
115
-
116
- ${i} h6 {
117
- outline: 1px solid #4371d0 !important;
118
- }
119
-
120
- ${i} main {
121
- outline: 1px solid #2f4f90 !important;
122
- }
123
-
124
- ${i} address {
125
- outline: 1px solid #1a2c51 !important;
126
- }
127
-
128
- ${i} div {
129
- outline: 1px solid #036cdb !important;
130
- }
131
-
132
- ${i} p {
133
- outline: 1px solid #ac050b !important;
134
- }
135
-
136
- ${i} hr {
137
- outline: 1px solid #ff063f !important;
138
- }
139
-
140
- ${i} pre {
141
- outline: 1px solid #850440 !important;
142
- }
143
-
144
- ${i} blockquote {
145
- outline: 1px solid #f1b8e7 !important;
146
- }
147
-
148
- ${i} ol {
149
- outline: 1px solid #ff050c !important;
150
- }
151
-
152
- ${i} ul {
153
- outline: 1px solid #d90416 !important;
154
- }
155
-
156
- ${i} li {
157
- outline: 1px solid #d90416 !important;
158
- }
159
-
160
- ${i} dl {
161
- outline: 1px solid #fd3427 !important;
162
- }
163
-
164
- ${i} dt {
165
- outline: 1px solid #ff0043 !important;
166
- }
167
-
168
- ${i} dd {
169
- outline: 1px solid #e80174 !important;
170
- }
171
-
172
- ${i} figure {
173
- outline: 1px solid #ff00bb !important;
174
- }
175
-
176
- ${i} figcaption {
177
- outline: 1px solid #bf0032 !important;
178
- }
179
-
180
- ${i} table {
181
- outline: 1px solid #00cc99 !important;
182
- }
183
-
184
- ${i} caption {
185
- outline: 1px solid #37ffc4 !important;
186
- }
187
-
188
- ${i} thead {
189
- outline: 1px solid #98daca !important;
190
- }
191
-
192
- ${i} tbody {
193
- outline: 1px solid #64a7a0 !important;
194
- }
195
-
196
- ${i} tfoot {
197
- outline: 1px solid #22746b !important;
198
- }
199
-
200
- ${i} tr {
201
- outline: 1px solid #86c0b2 !important;
202
- }
203
-
204
- ${i} th {
205
- outline: 1px solid #a1e7d6 !important;
206
- }
207
-
208
- ${i} td {
209
- outline: 1px solid #3f5a54 !important;
210
- }
211
-
212
- ${i} col {
213
- outline: 1px solid #6c9a8f !important;
214
- }
215
-
216
- ${i} colgroup {
217
- outline: 1px solid #6c9a9d !important;
218
- }
219
-
220
- ${i} button {
221
- outline: 1px solid #da8301 !important;
222
- }
223
-
224
- ${i} datalist {
225
- outline: 1px solid #c06000 !important;
226
- }
227
-
228
- ${i} fieldset {
229
- outline: 1px solid #d95100 !important;
230
- }
231
-
232
- ${i} form {
233
- outline: 1px solid #d23600 !important;
234
- }
235
-
236
- ${i} input {
237
- outline: 1px solid #fca600 !important;
238
- }
239
-
240
- ${i} keygen {
241
- outline: 1px solid #b31e00 !important;
242
- }
243
-
244
- ${i} label {
245
- outline: 1px solid #ee8900 !important;
246
- }
247
-
248
- ${i} legend {
249
- outline: 1px solid #de6d00 !important;
250
- }
251
-
252
- ${i} meter {
253
- outline: 1px solid #e8630c !important;
254
- }
255
-
256
- ${i} optgroup {
257
- outline: 1px solid #b33600 !important;
258
- }
259
-
260
- ${i} option {
261
- outline: 1px solid #ff8a00 !important;
262
- }
263
-
264
- ${i} output {
265
- outline: 1px solid #ff9619 !important;
266
- }
267
-
268
- ${i} progress {
269
- outline: 1px solid #e57c00 !important;
270
- }
271
-
272
- ${i} select {
273
- outline: 1px solid #e26e0f !important;
274
- }
275
-
276
- ${i} textarea {
277
- outline: 1px solid #cc5400 !important;
278
- }
279
-
280
- ${i} details {
281
- outline: 1px solid #33848f !important;
282
- }
283
-
284
- ${i} summary {
285
- outline: 1px solid #60a1a6 !important;
286
- }
287
-
288
- ${i} command {
289
- outline: 1px solid #438da1 !important;
290
- }
291
-
292
- ${i} menu {
293
- outline: 1px solid #449da6 !important;
294
- }
295
-
296
- ${i} del {
297
- outline: 1px solid #bf0000 !important;
298
- }
299
-
300
- ${i} ins {
301
- outline: 1px solid #400000 !important;
302
- }
303
-
304
- ${i} img {
305
- outline: 1px solid #22746b !important;
306
- }
307
-
308
- ${i} iframe {
309
- outline: 1px solid #64a7a0 !important;
310
- }
311
-
312
- ${i} embed {
313
- outline: 1px solid #98daca !important;
314
- }
315
-
316
- ${i} object {
317
- outline: 1px solid #00cc99 !important;
318
- }
319
-
320
- ${i} param {
321
- outline: 1px solid #37ffc4 !important;
322
- }
323
-
324
- ${i} video {
325
- outline: 1px solid #6ee866 !important;
326
- }
327
-
328
- ${i} audio {
329
- outline: 1px solid #027353 !important;
330
- }
331
-
332
- ${i} source {
333
- outline: 1px solid #012426 !important;
334
- }
335
-
336
- ${i} canvas {
337
- outline: 1px solid #a2f570 !important;
338
- }
339
-
340
- ${i} track {
341
- outline: 1px solid #59a600 !important;
342
- }
343
-
344
- ${i} map {
345
- outline: 1px solid #7be500 !important;
346
- }
347
-
348
- ${i} area {
349
- outline: 1px solid #305900 !important;
350
- }
351
-
352
- ${i} a {
353
- outline: 1px solid #ff62ab !important;
354
- }
355
-
356
- ${i} em {
357
- outline: 1px solid #800b41 !important;
358
- }
359
-
360
- ${i} strong {
361
- outline: 1px solid #ff1583 !important;
362
- }
363
-
364
- ${i} i {
365
- outline: 1px solid #803156 !important;
366
- }
367
-
368
- ${i} b {
369
- outline: 1px solid #cc1169 !important;
370
- }
371
-
372
- ${i} u {
373
- outline: 1px solid #ff0430 !important;
374
- }
375
-
376
- ${i} s {
377
- outline: 1px solid #f805e3 !important;
378
- }
379
-
380
- ${i} small {
381
- outline: 1px solid #d107b2 !important;
382
- }
383
-
384
- ${i} abbr {
385
- outline: 1px solid #4a0263 !important;
386
- }
387
-
388
- ${i} q {
389
- outline: 1px solid #240018 !important;
390
- }
391
-
392
- ${i} cite {
393
- outline: 1px solid #64003c !important;
394
- }
395
-
396
- ${i} dfn {
397
- outline: 1px solid #b4005a !important;
398
- }
399
-
400
- ${i} sub {
401
- outline: 1px solid #dba0c8 !important;
402
- }
403
-
404
- ${i} sup {
405
- outline: 1px solid #cc0256 !important;
406
- }
407
-
408
- ${i} time {
409
- outline: 1px solid #d6606d !important;
410
- }
411
-
412
- ${i} code {
413
- outline: 1px solid #e04251 !important;
414
- }
415
-
416
- ${i} kbd {
417
- outline: 1px solid #5e001f !important;
418
- }
419
-
420
- ${i} samp {
421
- outline: 1px solid #9c0033 !important;
422
- }
423
-
424
- ${i} var {
425
- outline: 1px solid #d90047 !important;
426
- }
427
-
428
- ${i} mark {
429
- outline: 1px solid #ff0053 !important;
430
- }
431
-
432
- ${i} bdi {
433
- outline: 1px solid #bf3668 !important;
434
- }
435
-
436
- ${i} bdo {
437
- outline: 1px solid #6f1400 !important;
438
- }
439
-
440
- ${i} ruby {
441
- outline: 1px solid #ff7b93 !important;
442
- }
443
-
444
- ${i} rt {
445
- outline: 1px solid #ff2f54 !important;
446
- }
447
-
448
- ${i} rp {
449
- outline: 1px solid #803e49 !important;
450
- }
451
-
452
- ${i} span {
453
- outline: 1px solid #cc2643 !important;
454
- }
455
-
456
- ${i} br {
457
- outline: 1px solid #db687d !important;
458
- }
459
-
460
- ${i} wbr {
461
- outline: 1px solid #db175b !important;
462
- }`;
463
- }
464
- p(g, "outlineCSS");
465
-
466
- // src/outline/withOutline.ts
467
- var v = /* @__PURE__ */ p((i, n) => {
468
- let o = n.globals || {}, t = [!0, "true"].includes(o[x]), m = n.viewMode === "docs", e = M(() => g(m ? '[data-story-block="true"]' : ".sb-\
469
- show-main"), [n]);
470
- return c(() => {
471
- let d = m ? `addon-outline-docs-${n.id}` : "addon-outline";
472
- return t ? y(d, e) : b(d), () => {
473
- b(d);
474
- };
475
- }, [t, e, n]), i();
476
- }, "withOutline");
477
-
478
- // src/outline/preview.ts
479
- var O = globalThis.FEATURES?.outline ? [v] : [], T = {
480
- [x]: !1
481
- }, z = /* @__PURE__ */ p(() => k({ decorators: O, initialGlobals: T }), "default");
482
- export {
483
- O as decorators,
484
- z as default,
485
- T as initialGlobals
486
- };
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var c = Object.defineProperty;
3
- var l = Object.getOwnPropertyDescriptor;
4
- var d = Object.getOwnPropertyNames;
5
- var b = Object.prototype.hasOwnProperty;
6
- var s = (t, e) => c(t, "name", { value: e, configurable: !0 });
7
- var u = (t, e) => {
8
- for (var o in e)
9
- c(t, o, { get: e[o], enumerable: !0 });
10
- }, g = (t, e, o, r) => {
11
- if (e && typeof e == "object" || typeof e == "function")
12
- for (let i of d(e))
13
- !b.call(t, i) && i !== o && c(t, i, { get: () => e[i], enumerable: !(r = l(e, i)) || r.enumerable });
14
- return t;
15
- };
16
- var k = (t) => g(c({}, "__esModule", { value: !0 }), t);
17
-
18
- // src/test/preview.ts
19
- var E = {};
20
- u(E, {
21
- default: () => A,
22
- traverseArgs: () => f
23
- });
24
- module.exports = k(E);
25
- var m = require("storybook/internal/csf"), p = require("storybook/internal/instrumenter"), n = require("storybook/test");
26
- var y = /* @__PURE__ */ s(({ parameters: t }) => {
27
- t?.test?.mockReset === !0 ? (0, n.resetAllMocks)() : t?.test?.clearMocks === !0 ? (0, n.clearAllMocks)() : t?.test?.restoreMocks !== !1 &&
28
- (0, n.restoreAllMocks)();
29
- }, "resetAllMocksLoader"), f = /* @__PURE__ */ s((t, e = 0, o) => {
30
- if (e > 5 || t == null)
31
- return t;
32
- if ((0, n.isMockFunction)(t))
33
- return o && t.mockName(o), t;
34
- if (typeof t == "function" && "isAction" in t && t.isAction && !("implicit" in t && t.implicit)) {
35
- let r = (0, n.fn)(t);
36
- return o && r.mockName(o), r;
37
- }
38
- if (Array.isArray(t)) {
39
- e++;
40
- for (let r = 0; r < t.length; r++)
41
- Object.getOwnPropertyDescriptor(t, r)?.writable && (t[r] = f(t[r], e));
42
- return t;
43
- }
44
- if (typeof t == "object" && t.constructor === Object) {
45
- e++;
46
- for (let [r, i] of Object.entries(t))
47
- Object.getOwnPropertyDescriptor(t, r)?.writable && (t[r] = f(i, e, r));
48
- return t;
49
- }
50
- return t;
51
- }, "traverseArgs"), T = /* @__PURE__ */ s(({ initialArgs: t }) => {
52
- f(t);
53
- }, "nameSpiesAndWrapActionsInSpies"), a = !1, w = /* @__PURE__ */ s(async (t) => {
54
- if (globalThis.HTMLElement && t.canvasElement instanceof globalThis.HTMLElement && (t.canvas = (0, n.within)(t.canvasElement)), globalThis.
55
- window?.navigator?.clipboard) {
56
- t.userEvent = (0, p.instrument)(
57
- { userEvent: n.uninstrumentedUserEvent.setup() },
58
- { intercept: !0 }
59
- ).userEvent;
60
- let e = HTMLElement.prototype.focus;
61
- a || Object.defineProperties(HTMLElement.prototype, {
62
- focus: {
63
- configurable: !0,
64
- set: /* @__PURE__ */ s((o) => {
65
- e = o, a = !0;
66
- }, "set"),
67
- get: /* @__PURE__ */ s(() => e, "get")
68
- }
69
- });
70
- }
71
- }, "enhanceContext"), A = /* @__PURE__ */ s(() => (0, m.definePreviewAddon)({
72
- loaders: [y, T, w]
73
- }), "default");
@@ -1,17 +0,0 @@
1
- import * as storybook_internal_csf from 'storybook/internal/csf';
2
-
3
- declare const traverseArgs: (value: unknown, depth?: number, key?: string) => unknown;
4
- interface TestParameters {
5
- test?: {
6
- /** Ignore unhandled errors during test execution */
7
- dangerouslyIgnoreUnhandledErrors?: boolean;
8
- /** Whether to throw exceptions coming from the play function */
9
- throwPlayFunctionExceptions?: boolean;
10
- };
11
- }
12
- interface TestTypes {
13
- parameters: TestParameters;
14
- }
15
- declare const _default: () => storybook_internal_csf.PreviewAddon<TestTypes>;
16
-
17
- export { type TestTypes, _default as default, traverseArgs };
@@ -1,66 +0,0 @@
1
- var f = Object.defineProperty;
2
- var n = (t, r) => f(t, "name", { value: r, configurable: !0 });
3
-
4
- // src/test/preview.ts
5
- import { definePreviewAddon as a } from "storybook/internal/csf";
6
- import { instrument as m } from "storybook/internal/instrumenter";
7
- import {
8
- clearAllMocks as p,
9
- fn as l,
10
- isMockFunction as d,
11
- resetAllMocks as b,
12
- restoreAllMocks as u,
13
- uninstrumentedUserEvent as g,
14
- within as k
15
- } from "storybook/test";
16
- var y = /* @__PURE__ */ n(({ parameters: t }) => {
17
- t?.test?.mockReset === !0 ? b() : t?.test?.clearMocks === !0 ? p() : t?.test?.restoreMocks !== !1 && u();
18
- }, "resetAllMocksLoader"), s = /* @__PURE__ */ n((t, r = 0, o) => {
19
- if (r > 5 || t == null)
20
- return t;
21
- if (d(t))
22
- return o && t.mockName(o), t;
23
- if (typeof t == "function" && "isAction" in t && t.isAction && !("implicit" in t && t.implicit)) {
24
- let e = l(t);
25
- return o && e.mockName(o), e;
26
- }
27
- if (Array.isArray(t)) {
28
- r++;
29
- for (let e = 0; e < t.length; e++)
30
- Object.getOwnPropertyDescriptor(t, e)?.writable && (t[e] = s(t[e], r));
31
- return t;
32
- }
33
- if (typeof t == "object" && t.constructor === Object) {
34
- r++;
35
- for (let [e, c] of Object.entries(t))
36
- Object.getOwnPropertyDescriptor(t, e)?.writable && (t[e] = s(c, r, e));
37
- return t;
38
- }
39
- return t;
40
- }, "traverseArgs"), T = /* @__PURE__ */ n(({ initialArgs: t }) => {
41
- s(t);
42
- }, "nameSpiesAndWrapActionsInSpies"), i = !1, w = /* @__PURE__ */ n(async (t) => {
43
- if (globalThis.HTMLElement && t.canvasElement instanceof globalThis.HTMLElement && (t.canvas = k(t.canvasElement)), globalThis.window?.navigator?.
44
- clipboard) {
45
- t.userEvent = m(
46
- { userEvent: g.setup() },
47
- { intercept: !0 }
48
- ).userEvent;
49
- let r = HTMLElement.prototype.focus;
50
- i || Object.defineProperties(HTMLElement.prototype, {
51
- focus: {
52
- configurable: !0,
53
- set: /* @__PURE__ */ n((o) => {
54
- r = o, i = !0;
55
- }, "set"),
56
- get: /* @__PURE__ */ n(() => r, "get")
57
- }
58
- });
59
- }
60
- }, "enhanceContext"), F = /* @__PURE__ */ n(() => a({
61
- loaders: [y, T, w]
62
- }), "default");
63
- export {
64
- F as default,
65
- s as traverseArgs
66
- };
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var r = Object.defineProperty;
3
- var f = Object.getOwnPropertyDescriptor;
4
- var x = Object.getOwnPropertyNames;
5
- var y = Object.prototype.hasOwnProperty;
6
- var s = (t, o) => r(t, "name", { value: o, configurable: !0 });
7
- var A = (t, o) => {
8
- for (var p in o)
9
- r(t, p, { get: o[p], enumerable: !0 });
10
- }, c = (t, o, p, i) => {
11
- if (o && typeof o == "object" || typeof o == "function")
12
- for (let e of x(o))
13
- !y.call(t, e) && e !== p && r(t, e, { get: () => o[e], enumerable: !(i = f(o, e)) || i.enumerable });
14
- return t;
15
- };
16
- var m = (t) => c(r({}, "__esModule", { value: !0 }), t);
17
-
18
- // src/viewport/preview.ts
19
- var D = {};
20
- A(D, {
21
- default: () => w,
22
- initialGlobals: () => d
23
- });
24
- module.exports = m(D);
25
- var a = require("storybook/internal/csf");
26
-
27
- // src/viewport/constants.ts
28
- var l = "storybook/viewport", n = "viewport", b = `${l}/panel`, v = `${l}/tool`;
29
-
30
- // src/viewport/preview.ts
31
- var d = {
32
- [n]: { value: void 0, isRotated: !1 }
33
- }, w = /* @__PURE__ */ s(() => (0, a.definePreviewAddon)({
34
- initialGlobals: d
35
- }), "default");