@alis-build/design-system 0.5.1 → 0.6.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 CHANGED
@@ -84,8 +84,8 @@
84
84
  --chart-neutral: #8c8e8e;
85
85
  --ai-you: #0398cd;
86
86
  --ai-you-container: #d3f2ff;
87
- --ai-alis: #c97409;
88
- --ai-alis-container: #ffe8d2;
87
+ --ai-alis: var(--signal);
88
+ --ai-alis-container: #ffece9;
89
89
  --ai-tail: #19a289;
90
90
  --ai-ground-end: #004f41;
91
91
  --narrative-canvas: var(--paper-25);
@@ -605,6 +605,85 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
605
605
  .prose sup{font-size:12px;line-height:0}
606
606
  .prose pre code{padding:0;background:transparent;white-space:pre}
607
607
 
608
+ /* ── Composer · where you write to Alis, an agent or a person: tray, editor, row; one line below ── */
609
+ .app-composer{position:relative;display:flex;flex-direction:column;gap:var(--space-8);width:100%;max-width:var(--measure-prose);margin-inline:auto}
610
+ .app-composer__box{position:relative;z-index:1;display:flex;flex-direction:column;padding:var(--space-8);border-radius:var(--radius-xl);background:var(--surface);box-shadow:var(--elevation-2);transition:background-color var(--dur-effects) var(--motion-effects),box-shadow var(--dur-effects) var(--motion-effects)}
611
+ .app-composer__tray{display:flex;flex-wrap:wrap;gap:var(--space-8);padding:var(--space-4) var(--space-4) 0}
612
+ .app-composer__editor{min-height:24px;max-height:208px;overflow-y:auto;padding:var(--space-12) var(--space-12) var(--space-4);color:var(--on-surface);font-family:var(--font-sans);font-size:16px;line-height:24px;font-weight:400;overflow-wrap:anywhere}
613
+ .app-composer__input{display:block;width:100%;margin:0;padding:0;border:0;outline:0;resize:none;background:transparent;color:inherit;font:inherit}
614
+ .app-composer__input::placeholder{color:var(--on-surface-variant);opacity:1}
615
+ .app-composer__interim{color:var(--on-surface-variant)}
616
+ .app-composer__row{display:flex;align-items:center;gap:var(--space-4);min-height:40px}
617
+ .app-composer__spacer{flex:1;min-width:0}
618
+ .app-composer__row>.app-chip{min-width:0;max-width:240px;margin-left:var(--space-4)}
619
+ .app-composer__row>.app-chip>span:not(.app-icon){overflow:hidden;text-overflow:ellipsis}
620
+ /* The trailing button: the one filled icon button, concentric with the 28px corner (20 + 8) */
621
+ .app-composer__go{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;padding:0;border:0;border-radius:var(--radius-pill);background:var(--primary);color:var(--on-primary)}
622
+ @media (prefers-reduced-motion:no-preference){.app-composer__go{transition:transform var(--dur-spatial) var(--motion-spatial)}.app-composer__go:not(:disabled):active{transform:scale(.94)}}
623
+ /* Recording: the level wears ai-you, the voice light's "you're speaking" */
624
+ .app-composer__meter{flex:1;min-width:0;height:32px;display:flex;align-items:center;justify-content:center;gap:3px;overflow:hidden;color:var(--ai-you)}
625
+ .app-composer__meter>i{display:block;flex:none;width:3px;height:4px;border-radius:2px;background:currentColor}
626
+ .app-composer__rec{display:inline-flex;align-items:center;gap:var(--space-8);padding-inline:var(--space-8);color:var(--on-surface);white-space:nowrap}
627
+ /* A live microphone: the dot pulses in error beside "Recording" (rules/colour.md § The two reds); a call is not a recording */
628
+ .app-composer__rec::before{content:"";width:8px;height:8px;border-radius:var(--radius-pill);background:var(--error)}
629
+ @media (prefers-reduced-motion:no-preference){.app-composer__rec::before{animation:app-dot 1.2s var(--motion-effects) infinite both}}
630
+ .app-composer__timer{padding-inline:var(--space-8);font-variant-numeric:tabular-nums;color:var(--on-surface)}
631
+ /* In a call: the status word alone; the light behind says whose turn it is, and a red dot means only "recording" */
632
+ .app-composer__status{padding-inline:var(--space-8);color:var(--on-surface);white-space:nowrap}
633
+ .app-composer__line{position:relative;z-index:1;display:flex;align-items:center;gap:var(--space-4);min-height:16px;padding-inline:20px;color:var(--on-surface-variant)}
634
+ .app-composer__line .app-icon{font-size:16px}
635
+ .app-composer__line.is-error{color:var(--error)}
636
+ .app-composer__line-action{padding:0;border:0;background:none;color:var(--primary);font:inherit;font-weight:600;cursor:pointer}
637
+ .app-composer__drop{display:flex;align-items:center;justify-content:center;width:100%;min-height:56px;border-radius:var(--radius-lg);color:var(--primary)}
638
+ /* Locked: drops to the ground, no shadow, no controls */
639
+ .app-composer.is-locked .app-composer__box{background:var(--surface-container-low);box-shadow:none}
640
+ .app-composer.is-locked .app-composer__editor{color:var(--on-surface-variant)}
641
+ /* The voice light, behind the composer in a call: cool while you speak, warm while Alis does */
642
+ .app-composer__light{position:absolute;z-index:0;inset:-40px -64px;pointer-events:none;filter:blur(28px)}
643
+ .app-composer__light::before,.app-composer__light::after,.app-voice__orb::before,.app-voice__orb::after{content:"";position:absolute;inset:0;border-radius:50%;transition:opacity var(--dur-panel) var(--ease-standard)}
644
+ .app-composer__light::before{background:radial-gradient(closest-side,color-mix(in srgb,var(--ai-you) 34%,var(--ai-you-container)) 55%,transparent)}
645
+ .app-composer__light::after{opacity:0;background:radial-gradient(closest-side,color-mix(in srgb,var(--ai-alis) 26%,var(--ai-alis-container)) 55%,transparent)}
646
+ .is-alis>.app-composer__light::before,.is-alis .app-voice__orb::before{opacity:0}
647
+ .is-alis>.app-composer__light::after,.is-alis .app-voice__orb::after{opacity:1}
648
+ .is-muted>.app-composer__light,.is-muted .app-voice__orb{opacity:.35}
649
+ @media (prefers-reduced-motion:no-preference){.app-composer__light,.app-voice__orb{animation:app-breathe 3.2s var(--ease-standard) infinite alternate}}
650
+ @keyframes app-breathe{from{transform:scale(.96)}to{transform:scale(1.04)}}
651
+
652
+ /* ── Attachment · a file, recording or queued message in the composer's tray, and in the sent message ── */
653
+ .app-attachment{position:relative;display:flex;align-items:center;gap:var(--space-12);width:232px;max-width:100%;height:56px;padding:var(--space-8);border-radius:var(--radius-lg);background:var(--surface-container-low);overflow:hidden}
654
+ .app-attachment__glyph{display:flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;border-radius:var(--radius-sm);background:var(--surface);color:var(--on-surface-variant)}
655
+ .app-attachment__text{display:flex;flex-direction:column;flex:1;min-width:0}
656
+ .app-attachment__text>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
657
+ .app-attachment__text>.text-meta{color:var(--on-surface-variant)}
658
+ .app-attachment .app-icon-btn{flex:none;width:24px;height:24px}
659
+ .app-attachment .app-icon-btn .app-icon{font-size:16px}
660
+ .app-attachment__bar{position:absolute;left:0;right:0;bottom:0;height:2px;background:color-mix(in srgb,var(--primary) 16%,transparent)}
661
+ .app-attachment__bar>span{display:block;height:100%;background:var(--primary)}
662
+ .app-attachment.is-error .app-attachment__glyph,.app-attachment.is-error .app-attachment__text>.text-meta{color:var(--error)}
663
+ .app-attachment--image{width:56px;padding:0}
664
+ .app-attachment--image>img,.app-attachment--image>svg{display:block;width:100%;height:100%;object-fit:cover}
665
+ .app-attachment--image .app-icon-btn{position:absolute;top:var(--space-4);right:var(--space-4);background:var(--surface);color:var(--on-surface)}
666
+ .app-attachment--message{width:100%;height:auto;min-height:56px}
667
+
668
+ /* ── Voice view · a live call given the content area (focus) or the whole screen (phone) ── */
669
+ .app-voice{position:relative;display:flex;flex-direction:column;gap:var(--space-24);height:100%;min-height:0;padding:var(--space-16) var(--space-24) var(--space-32);background:var(--background);overflow:hidden}
670
+ .app-voice__top{display:flex;align-items:center;gap:var(--space-8)}
671
+ .app-voice__title{flex:1;min-width:0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;color:var(--on-surface)}
672
+ .app-voice__body{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-24);text-align:center}
673
+ .app-voice__body>*{flex:none}
674
+ .app-voice__orb{position:relative;width:min(256px,60vw);aspect-ratio:1}
675
+ .app-voice__orb::before,.app-voice__orb::after{filter:blur(10px)}
676
+ .app-voice__orb::before{background:radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--ai-you) 55%,var(--ai-you-container)) 0%,color-mix(in srgb,var(--ai-you) 24%,var(--ai-you-container)) 46%,transparent 71%)}
677
+ .app-voice__orb::after{opacity:0;background:radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--ai-alis) 48%,var(--ai-alis-container)) 0%,color-mix(in srgb,var(--ai-alis) 20%,var(--ai-alis-container)) 46%,transparent 71%)}
678
+ .app-voice__caption{max-width:520px;color:var(--on-surface-variant);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
679
+ .app-voice__said{color:var(--on-surface)}
680
+ .app-voice__controls{display:flex;align-items:center;justify-content:center;gap:var(--space-16)}
681
+ .app-voice__round{display:inline-flex;align-items:center;justify-content:center;flex:none;width:56px;height:56px;padding:0;border:0;border-radius:var(--radius-pill);background:var(--surface-container-low);color:var(--on-surface)}
682
+ .app-voice__round .app-icon{font-size:24px;font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 24}
683
+ .app-voice__round.is-selected{background:var(--secondary-container);color:var(--on-secondary-container)}
684
+ .app-voice__end{min-height:56px;padding:0 var(--space-32)}
685
+ @media (max-width:599px){.app-voice{padding:var(--space-12) var(--space-16) var(--space-24)}}
686
+
608
687
  /* ── Drop target, while something is dragged over it ── */
609
688
  .drop-target{outline:2px dashed var(--primary);outline-offset:-2px;background-color:color-mix(in srgb,var(--primary) calc(var(--state-dragged) * 100%),transparent)}
610
689
 
@@ -0,0 +1,64 @@
1
+ # AppAttachment
2
+
3
+ A file, recording or queued message waiting in the composer's tray, and the same tile in the message once it's sent.
4
+
5
+ ## Use / don't use
6
+
7
+ - **In [AppComposer](AppComposer.md)'s tray**, and in a sent message, where it opens the file. 232px wide, 56 high, `radius-lg` (16: concentric with the composer's corner, 28 − 12), on `surface-container-low`.
8
+ - **A tile, not a chip.** A file needs a type, a size, progress, an error and a retry, and a chip can't hold them. Chips stay for the composer's context, so the two never read alike.
9
+ - **No colour for types.** The glyph sits in ink on white: a PDF isn't red and an image isn't blue. Glyphs: `description` (a document), `slideshow`, `table` (a sheet), `graphic_eq` (audio), `movie`, `screen_record` (a screen capture), `draft` (anything else).
10
+ - **An image shows itself**: 56 square, the picture, remove on top.
11
+ - **States**: ready (type · size on the meta line); uploading (a 2px `primary` bar along the bottom edge); failed ("Didn't upload" in `error`, with retry); not accepted ("Can't be read here" in `error`, no retry, and the composer's line lists what works).
12
+ - **A queued message** (`app-attachment--message`) takes the tray's full width: `schedule`, the text, "Sends when Alis finishes", edit and remove.
13
+
14
+ ## Markup
15
+
16
+ ```html
17
+ <!-- Ready -->
18
+ <div class="app-attachment">
19
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">description</span></span>
20
+ <span class="app-attachment__text"><span class="text-label">Q3 pricing interviews.pdf</span><span class="text-meta">PDF · 2.4 MB</span></span>
21
+ <button type="button" class="app-icon-btn app-state" aria-label="Remove Q3 pricing interviews.pdf" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
22
+ </div>
23
+
24
+ <!-- Uploading -->
25
+ <div class="app-attachment">
26
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">slideshow</span></span>
27
+ <span class="app-attachment__text"><span class="text-label">Board deck v7.pptx</span><span class="text-meta">PowerPoint · 18 MB</span></span>
28
+ <button type="button" class="app-icon-btn app-state" aria-label="Remove Board deck v7.pptx" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
29
+ <span class="app-attachment__bar" role="progressbar" aria-label="Uploading Board deck v7.pptx" aria-valuemin="0" aria-valuemax="100" aria-valuenow="62"><span style="width:62%"></span></span>
30
+ </div>
31
+
32
+ <!-- Failed -->
33
+ <div class="app-attachment is-error">
34
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">error</span></span>
35
+ <span class="app-attachment__text"><span class="text-label">Customer list.xlsx</span><span class="text-meta">Didn't upload</span></span>
36
+ <button type="button" class="app-icon-btn app-state" aria-label="Retry Customer list.xlsx" title="Retry"><span class="app-icon" aria-hidden="true">refresh</span></button>
37
+ <button type="button" class="app-icon-btn app-state" aria-label="Remove Customer list.xlsx" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
38
+ </div>
39
+
40
+ <!-- An image -->
41
+ <div class="app-attachment app-attachment--image" role="group" aria-label="Churn chart.png">
42
+ <img src="…" alt="">
43
+ <button type="button" class="app-icon-btn app-state" aria-label="Remove Churn chart.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
44
+ </div>
45
+
46
+ <!-- A queued message -->
47
+ <div class="app-attachment app-attachment--message">
48
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">schedule</span></span>
49
+ <span class="app-attachment__text"><span class="text-label">Also check the EU accounts.</span><span class="text-meta">Sends when Alis finishes</span></span>
50
+ <button type="button" class="app-icon-btn app-state" aria-label="Edit" title="Edit"><span class="app-icon" aria-hidden="true">edit</span></button>
51
+ <button type="button" class="app-icon-btn app-state" aria-label="Remove" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
52
+ </div>
53
+ ```
54
+
55
+ ## Behaviour you must supply
56
+
57
+ - Update the bar's width and `aria-valuenow` as the upload runs; remove the bar when it's done.
58
+ - Retry restarts the upload; remove drops the tile and returns focus to the editor.
59
+ - Edit on a queued message moves its text back into the editor and drops the tile.
60
+ - In a sent message, the tile opens the file (wrap the glyph and text in the link or button); no remove.
61
+
62
+ ## Classes
63
+
64
+ `.app-attachment`, `.app-attachment--image`, `.app-attachment--message`, `.is-error`, `.app-attachment__glyph`, `.app-attachment__text`, `.app-attachment__bar`, with `.app-icon-btn` and `.app-state` on its buttons.
@@ -0,0 +1,139 @@
1
+ # AppComposer
2
+
3
+ Where you write to Alis, an agent or a person. One floating surface with three bands (tray, editor, row) and one line below it. Its trailing button changes with the state, and its glyph says what pressing it does now.
4
+
5
+ ## Use / don't use
6
+
7
+ - **Every conversation**: Ideate, an interview, an agent session, a specialist thread. One composer per conversation, at the thread's measure (`measure-prose`, 710px), docked to the bottom of the thread or centred on an empty home.
8
+ - **Not a form.** Something you fill in and submit once (feedback, a contribution, a new session's brief) is an [AppTextField](AppTextField.md) with a labelled filled button ([page.md](../rules/page.md) § Forms).
9
+ - The surface is white at `elevation-2` with `radius-xl` (28): concentric with the 40px trailing button set 8 in. It floats; locked, it drops to the ground and the shadow goes.
10
+
11
+ ## Anatomy
12
+
13
+ | Band | What it holds | Who decides |
14
+ |---|---|---|
15
+ | **Tray** (top, only when something's in it) | What goes with *this message*: [AppAttachment](AppAttachment.md)s (files, screen captures), a queued message, the drop target | The product decides which files and sizes |
16
+ | **Editor** | Body type, 16/24. Grows to eight lines, then scrolls inside itself. The placeholder says what to write | The product writes the placeholder |
17
+ | **Row**: Add | `add` icon button: the menu of what you can bring in | The product fills the menu |
18
+ | **Row**: Context | Label [AppChip](AppChip.md)s you can remove, for what Alis can see or act on *in this conversation* (a project, chosen resources, staged comments). Sticky until removed, where the tray goes with one message. Never a mode or a setting | The product decides which, if any |
19
+ | **Row**: voice | A plain mic icon button beside live (see below) | The product decides whether there's voice, and which mic mode |
20
+ | **Row**: trailing button | The one filled icon button in the system: `primary`, 40px, round | The system |
21
+ | **Line** (below the surface) | One line at most, meta type, 20 in: a hint, the trust note, why it's locked, or an error | The product writes it |
22
+
23
+ ## The trailing button
24
+
25
+ **Empty, it offers the richest voice the surface has. With anything to send, it is Send. Typing clears the voice controls.**
26
+
27
+ | State | Trailing button (filled) | Beside it (plain) | Editor |
28
+ |---|---|---|---|
29
+ | Empty, live offered | `graphic_eq` "Talk to Alis" | `mic` "Dictate" or "Record a voice note" | Placeholder |
30
+ | Empty, mic only | `mic` "Dictate" or "Record a voice note" | none | Placeholder |
31
+ | Empty, no voice | `arrow_upward` "Send", disabled | none | Placeholder |
32
+ | Something to send (text or a staged file) | `arrow_upward` "Send" | none: the voice controls leave | Live |
33
+ | Uploading, or a tile failed | "Send", disabled; the line says why | none | Live |
34
+ | Alis is working | `stop` (filled glyph) "Stop" | none | Stays writable; the draft is kept |
35
+ | Working, queue on, with text | `arrow_upward` "Send when Alis finishes" | `stop_circle` "Stop" | Live |
36
+ | Dictating | `check` "Done, keep the text" | the row is the recording bar | Words arrive as you speak |
37
+ | Recording a voice note | `arrow_upward` "Send voice note" | the row is the recording bar | Hidden: the note is the message |
38
+ | In a call | `call_end` "End voice" | the row is the call bar | Live, for anything you'd rather type |
39
+ | In a call, with text | `arrow_upward` "Send" | `call_end` "End voice" | Live |
40
+ | Locked | none | none | Dimmed; the line says why |
41
+
42
+ **Two jobs, one slot:** the commit stays in the slot and the other steps aside as a plain icon button (Stop beside a queued Send, End beside a Send typed into a call). Send is `arrow_upward`, never the paper plane ([icons.md](../rules/icons.md)). Ending a call is cyan like every commit, never red.
43
+
44
+ ## Voice
45
+
46
+ - **Two mic modes; a composer has one**, chosen by the product. **Dictate**: words land in the editor as you speak, the ones still settling in `on-surface-variant`; ✓ ends it and leaves the text to edit, never sends. **Record a voice note**: the editor hides; Send sends the note, with its transcript, as the message.
47
+ - **The recording bar** replaces the row: `delete` "Discard recording", the red dot pulsing beside **Recording** (a live microphone's privacy signal, [colour.md](../rules/colour.md) § The two reds), the level in `ai-you`, the time (`m:ss`, tabular), the finish button. The finish button stays cyan: it commits an outcome (keep the text, send the note), and the bar already shows the capture ([buttons.md](../rules/buttons.md) § Colour).
48
+ - **Live** is a state of the composer, and not a recording: the status word and the mute toggle say the microphone is open, so no red dot. The row becomes `add`, mute (`mic` / `mic_off`, a toggle), the status word, `open_in_full` "Focus view", and End. The voice light (`.app-composer__light`) sits behind: cool while you speak, Alis's brand red, as a tint, while she does ([colour.md](../rules/colour.md) § The AI identity). Status words, with no dot (the light says whose turn it is, and a red dot in the composer means only *Recording*): Connecting, Listening, Thinking, Speaking, Muted. Focus view opens the call in an [AppVoiceView](AppVoiceView.md).
49
+ - **Too short**: "Too short. Hold for a second or two, or type instead." on the line, once; nothing is staged. **Mic blocked**: the mic (or the waveform) shows `mic_off`; pressing it explains on the line how to allow it. Typing still works.
50
+
51
+ ## Markup
52
+
53
+ ```html
54
+ <!-- Empty, live offered (Ideate) -->
55
+ <div class="app-composer">
56
+ <div class="app-composer__box">
57
+ <div class="app-composer__editor">
58
+ <textarea class="app-composer__input" rows="1" aria-label="Message" placeholder="Ask Alis about this project"></textarea>
59
+ </div>
60
+ <div class="app-composer__row">
61
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Add files and more" title="Add files and more"><span class="app-icon" aria-hidden="true">add</span></button>
62
+ <span class="app-chip"><span class="app-icon" aria-hidden="true">folder</span><span>Pricing rethink</span>
63
+ <button type="button" class="app-chip__close app-state" aria-label="Remove Pricing rethink"><span class="app-icon" aria-hidden="true">close</span></button></span>
64
+ <span class="app-composer__spacer"></span>
65
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Dictate" title="Dictate"><span class="app-icon" aria-hidden="true">mic</span></button>
66
+ <button type="button" class="app-composer__go app-state" aria-label="Talk to Alis" title="Talk to Alis"><span class="app-icon" aria-hidden="true">graphic_eq</span></button>
67
+ </div>
68
+ </div>
69
+ <p class="app-composer__line text-meta">What you put here stays in your organisation.</p>
70
+ </div>
71
+
72
+ <!-- Something to send: a staged file and text; Send -->
73
+ <div class="app-composer">
74
+ <div class="app-composer__box">
75
+ <div class="app-composer__tray"><!-- AppAttachment tiles --></div>
76
+ <div class="app-composer__editor"><textarea class="app-composer__input" rows="1" aria-label="Message"></textarea></div>
77
+ <div class="app-composer__row">
78
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Add files and more" title="Add files and more"><span class="app-icon" aria-hidden="true">add</span></button>
79
+ <span class="app-composer__spacer"></span>
80
+ <button type="button" class="app-composer__go app-state" aria-label="Send" title="Send"><span class="app-icon" aria-hidden="true">arrow_upward</span></button>
81
+ </div>
82
+ </div>
83
+ </div>
84
+
85
+ <!-- Alis is working: Stop; the editor stays open -->
86
+ <button type="button" class="app-composer__go app-state" aria-label="Stop" title="Stop"><span class="app-icon app-icon--filled" aria-hidden="true">stop</span></button>
87
+
88
+ <!-- Dictating: the row becomes the recording bar -->
89
+ <div class="app-composer__row">
90
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Discard recording" title="Discard recording"><span class="app-icon" aria-hidden="true">delete</span></button>
91
+ <span class="app-composer__rec text-label">Recording</span>
92
+ <span class="app-composer__meter" aria-hidden="true"><i></i><i></i><!-- one <i> per bar, about 48 --></span>
93
+ <span class="app-composer__timer text-label">0:07</span>
94
+ <button type="button" class="app-composer__go app-state" aria-label="Done, keep the text" title="Done, keep the text"><span class="app-icon" aria-hidden="true">check</span></button>
95
+ </div>
96
+ <!-- In the editor while dictating: settled words, then the ones still settling -->
97
+ <!-- Let's look at why <span class="app-composer__interim">the enterprise tier got</span> -->
98
+
99
+ <!-- In a call: the light behind, the call bar; is-alis while Alis speaks, is-muted when muted -->
100
+ <div class="app-composer is-alis">
101
+ <div class="app-composer__light" aria-hidden="true"></div>
102
+ <div class="app-composer__box">
103
+ <div class="app-composer__editor"><textarea class="app-composer__input" rows="1" aria-label="Message" placeholder="Type anything you'd rather not say"></textarea></div>
104
+ <div class="app-composer__row">
105
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Add files and more" title="Add files and more"><span class="app-icon" aria-hidden="true">add</span></button>
106
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Mute" title="Mute" aria-pressed="false"><span class="app-icon" aria-hidden="true">mic</span></button>
107
+ <span class="app-composer__status text-label" role="status">Speaking</span>
108
+ <span class="app-composer__spacer"></span>
109
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Focus view" title="Focus view"><span class="app-icon" aria-hidden="true">open_in_full</span></button>
110
+ <button type="button" class="app-composer__go app-state" aria-label="End voice" title="End voice"><span class="app-icon" aria-hidden="true">call_end</span></button>
111
+ </div>
112
+ </div>
113
+ <p class="app-composer__line text-meta">Talk whenever you like. Alis will stop to listen.</p>
114
+ </div>
115
+
116
+ <!-- Dragging a file over: the tray opens as the drop target -->
117
+ <div class="app-composer__tray"><div class="app-composer__drop drop-target text-label">Drop to add to your message</div></div>
118
+
119
+ <!-- The line: an error with its action -->
120
+ <p class="app-composer__line text-meta is-error"><span class="app-icon" aria-hidden="true">error</span>Couldn't send. Your message is still here. <button type="button" class="app-composer__line-action">Try again</button></p>
121
+
122
+ <!-- Locked -->
123
+ <div class="app-composer is-locked"><!-- box with the editor only; the line says why --></div>
124
+ ```
125
+
126
+ ## Behaviour you must supply
127
+
128
+ - **The state machine** above: swap the trailing button's glyph, `aria-label` and `title`, and add or remove the plain voice buttons, on every change to the draft, the tray or the agent's state. `disabled` on Send until there is something to send and every tile is ready.
129
+ - **Keyboard**, on the editor only (never a window listener): Enter sends; Shift+Enter adds a line; ignore Enter while `isComposing` (IME) or while a suggestion menu is open. In a call, Enter with text sends into the call. While Alis works with the queue off, Enter does nothing.
130
+ - **Auto-grow**: set the textarea's height to its `scrollHeight` on input; the editor caps it at eight lines and scrolls.
131
+ - **Recording**: start on the mic (holding Space outside a text field is a shortcut), run the timer, drive the meter bars' heights from the input level (`aria-hidden`; hold them still under `prefers-reduced-motion`). Under about a second is too short.
132
+ - **Live**: toggle `is-alis` on `.app-composer` while Alis speaks and `is-muted` while muted (and `aria-pressed` on the mute toggle); update the status word, which is a live region.
133
+ - **Drop**: show `.app-composer__drop` in the tray while a file is dragged over the composer; on drop, stage an [AppAttachment](AppAttachment.md).
134
+ - **A send that fails** keeps the draft in the editor and says so on the line with Try again.
135
+ - Return focus to the editor after sending, after dictation and after a call.
136
+
137
+ ## Classes
138
+
139
+ `.app-composer`, `.is-locked`, `.is-alis`, `.is-muted`, `.app-composer__light`, `.app-composer__box`, `.app-composer__tray`, `.app-composer__drop`, `.app-composer__editor`, `.app-composer__input`, `.app-composer__interim`, `.app-composer__row`, `.app-composer__spacer`, `.app-composer__go`, `.app-composer__rec`, `.app-composer__meter`, `.app-composer__timer`, `.app-composer__status`, `.app-composer__line`, `.is-error`, `.app-composer__line-action`, with `.drop-target` on the drop, `.app-state` on every button and `.app-target` on the icon buttons.
@@ -0,0 +1,45 @@
1
+ # AppVoiceView
2
+
3
+ A live call given room: the content area on a desktop (the focus view), the whole screen on a phone. The same call as the composer's call bar, with the voice light large.
4
+
5
+ ## Use / don't use
6
+
7
+ - **Desktop**: a call starts in [AppComposer](AppComposer.md); its `open_in_full` "Focus view" opens this view in the content area, and the navigation stays. A product may open a call here by default when talking is the whole job (an interview participant on a laptop).
8
+ - **Phone**: the call is full-screen. The chevron folds it back into the composer, and the call carries on.
9
+ - **Top**: back (`close_fullscreen` "Back to the conversation" on a desktop, `keyboard_arrow_down` "Fold into the composer" on a phone), the conversation's name in label type, captions (`closed_caption`, a toggle).
10
+ - **Body**: the orb (the voice light, large: cool while you speak, Alis's brand red as a tint while she does), the status word in section-title (Connecting, Listening, Thinking, Speaking, Muted), and the caption: the last three lines said, settled words in `on-surface`, the rest in `on-surface-variant`.
11
+ - **Controls**: mute and Type instead as 56px round buttons, and End as the filled button, 56 high. End is cyan, never red.
12
+ - On the ground (`background`), no card, no shadow.
13
+
14
+ ## Markup
15
+
16
+ ```html
17
+ <!-- is-alis while Alis speaks, is-muted when muted -->
18
+ <section class="app-voice is-alis" aria-label="Voice with Alis">
19
+ <div class="app-voice__top">
20
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Back to the conversation" title="Back to the conversation"><span class="app-icon" aria-hidden="true">close_fullscreen</span></button>
21
+ <span class="app-voice__title text-label">Pricing rethink</span>
22
+ <button type="button" class="app-icon-btn app-state app-target is-selected" aria-label="Captions" title="Captions" aria-pressed="true"><span class="app-icon app-icon--filled" aria-hidden="true">closed_caption</span></button>
23
+ </div>
24
+ <div class="app-voice__body">
25
+ <div class="app-voice__orb" aria-hidden="true"></div>
26
+ <p class="text-section-title" role="status">Speaking</p>
27
+ <p class="app-voice__caption text-body"><span class="app-voice__said">That's useful. Was it the price itself,</span> or how it was packaged?</p>
28
+ </div>
29
+ <div class="app-voice__controls">
30
+ <button type="button" class="app-voice__round app-state" aria-label="Mute" aria-pressed="false"><span class="app-icon" aria-hidden="true">mic</span></button>
31
+ <button type="button" class="app-voice__round app-state" aria-label="Type instead"><span class="app-icon" aria-hidden="true">keyboard</span></button>
32
+ <button type="button" class="app-btn app-btn--filled app-state app-voice__end"><span class="app-icon" aria-hidden="true">call_end</span>End</button>
33
+ </div>
34
+ </section>
35
+ ```
36
+
37
+ ## Behaviour you must supply
38
+
39
+ - The same call state as the composer's: toggle `is-alis` and `is-muted`, update the status word (a live region) and the caption. Mute is a toggle: `is-selected`, `aria-pressed` and `mic_off` while muted.
40
+ - Back and Type instead return to the composer with the call still running and focus in the editor; End ends the call and returns too.
41
+ - Give it the height it fills (the content area, or the viewport on a phone); it lays out inside that.
42
+
43
+ ## Classes
44
+
45
+ `.app-voice`, `.is-alis`, `.is-muted`, `.app-voice__top`, `.app-voice__title`, `.app-voice__body`, `.app-voice__orb`, `.app-voice__caption`, `.app-voice__said`, `.app-voice__controls`, `.app-voice__round`, `.is-selected`, `.app-voice__end`, with `.app-state` on its buttons.
@@ -28,6 +28,9 @@ Shared conventions: `app-state` gives anything pressable its hover, focus and pr
28
28
  | AppDialog | A confirmation or short form over a scrim | [AppDialog.md](AppDialog.md) |
29
29
  | AppCard | Statement and instrument surfaces | [AppCard.md](AppCard.md) |
30
30
  | AppLattice | Content you read; the transcript and `.prose` | [AppLattice.md](AppLattice.md) |
31
+ | AppComposer | Where you write to Alis, an agent or a person; voice and live calls | [AppComposer.md](AppComposer.md) |
32
+ | AppAttachment | A file or queued message in the composer's tray, and in the sent message | [AppAttachment.md](AppAttachment.md) |
33
+ | AppVoiceView | A live call given the content area, or the screen on a phone | [AppVoiceView.md](AppVoiceView.md) |
31
34
  | AppSelectTile | A card chosen among others | [AppSelectTile.md](AppSelectTile.md) |
32
35
  | AppSegmented | 2 to 5 options that change content in place | [AppSegmented.md](AppSegmented.md) |
33
36
  | AppListRow | A row in a list, the navigation pane or the agent chat list | [AppListRow.md](AppListRow.md) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alis-build/design-system",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks and rules.",
5
5
  "keywords": ["alisx", "design-system", "design-tokens", "css"],
6
6
  "homepage": "https://alisx.com",
@@ -57,7 +57,7 @@ Cite by ID in review. Each is a defect that has shipped in an Alis product.
57
57
 
58
58
  Five questions, about a minute. **Run this before handing work back.**
59
59
 
60
- 1. **Is anything in the page casting a shadow?** Only a menu, the agent composer,
60
+ 1. **Is anything in the page casting a shadow?** Only a menu, the composer,
61
61
  a snackbar, a dialog, a dragged item or a card on the drafting field may. A
62
62
  card at rest with a shadow is A2's cousin: remove the shadow, keep the edge.
63
63
  2. **Which button moves me forward?** Not obvious in one second → B1. Then count
package/rules/buttons.md CHANGED
@@ -72,7 +72,10 @@ a link, never a button ([colour.md](colour.md)). Nothing else: a status is a chi
72
72
  live capture that way, and a user who can't find the badge doesn't believe it
73
73
  stopped. The clause is exactly **a capture running right now, on the control that
74
74
  stops it**, filled in `error`, and the label still names the outcome:
75
- "Stop recording · 0:42".
75
+ "Stop recording · 0:42". A capture whose finishing control commits an outcome
76
+ (the composer's ✓ or Send) keeps its cyan button: the red dot beside
77
+ *Recording* in the same bar carries the signal
78
+ ([AppComposer](../components/AppComposer.md)).
76
79
 
77
80
  ## The form: text only, unless scanned
78
81
 
@@ -143,9 +146,11 @@ Did this thing exist before the action?
143
146
  glyph. A 20px glyph in a 40px box, in `on-surface-variant`: no fill, no
144
147
  border, no shadow, no product colour. A tooltip names the action, and is required.
145
148
 
146
- **One exception: the agent composer's Send** is a filled `primary` circle. The
147
- composer is a surface of its own, and Send is both its lead and its commit. No
148
- other icon button is filled.
149
+ **One exception: the composer's trailing button** is a filled `primary` circle:
150
+ Send, and whatever the composer's state makes it (live, the mic, Stop, End)
151
+ ([AppComposer](../components/AppComposer.md)). The composer is a surface of its
152
+ own, and that button is both its lead and its commit. No other icon button is
153
+ filled.
149
154
 
150
155
  **It is a glyph, and it is an action.** If it shows a word, it is a
151
156
  [AppButton](../components/AppButton.md). If it does nothing on its own (a chevron
package/rules/colour.md CHANGED
@@ -5,7 +5,7 @@
5
5
  **`primary` is the only actionable colour.** If it is coloured and not primary,
6
6
  it is not something you press. The reverse does not hold: most things you press
7
7
  are ink. `primary` is spent on four things only: the filled button, a link, the
8
- agent composer's Send, and a control while you use it (the focus outline, a
8
+ composer's trailing button, and a control while you use it (the focus outline, a
9
9
  focused field, a switch that is on, a drop target). Text and outlined buttons are
10
10
  ink ([buttons.md](buttons.md)), and so is a progress bar.
11
11
 
@@ -37,12 +37,14 @@ the second ink falls below AA there.
37
37
 
38
38
  - **`signal`** is the caret, the cursor, the Alis mark and the loader. It means
39
39
  *Alis is on it*: the agent at work, or content on its way ([loading.md](loading.md)).
40
- Never a fill, a control or a state. A page that wants the brand in an
40
+ Never a fill, a control or a state; Alis's voice light is its one drawing, and
41
+ only as a tint (§ The AI identity). A page that wants the brand in an
41
42
  illustration draws the mark, the dotted grid, never a shape filled red.
42
43
  - **`error`** is failure and destructive actions, and never animates. The one
43
44
  exception is a live microphone: its recording dot pulses in `error`, always
44
45
  beside the word *Recording*, because that is the privacy signal people already
45
- read.
46
+ read. A live call is not a recording: its status word and mute toggle say the
47
+ microphone is open.
46
48
 
47
49
  A notification badge is `error`, never `primary` (B8).
48
50
 
@@ -114,9 +116,12 @@ The AI gradients and the voice light are drawings with their own `ai-*` tokens,
114
116
  do, and spends a data colour on decoration.
115
117
 
116
118
  - **The voice light** is cool while the person speaks (`ai-you` mixed into
117
- `ai-you-container`) and warm while Alis speaks (`ai-alis` into
118
- `ai-alis-container`). It says whose turn it is, so the two stay a cool and a
119
- warm.
119
+ `ai-you-container`) and Alis's brand red while she speaks (`ai-alis`, which is
120
+ `signal`, mixed into the pale `ai-alis-container`). It says whose turn it is, so
121
+ the two stay a cool and a warm. This is the one place `signal` lights a shape,
122
+ and **only ever as a tint**: a solid red light reads as an alarm, not as Alis. It sits behind the composer in a call and is the voice view's orb
123
+ ([AppComposer](../components/AppComposer.md), [AppVoiceView](../components/AppVoiceView.md));
124
+ a recording's level wears `ai-you`.
120
125
  - **The AI gradient** runs `signal` to `primary` to `ai-tail`: `.app-ai-text` on
121
126
  a headline, and the onboarding ring. It lands on a mark tone, so text stays 3:1
122
127
  at its faintest.
package/rules/icons.md CHANGED
@@ -18,6 +18,8 @@ library, and nothing else hand-drawn. Self-host the subset you use.
18
18
  `❯` the prompt caret, `◼` the agent's reply mark, `→` a trailing link arrow.
19
19
  - Prefer an icon's current name over a legacy one that still resolves (`mail`,
20
20
  not `email`).
21
+ - **Send is `arrow_upward`**, in the composer's filled circle: it points into the
22
+ conversation. Never the paper plane (`send`), which sits lopsided in a circle.
21
23
 
22
24
  ## The capability marks
23
25
 
@@ -4,7 +4,7 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
4
4
 
5
5
  ## Components not in the set
6
6
 
7
- - **Menus**, and the overflow menu behind a `more_vert` icon button. Until there is one, keep the verbs visible as text buttons.
7
+ - **Menus**, and the overflow menu behind a `more_vert` icon button. Until there is one, keep the verbs visible as text buttons. The composer's Add menu, slash commands and mentions wait on it too.
8
8
  - **Comboboxes** (a searchable or multi-value select) and **date and time pickers**. Use `AppSelect` or a text field with a format hint.
9
9
  - **Checkboxes and radios** as standalone controls. A labelled set of choices is `AppSelectTile`s in an `AppFieldset`; an on/off setting is `AppSwitch`.
10
10
  - **Tooltips** beyond the native `title` that `AppIconButton` sets (the product's opens below after 200ms, at most 240px wide).
@@ -15,6 +15,8 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
15
15
  ## Open patterns
16
16
 
17
17
  - **Navigation inside a project.** Open objects can sit in the navigation pane as secondary rows under a heading ([AppShell](../components/AppShell.md)), and an object's own views are route tabs in its title bar. A project's own destinations beside the app's have no pattern yet.
18
+ - **When Alis needs you.** An approval or a question that blocks the agent: whether it's answered in the composer or in the thread is open. Until it's decided, the ask sits in the thread and the composer's line names what Alis is waiting for.
19
+ - **Turns in a conversation.** How the person's and Alis's turns, a sent attachment and a sent voice note look in the thread.
18
20
  - **Versions of generated content.** Regenerating replaces a synthesis; keeping or comparing earlier versions has no pattern.
19
21
  - **A log viewer.** "View logs" goes to the logs' own screen; there is no pattern for showing logs inside a pane.
20
22
  - **Each product's destinations** (the rows under its heading in the rail) are product content, not part of this system. Use the capability marks for the tools they name.
@@ -38,6 +38,7 @@ AppShell
38
38
  | Context you don't act on | `AppCard variant="statement"`, or no container at all |
39
39
  | Prose you read, a document | `AppLattice`s at the prose measure, `.prose` inside; a quote is a `blockquote` with a `cite` |
40
40
  | Questions and answers | `AppTranscript` |
41
+ | Writing to Alis, an agent or a person | `AppComposer`, one per conversation; files in its tray as `AppAttachment`s; a call given room is `AppVoiceView` |
41
42
  | Content Alis wrote | a label `AppChip icon="auto_awesome"` "AI-generated", once, at its top |
42
43
  | The one action that moves the user forward | `AppButton variant="filled"`, once per screen, labelled with the outcome; never in the title bar |
43
44
  | The lead of a surface that starts something (the title bar, a pane, an empty state) | `AppButton variant="outlined"`, once per surface; never in a card or a repeated item |
package/rules/spacing.md CHANGED
@@ -40,8 +40,9 @@ second case is ruled on its own, never applied by similarity.
40
40
  **4 / 8 / 12 / 16 / 28 / pill.** Radius climbs with the size of the object.
41
41
  Buttons and pills are `radius-pill`, tables are `radius-0`, cards and text
42
42
  fields are `radius-lg` (16) with a `radius-md` (12) inset, so the corners stay
43
- concentric. 28 (`radius-xl`) is on the scale with no assigned use: nothing is
44
- rounded to it by default.
43
+ concentric. 28 (`radius-xl`) is the composer's, concentric with its 40px button
44
+ set 8 in ([AppComposer](../components/AppComposer.md)); nothing else is rounded
45
+ to it.
45
46
  There is no 24px step.
46
47
 
47
48
  Radius is a dial. If it moves, change the token and move the inset with it,
@@ -58,7 +59,7 @@ container (`overflow: hidden`), which clips a focus ring.
58
59
  recipe: a 1px contact shadow plus a wide diffuse one, in cool petrol rather than
59
60
  black.
60
61
 
61
- - **`elevation-2`** floats over the page: menus, the agent composer, a sticky bar
62
+ - **`elevation-2`** floats over the page: menus, the composer, a sticky bar
62
63
  with content under it; and a card on the drafting field
63
64
  - **`elevation-3`** interrupts or moves: snackbars, dialogs, an overlaid detail
64
65
  pane, a card or row while it is dragged
package/rules/surfaces.md CHANGED
@@ -73,7 +73,7 @@ as Material 3 does it; a shadow is kept for four things:
73
73
 
74
74
  ```
75
75
  Why is this above the page?
76
- ├─ It floats over the page → elevation-2: a menu, the agent composer, a
76
+ ├─ It floats over the page → elevation-2: a menu, the composer, a
77
77
  │ sticky bar with content scrolled under it
78
78
  ├─ It interrupts the page → elevation-3: a snackbar; with a scrim, a
79
79
  │ dialog and the detail pane when it slides
package/tokens.json CHANGED
@@ -411,13 +411,13 @@
411
411
  },
412
412
  {
413
413
  "name": "ai-alis",
414
- "value": "#c97409",
415
- "usage": "The voice light while Alis speaks: the warm layer, mixed with ai-alis-container. AI identity, a drawing."
414
+ "value": "{signal}",
415
+ "usage": "The voice light while Alis speaks: her brand red, only ever as a tint mixed with ai-alis-container, never a solid fill. AI identity, a drawing."
416
416
  },
417
417
  {
418
418
  "name": "ai-alis-container",
419
- "value": "#ffe8d2",
420
- "usage": "The voice light's warm tint."
419
+ "value": "#ffece9",
420
+ "usage": "The voice light's pale brand red, which ai-alis is mixed into while Alis speaks."
421
421
  },
422
422
  {
423
423
  "name": "ai-tail",