@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.
- package/README.md +139 -2
- package/dist/app/index.d.ts +1 -0
- package/dist/app/index.js +1 -0
- package/dist/app/mixins/command-palette.js +10 -2
- package/dist/app/mixins/log-viewer.js +17 -14
- package/dist/app/mixins/route-dialog.d.ts +17 -0
- package/dist/app/mixins/route-dialog.js +53 -0
- package/dist/app/optimistic-toggle.js +6 -0
- package/dist/app/route-dialog.d.ts +38 -0
- package/dist/app/route-dialog.js +49 -0
- package/dist/audio/equalizer.d.ts +24 -0
- package/dist/audio/equalizer.js +57 -0
- package/dist/audio/index.d.ts +16 -0
- package/dist/audio/index.js +16 -0
- package/dist/audio/media-tile.d.ts +38 -0
- package/dist/audio/media-tile.js +98 -0
- package/dist/audio/player-bar.d.ts +108 -0
- package/dist/audio/player-bar.js +338 -0
- package/dist/audio/queue-list.d.ts +56 -0
- package/dist/audio/queue-list.js +102 -0
- package/dist/audio/track-list.d.ts +91 -0
- package/dist/audio/track-list.js +226 -0
- package/dist/audio/utils/media-session.d.ts +44 -0
- package/dist/audio/utils/media-session.js +87 -0
- package/dist/audio/utils/play-queue.d.ts +98 -0
- package/dist/audio/utils/play-queue.js +149 -0
- package/dist/audio/utils/track-time.d.ts +28 -0
- package/dist/audio/utils/track-time.js +36 -0
- package/dist/chat/composer-format.d.ts +35 -0
- package/dist/chat/composer-format.js +84 -0
- package/dist/chat/index.d.ts +6 -0
- package/dist/chat/index.js +6 -0
- package/dist/chat/mention-menu.d.ts +43 -0
- package/dist/chat/mention-menu.js +70 -0
- package/dist/chat/message-group.d.ts +92 -0
- package/dist/chat/message-group.js +222 -0
- package/dist/chat/mixins/composer-format.d.ts +28 -0
- package/dist/chat/mixins/composer-format.js +80 -0
- package/dist/chat/mixins/composer-send.d.ts +2 -2
- package/dist/chat/mixins/composer-send.js +4 -2
- package/dist/chat/mixins/mention-menu.d.ts +41 -0
- package/dist/chat/mixins/mention-menu.js +213 -0
- package/dist/chat/mixins/reaction-sync.d.ts +47 -0
- package/dist/chat/mixins/reaction-sync.js +172 -0
- package/dist/chat/reaction-bar.d.ts +70 -0
- package/dist/chat/reaction-bar.js +108 -0
- package/dist/chat/typing-indicator.d.ts +42 -0
- package/dist/chat/typing-indicator.js +68 -0
- package/dist/chat/utils/composer-text.d.ts +38 -0
- package/dist/chat/utils/composer-text.js +86 -0
- package/dist/chat/utils/markdown-format.d.ts +30 -0
- package/dist/chat/utils/markdown-format.js +158 -0
- package/dist/chat/utils/mention-query.d.ts +55 -0
- package/dist/chat/utils/mention-query.js +60 -0
- package/dist/commerce/cart-drawer.d.ts +69 -0
- package/dist/commerce/cart-drawer.js +163 -0
- package/dist/commerce/cart-line.d.ts +32 -0
- package/dist/commerce/cart-line.js +43 -0
- package/dist/commerce/checkout-layout.d.ts +32 -0
- package/dist/commerce/checkout-layout.js +51 -0
- package/dist/commerce/facet-filters.d.ts +121 -0
- package/dist/commerce/facet-filters.js +318 -0
- package/dist/commerce/fulfilment-note.d.ts +28 -0
- package/dist/commerce/fulfilment-note.js +26 -0
- package/dist/commerce/index.d.ts +27 -0
- package/dist/commerce/index.js +27 -0
- package/dist/commerce/item-options-dialog.d.ts +67 -0
- package/dist/commerce/item-options-dialog.js +150 -0
- package/dist/commerce/menu-item-card.d.ts +37 -0
- package/dist/commerce/menu-item-card.js +96 -0
- package/dist/commerce/option-group.d.ts +62 -0
- package/dist/commerce/option-group.js +121 -0
- package/dist/commerce/order-summary.d.ts +42 -0
- package/dist/commerce/order-summary.js +76 -0
- package/dist/commerce/order-tracker.d.ts +80 -0
- package/dist/commerce/order-tracker.js +178 -0
- package/dist/commerce/price.d.ts +52 -0
- package/dist/commerce/price.js +108 -0
- package/dist/commerce/product-card.d.ts +53 -0
- package/dist/commerce/product-card.js +127 -0
- package/dist/commerce/product-gallery.d.ts +70 -0
- package/dist/commerce/product-gallery.js +186 -0
- package/dist/commerce/promo-code.d.ts +56 -0
- package/dist/commerce/promo-code.js +101 -0
- package/dist/commerce/quantity-stepper.d.ts +42 -0
- package/dist/commerce/quantity-stepper.js +53 -0
- package/dist/commerce/question-list.d.ts +53 -0
- package/dist/commerce/question-list.js +92 -0
- package/dist/commerce/shipping-estimate.d.ts +53 -0
- package/dist/commerce/shipping-estimate.js +39 -0
- package/dist/commerce/sort-select.d.ts +38 -0
- package/dist/commerce/sort-select.js +38 -0
- package/dist/commerce/variant-picker.d.ts +75 -0
- package/dist/commerce/variant-picker.js +135 -0
- package/dist/components/amount.d.ts +46 -0
- package/dist/components/amount.js +34 -0
- package/dist/components/autocomplete.d.ts +82 -0
- package/dist/components/autocomplete.js +114 -0
- package/dist/components/carousel.d.ts +31 -1
- package/dist/components/carousel.js +66 -3
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.js +11 -0
- package/dist/components/letterbox.d.ts +47 -0
- package/dist/components/letterbox.js +56 -0
- package/dist/components/lightbox.d.ts +88 -0
- package/dist/components/lightbox.js +224 -0
- package/dist/components/media-grid.d.ts +53 -0
- package/dist/components/media-grid.js +89 -0
- package/dist/components/range-months.d.ts +100 -0
- package/dist/components/range-months.js +274 -0
- package/dist/components/rating-input.d.ts +33 -0
- package/dist/components/rating-input.js +63 -0
- package/dist/components/rating.d.ts +38 -0
- package/dist/components/rating.js +66 -0
- package/dist/components/review-card.d.ts +39 -0
- package/dist/components/review-card.js +59 -0
- package/dist/components/section-bar.d.ts +57 -0
- package/dist/components/section-bar.js +140 -0
- package/dist/components/step-indicator.d.ts +46 -0
- package/dist/components/step-indicator.js +96 -0
- package/dist/finance/index.d.ts +10 -0
- package/dist/finance/index.js +10 -0
- package/dist/finance/ledger.d.ts +60 -0
- package/dist/finance/ledger.js +93 -0
- package/dist/finance/payment-card.d.ts +49 -0
- package/dist/finance/payment-card.js +115 -0
- package/dist/map/engine.d.ts +49 -0
- package/dist/map/engine.js +591 -0
- package/dist/map/index.d.ts +12 -0
- package/dist/map/index.js +12 -0
- package/dist/map/map-canvas.d.ts +101 -0
- package/dist/map/map-canvas.js +275 -0
- package/dist/map/map.d.ts +217 -0
- package/dist/map/map.js +598 -0
- package/dist/map/mixins/map-link.d.ts +30 -0
- package/dist/map/mixins/map-link.js +116 -0
- package/dist/map/utils/basemap.d.ts +88 -0
- package/dist/map/utils/basemap.js +84 -0
- package/dist/map/utils/cluster.d.ts +43 -0
- package/dist/map/utils/cluster.js +80 -0
- package/dist/map/utils/mercator.d.ts +66 -0
- package/dist/map/utils/mercator.js +92 -0
- package/dist/map/utils/stage.d.ts +24 -0
- package/dist/map/utils/stage.js +49 -0
- package/dist/mixins/autocomplete.d.ts +28 -0
- package/dist/mixins/autocomplete.js +283 -0
- package/dist/mixins/carousel-controls.d.ts +14 -3
- package/dist/mixins/carousel-controls.js +89 -30
- package/dist/mixins/index.d.ts +2 -0
- package/dist/mixins/index.js +2 -0
- package/dist/mixins/lightbox-controls.d.ts +34 -0
- package/dist/mixins/lightbox-controls.js +176 -0
- package/dist/schedule/agenda.d.ts +63 -0
- package/dist/schedule/agenda.js +221 -0
- package/dist/schedule/day-strip.d.ts +50 -0
- package/dist/schedule/day-strip.js +136 -0
- package/dist/schedule/free-busy.d.ts +96 -0
- package/dist/schedule/free-busy.js +285 -0
- package/dist/schedule/index.d.ts +15 -0
- package/dist/schedule/index.js +15 -0
- package/dist/schedule/mixins/day-strip-scroll.d.ts +16 -0
- package/dist/schedule/mixins/day-strip-scroll.js +40 -0
- package/dist/schedule/mixins/time-grid-drag.d.ts +24 -0
- package/dist/schedule/mixins/time-grid-drag.js +532 -0
- package/dist/schedule/month-view.d.ts +68 -0
- package/dist/schedule/month-view.js +301 -0
- package/dist/schedule/time-grid.d.ts +168 -0
- package/dist/schedule/time-grid.js +417 -0
- package/dist/schedule/utils/time-grid-layout.d.ts +50 -0
- package/dist/schedule/utils/time-grid-layout.js +93 -0
- package/dist/schedule/year-view.d.ts +46 -0
- package/dist/schedule/year-view.js +142 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.js +1 -0
- package/dist/styles/typewriter-text.d.ts +20 -0
- package/dist/styles/typewriter-text.js +23 -0
- package/dist/test/map.d.ts +18 -0
- package/dist/test/map.js +96 -0
- package/dist/test/reels.d.ts +30 -0
- package/dist/test/reels.js +41 -0
- package/dist/test/stories.d.ts +31 -0
- package/dist/test/stories.js +66 -0
- package/dist/travel/boarding-pass.d.ts +107 -0
- package/dist/travel/boarding-pass.js +293 -0
- package/dist/travel/car-offer.d.ts +70 -0
- package/dist/travel/car-offer.js +127 -0
- package/dist/travel/fare-calendar.d.ts +85 -0
- package/dist/travel/fare-calendar.js +233 -0
- package/dist/travel/fare-options.d.ts +84 -0
- package/dist/travel/fare-options.js +142 -0
- package/dist/travel/flight-itinerary.d.ts +84 -0
- package/dist/travel/flight-itinerary.js +112 -0
- package/dist/travel/flight-option.d.ts +58 -0
- package/dist/travel/flight-option.js +111 -0
- package/dist/travel/flight-segment.d.ts +105 -0
- package/dist/travel/flight-segment.js +174 -0
- package/dist/travel/index.d.ts +20 -0
- package/dist/travel/index.js +20 -0
- package/dist/travel/package-savings.d.ts +74 -0
- package/dist/travel/package-savings.js +128 -0
- package/dist/travel/price-breakdown.d.ts +66 -0
- package/dist/travel/price-breakdown.js +102 -0
- package/dist/travel/rating-breakdown.d.ts +81 -0
- package/dist/travel/rating-breakdown.js +132 -0
- package/dist/travel/seat-map.d.ts +108 -0
- package/dist/travel/seat-map.js +371 -0
- package/dist/travel/trip-timeline.d.ts +84 -0
- package/dist/travel/trip-timeline.js +212 -0
- package/dist/utils/gamepad-presses.d.ts +21 -0
- package/dist/utils/gamepad-presses.js +28 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/move-focus.d.ts +20 -0
- package/dist/utils/move-focus.js +28 -0
- package/dist/utils/range-months.d.ts +54 -0
- package/dist/utils/range-months.js +98 -0
- package/dist/utils/swipe-direction.d.ts +23 -0
- package/dist/utils/swipe-direction.js +27 -0
- package/dist/utils/typewriter.d.ts +49 -0
- package/dist/utils/typewriter.js +171 -0
- package/dist/video/index.d.ts +6 -2
- package/dist/video/index.js +6 -2
- package/dist/video/mixins/reel-feed-sync.d.ts +41 -0
- package/dist/video/mixins/reel-feed-sync.js +430 -0
- package/dist/video/mixins/story-viewer-sync.d.ts +31 -0
- package/dist/video/mixins/story-viewer-sync.js +391 -0
- package/dist/video/mixins/video-player-sync.js +138 -5
- package/dist/video/reel-feed.d.ts +95 -0
- package/dist/video/reel-feed.js +124 -0
- package/dist/video/story-ring.d.ts +32 -0
- package/dist/video/story-ring.js +42 -0
- package/dist/video/story-viewer.d.ts +85 -0
- package/dist/video/story-viewer.js +250 -0
- package/dist/video/video-card.d.ts +3 -1
- package/dist/video/video-card.js +15 -5
- package/dist/video/video-player.d.ts +33 -0
- package/dist/video/video-player.js +226 -20
- package/package.json +21 -2
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The play order of a music player as plain data: which track plays, what comes next with
|
|
3
|
+
* shuffle and repeat, and what Previous does. Every function returns a new queue, so a player
|
|
4
|
+
* keeps one value in state and a test checks each rule without media.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/** The repeat mode after each one, in the order a player's single button cycles them. */
|
|
10
|
+
const NEXT_REPEAT = {
|
|
11
|
+
off: "all",
|
|
12
|
+
all: "one",
|
|
13
|
+
one: "off",
|
|
14
|
+
};
|
|
15
|
+
/** How far into a track, in seconds, Previous restarts it rather than going back one. */
|
|
16
|
+
export const RESTART_THRESHOLD = 3;
|
|
17
|
+
/**
|
|
18
|
+
* Shuffles indexes with the Fisher–Yates walk, so every order is equally likely.
|
|
19
|
+
*
|
|
20
|
+
* @param indexes The indexes to shuffle; left unchanged.
|
|
21
|
+
* @param random A source of numbers in [0, 1).
|
|
22
|
+
*/
|
|
23
|
+
function shuffled(indexes, random) {
|
|
24
|
+
let copy = [...indexes];
|
|
25
|
+
for (let i = copy.length - 1; i > 0; i--) {
|
|
26
|
+
let j = Math.floor(random() * (i + 1));
|
|
27
|
+
[copy[i], copy[j]] = [copy[j], copy[i]];
|
|
28
|
+
}
|
|
29
|
+
return copy;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Starts a queue at one track of a list. With shuffle on, that track plays first and the rest
|
|
33
|
+
* follow in a random order.
|
|
34
|
+
*
|
|
35
|
+
* @param length How many tracks the list holds.
|
|
36
|
+
* @param start The index of the track to play first.
|
|
37
|
+
* @param options Shuffle, repeat and the random source a test pins.
|
|
38
|
+
* @example createPlayQueue(12, 3, { shuffle: true })
|
|
39
|
+
*/
|
|
40
|
+
export function createPlayQueue(length, start, options = {}) {
|
|
41
|
+
let first = Math.min(Math.max(0, start), Math.max(0, length - 1));
|
|
42
|
+
let indexes = Array.from({ length }, (_, index) => index);
|
|
43
|
+
let shuffle = options.shuffle ?? false;
|
|
44
|
+
let order = shuffle
|
|
45
|
+
? [
|
|
46
|
+
first,
|
|
47
|
+
...shuffled(indexes.filter((index) => index !== first), options.random ?? Math.random),
|
|
48
|
+
]
|
|
49
|
+
: indexes;
|
|
50
|
+
return {
|
|
51
|
+
length,
|
|
52
|
+
order,
|
|
53
|
+
position: shuffle ? 0 : first,
|
|
54
|
+
shuffle,
|
|
55
|
+
repeat: options.repeat ?? "off",
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The list index of the track the queue is on, or `undefined` for an empty queue.
|
|
60
|
+
*
|
|
61
|
+
* @param queue The queue.
|
|
62
|
+
*/
|
|
63
|
+
export function currentIndex(queue) {
|
|
64
|
+
return queue.order[queue.position];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Moves to the next track. When a track ends by itself (`ended`), repeat-one plays it again;
|
|
68
|
+
* pressing Next always moves on. Past the last track, repeat-all starts over and otherwise
|
|
69
|
+
* the queue ends.
|
|
70
|
+
*
|
|
71
|
+
* @param queue The queue.
|
|
72
|
+
* @param ended Whether the track finished playing, rather than the listener pressing Next.
|
|
73
|
+
* @returns The new queue, or `null` once nothing is left to play.
|
|
74
|
+
*/
|
|
75
|
+
export function nextInQueue(queue, ended = false) {
|
|
76
|
+
if (queue.length === 0)
|
|
77
|
+
return null;
|
|
78
|
+
if (ended && queue.repeat === "one")
|
|
79
|
+
return queue;
|
|
80
|
+
if (queue.position + 1 < queue.order.length)
|
|
81
|
+
return { ...queue, position: queue.position + 1 };
|
|
82
|
+
return queue.repeat === "off" ? null : { ...queue, position: 0 };
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* What Previous does: restarts the track once it has played a few seconds, and otherwise goes
|
|
86
|
+
* back one, wrapping to the end under repeat-all and staying on the first track without it.
|
|
87
|
+
*
|
|
88
|
+
* @param queue The queue.
|
|
89
|
+
* @param time How far into the current track the player is, in seconds.
|
|
90
|
+
* @returns The new queue and whether the player should seek to the start of its track.
|
|
91
|
+
*/
|
|
92
|
+
export function previousInQueue(queue, time) {
|
|
93
|
+
if (time > RESTART_THRESHOLD || queue.length === 0)
|
|
94
|
+
return { queue, restart: true };
|
|
95
|
+
if (queue.position > 0)
|
|
96
|
+
return { queue: { ...queue, position: queue.position - 1 }, restart: false };
|
|
97
|
+
if (queue.repeat === "all") {
|
|
98
|
+
return { queue: { ...queue, position: queue.order.length - 1 }, restart: false };
|
|
99
|
+
}
|
|
100
|
+
return { queue, restart: true };
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Turns shuffle on or off without interrupting the track playing: on, it stays first and the
|
|
104
|
+
* rest are shuffled after it; off, the list's own order resumes from it.
|
|
105
|
+
*
|
|
106
|
+
* @param queue The queue.
|
|
107
|
+
* @param random A source of numbers in [0, 1).
|
|
108
|
+
*/
|
|
109
|
+
export function toggleShuffle(queue, random = Math.random) {
|
|
110
|
+
let current = currentIndex(queue) ?? 0;
|
|
111
|
+
let next = createPlayQueue(queue.length, current, {
|
|
112
|
+
shuffle: !queue.shuffle,
|
|
113
|
+
repeat: queue.repeat,
|
|
114
|
+
random,
|
|
115
|
+
});
|
|
116
|
+
return next;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Steps repeat from off to all to one and back to off, the order a player's one button cycles.
|
|
120
|
+
*
|
|
121
|
+
* @param queue The queue.
|
|
122
|
+
*/
|
|
123
|
+
export function cycleRepeat(queue) {
|
|
124
|
+
return { ...queue, repeat: NEXT_REPEAT[queue.repeat] };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Jumps to a track that is already queued, such as a row picked in the queue panel.
|
|
128
|
+
*
|
|
129
|
+
* @param queue The queue.
|
|
130
|
+
* @param index The list index of the track.
|
|
131
|
+
* @returns The queue on that track; unchanged when the list has no such index.
|
|
132
|
+
*/
|
|
133
|
+
export function jumpTo(queue, index) {
|
|
134
|
+
let position = queue.order.indexOf(index);
|
|
135
|
+
return position === -1 ? queue : { ...queue, position };
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The list indexes still to play after the current track, in order: under repeat-all the
|
|
139
|
+
* list's start follows its end, so "Next up" never reads empty while the music goes on.
|
|
140
|
+
*
|
|
141
|
+
* @param queue The queue.
|
|
142
|
+
* @param limit The most indexes to return.
|
|
143
|
+
*/
|
|
144
|
+
export function upcoming(queue, limit = Number.POSITIVE_INFINITY) {
|
|
145
|
+
let after = queue.order.slice(queue.position + 1);
|
|
146
|
+
if (queue.repeat === "all")
|
|
147
|
+
after = [...after, ...queue.order.slice(0, queue.position)];
|
|
148
|
+
return after.slice(0, limit);
|
|
149
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a music app writes a length or a position: `3:07` for a track, `1:02:45` past an hour,
|
|
3
|
+
* and a spoken form for screen readers, so a slider's value and a table's column read alike.
|
|
4
|
+
*
|
|
5
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
6
|
+
* @copyright Sergio Xalambrí 2026
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Writes seconds as `m:ss`, or `h:mm:ss` from an hour. Negative, missing and non-finite
|
|
10
|
+
* values read `0:00`, so a player whose media has not loaded yet shows a time, not `NaN`.
|
|
11
|
+
*
|
|
12
|
+
* @param seconds The length or position.
|
|
13
|
+
* @returns The clock form.
|
|
14
|
+
* @example formatTrackTime(187) // "3:07"
|
|
15
|
+
* @example formatTrackTime(3765) // "1:02:45"
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatTrackTime(seconds: number): string;
|
|
18
|
+
/**
|
|
19
|
+
* Writes a total length in words for a collection's header, rounding to minutes.
|
|
20
|
+
*
|
|
21
|
+
* @param seconds The summed length.
|
|
22
|
+
* @param units The words for hours and minutes, such as `{ hour: "hr", minute: "min" }`.
|
|
23
|
+
* @returns Such as "1 hr 12 min" or "38 min".
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatTotalTime(seconds: number, units: {
|
|
26
|
+
hour: string;
|
|
27
|
+
minute: string;
|
|
28
|
+
}): string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a music app writes a length or a position: `3:07` for a track, `1:02:45` past an hour,
|
|
3
|
+
* and a spoken form for screen readers, so a slider's value and a table's column read alike.
|
|
4
|
+
*
|
|
5
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
6
|
+
* @copyright Sergio Xalambrí 2026
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Writes seconds as `m:ss`, or `h:mm:ss` from an hour. Negative, missing and non-finite
|
|
10
|
+
* values read `0:00`, so a player whose media has not loaded yet shows a time, not `NaN`.
|
|
11
|
+
*
|
|
12
|
+
* @param seconds The length or position.
|
|
13
|
+
* @returns The clock form.
|
|
14
|
+
* @example formatTrackTime(187) // "3:07"
|
|
15
|
+
* @example formatTrackTime(3765) // "1:02:45"
|
|
16
|
+
*/
|
|
17
|
+
export function formatTrackTime(seconds) {
|
|
18
|
+
let whole = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;
|
|
19
|
+
let hours = Math.floor(whole / 3600);
|
|
20
|
+
let minutes = Math.floor((whole % 3600) / 60);
|
|
21
|
+
let rest = String(whole % 60).padStart(2, "0");
|
|
22
|
+
return hours > 0 ? `${hours}:${String(minutes).padStart(2, "0")}:${rest}` : `${minutes}:${rest}`;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Writes a total length in words for a collection's header, rounding to minutes.
|
|
26
|
+
*
|
|
27
|
+
* @param seconds The summed length.
|
|
28
|
+
* @param units The words for hours and minutes, such as `{ hour: "hr", minute: "min" }`.
|
|
29
|
+
* @returns Such as "1 hr 12 min" or "38 min".
|
|
30
|
+
*/
|
|
31
|
+
export function formatTotalTime(seconds, units) {
|
|
32
|
+
let minutes = Math.round((Number.isFinite(seconds) ? Math.max(0, seconds) : 0) / 60);
|
|
33
|
+
let hours = Math.floor(minutes / 60);
|
|
34
|
+
let rest = minutes % 60;
|
|
35
|
+
return hours > 0 ? `${hours} ${units.hour} ${rest} ${units.minute}` : `${rest} ${units.minute}`;
|
|
36
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Island holding a composer's formatting buttons: bold, italic, strikethrough, code, link,
|
|
3
|
+
* quote and list, each writing its Markdown around the selection in the composer's field and
|
|
4
|
+
* bound to the usual shortcut while the field has focus. It needs script, so it hides without.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { EntryComponent } from "remix/component";
|
|
10
|
+
import type { FormatAction } from "./utils/markdown-format.js";
|
|
11
|
+
export type { FormatAction, FormattedText } from "./utils/markdown-format.js";
|
|
12
|
+
export { applyFormat } from "./utils/markdown-format.js";
|
|
13
|
+
/** Prop types for {@link ComposerFormat}. */
|
|
14
|
+
export declare namespace ComposerFormat {
|
|
15
|
+
/** Plain data only, since the props cross into the browser with the island. */
|
|
16
|
+
type Props = {
|
|
17
|
+
/** Each button's accessible name, such as `{ bold: "Bold", … }`; the title adds its shortcut. */
|
|
18
|
+
labels: Record<FormatAction, string>;
|
|
19
|
+
/** The buttons to show, in order. @default every action */
|
|
20
|
+
actions?: FormatAction[];
|
|
21
|
+
/** The `id` of the `<textarea>` to edit; the `Composer.Input` of the island's form when omitted. */
|
|
22
|
+
target?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Renders a row of small ghost buttons. Each edit goes through the browser's editing
|
|
27
|
+
* commands, so Undo reverts it, and leaves the formatted text selected or the caret between
|
|
28
|
+
* new markers. Mod+B, Mod+I, Mod+Shift+X and Mod+E work while the field has focus.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* <Composer.Toolbar>
|
|
32
|
+
* <ComposerFormat labels={{ bold: "Bold", italic: "Italic", strike: "Strikethrough", code: "Code", link: "Link", quote: "Quote", list: "List" }} />
|
|
33
|
+
* </Composer.Toolbar>
|
|
34
|
+
*/
|
|
35
|
+
export declare const ComposerFormat: EntryComponent<ComposerFormat.Props>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { BoldIcon, CodeIcon, ItalicIcon, LinkIcon, ListIcon, StrikethroughIcon, TextQuoteIcon, } from "@sdxc/icons";
|
|
3
|
+
import { raw } from "@sdxc/u/general";
|
|
4
|
+
import { hstack, shrink } from "@sdxc/u/layout";
|
|
5
|
+
import { media } from "@sdxc/u/responsive";
|
|
6
|
+
import { bs, is, minIs, pi } from "@sdxc/u/size";
|
|
7
|
+
import { clientEntry } from "remix/component";
|
|
8
|
+
import { Button } from "../components/button.js";
|
|
9
|
+
import { keyComboGlyphs } from "../utils/key-combo.js";
|
|
10
|
+
import { FORMAT_SHORTCUTS, composerFormat } from "./mixins/composer-format.js";
|
|
11
|
+
export { applyFormat } from "./utils/markdown-format.js";
|
|
12
|
+
/** Every action, in the order the toolbar shows them when `actions` is omitted. */
|
|
13
|
+
const FORMAT_ACTIONS = [
|
|
14
|
+
"bold",
|
|
15
|
+
"italic",
|
|
16
|
+
"strike",
|
|
17
|
+
"code",
|
|
18
|
+
"link",
|
|
19
|
+
"quote",
|
|
20
|
+
"list",
|
|
21
|
+
];
|
|
22
|
+
/** The Lucide glyph each action's button shows. */
|
|
23
|
+
const ICONS = {
|
|
24
|
+
bold: BoldIcon,
|
|
25
|
+
italic: ItalicIcon,
|
|
26
|
+
strike: StrikethroughIcon,
|
|
27
|
+
code: CodeIcon,
|
|
28
|
+
link: LinkIcon,
|
|
29
|
+
quote: TextQuoteIcon,
|
|
30
|
+
list: ListIcon,
|
|
31
|
+
};
|
|
32
|
+
/** Whether the reader's keyboard prints Command, which decides the glyphs a title shows. */
|
|
33
|
+
function isApplePlatform() {
|
|
34
|
+
if (typeof navigator === "undefined")
|
|
35
|
+
return true;
|
|
36
|
+
return /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent);
|
|
37
|
+
}
|
|
38
|
+
/** A combo as `aria-keyshortcuts` spells it, such as `Meta+Shift+X`. */
|
|
39
|
+
function ariaShortcut(combo, apple) {
|
|
40
|
+
return combo
|
|
41
|
+
.split("+")
|
|
42
|
+
.map((token) => {
|
|
43
|
+
if (token === "mod")
|
|
44
|
+
return apple ? "Meta" : "Control";
|
|
45
|
+
if (token === "shift")
|
|
46
|
+
return "Shift";
|
|
47
|
+
return token.toUpperCase();
|
|
48
|
+
})
|
|
49
|
+
.join("+");
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Renders a row of small ghost buttons. Each edit goes through the browser's editing
|
|
53
|
+
* commands, so Undo reverts it, and leaves the formatted text selected or the caret between
|
|
54
|
+
* new markers. Mod+B, Mod+I, Mod+Shift+X and Mod+E work while the field has focus.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* <Composer.Toolbar>
|
|
58
|
+
* <ComposerFormat labels={{ bold: "Bold", italic: "Italic", strike: "Strikethrough", code: "Code", link: "Link", quote: "Quote", list: "List" }} />
|
|
59
|
+
* </Composer.Toolbar>
|
|
60
|
+
*/
|
|
61
|
+
export const ComposerFormat = clientEntry("@sdxc/ui/chat/composer-format#ComposerFormat", function ComposerFormat(handle) {
|
|
62
|
+
let apple = true;
|
|
63
|
+
handle.queueTask(() => {
|
|
64
|
+
let detected = isApplePlatform();
|
|
65
|
+
if (detected === apple || handle.signal.aborted)
|
|
66
|
+
return;
|
|
67
|
+
apple = detected;
|
|
68
|
+
void handle.update();
|
|
69
|
+
});
|
|
70
|
+
return () => {
|
|
71
|
+
let { labels, actions = FORMAT_ACTIONS, target } = handle.props;
|
|
72
|
+
return (_jsx("span", { "data-slot": "composer-format", mix: [
|
|
73
|
+
composerFormat({ actions, target }),
|
|
74
|
+
hstack({ gap: 0.5, align: "center" }),
|
|
75
|
+
media("(scripting: none)", raw({ display: "none" })),
|
|
76
|
+
], children: actions.map((action) => {
|
|
77
|
+
let Icon = ICONS[action];
|
|
78
|
+
let combo = FORMAT_SHORTCUTS[action];
|
|
79
|
+
let label = labels[action];
|
|
80
|
+
let keys = combo === undefined ? null : keyComboGlyphs(combo, apple).join(apple ? "" : "+");
|
|
81
|
+
return (_jsx(Button, { type: "button", variant: "ghost", color: "neutral", size: "sm", "aria-label": label, title: keys === null ? label : `${label} (${keys})`, "aria-keyshortcuts": combo === undefined ? undefined : ariaShortcut(combo, apple), "data-format": action, mix: [is("2rem"), bs("2rem"), minIs("2rem"), pi(0), shrink(0)], children: _jsx(Icon, { size: 16, "aria-hidden": "true" }) }, action));
|
|
82
|
+
}) }));
|
|
83
|
+
};
|
|
84
|
+
});
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -13,10 +13,16 @@ export * from "./mixins/reveal-stream.js";
|
|
|
13
13
|
export * from "./bubble.js";
|
|
14
14
|
export * from "./composer-submit.js";
|
|
15
15
|
export * from "./composer.js";
|
|
16
|
+
export * from "./composer-format.js";
|
|
16
17
|
export * from "./marker.js";
|
|
18
|
+
export * from "./mention-menu.js";
|
|
19
|
+
export * from "./message-group.js";
|
|
17
20
|
export * from "./message-scroller.js";
|
|
18
21
|
export * from "./message.js";
|
|
22
|
+
export * from "./reaction-bar.js";
|
|
23
|
+
export * from "./typing-indicator.js";
|
|
19
24
|
export * from "./mixins/attachment-trigger.js";
|
|
20
25
|
export * from "./mixins/composer-send.js";
|
|
21
26
|
export * from "./mixins/message-follow.js";
|
|
27
|
+
export * from "./mixins/reaction-sync.js";
|
|
22
28
|
export * from "./mixins/stream-target.js";
|
package/dist/chat/index.js
CHANGED
|
@@ -13,10 +13,16 @@ export * from "./mixins/reveal-stream.js";
|
|
|
13
13
|
export * from "./bubble.js";
|
|
14
14
|
export * from "./composer-submit.js";
|
|
15
15
|
export * from "./composer.js";
|
|
16
|
+
export * from "./composer-format.js";
|
|
16
17
|
export * from "./marker.js";
|
|
18
|
+
export * from "./mention-menu.js";
|
|
19
|
+
export * from "./message-group.js";
|
|
17
20
|
export * from "./message-scroller.js";
|
|
18
21
|
export * from "./message.js";
|
|
22
|
+
export * from "./reaction-bar.js";
|
|
23
|
+
export * from "./typing-indicator.js";
|
|
19
24
|
export * from "./mixins/attachment-trigger.js";
|
|
20
25
|
export * from "./mixins/composer-send.js";
|
|
21
26
|
export * from "./mixins/message-follow.js";
|
|
27
|
+
export * from "./mixins/reaction-sync.js";
|
|
22
28
|
export * from "./mixins/stream-target.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Island suggesting people to mention while a message is written: typing `@` at the start of
|
|
3
|
+
* a word in the composer opens a list above it, filtered as the handle is typed, and picking
|
|
4
|
+
* someone writes `@handle`. It needs script; without it the field is plain text.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { EntryComponent } from "remix/component";
|
|
10
|
+
import type { MentionPerson } from "./utils/mention-query.js";
|
|
11
|
+
export type { MentionPerson, MentionQuery } from "./utils/mention-query.js";
|
|
12
|
+
export { mentionMatches, mentionQuery } from "./utils/mention-query.js";
|
|
13
|
+
/** Prop types for {@link MentionMenu}. */
|
|
14
|
+
export declare namespace MentionMenu {
|
|
15
|
+
/** Plain data only, since the props cross into the browser with the island. */
|
|
16
|
+
type Props = {
|
|
17
|
+
/** Everyone who can be mentioned, in the order an empty query lists them. */
|
|
18
|
+
people: MentionPerson[];
|
|
19
|
+
/** The list's accessible name, and the line shown when nobody matches. */
|
|
20
|
+
labels: {
|
|
21
|
+
list: string;
|
|
22
|
+
empty: string;
|
|
23
|
+
};
|
|
24
|
+
/** The character that starts a mention. @default "@" */
|
|
25
|
+
trigger?: string;
|
|
26
|
+
/** The `id` of the `<textarea>` to watch; the `Composer.Input` of the island's form when omitted. */
|
|
27
|
+
target?: string;
|
|
28
|
+
/** How many people the list shows at once. @default 6 */
|
|
29
|
+
limit?: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Renders the list as a manual popover anchored above the composer. While it is open the
|
|
34
|
+
* field acts as its combobox: ArrowUp and ArrowDown move, Enter or Tab writes the active
|
|
35
|
+
* person's handle, Escape closes, and Enter never sends the message.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* <Composer method="post">
|
|
39
|
+
* <Composer.Input name="body" aria-label="Message" />
|
|
40
|
+
* <MentionMenu people={members} labels={{ list: "People", empty: "Nobody matches" }} />
|
|
41
|
+
* </Composer>
|
|
42
|
+
*/
|
|
43
|
+
export declare const MentionMenu: EntryComponent<MentionMenu.Props>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { bg, fg } from "@sdxc/u/color";
|
|
3
|
+
import { rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { cursor, raw } from "@sdxc/u/general";
|
|
5
|
+
import { hstack, shrink, vstack } from "@sdxc/u/layout";
|
|
6
|
+
import { bs, is, m, maxBs, minIs, p, pi } from "@sdxc/u/size";
|
|
7
|
+
import { when } from "@sdxc/u/state";
|
|
8
|
+
import { text, truncate, weight } from "@sdxc/u/typography";
|
|
9
|
+
import { clientEntry } from "remix/component";
|
|
10
|
+
import { floatingSurface } from "../styles/floating-surface.js";
|
|
11
|
+
import { MENTION_INDEX_ATTRIBUTE, mentionMenu, mentionOptionId } from "./mixins/mention-menu.js";
|
|
12
|
+
import { mentionMatches } from "./utils/mention-query.js";
|
|
13
|
+
export { mentionMatches, mentionQuery } from "./utils/mention-query.js";
|
|
14
|
+
/** How many people the list shows when `limit` is omitted. */
|
|
15
|
+
const DEFAULT_LIMIT = 6;
|
|
16
|
+
/**
|
|
17
|
+
* Renders the list as a manual popover anchored above the composer. While it is open the
|
|
18
|
+
* field acts as its combobox: ArrowUp and ArrowDown move, Enter or Tab writes the active
|
|
19
|
+
* person's handle, Escape closes, and Enter never sends the message.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <Composer method="post">
|
|
23
|
+
* <Composer.Input name="body" aria-label="Message" />
|
|
24
|
+
* <MentionMenu people={members} labels={{ list: "People", empty: "Nobody matches" }} />
|
|
25
|
+
* </Composer>
|
|
26
|
+
*/
|
|
27
|
+
export const MentionMenu = clientEntry("@sdxc/ui/chat/mention-menu#MentionMenu", function MentionMenu(handle) {
|
|
28
|
+
let menuId = `${handle.id}-mentions`;
|
|
29
|
+
let listId = `${handle.id}-mention-list`;
|
|
30
|
+
let state = { open: false, query: "", active: 0 };
|
|
31
|
+
/** Renders the list the mixin reports, resolving once it is in the page. */
|
|
32
|
+
function onChange(next) {
|
|
33
|
+
state = next;
|
|
34
|
+
return handle.update();
|
|
35
|
+
}
|
|
36
|
+
return () => {
|
|
37
|
+
let { labels, people, target, trigger = "@", limit = DEFAULT_LIMIT } = handle.props;
|
|
38
|
+
let { open, query, active } = state;
|
|
39
|
+
let listed = open ? mentionMatches(people, query, limit) : [];
|
|
40
|
+
return (_jsxs("div", { id: menuId, popover: "manual", "data-slot": "mention-menu", mix: [
|
|
41
|
+
mentionMenu({ people, trigger, target, limit, listId, onChange }),
|
|
42
|
+
floatingSurface(),
|
|
43
|
+
m(0),
|
|
44
|
+
p(1),
|
|
45
|
+
raw({ position: "fixed", inset: "auto", boxSizing: "border-box" }),
|
|
46
|
+
minIs("12rem"),
|
|
47
|
+
maxBs("16rem"),
|
|
48
|
+
raw({ overflowY: "auto" }),
|
|
49
|
+
], children: [_jsx("div", { role: "listbox", id: listId, "aria-label": labels.list, children: listed.map((person, index) => (_jsxs("div", { role: "option", id: mentionOptionId(listId, person), "aria-selected": index === active ? "true" : "false", "data-mention-handle": person.handle, [MENTION_INDEX_ATTRIBUTE]: String(index), mix: [
|
|
50
|
+
hstack({ gap: 2, align: "center" }),
|
|
51
|
+
pi(2),
|
|
52
|
+
bs("2.5rem"),
|
|
53
|
+
rounded("md"),
|
|
54
|
+
cursor("pointer"),
|
|
55
|
+
when('&[aria-selected="true"]', bg("neutral.bg-tint")),
|
|
56
|
+
], children: [_jsx("span", { "aria-hidden": "true", style: person.color === undefined
|
|
57
|
+
? undefined
|
|
58
|
+
: `background-color: ${person.color}; color: #fff`, mix: [
|
|
59
|
+
hstack({ align: "center", justify: "center" }),
|
|
60
|
+
is("1.75rem"),
|
|
61
|
+
bs("1.75rem"),
|
|
62
|
+
shrink(0),
|
|
63
|
+
rounded("md"),
|
|
64
|
+
bg("neutral.bg-tint"),
|
|
65
|
+
fg("neutral.emphasis"),
|
|
66
|
+
text("xs"),
|
|
67
|
+
weight("semibold"),
|
|
68
|
+
], children: person.initials }), _jsxs("span", { mix: [vstack({ gap: 0 }), raw({ minInlineSize: 0 })], children: [_jsx("span", { mix: [text("sm"), weight("medium"), fg("neutral.emphasis"), truncate()], children: person.name }), _jsxs("span", { mix: [text("xs"), fg("neutral.muted"), truncate()], children: [trigger, person.handle, person.detail === undefined ? null : ` · ${person.detail}`] })] })] }, person.id))) }), open && listed.length === 0 ? (_jsx("p", { role: "status", mix: [m(0), p(2), text("sm"), fg("neutral.muted")], children: labels.empty })) : null] }));
|
|
69
|
+
};
|
|
70
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A run of messages one person sent in a row, laid out flat the way a team chat reads: the
|
|
3
|
+
* first line carries the avatar, name and time, and each later line sits under it with its
|
|
4
|
+
* time in the gutter on hover. Every line has a hover action bar, edits and threads.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/** Prop types for {@link MessageGroup} and its compound parts. */
|
|
11
|
+
export declare namespace MessageGroup {
|
|
12
|
+
/** Props accepted by {@link MessageGroup}. */
|
|
13
|
+
interface Props extends TagProps<"div"> {
|
|
14
|
+
/** One {@link MessageGroup.Item} per message, oldest first. */
|
|
15
|
+
children: RemixNode;
|
|
16
|
+
}
|
|
17
|
+
/** Props accepted by {@link MessageGroup.Item}. */
|
|
18
|
+
interface ItemProps extends TagProps<"article"> {
|
|
19
|
+
/**
|
|
20
|
+
* Marks a message that names the reader, drawn with an accent edge and a warm tint so
|
|
21
|
+
* it stands out in a busy log.
|
|
22
|
+
*/
|
|
23
|
+
mentioned?: boolean;
|
|
24
|
+
/** Marks the message the address or a thread panel points at. */
|
|
25
|
+
current?: boolean;
|
|
26
|
+
children: RemixNode;
|
|
27
|
+
}
|
|
28
|
+
/** Props accepted by {@link MessageGroup.Avatar}. */
|
|
29
|
+
interface AvatarProps extends TagProps<"div"> {
|
|
30
|
+
children: RemixNode;
|
|
31
|
+
}
|
|
32
|
+
/** Props accepted by {@link MessageGroup.Header}. */
|
|
33
|
+
interface HeaderProps extends TagProps<"header"> {
|
|
34
|
+
/** The sender's name first, then quieter metadata such as the time or a role. */
|
|
35
|
+
children: RemixNode;
|
|
36
|
+
}
|
|
37
|
+
/** Props accepted by {@link MessageGroup.Time}. */
|
|
38
|
+
interface TimeProps extends TagProps<"time"> {
|
|
39
|
+
/** The short time, such as "10:42". */
|
|
40
|
+
children: RemixNode;
|
|
41
|
+
}
|
|
42
|
+
/** Props accepted by {@link MessageGroup.Content}. */
|
|
43
|
+
interface ContentProps extends TagProps<"div"> {
|
|
44
|
+
children: RemixNode;
|
|
45
|
+
}
|
|
46
|
+
/** Props accepted by {@link MessageGroup.Edited}. */
|
|
47
|
+
interface EditedProps extends TagProps<"span"> {
|
|
48
|
+
/** The word shown, such as "(edited)". */
|
|
49
|
+
children: RemixNode;
|
|
50
|
+
}
|
|
51
|
+
/** Props accepted by {@link MessageGroup.Actions}. */
|
|
52
|
+
interface ActionsProps extends TagProps<"div"> {
|
|
53
|
+
/** Small icon buttons; on a touch screen only the last one shows, so put a menu last. */
|
|
54
|
+
children: RemixNode;
|
|
55
|
+
}
|
|
56
|
+
/** Props accepted by {@link MessageGroup.Thread}. */
|
|
57
|
+
interface ThreadProps extends Omit<TagProps<"a">, "children" | "href" | "role"> {
|
|
58
|
+
href: string;
|
|
59
|
+
/** Small avatars of the people who replied, overlapped at the start. */
|
|
60
|
+
avatars?: RemixNode;
|
|
61
|
+
/** The reply count and when the last one came, such as "3 replies · Last reply 2h ago". */
|
|
62
|
+
children: RemixNode;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Renders the run's host. Lines inside share one gutter width, so the text column stays
|
|
67
|
+
* straight from the first line to the last.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* <MessageGroup>
|
|
71
|
+
* <MessageGroup.Item id="m-1">
|
|
72
|
+
* <MessageGroup.Avatar><Avatar size="md">…</Avatar></MessageGroup.Avatar>
|
|
73
|
+
* <MessageGroup.Header><strong>Mira Okafor</strong><time dateTime="…">10:42</time></MessageGroup.Header>
|
|
74
|
+
* <MessageGroup.Content>Shipped the new onboarding.</MessageGroup.Content>
|
|
75
|
+
* </MessageGroup.Item>
|
|
76
|
+
* <MessageGroup.Item id="m-2">
|
|
77
|
+
* <MessageGroup.Time dateTime="…">10:43</MessageGroup.Time>
|
|
78
|
+
* <MessageGroup.Content>Notes are in the doc.</MessageGroup.Content>
|
|
79
|
+
* </MessageGroup.Item>
|
|
80
|
+
* </MessageGroup>
|
|
81
|
+
*/
|
|
82
|
+
export declare function MessageGroup(handle: Handle<MessageGroup.Props>): () => import("remix/component").RemixElement;
|
|
83
|
+
export declare namespace MessageGroup {
|
|
84
|
+
var Item: (handle: Handle<MessageGroup.ItemProps>) => () => import("remix/component").RemixElement;
|
|
85
|
+
var Avatar: (handle: Handle<MessageGroup.AvatarProps>) => () => import("remix/component").RemixElement;
|
|
86
|
+
var Header: (handle: Handle<MessageGroup.HeaderProps>) => () => import("remix/component").RemixElement;
|
|
87
|
+
var Time: (handle: Handle<MessageGroup.TimeProps>) => () => import("remix/component").RemixElement;
|
|
88
|
+
var Content: (handle: Handle<MessageGroup.ContentProps>) => () => import("remix/component").RemixElement;
|
|
89
|
+
var Edited: (handle: Handle<MessageGroup.EditedProps>) => () => import("remix/component").RemixElement;
|
|
90
|
+
var Actions: (handle: Handle<MessageGroup.ActionsProps>) => () => import("remix/component").RemixElement;
|
|
91
|
+
var Thread: (handle: Handle<MessageGroup.ThreadProps>) => () => import("remix/component").RemixElement;
|
|
92
|
+
}
|