@streamplace/components 0.9.0 → 0.9.1

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 (138) hide show
  1. package/dist/components/chat/chat-box.d.ts.map +1 -1
  2. package/dist/components/chat/chat-box.js +90 -34
  3. package/dist/components/chat/chat-box.js.map +1 -1
  4. package/dist/components/chat/chat-message.d.ts +4 -0
  5. package/dist/components/chat/chat-message.d.ts.map +1 -1
  6. package/dist/components/chat/chat-message.js +3 -2
  7. package/dist/components/chat/chat-message.js.map +1 -1
  8. package/dist/components/chat/chat.d.ts.map +1 -1
  9. package/dist/components/chat/chat.js +56 -3
  10. package/dist/components/chat/chat.js.map +1 -1
  11. package/dist/components/chat/emoji-suggestions.d.ts.map +1 -1
  12. package/dist/components/chat/emoji-suggestions.js +11 -11
  13. package/dist/components/chat/emoji-suggestions.js.map +1 -1
  14. package/dist/components/chat/mention-suggestions.d.ts.map +1 -1
  15. package/dist/components/chat/mention-suggestions.js +20 -19
  16. package/dist/components/chat/mention-suggestions.js.map +1 -1
  17. package/dist/components/chat/system-message.d.ts +5 -1
  18. package/dist/components/chat/system-message.d.ts.map +1 -1
  19. package/dist/components/chat/system-message.js +4 -4
  20. package/dist/components/chat/system-message.js.map +1 -1
  21. package/dist/components/mobile-player/shared.d.ts +1 -1
  22. package/dist/components/mobile-player/shared.d.ts.map +1 -1
  23. package/dist/components/mobile-player/shared.js +11 -10
  24. package/dist/components/mobile-player/shared.js.map +1 -1
  25. package/dist/components/mobile-player/ui/viewer-context-menu.d.ts +1 -1
  26. package/dist/components/mobile-player/ui/viewer-context-menu.d.ts.map +1 -1
  27. package/dist/components/mobile-player/ui/viewer-context-menu.js +60 -43
  28. package/dist/components/mobile-player/ui/viewer-context-menu.js.map +1 -1
  29. package/dist/components/stream-notification/index.d.ts +3 -0
  30. package/dist/components/stream-notification/index.d.ts.map +1 -0
  31. package/dist/components/stream-notification/index.js +9 -0
  32. package/dist/components/stream-notification/index.js.map +1 -0
  33. package/dist/components/stream-notification/stream-notification-manager.d.ts +36 -0
  34. package/dist/components/stream-notification/stream-notification-manager.d.ts.map +1 -0
  35. package/dist/components/stream-notification/stream-notification-manager.js +96 -0
  36. package/dist/components/stream-notification/stream-notification-manager.js.map +1 -0
  37. package/dist/components/stream-notification/stream-notification.d.ts +5 -0
  38. package/dist/components/stream-notification/stream-notification.d.ts.map +1 -0
  39. package/dist/components/stream-notification/stream-notification.js +146 -0
  40. package/dist/components/stream-notification/stream-notification.js.map +1 -0
  41. package/dist/components/stream-notification/teleport-notification.d.ts +8 -0
  42. package/dist/components/stream-notification/teleport-notification.d.ts.map +1 -0
  43. package/dist/components/stream-notification/teleport-notification.js +116 -0
  44. package/dist/components/stream-notification/teleport-notification.js.map +1 -0
  45. package/dist/components/ui/button.d.ts +1 -1
  46. package/dist/components/ui/button.d.ts.map +1 -1
  47. package/dist/components/ui/button.js +7 -0
  48. package/dist/components/ui/button.js.map +1 -1
  49. package/dist/components/ui/dialog.d.ts +2 -2
  50. package/dist/components/ui/dropdown.d.ts +4 -0
  51. package/dist/components/ui/dropdown.d.ts.map +1 -1
  52. package/dist/components/ui/dropdown.js +41 -15
  53. package/dist/components/ui/dropdown.js.map +1 -1
  54. package/dist/components/ui/index.d.ts +1 -0
  55. package/dist/components/ui/index.d.ts.map +1 -1
  56. package/dist/components/ui/index.js +1 -0
  57. package/dist/components/ui/index.js.map +1 -1
  58. package/dist/components/ui/portal.d.ts +2 -0
  59. package/dist/components/ui/portal.d.ts.map +1 -0
  60. package/dist/components/ui/portal.js +5 -0
  61. package/dist/components/ui/portal.js.map +1 -0
  62. package/dist/components/ui/portal.web.d.ts +11 -0
  63. package/dist/components/ui/portal.web.d.ts.map +1 -0
  64. package/dist/components/ui/portal.web.js +22 -0
  65. package/dist/components/ui/portal.web.js.map +1 -0
  66. package/dist/components/ui/resizeable.d.ts +2 -1
  67. package/dist/components/ui/resizeable.d.ts.map +1 -1
  68. package/dist/components/ui/resizeable.js +68 -26
  69. package/dist/components/ui/resizeable.js.map +1 -1
  70. package/dist/components/ui/text.d.ts +1 -1
  71. package/dist/components/ui/view.d.ts +3 -3
  72. package/dist/index.d.ts +2 -0
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +2 -0
  75. package/dist/index.js.map +1 -1
  76. package/dist/lib/slash-commands/teleport.d.ts +4 -0
  77. package/dist/lib/slash-commands/teleport.d.ts.map +1 -0
  78. package/dist/lib/slash-commands/teleport.js +110 -0
  79. package/dist/lib/slash-commands/teleport.js.map +1 -0
  80. package/dist/lib/slash-commands.d.ts +16 -0
  81. package/dist/lib/slash-commands.d.ts.map +1 -0
  82. package/dist/lib/slash-commands.js +46 -0
  83. package/dist/lib/slash-commands.js.map +1 -0
  84. package/dist/lib/stream-notifications.d.ts +13 -0
  85. package/dist/lib/stream-notifications.d.ts.map +1 -0
  86. package/dist/lib/stream-notifications.js +46 -0
  87. package/dist/lib/stream-notifications.js.map +1 -0
  88. package/dist/lib/system-messages.d.ts +4 -8
  89. package/dist/lib/system-messages.d.ts.map +1 -1
  90. package/dist/lib/system-messages.js +38 -2
  91. package/dist/lib/system-messages.js.map +1 -1
  92. package/dist/lib/theme/atoms.d.ts +193 -193
  93. package/dist/livestream-provider/index.d.ts +7 -2
  94. package/dist/livestream-provider/index.d.ts.map +1 -1
  95. package/dist/livestream-provider/index.js +72 -4
  96. package/dist/livestream-provider/index.js.map +1 -1
  97. package/dist/livestream-store/livestream-state.d.ts +4 -1
  98. package/dist/livestream-store/livestream-state.d.ts.map +1 -1
  99. package/dist/livestream-store/livestream-store.d.ts.map +1 -1
  100. package/dist/livestream-store/livestream-store.js +3 -0
  101. package/dist/livestream-store/livestream-store.js.map +1 -1
  102. package/dist/livestream-store/websocket-consumer.d.ts.map +1 -1
  103. package/dist/livestream-store/websocket-consumer.js +30 -43
  104. package/dist/livestream-store/websocket-consumer.js.map +1 -1
  105. package/dist/streamplace-store/index.d.ts +1 -0
  106. package/dist/streamplace-store/index.d.ts.map +1 -1
  107. package/dist/streamplace-store/index.js +1 -0
  108. package/dist/streamplace-store/index.js.map +1 -1
  109. package/node-compile-cache/v22.15.0-x64-efe9a9df-0/37be0eec +0 -0
  110. package/package.json +4 -2
  111. package/src/components/chat/chat-box.tsx +126 -53
  112. package/src/components/chat/chat-message.tsx +1 -1
  113. package/src/components/chat/chat.tsx +79 -5
  114. package/src/components/chat/emoji-suggestions.tsx +27 -25
  115. package/src/components/chat/mention-suggestions.tsx +36 -33
  116. package/src/components/chat/system-message.tsx +14 -5
  117. package/src/components/mobile-player/shared.tsx +2 -1
  118. package/src/components/mobile-player/ui/viewer-context-menu.tsx +192 -166
  119. package/src/components/stream-notification/index.ts +5 -0
  120. package/src/components/stream-notification/stream-notification-manager.ts +140 -0
  121. package/src/components/stream-notification/stream-notification.tsx +227 -0
  122. package/src/components/stream-notification/teleport-notification.tsx +187 -0
  123. package/src/components/ui/button.tsx +7 -0
  124. package/src/components/ui/dropdown.tsx +96 -26
  125. package/src/components/ui/index.ts +1 -0
  126. package/src/components/ui/portal.tsx +1 -0
  127. package/src/components/ui/portal.web.tsx +37 -0
  128. package/src/components/ui/resizeable.tsx +89 -35
  129. package/src/index.tsx +3 -0
  130. package/src/lib/slash-commands/teleport.ts +136 -0
  131. package/src/lib/slash-commands.ts +65 -0
  132. package/src/lib/stream-notifications.ts +51 -0
  133. package/src/lib/system-messages.ts +52 -2
  134. package/src/livestream-provider/index.tsx +106 -3
  135. package/src/livestream-store/livestream-state.tsx +4 -0
  136. package/src/livestream-store/livestream-store.tsx +3 -0
  137. package/src/livestream-store/websocket-consumer.tsx +35 -54
  138. package/src/streamplace-store/index.tsx +1 -0
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Portal = Portal;
4
+ exports.PortalHost = PortalHost;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const react_dom_1 = require("react-dom");
8
+ function Portal({ children, hostName = "INTERNAL_PRIMITIVE_DEFAULT_HOST_NAME", }) {
9
+ const [hostElement, setHostElement] = (0, react_1.useState)(null);
10
+ (0, react_1.useEffect)(() => {
11
+ const element = document.querySelector(`[data-portal-host="${hostName}"]`);
12
+ setHostElement(element);
13
+ }, [hostName]);
14
+ if (!hostElement) {
15
+ return null;
16
+ }
17
+ return (0, react_dom_1.createPortal)(children, hostElement);
18
+ }
19
+ function PortalHost({ name = "INTERNAL_PRIMITIVE_DEFAULT_HOST_NAME", }) {
20
+ return (0, jsx_runtime_1.jsx)("div", { "data-portal-host": name });
21
+ }
22
+ //# sourceMappingURL=portal.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal.web.js","sourceRoot":"","sources":["../../../src/components/ui/portal.web.tsx"],"names":[],"mappings":";;AAoCS,wBAAM;AAAE,gCAAU;;AApC3B,iCAAmD;AACnD,yCAAyC;AAEzC,SAAS,MAAM,CAAC,EACd,QAAQ,EACR,QAAQ,GAAG,sCAAsC,GAIlD;IACC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAqB,IAAI,CAAC,CAAC;IAEzE,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CACpC,sBAAsB,QAAQ,IAAI,CACnC,CAAC;QACF,cAAc,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,IAAA,wBAAY,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC7C,CAAC;AAMD,SAAS,UAAU,CAAC,EAClB,IAAI,GAAG,sCAAsC,GAC7B;IAChB,OAAO,oDAAuB,IAAI,GAAI,CAAC;AACzC,CAAC"}
@@ -5,8 +5,9 @@ type ResizableChatSheetProps = {
5
5
  isPlayerRatioGreater: boolean;
6
6
  style?: ComponentProps<typeof AnimatedView>["style"];
7
7
  children?: React.ReactNode;
8
+ renderAbove?: (isCollapsed: boolean) => React.ReactNode;
8
9
  };
9
- export declare function Resizable({ startingPercentage, isPlayerRatioGreater, style, children, }: ResizableChatSheetProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function Resizable({ startingPercentage, isPlayerRatioGreater, style, children, renderAbove, }: ResizableChatSheetProps): import("react/jsx-runtime").JSX.Element;
10
11
  export declare namespace Resizable {
11
12
  var displayName: string;
12
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"resizeable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizeable.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAmBlD,QAAA,MAAM,YAAY,4KAAyC,CAAC;AAI5D,KAAK,uBAAuB,GAAG;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAIF,wBAAgB,SAAS,CAAC,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,KAAU,EACV,QAAQ,GACT,EAAE,uBAAuB,2CAuJzB;yBA5Je,SAAS"}
1
+ {"version":3,"file":"resizeable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizeable.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAoB5D,QAAA,MAAM,YAAY,4KAAyC,CAAC;AAI5D,KAAK,uBAAuB,GAAG;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;CACzD,CAAC;AAIF,wBAAgB,SAAS,CAAC,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,KAAU,EACV,QAAQ,EACR,WAAW,GACZ,EAAE,uBAAuB,2CA0MzB;yBAhNe,SAAS"}
@@ -15,7 +15,7 @@ const view_1 = require("./view");
15
15
  const AnimatedView = react_native_reanimated_1.default.createAnimatedComponent(view_1.View);
16
16
  const { height: SCREEN_HEIGHT } = react_native_1.Dimensions.get("window");
17
17
  const SPRING_CONFIG = { damping: 20, stiffness: 100 };
18
- function Resizable({ startingPercentage, isPlayerRatioGreater, style = {}, children, }) {
18
+ function Resizable({ startingPercentage, isPlayerRatioGreater, style = {}, children, renderAbove, }) {
19
19
  const { slideKeyboard } = (0, hooks_1.useKeyboardSlide)();
20
20
  const { bottom: safeBottom } = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
21
21
  const MAX_HEIGHT = (SCREEN_HEIGHT - safeBottom) * 0.55;
@@ -23,9 +23,15 @@ function Resizable({ startingPercentage, isPlayerRatioGreater, style = {}, child
23
23
  const COLLAPSE_HEIGHT = (SCREEN_HEIGHT - safeBottom) * 0.1;
24
24
  const sheetHeight = (0, react_native_reanimated_1.useSharedValue)(MIN_HEIGHT);
25
25
  const startHeight = (0, react_native_reanimated_1.useSharedValue)(MIN_HEIGHT);
26
+ const [isCollapsed, setIsCollapsed] = (0, react_1.useState)(true);
27
+ const wasCollapsed = (0, react_native_reanimated_1.useSharedValue)(true);
26
28
  (0, react_1.useEffect)(() => {
27
29
  setTimeout(() => {
28
- sheetHeight.value = (0, react_native_reanimated_1.withSpring)(startingPercentage ? startingPercentage * SCREEN_HEIGHT : MIN_HEIGHT, SPRING_CONFIG);
30
+ const targetHeight = startingPercentage
31
+ ? startingPercentage * SCREEN_HEIGHT
32
+ : MIN_HEIGHT;
33
+ sheetHeight.value = (0, react_native_reanimated_1.withSpring)(targetHeight, SPRING_CONFIG);
34
+ setIsCollapsed(targetHeight < COLLAPSE_HEIGHT);
29
35
  }, 1000);
30
36
  }, []);
31
37
  const panGesture = react_native_gesture_handler_1.Gesture.Pan()
@@ -39,8 +45,15 @@ function Resizable({ startingPercentage, isPlayerRatioGreater, style = {}, child
39
45
  if (newHeight < MIN_HEIGHT)
40
46
  newHeight = MIN_HEIGHT;
41
47
  sheetHeight.value = newHeight;
42
- if (newHeight < COLLAPSE_HEIGHT) {
48
+ const nowCollapsed = newHeight < COLLAPSE_HEIGHT;
49
+ if (nowCollapsed && !wasCollapsed.value) {
43
50
  sheetHeight.value = (0, react_native_reanimated_1.withSpring)(MIN_HEIGHT, SPRING_CONFIG);
51
+ wasCollapsed.value = true;
52
+ (0, react_native_reanimated_1.runOnJS)(setIsCollapsed)(true);
53
+ }
54
+ else if (!nowCollapsed && wasCollapsed.value) {
55
+ wasCollapsed.value = false;
56
+ (0, react_native_reanimated_1.runOnJS)(setIsCollapsed)(false);
44
57
  }
45
58
  });
46
59
  const animatedStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({
@@ -62,6 +75,17 @@ function Resizable({ startingPercentage, isPlayerRatioGreater, style = {}, child
62
75
  },
63
76
  ],
64
77
  }));
78
+ const aboveElementStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({
79
+ // show inside area when not collapsed, and show outside area when collapsed
80
+ height: sheetHeight.value < COLLAPSE_HEIGHT ? 0 : sheetHeight.value,
81
+ transform: [
82
+ {
83
+ translateY: sheetHeight.value < COLLAPSE_HEIGHT
84
+ ? (0, react_native_reanimated_1.withSpring)(-120)
85
+ : (0, react_native_reanimated_1.withSpring)(20),
86
+ },
87
+ ],
88
+ }));
65
89
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: [
66
90
  handleAnimatedStyle,
67
91
  atoms_1.layout.position.absolute,
@@ -70,10 +94,11 @@ function Resizable({ startingPercentage, isPlayerRatioGreater, style = {}, child
70
94
  atoms_1.layout.flex.center,
71
95
  atoms_1.zIndex[1],
72
96
  ], children: (0, jsx_runtime_1.jsx)(react_native_gesture_handler_1.Pressable, { onPress: () => {
73
- sheetHeight.value =
74
- sheetHeight.value === MIN_HEIGHT
75
- ? (0, react_native_reanimated_1.withSpring)(MAX_HEIGHT, SPRING_CONFIG)
76
- : (0, react_native_reanimated_1.withSpring)(MIN_HEIGHT, SPRING_CONFIG);
97
+ const isCurrentlyCollapsed = sheetHeight.value === MIN_HEIGHT;
98
+ sheetHeight.value = isCurrentlyCollapsed
99
+ ? (0, react_native_reanimated_1.withSpring)(MAX_HEIGHT, SPRING_CONFIG)
100
+ : (0, react_native_reanimated_1.withSpring)(MIN_HEIGHT, SPRING_CONFIG);
101
+ setIsCollapsed(!isCurrentlyCollapsed);
77
102
  }, children: (0, jsx_runtime_1.jsx)(view_1.View, { style: [
78
103
  atoms_1.p[1],
79
104
  {
@@ -97,26 +122,43 @@ function Resizable({ startingPercentage, isPlayerRatioGreater, style = {}, child
97
122
  minWidth: "100%",
98
123
  },
99
124
  style,
100
- ], children: [(0, jsx_runtime_1.jsx)(view_1.View, { style: [atoms_1.layout.flex.row, atoms_1.layout.flex.justifyCenter, atoms_1.h[2]], children: (0, jsx_runtime_1.jsx)(react_native_gesture_handler_1.GestureDetector, { gesture: panGesture, children: (0, jsx_runtime_1.jsx)(view_1.View
101
- // Make the touch area much larger, but keep the visible handle small
102
- , {
125
+ ], children: [(0, jsx_runtime_1.jsx)(view_1.View, { style: [atoms_1.layout.flex.row, atoms_1.layout.flex.justifyCenter, atoms_1.h[2]], children: (0, jsx_runtime_1.jsx)(view_1.View, { style: { alignItems: "center", width: "100%" }, children: (0, jsx_runtime_1.jsx)(react_native_gesture_handler_1.GestureDetector, { gesture: panGesture, children: (0, jsx_runtime_1.jsx)(view_1.View
103
126
  // Make the touch area much larger, but keep the visible handle small
104
- style: {
105
- height: 30, // Large touch area
106
- width: 120, // Wide enough for thumbs
107
- alignItems: "center",
108
- justifyContent: "center",
109
- //backgroundColor: "rgba(0,255,255,0.1)",
110
- transform: [{ translateY: -30 }],
111
- }, children: (0, jsx_runtime_1.jsx)(view_1.View, { style: [
112
- atoms_1.w[32],
113
- {
114
- height: 6,
115
- backgroundColor: "#eeeeee66",
116
- borderRadius: 999,
117
- transform: [{ translateY: 5 }],
118
- },
119
- ] }) }) }) }), children] })] }));
127
+ , {
128
+ // Make the touch area much larger, but keep the visible handle small
129
+ style: {
130
+ height: 30, // Large touch area
131
+ width: 120, // Wide enough for thumbs
132
+ alignItems: "center",
133
+ justifyContent: "center",
134
+ //backgroundColor: "rgba(0,255,255,0.1)",
135
+ transform: [{ translateY: -30 }],
136
+ }, children: (0, jsx_runtime_1.jsx)(view_1.View, { style: [
137
+ atoms_1.w[32],
138
+ {
139
+ height: 6,
140
+ backgroundColor: "#eeeeee66",
141
+ borderRadius: 999,
142
+ transform: [{ translateY: 5 }],
143
+ },
144
+ ] }) }) }) }) }), children] }), (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: [
145
+ aboveElementStyle,
146
+ {
147
+ width: "100%",
148
+ pointerEvents: "none",
149
+ position: "absolute",
150
+ bottom: 0,
151
+ },
152
+ ], children: (0, jsx_runtime_1.jsx)(view_1.View, { style: {
153
+ pointerEvents: "auto",
154
+ width: "100%",
155
+ // hate doing it this way, but can't figure out
156
+ // how to make it size to content otherwise
157
+ minHeight: 50,
158
+ height: "100%",
159
+ maxHeight: 75,
160
+ flex: 0,
161
+ }, children: renderAbove?.(isCollapsed) }) })] }));
120
162
  }
121
163
  Resizable.displayName = "ResizableChatSheet";
122
164
  //# sourceMappingURL=resizeable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resizeable.js","sourceRoot":"","sources":["../../../src/components/ui/resizeable.tsx"],"names":[],"mappings":";;AAiCA,8BA4J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B,QAAQ,EAAE,UAAU;wBACpB,MAAM,EAAE,CAAC;qBACV;iBACF,YAED,uBAAC,WAAI,IACH,KAAK,EAAE;wBACL,aAAa,EAAE,MAAM;wBACrB,KAAK,EAAE,MAAM;wBACb,+CAA+C;wBAC/C,2CAA2C;wBAC3C,SAAS,EAAE,EAAE;wBACb,MAAM,EAAE,MAAM;wBACd,SAAS,EAAE,EAAE;wBACb,IAAI,EAAE,CAAC;qBACR,YAEA,WAAW,EAAE,CAAC,WAAW,CAAC,GACtB,GACO,IACf,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,CAAC,WAAW,GAAG,oBAAoB,CAAC"}
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
2
2
  import React from "react";
3
3
  import { TextPrimitive, TextPrimitiveProps } from "./primitives/text";
4
4
  declare const textVariants: (props?: ({
5
- variant?: "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "body1" | "body2" | "overline" | "subtitle1" | "subtitle2" | null | undefined;
5
+ variant?: "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | null | undefined;
6
6
  size?: "base" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | null | undefined;
7
7
  weight?: "bold" | "normal" | "thin" | "light" | "medium" | "semibold" | "black" | "extrabold" | null | undefined;
8
8
  color?: "muted" | "warning" | "default" | "primary" | "secondary" | "destructive" | "success" | null | undefined;
@@ -1,12 +1,12 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import { View as RNView, ViewProps as RNViewProps, ViewStyle } from "react-native";
3
3
  declare const viewVariants: (props?: ({
4
- variant?: "overlay" | "default" | "container" | "card" | "surface" | null | undefined;
4
+ variant?: "overlay" | "container" | "default" | "card" | "surface" | null | undefined;
5
5
  padding?: "none" | "xs" | "sm" | "lg" | "xl" | "md" | null | undefined;
6
6
  margin?: "none" | "xs" | "sm" | "lg" | "xl" | "md" | null | undefined;
7
7
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
8
- align?: "center" | "stretch" | "baseline" | "start" | "end" | null | undefined;
9
- justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | null | undefined;
8
+ align?: "center" | "stretch" | "baseline" | "end" | "start" | null | undefined;
9
+ justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
10
10
  flex?: "auto" | "none" | "initial" | null | undefined;
11
11
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
12
  export interface ViewProps extends Omit<RNViewProps, "style">, Omit<VariantProps<typeof viewVariants>, "flex"> {
package/dist/index.d.ts CHANGED
@@ -20,6 +20,8 @@ export * from "./components/chat/chat-box";
20
20
  export * from "./components/chat/system-message";
21
21
  export { default as VideoRetry } from "./components/mobile-player/video-retry";
22
22
  export * from "./lib/system-messages";
23
+ export * from "./components/stream-notification";
24
+ export * from "./lib/stream-notifications";
23
25
  export * from "./utils/format-handle";
24
26
  export { DanmuOverlay } from "./components/danmu/danmu-overlay";
25
27
  export { DanmuOverlayOBS } from "./components/danmu/danmu-overlay-obs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,mBAAmB,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EACL,cAAc,EACd,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,cAAc,iBAAiB,C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MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAEhC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,cAAc,SAAS,CAAC;AAGxB,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,cAAc,aAAa,CAAC;AAE5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAC/E,cAAc,uBAAuB,CAAC;AAEtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAE3C,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,OAAO,EACL,gBAAgB,EAChB,WAAW,GACZ,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,0CAA0C,CAAC;AAElD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,yBAAyB,CAAC;AAGxC,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG1D,cAAc,+BAA+B,CAAC"}
package/dist/index.js CHANGED
@@ -32,6 +32,8 @@ tslib_1.__exportStar(require("./components/chat/system-message"), exports);
32
32
  var video_retry_1 = require("./components/mobile-player/video-retry");
33
33
  Object.defineProperty(exports, "VideoRetry", { enumerable: true, get: function () { return tslib_1.__importDefault(video_retry_1).default; } });
34
34
  tslib_1.__exportStar(require("./lib/system-messages"), exports);
35
+ tslib_1.__exportStar(require("./components/stream-notification"), exports);
36
+ tslib_1.__exportStar(require("./lib/stream-notifications"), exports);
35
37
  tslib_1.__exportStar(require("./utils/format-handle"), exports);
36
38
  var danmu_overlay_1 = require("./components/danmu/danmu-overlay");
37
39
  Object.defineProperty(exports, "DanmuOverlay", { enumerable: true, get: function () { return danmu_overlay_1.DanmuOverlay; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;AAAA,iBAAiB;AACjB,6BAA2B;AAE3B,gEAAsC;AACtC,6DAAmC;AACnC,yDAA+B;AAC/B,iEAAuC;AACvC,8DAAoC;AAEpC,kEAGwC;AAFtC,iHAAA,cAAc,OAAA;AACd,qHAAA,kBAAkB,OAAA;AAEpB,4DAA+D;AAAtD,gHAAA,gBAAgB,OAAA;AAEzB,4DAAqE;AAA5D,gGAAA,MAAM,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAGzB,8DAAsC;AAEtC,0DAAgC;AAEhC,qDAA6B;AAE7B,kDAAwB;AAExB,sCAAsC;AACtC,iDAAuB;AACvB,uDAA+B;AAE/B,uBAAuB;AACvB,sDAA4B;AAE5B,iEAAuC;AACvC,qEAA2C;AAC3C,2EAAiD;AACjD,sEAA+E;AAAtE,kIAAA,OAAO,OAAc;AAC9B,gEAAsC;AAEtC,gEAAsC;AAEtC,kEAAgE;AAAvD,6GAAA,YAAY,OAAA;AACrB,0EAAuE;AAA9D,oHAAA,eAAe,OAAA;AAExB,+BAA+B;AAC/B,0EAGkD;AAFhD,iHAAA,gBAAgB,OAAA;AAChB,4GAAA,WAAW,OAAA;AAOb,wEAA8C;AAE9C,kEAAwC;AAExC,uBAAuB;AACvB,4EAAoD;AAEpD,kBAAkB;AAClB,qCAA+C;AAAtC,2HAAA,OAAO,OAAW;AAG3B,8BAA8B;AAC9B,wEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;AAAA,iBAAiB;AACjB,6BAA2B;AAE3B,gEAAsC;AACtC,6DAAmC;AACnC,yDAA+B;AAC/B,iEAAuC;AACvC,8DAAoC;AAEpC,kEAGwC;AAFtC,iHAAA,cAAc,OAAA;AACd,qHAAA,kBAAkB,OAAA;AAEpB,4DAA+D;AAAtD,gHAAA,gBAAgB,OAAA;AAEzB,4DAAqE;AAA5D,gGAAA,MAAM,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAGzB,8DAAsC;AAEtC,0DAAgC;AAEhC,qDAA6B;AAE7B,kDAAwB;AAExB,sCAAsC;AACtC,iDAAuB;AACvB,uDAA+B;AAE/B,uBAAuB;AACvB,sDAA4B;AAE5B,iEAAuC;AACvC,qEAA2C;AAC3C,2EAAiD;AACjD,sEAA+E;AAAtE,kIAAA,OAAO,OAAc;AAC9B,gEAAsC;AAEtC,2EAAiD;AACjD,qEAA2C;AAE3C,gEAAsC;AAEtC,kEAAgE;AAAvD,6GAAA,YAAY,OAAA;AACrB,0EAAuE;AAA9D,oHAAA,eAAe,OAAA;AAExB,+BAA+B;AAC/B,0EAGkD;AAFhD,iHAAA,gBAAgB,OAAA;AAChB,4GAAA,WAAW,OAAA;AAOb,wEAA8C;AAE9C,kEAAwC;AAExC,uBAAuB;AACvB,4EAAoD;AAEpD,kBAAkB;AAClB,qCAA+C;AAAtC,2HAAA,OAAO,OAAW;AAG3B,8BAA8B;AAC9B,wEAA8C"}
@@ -0,0 +1,4 @@
1
+ import { StreamplaceAgent } from "streamplace";
2
+ export declare function deleteTeleport(pdsAgent: StreamplaceAgent, userDID: string, uri: string): Promise<import("@atproto/api/dist/client/types/com/atproto/repo/deleteRecord").Response>;
3
+ export declare function registerTeleportCommand(pdsAgent: StreamplaceAgent, userDID: string, setActiveTeleportUri?: (uri: string | null) => void): void;
4
+ //# sourceMappingURL=teleport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teleport.d.ts","sourceRoot":"","sources":["../../../src/lib/slash-commands/teleport.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAOxE,wBAAsB,cAAc,CAClC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,4FAWZ;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,MAAM,EACf,oBAAoB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,QA6GpD"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteTeleport = deleteTeleport;
4
+ exports.registerTeleportCommand = registerTeleportCommand;
5
+ const slash_commands_1 = require("../slash-commands");
6
+ async function deleteTeleport(pdsAgent, userDID, uri) {
7
+ const rkey = uri.split("/").pop();
8
+ if (!rkey) {
9
+ throw new Error("No rkey found in teleport URI");
10
+ }
11
+ return await pdsAgent.com.atproto.repo.deleteRecord({
12
+ repo: userDID,
13
+ collection: "place.stream.live.teleport",
14
+ rkey: rkey,
15
+ });
16
+ }
17
+ function registerTeleportCommand(pdsAgent, userDID, setActiveTeleportUri) {
18
+ const teleportHandler = async (args, rawInput) => {
19
+ if (args.length === 0) {
20
+ return {
21
+ handled: true,
22
+ error: "Usage: /teleport @handle.bsky.social [duration_seconds]",
23
+ };
24
+ }
25
+ let targetHandle = args[0];
26
+ if (targetHandle.startsWith("@")) {
27
+ targetHandle = targetHandle.slice(1);
28
+ }
29
+ if (!targetHandle.includes(".")) {
30
+ return {
31
+ handled: true,
32
+ error: "Invalid handle format. Expected: handle.bsky.social",
33
+ };
34
+ }
35
+ let countdownSeconds = 10;
36
+ if (args.length > 1) {
37
+ const parsedDuration = parseInt(args[1], 10);
38
+ if (isNaN(parsedDuration)) {
39
+ return {
40
+ handled: true,
41
+ error: "Countdown must be a number (seconds)",
42
+ };
43
+ }
44
+ if (parsedDuration < 5 || parsedDuration > 300) {
45
+ return {
46
+ handled: true,
47
+ error: "Countdown must be between 5 seconds and 5 minutes",
48
+ };
49
+ }
50
+ countdownSeconds = parsedDuration;
51
+ }
52
+ let targetDID;
53
+ try {
54
+ const resolution = await pdsAgent.resolveHandle({
55
+ handle: targetHandle,
56
+ });
57
+ targetDID = resolution.data.did;
58
+ }
59
+ catch (err) {
60
+ return {
61
+ handled: true,
62
+ error: `Could not resolve handle: ${targetHandle}`,
63
+ };
64
+ }
65
+ if (targetDID === userDID) {
66
+ return {
67
+ handled: true,
68
+ error: "You cannot teleport to yourself",
69
+ };
70
+ }
71
+ const startsAt = new Date(Date.now() + countdownSeconds * 1000).toISOString();
72
+ const record = {
73
+ $type: "place.stream.live.teleport",
74
+ streamer: targetDID,
75
+ startsAt,
76
+ countdownSeconds,
77
+ };
78
+ try {
79
+ const result = await pdsAgent.com.atproto.repo.createRecord({
80
+ repo: userDID,
81
+ collection: "place.stream.live.teleport",
82
+ record,
83
+ });
84
+ // store the URI in the livestream store
85
+ if (setActiveTeleportUri) {
86
+ setActiveTeleportUri(result.data.uri);
87
+ }
88
+ return { handled: true };
89
+ }
90
+ catch (err) {
91
+ return {
92
+ handled: true,
93
+ error: err instanceof Error ? err.message : "Failed to create teleport",
94
+ };
95
+ }
96
+ };
97
+ (0, slash_commands_1.registerSlashCommand)({
98
+ name: "teleport",
99
+ description: "Start a teleport to another streamer",
100
+ usage: "/teleport @handle.bsky.social [duration_seconds]",
101
+ handler: teleportHandler,
102
+ });
103
+ (0, slash_commands_1.registerSlashCommand)({
104
+ name: "tp",
105
+ description: "Start a teleport to another streamer (alias for /teleport)",
106
+ usage: "/tp @handle.bsky.social [duration_seconds]",
107
+ handler: teleportHandler,
108
+ });
109
+ }
110
+ //# sourceMappingURL=teleport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teleport.js","sourceRoot":"","sources":["../../../src/lib/slash-commands/tele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U,EAAE,4BAA4B;gBACxC,MAAM;aACP,CAAC,CAAC;YAEH,wCAAwC;YACxC,IAAI,oBAAoB,EAAE,CAAC;gBACzB,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACxC,CAAC;YAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,2BAA2B;aACxE,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;IAEF,IAAA,qCAAoB,EAAC;QACnB,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,sCAAsC;QACnD,KAAK,EAAE,kDAAkD;QACzD,OAAO,EAAE,eAAe;KACzB,CAAC,CAAC;IAEH,IAAA,qCAAoB,EAAC;QACnB,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,4DAA4D;QACzE,KAAK,EAAE,4CAA4C;QACnD,OAAO,EAAE,eAAe;KACzB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,16 @@
1
+ export interface SlashCommandResult {
2
+ handled: boolean;
3
+ error?: string;
4
+ }
5
+ export type SlashCommandHandler = (args: string[], rawInput: string) => Promise<SlashCommandResult>;
6
+ export interface SlashCommand {
7
+ name: string;
8
+ description: string;
9
+ usage: string;
10
+ handler: SlashCommandHandler;
11
+ }
12
+ export declare function registerSlashCommand(command: SlashCommand): void;
13
+ export declare function unregisterSlashCommand(name: string): void;
14
+ export declare function handleSlashCommand(input: string): Promise<SlashCommandResult>;
15
+ export declare function getRegisteredCommands(): SlashCommand[];
16
+ //# sourceMappingURL=slash-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/lib/slash-commands.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,mBAAmB,GAAG,CAChC,IAAI,EAAE,MAAM,EAAE,EACd,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAID,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,QAEzD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,QAElD;AAED,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,CAAC,CA+B7B;AAED,wBAAgB,qBAAqB,IAAI,YAAY,EAAE,CAEtD"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerSlashCommand = registerSlashCommand;
4
+ exports.unregisterSlashCommand = unregisterSlashCommand;
5
+ exports.handleSlashCommand = handleSlashCommand;
6
+ exports.getRegisteredCommands = getRegisteredCommands;
7
+ const commands = new Map();
8
+ function registerSlashCommand(command) {
9
+ commands.set(command.name, command);
10
+ }
11
+ function unregisterSlashCommand(name) {
12
+ commands.delete(name);
13
+ }
14
+ async function handleSlashCommand(input) {
15
+ const trimmed = input.trim();
16
+ if (!trimmed.startsWith("/")) {
17
+ return { handled: false };
18
+ }
19
+ const parts = trimmed.slice(1).split(/\s+/);
20
+ const commandName = parts[0]?.toLowerCase();
21
+ const args = parts.slice(1);
22
+ if (!commandName) {
23
+ return { handled: false };
24
+ }
25
+ const command = commands.get(commandName);
26
+ if (!command) {
27
+ return {
28
+ // for now - return false
29
+ handled: false,
30
+ error: `Unknown command: /${commandName}`,
31
+ };
32
+ }
33
+ try {
34
+ return await command.handler(args, trimmed);
35
+ }
36
+ catch (err) {
37
+ return {
38
+ handled: true,
39
+ error: err instanceof Error ? err.message : "Command failed",
40
+ };
41
+ }
42
+ }
43
+ function getRegisteredCommands() {
44
+ return Array.from(commands.values());
45
+ }
46
+ //# sourceMappingURL=slash-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/lib/slash-commands.ts"],"names":[],"mappings":";;AAmBA,oDAEC;AAED,wDAEC;AAED,gDAiCC;AAED,sDAEC;AA/CD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAwB,CAAC;AAEjD,SAAgB,oBAAoB,CAAC,OAAqB;IACxD,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC;AAED,SAAgB,sBAAsB,CAAC,IAAY;IACjD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACtC,KAAa;IAEb,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5C,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE5B,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;YACL,yBAAyB;YACzB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,qBAAqB,WAAW,EAAE;SAC1C,CAAC;IACJ,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB;SAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,qBAAqB;IACnC,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const StreamNotifications: {
2
+ teleport: (params: {
3
+ targetHandle: string;
4
+ targetDID: string;
5
+ countdown: number;
6
+ canCancel: boolean;
7
+ onDismiss?: (reason?: "user" | "auto") => void;
8
+ }) => void;
9
+ teleportCancelled: () => void;
10
+ teleportNow: (targetHandle: string) => void;
11
+ activate: (message: string) => void;
12
+ };
13
+ //# sourceMappingURL=stream-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-notifications.d.ts","sourceRoot":"","sources":["../../src/lib/stream-notifications.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;uBACX;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;KAChD;;gCAsB2B,MAAM;wBASd,MAAM;CAQ3B,CAAC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StreamNotifications = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const stream_notification_1 = require("../components/stream-notification");
7
+ const teleport_notification_1 = require("../components/stream-notification/teleport-notification");
8
+ exports.StreamNotifications = {
9
+ teleport: (params) => {
10
+ stream_notification_1.streamNotification.show({
11
+ id: "teleport",
12
+ render: (isExiting, onDismiss, startTime) => {
13
+ return react_1.default.createElement(teleport_notification_1.TeleportNotification, {
14
+ targetHandle: params.targetHandle,
15
+ countdown: params.countdown,
16
+ canCancel: params.canCancel,
17
+ startTime: startTime,
18
+ onDismiss: onDismiss,
19
+ });
20
+ },
21
+ duration: 0, // manually dismissed by countdown or user cancel
22
+ variant: "warning",
23
+ onDismiss: params.onDismiss,
24
+ });
25
+ },
26
+ teleportCancelled: () => {
27
+ stream_notification_1.streamNotification.hide("teleport");
28
+ },
29
+ teleportNow: (targetHandle) => {
30
+ stream_notification_1.streamNotification.show({
31
+ id: "teleport-now",
32
+ message: `Teleporting to @${targetHandle}...`,
33
+ duration: 2,
34
+ variant: "info",
35
+ });
36
+ },
37
+ activate: (message) => {
38
+ stream_notification_1.streamNotification.show({
39
+ id: "stream-activate",
40
+ message: message,
41
+ duration: 3,
42
+ variant: "info",
43
+ });
44
+ },
45
+ };
46
+ //# sourceMappingURL=stream-notifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-notifications.js","sourceRoot":"","sources":["../../src/lib/stream-notifications.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2EAAuE;AACvE,mGAA+F;AAElF,QAAA,mBAAmB,GAAG;IACjC,QAAQ,EAAE,CAAC,MAMV,EAAE,EAAE;QACH,wCAAkB,CAAC,IAAI,CAAC;YACtB,EAAE,EAAE,UAAU;YACd,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE;gBAC1C,OAAO,eAAK,CAAC,aAAa,CAAC,4CAAoB,EAAE;oBAC/C,YAAY,EAAE,MAAM,CAAC,YAAY;oBACjC,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,SAAS,EAAE,SAAS;oBACpB,SAAS,EAAE,SAAS;iBACrB,CAAC,CAAC;YACL,CAAC;YACD,QAAQ,EAAE,CAAC,EAAE,iDAAiD;YAC9D,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC,CAAC;IACL,CAAC;IAED,iBAAiB,EAAE,GAAG,EAAE;QACtB,wCAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,WAAW,EAAE,CAAC,YAAoB,EAAE,EAAE;QACpC,wCAAkB,CAAC,IAAI,CAAC;YACtB,EAAE,EAAE,cAAc;YAClB,OAAO,EAAE,mBAAmB,YAAY,KAAK;YAC7C,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,MAAM;SAChB,CAAC,CAAC;IACL,CAAC;IAED,QAAQ,EAAE,CAAC,OAAe,EAAE,EAAE;QAC5B,wCAAkB,CAAC,IAAI,CAAC;YACtB,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,MAAM;SAChB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -2,7 +2,8 @@ import { ChatMessageViewHydrated } from "streamplace";
2
2
  export declare enum SystemMessageType {
3
3
  stream_start = "stream_start",
4
4
  stream_end = "stream_end",
5
- notification = "notification"
5
+ notification = "notification",
6
+ command_error = "command_error"
6
7
  }
7
8
  export interface SystemMessageMetadata {
8
9
  username?: string;
@@ -12,13 +13,6 @@ export interface SystemMessageMetadata {
12
13
  reason?: string;
13
14
  streamerName?: string;
14
15
  }
15
- /**
16
- * Creates a system message with the proper structure
17
- * @param type The type of system message
18
- * @param text The message text
19
- * @param metadata Optional metadata for the message
20
- * @returns A properly formatted ChatMessageViewHydrated object
21
- */
22
16
  export declare const createSystemMessage: (type: SystemMessageType, text: string, metadata?: SystemMessageMetadata, date?: Date) => ChatMessageViewHydrated;
23
17
  /**
24
18
  * System message factory functions for common scenarios
@@ -26,7 +20,9 @@ export declare const createSystemMessage: (type: SystemMessageType, text: string
26
20
  export declare const SystemMessages: {
27
21
  streamStart: (streamerName: string) => ChatMessageViewHydrated;
28
22
  streamEnd: (duration?: string) => ChatMessageViewHydrated;
23
+ teleportArrival: (streamerName: string, streamerDid: string, count: number, chatProfile?: any) => ChatMessageViewHydrated;
29
24
  notification: (message: string) => ChatMessageViewHydrated;
25
+ commandError: (message: string) => ChatMessageViewHydrated;
30
26
  };
31
27
  /**
32
28
  * Checks if a message is a system message
@@ -1 +1 @@
1
- {"version":3,"file":"system-messages.d.ts","sourceRoot":"","sources":["../../src/lib/system-messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,oBAAY,iBAAiB;IAC3B,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,iBAAiB,EACvB,MAAM,MAAM,EACZ,WAAW,qBAAqB,EAChC,OAAM,IAAiB,KACtB,uBAsBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc;gCACG,MAAM,KAAG,uBAAuB;2BAWrC,MAAM,KAAG,uBAAuB;4BAO/B,MAAM,KAAG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