@kerfjs/ui 5.0.0-beta.49 → 5.0.0-beta.51

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 (319) hide show
  1. package/README.md +69 -15
  2. package/ai/catalog-authoring.json +12 -1
  3. package/ai/catalog-authoring.schema.json +49 -1
  4. package/ai/compile-time-contracts-v1.json +19 -2
  5. package/ai/compile-time-contracts-v1.schema.json +1 -0
  6. package/ai/component-catalog-v2-overrides.json +7 -0
  7. package/ai/component-catalog-v2.d.ts +19 -1
  8. package/ai/component-catalog-v2.json +920 -149
  9. package/ai/component-catalog-v2.schema.json +33 -1
  10. package/ai/component-catalog.json +689 -153
  11. package/ai/component-catalog.schema.json +21 -1
  12. package/ai/public-api-signatures-v1.md +404 -184
  13. package/ai/skill.md +31 -14
  14. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  15. package/analyzer/index.mjs +105 -35
  16. package/dist/app-tab.d.ts +3 -1
  17. package/dist/app-tab.js +1 -1
  18. package/dist/badge.d.ts +24 -0
  19. package/dist/badge.js +3 -0
  20. package/dist/badge.js.map +1 -0
  21. package/dist/browser/badge.js +3 -0
  22. package/dist/browser/list-header.js +1 -0
  23. package/dist/browser/state-banner.js +1 -0
  24. package/dist/catalog-resources.d.ts +2 -2
  25. package/dist/catalog.d.ts +47 -125
  26. package/dist/catalog.js +429 -262
  27. package/dist/catalog.js.map +1 -1
  28. package/dist/{chunk-W2FK7ZNY.js → chunk-4R777DUZ.js} +10 -2
  29. package/dist/chunk-4R777DUZ.js.map +1 -0
  30. package/dist/{chunk-OMSRSL3B.js → chunk-5FZZMIMD.js} +6 -4
  31. package/dist/chunk-5FZZMIMD.js.map +1 -0
  32. package/dist/{chunk-AQFWBG23.js → chunk-5PMGQDG7.js} +5 -3
  33. package/dist/chunk-5PMGQDG7.js.map +1 -0
  34. package/dist/{chunk-SOK5EUF7.js → chunk-6ZXOQEAN.js} +4 -2
  35. package/dist/chunk-6ZXOQEAN.js.map +1 -0
  36. package/dist/{chunk-I4V3UDSA.js → chunk-7GUQYHKA.js} +25 -6
  37. package/dist/chunk-7GUQYHKA.js.map +1 -0
  38. package/dist/{chunk-XKFRMGMW.js → chunk-7IUSV4XG.js} +3 -1
  39. package/dist/chunk-7IUSV4XG.js.map +1 -0
  40. package/dist/{chunk-IU4QUY5I.js → chunk-AEPXGCNF.js} +20 -3
  41. package/dist/chunk-AEPXGCNF.js.map +1 -0
  42. package/dist/{chunk-VDUJZF5G.js → chunk-CMUIXJZM.js} +2 -2
  43. package/dist/{chunk-VDUJZF5G.js.map → chunk-CMUIXJZM.js.map} +1 -1
  44. package/dist/{chunk-DAO2VFTT.js → chunk-D547PH4L.js} +7 -5
  45. package/dist/chunk-D547PH4L.js.map +1 -0
  46. package/dist/{chunk-2TYUFZUC.js → chunk-D7GWXIAS.js} +4 -2
  47. package/dist/chunk-D7GWXIAS.js.map +1 -0
  48. package/dist/{chunk-E34TE2ZI.js → chunk-DVZCMMB3.js} +6 -4
  49. package/dist/chunk-DVZCMMB3.js.map +1 -0
  50. package/dist/{chunk-6NDBE2OK.js → chunk-E36EVCKG.js} +5 -3
  51. package/dist/chunk-E36EVCKG.js.map +1 -0
  52. package/dist/chunk-EKYZCRCX.js +256 -0
  53. package/dist/chunk-EKYZCRCX.js.map +1 -0
  54. package/dist/{chunk-TIGSG6BX.js → chunk-HJKRCKDR.js} +7 -3
  55. package/dist/chunk-HJKRCKDR.js.map +1 -0
  56. package/dist/{chunk-Y6LYKFXY.js → chunk-HMQ2ZDGG.js} +5 -3
  57. package/dist/chunk-HMQ2ZDGG.js.map +1 -0
  58. package/dist/{chunk-UDHHKZWO.js → chunk-JM53SMVF.js} +9 -5
  59. package/dist/chunk-JM53SMVF.js.map +1 -0
  60. package/dist/{chunk-OGTJNHRG.js → chunk-JMGKM7RK.js} +6 -4
  61. package/dist/chunk-JMGKM7RK.js.map +1 -0
  62. package/dist/{chunk-GYGM363P.js → chunk-KX7DP2GO.js} +17 -7
  63. package/dist/chunk-KX7DP2GO.js.map +1 -0
  64. package/dist/{chunk-OL4TC3U2.js → chunk-MO56ZZLG.js} +6 -2
  65. package/dist/chunk-MO56ZZLG.js.map +1 -0
  66. package/dist/{chunk-VXFGMDA7.js → chunk-MTM43SJO.js} +16 -2
  67. package/dist/chunk-MTM43SJO.js.map +1 -0
  68. package/dist/{chunk-ZPWZIVI6.js → chunk-N3GKMPDW.js} +7 -3
  69. package/dist/chunk-N3GKMPDW.js.map +1 -0
  70. package/dist/{chunk-DYBPI5O2.js → chunk-NDUGJ4TU.js} +4 -2
  71. package/dist/chunk-NDUGJ4TU.js.map +1 -0
  72. package/dist/{chunk-I45QO2IZ.js → chunk-NMGTHYW3.js} +7 -5
  73. package/dist/chunk-NMGTHYW3.js.map +1 -0
  74. package/dist/{chunk-WSXUPSID.js → chunk-NN6GYOA2.js} +7 -3
  75. package/dist/chunk-NN6GYOA2.js.map +1 -0
  76. package/dist/{chunk-OGNE3OFT.js → chunk-NZXWU4R5.js} +24 -3
  77. package/dist/chunk-NZXWU4R5.js.map +1 -0
  78. package/dist/{chunk-V6GQKOX2.js → chunk-O3RCCSQJ.js} +6 -4
  79. package/dist/chunk-O3RCCSQJ.js.map +1 -0
  80. package/dist/{chunk-WVLMZ5SG.js → chunk-S4QRSBFI.js} +25 -3
  81. package/dist/chunk-S4QRSBFI.js.map +1 -0
  82. package/dist/{chunk-CK6P5AUK.js → chunk-UBH743HV.js} +10 -7
  83. package/dist/chunk-UBH743HV.js.map +1 -0
  84. package/dist/{chunk-T7DOWS6T.js → chunk-ULCDZTWL.js} +7 -4
  85. package/dist/chunk-ULCDZTWL.js.map +1 -0
  86. package/dist/{chunk-V6HCTCVD.js → chunk-UPZ6EEJN.js} +9 -5
  87. package/dist/chunk-UPZ6EEJN.js.map +1 -0
  88. package/dist/{chunk-CAB6NQ2T.js → chunk-VOCPXGQN.js} +3 -1
  89. package/dist/chunk-VOCPXGQN.js.map +1 -0
  90. package/dist/chunk-XD7DWYXG.js +34 -0
  91. package/dist/chunk-XD7DWYXG.js.map +1 -0
  92. package/dist/{chunk-B6JYRX3P.js → chunk-ZIYOJFZD.js} +43 -4
  93. package/dist/chunk-ZIYOJFZD.js.map +1 -0
  94. package/dist/{chunk-EYALJQQD.js → chunk-ZK5EGVFP.js} +4 -2
  95. package/dist/chunk-ZK5EGVFP.js.map +1 -0
  96. package/dist/{chunk-6WTETUZ6.js → chunk-ZLWQZUGF.js} +8 -2
  97. package/dist/chunk-ZLWQZUGF.js.map +1 -0
  98. package/dist/collapsible-panel.d.ts +4 -2
  99. package/dist/collapsible-panel.js +4 -2
  100. package/dist/collapsible-panel.js.map +1 -1
  101. package/dist/css-values.d.ts +39 -3
  102. package/dist/css-values.js +1 -1
  103. package/dist/disclosure-arrow.d.ts +3 -1
  104. package/dist/disclosure-arrow.js +1 -1
  105. package/dist/empty-state.d.ts +3 -1
  106. package/dist/empty-state.js +1 -1
  107. package/dist/floating-toolbar.d.ts +3 -1
  108. package/dist/floating-toolbar.js +1 -1
  109. package/dist/grid.d.ts +17 -1
  110. package/dist/grid.js +2 -1
  111. package/dist/index.d.ts +4 -3
  112. package/dist/index.js +34 -33
  113. package/dist/list-action-row.d.ts +3 -1
  114. package/dist/list-action-row.js +1 -1
  115. package/dist/list-header.d.ts +6 -1
  116. package/dist/list-header.js +2 -1
  117. package/dist/list-inset-control.d.ts +3 -1
  118. package/dist/list-inset-control.js +1 -1
  119. package/dist/list-inset-text.d.ts +3 -1
  120. package/dist/list-inset-text.js +1 -1
  121. package/dist/list-item.d.ts +3 -1
  122. package/dist/list-item.js +1 -1
  123. package/dist/list.d.ts +23 -2
  124. package/dist/list.js +2 -1
  125. package/dist/loading-spinner.d.ts +3 -1
  126. package/dist/loading-spinner.js +1 -1
  127. package/dist/lucide-icon.d.ts +3 -1
  128. package/dist/lucide-icon.js +1 -1
  129. package/dist/nav-stack.d.ts +3 -1
  130. package/dist/nav-stack.js +1 -1
  131. package/dist/pane.d.ts +19 -2
  132. package/dist/pane.js +1 -1
  133. package/dist/resizable-region.d.ts +5 -2
  134. package/dist/resizable-region.js +1 -1
  135. package/dist/row.d.ts +21 -1
  136. package/dist/row.js +2 -1
  137. package/dist/segmented-control.d.ts +3 -1
  138. package/dist/segmented-control.js +1 -1
  139. package/dist/select.d.ts +16 -4
  140. package/dist/select.js +1 -1
  141. package/dist/skeleton.d.ts +3 -1
  142. package/dist/skeleton.js +1 -1
  143. package/dist/spacer.d.ts +3 -1
  144. package/dist/spacer.js +1 -1
  145. package/dist/split-view.d.ts +3 -1
  146. package/dist/split-view.js +24 -5
  147. package/dist/split-view.js.map +1 -1
  148. package/dist/state-banner.d.ts +3 -1
  149. package/dist/state-banner.js +2 -1
  150. package/dist/styles/badge.css +86 -0
  151. package/dist/styles/catalog/components/catalog-detail.css +35 -0
  152. package/dist/styles/catalog/components/catalog-example-stack.css +9 -0
  153. package/dist/styles/catalog/components/catalog-example.css +180 -0
  154. package/dist/styles/catalog/components/catalog-resource-footer.css +37 -0
  155. package/dist/styles/catalog/components/catalog-secondary-sections.css +38 -0
  156. package/dist/styles/catalog/components/catalog-section-list.css +22 -0
  157. package/dist/styles/catalog/components/catalog-sidebar.css +82 -0
  158. package/dist/styles/catalog/components/catalog-stage.css +60 -0
  159. package/dist/styles/catalog/components/catalog.css +22 -0
  160. package/dist/styles/catalog.css +10 -587
  161. package/dist/styles/collapsible-panel.css +132 -4
  162. package/dist/styles/document.css +23 -0
  163. package/dist/styles/foundation.css +21 -7
  164. package/dist/styles/grid.css +10 -0
  165. package/dist/styles/list-header.css +49 -60
  166. package/dist/styles/list-inset-control.css +8 -1
  167. package/dist/styles/list-item.css +6 -0
  168. package/dist/styles/list.css +11 -0
  169. package/dist/styles/nav-stack.css +89 -2
  170. package/dist/styles/pane.css +86 -1
  171. package/dist/styles/resizable-region.css +117 -5
  172. package/dist/styles/row.css +10 -0
  173. package/dist/styles/select.css +39 -7
  174. package/dist/styles/split-view.css +108 -2
  175. package/dist/styles/state-banner.css +0 -27
  176. package/dist/styles/styles.css +1 -0
  177. package/dist/styles/tab-bar.css +6 -1
  178. package/dist/styles/tab-scaffold.css +64 -1
  179. package/dist/styles/text.css +10 -0
  180. package/dist/styles/token-search-field.css +5 -40
  181. package/dist/styles/toolbar-control-group.css +198 -25
  182. package/dist/styles/toolbar-text.css +8 -1
  183. package/dist/styles/toolbar.css +169 -5
  184. package/dist/styles/webawesome.css +70 -9
  185. package/dist/styles/workbench.css +136 -4
  186. package/dist/sunken-panel.d.ts +3 -1
  187. package/dist/sunken-panel.js +1 -1
  188. package/dist/surface-scaffold.d.ts +6 -2
  189. package/dist/surface-scaffold.js +1 -1
  190. package/dist/tab-bar.d.ts +8 -1
  191. package/dist/tab-bar.js +1 -1
  192. package/dist/tab-scaffold.d.ts +3 -1
  193. package/dist/tab-scaffold.js +3 -1
  194. package/dist/tab-scaffold.js.map +1 -1
  195. package/dist/text.d.ts +9 -5
  196. package/dist/text.js +1 -1
  197. package/dist/token-search-field.d.ts +5 -1
  198. package/dist/token-search-field.js +1 -1
  199. package/dist/toolbar-control-group.d.ts +33 -3
  200. package/dist/toolbar-control-group.js +1 -1
  201. package/dist/toolbar-text.d.ts +3 -1
  202. package/dist/toolbar-text.js +1 -1
  203. package/dist/toolbar.d.ts +30 -1
  204. package/dist/toolbar.js +1 -1
  205. package/dist/types-CEsieBZi.d.ts +69 -0
  206. package/dist/value-table.d.ts +6 -2
  207. package/dist/value-table.js +1 -1
  208. package/dist/wire-resizable-regions.js +1 -1
  209. package/dist/wire-sidebar.d.ts +18 -3
  210. package/dist/wire-sidebar.js +95 -14
  211. package/dist/wire-sidebar.js.map +1 -1
  212. package/dist/wire-token-search-fields.js +1 -1
  213. package/dist/workbench.d.ts +3 -1
  214. package/dist/workbench.js +3 -1
  215. package/dist/workbench.js.map +1 -1
  216. package/docs/accessibility.md +56 -9
  217. package/docs/app-layouts.md +73 -0
  218. package/docs/catalog.md +48 -9
  219. package/docs/collapsible-panel.md +81 -8
  220. package/docs/component-contract.md +96 -28
  221. package/docs/component-integration.md +9 -4
  222. package/docs/component-selection.md +36 -15
  223. package/docs/design/templates/list/stack-dark.svg +1 -1
  224. package/docs/design/templates/list/stack.svg +1 -1
  225. package/docs/design/templates/list-dark.svg +1 -1
  226. package/docs/design/templates/list-header/action-dark.svg +1 -1
  227. package/docs/design/templates/list-header/action.svg +1 -1
  228. package/docs/design/templates/list-header/count-dark.svg +1 -1
  229. package/docs/design/templates/list-header/count.svg +1 -1
  230. package/docs/design/templates/list-header/inline-action-dark.svg +1 -1
  231. package/docs/design/templates/list-header/inline-action.svg +1 -1
  232. package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -1
  233. package/docs/design/templates/list-header/toggle-expanded.svg +1 -1
  234. package/docs/design/templates/list-header-dark.svg +1 -1
  235. package/docs/design/templates/list-header.svg +1 -1
  236. package/docs/design/templates/list.svg +1 -1
  237. package/docs/design/templates/state-banner/info-badge-dark.svg +1 -1
  238. package/docs/design/templates/state-banner/info-badge.svg +1 -1
  239. package/docs/design/templates/state-banner-dark.svg +1 -1
  240. package/docs/design/templates/state-banner.svg +1 -1
  241. package/docs/design/templates/toolbar/title-and-actions-dark.svg +1 -1
  242. package/docs/design/templates/toolbar/title-and-actions.svg +1 -1
  243. package/docs/design/templates/toolbar-control-group/with-text-dark.svg +1 -1
  244. package/docs/design/templates/toolbar-control-group/with-text.svg +1 -1
  245. package/docs/design/templates/toolbar-control-group-dark.svg +1 -1
  246. package/docs/design/templates/toolbar-control-group.svg +1 -1
  247. package/docs/design/templates/toolbar-dark.svg +1 -1
  248. package/docs/design/templates/toolbar-text/default-dark.svg +1 -1
  249. package/docs/design/templates/toolbar-text/default.svg +1 -1
  250. package/docs/design/templates/toolbar-text/large-dark.svg +1 -1
  251. package/docs/design/templates/toolbar-text/large.svg +1 -1
  252. package/docs/design/templates/toolbar-text/small-dark.svg +1 -1
  253. package/docs/design/templates/toolbar-text/small.svg +1 -1
  254. package/docs/design/templates/toolbar-text-dark.svg +1 -1
  255. package/docs/design/templates/toolbar-text.svg +1 -1
  256. package/docs/design/templates/toolbar.svg +1 -1
  257. package/docs/design-philosophy.md +6 -5
  258. package/docs/document-baseline.md +31 -0
  259. package/docs/layout.md +86 -21
  260. package/docs/nav-stack.md +8 -0
  261. package/docs/recipes.md +78 -43
  262. package/docs/split-view.md +8 -0
  263. package/docs/tab-scaffold.md +4 -2
  264. package/docs/type-contracts.md +21 -16
  265. package/docs/ui-analyzer.md +19 -0
  266. package/docs/ui-evaluator.md +17 -0
  267. package/docs/ux-demo.md +8 -8
  268. package/docs/webawesome-theme.md +25 -6
  269. package/docs/workbench.md +20 -1
  270. package/evaluator/index.mjs +73 -8
  271. package/llms.txt +61 -23
  272. package/package.json +12 -3
  273. package/ux-demo/recipes/app-shell.tsx +244 -184
  274. package/ux-demo/recipes/collapsible-sidebar.tsx +175 -116
  275. package/ux-demo/recipes/compact-toolbar.tsx +119 -102
  276. package/ux-demo/recipes/composer-form.tsx +79 -69
  277. package/ux-demo/recipes/list-detail-dialog.tsx +120 -136
  278. package/ux-demo/recipes/list-workspace-states.tsx +85 -79
  279. package/ux-demo/recipes/loaders.ts +5 -2
  280. package/ux-demo/recipes/loading-inspector.tsx +151 -134
  281. package/ux-demo/recipes/navigation-sidebar.tsx +93 -80
  282. package/ux-demo/recipes/navigation-stack.tsx +33 -22
  283. package/ux-demo/recipes/types.ts +14 -0
  284. package/ux-demo/recipes/workspace-header.tsx +73 -57
  285. package/dist/chunk-2TYUFZUC.js.map +0 -1
  286. package/dist/chunk-6NDBE2OK.js.map +0 -1
  287. package/dist/chunk-6WTETUZ6.js.map +0 -1
  288. package/dist/chunk-AQFWBG23.js.map +0 -1
  289. package/dist/chunk-B6JYRX3P.js.map +0 -1
  290. package/dist/chunk-CAB6NQ2T.js.map +0 -1
  291. package/dist/chunk-CK6P5AUK.js.map +0 -1
  292. package/dist/chunk-DAO2VFTT.js.map +0 -1
  293. package/dist/chunk-DYBPI5O2.js.map +0 -1
  294. package/dist/chunk-E34TE2ZI.js.map +0 -1
  295. package/dist/chunk-EYALJQQD.js.map +0 -1
  296. package/dist/chunk-GYGM363P.js.map +0 -1
  297. package/dist/chunk-I45QO2IZ.js.map +0 -1
  298. package/dist/chunk-I4V3UDSA.js.map +0 -1
  299. package/dist/chunk-IU4QUY5I.js.map +0 -1
  300. package/dist/chunk-OGNE3OFT.js.map +0 -1
  301. package/dist/chunk-OGTJNHRG.js.map +0 -1
  302. package/dist/chunk-OL4TC3U2.js.map +0 -1
  303. package/dist/chunk-OMSRSL3B.js.map +0 -1
  304. package/dist/chunk-SOK5EUF7.js.map +0 -1
  305. package/dist/chunk-T7DOWS6T.js.map +0 -1
  306. package/dist/chunk-TIGSG6BX.js.map +0 -1
  307. package/dist/chunk-UDHHKZWO.js.map +0 -1
  308. package/dist/chunk-V6GQKOX2.js.map +0 -1
  309. package/dist/chunk-V6HCTCVD.js.map +0 -1
  310. package/dist/chunk-VXFGMDA7.js.map +0 -1
  311. package/dist/chunk-W2FK7ZNY.js.map +0 -1
  312. package/dist/chunk-WN52USHV.js +0 -115
  313. package/dist/chunk-WN52USHV.js.map +0 -1
  314. package/dist/chunk-WSXUPSID.js.map +0 -1
  315. package/dist/chunk-WVLMZ5SG.js.map +0 -1
  316. package/dist/chunk-XKFRMGMW.js.map +0 -1
  317. package/dist/chunk-Y6LYKFXY.js.map +0 -1
  318. package/dist/chunk-ZPWZIVI6.js.map +0 -1
  319. package/ux-demo/recipes/recipes.css +0 -453
@@ -0,0 +1,31 @@
1
+ # Document baseline
2
+
3
+ Import `@kerfjs/ui/document.css` when an application wants Kerf UI to own its
4
+ document-level defaults:
5
+
6
+ ```ts
7
+ import "@kerfjs/ui/document.css";
8
+ ```
9
+
10
+ ```html
11
+ <body>
12
+ <div id="app" class="kui-app-root"></div>
13
+ </body>
14
+ ```
15
+
16
+ The opt-in stylesheet applies `border-box` sizing to every element and
17
+ pseudo-element, removes the body margin, and gives the body the foundation
18
+ font, foreground, lowered surface, and `1.45` line height. Plain links use the
19
+ semantic `--kui-color-text-link` token with zero selector specificity.
20
+
21
+ `html`, `body`, and `.kui-app-root` form a definite `height: 100%` chain. Add
22
+ `.kui-app-root` to the one direct mount container of a full-height application
23
+ whose child is a `Workbench`, `SplitView`, `NavStack`, or another percentage-
24
+ height shell. Ordinary document-flow pages can import the baseline without the
25
+ class. Do not put `.kui-app-root` on several sibling containers: each requests
26
+ the full available document height.
27
+
28
+ The stylesheet is intentionally absent from `@kerfjs/ui/styles.css` and every
29
+ component browser import because its global selectors would otherwise change
30
+ consumer documents implicitly. Import it once and load application overrides
31
+ after it.
package/docs/layout.md CHANGED
@@ -35,6 +35,14 @@ each enabled side uses `--kui-pane-separator-width` (1px) and
35
35
  `--kui-pane-separator-color` (`--kui-color-border`). Logical sides keep pane
36
36
  boundaries correct in both left-to-right and right-to-left layouts.
37
37
 
38
+ A pane is safe-area aware. Its background and separators paint through a
39
+ device's unsafe areas while its header, content, and footer pad for each side
40
+ the pane still reaches; the content's block insets are scroll padding, so its
41
+ first and last items can always be scrolled clear. Layouts clear the sides a
42
+ pane does not reach. In an app-owned arrangement, pass `safeAreaEdges` (the
43
+ same logical sides as `separators`; all four by default, `[]` to opt out). See
44
+ [Choosing an app layout › Safe areas](app-layouts.md#safe-areas).
45
+
38
46
  `.kui-content` is a vertical stack with a 24px gap between major children.
39
47
  Sections may contain adjacent `ListItem` rows without adding another major gap.
40
48
  Ordinary surface-like children use `.kui-content-item` and own their complete
@@ -66,17 +74,18 @@ semantic status.
66
74
 
67
75
  ## Public roles and tokens
68
76
 
69
- | Need | Class | Token / default |
70
- | ---------------------------------------- | ------------------------- | ------------------------------------- |
71
- | Unpadded header/content/footer structure | `Pane`, `.kui-pane` | — |
72
- | Scrolling pane content | `.kui-pane__content` | — |
73
- | Optional logical-edge separators | `Pane.separators` | `--kui-pane-separator-width: 1px` |
74
- | Major vertical rhythm | `.kui-content` | `--kui-layout-content-gap: 24px` |
75
- | Self-contained child geometry | `.kui-content-item` | 8px margin + 1px border + 8px padding |
76
- | Pill child | `.kui-content-item--pill` | `--kui-layout-pill-radius: 22px` |
77
- | Related controls | `.kui-control-cluster` | `--kui-layout-control-gap: 8px` |
78
- | Inline metadata | `.kui-inline-metadata` | `--kui-layout-metadata-gap: 4px` |
79
- | Explicit scroll owner outside a pane | `.kui-scroll-owner` | `overflow: auto` |
77
+ | Need | Class | Token / default |
78
+ | ---------------------------------------- | ------------------------- | --------------------------------------------------------------------------- |
79
+ | Unpadded header/content/footer structure | `Pane`, `.kui-pane` | — |
80
+ | Scrolling pane content | `.kui-pane__content` | — |
81
+ | Optional logical-edge separators | `Pane.separators` | `--kui-pane-separator-width: 1px` |
82
+ | Safe-area sides a pane may pad | `Pane.safeAreaEdges` | `--kui-safe-area-*: env(safe-area-inset-*)`, routed as `--kui-edge-inset-*` |
83
+ | Major vertical rhythm | `.kui-content` | `--kui-layout-content-gap: 24px` |
84
+ | Self-contained child geometry | `.kui-content-item` | 8px margin + 1px border + 8px padding |
85
+ | Pill child | `.kui-content-item--pill` | `--kui-layout-pill-radius: 22px` |
86
+ | Related controls | `.kui-control-cluster` | `--kui-layout-control-gap: 8px` |
87
+ | Inline metadata | `.kui-inline-metadata` | `--kui-layout-metadata-gap: 4px` |
88
+ | Explicit scroll owner outside a pane | `.kui-scroll-owner` | `overflow: auto` |
80
89
 
81
90
  The component layer applies the same contract to `Toolbar`, `ListHeader`,
82
91
  `ListItem`, `Toolbar`, `StateBanner`, `ValueTable`,
@@ -87,6 +96,12 @@ also keeps 8px of root-scaled block padding independently of its semantic inline
87
96
  inset. Most interactive rows and toolbar groups are 44px tall.
88
97
  Toolbar groups reserve a real 1px outer border around a 42px inner area, even
89
98
  when their border and background are transparent.
99
+ Trailing icon actions share one axis: a toolbar control centers its glyph in
100
+ that 44px slot at the 8px inline margin, and a `ListHeader` action centers its
101
+ fitted 36px square in a slot of the same size (a transparent hit layer extends
102
+ its pointer target to fill that 44px slot), so a Pane header's trailing toolbar
103
+ action and the `ListHeader` action beneath it line up (30px from the pane edge
104
+ at the default scale).
90
105
  Panel, dialog, and page headings are plain `Toolbar` compositions. The leading
91
106
  zone holds an optional icon `ToolbarControlGroup` and a direct extra-large
92
107
  `ToolbarText`; actions belong in a trailing group. Omit empty groups. Supporting
@@ -120,18 +135,30 @@ CSS strings.
120
135
 
121
136
  ## Text
122
137
 
123
- Use `Text` from `@kerfjs/ui/text` for ordinary semantic headings and
124
- paragraphs. It renders a native `p` by default; set `variant` to `h1`–`h6` when
125
- the document outline calls for a heading. Ordinary global, `data-*`, and
126
- `aria-*` attributes pass through. Every variant resets its native margin, owns a
127
- 1px transparent border, and supplies the standard 8px item padding; native
128
- typography remains available to the surrounding composition. Choose heading
129
- levels from the document outline, not for visual size. Toolbar identity and
130
- page-heading compositions continue to use `ToolbarText`.
138
+ Use `Text` from `@kerfjs/ui/text` for ordinary semantic headings, paragraphs,
139
+ and inline secondary text. It renders a native `p` by default; set `variant` to
140
+ `h1`–`h6` when the document outline calls for a heading, or `span` for inline
141
+ copy inside a row, label, or table cell. Ordinary global, `data-*`, and `aria-*`
142
+ attributes pass through. Block variants reset their native margin, own a 1px
143
+ transparent border, and supply the standard 8px item padding. The `span`
144
+ variant owns no margin, border, or padding. Choose heading levels from the
145
+ document outline, not for visual size. Toolbar identity and page-heading
146
+ compositions continue to use `ToolbarText`.
147
+
148
+ `Text` is also the answer for a normal-color subsection title. `ToolbarText`
149
+ below `xlarge` (`large`, `default`, `small`) is deliberately quiet: it labels a
150
+ toolbar's identity — a pane name or a status — and must not compete with the
151
+ content and controls around it, so it has no tone option. A subsection title is
152
+ document content, not toolbar identity: use `Text` with the `h2`–`h6` variant
153
+ the outline calls for (inside a `List` with `controlInsets`, its text lines up
154
+ with content items). Use `ListHeader` when the section is a list or menu group
155
+ that needs a count, badge, action, or disclosure, and keep extra-large
156
+ `ToolbarText` for the panel, dialog, or page title.
131
157
 
132
158
  Presentation is independent of the native element: use `tone="quiet"` for
133
159
  supporting copy, `tone="danger"` for error or validation copy, `size="compact"`
134
- for compact metadata, and `font="monospace"` for code or identifiers. These
160
+ for compact metadata, and `font="monospace"` for code or identifiers (the
161
+ `--kui-font-mono` stack, which Kerf owns even with Web Awesome loaded). These
135
162
  finite props compose with each other and with every semantic `variant`; omit
136
163
  them to inherit the surrounding color, size, and font.
137
164
 
@@ -139,8 +166,10 @@ them to inherit the surrounding color, size, and font.
139
166
  import { Text } from "@kerfjs/ui/text";
140
167
 
141
168
  <Text variant="h2" id="details-title">Details</Text>;
169
+ <Text variant="h3">Notifications</Text>; // normal-color subsection title
142
170
  <Text aria-describedby="details-title">Supporting copy</Text>;
143
171
  <Text tone="quiet" size="compact">Updated yesterday</Text>;
172
+ <strong>Inbox<Text variant="span" tone="quiet" size="compact"> · 3 msg</Text></strong>;
144
173
  <Text tone="danger" font="monospace">ERR_INVALID_ID</Text>;
145
174
  ```
146
175
 
@@ -221,6 +250,35 @@ for the CSS initial value, pass `true` for `1 1 auto`, select the finite
221
250
  shorthand. A `CssLength` is not a flex shorthand, and arbitrary strings are
222
251
  rejected by the type contract.
223
252
 
253
+ ### Filling a fixed-height parent
254
+
255
+ `flex` sizes a Row, List, or Grid inside a flex layout. When one of them is the
256
+ layout **root** of a parent with a definite height (an app mount container
257
+ with the `.kui-app-root` height chain, a dialog body, or a fixed-height catalog
258
+ frame), pass `fill` instead: the root takes the parent's full height
259
+ (`height: 100%`), so its `flex` children can grow into it. Use `fill` only on
260
+ that sole layout root; a sibling inside a flex layout keeps using `flex`.
261
+
262
+ Put route, test, or recipe metadata on the same root with `rootAttributes`,
263
+ which accepts safe `data-*` pairs and keeps each component's structural
264
+ attributes (`data-component`, `data-flex`, `data-fill`, alignment, inset, and
265
+ column markers) protected:
266
+
267
+ ```tsx
268
+ <Row gap="none" fill rootAttributes={{ "data-recipe": "sidebar" }}>
269
+ <CollapsiblePanel id="rail" side="left" collapsed={railCollapsed.value}>
270
+ …
271
+ </CollapsiblePanel>
272
+ <List flex>…</List>
273
+ </Row>
274
+ ```
275
+
276
+ Do not wrap a layout in a frame `Pane` just to get a definite height or a root
277
+ attribute: the pane's content slot becomes a scroll owner that never scrolls,
278
+ and its safe-area padding keeps an edge-docked rail or drawer from painting
279
+ through the unsafe area. A `Pane` is for a real column with a header, one
280
+ scrolling content region, or a footer.
281
+
224
282
  Both components also accept `textInsets` and `controlInsets` using the shared
225
283
  physical `Sides` union. Values follow canonical top/right/bottom/left order
226
284
  (`t`, `rb`, `tbl`, `trbl`, and so on). A selected control side adds 8px of
@@ -229,11 +287,18 @@ padding. A selected text side adds the complete content-item alignment inset —
229
287
  container padding. When both props select the same side, the text inset wins.
230
288
  Each nested `Row` or `List` resolves its own four inset sides; unselected sides
231
289
  reset to zero instead of inheriting a same-type parent's inset selection.
290
+ The same holds for `gap` and `flex` on a nested `List`, `Row`, or `Grid`: an
291
+ omitted prop falls back to that component's own default (no gap for `List`,
292
+ `xs` for `Row` and `Grid`; the CSS initial `flex`) rather than the enclosing
293
+ instance's value.
232
294
 
233
295
  `ListInsetText` and `ListInsetControl` use the same `sides` vocabulary and
234
296
  default to `trbl`. The text wrapper applies its complete 8/1/8 geometry only on
235
297
  selected sides; the control wrapper applies its 8px outer margin only on
236
- selected sides. `ListInsetText.horizontalOnly` remains a deprecated alias for
298
+ selected sides. Every direct child of `ListInsetControl` grows to fill the row
299
+ (a `Select`, a `wa-input`, or a `wa-button` spans the full inset width), and
300
+ several children share the row with an 8px gap; stack controls vertically with
301
+ a `List` using `controlInsets` instead. `ListInsetText.horizontalOnly` remains a deprecated alias for
237
302
  `sides="rl"`; an explicit `sides` value takes precedence.
238
303
 
239
304
  `--kui-space-s` (12px) and `--kui-space-xl` (32px) exist but are **off the
package/docs/nav-stack.md CHANGED
@@ -65,6 +65,14 @@ When a remembered control was removed during the controlled rerender, the same
65
65
  fallback order applies. Disposing the helper stops future transitions and
66
66
  cleans up any temporary fallback `tabindex` it added.
67
67
 
68
+ ## Safe areas
69
+
70
+ The stack paints through a device's unsafe areas. Its chrome pads for the top
71
+ and side insets, its bottom toolbar for the bottom and side insets, and each
72
+ view pads the remaining edges inside its scroller, so content scrolls under the
73
+ unsafe area but can always be scrolled clear. A view whose only child is a
74
+ `Pane` or layout lets that child own the insets. See [Choosing an app layout › Safe areas](app-layouts.md#safe-areas).
75
+
68
76
  ## Transitions
69
77
 
70
78
  `wireNavStack(root, { onBack, duration? })` observes the rendered stack and
package/docs/recipes.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Production composition recipes
2
2
 
3
- These seven reference compositions sit between individual primitives and product
4
- code. Open each stable UX-catalog route to run it, then copy the linked TSX and
5
- CSS. The examples import public package subpaths, use semantic layout owners,
6
- and keep state in a per-instance application adapter. They are not new
7
- monolithic components.
3
+ These ten reference compositions sit between individual primitives and product
4
+ code. Open each stable UX-catalog route to run it, then copy the linked TSX. The
5
+ examples import public package subpaths, compose components through their
6
+ props and tokens, and keep state in a per-instance application adapter. They
7
+ ship no stylesheet of their own and are not new monolithic components.
8
8
 
9
9
  Copy the recipe source together with the catalog-independent
10
10
  [`mount-recipe.ts`](../ux-demo/recipes/mount-recipe.ts) adapter. It mounts the
@@ -28,11 +28,22 @@ specific dispatch; either way, wire once at a stable root and retain disposal.
28
28
 
29
29
  ## Desktop application shell
30
30
 
31
- [Open the recipe](../ux-demo/?component=recipe-app-shell) · [TSX source](../ux-demo/recipes/app-shell.tsx) · [shared CSS](../ux-demo/recipes/recipes.css)
32
-
33
- Use `Toolbar`, controlled `ResizableRegion` panes, and one
34
- `.kui-pane__content` scroll owner per pane. The recipe owns the shell topology;
35
- the app owns routing, responsive pane visibility, sizes, persistence, and data.
31
+ [Open the recipe](../ux-demo/?component=recipe-app-shell) · [TSX source](../ux-demo/recipes/app-shell.tsx)
32
+
33
+ A filling `List` (`fill`, with the recipe's `data-*` markers through
34
+ `rootAttributes`) stacks the app-bar `Toolbar` above a `Row` that places
35
+ controlled `ResizableRegion` navigation and inspector panes around a content
36
+ `Pane` that a one-column `Grid` grows to fill. Each region's lone `Pane` fills
37
+ the region's full height, so it reaches the bottom edge the separator does.
38
+ Only those three real panes own a
39
+ `.kui-pane__content` scroll owner; no frame `Pane` wraps the layout in a scroll
40
+ owner that never scrolls. Each pane lists the screen edges it reaches in
41
+ `safeAreaEdges` (the bottom plus its outer side, or both sides when it is the
42
+ only pane shown), and the app-bar `Toolbar` claims the top edge and both sides
43
+ with its own `safeAreaEdges`, so it clears the status area. Below desktop sizes the app reads `deviceClass()` and shows one
44
+ pane at a time, switched by a pressed-state `ToolbarControlGroup`. The recipe
45
+ owns the shell topology; the app owns routing, responsive pane visibility,
46
+ sizes, persistence, and data.
36
47
  Keep each visible pane's collapse action in its own toolbar. Once hidden, put
37
48
  its restore action in the adjacent main toolbar on the same logical edge:
38
49
  leading for an inline-start sidebar and trailing for an inline-end inspector.
@@ -64,17 +75,19 @@ controls relocate without changing focus order.
64
75
 
65
76
  [Open the recipe](../ux-demo/?component=recipe-list-detail-dialog) · [TSX source](../ux-demo/recipes/list-detail-dialog.tsx)
66
77
 
67
- The production Web Awesome dialog owns modal focus and Escape; the thin recipe
68
- adapter restores the invoking control consistently after the hide event.
69
- `Toolbar`, `ListHeader`, `ListItem`, and `ValueTable` own their included
70
- anatomy. The application owns open state, selection, dismissal policy, and
71
- record actions. A `ToolbarControlGroup` places the app's trailing controls in
72
- the top toolbar's trailing zone.
73
- The header sits on the dialog edge while retaining its internal control inset;
74
- the selected title receives the full content gutter, the metadata table fills
75
- the available detail width between the usual outer margins, and the action
76
- cluster uses one outer gutter without a second content-item inset.
77
- Do not rebuild the dialog or reach into private shadow parts.
78
+ The production Web Awesome dialog owns modal focus, Escape, its labeled header,
79
+ and its close control; the thin recipe adapter restores the invoking control
80
+ after the hide event. `DialogSurface` chooses the large modal with no body
81
+ inset, because `SplitView` and its rows own list geometry, and a comfortable
82
+ footer inset for the record actions. On roomy devices `SplitView` shows the
83
+ project list beside its detail; each pane opens with a `ListHeader` on one
84
+ shared line, and the dialog title, both headers, and the list text share the
85
+ 17px text edge while the `ValueTable` keeps the 8px outer margin. On compact
86
+ devices the dialog becomes a full-screen sheet and `SplitView` becomes a
87
+ `NavStack` drill-down whose back control the application pops. The
88
+ application owns open state, selection, the pushed detail, dismissal policy,
89
+ and record actions. Do not rebuild the dialog or reach into private shadow
90
+ parts.
78
91
 
79
92
  ## Composer form
80
93
 
@@ -82,12 +95,13 @@ Do not rebuild the dialog or reach into private shadow parts.
82
95
 
83
96
  A direct `ToolbarText` supplies the task title, with app-owned supporting copy
84
97
  below; their ids are referenced by the form. `ListInsetText` gives that bare
85
- supporting copy the same content-item text inset as the fields instead of
86
- duplicating its geometry in recipe CSS. Production fields own labels, help, and
87
- native focus. The field
88
- and footer control edges sit directly on the shared 8px inline gutter rather
89
- than acquiring a second content-item padding inset; major children remain 24px
90
- apart and related controls use 8px gaps. The app owns
98
+ supporting copy the same content-item text inset as the fields. The title and
99
+ supporting line share a nested heading `List` with `gap="none"`, so the heading
100
+ unit stays together instead of taking the form's 24px section gap. Production
101
+ fields own labels, help, and native focus. One `List` owns the 24px major
102
+ rhythm; the field `List` and the action `Row` use `controlInsets` to sit on the
103
+ shared 8px inline gutter with 8px gaps between related controls, rather than
104
+ acquiring a second content-item padding inset. The app owns
91
105
  validation, drafts, permissions, and transport. Persistent error or success
92
106
  feedback is the only nested semantic surface and uses `StateBanner`, not a toast.
93
107
  Because upgraded Web Awesome fields retain live value properties, controlled
@@ -111,8 +125,10 @@ Use `ToolbarControlGroup` for related commands, `SegmentedControl` for a few
111
125
  visible exclusive choices, `Select` for a longer value list, and an ordinary
112
126
  button for an independent command. Even that independent button sits in a
113
127
  single-control `ToolbarControlGroup`, which keeps its height, pill shape, focus,
114
- and hover treatment aligned with the adjacent toolbar controls. The app owns
115
- values, actions, persistence, and responsive priority.
128
+ and hover treatment aligned with the adjacent toolbar controls. At compact
129
+ widths the toolbar stacks its zones and wraps whole trailing groups onto another
130
+ row, so the last action is never clipped. The app owns values, actions,
131
+ persistence, and responsive priority.
116
132
 
117
133
  ## Navigation stack
118
134
 
@@ -121,8 +137,8 @@ values, actions, persistence, and responsive priority.
121
137
  Drill from a library list into a detail and back with `NavStack`
122
138
  (`@kerfjs/ui/nav-stack`): the app owns the stack as a signal of views and
123
139
  pushes/pops it, `NavStack` renders it, and `wireNavStack` slides the content and
124
- settles the chrome (reduced motion collapses the slide to instant). A live
125
- `deviceClass()` badge shows the current size/orientation. See the layout guide
140
+ settles the chrome (reduced motion collapses the slide to instant). See the
141
+ layout guide
126
142
  [`app-layouts.md`](app-layouts.md) for choosing among `NavStack`, `SplitView`,
127
143
  `Workbench`, and `TabScaffold`.
128
144
 
@@ -135,7 +151,9 @@ value-bearing component (`ToolbarText`, `ValueTable`/`ValueTableRow`, `Select`,
135
151
  `SegmentedControl`, `ListItem`, `StateBanner`) takes its `placeholder` from one
136
152
  loading flag, so the same real chrome renders a faithful loading state and then
137
153
  the populated record — no separate skeleton markup. The composition is the point;
138
- `Skeleton` is the primitive it builds on. The app owns the loading lifecycle and
154
+ `Skeleton` is the primitive it builds on. Its heading `Toolbar` uses
155
+ `responsive="wrap"`, so on a narrow inspector the toggle moves below a whole
156
+ record title instead of truncating it. The app owns the loading lifecycle and
139
157
  which values are still unknown.
140
158
 
141
159
  ## Collapsible sidebar
@@ -145,14 +163,24 @@ which values are still unknown.
145
163
  A mini app frame whose left navigation rail and bottom activity drawer are
146
164
  standalone `CollapsiblePanel`s (`@kerfjs/ui/collapsible-panel`) driven by
147
165
  `wireSidebar` (`@kerfjs/ui/wire-sidebar`). `CollapsiblePanelToggle` supplies the
148
- standard per-side glyph: a collapse toggle lives inside each panel and an expand
149
- toggle lives in the always-visible main header, so a collapsed panel is still
166
+ standard per-side glyph: a collapse toggle lives inside each panel, and the
167
+ always-visible main header shows that panel's expand toggle only while it is
168
+ collapsed, so exactly one control owns each action and a collapsed panel is still
150
169
  reachable. `wireSidebar` owns the toggle delegation, moves focus into a panel on
151
- open and restores it to the trigger on close, and — when a `deviceClass()` reports
152
- `compact` — switches the open panel to a dismissable **overlay** (backdrop, Escape
153
- and backdrop-click collapse, and a trapped Tab ring, the ARIA dialog pattern). It
154
- also persists each panel's collapsed state through a supplied storage hook. The app
155
- owns each `collapsed` signal, the panel sizes, and the content; the wire owns the
170
+ open, restores it on close (to the trigger, or to the panel's expand toggle when
171
+ the trigger sits inside the collapsed panel), and — when a `deviceClass()` reports
172
+ `compact` — presents the panels as a dismissable **overlay** (backdrop, Escape
173
+ and backdrop-click collapse, and a trapped Tab ring, the ARIA dialog pattern).
174
+ The overlay starts closed and opens only from a toggle; the rail's signal is
175
+ seeded from the device class with `inlineCollapsed: false`, so the first compact
176
+ render has no overlay and a wide crossing restores the open inline rail. It
177
+ also persists each panel's inline collapsed state through a supplied storage hook. A
178
+ filling `Row` (`fill` plus `rootAttributes`) is the root: it takes the frame's
179
+ definite height and places the rail beside a `List` column, and a one-column
180
+ `Grid` grows the main pane above the drawer. Because the panels sit at the real
181
+ frame edges, each grows through its edge's safe area and hands that edge back to
182
+ its siblings when it collapses; the drawer's activity log is a `ValueTable`. The app owns each
183
+ `collapsed` signal, the panel sizes, and the content; the wire owns the
156
184
  ephemeral interaction. For a full three-pane shell use `Workbench` instead — see
157
185
  [`app-layouts.md`](app-layouts.md). This recipe is covered end-to-end across
158
186
  Chromium, Firefox, and WebKit by `tests/browser/collapsible-sidebar-recipe.spec.ts`.
@@ -164,9 +192,16 @@ Chromium, Firefox, and WebKit by `tests/browser/collapsible-sidebar-recipe.spec.
164
192
  - For direct `wa-*` JSX, import types from `@kerfjs/ui/webawesome`. Import only
165
193
  individual Web Awesome registration modules and theme them with
166
194
  `@kerfjs/ui/webawesome.css`.
167
- - Prefer public props and variables at the composition boundary. When a recipe
168
- needs responsive topology, join only classes listed in the catalog's
169
- `publicClasses`; do not copy component markup or select descendants by tag,
170
- id, attribute alone, or an unlisted implementation class.
195
+ - Compose, don't style. A recipe ships no stylesheet, sets no inline style, and
196
+ names no class outside the published layout vocabulary (`.kui-content`,
197
+ `.kui-content-item`, …) and themed Web Awesome classes; it configures
198
+ components through props, `rootAttributes`, and tokens. When a recipe needs a
199
+ capability no component offers, record it as a component gap rather than
200
+ papering over it with CSS. `npm run check:recipes` enforces these rules on
201
+ every file in `ux-demo/recipes/`.
202
+ - Each recipe also exports a catalog-only `presentation`: the `CatalogExample`
203
+ viewport that frames it in the UX catalog and its ownership note. An
204
+ application that copies the recipe ignores that export and mounts the
205
+ controller into its own container.
171
206
  - Start from the copyable mount adapter, or reproduce its complete boundary:
172
207
  wire stable `data-action` hooks once and retain every disposer.
@@ -13,6 +13,14 @@ import "@kerfjs/ui/split-view.css";
13
13
  // wireResizableRegions / wireNavStack for the interactive behavior.
14
14
  ```
15
15
 
16
+ ## Safe areas
17
+
18
+ The list pane grows by the inline-start unsafe inset and pads for the edges it
19
+ touches; the detail pads for its own outer edges. Neither is inset on the
20
+ shared interior edge. A pane whose only child is a `Pane` lets that child own
21
+ the insets, and the compact form hands them to its `NavStack`. See
22
+ [Choosing an app layout › Safe areas](app-layouts.md#safe-areas).
23
+
16
24
  ## Responsive by device class
17
25
 
18
26
  `SplitView` is declarative; the app derives `compact` from the device class and
@@ -45,8 +45,10 @@ const dispose = wireTabScaffold(root, {
45
45
  ```
46
46
 
47
47
  Each `TabScaffoldTab` has an `id`, `label`, optional `icon`, and `content`. The
48
- bottom bar respects the home-indicator safe area (`env(safe-area-inset-bottom)`)
49
- and keeps 44px targets. Its single-line labels preserve their full line box and
48
+ bottom bar paints through the home-indicator safe area and pads for it and for
49
+ the side insets, while each scene pads for the top and side insets (a scene
50
+ whose only child is a `NavStack` or `Pane` lets that child own them; see
51
+ [Choosing an app layout › Safe areas](app-layouts.md#safe-areas)). The bar keeps 44px targets. Its single-line labels preserve their full line box and
50
52
  truncate horizontally with an ellipsis when a destination name exceeds its
51
53
  share of the bar. On larger device classes, promote the tab set to a
52
54
  `Workbench` rail or a persistent sidebar instead of a bottom bar.
@@ -11,21 +11,22 @@ public-signature artifact.
11
11
 
12
12
  ## Strengthened contracts
13
13
 
14
- | ID | Compile-time guarantee |
15
- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
- | `KUI-T001` | `ListHeader` is a passive heading, a fully named/icon-bearing trailing action, or a controlled disclosure with `action` + `expanded`. Props ignored by the selected mode are rejected. |
17
- | `KUI-T002` | `Select` has a visible `label` or an `ariaLabel`. |
18
- | `KUI-T003` | A literal `Select.value` belongs to its literal `choices`. |
19
- | `KUI-T004` | A literal `SegmentedControl.value` belongs to its literal `choices`. |
20
- | `KUI-T005` | `expanded`, `expandAction`, and `expandLabel` exist only on `TokenSearchField({ collapsible: true })`. |
21
- | `KUI-T006` | `TokenSearchEditorAttributes` accepts application `data-*` metadata but rejects component-owned identity, morph, count, and placeholder attributes. |
22
- | `KUI-T007` | `ToolbarText.maxLines` requires `wrap: true`; it is never silently ignored in typed code. |
23
- | `KUI-T008` | A literal `TabScaffold.active` id belongs to its literal `tabs`. |
24
- | `KUI-T009` | Adjacent-token keyboard removal requires `onRemoveToken`; disabling removal rejects the now-meaningless callback. |
25
- | `KUI-T010` | Finite public variants have named exported union types, including divider sides, tab activation, banner urgency, and all AppTab, TabBar, ToolbarControlGroup, and Select presentation axes; the convenience root barrel re-exports them. |
26
- | `KUI-T011` | Semantic component zones use the recursive `KerfUiContent` type: `SafeHtml`, runtime-empty booleans/nullish values, and readonly nested arrays are valid; arbitrary strings, numbers, and signals are rejected. Explicit text positions such as `ListInsetText` retain their text exception. |
27
- | `KUI-T012` | `List.gap` accepts finite `UiSpaceName` shorthands or a complete branded `CssLength`; raw strings and non-standalone `CssLengthExpression` arithmetic are rejected. `calc(plus(...))` promotes a typed expression to a complete value. |
28
- | `KUI-T013` | CSS-valued props preserve property grammar: `List.flex` uses `CssFlex`, `Skeleton` dimensions use `CssSize`/`CssLength`, and choice icons use `CssColor`; row declaration strings are absent. |
14
+ | ID | Compile-time guarantee |
15
+ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | `KUI-T001` | `ListHeader` is a passive heading, a fully named/icon-bearing trailing action, or a controlled disclosure with `action` + `expanded`. Props ignored by the selected mode are rejected. |
17
+ | `KUI-T002` | `Select` has a visible `label` or an `ariaLabel`. |
18
+ | `KUI-T003` | A literal `Select.value` belongs to its literal `choices`. |
19
+ | `KUI-T004` | A literal `SegmentedControl.value` belongs to its literal `choices`. |
20
+ | `KUI-T005` | `expanded`, `expandAction`, and `expandLabel` exist only on `TokenSearchField({ collapsible: true })`. |
21
+ | `KUI-T006` | `TokenSearchEditorAttributes` accepts application `data-*` metadata but rejects component-owned identity, morph, count, and placeholder attributes. |
22
+ | `KUI-T007` | `ToolbarText.maxLines` requires `wrap: true`; it is never silently ignored in typed code. |
23
+ | `KUI-T008` | A literal `TabScaffold.active` id belongs to its literal `tabs`. |
24
+ | `KUI-T009` | Adjacent-token keyboard removal requires `onRemoveToken`; disabling removal rejects the now-meaningless callback. |
25
+ | `KUI-T010` | Finite public variants have named exported union types, including divider sides, tab activation, banner urgency, and all AppTab, TabBar, ToolbarControlGroup, and Select presentation axes; the convenience root barrel re-exports them. |
26
+ | `KUI-T011` | Semantic component zones use the recursive `KerfUiContent` type: `SafeHtml`, runtime-empty booleans/nullish values, and readonly nested arrays are valid; arbitrary strings, numbers, and signals are rejected. Explicit text positions such as `ListInsetText` retain their text exception. |
27
+ | `KUI-T012` | `List.gap` accepts finite `UiSpaceName` shorthands or a complete branded `CssLength`; raw strings and non-standalone `CssLengthExpression` arithmetic are rejected. `calc(plus(...))` promotes a typed expression to a complete value. |
28
+ | `KUI-T013` | CSS-valued props preserve property grammar: `List.flex` uses `CssFlex`, `Skeleton` dimensions use `CssSize`/`CssLength`, and choice icons use `CssForegroundColor` (foreground tokens via `uiColor()` or `foregroundColorVar()`; fill aliases such as `uiColor('success')` are rejected); row declaration strings are absent. |
29
+ | `KUI-T014` | Stable single-root visual components accept the explicit native `slot` attribute. Multi-root `ResizableRegion` and `CollapsiblePanel` remain excluded because no single returned element can own the assignment, and other arbitrary native attributes remain rejected. |
29
30
 
30
31
  `KerfUiContent` lets conditionals and mapped component collections be direct
31
32
  siblings without an otherwise-unnecessary `Fragment`:
@@ -119,7 +120,11 @@ move errors into casts without making the integration safer.
119
120
  `gap="0.25rem"` with `gap={rem(0.25)}` and wrap sums with `calc(plus(...))`.
120
121
  - Replace raw `List.flex` shorthands with `flex(grow, shrink, basis)` or a finite
121
122
  keyword; replace raw Skeleton dimensions with `px`/`rem`/`em`/`pct` builders;
122
- and replace raw choice colors with `uiColor()` or `colorVar()`.
123
+ and replace raw choice colors with a foreground token such as
124
+ `uiColor('success-on-quiet')` or an app-owned `foregroundColorVar()`.
125
+ `SelectChoice.color` rejects fill aliases (`uiColor('success')`) and
126
+ unqualified `colorVar()` values because a fill paints a nearly invisible
127
+ icon.
123
128
  - Remove `style` from `ListItem` and `ListActionRow`; use `className`, public
124
129
  tokens, and cataloged props. These breaking cleanups land before 5.0 stable.
125
130
 
@@ -17,6 +17,25 @@ composition catalog by `package:id`, parses literal JavaScript/TypeScript
17
17
  component calls, TSX/JSX, and CSS, and reports portable repository-relative
18
18
  locations.
19
19
 
20
+ An imported component name is resolved to a catalog entry by `package:id`, not
21
+ by display name: several entries share one (the Kerf `Select` and the Web
22
+ Awesome `wa-select` are both "Select"), so the analyzer joins each composition
23
+ entry to its selection-catalog public exports and import subpaths and picks
24
+ the entry that the import actually names. That keeps the Kerf component's
25
+ CSS-value contracts (`KUI-L013`–`KUI-L017`) in force for `Select` and
26
+ `Skeleton`.
27
+
28
+ Only component exports resolve to an entry. A selection-catalog
29
+ `publicExports` list also carries the helpers a component's props consume
30
+ (`Select` ships `uiColor`, `List` ships `px`, `rem`, and `flex`), and a helper
31
+ never inherits its entry's contracts, so `uiColor({ choices: [...] })` is not
32
+ checked as a `Select` call. A component export is one whose name starts with
33
+ an uppercase letter, the same rule JSX uses to tell a component tag from an
34
+ intrinsic element; `eslint-plugin-kerfjs` applies the identical rule, and the
35
+ package's catalog check fails if a cataloged render function (a value
36
+ returning `SafeHtml`) is lowercase or any other runtime value is uppercase.
37
+ Third-party catalogs should follow the same naming convention.
38
+
20
39
  Analysis is scoped per source file. Each TSX/JSX file resolves package,
21
40
  workspace, and parent-to-child directory profiles from its own location, then
22
41
  follows its relative CSS imports (including nested CSS `@import`s). Stylesheet
@@ -61,6 +61,23 @@ shared container and `data-kui-align-edge` on two or more elements whose logical
61
61
  start edges must align. Use `data-kui-scroll-scope` only for an application-owned
62
62
  scope that is not a `.kui-pane`.
63
63
 
64
+ Target size (`KUI-B050`) measures the area the pointer can actually reach, not
65
+ just the border box. When a control's box is under 44 × 44, the evaluator
66
+ hit-tests outward from its center with `elementFromPoint`, so a transparent hit
67
+ layer (a positioned `::before`/`::after` that receives pointer events, as on the
68
+ `ListHeader` action) counts toward the target, while a pseudo-element with
69
+ `pointer-events: none`, a clipping ancestor, or an overlapping neighbor does
70
+ not. Where the probe reaches the viewport edge it mirrors the opposite side's
71
+ reach; a control whose center is off-screen or covered keeps its border box.
72
+ The diagnostic evidence reports the measured `width`/`height` and the border
73
+ `box`.
74
+
75
+ Compact density is a documented exception. Inside `[data-density="compact"]` —
76
+ the compact `List`/`ListHeader` family, whose rows are 36px tall — a target
77
+ still needs the full 44px width but only the 36px row height, because a taller
78
+ hit layer would reach into the neighboring row. The evidence's `required` field
79
+ names the floor that applied (`44×44`, or `44×36` in compact density).
80
+
64
81
  Accessible names follow ARIA/native naming inputs, including labels, referenced
65
82
  content with `aria-hidden` descendants removed, and native input values.
66
83
  Geometry checks use each catalog entry's explicit `boundaries.rootClass`; the