Live video on the AT Protocol

components: add components library (#233)

* components: init @streamplace/components

* fix build

* components: implemented chat!

* components: local chat works now!

* dump tsup, remove old code

* remove example-app for now

* build: add knip for checking missing dependencies

* fix build

* update README

* maybe lexicons postinstall?

* app: remove old chat stuff from redux

* components: migrate replyTo

* components: migrate viewers

* components: migrate livestream

* components: migrate segment

* components: migrate renditions

* components: tweak handleWebsocketMessages

* libraries: pnpm run build as postinstall

* build: perhaps make js-lexicons like this?

* app: mobile tweaks

* websocket: can't send a profile we don't have

* websocket --> websocket-consumer

authored by Eli Mallon and committed by Natalie B. bcfe734e 1e5efe1d

+4 -7
+4 -7
js/app/components/chat/chat.tsx
··· 1 import { 2 useChat, 3 useProfile, 4 useSetReplyToMessage, 5 } from "@streamplace/components"; 6 - import { Reply, Settings, X } from "@tamagui/lucide-icons"; 7 import { 8 createBlockRecord, 9 selectUserProfile, ··· 20 Link, 21 Mention, 22 } from "@atproto/api/dist/client/types/app/bsky/richtext/facet"; 23 - import { $Typed } from "@atproto/api/src/client/util"; 24 import ReanimatedSwipeable, { 25 SwipeableMethods, 26 } from "react-native-gesture-handler/ReanimatedSwipeable"; ··· 28 SharedValue, 29 useAnimatedStyle, 30 } from "react-native-reanimated"; 31 import { Button, ScrollView, Sheet, Text, useMedia, View } from "tamagui"; 32 import { RichtextSegment, segmentize } from "../../utils/facet"; 33 ··· 242 } 243 }; 244 245 - const currentReplyTo = useAppSelector(useReplyToMessage()); 246 247 const moderateMessage = () => { 248 if (!myStream) { ··· 576 577 let segs = segmentize(text, facets); 578 579 - <<<<<<< HEAD 580 return segs.map((seg, i) => 581 segmentedObject(seg, chat as MessageViewHydrated[], i), 582 ); 583 - ======= 584 - return segs.map((seg, i) => segmentedObject(seg, chat, i)); 585 - >>>>>>> 0d25913a (Add swipe-to-reply gesture + offset hover action box so text is readable) 586 }; 587 588 export function timeAgo(time: Date | number | string): string {
··· 1 import { 2 useChat, 3 useProfile, 4 + useReplyToMessage, 5 useSetReplyToMessage, 6 } from "@streamplace/components"; 7 + import { Reply, ReplyAll, Settings, X } from "@tamagui/lucide-icons"; 8 import { 9 createBlockRecord, 10 selectUserProfile, ··· 21 Link, 22 Mention, 23 } from "@atproto/api/dist/client/types/app/bsky/richtext/facet"; 24 import ReanimatedSwipeable, { 25 SwipeableMethods, 26 } from "react-native-gesture-handler/ReanimatedSwipeable"; ··· 28 SharedValue, 29 useAnimatedStyle, 30 } from "react-native-reanimated"; 31 + import { ChatMessageViewHydrated } from "streamplace"; 32 import { Button, ScrollView, Sheet, Text, useMedia, View } from "tamagui"; 33 import { RichtextSegment, segmentize } from "../../utils/facet"; 34 ··· 243 } 244 }; 245 246 + const currentReplyTo = useReplyToMessage(); 247 248 const moderateMessage = () => { 249 if (!myStream) { ··· 577 578 let segs = segmentize(text, facets); 579 580 return segs.map((seg, i) => 581 segmentedObject(seg, chat as MessageViewHydrated[], i), 582 ); 583 }; 584 585 export function timeAgo(time: Date | number | string): string {