@alis-build/design-system 0.41.0 → 0.42.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 +8 -0
- package/classes.json +1 -0
- package/components/AppComposer.md +27 -12
- package/components/AppTurn.md +1 -1
- package/package.json +1 -1
- package/rules/buttons.md +2 -1
- package/words.json +2 -1
package/alisx.css
CHANGED
|
@@ -948,6 +948,9 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
948
948
|
.app-composer__row>.app-chip>span:not(.app-icon){overflow:hidden;text-overflow:ellipsis}
|
|
949
949
|
/* The trailing button: the one filled icon button, concentric with the 28px corner (20 + 8) */
|
|
950
950
|
.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)}
|
|
951
|
+
/* A voice state carries its word: the only way into voice, and people meet it before they know the product. */
|
|
952
|
+
.app-composer__go:has(>.app-composer__go-label){width:auto;gap:var(--space-8);padding:0 var(--space-16) 0 var(--space-12)}
|
|
953
|
+
.app-composer__go-label{font-family:var(--font-sans);font-size:14px;line-height:20px;font-weight:600;white-space:nowrap}
|
|
951
954
|
@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)}}
|
|
952
955
|
/* Recording: the level wears ai-you, the voice light's "you're speaking" */
|
|
953
956
|
.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)}
|
|
@@ -992,6 +995,11 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
992
995
|
.app-composer__line .app-icon{font-size:16px}
|
|
993
996
|
.app-composer__line.is-error{color:var(--error)}
|
|
994
997
|
.app-composer__line-action{padding:0;border:0;background:none;color:var(--primary);font:inherit;font-weight:600;cursor:pointer}
|
|
998
|
+
/* On a phone the editor and the row share one row (56, a pill at radius-xl), unless the row holds chips or a bar.
|
|
999
|
+
One markup for both: the switch is CSS alone, so the textarea is never re-rendered and the keyboard stays up. */
|
|
1000
|
+
@media (max-width:599px){.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter))){flex-direction:row;flex-wrap:wrap;align-items:flex-end;column-gap:var(--space-4)}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>*{flex:0 0 100%}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__editor{order:2;flex:1 1 0;min-width:0;padding:var(--space-8) var(--space-4)}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__row{display:contents}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__row>*{order:3}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__row>:first-child:not(.app-composer__go){order:1}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__row>.app-composer__spacer{display:none}.app-composer__input:placeholder-shown,.app-composer__input::placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
|
|
1001
|
+
/* While the keyboard is up: five lines at most, and a note or hint on the line steps aside; an error stays. */
|
|
1002
|
+
@media (max-width:599px) and (pointer:coarse){.app-composer:focus-within .app-composer__editor{max-height:136px}.app-composer:focus-within>.app-composer__line:not(.is-error){display:none}}
|
|
995
1003
|
.app-composer__drop{display:flex;align-items:center;justify-content:center;width:100%;min-height:56px;border-radius:var(--radius-lg);color:var(--primary)}
|
|
996
1004
|
/* Locked: drops to the ground, no shadow, no controls */
|
|
997
1005
|
.app-composer.is-locked .app-composer__box{background:var(--surface-container-low);box-shadow:none}
|
package/classes.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AppComposer
|
|
2
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; what runs beside the conversation or waits on you docks on top. Its trailing button changes with the state, and its glyph says what pressing it does now.
|
|
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, the editor and the row sharing one row on a phone; what runs beside the conversation or waits on you docks on top. Its trailing button changes with the state, and its glyph says what pressing it does now.
|
|
4
4
|
|
|
5
5
|
## Use / don't use
|
|
6
6
|
|
|
@@ -16,12 +16,12 @@ Where you write to Alis, an agent or a person. One floating surface with three b
|
|
|
16
16
|
| **Ask** (top, only while Alis or a person is waiting on you) | The decision they need: an [AppAsk](AppAsk.md), above the tray, divided by a hairline | The product writes it |
|
|
17
17
|
| **Audience** (only when a responder can write internally or to a customer) | A labelled choice and its recipient, always visible while composing (§ Message audience). Below an ask, above the tray | The product supplies the permitted audiences and recipient |
|
|
18
18
|
| **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 |
|
|
19
|
-
| **Editor** | Body type, 16/24. Grows to eight lines, then scrolls inside itself. The placeholder says what to write | The product writes the placeholder |
|
|
19
|
+
| **Editor** | Body type, 16/24. Grows to eight lines (five on a phone while the keyboard is up), then scrolls inside itself. The placeholder says what to write, short enough to fit beside the buttons on a phone (§ On a phone) | The product writes the placeholder |
|
|
20
20
|
| **Suggestions** (only while you type `/` or `@`) | An [AppMenu](AppMenu.md) band right above the editor, divided by a hairline: commands, or people and things to mention. Below an open ask | The product supplies the commands and what can be mentioned |
|
|
21
21
|
| **Row**: Add | `add` icon button: an [AppMenu](AppMenu.md) of what you can bring in, then the commands | The product fills the menu |
|
|
22
22
|
| **Row**: Context | Label [AppChip](AppChip.md)s you can remove, for **what you opened beside the conversation, to point at it**: a file open in [AppFilePane](AppFilePane.md) (its glyph and file name), or anything opened in the detail pane from the chat. **Never where you are**: the page you're on goes with every message as references and is never shown. Never a mode or a setting. Removing the chip keeps the pane and leaves it out of the message; closing the pane removes the chip. What you write on a file goes in the tray | The product decides what opens beside the conversation |
|
|
23
|
-
| **Row**: voice | A plain mic icon button beside live (see below) | The product decides whether there's voice, and which mic mode |
|
|
24
|
-
| **Row**: trailing button | The one filled icon button in the system: `primary`, 40px, round | The system |
|
|
23
|
+
| **Row**: voice | A plain mic icon button beside live (see below). On a phone a Dictate mic leaves: the keyboard has its own (§ On a phone) | The product decides whether there's voice, and which mic mode |
|
|
24
|
+
| **Row**: trailing button | The one filled icon button in the system: `primary`, 40px, round. In a voice state it carries its word | The system |
|
|
25
25
|
| **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 |
|
|
26
26
|
|
|
27
27
|
## The trailing button
|
|
@@ -30,8 +30,8 @@ Where you write to Alis, an agent or a person. One floating surface with three b
|
|
|
30
30
|
|
|
31
31
|
| State | Trailing button (filled) | Beside it (plain) | Editor |
|
|
32
32
|
|---|---|---|---|
|
|
33
|
-
| Empty, live offered | `graphic_eq`
|
|
34
|
-
| Empty, mic only | `mic`
|
|
33
|
+
| Empty, live offered | `graphic_eq` **Talk** | `mic` "Dictate" (not on a phone) or "Record a voice note" | Placeholder |
|
|
34
|
+
| Empty, mic only | `mic` **Dictate** or **Record** (on a phone, Dictate gives way to Send, disabled) | none | Placeholder |
|
|
35
35
|
| Empty, no voice | `arrow_upward` "Send", disabled | none | Placeholder |
|
|
36
36
|
| Something to send (text or a staged file) | `arrow_upward` "Send" | none: the voice controls leave | Live |
|
|
37
37
|
| Queued, uploading, processing, or a tile failed | "Send", disabled; the line says why | none | Live |
|
|
@@ -46,8 +46,21 @@ Where you write to Alis, an agent or a person. One floating surface with three b
|
|
|
46
46
|
| Waiting on a person's ask, with text | `arrow_upward` "Send", filled; the ask's action steps down to outlined | none | Live: what you send is a reply; the ask stays |
|
|
47
47
|
| Locked | none | none | Dimmed; the line says why |
|
|
48
48
|
|
|
49
|
+
**A voice state carries its word**: Talk, Dictate or Record, after its glyph, at every width (`.app-composer__go-label`). It is the only way into voice, and the people who use it are often meeting the product for the first time (a participant in an interview), so its glyph alone is a guess, and a phone has no tooltip to name it. The word is its accessible name; it needs no tooltip. Every other state is a glyph alone: Send, Stop, ✓ and End are glyphs everyone reads. Typing turns the pill into the Send circle.
|
|
50
|
+
|
|
49
51
|
**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.
|
|
50
52
|
|
|
53
|
+
## On a phone
|
|
54
|
+
|
|
55
|
+
Below 600 wide, with the keyboard up, the conversation has about 390px, and every line the composer takes is a line of the question gone.
|
|
56
|
+
|
|
57
|
+
- **The editor and the row share one row**: `add`, the editor, any plain button, the trailing button. 8 + 40 + 8 is 56, so at `radius-xl` the surface is a pill, still concentric with the button set 8 in. As you write, the editor grows upwards and the buttons stay on its last line. It stays one row: it does not split into two bands at the second line.
|
|
58
|
+
- **Two bands come back when the row holds more than buttons**: context chips, or a bar that takes the row (the recording bar while dictating or recording a voice note). A call on a phone is full screen ([AppVoiceView](AppVoiceView.md)). The bands on top (capture, ask, audience, tray, suggestions) sit above the one row unchanged.
|
|
59
|
+
- **The placeholder fits one line** beside the buttons at 360 wide: under 18 characters beside Talk. "Type your answer" or "Ask Alis anything", not "Ask Alis about this project". The system cuts a longer one with an ellipsis as a backstop.
|
|
60
|
+
- **Dictation is the keyboard's.** Every phone keyboard has a dictation key, so a composer whose mic mode is dictation shows no mic of its own on a phone: the plain Dictate button is `.app-wide-only`, and an empty composer with no live gets Send, disabled. A voice note stays: the keyboard can't record one.
|
|
61
|
+
- **While the keyboard is up**, the editor grows to five lines at most, and the line steps aside if it holds a note or a hint (the trust note returns when the keyboard goes). An error stays.
|
|
62
|
+
- **The thread keeps its end in view** when the keyboard opens and as the composer grows, if its end was in view before ([AppTurn](AppTurn.md)): the question being answered is what the person should see.
|
|
63
|
+
|
|
51
64
|
## Message audience
|
|
52
65
|
|
|
53
66
|
For responders in a conversation with both team-only and customer messages:
|
|
@@ -110,13 +123,13 @@ The draft and a submitted message have different owners. Use this lifecycle in e
|
|
|
110
123
|
<div class="app-composer">
|
|
111
124
|
<div class="app-composer__box">
|
|
112
125
|
<div class="app-composer__editor">
|
|
113
|
-
<textarea class="app-composer__input" rows="1" aria-label="Message" placeholder="Ask Alis
|
|
126
|
+
<textarea class="app-composer__input" rows="1" aria-label="Message" placeholder="Ask Alis anything"></textarea>
|
|
114
127
|
</div>
|
|
115
128
|
<div class="app-composer__row">
|
|
116
129
|
<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>
|
|
117
130
|
<span class="app-composer__spacer"></span>
|
|
118
|
-
<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>
|
|
119
|
-
<button type="button" class="app-composer__go app-state"
|
|
131
|
+
<button type="button" class="app-icon-btn app-state app-target app-wide-only" aria-label="Dictate" title="Dictate"><span class="app-icon" aria-hidden="true">mic</span></button>
|
|
132
|
+
<button type="button" class="app-composer__go app-state"><span class="app-icon" aria-hidden="true">graphic_eq</span><span class="app-composer__go-label">Talk</span></button>
|
|
120
133
|
</div>
|
|
121
134
|
</div>
|
|
122
135
|
<p class="app-composer__line text-meta">What you put here stays in your organisation.</p>
|
|
@@ -282,9 +295,11 @@ The draft and a submitted message have different owners. Use this lifecycle in e
|
|
|
282
295
|
|
|
283
296
|
## Behaviour you must supply
|
|
284
297
|
|
|
285
|
-
- **The state machine** above: swap the trailing button's glyph, `aria-label` and `title
|
|
298
|
+
- **The state machine** above: swap the trailing button's glyph, `aria-label` and `title` (or its word, in a voice state), 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.
|
|
286
299
|
- **Keyboard**, on the editor only (never a window listener): Enter sends; Shift Enter adds a line (no hint line says so: Send's [AppTooltip](AppTooltip.md) carries Enter, and the [AppShortcutSheet](AppShortcutSheet.md) lists both); ignore Enter while `isComposing` (IME) or while a suggestion menu is open ([AppMenu](AppMenu.md)). In a call, Enter with text sends into the call. While Alis works with the queue off, Enter does nothing.
|
|
287
|
-
- **Auto-grow**: set the textarea's height to its `scrollHeight` on input; the editor caps it at eight lines and scrolls.
|
|
300
|
+
- **Auto-grow**: set the textarea's height to its `scrollHeight` on input; the editor caps it at eight lines (five on a phone while the keyboard is up) and scrolls.
|
|
301
|
+
- **One markup at every width.** The phone's one row is CSS alone. Never re-render or move the textarea when the composer changes form or state: a phone drops its keyboard mid-word.
|
|
302
|
+
- **The page resizes with the keyboard**, so the composer sits on it and the thread takes what's left: `interactive-widget=resizes-content` in the viewport meta, and on iOS Safari the visual viewport's height. Above the keyboard the composer needs no bottom safe-area inset; with the keyboard down it has one.
|
|
288
303
|
- **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.
|
|
289
304
|
- **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.
|
|
290
305
|
- **A capture beside the conversation**: show `.app-composer__capture` while it runs and remove it when it stops; tick the timer each second (`role="timer"` is not announced every tick); feed the thumbnail the live capture (a muted `<video>` on the stream), and under `prefers-reduced-motion` a still (`<img>` or `<canvas>`) refreshed every couple of seconds; the thumbnail toggles the larger view (`aria-expanded`), which closes on ✕, Esc or a click outside and returns focus to the thumbnail; Pause toggles `is-paused` on the bar, freezes the picture, and swaps the words and Pause's label and glyph; when frames stop arriving, set `is-empty` on the thumbnail with its glyph and put the error on the line, and clear both when they return; Stop ends the capture and stages what it captured as a tile in the thread. Its buttons take an [AppTooltip](AppTooltip.md) on a phone, where they show a glyph alone. Discard asks first ([AppDialog](AppDialog.md)). The bar never takes focus by itself, and after Stop or Discard focus returns to the editor.
|
|
@@ -294,4 +309,4 @@ The draft and a submitted message have different owners. Use this lifecycle in e
|
|
|
294
309
|
|
|
295
310
|
## Classes
|
|
296
311
|
|
|
297
|
-
`.app-composer`, `.app-composer__audience`, `.is-locked`, `.app-composer__go--plain`, `.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__capture`, `.is-paused`, `.app-composer__capture-label`, `.app-capture-thumb`, `.is-empty`, `.app-capture-peek`, `.app-capture-peek__head`, `.app-capture-peek__title`, `.app-capture-peek__frame`, `.app-capture-peek__note`, `.app-composer__status`, `.app-composer__line`, `.is-error`, `.app-composer__line-action`, with `.drop-target` on the drop, `.app-state` on every button, `.app-target` on the icon buttons and the capture bar's buttons, `.app-btn--error` on Stop recording, and `.app-compact-only` on Pause's glyph.
|
|
312
|
+
`.app-composer`, `.app-composer__audience`, `.is-locked`, `.app-composer__go--plain`, `.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__go-label`, `.app-composer__rec`, `.app-composer__meter`, `.app-composer__timer`, `.app-composer__capture`, `.is-paused`, `.app-composer__capture-label`, `.app-capture-thumb`, `.is-empty`, `.app-capture-peek`, `.app-capture-peek__head`, `.app-capture-peek__title`, `.app-capture-peek__frame`, `.app-capture-peek__note`, `.app-composer__status`, `.app-composer__line`, `.is-error`, `.app-composer__line-action`, with `.drop-target` on the drop, `.app-state` on every button, `.app-target` on the icon buttons and the capture bar's buttons, `.app-btn--error` on Stop recording, and `.app-compact-only` on Pause's glyph.
|
package/components/AppTurn.md
CHANGED
|
@@ -238,7 +238,7 @@ Northwind 120 —</pre></li>
|
|
|
238
238
|
- **A voice note**: drive `is-played` on the bars as it plays, swap `play_arrow` and `pause` (and the label); Show all toggles `is-open` and reads Show less.
|
|
239
239
|
- **Thumbs**: one at a time; set `aria-pressed`, `is-selected` and `app-icon--filled` on the one given.
|
|
240
240
|
- **On a phone**, a long press on a turn opens its actions as a menu.
|
|
241
|
-
- Keep the thread pinned to the bottom while Alis writes, unless the person has scrolled up.
|
|
241
|
+
- Keep the thread pinned to the bottom while Alis writes, unless the person has scrolled up. Keep it there too when the space it has shrinks (the keyboard opening on a phone, the composer growing), if its end was in view: the latest question is what the person is answering.
|
|
242
242
|
- **People**: insert the day line before the first turn of each day; move *Seen* to the newest of your bubbles anyone has read; show the typing line while they type and drop it when their turn arrives; keep a request's state line in step with the request; write typing (once, as it starts) and each request change into the thread's status region.
|
|
243
243
|
|
|
244
244
|
## Classes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alis-build/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.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/buttons.md
CHANGED
|
@@ -250,7 +250,8 @@ A capture's stop shown as its glyph alone (on a phone) keeps its `error` ink
|
|
|
250
250
|
Send, and whatever the composer's state makes it (live, the mic, Stop, End)
|
|
251
251
|
([AppComposer](../components/AppComposer.md)). The composer is a surface of its
|
|
252
252
|
own, and that button is both its lead and its commit. No other icon button is
|
|
253
|
-
filled.
|
|
253
|
+
filled. In a voice state it carries its word after the glyph (Talk, Dictate,
|
|
254
|
+
Record) and grows to a pill: it is the only way into voice. While Alis or a person is waiting on an [AppAsk](../components/AppAsk.md), the ask
|
|
254
255
|
holds the one filled action and the composer's button goes plain until you
|
|
255
256
|
type; then Send fills and the ask's action steps down to outlined.
|
|
256
257
|
|
package/words.json
CHANGED
|
@@ -493,6 +493,7 @@
|
|
|
493
493
|
{ "name": "Archive", "means": "Only where there is a place to find archived things and bring them back. Otherwise it is Delete." },
|
|
494
494
|
{ "name": "Share", "means": "Opens Sharing." },
|
|
495
495
|
{ "name": "Request access", "means": "Asks whoever can grant it for a role here, with an optional note (rules/access.md). Afterwards the control reads \"Request sent\" until they decide; a refusal reads \"Declined by …\" with Request again." },
|
|
496
|
-
{ "name": "Request to join", "means": "Asks an account's Admins to let you in, from the account rows sign-up shows for your email's domain. Afterwards it reads \"Request sent\" until an Admin decides, as Request access does." }
|
|
496
|
+
{ "name": "Request to join", "means": "Asks an account's Admins to let you in, from the account rows sign-up shows for your email's domain. Afterwards it reads \"Request sent\" until an Admin decides, as Request access does." },
|
|
497
|
+
{ "name": "Talk", "means": "Starts a live voice conversation from an empty composer (AppComposer § The trailing button): one word, never \"Talk instead\", \"Talk to Alis\" or \"Voice mode\" on the button. Dictate and Record are the mic's." }
|
|
497
498
|
]
|
|
498
499
|
}
|