@imfusion/web-ui 0.6.1-dev.9.g317bd6f2 → 0.6.2-dev.1.gf73fc5d3

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 (63) hide show
  1. package/LICENSE.txt +30 -0
  2. package/README.md +99 -173
  3. package/THIRD_PARTY_NOTICES.md +34 -0
  4. package/bin/install.js +28 -10
  5. package/dist/code-BFMQnmu9.js +147 -0
  6. package/dist/codegen/gen-code-highlight-theme.d.ts +1 -0
  7. package/dist/components/code/code.d.ts +5 -4
  8. package/dist/components/stack/stack.d.ts +1 -1
  9. package/dist/components/toast/index.d.ts +2 -0
  10. package/dist/components/toast/toast.d.ts +200 -0
  11. package/dist/components/toast/toast.meta.d.ts +2 -0
  12. package/dist/components/typo/typo.d.ts +23 -22
  13. package/dist/icons/icon-config.d.ts +12 -0
  14. package/dist/{icons-wBmF0U2x.js → icons-Cy1HAosO.js} +1 -1
  15. package/dist/icons.js +1 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +1278 -1069
  18. package/dist/integrations/code-highlight/highlighter.d.ts +24 -0
  19. package/dist/integrations/code-highlight.js +80 -47
  20. package/dist/integrations/image-display-options.js +2 -2
  21. package/dist/provider/web-ui-provider.d.ts +3 -3
  22. package/dist/style.css +1 -1
  23. package/dist/{tabs-CMKvMF4E.js → tabs-DIe1Utiy.js} +2 -0
  24. package/docs/assets/imfusion-banner.svg +16 -0
  25. package/package.json +10 -8
  26. package/src/docgen/doc.gen.json +515 -1
  27. package/src/llms/install-templates/AGENTS.md +15 -18
  28. package/src/llms/llms.gen.txt +39 -33
  29. package/src/llms/skills/imf-web-ui/SKILL.md +30 -39
  30. package/src/llms/skills/imf-web-ui-audit/SKILL.md +50 -102
  31. package/src/llms/skills/imf-web-ui-components/SKILL.md +47 -104
  32. package/src/llms/skills/imf-web-ui-conventions/SKILL.md +44 -52
  33. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +1 -0
  34. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +40 -62
  35. package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +11 -12
  36. package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +31 -46
  37. package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +18 -23
  38. package/src/llms/skills/imf-web-ui-conventions/topics/components.md +20 -69
  39. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +50 -146
  40. package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +17 -23
  41. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +15 -20
  42. package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +28 -19
  43. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +20 -16
  44. package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +28 -42
  45. package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +28 -30
  46. package/src/llms/skills/imf-web-ui-conventions/topics/react.md +28 -74
  47. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +65 -62
  48. package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +12 -14
  49. package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +9 -4
  50. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +40 -68
  51. package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +26 -50
  52. package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +19 -25
  53. package/src/llms/skills/imf-web-ui-setup/SKILL.md +45 -64
  54. package/src/llms/skills/imf-web-ui-update/SKILL.md +48 -114
  55. package/src/llms/skills/imf-web-ui-ux/SKILL.md +64 -92
  56. package/src/llms/skills/imf-web-ui-ux/references/forms.md +16 -36
  57. package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +14 -27
  58. package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +22 -38
  59. package/src/llms/tokens.gen.json +5 -5
  60. package/bin/install.test.ts +0 -329
  61. package/dist/code-Blo48PGr.js +0 -136
  62. package/dist/icons/icon-config-provider.d.ts +0 -8
  63. package/dist/icons/icon-context.d.ts +0 -4
@@ -1,34 +1,31 @@
1
- # AGENTS.md
1
+ # Agent instructions
2
2
 
3
- <Keep this file lean — target ~50 lines. Decision test for every line: would the agent make a costly mistake without it? If
4
- it would just need to read a file first, cut it. Dev commands, path aliases, and tool config are discoverable from the files
5
- themselves.>
3
+ <Keep this file short. Include only rules that prevent a costly mistake. Point to the repository's own docs for everything
4
+ else.>
6
5
 
7
- <One paragraph: what the app is and the stack in one line.>
6
+ <One paragraph describing the app, its package, and its stack.>
8
7
 
9
- Scripts, deps, and setup: [`README.md`](./README.md) and [`package.json`](./package.json) are the source of truth. Check the
10
- `package.json` scripts before running or suggesting a command — don't infer one exists by pattern-matching a sibling.
8
+ Setup and commands: [`README.md`](./README.md) and [`package.json`](./package.json). Read the package scripts before running
9
+ or suggesting a command.
11
10
 
12
- ## Read before you write
11
+ ## Read before writing
13
12
 
14
- <One bullet per doc in docs/, each with when to read it, e.g.:>
13
+ <Add one pointer for each repository-specific document.>
15
14
 
16
- - [`docs/<topic>.md`](./docs/<topic>.md) — <what it covers>. Read before <the change it governs>.
15
+ - [`docs/<topic>.md`](./docs/<topic>.md) — <what it covers and when to read it>.
17
16
 
18
- [`docs/index.md`](./docs/index.md) registers all of them.
17
+ [`docs/index.md`](./docs/index.md) lists the documents.
19
18
 
20
19
  ## Working here
21
20
 
22
- <The fenced block below is the only part of this file `npx web-ui-install` touches: its content comes from this template and
23
- is refreshed on every skills install. Everything else in the file is scaffolded once by the setup skill and then owned by the
24
- repo.>
21
+ <The installer owns only the fenced block below. It refreshes that block on every install; the rest belongs to the project.>
25
22
 
26
23
  <!-- imf-web-ui:begin — managed by `npx web-ui-install`; edits inside the fence are overwritten -->
27
24
 
28
- `.agents/skills/imf-web-ui-*` is vendored from `@imfusion/web-ui` and resynced with `npx web-ui-install`. Don't edit it and
29
- don't put repo conventions there. Load the matching `imf-web-ui-*` skill before writing code, styles, data fetching, or docs;
30
- repo docs hold only what is unique to this repo.
25
+ `.agents/skills/imf-web-ui-*` is vendored from `@imfusion/web-ui` and resynced with `npx web-ui-install`. Do not edit the
26
+ vendored copy or put project-specific conventions there. Load the matching skill before changing UI, styles, data, tests, or
27
+ docs.
31
28
 
32
29
  <!-- imf-web-ui:end -->
33
30
 
34
- <Repo-specific agent guidance: generated files that are committed, tools to verify APIs against, things never to touch.>
31
+ <Add project-specific rules here: generated files, API lookup tools, and paths the agent must not touch.>
@@ -11,183 +11,189 @@ props, which always live in the docgen file above.
11
11
 
12
12
  ## AppShell
13
13
  - category: Layout, status: stable
14
- Application layout shell — a fixed header, collapsible navbar/aside sidebars, an optional footer, and a scrolling main area. The classic dashboard frame; also called an app layout, application frame, dashboard shell, or sidebar layout. Sizing is CSS-driven and sidebars collapse to sliding overlays on small screens.
14
+ Application layout shell for a header, sidebars, footer, and scrolling main area. Also called an app layout or dashboard shell; sizing is CSS-driven and sidebars can become sliding panels on small screens.
15
15
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .app-shell (jq: jq '.app-shell' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
16
16
 
17
17
  ## Button
18
18
  - category: Buttons, status: stable
19
- Triggers an action — submit, confirm, cancel, navigate, or destructive operations. Six semantic variants (primary, secondary, positive, negative, outline, ghost) communicate intent across four sizes (sm, md, lg, hero). The brand's chamfered shape; hover inverts fill and label. An optional endIcon slot aligns the label left and pins the icon right. Also called a CTA or action.
19
+ Triggers an action such as submit, confirm, cancel, navigate, or delete. Also called a CTA or action button; variants and sizes communicate its importance.
20
20
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .button (jq: jq '.button' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
21
21
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/button.md
22
22
 
23
23
  ## Callout
24
24
  - category: Display, status: stable
25
- Inline status banner — a persistent, non-interactive message that sits in the content flow to convey info, success, warning, or error state. Composed from slots: Callout.Root wraps a Callout.Icon (status glyph), an optional Callout.Title, and a Callout.Description. Tonal `variant` (info/positive/warning/negative) tints the surface and colours the icon and text. Also called an alert, callout, or inline notice. Not a Toast (transient) or Alert Dialog (modal).
25
+ Persistent, in-place status message for information, success, warnings, and errors. Also called an inline alert or notice; it is not a transient toast or modal dialog.
26
26
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .callout (jq: jq '.callout' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
27
27
 
28
28
  ## Card
29
29
  - category: Layout, status: stable
30
- Surface container — groups related content on a tonal background. Composed from slots: Card.Root wraps an optional edge-to-edge Card.Image plus padded Card.Header, Card.Content, and Card.Footer. Tonal or coloured `variant`, opt-in shadow and radius, and a `density` scale. Also called a panel, tile, or paper.
30
+ Surface container for related content on a tonal background. Also called a panel or tile; compose it from optional image, header, content, and footer parts.
31
31
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .card (jq: jq '.card' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
32
32
 
33
33
  ## Checkbox
34
34
  - category: Inputs, status: stable
35
- Binary form control for opt-in choices — accept terms, select table rows, pick list items. Supports an indeterminate state for parent/child selection. Also called a check box or tick box; for immediate on/off preferences, prefer Switch.
35
+ Binary form control for submitted choices such as terms, table rows, or list items. Also called a check box; it supports an indeterminate parent state.
36
36
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .checkbox (jq: jq '.checkbox' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
37
37
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/checkbox.md
38
38
 
39
39
  ## Chip
40
40
  - category: Display, status: stable
41
- Compact inline label for tags, status, categories, counts, or metadata. Also known as a badge, tag, or pill. Two dimensions — a color variant for semantic role and a shape variant for visual appearance, including an inline form that sits naturally in flowing body text.
41
+ Compact label for tags, status, categories, counts, and metadata. Also called a badge or tag; its color and appearance are independent choices.
42
42
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .chip (jq: jq '.chip' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
43
43
 
44
44
  ## ChipLink
45
45
  - category: Buttons, status: stable
46
- Inline link styled as a chip — a small labeled anchor that auto-appends a directional icon. Use for external doc references and source attribution (opens in a new tab) or in-app navigation badges (stays in the current tab). Also called a link chip or link badge.
46
+ Link styled as a compact chip, with a directional icon for external references or in-app navigation. Also called a link chip or link badge.
47
47
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .chip-link (jq: jq '.chip-link' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
48
48
 
49
49
  ## Code
50
50
  - category: Display, status: stable
51
- Displays source code — Code.Inline for a fragment in running text, Code.Block for a fenced block with an optional language label and copy button. Also called a code snippet or code block.
51
+ Displays source code inline or in a block, with optional language labels and copying. Also called a code snippet or code block.
52
52
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .code (jq: jq '.code' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
53
53
 
54
54
  ## CodeHighlight
55
55
  - category: Display, status: experimental
56
- Syntax-highlighted drop-in for the Code parts — the same Code.Block and Code.Inline, with TanStack Highlight token coloring that follows the color scheme. Imported from @imfusion/web-ui/integrations/code-highlight; requires the @tanstack/highlight peer.
56
+ Syntax-highlighted Code parts powered by TanStack Highlight. Import from the integration entry and install the optional @tanstack/highlight peer.
57
57
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .code-highlight (jq: jq '.code-highlight' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
58
58
 
59
59
  ## Collapsible
60
60
  - category: Display, status: stable
61
- Toggleable show/hide region for progressive disclosure — FAQ entries, expandable settings, detail toggles. A trigger button drives an animated open/close panel; multiple stacked form an accordion. Also called a disclosure or expand/collapse.
61
+ Show-and-hide region for secondary content such as FAQs, settings, or details. Also called a disclosure or expand/collapse.
62
62
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .collapsible (jq: jq '.collapsible' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
63
63
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/collapsible.md
64
64
 
65
65
  ## CopyButton
66
66
  - category: Buttons, status: stable
67
- Button that copies a value to the clipboard and shows a transient confirmation. Also called a copy-to-clipboard button. Composes Button; commonly paired with Code.Block.
67
+ Copies a value to the clipboard and briefly shows confirmation. Also called a copy-to-clipboard button; commonly used with Code.Block.
68
68
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .copy-button (jq: jq '.copy-button' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
69
69
 
70
70
  ## Drawer
71
71
  - category: Layout, status: stable
72
- Off-canvas panel that slides in from a screen edge. Use for mobile navigation, secondary nav, settings trays, filter sidebars, or any side sheet. Also called a sidebar, side panel, off-canvas, or sheet.
72
+ Off-canvas panel that slides in from a screen edge for navigation, settings, filters, or focused tasks. Also called a sidebar, side panel, or sheet.
73
73
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .drawer (jq: jq '.drawer' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
74
74
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/drawer.md
75
75
 
76
76
  ## Field
77
77
  - category: Inputs, status: stable
78
- Accessible field composition for a label, form control, supporting description, and inline validation message. Use it to associate a control such as Input, Checkbox, or Select with field state including valid, invalid, dirty, touched, filled, and focused.
78
+ Accessible field composition for a label, control, supporting text, and validation message. Use it with Input, Checkbox, Select, and other form controls.
79
79
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .field (jq: jq '.field' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
80
80
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/field.md
81
81
 
82
82
  ## Fieldset
83
83
  - category: Inputs, status: stable
84
- Semantic grouping for related form controls with a shared legend. Also called a form group; use it to communicate a common topic and propagate disabled state without introducing a decorative container.
84
+ Semantic group for related form controls with a shared legend. Also called a form group; it can propagate a disabled state to the group.
85
85
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .fieldset (jq: jq '.fieldset' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
86
86
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/fieldset.md
87
87
 
88
88
  ## Icon
89
89
  - category: Display, status: stable
90
- Semantic color wrapper for an icon imported from the Web UI icons entry. Use it when an icon needs a named foreground role instead of the inherited currentColor.
90
+ Renders a Web UI icon with an optional semantic foreground color. The default inherits the surrounding currentColor.
91
91
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .icon (jq: jq '.icon' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
92
92
 
93
93
  ## ImageDisplayOptions
94
94
  - category: Inputs, status: experimental
95
- A panel or toolbar of controls bound to an image dataset's display options.
95
+ Panel and toolbar controls for an image dataset's display options, including window, level, gamma, and invert settings.
96
96
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .image-display-options (jq: jq '.image-display-options' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
97
97
  - further reading (usage/anatomy, not props): https://docs.imfusion.com/
98
98
 
99
99
  ## Input
100
100
  - category: Inputs, status: stable
101
- Single-line text input for form data entry. Also called a text field or input field. Supports controlled and uncontrolled modes, and integrates with Base UI's Field context for validation state (valid, invalid, dirty, touched, filled, focused).
101
+ Single-line text input for form data entry. Also called a text field; it supports controlled values and Field validation state.
102
102
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .input (jq: jq '.input' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
103
103
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/input.md
104
104
 
105
105
  ## Logo
106
106
  - category: Display, status: stable
107
- Brand mark display primitive — renders a logo from a URL or inline React element with consistent sizing. Also called a wordmark, brand icon, or logotype.
107
+ Renders a logo from a URL or inline React element with consistent sizing. Also called a wordmark or brand mark.
108
108
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .logo (jq: jq '.logo' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
109
109
 
110
110
  ## NavigationMenu
111
111
  - category: Display, status: experimental
112
- Navigation menu — a horizontal (or vertical) strip of triggers that open flat, anchored flyout panels for site or app wayfinding, with multi-column mega-menu content and a viewport-responsive inline master/detail submenu. Composed from slots: NavigationMenu.Root, List, Item, Trigger, Icon, Content, Link, FlyoutLink, LinkList, LinkCard, InlineSubmenu, Portal, Positioner, Popup, Viewport, Arrow, Backdrop. Also called a nav bar, menu bar, or mega menu.
112
+ Navigation menu with horizontal or vertical triggers and anchored flyout panels. Also called a menu bar or mega menu; it supports links, rich cards, and nested navigation.
113
113
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .navigation-menu (jq: jq '.navigation-menu' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
114
114
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/navigation-menu.md
115
115
 
116
116
  ## Popover
117
117
  - category: Display, status: stable
118
- Floating panel anchored to a trigger element. Use for contextual menus, tooltips-with-actions, rich hover cards, quick-edit forms, or any non-modal detail overlay. Also called a popup, flyout, or floating menu.
118
+ Floating panel anchored to a trigger for contextual content, quick forms, or actions. Also called a popup or flyout; use Tooltip for hints without interaction.
119
119
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .popover (jq: jq '.popover' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
120
120
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/popover.md
121
121
 
122
122
  ## Row
123
123
  - category: Layout, status: stable
124
- Horizontal layout primitive — children are arranged left-to-right with configurable spacing, alignment, and optional wrapping. Also called hstack, horizontal stack, flex row.
124
+ Horizontal layout primitive for spacing, aligning, and wrapping children. Also called a horizontal stack or flex row.
125
125
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .row (jq: jq '.row' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
126
126
 
127
127
  ## Select
128
128
  - category: Inputs, status: stable
129
- Single-choice dropdown — pick one value from a known list. Keyboard-accessible listbox with a labelled trigger and a portalled popup. Best for short, fixed option sets (status, role, country). Also called a dropdown or picker.
129
+ Dropdown for choosing a value from a known list. Also called a picker; use it for a labeled, keyboard-accessible option list.
130
130
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .select (jq: jq '.select' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
131
131
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/select.md
132
132
 
133
133
  ## Separator
134
134
  - category: Layout, status: stable
135
- Thin line that visually divides content into groups — section break, list item rule, sidebar division. Also called a divider, hr, or horizontal / vertical rule.
135
+ Line that divides content horizontally or vertically. Also called a divider or rule.
136
136
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .separator (jq: jq '.separator' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
137
137
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/separator.md
138
138
 
139
139
  ## Slider
140
140
  - category: Inputs, status: stable
141
- Drag a thumb along a track to pick a numeric value or range. Use for continuous or stepped numeric input where magnitude matters — volume, brightness, opacity, price ranges. Also called a range input.
141
+ Numeric input for choosing one value or a range by dragging a thumb. Also called a range input; use it when relative magnitude matters.
142
142
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .slider (jq: jq '.slider' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
143
143
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/slider.md
144
144
 
145
145
  ## Spinner
146
146
  - category: Display, status: stable
147
- Loading indicator built from the animated ImFusion glyph. Also called a loader, progress spinner, or activity indicator; signals indeterminate loading.
147
+ Indeterminate loading indicator. Also called a loader or progress spinner.
148
148
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .spinner (jq: jq '.spinner' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
149
149
 
150
150
  ## Stack
151
151
  - category: Layout, status: stable
152
- Vertical layout primitive — children stack top-to-bottom with configurable spacing and alignment. Use it instead of writing flex column layouts by hand. Also called a vstack or column.
152
+ Vertical layout primitive for spacing and aligning children. Also called a vertical stack or column.
153
153
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .stack (jq: jq '.stack' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
154
154
 
155
155
  ## Switch
156
156
  - category: Inputs, status: stable
157
- Two-state toggle for immediate on/off preferences — enable a feature, mute audio, toggle dark mode. Takes effect right away (no submit step); for form-submission booleans, a checkbox is more conventional. Also called a toggle.
157
+ Two-state control for an on/off setting that takes effect immediately. Also called a toggle; use Checkbox for a submitted choice.
158
158
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .switch (jq: jq '.switch' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
159
159
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/switch.md
160
160
 
161
161
  ## Table
162
162
  - category: Display, status: stable
163
- Styled, static building blocks for tabular data — Root, Header, Body, Row, HeaderCell, Cell, HeaderButton, SortableHeaderCell. Also called a data grid anatomy. Purely presentational with no data logic; for a full data grid, drive these parts with a headless table library (TanStack Table recommended) that you install yourself.
163
+ Presentational table parts for static tabular data. Pair them with a headless table library for sorting, pagination, or selection.
164
164
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .table (jq: jq '.table' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
165
165
 
166
166
  ## Tabs
167
167
  - category: Display, status: stable
168
- Tabbed navigation — switches between panels of content within one view via a horizontal (or vertical) strip of labels with a sliding active-state underline. Composed from slots: Tabs.Root, Tabs.List, Tabs.Tab, Tabs.Indicator, Tabs.Panel. Also called a tab strip or tab bar.
168
+ Switches between related panels within one view. Also called a tab strip or tab bar; it supports horizontal and vertical layouts.
169
169
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .tabs (jq: jq '.tabs' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
170
170
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/tabs.md
171
171
 
172
+ ## Toast
173
+ - category: Display, status: experimental
174
+ Transient message stack that reports the outcome of a background action without interrupting the page. Use for save confirmations, undo offers, and async progress; attach one to an element for contextual feedback like a copy confirmation. Also called a snackbar, notification, or flash message; for a message that stays inline in the page use Callout instead.
175
+ - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .toast (jq: jq '.toast' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
176
+ - further reading (usage/anatomy, not props): https://base-ui.com/react/components/toast.md
177
+
172
178
  ## Toggle
173
179
  - category: Inputs, status: experimental
174
- A two-state button that can be on or off. Compose several inside a ToggleGroup for a segmented control.
180
+ Two-state button for a pressed or unpressed option. Compose several in ToggleGroup for a segmented control.
175
181
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .toggle (jq: jq '.toggle' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
176
182
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/toggle.md
177
183
 
178
184
  ## ToggleGroup
179
185
  - category: Inputs, status: experimental
180
- A set of connected Toggle buttons sharing one value: single-select by default (a segmented control), or multi-select with `multiple`. Compose one Toggle per segment, each with a value. Also called a segmented control or segmented button.
186
+ Group of connected Toggle buttons that share a selection. Also called a segmented control; set `multiple` for more than one active option.
181
187
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .toggle-group (jq: jq '.toggle-group' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
182
188
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/toggle-group.md
183
189
 
184
190
  ## Tooltip
185
191
  - category: Display, status: stable
186
- Hover- or focus-triggered floating label giving terse contextual help for a control or term. Use for icon-button descriptions, truncated-text reveals, and field hints. Also called a hint, hovercard, or info bubble; for click-triggered panels with actions use Popover instead.
192
+ Hover- or focus-triggered label for brief help about a control or term. Also called a hint; use Popover for a panel with actions.
187
193
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .tooltip (jq: jq '.tooltip' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
188
194
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/tooltip.md
189
195
 
190
196
  ## Typo
191
197
  - category: Display, status: stable
192
- Typographic primitives — a family of heading (H1–H4), paragraph (P, Lead), and inline accent (InlineCode, Highlight, Link) components. Most support a color role — main, support, or minor — plus the standard HTML attributes for its element; InlineCode is a fixed neutral chip (it renders Code.Inline).
198
+ Semantic text primitives for headings, paragraphs, lists, quotes, links, and inline code. The namespace uses native HTML elements and token-based text roles.
193
199
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .typo (jq: jq '.typo' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
@@ -1,56 +1,47 @@
1
1
  ---
2
2
  name: imf-web-ui
3
3
  description:
4
- "Entry point for UI work in a project that depends on @imfusion/web-ui. Decides whether guidance is needed at all, then
5
- routes to the right companion skill — component reference, UX guidance, or frontend conventions. Load when adding or
6
- editing UI in a consumer repo."
4
+ "Route UI work in a project that uses @imfusion/web-ui. Use this skill whenever a user adds, edits, styles, or reviews UI
5
+ in a consumer project, even if they do not mention the library. Decide whether guidance is needed, then open only the
6
+ companion skills that match the task."
7
7
  ---
8
8
 
9
- # imf-web-ui
9
+ # Route Web UI work
10
10
 
11
- `@imfusion/web-ui` ships a small family of skills. This one is the map — it costs almost nothing to load and tells you which
12
- companion to open, or that you need none at all. Don't load a companion speculatively: route first, zoom second.
11
+ Start here for UI work in a project that uses `@imfusion/web-ui`. This skill is a map, not a second copy of every convention.
13
12
 
14
- ## Row zero — is help needed at all?
13
+ ## 1. Decide whether guidance is needed
15
14
 
16
- Before routing, check whether this task needs guidance in the first place. It does **not** when:
15
+ Skip a companion when the task is explicit and small, an existing local pattern already solves it, and the library usage is
16
+ already correct. Do the work. Look up an API silently only when you are unsure.
17
17
 
18
- - The request is explicit and small ("make the button say Save", "add a column for email"), or
19
- - You're repeating a pattern that already exists nearby in the codebase — copy it, and
20
- - The components involved are already imported and used correctly.
18
+ Use a companion when the task involves a choice, a missing setup piece, a new file, or a library convention the project may
19
+ not already have.
21
20
 
22
- In that case: just do the work. At most, do a silent props lookup via `imf-web-ui-components` if you're unsure of an API.
23
- Guidance skills exist to fill gaps, not to add ceremony to clear tasks.
21
+ ## 2. Route the task
24
22
 
25
- ## Routing
23
+ | Task | Open |
24
+ | ----------------------------------------------------------------- | ------------------------------------------------------ |
25
+ | Look up a component, part, prop, default, or icon | `imf-web-ui-components` |
26
+ | Choose components or shape a screen or flow | `imf-web-ui-ux` |
27
+ | Write or update documentation | `/documentation-writer`, then `imf-web-ui-conventions` |
28
+ | Write a wrapper, custom UI, CSS, data layer, validation, or tests | `imf-web-ui-conventions` |
29
+ | Install the library or bootstrap project tooling | `imf-web-ui-setup` |
30
+ | Inspect an existing project without changing it | `imf-web-ui-audit` |
31
+ | Update the package, skills, or hooks | `imf-web-ui-update` |
26
32
 
27
- | The task at hand | Open |
28
- | ----------------------------------------------------------------------------------------------------- | --------------------------------------- |
29
- | Using a specific component; checking props, sub-components, or defaults | `imf-web-ui-components` |
30
- | First-time setup, adding a library dependency, or components rendering unstyled/broken | `imf-web-ui-setup` (`library-setup`) |
31
- | Building/reshaping a screen or flow; choosing between components; layout, density, hierarchy, states | `imf-web-ui-ux` |
32
- | Writing wrappers or custom UI; styling beyond defaults; adding files; TypeScript, naming, testing | `imf-web-ui-conventions` |
33
- | Setting up or auditing an **ImFusion** repo's tooling: formatting, linting, hooks, scripts, structure | `imf-web-ui-setup` / `imf-web-ui-audit` |
34
- | Installing or checking agent tooling: vendored skills, lifecycle hooks, registrations, and staleness | `imf-web-ui-setup` / `imf-web-ui-audit` |
33
+ A screen often needs both `imf-web-ui-ux` and `imf-web-ui-components`, in that order. Setup and audit are for project-wide
34
+ questions, not every one-file edit.
35
35
 
36
- The two setup rows are narrow on purpose. They're for "what is this project missing?" — a question about the repo as a whole.
37
- Being asked to add one config file is just that edit; make it, and don't open a skill to do so.
36
+ ## 3. Keep project choices
38
37
 
39
- Tasks routinely span two: building a screen usually means `imf-web-ui-ux` for the shape and `imf-web-ui-components` for the
40
- APIs. That's normal — open both, in that order.
38
+ The host project's existing conventions win. The companion skills fill gaps; they do not justify refactoring a working
39
+ styling system, state library, or folder structure.
41
40
 
42
- ## The stack
41
+ When a task needs TanStack Router, Query, Form, Table, or Store and the project has no incumbent, propose the matching
42
+ library and read its current documentation with `npx @tanstack/cli` before using it.
43
43
 
44
- TanStack is the recommended tooling library — routing, server state, forms, tables. When a task needs one of those and the
45
- project has no incumbent, propose it, and read the library's own docs (`npx @tanstack/cli`) rather than working from memory.
44
+ ## 4. Ask only when the choice depends on missing context
46
45
 
47
- ## When to interview the human
48
-
49
- `imf-web-ui-ux` contains a short per-feature interview. Run it **only** when both hold:
50
-
51
- 1. The request is foggy — you couldn't say what the primary action of the screen is, who uses it, or what data it shows.
52
- 2. A human is available to answer.
53
-
54
- Never interview when a spec, mockup, or clear instruction exists — asking questions the conversation already answered is
55
- worse than not asking at all. When in doubt and no human is around, make the conservative choice, and say which assumptions
56
- you made.
46
+ For a vague screen or flow, use the short interview in `imf-web-ui-ux`. Do not ask questions the prompt, a spec, or the
47
+ repository already answers.
@@ -1,119 +1,67 @@
1
1
  ---
2
2
  name: imf-web-ui-audit
3
3
  description:
4
- "Read-only health check for an ImFusion frontend against the conventions baseline. Audit the full project or any topic,
5
- including library-setup, tooling, git, npm-project, authentication, project-structure, docs-structure, data, testing,
6
- React, TypeScript, class names, validation, components, styling, assets, library-boundary, and tokens. Reports broken
7
- pieces, missing pieces, working deviations, present evidence, and unverified state, then turns them into an actionable
8
- plan."
4
+ "Audit an existing ImFusion frontend against the @imfusion/web-ui conventions without changing files. Use this for a
5
+ project health check, a pre-setup review, or one named topic. Report broken and missing pieces, working deviations,
6
+ evidence, and an ordered plan."
9
7
  argument-hint: "[full|<topic>]"
10
8
  allowed-tools: Read Glob Grep
11
9
  ---
12
10
 
13
- # imf-web-ui-audit
11
+ # Audit a consumer project
14
12
 
15
- You are the frontend health-check auditor, and you run as an orchestrator: one investigator per topic gathers the evidence,
16
- you merge their findings and turn them into an actionable plan. Follow the applicable `imf-web-ui-conventions` topics, cite
17
- repository evidence, distinguish defects from working deviations, and never present the baseline as universal best practice.
18
-
19
- An audit belongs in plan mode: it ends in work to approve, not in files to write.
13
+ This is a read-only audit. Compare the project with the selected `imf-web-ui-conventions` topics, report evidence, and end
14
+ with work the human can approve. The baseline is an ImFusion default, not a universal law; a deliberate project choice is a
15
+ deviation, not a defect.
20
16
 
21
17
  ## Workflow
22
18
 
23
- 1. Resolve the argument. Bare means `full`; a topic selects one row below. If no topic matches, list every available topic
24
- instead of guessing or widening the scope.
25
- 2. Enter the host's plan mode, unless one of the exceptions after step 5 applies. If plan mode is not already active, use the
26
- host plan-mode control before dispatching anything.
27
- 3. Dispatch one investigator per in-scope topic, using the host's subagent mechanism, as concurrently as the host allows.
28
- Investigators are cheap and narrow: each one gets a single topic and reports back. A host with no subagent mechanism is
29
- not a blocker — work the topics inline in this session, in the same order, to the same contract.
30
- 4. Merge what comes back. Findings you did not gather yourself are the report; do not re-inspect files an investigator
31
- covered. Reconcile conflicts by reading the cited evidence, and drop any finding whose citation does not hold.
32
- 5. Deliver the merged report and the plan in the host plan, from the shared report contract at
33
- [`../imf-web-ui-conventions/templates/REPORT.md`](../imf-web-ui-conventions/templates/REPORT.md), with the mode label
34
- `audit`. The plan's ordered steps are the `Next action` lines of the findings, grouped by topic and cheapest-first;
35
- `Present` findings produce no steps.
36
-
37
- Some runs take the report somewhere other than a plan. When the human asks for the durable file, or the host has no plan
38
- mode, write the same content to `AUDIT_REPORT.md` and preserve everything under `## Reviewer notes` verbatim. When another
39
- skill invokes the audit as its verification step, report the findings to that caller and stay out of plan mode — the caller
40
- owns the flow, and the human has usually just left plan mode to let its work happen.
41
-
42
- ## Dispatching an investigator
43
-
44
- Each investigator prompt carries, in full:
45
-
46
- - the topic name and the path of its convention topic file;
47
- - the topic's block from the shared [convention audit checklist](../imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md), and
48
- the instruction to check every box in it;
49
- - the safety constraint below, verbatim — an investigator that reaches for a shell breaks the audit's only guarantee;
50
- - the report contract's entry format, so findings arrive mergeable: severity, reference, short title, `path:line` evidence,
51
- impact, next action;
52
- - the instruction to report findings back as its result and write no files.
53
-
54
- An investigator reports on its topic alone. Anything it notices outside that topic goes back as a note for the orchestrator
55
- to route, not as a finding it rules on.
56
-
57
- ## Checklist
58
-
59
- The shared [convention audit checklist](../imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md) is the working checklist: a
60
- full audit covers every block, a scoped audit covers the requested block plus its dependencies. The audit is not complete
61
- until every in-scope box has been checked by the investigator that owns it and its evidence appears in the report. The
62
- checklist itself is not edited during an audit.
19
+ 1. Resolve the argument. Bare means `full`; an unknown topic is an error, not a reason to widen the scope.
20
+ 2. Enter plan mode unless this audit is being called as verification by another skill or the host has no plan mode.
21
+ 3. Assign one investigator to each in-scope topic. An investigator checks every section in that topic and writes nothing. If
22
+ the host cannot dispatch agents, inspect the topics inline in the same order.
23
+ 4. Merge the evidence into the shared report format in
24
+ [`templates/REPORT.md`](../imf-web-ui-conventions/templates/REPORT.md).
25
+ 5. Put each finding's `Next action` into an ordered plan, grouped by topic and cheapest first. Present the report and wait
26
+ for approval; an audit does not edit the project.
63
27
 
64
- ## Safety
28
+ If the caller needs a durable report, write `AUDIT_REPORT.md` and preserve everything under `## Reviewer notes` verbatim.
29
+
30
+ ## Finding format
65
31
 
66
- Use only static inspection: Read, Glob, Grep, and equivalent non-executing search tools. Do not use a shell or invoke Node,
67
- npm, npx, package scripts, hooks, config imports, linters, tests, builds, Git commands, or project binaries. Read config as
68
- text and report runtime or machine-local state that cannot be established statically as unverified. This binds every
69
- investigator too — a dispatched agent inherits the audit's constraint, not the host's default freedom, so the prompt that
70
- dispatches it repeats this paragraph verbatim.
32
+ Classify every result as one of these:
71
33
 
72
- An audit writes at most one file: `AUDIT_REPORT.md`, in the two cases named in the workflow. Investigators write nothing.
73
- Neither Write nor the host's dispatch tool is pre-approved in `allowed-tools` — `allowed-tools` names what an audit needs on
74
- every run, and both of these follow the host's ordinary approval when a run needs them. Host-managed hooks may run after that
75
- write; the skill neither invokes nor suppresses them, but it does report broken or unexpected hook behavior found during
76
- static inspection.
34
+ - **Broken**: the project violates a rule in a way that blocks or risks the work.
35
+ - **Missing**: a required piece is absent.
36
+ - **Deviation**: the project works differently from the baseline.
37
+ - **Present**: the rule is met, with evidence.
38
+ - **Unverified**: static inspection cannot establish it.
39
+
40
+ Use the report contract's severity, `path:line` evidence, concrete impact, and smallest next action. Do not promote an
41
+ optional tool or a working alternative to a missing finding.
77
42
 
78
43
  ## Topics
79
44
 
80
- | Topic | Assess |
81
- | ------------------- | ------------------------------------------------------------------------------ |
82
- | `library-setup` | styles import, `WebUIProvider`, and library package wiring |
83
- | `library-boundary` | imports, wrappers, type derivation, and peer boundaries |
84
- | `react` | component roles, state ownership, and effects discipline |
85
- | `components` | component folders, anatomy, and colocation |
86
- | `typescript` | functional style, types, and naming |
87
- | `styling` | CSS Modules, tokens, and prohibited styling systems |
88
- | `tokens` | names, authored default values, and families from the shipped token index |
89
- | `class-names` | CVA variants, `cx`, and incoming `className` handling |
90
- | `validation` | runtime schemas, boundary parsing, and derived types |
91
- | `data` | transport, schemas, query/mutation options, keys, and invalidation |
92
- | `authentication` | current-user query, public/app guards, login, and logout |
93
- | `project-structure` | source tree, route groups, optional app shell, naming, and imports |
94
- | `testing` | test boundaries and verification coverage |
95
- | `npm-project` | package metadata, scripts, pins, npm, and Node configuration |
96
- | `tooling` | dependency selection, devtools, Prettier, ESLint, TypeScript, and verification |
97
- | `git` | tracked hooks, verification scopes, and staleness wiring |
98
- | `assets` | image formats and static asset handling |
99
- | `docs-structure` | README, AGENTS, docs index, and content boundaries |
100
- | `agent-tooling` | installed skills, AGENTS fence, lifecycle hooks, registrations, staleness |
101
-
102
- Report everything within the selected topic: defects and working deviations alike, with no severity-based filtering.
103
-
104
- ## Agent-tooling assessment reference
105
-
106
- The baseline is the conventions [agent-tooling topic](../imf-web-ui-conventions/topics/agent-tooling.md): the complete bundle
107
- with matching version markers, the AGENTS fence, and the lifecycle hooks installed and registered for both hosts
108
- (`.claude/settings.json` and `.codex/hooks.json`) or consciously adapted. Hooks or registrations beyond the shipped set — the
109
- three injection hooks, the stop gate, plus `baseline-staleness.sh` — are drift, and the tracked pre-commit path calls
110
- `baseline-staleness.sh`. Read files and settings as text—do not run installers, hooks, or local config queries during
111
- assessment.
112
-
113
- Version drift is part of this topic: compare the declared version in `package.json`, the installed
114
- `node_modules/@imfusion/web-ui/package.json`, and every `.imf-web-ui-skill-version.json` marker, then report the drift and
115
- point at `imf-web-ui-update`. The registry is unreachable from a static audit, so a line saying that a newer version may
116
- exist is unverified.
117
-
118
- Use the shared report template as the report contract. It defines the headings, ordering, empty-section marker, evidence
119
- format, and reviewer-note preservation rules; do not duplicate that contract here.
45
+ `full` covers all of these; a named argument covers one:
46
+
47
+ `library-setup`, `library-boundary`, `react`, `components`, `typescript`, `styling`, `tokens`, `class-names`, `validation`,
48
+ `data`, `authentication`, `project-structure`, `testing`, `npm-project`, `tooling`, `git`, `assets`, `docs-structure`, and
49
+ `agent-tooling`.
50
+
51
+ Read the corresponding topic and the matching block in
52
+ [`templates/AUDIT_CHECKLIST.md`](../imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md). The audit is incomplete until every
53
+ in-scope box has evidence.
54
+
55
+ ## Agent tooling checks
56
+
57
+ For `agent-tooling`, compare the declared version in `package.json`, the installed
58
+ `node_modules/@imfusion/web-ui/package.json`, every `.imf-web-ui-skill-version.json` marker, the `AGENTS.md` fence, hook
59
+ scripts, and both host registrations with the shipped topic. Version drift, extra hooks, stale markers, and missing
60
+ registrations are findings; point version drift to `imf-web-ui-update`. Registry availability is unverified. Read files as
61
+ text; do not run installers or hooks.
62
+
63
+ ## Safety
64
+
65
+ Use only `Read`, `Glob`, `Grep`, and equivalent static inspection. Do not run Git, shells, Node, npm, npx, package scripts,
66
+ linters, tests, builds, hooks, or imported config. Report runtime state as unverified. Investigators inherit this
67
+ restriction.