@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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Follows the reader through a page for an "On this page" list: marks every section on
|
|
3
|
+
* screen, slides one marker over them, names the section being read and keeps it in view
|
|
4
|
+
* inside a scrolling rail. The links stay plain anchors, so the list works before it loads.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { ElementProps, MixinFactory } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Watches the headings that the host's `a[href^="#"]` links point at. On every settled
|
|
12
|
+
* scroll and resize it sets `data-active` on each link whose section is on screen
|
|
13
|
+
* (`"lead"` on the first), moves the `[data-toc-marker]` element over them through
|
|
14
|
+
* `--toc-marker-start` / `--toc-marker-size`, and on the closest `[data-toc]` writes the lead's
|
|
15
|
+
* text into `[data-toc-reading]` and sets `--toc-progress` (0–1) for a progress ring. The top edge a section must pass is
|
|
16
|
+
* the first heading's `scroll-margin-top`, so it matches where a jump to that heading lands.
|
|
17
|
+
* A link followed inside a `<details>` closes it, so the section is not hidden under the list.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <nav><ul mix={[tocSpy()]}><li><a href="#install">Install</a></li></ul></nav>
|
|
21
|
+
*/
|
|
22
|
+
export declare const tocSpy: MixinFactory<HTMLElement, [], ElementProps>;
|
|
23
|
+
/**
|
|
24
|
+
* The indexes of the sections on screen. A reader scrolled to the bottom of the page is
|
|
25
|
+
* credited with the last section even when its heading never reached the top edge.
|
|
26
|
+
*/
|
|
27
|
+
export declare function sectionsInView(starts: number[], viewport: {
|
|
28
|
+
top: number;
|
|
29
|
+
bottom: number;
|
|
30
|
+
}, atBottom: boolean): number[];
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Follows the reader through a page for an "On this page" list: marks every section on
|
|
3
|
+
* screen, slides one marker over them, names the section being read and keeps it in view
|
|
4
|
+
* inside a scrolling rail. The links stay plain anchors, so the list works before it loads.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import { createMixin } from "remix/component";
|
|
10
|
+
import { revealInScroller } from "../utils/reveal-in-scroller.js";
|
|
11
|
+
/**
|
|
12
|
+
* Watches the headings that the host's `a[href^="#"]` links point at. On every settled
|
|
13
|
+
* scroll and resize it sets `data-active` on each link whose section is on screen
|
|
14
|
+
* (`"lead"` on the first), moves the `[data-toc-marker]` element over them through
|
|
15
|
+
* `--toc-marker-start` / `--toc-marker-size`, and on the closest `[data-toc]` writes the lead's
|
|
16
|
+
* text into `[data-toc-reading]` and sets `--toc-progress` (0–1) for a progress ring. The top edge a section must pass is
|
|
17
|
+
* the first heading's `scroll-margin-top`, so it matches where a jump to that heading lands.
|
|
18
|
+
* A link followed inside a `<details>` closes it, so the section is not hidden under the list.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <nav><ul mix={[tocSpy()]}><li><a href="#install">Install</a></li></ul></nav>
|
|
22
|
+
*/
|
|
23
|
+
export const tocSpy = createMixin((handle) => {
|
|
24
|
+
let controller;
|
|
25
|
+
handle.addEventListener("insert", (event) => {
|
|
26
|
+
controller?.abort();
|
|
27
|
+
controller = new AbortController();
|
|
28
|
+
watch(event.node, controller.signal);
|
|
29
|
+
});
|
|
30
|
+
handle.addEventListener("remove", () => {
|
|
31
|
+
controller?.abort();
|
|
32
|
+
controller = undefined;
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Starts following the page for `host` until `signal` aborts. The sections are read again on
|
|
37
|
+
* every recount, so a client-side navigation that keeps this list (new links, or new headings
|
|
38
|
+
* under the same ids) is followed from its first scroll, and a page with none yet still arms.
|
|
39
|
+
*/
|
|
40
|
+
function watch(host, signal) {
|
|
41
|
+
let view = host.ownerDocument.defaultView;
|
|
42
|
+
if (!view)
|
|
43
|
+
return;
|
|
44
|
+
let frame = 0;
|
|
45
|
+
/** One recount per frame, however many events the frame delivers. */
|
|
46
|
+
function schedule() {
|
|
47
|
+
view?.cancelAnimationFrame(frame);
|
|
48
|
+
frame = view?.requestAnimationFrame(() => update(host)) ?? 0;
|
|
49
|
+
}
|
|
50
|
+
view.addEventListener("scroll", schedule, { passive: true, signal });
|
|
51
|
+
view.addEventListener("resize", schedule, { passive: true, signal });
|
|
52
|
+
view.addEventListener("hashchange", schedule, { signal });
|
|
53
|
+
view.navigation?.addEventListener("navigatesuccess", schedule, { signal });
|
|
54
|
+
host.closest("details")?.addEventListener("toggle", schedule, { signal });
|
|
55
|
+
host.addEventListener("click", (click) => closeOnJump(host, click), { signal });
|
|
56
|
+
let links = new MutationObserver(schedule);
|
|
57
|
+
links.observe(host, {
|
|
58
|
+
childList: true,
|
|
59
|
+
subtree: true,
|
|
60
|
+
attributes: true,
|
|
61
|
+
attributeFilter: ["href"],
|
|
62
|
+
});
|
|
63
|
+
signal.addEventListener("abort", () => {
|
|
64
|
+
view?.cancelAnimationFrame(frame);
|
|
65
|
+
links.disconnect();
|
|
66
|
+
}, { once: true });
|
|
67
|
+
update(host);
|
|
68
|
+
host.dataset.tocReady = "";
|
|
69
|
+
}
|
|
70
|
+
/** Pairs every in-page link inside `host` with the heading it points at, in list order. */
|
|
71
|
+
function collectSections(host) {
|
|
72
|
+
let sections = [];
|
|
73
|
+
for (let link of host.querySelectorAll('a[href^="#"]')) {
|
|
74
|
+
let id = decodeURIComponent(link.hash.slice(1));
|
|
75
|
+
let heading = id ? host.ownerDocument.getElementById(id) : null;
|
|
76
|
+
if (heading)
|
|
77
|
+
sections.push({ link, heading });
|
|
78
|
+
}
|
|
79
|
+
return sections;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The indexes of the sections on screen. A reader scrolled to the bottom of the page is
|
|
83
|
+
* credited with the last section even when its heading never reached the top edge.
|
|
84
|
+
*/
|
|
85
|
+
export function sectionsInView(starts, viewport, atBottom) {
|
|
86
|
+
let visible = [];
|
|
87
|
+
for (let index = 0; index < starts.length; index++) {
|
|
88
|
+
let start = starts[index];
|
|
89
|
+
let end = starts[index + 1] ?? Number.POSITIVE_INFINITY;
|
|
90
|
+
if (end > viewport.top + 1 && start < viewport.bottom)
|
|
91
|
+
visible.push(index);
|
|
92
|
+
}
|
|
93
|
+
let last = starts.length - 1;
|
|
94
|
+
if (atBottom && last >= 0 && !visible.includes(last))
|
|
95
|
+
visible.push(last);
|
|
96
|
+
return visible;
|
|
97
|
+
}
|
|
98
|
+
/** Reads the list's sections afresh, works out which are on screen and moves the marks to match. */
|
|
99
|
+
function update(host) {
|
|
100
|
+
let sections = collectSections(host);
|
|
101
|
+
let root = host.ownerDocument.documentElement;
|
|
102
|
+
let first = sections[0]?.heading;
|
|
103
|
+
let top = first ? Number.parseFloat(getComputedStyle(first).scrollMarginTop) || 0 : 0;
|
|
104
|
+
let starts = sections.map((section) => section.heading.getBoundingClientRect().top);
|
|
105
|
+
let atBottom = root.scrollHeight > root.clientHeight &&
|
|
106
|
+
root.scrollTop + root.clientHeight >= root.scrollHeight - 2;
|
|
107
|
+
let visible = sectionsInView(starts, { top, bottom: root.clientHeight }, atBottom);
|
|
108
|
+
let lead = visible[0];
|
|
109
|
+
for (let link of host.querySelectorAll("a[data-active]")) {
|
|
110
|
+
if (!sections.some((section) => section.link === link))
|
|
111
|
+
link.removeAttribute("data-active");
|
|
112
|
+
}
|
|
113
|
+
for (let [index, section] of sections.entries()) {
|
|
114
|
+
if (index === lead)
|
|
115
|
+
section.link.dataset.active = "lead";
|
|
116
|
+
else if (visible.includes(index))
|
|
117
|
+
section.link.dataset.active = "";
|
|
118
|
+
else
|
|
119
|
+
section.link.removeAttribute("data-active");
|
|
120
|
+
}
|
|
121
|
+
moveMarker(host, sections, visible);
|
|
122
|
+
let scope = host.closest("[data-toc]") ?? host;
|
|
123
|
+
let reading = scope.querySelector("[data-toc-reading]");
|
|
124
|
+
let progressHost = scope;
|
|
125
|
+
if (lead === undefined) {
|
|
126
|
+
if (reading)
|
|
127
|
+
reading.textContent = "";
|
|
128
|
+
progressHost.style.setProperty("--toc-progress", "0");
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
let leadSection = sections[lead];
|
|
132
|
+
if (reading)
|
|
133
|
+
reading.textContent = leadSection.link.textContent ?? "";
|
|
134
|
+
progressHost.style.setProperty("--toc-progress", String((lead + 1) / sections.length));
|
|
135
|
+
revealInScroller(leadSection.link);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Stretches the marker from the first marked link to the last, measured against the
|
|
139
|
+
* marker's offset parent so the list's own padding and scroll position never skew it.
|
|
140
|
+
*/
|
|
141
|
+
function moveMarker(host, sections, visible) {
|
|
142
|
+
let marker = host.querySelector("[data-toc-marker]");
|
|
143
|
+
if (!marker)
|
|
144
|
+
return;
|
|
145
|
+
let firstIndex = visible[0];
|
|
146
|
+
let lastIndex = visible.at(-1);
|
|
147
|
+
if (firstIndex === undefined || lastIndex === undefined) {
|
|
148
|
+
marker.style.setProperty("--toc-marker-size", "0px");
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
let first = sections[firstIndex].link;
|
|
152
|
+
let last = sections[lastIndex].link;
|
|
153
|
+
let start = first.offsetTop;
|
|
154
|
+
let size = last.offsetTop + last.offsetHeight - start;
|
|
155
|
+
marker.style.setProperty("--toc-marker-start", `${start}px`);
|
|
156
|
+
marker.style.setProperty("--toc-marker-size", `${size}px`);
|
|
157
|
+
}
|
|
158
|
+
/** Closes the `<details>` around the list once one of its links is followed. */
|
|
159
|
+
function closeOnJump(host, click) {
|
|
160
|
+
if (!(click.target instanceof Element) || !click.target.closest("a[href]"))
|
|
161
|
+
return;
|
|
162
|
+
let details = host.closest("details");
|
|
163
|
+
if (details)
|
|
164
|
+
details.open = false;
|
|
165
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hand-written "Next steps" block that ends a guide: two to four links, each with
|
|
3
|
+
* one line on what it gets the reader, drawn as cards or as a list. Its title is a real
|
|
4
|
+
* heading at the surrounding scope's level, with an optional id an outline can link to.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps } from "remix/component";
|
|
10
|
+
import type { HeadingLevel } from "../components/heading-scope.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link NextSteps}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace NextSteps {
|
|
15
|
+
/** `cards` tiles the links in an auto-fitting grid; `list` runs them down a ruled list. */
|
|
16
|
+
type Variant = "cards" | "list";
|
|
17
|
+
/** One destination and the one line saying what it gets the reader. */
|
|
18
|
+
interface Item {
|
|
19
|
+
title: string;
|
|
20
|
+
href: string;
|
|
21
|
+
description: string;
|
|
22
|
+
}
|
|
23
|
+
/** Props accepted by {@link NextSteps}. */
|
|
24
|
+
interface Props extends Omit<TagProps<"section">, "children" | "title" | "id"> {
|
|
25
|
+
title: string;
|
|
26
|
+
/** Id of the heading, so a table of contents can link to the block. */
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Heading level; defaults to the ambient `HeadingScope` level, else {@link DEFAULT_LEVEL}. */
|
|
29
|
+
level?: HeadingLevel;
|
|
30
|
+
/** Two to four destinations, in the order a reader should consider them. */
|
|
31
|
+
items: Item[];
|
|
32
|
+
/** Defaults to {@link DEFAULT_VARIANT}. */
|
|
33
|
+
variant?: Variant;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Renders the titled block, named by its heading. The heading takes `level`, else the
|
|
38
|
+
* ambient `HeadingScope` level, else `<h2>`; each item is one whole-card or whole-row link.
|
|
39
|
+
*
|
|
40
|
+
* @param handle Runtime handle carrying the block's props.
|
|
41
|
+
* @returns The render function producing the block's markup.
|
|
42
|
+
* @example
|
|
43
|
+
* <NextSteps title="Next steps" id="next-steps" items={[{ title: "Add alerts", href: "/docs/alerts", description: "Page the right person." }]} />
|
|
44
|
+
*/
|
|
45
|
+
export declare function NextSteps(handle: Handle<NextSteps.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ArrowRightIcon } from "@sdxc/icons";
|
|
3
|
+
import { bg, border, borderEdge, fg, outline } from "@sdxc/u/color";
|
|
4
|
+
import { rounded, transition } from "@sdxc/u/effects";
|
|
5
|
+
import { listStyle, mergeMix } from "@sdxc/u/general";
|
|
6
|
+
import { gap, grid, gridTemplate, hstack, vstack } from "@sdxc/u/layout";
|
|
7
|
+
import { motionSafe } from "@sdxc/u/responsive";
|
|
8
|
+
import { m, minIs, p, pb } from "@sdxc/u/size";
|
|
9
|
+
import { hover, when } from "@sdxc/u/state";
|
|
10
|
+
import { translateProperty } from "@sdxc/u/transform";
|
|
11
|
+
import { leading, overflowWrap, pretty, text, textDecoration, weight } from "@sdxc/u/typography";
|
|
12
|
+
import { readAmbientLevel, TAG_BY_LEVEL } from "../components/heading-scope.js";
|
|
13
|
+
/** Look {@link NextSteps} draws when `variant` is omitted. */
|
|
14
|
+
const DEFAULT_VARIANT = "cards";
|
|
15
|
+
/** Heading level with no `level` prop and no `HeadingScope` around the block: a section of the page. */
|
|
16
|
+
const DEFAULT_LEVEL = 2;
|
|
17
|
+
/** Selector for a link's arrow, which hover and focus nudge forward. */
|
|
18
|
+
const ARROW = '& [data-slot="next-steps-arrow"]';
|
|
19
|
+
/**
|
|
20
|
+
* Renders the titled block, named by its heading. The heading takes `level`, else the
|
|
21
|
+
* ambient `HeadingScope` level, else `<h2>`; each item is one whole-card or whole-row link.
|
|
22
|
+
*
|
|
23
|
+
* @param handle Runtime handle carrying the block's props.
|
|
24
|
+
* @returns The render function producing the block's markup.
|
|
25
|
+
* @example
|
|
26
|
+
* <NextSteps title="Next steps" id="next-steps" items={[{ title: "Add alerts", href: "/docs/alerts", description: "Page the right person." }]} />
|
|
27
|
+
*/
|
|
28
|
+
export function NextSteps(handle) {
|
|
29
|
+
return () => {
|
|
30
|
+
let { title, id, level, items, variant, mix, ...rest } = handle.props;
|
|
31
|
+
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
32
|
+
let Tag = TAG_BY_LEVEL[level ?? readAmbientLevel(handle) ?? DEFAULT_LEVEL];
|
|
33
|
+
let isCards = resolvedVariant === "cards";
|
|
34
|
+
return (_jsxs("section", { ...rest, "aria-labelledby": id, "aria-label": id ? undefined : title, "data-slot": "next-steps", "data-variant": resolvedVariant, mix: mergeMix([vstack({ gap: 4, align: "stretch" }), minIs(0)], mix), children: [_jsx(Tag, { id: id, "data-slot": "next-steps-title", mix: [m(0), text("lg"), weight("semibold"), fg("neutral.emphasis"), leading("snug")], children: title }), _jsx("ul", { "data-slot": "next-steps-list", "data-not-typeset": "", mix: [
|
|
35
|
+
m(0),
|
|
36
|
+
p(0),
|
|
37
|
+
listStyle(),
|
|
38
|
+
isCards
|
|
39
|
+
? [
|
|
40
|
+
grid(),
|
|
41
|
+
gap(3),
|
|
42
|
+
gridTemplate({ columns: "repeat(auto-fit, minmax(min(100%, 14rem), 1fr))" }),
|
|
43
|
+
]
|
|
44
|
+
: [
|
|
45
|
+
vstack({ gap: 0, align: "stretch" }),
|
|
46
|
+
borderEdge("block-start", { color: "neutral.border", width: 1, style: "solid" }),
|
|
47
|
+
],
|
|
48
|
+
], children: items.map((item) => (_jsx("li", { mix: [
|
|
49
|
+
minIs(0),
|
|
50
|
+
isCards
|
|
51
|
+
? []
|
|
52
|
+
: borderEdge("block-end", { color: "neutral.border", width: 1, style: "solid" }),
|
|
53
|
+
], children: _jsx(NextStepsLink, { item: item, cards: isCards }) }, item.href))) })] }));
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* One destination as a single `<a>` holding its title and line, so the whole card or row
|
|
58
|
+
* follows the link and its accessible name reads title then description.
|
|
59
|
+
*/
|
|
60
|
+
function NextStepsLink(handle) {
|
|
61
|
+
return () => {
|
|
62
|
+
let { item, cards } = handle.props;
|
|
63
|
+
return (_jsxs("a", { href: item.href, "data-slot": "next-steps-link", mix: [
|
|
64
|
+
vstack({ gap: 1, align: "stretch" }),
|
|
65
|
+
overflowWrap("anywhere"),
|
|
66
|
+
textDecoration("none"),
|
|
67
|
+
cards
|
|
68
|
+
? [
|
|
69
|
+
p(4),
|
|
70
|
+
rounded("lg"),
|
|
71
|
+
border({ color: "neutral.border", width: 1, style: "solid" }),
|
|
72
|
+
transition("border-color, background-color"),
|
|
73
|
+
hover([border("brand.border"), bg("neutral.bg-tint")]),
|
|
74
|
+
]
|
|
75
|
+
: [pb(3), transition("color")],
|
|
76
|
+
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
77
|
+
motionSafe(when("&:hover, &:focus-visible", when(ARROW, translateProperty("2px 0")))),
|
|
78
|
+
], children: [_jsxs("span", { mix: [hstack({ gap: 1.5, align: "center" }), text("base"), weight("medium"), fg("brand")], children: [item.title, _jsx(ArrowRightIcon, { size: 14, "aria-hidden": "true", "data-slot": "next-steps-arrow", mix: [transition("translate")] })] }), _jsx("span", { mix: [text("sm"), fg("neutral.muted"), pretty()], children: item.description })] }));
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "Copy page" split button a docs page carries in its header: the main half copies
|
|
3
|
+
* the page's Markdown twin, and the chevron opens a menu of places to take the page (View
|
|
4
|
+
* as Markdown, Open in Claude, Edit on GitHub). Only the copy hydrates; the menu is HTML.
|
|
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
|
+
/**
|
|
11
|
+
* Prop types for {@link PageActions}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace PageActions {
|
|
14
|
+
/** Every string the split button shows or announces. */
|
|
15
|
+
interface Labels {
|
|
16
|
+
/** The main button's label, such as "Copy page". */
|
|
17
|
+
copy: string;
|
|
18
|
+
/** The label shown and announced for two seconds after a copy, such as "Copied". */
|
|
19
|
+
copied: string;
|
|
20
|
+
/** Announced when the copy fails, such as "Could not copy the page". */
|
|
21
|
+
failed: string;
|
|
22
|
+
/** Accessible name of the chevron that opens the menu, such as "More page actions". */
|
|
23
|
+
more: string;
|
|
24
|
+
}
|
|
25
|
+
/** One place the menu takes the page. */
|
|
26
|
+
interface Link {
|
|
27
|
+
label: string;
|
|
28
|
+
/** One line saying what the destination does with the page. */
|
|
29
|
+
description?: string;
|
|
30
|
+
href: string;
|
|
31
|
+
/** A 16px glyph drawn before the label. */
|
|
32
|
+
icon?: RemixNode;
|
|
33
|
+
/** Opens in a new tab, for a destination on another site. */
|
|
34
|
+
external?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** Props accepted by {@link PageActions}. */
|
|
37
|
+
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
38
|
+
/** The page's Markdown twin, fetched and copied by the main button. */
|
|
39
|
+
markdownHref: string;
|
|
40
|
+
labels: Labels;
|
|
41
|
+
/** The menu's entries; with none, the chevron and menu are left out. */
|
|
42
|
+
links?: Link[];
|
|
43
|
+
/** Id shared by the menu and its trigger. @default "page-actions-menu" */
|
|
44
|
+
menuId?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Props {@link PageActionsCopy} serializes for hydration, which is why they are a `type`:
|
|
48
|
+
* `SerializableProps` rejects an interface.
|
|
49
|
+
*/
|
|
50
|
+
type CopyProps = {
|
|
51
|
+
/** Whether the chevron follows, so the copy button squares the corners they share. */
|
|
52
|
+
joined?: boolean;
|
|
53
|
+
href: string;
|
|
54
|
+
copy: string;
|
|
55
|
+
copied: string;
|
|
56
|
+
failed: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Renders the split button: the copy island, then the chevron opening a native popover
|
|
61
|
+
* menu through `popovertarget`, so the menu opens and closes without JavaScript.
|
|
62
|
+
*
|
|
63
|
+
* @param handle Runtime handle carrying the actions' props.
|
|
64
|
+
* @returns The render function producing the split button's markup.
|
|
65
|
+
* @example
|
|
66
|
+
* <PageActions markdownHref="/docs/install.md" labels={labels} links={[{ label: "View as Markdown", href: "/docs/install.md" }]} />
|
|
67
|
+
*/
|
|
68
|
+
export declare function PageActions(handle: Handle<PageActions.Props>): () => import("remix/component").RemixElement;
|
|
69
|
+
/**
|
|
70
|
+
* Client island: the main half of {@link PageActions}, loaded from the bare
|
|
71
|
+
* `@sdxc/ui/docs/page-actions` specifier. It copies `href`'s body, swaps its glyph and label to
|
|
72
|
+
* the copied state for two seconds and announces it; before hydration it is inert.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* <PageActionsCopy href="/docs/install.md" copy="Copy page" copied="Copied" failed="Could not copy" />
|
|
76
|
+
*/
|
|
77
|
+
export declare const PageActionsCopy: EntryComponent<PageActions.CopyProps>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { CheckIcon, ChevronDownIcon, CopyIcon } from "@sdxc/icons";
|
|
3
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
|
+
import { fg } from "@sdxc/u/color";
|
|
5
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
6
|
+
import { inlineFlex, shrink, vstack } from "@sdxc/u/layout";
|
|
7
|
+
import { maxIs } from "@sdxc/u/size";
|
|
8
|
+
import { text, weight } from "@sdxc/u/typography";
|
|
9
|
+
import { clientEntry } from "remix/component";
|
|
10
|
+
import { Button } from "../components/button.js";
|
|
11
|
+
import { Group } from "../components/group.js";
|
|
12
|
+
import { Menu } from "../components/menu.js";
|
|
13
|
+
import { copyFeedback } from "./mixins/copy-feedback.js";
|
|
14
|
+
import { copyFromUrl } from "./mixins/copy-from-url.js";
|
|
15
|
+
/** Id the menu and its trigger share when `menuId` is omitted; one page carries one menu. */
|
|
16
|
+
const DEFAULT_MENU_ID = "page-actions-menu";
|
|
17
|
+
/** The corner radius every button draws, which the split button keeps on its outer corners. */
|
|
18
|
+
const RADIUS = "var(--ui-radius-md, 0.375rem)";
|
|
19
|
+
/**
|
|
20
|
+
* Renders the split button: the copy island, then the chevron opening a native popover
|
|
21
|
+
* menu through `popovertarget`, so the menu opens and closes without JavaScript.
|
|
22
|
+
*
|
|
23
|
+
* @param handle Runtime handle carrying the actions' props.
|
|
24
|
+
* @returns The render function producing the split button's markup.
|
|
25
|
+
* @example
|
|
26
|
+
* <PageActions markdownHref="/docs/install.md" labels={labels} links={[{ label: "View as Markdown", href: "/docs/install.md" }]} />
|
|
27
|
+
*/
|
|
28
|
+
export function PageActions(handle) {
|
|
29
|
+
return () => {
|
|
30
|
+
let { markdownHref, labels, links = [], menuId, mix, ...rest } = handle.props;
|
|
31
|
+
let id = menuId ?? DEFAULT_MENU_ID;
|
|
32
|
+
return (_jsxs("div", { ...rest, "data-slot": "page-actions", mix: mergeMix([inlineFlex()], mix), children: [_jsxs(Group, { "data-slot": "page-actions-group", children: [_jsx(PageActionsCopy, { href: markdownHref, copy: labels.copy, copied: labels.copied, failed: labels.failed, joined: links.length > 0 }), links.length > 0 ? (_jsx(Button, { type: "button", size: "sm", variant: "surface", color: "neutral", popovertarget: id, "aria-label": labels.more, "data-slot": "page-actions-trigger", mix: [splitCorners("end")], children: _jsx(ChevronDownIcon, { size: 16, "aria-hidden": "true" }) })) : null] }), links.length > 0 ? (_jsx(Menu, { id: id, "aria-label": labels.more, placement: "bottom-end", mix: [maxIs("min(20rem, 90vw)")], children: links.map((link) => (_jsxs(Menu.Item, { href: link.href, ...(link.external ? { target: "_blank", rel: "noopener noreferrer" } : {}), children: [link.icon ?? null, _jsxs("span", { mix: [vstack({ gap: 0.5, align: "start" })], children: [_jsx("span", { mix: [weight("medium")], children: link.label }), link.description ? (_jsx("span", { mix: [text("xs"), fg("neutral.muted")], children: link.description })) : null] })] }, link.href))) })) : null] }));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Client island: the main half of {@link PageActions}, loaded from the bare
|
|
37
|
+
* `@sdxc/ui/docs/page-actions` specifier. It copies `href`'s body, swaps its glyph and label to
|
|
38
|
+
* the copied state for two seconds and announces it; before hydration it is inert.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <PageActionsCopy href="/docs/install.md" copy="Copy page" copied="Copied" failed="Could not copy" />
|
|
42
|
+
*/
|
|
43
|
+
export const PageActionsCopy = clientEntry("@sdxc/ui/docs/page-actions#PageActionsCopy", function PageActionsCopy(handle) {
|
|
44
|
+
return () => {
|
|
45
|
+
let { copied, copy, failed, href, joined = false } = handle.props;
|
|
46
|
+
return (_jsxs(Button, { type: "button", size: "sm", variant: "surface", color: "neutral", "data-slot": "page-actions-copy", mix: [
|
|
47
|
+
shrink(0),
|
|
48
|
+
joined ? splitCorners("start") : [],
|
|
49
|
+
/**
|
|
50
|
+
* Each state's glyph and label are drawn together and swapped in one rule, so
|
|
51
|
+
* the copied state always wins whatever order the stylesheet layers land in.
|
|
52
|
+
*/
|
|
53
|
+
raw({
|
|
54
|
+
"& [data-state]": { display: "inline-flex", alignItems: "center" },
|
|
55
|
+
'& [data-state="copied"]': { display: "none" },
|
|
56
|
+
'&[data-copied] [data-state="idle"]': { display: "none" },
|
|
57
|
+
'&[data-copied] [data-state="copied"]': { display: "inline-flex" },
|
|
58
|
+
}),
|
|
59
|
+
copyFromUrl(href, failed),
|
|
60
|
+
copyFeedback(copied),
|
|
61
|
+
], children: [_jsxs("span", { "data-state": "idle", mix: [raw({ gap: "0.375rem" })], children: [_jsx(CopyIcon, { size: 16, "aria-hidden": "true" }), copy] }), _jsxs("span", { "data-state": "copied", mix: [raw({ gap: "0.375rem" })], children: [_jsx(CheckIcon, { size: 16, "aria-hidden": "true", mix: [fg("success")] }), copied] }), _jsx("span", { role: "status", mix: [visuallyHidden()] })] }));
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* Rounds one half of the split button on its outer corners only, through the radius
|
|
66
|
+
* variable `Button` draws from, so the two halves read as one shape whatever order the
|
|
67
|
+
* stylesheet layers land in; right-to-left text mirrors which corners are outer.
|
|
68
|
+
*
|
|
69
|
+
* @param half Which half this button is, in reading order.
|
|
70
|
+
*/
|
|
71
|
+
function splitCorners(half) {
|
|
72
|
+
let left = `${RADIUS} 0 0 ${RADIUS}`;
|
|
73
|
+
let right = `0 ${RADIUS} ${RADIUS} 0`;
|
|
74
|
+
return raw({
|
|
75
|
+
"--ui-button-radius": half === "start" ? left : right,
|
|
76
|
+
"&:dir(rtl)": { "--ui-button-radius": half === "start" ? right : left },
|
|
77
|
+
});
|
|
78
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The quiet box under a help page's title that says which plan or role a feature needs,
|
|
3
|
+
* so a reader learns it before following steps they cannot complete. Pages repeat one
|
|
4
|
+
* fixed sentence, with the plan names linked to pricing.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link PlanNotice}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace PlanNotice {
|
|
14
|
+
/** Native `<p>` attributes plus the one sentence, which may link plan names to pricing. */
|
|
15
|
+
interface Props extends TagProps<"p"> {
|
|
16
|
+
children: RemixNode;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Renders the sentence in a muted, hairline-bordered box at the body's small size, with
|
|
21
|
+
* its links underlined in the box's own ink so they read as links without shouting.
|
|
22
|
+
*
|
|
23
|
+
* @param handle Runtime handle carrying the host `<p>`'s props.
|
|
24
|
+
* @returns The render function producing the notice's markup.
|
|
25
|
+
* @example
|
|
26
|
+
* <PlanNotice>Available on the <a href="/pricing">Team plan</a>.</PlanNotice>
|
|
27
|
+
*/
|
|
28
|
+
export declare function PlanNotice(handle: Handle<PlanNotice.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { bg, border, fg } from "@sdxc/u/color";
|
|
3
|
+
import { rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
5
|
+
import { m, p } from "@sdxc/u/size";
|
|
6
|
+
import { when } from "@sdxc/u/state";
|
|
7
|
+
import { leading, overflowWrap, text, textDecoration } from "@sdxc/u/typography";
|
|
8
|
+
/**
|
|
9
|
+
* Renders the sentence in a muted, hairline-bordered box at the body's small size, with
|
|
10
|
+
* its links underlined in the box's own ink so they read as links without shouting.
|
|
11
|
+
*
|
|
12
|
+
* @param handle Runtime handle carrying the host `<p>`'s props.
|
|
13
|
+
* @returns The render function producing the notice's markup.
|
|
14
|
+
* @example
|
|
15
|
+
* <PlanNotice>Available on the <a href="/pricing">Team plan</a>.</PlanNotice>
|
|
16
|
+
*/
|
|
17
|
+
export function PlanNotice(handle) {
|
|
18
|
+
return () => {
|
|
19
|
+
let { mix, ...rest } = handle.props;
|
|
20
|
+
return (_jsx("p", { ...rest, "data-slot": "plan-notice", mix: mergeMix([
|
|
21
|
+
m(0),
|
|
22
|
+
p(2, 3),
|
|
23
|
+
rounded("md"),
|
|
24
|
+
bg("neutral.tint"),
|
|
25
|
+
border({ color: "neutral.border", width: 1, style: "solid" }),
|
|
26
|
+
fg("neutral"),
|
|
27
|
+
text("sm"),
|
|
28
|
+
leading("relaxed"),
|
|
29
|
+
overflowWrap("anywhere"),
|
|
30
|
+
when("& a", [fg("neutral.emphasis"), textDecoration("underline")]),
|
|
31
|
+
], mix) }));
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reference table a docs page prints for props, options, fields or a request body:
|
|
3
|
+
* name, type, default, required and description, with nested fields behind a native
|
|
4
|
+
* disclosure that expands in place. In a narrow column each row stacks into a card.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link PropsTable}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace PropsTable {
|
|
14
|
+
/**
|
|
15
|
+
* One documented field. The shape follows a JSON Schema property: `type` is the type as
|
|
16
|
+
* it should read, `default` its serialized default, `required` whether the parent's
|
|
17
|
+
* `required` list names it, and `children` the properties of an object or array item.
|
|
18
|
+
*/
|
|
19
|
+
interface Row {
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
default?: string;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
description?: RemixNode;
|
|
25
|
+
children?: readonly Row[];
|
|
26
|
+
}
|
|
27
|
+
/** Every string the table prints; the library ships no copy of its own. */
|
|
28
|
+
interface Labels {
|
|
29
|
+
name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
default: string;
|
|
32
|
+
required: string;
|
|
33
|
+
description: string;
|
|
34
|
+
/** The cell value of a required field, such as "Yes" or "Required". */
|
|
35
|
+
yes: string;
|
|
36
|
+
/** The cell value of an optional field, such as "No" or "Optional". */
|
|
37
|
+
no: string;
|
|
38
|
+
/** The closed disclosure's summary, such as "Show child parameters". */
|
|
39
|
+
showChildren: string;
|
|
40
|
+
/** The open disclosure's summary, such as "Hide child parameters". Defaults to `showChildren`. */
|
|
41
|
+
hideChildren?: string;
|
|
42
|
+
}
|
|
43
|
+
/** Props accepted by {@link PropsTable}. */
|
|
44
|
+
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
45
|
+
rows: readonly Row[];
|
|
46
|
+
labels: Labels;
|
|
47
|
+
/** Names the table for a reader who reaches it without the heading above it. */
|
|
48
|
+
"aria-label"?: string;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Renders the table inside a box that is its own size container. Above 36rem it reads as
|
|
53
|
+
* five columns; at or below, each row stacks with the column label before each value. A
|
|
54
|
+
* long type wraps inside its cell, so the table never widens the page.
|
|
55
|
+
*
|
|
56
|
+
* @param handle Runtime handle carrying the table's props.
|
|
57
|
+
* @returns The render function producing the table.
|
|
58
|
+
* @example
|
|
59
|
+
* <PropsTable aria-label={t("props")} labels={labels} rows={[
|
|
60
|
+
* { name: "title", type: "string", description: "The file the block belongs to." },
|
|
61
|
+
* { name: "retry", type: "object", children: [{ name: "attempts", type: "number", default: "3" }] },
|
|
62
|
+
* ]} />
|
|
63
|
+
*/
|
|
64
|
+
export declare function PropsTable(handle: Handle<PropsTable.Props>): () => import("remix/component").RemixElement;
|