@kerfjs/ui 5.0.0-beta.13 → 5.0.0-beta.131
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 +741 -163
- package/ai/application-ui-diagnostic-ids-v1.json +140 -0
- package/ai/application-ui-profile-sync.cjs +579 -0
- package/ai/application-ui-profile.d.mts +1 -0
- package/ai/application-ui-profile.d.ts +108 -0
- package/ai/application-ui-profile.defaults.json +226 -0
- package/ai/application-ui-profile.mjs +684 -0
- package/ai/application-ui-profile.schema.json +257 -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 +10592 -1339
- package/ai/component-catalog.schema.json +127 -2
- 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 +586 -0
- package/ai/component-composition.d.ts +178 -0
- package/ai/component-composition.json +11319 -0
- package/ai/component-composition.schema.json +749 -0
- package/ai/component-props-overlay.json +8910 -0
- package/ai/component-props-overlay.schema.json +82 -0
- package/ai/component-props.json +34289 -0
- package/ai/component-props.schema.json +408 -0
- package/ai/components/README.md +216 -0
- package/ai/components/anchored-surface.md +99 -0
- package/ai/components/application-tabs.md +65 -0
- package/ai/components/backdrop-image.md +86 -0
- package/ai/components/badge.md +77 -0
- package/ai/components/button.md +103 -0
- package/ai/components/checkbox-group.md +91 -0
- package/ai/components/checkbox.md +92 -0
- package/ai/components/chip.md +82 -0
- package/ai/components/choice-chips.md +97 -0
- package/ai/components/collapsible-panel.md +103 -0
- package/ai/components/color-field.md +94 -0
- package/ai/components/color-picker.md +95 -0
- package/ai/components/color-swatches.md +84 -0
- package/ai/components/column-explorer.md +89 -0
- package/ai/components/column-track.md +81 -0
- package/ai/components/combobox.md +92 -0
- package/ai/components/content-item.md +107 -0
- package/ai/components/content-swap.md +78 -0
- package/ai/components/corner-status.md +88 -0
- package/ai/components/disclosure-arrow.md +77 -0
- package/ai/components/disclosure.md +90 -0
- package/ai/components/document-baseline.md +77 -0
- package/ai/components/edge-activity-indicator.md +81 -0
- package/ai/components/editor-frame.md +80 -0
- package/ai/components/empty-state.md +80 -0
- package/ai/components/feedback.md +71 -0
- package/ai/components/file-picker.md +92 -0
- package/ai/components/floating-toolbar.md +82 -0
- package/ai/components/form.md +86 -0
- package/ai/components/foundation.md +65 -0
- package/ai/components/framed-list.md +80 -0
- package/ai/components/gauge.md +83 -0
- package/ai/components/grid.md +101 -0
- package/ai/components/headers.md +63 -0
- package/ai/components/layout.md +75 -0
- package/ai/components/list-action-row.md +110 -0
- package/ai/components/list-detail-dialog.md +92 -0
- package/ai/components/list-header.md +93 -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 +112 -0
- package/ai/components/list.md +131 -0
- package/ai/components/loading-spinner.md +73 -0
- package/ai/components/lucide-icon.md +99 -0
- package/ai/components/message-composer.md +87 -0
- package/ai/components/nav-stack.md +122 -0
- package/ai/components/paged-view.md +89 -0
- package/ai/components/pane.md +130 -0
- package/ai/components/popup-menu.md +177 -0
- package/ai/components/progress-bar.md +82 -0
- package/ai/components/progress-ring.md +80 -0
- package/ai/components/radio-group.md +95 -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-media-detail.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/scroll-effect.md +84 -0
- package/ai/components/search-field.md +110 -0
- package/ai/components/segmented-control.md +86 -0
- package/ai/components/select.md +122 -0
- package/ai/components/sized-region.md +86 -0
- package/ai/components/skeleton.md +84 -0
- package/ai/components/slider.md +86 -0
- package/ai/components/spacer.md +86 -0
- package/ai/components/split-button.md +85 -0
- package/ai/components/split-view.md +105 -0
- package/ai/components/state-banner.md +98 -0
- package/ai/components/summary-row.md +94 -0
- package/ai/components/sunken-panel.md +79 -0
- package/ai/components/surface-scaffold.md +137 -0
- package/ai/components/switch.md +83 -0
- package/ai/components/tab-bar.md +119 -0
- package/ai/components/tab-navigator.md +107 -0
- package/ai/components/tab-panel.md +84 -0
- package/ai/components/tabs.md +101 -0
- package/ai/components/tag-field.md +88 -0
- package/ai/components/text-field.md +104 -0
- package/ai/components/text.md +96 -0
- package/ai/components/toast.md +85 -0
- package/ai/components/toolbar-control-group.md +134 -0
- package/ai/components/toolbar-text.md +102 -0
- package/ai/components/toolbar.md +105 -0
- package/ai/components/tooltip.md +81 -0
- package/ai/components/tree-list.md +95 -0
- package/ai/components/value-preview.md +75 -0
- package/ai/components/value-table.md +80 -0
- package/ai/components/wa-accordion-item.md +63 -0
- package/ai/components/wa-accordion.md +71 -0
- package/ai/components/wa-animated-image.md +56 -0
- package/ai/components/wa-animation.md +56 -0
- package/ai/components/wa-avatar.md +56 -0
- package/ai/components/wa-badge.md +62 -0
- package/ai/components/wa-breadcrumb-item.md +56 -0
- package/ai/components/wa-breadcrumb.md +56 -0
- package/ai/components/wa-button-group.md +62 -0
- package/ai/components/wa-button.md +63 -0
- package/ai/components/wa-callout.md +60 -0
- package/ai/components/wa-card.md +67 -0
- package/ai/components/wa-carousel-item.md +54 -0
- package/ai/components/wa-carousel.md +58 -0
- package/ai/components/wa-checkbox-group.md +62 -0
- package/ai/components/wa-checkbox.md +63 -0
- package/ai/components/wa-color-picker.md +65 -0
- package/ai/components/wa-comparison.md +58 -0
- package/ai/components/wa-copy-button.md +58 -0
- package/ai/components/wa-details.md +69 -0
- package/ai/components/wa-dialog.md +67 -0
- package/ai/components/wa-divider.md +54 -0
- package/ai/components/wa-drawer.md +64 -0
- package/ai/components/wa-dropdown-item.md +64 -0
- package/ai/components/wa-dropdown.md +62 -0
- package/ai/components/wa-format-bytes.md +54 -0
- package/ai/components/wa-format-date.md +54 -0
- package/ai/components/wa-format-number.md +54 -0
- package/ai/components/wa-icon.md +59 -0
- package/ai/components/wa-include.md +55 -0
- package/ai/components/wa-input.md +64 -0
- package/ai/components/wa-intersection-observer.md +54 -0
- package/ai/components/wa-known-date.md +56 -0
- package/ai/components/wa-markdown.md +54 -0
- package/ai/components/wa-mutation-observer.md +54 -0
- package/ai/components/wa-number-input.md +58 -0
- package/ai/components/wa-option.md +61 -0
- package/ai/components/wa-otp-input.md +56 -0
- package/ai/components/wa-page.md +62 -0
- package/ai/components/wa-pagination.md +58 -0
- package/ai/components/wa-popover.md +61 -0
- package/ai/components/wa-popup.md +60 -0
- package/ai/components/wa-progress-bar.md +60 -0
- package/ai/components/wa-progress-ring.md +60 -0
- package/ai/components/wa-qr-code.md +54 -0
- package/ai/components/wa-radio-group.md +67 -0
- package/ai/components/wa-radio.md +63 -0
- package/ai/components/wa-random-content.md +54 -0
- package/ai/components/wa-rating.md +58 -0
- package/ai/components/wa-relative-time.md +54 -0
- package/ai/components/wa-resize-observer.md +54 -0
- package/ai/components/wa-scroller.md +61 -0
- package/ai/components/wa-select.md +67 -0
- package/ai/components/wa-skeleton.md +60 -0
- package/ai/components/wa-slider.md +63 -0
- package/ai/components/wa-spinner.md +60 -0
- package/ai/components/wa-split-panel.md +60 -0
- package/ai/components/wa-step.md +56 -0
- package/ai/components/wa-stepper.md +56 -0
- package/ai/components/wa-switch.md +62 -0
- package/ai/components/wa-tab-group.md +71 -0
- package/ai/components/wa-tab-panel.md +62 -0
- package/ai/components/wa-tab.md +63 -0
- package/ai/components/wa-tag-input.md +64 -0
- package/ai/components/wa-tag.md +62 -0
- package/ai/components/wa-textarea.md +62 -0
- package/ai/components/wa-time-input.md +58 -0
- package/ai/components/wa-toast-item.md +62 -0
- package/ai/components/wa-toast.md +62 -0
- package/ai/components/wa-tooltip.md +61 -0
- package/ai/components/wa-tree-item.md +63 -0
- package/ai/components/wa-tree.md +61 -0
- package/ai/components/wa-zoomable-frame.md +58 -0
- package/ai/components/workbench-dialog.md +92 -0
- package/ai/components/workbench.md +120 -0
- package/ai/design-mock/SKILL.md +27 -0
- package/ai/design-mock/references/hs2-example.md +7 -0
- package/ai/public-api-signatures-v1.md +7713 -524
- package/ai/skill.md +683 -66
- package/ai/view-document.schema.json +467 -0
- package/ai/webawesome-jsx-signatures-v1.md +12 -2
- package/analyzer/cli.mjs +85 -0
- package/analyzer/component-ownership.d.mts +72 -0
- package/analyzer/component-ownership.mjs +429 -0
- package/analyzer/index.d.mts +54 -0
- package/analyzer/index.mjs +2738 -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 +132 -0
- package/catalog-projection.d.mts +55 -0
- package/catalog-projection.mjs +62 -0
- package/dist/anchor-name-BZ1rpxaw.d.ts +4 -0
- package/dist/anchored-surface.d.ts +69 -0
- package/dist/anchored-surface.js +4 -0
- package/dist/anchored-surface.js.map +1 -0
- package/dist/backdrop-image.d.ts +147 -0
- package/dist/backdrop-image.js +6 -0
- package/dist/backdrop-image.js.map +1 -0
- package/dist/badge.d.ts +91 -0
- package/dist/badge.js +4 -0
- package/dist/badge.js.map +1 -0
- package/dist/browser/anchored-surface.js +3 -0
- package/dist/browser/backdrop-image.js +4 -0
- package/dist/browser/badge.js +3 -0
- package/dist/browser/button.js +5 -0
- package/dist/browser/catalog.js +29 -0
- package/dist/browser/checkbox-group.js +5 -0
- package/dist/browser/checkbox.js +4 -0
- package/dist/browser/chip.js +3 -0
- package/dist/browser/choice-chips.js +3 -0
- package/dist/browser/collapsible-panel.js +10 -0
- package/dist/browser/color-field.js +4 -0
- package/dist/browser/color-picker.js +5 -0
- package/dist/browser/color-swatches.js +3 -0
- package/dist/browser/column-explorer.js +13 -0
- package/dist/browser/column-track.js +3 -0
- package/dist/browser/combobox.js +3 -0
- package/dist/browser/content-item.js +5 -0
- package/dist/browser/content-swap.js +3 -0
- package/dist/browser/corner-status.js +3 -0
- package/dist/browser/disclosure.js +5 -0
- package/dist/browser/edge-activity-indicator.js +3 -0
- package/dist/browser/editor-frame.js +3 -0
- package/dist/browser/editor.js +50 -0
- package/dist/browser/file-picker.js +3 -0
- package/dist/browser/form.js +3 -0
- package/dist/browser/framed-list.js +3 -0
- package/dist/browser/gauge.js +3 -0
- package/dist/browser/grid.js +3 -0
- package/dist/browser/list-action-row.js +3 -0
- package/dist/browser/list-detail-dialog.js +15 -0
- package/dist/browser/list-header.js +3 -1
- package/dist/browser/list-item.js +1 -0
- package/dist/browser/list.js +3 -0
- package/dist/browser/message-composer.js +5 -0
- package/dist/browser/nav-stack.js +12 -0
- package/dist/browser/paged-view.js +3 -0
- package/dist/browser/pane.js +3 -0
- package/dist/browser/popup-menu.js +4 -0
- package/dist/browser/progress-bar.js +3 -0
- package/dist/browser/progress-ring.js +3 -0
- package/dist/browser/radio-group.js +4 -0
- package/dist/browser/row.js +3 -0
- package/dist/browser/scroll-effect.js +3 -0
- package/dist/browser/search-field.js +4 -0
- package/dist/browser/segmented-control.js +1 -1
- package/dist/browser/select.js +2 -1
- package/dist/browser/sized-region.js +3 -0
- package/dist/browser/slider.js +3 -0
- package/dist/browser/spacer.js +3 -0
- package/dist/browser/split-button.js +5 -0
- package/dist/browser/split-view.js +14 -0
- package/dist/browser/state-banner.js +1 -0
- package/dist/browser/summary-row.js +3 -0
- package/dist/browser/sunken-panel.js +3 -0
- package/dist/browser/surface-scaffold.js +4 -0
- package/dist/browser/switch.js +3 -0
- package/dist/browser/tab-bar-item.js +4 -0
- package/dist/browser/tab-navigator.js +4 -0
- package/dist/browser/tab-panel.js +3 -0
- package/dist/browser/tag-field.js +5 -0
- package/dist/browser/text-field.js +4 -0
- package/dist/browser/text.js +3 -0
- package/dist/browser/toolbar-control-group.js +2 -0
- package/dist/browser/tree-list.js +7 -0
- package/dist/browser/value-preview.js +3 -0
- package/dist/browser/workbench-dialog.js +16 -0
- package/dist/browser/workbench.js +15 -0
- package/dist/button.d.ts +164 -0
- package/dist/button.js +8 -0
- package/dist/button.js.map +1 -0
- package/dist/catalog-resources.d.ts +52 -0
- package/dist/catalog-resources.js +22 -0
- package/dist/catalog-resources.js.map +1 -0
- package/dist/catalog.d.ts +136 -101
- package/dist/catalog.js +707 -108
- package/dist/catalog.js.map +1 -1
- package/dist/checkbox-group.d.ts +70 -0
- package/dist/checkbox-group.js +7 -0
- package/dist/checkbox-group.js.map +1 -0
- package/dist/checkbox.d.ts +45 -0
- package/dist/checkbox.js +6 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/chip.d.ts +117 -0
- package/dist/chip.js +4 -0
- package/dist/chip.js.map +1 -0
- package/dist/choice-chips.d.ts +135 -0
- package/dist/choice-chips.js +4 -0
- package/dist/choice-chips.js.map +1 -0
- package/dist/chunk-2FA3SX57.js +156 -0
- package/dist/chunk-2FA3SX57.js.map +1 -0
- package/dist/chunk-2GEGIPDR.js +78 -0
- package/dist/chunk-2GEGIPDR.js.map +1 -0
- package/dist/chunk-2GOCOLQL.js +270 -0
- package/dist/chunk-2GOCOLQL.js.map +1 -0
- package/dist/chunk-2RDWKN3Y.js +689 -0
- package/dist/chunk-2RDWKN3Y.js.map +1 -0
- package/dist/chunk-3K5V3ZSD.js +77 -0
- package/dist/chunk-3K5V3ZSD.js.map +1 -0
- package/dist/chunk-3TBMGGTA.js +27 -0
- package/dist/chunk-3TBMGGTA.js.map +1 -0
- package/dist/chunk-3UEMBHBK.js +1022 -0
- package/dist/chunk-3UEMBHBK.js.map +1 -0
- package/dist/chunk-3VZ6SFD4.js +8 -0
- package/dist/chunk-3VZ6SFD4.js.map +1 -0
- package/dist/chunk-3XSY5LAB.js +385 -0
- package/dist/chunk-3XSY5LAB.js.map +1 -0
- package/dist/chunk-44AOBT2F.js +16 -0
- package/dist/chunk-44AOBT2F.js.map +1 -0
- package/dist/chunk-4CYCJ3NY.js +563 -0
- package/dist/chunk-4CYCJ3NY.js.map +1 -0
- package/dist/chunk-4IXG6XCT.js +70 -0
- package/dist/chunk-4IXG6XCT.js.map +1 -0
- package/dist/chunk-4K7XXSOX.js +21 -0
- package/dist/chunk-4K7XXSOX.js.map +1 -0
- package/dist/chunk-4L5ZIKDZ.js +129 -0
- package/dist/chunk-4L5ZIKDZ.js.map +1 -0
- package/dist/chunk-4OH6JSGU.js +53 -0
- package/dist/chunk-4OH6JSGU.js.map +1 -0
- package/dist/chunk-4UWLHKNU.js +190 -0
- package/dist/chunk-4UWLHKNU.js.map +1 -0
- package/dist/chunk-5KWXM5O7.js +51 -0
- package/dist/chunk-5KWXM5O7.js.map +1 -0
- package/dist/chunk-63TJH2RF.js +231 -0
- package/dist/chunk-63TJH2RF.js.map +1 -0
- package/dist/chunk-6BXPN5SC.js +73 -0
- package/dist/chunk-6BXPN5SC.js.map +1 -0
- package/dist/chunk-6C6DLP3W.js +31 -0
- package/dist/chunk-6C6DLP3W.js.map +1 -0
- package/dist/chunk-6PHG2DMG.js +127 -0
- package/dist/chunk-6PHG2DMG.js.map +1 -0
- package/dist/chunk-6V6UHPJD.js +153 -0
- package/dist/chunk-6V6UHPJD.js.map +1 -0
- package/dist/chunk-76BLSFEA.js +825 -0
- package/dist/chunk-76BLSFEA.js.map +1 -0
- package/dist/chunk-76VCWWUA.js +73 -0
- package/dist/chunk-76VCWWUA.js.map +1 -0
- package/dist/chunk-7DIWVGGA.js +36 -0
- package/dist/chunk-7DIWVGGA.js.map +1 -0
- package/dist/chunk-7KN5OQVN.js +157 -0
- package/dist/chunk-7KN5OQVN.js.map +1 -0
- package/dist/chunk-7QQ3HE47.js +17 -0
- package/dist/chunk-7QQ3HE47.js.map +1 -0
- package/dist/chunk-7U65KLDL.js +67 -0
- package/dist/chunk-7U65KLDL.js.map +1 -0
- package/dist/chunk-AYPGXR2E.js +20 -0
- package/dist/chunk-AYPGXR2E.js.map +1 -0
- package/dist/chunk-BCHK33XL.js +167 -0
- package/dist/chunk-BCHK33XL.js.map +1 -0
- package/dist/chunk-C2TY5DJC.js +303 -0
- package/dist/chunk-C2TY5DJC.js.map +1 -0
- package/dist/chunk-C4FBYP2D.js +59 -0
- package/dist/chunk-C4FBYP2D.js.map +1 -0
- package/dist/chunk-CAB5IWV7.js +93 -0
- package/dist/chunk-CAB5IWV7.js.map +1 -0
- package/dist/chunk-CCPWJDRW.js +61 -0
- package/dist/chunk-CCPWJDRW.js.map +1 -0
- package/dist/chunk-CIAUILRR.js +222 -0
- package/dist/chunk-CIAUILRR.js.map +1 -0
- package/dist/chunk-CJAKN2KZ.js +35 -0
- package/dist/chunk-CJAKN2KZ.js.map +1 -0
- package/dist/chunk-CKPI4WIN.js +58 -0
- package/dist/chunk-CKPI4WIN.js.map +1 -0
- package/dist/chunk-CMG4OZPV.js +119 -0
- package/dist/chunk-CMG4OZPV.js.map +1 -0
- package/dist/chunk-COMEWURO.js +122 -0
- package/dist/chunk-COMEWURO.js.map +1 -0
- package/dist/chunk-COQI4OMZ.js +71 -0
- package/dist/chunk-COQI4OMZ.js.map +1 -0
- package/dist/chunk-CPTQABDQ.js +36 -0
- package/dist/chunk-CPTQABDQ.js.map +1 -0
- package/dist/chunk-CRHKWHTA.js +90 -0
- package/dist/chunk-CRHKWHTA.js.map +1 -0
- package/dist/chunk-CUUW57WB.js +539 -0
- package/dist/chunk-CUUW57WB.js.map +1 -0
- package/dist/chunk-D2KHQNJ6.js +155 -0
- package/dist/chunk-D2KHQNJ6.js.map +1 -0
- package/dist/chunk-D4MXSAMI.js +50 -0
- package/dist/chunk-D4MXSAMI.js.map +1 -0
- package/dist/chunk-DB64I3DB.js +191 -0
- package/dist/chunk-DB64I3DB.js.map +1 -0
- package/dist/chunk-DBP3N6E5.js +204 -0
- package/dist/chunk-DBP3N6E5.js.map +1 -0
- package/dist/chunk-DJWBXEF4.js +40 -0
- package/dist/chunk-DJWBXEF4.js.map +1 -0
- package/dist/chunk-DKPYHVIV.js +13 -0
- package/dist/chunk-DKPYHVIV.js.map +1 -0
- package/dist/chunk-DV6GE57V.js +191 -0
- package/dist/chunk-DV6GE57V.js.map +1 -0
- package/dist/chunk-E7Q6UNCB.js +41 -0
- package/dist/chunk-E7Q6UNCB.js.map +1 -0
- package/dist/chunk-E7ZRBMVQ.js +76 -0
- package/dist/chunk-E7ZRBMVQ.js.map +1 -0
- package/dist/chunk-ECVTRAXN.js +37 -0
- package/dist/chunk-ECVTRAXN.js.map +1 -0
- package/dist/chunk-EHR7R7YP.js +62 -0
- package/dist/chunk-EHR7R7YP.js.map +1 -0
- package/dist/chunk-EI55KWHP.js +28 -0
- package/dist/chunk-EI55KWHP.js.map +1 -0
- package/dist/chunk-FCO7BT4P.js +256 -0
- package/dist/chunk-FCO7BT4P.js.map +1 -0
- package/dist/chunk-FNJA4S6J.js +38 -0
- package/dist/chunk-FNJA4S6J.js.map +1 -0
- package/dist/chunk-FQETQ7CM.js +48 -0
- package/dist/chunk-FQETQ7CM.js.map +1 -0
- package/dist/chunk-FR5G77K5.js +82 -0
- package/dist/chunk-FR5G77K5.js.map +1 -0
- package/dist/chunk-GE2BQXB3.js +206 -0
- package/dist/chunk-GE2BQXB3.js.map +1 -0
- package/dist/chunk-GHV36C6I.js +94 -0
- package/dist/chunk-GHV36C6I.js.map +1 -0
- package/dist/chunk-GXSX6Q6O.js +42 -0
- package/dist/chunk-GXSX6Q6O.js.map +1 -0
- package/dist/chunk-HPOXLOVC.js +184 -0
- package/dist/chunk-HPOXLOVC.js.map +1 -0
- package/dist/chunk-HTERKONR.js +49 -0
- package/dist/chunk-HTERKONR.js.map +1 -0
- package/dist/chunk-I2K4OQKB.js +426 -0
- package/dist/chunk-I2K4OQKB.js.map +1 -0
- package/dist/chunk-IFDTSVE6.js +9 -0
- package/dist/chunk-IFDTSVE6.js.map +1 -0
- package/dist/chunk-IKS72C6P.js +53 -0
- package/dist/chunk-IKS72C6P.js.map +1 -0
- package/dist/chunk-IPYQYLSX.js +169 -0
- package/dist/chunk-IPYQYLSX.js.map +1 -0
- package/dist/chunk-IQSRHXZR.js +164 -0
- package/dist/chunk-IQSRHXZR.js.map +1 -0
- package/dist/chunk-IRC5N7FA.js +16 -0
- package/dist/chunk-IRC5N7FA.js.map +1 -0
- package/dist/chunk-JAC6AVZN.js +104 -0
- package/dist/chunk-JAC6AVZN.js.map +1 -0
- package/dist/chunk-JHUEYWWI.js +74 -0
- package/dist/chunk-JHUEYWWI.js.map +1 -0
- package/dist/chunk-JYKP7TBZ.js +27 -0
- package/dist/chunk-JYKP7TBZ.js.map +1 -0
- package/dist/chunk-KACJOE2N.js +170 -0
- package/dist/chunk-KACJOE2N.js.map +1 -0
- package/dist/chunk-KBS3GP6S.js +68 -0
- package/dist/chunk-KBS3GP6S.js.map +1 -0
- package/dist/chunk-KC6WUSNS.js +34 -0
- package/dist/chunk-KC6WUSNS.js.map +1 -0
- package/dist/chunk-KK3S5OTW.js +98 -0
- package/dist/chunk-KK3S5OTW.js.map +1 -0
- package/dist/chunk-KS7EXW4P.js +290 -0
- package/dist/chunk-KS7EXW4P.js.map +1 -0
- package/dist/chunk-LET362AM.js +105 -0
- package/dist/chunk-LET362AM.js.map +1 -0
- package/dist/chunk-LJV2FNOC.js +346 -0
- package/dist/chunk-LJV2FNOC.js.map +1 -0
- package/dist/chunk-LK3QJHVX.js +19 -0
- package/dist/chunk-LK3QJHVX.js.map +1 -0
- package/dist/chunk-LOW7J7SE.js +63 -0
- package/dist/chunk-LOW7J7SE.js.map +1 -0
- package/dist/chunk-LTOTL5AS.js +56 -0
- package/dist/chunk-LTOTL5AS.js.map +1 -0
- package/dist/chunk-M64TAGZY.js +590 -0
- package/dist/chunk-M64TAGZY.js.map +1 -0
- package/dist/chunk-M72QLDUO.js +33 -0
- package/dist/chunk-M72QLDUO.js.map +1 -0
- package/dist/chunk-MHMWQ7RB.js +19 -0
- package/dist/chunk-MHMWQ7RB.js.map +1 -0
- package/dist/chunk-MJ5RU6XT.js +173 -0
- package/dist/chunk-MJ5RU6XT.js.map +1 -0
- package/dist/chunk-MMOQR426.js +14 -0
- package/dist/chunk-MMOQR426.js.map +1 -0
- package/dist/chunk-MVWR5WRX.js +99 -0
- package/dist/chunk-MVWR5WRX.js.map +1 -0
- package/dist/chunk-NA4LKVPX.js +48 -0
- package/dist/chunk-NA4LKVPX.js.map +1 -0
- package/dist/chunk-OK7FUK7U.js +9 -0
- package/dist/chunk-OK7FUK7U.js.map +1 -0
- package/dist/chunk-OKZTLRGG.js +34 -0
- package/dist/chunk-OKZTLRGG.js.map +1 -0
- package/dist/chunk-OQFWF7Q7.js +178 -0
- package/dist/chunk-OQFWF7Q7.js.map +1 -0
- package/dist/chunk-OZKBIPXU.js +114 -0
- package/dist/chunk-OZKBIPXU.js.map +1 -0
- package/dist/chunk-PVKAIVKE.js +283 -0
- package/dist/chunk-PVKAIVKE.js.map +1 -0
- package/dist/chunk-Q5BPZPCO.js +52 -0
- package/dist/chunk-Q5BPZPCO.js.map +1 -0
- package/dist/chunk-QDSZTQXL.js +28 -0
- package/dist/chunk-QDSZTQXL.js.map +1 -0
- package/dist/chunk-QPTJ5DOO.js +87 -0
- package/dist/chunk-QPTJ5DOO.js.map +1 -0
- package/dist/chunk-QR7MGGOM.js +49 -0
- package/dist/chunk-QR7MGGOM.js.map +1 -0
- package/dist/chunk-QSJAIXLM.js +524 -0
- package/dist/chunk-QSJAIXLM.js.map +1 -0
- package/dist/chunk-QXXLDY6I.js +164 -0
- package/dist/chunk-QXXLDY6I.js.map +1 -0
- package/dist/chunk-QY77Q7RY.js +129 -0
- package/dist/chunk-QY77Q7RY.js.map +1 -0
- package/dist/chunk-QYOPZ2XS.js +124 -0
- package/dist/chunk-QYOPZ2XS.js.map +1 -0
- package/dist/chunk-QZA75NOK.js +202 -0
- package/dist/chunk-QZA75NOK.js.map +1 -0
- package/dist/chunk-R4JK2C6D.js +358 -0
- package/dist/chunk-R4JK2C6D.js.map +1 -0
- package/dist/chunk-RGB4DPMN.js +144 -0
- package/dist/chunk-RGB4DPMN.js.map +1 -0
- package/dist/chunk-RHMY45DK.js +178 -0
- package/dist/chunk-RHMY45DK.js.map +1 -0
- package/dist/{chunk-56RJXPHG.js → chunk-RPJOLDSR.js} +15 -4
- package/dist/chunk-RPJOLDSR.js.map +1 -0
- package/dist/chunk-S7QB5KMM.js +398 -0
- package/dist/chunk-S7QB5KMM.js.map +1 -0
- package/dist/chunk-SGYBIKQA.js +265 -0
- package/dist/chunk-SGYBIKQA.js.map +1 -0
- package/dist/chunk-SHECA2N4.js +96 -0
- package/dist/chunk-SHECA2N4.js.map +1 -0
- package/dist/chunk-SNUDT6AX.js +89 -0
- package/dist/chunk-SNUDT6AX.js.map +1 -0
- package/dist/chunk-TBVSPSGX.js +14 -0
- package/dist/chunk-TBVSPSGX.js.map +1 -0
- package/dist/chunk-TNJLNLVE.js +115 -0
- package/dist/chunk-TNJLNLVE.js.map +1 -0
- package/dist/chunk-TRJS7M2H.js +39 -0
- package/dist/chunk-TRJS7M2H.js.map +1 -0
- package/dist/chunk-TUID42UE.js +15 -0
- package/dist/chunk-TUID42UE.js.map +1 -0
- package/dist/chunk-TXBNPEIJ.js +31 -0
- package/dist/chunk-TXBNPEIJ.js.map +1 -0
- package/dist/chunk-UOBC36FL.js +149 -0
- package/dist/chunk-UOBC36FL.js.map +1 -0
- package/dist/chunk-UPHPFKAD.js +190 -0
- package/dist/chunk-UPHPFKAD.js.map +1 -0
- package/dist/chunk-UU37OR3D.js +18 -0
- package/dist/chunk-UU37OR3D.js.map +1 -0
- package/dist/chunk-V3IXAI4L.js +52 -0
- package/dist/chunk-V3IXAI4L.js.map +1 -0
- package/dist/chunk-VBXKYT4O.js +71 -0
- package/dist/chunk-VBXKYT4O.js.map +1 -0
- package/dist/chunk-WCMGPAY2.js +103 -0
- package/dist/chunk-WCMGPAY2.js.map +1 -0
- package/dist/chunk-WEQNPYVA.js +62 -0
- package/dist/chunk-WEQNPYVA.js.map +1 -0
- package/dist/chunk-WSPXSWFG.js +76 -0
- package/dist/chunk-WSPXSWFG.js.map +1 -0
- package/dist/chunk-WVQDIOD7.js +148 -0
- package/dist/chunk-WVQDIOD7.js.map +1 -0
- package/dist/chunk-X43QQWVC.js +208 -0
- package/dist/chunk-X43QQWVC.js.map +1 -0
- package/dist/chunk-XO5IOPM5.js +218 -0
- package/dist/chunk-XO5IOPM5.js.map +1 -0
- package/dist/chunk-Y4VR6VNM.js +44 -0
- package/dist/chunk-Y4VR6VNM.js.map +1 -0
- package/dist/chunk-YA6OAJY6.js +155 -0
- package/dist/chunk-YA6OAJY6.js.map +1 -0
- package/dist/chunk-YE6KCAIN.js +382 -0
- package/dist/chunk-YE6KCAIN.js.map +1 -0
- package/dist/collapsible-panel.d.ts +104 -17
- package/dist/collapsible-panel.js +174 -14
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/color-field.d.ts +51 -0
- package/dist/color-field.js +92 -0
- package/dist/color-field.js.map +1 -0
- package/dist/color-picker.d.ts +113 -0
- package/dist/color-picker.js +8 -0
- package/dist/color-picker.js.map +1 -0
- package/dist/color-swatches.d.ts +56 -0
- package/dist/color-swatches.js +4 -0
- package/dist/color-swatches.js.map +1 -0
- package/dist/column-explorer.d.ts +71 -0
- package/dist/column-explorer.js +23 -0
- package/dist/column-explorer.js.map +1 -0
- package/dist/column-track.d.ts +70 -0
- package/dist/column-track.js +4 -0
- package/dist/column-track.js.map +1 -0
- package/dist/combobox.d.ts +44 -0
- package/dist/combobox.js +4 -0
- package/dist/combobox.js.map +1 -0
- package/dist/content-item.d.ts +182 -0
- package/dist/content-item.js +8 -0
- package/dist/content-item.js.map +1 -0
- package/dist/content-swap.d.ts +38 -0
- package/dist/content-swap.js +4 -0
- package/dist/content-swap.js.map +1 -0
- package/dist/corner-status.d.ts +40 -0
- package/dist/corner-status.js +4 -0
- package/dist/corner-status.js.map +1 -0
- package/dist/css-values.d.ts +127 -0
- package/dist/css-values.js +3 -0
- package/dist/css-values.js.map +1 -0
- package/dist/device-class.js +1 -73
- package/dist/device-class.js.map +1 -1
- package/dist/dialog-surface-controller-BeKZ3e8Z.d.ts +251 -0
- package/dist/disclosure-arrow.d.ts +10 -1
- package/dist/disclosure-arrow.js +3 -1
- package/dist/disclosure.d.ts +66 -0
- package/dist/disclosure.js +51 -0
- package/dist/disclosure.js.map +1 -0
- package/dist/edge-activity-indicator.d.ts +32 -0
- package/dist/edge-activity-indicator.js +4 -0
- package/dist/edge-activity-indicator.js.map +1 -0
- package/dist/editor-frame.d.ts +41 -0
- package/dist/editor-frame.js +3 -0
- package/dist/editor-frame.js.map +1 -0
- package/dist/editor.d.ts +447 -0
- package/dist/editor.js +15608 -0
- package/dist/editor.js.map +1 -0
- package/dist/empty-state.d.ts +9 -2
- package/dist/empty-state.js +3 -1
- package/dist/extension-attributes-IJ4decoa.d.ts +19 -0
- package/dist/file-picker.d.ts +75 -0
- package/dist/file-picker.js +4 -0
- package/dist/file-picker.js.map +1 -0
- package/dist/flex-alignment-4ms8ZbV8.d.ts +5 -0
- package/dist/floating-toolbar.d.ts +33 -6
- package/dist/floating-toolbar.js +2 -1
- package/dist/form.d.ts +45 -0
- package/dist/form.js +4 -0
- package/dist/form.js.map +1 -0
- package/dist/framed-list.d.ts +47 -0
- package/dist/framed-list.js +4 -0
- package/dist/framed-list.js.map +1 -0
- package/dist/gauge.d.ts +73 -0
- package/dist/gauge.js +157 -0
- package/dist/gauge.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 +11 -0
- package/dist/help-tags-register.js.map +1 -0
- package/dist/index.d.ts +83 -17
- package/dist/index.js +103 -27
- package/dist/list-action-row.d.ts +69 -12
- package/dist/list-action-row.js +10 -1
- package/dist/list-detail-dialog.d.ts +131 -0
- package/dist/list-detail-dialog.js +173 -0
- package/dist/list-detail-dialog.js.map +1 -0
- package/dist/list-header.d.ts +122 -10
- package/dist/list-header.js +5 -1
- package/dist/list-icon-tile-B8dr97OW.d.ts +18 -0
- package/dist/list-inset-control.d.ts +14 -4
- package/dist/list-inset-control.js +2 -1
- package/dist/list-inset-text.d.ts +18 -4
- package/dist/list-inset-text.js +2 -1
- package/dist/list-item.d.ts +49 -5
- package/dist/list-item.js +7 -1
- package/dist/list.d.ts +268 -0
- package/dist/list.js +7 -0
- package/dist/list.js.map +1 -0
- package/dist/loading-spinner.d.ts +16 -2
- package/dist/loading-spinner.js +3 -1
- package/dist/lucide-icon.d.ts +27 -3
- package/dist/lucide-icon.js +3 -1
- package/dist/message-composer.d.ts +70 -0
- package/dist/message-composer.js +7 -0
- package/dist/message-composer.js.map +1 -0
- package/dist/nav-stack-DKrvqFjA.d.ts +206 -0
- package/dist/nav-stack.d.ts +17 -38
- package/dist/nav-stack.js +18 -1
- package/dist/paged-view.d.ts +47 -0
- package/dist/paged-view.js +86 -0
- package/dist/paged-view.js.map +1 -0
- package/dist/pane.d.ts +275 -0
- package/dist/pane.js +8 -0
- package/dist/pane.js.map +1 -0
- package/dist/panel-toolbar-CEcHHDkn.d.ts +85 -0
- package/dist/popup-menu-register.d.ts +11 -0
- package/dist/popup-menu-register.js +7 -0
- package/dist/popup-menu-register.js.map +1 -0
- package/dist/popup-menu.d.ts +193 -0
- package/dist/popup-menu.js +8 -0
- package/dist/popup-menu.js.map +1 -0
- package/dist/progress-bar.d.ts +52 -0
- package/dist/progress-bar.js +68 -0
- package/dist/progress-bar.js.map +1 -0
- package/dist/progress-ring.d.ts +44 -0
- package/dist/progress-ring.js +73 -0
- package/dist/progress-ring.js.map +1 -0
- package/dist/radio-group.d.ts +79 -0
- package/dist/radio-group.js +6 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/resizable-region.d.ts +36 -3
- package/dist/resizable-region.js +2 -1
- package/dist/row.d.ts +58 -0
- package/dist/row.js +7 -0
- package/dist/row.js.map +1 -0
- package/dist/scroll-clearance-BikHljTc.d.ts +14 -0
- package/dist/scroll-effect.d.ts +86 -0
- package/dist/scroll-effect.js +5 -0
- package/dist/scroll-effect.js.map +1 -0
- package/dist/search-field-7wLt3Bd5.d.ts +221 -0
- package/dist/search-field-model.d.ts +4 -0
- package/dist/search-field-model.js +3 -0
- package/dist/search-field-model.js.map +1 -0
- package/dist/search-field.d.ts +4 -0
- package/dist/search-field.js +6 -0
- package/dist/search-field.js.map +1 -0
- package/dist/segmented-control.d.ts +40 -10
- package/dist/segmented-control.js +3 -1
- package/dist/select-register.d.ts +6 -3
- package/dist/select-register.js +403 -8
- package/dist/select-register.js.map +1 -1
- package/dist/select.d.ts +149 -9
- package/dist/select.js +6 -1
- package/dist/selection.d.ts +54 -0
- package/dist/selection.js +3 -0
- package/dist/selection.js.map +1 -0
- 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/sized-region.d.ts +44 -0
- package/dist/sized-region.js +4 -0
- package/dist/sized-region.js.map +1 -0
- package/dist/skeleton.d.ts +18 -7
- package/dist/skeleton.js +3 -1
- package/dist/slider.d.ts +74 -0
- package/dist/slider.js +103 -0
- package/dist/slider.js.map +1 -0
- package/dist/spacer.d.ts +22 -0
- package/dist/spacer.js +5 -0
- package/dist/spacer.js.map +1 -0
- package/dist/split-button.d.ts +69 -0
- package/dist/split-button.js +7 -0
- package/dist/split-button.js.map +1 -0
- package/dist/split-middle-De745N2j.d.ts +7 -0
- package/dist/split-view.d.ts +71 -6
- package/dist/split-view.js +18 -15
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +59 -7
- package/dist/state-banner.js +4 -1
- package/dist/styles/anchored-surface.css +44 -0
- package/dist/styles/backdrop-image.css +330 -0
- package/dist/styles/badge.css +227 -0
- package/dist/styles/button.css +396 -0
- package/dist/styles/catalog/components/catalog-example-stack.css +14 -0
- package/dist/styles/catalog/components/catalog-example.css +250 -0
- package/dist/styles/catalog/components/catalog-stage.css +61 -0
- package/dist/styles/catalog/components/catalog.css +26 -0
- package/dist/styles/catalog.css +5 -522
- package/dist/styles/checkbox-group.css +63 -0
- package/dist/styles/checkbox.css +122 -0
- package/dist/styles/chip.css +234 -0
- package/dist/styles/choice-chips.css +264 -0
- package/dist/styles/collapsible-panel.css +459 -16
- package/dist/styles/color-field.css +125 -0
- package/dist/styles/color-picker.css +366 -0
- package/dist/styles/color-swatches.css +122 -0
- package/dist/styles/column-explorer.css +6 -0
- package/dist/styles/column-track.css +62 -0
- package/dist/styles/combobox.css +115 -0
- package/dist/styles/components/actions/button/button.css +396 -0
- package/dist/styles/components/actions/floating-toolbar/floating-toolbar.css +119 -0
- package/dist/styles/components/actions/popup-menu/popup-menu.css +651 -0
- package/dist/styles/components/actions/split-button/split-button.css +141 -0
- package/dist/styles/components/actions/toolbar/toolbar.css +524 -0
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +1041 -0
- package/dist/styles/components/actions/toolbar-text/toolbar-text.css +256 -0
- package/dist/styles/components/collections/column-explorer/column-explorer.css +6 -0
- package/dist/styles/components/collections/framed-list/framed-list.css +57 -0
- package/dist/styles/components/collections/list/list.css +301 -0
- package/dist/styles/components/collections/list-action-row/list-action-row.css +470 -0
- package/dist/styles/components/collections/list-header/list-header.css +272 -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 +532 -0
- package/dist/styles/components/collections/summary-row/summary-row.css +198 -0
- package/dist/styles/components/collections/tree-list/tree-list.css +8 -0
- package/dist/styles/components/data-display/value-preview/value-preview.css +18 -0
- package/dist/styles/components/data-display/value-table/value-table.css +184 -0
- package/dist/styles/components/feedback/anchored-surface/anchored-surface.css +44 -0
- package/dist/styles/components/feedback/badge/badge.css +227 -0
- package/dist/styles/components/feedback/chip/chip.css +234 -0
- package/dist/styles/components/feedback/corner-status/corner-status.css +60 -0
- package/dist/styles/components/feedback/edge-activity-indicator/edge-activity-indicator.css +127 -0
- package/dist/styles/components/feedback/empty-state/empty-state.css +47 -0
- package/dist/styles/components/feedback/gauge/gauge.css +132 -0
- package/dist/styles/components/feedback/loading-spinner/loading-spinner.css +25 -0
- package/dist/styles/components/feedback/progress-bar/progress-bar.css +168 -0
- package/dist/styles/components/feedback/progress-ring/progress-ring.css +91 -0
- package/dist/styles/components/feedback/skeleton/skeleton.css +92 -0
- package/dist/styles/components/feedback/state-banner/state-banner.css +317 -0
- package/dist/styles/components/forms/checkbox/checkbox.css +122 -0
- package/dist/styles/components/forms/checkbox-group/checkbox-group.css +63 -0
- package/dist/styles/components/forms/choice-chips/choice-chips.css +264 -0
- package/dist/styles/components/forms/color-field/color-field.css +125 -0
- package/dist/styles/components/forms/color-picker/color-picker.css +366 -0
- package/dist/styles/components/forms/color-swatches/color-swatches.css +122 -0
- package/dist/styles/components/forms/combobox/combobox.css +115 -0
- package/dist/styles/components/forms/file-picker/file-picker.css +92 -0
- package/dist/styles/components/forms/form/form.css +6 -0
- package/dist/styles/components/forms/message-composer/message-composer.css +84 -0
- package/dist/styles/components/forms/radio-group/radio-group.css +269 -0
- package/dist/styles/components/forms/search-field/search-field.css +539 -0
- package/dist/styles/components/forms/segmented-control/segmented-control.css +212 -0
- package/dist/styles/components/forms/select/select.css +663 -0
- package/dist/styles/components/forms/slider/slider.css +241 -0
- package/dist/styles/components/forms/switch/switch.css +132 -0
- package/dist/styles/components/forms/tag-field/tag-field.css +8 -0
- package/dist/styles/components/forms/text-field/text-field.css +237 -0
- package/dist/styles/components/layout/collapsible-panel/collapsible-panel.css +589 -0
- package/dist/styles/components/layout/column-track/column-track.css +62 -0
- package/dist/styles/components/layout/content-swap/content-swap.css +154 -0
- package/dist/styles/components/layout/grid/grid.css +88 -0
- package/dist/styles/components/layout/pane/pane.css +796 -0
- package/dist/styles/components/layout/resizable-region/resizable-region.css +536 -0
- package/dist/styles/components/layout/row/row.css +125 -0
- package/dist/styles/components/layout/sized-region/sized-region.css +22 -0
- package/dist/styles/components/layout/spacer/spacer.css +11 -0
- package/dist/styles/components/layout/split-view/split-view.css +157 -0
- package/dist/styles/components/layout/workbench/workbench.css +1077 -0
- package/dist/styles/components/media/lucide-icon/lucide-icon.css +15 -0
- package/dist/styles/components/navigation/disclosure-arrow/disclosure-arrow.css +43 -0
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +617 -0
- package/dist/styles/components/navigation/paged-view/paged-view.css +160 -0
- package/dist/styles/components/navigation/tab-bar/tab-bar.css +210 -0
- package/dist/styles/components/navigation/tab-bar-item/tab-bar-item.css +480 -0
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +461 -0
- package/dist/styles/components/navigation/tab-panel/tab-panel.css +7 -0
- package/dist/styles/components/surfaces/backdrop-image/backdrop-image.css +208 -0
- package/dist/styles/components/surfaces/content-item/content-item.css +220 -0
- package/dist/styles/components/surfaces/disclosure/disclosure.css +136 -0
- package/dist/styles/components/surfaces/editor-frame/editor-frame.css +128 -0
- package/dist/styles/components/surfaces/scroll-effect/scroll-effect.css +121 -0
- package/dist/styles/components/surfaces/sunken-panel/sunken-panel.css +34 -0
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +1132 -0
- package/dist/styles/components/typography/text/text.css +270 -0
- package/dist/styles/content-item.css +551 -0
- package/dist/styles/content-swap.css +154 -0
- package/dist/styles/corner-status.css +60 -0
- package/dist/styles/disclosure-arrow.css +20 -0
- package/dist/styles/disclosure.css +136 -0
- package/dist/styles/document.css +102 -0
- package/dist/styles/edge-activity-indicator.css +127 -0
- package/dist/styles/editor/editor.css +585 -0
- package/dist/styles/editor-frame.css +128 -0
- package/dist/styles/editor.css +4 -0
- package/dist/styles/file-picker.css +92 -0
- package/dist/styles/floating-toolbar.css +87 -6
- package/dist/styles/form.css +6 -0
- package/dist/styles/foundation.css +550 -51
- package/dist/styles/framed-list.css +57 -0
- package/dist/styles/gauge.css +132 -0
- package/dist/styles/grid.css +88 -0
- package/dist/styles/layout.css +3 -41
- package/dist/styles/list-action-row.css +328 -18
- package/dist/styles/list-detail-dialog.css +11 -0
- package/dist/styles/list-header.css +172 -60
- package/dist/styles/list-inset-control.css +25 -2
- package/dist/styles/list-inset-text.css +27 -3
- package/dist/styles/list-item.css +443 -34
- package/dist/styles/list.css +301 -0
- package/dist/styles/loading-spinner.css +4 -0
- package/dist/styles/lucide-icon.css +9 -0
- package/dist/styles/message-composer.css +84 -0
- package/dist/styles/nav-stack.css +553 -47
- package/dist/styles/overlay-sheet.css +211 -0
- package/dist/styles/overlay-toast.css +149 -0
- package/dist/styles/overlay-tooltip.css +55 -0
- package/dist/styles/paged-view.css +160 -0
- package/dist/styles/pane.css +796 -0
- package/dist/styles/popup-menu.css +651 -0
- package/dist/styles/progress-bar.css +168 -0
- package/dist/styles/progress-ring.css +91 -0
- package/dist/styles/radio-group.css +269 -0
- package/dist/styles/resizable-region.css +429 -4
- package/dist/styles/row.css +125 -0
- package/dist/styles/scroll-effect.css +121 -0
- package/dist/styles/search-field.css +539 -0
- package/dist/styles/segmented-control.css +53 -10
- package/dist/styles/select.css +599 -74
- package/dist/styles/sized-region.css +22 -0
- package/dist/styles/skeleton.css +64 -3
- package/dist/styles/slider.css +241 -0
- package/dist/styles/spacer.css +11 -0
- package/dist/styles/split-button.css +141 -0
- package/dist/styles/split-view.css +125 -3
- package/dist/styles/state-banner.css +169 -25
- package/dist/styles/styles.css +52 -3
- package/dist/styles/summary-row.css +198 -0
- package/dist/styles/sunken-panel.css +34 -0
- package/dist/styles/surface-scaffold.css +1132 -0
- package/dist/styles/switch.css +132 -0
- package/dist/styles/tab-bar-item.css +480 -0
- package/dist/styles/tab-bar.css +174 -9
- package/dist/styles/tab-navigator.css +461 -0
- package/dist/styles/tab-panel.css +7 -0
- package/dist/styles/tag-field.css +8 -0
- package/dist/styles/text-field.css +237 -0
- package/dist/styles/text.css +270 -0
- package/dist/styles/toolbar-control-group.css +894 -78
- package/dist/styles/toolbar-text.css +223 -7
- package/dist/styles/toolbar.css +474 -11
- package/dist/styles/tree-list.css +8 -0
- package/dist/styles/value-preview.css +18 -0
- package/dist/styles/value-table.css +116 -7
- package/dist/styles/webawesome.css +823 -24
- package/dist/styles/workbench-dialog.css +10 -0
- package/dist/styles/workbench.css +990 -7
- package/dist/summary-row.d.ts +73 -0
- package/dist/summary-row.js +5 -0
- package/dist/summary-row.js.map +1 -0
- package/dist/sunken-panel.d.ts +42 -0
- package/dist/sunken-panel.js +5 -0
- package/dist/sunken-panel.js.map +1 -0
- package/dist/surface-scaffold-register.d.ts +12 -0
- package/dist/surface-scaffold-register.js +11 -0
- package/dist/surface-scaffold-register.js.map +1 -0
- package/dist/surface-scaffold.d.ts +283 -0
- package/dist/surface-scaffold.js +10 -0
- package/dist/surface-scaffold.js.map +1 -0
- package/dist/surface-tint-DQgYCaP9.d.ts +25 -0
- package/dist/switch.d.ts +38 -0
- package/dist/switch.js +4 -0
- package/dist/switch.js.map +1 -0
- package/dist/tab-bar-item.d.ts +100 -0
- package/dist/tab-bar-item.js +7 -0
- package/dist/tab-bar-item.js.map +1 -0
- package/dist/tab-bar.d.ts +46 -7
- package/dist/tab-bar.js +2 -1
- package/dist/tab-navigator.d.ts +177 -0
- package/dist/tab-navigator.js +155 -0
- package/dist/tab-navigator.js.map +1 -0
- package/dist/tab-panel.d.ts +35 -0
- package/dist/tab-panel.js +4 -0
- package/dist/tab-panel.js.map +1 -0
- package/dist/tag-field.d.ts +56 -0
- package/dist/tag-field.js +7 -0
- package/dist/tag-field.js.map +1 -0
- package/dist/text-field.d.ts +119 -0
- package/dist/text-field.js +6 -0
- package/dist/text-field.js.map +1 -0
- package/dist/text.d.ts +136 -0
- package/dist/text.js +5 -0
- package/dist/text.js.map +1 -0
- package/dist/toolbar-control-group.d.ts +201 -8
- package/dist/toolbar-control-group.js +6 -1
- package/dist/toolbar-text.d.ts +71 -9
- package/dist/toolbar-text.js +3 -1
- package/dist/toolbar.d.ts +88 -7
- package/dist/toolbar.js +2 -1
- package/dist/tree-list.d.ts +48 -0
- package/dist/tree-list.js +12 -0
- package/dist/tree-list.js.map +1 -0
- package/dist/tree-rows-Bms5QJvG.d.ts +68 -0
- package/dist/types-DmHWkSd6.d.ts +207 -0
- package/dist/value-preview.d.ts +25 -0
- package/dist/value-preview.js +4 -0
- package/dist/value-preview.js.map +1 -0
- package/dist/value-table.d.ts +37 -4
- package/dist/value-table.js +3 -1
- package/dist/view-runtime.d.ts +9 -0
- package/dist/view-runtime.js +8 -0
- package/dist/view-runtime.js.map +1 -0
- package/dist/webawesome.d.ts +11 -1
- package/dist/wire-catalog.d.ts +119 -5
- package/dist/wire-catalog.js +316 -14
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-checkboxes.d.ts +10 -0
- package/dist/wire-checkboxes.js +4 -0
- package/dist/{wire-token-search-fields.js.map → wire-checkboxes.js.map} +1 -1
- package/dist/wire-choice-chips.d.ts +19 -0
- package/dist/wire-choice-chips.js +5 -0
- package/dist/wire-choice-chips.js.map +1 -0
- package/dist/wire-color-fields.d.ts +33 -0
- package/dist/wire-color-fields.js +12 -0
- package/dist/wire-color-fields.js.map +1 -0
- package/dist/wire-color-pickers.d.ts +35 -0
- package/dist/wire-color-pickers.js +10 -0
- package/dist/wire-color-pickers.js.map +1 -0
- package/dist/wire-column-explorer.d.ts +13 -0
- package/dist/wire-column-explorer.js +3 -0
- package/dist/wire-column-explorer.js.map +1 -0
- package/dist/wire-column-tracks.d.ts +13 -0
- package/dist/wire-column-tracks.js +4 -0
- package/dist/wire-column-tracks.js.map +1 -0
- package/dist/wire-comboboxes.d.ts +28 -0
- package/dist/wire-comboboxes.js +5 -0
- package/dist/wire-comboboxes.js.map +1 -0
- package/dist/wire-content-items.d.ts +24 -0
- package/dist/wire-content-items.js +5 -0
- package/dist/wire-content-items.js.map +1 -0
- package/dist/wire-corner-status.d.ts +11 -0
- package/dist/wire-corner-status.js +4 -0
- package/dist/wire-corner-status.js.map +1 -0
- package/dist/wire-file-pickers.d.ts +27 -0
- package/dist/wire-file-pickers.js +3 -0
- package/dist/wire-file-pickers.js.map +1 -0
- package/dist/wire-forms.d.ts +14 -0
- package/dist/wire-forms.js +3 -0
- package/dist/wire-forms.js.map +1 -0
- package/dist/wire-list-focus-scroll.d.ts +16 -0
- package/dist/wire-list-focus-scroll.js +3 -0
- package/dist/wire-list-focus-scroll.js.map +1 -0
- package/dist/wire-list-reorder.d.ts +41 -0
- package/dist/wire-list-reorder.js +3 -0
- package/dist/wire-list-reorder.js.map +1 -0
- package/dist/wire-message-composers.d.ts +17 -0
- package/dist/wire-message-composers.js +3 -0
- package/dist/wire-message-composers.js.map +1 -0
- package/dist/wire-nav-stack.d.ts +4 -1
- package/dist/wire-nav-stack.js +1 -85
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-overlay-sheets.d.ts +20 -0
- package/dist/wire-overlay-sheets.js +5 -0
- package/dist/wire-overlay-sheets.js.map +1 -0
- package/dist/wire-paged-views.d.ts +27 -0
- package/dist/wire-paged-views.js +186 -0
- package/dist/wire-paged-views.js.map +1 -0
- package/dist/wire-pane-chrome.d.ts +21 -0
- package/dist/wire-pane-chrome.js +67 -0
- package/dist/wire-pane-chrome.js.map +1 -0
- package/dist/wire-resizable-regions.d.ts +2 -1
- package/dist/wire-resizable-regions.js +4 -1
- package/dist/wire-scroll-dividers.d.ts +87 -0
- package/dist/wire-scroll-dividers.js +3 -0
- package/dist/wire-scroll-dividers.js.map +1 -0
- package/dist/{wire-token-search-fields.d.ts → wire-search-fields.d.ts} +35 -25
- package/dist/wire-search-fields.js +8 -0
- package/dist/wire-search-fields.js.map +1 -0
- package/dist/wire-sidebar.d.ts +24 -4
- package/dist/wire-sidebar.js +1 -114
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-sliders.d.ts +12 -0
- package/dist/wire-sliders.js +3 -0
- package/dist/wire-sliders.js.map +1 -0
- package/dist/wire-summary-rows.d.ts +18 -0
- package/dist/wire-summary-rows.js +4 -0
- package/dist/wire-summary-rows.js.map +1 -0
- package/dist/wire-tab-bars.d.ts +57 -3
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-navigator.d.ts +13 -0
- package/dist/wire-tab-navigator.js +4 -0
- package/dist/wire-tab-navigator.js.map +1 -0
- package/dist/wire-tag-fields.d.ts +41 -0
- package/dist/wire-tag-fields.js +10 -0
- package/dist/wire-tag-fields.js.map +1 -0
- package/dist/wire-text-fields.d.ts +12 -0
- package/dist/wire-text-fields.js +3 -0
- package/dist/wire-text-fields.js.map +1 -0
- 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-tree-list.d.ts +53 -0
- package/dist/wire-tree-list.js +3 -0
- package/dist/wire-tree-list.js.map +1 -0
- package/dist/wire-workbench.d.ts +132 -0
- package/dist/wire-workbench.js +8 -0
- package/dist/wire-workbench.js.map +1 -0
- package/dist/workbench-dialog.d.ts +114 -0
- package/dist/workbench-dialog.js +133 -0
- package/dist/workbench-dialog.js.map +1 -0
- package/dist/workbench.d.ts +271 -10
- package/dist/workbench.js +25 -15
- package/dist/workbench.js.map +1 -1
- package/docs/accessibility.md +899 -41
- package/docs/anchored-surface.md +107 -0
- package/docs/app-layouts.md +270 -11
- package/docs/apple-hig.md +2 -0
- package/docs/backdrop-image.md +142 -0
- package/docs/button.md +43 -0
- package/docs/catalog.md +599 -63
- package/docs/collapsible-panel.md +308 -25
- package/docs/color-field.md +65 -0
- package/docs/color-picker.md +102 -0
- package/docs/color-swatches.md +46 -0
- package/docs/column-explorer.md +79 -0
- package/docs/component-contract.md +980 -61
- package/docs/component-integration.md +79 -0
- package/docs/component-selection.md +1199 -110
- package/docs/dark-mode-checklist.md +15 -0
- package/docs/data-tables-and-lists.md +18 -0
- package/docs/design/sketch/Kerf-UI.sketch +0 -0
- package/docs/design/sketch/README.md +73 -0
- package/docs/design/sketch/advanced/README.md +75 -0
- package/docs/design/sketch/button/README.md +270 -0
- package/docs/design/sketch/content/README.md +70 -0
- package/docs/design/sketch/coverage.md +162 -0
- package/docs/design/sketch/forms/README.md +98 -0
- package/docs/design/sketch/lists/README.md +65 -0
- package/docs/design/sketch/toolbar/README.md +73 -0
- package/docs/design/sketch/unified/README.md +69 -0
- package/docs/design/sketch/unified/pages/advanced.png +0 -0
- package/docs/design/sketch/unified/pages/button.png +0 -0
- package/docs/design/sketch/unified/pages/content.png +0 -0
- package/docs/design/sketch/unified/pages/forms.png +0 -0
- package/docs/design/sketch/unified/pages/lists.png +0 -0
- package/docs/design/sketch/unified/pages/toolbar.png +0 -0
- package/docs/design/sketch-runner.md +87 -0
- package/docs/design/templates/button/emphasis-dark.svg +1 -0
- package/docs/design/templates/button/emphasis.svg +1 -0
- package/docs/design/templates/button/full-width-dark.svg +1 -0
- package/docs/design/templates/button/full-width.svg +1 -0
- package/docs/design/templates/button/icons-dark.svg +1 -0
- package/docs/design/templates/button/icons.svg +1 -0
- package/docs/design/templates/button/pill-dark.svg +1 -0
- package/docs/design/templates/button/pill.svg +1 -0
- package/docs/design/templates/button/states-dark.svg +1 -0
- package/docs/design/templates/button/states.svg +1 -0
- package/docs/design/templates/button/toggles-dark.svg +1 -0
- package/docs/design/templates/button/toggles.svg +1 -0
- package/docs/design/templates/button/tones-dark.svg +1 -0
- package/docs/design/templates/button/tones.svg +1 -0
- package/docs/design/templates/button-dark.svg +1 -0
- package/docs/design/templates/button.svg +1 -0
- package/docs/design/templates/checkbox/compact-dark.svg +1 -0
- package/docs/design/templates/checkbox/compact.svg +1 -0
- package/docs/design/templates/checkbox/error-dark.svg +1 -0
- package/docs/design/templates/checkbox/error.svg +1 -0
- package/docs/design/templates/checkbox/mixed-dark.svg +1 -0
- package/docs/design/templates/checkbox/mixed.svg +1 -0
- package/docs/design/templates/checkbox/states-dark.svg +1 -0
- package/docs/design/templates/checkbox/states.svg +1 -0
- package/docs/design/templates/checkbox-dark.svg +1 -0
- package/docs/design/templates/checkbox-group/horizontal-dark.svg +1 -0
- package/docs/design/templates/checkbox-group/horizontal.svg +1 -0
- package/docs/design/templates/checkbox-group/vertical-dark.svg +1 -0
- package/docs/design/templates/checkbox-group/vertical.svg +1 -0
- package/docs/design/templates/checkbox-group-dark.svg +1 -0
- package/docs/design/templates/checkbox-group.svg +1 -0
- package/docs/design/templates/checkbox.svg +1 -0
- package/docs/design/templates/chip/action-filters-dark.svg +1 -0
- package/docs/design/templates/chip/action-filters.svg +1 -0
- package/docs/design/templates/chip/tags-dark.svg +1 -0
- package/docs/design/templates/chip/tags.svg +1 -0
- package/docs/design/templates/chip-dark.svg +1 -0
- package/docs/design/templates/chip.svg +1 -0
- package/docs/design/templates/choice-chips/color-palette-dark.svg +1 -0
- package/docs/design/templates/choice-chips/color-palette.svg +1 -0
- package/docs/design/templates/choice-chips/compact-icons-dark.svg +1 -0
- package/docs/design/templates/choice-chips/compact-icons.svg +1 -0
- package/docs/design/templates/choice-chips/multiple-dark.svg +1 -0
- package/docs/design/templates/choice-chips/multiple.svg +1 -0
- package/docs/design/templates/choice-chips-dark.svg +1 -0
- package/docs/design/templates/choice-chips.svg +1 -0
- package/docs/design/templates/color-field/compact-dark.svg +1 -0
- package/docs/design/templates/color-field/compact.svg +1 -0
- package/docs/design/templates/color-field/error-dark.svg +1 -0
- package/docs/design/templates/color-field/error.svg +1 -0
- package/docs/design/templates/color-field/hint-dark.svg +1 -0
- package/docs/design/templates/color-field/hint.svg +1 -0
- package/docs/design/templates/color-field-dark.svg +1 -0
- package/docs/design/templates/color-field.svg +1 -0
- package/docs/design/templates/color-picker/gray-dark.svg +1 -0
- package/docs/design/templates/color-picker/gray.svg +1 -0
- package/docs/design/templates/color-picker/hsb-dark.svg +1 -0
- package/docs/design/templates/color-picker/hsb.svg +1 -0
- package/docs/design/templates/color-picker/rgb-dark.svg +1 -0
- package/docs/design/templates/color-picker/rgb.svg +1 -0
- package/docs/design/templates/color-picker-dark.svg +1 -0
- package/docs/design/templates/color-picker.svg +1 -0
- package/docs/design/templates/color-swatches/palette-dark.svg +1 -0
- package/docs/design/templates/color-swatches/palette.svg +1 -0
- package/docs/design/templates/color-swatches-dark.svg +1 -0
- package/docs/design/templates/color-swatches.svg +1 -0
- package/docs/design/templates/disclosure/embedded-dark.svg +1 -0
- package/docs/design/templates/disclosure/embedded.svg +1 -0
- package/docs/design/templates/disclosure/framed-sunken-dark.svg +1 -0
- package/docs/design/templates/disclosure/framed-sunken.svg +1 -0
- package/docs/design/templates/disclosure/plain-dark.svg +1 -0
- package/docs/design/templates/disclosure/plain.svg +1 -0
- package/docs/design/templates/disclosure-dark.svg +1 -0
- package/docs/design/templates/disclosure.svg +1 -0
- package/docs/design/templates/empty-state/filtered-dark.svg +1 -1
- package/docs/design/templates/empty-state/filtered.svg +1 -1
- package/docs/design/templates/empty-state/with-action-dark.svg +1 -1
- package/docs/design/templates/empty-state/with-action.svg +1 -1
- package/docs/design/templates/empty-state-dark.svg +1 -7
- package/docs/design/templates/empty-state.svg +1 -7
- package/docs/design/templates/gauge/bare-dark.svg +1 -0
- package/docs/design/templates/gauge/bare.svg +1 -0
- package/docs/design/templates/gauge/full-dark.svg +1 -0
- package/docs/design/templates/gauge/full.svg +1 -0
- package/docs/design/templates/gauge-dark.svg +1 -0
- package/docs/design/templates/gauge.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 -1
- package/docs/design/templates/list-action-row/default.svg +1 -1
- package/docs/design/templates/list-action-row/icon-tile-dark.svg +1 -0
- package/docs/design/templates/list-action-row/icon-tile.svg +1 -0
- package/docs/design/templates/list-action-row/selected-dark.svg +1 -1
- package/docs/design/templates/list-action-row/selected.svg +1 -1
- package/docs/design/templates/list-action-row/trailing-menu-dark.svg +1 -0
- package/docs/design/templates/list-action-row/trailing-menu.svg +1 -0
- package/docs/design/templates/list-action-row-dark.svg +1 -7
- package/docs/design/templates/list-action-row.svg +1 -7
- package/docs/design/templates/list-dark.svg +1 -0
- package/docs/design/templates/list-header/action-dark.svg +1 -1
- package/docs/design/templates/list-header/action.svg +1 -1
- package/docs/design/templates/list-header/count-dark.svg +1 -1
- package/docs/design/templates/list-header/count.svg +1 -1
- 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 -1
- package/docs/design/templates/list-header/toggle-collapsed.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded.svg +1 -1
- package/docs/design/templates/list-header-dark.svg +1 -11
- package/docs/design/templates/list-header.svg +1 -11
- package/docs/design/templates/list-item/default-dark.svg +1 -1
- package/docs/design/templates/list-item/default.svg +1 -1
- package/docs/design/templates/list-item/icon-tile-dark.svg +1 -0
- package/docs/design/templates/list-item/icon-tile.svg +1 -0
- package/docs/design/templates/list-item/multiline-dark.svg +1 -1
- package/docs/design/templates/list-item/multiline.svg +1 -1
- package/docs/design/templates/list-item/selected-dark.svg +1 -1
- package/docs/design/templates/list-item/selected.svg +1 -1
- package/docs/design/templates/list-item/trailing-dark.svg +1 -1
- package/docs/design/templates/list-item/trailing.svg +1 -1
- package/docs/design/templates/list-item-dark.svg +1 -11
- package/docs/design/templates/list-item.svg +1 -11
- package/docs/design/templates/list.svg +1 -0
- package/docs/design/templates/message-composer/chat-dark.svg +1 -0
- package/docs/design/templates/message-composer/chat.svg +1 -0
- package/docs/design/templates/message-composer/prompt-dark.svg +1 -0
- package/docs/design/templates/message-composer/prompt.svg +1 -0
- package/docs/design/templates/message-composer-dark.svg +1 -0
- package/docs/design/templates/message-composer.svg +1 -0
- package/docs/design/templates/progress-bar/determinate-dark.svg +1 -0
- package/docs/design/templates/progress-bar/determinate.svg +1 -0
- package/docs/design/templates/progress-bar/tones-dark.svg +1 -0
- package/docs/design/templates/progress-bar/tones.svg +1 -0
- package/docs/design/templates/progress-bar-dark.svg +1 -0
- package/docs/design/templates/progress-bar.svg +1 -0
- package/docs/design/templates/progress-ring/sizes-dark.svg +1 -0
- package/docs/design/templates/progress-ring/sizes.svg +1 -0
- package/docs/design/templates/progress-ring/tones-dark.svg +1 -0
- package/docs/design/templates/progress-ring/tones.svg +1 -0
- package/docs/design/templates/progress-ring-dark.svg +1 -0
- package/docs/design/templates/progress-ring.svg +1 -0
- package/docs/design/templates/radio-group/horizontal-dark.svg +1 -0
- package/docs/design/templates/radio-group/horizontal.svg +1 -0
- package/docs/design/templates/radio-group/tiles-dark.svg +1 -0
- package/docs/design/templates/radio-group/tiles.svg +1 -0
- package/docs/design/templates/radio-group/vertical-dark.svg +1 -0
- package/docs/design/templates/radio-group/vertical.svg +1 -0
- package/docs/design/templates/radio-group-dark.svg +1 -0
- package/docs/design/templates/radio-group.svg +1 -0
- package/docs/design/templates/search-field/empty-dark.svg +1 -0
- package/docs/design/templates/search-field/empty.svg +1 -0
- package/docs/design/templates/search-field/tokens-dark.svg +1 -0
- package/docs/design/templates/search-field/tokens.svg +1 -0
- package/docs/design/templates/search-field-dark.svg +1 -0
- package/docs/design/templates/search-field.svg +1 -0
- package/docs/design/templates/segmented-control/equal-dark.svg +1 -1
- package/docs/design/templates/segmented-control/equal.svg +1 -1
- package/docs/design/templates/segmented-control/pill-small-dark.svg +1 -1
- package/docs/design/templates/segmented-control/pill-small.svg +1 -1
- package/docs/design/templates/segmented-control-dark.svg +1 -7
- package/docs/design/templates/segmented-control.svg +1 -7
- package/docs/design/templates/select/compact-dark.svg +1 -0
- package/docs/design/templates/select/compact.svg +1 -0
- package/docs/design/templates/select/form-dark.svg +1 -0
- package/docs/design/templates/select/form.svg +1 -0
- package/docs/design/templates/select/icons-dark.svg +1 -0
- package/docs/design/templates/select/icons.svg +1 -0
- package/docs/design/templates/select-dark.svg +1 -0
- package/docs/design/templates/select.svg +1 -0
- package/docs/design/templates/skeleton-dark.svg +1 -9
- package/docs/design/templates/skeleton.svg +1 -9
- package/docs/design/templates/slider/compact-dark.svg +1 -0
- package/docs/design/templates/slider/compact.svg +1 -0
- package/docs/design/templates/slider/readout-dark.svg +1 -0
- package/docs/design/templates/slider/readout.svg +1 -0
- package/docs/design/templates/slider/ticks-dark.svg +1 -0
- package/docs/design/templates/slider/ticks.svg +1 -0
- package/docs/design/templates/slider-dark.svg +1 -0
- package/docs/design/templates/slider.svg +1 -0
- package/docs/design/templates/split-button/full-width-dark.svg +1 -0
- package/docs/design/templates/split-button/full-width.svg +1 -0
- package/docs/design/templates/split-button/pill-dark.svg +1 -0
- package/docs/design/templates/split-button/pill.svg +1 -0
- package/docs/design/templates/split-button/states-dark.svg +1 -0
- package/docs/design/templates/split-button/states.svg +1 -0
- package/docs/design/templates/split-button/tones-dark.svg +1 -0
- package/docs/design/templates/split-button/tones.svg +1 -0
- package/docs/design/templates/split-button-dark.svg +1 -0
- package/docs/design/templates/split-button.svg +1 -0
- package/docs/design/templates/state-banner/danger-dark.svg +1 -1
- package/docs/design/templates/state-banner/danger.svg +1 -1
- 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 -1
- package/docs/design/templates/state-banner/info.svg +1 -1
- package/docs/design/templates/state-banner/strip-dark.svg +1 -0
- package/docs/design/templates/state-banner/strip.svg +1 -0
- package/docs/design/templates/state-banner/success-dark.svg +1 -1
- package/docs/design/templates/state-banner/success.svg +1 -1
- package/docs/design/templates/state-banner/warning-dark.svg +1 -1
- package/docs/design/templates/state-banner/warning.svg +1 -1
- package/docs/design/templates/state-banner-dark.svg +1 -11
- package/docs/design/templates/state-banner.svg +1 -11
- package/docs/design/templates/switch/compact-dark.svg +1 -0
- package/docs/design/templates/switch/compact.svg +1 -0
- package/docs/design/templates/switch/states-dark.svg +1 -0
- package/docs/design/templates/switch/states.svg +1 -0
- package/docs/design/templates/switch-dark.svg +1 -0
- package/docs/design/templates/switch.svg +1 -0
- package/docs/design/templates/tab-bar/workspace-tabs-dark.svg +1 -1
- package/docs/design/templates/tab-bar/workspace-tabs.svg +1 -1
- package/docs/design/templates/tab-bar-dark.svg +1 -5
- package/docs/design/templates/tab-bar.svg +1 -5
- package/docs/design/templates/tag-field/error-dark.svg +1 -0
- package/docs/design/templates/tag-field/error.svg +1 -0
- package/docs/design/templates/tag-field/tags-dark.svg +1 -0
- package/docs/design/templates/tag-field/tags.svg +1 -0
- package/docs/design/templates/tag-field-dark.svg +1 -0
- package/docs/design/templates/tag-field.svg +1 -0
- package/docs/design/templates/text-field/compact-dark.svg +1 -0
- package/docs/design/templates/text-field/compact.svg +1 -0
- package/docs/design/templates/text-field/error-dark.svg +1 -0
- package/docs/design/templates/text-field/error.svg +1 -0
- package/docs/design/templates/text-field/labeled-dark.svg +1 -0
- package/docs/design/templates/text-field/labeled.svg +1 -0
- package/docs/design/templates/text-field/multiline-dark.svg +1 -0
- package/docs/design/templates/text-field/multiline.svg +1 -0
- package/docs/design/templates/text-field/number-dark.svg +1 -0
- package/docs/design/templates/text-field/number.svg +1 -0
- package/docs/design/templates/text-field/search-dark.svg +1 -0
- package/docs/design/templates/text-field/search.svg +1 -0
- package/docs/design/templates/text-field-dark.svg +1 -0
- package/docs/design/templates/text-field.svg +1 -0
- package/docs/design/templates/toolbar/title-and-actions-dark.svg +1 -1
- package/docs/design/templates/toolbar/title-and-actions.svg +1 -1
- 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 -1
- package/docs/design/templates/toolbar-control-group/borderless-single.svg +1 -1
- package/docs/design/templates/toolbar-control-group/glass-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/glass.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-buttons-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-buttons.svg +1 -1
- 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 -1
- package/docs/design/templates/toolbar-control-group/push-buttons.svg +1 -1
- package/docs/design/templates/toolbar-control-group/with-text-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/with-text.svg +1 -1
- package/docs/design/templates/toolbar-control-group-dark.svg +1 -11
- package/docs/design/templates/toolbar-control-group.svg +1 -11
- package/docs/design/templates/toolbar-dark.svg +1 -5
- 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 -1
- package/docs/design/templates/toolbar-text/default.svg +1 -1
- package/docs/design/templates/toolbar-text/large-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/large.svg +1 -1
- package/docs/design/templates/toolbar-text/small-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/small.svg +1 -1
- package/docs/design/templates/toolbar-text-dark.svg +1 -9
- package/docs/design/templates/toolbar-text.svg +1 -9
- package/docs/design/templates/toolbar.svg +1 -5
- package/docs/design/templates/tree-list/files-dark.svg +1 -0
- package/docs/design/templates/tree-list/files.svg +1 -0
- package/docs/design/templates/tree-list/outline-dark.svg +1 -0
- package/docs/design/templates/tree-list/outline.svg +1 -0
- package/docs/design/templates/tree-list-dark.svg +1 -0
- package/docs/design/templates/tree-list.svg +1 -0
- package/docs/design/templates/value-table/details-dark.svg +1 -1
- package/docs/design/templates/value-table/details.svg +1 -1
- package/docs/design/templates/value-table-dark.svg +1 -5
- package/docs/design/templates/value-table.svg +1 -5
- package/docs/design/templates.md +102 -36
- package/docs/design-philosophy.md +69 -20
- package/docs/device-class.md +10 -9
- package/docs/disclosure.md +97 -0
- package/docs/document-baseline.md +101 -0
- package/docs/editor-frame.md +47 -0
- package/docs/editor-host.md +397 -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/forms-and-validation.md +50 -0
- package/docs/gauge.md +55 -0
- package/docs/interaction-conventions.md +55 -0
- package/docs/investigations/content-item-media-scroll-performance.md +46 -0
- package/docs/layout.md +1075 -53
- package/docs/list-detail-dialog.md +105 -0
- package/docs/manual-test-plan.md +87 -0
- package/docs/message-composer.md +156 -0
- package/docs/nav-stack.md +328 -14
- package/docs/overlay-toast.md +62 -0
- package/docs/overlay-tooltip.md +53 -0
- package/docs/paged-view.md +89 -0
- package/docs/progress.md +63 -0
- package/docs/recipes.md +156 -73
- package/docs/scroll-effect.md +127 -0
- package/docs/slider.md +64 -0
- package/docs/split-view.md +100 -8
- package/docs/sunken-panel.md +106 -0
- package/docs/surface-scaffold.md +677 -0
- package/docs/tab-navigator.md +292 -0
- package/docs/tag-field.md +66 -0
- package/docs/testing-applications.md +25 -0
- package/docs/tree-list.md +144 -0
- package/docs/type-contracts.md +137 -0
- package/docs/ui-analyzer.md +466 -0
- package/docs/ui-doctor.md +370 -0
- package/docs/ui-evaluator.md +176 -0
- package/docs/upgrading.md +14 -0
- package/docs/ux-demo.md +58 -17
- package/docs/value-preview.md +16 -0
- package/docs/view.md +314 -0
- package/docs/webawesome-migration.md +93 -0
- package/docs/webawesome-theme.md +343 -58
- package/docs/workbench-dialog.md +92 -0
- package/docs/workbench.md +658 -12
- package/docs/writing.md +154 -0
- package/doctor/cli.mjs +125 -0
- package/doctor/component-style-checks.mjs +457 -0
- package/doctor/config.schema.json +94 -0
- package/doctor/copy-capitalization-checks.mjs +603 -0
- package/doctor/eslint-diagnostics.d.mts +28 -0
- package/doctor/eslint-diagnostics.mjs +29 -0
- package/doctor/index.d.mts +122 -0
- package/doctor/index.mjs +1648 -0
- package/doctor/project-guidance-checks.d.mts +11 -0
- package/doctor/project-guidance-checks.mjs +97 -0
- package/doctor/report.schema.json +118 -0
- package/evaluator/cli.mjs +95 -0
- package/evaluator/firefox-app-data.d.mts +4 -0
- package/evaluator/firefox-app-data.mjs +35 -0
- package/evaluator/index.d.mts +90 -0
- package/evaluator/index.mjs +1229 -0
- package/evaluator/report.schema.json +152 -0
- package/llms.txt +1166 -57
- package/package.json +613 -49
- package/props/cli.d.mts +1 -0
- package/props/cli.mjs +142 -0
- package/props/component-props.d.mts +180 -0
- package/props/component-props.mjs +1208 -0
- package/scripts/component-catalog-extension-validation.mjs +28 -0
- package/scripts/lib/cli-args.mjs +98 -0
- package/scripts/lib/json-schema-subset.mjs +137 -0
- package/traversal-exclusions.mjs +86 -0
- package/ux-demo/recipes/app-shell.tsx +118 -25
- package/ux-demo/recipes/collapsible-sidebar.tsx +97 -62
- package/ux-demo/recipes/compact-toolbar.tsx +50 -24
- package/ux-demo/recipes/composer-form.tsx +49 -27
- package/ux-demo/recipes/list-detail-dialog.tsx +113 -25
- package/ux-demo/recipes/list-workspace-states.tsx +63 -14
- package/ux-demo/recipes/loaders.ts +11 -3
- package/ux-demo/recipes/loading-inspector.tsx +41 -60
- package/ux-demo/recipes/media-detail.tsx +169 -0
- package/ux-demo/recipes/mount-recipe.ts +28 -11
- package/ux-demo/recipes/navigation-sidebar.tsx +53 -17
- package/ux-demo/recipes/navigation-stack.tsx +48 -29
- package/ux-demo/recipes/types.ts +18 -2
- package/ux-demo/recipes/workspace-header.tsx +23 -6
- package/view/catalog.mjs +229 -0
- package/view/child-kind.mjs +22 -0
- package/view/cli.d.mts +18 -0
- package/view/cli.mjs +316 -0
- package/view/contract.mjs +418 -0
- package/view/css-grammar.mjs +93 -0
- package/view/generate.d.mts +16 -0
- package/view/generate.mjs +739 -0
- package/view/index.d.mts +491 -0
- package/view/index.mjs +36 -0
- package/view/interpret.mjs +339 -0
- package/view/project-types-worker.mjs +55 -0
- package/view/project-types.d.mts +43 -0
- package/view/project-types.mjs +618 -0
- package/view/type-expression.d.mts +15 -0
- package/view/type-expression.mjs +162 -0
- package/view/types.mjs +165 -0
- package/view/validate-move.mjs +353 -0
- package/view/validate.mjs +1649 -0
- package/vite-editor.d.mts +173 -0
- package/vite-editor.mjs +548 -0
- package/vite-ux-review.d.mts +83 -0
- package/vite-ux-review.mjs +120 -0
- package/dist/app-tab.d.ts +0 -30
- package/dist/app-tab.js +0 -5
- package/dist/app-tab.js.map +0 -1
- package/dist/browser/app-tab.js +0 -4
- package/dist/browser/panel-header.js +0 -7
- package/dist/browser/token-search-field.js +0 -4
- 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-5ATCDSQS.js +0 -42
- package/dist/chunk-5ATCDSQS.js.map +0 -1
- package/dist/chunk-5E2HVJ33.js +0 -10
- package/dist/chunk-5E2HVJ33.js.map +0 -1
- package/dist/chunk-7BR3DO2A.js +0 -31
- 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-AVZHJN6C.js +0 -14
- package/dist/chunk-AVZHJN6C.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-CH4SQ6H5.js +0 -39
- package/dist/chunk-CH4SQ6H5.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-LCOBDOCC.js +0 -265
- package/dist/chunk-LCOBDOCC.js.map +0 -1
- package/dist/chunk-M5JRI6MN.js +0 -27
- package/dist/chunk-M5JRI6MN.js.map +0 -1
- package/dist/chunk-RNPGFQ33.js +0 -10
- package/dist/chunk-RNPGFQ33.js.map +0 -1
- package/dist/chunk-RUNWEPR4.js +0 -10
- package/dist/chunk-RUNWEPR4.js.map +0 -1
- package/dist/chunk-VPCTCUED.js +0 -10
- package/dist/chunk-VPCTCUED.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-XE4OX6AZ.js +0 -10
- package/dist/chunk-XE4OX6AZ.js.map +0 -1
- package/dist/chunk-XE5ZLPCC.js +0 -20
- package/dist/chunk-XE5ZLPCC.js.map +0 -1
- package/dist/chunk-XXMOARTH.js +0 -229
- package/dist/chunk-XXMOARTH.js.map +0 -1
- package/dist/chunk-YGN7OMLT.js +0 -57
- 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/app-tab.css +0 -152
- package/dist/styles/panel-header.css +0 -64
- package/dist/styles/tab-scaffold.css +0 -84
- package/dist/styles/token-search-field.css +0 -289
- 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/token-search-field.d.ts +0 -43
- package/dist/token-search-field.js +0 -4
- package/dist/token-search-field.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/dist/wire-token-search-fields.js +0 -5
- package/docs/design/templates/panel-header/icon-actions-dark.svg +0 -1
- package/docs/design/templates/panel-header/icon-actions.svg +0 -1
- package/docs/design/templates/panel-header/icon-summary-actions-dark.svg +0 -1
- package/docs/design/templates/panel-header/icon-summary-actions.svg +0 -1
- package/docs/design/templates/panel-header/no-icon-dark.svg +0 -1
- package/docs/design/templates/panel-header/no-icon.svg +0 -1
- package/docs/design/templates/panel-header/page-heading-dark.svg +0 -1
- package/docs/design/templates/panel-header/page-heading.svg +0 -1
- package/docs/design/templates/panel-header/title-only-dark.svg +0 -1
- package/docs/design/templates/panel-header/title-only.svg +0 -1
- package/docs/design/templates/panel-header-dark.svg +0 -13
- package/docs/design/templates/panel-header.svg +0 -13
- package/docs/design/templates/token-search-field/empty-dark.svg +0 -1
- package/docs/design/templates/token-search-field/empty.svg +0 -1
- package/docs/design/templates/token-search-field/tokens-dark.svg +0 -1
- package/docs/design/templates/token-search-field/tokens.svg +0 -1
- package/docs/design/templates/token-search-field-dark.svg +0 -7
- package/docs/design/templates/token-search-field.svg +0 -7
- package/docs/tab-scaffold.md +0 -41
- package/ux-demo/recipes/recipes.css +0 -448
|
@@ -0,0 +1,1208 @@
|
|
|
1
|
+
// Structured per-component prop schema (ui/ai/component-props.json): reads
|
|
2
|
+
// the published component types with the TypeScript JS API and projects each
|
|
3
|
+
// component's props into a small JSON type grammar that editors, validators,
|
|
4
|
+
// and generated view contracts can consume without parsing TypeScript.
|
|
5
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
6
|
+
import { relative, resolve, sep } from 'node:path';
|
|
7
|
+
|
|
8
|
+
import ts from 'typescript';
|
|
9
|
+
|
|
10
|
+
export const COMPONENT_PROPS_SCHEMA_ID = 'kerf-ui-component-props/v1';
|
|
11
|
+
|
|
12
|
+
// Type aliases that render application content rather than a configured value.
|
|
13
|
+
const CONTENT_ALIASES = new Set([
|
|
14
|
+
'SafeHtml',
|
|
15
|
+
'KerfUiContent',
|
|
16
|
+
'JSXChildren',
|
|
17
|
+
'JSXChild',
|
|
18
|
+
]);
|
|
19
|
+
// css-values brands and token unions; each is authored through a builder or
|
|
20
|
+
// a token name, never a raw string (docs/22-ui-css-authoring.md).
|
|
21
|
+
const CSS_VALUE_ALIAS =
|
|
22
|
+
/^(Css[A-Z]\w*|Ui(Color|ForegroundColor|Gap|GapValue|SpaceName|ColorName|ForegroundColorName))$/;
|
|
23
|
+
// Anonymous object literals inline up to this depth; named ones become
|
|
24
|
+
// shared definitions, so recursion and repetition stay bounded.
|
|
25
|
+
const MAX_INLINE_DEPTH = 5;
|
|
26
|
+
const PRINT_FLAGS =
|
|
27
|
+
ts.TypeFormatFlags.NoTruncation |
|
|
28
|
+
ts.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope;
|
|
29
|
+
|
|
30
|
+
/** Creates a TypeScript program over declaration files. */
|
|
31
|
+
export function createDeclarationProgram(files, options = {}) {
|
|
32
|
+
return ts.createProgram(files, {
|
|
33
|
+
target: ts.ScriptTarget.ES2022,
|
|
34
|
+
module: ts.ModuleKind.ESNext,
|
|
35
|
+
moduleResolution: ts.ModuleResolutionKind.Bundler,
|
|
36
|
+
strict: true,
|
|
37
|
+
skipLibCheck: true,
|
|
38
|
+
types: [],
|
|
39
|
+
...options,
|
|
40
|
+
noEmit: true,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Compiler options from a package's own tsconfig.json (JSX settings, paths),
|
|
46
|
+
* for reading component source files; empty when it has none.
|
|
47
|
+
*/
|
|
48
|
+
function packageCompilerOptions(root) {
|
|
49
|
+
const configPath = ts.findConfigFile(
|
|
50
|
+
root,
|
|
51
|
+
ts.sys.fileExists,
|
|
52
|
+
'tsconfig.json',
|
|
53
|
+
);
|
|
54
|
+
if (!configPath || !configPath.startsWith(root)) return {};
|
|
55
|
+
const parsed = ts.getParsedCommandLineOfConfigFile(
|
|
56
|
+
configPath,
|
|
57
|
+
{},
|
|
58
|
+
{
|
|
59
|
+
...ts.sys,
|
|
60
|
+
onUnRecoverableConfigFileDiagnostic: () => undefined,
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
return parsed?.options ?? {};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** A root-relative ESM import for a source file (`src/x.tsx` → `./src/x.js`). */
|
|
67
|
+
function sourceImport(root, file) {
|
|
68
|
+
const path = relative(root, file).split(sep).join('/');
|
|
69
|
+
return `./${path.replace(/\.(?:tsx?|jsx?|mts|cts)$/, '.js')}`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Extraction state for one program: the checker, the shared `definitions`
|
|
74
|
+
* table, and the directory whose declarations count as the package's own
|
|
75
|
+
* (props declared elsewhere are inherited native attributes).
|
|
76
|
+
*/
|
|
77
|
+
export function createPropsContext(checker, ownDirectory) {
|
|
78
|
+
return {
|
|
79
|
+
checker,
|
|
80
|
+
ownDirectory: ownDirectory.endsWith(sep)
|
|
81
|
+
? ownDirectory
|
|
82
|
+
: ownDirectory + sep,
|
|
83
|
+
definitions: new Map(),
|
|
84
|
+
definitionNames: new Map(),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// The printer can overflow the stack on a recursive alias (JSX child trees)
|
|
89
|
+
// when truncation is off; fall back to the truncating printer for those.
|
|
90
|
+
function printType(checker, type) {
|
|
91
|
+
try {
|
|
92
|
+
return checker.typeToString(type, undefined, PRINT_FLAGS);
|
|
93
|
+
} catch {
|
|
94
|
+
return checker.typeToString(type);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function documentation(checker, symbol) {
|
|
99
|
+
if (!symbol) return '';
|
|
100
|
+
return ts
|
|
101
|
+
.displayPartsToString(symbol.getDocumentationComment(checker))
|
|
102
|
+
.trim();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function jsDocTag(symbol, name) {
|
|
106
|
+
const tag = symbol?.getJsDocTags().find((item) => item.name === name);
|
|
107
|
+
if (!tag) return undefined;
|
|
108
|
+
return ts.displayPartsToString(tag.text ?? []).trim();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Literal value a single-literal type carries, or undefined. */
|
|
112
|
+
function literalOf(type) {
|
|
113
|
+
if (type.isStringLiteral() || type.isNumberLiteral()) return type.value;
|
|
114
|
+
if (type.flags & ts.TypeFlags.BooleanLiteral) {
|
|
115
|
+
return type.intrinsicName === 'true';
|
|
116
|
+
}
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const isNullish = (type) =>
|
|
121
|
+
(type.flags &
|
|
122
|
+
(ts.TypeFlags.Undefined | ts.TypeFlags.Null | ts.TypeFlags.Void)) !==
|
|
123
|
+
0;
|
|
124
|
+
|
|
125
|
+
const membersOf = (type) => (type.isUnion() ? type.types : [type]);
|
|
126
|
+
|
|
127
|
+
const isObjectLike = (type) =>
|
|
128
|
+
(type.flags & ts.TypeFlags.Object) !== 0 || type.isIntersection();
|
|
129
|
+
|
|
130
|
+
// TypeScript's own utility types say nothing about the shape they produce,
|
|
131
|
+
// so a type named by one stays anonymous (inlined, not a definition).
|
|
132
|
+
const UTILITY_NAMES = new Set([
|
|
133
|
+
'Readonly',
|
|
134
|
+
'ReadonlyArray',
|
|
135
|
+
'Record',
|
|
136
|
+
'Partial',
|
|
137
|
+
'Required',
|
|
138
|
+
'Pick',
|
|
139
|
+
'Omit',
|
|
140
|
+
'Exclude',
|
|
141
|
+
'Extract',
|
|
142
|
+
'NonNullable',
|
|
143
|
+
]);
|
|
144
|
+
const SIGNAL_NAMES = new Set(['Signal', 'ReadonlySignal']);
|
|
145
|
+
|
|
146
|
+
/** A user-facing name for an object or union type, or undefined. */
|
|
147
|
+
function nameOf(type) {
|
|
148
|
+
const alias = type.aliasSymbol?.getName();
|
|
149
|
+
if (alias && !UTILITY_NAMES.has(alias)) return alias;
|
|
150
|
+
const symbol = type.getSymbol()?.getName();
|
|
151
|
+
return symbol && !symbol.startsWith('__') && !UTILITY_NAMES.has(symbol)
|
|
152
|
+
? symbol
|
|
153
|
+
: undefined;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const isSafeHtml = (type) => type.getSymbol()?.getName() === 'SafeHtml';
|
|
157
|
+
const isPrimitive = (type) =>
|
|
158
|
+
(type.flags &
|
|
159
|
+
(ts.TypeFlags.StringLike |
|
|
160
|
+
ts.TypeFlags.NumberLike |
|
|
161
|
+
ts.TypeFlags.BooleanLike)) !==
|
|
162
|
+
0;
|
|
163
|
+
|
|
164
|
+
// Content that also takes a plain string or number (ButtonLabel, TextContent)
|
|
165
|
+
// says so; bare `KerfUiContent` rejects arbitrary text (docs/21's compile-time
|
|
166
|
+
// contracts), so a document must give it markup instead.
|
|
167
|
+
const TEXT_FLAGS = ts.TypeFlags.StringLike | ts.TypeFlags.NumberLike;
|
|
168
|
+
function contentOf(members, text) {
|
|
169
|
+
return members.some((member) => member.flags & TEXT_FLAGS)
|
|
170
|
+
? { kind: 'content', acceptsText: true, text }
|
|
171
|
+
: { kind: 'content', text };
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Described members that are all content, text, or numbers (a branded
|
|
176
|
+
* SafeHtml, an alias of content, or one prop's type in each variant) are one
|
|
177
|
+
* content slot (KF-24G2KV); undefined for any other set.
|
|
178
|
+
*/
|
|
179
|
+
function contentOfDescribed(members, text) {
|
|
180
|
+
if (
|
|
181
|
+
!members.some((member) => member.kind === 'content') ||
|
|
182
|
+
!members.every((member) =>
|
|
183
|
+
['content', 'string', 'number'].includes(member.kind),
|
|
184
|
+
)
|
|
185
|
+
)
|
|
186
|
+
return undefined;
|
|
187
|
+
return members.some(
|
|
188
|
+
(member) => member.kind !== 'content' || member.acceptsText,
|
|
189
|
+
)
|
|
190
|
+
? { kind: 'content', acceptsText: true, text }
|
|
191
|
+
: { kind: 'content', text };
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Text, numbers, rendered markup, or lists of them: application content for
|
|
196
|
+
* a slot.
|
|
197
|
+
*/
|
|
198
|
+
function isContentUnion(checker, members) {
|
|
199
|
+
return (
|
|
200
|
+
members.some(isSafeHtml) &&
|
|
201
|
+
members.every(
|
|
202
|
+
(member) =>
|
|
203
|
+
isSafeHtml(member) ||
|
|
204
|
+
isPrimitive(member) ||
|
|
205
|
+
checker.isArrayType(member),
|
|
206
|
+
)
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Registers a named type in the shared table and returns a reference to it.
|
|
212
|
+
* Two different types that share a name get distinct `Name`, `Name#2` keys.
|
|
213
|
+
*/
|
|
214
|
+
function reference(ctx, type, name, text, build) {
|
|
215
|
+
let key = ctx.definitionNames.get(type);
|
|
216
|
+
if (!key) {
|
|
217
|
+
key = name;
|
|
218
|
+
for (let index = 2; ctx.definitions.has(key); index += 1) {
|
|
219
|
+
key = `${name}#${index}`;
|
|
220
|
+
}
|
|
221
|
+
ctx.definitionNames.set(type, key);
|
|
222
|
+
ctx.definitions.set(key, { kind: 'pending', text });
|
|
223
|
+
ctx.definitions.set(key, { ...build(), text });
|
|
224
|
+
}
|
|
225
|
+
return { kind: 'ref', ref: key, text };
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Describes a type in the component-props type grammar. Every descriptor
|
|
230
|
+
* carries the printed TypeScript `text`; `kind` narrows it for tooling.
|
|
231
|
+
*/
|
|
232
|
+
export function describeType(ctx, type, depth = 0) {
|
|
233
|
+
const text = printType(ctx.checker, type);
|
|
234
|
+
const all = membersOf(type);
|
|
235
|
+
const members = all.filter((member) => !isNullish(member));
|
|
236
|
+
const nullable = members.length !== all.length;
|
|
237
|
+
const described = describeNonNull(ctx, type, members, text, depth);
|
|
238
|
+
return nullable ? { ...described, nullable: true } : described;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function describeNonNull(ctx, type, members, text, depth) {
|
|
242
|
+
if (members.length === 0) return { kind: 'never', text };
|
|
243
|
+
const named = type.aliasSymbol?.getName();
|
|
244
|
+
if (named && CONTENT_ALIASES.has(named)) return contentOf(members, text);
|
|
245
|
+
// A css-values alias that also takes token names (`UiGapValue` is
|
|
246
|
+
// `UiSpaceName | CssLength`) keeps its tokens as literals beside the
|
|
247
|
+
// builder, as it reads once `| undefined` drops the alias, so a nested
|
|
248
|
+
// `{ column: 'm' }` validates (KF-VA14AP).
|
|
249
|
+
if (named && CSS_VALUE_ALIAS.test(named)) {
|
|
250
|
+
if (!members.some((member) => typeof literalOf(member) === 'string'))
|
|
251
|
+
return { kind: 'css-value', grammar: named, text };
|
|
252
|
+
}
|
|
253
|
+
if (isContentUnion(ctx.checker, members)) return contentOf(members, text);
|
|
254
|
+
if (members.length === 1) return describeSingle(ctx, members[0], depth);
|
|
255
|
+
|
|
256
|
+
const literals = members.map(literalOf);
|
|
257
|
+
if (literals.every((value) => typeof value === 'boolean')) {
|
|
258
|
+
return { kind: 'boolean', text };
|
|
259
|
+
}
|
|
260
|
+
if (literals.every((value) => value !== undefined)) {
|
|
261
|
+
const declared = type.aliasSymbol?.declarations?.[0];
|
|
262
|
+
return {
|
|
263
|
+
kind: 'enum',
|
|
264
|
+
values: inDeclaredOrder(
|
|
265
|
+
ctx.checker,
|
|
266
|
+
literals,
|
|
267
|
+
declared && 'type' in declared ? declared.type : undefined,
|
|
268
|
+
),
|
|
269
|
+
text,
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
const build = () => {
|
|
273
|
+
// `true` | `false` print as separate members; fold them back into
|
|
274
|
+
// boolean. A lone `true` (a Button's dot badge) stays that literal, so
|
|
275
|
+
// nothing offers the `false` the type excludes (KF-FY62FK).
|
|
276
|
+
const booleans = members.filter(
|
|
277
|
+
(member) => member.flags & ts.TypeFlags.BooleanLiteral,
|
|
278
|
+
);
|
|
279
|
+
const folded = [];
|
|
280
|
+
let sawBoolean = false;
|
|
281
|
+
for (const member of members) {
|
|
282
|
+
if (member.flags & ts.TypeFlags.BooleanLiteral) {
|
|
283
|
+
if (!sawBoolean)
|
|
284
|
+
folded.push(
|
|
285
|
+
booleans.length === 1
|
|
286
|
+
? describeType(ctx, member, depth + 1)
|
|
287
|
+
: { kind: 'boolean', text: 'boolean' },
|
|
288
|
+
);
|
|
289
|
+
sawBoolean = true;
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
folded.push(describeType(ctx, member, depth + 1));
|
|
293
|
+
}
|
|
294
|
+
// Text and markup TypeScript kept apart are still one content slot.
|
|
295
|
+
const content = contentOfDescribed(folded, text);
|
|
296
|
+
if (content) return content;
|
|
297
|
+
const union = { kind: 'union', members: folded };
|
|
298
|
+
const discriminant = discriminantOf(ctx.checker, members);
|
|
299
|
+
if (discriminant) union.discriminant = discriminant;
|
|
300
|
+
return union;
|
|
301
|
+
};
|
|
302
|
+
if (named && members.some(isObjectLike)) {
|
|
303
|
+
return reference(ctx, type, named, text, build);
|
|
304
|
+
}
|
|
305
|
+
return { ...build(), text };
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function describeSingle(ctx, type, depth) {
|
|
309
|
+
const { checker } = ctx;
|
|
310
|
+
const text = printType(checker, type);
|
|
311
|
+
const name = nameOf(type);
|
|
312
|
+
if (name && CONTENT_ALIASES.has(name)) return { kind: 'content', text };
|
|
313
|
+
if (name && SIGNAL_NAMES.has(name)) return { kind: 'signal', text };
|
|
314
|
+
if (name && CSS_VALUE_ALIAS.test(name)) {
|
|
315
|
+
return { kind: 'css-value', grammar: name, text };
|
|
316
|
+
}
|
|
317
|
+
const literal = literalOf(type);
|
|
318
|
+
if (literal !== undefined) return { kind: 'literal', value: literal, text };
|
|
319
|
+
// `NoInfer<T>` is a substitution type; describe what it wraps.
|
|
320
|
+
if (type.flags & ts.TypeFlags.Substitution && type.baseType) {
|
|
321
|
+
return { ...describeType(ctx, type.baseType, depth), text };
|
|
322
|
+
}
|
|
323
|
+
if (type.flags & ts.TypeFlags.TypeParameter) {
|
|
324
|
+
const constraint = type.getConstraint();
|
|
325
|
+
const described = constraint
|
|
326
|
+
? describeType(ctx, constraint, depth)
|
|
327
|
+
: { kind: 'unknown' };
|
|
328
|
+
return { ...described, typeParameter: type.getSymbol()?.getName(), text };
|
|
329
|
+
}
|
|
330
|
+
if (type.flags & ts.TypeFlags.StringLike) return { kind: 'string', text };
|
|
331
|
+
if (type.flags & ts.TypeFlags.NumberLike) return { kind: 'number', text };
|
|
332
|
+
if (type.flags & ts.TypeFlags.BooleanLike) return { kind: 'boolean', text };
|
|
333
|
+
if (type.flags & ts.TypeFlags.Never) return { kind: 'never', text };
|
|
334
|
+
if (type.getCallSignatures().length > 0) return { kind: 'function', text };
|
|
335
|
+
if (checker.isArrayType(type) || checker.isTupleType(type)) {
|
|
336
|
+
const [item] = checker.getTypeArguments(type);
|
|
337
|
+
return {
|
|
338
|
+
kind: 'array',
|
|
339
|
+
items: item ? describeType(ctx, item, depth + 1) : { kind: 'unknown' },
|
|
340
|
+
text,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
if (isObjectLike(type)) {
|
|
344
|
+
if (/^(HTML\w*Element|Element|Node)$/.test(name ?? '')) {
|
|
345
|
+
return { kind: 'element', text };
|
|
346
|
+
}
|
|
347
|
+
if (
|
|
348
|
+
checker.getIndexInfosOfType(type).length > 0 &&
|
|
349
|
+
checker.getPropertiesOfType(type).length === 0
|
|
350
|
+
) {
|
|
351
|
+
return { kind: 'record', text };
|
|
352
|
+
}
|
|
353
|
+
const build = () => {
|
|
354
|
+
const object = {
|
|
355
|
+
kind: 'object',
|
|
356
|
+
props: describeProps(ctx, type, depth + 1).props,
|
|
357
|
+
};
|
|
358
|
+
const index = indexOf(ctx, type, depth);
|
|
359
|
+
if (index) object.index = index;
|
|
360
|
+
return object;
|
|
361
|
+
};
|
|
362
|
+
if (name) return reference(ctx, type, name, text, build);
|
|
363
|
+
if (depth >= MAX_INLINE_DEPTH) return { kind: 'object', text };
|
|
364
|
+
return { ...build(), text };
|
|
365
|
+
}
|
|
366
|
+
return { kind: 'unknown', text };
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* An object's string index signature (`Record<\`data-${string}\`, string>`
|
|
371
|
+
* behind `rootAttributes`), as the key prefix it allows and its value type.
|
|
372
|
+
* Returns undefined when the object has none.
|
|
373
|
+
*/
|
|
374
|
+
function indexOf(ctx, type, depth) {
|
|
375
|
+
const info = ctx.checker
|
|
376
|
+
.getIndexInfosOfType(type)
|
|
377
|
+
.find(
|
|
378
|
+
(item) =>
|
|
379
|
+
item.keyType.flags &
|
|
380
|
+
(ts.TypeFlags.String | ts.TypeFlags.TemplateLiteral),
|
|
381
|
+
);
|
|
382
|
+
if (!info) return undefined;
|
|
383
|
+
const prefix =
|
|
384
|
+
info.keyType.flags & ts.TypeFlags.TemplateLiteral
|
|
385
|
+
? info.keyType.texts[0]
|
|
386
|
+
: '';
|
|
387
|
+
return { keyPrefix: prefix, value: describeType(ctx, info.type, depth + 1) };
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* The props that distinguish union members: present in every member, each a
|
|
392
|
+
* single literal, and not all equal. Returns their names, or undefined.
|
|
393
|
+
*/
|
|
394
|
+
function discriminantOf(checker, members) {
|
|
395
|
+
if (members.length < 2 || !members.every(isObjectLike)) return undefined;
|
|
396
|
+
const names = checker
|
|
397
|
+
.getPropertiesOfType(members[0])
|
|
398
|
+
.map((symbol) => symbol.getName())
|
|
399
|
+
.filter((name) => {
|
|
400
|
+
const values = members.map((member) => {
|
|
401
|
+
const property = member.getProperty(name);
|
|
402
|
+
if (!property) return undefined;
|
|
403
|
+
const typed = membersOf(checker.getTypeOfSymbol(property)).filter(
|
|
404
|
+
(item) => !isNullish(item),
|
|
405
|
+
);
|
|
406
|
+
return typed.length === 1 ? literalOf(typed[0]) : undefined;
|
|
407
|
+
});
|
|
408
|
+
return (
|
|
409
|
+
values.every((value) => value !== undefined) && new Set(values).size > 1
|
|
410
|
+
);
|
|
411
|
+
});
|
|
412
|
+
return names.length > 0 ? names : undefined;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/** Literal values a type node spells out, in source order (aliases followed). */
|
|
416
|
+
function declaredLiterals(checker, node, seen = new Set()) {
|
|
417
|
+
if (!node || seen.has(node)) return [];
|
|
418
|
+
seen.add(node);
|
|
419
|
+
if (ts.isParenthesizedTypeNode(node)) {
|
|
420
|
+
return declaredLiterals(checker, node.type, seen);
|
|
421
|
+
}
|
|
422
|
+
if (ts.isUnionTypeNode(node)) {
|
|
423
|
+
return node.types.flatMap((item) => declaredLiterals(checker, item, seen));
|
|
424
|
+
}
|
|
425
|
+
if (ts.isTypeReferenceNode(node) && !node.typeArguments) {
|
|
426
|
+
let target = checker.getSymbolAtLocation(node.typeName);
|
|
427
|
+
if (target && target.getFlags() & ts.SymbolFlags.Alias) {
|
|
428
|
+
target = checker.getAliasedSymbol(target);
|
|
429
|
+
}
|
|
430
|
+
const declaration = target?.declarations?.[0];
|
|
431
|
+
return declaration && ts.isTypeAliasDeclaration(declaration)
|
|
432
|
+
? declaredLiterals(checker, declaration.type, seen)
|
|
433
|
+
: [];
|
|
434
|
+
}
|
|
435
|
+
if (ts.isLiteralTypeNode(node)) {
|
|
436
|
+
const { literal } = node;
|
|
437
|
+
if (ts.isStringLiteral(literal)) return [literal.text];
|
|
438
|
+
if (ts.isNumericLiteral(literal)) return [Number(literal.text)];
|
|
439
|
+
if (literal.kind === ts.SyntaxKind.TrueKeyword) return [true];
|
|
440
|
+
if (literal.kind === ts.SyntaxKind.FalseKeyword) return [false];
|
|
441
|
+
}
|
|
442
|
+
return [];
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* TypeScript orders union members by internal type id, which shifts when
|
|
447
|
+
* unrelated declarations change; source order is stable and is what an
|
|
448
|
+
* inspector should show. Values the node does not spell out keep their place
|
|
449
|
+
* after the declared ones.
|
|
450
|
+
*/
|
|
451
|
+
function inDeclaredOrder(checker, values, node) {
|
|
452
|
+
const order = declaredLiterals(checker, node);
|
|
453
|
+
if (order.length === 0) return values;
|
|
454
|
+
const rank = (value) => {
|
|
455
|
+
const index = order.indexOf(value);
|
|
456
|
+
return index === -1 ? order.length : index;
|
|
457
|
+
};
|
|
458
|
+
return [...values].sort((a, b) => rank(a) - rank(b));
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
const isOptional = (symbol) =>
|
|
462
|
+
(symbol.getFlags() & ts.SymbolFlags.Optional) !== 0;
|
|
463
|
+
|
|
464
|
+
/** Parses a JSDoc default from `@default`, "(default `x`)", or "`x` (default)". */
|
|
465
|
+
export function parseDocumentedDefault(text, tagValue) {
|
|
466
|
+
if (tagValue) return tagValue.replace(/^['"`]|['"`]$/g, '');
|
|
467
|
+
if (!text) return undefined;
|
|
468
|
+
const patterns = [
|
|
469
|
+
/\(default:?\s+`([^`]+)`/i,
|
|
470
|
+
/\bdefaults? (?:to|is) `([^`]+)`/i,
|
|
471
|
+
/`([^`]+)`\s+\((?:the )?default\)/i,
|
|
472
|
+
// A boolean's default often goes unquoted: "(default true)", "Defaults
|
|
473
|
+
// to true.", "Default false." (KF-YNEMFD).
|
|
474
|
+
/\bdefaults?(?:\s+(?:to|is))?:?\s+(true|false)\b/i,
|
|
475
|
+
];
|
|
476
|
+
for (const pattern of patterns) {
|
|
477
|
+
const match = pattern.exec(text);
|
|
478
|
+
if (match) return match[1].replace(/^['"]|['"]$/g, '');
|
|
479
|
+
}
|
|
480
|
+
return undefined;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/** Coerces a documented default to the prop's type, or drops it. */
|
|
484
|
+
export function coerceDefault(raw, descriptor) {
|
|
485
|
+
if (raw === undefined) return undefined;
|
|
486
|
+
switch (descriptor.kind) {
|
|
487
|
+
case 'boolean':
|
|
488
|
+
return raw === 'true' ? true : raw === 'false' ? false : undefined;
|
|
489
|
+
case 'number': {
|
|
490
|
+
const value = Number(raw);
|
|
491
|
+
return raw.trim() !== '' && Number.isFinite(value) ? value : undefined;
|
|
492
|
+
}
|
|
493
|
+
case 'enum':
|
|
494
|
+
return descriptor.values.find((value) => String(value) === raw);
|
|
495
|
+
case 'string':
|
|
496
|
+
return raw;
|
|
497
|
+
default:
|
|
498
|
+
return undefined;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/** Documentation on the aliases a property's declared type names. */
|
|
503
|
+
function declaredTypeDocs(checker, symbol) {
|
|
504
|
+
const node = symbol.valueDeclaration ?? symbol.declarations?.[0];
|
|
505
|
+
const typeNode = node && 'type' in node ? node.type : undefined;
|
|
506
|
+
if (!typeNode) return [];
|
|
507
|
+
const references = ts.isUnionTypeNode(typeNode) ? typeNode.types : [typeNode];
|
|
508
|
+
return references
|
|
509
|
+
.filter((item) => ts.isTypeReferenceNode(item))
|
|
510
|
+
.map((item) => {
|
|
511
|
+
let target = checker.getSymbolAtLocation(item.typeName);
|
|
512
|
+
if (target && target.getFlags() & ts.SymbolFlags.Alias) {
|
|
513
|
+
target = checker.getAliasedSymbol(target);
|
|
514
|
+
}
|
|
515
|
+
return documentation(checker, target);
|
|
516
|
+
})
|
|
517
|
+
.filter(Boolean);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function isNative(ctx, symbol) {
|
|
521
|
+
const declarations = symbol.declarations ?? [];
|
|
522
|
+
// A package's own declarations live under its directory, never in a
|
|
523
|
+
// dependency's node_modules beneath it.
|
|
524
|
+
const own = (fileName) =>
|
|
525
|
+
fileName.startsWith(ctx.ownDirectory) &&
|
|
526
|
+
!fileName.slice(ctx.ownDirectory.length).includes('node_modules/');
|
|
527
|
+
return (
|
|
528
|
+
declarations.length > 0 &&
|
|
529
|
+
declarations.every((item) => !own(item.getSourceFile().fileName))
|
|
530
|
+
);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
function describeProperty(ctx, symbol, depth) {
|
|
534
|
+
const { checker } = ctx;
|
|
535
|
+
const type = checker.getTypeOfSymbol(symbol);
|
|
536
|
+
const descriptor = describeType(ctx, type, depth);
|
|
537
|
+
const description = documentation(checker, symbol);
|
|
538
|
+
if (descriptor.kind === 'enum') {
|
|
539
|
+
const node = symbol.valueDeclaration ?? symbol.declarations?.[0];
|
|
540
|
+
if (node && 'type' in node && node.type) {
|
|
541
|
+
descriptor.values = inDeclaredOrder(
|
|
542
|
+
checker,
|
|
543
|
+
descriptor.values,
|
|
544
|
+
node.type,
|
|
545
|
+
);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
const prop = {
|
|
549
|
+
name: symbol.getName(),
|
|
550
|
+
type: descriptor,
|
|
551
|
+
required: !isOptional(symbol) && descriptor.kind !== 'never',
|
|
552
|
+
};
|
|
553
|
+
const documented =
|
|
554
|
+
parseDocumentedDefault(description, jsDocTag(symbol, 'default')) ??
|
|
555
|
+
declaredTypeDocs(checker, symbol)
|
|
556
|
+
.map((doc) => parseDocumentedDefault(doc))
|
|
557
|
+
.find((value) => value !== undefined);
|
|
558
|
+
const fallback = coerceDefault(documented, descriptor);
|
|
559
|
+
if (fallback !== undefined) prop.default = fallback;
|
|
560
|
+
if (description) prop.description = description;
|
|
561
|
+
if (jsDocTag(symbol, 'deprecated') !== undefined) prop.deprecated = true;
|
|
562
|
+
// Lucide icon data is a nested array no document can spell as a literal;
|
|
563
|
+
// marking it lets documents name the icon instead (`$icon`).
|
|
564
|
+
if (ICON_DATA.test(descriptor.text ?? '')) prop.iconSource = 'lucide';
|
|
565
|
+
return prop;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
const ICON_DATA = /^(IconNode|LucideNode)( \| undefined)?$/;
|
|
569
|
+
|
|
570
|
+
/** Splits an object type's properties into own props and native attributes. */
|
|
571
|
+
function describeProps(ctx, type, depth) {
|
|
572
|
+
const props = [];
|
|
573
|
+
const nativeAttributes = [];
|
|
574
|
+
for (const symbol of ctx.checker.getPropertiesOfType(type)) {
|
|
575
|
+
if (isNative(ctx, symbol)) nativeAttributes.push(symbol.getName());
|
|
576
|
+
else props.push(describeProperty(ctx, symbol, depth));
|
|
577
|
+
}
|
|
578
|
+
return { props, nativeAttributes };
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
function mergeMemberProps(memberProps, memberCount) {
|
|
582
|
+
const byName = new Map();
|
|
583
|
+
for (const props of memberProps) {
|
|
584
|
+
for (const prop of props) {
|
|
585
|
+
const seen = byName.get(prop.name);
|
|
586
|
+
if (!seen) {
|
|
587
|
+
byName.set(prop.name, {
|
|
588
|
+
prop: { ...prop },
|
|
589
|
+
present: 1,
|
|
590
|
+
required: prop.required ? 1 : 0,
|
|
591
|
+
types: [prop.type],
|
|
592
|
+
});
|
|
593
|
+
continue;
|
|
594
|
+
}
|
|
595
|
+
seen.present += 1;
|
|
596
|
+
if (prop.required) seen.required += 1;
|
|
597
|
+
if (!seen.types.some((item) => item.text === prop.type.text)) {
|
|
598
|
+
seen.types.push(prop.type);
|
|
599
|
+
}
|
|
600
|
+
if (!seen.prop.description && prop.description) {
|
|
601
|
+
seen.prop.description = prop.description;
|
|
602
|
+
}
|
|
603
|
+
if (seen.prop.default === undefined && prop.default !== undefined) {
|
|
604
|
+
seen.prop.default = prop.default;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
return [...byName.values()].map(({ prop, present, required, types }) => {
|
|
609
|
+
const usable = types.filter((item) => item.kind !== 'never');
|
|
610
|
+
let type = usable[0] ?? prop.type;
|
|
611
|
+
const literals = usable.map((item) =>
|
|
612
|
+
item.kind === 'literal' ? item.value : undefined,
|
|
613
|
+
);
|
|
614
|
+
// `boolean` beside `true` / `false` (Badge's `ariaHidden?: boolean` plus
|
|
615
|
+
// the `false` / `true` of its labeled and hidden variants) is still one
|
|
616
|
+
// boolean, so the editor offers a switch rather than a two-item select.
|
|
617
|
+
if (
|
|
618
|
+
usable.length > 1 &&
|
|
619
|
+
usable.every(
|
|
620
|
+
(item, index) =>
|
|
621
|
+
item.kind === 'boolean' || typeof literals[index] === 'boolean',
|
|
622
|
+
)
|
|
623
|
+
) {
|
|
624
|
+
type = { kind: 'boolean', text: 'boolean' };
|
|
625
|
+
} else if (
|
|
626
|
+
usable.length > 1 &&
|
|
627
|
+
literals.every((value) => value !== undefined)
|
|
628
|
+
) {
|
|
629
|
+
type = {
|
|
630
|
+
kind: 'enum',
|
|
631
|
+
values: literals,
|
|
632
|
+
text: usable.map((item) => item.text).join(' | '),
|
|
633
|
+
};
|
|
634
|
+
} else if (usable.length > 1) {
|
|
635
|
+
const text = usable.map((item) => item.text).join(' | ');
|
|
636
|
+
type = contentOfDescribed(usable, text) ?? {
|
|
637
|
+
kind: 'union',
|
|
638
|
+
members: usable,
|
|
639
|
+
text,
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
const merged = { ...prop, type, required: required === memberCount };
|
|
643
|
+
if (present < memberCount || usable.length !== types.length) {
|
|
644
|
+
merged.variantOnly = true;
|
|
645
|
+
}
|
|
646
|
+
return merged;
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Projects a props type into `{ props, nativeAttributes, variants? }`. A
|
|
652
|
+
* union props type (Button's labeled-or-icon-only content, ListHeader's
|
|
653
|
+
* toggle mode) lists every prop once, marks the ones only some members allow
|
|
654
|
+
* as `variantOnly`, and records each member's required and forbidden props
|
|
655
|
+
* as a variant.
|
|
656
|
+
*/
|
|
657
|
+
export function describePropsType(ctx, type) {
|
|
658
|
+
const members = membersOf(type).filter((member) => !isNullish(member));
|
|
659
|
+
if (members.length <= 1) {
|
|
660
|
+
return members.length
|
|
661
|
+
? describeProps(ctx, members[0], 0)
|
|
662
|
+
: { props: [], nativeAttributes: [] };
|
|
663
|
+
}
|
|
664
|
+
const described = members.map((member) => describeProps(ctx, member, 0));
|
|
665
|
+
const props = mergeMemberProps(
|
|
666
|
+
described.map((item) => item.props),
|
|
667
|
+
members.length,
|
|
668
|
+
);
|
|
669
|
+
const nativeAttributes = [
|
|
670
|
+
...new Set(described.flatMap((item) => item.nativeAttributes)),
|
|
671
|
+
];
|
|
672
|
+
const discriminant = discriminantOf(ctx.checker, members);
|
|
673
|
+
const seen = new Set();
|
|
674
|
+
const variants = [];
|
|
675
|
+
for (const { props: list } of described) {
|
|
676
|
+
const variant = {};
|
|
677
|
+
if (discriminant) {
|
|
678
|
+
variant.when = Object.fromEntries(
|
|
679
|
+
discriminant.map((name) => [
|
|
680
|
+
name,
|
|
681
|
+
list.find((prop) => prop.name === name)?.type.value,
|
|
682
|
+
]),
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
variant.required = list
|
|
686
|
+
.filter((prop) => prop.required)
|
|
687
|
+
.map((prop) => prop.name);
|
|
688
|
+
variant.forbidden = list
|
|
689
|
+
.filter((prop) => prop.type.kind === 'never')
|
|
690
|
+
.map((prop) => prop.name);
|
|
691
|
+
const key = JSON.stringify(variant);
|
|
692
|
+
if (!seen.has(key)) {
|
|
693
|
+
seen.add(key);
|
|
694
|
+
variants.push(variant);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
if (variants.length < 2) return { props, nativeAttributes };
|
|
698
|
+
return {
|
|
699
|
+
props,
|
|
700
|
+
nativeAttributes,
|
|
701
|
+
variants,
|
|
702
|
+
...(discriminant ? { discriminant } : {}),
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
function exportSymbol(checker, sourceFile, name) {
|
|
707
|
+
const moduleSymbol = checker.getSymbolAtLocation(sourceFile);
|
|
708
|
+
if (!moduleSymbol) return undefined;
|
|
709
|
+
const found = checker
|
|
710
|
+
.getExportsOfModule(moduleSymbol)
|
|
711
|
+
.find((symbol) => symbol.getName() === name);
|
|
712
|
+
if (!found) return undefined;
|
|
713
|
+
return found.getFlags() & ts.SymbolFlags.Alias
|
|
714
|
+
? checker.getAliasedSymbol(found)
|
|
715
|
+
: found;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* How a component carries application `data-*` attributes to its root (the
|
|
720
|
+
* Kerf UI editor's node marker and row keys): a `rootAttributes` prop, native
|
|
721
|
+
* `data-*` passthrough (a `data-${string}` index signature on the props), or
|
|
722
|
+
* none.
|
|
723
|
+
*/
|
|
724
|
+
function dataChannelOf(checker, type, props) {
|
|
725
|
+
if (props.some((prop) => prop.name === 'rootAttributes'))
|
|
726
|
+
return 'rootAttributes';
|
|
727
|
+
const members = type
|
|
728
|
+
? membersOf(type).filter((member) => !isNullish(member))
|
|
729
|
+
: [];
|
|
730
|
+
const native =
|
|
731
|
+
members.length > 0 &&
|
|
732
|
+
members.every((member) =>
|
|
733
|
+
checker
|
|
734
|
+
.getIndexInfosOfType(member)
|
|
735
|
+
.some(
|
|
736
|
+
(info) =>
|
|
737
|
+
info.keyType.flags & ts.TypeFlags.TemplateLiteral &&
|
|
738
|
+
info.keyType.texts[0] === 'data-',
|
|
739
|
+
),
|
|
740
|
+
);
|
|
741
|
+
return native ? 'native' : 'none';
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Reads one exported component function: its props (from the first
|
|
746
|
+
* parameter), type parameters, and documentation. Returns undefined for an
|
|
747
|
+
* export that is not a component (a type, a wiring helper, a non-SafeHtml
|
|
748
|
+
* function).
|
|
749
|
+
*/
|
|
750
|
+
export function readComponentExport(ctx, sourceFile, name) {
|
|
751
|
+
const { checker } = ctx;
|
|
752
|
+
if (!/^[A-Z]/.test(name)) return undefined;
|
|
753
|
+
const symbol = exportSymbol(checker, sourceFile, name);
|
|
754
|
+
if (!symbol || !(symbol.getFlags() & ts.SymbolFlags.Function))
|
|
755
|
+
return undefined;
|
|
756
|
+
const [signature] = checker.getTypeOfSymbol(symbol).getCallSignatures();
|
|
757
|
+
if (!signature) return undefined;
|
|
758
|
+
if (!/SafeHtml$/.test(checker.typeToString(signature.getReturnType()))) {
|
|
759
|
+
return undefined;
|
|
760
|
+
}
|
|
761
|
+
const [parameter] = signature.getParameters();
|
|
762
|
+
const result = parameter
|
|
763
|
+
? describePropsType(ctx, checker.getTypeOfSymbol(parameter))
|
|
764
|
+
: { props: [], nativeAttributes: [] };
|
|
765
|
+
result.dataChannel = dataChannelOf(
|
|
766
|
+
checker,
|
|
767
|
+
parameter && checker.getTypeOfSymbol(parameter),
|
|
768
|
+
result.props,
|
|
769
|
+
);
|
|
770
|
+
const typeParameters = (signature.getTypeParameters() ?? []).map((item) => {
|
|
771
|
+
const constraint = item.getConstraint();
|
|
772
|
+
return {
|
|
773
|
+
name: item.getSymbol()?.getName(),
|
|
774
|
+
...(constraint ? { constraint: printType(checker, constraint) } : {}),
|
|
775
|
+
};
|
|
776
|
+
});
|
|
777
|
+
const description = documentation(checker, symbol);
|
|
778
|
+
return {
|
|
779
|
+
export: name,
|
|
780
|
+
...(description ? { description } : {}),
|
|
781
|
+
...(typeParameters.length ? { typeParameters } : {}),
|
|
782
|
+
...result,
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
const QUOTED = /^(['"])(.*)\1$/;
|
|
787
|
+
|
|
788
|
+
function customElementDefault(raw, type) {
|
|
789
|
+
if (raw === undefined) return undefined;
|
|
790
|
+
const quoted = QUOTED.exec(raw);
|
|
791
|
+
let value;
|
|
792
|
+
if (quoted) value = quoted[2];
|
|
793
|
+
else if (raw === 'true' || raw === 'false') value = raw === 'true';
|
|
794
|
+
else if (/^-?\d+(\.\d+)?$/.test(raw)) value = Number(raw);
|
|
795
|
+
if (value === undefined || value === '') return undefined;
|
|
796
|
+
if (type.kind === 'enum' && !type.values.includes(value)) return undefined;
|
|
797
|
+
return value;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/** Projects a Web Awesome `custom-elements.json` declaration into props. */
|
|
801
|
+
export function describeCustomElement(declaration) {
|
|
802
|
+
const props = (declaration.attributes ?? []).map((attribute) => {
|
|
803
|
+
const text = (attribute.type?.text ?? 'string')
|
|
804
|
+
.replace(/\s+/g, ' ')
|
|
805
|
+
.replace(/^\| /, '');
|
|
806
|
+
const parts = text
|
|
807
|
+
.split('|')
|
|
808
|
+
.map((part) => part.trim())
|
|
809
|
+
.filter((part) => part !== 'undefined' && part !== 'null');
|
|
810
|
+
const quoted = parts.filter((part) => QUOTED.test(part));
|
|
811
|
+
const values = quoted.map((part) => QUOTED.exec(part)[2]);
|
|
812
|
+
let type;
|
|
813
|
+
if (parts.length > 0 && quoted.length === parts.length) {
|
|
814
|
+
type = { kind: 'enum', values, text };
|
|
815
|
+
} else if (
|
|
816
|
+
quoted.length > 0 &&
|
|
817
|
+
quoted.length === parts.length - 1 &&
|
|
818
|
+
parts.includes('string')
|
|
819
|
+
) {
|
|
820
|
+
type = { kind: 'string', suggestions: values, text };
|
|
821
|
+
} else if (
|
|
822
|
+
parts.length === 1 &&
|
|
823
|
+
['string', 'number', 'boolean'].includes(parts[0])
|
|
824
|
+
) {
|
|
825
|
+
type = { kind: parts[0], text };
|
|
826
|
+
} else {
|
|
827
|
+
type = { kind: 'unknown', text };
|
|
828
|
+
}
|
|
829
|
+
const prop = { name: attribute.name, type, required: false };
|
|
830
|
+
if (attribute.fieldName && attribute.fieldName !== attribute.name) {
|
|
831
|
+
prop.property = attribute.fieldName;
|
|
832
|
+
}
|
|
833
|
+
const fallback = customElementDefault(attribute.default, type);
|
|
834
|
+
if (fallback !== undefined) prop.default = fallback;
|
|
835
|
+
if (attribute.description) prop.description = attribute.description;
|
|
836
|
+
if (attribute.deprecated) prop.deprecated = true;
|
|
837
|
+
return prop;
|
|
838
|
+
});
|
|
839
|
+
const slots = (declaration.slots ?? []).map((slot) => ({
|
|
840
|
+
name: slot.name === '' ? 'default' : slot.name,
|
|
841
|
+
...(slot.description ? { description: slot.description } : {}),
|
|
842
|
+
}));
|
|
843
|
+
return { props, slots };
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
const qualify = (pkg, id) => `${pkg}:${id}`;
|
|
847
|
+
|
|
848
|
+
function dtsFor(root, browserImport, pkg) {
|
|
849
|
+
return resolve(root, 'dist', `${browserImport.slice(pkg.length + 1)}.d.ts`);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/** Marks zone props (composition catalog) and css-value grammars (catalog). */
|
|
853
|
+
export function applyCrossReferences(
|
|
854
|
+
component,
|
|
855
|
+
{ zones = [], cssValueProps = [] },
|
|
856
|
+
) {
|
|
857
|
+
const zoneByProp = new Map(
|
|
858
|
+
zones.filter((zone) => zone.jsx?.prop).map((zone) => [zone.jsx.prop, zone]),
|
|
859
|
+
);
|
|
860
|
+
const cssByPath = new Map(cssValueProps.map((item) => [item.path, item]));
|
|
861
|
+
for (const prop of component.props) {
|
|
862
|
+
const zone = zoneByProp.get(prop.name);
|
|
863
|
+
if (zone) prop.zone = zone.id;
|
|
864
|
+
const css = cssByPath.get(prop.name);
|
|
865
|
+
if (css) {
|
|
866
|
+
prop.cssValue = {
|
|
867
|
+
grammar: css.grammar,
|
|
868
|
+
helpers: css.helpers,
|
|
869
|
+
rawPolicy: css.rawPolicy,
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
// Content with no curated zone is still a slot an editor can fill.
|
|
873
|
+
if (!prop.zone && prop.type.kind === 'content') prop.slot = true;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
// Plumbing props an inspector never shows by default: inner styling hooks,
|
|
878
|
+
// slot placement, and attribute bags the editor owns (the node marker). The
|
|
879
|
+
// overlay can still give any of them a visible control.
|
|
880
|
+
const HIDDEN_PROP = /^(\w+ClassName|slot|rootAttributes|triggerAttributes)$/;
|
|
881
|
+
// A component's own class list is an advanced field, not a main prop
|
|
882
|
+
// (KF-X8X8VX: an author sets `className`, such as an appearance scope).
|
|
883
|
+
const CLASSES_PROP = /^(class|className)$/;
|
|
884
|
+
|
|
885
|
+
/** Generated inspector defaults, applied before the curated overlay. */
|
|
886
|
+
export function applyControlDefaults(component) {
|
|
887
|
+
for (const prop of component.props) {
|
|
888
|
+
if (HIDDEN_PROP.test(prop.name)) prop.control = 'hidden';
|
|
889
|
+
else if (CLASSES_PROP.test(prop.name)) prop.control = 'classes';
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/** Merges curated overlay fields; unknown component or prop keys are problems. */
|
|
894
|
+
export function applyOverlay(component, overlay, problems) {
|
|
895
|
+
const curated = overlay?.components?.[component.key];
|
|
896
|
+
if (!curated) return;
|
|
897
|
+
for (const [name, fields] of Object.entries(curated.props ?? {})) {
|
|
898
|
+
const prop = component.props.find((item) => item.name === name);
|
|
899
|
+
if (prop) Object.assign(prop, fields);
|
|
900
|
+
else
|
|
901
|
+
problems.push(`${component.key}: overlay names unknown prop "${name}"`);
|
|
902
|
+
}
|
|
903
|
+
// KF-H1X3S7: a value's options list names a sibling list prop.
|
|
904
|
+
for (const prop of component.props) {
|
|
905
|
+
if (
|
|
906
|
+
prop.choicesFrom !== undefined &&
|
|
907
|
+
!component.props.some((item) => item.name === prop.choicesFrom)
|
|
908
|
+
)
|
|
909
|
+
problems.push(
|
|
910
|
+
`${component.key}: prop "${prop.name}" takes choices from unknown prop "${prop.choicesFrom}"`,
|
|
911
|
+
);
|
|
912
|
+
}
|
|
913
|
+
if (curated.groups) component.groups = curated.groups;
|
|
914
|
+
for (const [name, fields] of Object.entries(curated.props ?? {})) {
|
|
915
|
+
if (fields.group && !curated.groups?.includes(fields.group)) {
|
|
916
|
+
problems.push(
|
|
917
|
+
`${component.key}: prop "${name}" names undeclared group "${fields.group}"`,
|
|
918
|
+
);
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Reads the components a set of catalog entries declare. Each spec names an
|
|
925
|
+
* entry's id and display name, the declaration file and import specifier of
|
|
926
|
+
* its public module, its export names, and its zones and css-value props.
|
|
927
|
+
*/
|
|
928
|
+
function readComponentEntries(ctx, program, pkg, specs, source, problems) {
|
|
929
|
+
const components = [];
|
|
930
|
+
for (const spec of specs) {
|
|
931
|
+
const sourceFile = spec.file && program.getSourceFile(spec.file);
|
|
932
|
+
if (!sourceFile) {
|
|
933
|
+
problems.push(
|
|
934
|
+
`${spec.id}: no declarations for ${spec.import ?? '(no import)'}`,
|
|
935
|
+
);
|
|
936
|
+
continue;
|
|
937
|
+
}
|
|
938
|
+
const found = spec.exports
|
|
939
|
+
.map((name) => readComponentExport(ctx, sourceFile, name))
|
|
940
|
+
.filter(Boolean);
|
|
941
|
+
// An entry of imperative helpers only (openAnchoredSurface) has no
|
|
942
|
+
// component; an entry whose uppercase exports all fail to resolve does.
|
|
943
|
+
if (found.length === 0) {
|
|
944
|
+
if (
|
|
945
|
+
spec.exports.some(
|
|
946
|
+
(name) =>
|
|
947
|
+
/^[A-Z]/.test(name) &&
|
|
948
|
+
exportSymbol(ctx.checker, sourceFile, name)?.getFlags() &
|
|
949
|
+
ts.SymbolFlags.Function,
|
|
950
|
+
)
|
|
951
|
+
) {
|
|
952
|
+
problems.push(
|
|
953
|
+
`${spec.id}: no SafeHtml component among ${spec.exports.join(', ')}`,
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
continue;
|
|
957
|
+
}
|
|
958
|
+
const primary = found.find((item) => item.export === spec.name) ?? found[0];
|
|
959
|
+
for (const item of found) {
|
|
960
|
+
const isPrimary = item === primary;
|
|
961
|
+
const component = {
|
|
962
|
+
key: isPrimary
|
|
963
|
+
? qualify(pkg, spec.id)
|
|
964
|
+
: `${qualify(pkg, spec.id)}#${item.export}`,
|
|
965
|
+
id: spec.id,
|
|
966
|
+
source,
|
|
967
|
+
import: spec.import,
|
|
968
|
+
...item,
|
|
969
|
+
};
|
|
970
|
+
applyCrossReferences(component, {
|
|
971
|
+
zones: isPrimary ? spec.zones : [],
|
|
972
|
+
cssValueProps: isPrimary ? spec.cssValueProps : [],
|
|
973
|
+
});
|
|
974
|
+
components.push(component);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
return components;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
function readKerfEntries(ctx, program, root, catalog, composition, problems) {
|
|
981
|
+
const pkg = catalog.package;
|
|
982
|
+
const zones = new Map(
|
|
983
|
+
(composition.entries ?? []).map((entry) => [entry.id, entry.zones ?? []]),
|
|
984
|
+
);
|
|
985
|
+
const specs = catalog.entries
|
|
986
|
+
.filter((entry) => entry.source === 'kerf' && entry.kind === 'component')
|
|
987
|
+
.map((entry) => {
|
|
988
|
+
const browserImport = entry.delivery?.browserImport;
|
|
989
|
+
return {
|
|
990
|
+
id: entry.id,
|
|
991
|
+
name: entry.name,
|
|
992
|
+
import: browserImport,
|
|
993
|
+
file: browserImport && dtsFor(root, browserImport, pkg),
|
|
994
|
+
exports: entry.publicExports ?? [],
|
|
995
|
+
zones: zones.get(entry.id) ?? [],
|
|
996
|
+
cssValueProps: entry.cssValueProps ?? [],
|
|
997
|
+
};
|
|
998
|
+
});
|
|
999
|
+
return readComponentEntries(ctx, program, pkg, specs, 'kerf', problems);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
function readWebAwesomeEntries(catalog, customElements, problems) {
|
|
1003
|
+
const declarations = new Map(
|
|
1004
|
+
(customElements?.modules ?? [])
|
|
1005
|
+
.flatMap((module) => module.declarations ?? [])
|
|
1006
|
+
.filter((declaration) => declaration.tagName)
|
|
1007
|
+
.map((declaration) => [declaration.tagName, declaration]),
|
|
1008
|
+
);
|
|
1009
|
+
const components = [];
|
|
1010
|
+
for (const entry of catalog.entries) {
|
|
1011
|
+
if (entry.source !== 'webawesome') continue;
|
|
1012
|
+
const declaration = declarations.get(entry.id);
|
|
1013
|
+
if (!declaration) {
|
|
1014
|
+
problems.push(`${entry.id}: not in Web Awesome custom-elements.json`);
|
|
1015
|
+
continue;
|
|
1016
|
+
}
|
|
1017
|
+
components.push({
|
|
1018
|
+
key: qualify(catalog.package, entry.id),
|
|
1019
|
+
id: entry.id,
|
|
1020
|
+
source: 'webawesome',
|
|
1021
|
+
tagName: entry.id,
|
|
1022
|
+
import: entry.delivery?.registrationImport,
|
|
1023
|
+
...describeCustomElement(declaration),
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
return components;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Builds the component-props document from the catalog, composition catalog,
|
|
1031
|
+
* curated overlay, built declarations under `<root>/dist`, and Web Awesome's
|
|
1032
|
+
* manifest. Returns `{ document, problems }`; the sync script fails on any
|
|
1033
|
+
* problem (an unresolved component, an overlay key that names nothing).
|
|
1034
|
+
*/
|
|
1035
|
+
export function buildComponentProps({
|
|
1036
|
+
root,
|
|
1037
|
+
catalog,
|
|
1038
|
+
composition,
|
|
1039
|
+
overlay,
|
|
1040
|
+
customElements,
|
|
1041
|
+
}) {
|
|
1042
|
+
const problems = [];
|
|
1043
|
+
const pkg = catalog.package;
|
|
1044
|
+
const files = catalog.entries
|
|
1045
|
+
.filter((entry) => entry.source === 'kerf' && entry.delivery?.browserImport)
|
|
1046
|
+
.map((entry) => dtsFor(root, entry.delivery.browserImport, pkg));
|
|
1047
|
+
const program = createDeclarationProgram([...new Set(files)]);
|
|
1048
|
+
const ctx = createPropsContext(
|
|
1049
|
+
program.getTypeChecker(),
|
|
1050
|
+
resolve(root, 'dist'),
|
|
1051
|
+
);
|
|
1052
|
+
const components = [
|
|
1053
|
+
...readKerfEntries(ctx, program, root, catalog, composition, problems),
|
|
1054
|
+
...readWebAwesomeEntries(catalog, customElements, problems),
|
|
1055
|
+
];
|
|
1056
|
+
for (const component of components) {
|
|
1057
|
+
applyControlDefaults(component);
|
|
1058
|
+
applyOverlay(component, overlay, problems);
|
|
1059
|
+
}
|
|
1060
|
+
const known = new Set(components.map((component) => component.key));
|
|
1061
|
+
for (const key of Object.keys(overlay?.components ?? {})) {
|
|
1062
|
+
if (!known.has(key))
|
|
1063
|
+
problems.push(`overlay names unknown component "${key}"`);
|
|
1064
|
+
}
|
|
1065
|
+
const byKey = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
1066
|
+
components.sort((a, b) => byKey(a.key, b.key));
|
|
1067
|
+
const definitions = Object.fromEntries(
|
|
1068
|
+
[...ctx.definitions.entries()].sort(([a], [b]) => byKey(a, b)),
|
|
1069
|
+
);
|
|
1070
|
+
return {
|
|
1071
|
+
document: {
|
|
1072
|
+
$schema: './component-props.schema.json',
|
|
1073
|
+
schema: COMPONENT_PROPS_SCHEMA_ID,
|
|
1074
|
+
package: pkg,
|
|
1075
|
+
description:
|
|
1076
|
+
'Generated per-component prop schema for Kerf UI: each public component function and Web Awesome element with its props (type grammar, required, default, enum values, zones and slots, discriminated variants, css-value grammars). Regenerate with `npm run props:sync`; do not edit.',
|
|
1077
|
+
components,
|
|
1078
|
+
definitions,
|
|
1079
|
+
},
|
|
1080
|
+
problems,
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/** The declaration file a package export condition points to. */
|
|
1085
|
+
function declarationsFor(root, target) {
|
|
1086
|
+
const path =
|
|
1087
|
+
typeof target === 'string'
|
|
1088
|
+
? target.replace(/\.(m?)js$/, '.d.$1ts')
|
|
1089
|
+
: (target?.types ??
|
|
1090
|
+
(target?.import ? declarationsFor(root, target.import) : undefined));
|
|
1091
|
+
return path ? resolve(root, path) : undefined;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
/**
|
|
1095
|
+
* Builds a component package's `component-props.json` (KF-B8TGP4: component
|
|
1096
|
+
* packages ship the same prop schema as @kerfjs/ui). Components and zones come
|
|
1097
|
+
* from the package's composition catalog (`package.json#kerfComponentCatalog
|
|
1098
|
+
* .output`, written by create-kerf-component); each component's declarations
|
|
1099
|
+
* come from the `types` of the package export its `publicExports` name (a
|
|
1100
|
+
* named subpath before `.`). Run after the package's build. Returns
|
|
1101
|
+
* `{ document, problems }`.
|
|
1102
|
+
*/
|
|
1103
|
+
export function buildPackageComponentProps({
|
|
1104
|
+
root,
|
|
1105
|
+
packageJson,
|
|
1106
|
+
composition,
|
|
1107
|
+
overlay,
|
|
1108
|
+
}) {
|
|
1109
|
+
const problems = [];
|
|
1110
|
+
const pkg = packageJson.name;
|
|
1111
|
+
const exportMap =
|
|
1112
|
+
typeof packageJson.exports === 'string' || packageJson.exports?.types
|
|
1113
|
+
? { '.': packageJson.exports }
|
|
1114
|
+
: (packageJson.exports ?? {});
|
|
1115
|
+
const specs = [];
|
|
1116
|
+
let usesSource = false;
|
|
1117
|
+
for (const entry of composition.entries ?? []) {
|
|
1118
|
+
if (entry.kind !== 'component' || (entry.package && entry.package !== pkg))
|
|
1119
|
+
continue;
|
|
1120
|
+
const exported = (entry.publicExports ?? []).map((item) =>
|
|
1121
|
+
typeof item === 'string' ? { name: item, subpath: '.' } : item,
|
|
1122
|
+
);
|
|
1123
|
+
const subpaths = [...new Set(exported.map((item) => item.subpath ?? '.'))];
|
|
1124
|
+
const subpath = subpaths.find((item) => item !== '.') ?? subpaths[0] ?? '.';
|
|
1125
|
+
const declarations = declarationsFor(root, exportMap[subpath]);
|
|
1126
|
+
// A component that lives in app source has no package export: read its
|
|
1127
|
+
// source file and import it by a root-relative path, which view tools
|
|
1128
|
+
// rewrite relative to each document (KF-7JP509: app-source catalogs).
|
|
1129
|
+
const source =
|
|
1130
|
+
entry.source && existsSync(resolve(root, entry.source))
|
|
1131
|
+
? resolve(root, entry.source)
|
|
1132
|
+
: undefined;
|
|
1133
|
+
const fromSource = !(declarations && existsSync(declarations)) && source;
|
|
1134
|
+
const file = fromSource ? source : declarations;
|
|
1135
|
+
if (fromSource) usesSource = true;
|
|
1136
|
+
specs.push({
|
|
1137
|
+
id: entry.id,
|
|
1138
|
+
name: entry.name,
|
|
1139
|
+
import: fromSource
|
|
1140
|
+
? sourceImport(root, source)
|
|
1141
|
+
: subpath === '.'
|
|
1142
|
+
? pkg
|
|
1143
|
+
: `${pkg}${subpath.slice(1)}`,
|
|
1144
|
+
file: file && existsSync(file) ? file : undefined,
|
|
1145
|
+
exports: [
|
|
1146
|
+
...new Set(
|
|
1147
|
+
exported
|
|
1148
|
+
.filter((item) => (item.subpath ?? '.') === subpath)
|
|
1149
|
+
.map((item) => item.name),
|
|
1150
|
+
),
|
|
1151
|
+
],
|
|
1152
|
+
zones: entry.zones ?? [],
|
|
1153
|
+
cssValueProps: entry.cssValueProps ?? [],
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
const program = createDeclarationProgram(
|
|
1157
|
+
[...new Set(specs.map((spec) => spec.file).filter(Boolean))],
|
|
1158
|
+
usesSource ? packageCompilerOptions(root) : {},
|
|
1159
|
+
);
|
|
1160
|
+
const ctx = createPropsContext(program.getTypeChecker(), root);
|
|
1161
|
+
const components = readComponentEntries(
|
|
1162
|
+
ctx,
|
|
1163
|
+
program,
|
|
1164
|
+
pkg,
|
|
1165
|
+
specs,
|
|
1166
|
+
'package',
|
|
1167
|
+
problems,
|
|
1168
|
+
);
|
|
1169
|
+
for (const component of components) {
|
|
1170
|
+
applyControlDefaults(component);
|
|
1171
|
+
applyOverlay(component, overlay, problems);
|
|
1172
|
+
}
|
|
1173
|
+
const known = new Set(components.map((component) => component.key));
|
|
1174
|
+
for (const key of Object.keys(overlay?.components ?? {})) {
|
|
1175
|
+
if (!known.has(key))
|
|
1176
|
+
problems.push(`overlay names unknown component "${key}"`);
|
|
1177
|
+
}
|
|
1178
|
+
const byKey = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
1179
|
+
components.sort((a, b) => byKey(a.key, b.key));
|
|
1180
|
+
return {
|
|
1181
|
+
document: {
|
|
1182
|
+
$schema:
|
|
1183
|
+
'https://raw.githubusercontent.com/brianwestphal/kerf/main/ui/ai/component-props.schema.json',
|
|
1184
|
+
schema: COMPONENT_PROPS_SCHEMA_ID,
|
|
1185
|
+
package: pkg,
|
|
1186
|
+
description: `Generated prop schema for ${pkg}'s Kerf components. Regenerate with \`kerf-ui-props --write\` after a build; do not edit.`,
|
|
1187
|
+
components,
|
|
1188
|
+
definitions: Object.fromEntries(
|
|
1189
|
+
[...ctx.definitions.entries()].sort(([a], [b]) => byKey(a, b)),
|
|
1190
|
+
),
|
|
1191
|
+
},
|
|
1192
|
+
problems,
|
|
1193
|
+
};
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
/** Reads the JSON inputs relative to the ui package root. */
|
|
1197
|
+
export function readComponentPropsInputs(root) {
|
|
1198
|
+
const json = (path) => JSON.parse(readFileSync(resolve(root, path), 'utf8'));
|
|
1199
|
+
return {
|
|
1200
|
+
root,
|
|
1201
|
+
catalog: json('ai/component-catalog.json'),
|
|
1202
|
+
composition: json('ai/component-composition.json'),
|
|
1203
|
+
overlay: json('ai/component-props-overlay.json'),
|
|
1204
|
+
customElements: json(
|
|
1205
|
+
'node_modules/@awesome.me/webawesome/dist/custom-elements.json',
|
|
1206
|
+
),
|
|
1207
|
+
};
|
|
1208
|
+
}
|