@alis-build/design-system 0.27.1 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alisx.css +25 -4
- package/classes.json +10 -0
- package/components/AppCodeBlock.md +69 -0
- package/components/AppFilePane.md +3 -2
- package/components/AppLattice.md +1 -1
- package/components/AppTitleBar.md +5 -3
- package/components/README.md +1 -0
- package/package.json +1 -1
- package/rules/colour.md +7 -2
- package/rules/page.md +6 -4
- package/rules/spacing.md +4 -1
- package/rules/themes.md +3 -3
- package/rules/type.md +3 -2
- package/themes.json +2 -0
- package/tokens.css +3 -0
- package/tokens.json +13 -2
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);
|
|
@@ -551,6 +554,8 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
551
554
|
.app-titlebar__title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
552
555
|
.app-titlebar__leading{margin-left:calc(var(--space-12) * -1)}
|
|
553
556
|
.app-titlebar__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-8);margin-left:auto}
|
|
557
|
+
.app-titlebar.is-scrolled,.app-file-pane__bar.is-scrolled{box-shadow:inset 0 -1px 0 var(--outline-variant)}
|
|
558
|
+
@media (prefers-reduced-motion:no-preference){.app-titlebar,.app-file-pane__bar{transition:box-shadow var(--dur-effects) var(--motion-effects)}}
|
|
554
559
|
.app-search{display:flex;align-items:center;gap:var(--space-8);height:var(--control-height);padding:0 var(--space-16);border-radius:var(--radius-pill);background:var(--surface-container-highest);color:var(--on-surface-variant);font-family:var(--font-sans);font-size:14px}
|
|
555
560
|
.app-search__clear{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin-right:calc(var(--space-8) * -1);padding:0;border:0;border-radius:var(--radius-pill);background:transparent;color:var(--on-surface-variant)}
|
|
556
561
|
.app-search:focus-within{outline:2px solid var(--primary);outline-offset:1px}
|
|
@@ -662,7 +667,7 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
662
667
|
.app-shell--file .app-shell__main .app-titlebar__lead .app-titlebar__label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
|
|
663
668
|
.app-file-pane{display:flex;flex-direction:column;gap:0;min-width:0;min-height:0;background:var(--background)}
|
|
664
669
|
.app-shell__detail>.app-file-pane{flex:1}
|
|
665
|
-
.app-file-pane__bar{flex:none;display:flex;align-items:center;gap:var(--space-8);min-height:64px;padding:var(--space-12)
|
|
670
|
+
.app-file-pane__bar{flex:none;display:flex;align-items:center;gap:var(--space-8);min-height:64px;padding:var(--space-12)}
|
|
666
671
|
.app-file-pane__name{flex:1;min-width:0;display:flex;flex-direction:column}
|
|
667
672
|
.app-file-pane__name>*{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
668
673
|
.app-file-pane__name>.text-meta{color:var(--on-surface-variant)}
|
|
@@ -824,9 +829,9 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
824
829
|
.prose blockquote>:last-child{margin-bottom:0}
|
|
825
830
|
.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
831
|
.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)}
|
|
832
|
+
: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
833
|
.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-
|
|
834
|
+
.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
835
|
/* Syntax colours: Shiki's css-variables theme reads these, so code is highlighted once and follows the theme it sits in */
|
|
831
836
|
: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
837
|
.prose table{width:100%;border-collapse:collapse;margin:0 0 var(--prose-gap,24px)}
|
|
@@ -838,7 +843,23 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
838
843
|
.prose :is(th,td) :is(p,li){font-size:inherit;line-height:inherit;margin:0}
|
|
839
844
|
.prose img{max-width:100%;height:auto}
|
|
840
845
|
.prose sup{font-size:12px;line-height:0}
|
|
841
|
-
.prose pre code{padding:0;background:transparent;white-space:pre}
|
|
846
|
+
.prose pre code{padding:0;background:transparent;color:inherit;font:inherit;white-space:pre}
|
|
847
|
+
|
|
848
|
+
/* ── Code block · code to read or copy, edged on its own ground; a command to run, on the machine ground ── */
|
|
849
|
+
.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)}
|
|
850
|
+
.prose .app-code{margin:0 0 var(--prose-gap,24px)}
|
|
851
|
+
.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)}
|
|
852
|
+
.app-code__name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--on-surface-variant)}
|
|
853
|
+
.app-code .app-icon-btn{flex:none;width:32px;height:32px}
|
|
854
|
+
.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}
|
|
855
|
+
.app-code__body code{padding:0;background:none;color:inherit;font:inherit}
|
|
856
|
+
.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)}
|
|
857
|
+
.app-code__foot{padding:0 var(--space-8) var(--space-8)}
|
|
858
|
+
.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)}
|
|
859
|
+
.app-code--command .app-code__body{flex:1;padding:var(--space-8) 0}
|
|
860
|
+
.app-code__caret{color:var(--signal);-webkit-user-select:none;user-select:none}
|
|
861
|
+
.app-code--command .app-icon-btn{color:var(--on-machine-surface)}
|
|
862
|
+
@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
863
|
|
|
843
864
|
/* ── Composer · where you write to Alis, an agent or a person: tray, editor, row; one line below ── */
|
|
844
865
|
.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",
|
|
@@ -354,6 +362,7 @@
|
|
|
354
362
|
"is-open",
|
|
355
363
|
"is-placeholder",
|
|
356
364
|
"is-played",
|
|
365
|
+
"is-scrolled",
|
|
357
366
|
"is-selected",
|
|
358
367
|
"mono",
|
|
359
368
|
"mono-sm",
|
|
@@ -423,6 +432,7 @@
|
|
|
423
432
|
"--cat6-container",
|
|
424
433
|
"--chart-neutral",
|
|
425
434
|
"--chat-row",
|
|
435
|
+
"--code-surface",
|
|
426
436
|
"--container",
|
|
427
437
|
"--control-height",
|
|
428
438
|
"--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.
|
|
@@ -7,7 +7,7 @@ A file Alis made, opened beside the conversation: a page, a document, an image,
|
|
|
7
7
|
See [page.md](../rules/page.md) § A file beside the conversation.
|
|
8
8
|
|
|
9
9
|
- **It is the shell's detail pane, made wide** ([AppShell](AppShell.md)): `app-shell--file` on the shell, the pane in `.app-shell__detail` with `data-detail-pane`. It has a URL, back closes it, Esc closes it, and the shortcut sheet covers it as it covers any detail pane.
|
|
10
|
-
- **From 1200px wide (`breakpoint-expanded`, where Material 3's large window starts) it sits beside the conversation**, which takes two parts to its three: at 1440 that is a 707px file, the width of a page of prose. **There it is a card**: the file is an object Alis made, not the second half of the page, so it is an instrument, `surface` with its `outline-variant` edge, `radius-lg`, **no shadow** (nothing at rest lifts, and a shadow barely shows in dark). It is inset `space-8` at the top and `space-12` at the right and foot; the gap to the chat is the conversation's own padding. The bar sits inside with
|
|
10
|
+
- **From 1200px wide (`breakpoint-expanded`, where Material 3's large window starts) it sits beside the conversation**, which takes two parts to its three: at 1440 that is a 707px file, the width of a page of prose. **There it is a card**: the file is an object Alis made, not the second half of the page, so it is an instrument, `surface` with its `outline-variant` edge, `radius-lg`, **no shadow** (nothing at rest lifts, and a shadow barely shows in dark). It is inset `space-8` at the top and `space-12` at the right and foot; the gap to the chat is the conversation's own padding. The bar sits inside with no line under it until the file scrolls under it (`is-scrolled`, as on the [title bar](AppTitleBar.md)), and the body scrolls inside, clipped to the radius. Expanded, the same card fills the content area, `space-12` all round. Below 1200 the conversation would wrap every few words, so the file takes the content's place and closing it brings the conversation back. The edge doesn't drag.
|
|
11
11
|
- **Opened from a tile** ([AppAttachment](AppAttachment.md)) where Alis put the file in the reply. **It opens by itself only live**: when the turn that made it ends, you are on the conversation, no other detail pane is open and the window is 1200 or wider. Never when a conversation is reopened, never on a phone, and never where it would cover the reply.
|
|
12
12
|
- **Named by the file**: its description, or else its file name; never by its kind ("File", "Artifact").
|
|
13
13
|
- **No versions.** The file is overwritten in place, so every tile for it opens what is there now, and the meta line says *Latest*.
|
|
@@ -113,8 +113,9 @@ See [page.md](../rules/page.md) § A file beside the conversation.
|
|
|
113
113
|
- **Preview / Code** re-renders the body; the choice belongs to the pane, not the file, and resets to Preview when another file opens.
|
|
114
114
|
- **The frame**: fetch the text and give it to `srcdoc`, with `sandbox="allow-scripts"` and never `allow-same-origin`. Serve it from a separate origin when there is one.
|
|
115
115
|
- **Copy** writes the source to the clipboard and says "Copied" in a snackbar; **Download** saves the file under its own name.
|
|
116
|
+
- **`is-scrolled`** on the bar while the body has left its top, off again at the top.
|
|
116
117
|
- **Missing** (deleted since): the pane shows "This file was deleted" in the can't-load layout with no action, and its tiles turn `is-gone`.
|
|
117
118
|
|
|
118
119
|
## Classes
|
|
119
120
|
|
|
120
|
-
`.app-shell--file`, `.app-shell--file-expanded`, `.app-file-pane`, `.app-file-pane__bar`, `.app-file-pane__name`, `.app-file-pane__tools`, `.app-file-pane__word`, `.app-file-pane__expand`, `.app-file-pane__body`, `.app-file-pane__body--prose`, `.app-file-pane__body--image`, `.app-file-pane__body--paper`, `.app-file-pane__body--source`, `.app-file-pane__body--table`, `.app-file-pane__frame`, `.app-file-pane__source`, `.app-file-pane__line`, `.app-file-pane__state`.
|
|
121
|
+
`.app-shell--file`, `.app-shell--file-expanded`, `.app-file-pane`, `.app-file-pane__bar`, `.is-scrolled`, `.app-file-pane__name`, `.app-file-pane__tools`, `.app-file-pane__word`, `.app-file-pane__expand`, `.app-file-pane__body`, `.app-file-pane__body--prose`, `.app-file-pane__body--image`, `.app-file-pane__body--paper`, `.app-file-pane__body--source`, `.app-file-pane__body--table`, `.app-file-pane__frame`, `.app-file-pane__source`, `.app-file-pane__line`, `.app-file-pane__state`.
|
package/components/AppLattice.md
CHANGED
|
@@ -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
|
|
|
@@ -10,6 +10,7 @@ See [page.md](../rules/page.md).
|
|
|
10
10
|
- **The lead is outlined, never filled**: the action that brings a thing into the screen (`app-btn--outlined`, "New environment"), led by `add` when it is New or Add, and by `edit_square` when it starts a new conversation ("New chat"). Other verbs are default-size text buttons and small icon buttons, and no icon on a single verb. The screen's one filled button belongs in the content. Destructive takes `app-btn--error`.
|
|
11
11
|
- **One order, by weight**: the lead, then text buttons, then icon buttons, ⋯ last ([page.md](../rules/page.md) § The title bar). The lead sits beside the name; ⋯ closes the row at every width, so the phone's bar is the same row folded. A destructive verb is the last before ⋯, or inside it.
|
|
12
12
|
- **Never status.** The bar names the screen and holds its verbs: no meter, no usage ring, no saving state, no count. A thing's state is a chip on the detail bar's row or in the content; an account's usage is a row in the account menu ([AppShell](AppShell.md) § The account menu).
|
|
13
|
+
- **No line at rest.** The bar lies on the ground with the content; a line under it would split the screen into a header and a body. While the bar stays put and content scrolls under it, it takes `is-scrolled`: an `outline-variant` hairline at its foot, gone again at the top. Never a permanent border and never a shadow: a shadow means floating, and the composer and menus float. Tabs keep their own line at every scroll; at rest it is the bar's edge.
|
|
13
14
|
- **The verbs follow the route**: each tab shows the verbs that act on what it shows, and none when there is nothing to act on.
|
|
14
15
|
- **A long name** truncates with an ellipsis and shows in full on hover; never wrap it.
|
|
15
16
|
- **Tabs are routes**, and scroll sideways when they don't fit: each opens another view of this screen (Overview, Interviews, Artifacts). A tab that narrows one list is a filter: put it in the filter row as an [AppSegmented](AppSegmented.md).
|
|
@@ -24,9 +25,9 @@ See [page.md](../rules/page.md).
|
|
|
24
25
|
3. **The lead as its glyph alone**, its label the accessible name. A lead whose glyph wouldn't read on its own ("Generate key", "Install block") leaves the bar and leads ⋯ instead; a lead with no glyph above 600 can carry one for the phone (`edit` for "Edit session", `app-compact-only` on the glyph).
|
|
25
26
|
4. **⋯** (`more_vert`), an [AppMenu](AppMenu.md) holding every other verb in the order they had, anything destructive last behind a divider. Left out when there are none. Rename lives here: never a double tap on the name.
|
|
26
27
|
|
|
27
|
-
The tabs scroll under it; the filter row is unchanged.
|
|
28
|
+
The tabs scroll under it; the filter row is unchanged. Mark the parts that exist on only one side `app-compact-only` or `app-wide-only`, so one markup serves both.
|
|
28
29
|
|
|
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.
|
|
30
|
+
**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
31
|
|
|
31
32
|
## Markup
|
|
32
33
|
|
|
@@ -117,7 +118,8 @@ The tabs scroll under it; the filter row is unchanged. The bar has no hairline a
|
|
|
117
118
|
- **The count** answers the row: the total at rest, "2 of 5" while a query or a filter narrows.
|
|
118
119
|
- **Tabs**: they are routes. Move `is-selected` and `aria-current="page"` to the current tab when the route changes. If your router renders links, `<a class="app-tab app-state" href="…">` takes the same classes.
|
|
119
120
|
- Hide search and the filter row when the list is empty.
|
|
121
|
+
- **`is-scrolled`** on the bar while what scrolls under it has left the top (its `scrollTop` is above 0), and off again at the top. Where the bar scrolls away with the page, nothing is under it: leave it off.
|
|
120
122
|
|
|
121
123
|
## Classes
|
|
122
124
|
|
|
123
|
-
`.app-titlebar`, `.app-titlebar--detail`, `.app-titlebar__row`, `.app-titlebar__name`, `.app-titlebar__leading`, `.app-titlebar__title`, `.app-titlebar__actions`, `.app-titlebar__lead`, `.app-titlebar__label`; `.app-compact-only`, `.app-wide-only`; `.app-tabs`, `.app-tab`, `.is-selected`; `.app-filterrow`, `.app-filterrow__search`, `.app-filterrow__controls`, `.app-filterrow__summary`; `.app-search`, `.app-search__input`, `.app-search__clear`.
|
|
125
|
+
`.app-titlebar`, `.app-titlebar--detail`, `.app-titlebar__row`, `.app-titlebar__name`, `.app-titlebar__leading`, `.app-titlebar__title`, `.app-titlebar__actions`, `.app-titlebar__lead`, `.app-titlebar__label`, `.is-scrolled`; `.app-compact-only`, `.app-wide-only`; `.app-tabs`, `.app-tab`, `.is-selected`; `.app-filterrow`, `.app-filterrow__search`, `.app-filterrow__controls`, `.app-filterrow__summary`; `.app-search`, `.app-search__input`, `.app-search__clear`.
|
package/components/README.md
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "0.29.0",
|
|
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
|
|
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.
|
|
82
|
-
(a conversation at the prose measure)
|
|
83
|
-
|
|
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
|
-
- **
|
|
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
|
-
|
|
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
|
|
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`,
|
|
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,
|
|
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
|
|
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
|
|
1130
|
+
"why": "Code on its own ground, inline code on its chip, and code in the editor."
|
|
1120
1131
|
},
|
|
1121
1132
|
{
|
|
1122
1133
|
"fg": [
|