@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,142 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
3
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
4
|
+
import { when } from "@sdxc/u/state";
|
|
5
|
+
/** Milliseconds in a day, for walking a month's dates. */
|
|
6
|
+
const DAY_MS = 86_400_000;
|
|
7
|
+
/** Container the view names, so the months reflow to the width it is given. */
|
|
8
|
+
const YEAR_CONTAINER = "ui-year-view";
|
|
9
|
+
/** A month's days in weeks, `null` filling the cells before the 1st and after the last day. */
|
|
10
|
+
function monthCells(year, month, weekStartsOn) {
|
|
11
|
+
let first = Date.UTC(year, month, 1);
|
|
12
|
+
let days = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
|
|
13
|
+
let lead = (new Date(first).getUTCDay() - weekStartsOn + 7) % 7;
|
|
14
|
+
let cells = Array.from({ length: lead }, () => null);
|
|
15
|
+
for (let day = 0; day < days; day += 1) {
|
|
16
|
+
cells.push(new Date(first + day * DAY_MS).toISOString().slice(0, 10));
|
|
17
|
+
}
|
|
18
|
+
while (cells.length % 7 !== 0)
|
|
19
|
+
cells.push(null);
|
|
20
|
+
return cells;
|
|
21
|
+
}
|
|
22
|
+
/** How heavy a day's dot is: none, one event, a few, or a full day. */
|
|
23
|
+
function weight(count) {
|
|
24
|
+
if (count <= 0)
|
|
25
|
+
return "0";
|
|
26
|
+
if (count === 1)
|
|
27
|
+
return "1";
|
|
28
|
+
return count <= 3 ? "2" : "3";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Renders the year: a heading per month (a link when `monthHref` is set) over its weekday
|
|
32
|
+
* initials and day links. Dots grow and darken with a day's count, so busy stretches show as
|
|
33
|
+
* texture across the year.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <YearView year={2026} today="2026-11-18" counts={{ "2026-11-18": 4 }} dayHref={(date) => `/day/${date}`}
|
|
37
|
+
* labels={{ count: "{count} events" }} />
|
|
38
|
+
*/
|
|
39
|
+
export function YearView(handle) {
|
|
40
|
+
return () => {
|
|
41
|
+
let { year, counts = {}, today, selected, dayHref, monthHref, weekStartsOn = 0, locale = "en", labels, mix, ...rest } = handle.props;
|
|
42
|
+
let monthName = new Intl.DateTimeFormat(locale, { month: "long", timeZone: "UTC" });
|
|
43
|
+
let narrow = new Intl.DateTimeFormat(locale, { weekday: "narrow", timeZone: "UTC" });
|
|
44
|
+
let full = new Intl.DateTimeFormat(locale, { dateStyle: "full", timeZone: "UTC" });
|
|
45
|
+
let weekdays = Array.from({ length: 7 }, (_, index) => narrow.format(Date.UTC(2023, 0, 1 + ((index + weekStartsOn) % 7))));
|
|
46
|
+
return (_jsx("div", { ...rest, "data-slot": "year-view", mix: mergeMix([
|
|
47
|
+
raw({
|
|
48
|
+
container: `${YEAR_CONTAINER} / inline-size`,
|
|
49
|
+
display: "grid",
|
|
50
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(min(14rem, 100%), 1fr))",
|
|
51
|
+
gap: "1.5rem 1.25rem",
|
|
52
|
+
fontVariantNumeric: "tabular-nums",
|
|
53
|
+
}),
|
|
54
|
+
], mix), children: Array.from({ length: 12 }, (_, month) => {
|
|
55
|
+
let key = `${year}-${String(month + 1).padStart(2, "0")}`;
|
|
56
|
+
let name = monthName.format(Date.UTC(year, month, 1));
|
|
57
|
+
let current = today?.startsWith(key) ?? false;
|
|
58
|
+
return (_jsxs("section", { "aria-label": `${name} ${year}`, "data-slot": "year-view-month", "data-month": key, children: [_jsx("h3", { mix: [
|
|
59
|
+
raw({
|
|
60
|
+
margin: "0 0 0.5rem",
|
|
61
|
+
paddingInline: "0.25rem",
|
|
62
|
+
fontSize: "0.9375rem",
|
|
63
|
+
fontWeight: "650",
|
|
64
|
+
color: current ? "var(--ui-brand-fg)" : "var(--ui-neutral-fg-emphasis)",
|
|
65
|
+
}),
|
|
66
|
+
], children: monthHref ? (_jsx("a", { href: monthHref(key), mix: [
|
|
67
|
+
raw({
|
|
68
|
+
color: "inherit",
|
|
69
|
+
textDecoration: "none",
|
|
70
|
+
borderRadius: "0.25rem",
|
|
71
|
+
"&:hover": { textDecoration: "underline" },
|
|
72
|
+
"&:focus-visible": {
|
|
73
|
+
outline: "2px solid var(--ui-brand-ring)",
|
|
74
|
+
outlineOffset: "2px",
|
|
75
|
+
},
|
|
76
|
+
}),
|
|
77
|
+
], children: name })) : (name) }), _jsx("div", { "aria-hidden": "true", mix: [
|
|
78
|
+
raw({
|
|
79
|
+
display: "grid",
|
|
80
|
+
gridTemplateColumns: "repeat(7, minmax(0, 1fr))",
|
|
81
|
+
fontSize: "0.625rem",
|
|
82
|
+
fontWeight: "600",
|
|
83
|
+
textAlign: "center",
|
|
84
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
85
|
+
marginBlockEnd: "0.125rem",
|
|
86
|
+
}),
|
|
87
|
+
], children: weekdays.map((day) => (_jsx("span", { children: day }))) }), _jsx("div", { mix: [
|
|
88
|
+
raw({
|
|
89
|
+
display: "grid",
|
|
90
|
+
gridTemplateColumns: "repeat(7, minmax(0, 1fr))",
|
|
91
|
+
rowGap: "0.125rem",
|
|
92
|
+
}),
|
|
93
|
+
], children: monthCells(year, month, weekStartsOn).map((date) => {
|
|
94
|
+
if (date === null)
|
|
95
|
+
return _jsx("span", { "aria-hidden": "true" });
|
|
96
|
+
let count = counts[date] ?? 0;
|
|
97
|
+
return (_jsxs("a", { href: dayHref(date), "data-slot": "year-view-day", "data-date": date, "data-weight": weight(count), "data-today": date === today ? "" : undefined, "aria-current": date === selected ? "date" : undefined, mix: [
|
|
98
|
+
raw({
|
|
99
|
+
position: "relative",
|
|
100
|
+
display: "grid",
|
|
101
|
+
placeItems: "center",
|
|
102
|
+
blockSize: "1.75rem",
|
|
103
|
+
minInlineSize: "0",
|
|
104
|
+
borderRadius: "999px",
|
|
105
|
+
fontSize: "0.75rem",
|
|
106
|
+
color: "var(--ui-neutral-fg)",
|
|
107
|
+
textDecoration: "none",
|
|
108
|
+
outline: "none",
|
|
109
|
+
"&:hover": { backgroundColor: "var(--ui-neutral-bg-tint-hover)" },
|
|
110
|
+
"&:focus-visible": { boxShadow: "0 0 0 2px var(--ui-brand-ring)" },
|
|
111
|
+
"&[data-today]": { color: "var(--ui-brand-fg)", fontWeight: "700" },
|
|
112
|
+
"&[aria-current='date']": {
|
|
113
|
+
backgroundColor: "var(--ui-brand-bg-solid)",
|
|
114
|
+
color: "var(--ui-brand-fg-on-solid, white)",
|
|
115
|
+
},
|
|
116
|
+
"&::after": {
|
|
117
|
+
content: "''",
|
|
118
|
+
position: "absolute",
|
|
119
|
+
insetBlockEnd: "8%",
|
|
120
|
+
insetInlineStart: "50%",
|
|
121
|
+
inlineSize: "0.25rem",
|
|
122
|
+
blockSize: "0.25rem",
|
|
123
|
+
marginInlineStart: "-0.125rem",
|
|
124
|
+
borderRadius: "999px",
|
|
125
|
+
backgroundColor: "currentColor",
|
|
126
|
+
opacity: "0",
|
|
127
|
+
},
|
|
128
|
+
"&[data-weight='1']::after": { opacity: "0.35" },
|
|
129
|
+
"&[data-weight='2']::after": { opacity: "0.6" },
|
|
130
|
+
"&[data-weight='3']::after": {
|
|
131
|
+
opacity: "0.9",
|
|
132
|
+
inlineSize: "0.3125rem",
|
|
133
|
+
blockSize: "0.3125rem",
|
|
134
|
+
marginInlineStart: "-0.15625rem",
|
|
135
|
+
},
|
|
136
|
+
}),
|
|
137
|
+
when(`@container ${YEAR_CONTAINER} (width < 30rem)`, raw({ fontSize: "0.8125rem", blockSize: "2.25rem" })),
|
|
138
|
+
], children: [_jsx("span", { "aria-hidden": "true", children: Number(date.slice(8)) }), _jsxs("span", { mix: [visuallyHidden()], children: [full.format(Date.parse(`${date}T00:00:00Z`)), count > 0 ? `, ${labels.count.replace("{count}", String(count))}` : ""] })] }));
|
|
139
|
+
}) })] }));
|
|
140
|
+
}) }));
|
|
141
|
+
};
|
|
142
|
+
}
|
package/dist/styles/index.d.ts
CHANGED
package/dist/styles/index.js
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `typewriterText()` style-mixin factory: paints the text a `Typewriter` has not revealed
|
|
3
|
+
* yet transparent, in the host and every element inside it, so the text holds its final layout
|
|
4
|
+
* while it types out.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { ElementProps, MixinDescriptor } from "remix/component";
|
|
10
|
+
import type { CSSStyles } from "../utils/css-styles.js";
|
|
11
|
+
/**
|
|
12
|
+
* Hides the unrevealed text of every `Typewriter` typing inside the host. A text shadow would
|
|
13
|
+
* still show the hidden glyphs, so it goes too.
|
|
14
|
+
*
|
|
15
|
+
* @returns A `css()` mixin ready for the host element's `mix` prop.
|
|
16
|
+
* @example <p mix={[typewriterText()]}>{text}</p>
|
|
17
|
+
*/
|
|
18
|
+
export declare function typewriterText<Node extends Element = Element>(): MixinDescriptor<Node, [
|
|
19
|
+
styles: CSSStyles
|
|
20
|
+
], ElementProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `typewriterText()` style-mixin factory: paints the text a `Typewriter` has not revealed
|
|
3
|
+
* yet transparent, in the host and every element inside it, so the text holds its final layout
|
|
4
|
+
* while it types out.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import { combine, raw } from "@sdxc/u/general";
|
|
10
|
+
import { when } from "@sdxc/u/state";
|
|
11
|
+
import { TYPEWRITER_HIGHLIGHT } from "../utils/typewriter.js";
|
|
12
|
+
/**
|
|
13
|
+
* Hides the unrevealed text of every `Typewriter` typing inside the host. A text shadow would
|
|
14
|
+
* still show the hidden glyphs, so it goes too.
|
|
15
|
+
*
|
|
16
|
+
* @returns A `css()` mixin ready for the host element's `mix` prop.
|
|
17
|
+
* @example <p mix={[typewriterText()]}>{text}</p>
|
|
18
|
+
*/
|
|
19
|
+
export function typewriterText() {
|
|
20
|
+
return combine([
|
|
21
|
+
when(`&::highlight(${TYPEWRITER_HIGHLIGHT}), & ::highlight(${TYPEWRITER_HIGHLIGHT})`, raw({ color: "transparent", textShadow: "none" })),
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared test fixtures for the map: an invented island in the open Atlantic with a lake, two
|
|
3
|
+
* roads and two place names, plus the strings every map needs, so server and browser tests
|
|
4
|
+
* draw the same stage.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { GeoMap } from "../map/map.js";
|
|
10
|
+
import type { MapFeatureCollection } from "../map/utils/basemap.js";
|
|
11
|
+
/** The middle of the invented island. */
|
|
12
|
+
export declare const ISLAND_CENTER: [number, number];
|
|
13
|
+
/** An island with a lake, a coastal road, a cross road and two towns. */
|
|
14
|
+
export declare const ISLAND: MapFeatureCollection;
|
|
15
|
+
/** Every string a map needs, in English. */
|
|
16
|
+
export declare const LABELS: GeoMap.Labels;
|
|
17
|
+
/** Page URLs for a view, as a search page would build them. */
|
|
18
|
+
export declare const NAVIGATION: GeoMap.Navigation;
|
package/dist/test/map.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared test fixtures for the map: an invented island in the open Atlantic with a lake, two
|
|
3
|
+
* roads and two place names, plus the strings every map needs, so server and browser tests
|
|
4
|
+
* draw the same stage.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/** The middle of the invented island. */
|
|
10
|
+
export const ISLAND_CENTER = [-32, 44];
|
|
11
|
+
/** An island with a lake, a coastal road, a cross road and two towns. */
|
|
12
|
+
export const ISLAND = {
|
|
13
|
+
type: "FeatureCollection",
|
|
14
|
+
features: [
|
|
15
|
+
{
|
|
16
|
+
type: "Feature",
|
|
17
|
+
properties: { kind: "land" },
|
|
18
|
+
geometry: {
|
|
19
|
+
type: "Polygon",
|
|
20
|
+
coordinates: [
|
|
21
|
+
[
|
|
22
|
+
[-32.12, 43.95],
|
|
23
|
+
[-31.9, 43.94],
|
|
24
|
+
[-31.86, 44.04],
|
|
25
|
+
[-31.98, 44.08],
|
|
26
|
+
[-32.13, 44.04],
|
|
27
|
+
[-32.12, 43.95],
|
|
28
|
+
],
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: "Feature",
|
|
34
|
+
properties: { kind: "water" },
|
|
35
|
+
geometry: {
|
|
36
|
+
type: "Polygon",
|
|
37
|
+
coordinates: [
|
|
38
|
+
[
|
|
39
|
+
[-32.04, 44.0],
|
|
40
|
+
[-32.02, 43.99],
|
|
41
|
+
[-32.01, 44.01],
|
|
42
|
+
[-32.03, 44.02],
|
|
43
|
+
[-32.04, 44.0],
|
|
44
|
+
],
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: "Feature",
|
|
50
|
+
properties: { kind: "road", major: true },
|
|
51
|
+
geometry: {
|
|
52
|
+
type: "LineString",
|
|
53
|
+
coordinates: [
|
|
54
|
+
[-32.1, 43.97],
|
|
55
|
+
[-31.95, 43.96],
|
|
56
|
+
[-31.89, 44.03],
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: "Feature",
|
|
62
|
+
properties: {},
|
|
63
|
+
geometry: {
|
|
64
|
+
type: "LineString",
|
|
65
|
+
coordinates: [
|
|
66
|
+
[-32.0, 43.95],
|
|
67
|
+
[-31.99, 44.07],
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "Feature",
|
|
73
|
+
properties: { name: "Porto Alto" },
|
|
74
|
+
geometry: { type: "Point", coordinates: [-31.95, 43.98] },
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: "Feature",
|
|
78
|
+
properties: { name: "Vila Lago" },
|
|
79
|
+
geometry: { type: "Point", coordinates: [-32.06, 44.03] },
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
};
|
|
83
|
+
/** Every string a map needs, in English. */
|
|
84
|
+
export const LABELS = {
|
|
85
|
+
zoomIn: "Zoom in",
|
|
86
|
+
zoomOut: "Zoom out",
|
|
87
|
+
reset: "Reset view",
|
|
88
|
+
locate: "Show my location",
|
|
89
|
+
fullscreen: "Full screen",
|
|
90
|
+
cluster: "{count} stays",
|
|
91
|
+
gestureHint: "Use two fingers to move the map",
|
|
92
|
+
};
|
|
93
|
+
/** Page URLs for a view, as a search page would build them. */
|
|
94
|
+
export const NAVIGATION = {
|
|
95
|
+
href: (view) => `/stays?center=${view.center.join(",")}&zoom=${view.zoom}`,
|
|
96
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The feed the reel feed's browser tests mount, on a hovering pointer and on touch: six reels,
|
|
3
|
+
* each playing its own address of one short clip so the browser loads every reel separately,
|
|
4
|
+
* plus the waits both test files share.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { RenderResult } from "remix/component/test";
|
|
10
|
+
/** How many reels the feed holds. */
|
|
11
|
+
export declare const REEL_COUNT = 6;
|
|
12
|
+
/**
|
|
13
|
+
* Mounts a feed of {@link REEL_COUNT} reels opening on `current`, inside a box of the given
|
|
14
|
+
* height so each reel is one box tall.
|
|
15
|
+
*
|
|
16
|
+
* @param current The reel the page opens on.
|
|
17
|
+
* @param height The feed's height in pixels.
|
|
18
|
+
* @param options Whether the feed plays through and loops, and each reel's length in seconds.
|
|
19
|
+
*/
|
|
20
|
+
export declare function mountReels(current?: number, height?: number, options?: {
|
|
21
|
+
autoAdvance?: boolean;
|
|
22
|
+
loop?: boolean;
|
|
23
|
+
loopAt?: number;
|
|
24
|
+
}): RenderResult;
|
|
25
|
+
/** The feed's scroller. */
|
|
26
|
+
export declare function scrollerOf(mounted: RenderResult): HTMLElement;
|
|
27
|
+
/** The video of the reel at `index`. */
|
|
28
|
+
export declare function videoAt(mounted: RenderResult, index: number): HTMLVideoElement;
|
|
29
|
+
/** Resolves once the feed's island has run and the reel at `index` is the one on screen. */
|
|
30
|
+
export declare function waitForActive(mounted: RenderResult, index: number): Promise<void>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { render } from "remix/component/test";
|
|
3
|
+
import { expect, vi } from "vitest";
|
|
4
|
+
import { ReelFeed } from "../video/reel-feed.js";
|
|
5
|
+
/** An eight-second 32px clip; each reel adds its own query, so no two share a cache entry. */
|
|
6
|
+
const CLIP = new URL("./reel.webm", import.meta.url).href;
|
|
7
|
+
/** How many reels the feed holds. */
|
|
8
|
+
export const REEL_COUNT = 6;
|
|
9
|
+
/**
|
|
10
|
+
* Mounts a feed of {@link REEL_COUNT} reels opening on `current`, inside a box of the given
|
|
11
|
+
* height so each reel is one box tall.
|
|
12
|
+
*
|
|
13
|
+
* @param current The reel the page opens on.
|
|
14
|
+
* @param height The feed's height in pixels.
|
|
15
|
+
* @param options Whether the feed plays through and loops, and each reel's length in seconds.
|
|
16
|
+
*/
|
|
17
|
+
export function mountReels(current = 0, height = 600, options = {}) {
|
|
18
|
+
return render(_jsx("div", { style: `block-size: ${height}px; inline-size: 360px; --ui-reel-feed-height: ${height}px`, children: _jsx(ReelFeed, { label: "Reels", autoAdvance: options.autoAdvance, loop: options.loop, children: Array.from({ length: REEL_COUNT }, (_, index) => (_jsx(ReelFeed.Item, { id: `reel-${index}`, href: `?reel=${index}`, label: `Reel ${index + 1}`, offset: index - current, loopAt: options.loopAt ?? 4, sources: [{ src: `${CLIP}?reel=${index}`, type: "video/webm" }], labels: { pause: "Pause" }, children: _jsxs("p", { children: ["Caption ", index + 1] }) }))) }) }));
|
|
19
|
+
}
|
|
20
|
+
/** The feed's scroller. */
|
|
21
|
+
export function scrollerOf(mounted) {
|
|
22
|
+
let scroller = mounted.container.querySelector("[data-slot=reel-feed-scroller]");
|
|
23
|
+
if (scroller === null)
|
|
24
|
+
throw new Error("The feed drew no scroller");
|
|
25
|
+
return scroller;
|
|
26
|
+
}
|
|
27
|
+
/** The video of the reel at `index`. */
|
|
28
|
+
export function videoAt(mounted, index) {
|
|
29
|
+
let video = mounted.container.querySelector(`#reel-${index} video`);
|
|
30
|
+
if (video === null)
|
|
31
|
+
throw new Error(`Reel ${index} has no video`);
|
|
32
|
+
return video;
|
|
33
|
+
}
|
|
34
|
+
/** Resolves once the feed's island has run and the reel at `index` is the one on screen. */
|
|
35
|
+
export async function waitForActive(mounted, index) {
|
|
36
|
+
await vi.waitFor(() => {
|
|
37
|
+
expect(mounted.container.querySelector("[data-slot=reel-feed][data-reel-feed-ready]")).not.toBeNull();
|
|
38
|
+
let active = [...mounted.container.querySelectorAll("[data-reel-active]")].map((reel) => reel.id);
|
|
39
|
+
expect(active).toEqual([`reel-${index}`]);
|
|
40
|
+
}, { timeout: 4000 });
|
|
41
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The viewer the story viewer's browser tests mount, on a hovering pointer and on touch: three
|
|
3
|
+
* people with two or three segments each, timed in tenths of a second so a test watches a bar
|
|
4
|
+
* fill, and the queries both test files share.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { RenderResult } from "remix/component/test";
|
|
10
|
+
/**
|
|
11
|
+
* Mounts the viewer opening on `person`'s first segment, every segment lasting `seconds`.
|
|
12
|
+
*
|
|
13
|
+
* @param person The person whose group is active.
|
|
14
|
+
* @param seconds Each segment's length.
|
|
15
|
+
* @param boxed Shows the viewer inside a box on the page rather than over the whole window.
|
|
16
|
+
*/
|
|
17
|
+
export declare function mountStories(person?: string, seconds?: number, boxed?: boolean): RenderResult;
|
|
18
|
+
/** The viewer's root. */
|
|
19
|
+
export declare function viewerOf(mounted: RenderResult): HTMLElement;
|
|
20
|
+
/** The index of a group's current segment. */
|
|
21
|
+
export declare function currentSegment(mounted: RenderResult, person: string): number;
|
|
22
|
+
/** The id of the group on screen. */
|
|
23
|
+
export declare function activeGroup(mounted: RenderResult): string | undefined;
|
|
24
|
+
/** Resolves once the viewer's island runs. */
|
|
25
|
+
export declare function waitForViewer(mounted: RenderResult): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Records each time the viewer leaves through its close link, keeping the test page in place.
|
|
28
|
+
*
|
|
29
|
+
* @returns A list that grows by one per close.
|
|
30
|
+
*/
|
|
31
|
+
export declare function watchClose(mounted: RenderResult): string[];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { render } from "remix/component/test";
|
|
3
|
+
import { expect, vi } from "vitest";
|
|
4
|
+
import { StoryViewer } from "../video/story-viewer.js";
|
|
5
|
+
/** Each person's segment count. */
|
|
6
|
+
const PEOPLE = [
|
|
7
|
+
{ id: "ana", segments: 2 },
|
|
8
|
+
{ id: "bo", segments: 3 },
|
|
9
|
+
{ id: "cy", segments: 2 },
|
|
10
|
+
];
|
|
11
|
+
/** The address of one segment, as a query on the test page. */
|
|
12
|
+
function storyHref(person, segment) {
|
|
13
|
+
return `?story=${person}-${segment}`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Mounts the viewer opening on `person`'s first segment, every segment lasting `seconds`.
|
|
17
|
+
*
|
|
18
|
+
* @param person The person whose group is active.
|
|
19
|
+
* @param seconds Each segment's length.
|
|
20
|
+
* @param boxed Shows the viewer inside a box on the page rather than over the whole window.
|
|
21
|
+
*/
|
|
22
|
+
export function mountStories(person = "ana", seconds = 30, boxed = false) {
|
|
23
|
+
return render(_jsx("div", { style: boxed
|
|
24
|
+
? "position: relative; block-size: 400px; --ui-story-viewer-position: absolute; --ui-story-viewer-height: 400px"
|
|
25
|
+
: undefined, children: _jsx(StoryViewer, { label: "Stories", closeHref: "?closed", labels: { close: "Close", pause: "Pause" }, children: PEOPLE.map((entry, position) => {
|
|
26
|
+
let before = PEOPLE[position - 1];
|
|
27
|
+
let previousHref = before ? storyHref(before.id, before.segments - 1) : "?closed";
|
|
28
|
+
let nextHref = entry.segments > 1 ? storyHref(entry.id, 1) : "?closed";
|
|
29
|
+
return (_jsx(StoryViewer.Group, { id: `group-${entry.id}`, label: `${entry.id}'s story`, durations: Array.from({ length: entry.segments }, () => seconds), current: 0, active: entry.id === person, previousHref: previousHref, nextHref: nextHref, labels: { previous: "Previous", next: "Next" }, header: _jsx("p", { children: entry.id }), children: Array.from({ length: entry.segments }, (_, index) => (_jsx(StoryViewer.Segment, { href: storyHref(entry.id, index), current: index === 0, children: _jsx("div", { style: `background: hsl(${index * 90 + position * 30} 60% 40%)` }) }))) }));
|
|
30
|
+
}) }) }));
|
|
31
|
+
}
|
|
32
|
+
/** The viewer's root. */
|
|
33
|
+
export function viewerOf(mounted) {
|
|
34
|
+
let viewer = mounted.container.querySelector("[data-slot=story-viewer]");
|
|
35
|
+
if (viewer === null)
|
|
36
|
+
throw new Error("No viewer");
|
|
37
|
+
return viewer;
|
|
38
|
+
}
|
|
39
|
+
/** The index of a group's current segment. */
|
|
40
|
+
export function currentSegment(mounted, person) {
|
|
41
|
+
let segments = [
|
|
42
|
+
...mounted.container.querySelectorAll(`#group-${person} [data-slot=story-viewer-segment]`),
|
|
43
|
+
];
|
|
44
|
+
return segments.findIndex((segment) => segment.hasAttribute("data-current"));
|
|
45
|
+
}
|
|
46
|
+
/** The id of the group on screen. */
|
|
47
|
+
export function activeGroup(mounted) {
|
|
48
|
+
return mounted.container.querySelector("[data-story-active]")?.id;
|
|
49
|
+
}
|
|
50
|
+
/** Resolves once the viewer's island runs. */
|
|
51
|
+
export async function waitForViewer(mounted) {
|
|
52
|
+
await vi.waitFor(() => expect(mounted.container.querySelector("[data-story-ready]")).not.toBeNull());
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Records each time the viewer leaves through its close link, keeping the test page in place.
|
|
56
|
+
*
|
|
57
|
+
* @returns A list that grows by one per close.
|
|
58
|
+
*/
|
|
59
|
+
export function watchClose(mounted) {
|
|
60
|
+
let closes = [];
|
|
61
|
+
mounted.container.querySelector("[data-story-close]")?.addEventListener("click", (event) => {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
closes.push("closed");
|
|
64
|
+
});
|
|
65
|
+
return closes;
|
|
66
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A wallet-style boarding pass: the airline's band, the route in large airport codes, a grid of
|
|
3
|
+
* flight details, a perforated tear line and a scannable-looking code. `PassCode` draws that code
|
|
4
|
+
* as a square pattern derived from the caller's string, the same string always giving the same art.
|
|
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 BoardingPass} and {@link PassCode}. */
|
|
11
|
+
export declare namespace BoardingPass {
|
|
12
|
+
/** One end of the flight. */
|
|
13
|
+
interface Place {
|
|
14
|
+
/** The airport's three-letter code, set large. */
|
|
15
|
+
code: string;
|
|
16
|
+
city: RemixNode;
|
|
17
|
+
/** Departure or arrival time, formatted by the caller. */
|
|
18
|
+
time: RemixNode;
|
|
19
|
+
}
|
|
20
|
+
/** The airline printed on the band. */
|
|
21
|
+
interface Airline {
|
|
22
|
+
name: RemixNode;
|
|
23
|
+
/** A small logo drawn before the name, such as an `<svg>` or `<img>`. */
|
|
24
|
+
mark?: RemixNode;
|
|
25
|
+
}
|
|
26
|
+
/** The caption over each field, in the page's language. */
|
|
27
|
+
interface Labels {
|
|
28
|
+
passenger: RemixNode;
|
|
29
|
+
flight: RemixNode;
|
|
30
|
+
date: RemixNode;
|
|
31
|
+
gate: RemixNode;
|
|
32
|
+
boards: RemixNode;
|
|
33
|
+
seat: RemixNode;
|
|
34
|
+
zone: RemixNode;
|
|
35
|
+
cabin: RemixNode;
|
|
36
|
+
confirmation: RemixNode;
|
|
37
|
+
/** Read before the origin for assistive technology, e.g. "From". */
|
|
38
|
+
from?: string;
|
|
39
|
+
/** Read before the destination for assistive technology, e.g. "To". */
|
|
40
|
+
to?: string;
|
|
41
|
+
/** Names the code art, e.g. "Boarding code for confirmation K7Q2XR". */
|
|
42
|
+
code: string;
|
|
43
|
+
}
|
|
44
|
+
/** Every native `<article>` attribute, plus the trip it prints. */
|
|
45
|
+
interface Props extends Omit<TagProps<"article">, "children"> {
|
|
46
|
+
/** Names the pass for assistive technology, e.g. "Boarding pass, MRW to VLS". */
|
|
47
|
+
label: string;
|
|
48
|
+
airline: Airline;
|
|
49
|
+
passenger: RemixNode;
|
|
50
|
+
from: Place;
|
|
51
|
+
to: Place;
|
|
52
|
+
flight: RemixNode;
|
|
53
|
+
date: RemixNode;
|
|
54
|
+
gate: RemixNode;
|
|
55
|
+
/** When boarding starts, formatted by the caller. */
|
|
56
|
+
boards: RemixNode;
|
|
57
|
+
seat: RemixNode;
|
|
58
|
+
zone: RemixNode;
|
|
59
|
+
cabin: RemixNode;
|
|
60
|
+
confirmation: RemixNode;
|
|
61
|
+
/** The data the code art stands for; the same string always draws the same pattern. */
|
|
62
|
+
code: string;
|
|
63
|
+
labels: Labels;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/** Prop types for {@link PassCode}. */
|
|
67
|
+
export declare namespace PassCode {
|
|
68
|
+
/** Every native `<svg>` attribute, plus the data to draw and its spoken name. */
|
|
69
|
+
interface Props extends Omit<TagProps<"svg">, "children"> {
|
|
70
|
+
/** The data the pattern is derived from. */
|
|
71
|
+
code: string;
|
|
72
|
+
/** Names the image, e.g. "Boarding code for confirmation K7Q2XR". */
|
|
73
|
+
label: string;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Renders a code-like pattern as an `<svg role="img">` named by `label`: a 25-module square
|
|
78
|
+
* with a finder square in three corners and a quiet zone around it. It is decorative art standing
|
|
79
|
+
* in for a real code; equal `code` strings always draw equal patterns, and different ones differ.
|
|
80
|
+
*
|
|
81
|
+
* @param handle Runtime handle carrying the art's props.
|
|
82
|
+
* @returns The render function producing the art's markup.
|
|
83
|
+
* @example
|
|
84
|
+
* <PassCode code="LKW482|K7Q2XR|14C" label="Boarding code for confirmation K7Q2XR" />
|
|
85
|
+
*/
|
|
86
|
+
export declare function PassCode(handle: Handle<PassCode.Props>): () => import("remix/component").RemixElement;
|
|
87
|
+
/**
|
|
88
|
+
* Renders the pass: an `<article>` named by `label` whose top part holds the airline band, the
|
|
89
|
+
* route and the details as a `<dl>`, and whose stub, below a perforated tear, holds the
|
|
90
|
+
* {@link PassCode}. It prints in full colour, unshadowed and outlined, on one page.
|
|
91
|
+
*
|
|
92
|
+
* @param handle Runtime handle carrying the pass's props.
|
|
93
|
+
* @returns The render function producing the pass's markup.
|
|
94
|
+
* @example
|
|
95
|
+
* <BoardingPass
|
|
96
|
+
* label="Boarding pass, MRW to VLS"
|
|
97
|
+
* airline={{ name: "Larkwing Air" }}
|
|
98
|
+
* passenger="Ana Ortiz"
|
|
99
|
+
* from={{ code: "MRW", city: "Marrow Bay", time: "08:40" }}
|
|
100
|
+
* to={{ code: "VLS", city: "Vellis", time: "11:05" }}
|
|
101
|
+
* flight="LK 482" date="14 Mar" gate="B12" boards="08:05" seat="14C" zone="3" cabin="Economy"
|
|
102
|
+
* confirmation="K7Q2XR"
|
|
103
|
+
* code="LK482|K7Q2XR|14C"
|
|
104
|
+
* labels={labels}
|
|
105
|
+
* />
|
|
106
|
+
*/
|
|
107
|
+
export declare function BoardingPass(handle: Handle<BoardingPass.Props>): () => import("remix/component").RemixElement;
|