@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.
- package/README.md +1 -13
- package/ai/application-ui-profile-sync.cjs +5 -14
- package/ai/application-ui-profile.d.ts +0 -2
- package/ai/application-ui-profile.defaults.json +0 -4
- package/ai/application-ui-profile.mjs +5 -14
- package/ai/application-ui-profile.schema.json +0 -4
- package/ai/component-catalog.json +24 -12
- package/ai/component-composition-rules.json +2 -10
- package/ai/component-composition.d.ts +0 -17
- package/ai/component-composition.json +10 -13
- package/ai/component-composition.schema.json +0 -59
- package/ai/components/column-track.md +5 -3
- package/ai/components/disclosure.md +2 -0
- package/ai/components/form.md +1 -2
- package/ai/components/tab-panel.md +0 -1
- package/ai/components/tabs.md +2 -1
- package/ai/components/toolbar-control-group.md +2 -2
- package/ai/public-api-signatures-v1.md +218 -202
- package/ai/skill.md +5 -22
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/backdrop-image.d.ts +1 -1
- package/dist/backdrop-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +1 -1
- package/dist/catalog-resources.d.ts +2 -2
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +17 -16
- package/dist/catalog.js.map +1 -1
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip.js +1 -1
- package/dist/choice-chips.d.ts +3 -3
- package/dist/choice-chips.js +1 -1
- package/dist/{chunk-Q5BPZPCO.js → chunk-22T7FFCL.js} +2 -2
- package/dist/{chunk-Q5BPZPCO.js.map → chunk-22T7FFCL.js.map} +1 -1
- package/dist/{chunk-BCHK33XL.js → chunk-27NEAPV7.js} +2 -2
- package/dist/{chunk-BCHK33XL.js.map → chunk-27NEAPV7.js.map} +1 -1
- package/dist/{chunk-76BLSFEA.js → chunk-2OYMXGW2.js} +6 -5
- package/dist/chunk-2OYMXGW2.js.map +1 -0
- package/dist/{chunk-ASU4ODOH.js → chunk-2RDWKN3Y.js} +39 -8
- package/dist/chunk-2RDWKN3Y.js.map +1 -0
- package/dist/{chunk-EHR7R7YP.js → chunk-3DPHCZQB.js} +2 -2
- package/dist/{chunk-EHR7R7YP.js.map → chunk-3DPHCZQB.js.map} +1 -1
- package/dist/{chunk-RPJOLDSR.js → chunk-3UIZ36BP.js} +3 -3
- package/dist/{chunk-RPJOLDSR.js.map → chunk-3UIZ36BP.js.map} +1 -1
- package/dist/{chunk-OSL4LQ7T.js → chunk-42NLFCIN.js} +6 -6
- package/dist/{chunk-OSL4LQ7T.js.map → chunk-42NLFCIN.js.map} +1 -1
- package/dist/{chunk-UPHPFKAD.js → chunk-4GGIML4E.js} +2 -2
- package/dist/{chunk-UPHPFKAD.js.map → chunk-4GGIML4E.js.map} +1 -1
- package/dist/{chunk-LET362AM.js → chunk-4YXKDS6I.js} +2 -2
- package/dist/{chunk-LET362AM.js.map → chunk-4YXKDS6I.js.map} +1 -1
- package/dist/{chunk-5KWXM5O7.js → chunk-5C34PAUY.js} +2 -2
- package/dist/{chunk-5KWXM5O7.js.map → chunk-5C34PAUY.js.map} +1 -1
- package/dist/{chunk-S7QB5KMM.js → chunk-5L3MLWD5.js} +19 -55
- package/dist/chunk-5L3MLWD5.js.map +1 -0
- package/dist/{chunk-6PHG2DMG.js → chunk-6OH734CG.js} +2 -2
- package/dist/{chunk-6PHG2DMG.js.map → chunk-6OH734CG.js.map} +1 -1
- package/dist/{chunk-E7ZRBMVQ.js → chunk-7XIY7G4K.js} +3 -3
- package/dist/{chunk-E7ZRBMVQ.js.map → chunk-7XIY7G4K.js.map} +1 -1
- package/dist/{chunk-OKZTLRGG.js → chunk-B5Q3KE4Z.js} +2 -2
- package/dist/{chunk-OKZTLRGG.js.map → chunk-B5Q3KE4Z.js.map} +1 -1
- package/dist/{chunk-SGYBIKQA.js → chunk-BADEZQ3V.js} +4 -4
- package/dist/chunk-BADEZQ3V.js.map +1 -0
- package/dist/{chunk-CJAKN2KZ.js → chunk-BLBMUD2W.js} +2 -2
- package/dist/{chunk-CJAKN2KZ.js.map → chunk-BLBMUD2W.js.map} +1 -1
- package/dist/{chunk-TRJS7M2H.js → chunk-BNRH7XG5.js} +2 -2
- package/dist/{chunk-TRJS7M2H.js.map → chunk-BNRH7XG5.js.map} +1 -1
- package/dist/{chunk-NA4LKVPX.js → chunk-BNXJQB2Y.js} +2 -2
- package/dist/{chunk-NA4LKVPX.js.map → chunk-BNXJQB2Y.js.map} +1 -1
- package/dist/{chunk-CCPWJDRW.js → chunk-BQHGXQVA.js} +2 -2
- package/dist/{chunk-CCPWJDRW.js.map → chunk-BQHGXQVA.js.map} +1 -1
- package/dist/{chunk-COQI4OMZ.js → chunk-BRDTP3RT.js} +1 -1
- package/dist/chunk-BRDTP3RT.js.map +1 -0
- package/dist/{chunk-RGB4DPMN.js → chunk-DGYGRMES.js} +3 -3
- package/dist/chunk-DGYGRMES.js.map +1 -0
- package/dist/{chunk-V3IXAI4L.js → chunk-DNNHT7RB.js} +2 -2
- package/dist/{chunk-V3IXAI4L.js.map → chunk-DNNHT7RB.js.map} +1 -1
- package/dist/{chunk-UU37OR3D.js → chunk-DT7KOBQJ.js} +1 -1
- package/dist/chunk-DT7KOBQJ.js.map +1 -0
- package/dist/{chunk-WUVHP3UC.js → chunk-DUKE3PLH.js} +12 -3
- package/dist/chunk-DUKE3PLH.js.map +1 -0
- package/dist/{chunk-IPYQYLSX.js → chunk-EWCTBJ5O.js} +6 -6
- package/dist/{chunk-IPYQYLSX.js.map → chunk-EWCTBJ5O.js.map} +1 -1
- package/dist/{chunk-ECJHCPBN.js → chunk-F25UMYDX.js} +8 -3
- package/dist/chunk-F25UMYDX.js.map +1 -0
- package/dist/{chunk-C4FBYP2D.js → chunk-FJAAOIMP.js} +2 -2
- package/dist/{chunk-C4FBYP2D.js.map → chunk-FJAAOIMP.js.map} +1 -1
- package/dist/{chunk-RHMY45DK.js → chunk-H2XGWH4V.js} +5 -5
- package/dist/{chunk-RHMY45DK.js.map → chunk-H2XGWH4V.js.map} +1 -1
- package/dist/{chunk-76VCWWUA.js → chunk-HSMSTCNZ.js} +2 -2
- package/dist/{chunk-76VCWWUA.js.map → chunk-HSMSTCNZ.js.map} +1 -1
- package/dist/{chunk-ECVTRAXN.js → chunk-IQOO3ZQK.js} +2 -2
- package/dist/{chunk-ECVTRAXN.js.map → chunk-IQOO3ZQK.js.map} +1 -1
- package/dist/{chunk-DBP3N6E5.js → chunk-JBL6SCNN.js} +3 -3
- package/dist/{chunk-DBP3N6E5.js.map → chunk-JBL6SCNN.js.map} +1 -1
- package/dist/{chunk-7KN5OQVN.js → chunk-JNQBPRAA.js} +2 -2
- package/dist/{chunk-7KN5OQVN.js.map → chunk-JNQBPRAA.js.map} +1 -1
- package/dist/{chunk-CPTQABDQ.js → chunk-JNSPYECP.js} +2 -2
- package/dist/{chunk-CPTQABDQ.js.map → chunk-JNSPYECP.js.map} +1 -1
- package/dist/{chunk-E7Q6UNCB.js → chunk-KBDYXGYT.js} +2 -2
- package/dist/{chunk-E7Q6UNCB.js.map → chunk-KBDYXGYT.js.map} +1 -1
- package/dist/{chunk-WVQDIOD7.js → chunk-KKMZP3YL.js} +2 -2
- package/dist/{chunk-WVQDIOD7.js.map → chunk-KKMZP3YL.js.map} +1 -1
- package/dist/{chunk-WSPXSWFG.js → chunk-KZEHTRPC.js} +3 -3
- package/dist/chunk-KZEHTRPC.js.map +1 -0
- package/dist/{chunk-KACJOE2N.js → chunk-LH5V6XGH.js} +2 -2
- package/dist/{chunk-KACJOE2N.js.map → chunk-LH5V6XGH.js.map} +1 -1
- package/dist/{chunk-VBXKYT4O.js → chunk-LH7YRRY7.js} +2 -2
- package/dist/{chunk-VBXKYT4O.js.map → chunk-LH7YRRY7.js.map} +1 -1
- package/dist/{chunk-QXXLDY6I.js → chunk-LI7AQ5NQ.js} +4 -4
- package/dist/{chunk-QXXLDY6I.js.map → chunk-LI7AQ5NQ.js.map} +1 -1
- package/dist/chunk-LK3QJHVX.js +19 -0
- package/dist/chunk-LK3QJHVX.js.map +1 -0
- package/dist/{chunk-LETAE6SX.js → chunk-LSFPZR52.js} +4 -4
- package/dist/{chunk-LETAE6SX.js.map → chunk-LSFPZR52.js.map} +1 -1
- package/dist/{chunk-CRHKWHTA.js → chunk-LUWZ7UZQ.js} +4 -4
- package/dist/{chunk-CRHKWHTA.js.map → chunk-LUWZ7UZQ.js.map} +1 -1
- package/dist/{chunk-CMG4OZPV.js → chunk-LWWIBUDK.js} +2 -2
- package/dist/{chunk-CMG4OZPV.js.map → chunk-LWWIBUDK.js.map} +1 -1
- package/dist/{chunk-LOW7J7SE.js → chunk-MHF2NK7F.js} +4 -4
- package/dist/{chunk-LOW7J7SE.js.map → chunk-MHF2NK7F.js.map} +1 -1
- package/dist/{chunk-JHUEYWWI.js → chunk-MPM6YBOM.js} +2 -2
- package/dist/{chunk-JHUEYWWI.js.map → chunk-MPM6YBOM.js.map} +1 -1
- package/dist/{chunk-ALBFHXMZ.js → chunk-MPT6Y7Z2.js} +87 -2
- package/dist/chunk-MPT6Y7Z2.js.map +1 -0
- package/dist/{chunk-OZKBIPXU.js → chunk-NO2XO7S6.js} +3 -3
- package/dist/{chunk-OZKBIPXU.js.map → chunk-NO2XO7S6.js.map} +1 -1
- package/dist/{chunk-FQETQ7CM.js → chunk-NSNQWDJ4.js} +2 -2
- package/dist/{chunk-FQETQ7CM.js.map → chunk-NSNQWDJ4.js.map} +1 -1
- package/dist/{chunk-F34LHBQI.js → chunk-OW2ODKHN.js} +9 -17
- package/dist/chunk-OW2ODKHN.js.map +1 -0
- package/dist/{chunk-PVKAIVKE.js → chunk-P427MACE.js} +63 -74
- package/dist/chunk-P427MACE.js.map +1 -0
- package/dist/{chunk-FR5G77K5.js → chunk-PJKH2GZ3.js} +2 -2
- package/dist/{chunk-FR5G77K5.js.map → chunk-PJKH2GZ3.js.map} +1 -1
- package/dist/{chunk-FNJA4S6J.js → chunk-QNA27ABY.js} +3 -3
- package/dist/{chunk-FNJA4S6J.js.map → chunk-QNA27ABY.js.map} +1 -1
- package/dist/chunk-QYOPZ2XS.js +124 -0
- package/dist/chunk-QYOPZ2XS.js.map +1 -0
- package/dist/{chunk-6BXPN5SC.js → chunk-RO3TSZ5W.js} +3 -3
- package/dist/{chunk-6BXPN5SC.js.map → chunk-RO3TSZ5W.js.map} +1 -1
- package/dist/{chunk-4IXG6XCT.js → chunk-RUCUU7Z7.js} +2 -2
- package/dist/{chunk-4IXG6XCT.js.map → chunk-RUCUU7Z7.js.map} +1 -1
- package/dist/{chunk-2FA3SX57.js → chunk-RYBJ7OZB.js} +4 -4
- package/dist/{chunk-2FA3SX57.js.map → chunk-RYBJ7OZB.js.map} +1 -1
- package/dist/{chunk-QSJAIXLM.js → chunk-SDQZYSCA.js} +3 -3
- package/dist/{chunk-QSJAIXLM.js.map → chunk-SDQZYSCA.js.map} +1 -1
- package/dist/{chunk-3XSY5LAB.js → chunk-SXZTDJMG.js} +4 -4
- package/dist/{chunk-3XSY5LAB.js.map → chunk-SXZTDJMG.js.map} +1 -1
- package/dist/{chunk-UD5KHQOH.js → chunk-T7M5FKCE.js} +28 -4
- package/dist/chunk-T7M5FKCE.js.map +1 -0
- package/dist/{chunk-KS7EXW4P.js → chunk-TIRBSPP2.js} +2 -2
- package/dist/{chunk-KS7EXW4P.js.map → chunk-TIRBSPP2.js.map} +1 -1
- package/dist/{chunk-XO5IOPM5.js → chunk-TNJGPG6R.js} +8 -8
- package/dist/{chunk-XO5IOPM5.js.map → chunk-TNJGPG6R.js.map} +1 -1
- package/dist/{chunk-73LC3JAL.js → chunk-U5SQOZNK.js} +4 -4
- package/dist/{chunk-73LC3JAL.js.map → chunk-U5SQOZNK.js.map} +1 -1
- package/dist/{chunk-Y4VR6VNM.js → chunk-UPOS666Q.js} +2 -2
- package/dist/{chunk-Y4VR6VNM.js.map → chunk-UPOS666Q.js.map} +1 -1
- package/dist/{chunk-YE6KCAIN.js → chunk-USSGJ3MD.js} +2 -2
- package/dist/{chunk-YE6KCAIN.js.map → chunk-USSGJ3MD.js.map} +1 -1
- package/dist/{chunk-4UWLHKNU.js → chunk-UWLJ7UEK.js} +3 -3
- package/dist/{chunk-4UWLHKNU.js.map → chunk-UWLJ7UEK.js.map} +1 -1
- package/dist/{chunk-SNUDT6AX.js → chunk-VHAYQGWR.js} +2 -2
- package/dist/{chunk-SNUDT6AX.js.map → chunk-VHAYQGWR.js.map} +1 -1
- package/dist/{chunk-DV6GE57V.js → chunk-VWGRAE2Q.js} +2 -2
- package/dist/chunk-VWGRAE2Q.js.map +1 -0
- package/dist/{chunk-4L5ZIKDZ.js → chunk-W7J3MQNV.js} +2 -2
- package/dist/{chunk-4L5ZIKDZ.js.map → chunk-W7J3MQNV.js.map} +1 -1
- package/dist/{chunk-MVWR5WRX.js → chunk-WWDDKUDW.js} +3 -3
- package/dist/{chunk-MVWR5WRX.js.map → chunk-WWDDKUDW.js.map} +1 -1
- package/dist/{chunk-WEQNPYVA.js → chunk-XXKRHKFH.js} +2 -2
- package/dist/{chunk-WEQNPYVA.js.map → chunk-XXKRHKFH.js.map} +1 -1
- package/dist/{chunk-Q7RILH2D.js → chunk-XZ253TGP.js} +32 -6
- package/dist/chunk-XZ253TGP.js.map +1 -0
- package/dist/{chunk-3TBMGGTA.js → chunk-Y672Z7QY.js} +2 -2
- package/dist/{chunk-3TBMGGTA.js.map → chunk-Y672Z7QY.js.map} +1 -1
- package/dist/{chunk-MMOQR426.js → chunk-YS3H6DEQ.js} +2 -2
- package/dist/{chunk-MMOQR426.js.map → chunk-YS3H6DEQ.js.map} +1 -1
- package/dist/{chunk-QR7MGGOM.js → chunk-YVGHWCMY.js} +3 -3
- package/dist/{chunk-QR7MGGOM.js.map → chunk-YVGHWCMY.js.map} +1 -1
- package/dist/{chunk-4CYCJ3NY.js → chunk-Z4PGAYO7.js} +10 -10
- package/dist/{chunk-4CYCJ3NY.js.map → chunk-Z4PGAYO7.js.map} +1 -1
- package/dist/{chunk-JAC6AVZN.js → chunk-ZIZXXYXM.js} +3 -3
- package/dist/{chunk-JAC6AVZN.js.map → chunk-ZIZXXYXM.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +5 -5
- package/dist/collapsible-panel.js +4 -4
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/color-field.js +2 -2
- package/dist/color-picker.js +1 -1
- package/dist/color-swatches.js +1 -1
- package/dist/column-explorer.d.ts +2 -2
- package/dist/column-explorer.js +166 -20
- package/dist/column-explorer.js.map +1 -1
- package/dist/column-track.d.ts +21 -3
- package/dist/column-track.js +1 -1
- package/dist/combobox.d.ts +3 -3
- package/dist/combobox.js +1 -1
- package/dist/content-item.d.ts +1 -1
- package/dist/content-item.js +1 -1
- package/dist/content-swap.d.ts +3 -3
- package/dist/content-swap.js +1 -1
- package/dist/corner-status.d.ts +3 -3
- package/dist/corner-status.js +1 -1
- package/dist/device-class.js +101 -1
- package/dist/device-class.js.map +1 -1
- package/dist/disclosure-arrow.d.ts +3 -3
- package/dist/disclosure-arrow.js +1 -1
- package/dist/disclosure.d.ts +14 -2
- package/dist/disclosure.js +13 -4
- package/dist/disclosure.js.map +1 -1
- package/dist/edge-activity-indicator.d.ts +3 -3
- package/dist/edge-activity-indicator.js +1 -1
- package/dist/empty-state.d.ts +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/{extension-attributes-IJ4decoa.d.ts → extension-attributes-CnqvBmj3.d.ts} +1 -1
- package/dist/file-picker.d.ts +3 -3
- package/dist/file-picker.js +1 -1
- package/dist/floating-toolbar.d.ts +3 -3
- package/dist/floating-toolbar.js +1 -1
- package/dist/form.d.ts +3 -3
- package/dist/form.js +1 -1
- package/dist/framed-list.js +1 -1
- package/dist/gauge.js +1 -1
- package/dist/grid.js +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +70 -68
- package/dist/list-action-row.js +1 -1
- package/dist/list-detail-dialog.d.ts +3 -3
- package/dist/list-detail-dialog.js +7 -7
- package/dist/list-detail-dialog.js.map +1 -1
- package/dist/list-header.d.ts +1 -1
- package/dist/list-header.js +2 -1
- package/dist/list-inset-control.d.ts +3 -3
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.d.ts +1 -1
- package/dist/list.js +1 -1
- package/dist/loading-spinner.d.ts +3 -3
- package/dist/loading-spinner.js +1 -1
- package/dist/lucide-icon.d.ts +3 -3
- package/dist/lucide-icon.js +1 -1
- package/dist/message-composer.js +2 -1
- package/dist/{nav-stack-DKrvqFjA.d.ts → nav-stack-IKSMxo2A.d.ts} +3 -3
- package/dist/nav-stack.d.ts +2 -2
- package/dist/nav-stack.js +1 -1
- package/dist/paged-view.d.ts +3 -3
- package/dist/paged-view.js +1 -1
- package/dist/paged-view.js.map +1 -1
- package/dist/pane.js +1 -1
- package/dist/popup-menu-register.js +1 -1
- package/dist/popup-menu.d.ts +1 -20
- package/dist/popup-menu.js +1 -1
- package/dist/progress-bar.js +1 -1
- package/dist/progress-ring.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/resizable-region.d.ts +3 -3
- package/dist/resizable-region.js +1 -1
- package/dist/row.d.ts +1 -1
- package/dist/row.js +1 -1
- package/dist/scroll-effect.d.ts +1 -1
- package/dist/scroll-effect.js +1 -1
- package/dist/{search-field-5lNIszda.d.ts → search-field-BA48RaJY.d.ts} +13 -4
- package/dist/search-field-model.d.ts +2 -2
- package/dist/search-field.d.ts +2 -2
- package/dist/search-field.js +1 -1
- package/dist/segmented-control.d.ts +3 -3
- package/dist/segmented-control.js +1 -1
- package/dist/select-register.js +2 -2
- package/dist/select-register.js.map +1 -1
- package/dist/select.d.ts +3 -13
- package/dist/select.js +1 -1
- package/dist/sized-region.d.ts +3 -3
- package/dist/sized-region.js +1 -1
- package/dist/skeleton.d.ts +3 -3
- package/dist/skeleton.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/spacer.d.ts +3 -3
- package/dist/spacer.js +1 -1
- package/dist/split-button.js +1 -1
- package/dist/split-middle-De745N2j.d.ts +7 -0
- package/dist/split-view.d.ts +4 -4
- package/dist/split-view.js +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/components/actions/popup-menu/popup-menu.css +0 -124
- package/dist/styles/components/actions/toolbar/toolbar.css +0 -7
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +9 -1
- package/dist/styles/components/collections/framed-list/framed-list.css +7 -3
- package/dist/styles/components/collections/list-action-row/list-action-row.css +5 -1
- package/dist/styles/components/forms/radio-group/radio-group.css +8 -4
- package/dist/styles/components/forms/search-field/search-field.css +98 -0
- package/dist/styles/components/forms/select/select.css +0 -60
- package/dist/styles/components/forms/text-field/text-field.css +1 -1
- package/dist/styles/components/navigation/tab-bar-item/tab-bar-item.css +33 -3
- package/dist/styles/components/surfaces/disclosure/disclosure.css +24 -4
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +1 -1
- package/dist/styles/components/typography/text/text.css +2 -2
- package/dist/styles/disclosure.css +24 -4
- package/dist/styles/framed-list.css +7 -3
- package/dist/styles/list-action-row.css +5 -1
- package/dist/styles/popup-menu.css +0 -124
- package/dist/styles/radio-group.css +8 -4
- package/dist/styles/search-field.css +98 -0
- package/dist/styles/select.css +0 -60
- package/dist/styles/surface-scaffold.css +1 -1
- package/dist/styles/tab-bar-item.css +33 -3
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/text.css +2 -2
- package/dist/styles/toolbar-control-group.css +9 -1
- package/dist/styles/toolbar.css +0 -7
- package/dist/styles/webawesome.css +7 -0
- package/dist/summary-row.js +1 -1
- package/dist/sunken-panel.d.ts +3 -3
- package/dist/sunken-panel.js +1 -1
- package/dist/surface-scaffold.d.ts +9 -5
- package/dist/surface-scaffold.js +1 -1
- package/dist/switch.js +1 -1
- package/dist/tab-bar-item.d.ts +26 -2
- package/dist/tab-bar-item.js +2 -1
- package/dist/tab-bar.d.ts +3 -3
- package/dist/tab-bar.js +1 -1
- package/dist/tab-navigator.d.ts +3 -3
- package/dist/tab-navigator.js +2 -2
- package/dist/tab-navigator.js.map +1 -1
- package/dist/tab-panel.d.ts +3 -3
- package/dist/tab-panel.js +1 -1
- package/dist/tag-field.d.ts +3 -3
- package/dist/tag-field.js +1 -1
- package/dist/text-field.d.ts +2 -2
- package/dist/text-field.js +1 -1
- package/dist/text.d.ts +3 -2
- package/dist/text.js +2 -1
- package/dist/toolbar-control-group.d.ts +7 -7
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.d.ts +3 -3
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +3 -3
- package/dist/toolbar.js +1 -1
- package/dist/tree-list.d.ts +3 -3
- package/dist/tree-list.js +151 -3
- package/dist/tree-list.js.map +1 -1
- package/dist/{tree-rows-Bms5QJvG.d.ts → tree-rows-BXChApji.d.ts} +1 -1
- package/dist/value-preview.d.ts +3 -3
- package/dist/value-preview.js +1 -1
- package/dist/value-table.d.ts +5 -5
- package/dist/value-table.js +1 -1
- package/dist/wire-catalog.d.ts +2 -2
- package/dist/wire-catalog.js +2 -2
- package/dist/wire-color-fields.js +73 -2
- package/dist/wire-color-fields.js.map +1 -1
- package/dist/wire-color-pickers.js +1 -1
- package/dist/wire-column-explorer.js +92 -1
- package/dist/wire-column-explorer.js.map +1 -1
- package/dist/wire-column-tracks.d.ts +13 -0
- package/dist/wire-column-tracks.js +4 -0
- package/dist/wire-column-tracks.js.map +1 -0
- package/dist/wire-content-items.js +204 -1
- package/dist/wire-content-items.js.map +1 -1
- package/dist/wire-nav-stack.js +423 -1
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-search-fields.d.ts +2 -2
- package/dist/wire-search-fields.js +1 -1
- package/dist/wire-sidebar.js +228 -1
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-sliders.js +29 -1
- package/dist/wire-sliders.js.map +1 -1
- package/dist/wire-tab-bars.d.ts +1 -1
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-navigator.js +150 -1
- package/dist/wire-tab-navigator.js.map +1 -1
- package/dist/wire-tag-fields.js +252 -2
- package/dist/wire-tag-fields.js.map +1 -1
- package/dist/wire-tree-list.js +186 -1
- package/dist/wire-tree-list.js.map +1 -1
- package/dist/wire-workbench.js +1 -1
- package/dist/workbench-dialog.d.ts +3 -3
- package/dist/workbench-dialog.js +5 -5
- package/dist/workbench-dialog.js.map +1 -1
- package/dist/workbench.d.ts +4 -4
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +18 -5
- package/docs/component-contract.md +4 -3
- package/docs/component-selection.md +14 -5
- package/docs/disclosure.md +22 -0
- package/docs/layout.md +11 -0
- package/docs/list-detail-dialog.md +2 -3
- package/docs/scroll-effect.md +2 -2
- package/docs/surface-scaffold.md +5 -6
- package/docs/workbench-dialog.md +2 -3
- package/llms.txt +10 -46
- package/package.json +7 -33
- package/ux-demo/recipes/app-shell.tsx +141 -48
- package/ux-demo/recipes/collapsible-sidebar.tsx +169 -43
- package/ux-demo/recipes/compact-toolbar.tsx +114 -22
- package/ux-demo/recipes/composer-form.tsx +104 -14
- package/ux-demo/recipes/list-detail-dialog.tsx +84 -38
- package/ux-demo/recipes/list-workspace-states.tsx +152 -29
- package/ux-demo/recipes/loading-inspector.tsx +174 -30
- package/ux-demo/recipes/media-detail.tsx +146 -29
- package/ux-demo/recipes/navigation-sidebar.tsx +113 -24
- package/ux-demo/recipes/navigation-stack.tsx +43 -7
- package/ux-demo/recipes/workspace-header.tsx +66 -2
- package/ai/component-props-overlay.json +0 -8892
- package/ai/component-props-overlay.schema.json +0 -82
- package/ai/component-props.json +0 -34203
- package/ai/component-props.schema.json +0 -408
- package/ai/view-document.schema.json +0 -467
- package/dist/browser/editor.js +0 -50
- package/dist/chunk-3K5V3ZSD.js +0 -77
- package/dist/chunk-3K5V3ZSD.js.map +0 -1
- package/dist/chunk-63TJH2RF.js +0 -231
- package/dist/chunk-63TJH2RF.js.map +0 -1
- package/dist/chunk-6V6UHPJD.js +0 -153
- package/dist/chunk-6V6UHPJD.js.map +0 -1
- package/dist/chunk-76BLSFEA.js.map +0 -1
- package/dist/chunk-ALBFHXMZ.js.map +0 -1
- package/dist/chunk-ASU4ODOH.js.map +0 -1
- package/dist/chunk-BMUYZKXW.js +0 -155
- package/dist/chunk-BMUYZKXW.js.map +0 -1
- package/dist/chunk-COQI4OMZ.js.map +0 -1
- package/dist/chunk-D2KHQNJ6.js +0 -155
- package/dist/chunk-D2KHQNJ6.js.map +0 -1
- package/dist/chunk-DV6GE57V.js.map +0 -1
- package/dist/chunk-ECJHCPBN.js.map +0 -1
- package/dist/chunk-F34LHBQI.js.map +0 -1
- package/dist/chunk-GHV36C6I.js +0 -94
- package/dist/chunk-GHV36C6I.js.map +0 -1
- package/dist/chunk-HHEBNP6Z.js +0 -256
- package/dist/chunk-HHEBNP6Z.js.map +0 -1
- package/dist/chunk-HPOXLOVC.js +0 -184
- package/dist/chunk-HPOXLOVC.js.map +0 -1
- package/dist/chunk-I2K4OQKB.js +0 -426
- package/dist/chunk-I2K4OQKB.js.map +0 -1
- package/dist/chunk-PVKAIVKE.js.map +0 -1
- package/dist/chunk-Q7RILH2D.js.map +0 -1
- package/dist/chunk-RGB4DPMN.js.map +0 -1
- package/dist/chunk-S7QB5KMM.js.map +0 -1
- package/dist/chunk-SGYBIKQA.js.map +0 -1
- package/dist/chunk-TXBNPEIJ.js +0 -31
- package/dist/chunk-TXBNPEIJ.js.map +0 -1
- package/dist/chunk-UD5KHQOH.js.map +0 -1
- package/dist/chunk-UU37OR3D.js.map +0 -1
- package/dist/chunk-WCMGPAY2.js +0 -103
- package/dist/chunk-WCMGPAY2.js.map +0 -1
- package/dist/chunk-WSPXSWFG.js.map +0 -1
- package/dist/chunk-WUVHP3UC.js.map +0 -1
- package/dist/chunk-X43QQWVC.js +0 -208
- package/dist/chunk-X43QQWVC.js.map +0 -1
- package/dist/editor.d.ts +0 -447
- package/dist/editor.js +0 -15604
- package/dist/editor.js.map +0 -1
- package/dist/styles/editor/editor.css +0 -585
- package/dist/styles/editor.css +0 -4
- package/dist/view-runtime.d.ts +0 -9
- package/dist/view-runtime.js +0 -8
- package/dist/view-runtime.js.map +0 -1
- package/docs/editor-host.md +0 -397
- package/docs/view.md +0 -314
- package/props/cli.d.mts +0 -1
- package/props/cli.mjs +0 -142
- package/props/component-props.d.mts +0 -180
- package/props/component-props.mjs +0 -1208
- package/view/catalog.mjs +0 -229
- package/view/child-kind.mjs +0 -22
- package/view/cli.d.mts +0 -18
- package/view/cli.mjs +0 -316
- package/view/contract.mjs +0 -418
- package/view/css-grammar.mjs +0 -93
- package/view/generate.d.mts +0 -16
- package/view/generate.mjs +0 -739
- package/view/index.d.mts +0 -491
- package/view/index.mjs +0 -36
- package/view/interpret.mjs +0 -339
- package/view/project-types-worker.mjs +0 -55
- package/view/project-types.d.mts +0 -43
- package/view/project-types.mjs +0 -618
- package/view/type-expression.d.mts +0 -15
- package/view/type-expression.mjs +0 -162
- package/view/types.mjs +0 -165
- package/view/validate-move.mjs +0 -353
- package/view/validate.mjs +0 -1649
- package/vite-editor.d.mts +0 -173
- package/vite-editor.mjs +0 -548
package/docs/view.md
DELETED
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
# View documents
|
|
2
|
-
|
|
3
|
-
A view document (`*.kui.json`, format `kerf-ui-document/v1`) describes one
|
|
4
|
-
screen or component built from Kerf UI and your own components: which
|
|
5
|
-
components, how they nest, their prop values, and the inputs, actions, slots,
|
|
6
|
-
and named nodes your application code works with. The Kerf UI editor writes
|
|
7
|
-
these documents; tools and AI agents may write them too.
|
|
8
|
-
|
|
9
|
-
You never ship the document's markup by hand. Either generate a read-only
|
|
10
|
-
TypeScript module from it with `kerf-ui-view`, or render it at runtime with
|
|
11
|
-
`interpretView`. Both come from `@kerfjs/ui`, and both behave the same.
|
|
12
|
-
|
|
13
|
-
The full design, with every rule and diagnostic, is
|
|
14
|
-
[`docs/26-ui-editor.md`](../../docs/26-ui-editor.md). This guide covers what an
|
|
15
|
-
application needs.
|
|
16
|
-
|
|
17
|
-
## Files
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
inbox.kui.json the document (the editor's source of truth)
|
|
21
|
-
inbox.view.ts generated, read-only; never edit it
|
|
22
|
-
inbox.ts yours: state, handlers, slot content, wiring
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
The generated module sits beside its document. Add `**/*.view.ts` (and
|
|
26
|
-
`*.view.js` / `*.view.d.ts`) to `.prettierignore`: reformatting a generated
|
|
27
|
-
module changes its body digest, and the checks below then report it as edited.
|
|
28
|
-
|
|
29
|
-
## The document format
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"$schema": "https://raw.githubusercontent.com/brianwestphal/kerf/main/ui/ai/view-document.schema.json",
|
|
34
|
-
"schema": "kerf-ui-document/v1",
|
|
35
|
-
"name": "Inbox",
|
|
36
|
-
"catalogs": ["@kerfjs/ui"],
|
|
37
|
-
"params": {
|
|
38
|
-
"title": { "type": { "kind": "string" }, "default": "Inbox" }
|
|
39
|
-
},
|
|
40
|
-
"root": {
|
|
41
|
-
"id": "01JB8Z1M6Q8E1X9V4S7K2R3T5A",
|
|
42
|
-
"type": "@kerfjs/ui:pane",
|
|
43
|
-
"zones": {
|
|
44
|
-
"header": [
|
|
45
|
-
{
|
|
46
|
-
"id": "01JB8Z1M6Q8E1X9V4S7K2R3T5B",
|
|
47
|
-
"type": "@kerfjs/ui:toolbar-text",
|
|
48
|
-
"props": { "label": { "$param": "title" }, "size": "xl" }
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
- **`name`** is the PascalCase component name. Every generated identifier
|
|
57
|
-
derives from it (`renderInbox`, `InboxInputs`, `inboxContract`).
|
|
58
|
-
- **`catalogs`** lists the packages or catalog files whose components the
|
|
59
|
-
document uses.
|
|
60
|
-
- **`params`** are the document's typed inputs. A param with a `default` is an
|
|
61
|
-
optional input; one with `"optional": true` may be omitted.
|
|
62
|
-
- **`root`** is one node.
|
|
63
|
-
|
|
64
|
-
A **node** is `{ id, type, name?, props?, zones? }`. `type` is the component's
|
|
65
|
-
catalog key (`@kerfjs/ui:button`, or `package:id#Export` for an entry's second
|
|
66
|
-
export), or one of the built-ins `#text` and `#view` (another document). `id` is
|
|
67
|
-
an immutable ULID. A `name` (camelCase) makes the node a ref your code can
|
|
68
|
-
reach. `zones` maps each zone or content prop to its ordered children.
|
|
69
|
-
|
|
70
|
-
Prop values are JSON literals or one of these forms. There are no expressions:
|
|
71
|
-
a value that needs computing becomes a param.
|
|
72
|
-
|
|
73
|
-
| Form | Meaning |
|
|
74
|
-
| -------------------------- | --------------------------------------------------------------- |
|
|
75
|
-
| `{ "$param": "title" }` | A document param |
|
|
76
|
-
| `{ "$bind": "item.x" }` | A path into an enclosing `$each` item, or into a param |
|
|
77
|
-
| `{ "$action": "save" }` | An action name, on action props only; becomes a typed handler |
|
|
78
|
-
| `{ "$css": "space('m')" }` | One `@kerfjs/ui/css-values` builder call with literal arguments |
|
|
79
|
-
| `{ "$icon": "inbox" }` | A Lucide icon by its kebab-case name |
|
|
80
|
-
| `{ "$slot": "detail" }` | Content your application renders, inside a list or object value |
|
|
81
|
-
|
|
82
|
-
Zone children are nodes, `#text` runs, and three control-flow forms:
|
|
83
|
-
|
|
84
|
-
- **`$each`**: `{ "$each": <array>, "as": "item", "key": "item.id", "template": <node> }`
|
|
85
|
-
renders one keyed row per item. `template` may also be an `$if` chain that
|
|
86
|
-
picks a row design per item, or use `"templates"` plus `"kind"` to pick one
|
|
87
|
-
per item kind (a `default` entry is required).
|
|
88
|
-
- **`$if`**: `{ "$if": <boolean>, "then": <child>, "else"?: <child> }`.
|
|
89
|
-
- **`$slot`**: `{ "$slot": "detail" }`, a hole your application fills with
|
|
90
|
-
`SafeHtml`.
|
|
91
|
-
|
|
92
|
-
Editors and IDEs validate the shape with
|
|
93
|
-
[`view-document.schema.json`](../ai/view-document.schema.json); `validateView`
|
|
94
|
-
checks everything the schema cannot (below).
|
|
95
|
-
|
|
96
|
-
## The generated module
|
|
97
|
-
|
|
98
|
-
`kerf-ui-view generate inbox.kui.json` writes `inbox.view.ts`:
|
|
99
|
-
|
|
100
|
-
```ts
|
|
101
|
-
export interface InboxInputs { readonly title?: string; … }
|
|
102
|
-
export type InboxAction = 'compose' | 'open-item';
|
|
103
|
-
export interface InboxHandlers { compose(context): void; 'open-item'(context): void }
|
|
104
|
-
export interface InboxSlots { detail(): SafeHtml }
|
|
105
|
-
export interface InboxRefs { readonly composeButton: HTMLElement; … }
|
|
106
|
-
export const inboxContract = 'kui1:5f0c2a9e7d41b3c8';
|
|
107
|
-
export function renderInbox(inputs: InboxInputs, slots: InboxSlots, rowKey?: string): SafeHtml;
|
|
108
|
-
export function wireInbox(root: HTMLElement, handlers: InboxHandlers): () => void;
|
|
109
|
-
export function inboxRefs(root: ParentNode): InboxRefs;
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Use it from your own file; never edit it:
|
|
113
|
-
|
|
114
|
-
```ts
|
|
115
|
-
import { mount } from 'kerfjs';
|
|
116
|
-
import { renderInbox, wireInbox } from './inbox.view.js';
|
|
117
|
-
|
|
118
|
-
mount(root, () =>
|
|
119
|
-
renderInbox(
|
|
120
|
-
{ title: 'Inbox', items: items.value },
|
|
121
|
-
{ detail: () => MessageDetail({ id: selectedId.value }) },
|
|
122
|
-
),
|
|
123
|
-
);
|
|
124
|
-
const dispose = wireInbox(root, {
|
|
125
|
-
compose: () => openComposer(),
|
|
126
|
-
'open-item': ({ key }) => (selectedId.value = key),
|
|
127
|
-
});
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
- **Inputs** are the params. A missing required input is a compile error.
|
|
131
|
-
- **Handlers** need exactly one function per action, so adding an action in the
|
|
132
|
-
document fails your build until you handle it, and removing one turns the
|
|
133
|
-
leftover handler into an error. An action inside an `$each` row gets the
|
|
134
|
-
row's `key` in its context.
|
|
135
|
-
- **Slots** return `SafeHtml`, so escaping stays enforced.
|
|
136
|
-
- **Refs** resolve named nodes by their `data-kerf-node` marker. A named node
|
|
137
|
-
inside a row becomes a `(key) => Element | null` lookup.
|
|
138
|
-
|
|
139
|
-
### The contract
|
|
140
|
-
|
|
141
|
-
The **contract** is the module's public surface: its inputs, actions and their
|
|
142
|
-
scope, slots, refs, and row kinds. `<name>Contract` is its digest (`kui1:` plus
|
|
143
|
-
16 hex digits). Layout, literal prop values, text, and unnamed nodes are not
|
|
144
|
-
part of it, so a purely visual edit leaves the digest, and your code,
|
|
145
|
-
unchanged.
|
|
146
|
-
|
|
147
|
-
The module's three-line header records the generator version, the contract and
|
|
148
|
-
source digests, a digest of the module body, and the contract itself, so tools
|
|
149
|
-
can compare contracts without the old document.
|
|
150
|
-
|
|
151
|
-
## The `kerf-ui-view` CLI
|
|
152
|
-
|
|
153
|
-
```sh
|
|
154
|
-
npx kerf-ui-view generate src/**/*.kui.json # write each module beside its document
|
|
155
|
-
npx kerf-ui-view check src/**/*.kui.json # fail on a missing, stale, or hand-edited module
|
|
156
|
-
npx kerf-ui-view diff src/**/*.kui.json # print the contract changes regenerating would make
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
| Option | Effect |
|
|
160
|
-
| ---------------------- | ------------------------------------------------------------------ |
|
|
161
|
-
| `--target ts\|js` | `.view.ts` (default), or `.view.js` plus `.view.d.ts` for no-build |
|
|
162
|
-
| `--declarations-only` | Omit `render<Name>`, for documents rendered with `interpretView` |
|
|
163
|
-
| `--props <file>` | Add a `component-props.json` catalog (repeatable) |
|
|
164
|
-
| `--composition <file>` | Add a `component-composition.json` catalog (repeatable) |
|
|
165
|
-
| `--no-profile` | Skip the catalogs `.kerf-ui-profile.json` files declare |
|
|
166
|
-
|
|
167
|
-
The CLI loads Kerf UI's catalogs plus every package catalog the
|
|
168
|
-
`.kerf-ui-profile.json` files above a document declare. Run `check` in CI.
|
|
169
|
-
|
|
170
|
-
`diff` lists breaking changes first: a required input added, an input removed
|
|
171
|
-
or narrowed, an action added or removed, a slot changed, a ref removed or
|
|
172
|
-
retyped. Optional inputs, widened types, and new refs are non-breaking. Your
|
|
173
|
-
compiler then reports exactly the call sites a breaking change affects.
|
|
174
|
-
|
|
175
|
-
### Catalog-owned views
|
|
176
|
-
|
|
177
|
-
The UX catalog uses this same path for compositions and recipes. Their editable sources live in
|
|
178
|
-
`ux-demo/views/`; the checked `*.view.ts` files beside them render the
|
|
179
|
-
component trees imported by the catalog hosts. The `headers.tsx` host keeps
|
|
180
|
-
`CatalogExample` framing, and the workspace recipe host keeps presentation and
|
|
181
|
-
command handling. The catalog's existing delegated actions handle the button
|
|
182
|
-
names and `data-recipe-command` values in the documents.
|
|
183
|
-
|
|
184
|
-
After editing a catalog document in the editor, run this command from `ui/` and
|
|
185
|
-
commit the document and generated module together:
|
|
186
|
-
|
|
187
|
-
```sh
|
|
188
|
-
npm run catalog:views:generate
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
`npm run check:catalog-views` fails when any module is missing, stale, or
|
|
192
|
-
hand-edited. Both `npm run check:change` and `npm run check` include that check.
|
|
193
|
-
|
|
194
|
-
## Rendering documents at runtime
|
|
195
|
-
|
|
196
|
-
A server-driven application loads documents at runtime instead of generating
|
|
197
|
-
`render<Name>`. Generate with `--declarations-only` to keep the typed inputs,
|
|
198
|
-
handlers, refs, and contract, then render with `interpretView`:
|
|
199
|
-
|
|
200
|
-
```ts
|
|
201
|
-
import { mount } from 'kerfjs';
|
|
202
|
-
import { createViewCatalog, interpretView } from '@kerfjs/ui/view';
|
|
203
|
-
import { Pane } from '@kerfjs/ui/pane';
|
|
204
|
-
import { ToolbarText } from '@kerfjs/ui/toolbar-text';
|
|
205
|
-
import props from '@kerfjs/ui/ai/component-props.json';
|
|
206
|
-
import composition from '@kerfjs/ui/ai/component-composition.json';
|
|
207
|
-
import { inboxContract } from './inbox.view.js';
|
|
208
|
-
|
|
209
|
-
const catalog = createViewCatalog({ props: [props], composition: [composition] });
|
|
210
|
-
|
|
211
|
-
mount(root, () =>
|
|
212
|
-
interpretView(served, {
|
|
213
|
-
catalog,
|
|
214
|
-
components: {
|
|
215
|
-
'@kerfjs/ui:pane': Pane,
|
|
216
|
-
'@kerfjs/ui:toolbar-text': ToolbarText,
|
|
217
|
-
},
|
|
218
|
-
inputs: { title: 'Inbox' },
|
|
219
|
-
contract: inboxContract,
|
|
220
|
-
// Render an app-owned notice instead of throwing (log `error.contract`).
|
|
221
|
-
onMismatch: (error) => updateRequiredNotice(error),
|
|
222
|
-
}),
|
|
223
|
-
);
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
`interpretView` validates the document and compares its contract digest with
|
|
227
|
-
the one your code compiled against. On a mismatch it throws a
|
|
228
|
-
`KuiContractMismatch` (with `expected`, `actual`, and the served `contract`), or
|
|
229
|
-
renders `onMismatch`'s fallback, so a server-side edit never silently breaks a
|
|
230
|
-
deployed client. Pass every component the document uses explicitly, so the
|
|
231
|
-
bundle stays static; pass `icons` (Lucide name to icon data) for `$icon`
|
|
232
|
-
values and `resolveView` for `#view` nodes. Its output matches the generated
|
|
233
|
-
module byte for byte.
|
|
234
|
-
|
|
235
|
-
## Validating documents
|
|
236
|
-
|
|
237
|
-
```ts
|
|
238
|
-
import { createViewCatalog, validateView } from '@kerfjs/ui/view';
|
|
239
|
-
|
|
240
|
-
const catalog = createViewCatalog({ props: [props], composition: [composition] });
|
|
241
|
-
const { valid, diagnostics, hints, actions } = validateView(document, catalog, {
|
|
242
|
-
resolveView: (src, path) => readDocument(path),
|
|
243
|
-
});
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Each diagnostic is `{ code, path, message }` with a stable code (`KUI-V001` to
|
|
247
|
-
`KUI-V017` for the document, `KUI-L2##` for composition rules); `hints` are
|
|
248
|
-
non-blocking advice (`KUI-H###`). `validateView` is pure and has no Node APIs,
|
|
249
|
-
so it runs in the browser. Add your own component package's catalogs to
|
|
250
|
-
`props` and `composition` (write `component-props.json` with `kerf-ui-props`).
|
|
251
|
-
|
|
252
|
-
## Never edit a generated module
|
|
253
|
-
|
|
254
|
-
`eslint-plugin-kerfjs`'s `kerfjs/no-generated-view-edits` rule reports a
|
|
255
|
-
`*.view.ts` / `*.view.js` file whose body no longer matches the digest in its
|
|
256
|
-
header. It needs no access to the document. The fix is always to regenerate;
|
|
257
|
-
to change the view, edit the document (in the editor, or as JSON) and run
|
|
258
|
-
`kerf-ui-view generate`.
|
|
259
|
-
|
|
260
|
-
## The `@kerfjs/ui/view` API
|
|
261
|
-
|
|
262
|
-
**Documents and rendering**
|
|
263
|
-
|
|
264
|
-
| Export | Use |
|
|
265
|
-
| ------------------------------------------- | ---------------------------------------------------------------------- |
|
|
266
|
-
| `createViewCatalog({ props, composition })` | Index component catalogs for the functions below |
|
|
267
|
-
| `validateView(document, catalog, options?)` | Diagnostics, hints, and the action scopes |
|
|
268
|
-
| `interpretView(document, options)` | Render a served document after its contract check |
|
|
269
|
-
| `KuiContractMismatch` | The error `interpretView` throws on a contract mismatch |
|
|
270
|
-
| `previewView(document, options)` | An editor's lenient preview: no validation, placeholders for bad nodes |
|
|
271
|
-
| `generateView(document, catalog, options?)` | The module source, declarations, contract, and digest |
|
|
272
|
-
| `GENERATOR_VERSION` | The generator version a header records |
|
|
273
|
-
| `readViewHeader(code)` | Parse a module header; `intact` is false after a hand edit |
|
|
274
|
-
| `viewModulePath(path, target?)` | `x.kui.json` to `x.view.ts` (or `.view.js`) |
|
|
275
|
-
| `composedViewPath(from, src)` | Where a `#view` `src` points, as `resolveView` receives it |
|
|
276
|
-
| `VIEW_DOCUMENT_SCHEMA_ID` | `'kerf-ui-document/v1'` |
|
|
277
|
-
|
|
278
|
-
**Contracts**
|
|
279
|
-
|
|
280
|
-
| Export | Use |
|
|
281
|
-
| ------------------------------- | ----------------------------------------------------------- |
|
|
282
|
-
| `contractOf(document, catalog)` | The contract of a valid document |
|
|
283
|
-
| `contractDigest(contract)` | Its `kui1:` digest |
|
|
284
|
-
| `diffContracts(before, after)` | Every change, each marked breaking or not |
|
|
285
|
-
| `serializeContract(contract)` | The contract line a header records |
|
|
286
|
-
| `canonicalJson(value)` | JSON with sorted keys and no whitespace, as digests hash it |
|
|
287
|
-
| `viewDigest(text)` | The `kui1:` hash of any text |
|
|
288
|
-
| `typeText(type)` | The TypeScript spelling of a param or slot-input type |
|
|
289
|
-
|
|
290
|
-
**Building tools on the format.** These serve editors and other tools that
|
|
291
|
-
read or change documents; `@kerfjs/ui/editor` uses each of them.
|
|
292
|
-
|
|
293
|
-
| Export | Use |
|
|
294
|
-
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
295
|
-
| `walkView(document, visit)` | Visit every node (with whether it is inside a row); returns slot names |
|
|
296
|
-
| `childKind(child)` / `classifyChild(child)` | A zone child's kind (`each`, `if`, `slot`, `view`, `node`); `classifyChild` pairs it with the child so a TypeScript `switch` narrows it |
|
|
297
|
-
| `createMoveCheck(document, catalog, id)` | Whether moving a node adds a problem, without a full validation |
|
|
298
|
-
| `isAssignable(from, to)` / `isLiteralOf(value, type)` | Type checks in the catalog's type grammar |
|
|
299
|
-
| `fieldZoneOf(component, definitions, key)` | Which prop field a field-zone key (`leftRail.content`) fills |
|
|
300
|
-
| `channelOf(component)` | How a component carries `data-*` attributes |
|
|
301
|
-
| `dataAttributeProblem(key)` | Why a `rootAttributes` key is not allowed, or undefined |
|
|
302
|
-
| `parseCssCall(source)` / `parseCssTree(source)` | Parse a `$css` value: its helper names, or its call tree |
|
|
303
|
-
| `lucideExportName(name)` | Lucide's export name for an icon (`a-arrow-down` to `AArrowDown`) |
|
|
304
|
-
|
|
305
|
-
The types (`ViewDocument`, `ViewNode`, `ViewChild`, `ViewEachChild`,
|
|
306
|
-
`ViewIfChild`, `ViewSlotChild`, `ViewType`, `ViewValue`, `ViewCatalog`,
|
|
307
|
-
`ViewDiagnostic`, `ViewValidation`, `ViewContract`, `ViewContractChange`,
|
|
308
|
-
`GeneratedView`) are exported alongside.
|
|
309
|
-
|
|
310
|
-
## See also
|
|
311
|
-
|
|
312
|
-
- [Editor host](./editor-host.md): run the editor in your app's dev server.
|
|
313
|
-
- [`view-document.schema.json`](../ai/view-document.schema.json): the shape
|
|
314
|
-
schema for editors and IDEs.
|
package/props/cli.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function run(argv: readonly string[]): { code: number; output: string };
|
package/props/cli.mjs
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// kerf-ui-props: writes or checks a component package's component-props.json
|
|
3
|
-
// (KF-B8TGP4: component packages ship the same prop schema as @kerfjs/ui), so
|
|
4
|
-
// the Kerf UI editor, view validator, and generator can use its components.
|
|
5
|
-
// Reads package.json#kerfComponentCatalog: `output` (the composition catalog
|
|
6
|
-
// create-kerf-component writes), `propsOutput` (where to write), and an
|
|
7
|
-
// optional `propsOverlay` of inspector hints. Run after the package's build.
|
|
8
|
-
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
9
|
-
import { resolve } from 'node:path';
|
|
10
|
-
import process from 'node:process';
|
|
11
|
-
import { fileURLToPath } from 'node:url';
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
CLI_USAGE_EXIT,
|
|
15
|
-
isMainModule,
|
|
16
|
-
parseCliArguments,
|
|
17
|
-
readJsonFile,
|
|
18
|
-
wantsHelp,
|
|
19
|
-
} from '../scripts/lib/cli-args.mjs';
|
|
20
|
-
import { validateJsonSchemaSubset } from '../scripts/lib/json-schema-subset.mjs';
|
|
21
|
-
import { buildPackageComponentProps } from './component-props.mjs';
|
|
22
|
-
|
|
23
|
-
const USAGE = `Usage: kerf-ui-props (--write | --check) [--root <package directory>]
|
|
24
|
-
|
|
25
|
-
Reads package.json#kerfComponentCatalog.output (composition catalog),
|
|
26
|
-
.propsOutput (destination), and optional .propsOverlay (inspector hints).
|
|
27
|
-
Run it after building the package: it reads the built declarations.
|
|
28
|
-
|
|
29
|
-
Options:
|
|
30
|
-
--write write the props catalog
|
|
31
|
-
--check fail when the props catalog is missing or stale
|
|
32
|
-
--root <path> package directory (default: current directory)
|
|
33
|
-
-h, --help show this help
|
|
34
|
-
|
|
35
|
-
Exit codes: 0 success, 1 stale catalog or schema problems, 2 usage or
|
|
36
|
-
input error.
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
// Every read names its file on failure (missing, unreadable, invalid JSON).
|
|
40
|
-
const readJson = (path) => readJsonFile(path);
|
|
41
|
-
const schemaPath = fileURLToPath(
|
|
42
|
-
new URL('../ai/component-props.schema.json', import.meta.url),
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
/** Runs one invocation; returns `{ code, output }` instead of exiting, for tests. */
|
|
46
|
-
export function run(argv) {
|
|
47
|
-
if (wantsHelp(argv)) return { code: 0, output: USAGE };
|
|
48
|
-
let options;
|
|
49
|
-
try {
|
|
50
|
-
({ options } = parseCliArguments(argv, {
|
|
51
|
-
values: { '--root': 'root' },
|
|
52
|
-
flags: { '--write': 'write', '--check': 'check' },
|
|
53
|
-
}));
|
|
54
|
-
if (options.write === options.check)
|
|
55
|
-
throw new Error('choose exactly one of --write or --check');
|
|
56
|
-
} catch (error) {
|
|
57
|
-
return { code: 2, output: `kerf-ui-props: ${error.message}\n\n${USAGE}` };
|
|
58
|
-
}
|
|
59
|
-
const write = options.write === true;
|
|
60
|
-
const root = resolve(options.root ?? process.cwd());
|
|
61
|
-
try {
|
|
62
|
-
return runIn(root, write);
|
|
63
|
-
} catch (error) {
|
|
64
|
-
return {
|
|
65
|
-
code: CLI_USAGE_EXIT,
|
|
66
|
-
output: `kerf-ui-props: ${error.message}\n`,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** Writes or checks the props catalog of the package at `root`. */
|
|
72
|
-
function runIn(root, write) {
|
|
73
|
-
const packagePath = resolve(root, 'package.json');
|
|
74
|
-
if (!existsSync(packagePath)) {
|
|
75
|
-
return { code: 2, output: `kerf-ui-props: no package.json in ${root}\n` };
|
|
76
|
-
}
|
|
77
|
-
const packageJson = readJson(packagePath);
|
|
78
|
-
const config = packageJson.kerfComponentCatalog ?? {};
|
|
79
|
-
const missing = ['output', 'propsOutput'].filter((key) => !config[key]);
|
|
80
|
-
if (missing.length) {
|
|
81
|
-
return {
|
|
82
|
-
code: 2,
|
|
83
|
-
output: `kerf-ui-props: package.json#kerfComponentCatalog needs ${missing.join(' and ')}\n`,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
const compositionPath = resolve(root, config.output);
|
|
87
|
-
if (!existsSync(compositionPath)) {
|
|
88
|
-
return {
|
|
89
|
-
code: 1,
|
|
90
|
-
output: `kerf-ui-props: ${config.output} is missing; run your catalog:generate script first\n`,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
const { document, problems } = buildPackageComponentProps({
|
|
94
|
-
root,
|
|
95
|
-
packageJson,
|
|
96
|
-
composition: readJson(compositionPath),
|
|
97
|
-
overlay: config.propsOverlay
|
|
98
|
-
? readJson(resolve(root, config.propsOverlay))
|
|
99
|
-
: undefined,
|
|
100
|
-
});
|
|
101
|
-
problems.push(
|
|
102
|
-
...validateJsonSchemaSubset(readJson(schemaPath), document).map(
|
|
103
|
-
(error) => `${config.propsOutput} ${error}`,
|
|
104
|
-
),
|
|
105
|
-
);
|
|
106
|
-
if (problems.length) {
|
|
107
|
-
return {
|
|
108
|
-
code: 1,
|
|
109
|
-
output: `${problems.map((problem) => `kerf-ui-props: ${problem}`).join('\n')}\n`,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
const text = `${JSON.stringify(document, null, 2)}\n`;
|
|
113
|
-
const outputPath = resolve(root, config.propsOutput);
|
|
114
|
-
if (write) {
|
|
115
|
-
writeFileSync(outputPath, text);
|
|
116
|
-
return {
|
|
117
|
-
code: 0,
|
|
118
|
-
output: `kerf-ui-props: wrote ${document.components.length} components to ${config.propsOutput}\n`,
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
const current = existsSync(outputPath)
|
|
122
|
-
? readFileSync(outputPath, 'utf8')
|
|
123
|
-
: undefined;
|
|
124
|
-
if (current !== text) {
|
|
125
|
-
return {
|
|
126
|
-
code: 1,
|
|
127
|
-
output: `kerf-ui-props: ${config.propsOutput} is ${current === undefined ? 'missing' : 'stale'}; run kerf-ui-props --write after building\n`,
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
return {
|
|
131
|
-
code: 0,
|
|
132
|
-
output: `kerf-ui-props: ${config.propsOutput} is up to date (${document.components.length} components)\n`,
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// npm runs bins through symlinks (node_modules/.bin); isMainModule compares
|
|
137
|
-
// real paths.
|
|
138
|
-
if (isMainModule(import.meta.url)) {
|
|
139
|
-
const result = run(process.argv.slice(2));
|
|
140
|
-
(result.code === 0 ? process.stdout : process.stderr).write(result.output);
|
|
141
|
-
process.exitCode = result.code;
|
|
142
|
-
}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import type ts from 'typescript';
|
|
2
|
-
|
|
3
|
-
export const COMPONENT_PROPS_SCHEMA_ID: 'kerf-ui-component-props/v1';
|
|
4
|
-
|
|
5
|
-
export type PropTypeKind =
|
|
6
|
-
| 'string'
|
|
7
|
-
| 'number'
|
|
8
|
-
| 'boolean'
|
|
9
|
-
| 'literal'
|
|
10
|
-
| 'enum'
|
|
11
|
-
| 'content'
|
|
12
|
-
| 'css-value'
|
|
13
|
-
| 'function'
|
|
14
|
-
| 'signal'
|
|
15
|
-
| 'element'
|
|
16
|
-
| 'array'
|
|
17
|
-
| 'record'
|
|
18
|
-
| 'object'
|
|
19
|
-
| 'union'
|
|
20
|
-
| 'ref'
|
|
21
|
-
| 'never'
|
|
22
|
-
| 'unknown';
|
|
23
|
-
|
|
24
|
-
export interface PropType {
|
|
25
|
-
kind: PropTypeKind;
|
|
26
|
-
text?: string;
|
|
27
|
-
nullable?: true;
|
|
28
|
-
acceptsText?: true;
|
|
29
|
-
typeParameter?: string;
|
|
30
|
-
value?: string | number | boolean;
|
|
31
|
-
values?: (string | number | boolean)[];
|
|
32
|
-
suggestions?: string[];
|
|
33
|
-
grammar?: string;
|
|
34
|
-
items?: PropType;
|
|
35
|
-
props?: PropDescriptor[];
|
|
36
|
-
members?: PropType[];
|
|
37
|
-
index?: { keyPrefix: string; value: PropType };
|
|
38
|
-
discriminant?: string[];
|
|
39
|
-
ref?: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface PropDescriptor {
|
|
43
|
-
name: string;
|
|
44
|
-
property?: string;
|
|
45
|
-
type: PropType;
|
|
46
|
-
required: boolean;
|
|
47
|
-
default?: string | number | boolean;
|
|
48
|
-
description?: string;
|
|
49
|
-
deprecated?: true;
|
|
50
|
-
variantOnly?: true;
|
|
51
|
-
zone?: string;
|
|
52
|
-
slot?: true;
|
|
53
|
-
iconSource?: 'lucide';
|
|
54
|
-
cssValue?: { grammar: string; helpers?: string[]; rawPolicy?: string };
|
|
55
|
-
control?: string;
|
|
56
|
-
group?: string;
|
|
57
|
-
/** The task-facing name the Inspector shows (Button text). */
|
|
58
|
-
label?: string;
|
|
59
|
-
subgroup?: string;
|
|
60
|
-
order?: number;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface PropsVariant {
|
|
64
|
-
when?: Record<string, string | number | boolean | undefined>;
|
|
65
|
-
required: string[];
|
|
66
|
-
forbidden: string[];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface PropsShape {
|
|
70
|
-
props: PropDescriptor[];
|
|
71
|
-
nativeAttributes: string[];
|
|
72
|
-
variants?: PropsVariant[];
|
|
73
|
-
discriminant?: string[];
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface ComponentProps extends Partial<PropsShape> {
|
|
77
|
-
key: string;
|
|
78
|
-
id: string;
|
|
79
|
-
source: 'kerf' | 'webawesome' | 'package';
|
|
80
|
-
import?: string;
|
|
81
|
-
export?: string;
|
|
82
|
-
tagName?: string;
|
|
83
|
-
description?: string;
|
|
84
|
-
typeParameters?: { name: string; constraint?: string }[];
|
|
85
|
-
groups?: string[];
|
|
86
|
-
props: PropDescriptor[];
|
|
87
|
-
slots?: { name: string; description?: string }[];
|
|
88
|
-
dataChannel?: 'rootAttributes' | 'native' | 'none';
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface ComponentPropsDocument {
|
|
92
|
-
$schema: string;
|
|
93
|
-
schema: typeof COMPONENT_PROPS_SCHEMA_ID;
|
|
94
|
-
package: string;
|
|
95
|
-
description: string;
|
|
96
|
-
components: ComponentProps[];
|
|
97
|
-
definitions: Record<string, PropType>;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface PropsContext {
|
|
101
|
-
checker: ts.TypeChecker;
|
|
102
|
-
ownDirectory: string;
|
|
103
|
-
definitions: Map<string, PropType>;
|
|
104
|
-
definitionNames: Map<ts.Type, string>;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export function createDeclarationProgram(
|
|
108
|
-
files: string[],
|
|
109
|
-
options?: ts.CompilerOptions,
|
|
110
|
-
): ts.Program;
|
|
111
|
-
export function createPropsContext(
|
|
112
|
-
checker: ts.TypeChecker,
|
|
113
|
-
ownDirectory: string,
|
|
114
|
-
): PropsContext;
|
|
115
|
-
export function describeType(
|
|
116
|
-
ctx: PropsContext,
|
|
117
|
-
type: ts.Type,
|
|
118
|
-
depth?: number,
|
|
119
|
-
): PropType;
|
|
120
|
-
export function describePropsType(ctx: PropsContext, type: ts.Type): PropsShape;
|
|
121
|
-
export function readComponentExport(
|
|
122
|
-
ctx: PropsContext,
|
|
123
|
-
sourceFile: ts.SourceFile,
|
|
124
|
-
name: string,
|
|
125
|
-
): (PropsShape & { export: string; description?: string }) | undefined;
|
|
126
|
-
export function parseDocumentedDefault(
|
|
127
|
-
text: string | undefined,
|
|
128
|
-
tagValue?: string,
|
|
129
|
-
): string | undefined;
|
|
130
|
-
export function coerceDefault(
|
|
131
|
-
raw: string | undefined,
|
|
132
|
-
descriptor: PropType,
|
|
133
|
-
): string | number | boolean | undefined;
|
|
134
|
-
export function describeCustomElement(declaration: unknown): {
|
|
135
|
-
props: PropDescriptor[];
|
|
136
|
-
slots: { name: string; description?: string }[];
|
|
137
|
-
};
|
|
138
|
-
export function applyCrossReferences(
|
|
139
|
-
component: { props: PropDescriptor[] },
|
|
140
|
-
references: {
|
|
141
|
-
zones?: { id: string; jsx?: { prop?: string } }[];
|
|
142
|
-
cssValueProps?: {
|
|
143
|
-
path: string;
|
|
144
|
-
grammar: string;
|
|
145
|
-
helpers?: string[];
|
|
146
|
-
rawPolicy?: string;
|
|
147
|
-
}[];
|
|
148
|
-
},
|
|
149
|
-
): void;
|
|
150
|
-
/** Generated inspector defaults: plumbing props get `control: 'hidden'`. */
|
|
151
|
-
export function applyControlDefaults(component: {
|
|
152
|
-
props: PropDescriptor[];
|
|
153
|
-
}): void;
|
|
154
|
-
export function applyOverlay(
|
|
155
|
-
component: ComponentProps,
|
|
156
|
-
overlay: unknown,
|
|
157
|
-
problems: string[],
|
|
158
|
-
): void;
|
|
159
|
-
export function buildComponentProps(inputs: {
|
|
160
|
-
root: string;
|
|
161
|
-
catalog: unknown;
|
|
162
|
-
composition: unknown;
|
|
163
|
-
overlay: unknown;
|
|
164
|
-
customElements: unknown;
|
|
165
|
-
}): { document: ComponentPropsDocument; problems: string[] };
|
|
166
|
-
export function readComponentPropsInputs(root: string): {
|
|
167
|
-
root: string;
|
|
168
|
-
catalog: unknown;
|
|
169
|
-
composition: unknown;
|
|
170
|
-
overlay: unknown;
|
|
171
|
-
customElements: unknown;
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
/** Builds a component package's component-props.json from its composition catalog and built declarations. */
|
|
175
|
-
export function buildPackageComponentProps(inputs: {
|
|
176
|
-
root: string;
|
|
177
|
-
packageJson: { name: string; exports?: unknown };
|
|
178
|
-
composition: unknown;
|
|
179
|
-
overlay?: unknown;
|
|
180
|
-
}): { document: ComponentPropsDocument; problems: string[] };
|