actual-css 0.17.1 → 0.19.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +10 -6
  3. package/components.json +26 -6
  4. package/dist/actual.full.css +484 -76
  5. package/dist/actual.full.js +2 -2
  6. package/dist/actual.full.min.css +1 -1
  7. package/docs/design-notes/enhancement-contract.md +20 -11
  8. package/docs/design-notes/motion-cost.md +62 -0
  9. package/docs/design-notes/tokens.md +6 -1
  10. package/docs/navigation.json +4 -0
  11. package/docs/pages/components/alert.md +8 -6
  12. package/docs/pages/components/aura.md +3 -0
  13. package/docs/pages/components/button.md +26 -24
  14. package/docs/pages/components/list.md +117 -29
  15. package/docs/pages/components/mark-sweep.md +42 -0
  16. package/docs/pages/components/rating.md +53 -22
  17. package/docs/pages/components/reveal.md +54 -0
  18. package/docs/pages/components/shimmer.md +3 -2
  19. package/docs/pages/components/timeline.md +130 -2
  20. package/docs/pages/enhancements/in-view.md +109 -0
  21. package/docs/pages/enhancements/overview.md +3 -2
  22. package/docs/pages/enhancements/scrollspy.md +5 -5
  23. package/docs/pages/examples/overview.md +7 -2
  24. package/docs/pages/forms/date-picker.md +3 -2
  25. package/docs/pages/forms/switch.md +25 -16
  26. package/docs/pages/foundations/theming.md +6 -4
  27. package/docs/pages/foundations/tokens.md +39 -16
  28. package/docs/pages/foundations/typography.md +13 -2
  29. package/docs/pages/guides/coding-agents.md +163 -0
  30. package/docs/pages/guides/introduction.md +1 -1
  31. package/docs/pages/guides/modular-import.md +1 -1
  32. package/docs/pages/guides/progressive-enhancement.md +2 -1
  33. package/docs/pages/guides/upgrading.md +2 -2
  34. package/docs/pages/layout/scroll-snap.md +26 -1
  35. package/docs/pages/patterns/code-block.md +1 -1
  36. package/docs/pages/patterns/empty-state.md +3 -3
  37. package/docs/pages/patterns/exclusive-accordion.md +3 -2
  38. package/docs/pages/patterns/hierarchical-nav.md +5 -4
  39. package/docs/pages/patterns/icon-input.md +1 -1
  40. package/docs/pages/patterns/icon-slot.md +4 -4
  41. package/docs/pages/patterns/intent-nesting.md +2 -3
  42. package/docs/pages/patterns/navigation-list.md +7 -4
  43. package/docs/pages/patterns/stat.md +3 -3
  44. package/docs/pages/patterns/structured-lists.md +1 -2
  45. package/llms.txt +3 -2
  46. package/package.json +3 -1
  47. package/reserved-classes.json +6 -0
  48. package/skills/actual-css/PROJECT.md.example +13 -2
  49. package/skills/actual-css/README.md +5 -0
  50. package/skills/actual-css/SKILL.md +13 -2
  51. package/src/css/components/alert.css +40 -3
  52. package/src/css/components/button.css +20 -2
  53. package/src/css/components/join.css +3 -10
  54. package/src/css/components/list.css +32 -0
  55. package/src/css/components/navbar.css +13 -5
  56. package/src/css/components/rating.css +23 -2
  57. package/src/css/components/scrollspy.css +4 -2
  58. package/src/css/components/timeline.css +113 -10
  59. package/src/css/core/base.css +16 -0
  60. package/src/css/core/focus.css +13 -12
  61. package/src/css/core/reset.css +10 -0
  62. package/src/css/core/theme.css +15 -0
  63. package/src/css/core/tokens.css +8 -11
  64. package/src/css/effects/aura.css +5 -0
  65. package/src/css/effects/index.css +2 -0
  66. package/src/css/effects/mark-sweep.css +64 -0
  67. package/src/css/effects/reveal.css +66 -0
  68. package/src/css/effects/shimmer.css +28 -10
  69. package/src/css/forms/switch.css +9 -9
  70. package/src/js/full.js +1 -0
  71. package/src/js/in-view.js +152 -0
  72. package/src/js/scrollspy.js +81 -2
  73. package/src/js/selectors.js +3 -0
  74. package/src/tooling/design-components.js +2 -2
  75. package/src/tooling/design-tokens.js +2 -0
  76. package/tokens.json +2 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,93 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.19.0] - 2026-11-13
6
+ ### Added
7
+ - `.reveal` and `.reveal-group`: one-shot entrance animations that play on first render, with `--reveal-duration`, `--reveal-distance`, and `--reveal-stagger`.
8
+ - `data-enhance="in-view"`: defers an off-screen effect to its first appearance, with `data-in-view-margin`.
9
+ - `.mark-sweep`: a highlight that sweeps in behind a phrase, reusing the new `--mark-bg` / `--mark-fg` theme pair.
10
+ - `mark`: a theme-tuned highlight pair in both schemes, with `Mark` / `MarkText` in forced colors.
11
+ - Docs: an In view enhancement page, and a Replay button on every example that holds `.reveal`, `.reveal-group` or `.mark-sweep`.
12
+ - `demo/templates/appearance.html`: scroll reveals, staggered groups, highlight sweeps and site-defined effects, with replay controls.
13
+ - `bun run report:paint`: renderer CPU, main-thread time and frame pacing per page, to compare animation variants.
14
+ - `docs/design-notes/motion-cost.md`: what an animation costs per frame, with the Aura measurements and `scripts/fixtures/aura-paint.html`.
15
+ - `demo/templates/blocks.html`: notification preferences composition with Email and Push switch columns.
16
+ - `demo/templates/focus-bench.html`: component focus samples, validation alternatives, surface and theme islands, and computed-style inspection of a live data grid.
17
+ - `demo/templates/border-contrast.html`: `--border-control` at 25, 35 and 45 % of ink in both schemes and on two surfaces, with the edge measured live against the control fill and the panel, and the mix that silently does nothing on a plain container.
18
+ - `--rating-star-outline`: the default star as an outline, for `--rating-star-empty`.
19
+ - `cyberpunk` theme: ink rating stars with outlined empty stars.
20
+ - `neon` theme: rating stars as lit and unlit primary tubes.
21
+ - `material` theme: Google Yellow rating stars over `--border`.
22
+ - `neo-brutalist` theme: a framed square `.status-bar` instead of the core pill.
23
+ - `demo/templates/neo-brutalist.html`: the cookie notice enters with `.reveal` and confirms the choice in the status bar.
24
+ - `demo/sites/neon-ramen`: read-only ratings on the home stats and the Spicy miso page, a "Rate your last bowl" input on the order page, and neon-tube stars in `neon-site.css`.
25
+
26
+ ### Changed
27
+ - `.rating`: stars are gold by default instead of `--warning`; set `--rating-color` on `.rating` to restore it.
28
+ - `.rating`: empty stars tint `--text` into `--surface` instead of using `--border`, so ink-bordered themes no longer draw them black.
29
+ - Docs: the Rating page shows neutral, outlined and custom-symbol stars, and the theme rule that sets them.
30
+ - Docs: Rating form examples use `.field-group.flush`, adding `.field` only with help or error text.
31
+ - Docs: `--border-control` states the `--surface-subtle` ratio, why `--border-control-mix` needs a theme boundary, and the two ways to soften controls — the theme mix or `--control-border` on the fields.
32
+ - Switch docs and demo templates use native checkbox state without redundant `aria-checked` synchronization.
33
+ - `.switch`: the border follows the track fill, including checked and disabled states, and unchecked hover uses a subtle neutral fill.
34
+ - `:focus` uses local `--focus` for generic outlines; `--focus-outline-color` remains an inherited override, and invalid fields keep their validation color.
35
+ - `.nav-list`: a nested `.nav-list` hangs from a rail under the parent's icon, its labels still aligned with the parent label.
36
+ - `.nav-list`: `--nav-list-icon-size` (the leading icon width) replaces `--nav-list-indent`.
37
+ - `.nav-list`: `--nav-list-rail-color` sets the nested rail; `transparent` hides it and keeps the alignment.
38
+ - `.shimmer`: the band has a fixed width, crosses the whole label, then rests before the next pass.
39
+ - Docs home: the hero title enters with `.reveal` on first render.
40
+ - Docs: Aura repaints every frame; reserve it for one or two objects per view.
41
+ - `--duration-shimmer` slows from 1.2s to 2s, pacing `.shimmer`, `.skeleton` and indeterminate `.progress`.
42
+ - `.switch`: `--switch-knob-margin` increases from 8% to 10% of the track height, giving the knob more breathing room.
43
+
44
+ ### Fixed
45
+ - `.scrollspy`: native selection yields to `aria-current`, and the activation line advances near the scroll end so trailing sections activate in order.
46
+ - `.scrollspy`: a followed link stays current even when the page cannot scroll its heading to the activation line, and scrolling on walks its neighbours in order.
47
+ - A closed `<dialog>` stays hidden when an author class sets `display`, such as `<dialog class="card">`.
48
+ - Docs home test: the menu-to-dialog focus check waits for the close event instead of reading focus before it runs.
49
+ - `fixtureUrl()` keeps a page's query string and hash instead of escaping them into the file name.
50
+ - `.shimmer`: the sweep runs right to left in right-to-left text.
51
+ - `demo/templates/blocks.html`: table filters share one wrapping cluster so the status and owner selects sit side by side when space permits.
52
+
53
+ ## [0.18.0] - 2026-11-11
54
+ ### Added
55
+ - Docs: "Coding agents and DESIGN.md" guide — the skill, `PRODUCT.md`/`DESIGN.md`/`PROJECT.md` ownership, and working with a design skill such as Impeccable.
56
+ - Starter skill: reads the project's `DESIGN.md` after `PROJECT.md`.
57
+ - Starter skill: `PROJECT.md.example` gains a "Design mapping" section from `DESIGN.md` roles to Actual classes.
58
+ - `demo/templates/alerts.html`: alert icon alignment bench — icon sources, icon sets, text fonts, text sizes, line heights, icon sizes, message shapes, actions and lists, variants, mixed timeline markers and the neo-brutalist tile, with optional box guides.
59
+ - `demo/templates/carousel.html`: a hero carousel from one scroll-snap list, with full-width slides, native scroll buttons for previous/next and scroll markers as dots.
60
+ - `.list.grouped`: opt-in raised surface, border, rounded shell and inline gutter for standalone lists; `--list-radius` is the new hook.
61
+ - `neo-brutalist` and `glass` themes: `.list.grouped` joins the framed-surface and frosted-panel treatments.
62
+ - Docs: the List page composes grouped active-sessions and member rows, including a `surface sm` pill action, a badge and a row flyout.
63
+ - `.timeline-dates-end`: each event's `<time>` sits at the end of its first line instead of above it.
64
+ - `.timeline`: an icon slot with an intent gets a soft tinted disc, rim and ink, following `--soft-bg-mix` and `--soft-border-mix`.
65
+ - `--timeline-glyph-size`: icon and spinner size in a timeline slot, half the slot by default.
66
+ - `--timeline-marker-nudge`: moves the whole timeline marker off the first line box's centre, like `--alert-icon-nudge`.
67
+ - Docs: the Timeline page shows an in-progress event with a `.spinner` inside the icon slot.
68
+ - Docs: the Timeline page composes an activity feed with avatars, a `.chat-bubble` comment, a `.badge` status and a file `.btn`.
69
+
70
+ ### Changed
71
+ - Docs: the site loads Inter for its own pages; the framework keeps the platform faces, so a consumer's page depends on no locally installed family.
72
+ - `.btn.surface`: hover paints an opaque ink mix, so a surface button still shows feedback on a dark theme.
73
+ - `demo/templates/data-grid.html`: `data-grid-component` 3.10.0, with the grouped page-size footer, the floating bulk bar and one quiet control edge.
74
+ - `.btn.outline`: a neutral outline takes `--border-control`; an explicit intent keeps its color.
75
+ - Docs: the search panel opens on its destination quick links, keeps the close in the header row, and pins a keyboard footer below a scrolling result list.
76
+ - Docs: the header search opener is a quiet surface button on the control edge that shows `⌘ K` on macOS and `Ctrl K` elsewhere.
77
+ - Docs: the sidebar lists one destination's pages as static group sections instead of collapsible, indented rows.
78
+ - Docs: page-end navigation is two cards (Previous / Next); the source links are quiet text links.
79
+ - Docs: the header marks the active section by ink alone, so only the sidebar row is filled.
80
+ - `.timeline`: `--timeline-slot-size` defaults to `2rem`, and the dateline uses tabular numerals.
81
+
82
+ ### Fixed
83
+ - A bare checkbox or radio focuses in `--focus`; the core currentColor fallback painted the ring in the text ink, so it read as untinted on a dark surface.
84
+ - Docs: card hover lifts to `--border-control`; the former `--border-strong` was never a token, so `border-color` fell back to `currentColor` and drew a full-contrast ring.
85
+ - `check:docs` rejects a `var()` in the site chrome whose token no stylesheet declares.
86
+ - `.timeline`: an avatar or icon slot taller than the line box stays inside its event instead of overflowing the list and eating into `--timeline-gap`.
87
+ - `.alert-icon`: centred on the first line box from `--alert-line-height`, `--alert-font-size` and `--alert-icon-size` instead of a fixed `0.125em`; `--alert-line-height` and `--alert-icon-nudge` are the new hooks.
88
+ - `.alert.admonition > .alert-title > .alert-icon`: an icon in the admonition title bar takes `.alert-icon` and follows `--alert-icon-nudge`.
89
+ - `.alert > .close`: centred on the first line box and no longer grows the title row, which pushed the body down.
90
+ - `.alert > ul`, `.alert > ol`: bullets start on the text column's edge instead of the 40px UA indent.
91
+
5
92
  ## [0.17.1] - 2026-11-08
6
93
  ### Added
7
94
  - Docs: a "Skip to content" link is the first tab stop on every page.
package/README.md CHANGED
@@ -67,7 +67,7 @@ size is not worth optimizing:
67
67
  ```
68
68
 
69
69
  ```html
70
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.17/dist/actual.full.min.css">
70
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.19/dist/actual.full.min.css">
71
71
  ```
72
72
 
73
73
  ## Usage
@@ -107,6 +107,8 @@ Undocumented `is-*` classes are runtime internals.
107
107
 
108
108
  **UI components** — dialog, drawer, flyout, tooltip, tabs, scrollspy, context menus, and other components that rely on JavaScript or modern platform behavior.
109
109
 
110
+ **Effects** — aura, shimmer, mark sweep, and reveal: purely visual enrichment, with motion that respects reduced-motion.
111
+
110
112
  **Patterns** — navbar and overline. These are regular source files and can be imported only when needed.
111
113
 
112
114
  **Layout primitives** — `.stack`, `.cluster`, `.grid`, `.switcher`, `.center`, `.media`, `.frame`, `.app-shell`, `.sidebar-layout`, and `.container-query`.
@@ -134,7 +136,7 @@ for the full map of module names to import paths.
134
136
 
135
137
  ## JavaScript enhancers
136
138
 
137
- Some components can be enhanced with JavaScript: dialog/drawer, flyout, tooltip, tabs, scrollspy, context menu, floating UI, opt-in `data-filter` input filtering, and input masks.
139
+ Some components can be enhanced with JavaScript: dialog/drawer, flyout, tooltip, tabs, scrollspy, context menu, floating UI, opt-in `data-filter` input filtering, input masks, and the one-shot `in-view` trigger behind `.reveal` and `.mark-sweep`.
138
140
 
139
141
  Presentation (`class`) and behaviour (`data-enhance`) are separate layers — import any primitive independently to build custom widgets. See [enhancement contract](docs/design-notes/enhancement-contract.md) and [widget primitives](docs/design-notes/widget-primitives.md).
140
142
 
@@ -144,7 +146,7 @@ registries:
144
146
  * **Full runtime, zero-config** — every built-in enhancer, compiled:
145
147
 
146
148
  ```html
147
- <script src="https://cdn.jsdelivr.net/npm/actual-css@0.17/dist/actual.full.js" type="module"></script>
149
+ <script src="https://cdn.jsdelivr.net/npm/actual-css@0.19/dist/actual.full.js" type="module"></script>
148
150
  ```
149
151
 
150
152
  * **Your own build** — copy the package's `src/js/full.js` as your entry,
@@ -186,8 +188,8 @@ Actual CSS is before 1.0:
186
188
  * A patch release (`0.12.0` → `0.12.1`) keeps every class and hook. It fixes
187
189
  bugs and may add hooks, so a fix can still move a rendering by a few pixels.
188
190
 
189
- The floating `actual-css@0.17` CDN path takes patches automatically. Pin the exact
190
- version (`actual-css@0.17.0`) when the rendering must not change without a
191
+ The floating `actual-css@0.19` CDN path takes patches automatically. Pin the exact
192
+ version (`actual-css@0.19.0`) when the rendering must not change without a
191
193
  review.
192
194
 
193
195
  ## Browser support
@@ -228,7 +230,9 @@ layout primitives and progressive enhancements without recreating framework
228
230
  behavior in application CSS.
229
231
 
230
232
  Copy it into your project's agent skills and extend it with your application's
231
- theme, loaded modules and local conventions.
233
+ theme, loaded modules and local conventions. Visual direction belongs in your
234
+ own `DESIGN.md`; see
235
+ [Coding agents and DESIGN.md](https://lekoala.github.io/actual-css/site/guides/coding-agents.html).
232
236
 
233
237
  ## License
234
238
 
package/components.json CHANGED
@@ -40,8 +40,10 @@
40
40
  "--alert-pad-block",
41
41
  "--alert-pad-inline",
42
42
  "--alert-font-size",
43
+ "--alert-line-height",
43
44
  "--alert-radius",
44
45
  "--alert-icon-size",
46
+ "--alert-icon-nudge",
45
47
  "--alert-border-inline-start-color",
46
48
  "--alert-border-inline-start-width"
47
49
  ],
@@ -462,6 +464,7 @@
462
464
  "cssImport": "actual-css/css/components/list",
463
465
  "docs": "https://lekoala.github.io/actual-css/site/components/list.html",
464
466
  "classes": [
467
+ "grouped",
465
468
  "list",
466
469
  "list-item",
467
470
  "list-item-content",
@@ -474,7 +477,8 @@
474
477
  "--list-item-pad-block",
475
478
  "--list-item-pad-inline",
476
479
  "--list-item-gap",
477
- "--list-divider"
480
+ "--list-divider",
481
+ "--list-radius"
478
482
  ],
479
483
  "states": [
480
484
  "aria-current"
@@ -576,10 +580,12 @@
576
580
  "publicHooks": [
577
581
  "--nav-current-bg",
578
582
  "--nav-current-fg",
579
- "--nav-list-indent"
583
+ "--nav-list-icon-size",
584
+ "--nav-list-rail-color"
580
585
  ],
581
586
  "internalHooks": [
582
- "--gap"
587
+ "--gap",
588
+ "--nav-list-rail-inset"
583
589
  ],
584
590
  "states": [
585
591
  "aria-current",
@@ -636,6 +642,7 @@
636
642
  "--rating-empty",
637
643
  "--rating-star",
638
644
  "--rating-star-empty",
645
+ "--rating-star-outline",
639
646
  "--rating-value",
640
647
  "--rating-max"
641
648
  ],
@@ -658,6 +665,7 @@
658
665
  "scrollspy"
659
666
  ],
660
667
  "states": [
668
+ "aria-current",
661
669
  "target"
662
670
  ],
663
671
  "jsImport": "actual-css/js/scrollspy",
@@ -851,18 +859,27 @@
851
859
  "cssImport": "actual-css/css/components/timeline",
852
860
  "docs": "https://lekoala.github.io/actual-css/site/components/timeline.html",
853
861
  "classes": [
854
- "timeline"
862
+ "timeline",
863
+ "timeline-dates-end"
855
864
  ],
856
865
  "publicHooks": [
857
866
  "--timeline-dot-size",
858
867
  "--timeline-slot-size",
868
+ "--timeline-glyph-size",
859
869
  "--timeline-gap",
860
870
  "--timeline-inline-gap",
861
- "--timeline-line-size"
871
+ "--timeline-line-size",
872
+ "--timeline-marker-nudge"
862
873
  ],
863
874
  "internalHooks": [
864
875
  "--timeline-rail-size",
865
- "--timeline-line-box"
876
+ "--timeline-line-box",
877
+ "--timeline-marker-shift",
878
+ "--timeline-marker-inset",
879
+ "--timeline-marker-center",
880
+ "--timeline-slot-bg",
881
+ "--timeline-slot-border",
882
+ "--timeline-slot-fg"
866
883
  ],
867
884
  "states": [
868
885
  "aria-hidden"
@@ -871,6 +888,9 @@
871
888
  ".timeline li": [
872
889
  "::after",
873
890
  "::before"
891
+ ],
892
+ ".timeline-dates-end time": [
893
+ "::before"
874
894
  ]
875
895
  }
876
896
  },