@alis-build/design-system 0.76.0 → 0.80.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/rules/errors.md CHANGED
@@ -34,6 +34,10 @@ What went wrong?
34
34
  │ what to change (AppComposer)
35
35
  ├─ A conversation attachment didn't upload → its tile keeps retry/remove
36
36
  │ (AppAttachment)
37
+ ├─ They turned down the microphone, the
38
+ │ camera or another device permission → the line where it was needed says
39
+ │ what's off and both ways on
40
+ │ (§ A device permission)
37
41
  └─ A submitted message didn't send, or Alis
38
42
  couldn't finish a reply → the turn keeps its recovery action
39
43
  (AppTurn)
@@ -126,6 +130,32 @@ neutral tile.
126
130
  the thing's own state: its chip says Failed, and the alert waits in its pane
127
131
  with the next step ([quick-start.md](quick-start.md) § 5).
128
132
 
133
+ ## A device permission
134
+
135
+ The microphone, the camera, notifications, photos: the browser or the phone asks,
136
+ in its own dialog, and we write only what comes before and after it.
137
+
138
+ - **Ask when the person chooses what needs it**, never on opening: the
139
+ microphone when they press Start talking, the camera when they choose to take a
140
+ photo. One permission at a time; never a second prompt straight after the
141
+ first.
142
+ - **Say the prompt is coming, in one line beside the button that brings it**:
143
+ "Your browser will ask to use your microphone." In an app, "This app will ask
144
+ to use your microphone." No screen of its own before the prompt: the line is
145
+ enough, and the prompt follows the press.
146
+ - **After a no, say what's off and both ways on**, in the line where it was
147
+ needed, in ink with the hint's role rather than an alert: nothing they did
148
+ failed. Keep the way that doesn't need it: "The microphone is turned off for
149
+ AlisX. Allow it in Settings, or type instead." In an app, add **Open
150
+ Settings**, which opens the app's own page in the phone's settings. A browser
151
+ can't open its settings, so there the sentence says where: "Allow it in the
152
+ browser's settings, or type instead."
153
+ - **Never ask into a prompt the system will no longer show.** Once a no is
154
+ final, the press that needs the permission shows the line again; it doesn't
155
+ ask again and silently get nothing.
156
+ - **When they come back with it allowed**, carry on from where they pressed,
157
+ with no second press.
158
+
129
159
  ## What they may not do
130
160
 
131
161
  The whole of it, from roles to asking for more, is [access.md](access.md). In
@@ -167,3 +197,5 @@ short:
167
197
  was entered still there?
168
198
  3. Is any text on screen something the machine wrote?
169
199
  4. Is there a `catch` that only logs?
200
+ 5. Turn down every device permission your screen asks for. Does the line say
201
+ what's off, with the way that doesn't need it and, in an app, Open Settings?
package/rules/hosts.md CHANGED
@@ -5,7 +5,8 @@
5
5
  colour. We supply the words, the decisions, the states and what happens when
6
6
  someone presses a button, and those are what make it Alis. A mail app and a
7
7
  terminal are hosts too, with rules of their own ([email.md](email.md),
8
- [terminal.md](terminal.md)); this file is every other one.
8
+ [terminal.md](terminal.md)); this file is every other one, the phone included
9
+ (§ An app is a host too).
9
10
 
10
11
  Each host has a profile in [hosts/](../hosts/README.md): one page and one data
11
12
  file. This rule holds everything that is the same in every host; a profile holds
@@ -88,6 +89,48 @@ overflow at 320 wraps. Nothing else.
88
89
  An embedded page doesn't draw what the host already draws: no second title bar, no
89
90
  navigation pane, no sign-in screen when the host has signed the person in.
90
91
 
92
+ ## An app is a host too
93
+
94
+ On iOS and Android our app runs inside the phone, and the phone is its host: it
95
+ draws the status bar, its sheets, alerts and menus, its notifications and
96
+ pickers, and its look wins there. The three kinds, on a phone:
97
+
98
+ | Kind | On a phone | We send |
99
+ | --- | --- | --- |
100
+ | **Card** | Notifications, the ongoing-call one and Android's Live Update among them; a permission prompt; a yes-or-no alert; the share sheet; the photo, file and date pickers; the store listing; an App Clip card | Words, states and decisions. The prompt's sentence is ours, its buttons the phone's |
101
+ | **Widget** | Picture-in-picture, a Live Activity and the Dynamic Island, a home-screen widget | A small view on the phone's font and colours, our roles mapped onto them |
102
+ | **Embedded page** | The app's own screens | The product register: our type, roles, components and words |
103
+
104
+ - **Our screens are ours, inside the phone's chrome.** The phone draws its own
105
+ parts and we draw everything else: the status bar and the safe areas; the
106
+ navigation bar and the back gesture; the frame of a sheet, an alert or a menu
107
+ (what's in a sheet is ours, what's in an alert is our words); the keyboard and
108
+ its autofill (a one-time code, an email, a password); the pickers; the share
109
+ sheet. Never a second back of our own, a sheet drawn as a page, or a picker of
110
+ our own where the phone has one. A screen that is the whole job (an interview
111
+ under way, its thank-you) draws no navigation bar.
112
+ - **The product register, from the pinned package.** Nunito Sans, scaled with
113
+ the phone's text size; the roles of [colour.md](colour.md) in light and dark,
114
+ read from the version of `@alis-build/design-system` the app pins, never
115
+ copied by hand; Material Symbols on our screens ([icons.md](icons.md)), the
116
+ phone's own glyphs only on what the phone draws; 48 targets. The theme is the
117
+ phone's setting ([themes.md](themes.md) § Who picks the theme).
118
+ - **Rules 1 to 3 of § Every host are for its cards and widgets**: a
119
+ notification, picture-in-picture, a Live Activity. Our screens follow the
120
+ product's own rules, so they keep their composer, their lists and their pages.
121
+ Rules 4 to 10 hold everywhere.
122
+ - **Work that carries on outside the app is a card.** An interview under way is
123
+ a call, not a task: its name, its state in a word ("Your turn", "Paused") and
124
+ the time, then two actions that can be undone (Pause or Resume; Stop sharing
125
+ while a screen is shared). Ending asks first, so Finish opens the app at its
126
+ ask. Pressing the notification opens the screen it came from.
127
+ - **The listing** follows § Names: AlisX, published by Alis Exchange, one per
128
+ store, with the home-screen label AlisX. The store's subtitle says what the
129
+ app does for now.
130
+
131
+ Each phone has a profile: [iOS](../hosts/ios.md) and
132
+ [Android](../hosts/android.md).
133
+
91
134
  ## What we send
92
135
 
93
136
  A host gets the conversation the console has, translated: nothing is invented
package/rules/icons.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # Icons
2
2
 
3
3
  **Material Symbols Outlined, and the capability marks**, Alis's own set. No other
4
- library, and nothing else hand-drawn. Self-host the subset you use.
4
+ library, and nothing else hand-drawn. Self-host the subset you use. An app on a
5
+ phone bundles the same subset for its own screens; the phone's own glyphs (SF
6
+ Symbols on iOS) appear only inside what the phone draws, such as its menus, share
7
+ sheet and pickers ([hosts.md](hosts.md) § An app is a host too).
5
8
 
6
9
  ## Sizes and axes
7
10
 
@@ -20,6 +23,10 @@ library, and nothing else hand-drawn. Self-host the subset you use.
20
23
  not `email`).
21
24
  - **Send is `arrow_upward`**, in the composer's filled circle: it points into the
22
25
  conversation. Never the paper plane (`send`), which sits lopsided in a circle.
26
+ - **Talk is `voice_selection`**, a mouth with sound coming out: on the composer's
27
+ Talk, a dock's Talk and Hold to talk, wherever the person starts speaking aloud.
28
+ Never `graphic_eq`, which is an audio file and reads as a level meter, and never
29
+ `record_voice_over`, which is an interview, the thing.
23
30
 
24
31
  ## The capability marks
25
32
 
@@ -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
- - **Date and time pickers**. Use a text field with a format hint.
7
+ - **Date and time pickers**. Use a text field with a format hint. In an app on a phone, use the phone's own picker ([hosts.md](hosts.md) § An app is a host too).
8
8
  - **A bar of actions for several chosen rows** ("3 selected"). [AppCheckbox](../components/AppCheckbox.md) chooses them; what acts on them has no pattern yet. When some of the chosen are beyond the person's role, how the bar counts and reports them is already settled ([access.md](access.md) § Several at once).
9
9
  - **The marketing components** (`.ax-*`, alisx.com) are not in this package: it covers the product register. A layout class for a grid of lattices is missing too.
10
10
  - **What the AlisX Skill Store and AlisX Specialists offer**, beyond their one-line descriptions in [README.md](README.md). Marketing copy about them needs a product brief.
@@ -21,7 +21,8 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
21
21
  - **Admin's words.** `words.json` names what Alis Ideate, Build and every product share; Admin's own things are not in it yet. Name them as the screen already does, and add the entry with the first change ([words.md](words.md)).
22
22
  - **A terminal's drawn text.** `alisx-check words --text` reads the CLI's words file: its help, `alis docs`, the TUI's views and actions, tips, the tour and errors. Text the TUI writes straight into a screen (column headers, intros, empty states) is not in that file yet; review it by eye against `words.json` ([terminal.md](terminal.md)).
23
23
  - **Hosts.** The checks a host profile asks for (`alisx-check cards`, a profile past its date) and the card templates aren't built yet ([hosts.md](hosts.md)).
24
- - **Increase contrast** (`prefers-contrast: more`) has no answer; nothing writes a rule for it yet ([themes.md](themes.md) § Modes).
24
+ - **Increase contrast** (`prefers-contrast: more`; Increase Contrast on iOS, high-contrast text on Android) has no answer; nothing writes a rule for it yet ([themes.md](themes.md) § Modes). In an app, the phone's own controls take it.
25
+ - **The phones' proof.** The iOS and Android profiles are drafts: nothing has been seen on a device against them ([hosts/ios.md](../hosts/ios.md), [hosts/android.md](../hosts/android.md)).
25
26
  - **A chart in contrast or under forced colours** loses its series colours: the categories collapse to ink. Label every series directly, or give it a pattern, until charts have a contrast answer ([themes.md](themes.md)).
26
27
  - **A Glass view in contrast or under forced colours** hasn't been looked at: its rim and grid drop away and its edge takes the contrast edge, but nobody has checked it reads ([glass.md](glass.md), [themes.md](themes.md) § Contrast and forced colours).
27
28
  - **A log viewer.** "View logs" goes to the logs' own screen; there is no pattern for showing logs inside a pane.
@@ -35,8 +36,8 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
35
36
 
36
37
  ## Motion
37
38
 
38
- - **Gestures.** A swipe or a drag that lets go (the phone's navigation pane swiped shut, a row swiped to act on it, a row dragged to reorder) needs a spring that starts at the finger's speed, which CSS can't do. Until there is one, these move only on a press ([motion.md](motion.md)).
39
- - **Motion tied to scrolling** (a phone's title bar condensing as you read) has no pattern yet.
39
+ - **Gestures.** A swipe or a drag that lets go (the phone's navigation pane swiped shut, a row swiped to act on it, a row dragged to reorder) needs a spring that starts at the finger's speed, which CSS can't do. Until there is one, these move only on a press ([motion.md](motion.md)). An app on a phone has it: SwiftUI and Compose springs take the finger's speed, from the same stiffness and damping.
40
+ - **Motion tied to scrolling** (a phone's title bar condensing as you read) has no pattern yet on the web. An app uses the phone's own: its navigation bar condenses as it scrolls.
40
41
  - **Height** animates only in browsers with `interpolate-size`. Elsewhere a fold, an ask and an arriving row open at once and their contents still fade.
41
42
 
42
43
  ## Assets
package/rules/themes.md CHANGED
@@ -52,9 +52,10 @@ surface (§ Who picks the theme).
52
52
  | A card in a host (Teams, Slack) | The host | Roles only: the host draws it ([hosts.md](hosts.md)) |
53
53
  | A widget in a host (Copilot, ChatGPT, Claude) | The host, from what it sends | Light or dark, from its profile's map ([hosts.md](hosts.md)) |
54
54
  | An embedded page in a host (a Teams tab) | The host | Whatever its profile's map says, contrast included |
55
+ | An app on a phone (iOS, Android) | The phone's light or dark setting; a client's brand may fix one ([branding.md](branding.md)) | Light and dark, read from the pinned package ([hosts.md](hosts.md) § An app is a host too) |
55
56
 
56
57
  Every surface drawn in HTML also honours the modes below, whoever picks its
57
- theme.
58
+ theme, and an app honours the phone's own.
58
59
 
59
60
  ## Modes
60
61
 
@@ -65,8 +66,8 @@ every HTML surface honours them:
65
66
  drops shadows and flattens fills. `alisx.css` keeps what matters visible
66
67
  (§ Contrast and forced colours).
67
68
  - **Reduced motion**: nothing travels ([motion.md](motion.md)).
68
- - **Increase contrast** (`prefers-contrast: more`, macOS and others): not
69
- answered yet. Write no rule for it; it may later take the contrast block
69
+ - **Increase contrast** (`prefers-contrast: more`, macOS and others; Increase
70
+ Contrast on iOS, high-contrast text on Android): not answered yet. Write no rule for it; it may later take the contrast block
70
71
  without the contrast palette ([known-gaps.md](known-gaps.md)).
71
72
 
72
73
  ## Contrast and forced colours
package/rules/type.md CHANGED
@@ -29,7 +29,7 @@ What is this text doing?
29
29
 
30
30
  Default when unsure: **body**.
31
31
 
32
- Four more styles, each with one place:
32
+ Six more styles, each with one place:
33
33
 
34
34
  - **`text-page-title` on a phone** is 22/28 at 500, no tracking (below 600px):
35
35
  Material 3's Title Large Emphasized, the title of its 64 small app bar
@@ -53,6 +53,11 @@ Four more styles, each with one place:
53
53
  - **`text-reading`**, 20/28 at 400: the reading that leads a Glass view, one or
54
54
  two sentences built from the state, its notable part at 600 ([glass.md](glass.md)).
55
55
  Nowhere else.
56
+ - **`text-prompt`**, 30/38 at 500, −0.02em (24/32 below 600px): the question
57
+ someone is answering, read at arm's length. A live interview's question
58
+ ([AppVoiceView](../components/AppVoiceView.md) § An interview) and a typed
59
+ interview's latest question. One per screen, and never a title: the screen's
60
+ name stays `text-page-title` or the progress above it.
56
61
 
57
62
  ## Body, supporting or meta
58
63
 
@@ -162,11 +167,11 @@ marks the selected and commits, 800 greets.** This is M3 Expressive's model: a
162
167
  quiet baseline, with emphasis spent where it means something.
163
168
 
164
169
  - **800**: welcome-title only, the one hero moment of an entry screen.
165
- - **700**: page-title (500 on a phone, § Three more styles), metric-value, the selected state (`.text-selected`), the
170
+ - **700**: page-title (500 on a phone, § The seven jobs), metric-value, the selected state (`.text-selected`), the
166
171
  filled button, and eyebrow.
167
172
  - **600**: section-title, a text or outlined button's label, emphasis in reading text
168
173
  (`.text-emphasis`), and `strong` and the headings in rendered prose.
169
- - **500**: object-title, label, tabs, segments, nav rows.
174
+ - **500**: object-title, label, prompt, tabs, segments, nav rows.
170
175
  - **400**: body, supporting and meta.
171
176
 
172
177
  **Never override a role's weight.** A weight utility beside a role wins and
@@ -177,7 +182,7 @@ breaks it. Choose the role, and emphasise only reading text, at 600.
177
182
  **None outside the headings and the eyebrow**, because alisx.com sets Nunito Sans
178
183
  at 0.
179
184
 
180
- - welcome-title and page-title −0.03em, section-title −0.02em.
185
+ - welcome-title and page-title −0.03em, section-title and prompt −0.02em.
181
186
  - eyebrow 0.12em, because it is uppercase.
182
187
  - Everything else, labels, buttons and tabs included: 0. Set a component
183
188
  library's own tracking to 0 once, in its theme; never restate it on a
package/themes.json CHANGED
@@ -24,6 +24,8 @@
24
24
  "warning": "#b58200",
25
25
  "success": "#1e6b3a",
26
26
  "info": "#2a5cbe",
27
+ "reward": "#eaa800",
28
+ "reward-edge": "#8f6400",
27
29
  "inverse-surface": "#27323a",
28
30
  "on-inverse-surface": "#f4f4f2",
29
31
  "code-surface": "#f8f8f8",
@@ -101,6 +103,8 @@
101
103
  "warning": "#e9b443",
102
104
  "success": "#7ccf95",
103
105
  "info": "#a9c1ff",
106
+ "reward": "#f7c948",
107
+ "reward-edge": "#ffd966",
104
108
  "inverse-surface": "#dfe7ec",
105
109
  "on-inverse-surface": "#27323a",
106
110
  "code-surface": "#2c353b",
package/tokens.css CHANGED
@@ -35,6 +35,8 @@
35
35
  --violet-200: #c3b2f7;
36
36
  --amber-100: #ffd9a8;
37
37
  --amber-700: #b58200;
38
+ --gold-500: #eaa800;
39
+ --gold-800: #8f6400;
38
40
  --alis-red: #f02222;
39
41
  --red-700: #ba1a1a;
40
42
  --green-700: #1e6b3a;
@@ -62,6 +64,8 @@
62
64
  --warning: light-dark(var(--amber-700), #e9b443);
63
65
  --success: light-dark(var(--green-700), #7ccf95);
64
66
  --info: light-dark(var(--blue-600), #a9c1ff);
67
+ --reward: light-dark(var(--gold-500), #f7c948);
68
+ --reward-edge: light-dark(var(--gold-800), #ffd966);
65
69
  --inverse-surface: light-dark(var(--petrol-800), var(--mist-100));
66
70
  --on-inverse-surface: light-dark(var(--paper-100), var(--petrol-800));
67
71
  --code-surface: light-dark(var(--paper-75), #2c353b);
@@ -261,6 +265,8 @@
261
265
  --warning: var(--amber-700);
262
266
  --success: var(--green-700);
263
267
  --info: var(--blue-600);
268
+ --reward: var(--gold-500);
269
+ --reward-edge: var(--gold-800);
264
270
  --inverse-surface: var(--petrol-800);
265
271
  --on-inverse-surface: var(--paper-100);
266
272
  --code-surface: var(--paper-75);
@@ -324,6 +330,8 @@
324
330
  --warning: #e9b443;
325
331
  --success: #7ccf95;
326
332
  --info: #a9c1ff;
333
+ --reward: #f7c948;
334
+ --reward-edge: #ffd966;
327
335
  --inverse-surface: var(--mist-100);
328
336
  --on-inverse-surface: var(--petrol-800);
329
337
  --code-surface: #2c353b;
@@ -397,6 +405,8 @@
397
405
  --warning: #ffffff;
398
406
  --success: #ffffff;
399
407
  --info: #ffffff;
408
+ --reward: #ffffff;
409
+ --reward-edge: #ffffff;
400
410
  --inverse-surface: #ffffff;
401
411
  --on-inverse-surface: #000000;
402
412
  --code-surface: #000000;
package/tokens.json CHANGED
@@ -199,6 +199,18 @@
199
199
  "value": "#b58200",
200
200
  "usage": "Warning. 3.4:1 on white: never text ink, carried by an icon."
201
201
  },
202
+ {
203
+ "name": "gold-500",
204
+ "register": "palette",
205
+ "value": "#eaa800",
206
+ "usage": "The coin's face on a light ground. 2.1:1 on white: never alone, its edge carries it."
207
+ },
208
+ {
209
+ "name": "gold-800",
210
+ "register": "palette",
211
+ "value": "#8f6400",
212
+ "usage": "The coin's edge on a light ground. 5.3:1 on white."
213
+ },
202
214
  {
203
215
  "name": "alis-red",
204
216
  "register": "palette",
@@ -457,6 +469,26 @@
457
469
  },
458
470
  "usage": "Information. Always with an icon or label."
459
471
  },
472
+ {
473
+ "name": "reward",
474
+ "register": "product",
475
+ "value": "{gold-500}",
476
+ "values": {
477
+ "light": "{gold-500}",
478
+ "dark": "#f7c948"
479
+ },
480
+ "usage": "The coin's face: credits that were on us, free or earned. Always inside reward-edge. Never text, a control or a status."
481
+ },
482
+ {
483
+ "name": "reward-edge",
484
+ "register": "product",
485
+ "value": "{gold-800}",
486
+ "values": {
487
+ "light": "{gold-800}",
488
+ "dark": "#ffd966"
489
+ },
490
+ "usage": "The coin's rim, and the open coin where credits could be earned. Carries 3:1 on every ground."
491
+ },
460
492
  {
461
493
  "name": "inverse-surface",
462
494
  "register": "product",
@@ -1150,6 +1182,18 @@
1150
1182
  "min": 3,
1151
1183
  "why": "Graphics: a warning icon, the Alis mark and caret (the composer floats), a field's edge."
1152
1184
  },
1185
+ {
1186
+ "fg": [
1187
+ "reward-edge"
1188
+ ],
1189
+ "bg": [
1190
+ "background",
1191
+ "surface",
1192
+ "surface-container-high"
1193
+ ],
1194
+ "min": 3,
1195
+ "why": "The coin: its edge carries it on every ground, because the face alone falls short on a light one."
1196
+ },
1153
1197
  {
1154
1198
  "fg": [
1155
1199
  "cat1",
@@ -1257,6 +1301,8 @@
1257
1301
  "warning": "ink",
1258
1302
  "success": "ink",
1259
1303
  "info": "ink",
1304
+ "reward": "ink",
1305
+ "reward-edge": "ink",
1260
1306
  "inverse-surface": "ink",
1261
1307
  "on-inverse-surface": "ground",
1262
1308
  "code-surface": "ground",
@@ -1410,6 +1456,18 @@
1410
1456
  },
1411
1457
  "usage": "Names the whole screen. One per screen, in the title bar."
1412
1458
  },
1459
+ {
1460
+ "name": "text-prompt",
1461
+ "fontSize": "30px",
1462
+ "lineHeight": "38px",
1463
+ "fontWeight": 500,
1464
+ "letterSpacing": "-0.02em",
1465
+ "phone": {
1466
+ "fontSize": "24px",
1467
+ "lineHeight": "32px"
1468
+ },
1469
+ "usage": "The question being answered, read at arm's length: a live interview's question, and a typed interview's latest question. One per screen."
1470
+ },
1413
1471
  {
1414
1472
  "name": "text-section-title",
1415
1473
  "fontSize": "18px",