@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,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The body of a docs 404, drawn inside the docs shell so the sidebar stays: the address
|
|
3
|
+
* that matched nothing, the app's search pre-filled from that address, and a few places to
|
|
4
|
+
* start. A reader who mistyped a slug searches for it instead of starting over.
|
|
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 DocsNotFound}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace DocsNotFound {
|
|
14
|
+
/** A page to start from, usually the hub's start links. */
|
|
15
|
+
interface Link {
|
|
16
|
+
title: string;
|
|
17
|
+
href: string;
|
|
18
|
+
/** One line under the title saying what the page gets the reader. */
|
|
19
|
+
description?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Every string the 404 shows, so each app supplies them in the reader's language. */
|
|
22
|
+
interface Labels {
|
|
23
|
+
/** The page title ("Page not found"). */
|
|
24
|
+
title: string;
|
|
25
|
+
/** One sentence under the title ("No page answers to this address. Search for it instead."). */
|
|
26
|
+
body: RemixNode;
|
|
27
|
+
/** Heading over the start links ("Start from one of these"). */
|
|
28
|
+
linksTitle: string;
|
|
29
|
+
/** Small line above the title ("404"). */
|
|
30
|
+
eyebrow?: string;
|
|
31
|
+
}
|
|
32
|
+
/** Props accepted by {@link DocsNotFound}. */
|
|
33
|
+
interface Props extends Omit<TagProps<"div">, "title"> {
|
|
34
|
+
/** The address that matched nothing, shown as code so the reader spots the typo. */
|
|
35
|
+
path: string;
|
|
36
|
+
/** The app's search field, pre-filled with {@link searchQueryFromPath} of `path`. */
|
|
37
|
+
search?: RemixNode;
|
|
38
|
+
links: Link[];
|
|
39
|
+
labels: Labels;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The search a docs 404 pre-fills: the address's last segment, decoded, without a page
|
|
44
|
+
* extension, with `-`, `_` and `+` read as spaces. A query, a hash and trailing slashes
|
|
45
|
+
* are ignored, and an address with no segment gives an empty query.
|
|
46
|
+
*
|
|
47
|
+
* @param path The address that matched nothing, with or without an origin.
|
|
48
|
+
* @returns The words to search for, or `""` when the address names none.
|
|
49
|
+
* @example searchQueryFromPath("/docs/guides/web-hooks"); // "web hooks"
|
|
50
|
+
* @example searchQueryFromPath("/docs/api/rate_limits.md?ref=x"); // "rate limits"
|
|
51
|
+
*/
|
|
52
|
+
export declare function searchQueryFromPath(path: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Renders the 404 body: eyebrow, title at the ambient heading level, a sentence, the
|
|
55
|
+
* missing address as code that wraps on a phone, the search slot, then the start links
|
|
56
|
+
* under a heading one level deeper.
|
|
57
|
+
*
|
|
58
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
59
|
+
* @returns The render function producing the 404's markup.
|
|
60
|
+
* @example
|
|
61
|
+
* <DocsNotFound
|
|
62
|
+
* path={url.pathname}
|
|
63
|
+
* search={<SearchField defaultValue={searchQueryFromPath(url.pathname)} />}
|
|
64
|
+
* links={[{ title: "Quickstart", href: "/docs/quickstart" }]}
|
|
65
|
+
* labels={{ title: "Page not found", body: "Search for it instead.", linksTitle: "Start here" }}
|
|
66
|
+
* />
|
|
67
|
+
*/
|
|
68
|
+
export declare function DocsNotFound(handle: Handle<DocsNotFound.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ArrowRightIcon } from "@sdxc/icons";
|
|
3
|
+
import { bg, fg, outline } from "@sdxc/u/color";
|
|
4
|
+
import { rounded } from "@sdxc/u/effects";
|
|
5
|
+
import { listStyle, mergeMix, raw } from "@sdxc/u/general";
|
|
6
|
+
import { hstack, vstack } from "@sdxc/u/layout";
|
|
7
|
+
import { m, p } from "@sdxc/u/size";
|
|
8
|
+
import { hover, when } from "@sdxc/u/state";
|
|
9
|
+
import { balance, font, pretty, text, textTransform, tracking, weight } from "@sdxc/u/typography";
|
|
10
|
+
import { resolveHeadingLevel, TAG_BY_LEVEL } from "../components/heading-scope.js";
|
|
11
|
+
/** File extensions a docs address may carry that name no words of the page. */
|
|
12
|
+
const PAGE_EXTENSION = /\.(md|mdx|html?|txt)$/i;
|
|
13
|
+
/**
|
|
14
|
+
* The search a docs 404 pre-fills: the address's last segment, decoded, without a page
|
|
15
|
+
* extension, with `-`, `_` and `+` read as spaces. A query, a hash and trailing slashes
|
|
16
|
+
* are ignored, and an address with no segment gives an empty query.
|
|
17
|
+
*
|
|
18
|
+
* @param path The address that matched nothing, with or without an origin.
|
|
19
|
+
* @returns The words to search for, or `""` when the address names none.
|
|
20
|
+
* @example searchQueryFromPath("/docs/guides/web-hooks"); // "web hooks"
|
|
21
|
+
* @example searchQueryFromPath("/docs/api/rate_limits.md?ref=x"); // "rate limits"
|
|
22
|
+
*/
|
|
23
|
+
export function searchQueryFromPath(path) {
|
|
24
|
+
let pathname = path.replace(/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i, "").split(/[?#]/)[0] ?? "";
|
|
25
|
+
let segment = pathname.split("/").filter(Boolean).at(-1) ?? "";
|
|
26
|
+
let decoded = segment;
|
|
27
|
+
try {
|
|
28
|
+
decoded = decodeURIComponent(segment.replace(/\+/g, " "));
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
decoded = segment;
|
|
32
|
+
}
|
|
33
|
+
return decoded
|
|
34
|
+
.replace(PAGE_EXTENSION, "")
|
|
35
|
+
.replace(/[-_+]+/g, " ")
|
|
36
|
+
.replace(/\s+/g, " ")
|
|
37
|
+
.trim();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Renders the 404 body: eyebrow, title at the ambient heading level, a sentence, the
|
|
41
|
+
* missing address as code that wraps on a phone, the search slot, then the start links
|
|
42
|
+
* under a heading one level deeper.
|
|
43
|
+
*
|
|
44
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
45
|
+
* @returns The render function producing the 404's markup.
|
|
46
|
+
* @example
|
|
47
|
+
* <DocsNotFound
|
|
48
|
+
* path={url.pathname}
|
|
49
|
+
* search={<SearchField defaultValue={searchQueryFromPath(url.pathname)} />}
|
|
50
|
+
* links={[{ title: "Quickstart", href: "/docs/quickstart" }]}
|
|
51
|
+
* labels={{ title: "Page not found", body: "Search for it instead.", linksTitle: "Start here" }}
|
|
52
|
+
* />
|
|
53
|
+
*/
|
|
54
|
+
export function DocsNotFound(handle) {
|
|
55
|
+
return () => {
|
|
56
|
+
let { labels, links, mix, path, search, ...rest } = handle.props;
|
|
57
|
+
let level = resolveHeadingLevel(handle);
|
|
58
|
+
let TitleTag = TAG_BY_LEVEL[level];
|
|
59
|
+
let LinksTag = TAG_BY_LEVEL[Math.min(level + 1, 6)];
|
|
60
|
+
return (_jsxs("div", { ...rest, "data-slot": "docs-not-found", mix: mergeMix([vstack({ gap: 8, align: "stretch" }), raw({ minInlineSize: "0" })], mix), children: [_jsxs("div", { mix: [vstack({ gap: 3, align: "stretch" })], children: [labels.eyebrow ? (_jsx("p", { mix: [
|
|
61
|
+
m(0),
|
|
62
|
+
font("mono"),
|
|
63
|
+
text("xs"),
|
|
64
|
+
weight("medium"),
|
|
65
|
+
textTransform("uppercase"),
|
|
66
|
+
tracking("widest"),
|
|
67
|
+
fg("brand"),
|
|
68
|
+
], children: labels.eyebrow })) : null, _jsx(TitleTag, { "data-slot": "docs-not-found-title", mix: [
|
|
69
|
+
m(0),
|
|
70
|
+
text("3xl"),
|
|
71
|
+
balance(),
|
|
72
|
+
fg("neutral.emphasis"),
|
|
73
|
+
raw({ fontWeight: 650, letterSpacing: "-0.02em", lineHeight: 1.15 }),
|
|
74
|
+
], children: labels.title }), _jsx("p", { mix: [m(0), text("base"), pretty(), fg("neutral"), raw({ maxInlineSize: "65ch" })], children: labels.body }), _jsx("p", { mix: [m(0)], children: _jsx("code", { "data-slot": "docs-not-found-path", mix: [
|
|
75
|
+
raw({
|
|
76
|
+
display: "inline-block",
|
|
77
|
+
maxInlineSize: "100%",
|
|
78
|
+
overflowWrap: "anywhere",
|
|
79
|
+
paddingInline: "0.5rem",
|
|
80
|
+
paddingBlock: "0.25rem",
|
|
81
|
+
}),
|
|
82
|
+
rounded("md"),
|
|
83
|
+
bg("neutral.bg-tint"),
|
|
84
|
+
font("mono"),
|
|
85
|
+
text("sm"),
|
|
86
|
+
fg("neutral.emphasis"),
|
|
87
|
+
], children: path }) })] }), search ? (_jsx("div", { "data-slot": "docs-not-found-search", mix: [raw({ maxInlineSize: "36rem" })], children: search })) : null, links.length > 0 ? (_jsxs("section", { "data-slot": "docs-not-found-links", mix: [vstack({ gap: 3, align: "stretch" })], children: [_jsx(LinksTag, { mix: [m(0), text("base"), weight("semibold"), balance(), fg("neutral.emphasis")], children: labels.linksTitle }), _jsx("ul", { mix: [vstack({ gap: 1, align: "stretch" }), m(0), p(0), listStyle("none")], children: links.map((link) => (_jsx("li", { children: _jsxs("a", { href: link.href, "data-rmx-prefetch": "intent", "data-slot": "docs-not-found-link", mix: [
|
|
88
|
+
hstack({ gap: 3, align: "center", justify: "between" }),
|
|
89
|
+
raw({
|
|
90
|
+
minBlockSize: "2.75rem",
|
|
91
|
+
paddingInline: "0.75rem",
|
|
92
|
+
paddingBlock: "0.5rem",
|
|
93
|
+
textDecoration: "none",
|
|
94
|
+
}),
|
|
95
|
+
rounded("md"),
|
|
96
|
+
hover(bg("neutral.bg-tint")),
|
|
97
|
+
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
98
|
+
], children: [_jsxs("span", { mix: [vstack({ gap: 0.5, align: "start" }), raw({ minInlineSize: "0" })], children: [_jsx("span", { mix: [text("sm"), weight("medium"), fg("brand")], children: link.title }), link.description ? (_jsx("span", { mix: [text("sm"), pretty(), fg("neutral")], children: link.description })) : null] }), _jsx("span", { mix: [hstack(), fg("neutral.muted")], children: _jsx(ArrowRightIcon, { size: 14, "aria-hidden": "true" }) })] }) }, link.href))) })] })) : null] }));
|
|
99
|
+
};
|
|
100
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The opening of every docs page in one order: breadcrumb trail, the page's `<h1>`, its
|
|
3
|
+
* lead, an optional plan or role notice, then one quiet row with the last-updated date
|
|
4
|
+
* and the page actions. Every string arrives as a prop, so a localized site fills it in.
|
|
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 DocsPageHeader}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace DocsPageHeader {
|
|
14
|
+
/** One step of the trail; a step without `href` is a section with no page of its own. */
|
|
15
|
+
interface Crumb {
|
|
16
|
+
label: string;
|
|
17
|
+
href?: string;
|
|
18
|
+
}
|
|
19
|
+
/** When the page last changed. */
|
|
20
|
+
interface Updated {
|
|
21
|
+
/** Text before the date, such as "Last updated". */
|
|
22
|
+
label: string;
|
|
23
|
+
/** Machine-readable date for `<time datetime>`, such as `2026-10-12`. */
|
|
24
|
+
date: string;
|
|
25
|
+
/** The date as the reader sees it; defaults to `date`. */
|
|
26
|
+
text?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Props accepted by {@link DocsPageHeader}. */
|
|
29
|
+
interface Props extends Omit<TagProps<"header">, "children" | "title"> {
|
|
30
|
+
/** The trail from the docs root to this page; the last crumb is the page itself. */
|
|
31
|
+
crumbs?: Crumb[];
|
|
32
|
+
/** Name of the breadcrumb landmark, such as "Breadcrumb". */
|
|
33
|
+
crumbsLabel?: string;
|
|
34
|
+
title: RemixNode;
|
|
35
|
+
/** Sets the title in the monospace face, for a title that is a name a reader types. */
|
|
36
|
+
mono?: boolean;
|
|
37
|
+
/** The lead under the title. */
|
|
38
|
+
description?: RemixNode;
|
|
39
|
+
updated?: Updated;
|
|
40
|
+
/** Page actions for the meta row, such as `<PageActions>`. */
|
|
41
|
+
actions?: RemixNode;
|
|
42
|
+
/** A plan or role notice drawn under the lead. */
|
|
43
|
+
notice?: RemixNode;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Renders the header. Long names in the title or lead break inside the column, the trail
|
|
48
|
+
* wraps whole steps, and under 30rem of header width the page's own crumb hides since the title names it.
|
|
49
|
+
*
|
|
50
|
+
* @param handle Runtime handle carrying the header's props.
|
|
51
|
+
* @returns The render function producing the header's markup.
|
|
52
|
+
* @example
|
|
53
|
+
* <DocsPageHeader crumbsLabel="Breadcrumb" crumbs={[{ label: "Docs", href: "/docs" }, { label: "Alerts" }]} title="Alerts" description="Page the right person." updated={{ label: "Last updated", date: "2026-10-12", text: "Oct 12, 2026" }} actions={<PageActions … />} />
|
|
54
|
+
*/
|
|
55
|
+
export declare function DocsPageHeader(handle: Handle<DocsPageHeader.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
4
|
+
import { container, flex, gap, hidden, items, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { at, atMax } from "@sdxc/u/responsive";
|
|
6
|
+
import { m, minIs } from "@sdxc/u/size";
|
|
7
|
+
import { balance, font, leading, overflowWrap, pretty, text, tracking, weight, } from "@sdxc/u/typography";
|
|
8
|
+
import { Breadcrumbs } from "../components/breadcrumbs.js";
|
|
9
|
+
/** Container the header measures; under 30rem the current crumb leaves the trail to the title. */
|
|
10
|
+
const HEADER_CONTAINER = "ui-docs-page-header";
|
|
11
|
+
/**
|
|
12
|
+
* Renders the header. Long names in the title or lead break inside the column, the trail
|
|
13
|
+
* wraps whole steps, and under 30rem of header width the page's own crumb hides since the title names it.
|
|
14
|
+
*
|
|
15
|
+
* @param handle Runtime handle carrying the header's props.
|
|
16
|
+
* @returns The render function producing the header's markup.
|
|
17
|
+
* @example
|
|
18
|
+
* <DocsPageHeader crumbsLabel="Breadcrumb" crumbs={[{ label: "Docs", href: "/docs" }, { label: "Alerts" }]} title="Alerts" description="Page the right person." updated={{ label: "Last updated", date: "2026-10-12", text: "Oct 12, 2026" }} actions={<PageActions … />} />
|
|
19
|
+
*/
|
|
20
|
+
export function DocsPageHeader(handle) {
|
|
21
|
+
return () => {
|
|
22
|
+
let { crumbs = [], crumbsLabel, title, mono = false, description, updated, actions, notice, mix, ...rest } = handle.props;
|
|
23
|
+
let hasMeta = updated !== undefined || actions !== undefined;
|
|
24
|
+
return (_jsxs("header", { ...rest, "data-slot": "docs-page-header", mix: mergeMix([
|
|
25
|
+
vstack({ gap: 3, align: "stretch" }),
|
|
26
|
+
minIs(0),
|
|
27
|
+
overflowWrap("break-word"),
|
|
28
|
+
container(HEADER_CONTAINER),
|
|
29
|
+
], mix), children: [crumbs.length > 0 ? (_jsx(Breadcrumbs, { "aria-label": crumbsLabel, children: _jsx(Breadcrumbs.List, { mix: [raw({ flexWrap: "wrap", rowGap: "0.25rem" })], children: crumbs.map((crumb, index) => {
|
|
30
|
+
let isCurrent = index === crumbs.length - 1;
|
|
31
|
+
return (_jsx(Breadcrumbs.Item, { mix: [
|
|
32
|
+
raw({ whiteSpace: "nowrap" }),
|
|
33
|
+
isCurrent && index > 0 ? atMax("29.9375rem", HEADER_CONTAINER, hidden()) : [],
|
|
34
|
+
], children: _jsx(Breadcrumbs.Link, { href: isCurrent ? undefined : crumb.href, "aria-current": isCurrent ? "page" : undefined, children: crumb.label }) }, `${index}:${crumb.label}`));
|
|
35
|
+
}) }) })) : null, _jsx("h1", { "data-slot": "docs-page-header-title", mix: [
|
|
36
|
+
m(0),
|
|
37
|
+
fg("neutral.emphasis"),
|
|
38
|
+
weight("semibold"),
|
|
39
|
+
leading(1.1),
|
|
40
|
+
balance(),
|
|
41
|
+
mono
|
|
42
|
+
? [font("mono"), tracking("tight"), text("2xl")]
|
|
43
|
+
: [tracking("-0.02em"), text("3xl")],
|
|
44
|
+
at("48rem", HEADER_CONTAINER, text(mono ? "3xl" : "4xl")),
|
|
45
|
+
], children: title }), description ? (_jsx("p", { "data-slot": "docs-page-header-description", mix: [m(0), text("lg"), leading("relaxed"), fg("neutral"), pretty()], children: description })) : null, notice ?? null, hasMeta ? (_jsxs("div", { "data-slot": "docs-page-header-meta", mix: [
|
|
46
|
+
flex(),
|
|
47
|
+
items("center"),
|
|
48
|
+
gap(2, 4),
|
|
49
|
+
raw({ flexWrap: "wrap" }),
|
|
50
|
+
text("sm"),
|
|
51
|
+
fg("neutral.muted"),
|
|
52
|
+
], children: [updated ? (_jsxs("p", { "data-slot": "docs-page-header-updated", mix: [m(0)], children: [updated.label, " ", _jsx("time", { dateTime: updated.date, children: updated.text ?? updated.date })] })) : null, actions ?? null] })) : null] }));
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The previous and next links closing a docs page, each a whole-card link naming its
|
|
3
|
+
* destination, with the section shown when the step crosses into another one. Pair it
|
|
4
|
+
* with `findNeighbours` from `@sdxc/ui/utils`, which reads the same sidebar tree.
|
|
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
|
+
/**
|
|
11
|
+
* Prop types for {@link DocsPager}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace DocsPager {
|
|
14
|
+
/** One neighbouring page; a `DocsTree.Page` from `findNeighbours` fits as is. */
|
|
15
|
+
interface Entry {
|
|
16
|
+
title: string;
|
|
17
|
+
href: string;
|
|
18
|
+
/** Title of the section the page sits in, shown when it differs from `section`. */
|
|
19
|
+
section?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Every string the pager shows or announces. */
|
|
22
|
+
interface Labels {
|
|
23
|
+
/** Name of the navigation landmark, such as "Pagination". */
|
|
24
|
+
nav: string;
|
|
25
|
+
previous: string;
|
|
26
|
+
next: string;
|
|
27
|
+
}
|
|
28
|
+
/** When the pager's links prefetch their page, as `LinkButton` does. */
|
|
29
|
+
type Prefetch = "intent" | "viewport";
|
|
30
|
+
/** Props accepted by {@link DocsPager}. */
|
|
31
|
+
interface Props extends Omit<TagProps<"nav">, "children"> {
|
|
32
|
+
/** Prefetches each neighbour's page; unset prefetches none. */
|
|
33
|
+
prefetch?: Prefetch;
|
|
34
|
+
previous?: Entry | null;
|
|
35
|
+
next?: Entry | null;
|
|
36
|
+
/** Section of the page being read; a destination in another section names its own. */
|
|
37
|
+
section?: string;
|
|
38
|
+
labels: Labels;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Renders the pair of neighbours, or nothing when the page has neither. A card with no
|
|
43
|
+
* partner fills the row on its own, and the pair stacks when the pager is under 36rem wide.
|
|
44
|
+
*
|
|
45
|
+
* @param handle Runtime handle carrying the pager's props.
|
|
46
|
+
* @returns The render function producing the pager's markup.
|
|
47
|
+
* @example
|
|
48
|
+
* <DocsPager {...findNeighbours(tree, path)} section="Guides" prefetch="intent" labels={{ nav: "Pagination", previous: "Previous", next: "Next" }} />
|
|
49
|
+
*/
|
|
50
|
+
export declare function DocsPager(handle: Handle<DocsPager.Props>): () => import("remix/component").RemixElement | null;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ArrowLeftIcon, ArrowRightIcon } from "@sdxc/icons";
|
|
3
|
+
import { bg, border, fg, outline } from "@sdxc/u/color";
|
|
4
|
+
import { rounded, transition } from "@sdxc/u/effects";
|
|
5
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
6
|
+
import { raw } from "@sdxc/u/general";
|
|
7
|
+
import { container, gap, grid, hstack, vstack } from "@sdxc/u/layout";
|
|
8
|
+
import { motionSafe } from "@sdxc/u/responsive";
|
|
9
|
+
import { is, minIs, p } from "@sdxc/u/size";
|
|
10
|
+
import { hover, when } from "@sdxc/u/state";
|
|
11
|
+
import { translateProperty } from "@sdxc/u/transform";
|
|
12
|
+
import { overflowWrap, text, textAlign, textDecoration, weight } from "@sdxc/u/typography";
|
|
13
|
+
/** Container the pager measures; at 36rem of its own width a pair of cards sits side by side. */
|
|
14
|
+
const PAGER_CONTAINER = "ui-docs-pager";
|
|
15
|
+
/** Selector for a card's arrow, which hover and focus nudge toward the destination. */
|
|
16
|
+
const ARROW = '& [data-slot="docs-pager-arrow"]';
|
|
17
|
+
/**
|
|
18
|
+
* Renders the pair of neighbours, or nothing when the page has neither. A card with no
|
|
19
|
+
* partner fills the row on its own, and the pair stacks when the pager is under 36rem wide.
|
|
20
|
+
*
|
|
21
|
+
* @param handle Runtime handle carrying the pager's props.
|
|
22
|
+
* @returns The render function producing the pager's markup.
|
|
23
|
+
* @example
|
|
24
|
+
* <DocsPager {...findNeighbours(tree, path)} section="Guides" prefetch="intent" labels={{ nav: "Pagination", previous: "Previous", next: "Next" }} />
|
|
25
|
+
*/
|
|
26
|
+
export function DocsPager(handle) {
|
|
27
|
+
return () => {
|
|
28
|
+
let { previous, next, section, labels, prefetch, mix, ...rest } = handle.props;
|
|
29
|
+
if (!previous && !next)
|
|
30
|
+
return null;
|
|
31
|
+
let paired = Boolean(previous && next);
|
|
32
|
+
return (_jsx("nav", { ...rest, "aria-label": labels.nav, "data-slot": "docs-pager", mix: mergeMix([is("100%"), container(PAGER_CONTAINER)], mix), children: _jsxs("div", { mix: [
|
|
33
|
+
grid(),
|
|
34
|
+
gap(3),
|
|
35
|
+
/**
|
|
36
|
+
* Both column counts live in one rule, so the wide layout always wins at its
|
|
37
|
+
* width whatever order the stylesheet layers land in.
|
|
38
|
+
*/
|
|
39
|
+
raw({
|
|
40
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
41
|
+
[`@container ${PAGER_CONTAINER} (min-width: 36rem)`]: {
|
|
42
|
+
gridTemplateColumns: paired ? "repeat(2, minmax(0, 1fr))" : "minmax(0, 1fr)",
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
], children: [previous ? (_jsx(DocsPagerCard, { entry: previous, prefetch: prefetch, label: labels.previous, direction: "previous", section: section })) : null, next ? (_jsx(DocsPagerCard, { entry: next, label: labels.next, direction: "next", section: section, prefetch: prefetch })) : null] }) }));
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* One neighbour as a single `<a>`, so every pixel of the card follows the link. The
|
|
50
|
+
* previous card reads from the start edge and the next from the end edge, so each points
|
|
51
|
+
* the way it goes.
|
|
52
|
+
*/
|
|
53
|
+
function DocsPagerCard(handle) {
|
|
54
|
+
return () => {
|
|
55
|
+
let { direction, entry, label, section, prefetch } = handle.props;
|
|
56
|
+
let isNext = direction === "next";
|
|
57
|
+
let Arrow = isNext ? ArrowRightIcon : ArrowLeftIcon;
|
|
58
|
+
let showSection = entry.section !== undefined && entry.section !== section;
|
|
59
|
+
let arrow = (_jsx(Arrow, { size: 14, "aria-hidden": "true", "data-slot": "docs-pager-arrow", mix: [transition("translate")] }));
|
|
60
|
+
return (_jsxs("a", { href: entry.href, "data-rmx-prefetch": prefetch, rel: isNext ? "next" : "prev", "data-slot": "docs-pager-card", "data-direction": direction, mix: [
|
|
61
|
+
vstack({ gap: 1, align: isNext ? "end" : "start" }),
|
|
62
|
+
minIs(0),
|
|
63
|
+
p(4, 5),
|
|
64
|
+
rounded("lg"),
|
|
65
|
+
border({ color: "neutral.border", width: 1, style: "solid" }),
|
|
66
|
+
textAlign(isNext ? "end" : "start"),
|
|
67
|
+
overflowWrap("anywhere"),
|
|
68
|
+
textDecoration("none"),
|
|
69
|
+
transition("border-color, background-color"),
|
|
70
|
+
hover([border("brand.border"), bg("neutral.bg-tint")]),
|
|
71
|
+
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
72
|
+
motionSafe(when("&:hover, &:focus-visible", when(ARROW, translateProperty(isNext ? "2px 0" : "-2px 0")))),
|
|
73
|
+
], children: [_jsxs("span", { mix: [hstack({ gap: 1.5, align: "center" }), text("xs"), fg("neutral.muted")], children: [isNext ? null : arrow, label, showSection ? _jsx("span", { "aria-hidden": "true", children: "\u00B7" }) : null, showSection ? _jsx("span", { "data-slot": "docs-pager-section", children: entry.section }) : null, isNext ? arrow : null] }), _jsx("span", { "data-slot": "docs-pager-title", mix: [text("base"), weight("medium"), fg("brand")], children: entry.title })] }));
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A project layout drawn as a tree: directories are native `<details>` that fold without
|
|
3
|
+
* JavaScript, files carry an icon for their type, the file a page is about stands out as
|
|
4
|
+
* an accent pill, and short comments explain an entry in muted text beside it.
|
|
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
|
+
/** Placeholder entry standing for "more files here" that a tree leaves out. */
|
|
11
|
+
declare const MORE = "\u2026";
|
|
12
|
+
/**
|
|
13
|
+
* Prop types for {@link FileTree}.
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace FileTree {
|
|
16
|
+
/**
|
|
17
|
+
* One file or directory. An entry with `children`, even an empty array, is a directory;
|
|
18
|
+
* one without is a file.
|
|
19
|
+
*/
|
|
20
|
+
interface Node {
|
|
21
|
+
name: string;
|
|
22
|
+
/** A few muted words after the name saying what the entry is for. */
|
|
23
|
+
comment?: string;
|
|
24
|
+
/** Marks the file or directory the surrounding page is about, drawn as an accent pill. */
|
|
25
|
+
highlight?: boolean;
|
|
26
|
+
/** A directory's entries; the `"…"` string stands for files the tree leaves out. */
|
|
27
|
+
children?: Entry[];
|
|
28
|
+
/** Renders a directory folded; directories render open by default. */
|
|
29
|
+
collapsed?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** A file, a directory, or the `"…"` placeholder for entries left out. */
|
|
32
|
+
type Entry = Node | typeof MORE;
|
|
33
|
+
/** Native `<div>` attributes plus the tree's entries and its accessible name. */
|
|
34
|
+
interface Props extends Omit<TagProps<"div">, "title"> {
|
|
35
|
+
nodes: Entry[];
|
|
36
|
+
/** Names the tree for assistive technology, such as "Project layout". */
|
|
37
|
+
"aria-label": string;
|
|
38
|
+
/** A caption drawn above the tree, such as the project or directory the tree shows. */
|
|
39
|
+
title?: string;
|
|
40
|
+
/** Accessible text for the `"…"` placeholder, such as "More files". */
|
|
41
|
+
moreLabel?: string;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Renders the tree's card: an optional caption, then the top level of entries in a box
|
|
46
|
+
* that scrolls sideways on its own when a deep path is wider than the page.
|
|
47
|
+
*
|
|
48
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
49
|
+
* @returns The render function producing the tree's markup.
|
|
50
|
+
* @example
|
|
51
|
+
* <FileTree aria-label="Project layout" nodes={[
|
|
52
|
+
* { name: "app", children: [{ name: "routes.ts", highlight: true, comment: "every URL" }, "…"] },
|
|
53
|
+
* { name: "package.json" },
|
|
54
|
+
* ]} />
|
|
55
|
+
*/
|
|
56
|
+
export declare function FileTree(handle: Handle<FileTree.Props>): () => import("remix/component").RemixElement;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { EllipsisIcon, FileBracesIcon, FileCodeIcon, FileCogIcon, FileIcon, FileImageIcon, FileLockIcon, FileTerminalIcon, FileTextIcon, FileTypeIcon, FolderIcon, FolderOpenIcon, } from "@sdxc/icons";
|
|
3
|
+
import { bg, border, borderEdge, fg } from "@sdxc/u/color";
|
|
4
|
+
import { rounded } from "@sdxc/u/effects";
|
|
5
|
+
import { cursor, listStyle, mergeMix, raw } from "@sdxc/u/general";
|
|
6
|
+
import { hidden, hstack, inlineFlex, shrink, vstack } from "@sdxc/u/layout";
|
|
7
|
+
import { overflowX } from "@sdxc/u/overflow";
|
|
8
|
+
import { m, minIs, mis, p, pi, pis } from "@sdxc/u/size";
|
|
9
|
+
import { focusVisible, when } from "@sdxc/u/state";
|
|
10
|
+
import { font, nowrap, text, weight } from "@sdxc/u/typography";
|
|
11
|
+
/** Placeholder entry standing for "more files here" that a tree leaves out. */
|
|
12
|
+
const MORE = "…";
|
|
13
|
+
/** Matches an icon inside the summary row of an open directory, and only that directory's. */
|
|
14
|
+
const OPEN_ROW = ":is(details[open] > summary) &";
|
|
15
|
+
/** Icons for file extensions whose type a reader recognises at a glance. */
|
|
16
|
+
const ICON_BY_EXTENSION = {
|
|
17
|
+
ts: FileCodeIcon,
|
|
18
|
+
tsx: FileCodeIcon,
|
|
19
|
+
js: FileCodeIcon,
|
|
20
|
+
jsx: FileCodeIcon,
|
|
21
|
+
mjs: FileCodeIcon,
|
|
22
|
+
cjs: FileCodeIcon,
|
|
23
|
+
mts: FileCodeIcon,
|
|
24
|
+
cts: FileCodeIcon,
|
|
25
|
+
html: FileCodeIcon,
|
|
26
|
+
sql: FileCodeIcon,
|
|
27
|
+
json: FileBracesIcon,
|
|
28
|
+
jsonc: FileBracesIcon,
|
|
29
|
+
md: FileTextIcon,
|
|
30
|
+
mdx: FileTextIcon,
|
|
31
|
+
txt: FileTextIcon,
|
|
32
|
+
css: FileTypeIcon,
|
|
33
|
+
png: FileImageIcon,
|
|
34
|
+
jpg: FileImageIcon,
|
|
35
|
+
jpeg: FileImageIcon,
|
|
36
|
+
gif: FileImageIcon,
|
|
37
|
+
svg: FileImageIcon,
|
|
38
|
+
webp: FileImageIcon,
|
|
39
|
+
avif: FileImageIcon,
|
|
40
|
+
ico: FileImageIcon,
|
|
41
|
+
sh: FileTerminalIcon,
|
|
42
|
+
toml: FileCogIcon,
|
|
43
|
+
yaml: FileCogIcon,
|
|
44
|
+
yml: FileCogIcon,
|
|
45
|
+
env: FileCogIcon,
|
|
46
|
+
lock: FileLockIcon,
|
|
47
|
+
lockb: FileLockIcon,
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Picks a file's icon from its extension, treating a dotfile's name as its extension
|
|
51
|
+
* (`.env`), and falls back to a plain file icon for anything unrecognised.
|
|
52
|
+
*
|
|
53
|
+
* @param name File name as shown in the tree.
|
|
54
|
+
*/
|
|
55
|
+
function iconFor(name) {
|
|
56
|
+
let dot = name.lastIndexOf(".");
|
|
57
|
+
if (dot === -1)
|
|
58
|
+
return FileIcon;
|
|
59
|
+
return ICON_BY_EXTENSION[name.slice(dot + 1).toLowerCase()] ?? FileIcon;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Renders the tree's card: an optional caption, then the top level of entries in a box
|
|
63
|
+
* that scrolls sideways on its own when a deep path is wider than the page.
|
|
64
|
+
*
|
|
65
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
66
|
+
* @returns The render function producing the tree's markup.
|
|
67
|
+
* @example
|
|
68
|
+
* <FileTree aria-label="Project layout" nodes={[
|
|
69
|
+
* { name: "app", children: [{ name: "routes.ts", highlight: true, comment: "every URL" }, "…"] },
|
|
70
|
+
* { name: "package.json" },
|
|
71
|
+
* ]} />
|
|
72
|
+
*/
|
|
73
|
+
export function FileTree(handle) {
|
|
74
|
+
return () => {
|
|
75
|
+
let { "aria-label": label, mix, moreLabel, nodes, title, ...rest } = handle.props;
|
|
76
|
+
return (_jsxs("div", { ...rest, "data-slot": "file-tree", mix: mergeMix([
|
|
77
|
+
vstack({ gap: 2, align: "stretch" }),
|
|
78
|
+
minIs(0),
|
|
79
|
+
p(3, 4),
|
|
80
|
+
rounded("lg"),
|
|
81
|
+
bg("neutral.tint"),
|
|
82
|
+
border({ color: "neutral.border", width: 1, style: "solid" }),
|
|
83
|
+
overflowX("auto"),
|
|
84
|
+
font("mono"),
|
|
85
|
+
text("sm"),
|
|
86
|
+
], mix), children: [title ? (_jsx("p", { "data-slot": "file-tree-title", mix: [m(0), fg("neutral.muted")], children: title })) : null, _jsx(EntryList, { "aria-label": label, entries: nodes, moreLabel: moreLabel })] }));
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* One level of the tree as a list; the list keeps the entries' count and position
|
|
91
|
+
* available to screen readers.
|
|
92
|
+
*/
|
|
93
|
+
function EntryList(handle) {
|
|
94
|
+
return () => {
|
|
95
|
+
let { "aria-label": label, entries, moreLabel } = handle.props;
|
|
96
|
+
return (_jsx("ul", { "aria-label": label, "data-slot": "file-tree-list", "data-not-typeset": "", mix: [listStyle("none"), m(0), p(0), vstack({ gap: 0.5, align: "start" })], children: entries.map((entry, index) => (_jsx(Entry, { entry: entry, moreLabel: moreLabel }, typeof entry === "string" ? `more-${index}` : entry.name))) }));
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One entry: the `"…"` placeholder, a directory whose row toggles its `<details>`, or a
|
|
101
|
+
* file row. A directory's icon swaps between closed and open folders with its state.
|
|
102
|
+
*/
|
|
103
|
+
function Entry(handle) {
|
|
104
|
+
return () => {
|
|
105
|
+
let { entry, moreLabel } = handle.props;
|
|
106
|
+
if (entry === MORE) {
|
|
107
|
+
return (_jsx("li", { "data-slot": "file-tree-more", "aria-label": moreLabel, mix: [m(0), fg("neutral.muted")], children: _jsx("span", { mix: [hstack({ gap: 2, align: "center" })], children: _jsx(EllipsisIcon, { size: 16, "aria-hidden": "true" }) }) }));
|
|
108
|
+
}
|
|
109
|
+
if (entry.children === undefined) {
|
|
110
|
+
let Glyph = iconFor(entry.name);
|
|
111
|
+
return (_jsx("li", { "data-slot": "file-tree-file", mix: [m(0)], children: _jsx(Row, { node: entry, children: _jsx(Glyph, { size: 16, "aria-hidden": "true" }) }) }));
|
|
112
|
+
}
|
|
113
|
+
return (_jsx("li", { "data-slot": "file-tree-directory", mix: [m(0), minIs(0)], children: _jsxs("details", { open: !entry.collapsed, children: [_jsx("summary", { mix: [
|
|
114
|
+
listStyle("none"),
|
|
115
|
+
cursor("pointer"),
|
|
116
|
+
rounded("sm"),
|
|
117
|
+
when("&::-webkit-details-marker", raw({ display: "none" })),
|
|
118
|
+
focusVisible(raw({ outline: "2px solid var(--ui-brand-ring)", outlineOffset: "1px" })),
|
|
119
|
+
], children: _jsxs(Row, { node: entry, children: [_jsx("span", { "data-slot": "file-tree-folder-closed", mix: [inlineFlex(), when(OPEN_ROW, hidden())], children: _jsx(FolderIcon, { size: 16, "aria-hidden": "true" }) }), _jsx("span", { "data-slot": "file-tree-folder-open", mix: [hidden(), when(OPEN_ROW, inlineFlex())], children: _jsx(FolderOpenIcon, { size: 16, "aria-hidden": "true" }) })] }) }), _jsx("div", { mix: [
|
|
120
|
+
mis(2),
|
|
121
|
+
pis(4),
|
|
122
|
+
raw({ paddingBlockStart: "0.125rem" }),
|
|
123
|
+
borderEdge("inline-start", { color: "neutral.border", width: 1, style: "solid" }),
|
|
124
|
+
], children: _jsx(EntryList, { entries: entry.children, moreLabel: moreLabel }) })] }) }));
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/** Draws one entry's icon, name (as a pill when highlighted) and comment on one line. */
|
|
128
|
+
function Row(handle) {
|
|
129
|
+
return () => {
|
|
130
|
+
let { children, node } = handle.props;
|
|
131
|
+
let isDirectory = node.children !== undefined;
|
|
132
|
+
return (_jsxs("span", { "data-slot": "file-tree-row", mix: [inlineFlex(), hstack({ gap: 2, align: "center" }), nowrap()], children: [_jsx("span", { "data-slot": "file-tree-icon", mix: [inlineFlex(), shrink(0), fg(isDirectory ? "brand" : "neutral.muted")], children: children }), _jsx("span", { "data-slot": "file-tree-name", "data-highlight": node.highlight ? "" : undefined, mix: node.highlight
|
|
133
|
+
? [
|
|
134
|
+
pi(1.5),
|
|
135
|
+
rounded("full"),
|
|
136
|
+
bg("brand.tint"),
|
|
137
|
+
fg("brand.emphasis"),
|
|
138
|
+
weight("semibold"),
|
|
139
|
+
]
|
|
140
|
+
: [fg("neutral.emphasis")], children: node.name }), node.comment ? (_jsx("span", { "data-slot": "file-tree-comment", mix: [fg("neutral.muted")], children: node.comment })) : null] }));
|
|
141
|
+
};
|
|
142
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel for `@sdxc/ui/docs`: the documentation shell, its navigation and content
|
|
3
|
+
* blocks, with the helpers only they use. Each component also imports on its own as
|
|
4
|
+
* `@sdxc/ui/docs/<module>`, which is also how its islands load.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
export * from "./anchor-heading.js";
|
|
10
|
+
export * from "./callout.js";
|
|
11
|
+
export * from "./code-block.js";
|
|
12
|
+
export * from "./code-tabs-sync.js";
|
|
13
|
+
export * from "./code-tabs.js";
|
|
14
|
+
export * from "./copy-button.js";
|
|
15
|
+
export * from "./docs-feedback.js";
|
|
16
|
+
export * from "./docs-footer.js";
|
|
17
|
+
export * from "./docs-hub.js";
|
|
18
|
+
export * from "./docs-layout.js";
|
|
19
|
+
export * from "./docs-nav-tools.js";
|
|
20
|
+
export * from "./docs-nav.js";
|
|
21
|
+
export * from "./docs-not-found.js";
|
|
22
|
+
export * from "./docs-page-header.js";
|
|
23
|
+
export * from "./docs-pager.js";
|
|
24
|
+
export * from "./file-tree.js";
|
|
25
|
+
export * from "./install-command.js";
|
|
26
|
+
export * from "./mixins/code-tabs-sync.js";
|
|
27
|
+
export * from "./mixins/copy-feedback.js";
|
|
28
|
+
export * from "./mixins/copy-from-url.js";
|
|
29
|
+
export * from "./mixins/docs-nav-tools.js";
|
|
30
|
+
export * from "./mixins/toc-spy.js";
|
|
31
|
+
export * from "./next-steps.js";
|
|
32
|
+
export * from "./page-actions.js";
|
|
33
|
+
export * from "./plan-notice.js";
|
|
34
|
+
export * from "./props-table.js";
|
|
35
|
+
export * from "./steps.js";
|
|
36
|
+
export * from "./table-of-contents.js";
|
|
37
|
+
export * from "./ui-label.js";
|
|
38
|
+
export * from "./utils/docs-tree.js";
|