@streamplace/components 0.7.0 → 0.7.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.
Files changed (97) hide show
  1. package/dist/components/chat/chat-box.js +46 -43
  2. package/dist/components/chat/chat-message.js +36 -33
  3. package/dist/components/chat/chat.js +31 -27
  4. package/dist/components/chat/mention-suggestions.js +16 -13
  5. package/dist/components/chat/mod-view.js +20 -17
  6. package/dist/components/mobile-player/fullscreen.js +21 -17
  7. package/dist/components/mobile-player/fullscreen.native.js +39 -35
  8. package/dist/components/mobile-player/player.js +38 -32
  9. package/dist/components/mobile-player/props.js +2 -1
  10. package/dist/components/mobile-player/shared.js +16 -13
  11. package/dist/components/mobile-player/ui/countdown.js +23 -19
  12. package/dist/components/mobile-player/ui/index.js +9 -5
  13. package/dist/components/mobile-player/ui/input.js +16 -12
  14. package/dist/components/mobile-player/ui/metrics.js +20 -16
  15. package/dist/components/mobile-player/ui/streamer-context-menu.js +6 -3
  16. package/dist/components/mobile-player/ui/viewer-context-menu.js +19 -16
  17. package/dist/components/mobile-player/ui/viewers.js +23 -0
  18. package/dist/components/mobile-player/use-webrtc.js +29 -24
  19. package/dist/components/mobile-player/video.js +109 -99
  20. package/dist/components/mobile-player/video.native.js +108 -84
  21. package/dist/components/mobile-player/webrtc-diagnostics.js +9 -5
  22. package/dist/components/mobile-player/webrtc-primitives.js +8 -6
  23. package/dist/components/mobile-player/webrtc-primitives.native.js +8 -1
  24. package/dist/components/ui/button.js +26 -23
  25. package/dist/components/ui/dialog.js +43 -40
  26. package/dist/components/ui/dropdown.js +121 -116
  27. package/dist/components/ui/icons.js +8 -5
  28. package/dist/components/ui/index.js +27 -19
  29. package/dist/components/ui/input.js +31 -28
  30. package/dist/components/ui/loader.js +9 -6
  31. package/dist/components/ui/primitives/button.js +33 -29
  32. package/dist/components/ui/primitives/input.js +44 -40
  33. package/dist/components/ui/primitives/modal.js +45 -41
  34. package/dist/components/ui/primitives/text.js +35 -29
  35. package/dist/components/ui/resizeable.js +54 -43
  36. package/dist/components/ui/text.js +50 -48
  37. package/dist/components/ui/textarea.js +13 -11
  38. package/dist/components/ui/toast.js +26 -23
  39. package/dist/components/ui/view.js +41 -39
  40. package/dist/hooks/index.js +12 -8
  41. package/dist/hooks/useAvatars.js +11 -8
  42. package/dist/hooks/useCameraToggle.js +7 -4
  43. package/dist/hooks/useKeyboard.js +13 -10
  44. package/dist/hooks/useKeyboardSlide.js +8 -5
  45. package/dist/hooks/useLivestreamInfo.js +17 -14
  46. package/dist/hooks/useOuterAndInnerDimensions.js +9 -6
  47. package/dist/hooks/usePlayerDimensions.js +9 -6
  48. package/dist/hooks/useSegmentDimensions.js +17 -0
  49. package/dist/hooks/useSegmentTiming.js +13 -10
  50. package/dist/index.js +24 -15
  51. package/dist/lib/facet.js +5 -1
  52. package/dist/lib/theme/atoms.js +153 -148
  53. package/dist/lib/theme/atoms.types.js +2 -1
  54. package/dist/lib/theme/index.js +31 -5
  55. package/dist/lib/theme/theme.js +91 -83
  56. package/dist/lib/theme/tokens.js +15 -12
  57. package/dist/lib/utils.js +22 -11
  58. package/dist/livestream-provider/index.js +19 -14
  59. package/dist/livestream-provider/websocket.js +14 -10
  60. package/dist/livestream-store/chat.js +26 -19
  61. package/dist/livestream-store/context.js +5 -2
  62. package/dist/livestream-store/index.js +7 -4
  63. package/dist/livestream-store/livestream-state.js +2 -1
  64. package/dist/livestream-store/livestream-store.js +31 -18
  65. package/dist/livestream-store/stream-key.js +22 -18
  66. package/dist/livestream-store/websocket-consumer.js +18 -14
  67. package/dist/player-store/context.js +5 -2
  68. package/dist/player-store/index.js +8 -5
  69. package/dist/player-store/player-provider.js +20 -15
  70. package/dist/player-store/player-state.js +9 -6
  71. package/dist/player-store/player-store.js +32 -21
  72. package/dist/player-store/single-player-provider.js +35 -23
  73. package/dist/streamplace-provider/context.js +5 -2
  74. package/dist/streamplace-provider/index.js +14 -10
  75. package/dist/streamplace-provider/poller.js +20 -17
  76. package/dist/streamplace-store/block.js +6 -3
  77. package/dist/streamplace-store/index.js +6 -3
  78. package/dist/streamplace-store/stream.js +14 -10
  79. package/dist/streamplace-store/streamplace-store.js +23 -13
  80. package/dist/streamplace-store/user.js +19 -14
  81. package/dist/streamplace-store/xrpc.js +10 -7
  82. package/node-compile-cache/v22.15.0-x64-92db9086-0/37be0eec +0 -0
  83. package/node-compile-cache/v22.15.0-x64-92db9086-0/56540125 +0 -0
  84. package/node-compile-cache/{v22.15.0-x64-efe9a9df-0 → v22.15.0-x64-92db9086-0}/67b1eb60 +0 -0
  85. package/node-compile-cache/{v22.15.0-x64-efe9a9df-0 → v22.15.0-x64-92db9086-0}/7c275f90 +0 -0
  86. package/package.json +6 -7
  87. package/src/components/mobile-player/ui/index.ts +1 -0
  88. package/src/components/mobile-player/ui/viewer-context-menu.tsx +5 -4
  89. package/src/components/mobile-player/ui/viewers.tsx +32 -0
  90. package/src/components/mobile-player/video.native.tsx +50 -5
  91. package/src/components/ui/resizeable.tsx +15 -3
  92. package/src/hooks/index.ts +1 -0
  93. package/src/hooks/useSegmentDimensions.tsx +18 -0
  94. package/tsconfig.json +2 -1
  95. package/tsconfig.tsbuildinfo +1 -1
  96. package/node-compile-cache/v22.15.0-x64-efe9a9df-0/37be0eec +0 -0
  97. package/node-compile-cache/v22.15.0-x64-efe9a9df-0/56540125 +0 -0
@@ -1,24 +1,34 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { ChevronUp } from "lucide-react-native";
3
- import { Dimensions } from "react-native";
4
- import { Gesture, GestureDetector, Pressable, } from "react-native-gesture-handler";
5
- import Animated, { Extrapolation, interpolate, useAnimatedStyle, useSharedValue, withSpring, } from "react-native-reanimated";
6
- import { useSafeAreaInsets } from "react-native-safe-area-context";
7
- import { useKeyboardSlide } from "../../hooks";
8
- import { bottom, layout, p, w, zIndex } from "../../lib/theme/atoms";
9
- import { View } from "./view";
10
- const AnimatedView = Animated.createAnimatedComponent(View);
11
- const { height: SCREEN_HEIGHT } = Dimensions.get("window");
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Resizable = Resizable;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const lucide_react_native_1 = require("lucide-react-native");
7
+ const react_1 = require("react");
8
+ const react_native_1 = require("react-native");
9
+ const react_native_gesture_handler_1 = require("react-native-gesture-handler");
10
+ const react_native_reanimated_1 = tslib_1.__importStar(require("react-native-reanimated"));
11
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
12
+ const hooks_1 = require("../../hooks");
13
+ const atoms_1 = require("../../lib/theme/atoms");
14
+ const view_1 = require("./view");
15
+ const AnimatedView = react_native_reanimated_1.default.createAnimatedComponent(view_1.View);
16
+ const { height: SCREEN_HEIGHT } = react_native_1.Dimensions.get("window");
12
17
  const SPRING_CONFIG = { damping: 20, stiffness: 100 };
13
- export function Resizable({ isPlayerRatioGreater, style = {}, children, }) {
14
- const { slideKeyboard } = useKeyboardSlide();
15
- const { bottom: safeBottom } = useSafeAreaInsets();
18
+ function Resizable({ startingPercentage, isPlayerRatioGreater, style = {}, children, }) {
19
+ const { slideKeyboard } = (0, hooks_1.useKeyboardSlide)();
20
+ const { bottom: safeBottom } = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
16
21
  const MAX_HEIGHT = (SCREEN_HEIGHT - safeBottom) * 0.5;
17
22
  const MIN_HEIGHT = -(SCREEN_HEIGHT - safeBottom) * 0.2;
18
23
  const COLLAPSE_HEIGHT = (SCREEN_HEIGHT - safeBottom) * 0.1;
19
- const sheetHeight = useSharedValue(MIN_HEIGHT);
20
- const startHeight = useSharedValue(MIN_HEIGHT);
21
- const panGesture = Gesture.Pan()
24
+ const sheetHeight = (0, react_native_reanimated_1.useSharedValue)(MIN_HEIGHT);
25
+ const startHeight = (0, react_native_reanimated_1.useSharedValue)(MIN_HEIGHT);
26
+ (0, react_1.useEffect)(() => {
27
+ setTimeout(() => {
28
+ sheetHeight.value = (0, react_native_reanimated_1.withSpring)(startingPercentage ? startingPercentage * SCREEN_HEIGHT : MIN_HEIGHT, SPRING_CONFIG);
29
+ }, 1000);
30
+ }, []);
31
+ const panGesture = react_native_gesture_handler_1.Gesture.Pan()
22
32
  .onStart(() => {
23
33
  startHeight.value = sheetHeight.value;
24
34
  })
@@ -30,54 +40,55 @@ export function Resizable({ isPlayerRatioGreater, style = {}, children, }) {
30
40
  newHeight = MIN_HEIGHT;
31
41
  sheetHeight.value = newHeight;
32
42
  if (newHeight < COLLAPSE_HEIGHT) {
33
- sheetHeight.value = withSpring(MIN_HEIGHT, SPRING_CONFIG);
43
+ sheetHeight.value = (0, react_native_reanimated_1.withSpring)(MIN_HEIGHT, SPRING_CONFIG);
34
44
  }
35
45
  });
36
- const animatedStyle = useAnimatedStyle(() => ({
46
+ const animatedStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({
37
47
  height: sheetHeight.value < COLLAPSE_HEIGHT ? 0 : sheetHeight.value,
38
- opacity: interpolate(sheetHeight.value, [MIN_HEIGHT, COLLAPSE_HEIGHT], [0, 1], Extrapolation.CLAMP),
48
+ opacity: (0, react_native_reanimated_1.interpolate)(sheetHeight.value, [MIN_HEIGHT, COLLAPSE_HEIGHT], [0, 1], react_native_reanimated_1.Extrapolation.CLAMP),
39
49
  transform: [
40
50
  {
41
- translateY: slideKeyboard - safeBottom + Math.max(0, -sheetHeight.value),
51
+ translateY: slideKeyboard +
52
+ Math.max(0, -sheetHeight.value) +
53
+ (slideKeyboard < 0 ? 0 : -safeBottom),
42
54
  },
43
55
  ],
44
56
  }));
45
- const handleAnimatedStyle = useAnimatedStyle(() => ({
57
+ const handleAnimatedStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({
46
58
  opacity: sheetHeight.value < COLLAPSE_HEIGHT ? 1 : 0,
47
59
  transform: [
48
60
  {
49
- translateY: sheetHeight.value < COLLAPSE_HEIGHT ? 0 : withSpring(20),
61
+ translateY: sheetHeight.value < COLLAPSE_HEIGHT ? 0 : (0, react_native_reanimated_1.withSpring)(20),
50
62
  },
51
63
  ],
52
64
  }));
53
- return (_jsxs(_Fragment, { children: [_jsx(Animated.View, { style: [
65
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: [
54
66
  handleAnimatedStyle,
55
- layout.position.absolute,
56
- bottom[4],
57
- w.percent[100],
58
- layout.flex.center,
59
- zIndex[1],
60
- { marginBottom: safeBottom },
61
- ], children: _jsx(Pressable, { onPress: () => {
67
+ atoms_1.layout.position.absolute,
68
+ atoms_1.bottom[4],
69
+ atoms_1.w.percent[100],
70
+ atoms_1.layout.flex.center,
71
+ atoms_1.zIndex[1],
72
+ ], children: (0, jsx_runtime_1.jsx)(react_native_gesture_handler_1.Pressable, { onPress: () => {
62
73
  sheetHeight.value =
63
74
  sheetHeight.value === MIN_HEIGHT
64
- ? withSpring(MAX_HEIGHT, SPRING_CONFIG)
65
- : withSpring(MIN_HEIGHT, SPRING_CONFIG);
66
- }, children: _jsx(View, { style: [
67
- p[1],
75
+ ? (0, react_native_reanimated_1.withSpring)(MAX_HEIGHT, SPRING_CONFIG)
76
+ : (0, react_native_reanimated_1.withSpring)(MIN_HEIGHT, SPRING_CONFIG);
77
+ }, children: (0, jsx_runtime_1.jsx)(view_1.View, { style: [
78
+ atoms_1.p[1],
68
79
  {
69
80
  borderRadius: 999,
70
81
  backgroundColor: "rgba(0, 0, 0, 0.5)",
71
82
  overflow: "hidden",
72
83
  },
73
- ], children: _jsx(ChevronUp, { size: 32, color: "white", style: { marginBottom: 1, marginTop: -1 } }) }) }) }), _jsxs(AnimatedView, { style: [
84
+ ], children: (0, jsx_runtime_1.jsx)(lucide_react_native_1.ChevronUp, { size: 32, color: "white", style: { marginBottom: 1, marginTop: -1 } }) }) }) }), (0, jsx_runtime_1.jsxs)(AnimatedView, { style: [
74
85
  animatedStyle,
75
86
  isPlayerRatioGreater
76
- ? layout.position.relative
77
- : layout.position.absolute,
78
- bottom[0],
79
- zIndex[1],
80
- w.percent[100],
87
+ ? atoms_1.layout.position.relative
88
+ : atoms_1.layout.position.absolute,
89
+ atoms_1.bottom[0],
90
+ atoms_1.zIndex[1],
91
+ atoms_1.w.percent[100],
81
92
  {
82
93
  backgroundColor: "rgba(0, 0, 0, 0.5)",
83
94
  overflow: "visible",
@@ -86,8 +97,8 @@ export function Resizable({ isPlayerRatioGreater, style = {}, children, }) {
86
97
  minWidth: "100%",
87
98
  },
88
99
  style,
89
- ], children: [_jsx(View, { style: [layout.flex.row, layout.flex.justifyCenter], children: _jsx(GestureDetector, { gesture: panGesture, children: _jsx(View, { hitSlop: { top: 20, bottom: 20, left: 20, right: 20 }, style: [
90
- w[32],
100
+ ], children: [(0, jsx_runtime_1.jsx)(view_1.View, { style: [atoms_1.layout.flex.row, atoms_1.layout.flex.justifyCenter], children: (0, jsx_runtime_1.jsx)(react_native_gesture_handler_1.GestureDetector, { gesture: panGesture, children: (0, jsx_runtime_1.jsx)(view_1.View, { hitSlop: { top: 20, bottom: 20, left: 20, right: 20 }, style: [
101
+ atoms_1.w[32],
91
102
  {
92
103
  height: 6,
93
104
  transform: [{ translateY: -10 }],
@@ -1,11 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cva } from "class-variance-authority";
3
- import React, { forwardRef } from "react";
4
- import { StyleSheet } from "react-native";
5
- import { colors, borderRadius as radius, spacing } from "../../lib/theme/atoms";
6
- import { TextPrimitive } from "./primitives/text";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextPrimitive = exports.textVariants = exports.Span = exports.Code = exports.Label = exports.Caption = exports.Body = exports.Subtitle = exports.Heading = exports.Text = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const class_variance_authority_1 = require("class-variance-authority");
7
+ const react_1 = tslib_1.__importStar(require("react"));
8
+ const react_native_1 = require("react-native");
9
+ const atoms_1 = require("../../lib/theme/atoms");
10
+ const text_1 = require("./primitives/text");
11
+ Object.defineProperty(exports, "TextPrimitive", { enumerable: true, get: function () { return text_1.TextPrimitive; } });
7
12
  // Text variants using class-variance-authority pattern
8
- const textVariants = cva("", {
13
+ const textVariants = (0, class_variance_authority_1.cva)("", {
9
14
  variants: {
10
15
  variant: {
11
16
  h1: "h1",
@@ -58,9 +63,10 @@ const textVariants = cva("", {
58
63
  color: "default",
59
64
  },
60
65
  });
61
- export const Text = forwardRef(({ variant = undefined, size = undefined, weight = undefined, color = undefined, muted = false, bold = false, italic = false, underline = false, strikethrough = false, uppercase = false, lowercase = false, capitalize = false, center = false, right = false, justify = false, customColor, style, children, ...props }, ref) => {
66
+ exports.textVariants = textVariants;
67
+ exports.Text = (0, react_1.forwardRef)(({ variant = undefined, size = undefined, weight = undefined, color = undefined, muted = false, bold = false, italic = false, underline = false, strikethrough = false, uppercase = false, lowercase = false, capitalize = false, center = false, right = false, justify = false, customColor, style, children, ...props }, ref) => {
62
68
  // Create dynamic styles based on atoms
63
- const styles = React.useMemo(() => createStyles(), []);
69
+ const styles = react_1.default.useMemo(() => createStyles(), []);
64
70
  // Override props based on convenience props
65
71
  const finalColor = customColor ? customColor : muted ? "muted" : color;
66
72
  const finalTransform = uppercase
@@ -87,89 +93,85 @@ export const Text = forwardRef(({ variant = undefined, size = undefined, weight
87
93
  // Get variant-specific styles
88
94
  const variantStyle = styles[`${variant}Style`] || {};
89
95
  const styleArr = (Array.isArray(style) ? style : [style || undefined]).filter((s) => s !== undefined);
90
- return (_jsx(TextPrimitive.Root, { ref: ref, variant: variant || "body1", size: size || "base", color: finalColor || "default", align: finalAlign, transform: finalTransform, decoration: finalDecoration, italic: italic, style: [variantStyle, ...styleArr], ...props, children: children }));
96
+ return ((0, jsx_runtime_1.jsx)(text_1.TextPrimitive.Root, { ref: ref, variant: variant || "body1", size: size || "base", color: finalColor || "default", align: finalAlign, transform: finalTransform, decoration: finalDecoration, italic: italic, style: [variantStyle, ...styleArr], ...props, children: children }));
91
97
  });
92
- Text.displayName = "Text";
98
+ exports.Text.displayName = "Text";
93
99
  // Convenience components for common text elements
94
- export const Heading = forwardRef(({ level = 1, ...props }, ref) => (_jsx(Text, { ref: ref, variant: `h${level}`, ...props })));
95
- Heading.displayName = "Heading";
96
- export const Subtitle = forwardRef(({ level = 1, ...props }, ref) => (_jsx(Text, { ref: ref, variant: level === 1 ? "subtitle1" : "subtitle2", ...props })));
97
- Subtitle.displayName = "Subtitle";
98
- export const Body = forwardRef(({ level = 1, ...props }, ref) => (_jsx(Text, { ref: ref, variant: level === 1 ? "body1" : "body2", ...props })));
99
- Body.displayName = "Body";
100
- export const Caption = forwardRef((props, ref) => _jsx(Text, { ref: ref, variant: "caption", ...props }));
101
- Caption.displayName = "Caption";
102
- export const Label = forwardRef((props, ref) => (_jsx(Text, { ref: ref, variant: "subtitle1", weight: "medium", ...props })));
103
- Label.displayName = "Label";
104
- export const Code = forwardRef(({ style, ...props }, ref) => {
105
- const styles = React.useMemo(() => createStyles(), []);
100
+ exports.Heading = (0, react_1.forwardRef)(({ level = 1, ...props }, ref) => ((0, jsx_runtime_1.jsx)(exports.Text, { ref: ref, variant: `h${level}`, ...props })));
101
+ exports.Heading.displayName = "Heading";
102
+ exports.Subtitle = (0, react_1.forwardRef)(({ level = 1, ...props }, ref) => ((0, jsx_runtime_1.jsx)(exports.Text, { ref: ref, variant: level === 1 ? "subtitle1" : "subtitle2", ...props })));
103
+ exports.Subtitle.displayName = "Subtitle";
104
+ exports.Body = (0, react_1.forwardRef)(({ level = 1, ...props }, ref) => ((0, jsx_runtime_1.jsx)(exports.Text, { ref: ref, variant: level === 1 ? "body1" : "body2", ...props })));
105
+ exports.Body.displayName = "Body";
106
+ exports.Caption = (0, react_1.forwardRef)((props, ref) => (0, jsx_runtime_1.jsx)(exports.Text, { ref: ref, variant: "caption", ...props }));
107
+ exports.Caption.displayName = "Caption";
108
+ exports.Label = (0, react_1.forwardRef)((props, ref) => ((0, jsx_runtime_1.jsx)(exports.Text, { ref: ref, variant: "subtitle1", weight: "medium", ...props })));
109
+ exports.Label.displayName = "Label";
110
+ exports.Code = (0, react_1.forwardRef)(({ style, ...props }, ref) => {
111
+ const styles = react_1.default.useMemo(() => createStyles(), []);
106
112
  // if style is not an array, convert it to an array
107
113
  const styleArr = (Array.isArray(style) ? style : [style || undefined]).filter((s) => s !== undefined);
108
- return _jsx(Text, { ref: ref, style: [styles.codeStyle, ...styleArr], ...props });
114
+ return (0, jsx_runtime_1.jsx)(exports.Text, { ref: ref, style: [styles.codeStyle, ...styleArr], ...props });
109
115
  });
110
- Code.displayName = "Code";
116
+ exports.Code.displayName = "Code";
111
117
  // Span component for inline text styling (inherits from parent)
112
- export const Span = forwardRef(({ children, ...props }, ref) => (_jsx(TextPrimitive.Span, { ref: ref, ...props, children: children })));
113
- Span.displayName = "Span";
118
+ exports.Span = (0, react_1.forwardRef)(({ children, ...props }, ref) => ((0, jsx_runtime_1.jsx)(text_1.TextPrimitive.Span, { ref: ref, ...props, children: children })));
119
+ exports.Span.displayName = "Span";
114
120
  // Create atom-based styles
115
121
  function createStyles() {
116
- return StyleSheet.create({
122
+ return react_native_1.StyleSheet.create({
117
123
  // Variant-specific styles
118
124
  h1Style: {
119
- marginBottom: spacing[4],
125
+ marginBottom: atoms_1.spacing[4],
120
126
  },
121
127
  h2Style: {
122
- marginBottom: spacing[3],
128
+ marginBottom: atoms_1.spacing[3],
123
129
  },
124
130
  h3Style: {
125
- marginBottom: spacing[3],
131
+ marginBottom: atoms_1.spacing[3],
126
132
  },
127
133
  h4Style: {
128
- marginBottom: spacing[2],
134
+ marginBottom: atoms_1.spacing[2],
129
135
  },
130
136
  h5Style: {
131
- marginBottom: spacing[2],
137
+ marginBottom: atoms_1.spacing[2],
132
138
  },
133
139
  h6Style: {
134
- marginBottom: spacing[2],
140
+ marginBottom: atoms_1.spacing[2],
135
141
  },
136
142
  subtitle1Style: {
137
- marginBottom: spacing[2],
143
+ marginBottom: atoms_1.spacing[2],
138
144
  },
139
145
  subtitle2Style: {
140
- marginBottom: spacing[1],
146
+ marginBottom: atoms_1.spacing[1],
141
147
  },
142
148
  body1Style: {
143
- marginBottom: spacing[3],
149
+ marginBottom: atoms_1.spacing[3],
144
150
  },
145
151
  body2Style: {
146
- marginBottom: spacing[2],
152
+ marginBottom: atoms_1.spacing[2],
147
153
  },
148
154
  captionStyle: {
149
- marginBottom: spacing[1],
155
+ marginBottom: atoms_1.spacing[1],
150
156
  },
151
157
  overlineStyle: {
152
- marginBottom: spacing[1],
158
+ marginBottom: atoms_1.spacing[1],
153
159
  textTransform: "uppercase",
154
160
  letterSpacing: 1,
155
161
  },
156
162
  labelStyle: {
157
- marginBottom: spacing[1],
163
+ marginBottom: atoms_1.spacing[1],
158
164
  },
159
165
  buttonStyle: {
160
166
  textAlign: "center",
161
167
  },
162
168
  codeStyle: {
163
169
  fontFamily: "monospace",
164
- backgroundColor: colors["muted"],
165
- paddingHorizontal: spacing[1],
170
+ backgroundColor: atoms_1.colors["muted"],
171
+ paddingHorizontal: atoms_1.spacing[1],
166
172
  paddingVertical: 2,
167
- borderRadius: radius.sm,
173
+ borderRadius: atoms_1.borderRadius.sm,
168
174
  fontSize: 14,
169
175
  },
170
176
  });
171
177
  }
172
- // Export text variants for external use
173
- export { textVariants };
174
- // Re-export primitive components for advanced usage
175
- export { TextPrimitive };
@@ -1,17 +1,19 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TextInput } from "react-native";
3
- import { bg, borders, flex, p, text } from "../../lib/theme/atoms";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Textarea = Textarea;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_1 = require("react-native");
6
+ const atoms_1 = require("../../lib/theme/atoms");
4
7
  function Textarea({ style, multiline = true, numberOfLines = 4, ...props }) {
5
- return (_jsx(TextInput, { style: [
6
- flex.values[1],
7
- borders.width.thin,
8
- borders.color.gray[400],
9
- bg.gray[900],
10
- p[3],
11
- text.gray[200],
8
+ return ((0, jsx_runtime_1.jsx)(react_native_1.TextInput, { style: [
9
+ atoms_1.flex.values[1],
10
+ atoms_1.borders.width.thin,
11
+ atoms_1.borders.color.gray[400],
12
+ atoms_1.bg.gray[900],
13
+ atoms_1.p[3],
14
+ atoms_1.text.gray[200],
12
15
  props.editable === false && { opacity: 0.5 },
13
16
  { borderRadius: 10 },
14
17
  style,
15
18
  ], multiline: multiline, numberOfLines: numberOfLines, textAlignVertical: "top", ...props }));
16
19
  }
17
- export { Textarea };
@@ -1,16 +1,19 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Portal } from "@rn-primitives/portal";
3
- import { useEffect, useState } from "react";
4
- import { Animated, Platform, Pressable, StyleSheet, Text, useWindowDimensions, View, } from "react-native";
5
- import { useSafeAreaInsets } from "react-native-safe-area-context";
6
- import { useTheme } from "../../lib/theme/theme";
7
- export function Toast({ open, onOpenChange, title, description, actionLabel = "Action", onAction, duration = 3, }) {
8
- const [seconds, setSeconds] = useState(duration);
9
- const insets = useSafeAreaInsets();
10
- const { theme } = useTheme();
11
- const [fadeAnim] = useState(new Animated.Value(0));
12
- const { width } = useWindowDimensions();
13
- const isWeb = Platform.OS === "web";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Toast = Toast;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const portal_1 = require("@rn-primitives/portal");
6
+ const react_1 = require("react");
7
+ const react_native_1 = require("react-native");
8
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
9
+ const theme_1 = require("../../lib/theme/theme");
10
+ function Toast({ open, onOpenChange, title, description, actionLabel = "Action", onAction, duration = 3, }) {
11
+ const [seconds, setSeconds] = (0, react_1.useState)(duration);
12
+ const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
13
+ const { theme } = (0, theme_1.useTheme)();
14
+ const [fadeAnim] = (0, react_1.useState)(new react_native_1.Animated.Value(0));
15
+ const { width } = (0, react_native_1.useWindowDimensions)();
16
+ const isWeb = react_native_1.Platform.OS === "web";
14
17
  const isDesktop = isWeb && width >= 768;
15
18
  const containerPosition = isDesktop
16
19
  ? {
@@ -30,11 +33,11 @@ export function Toast({ open, onOpenChange, title, description, actionLabel = "A
30
33
  width: "100%",
31
34
  maxWidth: undefined,
32
35
  };
33
- useEffect(() => {
36
+ (0, react_1.useEffect)(() => {
34
37
  let interval = null;
35
38
  if (open) {
36
39
  setSeconds(duration);
37
- Animated.timing(fadeAnim, {
40
+ react_native_1.Animated.timing(fadeAnim, {
38
41
  toValue: 1,
39
42
  duration: 200,
40
43
  useNativeDriver: true,
@@ -54,7 +57,7 @@ export function Toast({ open, onOpenChange, title, description, actionLabel = "A
54
57
  else {
55
58
  if (interval)
56
59
  clearInterval(interval);
57
- Animated.timing(fadeAnim, {
60
+ react_native_1.Animated.timing(fadeAnim, {
58
61
  toValue: 0,
59
62
  duration: 150,
60
63
  useNativeDriver: true,
@@ -69,7 +72,7 @@ export function Toast({ open, onOpenChange, title, description, actionLabel = "A
69
72
  }, [open, duration]);
70
73
  if (!open)
71
74
  return null;
72
- return (_jsx(Portal, { name: "toast", children: _jsx(Animated.View, { style: [styles.container, containerPosition, { opacity: fadeAnim }], pointerEvents: "box-none", children: _jsxs(View, { style: [
75
+ return ((0, jsx_runtime_1.jsx)(portal_1.Portal, { name: "toast", children: (0, jsx_runtime_1.jsx)(react_native_1.Animated.View, { style: [styles.container, containerPosition, { opacity: fadeAnim }], pointerEvents: "box-none", children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
73
76
  styles.toast,
74
77
  {
75
78
  backgroundColor: theme.colors.secondary,
@@ -81,34 +84,34 @@ export function Toast({ open, onOpenChange, title, description, actionLabel = "A
81
84
  padding: theme.spacing[4],
82
85
  width: isDesktop ? "100%" : "95%",
83
86
  },
84
- ], children: [_jsxs(View, { style: { gap: theme.spacing[1], width: "100%" }, children: [_jsx(Text, { style: [
87
+ ], children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { gap: theme.spacing[1], width: "100%" }, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [
85
88
  {
86
89
  color: theme.colors.foreground,
87
90
  fontSize: 16,
88
91
  fontWeight: "500",
89
92
  },
90
- ], children: title }), description ? (_jsx(Text, { style: [{ color: theme.colors.foreground, fontSize: 14 }], children: description })) : null] }), _jsxs(View, { style: {
93
+ ], children: title }), description ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [{ color: theme.colors.foreground, fontSize: 14 }], children: description })) : null] }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: {
91
94
  gap: theme.spacing[1],
92
95
  flexDirection: "row",
93
96
  justifyContent: "flex-end",
94
97
  width: "100%",
95
- }, children: [onAction && (_jsx(Pressable, { style: [
98
+ }, children: [onAction && ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { style: [
96
99
  styles.button,
97
100
  {
98
101
  borderColor: theme.colors.primary,
99
102
  paddingHorizontal: theme.spacing[4],
100
103
  paddingVertical: theme.spacing[2],
101
104
  },
102
- ], onPress: onAction, children: _jsx(Text, { style: { color: theme.colors.foreground }, children: actionLabel }) })), _jsx(Pressable, { style: [
105
+ ], onPress: onAction, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.colors.foreground }, children: actionLabel }) })), (0, jsx_runtime_1.jsx)(react_native_1.Pressable, { style: [
103
106
  styles.button,
104
107
  {
105
108
  borderColor: theme.colors.primary,
106
109
  paddingHorizontal: theme.spacing[4],
107
110
  paddingVertical: theme.spacing[2],
108
111
  },
109
- ], onPress: () => onOpenChange(false), children: _jsx(Text, { style: { color: theme.colors.foreground }, children: "Close" }) })] })] }) }) }));
112
+ ], onPress: () => onOpenChange(false), children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: theme.colors.foreground }, children: "Close" }) })] })] }) }) }));
110
113
  }
111
- const styles = StyleSheet.create({
114
+ const styles = react_native_1.StyleSheet.create({
112
115
  container: {
113
116
  position: "absolute",
114
117
  zIndex: 1000,
@@ -1,11 +1,14 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cva } from "class-variance-authority";
3
- import { forwardRef } from "react";
4
- import { View as RNView, } from "react-native";
5
- import { borderRadius as radius, spacing } from "../../lib/theme/atoms";
6
- import { useTheme } from "../../lib/theme/theme";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.viewVariants = exports.Center = exports.Column = exports.Row = exports.Overlay = exports.Surface = exports.Container = exports.Card = exports.View = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const class_variance_authority_1 = require("class-variance-authority");
6
+ const react_1 = require("react");
7
+ const react_native_1 = require("react-native");
8
+ const atoms_1 = require("../../lib/theme/atoms");
9
+ const theme_1 = require("../../lib/theme/theme");
7
10
  // View variants using class-variance-authority pattern
8
- const viewVariants = cva("", {
11
+ const viewVariants = (0, class_variance_authority_1.cva)("", {
9
12
  variants: {
10
13
  variant: {
11
14
  default: "default",
@@ -67,15 +70,16 @@ const viewVariants = cva("", {
67
70
  flex: "none",
68
71
  },
69
72
  });
70
- export const View = forwardRef(({ variant = "default", padding = "none", margin = "none", direction = "column", align = "stretch", justify = "start", flex = "none", fullWidth = false, fullHeight = false, centered = false, backgroundColor, borderColor, borderWidth, borderRadius, shadow = false, style, ...props }, ref) => {
71
- const { theme } = useTheme();
73
+ exports.viewVariants = viewVariants;
74
+ exports.View = (0, react_1.forwardRef)(({ variant = "default", padding = "none", margin = "none", direction = "column", align = "stretch", justify = "start", flex = "none", fullWidth = false, fullHeight = false, centered = false, backgroundColor, borderColor, borderWidth, borderRadius, shadow = false, style, ...props }, ref) => {
75
+ const { theme } = (0, theme_1.useTheme)();
72
76
  // Map variant to styles
73
77
  const variantStyles = (() => {
74
78
  switch (variant) {
75
79
  case "card":
76
80
  return {
77
81
  backgroundColor: theme.colors.card,
78
- borderRadius: radius.lg,
82
+ borderRadius: atoms_1.borderRadius.lg,
79
83
  shadowColor: "#000",
80
84
  shadowOffset: { width: 0, height: 2 },
81
85
  shadowOpacity: 0.1,
@@ -93,7 +97,7 @@ export const View = forwardRef(({ variant = "default", padding = "none", margin
93
97
  case "container":
94
98
  return {
95
99
  backgroundColor: theme.colors.background,
96
- padding: spacing[4],
100
+ padding: atoms_1.spacing[4],
97
101
  };
98
102
  default:
99
103
  return {};
@@ -103,15 +107,15 @@ export const View = forwardRef(({ variant = "default", padding = "none", margin
103
107
  const paddingValue = (() => {
104
108
  switch (padding) {
105
109
  case "xs":
106
- return spacing[1];
110
+ return atoms_1.spacing[1];
107
111
  case "sm":
108
- return spacing[2];
112
+ return atoms_1.spacing[2];
109
113
  case "md":
110
- return spacing[3];
114
+ return atoms_1.spacing[3];
111
115
  case "lg":
112
- return spacing[4];
116
+ return atoms_1.spacing[4];
113
117
  case "xl":
114
- return spacing[5];
118
+ return atoms_1.spacing[5];
115
119
  default:
116
120
  return undefined;
117
121
  }
@@ -120,15 +124,15 @@ export const View = forwardRef(({ variant = "default", padding = "none", margin
120
124
  const marginValue = (() => {
121
125
  switch (margin) {
122
126
  case "xs":
123
- return spacing[1];
127
+ return atoms_1.spacing[1];
124
128
  case "sm":
125
- return spacing[2];
129
+ return atoms_1.spacing[2];
126
130
  case "md":
127
- return spacing[3];
131
+ return atoms_1.spacing[3];
128
132
  case "lg":
129
- return spacing[4];
133
+ return atoms_1.spacing[4];
130
134
  case "xl":
131
- return spacing[5];
135
+ return atoms_1.spacing[5];
132
136
  default:
133
137
  return undefined;
134
138
  }
@@ -228,23 +232,21 @@ export const View = forwardRef(({ variant = "default", padding = "none", margin
228
232
  const finalStyle = Array.isArray(style)
229
233
  ? [computedStyle, ...style]
230
234
  : [computedStyle, style];
231
- return _jsx(RNView, { ref: ref, style: finalStyle, ...props });
235
+ return (0, jsx_runtime_1.jsx)(react_native_1.View, { ref: ref, style: finalStyle, ...props });
232
236
  });
233
- View.displayName = "View";
237
+ exports.View.displayName = "View";
234
238
  // Convenience components
235
- export const Card = forwardRef((props, ref) => _jsx(View, { ref: ref, variant: "card", ...props }));
236
- Card.displayName = "Card";
237
- export const Container = forwardRef((props, ref) => _jsx(View, { ref: ref, variant: "container", ...props }));
238
- Container.displayName = "Container";
239
- export const Surface = forwardRef((props, ref) => _jsx(View, { ref: ref, variant: "surface", ...props }));
240
- Surface.displayName = "Surface";
241
- export const Overlay = forwardRef((props, ref) => _jsx(View, { ref: ref, variant: "overlay", ...props }));
242
- Overlay.displayName = "Overlay";
243
- export const Row = forwardRef((props, ref) => _jsx(View, { ref: ref, direction: "row", ...props }));
244
- Row.displayName = "Row";
245
- export const Column = forwardRef((props, ref) => _jsx(View, { ref: ref, direction: "column", ...props }));
246
- Column.displayName = "Column";
247
- export const Center = forwardRef((props, ref) => (_jsx(View, { ref: ref, centered: true, ...props })));
248
- Center.displayName = "Center";
249
- // Export view variants for external use
250
- export { viewVariants };
239
+ exports.Card = (0, react_1.forwardRef)((props, ref) => (0, jsx_runtime_1.jsx)(exports.View, { ref: ref, variant: "card", ...props }));
240
+ exports.Card.displayName = "Card";
241
+ exports.Container = (0, react_1.forwardRef)((props, ref) => (0, jsx_runtime_1.jsx)(exports.View, { ref: ref, variant: "container", ...props }));
242
+ exports.Container.displayName = "Container";
243
+ exports.Surface = (0, react_1.forwardRef)((props, ref) => (0, jsx_runtime_1.jsx)(exports.View, { ref: ref, variant: "surface", ...props }));
244
+ exports.Surface.displayName = "Surface";
245
+ exports.Overlay = (0, react_1.forwardRef)((props, ref) => (0, jsx_runtime_1.jsx)(exports.View, { ref: ref, variant: "overlay", ...props }));
246
+ exports.Overlay.displayName = "Overlay";
247
+ exports.Row = (0, react_1.forwardRef)((props, ref) => (0, jsx_runtime_1.jsx)(exports.View, { ref: ref, direction: "row", ...props }));
248
+ exports.Row.displayName = "Row";
249
+ exports.Column = (0, react_1.forwardRef)((props, ref) => (0, jsx_runtime_1.jsx)(exports.View, { ref: ref, direction: "column", ...props }));
250
+ exports.Column.displayName = "Column";
251
+ exports.Center = (0, react_1.forwardRef)((props, ref) => ((0, jsx_runtime_1.jsx)(exports.View, { ref: ref, centered: true, ...props })));
252
+ exports.Center.displayName = "Center";
@@ -1,9 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
1
4
  // barrel file :)
2
- export * from "./useAvatars";
3
- export * from "./useCameraToggle";
4
- export * from "./useKeyboard";
5
- export * from "./useKeyboardSlide";
6
- export * from "./useLivestreamInfo";
7
- export * from "./useOuterAndInnerDimensions";
8
- export * from "./usePlayerDimensions";
9
- export * from "./useSegmentTiming";
5
+ tslib_1.__exportStar(require("./useAvatars"), exports);
6
+ tslib_1.__exportStar(require("./useCameraToggle"), exports);
7
+ tslib_1.__exportStar(require("./useKeyboard"), exports);
8
+ tslib_1.__exportStar(require("./useKeyboardSlide"), exports);
9
+ tslib_1.__exportStar(require("./useLivestreamInfo"), exports);
10
+ tslib_1.__exportStar(require("./useOuterAndInnerDimensions"), exports);
11
+ tslib_1.__exportStar(require("./usePlayerDimensions"), exports);
12
+ tslib_1.__exportStar(require("./useSegmentDimensions"), exports);
13
+ tslib_1.__exportStar(require("./useSegmentTiming"), exports);
@@ -1,11 +1,14 @@
1
- import { useEffect, useMemo, useRef, useState } from "react";
2
- import { usePDSAgent } from "../streamplace-store/xrpc";
3
- export function useAvatars(dids) {
4
- let agent = usePDSAgent();
5
- const [profiles, setProfiles] = useState({});
6
- const inFlight = useRef(new Set());
7
- const missingDids = useMemo(() => dids.filter((did) => !(did in profiles) && !inFlight.current.has(did)), [dids, profiles]);
8
- useEffect(() => {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAvatars = useAvatars;
4
+ const react_1 = require("react");
5
+ const xrpc_1 = require("../streamplace-store/xrpc");
6
+ function useAvatars(dids) {
7
+ let agent = (0, xrpc_1.usePDSAgent)();
8
+ const [profiles, setProfiles] = (0, react_1.useState)({});
9
+ const inFlight = (0, react_1.useRef)(new Set());
10
+ const missingDids = (0, react_1.useMemo)(() => dids.filter((did) => !(did in profiles) && !inFlight.current.has(did)), [dids, profiles]);
11
+ (0, react_1.useEffect)(() => {
9
12
  if (missingDids.length === 0 || !agent)
10
13
  return;
11
14
  const toFetch = missingDids.slice(0, 25);