@mieweb/ui 0.11.0-dev.37 → 0.11.0-dev.38

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/agent/README.md CHANGED
@@ -22,7 +22,7 @@ governing spec: later tickets cite it instead of re-deciding.
22
22
  | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
23
  | [mieweb-ui.instructions.md](mieweb-ui.instructions.md) | The rules template. Copied verbatim to the consumer's `.github/instructions/` (VS Code Copilot auto-applies it via the `applyTo` frontmatter) and embedded, minus frontmatter, in a marked block in the consumer's `AGENTS.md` (the cross-tool convention). |
24
24
  | [init-agent.mjs](init-agent.mjs) | The `mieweb-ui` bin. Idempotent — rerun after upgrading `@mieweb/ui` to refresh all targets. `--experimental-agents` additionally installs the agent team below. |
25
- | [agents/](agents/) | Agent templates: `mieweb-ui-design` (orchestrator) + `mieweb-ui-styling` + `mieweb-ui-install` + `mieweb-ui-a11y` + `mieweb-ui-i18n`. Installed to the consumer's `.github/agents/` behind `--experimental-agents`. |
25
+ | [agents/](agents/) | Agent templates: `mieweb-ui-design` (orchestrator) + `mieweb-ui-styling` + `mieweb-ui-install` + `mieweb-ui-a11y` + `mieweb-ui-i18n` + `mieweb-ui-migration`. Installed to the consumer's `.github/agents/` behind `--experimental-agents`. |
26
26
  | [skills/](skills/) | Skill templates: `mieweb-ui-catalog`, `mieweb-ui-tokens`, `mieweb-ui-icons` (generated — `pnpm agent:skills`, never hand-edit) + `mieweb-ui-brands`, `mieweb-ui-tailwind4`, `mieweb-ui-a11y-checklist`, `mieweb-ui-i18n-checklist` (hand-written). Installed to `.github/skills/` behind `--experimental-agents`. |
27
27
  | `evals/` _(Phase 2+)_ | Golden-question eval sets per specialist; the regression harness for agent knowledge. |
28
28
 
@@ -19,6 +19,10 @@ handoffs:
19
19
  agent: MIE UI i18n Agent
20
20
  prompt: Audit the code discussed above for internationalization and RTL compliance (string externalization, locale-bundle completeness, Intl formatting, logical properties) and report findings.
21
21
  send: false
22
+ - label: Migration/compliance audit
23
+ agent: MIE UI Migration Agent
24
+ prompt: Audit the code discussed above for @mieweb/ui compliance (raw HTML elements, custom modal/card/badge patterns, hand-rolled icons, CSS foundation) and report findings with a prioritized replacement plan.
25
+ send: false
22
26
  ---
23
27
 
24
28
  # MIE UI Design Agent (orchestrator)
@@ -48,14 +52,15 @@ comparison tables) and `mieweb-ui-icons` (icon aliases and conventions):
48
52
 
49
53
  ## Route to specialists
50
54
 
51
- | Question is about… | Delegate to |
52
- | --------------------------------------------------- | -------------------- |
53
- | install / peer deps / preset / safelist / `@source` | MIE UI Install Agent |
54
- | tokens, CSS vars, Tailwind classes, brands, dark | MIE UI Styling Agent |
55
- | ARIA, keyboard nav, screen readers, contrast | MIE UI A11y Agent |
56
- | translations, locale bundles, Intl formats, RTL | MIE UI i18n Agent |
55
+ | Question is about… | Delegate to |
56
+ | --------------------------------------------------- | ---------------------- |
57
+ | install / peer deps / preset / safelist / `@source` | MIE UI Install Agent |
58
+ | tokens, CSS vars, Tailwind classes, brands, dark | MIE UI Styling Agent |
59
+ | ARIA, keyboard nav, screen readers, contrast | MIE UI A11y Agent |
60
+ | translations, locale bundles, Intl formats, RTL | MIE UI i18n Agent |
61
+ | migrating code to @mieweb/ui, raw-HTML compliance | MIE UI Migration Agent |
57
62
 
58
- More specialists (Migration, Grids, DataVis, Views,
63
+ More specialists (Grids, DataVis, Views,
59
64
  SuperChat, Rich Text) land in later phases; until one ships, answer its domain
60
65
  from the skills and the component docs, or defer (below).
61
66
 
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: MIE UI Migration Agent
3
+ description: Migration and compliance auditor for bringing codebases onto @mieweb/ui — raw-HTML-to-component pattern enforcement (badge spans, card divs, raw buttons, tables to DataVis NITRO), hand-rolled SVG to lucide-react, CSS foundation checks, and legacy-framework migration planning (Meteor/Blaze to React). Invoke to audit a file, page, or project for @mieweb/ui compliance or to plan a migration.
4
+ tools: ['search', 'codebase', 'fetch']
5
+ handoffs:
6
+ - label: Apply Fixes
7
+ agent: agent
8
+ prompt: Apply the @mieweb/ui compliance fixes identified in the audit above — replace the flagged raw elements and patterns with the prescribed @mieweb/ui components, preserving existing functionality and event handlers.
9
+ send: false
10
+ ---
11
+
12
+ # MIE UI Migration Agent
13
+
14
+ You are the migration and compliance auditor for the **@mieweb/ui** design
15
+ system. You bring legacy code into compliance: every UI element must use a
16
+ `@mieweb/ui` component when one exists — no raw `<button>`, `<input>`,
17
+ `<select>`, `<table>`, `<textarea>`, or custom modal/card/badge markup. You
18
+ are **read-only**: you audit, plan, and prescribe — the **Apply Fixes**
19
+ handoff performs the edits.
20
+
21
+ ## Your sources of truth (never inline-duplicate them)
22
+
23
+ - **`mieweb-ui-catalog` skill** — the component inventory and selection
24
+ guidance; every replacement you prescribe must exist there. It is the
25
+ raw-element → component mapping (`<button>` → `Button`, card divs →
26
+ `Card`/`CardContent`, badge spans → `Badge`, modal divs → `Modal`, …).
27
+ - **`mieweb-ui-tailwind4` skill** — the CSS foundation a migrated project
28
+ needs (`@source` directive, `@custom-variant dark`, `@theme` fallbacks,
29
+ `@tailwindcss/postcss`).
30
+ - **`mieweb-ui-icons` skill** — the lucide-react aliases that replace
31
+ hand-rolled `<svg>` and icon fonts.
32
+ - The installed `mieweb-ui.instructions.md` — the policy you enforce
33
+ (NITRO-first for tables, tokens not hardcoded colors, lucide-react icons).
34
+
35
+ ## The prime directive: patterns, not just imports
36
+
37
+ Compliance is not "does the file import @mieweb/ui". Raw HTML that serves
38
+ the same purpose as a component is a violation even when the file already
39
+ imports the library:
40
+
41
+ - `<span className="rounded-full bg-blue-100 px-2 …">` is a `Badge`.
42
+ - `<div className="rounded-lg border p-4 shadow">` is a `Card`.
43
+ - `<div className="fixed inset-0 bg-black/50">…` is a `Modal`.
44
+ - A hand-rolled `<svg>` or icon-font glyph is a `lucide-react` icon.
45
+ - Any `<table>` the user will sort, filter, page, or export is
46
+ **DataVis NITRO** (`Table` only for a few static rows; `AGGrid` is
47
+ deprecated — never migrate _to_ it).
48
+
49
+ ## Audit workflow
50
+
51
+ 1. **Scope the audit.** A file, a page, or a whole project — confirm which,
52
+ then read the files before reporting. Exclude test files from violation
53
+ counts.
54
+ 2. **Grep for raw elements** — `<button`, `<input`, `<select`, `<textarea`,
55
+ `<table`/`<thead`/`<tbody`/`<tr`/`<td`/`<th`, `<form` controls. Also grep
56
+ the **dynamic forms**: literal `type="date"` misses
57
+ `type={cond ? 'date' : 'text'}` — search `type={` and other
58
+ prop-expression variants too.
59
+ 3. **Grep for patterns** — badge/pill/tag spans, card-like divs
60
+ (`rounded…border…shadow`), modal/overlay divs (`fixed inset-0`), inline
61
+ `<svg>` and icon-font classes, hand-rolled spinners/progress bars,
62
+ custom tab/breadcrumb/pagination markup.
63
+ 4. **Check the CSS foundation** (project-level audits): identify the
64
+ consumer's CSS mode first, then audit against that mode's checklist in
65
+ the `mieweb-ui-tailwind4` skill — Tailwind 4 (`@source` for
66
+ `@mieweb/ui/dist`, `@custom-variant dark`, `@theme` fallbacks,
67
+ `@tailwindcss/postcss`), Tailwind 3 (preset + safelist + `content`
68
+ coverage), or precompiled CSS (`styles.css`/`init.css` import — never
69
+ prescribe Tailwind tooling to it). Validate the dark-mode toggle
70
+ against the `@custom-variant` actually in effect (a single-hook toggle
71
+ against `init.css` is valid); setting both `.dark` and `data-theme` is
72
+ the recommendation for new code, not a violation when one hook matches.
73
+ 5. **Build the resolution plan**, prioritized: layout shell (`AppHeader`,
74
+ `Sidebar`, `SiteFooter`) → buttons → form elements → cards & modals →
75
+ tables (NITRO) → feedback (`Badge`, `Toast`, `Spinner`) → navigation
76
+ (`Tabs`, `Breadcrumb`, `Pagination`). Replacements preserve existing
77
+ functionality and event handlers.
78
+ 6. **Detect gaps.** A pattern with no `@mieweb/ui` equivalent is not a
79
+ violation — report it with the tier recommendation: compose from existing
80
+ primitives; build locally in library style (CVA variants, `forwardRef`,
81
+ theme CSS variables, dark mode, ARIA); headless-module contract if it
82
+ renders a caller-owned collection; contribute upstream once stable.
83
+ 7. **Report, then hand off.** Findings in the format below; offer
84
+ **Apply Fixes** for the edits.
85
+
86
+ ## Audit output format
87
+
88
+ ### 🧭 @mieweb/ui compliance audit for `<scope>`
89
+
90
+ | # | Category | File | Line | Violation | Replacement |
91
+ | --- | -------- | ---- | ---- | --------- | ----------- |
92
+
93
+ Order findings: raw elements, then patterns, then CSS foundation, then gaps.
94
+ After the table, the compliance summary:
95
+
96
+ | Category | Count | Status |
97
+ | ----------------------- | ----- | ------ |
98
+ | Raw `<button>` | X | ❌ |
99
+ | Raw form elements | X | ❌ |
100
+ | Raw `<table>` | X | ❌ |
101
+ | Custom modal/card/badge | X | ❌ |
102
+ | Hand-rolled icons | X | ❌ |
103
+ | CSS foundation | — | ✅/❌ |
104
+ | Gaps (no equivalent) | N | 📝 |
105
+
106
+ Close with what passes, any judgment calls, and the **Apply Fixes** handoff.
107
+
108
+ ## Migration planning (beyond single-file audits)
109
+
110
+ For whole-app migrations (e.g. Meteor 2 + Blaze → Meteor 3 + React +
111
+ @mieweb/ui), plan in this order: scaffold → install deps → the three
112
+ critical CSS/PostCSS/Tailwind config files → verify Tailwind renders →
113
+ shared hooks (`useTheme`, `useBrand`) → layout shell → features one at a
114
+ time, auth first → verify dark mode, brand switching, and `tsc --noEmit`.
115
+ Meteor 3 specifics: all methods async, collection ops use `*Async()`
116
+ variants. Verify each migrated feature before starting the next.
117
+
118
+ ## Redirects
119
+
120
+ - "Which component should I use?" for new (non-migration) work → **MIE UI
121
+ Design Agent** (your mapping covers replacements; open-ended selection is
122
+ theirs).
123
+ - Broken styling after install, unstyled components, Tailwind wiring →
124
+ **MIE UI Install Agent** (you flag the missing foundation; they debug it).
125
+ - Token/brand/dark-mode policy questions → **MIE UI Styling Agent**.
126
+ - ARIA, keyboard navigation, focus, contrast → **MIE UI A11y Agent** (your
127
+ replacements inherit library a11y; auditing what remains is theirs).
128
+ - String externalization, locale bundles, RTL → **MIE UI i18n Agent**.
129
+
130
+ ## Rules
131
+
132
+ 1. Evidence over checklists: cite file and line for every finding; read the
133
+ code before flagging it.
134
+ 2. **Patterns, not just imports** — a compliant import list proves nothing;
135
+ grep for the raw markup the components replace.
136
+ 3. Grep dynamic forms: prop expressions (`type={…}`, spread props,
137
+ conditional classes) hide violations that literal-string greps miss.
138
+ 4. Never prescribe a component or prop you cannot verify in the catalog
139
+ skill, the published component docs (https://ui.mieweb.org), or the
140
+ package's public types — the catalog is a selection inventory, not an
141
+ API reference; a gap honestly reported beats an invented replacement.
142
+ 5. Replacements must preserve behavior — event handlers, controlled state,
143
+ form semantics. Flag any replacement that would change behavior as a
144
+ judgment call instead of silently prescribing it.
@@ -7,7 +7,7 @@ description: Component inventory and selection guidance for the @mieweb/ui desig
7
7
 
8
8
  # @mieweb/ui component catalog
9
9
 
10
- 272 cataloged components. Full docs: https://ui.mieweb.org/ (Storybook; sidebar is Tier / Family / Component, every family has an Overview page).
10
+ 274 cataloged components. Full docs: https://ui.mieweb.org/ (Storybook; sidebar is Tier / Family / Component, every family has an Overview page).
11
11
 
12
12
  For per-component "Which one?" comparison tables, read [selection-guidance.md](./selection-guidance.md) in this skill and jump to the family's section.
13
13
 
@@ -43,7 +43,7 @@ For per-component "Which one?" comparison tables, read [selection-guidance.md](.
43
43
 
44
44
  ## Inventory
45
45
 
46
- Components by tier and family. Annotations: maturity when not stable, and the import entry when it is not the root (e.g. _(`/datavis`)_).
46
+ Components by tier and family. Annotations: maturity when not stable, the import entry when it is not the root (e.g. _(`/datavis`)_), and _(not exported yet)_ for components documented in Storybook but not yet importable — do not recommend those for use.
47
47
 
48
48
  ### Foundations
49
49
 
@@ -73,14 +73,14 @@ Components by tier and family. Annotations: maturity when not stable, and the im
73
73
 
74
74
  - **Chat:** AIChat, AIChat (Voice), AIMessage, ChatComposer _(beta)_, Composer Action Ribbon (POC) _(experimental)_, ComposerModelSelector, MCPToolCall, Messaging, OzwellChat, ReconciliationPanel
75
75
  - **Dashboards:** CustomizableDashboard, Dashboard (Demo) _(experimental)_, Dashboard Widgets (Demo) _(experimental)_, DashboardCustomizePanel, DashboardWidget, QuickLinksCard, ReportDashboard
76
- - **Editors:** EmailEditor _(experimental)_, MacroLibrary _(experimental)_, Markdown, Q _(`/q`)_, RichEditor _(`/kerebron`)_, RichTextEditor, RichTextEsheet _(experimental, `/esheet`)_, TextAreaRich _(experimental)_
76
+ - **Editors:** EmailEditor _(experimental)_, MacroLibrary _(experimental)_, Markdown, Q _(`/q`)_, RichEditor _(`/kerebron`)_, RichTextEditor, RichTextEsheet _(experimental, `/esheet`)_, TextAreaRich (Kerebron) _(experimental, `/kerebron`)_
77
77
  - **Files:** DocumentScanner, DropzoneOverlay, FileManager
78
78
  - **Media:** AudioPlayer, AudioRecorder, DictationButton _(experimental)_, MediaEditor, MediaEditor Live Demo, MediaFeed _(experimental, `/components/MediaFeed`)_, MediaPlayer, RecordButton, TranscriptView, VideoCard _(experimental)_
79
79
  - **Presentations:** Deck _(experimental, `/deck`)_, PointMap _(experimental, `/maps`)_
80
80
  - **Records:** ActionPlan _(experimental)_, ActivityFeed _(experimental)_, AssociationList _(experimental)_, FieldHistory _(experimental)_, OrgChart _(experimental, `/org-chart`)_, RecordLayout _(experimental)_
81
81
  - **SuperChat:** Conversations (List) _(`/components/SuperChat`)_, Inbox _(`/components/SuperChat`)_, SuperChat (Panel) _(`/components/SuperChat`)_
82
82
  - **Views:** BoardView _(alpha)_, CalendarView _(alpha)_, GanttView _(alpha)_, ListView _(alpha)_, ViewSet _(alpha)_, ViewSwitcher _(alpha)_
83
- - **Voice:** Hands-Free Chat, Hey Ozwell Demo, Hey Ozwell Selector _(experimental)_, Speaker Verify _(experimental)_, Transcript Player _(experimental)_, Visit Scribe, Voice Manager, Voice Setup, Wake Word
83
+ - **Voice:** Hands-Free Chat, Hey Ozwell Demo, Hey Ozwell Selector _(experimental)_, Speaker Scribe _(experimental, not exported yet)_, Speaker Verify _(experimental)_, Transcript Player _(experimental)_, Visit Scribe, Voice Manager, Voice Setup, Wake Word
84
84
 
85
85
  ### Templates
86
86
 
@@ -107,7 +107,7 @@ Components by tier and family. Annotations: maturity when not stable, and the im
107
107
 
108
108
  ### Deprecated
109
109
 
110
- - AGGrid _(deprecated, `/ag-grid`)_, AGGrid Enhanced _(deprecated, `/ag-grid`)_
110
+ - AGGrid _(deprecated, `/ag-grid`)_, AGGrid Enhanced _(deprecated, `/ag-grid`)_, TextAreaRich (Legacy) _(deprecated)_
111
111
 
112
112
  ## Family policies
113
113
 
@@ -274,11 +274,12 @@ lists of options in [Choice inputs](https://ui.mieweb.org/?path=/docs/inputs-cho
274
274
  | --- | --- | --- |
275
275
  | [RichEditor](https://ui.mieweb.org/?path=/docs/editors-richeditor--docs) | The document is **Markdown**: headings, lists, tables, code; `getContent()` on submit; `collab.room` for Yjs co-editing; `CodeEditor` for source | The stored format is HTML or you need merge variables/dictation — `RichTextEditor`; the host cannot add the Kerebron peers and WASM assets |
276
276
  | [RichTextEditor](https://ui.mieweb.org/?path=/docs/editors-richtexteditor--docs) | The document is **HTML**: bold/italic/underline, lists, alignment, opt-in markdown block shortcuts (H1–H3, lists, quote), `variableGroups` inserting `{{tokens}}`, Web Speech dictation; no peers | You need Markdown, real undo history, links/tables/code or collaboration — `RichEditor`; plain text — `Textarea`; a textarea-like surface with the toolbar hidden — `TextAreaRich` |
277
- | [TextAreaRich](https://ui.mieweb.org/?path=/docs/editors-textarearich--docs) | A **textarea-like** HTML surface: starts one Input row tall and auto-grows, toolbar hidden until asked, markdown block shortcuts, a Notion-style `+` gutter menu, `.shortcut` macros | The value must be **plain text** (form posts, bindings) — `Textarea` (this surface with a plain-text contract); a full document with an always-on toolbar, variables or dictation — `RichTextEditor` |
277
+ | [TextAreaRich](https://ui.mieweb.org/?path=/docs/editors-textarearich-kerebron--docs) | A **textarea-like** HTML surface on the Kerebron engine (`@mieweb/ui/kerebron`): starts one Input row tall and auto-grows, toolbar hidden until asked, markdown block shortcuts, a Notion-style `+` gutter menu, `.shortcut` macros | The value must be **plain text** (form posts, bindings) — `Textarea` (this surface with a plain-text contract); a full document with an always-on toolbar, variables or dictation — `RichTextEditor` |
278
278
  | [RichTextEsheet](https://ui.mieweb.org/?path=/docs/editors-richtextesheet--docs) | A **multi-section guided document** — referral letters, support tickets, incident write-ups — where an eSheet definition drives section prompts, memory-aid phrases and party macros; exports portable MDY | One free-form HTML letter with merge fields and dictation — `RichTextEditor`; a single rich input — `TextAreaRich`; arbitrary native `FormDefinition` forms — EsheetRenderer (Composite forms); coded clinical visits — EncounterVisit (Encounter & orders) |
279
279
  | [EmailEditor](https://ui.mieweb.org/?path=/docs/editors-emaileditor--docs) | The document is an **email**: hero, columns, buttons, images, social, footer blocks on a drag-to-reorder canvas; `renderEmailMjml` serialises it | A single formatted body — `RichTextEditor`; sending, recipients and templates are the host's |
280
280
  | [Markdown](https://ui.mieweb.org/?path=/docs/editors-markdown--docs) | **Displaying** Markdown: sanitised HTML, code highlighting, `mermaid` / `csv` / `survey` / `html` fences, `streaming` for token-by-token AI output | The user edits the text — `RichEditor` / `RichTextEditor`; the source is HTML |
281
281
  | [Q](https://ui.mieweb.org/?path=/docs/editors-q--docs) | Admins configure an **agent** (prompt, tools, telephony) through a schema-generated form and see the YAML/JSON; `onSubmit(yaml)`, `onConfigChange` | Free-form prose — `RichEditor`; general clinical/business forms — ESheet (Composite forms) |
282
+ | [TextAreaRich (Legacy)](https://ui.mieweb.org/?path=/docs/deprecated-textarearich--docs) _(deprecated)_ | Never for new work — the `document.execCommand` engine; use [TextAreaRich (Kerebron)](https://ui.mieweb.org/?path=/docs/editors-textarearich-kerebron--docs) | — |
282
283
 
283
284
  ---
284
285
 
@@ -652,7 +653,7 @@ executive summary (numbers as lettermark icons) and outlook, and `LeadFormSectio
652
653
  | Component | Use it when | Not when |
653
654
  | --- | --- | --- |
654
655
  | [Input](https://ui.mieweb.org/?path=/docs/text-inputs-input--docs) | One line of free text or a native type (`email`, `password`, `number`) | Phone / URL / date / fixed options — see the specialists |
655
- | [Textarea](https://ui.mieweb.org/?path=/docs/text-inputs-textarea--docs) | A sentence or more stored as **plain text** — rich formatting while composing ([TextAreaRich](https://ui.mieweb.org/?path=/docs/editors-textarearich--docs) underneath), plain string through `onChange` | The host **persists** HTML — [TextAreaRich](https://ui.mieweb.org/?path=/docs/editors-textarearich--docs); native `<textarea>` behaviours (hard `maxLength`, validation, drag-resize, floating label) — `TextAreaPlain` (documented on the Textarea page); full documents — `RichEditor` / `RichTextEditor` |
656
+ | [Textarea](https://ui.mieweb.org/?path=/docs/text-inputs-textarea--docs) | A sentence or more stored as **plain text** — rich formatting while composing ([TextAreaRich](https://ui.mieweb.org/?path=/docs/editors-textarearich-kerebron--docs) underneath), plain string through `onChange` | The host **persists** HTML — [TextAreaRich (Kerebron)](https://ui.mieweb.org/?path=/docs/editors-textarearich-kerebron--docs); native `<textarea>` behaviours (hard `maxLength`, validation, drag-resize, floating label) — `TextAreaPlain` (documented on the Textarea page); full documents — `RichEditor` / `RichTextEditor` |
656
657
  | [Label](https://ui.mieweb.org/?path=/docs/text-inputs-label--docs) | Labelling a control with no `label` prop (raw `<select>`, custom) | The control already takes `label` |
657
658
  | [PhoneInput](https://ui.mieweb.org/?path=/docs/text-inputs-phoneinput--docs) | Exactly one US/Canada number stored as 10 digits | Several typed numbers — `PhoneInputGroup`; international |
658
659
  | [PhoneInputGroup](https://ui.mieweb.org/?path=/docs/text-inputs-phoneinputgroup--docs) | A record holds several numbers and the type (cell, work, fax) matters | One number; rows need extra fields |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mieweb/ui",
3
- "version": "0.11.0-dev.37",
3
+ "version": "0.11.0-dev.38",
4
4
  "description": "A themeable, accessible React component library built with Tailwind CSS",
5
5
  "author": "Medical Informatics Engineering, Inc.",
6
6
  "license": "SEE LICENSE IN LICENSE",