@kerfjs/ui 5.0.0-beta.131 → 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 +0 -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 +9 -7
- package/ai/component-composition-rules.json +2 -10
- package/ai/component-composition.d.ts +0 -17
- package/ai/component-composition.json +3 -11
- package/ai/component-composition.schema.json +0 -59
- 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/toolbar-control-group.md +2 -2
- package/ai/public-api-signatures-v1.md +170 -197
- 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-resources.d.ts +2 -2
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +16 -16
- 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-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-CUUW57WB.js → chunk-DUKE3PLH.js} +2 -2
- 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-4OH6JSGU.js → chunk-F25UMYDX.js} +2 -2
- package/dist/{chunk-4OH6JSGU.js.map → chunk-F25UMYDX.js.map} +1 -1
- 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-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-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-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-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-XO5IOPM5.js → chunk-TNJGPG6R.js} +8 -8
- package/dist/{chunk-XO5IOPM5.js.map → chunk-TNJGPG6R.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-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-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 -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 +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 +2 -2
- package/dist/index.js +68 -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 +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 +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-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 +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-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/forms/select/select.css +0 -60
- 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 +0 -124
- package/dist/styles/select.css +0 -60
- package/dist/styles/surface-scaffold.css +1 -1
- package/dist/styles/text-field.css +1 -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.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/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-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/component-contract.md +4 -3
- package/docs/component-selection.md +1 -1
- package/docs/disclosure.md +22 -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 +3 -44
- package/package.json +3 -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-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-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/view/interpret.mjs
DELETED
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
// interpretView: renders a view document at runtime (docs/26-ui-editor.md §7)
|
|
2
|
-
// with exactly the generated module's semantics, after checking that the
|
|
3
|
-
// document's contract is the one the application compiled against. For
|
|
4
|
-
// server-driven screens; tree-shakes away when unused.
|
|
5
|
-
import { each, raw } from 'kerfjs';
|
|
6
|
-
import { jsx } from 'kerfjs/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
import * as cssValues from '../dist/css-values.js';
|
|
9
|
-
import { contractDigest, contractOf } from './contract.mjs';
|
|
10
|
-
import {
|
|
11
|
-
channelOf,
|
|
12
|
-
fieldZoneOf,
|
|
13
|
-
withFieldZones,
|
|
14
|
-
ZoneFill,
|
|
15
|
-
zonePropOf,
|
|
16
|
-
} from './catalog.mjs';
|
|
17
|
-
import { childKind } from './child-kind.mjs';
|
|
18
|
-
import { parseCssTree } from './css-grammar.mjs';
|
|
19
|
-
import { composedViewPath, eachNodes } from './validate.mjs';
|
|
20
|
-
|
|
21
|
-
const isObject = (value) =>
|
|
22
|
-
value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Thrown when a served document's contract differs from the one the
|
|
26
|
-
* application compiled against. `expected` and `actual` are digests;
|
|
27
|
-
* `contract` is the served document's full contract, so a host can log
|
|
28
|
-
* exactly which inputs, actions, slots, or refs it changed.
|
|
29
|
-
*/
|
|
30
|
-
export class KuiContractMismatch extends Error {
|
|
31
|
-
constructor(name, expected, actual, contract) {
|
|
32
|
-
super(
|
|
33
|
-
`view "${name}" has contract ${actual}, but the application was built against ${expected}; regenerate the app's view module or roll back the document`,
|
|
34
|
-
);
|
|
35
|
-
this.name = 'KuiContractMismatch';
|
|
36
|
-
this.expected = expected;
|
|
37
|
-
this.actual = actual;
|
|
38
|
-
this.contract = contract;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** Evaluates a parsed `$css` call against the css-values builders. */
|
|
43
|
-
function evaluateCss(node) {
|
|
44
|
-
const builder = cssValues[node.name];
|
|
45
|
-
return builder(
|
|
46
|
-
...node.args.map((arg) =>
|
|
47
|
-
typeof arg === 'object' ? evaluateCss(arg) : arg,
|
|
48
|
-
),
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function readPath(root, path) {
|
|
53
|
-
return path.reduce((current, segment) => current?.[segment], root);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Renders a view document. Options:
|
|
58
|
-
* - `catalog`: from `createViewCatalog` (validation and zone bindings);
|
|
59
|
-
* - `components`: catalog key → component function (Kerf UI and app
|
|
60
|
-
* components the document uses; Web Awesome elements need none);
|
|
61
|
-
* - `inputs`, `slots`: as the generated `render<Name>` takes them;
|
|
62
|
-
* - `contract`: the `<name>Contract` digest the app compiled against;
|
|
63
|
-
* - `onMismatch(error)`: returns fallback `SafeHtml` instead of throwing;
|
|
64
|
-
* - `resolveView(src, path)`: loads composed documents synchronously; `path`
|
|
65
|
-
* is where `src` points relative to the top document's folder.
|
|
66
|
-
* Throws on an invalid document or a component missing from `components`.
|
|
67
|
-
*/
|
|
68
|
-
export function interpretView(document, options) {
|
|
69
|
-
const { catalog, inputs = {}, slots = {}, resolveView } = options;
|
|
70
|
-
const contract = contractOf(document, catalog, { resolveView });
|
|
71
|
-
const actual = contractDigest(contract);
|
|
72
|
-
if (options.contract !== actual) {
|
|
73
|
-
const error = new KuiContractMismatch(
|
|
74
|
-
document.name,
|
|
75
|
-
options.contract,
|
|
76
|
-
actual,
|
|
77
|
-
contract,
|
|
78
|
-
);
|
|
79
|
-
if (options.onMismatch) return options.onMismatch(error);
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
82
|
-
return renderDocument(document, inputs, slots, options);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Renders a document for an editor preview: no validation or contract check,
|
|
87
|
-
* and every node in `broken` (ids the caller's validation flagged), or whose
|
|
88
|
-
* evaluation throws, renders `placeholder(node, reason)` instead, so one bad
|
|
89
|
-
* node never blanks the rest. Options are interpretView's (without
|
|
90
|
-
* `contract`/`onMismatch`) plus `broken` (a Set of node ids) and
|
|
91
|
-
* `placeholder`. Not for applications: they render with interpretView, whose
|
|
92
|
-
* strictness is what keeps a served document from silently breaking them.
|
|
93
|
-
*/
|
|
94
|
-
export function previewView(document, options) {
|
|
95
|
-
const { inputs = {}, slots = {} } = options;
|
|
96
|
-
// KF-PK3GVY: an empty draft has no root yet, so it previews as nothing.
|
|
97
|
-
if (document.root === undefined) return raw('');
|
|
98
|
-
return renderDocument(document, inputs, slots, options);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* `at` is the document's place relative to the top document's folder
|
|
103
|
-
* (undefined for the top one), so a nested `#view`'s `src` resolves from the
|
|
104
|
-
* document that contains it, as the validator resolves it (KF-3X7MFF).
|
|
105
|
-
* `inRow` marks a composed document rendered inside a composing document's
|
|
106
|
-
* `$each` row, through any number of `#view` levels, and `rowKey` is that
|
|
107
|
-
* row's key, which its root carries as `data-key` the way any other row root
|
|
108
|
-
* does (KF-EP2152), so kerf reconciles the row by key and a row action reads
|
|
109
|
-
* it (KF-RDZ7N7).
|
|
110
|
-
*/
|
|
111
|
-
function renderDocument(
|
|
112
|
-
document,
|
|
113
|
-
inputs,
|
|
114
|
-
slots,
|
|
115
|
-
options,
|
|
116
|
-
at,
|
|
117
|
-
inRow = false,
|
|
118
|
-
rowKey = undefined,
|
|
119
|
-
) {
|
|
120
|
-
const { catalog, components, resolveView } = options;
|
|
121
|
-
const params = document.params ?? {};
|
|
122
|
-
|
|
123
|
-
const value = (raw, scope) => {
|
|
124
|
-
// A field zone's children, in the content field it fills (KF-PD6QC5).
|
|
125
|
-
if (raw instanceof ZoneFill) return children(raw.children, scope);
|
|
126
|
-
if (isObject(raw) && '$param' in raw) {
|
|
127
|
-
// `??` as in the generated module: null and undefined take the default.
|
|
128
|
-
const read = inputs[raw.$param];
|
|
129
|
-
return 'default' in params[raw.$param]
|
|
130
|
-
? (read ?? params[raw.$param].default)
|
|
131
|
-
: read;
|
|
132
|
-
}
|
|
133
|
-
if (isObject(raw) && '$bind' in raw) {
|
|
134
|
-
const [head, ...rest] = raw.$bind.split('.');
|
|
135
|
-
// A head that is not an item is a param, read with its default as a
|
|
136
|
-
// `$param` is (KF-8P3H7F).
|
|
137
|
-
return readPath(
|
|
138
|
-
scope.has(head) ? scope.get(head) : value({ $param: head }, scope),
|
|
139
|
-
rest,
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
if (isObject(raw) && '$action' in raw) return raw.$action;
|
|
143
|
-
if (isObject(raw) && '$icon' in raw) {
|
|
144
|
-
const icon = options.icons?.[raw.$icon];
|
|
145
|
-
if (!icon) {
|
|
146
|
-
throw new Error(
|
|
147
|
-
`interpretView: no icon data for "${raw.$icon}"; pass it in options.icons`,
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
return icon;
|
|
151
|
-
}
|
|
152
|
-
if (isObject(raw) && '$css' in raw)
|
|
153
|
-
return evaluateCss(parseCssTree(raw.$css));
|
|
154
|
-
// An item slot (KF-SXDM56): content the application fills, as a zone's.
|
|
155
|
-
if (isObject(raw) && '$slot' in raw) return slots[raw.$slot]();
|
|
156
|
-
if (isObject(raw)) {
|
|
157
|
-
return Object.fromEntries(
|
|
158
|
-
Object.keys(raw).map((key) => [key, value(raw[key], scope)]),
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
if (Array.isArray(raw)) return raw.map((item) => value(item, scope));
|
|
162
|
-
return raw;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
const children = (list, scope, slot) => {
|
|
166
|
-
const items = list.map((child) => childValue(child, scope, slot));
|
|
167
|
-
// KF-YCM09F: an empty zone is an explicit null.
|
|
168
|
-
if (items.length === 0) return null;
|
|
169
|
-
return items.length === 1 ? items[0] : items;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
const childValue = (child, scope, slot) => {
|
|
173
|
-
switch (childKind(child)) {
|
|
174
|
-
case 'each':
|
|
175
|
-
return eachValue(child, scope, slot);
|
|
176
|
-
case 'if':
|
|
177
|
-
if (value(child.$if, scope)) return childValue(child.then, scope, slot);
|
|
178
|
-
return 'else' in child ? childValue(child.else, scope, slot) : null;
|
|
179
|
-
case 'slot':
|
|
180
|
-
return isObject(child.input)
|
|
181
|
-
? slots[child.$slot](value(child.input, scope))
|
|
182
|
-
: slots[child.$slot]();
|
|
183
|
-
default:
|
|
184
|
-
return nodeValue(child, scope, undefined, slot);
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
const eachValue = (child, scope, slot) => {
|
|
189
|
-
// The key path starts with `as` (validation requires it); read the rest
|
|
190
|
-
// from the item.
|
|
191
|
-
const rest = child.key.split('.').slice(1);
|
|
192
|
-
// KF-A01VDM: a composed document's own repeat inside a row is the shape
|
|
193
|
-
// validation rejects (KUI-V016). Name it, rather than letting each()
|
|
194
|
-
// refuse the keyed list inside the row with a generic error.
|
|
195
|
-
if (inRow && !scope.size) {
|
|
196
|
-
throw new Error(
|
|
197
|
-
`KUI-V016 ${at} is composed into a row, so it cannot repeat`,
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
const items = value(child.$each, scope);
|
|
201
|
-
const row = (item) => {
|
|
202
|
-
const inner = new Map(scope).set(child.as, item);
|
|
203
|
-
return rowValue(
|
|
204
|
-
rowTemplate(child, inner),
|
|
205
|
-
inner,
|
|
206
|
-
readPath(item, rest),
|
|
207
|
-
slot,
|
|
208
|
-
);
|
|
209
|
-
};
|
|
210
|
-
// Scope holds only `$each` items, so a non-empty scope is a row
|
|
211
|
-
// template. kerf never reconciles a list inside a row (the row is
|
|
212
|
-
// flattened to HTML, and a keyed each() there throws), so an inner
|
|
213
|
-
// repeat is a plain map that re-renders with its row, as the generated
|
|
214
|
-
// module writes it (KF-CFA1S1).
|
|
215
|
-
return scope.size
|
|
216
|
-
? items.map(row)
|
|
217
|
-
: each(items, row, { key: eachNodes(child)[0]?.id });
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
// KF-YX6HMT: the template an item's `kind` picks from `templates`, else
|
|
221
|
-
// the `default` one. A preview of a map with no `default` falls back to
|
|
222
|
-
// its first template, since a keyed row must be one element.
|
|
223
|
-
const rowTemplate = (child, scope) => {
|
|
224
|
-
if (!('templates' in child)) return child.template;
|
|
225
|
-
const { templates } = child;
|
|
226
|
-
const kind = value(child.kind, scope);
|
|
227
|
-
if (Object.hasOwn(templates, kind)) return templates[kind];
|
|
228
|
-
return templates.default ?? Object.values(templates)[0];
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
// A row: the template node, or the branch its `$if` chain picks for this
|
|
232
|
-
// item (KF-8J8E5V). A preview of an unfinished chain with no `else`
|
|
233
|
-
// renders `then` for every item, since a keyed row must be one element.
|
|
234
|
-
const rowValue = (template, scope, rowKey, slot) => {
|
|
235
|
-
if (!isObject(template) || !('$if' in template))
|
|
236
|
-
return nodeValue(template, scope, rowKey, slot);
|
|
237
|
-
const chosen =
|
|
238
|
-
'else' in template && !value(template.$if, scope)
|
|
239
|
-
? template.else
|
|
240
|
-
: template.then;
|
|
241
|
-
return rowValue(chosen, scope, rowKey, slot);
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
// A preview (previewView) swaps a node it cannot render for the caller's
|
|
245
|
-
// placeholder: one the caller already knows is broken, or one whose
|
|
246
|
-
// evaluation throws. The strict interpretView path never does.
|
|
247
|
-
const nodeValue = (node, scope, rowKey, slot) => {
|
|
248
|
-
const { placeholder, broken } = options;
|
|
249
|
-
if (!placeholder) return evaluateNode(node, scope, rowKey, slot);
|
|
250
|
-
if (broken?.has(node.id)) return placeholder(node, 'problem');
|
|
251
|
-
try {
|
|
252
|
-
return evaluateNode(node, scope, rowKey, slot);
|
|
253
|
-
} catch (error) {
|
|
254
|
-
return placeholder(
|
|
255
|
-
node,
|
|
256
|
-
error instanceof Error ? error.message : String(error),
|
|
257
|
-
);
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
const evaluateNode = (node, scope, rowKey, slot) => {
|
|
262
|
-
if (node.type === '#text') {
|
|
263
|
-
const text = value(node.value, scope);
|
|
264
|
-
return slot ? jsx('span', { slot, children: text }) : text;
|
|
265
|
-
}
|
|
266
|
-
if (node.type === '#view') {
|
|
267
|
-
const path = composedViewPath(at, node.src);
|
|
268
|
-
const child = resolveView(node.src, path);
|
|
269
|
-
return renderDocument(
|
|
270
|
-
child,
|
|
271
|
-
value(node.props ?? {}, scope),
|
|
272
|
-
{},
|
|
273
|
-
options,
|
|
274
|
-
path,
|
|
275
|
-
inRow || scope.size > 0,
|
|
276
|
-
rowKey,
|
|
277
|
-
);
|
|
278
|
-
}
|
|
279
|
-
const { component: definition, definitions } = catalog.components.get(
|
|
280
|
-
node.type,
|
|
281
|
-
);
|
|
282
|
-
const zones = isObject(node.zones) ? node.zones : {};
|
|
283
|
-
const props = withFieldZones(
|
|
284
|
-
isObject(node.props) ? node.props : {},
|
|
285
|
-
zones,
|
|
286
|
-
definition,
|
|
287
|
-
definitions,
|
|
288
|
-
);
|
|
289
|
-
const out = {};
|
|
290
|
-
for (const name of Object.keys(props)) {
|
|
291
|
-
if (name !== 'rootAttributes') out[name] = value(props[name], scope);
|
|
292
|
-
}
|
|
293
|
-
if (definition.source === 'webawesome') {
|
|
294
|
-
out['data-kerf-node'] = node.id;
|
|
295
|
-
if (rowKey !== undefined) out['data-key'] = String(rowKey);
|
|
296
|
-
if (slot) out.slot = slot;
|
|
297
|
-
const parts = Object.keys(zones)
|
|
298
|
-
.sort()
|
|
299
|
-
.flatMap((key) =>
|
|
300
|
-
zones[key].map((child) =>
|
|
301
|
-
childValue(child, scope, key === 'default' ? undefined : key),
|
|
302
|
-
),
|
|
303
|
-
);
|
|
304
|
-
if (parts.length) out.children = parts.length === 1 ? parts[0] : parts;
|
|
305
|
-
return jsx(definition.tagName, out);
|
|
306
|
-
}
|
|
307
|
-
for (const key of Object.keys(zones)) {
|
|
308
|
-
if (fieldZoneOf(definition, definitions, key)) continue;
|
|
309
|
-
out[zonePropOf(catalog, definition, key)] = children(zones[key], scope);
|
|
310
|
-
}
|
|
311
|
-
if (slot && definition.props.some((prop) => prop.name === 'slot'))
|
|
312
|
-
out.slot = slot;
|
|
313
|
-
const channel = channelOf(definition);
|
|
314
|
-
if (channel === 'rootAttributes') {
|
|
315
|
-
const base =
|
|
316
|
-
props.rootAttributes === undefined
|
|
317
|
-
? {}
|
|
318
|
-
: value(props.rootAttributes, scope);
|
|
319
|
-
out.rootAttributes = {
|
|
320
|
-
...base,
|
|
321
|
-
'data-kerf-node': node.id,
|
|
322
|
-
...(rowKey === undefined ? {} : { 'data-key': String(rowKey) }),
|
|
323
|
-
};
|
|
324
|
-
} else if (channel === 'native') {
|
|
325
|
-
out['data-kerf-node'] = node.id;
|
|
326
|
-
if (rowKey !== undefined) out['data-key'] = String(rowKey);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
const render = components[node.type];
|
|
330
|
-
if (typeof render !== 'function') {
|
|
331
|
-
throw new Error(
|
|
332
|
-
`interpretView: no component function for ${node.type}; pass it in options.components`,
|
|
333
|
-
);
|
|
334
|
-
}
|
|
335
|
-
return render(out);
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
return nodeValue(document.root, new Map(), rowKey, undefined);
|
|
339
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The worker thread `editorFileMiddleware` runs the project-type service in
|
|
3
|
-
* (KF-EQFF9K: TypeScript's synchronous work used to block the dev or preview
|
|
4
|
-
* server's event loop, so a Play page waited up to a second behind an
|
|
5
|
-
* analysis). One worker per middleware root owns one service; each message
|
|
6
|
-
* is one validated `analyze` or `validate` request.
|
|
7
|
-
*
|
|
8
|
-
* Message in: `{ id, body }`. Reply: `{ id, result }`, or `{ id, error }`
|
|
9
|
-
* with the message of a request the service rejects.
|
|
10
|
-
*/
|
|
11
|
-
import { readFileSync } from 'node:fs';
|
|
12
|
-
import { fileURLToPath } from 'node:url';
|
|
13
|
-
import { parentPort, workerData } from 'node:worker_threads';
|
|
14
|
-
|
|
15
|
-
import { applicationCatalogs } from '../vite-editor.mjs';
|
|
16
|
-
import { createViewCatalog } from './catalog.mjs';
|
|
17
|
-
import { createProjectTypeService } from './project-types.mjs';
|
|
18
|
-
|
|
19
|
-
const { root } = workerData;
|
|
20
|
-
const readJson = (url) => JSON.parse(readFileSync(fileURLToPath(url), 'utf8'));
|
|
21
|
-
|
|
22
|
-
let service;
|
|
23
|
-
/** Kerf UI's catalogs plus the application's, read afresh per request. */
|
|
24
|
-
const typeCatalog = () => {
|
|
25
|
-
const app = applicationCatalogs(root);
|
|
26
|
-
return createViewCatalog({
|
|
27
|
-
props: [
|
|
28
|
-
readJson(new URL('../ai/component-props.json', import.meta.url)),
|
|
29
|
-
...app.props,
|
|
30
|
-
],
|
|
31
|
-
composition: [
|
|
32
|
-
readJson(new URL('../ai/component-composition.json', import.meta.url)),
|
|
33
|
-
...app.composition,
|
|
34
|
-
],
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
parentPort.on('message', ({ id, body }) => {
|
|
39
|
-
try {
|
|
40
|
-
service ??= createProjectTypeService(root);
|
|
41
|
-
const result =
|
|
42
|
-
body.action === 'analyze'
|
|
43
|
-
? service.analyze({
|
|
44
|
-
...body,
|
|
45
|
-
...(body.declared ? { catalog: typeCatalog() } : {}),
|
|
46
|
-
})
|
|
47
|
-
: service.validateDocument(body.document, typeCatalog(), body.source);
|
|
48
|
-
parentPort.postMessage({ id, result });
|
|
49
|
-
} catch (error) {
|
|
50
|
-
parentPort.postMessage({
|
|
51
|
-
id,
|
|
52
|
-
error: error instanceof Error ? error.message : String(error),
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
});
|
package/view/project-types.d.mts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ViewCatalog,
|
|
3
|
-
ViewDiagnostic,
|
|
4
|
-
ViewDocument,
|
|
5
|
-
ViewType,
|
|
6
|
-
} from './index.mjs';
|
|
7
|
-
|
|
8
|
-
export type CheckedProjectType = ViewType & {
|
|
9
|
-
typescript: NonNullable<ViewType['typescript']>;
|
|
10
|
-
};
|
|
11
|
-
export interface ProjectTypeAnalysis {
|
|
12
|
-
type?: CheckedProjectType;
|
|
13
|
-
diagnostics: { message: string; start?: number; length?: number }[];
|
|
14
|
-
suggestions: {
|
|
15
|
-
name: string;
|
|
16
|
-
source?: string;
|
|
17
|
-
text: string;
|
|
18
|
-
cursor: number;
|
|
19
|
-
}[];
|
|
20
|
-
}
|
|
21
|
-
export interface NodeProjectTypeService {
|
|
22
|
-
analyze(request: {
|
|
23
|
-
source: string;
|
|
24
|
-
text: string;
|
|
25
|
-
cursor?: number;
|
|
26
|
-
autoImport?: boolean;
|
|
27
|
-
/** Compute completion suggestions (default true); false skips the costliest step. */
|
|
28
|
-
suggest?: boolean;
|
|
29
|
-
declared?: ViewType;
|
|
30
|
-
catalog?: ViewCatalog;
|
|
31
|
-
}): ProjectTypeAnalysis;
|
|
32
|
-
validateDocument(
|
|
33
|
-
document: ViewDocument,
|
|
34
|
-
catalog: ViewCatalog,
|
|
35
|
-
source: string,
|
|
36
|
-
options?: { resolveView?: (src: string, path: string) => unknown },
|
|
37
|
-
): { document: ViewDocument; diagnostics: ViewDiagnostic[] };
|
|
38
|
-
dispose(): void;
|
|
39
|
-
}
|
|
40
|
-
/** Nearest tsconfig root, or the document folder when no config exists. */
|
|
41
|
-
export function projectTypeRoot(path: string): string;
|
|
42
|
-
/** Node-only service. No compiler code enters the browser entry. */
|
|
43
|
-
export function createProjectTypeService(root: string): NodeProjectTypeService;
|