@sdxc/ui 2026.10.30 → 2026.11.3
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 +187 -113
- package/dist/app/app-shell-toggle.d.ts +31 -0
- package/dist/app/app-shell-toggle.js +43 -0
- package/dist/app/app-shell.d.ts +131 -0
- package/dist/app/app-shell.js +542 -0
- package/dist/app/auto-refresh.d.ts +104 -0
- package/dist/app/auto-refresh.js +126 -0
- package/dist/{behaviors → app/behaviors}/drag-session.js +1 -1
- package/dist/app/behaviors/refresh-schedule.d.ts +53 -0
- package/dist/app/behaviors/refresh-schedule.js +95 -0
- package/dist/app/behaviors/shortcuts.d.ts +175 -0
- package/dist/app/behaviors/shortcuts.js +401 -0
- package/dist/{behaviors → app/behaviors}/toaster.d.ts +31 -2
- package/dist/{behaviors → app/behaviors}/toaster.js +63 -6
- package/dist/{components → app}/chart.d.ts +63 -9
- package/dist/{components → app}/chart.js +222 -40
- package/dist/app/command-palette.d.ts +132 -0
- package/dist/app/command-palette.js +181 -0
- package/dist/{components → app}/context-menu.d.ts +2 -2
- package/dist/{components → app}/context-menu.js +8 -7
- package/dist/app/danger-zone.d.ts +66 -0
- package/dist/app/danger-zone.js +66 -0
- package/dist/app/detail-sheet.d.ts +119 -0
- package/dist/app/detail-sheet.js +173 -0
- package/dist/{components → app}/drop-indicator.js +3 -3
- package/dist/{components → app}/drop-zone.d.ts +2 -1
- package/dist/{components → app}/drop-zone.js +7 -4
- package/dist/app/editor-layout.d.ts +69 -0
- package/dist/app/editor-layout.js +143 -0
- package/dist/app/empty.d.ts +128 -0
- package/dist/app/empty.js +248 -0
- package/dist/{components → app}/file-trigger.js +2 -2
- package/dist/app/filter-bar.d.ts +169 -0
- package/dist/app/filter-bar.js +346 -0
- package/dist/{components → app}/grid-list.d.ts +1 -1
- package/dist/{components → app}/grid-list.js +16 -18
- package/dist/app/index.d.ts +92 -0
- package/dist/app/index.js +92 -0
- package/dist/app/keyboard-help.d.ts +66 -0
- package/dist/app/keyboard-help.js +56 -0
- package/dist/{components → app}/menubar.js +5 -7
- package/dist/app/mixins/app-shell-controls.d.ts +46 -0
- package/dist/app/mixins/app-shell-controls.js +131 -0
- package/dist/app/mixins/auto-refresh.d.ts +29 -0
- package/dist/app/mixins/auto-refresh.js +66 -0
- package/dist/app/mixins/command-palette.d.ts +56 -0
- package/dist/app/mixins/command-palette.js +297 -0
- package/dist/app/mixins/copy-permalink.d.ts +26 -0
- package/dist/app/mixins/copy-permalink.js +54 -0
- package/dist/app/mixins/detail-sheet-keys.d.ts +28 -0
- package/dist/app/mixins/detail-sheet-keys.js +88 -0
- package/dist/{mixins → app/mixins}/drag-reorder.js +1 -1
- package/dist/{mixins → app/mixins}/drop-zone.js +1 -1
- package/dist/app/mixins/escape-link.d.ts +17 -0
- package/dist/app/mixins/escape-link.js +35 -0
- package/dist/{mixins → app/mixins}/grid-list-keys.js +2 -2
- package/dist/app/mixins/keyboard-help.d.ts +38 -0
- package/dist/app/mixins/keyboard-help.js +51 -0
- package/dist/{mixins → app/mixins}/menubar-keys.js +2 -2
- package/dist/app/mixins/optimistic-toggle-sync.d.ts +80 -0
- package/dist/app/mixins/optimistic-toggle-sync.js +153 -0
- package/dist/app/mixins/range-picker-keys.d.ts +18 -0
- package/dist/app/mixins/range-picker-keys.js +94 -0
- package/dist/{mixins → app/mixins}/resize-handle.js +3 -3
- package/dist/app/mixins/row-navigation.d.ts +85 -0
- package/dist/app/mixins/row-navigation.js +208 -0
- package/dist/app/mixins/save-bar-sync.d.ts +27 -0
- package/dist/app/mixins/save-bar-sync.js +106 -0
- package/dist/app/mixins/save-shortcut.d.ts +47 -0
- package/dist/app/mixins/save-shortcut.js +101 -0
- package/dist/app/mixins/save-status-sync.d.ts +77 -0
- package/dist/app/mixins/save-status-sync.js +159 -0
- package/dist/app/mixins/selection-bar-sync.d.ts +32 -0
- package/dist/app/mixins/selection-bar-sync.js +151 -0
- package/dist/app/mixins/split-view.d.ts +66 -0
- package/dist/app/mixins/split-view.js +319 -0
- package/dist/app/mixins/status-strip-keys.d.ts +17 -0
- package/dist/app/mixins/status-strip-keys.js +79 -0
- package/dist/app/mixins/submit-on-change.d.ts +16 -0
- package/dist/app/mixins/submit-on-change.js +28 -0
- package/dist/app/mixins/table-selection.d.ts +39 -0
- package/dist/app/mixins/table-selection.js +272 -0
- package/dist/app/mixins/toast-queue.d.ts +36 -0
- package/dist/app/mixins/toast-queue.js +77 -0
- package/dist/app/mixins/toast-stack.d.ts +20 -0
- package/dist/app/mixins/toast-stack.js +55 -0
- package/dist/{mixins/treeKeys.js → app/mixins/tree-keys.js} +2 -2
- package/dist/app/optimistic-toggle.d.ts +48 -0
- package/dist/app/optimistic-toggle.js +38 -0
- package/dist/app/page-header.d.ts +71 -0
- package/dist/app/page-header.js +249 -0
- package/dist/app/range-picker.d.ts +102 -0
- package/dist/app/range-picker.js +118 -0
- package/dist/{components → app}/resizable.js +7 -10
- package/dist/app/save-bar.d.ts +54 -0
- package/dist/app/save-bar.js +64 -0
- package/dist/app/save-status.d.ts +50 -0
- package/dist/app/save-status.js +54 -0
- package/dist/app/selection-bar.d.ts +101 -0
- package/dist/app/selection-bar.js +157 -0
- package/dist/app/settings-layout.d.ts +70 -0
- package/dist/app/settings-layout.js +112 -0
- package/dist/app/settings-section.d.ts +140 -0
- package/dist/app/settings-section.js +182 -0
- package/dist/{components → app}/shortcut-list.js +4 -3
- package/dist/app/skeleton.d.ts +79 -0
- package/dist/app/skeleton.js +185 -0
- package/dist/app/sparkline.d.ts +61 -0
- package/dist/app/sparkline.js +145 -0
- package/dist/app/split-view.d.ts +154 -0
- package/dist/app/split-view.js +272 -0
- package/dist/app/stat-card.d.ts +109 -0
- package/dist/app/stat-card.js +379 -0
- package/dist/app/status-strip.d.ts +70 -0
- package/dist/app/status-strip.js +155 -0
- package/dist/app/styles/action-row.d.ts +41 -0
- package/dist/app/styles/action-row.js +59 -0
- package/dist/{styles → app/styles}/chart-palette.d.ts +1 -1
- package/dist/{styles → app/styles}/graphic-host.d.ts +1 -1
- package/dist/{styles → app/styles}/legend-toggle.d.ts +1 -1
- package/dist/app/styles/stat-delta.d.ts +29 -0
- package/dist/app/styles/stat-delta.js +36 -0
- package/dist/app/styles/toast-stack.d.ts +21 -0
- package/dist/app/styles/toast-stack.js +54 -0
- package/dist/app/table.d.ts +327 -0
- package/dist/app/table.js +839 -0
- package/dist/{components → app}/toast.d.ts +105 -5
- package/dist/{components → app}/toast.js +101 -35
- package/dist/app/toasts.d.ts +49 -0
- package/dist/app/toasts.js +103 -0
- package/dist/{components → app}/toolbar.js +3 -3
- package/dist/{components → app}/tree.d.ts +1 -1
- package/dist/{components → app}/tree.js +10 -14
- package/dist/app/utils/app-shell-cookie.d.ts +21 -0
- package/dist/app/utils/app-shell-cookie.js +33 -0
- package/dist/{utils → app/utils}/chart-marker-indices.d.ts +9 -5
- package/dist/{utils → app/utils}/chart-marker-indices.js +9 -8
- package/dist/{utils → app/utils}/chart-path.d.ts +15 -11
- package/dist/{utils → app/utils}/chart-path.js +48 -20
- package/dist/{utils → app/utils}/chart-scale.js +1 -1
- package/dist/app/utils/edited-time.d.ts +19 -0
- package/dist/app/utils/edited-time.js +35 -0
- package/dist/app/utils/key-target.d.ts +23 -0
- package/dist/app/utils/key-target.js +48 -0
- package/dist/app/utils/search-params.d.ts +69 -0
- package/dist/app/utils/search-params.js +132 -0
- package/dist/app/utils/shortcut-groups.d.ts +21 -0
- package/dist/app/utils/shortcut-groups.js +53 -0
- package/dist/app/utils/split-view-layout.d.ts +48 -0
- package/dist/app/utils/split-view-layout.js +71 -0
- package/dist/app/view-options.d.ts +99 -0
- package/dist/app/view-options.js +182 -0
- package/dist/behaviors/index.d.ts +0 -5
- package/dist/behaviors/index.js +0 -5
- package/dist/{components → chat}/attachment.d.ts +1 -1
- package/dist/{components → chat}/attachment.js +17 -23
- package/dist/{behaviors → chat/behaviors}/scroll-follow-model.js +1 -1
- package/dist/{components → chat}/bubble.js +14 -14
- package/dist/chat/index.d.ts +16 -0
- package/dist/chat/index.js +16 -0
- package/dist/{components → chat}/marker.js +6 -8
- package/dist/{components → chat}/message-scroller.d.ts +1 -1
- package/dist/{components → chat}/message-scroller.js +12 -18
- package/dist/{components → chat}/message.js +10 -12
- package/dist/{mixins → chat/mixins}/message-follow.js +2 -2
- package/dist/{components → color}/color-area.js +7 -10
- package/dist/{components → color}/color-field.js +7 -6
- package/dist/{components → color}/color-picker.d.ts +1 -1
- package/dist/{components → color}/color-picker.js +9 -12
- package/dist/{components → color}/color-slider.js +10 -13
- package/dist/{components → color}/color-swatch-picker.js +4 -5
- package/dist/{components → color}/color-swatch.js +3 -4
- package/dist/{components → color}/color-wheel.js +5 -6
- package/dist/color/index.d.ts +21 -0
- package/dist/color/index.js +21 -0
- package/dist/{mixins → color/mixins}/color-area-drag.d.ts +1 -1
- package/dist/{mixins → color/mixins}/color-area-drag.js +2 -2
- package/dist/{mixins → color/mixins}/color-preview.js +1 -1
- package/dist/{mixins → color/mixins}/color-wheel-drag.js +1 -1
- package/dist/{styles → color/styles}/rtl-aware-gradient-direction.d.ts +1 -1
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/accordion.js +19 -15
- package/dist/components/alert-dialog.js +5 -4
- package/dist/components/alert.js +10 -20
- package/dist/components/aspect-ratio.js +3 -4
- package/dist/components/avatar.d.ts +6 -6
- package/dist/components/avatar.js +56 -8
- package/dist/components/badge.js +11 -9
- package/dist/components/banner.d.ts +61 -0
- package/dist/components/banner.js +101 -0
- package/dist/components/breadcrumbs.js +7 -9
- package/dist/components/button.d.ts +8 -6
- package/dist/components/button.js +22 -14
- package/dist/components/calendar.js +13 -24
- package/dist/components/card.js +9 -11
- package/dist/components/carousel.d.ts +1 -1
- package/dist/components/carousel.js +12 -20
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +2 -2
- package/dist/components/combobox.js +6 -6
- package/dist/components/command.js +10 -14
- package/dist/components/confirm.d.ts +54 -5
- package/dist/components/confirm.js +44 -5
- package/dist/components/cta-group.d.ts +30 -14
- package/dist/components/cta-group.js +29 -10
- package/dist/components/date-field.js +2 -1
- package/dist/components/date-picker.js +4 -5
- package/dist/components/date-range-picker.js +3 -2
- package/dist/components/description.js +2 -1
- package/dist/components/dialog-dismiss.d.ts +18 -0
- package/dist/components/dialog-dismiss.js +15 -0
- package/dist/components/dialog.js +11 -15
- package/dist/components/disclosure.js +10 -14
- package/dist/components/drawer.js +3 -4
- package/dist/components/field-error.js +3 -3
- package/dist/components/form.js +2 -1
- package/dist/components/group.d.ts +14 -0
- package/dist/components/group.js +68 -13
- package/dist/components/header.js +3 -3
- package/dist/components/heading-scope.js +2 -1
- package/dist/components/heading.d.ts +4 -4
- package/dist/components/heading.js +7 -7
- package/dist/components/highlight.js +17 -12
- package/dist/components/hover-card.js +6 -8
- package/dist/components/image-placeholder.js +13 -19
- package/dist/components/index.d.ts +11 -38
- package/dist/components/index.js +11 -38
- package/dist/components/input.js +12 -7
- package/dist/components/item.js +10 -19
- package/dist/components/keyboard.js +3 -3
- package/dist/components/label.js +2 -1
- package/dist/components/link-button.d.ts +7 -5
- package/dist/components/link-button.js +24 -13
- package/dist/components/link.js +3 -4
- package/dist/components/listbox.js +6 -11
- package/dist/components/menu.js +5 -6
- package/dist/components/meter.js +5 -6
- package/dist/components/modal.js +9 -11
- package/dist/components/nav-link.d.ts +1 -1
- package/dist/components/nav-link.js +3 -4
- package/dist/components/navigation-menu.js +17 -23
- package/dist/components/number-field.js +8 -10
- package/dist/components/otp-field.js +2 -1
- package/dist/components/overlay-arrow.js +3 -4
- package/dist/components/pagination.js +8 -10
- package/dist/components/popover.js +3 -4
- package/dist/components/progress-bar.js +5 -5
- package/dist/components/property-list.d.ts +76 -0
- package/dist/components/property-list.js +175 -0
- package/dist/components/radio-group.js +5 -7
- package/dist/components/range-calendar.js +3 -3
- package/dist/components/relative-time.d.ts +72 -0
- package/dist/components/relative-time.js +45 -0
- package/dist/components/scroll-area.js +4 -5
- package/dist/components/search-field.js +8 -11
- package/dist/components/section.js +2 -1
- package/dist/components/select.js +10 -22
- package/dist/components/selection-indicator.js +3 -3
- package/dist/components/sentinel-row.js +3 -3
- package/dist/components/separator.js +3 -3
- package/dist/components/shared-element.js +2 -1
- package/dist/components/sheet.js +6 -7
- package/dist/components/sidebar.js +48 -76
- package/dist/components/slider.js +8 -10
- package/dist/components/spinner.js +3 -3
- package/dist/components/status-dot.d.ts +62 -0
- package/dist/components/status-dot.js +99 -0
- package/dist/components/switch.js +3 -3
- package/dist/components/tabs.js +9 -12
- package/dist/components/tag-group.js +7 -9
- package/dist/components/text-field.d.ts +17 -2
- package/dist/components/text-field.js +14 -4
- package/dist/components/text.js +2 -1
- package/dist/components/textarea.js +3 -4
- package/dist/components/time-field.js +2 -1
- package/dist/components/timeline.d.ts +67 -0
- package/dist/components/timeline.js +159 -0
- package/dist/components/toggle-button.js +5 -7
- package/dist/components/tooltip.js +3 -3
- package/dist/components/typeset.d.ts +2 -1
- package/dist/components/typeset.js +131 -123
- package/dist/components/youtube-embed.js +2 -1
- package/dist/docs/anchor-heading.d.ts +41 -0
- package/dist/docs/anchor-heading.js +62 -0
- package/dist/docs/callout.d.ts +46 -0
- package/dist/docs/callout.js +61 -0
- package/dist/docs/code-block.d.ts +74 -0
- package/dist/docs/code-block.js +322 -0
- package/dist/docs/code-tabs-sync.d.ts +26 -0
- package/dist/docs/code-tabs-sync.js +12 -0
- package/dist/docs/code-tabs.d.ts +53 -0
- package/dist/docs/code-tabs.js +102 -0
- package/dist/docs/copy-button.d.ts +31 -0
- package/dist/docs/copy-button.js +49 -0
- package/dist/docs/docs-feedback.d.ts +67 -0
- package/dist/docs/docs-feedback.js +74 -0
- package/dist/docs/docs-footer.d.ts +40 -0
- package/dist/docs/docs-footer.js +45 -0
- package/dist/docs/docs-hub.d.ts +93 -0
- package/dist/docs/docs-hub.js +142 -0
- package/dist/docs/docs-layout.d.ts +90 -0
- package/dist/docs/docs-layout.js +166 -0
- package/dist/docs/docs-nav-tools.d.ts +25 -0
- package/dist/docs/docs-nav-tools.js +14 -0
- package/dist/docs/docs-nav.d.ts +57 -0
- package/dist/docs/docs-nav.js +76 -0
- package/dist/docs/docs-not-found.d.ts +68 -0
- package/dist/docs/docs-not-found.js +100 -0
- package/dist/docs/docs-page-header.d.ts +55 -0
- package/dist/docs/docs-page-header.js +54 -0
- package/dist/docs/docs-pager.d.ts +50 -0
- package/dist/docs/docs-pager.js +75 -0
- package/dist/docs/file-tree.d.ts +57 -0
- package/dist/docs/file-tree.js +142 -0
- package/dist/docs/index.d.ts +38 -0
- package/dist/docs/index.js +38 -0
- package/dist/docs/install-command.d.ts +54 -0
- package/dist/docs/install-command.js +33 -0
- package/dist/docs/mixins/code-tabs-sync.d.ts +47 -0
- package/dist/docs/mixins/code-tabs-sync.js +137 -0
- package/dist/docs/mixins/copy-feedback.d.ts +25 -0
- package/dist/docs/mixins/copy-feedback.js +49 -0
- package/dist/docs/mixins/copy-from-url.d.ts +27 -0
- package/dist/docs/mixins/copy-from-url.js +95 -0
- package/dist/docs/mixins/docs-nav-tools.d.ts +27 -0
- package/dist/docs/mixins/docs-nav-tools.js +124 -0
- package/dist/docs/mixins/toc-spy.d.ts +30 -0
- package/dist/docs/mixins/toc-spy.js +165 -0
- package/dist/docs/next-steps.d.ts +45 -0
- package/dist/docs/next-steps.js +80 -0
- package/dist/docs/page-actions.d.ts +77 -0
- package/dist/docs/page-actions.js +78 -0
- package/dist/docs/plan-notice.d.ts +28 -0
- package/dist/docs/plan-notice.js +33 -0
- package/dist/docs/props-table.d.ts +64 -0
- package/dist/docs/props-table.js +147 -0
- package/dist/docs/steps.d.ts +51 -0
- package/dist/docs/steps.js +112 -0
- package/dist/docs/table-of-contents.d.ts +49 -0
- package/dist/docs/table-of-contents.js +139 -0
- package/dist/docs/ui-label.d.ts +51 -0
- package/dist/docs/ui-label.js +64 -0
- package/dist/docs/utils/docs-tree.d.ts +81 -0
- package/dist/docs/utils/docs-tree.js +57 -0
- package/dist/docs/utils/reveal-in-scroller.d.ts +19 -0
- package/dist/docs/utils/reveal-in-scroller.js +43 -0
- package/dist/landing/accent-text.d.ts +47 -0
- package/dist/landing/accent-text.js +107 -0
- package/dist/landing/animations/entrance.d.ts +40 -0
- package/dist/landing/animations/entrance.js +52 -0
- package/dist/landing/announcement-chip.d.ts +45 -0
- package/dist/landing/announcement-chip.js +36 -0
- package/dist/landing/author-band.d.ts +78 -0
- package/dist/landing/author-band.js +190 -0
- package/dist/landing/bento.d.ts +99 -0
- package/dist/landing/bento.js +138 -0
- package/dist/landing/changelog-strip.d.ts +74 -0
- package/dist/landing/changelog-strip.js +201 -0
- package/dist/{patterns → landing}/check-row.js +5 -7
- package/dist/{patterns → landing}/closing-cta.d.ts +4 -4
- package/dist/{patterns → landing}/closing-cta.js +8 -8
- package/dist/landing/code-stage.d.ts +93 -0
- package/dist/landing/code-stage.js +434 -0
- package/dist/landing/crosshair.d.ts +44 -0
- package/dist/landing/crosshair.js +48 -0
- package/dist/landing/curriculum.d.ts +79 -0
- package/dist/landing/curriculum.js +194 -0
- package/dist/landing/drawn-chart.d.ts +74 -0
- package/dist/landing/drawn-chart.js +377 -0
- package/dist/landing/event-ticker.d.ts +71 -0
- package/dist/landing/event-ticker.js +331 -0
- package/dist/landing/fan-out-diagram.d.ts +70 -0
- package/dist/landing/fan-out-diagram.js +481 -0
- package/dist/{patterns → landing}/faq-band.d.ts +5 -5
- package/dist/{patterns → landing}/faq-band.js +13 -14
- package/dist/landing/feature-band.d.ts +108 -0
- package/dist/landing/feature-band.js +67 -0
- package/dist/landing/feature.d.ts +148 -0
- package/dist/landing/feature.js +219 -0
- package/dist/landing/flow-diagram.d.ts +62 -0
- package/dist/landing/flow-diagram.js +240 -0
- package/dist/{patterns → landing}/icon-well.d.ts +17 -7
- package/dist/landing/icon-well.js +31 -0
- package/dist/landing/index.d.ts +52 -0
- package/dist/landing/index.js +52 -0
- package/dist/{patterns → landing}/install-tabs.js +4 -5
- package/dist/landing/landing-header.d.ts +103 -0
- package/dist/landing/landing-header.js +110 -0
- package/dist/landing/landing-hero.d.ts +119 -0
- package/dist/landing/landing-hero.js +172 -0
- package/dist/{components/marketing-section.d.ts → landing/landing-section.d.ts} +38 -15
- package/dist/landing/landing-section.js +183 -0
- package/dist/landing/logo-cloud.d.ts +56 -0
- package/dist/landing/logo-cloud.js +160 -0
- package/dist/landing/logo-sentence.d.ts +38 -0
- package/dist/landing/logo-sentence.js +51 -0
- package/dist/landing/marquee.d.ts +44 -0
- package/dist/landing/marquee.js +97 -0
- package/dist/landing/motion-loop.d.ts +43 -0
- package/dist/landing/motion-loop.js +42 -0
- package/dist/landing/pricing-band.d.ts +94 -0
- package/dist/landing/pricing-band.js +151 -0
- package/dist/landing/product-frame.d.ts +108 -0
- package/dist/landing/product-frame.js +202 -0
- package/dist/{patterns → landing}/proof-strip.d.ts +4 -4
- package/dist/{patterns → landing}/proof-strip.js +3 -3
- package/dist/landing/rails.d.ts +45 -0
- package/dist/landing/rails.js +69 -0
- package/dist/landing/rotating-text.d.ts +44 -0
- package/dist/landing/rotating-text.js +67 -0
- package/dist/landing/segmented-stage.d.ts +75 -0
- package/dist/landing/segmented-stage.js +141 -0
- package/dist/landing/sequence-diagram.d.ts +65 -0
- package/dist/landing/sequence-diagram.js +348 -0
- package/dist/landing/site-footer.d.ts +100 -0
- package/dist/landing/site-footer.js +274 -0
- package/dist/landing/site-header.d.ts +126 -0
- package/dist/landing/site-header.js +595 -0
- package/dist/{components → landing}/split.d.ts +12 -5
- package/dist/{components → landing}/split.js +26 -18
- package/dist/landing/sponsor-wall.d.ts +81 -0
- package/dist/landing/sponsor-wall.js +241 -0
- package/dist/{components → landing}/stat-strip.d.ts +31 -7
- package/dist/landing/stat-strip.js +105 -0
- package/dist/landing/step-list.d.ts +73 -0
- package/dist/landing/step-list.js +182 -0
- package/dist/landing/styles/card-grid.d.ts +115 -0
- package/dist/landing/styles/card-grid.js +295 -0
- package/dist/{patterns → landing}/tabbed-stage.d.ts +26 -8
- package/dist/landing/tabbed-stage.js +233 -0
- package/dist/landing/testimonial-band.d.ts +110 -0
- package/dist/landing/testimonial-band.js +164 -0
- package/dist/landing/typed-terminal.d.ts +62 -0
- package/dist/landing/typed-terminal.js +233 -0
- package/dist/landing/utils/pause-toggle.d.ts +37 -0
- package/dist/landing/utils/pause-toggle.js +71 -0
- package/dist/mixins/confirm-phrase.d.ts +19 -0
- package/dist/mixins/confirm-phrase.js +56 -0
- package/dist/mixins/copy-to-clipboard.d.ts +6 -0
- package/dist/mixins/copy-to-clipboard.js +17 -1
- package/dist/mixins/dialog-dismiss.d.ts +21 -0
- package/dist/mixins/dialog-dismiss.js +62 -0
- package/dist/mixins/index.d.ts +4 -15
- package/dist/mixins/index.js +4 -15
- package/dist/mixins/viewer-time.d.ts +20 -0
- package/dist/mixins/viewer-time.js +40 -0
- package/dist/styles/index.d.ts +3 -5
- package/dist/styles/index.js +3 -5
- package/dist/styles/landing.d.ts +200 -0
- package/dist/styles/landing.js +516 -0
- package/dist/styles/segmented-control.d.ts +49 -0
- package/dist/styles/segmented-control.js +71 -0
- package/dist/styles/surface-control.d.ts +18 -0
- package/dist/styles/surface-control.js +31 -0
- package/dist/test/table.d.ts +65 -0
- package/dist/test/table.js +108 -0
- package/dist/utils/eyebrow.d.ts +39 -0
- package/dist/utils/eyebrow.js +21 -0
- package/dist/utils/index.d.ts +2 -5
- package/dist/utils/index.js +2 -5
- package/dist/utils/relative-time.d.ts +44 -0
- package/dist/utils/relative-time.js +69 -0
- package/package.json +16 -6
- package/src/theme.css +87 -22
- package/dist/components/empty.d.ts +0 -91
- package/dist/components/empty.js +0 -151
- package/dist/components/feature.d.ts +0 -102
- package/dist/components/feature.js +0 -150
- package/dist/components/logo-cloud.d.ts +0 -42
- package/dist/components/logo-cloud.js +0 -41
- package/dist/components/marketing-header.d.ts +0 -71
- package/dist/components/marketing-header.js +0 -81
- package/dist/components/marketing-section.js +0 -117
- package/dist/components/skeleton.d.ts +0 -36
- package/dist/components/skeleton.js +0 -38
- package/dist/components/stat-strip.js +0 -65
- package/dist/components/table.d.ts +0 -152
- package/dist/components/table.js +0 -238
- package/dist/patterns/accent-text.d.ts +0 -30
- package/dist/patterns/accent-text.js +0 -17
- package/dist/patterns/announcement-chip.d.ts +0 -41
- package/dist/patterns/announcement-chip.js +0 -49
- package/dist/patterns/bento.d.ts +0 -68
- package/dist/patterns/bento.js +0 -94
- package/dist/patterns/code-stage.d.ts +0 -63
- package/dist/patterns/code-stage.js +0 -82
- package/dist/patterns/feature-band.d.ts +0 -85
- package/dist/patterns/feature-band.js +0 -50
- package/dist/patterns/icon-well.js +0 -38
- package/dist/patterns/index.d.ts +0 -23
- package/dist/patterns/index.js +0 -23
- package/dist/patterns/landing-hero.d.ts +0 -93
- package/dist/patterns/landing-hero.js +0 -126
- package/dist/patterns/product-frame.d.ts +0 -60
- package/dist/patterns/product-frame.js +0 -70
- package/dist/patterns/step-list.d.ts +0 -47
- package/dist/patterns/step-list.js +0 -85
- package/dist/patterns/tabbed-stage.js +0 -77
- package/dist/styles/marketing.d.ts +0 -120
- package/dist/styles/marketing.js +0 -225
- package/dist/utils/semantic-color-panel.d.ts +0 -35
- package/dist/utils/semantic-color-panel.js +0 -28
- /package/dist/{behaviors → app/behaviors}/drag-session.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/resize-session.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/resize-session.js +0 -0
- /package/dist/{behaviors → app/behaviors}/selection-model.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/selection-model.js +0 -0
- /package/dist/{components → app}/drop-indicator.d.ts +0 -0
- /package/dist/{components → app}/file-trigger.d.ts +0 -0
- /package/dist/{components → app}/menubar.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/chart-tooltip.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/chart-tooltip.js +0 -0
- /package/dist/{mixins → app/mixins}/context-menu.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/context-menu.js +0 -0
- /package/dist/{mixins → app/mixins}/drag-reorder.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/drop-zone.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/grid-list-keys.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/menubar-keys.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/resize-handle.d.ts +0 -0
- /package/dist/{mixins/treeKeys.d.ts → app/mixins/tree-keys.d.ts} +0 -0
- /package/dist/{components → app}/resizable.d.ts +0 -0
- /package/dist/{components → app}/shortcut-list.d.ts +0 -0
- /package/dist/{styles → app/styles}/chart-palette.js +0 -0
- /package/dist/{styles → app/styles}/graphic-host.js +0 -0
- /package/dist/{styles → app/styles}/legend-toggle.js +0 -0
- /package/dist/{components → app}/toolbar.d.ts +0 -0
- /package/dist/{utils → app/utils}/chart-scale.d.ts +0 -0
- /package/dist/{behaviors → chat/behaviors}/scroll-follow-model.d.ts +0 -0
- /package/dist/{components → chat}/bubble.d.ts +0 -0
- /package/dist/{components → chat}/marker.d.ts +0 -0
- /package/dist/{components → chat}/message.d.ts +0 -0
- /package/dist/{mixins → chat/mixins}/attachment-trigger.d.ts +0 -0
- /package/dist/{mixins → chat/mixins}/attachment-trigger.js +0 -0
- /package/dist/{mixins → chat/mixins}/message-follow.d.ts +0 -0
- /package/dist/{components → color}/color-area.d.ts +0 -0
- /package/dist/{components → color}/color-field.d.ts +0 -0
- /package/dist/{components → color}/color-slider.d.ts +0 -0
- /package/dist/{components → color}/color-swatch-picker.d.ts +0 -0
- /package/dist/{components → color}/color-swatch.d.ts +0 -0
- /package/dist/{components → color}/color-wheel.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-channel-sync.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-channel-sync.js +0 -0
- /package/dist/{mixins → color/mixins}/color-preview.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-wheel-drag.d.ts +0 -0
- /package/dist/{styles → color/styles}/rtl-aware-gradient-direction.js +0 -0
- /package/dist/{utils → color/utils}/hue-spectrum.d.ts +0 -0
- /package/dist/{utils → color/utils}/hue-spectrum.js +0 -0
- /package/dist/{patterns → landing}/check-row.d.ts +0 -0
- /package/dist/{patterns → landing}/install-tabs.d.ts +0 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @copyright Sergio Xalambrí 2026
|
|
10
10
|
*/
|
|
11
11
|
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
12
|
-
import type { PieAngles } from "
|
|
12
|
+
import type { PieAngles } from "./utils/chart-scale.js";
|
|
13
13
|
/**
|
|
14
14
|
* Renders the series switcher's host: a `role="group"` `<div>` laying its
|
|
15
15
|
* {@link Chart.Legend.Item} children in a wrapping row. Must render as a
|
|
@@ -147,8 +147,12 @@ export declare namespace Chart {
|
|
|
147
147
|
interface LinePoint {
|
|
148
148
|
/** Horizontal data value, mapped across the ancestor {@link Chart}'s `xDomain`. */
|
|
149
149
|
x: number;
|
|
150
|
-
/**
|
|
151
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Vertical data value, mapped across the ancestor {@link Chart}'s `yDomain`. `null` records
|
|
152
|
+
* a sample with no data: the line breaks around it and it gets no marker, while every other
|
|
153
|
+
* point keeps its `x` position, so series sharing an `xDomain` stay aligned.
|
|
154
|
+
*/
|
|
155
|
+
y: number | null;
|
|
152
156
|
/**
|
|
153
157
|
* Accessible name and hover tooltip text for this point, read by the
|
|
154
158
|
* native `<title>` nested in its marker when the point falls among the
|
|
@@ -164,12 +168,17 @@ export declare namespace Chart {
|
|
|
164
168
|
interface LineProps extends Omit<TagProps<"g">, "children" | "points"> {
|
|
165
169
|
/**
|
|
166
170
|
* The series' data points, in draw order along `x`. The plotted path
|
|
167
|
-
* connects every point
|
|
168
|
-
*
|
|
171
|
+
* connects every point with data, breaking at each `null` one; the accessible
|
|
172
|
+
* markers render on a representative spread of them, chosen through `markerCount`.
|
|
169
173
|
*/
|
|
170
174
|
points: readonly LinePoint[];
|
|
171
175
|
/** Categorical color. Defaults to {@link DEFAULT_LINE_COLOR}. */
|
|
172
176
|
color?: Color;
|
|
177
|
+
/**
|
|
178
|
+
* Draws the series as the comparison period, dashed and muted behind the current one,
|
|
179
|
+
* in `--ui-chart-comparison-color` with `--ui-chart-comparison-dash`; `color` is unused.
|
|
180
|
+
*/
|
|
181
|
+
comparison?: boolean;
|
|
173
182
|
/**
|
|
174
183
|
* Approximate number of accessible, hoverable markers placed along
|
|
175
184
|
* `points`. Each marker snaps to the point closest to one of this many
|
|
@@ -197,8 +206,11 @@ export declare namespace Chart {
|
|
|
197
206
|
interface AreaPoint {
|
|
198
207
|
/** Horizontal data value, mapped across the ancestor {@link Chart}'s `xDomain`. */
|
|
199
208
|
x: number;
|
|
200
|
-
/**
|
|
201
|
-
|
|
209
|
+
/**
|
|
210
|
+
* Vertical data value, mapped across the ancestor {@link Chart}'s `yDomain`. `null` records
|
|
211
|
+
* a sample with no data: the filled region breaks around it and it gets no marker.
|
|
212
|
+
*/
|
|
213
|
+
y: number | null;
|
|
202
214
|
/**
|
|
203
215
|
* Accessible name and hover tooltip text for this point, read by the
|
|
204
216
|
* native `<title>` nested in its marker when the point falls among the
|
|
@@ -340,12 +352,52 @@ export declare namespace Chart {
|
|
|
340
352
|
interface ValueProps extends TagProps<"span"> {
|
|
341
353
|
}
|
|
342
354
|
}
|
|
355
|
+
/** Semantic role a {@link Chart.Threshold} or {@link Chart.Band} is drawn in. */
|
|
356
|
+
type Tone = "brand" | "neutral" | "success" | "warning" | "danger";
|
|
357
|
+
/** Props accepted by {@link Chart.Threshold}. */
|
|
358
|
+
interface ThresholdProps extends Omit<TagProps<"g">, "children"> {
|
|
359
|
+
/** The value the line marks, mapped across the ancestor {@link Chart}'s `yDomain`. */
|
|
360
|
+
y: number;
|
|
361
|
+
/** Text set at the line's end ("SLO 300 ms"), also its accessible name. */
|
|
362
|
+
label?: string;
|
|
363
|
+
/** @default "danger" */
|
|
364
|
+
tone?: Tone;
|
|
365
|
+
}
|
|
366
|
+
/** Props accepted by {@link Chart.Band}. */
|
|
367
|
+
interface BandProps extends Omit<TagProps<"g">, "children"> {
|
|
368
|
+
/** Where the range starts, mapped across the ancestor {@link Chart}'s `xDomain`. */
|
|
369
|
+
from: number;
|
|
370
|
+
/** Where the range ends, on the same scale as `from`. */
|
|
371
|
+
to: number;
|
|
372
|
+
/**
|
|
373
|
+
* Text set in a tag at the band's top start ("Incident #42", "Deploy"), also its accessible
|
|
374
|
+
* name. The tag renders at the same size however wide the chart is drawn.
|
|
375
|
+
*/
|
|
376
|
+
label?: string;
|
|
377
|
+
/**
|
|
378
|
+
* `"hatched"` draws the range with the hatch {@link Chart.Bar} uses for a `null` value, so a
|
|
379
|
+
* stretch with no data (an outage window nothing was recorded for) reads as unknown.
|
|
380
|
+
*
|
|
381
|
+
* @default "fill"
|
|
382
|
+
*/
|
|
383
|
+
variant?: "fill" | "hatched";
|
|
384
|
+
/**
|
|
385
|
+
* Colour of the edge rules, the label tag and, for `variant="fill"`, the shading.
|
|
386
|
+
*
|
|
387
|
+
* @default "danger" ("neutral" when `variant` is "hatched")
|
|
388
|
+
*/
|
|
389
|
+
tone?: Tone;
|
|
390
|
+
}
|
|
343
391
|
/**
|
|
344
392
|
* A single series' plotted value at one {@link Chart.BarRow}'s category.
|
|
345
393
|
*/
|
|
346
394
|
interface BarValue {
|
|
347
|
-
/**
|
|
348
|
-
|
|
395
|
+
/**
|
|
396
|
+
* Numeric magnitude this bar represents, mapped across {@link Chart.BarProps.domain}.
|
|
397
|
+
* `null` records a period with no data, drawn as a full-height hatched bar so it never
|
|
398
|
+
* reads as zero.
|
|
399
|
+
*/
|
|
400
|
+
value: number | null;
|
|
349
401
|
/**
|
|
350
402
|
* Accessible name and hover tooltip text for this bar, read by the
|
|
351
403
|
* native `<title>` nested inside it — typically a formatted description of
|
|
@@ -454,6 +506,8 @@ export declare namespace Chart {
|
|
|
454
506
|
var Legend: typeof ChartLegend;
|
|
455
507
|
var Line: (handle: Handle<Chart.LineProps>) => () => import("remix/component").RemixElement;
|
|
456
508
|
var Area: (handle: Handle<Chart.AreaProps>) => () => import("remix/component").RemixElement;
|
|
509
|
+
var Threshold: (handle: Handle<Chart.ThresholdProps>) => () => import("remix/component").RemixElement;
|
|
510
|
+
var Band: (handle: Handle<Chart.BandProps>) => () => import("remix/component").RemixElement;
|
|
457
511
|
var Pie: (handle: Handle<Chart.PieProps>) => () => import("remix/component").RemixElement;
|
|
458
512
|
var Bar: (handle: Handle<Chart.BarProps>) => () => import("remix/component").RemixElement;
|
|
459
513
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
|
|
2
2
|
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
3
3
|
import { bg, fg, fill, fillOpacity, outline, stroke, strokeLinecap, strokeLinejoin, strokeWidth, vectorEffect, } from "@sdxc/u/color";
|
|
4
4
|
import { opacity, rounded, shadow, transition, transitionDuration } from "@sdxc/u/effects";
|
|
5
|
-
import { cursor, pointerEvents, raw, userSelect } from "@sdxc/u/general";
|
|
5
|
+
import { cursor, pointerEvents, raw, userSelect, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { absolute, block, flex, flexWrap, gap, inlineBlock, inlineFlex, items, relative, shrink, } from "@sdxc/u/layout";
|
|
7
7
|
import { media } from "@sdxc/u/responsive";
|
|
8
8
|
import { bs, is, pb, pi } from "@sdxc/u/size";
|
|
@@ -12,12 +12,12 @@ import { scaleProperty, translateProperty } from "@sdxc/u/transform";
|
|
|
12
12
|
import { fontSize, leading, nowrap, tabularNums, textDecoration, weight } from "@sdxc/u/typography";
|
|
13
13
|
import { attrs } from "remix/component";
|
|
14
14
|
import { durations, easings } from "../animations/tokens.js";
|
|
15
|
-
import { CHART_COLOR_SLOT_COUNT, chartPalette } from "../styles/chart-palette.js";
|
|
16
|
-
import { legendToggle } from "../styles/legend-toggle.js";
|
|
17
|
-
import { computeMarkerIndices } from "../utils/chart-marker-indices.js";
|
|
18
|
-
import { arcPath, areaPath, linePath } from "../utils/chart-path.js";
|
|
19
|
-
import { bandScale, linearScale, pieAngles, ticks } from "../utils/chart-scale.js";
|
|
20
15
|
import { warnIfNoAccessibleLabel } from "../utils/warn-if-no-accessible-name.js";
|
|
16
|
+
import { CHART_COLOR_SLOT_COUNT, chartPalette } from "./styles/chart-palette.js";
|
|
17
|
+
import { legendToggle } from "./styles/legend-toggle.js";
|
|
18
|
+
import { computeMarkerIndices } from "./utils/chart-marker-indices.js";
|
|
19
|
+
import { arcPath, areaPath, linePath } from "./utils/chart-path.js";
|
|
20
|
+
import { bandScale, linearScale, pieAngles, ticks } from "./utils/chart-scale.js";
|
|
21
21
|
/** Categorical color {@link Chart.Line} falls back to when `color` is omitted. */
|
|
22
22
|
const DEFAULT_LINE_COLOR = 1;
|
|
23
23
|
/** Categorical color {@link Chart.Area} falls back to when `color` is omitted. */
|
|
@@ -96,14 +96,7 @@ function ChartLegend(handle) {
|
|
|
96
96
|
return () => {
|
|
97
97
|
let { mix, ...rest } = handle.props;
|
|
98
98
|
warnIfNoAccessibleLabel(handle.props, 'Chart.Legend: needs an "aria-label" or "aria-labelledby" identifying this legend for assistive technology.');
|
|
99
|
-
return (_jsx("div", { "data-slot": "legend", ...rest, mix: [
|
|
100
|
-
attrs({ role: DEFAULT_LEGEND_ROLE }),
|
|
101
|
-
flex(),
|
|
102
|
-
flexWrap(),
|
|
103
|
-
items("center"),
|
|
104
|
-
gap(4),
|
|
105
|
-
mix,
|
|
106
|
-
] }));
|
|
99
|
+
return (_jsx("div", { "data-slot": "legend", ...rest, mix: mergeMix([attrs({ role: DEFAULT_LEGEND_ROLE }), flex(), flexWrap(), items("center"), gap(4)], mix) }));
|
|
107
100
|
};
|
|
108
101
|
}
|
|
109
102
|
/**
|
|
@@ -147,7 +140,7 @@ function ChartLegendItem(handle) {
|
|
|
147
140
|
shrink(),
|
|
148
141
|
bg("currentColor"),
|
|
149
142
|
parts?.swatch,
|
|
150
|
-
] }), _jsx("input", { type: "checkbox", defaultChecked: resolvedChecked, ...rest, mix:
|
|
143
|
+
] }), _jsx("input", { type: "checkbox", defaultChecked: resolvedChecked, ...rest, mix: mergeMix(visuallyHidden(), mix) }), children] }));
|
|
151
144
|
};
|
|
152
145
|
}
|
|
153
146
|
ChartLegend.Item = ChartLegendItem;
|
|
@@ -176,17 +169,39 @@ export function Chart(handle) {
|
|
|
176
169
|
return () => {
|
|
177
170
|
let { width, height, xDomain, yDomain, mix, ...rest } = handle.props;
|
|
178
171
|
handle.context.set({ width, height, xDomain, yDomain });
|
|
179
|
-
return (_jsx("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", ...rest, mix: [
|
|
172
|
+
return (_jsx("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", ...rest, mix: mergeMix([
|
|
173
|
+
legendToggle(),
|
|
174
|
+
block(),
|
|
175
|
+
is("full"),
|
|
176
|
+
bs("auto"),
|
|
177
|
+
raw({ container: "ui-chart / inline-size", aspectRatio: `${width} / ${height}` }),
|
|
178
|
+
], mix) }));
|
|
180
179
|
};
|
|
181
180
|
}
|
|
182
181
|
Chart.Legend = ChartLegend;
|
|
182
|
+
/**
|
|
183
|
+
* Maps a series' data points onto pixels, keeping a `null` slot for every point with no data
|
|
184
|
+
* so the path builders break the series there and the markers skip it.
|
|
185
|
+
*/
|
|
186
|
+
function scalePoints(points, x, y) {
|
|
187
|
+
return points.map((point) => (point.y === null ? null : { x: x(point.x), y: y(point.y) }));
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* The hatch every no-data mark fills with — a {@link Chart.Bar} with a `null` value and a
|
|
191
|
+
* hatched {@link Chart.Band} — so "unknown" reads the same wherever a chart shows it.
|
|
192
|
+
*
|
|
193
|
+
* @param id The pattern's id, unique on the page, which the hatched shape fills with as `url(#id)`.
|
|
194
|
+
*/
|
|
195
|
+
function renderNoDataPattern(id) {
|
|
196
|
+
return (_jsx("defs", { children: _jsx("pattern", { id: id, width: 6, height: 6, patternUnits: "userSpaceOnUse", patternTransform: "rotate(45)", children: _jsx("line", { x1: 0, y1: 0, x2: 0, y2: 6, mix: [stroke("var(--ui-neutral-border, GrayText)"), strokeWidth("2")] }) }) }));
|
|
197
|
+
}
|
|
183
198
|
/**
|
|
184
199
|
* Renders one series' representative point markers: a small focusable
|
|
185
200
|
* `<circle>` at each of `markerIndices`' scaled positions, nested with a
|
|
186
201
|
* `<title>` carrying that point's own `label`.
|
|
187
202
|
*
|
|
188
203
|
* @param points The series' original data points, read for each marker's label.
|
|
189
|
-
* @param scaledPoints Each point's already-scaled pixel position, in the same order as `points
|
|
204
|
+
* @param scaledPoints Each point's already-scaled pixel position, in the same order as `points`; `null` for a point with no data, which gets no marker.
|
|
190
205
|
* @param markerIndices Which of `points`' indices to render a marker for.
|
|
191
206
|
* @param markerMix Additional mixin(s) layered after each marker's own built-in styling.
|
|
192
207
|
* @returns The rendered `<circle>` markers.
|
|
@@ -195,7 +210,7 @@ function renderChartMarkers(points, scaledPoints, markerIndices, markerMix) {
|
|
|
195
210
|
return markerIndices.map((index) => {
|
|
196
211
|
let point = points[index];
|
|
197
212
|
let position = scaledPoints[index];
|
|
198
|
-
if (point === undefined || position === undefined)
|
|
213
|
+
if (point === undefined || position === undefined || position === null)
|
|
199
214
|
return null;
|
|
200
215
|
return (_jsx("circle", { cx: position.x, cy: position.y, tabIndex: 0, role: "img", mix: [
|
|
201
216
|
focusVisible(outline({ color: "brand.ring", offset: 2 })),
|
|
@@ -227,22 +242,35 @@ function renderChartMarkers(points, scaledPoints, markerIndices, markerMix) {
|
|
|
227
242
|
*/
|
|
228
243
|
Chart.Line = function ChartLine(handle) {
|
|
229
244
|
return () => {
|
|
230
|
-
let { points, color, markerCount, parts, mix, ...rest } = handle.props;
|
|
245
|
+
let { points, color, comparison, markerCount, parts, mix, ...rest } = handle.props;
|
|
231
246
|
let context = handle.context.get(Chart);
|
|
232
247
|
let resolvedColor = color ?? DEFAULT_LINE_COLOR;
|
|
233
248
|
let resolvedMarkerCount = markerCount ?? DEFAULT_MARKER_COUNT;
|
|
234
249
|
let x = linearScale(context.xDomain, [0, context.width]);
|
|
235
250
|
let y = linearScale(context.yDomain, [context.height, 0]);
|
|
236
|
-
let scaledPoints = points
|
|
251
|
+
let scaledPoints = scalePoints(points, x, y);
|
|
237
252
|
let d = linePath(scaledPoints);
|
|
238
253
|
let markerIndices = computeMarkerIndices(points, context.xDomain, resolvedMarkerCount);
|
|
239
|
-
return (_jsxs("g", { "data-color": String(resolvedColor),
|
|
254
|
+
return (_jsxs("g", { "data-color": comparison ? undefined : String(resolvedColor), "data-comparison": comparison ? "" : undefined, ...rest, mix: mergeMix([
|
|
255
|
+
chartPalette("color"),
|
|
256
|
+
comparison
|
|
257
|
+
? raw({
|
|
258
|
+
color: "var(--ui-chart-comparison-color, var(--ui-neutral-fg-muted, GrayText))",
|
|
259
|
+
})
|
|
260
|
+
: undefined,
|
|
261
|
+
], mix), children: [_jsx("path", { d: d, mix: [
|
|
240
262
|
attrs({ "aria-hidden": DEFAULT_PATH_ARIA_HIDDEN }),
|
|
241
263
|
fill("none"),
|
|
242
264
|
stroke("currentColor"),
|
|
243
265
|
strokeWidth("var(--ui-chart-line-width, 2px)"),
|
|
244
266
|
strokeLinejoin("round"),
|
|
245
267
|
strokeLinecap("round"),
|
|
268
|
+
comparison
|
|
269
|
+
? raw({
|
|
270
|
+
strokeDasharray: "var(--ui-chart-comparison-dash, 4 4)",
|
|
271
|
+
vectorEffect: "non-scaling-stroke",
|
|
272
|
+
})
|
|
273
|
+
: undefined,
|
|
246
274
|
parts?.path,
|
|
247
275
|
] }), renderChartMarkers(points, scaledPoints, markerIndices, parts?.marker)] }));
|
|
248
276
|
};
|
|
@@ -269,7 +297,7 @@ Chart.Line = function ChartLine(handle) {
|
|
|
269
297
|
function ChartTooltip(handle) {
|
|
270
298
|
return () => {
|
|
271
299
|
let { mix, ...rest } = handle.props;
|
|
272
|
-
return (_jsx("div", { "data-slot": "tooltip", ...rest, mix: [
|
|
300
|
+
return (_jsx("div", { "data-slot": "tooltip", ...rest, mix: mergeMix([
|
|
273
301
|
attrs({ "aria-hidden": DEFAULT_TOOLTIP_ARIA_HIDDEN }),
|
|
274
302
|
absolute(),
|
|
275
303
|
flex(),
|
|
@@ -300,8 +328,7 @@ function ChartTooltip(handle) {
|
|
|
300
328
|
leading(1.2),
|
|
301
329
|
pointerEvents(),
|
|
302
330
|
scaleProperty(0.95),
|
|
303
|
-
|
|
304
|
-
] }));
|
|
331
|
+
], mix) }));
|
|
305
332
|
};
|
|
306
333
|
}
|
|
307
334
|
/**
|
|
@@ -318,15 +345,7 @@ ChartTooltip.Swatch = function ChartTooltipSwatch(handle) {
|
|
|
318
345
|
return () => {
|
|
319
346
|
let { color, mix, ...rest } = handle.props;
|
|
320
347
|
let resolvedColor = color ?? DEFAULT_SWATCH_COLOR;
|
|
321
|
-
return (_jsx("span", { ...rest, "data-slot": "swatch", "data-color": String(resolvedColor), mix: [
|
|
322
|
-
chartPalette("backgroundColor"),
|
|
323
|
-
inlineBlock(),
|
|
324
|
-
is(2),
|
|
325
|
-
bs(2),
|
|
326
|
-
rounded("full"),
|
|
327
|
-
shrink(),
|
|
328
|
-
mix,
|
|
329
|
-
] }));
|
|
348
|
+
return (_jsx("span", { ...rest, "data-slot": "swatch", "data-color": String(resolvedColor), mix: mergeMix([chartPalette("backgroundColor"), inlineBlock(), is(2), bs(2), rounded("full"), shrink()], mix) }));
|
|
330
349
|
};
|
|
331
350
|
};
|
|
332
351
|
/**
|
|
@@ -342,7 +361,7 @@ ChartTooltip.Swatch = function ChartTooltipSwatch(handle) {
|
|
|
342
361
|
ChartTooltip.Label = function ChartTooltipLabel(handle) {
|
|
343
362
|
return () => {
|
|
344
363
|
let { mix, ...rest } = handle.props;
|
|
345
|
-
return _jsx("span", { ...rest, "data-slot": "label", mix:
|
|
364
|
+
return _jsx("span", { ...rest, "data-slot": "label", mix: mergeMix(opacity(75), mix) });
|
|
346
365
|
};
|
|
347
366
|
};
|
|
348
367
|
/**
|
|
@@ -358,7 +377,7 @@ ChartTooltip.Label = function ChartTooltipLabel(handle) {
|
|
|
358
377
|
ChartTooltip.Value = function ChartTooltipValue(handle) {
|
|
359
378
|
return () => {
|
|
360
379
|
let { mix, ...rest } = handle.props;
|
|
361
|
-
return _jsx("span", { ...rest, "data-slot": "value", mix: [weight("semibold"), tabularNums(), mix
|
|
380
|
+
return (_jsx("span", { ...rest, "data-slot": "value", mix: mergeMix([weight("semibold"), tabularNums()], mix) }));
|
|
362
381
|
};
|
|
363
382
|
};
|
|
364
383
|
// @ts-ignore
|
|
@@ -396,10 +415,10 @@ Chart.Area = function ChartArea(handle) {
|
|
|
396
415
|
let resolvedMarkerCount = markerCount ?? DEFAULT_MARKER_COUNT;
|
|
397
416
|
let x = linearScale(context.xDomain, [0, context.width]);
|
|
398
417
|
let y = linearScale(context.yDomain, [context.height, 0]);
|
|
399
|
-
let scaledPoints = points
|
|
418
|
+
let scaledPoints = scalePoints(points, x, y);
|
|
400
419
|
let d = areaPath(scaledPoints, y(resolvedBaseline));
|
|
401
420
|
let markerIndices = computeMarkerIndices(points, context.xDomain, resolvedMarkerCount);
|
|
402
|
-
return (_jsxs("g", { "data-color": String(resolvedColor), ...rest, mix:
|
|
421
|
+
return (_jsxs("g", { "data-color": String(resolvedColor), ...rest, mix: mergeMix(chartPalette("color"), mix), children: [_jsx("path", { d: d, mix: [
|
|
403
422
|
attrs({ "aria-hidden": DEFAULT_PATH_ARIA_HIDDEN }),
|
|
404
423
|
fill("currentColor"),
|
|
405
424
|
fillOpacity("var(--ui-chart-area-fill-opacity, 0.25)"),
|
|
@@ -411,6 +430,157 @@ Chart.Area = function ChartArea(handle) {
|
|
|
411
430
|
] }), renderChartMarkers(points, scaledPoints, markerIndices, parts?.marker)] }));
|
|
412
431
|
};
|
|
413
432
|
};
|
|
433
|
+
/**
|
|
434
|
+
* Stroke and fill colour for each {@link Chart.Tone}, read through `currentColor` by a
|
|
435
|
+
* threshold's line and label and a band's fill and label, which let the pointer through to
|
|
436
|
+
* the series beneath.
|
|
437
|
+
*/
|
|
438
|
+
function toneColor() {
|
|
439
|
+
return raw({
|
|
440
|
+
pointerEvents: "none",
|
|
441
|
+
color: "var(--ui-danger-fg)",
|
|
442
|
+
'&[data-tone="brand"]': { color: "var(--ui-brand-fg)" },
|
|
443
|
+
'&[data-tone="neutral"]': { color: "var(--ui-neutral-fg-muted)" },
|
|
444
|
+
'&[data-tone="success"]': { color: "var(--ui-success-fg)" },
|
|
445
|
+
'&[data-tone="warning"]': { color: "var(--ui-warning-fg)" },
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Marks a value the series should stay under or over: a dashed line across the plot at `y`,
|
|
450
|
+
* with `label` set at its end. Render it inside {@link Chart}, after the series it judges.
|
|
451
|
+
*
|
|
452
|
+
* @param handle Runtime handle carrying the host `<g>`'s props.
|
|
453
|
+
* @returns The render function producing the threshold's markup.
|
|
454
|
+
* @example
|
|
455
|
+
* <Chart.Threshold y={300} label={t("chart.slo", { ms: 300 })} tone="warning" />
|
|
456
|
+
*/
|
|
457
|
+
Chart.Threshold = function ChartThreshold(handle) {
|
|
458
|
+
return () => {
|
|
459
|
+
let { y: value, label, tone, mix, ...rest } = handle.props;
|
|
460
|
+
let context = handle.context.get(Chart);
|
|
461
|
+
let y = linearScale(context.yDomain, [context.height, 0])(value);
|
|
462
|
+
return (_jsxs("g", { "data-slot": "chart-threshold", "data-tone": tone ?? "danger", role: label ? "img" : undefined, "aria-label": label, "aria-hidden": label ? undefined : "true", ...rest, mix: mergeMix(toneColor(), mix), children: [_jsx("line", { x1: 0, x2: context.width, y1: y, y2: y, mix: [
|
|
463
|
+
stroke("currentColor"),
|
|
464
|
+
strokeWidth("var(--ui-chart-threshold-width, 1px)"),
|
|
465
|
+
vectorEffect("non-scaling-stroke"),
|
|
466
|
+
raw({ strokeDasharray: "var(--ui-chart-threshold-dash, 6 4)" }),
|
|
467
|
+
] }), label ? (_jsx("text", { "aria-hidden": "true", x: context.width - 4, y: y - 4, "text-anchor": "end", mix: [fill("currentColor"), raw({ fontSize: "var(--ui-chart-annotation-size, 11px)" })], children: label })) : null] }));
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* Shading for a `variant="fill"` band: the tone at `--ui-chart-band-opacity` in a light colour
|
|
472
|
+
* scheme and `--ui-chart-band-opacity-dark` in a dark one, light enough that the series over
|
|
473
|
+
* it keep their full contrast.
|
|
474
|
+
*/
|
|
475
|
+
const BAND_FILL = [
|
|
476
|
+
"light-dark(",
|
|
477
|
+
"color-mix(in srgb, currentColor calc(var(--ui-chart-band-opacity, 0.08) * 100%), transparent),",
|
|
478
|
+
"color-mix(in srgb, currentColor calc(var(--ui-chart-band-opacity-dark, 0.12) * 100%), transparent)",
|
|
479
|
+
")",
|
|
480
|
+
].join(" ");
|
|
481
|
+
/**
|
|
482
|
+
* The band label's font size in the chart's own units: the annotation size divided by how much
|
|
483
|
+
* the chart root draws its coordinate space scaled (its container width over `width`), so the
|
|
484
|
+
* label renders at the annotation size whatever width the chart is drawn at.
|
|
485
|
+
*/
|
|
486
|
+
function bandLabelSize(width) {
|
|
487
|
+
return `calc(var(--ui-chart-annotation-size, 11px) / tan(atan2(100cqi, ${width}px)))`;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* The background and ink of a band's label tag for each {@link Chart.Tone}, published on the
|
|
491
|
+
* band for its tag to read: the tone's tint deepened with a little of the tone, so the tag
|
|
492
|
+
* stands out from the band, under the tone's emphasis text at 4.5:1 or more in either scheme.
|
|
493
|
+
*/
|
|
494
|
+
function bandLabelTone() {
|
|
495
|
+
let tones = [
|
|
496
|
+
["brand", "--ui-brand-fg"],
|
|
497
|
+
["neutral", "--ui-neutral-fg-muted"],
|
|
498
|
+
["success", "--ui-success-fg"],
|
|
499
|
+
["warning", "--ui-warning-fg"],
|
|
500
|
+
];
|
|
501
|
+
return raw({
|
|
502
|
+
"--chart-band-label-bg": "color-mix(in srgb, var(--ui-danger-fg) 16%, var(--ui-danger-bg-tint))",
|
|
503
|
+
"--chart-band-label-fg": "var(--ui-danger-fg-emphasis)",
|
|
504
|
+
...Object.fromEntries(tones.map(([tone, ink]) => [
|
|
505
|
+
`&[data-tone="${tone}"]`,
|
|
506
|
+
{
|
|
507
|
+
"--chart-band-label-bg": `color-mix(in srgb, var(${ink}) 16%, var(--ui-${tone}-bg-tint))`,
|
|
508
|
+
"--chart-band-label-fg": `var(--ui-${tone}-fg-emphasis)`,
|
|
509
|
+
},
|
|
510
|
+
])),
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* A band's label tag: the label set over a tint filling exactly its text box, which a filter
|
|
515
|
+
* paints behind the glyphs so the tag fits the label at any length. An en space on each side
|
|
516
|
+
* widens that box into the tag's padding.
|
|
517
|
+
*
|
|
518
|
+
* @param id The tint filter's id, unique on the page.
|
|
519
|
+
* @param label The text the tag shows.
|
|
520
|
+
* @param x The band edge the tag is tied to, in the chart's coordinate space.
|
|
521
|
+
* @param width The chart's coordinate width, which the tag's size is counter-scaled against.
|
|
522
|
+
* @param anchor `"end"` sets the tag's end at `x`, extending back toward the band's start.
|
|
523
|
+
*/
|
|
524
|
+
function renderBandLabel(id, label, x, width, anchor) {
|
|
525
|
+
return (_jsxs(_Fragment, { children: [_jsx("defs", { children: _jsxs("filter", { id: id, x: 0, y: 0, width: 1, height: 1, children: [_jsx("feFlood", { mix: raw({ floodColor: "var(--chart-band-label-bg, Canvas)" }) }), _jsxs("feMerge", { children: [_jsx("feMergeNode", {}), _jsx("feMergeNode", { in: "SourceGraphic" })] })] }) }), _jsx("text", { "data-slot": "chart-band-label", "aria-hidden": "true", x: x, y: 0, dx: anchor === "end" ? "-0.25em" : "0.25em", dy: "1.4em", "text-anchor": anchor, filter: `url(#${id})`, mix: [
|
|
526
|
+
fill("var(--chart-band-label-fg, CanvasText)"),
|
|
527
|
+
weight("medium"),
|
|
528
|
+
raw({ fontSize: bandLabelSize(width), whiteSpace: "pre" }),
|
|
529
|
+
], children: `\u2002${label}\u2002` })] }));
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Ties a band's label tag to the band edge with the most plot beside it: the start for a band
|
|
533
|
+
* starting in the plot's first half, else the band's end, so a band near the end of the axis
|
|
534
|
+
* keeps its tag inside the plot at any rendered width up to a tag half the plot wide.
|
|
535
|
+
*
|
|
536
|
+
* @param start The band's start in the chart's coordinate space.
|
|
537
|
+
* @param end The band's end in the chart's coordinate space.
|
|
538
|
+
*/
|
|
539
|
+
function renderBandLabelAt(id, label, start, end, width) {
|
|
540
|
+
if (start <= width / 2)
|
|
541
|
+
return renderBandLabel(id, label, Math.max(start, 0), width, "start");
|
|
542
|
+
return renderBandLabel(id, label, Math.min(end, width), width, "end");
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* A dashed rule across the plot's full height marking one edge of a band.
|
|
546
|
+
*
|
|
547
|
+
* @param edge Which edge the rule marks, written to `data-edge`.
|
|
548
|
+
* @param x The edge's position in the chart's coordinate space.
|
|
549
|
+
* @param height The plot's height, which the rule spans.
|
|
550
|
+
*/
|
|
551
|
+
function renderBandEdge(edge, x, height) {
|
|
552
|
+
return (_jsx("line", { "data-slot": "chart-band-edge", "data-edge": edge, x1: x, x2: x, y1: 0, y2: height, mix: [
|
|
553
|
+
stroke("currentColor"),
|
|
554
|
+
strokeWidth("var(--ui-chart-band-edge-width, 1px)"),
|
|
555
|
+
vectorEffect("non-scaling-stroke"),
|
|
556
|
+
raw({ strokeDasharray: "var(--ui-chart-band-edge-dash, 4 3)" }),
|
|
557
|
+
] }));
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Marks a stretch of the x axis (an incident, a deploy, or hatched, a gap with no data): a light
|
|
561
|
+
* shade, dashed edge rules, `label` tagged at its top start, or top end once it starts past the
|
|
562
|
+
* plot's middle. A range running to the end of `xDomain` has no end rule. Render it before the series.
|
|
563
|
+
*
|
|
564
|
+
* @param handle Runtime handle carrying the host `<g>`'s props.
|
|
565
|
+
* @returns The render function producing the band's markup.
|
|
566
|
+
* @example
|
|
567
|
+
* <Chart.Band from={incident.start} to={incident.end} label={t("chart.incident", { id: 42 })} />
|
|
568
|
+
* @example
|
|
569
|
+
* <Chart.Band from={outage.start} to={outage.end} label={t("chart.noData")} variant="hatched" />
|
|
570
|
+
*/
|
|
571
|
+
Chart.Band = function ChartBand(handle) {
|
|
572
|
+
return () => {
|
|
573
|
+
let { from, to, label, variant, tone, mix, ...rest } = handle.props;
|
|
574
|
+
let context = handle.context.get(Chart);
|
|
575
|
+
let x = linearScale(context.xDomain, [0, context.width]);
|
|
576
|
+
let start = Math.min(x(from), x(to));
|
|
577
|
+
let end = Math.max(x(from), x(to));
|
|
578
|
+
let hatched = variant === "hatched";
|
|
579
|
+
let hatchId = `${handle.id}-no-data`;
|
|
580
|
+
let resolvedTone = tone ?? (hatched ? "neutral" : "danger");
|
|
581
|
+
return (_jsxs("g", { "data-slot": "chart-band", "data-variant": hatched ? "hatched" : undefined, "data-tone": resolvedTone, role: label ? "img" : undefined, "aria-label": label, "aria-hidden": label ? undefined : "true", ...rest, mix: mergeMix([toneColor(), bandLabelTone()], mix), children: [hatched ? renderNoDataPattern(hatchId) : null, _jsx("rect", { x: start, y: 0, width: Math.max(end - start, 1), height: context.height, fill: hatched ? `url(#${hatchId})` : undefined, mix: hatched ? undefined : raw({ fill: BAND_FILL }) }), start > 0 ? renderBandEdge("start", start, context.height) : null, end < context.width ? renderBandEdge("end", end, context.height) : null, label ? renderBandLabelAt(`${handle.id}-label`, label, start, end, context.width) : null] }));
|
|
582
|
+
};
|
|
583
|
+
};
|
|
414
584
|
/**
|
|
415
585
|
* Renders a pie or donut chart: an independent `<svg>` root, since a
|
|
416
586
|
* circular layout shares no domain with a Cartesian {@link Chart}. A paired
|
|
@@ -446,7 +616,7 @@ Chart.Pie = function ChartPie(handle) {
|
|
|
446
616
|
let cy = height / 2;
|
|
447
617
|
let outerRadius = Math.min(width, height) / 2;
|
|
448
618
|
let slices = pieAngles(data.map((datum) => datum.value), { startAngle, endAngle, padAngle });
|
|
449
|
-
return (_jsx("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", ...rest, mix: [chartPalette("fill", " "), legendToggle(), block(), is("full"), bs("auto"), mix
|
|
619
|
+
return (_jsx("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", ...rest, mix: mergeMix([chartPalette("fill", " "), legendToggle(), block(), is("full"), bs("auto")], mix), children: slices.map((slice, index) => {
|
|
450
620
|
let datum = data[index];
|
|
451
621
|
if (datum === undefined)
|
|
452
622
|
return null;
|
|
@@ -532,7 +702,9 @@ Chart.Bar = function ChartBar(handle) {
|
|
|
532
702
|
let y = linearScale(domain, [height, 0]);
|
|
533
703
|
let baselineY = y(0);
|
|
534
704
|
let gridlineValues = ticks(domain, resolvedTickCount);
|
|
535
|
-
|
|
705
|
+
let hatchId = `${handle.id}-no-data`;
|
|
706
|
+
let hasEmpty = data.some((row) => series.some((key) => row.values[key]?.value === null));
|
|
707
|
+
return (_jsxs("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", ...rest, mix: mergeMix([chartPalette("fill", " "), legendToggle(), block(), is("full"), bs("auto")], mix), children: [hasEmpty ? renderNoDataPattern(hatchId) : null, _jsx("g", { mix: [attrs({ "aria-hidden": DEFAULT_PATH_ARIA_HIDDEN })], children: gridlineValues.map((value) => (_jsx("line", { x1: 0, x2: width, y1: y(value), y2: y(value), mix: [
|
|
536
708
|
stroke("var(--ui-neutral-border)"),
|
|
537
709
|
strokeWidth("1"),
|
|
538
710
|
vectorEffect("non-scaling-stroke"),
|
|
@@ -546,6 +718,16 @@ Chart.Bar = function ChartBar(handle) {
|
|
|
546
718
|
if (entry === undefined)
|
|
547
719
|
return null;
|
|
548
720
|
let barX = categoryX + (inner.position(key) ?? 0);
|
|
721
|
+
if (entry.value === null) {
|
|
722
|
+
return (_jsx("rect", { x: barX, y: 0, width: inner.bandwidth, height: height, fill: `url(#${hatchId})`, "data-empty": "", "data-series-index": String(index), tabIndex: 0, role: "img", mix: [
|
|
723
|
+
stroke("var(--ui-neutral-border, GrayText)"),
|
|
724
|
+
strokeWidth("1"),
|
|
725
|
+
vectorEffect("non-scaling-stroke"),
|
|
726
|
+
focusVisible(outline({ color: "brand.ring", offset: 2 })),
|
|
727
|
+
cursor("default"),
|
|
728
|
+
parts?.bar,
|
|
729
|
+
], children: _jsx("title", { children: entry.label }) }, `${row.category}:${key}`));
|
|
730
|
+
}
|
|
549
731
|
let barValueY = y(entry.value);
|
|
550
732
|
let rectY = Math.min(baselineY, barValueY);
|
|
551
733
|
let rectHeight = Math.abs(barValueY - baselineY);
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The app's ⌘K command palette: a modal dialog the server fills with commands that act (links,
|
|
3
|
+
* buttons that submit a form or invoke a command, pages of further commands) and a small island
|
|
4
|
+
* that filters them by title and keywords, moves the active row, and remembers recent picks.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { EntryComponent, Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import { Button } from "../components/button.js";
|
|
11
|
+
import type { PaletteController } from "./mixins/command-palette.js";
|
|
12
|
+
/**
|
|
13
|
+
* Types for {@link CommandPalette} and its parts.
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace CommandPalette {
|
|
16
|
+
/** Every string the palette shows or announces. */
|
|
17
|
+
interface Labels {
|
|
18
|
+
/** The dialog's accessible name, e.g. "Command menu". */
|
|
19
|
+
title: string;
|
|
20
|
+
/** The help-sheet label of the key that opens it, e.g. "Open command menu". */
|
|
21
|
+
open: string;
|
|
22
|
+
/** Names the scope being searched, e.g. "Search monitors or run a command…". */
|
|
23
|
+
placeholder: string;
|
|
24
|
+
/** Heading over the recent commands shown before typing. */
|
|
25
|
+
recent: string;
|
|
26
|
+
/** Leads the no-results message, which quotes the query after it. */
|
|
27
|
+
noResults: string;
|
|
28
|
+
/** A recovery step under the no-results message. */
|
|
29
|
+
noResultsHint?: string;
|
|
30
|
+
/** The announced result count, with `{count}` replaced, e.g. "{count} results". */
|
|
31
|
+
results: string;
|
|
32
|
+
/** Names the control that goes back from a nested page. */
|
|
33
|
+
back: string;
|
|
34
|
+
/** Names the Esc control that closes the palette. */
|
|
35
|
+
close: string;
|
|
36
|
+
}
|
|
37
|
+
/** Props for {@link CommandPalette}. */
|
|
38
|
+
interface Props extends Omit<TagProps<"dialog">, "children"> {
|
|
39
|
+
/** The dialog's `id`, which a trigger's `commandfor` names. */
|
|
40
|
+
id: string;
|
|
41
|
+
labels: Labels;
|
|
42
|
+
/** The combo that toggles the palette from anywhere on the page. @default "mod+k" */
|
|
43
|
+
shortcut?: string;
|
|
44
|
+
/** Ids of commands to offer under Recent before anything is typed, most recent first. */
|
|
45
|
+
recent?: string[];
|
|
46
|
+
/** A `localStorage` key under which the palette remembers the commands run from it. */
|
|
47
|
+
remember?: string;
|
|
48
|
+
/** {@link CommandPalette.Group}s, loose {@link CommandPalette.Item}s and {@link CommandPalette.Page}s. */
|
|
49
|
+
children: RemixNode;
|
|
50
|
+
}
|
|
51
|
+
/** Props for {@link CommandPalette.Group}. */
|
|
52
|
+
interface GroupProps extends TagProps<"div"> {
|
|
53
|
+
/** Title Case heading, e.g. "Navigation". */
|
|
54
|
+
heading: string;
|
|
55
|
+
children: RemixNode;
|
|
56
|
+
}
|
|
57
|
+
/** Props for {@link CommandPalette.Item}. */
|
|
58
|
+
interface ItemProps {
|
|
59
|
+
/** A document-unique id, which `recent` and the remembered list name. */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Title Case verb and noun, e.g. "Create Monitor". */
|
|
62
|
+
title: string;
|
|
63
|
+
/** Other words that find it, e.g. aliases and the old name. */
|
|
64
|
+
keywords?: string[];
|
|
65
|
+
/** A short muted line after the title. */
|
|
66
|
+
description?: string;
|
|
67
|
+
/** A combo or sequence the item shows as a hint and binds on the page, e.g. `"g m"`. */
|
|
68
|
+
shortcut?: string;
|
|
69
|
+
icon?: RemixNode;
|
|
70
|
+
/** Makes the item a link. */
|
|
71
|
+
href?: string;
|
|
72
|
+
/** The `id` of a form the item submits. */
|
|
73
|
+
form?: string;
|
|
74
|
+
formaction?: string;
|
|
75
|
+
formmethod?: "get" | "post";
|
|
76
|
+
/** The submitted button's name and value. */
|
|
77
|
+
name?: string;
|
|
78
|
+
value?: string;
|
|
79
|
+
/** An Invoker Command the item sends, e.g. `"--copy-account-id"`, to {@link ItemProps.commandfor}. */
|
|
80
|
+
command?: string;
|
|
81
|
+
commandfor?: string;
|
|
82
|
+
/** The {@link CommandPalette.Page} the item opens. */
|
|
83
|
+
page?: string;
|
|
84
|
+
mix?: TagProps<"div">["mix"];
|
|
85
|
+
}
|
|
86
|
+
/** Props for {@link CommandPalette.Page}. */
|
|
87
|
+
interface PageProps {
|
|
88
|
+
/** The id items open it by. */
|
|
89
|
+
id: string;
|
|
90
|
+
/** Shown beside the search field while the page is open. */
|
|
91
|
+
title: string;
|
|
92
|
+
/** Replaces the root placeholder while the page is open. */
|
|
93
|
+
placeholder?: string;
|
|
94
|
+
children: RemixNode;
|
|
95
|
+
}
|
|
96
|
+
/** Props for {@link CommandPalette.Trigger}. */
|
|
97
|
+
interface TriggerProps extends Omit<Button.Props, "commandfor" | "command"> {
|
|
98
|
+
/** The palette's `id`. */
|
|
99
|
+
for: string;
|
|
100
|
+
/** The combo the trigger advertises. @default "mod+k" */
|
|
101
|
+
shortcut?: string;
|
|
102
|
+
children: RemixNode;
|
|
103
|
+
}
|
|
104
|
+
/** Props for {@link CommandPaletteController}; plain data, since they cross into the browser. */
|
|
105
|
+
type ControllerProps = PaletteController.Options;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Renders the palette: a modal dialog 640px wide, 15% from the top, full width less a gutter on
|
|
109
|
+
* a phone. Without JavaScript a trigger still opens it and every command stays a working link
|
|
110
|
+
* or button; the island adds filtering, arrow keys, pages and the ⌘K binding.
|
|
111
|
+
*
|
|
112
|
+
* @param handle Runtime handle carrying the palette's props.
|
|
113
|
+
* @returns The render function producing the palette.
|
|
114
|
+
* @example
|
|
115
|
+
* <CommandPalette id="palette" labels={labels} recent={["go-monitors"]}>
|
|
116
|
+
* <CommandPalette.Group heading="Navigation">
|
|
117
|
+
* <CommandPalette.Item id="go-monitors" title="Go to Monitors" href="/monitors" shortcut="g m" />
|
|
118
|
+
* </CommandPalette.Group>
|
|
119
|
+
* </CommandPalette>
|
|
120
|
+
*/
|
|
121
|
+
export declare function CommandPalette(handle: Handle<CommandPalette.Props>): () => import("remix/component").RemixElement;
|
|
122
|
+
export declare namespace CommandPalette {
|
|
123
|
+
var Group: (handle: Handle<CommandPalette.GroupProps>) => () => import("remix/component").RemixElement;
|
|
124
|
+
var Item: (handle: Handle<CommandPalette.ItemProps>) => () => import("remix/component").RemixElement;
|
|
125
|
+
var Page: (handle: Handle<CommandPalette.PageProps>) => () => import("remix/component").RemixElement;
|
|
126
|
+
var Trigger: (handle: Handle<CommandPalette.TriggerProps>) => () => import("remix/component").RemixElement;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The palette's island: renders nothing visible, and wires the dialog it sits in once loaded.
|
|
130
|
+
* `CommandPalette` places it; load `@sdxc/ui/app/command-palette` in the browser entry.
|
|
131
|
+
*/
|
|
132
|
+
export declare const CommandPaletteController: EntryComponent<CommandPalette.ControllerProps>;
|