@gemboss/ui 0.64.0 → 0.66.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 (50) hide show
  1. package/CHANGELOG.md +213 -1
  2. package/README.md +67 -5
  3. package/catalog/editor.html +21 -13
  4. package/catalog/index.html +4 -4
  5. package/gemboss-ui.css +3 -3
  6. package/package.json +8 -1
  7. package/parts/components.css +2 -2
  8. package/parts/core.css +1 -1
  9. package/parts/shell.css +1 -1
  10. package/src/auth.tsx +1 -15
  11. package/src/confirm-buttons.ts +35 -0
  12. package/src/confirm-dialog.css +1 -0
  13. package/src/confirm-dialog.tsx +124 -0
  14. package/src/create-shell.css +1 -1
  15. package/src/create-shell.tsx +7 -4
  16. package/src/dialog.css +1 -0
  17. package/src/dialog.tsx +46 -7
  18. package/src/editor/color-choices.ts +9 -0
  19. package/src/editor/controls.tsx +59 -19
  20. package/src/editor/field-control.tsx +456 -0
  21. package/src/editor/field-frame.tsx +192 -0
  22. package/src/editor/field-spec.ts +346 -0
  23. package/src/editor/index.ts +20 -2
  24. package/src/editor/label-side.ts +9 -3
  25. package/src/editor/panel.tsx +39 -12
  26. package/src/editor/secret-field.tsx +116 -0
  27. package/src/editor-color.css +1 -1
  28. package/src/editor-plain.js +1 -1
  29. package/src/editor.css +1 -1
  30. package/src/email-editor/editor.tsx +37 -9
  31. package/src/email-editor/model.ts +5 -1
  32. package/src/email-editor.css +1 -1
  33. package/src/eye-icon.tsx +14 -0
  34. package/src/gem-at-work.css +1 -1
  35. package/src/gem-at-work.ts +223 -11
  36. package/src/gemboss-field.css +1 -1
  37. package/src/icons-plain.js +1 -0
  38. package/src/icons.tsx +9 -0
  39. package/src/index.ts +4 -1
  40. package/src/kit-plain.css +1 -1
  41. package/src/list-page.css +1 -1
  42. package/src/list-page.tsx +181 -55
  43. package/src/list-toolbar.css +1 -0
  44. package/src/list-toolbar.tsx +85 -0
  45. package/src/menu-keys.ts +3 -1
  46. package/src/search-dialog.tsx +4 -1
  47. package/src/segmented.tsx +21 -5
  48. package/src/service-switcher.tsx +2 -2
  49. package/src/settings-dialog.tsx +2 -2
  50. package/src/ui.css +1 -1
@@ -0,0 +1,192 @@
1
+ "use client";
2
+ // A SCHEMA FORM IN THE SETTINGS FRAME (one settings frame slice 1, 06/11/2026; Chris: three settings frames, "sao không chuẩn hoá"; moved from
3
+ // the admin's components/shell/FieldFrame.tsx, 08/11/2026). The element panel's frame is the standard (InspectorFrame): a search, the index
4
+ // Look · Layout · Visibility · Code, group titles, and a group that holds nothing as a + line, a chip in Look. A schema is drawn here, each
5
+ // field where the element panel puts the same setting (field-spec.ts frameGroups). The controls are FieldRows' and every field keeps its
6
+ // stored key and its write: + shows a group and writes nothing, − writes each of its fields cleared (field-spec.ts knobClearWrites).
7
+ //
8
+ // A SEARCH IS SHOWN IN PLACE: what the words do not find is hidden, nothing is drawn again. A host's own parts (a section's words, its
9
+ // options, who it is for) may read their fields from a server; drawn again, they read again and their controls are chosen again (a long
10
+ // heading turned into a text area). A part is found by its fields' labels as drawn (what the seller reads), set or not.
11
+ import "../editor.css"; // the frame's groups and the rows' fields are editor.css's
12
+ import "../editor-inspector-frame.css"; // the frame (InspectorFrame brings it too); a search reads its open heads by their class
13
+ import { useEffect, useLayoutEffect, useMemo, useRef, useState, type MouseEvent, type ReactNode } from "react";
14
+ import { InspectorChips } from "./chips";
15
+ import { FieldRows, useFieldKinds, type FieldGlyphs, type FieldKinds, type FieldRowsProps } from "./field-control";
16
+ import {
17
+ foundGroups, frameGroups, groupClearable, groupHolds, groupState, knobClearWrites, knobHolds, knobValue, settingMatches,
18
+ type FieldSchema, type FrameCluster, type FrameGroup, type FramePlaces,
19
+ } from "./field-spec";
20
+ import { InspectorFrame, InspectorFrameGroup, InspectorFramePart, InspectorSearch } from "./inspector-frame";
21
+
22
+ /** A part of the panel that is not a schema group (a section's words, its own options, the product it sells, who it is for): drawn first
23
+ * in its cluster, as an element's own groups are. `words`: its name, which a search finds it by besides its fields' labels. */
24
+ export type FramePart = { key: string; words: string; node: ReactNode };
25
+
26
+ /** What a part's fields are named by, as drawn: a search reads these, not the keys a section happens to hold. */
27
+ const LABELS = "label, .gemboss-ei-lbl, .gemboss-ei-openhead, [role=heading], legend";
28
+ // A layout effect in the browser; on a server render (a gate's static markup) there is no search to read.
29
+ const useBrowserLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
30
+
31
+ /**
32
+ * THE PARTS A SEARCH FINDS: by their name or by a field's label as drawn (what the seller reads, set or not), read again while it is open
33
+ * (a part's fields arrive when its read answers). `partRef(key)` goes on each part's element (InspectorFramePart `partRef`). Shared by
34
+ * FieldFrame and a host's own frame (the admin's element panel draws a section built from elements' parts on its root).
35
+ */
36
+ export function usePartHits(parts: readonly FramePart[], q: string): { hits: ReadonlySet<string>; partRef: (key: string) => (el: HTMLDivElement | null) => void } {
37
+ const partEls = useRef(new Map<string, HTMLDivElement>());
38
+ const [hits, setHits] = useState<ReadonlySet<string>>(() => new Set());
39
+ const partKeys = parts.map((p) => `${p.key}\u0000${p.words}`).join("\u0001");
40
+ useBrowserLayoutEffect(() => {
41
+ if (!q) return undefined;
42
+ const read = () => {
43
+ const next = new Set<string>();
44
+ for (const p of parts) {
45
+ const el = partEls.current.get(p.key);
46
+ // Not a sample a part shows (a widget's preview: its own headings and labels are no setting's): `data-search-skip`.
47
+ const labels = el ? [...el.querySelectorAll(LABELS)].filter((n) => !n.closest("[data-search-skip]")).map((n) => n.textContent ?? "") : [];
48
+ if ([p.words, ...labels].some((t) => settingMatches(q, t))) next.add(p.key);
49
+ }
50
+ setHits((h) => (h.size === next.size && [...next].every((k) => h.has(k)) ? h : next));
51
+ };
52
+ read();
53
+ const watch = new MutationObserver(read);
54
+ for (const el of partEls.current.values()) watch.observe(el, { childList: true, subtree: true, characterData: true });
55
+ return () => watch.disconnect();
56
+ // `parts` by their keys and words: a new array each render is the same parts.
57
+ }, [q, partKeys]);
58
+ const partRef = (key: string) => (el: HTMLDivElement | null) => { if (el) partEls.current.set(key, el); else partEls.current.delete(key); };
59
+ return { hits, partRef };
60
+ }
61
+
62
+ export type FieldFrameProps = FieldRowsProps & {
63
+ schema: FieldSchema;
64
+ /** Several fields at once, as ONE write: a group's − clears each of its rows. Each host writes them together (one save, one preview from
65
+ * the end state, busy until it answers); one by one, a host composing each write from the same state lost all but the last. A row's own
66
+ * change is `onChange`. */
67
+ onChangeMany: (entries: ReadonlyArray<readonly [string, unknown]>) => void;
68
+ /** Above the first cluster: what governs what is under it (a write held or not saved, the knobs a section's own settings set now). Drawn
69
+ * while searching too. */
70
+ lead?: ReactNode;
71
+ /** The host's own parts, first in Look. */
72
+ own?: readonly FramePart[];
73
+ /** The host's parts after every one of the schema's groups in Look, its own and its shared ones' chips (Global styles: its form set,
74
+ * product cards and bundle picker after its colours and type). */
75
+ after?: readonly FramePart[];
76
+ /** Who sees it besides its screens (an audience), first in Visibility. */
77
+ who?: readonly FramePart[];
78
+ /** Parts first in Layout (a theme part's spacing with its screen switch, a theme section's arrangement), and in Code (custom CSS). */
79
+ place?: readonly FramePart[];
80
+ code?: readonly FramePart[];
81
+ /** The values the screen edited sets itself, where `values` shows what it inherits too (Tablet / Mobile). A group is added, and its −
82
+ * clears, by these; one that only inherits shows its rows and says where they come from, with no − (it would write an empty value over
83
+ * nothing and change nothing). Absent: `values`. */
84
+ heldHere?: Record<string, unknown>;
85
+ /** Where an inherited value comes from ("Desktop"). */
86
+ inheritedFrom?: string;
87
+ /** Which fields are placed by id, and where (field-spec.ts `STYLE_FRAME_PLACES` by default). */
88
+ places?: FramePlaces;
89
+ /** A host's own name for a cluster, where the kit's (Look · Layout · Visibility · Code) would say the wrong thing: a plugin's Behavior
90
+ * settings in the cluster after its Look. */
91
+ labels?: FrameClusterLabels;
92
+ };
93
+
94
+ /** The clusters' names a host gives them (InspectorFrame's `label`), by cluster. */
95
+ export type FrameClusterLabels = Partial<Record<"look" | "place" | "when" | "code", string>>;
96
+
97
+ export function FieldFrame({ schema, lead, own = [], after = [], who = [], place: placeParts = [], code: codeParts = [], heldHere, inheritedFrom, onChangeMany, places, labels, ...rows }: FieldFrameProps) {
98
+ const { values, disabled } = rows;
99
+ // The app's kinds, by prop or FieldKindsProvider: a kind over several settings holds and clears by its own rule.
100
+ const { kinds } = useFieldKinds(rows.kinds, rows.glyphs);
101
+ const here = heldHere ?? values;
102
+ const groups = useMemo(() => frameGroups(schema, "", places), [schema, places]);
103
+ const [query, setQuery] = useState("");
104
+ const q = query.trim();
105
+ // The + groups shown with nothing in them (+ writes nothing here), until their − or until the panel closes.
106
+ const [shown, setShown] = useState<ReadonlySet<string>>(() => new Set());
107
+ // Where the focus goes after + or − (the button pressed is gone): the group's −, or its + line again. Kept for a moment: after − the
108
+ // group is a + line once the host's write lands (it may be async), not in the render the press makes.
109
+ const focusNext = useRef<{ root: Element; sel: string; until: number } | null>(null);
110
+ useEffect(() => {
111
+ const f = focusNext.current;
112
+ if (!f) return;
113
+ const at = f.root.querySelector<HTMLElement>(f.sel);
114
+ if (at) { focusNext.current = null; at.focus(); } else if (Date.now() > f.until) focusNext.current = null;
115
+ });
116
+ const parts = [...own, ...after, ...placeParts, ...who, ...codeParts];
117
+ const { hits, partRef } = usePartHits(parts, q);
118
+ const found = useMemo(() => (q ? new Map(foundGroups(groups, q).map((g) => [g.key, g])) : null), [groups, q]);
119
+ const rowsOf = (g: FrameGroup) => (
120
+ <>
121
+ <FieldRows fields={g.fields} {...rows} />
122
+ {g.hint ? <p className="gemboss-ei-hint">{g.hint}</p> : null}
123
+ </>
124
+ );
125
+ const add = (g: FrameGroup) => (e: MouseEvent<HTMLButtonElement>) => {
126
+ const root = e.currentTarget.closest("[data-settings-frame]");
127
+ focusNext.current = root ? { root, sel: `[data-remove-group="${g.key}"]`, until: Date.now() + 3000 } : null;
128
+ setShown((s) => new Set(s).add(g.key));
129
+ };
130
+ const remove = (g: FrameGroup) => (e: MouseEvent<HTMLButtonElement>) => {
131
+ const root = e.currentTarget.closest("[data-settings-frame]");
132
+ focusNext.current = root ? { root, sel: `[data-add-group="${g.key}"] button`, until: Date.now() + 3000 } : null;
133
+ const cleared = g.fields.filter((f) => knobHolds(f, knobValue(f, here, kinds), kinds)).flatMap((f) => knobClearWrites(f, here, kinds));
134
+ if (cleared.length) onChangeMany(cleared);
135
+ setShown((s) => { const next = new Set(s); next.delete(g.key); return next; });
136
+ };
137
+ const draw = (g: FrameGroup, chip = false) => {
138
+ if (found) {
139
+ // Searching: a group the words find is open with the fields they find, every other one not drawn.
140
+ const hit = found.get(g.key);
141
+ return hit ? <InspectorFrameGroup key={g.key} groupKey={g.key} state="open" title={g.title}>{rowsOf(hit)}</InspectorFrameGroup> : null;
142
+ }
143
+ // One component in the three states, so a group that is added stays the same element where it was (the focus kept in it).
144
+ const holdsHere = groupHolds(g, here, kinds);
145
+ const inherits = !holdsHere && groupHolds(g, values, kinds);
146
+ const state = inherits && g.way === "add" ? "added" : groupState(g, here, shown, kinds);
147
+ // A − where it takes something off on this screen (never a text the seller wrote: groupClearable), or where + showed it with nothing.
148
+ const removable = holdsHere ? groupClearable(g) : !inherits && shown.has(g.key);
149
+ return (
150
+ <InspectorFrameGroup key={g.key} groupKey={g.key} state={state} title={g.title} disabled={disabled} chip={chip && state === "add"} onAdd={add(g)}
151
+ note={inherits && inheritedFrom ? `from ${inheritedFrom}` : undefined}
152
+ remove={removable ? { label: `Remove ${g.title.toLowerCase()}`, onRemove: remove(g) } : null}>
153
+ {state === "add" ? null : rowsOf(g)}
154
+ </InspectorFrameGroup>
155
+ );
156
+ };
157
+ const part = (p: FramePart) => (
158
+ <InspectorFramePart key={p.key} partKey={p.key} hidden={!!q && !hits.has(p.key)}
159
+ partRef={partRef(p.key)}>{p.node}</InspectorFramePart>
160
+ );
161
+ const of = (c: FrameCluster) => groups.filter((g) => g.cluster === c);
162
+ const look = of("look");
163
+ // The look's shared groups are one run where a + line is a chip (InspectorChips, Control UI C32 slice 3).
164
+ const firstShared = look.findIndex((g) => !g.own);
165
+ const ownLook = firstShared < 0 ? look : look.slice(0, firstShared);
166
+ const sharedLook = firstShared < 0 ? [] : look.slice(firstShared);
167
+ const place = of("place");
168
+ const when = of("when");
169
+ const code = of("code");
170
+ const nothing = !!q && !hits.size && !(found?.size);
171
+ return (
172
+ <InspectorFrame search={<InspectorSearch value={query} onChange={setQuery} name="section-setting-search" />} searching={!!q}
173
+ lead={<>{lead}{nothing ? <p className="gemboss-ei-hint" data-find-none="">No setting matches “{q}”.</p> : null}</>}
174
+ clusters={[
175
+ { id: "look", label: labels?.look, on: own.length + look.length + after.length > 0, content: <>{own.map(part)}{ownLook.map((g) => draw(g))}
176
+ {sharedLook.length ? <InspectorChips attrs={{ "data-look-chips": "" }}>{sharedLook.map((g) => draw(g, true))}</InspectorChips> : null}{after.map(part)}</> },
177
+ { id: "place", label: labels?.place, on: placeParts.length + place.length > 0, content: <>{placeParts.map(part)}{place.map((g) => draw(g))}</> },
178
+ { id: "when", label: labels?.when, on: who.length + when.length > 0, content: <>{who.map(part)}{when.map((g) => draw(g))}</> },
179
+ { id: "code", label: labels?.code, on: codeParts.length + code.length > 0, content: <>{codeParts.map(part)}{code.map((g) => draw(g))}</> },
180
+ ]} />
181
+ );
182
+ }
183
+
184
+ const NO_SCHEMA: FieldSchema = [];
185
+ const NO_VALUES: Record<string, unknown> = {};
186
+ const noop = () => {};
187
+ /** A panel of parts only, in the frame (a plugin's settings, the store's header and footer): the frame, its search and its index around
188
+ * groups a host draws itself with the kit's controls, no schema of its own. */
189
+ export function PartsFrame({ lead, own, place, who, code, labels, kinds, glyphs }: { lead?: ReactNode; own?: readonly FramePart[]; place?: readonly FramePart[]; who?: readonly FramePart[]; code?: readonly FramePart[]; labels?: FrameClusterLabels; kinds?: FieldKinds; glyphs?: FieldGlyphs }) {
190
+ return <FieldFrame schema={NO_SCHEMA} values={NO_VALUES} onChange={noop} onChangeMany={noop} lead={lead} own={own} place={place} who={who} code={code} labels={labels} kinds={kinds} glyphs={glyphs} />;
191
+ }
192
+
@@ -0,0 +1,346 @@
1
+ // A SETTINGS SCHEMA, AS DATA (08/11/2026, one control set: Chris "các control phải có bộ control và kiểu có sự tái sử dụng dùng chung
2
+ // shared component… đừng mỗi cho mỗi kiểu"). What a settings form is made of: a field per setting (`FieldSpec`), its kind deciding the
3
+ // control it is drawn with (field-control.tsx), the control deciding the side of its label (label-side.ts). Moved from the admin
4
+ // (apps/admin: components/shell/FieldRenderer.tsx, lib/held-knobs.ts, lib/element-seam-fields.ts) so every app draws a schema with the
5
+ // same controls, the admin's editors and GemReach's email editor alike.
6
+ //
7
+ // THE KIT'S KINDS are the ones its parts draw (text, textarea, number, range, select, segmented, toggle, color, image, repeater). An app
8
+ // adds kinds of its own (the admin's value presets, date, link, edges, screens, font) as RULES here (`FieldKindRules`: the control it is
9
+ // drawn with, and for a kind over several stored settings how it reads and writes them) and as a drawing in field-control.tsx
10
+ // (`FieldKinds`). A kind no one draws is drawn as a visible "no control" line, never as a text box that seems to work.
11
+ //
12
+ // No React and no RUNTIME import of another module here, only `import type` (erased): a node test reads this file as it is, with no bundler
13
+ // to find an extensionless `./x`. The label's side, which needs the table's values (label-side.ts), is field-control.tsx's `controlOf`. The settings frame's groups and its search are here too.
14
+ import type { FieldControlKind } from "./label-side";
15
+
16
+ /** "content_spacing" → "Content spacing"; "H2" → "H2": the words a field or a choice with no label of its own is drawn with. */
17
+ export function labelize(s: string): string {
18
+ const t = s.replace(/[_-]+/g, " ").trim();
19
+ return t.charAt(0).toUpperCase() + t.slice(1);
20
+ }
21
+
22
+ /** One choice of a select or of chips. `glyph`: drawn as that picture (an app's `glyphs`), its `label` its name (aria and tooltip).
23
+ * `name`: what a short label stands for, announced and in its tooltip (a shadow's "S" is "Subtle"). `G`: the glyph names an app
24
+ * draws, so a typo is a type error there. */
25
+ export type SelectOption<G extends string = string> = { value: string; label?: string; glyph?: G; name?: string };
26
+
27
+ /** One field of a kind the kit draws. `id` keys into the flat `values` object the host owns. */
28
+ export type FieldSpec<G extends string = string> =
29
+ // `maxLength`: the box holds no more, and its count stays in sight. `prefix`: what comes before the value, inside the box (a
30
+ // page's "/pages/").
31
+ | { kind: "text"; id: string; label?: string; placeholder?: string; hint?: string; maxLength?: number; prefix?: string;
32
+ /** The box's own type where it says what it holds: a link (`url`: the phone's link keyboard), a search (`search`: the browser's clear
33
+ * button where it draws one, and Enter keeps the focus in it), an email, a day (`date`: the browser's own date picker, its value
34
+ * YYYY-MM-DD). Default a plain text box. A box with a `prefix` stays text. */
35
+ inputType?: "url" | "search" | "email" | "date" }
36
+ // `code`: a stylesheet or a script, in a monospace face, not spell-checked.
37
+ | { kind: "textarea"; id: string; label?: string; rows?: number; placeholder?: string; hint?: string; maxLength?: number; code?: boolean }
38
+ | { kind: "number"; id: string; label?: string; min?: number; max?: number; step?: number; suffix?: string; hint?: string; placeholder?: string }
39
+ | { kind: "range"; id: string; label?: string; min: number; max: number; step?: number; suffix?: string }
40
+ // `numeric`: the setting holds a number (a text's own Weight): the option picked is written as one. `clearable`: "Not set" stays a
41
+ // choice once a value is stored, and picking it clears the setting ("" deletes it).
42
+ | { kind: "select"; id: string; label?: string; options: SelectOption<G>[]; hint?: string; numeric?: boolean; clearable?: boolean }
43
+ // `clearable`: pressing the chip already pressed clears the setting ("" deletes it), as the kit's Segmented does with onClear.
44
+ | { kind: "segmented"; id: string; label?: string; options: SelectOption<G>[]; hint?: string; clearable?: boolean }
45
+ | { kind: "toggle"; id: string; label?: string; onLabel?: string; offLabel?: string; hint?: string }
46
+ | { kind: "color"; id: string; label?: string; hint?: string; placeholder?: string }
47
+ | { kind: "image"; id: string; label?: string }
48
+ // A list of object rows (e.g. pricing tiers, review cards). Each row edits `item` sub-fields; the control's value is the whole array.
49
+ // Rows can be added and removed inline.
50
+ | { kind: "repeater"; id: string; label?: string; item: Array<{ key: string; label?: string; long?: boolean }>; addLabel?: string; hint?: string };
51
+
52
+ /** The kinds the kit draws, in FieldSpec's order (a gate reads every one). */
53
+ export const KIT_FIELD_KINDS = ["text", "textarea", "number", "range", "select", "segmented", "toggle", "color", "image", "repeater"] as const;
54
+ export type KitFieldKind = (typeof KIT_FIELD_KINDS)[number];
55
+ const KIT_KIND: ReadonlySet<string> = new Set(KIT_FIELD_KINDS);
56
+ /** Whether the kit draws this kind itself. */
57
+ export const isKitFieldKind = (kind: string): kind is KitFieldKind => KIT_KIND.has(kind);
58
+
59
+ /** A field of a kind an app draws (`FieldKinds`): its kind and id, the rest its own. */
60
+ export type AppFieldSpec = { kind: string; id: string; label?: string; hint?: string };
61
+ /** Any field a form takes: one of the kit's kinds or one an app registered. */
62
+ export type AnyFieldSpec = FieldSpec | AppFieldSpec;
63
+
64
+ export type FieldGroup<F extends AnyFieldSpec = AnyFieldSpec> = { title?: string; hint?: string; fields: F[] };
65
+ export type FieldSchema<F extends AnyFieldSpec = AnyFieldSpec> = FieldGroup<F>[];
66
+
67
+ /** One write: a setting's id and its new value. */
68
+ export type FieldWrite = readonly [string, unknown];
69
+
70
+ /**
71
+ * A kind over SEVERAL stored settings, one control (the admin's Screens: show_desktop · show_tablet · show_mobile). Its value is read from
72
+ * the form's values, a change is written back as one write per setting it changed, and a lock on any of them locks it.
73
+ */
74
+ export interface FieldSpread<F extends AppFieldSpec = AppFieldSpec> {
75
+ /** The settings it stands for. */
76
+ ids(field: F): readonly string[];
77
+ /** Its value, from the form's values. */
78
+ read(field: F, values: Record<string, unknown>): unknown;
79
+ /** The writes a change makes (only the settings it changed). */
80
+ write(field: F, next: unknown, values: Record<string, unknown>): FieldWrite[];
81
+ /** Whether it holds a value of its own (a settings frame's + and −). */
82
+ holds(field: F, value: unknown): boolean;
83
+ /** The writes that take it off. */
84
+ clear(field: F, values: Record<string, unknown>): FieldWrite[];
85
+ }
86
+
87
+ /** A function of the field written in method form, so a rule that names its own spec (`(f: Stars) => …`) fits a set of any kinds. */
88
+ type ControlOfField<F> = { decide(field: F, value: unknown): FieldControlKind }["decide"];
89
+ /** What a form needs to know of a kind an app draws, besides its drawing: the control it is drawn with (its label's side, and where a
90
+ * list puts it), and for a kind over several settings how it reads and writes them. An app's rules name its own spec. */
91
+ export interface FieldKindRules<F extends AppFieldSpec = AppFieldSpec> {
92
+ control: FieldControlKind | ControlOfField<F>;
93
+ spread?: FieldSpread<F>;
94
+ }
95
+ /** An app's kinds' rules, by kind. A rule for a kit kind takes its place (the admin's colour, which may be a gradient). */
96
+ export type FieldKindRuleSet = Readonly<Record<string, FieldKindRules | undefined>>;
97
+ /** A kind's own entry in a set (an own property: a field whose kind is "constructor" or "toString" is no one's kind). */
98
+ export function kindIn<T>(set: Readonly<Record<string, T | undefined>> | undefined, kind: string): T | undefined {
99
+ return set && Object.prototype.hasOwnProperty.call(set, kind) ? set[kind] : undefined;
100
+ }
101
+
102
+ // ── Fit: whether a row of chips fits beside its label ──────────────────────────────────────────────────────────────────────────────
103
+
104
+ /** The editors' narrowest settings column, px: the theme inspector's. The Canvas and page editor panels are wider. */
105
+ export const NARROWEST_COLUMN_PX = 266;
106
+ /** The control's column when a field is a row (label 2 parts, control 3, an 8px gap): what a row's chips must fit. Chips that fit
107
+ * 266px were cut at 155px ("UPPERCASE", "Center"). */
108
+ export const ROW_CONTROL_COLUMN_PX = Math.floor(((NARROWEST_COLUMN_PX - 8) * 3) / 5);
109
+
110
+ /**
111
+ * A label's width in the editors' caption type (12px, weight 550), px, from its characters. Measured in Chromium on 14/10/2026:
112
+ * "Secondary" 62.6, "UPPERCASE" 72.2, "As typed" 51.8, "Heading" 48.6, "Left" 23. The estimate is at or above each of them: an estimate
113
+ * that runs short is a label clipped in its button.
114
+ */
115
+ export function labelWidthPx(label: string): number {
116
+ let w = 0;
117
+ for (const ch of label) w += ch === " " ? 3.5 : /[MW]/.test(ch) ? 10.5 : /[mw]/.test(ch) ? 9.5 : /[A-Z0-9]/.test(ch) ? 8.2 : 7.3;
118
+ return w;
119
+ }
120
+
121
+ /**
122
+ * A SHORT, CLOSED choice reads as a row of buttons (Chris 13/10/2026: "giống hệt gempages"): the value is in sight and one tap changes it.
123
+ * Only when every label FITS its button: `.ui-seg--fill` shares the row equally, so each label gets the column split N ways, less the
124
+ * button's 12px padding each side, its 1px divider and 2px to spare. 2 to 4 choices; more is a list however short.
125
+ */
126
+ export function segmentable(options: ReadonlyArray<{ value: string; label?: string }>, column = NARROWEST_COLUMN_PX): boolean {
127
+ const n = options.length;
128
+ if (n < 2 || n > 4) return false;
129
+ const room = column / n - 24 - 1 - 2;
130
+ return options.every((o) => labelWidthPx(o.label ?? o.value) <= room);
131
+ }
132
+
133
+ /** Whether a row of chips fits beside its label: glyphs (2 to 4 of them) always fit the control column, words 3 at most and only when
134
+ * each fits its share of it. Chips that do not are drawn as a list beside the label (FieldControl), not under it (Chris 04/11/2026:
135
+ * labels beside their controls, "gọn hơn"). */
136
+ export function chipsFitBeside(field: { options: ReadonlyArray<SelectOption> }): boolean {
137
+ return field.options.every((o) => o.glyph) ? field.options.length <= 4 : field.options.length <= 3 && segmentable(field.options, ROW_CONTROL_COLUMN_PX);
138
+ }
139
+
140
+ // ── A list's order ────────────────────────────────────────────────────────────────────────────────────────────────────────────────
141
+
142
+ /** A list's rows with the label on the side of its FIRST row first, then the others, each in their own order (`beside`): the label column
143
+ * switches side once at most (control standard §13b), and the list still opens on the row it opened on, its most used. */
144
+ export function firstSideFirst<T>(rows: readonly T[], beside: (row: T) => boolean): T[] {
145
+ if (!rows.length) return [...rows];
146
+ const side = rows.map(beside);
147
+ if (side.every((b) => b === side[0])) return [...rows];
148
+ return [...rows.filter((_, i) => side[i] === side[0]), ...rows.filter((_, i) => side[i] !== side[0])];
149
+ }
150
+
151
+ // ── What a knob holds (a settings frame's + and −) ─────────────────────────────────────────────────────────────────────────────────
152
+
153
+ /** A "shown" setting that is off: `false` (or "false", as a stored text reads); absent is shown. */
154
+ export const hides = (v: unknown) => v === false || v === "false";
155
+
156
+ const spreadOf = (field: AnyFieldSpec, rules?: FieldKindRuleSet) => kindIn(rules, field.kind)?.spread;
157
+
158
+ /** What a knob holds: its own value, or for a kind over several settings (`spread`) the value it reads from them. */
159
+ export function knobValue(field: AnyFieldSpec, values: Record<string, unknown>, rules?: FieldKindRuleSet): unknown {
160
+ const spread = spreadOf(field, rules);
161
+ return spread ? spread.read(field, values) : values[field.id];
162
+ }
163
+
164
+ /** Whether a knob holds a value of its own: a Visibility toggle when it hides (shown is what no value means), a kind over several settings
165
+ * as it says, any other when set. */
166
+ export function knobHolds(field: AnyFieldSpec, value: unknown, rules?: FieldKindRuleSet): boolean {
167
+ const spread = spreadOf(field, rules);
168
+ if (spread) return spread.holds(field, value);
169
+ if (field.kind === "toggle") return hides(value);
170
+ if (value === undefined || value === null || value === "") return false;
171
+ if (typeof value === "object") return Object.values(value as Record<string, unknown>).some((v) => v !== undefined && v !== null && v !== "");
172
+ return true;
173
+ }
174
+
175
+ /** The value that takes a knob off: shown for a Visibility toggle, empty for the rest (the host reads it as none). */
176
+ export const knobCleared = (field: AnyFieldSpec): unknown => (field.kind === "toggle" ? true : "");
177
+
178
+ /** The writes that take a knob off, `[setting id, value]`: a kind over several settings as it says, any other knob one. */
179
+ export function knobClearWrites(field: AnyFieldSpec, values: Record<string, unknown>, rules?: FieldKindRuleSet): Array<[string, unknown]> {
180
+ const spread = spreadOf(field, rules);
181
+ if (spread) return spread.clear(field, values).map(([id, v]) => [id, v]);
182
+ return [[field.id, knobCleared(field)]];
183
+ }
184
+
185
+ /** The schema with only the knobs that hold a value; a group left with none is dropped. */
186
+ export function heldKnobsOnly<F extends AnyFieldSpec>(schema: FieldSchema<F>, values: Record<string, unknown>, rules?: FieldKindRuleSet): FieldSchema<F> {
187
+ return schema.map((g) => ({ ...g, fields: g.fields.filter((f) => knobHolds(f, knobValue(f, values, rules), rules)) })).filter((g) => g.fields.length > 0);
188
+ }
189
+
190
+ // ── THE SETTINGS FRAME ──
191
+ // WHERE A SCHEMA'S FIELDS STAND IN THE SETTINGS FRAME, AND HOW A SEARCH FINDS ONE (one settings frame slice 1, 06/11/2026; moved from the
192
+ // admin's lib/settings-frame-groups.ts and lib/find-a-setting.ts with FieldFrame, 08/11/2026). Chris saw three frames around one set of
193
+ // controls; the element panel's is the standard (InspectorFrame). A schema form places each of its fields where the element panel places
194
+ // the same setting, so the panels read alike:
195
+ //
196
+ // LOOK the schema's own groups first (an element's own lead its look), then Typography (open), Background +, Shape +
197
+ // LAYOUT Spacing (open: Padding, Margin), Arrangement + (Align, Spacing, Width: the content box's knobs)
198
+ // VISIBILITY Who sees it + (Screens)
199
+ // CODE Advanced + (a section's advanced settings, its custom CSS)
200
+ //
201
+ // `open`: always drawn. `add`: a + line (a chip in Look) until it holds a value or + shows it, then its rows under its name and a − that
202
+ // clears them. The stored keys and what they write are the schema's: this only decides where a field stands. Pure, no React.
203
+ //
204
+ // WHICH FIELDS ARE PLACED BY ID (`FramePlaces`): only those of the style groups the places name (`groups`), by id; every other group is the
205
+ // schema's own, drawn open first in Look, and one titled Advanced goes to Code. The default places none (`OWN_FRAME_PLACES`): a group title
206
+ // means nothing more until an app says so. The admin passes `STYLE_FRAME_PLACES` (its styleConfigureSchema's titles and knobs, Screens).
207
+
208
+ // ── Find a setting ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
209
+
210
+ const words = (s: string) => s.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g, "").split(/[^a-z0-9]+/).filter(Boolean);
211
+
212
+ /** Every word of `query` begins a word of `text` ("rad" finds "Corner radius"; "corner rad" too; "dius" does not). */
213
+ export function settingMatches(query: string, text: string): boolean {
214
+ const want = words(query);
215
+ if (!want.length) return false;
216
+ const have = words(text);
217
+ return want.every((w) => have.some((h) => h.startsWith(w)));
218
+ }
219
+
220
+ /**
221
+ * The sections with only the rows `query` finds: a row by its own name, or every row of a section whose name it finds ("typography"
222
+ * keeps the whole Typography group). Empty sections are dropped. `rowName` is what the panel prints for a row.
223
+ */
224
+ export function findSettings<S extends { label: string; rows: ReadonlyArray<{ id: string }> }>(sections: readonly S[], query: string, rowName: (id: string) => string): S[] {
225
+ if (!words(query).length) return [];
226
+ return sections
227
+ .map((g) => (settingMatches(query, g.label) ? g : { ...g, rows: g.rows.filter((r) => settingMatches(query, rowName(r.id))) }))
228
+ .filter((g) => g.rows.length > 0);
229
+ }
230
+
231
+ // ── The frame's groups ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
232
+
233
+ export type FrameCluster = "look" | "place" | "when" | "code";
234
+ export type FrameWay = "open" | "add";
235
+ export type FrameGroup<F extends AnyFieldSpec = AnyFieldSpec> = { key: string; title: string; cluster: FrameCluster; way: FrameWay; fields: F[]; hint?: string; own: boolean };
236
+ /** A shared group's place: its key, its title, its cluster, and whether it is always drawn or added. */
237
+ export type FramePlace = Omit<FrameGroup, "fields" | "hint" | "own">;
238
+
239
+ /** Which fields are placed, and where. */
240
+ export type FramePlaces = {
241
+ /** The titles of the style groups whose fields are placed by id (`byId`); a field of another group is its group's. */
242
+ groups: ReadonlySet<string>;
243
+ /** A style knob's place, by its id without the schema's prefix. */
244
+ byId: Readonly<Record<string, FramePlace>>;
245
+ /** A kind's place wherever its field stands (the admin's Screens: Who sees it). */
246
+ byKind: Readonly<Record<string, FramePlace>>;
247
+ /** The shared groups' order, by key. */
248
+ order: readonly string[];
249
+ };
250
+
251
+ const TYPOGRAPHY: FramePlace = { key: "typography", title: "Typography", cluster: "look", way: "open" };
252
+ const SIZE: FramePlace = { key: "size", title: "Size", cluster: "look", way: "add" };
253
+ const EFFECTS: FramePlace = { key: "effects", title: "Effects", cluster: "look", way: "add" };
254
+ const BACKGROUND: FramePlace = { key: "background", title: "Background", cluster: "look", way: "add" };
255
+ const SHAPE: FramePlace = { key: "shape", title: "Shape", cluster: "look", way: "add" };
256
+ const SPACING: FramePlace = { key: "spacing", title: "Spacing", cluster: "place", way: "open" };
257
+ // Not "Layout": the cluster is named Layout, and a LAYOUT label over a group named Layout reads twice (element review C34). Not "Content"
258
+ // either: that is the section's words, in Look (decided for Chris 06/11/2026).
259
+ const ARRANGEMENT: FramePlace = { key: "arrangement", title: "Arrangement", cluster: "place", way: "add" };
260
+ const WHO: FramePlace = { key: "visibility", title: "Who sees it", cluster: "when", way: "add" };
261
+ const ADVANCED: FramePlace = { key: "advanced", title: "Advanced", cluster: "code", way: "add" };
262
+
263
+ /** The element panel's places for the admin's style schema (styleConfigureSchema, a theme part's own knobs), which the admin passes. An app
264
+ * whose schema uses these titles for the same knobs may pass them too. */
265
+ export const STYLE_FRAME_PLACES: FramePlaces = {
266
+ groups: new Set(["Layout", "Typography", "Spacing & shape", "Background", "Visibility", "Appearance", "Size"]),
267
+ byId: {
268
+ font_size: TYPOGRAPHY, font_weight: TYPOGRAPHY, line_height: TYPOGRAPHY, letter_spacing: TYPOGRAPHY, text_transform: TYPOGRAPHY, text_color: TYPOGRAPHY,
269
+ // A theme part's own (ThemePartPanel, one settings frame slice 2): its align and italic are its type, as the element panel's text.
270
+ text_align: TYPOGRAPHY, font_style: TYPOGRAPHY,
271
+ max_width: SIZE,
272
+ background: BACKGROUND, background_image: BACKGROUND, gem_background: BACKGROUND,
273
+ radius: SHAPE, shadow: SHAPE, border_radius: SHAPE, border_width: SHAPE, border_color: SHAPE,
274
+ opacity: EFFECTS,
275
+ padding: SPACING, margin: SPACING,
276
+ content_alignment: ARRANGEMENT, content_spacing: ARRANGEMENT, content_width: ARRANGEMENT,
277
+ },
278
+ byKind: { screens: WHO },
279
+ /** The order a cluster's shared groups stand in (the element panel's: LOOK_FRAME, PLACE_FRAME). */
280
+ order: [TYPOGRAPHY, SIZE, BACKGROUND, SHAPE, EFFECTS, SPACING, ARRANGEMENT, WHO, ADVANCED].map((p) => p.key),
281
+ };
282
+
283
+ /** The frame's default: no field placed by id or kind, so every group is the schema's own, open in Look (one titled Advanced in Code). A
284
+ * group title means nothing more until an app passes its places. */
285
+ export const OWN_FRAME_PLACES: FramePlaces = { groups: new Set(), byId: {}, byKind: {}, order: STYLE_FRAME_PLACES.order };
286
+
287
+ const bareId = (id: string, prefix: string) => (prefix && id.startsWith(prefix) ? id.slice(prefix.length) : id);
288
+
289
+ /** The style groups' fields that have no place: a knob added to a style group and not to `byId`. frameGroups refuses to draw one (it would
290
+ * stand as a group of its own, out of every cluster's order); a test reads the real schema with this. */
291
+ export function unplacedStyleFields(schema: FieldSchema, prefix = "", places: FramePlaces = OWN_FRAME_PLACES): string[] {
292
+ return schema.filter((g) => places.groups.has(g.title ?? "")).flatMap((g) => g.fields)
293
+ .filter((f) => !places.byKind[f.kind] && !places.byId[bareId(f.id, prefix)]).map((f) => f.id);
294
+ }
295
+
296
+ /** Each field of `schema` in its frame group. A group the schema names that holds none of the placed knobs is the schema's own (Content,
297
+ * Options, Design), drawn open first in Look; one titled Advanced goes to Code. A style field with no place throws: it is a knob added
298
+ * to the schema and not to the places, and CI draws the real schema. */
299
+ export function frameGroups<F extends AnyFieldSpec>(schema: FieldSchema<F>, prefix = "", places: FramePlaces = OWN_FRAME_PLACES): FrameGroup<F>[] {
300
+ const unplaced = unplacedStyleFields(schema, prefix, places);
301
+ if (unplaced.length) throw new Error(`settings-frame: no place for ${unplaced.join(", ")}: add it to the frame's places (byId)`);
302
+ const own: FrameGroup<F>[] = [];
303
+ const shared = new Map<string, FrameGroup<F>>();
304
+ for (const g of schema) {
305
+ for (const f of g.fields) {
306
+ const place = places.byKind[f.kind] ?? (places.groups.has(g.title ?? "") ? places.byId[bareId(f.id, prefix)] : undefined) ?? (g.title === "Advanced" ? ADVANCED : null);
307
+ if (place) {
308
+ const at = shared.get(place.key) ?? { ...place, fields: [], own: false };
309
+ at.fields.push(f);
310
+ if (g.hint && !at.hint) at.hint = g.hint;
311
+ shared.set(place.key, at);
312
+ continue;
313
+ }
314
+ const title = g.title ?? "Settings";
315
+ let at = own.find((o) => o.title === title);
316
+ if (!at) own.push((at = { key: `own:${title}`, title, cluster: "look", way: "open", fields: [], hint: g.hint, own: true }));
317
+ at.fields.push(f);
318
+ }
319
+ }
320
+ return [...own, ...places.order.map((k) => shared.get(k)).filter((g): g is FrameGroup<F> => !!g)];
321
+ }
322
+
323
+ /** Whether any field of `g` holds a value of its own (a Visibility screen when it hides: field-spec.ts knobHolds). */
324
+ export function groupHolds(g: FrameGroup, values: Record<string, unknown>, rules?: FieldKindRuleSet): boolean {
325
+ return g.fields.some((f) => knobHolds(f, knobValue(f, values, rules), rules));
326
+ }
327
+
328
+ /** How `g` draws (InspectorFrameGroup): `open` (its rows under its name), `add` (its name and a +), `added` (its rows under its name and a
329
+ * −). `shown`: the groups + showed with nothing in them. */
330
+ export function groupState(g: FrameGroup, values: Record<string, unknown>, shown: ReadonlySet<string>, rules?: FieldKindRuleSet): "open" | "add" | "added" {
331
+ if (g.way === "open") return "open";
332
+ return groupHolds(g, values, rules) || shown.has(g.key) ? "added" : "add";
333
+ }
334
+
335
+ /** Whether a group's − may clear what it holds. Not where it holds a text the seller wrote (the section editor's Custom CSS): one press
336
+ * would erase it with no way back there; it is emptied in its box. */
337
+ export function groupClearable(g: FrameGroup): boolean {
338
+ return !g.fields.some((f) => f.kind === "textarea");
339
+ }
340
+
341
+ /** A search's groups (settingMatches): a group whose title matches whole, else the fields whose label matches. */
342
+ export function foundGroups<F extends AnyFieldSpec>(groups: readonly FrameGroup<F>[], query: string): FrameGroup<F>[] {
343
+ return groups
344
+ .map((g) => (settingMatches(query, g.title) ? g : { ...g, fields: g.fields.filter((f) => settingMatches(query, `${f.label ?? ""} ${f.id}`)) }))
345
+ .filter((g) => g.fields.length > 0);
346
+ }
@@ -38,8 +38,8 @@ export {
38
38
  type FieldProps, type InspectorGroupProps, type PanelHeaderProps, type PanelTab, type PanelTabsProps,
39
39
  } from "./panel";
40
40
  export {
41
- ChipButton, ColorControl, EdgeBox, fileSizeWords, ImageControl, imageFileName, MediaCard, PickButton, RangeControl, Seg, UnitField, ValueControl,
42
- type ColorChoice, type ColorControlProps, type EdgeBoxProps, type EdgeSide, type ImageControlProps, type MediaCardProps, type PickButtonProps, type RangeControlProps, type SegOption, type SegProps, type UnitFieldProps, type ValueControlProps,
41
+ Checkbox, ChipButton, ColorControl, EdgeBox, fileSizeWords, ImageControl, imageFileName, MediaCard, PickButton, RangeControl, Seg, UnitField, ValueControl,
42
+ type CheckboxProps, type ColorChoice, type ColorControlProps, type EdgeBoxProps, type EdgeSide, type ImageControlProps, type MediaCardProps, type PickButtonProps, type RangeControlProps, type SegOption, type SegProps, type UnitFieldProps, type ValueControlProps,
43
43
  } from "./controls";
44
44
  // 27/10/2026: a control takes a value from outside in the render that brings it, not an effect later (new-value.ts).
45
45
  export { useOnNewValue } from "./new-value";
@@ -65,6 +65,24 @@ export {
65
65
  INSPECTOR_CLUSTERS, InspectorClusterBreak, InspectorFrame, InspectorFrameGroup, InspectorFramePart, InspectorSearch,
66
66
  type InspectorFrameCluster, type InspectorFrameGroupProps, type InspectorFrameProps, type InspectorSearchProps,
67
67
  } from "./inspector-frame";
68
+ // 08/11/2026 (one control set): the schema-driven form, moved from the admin. A schema as data (`field-spec`, no React: the kit's kinds,
69
+ // the fit of a row of chips, what a knob holds, where a field stands in the frame, a search's words), one control per kind (`field-control`:
70
+ // FieldControl, FieldRows, FieldRenderer; an app adds its own kinds with `kinds`) and the schema in the settings frame (`field-frame`).
71
+ export {
72
+ chipsFitBeside, findSettings, firstSideFirst, foundGroups, frameGroups, groupClearable, groupHolds, groupState, heldKnobsOnly, hides, isKitFieldKind,
73
+ kindIn, KIT_FIELD_KINDS, knobClearWrites, knobCleared, knobHolds, knobValue, labelize, labelWidthPx, NARROWEST_COLUMN_PX, ROW_CONTROL_COLUMN_PX, segmentable,
74
+ OWN_FRAME_PLACES, settingMatches, STYLE_FRAME_PLACES, unplacedStyleFields,
75
+ type AnyFieldSpec, type AppFieldSpec, type FieldGroup, type FieldKindRules, type FieldKindRuleSet, type FieldSchema, type FieldSpec, type FieldSpread,
76
+ type FieldWrite, type FrameCluster, type FrameGroup, type FramePlace, type FramePlaces, type FrameWay, type KitFieldKind, type SelectOption,
77
+ } from "./field-spec";
78
+ export {
79
+ controlOf, FieldControl, FieldKindsProvider, FieldRenderer, FieldRows, labelBeside,
80
+ type FieldControlProps, type FieldGlyphs, type FieldKind, type FieldKindProps, type FieldKinds, type FieldRowsProps,
81
+ } from "./field-control";
82
+ export { FieldFrame, PartsFrame, usePartHits, type FieldFrameProps, type FrameClusterLabels, type FramePart } from "./field-frame";
83
+ // 09/11/2026: a secret the seller gives (a token, a key): masked, Show / Paste, never copied out, "Saved, ends in …" once stored.
84
+ export { SecretField, secretTail, type SecretFieldProps } from "./secret-field";
85
+ export { ColorChoicesContext, type ColorChoices } from "./color-choices";
68
86
  // 24/10/2026: a setting's small panel beside the settings column (top layer; a sheet at phone width); its own CSS part.
69
87
  export { Popover, type PopoverProps } from "./popover";
70
88
  // 24/10/2026: the colour picker ColorControl's swatch opens (square, hue, opacity, hex, eyedropper, theme/recent/None).
@@ -39,6 +39,12 @@ export const LABEL_SIDE = {
39
39
  link: "beside",
40
40
  /** A date and time. */
41
41
  date: "beside",
42
+ /** A secret (an API token, a private key): its masked box with Show and Paste, or once stored "Saved, ends in …" and Replace
43
+ * (SecretField). One line, as a text box; its buttons wrap under the box where the column is narrow, as a link's Choose does. */
44
+ secret: "beside",
45
+ /** Which screens show it: three device pictures (Desktop · Tablet · Mobile, each named in its tooltip and for a screen reader), as a
46
+ * vertical alignment's three pictures are (label-side audit decision E, 09/11/2026). Their words did not fit the control column. */
47
+ screens: "beside",
42
48
  // THE PANEL'S WIDTH: the label above, the control under it.
43
49
  /** A text of several lines (a description, custom CSS). */
44
50
  textarea: "above",
@@ -56,10 +62,10 @@ export const LABEL_SIDE = {
56
62
  drawing: "above",
57
63
  /** A line of code (a condition's expression): it reads whole across the field, not cut in the control column. */
58
64
  code: "above",
65
+ /** A sentence in place of a control: a value filled from elsewhere (the section's copy, a product's metafield, a list's content
66
+ * source), or a setting edited in another place. A sentence reads across the field; beside, it is four lines in the control column. */
67
+ note: "above",
59
68
  // ABOVE FOR NOW: the decision is here, not in the host, so what is drawn and the table agree until the control is reworked.
60
- /** Which screens show it (Desktop · Tablet · Mobile): three chips in words, too wide for the row. Three device glyphs beside the
61
- * label move it to `chips` (slice 2 of the label-side work, decision E). */
62
- screens: "above",
63
69
  /** A font's one button (an "Aa" in the font, its name, CSS): a name needs the width (FontPickerField). It follows `pick` in a later
64
70
  * slice (decision C); the element panel's Font is a list (`select`), beside. */
65
71
  "font-pick": "above",