@kerfjs/ui 5.0.0-beta.9 → 5.0.0-beta.90
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 +540 -132
- 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 +34 -0
- package/ai/catalog-authoring.schema.json +105 -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 +4487 -633
- 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 +7470 -0
- package/ai/component-composition.schema.json +408 -0
- package/ai/components/README.md +172 -0
- package/ai/components/anchored-surface.md +86 -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 +106 -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 +96 -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 +2835 -351
- package/ai/skill.md +401 -63
- 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/anchored-surface.d.ts +30 -0
- package/dist/anchored-surface.js +3 -0
- package/dist/anchored-surface.js.map +1 -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/anchored-surface.js +3 -0
- package/dist/browser/badge.js +3 -0
- package/dist/browser/catalog.js +28 -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 +1 -0
- package/dist/browser/list-header.js +3 -1
- package/dist/browser/list-inset-control.js +3 -0
- package/dist/browser/list-inset-text.js +3 -0
- package/dist/browser/list-item.js +1 -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 +76 -103
- package/dist/catalog.js +566 -87
- package/dist/catalog.js.map +1 -1
- 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-56RJXPHG.js → chunk-2YPPNFYT.js} +7 -4
- package/dist/chunk-2YPPNFYT.js.map +1 -0
- package/dist/chunk-3CXRQAYT.js +288 -0
- package/dist/chunk-3CXRQAYT.js.map +1 -0
- package/dist/chunk-3DXHNLME.js +69 -0
- package/dist/chunk-3DXHNLME.js.map +1 -0
- package/dist/chunk-3PO7JEK7.js +188 -0
- package/dist/chunk-3PO7JEK7.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-6IVNMC6R.js +19 -0
- package/dist/chunk-6IVNMC6R.js.map +1 -0
- package/dist/chunk-7QQ3HE47.js +17 -0
- package/dist/chunk-7QQ3HE47.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-B3TROLC2.js +104 -0
- package/dist/chunk-B3TROLC2.js.map +1 -0
- package/dist/chunk-BYHGRKC3.js +44 -0
- package/dist/chunk-BYHGRKC3.js.map +1 -0
- package/dist/chunk-CD5TOO22.js +82 -0
- package/dist/chunk-CD5TOO22.js.map +1 -0
- package/dist/chunk-CEJ5FK6G.js +288 -0
- package/dist/chunk-CEJ5FK6G.js.map +1 -0
- package/dist/chunk-DL55BSQX.js +52 -0
- package/dist/chunk-DL55BSQX.js.map +1 -0
- package/dist/chunk-DQDTZE4W.js +70 -0
- package/dist/chunk-DQDTZE4W.js.map +1 -0
- package/dist/chunk-FL6J644M.js +116 -0
- package/dist/chunk-FL6J644M.js.map +1 -0
- package/dist/chunk-GPCAXYMT.js +165 -0
- package/dist/chunk-GPCAXYMT.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-IM3GKYOG.js +202 -0
- package/dist/chunk-IM3GKYOG.js.map +1 -0
- package/dist/chunk-IOS2NXW7.js +53 -0
- package/dist/chunk-IOS2NXW7.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-KAJVVN7Q.js +138 -0
- package/dist/chunk-KAJVVN7Q.js.map +1 -0
- package/dist/chunk-KL3W6FUN.js +506 -0
- package/dist/chunk-KL3W6FUN.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-LFPW4YC6.js +222 -0
- package/dist/chunk-LFPW4YC6.js.map +1 -0
- package/dist/chunk-MN3POJFN.js +44 -0
- package/dist/chunk-MN3POJFN.js.map +1 -0
- package/dist/chunk-MORVLMDG.js +59 -0
- package/dist/chunk-MORVLMDG.js.map +1 -0
- package/dist/chunk-MTCTX25G.js +139 -0
- package/dist/chunk-MTCTX25G.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-NP3FSLNX.js +58 -0
- package/dist/chunk-NP3FSLNX.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-O27D24CA.js +250 -0
- package/dist/chunk-O27D24CA.js.map +1 -0
- package/dist/chunk-PGL6TXFW.js +48 -0
- package/dist/chunk-PGL6TXFW.js.map +1 -0
- package/dist/chunk-QQICWWNX.js +71 -0
- package/dist/chunk-QQICWWNX.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-SJW5BCEQ.js +174 -0
- package/dist/chunk-SJW5BCEQ.js.map +1 -0
- package/dist/chunk-TTGIHMDR.js +149 -0
- package/dist/chunk-TTGIHMDR.js.map +1 -0
- package/dist/chunk-U657IHFB.js +158 -0
- package/dist/chunk-U657IHFB.js.map +1 -0
- package/dist/chunk-VLGQIYZ5.js +295 -0
- package/dist/chunk-VLGQIYZ5.js.map +1 -0
- package/dist/chunk-XK4E225T.js +34 -0
- package/dist/chunk-XK4E225T.js.map +1 -0
- package/dist/chunk-XKZPBRU7.js +135 -0
- package/dist/chunk-XKZPBRU7.js.map +1 -0
- package/dist/chunk-XNXKIPU5.js +779 -0
- package/dist/chunk-XNXKIPU5.js.map +1 -0
- package/dist/chunk-Y43B6DS3.js +66 -0
- package/dist/chunk-Y43B6DS3.js.map +1 -0
- package/dist/chunk-Y6KT7ZTR.js +109 -0
- package/dist/chunk-Y6KT7ZTR.js.map +1 -0
- package/dist/chunk-YOKEL75M.js +48 -0
- package/dist/chunk-YOKEL75M.js.map +1 -0
- package/dist/collapsible-panel.d.ts +137 -0
- package/dist/collapsible-panel.js +136 -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 +119 -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 +58 -0
- package/dist/grid.js +6 -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 +41 -17
- package/dist/index.js +46 -23
- package/dist/list-action-row.d.ts +15 -3
- package/dist/list-action-row.js +4 -1
- package/dist/list-header.d.ts +65 -10
- package/dist/list-header.js +4 -1
- 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 +34 -5
- package/dist/list-item.js +4 -1
- package/dist/list.d.ts +64 -0
- package/dist/list.js +7 -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-BvSKY448.d.ts +109 -0
- package/dist/nav-stack.d.ts +13 -38
- package/dist/nav-stack.js +11 -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 +49 -0
- package/dist/row.js +7 -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 +43 -6
- package/dist/split-view.js +125 -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/anchored-surface.css +15 -0
- package/dist/styles/app-tab.css +232 -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 +167 -0
- package/dist/styles/catalog/components/catalog-stage.css +54 -0
- package/dist/styles/catalog/components/catalog.css +26 -0
- package/dist/styles/catalog.css +5 -482
- 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 +136 -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 +107 -0
- package/dist/styles/components/feedback/anchored-surface/anchored-surface.css +15 -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 +88 -0
- package/dist/styles/components/layout/pane/pane.css +309 -0
- package/dist/styles/components/layout/resizable-region/resizable-region.css +545 -0
- package/dist/styles/components/layout/row/row.css +114 -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 +1092 -0
- package/dist/styles/components/media/lucide-icon/lucide-icon.css +15 -0
- package/dist/styles/components/navigation/app-tab/app-tab.css +384 -0
- package/dist/styles/components/navigation/disclosure-arrow/disclosure-arrow.css +23 -0
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +258 -0
- package/dist/styles/components/navigation/tab-bar/tab-bar.css +186 -0
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +253 -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 +88 -0
- package/dist/styles/layout.css +3 -41
- package/dist/styles/list-action-row.css +104 -6
- package/dist/styles/list-header.css +128 -59
- package/dist/styles/list-inset-control.css +30 -0
- package/dist/styles/list-inset-text.css +29 -0
- package/dist/styles/list-item.css +165 -33
- package/dist/styles/list.css +136 -0
- package/dist/styles/loading-spinner.css +4 -0
- package/dist/styles/lucide-icon.css +9 -0
- package/dist/styles/nav-stack.css +196 -50
- package/dist/styles/pane.css +309 -0
- package/dist/styles/popup-menu.css +285 -0
- package/dist/styles/resizable-region.css +438 -4
- package/dist/styles/row.css +114 -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 +10 -1
- package/dist/styles/sunken-panel.css +34 -0
- package/dist/styles/surface-scaffold.css +111 -0
- package/dist/styles/tab-bar.css +150 -9
- package/dist/styles/tab-navigator.css +253 -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 +39 -7
- package/dist/styles/webawesome.css +392 -17
- package/dist/styles/workbench.css +1005 -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 +93 -0
- package/dist/tab-navigator.js +97 -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-oLe_N1w0.d.ts +130 -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 +76 -4
- package/dist/wire-catalog.js +250 -14
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-content-items.d.ts +11 -0
- package/dist/wire-content-items.js +139 -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 +18 -15
- package/dist/workbench.js.map +1 -1
- package/docs/accessibility.md +495 -24
- package/docs/anchored-surface.md +51 -0
- package/docs/app-layouts.md +141 -10
- package/docs/apple-hig.md +1 -0
- package/docs/catalog.md +395 -62
- package/docs/collapsible-panel.md +382 -0
- package/docs/component-contract.md +740 -53
- package/docs/component-integration.md +75 -0
- package/docs/component-selection.md +682 -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 +56 -19
- 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 +612 -53
- package/docs/nav-stack.md +163 -14
- package/docs/recipes.md +127 -52
- package/docs/split-view.md +76 -5
- package/docs/sunken-panel.md +93 -0
- package/docs/surface-scaffold.md +74 -0
- package/docs/tab-navigator.md +218 -0
- package/docs/type-contracts.md +137 -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 +45 -15
- package/docs/webawesome-theme.md +204 -16
- package/docs/workbench.md +623 -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 +562 -49
- package/package.json +247 -27
- package/scripts/component-catalog-extension-validation.mjs +28 -0
- package/traversal-exclusions.mjs +27 -0
- package/ux-demo/recipes/app-shell.tsx +204 -16
- 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 +255 -14
- package/ux-demo/recipes/list-workspace-states.tsx +183 -11
- package/ux-demo/recipes/loaders.ts +11 -3
- package/ux-demo/recipes/loading-inspector.tsx +161 -36
- package/ux-demo/recipes/mount-recipe.ts +28 -10
- package/ux-demo/recipes/navigation-sidebar.tsx +137 -11
- package/ux-demo/recipes/navigation-stack.tsx +79 -24
- package/ux-demo/recipes/types.ts +23 -2
- package/ux-demo/recipes/workspace-header.tsx +86 -5
- 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-2TS7ZSYX.js +0 -20
- package/dist/chunk-2TS7ZSYX.js.map +0 -1
- package/dist/chunk-2Z5TWHKQ.js +0 -34
- package/dist/chunk-2Z5TWHKQ.js.map +0 -1
- package/dist/chunk-37T3VNIZ.js +0 -19
- package/dist/chunk-37T3VNIZ.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-7JB7VPRI.js +0 -34
- package/dist/chunk-7JB7VPRI.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-DAFFDO33.js +0 -14
- package/dist/chunk-DAFFDO33.js.map +0 -1
- package/dist/chunk-I7INRJO4.js +0 -17
- package/dist/chunk-I7INRJO4.js.map +0 -1
- package/dist/chunk-L4OKFDJY.js +0 -24
- package/dist/chunk-L4OKFDJY.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-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-W5EQ3HYQ.js +0 -42
- package/dist/chunk-W5EQ3HYQ.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/panel-header.d.ts +0 -36
- package/dist/panel-header.js +0 -7
- package/dist/panel-header.js.map +0 -1
- 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/recipes.css +0 -361
package/docs/catalog.md
CHANGED
|
@@ -6,126 +6,427 @@ footer that the kerf UI catalog itself uses. Point it at your own components and
|
|
|
6
6
|
you get the same shell without rebuilding it. Like the app layouts, it is a
|
|
7
7
|
subpath-only, tree-shakeable module that adds nothing to the main barrel.
|
|
8
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
|
+
|
|
9
18
|
```bash
|
|
10
|
-
npm install @kerfjs/ui
|
|
19
|
+
npm install @kerfjs/ui # kerfjs is a peer; @kerfjs/ui/select/register is needed only if entries use `related`
|
|
11
20
|
```
|
|
12
21
|
|
|
13
22
|
- `Catalog(props)` returns the shell as `SafeHtml` (a `<main class="kui-catalog">`).
|
|
14
|
-
It is **controlled and stateless**: your app owns the `active`, `collapsed`,
|
|
15
|
-
`theme
|
|
23
|
+
It is **controlled and stateless**: your app owns the `active`, `collapsed`,
|
|
24
|
+
`theme`, and optional display-preference signals and computes the preview `content` from `active` in its own
|
|
16
25
|
`mount()` render.
|
|
17
26
|
- `wireCatalog(root, options)` wires the interactions (sidebar selection, the
|
|
18
|
-
related-entry
|
|
19
|
-
listener set and returns a disposer; it can also
|
|
20
|
-
URL
|
|
27
|
+
related-entry popup menu, the built-in sidebar filter, and the collapse/display
|
|
28
|
+
toggles and background chooser) 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.
|
|
21
31
|
|
|
22
32
|
## What you supply
|
|
23
33
|
|
|
24
34
|
- **`sections`** — category-grouped entries: `{ category, entries: [{ id, name,
|
|
25
|
-
|
|
26
|
-
under a `ListHeader` for its category.
|
|
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`.
|
|
27
38
|
- **`content`** — the rendered preview for the active entry. Keep a map of `id →
|
|
28
|
-
|
|
29
|
-
- **`
|
|
39
|
+
() => SafeHtml` in your app and call `renderers[active]()` in your render.
|
|
40
|
+
- **`backgroundStyle`** — the preview stage backdrop: `checkerboard` (default,
|
|
41
|
+
8px squares),
|
|
42
|
+
`vertical-stripes` (alternating 8px bands), `layout-guide` (single-pixel
|
|
43
|
+
vertical rules at 15px, 23px, and 32px from the stage edge), `surface`, or `sunken`. The
|
|
44
|
+
patterned choices share the main Pane's sunken surface and reveal transparent
|
|
45
|
+
specimen edges; `surface` paints an
|
|
46
|
+
opaque backdrop. `sunken` leaves the stage
|
|
47
|
+
transparent so the main Pane's semitransparent sunken surface paints only once.
|
|
48
|
+
A controlled app may pass its current choice on each render.
|
|
49
|
+
- **Display controls** — `increasedContrast` and `reducedMotion` each show a
|
|
50
|
+
pressed-state toggle when their boolean value is supplied. `backgroundControl`
|
|
51
|
+
shows a `PopupMenu` for the five preview backdrops, marking the current
|
|
52
|
+
`backgroundStyle` as checked. These controls share the entry toolbar's compact,
|
|
53
|
+
wrapping display group with the optional theme toggle. Pass callbacks through
|
|
54
|
+
`wireCatalog`'s `onToggleContrast`, `onToggleMotion`, and `onSelectBackground`;
|
|
55
|
+
update your own signals, apply contrast/motion preferences to your app, and
|
|
56
|
+
persist them there if needed. `Catalog` does not change the document theme,
|
|
57
|
+
classes, or storage. Register `@kerfjs/ui/popup-menu/register` when showing the
|
|
58
|
+
background chooser.
|
|
59
|
+
- **`brand`** — `{ title, subtitle?, logoUrl? }` for the sidebar header. The
|
|
60
|
+
optional logo paints through `ToolbarControlGroup.avatarImage`.
|
|
30
61
|
- **`secondarySections`** — an optional secondary "ecosystem" group shown below the
|
|
31
62
|
primary sections with a quieter treatment: `{ label, sections, collapsible?,
|
|
32
|
-
|
|
63
|
+
expanded? }`. When `collapsible`, the label is a disclosure toggle controlling
|
|
33
64
|
`expanded` (the app owns it; wire it with `wireCatalog`'s `onToggleSecondary`).
|
|
34
65
|
- Optional slots: `headerActions` (extra header controls), `sidebarFooter` (extra
|
|
35
66
|
sidebar content), and `status` (a footer status line).
|
|
36
67
|
|
|
68
|
+
The sidebar includes a `TokenSearchField` in its fixed header for every Catalog
|
|
69
|
+
consumer, so the filter remains visible while the entries scroll. `wireCatalog`
|
|
70
|
+
filters entry names and section headings as text is typed,
|
|
71
|
+
ignoring case. A heading match shows all its entries; a matching secondary
|
|
72
|
+
group heading searches its sections too, even while that group is collapsed.
|
|
73
|
+
Empty sections disappear and an empty-result message appears when nothing
|
|
74
|
+
matches. The query survives controlled Catalog rerenders, with the field's
|
|
75
|
+
placeholder hidden while text remains, and clears through the field's clear
|
|
76
|
+
action. Filtering does not change the selected
|
|
77
|
+
entry or its preview.
|
|
78
|
+
|
|
37
79
|
Per-entry `resources` render as "open in new tab" links in the footer, and
|
|
38
|
-
`related` renders a "Related entries"
|
|
39
|
-
|
|
80
|
+
`related` renders a "Related entries" `PopupMenu` in a `single`
|
|
81
|
+
`ToolbarControlGroup` (grouped by each entry's `group`), so register its elements
|
|
82
|
+
with `@kerfjs/ui/popup-menu/register` when you use it.
|
|
83
|
+
|
|
84
|
+
## Catalog demo authoring contract
|
|
85
|
+
|
|
86
|
+
This section is the single authoritative contract for tools and people that
|
|
87
|
+
author Catalog previews. The machine-readable discovery entry is
|
|
88
|
+
[`catalog-authoring.json`](../ai/catalog-authoring.json); exact props remain in
|
|
89
|
+
[`public-api-signatures-v1.md`](../ai/public-api-signatures-v1.md#kerfjsuicatalog).
|
|
90
|
+
The component catalog deliberately does not duplicate these rules: it describes
|
|
91
|
+
which component to choose, while this contract describes how to present the
|
|
92
|
+
chosen component.
|
|
93
|
+
|
|
94
|
+
### Choose the demo mode
|
|
95
|
+
|
|
96
|
+
Classify every entry before rendering it:
|
|
40
97
|
|
|
41
|
-
|
|
98
|
+
| Entry kind | Preview purpose |
|
|
99
|
+
| --------------- | ------------------------------------------------------------------------------------------------------- |
|
|
100
|
+
| **Component** | Show one public component, its meaningful variants, and adverse states. |
|
|
101
|
+
| **Composition** | Show components commonly used together in one focused container or surface. |
|
|
102
|
+
| **Recipe** | Teach the recommended production approach to a specific task, including ownership and application glue. |
|
|
42
103
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
104
|
+
These three kinds are exhaustive. Theme/foundation showcases use a functional
|
|
105
|
+
category, third-party specimens use source metadata, and state galleries retain
|
|
106
|
+
the kind of the thing they demonstrate; none needs another demo kind.
|
|
107
|
+
|
|
108
|
+
Organize the catalog by functional group, with groups in descending product
|
|
109
|
+
importance. Within every group, list all component demos before all composition
|
|
110
|
+
demos. Order each kind by descending importance where a meaningful distinction
|
|
111
|
+
exists, then alphabetically by display name to break ties. Put recipes after all
|
|
112
|
+
component/composition groups, ordered by the same importance-then-alphabetical
|
|
113
|
+
rule. Treat source order as the authored importance order when no explicit rank
|
|
114
|
+
field exists. Show a `Composition` tag rather than repeating the word in a
|
|
115
|
+
composition's display name; the generic `Catalog` accepts that through the
|
|
116
|
+
entry's `tags` array.
|
|
117
|
+
|
|
118
|
+
### Required structure
|
|
119
|
+
|
|
120
|
+
- `Catalog` is the one shell. The app owns active-entry state and passes one
|
|
121
|
+
active preview through `content`.
|
|
122
|
+
- `CatalogExampleStack` is the group for one preview's rows. Put route/test
|
|
123
|
+
metadata such as `data-demo` on its rendered root through `rootAttributes`.
|
|
124
|
+
Pass `label` when the stack needs an accessible name: the rendered `section`
|
|
125
|
+
is then exposed as a named region. An unlabeled stack remains an ordinary
|
|
126
|
+
grouping rather than adding an unnecessary landmark.
|
|
127
|
+
- `CatalogExample` is one row: optional generated `ListHeader` label, optional
|
|
128
|
+
generated note, then one specimen or one intentionally coupled specimen
|
|
129
|
+
cluster. Use one row per variant/state; do not hand-author the helper's private
|
|
130
|
+
classes.
|
|
131
|
+
- Focused demos do not import local stylesheets, use inline `style`, or invent
|
|
132
|
+
styling-only `demo-*` classes. Prefer a public Kerf component, then a Web
|
|
133
|
+
Awesome surface when Kerf has no equivalent, then ordinary semantic HTML.
|
|
134
|
+
Use `CatalogExample.viewport` for bounded specimen width, height, frame,
|
|
135
|
+
surface, overflow, responsive visibility, and public custom-property values;
|
|
136
|
+
keep those constraints catalog-owned instead of recreating a demo stylesheet.
|
|
137
|
+
Component heights run `short` (220px) through `tall` (360px); frame an app
|
|
138
|
+
shell, whole-screen layout, or other application-sized recipe with
|
|
139
|
+
`height: "app"` (592px), and give its root `fill` rather than a frame `Pane`.
|
|
140
|
+
An app frame stands in for the screen: it is the containing block for
|
|
141
|
+
screen-fixed chrome, so a compact `CollapsiblePanel` overlay, its backdrop,
|
|
142
|
+
and restore controls dock to the frame's edges rather than the page's.
|
|
143
|
+
- The specimen is an immediate child of `CatalogExample`. A focused component
|
|
144
|
+
row should place the component root there, without a decorative card or
|
|
145
|
+
spacing wrapper. A composition row may place the composition root there.
|
|
146
|
+
|
|
147
|
+
Use `align="glyph"` for a bare glyph/text specimen, `align="inline-control"`
|
|
148
|
+
for a control whose own inline padding contributes about 8px, and
|
|
149
|
+
`align="text-trigger"` for a Web Awesome dropdown's text trigger whose visible
|
|
150
|
+
label needs an 8px inset (such as a plain `PopupMenu` trigger). The dropdown host
|
|
151
|
+
has no layout box, so this inset applies to its button child. Use
|
|
152
|
+
`align="none"` (the default) for a content item or composition that owns its
|
|
153
|
+
geometry.
|
|
46
154
|
|
|
47
155
|
```tsx
|
|
48
|
-
import { CatalogExample, CatalogExampleStack } from
|
|
156
|
+
import { CatalogExample, CatalogExampleStack } from "@kerfjs/ui/catalog";
|
|
49
157
|
|
|
50
158
|
const buttonPreview = (
|
|
51
|
-
<CatalogExampleStack
|
|
159
|
+
<CatalogExampleStack
|
|
160
|
+
label="Button variants"
|
|
161
|
+
rootAttributes={{ "data-demo": "button" }}
|
|
162
|
+
>
|
|
52
163
|
<CatalogExample label="Icon" note="A bare glyph." align="glyph">
|
|
53
164
|
<LucideIcon icon={Plus} name="plus" />
|
|
54
165
|
</CatalogExample>
|
|
55
166
|
<CatalogExample label="Control" align="inline-control">
|
|
56
167
|
<SegmentedControl id="view" label="View" value="list" choices={choices} />
|
|
57
168
|
</CatalogExample>
|
|
58
|
-
<CatalogExample label="
|
|
59
|
-
<
|
|
169
|
+
<CatalogExample label="Authoring note" note="Explain the specimen below.">
|
|
170
|
+
<p>Use the public helper contract.</p>
|
|
60
171
|
</CatalogExample>
|
|
61
172
|
</CatalogExampleStack>
|
|
62
173
|
);
|
|
63
174
|
```
|
|
64
175
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
176
|
+
### Metadata ownership
|
|
177
|
+
|
|
178
|
+
Use `rootAttributes` on either helper for authoring metadata such as `data-demo`;
|
|
179
|
+
the metadata lands on that helper's
|
|
180
|
+
rendered root. The slot accepts only `data-*` strings. Structural
|
|
181
|
+
`data-catalog-example`, `data-catalog-example-stack`, and `data-align` semantics
|
|
182
|
+
remain helper-owned and are rejected case-insensitively at runtime, including
|
|
183
|
+
from structurally widened or JavaScript objects. Do not copy the helpers'
|
|
184
|
+
private `kui-catalog-*` classes into preview markup.
|
|
185
|
+
|
|
186
|
+
The app owns entry ids, `kind`, routing, sources, relationships, and test hooks.
|
|
187
|
+
`Catalog.stageRootAttributes` places app-owned `data-*` state on the
|
|
188
|
+
catalog-owned preview stage without an extra wrapper; `data-catalog-stage`
|
|
189
|
+
remains protected.
|
|
190
|
+
The stage is the main Pane's direct scrolling content and fills its available
|
|
191
|
+
scroller height for short specimens, so every backdrop reaches the pane's bottom.
|
|
192
|
+
It grows with tall specimens and scrolls without clipping. The canvas owns the
|
|
193
|
+
16px inset; the main Pane keeps its sunken appearance without a deep inset. The
|
|
194
|
+
Catalog's shipped CSS supplies this behavior in this package's UX demo and in
|
|
195
|
+
other packages' demos. Consumers should import `@kerfjs/ui/catalog` with its
|
|
196
|
+
browser styles (or the companion CSS subpath for manual CSS pipelines) rather
|
|
197
|
+
than styling Pane or stage internals.
|
|
198
|
+
The helpers own their structural markers, label/note anatomy, alignment marker,
|
|
199
|
+
and private classes. Component metadata such as margin/border/padding ownership
|
|
200
|
+
lives in `component-catalog.json`.
|
|
201
|
+
|
|
202
|
+
### Component metadata
|
|
203
|
+
|
|
204
|
+
Machine-readable geometry ownership metadata identifies whether the component,
|
|
205
|
+
its parent, or its children are responsible for margin, border, and padding.
|
|
206
|
+
Keep that metadata in `component-catalog.json` and use the rendered specimen to
|
|
207
|
+
review the actual appearance.
|
|
208
|
+
|
|
209
|
+
Catalogs for downstream components should conform to the
|
|
210
|
+
[`component-catalog-extension.schema.json`](../ai/component-catalog-extension.schema.json)
|
|
211
|
+
contract and can start from the checked
|
|
212
|
+
[`component-catalog-extension.json`](./examples/component-catalog-extension.json)
|
|
213
|
+
example; provide those entries beside Kerf's shipped catalog to AI tools.
|
|
214
|
+
An extension entry may declare `uses` with direct Kerf or extension entry ids,
|
|
215
|
+
plus repository-relative `source` and `demoSource` paths. Keep the ids unique
|
|
216
|
+
and resolvable across both catalogs; paths use `/` separators and cannot
|
|
217
|
+
traverse outside the repository. These fields let consumer demos derive source
|
|
218
|
+
links and composition relationships from the catalog.
|
|
219
|
+
|
|
220
|
+
For a consumer UX demo, `@kerfjs/ui/catalog-projection` exports
|
|
221
|
+
`projectConsumerCatalog(extension, kerfCatalog, options)` and
|
|
222
|
+
`projectCatalogEntries(entries, options)`. The projection maps `purpose` to
|
|
223
|
+
`description`, `uses` to related-entry ids, `source` to `componentSource`, and
|
|
224
|
+
`demoSource` to the demo source link. It defaults the source identity to
|
|
225
|
+
`consumer` and category to `Application`. Explicit paths in an extension entry
|
|
226
|
+
take precedence over templates. Template placeholders are `{id}`, `{name}`,
|
|
227
|
+
`{kind}`, and `{package}`. Design templates are omitted unless configured.
|
|
228
|
+
|
|
229
|
+
The package also ships `kerf-catalog-demo` for a committed TypeScript module:
|
|
230
|
+
|
|
231
|
+
```sh
|
|
232
|
+
kerf-catalog-demo --extension ai/component-catalog-extension.json \
|
|
233
|
+
--out ux-demo/catalog.generated.ts \
|
|
234
|
+
--repo-base https://github.com/acme/app/blob/main/ \
|
|
235
|
+
--source-template 'src/{id}.tsx' \
|
|
236
|
+
--demo-template 'ux-demo/demos/{id}.tsx' --write
|
|
237
|
+
kerf-catalog-demo --extension ai/component-catalog-extension.json \
|
|
238
|
+
--out ux-demo/catalog.generated.ts \
|
|
239
|
+
--repo-base https://github.com/acme/app/blob/main/ \
|
|
240
|
+
--source-template 'src/{id}.tsx' \
|
|
241
|
+
--demo-template 'ux-demo/demos/{id}.tsx' --check
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The command uses the Kerf catalog shipped with the package to resolve `uses`;
|
|
245
|
+
`--kerf-catalog` selects another catalog file. `--category`,
|
|
246
|
+
`--documentation-template`, and `--design-template` configure optional row
|
|
247
|
+
fields. `--check` fails if the generated file is missing or stale. The output
|
|
248
|
+
exports `generatedConsumerCatalog` and `catalogRepositoryBlobUrl`; the latter
|
|
249
|
+
is normalized to a trailing slash for source and documentation links.
|
|
250
|
+
|
|
251
|
+
### Automated conformance and reviewed exceptions
|
|
252
|
+
|
|
253
|
+
Run `npm run check:demo-conformance` after changing a first-party demo, its
|
|
254
|
+
catalog kind, or the shell's overlay logic. The TypeScript-AST gate verifies
|
|
255
|
+
facts that source can prove without guessing at rendered intent:
|
|
256
|
+
|
|
257
|
+
- focused component routes import and use `CatalogExampleStack` and
|
|
258
|
+
`CatalogExample` from the public package;
|
|
259
|
+
- focused route metadata uses the helpers' `rootAttributes` slot and example rows
|
|
260
|
+
are not empty;
|
|
261
|
+
- every `@kerfjs/ui` import is a published package export and relative imports
|
|
262
|
+
do not reach into `ui/src`;
|
|
263
|
+
- focused demos have no relative stylesheet imports, inline style attributes,
|
|
264
|
+
or styling-only `demo-*`, `wa-demo-*`, and token-search class names;
|
|
265
|
+
- demo JSX does not copy private `kui-catalog-*` structural classes;
|
|
266
|
+
- recipe sources (checked by `npm run check:recipes` with the same shared
|
|
267
|
+
analyzer) import no stylesheet other than public `@kerfjs/ui` CSS, set no
|
|
268
|
+
inline style, and name only published layout and Web Awesome classes; each
|
|
269
|
+
recipe declares its catalog frame through an exported `presentation`; and
|
|
270
|
+
- the shell derives the documented demo mode from the active entry's kind.
|
|
271
|
+
|
|
272
|
+
The gate deliberately does not infer component ownership from arbitrary class
|
|
273
|
+
names, margins, borders, or nested descendants. Runtime appearance remains the
|
|
274
|
+
browser suite's job.
|
|
275
|
+
|
|
276
|
+
A focused route may bypass the two public layout helpers only when the route's
|
|
277
|
+
stage geometry is itself the reviewed specimen. Add the narrow waiver to
|
|
278
|
+
[`catalog-conformance-exceptions.json`](../ux-demo/catalog-conformance-exceptions.json)
|
|
279
|
+
with the exact route, source file, stable diagnostic ids, a substantive reason,
|
|
280
|
+
and the reviewing `KF-*` ticket. Only helper/metadata rules are waivable;
|
|
281
|
+
private imports, local styling, private markup, empty examples, and shell-mode
|
|
282
|
+
drift always fail. The gate rejects duplicate, malformed, unused,
|
|
283
|
+
and stale exceptions, so delete a waiver when its route adopts the standard
|
|
284
|
+
helpers.
|
|
285
|
+
|
|
286
|
+
## Selection reveal
|
|
287
|
+
|
|
288
|
+
Set `revealSelection: true` on `wireCatalog` for a long desktop sidebar. After
|
|
289
|
+
`onSelect` updates controlled state, the helper waits one animation frame, finds
|
|
290
|
+
the exact matching `data-item-id`, and scrolls it into view without changing
|
|
291
|
+
focus. A newer selection or disposal cancels the pending reveal. The default
|
|
292
|
+
media guard follows the Workbench's inline sidebar (`min-width: 44.01rem`), so a
|
|
293
|
+
closed phone overlay is never scrolled behind the user's back.
|
|
294
|
+
|
|
295
|
+
Pass an options object instead of `true` to customize `block`, `inline`,
|
|
296
|
+
`behavior`, or `media`; `media: false` deliberately enables the behavior at all
|
|
297
|
+
sizes. For an initial deep link that did not come through `wireCatalog`, call
|
|
298
|
+
`revealCatalogEntry(app, initialId, { block: "center" })` after the first mount.
|
|
72
299
|
|
|
73
300
|
## Complete example
|
|
74
301
|
|
|
75
302
|
```tsx
|
|
76
|
-
import { mount, signal } from
|
|
77
|
-
import {
|
|
78
|
-
|
|
79
|
-
|
|
303
|
+
import { mount, signal, type SafeHtml } from "kerfjs";
|
|
304
|
+
import {
|
|
305
|
+
Catalog,
|
|
306
|
+
CatalogExample,
|
|
307
|
+
CatalogExampleStack,
|
|
308
|
+
type CatalogBackgroundStyle,
|
|
309
|
+
type CatalogSection,
|
|
310
|
+
} from "@kerfjs/ui/catalog";
|
|
311
|
+
import {
|
|
312
|
+
revealCatalogEntry,
|
|
313
|
+
wireCatalog,
|
|
314
|
+
} from "@kerfjs/ui/wire-catalog";
|
|
315
|
+
import "@kerfjs/ui/popup-menu/register"; // for the background chooser
|
|
316
|
+
// A CSS-aware (browser-condition) bundler loads the Catalog's CSS with its import.
|
|
80
317
|
|
|
81
|
-
|
|
82
|
-
|
|
318
|
+
type DemoKind = "component" | "composition";
|
|
319
|
+
type DemoEntry = CatalogSection["entries"][number] & { kind: DemoKind };
|
|
320
|
+
|
|
321
|
+
// 1. Describe selection and overlay mode once.
|
|
322
|
+
const entries: DemoEntry[] = [
|
|
83
323
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
324
|
+
id: "button",
|
|
325
|
+
name: "Button",
|
|
326
|
+
kind: "component",
|
|
327
|
+
description: "A pressable control.",
|
|
328
|
+
resources: [
|
|
329
|
+
{ label: "Source", href: "/src/button.tsx", detail: "src/button.tsx" },
|
|
90
330
|
],
|
|
91
331
|
},
|
|
92
|
-
{
|
|
332
|
+
{
|
|
333
|
+
id: "profile-form",
|
|
334
|
+
name: "Profile form",
|
|
335
|
+
kind: "composition",
|
|
336
|
+
description: "A labeled field and save action working together.",
|
|
337
|
+
},
|
|
338
|
+
];
|
|
339
|
+
const sections: CatalogSection[] = [
|
|
340
|
+
{
|
|
341
|
+
category: "Examples",
|
|
342
|
+
entries: entries.map(({ kind, ...entry }) => ({
|
|
343
|
+
...entry,
|
|
344
|
+
tags: kind === "composition" ? ["Composition"] : undefined,
|
|
345
|
+
})),
|
|
346
|
+
},
|
|
93
347
|
];
|
|
94
348
|
|
|
95
|
-
// 2.
|
|
96
|
-
const renderers: Record<string, () =>
|
|
97
|
-
button: () =>
|
|
98
|
-
|
|
99
|
-
|
|
349
|
+
// 2. Every preview uses one public group and public example rows.
|
|
350
|
+
const renderers: Record<string, () => SafeHtml> = {
|
|
351
|
+
button: () => (
|
|
352
|
+
<CatalogExampleStack
|
|
353
|
+
label="Button states"
|
|
354
|
+
rootAttributes={{ "data-demo": "button" }}
|
|
355
|
+
>
|
|
356
|
+
<CatalogExample label="Default" align="inline-control">
|
|
357
|
+
<Button label="Save" />
|
|
358
|
+
</CatalogExample>
|
|
359
|
+
<CatalogExample label="Authoring note" note="Explain the specimen below.">
|
|
360
|
+
<p>The application owns product copy and actions.</p>
|
|
361
|
+
</CatalogExample>
|
|
362
|
+
</CatalogExampleStack>
|
|
363
|
+
),
|
|
364
|
+
"profile-form": () => (
|
|
365
|
+
<CatalogExampleStack
|
|
366
|
+
label="Profile form composition"
|
|
367
|
+
rootAttributes={{ "data-demo": "profile-form" }}
|
|
368
|
+
>
|
|
369
|
+
<CatalogExample label="Complete composition">
|
|
370
|
+
<ProfileForm />
|
|
371
|
+
</CatalogExample>
|
|
372
|
+
</CatalogExampleStack>
|
|
373
|
+
),
|
|
100
374
|
};
|
|
101
375
|
|
|
102
|
-
// 3. App-owned state (domain: which entry; transient: collapsed;
|
|
103
|
-
const initial =
|
|
376
|
+
// 3. App-owned state (domain: which entry; transient: collapsed; display preferences).
|
|
377
|
+
const initial =
|
|
378
|
+
new URLSearchParams(location.search).get("c") ?? sections[0].entries[0].id;
|
|
104
379
|
const active = signal(initial);
|
|
105
380
|
const collapsed = signal(false);
|
|
106
|
-
const theme = signal<
|
|
381
|
+
const theme = signal<"light" | "dark">("light");
|
|
382
|
+
const increasedContrast = signal(false);
|
|
383
|
+
const reducedMotion = signal(false);
|
|
384
|
+
const backgroundStyle = signal<CatalogBackgroundStyle>("checkerboard");
|
|
107
385
|
|
|
108
|
-
const app = document.getElementById(
|
|
386
|
+
const app = document.getElementById("app")!;
|
|
109
387
|
mount(app, () => (
|
|
110
388
|
<Catalog
|
|
111
|
-
brand={{ title:
|
|
389
|
+
brand={{ title: "Acme UI", subtitle: "Design system" }}
|
|
112
390
|
sections={sections}
|
|
113
391
|
active={active.value}
|
|
114
392
|
content={renderers[active.value]?.() ?? <></>}
|
|
115
393
|
collapsed={collapsed.value}
|
|
116
394
|
theme={theme.value}
|
|
395
|
+
increasedContrast={increasedContrast.value}
|
|
396
|
+
reducedMotion={reducedMotion.value}
|
|
397
|
+
backgroundControl
|
|
398
|
+
backgroundStyle={backgroundStyle.value}
|
|
117
399
|
/>
|
|
118
400
|
));
|
|
119
401
|
|
|
120
402
|
wireCatalog(app, {
|
|
121
|
-
onSelect: (id) => {
|
|
122
|
-
|
|
403
|
+
onSelect: (id) => {
|
|
404
|
+
active.value = id;
|
|
405
|
+
},
|
|
406
|
+
onToggleSidebar: () => {
|
|
407
|
+
collapsed.value = !collapsed.value;
|
|
408
|
+
},
|
|
123
409
|
onToggleTheme: () => {
|
|
124
|
-
theme.value = theme.value ===
|
|
410
|
+
theme.value = theme.value === "dark" ? "light" : "dark";
|
|
125
411
|
document.documentElement.dataset.theme = theme.value; // apply your theme however you like
|
|
126
412
|
},
|
|
127
|
-
|
|
413
|
+
onToggleContrast: () => {
|
|
414
|
+
increasedContrast.value = !increasedContrast.value;
|
|
415
|
+
document.documentElement.classList.toggle("increased-contrast", increasedContrast.value);
|
|
416
|
+
},
|
|
417
|
+
onToggleMotion: () => {
|
|
418
|
+
reducedMotion.value = !reducedMotion.value;
|
|
419
|
+
document.documentElement.classList.toggle("reduced-motion", reducedMotion.value);
|
|
420
|
+
},
|
|
421
|
+
onSelectBackground: (style) => {
|
|
422
|
+
backgroundStyle.value = style;
|
|
423
|
+
},
|
|
424
|
+
urlParam: "c", // mirror the active id into ?c=<id>
|
|
425
|
+
revealSelection: true, // reveal long desktop sidebars without moving focus
|
|
128
426
|
});
|
|
427
|
+
|
|
428
|
+
// Optional for an initial deep link whose row may start outside the viewport.
|
|
429
|
+
revealCatalogEntry(app, initial, { block: "center" });
|
|
129
430
|
```
|
|
130
431
|
|
|
131
432
|
## Ownership boundary
|
|
@@ -135,6 +436,31 @@ wireCatalog(app, {
|
|
|
135
436
|
- **`active`** is domain state (which entry is shown) — the app's signal, updated in
|
|
136
437
|
`onSelect`, read to compute `content`.
|
|
137
438
|
- **`collapsed`** is transient UI — the app's signal, flipped in `onToggleSidebar`.
|
|
439
|
+
Pass the same signal as `wireCatalog`'s `collapsed` option so the sidebar is
|
|
440
|
+
wired as a Workbench rail (transient on small screens, focus handed to the
|
|
441
|
+
relocated toggle).
|
|
442
|
+
- **`headerPlacement` / `footerPlacement`** choose whether the entry toolbar and
|
|
443
|
+
description, and the status + resource footer, stay pinned (`fixed`), scroll with
|
|
444
|
+
the preview (`scroll`), or stay pinned while the entry pane is tall enough and
|
|
445
|
+
scroll with the preview when it is short (`auto`, the default) — so a short
|
|
446
|
+
window or large text never squeezes the preview out.
|
|
447
|
+
The resource footer uses `ToolbarControlGroup overflow="wrap"`: whole links
|
|
448
|
+
move to another row when they do not fit, keeping Guidance and source labels
|
|
449
|
+
readable without horizontal scrolling.
|
|
450
|
+
- **`sidebar`** configures the sidebar rail — it forwards to the Workbench's left
|
|
451
|
+
rail: `size` (default 288px), `resizable` (`true` or `{ min, max }`),
|
|
452
|
+
`separator`, `collapseMotion`, `presentation`, `responsiveOverlayAt` (default
|
|
453
|
+
`narrow`), `compactOverlay` (default `inset`), and `toolbar` (the sidebar
|
|
454
|
+
header's `ToolbarConfig`). A resizable sidebar's width is app state like
|
|
455
|
+
`collapsed`: render your size signal as `sidebar.size` and pass the same signal
|
|
456
|
+
as `wireCatalog`'s `sidebarSize` (plus `sidebarStorageKey` to remember it).
|
|
457
|
+
- **`mainToolbar` / `footerToolbar`** take the entry toolbar's and the resource
|
|
458
|
+
footer toolbar's `ToolbarConfig` (`dividerSides`, `centerAlign`, `responsive`,
|
|
459
|
+
`responsiveAt`, `safeAreaEdges`). The defaults are a wrapping entry toolbar
|
|
460
|
+
and a footer toolbar that stacks at `narrow`, all without dividers of their
|
|
461
|
+
own: `wireCatalog` wires `wireScrollDividers`, so the shell's panes draw
|
|
462
|
+
their chrome dividers only while scrolled; an omitted or
|
|
463
|
+
`undefined` field keeps them. Configure these instead of styling the shell.
|
|
138
464
|
- **`theme`** is a global preference — the app's signal; `wireCatalog` only reports
|
|
139
465
|
the toggle, the app applies the theme (the shell reads `theme` to show the toggle's
|
|
140
466
|
opposite-state label). Omit `theme` to hide the toggle entirely.
|
|
@@ -142,13 +468,20 @@ wireCatalog(app, {
|
|
|
142
468
|
## Custom action names
|
|
143
469
|
|
|
144
470
|
The shell emits `data-action="catalog-select"` (sidebar items),
|
|
145
|
-
`catalog-toggle-sidebar`,
|
|
146
|
-
`
|
|
147
|
-
matching options on `wireCatalog`
|
|
471
|
+
`catalog-toggle-sidebar`, `catalog-toggle-theme`, `catalog-toggle-contrast`,
|
|
472
|
+
`catalog-toggle-motion`, and `catalog-select-background`. Override them with
|
|
473
|
+
the matching `*Action` props on `Catalog` and options on `wireCatalog` if they
|
|
474
|
+
collide with your own action table.
|
|
148
475
|
|
|
149
476
|
## CSS
|
|
150
477
|
|
|
151
|
-
`Catalog` composes public
|
|
152
|
-
…)
|
|
153
|
-
|
|
154
|
-
|
|
478
|
+
`Catalog` composes public components (`Workbench`, `Pane`, `Toolbar`, `List`,
|
|
479
|
+
`ListHeader`, `ListItem`, `ListInsetText`, `Text`, …) and owns only the preview stage
|
|
480
|
+
(the checkerboard and left-aligned canvas), the example viewport
|
|
481
|
+
options, and the brand mark's size. A bundler that honors the `browser` export
|
|
482
|
+
condition loads the Catalog's stylesheets and those of every component it renders
|
|
483
|
+
internally with the `@kerfjs/ui/catalog` import alone — no dependence on which other
|
|
484
|
+
subpaths the app happens to import. Without that condition, import
|
|
485
|
+
`@kerfjs/ui/styles.css` for the whole layer, or `@kerfjs/ui/catalog.css` plus
|
|
486
|
+
`@kerfjs/ui/workbench.css` and each composed primitive's CSS. Like any Workbench it needs a definite containing height — the
|
|
487
|
+
`@kerfjs/ui/document.css` baseline's `.kui-app-root`.
|