@livepeer-frameworks/player-react 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -9
- package/dist/cjs/_virtual/_rollupPluginBabelHelpers.js +359 -0
- package/dist/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/dist/cjs/assets/logomark.svg.js +8 -0
- package/dist/cjs/assets/logomark.svg.js.map +1 -0
- package/dist/cjs/components/DevModePanel.js +826 -0
- package/dist/cjs/components/DevModePanel.js.map +1 -0
- package/dist/cjs/components/DvdLogo.js +200 -0
- package/dist/cjs/components/DvdLogo.js.map +1 -0
- package/dist/cjs/components/Icons.js +439 -0
- package/dist/cjs/components/Icons.js.map +1 -0
- package/dist/cjs/components/IdleScreen.js +587 -0
- package/dist/cjs/components/IdleScreen.js.map +1 -0
- package/dist/cjs/components/LoadingScreen.js +523 -0
- package/dist/cjs/components/LoadingScreen.js.map +1 -0
- package/dist/cjs/components/Player.js +420 -0
- package/dist/cjs/components/Player.js.map +1 -0
- package/dist/cjs/components/PlayerControls.js +798 -0
- package/dist/cjs/components/PlayerControls.js.map +1 -0
- package/dist/cjs/components/PlayerErrorBoundary.js +80 -0
- package/dist/cjs/components/PlayerErrorBoundary.js.map +1 -0
- package/dist/cjs/components/SeekBar.js +253 -0
- package/dist/cjs/components/SeekBar.js.map +1 -0
- package/dist/cjs/components/SkipIndicator.js +92 -0
- package/dist/cjs/components/SkipIndicator.js.map +1 -0
- package/dist/cjs/components/SpeedIndicator.js +43 -0
- package/dist/cjs/components/SpeedIndicator.js.map +1 -0
- package/dist/cjs/components/StatsPanel.js +202 -0
- package/dist/cjs/components/StatsPanel.js.map +1 -0
- package/dist/cjs/components/StreamStateOverlay.js +229 -0
- package/dist/cjs/components/StreamStateOverlay.js.map +1 -0
- package/dist/cjs/components/ThumbnailOverlay.js +86 -0
- package/dist/cjs/components/ThumbnailOverlay.js.map +1 -0
- package/dist/cjs/components/TitleOverlay.js +32 -0
- package/dist/cjs/components/TitleOverlay.js.map +1 -0
- package/dist/cjs/context/PlayerContext.js +46 -0
- package/dist/cjs/context/PlayerContext.js.map +1 -0
- package/dist/cjs/hooks/useMetaTrack.js +165 -0
- package/dist/cjs/hooks/useMetaTrack.js.map +1 -0
- package/dist/cjs/hooks/usePlaybackQuality.js +131 -0
- package/dist/cjs/hooks/usePlaybackQuality.js.map +1 -0
- package/dist/cjs/hooks/usePlayerController.js +518 -0
- package/dist/cjs/hooks/usePlayerController.js.map +1 -0
- package/dist/cjs/hooks/usePlayerSelection.js +90 -0
- package/dist/cjs/hooks/usePlayerSelection.js.map +1 -0
- package/dist/cjs/hooks/useStreamState.js +360 -0
- package/dist/cjs/hooks/useStreamState.js.map +1 -0
- package/dist/cjs/hooks/useTelemetry.js +120 -0
- package/dist/cjs/hooks/useTelemetry.js.map +1 -0
- package/dist/cjs/hooks/useViewerEndpoints.js +222 -0
- package/dist/cjs/hooks/useViewerEndpoints.js.map +1 -0
- package/dist/cjs/index.js +97 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/ui/badge.js +34 -0
- package/dist/cjs/ui/badge.js.map +1 -0
- package/dist/cjs/ui/button.js +74 -0
- package/dist/cjs/ui/button.js.map +1 -0
- package/dist/cjs/ui/context-menu.js +163 -0
- package/dist/cjs/ui/context-menu.js.map +1 -0
- package/dist/cjs/ui/slider.js +60 -0
- package/dist/cjs/ui/slider.js.map +1 -0
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +329 -0
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/dist/esm/assets/logomark.svg.js +4 -0
- package/dist/esm/assets/logomark.svg.js.map +1 -0
- package/dist/esm/components/DevModePanel.js +822 -0
- package/dist/esm/components/DevModePanel.js.map +1 -0
- package/dist/esm/components/DvdLogo.js +196 -0
- package/dist/esm/components/DvdLogo.js.map +1 -0
- package/dist/esm/components/Icons.js +421 -0
- package/dist/esm/components/Icons.js.map +1 -0
- package/dist/esm/components/IdleScreen.js +582 -0
- package/dist/esm/components/IdleScreen.js.map +1 -0
- package/dist/esm/components/LoadingScreen.js +519 -0
- package/dist/esm/components/LoadingScreen.js.map +1 -0
- package/dist/esm/components/Player.js +416 -0
- package/dist/esm/components/Player.js.map +1 -0
- package/dist/esm/components/PlayerControls.js +794 -0
- package/dist/esm/components/PlayerControls.js.map +1 -0
- package/dist/esm/components/PlayerErrorBoundary.js +76 -0
- package/dist/esm/components/PlayerErrorBoundary.js.map +1 -0
- package/dist/esm/components/SeekBar.js +249 -0
- package/dist/esm/components/SeekBar.js.map +1 -0
- package/dist/esm/components/SkipIndicator.js +88 -0
- package/dist/esm/components/SkipIndicator.js.map +1 -0
- package/dist/esm/components/SpeedIndicator.js +39 -0
- package/dist/esm/components/SpeedIndicator.js.map +1 -0
- package/dist/esm/components/StatsPanel.js +198 -0
- package/dist/esm/components/StatsPanel.js.map +1 -0
- package/dist/esm/components/StreamStateOverlay.js +224 -0
- package/dist/esm/components/StreamStateOverlay.js.map +1 -0
- package/dist/esm/components/ThumbnailOverlay.js +82 -0
- package/dist/esm/components/ThumbnailOverlay.js.map +1 -0
- package/dist/esm/components/TitleOverlay.js +28 -0
- package/dist/esm/components/TitleOverlay.js.map +1 -0
- package/dist/esm/context/PlayerContext.js +41 -0
- package/dist/esm/context/PlayerContext.js.map +1 -0
- package/dist/esm/hooks/useMetaTrack.js +163 -0
- package/dist/esm/hooks/useMetaTrack.js.map +1 -0
- package/dist/esm/hooks/usePlaybackQuality.js +129 -0
- package/dist/esm/hooks/usePlaybackQuality.js.map +1 -0
- package/dist/esm/hooks/usePlayerController.js +516 -0
- package/dist/esm/hooks/usePlayerController.js.map +1 -0
- package/dist/esm/hooks/usePlayerSelection.js +88 -0
- package/dist/esm/hooks/usePlayerSelection.js.map +1 -0
- package/dist/esm/hooks/useStreamState.js +358 -0
- package/dist/esm/hooks/useStreamState.js.map +1 -0
- package/dist/esm/hooks/useTelemetry.js +118 -0
- package/dist/esm/hooks/useTelemetry.js.map +1 -0
- package/dist/esm/hooks/useViewerEndpoints.js +220 -0
- package/dist/esm/hooks/useViewerEndpoints.js.map +1 -0
- package/dist/esm/index.js +23 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ui/badge.js +31 -0
- package/dist/esm/ui/badge.js.map +1 -0
- package/dist/esm/ui/button.js +52 -0
- package/dist/esm/ui/button.js.map +1 -0
- package/dist/esm/ui/context-menu.js +132 -0
- package/dist/esm/ui/context-menu.js.map +1 -0
- package/dist/esm/ui/slider.js +38 -0
- package/dist/esm/ui/slider.js.map +1 -0
- package/dist/types/components/DvdLogo.d.ts +1 -1
- package/dist/types/components/Icons.d.ts +1 -1
- package/dist/types/components/Player.d.ts +1 -1
- package/dist/types/components/PlayerErrorBoundary.d.ts +2 -1
- package/dist/types/components/StreamStateOverlay.d.ts +2 -2
- package/dist/types/components/SubtitleRenderer.d.ts +2 -2
- package/dist/types/context/PlayerContext.d.ts +2 -2
- package/dist/types/context/index.d.ts +2 -2
- package/dist/types/hooks/useMetaTrack.d.ts +3 -3
- package/dist/types/hooks/usePlaybackQuality.d.ts +2 -2
- package/dist/types/hooks/usePlayerController.d.ts +26 -3
- package/dist/types/hooks/usePlayerSelection.d.ts +1 -1
- package/dist/types/hooks/useStreamState.d.ts +1 -1
- package/dist/types/hooks/useTelemetry.d.ts +1 -1
- package/dist/types/hooks/useViewerEndpoints.d.ts +3 -3
- package/dist/types/index.d.ts +28 -28
- package/dist/types/types.d.ts +3 -3
- package/dist/types/ui/select.d.ts +1 -1
- package/package.json +22 -14
- package/src/components/DevModePanel.tsx +244 -143
- package/src/components/DvdLogo.tsx +1 -1
- package/src/components/Icons.tsx +105 -25
- package/src/components/IdleScreen.tsx +262 -128
- package/src/components/LoadingScreen.tsx +169 -151
- package/src/components/LogoOverlay.tsx +3 -6
- package/src/components/Player.tsx +126 -59
- package/src/components/PlayerControls.tsx +384 -272
- package/src/components/PlayerErrorBoundary.tsx +7 -13
- package/src/components/SeekBar.tsx +96 -88
- package/src/components/SkipIndicator.tsx +2 -12
- package/src/components/SpeedIndicator.tsx +2 -11
- package/src/components/StatsPanel.tsx +31 -22
- package/src/components/StreamStateOverlay.tsx +105 -49
- package/src/components/SubtitleRenderer.tsx +29 -29
- package/src/components/ThumbnailOverlay.tsx +5 -6
- package/src/components/TitleOverlay.tsx +2 -8
- package/src/context/PlayerContext.tsx +4 -8
- package/src/context/index.ts +3 -3
- package/src/hooks/useMetaTrack.ts +27 -27
- package/src/hooks/usePlaybackQuality.ts +3 -3
- package/src/hooks/usePlayerController.ts +246 -138
- package/src/hooks/usePlayerSelection.ts +6 -6
- package/src/hooks/useStreamState.ts +51 -56
- package/src/hooks/useTelemetry.ts +18 -3
- package/src/hooks/useViewerEndpoints.ts +34 -23
- package/src/index.tsx +36 -28
- package/src/types.ts +8 -8
- package/src/ui/badge.tsx +6 -5
- package/src/ui/button.tsx +9 -8
- package/src/ui/context-menu.tsx +42 -61
- package/src/ui/select.tsx +13 -7
- package/src/ui/slider.tsx +18 -29
- package/dist/types/components/players/DashJsPlayer.d.ts +0 -18
- package/dist/types/components/players/HlsJsPlayer.d.ts +0 -18
- package/dist/types/components/players/MewsWsPlayer/index.d.ts +0 -18
- package/dist/types/components/players/MistPlayer.d.ts +0 -20
- package/dist/types/components/players/MistWebRTCPlayer/index.d.ts +0 -20
- package/dist/types/components/players/NativePlayer.d.ts +0 -19
- package/dist/types/components/players/VideoJsPlayer.d.ts +0 -18
- package/src/components/players/DashJsPlayer.tsx +0 -56
- package/src/components/players/HlsJsPlayer.tsx +0 -56
- package/src/components/players/MewsWsPlayer/index.tsx +0 -56
- package/src/components/players/MistPlayer.tsx +0 -60
- package/src/components/players/MistWebRTCPlayer/index.tsx +0 -59
- package/src/components/players/NativePlayer.tsx +0 -58
- package/src/components/players/VideoJsPlayer.tsx +0 -56
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '@livepeer-frameworks/player-core';
|
|
5
|
+
|
|
6
|
+
var _excluded = ["className", "variant"];
|
|
7
|
+
var badgeVariants = cva("inline-flex items-center rounded-full border border-transparent px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ring-offset-background", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
"default": "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
11
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
12
|
+
outline: "border-border text-foreground"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "default"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
function Badge(_ref) {
|
|
20
|
+
var className = _ref.className,
|
|
21
|
+
variant = _ref.variant,
|
|
22
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
return jsx("div", _objectSpread2({
|
|
24
|
+
className: cn(badgeVariants({
|
|
25
|
+
variant: variant
|
|
26
|
+
}), className)
|
|
27
|
+
}, props));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { Badge, badgeVariants };
|
|
31
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sources":["../../../../src/ui/badge.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@livepeer-frameworks/player-core\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border border-transparent px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ring-offset-background\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n outline: \"border-border text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />;\n}\n\nexport { Badge, badgeVariants };\n"],"names":["badgeVariants","cva","variants","variant","secondary","outline","defaultVariants","Badge","_ref","className","props","_objectWithoutProperties","_excluded","_jsx","cn"],"mappings":";;;;;;AAIA,IAAMA,aAAa,GAAGC,GAAG,CACvB,kNAAkN,EAClN;AACEC,EAAAA,QAAQ,EAAE;AACRC,IAAAA,OAAO,EAAE;AACP,MAAA,SAAA,EAAS,wDAAwD;AACjEC,MAAAA,SAAS,EAAE,8DAA8D;AACzEC,MAAAA,OAAO,EAAE;AACV;GACF;AACDC,EAAAA,eAAe,EAAE;AACfH,IAAAA,OAAO,EAAE;AACV;AACF,CAAA;AAMH,SAASI,KAAKA,CAAAC,IAAA,EAA6C;AAAA,EAAA,IAA1CC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEN,OAAO,GAAAK,IAAA,CAAPL,OAAO;AAAKO,IAAAA,KAAK,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA;AAC3C,EAAA,OAAOC;AAAKJ,IAAAA,SAAS,EAAEK,EAAE,CAACd,aAAa,CAAC;AAAEG,MAAAA,OAAO,EAAPA;KAAS,CAAC,EAAEM,SAAS;GAAC,EAAMC,KAAK,EAAI;AACjF;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { cn } from '@livepeer-frameworks/player-core';
|
|
7
|
+
|
|
8
|
+
var _excluded = ["className", "variant", "size", "asChild"];
|
|
9
|
+
var buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background", {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
"default": "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
14
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
15
|
+
outline: "border border-border bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
16
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
17
|
+
subtle: "bg-muted text-muted-foreground hover:bg-muted/80",
|
|
18
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
"default": "h-10 px-4 py-2",
|
|
22
|
+
sm: "h-9 rounded-md px-3",
|
|
23
|
+
lg: "h-11 rounded-md px-8",
|
|
24
|
+
icon: "h-9 w-9"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: "default",
|
|
29
|
+
size: "default"
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
33
|
+
var className = _ref.className,
|
|
34
|
+
variant = _ref.variant,
|
|
35
|
+
size = _ref.size,
|
|
36
|
+
_ref$asChild = _ref.asChild,
|
|
37
|
+
asChild = _ref$asChild === void 0 ? false : _ref$asChild,
|
|
38
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
+
var Comp = asChild ? Slot : "button";
|
|
40
|
+
return jsx(Comp, _objectSpread2({
|
|
41
|
+
className: cn(buttonVariants({
|
|
42
|
+
variant: variant,
|
|
43
|
+
size: size,
|
|
44
|
+
className: className
|
|
45
|
+
})),
|
|
46
|
+
ref: ref
|
|
47
|
+
}, props));
|
|
48
|
+
});
|
|
49
|
+
Button.displayName = "Button";
|
|
50
|
+
|
|
51
|
+
export { Button, buttonVariants };
|
|
52
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../../src/ui/button.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@livepeer-frameworks/player-core\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n outline: \"border border-border bg-transparent hover:bg-accent hover:text-accent-foreground\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n subtle: \"bg-muted text-muted-foreground hover:bg-muted/80\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n );\n }\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","variants","variant","secondary","ghost","outline","destructive","subtle","link","size","sm","lg","icon","defaultVariants","Button","React","forwardRef","_ref","ref","className","_ref$asChild","asChild","props","_objectWithoutProperties","_excluded","Comp","Slot","_jsx","_objectSpread","cn","displayName"],"mappings":";;;;;;;;AAKA,IAAMA,cAAc,GAAGC,GAAG,CACxB,wRAAwR,EACxR;AACEC,EAAAA,QAAQ,EAAE;AACRC,IAAAA,OAAO,EAAE;AACP,MAAA,SAAA,EAAS,wDAAwD;AACjEC,MAAAA,SAAS,EAAE,8DAA8D;AACzEC,MAAAA,KAAK,EAAE,8CAA8C;AACrDC,MAAAA,OAAO,EAAE,kFAAkF;AAC3FC,MAAAA,WAAW,EAAE,oEAAoE;AACjFC,MAAAA,MAAM,EAAE,kDAAkD;AAC1DC,MAAAA,IAAI,EAAE;KACP;AACDC,IAAAA,IAAI,EAAE;AACJ,MAAA,SAAA,EAAS,gBAAgB;AACzBC,MAAAA,EAAE,EAAE,qBAAqB;AACzBC,MAAAA,EAAE,EAAE,sBAAsB;AAC1BC,MAAAA,IAAI,EAAE;AACP;GACF;AACDC,EAAAA,eAAe,EAAE;AACfX,IAAAA,OAAO,EAAE,SAAS;AAClBO,IAAAA,IAAI,EAAE;AACP;AACF,CAAA;AAQH,IAAMK,MAAM,gBAAGC,KAAK,CAACC,UAAU,CAC7B,UAAAC,IAAA,EAA0DC,GAAG,EAAI;AAAA,EAAA,IAA9DC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEjB,OAAO,GAAAe,IAAA,CAAPf,OAAO;IAAEO,IAAI,GAAAQ,IAAA,CAAJR,IAAI;IAAAW,YAAA,GAAAH,IAAA,CAAEI,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,YAAA;AAAKE,IAAAA,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA;AACpD,EAAA,IAAMC,IAAI,GAAGJ,OAAO,GAAGK,IAAI,GAAG,QAAQ;AACtC,EAAA,OACEC,GAAA,CAACF,IAAI,EAAAG,cAAA,CAAA;AAACT,IAAAA,SAAS,EAAEU,EAAE,CAAC9B,cAAc,CAAC;AAAEG,MAAAA,OAAO,EAAPA,OAAO;AAAEO,MAAAA,IAAI,EAAJA,IAAI;AAAEU,MAAAA,SAAS,EAATA;AAAS,KAAE,CAAC,CAAC;AAAED,IAAAA,GAAG,EAAEA;GAAG,EAAMI,KAAK,CAAA,CAAI;AAE9F,CAAC;AAEHR,MAAM,CAACgB,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
5
|
+
import { ChevronRight, Check, Circle } from 'lucide-react';
|
|
6
|
+
import { cn } from '@livepeer-frameworks/player-core';
|
|
7
|
+
|
|
8
|
+
var _excluded = ["className", "inset", "children"],
|
|
9
|
+
_excluded2 = ["className"],
|
|
10
|
+
_excluded3 = ["className", "style"],
|
|
11
|
+
_excluded4 = ["className", "inset"],
|
|
12
|
+
_excluded5 = ["className", "children", "checked"],
|
|
13
|
+
_excluded6 = ["className", "children"],
|
|
14
|
+
_excluded7 = ["className", "inset"],
|
|
15
|
+
_excluded8 = ["className"];
|
|
16
|
+
var ContextMenu = ContextMenuPrimitive.Root;
|
|
17
|
+
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
18
|
+
var ContextMenuSubTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
19
|
+
var className = _ref.className,
|
|
20
|
+
inset = _ref.inset,
|
|
21
|
+
children = _ref.children,
|
|
22
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
return jsxs(ContextMenuPrimitive.SubTrigger, _objectSpread2(_objectSpread2({
|
|
24
|
+
ref: ref,
|
|
25
|
+
className: cn("fw-context-menu-item", inset && "fw-context-menu-item--inset", className)
|
|
26
|
+
}, props), {}, {
|
|
27
|
+
children: [children, jsx(ChevronRight, {
|
|
28
|
+
className: "ml-auto h-4 w-4"
|
|
29
|
+
})]
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
33
|
+
var ContextMenuSubContent = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
34
|
+
var className = _ref2.className,
|
|
35
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
36
|
+
return jsx(ContextMenuPrimitive.SubContent, _objectSpread2({
|
|
37
|
+
ref: ref,
|
|
38
|
+
className: cn("fw-player-surface fw-context-menu", className)
|
|
39
|
+
}, props));
|
|
40
|
+
});
|
|
41
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
42
|
+
var ContextMenuContent = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
43
|
+
var className = _ref3.className,
|
|
44
|
+
style = _ref3.style,
|
|
45
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
46
|
+
return jsx(ContextMenuPrimitive.Portal, {
|
|
47
|
+
children: jsx(ContextMenuPrimitive.Content, _objectSpread2({
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: cn("fw-player-surface fw-context-menu", className),
|
|
50
|
+
style: _objectSpread2({
|
|
51
|
+
// Inline styles for portal elements (rendered outside .fw-player-root)
|
|
52
|
+
// These ensure styles work even without CSS variable inheritance
|
|
53
|
+
backgroundColor: "hsl(235 19% 13%)",
|
|
54
|
+
color: "hsl(229 35% 75%)",
|
|
55
|
+
border: "1px solid rgba(90, 96, 127, 0.3)"
|
|
56
|
+
}, style)
|
|
57
|
+
}, props))
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
61
|
+
var ContextMenuItem = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
62
|
+
var className = _ref4.className,
|
|
63
|
+
inset = _ref4.inset,
|
|
64
|
+
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
65
|
+
return jsx(ContextMenuPrimitive.Item, _objectSpread2({
|
|
66
|
+
ref: ref,
|
|
67
|
+
className: cn("fw-context-menu-item", inset && "fw-context-menu-item--inset", className)
|
|
68
|
+
}, props));
|
|
69
|
+
});
|
|
70
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
71
|
+
var ContextMenuCheckboxItem = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
72
|
+
var className = _ref5.className,
|
|
73
|
+
children = _ref5.children,
|
|
74
|
+
checked = _ref5.checked,
|
|
75
|
+
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
76
|
+
return jsxs(ContextMenuPrimitive.CheckboxItem, _objectSpread2(_objectSpread2({
|
|
77
|
+
ref: ref,
|
|
78
|
+
className: cn("fw-context-menu-checkbox", className),
|
|
79
|
+
checked: checked
|
|
80
|
+
}, props), {}, {
|
|
81
|
+
children: [jsx("span", {
|
|
82
|
+
className: "fw-context-menu-indicator",
|
|
83
|
+
children: jsx(ContextMenuPrimitive.ItemIndicator, {
|
|
84
|
+
children: jsx(Check, {
|
|
85
|
+
className: "h-4 w-4"
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
}), children]
|
|
89
|
+
}));
|
|
90
|
+
});
|
|
91
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
92
|
+
var ContextMenuRadioItem = /*#__PURE__*/React.forwardRef(function (_ref6, ref) {
|
|
93
|
+
var className = _ref6.className,
|
|
94
|
+
children = _ref6.children,
|
|
95
|
+
props = _objectWithoutProperties(_ref6, _excluded6);
|
|
96
|
+
return jsxs(ContextMenuPrimitive.RadioItem, _objectSpread2(_objectSpread2({
|
|
97
|
+
ref: ref,
|
|
98
|
+
className: cn("fw-context-menu-checkbox", className)
|
|
99
|
+
}, props), {}, {
|
|
100
|
+
children: [jsx("span", {
|
|
101
|
+
className: "fw-context-menu-indicator",
|
|
102
|
+
children: jsx(ContextMenuPrimitive.ItemIndicator, {
|
|
103
|
+
children: jsx(Circle, {
|
|
104
|
+
className: "h-2 w-2 fill-current"
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
}), children]
|
|
108
|
+
}));
|
|
109
|
+
});
|
|
110
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
111
|
+
var ContextMenuLabel = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
112
|
+
var className = _ref7.className,
|
|
113
|
+
inset = _ref7.inset,
|
|
114
|
+
props = _objectWithoutProperties(_ref7, _excluded7);
|
|
115
|
+
return jsx(ContextMenuPrimitive.Label, _objectSpread2({
|
|
116
|
+
ref: ref,
|
|
117
|
+
className: cn("fw-context-menu-label", inset && "fw-context-menu-item--inset", className)
|
|
118
|
+
}, props));
|
|
119
|
+
});
|
|
120
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
121
|
+
var ContextMenuSeparator = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
122
|
+
var className = _ref8.className,
|
|
123
|
+
props = _objectWithoutProperties(_ref8, _excluded8);
|
|
124
|
+
return jsx(ContextMenuPrimitive.Separator, _objectSpread2({
|
|
125
|
+
ref: ref,
|
|
126
|
+
className: cn("fw-context-menu-separator", className)
|
|
127
|
+
}, props));
|
|
128
|
+
});
|
|
129
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
130
|
+
|
|
131
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
132
|
+
//# sourceMappingURL=context-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.js","sources":["../../../../src/ui/context-menu.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport { cn } from \"@livepeer-frameworks/player-core\";\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\"fw-context-menu-item\", inset && \"fw-context-menu-item--inset\", className)}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\n className={cn(\"fw-player-surface fw-context-menu\", className)}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\n>(({ className, style, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\n className={cn(\"fw-player-surface fw-context-menu\", className)}\n style={{\n // Inline styles for portal elements (rendered outside .fw-player-root)\n // These ensure styles work even without CSS variable inheritance\n backgroundColor: \"hsl(235 19% 13%)\",\n color: \"hsl(229 35% 75%)\",\n border: \"1px solid rgba(90, 96, 127, 0.3)\",\n ...style,\n }}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\"fw-context-menu-item\", inset && \"fw-context-menu-item--inset\", className)}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\"fw-context-menu-checkbox\", className)}\n checked={checked}\n {...props}\n >\n <span className=\"fw-context-menu-indicator\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\"fw-context-menu-checkbox\", className)}\n {...props}\n >\n <span className=\"fw-context-menu-indicator\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\"fw-context-menu-label\", inset && \"fw-context-menu-item--inset\", className)}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn(\"fw-context-menu-separator\", className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\nconst ContextMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"names":["ContextMenu","ContextMenuPrimitive","Root","ContextMenuTrigger","Trigger","ContextMenuSubTrigger","React","forwardRef","_ref","ref","className","inset","children","props","_objectWithoutProperties","_excluded","_jsxs","SubTrigger","_objectSpread","cn","_jsx","ChevronRight","displayName","ContextMenuSubContent","_ref2","_excluded2","SubContent","ContextMenuContent","_ref3","style","_excluded3","Portal","Content","backgroundColor","color","border","ContextMenuItem","_ref4","_excluded4","Item","ContextMenuCheckboxItem","_ref5","checked","_excluded5","CheckboxItem","ItemIndicator","Check","ContextMenuRadioItem","_ref6","_excluded6","RadioItem","Circle","ContextMenuLabel","_ref7","_excluded7","Label","ContextMenuSeparator","_ref8","_excluded8","Separator"],"mappings":";;;;;;;;;;;;;;;AAKA,IAAMA,WAAW,GAAGC,oBAAoB,CAACC;AAEzC,IAAMC,kBAAkB,GAAGF,oBAAoB,CAACG;AAUhD,IAAMC,qBAAqB,gBAAGC,KAAK,CAACC,UAAU,CAK5C,UAAAC,IAAA,EAA2CC,GAAG,EAAA;AAAA,EAAA,IAA3CC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAEC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA;EAAA,OACvCC,IAAA,CAACf,oBAAoB,CAACgB,UAAU,EAAAC,cAAA,CAAAA,cAAA,CAAA;AAC9BT,IAAAA,GAAG,EAAEA,GAAG;IACRC,SAAS,EAAES,EAAE,CAAC,sBAAsB,EAAER,KAAK,IAAI,6BAA6B,EAAED,SAAS;AAAC,GAAA,EACpFG,KAAK,CAAA,EAAA,EAAA,EAAA;AAAAD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ectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
5
|
+
import { cn } from '@livepeer-frameworks/player-core';
|
|
6
|
+
|
|
7
|
+
var _excluded = ["className", "trackClassName", "thumbClassName", "showTrack", "hoverThumb", "accentColor", "orientation"];
|
|
8
|
+
var Slider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9
|
+
var className = _ref.className,
|
|
10
|
+
trackClassName = _ref.trackClassName,
|
|
11
|
+
thumbClassName = _ref.thumbClassName,
|
|
12
|
+
_ref$showTrack = _ref.showTrack,
|
|
13
|
+
showTrack = _ref$showTrack === void 0 ? true : _ref$showTrack;
|
|
14
|
+
_ref.hoverThumb;
|
|
15
|
+
var _ref$accentColor = _ref.accentColor,
|
|
16
|
+
accentColor = _ref$accentColor === void 0 ? false : _ref$accentColor,
|
|
17
|
+
_ref$orientation = _ref.orientation,
|
|
18
|
+
orientation = _ref$orientation === void 0 ? "horizontal" : _ref$orientation,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return jsxs(SliderPrimitive.Root, _objectSpread2(_objectSpread2({
|
|
21
|
+
ref: ref,
|
|
22
|
+
orientation: orientation,
|
|
23
|
+
className: cn("fw-slider", orientation === "vertical" && "fw-slider--vertical", className)
|
|
24
|
+
}, props), {}, {
|
|
25
|
+
children: [showTrack && jsx(SliderPrimitive.Track, {
|
|
26
|
+
className: cn("fw-slider-track", trackClassName),
|
|
27
|
+
children: jsx(SliderPrimitive.Range, {
|
|
28
|
+
className: cn("fw-slider-range", accentColor && "fw-slider-range--accent")
|
|
29
|
+
})
|
|
30
|
+
}), jsx(SliderPrimitive.Thumb, {
|
|
31
|
+
className: cn("fw-slider-thumb", accentColor && "fw-slider-thumb--accent", thumbClassName)
|
|
32
|
+
})]
|
|
33
|
+
}));
|
|
34
|
+
});
|
|
35
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
36
|
+
|
|
37
|
+
export { Slider };
|
|
38
|
+
//# sourceMappingURL=slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.js","sources":["../../../../src/ui/slider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as SliderPrimitive from \"@radix-ui/react-slider\";\nimport { cn } from \"@livepeer-frameworks/player-core\";\n\nexport interface SliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {\n showTrack?: boolean;\n trackClassName?: string;\n thumbClassName?: string;\n /** Show thumb only on hover (YouTube-style) - but always shows a smaller thumb when not hovered */\n hoverThumb?: boolean;\n /** Use cyan accent color (matches SeekBar styling) */\n accentColor?: boolean;\n}\n\nconst Slider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.Root>, SliderProps>(\n (\n {\n className,\n trackClassName,\n thumbClassName,\n showTrack = true,\n hoverThumb: _hoverThumb = false,\n accentColor = false,\n orientation = \"horizontal\",\n ...props\n },\n ref\n ) => {\n return (\n <SliderPrimitive.Root\n ref={ref}\n orientation={orientation}\n className={cn(\"fw-slider\", orientation === \"vertical\" && \"fw-slider--vertical\", className)}\n {...props}\n >\n {showTrack && (\n <SliderPrimitive.Track className={cn(\"fw-slider-track\", trackClassName)}>\n <SliderPrimitive.Range\n className={cn(\"fw-slider-range\", accentColor && \"fw-slider-range--accent\")}\n />\n </SliderPrimitive.Track>\n )}\n <SliderPrimitive.Thumb\n className={cn(\n \"fw-slider-thumb\",\n accentColor && \"fw-slider-thumb--accent\",\n thumbClassName\n )}\n />\n </SliderPrimitive.Root>\n );\n }\n);\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n"],"names":["Slider","React","forwardRef","_ref","ref","className","trackClassName","thumbClassName","_ref$showTrack","showTrack","hoverThumb","_hoverThumb","_ref$accentColor","accentColor","_ref$orientation","orientation","props","_objectWithoutProperties","_excluded","_jsxs","SliderPrimitive","Root","_objectSpread","cn","children","_jsx","Track","Range","Thumb","displayName"],"mappings":";;;;;;;AAcA,IAAMA,MAAM,gBAAGC,KAAK,CAACC,UAAU,CAC7B,UAAAC,IAAA,EAWEC,GAAG,EACD;AAAA,EAAA,IAVAC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,cAAc,GAAAH,IAAA,CAAdG,cAAc;IACdC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAAC,cAAA,GAAAL,IAAA,CACdM,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,cAAA;IAAAL,IAAA,CAChBO,UAAU;AAAEC,QAAmBC,gBAAA,GAAAT,IAAA,CAC/BU,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,gBAAA;IAAAE,gBAAA,GAAAX,IAAA,CACnBY,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,MAAA,GAAG,YAAY,GAAAA,gBAAA;AACvBE,IAAAA,KAAK,GAAAC,wBAAA,CAAAd,IAAA,EAAAe,SAAA;EAIV,OACEC,IAAA,CAACC,eAAe,CAACC,IAAI,EAAAC,cAAA,CAAAA,cAAA,CAAA;AACnBlB,IAAAA,GAAG,EAAEA,GAAG;AACRW,IAAAA,WAAW,EAAEA,WAAW;IACxBV,SAAS,EAAEkB,EAAE,CAAC,WAAW,EAAER,WAAW,KAAK,UAAU,IAAI,qBAAqB,EAAEV,SAAS;AAAC,GAAA,EACtFW,KAAK,CAAA,EAAA,EAAA,EAAA;IAAAQ,QAAA,EAAA,CAERf,SAAS,IACRgB,IAACL,eAAe,CAACM,KAAK,EAAA;AAACrB,MAAAA,SAAS,EAAEkB,EAAE,CAAC,iBAAiB,EAAEjB,cAAc,CAAC;AAAAkB,MAAAA,QAAA,EACrEC,IAACL,eAAe,CAACO,KAAK,EAAA;AACpBtB,QAAAA,SAAS,EAAEkB,EAAE,CAAC,iBAAiB,EAAEV,WAAW,IAAI,yBAAyB;;AACzE,KAAA,CAEL,EACDY,GAAA,CAACL,eAAe,CAACQ,KAAK;MACpBvB,SAAS,EAAEkB,EAAE,CACX,iBAAiB,EACjBV,WAAW,IAAI,yBAAyB,EACxCN,cAAc;AACf,KAAA,CACD;AAAA,GAAA,CAAA,CACmB;AAE3B,CAAC;AAEHP,MAAM,CAAC6B,WAAW,GAAGT,eAAe,CAACC,IAAI,CAACQ,WAAW;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { SubtitleCue, MetaTrackEvent } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SubtitleCue, MetaTrackEvent } from "../types";
|
|
3
3
|
export interface SubtitleRendererProps {
|
|
4
4
|
/** Current video playback time in seconds */
|
|
5
5
|
currentTime: number;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* </PlayerProvider>
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
import React, { type ReactNode } from
|
|
15
|
-
import { type UsePlayerControllerConfig, type UsePlayerControllerReturn } from
|
|
14
|
+
import React, { type ReactNode } from "react";
|
|
15
|
+
import { type UsePlayerControllerConfig, type UsePlayerControllerReturn } from "../hooks/usePlayerController";
|
|
16
16
|
declare const PlayerContext: React.Context<UsePlayerControllerReturn | null>;
|
|
17
17
|
export interface PlayerProviderProps {
|
|
18
18
|
children: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Context exports
|
|
3
3
|
*/
|
|
4
|
-
export { PlayerProvider, usePlayerContext, usePlayerContextOptional, PlayerContext } from
|
|
5
|
-
export type { PlayerContextValue, UsePlayerControllerConfig } from
|
|
4
|
+
export { PlayerProvider, usePlayerContext, usePlayerContextOptional, PlayerContext, } from "./PlayerContext";
|
|
5
|
+
export type { PlayerContextValue, UsePlayerControllerConfig } from "./PlayerContext";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type MetaTrackEvent } from
|
|
2
|
-
import type { UseMetaTrackOptions } from
|
|
1
|
+
import { type MetaTrackEvent } from "@livepeer-frameworks/player-core";
|
|
2
|
+
import type { UseMetaTrackOptions } from "../types";
|
|
3
3
|
export interface UseMetaTrackReturn {
|
|
4
4
|
/** Whether connected to MistServer WebSocket */
|
|
5
5
|
isConnected: boolean;
|
|
6
6
|
/** Connection state */
|
|
7
|
-
connectionState:
|
|
7
|
+
connectionState: "disconnected" | "connecting" | "connected" | "reconnecting";
|
|
8
8
|
/** List of subscribed track IDs */
|
|
9
9
|
subscribedTracks: string[];
|
|
10
10
|
/** Subscribe to a meta track */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PlaybackQuality } from
|
|
2
|
-
import type { UsePlaybackQualityOptions } from
|
|
1
|
+
import { type PlaybackQuality } from "@livepeer-frameworks/player-core";
|
|
2
|
+
import type { UsePlaybackQualityOptions } from "../types";
|
|
3
3
|
/**
|
|
4
4
|
* Hook to monitor video playback quality
|
|
5
5
|
*
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* React hook that wraps PlayerController for declarative usage.
|
|
5
5
|
* Manages the complete player lifecycle and provides reactive state.
|
|
6
6
|
*/
|
|
7
|
-
import { PlayerController, type PlayerControllerConfig, type PlayerState, type StreamState, type StreamInfo, type PlaybackQuality, type ContentEndpoints, type ContentMetadata } from
|
|
8
|
-
export interface UsePlayerControllerConfig extends Omit<PlayerControllerConfig,
|
|
7
|
+
import { PlayerController, type PlayerControllerConfig, type PlayerState, type StreamState, type StreamInfo, type PlaybackQuality, type ContentEndpoints, type ContentMetadata, type ClassifiedError } from "@livepeer-frameworks/player-core";
|
|
8
|
+
export interface UsePlayerControllerConfig extends Omit<PlayerControllerConfig, "playerManager"> {
|
|
9
9
|
/** Enable/disable the hook */
|
|
10
10
|
enabled?: boolean;
|
|
11
11
|
/** Callback when state changes */
|
|
@@ -16,6 +16,20 @@ export interface UsePlayerControllerConfig extends Omit<PlayerControllerConfig,
|
|
|
16
16
|
onError?: (error: string) => void;
|
|
17
17
|
/** Callback when ready */
|
|
18
18
|
onReady?: (videoElement: HTMLVideoElement) => void;
|
|
19
|
+
/** Callback when protocol is swapped (for toast notification) */
|
|
20
|
+
onProtocolSwapped?: (data: {
|
|
21
|
+
fromPlayer: string;
|
|
22
|
+
toPlayer: string;
|
|
23
|
+
fromProtocol: string;
|
|
24
|
+
toProtocol: string;
|
|
25
|
+
reason: string;
|
|
26
|
+
}) => void;
|
|
27
|
+
/** Callback when playback fails after all recovery attempts (for error modal) */
|
|
28
|
+
onPlaybackFailed?: (error: {
|
|
29
|
+
code: string;
|
|
30
|
+
message: string;
|
|
31
|
+
details?: ClassifiedError["details"];
|
|
32
|
+
}) => void;
|
|
19
33
|
}
|
|
20
34
|
export interface PlayerControllerState {
|
|
21
35
|
/** Current player state */
|
|
@@ -44,6 +58,8 @@ export interface PlayerControllerState {
|
|
|
44
58
|
volume: number;
|
|
45
59
|
/** Error text */
|
|
46
60
|
error: string | null;
|
|
61
|
+
/** Error details for debugging */
|
|
62
|
+
errorDetails: ClassifiedError["details"] | null;
|
|
47
63
|
/** Is passive error */
|
|
48
64
|
isPassiveError: boolean;
|
|
49
65
|
/** Has playback ever started */
|
|
@@ -99,6 +115,11 @@ export interface PlayerControllerState {
|
|
|
99
115
|
}>;
|
|
100
116
|
/** Stream info for player selection (sources + tracks) */
|
|
101
117
|
streamInfo: StreamInfo | null;
|
|
118
|
+
/** Toast message to display (auto-dismisses) */
|
|
119
|
+
toast: {
|
|
120
|
+
message: string;
|
|
121
|
+
timestamp: number;
|
|
122
|
+
} | null;
|
|
102
123
|
}
|
|
103
124
|
export interface UsePlayerControllerReturn {
|
|
104
125
|
/** Container ref to attach to your player container div */
|
|
@@ -133,6 +154,8 @@ export interface UsePlayerControllerReturn {
|
|
|
133
154
|
toggleSubtitles: () => void;
|
|
134
155
|
/** Clear error */
|
|
135
156
|
clearError: () => void;
|
|
157
|
+
/** Dismiss toast notification */
|
|
158
|
+
dismissToast: () => void;
|
|
136
159
|
/** Retry playback */
|
|
137
160
|
retry: () => Promise<void>;
|
|
138
161
|
/** Reload player */
|
|
@@ -158,7 +181,7 @@ export interface UsePlayerControllerReturn {
|
|
|
158
181
|
forcePlayer?: string;
|
|
159
182
|
forceType?: string;
|
|
160
183
|
forceSource?: number;
|
|
161
|
-
playbackMode?:
|
|
184
|
+
playbackMode?: "auto" | "low-latency" | "quality" | "vod";
|
|
162
185
|
}) => Promise<void>;
|
|
163
186
|
}
|
|
164
187
|
export declare function usePlayerController(config: UsePlayerControllerConfig): UsePlayerControllerReturn;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* React hook for subscribing to PlayerManager selection events.
|
|
5
5
|
* Uses event-driven updates instead of polling - no render spam.
|
|
6
6
|
*/
|
|
7
|
-
import type { PlayerManager, PlayerSelection, PlayerCombination, StreamInfo, PlaybackMode } from
|
|
7
|
+
import type { PlayerManager, PlayerSelection, PlayerCombination, StreamInfo, PlaybackMode } from "@livepeer-frameworks/player-core";
|
|
8
8
|
export interface UsePlayerSelectionOptions {
|
|
9
9
|
/** Stream info to compute selections for */
|
|
10
10
|
streamInfo: StreamInfo | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TelemetryOptions, type PlaybackQuality, type ContentType } from
|
|
1
|
+
import { type TelemetryOptions, type PlaybackQuality, type ContentType } from "@livepeer-frameworks/player-core";
|
|
2
2
|
export interface UseTelemetryOptions extends TelemetryOptions {
|
|
3
3
|
/** Video element to monitor */
|
|
4
4
|
videoElement: HTMLVideoElement | null;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ContentType } from
|
|
2
|
-
import type { ContentEndpoints } from
|
|
1
|
+
import type { ContentType } from "@livepeer-frameworks/player-core";
|
|
2
|
+
import type { ContentEndpoints } from "../types";
|
|
3
3
|
interface Params {
|
|
4
4
|
gatewayUrl: string;
|
|
5
5
|
contentId: string;
|
|
6
6
|
contentType?: ContentType;
|
|
7
7
|
authToken?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function useViewerEndpoints({ gatewayUrl, contentType: _contentType, contentId, authToken }: Params): {
|
|
9
|
+
export declare function useViewerEndpoints({ gatewayUrl, contentType: _contentType, contentId, authToken, }: Params): {
|
|
10
10
|
endpoints: ContentEndpoints | null;
|
|
11
11
|
status: "error" | "ready" | "idle" | "loading";
|
|
12
12
|
error: string | null;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
*
|
|
4
4
|
* React components for FrameWorks streaming player.
|
|
5
5
|
*/
|
|
6
|
-
export { default as Player } from
|
|
7
|
-
export { default as PlayerControls } from
|
|
8
|
-
export { default as LoadingScreen } from
|
|
9
|
-
export { default as IdleScreen } from
|
|
10
|
-
export { default as ThumbnailOverlay } from
|
|
11
|
-
export { default as TitleOverlay } from
|
|
12
|
-
export { default as StreamStateOverlay } from
|
|
13
|
-
export { default as StatsPanel } from
|
|
14
|
-
export { default as DevModePanel } from
|
|
15
|
-
export { default as PlayerErrorBoundary } from
|
|
16
|
-
export * from
|
|
17
|
-
export { Button } from
|
|
18
|
-
export { Badge } from
|
|
19
|
-
export { Slider } from
|
|
20
|
-
export { PlayerProvider, usePlayerContext, usePlayerContextOptional, PlayerContext } from
|
|
21
|
-
export type { PlayerContextValue } from
|
|
22
|
-
export { useStreamState } from
|
|
23
|
-
export { usePlaybackQuality } from
|
|
24
|
-
export { useViewerEndpoints } from
|
|
25
|
-
export { useMetaTrack } from
|
|
26
|
-
export { useTelemetry } from
|
|
27
|
-
export { usePlayerSelection } from
|
|
28
|
-
export type { UsePlayerSelectionOptions, UsePlayerSelectionReturn } from
|
|
29
|
-
export { usePlayerController } from
|
|
30
|
-
export type { UsePlayerControllerConfig, UsePlayerControllerReturn, PlayerControllerState, } from
|
|
31
|
-
export * from
|
|
32
|
-
export { PlayerManager, globalPlayerManager, PlayerController, GatewayClient, StreamStateClient, QualityMonitor, cn, } from
|
|
33
|
-
export type { PlayerState, PlayerStateContext, StreamState, StreamStatus, MistStreamInfo, PlaybackQuality, PlaybackMode, ContentEndpoints, EndpointInfo, PlayerSelection, PlayerCombination, PlayerManagerEvents, } from
|
|
6
|
+
export { default as Player } from "./components/Player";
|
|
7
|
+
export { default as PlayerControls } from "./components/PlayerControls";
|
|
8
|
+
export { default as LoadingScreen } from "./components/LoadingScreen";
|
|
9
|
+
export { default as IdleScreen } from "./components/IdleScreen";
|
|
10
|
+
export { default as ThumbnailOverlay } from "./components/ThumbnailOverlay";
|
|
11
|
+
export { default as TitleOverlay } from "./components/TitleOverlay";
|
|
12
|
+
export { default as StreamStateOverlay } from "./components/StreamStateOverlay";
|
|
13
|
+
export { default as StatsPanel } from "./components/StatsPanel";
|
|
14
|
+
export { default as DevModePanel } from "./components/DevModePanel";
|
|
15
|
+
export { default as PlayerErrorBoundary } from "./components/PlayerErrorBoundary";
|
|
16
|
+
export * from "./components/Icons";
|
|
17
|
+
export { Button } from "./ui/button";
|
|
18
|
+
export { Badge } from "./ui/badge";
|
|
19
|
+
export { Slider } from "./ui/slider";
|
|
20
|
+
export { PlayerProvider, usePlayerContext, usePlayerContextOptional, PlayerContext, } from "./context/PlayerContext";
|
|
21
|
+
export type { PlayerContextValue } from "./context/PlayerContext";
|
|
22
|
+
export { useStreamState } from "./hooks/useStreamState";
|
|
23
|
+
export { usePlaybackQuality } from "./hooks/usePlaybackQuality";
|
|
24
|
+
export { useViewerEndpoints } from "./hooks/useViewerEndpoints";
|
|
25
|
+
export { useMetaTrack } from "./hooks/useMetaTrack";
|
|
26
|
+
export { useTelemetry } from "./hooks/useTelemetry";
|
|
27
|
+
export { usePlayerSelection } from "./hooks/usePlayerSelection";
|
|
28
|
+
export type { UsePlayerSelectionOptions, UsePlayerSelectionReturn, } from "./hooks/usePlayerSelection";
|
|
29
|
+
export { usePlayerController } from "./hooks/usePlayerController";
|
|
30
|
+
export type { UsePlayerControllerConfig, UsePlayerControllerReturn, PlayerControllerState, } from "./hooks/usePlayerController";
|
|
31
|
+
export * from "./types";
|
|
32
|
+
export { PlayerManager, globalPlayerManager, PlayerController, GatewayClient, StreamStateClient, QualityMonitor, cn, } from "@livepeer-frameworks/player-core";
|
|
33
|
+
export type { PlayerState, PlayerStateContext, StreamState, StreamStatus, MistStreamInfo, PlaybackQuality, PlaybackMode, ContentEndpoints, EndpointInfo, PlayerSelection, PlayerCombination, PlayerManagerEvents, } from "@livepeer-frameworks/player-core";
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React-specific types for FrameWorks player
|
|
3
3
|
*/
|
|
4
|
-
import type React from
|
|
5
|
-
import type { PlayerOptions, PlayerState, PlayerStateContext, ContentEndpoints, MetaTrackSubscription, PlaybackQuality, QualityThresholds, ContentType } from
|
|
4
|
+
import type React from "react";
|
|
5
|
+
import type { PlayerOptions, PlayerState, PlayerStateContext, ContentEndpoints, MetaTrackSubscription, PlaybackQuality, QualityThresholds, ContentType } from "@livepeer-frameworks/player-core";
|
|
6
6
|
export interface PlayerProps {
|
|
7
7
|
/** Content identifier or stream name */
|
|
8
8
|
contentId: string;
|
|
@@ -91,4 +91,4 @@ export interface UseTelemetryOptions {
|
|
|
91
91
|
playerType?: string;
|
|
92
92
|
protocol?: string;
|
|
93
93
|
}
|
|
94
|
-
export type { PlayerState, PlayerStateContext, ContentEndpoints, PlayerOptions, PlaybackQuality, TelemetryOptions, TelemetryPayload, MetaTrackEvent, MetaTrackEventType, SubtitleCue, PlaybackMode, MistStreamInfo, StreamState, StreamStatus, EndpointInfo, ContentMetadata, } from
|
|
94
|
+
export type { PlayerState, PlayerStateContext, ContentEndpoints, PlayerOptions, PlaybackQuality, TelemetryOptions, TelemetryPayload, MetaTrackEvent, MetaTrackEventType, SubtitleCue, PlaybackMode, MistStreamInfo, StreamState, StreamStatus, EndpointInfo, ContentMetadata, } from "@livepeer-frameworks/player-core";
|
|
@@ -7,4 +7,4 @@ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitiv
|
|
|
7
7
|
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export { Select, SelectContent, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
|
|
10
|
+
export { Select, SelectContent, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, };
|