storybook 9.0.0-alpha.2 → 9.0.0-alpha.20

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 (159) hide show
  1. package/README.md +1 -1
  2. package/assets/docs/addon-backgrounds.gif +0 -0
  3. package/assets/docs/addon-controls-args-annotated.png +0 -0
  4. package/assets/docs/addon-controls-args-background-color.png +0 -0
  5. package/assets/docs/addon-controls-args-background-string.png +0 -0
  6. package/assets/docs/addon-controls-args-docs.png +0 -0
  7. package/assets/docs/addon-controls-args-logging.png +0 -0
  8. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  9. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  10. package/assets/docs/addon-controls-args-reflow.png +0 -0
  11. package/assets/docs/addon-controls-args-template.png +0 -0
  12. package/assets/docs/addon-controls-expanded.png +0 -0
  13. package/assets/docs/addon-controls-hero.gif +0 -0
  14. package/assets/docs/addon-controls-install.png +0 -0
  15. package/assets/docs/hero.gif +0 -0
  16. package/assets/docs/highlight.png +0 -0
  17. package/assets/docs/viewport.png +0 -0
  18. package/bin/index.cjs +2 -2
  19. package/dist/actions/decorator.d.ts +6 -0
  20. package/dist/actions/decorator.js +138 -0
  21. package/dist/actions/index.cjs +126 -0
  22. package/dist/actions/index.d.ts +102 -0
  23. package/dist/actions/index.js +111 -0
  24. package/dist/actions/preview.cjs +164 -0
  25. package/dist/actions/preview.d.ts +54 -0
  26. package/dist/actions/preview.js +155 -0
  27. package/dist/backgrounds/index.cjs +148 -0
  28. package/dist/backgrounds/index.d.ts +91 -0
  29. package/dist/backgrounds/index.js +130 -0
  30. package/dist/backgrounds/preview.cjs +143 -0
  31. package/dist/backgrounds/preview.d.ts +54 -0
  32. package/dist/backgrounds/preview.js +127 -0
  33. package/dist/bin/index.cjs +66 -89
  34. package/dist/bin/index.js +62 -85
  35. package/dist/builder-manager/index.cjs +523 -540
  36. package/dist/builder-manager/index.js +544 -561
  37. package/dist/channels/index.cjs +1026 -981
  38. package/dist/channels/index.js +1194 -1165
  39. package/dist/cli/bin/index.cjs +483 -483
  40. package/dist/cli/bin/index.js +495 -495
  41. package/dist/cli/index.cjs +2279 -2295
  42. package/dist/cli/index.d.ts +4 -8
  43. package/dist/cli/index.js +740 -756
  44. package/dist/client-logger/index.cjs +56 -88
  45. package/dist/client-logger/index.js +41 -47
  46. package/dist/common/index.cjs +2496 -2480
  47. package/dist/common/index.d.ts +5 -29
  48. package/dist/common/index.js +2679 -2663
  49. package/dist/component-testing/index.cjs +23 -0
  50. package/dist/component-testing/index.d.ts +3 -0
  51. package/dist/component-testing/index.js +5 -0
  52. package/dist/component-testing/preview.cjs +40 -0
  53. package/dist/component-testing/preview.d.ts +5 -0
  54. package/dist/component-testing/preview.js +25 -0
  55. package/dist/components/index.cjs +11709 -20418
  56. package/dist/components/index.d.ts +94 -346
  57. package/dist/components/index.js +5827 -19157
  58. package/dist/controls/decorator.d.ts +5 -0
  59. package/dist/controls/decorator.js +8 -0
  60. package/dist/controls/index.cjs +26 -0
  61. package/dist/controls/index.d.ts +39 -0
  62. package/dist/controls/index.js +6 -0
  63. package/dist/controls/preview.cjs +26 -0
  64. package/dist/controls/preview.d.ts +54 -0
  65. package/dist/controls/preview.js +9 -0
  66. package/dist/core-events/index.cjs +91 -106
  67. package/dist/core-events/index.d.ts +139 -104
  68. package/dist/core-events/index.js +79 -94
  69. package/dist/core-server/index.cjs +14413 -13924
  70. package/dist/core-server/index.d.ts +270 -3
  71. package/dist/core-server/index.js +14003 -13519
  72. package/dist/core-server/presets/common-manager.css +170 -0
  73. package/dist/core-server/presets/common-manager.js +12099 -17
  74. package/dist/core-server/presets/common-preset.cjs +2760 -2914
  75. package/dist/core-server/presets/common-preset.js +2852 -3007
  76. package/dist/csf/index.cjs +76 -120
  77. package/dist/csf/index.d.ts +2 -6
  78. package/dist/csf/index.js +69 -113
  79. package/dist/csf-tools/index.cjs +412 -403
  80. package/dist/csf-tools/index.d.ts +0 -4
  81. package/dist/csf-tools/index.js +410 -401
  82. package/dist/docs-tools/index.cjs +2569 -575
  83. package/dist/docs-tools/index.d.ts +2 -2
  84. package/dist/docs-tools/index.js +2557 -564
  85. package/dist/highlight/index.cjs +27 -0
  86. package/dist/highlight/index.d.ts +17 -0
  87. package/dist/highlight/index.js +7 -0
  88. package/dist/highlight/preview.cjs +81 -0
  89. package/dist/highlight/preview.d.ts +54 -0
  90. package/dist/highlight/preview.js +67 -0
  91. package/dist/instrumenter/index.cjs +2207 -2342
  92. package/dist/instrumenter/index.d.ts +8 -7
  93. package/dist/instrumenter/index.js +2438 -2620
  94. package/dist/manager/globals-module-info.cjs +290 -151
  95. package/dist/manager/globals-module-info.d.ts +1 -1
  96. package/dist/manager/globals-module-info.js +274 -135
  97. package/dist/manager/globals-runtime.js +60016 -28331
  98. package/dist/manager/globals.cjs +23 -19
  99. package/dist/manager/globals.d.ts +8 -5
  100. package/dist/manager/globals.js +10 -6
  101. package/dist/manager/runtime.js +4645 -3946
  102. package/dist/manager-api/index.cjs +4228 -3833
  103. package/dist/manager-api/index.d.ts +398 -102
  104. package/dist/manager-api/index.js +3676 -3291
  105. package/dist/manager-errors.d.ts +25 -1
  106. package/dist/manager-errors.js +42 -26
  107. package/dist/measure/index.cjs +474 -0
  108. package/dist/measure/index.d.ts +66 -0
  109. package/dist/measure/index.js +462 -0
  110. package/dist/measure/preview.cjs +464 -0
  111. package/dist/measure/preview.d.ts +59 -0
  112. package/dist/measure/preview.js +448 -0
  113. package/dist/outline/index.cjs +528 -0
  114. package/dist/outline/index.d.ts +66 -0
  115. package/dist/outline/index.js +500 -0
  116. package/dist/outline/preview.cjs +518 -0
  117. package/dist/outline/preview.d.ts +59 -0
  118. package/dist/outline/preview.js +486 -0
  119. package/dist/preview/globals.cjs +21 -17
  120. package/dist/preview/globals.d.ts +4 -1
  121. package/dist/preview/globals.js +6 -2
  122. package/dist/preview/runtime.js +45697 -6618
  123. package/dist/preview-api/index.cjs +1363 -1898
  124. package/dist/preview-api/index.d.ts +449 -498
  125. package/dist/preview-api/index.js +1622 -2095
  126. package/dist/preview-errors.cjs +99 -82
  127. package/dist/preview-errors.d.ts +25 -1
  128. package/dist/preview-errors.js +110 -94
  129. package/dist/router/index.cjs +847 -871
  130. package/dist/router/index.js +193 -199
  131. package/dist/server-errors.cjs +156 -125
  132. package/dist/server-errors.d.ts +28 -2
  133. package/dist/server-errors.js +150 -119
  134. package/dist/telemetry/index.cjs +1050 -1977
  135. package/dist/telemetry/index.d.ts +26 -5
  136. package/dist/telemetry/index.js +1085 -2008
  137. package/dist/test/index.cjs +35686 -0
  138. package/dist/test/index.d.ts +186 -0
  139. package/dist/test/index.js +33752 -0
  140. package/dist/test/preview.cjs +15870 -0
  141. package/dist/test/preview.d.ts +54 -0
  142. package/dist/test/preview.js +14441 -0
  143. package/dist/test/spy.cjs +258 -0
  144. package/dist/test/spy.d.ts +66 -0
  145. package/dist/test/spy.js +240 -0
  146. package/dist/theming/create.cjs +79 -2269
  147. package/dist/theming/create.js +67 -841
  148. package/dist/theming/index.cjs +1065 -3232
  149. package/dist/theming/index.js +951 -1719
  150. package/dist/types/index.cjs +11 -12
  151. package/dist/types/index.d.ts +612 -157
  152. package/dist/types/index.js +1 -2
  153. package/dist/viewport/index.cjs +310 -0
  154. package/dist/viewport/index.d.ts +320 -0
  155. package/dist/viewport/index.js +290 -0
  156. package/dist/viewport/preview.cjs +35 -0
  157. package/dist/viewport/preview.d.ts +68 -0
  158. package/dist/viewport/preview.js +19 -0
  159. package/package.json +359 -12
@@ -0,0 +1,518 @@
1
+ "use strict";
2
+ var P = Object.create;
3
+ var e = Object.defineProperty;
4
+ var _ = Object.getOwnPropertyDescriptor;
5
+ var j = Object.getOwnPropertyNames;
6
+ var C = Object.getPrototypeOf, L = Object.prototype.hasOwnProperty;
7
+ var p = (i, t) => e(i, "name", { value: t, configurable: !0 });
8
+ var R = (i, t) => () => (t || i((t = { exports: {} }).exports, t), t.exports), H = (i, t) => {
9
+ for (var n in t)
10
+ e(i, n, { get: t[n], enumerable: !0 });
11
+ }, c = (i, t, n, o) => {
12
+ if (t && typeof t == "object" || typeof t == "function")
13
+ for (let a of j(t))
14
+ !L.call(i, a) && a !== n && e(i, a, { get: () => t[a], enumerable: !(o = _(t, a)) || o.enumerable });
15
+ return i;
16
+ };
17
+ var K = (i, t, n) => (n = i != null ? P(C(i)) : {}, c(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
+ t || !i || !i.__esModule ? e(n, "default", { value: i, enumerable: !0 }) : n,
23
+ i
24
+ )), T = (i) => c(e({}, "__esModule", { value: !0 }), i);
25
+
26
+ // ../node_modules/ts-dedent/dist/index.js
27
+ var S = R(($) => {
28
+ "use strict";
29
+ Object.defineProperty($, "__esModule", { value: !0 });
30
+ $.dedent = void 0;
31
+ function E(i) {
32
+ for (var t = [], n = 1; n < arguments.length; n++)
33
+ t[n - 1] = arguments[n];
34
+ var o = Array.from(typeof i == "string" ? [i] : i);
35
+ o[o.length - 1] = o[o.length - 1].replace(/\r?\n([\t ]*)$/, "");
36
+ var a = o.reduce(function(d, g) {
37
+ var r = g.match(/\n([\t ]+|(?!\s).)/g);
38
+ return r ? d.concat(r.map(function(h) {
39
+ var u, m;
40
+ return (m = (u = h.match(/[\t ]/g)) === null || u === void 0 ? void 0 : u.length) !== null && m !== void 0 ? m : 0;
41
+ })) : d;
42
+ }, []);
43
+ if (a.length) {
44
+ var s = new RegExp(`
45
+ [ ]{` + Math.min.apply(Math, a) + "}", "g");
46
+ o = o.map(function(d) {
47
+ return d.replace(s, `
48
+ `);
49
+ });
50
+ }
51
+ o[0] = o[0].replace(/^\r?\n/, "");
52
+ var l = o[0];
53
+ return t.forEach(function(d, g) {
54
+ var r = l.match(/(?:^|\n)( *)$/), h = r ? r[1] : "", u = d;
55
+ typeof d == "string" && d.includes(`
56
+ `) && (u = String(d).split(`
57
+ `).map(function(m, I) {
58
+ return I === 0 ? m : "" + h + m;
59
+ }).join(`
60
+ `)), l += u + o[g + 1];
61
+ }), l;
62
+ }
63
+ p(E, "dedent");
64
+ $.dedent = E;
65
+ $.default = E;
66
+ });
67
+
68
+ // src/outline/preview.ts
69
+ var B = {};
70
+ H(B, {
71
+ decorators: () => D,
72
+ default: () => q,
73
+ initialGlobals: () => O
74
+ });
75
+ module.exports = T(B);
76
+ var w = require("storybook/preview-api");
77
+
78
+ // src/outline/constants.ts
79
+ var f = "outline";
80
+
81
+ // src/outline/withOutline.ts
82
+ var b = require("storybook/preview-api");
83
+
84
+ // src/outline/helpers.ts
85
+ var x = require("@storybook/global");
86
+ var y = /* @__PURE__ */ p((i) => {
87
+ (Array.isArray(i) ? i : [i]).forEach(Y);
88
+ }, "clearStyles"), Y = /* @__PURE__ */ p((i) => {
89
+ let t = typeof i == "string" ? i : i.join(""), n = x.global.document.getElementById(t);
90
+ n && n.parentElement && n.parentElement.removeChild(n);
91
+ }, "clearStyle"), A = /* @__PURE__ */ p((i, t) => {
92
+ let n = x.global.document.getElementById(i);
93
+ if (n)
94
+ n.innerHTML !== t && (n.innerHTML = t);
95
+ else {
96
+ let o = x.global.document.createElement("style");
97
+ o.setAttribute("id", i), o.innerHTML = t, x.global.document.head.appendChild(o);
98
+ }
99
+ }, "addOutlineStyles");
100
+
101
+ // src/outline/outlineCSS.ts
102
+ var M = K(S(), 1);
103
+ function v(i) {
104
+ return M.dedent`
105
+ ${i} body {
106
+ outline: 1px solid #2980b9 !important;
107
+ }
108
+
109
+ ${i} article {
110
+ outline: 1px solid #3498db !important;
111
+ }
112
+
113
+ ${i} nav {
114
+ outline: 1px solid #0088c3 !important;
115
+ }
116
+
117
+ ${i} aside {
118
+ outline: 1px solid #33a0ce !important;
119
+ }
120
+
121
+ ${i} section {
122
+ outline: 1px solid #66b8da !important;
123
+ }
124
+
125
+ ${i} header {
126
+ outline: 1px solid #99cfe7 !important;
127
+ }
128
+
129
+ ${i} footer {
130
+ outline: 1px solid #cce7f3 !important;
131
+ }
132
+
133
+ ${i} h1 {
134
+ outline: 1px solid #162544 !important;
135
+ }
136
+
137
+ ${i} h2 {
138
+ outline: 1px solid #314e6e !important;
139
+ }
140
+
141
+ ${i} h3 {
142
+ outline: 1px solid #3e5e85 !important;
143
+ }
144
+
145
+ ${i} h4 {
146
+ outline: 1px solid #449baf !important;
147
+ }
148
+
149
+ ${i} h5 {
150
+ outline: 1px solid #c7d1cb !important;
151
+ }
152
+
153
+ ${i} h6 {
154
+ outline: 1px solid #4371d0 !important;
155
+ }
156
+
157
+ ${i} main {
158
+ outline: 1px solid #2f4f90 !important;
159
+ }
160
+
161
+ ${i} address {
162
+ outline: 1px solid #1a2c51 !important;
163
+ }
164
+
165
+ ${i} div {
166
+ outline: 1px solid #036cdb !important;
167
+ }
168
+
169
+ ${i} p {
170
+ outline: 1px solid #ac050b !important;
171
+ }
172
+
173
+ ${i} hr {
174
+ outline: 1px solid #ff063f !important;
175
+ }
176
+
177
+ ${i} pre {
178
+ outline: 1px solid #850440 !important;
179
+ }
180
+
181
+ ${i} blockquote {
182
+ outline: 1px solid #f1b8e7 !important;
183
+ }
184
+
185
+ ${i} ol {
186
+ outline: 1px solid #ff050c !important;
187
+ }
188
+
189
+ ${i} ul {
190
+ outline: 1px solid #d90416 !important;
191
+ }
192
+
193
+ ${i} li {
194
+ outline: 1px solid #d90416 !important;
195
+ }
196
+
197
+ ${i} dl {
198
+ outline: 1px solid #fd3427 !important;
199
+ }
200
+
201
+ ${i} dt {
202
+ outline: 1px solid #ff0043 !important;
203
+ }
204
+
205
+ ${i} dd {
206
+ outline: 1px solid #e80174 !important;
207
+ }
208
+
209
+ ${i} figure {
210
+ outline: 1px solid #ff00bb !important;
211
+ }
212
+
213
+ ${i} figcaption {
214
+ outline: 1px solid #bf0032 !important;
215
+ }
216
+
217
+ ${i} table {
218
+ outline: 1px solid #00cc99 !important;
219
+ }
220
+
221
+ ${i} caption {
222
+ outline: 1px solid #37ffc4 !important;
223
+ }
224
+
225
+ ${i} thead {
226
+ outline: 1px solid #98daca !important;
227
+ }
228
+
229
+ ${i} tbody {
230
+ outline: 1px solid #64a7a0 !important;
231
+ }
232
+
233
+ ${i} tfoot {
234
+ outline: 1px solid #22746b !important;
235
+ }
236
+
237
+ ${i} tr {
238
+ outline: 1px solid #86c0b2 !important;
239
+ }
240
+
241
+ ${i} th {
242
+ outline: 1px solid #a1e7d6 !important;
243
+ }
244
+
245
+ ${i} td {
246
+ outline: 1px solid #3f5a54 !important;
247
+ }
248
+
249
+ ${i} col {
250
+ outline: 1px solid #6c9a8f !important;
251
+ }
252
+
253
+ ${i} colgroup {
254
+ outline: 1px solid #6c9a9d !important;
255
+ }
256
+
257
+ ${i} button {
258
+ outline: 1px solid #da8301 !important;
259
+ }
260
+
261
+ ${i} datalist {
262
+ outline: 1px solid #c06000 !important;
263
+ }
264
+
265
+ ${i} fieldset {
266
+ outline: 1px solid #d95100 !important;
267
+ }
268
+
269
+ ${i} form {
270
+ outline: 1px solid #d23600 !important;
271
+ }
272
+
273
+ ${i} input {
274
+ outline: 1px solid #fca600 !important;
275
+ }
276
+
277
+ ${i} keygen {
278
+ outline: 1px solid #b31e00 !important;
279
+ }
280
+
281
+ ${i} label {
282
+ outline: 1px solid #ee8900 !important;
283
+ }
284
+
285
+ ${i} legend {
286
+ outline: 1px solid #de6d00 !important;
287
+ }
288
+
289
+ ${i} meter {
290
+ outline: 1px solid #e8630c !important;
291
+ }
292
+
293
+ ${i} optgroup {
294
+ outline: 1px solid #b33600 !important;
295
+ }
296
+
297
+ ${i} option {
298
+ outline: 1px solid #ff8a00 !important;
299
+ }
300
+
301
+ ${i} output {
302
+ outline: 1px solid #ff9619 !important;
303
+ }
304
+
305
+ ${i} progress {
306
+ outline: 1px solid #e57c00 !important;
307
+ }
308
+
309
+ ${i} select {
310
+ outline: 1px solid #e26e0f !important;
311
+ }
312
+
313
+ ${i} textarea {
314
+ outline: 1px solid #cc5400 !important;
315
+ }
316
+
317
+ ${i} details {
318
+ outline: 1px solid #33848f !important;
319
+ }
320
+
321
+ ${i} summary {
322
+ outline: 1px solid #60a1a6 !important;
323
+ }
324
+
325
+ ${i} command {
326
+ outline: 1px solid #438da1 !important;
327
+ }
328
+
329
+ ${i} menu {
330
+ outline: 1px solid #449da6 !important;
331
+ }
332
+
333
+ ${i} del {
334
+ outline: 1px solid #bf0000 !important;
335
+ }
336
+
337
+ ${i} ins {
338
+ outline: 1px solid #400000 !important;
339
+ }
340
+
341
+ ${i} img {
342
+ outline: 1px solid #22746b !important;
343
+ }
344
+
345
+ ${i} iframe {
346
+ outline: 1px solid #64a7a0 !important;
347
+ }
348
+
349
+ ${i} embed {
350
+ outline: 1px solid #98daca !important;
351
+ }
352
+
353
+ ${i} object {
354
+ outline: 1px solid #00cc99 !important;
355
+ }
356
+
357
+ ${i} param {
358
+ outline: 1px solid #37ffc4 !important;
359
+ }
360
+
361
+ ${i} video {
362
+ outline: 1px solid #6ee866 !important;
363
+ }
364
+
365
+ ${i} audio {
366
+ outline: 1px solid #027353 !important;
367
+ }
368
+
369
+ ${i} source {
370
+ outline: 1px solid #012426 !important;
371
+ }
372
+
373
+ ${i} canvas {
374
+ outline: 1px solid #a2f570 !important;
375
+ }
376
+
377
+ ${i} track {
378
+ outline: 1px solid #59a600 !important;
379
+ }
380
+
381
+ ${i} map {
382
+ outline: 1px solid #7be500 !important;
383
+ }
384
+
385
+ ${i} area {
386
+ outline: 1px solid #305900 !important;
387
+ }
388
+
389
+ ${i} a {
390
+ outline: 1px solid #ff62ab !important;
391
+ }
392
+
393
+ ${i} em {
394
+ outline: 1px solid #800b41 !important;
395
+ }
396
+
397
+ ${i} strong {
398
+ outline: 1px solid #ff1583 !important;
399
+ }
400
+
401
+ ${i} i {
402
+ outline: 1px solid #803156 !important;
403
+ }
404
+
405
+ ${i} b {
406
+ outline: 1px solid #cc1169 !important;
407
+ }
408
+
409
+ ${i} u {
410
+ outline: 1px solid #ff0430 !important;
411
+ }
412
+
413
+ ${i} s {
414
+ outline: 1px solid #f805e3 !important;
415
+ }
416
+
417
+ ${i} small {
418
+ outline: 1px solid #d107b2 !important;
419
+ }
420
+
421
+ ${i} abbr {
422
+ outline: 1px solid #4a0263 !important;
423
+ }
424
+
425
+ ${i} q {
426
+ outline: 1px solid #240018 !important;
427
+ }
428
+
429
+ ${i} cite {
430
+ outline: 1px solid #64003c !important;
431
+ }
432
+
433
+ ${i} dfn {
434
+ outline: 1px solid #b4005a !important;
435
+ }
436
+
437
+ ${i} sub {
438
+ outline: 1px solid #dba0c8 !important;
439
+ }
440
+
441
+ ${i} sup {
442
+ outline: 1px solid #cc0256 !important;
443
+ }
444
+
445
+ ${i} time {
446
+ outline: 1px solid #d6606d !important;
447
+ }
448
+
449
+ ${i} code {
450
+ outline: 1px solid #e04251 !important;
451
+ }
452
+
453
+ ${i} kbd {
454
+ outline: 1px solid #5e001f !important;
455
+ }
456
+
457
+ ${i} samp {
458
+ outline: 1px solid #9c0033 !important;
459
+ }
460
+
461
+ ${i} var {
462
+ outline: 1px solid #d90047 !important;
463
+ }
464
+
465
+ ${i} mark {
466
+ outline: 1px solid #ff0053 !important;
467
+ }
468
+
469
+ ${i} bdi {
470
+ outline: 1px solid #bf3668 !important;
471
+ }
472
+
473
+ ${i} bdo {
474
+ outline: 1px solid #6f1400 !important;
475
+ }
476
+
477
+ ${i} ruby {
478
+ outline: 1px solid #ff7b93 !important;
479
+ }
480
+
481
+ ${i} rt {
482
+ outline: 1px solid #ff2f54 !important;
483
+ }
484
+
485
+ ${i} rp {
486
+ outline: 1px solid #803e49 !important;
487
+ }
488
+
489
+ ${i} span {
490
+ outline: 1px solid #cc2643 !important;
491
+ }
492
+
493
+ ${i} br {
494
+ outline: 1px solid #db687d !important;
495
+ }
496
+
497
+ ${i} wbr {
498
+ outline: 1px solid #db175b !important;
499
+ }`;
500
+ }
501
+ p(v, "outlineCSS");
502
+
503
+ // src/outline/withOutline.ts
504
+ var k = /* @__PURE__ */ p((i, t) => {
505
+ let n = t.globals || {}, o = [!0, "true"].includes(n[f]), a = t.viewMode === "docs", s = (0, b.useMemo)(() => v(a ? '[data-story-block="tr\
506
+ ue"]' : ".sb-show-main"), [t]);
507
+ return (0, b.useEffect)(() => {
508
+ let l = a ? `addon-outline-docs-${t.id}` : "addon-outline";
509
+ return o ? A(l, s) : y(l), () => {
510
+ y(l);
511
+ };
512
+ }, [o, s, t]), i();
513
+ }, "withOutline");
514
+
515
+ // src/outline/preview.ts
516
+ var D = [k], O = {
517
+ [f]: !1
518
+ }, q = /* @__PURE__ */ p(() => (0, w.definePreview)({ decorators: D, initialGlobals: O }), "default");
@@ -0,0 +1,59 @@
1
+ import * as storybook_internal_csf from 'storybook/internal/csf';
2
+ import { Renderer as Renderer$1, ProjectAnnotations as ProjectAnnotations$1, StoryIdentifier, StoryContext, PartialStoryFn, LegacyStoryFn } from 'storybook/internal/csf';
3
+ import { NormalizedProjectAnnotations, ProjectAnnotations as ProjectAnnotations$2, ComposedStoryFn } from 'storybook/internal/types';
4
+
5
+ declare global {
6
+ interface SymbolConstructor {
7
+ readonly observable: symbol;
8
+ }
9
+ }
10
+
11
+ interface Renderer extends Renderer$1 {
12
+ }
13
+
14
+ type MaybePromise<T> = Promise<T> | T;
15
+ type TeardownRenderToCanvas = () => MaybePromise<void>;
16
+ type RenderToCanvas<TRenderer extends Renderer> = (context: RenderContext<TRenderer>, element: TRenderer['canvasElement']) => MaybePromise<void | TeardownRenderToCanvas>;
17
+ interface ProjectAnnotations<TRenderer extends Renderer> extends ProjectAnnotations$1<TRenderer> {
18
+ addons?: ProjectAnnotations<TRenderer>[];
19
+ testingLibraryRender?: (...args: never[]) => {
20
+ unmount: () => void;
21
+ };
22
+ renderToCanvas?: RenderToCanvas<TRenderer>;
23
+ }
24
+ declare type RenderContext<TRenderer extends Renderer = Renderer> = StoryIdentifier & {
25
+ showMain: () => void;
26
+ showError: (error: {
27
+ title: string;
28
+ description: string;
29
+ }) => void;
30
+ showException: (err: Error) => void;
31
+ forceRemount: boolean;
32
+ storyContext: StoryContext<TRenderer>;
33
+ storyFn: PartialStoryFn<TRenderer>;
34
+ unboundStoryFn: LegacyStoryFn<TRenderer>;
35
+ };
36
+
37
+ declare global {
38
+ var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
39
+ var defaultProjectAnnotations: ProjectAnnotations$2<any>;
40
+ }
41
+ type WrappedStoryRef = {
42
+ __pw_type: 'jsx' | 'importRef';
43
+ };
44
+ type UnwrappedJSXStoryRef = {
45
+ __pw_type: 'jsx';
46
+ type: UnwrappedImportStoryRef;
47
+ };
48
+ type UnwrappedImportStoryRef = ComposedStoryFn;
49
+ declare global {
50
+ function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
51
+ }
52
+
53
+ declare const decorators: storybook_internal_csf.DecoratorFunction[];
54
+ declare const initialGlobals: {
55
+ outline: boolean;
56
+ };
57
+ declare const _default: () => ProjectAnnotations<Renderer>;
58
+
59
+ export { decorators, _default as default, initialGlobals };