@actioneer/ads 0.7.0 → 1.0.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 (57) hide show
  1. package/DESIGN.md +597 -0
  2. package/components/ai-elements/agent-trace.js +1 -1
  3. package/components/alert.js +3 -3
  4. package/components/answer.js +2 -2
  5. package/components/assistant-ui/action-bar.js +1 -1
  6. package/components/assistant-ui/attachment.js +12 -12
  7. package/components/assistant-ui/badge.js +18 -18
  8. package/components/assistant-ui/composer-harness.js +5 -4
  9. package/components/assistant-ui/composer-trigger-popover.js +9 -9
  10. package/components/assistant-ui/composer.js +32 -32
  11. package/components/assistant-ui/directive-text.js +5 -5
  12. package/components/assistant-ui/image.js +61 -61
  13. package/components/assistant-ui/markdown-text.js +7 -7
  14. package/components/assistant-ui/message-timing.js +1 -1
  15. package/components/assistant-ui/selection-toolbar.js +7 -7
  16. package/components/assistant-ui/sources.js +1 -1
  17. package/components/avatar.d.ts +1 -1
  18. package/components/avatar.js +35 -35
  19. package/components/body-page-header.d.ts +1 -1
  20. package/components/body-page-header.js +1 -1
  21. package/components/chart.js +1 -1
  22. package/components/chip.js +8 -8
  23. package/components/divider.js +25 -25
  24. package/components/drawer.d.ts +2 -14
  25. package/components/drawer.js +103 -109
  26. package/components/field.js +9 -9
  27. package/components/index.d.ts +1 -0
  28. package/components/index.js +466 -465
  29. package/components/infinite-canvas.js +1 -1
  30. package/components/input.js +21 -19
  31. package/components/modal.js +26 -26
  32. package/components/page-body.js +6 -6
  33. package/components/page-header.js +1 -1
  34. package/components/pagination.js +1 -1
  35. package/components/pixel-blast-svg.js +71 -73
  36. package/components/search-disclosure.d.ts +18 -0
  37. package/components/search-disclosure.js +106 -0
  38. package/components/sidebar.js +60 -53
  39. package/components/table.d.ts +1 -1
  40. package/components/table.js +73 -74
  41. package/components/tabs.js +68 -59
  42. package/components/tree.js +17 -17
  43. package/components/typography.d.ts +1 -1
  44. package/components/typography.js +1 -1
  45. package/components/ui/button.d.ts +1 -1
  46. package/components/ui/button.js +4 -4
  47. package/components/ui/dialog.js +23 -23
  48. package/components/viz-charts.js +36 -36
  49. package/demo/components/add-to-artifact.js +3 -2
  50. package/lib/cn.js +7 -7
  51. package/lib/icons.d.ts +4 -0
  52. package/lib/icons.js +105 -104
  53. package/llms.txt +52 -49
  54. package/manifest.json +258 -235
  55. package/package.json +2 -1
  56. package/styles.css +171 -153
  57. package/theme.css +162 -140
package/llms.txt CHANGED
@@ -16,8 +16,8 @@
16
16
  ## Tokens
17
17
 
18
18
  Reference semantic roles, never raw color/dimension literals (ads-lint rejects literals). Each role produces `bg-/text-/border-<role>` utilities:
19
- - `background`
20
- - `foreground`
19
+ - `background` — The shell canvas and its ink: the ground between top-level panels.
20
+ - `foreground` — The shell canvas and its ink: the ground between top-level panels.
21
21
  - `on-white-primary` — Contextual text hierarchies — three accessible levels per surface.
22
22
  - `on-white-secondary` — Contextual text hierarchies — three accessible levels per surface.
23
23
  - `on-white-tertiary` — Contextual text hierarchies — three accessible levels per surface.
@@ -27,14 +27,14 @@ Reference semantic roles, never raw color/dimension literals (ads-lint rejects l
27
27
  - `primary` — Context-free compatibility aliases remain conservative.
28
28
  - `secondary` — Context-free compatibility aliases remain conservative.
29
29
  - `tertiary` — Context-free compatibility aliases remain conservative.
30
- - `surface`
31
- - `surface-foreground`
32
- - `elevated`
33
- - `muted`
34
- - `muted-foreground`
35
- - `card`
36
- - `card-foreground`
37
- - `specimen-stroke`
30
+ - `surface` — One continuous recess inside a white surface, never a screen-level ground.
31
+ - `surface-foreground` — One continuous recess inside a white surface, never a screen-level ground.
32
+ - `elevated` — One continuous recess inside a white surface, never a screen-level ground.
33
+ - `muted` — The hover and row-state wash: interaction, not a default item background.
34
+ - `muted-foreground` — The hover and row-state wash: interaction, not a default item background.
35
+ - `card` — The white working plane that sits on the canvas, and the specimen hairline.
36
+ - `card-foreground` — The white working plane that sits on the canvas, and the specimen hairline.
37
+ - `specimen-stroke` — The white working plane that sits on the canvas, and the specimen hairline.
38
38
  - `action-primary` — Primary CTA role — restrained Studio green, used sparingly.
39
39
  - `action-primary-foreground` — Primary CTA role — restrained Studio green, used sparingly.
40
40
  - `action-primary-hover` — Primary CTA role — restrained Studio green, used sparingly.
@@ -47,31 +47,31 @@ Reference semantic roles, never raw color/dimension literals (ads-lint rejects l
47
47
  - `brand-text` — Compatibility action role — neutral ink, never a colored primary hue.
48
48
  - `fill` — Quiet fill — avatars, chips, and disabled controls
49
49
  - `fill-foreground` — Quiet fill — avatars, chips, and disabled controls
50
- - `table-shell` — Quiet fill — avatars, chips, and disabled controls
51
- - `table-stroke` — Quiet fill — avatars, chips, and disabled controls
52
- - `table-header-foreground` — Quiet fill — avatars, chips, and disabled controls
53
- - `artifact-canvas`
54
- - `accent`
55
- - `accent-foreground`
56
- - `success` — Lichen success-700 clears AA on White and both success soft fills;
57
- - `success-foreground` — Lichen success-700 clears AA on White and both success soft fills;
58
- - `warning` — Amber-500 fill kept (it IS the caution signal); dark ink foreground
59
- - `warning-foreground` — Amber-500 fill kept (it IS the caution signal); dark ink foreground
60
- - `danger` — Amber-500 fill kept (it IS the caution signal); dark ink foreground
61
- - `danger-foreground` — Amber-500 fill kept (it IS the caution signal); dark ink foreground
62
- - `info` — Amber-500 fill kept (it IS the caution signal); dark ink foreground
63
- - `info-foreground` — Amber-500 fill kept (it IS the caution signal); dark ink foreground
64
- - `border-primary`
65
- - `border-secondary`
66
- - `border-tertiary`
67
- - `border`
68
- - `border-strong`
69
- - `input`
70
- - `menu-stroke`
71
- - `toast-stroke`
72
- - `tree-stroke`
73
- - `ring`
74
- - `overlay`
50
+ - `table-shell` — Table surfaces: the white tray, its hairlines, and header ink.
51
+ - `table-stroke` — Table surfaces: the white tray, its hairlines, and header ink.
52
+ - `table-header-foreground` — Table surfaces: the white tray, its hairlines, and header ink.
53
+ - `artifact-canvas` — The artifact sheet: white warmed by a trace of the brand mark.
54
+ - `accent` — The active and selected wash, one step above hover.
55
+ - `accent-foreground` — The active and selected wash, one step above hover.
56
+ - `success` — Lichen success-700 clears AA on White and both success soft fills; success-600 is reserved for non-text marks because its 3.73:1 contrast on White does not clear body-text AA.
57
+ - `success-foreground` — Lichen success-700 clears AA on White and both success soft fills; success-600 is reserved for non-text marks because its 3.73:1 contrast on White does not clear body-text AA.
58
+ - `warning` — Amber-500 fill kept (it IS the caution signal); dark ink foreground instead of white = 6.94:1 (white on amber was 2.35:1, failed even 3:1).
59
+ - `warning-foreground` — Amber-500 fill kept (it IS the caution signal); dark ink foreground instead of white = 6.94:1 (white on amber was 2.35:1, failed even 3:1).
60
+ - `danger` — Danger and info: solid semantic fills carrying white foregrounds.
61
+ - `danger-foreground` — Danger and info: solid semantic fills carrying white foregrounds.
62
+ - `info` — Danger and info: solid semantic fills carrying white foregrounds.
63
+ - `info-foreground` — Danger and info: solid semantic fills carrying white foregrounds.
64
+ - `border-primary` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
65
+ - `border-secondary` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
66
+ - `border-tertiary` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
67
+ - `border` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
68
+ - `border-strong` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
69
+ - `input` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
70
+ - `menu-stroke` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
71
+ - `toast-stroke` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
72
+ - `tree-stroke` — The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.
73
+ - `ring` — Focus ring and scrim, both translucent warm ink.
74
+ - `overlay` — Focus ring and scrim, both translucent warm ink.
75
75
 
76
76
  ## Design principles
77
77
 
@@ -97,7 +97,7 @@ Every surface defaults to shadow-0. Use the numbered elevation ladder only when
97
97
  - Do: When requested, use shadow-100 for controls, shadow-200 for raised surfaces and pressable cards, shadow-300 for menus, popovers, listboxes, and toasts, and shadow-400 for dialogs and overlay drawers.
98
98
  - Do: Reserve shadow-500 and shadow-600 for rare higher stacked layers; the legacy shadow-elevation hook resolves to shadow-0.
99
99
  - Don't: Infer permission to use a shadow from actionability, floating placement, or component type.
100
- - Don't: Use raw shadow values or legacy shadow-sm/md/lg/xl utilities.
100
+ - Don't: Use raw shadow values or legacy named shadow utilities.
101
101
  - Don't: Put a shadow on a non-interactive surface for decoration.
102
102
  - Don't: Use shadow-500 or shadow-600 as a routine default.
103
103
 
@@ -115,15 +115,15 @@ Component motion follows the closest Animate UI interaction pattern, using role-
115
115
  - Don't: Animate keyboard-initiated or 100×/day actions (e.g. a command-palette toggle).
116
116
  - Don't: Add motion to a component only because it is visible; static structure and decorative chrome stay still.
117
117
 
118
- ### 4. Icons: Hugeicons, stroke only [lint: icon-package-import]
118
+ ### 4. Icons: Phosphor, regular weight (fill for active) [lint: icon-package-import]
119
119
 
120
- All icons come from Hugeicons in the Stroke Rounded style only. Components import named icons from the @/lib/icons registry — never from an icon package directly — so a free→Pro swap or a restyle touches one file.
120
+ All icons come from Phosphor Icons at the regular weight — the stroke-led icon language of ADS. Components import named icons from the @/lib/icons registry — never from an icon package directly — so swapping the underlying set touches one file.
121
121
 
122
- - Do: Import icons from the @/lib/icons registry; add a new one there (stroke variant) before using it.
122
+ - Do: Import icons from the @/lib/icons registry; wrap a new Phosphor component with createIcon there before using it.
123
123
  - Do: Let icons default to size='1em' so they scale with text; size with a size prop or size-* class.
124
- - Do: Keep stroke weight at the drawn 1.5; strokeWidth={2} is the one sanctioned emphasis step.
125
- - Don't: Import from an icon package directly, or use solid/duotone/twotone/fill variants.
126
- - Don't: Use a stroke weight thinner than 1.5.
124
+ - Do: Render weight='fill' for the active or selected state, and weight='bold' for the rare heavier stroke.
125
+ - Don't: Import from an icon package directly, or install a second icon set.
126
+ - Don't: Leave an active nav item's icon at the regular stroke weight.
127
127
 
128
128
  ### 5. Demo screens: the shell owns the frame [judgment]
129
129
 
@@ -142,13 +142,17 @@ Indicator/status dots (Badge & Chip dot variants, ConnectionStatus, chart legend
142
142
 
143
143
  ### 7. ADS-first UI: use the library; extend only when asked [lint: deep-import, barrel-aliased-import, barrel-default-import, barrel-namespace-import, external-ui-import]
144
144
 
145
- Every UI decision stays synchronized with ADS. Before making a new screen/control/pattern, check the ADS component suite first and use the exact exported name from the public barrel. Do not hand-roll, alias, deep-import, or import external UI libraries.
145
+ Every UI decision stays synchronized with ADS. Search the full catalog before deciding a component is missing, and use the exact exported name from the public barrel. When the barrel genuinely has no primitive, the sanctioned fallback is a shadcn/ui component vendored into src/components/ui through the repo's components.json recipe — never a hand-rolled control and never a UI library imported at a call site.
146
146
 
147
147
  - Do: Use an existing ADS component by its exact exported name from the package barrel; compose existing components for layout-only patterns.
148
- - Do: Ask the user before extending ADS; only an explicit request authorizes new library work.
148
+ - Do: Search the whole catalog before concluding a component is missing — the documented specimens are a sample, not the inventory.
149
+ - Do: Fall back to shadcn/ui when the barrel has no primitive: vendor it with npx shadcn add into src/components/ui, import cn from @/lib/utils, and swap its lucide icons for @/lib/icons.
150
+ - Do: Let a vendored shadcn component inherit the ADS palette through the shadcn-compat aliases in theme.css rather than restyling it by hand.
151
+ - Do: Ask the user before promoting a vendored component into the public barrel; only an explicit request authorizes new library work.
149
152
  - Do: When authorized, add the component to the right family, export its exact name through the barrel, and document it.
150
153
  - Don't: Deep-import, alias, default/namespace-import, or hand-roll a local copy of a component.
151
- - Don't: Import a visual component directly from the web or an npm UI library.
154
+ - Don't: Import a visual component directly from the web or an npm UI library at a call site.
155
+ - Don't: Reach for the shadcn fallback before searching the catalog, or install a second component library beside it.
152
156
 
153
157
  ### 8. Minimal information per screen [judgment]
154
158
 
@@ -307,6 +311,7 @@ Before using any component below, preserve its built-in motion and apply the mot
307
311
  - [NumberField] — Use for a bounded numeric quantity (e.g. seats, width, count) that benefits from stepper buttons and min/max clamping, not free-form numeric text entry. [docs](https://ads.actioneer.dev/#/number-field)
308
312
  - [Radio] — Use for choosing exactly one option from a small, fully visible set — wrap Radio options in a RadioGroup that owns the shared name and controlled value. [docs](https://ads.actioneer.dev/#/radio)
309
313
  - [RadioGroup] — component [docs](https://ads.actioneer.dev/#/radio)
314
+ - [SearchDisclosure] — component [docs](https://ads.actioneer.dev/#/search-disclosure)
310
315
  - [SegmentedControl] — Use for a small set (2-4) of mutually exclusive, always-visible options — like a range or view-mode switcher — not for navigation or long lists. Radius follows control size: 4px at sm and 6px at md/lg; tracks and options are never fully rounded. (variants: size: sm|md|lg; selected: true|false) [docs](https://ads.actioneer.dev/#/segmented)
311
316
  - [Select] — Use for a single choice from a closed list of options in a form, especially when pairing with Field for a labeled control. (variants: size: sm|md|lg) [docs](https://ads.actioneer.dev/#/select)
312
317
  - [Slider] — Use for a single controlled numeric value picked from a bounded range (volume, brightness, threshold) — pair with Field or Label/Text for an accessible, labeled control. [docs](https://ads.actioneer.dev/#/slider)
@@ -324,6 +329,7 @@ Before using any component below, preserve its built-in motion and apply the mot
324
329
  - [NumberFieldProps] — TypeScript type
325
330
  - [RadioGroupProps] — TypeScript type
326
331
  - [RadioProps] — TypeScript type
332
+ - [SearchDisclosureProps] — TypeScript type
327
333
  - [SegmentedControlProps] — TypeScript type
328
334
  - [SegmentedOption] — TypeScript type
329
335
  - [SelectItem] — TypeScript type
@@ -347,7 +353,6 @@ Before using any component below, preserve its built-in motion and apply the mot
347
353
  - [DropdownLabel] — component [docs](https://ads.actioneer.dev/#/dropdown)
348
354
  - [DropdownSeparator] — component [docs](https://ads.actioneer.dev/#/dropdown)
349
355
  - [DropdownTrigger] — component [docs](https://ads.actioneer.dev/#/dropdown)
350
- - [FloatingDrawer] — component (variants: side: right|left|bottom; size: sm|md|lg|xl) [docs](https://ads.actioneer.dev/#/drawer)
351
356
  - [InlineDrawer] — component (variants: side: right|left|bottom; size: sm|md|lg|xl) [docs](https://ads.actioneer.dev/#/drawer)
352
357
  - [Modal] — Use for a blocking, focused task or confirmation that must interrupt the page until resolved (portaled, focus-trapped, Escape/backdrop dismissible). (variants: size: sm|md|lg|xl|full; position: center|top) [docs](https://ads.actioneer.dev/#/modal)
353
358
  - [ModalBody] — component (variants: size: sm|md|lg|xl|full; position: center|top) [docs](https://ads.actioneer.dev/#/modal)
@@ -364,13 +369,11 @@ Before using any component below, preserve its built-in motion and apply the mot
364
369
  - [ToastProvider] — component [docs](https://ads.actioneer.dev/#/toast)
365
370
  - [CommandPaletteItem] — TypeScript type
366
371
  - [CommandPaletteProps] — TypeScript type
367
- - [DrawerAppearance] — TypeScript type
368
372
  - [DrawerProps] — TypeScript type
369
373
  - [DropdownContentProps] — TypeScript type
370
374
  - [DropdownItemProps] — TypeScript type
371
375
  - [DropdownProps] — TypeScript type
372
376
  - [DropdownTriggerProps] — TypeScript type
373
- - [FloatingDrawerProps] — TypeScript type
374
377
  - [InlineDrawerProps] — TypeScript type
375
378
  - [ModalBodyProps] — TypeScript type
376
379
  - [ModalDrawerProps] — TypeScript type
@@ -453,7 +456,7 @@ Before using any component below, preserve its built-in motion and apply the mot
453
456
  - [SeriesChart] — component [docs](https://ads.actioneer.dev/#/viz-charts)
454
457
  - [StatusAnswer] — component (variants: tone: default|primary|success|warning|danger|info) [docs](https://ads.actioneer.dev/#/ai/answer)
455
458
  - [Tab] — component (variants: orientation: horizontal|vertical; selected: true|false) [docs](https://ads.actioneer.dev/#/tabs)
456
- - [Table] — Use Table for structured tabular data that may need row selection, column sorting, sticky columns, or a paginated footer — not for simple key-value lists. Interactive rows inherit the shared soft neutral hover/focus sink and keep their normal table geometry; do not add a brand tint or hover-only corner rounding. Primary record links stay text-only in every state: never reveal an arrow, chevron, or other directional icon only on hover. Persistent row actions use a final sticky-right column plus elevatedActionColumn so one body-column shadow lifts the action surface instead of repeating on individual cells. The empty matching header cell remains transparent and non-sticky. [docs](https://ads.actioneer.dev/#/table)
459
+ - [Table] — Use Table for structured tabular data that may need row selection, column sorting, sticky columns, or a paginated footer — not for simple key-value lists. Every primary body-cell value defaults to text-m (14px / 20px); only clearly secondary metadata inside a cell may opt down to text-s. Interactive rows inherit the shared soft neutral hover/focus sink and keep their normal table geometry; do not add a brand tint or hover-only corner rounding. Primary record links stay text-only in every state: never reveal an arrow, chevron, or other directional icon only on hover. Persistent row actions use a final sticky-right column plus elevatedActionColumn so one body-column shadow lifts the action surface instead of repeating on individual cells. The empty matching header cell remains transparent and non-sticky. [docs](https://ads.actioneer.dev/#/table)
457
460
  - [TableAnswer] — component (variants: tone: default|primary|success|warning|danger|info) [docs](https://ads.actioneer.dev/#/ai/answer)
458
461
  - [TableBody] — component [docs](https://ads.actioneer.dev/#/table)
459
462
  - [TableCell] — component [docs](https://ads.actioneer.dev/#/table)