@filipgutica/design-system 1.0.47 → 1.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,7 +35,7 @@ npm install @filipgutica/design-system
35
35
  | --- | --- |
36
36
  | `@filipgutica/design-system/tokens.css` | The tokens. Dark mode follows `prefers-color-scheme`; set `data-theme="light"` or `"dark"` on `<html>` to override it. `data-theme="light"` or `"dark"` on any element below `<html>`, or a `.dark` class on `<html>` or below it, themes that subtree: every token that changes with the mode resolves again inside it. The subtree takes its mode's text colour; on an element with both, `data-theme="light"` wins over `.dark`. A theme written by hand sets its hue pair once, on `:root`: `tokens.css` switches `--color-accent` between `--color-project` and `--color-project-dark` by mode, so the rule works after `tokens.css`, in its cascade layer or a later one. A theme that also sets neutrals or text on the hue repeats those light values on `:root [data-theme="light"]` and the dark ones on the selectors of the dark subtree block at the end of `tokens.css`, beside its `:root` and root dark rules, so they hold in a subtree too; a theme file from the token build does this already. |
37
37
  | `@filipgutica/design-system/ui-sdk.css` | Experimental: draws [ui-sdk](https://ui-sdk.dev)'s headless Button, Field, Input, Textarea, Checkbox, and Radio as the component specs do, checked against `@ui-sdk/*` 0.1.0-beta.5. Load it after `tokens.css`, without ui-sdk's `web.css`; [DESIGN.md](language/DESIGN.md#ui-sdk-experimental) gives the layer order and the supported components. |
38
- | `@filipgutica/design-system/language/conversation.css` | The conversation components (message row and group, message body, answer actions, hover toolbar, thread panel, composer, tool-call disclosure, and mention), the list row and app bar around them, and the quiet action as [components.md](language/components.md#message-row) specifies them, for any framework; the catalogue links the same file. Load it after `tokens.css`. Its rules are unlayered, as the catalogue's are; the badge and alert they hold come from `feedback.css`, and the button, quiet action, overflow menu, and field error from their own components. |
38
+ | `@filipgutica/design-system/language/conversation.css` | The conversation components (message row and group, message body, answer actions, hover toolbar, thread panel, composer and its formatting field, tool-call disclosure, and mention), the list row and app bar around them, and the quiet action as [components.md](language/components.md#message-row) specifies them, for any framework; the catalogue links the same file. Load it after `tokens.css`. Its rules are unlayered, as the catalogue's are; the badge and alert they hold come from `feedback.css`, and the button, quiet action, overflow menu, and field error from their own components. |
39
39
  | `@filipgutica/design-system/language/feedback.css` | The [badge](language/components.md#badge) (neutral and the success, warning, danger, and info tones) and the [alert](language/components.md#alert), for any framework; ui-sdk has no badge or alert part, and the catalogue links the same file. Load it after `tokens.css`. Its rules are unlayered, as the catalogue's are. |
40
40
  | `@filipgutica/design-system/themes/*.css` | A theme's inputs (hue pair, and any fonts, base radius, or neutrals): `graphite-indigo` (the default, already in `tokens.css`); the family sites' hues `lagoon` (annoterm), `copper` (devps), `iris` (filip-stack), `lapis` (Workbench), and `fern` (wtree); or the open palettes `catppuccin` and `github`. Load one after `tokens.css`, in its cascade layer or a later one, on `:root`. |
41
41
  | `@filipgutica/design-system/themes/*.tokens.json` | Each theme's source as a W3C Design Tokens file (2025.10), for design-token tools such as Style Dictionary and Tokens Studio. |
@@ -45,8 +45,8 @@ Center the **container**, not every sentence. Align header, content, images, and
45
45
  - `ui-sdk.css`: experimental. Draws ui-sdk's headless parts as the component specs do; see [ui-sdk](#ui-sdk-experimental).
46
46
  - `components.md`: one spec for each component, with anatomy, states, Do and Don't lines, keyboard and screen-reader behavior, motion, and forced colors. Read it for any component work.
47
47
  - `components.html`: every component in each of its states, in plain HTML and CSS on `tokens.css`. Copy component markup and styles from there.
48
- - `conversation.css`: the conversation components' styles (message row and group, message body, answer actions, hover toolbar, thread panel, composer, tool-call disclosure, and mention), the list row and app bar of the application screen around them, and the quiet action's shared recipe. `components.html` links it, so it is their one source. Load it after `tokens.css`, unlayered, as the catalogue does; the parts these components hold, such as the badge and the button, come from their own components.
49
- - `feedback.css`: the badge's and the alert's styles, with their status tones. It and `conversation.css` size and stroke the icons they hold (the alert's icon, the resolution note's check, and the app bar's icons), so a page supplies only the SVG sprite, not an icon class. `components.html` links it, so it is their one source; ui-sdk has no badge or alert part. Load it after `tokens.css`, unlayered.
48
+ - `conversation.css`: the conversation components' styles (message row and group, message body, answer actions, hover toolbar, thread panel, composer and its formatting field, tool-call disclosure, and mention), the list row and app bar of the application screen around them, and the quiet action's shared recipe. `components.html` links it, so it is their one source. Load it after `tokens.css`, unlayered, as the catalogue does; the parts these components hold, such as the badge and the button, come from their own components.
49
+ - `feedback.css`: the badge's and the alert's styles, with their status tones. It and `conversation.css` size and stroke the icons they hold (the alert's icon, the resolution note's check, the app bar's icons, and the format row's icons), so a page supplies only the SVG sprite, not an icon class. `components.html` links it, so it is their one source; ui-sdk has no badge or alert part. Load it after `tokens.css`, unlayered.
50
50
  - `decisions.md`: the choices behind the components, and the options they replaced.
51
51
  - `reference.html`: an application example, and a Foundations catalogue (`#foundations`) of every token: type, color with contrast, spacing, shape, borders, elevation, focus, and motion.
52
52
  - `docs.html`: a balanced documentation shell and compact setup command, with a one-page site's "On this page" rail.
@@ -625,6 +625,15 @@
625
625
  .appbar-demo .appbar { display: flex; border-bottom: 0; }
626
626
  .composer-box.is-focus { border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
627
627
  .composer-box.is-focus:has(textarea[aria-invalid="true"]) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
628
+ /* The formatting composer's phone frame: conversation.css shows the Aa toggle at tablet width and below, so the frame
629
+ shows it, with the touch sizes, at any width. */
630
+ .composer-phone-demo { width: min(100%, 24rem); --control-sm: var(--control-touch); }
631
+ /* The formatting specimens are CodeMirror's DOM without CodeMirror, so they copy the one base-theme rule that changes
632
+ their layout: line wrapping, which the host turns on. */
633
+ .md-field .cm-lineWrapping { white-space: break-spaces; word-break: break-word; overflow-wrap: anywhere; }
634
+ .composer-phone-demo .composer.is-active .composer-box > .format-toggle { display: inline-flex; }
635
+ .composer-phone-demo .composer:not(:has(.format-toggle[aria-expanded="true"])) .format-row { display: none; }
636
+ .composer-phone-demo .format-row > .format-hint { display: none; }
628
637
  .pane-resize.is-hover { background: color-mix(in srgb, var(--color-accent) 40%, transparent); }
629
638
  .pane-resize.is-focus { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
630
639
  /* The thread panel's frame: a channel column beside the pane, as an application lays them out. */
@@ -1094,6 +1103,10 @@
1094
1103
  <symbol id="i-light" viewBox="0 0 16 16"><circle cx="8" cy="8" r="3"/><path d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.4 3.4l1 1M11.6 11.6l1 1M3.4 12.6l1-1M11.6 4.4l1-1"/></symbol>
1095
1104
  <symbol id="i-more" viewBox="0 0 16 16"><path d="M3 8h.01M8 8h.01M13 8h.01"/></symbol>
1096
1105
  <symbol id="i-reply" viewBox="0 0 16 16"><path d="M6 11 2.5 7.5 6 4"/><path d="M13.5 12.5v-1.5a3.5 3.5 0 0 0-3.5-3.5H2.5"/></symbol>
1106
+ <symbol id="i-bold" viewBox="0 0 16 16"><path d="M4.5 2.5h4a2.75 2.75 0 0 1 0 5.5h-4zM4.5 8h4.75a2.75 2.75 0 0 1 0 5.5H4.5z"/></symbol>
1107
+ <symbol id="i-italic" viewBox="0 0 16 16"><path d="M7 2.5h5.5M3.5 13.5H9M9.75 2.5l-3.5 11"/></symbol>
1108
+ <symbol id="i-code" viewBox="0 0 16 16"><path d="M5.5 4.5 2.5 8l3 3.5M10.5 4.5l3 3.5-3 3.5"/></symbol>
1109
+ <symbol id="i-codeblock" viewBox="0 0 16 16"><rect x="2.5" y="2.5" width="11" height="11" rx="1.5"/><path d="M6.5 6l-2 2 2 2M9.5 6l2 2-2 2"/></symbol>
1097
1110
  <symbol id="i-send" viewBox="0 0 16 16"><path d="M14.5 1.5 10 14.5l-2.5-6-6-2.5z"/><path d="M14.5 1.5l-7 7"/></symbol>
1098
1111
  <symbol id="i-dark" viewBox="0 0 16 16"><path d="M13 9.5A5.5 5.5 0 0 1 6.5 3a5.5 5.5 0 1 0 6.5 6.5z"/></symbol>
1099
1112
  </svg>
@@ -1155,7 +1168,7 @@
1155
1168
  </div>
1156
1169
  <div class="navlist" role="group" aria-labelledby="rail-conversation">
1157
1170
  <span class="group-label" id="rail-conversation">Conversation</span>
1158
- <a href="#message-row" data-terms="message row conversation one message: avatar, author, time, and body, with no bubble. chat post comment reply">Message row</a><a href="#message-group" data-terms="message group conversation consecutive messages by one author under one avatar. chat continuation day divider">Message group</a><a href="#message-body" data-terms="message body conversation a message’s markdown, drawn as text: lists, code, quotes, links, and tables. markdown code block table task list">Message body</a><a href="#answer-actions" data-terms="answer actions conversation yes, no, and reply under a question that waits for the reader. needs you quick reply answered">Answer actions</a><a href="#hover-toolbar" data-terms="hover toolbar conversation quick actions on a message, shown on hover or focus. message actions reply">Hover toolbar</a><a href="#thread-panel" data-terms="thread panel conversation a resizable side pane with a message and its replies. thread replies side pane split resize">Thread panel</a><a href="#composer" data-terms="composer conversation one growing field with an inline send button. message input chat box send reply">Composer</a><a href="#tool-call-disclosure" data-terms="tool-call disclosure conversation a collapsed one-line summary of tool output or a handoff note. details collapse expand log handoff">Tool-call disclosure</a><a href="#mention" data-terms="mention conversation an inline @name in a message. at name user">Mention</a>
1171
+ <a href="#message-row" data-terms="message row conversation one message: avatar, author, time, and body, with no bubble. chat post comment reply">Message row</a><a href="#message-group" data-terms="message group conversation consecutive messages by one author under one avatar. chat continuation day divider">Message group</a><a href="#message-body" data-terms="message body conversation a message’s markdown, drawn as text: lists, code, quotes, links, and tables. markdown code block table task list">Message body</a><a href="#answer-actions" data-terms="answer actions conversation yes, no, and reply under a question that waits for the reader. needs you quick reply answered">Answer actions</a><a href="#hover-toolbar" data-terms="hover toolbar conversation quick actions on a message, shown on hover or focus. message actions reply">Hover toolbar</a><a href="#thread-panel" data-terms="thread panel conversation a resizable side pane with a message and its replies. thread replies side pane split resize">Thread panel</a><a href="#composer" data-terms="composer conversation one growing field with an inline send button, and formatting buttons while you write. message input chat box send reply markdown formatting bold codemirror">Composer</a><a href="#tool-call-disclosure" data-terms="tool-call disclosure conversation a collapsed one-line summary of tool output or a handoff note. details collapse expand log handoff">Tool-call disclosure</a><a href="#mention" data-terms="mention conversation an inline @name in a message. at name user">Mention</a>
1159
1172
  </div>
1160
1173
  <div class="navlist" role="group" aria-labelledby="rail-code">
1161
1174
  <span class="group-label" id="rail-code">Code and examples</span>
@@ -1193,7 +1206,7 @@
1193
1206
  <div><h3><a href="#group-containers">Containers and overlays</a></h3><ul><li><a href="#surface-and-card">Surface and card</a><span>Panels and cards for parallel, comparable content.</span></li><li><a href="#figure">Figure</a><span>An image or diagram with a caption.</span></li><li><a href="#dialog">Dialog</a><span>A modal task that needs an answer before the page continues.</span></li><li><a href="#drawer">Drawer</a><span>Navigation in a panel from the leading edge, such as phone navigation.</span></li><li><a href="#slideout">Slideout</a><span>A modal panel from an edge for filters and secondary detail.</span></li></ul></div>
1194
1207
  <div><h3><a href="#group-data-display">Data display</a></h3><ul><li><a href="#description-list">Description list</a><span>The details of one record as term and value pairs.</span></li><li><a href="#stat-tile">Stat tile</a><span>A headline count with its label and context.</span></li><li><a href="#list-row">List row</a><span>One line per item in a list to scan, such as todos or work items.</span></li></ul></div>
1195
1208
  <div><h3><a href="#group-navigation">Navigation</a></h3><ul><li><a href="#navigation-list">Navigation list</a><span>Rows of links with current page and current location.</span></li><li><a href="#section-rail">Section rail</a><span>A sticky list of sections that moves into a drawer on phones.</span></li><li><a href="#find-field">Find field</a><span>Filter a navigation list as you type.</span></li><li><a href="#breadcrumbs">Breadcrumbs</a><span>The path from the site to this page.</span></li><li><a href="#pager">Pager</a><span>Previous and next pages in a sequence.</span></li><li><a href="#tabs">Tabs</a><span>Switch panels about one object, without leaving the page.</span></li><li><a href="#skip-link">Skip link</a><span>Jump past the header to the content.</span></li><li><a href="#keyboard-key">Keyboard key</a><span>Show a key or shortcut in text.</span></li><li><a href="#app-bar">App bar</a><span>The view’s name and the menu at tablet width, in place of the sidebar.</span></li></ul></div>
1196
- <div><h3><a href="#group-conversation">Conversation</a></h3><ul><li><a href="#message-row">Message row</a><span>One message: avatar, author, time, and body, with no bubble.</span></li><li><a href="#message-group">Message group</a><span>Consecutive messages by one author under one avatar.</span></li><li><a href="#message-body">Message body</a><span>A message’s Markdown, drawn as text: lists, code, quotes, links, and tables.</span></li><li><a href="#answer-actions">Answer actions</a><span>Yes, No, and Reply under a question that waits for the reader.</span></li><li><a href="#hover-toolbar">Hover toolbar</a><span>Quick actions on a message, shown on hover or focus.</span></li><li><a href="#thread-panel">Thread panel</a><span>A resizable side pane with a message and its replies.</span></li><li><a href="#composer">Composer</a><span>One growing field with an inline send button.</span></li><li><a href="#tool-call-disclosure">Tool-call disclosure</a><span>A collapsed one-line summary of tool output or a handoff note.</span></li><li><a href="#mention">Mention</a><span>An inline @name in a message.</span></li></ul></div>
1209
+ <div><h3><a href="#group-conversation">Conversation</a></h3><ul><li><a href="#message-row">Message row</a><span>One message: avatar, author, time, and body, with no bubble.</span></li><li><a href="#message-group">Message group</a><span>Consecutive messages by one author under one avatar.</span></li><li><a href="#message-body">Message body</a><span>A message’s Markdown, drawn as text: lists, code, quotes, links, and tables.</span></li><li><a href="#answer-actions">Answer actions</a><span>Yes, No, and Reply under a question that waits for the reader.</span></li><li><a href="#hover-toolbar">Hover toolbar</a><span>Quick actions on a message, shown on hover or focus.</span></li><li><a href="#thread-panel">Thread panel</a><span>A resizable side pane with a message and its replies.</span></li><li><a href="#composer">Composer</a><span>One growing field with an inline send button, and formatting buttons while you write.</span></li><li><a href="#tool-call-disclosure">Tool-call disclosure</a><span>A collapsed one-line summary of tool output or a handoff note.</span></li><li><a href="#mention">Mention</a><span>An inline @name in a message.</span></li></ul></div>
1197
1210
  <div><h3><a href="#group-code">Code and examples</a></h3><ul><li><a href="#code-block">Code block</a><span>Source code with an optional header and Copy, and a live example above it.</span></li></ul></div>
1198
1211
  <div><h3><a href="#group-identity">Identity: terminal folio</a></h3><ul><li><a href="#command-plate">Command plate</a><span>A shell command in the code well.</span></li><li><a href="#terminal-capture">Terminal capture</a><span>A recorded terminal screen with a status line.</span></li><li><a href="#site-header">Site header</a><span>The ~/name header with project switcher and appearance.</span></li><li><a href="#page-type-and-helpers">Page type and helpers</a><span>Mono headings, steps, definitions, facts, and the footer.</span></li></ul></div>
1199
1212
  </div>
@@ -1929,8 +1942,8 @@
1929
1942
 
1930
1943
  <section class="component" id="composer" data-layer="Core" data-states="focus disabled busy invalid" aria-labelledby="composer-title">
1931
1944
  <header><h3 id="composer-title">Composer</h3><span class="badge">Core</span><a href="components.md#composer">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="composer" aria-label="Copy link to Composer" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1932
- <p class="purpose">One growing field with an inline send button.</p>
1933
- <dl class="guidance"><dt>Do</dt><dd>Name the field for where the message goes, such as “Reply to desktop-claude”, and say in the hint what happens after sending.</dd><dt>Don’t</dt><dd>A Send label beside the field, or a second field for a title. The composer is one field and one icon.</dd></dl>
1945
+ <p class="purpose">One growing field with an inline send button, and formatting buttons while you write.</p>
1946
+ <dl class="guidance"><dt>Do</dt><dd>Name the field for where the message goes, such as “Reply to desktop-claude”, and say in the hint what happens after sending.</dd><dt>Don’t</dt><dd>A Send label beside the field, a second field for a title, or formatting buttons on an idle composer. An idle composer is one field and one icon.</dd></dl>
1934
1947
  <div class="row"><h4>States</h4><div class="states">
1935
1948
  <div class="state"><div class="composer"><label class="sr-only" for="cmp-live">Reply to desktop-claude</label><div class="composer-box"><textarea id="cmp-live" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-live-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-live-hint">Saved to the board.</p></div><span class="caption">Rest, live: Enter sends and clears the field, and Shift+Enter starts a new line</span></div>
1936
1949
  <div class="state" inert><div class="composer"><label class="sr-only" for="cmp-typing">Reply, typing</label><div class="composer-box"><textarea id="cmp-typing" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-typing-hint">Scroll for now.
@@ -1941,6 +1954,13 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
1941
1954
  <div class="state" inert><div class="composer"><label class="sr-only" for="cmp-invalid">Reply, refused</label><div class="composer-box"><textarea id="cmp-invalid" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-invalid-hint" aria-invalid="true" aria-errormessage="cmp-invalid-error">Push the fix to acme/private-repo</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="field-error" id="cmp-invalid-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="cmp-invalid-hint">Saved to the board.</p></div><span class="caption">Invalid: refused, nothing saved</span></div>
1942
1955
  <div class="state" inert><div class="composer"><label class="sr-only" for="cmp-invalid-focus">Reply, refused and focused</label><div class="composer-box is-focus"><textarea id="cmp-invalid-focus" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-invalid-focus-hint" aria-invalid="true" aria-errormessage="cmp-invalid-focus-error">Push the fix to acme/private-repo</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="field-error" id="cmp-invalid-focus-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="cmp-invalid-focus-hint">Saved to the board.</p></div><span class="caption">Invalid while focused</span></div>
1943
1956
  <div class="state" inert><div class="composer"><label class="sr-only" for="cmp-offline">Reply, offline</label><div class="composer-box"><textarea id="cmp-offline" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-offline-hint" disabled></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-offline-hint">Offline: the board server can’t be reached. Sending comes back when it can.</p></div><span class="caption">Disabled: offline, with the reason in the hint</span></div>
1957
+ <div class="state wide" inert><div class="composer"><div class="composer-box"><div class="md-field"><div class="cm-editor"><div class="cm-scroller"><div class="cm-content cm-lineWrapping" role="textbox" aria-multiline="true" contenteditable="true" spellcheck="true" autocorrect="on" autocapitalize="sentences" aria-label="Reply to desktop-claude" aria-describedby="fmt-rest-hint"><div class="cm-line"><span class="cm-placeholder" aria-hidden="true">Reply to desktop-claude</span><br></div></div></div></div></div><button class="quiet-action format-toggle" type="button" aria-label="Formatting" aria-expanded="false" aria-controls="fmt-rest-format"><span aria-hidden="true">Aa</span></button><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><div class="format-row" id="fmt-rest-format" role="group" aria-label="Formatting"><button class="quiet-action" type="button" aria-label="Bold" aria-keyshortcuts="Control+B"><svg class="icon" aria-hidden="true"><use href="#i-bold"/></svg></button><button class="quiet-action" type="button" aria-label="Italic" aria-keyshortcuts="Control+I"><svg class="icon" aria-hidden="true"><use href="#i-italic"/></svg></button><button class="quiet-action" type="button" aria-label="Code"><svg class="icon" aria-hidden="true"><use href="#i-code"/></svg></button><button class="quiet-action" type="button" aria-label="Code block"><svg class="icon" aria-hidden="true"><use href="#i-codeblock"/></svg></button><button class="quiet-action" type="button" aria-label="List"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg></button><button class="quiet-action" type="button" aria-label="Link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="format-hint">Markdown</span></div><p class="composer-hint" id="fmt-rest-hint">Saved to the board.</p></div><span class="caption">Formatting field at rest: one line, the format row hidden until the composer is active</span></div>
1958
+ <div class="state wide" inert><div class="composer is-active"><div class="composer-box"><div class="md-field"><div class="cm-editor cm-focused"><div class="cm-scroller"><div class="cm-content cm-lineWrapping" role="textbox" aria-multiline="true" contenteditable="true" spellcheck="true" autocorrect="on" autocapitalize="sentences" aria-label="Reply to desktop-claude" aria-describedby="fmt-writing-hint"><div class="cm-line">Add it, but <span class="md-strong mk">**</span><span class="md-strong">merge</span><span class="md-strong mk">**</span> with what’s <span class="md-em mk">_</span><span class="md-em">already</span><span class="md-em mk">_</span> there:</div><div class="cm-line"><span class="mk">-</span> print what changed, like <span class="mk">`</span><span class="md-code">devchat doctor</span><span class="mk">`</span></div><div class="cm-line md-fence"><span class="mk">```</span>json</div><div class="cm-line md-fence"><span class="md-code">"excludedCommands": ["devchat *"]</span></div><div class="cm-line md-fence"><span class="mk">```</span></div><div class="cm-line">See <span class="md-link mk">[</span><span class="md-link">the setup notes</span><span class="md-link mk">](</span><span class="md-link">https://devchat.local/setup</span><span class="md-link mk">)</span>.</div></div></div></div></div><button class="quiet-action format-toggle" type="button" aria-label="Formatting" aria-expanded="false" aria-controls="fmt-writing-format"><span aria-hidden="true">Aa</span></button><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><div class="format-row" id="fmt-writing-format" role="group" aria-label="Formatting"><button class="quiet-action" type="button" aria-label="Bold" aria-keyshortcuts="Control+B"><svg class="icon" aria-hidden="true"><use href="#i-bold"/></svg></button><button class="quiet-action" type="button" aria-label="Italic" aria-keyshortcuts="Control+I"><svg class="icon" aria-hidden="true"><use href="#i-italic"/></svg></button><button class="quiet-action" type="button" aria-label="Code"><svg class="icon" aria-hidden="true"><use href="#i-code"/></svg></button><button class="quiet-action" type="button" aria-label="Code block"><svg class="icon" aria-hidden="true"><use href="#i-codeblock"/></svg></button><button class="quiet-action" type="button" aria-label="List"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg></button><button class="quiet-action" type="button" aria-label="Link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="format-hint">Markdown</span></div><p class="composer-hint" id="fmt-writing-hint">Saved to the board.</p></div><span class="caption">Writing: the marks stay, muted; bold, italic, code, a fence, and a link draw as they will send, and the format row shows while the composer is active</span></div>
1959
+ <div class="state wide" inert><div class="composer is-active"><div class="composer-box"><div class="md-field"><div class="cm-editor cm-focused"><div class="cm-scroller"><div class="cm-content cm-lineWrapping" role="textbox" aria-multiline="true" contenteditable="true" spellcheck="true" autocorrect="on" autocapitalize="sentences" aria-label="Reply to desktop-claude" aria-describedby="fmt-invalid-hint" aria-invalid="true" aria-errormessage="fmt-invalid-error"><div class="cm-line">Push the fix to <span class="mk">`</span><span class="md-code">acme/private-repo</span><span class="mk">`</span></div></div></div></div></div><button class="quiet-action format-toggle" type="button" aria-label="Formatting" aria-expanded="false" aria-controls="fmt-invalid-format"><span aria-hidden="true">Aa</span></button><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><div class="format-row" id="fmt-invalid-format" role="group" aria-label="Formatting"><button class="quiet-action" type="button" aria-label="Bold" aria-keyshortcuts="Control+B"><svg class="icon" aria-hidden="true"><use href="#i-bold"/></svg></button><button class="quiet-action" type="button" aria-label="Italic" aria-keyshortcuts="Control+I"><svg class="icon" aria-hidden="true"><use href="#i-italic"/></svg></button><button class="quiet-action" type="button" aria-label="Code"><svg class="icon" aria-hidden="true"><use href="#i-code"/></svg></button><button class="quiet-action" type="button" aria-label="Code block"><svg class="icon" aria-hidden="true"><use href="#i-codeblock"/></svg></button><button class="quiet-action" type="button" aria-label="List"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg></button><button class="quiet-action" type="button" aria-label="Link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="format-hint">Markdown</span></div><p class="field-error" id="fmt-invalid-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="fmt-invalid-hint">Saved to the board.</p></div><span class="caption">Invalid while focused: refused, the text kept</span></div>
1960
+ <div class="state wide" inert><div class="composer is-active"><div class="composer-box"><div class="md-field"><div class="cm-editor cm-focused"><div class="cm-scroller"><div class="cm-content cm-lineWrapping" role="textbox" aria-multiline="true" contenteditable="true" aria-readonly="true" spellcheck="true" autocorrect="on" autocapitalize="sentences" aria-label="Reply to desktop-claude" aria-describedby="fmt-busy-hint"><div class="cm-line">Scroll for now. <span class="md-strong mk">**</span><span class="md-strong">Wrap</span><span class="md-strong mk">**</span> needs a design pass.</div></div></div></div></div><button class="quiet-action format-toggle" type="button" aria-label="Formatting" aria-expanded="false" aria-controls="fmt-busy-format" disabled><span aria-hidden="true">Aa</span></button><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send" aria-busy="true" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><div class="format-row" id="fmt-busy-format" role="group" aria-label="Formatting"><button class="quiet-action" type="button" aria-label="Bold" aria-keyshortcuts="Control+B" disabled><svg class="icon" aria-hidden="true"><use href="#i-bold"/></svg></button><button class="quiet-action" type="button" aria-label="Italic" aria-keyshortcuts="Control+I" disabled><svg class="icon" aria-hidden="true"><use href="#i-italic"/></svg></button><button class="quiet-action" type="button" aria-label="Code" disabled><svg class="icon" aria-hidden="true"><use href="#i-code"/></svg></button><button class="quiet-action" type="button" aria-label="Code block" disabled><svg class="icon" aria-hidden="true"><use href="#i-codeblock"/></svg></button><button class="quiet-action" type="button" aria-label="List" disabled><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg></button><button class="quiet-action" type="button" aria-label="Link" disabled><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="format-hint">Markdown</span></div><p class="composer-hint" id="fmt-busy-hint">Saved to the board.</p></div><span class="caption">Busy: sending; the editor is read-only and keeps the text and focus, and the format buttons are disabled</span></div>
1961
+ <div class="state wide" inert><div class="composer"><div class="composer-box"><div class="md-field"><div class="cm-editor"><div class="cm-scroller"><div class="cm-content cm-lineWrapping" role="textbox" aria-multiline="true" contenteditable="false" spellcheck="true" autocorrect="on" autocapitalize="sentences" aria-label="Reply to desktop-claude" aria-describedby="fmt-offline-hint"><div class="cm-line"><span class="cm-placeholder" aria-hidden="true">Reply to desktop-claude</span><br></div></div></div></div></div><button class="quiet-action format-toggle" type="button" aria-label="Formatting" aria-expanded="false" aria-controls="fmt-offline-format" disabled><span aria-hidden="true">Aa</span></button><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><div class="format-row" id="fmt-offline-format" role="group" aria-label="Formatting"><button class="quiet-action" type="button" aria-label="Bold" aria-keyshortcuts="Control+B" disabled><svg class="icon" aria-hidden="true"><use href="#i-bold"/></svg></button><button class="quiet-action" type="button" aria-label="Italic" aria-keyshortcuts="Control+I" disabled><svg class="icon" aria-hidden="true"><use href="#i-italic"/></svg></button><button class="quiet-action" type="button" aria-label="Code" disabled><svg class="icon" aria-hidden="true"><use href="#i-code"/></svg></button><button class="quiet-action" type="button" aria-label="Code block" disabled><svg class="icon" aria-hidden="true"><use href="#i-codeblock"/></svg></button><button class="quiet-action" type="button" aria-label="List" disabled><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg></button><button class="quiet-action" type="button" aria-label="Link" disabled><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="format-hint">Markdown</span></div><p class="composer-hint" id="fmt-offline-hint">Offline: the board server can’t be reached. Sending comes back when it can.</p></div><span class="caption">Disabled: offline, the editor not editable</span></div>
1962
+ <div class="state wide" inert><div class="composer-phone-demo"><div class="composer is-active"><div class="composer-box"><div class="md-field"><div class="cm-editor cm-focused"><div class="cm-scroller"><div class="cm-content cm-lineWrapping" role="textbox" aria-multiline="true" contenteditable="true" spellcheck="true" autocorrect="on" autocapitalize="sentences" aria-label="Reply to desktop-claude" aria-describedby="fmt-phone-hint"><div class="cm-line">Scroll for now. <span class="md-strong mk">**</span><span class="md-strong">Wrap</span><span class="md-strong mk">**</span> needs a design pass.</div></div></div></div></div><button class="quiet-action format-toggle" type="button" aria-label="Formatting" aria-expanded="false" aria-controls="fmt-phone-format"><span aria-hidden="true">Aa</span></button><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><div class="format-row" id="fmt-phone-format" role="group" aria-label="Formatting"><button class="quiet-action" type="button" aria-label="Bold" aria-keyshortcuts="Control+B"><svg class="icon" aria-hidden="true"><use href="#i-bold"/></svg></button><button class="quiet-action" type="button" aria-label="Italic" aria-keyshortcuts="Control+I"><svg class="icon" aria-hidden="true"><use href="#i-italic"/></svg></button><button class="quiet-action" type="button" aria-label="Code"><svg class="icon" aria-hidden="true"><use href="#i-code"/></svg></button><button class="quiet-action" type="button" aria-label="Code block"><svg class="icon" aria-hidden="true"><use href="#i-codeblock"/></svg></button><button class="quiet-action" type="button" aria-label="List"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg></button><button class="quiet-action" type="button" aria-label="Link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="format-hint">Markdown</span></div><p class="composer-hint" id="fmt-phone-hint">Saved to the board.</p></div></div><span class="caption">Phone, writing: Aa sits before Send, and the format row waits for it</span></div>
1963
+ <div class="state wide" inert><div class="composer-phone-demo"><div class="composer is-active"><div class="composer-box"><div class="md-field"><div class="cm-editor"><div class="cm-scroller"><div class="cm-content cm-lineWrapping" role="textbox" aria-multiline="true" contenteditable="true" spellcheck="true" autocorrect="on" autocapitalize="sentences" aria-label="Reply to desktop-claude" aria-describedby="fmt-phone-open-hint"><div class="cm-line">Scroll for now. <span class="md-strong mk">**</span><span class="md-strong">Wrap</span><span class="md-strong mk">**</span> needs a design pass.</div></div></div></div></div><button class="quiet-action format-toggle" type="button" aria-label="Formatting" aria-expanded="true" aria-controls="fmt-phone-open-format"><span aria-hidden="true">Aa</span></button><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><div class="format-row" id="fmt-phone-open-format" role="group" aria-label="Formatting"><button class="quiet-action" type="button" aria-label="Bold" aria-keyshortcuts="Control+B"><svg class="icon" aria-hidden="true"><use href="#i-bold"/></svg></button><button class="quiet-action" type="button" aria-label="Italic" aria-keyshortcuts="Control+I"><svg class="icon" aria-hidden="true"><use href="#i-italic"/></svg></button><button class="quiet-action" type="button" aria-label="Code"><svg class="icon" aria-hidden="true"><use href="#i-code"/></svg></button><button class="quiet-action" type="button" aria-label="Code block"><svg class="icon" aria-hidden="true"><use href="#i-codeblock"/></svg></button><button class="quiet-action" type="button" aria-label="List"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg></button><button class="quiet-action" type="button" aria-label="Link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="format-hint">Markdown</span></div><p class="composer-hint" id="fmt-phone-open-hint">Saved to the board.</p></div></div><span class="caption">Phone, Aa open: the format row at touch size</span></div>
1944
1964
  </div></div>
1945
1965
  </section>
1946
1966
 
@@ -639,14 +639,14 @@ Layer: Core.
639
639
 
640
640
  Layer: Core.
641
641
 
642
- - **Anatomy.** A box that holds one auto-growing `<textarea>` and an inline send button, with a one-line hint below it. The box is a field: `--color-field-bg`, a 1px `--color-field-edge` border, `--radius-panel`, and `--shadow-field`, with 5px (`0.3125rem`) padding inside its 1px border, 6px from its outer edge, and `--space-3` at the start. The textarea has no edge, fill, or ring of its own: `field-sizing: content`, at least `--control-sm` tall and at most 10rem before it scrolls, with no resize handle, in `--text-md` with line height 1.45. The send button is an icon-only primary [button](#button) at `sm`: a 28px circle with the SVG send icon. The 6px around it keeps the circle clear of the box's 12px corner; a circle is not a nested rectangle, so the concentric rule does not apply. It stays at the bottom of the box as the text grows. The hint is `--text-xs` `--color-muted`, `--space-1` below the box, and says where the message goes, such as "Saved to the board". An error, in the [field wrapper](#field-wrapper)'s error type, sits between the box and the hint.
643
- - **States.** Rest (empty or typing), focus (the [field focus](#rules-for-every-control) on the box: `--color-accent` edge and `--shadow-field-focus`, no ring), busy (sending: the send button takes the button's busy state, and the textarea is `readonly`, keeping its text and focus without dimming, until the server accepts it, so nothing typed meanwhile is lost when the field clears), invalid (refused: `--color-error` edge, `--shadow-field-focus-invalid` while focused, the reason as inline error text, and nothing saved), and disabled (offline: the box takes the disabled field look, the send button its own, and the hint says why). The send button keeps the primary button's own look.
642
+ - **Anatomy.** A box that holds one auto-growing `<textarea>` and an inline send button, with a one-line hint below it. The box is a field: `--color-field-bg`, a 1px `--color-field-edge` border, `--radius-panel`, and `--shadow-field`, with 5px (`0.3125rem`) padding inside its 1px border, 6px from its outer edge, and `--space-3` at the start. The textarea has no edge, fill, or ring of its own: `field-sizing: content`, at least `--control-sm` tall and at most 10rem before it scrolls, with no resize handle, in `--text-md` with line height 1.45. The send button is an icon-only primary [button](#button) at `sm`: a 28px circle with the SVG send icon. The 6px around it keeps the circle clear of the box's 12px corner; a circle is not a nested rectangle, so the concentric rule does not apply. It stays at the bottom of the box as the text grows. The hint is `--text-xs` `--color-muted`, `--space-1` below the box, and says where the message goes, such as "Saved to the board". An error, in the [field wrapper](#field-wrapper)'s error type, sits between the box and the hint. The field is a `<textarea>`, or a formatting field: a plain-text Markdown editor the host supplies, such as CodeMirror 6, which keeps the stored text exactly as typed and draws it with live styling. The formatting field mounts in a `.md-field` element in the textarea's place, at the textarea's size and type: at least `--control-sm` tall, at most 10rem before it scrolls, and `--text-md` `--font-ui` with line height 1.45. Its DOM is the editor's own, `.md-field > .cm-editor > .cm-scroller > .cm-content > .cm-line`, one `.cm-line` per line of text. The host turns on line wrapping (`EditorView.lineWrapping`) and leaves out the drawn selection and cursor (`drawSelection`), so the browser draws its own. It loads the Markdown language as `markdown({ addKeymap: false, pasteURLAsLink: false })`: the Markdown keymap would take Enter to continue a list, so Enter would never send, and a pasted URL would rewrite the selection into a link, even while the field is read-only. Its highlighter maps the Markdown parser's tags to the token classes with `HighlightStyle.define` and `class`: the marks (`processingInstruction`: asterisks, underscores, backticks, list bullets, heading and quote marks, and a link's brackets) to `.mk`, `strong` to `.md-strong`, `emphasis` to `.md-em`, `monospace` to `.md-code`, and `link` and `url` to `.md-link`. A line decoration adds `.md-fence` to each line of a fenced code block. Bold text is semibold, emphasis italic, code `--font-mono` at `--text-code`, and a link `--color-link`. A mark stays in the text, `--color-muted`, upright, and regular, even inside the run it opens. A fence's lines form one well: `--color-code` with `--space-1` inline padding, inside the editor's scroller, which would clip anything outside it, and square, because each line is its own box. The placeholder (`.cm-placeholder`) is `--color-muted`. A formatting composer adds a format row `--space-1` under the box: icon-only [quiet actions](#quiet-action), `--control-sm` square and 2px apart, in `--color-muted` with 16px SVG icons, for Bold, Italic, Code, Code block, List, and Link, then a `--text-xs` "Markdown" hint at its end. The row shows only while the composer is active, which means focus anywhere in the composer or text in the field; the host sets `.is-active` on `.composer` then, so an idle composer stays one line. On a phone an Aa toggle, a quiet action showing "Aa" in `--text-sm` semibold, sits between the field and the send button while the composer is active, and the row shows only while the toggle is open. The toggle is always in the markup; the CSS shows it only at tablet width and below.
643
+ - **States.** Rest (empty or typing), focus (the [field focus](#rules-for-every-control) on the box: `--color-accent` edge and `--shadow-field-focus`, no ring), busy (sending: the send button takes the button's busy state, and the textarea is `readonly`, keeping its text and focus without dimming, until the server accepts it, so nothing typed meanwhile is lost when the field clears), invalid (refused: `--color-error` edge, `--shadow-field-focus-invalid` while focused, the reason as inline error text, and nothing saved), and disabled (offline: the box takes the disabled field look, the send button its own, and the hint says why). The send button keeps the primary button's own look. The formatting field reads the editor's own markers: focus is `.cm-focused` on `.cm-editor`; busy is the editor's read-only state, which keeps the text and focus, with the format buttons disabled; invalid is `aria-invalid="true"` on `.cm-content`; and disabled is the editor's non-editable state, `contenteditable="false"` on `.cm-content`, which dims the text to 0.58 as the disabled textarea does. The open Aa toggle keeps a 12% `currentColor` tint and `--color-text`.
644
644
  - **Do.** Name the field for where the message goes, such as "Reply to desktop-claude", and say in the hint what happens after sending.
645
- - **Don't.** A Send label beside the field, or a second field for a title. The composer is one field and one icon.
646
- - **Keyboard and screen reader.** The textarea has a visible or visually hidden `<label>`, and `aria-describedby` names the hint. Enter sends, and Shift+Enter starts a new line. Enter while an input method is composing text belongs to the input method, so it does not send. Text that is empty or only spaces does not send. Once the server accepts a message, the field clears and keeps focus. The send button has `aria-label="Send"`; while it is busy, a second Enter or click does nothing. A refused message keeps the text in the field, sets `aria-invalid="true"`, and names the error with `aria-errormessage`. Offline, the textarea and the button are `disabled`, and the hint gives the reason.
647
- - **Motion.** None: as for the input, the focus and invalid edges change at once.
648
- - **Forced colors.** As for the search field: the box's edge draws as the system field edge, and a focused composer draws a `Highlight` outline 1px inside its edge, because the inset line drops. The invalid edge relies on its error text.
649
- - **Touch.** At tablet width (`max-width: 800px`) the textarea is at least `--control-touch` tall and the send button grows to a `--control-touch` circle, as every icon-only button does.
645
+ - **Don't.** A Send label beside the field, a second field for a title, or formatting buttons on an idle composer. An idle composer is one field and one icon.
646
+ - **Keyboard and screen reader.** The textarea has a visible or visually hidden `<label>`, and `aria-describedby` names the hint. Enter sends, and Shift+Enter starts a new line. Enter while an input method is composing text belongs to the input method, so it does not send. Text that is empty or only spaces does not send. Once the server accepts a message, the field clears and keeps focus. The send button has `aria-label="Send"`; while it is busy, a second Enter or click does nothing. A refused message keeps the text in the field, sets `aria-invalid="true"`, and names the error with `aria-errormessage`. Offline, the textarea and the button are `disabled`, and the hint gives the reason. The formatting field's `.cm-content` has `role="textbox"` and `aria-multiline="true"` from the editor. A `<label for>` cannot name it, so the host sets `aria-label`, or `aria-labelledby` naming a visible label, and `aria-describedby` for the hint through the editor's content attributes, as it sets `aria-invalid` and `aria-errormessage` on a refused message. The editor turns spellcheck, autocorrect, and autocapitalize off; a message field turns them back on (`spellcheck="true"`, `autocorrect="on"`, `autocapitalize="sentences"`). Enter, Shift+Enter, input-method composition, and blank text behave as in the textarea, and Tab leaves the field, because the host binds no Tab key. Enter does not continue a list; Shift+Enter starts the next line, and the writer types the bullet. The format row is a `role="group"` named "Formatting", and each button is in Tab order with an `aria-label` naming its format. A button wraps the field's selection in its marks, or puts empty marks at the cursor, and leaves focus and the selection in the field: a pointer press does not take focus (the host cancels its `mousedown`), and a keyboard press moves focus back to the field. Ctrl+B and Ctrl+I (Cmd on macOS) apply bold and italic, and the Bold and Italic buttons give those keys in `aria-keyshortcuts`. Every formatting command, from a button or a key, does nothing while the editor is read-only (`view.state.readOnly`), because a change made while sending is lost when the field clears. A dropped file does nothing: the host's own `drop` handler (`EditorView.domEventHandlers` at a higher precedence than the editor's) cancels a drop that carries files, because CodeMirror reads a dropped file later and inserts it even after the field has turned read-only. A drop of text stays with the editor. The composer stays active while focus moves inside it: on `focusout` the host checks `relatedTarget`, so moving from the field to a format button keeps the row. The Aa toggle has `aria-label="Formatting"`, with "Aa" hidden from screen readers, `aria-expanded`, and `aria-controls` naming the row; the host closes it when the composer goes idle. Offline, the editor is not editable, and the format buttons and the toggle are `disabled`.
647
+ - **Motion.** None: as for the input, the focus and invalid edges change at once, and the format row shows and hides at once.
648
+ - **Forced colors.** As for the search field: the box's edge draws as the system field edge, and a focused composer draws a `Highlight` outline 1px inside its edge, because the inset line drops. The invalid edge relies on its error text. The open Aa toggle loses its tint, so it draws a `Highlight` border. A fence loses its well, and its backtick marks carry it.
649
+ - **Touch.** At tablet width (`max-width: 800px`) the textarea is at least `--control-touch` tall and the send button grows to a `--control-touch` circle, as every icon-only button does. The formatting field is at least `--control-touch` tall too. Formatting waits for the Aa toggle: the toggle and each format button are `--control-touch` squares, the row wraps when the composer is narrower than its six buttons, and the "Markdown" hint hides.
650
650
 
651
651
  ## Tool-call disclosure
652
652
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * The conversation components as components.md specifies them: message row, message group, message body,
3
- * answer actions, hover toolbar, thread panel, composer, tool-call disclosure, and mention; the list row and
3
+ * answer actions, hover toolbar, thread panel, composer (with its formatting field), tool-call disclosure, and mention; the list row and
4
4
  * the app bar that an application screen around them uses; and the quiet action they hold. components.html
5
5
  * links this file, so it is the one source of these rules; copy markup from the catalogue's sections.
6
6
  *
@@ -142,13 +142,49 @@
142
142
  /* The padding centres one line in --control-sm; each further line adds a line, up to 10rem. */
143
143
  .composer-box textarea { flex: 1 1 0; min-width: 0; min-height: var(--control-sm); max-height: 10rem; padding: calc((var(--control-sm) - 1lh) / 2) 0; border: 0; outline: 0; resize: none; field-sizing: content; background: transparent; color: var(--color-text); font: var(--text-md) / 1.45 var(--font-ui); overflow-wrap: anywhere; }
144
144
  .composer-box textarea::placeholder { color: var(--color-muted); opacity: 1; }
145
- .composer-box:has(textarea:focus-visible) { border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
146
- .composer-box:has(textarea[aria-invalid="true"]) { border-color: var(--color-error); }
147
- .composer-box:has(textarea[aria-invalid="true"]):has(textarea:focus-visible) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
148
- .composer-box:has(textarea:disabled) { background: var(--color-well); box-shadow: none; }
145
+ .composer-box:has(textarea:focus-visible, .md-field .cm-focused) { border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
146
+ .composer-box:has(textarea[aria-invalid="true"], .md-field .cm-content[aria-invalid="true"]) { border-color: var(--color-error); }
147
+ .composer-box:has(textarea[aria-invalid="true"], .md-field .cm-content[aria-invalid="true"]):has(textarea:focus-visible, .md-field .cm-focused) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
148
+ .composer-box:has(textarea:disabled, .md-field .cm-content[contenteditable="false"]) { background: var(--color-well); box-shadow: none; }
149
149
  .composer-box textarea:disabled { opacity: 0.58; cursor: not-allowed; }
150
150
  .composer-hint { color: var(--color-muted); font-size: var(--text-xs); }
151
151
 
152
+ /* The formatting field: a plain-text Markdown editor the host supplies (CodeMirror 6, mounted in .md-field) in place of
153
+ the textarea, with the textarea's size and type. The editor keeps the stored text exactly as typed and only draws it:
154
+ the host's highlighter gives each run a token class, and the box reads the editor's own markers for its states
155
+ (.cm-focused, and aria-invalid and contenteditable on .cm-content). CodeMirror's base theme scopes its rules at two
156
+ classes and can load after this file, so each rule here that overrides one carries three classes or more. */
157
+ .composer-box .md-field { flex: 1 1 0; min-width: 0; color: var(--color-text); font: var(--text-md) / 1.45 var(--font-ui); }
158
+ /* The editor is a column, as CodeMirror's base theme makes it, so at 10rem its scroller shrinks and scrolls. */
159
+ .composer-box .md-field > .cm-editor { display: flex; flex-direction: column; max-height: 10rem; }
160
+ .composer-box .md-field > .cm-editor.cm-focused { outline: 0; }
161
+ .composer-box .md-field .cm-scroller { min-height: 0; overflow-y: auto; font: inherit; }
162
+ .composer-box .md-field .cm-content { min-height: var(--control-sm); padding: calc((var(--control-sm) - 1lh) / 2) 0; caret-color: var(--color-text); }
163
+ .composer-box .md-field .cm-content[contenteditable="false"] { opacity: 0.58; cursor: not-allowed; }
164
+ .composer-box .md-field .cm-line { padding: 0; }
165
+ .composer-box .md-field .cm-placeholder { color: var(--color-muted); }
166
+ /* Bold looks bold and code looks like code; a link takes the link colour. */
167
+ .md-field .md-strong { font-weight: var(--weight-semibold); }
168
+ .md-field .md-em { font-style: italic; }
169
+ .md-field .md-code { font-family: var(--font-mono); font-size: var(--text-code); }
170
+ .md-field .md-link { color: var(--color-link); }
171
+ /* A mark stays in the text, muted and upright, even inside the bold or italic run it opens, so it comes last. */
172
+ .md-field .mk { color: var(--color-muted); font-weight: var(--weight-regular); font-style: normal; }
173
+ /* A fenced code block is a run of lines the host marks .md-fence: one square well, since each line is its own box. The
174
+ well stays inside the scroller, which would clip it, so its text sits --space-1 in from the other lines. */
175
+ .composer-box .md-field .cm-line.md-fence { padding-inline: var(--space-1); background: var(--color-code); color: var(--color-code-text); font-family: var(--font-mono); font-size: var(--text-code); }
176
+
177
+ /* The format row: quiet formatting buttons under the box while the composer is active (focus anywhere in it, or text in
178
+ the field), so an idle composer is one line. On a phone the row waits for the Aa toggle, which sits before Send. */
179
+ .format-row { display: flex; align-items: center; gap: 0.125rem; }
180
+ .composer:not(.is-active) .format-row { display: none; }
181
+ .format-row > .quiet-action, .composer-box > .format-toggle { flex: none; width: var(--control-sm); height: var(--control-sm); padding: 0; }
182
+ :where(.format-row) > .quiet-action, :where(.composer-box) > .format-toggle { color: var(--color-muted); }
183
+ .format-row > .quiet-action > svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
184
+ .format-row > .format-hint { margin-inline-start: auto; color: var(--color-muted); font-size: var(--text-xs); }
185
+ .composer-box > .format-toggle { display: none; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
186
+ .composer-box > .format-toggle[aria-expanded="true"] { color: var(--color-text); background: color-mix(in srgb, currentColor 12%, transparent); }
187
+
152
188
  /* ---------- Thread panel ---------- */
153
189
  /* A side pane whose start edge is a resize handle. The page lays it out beside the message list. */
154
190
  .thread-pane { position: relative; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--color-border-subtle); }
@@ -206,7 +242,9 @@ a.row-text:focus-visible { outline: none; }
206
242
  /* ---------- Forced colors ---------- */
207
243
  @media (forced-colors: active) {
208
244
  /* The inset accent line drops, so a focused composer draws the system ring just inside its edge. */
209
- .composer-box:has(textarea:focus-visible) { outline: var(--focus-width) solid Highlight; outline-offset: -1px; }
245
+ .composer-box:has(textarea:focus-visible, .md-field .cm-focused) { outline: var(--focus-width) solid Highlight; outline-offset: -1px; }
246
+ /* The open Aa toggle loses its tint, so it takes a system border; the fence's well drops and its marks carry it. */
247
+ .composer-box > .format-toggle[aria-expanded="true"] { border-color: Highlight; }
210
248
  /* The open thread's message loses its fill, so it takes the list selection's system border; the padding absorbs it. */
211
249
  .msg[aria-current="true"] { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-2) - 2px); }
212
250
  /* An SVG keeps the colour it sets, and the tag's dot is a fill, so both take the system text colour; the words carry them. */
@@ -229,6 +267,12 @@ a.row-text:focus-visible { outline: none; }
229
267
  .answered > summary { min-height: var(--control-touch); align-items: center; }
230
268
  .answered > summary::before { align-self: center; margin-top: 0; }
231
269
  .composer-box textarea { min-height: var(--control-touch); padding-block: calc((var(--control-touch) - 1lh) / 2); }
270
+ /* tokens.css raises --control-sm to --control-touch here, so the formatting field and the buttons grow on their own.
271
+ Formatting waits for Aa: the toggle shows once the composer is active, and the row only while it is open. */
272
+ .composer.is-active .composer-box > .format-toggle { display: inline-flex; }
273
+ .composer:not(:has(.format-toggle[aria-expanded="true"])) .format-row { display: none; }
274
+ .format-row { flex-wrap: wrap; }
275
+ .format-row > .format-hint { display: none; }
232
276
  /* The thread pane takes the full width below the message list, and the handle hides. */
233
277
  .thread-pane { border-left: 0; border-top: 1px solid var(--color-border-subtle); }
234
278
  .pane-resize { display: none; }
@@ -38,6 +38,7 @@ Each entry records a choice this language made, the options it rejected, and why
38
38
  | Floating-menu rows | Core | Rows inside a floating menu, such as the project menu, are concentric with the menu: `calc(var(--radius-panel) - var(--space-1))`, as select picker rows are. That was 12px inside a 16px menu; since radius scale B (2026-11-22) it is 8px inside a 12px menu, the row corner. The owner approved it from the DS-3b comparison. | 6px like rail rows: a 6px row inside a 16px panel looks pinched. | row corners: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one" |
39
39
  | One-line non-action controls | Core | A one-line control that is not an action takes the field corner (`--radius-field`, 8px since radius scale B, 2026-11-22; 10px before), as a select does: the select, the project-menu trigger, the labelled contents trigger and its no-JavaScript summary ("On this page"), and the skip link. The project trigger keeps the quiet-action tint. The owner chose it on 2026-11-10. Since radius scale B (2026-11-22) actions and fields both take 8px (see Shape follows role), so both tokens render the same; these controls keep the field token, so a later change to the action corner leaves them alone. | The action corner (`--radius-control`), a pill until 2026-11-22: a pill meant an action, and these controls open a menu or list, pick a value, or move focus. 16px (`--radius-panel`), like the menu and other floating layers: on a one-line control 40 to 44px tall it reads almost as a pill. | field corners: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one"; the field token rather than the action token: no test, because both render 10px |
40
40
  | Quieter conversation | Core | Owner approval of the devchat mockups, revision 4, on 2026-12-01. Only a blocking question carries a tag (Blocked on you); an open question carries none, because the Needs you list and the thread's Needs you badge already say it waits. The Agent mark is left out where every author but the reader is an agent, because the mono name sets them apart. Questions in Needs you take answer actions: Yes and No as secondary buttons and a Reply link, and the answered ones fold into one disclosure line. A message body renders its Markdown, headings at body size and code blocks that wrap. Lists for scanning, such as todos and work items, are one-line list rows, not message rows. At tablet width an application screen has one app bar (Menu, the view's name, one action) and its sidebar moves into ui-sdk's drawer, whose backdrop is the scrim. `conversation.css` ships these rules and the quiet action's shared recipe, so an app that loads only the package draws the app bar's icon actions. The open todo's mark is `.row-check`, not `.check`, which is the catalogue's checkbox label. | An "Asks you" tag on every open question: in a list of questions it repeated the list's own name on each row. Sideways-scrolling lists on a phone: most items sat off screen. A separate `.scrim` class: ui-sdk's drawer backdrop draws it already. Code blocks that scroll: a scrolling region needs a Tab stop, and a phone page scrolled sideways. Message rows for todos: an avatar and a header line on every item made a list to scan read as a conversation. Ghost icon-only buttons in the app bar: an icon with no fill at rest is a quiet action. | parts, groups, and states agreement: `tests/component-parts.test.mjs` and `tests/design-foundations.test.mjs`; the new parts drawn from the package stylesheets alone: `tests/catalogue/package-styles.spec.ts` |
41
+ | Formatting composer | Core | Owner approval of the devchat mockups, revision 4, on 2026-12-01, with the phone's Aa toggle. The composer may hold a formatting field: a plain-text Markdown editor the host supplies (CodeMirror 6), so the stored text is exactly what was typed and bold, italic, code, fences, and links draw live, with their marks visible and muted. The spec fixes the editor's DOM (`.md-field > .cm-editor > .cm-scroller > .cm-content > .cm-line`), the token classes the host's highlighter assigns, and the editor markers the box reads for its states, so the catalogue can show it without loading the editor. Formatting buttons show only while the composer is active, and on a phone only after Aa. The fence's well is square because each of its lines is its own box. The textarea composer stays specified for hosts without an editor. | A rich-text (WYSIWYG) editor such as Tiptap, Lexical, or Milkdown: each rewrites underscores, tildes, asterisks, and brackets, and Tiptap turned a raw `<b>` into bold in a round trip, so the stored text would not match what was typed. Formatting buttons on an idle composer: an idle composer is one line. A `role="toolbar"` format row: it asks the host for roving focus and arrow keys for six buttons. The editor's drawn selection and cursor: the browser's own follow the theme and forced colors. | the formatting field against CodeMirror's base theme loaded after the package, and the phone's Aa: `tests/catalogue/package-styles.spec.ts`; the Composer's parts and states: `tests/component-parts.test.mjs` and `tests/design-foundations.test.mjs` |
41
42
  | Optical label centring | Core | A text-only navigation row and the breadcrumb centre their label on the cap height with `text-box: trim-both cap alphabetic`, inside `@supports`; a row becomes a block with `align-content: center` for it, and `--space-2` block padding keeps a wrapped label clear of its fill's edges. Browsers without `text-box` keep the flex centring of the line box. Buttons, tabs, and segmented options already centre their ink within 0.5px, so they are unchanged; Chromium does not trim a button's label in any case. | Centring the line box alone: it keeps descender room, so a label without descenders, such as "Overview", sat 1.25px above centre in the 44px header row (15.75px above the ink, 18.25px below). `text-box` on the flex row itself: Chromium trims only block containers, and the label's anonymous flex item does not inherit the trim. A fixed nudge in em: it depends on the font's metrics, which an identity can change. | label inside the fill, and centred: `tests/site/site.spec.ts` "a wrapped navigation row or crumb keeps its label inside the fill and focus ring in ${colorScheme}", "the breadcrumb centres its link's ink in ${colorScheme}" |
42
43
  | Rail current section | Core | In a section rail the current section takes the current-page look: `--color-nav-current` fill, `--shadow-nav-current`, and `--color-nav-current-text`, with no pip. It keeps `aria-current="location"`. Strips and contents lists keep the pip. In forced colors it takes the current page's 2px `Highlight` leading border. The owner chose it at Gate M, so the rail's place reads like the live site's current page. | The pip in the rail too, as in strips and contents lists: the owner preferred the rail to match the site's current-page look. | rule present on pages: `tests/design-foundations.test.mjs` "example pages copy the state rules of every component variant their markup uses"; recipe: no test yet |
43
44
  | Tab glide | Core | The selected tab's fill is a `::before` layer that glides between tabs like the segmented thumb: `glide-left` and `glide-right`, 260ms leading and 300ms trailing, with CSS `ease`. No glide on first render or under reduced motion, and no layer in forced colors. The owner chose it at Gate M. | The fill jumping from tab to tab, unlike the segmented control beside it. | glide and reduced motion: `tests/catalogue/catalogue.spec.ts` "the tab fill glides to the new tab", "the tab fill moves at once" |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@filipgutica/design-system",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Filip's design language, tokens, and component catalogue for any framework",
5
5
  "type": "module",
6
6
  "sideEffects": [