@kerfjs/ui 5.0.0-beta.17 → 5.0.0-beta.21

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 (274) hide show
  1. package/README.md +221 -81
  2. package/ai/application-ui-diagnostic-ids-v1.json +92 -0
  3. package/ai/application-ui-profile-sync.cjs +529 -0
  4. package/ai/application-ui-profile.d.mts +1 -0
  5. package/ai/application-ui-profile.d.ts +102 -0
  6. package/ai/application-ui-profile.defaults.json +41 -0
  7. package/ai/application-ui-profile.mjs +626 -0
  8. package/ai/application-ui-profile.schema.json +130 -0
  9. package/ai/catalog-authoring.json +25 -0
  10. package/ai/catalog-authoring.schema.json +61 -0
  11. package/ai/compile-time-contracts-v1.json +101 -0
  12. package/ai/compile-time-contracts-v1.schema.json +49 -0
  13. package/ai/component-catalog-extension-v2.d.ts +7 -0
  14. package/ai/component-catalog-extension-v2.schema.json +7 -0
  15. package/ai/component-catalog-extension.schema.json +79 -0
  16. package/ai/component-catalog-v2-overrides.json +326 -0
  17. package/ai/component-catalog-v2.d.ts +67 -0
  18. package/ai/component-catalog-v2.json +4441 -0
  19. package/ai/component-catalog-v2.schema.json +246 -0
  20. package/ai/component-catalog.json +649 -6
  21. package/ai/component-catalog.schema.json +15 -0
  22. package/ai/public-api-signatures-v1.md +357 -91
  23. package/ai/skill.md +95 -50
  24. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  25. package/analyzer/cli.mjs +46 -0
  26. package/analyzer/index.d.mts +45 -0
  27. package/analyzer/index.mjs +743 -0
  28. package/analyzer/report.schema.json +66 -0
  29. package/dist/app-tab.d.ts +1 -1
  30. package/dist/app-tab.js +1 -1
  31. package/dist/browser/pane.js +3 -0
  32. package/dist/browser/sunken-panel.js +3 -0
  33. package/dist/catalog-resources.d.ts +34 -0
  34. package/dist/catalog-resources.js +22 -0
  35. package/dist/catalog-resources.js.map +1 -0
  36. package/dist/catalog.d.ts +29 -4
  37. package/dist/catalog.js +302 -84
  38. package/dist/catalog.js.map +1 -1
  39. package/dist/chunk-5VTB2BKP.js +35 -0
  40. package/dist/chunk-5VTB2BKP.js.map +1 -0
  41. package/dist/chunk-6WTETUZ6.js +21 -0
  42. package/dist/chunk-6WTETUZ6.js.map +1 -0
  43. package/dist/chunk-7KEUJIIC.js +218 -0
  44. package/dist/chunk-7KEUJIIC.js.map +1 -0
  45. package/dist/chunk-7L6EHUMV.js +31 -0
  46. package/dist/chunk-7L6EHUMV.js.map +1 -0
  47. package/dist/{chunk-XXMOARTH.js → chunk-AASLYRGE.js} +57 -16
  48. package/dist/chunk-AASLYRGE.js.map +1 -0
  49. package/dist/chunk-BBRXX6PF.js +108 -0
  50. package/dist/chunk-BBRXX6PF.js.map +1 -0
  51. package/dist/{chunk-6NLRBSVX.js → chunk-CN2XNTAM.js} +129 -72
  52. package/dist/chunk-CN2XNTAM.js.map +1 -0
  53. package/dist/chunk-DPDBVKNA.js +113 -0
  54. package/dist/chunk-DPDBVKNA.js.map +1 -0
  55. package/dist/chunk-DSNIYOZ3.js +114 -0
  56. package/dist/chunk-DSNIYOZ3.js.map +1 -0
  57. package/dist/chunk-ELSJX4W7.js +68 -0
  58. package/dist/chunk-ELSJX4W7.js.map +1 -0
  59. package/dist/{chunk-AHQI52QO.js → chunk-FEY65TBV.js} +6 -2
  60. package/dist/chunk-FEY65TBV.js.map +1 -0
  61. package/dist/chunk-JRKSK2HX.js +79 -0
  62. package/dist/chunk-JRKSK2HX.js.map +1 -0
  63. package/dist/chunk-K57KRAOV.js +117 -0
  64. package/dist/chunk-K57KRAOV.js.map +1 -0
  65. package/dist/chunk-LPOMRC4C.js +25 -0
  66. package/dist/chunk-LPOMRC4C.js.map +1 -0
  67. package/dist/chunk-M7JBER5U.js +41 -0
  68. package/dist/chunk-M7JBER5U.js.map +1 -0
  69. package/dist/chunk-NENBUYX5.js +79 -0
  70. package/dist/chunk-NENBUYX5.js.map +1 -0
  71. package/dist/chunk-OHU6CI22.js +83 -0
  72. package/dist/chunk-OHU6CI22.js.map +1 -0
  73. package/dist/{chunk-YGN7OMLT.js → chunk-OZWU5ZPZ.js} +2 -2
  74. package/dist/chunk-OZWU5ZPZ.js.map +1 -0
  75. package/dist/chunk-PIDTEQ3U.js +105 -0
  76. package/dist/chunk-PIDTEQ3U.js.map +1 -0
  77. package/dist/chunk-PX3YSS5C.js +32 -0
  78. package/dist/chunk-PX3YSS5C.js.map +1 -0
  79. package/dist/chunk-PZQVSDLH.js +61 -0
  80. package/dist/chunk-PZQVSDLH.js.map +1 -0
  81. package/dist/chunk-QO55FN2Y.js +20 -0
  82. package/dist/chunk-QO55FN2Y.js.map +1 -0
  83. package/dist/chunk-QQFJMRIB.js +45 -0
  84. package/dist/chunk-QQFJMRIB.js.map +1 -0
  85. package/dist/chunk-RYRIFZCT.js +58 -0
  86. package/dist/chunk-RYRIFZCT.js.map +1 -0
  87. package/dist/{chunk-7BR3DO2A.js → chunk-SRSJO5QE.js} +13 -4
  88. package/dist/chunk-SRSJO5QE.js.map +1 -0
  89. package/dist/chunk-VLYV65LK.js +38 -0
  90. package/dist/chunk-VLYV65LK.js.map +1 -0
  91. package/dist/chunk-W4CXQYSG.js +23 -0
  92. package/dist/chunk-W4CXQYSG.js.map +1 -0
  93. package/dist/{chunk-WXMGNX2Y.js → chunk-W7YD6E4N.js} +2 -2
  94. package/dist/chunk-W7YD6E4N.js.map +1 -0
  95. package/dist/{chunk-56RJXPHG.js → chunk-Y6LYKFXY.js} +1 -1
  96. package/dist/{chunk-56RJXPHG.js.map → chunk-Y6LYKFXY.js.map} +1 -1
  97. package/dist/collapsible-panel.d.ts +2 -2
  98. package/dist/collapsible-panel.js +47 -6
  99. package/dist/collapsible-panel.js.map +1 -1
  100. package/dist/device-class.js +33 -5
  101. package/dist/device-class.js.map +1 -1
  102. package/dist/disclosure-arrow.js +1 -1
  103. package/dist/empty-state.d.ts +1 -1
  104. package/dist/empty-state.js +1 -1
  105. package/dist/floating-toolbar.d.ts +1 -1
  106. package/dist/floating-toolbar.js +1 -1
  107. package/dist/index.d.ts +6 -4
  108. package/dist/index.js +27 -25
  109. package/dist/list-action-row.d.ts +1 -1
  110. package/dist/list-action-row.js +1 -1
  111. package/dist/list-header.d.ts +30 -9
  112. package/dist/list-header.js +1 -1
  113. package/dist/list-inset-control.d.ts +1 -1
  114. package/dist/list-inset-control.js +1 -1
  115. package/dist/list-inset-text.d.ts +1 -1
  116. package/dist/list-inset-text.js +1 -1
  117. package/dist/list-item.d.ts +1 -1
  118. package/dist/list-item.js +1 -1
  119. package/dist/loading-spinner.js +1 -1
  120. package/dist/nav-stack.d.ts +1 -1
  121. package/dist/nav-stack.js +1 -1
  122. package/dist/pane.d.ts +49 -0
  123. package/dist/pane.js +4 -0
  124. package/dist/pane.js.map +1 -0
  125. package/dist/panel-header.d.ts +10 -4
  126. package/dist/panel-header.js +1 -1
  127. package/dist/resizable-region.d.ts +1 -1
  128. package/dist/resizable-region.js +1 -1
  129. package/dist/segmented-control.d.ts +6 -6
  130. package/dist/segmented-control.js +1 -1
  131. package/dist/select.d.ts +11 -5
  132. package/dist/select.js +1 -1
  133. package/dist/skeleton.d.ts +1 -1
  134. package/dist/skeleton.js +1 -1
  135. package/dist/split-view.d.ts +1 -1
  136. package/dist/split-view.js +70 -10
  137. package/dist/split-view.js.map +1 -1
  138. package/dist/state-banner.d.ts +4 -3
  139. package/dist/state-banner.js +1 -1
  140. package/dist/styles/catalog.css +32 -6
  141. package/dist/styles/layout.css +2 -20
  142. package/dist/styles/pane.css +62 -0
  143. package/dist/styles/segmented-control.css +3 -7
  144. package/dist/styles/sunken-panel.css +18 -0
  145. package/dist/sunken-panel.d.ts +16 -0
  146. package/dist/sunken-panel.js +3 -0
  147. package/dist/sunken-panel.js.map +1 -0
  148. package/dist/tab-bar.d.ts +4 -3
  149. package/dist/tab-bar.js +1 -1
  150. package/dist/tab-scaffold.d.ts +6 -6
  151. package/dist/tab-scaffold.js +43 -8
  152. package/dist/tab-scaffold.js.map +1 -1
  153. package/dist/token-search-field.d.ts +25 -9
  154. package/dist/token-search-field.js +1 -1
  155. package/dist/toolbar-control-group.d.ts +10 -6
  156. package/dist/toolbar-control-group.js +1 -1
  157. package/dist/toolbar-text.d.ts +10 -11
  158. package/dist/toolbar-text.js +1 -1
  159. package/dist/toolbar.d.ts +1 -1
  160. package/dist/toolbar.js +1 -1
  161. package/dist/value-table.d.ts +2 -2
  162. package/dist/value-table.js +1 -1
  163. package/dist/wire-catalog.d.ts +31 -2
  164. package/dist/wire-catalog.js +203 -8
  165. package/dist/wire-catalog.js.map +1 -1
  166. package/dist/wire-nav-stack.js +22 -7
  167. package/dist/wire-nav-stack.js.map +1 -1
  168. package/dist/wire-resizable-regions.d.ts +1 -1
  169. package/dist/wire-resizable-regions.js +1 -1
  170. package/dist/wire-sidebar.js +52 -41
  171. package/dist/wire-sidebar.js.map +1 -1
  172. package/dist/wire-tab-bars.d.ts +5 -2
  173. package/dist/wire-tab-bars.js +1 -1
  174. package/dist/wire-tab-scaffold.js +9 -4
  175. package/dist/wire-tab-scaffold.js.map +1 -1
  176. package/dist/wire-token-search-fields.d.ts +12 -7
  177. package/dist/wire-token-search-fields.js +1 -1
  178. package/dist/workbench.d.ts +1 -1
  179. package/dist/workbench.js +56 -9
  180. package/dist/workbench.js.map +1 -1
  181. package/docs/app-layouts.md +7 -7
  182. package/docs/catalog.md +249 -46
  183. package/docs/collapsible-panel.md +38 -11
  184. package/docs/component-contract.md +132 -7
  185. package/docs/component-selection.md +79 -67
  186. package/docs/design/templates.md +1 -1
  187. package/docs/design-philosophy.md +7 -9
  188. package/docs/device-class.md +8 -8
  189. package/docs/examples/application-ui-profile.json +60 -0
  190. package/docs/examples/command-palette-adapter.tsx +67 -17
  191. package/docs/examples/component-catalog-extension-v2.json +81 -0
  192. package/docs/examples/component-catalog-extension.json +45 -0
  193. package/docs/layout.md +51 -32
  194. package/docs/nav-stack.md +15 -6
  195. package/docs/recipes.md +4 -4
  196. package/docs/split-view.md +3 -3
  197. package/docs/sunken-panel.md +43 -0
  198. package/docs/tab-scaffold.md +16 -7
  199. package/docs/type-contracts.md +99 -0
  200. package/docs/ui-analyzer.md +81 -0
  201. package/docs/ui-doctor.md +77 -0
  202. package/docs/ui-evaluator.md +122 -0
  203. package/docs/webawesome-theme.md +8 -8
  204. package/docs/workbench.md +18 -5
  205. package/doctor/cli.mjs +115 -0
  206. package/doctor/config.schema.json +68 -0
  207. package/doctor/index.d.mts +116 -0
  208. package/doctor/index.mjs +1256 -0
  209. package/doctor/report.schema.json +118 -0
  210. package/evaluator/cli.mjs +89 -0
  211. package/evaluator/index.d.mts +90 -0
  212. package/evaluator/index.mjs +1138 -0
  213. package/evaluator/report.schema.json +152 -0
  214. package/llms.txt +58 -15
  215. package/package.json +70 -10
  216. package/ux-demo/recipes/app-shell.tsx +206 -10
  217. package/ux-demo/recipes/collapsible-sidebar.tsx +167 -44
  218. package/ux-demo/recipes/compact-toolbar.tsx +114 -12
  219. package/ux-demo/recipes/composer-form.tsx +106 -18
  220. package/ux-demo/recipes/list-detail-dialog.tsx +144 -8
  221. package/ux-demo/recipes/list-workspace-states.tsx +165 -8
  222. package/ux-demo/recipes/loaders.ts +5 -2
  223. package/ux-demo/recipes/loading-inspector.tsx +124 -41
  224. package/ux-demo/recipes/mount-recipe.ts +27 -6
  225. package/ux-demo/recipes/navigation-sidebar.tsx +120 -9
  226. package/ux-demo/recipes/navigation-stack.tsx +61 -19
  227. package/ux-demo/recipes/types.ts +3 -1
  228. package/ux-demo/recipes/workspace-header.tsx +57 -2
  229. package/dist/chunk-2Z5TWHKQ.js +0 -34
  230. package/dist/chunk-2Z5TWHKQ.js.map +0 -1
  231. package/dist/chunk-37T3VNIZ.js +0 -19
  232. package/dist/chunk-37T3VNIZ.js.map +0 -1
  233. package/dist/chunk-55DATV3A.js +0 -10
  234. package/dist/chunk-55DATV3A.js.map +0 -1
  235. package/dist/chunk-5ATCDSQS.js +0 -42
  236. package/dist/chunk-5ATCDSQS.js.map +0 -1
  237. package/dist/chunk-5E2HVJ33.js +0 -10
  238. package/dist/chunk-5E2HVJ33.js.map +0 -1
  239. package/dist/chunk-6NLRBSVX.js.map +0 -1
  240. package/dist/chunk-7BR3DO2A.js.map +0 -1
  241. package/dist/chunk-7JB7VPRI.js +0 -34
  242. package/dist/chunk-7JB7VPRI.js.map +0 -1
  243. package/dist/chunk-7LDCTU7D.js +0 -134
  244. package/dist/chunk-7LDCTU7D.js.map +0 -1
  245. package/dist/chunk-AHQI52QO.js.map +0 -1
  246. package/dist/chunk-AQNKJRFH.js +0 -79
  247. package/dist/chunk-AQNKJRFH.js.map +0 -1
  248. package/dist/chunk-AVZHJN6C.js +0 -14
  249. package/dist/chunk-AVZHJN6C.js.map +0 -1
  250. package/dist/chunk-B24C4A6T.js +0 -22
  251. package/dist/chunk-B24C4A6T.js.map +0 -1
  252. package/dist/chunk-CH4SQ6H5.js +0 -39
  253. package/dist/chunk-CH4SQ6H5.js.map +0 -1
  254. package/dist/chunk-DAFFDO33.js +0 -14
  255. package/dist/chunk-DAFFDO33.js.map +0 -1
  256. package/dist/chunk-I7INRJO4.js +0 -17
  257. package/dist/chunk-I7INRJO4.js.map +0 -1
  258. package/dist/chunk-L4OKFDJY.js +0 -24
  259. package/dist/chunk-L4OKFDJY.js.map +0 -1
  260. package/dist/chunk-M5JRI6MN.js +0 -27
  261. package/dist/chunk-M5JRI6MN.js.map +0 -1
  262. package/dist/chunk-RNPGFQ33.js +0 -10
  263. package/dist/chunk-RNPGFQ33.js.map +0 -1
  264. package/dist/chunk-VPCTCUED.js +0 -10
  265. package/dist/chunk-VPCTCUED.js.map +0 -1
  266. package/dist/chunk-WRTAQ7BZ.js +0 -23
  267. package/dist/chunk-WRTAQ7BZ.js.map +0 -1
  268. package/dist/chunk-WVPYVDXY.js +0 -15
  269. package/dist/chunk-WVPYVDXY.js.map +0 -1
  270. package/dist/chunk-WXMGNX2Y.js.map +0 -1
  271. package/dist/chunk-XXMOARTH.js.map +0 -1
  272. package/dist/chunk-YGN7OMLT.js.map +0 -1
  273. package/dist/chunk-ZQQ6P4SV.js +0 -20
  274. package/dist/chunk-ZQQ6P4SV.js.map +0 -1
@@ -0,0 +1,152 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/brianwestphal/kerf/main/ui/evaluator/report.schema.json",
4
+ "title": "Kerf UI browser evaluation report",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "tool",
9
+ "target",
10
+ "recordedAt",
11
+ "profileFiles",
12
+ "contexts",
13
+ "diagnostics",
14
+ "summary",
15
+ "artifacts",
16
+ "subjectiveReview"
17
+ ],
18
+ "additionalProperties": false,
19
+ "properties": {
20
+ "schemaVersion": { "const": 1 },
21
+ "tool": {
22
+ "type": "object",
23
+ "required": ["name", "reportVersion"],
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "name": { "const": "@kerfjs/ui/evaluator" },
27
+ "reportVersion": { "const": 1 }
28
+ }
29
+ },
30
+ "target": {
31
+ "type": "object",
32
+ "required": ["url"],
33
+ "additionalProperties": false,
34
+ "properties": { "url": { "type": "string", "minLength": 1 } }
35
+ },
36
+ "recordedAt": { "type": "string", "format": "date-time" },
37
+ "profileFiles": { "$ref": "#/$defs/stringList" },
38
+ "contexts": {
39
+ "type": "array",
40
+ "minItems": 1,
41
+ "items": { "$ref": "#/$defs/context" }
42
+ },
43
+ "diagnostics": {
44
+ "type": "array",
45
+ "items": { "$ref": "#/$defs/diagnostic" }
46
+ },
47
+ "summary": { "$ref": "#/$defs/summary" },
48
+ "artifacts": {
49
+ "type": "object",
50
+ "required": ["retention", "files"],
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "retention": { "enum": ["always", "on-failure", "never"] },
54
+ "files": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "required": ["path", "sha256"],
59
+ "additionalProperties": false,
60
+ "properties": {
61
+ "path": { "type": "string", "minLength": 1 },
62
+ "sha256": {
63
+ "type": "string",
64
+ "pattern": "^[a-f0-9]{64}$"
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ },
71
+ "subjectiveReview": {
72
+ "type": "object",
73
+ "required": ["status", "rubric", "ratings", "note"],
74
+ "additionalProperties": false,
75
+ "properties": {
76
+ "status": { "const": "not-recorded" },
77
+ "rubric": {
78
+ "type": "array",
79
+ "minItems": 6,
80
+ "items": {
81
+ "type": "object",
82
+ "required": ["id", "prompt"],
83
+ "additionalProperties": false,
84
+ "properties": {
85
+ "id": { "type": "string", "minLength": 1 },
86
+ "prompt": { "type": "string", "minLength": 1 }
87
+ }
88
+ }
89
+ },
90
+ "ratings": { "type": "array", "maxItems": 0 },
91
+ "note": { "type": "string", "minLength": 1 }
92
+ }
93
+ }
94
+ },
95
+ "$defs": {
96
+ "stringList": {
97
+ "type": "array",
98
+ "items": { "type": "string", "minLength": 1 },
99
+ "uniqueItems": true
100
+ },
101
+ "summary": {
102
+ "type": "object",
103
+ "required": ["errors", "warnings", "passed"],
104
+ "additionalProperties": false,
105
+ "properties": {
106
+ "errors": { "type": "integer", "minimum": 0 },
107
+ "warnings": { "type": "integer", "minimum": 0 },
108
+ "passed": { "type": "boolean" }
109
+ }
110
+ },
111
+ "context": {
112
+ "type": "object",
113
+ "required": [
114
+ "id",
115
+ "browser",
116
+ "width",
117
+ "height",
118
+ "zoom",
119
+ "colorScheme",
120
+ "reducedMotion",
121
+ "evidence",
122
+ "summary"
123
+ ],
124
+ "additionalProperties": false,
125
+ "properties": {
126
+ "id": { "type": "string", "minLength": 1 },
127
+ "browser": { "enum": ["chromium", "firefox", "webkit"] },
128
+ "width": { "type": "integer", "minimum": 1 },
129
+ "height": { "type": "integer", "minimum": 1 },
130
+ "zoom": { "type": "number", "minimum": 1 },
131
+ "colorScheme": { "enum": ["light", "dark"] },
132
+ "reducedMotion": { "enum": ["reduce", "no-preference"] },
133
+ "evidence": { "type": "object" },
134
+ "summary": { "$ref": "#/$defs/summary" }
135
+ }
136
+ },
137
+ "diagnostic": {
138
+ "type": "object",
139
+ "required": ["code", "severity", "context", "message"],
140
+ "additionalProperties": false,
141
+ "properties": {
142
+ "code": { "type": "string", "pattern": "^KUI-B[0-9]{3}$" },
143
+ "severity": { "enum": ["error", "warning"] },
144
+ "context": { "type": "string", "minLength": 1 },
145
+ "message": { "type": "string", "minLength": 1 },
146
+ "repair": { "type": "string", "minLength": 1 },
147
+ "selector": { "type": "string", "minLength": 1 },
148
+ "evidence": {}
149
+ }
150
+ }
151
+ }
152
+ }
package/llms.txt CHANGED
@@ -6,7 +6,7 @@
6
6
  > generate correct, good-looking kerf UI — it is not a catalog to browse.
7
7
 
8
8
  ```bash
9
- npm install kerfjs @kerfjs/ui # kerfjs is a peer; Web Awesome is an optional peer
9
+ npm install kerfjs @kerfjs/ui # kerfjs is a peer; Web Awesome is an optional peer
10
10
  ```
11
11
 
12
12
  Import each component from its own subpath (`@kerfjs/ui/list-item`, `@kerfjs/ui/toolbar`,
@@ -22,15 +22,51 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
22
22
  [public-api-signatures-v1.md](./ai/public-api-signatures-v1.md) (real prop names,
23
23
  callback shapes, disposer return types).
24
24
  3. **For exhaustive, structured facts** (ids, exports, variants, `publicClasses`,
25
- relationships, side effects) load the
25
+ relationships, side effects, and geometry ownership) load the
26
26
  [Machine-readable component catalog](./ai/component-catalog.json) — the
27
- canonical checked-in source; its schema is alongside it.
28
- 4. **Apply the rules below and in** [skill.md](./ai/skill.md).
27
+ canonical checked-in source; its schema is alongside it. Also load the
28
+ consuming application's catalog extension when present; generate one from the
29
+ [Consumer catalog extension schema](./ai/component-catalog-extension.schema.json)
30
+ when app-owned components must participate in selection or alignment.
31
+ Load the [Composition catalog v2](./ai/component-catalog-v2.json) to
32
+ mechanically evaluate parents, contexts, zones/cardinality, children, state,
33
+ wiring, responsive/layout/accessibility rules, and public boundaries. V1
34
+ remains compatible; v2 joins catalogs by `package:id`. Consumer v2 catalogs
35
+ use [the v2 extension schema](./ai/component-catalog-extension-v2.schema.json).
36
+ Load [compile-time contracts](./ai/compile-time-contracts-v1.json) for stable
37
+ `KUI-T###` ids, exact declaration symbols, and the boundary between rejected
38
+ source states and relationships that still require runtime/catalog checks.
39
+ Before generating application UI, discover `.kerf-ui-profile.json` with the
40
+ shipped [application profile API](./ai/application-ui-profile.mjs). Merge
41
+ package defaults, workspace policy, then parent-to-child directory policy;
42
+ honor its package-qualified preferences, approved theme/density, semantic
43
+ tokens, layout conventions, and narrow source-located exceptions. Validation
44
+ is catalog-aware per layer, including parent values later overridden by a
45
+ child; synchronous hosts use [application-ui-profile-sync.cjs](./ai/application-ui-profile-sync.cjs).
46
+ See the
47
+ [workspace profile example](./docs/examples/application-ui-profile.json).
48
+ 4. **When authoring a component gallery**, load
49
+ [catalog-authoring.json](./ai/catalog-authoring.json), then follow its
50
+ authoritative [Catalog demo authoring contract](./docs/catalog.md#catalog-demo-authoring-contract).
51
+ 5. **Apply the rules below and in** [skill.md](./ai/skill.md).
52
+ 6. **Before calling an integration complete**, run
53
+ [`kerf-ui-doctor`](./docs/ui-doctor.md). Its portable JSON report merges
54
+ profile/catalog, TypeScript, Kerf ESLint, and static analyzer diagnostics;
55
+ repair source-located errors until exit 0. Use full mode for release gates.
56
+ [`kerf-ui-analyze`](./docs/ui-analyzer.md) remains available when only static
57
+ layout diagnostics are wanted; its review findings are a bounded human/AI
58
+ review queue rather than an objective aesthetic score.
59
+ 7. **Evaluate the running application** by explicitly enabling the doctor's
60
+ browser stage or directly invoking
61
+ [`kerf-ui-evaluate`](./docs/ui-evaluator.md). Preserve its `KUI-B###`
62
+ browser evidence and screenshots; record hierarchy/rhythm/density/aesthetic
63
+ ratings separately with a named reviewer rather than presenting them as
64
+ objective assertions.
29
65
 
30
66
  ## Core rules (do the right thing)
31
67
 
32
68
  - **Reach for the primitive, not for CSS.** The package is built to look right
33
- *unstyled*. Before adding `padding`, `margin`, `width`, `height`, `border`,
69
+ _unstyled_. Before adding `padding`, `margin`, `width`, `height`, `border`,
34
70
  `background`, a wrapper card, or a decoration, check whether the component, the
35
71
  pane, or the content-item already owns it — it almost always does. Prefer a
36
72
  component prop or a `--kui-*` token; write CSS only for genuinely new structure,
@@ -69,7 +105,7 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
69
105
  popup menu. A toolbar popup menu is a `single` `ToolbarControlGroup` around a
70
106
  `wa-dropdown` (its `slot="trigger"` `wa-button` is the toolbar button, kept under
71
107
  `data-morph-skip-children`).
72
- - **`PanelHeader` is *the* panel/dialog/page heading.** A plain toolbar with an
108
+ - **`PanelHeader` is _the_ panel/dialog/page heading.** A plain toolbar with an
73
109
  optional bordered icon group, an extra-large `ToolbarText` title, the trailing
74
110
  controls you pass, and an optional subtitle below — do not hand-build a heading
75
111
  row or restyle a toolbar into one.
@@ -90,7 +126,7 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
90
126
  - **App state is domain/persisted; helpers own only ephemeral mechanics.** Keep
91
127
  navigation stacks, tab selection and order, pane sizes, and `collapsed`/`expanded`
92
128
  disclosure flags in the app — they are data or persisted layout, and the app reads
93
- them to render. The `wire…` helpers own the *ephemeral* parts: `wireNavStack` the
129
+ them to render. The `wire…` helpers own the _ephemeral_ parts: `wireNavStack` the
94
130
  push/pop animation, `wireTabBars` the overflow autoscroll and drag preview,
95
131
  `wireResizableRegions` the live drag preview; they report committed changes via
96
132
  callbacks. The one richer case is `wireTokenSearchFields`, which manages the
@@ -128,13 +164,19 @@ tree-shakeable, declarative with `wire…` helpers, each with a companion CSS im
128
164
  `NavStack`, `SplitView`, `Workbench`, `TabScaffold`, driven by `deviceClass()` from
129
165
  `@kerfjs/ui/device-class`. For a standalone collapsible rail/drawer outside a full
130
166
  shell, `@kerfjs/ui/collapsible-panel` (`CollapsiblePanel`, `CollapsiblePanelToggle`)
131
- + `@kerfjs/ui/wire-sidebar` (`wireSidebar`: toggle, focus, compact overlay, persistence).
132
- `@kerfjs/ui/catalog` is another opt-in shell a
133
- `Catalog` component + `wireCatalog` helper for building a component-gallery catalog
134
- (collapsible category sidebar + preview stage + resources footer) from your own
135
- entries; controlled/stateless like the layouts. `@kerfjs/ui/webawesome` is a
136
- type-only boundary for `wa-*` JSX; `@kerfjs/ui/select/register` and the CSS are the
137
- declared side effects.
167
+
168
+ - `@kerfjs/ui/wire-sidebar` (`wireSidebar`: toggle, focus, compact overlay, persistence).
169
+ `@kerfjs/ui/catalog` is another opt-in shell a
170
+ `Catalog` component + `wireCatalog` helper for building a component-gallery catalog
171
+ (collapsible category sidebar + preview stage + resources footer, with an opt-in
172
+ transparent-bound and margin geometry overlay plus focus-preserving active-row
173
+ reveal for long desktop sidebars) from your own
174
+ entries; controlled/stateless like the layouts. For any Catalog demo, follow
175
+ the [authoritative authoring contract](./docs/catalog.md#catalog-demo-authoring-contract)
176
+ rather than inferring structure from the shell or private CSS.
177
+ `@kerfjs/ui/webawesome` is a
178
+ type-only boundary for `wa-*` JSX; `@kerfjs/ui/select/register` and the CSS are the
179
+ declared side effects.
138
180
 
139
181
  ## Reference
140
182
 
@@ -146,5 +188,6 @@ declared side effects.
146
188
  - [recipes.md](./docs/recipes.md): production compositions (app shell, list-detail dialog, composer form, …) as copyable references.
147
189
  - [app-layouts.md](./docs/app-layouts.md): choosing `NavStack`/`SplitView`/`Workbench`/`TabScaffold` by data + interaction + device, and dialog presentation.
148
190
  - [webawesome-theme.md](./docs/webawesome-theme.md): the optional Web Awesome theme; catalog coverage means themed-and-supported, not preferred (prefer the Kerf primitive when one exists). The UX sidebar visibly tags superseded and exceptional Web Awesome choices as `Discouraged`; Popup remains an available conditional positioning primitive.
149
- - [component-catalog.json](./ai/component-catalog.json) + [public-api-signatures-v1.md](./ai/public-api-signatures-v1.md) + [webawesome-jsx-signatures-v1.md](./ai/webawesome-jsx-signatures-v1.md): machine-readable facts and exact signatures.
191
+ - [component-catalog.json](./ai/component-catalog.json) + [component-catalog-extension.schema.json](./ai/component-catalog-extension.schema.json) + [catalog-authoring.json](./ai/catalog-authoring.json) + [public-api-signatures-v1.md](./ai/public-api-signatures-v1.md) + [webawesome-jsx-signatures-v1.md](./ai/webawesome-jsx-signatures-v1.md): machine-readable selection facts, a reusable app-component extension contract, Catalog authoring discovery, and exact signatures.
192
+ - [compile-time-contracts-v1.json](./ai/compile-time-contracts-v1.json) + [type-contracts.md](./docs/type-contracts.md): stable compile diagnostics, packed-declaration proof, migrations, and explicit non-goals.
150
193
  - [README.md](./README.md): package overview and the component subpath table.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerfjs/ui",
3
- "version": "5.0.0-beta.17",
3
+ "version": "5.0.0-beta.21",
4
4
  "description": "Accessible, composable UI primitives for kerf applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,6 +27,11 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
+ "bin": {
31
+ "kerf-ui-analyze": "./analyzer/cli.mjs",
32
+ "kerf-ui-doctor": "./doctor/cli.mjs",
33
+ "kerf-ui-evaluate": "./evaluator/cli.mjs"
34
+ },
30
35
  "main": "./dist/index.js",
31
36
  "types": "./dist/index.d.ts",
32
37
  "sideEffects": [
@@ -116,6 +121,26 @@
116
121
  "types": "./dist/catalog.d.ts",
117
122
  "import": "./dist/catalog.js"
118
123
  },
124
+ "./catalog-resources": {
125
+ "types": "./dist/catalog-resources.d.ts",
126
+ "import": "./dist/catalog-resources.js"
127
+ },
128
+ "./analyzer": {
129
+ "types": "./analyzer/index.d.mts",
130
+ "import": "./analyzer/index.mjs"
131
+ },
132
+ "./analyzer/report.schema.json": "./analyzer/report.schema.json",
133
+ "./doctor": {
134
+ "types": "./doctor/index.d.mts",
135
+ "import": "./doctor/index.mjs"
136
+ },
137
+ "./doctor/config.schema.json": "./doctor/config.schema.json",
138
+ "./doctor/report.schema.json": "./doctor/report.schema.json",
139
+ "./evaluator": {
140
+ "types": "./evaluator/index.d.mts",
141
+ "import": "./evaluator/index.mjs"
142
+ },
143
+ "./evaluator/report.schema.json": "./evaluator/report.schema.json",
119
144
  "./wire-catalog": {
120
145
  "types": "./dist/wire-catalog.d.ts",
121
146
  "import": "./dist/wire-catalog.js"
@@ -141,6 +166,11 @@
141
166
  "types": "./dist/split-view.d.ts",
142
167
  "import": "./dist/split-view.js"
143
168
  },
169
+ "./pane": {
170
+ "types": "./dist/pane.d.ts",
171
+ "browser": "./dist/browser/pane.js",
172
+ "import": "./dist/pane.js"
173
+ },
144
174
  "./workbench": {
145
175
  "types": "./dist/workbench.d.ts",
146
176
  "import": "./dist/workbench.js"
@@ -176,6 +206,11 @@
176
206
  "browser": "./dist/browser/skeleton.js",
177
207
  "import": "./dist/skeleton.js"
178
208
  },
209
+ "./sunken-panel": {
210
+ "types": "./dist/sunken-panel.d.ts",
211
+ "browser": "./dist/browser/sunken-panel.js",
212
+ "import": "./dist/sunken-panel.js"
213
+ },
179
214
  "./segmented-control": {
180
215
  "types": "./dist/segmented-control.d.ts",
181
216
  "browser": "./dist/browser/segmented-control.js",
@@ -243,12 +278,14 @@
243
278
  "./tab-bar.css": "./dist/styles/tab-bar.css",
244
279
  "./nav-stack.css": "./dist/styles/nav-stack.css",
245
280
  "./split-view.css": "./dist/styles/split-view.css",
281
+ "./pane.css": "./dist/styles/pane.css",
246
282
  "./workbench.css": "./dist/styles/workbench.css",
247
283
  "./collapsible-panel.css": "./dist/styles/collapsible-panel.css",
248
284
  "./tab-scaffold.css": "./dist/styles/tab-scaffold.css",
249
285
  "./loading-spinner.css": "./dist/styles/loading-spinner.css",
250
286
  "./select.css": "./dist/styles/select.css",
251
287
  "./skeleton.css": "./dist/styles/skeleton.css",
288
+ "./sunken-panel.css": "./dist/styles/sunken-panel.css",
252
289
  "./segmented-control.css": "./dist/styles/segmented-control.css",
253
290
  "./token-search-field.css": "./dist/styles/token-search-field.css",
254
291
  "./state-banner.css": "./dist/styles/state-banner.css",
@@ -261,6 +298,9 @@
261
298
  "files": [
262
299
  "dist",
263
300
  "ai",
301
+ "analyzer",
302
+ "doctor",
303
+ "evaluator",
264
304
  "docs",
265
305
  "ux-demo/recipes",
266
306
  "llms.txt",
@@ -272,27 +312,39 @@
272
312
  "dev": "npm run build && vite --config ux-demo/vite.config.ts",
273
313
  "demo:build": "npm run build && vite build --config ux-demo/vite.config.ts && node scripts/check-demo-bundle.mjs",
274
314
  "demo:serve": "vite preview --config ux-demo/vite.config.ts",
315
+ "format": "prettier --write . --ignore-unknown",
275
316
  "format:css": "prettier --write \"src/**/*.css\" \"ux-demo/**/*.css\"",
276
- "check:format": "prettier --check \"src/**/*.css\" \"ux-demo/**/*.css\"",
277
- "catalog:sync": "node scripts/sync-component-catalog.mjs",
278
- "check:catalog": "node scripts/sync-component-catalog.mjs --check && node scripts/check-component-catalog.mjs",
317
+ "check:format": "prettier --check . --ignore-unknown",
318
+ "catalog:sync": "node scripts/sync-component-catalog.mjs && node scripts/sync-component-catalog-v2.mjs",
319
+ "catalog:v2:sync": "node scripts/sync-component-catalog-v2.mjs",
320
+ "check:catalog": "node scripts/sync-component-catalog.mjs --check && node scripts/sync-component-catalog-v2.mjs --check && node scripts/check-component-catalog.mjs",
321
+ "check:profile": "node scripts/check-application-ui-profile.mjs",
322
+ "check:demo-conformance": "node scripts/check-catalog-demo-conformance.mjs",
279
323
  "check:recipes": "node scripts/check-recipes.mjs",
280
- "check:ai-regressions": "node scripts/check-ai-regressions.mjs && node scripts/audit-ai-regression-results.mjs",
324
+ "check:ai-regressions": "node scripts/check-ai-regressions.mjs && node scripts/audit-ai-regression-results.mjs && node scripts/audit-ai-regression-results-v3.mjs",
281
325
  "check:ai-signatures": "node scripts/sync-ai-public-signatures.mjs --check",
282
326
  "ai:signatures:sync": "npm run build && node scripts/sync-ai-public-signatures.mjs",
283
327
  "ai:regressions:compile": "node scripts/compile-ai-regression-response.mjs",
284
328
  "ai:regressions:prepare": "node scripts/prepare-ai-regression.mjs",
285
329
  "ai:regressions:record": "node scripts/record-ai-regression-run.mjs",
330
+ "ai:regressions:record-v3": "node scripts/record-ai-regression-run-v3.mjs",
331
+ "ai:regressions:replay-v3": "node scripts/replay-ai-regression-run-v3.mjs",
286
332
  "ai:regressions:score": "node scripts/score-ai-regression.mjs",
287
333
  "check:guidance": "node scripts/check-decision-guidance.mjs",
288
- "lint": "eslint src tests ux-demo docs/examples --max-warnings 0",
334
+ "lint:eslint": "eslint src tests ux-demo docs/examples --max-warnings 0",
335
+ "lint": "npm run lint:eslint && npm run check:format",
289
336
  "typecheck": "node node_modules/typescript7/bin/tsc --noEmit",
290
- "test": "npm run test:unit && npm run test:bundle",
337
+ "test": "npm run test:unit && npm run test:bundle && npm run test:analyzer && npm run test:doctor && npm run test:evaluator",
291
338
  "test:unit": "vitest run tests/unit --coverage",
292
339
  "test:bundle": "npm run build && vitest run tests/bundle",
293
- "test:consumer-types": "npm run build && node node_modules/typescript7/bin/tsc -p tests/consumer-types/webawesome/tsconfig.json",
340
+ "test:analyzer": "vitest run tests/integration/ui-analyzer-downstream.test.ts",
341
+ "test:doctor": "vitest run tests/unit/ui-doctor.test.ts tests/integration/ui-doctor-downstream.test.ts",
342
+ "test:evaluator": "vitest run tests/unit/ui-evaluator.test.ts tests/integration/ui-evaluator-downstream.test.ts",
343
+ "test:contract-types:source": "node node_modules/typescript7/bin/tsc -p tests/consumer-types/contracts/tsconfig.source.json",
344
+ "test:contract-types:packed": "node scripts/check-packed-type-contracts.mjs",
345
+ "test:consumer-types": "npm run test:contract-types:source && npm run build && node node_modules/typescript7/bin/tsc -p tests/consumer-types/webawesome/tsconfig.json && npm run test:contract-types:packed",
294
346
  "test:e2e": "npm run demo:build && playwright test",
295
- "check": "npm run check:format && npm run check:catalog && npm run check:recipes && npm run check:guidance && npm run check:ai-regressions && npm run lint && npm run typecheck && npm test && npm run test:consumer-types && npm run check:ai-signatures && npm run demo:build && npm run check:design-templates && npm pack --dry-run",
347
+ "check": "npm run check:catalog && npm run check:profile && npm run check:demo-conformance && npm run check:recipes && npm run check:guidance && npm run check:ai-regressions && npm run lint && npm run typecheck && npm test && npm run test:consumer-types && npm run check:ai-signatures && npm run demo:build && npm run check:design-templates && npm pack --dry-run",
296
348
  "prepublishOnly": "npm run check",
297
349
  "check:design-templates": "node scripts/check-design-templates.mjs",
298
350
  "check:design-templates:drift": "node scripts/check-design-templates-drift.mjs",
@@ -301,13 +353,21 @@
301
353
  "peerDependencies": {
302
354
  "@awesome.me/webawesome": "^3.12.0",
303
355
  "kerfjs": "^5.0.0-0",
304
- "lucide": "^1.43.0"
356
+ "lucide": "^1.43.0",
357
+ "playwright": "^1.63.0"
305
358
  },
306
359
  "peerDependenciesMeta": {
307
360
  "@awesome.me/webawesome": {
308
361
  "optional": true
362
+ },
363
+ "playwright": {
364
+ "optional": true
309
365
  }
310
366
  },
367
+ "dependencies": {
368
+ "postcss": "^8.5.28",
369
+ "typescript": "^6.0.3"
370
+ },
311
371
  "devDependencies": {
312
372
  "@awesome.me/webawesome": "3.12.0",
313
373
  "@eslint/js": "^10.0.1",