@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/dist/workbench.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SafeHtml } from 'kerfjs';
|
|
2
|
-
import { b as NavPane, N as NavStackProps } from './nav-stack-
|
|
2
|
+
import { b as NavPane, N as NavStackProps } from './nav-stack-IKSMxo2A.js';
|
|
3
3
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
4
|
-
import { R as RootDataAttributes } from './extension-attributes-
|
|
4
|
+
import { R as RootDataAttributes } from './extension-attributes-CnqvBmj3.js';
|
|
5
5
|
import { ListConfig } from './list.js';
|
|
6
6
|
import { PaneConfig } from './pane.js';
|
|
7
7
|
import { ResizableRegionSeparator, ResizableRegionCollapseMotion, ResizableRegionContentOverflow, ResizableRegionPresentation, ResizableRegionRestorePosition } from './resizable-region.js';
|
|
@@ -272,8 +272,8 @@ interface WorkbenchProps {
|
|
|
272
272
|
className?: string;
|
|
273
273
|
/** Native named-slot assignment when composed inside a web component. */
|
|
274
274
|
slot?: string;
|
|
275
|
-
/** Application `data-*` metadata on the root, such as a row key or
|
|
276
|
-
*
|
|
275
|
+
/** Application `data-*` metadata on the root, such as a row key or a
|
|
276
|
+
* test hook; the component's own markers stay protected. */
|
|
277
277
|
rootAttributes?: RootDataAttributes;
|
|
278
278
|
}
|
|
279
279
|
/**
|
package/dist/workbench.js
CHANGED
package/docs/accessibility.md
CHANGED
|
@@ -621,7 +621,7 @@ and `change` events as typing would, and returns focus to the field. A
|
|
|
621
621
|
disabled or read-only field's clear button is disabled. `toggle` adds an
|
|
622
622
|
icon toggle `<button>` after the input (after the clear button), named by its
|
|
623
623
|
`label`, reporting `aria-pressed`, and running its delegated `action`; the
|
|
624
|
-
application flips `pressed` (a password's Show
|
|
624
|
+
application flips `pressed` (such as a password's Show). It is a
|
|
625
625
|
normal Tab stop and is disabled with a disabled or read-only field. A
|
|
626
626
|
multi-line field keeps it after its textarea, pinned to the top end.
|
|
627
627
|
`showCount` (with
|
package/docs/catalog.md
CHANGED
|
@@ -98,6 +98,65 @@ Per-entry `resources` render as "open in new tab" links in the footer, and
|
|
|
98
98
|
`ToolbarControlGroup` (grouped by each entry's `group`), so register its elements
|
|
99
99
|
with `@kerfjs/ui/popup-menu/register` when you use it.
|
|
100
100
|
|
|
101
|
+
## Import a library catalog
|
|
102
|
+
|
|
103
|
+
A catalog publisher exports a typed `CatalogPackage` with a stable package
|
|
104
|
+
name, display label, entries and optional `imports` of other published
|
|
105
|
+
manifests. Import the Kerf UI manifest from the optional
|
|
106
|
+
`@kerfjs/ui/catalog-library` subpath. It contains the library's real
|
|
107
|
+
component metadata and imports its curated Web Awesome integration metadata.
|
|
108
|
+
It leaves preview implementations to packages that distribute them.
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
import { composeCatalog, type CatalogPackage } from '@kerfjs/ui/catalog';
|
|
112
|
+
import { kerfCatalogPackage } from '@kerfjs/ui/catalog-library';
|
|
113
|
+
|
|
114
|
+
const app: CatalogPackage = {
|
|
115
|
+
package: 'review-app',
|
|
116
|
+
label: 'Review App',
|
|
117
|
+
imports: [kerfCatalogPackage],
|
|
118
|
+
entries: [{
|
|
119
|
+
id: 'appearance-menu',
|
|
120
|
+
name: 'Appearance Menu',
|
|
121
|
+
category: 'Controls',
|
|
122
|
+
uses: [{ package: '@kerfjs/ui', id: 'popup-menu' }],
|
|
123
|
+
loadPreview: () => import('./appearance-preview.js').then(module => module.render),
|
|
124
|
+
}],
|
|
125
|
+
};
|
|
126
|
+
const graph = composeCatalog(app);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Build the graph once outside render. Pass its `groups` through
|
|
130
|
+
`Catalog.secondarySections`, update each group's controlled `expanded` and
|
|
131
|
+
optional `tagFilter.show` by stable group id, and pass the active qualified
|
|
132
|
+
entry id to the shell. `wireCatalog` supplies the group id to `onToggleSecondary`
|
|
133
|
+
and the second argument of `onToggleSecondaryFilter` when a group has an id.
|
|
134
|
+
The existing single-group form retains its callback arguments. Sidebar search
|
|
135
|
+
matches the package label as well as categories and entry names.
|
|
136
|
+
|
|
137
|
+
`catalogEntryId(packageName, localId)` produces the route value, e.g.
|
|
138
|
+
`@kerfjs/ui:popup-menu`. Pass it to `URLSearchParams` as written. On startup,
|
|
139
|
+
accept a bookmarked id only if `graph.entries.has(id)`, and expand the owning
|
|
140
|
+
package when selecting an entry. Two packages may use the same local id.
|
|
141
|
+
Names, categories and import order can change without invalidating the link.
|
|
142
|
+
|
|
143
|
+
Each `uses` string names an entry in its own package. An object names the exact
|
|
144
|
+
target package and entry. The resolver indexes the whole graph before resolving
|
|
145
|
+
those edges and supplies both **Uses** and **Used by** to the related menu.
|
|
146
|
+
An import makes metadata reachable without implying a component relationship.
|
|
147
|
+
The first depth-first visit determines display order. Repeating the same
|
|
148
|
+
manifest object or relationship is harmless. Conflicting definitions of one
|
|
149
|
+
package, duplicate local ids, missing targets and cycles throw with the
|
|
150
|
+
offending names. A package name must be nonempty and contain no colon.
|
|
151
|
+
|
|
152
|
+
`graph.loadPreview(id)` returns an optional render function. Loading begins on
|
|
153
|
+
request, simultaneous requests share one load, successful loads are reused, and
|
|
154
|
+
a rejected load can be retried. Keep active-selection ownership with the app so
|
|
155
|
+
a slow old preview cannot overwrite the current one. The [runnable consumer
|
|
156
|
+
example](examples/composed-catalog.tsx) uses `resource` for this, restores
|
|
157
|
+
bookmarks, preserves existing query parameters, and shows a metadata-only
|
|
158
|
+
entry when its publisher supplies no preview.
|
|
159
|
+
|
|
101
160
|
## Catalog demo authoring contract
|
|
102
161
|
|
|
103
162
|
This section is the single authoritative contract for tools and people that
|
|
@@ -79,6 +79,9 @@ CSS boundaries, diagnostics, and provenance. A wrapper entry may add
|
|
|
79
79
|
composition checks treat its elements as each root rather than as an unknown
|
|
80
80
|
child. A placement with listed parent constraints produces one `KUI-L201`
|
|
81
81
|
diagnostic even when both the wrapper and a rendered root reject that parent.
|
|
82
|
+
A listed parent is a catalog key, or a key and one of its props
|
|
83
|
+
(`@kerfjs/ui:surface-scaffold#headerActions`) that accepts the child only
|
|
84
|
+
through that prop.
|
|
82
85
|
When one catalog entry exports another JSX component with different placement,
|
|
83
86
|
`jsxExports` gives that export its own parent contract. The extra export does
|
|
84
87
|
not stand for the entry's root when a parent zone is checked.
|
|
@@ -95,9 +98,7 @@ list of `{ kind, whenProps? }` rules in the selection catalog that
|
|
|
95
98
|
`catalog:sync` copies into composition: `root` when its own root is a native
|
|
96
99
|
control or link, `contains` when it renders one inside, and `whenProps` when
|
|
97
100
|
only some props make it so. `content.exports` gives additional JSX exports
|
|
98
|
-
their own rules; they do not inherit the entry's.
|
|
99
|
-
`root` or `contains` element anywhere in a `root` element's zones as
|
|
100
|
-
`KUI-V014`.
|
|
101
|
+
their own rules; they do not inherit the entry's.
|
|
101
102
|
Generated `boundaries.rootClass` prefers the public `kui-<entry-id>` class when
|
|
102
103
|
present, so a sibling export's class cannot become the entry's root class.
|
|
103
104
|
|
|
@@ -761,10 +761,15 @@ keeps the open menu's state out of the morph. Register
|
|
|
761
761
|
submenus, and dismissal for every PopupMenu in the document. Do not hand-write
|
|
762
762
|
`wa-dropdown` or menu markup for a menu.
|
|
763
763
|
|
|
764
|
+
Give a record command a short `label` and a plain-text `description` to show its secondary text on the next line. Assistive technology announces the label as the name and the secondary text as the description. A trailing status badge still belongs in `details`.
|
|
765
|
+
|
|
764
766
|
When the app changes the items of an open menu, the content key rebuilds its
|
|
765
767
|
root. The register reopens that root and keeps focus on the same command (by
|
|
766
768
|
`data-action`, then label), or moves focus to the first available command if
|
|
767
|
-
the focused one was removed.
|
|
769
|
+
the focused one was removed. If the app cancels a nested `kui-menu-select`
|
|
770
|
+
and changes the items, the controller reopens the surviving submenu path
|
|
771
|
+
and focuses the chosen command there. Give sibling submenu triggers distinct
|
|
772
|
+
labels or stable action/value identities.
|
|
768
773
|
|
|
769
774
|
```tsx
|
|
770
775
|
<ToolbarControlGroup single nestedDropdown menuInset="compact">
|
|
@@ -872,7 +877,7 @@ first), Up/Down/Home/End move focus without selecting, and Enter or Space
|
|
|
872
877
|
selects the focused option by dispatching its click, so the app's ordinary
|
|
873
878
|
delegated `data-action` handler changes the selection. Name that action with
|
|
874
879
|
the option's `action` prop (rendered as `data-action`, as on ContentItem and
|
|
875
|
-
ListItem), so
|
|
880
|
+
ListItem), so the app's delegated handler finds it by name; a
|
|
876
881
|
`data-action` in `rootAttributes` still works, and `action` wins when both are
|
|
877
882
|
set. A `semanticRole="group"` row takes no `action`. The app owns the
|
|
878
883
|
selection state.
|
package/docs/disclosure.md
CHANGED
|
@@ -61,6 +61,28 @@ embedded Disclosure as `KUI-L204`.
|
|
|
61
61
|
Use `embedded` only inside owner chrome. On a pane or a list, the default
|
|
62
62
|
geometry is what puts the Disclosure on the shared content column.
|
|
63
63
|
|
|
64
|
+
## Compact size
|
|
65
|
+
|
|
66
|
+
`size="compact"` is for a small, quiet disclosure of secondary detail inside
|
|
67
|
+
content, such as a note's AI feedback: the arrow is 14px instead of 18px, the
|
|
68
|
+
summary takes the extra-small type, and the content starts on the title's text
|
|
69
|
+
column after the narrower arrow. Give it a quiet title for a small gray row.
|
|
70
|
+
It works with every appearance; an embedded compact summary keeps its 24px row.
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
<Disclosure
|
|
74
|
+
title={<Text variant="span" flush tone="quiet">AI Feedback</Text>}
|
|
75
|
+
appearance="embedded"
|
|
76
|
+
size="compact"
|
|
77
|
+
>
|
|
78
|
+
<Text flush size="compact" tone="quiet">Group Export and Share.</Text>
|
|
79
|
+
</Disclosure>;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Size the arrow with `size`, not by setting `--kui-disclosure-arrow-size` in
|
|
83
|
+
application CSS: that token is a theme-level default for every disclosure
|
|
84
|
+
arrow, and `kerf-ui-doctor` reports an application override as `KUI-L021`.
|
|
85
|
+
|
|
64
86
|
## Open state
|
|
65
87
|
|
|
66
88
|
The open state belongs to the native `<details>` once it is on the page. A
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import '@kerfjs/ui/popup-menu/register';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Catalog,
|
|
5
|
+
catalogEntryId,
|
|
6
|
+
type CatalogPackage,
|
|
7
|
+
type CatalogPreview,
|
|
8
|
+
composeCatalog,
|
|
9
|
+
} from '@kerfjs/ui/catalog';
|
|
10
|
+
import { kerfCatalogPackage } from '@kerfjs/ui/catalog-library';
|
|
11
|
+
import { wireCatalog } from '@kerfjs/ui/wire-catalog';
|
|
12
|
+
import { batch, mount, signal } from 'kerfjs';
|
|
13
|
+
import { resource } from 'kerfjs/async';
|
|
14
|
+
|
|
15
|
+
/** A consuming app supplies its own preview module loader at the composition boundary. */
|
|
16
|
+
export function mountComponentCatalog(
|
|
17
|
+
root: HTMLElement,
|
|
18
|
+
loadPreview: () => Promise<CatalogPreview>,
|
|
19
|
+
) {
|
|
20
|
+
const app: CatalogPackage = {
|
|
21
|
+
package: 'review-app',
|
|
22
|
+
label: 'Review App',
|
|
23
|
+
imports: [kerfCatalogPackage],
|
|
24
|
+
entries: [
|
|
25
|
+
{
|
|
26
|
+
id: 'button',
|
|
27
|
+
name: 'Review Actions',
|
|
28
|
+
category: 'Review',
|
|
29
|
+
description: 'Choose how to share a review.',
|
|
30
|
+
uses: [{ package: '@kerfjs/ui', id: 'popup-menu' }],
|
|
31
|
+
loadPreview,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
const graph = composeCatalog(app);
|
|
36
|
+
const view = root.ownerDocument.defaultView!;
|
|
37
|
+
const linked = new URL(view.location.href).searchParams.get('component');
|
|
38
|
+
const initial =
|
|
39
|
+
linked && graph.entries.has(linked)
|
|
40
|
+
? linked
|
|
41
|
+
: catalogEntryId(app.package, 'button');
|
|
42
|
+
const active = signal(initial);
|
|
43
|
+
const expanded = signal(
|
|
44
|
+
new Set([app.package, graph.entries.get(initial)!.package]),
|
|
45
|
+
);
|
|
46
|
+
const showDiscouraged = signal(false);
|
|
47
|
+
const preview = resource<CatalogPreview | undefined, string>();
|
|
48
|
+
function select(id: string) {
|
|
49
|
+
const owner = graph.entries.get(id)!.package;
|
|
50
|
+
batch(() => {
|
|
51
|
+
active.value = id;
|
|
52
|
+
if (!expanded.peek().has(owner))
|
|
53
|
+
expanded.value = new Set([...expanded.peek(), owner]);
|
|
54
|
+
void preview.run(id, () => graph.loadPreview(id));
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
select(initial);
|
|
58
|
+
const unmount = mount(root, () => {
|
|
59
|
+
const state = preview.value;
|
|
60
|
+
const content =
|
|
61
|
+
state.status === 'completed' && state.input === active.value ? (
|
|
62
|
+
state.data ? (
|
|
63
|
+
state.data()
|
|
64
|
+
) : (
|
|
65
|
+
<p>This package provides catalog details only.</p>
|
|
66
|
+
)
|
|
67
|
+
) : (
|
|
68
|
+
<p>
|
|
69
|
+
{state.status === 'failed'
|
|
70
|
+
? 'Preview could not be loaded.'
|
|
71
|
+
: 'Loading preview…'}
|
|
72
|
+
</p>
|
|
73
|
+
);
|
|
74
|
+
return Catalog({
|
|
75
|
+
brand: { title: 'Component Library' },
|
|
76
|
+
sections: [],
|
|
77
|
+
active: active.value,
|
|
78
|
+
content,
|
|
79
|
+
secondarySections: graph.groups.map((group) => ({
|
|
80
|
+
...group,
|
|
81
|
+
expanded: expanded.value.has(group.id),
|
|
82
|
+
tagFilter:
|
|
83
|
+
group.id === '@awesome.me/webawesome'
|
|
84
|
+
? {
|
|
85
|
+
tag: 'Discouraged',
|
|
86
|
+
label: 'Show Discouraged',
|
|
87
|
+
show: showDiscouraged.value,
|
|
88
|
+
}
|
|
89
|
+
: undefined,
|
|
90
|
+
})),
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
const unwire = wireCatalog(root, {
|
|
94
|
+
onSelect: select,
|
|
95
|
+
urlParam: 'component',
|
|
96
|
+
revealSelection: true,
|
|
97
|
+
onToggleSecondary(id) {
|
|
98
|
+
if (!id) return;
|
|
99
|
+
const next = new Set(expanded.peek());
|
|
100
|
+
if (next.has(id)) next.delete(id);
|
|
101
|
+
else next.add(id);
|
|
102
|
+
expanded.value = next;
|
|
103
|
+
},
|
|
104
|
+
onToggleSecondaryFilter(show) {
|
|
105
|
+
showDiscouraged.value = show;
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
return () => {
|
|
109
|
+
unwire();
|
|
110
|
+
unmount();
|
|
111
|
+
preview.reset();
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Combobox, type ComboboxProps } from '@kerfjs/ui/combobox';
|
|
2
|
+
import {
|
|
3
|
+
type ComboboxCommit,
|
|
4
|
+
wireComboboxes,
|
|
5
|
+
} from '@kerfjs/ui/wire-comboboxes';
|
|
6
|
+
|
|
7
|
+
type RenderProps = Omit<ComboboxProps, 'id' | 'value'>;
|
|
8
|
+
type FieldOptions = {
|
|
9
|
+
id: string;
|
|
10
|
+
initialValue?: string;
|
|
11
|
+
onCommit: (commit: ComboboxCommit) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const boundary = 'data-example-combobox-owner';
|
|
15
|
+
const selector = `[${boundary}]`;
|
|
16
|
+
|
|
17
|
+
/** Consumer recipe. Create once outside mount's repeating render callback. */
|
|
18
|
+
export function createComboboxOwner(commitKeys: readonly string[] = [',']) {
|
|
19
|
+
const fields = new Map<
|
|
20
|
+
string,
|
|
21
|
+
{ token: symbol; commit: FieldOptions['onCommit'] }
|
|
22
|
+
>();
|
|
23
|
+
const keys = [...commitKeys];
|
|
24
|
+
let root: HTMLElement | undefined;
|
|
25
|
+
let unwire: (() => void) | undefined;
|
|
26
|
+
let disposed = false;
|
|
27
|
+
|
|
28
|
+
function ensureLive() {
|
|
29
|
+
if (disposed) throw new Error('Combobox owner was disposed');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function startWiring() {
|
|
33
|
+
if (!root || unwire || fields.size === 0) return;
|
|
34
|
+
unwire = wireComboboxes(root, {
|
|
35
|
+
commitKeys: keys,
|
|
36
|
+
onCommit: (event) => fields.get(event.id)?.commit(event),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function closeFocused(id?: string) {
|
|
41
|
+
const focused = root?.ownerDocument.activeElement;
|
|
42
|
+
if (
|
|
43
|
+
focused &&
|
|
44
|
+
root?.contains(focused) &&
|
|
45
|
+
fields.has(focused.id) &&
|
|
46
|
+
(id === undefined || id === focused.id)
|
|
47
|
+
) {
|
|
48
|
+
// The wire's focusout closes the popover and stops following its anchor.
|
|
49
|
+
(focused as HTMLElement).blur();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function stopWiring() {
|
|
54
|
+
unwire?.();
|
|
55
|
+
unwire = undefined;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
field({ id, initialValue = '', onCommit }: FieldOptions) {
|
|
60
|
+
ensureLive();
|
|
61
|
+
if (fields.has(id)) throw new Error(`Duplicate Combobox id: ${id}`);
|
|
62
|
+
const token = Symbol();
|
|
63
|
+
fields.set(id, { token, commit: onCommit });
|
|
64
|
+
startWiring();
|
|
65
|
+
return {
|
|
66
|
+
render(props: RenderProps) {
|
|
67
|
+
if (fields.get(id)?.token !== token)
|
|
68
|
+
throw new Error('Combobox field was disposed');
|
|
69
|
+
return Combobox({ ...props, id, value: initialValue });
|
|
70
|
+
},
|
|
71
|
+
dispose() {
|
|
72
|
+
if (fields.get(id)?.token !== token) return;
|
|
73
|
+
closeFocused(id);
|
|
74
|
+
fields.delete(id);
|
|
75
|
+
if (!fields.size) stopWiring();
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
connect(host: HTMLElement) {
|
|
80
|
+
ensureLive();
|
|
81
|
+
if (root || host.closest(selector) || host.querySelector(selector))
|
|
82
|
+
throw new Error(
|
|
83
|
+
'Overlapping Combobox owners must share the outer owner',
|
|
84
|
+
);
|
|
85
|
+
host.setAttribute(boundary, '');
|
|
86
|
+
root = host;
|
|
87
|
+
startWiring();
|
|
88
|
+
},
|
|
89
|
+
dispose() {
|
|
90
|
+
if (disposed) return;
|
|
91
|
+
disposed = true;
|
|
92
|
+
closeFocused();
|
|
93
|
+
stopWiring();
|
|
94
|
+
fields.clear();
|
|
95
|
+
root?.removeAttribute(boundary);
|
|
96
|
+
root = undefined;
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Button } from '@kerfjs/ui/button';
|
|
2
|
+
import { mount, signal } from 'kerfjs';
|
|
3
|
+
import { action, type ActionHandler, delegateActions } from 'kerfjs/actions';
|
|
4
|
+
|
|
5
|
+
/** A command name must belong to the table that handles this event. */
|
|
6
|
+
export function mountCounter(root: HTMLElement): () => void {
|
|
7
|
+
const count = signal(0);
|
|
8
|
+
const clicks = {
|
|
9
|
+
increment: () => {
|
|
10
|
+
count.value += 1;
|
|
11
|
+
},
|
|
12
|
+
reset: () => {
|
|
13
|
+
count.value = 0;
|
|
14
|
+
},
|
|
15
|
+
} satisfies Record<string, ActionHandler<HTMLButtonElement>>;
|
|
16
|
+
const click = action<keyof typeof clicks>;
|
|
17
|
+
const increment = click('increment');
|
|
18
|
+
const reset = click('reset');
|
|
19
|
+
|
|
20
|
+
const unmount = mount(root, () => (
|
|
21
|
+
<section>
|
|
22
|
+
<output>{count}</output>
|
|
23
|
+
<Button action={increment.value}>Increment</Button>
|
|
24
|
+
<button type="button" {...reset.attrs}>
|
|
25
|
+
Reset
|
|
26
|
+
</button>
|
|
27
|
+
</section>
|
|
28
|
+
));
|
|
29
|
+
const unwire = delegateActions(root, 'click', clicks);
|
|
30
|
+
return () => {
|
|
31
|
+
unwire();
|
|
32
|
+
unmount();
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -10,6 +10,8 @@ Keep an unavailable choice or action visible and disabled when that helps explai
|
|
|
10
10
|
|
|
11
11
|
See [accessibility contracts](./accessibility.md#textfield) for field behavior, [interaction conventions](./interaction-conventions.md) for dialog and action order, and [application testing](./testing-applications.md) for form assertions.
|
|
12
12
|
|
|
13
|
+
For immediately applied settings, see the [Switch layout and accessibility requirements](./switch.md).
|
|
14
|
+
|
|
13
15
|
## Form
|
|
14
16
|
|
|
15
17
|
Group fields that are saved or sent together in a `Form` from `@kerfjs/ui/form`, not a raw `<form>`. It renders a native `form` with no inset, chrome, or layout of its own (`display: contents`), so its children lay out as the parent's own; put a `List`, `Row`, or `Grid` inside it for rhythm. A parent rule that selects its direct children does not reach through it.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Combobox input ownership
|
|
2
|
+
|
|
3
|
+
A field can take initial text and then let the person edit it. In Kerf, a
|
|
4
|
+
component function returns HTML and has no persistent instance. For an
|
|
5
|
+
uncontrolled Combobox, obtain the seed outside the repeating render and pass
|
|
6
|
+
that stable string as `value`. Changing suggestions can then rerender the
|
|
7
|
+
field without moving the caret or replacing an edit.
|
|
8
|
+
|
|
9
|
+
## What the browser does today
|
|
10
|
+
|
|
11
|
+
The Chromium case in `ui/tests/browser/combobox-seed.spec.ts` uses the
|
|
12
|
+
published entry points inside a mounted form with the normal keyboard wiring.
|
|
13
|
+
The native input's `defaultValue` and its `value` attribute agree throughout.
|
|
14
|
+
|
|
15
|
+
| Action | Visible text | Native reset value |
|
|
16
|
+
| ----------------------------------------------------- | --------------- | ------------------ |
|
|
17
|
+
| Mount with `value="first"` | first | first |
|
|
18
|
+
| Type "draft", set the caret at 2, refresh suggestions | draft (caret 2) | first |
|
|
19
|
+
| Render `value="second"` while focused | draft | second |
|
|
20
|
+
| Blur, render `value="third"` | third | third |
|
|
21
|
+
| Type again, reset the form | third | third |
|
|
22
|
+
| Type again, replace the form with a new key | third | third |
|
|
23
|
+
|
|
24
|
+
## Proposed contract for review
|
|
25
|
+
|
|
26
|
+
Capture `initialValue` outside the repeating render, on the same per-field
|
|
27
|
+
owner that registers the commit callback in the scoped Combobox pilot.
|
|
28
|
+
One live owner holds a scalar seed and can render updated suggestions,
|
|
29
|
+
disabled status, and hint. A new field identity takes a fresh seed. Native
|
|
30
|
+
form reset restores the seed captured for the current field. Resolve
|
|
31
|
+
`initialValue ?? value ?? ''` at creation if both spellings are accepted,
|
|
32
|
+
so an explicit empty string wins. Render the seed through the existing escaped
|
|
33
|
+
input attribute for server and client. Capture it in the field owner, never
|
|
34
|
+
in a process-wide map keyed on a DOM id. A browser can host multiple
|
|
35
|
+
independent roots and a server can render multiple requests at once.
|
|
36
|
+
|
|
37
|
+
A direct `initialValue` alias on today's function would still set the new
|
|
38
|
+
value attribute on each coarse render. A blurred field would lose its edit.
|
|
39
|
+
The JSX `defaultValue` spelling aliases to that same attribute. An observer
|
|
40
|
+
can run after the morph has overwritten the property. Skipping the whole
|
|
41
|
+
input during morph would also freeze disabled status, placeholder and accessible
|
|
42
|
+
relationships. A general initial-only attribute in the core renderer deserves
|
|
43
|
+
its own evaluation across full and granular reconciliation and the supported
|
|
44
|
+
runtime versions.
|
|
45
|
+
|
|
46
|
+
For an owner-based API, verify changing suggestions and unrelated parent
|
|
47
|
+
props before and after blur, accessible label/hint changes, reset, remount,
|
|
48
|
+
a second independent root, and escaped initial text in SSR. Compare that
|
|
49
|
+
authoring cost with keeping a stable `value` in the existing API.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import console from 'node:console';
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
import { fileURLToPath, URL } from 'node:url';
|
|
5
|
+
import { TextDecoder } from 'node:util';
|
|
6
|
+
import { gzipSync } from 'node:zlib';
|
|
7
|
+
|
|
8
|
+
import { build, version } from 'esbuild';
|
|
9
|
+
|
|
10
|
+
const ui = fileURLToPath(new URL('../../', import.meta.url));
|
|
11
|
+
const common = `
|
|
12
|
+
import { mount } from 'kerfjs';
|
|
13
|
+
import '@kerfjs/ui/combobox.css';
|
|
14
|
+
const props = { label: 'Tag', suggestions: ['blue'] };
|
|
15
|
+
`;
|
|
16
|
+
const manual =
|
|
17
|
+
common +
|
|
18
|
+
`
|
|
19
|
+
import { Combobox } from '@kerfjs/ui/combobox';
|
|
20
|
+
import { wireComboboxes } from '@kerfjs/ui/wire-comboboxes';
|
|
21
|
+
export function app(root, onCommit, initialValue) {
|
|
22
|
+
const stop = mount(root, () => Combobox({ ...props, id: 'tag', value: initialValue }));
|
|
23
|
+
const release = wireComboboxes(root, { onCommit });
|
|
24
|
+
return () => { release(); stop(); };
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const recipe =
|
|
28
|
+
common +
|
|
29
|
+
`
|
|
30
|
+
import { createComboboxOwner } from './docs/examples/scoped-combobox.ts';
|
|
31
|
+
export function app(root, onCommit, initialValue) {
|
|
32
|
+
const owner = createComboboxOwner();
|
|
33
|
+
const tag = owner.field({ id: 'tag', initialValue, onCommit });
|
|
34
|
+
const stop = mount(root, () => tag.render(props));
|
|
35
|
+
owner.connect(root);
|
|
36
|
+
return () => { owner.dispose(); stop(); };
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
const button = `
|
|
40
|
+
import { mount } from 'kerfjs';
|
|
41
|
+
import { Button } from '@kerfjs/ui/button';
|
|
42
|
+
import '@kerfjs/ui/button.css';
|
|
43
|
+
export const app = (root) => mount(root, () => Button({ children: 'Save' }));
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
async function bundle(contents) {
|
|
47
|
+
const result = await build({
|
|
48
|
+
stdin: { contents, resolveDir: ui },
|
|
49
|
+
tsconfigRaw: {},
|
|
50
|
+
bundle: true,
|
|
51
|
+
minify: true,
|
|
52
|
+
platform: 'browser',
|
|
53
|
+
format: 'esm',
|
|
54
|
+
target: 'es2022',
|
|
55
|
+
write: false,
|
|
56
|
+
outdir: 'out',
|
|
57
|
+
legalComments: 'none',
|
|
58
|
+
});
|
|
59
|
+
return result.outputFiles.map((file) => file.contents);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
console.log(`Node ${process.versions.node}, esbuild ${version}, default gzip`);
|
|
63
|
+
for (const [name, code] of Object.entries({ manual, recipe, button })) {
|
|
64
|
+
const [js, css] = await bundle(code);
|
|
65
|
+
console.log(name, {
|
|
66
|
+
js: js.length,
|
|
67
|
+
jsGzip: gzipSync(js).length,
|
|
68
|
+
css: css.length,
|
|
69
|
+
cssGzip: gzipSync(css).length,
|
|
70
|
+
});
|
|
71
|
+
if (name === 'button') {
|
|
72
|
+
const unusedOwner =
|
|
73
|
+
"import { createComboboxOwner } from './docs/examples/scoped-combobox.ts';";
|
|
74
|
+
const [trimmedJs, trimmedCss] = await bundle(unusedOwner + code);
|
|
75
|
+
assert.doesNotMatch(
|
|
76
|
+
new TextDecoder().decode(trimmedJs),
|
|
77
|
+
/data-example-combobox-owner|kui-combobox__input/,
|
|
78
|
+
);
|
|
79
|
+
assert.doesNotMatch(new TextDecoder().decode(css), /\.kui-combobox\{/);
|
|
80
|
+
console.log('button with unused owner import', {
|
|
81
|
+
js: trimmedJs.length,
|
|
82
|
+
jsGzip: gzipSync(trimmedJs).length,
|
|
83
|
+
css: trimmedCss.length,
|
|
84
|
+
cssGzip: gzipSync(trimmedCss).length,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|