@xsolla/xui-b2c-video-player 0.217.0
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 +3 -0
- package/native/index.d.mts +111 -0
- package/native/index.d.ts +111 -0
- package/native/index.js +545 -0
- package/native/index.js.map +1 -0
- package/native/index.mjs +528 -0
- package/native/index.mjs.map +1 -0
- package/package.json +63 -0
- package/web/index.d.mts +111 -0
- package/web/index.d.ts +111 -0
- package/web/index.js +584 -0
- package/web/index.js.map +1 -0
- package/web/index.mjs +553 -0
- package/web/index.mjs.map +1 -0
package/native/index.js
ADDED
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.tsx
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
VideoPlayer: () => VideoPlayer,
|
|
24
|
+
formatPlaybackTime: () => formatPlaybackTime
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// src/VideoPlayer.tsx
|
|
29
|
+
var import_react = require("react");
|
|
30
|
+
|
|
31
|
+
// ../../foundation/primitives-native/src/Box.tsx
|
|
32
|
+
var import_react_native = require("react-native");
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
var roleToAccessibilityRole = {
|
|
35
|
+
button: "button",
|
|
36
|
+
link: "link",
|
|
37
|
+
img: "image",
|
|
38
|
+
image: "image",
|
|
39
|
+
summary: "summary",
|
|
40
|
+
switch: "switch",
|
|
41
|
+
checkbox: "checkbox",
|
|
42
|
+
radio: "radio",
|
|
43
|
+
heading: "header",
|
|
44
|
+
text: "text",
|
|
45
|
+
search: "search",
|
|
46
|
+
alert: "alert",
|
|
47
|
+
none: "none",
|
|
48
|
+
presentation: "none",
|
|
49
|
+
progressbar: "progressbar",
|
|
50
|
+
scrollbar: "scrollbar",
|
|
51
|
+
adjustable: "adjustable",
|
|
52
|
+
tab: "tab",
|
|
53
|
+
menu: "menu",
|
|
54
|
+
menuitem: "menuitem",
|
|
55
|
+
list: "list",
|
|
56
|
+
timer: "timer"
|
|
57
|
+
};
|
|
58
|
+
var toGapValue = (gap) => {
|
|
59
|
+
if (gap === void 0) return void 0;
|
|
60
|
+
if (typeof gap === "number") return gap;
|
|
61
|
+
const pxMatch = /^(\d+(?:\.\d+)?)px$/.exec(gap);
|
|
62
|
+
if (pxMatch) return Number(pxMatch[1]);
|
|
63
|
+
const asNumber = Number(gap);
|
|
64
|
+
return Number.isFinite(asNumber) ? asNumber : void 0;
|
|
65
|
+
};
|
|
66
|
+
var Box = ({
|
|
67
|
+
children,
|
|
68
|
+
onPress,
|
|
69
|
+
onLayout,
|
|
70
|
+
onMoveShouldSetResponder,
|
|
71
|
+
onResponderGrant,
|
|
72
|
+
onResponderMove,
|
|
73
|
+
onResponderRelease,
|
|
74
|
+
onResponderTerminate,
|
|
75
|
+
backgroundColor,
|
|
76
|
+
borderColor,
|
|
77
|
+
borderWidth,
|
|
78
|
+
borderBottomWidth,
|
|
79
|
+
borderBottomColor,
|
|
80
|
+
borderTopWidth,
|
|
81
|
+
borderTopColor,
|
|
82
|
+
borderLeftWidth,
|
|
83
|
+
borderLeftColor,
|
|
84
|
+
borderRightWidth,
|
|
85
|
+
borderRightColor,
|
|
86
|
+
borderRadius,
|
|
87
|
+
borderStyle,
|
|
88
|
+
height,
|
|
89
|
+
padding,
|
|
90
|
+
paddingHorizontal,
|
|
91
|
+
paddingVertical,
|
|
92
|
+
margin,
|
|
93
|
+
marginTop,
|
|
94
|
+
marginBottom,
|
|
95
|
+
marginLeft,
|
|
96
|
+
marginRight,
|
|
97
|
+
flexDirection,
|
|
98
|
+
flexWrap,
|
|
99
|
+
alignItems,
|
|
100
|
+
justifyContent,
|
|
101
|
+
alignSelf,
|
|
102
|
+
position,
|
|
103
|
+
top,
|
|
104
|
+
bottom,
|
|
105
|
+
left,
|
|
106
|
+
right,
|
|
107
|
+
width,
|
|
108
|
+
minWidth,
|
|
109
|
+
minHeight,
|
|
110
|
+
maxWidth,
|
|
111
|
+
maxHeight,
|
|
112
|
+
flex,
|
|
113
|
+
flexShrink,
|
|
114
|
+
gap,
|
|
115
|
+
overflow,
|
|
116
|
+
opacity,
|
|
117
|
+
zIndex,
|
|
118
|
+
hoverStyle,
|
|
119
|
+
pressStyle,
|
|
120
|
+
style,
|
|
121
|
+
disabled,
|
|
122
|
+
"data-testid": dataTestId,
|
|
123
|
+
testID,
|
|
124
|
+
as,
|
|
125
|
+
src,
|
|
126
|
+
alt,
|
|
127
|
+
...rest
|
|
128
|
+
}) => {
|
|
129
|
+
const getContainerStyle = (pressed) => ({
|
|
130
|
+
backgroundColor: pressed && pressStyle?.backgroundColor ? pressStyle.backgroundColor : backgroundColor,
|
|
131
|
+
borderColor,
|
|
132
|
+
borderWidth,
|
|
133
|
+
borderBottomWidth,
|
|
134
|
+
borderBottomColor,
|
|
135
|
+
borderTopWidth,
|
|
136
|
+
borderTopColor,
|
|
137
|
+
borderLeftWidth,
|
|
138
|
+
borderLeftColor,
|
|
139
|
+
borderRightWidth,
|
|
140
|
+
borderRightColor,
|
|
141
|
+
borderRadius,
|
|
142
|
+
borderStyle,
|
|
143
|
+
overflow,
|
|
144
|
+
opacity: opacity ?? (disabled ? 0.5 : void 0),
|
|
145
|
+
zIndex,
|
|
146
|
+
height,
|
|
147
|
+
width,
|
|
148
|
+
minWidth,
|
|
149
|
+
minHeight,
|
|
150
|
+
maxWidth,
|
|
151
|
+
maxHeight,
|
|
152
|
+
padding,
|
|
153
|
+
paddingHorizontal,
|
|
154
|
+
paddingVertical,
|
|
155
|
+
margin,
|
|
156
|
+
marginTop,
|
|
157
|
+
marginBottom,
|
|
158
|
+
marginLeft,
|
|
159
|
+
marginRight,
|
|
160
|
+
flexDirection,
|
|
161
|
+
flexWrap,
|
|
162
|
+
alignItems,
|
|
163
|
+
justifyContent,
|
|
164
|
+
alignSelf,
|
|
165
|
+
position,
|
|
166
|
+
top,
|
|
167
|
+
bottom,
|
|
168
|
+
left,
|
|
169
|
+
right,
|
|
170
|
+
flex,
|
|
171
|
+
flexShrink,
|
|
172
|
+
gap: toGapValue(gap),
|
|
173
|
+
...style
|
|
174
|
+
});
|
|
175
|
+
const finalTestID = dataTestId || testID;
|
|
176
|
+
const {
|
|
177
|
+
role,
|
|
178
|
+
tabIndex,
|
|
179
|
+
onKeyDown,
|
|
180
|
+
onKeyUp,
|
|
181
|
+
"aria-label": ariaLabel,
|
|
182
|
+
"aria-labelledby": _ariaLabelledBy,
|
|
183
|
+
"aria-current": _ariaCurrent,
|
|
184
|
+
"aria-disabled": ariaDisabled,
|
|
185
|
+
"aria-live": ariaLive,
|
|
186
|
+
"aria-busy": ariaBusy,
|
|
187
|
+
className,
|
|
188
|
+
"data-testid": _dataTestId,
|
|
189
|
+
cursor: _cursor,
|
|
190
|
+
type: _type,
|
|
191
|
+
...nativeRest
|
|
192
|
+
} = rest;
|
|
193
|
+
const accessibilityRole = typeof role === "string" && roleToAccessibilityRole[role] || (as === "button" ? "button" : void 0);
|
|
194
|
+
const isDisabled = Boolean(disabled || ariaDisabled);
|
|
195
|
+
const accessibilityState = {
|
|
196
|
+
disabled: isDisabled || void 0,
|
|
197
|
+
busy: Boolean(ariaBusy) || void 0
|
|
198
|
+
};
|
|
199
|
+
const accessibilityLiveRegion = ariaLive === "polite" || ariaLive === "assertive" ? ariaLive : void 0;
|
|
200
|
+
if (as === "img" && src) {
|
|
201
|
+
const imageStyle = {
|
|
202
|
+
width,
|
|
203
|
+
height,
|
|
204
|
+
borderRadius,
|
|
205
|
+
position,
|
|
206
|
+
top,
|
|
207
|
+
bottom,
|
|
208
|
+
left,
|
|
209
|
+
right,
|
|
210
|
+
...style
|
|
211
|
+
};
|
|
212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
213
|
+
import_react_native.Image,
|
|
214
|
+
{
|
|
215
|
+
source: { uri: src },
|
|
216
|
+
style: imageStyle,
|
|
217
|
+
testID: finalTestID,
|
|
218
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : alt,
|
|
219
|
+
resizeMode: "cover",
|
|
220
|
+
...nativeRest
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
if (onPress || as === "button") {
|
|
225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
226
|
+
import_react_native.Pressable,
|
|
227
|
+
{
|
|
228
|
+
onPress: !isDisabled && onPress ? onPress : void 0,
|
|
229
|
+
disabled: isDisabled,
|
|
230
|
+
onLayout,
|
|
231
|
+
onMoveShouldSetResponder,
|
|
232
|
+
onResponderGrant,
|
|
233
|
+
onResponderMove,
|
|
234
|
+
onResponderRelease,
|
|
235
|
+
onResponderTerminate,
|
|
236
|
+
style: ({ pressed }) => getContainerStyle(pressed),
|
|
237
|
+
testID: finalTestID,
|
|
238
|
+
accessibilityRole,
|
|
239
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : void 0,
|
|
240
|
+
accessibilityState,
|
|
241
|
+
accessibilityLiveRegion,
|
|
242
|
+
...nativeRest,
|
|
243
|
+
children
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
248
|
+
import_react_native.View,
|
|
249
|
+
{
|
|
250
|
+
style: getContainerStyle(),
|
|
251
|
+
testID: finalTestID,
|
|
252
|
+
onLayout,
|
|
253
|
+
onMoveShouldSetResponder,
|
|
254
|
+
onResponderGrant,
|
|
255
|
+
onResponderMove,
|
|
256
|
+
onResponderRelease,
|
|
257
|
+
onResponderTerminate,
|
|
258
|
+
accessibilityRole,
|
|
259
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : void 0,
|
|
260
|
+
accessibilityState,
|
|
261
|
+
accessibilityLiveRegion,
|
|
262
|
+
...nativeRest,
|
|
263
|
+
children
|
|
264
|
+
}
|
|
265
|
+
);
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
// src/VideoPlayer.tsx
|
|
269
|
+
var import_xui_core = require("@xsolla/xui-core");
|
|
270
|
+
var import_xui_button = require("@xsolla/xui-button");
|
|
271
|
+
var import_xui_slider = require("@xsolla/xui-slider");
|
|
272
|
+
var import_xui_tag = require("@xsolla/xui-tag");
|
|
273
|
+
var import_xui_b2c_currency_tag = require("@xsolla/xui-b2c-currency-tag");
|
|
274
|
+
var import_xui_typography = require("@xsolla/xui-typography");
|
|
275
|
+
var import_xui_icons_base = require("@xsolla/xui-icons-base");
|
|
276
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
277
|
+
var CONTROL_BAR_HEIGHT = 64;
|
|
278
|
+
var CONTROL_BAR_PADDING = 12;
|
|
279
|
+
var HEADER_COPY_GAP = 12;
|
|
280
|
+
var SIDE_CONTROL_GAP = 12;
|
|
281
|
+
var SUCCESS_REWARD_VEIL = "linear-gradient(rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.64))";
|
|
282
|
+
var LABEL_REWARD_PADDING = 6;
|
|
283
|
+
var isCurrencyReward = (reward) => reward.kind === "currency";
|
|
284
|
+
var formatPlaybackTime = (seconds) => {
|
|
285
|
+
const safe = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;
|
|
286
|
+
const minutes = Math.floor(safe / 60);
|
|
287
|
+
const remainder = safe % 60;
|
|
288
|
+
return `${String(minutes).padStart(2, "0")}:${String(remainder).padStart(
|
|
289
|
+
2,
|
|
290
|
+
"0"
|
|
291
|
+
)}`;
|
|
292
|
+
};
|
|
293
|
+
var VideoPlayer = ({
|
|
294
|
+
view = "full",
|
|
295
|
+
title,
|
|
296
|
+
description,
|
|
297
|
+
rewards,
|
|
298
|
+
currentTime,
|
|
299
|
+
duration = 0,
|
|
300
|
+
playing,
|
|
301
|
+
muted,
|
|
302
|
+
expanded,
|
|
303
|
+
disabled = false,
|
|
304
|
+
onPlayPause,
|
|
305
|
+
onMute,
|
|
306
|
+
onExpand,
|
|
307
|
+
onSeek,
|
|
308
|
+
overlayThemeMode = "dark",
|
|
309
|
+
"aria-label": ariaLabel = "Video player",
|
|
310
|
+
testID,
|
|
311
|
+
themeMode,
|
|
312
|
+
themeProductContext = "b2c"
|
|
313
|
+
}) => {
|
|
314
|
+
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
315
|
+
const { theme: overlayTheme } = (0, import_xui_core.useResolvedTheme)({
|
|
316
|
+
themeMode: overlayThemeMode,
|
|
317
|
+
themeProductContext
|
|
318
|
+
});
|
|
319
|
+
const [internalTime, setInternalTime] = (0, import_react.useState)(currentTime ?? 0);
|
|
320
|
+
const [internalPlaying, setInternalPlaying] = (0, import_react.useState)(playing ?? false);
|
|
321
|
+
const [internalMuted, setInternalMuted] = (0, import_react.useState)(muted ?? false);
|
|
322
|
+
const [internalExpanded, setInternalExpanded] = (0, import_react.useState)(expanded ?? false);
|
|
323
|
+
const resolvedTime = currentTime ?? internalTime;
|
|
324
|
+
const isPlaying = playing ?? internalPlaying;
|
|
325
|
+
const isMuted = muted ?? internalMuted;
|
|
326
|
+
const isExpanded = expanded ?? internalExpanded;
|
|
327
|
+
const isCompact = view === "compact";
|
|
328
|
+
const isSeekable = duration > 0;
|
|
329
|
+
const overlayContentColor = overlayTheme.colors.content.static.light;
|
|
330
|
+
const copyColor = theme.colors.content.static.light;
|
|
331
|
+
const handleSeek = (next) => {
|
|
332
|
+
setInternalTime(next);
|
|
333
|
+
onSeek?.(next);
|
|
334
|
+
};
|
|
335
|
+
const handlePlayPause = () => {
|
|
336
|
+
const next = !isPlaying;
|
|
337
|
+
setInternalPlaying(next);
|
|
338
|
+
onPlayPause?.(next);
|
|
339
|
+
};
|
|
340
|
+
const handleMute = () => {
|
|
341
|
+
const next = !isMuted;
|
|
342
|
+
setInternalMuted(next);
|
|
343
|
+
onMute?.(next);
|
|
344
|
+
};
|
|
345
|
+
const handleExpand = () => {
|
|
346
|
+
const next = !isExpanded;
|
|
347
|
+
setInternalExpanded(next);
|
|
348
|
+
onExpand?.(next);
|
|
349
|
+
};
|
|
350
|
+
const hasRewards = Boolean(rewards && rewards.length > 0);
|
|
351
|
+
const hasCopy = Boolean(title || description);
|
|
352
|
+
const showHeader = !isCompact && (hasRewards || hasCopy);
|
|
353
|
+
const controlBar = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
354
|
+
Box,
|
|
355
|
+
{
|
|
356
|
+
flexDirection: "row",
|
|
357
|
+
alignItems: "center",
|
|
358
|
+
width: "100%",
|
|
359
|
+
height: CONTROL_BAR_HEIGHT,
|
|
360
|
+
gap: theme.spacing.lg,
|
|
361
|
+
padding: CONTROL_BAR_PADDING,
|
|
362
|
+
borderRadius: theme.shape.cell.borderRadius,
|
|
363
|
+
backgroundColor: overlayTheme.colors.layer.scrim,
|
|
364
|
+
style: { backdropFilter: "blur(8px)", WebkitBackdropFilter: "blur(8px)" },
|
|
365
|
+
testID: testID ? `${testID}-controls` : "video-player-controls",
|
|
366
|
+
children: [
|
|
367
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
368
|
+
Box,
|
|
369
|
+
{
|
|
370
|
+
flex: 1,
|
|
371
|
+
minWidth: 0,
|
|
372
|
+
flexDirection: "row",
|
|
373
|
+
alignItems: "center",
|
|
374
|
+
gap: theme.spacing.sm,
|
|
375
|
+
children: [
|
|
376
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
377
|
+
import_xui_button.IconButton,
|
|
378
|
+
{
|
|
379
|
+
variant: "tertiary",
|
|
380
|
+
tone: "mono",
|
|
381
|
+
size: "xs",
|
|
382
|
+
themeMode: overlayThemeMode,
|
|
383
|
+
themeProductContext,
|
|
384
|
+
disabled,
|
|
385
|
+
icon: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.Pause, {}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.Play, {}),
|
|
386
|
+
"aria-label": isPlaying ? "Pause" : "Play",
|
|
387
|
+
"aria-pressed": isPlaying,
|
|
388
|
+
onPress: handlePlayPause,
|
|
389
|
+
testID: testID ? `${testID}-play-pause` : "video-player-play-pause"
|
|
390
|
+
}
|
|
391
|
+
),
|
|
392
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box, { flex: 1, minWidth: 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
393
|
+
import_xui_slider.Slider,
|
|
394
|
+
{
|
|
395
|
+
value: resolvedTime,
|
|
396
|
+
min: 0,
|
|
397
|
+
max: isSeekable ? duration : 1,
|
|
398
|
+
step: 1,
|
|
399
|
+
size: "sm",
|
|
400
|
+
disabled: disabled || !isSeekable,
|
|
401
|
+
onChange: handleSeek,
|
|
402
|
+
"aria-label": "Seek",
|
|
403
|
+
themeMode: overlayThemeMode,
|
|
404
|
+
themeProductContext,
|
|
405
|
+
testID: testID ? `${testID}-seek` : "video-player-seek"
|
|
406
|
+
}
|
|
407
|
+
) }),
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
409
|
+
import_xui_typography.Typography,
|
|
410
|
+
{
|
|
411
|
+
variant: "bodySm",
|
|
412
|
+
color: overlayContentColor,
|
|
413
|
+
productContext: themeProductContext,
|
|
414
|
+
align: "right",
|
|
415
|
+
noWrap: true,
|
|
416
|
+
testID: testID ? `${testID}-time` : "video-player-time",
|
|
417
|
+
children: formatPlaybackTime(resolvedTime)
|
|
418
|
+
}
|
|
419
|
+
)
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
),
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: SIDE_CONTROL_GAP, children: [
|
|
424
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
425
|
+
import_xui_button.IconButton,
|
|
426
|
+
{
|
|
427
|
+
variant: "tertiary",
|
|
428
|
+
tone: "mono",
|
|
429
|
+
size: "sm",
|
|
430
|
+
themeMode: overlayThemeMode,
|
|
431
|
+
themeProductContext,
|
|
432
|
+
disabled,
|
|
433
|
+
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.VolumeMute, {}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.VolumeUp, {}),
|
|
434
|
+
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
435
|
+
"aria-pressed": isMuted,
|
|
436
|
+
onPress: handleMute,
|
|
437
|
+
testID: testID ? `${testID}-mute` : "video-player-mute"
|
|
438
|
+
}
|
|
439
|
+
),
|
|
440
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
441
|
+
import_xui_button.IconButton,
|
|
442
|
+
{
|
|
443
|
+
variant: "tertiary",
|
|
444
|
+
tone: "mono",
|
|
445
|
+
size: "sm",
|
|
446
|
+
themeMode: overlayThemeMode,
|
|
447
|
+
themeProductContext,
|
|
448
|
+
disabled,
|
|
449
|
+
icon: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.ExitFullScreen, {}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.FullScreen, {}),
|
|
450
|
+
"aria-label": isExpanded ? "Collapse" : "Expand",
|
|
451
|
+
"aria-pressed": isExpanded,
|
|
452
|
+
onPress: handleExpand,
|
|
453
|
+
testID: testID ? `${testID}-expand` : "video-player-expand"
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
] })
|
|
457
|
+
]
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
461
|
+
Box,
|
|
462
|
+
{
|
|
463
|
+
role: "group",
|
|
464
|
+
"aria-label": ariaLabel,
|
|
465
|
+
flexDirection: "column",
|
|
466
|
+
justifyContent: "space-between",
|
|
467
|
+
width: "100%",
|
|
468
|
+
gap: theme.spacing.lg,
|
|
469
|
+
testID: testID || "video-player",
|
|
470
|
+
children: [
|
|
471
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box, { flexDirection: "column", gap: HEADER_COPY_GAP, children: [
|
|
472
|
+
hasRewards && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box, { flexDirection: "row", alignItems: "center", gap: theme.spacing.xs, children: rewards?.map((reward) => {
|
|
473
|
+
const rewardTestID = testID ? `${testID}-reward-${reward.key}` : `video-player-reward-${reward.key}`;
|
|
474
|
+
if (isCurrencyReward(reward)) {
|
|
475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
476
|
+
import_xui_b2c_currency_tag.CurrencyTag,
|
|
477
|
+
{
|
|
478
|
+
currency: reward.currency,
|
|
479
|
+
value: reward.value,
|
|
480
|
+
sublabel: reward.sublabel,
|
|
481
|
+
size: "sm",
|
|
482
|
+
themeProductContext,
|
|
483
|
+
testID: rewardTestID
|
|
484
|
+
},
|
|
485
|
+
reward.key
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
const tone = reward.tone ?? "primary";
|
|
489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
490
|
+
import_xui_tag.Tag,
|
|
491
|
+
{
|
|
492
|
+
size: "sm",
|
|
493
|
+
tone,
|
|
494
|
+
iconLeft: reward.icon,
|
|
495
|
+
themeMode: "light",
|
|
496
|
+
themeProductContext,
|
|
497
|
+
style: {
|
|
498
|
+
...reward.icon ? {} : {
|
|
499
|
+
paddingLeft: LABEL_REWARD_PADDING,
|
|
500
|
+
paddingRight: LABEL_REWARD_PADDING
|
|
501
|
+
},
|
|
502
|
+
...tone === "success" ? { backgroundImage: SUCCESS_REWARD_VEIL } : {}
|
|
503
|
+
},
|
|
504
|
+
testID: rewardTestID,
|
|
505
|
+
children: reward.label
|
|
506
|
+
},
|
|
507
|
+
reward.key
|
|
508
|
+
);
|
|
509
|
+
}) }),
|
|
510
|
+
hasCopy && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box, { flexDirection: "column", children: [
|
|
511
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
512
|
+
import_xui_typography.Typography,
|
|
513
|
+
{
|
|
514
|
+
variant: "bodyLgAccent",
|
|
515
|
+
color: copyColor,
|
|
516
|
+
productContext: themeProductContext,
|
|
517
|
+
noWrap: true,
|
|
518
|
+
children: title
|
|
519
|
+
}
|
|
520
|
+
),
|
|
521
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
522
|
+
import_xui_typography.Typography,
|
|
523
|
+
{
|
|
524
|
+
variant: "bodySm",
|
|
525
|
+
color: copyColor,
|
|
526
|
+
productContext: themeProductContext,
|
|
527
|
+
noWrap: true,
|
|
528
|
+
style: { opacity: 0.5 },
|
|
529
|
+
children: description
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
] })
|
|
533
|
+
] }),
|
|
534
|
+
controlBar
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
);
|
|
538
|
+
};
|
|
539
|
+
VideoPlayer.displayName = "VideoPlayer";
|
|
540
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
541
|
+
0 && (module.exports = {
|
|
542
|
+
VideoPlayer,
|
|
543
|
+
formatPlaybackTime
|
|
544
|
+
});
|
|
545
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../src/VideoPlayer.tsx","../../../../foundation/primitives-native/src/Box.tsx"],"sourcesContent":["export { VideoPlayer, formatPlaybackTime } from \"./VideoPlayer\";\n\nexport type {\n VideoPlayerProps,\n VideoPlayerCurrencyReward,\n VideoPlayerLabelReward,\n VideoPlayerRewardChip,\n VideoPlayerRewardTone,\n VideoPlayerView,\n} from \"./types\";\n","import React, { useState } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { IconButton } from \"@xsolla/xui-button\";\nimport { Slider } from \"@xsolla/xui-slider\";\nimport { Tag } from \"@xsolla/xui-tag\";\nimport { CurrencyTag } from \"@xsolla/xui-b2c-currency-tag\";\nimport { Typography } from \"@xsolla/xui-typography\";\nimport {\n ExitFullScreen,\n FullScreen,\n Pause,\n Play,\n VolumeMute,\n VolumeUp,\n} from \"@xsolla/xui-icons-base\";\nimport type {\n VideoPlayerCurrencyReward,\n VideoPlayerProps,\n VideoPlayerRewardChip,\n} from \"./types\";\n\n/** Height of the control bar, per Figma `VideoPlayer` (node 1923:9871). */\nconst CONTROL_BAR_HEIGHT = 64;\n\n/** Padding inside the bar. Figma `VideoPlayerBar` uses 12px, which is not on the spacing scale. */\nconst CONTROL_BAR_PADDING = 12;\n\n/** Gap between the reward row and the copy. Figma container gap is 12px. */\nconst HEADER_COPY_GAP = 12;\n\n/** Gap between mute and expand. Figma `Controls` gap is 12px. */\nconst SIDE_CONTROL_GAP = 12;\n\n/**\n * Light-mode success chips in this spec veil `background/success/primary`\n * (`#95ff80`) with 64% white. `Tag` paints the solid token, so the veil is\n * layered on top. Figma node `1738:8181`.\n */\nconst SUCCESS_REWARD_VEIL =\n \"linear-gradient(rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.64))\";\n\n/**\n * Figma `tag/sm` insets the label by `padding-x` (4) plus the text-container\n * `gap` (2). `Tag` only applies the outer 4px.\n */\nconst LABEL_REWARD_PADDING = 6;\n\nconst isCurrencyReward = (\n reward: VideoPlayerRewardChip\n): reward is VideoPlayerCurrencyReward => reward.kind === \"currency\";\n\n/**\n * Formats a position in seconds as `mm:ss`. Values past an hour keep counting\n * in minutes (`72:30`) rather than growing a third segment, matching the\n * fixed-width clock slot in the design.\n */\nexport const formatPlaybackTime = (seconds: number): string => {\n const safe =\n Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;\n const minutes = Math.floor(safe / 60);\n const remainder = safe % 60;\n\n return `${String(minutes).padStart(2, \"0\")}:${String(remainder).padStart(\n 2,\n \"0\"\n )}`;\n};\n\n/**\n * B2C video player overlay chrome.\n *\n * This is **not** an HTML5 `<video>` wrapper — it renders the chrome that sits\n * on top of a video surface: optional reward chips (`Tag` and `CurrencyTag`),\n * title and description copy, and a control bar with play/pause, a seek\n * slider, the elapsed clock, mute, and expand/collapse.\n *\n * Spec: Figma `VideoPlayer` component set —\n * https://www.figma.com/design/SOOtaT80JAVJf7PKlFnt7Q/B2C-Components%E2%80%A8Xsolla-UI-Toolkit?node-id=1909-5990\n * (node `1923:9871`).\n */\nexport const VideoPlayer: React.FC<VideoPlayerProps> = ({\n view = \"full\",\n title,\n description,\n rewards,\n currentTime,\n duration = 0,\n playing,\n muted,\n expanded,\n disabled = false,\n onPlayPause,\n onMute,\n onExpand,\n onSeek,\n overlayThemeMode = \"dark\",\n \"aria-label\": ariaLabel = \"Video player\",\n testID,\n themeMode,\n themeProductContext = \"b2c\",\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const { theme: overlayTheme } = useResolvedTheme({\n themeMode: overlayThemeMode,\n themeProductContext,\n });\n\n const [internalTime, setInternalTime] = useState(currentTime ?? 0);\n const [internalPlaying, setInternalPlaying] = useState(playing ?? false);\n const [internalMuted, setInternalMuted] = useState(muted ?? false);\n const [internalExpanded, setInternalExpanded] = useState(expanded ?? false);\n\n const resolvedTime = currentTime ?? internalTime;\n const isPlaying = playing ?? internalPlaying;\n const isMuted = muted ?? internalMuted;\n const isExpanded = expanded ?? internalExpanded;\n\n const isCompact = view === \"compact\";\n const isSeekable = duration > 0;\n const overlayContentColor = overlayTheme.colors.content.static.light;\n const copyColor = theme.colors.content.static.light;\n\n const handleSeek = (next: number) => {\n setInternalTime(next);\n onSeek?.(next);\n };\n\n const handlePlayPause = () => {\n const next = !isPlaying;\n setInternalPlaying(next);\n onPlayPause?.(next);\n };\n\n const handleMute = () => {\n const next = !isMuted;\n setInternalMuted(next);\n onMute?.(next);\n };\n\n const handleExpand = () => {\n const next = !isExpanded;\n setInternalExpanded(next);\n onExpand?.(next);\n };\n\n const hasRewards = Boolean(rewards && rewards.length > 0);\n const hasCopy = Boolean(title || description);\n const showHeader = !isCompact && (hasRewards || hasCopy);\n\n const controlBar = (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n width=\"100%\"\n height={CONTROL_BAR_HEIGHT}\n gap={theme.spacing.lg}\n padding={CONTROL_BAR_PADDING}\n borderRadius={theme.shape.cell.borderRadius}\n backgroundColor={overlayTheme.colors.layer.scrim}\n style={{ backdropFilter: \"blur(8px)\", WebkitBackdropFilter: \"blur(8px)\" }}\n testID={testID ? `${testID}-controls` : \"video-player-controls\"}\n >\n <Box\n flex={1}\n minWidth={0}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={theme.spacing.sm}\n >\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"xs\"\n themeMode={overlayThemeMode}\n themeProductContext={themeProductContext}\n disabled={disabled}\n icon={isPlaying ? <Pause /> : <Play />}\n aria-label={isPlaying ? \"Pause\" : \"Play\"}\n aria-pressed={isPlaying}\n onPress={handlePlayPause}\n testID={testID ? `${testID}-play-pause` : \"video-player-play-pause\"}\n />\n\n <Box flex={1} minWidth={0}>\n <Slider\n value={resolvedTime}\n min={0}\n max={isSeekable ? duration : 1}\n step={1}\n size=\"sm\"\n disabled={disabled || !isSeekable}\n onChange={handleSeek}\n aria-label=\"Seek\"\n themeMode={overlayThemeMode}\n themeProductContext={themeProductContext}\n testID={testID ? `${testID}-seek` : \"video-player-seek\"}\n />\n </Box>\n\n <Typography\n variant=\"bodySm\"\n color={overlayContentColor}\n productContext={themeProductContext}\n align=\"right\"\n noWrap\n testID={testID ? `${testID}-time` : \"video-player-time\"}\n >\n {formatPlaybackTime(resolvedTime)}\n </Typography>\n </Box>\n\n <Box flexDirection=\"row\" alignItems=\"center\" gap={SIDE_CONTROL_GAP}>\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"sm\"\n themeMode={overlayThemeMode}\n themeProductContext={themeProductContext}\n disabled={disabled}\n icon={isMuted ? <VolumeMute /> : <VolumeUp />}\n aria-label={isMuted ? \"Unmute\" : \"Mute\"}\n aria-pressed={isMuted}\n onPress={handleMute}\n testID={testID ? `${testID}-mute` : \"video-player-mute\"}\n />\n\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"sm\"\n themeMode={overlayThemeMode}\n themeProductContext={themeProductContext}\n disabled={disabled}\n icon={isExpanded ? <ExitFullScreen /> : <FullScreen />}\n aria-label={isExpanded ? \"Collapse\" : \"Expand\"}\n aria-pressed={isExpanded}\n onPress={handleExpand}\n testID={testID ? `${testID}-expand` : \"video-player-expand\"}\n />\n </Box>\n </Box>\n );\n\n return (\n <Box\n role=\"group\"\n aria-label={ariaLabel}\n flexDirection=\"column\"\n justifyContent=\"space-between\"\n width=\"100%\"\n gap={theme.spacing.lg}\n testID={testID || \"video-player\"}\n >\n {showHeader && (\n <Box flexDirection=\"column\" gap={HEADER_COPY_GAP}>\n {hasRewards && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={theme.spacing.xs}>\n {rewards?.map((reward) => {\n const rewardTestID = testID\n ? `${testID}-reward-${reward.key}`\n : `video-player-reward-${reward.key}`;\n\n if (isCurrencyReward(reward)) {\n return (\n <CurrencyTag\n key={reward.key}\n currency={reward.currency}\n value={reward.value}\n sublabel={reward.sublabel}\n size=\"sm\"\n themeProductContext={themeProductContext}\n testID={rewardTestID}\n />\n );\n }\n\n const tone = reward.tone ?? \"primary\";\n\n return (\n <Tag\n key={reward.key}\n size=\"sm\"\n tone={tone}\n iconLeft={reward.icon}\n /*\n * Reward chips are bound to the Light token set in Figma so\n * they keep their contrast against the video behind them.\n */\n themeMode=\"light\"\n themeProductContext={themeProductContext}\n style={{\n ...(reward.icon\n ? {}\n : {\n paddingLeft: LABEL_REWARD_PADDING,\n paddingRight: LABEL_REWARD_PADDING,\n }),\n ...(tone === \"success\"\n ? { backgroundImage: SUCCESS_REWARD_VEIL }\n : {}),\n }}\n testID={rewardTestID}\n >\n {reward.label}\n </Tag>\n );\n })}\n </Box>\n )}\n\n {hasCopy && (\n <Box flexDirection=\"column\">\n {title && (\n <Typography\n variant=\"bodyLgAccent\"\n color={copyColor}\n productContext={themeProductContext}\n noWrap\n >\n {title}\n </Typography>\n )}\n\n {description && (\n <Typography\n variant=\"bodySm\"\n color={copyColor}\n productContext={themeProductContext}\n noWrap\n style={{ opacity: 0.5 }}\n >\n {description}\n </Typography>\n )}\n </Box>\n )}\n </Box>\n )}\n\n {controlBar}\n </Box>\n );\n};\n\nVideoPlayer.displayName = \"VideoPlayer\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n AccessibilityRole,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleToAccessibilityRole: Record<string, AccessibilityRole> = {\n button: \"button\",\n link: \"link\",\n img: \"image\",\n image: \"image\",\n summary: \"summary\",\n switch: \"switch\",\n checkbox: \"checkbox\",\n radio: \"radio\",\n heading: \"header\",\n text: \"text\",\n search: \"search\",\n alert: \"alert\",\n none: \"none\",\n presentation: \"none\",\n progressbar: \"progressbar\",\n scrollbar: \"scrollbar\",\n adjustable: \"adjustable\",\n tab: \"tab\",\n menu: \"menu\",\n menuitem: \"menuitem\",\n list: \"list\",\n timer: \"timer\",\n};\n\n/** RN ViewStyle.gap is typed as number (Yoga gap), not DimensionValue. */\nconst toGapValue = (gap: number | string | undefined): number | undefined => {\n if (gap === undefined) return undefined;\n if (typeof gap === \"number\") return gap;\n const pxMatch = /^(\\d+(?:\\.\\d+)?)px$/.exec(gap);\n if (pxMatch) return Number(pxMatch[1]);\n const asNumber = Number(gap);\n return Number.isFinite(asNumber) ? asNumber : undefined;\n};\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n flexWrap,\n alignItems,\n justifyContent,\n alignSelf,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n flexShrink,\n gap,\n overflow,\n opacity,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n disabled,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n opacity: opacity ?? (disabled ? 0.5 : undefined),\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n flexWrap,\n alignItems,\n justifyContent,\n alignSelf,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n flexShrink,\n gap: toGapValue(gap),\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Map web a11y props; drop the rest of the web-only attributes before\n // spreading onto RN hosts (unknown props warn at runtime).\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n className,\n \"data-testid\": _dataTestId,\n cursor: _cursor,\n type: _type,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n const accessibilityRole =\n (typeof role === \"string\" && roleToAccessibilityRole[role]) ||\n (as === \"button\" ? \"button\" : undefined);\n const isDisabled = Boolean(disabled || ariaDisabled);\n const accessibilityState = {\n disabled: isDisabled || undefined,\n busy: Boolean(ariaBusy) || undefined,\n };\n const accessibilityLiveRegion =\n ariaLive === \"polite\" || ariaLive === \"assertive\" ? ariaLive : undefined;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n accessibilityLabel={typeof ariaLabel === \"string\" ? ariaLabel : alt}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n // Prefer Pressable whenever the node is interactive or explicitly a button,\n // so disabled / aria-disabled controls stay in the a11y tree as buttons.\n if (onPress || as === \"button\") {\n return (\n <Pressable\n onPress={!isDisabled && onPress ? onPress : undefined}\n disabled={isDisabled}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={\n typeof ariaLabel === \"string\" ? ariaLabel : undefined\n }\n accessibilityState={accessibilityState}\n accessibilityLiveRegion={accessibilityLiveRegion}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={typeof ariaLabel === \"string\" ? ariaLabel : undefined}\n accessibilityState={accessibilityState}\n accessibilityLiveRegion={accessibilityLiveRegion}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAgC;;;ACChC,0BASO;AAwMD;AArMN,IAAM,0BAA6D;AAAA,EACjE,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,cAAc;AAAA,EACd,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AACT;AAGA,IAAM,aAAa,CAAC,QAAyD;AAC3E,MAAI,QAAQ,OAAW,QAAO;AAC9B,MAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,QAAM,UAAU,sBAAsB,KAAK,GAAG;AAC9C,MAAI,QAAS,QAAO,OAAO,QAAQ,CAAC,CAAC;AACrC,QAAM,WAAW,OAAO,GAAG;AAC3B,SAAO,OAAO,SAAS,QAAQ,IAAI,WAAW;AAChD;AAEO,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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