@gemboss/ui 0.71.0 → 0.73.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 (75) hide show
  1. package/CHANGELOG.md +377 -2
  2. package/README.md +145 -2
  3. package/catalog/editor.html +1 -1
  4. package/catalog/index.html +3 -3
  5. package/gemboss-ui.css +4 -4
  6. package/package.json +16 -1
  7. package/parts/components.css +3 -3
  8. package/parts/core.css +1 -1
  9. package/parts/shell.css +2 -2
  10. package/src/app-nav.css +1 -1
  11. package/src/assistant/chat-cards.tsx +118 -19
  12. package/src/assistant/chat.tsx +97 -12
  13. package/src/assistant/figures.tsx +119 -0
  14. package/src/assistant/gallery.tsx +67 -0
  15. package/src/assistant/host.tsx +29 -15
  16. package/src/assistant/ideas.tsx +90 -0
  17. package/src/assistant/index.ts +8 -1
  18. package/src/assistant/plus.tsx +61 -0
  19. package/src/assistant-chat.css +1 -1
  20. package/src/assistant-figures.css +1 -0
  21. package/src/assistant-plus.css +1 -0
  22. package/src/assistant.css +1 -1
  23. package/src/board-move.ts +2 -1
  24. package/src/chat-cards-drawn.css +1 -0
  25. package/src/chat-cards-float.css +1 -0
  26. package/src/chat-cards.css +1 -1
  27. package/src/chat-composer-menus.css +1 -1
  28. package/src/chat-composer.css +1 -1
  29. package/src/chat-shortcuts.css +1 -0
  30. package/src/chat-voice.css +1 -1
  31. package/src/chat.css +1 -1
  32. package/src/chips-drawn.css +1 -0
  33. package/src/collections.tsx +4 -2
  34. package/src/dialog.css +1 -1
  35. package/src/editor/choice-cards.tsx +8 -5
  36. package/src/editor/controls.tsx +8 -5
  37. package/src/editor/field-control.tsx +8 -3
  38. package/src/editor/field-spec.ts +12 -3
  39. package/src/editor/index.ts +2 -0
  40. package/src/editor/media-words.ts +21 -0
  41. package/src/editor-empty.css +1 -1
  42. package/src/editor-media.css +1 -1
  43. package/src/editor.css +1 -1
  44. package/src/email-canvas.css +1 -0
  45. package/src/email-card.tsx +44 -0
  46. package/src/email-editor/canvas.tsx +109 -0
  47. package/src/email-editor/editor.tsx +45 -4
  48. package/src/email-editor/index.ts +2 -1
  49. package/src/email-editor/model.ts +9 -1
  50. package/src/email-parts.css +1 -0
  51. package/src/email-parts.tsx +81 -0
  52. package/src/email-thumb.css +1 -0
  53. package/src/email-thumb.tsx +206 -0
  54. package/src/flow-strip.css +1 -0
  55. package/src/flow-strip.tsx +50 -0
  56. package/src/gemboss-field-drawn.css +1 -0
  57. package/src/index.ts +11 -0
  58. package/src/kit-plain.css +1 -1
  59. package/src/kit-plain.js +1 -1
  60. package/src/list-page.tsx +6 -3
  61. package/src/media-card.css +1 -0
  62. package/src/menu-layer.ts +2 -0
  63. package/src/menu-select.css +1 -1
  64. package/src/menu.css +1 -1
  65. package/src/picture-actions.css +1 -0
  66. package/src/picture-actions.tsx +23 -0
  67. package/src/reader-dialog.css +1 -1
  68. package/src/segmented.tsx +6 -0
  69. package/src/settings-dialog.css +1 -1
  70. package/src/sheet.css +1 -1
  71. package/src/shell.css +1 -1
  72. package/src/shell.tsx +9 -2
  73. package/src/stat-tile.css +1 -0
  74. package/src/stat-tile.tsx +39 -0
  75. package/src/ui.css +1 -1
@@ -0,0 +1,109 @@
1
+ "use client";
2
+ /**
3
+ * EmailCanvas (15/11/2026, unreleased): the email editor's stage drawn from the REAL email (canvas NqQGmVzRJMjv536LLbMGaT Q1, Q2; J1 G31).
4
+ * The editor drew the mail itself from its blocks: the store's name where the brand kit has a logo, black buttons where the brand's are
5
+ * green, two columns without their pictures. Only "As sent" was the email. Now the stage IS the email as the sender builds it (GemReach's
6
+ * preview of the unsaved words: the brand kit, the pictures, the footer), and a block is picked on it:
7
+ *
8
+ * - the HTML is drawn in an iframe with `srcdoc` and `sandbox="allow-same-origin"`, NOTHING else: no script of the email runs; the editor
9
+ * reads the frame's own layout (its height, where each block stands) and hears a click on it, which needs the same origin;
10
+ * - each block the sender marked (`data-gr-block="<i>"`, GemReach's preview of unsaved words) can be picked: a click selects it, a link in
11
+ * the email goes nowhere; the picked block is ringed in the accent with its name over its corner and Edit · ↑ · ↓ · Delete at its right,
12
+ * on the block's own box, so a heading's ring never covers the logo above it;
13
+ * - Desktop lays the email out at 640px (its desktop layout; GemReach's turns to one column at 620), Mobile at 390px in a phone's frame (Q2);
14
+ * Dark draws it with the inbox's dark colours (the frame's colour scheme), "As sent" without the picking.
15
+ * While a new build of the words comes back, the last one stays on screen, dimmed a little.
16
+ */
17
+ import "../email-canvas.css";
18
+ import { useEffect, useRef, useState } from "react";
19
+ import type React from "react";
20
+
21
+ export type EmailCanvasDevice = "desktop" | "mobile";
22
+
23
+ /** Where a marked block stands in the frame, in the frame's own pixels. */
24
+ interface Box { i: number; top: number; left: number; width: number; height: number }
25
+
26
+ /** Laid over the email in the frame: a pointer on what can be picked, and a quiet ring on what the mouse is over. */
27
+ export const EMAIL_CANVAS_CSS = "[data-gr-block]{cursor:pointer}[data-gr-block]:hover{outline:1px dashed rgba(86,97,245,.6);outline-offset:-1px}a{cursor:pointer}";
28
+
29
+ export function emailCanvasDoc(html: string, pick: boolean): string {
30
+ if (!pick) return html;
31
+ const style = `<style data-ui-email-canvas>${EMAIL_CANVAS_CSS}</style>`;
32
+ const at = html.search(/<\/head\s*>/i);
33
+ return at >= 0 ? `${html.slice(0, at)}${style}${html.slice(at)}` : `${style}${html}`;
34
+ }
35
+
36
+ export function EmailCanvas({ html, title, device = "desktop", dark = false, pick = true, selected, names, onSelect, onEdit, onMove, onDelete, busy, count }: {
37
+ html: string;
38
+ title: string;
39
+ device?: EmailCanvasDevice;
40
+ dark?: boolean;
41
+ /** False draws it read-only ("As sent"). */
42
+ pick?: boolean;
43
+ /** The picked block's index, as the sender marks it. */
44
+ selected: number | null;
45
+ /** A block's name by index ("Heading + text"), for its tag and its buttons. */
46
+ names: (i: number) => string;
47
+ onSelect: (i: number | null) => void;
48
+ onEdit: (i: number) => void;
49
+ onMove: (from: number, to: number) => void;
50
+ onDelete: (i: number) => void;
51
+ /** A new build is on its way: the last one stays, dimmed. */
52
+ busy?: boolean;
53
+ /** How many blocks the email has (the last cannot move down). */
54
+ count: number;
55
+ }) {
56
+ const frame = useRef<HTMLIFrameElement>(null);
57
+ const [height, setHeight] = useState(480);
58
+ const [boxes, setBoxes] = useState<Box[]>([]);
59
+ const width = device === "mobile" ? 390 : 640;
60
+ const select = useRef(onSelect);
61
+ select.current = onSelect;
62
+
63
+ const read = () => {
64
+ const doc = frame.current?.contentDocument;
65
+ if (!doc?.documentElement) return;
66
+ setHeight(Math.max(120, Math.ceil(doc.documentElement.scrollHeight)));
67
+ setBoxes([...doc.querySelectorAll<HTMLElement>("[data-gr-block]")].map((el) => {
68
+ const r = el.getBoundingClientRect();
69
+ return { i: Number(el.dataset.grBlock), top: r.top, left: r.left, width: r.width, height: r.height };
70
+ }).filter((b) => Number.isInteger(b.i)));
71
+ };
72
+ const onLoad = () => {
73
+ read();
74
+ const doc = frame.current?.contentDocument;
75
+ if (!doc) return;
76
+ // The page hears the email's clicks (same origin, no script inside it): a block is picked; a link in the email goes nowhere.
77
+ doc.addEventListener("click", (e) => {
78
+ e.preventDefault();
79
+ if (!pick) return;
80
+ const hit = (e.target as Element | null)?.closest?.("[data-gr-block]") as HTMLElement | null;
81
+ select.current(hit ? Number(hit.dataset.grBlock) : null);
82
+ });
83
+ // Pictures that arrive after the load move the blocks: read again once they have.
84
+ for (const img of doc.images) if (!img.complete) img.addEventListener("load", read, { once: true });
85
+ };
86
+ useEffect(() => { read(); }, [device]); // eslint-disable-line react-hooks/exhaustive-deps
87
+
88
+ const box = pick && selected !== null ? boxes.find((b) => b.i === selected) ?? null : null;
89
+ const stop = (e: React.SyntheticEvent) => e.stopPropagation();
90
+ return (
91
+ <div className={device === "mobile" ? "gb-emailcanvas is-mobile" : "gb-emailcanvas"} aria-busy={busy ? "true" : undefined}>
92
+ <div className="gb-emailcanvas__mail" style={{ width, height }}>
93
+ <iframe ref={frame} className="gb-emailcanvas__frame" title={title} sandbox="allow-same-origin" srcDoc={emailCanvasDoc(html, pick)} onLoad={onLoad}
94
+ style={{ width, height, colorScheme: dark ? "dark" : "light" }} />
95
+ {box ? (
96
+ <div className="gb-emailcanvas__sel" style={{ top: box.top, left: box.left, width: box.width, height: box.height }} onClick={stop}>
97
+ <span className="gb-emailcanvas__tag">{names(box.i)}</span>
98
+ <span className="gb-emailcanvas__bar" role="group" aria-label={`${names(box.i)}: actions`}>
99
+ <button type="button" className="ui-btn ui-btn--sm" onClick={() => onEdit(box.i)}>Edit</button>
100
+ <button type="button" className="ui-btn ui-btn--sm" aria-label={`Move ${names(box.i)} up`} disabled={box.i === 0} onClick={() => onMove(box.i, box.i - 1)}>↑</button>
101
+ <button type="button" className="ui-btn ui-btn--sm" aria-label={`Move ${names(box.i)} down`} disabled={box.i >= count - 1} onClick={() => onMove(box.i, box.i + 1)}>↓</button>
102
+ <button type="button" className="ui-btn ui-btn--sm gb-emailcanvas__del" onClick={() => onDelete(box.i)}>Delete</button>
103
+ </span>
104
+ </div>
105
+ ) : null}
106
+ </div>
107
+ </div>
108
+ );
109
+ }
@@ -11,6 +11,7 @@
11
11
  // which block, the device, dark, the column's width, the picker.
12
12
  import "../editor.css"; // the column, the fields (gemboss-ec, gemboss-ei-inp) are the editors' own look
13
13
  import "../email-editor.css";
14
+ import "../email-canvas.css"; // the brand row over the blocks; EmailCanvas, the stage drawn from the real email
14
15
  import { useEffect, useId, useMemo, useState } from "react";
15
16
  import type React from "react";
16
17
  import { EditorBack, EditorFrame, EditorSaveState, EditorTopbar, type EditorPane } from "../editor/frame";
@@ -24,8 +25,9 @@ import { Segmented } from "../segmented";
24
25
  import { ToggleBar } from "../toggle-bar";
25
26
  import { StatusList } from "../status-list";
26
27
  import { EmailPreview, type EmailDevice } from "./preview";
28
+ import { EmailCanvas } from "./canvas";
27
29
  import {
28
- ADD_KINDS, BLOCK_HINT, BLOCK_NAME, blockLine, blockTag, checksLine, emailChecks, insertBlock, insertPlace, isPersonalLink, moveBlock,
30
+ ADD_KINDS, BLOCK_HINT, BLOCK_NAME, blockLine, blockTag, checksLine, emailChecks, fillVariables, insertBlock, insertPlace, isPersonalLink, moveBlock,
29
31
  newBlock, PERSONAL_LINK, PERSONAL_LINK_HOURS, PRODUCTS_SOURCE_NAME, removeBlock,
30
32
  type AddKind, type EmailBlock, type EmailBrand, type EmailCheck, type EmailDraft, type EmailPreviewPerson, type EmailPreviewProduct, type ProductsSource,
31
33
  } from "./model";
@@ -71,6 +73,14 @@ export interface EmailEditorProps {
71
73
  sent?: { html: string | null; loading?: boolean; error?: React.ReactNode };
72
74
  /** Where the column's width is remembered in this browser. */
73
75
  widthKey?: string;
76
+ /**
77
+ * "real" (15/11/2026, canvas NqQGmVzRJMjv536LLbMGaT Q1, G31): the stage draws `sent.html` itself, the email as the sender builds it, and a
78
+ * block is picked on it (EmailCanvas: the sender's `data-gr-block` marks). "As sent" then only hides the picking. Without it, or before
79
+ * the first build comes back, the editor draws the mail from its blocks (EmailPreview).
80
+ */
81
+ canvas?: "real";
82
+ /** What the brand kit puts in every email, at the top of Sections (Q1): its logo, its button's colour, and where it is edited. */
83
+ brandRow?: { logo?: string | null; color?: string | null; edit?: { href: string; as?: React.ElementType } };
74
84
  }
75
85
 
76
86
  const SPLIT = { initial: 360, min: 300 };
@@ -129,7 +139,7 @@ const glyph = (k: AddKind) => (
129
139
 
130
140
  export function EmailEditor({
131
141
  draft, onChange, brand, back, chat, people = [], productsFor, opens, checks: serverChecks, saveState = "idle", dirty = false,
132
- onSave, onSendTest, testNote, actions, sent, widthKey = "gb.email-editor.left",
142
+ onSave, onSendTest, testNote, actions, sent, widthKey = "gb.email-editor.left", canvas, brandRow,
133
143
  }: EmailEditorProps) {
134
144
  const [tab, showTab] = useState<Tab>("sections");
135
145
  // Opened once, the chat stays mounted under the other tabs (below): said where the tab changes, never in an effect a render late.
@@ -197,8 +207,17 @@ export function EmailEditor({
197
207
  { id: "settings" as const, label: "Settings" },
198
208
  ];
199
209
 
210
+ const Edit = brandRow?.edit?.as ?? "a";
200
211
  const sections = (
201
212
  <div className="gb-emailed-pane">
213
+ {brandRow ? (
214
+ <div className="gb-emailed-brandrow">
215
+ {brandRow.logo ? <img src={brandRow.logo} alt="" /> : null}
216
+ {brandRow.color ? <span className="gb-emailed-brandrow__swatch" style={{ background: brandRow.color }} aria-hidden="true" /> : null}
217
+ <span className="gb-emailed-brandrow__name">Brand</span>
218
+ {brandRow.edit ? <Edit href={brandRow.edit.href}>Edit</Edit> : null}
219
+ </div>
220
+ ) : null}
202
221
  {adding !== null ? (
203
222
  <div className="gb-emailed-pick">
204
223
  <div className="gb-emailed-pick-head">
@@ -317,7 +336,24 @@ export function EmailEditor({
317
336
  }))} />
318
337
  </div>
319
338
  ) : null}
320
- {asSent && sent ? (
339
+ {canvas === "real" && sent?.html ? <>
340
+ {sent.error ? <p className="gb-emailed-sent-err" role="alert">{sent.error}</p> : null}
341
+ {/* The envelope over the email, as the inbox shows it (Q1); its settings are the email's own, a click away. */}
342
+ <div className={device === "mobile" ? "gb-email-col is-mobile" : "gb-email-col"}>
343
+ <section className="gb-email-env" aria-label="Envelope" role="button" tabIndex={0} aria-pressed={sel === null && tab === "settings"}
344
+ onClick={(e) => { e.stopPropagation(); select(null); }} onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); select(null); } }}>
345
+ <span><span className="gb-email-env-k">From</span> {draft.from.name} &lt;{draft.from.email}&gt;</span>
346
+ <span><span className="gb-email-env-k">Subject</span> <b>{fillVariables(draft.subject, data).text || "No subject yet"}</b></span>
347
+ <span className="gb-email-env-pre">{fillVariables(draft.preheader, data).text || "No preview line yet"}</span>
348
+ </section>
349
+ </div>
350
+ <div onClick={(e) => e.stopPropagation()}>
351
+ <EmailCanvas html={sent.html} title={`${draft.name}, as it is built`} device={device} dark={dark && !asSent} pick={!asSent}
352
+ selected={sel} names={(i) => (body[i] ? BLOCK_NAME[body[i]!.type] : "Block")} count={body.length} busy={sent.loading}
353
+ onSelect={(i) => (i === null ? select(null, null) : select(i, null))} onEdit={(i) => select(i)} onMove={move} onDelete={remove} />
354
+ </div>
355
+ {!asSent ? <button type="button" className="gb-emailed-addend gb-emailed-addmail" onClick={(e) => { e.stopPropagation(); openAdd(body.length); }}>+ Add a block at the end</button> : null}
356
+ </> : asSent && sent ? (
321
357
  // The sender's HTML, read-only: sandboxed with nothing allowed (no script, no forms, not this page's origin).
322
358
  <div className={device === "mobile" ? "gb-emailed-sent is-mobile" : "gb-emailed-sent"} aria-busy={sent.loading ? "true" : undefined}>
323
359
  {sent.error ? <p className="gb-emailed-sent-err" role="alert">{sent.error}</p> : null}
@@ -425,13 +461,18 @@ export function BlockSettings({ b, opens, variables, onPatch }: { b: EmailBlock;
425
461
  </>));
426
462
  break;
427
463
  case "products":
428
- own.push(part("products", "Products", "Products from order cart viewed how many title",
464
+ own.push(part("products", "Products", "Products from order cart viewed how many title shown as list grid cards buttons outlined",
429
465
  <>
430
466
  <Choice id="source" label="Products from" value={b.source} onPick={(v) => p({ source: v as ProductsSource })}
431
467
  options={(["order", "cart", "viewed"] as const).map((v) => ({ value: v, label: PRODUCTS_SOURCE_NAME[v] }))} />
432
468
  <Choice id="count" label="How many" value={String(b.count ?? 2)} onPick={(v) => p({ count: Number(v) })}
433
469
  options={["1", "2", "3", "4"].map((v) => ({ value: v, label: v }))} />
434
470
  <Words spec={{ kind: "text", id: "title", label: "Title above them", placeholder: "None" }} value={b.title ?? ""} onWrite={(v) => p({ title: v || undefined })} />
471
+ {/* gemreach #183: the layout and the buttons' look are kept on the block (a save that dropped them drew a list). */}
472
+ <Choice id="layout" label="Shown as" value={b.layout ?? "list"} onPick={(v) => p({ layout: v === "list" ? undefined : v })}
473
+ options={[{ value: "list", label: "List" }, { value: "grid", label: "Grid" }, { value: "card", label: "Cards" }]} />
474
+ <Choice id="button_style" label="Buttons" value={b.button_style ?? "primary"} onPick={(v) => p({ button_style: v === "secondary" ? "secondary" : undefined })}
475
+ options={[{ value: "primary", label: "Filled" }, { value: "secondary", label: "Outlined" }]} />
435
476
  </>,
436
477
  "Filled for each person when the email is built: what they bought, what is in their cart, or what they looked at."));
437
478
  break;
@@ -5,12 +5,13 @@
5
5
  */
6
6
  export { EmailEditor, type EmailEditorProps } from "./editor";
7
7
  export { EmailPreview, type EmailDevice, type EmailPreviewProps } from "./preview";
8
+ export { EmailCanvas, EMAIL_CANVAS_CSS, emailCanvasDoc, type EmailCanvasDevice } from "./canvas";
8
9
  export {
9
10
  ADD_KINDS, BLOCK_HINT, BLOCK_NAME, BUILT_IN_VARIABLES, GEMREACH_BLOCK_TYPES, PERSONAL_LINK, PERSONAL_LINK_HOURS, PRODUCTS_SOURCE_NAME,
10
11
  PROPOSED_BLOCK_TYPES, REVIEW_LINK,
11
12
  blockLine, blockTag, checksLine, contrast, emailChecks, fillVariables, insertBlock, insertPlace, isPersonalLink, moveBlock, newBlock,
12
13
  removeBlock, stringsOf, usedVariables, variablesIn,
13
14
  type AddKind, type Align, type EmailBlock, type EmailBlockStyle, type EmailBlockType, type EmailBrand, type EmailCheck, type EmailColumn,
14
- type EmailDraft, type EmailPreviewPerson, type EmailPreviewProduct, type GemReachBlock, type ProductsBlock, type ProductsSource,
15
+ type EmailDraft, type EmailPreviewPerson, type EmailPreviewProduct, type GemReachBlock, type ProductsBlock, type ProductsLayout, type ProductsSource,
15
16
  type ReviewBlock, type Spacing,
16
17
  } from "./model";
@@ -54,7 +54,15 @@ export type GemReachBlock = EmailBlockStyle & (
54
54
  export type ProductsSource = "order" | "cart" | "viewed";
55
55
 
56
56
  /** PROPOSED for GemReach (#106): the products of this person's order, cart or views, filled when the mail is built. */
57
- export type ProductsBlock = EmailBlockStyle & { type: "products"; source: ProductsSource; count?: number; title?: string; button?: string; url?: string };
57
+ /** How a products block lays its products out (gemreach #183): one under another (the default, never stored), two to a row, or one card each. */
58
+ export type ProductsLayout = "list" | "grid" | "card";
59
+ export type ProductsBlock = EmailBlockStyle & {
60
+ type: "products"; source: ProductsSource; count?: number; title?: string; button?: string; url?: string;
61
+ /** Left out: "list". GemReach refuses any other value (400 invalid_blocks). */
62
+ layout?: Exclude<ProductsLayout, "list">;
63
+ /** "secondary": each product's button outlined, one filled call to action elsewhere in the email (Quiz result, Win back). */
64
+ button_style?: "secondary";
65
+ };
58
66
  /** PROPOSED for GemReach: the GemReview ask. `url` is the review page signed for the buyer (`{{review_url}}`). */
59
67
  export type ReviewBlock = EmailBlockStyle & { type: "review"; title: string; text?: string; button: string; url: string };
60
68
 
@@ -0,0 +1 @@
1
+ .ui-emailparts{display:flex;flex-direction:column;gap:10px;min-width:0}.ui-emailparts__head{display:flex;align-items:center;gap:8px}.ui-emailparts__title{margin:0;color:var(--ui-text);font-size:14px;line-height:20px;font-weight:650}.ui-emailparts__aside{margin-left:auto;color:var(--ui-text-muted);font-size:var(--ui-fs-caption)}.ui-emailparts__part{position:relative;display:block;width:100%;min-height:40px;overflow:hidden;border-radius:6px;background:#fff;box-shadow:0 0 0 1px var(--ui-border)}.ui-emailparts__part--mark{box-shadow:0 0 0 2px var(--gemboss-warning)}.ui-emailparts__frame{position:absolute;top:0;left:0;display:block;border:0;background:#fff;color-scheme:light;transform-origin:0 0;pointer-events:none}.ui-emailparts__part--wait{height:56px;background:linear-gradient(90deg,var(--ui-surface-2) 25%,var(--ui-border) 37%,var(--ui-surface-2) 63%);background-size:400% 100%;animation:ui-skeleton-sheen 1.4s ease-in-out infinite}.ui-emailparts__part--tall{height:64px}.ui-emailparts__gap{color:var(--ui-text-muted);line-height:8px;text-align:center}.ui-emailparts__note{color:var(--ui-text-muted);font-size:var(--ui-fs-caption);line-height:16px}@media (prefers-reduced-motion: reduce){.ui-emailparts__part--wait{animation:none;background:var(--ui-surface-2)}}
@@ -0,0 +1,81 @@
1
+ "use client";
2
+ /**
3
+ * EmailParts (15/11/2026, unreleased): the email preview panel, what a brand setting puts in EVERY email, read off the real email:
4
+ * its top (the logo or the name) and its foot (the postal address, the unsubscribe links), with "⋯" between. Canvas
5
+ * NqQGmVzRJMjv536LLbMGaT, boards R1 and R2 (GemBoss Settings › Email › Email brand: "In every email · as sent"), so a change to
6
+ * the logo, the button colour or the address is seen as shoppers see it, not described.
7
+ *
8
+ * `html` is one email as sent (GemReach's thumbnail of a store email). Each part is that email in its own sandboxed iframe with
9
+ * every row of its card hidden but the first (`head`) or the last (`foot`), laid out at 600px and scaled to the panel's width.
10
+ * `sandbox="allow-same-origin"` and NOTHING else: no script runs in it; the page reads the part's height once it has drawn, so
11
+ * the box is exactly as tall as the part (an address on two lines). `mark` rings the foot in the warning tone (an address not
12
+ * confirmed yet, R2) and `note` says why under it. Until `html` comes: the kit's skeleton; `null`: the parts are not drawn and
13
+ * `note` says the rest.
14
+ */
15
+ import "./email-parts.css";
16
+ import React, { useState } from "react";
17
+ import { EMAIL_THUMB_FRAME, emailThumbDoc } from "./email-thumb";
18
+
19
+ const cx = (...p: Array<string | false | null | undefined>) => p.filter(Boolean).join(" ");
20
+
21
+ /** A part is laid out at the card's own 600px: GemReach's phone layout (620 and under) only narrows its sides to 20px, which is how
22
+ * the board crops them (R1: the address 11px in from the box's edge at 366px). */
23
+ export const EMAIL_PART_WIDTH = 600;
24
+
25
+ /** GemReach's mail card shown one row at a time: the first row (`head`, its logo in the middle of the box), or the last (`foot`) without its rule above. */
26
+ export const EMAIL_PART_CSS: Record<"head" | "foot", string> = {
27
+ head: ".gr-card>tbody>tr:not(:first-child){display:none!important}.gr-card>tbody>tr:first-child>td{padding-top:20px!important;padding-bottom:20px!important}",
28
+ foot: ".gr-card>tbody>tr:not(:last-child){display:none!important}.gr-card>tbody>tr:last-child>td{border-top:0!important}",
29
+ };
30
+
31
+ function EmailPart({ html, part, label, mark }: { html: string; part: "head" | "foot"; label: string; mark?: boolean }) {
32
+ const [height, setHeight] = useState<number | null>(null);
33
+ const [width, setWidth] = useState<number | null>(null);
34
+ const scale = width ? width / EMAIL_PART_WIDTH : null;
35
+ return (
36
+ <span className={cx("ui-emailparts__part", mark && "ui-emailparts__part--mark")}
37
+ ref={(el) => { if (el && el.clientWidth && el.clientWidth !== width) setWidth(el.clientWidth); }}
38
+ style={height && scale ? { height: Math.ceil(height * scale) } : undefined}>
39
+ <iframe className="ui-emailparts__frame" title={label} sandbox="allow-same-origin" tabIndex={-1}
40
+ srcDoc={emailThumbDoc(html, `${EMAIL_THUMB_FRAME}${EMAIL_PART_CSS[part]}`)}
41
+ style={{ width: EMAIL_PART_WIDTH, height: height ?? 120, ...(scale ? { transform: `scale(${scale})` } : {}) }}
42
+ onLoad={(e) => {
43
+ const doc = e.currentTarget.contentDocument;
44
+ const h = doc?.querySelector(".gr-card")?.getBoundingClientRect().height ?? doc?.documentElement.scrollHeight;
45
+ if (h) setHeight(Math.ceil(h));
46
+ }} />
47
+ </span>
48
+ );
49
+ }
50
+
51
+ export function EmailParts({ html, title = "In every email", aside = "as sent", mark, note, className }: {
52
+ /** One email as sent; undefined while it is asked for; null when it could not be drawn. */
53
+ html: string | null | undefined;
54
+ title?: React.ReactNode;
55
+ aside?: React.ReactNode;
56
+ /** Ring the foot: something in it is not printed yet (R2). */
57
+ mark?: boolean;
58
+ /** One line under the parts. */
59
+ note?: React.ReactNode;
60
+ className?: string;
61
+ }) {
62
+ return (
63
+ <aside className={cx("ui-card ui-emailparts", className)} aria-label={typeof title === "string" ? title : undefined}>
64
+ <div className="ui-emailparts__head"><h2 className="ui-emailparts__title">{title}</h2>{aside ? <span className="ui-emailparts__aside">{aside}</span> : null}</div>
65
+ {html === undefined ? (
66
+ <>
67
+ <span className="ui-emailparts__part ui-emailparts__part--wait" aria-hidden="true" />
68
+ <span className="ui-emailparts__gap" aria-hidden="true">⋯</span>
69
+ <span className="ui-emailparts__part ui-emailparts__part--wait ui-emailparts__part--tall" aria-hidden="true" />
70
+ </>
71
+ ) : html ? (
72
+ <>
73
+ <EmailPart html={html} part="head" label="The top of every email" />
74
+ <span className="ui-emailparts__gap" aria-hidden="true">⋯</span>
75
+ <EmailPart html={html} part="foot" label="The foot of every email" mark={mark} />
76
+ </>
77
+ ) : null}
78
+ {note ? <div className="ui-emailparts__note">{note}</div> : null}
79
+ </aside>
80
+ );
81
+ }
@@ -0,0 +1 @@
1
+ .ui-emailthumb{--ui-emailthumb-scale: .42;position:relative;display:block;width:100%;height:100%;overflow:hidden;background:#fff}.ui-emailthumb--list{--ui-emailthumb-scale: .1446;flex:none;width:96px;height:72px;border-radius:6px;box-shadow:0 0 0 1px var(--ui-border)}.ui-emailthumb--sm{--ui-emailthumb-scale: .0843;flex:none;width:56px;height:42px;border-radius:4px;box-shadow:0 0 0 1px var(--ui-border)}.ui-emailthumb__frame{position:absolute;top:0;left:0;display:block;border:0;background:#fff;color-scheme:light;transform:scale(var(--ui-emailthumb-scale));transform-origin:0 0;pointer-events:none}.ui-emailthumb>.ui-emailthumb__wait{position:absolute;inset:0;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--ui-surface-2) 25%,var(--ui-border) 37%,var(--ui-surface-2) 63%);background-size:400% 100%;animation:ui-skeleton-sheen 1.4s ease-in-out infinite}.ui-emailthumb>.ui-emailthumb__none{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;background:var(--ui-surface-2);color:var(--ui-text-muted)}@media (prefers-reduced-motion: reduce){.ui-emailthumb>.ui-emailthumb__wait{animation:none;background:var(--ui-surface-2)}}.ui-thumbcell{display:flex;align-items:center;gap:12px;min-width:0}.ui-thumbcell__body{display:flex;flex-direction:column;gap:6px;min-width:0}.ui-thumbcell__title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ui-text-muted)}.ui-thumbcell__title>b{font-weight:600;color:var(--ui-text)}.ui-thumbcell__title>b>a{color:inherit;text-decoration:none}.ui-thumbcell__context{color:var(--ui-text-muted)}@media (hover: hover){.ui-thumbcell__title>b>a:hover{text-decoration:underline}}.ui-thumbcell__line{display:block;min-width:0;color:var(--ui-text-muted)}
@@ -0,0 +1,206 @@
1
+ "use client";
2
+ /**
3
+ * EmailThumb (15/11/2026, unreleased): an email shown as itself, small. The HTML the email is sent as (GemReach's thumbnail,
4
+ * `GET /t/v1/templates/:id/thumbnail`: the store's brand kit, a sample person, the marketing footer) is drawn in a sandboxed iframe
5
+ * (`srcdoc`, `sandbox=""`: no script runs, nothing is read back) and scaled down with a CSS transform, cropped to its box. Canvas
6
+ * NqQGmVzRJMjv536LLbMGaT, board L6 option 1 (Chris 15/11/2026, J2 Q9: "an iframe first, a PNG later"); it replaced a drawn
7
+ * envelope that looked the same for every email (G30).
8
+ *
9
+ * Three sizes, one email:
10
+ * - `fill` (the default): the box it is put in, a MediaCard's 4:3 picture (EmailCard), a Stage window;
11
+ * - `list`: 96×72, the picture of a row or a table cell (ResourceItem's `media`, ThumbCell);
12
+ * - `sm`: 56×42, a small row (an overview's "Needs you", a funnel's email panel).
13
+ *
14
+ * The email is laid out at `width` (664 by default) before it is scaled: GemReach's mail is a 600px column that turns into its phone
15
+ * layout at 620 and under (one column, 20px sides), so it is laid out a little wider than itself to look as it does on a computer,
16
+ * with 32px of white on each side. `frameCss` lays it on white from the top of its card (`EMAIL_THUMB_FRAME`), as a card shows it.
17
+ *
18
+ * Lazy: with `load`, nothing is asked until the box comes within 200px of the screen (an IntersectionObserver), and at most four
19
+ * emails are asked at once on a page. `cacheKey` keeps the answer in the page's memory, so the same email in a second place draws at
20
+ * once. Until it draws: the kit's skeleton sheen. An email that does not draw (`load` answers null, or fails): the box stays, an
21
+ * envelope in it, and the card says the rest.
22
+ *
23
+ * The frame is decoration: the card or the row it sits in names the email, so it is out of the tab order and hidden from a screen
24
+ * reader (`title` is still given, as every iframe should have one).
25
+ */
26
+ import "./email-thumb.css";
27
+ import React, { useEffect, useRef, useState } from "react";
28
+ import { Icon } from "./icons";
29
+
30
+ const cx = (...p: Array<string | false | null | undefined>) => p.filter(Boolean).join(" ");
31
+
32
+ export type EmailThumbSize = "fill" | "list" | "sm";
33
+
34
+ /** The width an email is laid out at before it is scaled (see the module's note). */
35
+ export const EMAIL_THUMB_WIDTH = 664;
36
+
37
+ /**
38
+ * GemReach's mail on white, from the top of its card: the grey around the card and the 24px above it go, so the logo sits near the
39
+ * top of the box as a card's picture shows it. The rest of the email is untouched. `:root` light: a thumbnail is the email as most
40
+ * people open it, whatever the admin's own scheme.
41
+ */
42
+ export const EMAIL_THUMB_FRAME =
43
+ ":root{color-scheme:light!important}html,body{margin:0!important;background:#fff!important;overflow:hidden!important}" +
44
+ ".gr-bg{background-color:#fff!important}body>table.gr-bg>tbody>tr>td{padding:0!important}";
45
+
46
+ /** The iframe's document: the email, with `css` laid over it last (just before `</head>`, else at the very top). */
47
+ export function emailThumbDoc(html: string, css: string | null = EMAIL_THUMB_FRAME): string {
48
+ if (!css) return html;
49
+ const style = `<style data-ui-email-thumb>${css}</style>`;
50
+ const at = html.search(/<\/head\s*>/i);
51
+ return at >= 0 ? `${html.slice(0, at)}${style}${html.slice(at)}` : `${style}${html}`;
52
+ }
53
+
54
+ /** How much the email is scaled to fill a box `box` px wide; the frame's own height so it reaches the box's bottom. */
55
+ export function emailThumbFit(box: { width: number; height: number }, width = EMAIL_THUMB_WIDTH): { scale: number; height: number } {
56
+ if (!(box.width > 0) || !(width > 0)) return { scale: 0, height: 0 };
57
+ const scale = box.width / width;
58
+ return { scale, height: Math.ceil((box.height > 0 ? box.height : (box.width * 3) / 4) / scale) };
59
+ }
60
+
61
+ // ── The page's memory, and four asks at a time ──────────────────────────────────────────────────────────────────────────────
62
+
63
+ const KEEP = 200;
64
+ const kept = new Map<string, Promise<string | null>>();
65
+ let running = 0;
66
+ const waiting: Array<() => void> = [];
67
+
68
+ /** At most four emails are asked at once: a gallery of 40 does not send 40 requests in the same tick. */
69
+ function inTurn<T>(work: () => Promise<T>): Promise<T> {
70
+ return new Promise<T>((resolve, reject) => {
71
+ const go = () => {
72
+ running += 1;
73
+ work().then(resolve, reject).finally(() => {
74
+ running -= 1;
75
+ waiting.shift()?.();
76
+ });
77
+ };
78
+ if (running < 4) go();
79
+ else waiting.push(go);
80
+ });
81
+ }
82
+
83
+ /**
84
+ * The email's HTML, asked once per `key` on this page (the newest 200 kept). A failure is not kept: the next box that shows it asks
85
+ * again. Exported for the tests and for a screen that wants to warm a few before they scroll in.
86
+ */
87
+ export function loadEmailThumb(key: string | undefined, load: () => Promise<string | null>): Promise<string | null> {
88
+ if (!key) return inTurn(load);
89
+ const hit = kept.get(key);
90
+ if (hit) {
91
+ kept.delete(key);
92
+ kept.set(key, hit);
93
+ return hit;
94
+ }
95
+ const asked = inTurn(load);
96
+ kept.set(key, asked);
97
+ asked.catch(() => kept.delete(key));
98
+ while (kept.size > KEEP) kept.delete(kept.keys().next().value!);
99
+ return asked;
100
+ }
101
+
102
+ /** Forget the page's emails (tests; a screen that knows every email changed, like a brand kit saved). */
103
+ export function forgetEmailThumbs(): void {
104
+ kept.clear();
105
+ }
106
+
107
+ export interface EmailThumbProps {
108
+ /** The email's HTML. Given, it draws at once (no `load`). */
109
+ html?: string | null;
110
+ /** Asked for the HTML when the box comes near the screen. Null, or a failure, draws the envelope. */
111
+ load?: () => Promise<string | null>;
112
+ /** Names this email in the page's memory (its id and version, or the answer's ETag). */
113
+ cacheKey?: string;
114
+ /** The frame's title (what the email is). */
115
+ title: string;
116
+ size?: EmailThumbSize;
117
+ /** The width the email is laid out at, before it is scaled. */
118
+ width?: number;
119
+ /** Laid over the email last; `null` draws it as sent, grey around the card. */
120
+ frameCss?: string | null;
121
+ className?: string;
122
+ }
123
+
124
+ type State = "idle" | "loading" | "drawing" | "drawn" | "none";
125
+ // Whole class names, never built from a template (the admin's orphan-rule gate reads them).
126
+ const SIZE: Record<EmailThumbSize, string | null> = { fill: null, list: "ui-emailthumb--list", sm: "ui-emailthumb--sm" };
127
+
128
+ export function EmailThumb({ html, load, cacheKey, title, size = "fill", width = EMAIL_THUMB_WIDTH, frameCss = EMAIL_THUMB_FRAME, className }: EmailThumbProps) {
129
+ const box = useRef<HTMLSpanElement>(null);
130
+ const [got, setGot] = useState<string | null | undefined>(html ?? undefined);
131
+ const [state, setState] = useState<State>(html ? "drawing" : html === null && !load ? "none" : "idle");
132
+ const [fit, setFit] = useState<{ scale: number; height: number } | null>(null);
133
+
134
+ // The HTML: given, or asked once the box is near the screen.
135
+ useEffect(() => {
136
+ if (html !== undefined && html !== null) { setGot(html); setState("drawing"); return; }
137
+ if (!load) { setState("none"); return; }
138
+ const el = box.current;
139
+ let gone = false;
140
+ const ask = () => {
141
+ setState("loading");
142
+ loadEmailThumb(cacheKey, load).then(
143
+ (h) => { if (!gone) { setGot(h); setState(h ? "drawing" : "none"); } },
144
+ () => { if (!gone) setState("none"); },
145
+ );
146
+ };
147
+ if (!el || typeof IntersectionObserver === "undefined") { ask(); return () => { gone = true; }; }
148
+ const io = new IntersectionObserver((seen) => {
149
+ if (seen.some((s) => s.isIntersecting)) { io.disconnect(); ask(); }
150
+ }, { rootMargin: "200px" });
151
+ io.observe(el);
152
+ return () => { gone = true; io.disconnect(); };
153
+ // `load` is a new function on every render of the caller: the email is named by `cacheKey` and `html`.
154
+ // eslint-disable-next-line react-hooks/exhaustive-deps
155
+ }, [html, cacheKey]);
156
+
157
+ // The scale, from the box's own size (a card's width follows the grid).
158
+ useEffect(() => {
159
+ const el = box.current;
160
+ if (!el) return;
161
+ const measure = () => setFit(emailThumbFit({ width: el.clientWidth, height: el.clientHeight }, width));
162
+ measure();
163
+ if (typeof ResizeObserver === "undefined") return;
164
+ const ro = new ResizeObserver(measure);
165
+ ro.observe(el);
166
+ return () => ro.disconnect();
167
+ }, [width]);
168
+
169
+ const style = fit && fit.scale > 0 ? ({ "--ui-emailthumb-scale": String(fit.scale) } as React.CSSProperties) : undefined;
170
+ return (
171
+ <span ref={box} className={cx("ui-emailthumb", SIZE[size], className)} data-state={state} style={style}>
172
+ {got && state !== "none" ? (
173
+ <iframe className="ui-emailthumb__frame" title={title} sandbox="" srcDoc={emailThumbDoc(got, frameCss)} tabIndex={-1} aria-hidden="true"
174
+ loading="lazy" style={{ width, height: fit?.height || Math.ceil((width * 3) / 4) }} onLoad={() => setState("drawn")} />
175
+ ) : null}
176
+ {state === "none" ? <span className="ui-emailthumb__none" aria-hidden="true"><Icon name="inbox" size={size === "sm" ? 14 : size === "list" ? 18 : 24} /></span>
177
+ : state !== "drawn" ? <span className="ui-emailthumb__wait" aria-hidden="true" /> : null}
178
+ </span>
179
+ );
180
+ }
181
+
182
+ /**
183
+ * ThumbCell: a table cell or a row's start that holds a picture and words, the kit's table cells holding text only. The picture (an
184
+ * EmailThumb `list`), then the name in bold with its context muted after a middle dot ("Welcome · Whole store"), then one more line
185
+ * under it: a FlowStrip, a subject, a count. Board N2's Flow column.
186
+ */
187
+ export function ThumbCell({ thumb, title, context, children, className }: {
188
+ thumb: React.ReactNode;
189
+ /** The name: a link to the thing when the row opens it. */
190
+ title: React.ReactNode;
191
+ /** Where it runs, what it is for: muted after a middle dot. */
192
+ context?: React.ReactNode;
193
+ /** The second line. */
194
+ children?: React.ReactNode;
195
+ className?: string;
196
+ }) {
197
+ return (
198
+ <span className={cx("ui-thumbcell", className)}>
199
+ {thumb}
200
+ <span className="ui-thumbcell__body">
201
+ <span className="ui-thumbcell__title"><b>{title}</b>{context ? <span className="ui-thumbcell__context"> · {context}</span> : null}</span>
202
+ {children ? <span className="ui-thumbcell__line">{children}</span> : null}
203
+ </span>
204
+ </span>
205
+ );
206
+ }
@@ -0,0 +1 @@
1
+ .ui-flowstrip{display:flex;align-items:center;flex-wrap:nowrap;min-width:0;margin:0;padding:0;list-style:none}.ui-flowstrip__step{position:relative;display:inline-flex;flex:none;align-items:center;gap:4px;height:24px;padding:0 8px;border-radius:999px;background:var(--ui-surface);box-shadow:inset 0 0 0 1px var(--ui-border);color:var(--ui-text);font-size:var(--ui-fs-caption);line-height:16px;white-space:nowrap}.ui-flowstrip__step+.ui-flowstrip__step{margin-left:18px}.ui-flowstrip__step+.ui-flowstrip__step:before{content:"";position:absolute;left:-15px;top:50%;width:12px;height:1px;background:var(--ui-text-muted)}.ui-flowstrip__step+.ui-flowstrip__step:after{content:"";position:absolute;left:-6px;top:calc(50% - 3px);border:3px solid transparent;border-left:4px solid var(--ui-text-muted);border-right-width:0}.ui-flowstrip__step>svg{flex:none}.ui-flowstrip__step--start{background:var(--ui-text);box-shadow:none;color:var(--ui-surface)}.ui-flowstrip__step--wait{background:var(--ui-surface-2)}.ui-flowstrip__step--split{font-weight:450}.ui-flowstrip__step--email{background:var(--gemboss-accent-soft);box-shadow:none;color:var(--gemboss-accent-strong)}.ui-flowstrip__step--more{color:var(--ui-text-muted)}.ui-flowstrip--md .ui-flowstrip__step{height:28px;font-size:var(--ui-fs-body)}.ui-flowstrip--md .ui-flowstrip__step+.ui-flowstrip__step{margin-left:22px}.ui-flowstrip--md .ui-flowstrip__step+.ui-flowstrip__step:before{left:-19px;width:16px}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * FlowStrip (15/11/2026, unreleased): a flow's steps in one row, joined by arrows. Canvas NqQGmVzRJMjv536LLbMGaT, boards N2 (the
3
+ * Email flows table), N3 (a recipe card's foot), U2 (the Ops console's store flows): what starts it, the waits, each email, a split.
4
+ *
5
+ * - `start`: ink, a target, the event ("Checkout", "Signs up");
6
+ * - `wait`: a clock and how long ("1 h", "25 d");
7
+ * - `email`: the accent's soft fill and an envelope; its words are for a screen reader (the row shows the email's picture);
8
+ * - `split`: white, the sliders, the question ("Ordered?").
9
+ * `max` keeps the first steps and ends in "+N" (a card's foot holds three). `md` is a size up, for a page about one flow.
10
+ *
11
+ * An ordered list, named by `label`. Server-renderable; no colour of its own (tokens).
12
+ */
13
+ import "./flow-strip.css";
14
+ import React from "react";
15
+ import { Icon, type IconName } from "./icons";
16
+
17
+ const cx = (...p: Array<string | false | null | undefined>) => p.filter(Boolean).join(" ");
18
+
19
+ export type FlowStepKind = "start" | "wait" | "email" | "split";
20
+ export interface FlowStep { kind: FlowStepKind; label: string }
21
+
22
+ const ICON: Record<FlowStepKind, IconName> = { start: "target", wait: "clock", email: "inbox", split: "sliders" };
23
+ // Whole class names, never built from a template: a class written out is one grep (and the admin's orphan-rule gate) can find.
24
+ const STEP: Record<FlowStepKind, string> = {
25
+ start: "ui-flowstrip__step ui-flowstrip__step--start", wait: "ui-flowstrip__step ui-flowstrip__step--wait",
26
+ email: "ui-flowstrip__step ui-flowstrip__step--email", split: "ui-flowstrip__step ui-flowstrip__step--split",
27
+ };
28
+
29
+ export function FlowStrip({ steps, size = "sm", max, label = "Steps", className }: {
30
+ steps: readonly FlowStep[];
31
+ size?: "sm" | "md";
32
+ /** At most this many steps, then "+N". */
33
+ max?: number;
34
+ label?: string;
35
+ className?: string;
36
+ }) {
37
+ const shown = max && max > 0 && steps.length > max ? steps.slice(0, max) : steps;
38
+ const more = steps.length - shown.length;
39
+ return (
40
+ <ol className={cx("ui-flowstrip", size === "md" && "ui-flowstrip--md", className)} aria-label={label}>
41
+ {shown.map((s, i) => (
42
+ <li key={i} className={STEP[s.kind]}>
43
+ <Icon name={ICON[s.kind]} size={size === "md" ? 16 : 14} />
44
+ {s.kind === "email" ? <span className="ui-sr-only">{s.label}</span> : <span>{s.label}</span>}
45
+ </li>
46
+ ))}
47
+ {more > 0 ? <li className="ui-flowstrip__step ui-flowstrip__step--more"><span aria-hidden="true">+{more}</span><span className="ui-sr-only">{more} more {more === 1 ? "step" : "steps"}</span></li> : null}
48
+ </ol>
49
+ );
50
+ }
@@ -0,0 +1 @@
1
+ @media (pointer: coarse),(max-width: 47.9975em){.gemboss-field--group:not(:has([type=color]),.gemboss-ei-color-group){--gemboss-field-drawn-inset: 4px;position:relative;isolation:isolate;overflow:visible;-webkit-background-clip:text!important;background-clip:text!important;border-image:linear-gradient(#0000,#0000)!important}.gemboss-field--group:not(:has([type=color]),.gemboss-ei-color-group):before{content:"";position:absolute;inset:calc(var(--gemboss-field-drawn-inset) - 1px) -1px;z-index:-1;box-sizing:border-box;pointer-events:none;background:inherit;-webkit-background-clip:border-box;background-clip:border-box;border-width:inherit;border-style:inherit;border-color:inherit;border-image:none;border-radius:inherit}.gemboss-field--group:not(:has([type=color]),.gemboss-ei-color-group):focus-within{outline:none}.gemboss-field--group:not(:has([type=color]),.gemboss-ei-color-group):focus-within:before{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px}}@media (pointer: coarse) and (min-width: 48em){.gemboss-field--group:not(:has([type=color]),.gemboss-ei-color-group){--gemboss-field-drawn-inset: 6px}}
package/src/index.ts CHANGED
@@ -116,6 +116,14 @@ export { JobCard, JOB_CARD_LABELS, jobProgressShare, jobStepWindow, type JobCard
116
116
  export { VersionPair, VersionBlank, MomentPicture, Figure, type VersionPairProps, type MomentMark, type MomentPictureProps, type FigureProps, type FigureTone } from "./versions";
117
117
  // The core notice on one line with its one action (GemX board ubl-AB-6p, Funnels › Personalize's nudge).
118
118
  export { Notice, type NoticeProps } from "./notice";
119
+ // GemBoss Reach's emails as themselves (canvas NqQGmVzRJMjv536LLbMGaT, 15/11/2026): the real email in a card, a row, a cell; a flow's
120
+ // steps; a home page's numbers; the top and foot every email carries. GemReach's Ops console draws the same.
121
+ export { EmailThumb, ThumbCell, emailThumbDoc, emailThumbFit, loadEmailThumb, forgetEmailThumbs, EMAIL_THUMB_FRAME, EMAIL_THUMB_WIDTH, type EmailThumbProps, type EmailThumbSize } from "./email-thumb";
122
+ export { EmailCard, type EmailCardProps } from "./email-card";
123
+ export { PictureActions } from "./picture-actions";
124
+ export { FlowStrip, type FlowStep, type FlowStepKind } from "./flow-strip";
125
+ export { StatTile, StatTiles } from "./stat-tile";
126
+ export { EmailParts, EMAIL_PART_CSS, EMAIL_PART_WIDTH } from "./email-parts";
119
127
  // A section's own nav beside the rail folded to its icons (0.62.0, canvas Hsou4RYo… direction A): its own module and entry, which bring
120
128
  // rail-mini.css too, so the admin's first load carries neither.
121
129
  export {
@@ -150,3 +158,6 @@ export {
150
158
  type PeoplePanelProps, type PersonRowProps, type Presence, type TeamChatLabels, type TeamChatPanel, type TeamChatProps, type TeamChatView, type ThreadPanelProps,
151
159
  } from "./team-chat";
152
160
  export { chatDayISO, chatDayKey, chatDayWord, teamChatRows, type ChatRow, type ChatRowMessage, type ChatRowOptions } from "./team-chat-data";
161
+
162
+ // The kit's "this layer consumes Escape" (keydown and the keyup a Polaris Modal closes on), for app layers that act on Escape.
163
+ export { consumeEscape } from "./escape";