@alis-build/design-system 0.49.1 → 0.50.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
@@ -164,18 +164,20 @@
164
164
  --elevation-1: 0 1px 2px 0 var(--shadow-key), 0 2px 6px 0 var(--shadow-ambient);
165
165
  --elevation-2: 0 1px 2px 0 var(--shadow-key), 0 4px 12px 0 var(--shadow-ambient);
166
166
  --elevation-3: 0 1px 3px 0 var(--shadow-key), 0 12px 32px -4px var(--shadow-ambient);
167
- --dur-spatial: 220ms;
168
- --dur-effects: 160ms;
169
167
  --dur-tint: 140ms;
170
168
  --dur-ui: 200ms;
171
169
  --dur-panel: 320ms;
172
170
  --dur-arrive: 650ms;
173
171
  --stagger: 120ms;
174
- --blink: 1.1s;
175
- --motion-spatial: cubic-bezier(0.2, 0.8, 0.2, 1.15);
176
- --motion-effects: cubic-bezier(0.2, 0, 0, 1);
172
+ --stagger-step: 40ms;
177
173
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
178
174
  --ease-arrive: cubic-bezier(0.22, 1, 0.36, 1);
175
+ --loop-spin: 0.8s linear infinite;
176
+ --loop-shimmer: 1.4s ease-in-out infinite;
177
+ --loop-dots: 1.2s ease-in-out infinite;
178
+ --loop-pulse: 1.6s ease-in-out infinite;
179
+ --loop-breathe: 3.2s ease-in-out infinite alternate;
180
+ --loop-blink: 1.1s steps(1) infinite;
179
181
  --state-hover: 0.04;
180
182
  --state-focus: 0.04;
181
183
  --state-pressed: 0.12;
@@ -349,7 +351,7 @@
349
351
 
350
352
  /* Rules on the tokens themselves, shipped in alisx.css and tokens.css alike. */
351
353
  @media (pointer: coarse) { :root { --touch-target: var(--touch-target-coarse); --control-height: var(--touch-target-coarse); } }
352
- @media (prefers-reduced-motion: reduce) { :root { --dur-spatial: 0ms; --dur-effects: 0ms; --dur-tint: 0ms; --dur-ui: 0ms; --dur-panel: 0ms; --dur-arrive: 0ms; --stagger: 0ms; } }
354
+ @media (prefers-reduced-motion: reduce) { :root { --dur-tint: 0ms; --dur-ui: 0ms; --dur-panel: 0ms; --dur-arrive: 0ms; --stagger: 0ms; } }
353
355
 
354
356
  /* Type styles: one class per job (rules/type.md). */
355
357
  .text-welcome-title { font-family: var(--font-sans); font-size: 40px; line-height: 48px; font-weight: 800; letter-spacing: -0.03em; }
@@ -452,7 +454,7 @@ button, input, textarea, select { font: inherit; }
452
454
  .app-btn--quiet{color:var(--on-surface-variant)}
453
455
  .app-btn--small{min-height:32px;padding:0 var(--space-12)}
454
456
  .app-btn__spinner{width:16px;height:16px;border-radius:var(--radius-pill);border:2px solid currentColor;border-right-color:transparent;flex:none}
455
- @media (prefers-reduced-motion:no-preference){.app-btn__spinner{animation:app-spin .8s linear infinite}}
457
+ @media (prefers-reduced-motion:no-preference){.app-btn__spinner{animation:app-spin var(--loop-spin)}}
456
458
  @keyframes app-spin{to{transform:rotate(360deg)}}
457
459
  .app-target--none::after{content:none}
458
460
  @media (prefers-reduced-motion:no-preference){.app-btn--filled:not(:disabled):active{border-radius:12px;transform:scale(.97)}}
@@ -660,13 +662,13 @@ a.app-row,a.app-card{text-decoration:none}
660
662
  .app-skel__row--plain .app-skel__dot{display:none}
661
663
  .app-skel__dot{width:24px;height:24px;border-radius:var(--radius-pill);background:var(--surface-container-highest);flex:none}
662
664
  .app-skel__lines{display:flex;flex-direction:column;gap:var(--space-8);flex:1}
663
- @media (prefers-reduced-motion:no-preference){.app-skel__bar::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,var(--shimmer),transparent);opacity:.6;animation:app-shimmer 1.4s ease-in-out infinite}}
665
+ @media (prefers-reduced-motion:no-preference){.app-skel__bar::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,var(--shimmer),transparent);opacity:.6;animation:app-shimmer var(--loop-shimmer)}}
664
666
  @keyframes app-shimmer{to{transform:translateX(100%)}}
665
667
 
666
668
  /* ── Loader · the Alis mark, in signal ── */
667
669
  .app-loader{display:flex;flex-direction:column;align-items:center;gap:var(--space-16);color:var(--on-surface-variant)}
668
670
  .app-loader--line{display:inline-flex;flex-direction:row;gap:var(--space-8)}
669
- @media (prefers-reduced-motion:no-preference){.app-loader circle{animation:app-dot 1.2s ease-in-out infinite both}}
671
+ @media (prefers-reduced-motion:no-preference){.app-loader circle{animation:app-dot var(--loop-dots) both}}
670
672
  .app-loader circle:nth-child(1){animation-delay:0s}.app-loader circle:nth-child(2){animation-delay:.08s}.app-loader circle:nth-child(3){animation-delay:.16s}.app-loader circle:nth-child(4){animation-delay:.24s}.app-loader circle:nth-child(5){animation-delay:.32s}.app-loader circle:nth-child(6){animation-delay:.4s}.app-loader circle:nth-child(7){animation-delay:.48s}.app-loader circle:nth-child(8){animation-delay:.56s}.app-loader circle:nth-child(9){animation-delay:.64s}.app-loader circle:nth-child(10){animation-delay:.72s}.app-loader circle:nth-child(11){animation-delay:.8s}
671
673
  @keyframes app-dot{0%,100%{opacity:1}50%{opacity:.25}}
672
674
 
@@ -994,7 +996,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
994
996
  .app-field__voice>:last-child{margin-left:auto}
995
997
  .app-field__rec{display:inline-flex;align-items:center;gap:var(--space-8);color:var(--on-surface)}
996
998
  .app-composer__rec::before,.app-field__rec::before{content:"";width:8px;height:8px;border-radius:var(--radius-pill);background:var(--error)}
997
- @media (prefers-reduced-motion:no-preference){.app-composer__rec::before,.app-field__rec::before{animation:app-dot 1.2s ease-in-out infinite both}}
999
+ @media (prefers-reduced-motion:no-preference){.app-composer__rec::before,.app-field__rec::before{animation:app-dot var(--loop-dots) both}}
998
1000
  .app-composer__timer{padding-inline:var(--space-8);font-variant-numeric:tabular-nums;color:var(--on-surface)}
999
1001
  /* A capture beside the conversation (a screen recording): a band docked on top of the box the way an ask docks, 20 in, a hairline under it. The editor stays writable; Send stays the one filled button, so Stop is error ink, unfilled (rules/buttons.md § Colour) */
1000
1002
  .app-composer__capture{display:flex;align-items:center;gap:var(--space-4);min-height:40px;padding:0 0 var(--space-4) var(--space-12);margin-bottom:var(--space-4);border-bottom:1px solid var(--outline-variant)}
@@ -1044,7 +1046,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
1044
1046
  .is-alis>.app-composer__light::before,.is-alis .app-voice__orb::before{opacity:0}
1045
1047
  .is-alis>.app-composer__light::after,.is-alis .app-voice__orb::after{opacity:1}
1046
1048
  .is-muted>.app-composer__light,.is-muted .app-voice__orb{opacity:.35}
1047
- @media (prefers-reduced-motion:no-preference){.app-composer__light,.app-voice__orb{animation:app-breathe 3.2s var(--ease-standard) infinite alternate}}
1049
+ @media (prefers-reduced-motion:no-preference){.app-composer__light,.app-voice__orb{animation:app-breathe var(--loop-breathe)}}
1048
1050
  @keyframes app-breathe{from{transform:scale(.96)}to{transform:scale(1.04)}}
1049
1051
 
1050
1052
  /* ── Dock · a composer docked at the foot of a screen as the way in to Alis. Sticky, the last child of the content that
@@ -1175,7 +1177,7 @@ button.app-attachment{border:0;color:inherit;font:inherit;text-align:left;cursor
1175
1177
  .app-turn__step .app-icon{font-size:16px}
1176
1178
  .app-turn__output{margin:0;padding:var(--space-8) var(--space-12);border-radius:var(--radius-md);background:var(--surface-container-low);color:var(--on-surface);font-family:var(--font-mono);font-size:12px;line-height:16px;white-space:pre;overflow-x:auto;max-height:64px}
1177
1179
  .app-turn__caret{display:inline-block;width:2px;height:20px;margin-left:2px;vertical-align:-4px;border-radius:1px;background:var(--signal)}
1178
- @media (prefers-reduced-motion:no-preference){.app-turn__caret{animation:app-dot 1s steps(1) infinite}}
1180
+ @media (prefers-reduced-motion:no-preference){.app-turn__caret{animation:app-dot var(--loop-blink)}}
1179
1181
  .app-turn__row{display:flex;align-items:flex-end;justify-content:flex-end;gap:var(--space-4);width:100%}
1180
1182
  .app-turn--them .app-turn__row{justify-content:flex-start}
1181
1183
  .app-turn__bubble{min-width:0;max-width:80%;padding:var(--space-12) var(--space-16);border-radius:var(--radius-lg);background:var(--surface-container-low);color:var(--on-surface);font-family:var(--font-sans);font-size:16px;line-height:24px;font-weight:400;white-space:pre-line;overflow-wrap:anywhere}
@@ -1408,7 +1410,6 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
1408
1410
  /* Reveals: the clip opens along one axis, 40px outside the box so the deepest shadow shows, and is gone once it has played */
1409
1411
  @keyframes app-reveal-down{from{clip-path:inset(-40px -40px calc(100% + 40px) -40px)}to{clip-path:inset(-40px)}}
1410
1412
  @keyframes app-reveal-up{from{clip-path:inset(calc(100% + 40px) -40px -40px -40px)}to{clip-path:inset(-40px)}}
1411
- @keyframes app-reveal-middle{from{clip-path:inset(30% -40px 30% -40px)}to{clip-path:inset(-40px)}}
1412
1413
 
1413
1414
  /* Icons that change their meaning: two glyphs in one slot. The one leaving turns away and fades; then the other springs in */
1414
1415
  .app-icon-swap{display:inline-grid;place-items:center;flex:none}
@@ -1457,7 +1458,8 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
1457
1458
  .app-snackbar[hidden]{display:none;opacity:0}
1458
1459
  .app-scrim{animation:app-fade-in var(--spring-default-effects);transition:background-color var(--spring-fast-effects),display var(--spring-fast-effects) allow-discrete}
1459
1460
  .app-scrim[hidden]{display:none;background-color:transparent}
1460
- .app-dialog{animation:app-reveal-middle var(--spring-default-spatial),app-fade-in var(--spring-fast-effects);transition:opacity var(--spring-fast-effects)}
1461
+ /* A dialog comes from nowhere: it fades in place, with its scrim */
1462
+ .app-dialog{animation:app-fade-in var(--spring-default-effects);transition:opacity var(--spring-fast-effects)}
1461
1463
  .app-scrim[hidden]>.app-dialog{opacity:0}
1462
1464
  /* Alis's ask, arriving while you watch, grows up out of the composer, then its words fade in */
1463
1465
  .app-ask{min-block-size:0}
package/classes.json CHANGED
@@ -476,7 +476,6 @@
476
476
  "--band-surface",
477
477
  "--band-top",
478
478
  "--bench-grid-line",
479
- "--blink",
480
479
  "--blue-600",
481
480
  "--breakpoint-compact",
482
481
  "--breakpoint-expanded",
@@ -506,9 +505,7 @@
506
505
  "--cyan-700",
507
506
  "--detail-width",
508
507
  "--dur-arrive",
509
- "--dur-effects",
510
508
  "--dur-panel",
511
- "--dur-spatial",
512
509
  "--dur-tint",
513
510
  "--dur-ui",
514
511
  "--ease-arrive",
@@ -539,11 +536,15 @@
539
536
  "--highlight",
540
537
  "--info",
541
538
  "--inverse-surface",
539
+ "--loop-blink",
540
+ "--loop-breathe",
541
+ "--loop-dots",
542
+ "--loop-pulse",
543
+ "--loop-shimmer",
544
+ "--loop-spin",
542
545
  "--machine-surface",
543
546
  "--measure-prose",
544
547
  "--mist-100",
545
- "--motion-effects",
546
- "--motion-spatial",
547
548
  "--narrative-canvas",
548
549
  "--narrative-ink-body",
549
550
  "--narrative-line",
@@ -660,6 +661,7 @@
660
661
  "--spring-slow-spatial-duration",
661
662
  "--spring-slow-spatial-easing",
662
663
  "--stagger",
664
+ "--stagger-step",
663
665
  "--state-dragged",
664
666
  "--state-focus",
665
667
  "--state-hover",
@@ -88,6 +88,7 @@ What you chose from `/` or `@` becomes **one token in the sentence** (`.app-toke
88
88
  ## Behaviour you must supply
89
89
 
90
90
  - **Place an action menu** 4 below its trigger, its start edge on the trigger's start (its end edge for a trigger at the end of a row), flipping above when there isn't room; the composer's Add opens upward. A menu above its trigger takes `app-menu--above` (the composer's bands already do). Toggle `hidden` and the trigger's `aria-expanded`: it grows out of its trigger and leaves as a fade ([motion.md](../rules/motion.md)).
91
+ - **It grows from the edge level with its trigger**, always up or down, never sideways: down when it opens below the trigger, or beside it from the trigger's top; up (`app-menu--above`) when it opens above, or beside it from the trigger's foot, as an account menu at the foot of the navigation pane does. A menu that flips for room flips its reveal too: take the class from where it opened, not where it was asked to.
91
92
  - **Action menu keys**: Up and Down move and wrap, Home and End, a letter jumps to the next item starting with it, Enter or Space chooses, Escape closes and returns focus to the trigger, Tab closes. Down or Up on the trigger opens it on the first or last item. A press outside closes it.
92
93
  - **Suggestion menu keys**, on the editor only (never a window listener): Up and Down move `is-active` and `aria-activedescendant`, Enter or Tab chooses, Escape closes. Ignore keys while `isComposing`. Stop the keys you handle from reaching anything else.
93
94
  - **Triggers**: `/` at the start of the message only, `@` at the start or after a space; filter as you type; close when a space follows no match.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alis-build/design-system",
3
- "version": "0.49.1",
3
+ "version": "0.50.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/README.md CHANGED
@@ -23,7 +23,7 @@ Read only what the job needs.
23
23
  | [spacing.md](spacing.md) | The scale, targets, density |
24
24
  | [buttons.md](buttons.md) | Which button, and how many |
25
25
  | [selection.md](selection.md) | How a selected thing is drawn |
26
- | [motion.md](motion.md) | The springs, which one moves what, reduced motion, changing page |
26
+ | [motion.md](motion.md) | The springs, which one moves what, sequences, loops, reduced motion, changing page |
27
27
  | [chips-alerts.md](chips-alerts.md) | Chips, alerts, status |
28
28
  | [loading.md](loading.md) | Skeleton, loader, progress |
29
29
  | [errors.md](errors.md) | What shows when something fails, can't load, isn't allowed or isn't there |
package/rules/motion.md CHANGED
@@ -11,10 +11,10 @@ never writes a duration or a curve.
11
11
  | Token | From M3 | Settles | Overshoot | For |
12
12
  | --- | --- | --- | --- | --- |
13
13
  | `spring-fast-spatial` | Expressive | 359ms | 9.5% | A control answering a touch in place: a press, a switch's handle, a toggle's glyph, an icon changing its meaning |
14
- | `spring-default-spatial` | Expressive | 435ms | 1.5% | What covers part of the screen or travels across it: a menu, a dialog, a snackbar, a pane, a tab's indicator, a fold, a page's 24px shift |
14
+ | `spring-default-spatial` | Expressive | 435ms | 1.5% | What covers part of the screen or travels across it: a menu, a snackbar, a pane, a tab's indicator, a fold, a page's 24px shift |
15
15
  | `spring-slow-spatial` | Standard | 484ms | 0.15%, too little to see | What fills the screen: the phone's navigation pane |
16
16
  | `spring-fast-effects` | both | 150ms | never | Colour and opacity on a control, state layers, and every fade out |
17
- | `spring-default-effects` | both | 231ms | never | Content fading in: a page, a tab's panel, a reply as it streams, a scrim |
17
+ | `spring-default-effects` | both | 231ms | never | Content fading in: a page, a tab's panel, a reply as it streams, a scrim, a dialog |
18
18
  | `spring-slow-effects` | both | 326ms | never | A slow colour change: the tint on a row that just arrived |
19
19
 
20
20
  Each comes three ways: `--spring-fast-spatial` is the duration and the curve
@@ -46,8 +46,8 @@ The curve is CSS `linear()`, drawn from the spring itself, every wobble of it.
46
46
  - **Reduced motion: movement becomes a fade.** Under `prefers-reduced-motion` the
47
47
  spatial springs are `0s` and the effects springs stay, so things appear in place
48
48
  and still fade, and nothing jump-cuts. The tokens do it; never zero a fade
49
- yourself. A loop (a loader, a shimmer, a caret) holds still: wrap its
50
- `animation` in `@media (prefers-reduced-motion: no-preference)`.
49
+ yourself. A loop holds still: wrap its `animation` in
50
+ `@media (prefers-reduced-motion: no-preference)` (§ Loops).
51
51
  - **One direction.** Everything that moves in a transition moves along one axis.
52
52
  - **Clean fades.** The old content fades out on fast effects, then the new fades in
53
53
  on default effects, delayed by `--spring-fast-effects-duration`. Two contents are
@@ -55,7 +55,8 @@ The curve is CSS `linear()`, drawn from the spring itself, every wobble of it.
55
55
  - **Things come from where they live**, and leave the way they came: the detail pane
56
56
  from the right edge, the phone's navigation pane from the left, the composer's
57
57
  bands up out of the composer, a menu out of its trigger, a snackbar up from the
58
- foot.
58
+ foot. A dialog comes from nowhere: it fades in place, with its scrim, and
59
+ nothing about it moves.
59
60
  - **Leaving is quicker than arriving.** Something within the screen leaves as a
60
61
  fade on fast effects, without moving. A pane goes back over its edge.
61
62
  - **Grow, never scale.** A surface arrives by revealing itself along one axis (a
@@ -63,13 +64,42 @@ The curve is CSS `linear()`, drawn from the spring itself, every wobble of it.
63
64
  - **The layout holds still.** A skeleton holds the shape ([loading.md](loading.md));
64
65
  a row that arrives opens its own space; nothing pops in or shoves.
65
66
  - **Focus never animates.** The ring is there the moment the key is pressed.
67
+ - **A sequence steps on the tokens.** A delay is a spring's `-duration`, a sum of
68
+ them, or an item's place in a set times `--stagger-step` (40ms):
69
+ `calc(var(--spring-default-spatial-duration) + var(--i) * var(--stagger-step))`.
70
+ Stagger only a set that arrives because something happened (a check that
71
+ finishes, a section scrolling in on a marketing page), never a list a page draws,
72
+ which arrives at once. Five steps at most: the sixth and later arrive with the
73
+ fifth.
66
74
  - **Only the tokens.** No duration or curve of your own in a `transition` or an
67
- `animation`; the check refuses one ([styling.md](styling.md)). A loop of your
68
- own is a gap: say so where it is.
75
+ `animation`: a spring, a loop, or a sequence of them. The check refuses the rest
76
+ ([styling.md](styling.md)).
69
77
  - **Timing that isn't a spring** belongs to its component: a tooltip opens after
70
78
  the pointer rests ([AppTooltip](../components/AppTooltip.md)); ✓ stays about two
71
79
  seconds ([buttons.md](buttons.md)).
72
80
 
81
+ ## Loops
82
+
83
+ Something that repeats until it stops (a spinner, a shimmer, a live dot) isn't a
84
+ spring. It takes the loop token for its look, which holds its length, curve and
85
+ repeat: `animation: live var(--loop-pulse)`. The same look runs at the same speed
86
+ on every screen.
87
+
88
+ | Token | Runs | For |
89
+ | --- | --- | --- |
90
+ | `loop-spin` | 0.8s, even | A spinner |
91
+ | `loop-shimmer` | 1.4s | A skeleton's shimmer |
92
+ | `loop-dots` | 1.2s | The working dots, the Alis mark's loader, the recording dot |
93
+ | `loop-pulse` | 1.6s | Something live or running: a live dot, a running state |
94
+ | `loop-breathe` | 3.2s, there and back | A large, calm glow: the composer's light, the voice orb |
95
+ | `loop-blink` | 1.1s, on and off | The red cursor |
96
+
97
+ A loop holds still under reduced motion: wrap its `animation` in
98
+ `@media (prefers-reduced-motion: no-preference)`. The Alis mark's own drawings
99
+ (its loader's order, a drawing that morphs) keep their own timing, the way a
100
+ drawing keeps its own colours ([styling.md](styling.md)); say so once, at the top
101
+ of the drawing's styles.
102
+
73
103
  ## What moves, and what the site does
74
104
 
75
105
  The CSS hangs the motion off the state each component already has. Most of it
@@ -82,7 +112,7 @@ needs nothing from the site.
82
112
  | An icon changing its meaning (Send to Stop, Copy to ✓) | `.app-icon-swap` turns one glyph away and springs the other in | Put both glyphs in it and toggle `is-swapped` ([AppIconButton](../components/AppIconButton.md)) |
83
113
  | Selection that travels | `app-tabs--travel` and `app-seg--travel` draw one indicator that travels | Set `--indicator-left` and `--indicator-width` to the selected item's `offsetLeft` and `offsetWidth`, then add the modifier, so it is drawn in place and moves only on a change ([AppTitleBar](../components/AppTitleBar.md), [AppSegmented](../components/AppSegmented.md)) |
84
114
  | Expand and collapse | A disclosure and a turn's steps open to their height, then their rows fade in | Toggle `open` or `hidden`, as already |
85
- | A menu, tooltip, snackbar or dialog | Arrives growing out of where it lives; leaves as a fade when it's `hidden`. Nothing is clipped once it has arrived, so a field's panel inside it shows whole | Toggle `hidden`, or set it and remove the element once it has gone (§ Removing what has left). Removed at once, it just goes |
115
+ | A menu, tooltip, snackbar or dialog | A menu or snackbar arrives growing out of where it lives; a tooltip and a dialog fade in place. Each leaves as a fade when it's `hidden`. Nothing is clipped once it has arrived, so a field's panel inside it shows whole | Toggle `hidden`, or set it and remove the element once it has gone (§ Removing what has left). Removed at once, it just goes |
86
116
  | Alis's ask | Grows up out of the composer | Render it with `is-arriving` when it opens while someone is there |
87
117
  | The conversation | A turn that arrives fades in, and yours rises out of the composer; each status fades in; each run of a reply fades in as it lands | `is-arriving` on a turn that arrives while the thread is open; each step's words in a new element inside the one status; each arriving run in `.app-turn__chunk` ([AppTurn](../components/AppTurn.md)) |
88
118
  | A list that changes | A row that arrives opens its space and is tinted for a moment; one that leaves folds away | `is-arriving` on a row that arrives while the list is open; `is-leaving`, then remove it once it has gone ([AppListRow](../components/AppListRow.md)) |
package/rules/styling.md CHANGED
@@ -48,8 +48,9 @@ listed semantic roles and validated identity fields may change.
48
48
  - **Spacing**, only where the system's own spacing can't reach (a grid gap,
49
49
  inside a media query), and only on the scale.
50
50
  - **Motion.** Keyframes, transitions, animation, transform, translate, scale,
51
- rotate, opacity, timed by the spring tokens: never a duration or a curve of your
52
- own ([motion.md](motion.md)). A colour inside a keyframe is still a role.
51
+ rotate, opacity, timed by the tokens (a spring, a loop, or a sequence of them):
52
+ never a duration or a curve of your own ([motion.md](motion.md)). A colour
53
+ inside a keyframe is still a role.
53
54
  - **Drawing.** Fill, stroke and stop colour on SVG marks, from roles. A role at an
54
55
  alpha is allowed for an area or a band in a drawing, and for the `scrim` behind
55
56
  text on an image. **Nowhere else.**
package/stylelint.mjs CHANGED
@@ -54,10 +54,11 @@ const blendedColour =
54
54
  const literalLength = /(?<!--[\w-]*)(?<![\w.])\d*\.?\d+(?:px|r?em|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax|[sld]v[wh])\b/i
55
55
  const unknownSpace = new RegExp(`var\\(\\s*--space-(?!(?:${escaped(spaces.map((name) => name.slice('space-'.length)))})\\s*[,)])`)
56
56
  // A duration or a curve written out in a transition or an animation: 150ms, .2s,
57
- // -200ms, calc(…), cubic-bezier(…), steps(…), linear(…), linear, ease-out,
58
- // step-end. 0s is no motion, not a duration. A token's own name
59
- // (var(--spring-fast-effects-duration)) is neither.
60
- const literalDuration = /(?<![\w.-])-?(?!0*\.?0+m?s\b)(?:\d+\.?\d*|\.\d+)m?s\b|\bcalc\(/i
57
+ // -200ms, cubic-bezier(…), steps(…), linear(…), linear, ease-out, step-end, or a
58
+ // calc() that scales a token by a fraction. 0s is no motion, not a duration. A
59
+ // token's own name (var(--spring-fast-effects-duration)) is neither, and nor is a
60
+ // sequence: a calc() of tokens, whole numbers and a place (var(--i)).
61
+ const literalDuration = /(?<![\w.-])-?(?!0*\.?0+m?s\b)(?:\d+\.?\d*|\.\d+)m?s\b|\bcalc\((?:[^()]|\([^()]*\))*?(?<![\w.-])\d*\.\d/i
61
62
  const literalCurve = /\b(?:cubic-bezier|steps|linear)\(|(?<![\w-])(?:ease(?:-in|-out|-in-out)?|linear|step-start|step-end)(?![\w(-])/i
62
63
 
63
64
  // The parts, exported so an app can add to a rule, or keep one part of it for
@@ -86,7 +87,7 @@ export const refused = {
86
87
  // property of the site's that holds one (--fade-duration: 200ms) is the same.
87
88
  properties: '/^(?:(?:transition|animation)(?:-duration|-timing-function|-delay)?|--[\\w-]*(?:duration|delay|easing|timing))$/',
88
89
  values: [literalDuration, literalCurve],
89
- message: (property) => `Motion runs on the springs: write ${property} with var(--spring-fast-effects) and its kin, never a duration or a curve of your own (${guide}, rules/motion.md).`,
90
+ message: (property) => `Motion runs on the tokens: write ${property} with a spring (var(--spring-fast-effects) and its kin), a loop (var(--loop-pulse) and its kin) or a sequence of them (var(--stagger-step)), never a duration or a curve of your own (${guide}, rules/motion.md).`,
90
91
  },
91
92
  spacing: {
92
93
  properties: '/^(?:(?:margin|padding|scroll-margin|scroll-padding)(?:-|$)|(?:grid-)?(?:row-|column-)?gap$)/',
package/tokens.css CHANGED
@@ -164,18 +164,20 @@
164
164
  --elevation-1: 0 1px 2px 0 var(--shadow-key), 0 2px 6px 0 var(--shadow-ambient);
165
165
  --elevation-2: 0 1px 2px 0 var(--shadow-key), 0 4px 12px 0 var(--shadow-ambient);
166
166
  --elevation-3: 0 1px 3px 0 var(--shadow-key), 0 12px 32px -4px var(--shadow-ambient);
167
- --dur-spatial: 220ms;
168
- --dur-effects: 160ms;
169
167
  --dur-tint: 140ms;
170
168
  --dur-ui: 200ms;
171
169
  --dur-panel: 320ms;
172
170
  --dur-arrive: 650ms;
173
171
  --stagger: 120ms;
174
- --blink: 1.1s;
175
- --motion-spatial: cubic-bezier(0.2, 0.8, 0.2, 1.15);
176
- --motion-effects: cubic-bezier(0.2, 0, 0, 1);
172
+ --stagger-step: 40ms;
177
173
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
178
174
  --ease-arrive: cubic-bezier(0.22, 1, 0.36, 1);
175
+ --loop-spin: 0.8s linear infinite;
176
+ --loop-shimmer: 1.4s ease-in-out infinite;
177
+ --loop-dots: 1.2s ease-in-out infinite;
178
+ --loop-pulse: 1.6s ease-in-out infinite;
179
+ --loop-breathe: 3.2s ease-in-out infinite alternate;
180
+ --loop-blink: 1.1s steps(1) infinite;
179
181
  --state-hover: 0.04;
180
182
  --state-focus: 0.04;
181
183
  --state-pressed: 0.12;
@@ -349,4 +351,4 @@
349
351
 
350
352
  /* Rules on the tokens themselves, shipped in alisx.css and tokens.css alike. */
351
353
  @media (pointer: coarse) { :root { --touch-target: var(--touch-target-coarse); --control-height: var(--touch-target-coarse); } }
352
- @media (prefers-reduced-motion: reduce) { :root { --dur-spatial: 0ms; --dur-effects: 0ms; --dur-tint: 0ms; --dur-ui: 0ms; --dur-panel: 0ms; --dur-arrive: 0ms; --stagger: 0ms; } }
354
+ @media (prefers-reduced-motion: reduce) { :root { --dur-tint: 0ms; --dur-ui: 0ms; --dur-panel: 0ms; --dur-arrive: 0ms; --stagger: 0ms; } }
package/tokens.json CHANGED
@@ -1550,16 +1550,6 @@
1550
1550
  },
1551
1551
  "duration": {
1552
1552
  "tokens": [
1553
- {
1554
- "name": "dur-spatial",
1555
- "value": "220ms",
1556
- "usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-spatial."
1557
- },
1558
- {
1559
- "name": "dur-effects",
1560
- "value": "160ms",
1561
- "usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-effects."
1562
- },
1563
1553
  {
1564
1554
  "name": "dur-tint",
1565
1555
  "value": "140ms",
@@ -1586,24 +1576,14 @@
1586
1576
  "usage": "alisx.com: per-line delay in the terminal."
1587
1577
  },
1588
1578
  {
1589
- "name": "blink",
1590
- "value": "1.1s",
1591
- "usage": "The red cursor. The only loop."
1579
+ "name": "stagger-step",
1580
+ "value": "40ms",
1581
+ "usage": "Product: one step of a sequence, times an item's place in a set that arrives because something happened (rules/motion.md). Five steps at most."
1592
1582
  }
1593
1583
  ]
1594
1584
  },
1595
1585
  "easing": {
1596
1586
  "tokens": [
1597
- {
1598
- "name": "motion-spatial",
1599
- "value": "cubic-bezier(0.2, 0.8, 0.2, 1.15)",
1600
- "usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-spatial."
1601
- },
1602
- {
1603
- "name": "motion-effects",
1604
- "value": "cubic-bezier(0.2, 0, 0, 1)",
1605
- "usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-effects."
1606
- },
1607
1587
  {
1608
1588
  "name": "ease-standard",
1609
1589
  "value": "cubic-bezier(0.4, 0, 0.2, 1)",
@@ -1616,6 +1596,40 @@
1616
1596
  }
1617
1597
  ]
1618
1598
  },
1599
+ "loop": {
1600
+ "tokens": [
1601
+ {
1602
+ "name": "loop-spin",
1603
+ "value": "0.8s linear infinite",
1604
+ "usage": "A spinner."
1605
+ },
1606
+ {
1607
+ "name": "loop-shimmer",
1608
+ "value": "1.4s ease-in-out infinite",
1609
+ "usage": "A skeleton's shimmer."
1610
+ },
1611
+ {
1612
+ "name": "loop-dots",
1613
+ "value": "1.2s ease-in-out infinite",
1614
+ "usage": "The working dots, the Alis mark's loader and the recording dot."
1615
+ },
1616
+ {
1617
+ "name": "loop-pulse",
1618
+ "value": "1.6s ease-in-out infinite",
1619
+ "usage": "Something live or running: a live dot, a running state."
1620
+ },
1621
+ {
1622
+ "name": "loop-breathe",
1623
+ "value": "3.2s ease-in-out infinite alternate",
1624
+ "usage": "A large, calm glow: the composer's light, the voice orb."
1625
+ },
1626
+ {
1627
+ "name": "loop-blink",
1628
+ "value": "1.1s steps(1) infinite",
1629
+ "usage": "The red cursor."
1630
+ }
1631
+ ]
1632
+ },
1619
1633
  "spring": {
1620
1634
  "about": "Product motion (rules/motion.md). M3's motion physics: a spring is a stiffness and a damping ratio, never a duration. The generator writes each as --<name> (its duration and a linear() curve drawn from the spring, for a transition or an animation), --<name>-duration and --<name>-easing. Spatial springs move things (position, size, rotation, corners, a reveal); effects springs change colour and opacity and never overshoot. Fast and default spatial come from M3's Expressive scheme, slow spatial from its Standard scheme, so the whole screen never bounces. Under prefers-reduced-motion the spatial springs are 0s and the effects springs stay.",
1621
1635
  "tokens": [