@alis-build/design-system 0.43.0 → 0.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/alisx.css CHANGED
@@ -141,7 +141,6 @@
141
141
  --space-32: 32px;
142
142
  --space-48: 48px;
143
143
  --card-padding-wide: 28px;
144
- --attachment-preview-size: 96px;
145
144
  --chat-row: 32px;
146
145
  --touch-target: 32px;
147
146
  --touch-target-coarse: 48px;
@@ -937,7 +936,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
937
936
  .app-composer__audience{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--space-12);padding:var(--space-8) var(--space-12) var(--space-12);border-bottom:1px solid var(--outline-variant)}
938
937
  .app-composer__audience .app-field{flex:1 1 24ch;min-width:0;max-width:100%}
939
938
  .app-composer__audience>.text-meta{margin:0;padding-block:var(--space-8);color:var(--on-surface-variant);overflow-wrap:anywhere}
940
- .app-composer__tray{display:flex;flex-wrap:wrap;gap:var(--space-8);padding:var(--space-4) var(--space-4) 0}
939
+ .app-composer__tray{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--space-8);padding:var(--space-4) var(--space-4) 0}
941
940
  .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}
942
941
  .app-composer__input{display:block;width:100%;margin:0;padding:0;border:0;outline:0;resize:none;background:transparent;color:inherit;font:inherit}
943
942
  .app-composer__input::placeholder{color:var(--on-surface-variant);opacity:1}
@@ -1016,22 +1015,33 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
1016
1015
  @keyframes app-breathe{from{transform:scale(.96)}to{transform:scale(1.04)}}
1017
1016
 
1018
1017
  /* ── Attachment · a file, recording or queued message in the composer's tray, and in the sent message ── */
1019
- .app-attachment{position:relative;display:flex;align-items:center;gap:var(--space-12);width:232px;max-width:100%;min-height:56px;height:auto;padding:var(--space-8);border-radius:var(--radius-lg);background:var(--surface-container-low)}
1018
+ .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)}
1020
1019
  .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)}
1021
1020
  .app-attachment__text{display:flex;flex-direction:column;flex:1;min-width:0}
1022
1021
  .app-attachment__text>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1023
1022
  .app-attachment__text>.text-meta{color:var(--on-surface-variant)}
1024
- /* Reserve actual hit boxes so adjacent Retry and Remove targets cannot overlap. */
1025
- .app-attachment .app-icon-btn.app-state{flex:none;width:var(--touch-target);height:var(--touch-target)}
1026
- .app-attachment:not(.app-attachment--message):has(.app-icon-btn~.app-icon-btn){width:320px}
1023
+ /* Keep the visible control small; app-target supplies the pointer-sized hit area. */
1024
+ .app-attachment .app-icon-btn.app-state{flex:none;width:24px;height:24px}
1027
1025
  .app-attachment .app-icon-btn .app-icon{font-size:16px}
1028
- .app-attachment__bar{position:absolute;left:var(--space-12);right:var(--space-12);bottom:var(--space-4);height:2px;background:var(--surface-container-highest);border-radius:var(--radius-pill);overflow:hidden}
1026
+ /* Recovery uses the lower line beneath the name and glyph, with room for words. */
1027
+ .app-attachment:has(.app-attachment__retry){display:grid;grid-template-columns:16px minmax(0,1fr) 24px;grid-template-rows:20px 16px;row-gap:var(--space-4)}
1028
+ .app-attachment:has(.app-attachment__retry)>.app-attachment__glyph{grid-column:1;grid-row:1;width:16px;height:16px;background:transparent}
1029
+ .app-attachment:has(.app-attachment__retry)>.app-attachment__glyph .app-icon{font-size:16px}
1030
+ .app-attachment:has(.app-attachment__retry)>.app-attachment__text{display:contents}
1031
+ .app-attachment:has(.app-attachment__retry) .text-label{grid-column:2;grid-row:1}
1032
+ .app-attachment:has(.app-attachment__retry) .app-attachment__status{grid-column:1 / 3;grid-row:2;overflow:visible}
1033
+ .app-attachment:has(.app-attachment__retry)>.app-icon-btn{grid-column:3;grid-row:1 / 3}
1034
+ .app-attachment__retry{padding:0;border:0;border-radius:var(--radius-xs);background:transparent;color:var(--primary);font:inherit;font-weight:600;text-decoration:none;cursor:pointer}
1035
+ /* Centre the projected target on the tile, away from the row below. */
1036
+ .app-attachment__retry.app-target::after{top:calc(50% - var(--space-12))}
1037
+ .app-attachment__bar{pointer-events:none;position:absolute;left:var(--space-12);right:var(--space-12);bottom:var(--space-4);height:2px;background:var(--surface-container-highest);border-radius:var(--radius-pill);overflow:hidden}
1029
1038
  .app-attachment__bar>span{display:block;height:100%;background:var(--on-surface)}
1030
1039
  .app-attachment.is-error .app-attachment__glyph,.app-attachment.is-error .app-attachment__text>.text-meta{color:var(--error)}
1031
- .app-attachment--image{width:var(--attachment-preview-size);height:var(--attachment-preview-size);padding:0}
1040
+ .app-attachment--image{width:56px;height:56px;padding:0}
1032
1041
  .app-attachment--image>img,.app-attachment--image>svg{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
1033
1042
  .app-attachment--image .app-icon-btn{position:absolute;top:var(--space-4);right:var(--space-4);background:var(--surface);color:var(--on-surface)}
1034
1043
  .app-attachment--message{width:100%;height:auto;min-height:56px}
1044
+ .app-attachment--message>.app-icon-btn~.app-icon-btn{margin-left:max(0px,calc(var(--touch-target) - 36px))}
1035
1045
  a.app-attachment{color:inherit;text-decoration:none}
1036
1046
  .app-attachment__external{flex:none;font-size:16px;color:var(--on-surface-variant)}
1037
1047
  button.app-attachment{border:0;color:inherit;font:inherit;text-align:left;cursor:pointer}
package/classes.json CHANGED
@@ -34,6 +34,8 @@
34
34
  "app-attachment__bar",
35
35
  "app-attachment__external",
36
36
  "app-attachment__glyph",
37
+ "app-attachment__retry",
38
+ "app-attachment__status",
37
39
  "app-attachment__text",
38
40
  "app-avatar",
39
41
  "app-avatar--alis",
@@ -451,7 +453,6 @@
451
453
  "--alis-red",
452
454
  "--amber-100",
453
455
  "--amber-700",
454
- "--attachment-preview-size",
455
456
  "--background",
456
457
  "--band-bottom",
457
458
  "--band-fg",
@@ -4,12 +4,12 @@ A file, recording or queued message waiting in the composer's tray, and the same
4
4
 
5
5
  ## Use / don't use
6
6
 
7
- - **In [AppComposer](AppComposer.md)'s tray**, and in a sent message, where it opens the file. 232px wide, at least 56 high (growing for touch controls), `radius-lg` (16: concentric with the composer's corner, 28 − 12), on `surface-container-low`.
7
+ - **In [AppComposer](AppComposer.md)'s tray**, and in a sent message, where it opens the file. 232px wide and 56 high on both mouse and touch, `radius-lg` (16: concentric with the composer's corner, 28 − 12), on `surface-container-low`. The tray top-aligns its tiles; an image never stretches its neighbours.
8
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
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**: `attachment-preview-size` square, the picture, remove on top. Its image clips to the tile; the control and its focus ring stay inside it.
10
+ - **A ready image shows itself**: 56px square, the picture, remove 4px from the top and trailing edges. Its image clips to the tile; the control's touch target may extend into the tray gap and must not be clipped. While uploading or processing, use a named file tile so the state stays readable.
11
11
  - **States** follow § Upload lifecycle. Transfer progress is a 2px `on-surface` bar, like [AppProgress](AppProgress.md); it is not an action, so never `primary`.
12
- - **Controls have real space**: retry, cancel, edit and remove use `touch-target` for both dimensions (32px, 48 on touch). A tile with two controls grows wider; the tile grows taller for touch. Do not shrink controls, overlap their hit areas or let the tile clip a target or focus ring. An ellipsised name keeps its full text in the accessible name and `title`.
12
+ - **Controls draw at 24px**: cancel, edit and remove use `.app-target` to project a 32px mouse / 48px touch target. Retry is **Try again** in words on the status line, with no glyph: `primary`, weight 600, no underline, matching the conversation's other inline actions. Recovery keeps the tile's size: its small glyph sits beside the name, and the status uses the lower line beneath both. The retry target is centred vertically on the tile. Keep Retry and Remove targets separate, including across adjacent tiles, and never clip a target or focus ring. Queued messages retain space between Edit and Remove. An ellipsised name keeps its full text in the accessible name and `title`.
13
13
  - **A thing** opens what it names: the whole tile is the link, with no button in it. Its glyph names the kind, in ink, always a Material Symbol (a capability mark names a tool, not an object): `videocam` a meeting, `edit_note` its notes, `record_voice_over` an interview, `monitor_heart` diagnostics, `extension` a skill, `assignment` an issue, `terminal` an agent session. Its name is the label; the meta line is where it lives and its state: "Google Meet · recording", "Linear · BUI-29", "Diagnostics · 2 min ago". A provider's logo never replaces the glyph.
14
14
  - **Inside the product it opens in place; outside, in a new tab, and says so**: a 16px `open_in_new` at the tile's end (`.app-attachment__external`), and "opens in a new tab" in its accessible name.
15
15
  - **A file Alis made** stands in the reply where Alis put it, 320 wide (the full column on a phone), and opens [AppFilePane](AppFilePane.md) beside the conversation: the whole tile is a `<button>` with `aria-expanded`, nothing inside it, and no Download (that's in the pane). The label is Alis's description of the file, or else its name; the meta line its kind and size ("HTML page · 6 KB"). Glyphs: `web` an HTML page, `article` Markdown, `code` code, `text_snippet` plain text, `shapes` an SVG; a PDF, a CSV and anything else as above. An image Alis made shows itself, as any image does, and opens in the pane. No thumbnail of a page: it would mean running the page in every tile.
@@ -29,9 +29,9 @@ belongs to a file in one conversation's draft, never to a global attachment tray
29
29
  | Uploading | **Uploading · 48%** when byte progress is known, plus a labelled determinate bar; otherwise **Uploading** without a made-up percentage | Cancel upload |
30
30
  | Processing | **Processing** after all bytes transfer, until the service confirms the file is usable; no completed progress bar | Cancel upload |
31
31
  | Ready | Type · size; a local thumbnail for an image | Remove |
32
- | Failed | **Didn't upload**, or **Couldn't process** when transfer succeeded | Retry and Remove |
33
- | Cancelled | **Upload cancelled**; no progress or error colour | Retry and Remove |
34
- | Not accepted | The actionable reason, such as **Larger than 10 MiB** or **This file type isn't supported** | Remove; no retry until the input changes |
32
+ | Failed | **Didn't upload**, or **Couldn't process** when transfer succeeded | Inline **Try again** and Remove |
33
+ | Cancelled | **Upload cancelled**; no progress or error colour | Inline **Try again** and Remove |
34
+ | Not accepted | The `error` glyph and actionable reason, such as **Larger than 10 MB** or **Unsupported file type** | Remove; no retry until the input changes |
35
35
 
36
36
  - **100% is not Ready.** Enable Send only after every retained file is Ready and there is text or at least one file. A failed or cancelled tile blocks Send until retried or removed. The composer stays writable.
37
37
  - **Partial failure** stays on the affected tile; ready files and text are kept. Retry only that file, using a new attempt identity under its stable draft-file identity. Never upload the entire tray again.
@@ -61,8 +61,14 @@ belongs to a file in one conversation's draft, never to a global attachment tray
61
61
  <!-- Failed -->
62
62
  <div class="app-attachment is-error">
63
63
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">error</span></span>
64
- <span class="app-attachment__text"><span class="text-label" title="Customer list.xlsx">Customer list.xlsx</span><span class="text-meta">Didn't upload</span></span>
65
- <button type="button" class="app-icon-btn app-state app-target" aria-label="Retry Customer list.xlsx" title="Retry"><span class="app-icon" aria-hidden="true">refresh</span></button>
64
+ <span class="app-attachment__text"><span class="text-label" title="Customer list.xlsx">Customer list.xlsx</span><span class="text-meta app-attachment__status">Didn't upload · <button type="button" class="app-attachment__retry app-state app-target" aria-label="Retry Customer list.xlsx">Try again</button></span></span>
65
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Customer list.xlsx" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
66
+ </div>
67
+
68
+ <!-- Processing failed -->
69
+ <div class="app-attachment is-error">
70
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">error</span></span>
71
+ <span class="app-attachment__text"><span class="text-label" title="Customer list.xlsx">Customer list.xlsx</span><span class="text-meta app-attachment__status">Couldn't process · <button type="button" class="app-attachment__retry app-state app-target" aria-label="Retry Customer list.xlsx">Try again</button></span></span>
66
72
  <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Customer list.xlsx" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
67
73
  </div>
68
74
 
@@ -83,20 +89,19 @@ belongs to a file in one conversation's draft, never to a global attachment tray
83
89
  <!-- Cancelled upload -->
84
90
  <div class="app-attachment" role="group" aria-label="Browser screenshot.png, upload cancelled">
85
91
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">image</span></span>
86
- <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta">Upload cancelled</span></span>
87
- <button type="button" class="app-icon-btn app-state app-target" aria-label="Retry Browser screenshot.png" title="Retry"><span class="app-icon" aria-hidden="true">refresh</span></button>
92
+ <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta app-attachment__status">Upload cancelled · <button type="button" class="app-attachment__retry app-state app-target" aria-label="Retry Browser screenshot.png">Try again</button></span></span>
88
93
  <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Browser screenshot.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
89
94
  </div>
90
95
 
91
96
  <!-- File not accepted -->
92
- <div class="app-attachment is-error" role="group" aria-label="Browser screenshot.png, larger than 10 mib">
93
- <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">image</span></span>
94
- <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta">Larger than 10 MiB</span></span>
97
+ <div class="app-attachment is-error" role="group" aria-label="Browser screenshot.png, larger than 10 MB">
98
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">error</span></span>
99
+ <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta">Larger than 10 MB</span></span>
95
100
  <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Browser screenshot.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
96
101
  </div>
97
102
 
98
103
  <!-- An image -->
99
- <div class="app-attachment app-attachment--image" role="group" aria-label="Churn chart.png">
104
+ <div class="app-attachment app-attachment--image" role="group" aria-label="Churn chart.png" title="Churn chart.png">
100
105
  <img src="…" alt="">
101
106
  <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Churn chart.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
102
107
  </div>
@@ -135,6 +140,28 @@ belongs to a file in one conversation's draft, never to a global attachment tray
135
140
  <button type="button" class="app-icon-btn app-state app-target" aria-label="Edit" title="Edit"><span class="app-icon" aria-hidden="true">edit</span></button>
136
141
  <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
137
142
  </div>
143
+ <!-- Mixed tray -->
144
+ <div class="app-composer__tray">
145
+ <div class="app-attachment">
146
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">description</span></span>
147
+ <span class="app-attachment__text"><span class="text-label" title="Q3 pricing interviews.pdf">Q3 pricing interviews.pdf</span><span class="text-meta">PDF · 2.4 MB</span></span>
148
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Q3 pricing interviews.pdf" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
149
+ </div>
150
+ <div class="app-attachment app-attachment--image" role="group" aria-label="Churn chart.png" title="Churn chart.png">
151
+ <img src="…" alt="">
152
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Churn chart.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
153
+ </div>
154
+ <div class="app-attachment is-error">
155
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">error</span></span>
156
+ <span class="app-attachment__text"><span class="text-label" title="Customer list.xlsx">Customer list.xlsx</span><span class="text-meta app-attachment__status">Couldn't process · <button type="button" class="app-attachment__retry app-state app-target" aria-label="Retry Customer list.xlsx">Try again</button></span></span>
157
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Customer list.xlsx" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
158
+ </div>
159
+ <div class="app-attachment" role="group" aria-label="Browser screenshot.png, upload cancelled">
160
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">image</span></span>
161
+ <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta app-attachment__status">Upload cancelled · <button type="button" class="app-attachment__retry app-state app-target" aria-label="Retry Browser screenshot.png">Try again</button></span></span>
162
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Browser screenshot.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
163
+ </div>
164
+ </div>
138
165
  ```
139
166
 
140
167
  ## Behaviour you must supply
@@ -146,4 +173,4 @@ belongs to a file in one conversation's draft, never to a global attachment tray
146
173
 
147
174
  ## Classes
148
175
 
149
- `.app-attachment`, `.app-attachment--image`, `.app-attachment--message`, `.is-error`, `.is-selected`, `.is-gone`, `.app-attachment__glyph`, `.app-attachment__text`, `.app-attachment__bar`, with `.app-icon-btn`, `.app-state` and `.app-target` on its buttons.
176
+ `.app-attachment`, `.app-attachment--image`, `.app-attachment--message`, `.is-error`, `.is-selected`, `.is-gone`, `.app-attachment__glyph`, `.app-attachment__text`, `.app-attachment__status`, `.app-attachment__retry`, `.app-attachment__bar`, with `.app-icon-btn`, `.app-state` and `.app-target` on icon buttons and `.app-state .app-target` on Retry.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alis-build/design-system",
3
- "version": "0.43.0",
3
+ "version": "0.43.1",
4
4
  "description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks, words and rules.",
5
5
  "keywords": ["alisx", "design-system", "design-tokens", "css"],
6
6
  "homepage": "https://alisx.com",
package/tokens.css CHANGED
@@ -141,7 +141,6 @@
141
141
  --space-32: 32px;
142
142
  --space-48: 48px;
143
143
  --card-padding-wide: 28px;
144
- --attachment-preview-size: 96px;
145
144
  --chat-row: 32px;
146
145
  --touch-target: 32px;
147
146
  --touch-target-coarse: 48px;
package/tokens.json CHANGED
@@ -1411,11 +1411,6 @@
1411
1411
  "value": "28px",
1412
1412
  "usage": "Card padding from 600px wide: the scale's one exception. Set once on the card, never at a site."
1413
1413
  },
1414
- {
1415
- "name": "attachment-preview-size",
1416
- "value": "96px",
1417
- "usage": "Square preview in a composer's attachment tray: leaves the image visible beside a 48px touch remove target. Sent images use AppTurn's larger preview."
1418
- },
1419
1414
  {
1420
1415
  "name": "chat-row",
1421
1416
  "value": "32px",