storybook 9.0.0-alpha.2 → 9.0.0-alpha.21

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