@kerfjs/ui 5.0.0-beta.131 → 5.0.0-beta.133
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 +26 -14
- 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/choice-wiring-mode.cjs +68 -0
- package/ai/component-catalog.json +13 -9
- package/ai/component-composition-rules.json +2 -10
- package/ai/component-composition.d.ts +0 -17
- package/ai/component-composition.json +9 -12
- package/ai/component-composition.schema.json +0 -59
- package/ai/components/combobox.md +1 -1
- package/ai/components/disclosure.md +2 -0
- package/ai/components/form.md +1 -2
- package/ai/components/popup-menu.md +1 -0
- package/ai/components/switch.md +1 -1
- package/ai/components/tab-panel.md +0 -1
- package/ai/components/toolbar-control-group.md +2 -2
- package/ai/public-api-signatures-v1.md +218 -205
- package/ai/skill.md +3 -20
- 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-library.d.ts +26 -0
- package/dist/catalog-library.js +2484 -0
- package/dist/catalog-library.js.map +1 -0
- package/dist/catalog-resources.d.ts +3 -3
- package/dist/catalog-resources.js +1 -20
- package/dist/catalog-resources.js.map +1 -1
- package/dist/catalog.d.ts +5 -4
- package/dist/catalog.js +151 -24
- 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-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-QZA75NOK.js → chunk-42NLFCIN.js} +6 -6
- package/dist/{chunk-QZA75NOK.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-5KWXM5O7.js → chunk-5C34PAUY.js} +2 -2
- package/dist/{chunk-5KWXM5O7.js.map → chunk-5C34PAUY.js.map} +1 -1
- 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-CUUW57WB.js → chunk-DXZA7OC6.js} +58 -14
- package/dist/chunk-DXZA7OC6.js.map +1 -0
- package/dist/{chunk-4OH6JSGU.js → chunk-F25UMYDX.js} +2 -2
- package/dist/{chunk-4OH6JSGU.js.map → chunk-F25UMYDX.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-2FA3SX57.js → chunk-IXT2ARIM.js} +4 -4
- package/dist/{chunk-2FA3SX57.js.map → chunk-IXT2ARIM.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-CAB5IWV7.js → chunk-LSFPZR52.js} +4 -4
- package/dist/{chunk-CAB5IWV7.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-3UEMBHBK.js → chunk-MPT6Y7Z2.js} +2 -2
- package/dist/{chunk-3UEMBHBK.js.map → chunk-MPT6Y7Z2.js.map} +1 -1
- 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-UOBC36FL.js → chunk-OW2ODKHN.js} +2 -2
- package/dist/{chunk-UOBC36FL.js.map → chunk-OW2ODKHN.js.map} +1 -1
- package/dist/{chunk-PVKAIVKE.js → chunk-P427MACE.js} +63 -74
- package/dist/chunk-P427MACE.js.map +1 -0
- package/dist/{chunk-LET362AM.js → chunk-PBXTHYB4.js} +2 -2
- package/dist/chunk-PBXTHYB4.js.map +1 -0
- package/dist/{chunk-C4FBYP2D.js → chunk-PIYFVFPL.js} +9 -3
- package/dist/chunk-PIYFVFPL.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-RHMY45DK.js → chunk-QNB5DKKP.js} +5 -5
- package/dist/{chunk-RHMY45DK.js.map → chunk-QNB5DKKP.js.map} +1 -1
- package/dist/{chunk-XO5IOPM5.js → chunk-QWAAR5JX.js} +8 -8
- package/dist/{chunk-XO5IOPM5.js.map → chunk-QWAAR5JX.js.map} +1 -1
- 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-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-LJV2FNOC.js → chunk-T7M5FKCE.js} +3 -3
- package/dist/{chunk-LJV2FNOC.js.map → chunk-T7M5FKCE.js.map} +1 -1
- 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-2GEGIPDR.js → chunk-U5SQOZNK.js} +4 -4
- package/dist/{chunk-2GEGIPDR.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-4CYCJ3NY.js → chunk-XNSYDA6G.js} +10 -10
- package/dist/{chunk-4CYCJ3NY.js.map → chunk-XNSYDA6G.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-OQFWF7Q7.js → chunk-XZ253TGP.js} +3 -3
- package/dist/{chunk-OQFWF7Q7.js.map → chunk-XZ253TGP.js.map} +1 -1
- 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-YM7VF5SY.js +22 -0
- package/dist/chunk-YM7VF5SY.js.map +1 -0
- package/dist/{chunk-S7QB5KMM.js → chunk-YRQ4KKLG.js} +29 -56
- package/dist/chunk-YRQ4KKLG.js.map +1 -0
- 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-IPYQYLSX.js → chunk-ZDI5I2HT.js} +6 -6
- package/dist/{chunk-IPYQYLSX.js.map → chunk-ZDI5I2HT.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 -21
- package/dist/column-explorer.js.map +1 -1
- package/dist/column-track.d.ts +1 -1
- package/dist/column-track.js +1 -1
- package/dist/combobox.d.ts +8 -4
- package/dist/combobox.js +1 -1
- package/dist/compose-B_GFfFhm.d.ts +36 -0
- 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 +2 -2
- package/dist/index.js +66 -66
- 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 +1 -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 +1 -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 +7 -1
- package/dist/popup-menu-register.js.map +1 -1
- package/dist/popup-menu.d.ts +3 -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-7wLt3Bd5.d.ts → search-field-BA48RaJY.d.ts} +3 -3
- 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 +3 -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-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 +12 -125
- package/dist/styles/components/actions/toolbar/toolbar.css +0 -7
- package/dist/styles/components/data-display/value-table/value-table.css +3 -1
- package/dist/styles/components/forms/select/select.css +0 -60
- package/dist/styles/components/forms/switch/switch.css +9 -0
- package/dist/styles/components/forms/text-field/text-field.css +1 -1
- 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/disclosure.css +24 -4
- package/dist/styles/popup-menu.css +12 -125
- package/dist/styles/select.css +0 -60
- package/dist/styles/surface-scaffold.css +1 -1
- package/dist/styles/switch.css +9 -0
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/toolbar.css +0 -7
- package/dist/styles/value-table.css +3 -1
- 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.d.ts +3 -1
- package/dist/switch.js +1 -1
- package/dist/tab-bar-item.js +1 -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 +1 -1
- package/dist/text.js +1 -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/{types-DmHWkSd6.d.ts → types-CuKf5G87.d.ts} +6 -2
- 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 +5 -5
- package/dist/wire-catalog.js +13 -4
- package/dist/wire-catalog.js.map +1 -1
- 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-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-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 +1 -1
- package/docs/catalog.md +59 -0
- package/docs/component-contract.md +4 -3
- package/docs/component-selection.md +7 -2
- package/docs/disclosure.md +22 -0
- package/docs/examples/composed-catalog.tsx +113 -0
- package/docs/examples/scoped-combobox.ts +99 -0
- package/docs/examples/typed-action-table.tsx +34 -0
- package/docs/forms-and-validation.md +2 -0
- package/docs/investigations/combobox-seed-ownership.md +49 -0
- package/docs/investigations/measure-scoped-combobox.mjs +87 -0
- package/docs/investigations/scoped-combobox.md +98 -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/switch.md +21 -0
- package/docs/ui-doctor.md +16 -0
- package/docs/workbench-dialog.md +2 -3
- package/doctor/cli.mjs +38 -25
- package/doctor/explain-use.mjs +320 -0
- package/llms.txt +3 -44
- package/package.json +6 -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 -8910
- package/ai/component-props-overlay.schema.json +0 -82
- package/ai/component-props.json +0 -34289
- 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-C4FBYP2D.js.map +0 -1
- package/dist/chunk-COQI4OMZ.js.map +0 -1
- package/dist/chunk-CUUW57WB.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-FCO7BT4P.js +0 -256
- package/dist/chunk-FCO7BT4P.js.map +0 -1
- package/dist/chunk-GHV36C6I.js +0 -94
- package/dist/chunk-GHV36C6I.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-LET362AM.js.map +0 -1
- package/dist/chunk-PVKAIVKE.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-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-X43QQWVC.js +0 -208
- package/dist/chunk-X43QQWVC.js.map +0 -1
- package/dist/chunk-YA6OAJY6.js +0 -155
- package/dist/chunk-YA6OAJY6.js.map +0 -1
- package/dist/editor.d.ts +0 -447
- package/dist/editor.js +0 -15608
- 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/editor-host.md
DELETED
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
# Editor host
|
|
2
|
-
|
|
3
|
-
The Kerf UI editor edits view documents (`*.kui.json`; see
|
|
4
|
-
[`docs/26-ui-editor.md`](../../docs/26-ui-editor.md)). It ships in two forms:
|
|
5
|
-
|
|
6
|
-
- **`@kerfjs/ui/vite-editor`**: a Vite plugin that runs the editor inside your
|
|
7
|
-
application's own dev server, so your components preview with their real
|
|
8
|
-
functions, CSS, and aliases.
|
|
9
|
-
- **`@kerfjs/ui/editor`**: the editor module itself, for a host that builds
|
|
10
|
-
its own page.
|
|
11
|
-
|
|
12
|
-
## Run it in your app
|
|
13
|
-
|
|
14
|
-
```ts
|
|
15
|
-
// vite.config.ts
|
|
16
|
-
import { kerfUiEditor } from "@kerfjs/ui/vite-editor";
|
|
17
|
-
import { defineConfig } from "vite";
|
|
18
|
-
|
|
19
|
-
export default defineConfig({
|
|
20
|
-
plugins: [kerfUiEditor()],
|
|
21
|
-
});
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Start the dev server and open `/__kerf-ui-editor/`. The plugin runs only on
|
|
25
|
-
the dev server; a production build never includes it.
|
|
26
|
-
|
|
27
|
-
The editor saves every change through the dev server. Until you choose a path
|
|
28
|
-
with **Save As…**, a document autosaves as a draft in `.kerf-ui-editor/drafts/`
|
|
29
|
-
at your project root; that folder holds its own `.gitignore`, so drafts never
|
|
30
|
-
reach git. After Save As, changes save to the `.kui.json` path you chose, and
|
|
31
|
-
the editor reopens it on your next visit. The plugin's file endpoint
|
|
32
|
-
(`/__kerf-ui-editor/api/file`) reads and writes only `.kui.json` files inside
|
|
33
|
-
the project, outside `node_modules` and `.git`, and only for requests the
|
|
34
|
-
editor itself makes. A host that mounts the editor itself passes
|
|
35
|
-
`createEditor({ catalog, storage: devServerStorage() })` and adds
|
|
36
|
-
`editorFileMiddleware(root)` to its server (and calls the middleware's
|
|
37
|
-
`dispose()` when the server closes). The same middleware lists the
|
|
38
|
-
project's documents (GET `/__kerf-ui-editor/api/files`: every `.kui.json`
|
|
39
|
-
outside `node_modules`, `dist`, `test-results`, and dot-folders), which
|
|
40
|
-
Add a child's **Existing document…** offers in a picker.
|
|
41
|
-
|
|
42
|
-
The editor offers Kerf UI's components and every component your
|
|
43
|
-
`.kerf-ui-profile.json` declares a catalog for. Generate your package's
|
|
44
|
-
`component-props.json` with `kerf-ui-props --write` and name it beside your
|
|
45
|
-
composition catalog:
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"schemaVersion": 1,
|
|
50
|
-
"scope": "workspace",
|
|
51
|
-
"catalogs": [
|
|
52
|
-
{
|
|
53
|
-
"package": "orders-app",
|
|
54
|
-
"composition": {
|
|
55
|
-
"path": "./component-composition.json",
|
|
56
|
-
"schemaVersion": 1
|
|
57
|
-
},
|
|
58
|
-
"props": { "path": "./component-props.json", "schemaVersion": 1 }
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Each component previews with the function its catalog entry names (`import`
|
|
65
|
-
and `export`), including components that live in your app's source. Your
|
|
66
|
-
components appear under **Application** in the palette, and adding one lists
|
|
67
|
-
your package in the document's `catalogs`. A component whose function cannot
|
|
68
|
-
be found previews as a labeled placeholder rather than failing the canvas.
|
|
69
|
-
|
|
70
|
-
Options:
|
|
71
|
-
|
|
72
|
-
- `route`: where the editor is served (default `/__kerf-ui-editor/`).
|
|
73
|
-
- `registry`: a module, resolved against Vite's `root`, whose default export
|
|
74
|
-
maps catalog keys to component functions, to add or replace the ones the
|
|
75
|
-
catalogs provide. Default: `src/kerf-ui-registry.ts` when it exists.
|
|
76
|
-
- `fieldEditors`: a module, resolved the same way, whose default export maps
|
|
77
|
-
type names to field editors (below). Default:
|
|
78
|
-
`src/kerf-ui-field-editors.ts` when it exists.
|
|
79
|
-
- `devicePresets`: a module, resolved the same way, whose default export is
|
|
80
|
-
play mode's device presets (see Play mode). Only loaded when named.
|
|
81
|
-
- `playHandlers`: a module, resolved the same way, whose default export maps
|
|
82
|
-
action names to play mode's mock handlers (see Play mode). Only loaded
|
|
83
|
-
when named.
|
|
84
|
-
|
|
85
|
-
```ts
|
|
86
|
-
// src/kerf-ui-registry.ts
|
|
87
|
-
import { CustomOrderCard } from "./custom-order-card.js";
|
|
88
|
-
|
|
89
|
-
export default {
|
|
90
|
-
// Replace the real function, including canvas and play rendering.
|
|
91
|
-
// Use libraryPreviews below for Library-only sample data.
|
|
92
|
-
"orders-app:order-card": CustomOrderCard,
|
|
93
|
-
};
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Field editors for your types
|
|
97
|
-
|
|
98
|
-
The Inspector edits an object prop in a form built from its type, a list of
|
|
99
|
-
objects item by item, strings as tags, and icon data in a picker. To edit one
|
|
100
|
-
of your types your own way, register a field editor for its name, a props
|
|
101
|
-
catalog definition such as `ShippingWindow`. It replaces the type-driven form
|
|
102
|
-
wherever a prop or field has that type, and Edit as JSON, Reset, and Fill
|
|
103
|
-
with example stay around it.
|
|
104
|
-
|
|
105
|
-
```tsx
|
|
106
|
-
// src/kerf-ui-field-editors.tsx (name it with the plugin's `fieldEditors`
|
|
107
|
-
// option; the default path is src/kerf-ui-field-editors.ts)
|
|
108
|
-
import { Button } from "@kerfjs/ui/button";
|
|
109
|
-
import type { FieldEditors } from "@kerfjs/ui/editor";
|
|
110
|
-
import { List } from "@kerfjs/ui/list";
|
|
111
|
-
|
|
112
|
-
const fieldEditors: FieldEditors = {
|
|
113
|
-
ShippingWindow: {
|
|
114
|
-
render: (context) => (
|
|
115
|
-
<List>
|
|
116
|
-
<List controlInsets="trbl" gap>
|
|
117
|
-
<Button
|
|
118
|
-
action={context.setAction}
|
|
119
|
-
rootAttributes={context.set({ from: "Mon", to: "Fri" })}
|
|
120
|
-
>
|
|
121
|
-
This week
|
|
122
|
-
</Button>
|
|
123
|
-
</List>
|
|
124
|
-
{context.form()}
|
|
125
|
-
</List>
|
|
126
|
-
),
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
export default fieldEditors;
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
`render(context)` receives:
|
|
134
|
-
|
|
135
|
-
- `value`, `type`, and `definitions`: the value being edited and its type.
|
|
136
|
-
- `commit(next)`: writes the next value as one undoable edit (`undefined`
|
|
137
|
-
unsets it).
|
|
138
|
-
- `setAction` and `set(next)`: a button with that `action` and those
|
|
139
|
-
`rootAttributes` sets the value to `next`.
|
|
140
|
-
- `control(path, kind)`: attributes for your own control (a `TextField`'s
|
|
141
|
-
`rootAttributes`, or a native input) that commits the field at `path` on
|
|
142
|
-
`change`, read as `text`, `number`, `switch`, `select`, or `list` (JSON).
|
|
143
|
-
- `form(path?)`: the type-driven form for the value, or for the object at
|
|
144
|
-
`path` inside it.
|
|
145
|
-
|
|
146
|
-
A field editor may also name its `container` (`'subview'`, pushed in the
|
|
147
|
-
Inspector, or `'dialog'`; the default rule pushes at most 10 fields) and a
|
|
148
|
-
`wire(root, context)` that wires its own events once, reads the open value's
|
|
149
|
-
context with `context()`, and returns a disposer.
|
|
150
|
-
|
|
151
|
-
## Build your own host
|
|
152
|
-
|
|
153
|
-
```ts
|
|
154
|
-
import "@kerfjs/ui/document.css";
|
|
155
|
-
import "@kerfjs/ui/styles.css";
|
|
156
|
-
import "@kerfjs/ui/layout.css";
|
|
157
|
-
import "@kerfjs/ui/workbench.css";
|
|
158
|
-
import "@kerfjs/ui/editor.css";
|
|
159
|
-
import "@kerfjs/ui/popup-menu/register";
|
|
160
|
-
import "@kerfjs/ui/select/register";
|
|
161
|
-
|
|
162
|
-
import selection from "@kerfjs/ui/ai/component-catalog.json";
|
|
163
|
-
import composition from "@kerfjs/ui/ai/component-composition.json";
|
|
164
|
-
import props from "@kerfjs/ui/ai/component-props.json";
|
|
165
|
-
import * as button from "@kerfjs/ui/button";
|
|
166
|
-
import {
|
|
167
|
-
componentMap,
|
|
168
|
-
createEditor,
|
|
169
|
-
createEditorCatalog,
|
|
170
|
-
} from "@kerfjs/ui/editor";
|
|
171
|
-
import { mount } from "kerfjs";
|
|
172
|
-
|
|
173
|
-
const catalog = createEditorCatalog({
|
|
174
|
-
props: [props],
|
|
175
|
-
composition: [composition],
|
|
176
|
-
selection: [selection],
|
|
177
|
-
// Catalog key → component function, from the modules the catalog names.
|
|
178
|
-
components: componentMap([props], { "@kerfjs/ui/button": button }),
|
|
179
|
-
});
|
|
180
|
-
const root = document.getElementById("editor")!;
|
|
181
|
-
const editor = createEditor({ catalog });
|
|
182
|
-
mount(root, editor.render);
|
|
183
|
-
editor.wire(root);
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
- `createEditor({ catalog, document?, save?, storage?, fieldEditors?, devicePresets?, playHandlers? })`:
|
|
187
|
-
`document` is the document to start with (default an empty document
|
|
188
|
-
with no root, whose canvas asks for the first component),
|
|
189
|
-
`save(fileName, text)` replaces the default download for Save and Export,
|
|
190
|
-
`fieldEditors` registers field editors by type name (above), and
|
|
191
|
-
`devicePresets` adds play mode's devices and `playHandlers` its mock
|
|
192
|
-
action handlers (below). `storage` (an `EditorStorage`, `read(path)` and
|
|
193
|
-
`write(path, text)` by project path) also loads the documents a `#view`
|
|
194
|
-
composes, so the canvas renders them and Problems validates against them;
|
|
195
|
-
without it a `#view` previews as a placeholder. An optional `list()`
|
|
196
|
-
answers the project's documents as project-relative `.kui.json` paths;
|
|
197
|
-
with it, Add a child's **Existing document…** inserts one as a `#view`
|
|
198
|
-
from a picker, and without it that choice asks for a path. With it, the
|
|
199
|
-
Library also lists those documents after its components, to insert by
|
|
200
|
-
click or drag.
|
|
201
|
-
`devServerStorage(api?, listApi?)` implements all three over the dev
|
|
202
|
-
server (`EDITOR_FILE_API`, `EDITOR_LIST_API`).
|
|
203
|
-
- `createEditorCatalog({ props, composition, selection?, components, placeholders? })`
|
|
204
|
-
combines catalogs. Without a selection catalog a component is named by its
|
|
205
|
-
export. `placeholders` maps `<component key>.<prop>` to a factory for the
|
|
206
|
-
canvas's stand-in for an app-supplied prop (a function or a model) that a
|
|
207
|
-
document takes through a prop-typed param, such as
|
|
208
|
-
`"orders-app:order-list.renderRow": () => (order) => OrderRow({ order })`.
|
|
209
|
-
They add to and replace Kerf UI's own.
|
|
210
|
-
- `componentMap(props, modules)` maps each catalog key to
|
|
211
|
-
`modules[import][export]`.
|
|
212
|
-
|
|
213
|
-
The host loads the global stylesheets and registers `popup-menu/register` and
|
|
214
|
-
`select/register`, as any Kerf UI app does. Give the mount element
|
|
215
|
-
`class="kui-app-root"` so the editor fills the window.
|
|
216
|
-
|
|
217
|
-
## Play mode
|
|
218
|
-
|
|
219
|
-
**Play** in the Canvas toolbar runs the document as its users would, in a
|
|
220
|
-
frame at a phone-sized viewport, scaled down to fit when the window is
|
|
221
|
-
smaller. **Done**, or Escape while focus is outside
|
|
222
|
-
the frame, returns to editing with the selection as it was. The frame loads
|
|
223
|
-
your editor page again with a `?kerf-ui-play` query, and `createEditor`
|
|
224
|
-
returns the player on that page instead of the editor, so a host needs no
|
|
225
|
-
extra route or code. The player gets the document from its editor by
|
|
226
|
-
same-origin `postMessage`. Your host's page must keep `createEditor`,
|
|
227
|
-
`mount`, and `wire` unconditional, and serve the same page for that query.
|
|
228
|
-
Inside the frame, the components run with their real wiring. Each NavStack
|
|
229
|
-
starts at its first view, as an app launches; your mock handlers push the
|
|
230
|
-
rest (below). Tabs switch and close, a NavStack's back pops, regions and
|
|
231
|
-
Workbench panels resize, a SplitView collapses on a phone-sized device
|
|
232
|
-
and pushes its detail from a row, value controls (switches, selects,
|
|
233
|
-
sliders, segmented controls, chips, and the rest) keep what you set, a
|
|
234
|
-
repeated tab selects for its own row (and a control inside a repeated
|
|
235
|
-
row keeps its own row's value), and Workbench rails and sidebars collapse, all on a
|
|
236
|
-
play-time copy of the document. Nothing you do in play mode changes the
|
|
237
|
-
document.
|
|
238
|
-
|
|
239
|
-
The play bar picks the device: phones, tablets, laptops and desktops, and
|
|
240
|
-
Flexible (a width and height you type or drag). Phones and tablets rotate
|
|
241
|
-
and have an **Installed app** toggle. Off, the view runs as a browser tab:
|
|
242
|
-
the device's safe areas are outside the page, as with the default
|
|
243
|
-
`viewport-fit`. On, the view fills the device and gets its safe areas
|
|
244
|
-
through Kerf UI's `--kui-safe-area-*` tokens, so components that claim safe
|
|
245
|
-
areas lay out as on the device. **Scale** is Fit (the default, never larger
|
|
246
|
-
than 100%) or a fixed percentage, which may overflow and scroll the stage.
|
|
247
|
-
The view sits in a generic mock of the device. The **Device frame** toggle hides it without changing the layout. The frame's viewport is always the device's, so media queries and
|
|
248
|
-
`deviceClass()` inside it answer for that device. Touch input, pixel
|
|
249
|
-
density, and the on-screen keyboard aren't emulated, as the device menu notes.
|
|
250
|
-
The editor remembers the choice per browser.
|
|
251
|
-
|
|
252
|
-
Add your own devices with `createEditor({ devicePresets })`, or the Vite
|
|
253
|
-
plugin's `devicePresets` module. An array adds presets, replacing a shipped
|
|
254
|
-
one with the same `id`; a function receives the shipped list
|
|
255
|
-
(`SHIPPED_DEVICE_PRESETS`) and returns the whole list.
|
|
256
|
-
|
|
257
|
-
```ts
|
|
258
|
-
// src/kerf-ui-devices.ts (name it with the plugin's `devicePresets` option)
|
|
259
|
-
import type { DevicePreset } from "@kerfjs/ui/editor";
|
|
260
|
-
|
|
261
|
-
const devices: DevicePreset[] = [
|
|
262
|
-
{
|
|
263
|
-
id: "kiosk",
|
|
264
|
-
label: "Store kiosk",
|
|
265
|
-
kind: "tablet",
|
|
266
|
-
width: 1080,
|
|
267
|
-
height: 1920,
|
|
268
|
-
safeArea: {
|
|
269
|
-
portrait: { top: 0, right: 0, bottom: 0, left: 0 },
|
|
270
|
-
landscape: { top: 0, right: 0, bottom: 0, left: 0 },
|
|
271
|
-
},
|
|
272
|
-
frame: "tablet",
|
|
273
|
-
},
|
|
274
|
-
];
|
|
275
|
-
export default devices;
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
A preset's sizes are CSS pixels in portrait. `safeArea` is the insets an
|
|
279
|
-
installed app gets per orientation; `browserChrome`, when given, is what a
|
|
280
|
-
browser tab's chrome takes instead (it defaults to the safe areas).
|
|
281
|
-
|
|
282
|
-
The view's actions (the names its `$action`s give) call your mock handlers
|
|
283
|
-
when you register them, so a flow such as "row opens its detail" can be
|
|
284
|
-
walked end to end. Pass `createEditor({ playHandlers })`, or name a module
|
|
285
|
-
with the Vite plugin's `playHandlers` option. The handlers run inside the
|
|
286
|
-
play frame.
|
|
287
|
-
|
|
288
|
-
```ts
|
|
289
|
-
// src/kerf-ui-play-handlers.ts (name it with the plugin's `playHandlers` option)
|
|
290
|
-
import type { PlayHandlers } from "@kerfjs/ui/editor";
|
|
291
|
-
|
|
292
|
-
const playHandlers: PlayHandlers = {
|
|
293
|
-
"open-order": ({ view }) => {
|
|
294
|
-
view.setParams({ selectedId: view.key ?? "" });
|
|
295
|
-
view.navStack("orders")?.push("order");
|
|
296
|
-
},
|
|
297
|
-
};
|
|
298
|
-
export default playHandlers;
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
A handler receives `{ action, nodeId, event, params, view }`:
|
|
302
|
-
|
|
303
|
-
- `params` holds the view's current param values.
|
|
304
|
-
- `view.key` is the row's `data-key`.
|
|
305
|
-
- `view.setParams(values)` re-renders the view with new values.
|
|
306
|
-
- `view.navStack(name)` finds a NavStack by its author name, `id`, or node
|
|
307
|
-
id. Its `push(viewKey)` shows one of the document's views for that stack,
|
|
308
|
-
and `pop()` goes back one.
|
|
309
|
-
|
|
310
|
-
A handler may also open an overlay. A handler that throws (or rejects) is
|
|
311
|
-
logged, and the view keeps running. An action with no handler is only
|
|
312
|
-
logged. The play bar's **Action log** counts the actions you haven't seen
|
|
313
|
-
and lists them, newest first, with whether a handler ran.
|
|
314
|
-
|
|
315
|
-
## Project TypeScript parameters
|
|
316
|
-
|
|
317
|
-
The Params rail opens a text editor in a dialog. Its completions and live errors
|
|
318
|
-
come from the owning project's TypeScript configuration and source exports.
|
|
319
|
-
A unique exported name is saved as a portable inline `import()` type. Formatting
|
|
320
|
-
runs on blur, and the dialog's NavStack explores object fields, array items and
|
|
321
|
-
union members. Define new named types in application source.
|
|
322
|
-
|
|
323
|
-
`devServerStorage()` includes the project compiler transport. The plugin serves
|
|
324
|
-
`KERF_UI_EDITOR_TYPES_API` (`/__kerf-ui-editor/api/types`), a JSON POST endpoint
|
|
325
|
-
requiring `X-Kerf-UI-Editor: 1`. Requests name a project-relative `.kui.json`
|
|
326
|
-
source. Analysis requests carry
|
|
327
|
-
`{ action: "analyze", source, text, cursor?, suggest? }`; `suggest: false`
|
|
328
|
-
skips completion suggestions, the costliest part of an analysis, and the
|
|
329
|
-
editor sends it whenever it only formats a draft.
|
|
330
|
-
validation requests carry `{ action: "validate", source, document }`. The server
|
|
331
|
-
uses TypeScript's Node API; compiler code never enters the browser bundle.
|
|
332
|
-
TypeScript runs in a worker thread that `editorFileMiddleware` starts on the
|
|
333
|
-
first type request, one per project root, so an analysis never delays the
|
|
334
|
-
server's other responses (a Play page, a save). A worker crash fails the
|
|
335
|
-
requests in flight with a 500 and the next request starts a new worker. The
|
|
336
|
-
worker never keeps the process alive; a host that adds the middleware itself
|
|
337
|
-
calls its `dispose()` when its server closes, as the plugin does.
|
|
338
|
-
|
|
339
|
-
A custom host can pass `createEditor({ typeService })`, a `ProjectTypeService`
|
|
340
|
-
function that answers the same typed requests. Export of compiler-backed
|
|
341
|
-
parameters waits for whole-document checking against actual generated bindings
|
|
342
|
-
and defaults. An unavailable compiler or a failed check prevents that export.
|
|
343
|
-
Legacy parameter descriptors continue to work without a compiler service.
|
|
344
|
-
|
|
345
|
-
## Library-only component previews
|
|
346
|
-
|
|
347
|
-
Use `defineLibraryPreviews` from `@kerfjs/ui/editor` with a literal map of your
|
|
348
|
-
component functions. It checks each catalog key and each sample prop against the
|
|
349
|
-
component's real interface:
|
|
350
|
-
|
|
351
|
-
```tsx
|
|
352
|
-
import "./library-previews.css";
|
|
353
|
-
import { defineLibraryPreviews } from "@kerfjs/ui/editor";
|
|
354
|
-
import { MapPin } from "lucide";
|
|
355
|
-
import { OrderCard, OrderWorkspace, OrderMarker } from "./orders.js";
|
|
356
|
-
|
|
357
|
-
export default defineLibraryPreviews({
|
|
358
|
-
"orders:card": OrderCard,
|
|
359
|
-
"orders:workspace": OrderWorkspace,
|
|
360
|
-
"orders:marker": OrderMarker,
|
|
361
|
-
}, {
|
|
362
|
-
"orders:card": { sampleProps: () => ({ title: "Order #1042", total: 4200 }) },
|
|
363
|
-
"orders:workspace": { render: () => <svg viewBox="0 0 96 72" width="100%" height="100%" aria-hidden="true">{/* schematic */}</svg>, fit: "fill" },
|
|
364
|
-
"orders:marker": { icon: MapPin },
|
|
365
|
-
});
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
Pass that map through `createEditorCatalog({ libraryPreviews })` or
|
|
369
|
-
`createEditor({ libraryPreviews })`. For Vite, put its default export in
|
|
370
|
-
`src/kerf-ui-library-previews.ts`, or name a module with
|
|
371
|
-
`kerfUiEditor({ libraryPreviews: "src/library-previews.tsx" })`. Installed package
|
|
372
|
-
composition catalogs may name their editor-only ESM module with
|
|
373
|
-
`libraryPreviewModule` (relative to the catalog or an installed package export).
|
|
374
|
-
Their `libraryPreviews` JSON field contains only `{ props: { ...literalJSON } }`
|
|
375
|
-
entries by component key. JSON does not evaluate `$param`, `$css`, `$icon`,
|
|
376
|
-
functions or JavaScript. Use executable factory samples for SafeHtml content,
|
|
377
|
-
functions, models or signals. A custom host imports executable maps explicitly.
|
|
378
|
-
|
|
379
|
-
Precedence is built-ins, catalog JSON samples, package modules in catalog order,
|
|
380
|
-
catalog host overrides, then editor host overrides. Later registrations replace
|
|
381
|
-
whole entries; `{}` restores automatic live rendering. A static renderer runs
|
|
382
|
-
before ordinary seeded rendering, with sampled props. Thrown, undefined, invalid
|
|
383
|
-
or empty renderer results fall back to ordinary rendering; incompatible samples
|
|
384
|
-
retry ordinary props. Visually empty markup shows the configured icon or the
|
|
385
|
-
generic component icon. For visible but unhelpful ordinary output, supply a
|
|
386
|
-
schematic or a static LucideIcon renderer. `fit: "contain"` is the default;
|
|
387
|
-
`"fill"` is for schematics authored to occupy the complete 4:3 tile.
|
|
388
|
-
|
|
389
|
-
Factories/renderers are synchronous, pure and static; thumbnail output is cached
|
|
390
|
-
per editor. No widgets are mounted or wired there. Output stays inert and hidden
|
|
391
|
-
from accessibility APIs inside an isolated shadow root; the tile itself keeps the
|
|
392
|
-
component's accessible name. Import preview CSS and assets from the module as
|
|
393
|
-
usual: readable page stylesheets are shared into thumbnails, inherited theme
|
|
394
|
-
variables remain available, and asset load/content resize events refit them.
|
|
395
|
-
Samples and overrides never alter document defaults, inserted nodes, canvas or
|
|
396
|
-
play rendering, or generated production views. The `registry` option continues
|
|
397
|
-
to replace real component functions; use `libraryPreviews` for Library-only data.
|