@xsolla/xui-b2c-video-player 0.218.0 → 0.219.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/native/index.js +3 -0
- package/native/index.js.map +1 -1
- package/native/index.mjs +3 -0
- package/native/index.mjs.map +1 -1
- package/package.json +9 -9
- package/web/index.js +6 -2
- package/web/index.js.map +1 -1
- package/web/index.mjs +6 -2
- package/web/index.mjs.map +1 -1
package/native/index.js
CHANGED
|
@@ -63,6 +63,7 @@ var toGapValue = (gap) => {
|
|
|
63
63
|
const asNumber = Number(gap);
|
|
64
64
|
return Number.isFinite(asNumber) ? asNumber : void 0;
|
|
65
65
|
};
|
|
66
|
+
var toNativeDisplay = (display) => display === "none" ? "none" : void 0;
|
|
66
67
|
var Box = ({
|
|
67
68
|
children,
|
|
68
69
|
onPress,
|
|
@@ -94,6 +95,7 @@ var Box = ({
|
|
|
94
95
|
marginBottom,
|
|
95
96
|
marginLeft,
|
|
96
97
|
marginRight,
|
|
98
|
+
display,
|
|
97
99
|
flexDirection,
|
|
98
100
|
flexWrap,
|
|
99
101
|
alignItems,
|
|
@@ -157,6 +159,7 @@ var Box = ({
|
|
|
157
159
|
marginBottom,
|
|
158
160
|
marginLeft,
|
|
159
161
|
marginRight,
|
|
162
|
+
display: toNativeDisplay(display),
|
|
160
163
|
flexDirection,
|
|
161
164
|
flexWrap,
|
|
162
165
|
alignItems,
|
package/native/index.js.map
CHANGED
|
@@ -1 +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,E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C,SAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,gBAAgB;AAAA,gBAChB,QAAM;AAAA,gBACN,OAAO,EAAE,SAAS,IAAI;AAAA,gBAErB;AAAA;AAAA,YACH;AAAA,aAEJ;AAAA,WAEJ;AAAA,QAGD;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;","names":["import_jsx_runtime"]}
|
|
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\n/**\n * Yoga has no inline formatting context, so RN's ViewStyle.display only\n * accepts \"flex\" | \"none\". Every inline-ish web value collapses to a plain\n * flex container — the box already fills only its content on native, which is\n * what those callers wanted on web anyway. Returning undefined (rather than\n * \"flex\") leaves RN's own default in place.\n */\nconst toNativeDisplay = (\n display: BoxProps[\"display\"]\n): ViewStyle[\"display\"] => (display === \"none\" ? \"none\" : undefined);\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 display,\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 display: toNativeDisplay(display),\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;AAqND;AAlNN,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;AASA,IAAM,kBAAkB,CACtB,YAC0B,YAAY,SAAS,SAAS;AAEnD,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,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,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,YAAY,WAAW,MAAM;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,gBAAgB,OAAO;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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(gap);
|
|
41
41
|
return Number.isFinite(asNumber) ? asNumber : void 0;
|
|
42
42
|
};
|
|
43
|
+
var toNativeDisplay = (display) => display === "none" ? "none" : void 0;
|
|
43
44
|
var Box = ({
|
|
44
45
|
children,
|
|
45
46
|
onPress,
|
|
@@ -71,6 +72,7 @@ var Box = ({
|
|
|
71
72
|
marginBottom,
|
|
72
73
|
marginLeft,
|
|
73
74
|
marginRight,
|
|
75
|
+
display,
|
|
74
76
|
flexDirection,
|
|
75
77
|
flexWrap,
|
|
76
78
|
alignItems,
|
|
@@ -134,6 +136,7 @@ var Box = ({
|
|
|
134
136
|
marginBottom,
|
|
135
137
|
marginLeft,
|
|
136
138
|
marginRight,
|
|
139
|
+
display: toNativeDisplay(display),
|
|
137
140
|
flexDirection,
|
|
138
141
|
flexWrap,
|
|
139
142
|
alignItems,
|
package/native/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/VideoPlayer.tsx","../../../../foundation/primitives-native/src/Box.tsx"],"sourcesContent":["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,SAAgB,gBAAgB;;;ACChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAMK;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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AC5B,qBACE,gBAAAA;AAAA,gBAAC;AAAA;AAAA,kBAEC,UAAU,OAAO;AAAA,kBACjB,OAAO,OAAO;AAAA,kBACd,UAAU,OAAO;AAAA,kBACjB,MAAK;AAAA,kBACL;AAAA,kBACA,QAAQ;AAAA;AAAA,gBANH,OAAO;AAAA,cAOd;AAAA,YAEJ;AAEA,kBAAM,OAAO,OAAO,QAAQ;AAE5B,mBACE,gBAAAA;AAAA,cAAC;AAAA;AAAA,gBAEC,MAAK;AAAA,gBACL;AAAA,gBACA,UAAU,OAAO;AAAA,gBAKjB,WAAU;AAAA,gBACV;AAAA,gBACA,OAAO;AAAA,kBACL,GAAI,OAAO,OACP,CAAC,IACD;AAAA,oBACE,aAAa;AAAA,oBACb,cAAc;AAAA,kBAChB;AAAA,kBACJ,GAAI,SAAS,YACT,EAAE,iBAAiB,oBAAoB,IACvC,CAAC;AAAA,gBACP;AAAA,gBACA,QAAQ;AAAA,gBAEP,iBAAO;AAAA;AAAA,cAvBH,OAAO;AAAA,YAwBd;AAAA,UAEJ,CAAC,GACH;AAAA,UAGD,WACC,qBAAC,OAAI,eAAc,UAChB;AAAA,qBACC,gBAAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,gBAAgB;AAAA,gBAChB,QAAM;AAAA,gBAEL;AAAA;AAAA,YACH;AAAA,YAGD,eACC,gBAAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,gBAAgB;AAAA,gBAChB,QAAM;AAAA,gBACN,OAAO,EAAE,SAAS,IAAI;AAAA,gBAErB;AAAA;AAAA,YACH;AAAA,aAEJ;AAAA,WAEJ;AAAA,QAGD;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;","names":["jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/VideoPlayer.tsx","../../../../foundation/primitives-native/src/Box.tsx"],"sourcesContent":["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\n/**\n * Yoga has no inline formatting context, so RN's ViewStyle.display only\n * accepts \"flex\" | \"none\". Every inline-ish web value collapses to a plain\n * flex container — the box already fills only its content on native, which is\n * what those callers wanted on web anyway. Returning undefined (rather than\n * \"flex\") leaves RN's own default in place.\n */\nconst toNativeDisplay = (\n display: BoxProps[\"display\"]\n): ViewStyle[\"display\"] => (display === \"none\" ? \"none\" : undefined);\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 display,\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 display: toNativeDisplay(display),\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,SAAgB,gBAAgB;;;ACChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AAqND;AAlNN,IAAM,0BAA6D;AAAA,EACjE,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,SAAS;A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C,MAAK;AAAA,gBACL;AAAA,gBACA,UAAU,OAAO;AAAA,gBAKjB,WAAU;AAAA,gBACV;AAAA,gBACA,OAAO;AAAA,kBACL,GAAI,OAAO,OACP,CAAC,IACD;AAAA,oBACE,aAAa;AAAA,oBACb,cAAc;AAAA,kBAChB;AAAA,kBACJ,GAAI,SAAS,YACT,EAAE,iBAAiB,oBAAoB,IACvC,CAAC;AAAA,gBACP;AAAA,gBACA,QAAQ;AAAA,gBAEP,iBAAO;AAAA;AAAA,cAvBH,OAAO;AAAA,YAwBd;AAAA,UAEJ,CAAC,GACH;AAAA,UAGD,WACC,qBAAC,OAAI,eAAc,UAChB;AAAA,qBACC,gBAAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,gBAAgB;AAAA,gBAChB,QAAM;AAAA,gBAEL;AAAA;AAAA,YACH;AAAA,YAGD,eACC,gBAAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,gBAAgB;AAAA,gBAChB,QAAM;AAAA,gBACN,OAAO,EAAE,SAAS,IAAI;AAAA,gBAErB;AAAA;AAAA,YACH;AAAA,aAEJ;AAAA,WAEJ;AAAA,QAGD;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;","names":["jsx"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-b2c-video-player",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.219.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"test:coverage": "vitest run --coverage"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xsolla/xui-b2c-currency-tag": "0.
|
|
17
|
-
"@xsolla/xui-button": "0.
|
|
18
|
-
"@xsolla/xui-core": "0.
|
|
19
|
-
"@xsolla/xui-icons-base": "0.
|
|
20
|
-
"@xsolla/xui-primitives-core": "0.
|
|
21
|
-
"@xsolla/xui-slider": "0.
|
|
22
|
-
"@xsolla/xui-tag": "0.
|
|
23
|
-
"@xsolla/xui-typography": "0.
|
|
16
|
+
"@xsolla/xui-b2c-currency-tag": "0.219.0",
|
|
17
|
+
"@xsolla/xui-button": "0.219.0",
|
|
18
|
+
"@xsolla/xui-core": "0.219.0",
|
|
19
|
+
"@xsolla/xui-icons-base": "0.219.0",
|
|
20
|
+
"@xsolla/xui-primitives-core": "0.219.0",
|
|
21
|
+
"@xsolla/xui-slider": "0.219.0",
|
|
22
|
+
"@xsolla/xui-tag": "0.219.0",
|
|
23
|
+
"@xsolla/xui-typography": "0.219.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": ">=16.8.0",
|
package/web/index.js
CHANGED
|
@@ -86,6 +86,10 @@ var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
|
|
|
86
86
|
"fontWeight",
|
|
87
87
|
"fontFamily",
|
|
88
88
|
"textDecoration",
|
|
89
|
+
// `display` is a presentation attribute on SVG, so isPropValid lets it
|
|
90
|
+
// through — but Box consumes it purely as CSS. Without this it lands on the
|
|
91
|
+
// DOM node as a bogus `display="inline-flex"` attribute.
|
|
92
|
+
"display",
|
|
89
93
|
// Cross-platform layout prop that Text consumes as CSS, never as an
|
|
90
94
|
// attribute. Pinned explicitly because it is now spread into the styled
|
|
91
95
|
// component rather than destructured away before it can reach the DOM.
|
|
@@ -120,7 +124,7 @@ function createFilteredElement(defaultTag) {
|
|
|
120
124
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
121
125
|
var FilteredDiv = createFilteredElement("div");
|
|
122
126
|
var StyledBox = (0, import_styled_components.default)(FilteredDiv)`
|
|
123
|
-
display: flex;
|
|
127
|
+
display: ${(props) => props.display || "flex"};
|
|
124
128
|
box-sizing: border-box;
|
|
125
129
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
126
130
|
border-color: ${(props) => props.borderColor || "transparent"};
|
|
@@ -256,7 +260,7 @@ var Box = import_react2.default.forwardRef(
|
|
|
256
260
|
onLoad,
|
|
257
261
|
"data-testid": dataTestId || testID,
|
|
258
262
|
style: {
|
|
259
|
-
display: "block",
|
|
263
|
+
display: props.display || "block",
|
|
260
264
|
objectFit: "cover",
|
|
261
265
|
width: typeof props.width === "number" ? `${props.width}px` : props.width,
|
|
262
266
|
height: typeof props.height === "number" ? `${props.height}px` : props.height,
|
package/web/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../src/VideoPlayer.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js"],"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 styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n /* Only emit overflow-x/y when explicitly set. Defaulting them to\n visible after overflow would override the shorthand and break\n clipping (e.g. OtherCard bottom-right promo image). */\n overflow: ${(props) => props.overflow || \"visible\"};\n ${(props) =>\n props.overflowX != null ? `overflow-x: ${props.overflowX};` : \"\"}\n ${(props) =>\n props.overflowY != null ? `overflow-y: ${props.overflowY};` : \"\"}\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) =>\n props.opacity != null ? props.opacity : props.disabled ? 0.5 : 1};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n /* \\`background\\` is emitted before \\`background-color\\` so a caller passing\n both still gets backgroundColor as the winner. Use the shorthand for a\n layered fill (e.g. an overlay tint over a resting surface colour), which\n a single background-color cannot express. */\n &:hover {\n ${(props) =>\n props.hoverStyle?.background &&\n `background: ${props.hoverStyle.background};`}\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.background &&\n `background: ${props.pressStyle.background};`}\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\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 \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n onError={onError}\n onLoad={onLoad}\n data-testid={dataTestId || testID}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n ...props.style,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"opacity\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n // Cross-platform layout prop that Text consumes as CSS, never as an\n // attribute. Pinned explicitly because it is now spread into the styled\n // component rather than destructured away before it can reach the DOM.\n \"numberOfLines\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AAA,YAGD,eACC;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,gBAAgB;AAAA,gBAChB,QAAM;AAAA,gBACN,OAAO,EAAE,SAAS,IAAI;AAAA,gBAErB;AAAA;AAAA,YACH;AAAA,aAEJ;AAAA,WAEJ;AAAA,QAGD;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;","names":["import_react","import_react","React","Tag","styled","React","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../src/VideoPlayer.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js"],"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 styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: ${(props) => props.display || \"flex\"};\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n /* Only emit overflow-x/y when explicitly set. Defaulting them to\n visible after overflow would override the shorthand and break\n clipping (e.g. OtherCard bottom-right promo image). */\n overflow: ${(props) => props.overflow || \"visible\"};\n ${(props) =>\n props.overflowX != null ? `overflow-x: ${props.overflowX};` : \"\"}\n ${(props) =>\n props.overflowY != null ? `overflow-y: ${props.overflowY};` : \"\"}\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) =>\n props.opacity != null ? props.opacity : props.disabled ? 0.5 : 1};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n /* \\`background\\` is emitted before \\`background-color\\` so a caller passing\n both still gets backgroundColor as the winner. Use the shorthand for a\n layered fill (e.g. an overlay tint over a resting surface colour), which\n a single background-color cannot express. */\n &:hover {\n ${(props) =>\n props.hoverStyle?.background &&\n `background: ${props.hoverStyle.background};`}\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.background &&\n `background: ${props.pressStyle.background};`}\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\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 \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n onError={onError}\n onLoad={onLoad}\n data-testid={dataTestId || testID}\n style={{\n display: props.display || \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n ...props.style,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"opacity\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n // `display` is a presentation attribute on SVG, so isPropValid lets it\n // through — but Box consumes it purely as CSS. Without this it lands on the\n // DOM node as a bogus `display=\"inline-flex\"` attribute.\n \"display\",\n // Cross-platform layout prop that Text consumes as CSS, never as an\n // attribute. Pinned explicitly because it is now spread into the styled\n // component rather than destructured away before it can reach the DOM.\n \"numberOfLines\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA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AA,gBACC,SAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,gBAAgB;AAAA,gBAChB,QAAM;AAAA,gBAEL;AAAA;AAAA,YACH;AAAA,YAGD,eACC;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,gBAAgB;AAAA,gBAChB,QAAM;AAAA,gBACN,OAAO,EAAE,SAAS,IAAI;AAAA,gBAErB;AAAA;AAAA,YACH;AAAA,aAEJ;AAAA,WAEJ;AAAA,QAGD;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;","names":["import_react","import_react","React","Tag","styled","React","import_jsx_runtime"]}
|
package/web/index.mjs
CHANGED
|
@@ -49,6 +49,10 @@ var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
|
|
|
49
49
|
"fontWeight",
|
|
50
50
|
"fontFamily",
|
|
51
51
|
"textDecoration",
|
|
52
|
+
// `display` is a presentation attribute on SVG, so isPropValid lets it
|
|
53
|
+
// through — but Box consumes it purely as CSS. Without this it lands on the
|
|
54
|
+
// DOM node as a bogus `display="inline-flex"` attribute.
|
|
55
|
+
"display",
|
|
52
56
|
// Cross-platform layout prop that Text consumes as CSS, never as an
|
|
53
57
|
// attribute. Pinned explicitly because it is now spread into the styled
|
|
54
58
|
// component rather than destructured away before it can reach the DOM.
|
|
@@ -83,7 +87,7 @@ function createFilteredElement(defaultTag) {
|
|
|
83
87
|
import { jsx } from "react/jsx-runtime";
|
|
84
88
|
var FilteredDiv = createFilteredElement("div");
|
|
85
89
|
var StyledBox = styled(FilteredDiv)`
|
|
86
|
-
display: flex;
|
|
90
|
+
display: ${(props) => props.display || "flex"};
|
|
87
91
|
box-sizing: border-box;
|
|
88
92
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
89
93
|
border-color: ${(props) => props.borderColor || "transparent"};
|
|
@@ -219,7 +223,7 @@ var Box = React2.forwardRef(
|
|
|
219
223
|
onLoad,
|
|
220
224
|
"data-testid": dataTestId || testID,
|
|
221
225
|
style: {
|
|
222
|
-
display: "block",
|
|
226
|
+
display: props.display || "block",
|
|
223
227
|
objectFit: "cover",
|
|
224
228
|
width: typeof props.width === "number" ? `${props.width}px` : props.width,
|
|
225
229
|
height: typeof props.height === "number" ? `${props.height}px` : props.height,
|
package/web/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/VideoPlayer.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js"],"sourcesContent":["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 styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n /* Only emit overflow-x/y when explicitly set. Defaulting them to\n visible after overflow would override the shorthand and break\n clipping (e.g. OtherCard bottom-right promo image). */\n overflow: ${(props) => props.overflow || \"visible\"};\n ${(props) =>\n props.overflowX != null ? `overflow-x: ${props.overflowX};` : \"\"}\n ${(props) =>\n props.overflowY != null ? `overflow-y: ${props.overflowY};` : \"\"}\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) =>\n props.opacity != null ? props.opacity : props.disabled ? 0.5 : 1};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n /* \\`background\\` is emitted before \\`background-color\\` so a caller passing\n both still gets backgroundColor as the winner. Use the shorthand for a\n layered fill (e.g. an overlay tint over a resting surface colour), which\n a single background-color cannot express. */\n &:hover {\n ${(props) =>\n props.hoverStyle?.background &&\n `background: ${props.hoverStyle.background};`}\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.background &&\n `background: ${props.pressStyle.background};`}\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\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 \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n onError={onError}\n onLoad={onLoad}\n data-testid={dataTestId || testID}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n ...props.style,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"opacity\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n // Cross-platform layout prop that Text consumes as CSS, never as an\n // attribute. Pinned explicitly because it is now spread into the styled\n // component rather than destructured away before it can reach the DOM.\n \"numberOfLines\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n"],"mappings":";AAAA,SAAgB,gBAAgB;;;ACAhC,OAAOA,YAAW;AAClB,OAAO,YAAY;;;ACDnB,OAAO,WAAW;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AAEA,IAAO,sBAAQ;;;ACNf,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,EAAQ,SAAU,MAAM;AAClC,WAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KA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AAA,EACH;AAEJ;AAEA,YAAY,cAAc;","names":["React","Tag","React","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/VideoPlayer.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js"],"sourcesContent":["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 styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: ${(props) => props.display || \"flex\"};\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n /* Only emit overflow-x/y when explicitly set. Defaulting them to\n visible after overflow would override the shorthand and break\n clipping (e.g. OtherCard bottom-right promo image). */\n overflow: ${(props) => props.overflow || \"visible\"};\n ${(props) =>\n props.overflowX != null ? `overflow-x: ${props.overflowX};` : \"\"}\n ${(props) =>\n props.overflowY != null ? `overflow-y: ${props.overflowY};` : \"\"}\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) =>\n props.opacity != null ? props.opacity : props.disabled ? 0.5 : 1};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n /* \\`background\\` is emitted before \\`background-color\\` so a caller passing\n both still gets backgroundColor as the winner. Use the shorthand for a\n layered fill (e.g. an overlay tint over a resting surface colour), which\n a single background-color cannot express. */\n &:hover {\n ${(props) =>\n props.hoverStyle?.background &&\n `background: ${props.hoverStyle.background};`}\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.background &&\n `background: ${props.pressStyle.background};`}\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\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 \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n onError={onError}\n onLoad={onLoad}\n data-testid={dataTestId || testID}\n style={{\n display: props.display || \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n ...props.style,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"opacity\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n // `display` is a presentation attribute on SVG, so isPropValid lets it\n // through — but Box consumes it purely as CSS. Without this it lands on the\n // DOM node as a bogus `display=\"inline-flex\"` attribute.\n \"display\",\n // Cross-platform layout prop that Text consumes as CSS, never as an\n // attribute. Pinned explicitly because it is now spread into the styled\n // component rather than destructured away before it can reach the DOM.\n \"numberOfLines\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n"],"mappings":";AAAA,SAAgB,gBAAgB;;;ACAhC,OAAOA,YAAW;AAClB,OAAO,YAAY;;;ACDnB,OAAO,WAAW;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AAEA,IAAO,sBAAQ;;;ACNf,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,EAAQ,SAAU,MAAM;AAClC,WAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KAAK,WAAW,CAAC,MAAM,OAEvB,KAAK,WAAW,CAA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