@happyvertical/smrt-ui 0.31.1 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +20 -0
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -8,6 +8,26 @@ can consume UI primitives, i18n, the theme system, and the module UI registry
|
|
|
8
8
|
integration layer. Extracting this leaf is what breaks the domain ⇄ smrt-svelte
|
|
9
9
|
peer cycle (see happyvertical/smrt#1582).
|
|
10
10
|
|
|
11
|
+
## The UI split — primitive-adoption contract (#1589)
|
|
12
|
+
|
|
13
|
+
SMRT has one shared set of UI primitives, split across two packages by concern:
|
|
14
|
+
|
|
15
|
+
- **`smrt-ui` (here) owns the domain-agnostic VISUAL primitives** — `Button`,
|
|
16
|
+
`Card`, `Modal`/`ConfirmDialog`, `Badge`, `Avatar`, `Chip`, `Dropdown`,
|
|
17
|
+
`Tooltip`, `Skeleton`, `Tree`, `Pagination`, `DataTable`, … (it has **no**
|
|
18
|
+
form-input components — those carry i18n/voice logic and belong above the leaf).
|
|
19
|
+
- **`smrt-svelte` owns the FORM primitives** — `Input`, `Textarea`, `Select`,
|
|
20
|
+
`Checkbox`/`Toggle`, `Form`, and the specialized date/measurement/address/file
|
|
21
|
+
inputs.
|
|
22
|
+
|
|
23
|
+
**Domain packages import visual primitives from `smrt-ui` and form primitives
|
|
24
|
+
from `smrt-svelte`, and must not hand-roll raw `<button>` / `<input>` /
|
|
25
|
+
`<select>` / `<textarea>` / `<form>` markup** — re-rolling them re-introduces the
|
|
26
|
+
inconsistent a11y / focus / disabled-state behavior the primitives exist to fix.
|
|
27
|
+
Enforced by `scripts/check-raw-primitives.mjs` (report-only during the #1589
|
|
28
|
+
migration; flips strict per package as it adopts the primitives). smrt-ui's own
|
|
29
|
+
components are exempt — they *are* the primitives.
|
|
30
|
+
|
|
11
31
|
## What lives here
|
|
12
32
|
|
|
13
33
|
| Subpath | Contents |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"description": "Domain-agnostic Svelte 5 UI runtime for SMRT: primitives, i18n client, theme system, and module UI registry",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
110
|
"esm-env": "^1.2.2",
|
|
111
|
-
"@happyvertical/smrt-types": "0.
|
|
111
|
+
"@happyvertical/smrt-types": "0.32.1"
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
114
|
"svelte": "^5.18.2"
|