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