@kerfjs/ui 5.0.0-beta.17 → 5.0.0-beta.18
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/README.md +108 -79
- package/ai/component-catalog-extension.schema.json +79 -0
- package/ai/component-catalog.json +499 -0
- package/ai/component-catalog.schema.json +15 -0
- package/ai/public-api-signatures-v1.md +67 -31
- package/ai/skill.md +58 -49
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/app-tab.d.ts +1 -1
- package/dist/app-tab.js +1 -1
- package/dist/catalog.d.ts +10 -3
- package/dist/catalog.js +279 -90
- package/dist/catalog.js.map +1 -1
- package/dist/chunk-43FUQH35.js +83 -0
- package/dist/chunk-43FUQH35.js.map +1 -0
- package/dist/{chunk-YGN7OMLT.js → chunk-4TRDV6RL.js} +2 -2
- package/dist/chunk-4TRDV6RL.js.map +1 -0
- package/dist/chunk-6ETZKKAE.js +38 -0
- package/dist/chunk-6ETZKKAE.js.map +1 -0
- package/dist/chunk-6WTETUZ6.js +21 -0
- package/dist/chunk-6WTETUZ6.js.map +1 -0
- package/dist/chunk-7L6EHUMV.js +31 -0
- package/dist/chunk-7L6EHUMV.js.map +1 -0
- package/dist/chunk-BBRXX6PF.js +108 -0
- package/dist/chunk-BBRXX6PF.js.map +1 -0
- package/dist/chunk-DPDBVKNA.js +113 -0
- package/dist/chunk-DPDBVKNA.js.map +1 -0
- package/dist/chunk-ELSJX4W7.js +68 -0
- package/dist/chunk-ELSJX4W7.js.map +1 -0
- package/dist/{chunk-6NLRBSVX.js → chunk-ENVTNLYC.js} +125 -68
- package/dist/chunk-ENVTNLYC.js.map +1 -0
- package/dist/{chunk-AHQI52QO.js → chunk-FEY65TBV.js} +6 -2
- package/dist/chunk-FEY65TBV.js.map +1 -0
- package/dist/chunk-JTHUXDN2.js +58 -0
- package/dist/chunk-JTHUXDN2.js.map +1 -0
- package/dist/chunk-LPOMRC4C.js +25 -0
- package/dist/chunk-LPOMRC4C.js.map +1 -0
- package/dist/chunk-NENBUYX5.js +79 -0
- package/dist/chunk-NENBUYX5.js.map +1 -0
- package/dist/{chunk-XXMOARTH.js → chunk-NVWXKU37.js} +57 -16
- package/dist/chunk-NVWXKU37.js.map +1 -0
- package/dist/chunk-PIDTEQ3U.js +105 -0
- package/dist/chunk-PIDTEQ3U.js.map +1 -0
- package/dist/chunk-PX3YSS5C.js +32 -0
- package/dist/chunk-PX3YSS5C.js.map +1 -0
- package/dist/chunk-PZQVSDLH.js +61 -0
- package/dist/chunk-PZQVSDLH.js.map +1 -0
- package/dist/chunk-QIRXYKCE.js +113 -0
- package/dist/chunk-QIRXYKCE.js.map +1 -0
- package/dist/chunk-QO55FN2Y.js +20 -0
- package/dist/chunk-QO55FN2Y.js.map +1 -0
- package/dist/chunk-QQFJMRIB.js +45 -0
- package/dist/chunk-QQFJMRIB.js.map +1 -0
- package/dist/chunk-S3HKPI7I.js +218 -0
- package/dist/chunk-S3HKPI7I.js.map +1 -0
- package/dist/{chunk-WXMGNX2Y.js → chunk-S3PCZ7NV.js} +2 -2
- package/dist/chunk-S3PCZ7NV.js.map +1 -0
- package/dist/{chunk-7BR3DO2A.js → chunk-SRSJO5QE.js} +13 -4
- package/dist/chunk-SRSJO5QE.js.map +1 -0
- package/dist/chunk-U5IFGQCD.js +117 -0
- package/dist/chunk-U5IFGQCD.js.map +1 -0
- package/dist/{chunk-56RJXPHG.js → chunk-Y6LYKFXY.js} +1 -1
- package/dist/{chunk-56RJXPHG.js.map → chunk-Y6LYKFXY.js.map} +1 -1
- package/dist/chunk-ZK2G3VR5.js +35 -0
- package/dist/chunk-ZK2G3VR5.js.map +1 -0
- package/dist/chunk-ZVI5YST2.js +41 -0
- package/dist/chunk-ZVI5YST2.js.map +1 -0
- package/dist/collapsible-panel.d.ts +2 -2
- package/dist/collapsible-panel.js +47 -6
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/device-class.js +33 -5
- package/dist/device-class.js.map +1 -1
- package/dist/disclosure-arrow.js +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/empty-state.js +1 -1
- package/dist/floating-toolbar.d.ts +1 -1
- package/dist/floating-toolbar.js +1 -1
- package/dist/index.js +25 -25
- package/dist/list-action-row.d.ts +1 -1
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.d.ts +1 -1
- package/dist/list-header.js +1 -1
- package/dist/list-inset-control.d.ts +1 -1
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.d.ts +1 -1
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.d.ts +1 -1
- package/dist/list-item.js +1 -1
- package/dist/loading-spinner.js +1 -1
- package/dist/nav-stack.d.ts +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/panel-header.d.ts +1 -1
- package/dist/panel-header.js +1 -1
- package/dist/resizable-region.d.ts +1 -1
- package/dist/resizable-region.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.d.ts +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/split-view.d.ts +1 -1
- package/dist/split-view.js +70 -10
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/catalog.css +26 -0
- package/dist/tab-bar.d.ts +1 -1
- package/dist/tab-bar.js +1 -1
- package/dist/tab-scaffold.d.ts +1 -1
- package/dist/tab-scaffold.js +43 -8
- package/dist/tab-scaffold.js.map +1 -1
- package/dist/token-search-field.js +1 -1
- package/dist/toolbar-control-group.d.ts +1 -1
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/value-table.d.ts +2 -2
- package/dist/value-table.js +1 -1
- package/dist/wire-catalog.d.ts +31 -2
- package/dist/wire-catalog.js +203 -8
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-nav-stack.js +22 -7
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-resizable-regions.d.ts +1 -1
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-sidebar.js +52 -41
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-scaffold.js +9 -4
- package/dist/wire-tab-scaffold.js.map +1 -1
- package/dist/wire-token-search-fields.d.ts +1 -1
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/workbench.d.ts +1 -1
- package/dist/workbench.js +56 -9
- package/dist/workbench.js.map +1 -1
- package/docs/app-layouts.md +7 -7
- package/docs/catalog.md +108 -24
- package/docs/collapsible-panel.md +38 -11
- package/docs/component-contract.md +30 -2
- package/docs/component-selection.md +71 -63
- package/docs/design/templates.md +1 -1
- package/docs/design-philosophy.md +5 -5
- package/docs/device-class.md +8 -8
- package/docs/examples/command-palette-adapter.tsx +67 -17
- package/docs/examples/component-catalog-extension.json +45 -0
- package/docs/layout.md +19 -19
- package/docs/nav-stack.md +15 -6
- package/docs/recipes.md +4 -4
- package/docs/split-view.md +3 -3
- package/docs/tab-scaffold.md +16 -7
- package/docs/webawesome-theme.md +8 -8
- package/docs/workbench.md +18 -5
- package/llms.txt +20 -14
- package/package.json +6 -4
- package/ux-demo/recipes/app-shell.tsx +206 -10
- package/ux-demo/recipes/collapsible-sidebar.tsx +167 -44
- package/ux-demo/recipes/compact-toolbar.tsx +114 -12
- package/ux-demo/recipes/composer-form.tsx +106 -18
- package/ux-demo/recipes/list-detail-dialog.tsx +144 -8
- package/ux-demo/recipes/list-workspace-states.tsx +165 -8
- package/ux-demo/recipes/loaders.ts +5 -2
- package/ux-demo/recipes/loading-inspector.tsx +124 -41
- package/ux-demo/recipes/mount-recipe.ts +27 -6
- package/ux-demo/recipes/navigation-sidebar.tsx +120 -9
- package/ux-demo/recipes/navigation-stack.tsx +61 -19
- package/ux-demo/recipes/types.ts +3 -1
- package/ux-demo/recipes/workspace-header.tsx +57 -2
- package/dist/chunk-2Z5TWHKQ.js +0 -34
- package/dist/chunk-2Z5TWHKQ.js.map +0 -1
- package/dist/chunk-37T3VNIZ.js +0 -19
- package/dist/chunk-37T3VNIZ.js.map +0 -1
- package/dist/chunk-55DATV3A.js +0 -10
- package/dist/chunk-55DATV3A.js.map +0 -1
- package/dist/chunk-5ATCDSQS.js +0 -42
- package/dist/chunk-5ATCDSQS.js.map +0 -1
- package/dist/chunk-5E2HVJ33.js +0 -10
- package/dist/chunk-5E2HVJ33.js.map +0 -1
- package/dist/chunk-6NLRBSVX.js.map +0 -1
- package/dist/chunk-7BR3DO2A.js.map +0 -1
- package/dist/chunk-7JB7VPRI.js +0 -34
- package/dist/chunk-7JB7VPRI.js.map +0 -1
- package/dist/chunk-7LDCTU7D.js +0 -134
- package/dist/chunk-7LDCTU7D.js.map +0 -1
- package/dist/chunk-AHQI52QO.js.map +0 -1
- package/dist/chunk-AQNKJRFH.js +0 -79
- package/dist/chunk-AQNKJRFH.js.map +0 -1
- package/dist/chunk-AVZHJN6C.js +0 -14
- package/dist/chunk-AVZHJN6C.js.map +0 -1
- package/dist/chunk-B24C4A6T.js +0 -22
- package/dist/chunk-B24C4A6T.js.map +0 -1
- package/dist/chunk-CH4SQ6H5.js +0 -39
- package/dist/chunk-CH4SQ6H5.js.map +0 -1
- package/dist/chunk-DAFFDO33.js +0 -14
- package/dist/chunk-DAFFDO33.js.map +0 -1
- package/dist/chunk-I7INRJO4.js +0 -17
- package/dist/chunk-I7INRJO4.js.map +0 -1
- package/dist/chunk-L4OKFDJY.js +0 -24
- package/dist/chunk-L4OKFDJY.js.map +0 -1
- package/dist/chunk-M5JRI6MN.js +0 -27
- package/dist/chunk-M5JRI6MN.js.map +0 -1
- package/dist/chunk-RNPGFQ33.js +0 -10
- package/dist/chunk-RNPGFQ33.js.map +0 -1
- package/dist/chunk-VPCTCUED.js +0 -10
- package/dist/chunk-VPCTCUED.js.map +0 -1
- package/dist/chunk-WRTAQ7BZ.js +0 -23
- package/dist/chunk-WRTAQ7BZ.js.map +0 -1
- package/dist/chunk-WVPYVDXY.js +0 -15
- package/dist/chunk-WVPYVDXY.js.map +0 -1
- package/dist/chunk-WXMGNX2Y.js.map +0 -1
- package/dist/chunk-XXMOARTH.js.map +0 -1
- package/dist/chunk-YGN7OMLT.js.map +0 -1
- package/dist/chunk-ZQQ6P4SV.js +0 -20
- package/dist/chunk-ZQQ6P4SV.js.map +0 -1
package/README.md
CHANGED
|
@@ -23,45 +23,59 @@ npm install kerfjs @kerfjs/ui
|
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
```tsx
|
|
26
|
-
import { ListItem } from
|
|
27
|
-
import { ListHeader } from
|
|
28
|
-
import { ListActionRow } from
|
|
29
|
-
import { Toolbar } from
|
|
30
|
-
import { ToolbarControlGroup } from
|
|
31
|
-
import { ToolbarText } from
|
|
32
|
-
|
|
33
|
-
mount(root, () =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
popoverTarget: 'workspace-actions',
|
|
43
|
-
popoverTargetAction: 'toggle',
|
|
44
|
-
'aria-controls': 'workspace-actions',
|
|
45
|
-
'aria-haspopup': 'dialog',
|
|
46
|
-
}}
|
|
26
|
+
import { ListItem } from "@kerfjs/ui/list-item";
|
|
27
|
+
import { ListHeader } from "@kerfjs/ui/list-header";
|
|
28
|
+
import { ListActionRow } from "@kerfjs/ui/list-action-row";
|
|
29
|
+
import { Toolbar } from "@kerfjs/ui/toolbar";
|
|
30
|
+
import { ToolbarControlGroup } from "@kerfjs/ui/toolbar-control-group";
|
|
31
|
+
import { ToolbarText } from "@kerfjs/ui/toolbar-text";
|
|
32
|
+
|
|
33
|
+
mount(root, () => (
|
|
34
|
+
<>
|
|
35
|
+
<Toolbar
|
|
36
|
+
label="Document"
|
|
37
|
+
leading={
|
|
38
|
+
<ToolbarControlGroup appearance="borderless" single>
|
|
39
|
+
<ToolbarText text="Notes" />
|
|
40
|
+
</ToolbarControlGroup>
|
|
41
|
+
}
|
|
47
42
|
/>
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
43
|
+
<section>
|
|
44
|
+
<ListHeader
|
|
45
|
+
label="Workspace"
|
|
46
|
+
action="show-workspace-actions"
|
|
47
|
+
actionLabel="Workspace actions"
|
|
48
|
+
rootAttributes={{ "data-section-id": "workspace" }}
|
|
49
|
+
triggerAttributes={{
|
|
50
|
+
popoverTarget: "workspace-actions",
|
|
51
|
+
popoverTargetAction: "toggle",
|
|
52
|
+
"aria-controls": "workspace-actions",
|
|
53
|
+
"aria-haspopup": "dialog",
|
|
54
|
+
}}
|
|
55
|
+
/>
|
|
56
|
+
<ListItem
|
|
57
|
+
action="open-notes"
|
|
58
|
+
label="Notes"
|
|
59
|
+
selected
|
|
60
|
+
rootAttributes={{
|
|
61
|
+
"data-command-color": "blue",
|
|
62
|
+
"data-drop-status": "ready",
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
<ListActionRow
|
|
66
|
+
action="open-file"
|
|
67
|
+
itemId="src/main.ts"
|
|
68
|
+
label="src/main.ts"
|
|
69
|
+
trailingAction="open-file-actions"
|
|
70
|
+
trailingActionLabel="Actions for src/main.ts"
|
|
71
|
+
trailingActionIcon={moreIcon}
|
|
72
|
+
/>
|
|
73
|
+
<div id="workspace-actions" popover="auto">
|
|
74
|
+
Application-owned actions
|
|
75
|
+
</div>
|
|
76
|
+
</section>
|
|
77
|
+
</>
|
|
78
|
+
));
|
|
65
79
|
```
|
|
66
80
|
|
|
67
81
|
Components return Kerf `SafeHtml`. They do not own application state or attach transient listeners. Actions are stable `data-action` hooks; the application wires them once with `delegate()` or `delegateActions()` and retains the disposer.
|
|
@@ -92,35 +106,35 @@ as a `New` marker.
|
|
|
92
106
|
|
|
93
107
|
## Component subpaths
|
|
94
108
|
|
|
95
|
-
| Component
|
|
96
|
-
|
|
|
97
|
-
| `LucideIcon`
|
|
98
|
-
| `DisclosureArrow`
|
|
99
|
-
| `Toolbar`
|
|
100
|
-
| `ToolbarControlGroup`
|
|
101
|
-
| `FloatingToolbar`
|
|
102
|
-
| `ToolbarText`
|
|
103
|
-
| `ListActionRow`
|
|
104
|
-
| `ListItem`
|
|
105
|
-
| `ListHeader`
|
|
106
|
-
| `ListInsetControl`
|
|
107
|
-
| `ListInsetText`
|
|
108
|
-
| Pane, content, and navigation composition
|
|
109
|
-
| `ResizableRegion`
|
|
110
|
-
| `wireResizableRegions`
|
|
111
|
-
| `AppTab`
|
|
112
|
-
| `TabBar`
|
|
113
|
-
| `wireTabBars`, `reorderTabs`
|
|
114
|
-
| `LoadingSpinner`
|
|
115
|
-
| `Skeleton`
|
|
116
|
-
| `Select`
|
|
117
|
-
| `SegmentedControl`
|
|
118
|
-
| `TokenSearchField`, `readTokenSearchField`, `placeTokenSearchCaret` | `@kerfjs/ui/token-search-field`
|
|
119
|
-
| `wireTokenSearchFields`
|
|
120
|
-
| `StateBanner`
|
|
121
|
-
| `EmptyState`
|
|
122
|
-
| `PanelHeader`
|
|
123
|
-
| `ValueTable`, `ValueTableRow`
|
|
109
|
+
| Component | Browser import (includes reachable CSS) | Manual CSS export |
|
|
110
|
+
| ------------------------------------------------------------------- | --------------------------------------- | -------------------------------------- |
|
|
111
|
+
| `LucideIcon` | `@kerfjs/ui/lucide-icon` | `@kerfjs/ui/lucide-icon.css` |
|
|
112
|
+
| `DisclosureArrow` | `@kerfjs/ui/disclosure-arrow` | `@kerfjs/ui/disclosure-arrow.css` |
|
|
113
|
+
| `Toolbar` | `@kerfjs/ui/toolbar` | `@kerfjs/ui/toolbar.css` |
|
|
114
|
+
| `ToolbarControlGroup` | `@kerfjs/ui/toolbar-control-group` | `@kerfjs/ui/toolbar-control-group.css` |
|
|
115
|
+
| `FloatingToolbar` | `@kerfjs/ui/floating-toolbar` | `@kerfjs/ui/floating-toolbar.css` |
|
|
116
|
+
| `ToolbarText` | `@kerfjs/ui/toolbar-text` | `@kerfjs/ui/toolbar-text.css` |
|
|
117
|
+
| `ListActionRow` | `@kerfjs/ui/list-action-row` | `@kerfjs/ui/list-action-row.css` |
|
|
118
|
+
| `ListItem` | `@kerfjs/ui/list-item` | `@kerfjs/ui/list-item.css` |
|
|
119
|
+
| `ListHeader` | `@kerfjs/ui/list-header` | `@kerfjs/ui/list-header.css` |
|
|
120
|
+
| `ListInsetControl` | `@kerfjs/ui/list-inset-control` | `@kerfjs/ui/list-inset-control.css` |
|
|
121
|
+
| `ListInsetText` | `@kerfjs/ui/list-inset-text` | `@kerfjs/ui/list-inset-text.css` |
|
|
122
|
+
| Pane, content, and navigation composition | — | `@kerfjs/ui/layout.css` |
|
|
123
|
+
| `ResizableRegion` | `@kerfjs/ui/resizable-region` | `@kerfjs/ui/resizable-region.css` |
|
|
124
|
+
| `wireResizableRegions` | `@kerfjs/ui/wire-resizable-regions` | — |
|
|
125
|
+
| `AppTab` | `@kerfjs/ui/app-tab` | `@kerfjs/ui/app-tab.css` |
|
|
126
|
+
| `TabBar` | `@kerfjs/ui/tab-bar` | `@kerfjs/ui/tab-bar.css` |
|
|
127
|
+
| `wireTabBars`, `reorderTabs` | `@kerfjs/ui/wire-tab-bars` | — |
|
|
128
|
+
| `LoadingSpinner` | `@kerfjs/ui/loading-spinner` | `@kerfjs/ui/loading-spinner.css` |
|
|
129
|
+
| `Skeleton` | `@kerfjs/ui/skeleton` | `@kerfjs/ui/skeleton.css` |
|
|
130
|
+
| `Select` | `@kerfjs/ui/select` | `@kerfjs/ui/select.css` |
|
|
131
|
+
| `SegmentedControl` | `@kerfjs/ui/segmented-control` | `@kerfjs/ui/segmented-control.css` |
|
|
132
|
+
| `TokenSearchField`, `readTokenSearchField`, `placeTokenSearchCaret` | `@kerfjs/ui/token-search-field` | `@kerfjs/ui/token-search-field.css` |
|
|
133
|
+
| `wireTokenSearchFields` | `@kerfjs/ui/wire-token-search-fields` | — |
|
|
134
|
+
| `StateBanner` | `@kerfjs/ui/state-banner` | `@kerfjs/ui/state-banner.css` |
|
|
135
|
+
| `EmptyState` | `@kerfjs/ui/empty-state` | `@kerfjs/ui/empty-state.css` |
|
|
136
|
+
| `PanelHeader` | `@kerfjs/ui/panel-header` | `@kerfjs/ui/panel-header.css` |
|
|
137
|
+
| `ValueTable`, `ValueTableRow` | `@kerfjs/ui/value-table` | `@kerfjs/ui/value-table.css` |
|
|
124
138
|
|
|
125
139
|
`PanelHeader` is a plain `Toolbar` used as a panel, dialog, or page heading: an
|
|
126
140
|
optional icon control group (given a brand fill with a matching border), the
|
|
@@ -156,7 +170,21 @@ delivery and side effects, companion wiring, application-owned policy,
|
|
|
156
170
|
variants, accessibility obligations, public CSS hooks, routes, and current
|
|
157
171
|
documentation/recipe links. The adjacent
|
|
158
172
|
[`component-catalog.schema.json`](./ai/component-catalog.schema.json) describes
|
|
159
|
-
the versioned format.
|
|
173
|
+
the versioned format. Every visual entry also declares who owns its margin,
|
|
174
|
+
border, and padding, so a generator can fit it into Kerf's alignment model
|
|
175
|
+
without guessing from a screenshot or private CSS.
|
|
176
|
+
|
|
177
|
+
Applications and downstream design systems should publish the same facts for
|
|
178
|
+
their own components. Start from the reusable
|
|
179
|
+
[`component-catalog-extension.schema.json`](./ai/component-catalog-extension.schema.json)
|
|
180
|
+
and the checked
|
|
181
|
+
[`component-catalog-extension.json`](./docs/examples/component-catalog-extension.json)
|
|
182
|
+
example. Give each app-owned component or composition a stable id, selection
|
|
183
|
+
guidance, public hooks, and explicit geometry ownership; then concatenate its
|
|
184
|
+
`entries` with Kerf's shipped `entries` in the AI context. Keep package/source
|
|
185
|
+
identity alongside each input when ids could collide. This makes a combined
|
|
186
|
+
tool reason about both sides of a composition using one vocabulary without
|
|
187
|
+
pretending app-local components are `@kerfjs/ui` exports.
|
|
160
188
|
|
|
161
189
|
For code generation, pair catalog selection guidance with the checked-in
|
|
162
190
|
[`public-api-signatures-v1.md`](./ai/public-api-signatures-v1.md) declaration
|
|
@@ -240,10 +268,10 @@ Apps using Web Awesome's free components can opt into the same visual universe
|
|
|
240
268
|
with one CSS import:
|
|
241
269
|
|
|
242
270
|
```ts
|
|
243
|
-
import type {} from
|
|
244
|
-
import
|
|
245
|
-
import
|
|
246
|
-
import
|
|
271
|
+
import type {} from "@kerfjs/ui/webawesome";
|
|
272
|
+
import "@kerfjs/ui/webawesome.css";
|
|
273
|
+
import "@awesome.me/webawesome/dist/components/button/button.js";
|
|
274
|
+
import "@awesome.me/webawesome/dist/components/input/input.js";
|
|
247
275
|
```
|
|
248
276
|
|
|
249
277
|
The type-only `@kerfjs/ui/webawesome` import adds Kerf JSX intrinsic-element
|
|
@@ -269,7 +297,7 @@ classes for explicit appearance boundaries:
|
|
|
269
297
|
```css
|
|
270
298
|
:root {
|
|
271
299
|
--wa-color-brand-fill-loud: #7540a8;
|
|
272
|
-
--wa-form-control-border-radius: .5rem;
|
|
300
|
+
--wa-form-control-border-radius: 0.5rem;
|
|
273
301
|
}
|
|
274
302
|
```
|
|
275
303
|
|
|
@@ -309,8 +337,8 @@ standalone `filled`/`outlined` appearance with `shape="rounded"` or
|
|
|
309
337
|
appearance="toolbar"
|
|
310
338
|
shape="pill"
|
|
311
339
|
choices={[
|
|
312
|
-
{ value:
|
|
313
|
-
{ value:
|
|
340
|
+
{ value: "list", label: "List" },
|
|
341
|
+
{ value: "columns", label: "Columns" },
|
|
314
342
|
]}
|
|
315
343
|
/>
|
|
316
344
|
```
|
|
@@ -364,8 +392,8 @@ close button retains all close interaction.
|
|
|
364
392
|
`Select` uses Web Awesome but does not register anything by itself. Install the optional peer, import the shared theme if desired, and explicitly import the registration entry in the application:
|
|
365
393
|
|
|
366
394
|
```ts
|
|
367
|
-
import
|
|
368
|
-
import
|
|
395
|
+
import "@kerfjs/ui/webawesome.css";
|
|
396
|
+
import "@kerfjs/ui/select/register";
|
|
369
397
|
```
|
|
370
398
|
|
|
371
399
|
That boundary keeps Web Awesome and its custom-element side effects out of bundles that use unrelated components. Automated consumer-bundle tests enforce it.
|
|
@@ -400,8 +428,9 @@ than default patterns. The detailed rationale lives in the theme contract.
|
|
|
400
428
|
|
|
401
429
|
Run `npm run dev` from this directory for the category-grouped master/detail catalog. Every public visual component has a focused route; all 70 free Web Awesome 3.12 components have focused routes under the collapsible ecosystem section. Every detail visibly links its first-party demo source and existing guidance while showing the repository-relative paths; first-party components also link their implementation source, and Web Awesome entries label local guidance as Kerf integration guidance. One grouped `Related components` selector contains derived `Uses` / `Used by` navigation across both sets. Run `npm run check` for static/unit/bundle gates and `npm run test:e2e` for the real-browser suite.
|
|
402
430
|
|
|
403
|
-
Run `npm run format
|
|
404
|
-
|
|
431
|
+
Run `npm run format` after editing source or structured content. The narrower
|
|
432
|
+
`npm run format:css` command remains available for style-only work. The normal
|
|
433
|
+
`npm run lint` and `npm run check` gates use Prettier to reject formatting drift.
|
|
405
434
|
|
|
406
435
|
For dimensions that should scale with the root font size, author pixels with
|
|
407
436
|
`remify()`: `gap: remify(17px)` builds to `gap: 1.0625rem` using a fixed 16px
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/brianwestphal/kerf/main/ui/ai/component-catalog-extension.schema.json",
|
|
4
|
+
"title": "Kerf UI consumer component catalog extension",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "package", "description", "entries"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": { "type": "string" },
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"package": { "type": "string", "minLength": 1 },
|
|
11
|
+
"description": { "type": "string", "minLength": 1 },
|
|
12
|
+
"entries": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "$ref": "#/$defs/entry" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"$defs": {
|
|
19
|
+
"entry": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": [
|
|
22
|
+
"id",
|
|
23
|
+
"name",
|
|
24
|
+
"kind",
|
|
25
|
+
"purpose",
|
|
26
|
+
"useWhen",
|
|
27
|
+
"avoidWhen",
|
|
28
|
+
"geometry"
|
|
29
|
+
],
|
|
30
|
+
"properties": {
|
|
31
|
+
"id": { "type": "string", "minLength": 1 },
|
|
32
|
+
"name": { "type": "string", "minLength": 1 },
|
|
33
|
+
"kind": { "enum": ["component", "composition"] },
|
|
34
|
+
"purpose": { "type": "string", "minLength": 1 },
|
|
35
|
+
"useWhen": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string" },
|
|
38
|
+
"minItems": 1
|
|
39
|
+
},
|
|
40
|
+
"avoidWhen": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": { "type": "string" },
|
|
43
|
+
"minItems": 1
|
|
44
|
+
},
|
|
45
|
+
"publicClasses": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": { "type": "string" },
|
|
48
|
+
"uniqueItems": true
|
|
49
|
+
},
|
|
50
|
+
"publicTokens": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": { "type": "string" },
|
|
53
|
+
"uniqueItems": true
|
|
54
|
+
},
|
|
55
|
+
"geometry": { "$ref": "#/$defs/geometry" },
|
|
56
|
+
"documentation": { "type": "string", "minLength": 1 }
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
},
|
|
60
|
+
"geometry": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"required": ["margin", "border", "padding"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"margin": { "$ref": "#/$defs/geometryOwner" },
|
|
65
|
+
"border": { "$ref": "#/$defs/geometryOwner" },
|
|
66
|
+
"padding": { "$ref": "#/$defs/geometryOwner" },
|
|
67
|
+
"notes": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string", "minLength": 1 },
|
|
70
|
+
"minItems": 1
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
},
|
|
75
|
+
"geometryOwner": {
|
|
76
|
+
"enum": ["self", "parent", "child", "none", "conditional"]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|