@bearmenu/ui 0.8.4 → 0.8.7
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/dist/chunk-637L7XQ3.js +85 -0
- package/dist/chunk-6XMYEZVR.js +26 -0
- package/dist/chunk-DNSXMHYX.js +8 -0
- package/dist/chunk-FDITZ2VM.js +16 -0
- package/dist/chunk-GPH6L4DX.js +55 -0
- package/dist/{chunk-N2KNBPAQ.js → chunk-QXHMPJ35.js} +1 -0
- package/dist/chunk-TT3WFS6S.js +379 -0
- package/dist/chunk-UXWAOISG.js +170 -0
- package/dist/{chunk-UZ3PCIE5.js → chunk-XWMRABZW.js} +2 -2
- package/dist/{chunk-VBA45GLP.js → chunk-ZDAHKI3A.js} +12 -2
- package/dist/components/card.d.ts +2 -2
- package/dist/components/card.js +4 -127
- package/dist/components/category-deck.d.ts +50 -0
- package/dist/components/category-deck.js +128 -0
- package/dist/components/concept-card.d.ts +43 -0
- package/dist/components/concept-card.js +81 -0
- package/dist/components/coverflow.d.ts +123 -0
- package/dist/components/coverflow.js +300 -0
- package/dist/components/day-rail-chip.d.ts +82 -0
- package/dist/components/day-rail-chip.js +105 -0
- package/dist/components/drift-rail.d.ts +28 -0
- package/dist/components/drift-rail.js +3 -0
- package/dist/components/event-card.d.ts +97 -0
- package/dist/components/event-card.js +164 -0
- package/dist/components/event-compact-row.d.ts +73 -0
- package/dist/components/event-compact-row.js +134 -0
- package/dist/components/event-day-header.d.ts +65 -0
- package/dist/components/event-day-header.js +95 -0
- package/dist/components/event-day-separator.d.ts +46 -0
- package/dist/components/event-day-separator.js +50 -0
- package/dist/components/event-detail-panel.d.ts +80 -0
- package/dist/components/event-detail-panel.js +251 -0
- package/dist/components/event-hub-hero.d.ts +34 -0
- package/dist/components/event-hub-hero.js +57 -0
- package/dist/components/event-index-row.d.ts +68 -0
- package/dist/components/event-index-row.js +84 -0
- package/dist/components/event-list-row-wide.d.ts +101 -0
- package/dist/components/event-list-row-wide.js +218 -0
- package/dist/components/event-list-row.d.ts +82 -0
- package/dist/components/event-list-row.js +173 -0
- package/dist/components/event-poster-fallback.d.ts +20 -0
- package/dist/components/event-poster-fallback.js +3 -0
- package/dist/components/event-types.d.ts +122 -0
- package/dist/components/event-types.js +2 -0
- package/dist/components/events-empty-state.d.ts +44 -0
- package/dist/components/events-empty-state.js +73 -0
- package/dist/components/facet-group.d.ts +93 -0
- package/dist/components/facet-group.js +222 -0
- package/dist/components/featured-rail-item.d.ts +42 -0
- package/dist/components/featured-rail-item.js +88 -0
- package/dist/components/hour-band.d.ts +68 -0
- package/dist/components/hour-band.js +53 -0
- package/dist/components/hour-group.d.ts +67 -0
- package/dist/components/hour-group.js +59 -0
- package/dist/components/motion-icon-controls.js +3 -379
- package/dist/components/multi-select-combobox.js +1 -1
- package/dist/components/place-about-tab.js +3 -3
- package/dist/components/place-details-mobile.js +3 -3
- package/dist/components/poster-stack.d.ts +30 -0
- package/dist/components/poster-stack.js +104 -0
- package/dist/components/poster-tape.d.ts +36 -0
- package/dist/components/poster-tape.js +64 -0
- package/dist/components/poster-wall.d.ts +25 -0
- package/dist/components/poster-wall.js +183 -0
- package/dist/components/quiet-stretch.d.ts +43 -0
- package/dist/components/quiet-stretch.js +54 -0
- package/dist/components/section-header.d.ts +53 -0
- package/dist/components/section-header.js +63 -0
- package/dist/components/segmented-nav.d.ts +62 -0
- package/dist/components/segmented-nav.js +54 -0
- package/dist/components/skeleton-card.js +1 -1
- package/dist/components/skeleton.d.ts +17 -0
- package/dist/components/skeleton.js +1 -1
- package/dist/components/tag-group.js +3 -26
- package/dist/components/tag.d.ts +2 -2
- package/dist/components/tag.js +1 -1
- package/dist/components/timeline-band.d.ts +46 -0
- package/dist/components/timeline-band.js +5 -0
- package/dist/components/venue-events-block.d.ts +143 -0
- package/dist/components/venue-events-block.js +222 -0
- package/dist/components/weekend-panel.d.ts +44 -0
- package/dist/components/weekend-panel.js +231 -0
- package/package.json +1 -1
- package/src/components/card.tsx +44 -1
- package/src/components/category-deck.stories.tsx +96 -0
- package/src/components/category-deck.tsx +227 -0
- package/src/components/concept-card.stories.tsx +80 -0
- package/src/components/concept-card.tsx +143 -0
- package/src/components/coverflow.stories.tsx +240 -0
- package/src/components/coverflow.test.tsx +193 -0
- package/src/components/coverflow.tsx +550 -0
- package/src/components/day-rail-chip.stories.tsx +145 -0
- package/src/components/day-rail-chip.tsx +201 -0
- package/src/components/drift-rail.stories.tsx +92 -0
- package/src/components/drift-rail.tsx +86 -0
- package/src/components/event-card.stories.tsx +248 -0
- package/src/components/event-card.test.tsx +188 -0
- package/src/components/event-card.tsx +329 -0
- package/src/components/event-compact-row.stories.tsx +221 -0
- package/src/components/event-compact-row.test.tsx +51 -0
- package/src/components/event-compact-row.tsx +270 -0
- package/src/components/event-day-header.stories.tsx +124 -0
- package/src/components/event-day-header.tsx +180 -0
- package/src/components/event-day-separator.stories.tsx +70 -0
- package/src/components/event-day-separator.tsx +95 -0
- package/src/components/event-detail-panel.stories.tsx +191 -0
- package/src/components/event-detail-panel.tsx +360 -0
- package/src/components/event-hub-hero.stories.tsx +66 -0
- package/src/components/event-hub-hero.tsx +110 -0
- package/src/components/event-index-row.stories.tsx +116 -0
- package/src/components/event-index-row.tsx +181 -0
- package/src/components/event-list-row-wide.stories.tsx +204 -0
- package/src/components/event-list-row-wide.tsx +386 -0
- package/src/components/event-list-row.stories.tsx +159 -0
- package/src/components/event-list-row.tsx +335 -0
- package/src/components/event-poster-fallback.stories.tsx +52 -0
- package/src/components/event-poster-fallback.tsx +31 -0
- package/src/components/event-types.ts +137 -0
- package/src/components/events-empty-state.stories.tsx +59 -0
- package/src/components/events-empty-state.tsx +131 -0
- package/src/components/facet-group.stories.tsx +247 -0
- package/src/components/facet-group.test.tsx +225 -0
- package/src/components/facet-group.tsx +352 -0
- package/src/components/featured-rail-item.stories.tsx +86 -0
- package/src/components/featured-rail-item.tsx +153 -0
- package/src/components/hour-band.stories.tsx +159 -0
- package/src/components/hour-band.tsx +126 -0
- package/src/components/hour-group.stories.tsx +100 -0
- package/src/components/hour-group.tsx +124 -0
- package/src/components/poster-stack.stories.tsx +68 -0
- package/src/components/poster-stack.tsx +155 -0
- package/src/components/poster-tape.stories.tsx +70 -0
- package/src/components/poster-tape.tsx +122 -0
- package/src/components/poster-wall.stories.tsx +95 -0
- package/src/components/poster-wall.tsx +220 -0
- package/src/components/quiet-stretch.stories.tsx +62 -0
- package/src/components/quiet-stretch.tsx +115 -0
- package/src/components/section-header.stories.tsx +70 -0
- package/src/components/section-header.tsx +134 -0
- package/src/components/segmented-nav.stories.tsx +118 -0
- package/src/components/segmented-nav.tsx +113 -0
- package/src/components/skeleton.tsx +18 -0
- package/src/components/tag.tsx +11 -1
- package/src/components/timeline-band.stories.tsx +206 -0
- package/src/components/timeline-band.tsx +207 -0
- package/src/components/venue-events-block.stories.tsx +216 -0
- package/src/components/venue-events-block.tsx +408 -0
- package/src/components/weekend-panel.stories.tsx +92 -0
- package/src/components/weekend-panel.tsx +322 -0
- package/src/globals.css +19 -0
|
@@ -1,380 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export { MotionBookmark, MotionCheck, MotionChevron, MotionCopy, MotionEye, MotionHeart, MotionPlayPause, MotionRefresh, MotionSearch, MotionShare, MotionSliders, MotionSort, MotionStar, MotionTheme } from '../chunk-TT3WFS6S.js';
|
|
2
|
+
import '../chunk-2WDJR6K7.js';
|
|
2
3
|
import '../chunk-FEK5XGZW.js';
|
|
3
|
-
import
|
|
4
|
-
import { motion } from 'framer-motion';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var HEART_TIMES = [0, 0.18, 0.5, 0.76, 1];
|
|
8
|
-
var heartBody = {
|
|
9
|
-
rest: { scaleX: 1, scaleY: 1, fillOpacity: 0, transition: returnTransition },
|
|
10
|
-
active: { scaleX: 1, scaleY: 1, fillOpacity: 1, transition: returnTransition },
|
|
11
|
-
play: {
|
|
12
|
-
scaleX: [1, 1.14, 0.9, 1.03, 1],
|
|
13
|
-
scaleY: [1, 0.82, 1.26, 0.96, 1],
|
|
14
|
-
fillOpacity: [0, 0, 1, 1, 1],
|
|
15
|
-
transition: beats(HEART_TIMES, 0.58)
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
function MotionHeart(props) {
|
|
19
|
-
return /* @__PURE__ */ jsx(MotionIcon, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(
|
|
20
|
-
motion.path,
|
|
21
|
-
{
|
|
22
|
-
variants: heartBody,
|
|
23
|
-
style: { originX: "12px", originY: "13px" },
|
|
24
|
-
fill: "currentColor",
|
|
25
|
-
fillOpacity: 0,
|
|
26
|
-
d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"
|
|
27
|
-
}
|
|
28
|
-
) }));
|
|
29
|
-
}
|
|
30
|
-
var BOOKMARK_TIMES = [0, 0.2, 0.56, 0.8, 1];
|
|
31
|
-
var bookmarkBody = {
|
|
32
|
-
rest: { y: 0, scaleY: 1, fillOpacity: 0, transition: returnTransition },
|
|
33
|
-
active: { y: 0, scaleY: 1, fillOpacity: 1, transition: returnTransition },
|
|
34
|
-
play: {
|
|
35
|
-
// Lifts clear, drops, compresses against the notch, settles filled.
|
|
36
|
-
y: [0, -7, 1.5, 0, 0],
|
|
37
|
-
scaleY: [1, 1.07, 0.88, 1.02, 1],
|
|
38
|
-
fillOpacity: [0, 0, 0, 1, 1],
|
|
39
|
-
transition: beats(BOOKMARK_TIMES, 0.6)
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
function MotionBookmark(props) {
|
|
43
|
-
return /* @__PURE__ */ jsx(MotionIcon, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(
|
|
44
|
-
motion.path,
|
|
45
|
-
{
|
|
46
|
-
variants: bookmarkBody,
|
|
47
|
-
style: { originX: "12px", originY: "21px" },
|
|
48
|
-
fill: "currentColor",
|
|
49
|
-
fillOpacity: 0,
|
|
50
|
-
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z"
|
|
51
|
-
}
|
|
52
|
-
) }));
|
|
53
|
-
}
|
|
54
|
-
var SLIDER_ROWS = [5, 12, 19];
|
|
55
|
-
var HANDLE_X = [14, 8, 16];
|
|
56
|
-
var HANDLE_ACTIVE_DX = [-6, 7, -4];
|
|
57
|
-
function sliderHandle(index) {
|
|
58
|
-
const dx = HANDLE_ACTIVE_DX[index];
|
|
59
|
-
return {
|
|
60
|
-
rest: { x: 0, transition: returnTransition },
|
|
61
|
-
active: { x: dx, transition: returnTransition },
|
|
62
|
-
play: {
|
|
63
|
-
x: [0, -dx * 0.12, dx * 1.12, dx],
|
|
64
|
-
transition: beats([0, 0.16, 0.72, 1], 0.55 + index * 0.04)
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function MotionSliders(props) {
|
|
69
|
-
return /* @__PURE__ */ jsxs(MotionIcon, __spreadProps(__spreadValues({}, props), { children: [
|
|
70
|
-
SLIDER_ROWS.map((y) => /* @__PURE__ */ jsx("path", { d: `M3 ${y}h18`, opacity: 0.45 }, `track-${y}`)),
|
|
71
|
-
SLIDER_ROWS.map((y, i) => /* @__PURE__ */ jsx(motion.path, { variants: sliderHandle(i), d: `M${HANDLE_X[i]} ${y - 2}v4` }, `handle-${y}`))
|
|
72
|
-
] }));
|
|
73
|
-
}
|
|
74
|
-
var lens = {
|
|
75
|
-
rest: { rotate: 0, transition: returnTransition },
|
|
76
|
-
active: { rotate: 0, transition: returnTransition },
|
|
77
|
-
play: {
|
|
78
|
-
// Pivots on the handle end, so the glass sweeps an arc like someone scanning.
|
|
79
|
-
rotate: [0, 9, -16, 4, 0],
|
|
80
|
-
transition: beats([0, 0.16, 0.48, 0.78, 1], 0.6)
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
var found = {
|
|
84
|
-
rest: { scale: 0, opacity: 0, transition: { duration: 0.15 } },
|
|
85
|
-
active: { scale: 1, opacity: 1, transition: { duration: 0.15 } },
|
|
86
|
-
play: {
|
|
87
|
-
scale: [0, 0, 0, 1.3, 1],
|
|
88
|
-
opacity: [0, 0, 0, 1, 1],
|
|
89
|
-
transition: beats([0, 0.16, 0.48, 0.78, 1], 0.6)
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
function MotionSearch(props) {
|
|
93
|
-
return /* @__PURE__ */ jsx(MotionIcon, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsxs(motion.g, { variants: lens, style: { originX: "21px", originY: "21px" }, children: [
|
|
94
|
-
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
95
|
-
/* @__PURE__ */ jsx("path", { d: "m21 21-4.34-4.34" }),
|
|
96
|
-
/* @__PURE__ */ jsx(
|
|
97
|
-
motion.circle,
|
|
98
|
-
{
|
|
99
|
-
variants: found,
|
|
100
|
-
opacity: 0,
|
|
101
|
-
style: { originX: "11px", originY: "11px" },
|
|
102
|
-
fill: "currentColor",
|
|
103
|
-
cx: "11",
|
|
104
|
-
cy: "11",
|
|
105
|
-
r: "2.5"
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
] }) }));
|
|
109
|
-
}
|
|
110
|
-
var SHARE_TIMES = [0, 0.2, 0.62, 1];
|
|
111
|
-
function shareNode(dx, dy) {
|
|
112
|
-
return {
|
|
113
|
-
rest: { x: 0, y: 0, opacity: 1, transition: returnTransition },
|
|
114
|
-
active: { x: 0, y: 0, opacity: 1, transition: returnTransition },
|
|
115
|
-
play: {
|
|
116
|
-
x: [0, -dx * 0.18, dx, 0],
|
|
117
|
-
y: [0, -dy * 0.18, dy, 0],
|
|
118
|
-
opacity: [1, 1, 0.15, 1],
|
|
119
|
-
transition: beats(SHARE_TIMES, 0.58)
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
var shareTop = shareNode(7, -4);
|
|
124
|
-
var shareBottom = shareNode(7, 4);
|
|
125
|
-
function MotionShare(props) {
|
|
126
|
-
return /* @__PURE__ */ jsxs(MotionIcon, __spreadProps(__spreadValues({}, props), { children: [
|
|
127
|
-
/* @__PURE__ */ jsx("circle", { cx: "6", cy: "12", r: "3" }),
|
|
128
|
-
/* @__PURE__ */ jsxs(motion.g, { variants: shareTop, children: [
|
|
129
|
-
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "5", r: "3" }),
|
|
130
|
-
/* @__PURE__ */ jsx("line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49" })
|
|
131
|
-
] }),
|
|
132
|
-
/* @__PURE__ */ jsxs(motion.g, { variants: shareBottom, children: [
|
|
133
|
-
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "19", r: "3" }),
|
|
134
|
-
/* @__PURE__ */ jsx("line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49" })
|
|
135
|
-
] })
|
|
136
|
-
] }));
|
|
137
|
-
}
|
|
138
|
-
var SORT_TIMES = [0, 0.18, 0.6, 1];
|
|
139
|
-
function sortArm(dy) {
|
|
140
|
-
return {
|
|
141
|
-
rest: { y: 0, transition: returnTransition },
|
|
142
|
-
active: { y: 0, transition: returnTransition },
|
|
143
|
-
play: {
|
|
144
|
-
y: [0, -dy * 0.2, dy, 0],
|
|
145
|
-
transition: beats(SORT_TIMES, 0.56)
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
var sortDown = sortArm(6);
|
|
150
|
-
var sortUp = sortArm(-6);
|
|
151
|
-
function MotionSort(props) {
|
|
152
|
-
return /* @__PURE__ */ jsxs(MotionIcon, __spreadProps(__spreadValues({}, props), { children: [
|
|
153
|
-
/* @__PURE__ */ jsxs(motion.g, { variants: sortDown, children: [
|
|
154
|
-
/* @__PURE__ */ jsx("path", { d: "m21 16-4 4-4-4" }),
|
|
155
|
-
/* @__PURE__ */ jsx("path", { d: "M17 20V4" })
|
|
156
|
-
] }),
|
|
157
|
-
/* @__PURE__ */ jsxs(motion.g, { variants: sortUp, children: [
|
|
158
|
-
/* @__PURE__ */ jsx("path", { d: "m3 8 4-4 4 4" }),
|
|
159
|
-
/* @__PURE__ */ jsx("path", { d: "M7 4v16" })
|
|
160
|
-
] })
|
|
161
|
-
] }));
|
|
162
|
-
}
|
|
163
|
-
var checkStroke = {
|
|
164
|
-
rest: { pathLength: 0, opacity: 0, transition: { duration: 0.15 } },
|
|
165
|
-
active: { pathLength: 1, opacity: 1, transition: { duration: 0.15 } },
|
|
166
|
-
play: {
|
|
167
|
-
pathLength: [0, 1],
|
|
168
|
-
opacity: [1, 1],
|
|
169
|
-
transition: { duration: 0.26, ease: "easeOut" }
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
function MotionCheck(props) {
|
|
173
|
-
return /* @__PURE__ */ jsx(MotionIcon, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(motion.path, { variants: checkStroke, opacity: 0, d: "M20 6 9 17l-5-5" }) }));
|
|
174
|
-
}
|
|
175
|
-
var SUN_RAYS = [
|
|
176
|
-
"M12 2v2",
|
|
177
|
-
"M12 20v2",
|
|
178
|
-
"m4.93 4.93 1.41 1.41",
|
|
179
|
-
"m17.66 17.66 1.41 1.41",
|
|
180
|
-
"M2 12h2",
|
|
181
|
-
"M20 12h2",
|
|
182
|
-
"m6.34 17.66-1.41 1.41",
|
|
183
|
-
"m19.07 4.93-1.41 1.41"
|
|
184
|
-
];
|
|
185
|
-
var THEME_TIMES = [0, 0.3, 0.7, 1];
|
|
186
|
-
var rays = {
|
|
187
|
-
rest: { scale: 1, opacity: 1, transition: returnTransition },
|
|
188
|
-
active: { scale: 0, opacity: 0, transition: returnTransition },
|
|
189
|
-
play: {
|
|
190
|
-
scale: [1, 0.4, 0, 0],
|
|
191
|
-
opacity: [1, 0.5, 0, 0],
|
|
192
|
-
transition: beats(THEME_TIMES, 0.5)
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
var disc = {
|
|
196
|
-
rest: { scale: 1, opacity: 1, transition: returnTransition },
|
|
197
|
-
active: { scale: 0.6, opacity: 0, transition: returnTransition },
|
|
198
|
-
play: { scale: [1, 0.85, 0.6, 0.6], opacity: [1, 1, 0, 0], transition: beats(THEME_TIMES, 0.5) }
|
|
199
|
-
};
|
|
200
|
-
var crescent = {
|
|
201
|
-
rest: { scale: 0.6, opacity: 0, rotate: -35, transition: returnTransition },
|
|
202
|
-
active: { scale: 1, opacity: 1, rotate: 0, transition: returnTransition },
|
|
203
|
-
play: {
|
|
204
|
-
scale: [0.6, 0.7, 1.06, 1],
|
|
205
|
-
opacity: [0, 0, 1, 1],
|
|
206
|
-
rotate: [-35, -22, 4, 0],
|
|
207
|
-
transition: beats(THEME_TIMES, 0.5)
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
function MotionTheme(props) {
|
|
211
|
-
const origin = { originX: "12px", originY: "12px" };
|
|
212
|
-
return /* @__PURE__ */ jsxs(MotionIcon, __spreadProps(__spreadValues({}, props), { children: [
|
|
213
|
-
/* @__PURE__ */ jsx(motion.g, { variants: rays, style: origin, children: SUN_RAYS.map((d) => /* @__PURE__ */ jsx("path", { d }, d)) }),
|
|
214
|
-
/* @__PURE__ */ jsx(motion.circle, { variants: disc, style: origin, cx: "12", cy: "12", r: "4" }),
|
|
215
|
-
/* @__PURE__ */ jsx(
|
|
216
|
-
motion.path,
|
|
217
|
-
{
|
|
218
|
-
variants: crescent,
|
|
219
|
-
opacity: 0,
|
|
220
|
-
style: origin,
|
|
221
|
-
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"
|
|
222
|
-
}
|
|
223
|
-
)
|
|
224
|
-
] }));
|
|
225
|
-
}
|
|
226
|
-
var chevron = {
|
|
227
|
-
rest: { rotate: 0, y: 0, transition: returnTransition },
|
|
228
|
-
active: { rotate: 180, y: 0, transition: returnTransition },
|
|
229
|
-
play: {
|
|
230
|
-
rotate: [0, -12, 196, 180],
|
|
231
|
-
y: [0, 1, -1, 0],
|
|
232
|
-
transition: beats([0, 0.16, 0.72, 1], 0.44)
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
function MotionChevron(props) {
|
|
236
|
-
return /* @__PURE__ */ jsx(MotionIcon, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(motion.path, { variants: chevron, style: { originX: "12px", originY: "12px" }, d: "m6 9 6 6 6-6" }) }));
|
|
237
|
-
}
|
|
238
|
-
var PLAYPAUSE_TIMES = [0, 0.24, 0.72, 1];
|
|
239
|
-
var playHead = {
|
|
240
|
-
rest: { scale: 1, opacity: 1, transition: returnTransition },
|
|
241
|
-
active: { scale: 0.2, opacity: 0, transition: returnTransition },
|
|
242
|
-
play: { scale: [1, 1.1, 0.2, 0.2], opacity: [1, 1, 0, 0], transition: beats(PLAYPAUSE_TIMES, 0.46) }
|
|
243
|
-
};
|
|
244
|
-
function pauseBar(dx) {
|
|
245
|
-
return {
|
|
246
|
-
rest: { x: dx, scaleY: 0.2, opacity: 0, transition: returnTransition },
|
|
247
|
-
active: { x: 0, scaleY: 1, opacity: 1, transition: returnTransition },
|
|
248
|
-
play: {
|
|
249
|
-
x: [dx, dx * 0.7, -dx * 0.08, 0],
|
|
250
|
-
scaleY: [0.2, 0.4, 1.08, 1],
|
|
251
|
-
opacity: [0, 0.4, 1, 1],
|
|
252
|
-
transition: beats(PLAYPAUSE_TIMES, 0.46)
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
var barLeft = pauseBar(5);
|
|
257
|
-
var barRight = pauseBar(-5);
|
|
258
|
-
function MotionPlayPause(props) {
|
|
259
|
-
const origin = { originX: "12px", originY: "12px" };
|
|
260
|
-
return /* @__PURE__ */ jsxs(MotionIcon, __spreadProps(__spreadValues({}, props), { children: [
|
|
261
|
-
/* @__PURE__ */ jsx(
|
|
262
|
-
motion.path,
|
|
263
|
-
{
|
|
264
|
-
variants: playHead,
|
|
265
|
-
style: origin,
|
|
266
|
-
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"
|
|
267
|
-
}
|
|
268
|
-
),
|
|
269
|
-
/* @__PURE__ */ jsx(motion.rect, { variants: barLeft, opacity: 0, style: origin, x: "5", y: "3", width: "5", height: "18", rx: "1" }),
|
|
270
|
-
/* @__PURE__ */ jsx(motion.rect, { variants: barRight, opacity: 0, style: origin, x: "14", y: "3", width: "5", height: "18", rx: "1" })
|
|
271
|
-
] }));
|
|
272
|
-
}
|
|
273
|
-
var EYE_TIMES = [0, 0.3, 0.74, 1];
|
|
274
|
-
var lid = {
|
|
275
|
-
rest: { scaleY: 1, transition: returnTransition },
|
|
276
|
-
active: { scaleY: 0.18, transition: returnTransition },
|
|
277
|
-
play: { scaleY: [1, 1.06, 0.14, 0.18], transition: beats(EYE_TIMES, 0.46) }
|
|
278
|
-
};
|
|
279
|
-
var pupil = {
|
|
280
|
-
rest: { scale: 1, opacity: 1, transition: returnTransition },
|
|
281
|
-
active: { scale: 0.2, opacity: 0, transition: returnTransition },
|
|
282
|
-
play: { scale: [1, 1, 0.2, 0.2], opacity: [1, 1, 0, 0], transition: beats(EYE_TIMES, 0.46) }
|
|
283
|
-
};
|
|
284
|
-
var slash = {
|
|
285
|
-
rest: { pathLength: 0, opacity: 0, transition: { duration: 0.16 } },
|
|
286
|
-
active: { pathLength: 1, opacity: 1, transition: { duration: 0.16 } },
|
|
287
|
-
play: {
|
|
288
|
-
pathLength: [0, 0, 1, 1],
|
|
289
|
-
opacity: [0, 1, 1, 1],
|
|
290
|
-
transition: beats(EYE_TIMES, 0.46)
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
function MotionEye(props) {
|
|
294
|
-
const origin = { originX: "12px", originY: "12px" };
|
|
295
|
-
return /* @__PURE__ */ jsxs(MotionIcon, __spreadProps(__spreadValues({}, props), { children: [
|
|
296
|
-
/* @__PURE__ */ jsx(
|
|
297
|
-
motion.path,
|
|
298
|
-
{
|
|
299
|
-
variants: lid,
|
|
300
|
-
style: origin,
|
|
301
|
-
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
|
|
302
|
-
}
|
|
303
|
-
),
|
|
304
|
-
/* @__PURE__ */ jsx(motion.circle, { variants: pupil, style: origin, cx: "12", cy: "12", r: "3" }),
|
|
305
|
-
/* @__PURE__ */ jsx(motion.path, { variants: slash, opacity: 0, d: "m2 2 20 20" })
|
|
306
|
-
] }));
|
|
307
|
-
}
|
|
308
|
-
var STAR_TIMES = [0, 0.2, 0.62, 1];
|
|
309
|
-
var starBody = {
|
|
310
|
-
rest: { scale: 1, rotate: 0, fillOpacity: 0, transition: returnTransition },
|
|
311
|
-
active: { scale: 1, rotate: 0, fillOpacity: 1, transition: returnTransition },
|
|
312
|
-
play: {
|
|
313
|
-
scale: [1, 0.72, 1.22, 1],
|
|
314
|
-
rotate: [0, -14, 6, 0],
|
|
315
|
-
fillOpacity: [0, 0, 1, 1],
|
|
316
|
-
transition: beats(STAR_TIMES, 0.5)
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
function MotionStar(props) {
|
|
320
|
-
return /* @__PURE__ */ jsx(MotionIcon, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(
|
|
321
|
-
motion.path,
|
|
322
|
-
{
|
|
323
|
-
variants: starBody,
|
|
324
|
-
style: { originX: "12px", originY: "12px" },
|
|
325
|
-
fill: "currentColor",
|
|
326
|
-
fillOpacity: 0,
|
|
327
|
-
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"
|
|
328
|
-
}
|
|
329
|
-
) }));
|
|
330
|
-
}
|
|
331
|
-
var COPY_TIMES = [0, 0.22, 0.5, 0.76, 1];
|
|
332
|
-
var copySheet = {
|
|
333
|
-
rest: { x: 0, y: 0, opacity: 1, transition: returnTransition },
|
|
334
|
-
active: { x: 0, y: 0, opacity: 0, transition: returnTransition },
|
|
335
|
-
play: {
|
|
336
|
-
x: [0, 2.5, 4, 0, 0],
|
|
337
|
-
y: [0, -2.5, -4, 0, 0],
|
|
338
|
-
opacity: [1, 1, 1, 0, 0],
|
|
339
|
-
transition: beats(COPY_TIMES, 0.6)
|
|
340
|
-
}
|
|
341
|
-
};
|
|
342
|
-
var copyBack = {
|
|
343
|
-
rest: { opacity: 1, transition: returnTransition },
|
|
344
|
-
active: { opacity: 0, transition: returnTransition },
|
|
345
|
-
play: { opacity: [1, 1, 1, 0, 0], transition: beats(COPY_TIMES, 0.6) }
|
|
346
|
-
};
|
|
347
|
-
var copyCheck = {
|
|
348
|
-
rest: { pathLength: 0, opacity: 0, transition: { duration: 0.14 } },
|
|
349
|
-
active: { pathLength: 1, opacity: 1, transition: { duration: 0.14 } },
|
|
350
|
-
play: {
|
|
351
|
-
pathLength: [0, 0, 0, 0, 1],
|
|
352
|
-
opacity: [0, 0, 0, 1, 1],
|
|
353
|
-
transition: beats(COPY_TIMES, 0.6)
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
function MotionCopy(props) {
|
|
357
|
-
return /* @__PURE__ */ jsxs(MotionIcon, __spreadProps(__spreadValues({}, props), { children: [
|
|
358
|
-
/* @__PURE__ */ jsx(motion.path, { variants: copyBack, d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }),
|
|
359
|
-
/* @__PURE__ */ jsx(motion.rect, { variants: copySheet, width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
360
|
-
/* @__PURE__ */ jsx(motion.path, { variants: copyCheck, opacity: 0, d: "M20 6 9 17l-5-5" })
|
|
361
|
-
] }));
|
|
362
|
-
}
|
|
363
|
-
var refreshRing = {
|
|
364
|
-
rest: { rotate: 0, transition: returnTransition },
|
|
365
|
-
active: { rotate: 0, transition: returnTransition },
|
|
366
|
-
play: {
|
|
367
|
-
rotate: [0, -18, 372, 360],
|
|
368
|
-
transition: beats([0, 0.14, 0.8, 1], 0.66)
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
function MotionRefresh(props) {
|
|
372
|
-
return /* @__PURE__ */ jsx(MotionIcon, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsxs(motion.g, { variants: refreshRing, style: { originX: "12px", originY: "12px" }, children: [
|
|
373
|
-
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
374
|
-
/* @__PURE__ */ jsx("path", { d: "M21 3v5h-5" }),
|
|
375
|
-
/* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
376
|
-
/* @__PURE__ */ jsx("path", { d: "M8 16H3v5" })
|
|
377
|
-
] }) }));
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export { MotionBookmark, MotionCheck, MotionChevron, MotionCopy, MotionEye, MotionHeart, MotionPlayPause, MotionRefresh, MotionSearch, MotionShare, MotionSliders, MotionSort, MotionStar, MotionTheme };
|
|
4
|
+
import '../chunk-3GWWZKX7.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Checkbox } from '../chunk-D5QHEHXJ.js';
|
|
2
1
|
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-66MAPLXS.js';
|
|
3
2
|
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-XNA2INVQ.js';
|
|
4
3
|
import '../chunk-FRPPIXMY.js';
|
|
4
|
+
import { Checkbox } from '../chunk-D5QHEHXJ.js';
|
|
5
5
|
import { Button } from '../chunk-H3BV4VAG.js';
|
|
6
6
|
import '../chunk-R47NEOSI.js';
|
|
7
7
|
import { Badge } from '../chunk-UKBNQO6Q.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { PlaceAboutTab } from '../chunk-
|
|
2
|
-
import '../chunk-VBA45GLP.js';
|
|
3
|
-
import '../chunk-WSRWFA6K.js';
|
|
1
|
+
export { PlaceAboutTab } from '../chunk-XWMRABZW.js';
|
|
4
2
|
import '../chunk-VG3PND3D.js';
|
|
3
|
+
import '../chunk-WSRWFA6K.js';
|
|
4
|
+
import '../chunk-ZDAHKI3A.js';
|
|
5
5
|
import '../chunk-7BWTYWM3.js';
|
|
6
6
|
import '../chunk-FEK5XGZW.js';
|
|
7
7
|
import '../chunk-3GWWZKX7.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PlaceAboutTab } from '../chunk-
|
|
2
|
-
import '../chunk-VBA45GLP.js';
|
|
3
|
-
import '../chunk-WSRWFA6K.js';
|
|
1
|
+
import { PlaceAboutTab } from '../chunk-XWMRABZW.js';
|
|
4
2
|
import '../chunk-VG3PND3D.js';
|
|
3
|
+
import '../chunk-WSRWFA6K.js';
|
|
4
|
+
import '../chunk-ZDAHKI3A.js';
|
|
5
5
|
import { Text } from '../chunk-7BWTYWM3.js';
|
|
6
6
|
import { Badge } from '../chunk-UKBNQO6Q.js';
|
|
7
7
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PosterStack — three overlapping, gently rotated posters that float, the
|
|
5
|
+
* hub hero's aside slot in the source design.
|
|
6
|
+
*
|
|
7
|
+
* Two motion rules, both mandatory:
|
|
8
|
+
* 1. Stops entirely under `prefers-reduced-motion: reduce` — enforced via
|
|
9
|
+
* an injected `<style>` media query rather than relying on Tailwind's
|
|
10
|
+
* `motion-reduce:` variant, because the float is a custom `@keyframes`
|
|
11
|
+
* animation Tailwind cannot express, and only a `!important` CSS rule
|
|
12
|
+
* reliably beats the element's own inline `animation` style.
|
|
13
|
+
* 2. Pauses while the stack is scrolled off-screen — an IntersectionObserver
|
|
14
|
+
* toggles `animation-play-state` on the three poster nodes so nothing
|
|
15
|
+
* spends a paint budget while it isn't visible. Skipped entirely when
|
|
16
|
+
* reduced motion is on, since nothing is animating to pause.
|
|
17
|
+
*/
|
|
18
|
+
type PosterStackPoster = {
|
|
19
|
+
/** Absent renders a neutral placeholder block instead of an image. */
|
|
20
|
+
src?: string;
|
|
21
|
+
alt: string;
|
|
22
|
+
};
|
|
23
|
+
type PosterStackProps = {
|
|
24
|
+
/** Rendered in order; only the first three are shown. */
|
|
25
|
+
posters: PosterStackPoster[];
|
|
26
|
+
className?: string;
|
|
27
|
+
};
|
|
28
|
+
declare function PosterStack({ posters, className }: PosterStackProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { PosterStack, type PosterStackPoster, type PosterStackProps };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import '../chunk-3GWWZKX7.js';
|
|
3
|
+
import { useRef, useState, useEffect } from 'react';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var POSTER_STACK_OBSERVER_ROOT_MARGIN = "200px";
|
|
7
|
+
var POSTER_STACK_ANIMATION_STYLE = `
|
|
8
|
+
@keyframes ds-poster-stack-float-1 { to { transform: rotate(-5deg) translateY(-16px); } }
|
|
9
|
+
@keyframes ds-poster-stack-float-2 { to { transform: rotate(3deg) translateY(14px); } }
|
|
10
|
+
@keyframes ds-poster-stack-float-3 { to { transform: rotate(6deg) translateY(-11px); } }
|
|
11
|
+
@media (prefers-reduced-motion: reduce) {
|
|
12
|
+
[data-ds-poster-stack-item] { animation: none !important; }
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
var POSTER_SLOTS = [
|
|
16
|
+
{
|
|
17
|
+
positionClassName: "left-[6px] top-[34px] w-[120px] md:left-0 md:top-[52px] md:w-[196px]",
|
|
18
|
+
restTransform: "rotate(-5deg)",
|
|
19
|
+
animationName: "ds-poster-stack-float-1",
|
|
20
|
+
animationDurationMs: 9e3
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
positionClassName: "left-[110px] top-0 w-[140px] md:left-[168px] md:w-[232px]",
|
|
24
|
+
restTransform: "rotate(3deg)",
|
|
25
|
+
animationName: "ds-poster-stack-float-2",
|
|
26
|
+
animationDurationMs: 11e3,
|
|
27
|
+
zIndexClassName: "z-[3]"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
positionClassName: "left-[238px] top-[58px] w-[120px] md:left-[378px] md:top-24 md:w-[196px]",
|
|
31
|
+
restTransform: "rotate(6deg)",
|
|
32
|
+
animationName: "ds-poster-stack-float-3",
|
|
33
|
+
animationDurationMs: 1e4
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
var POSTER_SHADOW = "0 22px 50px oklch(0.3 0.02 60 / 0.24)";
|
|
37
|
+
function PosterStack({ posters, className }) {
|
|
38
|
+
const containerRef = useRef(null);
|
|
39
|
+
const posterRefs = useRef([]);
|
|
40
|
+
const [failedIndices, setFailedIndices] = useState(/* @__PURE__ */ new Set());
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (typeof window === "undefined") return;
|
|
43
|
+
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
44
|
+
const container = containerRef.current;
|
|
45
|
+
if (!container) return;
|
|
46
|
+
const observer = new IntersectionObserver(
|
|
47
|
+
([entry]) => {
|
|
48
|
+
const playState = entry.isIntersecting ? "running" : "paused";
|
|
49
|
+
for (const poster of posterRefs.current) {
|
|
50
|
+
if (poster) poster.style.animationPlayState = playState;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{ rootMargin: POSTER_STACK_OBSERVER_ROOT_MARGIN }
|
|
54
|
+
);
|
|
55
|
+
observer.observe(container);
|
|
56
|
+
return () => observer.disconnect();
|
|
57
|
+
}, []);
|
|
58
|
+
const visiblePosters = posters.slice(0, POSTER_SLOTS.length);
|
|
59
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: cn("relative h-[250px] md:h-[400px]", className), children: [
|
|
60
|
+
/* @__PURE__ */ jsx("style", { children: POSTER_STACK_ANIMATION_STYLE }),
|
|
61
|
+
visiblePosters.map((poster, index) => {
|
|
62
|
+
const slot = POSTER_SLOTS[index];
|
|
63
|
+
const showPoster = !!poster.src && !failedIndices.has(index);
|
|
64
|
+
return /* @__PURE__ */ jsx(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
ref: (node) => {
|
|
68
|
+
posterRefs.current[index] = node;
|
|
69
|
+
},
|
|
70
|
+
"data-ds-poster-stack-item": true,
|
|
71
|
+
className: cn(
|
|
72
|
+
"absolute aspect-[3/4] overflow-hidden rounded-xl bg-muted",
|
|
73
|
+
slot.positionClassName,
|
|
74
|
+
slot.zIndexClassName
|
|
75
|
+
),
|
|
76
|
+
style: {
|
|
77
|
+
transform: slot.restTransform,
|
|
78
|
+
boxShadow: POSTER_SHADOW,
|
|
79
|
+
animationName: slot.animationName,
|
|
80
|
+
animationDuration: `${slot.animationDurationMs}ms`,
|
|
81
|
+
animationTimingFunction: "ease-in-out",
|
|
82
|
+
animationIterationCount: "infinite",
|
|
83
|
+
animationDirection: "alternate"
|
|
84
|
+
},
|
|
85
|
+
children: showPoster && // eslint-disable-next-line @next/next/no-img-element
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
"img",
|
|
88
|
+
{
|
|
89
|
+
src: poster.src,
|
|
90
|
+
alt: poster.alt,
|
|
91
|
+
loading: "lazy",
|
|
92
|
+
decoding: "async",
|
|
93
|
+
className: "h-full w-full object-cover",
|
|
94
|
+
onError: () => setFailedIndices((current) => new Set(current).add(index))
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
},
|
|
98
|
+
poster.alt || index
|
|
99
|
+
);
|
|
100
|
+
})
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { PosterStack };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* PosterTape — the closing marquee: small 4:5 posters drifting past at a
|
|
6
|
+
* slower, quieter speed than `<DriftRail>`'s default. Built on top of
|
|
7
|
+
* `<DriftRail>` rather than re-implementing the loop: both share the exact
|
|
8
|
+
* same seam-free-duplication and pause mechanics (`IntersectionObserver` +
|
|
9
|
+
* `prefers-reduced-motion`), and `<PosterTape>` only owns the item markup and
|
|
10
|
+
* a slower default speed.
|
|
11
|
+
*/
|
|
12
|
+
type PosterTapeItem = {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
/** Caller-composed, e.g. "Sat 5 · 20:00". Rendered as mono, small. */
|
|
16
|
+
meta: string;
|
|
17
|
+
posterUrl?: string;
|
|
18
|
+
href?: string;
|
|
19
|
+
/** Rendered instead of the poster when it's absent or failed to load. Defaults to `<EventPosterFallback />`. */
|
|
20
|
+
fallback?: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
type PosterTapeLinkProps = {
|
|
23
|
+
href: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
};
|
|
27
|
+
type PosterTapeProps = {
|
|
28
|
+
items: PosterTapeItem[];
|
|
29
|
+
/** Defaults to a plain `<a>`. Pass `next/link` in a Next app. */
|
|
30
|
+
linkComponent?: React.ComponentType<PosterTapeLinkProps>;
|
|
31
|
+
durationSeconds?: number;
|
|
32
|
+
className?: string;
|
|
33
|
+
};
|
|
34
|
+
declare function PosterTape({ items, linkComponent: LinkComponent, durationSeconds, className, }: PosterTapeProps): react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
export { PosterTape, type PosterTapeItem, type PosterTapeLinkProps, type PosterTapeProps };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DriftRail } from '../chunk-GPH6L4DX.js';
|
|
2
|
+
import { EventPosterFallback } from '../chunk-FDITZ2VM.js';
|
|
3
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
4
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function DefaultLink(_a) {
|
|
9
|
+
var _b = _a, { href } = _b, props = __objRest(_b, ["href"]);
|
|
10
|
+
return /* @__PURE__ */ jsx("a", __spreadValues({ href }, props));
|
|
11
|
+
}
|
|
12
|
+
var POSTER_TAPE_DEFAULT_DURATION_SECONDS = 60;
|
|
13
|
+
function PosterTapeItemCard({
|
|
14
|
+
item,
|
|
15
|
+
LinkComponent
|
|
16
|
+
}) {
|
|
17
|
+
var _a;
|
|
18
|
+
const [imgError, setImgError] = useState(false);
|
|
19
|
+
const showPoster = !!item.posterUrl && !imgError;
|
|
20
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
|
+
/* @__PURE__ */ jsx("div", { className: "aspect-[4/5] w-full overflow-hidden rounded-xl bg-muted", children: showPoster ? (
|
|
22
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
"img",
|
|
25
|
+
{
|
|
26
|
+
src: item.posterUrl,
|
|
27
|
+
alt: item.title,
|
|
28
|
+
title: item.title,
|
|
29
|
+
loading: "lazy",
|
|
30
|
+
decoding: "async",
|
|
31
|
+
className: "h-full w-full object-cover",
|
|
32
|
+
onError: () => setImgError(true)
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
) : (_a = item.fallback) != null ? _a : /* @__PURE__ */ jsx(EventPosterFallback, {}) }),
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1.5 text-[11px] font-semibold leading-[1.3] sm:mt-[7px] sm:text-[11.5px]", children: item.title }),
|
|
37
|
+
/* @__PURE__ */ jsx("div", { className: "mt-0.5 truncate font-mono text-[10px] text-muted-foreground sm:text-[10.5px]", children: item.meta })
|
|
38
|
+
] });
|
|
39
|
+
const itemClasses = "block w-[132px] shrink-0";
|
|
40
|
+
if (item.href) {
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
LinkComponent,
|
|
43
|
+
{
|
|
44
|
+
href: item.href,
|
|
45
|
+
className: cn(
|
|
46
|
+
itemClasses,
|
|
47
|
+
"rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
48
|
+
),
|
|
49
|
+
children: body
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ jsx("div", { className: itemClasses, children: body });
|
|
54
|
+
}
|
|
55
|
+
function PosterTape({
|
|
56
|
+
items,
|
|
57
|
+
linkComponent: LinkComponent = DefaultLink,
|
|
58
|
+
durationSeconds = POSTER_TAPE_DEFAULT_DURATION_SECONDS,
|
|
59
|
+
className
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ jsx(DriftRail, { durationSeconds, className, children: items.map((item) => /* @__PURE__ */ jsx(PosterTapeItemCard, { item, LinkComponent }, item.id)) });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { PosterTape };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type PosterWallTile = {
|
|
5
|
+
src?: string;
|
|
6
|
+
};
|
|
7
|
+
type PosterWallProps = {
|
|
8
|
+
/** Background tiles. Desktop renders 48, `compact` renders 36 — shorter arrays are padded with placeholders. */
|
|
9
|
+
tiles?: PosterWallTile[];
|
|
10
|
+
/** `compact` is the bottom-aligned mobile treatment (fewer, larger tiles, a top-fading veil). */
|
|
11
|
+
variant?: "default" | "compact";
|
|
12
|
+
/** The overlay content — fully caller-composed. */
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
declare function PosterWall({ tiles, variant, children, className }: PosterWallProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
type PosterWallSkeletonProps = {
|
|
18
|
+
/** `compact` is the bottom-aligned mobile treatment (fewer, larger tiles, a top-fading veil). */
|
|
19
|
+
variant?: "default" | "compact";
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
/** The tile grid at rest — the sweeping light never renders in the loading state. */
|
|
23
|
+
declare function PosterWallSkeleton({ variant, className }: PosterWallSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { PosterWall, type PosterWallProps, PosterWallSkeleton, type PosterWallSkeletonProps, type PosterWallTile };
|