@kerfjs/ui 5.0.0-beta.8 → 5.0.0-beta.81
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 +546 -139
- package/ai/application-ui-diagnostic-ids-v1.json +113 -0
- package/ai/application-ui-profile-sync.cjs +548 -0
- package/ai/application-ui-profile.d.mts +1 -0
- package/ai/application-ui-profile.d.ts +106 -0
- package/ai/application-ui-profile.defaults.json +96 -0
- package/ai/application-ui-profile.mjs +653 -0
- package/ai/application-ui-profile.schema.json +140 -0
- package/ai/catalog-authoring.json +36 -0
- package/ai/catalog-authoring.schema.json +109 -0
- package/ai/compile-time-contracts-v1.json +149 -0
- package/ai/compile-time-contracts-v1.schema.json +52 -0
- package/ai/component-catalog-extension.schema.json +104 -0
- package/ai/component-catalog.json +4280 -457
- package/ai/component-catalog.schema.json +94 -1
- package/ai/component-class-owners.cjs +83 -0
- package/ai/component-composition-extension.d.ts +7 -0
- package/ai/component-composition-extension.schema.json +7 -0
- package/ai/component-composition-rules.json +520 -0
- package/ai/component-composition.d.ts +129 -0
- package/ai/component-composition.json +7401 -0
- package/ai/component-composition.schema.json +408 -0
- package/ai/components/README.md +171 -0
- package/ai/components/application-tabs.md +65 -0
- package/ai/components/badge.md +72 -0
- package/ai/components/chip.md +72 -0
- package/ai/components/collapsible-panel.md +102 -0
- package/ai/components/content-item.md +96 -0
- package/ai/components/disclosure-arrow.md +77 -0
- package/ai/components/document-baseline.md +75 -0
- package/ai/components/empty-state.md +80 -0
- package/ai/components/feedback.md +71 -0
- package/ai/components/floating-toolbar.md +82 -0
- package/ai/components/foundation.md +65 -0
- package/ai/components/grid.md +100 -0
- package/ai/components/headers.md +63 -0
- package/ai/components/layout.md +75 -0
- package/ai/components/list-action-row.md +91 -0
- package/ai/components/list-header.md +91 -0
- package/ai/components/list-inset-control.md +74 -0
- package/ai/components/list-inset-text.md +72 -0
- package/ai/components/list-item.md +94 -0
- package/ai/components/list.md +106 -0
- package/ai/components/loading-spinner.md +73 -0
- package/ai/components/lucide-icon.md +97 -0
- package/ai/components/nav-stack.md +105 -0
- package/ai/components/pane.md +104 -0
- package/ai/components/popup-menu.md +171 -0
- package/ai/components/recipe-app-shell.md +57 -0
- package/ai/components/recipe-collapsible-sidebar.md +57 -0
- package/ai/components/recipe-compact-toolbar.md +57 -0
- package/ai/components/recipe-composer-form.md +57 -0
- package/ai/components/recipe-list-detail-dialog.md +57 -0
- package/ai/components/recipe-list-workspace-states.md +57 -0
- package/ai/components/recipe-loading-inspector.md +57 -0
- package/ai/components/recipe-navigation-sidebar.md +57 -0
- package/ai/components/recipe-navigation-stack.md +57 -0
- package/ai/components/recipe-workspace-header.md +57 -0
- package/ai/components/resize.md +106 -0
- package/ai/components/row.md +96 -0
- package/ai/components/segmented-control.md +82 -0
- package/ai/components/select.md +115 -0
- package/ai/components/skeleton.md +84 -0
- package/ai/components/spacer.md +86 -0
- package/ai/components/split-view.md +103 -0
- package/ai/components/state-banner.md +94 -0
- package/ai/components/sunken-panel.md +79 -0
- package/ai/components/surface-scaffold.md +87 -0
- package/ai/components/tab-bar.md +113 -0
- package/ai/components/tab-navigator.md +95 -0
- package/ai/components/tabs.md +95 -0
- package/ai/components/text.md +87 -0
- package/ai/components/token-search-field.md +107 -0
- package/ai/components/toolbar-control-group.md +121 -0
- package/ai/components/toolbar-text.md +98 -0
- package/ai/components/toolbar.md +101 -0
- package/ai/components/value-table.md +73 -0
- package/ai/components/wa-accordion-item.md +55 -0
- package/ai/components/wa-accordion.md +65 -0
- package/ai/components/wa-animated-image.md +55 -0
- package/ai/components/wa-animation.md +55 -0
- package/ai/components/wa-avatar.md +55 -0
- package/ai/components/wa-badge.md +55 -0
- package/ai/components/wa-breadcrumb-item.md +53 -0
- package/ai/components/wa-breadcrumb.md +55 -0
- package/ai/components/wa-button-group.md +59 -0
- package/ai/components/wa-button.md +55 -0
- package/ai/components/wa-callout.md +58 -0
- package/ai/components/wa-card.md +59 -0
- package/ai/components/wa-carousel-item.md +53 -0
- package/ai/components/wa-carousel.md +55 -0
- package/ai/components/wa-checkbox-group.md +55 -0
- package/ai/components/wa-checkbox.md +55 -0
- package/ai/components/wa-color-picker.md +55 -0
- package/ai/components/wa-comparison.md +55 -0
- package/ai/components/wa-copy-button.md +55 -0
- package/ai/components/wa-details.md +61 -0
- package/ai/components/wa-dialog.md +59 -0
- package/ai/components/wa-divider.md +53 -0
- package/ai/components/wa-drawer.md +55 -0
- package/ai/components/wa-dropdown-item.md +60 -0
- package/ai/components/wa-dropdown.md +60 -0
- package/ai/components/wa-format-bytes.md +53 -0
- package/ai/components/wa-format-date.md +53 -0
- package/ai/components/wa-format-number.md +53 -0
- package/ai/components/wa-icon.md +58 -0
- package/ai/components/wa-include.md +53 -0
- package/ai/components/wa-input.md +59 -0
- package/ai/components/wa-intersection-observer.md +53 -0
- package/ai/components/wa-known-date.md +53 -0
- package/ai/components/wa-markdown.md +53 -0
- package/ai/components/wa-mutation-observer.md +53 -0
- package/ai/components/wa-number-input.md +55 -0
- package/ai/components/wa-option.md +59 -0
- package/ai/components/wa-otp-input.md +53 -0
- package/ai/components/wa-page.md +53 -0
- package/ai/components/wa-pagination.md +55 -0
- package/ai/components/wa-popover.md +55 -0
- package/ai/components/wa-popup.md +53 -0
- package/ai/components/wa-progress-bar.md +53 -0
- package/ai/components/wa-progress-ring.md +53 -0
- package/ai/components/wa-qr-code.md +53 -0
- package/ai/components/wa-radio-group.md +59 -0
- package/ai/components/wa-radio.md +55 -0
- package/ai/components/wa-random-content.md +53 -0
- package/ai/components/wa-rating.md +55 -0
- package/ai/components/wa-relative-time.md +53 -0
- package/ai/components/wa-resize-observer.md +53 -0
- package/ai/components/wa-scroller.md +53 -0
- package/ai/components/wa-select.md +63 -0
- package/ai/components/wa-skeleton.md +53 -0
- package/ai/components/wa-slider.md +55 -0
- package/ai/components/wa-spinner.md +58 -0
- package/ai/components/wa-split-panel.md +58 -0
- package/ai/components/wa-switch.md +53 -0
- package/ai/components/wa-tab-group.md +69 -0
- package/ai/components/wa-tab-panel.md +60 -0
- package/ai/components/wa-tab.md +59 -0
- package/ai/components/wa-tag.md +59 -0
- package/ai/components/wa-textarea.md +53 -0
- package/ai/components/wa-time-input.md +55 -0
- package/ai/components/wa-toast-item.md +60 -0
- package/ai/components/wa-toast.md +60 -0
- package/ai/components/wa-tooltip.md +55 -0
- package/ai/components/wa-tree-item.md +55 -0
- package/ai/components/wa-tree.md +55 -0
- package/ai/components/wa-zoomable-frame.md +55 -0
- package/ai/components/workbench.md +119 -0
- package/ai/public-api-signatures-v1.md +2821 -250
- package/ai/skill.md +354 -66
- package/ai/webawesome-jsx-signatures-v1.md +9 -2
- package/analyzer/cli.mjs +49 -0
- package/analyzer/component-ownership.d.mts +72 -0
- package/analyzer/component-ownership.mjs +429 -0
- package/analyzer/index.d.mts +53 -0
- package/analyzer/index.mjs +2346 -0
- package/analyzer/loud-pairs.d.mts +49 -0
- package/analyzer/loud-pairs.mjs +357 -0
- package/analyzer/report.schema.json +66 -0
- package/analyzer/selectors.d.mts +21 -0
- package/analyzer/selectors.mjs +212 -0
- package/catalog-projection-cli.mjs +96 -0
- package/catalog-projection.d.mts +55 -0
- package/catalog-projection.mjs +62 -0
- package/dist/app-tab.d.ts +39 -4
- package/dist/app-tab.js +2 -1
- package/dist/badge.d.ts +54 -0
- package/dist/badge.js +3 -0
- package/dist/badge.js.map +1 -0
- package/dist/browser/badge.js +3 -0
- package/dist/browser/catalog.js +26 -0
- package/dist/browser/chip.js +3 -0
- package/dist/browser/collapsible-panel.js +9 -0
- package/dist/browser/content-item.js +3 -0
- package/dist/browser/floating-toolbar.js +3 -0
- package/dist/browser/grid.js +3 -0
- package/dist/browser/list-action-row.js +5 -0
- package/dist/browser/{menu-header.js → list-header.js} +5 -3
- package/dist/browser/list-inset-control.js +3 -0
- package/dist/browser/list-inset-text.js +3 -0
- package/dist/browser/list-item.js +5 -0
- package/dist/browser/list.js +3 -0
- package/dist/browser/nav-stack.js +11 -0
- package/dist/browser/pane.js +3 -0
- package/dist/browser/popup-menu.js +3 -0
- package/dist/browser/row.js +3 -0
- package/dist/browser/segmented-control.js +0 -1
- package/dist/browser/select.js +2 -1
- package/dist/browser/spacer.js +3 -0
- package/dist/browser/split-view.js +13 -0
- package/dist/browser/state-banner.js +1 -0
- package/dist/browser/sunken-panel.js +3 -0
- package/dist/browser/surface-scaffold.js +3 -0
- package/dist/browser/tab-navigator.js +4 -0
- package/dist/browser/text.js +3 -0
- package/dist/browser/toolbar-control-group.js +1 -0
- package/dist/browser/workbench.js +14 -0
- package/dist/catalog-resources.d.ts +48 -0
- package/dist/catalog-resources.js +22 -0
- package/dist/catalog-resources.js.map +1 -0
- package/dist/catalog.d.ts +92 -0
- package/dist/catalog.js +541 -0
- package/dist/catalog.js.map +1 -0
- package/dist/chip.d.ts +36 -0
- package/dist/chip.js +3 -0
- package/dist/chip.js.map +1 -0
- package/dist/chunk-2GOCOLQL.js +270 -0
- package/dist/chunk-2GOCOLQL.js.map +1 -0
- package/dist/chunk-3CXRQAYT.js +288 -0
- package/dist/chunk-3CXRQAYT.js.map +1 -0
- package/dist/chunk-3RE2JMZU.js +48 -0
- package/dist/chunk-3RE2JMZU.js.map +1 -0
- package/dist/chunk-3SXWV2IR.js +295 -0
- package/dist/chunk-3SXWV2IR.js.map +1 -0
- package/dist/chunk-3XPGJUUQ.js +37 -0
- package/dist/chunk-3XPGJUUQ.js.map +1 -0
- package/dist/chunk-4Y4L5YEI.js +66 -0
- package/dist/chunk-4Y4L5YEI.js.map +1 -0
- package/dist/chunk-5BZBIRQG.js +452 -0
- package/dist/chunk-5BZBIRQG.js.map +1 -0
- package/dist/chunk-5D3WDMIK.js +71 -0
- package/dist/chunk-5D3WDMIK.js.map +1 -0
- package/dist/chunk-62VMNBV2.js +779 -0
- package/dist/chunk-62VMNBV2.js.map +1 -0
- package/dist/chunk-75I3SNUJ.js +44 -0
- package/dist/chunk-75I3SNUJ.js.map +1 -0
- package/dist/chunk-7QQ3HE47.js +17 -0
- package/dist/chunk-7QQ3HE47.js.map +1 -0
- package/dist/chunk-7TE6XDFI.js +91 -0
- package/dist/chunk-7TE6XDFI.js.map +1 -0
- package/dist/chunk-A7DYEERU.js +59 -0
- package/dist/chunk-A7DYEERU.js.map +1 -0
- package/dist/chunk-AN5IWMTM.js +24 -0
- package/dist/chunk-AN5IWMTM.js.map +1 -0
- package/dist/chunk-ARZ4RSQO.js +48 -0
- package/dist/chunk-ARZ4RSQO.js.map +1 -0
- package/dist/chunk-BJLXE56E.js +135 -0
- package/dist/chunk-BJLXE56E.js.map +1 -0
- package/dist/chunk-BYHGRKC3.js +44 -0
- package/dist/chunk-BYHGRKC3.js.map +1 -0
- package/dist/chunk-CEJ5FK6G.js +288 -0
- package/dist/chunk-CEJ5FK6G.js.map +1 -0
- package/dist/chunk-CVKIADIS.js +172 -0
- package/dist/chunk-CVKIADIS.js.map +1 -0
- package/dist/chunk-DQDTZE4W.js +70 -0
- package/dist/chunk-DQDTZE4W.js.map +1 -0
- package/dist/chunk-EFDCALR3.js +66 -0
- package/dist/chunk-EFDCALR3.js.map +1 -0
- package/dist/chunk-FL6J644M.js +116 -0
- package/dist/chunk-FL6J644M.js.map +1 -0
- package/dist/chunk-GS2QD3N7.js +14 -0
- package/dist/chunk-GS2QD3N7.js.map +1 -0
- package/dist/chunk-H45DAZBL.js +491 -0
- package/dist/chunk-H45DAZBL.js.map +1 -0
- package/dist/chunk-H7ZJEI3H.js +52 -0
- package/dist/chunk-H7ZJEI3H.js.map +1 -0
- package/dist/chunk-HFLGWMG3.js +138 -0
- package/dist/chunk-HFLGWMG3.js.map +1 -0
- package/dist/chunk-HFQDSSED.js +188 -0
- package/dist/chunk-HFQDSSED.js.map +1 -0
- package/dist/{chunk-56RJXPHG.js → chunk-I4SDIMFA.js} +7 -4
- package/dist/chunk-I4SDIMFA.js.map +1 -0
- package/dist/chunk-IM3GKYOG.js +202 -0
- package/dist/chunk-IM3GKYOG.js.map +1 -0
- package/dist/chunk-J3AWE5I4.js +50 -0
- package/dist/chunk-J3AWE5I4.js.map +1 -0
- package/dist/chunk-JOR5LGYE.js +55 -0
- package/dist/chunk-JOR5LGYE.js.map +1 -0
- package/dist/chunk-JZM3G6RT.js +149 -0
- package/dist/chunk-JZM3G6RT.js.map +1 -0
- package/dist/{chunk-7BR3DO2A.js → chunk-LAZLBC2Q.js} +14 -5
- package/dist/chunk-LAZLBC2Q.js.map +1 -0
- package/dist/chunk-LQKY5S4F.js +506 -0
- package/dist/chunk-LQKY5S4F.js.map +1 -0
- package/dist/chunk-LRAIS3YB.js +158 -0
- package/dist/chunk-LRAIS3YB.js.map +1 -0
- package/dist/chunk-MXNIVEVL.js +48 -0
- package/dist/chunk-MXNIVEVL.js.map +1 -0
- package/dist/chunk-NJZMR7HM.js +135 -0
- package/dist/chunk-NJZMR7HM.js.map +1 -0
- package/dist/chunk-NMWDHZVM.js +35 -0
- package/dist/chunk-NMWDHZVM.js.map +1 -0
- package/dist/{chunk-YGN7OMLT.js → chunk-NS2TBYM4.js} +8 -5
- package/dist/chunk-NS2TBYM4.js.map +1 -0
- package/dist/chunk-NVKRZ5DI.js +222 -0
- package/dist/chunk-NVKRZ5DI.js.map +1 -0
- package/dist/chunk-NVRJ7C3W.js +83 -0
- package/dist/chunk-NVRJ7C3W.js.map +1 -0
- package/dist/chunk-O27D24CA.js +250 -0
- package/dist/chunk-O27D24CA.js.map +1 -0
- package/dist/chunk-PQQQXJGV.js +58 -0
- package/dist/chunk-PQQQXJGV.js.map +1 -0
- package/dist/chunk-RRCD3A6G.js +139 -0
- package/dist/chunk-RRCD3A6G.js.map +1 -0
- package/dist/chunk-S3ECMF23.js +33 -0
- package/dist/chunk-S3ECMF23.js.map +1 -0
- package/dist/chunk-S4ZGTDSG.js +18 -0
- package/dist/chunk-S4ZGTDSG.js.map +1 -0
- package/dist/chunk-VHXHLZ6R.js +69 -0
- package/dist/chunk-VHXHLZ6R.js.map +1 -0
- package/dist/chunk-VIGVNDXZ.js +165 -0
- package/dist/chunk-VIGVNDXZ.js.map +1 -0
- package/dist/chunk-VR7MWD2X.js +91 -0
- package/dist/chunk-VR7MWD2X.js.map +1 -0
- package/dist/chunk-Y6KT7ZTR.js +109 -0
- package/dist/chunk-Y6KT7ZTR.js.map +1 -0
- package/dist/chunk-YLJ6X3AC.js +34 -0
- package/dist/chunk-YLJ6X3AC.js.map +1 -0
- package/dist/collapsible-panel.d.ts +137 -0
- package/dist/collapsible-panel.js +135 -0
- package/dist/collapsible-panel.js.map +1 -0
- package/dist/content-item.d.ts +99 -0
- package/dist/content-item.js +4 -0
- package/dist/content-item.js.map +1 -0
- package/dist/css-values.d.ts +112 -0
- package/dist/css-values.js +3 -0
- package/dist/css-values.js.map +1 -0
- package/dist/device-class.js +34 -6
- package/dist/device-class.js.map +1 -1
- package/dist/disclosure-arrow.d.ts +6 -1
- package/dist/disclosure-arrow.js +2 -1
- package/dist/empty-state.d.ts +5 -2
- package/dist/empty-state.js +2 -1
- package/dist/flex-alignment-4ms8ZbV8.d.ts +5 -0
- package/dist/floating-toolbar.d.ts +51 -0
- package/dist/floating-toolbar.js +3 -0
- package/dist/floating-toolbar.js.map +1 -0
- package/dist/grid.d.ts +57 -0
- package/dist/grid.js +5 -0
- package/dist/grid.js.map +1 -0
- package/dist/help-tags-register.d.ts +13 -0
- package/dist/help-tags-register.js +9 -0
- package/dist/help-tags-register.js.map +1 -0
- package/dist/index.d.ts +40 -18
- package/dist/index.js +44 -23
- package/dist/{menu-action-row.d.ts → list-action-row.d.ts} +21 -9
- package/dist/list-action-row.js +8 -0
- package/dist/list-action-row.js.map +1 -0
- package/dist/list-header.d.ts +98 -0
- package/dist/list-header.js +10 -0
- package/dist/list-header.js.map +1 -0
- package/dist/list-inset-control.d.ts +22 -0
- package/dist/list-inset-control.js +3 -0
- package/dist/list-inset-control.js.map +1 -0
- package/dist/list-inset-text.d.ts +30 -0
- package/dist/list-inset-text.js +4 -0
- package/dist/list-inset-text.js.map +1 -0
- package/dist/list-item.d.ts +62 -0
- package/dist/list-item.js +8 -0
- package/dist/list-item.js.map +1 -0
- package/dist/list.d.ts +63 -0
- package/dist/list.js +6 -0
- package/dist/list.js.map +1 -0
- package/dist/loading-spinner.d.ts +12 -2
- package/dist/loading-spinner.js +2 -1
- package/dist/lucide-icon.d.ts +14 -2
- package/dist/lucide-icon.js +2 -1
- package/dist/nav-stack-B1Qc2e5q.d.ts +101 -0
- package/dist/nav-stack.d.ts +13 -38
- package/dist/nav-stack.js +10 -1
- package/dist/pane.d.ts +116 -0
- package/dist/pane.js +4 -0
- package/dist/pane.js.map +1 -0
- package/dist/panel-toolbar-CL9tYOkh.d.ts +72 -0
- package/dist/popup-menu-register.d.ts +9 -0
- package/dist/popup-menu-register.js +244 -0
- package/dist/popup-menu-register.js.map +1 -0
- package/dist/popup-menu.d.ts +100 -0
- package/dist/popup-menu.js +3 -0
- package/dist/popup-menu.js.map +1 -0
- package/dist/resizable-region.d.ts +32 -3
- package/dist/resizable-region.js +1 -1
- package/dist/row.d.ts +48 -0
- package/dist/row.js +6 -0
- package/dist/row.js.map +1 -0
- package/dist/segmented-control.d.ts +12 -9
- package/dist/segmented-control.js +1 -2
- package/dist/select-register.d.ts +5 -1
- package/dist/select-register.js +247 -3
- package/dist/select-register.js.map +1 -1
- package/dist/select.d.ts +103 -8
- package/dist/select.js +3 -1
- package/dist/semantic-content-BbzjvSu9.d.ts +14 -0
- package/dist/semantic-tone-CdW013KF.d.ts +4 -0
- package/dist/sides-BPSWde0A.d.ts +4 -0
- package/dist/skeleton.d.ts +14 -7
- package/dist/skeleton.js +2 -1
- package/dist/spacer.d.ts +18 -0
- package/dist/spacer.js +4 -0
- package/dist/spacer.js.map +1 -0
- package/dist/split-view.d.ts +44 -7
- package/dist/split-view.js +124 -10
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +21 -7
- package/dist/state-banner.js +3 -1
- package/dist/styles/app-tab.css +224 -0
- package/dist/styles/badge.css +118 -0
- package/dist/styles/catalog/components/catalog-example-stack.css +9 -0
- package/dist/styles/catalog/components/catalog-example.css +168 -0
- package/dist/styles/catalog/components/catalog-stage.css +55 -0
- package/dist/styles/catalog/components/catalog.css +50 -0
- package/dist/styles/catalog.css +5 -0
- package/dist/styles/chip.css +138 -0
- package/dist/styles/collapsible-panel.css +580 -0
- package/dist/styles/components/actions/floating-toolbar/floating-toolbar.css +119 -0
- package/dist/styles/components/actions/popup-menu/popup-menu.css +285 -0
- package/dist/styles/components/actions/toolbar/toolbar.css +417 -0
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +891 -0
- package/dist/styles/components/actions/toolbar-text/toolbar-text.css +171 -0
- package/dist/styles/components/collections/list/list.css +133 -0
- package/dist/styles/components/collections/list-action-row/list-action-row.css +258 -0
- package/dist/styles/components/collections/list-header/list-header.css +229 -0
- package/dist/styles/components/collections/list-inset-control/list-inset-control.css +30 -0
- package/dist/styles/components/collections/list-inset-text/list-inset-text.css +29 -0
- package/dist/styles/components/collections/list-item/list-item.css +255 -0
- package/dist/styles/components/data-display/value-table/value-table.css +105 -0
- package/dist/styles/components/feedback/badge/badge.css +118 -0
- package/dist/styles/components/feedback/chip/chip.css +138 -0
- package/dist/styles/components/feedback/empty-state/empty-state.css +47 -0
- package/dist/styles/components/feedback/loading-spinner/loading-spinner.css +25 -0
- package/dist/styles/components/feedback/skeleton/skeleton.css +92 -0
- package/dist/styles/components/feedback/state-banner/state-banner.css +248 -0
- package/dist/styles/components/forms/segmented-control/segmented-control.css +196 -0
- package/dist/styles/components/forms/select/select.css +454 -0
- package/dist/styles/components/forms/token-search-field/token-search-field.css +392 -0
- package/dist/styles/components/layout/collapsible-panel/collapsible-panel.css +580 -0
- package/dist/styles/components/layout/grid/grid.css +85 -0
- package/dist/styles/components/layout/pane/pane.css +294 -0
- package/dist/styles/components/layout/resizable-region/resizable-region.css +545 -0
- package/dist/styles/components/layout/row/row.css +111 -0
- package/dist/styles/components/layout/spacer/spacer.css +11 -0
- package/dist/styles/components/layout/split-view/split-view.css +146 -0
- package/dist/styles/components/layout/workbench/workbench.css +1075 -0
- package/dist/styles/components/media/lucide-icon/lucide-icon.css +15 -0
- package/dist/styles/components/navigation/app-tab/app-tab.css +376 -0
- package/dist/styles/components/navigation/disclosure-arrow/disclosure-arrow.css +23 -0
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +242 -0
- package/dist/styles/components/navigation/tab-bar/tab-bar.css +183 -0
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +237 -0
- package/dist/styles/components/surfaces/content-item/content-item.css +120 -0
- package/dist/styles/components/surfaces/sunken-panel/sunken-panel.css +34 -0
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +111 -0
- package/dist/styles/components/typography/text/text.css +158 -0
- package/dist/styles/content-item.css +120 -0
- package/dist/styles/document.css +33 -0
- package/dist/styles/floating-toolbar.css +119 -0
- package/dist/styles/foundation.css +187 -45
- package/dist/styles/grid.css +85 -0
- package/dist/styles/layout.css +3 -41
- package/dist/styles/list-action-row.css +258 -0
- package/dist/styles/list-header.css +229 -0
- package/dist/styles/list-inset-control.css +30 -0
- package/dist/styles/list-inset-text.css +29 -0
- package/dist/styles/list-item.css +255 -0
- package/dist/styles/list.css +133 -0
- package/dist/styles/loading-spinner.css +4 -0
- package/dist/styles/lucide-icon.css +9 -0
- package/dist/styles/nav-stack.css +180 -50
- package/dist/styles/pane.css +294 -0
- package/dist/styles/popup-menu.css +285 -0
- package/dist/styles/resizable-region.css +438 -4
- package/dist/styles/row.css +111 -0
- package/dist/styles/segmented-control.css +36 -9
- package/dist/styles/select.css +337 -21
- package/dist/styles/skeleton.css +64 -3
- package/dist/styles/spacer.css +11 -0
- package/dist/styles/split-view.css +114 -3
- package/dist/styles/state-banner.css +94 -19
- package/dist/styles/styles.css +13 -4
- package/dist/styles/sunken-panel.css +34 -0
- package/dist/styles/surface-scaffold.css +111 -0
- package/dist/styles/tab-bar.css +147 -9
- package/dist/styles/tab-navigator.css +237 -0
- package/dist/styles/text.css +158 -0
- package/dist/styles/token-search-field.css +167 -56
- package/dist/styles/toolbar-control-group.css +710 -30
- package/dist/styles/toolbar-text.css +139 -8
- package/dist/styles/toolbar.css +367 -11
- package/dist/styles/value-table.css +34 -4
- package/dist/styles/webawesome.css +388 -16
- package/dist/styles/workbench.css +988 -7
- package/dist/sunken-panel.d.ts +31 -0
- package/dist/sunken-panel.js +3 -0
- package/dist/sunken-panel.js.map +1 -0
- package/dist/surface-scaffold-register.d.ts +4 -0
- package/dist/surface-scaffold-register.js +59 -0
- package/dist/surface-scaffold-register.js.map +1 -0
- package/dist/surface-scaffold.d.ts +38 -0
- package/dist/surface-scaffold.js +3 -0
- package/dist/surface-scaffold.js.map +1 -0
- package/dist/tab-bar.d.ts +39 -6
- package/dist/tab-bar.js +1 -1
- package/dist/tab-navigator.d.ts +86 -0
- package/dist/tab-navigator.js +95 -0
- package/dist/tab-navigator.js.map +1 -0
- package/dist/text.d.ts +63 -0
- package/dist/text.js +3 -0
- package/dist/text.js.map +1 -0
- package/dist/token-search-field.d.ts +3 -43
- package/dist/token-search-field.js +2 -1
- package/dist/token-search-model-DTcTXWMS.d.ts +154 -0
- package/dist/token-search-model.d.ts +3 -0
- package/dist/token-search-model.js +3 -0
- package/dist/token-search-model.js.map +1 -0
- package/dist/toolbar-control-group.d.ts +89 -7
- package/dist/toolbar-control-group.js +3 -1
- package/dist/toolbar-text.d.ts +45 -9
- package/dist/toolbar-text.js +2 -1
- package/dist/toolbar.d.ts +59 -7
- package/dist/toolbar.js +1 -1
- package/dist/types-C9BubXfz.d.ts +117 -0
- package/dist/value-table.d.ts +11 -3
- package/dist/value-table.js +2 -1
- package/dist/webawesome.d.ts +8 -1
- package/dist/wire-catalog.d.ts +82 -0
- package/dist/wire-catalog.js +407 -0
- package/dist/wire-catalog.js.map +1 -0
- package/dist/wire-content-items.d.ts +11 -0
- package/dist/wire-content-items.js +114 -0
- package/dist/wire-content-items.js.map +1 -0
- package/dist/wire-nav-stack.d.ts +4 -1
- package/dist/wire-nav-stack.js +191 -15
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-resizable-regions.d.ts +2 -1
- package/dist/wire-resizable-regions.js +2 -1
- package/dist/wire-scroll-dividers.d.ts +72 -0
- package/dist/wire-scroll-dividers.js +3 -0
- package/dist/wire-scroll-dividers.js.map +1 -0
- package/dist/wire-sidebar.d.ts +63 -0
- package/dist/wire-sidebar.js +231 -0
- package/dist/wire-sidebar.js.map +1 -0
- package/dist/wire-tab-bars.d.ts +19 -2
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-navigator.d.ts +11 -0
- package/dist/wire-tab-navigator.js +21 -0
- package/dist/wire-tab-navigator.js.map +1 -0
- package/dist/wire-token-search-fields.d.ts +65 -3
- package/dist/wire-token-search-fields.js +2 -1
- package/dist/wire-toolbar-visibility.d.ts +13 -0
- package/dist/wire-toolbar-visibility.js +3 -0
- package/dist/wire-toolbar-visibility.js.map +1 -0
- package/dist/wire-workbench.d.ts +116 -0
- package/dist/wire-workbench.js +6 -0
- package/dist/wire-workbench.js.map +1 -0
- package/dist/workbench.d.ts +246 -9
- package/dist/workbench.js +17 -15
- package/dist/workbench.js.map +1 -1
- package/docs/accessibility.md +497 -26
- package/docs/app-layouts.md +141 -10
- package/docs/apple-hig.md +1 -0
- package/docs/catalog.md +493 -0
- package/docs/collapsible-panel.md +382 -0
- package/docs/component-contract.md +736 -61
- package/docs/component-integration.md +75 -0
- package/docs/component-selection.md +619 -97
- package/docs/design/templates/empty-state/filtered-dark.svg +1 -0
- package/docs/design/templates/empty-state/filtered.svg +1 -0
- package/docs/design/templates/empty-state/with-action-dark.svg +1 -0
- package/docs/design/templates/empty-state/with-action.svg +1 -0
- package/docs/design/templates/empty-state-dark.svg +1 -0
- package/docs/design/templates/empty-state.svg +1 -0
- package/docs/design/templates/list/compact-dark.svg +1 -0
- package/docs/design/templates/list/compact.svg +1 -0
- package/docs/design/templates/list/stack-dark.svg +1 -0
- package/docs/design/templates/list/stack.svg +1 -0
- package/docs/design/templates/list-action-row/default-dark.svg +1 -0
- package/docs/design/templates/list-action-row/default.svg +1 -0
- package/docs/design/templates/list-action-row/selected-dark.svg +1 -0
- package/docs/design/templates/list-action-row/selected.svg +1 -0
- package/docs/design/templates/list-action-row-dark.svg +1 -0
- package/docs/design/templates/list-action-row.svg +1 -0
- package/docs/design/templates/list-dark.svg +1 -0
- package/docs/design/templates/list-header/action-dark.svg +1 -0
- package/docs/design/templates/list-header/action.svg +1 -0
- package/docs/design/templates/list-header/count-dark.svg +1 -0
- package/docs/design/templates/list-header/count.svg +1 -0
- package/docs/design/templates/list-header/inline-action-dark.svg +1 -0
- package/docs/design/templates/list-header/inline-action.svg +1 -0
- package/docs/design/templates/list-header/size-l-dark.svg +1 -0
- package/docs/design/templates/list-header/size-l.svg +1 -0
- package/docs/design/templates/list-header/size-m-dark.svg +1 -0
- package/docs/design/templates/list-header/size-m.svg +1 -0
- package/docs/design/templates/list-header/size-xl-dark.svg +1 -0
- package/docs/design/templates/list-header/size-xl.svg +1 -0
- package/docs/design/templates/list-header/size-xs-dark.svg +1 -0
- package/docs/design/templates/list-header/size-xs.svg +1 -0
- package/docs/design/templates/list-header/toggle-collapsed-dark.svg +1 -0
- package/docs/design/templates/list-header/toggle-collapsed.svg +1 -0
- package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -0
- package/docs/design/templates/list-header/toggle-expanded.svg +1 -0
- package/docs/design/templates/list-header-dark.svg +1 -0
- package/docs/design/templates/list-header.svg +1 -0
- package/docs/design/templates/list-item/default-dark.svg +1 -0
- package/docs/design/templates/list-item/default.svg +1 -0
- package/docs/design/templates/list-item/multiline-dark.svg +1 -0
- package/docs/design/templates/list-item/multiline.svg +1 -0
- package/docs/design/templates/list-item/selected-dark.svg +1 -0
- package/docs/design/templates/list-item/selected.svg +1 -0
- package/docs/design/templates/list-item/trailing-dark.svg +1 -0
- package/docs/design/templates/list-item/trailing.svg +1 -0
- package/docs/design/templates/list-item-dark.svg +1 -0
- package/docs/design/templates/list-item.svg +1 -0
- package/docs/design/templates/list.svg +1 -0
- package/docs/design/templates/segmented-control/equal-dark.svg +1 -0
- package/docs/design/templates/segmented-control/equal.svg +1 -0
- package/docs/design/templates/segmented-control/pill-small-dark.svg +1 -0
- package/docs/design/templates/segmented-control/pill-small.svg +1 -0
- package/docs/design/templates/segmented-control-dark.svg +1 -0
- package/docs/design/templates/segmented-control.svg +1 -0
- package/docs/design/templates/skeleton/avatar-dark.svg +1 -0
- package/docs/design/templates/skeleton/avatar.svg +1 -0
- package/docs/design/templates/skeleton/block-dark.svg +1 -0
- package/docs/design/templates/skeleton/block.svg +1 -0
- package/docs/design/templates/skeleton/lines-dark.svg +1 -0
- package/docs/design/templates/skeleton/lines.svg +1 -0
- package/docs/design/templates/skeleton-dark.svg +1 -0
- package/docs/design/templates/skeleton.svg +1 -0
- package/docs/design/templates/state-banner/danger-dark.svg +1 -0
- package/docs/design/templates/state-banner/danger.svg +1 -0
- package/docs/design/templates/state-banner/info-badge-dark.svg +1 -0
- package/docs/design/templates/state-banner/info-badge.svg +1 -0
- package/docs/design/templates/state-banner/info-dark.svg +1 -0
- package/docs/design/templates/state-banner/info.svg +1 -0
- package/docs/design/templates/state-banner/success-dark.svg +1 -0
- package/docs/design/templates/state-banner/success.svg +1 -0
- package/docs/design/templates/state-banner/warning-dark.svg +1 -0
- package/docs/design/templates/state-banner/warning.svg +1 -0
- package/docs/design/templates/state-banner-dark.svg +1 -0
- package/docs/design/templates/state-banner.svg +1 -0
- package/docs/design/templates/tab-bar/workspace-tabs-dark.svg +1 -0
- package/docs/design/templates/tab-bar/workspace-tabs.svg +1 -0
- package/docs/design/templates/tab-bar-dark.svg +1 -0
- package/docs/design/templates/tab-bar.svg +1 -0
- package/docs/design/templates/token-search-field/empty-dark.svg +1 -0
- package/docs/design/templates/token-search-field/empty.svg +1 -0
- package/docs/design/templates/token-search-field/tokens-dark.svg +1 -0
- package/docs/design/templates/token-search-field/tokens.svg +1 -0
- package/docs/design/templates/token-search-field-dark.svg +1 -0
- package/docs/design/templates/token-search-field.svg +1 -0
- package/docs/design/templates/toolbar/title-and-actions-dark.svg +1 -0
- package/docs/design/templates/toolbar/title-and-actions.svg +1 -0
- package/docs/design/templates/toolbar/width-visibility-320-dark.svg +1 -0
- package/docs/design/templates/toolbar/width-visibility-320.svg +1 -0
- package/docs/design/templates/toolbar/width-visibility-600-dark.svg +1 -0
- package/docs/design/templates/toolbar/width-visibility-600.svg +1 -0
- package/docs/design/templates/toolbar-control-group/borderless-single-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/borderless-single.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-buttons-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-buttons.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-brand-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-brand.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-danger-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-danger.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-neutral-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-neutral.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-success-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-success.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-warning-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-warning.svg +1 -0
- package/docs/design/templates/toolbar-control-group/push-buttons-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/push-buttons.svg +1 -0
- package/docs/design/templates/toolbar-control-group/with-text-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/with-text.svg +1 -0
- package/docs/design/templates/toolbar-control-group-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group.svg +1 -0
- package/docs/design/templates/toolbar-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/dark-tone-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/dark-tone.svg +1 -0
- package/docs/design/templates/toolbar-text/default-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/default.svg +1 -0
- package/docs/design/templates/toolbar-text/large-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/large.svg +1 -0
- package/docs/design/templates/toolbar-text/small-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/small.svg +1 -0
- package/docs/design/templates/toolbar-text-dark.svg +1 -0
- package/docs/design/templates/toolbar-text.svg +1 -0
- package/docs/design/templates/toolbar.svg +1 -0
- package/docs/design/templates/value-table/details-dark.svg +1 -0
- package/docs/design/templates/value-table/details.svg +1 -0
- package/docs/design/templates/value-table-dark.svg +1 -0
- package/docs/design/templates/value-table.svg +1 -0
- package/docs/design/templates.md +140 -0
- package/docs/design-philosophy.md +48 -20
- package/docs/device-class.md +10 -9
- package/docs/document-baseline.md +42 -0
- package/docs/examples/application-ui-profile.json +60 -0
- package/docs/examples/command-palette-adapter.tsx +69 -17
- package/docs/examples/component-catalog-extension.json +52 -0
- package/docs/examples/component-composition-extension.json +80 -0
- package/docs/layout.md +601 -59
- package/docs/nav-stack.md +154 -14
- package/docs/recipes.md +142 -55
- package/docs/split-view.md +77 -6
- package/docs/sunken-panel.md +93 -0
- package/docs/surface-scaffold.md +74 -0
- package/docs/tab-navigator.md +210 -0
- package/docs/type-contracts.md +135 -0
- package/docs/ui-analyzer.md +404 -0
- package/docs/ui-doctor.md +202 -0
- package/docs/ui-evaluator.md +139 -0
- package/docs/ux-demo.md +46 -16
- package/docs/webawesome-theme.md +188 -16
- package/docs/workbench.md +621 -12
- package/doctor/cli.mjs +120 -0
- package/doctor/component-style-checks.mjs +457 -0
- package/doctor/config.schema.json +94 -0
- package/doctor/eslint-diagnostics.d.mts +24 -0
- package/doctor/eslint-diagnostics.mjs +24 -0
- package/doctor/index.d.mts +122 -0
- package/doctor/index.mjs +1403 -0
- package/doctor/report.schema.json +118 -0
- package/evaluator/cli.mjs +89 -0
- package/evaluator/index.d.mts +90 -0
- package/evaluator/index.mjs +1203 -0
- package/evaluator/report.schema.json +152 -0
- package/llms.txt +510 -49
- package/package.json +266 -44
- package/scripts/component-catalog-extension-validation.mjs +28 -0
- package/traversal-exclusions.mjs +27 -0
- package/ux-demo/recipes/app-shell.tsx +205 -17
- package/ux-demo/recipes/collapsible-sidebar.tsx +260 -0
- package/ux-demo/recipes/compact-toolbar.tsx +135 -14
- package/ux-demo/recipes/composer-form.tsx +133 -21
- package/ux-demo/recipes/list-detail-dialog.tsx +286 -0
- package/ux-demo/recipes/list-workspace-states.tsx +183 -11
- package/ux-demo/recipes/loaders.ts +15 -5
- package/ux-demo/recipes/loading-inspector.tsx +204 -0
- package/ux-demo/recipes/mount-recipe.ts +28 -10
- package/ux-demo/recipes/navigation-sidebar.tsx +139 -13
- package/ux-demo/recipes/navigation-stack.tsx +81 -26
- package/ux-demo/recipes/types.ts +23 -2
- package/ux-demo/recipes/workspace-header.tsx +86 -5
- package/dist/browser/menu-action-row.js +0 -4
- package/dist/browser/menu-item.js +0 -4
- package/dist/browser/panel-header.js +0 -7
- package/dist/chunk-2RJBFNB6.js +0 -172
- package/dist/chunk-2RJBFNB6.js.map +0 -1
- package/dist/chunk-2Z5TWHKQ.js +0 -34
- package/dist/chunk-2Z5TWHKQ.js.map +0 -1
- package/dist/chunk-3YD6ZNRA.js +0 -34
- package/dist/chunk-3YD6ZNRA.js.map +0 -1
- package/dist/chunk-55DATV3A.js +0 -10
- package/dist/chunk-55DATV3A.js.map +0 -1
- package/dist/chunk-56RJXPHG.js.map +0 -1
- package/dist/chunk-7BR3DO2A.js.map +0 -1
- package/dist/chunk-7LDCTU7D.js +0 -134
- package/dist/chunk-7LDCTU7D.js.map +0 -1
- package/dist/chunk-AQNKJRFH.js +0 -79
- package/dist/chunk-AQNKJRFH.js.map +0 -1
- package/dist/chunk-B24C4A6T.js +0 -22
- package/dist/chunk-B24C4A6T.js.map +0 -1
- package/dist/chunk-BLK3UEEI.js +0 -23
- package/dist/chunk-BLK3UEEI.js.map +0 -1
- package/dist/chunk-BNQ2YDV4.js +0 -20
- package/dist/chunk-BNQ2YDV4.js.map +0 -1
- package/dist/chunk-DAFFDO33.js +0 -14
- package/dist/chunk-DAFFDO33.js.map +0 -1
- package/dist/chunk-H6URQGJI.js +0 -42
- package/dist/chunk-H6URQGJI.js.map +0 -1
- package/dist/chunk-I7INRJO4.js +0 -17
- package/dist/chunk-I7INRJO4.js.map +0 -1
- package/dist/chunk-LC3YSAZC.js +0 -39
- package/dist/chunk-LC3YSAZC.js.map +0 -1
- package/dist/chunk-M5JRI6MN.js +0 -27
- package/dist/chunk-M5JRI6MN.js.map +0 -1
- package/dist/chunk-MBR3TYNL.js +0 -14
- package/dist/chunk-MBR3TYNL.js.map +0 -1
- package/dist/chunk-MFKMHK5W.js +0 -10
- package/dist/chunk-MFKMHK5W.js.map +0 -1
- package/dist/chunk-MQIZAD4A.js +0 -227
- package/dist/chunk-MQIZAD4A.js.map +0 -1
- package/dist/chunk-PONXLV5U.js +0 -19
- package/dist/chunk-PONXLV5U.js.map +0 -1
- package/dist/chunk-RUNWEPR4.js +0 -10
- package/dist/chunk-RUNWEPR4.js.map +0 -1
- package/dist/chunk-W2FK7ZNY.js +0 -26
- package/dist/chunk-W2FK7ZNY.js.map +0 -1
- package/dist/chunk-WVPYVDXY.js +0 -15
- package/dist/chunk-WVPYVDXY.js.map +0 -1
- package/dist/chunk-YGN7OMLT.js.map +0 -1
- package/dist/chunk-YKUUZPED.js +0 -24
- package/dist/chunk-YKUUZPED.js.map +0 -1
- package/dist/menu-action-row.js +0 -5
- package/dist/menu-action-row.js.map +0 -1
- package/dist/menu-header.d.ts +0 -43
- package/dist/menu-header.js +0 -7
- package/dist/menu-header.js.map +0 -1
- package/dist/menu-item.d.ts +0 -33
- package/dist/menu-item.js +0 -5
- package/dist/menu-item.js.map +0 -1
- package/dist/panel-header.d.ts +0 -36
- package/dist/panel-header.js +0 -7
- package/dist/panel-header.js.map +0 -1
- package/dist/styles/menu-action-row.css +0 -160
- package/dist/styles/menu-header.css +0 -160
- package/dist/styles/menu-item.css +0 -123
- package/dist/styles/panel-header.css +0 -64
- package/dist/styles/tab-scaffold.css +0 -84
- package/dist/tab-scaffold.d.ts +0 -30
- package/dist/tab-scaffold.js +0 -16
- package/dist/tab-scaffold.js.map +0 -1
- package/dist/wire-tab-scaffold.d.ts +0 -11
- package/dist/wire-tab-scaffold.js +0 -16
- package/dist/wire-tab-scaffold.js.map +0 -1
- package/docs/tab-scaffold.md +0 -41
- package/ux-demo/recipes/master-detail-dialog.tsx +0 -45
- package/ux-demo/recipes/recipes.css +0 -355
package/docs/catalog.md
ADDED
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
# Catalog — a reusable component-gallery shell
|
|
2
|
+
|
|
3
|
+
`@kerfjs/ui/catalog` is an opt-in, whole-screen shell for building a **component
|
|
4
|
+
catalog** — the collapsible category sidebar + titled preview stage + resources
|
|
5
|
+
footer that the kerf UI catalog itself uses. Point it at your own components and
|
|
6
|
+
you get the same shell without rebuilding it. Like the app layouts, it is a
|
|
7
|
+
subpath-only, tree-shakeable module that adds nothing to the main barrel.
|
|
8
|
+
|
|
9
|
+
The shell is a [`Workbench`](workbench.md) built entirely from `@kerfjs/ui`
|
|
10
|
+
components: the sidebar is its left rail and the active entry its work area. So
|
|
11
|
+
the sidebar behaves like any Workbench rail — its standard toggle moves into the
|
|
12
|
+
entry toolbar while it is collapsed, and on a small screen (a Workbench narrower
|
|
13
|
+
than 704px) it overlays the stage, one tap from the entry toolbar, filling the
|
|
14
|
+
width less a 44px strip that closes it, instead of squeezing the stage. Pass the
|
|
15
|
+
app's `collapsed` signal to `wireCatalog` so that overlay closes on Escape, on a
|
|
16
|
+
press outside, and when an entry is chosen from it.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @kerfjs/ui # kerfjs is a peer; @kerfjs/ui/select/register is needed only if entries use `related`
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- `Catalog(props)` returns the shell as `SafeHtml` (a `<main class="kui-catalog">`).
|
|
23
|
+
It is **controlled and stateless**: your app owns the `active`, `collapsed`, and
|
|
24
|
+
`theme` signals and computes the preview `content` from `active` in its own
|
|
25
|
+
`mount()` render.
|
|
26
|
+
- `wireCatalog(root, options)` wires the interactions (sidebar selection, the
|
|
27
|
+
related-entry popup menu, the built-in sidebar filter, and the collapse/theme
|
|
28
|
+
toggles) with one delegated listener set and returns a disposer; it can also
|
|
29
|
+
mirror the active id into the URL and reveal the active sidebar row after a
|
|
30
|
+
controlled render.
|
|
31
|
+
|
|
32
|
+
## What you supply
|
|
33
|
+
|
|
34
|
+
- **`sections`** — category-grouped entries: `{ category, entries: [{ id, name,
|
|
35
|
+
description?, tags?, resources?, related? }] }`. Each entry becomes a sidebar
|
|
36
|
+
`ListItem` under a `ListHeader` for its category. Short `tags` render through
|
|
37
|
+
the row's quiet status treatment for decision metadata such as `Discouraged`.
|
|
38
|
+
- **`content`** — the rendered preview for the active entry. Keep a map of `id →
|
|
39
|
+
() => SafeHtml` in your app and call `renderers[active]()` in your render.
|
|
40
|
+
- **`brand`** — `{ title, subtitle?, logoUrl? }` for the sidebar header.
|
|
41
|
+
- **`secondarySections`** — an optional secondary "ecosystem" group shown below the
|
|
42
|
+
primary sections with a quieter treatment: `{ label, sections, collapsible?,
|
|
43
|
+
expanded? }`. When `collapsible`, the label is a disclosure toggle controlling
|
|
44
|
+
`expanded` (the app owns it; wire it with `wireCatalog`'s `onToggleSecondary`).
|
|
45
|
+
- Optional slots: `headerActions` (extra header controls), `sidebarFooter` (extra
|
|
46
|
+
sidebar content), and `status` (a footer status line).
|
|
47
|
+
|
|
48
|
+
The sidebar includes a search field automatically for every Catalog consumer.
|
|
49
|
+
`wireCatalog` filters entry names and section headings as text is typed,
|
|
50
|
+
ignoring case. A heading match shows all its entries; a matching secondary
|
|
51
|
+
group heading searches its sections too, even while that group is collapsed.
|
|
52
|
+
Empty sections disappear and an empty-result message appears when nothing
|
|
53
|
+
matches. The query survives controlled Catalog rerenders and clears through the
|
|
54
|
+
search field's native clear control. Filtering does not change the selected
|
|
55
|
+
entry or its preview.
|
|
56
|
+
|
|
57
|
+
Per-entry `resources` render as "open in new tab" links in the footer, and
|
|
58
|
+
`related` renders a "Related entries" `PopupMenu` in a `single`
|
|
59
|
+
`ToolbarControlGroup` (grouped by each entry's `group`), so register its elements
|
|
60
|
+
with `@kerfjs/ui/popup-menu/register` when you use it.
|
|
61
|
+
|
|
62
|
+
## Catalog demo authoring contract
|
|
63
|
+
|
|
64
|
+
This section is the single authoritative contract for tools and people that
|
|
65
|
+
author Catalog previews. The machine-readable discovery entry is
|
|
66
|
+
[`catalog-authoring.json`](../ai/catalog-authoring.json); exact props remain in
|
|
67
|
+
[`public-api-signatures-v1.md`](../ai/public-api-signatures-v1.md#kerfjsuicatalog).
|
|
68
|
+
The component catalog deliberately does not duplicate these rules: it describes
|
|
69
|
+
which component to choose, while this contract describes how to present the
|
|
70
|
+
chosen component.
|
|
71
|
+
|
|
72
|
+
### Choose the demo mode
|
|
73
|
+
|
|
74
|
+
Classify every entry before rendering it:
|
|
75
|
+
|
|
76
|
+
| Entry kind | Preview purpose | Geometry overlay |
|
|
77
|
+
| --------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
78
|
+
| **Component** | Show one public component, its meaningful variants, and adverse states. | `true`; the overlay inspects each selected specimen. |
|
|
79
|
+
| **Composition** | Show components commonly used together in one focused container or surface. | `false`; child geometry remains unmarked so the composition can be read as a whole. |
|
|
80
|
+
| **Recipe** | Teach the recommended production approach to a specific task, including ownership and application glue. | `false`; child geometry remains unmarked so the complete approach can be read. |
|
|
81
|
+
|
|
82
|
+
These three kinds are exhaustive. Theme/foundation showcases use a functional
|
|
83
|
+
category, third-party specimens use source metadata, and state galleries retain
|
|
84
|
+
the kind of the thing they demonstrate; none needs another demo kind.
|
|
85
|
+
|
|
86
|
+
Organize the catalog by functional group, with groups in descending product
|
|
87
|
+
importance. Within every group, list all component demos before all composition
|
|
88
|
+
demos. Order each kind by descending importance where a meaningful distinction
|
|
89
|
+
exists, then alphabetically by display name to break ties. Put recipes after all
|
|
90
|
+
component/composition groups, ordered by the same importance-then-alphabetical
|
|
91
|
+
rule. Treat source order as the authored importance order when no explicit rank
|
|
92
|
+
field exists. Show a `Composition` tag rather than repeating the word in a
|
|
93
|
+
composition's display name; the generic `Catalog` accepts that through the
|
|
94
|
+
entry's `tags` array.
|
|
95
|
+
|
|
96
|
+
Keep `geometryOverlay` present and compute it from the active entry. Do not make
|
|
97
|
+
it a permanent catalog-wide `true`, and do not give individual specimens their
|
|
98
|
+
own overlay implementation.
|
|
99
|
+
|
|
100
|
+
### Required structure
|
|
101
|
+
|
|
102
|
+
- `Catalog` is the one shell. The app owns active-entry state and passes one
|
|
103
|
+
active preview through `content`.
|
|
104
|
+
- `CatalogExampleStack` is the group for one preview's rows. Put route/test
|
|
105
|
+
metadata such as `data-demo` on its rendered root through `rootAttributes`.
|
|
106
|
+
Pass `label` when the stack needs an accessible name: the rendered `section`
|
|
107
|
+
is then exposed as a named region. An unlabeled stack remains an ordinary
|
|
108
|
+
grouping rather than adding an unnecessary landmark.
|
|
109
|
+
- `CatalogExample` is one row: optional generated `ListHeader` label, optional
|
|
110
|
+
generated note, then one specimen or one intentionally coupled specimen
|
|
111
|
+
cluster. Use one row per variant/state; do not hand-author the helper's private
|
|
112
|
+
classes.
|
|
113
|
+
- Focused demos do not import local stylesheets, use inline `style`, or invent
|
|
114
|
+
styling-only `demo-*` classes. Prefer a public Kerf component, then a Web
|
|
115
|
+
Awesome surface when Kerf has no equivalent, then ordinary semantic HTML.
|
|
116
|
+
Use `CatalogExample.viewport` for bounded specimen width, height, frame,
|
|
117
|
+
surface, overflow, responsive visibility, and public custom-property values;
|
|
118
|
+
keep those constraints catalog-owned instead of recreating a demo stylesheet.
|
|
119
|
+
Component heights run `short` (220px) through `tall` (360px); frame an app
|
|
120
|
+
shell, whole-screen layout, or other application-sized recipe with
|
|
121
|
+
`height: "app"` (592px), and give its root `fill` rather than a frame `Pane`.
|
|
122
|
+
An app frame stands in for the screen: it is the containing block for
|
|
123
|
+
screen-fixed chrome, so a compact `CollapsiblePanel` overlay, its backdrop,
|
|
124
|
+
and restore controls dock to the frame's edges rather than the page's.
|
|
125
|
+
- The specimen is an immediate child of `CatalogExample`. A focused component
|
|
126
|
+
row should place the component root there, without a decorative card or
|
|
127
|
+
spacing wrapper. A composition row may place the composition root there.
|
|
128
|
+
|
|
129
|
+
Use `align="glyph"` for a bare glyph/text specimen, `align="inline-control"`
|
|
130
|
+
for a control whose own inline padding contributes about 8px, and
|
|
131
|
+
`align="text-trigger"` for a Web Awesome dropdown's text trigger whose visible
|
|
132
|
+
label needs an 8px inset (such as a plain `PopupMenu` trigger). The dropdown host
|
|
133
|
+
has no layout box, so this inset applies to its button child. Use
|
|
134
|
+
`align="none"` (the default) for a content item or composition that owns its
|
|
135
|
+
geometry.
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
import { CatalogExample, CatalogExampleStack } from "@kerfjs/ui/catalog";
|
|
139
|
+
|
|
140
|
+
const buttonPreview = (
|
|
141
|
+
<CatalogExampleStack
|
|
142
|
+
label="Button variants"
|
|
143
|
+
rootAttributes={{ "data-demo": "button" }}
|
|
144
|
+
>
|
|
145
|
+
<CatalogExample label="Icon" note="A bare glyph." align="glyph">
|
|
146
|
+
<LucideIcon icon={Plus} name="plus" />
|
|
147
|
+
</CatalogExample>
|
|
148
|
+
<CatalogExample label="Control" align="inline-control">
|
|
149
|
+
<SegmentedControl id="view" label="View" value="list" choices={choices} />
|
|
150
|
+
</CatalogExample>
|
|
151
|
+
<CatalogExample
|
|
152
|
+
label="Authoring note"
|
|
153
|
+
note="Explanatory chrome is not a specimen."
|
|
154
|
+
rootAttributes={{ "data-catalog-geometry-overlay-skip": "" }}
|
|
155
|
+
>
|
|
156
|
+
<p>Use the public helper contract.</p>
|
|
157
|
+
</CatalogExample>
|
|
158
|
+
</CatalogExampleStack>
|
|
159
|
+
);
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The overlay selects every immediate child of a `CatalogExample`; the helper
|
|
163
|
+
marks its generated label and note so they are excluded automatically. It does
|
|
164
|
+
not recursively promote a nested child to be the specimen. Outside an example
|
|
165
|
+
row, it selects only top-level
|
|
166
|
+
`[data-component]` roots in the canvas and ignores nested component descendants.
|
|
167
|
+
These rules keep a row's label/group scaffolding out of the measurement and make
|
|
168
|
+
the authored nesting determine exactly what is inspected.
|
|
169
|
+
|
|
170
|
+
### Metadata ownership
|
|
171
|
+
|
|
172
|
+
Use `rootAttributes` on either helper for authoring metadata such as `data-demo`
|
|
173
|
+
or `data-catalog-geometry-overlay-skip`; the metadata lands on that helper's
|
|
174
|
+
rendered root. The slot accepts only `data-*` strings. Structural
|
|
175
|
+
`data-catalog-example`, `data-catalog-example-stack`, and `data-align` semantics
|
|
176
|
+
remain helper-owned and are rejected case-insensitively at runtime, including
|
|
177
|
+
from structurally widened or JavaScript objects. Do not copy the helpers'
|
|
178
|
+
private `kui-catalog-*` classes into preview markup.
|
|
179
|
+
|
|
180
|
+
The app owns entry ids, `kind`, routing, sources, relationships, and test hooks.
|
|
181
|
+
`Catalog.stageRootAttributes` places app-owned `data-*` state on the
|
|
182
|
+
catalog-owned preview stage without an extra wrapper; `data-catalog-stage`
|
|
183
|
+
remains protected.
|
|
184
|
+
The helpers own their structural markers, label/note anatomy, alignment marker,
|
|
185
|
+
and private classes. Component metadata such as margin/border/padding ownership
|
|
186
|
+
lives in `component-catalog.json`; do not infer or overwrite it from overlay
|
|
187
|
+
pixels.
|
|
188
|
+
|
|
189
|
+
### Geometry overlay and legend
|
|
190
|
+
|
|
191
|
+
Pass the conditional `geometryOverlay` boolean to `Catalog`, then call
|
|
192
|
+
`wireCatalogGeometryOverlay(root)` once after the first render and retain its
|
|
193
|
+
disposer alongside `wireCatalog`'s.
|
|
194
|
+
|
|
195
|
+
| Overlay mark | Meaning | It is not |
|
|
196
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
197
|
+
| Orange translucent band | A positive computed margin on the selected specimen, after subtracting the helper's alignment inset. | Padding, gap, or empty content. Zero and negative margins are not drawn. |
|
|
198
|
+
| Accent solid edge | The selected specimen's computed border widths and radius, except `none`/`hidden` styles. | A focus ring, outline, child border, or metadata ownership claim. |
|
|
199
|
+
| Quiet dashed outline | The border-box bound of a transparent selected specimen with no visible border. | A real CSS border, padding edge, or proof that the specimen owns size. |
|
|
200
|
+
|
|
201
|
+
The overlay recomputes from live rendered styles when specimens resize, preview
|
|
202
|
+
markup changes, theme/root attributes change, or loaded/inline stylesheets
|
|
203
|
+
change. Component CSS is therefore the source of truth; do not duplicate margin
|
|
204
|
+
or border values in demo data. The overlay does not visualize padding, gaps,
|
|
205
|
+
negative/zero margins, scroll overflow, hit targets, or nested descendants.
|
|
206
|
+
Inspect computed styles and the machine-readable `geometry` metadata for those
|
|
207
|
+
facts. Opaque borderless specimens do not receive the dashed bound.
|
|
208
|
+
|
|
209
|
+
```tsx
|
|
210
|
+
<Catalog
|
|
211
|
+
{...props}
|
|
212
|
+
geometryOverlay={activeEntry.kind === "component"}
|
|
213
|
+
content={renderers[active.value]()}
|
|
214
|
+
/>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Put `rootAttributes={{ "data-catalog-geometry-overlay-skip": "" }}` on a
|
|
218
|
+
`CatalogExample` or `CatalogExampleStack` only when that whole subtree is
|
|
219
|
+
explanatory chrome rather than a specimen. The marker excludes the marked root
|
|
220
|
+
and every descendant from selection; it does not merely hide one band. It is
|
|
221
|
+
normally unnecessary in a composition because the active entry already sets the
|
|
222
|
+
global overlay to `false`.
|
|
223
|
+
|
|
224
|
+
Use the overlay together with machine-readable geometry ownership metadata; the
|
|
225
|
+
overlay verifies what is rendered, while metadata tells people and AI tools
|
|
226
|
+
whether the component, its parent, or its children are responsible for margin,
|
|
227
|
+
border, and padding. Catalogs for downstream components should conform to the
|
|
228
|
+
[`component-catalog-extension.schema.json`](../ai/component-catalog-extension.schema.json)
|
|
229
|
+
contract and can start from the checked
|
|
230
|
+
[`component-catalog-extension.json`](./examples/component-catalog-extension.json)
|
|
231
|
+
example; provide those entries beside Kerf's shipped catalog to AI tools.
|
|
232
|
+
An extension entry may declare `uses` with direct Kerf or extension entry ids,
|
|
233
|
+
plus repository-relative `source` and `demoSource` paths. Keep the ids unique
|
|
234
|
+
and resolvable across both catalogs; paths use `/` separators and cannot
|
|
235
|
+
traverse outside the repository. These fields let consumer demos derive source
|
|
236
|
+
links and composition relationships from the catalog.
|
|
237
|
+
|
|
238
|
+
For a consumer UX demo, `@kerfjs/ui/catalog-projection` exports
|
|
239
|
+
`projectConsumerCatalog(extension, kerfCatalog, options)` and
|
|
240
|
+
`projectCatalogEntries(entries, options)`. The projection maps `purpose` to
|
|
241
|
+
`description`, `uses` to related-entry ids, `source` to `componentSource`, and
|
|
242
|
+
`demoSource` to the demo source link. It defaults the source identity to
|
|
243
|
+
`consumer` and category to `Application`. Explicit paths in an extension entry
|
|
244
|
+
take precedence over templates. Template placeholders are `{id}`, `{name}`,
|
|
245
|
+
`{kind}`, and `{package}`. Design templates are omitted unless configured.
|
|
246
|
+
|
|
247
|
+
The package also ships `kerf-catalog-demo` for a committed TypeScript module:
|
|
248
|
+
|
|
249
|
+
```sh
|
|
250
|
+
kerf-catalog-demo --extension ai/component-catalog-extension.json \
|
|
251
|
+
--out ux-demo/catalog.generated.ts \
|
|
252
|
+
--repo-base https://github.com/acme/app/blob/main/ \
|
|
253
|
+
--source-template 'src/{id}.tsx' \
|
|
254
|
+
--demo-template 'ux-demo/demos/{id}.tsx' --write
|
|
255
|
+
kerf-catalog-demo --extension ai/component-catalog-extension.json \
|
|
256
|
+
--out ux-demo/catalog.generated.ts \
|
|
257
|
+
--repo-base https://github.com/acme/app/blob/main/ \
|
|
258
|
+
--source-template 'src/{id}.tsx' \
|
|
259
|
+
--demo-template 'ux-demo/demos/{id}.tsx' --check
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
The command uses the Kerf catalog shipped with the package to resolve `uses`;
|
|
263
|
+
`--kerf-catalog` selects another catalog file. `--category`,
|
|
264
|
+
`--documentation-template`, and `--design-template` configure optional row
|
|
265
|
+
fields. `--check` fails if the generated file is missing or stale. The output
|
|
266
|
+
exports `generatedConsumerCatalog` and `catalogRepositoryBlobUrl`; the latter
|
|
267
|
+
is normalized to a trailing slash for source and documentation links.
|
|
268
|
+
|
|
269
|
+
### Automated conformance and reviewed exceptions
|
|
270
|
+
|
|
271
|
+
Run `npm run check:demo-conformance` after changing a first-party demo, its
|
|
272
|
+
catalog kind, or the shell's overlay logic. The TypeScript-AST gate verifies
|
|
273
|
+
facts that source can prove without guessing at rendered intent:
|
|
274
|
+
|
|
275
|
+
- focused component routes import and use `CatalogExampleStack` and
|
|
276
|
+
`CatalogExample` from the public package;
|
|
277
|
+
- focused route metadata uses the helpers' `rootAttributes` slot, example rows
|
|
278
|
+
are not empty, and composition routes do not add redundant skip markers;
|
|
279
|
+
- every `@kerfjs/ui` import is a published package export and relative imports
|
|
280
|
+
do not reach into `ui/src`;
|
|
281
|
+
- focused demos have no relative stylesheet imports, inline style attributes,
|
|
282
|
+
or styling-only `demo-*`, `wa-demo-*`, and token-search class names;
|
|
283
|
+
- demo JSX does not copy private `kui-catalog-*` structural classes;
|
|
284
|
+
- recipe sources (checked by `npm run check:recipes` with the same shared
|
|
285
|
+
analyzer) import no stylesheet other than public `@kerfjs/ui` CSS, set no
|
|
286
|
+
inline style, and name only published layout and Web Awesome classes; each
|
|
287
|
+
recipe declares its catalog frame through an exported `presentation`; and
|
|
288
|
+
- the shell derives both geometry-overlay enablement and documented demo mode
|
|
289
|
+
from the active entry's source and kind.
|
|
290
|
+
|
|
291
|
+
The gate deliberately does not infer component ownership from arbitrary class
|
|
292
|
+
names, margins, borders, or nested descendants. Runtime selection and geometry
|
|
293
|
+
remain the browser suite's job.
|
|
294
|
+
|
|
295
|
+
A focused route may bypass the two public layout helpers only when the route's
|
|
296
|
+
stage geometry is itself the reviewed specimen. Add the narrow waiver to
|
|
297
|
+
[`catalog-conformance-exceptions.json`](../ux-demo/catalog-conformance-exceptions.json)
|
|
298
|
+
with the exact route, source file, stable diagnostic ids, a substantive reason,
|
|
299
|
+
and the reviewing `KF-*` ticket. Only helper/metadata rules are waivable;
|
|
300
|
+
private imports, local styling, private markup, empty examples, composition overlay drift, and
|
|
301
|
+
shell-mode drift always fail. The gate rejects duplicate, malformed, unused,
|
|
302
|
+
and stale exceptions, so delete a waiver when its route adopts the standard
|
|
303
|
+
helpers.
|
|
304
|
+
|
|
305
|
+
## Selection reveal
|
|
306
|
+
|
|
307
|
+
Set `revealSelection: true` on `wireCatalog` for a long desktop sidebar. After
|
|
308
|
+
`onSelect` updates controlled state, the helper waits one animation frame, finds
|
|
309
|
+
the exact matching `data-item-id`, and scrolls it into view without changing
|
|
310
|
+
focus. A newer selection or disposal cancels the pending reveal. The default
|
|
311
|
+
media guard follows the Workbench's inline sidebar (`min-width: 44.01rem`), so a
|
|
312
|
+
closed phone overlay is never scrolled behind the user's back.
|
|
313
|
+
|
|
314
|
+
Pass an options object instead of `true` to customize `block`, `inline`,
|
|
315
|
+
`behavior`, or `media`; `media: false` deliberately enables the behavior at all
|
|
316
|
+
sizes. For an initial deep link that did not come through `wireCatalog`, call
|
|
317
|
+
`revealCatalogEntry(app, initialId, { block: "center" })` after the first mount.
|
|
318
|
+
|
|
319
|
+
## Complete example
|
|
320
|
+
|
|
321
|
+
```tsx
|
|
322
|
+
import { mount, signal, type SafeHtml } from "kerfjs";
|
|
323
|
+
import {
|
|
324
|
+
Catalog,
|
|
325
|
+
CatalogExample,
|
|
326
|
+
CatalogExampleStack,
|
|
327
|
+
type CatalogSection,
|
|
328
|
+
} from "@kerfjs/ui/catalog";
|
|
329
|
+
import {
|
|
330
|
+
revealCatalogEntry,
|
|
331
|
+
wireCatalog,
|
|
332
|
+
wireCatalogGeometryOverlay,
|
|
333
|
+
} from "@kerfjs/ui/wire-catalog";
|
|
334
|
+
// A CSS-aware (browser-condition) bundler loads the Catalog's CSS with its import.
|
|
335
|
+
|
|
336
|
+
type DemoKind = "component" | "composition";
|
|
337
|
+
type DemoEntry = CatalogSection["entries"][number] & { kind: DemoKind };
|
|
338
|
+
|
|
339
|
+
// 1. Describe selection and overlay mode once.
|
|
340
|
+
const entries: DemoEntry[] = [
|
|
341
|
+
{
|
|
342
|
+
id: "button",
|
|
343
|
+
name: "Button",
|
|
344
|
+
kind: "component",
|
|
345
|
+
description: "A pressable control.",
|
|
346
|
+
resources: [
|
|
347
|
+
{ label: "Source", href: "/src/button.tsx", detail: "src/button.tsx" },
|
|
348
|
+
],
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: "profile-form",
|
|
352
|
+
name: "Profile form",
|
|
353
|
+
kind: "composition",
|
|
354
|
+
description: "A labeled field and save action working together.",
|
|
355
|
+
},
|
|
356
|
+
];
|
|
357
|
+
const sections: CatalogSection[] = [
|
|
358
|
+
{
|
|
359
|
+
category: "Examples",
|
|
360
|
+
entries: entries.map(({ kind, ...entry }) => ({
|
|
361
|
+
...entry,
|
|
362
|
+
tags: kind === "composition" ? ["Composition"] : undefined,
|
|
363
|
+
})),
|
|
364
|
+
},
|
|
365
|
+
];
|
|
366
|
+
|
|
367
|
+
// 2. Every preview uses one public group and public example rows.
|
|
368
|
+
const renderers: Record<string, () => SafeHtml> = {
|
|
369
|
+
button: () => (
|
|
370
|
+
<CatalogExampleStack
|
|
371
|
+
label="Button states"
|
|
372
|
+
rootAttributes={{ "data-demo": "button" }}
|
|
373
|
+
>
|
|
374
|
+
<CatalogExample label="Default" align="inline-control">
|
|
375
|
+
<Button label="Save" />
|
|
376
|
+
</CatalogExample>
|
|
377
|
+
<CatalogExample
|
|
378
|
+
label="Authoring note"
|
|
379
|
+
note="This explanatory row is deliberately excluded from inspection."
|
|
380
|
+
rootAttributes={{ "data-catalog-geometry-overlay-skip": "" }}
|
|
381
|
+
>
|
|
382
|
+
<p>The application owns product copy and actions.</p>
|
|
383
|
+
</CatalogExample>
|
|
384
|
+
</CatalogExampleStack>
|
|
385
|
+
),
|
|
386
|
+
"profile-form": () => (
|
|
387
|
+
<CatalogExampleStack
|
|
388
|
+
label="Profile form composition"
|
|
389
|
+
rootAttributes={{ "data-demo": "profile-form" }}
|
|
390
|
+
>
|
|
391
|
+
<CatalogExample label="Complete composition">
|
|
392
|
+
<ProfileForm />
|
|
393
|
+
</CatalogExample>
|
|
394
|
+
</CatalogExampleStack>
|
|
395
|
+
),
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
// 3. App-owned state (domain: which entry; transient: collapsed; global: theme).
|
|
399
|
+
const initial =
|
|
400
|
+
new URLSearchParams(location.search).get("c") ?? sections[0].entries[0].id;
|
|
401
|
+
const active = signal(initial);
|
|
402
|
+
const collapsed = signal(false);
|
|
403
|
+
const theme = signal<"light" | "dark">("light");
|
|
404
|
+
const activeEntry = () => entries.find(({ id }) => id === active.value) ?? entries[0];
|
|
405
|
+
|
|
406
|
+
const app = document.getElementById("app")!;
|
|
407
|
+
mount(app, () => (
|
|
408
|
+
<Catalog
|
|
409
|
+
brand={{ title: "Acme UI", subtitle: "Design system" }}
|
|
410
|
+
sections={sections}
|
|
411
|
+
active={active.value}
|
|
412
|
+
content={renderers[active.value]?.() ?? <></>}
|
|
413
|
+
collapsed={collapsed.value}
|
|
414
|
+
theme={theme.value}
|
|
415
|
+
geometryOverlay={activeEntry().kind === "component"}
|
|
416
|
+
/>
|
|
417
|
+
));
|
|
418
|
+
|
|
419
|
+
wireCatalog(app, {
|
|
420
|
+
onSelect: (id) => {
|
|
421
|
+
active.value = id;
|
|
422
|
+
},
|
|
423
|
+
onToggleSidebar: () => {
|
|
424
|
+
collapsed.value = !collapsed.value;
|
|
425
|
+
},
|
|
426
|
+
onToggleTheme: () => {
|
|
427
|
+
theme.value = theme.value === "dark" ? "light" : "dark";
|
|
428
|
+
document.documentElement.dataset.theme = theme.value; // apply your theme however you like
|
|
429
|
+
},
|
|
430
|
+
urlParam: "c", // mirror the active id into ?c=<id>
|
|
431
|
+
revealSelection: true, // reveal long desktop sidebars without moving focus
|
|
432
|
+
});
|
|
433
|
+
wireCatalogGeometryOverlay(app);
|
|
434
|
+
|
|
435
|
+
// Optional for an initial deep link whose row may start outside the viewport.
|
|
436
|
+
revealCatalogEntry(app, initial, { block: "center" });
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
## Ownership boundary
|
|
440
|
+
|
|
441
|
+
`Catalog` renders the shell; the app owns everything stateful:
|
|
442
|
+
|
|
443
|
+
- **`active`** is domain state (which entry is shown) — the app's signal, updated in
|
|
444
|
+
`onSelect`, read to compute `content`.
|
|
445
|
+
- **`collapsed`** is transient UI — the app's signal, flipped in `onToggleSidebar`.
|
|
446
|
+
Pass the same signal as `wireCatalog`'s `collapsed` option so the sidebar is
|
|
447
|
+
wired as a Workbench rail (transient on small screens, focus handed to the
|
|
448
|
+
relocated toggle).
|
|
449
|
+
- **`headerPlacement` / `footerPlacement`** choose whether the entry toolbar and
|
|
450
|
+
description, and the status + resource footer, stay pinned (`fixed`), scroll with
|
|
451
|
+
the preview (`scroll`), or stay pinned while the entry pane is tall enough and
|
|
452
|
+
scroll with the preview when it is short (`auto`, the default) — so a short
|
|
453
|
+
window or large text never squeezes the preview out.
|
|
454
|
+
The resource footer uses `ToolbarControlGroup overflow="wrap"`: whole links
|
|
455
|
+
move to another row when they do not fit, keeping Guidance and source labels
|
|
456
|
+
readable without horizontal scrolling.
|
|
457
|
+
- **`sidebar`** configures the sidebar rail — it forwards to the Workbench's left
|
|
458
|
+
rail: `size` (default 288px), `resizable` (`true` or `{ min, max }`),
|
|
459
|
+
`separator`, `collapseMotion`, `presentation`, `responsiveOverlayAt` (default
|
|
460
|
+
`narrow`), `compactOverlay` (default `inset`), and `toolbar` (the sidebar
|
|
461
|
+
header's `ToolbarConfig`). A resizable sidebar's width is app state like
|
|
462
|
+
`collapsed`: render your size signal as `sidebar.size` and pass the same signal
|
|
463
|
+
as `wireCatalog`'s `sidebarSize` (plus `sidebarStorageKey` to remember it).
|
|
464
|
+
- **`mainToolbar` / `footerToolbar`** take the entry toolbar's and the resource
|
|
465
|
+
footer toolbar's `ToolbarConfig` (`dividerSides`, `centerAlign`, `responsive`,
|
|
466
|
+
`responsiveAt`, `safeAreaEdges`). The defaults are a wrapping entry toolbar
|
|
467
|
+
and a footer toolbar that stacks at `narrow`, all without dividers of their
|
|
468
|
+
own: `wireCatalog` wires `wireScrollDividers`, so the shell's panes draw
|
|
469
|
+
their chrome dividers only while scrolled; an omitted or
|
|
470
|
+
`undefined` field keeps them. Configure these instead of styling the shell.
|
|
471
|
+
- **`theme`** is a global preference — the app's signal; `wireCatalog` only reports
|
|
472
|
+
the toggle, the app applies the theme (the shell reads `theme` to show the toggle's
|
|
473
|
+
opposite-state label). Omit `theme` to hide the toggle entirely.
|
|
474
|
+
|
|
475
|
+
## Custom action names
|
|
476
|
+
|
|
477
|
+
The shell emits `data-action="catalog-select"` (sidebar items),
|
|
478
|
+
`catalog-toggle-sidebar`, and `catalog-toggle-theme`. Override them with
|
|
479
|
+
`selectAction` / `toggleSidebarAction` / `toggleThemeAction` on `Catalog` (and the
|
|
480
|
+
matching options on `wireCatalog`) if they collide with your own action table.
|
|
481
|
+
|
|
482
|
+
## CSS
|
|
483
|
+
|
|
484
|
+
`Catalog` composes public components (`Workbench`, `Pane`, `Toolbar`, `List`,
|
|
485
|
+
`ListHeader`, `ListItem`, `ListInsetText`, `Text`, …) and owns only the preview stage
|
|
486
|
+
(the checkerboard and centered canvas), the geometry overlay, the example viewport
|
|
487
|
+
options, and the brand mark's size. A bundler that honors the `browser` export
|
|
488
|
+
condition loads the Catalog's stylesheets and those of every component it renders
|
|
489
|
+
internally with the `@kerfjs/ui/catalog` import alone — no dependence on which other
|
|
490
|
+
subpaths the app happens to import. Without that condition, import
|
|
491
|
+
`@kerfjs/ui/styles.css` for the whole layer, or `@kerfjs/ui/catalog.css` plus
|
|
492
|
+
`@kerfjs/ui/workbench.css` and each composed primitive's CSS. Like any Workbench it needs a definite containing height — the
|
|
493
|
+
`@kerfjs/ui/document.css` baseline's `.kui-app-root`.
|