@alis-build/design-system 0.42.1 → 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/README.md +9 -0
- package/alisx.css +18 -8
- package/check.mjs +67 -9
- package/classes.json +2 -1
- package/components/AppAttachment.md +42 -15
- package/package.json +1 -1
- package/rules/known-gaps.md +1 -1
- package/rules/terminal.md +2 -0
- package/tokens.css +0 -1
- package/tokens.json +0 -5
package/README.md
CHANGED
|
@@ -146,6 +146,15 @@ export default {
|
|
|
146
146
|
Its baseline, `alisx-words-baseline.json`, works as the styles one does. A
|
|
147
147
|
use that must stay is marked on its line or the line above:
|
|
148
148
|
`alisx-words-ignore -- the reason`.
|
|
149
|
+
- `alisx-check words --text <file>` reads a words file instead of markup: the
|
|
150
|
+
plain text a terminal app writes out of everything it says, in blocks headed
|
|
151
|
+
`== kind place · area`, then one `field<TAB>text` line per thing read.
|
|
152
|
+
`code` and `alias` lines, backticked spans (one a wrapped line carries on),
|
|
153
|
+
printf verbs (`%s`) and placeholders (`<id>`) are code. The baseline counts
|
|
154
|
+
each place, so the block that gains a retired name is the one that fails.
|
|
155
|
+
The file is generated, so there is no ignore: change the words at their source.
|
|
156
|
+
- In both, a retired name written with a capital ("Read only") is a label, and
|
|
157
|
+
counts only with its capital: "read only the parts that matter" is English.
|
|
149
158
|
- Each stops with exit code 2, never passes, when it could not run as set up: a
|
|
150
159
|
rule stylelint rejected, a file that didn't parse, no files matched.
|
|
151
160
|
|
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%;
|
|
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
|
-
/*
|
|
1025
|
-
.app-attachment .app-icon-btn.app-state{flex:none;width:
|
|
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
|
-
.
|
|
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:
|
|
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/check.mjs
CHANGED
|
@@ -31,7 +31,16 @@
|
|
|
31
31
|
// capital (rules/words.md). Code words (ideas.length, 'ideate-project')
|
|
32
32
|
// are not read. The baseline works as it does for styles (default
|
|
33
33
|
// alisx-words-baseline.json). A line marked alisx-words-ignore with a
|
|
34
|
-
// reason, or the line under it, is skipped.
|
|
34
|
+
// reason, or the line under it, is skipped. A retired name written with a
|
|
35
|
+
// capital (Read only) is a label, and counts only when it has the capital:
|
|
36
|
+
// "read only the parts that matter" is English.
|
|
37
|
+
//
|
|
38
|
+
// alisx-check words --text <file…> [--baseline <file>] [--update]
|
|
39
|
+
// Reads plain text written as a words file instead of markup: blocks headed
|
|
40
|
+
// `== kind place · area`, then one `field<TAB>text` line per thing a
|
|
41
|
+
// person reads. Lines of the field code or alias are code, and so is what
|
|
42
|
+
// is in backticks, a printf verb (%s) or a placeholder (<id>). The baseline
|
|
43
|
+
// counts each block's place, so one gaining a retired name fails.
|
|
35
44
|
import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from 'node:fs'
|
|
36
45
|
import { spawnSync } from 'node:child_process'
|
|
37
46
|
import { tmpdir } from 'node:os'
|
|
@@ -41,14 +50,15 @@ import { fileURLToPath } from 'node:url'
|
|
|
41
50
|
const here = dirname(fileURLToPath(import.meta.url))
|
|
42
51
|
const { version } = JSON.parse(readFileSync(join(here, 'package.json'), 'utf8'))
|
|
43
52
|
const usage =
|
|
44
|
-
'usage: alisx-check names <path…> [--prefix app-] [--declared <path>] [--allow <property>]\n alisx-check styles <glob…> [--baseline <file>] [--update]\n alisx-check words <path…> [--baseline <file>] [--update]'
|
|
53
|
+
'usage: alisx-check names <path…> [--prefix app-] [--declared <path>] [--allow <property>]\n alisx-check styles <glob…> [--baseline <file>] [--update]\n alisx-check words [--text] <path…> [--baseline <file>] [--update]'
|
|
45
54
|
const [command, ...argv] = process.argv.slice(2)
|
|
46
55
|
|
|
47
56
|
const paths = []
|
|
48
|
-
const options = { prefix: [], allow: [], declared: [], baseline: command === 'words' ? 'alisx-words-baseline.json' : 'alisx-style-baseline.json', update: false }
|
|
57
|
+
const options = { prefix: [], allow: [], declared: [], baseline: command === 'words' ? 'alisx-words-baseline.json' : 'alisx-style-baseline.json', update: false, text: false }
|
|
49
58
|
for (let i = 0; i < argv.length; i++) {
|
|
50
59
|
const arg = argv[i]
|
|
51
60
|
if (arg === '--update') options.update = true
|
|
61
|
+
else if (arg === '--text' && command === 'words') options.text = true
|
|
52
62
|
else if (arg === '--baseline' || arg === '--prefix' || arg === '--allow' || arg === '--declared') {
|
|
53
63
|
const value = argv[++i]
|
|
54
64
|
// --allow takes a property, which itself starts with two dashes.
|
|
@@ -250,11 +260,13 @@ function words() {
|
|
|
250
260
|
if (missing.length) stop(`alisx-check words: no such path: ${missing.join(', ')}`)
|
|
251
261
|
const files = paths
|
|
252
262
|
.flatMap((path) => walk(resolve(path)))
|
|
253
|
-
.filter((file) => sources.includes(extname(file)) && !/\.(spec|test)\.[cm]?[jt]sx?$|\.d\.ts$/.test(file))
|
|
263
|
+
.filter((file) => options.text || (sources.includes(extname(file)) && !/\.(spec|test)\.[cm]?[jt]sx?$|\.d\.ts$/.test(file)))
|
|
254
264
|
if (!files.length) stop(`alisx-check words: no source files under ${paths.join(', ')}.`)
|
|
255
265
|
|
|
266
|
+
// A words file is counted by the place each block names, a source file whole.
|
|
256
267
|
const root = dirname(resolve(options.baseline))
|
|
257
268
|
const key = (file) => relative(root, file).split(sep).join('/')
|
|
269
|
+
const fileOf = (path) => path.split(' › ')[0]
|
|
258
270
|
const now = {}
|
|
259
271
|
const found = {}
|
|
260
272
|
for (const file of files) {
|
|
@@ -265,13 +277,17 @@ function words() {
|
|
|
265
277
|
lines.forEach((line, i) => {
|
|
266
278
|
if (/alisx-words-ignore\s+--\s*\S/.test(line)) ignored.add(i + 1).add(i + 2)
|
|
267
279
|
})
|
|
268
|
-
|
|
280
|
+
const pieces = options.text ? plain(text) : readable(text, extname(file)).map((piece) => ({ ...piece, place: '' }))
|
|
281
|
+
if (options.text && !pieces.length) stop(`alisx-check words: ${key(file)} has no == blocks, so it is not a words file.`)
|
|
282
|
+
for (const { start, value, place } of pieces) {
|
|
269
283
|
let rest = value
|
|
270
284
|
for (const { text: word, name, pattern } of retired)
|
|
271
285
|
rest = rest.replace(pattern, (match, offset) => {
|
|
286
|
+
// A label's capital is part of it: "Read only" is a role, "read only" English.
|
|
287
|
+
if (/[A-Z]/.test(word[0]) && match[0] !== word[0]) return match
|
|
272
288
|
const line = lineOf(start + offset)
|
|
273
289
|
if (!ignored.has(line)) {
|
|
274
|
-
const path = key(file)
|
|
290
|
+
const path = place ? `${key(file)} › ${place}` : key(file)
|
|
275
291
|
now[path] ??= {}
|
|
276
292
|
now[path][word] = (now[path][word] ?? 0) + 1
|
|
277
293
|
;(found[path] ??= []).push({ word, name, line, text: lines[line - 1].trim() })
|
|
@@ -292,12 +308,12 @@ function words() {
|
|
|
292
308
|
}
|
|
293
309
|
}
|
|
294
310
|
const read = new Set(files.map(key))
|
|
295
|
-
const unseen = Object.fromEntries(Object.entries(baseline?.files ?? {}).filter(([path]) => !read.has(path) && existsSync(join(root, path))))
|
|
311
|
+
const unseen = Object.fromEntries(Object.entries(baseline?.files ?? {}).filter(([path]) => !read.has(fileOf(path)) && existsSync(join(root, fileOf(path)))))
|
|
296
312
|
|
|
297
313
|
if (options.update) {
|
|
298
314
|
const counts = Object.fromEntries(Object.entries({ ...unseen, ...now }).sort(([a], [b]) => a.localeCompare(b)))
|
|
299
315
|
writeFileSync(options.baseline, `${JSON.stringify({ version, files: counts }, null, 2)}\n`)
|
|
300
|
-
console.log(`alisx-check words: recorded ${total(counts)} retired names across ${Object.keys(counts).length} files in ${options.baseline}, against @alis-build/design-system@${version}.`)
|
|
316
|
+
console.log(`alisx-check words: recorded ${total(counts)} retired names across ${Object.keys(counts).length} ${options.text ? 'places' : 'files'} in ${options.baseline}, against @alis-build/design-system@${version}.`)
|
|
301
317
|
return
|
|
302
318
|
}
|
|
303
319
|
|
|
@@ -325,7 +341,10 @@ function words() {
|
|
|
325
341
|
for (const use of uses.slice(0, 20)) console.error(` ${use.line} ${use.text.length > 120 ? `${use.text.slice(0, 117)}…` : use.text}`)
|
|
326
342
|
if (uses.length > 20) console.error(` … and ${uses.length - 20} more`)
|
|
327
343
|
}
|
|
328
|
-
|
|
344
|
+
if (options.text)
|
|
345
|
+
console.error('\nThe names are in words.json in @alis-build/design-system; rules/words.md says how to use them. A words\nfile is generated: change the words where they are written, and generate it again.\n')
|
|
346
|
+
else
|
|
347
|
+
console.error('\nThe names are in words.json in @alis-build/design-system; rules/words.md says how to use them. A use that\nmust stay is marked on its line, with the reason:\n\n <!-- alisx-words-ignore -- why it stays -->\n')
|
|
329
348
|
process.exit(1)
|
|
330
349
|
}
|
|
331
350
|
|
|
@@ -370,6 +389,45 @@ function readable(text, ext) {
|
|
|
370
389
|
return pieces
|
|
371
390
|
}
|
|
372
391
|
|
|
392
|
+
// The text in a words file a person reads, each line with where it starts and
|
|
393
|
+
// the place its block names. A code span that a long line wrapped carries on
|
|
394
|
+
// to the next line of its block.
|
|
395
|
+
function plain(text) {
|
|
396
|
+
const pieces = []
|
|
397
|
+
const code = /`[^`]*`|%[-+#0]*\d*(?:\.\d+)?[a-zA-Z]|<[A-Za-z][^<>]*>/g
|
|
398
|
+
let place = ''
|
|
399
|
+
let open = false
|
|
400
|
+
let at = 0
|
|
401
|
+
for (const line of text.split('\n')) {
|
|
402
|
+
const start = at
|
|
403
|
+
at += line.length + 1
|
|
404
|
+
const header = /^== +(\S+) +(.*?)(?: +hidden)? +· +\S+\s*$/.exec(line)
|
|
405
|
+
if (header) {
|
|
406
|
+
place = `${header[1]} ${header[2].replace(/\s+/g, ' ')}`
|
|
407
|
+
open = false
|
|
408
|
+
continue
|
|
409
|
+
}
|
|
410
|
+
const tab = line.indexOf('\t')
|
|
411
|
+
if (!place || tab < 0 || /^(?:code|alias)\b/.test(line)) continue
|
|
412
|
+
let value = line.slice(tab + 1)
|
|
413
|
+
// Still inside a span from the line above: code up to its closing tick.
|
|
414
|
+
if (open) {
|
|
415
|
+
const close = value.indexOf('`')
|
|
416
|
+
if (close < 0) continue
|
|
417
|
+
value = ' '.repeat(close + 1) + value.slice(close + 1)
|
|
418
|
+
open = false
|
|
419
|
+
}
|
|
420
|
+
value = value.replace(code, (match) => ' '.repeat(match.length))
|
|
421
|
+
const tick = value.indexOf('`')
|
|
422
|
+
if (tick >= 0) {
|
|
423
|
+
value = value.slice(0, tick)
|
|
424
|
+
open = true
|
|
425
|
+
}
|
|
426
|
+
if (/[A-Za-z]/.test(value)) pieces.push({ start: start + tab + 1, value, place })
|
|
427
|
+
}
|
|
428
|
+
return pieces
|
|
429
|
+
}
|
|
430
|
+
|
|
373
431
|
// Code with each console.…(…) call blanked, keeping every offset.
|
|
374
432
|
function unlogged(code) {
|
|
375
433
|
let out = code
|
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
|
|
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
|
-
- **
|
|
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
|
|
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 |
|
|
33
|
-
| Cancelled | **Upload cancelled**; no progress or error colour |
|
|
34
|
-
| Not accepted | The actionable reason, such as **Larger than 10
|
|
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="
|
|
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
|
|
93
|
-
<span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">
|
|
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
|
|
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
|
|
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.
|
|
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/rules/known-gaps.md
CHANGED
|
@@ -18,7 +18,7 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
|
|
|
18
18
|
- **Withdrawing a request, turning requests off, and approval chains.** A person can't withdraw a request they made, Owners can't choose whether anyone may ask, and a request that needs several approvers in turn has no pattern ([AppAsk](../components/AppAsk.md) § Who asks, [access.md](access.md) § Asking for more). An approval chain would be its own component: its parts and interaction differ.
|
|
19
19
|
- **An account's own roles, and seats.** `words.json` names the roles on a thing (Owner, Editor, Viewer); an account's roles (an admin, a builder, a curator) and its seats are not in it yet. Say what the person needs in the screen's own words ("ask an admin of Acme"), and add the entries with the first change.
|
|
20
20
|
- **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)).
|
|
21
|
-
- **
|
|
21
|
+
- **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)).
|
|
22
22
|
- **A log viewer.** "View logs" goes to the logs' own screen; there is no pattern for showing logs inside a pane.
|
|
23
23
|
- **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.
|
|
24
24
|
|
package/rules/terminal.md
CHANGED
|
@@ -69,3 +69,5 @@ A command or a flag is a label: it takes its name from `words.json`.
|
|
|
69
69
|
3. Would an agent reading the help or a hint learn the right name?
|
|
70
70
|
4. Did a renamed command keep its old name as a hidden alias, and did a guard's
|
|
71
71
|
or a script's name stay put?
|
|
72
|
+
5. Did you generate the CLI's words file again? `alisx-check words --text` reads
|
|
73
|
+
it against `words.json`, and a place that gains a retired name fails.
|
package/tokens.css
CHANGED
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",
|