@fiestaboard/ui 3.3.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/components/board/board-backdrop.d.ts +60 -0
  2. package/dist/components/board/board-backdrop.js +71 -0
  3. package/dist/components/board/board-backdrop.js.map +1 -0
  4. package/dist/components/board/board-display.js +123 -123
  5. package/dist/components/board/board-display.js.map +1 -1
  6. package/dist/components/board/static-board-display.js +32 -32
  7. package/dist/components/chrome/fiesta-logo.js +2 -2
  8. package/dist/components/chrome/fiesta-logo.js.map +1 -1
  9. package/dist/components/chrome/page-header.d.ts +66 -4
  10. package/dist/components/chrome/page-header.js +31 -11
  11. package/dist/components/chrome/page-header.js.map +1 -1
  12. package/dist/components/chrome/page-layout.js +1 -1
  13. package/dist/components/chrome/page-layout.js.map +1 -1
  14. package/dist/components/chrome/sidebar.d.ts +2 -5
  15. package/dist/components/chrome/sidebar.js +152 -173
  16. package/dist/components/chrome/sidebar.js.map +1 -1
  17. package/dist/components/chrome/theme-toggle.d.ts +37 -10
  18. package/dist/components/chrome/theme-toggle.js +25 -12
  19. package/dist/components/chrome/theme-toggle.js.map +1 -1
  20. package/dist/components/containment/json-tree.js +2 -2
  21. package/dist/components/containment/json-tree.js.map +1 -1
  22. package/dist/components/editor/node-views/wrapped-text-view.js +1 -1
  23. package/dist/components/editor/node-views/wrapped-text-view.js.map +1 -1
  24. package/dist/components/editor/variable-picker-content.js +4 -4
  25. package/dist/components/feedback/alert.js +4 -4
  26. package/dist/components/feedback/alert.js.map +1 -1
  27. package/dist/components/feedback/badge.js +4 -4
  28. package/dist/components/feedback/badge.js.map +1 -1
  29. package/dist/components/forms/button.js +5 -5
  30. package/dist/components/forms/button.js.map +1 -1
  31. package/dist/components/layout/flex.d.ts +1 -1
  32. package/dist/components/layout/grid.d.ts +1 -1
  33. package/dist/components/layout/stack.d.ts +1 -1
  34. package/dist/components/plugin/board-showcase.js +2 -2
  35. package/dist/components/plugin/board-showcase.js.map +1 -1
  36. package/dist/components/plugin/plugin-category-badge.d.ts +27 -1
  37. package/dist/components/plugin/plugin-category-badge.js +18 -14
  38. package/dist/components/plugin/plugin-category-badge.js.map +1 -1
  39. package/dist/components/typography/text.js +1 -1
  40. package/dist/components/typography/text.js.map +1 -1
  41. package/dist/components/wizard/wizard-progress.d.ts +29 -0
  42. package/dist/components/wizard/wizard-progress.js +27 -0
  43. package/dist/components/wizard/wizard-progress.js.map +1 -0
  44. package/dist/components/wizard/wizard-shell.d.ts +63 -0
  45. package/dist/components/wizard/wizard-shell.js +69 -0
  46. package/dist/components/wizard/wizard-shell.js.map +1 -0
  47. package/dist/index.d.ts +3 -5
  48. package/dist/index.js +90 -92
  49. package/dist/theme.css +621 -503
  50. package/package.json +2 -4
  51. package/dist/components/effects/aurora.d.ts +0 -9
  52. package/dist/components/effects/aurora.js +0 -121
  53. package/dist/components/effects/aurora.js.map +0 -1
  54. package/dist/components/effects/react-bits/decrypted-text.d.ts +0 -14
  55. package/dist/components/effects/react-bits/decrypted-text.js +0 -88
  56. package/dist/components/effects/react-bits/decrypted-text.js.map +0 -1
  57. package/dist/components/seasons/aurora-canvas.d.ts +0 -22
  58. package/dist/components/seasons/aurora-canvas.js +0 -91
  59. package/dist/components/seasons/aurora-canvas.js.map +0 -1
  60. package/dist/components/seasons/sidebar-aurora-horizontal.d.ts +0 -3
  61. package/dist/components/seasons/sidebar-aurora-horizontal.js +0 -47
  62. package/dist/components/seasons/sidebar-aurora-horizontal.js.map +0 -1
  63. package/dist/components/seasons/sidebar-aurora.d.ts +0 -3
  64. package/dist/components/seasons/sidebar-aurora.js +0 -57
  65. package/dist/components/seasons/sidebar-aurora.js.map +0 -1
  66. package/dist/lib/seasons-drafts.d.ts +0 -26
  67. package/dist/lib/seasons-drafts.js +0 -106
  68. package/dist/lib/seasons-drafts.js.map +0 -1
  69. package/dist/lib/seasons.d.ts +0 -52
  70. package/dist/lib/seasons.js +0 -59
  71. package/dist/lib/seasons.js.map +0 -1
  72. package/dist/seasons/christmas.css +0 -64
  73. package/dist/seasons/easter.css +0 -62
  74. package/dist/seasons/fathers-day.css +0 -62
  75. package/dist/seasons/halloween.css +0 -69
  76. package/dist/seasons/mothers-day.css +0 -63
  77. package/dist/seasons/new-year.css +0 -66
  78. package/dist/seasons/pride.css +0 -68
  79. package/dist/seasons/thanksgiving.css +0 -64
@@ -0,0 +1,60 @@
1
+ export interface BoardBackdropProps {
2
+ /**
3
+ * Short board phrases to draw from — the kind of line this product actually
4
+ * displays. They are packed edge to edge to build each row, so give it more
5
+ * than you need: variety across the field comes from the size of this pool.
6
+ */
7
+ phrases: string[];
8
+ /** Number of rows to build. */
9
+ rowCount?: number;
10
+ /** Tiles per row before the field is scaled up to cover. */
11
+ tiles?: number;
12
+ /** Rows past this index are `display:none` below `sm`. */
13
+ mobileRows?: number;
14
+ /** Changes the arrangement. Same seed always yields the same field. */
15
+ seed?: number;
16
+ /**
17
+ * Pin to the viewport instead of the nearest positioned ancestor.
18
+ *
19
+ * Use this inside a full-screen scrolling shell. Positioned `absolute` there,
20
+ * the field is only as tall as the scroll container's first screen, so it
21
+ * scrolls away and the array visibly ends — which is the one thing a
22
+ * "continues past every edge" background must never do.
23
+ */
24
+ fixed?: boolean;
25
+ className?: string;
26
+ }
27
+ /**
28
+ * A field of split-flap rows, used as a page backdrop.
29
+ *
30
+ * This replaces the WebGL `Aurora` that used to sit behind the setup wizard.
31
+ * The aurora was a generic gradient that could have been behind any product;
32
+ * this is the actual object the user just bought, showing the kind of line it
33
+ * is about to display.
34
+ *
35
+ * THE PERFORMANCE STORY IS THE WHOLE DESIGN, because a first-run screen is
36
+ * disproportionately likely to be opened on a phone:
37
+ *
38
+ * * `BoardTeaser` is static — `memo` + `useMemo`, no effects, no rAF. Once
39
+ * painted, a row costs nothing. The aurora it replaces held a WebGL
40
+ * context open and ran a shader every frame for as long as the screen was
41
+ * up, which is the single most expensive thing a background can do.
42
+ * * The reveal is ONE-SHOT. Rows settle in on mount and then stop; there is
43
+ * no loop to keep the compositor awake. "Splashy" is an entrance here, not
44
+ * an ambient state.
45
+ * * It animates `transform` and `opacity` only, so the settle stays on the
46
+ * compositor and never triggers layout or paint.
47
+ * * Rows past `mobileRows` are `display:none` below `sm`. To be precise
48
+ * about what that does and does not buy: React still builds those tiles,
49
+ * so it saves layout, paint and compositing, not reconciliation. Skipping
50
+ * the render outright would need a viewport hook, which is JS on the
51
+ * critical path of a first-run screen — a worse trade than the DOM it
52
+ * would save.
53
+ * * `prefers-reduced-motion` renders the field already settled, with no
54
+ * animation declared.
55
+ *
56
+ * The mask is what keeps it a backdrop rather than a picture: the field fades
57
+ * out toward the centre so foreground content always sits on flat surface, and
58
+ * the rows read as something happening behind the app.
59
+ */
60
+ export declare function BoardBackdrop({ phrases, rowCount, tiles, mobileRows, seed, fixed, className, }: BoardBackdropProps): import("react").JSX.Element;
@@ -0,0 +1,71 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { BoardTeaser as t } from "./board-teaser.js";
3
+ import { useMemo as n } from "react";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/components/board/board-backdrop.tsx
6
+ var i = [
7
+ "{63}",
8
+ "{64}",
9
+ "{65}",
10
+ "{66}",
11
+ "{67}",
12
+ "{68}"
13
+ ];
14
+ function a(e) {
15
+ let t = e | 0;
16
+ return () => {
17
+ t = t + 1831565813 | 0;
18
+ let e = Math.imul(t ^ t >>> 15, 1 | t);
19
+ return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
20
+ };
21
+ }
22
+ function o(e) {
23
+ return e.replace(/\{\d+\}/g, "#").length;
24
+ }
25
+ function s(e, t, n, r) {
26
+ let s = a(r), c = [];
27
+ for (let r = 0; r < t; r++) {
28
+ let t = "", r = 0;
29
+ for (; o(t) < n && r++ < 40;) s() < .22 ? t += i[Math.floor(s() * i.length)] : t += e[Math.floor(s() * e.length)], t += " ".repeat(1 + Math.floor(s() * 3));
30
+ let a = "";
31
+ for (let e of t.match(/\{\d+\}|./g) ?? []) {
32
+ if (o(a + e) > n) break;
33
+ a += e;
34
+ }
35
+ c.push(a);
36
+ }
37
+ return c;
38
+ }
39
+ function c({ phrases: i, rowCount: a = 16, tiles: o = 30, mobileRows: c = 14, seed: l = 7, fixed: u = !1, className: d }) {
40
+ let f = n(() => s(i, a, o, l), [
41
+ i,
42
+ a,
43
+ o,
44
+ l
45
+ ]);
46
+ return /* @__PURE__ */ r("div", {
47
+ "aria-hidden": "true",
48
+ "data-slot": "board-backdrop",
49
+ className: e("pointer-events-none inset-0 overflow-hidden select-none", u ? "fixed" : "absolute", "[mask-image:radial-gradient(78%_62%_at_50%_45%,transparent_8%,rgba(0,0,0,0.6)_46%,#000_82%)]", "[-webkit-mask-image:radial-gradient(78%_62%_at_50%_45%,transparent_8%,rgba(0,0,0,0.6)_46%,#000_82%)]", d),
50
+ children: /* @__PURE__ */ r("div", {
51
+ className: "absolute inset-0 flex origin-center scale-[1.7] items-center justify-center sm:scale-[1.9]",
52
+ children: /* @__PURE__ */ r("div", {
53
+ className: "flex flex-col gap-[3px] sm:gap-[4px] md:gap-[5px] lg:gap-[6px]",
54
+ children: f.map((n, i) => /* @__PURE__ */ r("div", {
55
+ className: e("board-backdrop-row", i >= c && "hidden sm:block"),
56
+ style: { animationDelay: `${50 + i * 55}ms` },
57
+ children: /* @__PURE__ */ r(t, {
58
+ teaser: n,
59
+ tiles: o,
60
+ size: "md",
61
+ boardType: "black"
62
+ })
63
+ }, `${i}-${n}`))
64
+ })
65
+ })
66
+ });
67
+ }
68
+ //#endregion
69
+ export { c as BoardBackdrop };
70
+
71
+ //# sourceMappingURL=board-backdrop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-backdrop.js","names":[],"sources":["../../../src/components/board/board-backdrop.tsx"],"mappings":";;;;;AAiCA,IAAM,IAAc;CAAC;CAAQ;CAAQ;CAAQ;CAAQ;CAAQ;AAAM;AAUnE,SAAS,EAAI,GAAc;CACzB,IAAI,IAAI,IAAO;CACf,aAAa;EACX,IAAK,IAAI,aAAc;EACvB,IAAI,IAAI,KAAK,KAAK,IAAK,MAAM,IAAK,IAAI,CAAC;EAEvC,OADA,IAAK,IAAI,KAAK,KAAK,IAAK,MAAM,GAAI,KAAK,CAAC,IAAK,KACpC,IAAK,MAAM,QAAS,KAAK;CACpC;AACF;AAGA,SAAS,EAAU,GAAW;CAC5B,OAAO,EAAE,QAAQ,YAAY,GAAG,CAAC,CAAC;AACpC;AASA,SAAS,EAAU,GAAmB,GAAkB,GAAe,GAAwB;CAC7F,IAAM,IAAO,EAAI,CAAI,GACf,IAAgB,CAAC;CACvB,KAAK,IAAI,IAAI,GAAG,IAAI,GAAU,KAAK;EACjC,IAAI,IAAM,IAGN,IAAQ;EACZ,OAAO,EAAU,CAAG,IAAI,KAAS,MAAU,KAGzC,AAFI,EAAK,IAAI,MAAM,KAAO,EAAY,KAAK,MAAM,EAAK,IAAI,EAAY,MAAM,KACvE,KAAO,EAAQ,KAAK,MAAM,EAAK,IAAI,EAAQ,MAAM,IACtD,KAAO,IAAI,OAAO,IAAI,KAAK,MAAM,EAAK,IAAI,CAAC,CAAC;EAG9C,IAAI,IAAM;EACV,KAAK,IAAM,KAAS,EAAI,MAAM,YAAY,KAAK,CAAC,GAAG;GACjD,IAAI,EAAU,IAAM,CAAK,IAAI,GAAO;GACpC,KAAO;EACT;EACA,EAAI,KAAK,CAAG;CACd;CACA,OAAO;AACT;AAmCA,SAAgB,EAAc,EAC5B,YACA,cAAW,IACX,WAAQ,IACR,gBAAa,IACb,UAAO,GACP,WAAQ,IACR,gBACqB;CACrB,IAAM,IAAO,QAAc,EAAU,GAAS,GAAU,GAAO,CAAI,GAAG;EAAC;EAAS;EAAU;EAAO;CAAI,CAAC;CACtG,OACE,kBAAC,OAAD;EACE,eAAY;EACZ,aAAU;EACV,WAAW,EACT,2DACA,IAAQ,UAAU,YAMlB,gGACA,wGACA,CACF;EAOA,UAAA,kBAAC,OAAD;GAAK,WAAU;GAIb,UAAA,kBAAC,OAAD;IAAK,WAAU;IACZ,UAAA,EAAK,KAAK,GAAK,MACd,kBAAC,OAAD;KAEE,WAAW,EAAG,sBAAsB,KAAK,KAAc,iBAAiB;KACxE,OAAO,EAAE,gBAAgB,GAAG,KAAK,IAAI,GAAG,IAAI;KAE5C,UAAA,kBAAC,GAAD;MAAa,QAAQ;MAAY;MAAO,MAAK;MAAK,WAAU;KAAS,CAAA;IAClE,GALE,GAAG,EAAE,GAAG,GAKV,CACN;GACE,CAAA;EACF,CAAA;CACF,CAAA;AAET"}
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { resolveColorCode as e } from "../../lib/board-colors.js";
3
3
  import { BOARD_CHARS as t, EXTRA_CHARS as n, getCharFromToken as r, getCharIndex as i, isColorTile as a, messageToGrid as o, messageToText as s, tokensEqual as c } from "../../lib/board-characters.js";
4
- import { isNoteArray as l, resolveDimensions as u } from "../../lib/board-dimensions.js";
5
- import { gapClasses as d, paddingClasses as f, radiusClasses as p, sizeClasses as ee, textSizeClasses as m } from "../../lib/board-metrics.js";
6
- import { SEAM_CLASS as h, charLeafBoxShadow as te, seamStyle as g } from "./board-surfaces.js";
7
- import { reducedMotionQuery as _, useReducedMotion as v } from "./reduced-motion.js";
8
- import { memo as y, useCallback as b, useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
9
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
4
+ import { gapClasses as l, paddingClasses as u, radiusClasses as d, sizeClasses as f, textSizeClasses as p } from "../../lib/board-metrics.js";
5
+ import { SEAM_CLASS as m, charLeafBoxShadow as ee, seamStyle as h } from "./board-surfaces.js";
6
+ import { isNoteArray as g, resolveDimensions as _ } from "../../lib/board-dimensions.js";
7
+ import { reducedMotionQuery as v, useReducedMotion as y } from "./reduced-motion.js";
8
+ import { memo as b, useCallback as x, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
9
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
10
10
  //#region src/components/board/board-display.tsx
11
- var O = "\n @keyframes flapDown { from { transform: rotateX(0deg); } to { transform: rotateX(-90deg); } }\n @keyframes flapUp { from { transform: rotateX(90deg); } to { transform: rotateX(0deg); } }\n @keyframes flapShadow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }\n ", k = {
11
+ var te = "\n @keyframes flapDown { from { transform: rotateX(0deg); } to { transform: rotateX(-90deg); } }\n @keyframes flapUp { from { transform: rotateX(90deg); } to { transform: rotateX(0deg); } }\n @keyframes flapShadow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }\n ", k = {
12
12
  white: "\n 0 2px 4px rgba(0,0,0,0.2),\n inset 0 1px 2px rgba(0,0,0,0.1),\n inset 0 -1px 2px rgba(255,255,255,0.5),\n inset 1px 0 1px rgba(0,0,0,0.08),\n inset -1px 0 1px rgba(255,255,255,0.4)\n ",
13
13
  black: "\n 0 2px 4px rgba(0,0,0,0.5),\n inset 0 1px 2px rgba(0,0,0,0.8),\n inset 0 -1px 1px rgba(255,255,255,0.08),\n inset 1px 0 1px rgba(0,0,0,0.5),\n inset -1px 0 1px rgba(255,255,255,0.05)\n "
14
14
  }, A = {
@@ -162,48 +162,48 @@ function re(e) {
162
162
  var U = {
163
163
  white: "\n 0 8px 32px rgba(0,0,0,0.12),\n 0 4px 16px rgba(0,0,0,0.08),\n inset 0 1px 2px rgba(255,255,255,0.9),\n inset 0 0 0 1px rgba(255,255,255,0.5)\n ",
164
164
  black: "\n 0 8px 32px rgba(0,0,0,0.6),\n 0 4px 16px rgba(0,0,0,0.4),\n inset 0 1px 1px rgba(255,255,255,0.08),\n inset 0 0 0 1px rgba(255,255,255,0.03)\n "
165
- }, W = y(function({ token: r, size: a, boardType: o }) {
166
- let s = o === "white", c = s ? "var(--color-board-surface-light)" : "var(--color-board-surface-dark)", l = s ? "var(--color-board-text-on-light)" : "var(--color-board-text-on-dark)", u = ee[a], d = m[a], f = p[a], _ = /* @__PURE__ */ E("div", {
167
- className: h,
168
- style: g[o]
165
+ }, W = b(function({ token: r, size: a, boardType: o }) {
166
+ let s = o === "white", c = s ? "var(--color-board-surface-light)" : "var(--color-board-surface-dark)", l = s ? "var(--color-board-text-on-light)" : "var(--color-board-text-on-dark)", u = f[a], g = p[a], _ = d[a], v = /* @__PURE__ */ D("div", {
167
+ className: m,
168
+ style: h[o]
169
169
  });
170
170
  if (r.type === "color") {
171
171
  let t = e(r.code, s), n = a === "sm" ? "3px 1px 4px" : a === "md" ? "4px 2px 5px" : "5px 2px 6px";
172
- return /* @__PURE__ */ D("div", {
173
- className: `${u} relative ${f} overflow-hidden`,
172
+ return /* @__PURE__ */ O("div", {
173
+ className: `${u} relative ${_} overflow-hidden`,
174
174
  style: { backgroundColor: c },
175
- children: [/* @__PURE__ */ E("div", {
176
- className: `absolute ${f}`,
175
+ children: [/* @__PURE__ */ D("div", {
176
+ className: `absolute ${_}`,
177
177
  style: {
178
178
  inset: n,
179
179
  backgroundColor: t,
180
180
  boxShadow: M
181
181
  }
182
- }), _]
182
+ }), v]
183
183
  });
184
184
  }
185
- let v = n[r.value] ? r.value : t[i(r.value)], y = v === " ";
186
- return /* @__PURE__ */ D("div", {
187
- className: `${u} relative ${f} overflow-hidden flex items-center justify-center`,
185
+ let y = n[r.value] ? r.value : t[i(r.value)], b = y === " ";
186
+ return /* @__PURE__ */ O("div", {
187
+ className: `${u} relative ${_} overflow-hidden flex items-center justify-center`,
188
188
  style: {
189
189
  backgroundColor: c,
190
- boxShadow: te[o]
190
+ boxShadow: ee[o]
191
191
  },
192
- children: [!y && /* @__PURE__ */ E("span", {
193
- className: `${d} font-mono font-semibold select-none leading-none`,
192
+ children: [!b && /* @__PURE__ */ D("span", {
193
+ className: `${g} font-mono font-semibold select-none leading-none`,
194
194
  style: { color: r.value === "♥" ? "#eb4034" : l },
195
- children: v
196
- }), _]
195
+ children: y
196
+ }), v]
197
197
  });
198
- }), G = y(function({ row: e, rowIdx: t, size: n, gapClass: i, boardType: a, showSeams: o = !1, isRowSeam: s = !1, seamGap: c = "6px", emitCellMetadata: l = !1 }) {
199
- return /* @__PURE__ */ E("div", {
198
+ }), G = b(function({ row: e, rowIdx: t, size: n, gapClass: i, boardType: a, showSeams: o = !1, isRowSeam: s = !1, seamGap: c = "6px", emitCellMetadata: l = !1 }) {
199
+ return /* @__PURE__ */ D("div", {
200
200
  "data-note-row": "",
201
201
  ...s ? { "data-note-row-seam": "true" } : {},
202
202
  className: `flex ${i} justify-center`,
203
203
  style: s ? { marginTop: c } : void 0,
204
204
  children: e.map((e, i) => {
205
205
  let s = o && i > 0 && i % 15 == 0;
206
- return /* @__PURE__ */ E("div", {
206
+ return /* @__PURE__ */ D("div", {
207
207
  "data-note-tile": "",
208
208
  ...l ? {
209
209
  "data-row": t,
@@ -212,7 +212,7 @@ var U = {
212
212
  } : {},
213
213
  ...s ? { "data-note-col-seam": "true" } : {},
214
214
  style: s ? { marginLeft: c } : void 0,
215
- children: /* @__PURE__ */ E(W, {
215
+ children: /* @__PURE__ */ D(W, {
216
216
  token: e,
217
217
  size: n,
218
218
  boardType: a
@@ -220,15 +220,15 @@ var U = {
220
220
  }, `col-${t}-${i}`);
221
221
  })
222
222
  });
223
- }), K = y(function({ row: e, rowIdx: t, size: n, gapClass: r, boardType: i = "black", isAnimating: a = !1, animationsEnabled: o = !0, flapStepMs: s, showSeams: c = !1, isRowSeam: l = !1, seamGap: u = "6px", emitCellMetadata: d = !1 }) {
224
- return /* @__PURE__ */ E("div", {
223
+ }), K = b(function({ row: e, rowIdx: t, size: n, gapClass: r, boardType: i = "black", isAnimating: a = !1, animationsEnabled: o = !0, flapStepMs: s, showSeams: c = !1, isRowSeam: l = !1, seamGap: u = "6px", emitCellMetadata: d = !1 }) {
224
+ return /* @__PURE__ */ D("div", {
225
225
  "data-note-row": "",
226
226
  ...l ? { "data-note-row-seam": "true" } : {},
227
227
  className: `flex ${r} justify-center`,
228
228
  style: l ? { marginTop: u } : void 0,
229
229
  children: e.map((e, r) => {
230
230
  let l = c && r > 0 && r % 15 == 0;
231
- return /* @__PURE__ */ E("div", {
231
+ return /* @__PURE__ */ D("div", {
232
232
  "data-note-tile": "",
233
233
  ...d ? {
234
234
  "data-row": t,
@@ -236,7 +236,7 @@ var U = {
236
236
  } : {},
237
237
  ...l ? { "data-note-col-seam": "true" } : {},
238
238
  style: l ? { marginLeft: u } : void 0,
239
- children: /* @__PURE__ */ E(X, {
239
+ children: /* @__PURE__ */ D(X, {
240
240
  token: e,
241
241
  size: n,
242
242
  boardType: i,
@@ -262,7 +262,7 @@ function J(e, t) {
262
262
  function Y(e) {
263
263
  e.intervalId !== null && (clearInterval(e.intervalId), e.intervalId = null);
264
264
  }
265
- _?.addEventListener("change", (e) => {
265
+ v?.addEventListener("change", (e) => {
266
266
  for (let [t, n] of q) e.matches ? Y(n) : n.subscribers.size > 0 && J(t, n);
267
267
  });
268
268
  function ie(e, t) {
@@ -272,22 +272,22 @@ function ie(e, t) {
272
272
  intervalId: null
273
273
  }, q.set(e, n));
274
274
  let r = n;
275
- return r.subscribers.add(t), _?.matches || J(e, r), () => {
275
+ return r.subscribers.add(t), v?.matches || J(e, r), () => {
276
276
  r.subscribers.delete(t), r.subscribers.size === 0 && (Y(r), q.delete(e));
277
277
  };
278
278
  }
279
- var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimating: l = !1, animationsEnabled: u = !0, flapStepMs: d, rowIdx: f = 0, colIdx: h = 0 }) {
280
- let _ = u && l, v = c === "white", y = v ? "var(--color-board-surface-light)" : "var(--color-board-surface-dark)", S = v ? "var(--color-board-text-on-light)" : "var(--color-board-text-on-dark)", O = r(o), k = i(O), N = d, P = re(N), [F, I] = w(() => k), [L, V] = w(!1), H = C(F), U = C(!1), W = C(k), G = C(_), K = C(!1), q = C(k);
281
- x(() => {
279
+ var X = b(function({ token: o, size: s = "md", boardType: c = "black", isAnimating: l = !1, animationsEnabled: u = !0, flapStepMs: m, rowIdx: g = 0, colIdx: _ = 0 }) {
280
+ let v = u && l, y = c === "white", b = y ? "var(--color-board-surface-light)" : "var(--color-board-surface-dark)", C = y ? "var(--color-board-text-on-light)" : "var(--color-board-text-on-dark)", te = r(o), k = i(te), N = m, P = re(N), [F, I] = T(() => k), [L, V] = T(!1), H = w(F), U = w(!1), W = w(k), G = w(v), K = w(!1), q = w(k);
281
+ S(() => {
282
282
  q.current = k;
283
283
  }, [k]);
284
- let J = b((e) => {
284
+ let J = x((e) => {
285
285
  H.current = e, I(e);
286
- }, []), Y = b((e) => {
286
+ }, []), Y = x((e) => {
287
287
  U.current = e, V(e);
288
- }, []), X = C(null), ae = C(0), Z = b(() => {
288
+ }, []), X = w(null), ae = w(0), Z = x(() => {
289
289
  X.current !== null && (clearInterval(X.current), X.current = null);
290
- }, []), Q = b(() => {
290
+ }, []), Q = x(() => {
291
291
  let e = W.current, n = H.current, r = () => {
292
292
  Z(), Y(!1), K.current = !1;
293
293
  };
@@ -301,18 +301,18 @@ var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimati
301
301
  J,
302
302
  Y,
303
303
  Z
304
- ]), $ = b((e) => {
304
+ ]), $ = x((e) => {
305
305
  (X.current === null || ae.current !== e) && (Z(), ae.current = e, X.current = setInterval(Q, e));
306
306
  }, [Q, Z]);
307
- x(() => Z, [Z]), x(() => {
307
+ S(() => Z, [Z]), S(() => {
308
308
  let e = G.current;
309
- G.current = _;
309
+ G.current = v;
310
310
  let n = q.current;
311
311
  if (!u) {
312
312
  Z(), Y(!1), J(n), W.current = n, K.current = !1;
313
313
  return;
314
314
  }
315
- if (_) {
315
+ if (v) {
316
316
  Y(!1), Z(), e || J(n);
317
317
  let r = ie(N, () => {
318
318
  J((H.current + 1) % t.length);
@@ -333,7 +333,7 @@ var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimati
333
333
  }
334
334
  U.current || (Z(), H.current !== n && J(n));
335
335
  }, [
336
- _,
336
+ v,
337
337
  N,
338
338
  u,
339
339
  J,
@@ -341,12 +341,12 @@ var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimati
341
341
  $,
342
342
  Q,
343
343
  Z
344
- ]), x(() => {
344
+ ]), S(() => {
345
345
  if (!u) {
346
346
  W.current = k, Z(), Y(!1), J(k);
347
347
  return;
348
348
  }
349
- if (_ || K.current) {
349
+ if (v || K.current) {
350
350
  W.current = k;
351
351
  return;
352
352
  }
@@ -362,7 +362,7 @@ var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimati
362
362
  Y(!0), Q(), U.current && $(N);
363
363
  }, [
364
364
  k,
365
- _,
365
+ v,
366
366
  N,
367
367
  u,
368
368
  J,
@@ -372,23 +372,23 @@ var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimati
372
372
  Z
373
373
  ]);
374
374
  let oe = t[F], se = (F - 1 + t.length) % t.length, ce = t[se];
375
- return /* @__PURE__ */ E(T, { children: /* @__PURE__ */ D("div", {
376
- className: `relative ${ee[s]} ${p[s]} overflow-hidden`,
377
- "data-testid": `char-tile-${f}-${h}`,
375
+ return /* @__PURE__ */ D(E, { children: /* @__PURE__ */ O("div", {
376
+ className: `relative ${f[s]} ${d[s]} overflow-hidden`,
377
+ "data-testid": `char-tile-${g}-${_}`,
378
378
  "data-current-char": oe,
379
- "data-target-char": O,
380
- "data-is-animating": _,
379
+ "data-target-char": te,
380
+ "data-is-animating": v,
381
381
  "data-is-transitioning": L,
382
- style: _ || L ? j[c] : A[c],
382
+ style: v || L ? j[c] : A[c],
383
383
  children: [
384
- !_ && !L && (() => {
384
+ !v && !L && (() => {
385
385
  if (o.type === "color") {
386
- let t = e(o.code, v);
387
- return /* @__PURE__ */ E("div", {
386
+ let t = e(o.code, y);
387
+ return /* @__PURE__ */ D("div", {
388
388
  className: `absolute inset-0 ${s === "sm" ? "[--color-margin-top:3px] [--color-margin-bottom:4px] [--color-margin-h:1px]" : s === "md" ? "[--color-margin-top:3px] sm:[--color-margin-top:4px] md:[--color-margin-top:5px] lg:[--color-margin-top:6px] [--color-margin-bottom:4px] sm:[--color-margin-bottom:6px] md:[--color-margin-bottom:7px] lg:[--color-margin-bottom:8px] [--color-margin-h:1px] sm:[--color-margin-h:2px]" : "[--color-margin-top:4px] sm:[--color-margin-top:5px] md:[--color-margin-top:6px] lg:[--color-margin-top:8px] [--color-margin-bottom:5px] sm:[--color-margin-bottom:7px] md:[--color-margin-bottom:8px] lg:[--color-margin-bottom:10px] [--color-margin-h:2px] md:[--color-margin-h:3px]"} flex items-center justify-center`,
389
389
  style: { zIndex: 2 },
390
- children: /* @__PURE__ */ E("div", {
391
- className: `relative ${p[s]} overflow-hidden`,
390
+ children: /* @__PURE__ */ D("div", {
391
+ className: `relative ${d[s]} overflow-hidden`,
392
392
  style: {
393
393
  marginTop: "var(--color-margin-top)",
394
394
  marginBottom: "var(--color-margin-bottom)",
@@ -402,45 +402,45 @@ var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimati
402
402
  })
403
403
  }, `static-color-${o.code}`);
404
404
  }
405
- let i = r(o), l = n[i] ? i : t[k], u = a(l), d = u ? e(l, v) : y, f = l === "♥" ? "#eb4034" : S;
406
- return /* @__PURE__ */ D("div", {
405
+ let i = r(o), l = n[i] ? i : t[k], u = a(l), f = u ? e(l, y) : b, m = l === "♥" ? "#eb4034" : C;
406
+ return /* @__PURE__ */ O("div", {
407
407
  className: "absolute inset-0 flex items-center justify-center overflow-hidden",
408
408
  style: {
409
409
  zIndex: 2,
410
- backgroundColor: d,
410
+ backgroundColor: f,
411
411
  marginLeft: u ? "-4px" : 0,
412
412
  marginRight: u ? "-4px" : 0,
413
- boxShadow: u ? void 0 : te[c]
413
+ boxShadow: u ? void 0 : ee[c]
414
414
  },
415
415
  children: [
416
- !u && l !== " " && /* @__PURE__ */ E("span", {
417
- className: `${m[s]} font-mono font-semibold select-none leading-none relative z-10`,
418
- style: { color: f },
416
+ !u && l !== " " && /* @__PURE__ */ D("span", {
417
+ className: `${p[s]} font-mono font-semibold select-none leading-none relative z-10`,
418
+ style: { color: m },
419
419
  children: l
420
420
  }),
421
- !u && l === " " && /* @__PURE__ */ E("span", {
422
- className: `${m[s]} font-mono font-semibold select-none leading-none relative z-10`,
421
+ !u && l === " " && /* @__PURE__ */ D("span", {
422
+ className: `${p[s]} font-mono font-semibold select-none leading-none relative z-10`,
423
423
  style: {
424
- color: S,
424
+ color: C,
425
425
  visibility: "hidden"
426
426
  },
427
427
  "aria-hidden": "true",
428
428
  children: " "
429
429
  }),
430
- u && /* @__PURE__ */ E("div", {
431
- className: `absolute inset-0 ${p[s]}`,
430
+ u && /* @__PURE__ */ D("div", {
431
+ className: `absolute inset-0 ${d[s]}`,
432
432
  style: {
433
- backgroundColor: d,
433
+ backgroundColor: f,
434
434
  boxShadow: M
435
435
  }
436
436
  })
437
437
  ]
438
438
  }, `static-char-${k}`);
439
439
  })(),
440
- (_ || L) && (() => {
440
+ (v || L) && (() => {
441
441
  let t = oe, n = (t, n) => {
442
- let r = a(t), i = r ? e(t, v) : y, o = t === "♥";
443
- return /* @__PURE__ */ E("div", {
442
+ let r = a(t), i = r ? e(t, y) : b, o = t === "♥";
443
+ return /* @__PURE__ */ D("div", {
444
444
  style: {
445
445
  position: "absolute",
446
446
  ...n ? { top: 0 } : { bottom: 0 },
@@ -452,96 +452,96 @@ var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimati
452
452
  justifyContent: "center",
453
453
  backgroundColor: i
454
454
  },
455
- children: !r && t !== " " && /* @__PURE__ */ E("span", {
456
- className: `${m[s]} font-mono font-semibold select-none leading-none`,
457
- style: { color: o ? "#eb4034" : S },
455
+ children: !r && t !== " " && /* @__PURE__ */ D("span", {
456
+ className: `${p[s]} font-mono font-semibold select-none leading-none`,
457
+ style: { color: o ? "#eb4034" : C },
458
458
  children: t
459
459
  })
460
460
  });
461
461
  };
462
- return /* @__PURE__ */ D(T, { children: [
463
- /* @__PURE__ */ E("div", {
462
+ return /* @__PURE__ */ O(E, { children: [
463
+ /* @__PURE__ */ D("div", {
464
464
  style: ne,
465
465
  children: n(t, !0)
466
466
  }),
467
- /* @__PURE__ */ E("div", {
467
+ /* @__PURE__ */ D("div", {
468
468
  style: R,
469
469
  children: n(ce, !1)
470
470
  }),
471
- /* @__PURE__ */ D("div", {
471
+ /* @__PURE__ */ O("div", {
472
472
  style: P.topFlap,
473
- children: [n(ce, !0), /* @__PURE__ */ E("div", { style: z })]
473
+ children: [n(ce, !0), /* @__PURE__ */ D("div", { style: z })]
474
474
  }, `ft-${F}`),
475
- /* @__PURE__ */ D("div", {
475
+ /* @__PURE__ */ O("div", {
476
476
  style: P.bottomFlap,
477
- children: [n(t, !1), /* @__PURE__ */ E("div", { style: B[c] })]
477
+ children: [n(t, !1), /* @__PURE__ */ D("div", { style: B[c] })]
478
478
  }, `fb-${F}`),
479
- /* @__PURE__ */ E("div", { style: P.castShadow[c] }, `fs-${F}`),
480
- /* @__PURE__ */ E("div", {
479
+ /* @__PURE__ */ D("div", { style: P.castShadow[c] }, `fs-${F}`),
480
+ /* @__PURE__ */ D("div", {
481
481
  className: "absolute top-1/2 left-0 right-0 h-[2px] pointer-events-none",
482
- style: g[c]
482
+ style: h[c]
483
483
  })
484
484
  ] });
485
485
  })(),
486
- !_ && !L && F === k && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
486
+ !v && !L && F === k && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
487
487
  className: "absolute top-1/2 left-0 right-0 h-[2px] pointer-events-none",
488
- style: g[c]
489
- }), /* @__PURE__ */ E("div", {
488
+ style: h[c]
489
+ }), /* @__PURE__ */ D("div", {
490
490
  className: "absolute inset-0 pointer-events-none",
491
491
  style: {
492
492
  zIndex: 1,
493
- background: v ? "linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%, rgba(0,0,0,0.05) 100%)" : "linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.2) 100%)"
493
+ background: y ? "linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%, rgba(0,0,0,0.05) 100%)" : "linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.2) 100%)"
494
494
  }
495
495
  })] })
496
496
  ]
497
497
  }) });
498
- }, (e, t) => c(e.token, t.token) && e.size === t.size && e.boardType === t.boardType && e.isAnimating === t.isAnimating && e.animationsEnabled === t.animationsEnabled && e.flapStepMs === t.flapStepMs), ae = (e) => `Board display: ${e}`, Z = "Board display", Q = y(function({ message: e, isLoading: t = !1, size: n = "md", className: r = "", boardType: i = "black", deviceType: a = "flagship", isStatic: c = !1, notesWide: p = 1, notesTall: ee = 1, emitCellMetadata: m = !1, animationsEnabled: h = !0, flapSpeed: te = "standard", loadingLabel: g = "Loading board display", emptyLabel: _ = "Empty board display", messageLabel: y = ae, announceUpdates: b = !1 }) {
499
- let x = v(), C = h && !x, T = I(te), k = u(a, p, ee), A = l(a), j = n === "sm" ? "6px" : n === "md" ? "8px" : "10px", M = S(() => o(e ?? "", k.rows, k.cols, a), [
498
+ }, (e, t) => c(e.token, t.token) && e.size === t.size && e.boardType === t.boardType && e.isAnimating === t.isAnimating && e.animationsEnabled === t.animationsEnabled && e.flapStepMs === t.flapStepMs), ae = (e) => `Board display: ${e}`, Z = "Board display", Q = b(function({ message: e, isLoading: t = !1, size: n = "md", className: r = "", boardType: i = "black", deviceType: a = "flagship", isStatic: c = !1, notesWide: d = 1, notesTall: f = 1, emitCellMetadata: p = !1, animationsEnabled: m = !0, flapSpeed: ee = "standard", loadingLabel: h = "Loading board display", emptyLabel: v = "Empty board display", messageLabel: b = ae, announceUpdates: x = !1 }) {
499
+ let S = y(), w = m && !S, E = I(ee), k = _(a, d, f), A = g(a), j = n === "sm" ? "6px" : n === "md" ? "8px" : "10px", M = C(() => o(e ?? "", k.rows, k.cols, a), [
500
500
  e,
501
501
  k.rows,
502
502
  k.cols,
503
503
  a
504
- ]), N = i === "white", P = N ? "var(--color-board-bezel-light)" : "var(--color-board-bezel-dark)", F = N ? "var(--color-board-bezel-border-light)" : "var(--color-board-bezel-border-dark)", L = U[i], ne = n === "sm" ? "rounded-lg border-[3px]" : "rounded-lg sm:rounded-xl border-[3px] sm:border-[4px] lg:border-[5px]", R = S(() => {
505
- if (t) return g;
506
- if (!e) return _;
504
+ ]), N = i === "white", P = N ? "var(--color-board-bezel-light)" : "var(--color-board-bezel-dark)", F = N ? "var(--color-board-bezel-border-light)" : "var(--color-board-bezel-border-dark)", L = U[i], ne = n === "sm" ? "rounded-lg border-[3px]" : "rounded-lg sm:rounded-xl border-[3px] sm:border-[4px] lg:border-[5px]", R = C(() => {
505
+ if (t) return h;
506
+ if (!e) return v;
507
507
  let n = s(e, a);
508
- return n ? y(n) : Z;
508
+ return n ? b(n) : Z;
509
509
  }, [
510
510
  e,
511
511
  a,
512
512
  t,
513
- g,
514
- _,
515
- y
516
- ]), [z, B] = w(() => ({
513
+ h,
514
+ v,
515
+ b
516
+ ]), [z, B] = T(() => ({
517
517
  text: "",
518
518
  of: R,
519
- armed: b
519
+ armed: x
520
520
  }));
521
- return b && !z.armed ? B({
521
+ return x && !z.armed ? B({
522
522
  text: "",
523
523
  of: R,
524
524
  armed: !0
525
- }) : b && !t && z.of !== R && B({
525
+ }) : x && !t && z.of !== R && B({
526
526
  text: R,
527
527
  of: R,
528
528
  armed: !0
529
- }), /* @__PURE__ */ D("div", {
529
+ }), /* @__PURE__ */ O("div", {
530
530
  className: "w-full flex justify-center",
531
531
  children: [
532
- !c && /* @__PURE__ */ E("style", {
532
+ !c && /* @__PURE__ */ D("style", {
533
533
  href: "board-flap-keyframes",
534
534
  precedence: "default",
535
- children: O
535
+ children: te
536
536
  }),
537
- b && /* @__PURE__ */ E("div", {
537
+ x && /* @__PURE__ */ D("div", {
538
538
  className: "sr-only",
539
539
  "aria-live": "polite",
540
540
  "aria-atomic": "true",
541
541
  "data-slot": "board-display-announcer",
542
542
  children: z.text
543
543
  }),
544
- /* @__PURE__ */ E("div", {
544
+ /* @__PURE__ */ D("div", {
545
545
  role: "img",
546
546
  "aria-label": R,
547
547
  "data-slot": "board-display",
@@ -553,37 +553,37 @@ var X = y(function({ token: o, size: s = "md", boardType: c = "black", isAnimati
553
553
  boxShadow: L,
554
554
  width: "fit-content"
555
555
  },
556
- children: /* @__PURE__ */ E("div", {
557
- className: `${f[n]} relative`,
556
+ children: /* @__PURE__ */ D("div", {
557
+ className: `${u[n]} relative`,
558
558
  "aria-hidden": "true",
559
559
  style: { background: N ? "linear-gradient(135deg, var(--color-board-surface-light) 0%, var(--color-board-bezel-border-light) 100%)" : "linear-gradient(135deg, var(--color-board-surface-dark) 0%, var(--color-board-black) 100%)" },
560
- children: /* @__PURE__ */ E("div", {
561
- className: `flex flex-col ${d[n]}`,
560
+ children: /* @__PURE__ */ D("div", {
561
+ className: `flex flex-col ${l[n]}`,
562
562
  children: M.map((e, r) => {
563
563
  let a = A && r > 0 && r % 3 == 0;
564
- return c ? /* @__PURE__ */ E(G, {
564
+ return c ? /* @__PURE__ */ D(G, {
565
565
  row: e,
566
566
  rowIdx: r,
567
567
  size: n,
568
- gapClass: d[n],
568
+ gapClass: l[n],
569
569
  boardType: i,
570
570
  showSeams: A,
571
571
  isRowSeam: a,
572
572
  seamGap: j,
573
- emitCellMetadata: m
574
- }, `row-${r}`) : /* @__PURE__ */ E(K, {
573
+ emitCellMetadata: p
574
+ }, `row-${r}`) : /* @__PURE__ */ D(K, {
575
575
  row: e,
576
576
  rowIdx: r,
577
577
  size: n,
578
- gapClass: d[n],
578
+ gapClass: l[n],
579
579
  boardType: i,
580
580
  isAnimating: t,
581
- animationsEnabled: C,
582
- flapStepMs: T,
581
+ animationsEnabled: w,
582
+ flapStepMs: E,
583
583
  showSeams: A,
584
584
  isRowSeam: a,
585
585
  seamGap: j,
586
- emitCellMetadata: m
586
+ emitCellMetadata: p
587
587
  }, `row-${r}`);
588
588
  })
589
589
  })