From 347e999ef45e0051aac55572e388f32fe8d40409 Mon Sep 17 00:00:00 2001 From: bailey <74082460+bmjcoding@users.noreply.github.com> Date: Tue, 24 Nov 2026 13:03:27 -0600 Subject: [PATCH 1/7] Pause gets a held form: its two bars close and fill (DECISIONS 361) Each bar is a closed loop 1.5 units wide on its own centreline, drawn through glyphs/source.mjs and the generator; at rest each loop folds to the line drawn before, so the resting glyph is unchanged. Pause joins copy, edit, trash and download as a named rich action, and is the one action with a selected form. The play-pause pair gets the slot map [0, 4, 1, 2, 3, 5, 6, 7], which keeps today's path at rest both ways. A pair with a filled end is no morph: the engine swaps it, since a pair's frames carry no fill. Co-Authored-By: Claude Opus 5.5 --- .agent/skills/basalt-html/parts/glyphs.json | 2 +- packages/react/glyphs/source.mjs | 16 ++++++++++++++-- packages/react/src/glyph-motion.ts | 10 ++++++++-- packages/react/src/glyphs/pause.ts | 4 +++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.agent/skills/basalt-html/parts/glyphs.json b/.agent/skills/basalt-html/parts/glyphs.json index b39c30d4..89c06721 100644 --- a/.agent/skills/basalt-html/parts/glyphs.json +++ b/.agent/skills/basalt-html/parts/glyphs.json @@ -1 +1 @@ -{"menu":[""],"plus":[""],"close":[""],"minus":[""],"check":[""],"more":[""],"arrow-right":[""],"arrow-down":[""],"arrow-left":[""],"arrow-up":[""],"chevron-right":[""],"chevron-down":[""],"chevron-left":[""],"chevron-up":[""],"external":[""],"play":[""],"pause":[""],"download":[""],"copy":[""],"edit":[""],"trash":[""],"home":["",""],"search":["",""],"notifications":["",""],"messages":["",""],"profile":["",""],"settings":["",""],"more-nav":["",""],"calendar":["",""],"trends":["",""],"plan":["",""],"sources":["",""],"history":["",""],"runs":["",""],"sandboxes":["",""],"routes":["",""],"policy":["",""],"records":["",""]} +{"menu":[""],"plus":[""],"close":[""],"minus":[""],"check":[""],"more":[""],"arrow-right":[""],"arrow-down":[""],"arrow-left":[""],"arrow-up":[""],"chevron-right":[""],"chevron-down":[""],"chevron-left":[""],"chevron-up":[""],"external":[""],"play":[""],"pause":["",""],"download":[""],"copy":[""],"edit":[""],"trash":[""],"home":["",""],"search":["",""],"notifications":["",""],"messages":["",""],"profile":["",""],"settings":["",""],"more-nav":["",""],"calendar":["",""],"trends":["",""],"plan":["",""],"sources":["",""],"history":["",""],"runs":["",""],"sandboxes":["",""],"routes":["",""],"policy":["",""],"records":["",""]} diff --git a/packages/react/glyphs/source.mjs b/packages/react/glyphs/source.mjs index 118a2ea0..a8e6cec9 100644 --- a/packages/react/glyphs/source.mjs +++ b/packages/react/glyphs/source.mjs @@ -12,7 +12,8 @@ // that slot by GAP at that end; the selected drawing is the closed one. So the opening closes as the step into the // fill. A glyph with no joint of its own has no seam. // - Selected: every loop in `loops` fills, every slot in `knock` becomes a hole in the fill, `sel` may move or unfold -// other slots. Actions keep their drawing. +// other slots. Actions keep their drawing, except pause: its two bars fill when selected, because it is the glyph of a +// held toggle (DECISIONS 361). // - Stroke: a constant 2.25 units on 24 (1.125 px at 12, 1.5 at 16, 1.875 at 20, 2.25 at 24). export const GRID = 24; @@ -118,9 +119,20 @@ export const GLYPHS = { "chevron-up": { family: "line", label: "Chevron up", ph: "CaretUp", morphIcon: true, group: "chevron", rotate: 270, of: "chevron-right" }, external: { family: "line", label: "External", ph: "ArrowUpRight", s: [L(7, 17, 17, 7), L(9.5, 7, 17, 7), L(17, 7, 17, 14.5)] }, play: { family: "line", label: "Play", ph: "Play", s: [L(7.5, 4.5, 7.5, 19.5), L(7.5, 4.5, 19, 12), L(19, 12, 7.5, 19.5)] }, - pause: { family: "line", label: "Pause", ph: "Pause", s: [L(8.5, 5, 8.5, 19), L(15.5, 5, 15.5, 19), O(15.5, 12)] }, // ------------------------------------------------------------------------------------ actions: rich, 8 slots + // Pause (the pause toggle, DECISIONS n): the glyph of a held toggle, so the one action with a selected form. Each bar is + // a closed loop 1.5 wide on its own centreline (x 8.5 and 15.5, 3.75 of ink with the stroke), and the loop fills. At + // rest each loop folds to the one line drawn before: slots 1 and 3 (5 and 7) grow from the bar's ends, slot 2 (and 6) + // from its middle, so the bar thickens evenly about its centreline. + pause: { + family: "rich", label: "Pause", ph: "Pause", where: "none: two bars have no joint", + s: [L(7.75, 5, 7.75, 19), L(7.75, 19, 9.25, 19), L(9.25, 19, 9.25, 5), L(9.25, 5, 7.75, 5), + L(14.75, 5, 14.75, 19), L(14.75, 19, 16.25, 19), L(16.25, 19, 16.25, 5), L(16.25, 5, 14.75, 5)], + rest: { 0: L(8.5, 5, 8.5, 19), 1: O(8.5, 19), 2: O(8.5, 12), 3: O(8.5, 5), + 4: L(15.5, 5, 15.5, 19), 5: O(15.5, 19), 6: O(15.5, 12), 7: O(15.5, 5) }, + loops: [[0, 1, 2, 3], [4, 5, 6, 7]], + }, // Download (item 39c): four straight strokes, so a rich glyph. It is arrow-down lifted 3 units over a tray: the same // 11-unit shaft and the same head (5 across, 6 down). Slots 0 and 1 are the head, so chevron-down's two strokes // become them; slot 2, the shaft, takes the chevron's unused third slot and grows from its own middle; the tray grows diff --git a/packages/react/src/glyph-motion.ts b/packages/react/src/glyph-motion.ts index ab9748c4..b17b0866 100644 --- a/packages/react/src/glyph-motion.ts +++ b/packages/react/src/glyph-motion.ts @@ -11,7 +11,10 @@ // - a request for the drawing it left runs back along the same path (a turn turns back; it never deforms); // - a request for another member of the rotation group it is turning in turns on from the angle on screen; // - anything else swaps at once. -// Reduced motion swaps at once. +// Reduced motion swaps at once (a toggle's seat crossfades instead: `Morphing`). +// +// A pair runs only between two unfilled drawings: a pair's frames carry no loops, so a filled end (held pause) would drop to its outline. +// A pair with a filled end is no morph, and swaps (DECISIONS 361). import { settle, turn } from "./glyph"; import type { Drawing, GlyphData, GlyphSlot } from "./glyph"; @@ -40,7 +43,8 @@ interface Pair { function pairs(): Readonly> { return { "menu>close": { map: [0, 2, 1, 3, 4, 5, 6, 7] }, - "play>pause": {}, + // play's upright to the left bar, the upper diagonal to the right bar; the lower diagonal departs to its middle (DECISIONS 361) + "play>pause": { map: [0, 4, 1, 2, 3, 5, 6, 7] }, "copy>check": {}, "chevron-down>download": {}, }; @@ -88,6 +92,8 @@ export function between(a: Endpoint, b: Endpoint, e: number, pair: Pair | null): export function prepare(from: Endpoint, target: Endpoint): { kind: MorphKind | null; from: Endpoint; pair: Pair | null } { if (from.name === target.name) return { kind: "same", from, pair: null }; if (from.group && from.group === target.group) return { kind: "group", from, pair: null }; + // a pair's frames carry no fill (`between`), so a filled end is no pair + if (from.f > 0 || target.f > 0) return { kind: null, from, pair: null }; const table = pairs(); const forward = table[`${from.name}>${target.name}`]; const back = table[`${target.name}>${from.name}`]; diff --git a/packages/react/src/glyphs/pause.ts b/packages/react/src/glyphs/pause.ts index 2f5f87f0..9cc9c85c 100644 --- a/packages/react/src/glyphs/pause.ts +++ b/packages/react/src/glyphs/pause.ts @@ -4,5 +4,7 @@ import { glyph } from "../glyph"; /** Pause (action). */ export const PauseGlyph = /* @__PURE__ */ glyph({ name: "pause", - selected: [[8.5, 5, 8.5, 19], [15.5, 5, 15.5, 19]], + selected: [[7.75, 5, 7.75, 19], [7.75, 19, 9.25, 19], [9.25, 19, 9.25, 5], [9.25, 5, 7.75, 5], [14.75, 5, 14.75, 19], [14.75, 19, 16.25, 19], [16.25, 19, 16.25, 5], [16.25, 5, 14.75, 5]], + rest: { 0: [8.5, 5, 8.5, 19], 1: [8.5, 19, 8.5, 19, 8.5, 19, 8.5, 19, 0], 2: [8.5, 12, 8.5, 12, 8.5, 12, 8.5, 12, 0], 3: [8.5, 5, 8.5, 5, 8.5, 5, 8.5, 5, 0], 4: [15.5, 5, 15.5, 19], 5: [15.5, 19, 15.5, 19, 15.5, 19, 15.5, 19, 0], 6: [15.5, 12, 15.5, 12, 15.5, 12, 15.5, 12, 0], 7: [15.5, 5, 15.5, 5, 15.5, 5, 15.5, 5, 0] }, + loops: [[0,1,2,3],[4,5,6,7]], }); From ddb1cb0b100a4d2eafede779eacda88efac5245c Mon Sep 17 00:00:00 2001 From: bailey <74082460+bmjcoding@users.noreply.github.com> Date: Tue, 24 Nov 2026 13:03:30 -0600 Subject: [PATCH 2/7] A pressed toggle's glyph crossfades where it does not morph (DECISIONS 361) Foundations says reduced motion is the 100ms crossfade for a pressed toggle; React swapped at once. Button and IconButton now pass `crossfade` on every pressed toggle's seat. On that seat a change that ends without a flight (reduced motion, a pair the engine refuses such as held pause and play, or the swap after an interruption) is the duration-fast crossfade of the two settled drawings, in one svg (CrossfadeSvg), so the box does not change; at animationend the seat is Icon again. Done seats, MorphIcon and seats without `crossfade` keep what they had. Doc comments say pause now fills. Co-Authored-By: Claude Opus 5.5 --- packages/react/src/button.tsx | 6 +- packages/react/src/control-seat.tsx | 4 +- packages/react/src/glyph-flight.tsx | 79 ++++++++++++++++++---- packages/react/src/glyph.tsx | 14 ++++ packages/react/src/loops-toggle-button.tsx | 2 +- packages/react/src/styles/components.css | 9 +++ 6 files changed, 97 insertions(+), 17 deletions(-) diff --git a/packages/react/src/button.tsx b/packages/react/src/button.tsx index 022b9fb0..9512c05d 100644 --- a/packages/react/src/button.tsx +++ b/packages/react/src/button.tsx @@ -74,7 +74,7 @@ export type ButtonProps = BaseProps & ButtonToggle & { /** * An icon before the label. On a toggle (`pressed`, which needs it) it is the toggle's glyph, shown at rest; pressed shows its selected form, or - * the core check in the same seat where the glyph has none (an action glyph such as pause, a long-tail glyph not `fillSafe`). The two crossfade. + * the core check in the same seat where the glyph has none (an action glyph, which keeps its drawing; pause is the one that fills; a long-tail glyph not `fillSafe`). The two crossfade. */ icon?: IconComponent; /** An icon after the label, e.g. a caret. A button that opens a new tab has no other trailing icon, so this is ignored there. */ @@ -167,7 +167,7 @@ export function Button({ variant = "secondary", size = "md", fullWidth, edge, ic onClick={wait.press} > {icon && done !== undefined && !toggles ? : null} - {icon && !(toggles && !own) && !(done !== undefined && !toggles) ? : null} + {icon && !(toggles && !own) && !(done !== undefined && !toggles) ? : null} {/* A text toggle's seat holds its glyph at rest and, pressed, the check where the glyph has no selected form; the two crossfade, so both states are one width. */} {toggles && icon && !own ? (