@sdxc/ui 2026.11.27 → 2026.11.29
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 +265 -162
- package/dist/app/app-shell.d.ts +85 -50
- package/dist/app/app-shell.js +419 -222
- package/dist/app/auto-refresh.d.ts +68 -51
- package/dist/app/auto-refresh.js +193 -61
- package/dist/app/board.d.ts +40 -17
- package/dist/app/board.js +173 -88
- package/dist/app/chart.d.ts +10 -63
- package/dist/app/chart.js +22 -29
- package/dist/app/code-view.d.ts +12 -11
- package/dist/app/code-view.js +83 -19
- package/dist/app/command-palette.d.ts +61 -33
- package/dist/app/command-palette.js +178 -32
- package/dist/app/contribution-graph.d.ts +30 -14
- package/dist/app/contribution-graph.js +87 -26
- package/dist/app/danger-zone.d.ts +40 -35
- package/dist/app/danger-zone.js +177 -34
- package/dist/app/detail-sheet.d.ts +42 -51
- package/dist/app/detail-sheet.js +156 -37
- package/dist/app/diff.d.ts +6 -5
- package/dist/app/diff.js +9 -6
- package/dist/app/drop-zone.d.ts +3 -13
- package/dist/app/drop-zone.js +2 -2
- package/dist/app/editor-layout.d.ts +69 -47
- package/dist/app/editor-layout.js +256 -115
- package/dist/app/empty.d.ts +16 -12
- package/dist/app/empty.js +45 -19
- package/dist/app/file-trigger.d.ts +5 -13
- package/dist/app/file-trigger.js +3 -4
- package/dist/app/filter-bar.d.ts +182 -120
- package/dist/app/filter-bar.js +509 -161
- package/dist/app/filter-menu.d.ts +51 -33
- package/dist/app/filter-menu.js +105 -40
- package/dist/app/gantt.d.ts +67 -27
- package/dist/app/gantt.js +320 -163
- package/dist/app/grid-list.d.ts +2 -15
- package/dist/app/grid-list.js +3 -3
- package/dist/app/merge-box.d.ts +58 -52
- package/dist/app/merge-box.js +107 -46
- package/dist/app/mixins/optimistic-toggle-sync.d.ts +2 -2
- package/dist/app/mixins/optimistic-toggle-sync.js +3 -2
- package/dist/app/mixins/range-picker-keys.d.ts +1 -1
- package/dist/app/mixins/range-picker-keys.js +1 -1
- package/dist/app/mixins/save-bar-sync.d.ts +1 -1
- package/dist/app/mixins/save-bar-sync.js +3 -2
- package/dist/app/mixins/split-view.d.ts +3 -1
- package/dist/app/mixins/split-view.js +16 -8
- package/dist/app/optimistic-toggle.d.ts +65 -37
- package/dist/app/optimistic-toggle.js +38 -15
- package/dist/app/page-header.d.ts +80 -58
- package/dist/app/page-header.js +329 -154
- package/dist/app/profile-picker.d.ts +31 -24
- package/dist/app/profile-picker.js +134 -58
- package/dist/app/range-picker.d.ts +62 -59
- package/dist/app/range-picker.js +124 -37
- package/dist/app/review-thread.d.ts +69 -66
- package/dist/app/review-thread.js +203 -53
- package/dist/app/save-bar.d.ts +56 -27
- package/dist/app/save-bar.js +66 -14
- package/dist/app/selection-bar.d.ts +64 -66
- package/dist/app/selection-bar.js +157 -56
- package/dist/app/settings-layout.d.ts +65 -52
- package/dist/app/settings-layout.js +198 -71
- package/dist/app/settings-section.d.ts +86 -93
- package/dist/app/settings-section.js +297 -120
- package/dist/app/shortcut-list.d.ts +19 -8
- package/dist/app/shortcut-list.js +50 -9
- package/dist/app/sparkline.d.ts +14 -16
- package/dist/app/sparkline.js +20 -7
- package/dist/app/split-view.d.ts +66 -42
- package/dist/app/split-view.js +235 -128
- package/dist/app/stat-card.d.ts +16 -4
- package/dist/app/stat-card.js +57 -21
- package/dist/app/status-strip.d.ts +24 -25
- package/dist/app/status-strip.js +82 -25
- package/dist/app/tab-bar.d.ts +15 -7
- package/dist/app/tab-bar.js +74 -37
- package/dist/app/table.d.ts +37 -38
- package/dist/app/table.js +101 -45
- package/dist/app/view-options.d.ts +100 -76
- package/dist/app/view-options.js +263 -129
- package/dist/audio/media-tile.d.ts +33 -21
- package/dist/audio/media-tile.js +139 -79
- package/dist/audio/player-bar.d.ts +24 -43
- package/dist/audio/player-bar.js +183 -118
- package/dist/audio/queue-list.d.ts +40 -36
- package/dist/audio/queue-list.js +172 -73
- package/dist/audio/track-list.d.ts +53 -54
- package/dist/audio/track-list.js +127 -35
- package/dist/blog/archive-list.d.ts +158 -0
- package/dist/blog/archive-list.js +353 -0
- package/dist/blog/article-layout.d.ts +81 -0
- package/dist/blog/article-layout.js +211 -0
- package/dist/blog/author-card.d.ts +99 -0
- package/dist/blog/author-card.js +184 -0
- package/dist/blog/blog-masthead.d.ts +55 -0
- package/dist/blog/blog-masthead.js +143 -0
- package/dist/blog/index.d.ts +21 -0
- package/dist/blog/index.js +21 -0
- package/dist/blog/link-host.d.ts +47 -0
- package/dist/blog/link-host.js +61 -0
- package/dist/blog/newsletter-form.d.ts +66 -0
- package/dist/blog/newsletter-form.js +100 -0
- package/dist/blog/post-byline.d.ts +96 -0
- package/dist/blog/post-byline.js +180 -0
- package/dist/blog/post-entry.d.ts +153 -0
- package/dist/blog/post-entry.js +402 -0
- package/dist/blog/post-stream.d.ts +92 -0
- package/dist/blog/post-stream.js +163 -0
- package/dist/blog/series-nav.d.ts +144 -0
- package/dist/blog/series-nav.js +275 -0
- package/dist/blog/tag-cloud.d.ts +103 -0
- package/dist/blog/tag-cloud.js +138 -0
- package/dist/blog/tag-list.d.ts +91 -0
- package/dist/blog/tag-list.js +92 -0
- package/dist/blog/widget.d.ts +68 -0
- package/dist/blog/widget.js +61 -0
- package/dist/chat/activity.d.ts +47 -15
- package/dist/chat/activity.js +124 -46
- package/dist/chat/mention-menu.d.ts +6 -7
- package/dist/chat/mention-menu.js +4 -4
- package/dist/chat/message-group.d.ts +17 -4
- package/dist/chat/message-group.js +29 -6
- package/dist/color/color-field.d.ts +41 -68
- package/dist/color/color-field.js +21 -38
- package/dist/color/color-picker.d.ts +10 -61
- package/dist/color/color-picker.js +7 -15
- package/dist/color/color-swatch-picker.d.ts +0 -11
- package/dist/color/color-swatch-picker.js +2 -3
- package/dist/color/color-wheel.d.ts +3 -13
- package/dist/color/color-wheel.js +1 -2
- package/dist/commerce/cart-drawer.d.ts +41 -24
- package/dist/commerce/cart-drawer.js +129 -58
- package/dist/commerce/cart-line.d.ts +34 -19
- package/dist/commerce/cart-line.js +94 -28
- package/dist/commerce/checkout-layout.d.ts +23 -19
- package/dist/commerce/checkout-layout.js +53 -24
- package/dist/commerce/facet-filters.d.ts +57 -59
- package/dist/commerce/facet-filters.js +219 -129
- package/dist/commerce/item-options-dialog.d.ts +69 -40
- package/dist/commerce/item-options-dialog.js +231 -104
- package/dist/commerce/menu-item-card.d.ts +36 -20
- package/dist/commerce/menu-item-card.js +114 -61
- package/dist/commerce/option-group.d.ts +46 -27
- package/dist/commerce/option-group.js +123 -52
- package/dist/commerce/order-summary.d.ts +41 -26
- package/dist/commerce/order-summary.js +103 -49
- package/dist/commerce/order-tracker.d.ts +32 -16
- package/dist/commerce/order-tracker.js +91 -66
- package/dist/commerce/price.d.ts +41 -25
- package/dist/commerce/price.js +131 -68
- package/dist/commerce/product-card.d.ts +66 -36
- package/dist/commerce/product-card.js +215 -100
- package/dist/commerce/product-gallery.d.ts +72 -38
- package/dist/commerce/product-gallery.js +187 -82
- package/dist/commerce/promo-code.d.ts +73 -37
- package/dist/commerce/promo-code.js +172 -77
- package/dist/commerce/question-list.d.ts +43 -35
- package/dist/commerce/question-list.js +146 -72
- package/dist/commerce/shipping-estimate.d.ts +68 -33
- package/dist/commerce/shipping-estimate.js +149 -25
- package/dist/commerce/sort-select.d.ts +33 -22
- package/dist/commerce/sort-select.js +55 -26
- package/dist/commerce/variant-picker.d.ts +25 -23
- package/dist/commerce/variant-picker.js +103 -29
- package/dist/{docs → components}/anchor-heading.d.ts +1 -1
- package/dist/{docs → components}/anchor-heading.js +1 -1
- package/dist/components/autocomplete.d.ts +19 -21
- package/dist/components/autocomplete.js +57 -21
- package/dist/components/banner.d.ts +48 -37
- package/dist/components/banner.js +69 -27
- package/dist/components/button.d.ts +2 -18
- package/dist/components/button.js +4 -3
- package/dist/components/callout.d.ts +52 -0
- package/dist/components/callout.js +77 -0
- package/dist/components/checkbox.d.ts +3 -12
- package/dist/components/checkbox.js +1 -2
- package/dist/components/code-block.d.ts +110 -0
- package/dist/{docs → components}/code-block.js +92 -23
- package/dist/components/confirm.d.ts +63 -130
- package/dist/components/confirm.js +133 -52
- package/dist/{docs → components}/copy-button.d.ts +1 -1
- package/dist/{docs → components}/copy-button.js +3 -3
- package/dist/components/date-field.d.ts +40 -60
- package/dist/components/date-field.js +23 -36
- package/dist/components/date-picker.d.ts +11 -67
- package/dist/components/date-picker.js +4 -15
- package/dist/components/date-range-picker.d.ts +20 -91
- package/dist/components/date-range-picker.js +13 -27
- package/dist/components/dialog-dismiss.d.ts +1 -1
- package/dist/components/dialog-dismiss.js +1 -1
- package/dist/components/field-parts.d.ts +158 -0
- package/dist/components/field-parts.js +237 -0
- package/dist/components/filter-links.d.ts +107 -0
- package/dist/components/filter-links.js +120 -0
- package/dist/components/form.d.ts +3 -1
- package/dist/components/form.js +3 -1
- package/dist/components/index.d.ts +14 -7
- package/dist/components/index.js +14 -7
- package/dist/components/listbox.d.ts +0 -9
- package/dist/components/listbox.js +2 -2
- package/dist/components/media-grid.d.ts +15 -16
- package/dist/components/media-grid.js +75 -34
- package/dist/components/pager.d.ts +103 -0
- package/dist/components/pager.js +187 -0
- package/dist/components/property-list.d.ts +38 -39
- package/dist/components/property-list.js +149 -96
- package/dist/components/radio-group.d.ts +0 -11
- package/dist/components/radio-group.js +5 -6
- package/dist/components/range-calendar.d.ts +2 -14
- package/dist/components/range-calendar.js +2 -2
- package/dist/components/range-months.d.ts +12 -2
- package/dist/components/range-months.js +32 -16
- package/dist/components/rating-input.d.ts +14 -6
- package/dist/components/rating-input.js +26 -12
- package/dist/components/rating.d.ts +13 -8
- package/dist/components/rating.js +19 -5
- package/dist/components/review-card.d.ts +51 -26
- package/dist/components/review-card.js +173 -40
- package/dist/components/search-field.js +18 -8
- package/dist/components/section-bar.d.ts +23 -15
- package/dist/components/section-bar.js +59 -37
- package/dist/components/sidebar.d.ts +27 -0
- package/dist/components/sidebar.js +49 -20
- package/dist/{docs → components}/table-of-contents.d.ts +1 -1
- package/dist/{docs → components}/table-of-contents.js +3 -3
- package/dist/components/text-field.d.ts +54 -81
- package/dist/components/text-field.js +30 -44
- package/dist/components/time-field.d.ts +45 -65
- package/dist/components/time-field.js +23 -35
- package/dist/components/timeline.d.ts +80 -86
- package/dist/components/timeline.js +383 -170
- package/dist/components/typeset.d.ts +5 -0
- package/dist/components/typeset.js +17 -2
- package/dist/docs/code-tabs.d.ts +50 -24
- package/dist/docs/code-tabs.js +91 -25
- package/dist/docs/docs-feedback.d.ts +70 -27
- package/dist/docs/docs-feedback.js +156 -27
- package/dist/docs/docs-footer.d.ts +36 -22
- package/dist/docs/docs-footer.js +76 -23
- package/dist/docs/docs-hub.d.ts +103 -73
- package/dist/docs/docs-hub.js +333 -83
- package/dist/docs/docs-layout.d.ts +111 -42
- package/dist/docs/docs-layout.js +371 -97
- package/dist/docs/docs-nav-tools.d.ts +11 -7
- package/dist/docs/docs-nav-tools.js +4 -3
- package/dist/docs/docs-nav.d.ts +53 -17
- package/dist/docs/docs-nav.js +125 -14
- package/dist/docs/docs-not-found.d.ts +61 -35
- package/dist/docs/docs-not-found.js +198 -52
- package/dist/docs/docs-page-header.d.ts +47 -30
- package/dist/docs/docs-page-header.js +114 -31
- package/dist/docs/docs-pager.d.ts +43 -27
- package/dist/docs/docs-pager.js +73 -23
- package/dist/docs/file-tree.d.ts +16 -6
- package/dist/docs/file-tree.js +19 -4
- package/dist/docs/index.d.ts +0 -7
- package/dist/docs/index.js +0 -7
- package/dist/docs/install-command.d.ts +7 -6
- package/dist/docs/install-command.js +8 -10
- package/dist/docs/mixins/docs-nav-tools.js +1 -1
- package/dist/docs/next-steps.d.ts +56 -23
- package/dist/docs/next-steps.js +121 -35
- package/dist/docs/page-actions.d.ts +68 -46
- package/dist/docs/page-actions.js +129 -21
- package/dist/docs/steps.d.ts +14 -11
- package/dist/docs/steps.js +36 -18
- package/dist/docs/ui-label.d.ts +7 -6
- package/dist/docs/ui-label.js +21 -8
- package/dist/finance/ledger.d.ts +33 -29
- package/dist/finance/ledger.js +190 -43
- package/dist/finance/payment-card.d.ts +43 -31
- package/dist/finance/payment-card.js +170 -67
- package/dist/landing/author-band.d.ts +57 -54
- package/dist/landing/author-band.js +218 -64
- package/dist/landing/case-study.d.ts +57 -57
- package/dist/landing/case-study.js +148 -17
- package/dist/landing/changelog-strip.d.ts +56 -36
- package/dist/landing/changelog-strip.js +176 -68
- package/dist/landing/closing-cta.d.ts +21 -41
- package/dist/landing/closing-cta.js +13 -19
- package/dist/landing/code-stage.d.ts +55 -47
- package/dist/landing/code-stage.js +198 -67
- package/dist/landing/contributor-wall.d.ts +4 -4
- package/dist/landing/contributor-wall.js +4 -4
- package/dist/landing/curriculum.d.ts +74 -45
- package/dist/landing/curriculum.js +220 -62
- package/dist/landing/drawn-chart.d.ts +18 -10
- package/dist/landing/drawn-chart.js +57 -26
- package/dist/landing/episode-player.d.ts +69 -43
- package/dist/landing/episode-player.js +213 -48
- package/dist/landing/event-ticker.d.ts +13 -7
- package/dist/landing/event-ticker.js +67 -32
- package/dist/landing/fan-out-diagram.d.ts +19 -8
- package/dist/landing/fan-out-diagram.js +60 -19
- package/dist/landing/faq-band.d.ts +30 -48
- package/dist/landing/faq-band.js +37 -30
- package/dist/landing/feature-band.d.ts +48 -76
- package/dist/landing/feature-band.js +71 -49
- package/dist/landing/flow-diagram.d.ts +16 -8
- package/dist/landing/flow-diagram.js +50 -18
- package/dist/landing/install-tabs.d.ts +16 -14
- package/dist/landing/install-tabs.js +87 -39
- package/dist/landing/landing-header.d.ts +75 -66
- package/dist/landing/landing-header.js +284 -57
- package/dist/landing/landing-hero.d.ts +59 -87
- package/dist/landing/landing-hero.js +157 -128
- package/dist/landing/landing-section.d.ts +0 -9
- package/dist/landing/landing-section.js +1 -2
- package/dist/landing/logo-cloud.d.ts +26 -9
- package/dist/landing/logo-cloud.js +62 -18
- package/dist/landing/phone-fan.d.ts +15 -7
- package/dist/landing/phone-fan.js +60 -17
- package/dist/landing/price-list.d.ts +29 -22
- package/dist/landing/price-list.js +175 -77
- package/dist/landing/pricing-band.d.ts +46 -53
- package/dist/landing/pricing-band.js +167 -51
- package/dist/landing/product-frame.d.ts +44 -42
- package/dist/landing/product-frame.js +182 -85
- package/dist/landing/proof-strip.d.ts +7 -2
- package/dist/landing/proof-strip.js +7 -2
- package/dist/landing/rails.d.ts +1 -1
- package/dist/landing/rails.js +1 -1
- package/dist/landing/segmented-stage.d.ts +19 -8
- package/dist/landing/segmented-stage.js +60 -16
- package/dist/landing/sequence-diagram.d.ts +18 -8
- package/dist/landing/sequence-diagram.js +49 -18
- package/dist/landing/site-footer.d.ts +89 -68
- package/dist/landing/site-footer.js +344 -111
- package/dist/landing/site-header.d.ts +118 -80
- package/dist/landing/site-header.js +482 -67
- package/dist/landing/sponsor-wall.d.ts +34 -15
- package/dist/landing/sponsor-wall.js +111 -34
- package/dist/landing/stat-strip.d.ts +7 -9
- package/dist/landing/stat-strip.js +57 -22
- package/dist/landing/step-list.d.ts +18 -21
- package/dist/landing/step-list.js +132 -38
- package/dist/landing/tabbed-stage.d.ts +23 -15
- package/dist/landing/tabbed-stage.js +103 -21
- package/dist/landing/testimonial-band.d.ts +58 -61
- package/dist/landing/testimonial-band.js +209 -71
- package/dist/landing/typed-terminal.d.ts +9 -6
- package/dist/landing/typed-terminal.js +16 -5
- package/dist/landing/usage-estimate.d.ts +83 -74
- package/dist/landing/usage-estimate.js +254 -113
- package/dist/landing/utils/has-parts.d.ts +17 -0
- package/dist/landing/utils/has-parts.js +24 -0
- package/dist/map/map-canvas.d.ts +15 -16
- package/dist/map/map-canvas.js +40 -24
- package/dist/map/map.d.ts +42 -33
- package/dist/map/map.js +149 -38
- package/dist/mixins/aria-checked.d.ts +1 -4
- package/dist/mixins/aria-checked.js +1 -4
- package/dist/mixins/clear-field.d.ts +2 -4
- package/dist/mixins/clear-field.js +2 -4
- package/dist/mixins/index.d.ts +2 -0
- package/dist/mixins/index.js +2 -0
- package/dist/schedule/agenda.d.ts +69 -41
- package/dist/schedule/agenda.js +273 -134
- package/dist/schedule/day-strip.d.ts +38 -26
- package/dist/schedule/day-strip.js +119 -88
- package/dist/test/map.d.ts +1 -1
- package/dist/test/map.js +1 -6
- package/dist/test/reels.js +1 -1
- package/dist/test/stories.js +2 -2
- package/dist/travel/boarding-pass.d.ts +94 -70
- package/dist/travel/boarding-pass.js +341 -144
- package/dist/travel/car-offer.d.ts +109 -49
- package/dist/travel/car-offer.js +424 -64
- package/dist/travel/fare-options.d.ts +58 -34
- package/dist/travel/fare-options.js +210 -69
- package/dist/travel/flight-itinerary.d.ts +62 -55
- package/dist/travel/flight-itinerary.js +230 -55
- package/dist/travel/flight-option.d.ts +65 -33
- package/dist/travel/flight-option.js +250 -69
- package/dist/travel/flight-segment.d.ts +121 -70
- package/dist/travel/flight-segment.js +358 -96
- package/dist/travel/package-savings.d.ts +79 -39
- package/dist/travel/package-savings.js +309 -65
- package/dist/travel/price-breakdown.d.ts +30 -22
- package/dist/travel/price-breakdown.js +72 -17
- package/dist/travel/rating-breakdown.d.ts +25 -18
- package/dist/travel/rating-breakdown.js +60 -23
- package/dist/travel/seat-map.d.ts +29 -22
- package/dist/travel/seat-map.js +140 -78
- package/dist/travel/trip-timeline.d.ts +77 -39
- package/dist/travel/trip-timeline.js +316 -107
- package/dist/utils/eyebrow.d.ts +2 -2
- package/dist/utils/eyebrow.js +3 -3
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/video/episode-list.d.ts +22 -14
- package/dist/video/episode-list.js +89 -53
- package/dist/video/reel-feed.d.ts +21 -15
- package/dist/video/reel-feed.js +59 -24
- package/dist/video/story-viewer.d.ts +6 -5
- package/dist/video/story-viewer.js +84 -53
- package/dist/video/title-hero.d.ts +8 -8
- package/dist/video/title-hero.js +48 -34
- package/dist/video/video-card.d.ts +34 -20
- package/dist/video/video-card.js +119 -76
- package/dist/video/video-player.d.ts +17 -14
- package/dist/video/video-player.js +68 -30
- package/dist/video/video-shelf.d.ts +26 -14
- package/dist/video/video-shelf.js +88 -50
- package/package.json +4 -2
- package/dist/docs/callout.d.ts +0 -46
- package/dist/docs/callout.js +0 -61
- package/dist/docs/code-block.d.ts +0 -74
- package/dist/utils/field-parts.d.ts +0 -26
- package/dist/utils/field-parts.js +0 -12
- /package/dist/{docs/mixins → mixins}/copy-feedback.d.ts +0 -0
- /package/dist/{docs/mixins → mixins}/copy-feedback.js +0 -0
- /package/dist/{docs/mixins → mixins}/toc-spy.d.ts +0 -0
- /package/dist/{docs/mixins → mixins}/toc-spy.js +0 -0
- /package/dist/{docs/utils → utils}/reveal-in-scroller.d.ts +0 -0
- /package/dist/{docs/utils → utils}/reveal-in-scroller.js +0 -0
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
7
|
* @copyright Sergio Xalambrí 2026
|
|
8
8
|
*/
|
|
9
|
-
import type { EntryComponent, Handle, Props as TagProps
|
|
9
|
+
import type { EntryComponent, Handle, Props as TagProps } from "remix/component";
|
|
10
10
|
import type { DetailSheetKeyScope } from "./mixins/detail-sheet-keys.js";
|
|
11
11
|
/**
|
|
12
|
-
* Prop types for {@link DetailSheet} and {@link DetailSheetControls}.
|
|
12
|
+
* Prop types for {@link DetailSheet}, its parts and {@link DetailSheetControls}.
|
|
13
13
|
*/
|
|
14
14
|
export declare namespace DetailSheet {
|
|
15
|
-
/** Every string the sheet
|
|
15
|
+
/** Every string the sheet's controls announce; none of them is visible text. */
|
|
16
16
|
interface Labels {
|
|
17
17
|
/** Close link's name, such as "Close". */
|
|
18
18
|
close: string;
|
|
@@ -37,42 +37,25 @@ export declare namespace DetailSheet {
|
|
|
37
37
|
/** The list URL with the next record open; `null` at the last. */
|
|
38
38
|
nextHref?: string | null;
|
|
39
39
|
}
|
|
40
|
-
/** Every native `<aside>` attribute, plus the sheet's
|
|
41
|
-
interface Props extends Omit<TagProps<"aside">, "id"
|
|
42
|
-
/** The sheet's id; its
|
|
40
|
+
/** Every native `<aside>` attribute, plus the sheet's id and look. */
|
|
41
|
+
interface Props extends Omit<TagProps<"aside">, "id"> {
|
|
42
|
+
/** The sheet's id; its {@link DetailSheet.Title} takes `${id}-title`. */
|
|
43
43
|
id: string;
|
|
44
|
-
/** The record's name, in the sheet's heading. */
|
|
45
|
-
title: RemixNode;
|
|
46
|
-
/** A line under the title: an id, a status, a host. */
|
|
47
|
-
description?: RemixNode;
|
|
48
|
-
/** The list URL without the record open. Close and Esc follow it. */
|
|
49
|
-
closeHref: string;
|
|
50
|
-
/**
|
|
51
|
-
* The named `<Frame>` Close, Previous and Next load into, so stepping through records
|
|
52
|
-
* reloads only that frame while the address still moves; unset loads the whole page.
|
|
53
|
-
*/
|
|
54
|
-
target?: string;
|
|
55
|
-
/** The URL a teammate can open this record at; shows the copy button. */
|
|
56
|
-
permalink?: string;
|
|
57
|
-
/** Shows `n / N` with previous/next links and their keys. */
|
|
58
|
-
position?: Position;
|
|
59
|
-
/** Extra header controls, placed before the navigation. */
|
|
60
|
-
actions?: RemixNode;
|
|
61
|
-
/** Pinned under the body: the record's own actions. */
|
|
62
|
-
footer?: RemixNode;
|
|
63
|
-
/**
|
|
64
|
-
* Where Esc, k/j and ↑/↓ answer: `"page"` document-wide with focus moved into the
|
|
65
|
-
* sheet on open, `"sheet"` only while focus is inside it.
|
|
66
|
-
*
|
|
67
|
-
* @default "page"
|
|
68
|
-
*/
|
|
69
|
-
keys?: DetailSheetKeyScope;
|
|
70
44
|
/** Floats the sheet off the viewport edges as a rounded card. */
|
|
71
45
|
inset?: boolean;
|
|
72
|
-
labels: Labels;
|
|
73
|
-
/** The record's detail: a `PropertyList`, a `Timeline`, notes. */
|
|
74
|
-
children?: RemixNode;
|
|
75
46
|
}
|
|
47
|
+
/** What the sheet shares with its parts. */
|
|
48
|
+
interface Context {
|
|
49
|
+
/** The sheet's id, which names the copy button's field. */
|
|
50
|
+
id: string;
|
|
51
|
+
/** The heading's id, which names the sheet. */
|
|
52
|
+
titleId: string;
|
|
53
|
+
}
|
|
54
|
+
/** Every attribute {@link DetailSheetControls} takes but the sheet's id, read from the sheet. */
|
|
55
|
+
type ControlsProps = Omit<DetailSheetControlsProps, "sheetId" | "index" | "total" | "previousHref" | "nextHref"> & {
|
|
56
|
+
/** Shows `n / N` with previous/next links and their keys. */
|
|
57
|
+
position?: Position;
|
|
58
|
+
};
|
|
76
59
|
}
|
|
77
60
|
/**
|
|
78
61
|
* Props {@link DetailSheetControls} serializes into the page for hydration, which is why
|
|
@@ -103,24 +86,32 @@ export type DetailSheetControlsProps = {
|
|
|
103
86
|
*/
|
|
104
87
|
export declare const DetailSheetControls: EntryComponent<DetailSheetControlsProps>;
|
|
105
88
|
/**
|
|
106
|
-
* Renders an `<aside>` named by its
|
|
107
|
-
* to the page, with the panel docked to its inline end at
|
|
108
|
-
* a bottom sheet below 40rem.
|
|
89
|
+
* Renders an `<aside>` named by its {@link DetailSheet.Title} over the viewport, passing the
|
|
90
|
+
* pointer through to the page, with the panel docked to its inline end at
|
|
91
|
+
* `--ui-app-detail-sheet-width`, or a bottom sheet below 40rem. The panel stacks its
|
|
92
|
+
* {@link DetailSheet.Header}, {@link DetailSheet.Body} and {@link DetailSheet.Footer}; the body
|
|
93
|
+
* takes the room left and scrolls. Never a modal; destructive actions confirm in the app's flow.
|
|
109
94
|
*
|
|
110
95
|
* @param handle Runtime handle carrying the `<aside>`'s props.
|
|
111
96
|
* @returns The render function producing the sheet's markup.
|
|
112
97
|
* @example
|
|
113
|
-
*
|
|
114
|
-
* <DetailSheet
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* <PropertyList>…</PropertyList>
|
|
123
|
-
* </DetailSheet>
|
|
124
|
-
* ) : null}
|
|
98
|
+
* <DetailSheet id="monitor">
|
|
99
|
+
* <DetailSheet.Header>
|
|
100
|
+
* <DetailSheet.Title>{selected.name}</DetailSheet.Title>
|
|
101
|
+
* <DetailSheet.Actions>
|
|
102
|
+
* <DetailSheet.Controls closeHref="/monitors#monitor-42" permalink={`/monitors/${selected.id}`} labels={labels} />
|
|
103
|
+
* </DetailSheet.Actions>
|
|
104
|
+
* </DetailSheet.Header>
|
|
105
|
+
* <DetailSheet.Body><PropertyList>…</PropertyList></DetailSheet.Body>
|
|
106
|
+
* </DetailSheet>
|
|
125
107
|
*/
|
|
126
|
-
export declare function DetailSheet(handle: Handle<DetailSheet.Props>): () => import("remix/component").RemixElement;
|
|
108
|
+
export declare function DetailSheet(handle: Handle<DetailSheet.Props, DetailSheet.Context>): () => import("remix/component").RemixElement;
|
|
109
|
+
export declare namespace DetailSheet {
|
|
110
|
+
var Header: (handle: Handle<TagProps<"header">>) => () => import("remix/component").RemixElement;
|
|
111
|
+
var Title: (handle: Handle<TagProps<"h2">>) => () => import("remix/component").RemixElement;
|
|
112
|
+
var Description: (handle: Handle<TagProps<"p">>) => () => import("remix/component").RemixElement;
|
|
113
|
+
var Actions: (handle: Handle<TagProps<"div">>) => () => import("remix/component").RemixElement;
|
|
114
|
+
var Controls: (handle: Handle<DetailSheet.ControlsProps>) => () => import("remix/component").RemixElement;
|
|
115
|
+
var Body: (handle: Handle<TagProps<"div">>) => () => import("remix/component").RemixElement;
|
|
116
|
+
var Footer: (handle: Handle<TagProps<"footer">>) => () => import("remix/component").RemixElement;
|
|
117
|
+
}
|
package/dist/app/detail-sheet.js
CHANGED
|
@@ -6,7 +6,7 @@ import { opacity, rounded, shadow, transition } from "@sdxc/u/effects";
|
|
|
6
6
|
import { cursor, pointerEvents, raw, mergeMix } from "@sdxc/u/general";
|
|
7
7
|
import { absolute, container, fixed, flex, gap, hstack, inlineFlex, items, justify, shrink, vstack, } from "@sdxc/u/layout";
|
|
8
8
|
import { overflow } from "@sdxc/u/overflow";
|
|
9
|
-
import { bs, is, m, minBs,
|
|
9
|
+
import { bs, is, m, minBs, p, pb, pi } from "@sdxc/u/size";
|
|
10
10
|
import { z } from "@sdxc/u/stacking";
|
|
11
11
|
import { focusVisible, hover, when } from "@sdxc/u/state";
|
|
12
12
|
import { leading, tabularNums, text, truncate, weight } from "@sdxc/u/typography";
|
|
@@ -19,6 +19,8 @@ const SHEET_CONTAINER = "ui-detail-sheet";
|
|
|
19
19
|
const NARROW_QUERY = `@container ${SHEET_CONTAINER} (width < 40rem)`;
|
|
20
20
|
/** Where the sheet's keys answer when `keys` is left unset. */
|
|
21
21
|
const DEFAULT_KEY_SCOPE = "page";
|
|
22
|
+
/** The marker attribute the sheet's layouts select their parts by. */
|
|
23
|
+
const PART = "data-detail-sheet-part";
|
|
22
24
|
/**
|
|
23
25
|
* The square, quiet look every header control shares, links and the copy button alike.
|
|
24
26
|
*/
|
|
@@ -81,31 +83,31 @@ export const DetailSheetControls = clientEntry("@sdxc/ui/app/detail-sheet#Detail
|
|
|
81
83
|
};
|
|
82
84
|
});
|
|
83
85
|
/**
|
|
84
|
-
* Renders an `<aside>` named by its
|
|
85
|
-
* to the page, with the panel docked to its inline end at
|
|
86
|
-
* a bottom sheet below 40rem.
|
|
86
|
+
* Renders an `<aside>` named by its {@link DetailSheet.Title} over the viewport, passing the
|
|
87
|
+
* pointer through to the page, with the panel docked to its inline end at
|
|
88
|
+
* `--ui-app-detail-sheet-width`, or a bottom sheet below 40rem. The panel stacks its
|
|
89
|
+
* {@link DetailSheet.Header}, {@link DetailSheet.Body} and {@link DetailSheet.Footer}; the body
|
|
90
|
+
* takes the room left and scrolls. Never a modal; destructive actions confirm in the app's flow.
|
|
87
91
|
*
|
|
88
92
|
* @param handle Runtime handle carrying the `<aside>`'s props.
|
|
89
93
|
* @returns The render function producing the sheet's markup.
|
|
90
94
|
* @example
|
|
91
|
-
*
|
|
92
|
-
* <DetailSheet
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* <PropertyList>…</PropertyList>
|
|
101
|
-
* </DetailSheet>
|
|
102
|
-
* ) : null}
|
|
95
|
+
* <DetailSheet id="monitor">
|
|
96
|
+
* <DetailSheet.Header>
|
|
97
|
+
* <DetailSheet.Title>{selected.name}</DetailSheet.Title>
|
|
98
|
+
* <DetailSheet.Actions>
|
|
99
|
+
* <DetailSheet.Controls closeHref="/monitors#monitor-42" permalink={`/monitors/${selected.id}`} labels={labels} />
|
|
100
|
+
* </DetailSheet.Actions>
|
|
101
|
+
* </DetailSheet.Header>
|
|
102
|
+
* <DetailSheet.Body><PropertyList>…</PropertyList></DetailSheet.Body>
|
|
103
|
+
* </DetailSheet>
|
|
103
104
|
*/
|
|
104
105
|
export function DetailSheet(handle) {
|
|
105
106
|
return () => {
|
|
106
|
-
let { id,
|
|
107
|
+
let { id, inset, children, mix, ...rest } = handle.props;
|
|
107
108
|
let titleId = `${id}-title`;
|
|
108
109
|
let edge = inset ? "var(--ui-app-inset-gap, 0.5rem)" : "0px";
|
|
110
|
+
handle.context.set({ id, titleId });
|
|
109
111
|
return (_jsx("aside", { id: id, "aria-labelledby": titleId, tabIndex: -1, "data-slot": "detail-sheet", "data-inset": inset ? "" : undefined, ...rest, mix: mergeMix([
|
|
110
112
|
fixed(),
|
|
111
113
|
z(30),
|
|
@@ -117,7 +119,7 @@ export function DetailSheet(handle) {
|
|
|
117
119
|
container(SHEET_CONTAINER),
|
|
118
120
|
pointerEvents("none"),
|
|
119
121
|
outline("none"),
|
|
120
|
-
], mix), children:
|
|
122
|
+
], mix), children: _jsx("div", { "data-slot": "detail-sheet-panel", mix: [
|
|
121
123
|
absolute(),
|
|
122
124
|
flex(),
|
|
123
125
|
raw({ flexDirection: "column" }),
|
|
@@ -150,24 +152,141 @@ export function DetailSheet(handle) {
|
|
|
150
152
|
borderRadius: "var(--ui-app-inset-radius, 0.75rem) var(--ui-app-inset-radius, 0.75rem) 0 0",
|
|
151
153
|
},
|
|
152
154
|
}),
|
|
153
|
-
], children:
|
|
154
|
-
flex(),
|
|
155
|
-
items("start"),
|
|
156
|
-
justify("between"),
|
|
157
|
-
gap(3),
|
|
158
|
-
pi(4),
|
|
159
|
-
pb(3),
|
|
160
|
-
borderEdge("bottom", { width: 1, color: "neutral" }),
|
|
161
|
-
shrink(0),
|
|
162
|
-
], children: [_jsxs("div", { mix: [vstack({ gap: 0.5 }), minIs(0), raw({ paddingBlockStart: "0.25rem" })], children: [_jsx("h2", { id: titleId, mix: [m(0), text("base"), weight("semibold"), leading("1.5rem"), truncate()], children: title }), description ? (_jsx("p", { mix: [m(0), text("sm"), fg("neutral.muted")], children: description })) : null] }), _jsxs("div", { mix: [hstack({ gap: 1, align: "center" }), shrink(0), minBs("2rem")], children: [actions, _jsx(DetailSheetControls, { sheetId: id, closeHref: closeHref, permalink: permalink, index: position?.index, total: position?.total, previousHref: position?.previousHref ?? null, nextHref: position?.nextHref ?? null, target: target, labels: labels, keys: keys })] })] }), _jsx("div", { "data-slot": "detail-sheet-body", mix: [raw({ flex: "1 1 auto" }), minBs(0), overflow("auto"), p(4), vstack({ gap: 5 })], children: children }), footer ? (_jsx("footer", { "data-slot": "detail-sheet-footer", mix: [
|
|
163
|
-
flex(),
|
|
164
|
-
items("center"),
|
|
165
|
-
justify("end"),
|
|
166
|
-
gap(2),
|
|
167
|
-
pi(4),
|
|
168
|
-
pb(3),
|
|
169
|
-
shrink(0),
|
|
170
|
-
borderEdge("top", { width: 1, color: "neutral" }),
|
|
171
|
-
], children: footer })) : null] }) }));
|
|
155
|
+
], children: children }) }));
|
|
172
156
|
};
|
|
173
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* The sheet's header, pinned above the body: its {@link DetailSheet.Title} and
|
|
160
|
+
* {@link DetailSheet.Description} stack at the start, and {@link DetailSheet.Actions} sits at
|
|
161
|
+
* the end of the first line, whichever order they are written in.
|
|
162
|
+
*
|
|
163
|
+
* @param handle Runtime handle carrying the `<header>`'s props.
|
|
164
|
+
* @returns The render function producing the header.
|
|
165
|
+
* @example <DetailSheet.Header><DetailSheet.Title>api.example.com</DetailSheet.Title></DetailSheet.Header>
|
|
166
|
+
*/
|
|
167
|
+
DetailSheet.Header = function DetailSheetHeader(handle) {
|
|
168
|
+
return () => {
|
|
169
|
+
let { children, mix, ...rest } = handle.props;
|
|
170
|
+
return (_jsx("header", { "data-slot": "detail-sheet-header", ...rest, mix: mergeMix([
|
|
171
|
+
raw({
|
|
172
|
+
display: "grid",
|
|
173
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
174
|
+
gridAutoColumns: "auto",
|
|
175
|
+
alignItems: "start",
|
|
176
|
+
columnGap: "0.75rem",
|
|
177
|
+
rowGap: "0.125rem",
|
|
178
|
+
}),
|
|
179
|
+
pi(4),
|
|
180
|
+
pb(3),
|
|
181
|
+
borderEdge("bottom", { width: 1, color: "neutral" }),
|
|
182
|
+
shrink(0),
|
|
183
|
+
when(`& > :not([${PART}=actions])`, raw({ gridColumn: "1" })),
|
|
184
|
+
when(`&:has(> [${PART}=description]) > [${PART}=actions]`, raw({ gridRow: "1 / span 2" })),
|
|
185
|
+
], mix), children: children }));
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* The record's name as the sheet's heading, truncated to one line; it names the sheet.
|
|
190
|
+
*
|
|
191
|
+
* @param handle Runtime handle carrying the heading's props.
|
|
192
|
+
* @returns The render function producing the heading.
|
|
193
|
+
* @example <DetailSheet.Title>api.example.com</DetailSheet.Title>
|
|
194
|
+
*/
|
|
195
|
+
DetailSheet.Title = function DetailSheetTitle(handle) {
|
|
196
|
+
return () => {
|
|
197
|
+
let { children, mix, ...rest } = handle.props;
|
|
198
|
+
let context = handle.context.get(DetailSheet);
|
|
199
|
+
return (_jsx("h2", { id: context?.titleId, "data-slot": "detail-sheet-title", "data-detail-sheet-part": "title", ...rest, mix: mergeMix([
|
|
200
|
+
m(0),
|
|
201
|
+
text("base"),
|
|
202
|
+
weight("semibold"),
|
|
203
|
+
leading("1.5rem"),
|
|
204
|
+
truncate(),
|
|
205
|
+
raw({ paddingBlockStart: "0.25rem" }),
|
|
206
|
+
], mix), children: children }));
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* A muted line under the title: an id, a status, a host.
|
|
211
|
+
*
|
|
212
|
+
* @param handle Runtime handle carrying the paragraph's props.
|
|
213
|
+
* @returns The render function producing the line.
|
|
214
|
+
* @example <DetailSheet.Description>Checked every minute from 3 regions</DetailSheet.Description>
|
|
215
|
+
*/
|
|
216
|
+
DetailSheet.Description = function DetailSheetDescription(handle) {
|
|
217
|
+
return () => {
|
|
218
|
+
let { children, mix, ...rest } = handle.props;
|
|
219
|
+
return (_jsx("p", { "data-slot": "detail-sheet-description", "data-detail-sheet-part": "description", ...rest, mix: mergeMix([m(0), text("sm"), fg("neutral.muted")], mix), children: children }));
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* The header's end: the record's own controls followed by {@link DetailSheet.Controls}, in a
|
|
224
|
+
* row at least one control tall.
|
|
225
|
+
*
|
|
226
|
+
* @param handle Runtime handle carrying the row's props.
|
|
227
|
+
* @returns The render function producing the row.
|
|
228
|
+
* @example <DetailSheet.Actions><Button>Edit</Button><DetailSheet.Controls … /></DetailSheet.Actions>
|
|
229
|
+
*/
|
|
230
|
+
DetailSheet.Actions = function DetailSheetActions(handle) {
|
|
231
|
+
return () => {
|
|
232
|
+
let { children, mix, ...rest } = handle.props;
|
|
233
|
+
return (_jsx("div", { "data-slot": "detail-sheet-actions", "data-detail-sheet-part": "actions", ...rest, mix: mergeMix([
|
|
234
|
+
hstack({ gap: 1, align: "center" }),
|
|
235
|
+
shrink(0),
|
|
236
|
+
minBs("2rem"),
|
|
237
|
+
raw({ gridColumn: "2", gridRow: "1" }),
|
|
238
|
+
], mix), children: children }));
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* The sheet's navigation island, {@link DetailSheetControls}, for the sheet it sits in: Close
|
|
243
|
+
* and Esc follow `closeHref`, `position` adds `n / N` with previous/next links and their keys,
|
|
244
|
+
* and `permalink` adds the copy button.
|
|
245
|
+
*
|
|
246
|
+
* @param handle Runtime handle carrying the controls' props.
|
|
247
|
+
* @returns The render function producing the island.
|
|
248
|
+
* @example <DetailSheet.Controls closeHref="/monitors" position={{ index: 3, total: 84 }} labels={labels} />
|
|
249
|
+
*/
|
|
250
|
+
DetailSheet.Controls = function DetailSheetControlsPart(handle) {
|
|
251
|
+
return () => {
|
|
252
|
+
let { position, ...rest } = handle.props;
|
|
253
|
+
let context = handle.context.get(DetailSheet);
|
|
254
|
+
return (_jsx(DetailSheetControls, { ...rest, sheetId: context?.id ?? "", index: position?.index, total: position?.total, previousHref: position?.previousHref ?? null, nextHref: position?.nextHref ?? null }));
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* The record's detail, such as a `PropertyList`, a `Timeline` or notes: it takes the panel's
|
|
259
|
+
* free height and scrolls on its own.
|
|
260
|
+
*
|
|
261
|
+
* @param handle Runtime handle carrying the body's props.
|
|
262
|
+
* @returns The render function producing the body.
|
|
263
|
+
* @example <DetailSheet.Body><PropertyList>…</PropertyList></DetailSheet.Body>
|
|
264
|
+
*/
|
|
265
|
+
DetailSheet.Body = function DetailSheetBody(handle) {
|
|
266
|
+
return () => {
|
|
267
|
+
let { children, mix, ...rest } = handle.props;
|
|
268
|
+
return (_jsx("div", { "data-slot": "detail-sheet-body", ...rest, mix: mergeMix([raw({ flex: "1 1 auto" }), minBs(0), overflow("auto"), p(4), vstack({ gap: 5 })], mix), children: children }));
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* The record's own actions, pinned under the body and set at its end.
|
|
273
|
+
*
|
|
274
|
+
* @param handle Runtime handle carrying the footer's props.
|
|
275
|
+
* @returns The render function producing the footer.
|
|
276
|
+
* @example <DetailSheet.Footer><Button>Pause</Button></DetailSheet.Footer>
|
|
277
|
+
*/
|
|
278
|
+
DetailSheet.Footer = function DetailSheetFooter(handle) {
|
|
279
|
+
return () => {
|
|
280
|
+
let { children, mix, ...rest } = handle.props;
|
|
281
|
+
return (_jsx("footer", { "data-slot": "detail-sheet-footer", ...rest, mix: mergeMix([
|
|
282
|
+
flex(),
|
|
283
|
+
items("center"),
|
|
284
|
+
justify("end"),
|
|
285
|
+
gap(2),
|
|
286
|
+
pi(4),
|
|
287
|
+
pb(3),
|
|
288
|
+
shrink(0),
|
|
289
|
+
borderEdge("top", { width: 1, color: "neutral" }),
|
|
290
|
+
], mix), children: children }));
|
|
291
|
+
};
|
|
292
|
+
};
|
package/dist/app/diff.d.ts
CHANGED
|
@@ -132,7 +132,7 @@ export declare namespace Diff {
|
|
|
132
132
|
labels: HunksLabels;
|
|
133
133
|
}
|
|
134
134
|
/** Props accepted by {@link Diff.File}: every native `<section>` attribute, plus the file. */
|
|
135
|
-
interface FileProps extends
|
|
135
|
+
interface FileProps extends TagProps<"section">, Omit<HunksProps, keyof TagProps<"div"> | "hunks" | "labels" | "fileId" | "anchored"> {
|
|
136
136
|
/** The path on the old side, drawn as `old → new` when it differs from `path`. */
|
|
137
137
|
oldPath?: string;
|
|
138
138
|
/** Drawn as a toned letter (A, M, D, R, C) and read out through `labels.statuses`. */
|
|
@@ -151,10 +151,11 @@ export declare namespace Diff {
|
|
|
151
151
|
collapsed?: boolean;
|
|
152
152
|
/** The reader marked the file viewed, which renders it closed. */
|
|
153
153
|
viewed?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
/**
|
|
155
|
+
* Controls at the header's end after the copy button, in the order written, such as a
|
|
156
|
+
* `⋯` menu trigger and the "Viewed" checkbox (an `OptimisticToggle`).
|
|
157
|
+
*/
|
|
158
|
+
children?: RemixNode;
|
|
158
159
|
/**
|
|
159
160
|
* What a large file shows in place of its lines, such as a lazy frame's "Load diff";
|
|
160
161
|
* given, a file past `largeThreshold` renders collapsed and draws no row.
|
package/dist/app/diff.js
CHANGED
|
@@ -116,20 +116,23 @@ Diff.Toolbar = function DiffToolbar(handle) {
|
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
118
118
|
* Renders one file's card: a `<details>` whose summary carries the chevron, status, path,
|
|
119
|
-
* counts and five-block bar, with copy
|
|
120
|
-
* standing in for them. A collapsed, viewed or large file renders
|
|
119
|
+
* counts and five-block bar, with copy and the children (a `⋯` menu, "Viewed") beside it,
|
|
120
|
+
* then the lines or the note standing in for them. A collapsed, viewed or large file renders
|
|
121
|
+
* closed, like a checklist.
|
|
121
122
|
*
|
|
122
123
|
* @param handle Runtime handle carrying the card's props.
|
|
123
124
|
* @returns The render function producing the card.
|
|
124
125
|
* @example
|
|
125
126
|
* <Diff.File path="app/routes.ts" status="modified" additions={12} deletions={3} hunks={hunks} language="ts" view="split"
|
|
126
|
-
* viewed={viewedPaths.has("app/routes.ts")}
|
|
127
|
-
* commentHref={(path, side, line) => `?comment=${path}:${side}${line}`} labels={labels}
|
|
127
|
+
* viewed={viewedPaths.has("app/routes.ts")} threads={{ R14: <ReviewThread … /> }}
|
|
128
|
+
* commentHref={(path, side, line) => `?comment=${path}:${side}${line}`} labels={labels}>
|
|
129
|
+
* <OptimisticToggle … />
|
|
130
|
+
* </Diff.File>
|
|
128
131
|
* @example <Diff.File path="dist/app.js" status="modified" additions={9000} deletions={8800} load={<LazyFrame src={`/diff/${sha}/dist/app.js`} />} labels={labels} />
|
|
129
132
|
*/
|
|
130
133
|
Diff.File = function DiffFile(handle) {
|
|
131
134
|
return () => {
|
|
132
|
-
let { additions, binary, chunkSize, collapsed, commentHref, deletions, expandHref, hunks, id, labels, language, largeThreshold = DEFAULT_LARGE_THRESHOLD, lineHref, load,
|
|
135
|
+
let { additions, binary, children, chunkSize, collapsed, commentHref, deletions, expandHref, hunks, id, labels, language, largeThreshold = DEFAULT_LARGE_THRESHOLD, lineHref, load, mix, oldPath, path, status, threads, tooLarge, view, viewed, ...rest } = handle.props;
|
|
133
136
|
let fileId = id ?? `diff-${pathHash(path)}`;
|
|
134
137
|
let large = load !== undefined && additions + deletions > largeThreshold;
|
|
135
138
|
let open = !(collapsed || viewed || large);
|
|
@@ -174,7 +177,7 @@ Diff.File = function DiffFile(handle) {
|
|
|
174
177
|
hover(bg("neutral.bg-tint-hover")),
|
|
175
178
|
when("&[data-copied]", fg("success")),
|
|
176
179
|
focusVisible(outline({ color: "brand.ring", offset: 2 })),
|
|
177
|
-
], children: _jsx(CopyIcon, { size: 14, "aria-hidden": "true" }) }),
|
|
180
|
+
], children: _jsx(CopyIcon, { size: 14, "aria-hidden": "true" }) }), children] }), _jsxs("details", { open: open, "data-slot": "diff-file-details", mix: [
|
|
178
181
|
raw({
|
|
179
182
|
gridColumn: "1 / -1",
|
|
180
183
|
gridRow: "1 / -1",
|
package/dist/app/drop-zone.d.ts
CHANGED
|
@@ -15,17 +15,9 @@ import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
|
15
15
|
*/
|
|
16
16
|
export declare namespace DropZone {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
interface PartsProps {
|
|
22
|
-
/** Styling for the native `<input type="file">` nested inside the zone. */
|
|
23
|
-
input?: TagProps<"input">["mix"];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Props accepted by {@link DropZone}. `mix` styles the outer `<label>` —
|
|
27
|
-
* the visible drop surface a hydrated drag-and-drop mixin attaches to —
|
|
28
|
-
* while `parts.input` styles the nested file input.
|
|
18
|
+
* Props accepted by {@link DropZone}. `mix` styles the outer `<label>`,
|
|
19
|
+
* the visible drop surface a hydrated drag-and-drop mixin attaches to; the
|
|
20
|
+
* nested file input stays visually hidden.
|
|
29
21
|
*/
|
|
30
22
|
interface Props extends TagProps<"label"> {
|
|
31
23
|
/** Native `name` submitted with an enclosing form. */
|
|
@@ -46,8 +38,6 @@ export declare namespace DropZone {
|
|
|
46
38
|
* opens the picker and names the input via label association.
|
|
47
39
|
*/
|
|
48
40
|
children?: RemixNode;
|
|
49
|
-
/** Per-part styling for this component's internally composed input. */
|
|
50
|
-
parts?: PartsProps;
|
|
51
41
|
}
|
|
52
42
|
}
|
|
53
43
|
/**
|
package/dist/app/drop-zone.js
CHANGED
|
@@ -32,7 +32,7 @@ import { warnIfNoAccessibleName } from "../utils/warn-if-no-accessible-name.js";
|
|
|
32
32
|
*/
|
|
33
33
|
export function DropZone(handle) {
|
|
34
34
|
return () => {
|
|
35
|
-
let { name, accept, multiple, capture, required, disabled, children,
|
|
35
|
+
let { name, accept, multiple, capture, required, disabled, children, mix, ...rest } = handle.props;
|
|
36
36
|
warnIfNoAccessibleName(handle.props, children, "DropZone: a zone with no visible instructional text needs an `aria-label` describing what it accepts — assistive technology has no accessible name to announce for its file input otherwise.");
|
|
37
37
|
return (_jsxs("label", { ...rest, "data-slot": "zone", mix: mergeMix([
|
|
38
38
|
when("&:has(input:focus-visible)", outline({ color: "brand.ring", offset: 2 })),
|
|
@@ -52,6 +52,6 @@ export function DropZone(handle) {
|
|
|
52
52
|
fg("neutral"),
|
|
53
53
|
when("&[data-drop-target]", [border("brand.ring"), bg("brand.tint")]),
|
|
54
54
|
interactiveTransition(),
|
|
55
|
-
], mix), children: [children, _jsx("input", { type: "file", name: name, accept: accept, multiple: multiple, capture: capture, required: required, disabled: disabled, mix:
|
|
55
|
+
], mix), children: [children, _jsx("input", { type: "file", name: name, accept: accept, multiple: multiple, capture: capture, required: required, disabled: disabled, mix: [visuallyHidden()] })] }));
|
|
56
56
|
};
|
|
57
57
|
}
|
|
@@ -1,69 +1,91 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The frame of a document editor: a sticky action bar (back, title,
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The frame of a document editor as composable parts: a sticky action bar (back, title,
|
|
3
|
+
* actions), a main column held to a ~680px writing measure, and a properties sidebar that
|
|
4
|
+
* becomes a full-screen sheet behind a "Settings" button on a narrow screen.
|
|
5
5
|
*
|
|
6
6
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
7
|
* @copyright Sergio Xalambrí 2026
|
|
8
8
|
*/
|
|
9
|
-
import type { Handle, Props as TagProps
|
|
9
|
+
import type { Handle, Props as TagProps } from "remix/component";
|
|
10
|
+
import { Button } from "../components/button.js";
|
|
10
11
|
/**
|
|
11
|
-
* Prop types for {@link EditorLayout}.
|
|
12
|
+
* Prop types for {@link EditorLayout} and its parts.
|
|
12
13
|
*/
|
|
13
14
|
export declare namespace EditorLayout {
|
|
14
|
-
/**
|
|
15
|
-
interface
|
|
16
|
-
/** The button that opens the sidebar on a narrow screen, such as "Settings". */
|
|
17
|
-
settings: string;
|
|
18
|
-
/** The sheet's close button, such as "Close settings". */
|
|
19
|
-
closeSettings: string;
|
|
20
|
-
/** The sidebar's landmark name and sheet heading, such as "Post settings". */
|
|
21
|
-
sidebar: string;
|
|
22
|
-
}
|
|
23
|
-
/** Props accepted by {@link EditorLayout}. */
|
|
24
|
-
interface Props extends Omit<TagProps<"div">, "title"> {
|
|
25
|
-
/** Where the back arrow leads, and its accessible name, such as "Posts". */
|
|
26
|
-
back?: {
|
|
27
|
-
href: string;
|
|
28
|
-
label: string;
|
|
29
|
-
};
|
|
30
|
-
/** The document's name in the bar, such as its title and type. */
|
|
31
|
-
title: RemixNode;
|
|
32
|
-
/** The persistence signal, usually a `SaveStatus`. */
|
|
33
|
-
status?: RemixNode;
|
|
34
|
-
/** A Preview link or button, before the primary action. */
|
|
35
|
-
preview?: RemixNode;
|
|
36
|
-
/** The publication action, such as a Publish button whose label carries its state. */
|
|
37
|
-
primary?: RemixNode;
|
|
38
|
-
/** The document's properties: status, slug, author, tags. */
|
|
39
|
-
sidebar?: RemixNode;
|
|
15
|
+
/** Props accepted by {@link EditorLayout}; its children are the bar, the main column and the sidebar. */
|
|
16
|
+
interface Props extends TagProps<"div"> {
|
|
40
17
|
/**
|
|
41
18
|
* The `id` of the document's form, which ⌘S/Ctrl+S submits while focus is in it or in no
|
|
42
19
|
* other form, saving the way the form's own submit does.
|
|
43
20
|
*/
|
|
44
21
|
form?: string;
|
|
45
|
-
|
|
22
|
+
}
|
|
23
|
+
/** What the layout shares with its parts: the ids that tie the toggle and sheet together. */
|
|
24
|
+
interface Context {
|
|
25
|
+
sidebarId: string;
|
|
26
|
+
sidebarTitleId: string;
|
|
27
|
+
}
|
|
28
|
+
/** Every native `<header>` attribute; holds the back link, the title and the actions. */
|
|
29
|
+
interface BarProps extends TagProps<"header"> {
|
|
30
|
+
}
|
|
31
|
+
/** Every native `<a>` attribute; `href` is where the arrow leads, `aria-label` its name, such as "Posts". */
|
|
32
|
+
type BackProps = TagProps<"a">;
|
|
33
|
+
/** Every native `<h1>` attribute; holds the document's name, such as its title and type. */
|
|
34
|
+
interface TitleProps extends TagProps<"h1"> {
|
|
35
|
+
}
|
|
36
|
+
/** Every native `<div>` attribute; holds the save status, the settings toggle, Preview and the primary action. */
|
|
37
|
+
interface ActionsProps extends TagProps<"div"> {
|
|
38
|
+
}
|
|
39
|
+
/** Every {@link Button} prop; its text is the button's, such as "Settings". */
|
|
40
|
+
type SettingsToggleProps = Button.Props;
|
|
41
|
+
/** Every native `<div>` attribute; holds the document's body. */
|
|
42
|
+
interface MainProps extends TagProps<"div"> {
|
|
43
|
+
}
|
|
44
|
+
/** Every native `<aside>` attribute; holds the sidebar's header and body. */
|
|
45
|
+
interface SidebarProps extends Omit<TagProps<"aside">, "id"> {
|
|
46
|
+
}
|
|
47
|
+
/** Props accepted by {@link EditorLayout.SidebarHeader}; its text is the sheet's heading, such as "Post settings". */
|
|
48
|
+
interface SidebarHeaderProps extends TagProps<"div"> {
|
|
49
|
+
/** The sheet's close button's name, such as "Close settings". */
|
|
50
|
+
closeLabel: string;
|
|
51
|
+
}
|
|
52
|
+
/** Every native `<div>` attribute; holds the document's properties: status, slug, author, tags. */
|
|
53
|
+
interface SidebarBodyProps extends TagProps<"div"> {
|
|
46
54
|
}
|
|
47
55
|
}
|
|
48
56
|
/**
|
|
49
|
-
* Renders the
|
|
50
|
-
*
|
|
51
|
-
*
|
|
57
|
+
* Renders the layout, laying out the parts it is given: the {@link EditorLayout.Bar} across the
|
|
58
|
+
* top, the {@link EditorLayout.Main} writing column and the {@link EditorLayout.Sidebar} beside
|
|
59
|
+
* it from 56rem of width. Narrower, the sidebar is a full-screen sheet that opens with no script.
|
|
52
60
|
*
|
|
53
61
|
* @param handle Runtime handle carrying the layout's props.
|
|
54
62
|
* @returns The render function producing the layout's markup.
|
|
55
63
|
* @example
|
|
56
|
-
* <EditorLayout
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* >
|
|
66
|
-
* <
|
|
64
|
+
* <EditorLayout form="post-form">
|
|
65
|
+
* <EditorLayout.Bar>
|
|
66
|
+
* <EditorLayout.Back href="/posts" aria-label="Posts" />
|
|
67
|
+
* <EditorLayout.Title>Designing a calmer editor</EditorLayout.Title>
|
|
68
|
+
* <EditorLayout.Actions>
|
|
69
|
+
* <EditorLayout.SettingsToggle>Settings</EditorLayout.SettingsToggle>
|
|
70
|
+
* <Button size="sm">Publish</Button>
|
|
71
|
+
* </EditorLayout.Actions>
|
|
72
|
+
* </EditorLayout.Bar>
|
|
73
|
+
* <EditorLayout.Main><PostBody /></EditorLayout.Main>
|
|
74
|
+
* <EditorLayout.Sidebar>
|
|
75
|
+
* <EditorLayout.SidebarHeader closeLabel="Close settings">Post settings</EditorLayout.SidebarHeader>
|
|
76
|
+
* <EditorLayout.SidebarBody><PropertyList>…</PropertyList></EditorLayout.SidebarBody>
|
|
77
|
+
* </EditorLayout.Sidebar>
|
|
67
78
|
* </EditorLayout>
|
|
68
79
|
*/
|
|
69
|
-
export declare function EditorLayout(handle: Handle<EditorLayout.Props>): () => import("remix/component").RemixElement;
|
|
80
|
+
export declare function EditorLayout(handle: Handle<EditorLayout.Props, EditorLayout.Context>): () => import("remix/component").RemixElement;
|
|
81
|
+
export declare namespace EditorLayout {
|
|
82
|
+
var Bar: (handle: Handle<EditorLayout.BarProps>) => () => import("remix/component").RemixElement;
|
|
83
|
+
var Back: (handle: Handle<EditorLayout.BackProps>) => () => import("remix/component").RemixElement;
|
|
84
|
+
var Title: (handle: Handle<EditorLayout.TitleProps>) => () => import("remix/component").RemixElement;
|
|
85
|
+
var Actions: (handle: Handle<EditorLayout.ActionsProps>) => () => import("remix/component").RemixElement;
|
|
86
|
+
var SettingsToggle: (handle: Handle<EditorLayout.SettingsToggleProps>) => () => import("remix/component").RemixElement;
|
|
87
|
+
var Main: (handle: Handle<EditorLayout.MainProps>) => () => import("remix/component").RemixElement;
|
|
88
|
+
var Sidebar: (handle: Handle<EditorLayout.SidebarProps>) => () => import("remix/component").RemixElement;
|
|
89
|
+
var SidebarHeader: (handle: Handle<EditorLayout.SidebarHeaderProps>) => () => import("remix/component").RemixElement;
|
|
90
|
+
var SidebarBody: (handle: Handle<EditorLayout.SidebarBodyProps>) => () => import("remix/component").RemixElement;
|
|
91
|
+
}
|