@iress-oss/ids-storybook-config 0.2.5 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -17,3 +17,4 @@ export * from './helpers/withCustomSource';
17
17
  export * from './helpers/withJsxTransformer';
18
18
  export * from './helpers/withTransformedSource';
19
19
  export * from './constants';
20
+ export type { BroadcastHashEvent, PassThemeEvent, LoadThemeEvent, } from './types';
package/dist/main.js CHANGED
@@ -19,7 +19,7 @@ function Ze(e) {
19
19
  e !== null && (e < 32 || e === 127)
20
20
  );
21
21
  }
22
- function I(e) {
22
+ function z(e) {
23
23
  return e !== null && e < -2;
24
24
  }
25
25
  function A(e) {
@@ -121,8 +121,8 @@ function et() {
121
121
  function tt(e) {
122
122
  return e !== null && typeof e == "object" && "type" in e;
123
123
  }
124
- const be = [], nt = !0, X = !1, rt = "skip";
125
- function de(e, n, t, i) {
124
+ const de = [], nt = !0, X = !1, rt = "skip";
125
+ function be(e, n, t, i) {
126
126
  let l;
127
127
  typeof n == "function" && typeof t != "function" ? (i = t, t = n) : l = n;
128
128
  const a = U(l), r = i ? -1 : 1;
@@ -146,7 +146,7 @@ function de(e, n, t, i) {
146
146
  }
147
147
  return p;
148
148
  function p() {
149
- let g = be, m, b, d;
149
+ let g = de, m, d, b;
150
150
  if ((!n || a(o, s, f[f.length - 1] || void 0)) && (g = it(t(o, f)), g[0] === X))
151
151
  return g;
152
152
  if ("children" in o && o.children) {
@@ -155,11 +155,11 @@ function de(e, n, t, i) {
155
155
  o
156
156
  );
157
157
  if (k.children && g[0] !== rt)
158
- for (b = (i ? k.children.length : -1) + r, d = f.concat(k); b > -1 && b < k.children.length; ) {
159
- const x = k.children[b];
160
- if (m = u(x, b, d)(), m[0] === X)
158
+ for (d = (i ? k.children.length : -1) + r, b = f.concat(k); d > -1 && d < k.children.length; ) {
159
+ const x = k.children[d];
160
+ if (m = u(x, d, b)(), m[0] === X)
161
161
  return m;
162
- b = typeof m[1] == "number" ? m[1] : b + r;
162
+ d = typeof m[1] == "number" ? m[1] : d + r;
163
163
  }
164
164
  }
165
165
  return g;
@@ -167,13 +167,13 @@ function de(e, n, t, i) {
167
167
  }
168
168
  }
169
169
  function it(e) {
170
- return Array.isArray(e) ? e : typeof e == "number" ? [nt, e] : e == null ? be : [e];
170
+ return Array.isArray(e) ? e : typeof e == "number" ? [nt, e] : e == null ? de : [e];
171
171
  }
172
172
  function ot(e, n, t) {
173
173
  const l = U((t || {}).ignore || []), a = lt(n);
174
174
  let r = -1;
175
175
  for (; ++r < a.length; )
176
- de(e, "text", u);
176
+ be(e, "text", u);
177
177
  function u(s, f) {
178
178
  let c = -1, p;
179
179
  for (; ++c < f.length; ) {
@@ -192,7 +192,7 @@ function ot(e, n, t) {
192
192
  function o(s, f) {
193
193
  const c = f[f.length - 1], p = a[r][0], g = a[r][1];
194
194
  let m = 0;
195
- const d = c.children.indexOf(s);
195
+ const b = c.children.indexOf(s);
196
196
  let k = !1, x = [];
197
197
  p.lastIndex = 0;
198
198
  let w = p.exec(s.value);
@@ -210,7 +210,7 @@ function ot(e, n, t) {
210
210
  break;
211
211
  w = p.exec(s.value);
212
212
  }
213
- return k ? (m < s.value.length && x.push({ type: "text", value: s.value.slice(m) }), c.children.splice(d, 1, ...x)) : x = [s], d + x.length;
213
+ return k ? (m < s.value.length && x.push({ type: "text", value: s.value.slice(m) }), c.children.splice(b, 1, ...x)) : x = [s], b + x.length;
214
214
  }
215
215
  }
216
216
  function lt(e) {
@@ -302,13 +302,13 @@ function kt(e) {
302
302
  ot(
303
303
  e,
304
304
  [
305
- [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, bt],
306
- [new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), dt]
305
+ [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, dt],
306
+ [new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), bt]
307
307
  ],
308
308
  { ignore: ["link", "linkReference"] }
309
309
  );
310
310
  }
311
- function bt(e, n, t, i, l) {
311
+ function dt(e, n, t, i, l) {
312
312
  let a = "";
313
313
  if (!xe(l) || (/^w/i.test(n) && (t = n + t, n = "", a = "http://"), !xt(t)))
314
314
  return !1;
@@ -322,7 +322,7 @@ function bt(e, n, t, i, l) {
322
322
  };
323
323
  return r[1] ? [u, { type: "text", value: r[1] }] : u;
324
324
  }
325
- function dt(e, n, t, i) {
325
+ function bt(e, n, t, i) {
326
326
  return (
327
327
  // Not an expected previous character.
328
328
  !xe(i, !0) || // Label ends in not allowed character.
@@ -358,7 +358,7 @@ function xe(e, n) {
358
358
  function M(e) {
359
359
  return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
360
360
  }
361
- we.peek = Et;
361
+ we.peek = Ft;
362
362
  function yt() {
363
363
  this.buffer();
364
364
  }
@@ -383,16 +383,16 @@ function St(e) {
383
383
  function Dt(e) {
384
384
  this.exit(e);
385
385
  }
386
- function Tt(e) {
386
+ function Et(e) {
387
387
  const n = this.resume(), t = this.stack[this.stack.length - 1];
388
388
  t.type, t.identifier = M(
389
389
  this.sliceSerialize(e)
390
390
  ).toLowerCase(), t.label = n;
391
391
  }
392
- function Ft(e) {
392
+ function Tt(e) {
393
393
  this.exit(e);
394
394
  }
395
- function Et() {
395
+ function Ft() {
396
396
  return "[";
397
397
  }
398
398
  function we(e, n, t, i) {
@@ -414,12 +414,12 @@ function Lt() {
414
414
  exit: {
415
415
  gfmFootnoteCallString: St,
416
416
  gfmFootnoteCall: Dt,
417
- gfmFootnoteDefinitionLabelString: Tt,
418
- gfmFootnoteDefinition: Ft
417
+ gfmFootnoteDefinitionLabelString: Et,
418
+ gfmFootnoteDefinition: Tt
419
419
  }
420
420
  };
421
421
  }
422
- function zt(e) {
422
+ function It(e) {
423
423
  let n = !1;
424
424
  return e && e.firstLineBlank && (n = !0), {
425
425
  handlers: { footnoteDefinition: t, footnoteReference: we },
@@ -436,12 +436,12 @@ function zt(e) {
436
436
  (n ? `
437
437
  ` : " ") + a.indentLines(
438
438
  a.containerFlow(i, u.current()),
439
- n ? ye : It
439
+ n ? ye : zt
440
440
  )
441
441
  )), s(), o;
442
442
  }
443
443
  }
444
- function It(e, n, t) {
444
+ function zt(e, n, t) {
445
445
  return n === 0 ? e : ye(e, n, t);
446
446
  }
447
447
  function ye(e, n, t) {
@@ -455,7 +455,7 @@ const Pt = [
455
455
  "titleQuote",
456
456
  "titleApostrophe"
457
457
  ];
458
- Ce.peek = jt;
458
+ Ce.peek = Ht;
459
459
  function _t() {
460
460
  return {
461
461
  canContainEols: ["delete"],
@@ -490,61 +490,61 @@ function Ce(e, n, t, i) {
490
490
  after: "~"
491
491
  }), r += l.move("~~"), a(), r;
492
492
  }
493
- function jt() {
493
+ function Ht() {
494
494
  return "~";
495
495
  }
496
496
  function Bt(e) {
497
497
  return e.length;
498
498
  }
499
- function Ht(e, n) {
499
+ function jt(e, n) {
500
500
  const t = n || {}, i = (t.align || []).concat(), l = t.stringLength || Bt, a = [], r = [], u = [], o = [];
501
501
  let s = 0, f = -1;
502
502
  for (; ++f < e.length; ) {
503
- const b = [], d = [];
503
+ const d = [], b = [];
504
504
  let k = -1;
505
505
  for (e[f].length > s && (s = e[f].length); ++k < e[f].length; ) {
506
506
  const x = $t(e[f][k]);
507
507
  if (t.alignDelimiters !== !1) {
508
508
  const w = l(x);
509
- d[k] = w, (o[k] === void 0 || w > o[k]) && (o[k] = w);
509
+ b[k] = w, (o[k] === void 0 || w > o[k]) && (o[k] = w);
510
510
  }
511
- b.push(x);
511
+ d.push(x);
512
512
  }
513
- r[f] = b, u[f] = d;
513
+ r[f] = d, u[f] = b;
514
514
  }
515
515
  let c = -1;
516
516
  if (typeof i == "object" && "length" in i)
517
517
  for (; ++c < s; )
518
518
  a[c] = se(i[c]);
519
519
  else {
520
- const b = se(i);
520
+ const d = se(i);
521
521
  for (; ++c < s; )
522
- a[c] = b;
522
+ a[c] = d;
523
523
  }
524
524
  c = -1;
525
525
  const p = [], g = [];
526
526
  for (; ++c < s; ) {
527
- const b = a[c];
528
- let d = "", k = "";
529
- b === 99 ? (d = ":", k = ":") : b === 108 ? d = ":" : b === 114 && (k = ":");
527
+ const d = a[c];
528
+ let b = "", k = "";
529
+ d === 99 ? (b = ":", k = ":") : d === 108 ? b = ":" : d === 114 && (k = ":");
530
530
  let x = t.alignDelimiters === !1 ? 1 : Math.max(
531
531
  1,
532
- o[c] - d.length - k.length
532
+ o[c] - b.length - k.length
533
533
  );
534
- const w = d + "-".repeat(x) + k;
535
- t.alignDelimiters !== !1 && (x = d.length + x + k.length, x > o[c] && (o[c] = x), g[c] = x), p[c] = w;
534
+ const w = b + "-".repeat(x) + k;
535
+ t.alignDelimiters !== !1 && (x = b.length + x + k.length, x > o[c] && (o[c] = x), g[c] = x), p[c] = w;
536
536
  }
537
537
  r.splice(1, 0, p), u.splice(1, 0, g), f = -1;
538
538
  const m = [];
539
539
  for (; ++f < r.length; ) {
540
- const b = r[f], d = u[f];
540
+ const d = r[f], b = u[f];
541
541
  c = -1;
542
542
  const k = [];
543
543
  for (; ++c < s; ) {
544
- const x = b[c] || "";
544
+ const x = d[c] || "";
545
545
  let w = "", v = "";
546
546
  if (t.alignDelimiters !== !1) {
547
- const C = o[c] - (d[c] || 0), y = a[c];
547
+ const C = o[c] - (b[c] || 0), y = a[c];
548
548
  y === 114 ? w = " ".repeat(C) : y === 99 ? C % 2 ? (w = " ".repeat(C / 2 + 0.5), v = " ".repeat(C / 2 - 0.5)) : (w = " ".repeat(C / 2), v = w) : v = " ".repeat(C);
549
549
  }
550
550
  t.delimiterStart !== !1 && !c && k.push("|"), t.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
@@ -776,7 +776,7 @@ function Xt(e, n, t) {
776
776
  }
777
777
  function Yt(e, n, t, i) {
778
778
  let l, a, r;
779
- typeof n == "function" && typeof t != "function" ? (a = void 0, r = n, l = t) : (a = n, r = t, l = i), de(e, a, u, l);
779
+ typeof n == "function" && typeof t != "function" ? (a = void 0, r = n, l = t) : (a = n, r = t, l = i), be(e, a, u, l);
780
780
  function u(o, s) {
781
781
  const f = s[s.length - 1], c = f ? f.children.indexOf(o) : void 0;
782
782
  return r(o, c, f);
@@ -851,8 +851,8 @@ function De(e) {
851
851
  function on() {
852
852
  return "<";
853
853
  }
854
- Te.peek = ln;
855
- function Te(e, n, t, i) {
854
+ Ee.peek = ln;
855
+ function Ee(e, n, t, i) {
856
856
  const l = te(t), a = l === '"' ? "Quote" : "Apostrophe", r = t.enter("image");
857
857
  let u = t.enter("label");
858
858
  const o = t.createTracker(i);
@@ -880,8 +880,8 @@ function Te(e, n, t, i) {
880
880
  function ln() {
881
881
  return "!";
882
882
  }
883
- Fe.peek = an;
884
- function Fe(e, n, t, i) {
883
+ Te.peek = an;
884
+ function Te(e, n, t, i) {
885
885
  const l = e.referenceType, a = t.enter("imageReference");
886
886
  let r = t.enter("label");
887
887
  const u = t.createTracker(i);
@@ -904,8 +904,8 @@ function Fe(e, n, t, i) {
904
904
  function an() {
905
905
  return "!";
906
906
  }
907
- Ee.peek = un;
908
- function Ee(e, n, t) {
907
+ Fe.peek = un;
908
+ function Fe(e, n, t) {
909
909
  let i = e.value || "", l = "`", a = -1;
910
910
  for (; new RegExp("(^|[^`])" + l + "([^`]|$)").test(i); )
911
911
  l += "`";
@@ -934,8 +934,8 @@ function Le(e, n) {
934
934
  // references don’t work), space, or angle brackets…
935
935
  !/[\0- <>\u007F]/.test(e.url));
936
936
  }
937
- ze.peek = sn;
938
- function ze(e, n, t, i) {
937
+ Ie.peek = sn;
938
+ function Ie(e, n, t, i) {
939
939
  const l = te(t), a = l === '"' ? "Quote" : "Apostrophe", r = t.createTracker(i);
940
940
  let u, o;
941
941
  if (Le(e, t)) {
@@ -979,8 +979,8 @@ function ze(e, n, t, i) {
979
979
  function sn(e, n, t) {
980
980
  return Le(e, t) ? "<" : "[";
981
981
  }
982
- Ie.peek = cn;
983
- function Ie(e, n, t, i) {
982
+ ze.peek = cn;
983
+ function ze(e, n, t, i) {
984
984
  const l = e.referenceType, a = t.enter("linkReference");
985
985
  let r = t.enter("label");
986
986
  const u = t.createTracker(i);
@@ -1098,7 +1098,7 @@ function kn(e, n, t, i) {
1098
1098
  const l = t.enter("paragraph"), a = t.enter("phrasing"), r = t.containerPhrasing(e, i);
1099
1099
  return a(), l(), r;
1100
1100
  }
1101
- const bn = (
1101
+ const dn = (
1102
1102
  /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
1103
1103
  /* @__PURE__ */ U([
1104
1104
  "break",
@@ -1124,9 +1124,9 @@ const bn = (
1124
1124
  "textDirective"
1125
1125
  ])
1126
1126
  );
1127
- function dn(e, n, t, i) {
1127
+ function bn(e, n, t, i) {
1128
1128
  return (e.children.some(function(r) {
1129
- return bn(r);
1129
+ return dn(r);
1130
1130
  }) ? t.containerPhrasing : t.containerFlow).call(t, e, i);
1131
1131
  }
1132
1132
  function xn(e) {
@@ -1188,15 +1188,15 @@ const Re = {
1188
1188
  hardBreak: fe,
1189
1189
  heading: rn,
1190
1190
  html: De,
1191
- image: Te,
1192
- imageReference: Fe,
1193
- inlineCode: Ee,
1194
- link: ze,
1195
- linkReference: Ie,
1191
+ image: Ee,
1192
+ imageReference: Te,
1193
+ inlineCode: Fe,
1194
+ link: Ie,
1195
+ linkReference: ze,
1196
1196
  list: mn,
1197
1197
  listItem: gn,
1198
1198
  paragraph: kn,
1199
- root: dn,
1199
+ root: bn,
1200
1200
  strong: _e,
1201
1201
  text: yn,
1202
1202
  thematicBreak: An
@@ -1207,10 +1207,10 @@ function vn() {
1207
1207
  table: Sn,
1208
1208
  tableData: me,
1209
1209
  tableHeader: me,
1210
- tableRow: Tn
1210
+ tableRow: En
1211
1211
  },
1212
1212
  exit: {
1213
- codeText: Fn,
1213
+ codeText: Tn,
1214
1214
  table: Dn,
1215
1215
  tableData: J,
1216
1216
  tableHeader: J,
@@ -1234,7 +1234,7 @@ function Sn(e) {
1234
1234
  function Dn(e) {
1235
1235
  this.exit(e), this.data.inTable = void 0;
1236
1236
  }
1237
- function Tn(e) {
1237
+ function En(e) {
1238
1238
  this.enter({ type: "tableRow", children: [] }, e);
1239
1239
  }
1240
1240
  function J(e) {
@@ -1243,13 +1243,13 @@ function J(e) {
1243
1243
  function me(e) {
1244
1244
  this.enter({ type: "tableCell", children: [] }, e);
1245
1245
  }
1246
- function Fn(e) {
1246
+ function Tn(e) {
1247
1247
  let n = this.resume();
1248
- this.data.inTable && (n = n.replace(/\\([\\|])/g, En));
1248
+ this.data.inTable && (n = n.replace(/\\([\\|])/g, Fn));
1249
1249
  const t = this.stack[this.stack.length - 1];
1250
1250
  t.type, t.value = n, this.exit(e);
1251
1251
  }
1252
- function En(e, n) {
1252
+ function Fn(e, n) {
1253
1253
  return n === "|" ? n : e;
1254
1254
  }
1255
1255
  function Ln(e) {
@@ -1281,24 +1281,24 @@ function Ln(e) {
1281
1281
  tableRow: u
1282
1282
  }
1283
1283
  };
1284
- function r(g, m, b, d) {
1285
- return s(f(g, b, d), g.align);
1284
+ function r(g, m, d, b) {
1285
+ return s(f(g, d, b), g.align);
1286
1286
  }
1287
- function u(g, m, b, d) {
1288
- const k = c(g, b, d), x = s([k]);
1287
+ function u(g, m, d, b) {
1288
+ const k = c(g, d, b), x = s([k]);
1289
1289
  return x.slice(0, x.indexOf(`
1290
1290
  `));
1291
1291
  }
1292
- function o(g, m, b, d) {
1293
- const k = b.enter("tableCell"), x = b.enter("phrasing"), w = b.containerPhrasing(g, {
1294
- ...d,
1292
+ function o(g, m, d, b) {
1293
+ const k = d.enter("tableCell"), x = d.enter("phrasing"), w = d.containerPhrasing(g, {
1294
+ ...b,
1295
1295
  before: a,
1296
1296
  after: a
1297
1297
  });
1298
1298
  return x(), k(), w;
1299
1299
  }
1300
1300
  function s(g, m) {
1301
- return Ht(g, {
1301
+ return jt(g, {
1302
1302
  align: m,
1303
1303
  // @ts-expect-error: `markdown-table` types should support `null`.
1304
1304
  alignDelimiters: i,
@@ -1308,28 +1308,28 @@ function Ln(e) {
1308
1308
  stringLength: l
1309
1309
  });
1310
1310
  }
1311
- function f(g, m, b) {
1312
- const d = g.children;
1311
+ function f(g, m, d) {
1312
+ const b = g.children;
1313
1313
  let k = -1;
1314
1314
  const x = [], w = m.enter("table");
1315
- for (; ++k < d.length; )
1316
- x[k] = c(d[k], m, b);
1315
+ for (; ++k < b.length; )
1316
+ x[k] = c(b[k], m, d);
1317
1317
  return w(), x;
1318
1318
  }
1319
- function c(g, m, b) {
1320
- const d = g.children;
1319
+ function c(g, m, d) {
1320
+ const b = g.children;
1321
1321
  let k = -1;
1322
1322
  const x = [], w = m.enter("tableRow");
1323
- for (; ++k < d.length; )
1324
- x[k] = o(d[k], g, m, b);
1323
+ for (; ++k < b.length; )
1324
+ x[k] = o(b[k], g, m, d);
1325
1325
  return w(), x;
1326
1326
  }
1327
- function p(g, m, b) {
1328
- let d = Re.inlineCode(g, m, b);
1329
- return b.stack.includes("tableCell") && (d = d.replace(/\|/g, "\\$&")), d;
1327
+ function p(g, m, d) {
1328
+ let b = Re.inlineCode(g, m, d);
1329
+ return d.stack.includes("tableCell") && (b = b.replace(/\|/g, "\\$&")), b;
1330
1330
  }
1331
1331
  }
1332
- function zn() {
1332
+ function In() {
1333
1333
  return {
1334
1334
  exit: {
1335
1335
  taskListCheckValueChecked: pe,
@@ -1338,7 +1338,7 @@ function zn() {
1338
1338
  }
1339
1339
  };
1340
1340
  }
1341
- function In() {
1341
+ function zn() {
1342
1342
  return {
1343
1343
  unsafe: [{ atBreak: !0, character: "-", after: "[:|-]" }],
1344
1344
  handlers: { listItem: _n }
@@ -1387,21 +1387,21 @@ function Rn() {
1387
1387
  Lt(),
1388
1388
  _t(),
1389
1389
  vn(),
1390
- zn()
1390
+ In()
1391
1391
  ];
1392
1392
  }
1393
1393
  function Mn(e) {
1394
1394
  return {
1395
1395
  extensions: [
1396
1396
  ct(),
1397
- zt(e),
1397
+ It(e),
1398
1398
  Rt(),
1399
1399
  Ln(e),
1400
- In()
1400
+ zn()
1401
1401
  ]
1402
1402
  };
1403
1403
  }
1404
- function H(e, n, t, i) {
1404
+ function j(e, n, t, i) {
1405
1405
  const l = e.length;
1406
1406
  let a = 0, r;
1407
1407
  if (n < 0 ? n = -n > l ? 0 : l + n : n = n > l ? l : n, t = t > 0 ? t : 0, i.length < 1e4)
@@ -1415,10 +1415,10 @@ function On(e) {
1415
1415
  const n = {};
1416
1416
  let t = -1;
1417
1417
  for (; ++t < e.length; )
1418
- jn(n, e[t]);
1418
+ Hn(n, e[t]);
1419
1419
  return n;
1420
1420
  }
1421
- function jn(e, n) {
1421
+ function Hn(e, n) {
1422
1422
  let t;
1423
1423
  for (t in n) {
1424
1424
  const l = (ge.call(e, t) ? e[t] : void 0) || (e[t] = {}), a = n[t];
@@ -1440,9 +1440,9 @@ function Bn(e, n) {
1440
1440
  const i = [];
1441
1441
  for (; ++t < n.length; )
1442
1442
  (n[t].add === "after" ? e : i).push(n[t]);
1443
- H(e, 0, 0, i);
1443
+ j(e, 0, 0, i);
1444
1444
  }
1445
- const Hn = {
1445
+ const jn = {
1446
1446
  tokenize: Vn,
1447
1447
  partial: !0
1448
1448
  }, Me = {
@@ -1451,7 +1451,7 @@ const Hn = {
1451
1451
  }, Oe = {
1452
1452
  tokenize: Qn,
1453
1453
  partial: !0
1454
- }, je = {
1454
+ }, He = {
1455
1455
  tokenize: Zn,
1456
1456
  partial: !0
1457
1457
  }, $n = {
@@ -1461,11 +1461,11 @@ const Hn = {
1461
1461
  name: "wwwAutolink",
1462
1462
  tokenize: Nn,
1463
1463
  previous: $e
1464
- }, He = {
1464
+ }, je = {
1465
1465
  name: "protocolAutolink",
1466
1466
  tokenize: Un,
1467
1467
  previous: qe
1468
- }, F = {
1468
+ }, T = {
1469
1469
  name: "emailAutolink",
1470
1470
  tokenize: Wn,
1471
1471
  previous: We
@@ -1475,17 +1475,17 @@ function qn() {
1475
1475
  text: S
1476
1476
  };
1477
1477
  }
1478
- let E = 48;
1479
- for (; E < 123; )
1480
- S[E] = F, E++, E === 58 ? E = 65 : E === 91 && (E = 97);
1481
- S[43] = F;
1482
- S[45] = F;
1483
- S[46] = F;
1484
- S[95] = F;
1485
- S[72] = [F, He];
1486
- S[104] = [F, He];
1487
- S[87] = [F, Be];
1488
- S[119] = [F, Be];
1478
+ let F = 48;
1479
+ for (; F < 123; )
1480
+ S[F] = T, F++, F === 58 ? F = 65 : F === 91 && (F = 97);
1481
+ S[43] = T;
1482
+ S[45] = T;
1483
+ S[46] = T;
1484
+ S[95] = T;
1485
+ S[72] = [T, je];
1486
+ S[104] = [T, je];
1487
+ S[87] = [T, Be];
1488
+ S[119] = [T, Be];
1489
1489
  function Wn(e, n, t) {
1490
1490
  const i = this;
1491
1491
  let l, a;
@@ -1510,7 +1510,7 @@ function Nn(e, n, t) {
1510
1510
  const i = this;
1511
1511
  return l;
1512
1512
  function l(r) {
1513
- return r !== 87 && r !== 119 || !$e.call(i, i.previous) || re(i.events) ? t(r) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(Hn, e.attempt(Me, e.attempt(Oe, a), t), t)(r));
1513
+ return r !== 87 && r !== 119 || !$e.call(i, i.previous) || re(i.events) ? t(r) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(jn, e.attempt(Me, e.attempt(Oe, a), t), t)(r));
1514
1514
  }
1515
1515
  function a(r) {
1516
1516
  return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), n(r);
@@ -1557,7 +1557,7 @@ function Gn(e, n, t) {
1557
1557
  let i, l, a;
1558
1558
  return r;
1559
1559
  function r(s) {
1560
- return s === 46 || s === 95 ? e.check(je, o, u)(s) : s === null || A(s) || L(s) || s !== 45 && W(s) ? o(s) : (a = !0, e.consume(s), r);
1560
+ return s === 46 || s === 95 ? e.check(He, o, u)(s) : s === null || A(s) || L(s) || s !== 45 && W(s) ? o(s) : (a = !0, e.consume(s), r);
1561
1561
  }
1562
1562
  function u(s) {
1563
1563
  return s === 95 ? i = !0 : (l = i, i = void 0), e.consume(s), r;
@@ -1570,7 +1570,7 @@ function Qn(e, n) {
1570
1570
  let t = 0, i = 0;
1571
1571
  return l;
1572
1572
  function l(r) {
1573
- return r === 40 ? (t++, e.consume(r), l) : r === 41 && i < t ? a(r) : r === 33 || r === 34 || r === 38 || r === 39 || r === 41 || r === 42 || r === 44 || r === 46 || r === 58 || r === 59 || r === 60 || r === 63 || r === 93 || r === 95 || r === 126 ? e.check(je, n, a)(r) : r === null || A(r) || L(r) ? n(r) : (e.consume(r), l);
1573
+ return r === 40 ? (t++, e.consume(r), l) : r === 41 && i < t ? a(r) : r === 33 || r === 34 || r === 38 || r === 39 || r === 41 || r === 42 || r === 44 || r === 46 || r === 58 || r === 59 || r === 60 || r === 63 || r === 93 || r === 95 || r === 126 ? e.check(He, n, a)(r) : r === null || A(r) || L(r) ? n(r) : (e.consume(r), l);
1574
1574
  }
1575
1575
  function a(r) {
1576
1576
  return r === 41 && i++, e.consume(r), l;
@@ -1640,7 +1640,7 @@ function Jn(e, n, t) {
1640
1640
  }
1641
1641
  return n;
1642
1642
  }
1643
- function T(e, n, t, i) {
1643
+ function E(e, n, t, i) {
1644
1644
  const l = i ? i - 1 : Number.POSITIVE_INFINITY;
1645
1645
  let a = 0;
1646
1646
  return r;
@@ -1658,10 +1658,10 @@ const Xn = {
1658
1658
  function Yn(e, n, t) {
1659
1659
  return i;
1660
1660
  function i(a) {
1661
- return D(a) ? T(e, l, "linePrefix")(a) : l(a);
1661
+ return D(a) ? E(e, l, "linePrefix")(a) : l(a);
1662
1662
  }
1663
1663
  function l(a) {
1664
- return a === null || I(a) ? n(a) : t(a);
1664
+ return a === null || z(a) ? n(a) : t(a);
1665
1665
  }
1666
1666
  }
1667
1667
  const er = {
@@ -1820,8 +1820,8 @@ function or(e, n, t) {
1820
1820
  return t(m);
1821
1821
  if (m === 93) {
1822
1822
  e.exit("chunkString");
1823
- const b = e.exit("gfmFootnoteDefinitionLabelString");
1824
- return a = M(i.sliceSerialize(b)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(m), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), p;
1823
+ const d = e.exit("gfmFootnoteDefinitionLabelString");
1824
+ return a = M(i.sliceSerialize(d)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(m), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), p;
1825
1825
  }
1826
1826
  return A(m) || (u = !0), r++, e.consume(m), m === 92 ? c : f;
1827
1827
  }
@@ -1829,7 +1829,7 @@ function or(e, n, t) {
1829
1829
  return m === 91 || m === 92 || m === 93 ? (e.consume(m), r++, f) : f(m);
1830
1830
  }
1831
1831
  function p(m) {
1832
- return m === 58 ? (e.enter("definitionMarker"), e.consume(m), e.exit("definitionMarker"), l.includes(a) || l.push(a), T(e, g, "gfmFootnoteDefinitionWhitespace")) : t(m);
1832
+ return m === 58 ? (e.enter("definitionMarker"), e.consume(m), e.exit("definitionMarker"), l.includes(a) || l.push(a), E(e, g, "gfmFootnoteDefinitionWhitespace")) : t(m);
1833
1833
  }
1834
1834
  function g(m) {
1835
1835
  return n(m);
@@ -1843,7 +1843,7 @@ function ar(e) {
1843
1843
  }
1844
1844
  function ur(e, n, t) {
1845
1845
  const i = this;
1846
- return T(e, l, "gfmFootnoteDefinitionIndent", 5);
1846
+ return E(e, l, "gfmFootnoteDefinitionIndent", 5);
1847
1847
  function l(a) {
1848
1848
  const r = i.events[i.events.length - 1];
1849
1849
  return r && r[1].type === "gfmFootnoteDefinitionIndent" && r[2].sliceSerialize(r[1], !0).length === 4 ? n(a) : t(a);
@@ -1885,7 +1885,7 @@ function sr(e) {
1885
1885
  start: Object.assign({}, r[s][1].end),
1886
1886
  end: Object.assign({}, r[o][1].start)
1887
1887
  }, p = [["enter", f, u], ["enter", r[s][1], u], ["exit", r[s][1], u], ["enter", c, u]], g = u.parser.constructs.insideSpan.null;
1888
- g && H(p, p.length, 0, Jn(g, r.slice(s + 1, o), u)), H(p, p.length, 0, [["exit", c, u], ["enter", r[o][1], u], ["exit", r[o][1], u], ["exit", f, u]]), H(r, s - 1, o - s + 3, p), o = s + p.length - 2;
1888
+ g && j(p, p.length, 0, Jn(g, r.slice(s + 1, o), u)), j(p, p.length, 0, [["exit", c, u], ["enter", r[o][1], u], ["exit", r[o][1], u], ["exit", f, u]]), j(r, s - 1, o - s + 3, p), o = s + p.length - 2;
1889
1889
  break;
1890
1890
  }
1891
1891
  }
@@ -1901,12 +1901,12 @@ function sr(e) {
1901
1901
  return s === 126 && f[f.length - 1][1].type !== "characterEscape" ? o(m) : (r.enter("strikethroughSequenceTemporary"), g(m));
1902
1902
  }
1903
1903
  function g(m) {
1904
- const b = $(s);
1904
+ const d = $(s);
1905
1905
  if (m === 126)
1906
1906
  return c > 1 ? o(m) : (r.consume(m), c++, g);
1907
1907
  if (c < 2 && !t) return o(m);
1908
- const d = r.exit("strikethroughSequenceTemporary"), k = $(m);
1909
- return d._open = !k || k === 2 && !!b, d._close = !b || b === 2 && !!k, u(m);
1908
+ const b = r.exit("strikethroughSequenceTemporary"), k = $(m);
1909
+ return b._open = !k || k === 2 && !!d, b._close = !d || d === 2 && !!k, u(m);
1910
1910
  }
1911
1911
  }
1912
1912
  }
@@ -2031,7 +2031,7 @@ function pr(e, n, t) {
2031
2031
  return h === 124 || (r = !0, a += 1), f(h);
2032
2032
  }
2033
2033
  function f(h) {
2034
- return h === null ? t(h) : I(h) ? a > 1 ? (a = 0, i.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), g) : t(h) : D(h) ? T(e, f, "whitespace")(h) : (a += 1, r && (r = !1, l += 1), h === 124 ? (e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), r = !0, f) : (e.enter("data"), c(h)));
2034
+ return h === null ? t(h) : z(h) ? a > 1 ? (a = 0, i.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), g) : t(h) : D(h) ? E(e, f, "whitespace")(h) : (a += 1, r && (r = !1, l += 1), h === 124 ? (e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), r = !0, f) : (e.enter("data"), c(h)));
2035
2035
  }
2036
2036
  function c(h) {
2037
2037
  return h === null || h === 124 || A(h) ? (e.exit("data"), f(h)) : (e.consume(h), h === 92 ? p : c);
@@ -2040,16 +2040,16 @@ function pr(e, n, t) {
2040
2040
  return h === 92 || h === 124 ? (e.consume(h), c) : c(h);
2041
2041
  }
2042
2042
  function g(h) {
2043
- return i.interrupt = !1, i.parser.lazy[i.now().line] ? t(h) : (e.enter("tableDelimiterRow"), r = !1, D(h) ? T(e, m, "linePrefix", i.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(h) : m(h));
2043
+ return i.interrupt = !1, i.parser.lazy[i.now().line] ? t(h) : (e.enter("tableDelimiterRow"), r = !1, D(h) ? E(e, m, "linePrefix", i.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(h) : m(h));
2044
2044
  }
2045
2045
  function m(h) {
2046
- return h === 45 || h === 58 ? d(h) : h === 124 ? (r = !0, e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), b) : C(h);
2047
- }
2048
- function b(h) {
2049
- return D(h) ? T(e, d, "whitespace")(h) : d(h);
2046
+ return h === 45 || h === 58 ? b(h) : h === 124 ? (r = !0, e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), d) : C(h);
2050
2047
  }
2051
2048
  function d(h) {
2052
- return h === 58 ? (a += 1, r = !0, e.enter("tableDelimiterMarker"), e.consume(h), e.exit("tableDelimiterMarker"), k) : h === 45 ? (a += 1, k(h)) : h === null || I(h) ? v(h) : C(h);
2049
+ return D(h) ? E(e, b, "whitespace")(h) : b(h);
2050
+ }
2051
+ function b(h) {
2052
+ return h === 58 ? (a += 1, r = !0, e.enter("tableDelimiterMarker"), e.consume(h), e.exit("tableDelimiterMarker"), k) : h === 45 ? (a += 1, k(h)) : h === null || z(h) ? v(h) : C(h);
2053
2053
  }
2054
2054
  function k(h) {
2055
2055
  return h === 45 ? (e.enter("tableDelimiterFiller"), x(h)) : C(h);
@@ -2058,10 +2058,10 @@ function pr(e, n, t) {
2058
2058
  return h === 45 ? (e.consume(h), x) : h === 58 ? (r = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(h), e.exit("tableDelimiterMarker"), w) : (e.exit("tableDelimiterFiller"), w(h));
2059
2059
  }
2060
2060
  function w(h) {
2061
- return D(h) ? T(e, v, "whitespace")(h) : v(h);
2061
+ return D(h) ? E(e, v, "whitespace")(h) : v(h);
2062
2062
  }
2063
2063
  function v(h) {
2064
- return h === 124 ? m(h) : h === null || I(h) ? !r || l !== a ? C(h) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), n(h)) : C(h);
2064
+ return h === 124 ? m(h) : h === null || z(h) ? !r || l !== a ? C(h) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), n(h)) : C(h);
2065
2065
  }
2066
2066
  function C(h) {
2067
2067
  return t(h);
@@ -2070,13 +2070,13 @@ function pr(e, n, t) {
2070
2070
  return e.enter("tableRow"), O(h);
2071
2071
  }
2072
2072
  function O(h) {
2073
- return h === 124 ? (e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), O) : h === null || I(h) ? (e.exit("tableRow"), n(h)) : D(h) ? T(e, O, "whitespace")(h) : (e.enter("data"), j(h));
2073
+ return h === 124 ? (e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), O) : h === null || z(h) ? (e.exit("tableRow"), n(h)) : D(h) ? E(e, O, "whitespace")(h) : (e.enter("data"), H(h));
2074
2074
  }
2075
- function j(h) {
2076
- return h === null || h === 124 || A(h) ? (e.exit("data"), O(h)) : (e.consume(h), h === 92 ? Ne : j);
2075
+ function H(h) {
2076
+ return h === null || h === 124 || A(h) ? (e.exit("data"), O(h)) : (e.consume(h), h === 92 ? Ne : H);
2077
2077
  }
2078
2078
  function Ne(h) {
2079
- return h === 92 || h === 124 ? (e.consume(h), j) : j(h);
2079
+ return h === 92 || h === 124 ? (e.consume(h), H) : H(h);
2080
2080
  }
2081
2081
  }
2082
2082
  function gr(e, n) {
@@ -2104,15 +2104,15 @@ function gr(e, n) {
2104
2104
  }
2105
2105
  function B(e, n, t, i, l, a) {
2106
2106
  const r = i === 1 ? "tableHeader" : i === 2 ? "tableDelimiter" : "tableData", u = "tableContent";
2107
- t[0] !== 0 && (a.end = Object.assign({}, z(n.events, t[0])), e.add(t[0], 0, [["exit", a, n]]));
2108
- const o = z(n.events, t[1]);
2107
+ t[0] !== 0 && (a.end = Object.assign({}, I(n.events, t[0])), e.add(t[0], 0, [["exit", a, n]]));
2108
+ const o = I(n.events, t[1]);
2109
2109
  if (a = {
2110
2110
  type: r,
2111
2111
  start: Object.assign({}, o),
2112
2112
  // Note: correct end is set later.
2113
2113
  end: Object.assign({}, o)
2114
2114
  }, e.add(t[1], 0, [["enter", a, n]]), t[2] !== 0) {
2115
- const s = z(n.events, t[2]), f = z(n.events, t[3]), c = {
2115
+ const s = I(n.events, t[2]), f = I(n.events, t[3]), c = {
2116
2116
  type: u,
2117
2117
  start: Object.assign({}, s),
2118
2118
  end: Object.assign({}, f)
@@ -2120,34 +2120,34 @@ function B(e, n, t, i, l, a) {
2120
2120
  if (e.add(t[2], 0, [["enter", c, n]]), i !== 2) {
2121
2121
  const p = n.events[t[2]], g = n.events[t[3]];
2122
2122
  if (p[1].end = Object.assign({}, g[1].end), p[1].type = "chunkText", p[1].contentType = "text", t[3] > t[2] + 1) {
2123
- const m = t[2] + 1, b = t[3] - t[2] - 1;
2124
- e.add(m, b, []);
2123
+ const m = t[2] + 1, d = t[3] - t[2] - 1;
2124
+ e.add(m, d, []);
2125
2125
  }
2126
2126
  }
2127
2127
  e.add(t[3] + 1, 0, [["exit", c, n]]);
2128
2128
  }
2129
- return l !== void 0 && (a.end = Object.assign({}, z(n.events, l)), e.add(l, 0, [["exit", a, n]]), a = void 0), a;
2129
+ return l !== void 0 && (a.end = Object.assign({}, I(n.events, l)), e.add(l, 0, [["exit", a, n]]), a = void 0), a;
2130
2130
  }
2131
2131
  function ke(e, n, t, i, l) {
2132
- const a = [], r = z(n.events, t);
2132
+ const a = [], r = I(n.events, t);
2133
2133
  l && (l.end = Object.assign({}, r), a.push(["exit", l, n])), i.end = Object.assign({}, r), a.push(["exit", i, n]), e.add(t + 1, 0, a);
2134
2134
  }
2135
- function z(e, n) {
2135
+ function I(e, n) {
2136
2136
  const t = e[n], i = t[0] === "enter" ? "start" : "end";
2137
2137
  return t[1][i];
2138
2138
  }
2139
2139
  const kr = {
2140
2140
  name: "tasklistCheck",
2141
- tokenize: dr
2141
+ tokenize: br
2142
2142
  };
2143
- function br() {
2143
+ function dr() {
2144
2144
  return {
2145
2145
  text: {
2146
2146
  91: kr
2147
2147
  }
2148
2148
  };
2149
2149
  }
2150
- function dr(e, n, t) {
2150
+ function br(e, n, t) {
2151
2151
  const i = this;
2152
2152
  return l;
2153
2153
  function l(o) {
@@ -2165,13 +2165,13 @@ function dr(e, n, t) {
2165
2165
  return o === 93 ? (e.enter("taskListCheckMarker"), e.consume(o), e.exit("taskListCheckMarker"), e.exit("taskListCheck"), u) : t(o);
2166
2166
  }
2167
2167
  function u(o) {
2168
- return I(o) ? n(o) : D(o) ? e.check({
2168
+ return z(o) ? n(o) : D(o) ? e.check({
2169
2169
  tokenize: xr
2170
2170
  }, n, t)(o) : t(o);
2171
2171
  }
2172
2172
  }
2173
2173
  function xr(e, n, t) {
2174
- return T(e, i, "whitespace");
2174
+ return E(e, i, "whitespace");
2175
2175
  function i(l) {
2176
2176
  return l === null ? t(l) : n(l);
2177
2177
  }
@@ -2182,7 +2182,7 @@ function wr(e) {
2182
2182
  tr(),
2183
2183
  sr(e),
2184
2184
  mr(),
2185
- br()
2185
+ dr()
2186
2186
  ]);
2187
2187
  }
2188
2188
  const yr = {};
@@ -2295,50 +2295,83 @@ const Ar = /* @__PURE__ */ Qe(import.meta.url), vr = /* @__PURE__ */ Ue(Ar), Sr
2295
2295
  window.addEventListener('load', broadcastHash);
2296
2296
  <\/script>`,
2297
2297
  `<script>
2298
- function loadTheme(event) {
2299
- if (!event.data || event.data.name !== 'LOAD_THEME') {
2298
+ window.addEventListener('message', function passTheme(event) {
2299
+ if (!event.data) {
2300
+ return;
2301
+ }
2302
+
2303
+ const { type, ...data } = event.data;
2304
+
2305
+ if (type !== 'PASS_THEME') {
2306
+ return;
2307
+ }
2308
+
2309
+ const frames = document.querySelectorAll('iframe');
2310
+ frames.forEach((f) => {
2311
+ try {
2312
+ f.contentWindow?.postMessage({ type: 'LOAD_THEME', ...data }, '*');
2313
+ } catch (err) {
2314
+ console.debug('[Storybook Host] Skipped frame broadcast:', err);
2315
+ }
2316
+ });
2317
+ });
2318
+ <\/script>`,
2319
+ o.BASE_PATH ? `<base href="${o.BASE_PATH}">` : !1
2320
+ ].filter(Boolean).join(`
2321
+ `);
2322
+ }, r.previewHead = (u) => {
2323
+ const o = ae("", process.cwd(), "BASE_PATH");
2324
+ return [
2325
+ u,
2326
+ `<script>
2327
+ window.addEventListener('message', function loadTheme(event) {
2328
+ if (!event.data || event.data.type !== 'LOAD_THEME') {
2300
2329
  return;
2301
2330
  }
2302
2331
 
2303
2332
  const { name, href, css } = event.data;
2304
2333
 
2305
- if (href) {
2306
- const link = document.createElement('link');
2307
- link.rel = 'stylesheet';
2308
- link.href = href;
2309
- document.head.appendChild(link);
2334
+ let existingHref = document.getElementById('storybook-config-theme-href');
2335
+ let existingCss = document.getElementById('storybook-config-theme-css');
2336
+ const existingTheme = document.documentElement.getAttribute('data-theme');
2337
+
2338
+ if (existingTheme) {
2339
+ document.documentElement.classList.remove(existingTheme);
2310
2340
  }
2311
2341
 
2312
- if (css) {
2313
- const existing = document.head.querySelector('#storybook-config-theme);
2342
+ if (!name) {
2343
+ existingHref?.remove();
2344
+ existingCss?.remove();
2345
+ return;
2346
+ }
2314
2347
 
2315
- if (!existing) {
2316
- const style = document.createElement('style');
2317
- style.id = 'storybook-config-theme';
2318
- document.head.appendChild(style);
2348
+ if (href) {
2349
+ if (!existingHref) {
2350
+ existingHref = document.createElement('link');
2351
+ existingHref.rel = 'stylesheet';
2352
+ existingHref.id = 'storybook-config-theme-href';
2353
+ document.head.appendChild(existingHref);
2319
2354
  }
2320
2355
 
2321
- style.innerHTML = css;
2356
+ existingHref.href = href;
2322
2357
  }
2323
2358
 
2324
- const currentTheme = document.documentElement.getAttribute('data-theme');
2359
+ if (css) {
2360
+ if (!existingCss) {
2361
+ existingCss = document.createElement('style');
2362
+ existingCss.id = 'storybook-config-theme-css';
2363
+ document.head.appendChild(existingCss);
2364
+ }
2325
2365
 
2326
- if (currentTheme) {
2327
- document.documentElement.classList.remove(currentTheme);
2366
+ existingCss.innerHTML = css;
2328
2367
  }
2329
2368
 
2330
2369
  document.documentElement.setAttribute('data-theme', name);
2331
2370
  document.documentElement.classList.add(name);
2332
- }
2333
-
2334
- window.addEventListener('message', loadTheme);
2371
+ });
2335
2372
  <\/script>`,
2336
2373
  o.BASE_PATH ? `<base href="${o.BASE_PATH}">` : !1
2337
2374
  ].filter(Boolean).join(`
2338
- `);
2339
- }, r.previewHead = (u) => {
2340
- const o = ae("", process.cwd(), "BASE_PATH");
2341
- return [u, o.BASE_PATH ? `<base href="${o.BASE_PATH}">` : !1].filter(Boolean).join(`
2342
2375
  `);
2343
2376
  }, r;
2344
2377
  };
package/dist/types.d.ts CHANGED
@@ -9,3 +9,37 @@ export interface ParametersConfig {
9
9
  };
10
10
  }
11
11
  export type ReactElementToJSXStringOptions = Exclude<Parameters<typeof reactElementToJSXString>[1], undefined>;
12
+ /**
13
+ * Event for broadcasting hash changes from a parent window to an iframe Storybook instance.
14
+ * Used to communicate hash changes between Storybook compositions.
15
+ */
16
+ export interface BroadcastHashEvent {
17
+ type: 'UPDATE_HASH';
18
+ hash: string;
19
+ }
20
+ /**
21
+ * Event for passing theme data between the parent window and iframe Storybook instances.
22
+ * Used to synchronize themes across Storybook compositions.
23
+ */
24
+ export interface PassThemeEvent {
25
+ type: 'PASS_THEME';
26
+ /**
27
+ * Name of the theme.
28
+ */
29
+ name: string;
30
+ /**
31
+ * Optional href to a CSS file for the theme.
32
+ */
33
+ href?: string;
34
+ /**
35
+ * Optional raw CSS string for the theme.
36
+ */
37
+ css?: string;
38
+ }
39
+ /**
40
+ * Event for loading a theme in an iframe Storybook instance.
41
+ * Sent from the parent window to apply the selected theme.
42
+ */
43
+ export interface LoadThemeEvent extends Omit<PassThemeEvent, 'type'> {
44
+ type: 'LOAD_THEME';
45
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iress-oss/ids-storybook-config",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",