@kerfjs/ui 5.0.0-beta.130 → 5.0.0-beta.132

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 (485) hide show
  1. package/README.md +1 -13
  2. package/ai/application-ui-profile-sync.cjs +5 -14
  3. package/ai/application-ui-profile.d.ts +0 -2
  4. package/ai/application-ui-profile.defaults.json +0 -4
  5. package/ai/application-ui-profile.mjs +5 -14
  6. package/ai/application-ui-profile.schema.json +0 -4
  7. package/ai/component-catalog.json +24 -12
  8. package/ai/component-composition-rules.json +2 -10
  9. package/ai/component-composition.d.ts +0 -17
  10. package/ai/component-composition.json +10 -13
  11. package/ai/component-composition.schema.json +0 -59
  12. package/ai/components/column-track.md +5 -3
  13. package/ai/components/disclosure.md +2 -0
  14. package/ai/components/form.md +1 -2
  15. package/ai/components/tab-panel.md +0 -1
  16. package/ai/components/tabs.md +2 -1
  17. package/ai/components/toolbar-control-group.md +2 -2
  18. package/ai/public-api-signatures-v1.md +218 -202
  19. package/ai/skill.md +5 -22
  20. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  21. package/dist/backdrop-image.d.ts +1 -1
  22. package/dist/backdrop-image.js +1 -1
  23. package/dist/badge.js +1 -1
  24. package/dist/button.js +1 -1
  25. package/dist/catalog-resources.d.ts +2 -2
  26. package/dist/catalog.d.ts +2 -2
  27. package/dist/catalog.js +17 -16
  28. package/dist/catalog.js.map +1 -1
  29. package/dist/checkbox-group.js +1 -1
  30. package/dist/checkbox.js +1 -1
  31. package/dist/chip.js +1 -1
  32. package/dist/choice-chips.d.ts +3 -3
  33. package/dist/choice-chips.js +1 -1
  34. package/dist/{chunk-Q5BPZPCO.js → chunk-22T7FFCL.js} +2 -2
  35. package/dist/{chunk-Q5BPZPCO.js.map → chunk-22T7FFCL.js.map} +1 -1
  36. package/dist/{chunk-BCHK33XL.js → chunk-27NEAPV7.js} +2 -2
  37. package/dist/{chunk-BCHK33XL.js.map → chunk-27NEAPV7.js.map} +1 -1
  38. package/dist/{chunk-76BLSFEA.js → chunk-2OYMXGW2.js} +6 -5
  39. package/dist/chunk-2OYMXGW2.js.map +1 -0
  40. package/dist/{chunk-ASU4ODOH.js → chunk-2RDWKN3Y.js} +39 -8
  41. package/dist/chunk-2RDWKN3Y.js.map +1 -0
  42. package/dist/{chunk-EHR7R7YP.js → chunk-3DPHCZQB.js} +2 -2
  43. package/dist/{chunk-EHR7R7YP.js.map → chunk-3DPHCZQB.js.map} +1 -1
  44. package/dist/{chunk-RPJOLDSR.js → chunk-3UIZ36BP.js} +3 -3
  45. package/dist/{chunk-RPJOLDSR.js.map → chunk-3UIZ36BP.js.map} +1 -1
  46. package/dist/{chunk-OSL4LQ7T.js → chunk-42NLFCIN.js} +6 -6
  47. package/dist/{chunk-OSL4LQ7T.js.map → chunk-42NLFCIN.js.map} +1 -1
  48. package/dist/{chunk-UPHPFKAD.js → chunk-4GGIML4E.js} +2 -2
  49. package/dist/{chunk-UPHPFKAD.js.map → chunk-4GGIML4E.js.map} +1 -1
  50. package/dist/{chunk-LET362AM.js → chunk-4YXKDS6I.js} +2 -2
  51. package/dist/{chunk-LET362AM.js.map → chunk-4YXKDS6I.js.map} +1 -1
  52. package/dist/{chunk-5KWXM5O7.js → chunk-5C34PAUY.js} +2 -2
  53. package/dist/{chunk-5KWXM5O7.js.map → chunk-5C34PAUY.js.map} +1 -1
  54. package/dist/{chunk-S7QB5KMM.js → chunk-5L3MLWD5.js} +19 -55
  55. package/dist/chunk-5L3MLWD5.js.map +1 -0
  56. package/dist/{chunk-6PHG2DMG.js → chunk-6OH734CG.js} +2 -2
  57. package/dist/{chunk-6PHG2DMG.js.map → chunk-6OH734CG.js.map} +1 -1
  58. package/dist/{chunk-E7ZRBMVQ.js → chunk-7XIY7G4K.js} +3 -3
  59. package/dist/{chunk-E7ZRBMVQ.js.map → chunk-7XIY7G4K.js.map} +1 -1
  60. package/dist/{chunk-OKZTLRGG.js → chunk-B5Q3KE4Z.js} +2 -2
  61. package/dist/{chunk-OKZTLRGG.js.map → chunk-B5Q3KE4Z.js.map} +1 -1
  62. package/dist/{chunk-SGYBIKQA.js → chunk-BADEZQ3V.js} +4 -4
  63. package/dist/chunk-BADEZQ3V.js.map +1 -0
  64. package/dist/{chunk-CJAKN2KZ.js → chunk-BLBMUD2W.js} +2 -2
  65. package/dist/{chunk-CJAKN2KZ.js.map → chunk-BLBMUD2W.js.map} +1 -1
  66. package/dist/{chunk-TRJS7M2H.js → chunk-BNRH7XG5.js} +2 -2
  67. package/dist/{chunk-TRJS7M2H.js.map → chunk-BNRH7XG5.js.map} +1 -1
  68. package/dist/{chunk-NA4LKVPX.js → chunk-BNXJQB2Y.js} +2 -2
  69. package/dist/{chunk-NA4LKVPX.js.map → chunk-BNXJQB2Y.js.map} +1 -1
  70. package/dist/{chunk-CCPWJDRW.js → chunk-BQHGXQVA.js} +2 -2
  71. package/dist/{chunk-CCPWJDRW.js.map → chunk-BQHGXQVA.js.map} +1 -1
  72. package/dist/{chunk-COQI4OMZ.js → chunk-BRDTP3RT.js} +1 -1
  73. package/dist/chunk-BRDTP3RT.js.map +1 -0
  74. package/dist/{chunk-RGB4DPMN.js → chunk-DGYGRMES.js} +3 -3
  75. package/dist/chunk-DGYGRMES.js.map +1 -0
  76. package/dist/{chunk-V3IXAI4L.js → chunk-DNNHT7RB.js} +2 -2
  77. package/dist/{chunk-V3IXAI4L.js.map → chunk-DNNHT7RB.js.map} +1 -1
  78. package/dist/{chunk-UU37OR3D.js → chunk-DT7KOBQJ.js} +1 -1
  79. package/dist/chunk-DT7KOBQJ.js.map +1 -0
  80. package/dist/{chunk-WUVHP3UC.js → chunk-DUKE3PLH.js} +12 -3
  81. package/dist/chunk-DUKE3PLH.js.map +1 -0
  82. package/dist/{chunk-IPYQYLSX.js → chunk-EWCTBJ5O.js} +6 -6
  83. package/dist/{chunk-IPYQYLSX.js.map → chunk-EWCTBJ5O.js.map} +1 -1
  84. package/dist/{chunk-ECJHCPBN.js → chunk-F25UMYDX.js} +8 -3
  85. package/dist/chunk-F25UMYDX.js.map +1 -0
  86. package/dist/{chunk-C4FBYP2D.js → chunk-FJAAOIMP.js} +2 -2
  87. package/dist/{chunk-C4FBYP2D.js.map → chunk-FJAAOIMP.js.map} +1 -1
  88. package/dist/{chunk-RHMY45DK.js → chunk-H2XGWH4V.js} +5 -5
  89. package/dist/{chunk-RHMY45DK.js.map → chunk-H2XGWH4V.js.map} +1 -1
  90. package/dist/{chunk-76VCWWUA.js → chunk-HSMSTCNZ.js} +2 -2
  91. package/dist/{chunk-76VCWWUA.js.map → chunk-HSMSTCNZ.js.map} +1 -1
  92. package/dist/{chunk-ECVTRAXN.js → chunk-IQOO3ZQK.js} +2 -2
  93. package/dist/{chunk-ECVTRAXN.js.map → chunk-IQOO3ZQK.js.map} +1 -1
  94. package/dist/{chunk-DBP3N6E5.js → chunk-JBL6SCNN.js} +3 -3
  95. package/dist/{chunk-DBP3N6E5.js.map → chunk-JBL6SCNN.js.map} +1 -1
  96. package/dist/{chunk-7KN5OQVN.js → chunk-JNQBPRAA.js} +2 -2
  97. package/dist/{chunk-7KN5OQVN.js.map → chunk-JNQBPRAA.js.map} +1 -1
  98. package/dist/{chunk-CPTQABDQ.js → chunk-JNSPYECP.js} +2 -2
  99. package/dist/{chunk-CPTQABDQ.js.map → chunk-JNSPYECP.js.map} +1 -1
  100. package/dist/{chunk-E7Q6UNCB.js → chunk-KBDYXGYT.js} +2 -2
  101. package/dist/{chunk-E7Q6UNCB.js.map → chunk-KBDYXGYT.js.map} +1 -1
  102. package/dist/{chunk-WVQDIOD7.js → chunk-KKMZP3YL.js} +2 -2
  103. package/dist/{chunk-WVQDIOD7.js.map → chunk-KKMZP3YL.js.map} +1 -1
  104. package/dist/{chunk-WSPXSWFG.js → chunk-KZEHTRPC.js} +3 -3
  105. package/dist/chunk-KZEHTRPC.js.map +1 -0
  106. package/dist/{chunk-KACJOE2N.js → chunk-LH5V6XGH.js} +2 -2
  107. package/dist/{chunk-KACJOE2N.js.map → chunk-LH5V6XGH.js.map} +1 -1
  108. package/dist/{chunk-VBXKYT4O.js → chunk-LH7YRRY7.js} +2 -2
  109. package/dist/{chunk-VBXKYT4O.js.map → chunk-LH7YRRY7.js.map} +1 -1
  110. package/dist/{chunk-QXXLDY6I.js → chunk-LI7AQ5NQ.js} +4 -4
  111. package/dist/{chunk-QXXLDY6I.js.map → chunk-LI7AQ5NQ.js.map} +1 -1
  112. package/dist/chunk-LK3QJHVX.js +19 -0
  113. package/dist/chunk-LK3QJHVX.js.map +1 -0
  114. package/dist/{chunk-LETAE6SX.js → chunk-LSFPZR52.js} +4 -4
  115. package/dist/{chunk-LETAE6SX.js.map → chunk-LSFPZR52.js.map} +1 -1
  116. package/dist/{chunk-CRHKWHTA.js → chunk-LUWZ7UZQ.js} +4 -4
  117. package/dist/{chunk-CRHKWHTA.js.map → chunk-LUWZ7UZQ.js.map} +1 -1
  118. package/dist/{chunk-CMG4OZPV.js → chunk-LWWIBUDK.js} +2 -2
  119. package/dist/{chunk-CMG4OZPV.js.map → chunk-LWWIBUDK.js.map} +1 -1
  120. package/dist/{chunk-LOW7J7SE.js → chunk-MHF2NK7F.js} +4 -4
  121. package/dist/{chunk-LOW7J7SE.js.map → chunk-MHF2NK7F.js.map} +1 -1
  122. package/dist/{chunk-JHUEYWWI.js → chunk-MPM6YBOM.js} +2 -2
  123. package/dist/{chunk-JHUEYWWI.js.map → chunk-MPM6YBOM.js.map} +1 -1
  124. package/dist/{chunk-ALBFHXMZ.js → chunk-MPT6Y7Z2.js} +87 -2
  125. package/dist/chunk-MPT6Y7Z2.js.map +1 -0
  126. package/dist/{chunk-OZKBIPXU.js → chunk-NO2XO7S6.js} +3 -3
  127. package/dist/{chunk-OZKBIPXU.js.map → chunk-NO2XO7S6.js.map} +1 -1
  128. package/dist/{chunk-FQETQ7CM.js → chunk-NSNQWDJ4.js} +2 -2
  129. package/dist/{chunk-FQETQ7CM.js.map → chunk-NSNQWDJ4.js.map} +1 -1
  130. package/dist/{chunk-F34LHBQI.js → chunk-OW2ODKHN.js} +9 -17
  131. package/dist/chunk-OW2ODKHN.js.map +1 -0
  132. package/dist/{chunk-PVKAIVKE.js → chunk-P427MACE.js} +63 -74
  133. package/dist/chunk-P427MACE.js.map +1 -0
  134. package/dist/{chunk-FR5G77K5.js → chunk-PJKH2GZ3.js} +2 -2
  135. package/dist/{chunk-FR5G77K5.js.map → chunk-PJKH2GZ3.js.map} +1 -1
  136. package/dist/{chunk-FNJA4S6J.js → chunk-QNA27ABY.js} +3 -3
  137. package/dist/{chunk-FNJA4S6J.js.map → chunk-QNA27ABY.js.map} +1 -1
  138. package/dist/chunk-QYOPZ2XS.js +124 -0
  139. package/dist/chunk-QYOPZ2XS.js.map +1 -0
  140. package/dist/{chunk-6BXPN5SC.js → chunk-RO3TSZ5W.js} +3 -3
  141. package/dist/{chunk-6BXPN5SC.js.map → chunk-RO3TSZ5W.js.map} +1 -1
  142. package/dist/{chunk-4IXG6XCT.js → chunk-RUCUU7Z7.js} +2 -2
  143. package/dist/{chunk-4IXG6XCT.js.map → chunk-RUCUU7Z7.js.map} +1 -1
  144. package/dist/{chunk-2FA3SX57.js → chunk-RYBJ7OZB.js} +4 -4
  145. package/dist/{chunk-2FA3SX57.js.map → chunk-RYBJ7OZB.js.map} +1 -1
  146. package/dist/{chunk-QSJAIXLM.js → chunk-SDQZYSCA.js} +3 -3
  147. package/dist/{chunk-QSJAIXLM.js.map → chunk-SDQZYSCA.js.map} +1 -1
  148. package/dist/{chunk-3XSY5LAB.js → chunk-SXZTDJMG.js} +4 -4
  149. package/dist/{chunk-3XSY5LAB.js.map → chunk-SXZTDJMG.js.map} +1 -1
  150. package/dist/{chunk-UD5KHQOH.js → chunk-T7M5FKCE.js} +28 -4
  151. package/dist/chunk-T7M5FKCE.js.map +1 -0
  152. package/dist/{chunk-KS7EXW4P.js → chunk-TIRBSPP2.js} +2 -2
  153. package/dist/{chunk-KS7EXW4P.js.map → chunk-TIRBSPP2.js.map} +1 -1
  154. package/dist/{chunk-XO5IOPM5.js → chunk-TNJGPG6R.js} +8 -8
  155. package/dist/{chunk-XO5IOPM5.js.map → chunk-TNJGPG6R.js.map} +1 -1
  156. package/dist/{chunk-73LC3JAL.js → chunk-U5SQOZNK.js} +4 -4
  157. package/dist/{chunk-73LC3JAL.js.map → chunk-U5SQOZNK.js.map} +1 -1
  158. package/dist/{chunk-Y4VR6VNM.js → chunk-UPOS666Q.js} +2 -2
  159. package/dist/{chunk-Y4VR6VNM.js.map → chunk-UPOS666Q.js.map} +1 -1
  160. package/dist/{chunk-YE6KCAIN.js → chunk-USSGJ3MD.js} +2 -2
  161. package/dist/{chunk-YE6KCAIN.js.map → chunk-USSGJ3MD.js.map} +1 -1
  162. package/dist/{chunk-4UWLHKNU.js → chunk-UWLJ7UEK.js} +3 -3
  163. package/dist/{chunk-4UWLHKNU.js.map → chunk-UWLJ7UEK.js.map} +1 -1
  164. package/dist/{chunk-SNUDT6AX.js → chunk-VHAYQGWR.js} +2 -2
  165. package/dist/{chunk-SNUDT6AX.js.map → chunk-VHAYQGWR.js.map} +1 -1
  166. package/dist/{chunk-DV6GE57V.js → chunk-VWGRAE2Q.js} +2 -2
  167. package/dist/chunk-VWGRAE2Q.js.map +1 -0
  168. package/dist/{chunk-4L5ZIKDZ.js → chunk-W7J3MQNV.js} +2 -2
  169. package/dist/{chunk-4L5ZIKDZ.js.map → chunk-W7J3MQNV.js.map} +1 -1
  170. package/dist/{chunk-MVWR5WRX.js → chunk-WWDDKUDW.js} +3 -3
  171. package/dist/{chunk-MVWR5WRX.js.map → chunk-WWDDKUDW.js.map} +1 -1
  172. package/dist/{chunk-WEQNPYVA.js → chunk-XXKRHKFH.js} +2 -2
  173. package/dist/{chunk-WEQNPYVA.js.map → chunk-XXKRHKFH.js.map} +1 -1
  174. package/dist/{chunk-Q7RILH2D.js → chunk-XZ253TGP.js} +32 -6
  175. package/dist/chunk-XZ253TGP.js.map +1 -0
  176. package/dist/{chunk-3TBMGGTA.js → chunk-Y672Z7QY.js} +2 -2
  177. package/dist/{chunk-3TBMGGTA.js.map → chunk-Y672Z7QY.js.map} +1 -1
  178. package/dist/{chunk-MMOQR426.js → chunk-YS3H6DEQ.js} +2 -2
  179. package/dist/{chunk-MMOQR426.js.map → chunk-YS3H6DEQ.js.map} +1 -1
  180. package/dist/{chunk-QR7MGGOM.js → chunk-YVGHWCMY.js} +3 -3
  181. package/dist/{chunk-QR7MGGOM.js.map → chunk-YVGHWCMY.js.map} +1 -1
  182. package/dist/{chunk-4CYCJ3NY.js → chunk-Z4PGAYO7.js} +10 -10
  183. package/dist/{chunk-4CYCJ3NY.js.map → chunk-Z4PGAYO7.js.map} +1 -1
  184. package/dist/{chunk-JAC6AVZN.js → chunk-ZIZXXYXM.js} +3 -3
  185. package/dist/{chunk-JAC6AVZN.js.map → chunk-ZIZXXYXM.js.map} +1 -1
  186. package/dist/collapsible-panel.d.ts +5 -5
  187. package/dist/collapsible-panel.js +4 -4
  188. package/dist/collapsible-panel.js.map +1 -1
  189. package/dist/color-field.js +2 -2
  190. package/dist/color-picker.js +1 -1
  191. package/dist/color-swatches.js +1 -1
  192. package/dist/column-explorer.d.ts +2 -2
  193. package/dist/column-explorer.js +166 -20
  194. package/dist/column-explorer.js.map +1 -1
  195. package/dist/column-track.d.ts +21 -3
  196. package/dist/column-track.js +1 -1
  197. package/dist/combobox.d.ts +3 -3
  198. package/dist/combobox.js +1 -1
  199. package/dist/content-item.d.ts +1 -1
  200. package/dist/content-item.js +1 -1
  201. package/dist/content-swap.d.ts +3 -3
  202. package/dist/content-swap.js +1 -1
  203. package/dist/corner-status.d.ts +3 -3
  204. package/dist/corner-status.js +1 -1
  205. package/dist/device-class.js +101 -1
  206. package/dist/device-class.js.map +1 -1
  207. package/dist/disclosure-arrow.d.ts +3 -3
  208. package/dist/disclosure-arrow.js +1 -1
  209. package/dist/disclosure.d.ts +14 -2
  210. package/dist/disclosure.js +13 -4
  211. package/dist/disclosure.js.map +1 -1
  212. package/dist/edge-activity-indicator.d.ts +3 -3
  213. package/dist/edge-activity-indicator.js +1 -1
  214. package/dist/empty-state.d.ts +3 -3
  215. package/dist/empty-state.js +1 -1
  216. package/dist/{extension-attributes-IJ4decoa.d.ts → extension-attributes-CnqvBmj3.d.ts} +1 -1
  217. package/dist/file-picker.d.ts +3 -3
  218. package/dist/file-picker.js +1 -1
  219. package/dist/floating-toolbar.d.ts +3 -3
  220. package/dist/floating-toolbar.js +1 -1
  221. package/dist/form.d.ts +3 -3
  222. package/dist/form.js +1 -1
  223. package/dist/framed-list.js +1 -1
  224. package/dist/gauge.js +1 -1
  225. package/dist/grid.js +1 -1
  226. package/dist/index.d.ts +5 -3
  227. package/dist/index.js +70 -68
  228. package/dist/list-action-row.js +1 -1
  229. package/dist/list-detail-dialog.d.ts +3 -3
  230. package/dist/list-detail-dialog.js +7 -7
  231. package/dist/list-detail-dialog.js.map +1 -1
  232. package/dist/list-header.d.ts +1 -1
  233. package/dist/list-header.js +2 -1
  234. package/dist/list-inset-control.d.ts +3 -3
  235. package/dist/list-inset-control.js +1 -1
  236. package/dist/list-inset-text.js +1 -1
  237. package/dist/list-item.js +1 -1
  238. package/dist/list.d.ts +1 -1
  239. package/dist/list.js +1 -1
  240. package/dist/loading-spinner.d.ts +3 -3
  241. package/dist/loading-spinner.js +1 -1
  242. package/dist/lucide-icon.d.ts +3 -3
  243. package/dist/lucide-icon.js +1 -1
  244. package/dist/message-composer.js +2 -1
  245. package/dist/{nav-stack-DKrvqFjA.d.ts → nav-stack-IKSMxo2A.d.ts} +3 -3
  246. package/dist/nav-stack.d.ts +2 -2
  247. package/dist/nav-stack.js +1 -1
  248. package/dist/paged-view.d.ts +3 -3
  249. package/dist/paged-view.js +1 -1
  250. package/dist/paged-view.js.map +1 -1
  251. package/dist/pane.js +1 -1
  252. package/dist/popup-menu-register.js +1 -1
  253. package/dist/popup-menu.d.ts +1 -20
  254. package/dist/popup-menu.js +1 -1
  255. package/dist/progress-bar.js +1 -1
  256. package/dist/progress-ring.js +1 -1
  257. package/dist/radio-group.js +1 -1
  258. package/dist/resizable-region.d.ts +3 -3
  259. package/dist/resizable-region.js +1 -1
  260. package/dist/row.d.ts +1 -1
  261. package/dist/row.js +1 -1
  262. package/dist/scroll-effect.d.ts +1 -1
  263. package/dist/scroll-effect.js +1 -1
  264. package/dist/{search-field-5lNIszda.d.ts → search-field-BA48RaJY.d.ts} +13 -4
  265. package/dist/search-field-model.d.ts +2 -2
  266. package/dist/search-field.d.ts +2 -2
  267. package/dist/search-field.js +1 -1
  268. package/dist/segmented-control.d.ts +3 -3
  269. package/dist/segmented-control.js +1 -1
  270. package/dist/select-register.js +2 -2
  271. package/dist/select-register.js.map +1 -1
  272. package/dist/select.d.ts +3 -13
  273. package/dist/select.js +1 -1
  274. package/dist/sized-region.d.ts +3 -3
  275. package/dist/sized-region.js +1 -1
  276. package/dist/skeleton.d.ts +3 -3
  277. package/dist/skeleton.js +1 -1
  278. package/dist/slider.js +1 -1
  279. package/dist/spacer.d.ts +3 -3
  280. package/dist/spacer.js +1 -1
  281. package/dist/split-button.js +1 -1
  282. package/dist/split-middle-De745N2j.d.ts +7 -0
  283. package/dist/split-view.d.ts +4 -4
  284. package/dist/split-view.js +1 -1
  285. package/dist/state-banner.js +1 -1
  286. package/dist/styles/components/actions/popup-menu/popup-menu.css +0 -124
  287. package/dist/styles/components/actions/toolbar/toolbar.css +0 -7
  288. package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +9 -1
  289. package/dist/styles/components/collections/framed-list/framed-list.css +7 -3
  290. package/dist/styles/components/collections/list-action-row/list-action-row.css +5 -1
  291. package/dist/styles/components/forms/radio-group/radio-group.css +8 -4
  292. package/dist/styles/components/forms/search-field/search-field.css +98 -0
  293. package/dist/styles/components/forms/select/select.css +0 -60
  294. package/dist/styles/components/forms/text-field/text-field.css +1 -1
  295. package/dist/styles/components/navigation/tab-bar-item/tab-bar-item.css +33 -3
  296. package/dist/styles/components/surfaces/disclosure/disclosure.css +24 -4
  297. package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +1 -1
  298. package/dist/styles/components/typography/text/text.css +2 -2
  299. package/dist/styles/disclosure.css +24 -4
  300. package/dist/styles/framed-list.css +7 -3
  301. package/dist/styles/list-action-row.css +5 -1
  302. package/dist/styles/popup-menu.css +0 -124
  303. package/dist/styles/radio-group.css +8 -4
  304. package/dist/styles/search-field.css +98 -0
  305. package/dist/styles/select.css +0 -60
  306. package/dist/styles/surface-scaffold.css +1 -1
  307. package/dist/styles/tab-bar-item.css +33 -3
  308. package/dist/styles/text-field.css +1 -1
  309. package/dist/styles/text.css +2 -2
  310. package/dist/styles/toolbar-control-group.css +9 -1
  311. package/dist/styles/toolbar.css +0 -7
  312. package/dist/styles/webawesome.css +7 -0
  313. package/dist/summary-row.js +1 -1
  314. package/dist/sunken-panel.d.ts +3 -3
  315. package/dist/sunken-panel.js +1 -1
  316. package/dist/surface-scaffold.d.ts +9 -5
  317. package/dist/surface-scaffold.js +1 -1
  318. package/dist/switch.js +1 -1
  319. package/dist/tab-bar-item.d.ts +26 -2
  320. package/dist/tab-bar-item.js +2 -1
  321. package/dist/tab-bar.d.ts +3 -3
  322. package/dist/tab-bar.js +1 -1
  323. package/dist/tab-navigator.d.ts +3 -3
  324. package/dist/tab-navigator.js +2 -2
  325. package/dist/tab-navigator.js.map +1 -1
  326. package/dist/tab-panel.d.ts +3 -3
  327. package/dist/tab-panel.js +1 -1
  328. package/dist/tag-field.d.ts +3 -3
  329. package/dist/tag-field.js +1 -1
  330. package/dist/text-field.d.ts +2 -2
  331. package/dist/text-field.js +1 -1
  332. package/dist/text.d.ts +3 -2
  333. package/dist/text.js +2 -1
  334. package/dist/toolbar-control-group.d.ts +7 -7
  335. package/dist/toolbar-control-group.js +1 -1
  336. package/dist/toolbar-text.d.ts +3 -3
  337. package/dist/toolbar-text.js +1 -1
  338. package/dist/toolbar.d.ts +3 -3
  339. package/dist/toolbar.js +1 -1
  340. package/dist/tree-list.d.ts +3 -3
  341. package/dist/tree-list.js +151 -3
  342. package/dist/tree-list.js.map +1 -1
  343. package/dist/{tree-rows-Bms5QJvG.d.ts → tree-rows-BXChApji.d.ts} +1 -1
  344. package/dist/value-preview.d.ts +3 -3
  345. package/dist/value-preview.js +1 -1
  346. package/dist/value-table.d.ts +5 -5
  347. package/dist/value-table.js +1 -1
  348. package/dist/wire-catalog.d.ts +2 -2
  349. package/dist/wire-catalog.js +2 -2
  350. package/dist/wire-color-fields.js +73 -2
  351. package/dist/wire-color-fields.js.map +1 -1
  352. package/dist/wire-color-pickers.js +1 -1
  353. package/dist/wire-column-explorer.js +92 -1
  354. package/dist/wire-column-explorer.js.map +1 -1
  355. package/dist/wire-column-tracks.d.ts +13 -0
  356. package/dist/wire-column-tracks.js +4 -0
  357. package/dist/wire-column-tracks.js.map +1 -0
  358. package/dist/wire-content-items.js +204 -1
  359. package/dist/wire-content-items.js.map +1 -1
  360. package/dist/wire-nav-stack.js +423 -1
  361. package/dist/wire-nav-stack.js.map +1 -1
  362. package/dist/wire-resizable-regions.js +1 -1
  363. package/dist/wire-search-fields.d.ts +2 -2
  364. package/dist/wire-search-fields.js +1 -1
  365. package/dist/wire-sidebar.js +228 -1
  366. package/dist/wire-sidebar.js.map +1 -1
  367. package/dist/wire-sliders.js +29 -1
  368. package/dist/wire-sliders.js.map +1 -1
  369. package/dist/wire-tab-bars.d.ts +1 -1
  370. package/dist/wire-tab-bars.js +1 -1
  371. package/dist/wire-tab-navigator.js +150 -1
  372. package/dist/wire-tab-navigator.js.map +1 -1
  373. package/dist/wire-tag-fields.js +252 -2
  374. package/dist/wire-tag-fields.js.map +1 -1
  375. package/dist/wire-tree-list.js +186 -1
  376. package/dist/wire-tree-list.js.map +1 -1
  377. package/dist/wire-workbench.js +1 -1
  378. package/dist/workbench-dialog.d.ts +3 -3
  379. package/dist/workbench-dialog.js +5 -5
  380. package/dist/workbench-dialog.js.map +1 -1
  381. package/dist/workbench.d.ts +4 -4
  382. package/dist/workbench.js +1 -1
  383. package/docs/accessibility.md +18 -5
  384. package/docs/component-contract.md +4 -3
  385. package/docs/component-selection.md +14 -5
  386. package/docs/disclosure.md +22 -0
  387. package/docs/layout.md +11 -0
  388. package/docs/list-detail-dialog.md +2 -3
  389. package/docs/scroll-effect.md +2 -2
  390. package/docs/surface-scaffold.md +5 -6
  391. package/docs/workbench-dialog.md +2 -3
  392. package/llms.txt +10 -46
  393. package/package.json +7 -33
  394. package/ux-demo/recipes/app-shell.tsx +141 -48
  395. package/ux-demo/recipes/collapsible-sidebar.tsx +169 -43
  396. package/ux-demo/recipes/compact-toolbar.tsx +114 -22
  397. package/ux-demo/recipes/composer-form.tsx +104 -14
  398. package/ux-demo/recipes/list-detail-dialog.tsx +84 -38
  399. package/ux-demo/recipes/list-workspace-states.tsx +152 -29
  400. package/ux-demo/recipes/loading-inspector.tsx +174 -30
  401. package/ux-demo/recipes/media-detail.tsx +146 -29
  402. package/ux-demo/recipes/navigation-sidebar.tsx +113 -24
  403. package/ux-demo/recipes/navigation-stack.tsx +43 -7
  404. package/ux-demo/recipes/workspace-header.tsx +66 -2
  405. package/ai/component-props-overlay.json +0 -8892
  406. package/ai/component-props-overlay.schema.json +0 -82
  407. package/ai/component-props.json +0 -34203
  408. package/ai/component-props.schema.json +0 -408
  409. package/ai/view-document.schema.json +0 -467
  410. package/dist/browser/editor.js +0 -50
  411. package/dist/chunk-3K5V3ZSD.js +0 -77
  412. package/dist/chunk-3K5V3ZSD.js.map +0 -1
  413. package/dist/chunk-63TJH2RF.js +0 -231
  414. package/dist/chunk-63TJH2RF.js.map +0 -1
  415. package/dist/chunk-6V6UHPJD.js +0 -153
  416. package/dist/chunk-6V6UHPJD.js.map +0 -1
  417. package/dist/chunk-76BLSFEA.js.map +0 -1
  418. package/dist/chunk-ALBFHXMZ.js.map +0 -1
  419. package/dist/chunk-ASU4ODOH.js.map +0 -1
  420. package/dist/chunk-BMUYZKXW.js +0 -155
  421. package/dist/chunk-BMUYZKXW.js.map +0 -1
  422. package/dist/chunk-COQI4OMZ.js.map +0 -1
  423. package/dist/chunk-D2KHQNJ6.js +0 -155
  424. package/dist/chunk-D2KHQNJ6.js.map +0 -1
  425. package/dist/chunk-DV6GE57V.js.map +0 -1
  426. package/dist/chunk-ECJHCPBN.js.map +0 -1
  427. package/dist/chunk-F34LHBQI.js.map +0 -1
  428. package/dist/chunk-GHV36C6I.js +0 -94
  429. package/dist/chunk-GHV36C6I.js.map +0 -1
  430. package/dist/chunk-HHEBNP6Z.js +0 -256
  431. package/dist/chunk-HHEBNP6Z.js.map +0 -1
  432. package/dist/chunk-HPOXLOVC.js +0 -184
  433. package/dist/chunk-HPOXLOVC.js.map +0 -1
  434. package/dist/chunk-I2K4OQKB.js +0 -426
  435. package/dist/chunk-I2K4OQKB.js.map +0 -1
  436. package/dist/chunk-PVKAIVKE.js.map +0 -1
  437. package/dist/chunk-Q7RILH2D.js.map +0 -1
  438. package/dist/chunk-RGB4DPMN.js.map +0 -1
  439. package/dist/chunk-S7QB5KMM.js.map +0 -1
  440. package/dist/chunk-SGYBIKQA.js.map +0 -1
  441. package/dist/chunk-TXBNPEIJ.js +0 -31
  442. package/dist/chunk-TXBNPEIJ.js.map +0 -1
  443. package/dist/chunk-UD5KHQOH.js.map +0 -1
  444. package/dist/chunk-UU37OR3D.js.map +0 -1
  445. package/dist/chunk-WCMGPAY2.js +0 -103
  446. package/dist/chunk-WCMGPAY2.js.map +0 -1
  447. package/dist/chunk-WSPXSWFG.js.map +0 -1
  448. package/dist/chunk-WUVHP3UC.js.map +0 -1
  449. package/dist/chunk-X43QQWVC.js +0 -208
  450. package/dist/chunk-X43QQWVC.js.map +0 -1
  451. package/dist/editor.d.ts +0 -447
  452. package/dist/editor.js +0 -15604
  453. package/dist/editor.js.map +0 -1
  454. package/dist/styles/editor/editor.css +0 -585
  455. package/dist/styles/editor.css +0 -4
  456. package/dist/view-runtime.d.ts +0 -9
  457. package/dist/view-runtime.js +0 -8
  458. package/dist/view-runtime.js.map +0 -1
  459. package/docs/editor-host.md +0 -397
  460. package/docs/view.md +0 -314
  461. package/props/cli.d.mts +0 -1
  462. package/props/cli.mjs +0 -142
  463. package/props/component-props.d.mts +0 -180
  464. package/props/component-props.mjs +0 -1208
  465. package/view/catalog.mjs +0 -229
  466. package/view/child-kind.mjs +0 -22
  467. package/view/cli.d.mts +0 -18
  468. package/view/cli.mjs +0 -316
  469. package/view/contract.mjs +0 -418
  470. package/view/css-grammar.mjs +0 -93
  471. package/view/generate.d.mts +0 -16
  472. package/view/generate.mjs +0 -739
  473. package/view/index.d.mts +0 -491
  474. package/view/index.mjs +0 -36
  475. package/view/interpret.mjs +0 -339
  476. package/view/project-types-worker.mjs +0 -55
  477. package/view/project-types.d.mts +0 -43
  478. package/view/project-types.mjs +0 -618
  479. package/view/type-expression.d.mts +0 -15
  480. package/view/type-expression.mjs +0 -162
  481. package/view/types.mjs +0 -165
  482. package/view/validate-move.mjs +0 -353
  483. package/view/validate.mjs +0 -1649
  484. package/vite-editor.d.mts +0 -173
  485. package/vite-editor.mjs +0 -548
package/view/index.d.mts DELETED
@@ -1,491 +0,0 @@
1
- /** The format id every view document carries in `schema`. */
2
- export const VIEW_DOCUMENT_SCHEMA_ID: 'kerf-ui-document/v1';
3
-
4
- /** A type descriptor in the component-props grammar (`ai/component-props.json`). */
5
- export interface ViewType {
6
- kind: string;
7
- text?: string;
8
- nullable?: true;
9
- acceptsText?: true;
10
- value?: string | number | boolean;
11
- values?: (string | number | boolean)[];
12
- items?: ViewType;
13
- props?: { name: string; type: ViewType; required: boolean }[];
14
- members?: ViewType[];
15
- index?: { keyPrefix: string; value: ViewType };
16
- ref?: string;
17
- /** `kind: 'prop'`: the catalog component key whose prop's type this is. */
18
- component?: string;
19
- /** `kind: 'prop'`: that component's prop. */
20
- prop?: string;
21
- /** Project-checked expression; the other fields are a navigation projection. */
22
- typescript?: {
23
- readonly text: string;
24
- /** Project-relative source used to resolve inline import() types. */
25
- readonly source: string;
26
- /** Compiler-identified module literal tokens, including their quotes. */
27
- readonly references: readonly {
28
- start: number;
29
- length: number;
30
- module: string;
31
- }[];
32
- };
33
- }
34
-
35
- /** A value in a node's `props`, a `$each` source, or a `$slot` input. */
36
- export type ViewValue =
37
- | string
38
- | number
39
- | boolean
40
- | null
41
- | readonly ViewValue[]
42
- | { readonly $param: string }
43
- | { readonly $bind: string }
44
- | { readonly $action: string }
45
- | { readonly $css: string }
46
- | { readonly $icon: string }
47
- /** An item slot: application content at a content field inside a value. */
48
- | { readonly $slot: string }
49
- | { readonly [name: string]: ViewValue };
50
-
51
- export interface ViewNode {
52
- readonly id: string;
53
- readonly type: string;
54
- readonly name?: string;
55
- readonly props?: Readonly<Record<string, ViewValue>>;
56
- readonly zones?: Readonly<Record<string, readonly ViewChild[]>>;
57
- /** `#text` nodes only. */
58
- readonly value?: ViewValue;
59
- /** `#view` nodes only. */
60
- readonly src?: string;
61
- }
62
-
63
- /**
64
- * A row design chosen per item: every branch is one keyable node, and `else`
65
- * is required, so each item yields exactly one row.
66
- */
67
- export interface ViewTemplateChain {
68
- readonly $if: ViewValue;
69
- readonly then: ViewNode;
70
- readonly else: ViewTemplate;
71
- }
72
-
73
- /** An `$each` template: one node, or an `$if` chain of them. */
74
- export type ViewTemplate = ViewNode | ViewTemplateChain;
75
-
76
- export type ViewChild =
77
- | ViewNode
78
- | {
79
- readonly $each: ViewValue;
80
- readonly as: string;
81
- readonly key: string;
82
- /** One node, or a `ViewTemplateChain` that picks one per item. */
83
- readonly template: ViewTemplate;
84
- }
85
- | {
86
- readonly $each: ViewValue;
87
- readonly as: string;
88
- readonly key: string;
89
- /**
90
- * One row node per item kind; `kind` picks one, and an item of any
91
- * other kind takes `default`, which is required.
92
- */
93
- readonly templates: Readonly<Record<string, ViewNode>> & {
94
- readonly default: ViewNode;
95
- };
96
- /** A string in the item's scope, such as `{ "$bind": "item.kind" }`. */
97
- readonly kind: ViewValue;
98
- }
99
- | {
100
- readonly $if: ViewValue;
101
- readonly then: ViewChild;
102
- readonly else?: ViewChild;
103
- }
104
- | {
105
- readonly $slot: string;
106
- readonly input?: Readonly<Record<string, ViewValue>>;
107
- };
108
-
109
- /** An `$each` list child: one template, or per-kind `templates`. */
110
- export type ViewEachChild = Extract<ViewChild, { readonly $each: ViewValue }>;
111
- /** An `$if` branch child. */
112
- export type ViewIfChild = Extract<ViewChild, { readonly $if: ViewValue }>;
113
- /** A `$slot` placement child. */
114
- export type ViewSlotChild = Extract<ViewChild, { readonly $slot: string }>;
115
-
116
- /** A view child's kind; `view` is a composed `#view` node. */
117
- export type ViewChildKind = 'each' | 'if' | 'slot' | 'view' | 'node';
118
-
119
- /** A view child paired with its kind, narrowed by a switch on `kind`. */
120
- export type ClassifiedViewChild =
121
- | { readonly kind: 'each'; readonly child: ViewEachChild }
122
- | { readonly kind: 'if'; readonly child: ViewIfChild }
123
- | { readonly kind: 'slot'; readonly child: ViewSlotChild }
124
- | { readonly kind: 'view' | 'node'; readonly child: ViewNode };
125
-
126
- /** The kind of a view child: the one shared child-kind dispatch. */
127
- export function childKind(child: ViewChild): ViewChildKind;
128
- /** The child with its kind; switching on `.kind` narrows `.child`. */
129
- export function classifyChild(child: ViewChild): ClassifiedViewChild;
130
-
131
- export interface ViewDocument {
132
- readonly $schema?: string;
133
- readonly schema: typeof VIEW_DOCUMENT_SCHEMA_ID;
134
- readonly name: string;
135
- readonly catalogs: readonly string[];
136
- readonly params?: Readonly<
137
- Record<
138
- string,
139
- {
140
- readonly type: ViewType;
141
- /**
142
- * Used when the input is `null` or `undefined`, by a `$param` and by
143
- * a `$bind` path that starts at this param.
144
- */
145
- readonly default?: unknown;
146
- /**
147
- * `true` makes the input optional with no default, so an omitted
148
- * value reads as `undefined`. A param with a default does not take it.
149
- */
150
- readonly optional?: true;
151
- readonly description?: string;
152
- }
153
- >
154
- >;
155
- readonly slots?: Readonly<
156
- Record<string, { readonly input?: ViewType; readonly description?: string }>
157
- >;
158
- /**
159
- * The document's one top node. A document without one (an editor's empty
160
- * draft) is valid JSON but fails validation with `KUI-V017`, so nothing
161
- * generates or interprets it.
162
- */
163
- readonly root?: ViewNode;
164
- }
165
-
166
- export interface ViewCatalog {
167
- readonly components: ReadonlyMap<
168
- string,
169
- { component: unknown; definitions: Record<string, ViewType> }
170
- >;
171
- readonly entries: ReadonlyMap<string, unknown>;
172
- /**
173
- * Config types another component renders as a cataloged one, keyed
174
- * `package:TypeName` (a NavStack view's toolbar config renders as a
175
- * Toolbar) or, for one field alone, `package:TypeName.field`; a content
176
- * field inside one is placed in that component.
177
- */
178
- readonly configParents?: ReadonlyMap<string, string>;
179
- }
180
-
181
- /** Indexes component-props and composition catalogs (Kerf UI's and any consumer's). */
182
- export function createViewCatalog(input: {
183
- props?: readonly unknown[];
184
- composition?: readonly unknown[];
185
- }): ViewCatalog;
186
-
187
- export interface ViewDiagnostic {
188
- /**
189
- * `KUI-V001`–`KUI-V017`, or `KUI-L201`–`KUI-L204` for composition; a hint
190
- * is `KUI-H001` (a whole-screen layout below the root whose place has no
191
- * height: not in a SizedRegion, another layout, or a filled Pane's content).
192
- */
193
- readonly code: string;
194
- /** JSON path into the document, such as `$.root.zones.header[0]`. */
195
- readonly path: string;
196
- readonly message: string;
197
- }
198
-
199
- export interface ViewValidation {
200
- readonly valid: boolean;
201
- readonly diagnostics: readonly ViewDiagnostic[];
202
- /**
203
- * Non-blocking advice about the document (`KUI-H###`); hints never make it
204
- * invalid, and export and generation ignore them.
205
- */
206
- readonly hints: readonly ViewDiagnostic[];
207
- /** Every action name with its `row` (inside `$each`) or `view` scope. */
208
- readonly actions: ReadonlyMap<string, 'row' | 'view'>;
209
- }
210
-
211
- /**
212
- * Where a `#view`'s `src` points relative to the top document's folder, from
213
- * the composing document at `from` (undefined for the top document): each
214
- * `src` resolves from the folder of the document that contains it. The
215
- * `path` every `resolveView(src, path)` receives.
216
- */
217
- export function composedViewPath(from: string | undefined, src: string): string;
218
-
219
- export function validateView(
220
- document: unknown,
221
- catalog: ViewCatalog,
222
- options?: {
223
- /**
224
- * Loads a `#view` node's document; without it, `#view` is shape-checked
225
- * only. `path` is where `src` points relative to the top document's
226
- * folder: each `src` resolves from the document that contains it.
227
- */
228
- resolveView?: (src: string, path: string) => unknown;
229
- /** Known Lucide icon names; with it, an unknown `$icon` is `KUI-V013`. */
230
- icons?: Iterable<string>;
231
- },
232
- ): ViewValidation;
233
-
234
- /**
235
- * Prepares to ask whether moving node `id` (placed directly in a zone) to the
236
- * end of a zone adds a problem: one, by code and message, that
237
- * `validateView(moved, catalog)` reports and `validateView(document, catalog)`
238
- * does not, with `prepare` applied to every node of the moved document. The
239
- * source parent, the target parent, and the moved subtree are checked alone,
240
- * so asking costs about one node's checks, not one whole validation.
241
- *
242
- * The returned function answers `true` when the move changes the document
243
- * and adds no problem, `false` when it adds one or moves nothing (into the
244
- * node itself), and `undefined` when only a full validation can tell (the
245
- * order of action uses, duplicate ids or names, a malformed tree).
246
- */
247
- export function createMoveCheck(
248
- document: ViewDocument,
249
- catalog: ViewCatalog,
250
- id: string,
251
- options?: {
252
- /**
253
- * A node as the moved document holds it, from its own fields and its
254
- * zones' lengths (the editor's field ownership). It never changes zones.
255
- */
256
- prepare?: (node: ViewNode) => ViewNode;
257
- },
258
- ): (parent: string, zone: string) => boolean | undefined;
259
-
260
- /** Whether a param or binding of type `from` fits type `to`. */
261
- export function isAssignable(
262
- from: ViewType,
263
- to: ViewType,
264
- definitions?: Record<string, ViewType>,
265
- ): boolean;
266
-
267
- /**
268
- * A zone key that names a content field inside a prop value (`leftRail.content`,
269
- * `mainToolbar.title`, `views.0.content`): its prop, the path inside the
270
- * prop's value, and whether the field takes text. Undefined for any other key.
271
- * A filled field zone renders its nodes into that field.
272
- */
273
- export function fieldZoneOf(
274
- /** A catalog component, as `ViewCatalog.components` holds it. */
275
- component: unknown,
276
- definitions: Record<string, ViewType>,
277
- key: string,
278
- ):
279
- | {
280
- readonly prop: string;
281
- readonly path: readonly (string | number)[];
282
- readonly text: boolean;
283
- }
284
- | undefined;
285
-
286
- /** Whether a JSON literal is a valid value of a type. */
287
- export function isLiteralOf(
288
- value: unknown,
289
- type: ViewType,
290
- definitions?: Record<string, ViewType>,
291
- ): boolean;
292
-
293
- /**
294
- * Parses a `$css` value: one builder call whose arguments are only numbers,
295
- * quoted strings, or nested builder calls. Returns the helper names called
296
- * (outermost first), or undefined for anything else.
297
- */
298
- export function parseCssCall(source: unknown): string[] | undefined;
299
-
300
- /**
301
- * Why a `rootAttributes` key cannot appear in a view document, or undefined:
302
- * it must be a lowercase `data-*` name that is not reserved (`data-kerf-*`,
303
- * `data-key`, `data-editor-*`). `validateView` reports it as `KUI-V015`.
304
- */
305
- export function dataAttributeProblem(key: string): string | undefined;
306
-
307
- /** How a catalog component carries `data-*` attributes for markers and row keys. */
308
- export function channelOf(component: {
309
- dataChannel?: string;
310
- source?: string;
311
- props: readonly { name: string }[];
312
- }): string;
313
-
314
- /** One contract input: its TypeScript spelling, optionality, and declared shape. */
315
- export interface ViewContractInput {
316
- readonly type: string;
317
- readonly optional: boolean;
318
- readonly shape?: ViewType;
319
- }
320
-
321
- /** A view module's contract (docs/26-ui-editor.md §4). */
322
- export interface ViewContract {
323
- readonly inputs: Readonly<Record<string, ViewContractInput>>;
324
- readonly actions: Readonly<Record<string, 'row' | 'view'>>;
325
- /** Each slot's input type, or null for a slot without input. */
326
- readonly slots: Readonly<Record<string, string | null>>;
327
- readonly refs: Readonly<
328
- Record<
329
- string,
330
- {
331
- readonly element: string;
332
- readonly keyed: boolean;
333
- readonly id?: string;
334
- }
335
- >
336
- >;
337
- /**
338
- * The kinds each `templates` repeat names, by its item name, sorted.
339
- * Absent when the document has none.
340
- */
341
- readonly kinds?: Readonly<Record<string, readonly string[]>>;
342
- }
343
-
344
- export interface ViewContractChange {
345
- readonly member: 'input' | 'action' | 'slot' | 'ref' | 'kind';
346
- readonly name: string;
347
- readonly change: string;
348
- readonly breaking: boolean;
349
- readonly detail: string;
350
- }
351
-
352
- /** JSON with sorted keys and no whitespace. */
353
- export function canonicalJson(value: unknown): string;
354
- /** `kui1:` + 16 hex digits of the 64-bit FNV-1a hash of `text`. */
355
- export function viewDigest(text: string): string;
356
- /** TypeScript spelling of a document param or slot-input type. */
357
- export function typeText(type: ViewType): string;
358
- /** The contract of a valid document; throws when it does not validate. */
359
- export function contractOf(
360
- document: unknown,
361
- catalog: ViewCatalog,
362
- options?: { resolveView?: (src: string, path: string) => unknown },
363
- ): ViewContract;
364
- /** The layout-independent contract digest. */
365
- export function contractDigest(contract: ViewContract): string;
366
- /** The contract as a generated header records it. */
367
- export function serializeContract(contract: ViewContract): string;
368
- /** Every breaking and non-breaking change between two contracts. */
369
- export function diffContracts(
370
- before: ViewContract,
371
- after: ViewContract,
372
- ): ViewContractChange[];
373
- /** Visits every node; returns the slot names the document uses. */
374
- export function walkView(
375
- document: ViewDocument,
376
- visit: (node: ViewNode, rowScoped: boolean) => void,
377
- ): Set<string>;
378
-
379
- export const GENERATOR_VERSION: number;
380
-
381
- export interface GeneratedView {
382
- /** The `.view.ts` (or `.view.js`) module source. */
383
- readonly code: string;
384
- /** The `.view.d.ts` source, for the `js` target only. */
385
- readonly declarations?: string;
386
- readonly contract: ViewContract;
387
- readonly digest: string;
388
- }
389
-
390
- /** Generates a read-only view module; throws on an invalid document. */
391
- export function generateView(
392
- document: unknown,
393
- catalog: ViewCatalog,
394
- options?: {
395
- /** The document file name recorded in the header. */
396
- source?: string;
397
- /** Project-relative output source for rebasing TypeScript type imports. */
398
- typeSource?: string;
399
- resolveView?: (src: string, path: string) => unknown;
400
- target?: 'ts' | 'js';
401
- declarationsOnly?: boolean;
402
- /** The generated module's folder; absolute component imports become relative to it. */
403
- importFrom?: string;
404
- },
405
- ): GeneratedView;
406
-
407
- /** The header a generated module records, and whether its body is untouched. */
408
- export function readViewHeader(code: string):
409
- | {
410
- readonly version: number;
411
- readonly contractDigest: string;
412
- readonly sourceDigest: string;
413
- readonly bodyDigest: string;
414
- readonly contract: ViewContract;
415
- readonly intact: boolean;
416
- }
417
- | undefined;
418
-
419
- /** `x.kui.json` → `x.view.ts` (or `.view.js`). */
420
- export function viewModulePath(
421
- documentPath: string,
422
- target?: 'ts' | 'js',
423
- ): string;
424
-
425
- /** A parsed `$css` call: `{ name, args }`, each argument a literal or nested call. */
426
- export interface CssCallTree {
427
- readonly name: string;
428
- readonly args: readonly (number | string | CssCallTree)[];
429
- }
430
- /** Parses a `$css` value into its call tree, or undefined for anything else. */
431
- export function parseCssTree(source: unknown): CssCallTree | undefined;
432
-
433
- /** A served document's contract differs from the one the app compiled against. */
434
- export class KuiContractMismatch extends Error {
435
- readonly expected: string;
436
- readonly actual: string;
437
- /** The served document's full contract. */
438
- readonly contract: ViewContract;
439
- }
440
-
441
- /**
442
- * Renders a view document at runtime with the generated module's semantics,
443
- * after checking its contract digest against `contract`.
444
- */
445
- export function interpretView(
446
- document: unknown,
447
- options: {
448
- readonly catalog: ViewCatalog;
449
- /** Catalog key → component function for every Kerf or app component used. */
450
- readonly components: Readonly<
451
- Record<string, (props: never) => SafeHtmlLike>
452
- >;
453
- readonly inputs?: object;
454
- readonly slots?: object;
455
- /** The generated `<name>Contract` the application compiled against. */
456
- readonly contract: string;
457
- readonly onMismatch?: (error: KuiContractMismatch) => SafeHtmlLike;
458
- readonly resolveView?: (src: string, path: string) => unknown;
459
- /** Lucide icon name → icon data, for every `$icon` the document uses. */
460
- readonly icons?: Readonly<Record<string, unknown>>;
461
- },
462
- ): SafeHtmlLike;
463
-
464
- /** kerf's SafeHtml (kept structural so this module needs no type import). */
465
- export type SafeHtmlLike = import('kerfjs').SafeHtml;
466
-
467
- /** Lucide's export name for a kebab-case icon name (`a-arrow-down` → `AArrowDown`). */
468
- export function lucideExportName(name: string): string;
469
-
470
- /**
471
- * Renders a document for an editor preview, with no validation or contract
472
- * check. Nodes in `broken`, or whose rendering throws, render `placeholder`
473
- * instead. Applications use interpretView.
474
- */
475
- export function previewView(
476
- document: unknown,
477
- options: {
478
- readonly catalog: ViewCatalog;
479
- readonly components: Readonly<
480
- Record<string, (props: never) => SafeHtmlLike>
481
- >;
482
- readonly inputs?: object;
483
- readonly slots?: object;
484
- readonly icons?: Readonly<Record<string, unknown>>;
485
- readonly resolveView?: (src: string, path: string) => unknown;
486
- /** Ids of nodes the caller's validation flagged. */
487
- readonly broken?: ReadonlySet<string>;
488
- /** Renders in place of a broken node; `reason` is `problem` or the thrown message. */
489
- readonly placeholder: (node: ViewNode, reason: string) => SafeHtmlLike;
490
- },
491
- ): SafeHtmlLike;
package/view/index.mjs DELETED
@@ -1,36 +0,0 @@
1
- // @kerfjs/ui/view: the published, browser-safe view-document layer
2
- // (docs/26-ui-editor.md). The private editor and the kerf-ui-view CLI are
3
- // its clients; neither owns the format.
4
- export { childKind, classifyChild } from './child-kind.mjs';
5
- export { channelOf, createViewCatalog, fieldZoneOf } from './catalog.mjs';
6
- export { parseCssCall, parseCssTree } from './css-grammar.mjs';
7
- export { isAssignable, isLiteralOf } from './types.mjs';
8
- export {
9
- composedViewPath,
10
- dataAttributeProblem,
11
- validateView,
12
- VIEW_DOCUMENT_SCHEMA_ID,
13
- } from './validate.mjs';
14
- export { createMoveCheck } from './validate-move.mjs';
15
- export {
16
- canonicalJson,
17
- contractDigest,
18
- contractOf,
19
- diffContracts,
20
- serializeContract,
21
- typeText,
22
- viewDigest,
23
- walkView,
24
- } from './contract.mjs';
25
- export {
26
- GENERATOR_VERSION,
27
- generateView,
28
- lucideExportName,
29
- readViewHeader,
30
- viewModulePath,
31
- } from './generate.mjs';
32
- export {
33
- interpretView,
34
- KuiContractMismatch,
35
- previewView,
36
- } from './interpret.mjs';