@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
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
|
2
2
|
import { ChevronRightIcon } from "@sdxc/icons";
|
|
3
3
|
import { bg, fg, outline } from "@sdxc/u/color";
|
|
4
4
|
import { opacity, rounded, transition, transitionDuration } from "@sdxc/u/effects";
|
|
5
|
-
import { cursor, listStyle, raw } from "@sdxc/u/general";
|
|
5
|
+
import { cursor, listStyle, raw, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { center, hidden, hstack, interpolateSize, shrink, vstack } from "@sdxc/u/layout";
|
|
7
7
|
import { clip } from "@sdxc/u/overflow";
|
|
8
8
|
import { media } from "@sdxc/u/responsive";
|
|
@@ -11,10 +11,10 @@ import { detailsContent, when } from "@sdxc/u/state";
|
|
|
11
11
|
import { rotate } from "@sdxc/u/transform";
|
|
12
12
|
import { text } from "@sdxc/u/typography";
|
|
13
13
|
import { attrs } from "remix/component";
|
|
14
|
+
import { SentinelRow } from "../components/sentinel-row.js";
|
|
14
15
|
import { interactiveTransition } from "../styles/interactive-transition.js";
|
|
15
16
|
import { panelChrome } from "../styles/panel-chrome.js";
|
|
16
17
|
import { warnIfNoAccessibleLabel } from "../utils/warn-if-no-accessible-name.js";
|
|
17
|
-
import { SentinelRow } from "./sentinel-row.js";
|
|
18
18
|
/** `role="tree"` applied to {@link Tree} through {@link attrs} unless a consumer supplies its own `role`. */
|
|
19
19
|
const DEFAULT_ROLE = "tree";
|
|
20
20
|
/**
|
|
@@ -89,7 +89,7 @@ export function Tree(handle) {
|
|
|
89
89
|
return () => {
|
|
90
90
|
let { children, mix, ...rest } = handle.props;
|
|
91
91
|
warnIfNoAccessibleLabel(handle.props, 'Tree: needs an "aria-label" or "aria-labelledby" describing its contents for assistive technology.');
|
|
92
|
-
return (_jsx("div", { ...rest, mix: [
|
|
92
|
+
return (_jsx("div", { ...rest, mix: mergeMix([
|
|
93
93
|
attrs({ role: DEFAULT_ROLE }),
|
|
94
94
|
panelChrome(),
|
|
95
95
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
@@ -98,8 +98,7 @@ export function Tree(handle) {
|
|
|
98
98
|
pi(1),
|
|
99
99
|
outline("none"),
|
|
100
100
|
when("&[data-empty]", [center(), pb(8), fg("neutral.muted")]),
|
|
101
|
-
|
|
102
|
-
], children: children }));
|
|
101
|
+
], mix), children: children }));
|
|
103
102
|
};
|
|
104
103
|
}
|
|
105
104
|
/**
|
|
@@ -133,7 +132,7 @@ function TreeItem(handle) {
|
|
|
133
132
|
let ambient = readAmbientDepth(handle);
|
|
134
133
|
let depth = ambient === undefined ? DEFAULT_DEPTH : ambient + 1;
|
|
135
134
|
handle.context.set({ depth });
|
|
136
|
-
return (_jsx("details", { ...rest, id: id, "data-rmx-key": id, mix: [
|
|
135
|
+
return (_jsx("details", { ...rest, id: id, "data-rmx-key": id, mix: mergeMix([
|
|
137
136
|
attrs({ role: DEFAULT_ITEM_ROLE }),
|
|
138
137
|
interpolateSize(),
|
|
139
138
|
detailsContent([
|
|
@@ -153,8 +152,7 @@ function TreeItem(handle) {
|
|
|
153
152
|
when("&[open]::details-content", bs("auto")),
|
|
154
153
|
when(`&[open] > summary [data-slot="${DEFAULT_EXPAND_BUTTON_SLOT}"]`, rotate(90)),
|
|
155
154
|
media("(prefers-reduced-motion: reduce)", detailsContent(transitionDuration("0s"))),
|
|
156
|
-
|
|
157
|
-
], children: children }));
|
|
155
|
+
], mix), children: children }));
|
|
158
156
|
};
|
|
159
157
|
}
|
|
160
158
|
Tree.Item = TreeItem;
|
|
@@ -179,7 +177,7 @@ Tree.ItemContent = function TreeItemContent(handle) {
|
|
|
179
177
|
return () => {
|
|
180
178
|
let { children, mix, ...rest } = handle.props;
|
|
181
179
|
let depth = readAmbientDepth(handle) ?? DEFAULT_DEPTH;
|
|
182
|
-
return (_jsx("summary", { ...rest, mix: [
|
|
180
|
+
return (_jsx("summary", { ...rest, mix: mergeMix([
|
|
183
181
|
interactiveTransition(),
|
|
184
182
|
attrs({ role: DEFAULT_CONTENT_ROLE, "aria-level": depth + 1 }),
|
|
185
183
|
hstack({ gap: 2, align: "center" }),
|
|
@@ -209,8 +207,7 @@ Tree.ItemContent = function TreeItemContent(handle) {
|
|
|
209
207
|
when("&:focus", bg("neutral.bg-tint-hover")),
|
|
210
208
|
when('&[aria-selected="true"]', bg("brand.tint")),
|
|
211
209
|
when('&[aria-disabled="true"]', opacity(50)),
|
|
212
|
-
|
|
213
|
-
], children: children }));
|
|
210
|
+
], mix), children: children }));
|
|
214
211
|
};
|
|
215
212
|
};
|
|
216
213
|
/**
|
|
@@ -243,7 +240,7 @@ Tree.LoadMoreItem = SentinelRow;
|
|
|
243
240
|
Tree.ExpandButton = function TreeExpandButton(handle) {
|
|
244
241
|
return () => {
|
|
245
242
|
let { children, mix, ...rest } = handle.props;
|
|
246
|
-
return (_jsx("span", { ...rest, mix: [
|
|
243
|
+
return (_jsx("span", { ...rest, mix: mergeMix([
|
|
247
244
|
attrs({ "data-slot": DEFAULT_EXPAND_BUTTON_SLOT, "aria-hidden": "true" }),
|
|
248
245
|
center(),
|
|
249
246
|
is(5),
|
|
@@ -253,7 +250,6 @@ Tree.ExpandButton = function TreeExpandButton(handle) {
|
|
|
253
250
|
transition("transform, background-color"),
|
|
254
251
|
shrink(),
|
|
255
252
|
media("(prefers-reduced-motion: reduce)", transitionDuration("0s")),
|
|
256
|
-
|
|
257
|
-
], children: children ?? _jsx(ChevronRightIcon, { size: 16 }) }));
|
|
253
|
+
], mix), children: children ?? _jsx(ChevronRightIcon, { size: 16 }) }));
|
|
258
254
|
};
|
|
259
255
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cookie an app shell keeps its collapsed sidebar in, and the server-side reader for it.
|
|
3
|
+
* The browser writes it when the sidebar toggles; the server reads it before rendering, so the
|
|
4
|
+
* first paint already has the width the person left it at.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/** The cookie the shell's toggle writes `"true"` or `"false"` under. */
|
|
10
|
+
export declare const APP_SHELL_COOKIE = "ui-app-shell-collapsed";
|
|
11
|
+
/**
|
|
12
|
+
* Whether the sidebar was left collapsed, read from a request's `Cookie` header. A missing
|
|
13
|
+
* header, a missing cookie or any value other than `"true"` reads as expanded.
|
|
14
|
+
*
|
|
15
|
+
* @param cookieHeader The request's `Cookie` header.
|
|
16
|
+
* @param name The cookie name, for an app that renamed it on the shell.
|
|
17
|
+
* @returns `true` when the sidebar renders as the icon rail.
|
|
18
|
+
* @example
|
|
19
|
+
* <AppShell collapsed={readAppShellCookie(request.headers.get("Cookie"))} … />
|
|
20
|
+
*/
|
|
21
|
+
export declare function readAppShellCookie(cookieHeader: string | null | undefined, name?: string): boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cookie an app shell keeps its collapsed sidebar in, and the server-side reader for it.
|
|
3
|
+
* The browser writes it when the sidebar toggles; the server reads it before rendering, so the
|
|
4
|
+
* first paint already has the width the person left it at.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/** The cookie the shell's toggle writes `"true"` or `"false"` under. */
|
|
10
|
+
export const APP_SHELL_COOKIE = "ui-app-shell-collapsed";
|
|
11
|
+
/**
|
|
12
|
+
* Whether the sidebar was left collapsed, read from a request's `Cookie` header. A missing
|
|
13
|
+
* header, a missing cookie or any value other than `"true"` reads as expanded.
|
|
14
|
+
*
|
|
15
|
+
* @param cookieHeader The request's `Cookie` header.
|
|
16
|
+
* @param name The cookie name, for an app that renamed it on the shell.
|
|
17
|
+
* @returns `true` when the sidebar renders as the icon rail.
|
|
18
|
+
* @example
|
|
19
|
+
* <AppShell collapsed={readAppShellCookie(request.headers.get("Cookie"))} … />
|
|
20
|
+
*/
|
|
21
|
+
export function readAppShellCookie(cookieHeader, name = APP_SHELL_COOKIE) {
|
|
22
|
+
if (!cookieHeader)
|
|
23
|
+
return false;
|
|
24
|
+
for (let part of cookieHeader.split(";")) {
|
|
25
|
+
let index = part.indexOf("=");
|
|
26
|
+
if (index === -1)
|
|
27
|
+
continue;
|
|
28
|
+
if (part.slice(0, index).trim() !== name)
|
|
29
|
+
continue;
|
|
30
|
+
return part.slice(index + 1).trim() === "true";
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
@@ -7,16 +7,20 @@
|
|
|
7
7
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
8
8
|
* @copyright Sergio Xalambrí 2026
|
|
9
9
|
*/
|
|
10
|
+
/** A point a marker can snap to; one whose `y` is `null` recorded no data and gets no marker. */
|
|
11
|
+
interface MarkerCandidate {
|
|
12
|
+
x: number;
|
|
13
|
+
y?: number | null;
|
|
14
|
+
}
|
|
10
15
|
/**
|
|
11
16
|
* Picks which of a plotted series' points get an accessible, hoverable
|
|
12
17
|
* marker by snapping evenly spread "nice" values across `xDomain` onto the
|
|
13
|
-
* nearest
|
|
18
|
+
* nearest point with data; duplicate snaps collapse into one marker.
|
|
14
19
|
*
|
|
15
20
|
* @param points The series' data points, in draw order along `x`.
|
|
16
21
|
* @param xDomain The `[start, end]` domain {@link ticks} generates its "nice" values across.
|
|
17
22
|
* @param markerCount Approximate number of markers to place.
|
|
18
|
-
* @returns The deduplicated indices into `points` to render a marker for, or `[]` when
|
|
23
|
+
* @returns The deduplicated indices into `points` to render a marker for, or `[]` when no point has data.
|
|
19
24
|
*/
|
|
20
|
-
export declare function computeMarkerIndices(points: readonly
|
|
21
|
-
|
|
22
|
-
}[], xDomain: readonly [number, number], markerCount: number): number[];
|
|
25
|
+
export declare function computeMarkerIndices(points: readonly MarkerCandidate[], xDomain: readonly [number, number], markerCount: number): number[];
|
|
26
|
+
export {};
|
|
@@ -10,16 +10,18 @@
|
|
|
10
10
|
import { ticks } from "./chart-scale.js";
|
|
11
11
|
/**
|
|
12
12
|
* Finds the index of the point in `points` whose `x` value sits closest to
|
|
13
|
-
* `target`, favoring the earlier point on an exact tie.
|
|
13
|
+
* `target`, skipping points with no data and favoring the earlier point on an exact tie.
|
|
14
14
|
*
|
|
15
15
|
* @param points The points to search, in their own original order.
|
|
16
16
|
* @param target The `x` value to find the nearest point to.
|
|
17
|
-
* @returns The index into `points` of the closest match, or `
|
|
17
|
+
* @returns The index into `points` of the closest match, or `-1` when no point has data.
|
|
18
18
|
*/
|
|
19
19
|
function nearestPointIndex(points, target) {
|
|
20
|
-
let closestIndex =
|
|
20
|
+
let closestIndex = -1;
|
|
21
21
|
let closestDistance = Infinity;
|
|
22
22
|
for (let [index, point] of points.entries()) {
|
|
23
|
+
if (point.y === null)
|
|
24
|
+
continue;
|
|
23
25
|
let distance = Math.abs(point.x - target);
|
|
24
26
|
if (distance < closestDistance) {
|
|
25
27
|
closestDistance = distance;
|
|
@@ -31,15 +33,14 @@ function nearestPointIndex(points, target) {
|
|
|
31
33
|
/**
|
|
32
34
|
* Picks which of a plotted series' points get an accessible, hoverable
|
|
33
35
|
* marker by snapping evenly spread "nice" values across `xDomain` onto the
|
|
34
|
-
* nearest
|
|
36
|
+
* nearest point with data; duplicate snaps collapse into one marker.
|
|
35
37
|
*
|
|
36
38
|
* @param points The series' data points, in draw order along `x`.
|
|
37
39
|
* @param xDomain The `[start, end]` domain {@link ticks} generates its "nice" values across.
|
|
38
40
|
* @param markerCount Approximate number of markers to place.
|
|
39
|
-
* @returns The deduplicated indices into `points` to render a marker for, or `[]` when
|
|
41
|
+
* @returns The deduplicated indices into `points` to render a marker for, or `[]` when no point has data.
|
|
40
42
|
*/
|
|
41
43
|
export function computeMarkerIndices(points, xDomain, markerCount) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return [...new Set(ticks(xDomain, markerCount).map((value) => nearestPointIndex(points, value)))];
|
|
44
|
+
let indices = ticks(xDomain, markerCount).map((value) => nearestPointIndex(points, value));
|
|
45
|
+
return [...new Set(indices.filter((index) => index !== -1))];
|
|
45
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pure SVG path-string builders for chart geometry: {@link linePath} for a
|
|
3
|
-
*
|
|
3
|
+
* polyline through a series of points, broken at gaps, {@link areaPath} for the
|
|
4
4
|
* same line closed down to a baseline, and {@link arcPath} for a pie or
|
|
5
5
|
* donut wedge. Every builder takes coordinates already scaled to pixels —
|
|
6
6
|
* mapping a data value onto a pixel position is a separate concern the
|
|
@@ -10,32 +10,36 @@
|
|
|
10
10
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
11
11
|
* @copyright Sergio Xalambrí 2026
|
|
12
12
|
*/
|
|
13
|
-
import type { Point } from "
|
|
13
|
+
import type { Point } from "../../utils/geometry.js";
|
|
14
14
|
export type { Point };
|
|
15
15
|
/**
|
|
16
|
-
* Builds the `d` attribute for a
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* Builds the `d` attribute for a polyline through `points`, in the order
|
|
17
|
+
* given. A `null` entry is a sample with no data: the line stops at the point
|
|
18
|
+
* before it and starts again with a fresh move-to at the point after it.
|
|
19
19
|
*
|
|
20
|
-
* @param points Already-scaled pixel positions to connect, in draw order.
|
|
21
|
-
* @returns An SVG path `d` string, or an empty string when
|
|
20
|
+
* @param points Already-scaled pixel positions to connect, in draw order; `null` breaks the line.
|
|
21
|
+
* @returns An SVG path `d` string, or an empty string when no point is present.
|
|
22
22
|
* @example
|
|
23
23
|
* linePath([{ x: 0, y: 10 }, { x: 20, y: 0 }]);
|
|
24
24
|
* // "M 0,10 L 20,0"
|
|
25
|
+
* @example
|
|
26
|
+
* linePath([{ x: 0, y: 10 }, null, { x: 40, y: 5 }, { x: 60, y: 0 }]);
|
|
27
|
+
* // "M 0,10 M 40,5 L 60,0"
|
|
25
28
|
*/
|
|
26
|
-
export declare function linePath(points: readonly Point[]): string;
|
|
29
|
+
export declare function linePath(points: readonly (Point | null)[]): string;
|
|
27
30
|
/**
|
|
28
31
|
* Builds the `d` attribute for the line {@link linePath} draws, closed into
|
|
29
32
|
* a filled region down to `baselineY`, for an area chart's filled series.
|
|
33
|
+
* Each run between `null` entries closes on its own, leaving the gap unfilled.
|
|
30
34
|
*
|
|
31
|
-
* @param points Already-scaled pixel positions along the top edge of the area, in draw order.
|
|
35
|
+
* @param points Already-scaled pixel positions along the top edge of the area, in draw order; `null` breaks the area.
|
|
32
36
|
* @param baselineY Pixel `y` position the area closes down (or up) to — typically the zero line or the chart's floor.
|
|
33
|
-
* @returns An SVG path `d` string, or an empty string when
|
|
37
|
+
* @returns An SVG path `d` string, or an empty string when no point is present.
|
|
34
38
|
* @example
|
|
35
39
|
* areaPath([{ x: 0, y: 10 }, { x: 20, y: 0 }], 30);
|
|
36
40
|
* // "M 0,10 L 20,0 L 20,30 L 0,30 Z"
|
|
37
41
|
*/
|
|
38
|
-
export declare function areaPath(points: readonly Point[], baselineY: number): string;
|
|
42
|
+
export declare function areaPath(points: readonly (Point | null)[], baselineY: number): string;
|
|
39
43
|
/**
|
|
40
44
|
* Options accepted by {@link arcPath}.
|
|
41
45
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pure SVG path-string builders for chart geometry: {@link linePath} for a
|
|
3
|
-
*
|
|
3
|
+
* polyline through a series of points, broken at gaps, {@link areaPath} for the
|
|
4
4
|
* same line closed down to a baseline, and {@link arcPath} for a pie or
|
|
5
5
|
* donut wedge. Every builder takes coordinates already scaled to pixels —
|
|
6
6
|
* mapping a data value onto a pixel position is a separate concern the
|
|
@@ -10,44 +10,72 @@
|
|
|
10
10
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
11
11
|
* @copyright Sergio Xalambrí 2026
|
|
12
12
|
*/
|
|
13
|
-
import { FULL_TURN_RADIANS } from "
|
|
14
|
-
import { roundChannel } from "
|
|
13
|
+
import { FULL_TURN_RADIANS } from "../../utils/full-turn-radians.js";
|
|
14
|
+
import { roundChannel } from "../../utils/round-precision.js";
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* Splits `points` into the runs of consecutive positions between `null`
|
|
17
|
+
* entries, so a series with missing samples draws as separate pieces and
|
|
18
|
+
* never bridges or drops through a gap.
|
|
19
|
+
*/
|
|
20
|
+
function runs(points) {
|
|
21
|
+
let result = [];
|
|
22
|
+
let current = [];
|
|
23
|
+
for (let point of points) {
|
|
24
|
+
if (point !== null) {
|
|
25
|
+
current.push(point);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (current.length > 0)
|
|
29
|
+
result.push(current);
|
|
30
|
+
current = [];
|
|
31
|
+
}
|
|
32
|
+
if (current.length > 0)
|
|
33
|
+
result.push(current);
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
/** Draws one run as a move-to on its first point and a line-to through each remaining one. */
|
|
37
|
+
function polyline(run) {
|
|
38
|
+
return run.map((point, index) => `${index === 0 ? "M" : "L"} ${point.x},${point.y}`).join(" ");
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Builds the `d` attribute for a polyline through `points`, in the order
|
|
42
|
+
* given. A `null` entry is a sample with no data: the line stops at the point
|
|
43
|
+
* before it and starts again with a fresh move-to at the point after it.
|
|
19
44
|
*
|
|
20
|
-
* @param points Already-scaled pixel positions to connect, in draw order.
|
|
21
|
-
* @returns An SVG path `d` string, or an empty string when
|
|
45
|
+
* @param points Already-scaled pixel positions to connect, in draw order; `null` breaks the line.
|
|
46
|
+
* @returns An SVG path `d` string, or an empty string when no point is present.
|
|
22
47
|
* @example
|
|
23
48
|
* linePath([{ x: 0, y: 10 }, { x: 20, y: 0 }]);
|
|
24
49
|
* // "M 0,10 L 20,0"
|
|
50
|
+
* @example
|
|
51
|
+
* linePath([{ x: 0, y: 10 }, null, { x: 40, y: 5 }, { x: 60, y: 0 }]);
|
|
52
|
+
* // "M 0,10 M 40,5 L 60,0"
|
|
25
53
|
*/
|
|
26
54
|
export function linePath(points) {
|
|
27
|
-
|
|
28
|
-
return "";
|
|
29
|
-
return points.map((point, index) => `${index === 0 ? "M" : "L"} ${point.x},${point.y}`).join(" ");
|
|
55
|
+
return runs(points).map(polyline).join(" ");
|
|
30
56
|
}
|
|
31
57
|
/**
|
|
32
58
|
* Builds the `d` attribute for the line {@link linePath} draws, closed into
|
|
33
59
|
* a filled region down to `baselineY`, for an area chart's filled series.
|
|
60
|
+
* Each run between `null` entries closes on its own, leaving the gap unfilled.
|
|
34
61
|
*
|
|
35
|
-
* @param points Already-scaled pixel positions along the top edge of the area, in draw order.
|
|
62
|
+
* @param points Already-scaled pixel positions along the top edge of the area, in draw order; `null` breaks the area.
|
|
36
63
|
* @param baselineY Pixel `y` position the area closes down (or up) to — typically the zero line or the chart's floor.
|
|
37
|
-
* @returns An SVG path `d` string, or an empty string when
|
|
64
|
+
* @returns An SVG path `d` string, or an empty string when no point is present.
|
|
38
65
|
* @example
|
|
39
66
|
* areaPath([{ x: 0, y: 10 }, { x: 20, y: 0 }], 30);
|
|
40
67
|
* // "M 0,10 L 20,0 L 20,30 L 0,30 Z"
|
|
41
68
|
*/
|
|
42
69
|
export function areaPath(points, baselineY) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
return runs(points)
|
|
71
|
+
.map((run) => {
|
|
72
|
+
let first = run[0];
|
|
73
|
+
let last = run.at(-1);
|
|
74
|
+
if (first === undefined || last === undefined)
|
|
75
|
+
return "";
|
|
76
|
+
return `${polyline(run)} L ${last.x},${baselineY} L ${first.x},${baselineY} Z`;
|
|
77
|
+
})
|
|
49
78
|
.join(" ");
|
|
50
|
-
return `${top} L ${last.x},${baselineY} L ${first.x},${baselineY} Z`;
|
|
51
79
|
}
|
|
52
80
|
/** Fallback inner radius for {@link arcPath} — a solid wedge reaching the center. */
|
|
53
81
|
const DEFAULT_INNER_RADIUS = 0;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
10
10
|
* @copyright Sergio Xalambrí 2026
|
|
11
11
|
*/
|
|
12
|
-
import { FULL_TURN_RADIANS } from "
|
|
12
|
+
import { FULL_TURN_RADIANS } from "../../utils/full-turn-radians.js";
|
|
13
13
|
/**
|
|
14
14
|
* Thresholds {@link niceStep} compares a candidate step's residual against
|
|
15
15
|
* to choose a multiplier of 1, 2, 5, or 10 — the geometric midpoints between
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats when content was last edited for a save status line: relative ("2m ago")
|
|
3
|
+
* while recent and a date with a time once it is older, through the platform's `Intl`
|
|
4
|
+
* APIs so every locale reads it in its own words.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Formats how long ago `at` was: relative within `decayMs`, a date and time after.
|
|
11
|
+
*
|
|
12
|
+
* @param at When the content was edited.
|
|
13
|
+
* @param now The moment to measure from.
|
|
14
|
+
* @param decayMs Age at which the text becomes a timestamp.
|
|
15
|
+
* @param locale Locale to format in; the runtime's when omitted.
|
|
16
|
+
* @returns The time text an "Edited {time}" label embeds.
|
|
17
|
+
* @example formatEditedTime(updatedAt, new Date(), 86_400_000, "en") // "2m ago"
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatEditedTime(at: Date, now: Date, decayMs: number, locale?: string): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats when content was last edited for a save status line: relative ("2m ago")
|
|
3
|
+
* while recent and a date with a time once it is older, through the platform's `Intl`
|
|
4
|
+
* APIs so every locale reads it in its own words.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/** Units the relative edit time steps through, each with its length in seconds. */
|
|
10
|
+
const UNITS = [
|
|
11
|
+
["hour", 3600],
|
|
12
|
+
["minute", 60],
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Formats how long ago `at` was: relative within `decayMs`, a date and time after.
|
|
16
|
+
*
|
|
17
|
+
* @param at When the content was edited.
|
|
18
|
+
* @param now The moment to measure from.
|
|
19
|
+
* @param decayMs Age at which the text becomes a timestamp.
|
|
20
|
+
* @param locale Locale to format in; the runtime's when omitted.
|
|
21
|
+
* @returns The time text an "Edited {time}" label embeds.
|
|
22
|
+
* @example formatEditedTime(updatedAt, new Date(), 86_400_000, "en") // "2m ago"
|
|
23
|
+
*/
|
|
24
|
+
export function formatEditedTime(at, now, decayMs, locale) {
|
|
25
|
+
let elapsed = now.getTime() - at.getTime();
|
|
26
|
+
if (elapsed >= decayMs) {
|
|
27
|
+
return new Intl.DateTimeFormat(locale, { dateStyle: "medium", timeStyle: "short" }).format(at);
|
|
28
|
+
}
|
|
29
|
+
let seconds = Math.max(0, Math.round(elapsed / 1000));
|
|
30
|
+
let format = new Intl.RelativeTimeFormat(locale, { numeric: "auto", style: "narrow" });
|
|
31
|
+
let unit = UNITS.find(([, length]) => seconds >= length);
|
|
32
|
+
if (unit)
|
|
33
|
+
return format.format(-Math.floor(seconds / unit[1]), unit[0]);
|
|
34
|
+
return format.format(-seconds, "second");
|
|
35
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Answers whether a page-level key such as Escape or a bare letter belongs to the list
|
|
3
|
+
* behind it: a keystroke inside a text field, or while a dialog or popover is open, is that
|
|
4
|
+
* surface's key, so a list's shortcuts stand aside for it.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Whether `target` is a field the reader is typing into.
|
|
11
|
+
*
|
|
12
|
+
* @param target The keystroke's target.
|
|
13
|
+
* @returns Whether the target is, or sits inside, a text-entry control.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isTextEntry(target: EventTarget | null): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether a keystroke is free for a list-level shortcut: unmodified, unclaimed by an earlier
|
|
18
|
+
* handler, outside a text field, and with no dialog or popover open to take it first.
|
|
19
|
+
*
|
|
20
|
+
* @param event The keystroke.
|
|
21
|
+
* @returns Whether a list shortcut may act on it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isListKey(event: KeyboardEvent): boolean;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Answers whether a page-level key such as Escape or a bare letter belongs to the list
|
|
3
|
+
* behind it: a keystroke inside a text field, or while a dialog or popover is open, is that
|
|
4
|
+
* surface's key, so a list's shortcuts stand aside for it.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Controls where a key is text: every editable field, and every `<input>` whose type takes
|
|
11
|
+
* typed text. Checkboxes and radios stay out, so Escape after ticking a row still reaches the list.
|
|
12
|
+
*/
|
|
13
|
+
const TEXT_ENTRY_SELECTOR = [
|
|
14
|
+
"textarea",
|
|
15
|
+
"select",
|
|
16
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
17
|
+
'[role="textbox"]',
|
|
18
|
+
'[role="combobox"]',
|
|
19
|
+
'input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="color"]):not([type="file"])',
|
|
20
|
+
].join(", ");
|
|
21
|
+
/** Surfaces that own Escape while open: a modal, or any shown popover. */
|
|
22
|
+
const OPEN_OVERLAY_SELECTOR = "dialog[open], :popover-open";
|
|
23
|
+
/**
|
|
24
|
+
* Whether `target` is a field the reader is typing into.
|
|
25
|
+
*
|
|
26
|
+
* @param target The keystroke's target.
|
|
27
|
+
* @returns Whether the target is, or sits inside, a text-entry control.
|
|
28
|
+
*/
|
|
29
|
+
export function isTextEntry(target) {
|
|
30
|
+
return target instanceof Element && target.closest(TEXT_ENTRY_SELECTOR) !== null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Whether a keystroke is free for a list-level shortcut: unmodified, unclaimed by an earlier
|
|
34
|
+
* handler, outside a text field, and with no dialog or popover open to take it first.
|
|
35
|
+
*
|
|
36
|
+
* @param event The keystroke.
|
|
37
|
+
* @returns Whether a list shortcut may act on it.
|
|
38
|
+
*/
|
|
39
|
+
export function isListKey(event) {
|
|
40
|
+
if (event.defaultPrevented || event.isComposing)
|
|
41
|
+
return false;
|
|
42
|
+
if (event.ctrlKey || event.metaKey || event.altKey)
|
|
43
|
+
return false;
|
|
44
|
+
if (isTextEntry(event.target))
|
|
45
|
+
return false;
|
|
46
|
+
let root = event.target instanceof Node ? event.target.ownerDocument : null;
|
|
47
|
+
return (root ?? document).querySelector(OPEN_OVERLAY_SELECTOR) === null;
|
|
48
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the links and hidden fields a list's URL-held view needs: a link that drops one
|
|
3
|
+
* filter, one that clears them all, one that sets a single parameter, and the parameters a
|
|
4
|
+
* GET form must carry so submitting one control keeps the state every other control wrote.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Parameters that point at a position in a result set, dropped by every link here because a
|
|
11
|
+
* position in the old results means nothing once the query changes.
|
|
12
|
+
*/
|
|
13
|
+
export declare const PAGINATION_PARAMS: readonly string[];
|
|
14
|
+
/**
|
|
15
|
+
* The link a filter chip's remove control points at: `url` without the `name` parameter, or
|
|
16
|
+
* without only its `value` when one is given, and back on the first page of results.
|
|
17
|
+
*
|
|
18
|
+
* @param url The page's current URL.
|
|
19
|
+
* @param name The filter's parameter.
|
|
20
|
+
* @param value The one value to drop; omitted drops every value of the parameter.
|
|
21
|
+
* @param reset Position parameters to drop. Defaults to {@link PAGINATION_PARAMS}.
|
|
22
|
+
* @returns A same-origin path with the remaining query.
|
|
23
|
+
* @example removeFilterHref("/monitors?status=down&status=paused&page=3", "status", "down") // "/monitors?status=paused"
|
|
24
|
+
* @example removeFilterHref(request.url, "region") // every region value dropped
|
|
25
|
+
*/
|
|
26
|
+
export declare function removeFilterHref(url: URL | string, name: string, value?: string, reset?: readonly string[]): string;
|
|
27
|
+
/**
|
|
28
|
+
* The link "Clear filters" points at: `url` without any of the `names` parameters, keeping
|
|
29
|
+
* the tab, sort and view parameters so clearing filters changes nothing else on the page.
|
|
30
|
+
*
|
|
31
|
+
* @param url The page's current URL.
|
|
32
|
+
* @param names Every filter parameter the page offers.
|
|
33
|
+
* @param reset Position parameters to drop. Defaults to {@link PAGINATION_PARAMS}.
|
|
34
|
+
* @returns A same-origin path with the remaining query.
|
|
35
|
+
* @example clearFiltersHref("/issues?state=open&label=bug&q=crash", ["label", "q"]) // "/issues?state=open"
|
|
36
|
+
*/
|
|
37
|
+
export declare function clearFiltersHref(url: URL | string, names: readonly string[], reset?: readonly string[]): string;
|
|
38
|
+
/**
|
|
39
|
+
* The link a single-choice control (a sort order, a refresh interval) points at: `url` with
|
|
40
|
+
* `name` set to `value` alone, or removed when `value` is `null` so the default applies.
|
|
41
|
+
*
|
|
42
|
+
* @param url The page's current URL.
|
|
43
|
+
* @param name The parameter to set.
|
|
44
|
+
* @param value Its new value; `null` removes it.
|
|
45
|
+
* @param reset Position parameters to drop. Defaults to {@link PAGINATION_PARAMS}.
|
|
46
|
+
* @returns A same-origin path with the updated query.
|
|
47
|
+
* @example setParamHref("/monitors?status=down", "sort", "name") // "/monitors?status=down&sort=name"
|
|
48
|
+
*/
|
|
49
|
+
export declare function setParamHref(url: URL | string, name: string, value: string | null, reset?: readonly string[]): string;
|
|
50
|
+
/**
|
|
51
|
+
* The parameters a GET form re-submits as hidden fields: every pair in `url` except the ones
|
|
52
|
+
* its own controls write and the position parameters, in their original order, so one form
|
|
53
|
+
* never erases what a sibling form or link put in the URL.
|
|
54
|
+
*
|
|
55
|
+
* @param url The page's current URL.
|
|
56
|
+
* @param owned Parameters the form's own controls write.
|
|
57
|
+
* @param reset Position parameters to drop. Defaults to {@link PAGINATION_PARAMS}.
|
|
58
|
+
* @returns Name/value pairs, repeated names kept.
|
|
59
|
+
* @example carriedParams("/issues?state=open&label=bug&page=2", ["label"]) // [["state", "open"]]
|
|
60
|
+
*/
|
|
61
|
+
export declare function carriedParams(url: URL | string, owned: readonly string[], reset?: readonly string[]): [name: string, value: string][];
|
|
62
|
+
/**
|
|
63
|
+
* Every value `url` holds for `name`, the way a repeated GET parameter arrives.
|
|
64
|
+
*
|
|
65
|
+
* @param url The page's current URL.
|
|
66
|
+
* @param name The parameter to read.
|
|
67
|
+
* @returns Its values in order; empty when absent.
|
|
68
|
+
*/
|
|
69
|
+
export declare function paramValues(url: URL | string, name: string): string[];
|