@alis-build/design-system 0.27.1 → 0.28.1

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/alisx.css CHANGED
@@ -61,6 +61,7 @@
61
61
  --info: light-dark(var(--blue-600), #a9c1ff);
62
62
  --inverse-surface: light-dark(var(--petrol-800), var(--mist-100));
63
63
  --on-inverse-surface: light-dark(var(--paper-100), var(--petrol-800));
64
+ --code-surface: light-dark(var(--paper-75), #2c353b);
64
65
  --machine-surface: light-dark(var(--petrol-800), #0f1418);
65
66
  --on-machine-surface: light-dark(var(--paper-100), var(--mist-100));
66
67
  --paper: var(--paper-0);
@@ -212,6 +213,7 @@
212
213
  --info: var(--blue-600);
213
214
  --inverse-surface: var(--petrol-800);
214
215
  --on-inverse-surface: var(--paper-100);
216
+ --code-surface: var(--paper-75);
215
217
  --machine-surface: var(--petrol-800);
216
218
  --on-machine-surface: var(--paper-100);
217
219
  --shadow-key: rgba(16, 24, 40, 0.16);
@@ -269,6 +271,7 @@
269
271
  --info: #a9c1ff;
270
272
  --inverse-surface: var(--mist-100);
271
273
  --on-inverse-surface: var(--petrol-800);
274
+ --code-surface: #2c353b;
272
275
  --machine-surface: #0f1418;
273
276
  --on-machine-surface: var(--mist-100);
274
277
  --shadow-key: rgba(0, 0, 0, 0.4);
@@ -824,9 +827,9 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
824
827
  .prose blockquote>:last-child{margin-bottom:0}
825
828
  .prose blockquote :is(cite,footer){display:block;margin-top:var(--space-4);font-style:normal;font-size:14px;line-height:20px;color:var(--on-surface-variant)}
826
829
  .prose hr{margin:var(--prose-gap,24px) 0;border:0;border-top:1px solid var(--outline-variant)}
827
- :not(pre)>code{padding:0 var(--space-4);border-radius:var(--radius-xs);background:var(--surface-container-highest);font-family:var(--font-mono)}
830
+ :not(pre)>code{padding:0 var(--space-4);border-radius:var(--radius-xs);background:var(--surface-container-highest);color:var(--syntax-function);font-family:var(--font-mono)}
828
831
  .prose code{font-size:var(--prose-code-size,14px)}
829
- .prose pre{margin:0 0 var(--prose-gap,24px);padding:var(--space-12) var(--space-16);border-radius:var(--radius-md);background:var(--surface-container-highest);overflow-x:auto;font-family:var(--font-mono)}
832
+ .prose pre{margin:0 0 var(--prose-gap,24px);padding:var(--space-12) var(--space-16);border-radius:var(--radius-md);background:var(--code-surface);box-shadow:inset 0 0 0 1px var(--outline-variant);overflow-x:auto;font-family:var(--font-mono)}
830
833
  /* Syntax colours: Shiki's css-variables theme reads these, so code is highlighted once and follows the theme it sits in */
831
834
  :where(:root){--shiki-foreground:var(--syntax-plain);--shiki-background:transparent;--shiki-token-keyword:var(--syntax-keyword);--shiki-token-string:var(--syntax-string);--shiki-token-string-expression:var(--syntax-string);--shiki-token-constant:var(--syntax-number);--shiki-token-function:var(--syntax-function);--shiki-token-comment:var(--syntax-comment);--shiki-token-parameter:var(--syntax-plain);--shiki-token-punctuation:var(--syntax-plain);--shiki-token-link:var(--syntax-string)}
832
835
  .prose table{width:100%;border-collapse:collapse;margin:0 0 var(--prose-gap,24px)}
@@ -838,7 +841,23 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
838
841
  .prose :is(th,td) :is(p,li){font-size:inherit;line-height:inherit;margin:0}
839
842
  .prose img{max-width:100%;height:auto}
840
843
  .prose sup{font-size:12px;line-height:0}
841
- .prose pre code{padding:0;background:transparent;white-space:pre}
844
+ .prose pre code{padding:0;background:transparent;color:inherit;font:inherit;white-space:pre}
845
+
846
+ /* ── Code block · code to read or copy, edged on its own ground; a command to run, on the machine ground ── */
847
+ .app-code{position:relative;min-width:0;margin:0;border-radius:var(--radius-md);background:var(--code-surface);box-shadow:inset 0 0 0 1px var(--outline-variant);color:var(--syntax-plain)}
848
+ .prose .app-code{margin:0 0 var(--prose-gap,24px)}
849
+ .app-code__head{display:flex;align-items:center;gap:var(--space-8);min-height:40px;padding:var(--space-4) var(--space-4) 0 var(--space-16)}
850
+ .app-code__name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--on-surface-variant)}
851
+ .app-code .app-icon-btn{flex:none;width:32px;height:32px}
852
+ .app-code .app-code__body{margin:0;padding:var(--space-4) var(--space-16) var(--space-12);border-radius:0;background:none;box-shadow:none;overflow-x:auto;font-family:var(--font-mono);font-size:14px;line-height:20px;white-space:pre;tab-size:2}
853
+ .app-code__body code{padding:0;background:none;color:inherit;font:inherit}
854
+ .app-code.is-folded .app-code__body{max-height:calc(12 * 20px + var(--space-4));overflow-y:hidden;-webkit-mask-image:linear-gradient(to bottom,currentColor calc(100% - 40px),transparent);mask-image:linear-gradient(to bottom,currentColor calc(100% - 40px),transparent)}
855
+ .app-code__foot{padding:0 var(--space-8) var(--space-8)}
856
+ .app-code--command{display:flex;align-items:center;gap:var(--space-4);padding:var(--space-4) var(--space-4) var(--space-4) var(--space-16);background:var(--machine-surface);box-shadow:none;color:var(--on-machine-surface)}
857
+ .app-code--command .app-code__body{flex:1;padding:var(--space-8) 0}
858
+ .app-code__caret{color:var(--signal);-webkit-user-select:none;user-select:none}
859
+ .app-code--command .app-icon-btn{color:var(--on-machine-surface)}
860
+ @media print{.app-code{box-shadow:none}.app-code.is-folded .app-code__body{max-height:none;-webkit-mask-image:none;mask-image:none}.app-code .app-icon-btn,.app-code__foot{display:none}}
842
861
 
843
862
  /* ── Composer · where you write to Alis, an agent or a person: tray, editor, row; one line below ── */
844
863
  .app-composer{position:relative;display:flex;flex-direction:column;gap:var(--space-8);width:100%;max-width:var(--measure-prose);margin-inline:auto}
package/classes.json CHANGED
@@ -86,6 +86,13 @@
86
86
  "app-chip--warning",
87
87
  "app-chip-group",
88
88
  "app-chip__close",
89
+ "app-code",
90
+ "app-code--command",
91
+ "app-code__body",
92
+ "app-code__caret",
93
+ "app-code__foot",
94
+ "app-code__head",
95
+ "app-code__name",
89
96
  "app-combo",
90
97
  "app-combo__input",
91
98
  "app-combo__list",
@@ -343,6 +350,7 @@
343
350
  "is-dragged",
344
351
  "is-error",
345
352
  "is-failed",
353
+ "is-folded",
346
354
  "is-gone",
347
355
  "is-interactive",
348
356
  "is-invalid",
@@ -423,6 +431,7 @@
423
431
  "--cat6-container",
424
432
  "--chart-neutral",
425
433
  "--chat-row",
434
+ "--code-surface",
426
435
  "--container",
427
436
  "--control-height",
428
437
  "--cyan-200",
@@ -0,0 +1,69 @@
1
+ # AppCodeBlock
2
+
3
+ Code to read or copy, set apart from the words around it: a snippet in Alis's reply, a sample on a settings page, an excerpt of a file. And a command to run, on the machine ground.
4
+
5
+ ## Use / don't use
6
+
7
+ - **A snippet** (`.app-code`) sits on `code-surface`, edged in `outline-variant`, at `radius-md`. A message is a filled shape with no edge, so code never reads as one. The code is mono at 14/20 in the syntax roles ([colour.md](../rules/colour.md)), highlighted once through Shiki's css-variables theme, so it follows the theme it sits in.
8
+ - **A command to run** (`.app-code--command` with `.app-machine`) is one line on `machine-surface`, dark in both themes, led by a `❯` in `signal`. It has no head: Copy ends the line and copies the command without the caret. One command per block, so each copies alone; a script of several lines is a snippet named Shell.
9
+ - **The head** names the code and holds Copy. Name it by its **file** when it comes from one (`services.ts`, in `.text-mono`), otherwise by its **language as people say it** (TypeScript, Go, Shell, JSON, YAML, SQL, HTML, CSS); leave the name out when neither is known. The name is meta in `on-surface-variant`.
10
+ - **Copy** is a 32px [AppIconButton](AppIconButton.md) at the head's end (`content_copy`), always shown, since a touch screen has no hover. It copies the source exactly, never a caret or a line number. Copied, the glyph turns to `check` and its name to "Copied" for 2 seconds. No snackbar: a reply can hold several blocks, and the answer stays on the one you pressed.
11
+ - **Long code folds.** Over 15 lines shows the first 12 (`is-folded`), fading at the cut, with a text [AppButton](AppButton.md) below that counts what's there: "Show all 48 lines". Open, it reads "Show less".
12
+ - **A whole file is not a code block.** A file Alis made is an [AppAttachment](AppAttachment.md) tile that opens [AppFilePane](AppFilePane.md), where line numbers, Preview / Code and Download live. A block in a reply is an excerpt.
13
+ - **Never wrapped, never numbered.** A long line scrolls sideways inside the block, on a phone too, and the block takes the reply's full width. No line numbers: they belong to the file pane. A prompt to paste is words, not code, so it wraps.
14
+ - **Never tabs** for variants (npm, pnpm, yarn; one language or another): there are no tabs in content ([page.md](../rules/page.md)). Show the one that fits.
15
+ - **While Alis is still writing**, the block grows line by line and Copy appears when it is complete.
16
+ - **Inline code** is not this component: in a line of text, `code` is mono on a `surface-container-highest` chip in `syntax-function` ink, never bold, never the link colour ([type.md](../rules/type.md)). A bare `<pre>` inside `.prose` takes this block's ground and edge on its own, without a head; give it the head when someone will copy it.
17
+ - **What a machine returned** in a step (a command's output, a query's rows) is [AppTurn](AppTurn.md)'s output, not a code block.
18
+
19
+ ## Markup
20
+
21
+ ```html
22
+ <!-- A snippet, named by its file -->
23
+ <div class="app-code" role="group" aria-label="services.ts">
24
+ <div class="app-code__head">
25
+ <span class="app-code__name text-meta text-mono">services.ts</span>
26
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Copy" title="Copy"><span class="app-icon" aria-hidden="true">content_copy</span></button>
27
+ </div>
28
+ <pre class="app-code__body" tabindex="0"><code><!-- Shiki's highlighted lines --></code></pre>
29
+ </div>
30
+
31
+ <!-- Named by its language -->
32
+ <div class="app-code" role="group" aria-label="TypeScript">
33
+ <div class="app-code__head">
34
+ <span class="app-code__name text-meta">TypeScript</span>
35
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Copy" title="Copy"><span class="app-icon" aria-hidden="true">content_copy</span></button>
36
+ </div>
37
+ <pre class="app-code__body" tabindex="0"><code>const hash = process.env.ALIS_RUN_HASH</code></pre>
38
+ </div>
39
+
40
+ <!-- Folded: over 15 lines, the first 12 -->
41
+ <div class="app-code is-folded" role="group" aria-label="vite.config.ts">
42
+ <div class="app-code__head">
43
+ <span class="app-code__name text-meta text-mono">vite.config.ts</span>
44
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Copy" title="Copy"><span class="app-icon" aria-hidden="true">content_copy</span></button>
45
+ </div>
46
+ <pre class="app-code__body" id="code-vite" tabindex="0"><code><!-- all 48 lines --></code></pre>
47
+ <div class="app-code__foot"><button type="button" class="app-btn app-state app-target" aria-expanded="false" aria-controls="code-vite">Show all 48 lines</button></div>
48
+ </div>
49
+
50
+ <!-- A command to run -->
51
+ <div class="app-code app-code--command app-machine" role="group" aria-label="Command">
52
+ <pre class="app-code__body" tabindex="0"><span class="app-code__caret" aria-hidden="true">❯ </span><code>make run</code></pre>
53
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Copy command" title="Copy command"><span class="app-icon" aria-hidden="true">content_copy</span></button>
54
+ </div>
55
+
56
+ <!-- Inline, in a line of text -->
57
+ <p>The server reads <code>ALIS_RUN_HASH</code> at start.</p>
58
+ ```
59
+
60
+ ## Behaviour you must supply
61
+
62
+ - **Copy** writes the source to the clipboard (the command alone, for a command). Then set the glyph to `check` and `aria-label` and `title` to "Copied", say "Copied" in a polite live region, and put both back after 2 seconds.
63
+ - **The fold**: add `is-folded` when the code is over 15 lines. The button removes it and reads "Show less" with `aria-expanded="true"`; pressing again folds it and keeps the block in view.
64
+ - **Highlight** with Shiki's css-variables theme (`--shiki-token-*`), which `alisx.css` maps to the syntax roles; never a stock theme. A language you can't highlight stays plain, in `syntax-plain`.
65
+ - **While it streams**, leave Copy out until the block is complete, and fold it only once it is.
66
+
67
+ ## Classes
68
+
69
+ `.app-code`, `.app-code--command`, `.is-folded`, `.app-code__head`, `.app-code__name`, `.app-code__body`, `.app-code__caret`, `.app-code__foot`, with `.app-machine` on a command, `.app-icon-btn` and `.app-state` on Copy, `.app-btn` on the fold.
@@ -46,7 +46,7 @@ A column of lattices: wrap them in your own layout element (flex column, `gap: v
46
46
 
47
47
  ## Behaviour you must supply
48
48
 
49
- - None. Render markdown to HTML yourself and drop it inside `.prose`; it styles bare `h1`–`h6`, `p`, `ul`/`ol`, `blockquote`, `pre`/`code`, `table`, `hr`, `img`, `a`.
49
+ - None. Render markdown to HTML yourself and drop it inside `.prose`; it styles bare `h1`–`h6`, `p`, `ul`/`ol`, `blockquote`, `pre`/`code`, `table`, `hr`, `img`, `a`. Render a fenced block someone will copy as [AppCodeBlock](AppCodeBlock.md), with its name and Copy.
50
50
 
51
51
  ## Classes
52
52
 
@@ -26,7 +26,7 @@ See [page.md](../rules/page.md).
26
26
 
27
27
  The tabs scroll under it; the filter row is unchanged. The bar has no hairline at rest; add one (an `outline-variant` inset shadow) while content scrolls under it. Mark the parts that exist on only one side `app-compact-only` or `app-wide-only`, so one markup serves both.
28
28
 
29
- **Detail bar** (`app-titlebar--detail`), the bar of a detail pane beside a list: a close icon button leading, the selected thing's name in section-title (the screen already has its page-title), and one row under the name: the thing's state first when it has one (a small chip), then its verbs as text buttons in the bar's order, wrapping in a narrow pane, so a 360px pane never truncates the name and the bar stays two rows. Where the pane's content is a centred column (a conversation at the prose measure), the bar aligns to that column. No search, no tabs. On a phone the pane covers the window and its close becomes back (`arrow_back`). The pane pads it; add nothing.
29
+ **Detail bar** (`app-titlebar--detail`), the bar of a detail pane beside a list: a close icon button leading, the selected thing's name in section-title (the screen already has its page-title), and one row under the name: the thing's state first when it has one (a small chip), then its verbs as text buttons in the bar's order, wrapping in a narrow pane, so a 360px pane never truncates the name and the bar stays two rows. It keeps the pane's edges even when the content is a centred column (a conversation at the prose measure): only the content is the column. No search, no tabs. On a phone the pane covers the window and its close becomes back (`arrow_back`). The pane pads it; add nothing.
30
30
 
31
31
  ## Markup
32
32
 
@@ -37,6 +37,7 @@ Shared conventions: `app-state` gives anything pressable its hover, focus and pr
37
37
  | AppDisclosure | Detail few people need, folded under its title | [AppDisclosure.md](AppDisclosure.md) |
38
38
  | AppLattice | Content you read; the transcript and `.prose` | [AppLattice.md](AppLattice.md) |
39
39
  | AppComposer | Where you write to Alis, an agent or a person; voice and live calls | [AppComposer.md](AppComposer.md) |
40
+ | AppCodeBlock | Code to read or copy, edged on its own ground; a command to run, on the machine ground | [AppCodeBlock.md](AppCodeBlock.md) |
40
41
  | AppAttachment | A file, a thing shared into the conversation, or a queued message, in the composer's tray and in the sent message | [AppAttachment.md](AppAttachment.md) |
41
42
  | AppVoiceView | A live call given the content area, or the screen on a phone | [AppVoiceView.md](AppVoiceView.md) |
42
43
  | AppTurn | A turn in a conversation: your bubble, Alis's prose, anyone else under a who-line; Alis's work, actions, voice notes; people's states and requests | [AppTurn.md](AppTurn.md) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alis-build/design-system",
3
- "version": "0.27.1",
3
+ "version": "0.28.1",
4
4
  "description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks, words and rules.",
5
5
  "keywords": ["alisx", "design-system", "design-tokens", "css"],
6
6
  "homepage": "https://alisx.com",
package/rules/colour.md CHANGED
@@ -115,7 +115,12 @@ in this order:
115
115
  - **Code takes the syntax roles**, the category hues at a text tone:
116
116
  `syntax-keyword` violet, `-string` mint, `-number` apricot, `-function` rose,
117
117
  `-comment` the second ink, `-plain` the ink. Sky is left out: it sits too close
118
- to `primary`, and code is not something you press.
118
+ to `primary`, and code is not something you press. Inline code takes
119
+ `syntax-function` on its chip.
120
+ - **Code has its own ground**, `code-surface`, edged in `outline-variant`
121
+ ([AppCodeBlock](../components/AppCodeBlock.md)). A message is filled and never
122
+ edged, so a snippet never reads as one. A command to run is on
123
+ `machine-surface`.
119
124
 
120
125
  ## The AI identity
121
126
 
@@ -146,7 +151,7 @@ do, and spends a data colour on decoration.
146
151
  search hit, a transcript match. Never a status, a category or a selection. The
147
152
  active mark is the same fill plus an underline.
148
153
  - **`machine-surface`** with `on-machine-surface` is the ground for machine
149
- speech only: a code block on the machine ground, a terminal, a canvas that draws
154
+ speech only: a command to run, a terminal, a canvas that draws
150
155
  light on dark. Use it through `.app-machine`, which keeps it dark in both themes
151
156
  ([themes.md](themes.md)). A dialog hero or a band is never dark in the product,
152
157
  and a media stage is black ([styling.md](styling.md)).
package/rules/page.md CHANGED
@@ -72,15 +72,17 @@ means another route.
72
72
  The same bar: the close button leading in flow, the name left, and renaming it or
73
73
  switching to a sibling as small icon buttons beside the name. Never a centred
74
74
  title with the close button pinned absolutely, never the name inside a pill
75
- button, and never the name again as a title in the body.
75
+ button, and never the name again as a title in the body. The bar keeps the
76
+ screen's edges: when the body is text at the prose measure, only the text is the
77
+ centred column.
76
78
 
77
79
  **A detail pane** beside a list is part of the same screen, which already has its
78
80
  page-title, so its bar names the selected thing in `text-section-title`
79
81
  (`.app-titlebar--detail`). The row under the name holds the thing's state first,
80
82
  when it has one, then its verbs, and wraps when the pane is narrow: the name never
81
- truncates and the bar stays two rows. Where the pane's content is a centred column
82
- (a conversation at the prose measure), the bar aligns to that column, as all
83
- persistent chrome does ([spacing.md](spacing.md) § Measure). A notice about that thing sits at
83
+ truncates and the bar stays two rows. It keeps the pane's edges even when the
84
+ content is a centred column (a conversation at the prose measure): only the
85
+ content is the column ([spacing.md](spacing.md) § Measure). A notice about that thing sits at
84
86
  the top of the pane.
85
87
 
86
88
  **A detail pane has a URL**: a query parameter, as search keeps `?q=`. Opening it
package/rules/spacing.md CHANGED
@@ -85,7 +85,10 @@ short paragraphs read in bursts, so the print range of 45 to 75 doesn't apply;
85
85
  - A table in prose caps at 710px; as a view of its own it takes the full width,
86
86
  because a table is scanned, not read.
87
87
  - **All thread content shares one column and one set of edges.**
88
- - **Persistent chrome aligns to the content column**, not to the viewport.
88
+ - **Chrome inside the column aligns to it**, not to the viewport: the composer,
89
+ a column's own heading.
90
+ - **A title bar keeps its edges**, even over a centred column: the name leads at
91
+ the bar's start and the verbs end it. Only the content is the column.
89
92
 
90
93
  ## Layout
91
94
 
package/rules/themes.md CHANGED
@@ -77,7 +77,7 @@ other rules hold in both themes:
77
77
 
78
78
  ## Machine speech is a dark section
79
79
 
80
- Code on the machine ground, a terminal, the AI code ground: **`.app-machine`**
80
+ A command to run, a terminal, the AI code ground: **`.app-machine`**
81
81
  (and `.app-ai-ground`) sets the ground and makes everything inside it take its
82
82
  dark values, in either theme. Syntax colours, links and buttons inside follow
83
83
  on their own. Put it on the block itself (Shiki's `<pre>` is fine: its inline
@@ -87,8 +87,8 @@ ink on paper.
87
87
  Anything inside `.app-ai-ground` takes dark values too, a button or a link on
88
88
  the gradient included, in either theme.
89
89
 
90
- Code on a light ground (prose, the editor) takes the syntax roles in the
91
- page's theme. The syntax roles (`syntax-keyword`, `-string`, `-number`,
90
+ Code on a light ground (a snippet on `code-surface`, prose, the editor) takes
91
+ the syntax roles in the page's theme. The syntax roles (`syntax-keyword`, `-string`, `-number`,
92
92
  `-function`, `-comment`, `-plain`) are the category hues at a text tone; never
93
93
  `primary`, because code is not something you press. `alisx.css` maps them to
94
94
  Shiki's css-variables theme (`--shiki-token-*`), so code is highlighted once and
package/rules/type.md CHANGED
@@ -126,7 +126,7 @@ subtitle is never body.
126
126
  | An empty line inside working content | one supporting line ([page.md](page.md)) |
127
127
  | An empty state inside working content with a heading and a hint | supporting on both, and report the copy: [page.md](page.md) asks for one line |
128
128
  | A drop target's line | supporting, in `primary` while something is dragged over |
129
- | Code | `.text-mono`, in ink, with supporting when someone copies it (a command, a prompt) and meta when it is a value (an id, a hash, a version) |
129
+ | Code | `.text-mono`, with supporting when someone copies it (a command, a prompt) and meta when it is a value (an id, a hash, a version). A block of it is [AppCodeBlock](../components/AppCodeBlock.md), in the syntax roles. Inline code in a line of text is mono on its chip in `syntax-function` ink, so it stands apart from the words around it: never bold, never the link colour |
130
130
  | Rendered markdown | `.prose` on the container (`.prose-compact` to step it down under its own heading), no role on the wrapper. Its h1 is section-title; h2–h6 are body size at 600, h3–h6 in `on-surface-variant`, and compact steps both down at the same weight. A plain fallback line beside it takes supporting on its own element |
131
131
  | Text on a sheet painted with a colour | the sheet's ink: no ink override, no disabled ink. The role still sets size and weight |
132
132
  | A tab's pane | the rules of whatever holds the tabs |
@@ -135,7 +135,8 @@ subtitle is never body.
135
135
 
136
136
  | Role | Ink |
137
137
  | --- | --- |
138
- | body, the titles, label, code, a table cell, the value beside a key | `on-surface`: inherited, write nothing |
138
+ | body, the titles, label, a value outside a line of text (an id, a hash), a table cell, the value beside a key | `on-surface`: inherited, write nothing |
139
+ | inline code in a line of text | `syntax-function`, which `.prose` and the base set for you |
139
140
  | supporting, meta, eyebrow, a key, a second line in a table cell | `on-surface-variant` |
140
141
  | A status line | its status role |
141
142
  | Text inside a component with its own type | the component's |
package/themes.json CHANGED
@@ -24,6 +24,7 @@
24
24
  "info": "#2a5cbe",
25
25
  "inverse-surface": "#27323a",
26
26
  "on-inverse-surface": "#f4f4f2",
27
+ "code-surface": "#f8f8f8",
27
28
  "machine-surface": "#27323a",
28
29
  "on-machine-surface": "#f4f4f2",
29
30
  "paper": "#ffffff",
@@ -95,6 +96,7 @@
95
96
  "info": "#a9c1ff",
96
97
  "inverse-surface": "#dfe7ec",
97
98
  "on-inverse-surface": "#27323a",
99
+ "code-surface": "#2c353b",
98
100
  "machine-surface": "#0f1418",
99
101
  "on-machine-surface": "#dfe7ec",
100
102
  "paper": "#ffffff",
package/tokens.css CHANGED
@@ -61,6 +61,7 @@
61
61
  --info: light-dark(var(--blue-600), #a9c1ff);
62
62
  --inverse-surface: light-dark(var(--petrol-800), var(--mist-100));
63
63
  --on-inverse-surface: light-dark(var(--paper-100), var(--petrol-800));
64
+ --code-surface: light-dark(var(--paper-75), #2c353b);
64
65
  --machine-surface: light-dark(var(--petrol-800), #0f1418);
65
66
  --on-machine-surface: light-dark(var(--paper-100), var(--mist-100));
66
67
  --paper: var(--paper-0);
@@ -212,6 +213,7 @@
212
213
  --info: var(--blue-600);
213
214
  --inverse-surface: var(--petrol-800);
214
215
  --on-inverse-surface: var(--paper-100);
216
+ --code-surface: var(--paper-75);
215
217
  --machine-surface: var(--petrol-800);
216
218
  --on-machine-surface: var(--paper-100);
217
219
  --shadow-key: rgba(16, 24, 40, 0.16);
@@ -269,6 +271,7 @@
269
271
  --info: #a9c1ff;
270
272
  --inverse-surface: var(--mist-100);
271
273
  --on-inverse-surface: var(--petrol-800);
274
+ --code-surface: #2c353b;
272
275
  --machine-surface: #0f1418;
273
276
  --on-machine-surface: var(--mist-100);
274
277
  --shadow-key: rgba(0, 0, 0, 0.4);
package/tokens.json CHANGED
@@ -451,6 +451,16 @@
451
451
  },
452
452
  "usage": "Ink on inverse-surface: the tooltip."
453
453
  },
454
+ {
455
+ "name": "code-surface",
456
+ "register": "product",
457
+ "value": "{paper-75}",
458
+ "values": {
459
+ "light": "{paper-75}",
460
+ "dark": "#2c353b"
461
+ },
462
+ "usage": "The ground of a code block to read or copy (AppCodeBlock, and a bare <pre> in .prose), edged in outline-variant. A message is filled and never edged, so code never reads as one. A command to run is on machine-surface instead."
463
+ },
454
464
  {
455
465
  "name": "machine-surface",
456
466
  "register": "product",
@@ -459,7 +469,7 @@
459
469
  "light": "{petrol-800}",
460
470
  "dark": "#0f1418"
461
471
  },
462
- "usage": "The ground for machine speech: a code block on the machine ground, a terminal, a canvas that draws light on dark. Dark in both themes; in dark it sits below the ground. Use it through .app-machine, which also makes everything inside it take its dark values."
472
+ "usage": "The ground for machine speech: a command to run (AppCodeBlock), a terminal, a canvas that draws light on dark. Dark in both themes; in dark it sits below the ground. Use it through .app-machine, which also makes everything inside it take its dark values."
463
473
  },
464
474
  {
465
475
  "name": "on-machine-surface",
@@ -1111,12 +1121,13 @@
1111
1121
  "syntax-function"
1112
1122
  ],
1113
1123
  "bg": [
1124
+ "code-surface",
1114
1125
  "surface-container-highest",
1115
1126
  "surface",
1116
1127
  "surface-container-low"
1117
1128
  ],
1118
1129
  "min": 4.5,
1119
- "why": "Code on a light ground: prose, the editor."
1130
+ "why": "Code on its own ground, inline code on its chip, and code in the editor."
1120
1131
  },
1121
1132
  {
1122
1133
  "fg": [