@sdxc/ui 2026.11.17 → 2026.11.22

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.
Files changed (238) hide show
  1. package/README.md +139 -2
  2. package/dist/app/index.d.ts +1 -0
  3. package/dist/app/index.js +1 -0
  4. package/dist/app/mixins/command-palette.js +10 -2
  5. package/dist/app/mixins/log-viewer.js +17 -14
  6. package/dist/app/mixins/route-dialog.d.ts +17 -0
  7. package/dist/app/mixins/route-dialog.js +53 -0
  8. package/dist/app/optimistic-toggle.js +6 -0
  9. package/dist/app/route-dialog.d.ts +38 -0
  10. package/dist/app/route-dialog.js +49 -0
  11. package/dist/audio/equalizer.d.ts +24 -0
  12. package/dist/audio/equalizer.js +57 -0
  13. package/dist/audio/index.d.ts +16 -0
  14. package/dist/audio/index.js +16 -0
  15. package/dist/audio/media-tile.d.ts +38 -0
  16. package/dist/audio/media-tile.js +98 -0
  17. package/dist/audio/player-bar.d.ts +108 -0
  18. package/dist/audio/player-bar.js +338 -0
  19. package/dist/audio/queue-list.d.ts +56 -0
  20. package/dist/audio/queue-list.js +102 -0
  21. package/dist/audio/track-list.d.ts +91 -0
  22. package/dist/audio/track-list.js +226 -0
  23. package/dist/audio/utils/media-session.d.ts +44 -0
  24. package/dist/audio/utils/media-session.js +87 -0
  25. package/dist/audio/utils/play-queue.d.ts +98 -0
  26. package/dist/audio/utils/play-queue.js +149 -0
  27. package/dist/audio/utils/track-time.d.ts +28 -0
  28. package/dist/audio/utils/track-time.js +36 -0
  29. package/dist/chat/composer-format.d.ts +35 -0
  30. package/dist/chat/composer-format.js +84 -0
  31. package/dist/chat/index.d.ts +6 -0
  32. package/dist/chat/index.js +6 -0
  33. package/dist/chat/mention-menu.d.ts +43 -0
  34. package/dist/chat/mention-menu.js +70 -0
  35. package/dist/chat/message-group.d.ts +92 -0
  36. package/dist/chat/message-group.js +222 -0
  37. package/dist/chat/mixins/composer-format.d.ts +28 -0
  38. package/dist/chat/mixins/composer-format.js +80 -0
  39. package/dist/chat/mixins/composer-send.d.ts +2 -2
  40. package/dist/chat/mixins/composer-send.js +4 -2
  41. package/dist/chat/mixins/mention-menu.d.ts +41 -0
  42. package/dist/chat/mixins/mention-menu.js +213 -0
  43. package/dist/chat/mixins/reaction-sync.d.ts +47 -0
  44. package/dist/chat/mixins/reaction-sync.js +172 -0
  45. package/dist/chat/reaction-bar.d.ts +70 -0
  46. package/dist/chat/reaction-bar.js +108 -0
  47. package/dist/chat/typing-indicator.d.ts +42 -0
  48. package/dist/chat/typing-indicator.js +68 -0
  49. package/dist/chat/utils/composer-text.d.ts +38 -0
  50. package/dist/chat/utils/composer-text.js +86 -0
  51. package/dist/chat/utils/markdown-format.d.ts +30 -0
  52. package/dist/chat/utils/markdown-format.js +158 -0
  53. package/dist/chat/utils/mention-query.d.ts +55 -0
  54. package/dist/chat/utils/mention-query.js +60 -0
  55. package/dist/commerce/cart-drawer.d.ts +69 -0
  56. package/dist/commerce/cart-drawer.js +163 -0
  57. package/dist/commerce/cart-line.d.ts +32 -0
  58. package/dist/commerce/cart-line.js +43 -0
  59. package/dist/commerce/checkout-layout.d.ts +32 -0
  60. package/dist/commerce/checkout-layout.js +51 -0
  61. package/dist/commerce/facet-filters.d.ts +121 -0
  62. package/dist/commerce/facet-filters.js +318 -0
  63. package/dist/commerce/fulfilment-note.d.ts +28 -0
  64. package/dist/commerce/fulfilment-note.js +26 -0
  65. package/dist/commerce/index.d.ts +27 -0
  66. package/dist/commerce/index.js +27 -0
  67. package/dist/commerce/item-options-dialog.d.ts +67 -0
  68. package/dist/commerce/item-options-dialog.js +150 -0
  69. package/dist/commerce/menu-item-card.d.ts +37 -0
  70. package/dist/commerce/menu-item-card.js +96 -0
  71. package/dist/commerce/option-group.d.ts +62 -0
  72. package/dist/commerce/option-group.js +121 -0
  73. package/dist/commerce/order-summary.d.ts +42 -0
  74. package/dist/commerce/order-summary.js +76 -0
  75. package/dist/commerce/order-tracker.d.ts +80 -0
  76. package/dist/commerce/order-tracker.js +178 -0
  77. package/dist/commerce/price.d.ts +52 -0
  78. package/dist/commerce/price.js +108 -0
  79. package/dist/commerce/product-card.d.ts +53 -0
  80. package/dist/commerce/product-card.js +127 -0
  81. package/dist/commerce/product-gallery.d.ts +70 -0
  82. package/dist/commerce/product-gallery.js +186 -0
  83. package/dist/commerce/promo-code.d.ts +56 -0
  84. package/dist/commerce/promo-code.js +101 -0
  85. package/dist/commerce/quantity-stepper.d.ts +42 -0
  86. package/dist/commerce/quantity-stepper.js +53 -0
  87. package/dist/commerce/question-list.d.ts +53 -0
  88. package/dist/commerce/question-list.js +92 -0
  89. package/dist/commerce/shipping-estimate.d.ts +53 -0
  90. package/dist/commerce/shipping-estimate.js +39 -0
  91. package/dist/commerce/sort-select.d.ts +38 -0
  92. package/dist/commerce/sort-select.js +38 -0
  93. package/dist/commerce/variant-picker.d.ts +75 -0
  94. package/dist/commerce/variant-picker.js +135 -0
  95. package/dist/components/amount.d.ts +46 -0
  96. package/dist/components/amount.js +34 -0
  97. package/dist/components/autocomplete.d.ts +82 -0
  98. package/dist/components/autocomplete.js +114 -0
  99. package/dist/components/carousel.d.ts +31 -1
  100. package/dist/components/carousel.js +66 -3
  101. package/dist/components/index.d.ts +11 -0
  102. package/dist/components/index.js +11 -0
  103. package/dist/components/letterbox.d.ts +47 -0
  104. package/dist/components/letterbox.js +56 -0
  105. package/dist/components/lightbox.d.ts +88 -0
  106. package/dist/components/lightbox.js +224 -0
  107. package/dist/components/media-grid.d.ts +53 -0
  108. package/dist/components/media-grid.js +89 -0
  109. package/dist/components/range-months.d.ts +100 -0
  110. package/dist/components/range-months.js +274 -0
  111. package/dist/components/rating-input.d.ts +33 -0
  112. package/dist/components/rating-input.js +63 -0
  113. package/dist/components/rating.d.ts +38 -0
  114. package/dist/components/rating.js +66 -0
  115. package/dist/components/review-card.d.ts +39 -0
  116. package/dist/components/review-card.js +59 -0
  117. package/dist/components/section-bar.d.ts +57 -0
  118. package/dist/components/section-bar.js +140 -0
  119. package/dist/components/step-indicator.d.ts +46 -0
  120. package/dist/components/step-indicator.js +96 -0
  121. package/dist/finance/index.d.ts +10 -0
  122. package/dist/finance/index.js +10 -0
  123. package/dist/finance/ledger.d.ts +60 -0
  124. package/dist/finance/ledger.js +93 -0
  125. package/dist/finance/payment-card.d.ts +49 -0
  126. package/dist/finance/payment-card.js +115 -0
  127. package/dist/map/engine.d.ts +49 -0
  128. package/dist/map/engine.js +591 -0
  129. package/dist/map/index.d.ts +12 -0
  130. package/dist/map/index.js +12 -0
  131. package/dist/map/map-canvas.d.ts +101 -0
  132. package/dist/map/map-canvas.js +275 -0
  133. package/dist/map/map.d.ts +217 -0
  134. package/dist/map/map.js +598 -0
  135. package/dist/map/mixins/map-link.d.ts +30 -0
  136. package/dist/map/mixins/map-link.js +116 -0
  137. package/dist/map/utils/basemap.d.ts +88 -0
  138. package/dist/map/utils/basemap.js +84 -0
  139. package/dist/map/utils/cluster.d.ts +43 -0
  140. package/dist/map/utils/cluster.js +80 -0
  141. package/dist/map/utils/mercator.d.ts +66 -0
  142. package/dist/map/utils/mercator.js +92 -0
  143. package/dist/map/utils/stage.d.ts +24 -0
  144. package/dist/map/utils/stage.js +49 -0
  145. package/dist/mixins/autocomplete.d.ts +28 -0
  146. package/dist/mixins/autocomplete.js +283 -0
  147. package/dist/mixins/carousel-controls.d.ts +14 -3
  148. package/dist/mixins/carousel-controls.js +89 -30
  149. package/dist/mixins/index.d.ts +2 -0
  150. package/dist/mixins/index.js +2 -0
  151. package/dist/mixins/lightbox-controls.d.ts +34 -0
  152. package/dist/mixins/lightbox-controls.js +176 -0
  153. package/dist/schedule/agenda.d.ts +63 -0
  154. package/dist/schedule/agenda.js +221 -0
  155. package/dist/schedule/day-strip.d.ts +50 -0
  156. package/dist/schedule/day-strip.js +136 -0
  157. package/dist/schedule/free-busy.d.ts +96 -0
  158. package/dist/schedule/free-busy.js +285 -0
  159. package/dist/schedule/index.d.ts +15 -0
  160. package/dist/schedule/index.js +15 -0
  161. package/dist/schedule/mixins/day-strip-scroll.d.ts +16 -0
  162. package/dist/schedule/mixins/day-strip-scroll.js +40 -0
  163. package/dist/schedule/mixins/time-grid-drag.d.ts +24 -0
  164. package/dist/schedule/mixins/time-grid-drag.js +532 -0
  165. package/dist/schedule/month-view.d.ts +68 -0
  166. package/dist/schedule/month-view.js +301 -0
  167. package/dist/schedule/time-grid.d.ts +168 -0
  168. package/dist/schedule/time-grid.js +417 -0
  169. package/dist/schedule/utils/time-grid-layout.d.ts +50 -0
  170. package/dist/schedule/utils/time-grid-layout.js +93 -0
  171. package/dist/schedule/year-view.d.ts +46 -0
  172. package/dist/schedule/year-view.js +142 -0
  173. package/dist/styles/index.d.ts +1 -0
  174. package/dist/styles/index.js +1 -0
  175. package/dist/styles/typewriter-text.d.ts +20 -0
  176. package/dist/styles/typewriter-text.js +23 -0
  177. package/dist/test/map.d.ts +18 -0
  178. package/dist/test/map.js +96 -0
  179. package/dist/test/reels.d.ts +30 -0
  180. package/dist/test/reels.js +41 -0
  181. package/dist/test/stories.d.ts +31 -0
  182. package/dist/test/stories.js +66 -0
  183. package/dist/travel/boarding-pass.d.ts +107 -0
  184. package/dist/travel/boarding-pass.js +293 -0
  185. package/dist/travel/car-offer.d.ts +70 -0
  186. package/dist/travel/car-offer.js +127 -0
  187. package/dist/travel/fare-calendar.d.ts +85 -0
  188. package/dist/travel/fare-calendar.js +233 -0
  189. package/dist/travel/fare-options.d.ts +84 -0
  190. package/dist/travel/fare-options.js +142 -0
  191. package/dist/travel/flight-itinerary.d.ts +84 -0
  192. package/dist/travel/flight-itinerary.js +112 -0
  193. package/dist/travel/flight-option.d.ts +58 -0
  194. package/dist/travel/flight-option.js +111 -0
  195. package/dist/travel/flight-segment.d.ts +105 -0
  196. package/dist/travel/flight-segment.js +174 -0
  197. package/dist/travel/index.d.ts +20 -0
  198. package/dist/travel/index.js +20 -0
  199. package/dist/travel/package-savings.d.ts +74 -0
  200. package/dist/travel/package-savings.js +128 -0
  201. package/dist/travel/price-breakdown.d.ts +66 -0
  202. package/dist/travel/price-breakdown.js +102 -0
  203. package/dist/travel/rating-breakdown.d.ts +81 -0
  204. package/dist/travel/rating-breakdown.js +132 -0
  205. package/dist/travel/seat-map.d.ts +108 -0
  206. package/dist/travel/seat-map.js +371 -0
  207. package/dist/travel/trip-timeline.d.ts +84 -0
  208. package/dist/travel/trip-timeline.js +212 -0
  209. package/dist/utils/gamepad-presses.d.ts +21 -0
  210. package/dist/utils/gamepad-presses.js +28 -0
  211. package/dist/utils/index.d.ts +5 -0
  212. package/dist/utils/index.js +5 -0
  213. package/dist/utils/move-focus.d.ts +20 -0
  214. package/dist/utils/move-focus.js +28 -0
  215. package/dist/utils/range-months.d.ts +54 -0
  216. package/dist/utils/range-months.js +98 -0
  217. package/dist/utils/swipe-direction.d.ts +23 -0
  218. package/dist/utils/swipe-direction.js +27 -0
  219. package/dist/utils/typewriter.d.ts +49 -0
  220. package/dist/utils/typewriter.js +171 -0
  221. package/dist/video/index.d.ts +6 -2
  222. package/dist/video/index.js +6 -2
  223. package/dist/video/mixins/reel-feed-sync.d.ts +41 -0
  224. package/dist/video/mixins/reel-feed-sync.js +430 -0
  225. package/dist/video/mixins/story-viewer-sync.d.ts +31 -0
  226. package/dist/video/mixins/story-viewer-sync.js +391 -0
  227. package/dist/video/mixins/video-player-sync.js +138 -5
  228. package/dist/video/reel-feed.d.ts +95 -0
  229. package/dist/video/reel-feed.js +124 -0
  230. package/dist/video/story-ring.d.ts +32 -0
  231. package/dist/video/story-ring.js +42 -0
  232. package/dist/video/story-viewer.d.ts +85 -0
  233. package/dist/video/story-viewer.js +250 -0
  234. package/dist/video/video-card.d.ts +3 -1
  235. package/dist/video/video-card.js +15 -5
  236. package/dist/video/video-player.d.ts +33 -0
  237. package/dist/video/video-player.js +226 -20
  238. package/package.json +21 -2
package/README.md CHANGED
@@ -128,6 +128,7 @@ A page that sticks to baseline behavior ships no library JavaScript at all.
128
128
  | `@sdxc/ui/color` | Colour fields, pickers, sliders, swatches, area and wheel. |
129
129
  | `@sdxc/ui/app` | Dashboard and workspace components: charts, tables, lists, toasts. |
130
130
  | `@sdxc/ui/video` | A video player, plus the cards, shelves and episode lists a library browses with. |
131
+ | `@sdxc/ui/audio` | A music app's track table, tiles, player bar, queue and the queue helpers. |
131
132
  | `@sdxc/ui/<ns>/<name>` | One namespace component, by its file name: `@sdxc/ui/docs/steps`. |
132
133
  | `@sdxc/ui/mixins` | Opt-in DOM behaviors applied through `mix`. |
133
134
  | `@sdxc/ui/behaviors` | Headless state classes built on `TypedEventTarget`. |
@@ -177,6 +178,8 @@ Every export carries JSDoc, so the editor shows each full signature.
177
178
  text input with a `<datalist>`, and a `<search>` landmark.
178
179
  - `CharacterCount` — island: a ring and the characters left for a limited field; load
179
180
  `@sdxc/ui/character-count`, and check `countCharacters()` on the server.
181
+ - `Autocomplete` — a text field over a styled, filtered suggestion list (icons, descriptions, a
182
+ heading), with a native `<datalist>` without script; load `@sdxc/ui/autocomplete` for its island.
180
183
 
181
184
  ### Components: overlays and menus
182
185
 
@@ -184,6 +187,8 @@ Every export carries JSDoc, so the editor shows each full signature.
184
187
  - `Modal`, `Drawer`, `Sheet` — `Dialog` presets: pop-in, edge-docked, and a fixed side column.
185
188
  - `DialogDismiss` — island closing its dialog on a backdrop press or a followed link; load `@sdxc/ui/dialog-dismiss` in the browser entry.
186
189
  - `Confirm` — a complete confirmation dialog; with `form` its confirm button submits a real form.
190
+ - `Lightbox` — a full-screen photo viewer on `<dialog>`: scroll-snap slides with id links, opened by
191
+ `Lightbox.Trigger` at an `index`; load `@sdxc/ui/lightbox` for arrow keys and opening at a photo.
187
192
  - `Popover`, `Tooltip`, `HoverCard` — an anchored popover, a label shown on hover or focus of the
188
193
  preceding sibling, and a detail panel shown on hover or focus within.
189
194
  - `Menu`, `NavigationMenu` — popover menus, and a row of navigation panels.
@@ -198,6 +203,9 @@ Every export carries JSDoc, so the editor shows each full signature.
198
203
  - `Link`, `NavLink`, `LinkButton` — an inline anchor, a navigation link, and a link styled as a
199
204
  button.
200
205
  - `Tabs` — tabs driven by routing: the `.Tab` pointing at the current page is selected.
206
+ - `SectionBar` — a sticky row of chips linking to a long page's sections; the chip of the section
207
+ being read follows the scroll (island `@sdxc/ui/section-bar`).
208
+ - `StepIndicator` — numbered steps of a flow spread over several pages; done steps link back.
201
209
  - `Breadcrumbs`, `Pagination`, `Sidebar` — a trail of parents, a pager landmark, and an app shell
202
210
  rail whose collapse rides a checkbox's `:checked`.
203
211
  - `Disclosure`, `Accordion` — `<details>` sections, alone or stacked.
@@ -209,6 +217,7 @@ Every export carries JSDoc, so the editor shows each full signature.
209
217
 
210
218
  - `Alert` — an inline status panel.
211
219
  - `Badge`, `TagGroup` — a status pill, and a labeled set of removable pills.
220
+ - `Amount` — money from integer minor units and an ISO code, written by `@sdxc/money` in any locale, in a `<data>` element.
212
221
  - `Spinner` — a busy indicator.
213
222
  - `LabelChip` — a label pill in any colour whose text stays readable in both schemes.
214
223
 
@@ -220,6 +229,13 @@ Every export carries JSDoc, so the editor shows each full signature.
220
229
  presets.
221
230
  - `AspectRatio`, `ScrollArea`, `Carousel` — a ratio lock, a scroll region, and a scroll-snap slide
222
231
  set.
232
+ `Carousel.Dots` and `Carousel.Count` show the position, and `CarouselSync`, placed inside the
233
+ root, runs the arrows, dots and count without a page-written island.
234
+ - `Letterbox` — a frame that centres a fixed-ratio `.Surface` (16:9 unless `ratio` says otherwise)
235
+ in any box, barring the sides it leaves empty; the surface is a size container, so content on it
236
+ sized in `cqw`/`cqh` scales with it.
237
+ - `MediaGrid` — square photo and video tiles as links, three to a row; `.Item` can stand
238
+ `tall`, carry a `badge` and show an `overlay` on hover or focus.
223
239
  - `YouTubeEmbed` — a lazy-loaded 16:9 YouTube player (`videoId`, `start?`, `title`) served from
224
240
  `www.youtube-nocookie.com`, which the page's `frame-src` has to allow.
225
241
  - `Text`, `Header`, `Keyboard`, `Typeset` — muted copy, a section label, a `<kbd>`, and typography
@@ -230,6 +246,9 @@ Every export carries JSDoc, so the editor shows each full signature.
230
246
  - `SharedElement` — a host with a stable view-transition name across page loads.
231
247
  - `Calendar`, `RangeCalendar`, `DatePicker`, `DateRangePicker` — month grids for a day or a range,
232
248
  and popover pickers around them; `Calendar` without children renders `<input type="date">`.
249
+ - `RangeMonths` — consecutive month grids whose days are links the caller builds, for picking a
250
+ stay's range or a single date without script; booked days are struck through and a range never
251
+ crosses one.
233
252
 
234
253
  ### Landing (`@sdxc/ui/landing`)
235
254
 
@@ -332,6 +351,10 @@ one the page uses in the browser entry.
332
351
  `.Note`, `.Steps` and `.Step` (an icon, a running state, output it opens onto).
333
352
  - `Composer` — the message form, with `.Input` (grows to twelve lines), `.Toolbar` and `.Hint`;
334
353
  `ComposerSubmit` is its send button, Enter to send, and Stop while a reply streams.
354
+ - `ComposerFormat`, `MentionMenu` — composer islands: Markdown buttons and shortcuts (`applyFormat`)
355
+ and `@` suggestions (`mentionQuery`). Emoji pickers come from `@sdxc/emoji/ui`.
356
+ - `MessageGroup`, `ReactionBar`, `TypingIndicator` — a team chat's runs of messages, reaction chips
357
+ that post as forms (`reactionSync()` flips them in place), and who is typing.
335
358
  - `revealStream(root)` — replays a server-rendered reply word by word; `streamTarget()` styles it.
336
359
 
337
360
  | Helper | Host | Adds |
@@ -376,6 +399,8 @@ Dashboard and workspace components.
376
399
  card and posts the card's own move form, which its menu also submits without script.
377
400
  - `Gantt` — a Gantt chart: grouped projects as bars on a month and week axis, with progress, today's line and a
378
401
  hatched tail for a late projection.
402
+ - `RouteDialog` — a dialog the address opens (`?edit=42`): open without script, a modal once
403
+ hydrated, and closing follows a link back to the address without it.
379
404
  - `Toolbar`, `Menubar`, `ContextMenu` — a row of controls, a row of menu triggers, and a
380
405
  pointer-positioned menu.
381
406
  - `PageHeader` — a screen's title row and tabs; tabs that overflow fold into a More menu.
@@ -419,13 +444,116 @@ Dashboard and workspace components.
419
444
  `VideoPlayerSync` island swaps them. `.Settings` takes `.CaptionsMenu`, `.SpeedMenu`,
420
445
  `.QualityMenu`, and the page's own `.SettingsToggle` checkboxes and `.SettingsMenu` radio groups,
421
446
  which the page reads by `name` from `change` events.
422
- - `VideoCard` — a title as one link: 16:9 or 2:3 art, a badge, a watched bar, its name and meta.
447
+ `layout="stage"` fills the box it is given for a film or episode: `.Overlay` floats over the top,
448
+ the bar and overlay fade while it plays and the pointer rests, and `.Group` (`start`, `center`,
449
+ `end`), `.Skip`, `.Mute` and `.Heading` arrange the bar; the page's keys play, skip, mute and
450
+ go full screen.
451
+ - `VideoCard` — a title as one link: 16:9 or 2:3 art, a badge at the top or foot, a watched bar,
452
+ its name and meta.
423
453
  - `VideoShelf` — a titled row of `.Item`s that scrolls sideways; `VideoShelfSync` reveals paging
424
454
  buttons at its edges.
425
455
  - `EpisodeList` — a season as an `<ol>` of `.Item` links with a still, number, runtime, synopsis
426
456
  and watched bar.
427
457
  - `TitleHero` — a title's art edge to edge under the top bar, faded into the page, with
428
458
  `.Eyebrow`, `.Title`, `.Facts`, `.Rating`, `.Summary` and `.Actions`.
459
+ - `ReelFeed` — a full-height vertical feed of `.Item` videos, one per screen on scroll snap;
460
+ `ReelFeedSync` preloads the next reel, pauses the rest, steps one reel per key or wheel flick
461
+ and follows each reel's address.
462
+ - `StoryViewer` — full-screen `.Group`s of timed `.Segment`s under progress bars, with link tap
463
+ zones; `StoryViewerSync` advances, pauses on hold and closes on a swipe down.
464
+ - `StoryRing` — a picture in a seen or unseen story ring.
465
+
466
+ ### Audio (`@sdxc/ui/audio`)
467
+
468
+ - `TrackList` — a track table whose `.Row`s show a number that turns into a `.PlayButton`
469
+ covering the row, artists, album, date added and length; the playing row is
470
+ `aria-current="true"` under an `Equalizer`, and narrow boxes keep number, title and length.
471
+ - `MediaTile` — an album, playlist (square) or artist (round) as one link, with a `play` slot
472
+ over the art outside the link.
473
+ - `PlayerBar` — the bar along a music app's foot: `.Track`, `.Button` (`pressed`, `primary`),
474
+ `.Seek` and `.Range`; `.Mini` is its phone form with an `expand` button and `actions`.
475
+ - `QueueList` — `.Section`s of `.Item`s for "Now playing" and "Next up".
476
+ - `Equalizer` — the playing mark, still inside any `[data-audio-paused]` ancestor.
477
+ - `createPlayQueue`, `nextInQueue`, `previousInQueue`, `toggleShuffle`, `cycleRepeat`,
478
+ `jumpTo`, `upcoming` — the play order as data; `syncMediaSession` hands a track and the
479
+ player's commands to the system's media controls.
480
+
481
+ ### Commerce (`@sdxc/ui/commerce`)
482
+
483
+ Ordering something to be delivered, such as food from a restaurant.
484
+
485
+ - `MenuItemCard` — an item on a menu; the whole card opens its options dialog through Invoker Commands.
486
+ - `ItemOptionsDialog` — a native dialog (a bottom sheet on a phone) with the item, its option groups, a
487
+ quantity and an add button carrying the running price.
488
+ - `OptionGroup` — priced choices: radios for a required pick, checkboxes up to `max` for extras. The
489
+ `OptionsLive` island (`@sdxc/ui/commerce/option-group`) reprices the form and enforces the limit.
490
+ - `CartLine`, `QuantityStepper` — a cart's line, and a − count + control whose buttons are form posts.
491
+ - `OrderSteps`, `OrderLive` — an order's status timeline, and an island (`@sdxc/ui/commerce/order-tracker`)
492
+ that follows a `step progress minutes` text stream to move the steps, headline, estimate and any map marker.
493
+
494
+ ### Map (`@sdxc/ui/map`)
495
+
496
+ Places on a map, with the list they belong to.
497
+
498
+ - `MapCanvas` — a drawn map in one SVG viewBox: caller art, `.Route` (travelled share solid, the rest
499
+ dashed), `.Marker` (a glyph along a path at `progress`) and `.Pin` price pills as links or buttons;
500
+ `MapCanvasSync` lights a pin and the list row sharing its `mapKey`.
501
+ - `GeoMap` — a real map by longitude and latitude: server SVG with HTML `.Marker`s (clusters, `.Popup`),
502
+ `.Route` and `.RouteMarker`, `.Area` for "search this area"; the `@sdxc/ui/map/map` island runs it
503
+ on MapLibre (an optional peer) over OpenFreeMap's light and dark styles by default (allow
504
+ `https://tiles.openfreemap.org` in `connect-src` and `img-src`, and `blob:` in `worker-src`), or
505
+ your own GeoJSON basemap or style URL.
506
+ - `mapLink(key)`, `mapLinks()` — mixins that light every element sharing a `data-map-key` while one
507
+ is hovered or focused, so a list row and its pin highlight together.
508
+
509
+ ### Travel (`@sdxc/ui/travel`)
510
+
511
+ Booking a stay or a trip.
512
+
513
+ - `RatingBreakdown` — a review score with `.Group` lists of `.Bar` meters, per star or per category.
514
+ - `PriceBreakdown` — a receipt `<dl>` of `.Line`s (`detail`, `tone="discount"`, a named `<output>`)
515
+ and a bold `.Total`.
516
+ - `FlightSegment` — one leg: airline mark, name and number, then a `FlightRoute` (times, codes, a track
517
+ with a dot per stop, "+1" day badge), aircraft and cabin; `FlightRoute` also ships on its own.
518
+ - `FlightItinerary` — a journey summarised on one line over a native `<details>` listing `.Segment`s
519
+ and `.Layover`s (`tone="warning"` for a short or overnight connection).
520
+ - `FlightOption` — a flight results row: badges, one `.Journey` per direction, the price and a select action.
521
+ - `FareOptions` — fare classes as radio cards in a `<fieldset>`, with `.Option` features marked
522
+ included, not included or for a fee, and an optional ribbon.
523
+ - `FareCalendar` — flexible dates: a month of day links with each day's fare, the cheapest tinted and
524
+ named so; `variant="strip"` is a scrolling row of `days` around `selected`.
525
+ - `SeatMap` — a cabin seat picker: a fuselage of native radios under one `name` (`layout="ABC DEF"`,
526
+ taken seats disabled, tinted kinds, exits, wing, sections), scrolling in its box; `.Legend` swatches.
527
+ - `BoardingPass` — a wallet-style pass with a brand band, route, field grid and perforated stub;
528
+ `PassCode` draws the deterministic code-like art it carries.
529
+ - `CarOffer` — a rental car result: picture, class and model, spec chips, perks, company and rating,
530
+ pickup point, daily and total price, actions.
531
+ - `PackageSavings` — a bundle's price beside its `.Part`s' struck-through separate prices and a saving badge.
532
+ - `TripTimeline` — a whole trip on a rail: `.Day` headings over `.Item`s (flight, stay, car, activity, note)
533
+ with time, details, status and actions.
534
+
535
+ ### Finance (`@sdxc/ui/finance`)
536
+
537
+ Banking, budgeting and wallets.
538
+
539
+ - `Ledger` — money movements grouped by day, each day headed by its total, each row one link.
540
+ - `PaymentCard` — a drawn card face with a masked number, a chip or "Virtual" tag, and a frozen state.
541
+
542
+ ### Schedule (`@sdxc/ui/schedule`)
543
+
544
+ Calendars, schedules and finding a time together.
545
+
546
+ - `TimeGrid` — day, multi-day or week columns of hours: overlapping events side by side, an all-day
547
+ lane, an hour column per time zone and a moving now line; with `edit`, a drag creates, moves or
548
+ resizes an event and Alt+arrows move the focused one, each posting a form; with `pages`, a swipe
549
+ on a touch screen follows the previous or next range.
550
+ - `MonthView`, `Agenda`, `DayStrip` — a month of day cells with bars and "+N more", an agenda grouped
551
+ by day, and a phone's scrolling strip of days with a note under each.
552
+ - `YearView` — twelve small months whose day dots weigh how busy each day is, every day a link.
553
+ - `FreeBusy` — people's busy times side by side over one day, with outside-hours hatching and the
554
+ free slots everyone can make.
555
+ - `layoutTimedItems()`, `layoutSpanItems()` — the overlap columns and all-day rows the views place
556
+ events with, for a custom view.
429
557
 
430
558
  ### Component helpers
431
559
 
@@ -525,7 +653,8 @@ opacity fade under reduced motion.
525
653
 
526
654
  Recipes for a `mix` array: `floatingSurface()`, `surfaceInset()`, `hitArea()`, `panelChrome()`,
527
655
  `semanticColorPanel()`, `interactiveTransition()`, `fieldStackLayout()`, `outputCaptionText()`,
528
- `rangeThumbAppearance(sizeVar, borderWidthVar)`.
656
+ `rangeThumbAppearance(sizeVar, borderWidthVar)`, and `typewriterText()`, which hides the text a
657
+ `Typewriter` has not revealed yet.
529
658
 
530
659
  Landing recipes (same entry), shared because general components use them too: `landingContainer()`,
531
660
  `landingSectionSpace("hero" | "normal" | "compact")`,
@@ -548,6 +677,14 @@ handled there — no separate landing animation system.
548
677
  - **DOM** — `asCommandEvent`, `dispatchChange`, `isNewPrimaryPress`, `isPrintableKey`, `focusItem`,
549
678
  `queryItems`, `setRovingTabindex`, `labelFor`, `hasAccessibleText`, `glyphEdges`, `mergeStyle`, `prefersReducedMotion`, `writeCookie(name, value, { maxAgeSeconds?, path? })`,
550
679
  `DISABLED_SELECTOR`, `DEFAULT_ICON_ARIA_HIDDEN`, `ONE_YEAR_SECONDS`.
680
+ - **Input** — `moveFocus(root, 1 | -1)` steps focus through a container's visible controls for a
681
+ D-pad or remote, `gamepadPresses(previous, current)` reports the gamepad buttons that went down
682
+ between two polls, and `swipeDirection(dx, dy, threshold?)` reads a pointer's travel as a swipe
683
+ or a tap (`null`).
684
+ - **Typing** — `new Typewriter(element)` hides an element's text through the `ui-typewriter` CSS
685
+ highlight and `start(charactersPerSecond)` reveals it with the DOM untouched, so the layout holds
686
+ and a screen reader gets the whole text; `finish()`, `dispose()` and `done` end it. Elements
687
+ marked `data-typewriter-pause="ms"` hold the typing and `data-typewriter-speed="0.5"` scales it.
551
688
  - **Code** — `codeLines(runs)` splits a highlighter's runs into lines, and `fileIcon(path)` picks a file's icon.
552
689
  - **Accessibility checks** — `warnIfNoAccessibleName(props, children, message)` and
553
690
  `warnIfNoAccessibleLabel(props, message)`, development-only warnings.
@@ -80,6 +80,7 @@ export * from "./range-picker.js";
80
80
  export * from "./resizable.js";
81
81
  export * from "./gantt.js";
82
82
  export * from "./review-thread.js";
83
+ export * from "./route-dialog.js";
83
84
  export * from "./save-bar.js";
84
85
  export * from "./save-status.js";
85
86
  export * from "./selection-bar.js";
package/dist/app/index.js CHANGED
@@ -80,6 +80,7 @@ export * from "./range-picker.js";
80
80
  export * from "./resizable.js";
81
81
  export * from "./gantt.js";
82
82
  export * from "./review-thread.js";
83
+ export * from "./route-dialog.js";
83
84
  export * from "./save-bar.js";
84
85
  export * from "./save-status.js";
85
86
  export * from "./selection-bar.js";
@@ -263,6 +263,14 @@ function attach(dialog, props, signal) {
263
263
  fillRecent();
264
264
  showPage(null, "");
265
265
  };
266
+ /**
267
+ * Closes the palette and resets it in the same task, so reopening it before the dialog's
268
+ * queued `close` event runs still shows an empty query and a fresh Recent group.
269
+ */
270
+ let close = () => {
271
+ dialog.close();
272
+ reset();
273
+ };
266
274
  /** Presses a row: a page opener opens its page; any other command runs and closes the palette. */
267
275
  let run = (item) => {
268
276
  item.querySelector(`[${PALETTE_CONTROL_ATTRIBUTE}]`)?.click();
@@ -284,7 +292,7 @@ function attach(dialog, props, signal) {
284
292
  let isFinderRow = control.closest(`[${PALETTE_FINDER_ATTRIBUTE}]`) !== null;
285
293
  if (id != null && !isFinderRow)
286
294
  remember(props.remember, id);
287
- dialog.close();
295
+ close();
288
296
  }, { signal });
289
297
  dialog.addEventListener("pointermove", (event) => {
290
298
  let item = event.target instanceof Element
@@ -321,7 +329,7 @@ function attach(dialog, props, signal) {
321
329
  whileTyping: true,
322
330
  run: () => {
323
331
  if (dialog.open)
324
- dialog.close();
332
+ close();
325
333
  else
326
334
  dialog.showModal();
327
335
  return true;
@@ -217,13 +217,14 @@ function appendLine(live, raw) {
217
217
  }
218
218
  /**
219
219
  * Keeps the log on its newest line while the reader is there, and once they scroll up, shows
220
- * the "Jump to latest" pill instead of pulling them down.
220
+ * the "Jump to latest" pill instead of pulling them down. The returned function runs `write`,
221
+ * deciding from where the log sits just before it, so a scroll whose event is still queued counts.
221
222
  */
222
223
  function followTail(root, signal) {
223
224
  let body = root.querySelector('[data-slot="log-viewer-body"]');
224
225
  let pill = root.querySelector("[data-log-jump]");
225
226
  if (body === null)
226
- return () => { };
227
+ return (write) => write();
227
228
  let following = true;
228
229
  let toBottom = () => {
229
230
  body.scrollTop = body.scrollHeight;
@@ -240,7 +241,9 @@ function followTail(root, signal) {
240
241
  }, { signal });
241
242
  if (root.ownerDocument.location.hash === "")
242
243
  toBottom();
243
- return () => {
244
+ return (write) => {
245
+ following = body.scrollHeight - body.scrollTop - body.clientHeight <= FOLLOW_SLACK;
246
+ write();
244
247
  if (following)
245
248
  toBottom();
246
249
  else if (pill !== null)
@@ -252,7 +255,7 @@ function followTail(root, signal) {
252
255
  * one at the end. The step's `data-stream-end` becomes `done` or `failed`, and its Refresh link
253
256
  * shows again, since the page now holds a newer state than the log.
254
257
  */
255
- async function stream(step, appended, signal) {
258
+ async function stream(step, append, signal) {
256
259
  let src = step.getAttribute("data-log-stream") ?? "";
257
260
  let live = {
258
261
  step,
@@ -281,16 +284,16 @@ async function stream(step, appended, signal) {
281
284
  buffer += read.value;
282
285
  let lines = buffer.split("\n");
283
286
  buffer = lines.pop() ?? "";
284
- for (let line of lines)
285
- appendLine(live, line.replace(/\r$/, ""));
287
+ if (lines.length > 0) {
288
+ append(() => {
289
+ for (let line of lines)
290
+ appendLine(live, line.replace(/\r$/, ""));
291
+ });
292
+ }
286
293
  step.setAttribute("data-log-next", String(live.next));
287
- if (lines.length > 0)
288
- appended();
289
- }
290
- if (buffer !== "") {
291
- appendLine(live, buffer);
292
- appended();
293
294
  }
295
+ if (buffer !== "")
296
+ append(() => appendLine(live, buffer));
294
297
  end("done");
295
298
  }
296
299
  catch {
@@ -323,9 +326,9 @@ function attach(root, options, signal) {
323
326
  let steps = [...root.querySelectorAll("[data-log-stream][data-stream-pending]")];
324
327
  if (steps.length === 0)
325
328
  return showFirstError(root);
326
- let appended = followTail(root, signal);
329
+ let append = followTail(root, signal);
327
330
  for (let step of steps)
328
- void stream(step, appended, signal);
331
+ void stream(step, append, signal);
329
332
  }
330
333
  /**
331
334
  * Wires the `LogViewer` the host sits in: search over every line, each live step's stream, and
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Why JS: only script can open a `<dialog>` as a modal, and a modal's close leaves the address
3
+ * naming it. No-JS baseline: the dialog shows fixed over a backdrop link, and that link, or the
4
+ * form's own answer, takes the page back to its address without the dialog.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { MixinFactory } from "remix/component";
10
+ /**
11
+ * Applied to a marker inside a `RouteDialog`: reopens the dialog as a modal so focus stays in it,
12
+ * and once it stays closed after Escape or a close command, clicks the dialog's backdrop link, so
13
+ * the navigation is the link's own (frame targeting and history included).
14
+ *
15
+ * @example <span hidden mix={[routeDialog()]} />
16
+ */
17
+ export declare const routeDialog: MixinFactory<HTMLElement>;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Why JS: only script can open a `<dialog>` as a modal, and a modal's close leaves the address
3
+ * naming it. No-JS baseline: the dialog shows fixed over a backdrop link, and that link, or the
4
+ * form's own answer, takes the page back to its address without the dialog.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import { createMixin } from "remix/component";
10
+ /** The listeners bound to each dialog, so a second marker in one dialog replaces the first's. */
11
+ const BOUND = new WeakMap();
12
+ /**
13
+ * Applied to a marker inside a `RouteDialog`: reopens the dialog as a modal so focus stays in it,
14
+ * and once it stays closed after Escape or a close command, clicks the dialog's backdrop link, so
15
+ * the navigation is the link's own (frame targeting and history included).
16
+ *
17
+ * @example <span hidden mix={[routeDialog()]} />
18
+ */
19
+ export const routeDialog = createMixin((handle) => {
20
+ let controller;
21
+ handle.addEventListener("insert", (event) => {
22
+ controller?.abort();
23
+ controller = new AbortController();
24
+ let dialog = event.node.closest("dialog");
25
+ if (!dialog)
26
+ return;
27
+ BOUND.get(dialog)?.abort();
28
+ BOUND.set(dialog, controller);
29
+ let link = document.querySelector(`a[data-route-dialog-close="${CSS.escape(dialog.id)}"]`);
30
+ if (link)
31
+ link.hidden = true;
32
+ let stale = 0;
33
+ if (dialog.open && !dialog.matches(":modal")) {
34
+ dialog.close();
35
+ dialog.showModal();
36
+ stale = 1;
37
+ }
38
+ let submitted = false;
39
+ dialog.addEventListener("submit", () => (submitted = true), { signal: controller.signal });
40
+ dialog.addEventListener("close", () => {
41
+ if (stale > 0) {
42
+ stale -= 1;
43
+ return;
44
+ }
45
+ if (!submitted && !dialog.open && dialog.isConnected)
46
+ link?.click();
47
+ }, { signal: controller.signal });
48
+ });
49
+ handle.addEventListener("remove", () => {
50
+ controller?.abort();
51
+ controller = undefined;
52
+ });
53
+ });
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
2
  import { fg } from "@sdxc/u/color";
3
+ import { raw } from "@sdxc/u/general";
3
4
  import { gap, hidden, inlineFlex, items } from "@sdxc/u/layout";
4
5
  import { when } from "@sdxc/u/state";
5
6
  import { text } from "@sdxc/u/typography";
@@ -34,6 +35,11 @@ export const OptimisticToggle = clientEntry("@sdxc/ui/app/optimistic-toggle#Opti
34
35
  gap(1.5),
35
36
  when('&[data-pressed] [data-toggle-content="off"]', hidden()),
36
37
  when('&:not([data-pressed]) [data-toggle-content="on"]', hidden()),
38
+ /**
39
+ * The live region stays in the document so a refusal is announced, and out of the
40
+ * row while it says nothing, so the control centres on its button alone.
41
+ */
42
+ when("& > [role=status]:empty", raw({ position: "absolute" })),
37
43
  ], children: [Object.entries(fields ?? {}).map(([field, value]) => (_jsx("input", { type: "hidden", name: field, value: value }))), _jsx("input", { type: "hidden", name: name, value: pressed ? "false" : "true", "data-toggle-next": "" }), _jsxs(Button, { type: "submit", size: size, variant: variant, color: toneOf(pressed, false), "aria-pressed": pressed ? "true" : "false", "aria-label": hasContent ? currentLabel : undefined, title: currentLabel, children: [_jsx("span", { "data-toggle-content": "on", children: pressedContent ?? pressedLabel }), _jsx("span", { "data-toggle-content": "off", children: unpressedContent ?? labels.label })] }), _jsx("span", { role: "status", mix: [text("xs"), fg("danger")] })] }));
38
44
  };
39
45
  });
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A dialog whose open state is the page's address: the server renders it open when the address
3
+ * names it (`?edit=42`), so it can be linked to, reloaded and opened without script. Closing it
4
+ * follows a link to the address without it; once hydrated, it is a true modal.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { EntryComponent, Handle } from "remix/component";
10
+ import { Dialog } from "../components/dialog.js";
11
+ /** Prop types for {@link RouteDialog}. */
12
+ export declare namespace RouteDialog {
13
+ /** Props accepted by {@link RouteDialog}: every `Dialog` prop, plus where closing leads. */
14
+ interface Props extends Dialog.Props {
15
+ id: string;
16
+ /** The page's address without the dialog, which closing it navigates to. */
17
+ closeHref: string;
18
+ /** The close link's name, such as "Close". */
19
+ closeLabel: string;
20
+ }
21
+ }
22
+ /**
23
+ * Client island: lifts the server-opened dialog into the top layer as a modal, and follows the
24
+ * close link once it closes by Escape or a `command="close"` button. Loads from
25
+ * `@sdxc/ui/app/route-dialog#RouteDialogModal`.
26
+ */
27
+ export declare const RouteDialogModal: EntryComponent<Record<never, never>>;
28
+ /**
29
+ * Renders the dialog open, over a full-screen link back to the page without it. Without script
30
+ * the dialog sits fixed in the middle of the screen and the backdrop link closes it; with
31
+ * script it becomes modal, traps focus and closes on Escape.
32
+ *
33
+ * @example
34
+ * <RouteDialog id="edit-event" closeHref="/week" closeLabel="Close" aria-labelledby="edit-title">
35
+ * <form method="post" action="/events/42">…</form>
36
+ * </RouteDialog>
37
+ */
38
+ export declare function RouteDialog(handle: Handle<RouteDialog.Props>): () => import("remix/component").RemixElement;
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
2
+ import { visuallyHidden } from "@sdxc/u/a11y";
3
+ import { mergeMix, raw } from "@sdxc/u/general";
4
+ import { clientEntry } from "remix/component";
5
+ import { Dialog } from "../components/dialog.js";
6
+ import { routeDialog } from "./mixins/route-dialog.js";
7
+ /**
8
+ * Client island: lifts the server-opened dialog into the top layer as a modal, and follows the
9
+ * close link once it closes by Escape or a `command="close"` button. Loads from
10
+ * `@sdxc/ui/app/route-dialog#RouteDialogModal`.
11
+ */
12
+ export const RouteDialogModal = clientEntry("@sdxc/ui/app/route-dialog#RouteDialogModal", function RouteDialogModal() {
13
+ return () => _jsx("span", { hidden: true, "data-slot": "route-dialog-modal", mix: [routeDialog()] });
14
+ });
15
+ /**
16
+ * Renders the dialog open, over a full-screen link back to the page without it. Without script
17
+ * the dialog sits fixed in the middle of the screen and the backdrop link closes it; with
18
+ * script it becomes modal, traps focus and closes on Escape.
19
+ *
20
+ * @example
21
+ * <RouteDialog id="edit-event" closeHref="/week" closeLabel="Close" aria-labelledby="edit-title">
22
+ * <form method="post" action="/events/42">…</form>
23
+ * </RouteDialog>
24
+ */
25
+ export function RouteDialog(handle) {
26
+ return () => {
27
+ let { id, closeHref, closeLabel, children, mix, ...rest } = handle.props;
28
+ return (_jsxs(_Fragment, { children: [_jsx("a", { href: closeHref, "data-slot": "route-dialog-backdrop", "data-route-dialog-close": id, tabIndex: -1, mix: [
29
+ raw({
30
+ position: "fixed",
31
+ inset: "0",
32
+ zIndex: "60",
33
+ backgroundColor: "color-mix(in oklch, var(--ui-color-neutral-950, black) 40%, transparent)",
34
+ }),
35
+ ], children: _jsx("span", { mix: [visuallyHidden()], children: closeLabel }) }), _jsxs(Dialog, { ...rest, id: id, open: true, "data-route-dialog": "", mix: mergeMix([
36
+ raw({
37
+ "&[open]:not(:modal)": {
38
+ position: "fixed",
39
+ inset: "0",
40
+ zIndex: "61",
41
+ margin: "auto",
42
+ blockSize: "fit-content",
43
+ maxBlockSize: "calc(100dvh - 2rem)",
44
+ overflowY: "auto",
45
+ },
46
+ }),
47
+ ], mix), children: [children, _jsx(RouteDialogModal, {})] })] }));
48
+ };
49
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The "this is playing" mark a music app puts on a track: four bars that bounce while the
3
+ * music plays and settle when it pauses. The player marks the pause on any ancestor with
4
+ * `data-audio-paused`, so every mark on the page follows one attribute.
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
+ /** Prop types for {@link Equalizer}. */
11
+ export declare namespace Equalizer {
12
+ /** Every native `<span>` attribute, plus the mark's spoken name. */
13
+ interface Props extends Omit<TagProps<"span">, "children"> {
14
+ /** What a screen reader hears in place of the bars, such as "Now playing". */
15
+ label?: string;
16
+ }
17
+ }
18
+ /**
19
+ * Renders the bars in the current text color at 1em square. They hold still under reduced
20
+ * motion and inside any `[data-audio-paused]` ancestor.
21
+ *
22
+ * @example <Equalizer label="Now playing" />
23
+ */
24
+ export declare function Equalizer(handle: Handle<Equalizer.Props>): () => import("remix/component").RemixElement;
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { visuallyHidden } from "@sdxc/u/a11y";
3
+ import { keyframes } from "@sdxc/u/animation";
4
+ import { mergeMix, raw } from "@sdxc/u/general";
5
+ import { motionReduce } from "@sdxc/u/responsive";
6
+ /** The keyframes every bar shares, each at its own pace and delay. */
7
+ const BOUNCE = "ui-equalizer-bounce";
8
+ /** Each bar's height at rest and its bounce's length and delay, so the four never move as one. */
9
+ const BARS = [
10
+ { rest: "45%", duration: "0.9s", delay: "-0.2s" },
11
+ { rest: "80%", duration: "0.7s", delay: "-0.5s" },
12
+ { rest: "60%", duration: "1.1s", delay: "-0.1s" },
13
+ { rest: "35%", duration: "0.8s", delay: "-0.6s" },
14
+ ];
15
+ /**
16
+ * Renders the bars in the current text color at 1em square. They hold still under reduced
17
+ * motion and inside any `[data-audio-paused]` ancestor.
18
+ *
19
+ * @example <Equalizer label="Now playing" />
20
+ */
21
+ export function Equalizer(handle) {
22
+ return () => {
23
+ let { label, mix, ...rest } = handle.props;
24
+ return (_jsxs("span", { ...rest, "data-slot": "equalizer", mix: mergeMix([
25
+ keyframes(BOUNCE, {
26
+ "0%, 100%": { transform: "scaleY(0.3)" },
27
+ "50%": { transform: "scaleY(1)" },
28
+ }),
29
+ raw({
30
+ display: "inline-flex",
31
+ alignItems: "flex-end",
32
+ justifyContent: "center",
33
+ gap: "0.125em",
34
+ inlineSize: "1em",
35
+ blockSize: "1em",
36
+ color: "inherit",
37
+ "& > [data-bar]": {
38
+ inlineSize: "0.1875em",
39
+ borderRadius: "0.0625em",
40
+ backgroundColor: "currentColor",
41
+ transformOrigin: "bottom",
42
+ animationName: BOUNCE,
43
+ animationTimingFunction: "ease-in-out",
44
+ animationIterationCount: "infinite",
45
+ },
46
+ ":where([data-audio-paused]) & > [data-bar]": {
47
+ animationPlayState: "paused",
48
+ },
49
+ }),
50
+ motionReduce(raw({ "& > [data-bar]": { animationName: "none" } })),
51
+ ], mix), children: [BARS.map((bar) => (_jsx("span", { "data-bar": "", "aria-hidden": "true", style: {
52
+ blockSize: bar.rest,
53
+ animationDuration: bar.duration,
54
+ animationDelay: bar.delay,
55
+ } }))), label === undefined ? null : _jsx("span", { mix: [visuallyHidden()], children: label })] }));
56
+ };
57
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Barrel for `@sdxc/ui/audio`: the pieces of a music app (track tables, artwork tiles, the
3
+ * player bar and its phone form, the queue, the playing mark) and the queue and Media Session
4
+ * helpers a player drives them with. Each module also imports on its own, as `@sdxc/ui/audio/player-bar`.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ export * from "./utils/media-session.js";
10
+ export * from "./utils/play-queue.js";
11
+ export * from "./utils/track-time.js";
12
+ export * from "./equalizer.js";
13
+ export * from "./media-tile.js";
14
+ export * from "./player-bar.js";
15
+ export * from "./queue-list.js";
16
+ export * from "./track-list.js";