@openpeepshq/react 0.2.3
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/LICENSE.md +21 -0
- package/README.md +1 -0
- package/dist/auth/credentials/index.d.ts +11 -0
- package/dist/auth/credentials/index.js +57 -0
- package/dist/auth/credentials/types.d.ts +6 -0
- package/dist/auth/credentials/types.js +1 -0
- package/dist/components/accounts/SignUpLoginModal.d.ts +9 -0
- package/dist/components/accounts/SignUpLoginModal.js +19 -0
- package/dist/components/accounts/SignUpLoginModalContext.d.ts +10 -0
- package/dist/components/accounts/SignUpLoginModalContext.js +16 -0
- package/dist/components/accounts/index.d.ts +3 -0
- package/dist/components/accounts/index.js +2 -0
- package/dist/components/configuration/ConfigurationCategory.d.ts +12 -0
- package/dist/components/configuration/ConfigurationCategory.js +61 -0
- package/dist/components/configuration/ConfigurationList.d.ts +10 -0
- package/dist/components/configuration/ConfigurationList.js +30 -0
- package/dist/components/configuration/ConfigurationTree.d.ts +8 -0
- package/dist/components/configuration/ConfigurationTree.js +20 -0
- package/dist/components/configuration/ConfigurationValueEditor.d.ts +11 -0
- package/dist/components/configuration/ConfigurationValueEditor.js +45 -0
- package/dist/components/configuration/index.d.ts +4 -0
- package/dist/components/configuration/index.js +4 -0
- package/dist/components/conversations/ConversationMessageBubble.d.ts +4 -0
- package/dist/components/conversations/ConversationMessageBubble.js +10 -0
- package/dist/components/conversations/CreateNewConversation.d.ts +8 -0
- package/dist/components/conversations/CreateNewConversation.js +62 -0
- package/dist/components/conversations/CreateNewConversationContext.d.ts +15 -0
- package/dist/components/conversations/CreateNewConversationContext.js +18 -0
- package/dist/components/conversations/DirectMessagesHeaderActions.d.ts +1 -0
- package/dist/components/conversations/DirectMessagesHeaderActions.js +10 -0
- package/dist/components/conversations/MessageInThread.d.ts +13 -0
- package/dist/components/conversations/MessageInThread.js +41 -0
- package/dist/components/conversations/index.d.ts +8 -0
- package/dist/components/conversations/index.js +5 -0
- package/dist/components/form/HeaderAvatarInput.d.ts +13 -0
- package/dist/components/form/HeaderAvatarInput.js +16 -0
- package/dist/components/form/ImageEditModal.d.ts +23 -0
- package/dist/components/form/ImageEditModal.js +75 -0
- package/dist/components/form/ImageInput.d.ts +32 -0
- package/dist/components/form/ImageInput.js +65 -0
- package/dist/components/form/LocationInput.d.ts +20 -0
- package/dist/components/form/LocationInput.js +59 -0
- package/dist/components/form/index.d.ts +8 -0
- package/dist/components/form/index.js +4 -0
- package/dist/components/groups/AddGroupMemberModal.d.ts +6 -0
- package/dist/components/groups/AddGroupMemberModal.js +40 -0
- package/dist/components/groups/AddGroupMembersButton.d.ts +5 -0
- package/dist/components/groups/AddGroupMembersButton.js +17 -0
- package/dist/components/groups/ChangeGroupRolesModal.d.ts +7 -0
- package/dist/components/groups/ChangeGroupRolesModal.js +45 -0
- package/dist/components/groups/ConfirmGroupExitModal.d.ts +6 -0
- package/dist/components/groups/ConfirmGroupExitModal.js +35 -0
- package/dist/components/groups/ConfirmMemberRemovalModal.d.ts +7 -0
- package/dist/components/groups/ConfirmMemberRemovalModal.js +33 -0
- package/dist/components/groups/DeleteGroupModal.d.ts +6 -0
- package/dist/components/groups/DeleteGroupModal.js +34 -0
- package/dist/components/groups/GroupAvatar.d.ts +14 -0
- package/dist/components/groups/GroupAvatar.js +32 -0
- package/dist/components/groups/GroupCard.d.ts +19 -0
- package/dist/components/groups/GroupCard.js +12 -0
- package/dist/components/groups/GroupFeed.d.ts +9 -0
- package/dist/components/groups/GroupFeed.js +14 -0
- package/dist/components/groups/GroupForm.d.ts +7 -0
- package/dist/components/groups/GroupForm.js +73 -0
- package/dist/components/groups/GroupHeader.d.ts +5 -0
- package/dist/components/groups/GroupHeader.js +14 -0
- package/dist/components/groups/GroupMembersList.d.ts +5 -0
- package/dist/components/groups/GroupMembersList.js +38 -0
- package/dist/components/groups/GroupOptionsMenu.d.ts +5 -0
- package/dist/components/groups/GroupOptionsMenu.js +61 -0
- package/dist/components/groups/GroupShareMenu.d.ts +5 -0
- package/dist/components/groups/GroupShareMenu.js +29 -0
- package/dist/components/groups/JoinGroupButton.d.ts +6 -0
- package/dist/components/groups/JoinGroupButton.js +28 -0
- package/dist/components/groups/index.d.ts +30 -0
- package/dist/components/groups/index.js +15 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/components/index.js +15 -0
- package/dist/components/jams/CreateNewJam.d.ts +4 -0
- package/dist/components/jams/CreateNewJam.js +138 -0
- package/dist/components/jams/CreateNewJamContext.d.ts +9 -0
- package/dist/components/jams/CreateNewJamContext.js +16 -0
- package/dist/components/jams/JamAnimatedEmoji.d.ts +4 -0
- package/dist/components/jams/JamAnimatedEmoji.js +12 -0
- package/dist/components/jams/JamCallParticipant.d.ts +15 -0
- package/dist/components/jams/JamCallParticipant.js +101 -0
- package/dist/components/jams/JamCapacityGate.d.ts +7 -0
- package/dist/components/jams/JamCapacityGate.js +30 -0
- package/dist/components/jams/JamChatDrawer.d.ts +6 -0
- package/dist/components/jams/JamChatDrawer.js +88 -0
- package/dist/components/jams/JamChatMessage.d.ts +5 -0
- package/dist/components/jams/JamChatMessage.js +35 -0
- package/dist/components/jams/JamConference.d.ts +8 -0
- package/dist/components/jams/JamConference.js +38 -0
- package/dist/components/jams/JamContext.d.ts +20 -0
- package/dist/components/jams/JamContext.js +24 -0
- package/dist/components/jams/JamDetailsDrawer.d.ts +9 -0
- package/dist/components/jams/JamDetailsDrawer.js +39 -0
- package/dist/components/jams/JamDeviceSelectors.d.ts +12 -0
- package/dist/components/jams/JamDeviceSelectors.js +71 -0
- package/dist/components/jams/JamEventsContext.d.ts +14 -0
- package/dist/components/jams/JamEventsContext.js +143 -0
- package/dist/components/jams/JamFooter.d.ts +18 -0
- package/dist/components/jams/JamFooter.js +171 -0
- package/dist/components/jams/JamGuestForm.d.ts +1 -0
- package/dist/components/jams/JamGuestForm.js +55 -0
- package/dist/components/jams/JamLobby.d.ts +17 -0
- package/dist/components/jams/JamLobby.js +159 -0
- package/dist/components/jams/JamObserverShell.d.ts +6 -0
- package/dist/components/jams/JamObserverShell.js +11 -0
- package/dist/components/jams/JamParticipantConference.d.ts +7 -0
- package/dist/components/jams/JamParticipantConference.js +80 -0
- package/dist/components/jams/JamPeopleDrawer.d.ts +10 -0
- package/dist/components/jams/JamPeopleDrawer.js +76 -0
- package/dist/components/jams/JamReactionMenu.d.ts +12 -0
- package/dist/components/jams/JamReactionMenu.js +79 -0
- package/dist/components/jams/JamRequestJoin.d.ts +9 -0
- package/dist/components/jams/JamRequestJoin.js +34 -0
- package/dist/components/jams/JamRoom.d.ts +21 -0
- package/dist/components/jams/JamRoom.js +166 -0
- package/dist/components/jams/JamRoomIndicators.d.ts +10 -0
- package/dist/components/jams/JamRoomIndicators.js +39 -0
- package/dist/components/jams/JamVideoCall.d.ts +15 -0
- package/dist/components/jams/JamVideoCall.js +18 -0
- package/dist/components/jams/JamVideoLayout.d.ts +13 -0
- package/dist/components/jams/JamVideoLayout.js +68 -0
- package/dist/components/jams/LeaveCloseButton.d.ts +6 -0
- package/dist/components/jams/LeaveCloseButton.js +58 -0
- package/dist/components/jams/LiveJamsSection.d.ts +1 -0
- package/dist/components/jams/LiveJamsSection.js +16 -0
- package/dist/components/jams/animateEmoji.d.ts +1 -0
- package/dist/components/jams/animateEmoji.js +48 -0
- package/dist/components/jams/blurProcessor.d.ts +8 -0
- package/dist/components/jams/blurProcessor.js +28 -0
- package/dist/components/jams/constants.d.ts +10 -0
- package/dist/components/jams/constants.js +44 -0
- package/dist/components/jams/index.d.ts +24 -0
- package/dist/components/jams/index.js +19 -0
- package/dist/components/jams/jamEventActions.d.ts +26 -0
- package/dist/components/jams/jamEventActions.js +76 -0
- package/dist/components/jams/jamLocalSettings.d.ts +17 -0
- package/dist/components/jams/jamLocalSettings.js +53 -0
- package/dist/components/jams/jamReactionPreferences.d.ts +15 -0
- package/dist/components/jams/jamReactionPreferences.js +53 -0
- package/dist/components/jams/jamRecordingState.d.ts +10 -0
- package/dist/components/jams/jamRecordingState.js +25 -0
- package/dist/components/jams/reactionEmojis.d.ts +30 -0
- package/dist/components/jams/reactionEmojis.js +73 -0
- package/dist/components/jams/useJamHands.d.ts +7 -0
- package/dist/components/jams/useJamHands.js +39 -0
- package/dist/components/jams/useJamLiveKitTheme.d.ts +3 -0
- package/dist/components/jams/useJamLiveKitTheme.js +10 -0
- package/dist/components/layout/AccessDenied.d.ts +14 -0
- package/dist/components/layout/AccessDenied.js +28 -0
- package/dist/components/layout/AccessDeniedLoader.d.ts +16 -0
- package/dist/components/layout/AccessDeniedLoader.js +12 -0
- package/dist/components/layout/Auth.d.ts +22 -0
- package/dist/components/layout/Auth.js +82 -0
- package/dist/components/layout/IdentityContext.d.ts +17 -0
- package/dist/components/layout/IdentityContext.js +38 -0
- package/dist/components/layout/Infos.d.ts +5 -0
- package/dist/components/layout/Infos.js +42 -0
- package/dist/components/layout/OpenpeepsContextProvider.d.ts +10 -0
- package/dist/components/layout/OpenpeepsContextProvider.js +63 -0
- package/dist/components/layout/OpenpeepsThemeProvider.d.ts +11 -0
- package/dist/components/layout/OpenpeepsThemeProvider.js +47 -0
- package/dist/components/layout/ProfileGuard.d.ts +14 -0
- package/dist/components/layout/ProfileGuard.js +38 -0
- package/dist/components/layout/ProfileProvider.d.ts +10 -0
- package/dist/components/layout/ProfileProvider.js +60 -0
- package/dist/components/layout/Root.d.ts +16 -0
- package/dist/components/layout/Root.js +36 -0
- package/dist/components/layout/ToastProvider.d.ts +22 -0
- package/dist/components/layout/ToastProvider.js +37 -0
- package/dist/components/layout/index.d.ts +21 -0
- package/dist/components/layout/index.js +11 -0
- package/dist/components/markdown/CompiledMarkdown.d.ts +5 -0
- package/dist/components/markdown/CompiledMarkdown.js +3 -0
- package/dist/components/markdown/OpenpeepsMarkdown.d.ts +16 -0
- package/dist/components/markdown/OpenpeepsMarkdown.js +66 -0
- package/dist/components/markdown/classes.d.ts +2 -0
- package/dist/components/markdown/classes.js +2 -0
- package/dist/components/markdown/compileMarkdown.d.ts +5 -0
- package/dist/components/markdown/compileMarkdown.js +36 -0
- package/dist/components/markdown/index.d.ts +11 -0
- package/dist/components/markdown/index.js +7 -0
- package/dist/components/markdown/linkTargets.d.ts +3 -0
- package/dist/components/markdown/linkTargets.js +27 -0
- package/dist/components/markdown/staticRender.d.ts +16 -0
- package/dist/components/markdown/staticRender.js +17 -0
- package/dist/components/navigation/ContentHeader.d.ts +1 -0
- package/dist/components/navigation/ContentHeader.js +18 -0
- package/dist/components/navigation/FooterMobile.d.ts +5 -0
- package/dist/components/navigation/FooterMobile.js +8 -0
- package/dist/components/navigation/HeaderMobile.d.ts +11 -0
- package/dist/components/navigation/HeaderMobile.js +26 -0
- package/dist/components/navigation/MobileMenuItem.d.ts +7 -0
- package/dist/components/navigation/MobileMenuItem.js +13 -0
- package/dist/components/navigation/PageHeaderAction.d.ts +5 -0
- package/dist/components/navigation/PageHeaderAction.js +7 -0
- package/dist/components/navigation/PlusButton.d.ts +1 -0
- package/dist/components/navigation/PlusButton.js +11 -0
- package/dist/components/navigation/SideBar.d.ts +16 -0
- package/dist/components/navigation/SideBar.js +24 -0
- package/dist/components/navigation/SidebarNavContext.d.ts +3 -0
- package/dist/components/navigation/SidebarNavContext.js +4 -0
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts +1 -0
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.js +10 -0
- package/dist/components/navigation/breadcrumbs/Crumb.d.ts +5 -0
- package/dist/components/navigation/breadcrumbs/Crumb.js +4 -0
- package/dist/components/navigation/index.d.ts +17 -0
- package/dist/components/navigation/index.js +11 -0
- package/dist/components/navigation/sideBarNavLinkClass.d.ts +4 -0
- package/dist/components/navigation/sideBarNavLinkClass.js +3 -0
- package/dist/components/notifications/NotificationErrorBoundary.d.ts +16 -0
- package/dist/components/notifications/NotificationErrorBoundary.js +21 -0
- package/dist/components/notifications/NotificationHeaderActions.d.ts +6 -0
- package/dist/components/notifications/NotificationHeaderActions.js +35 -0
- package/dist/components/notifications/NotificationItem.d.ts +5 -0
- package/dist/components/notifications/NotificationItem.js +6 -0
- package/dist/components/notifications/NotificationWrapper.d.ts +10 -0
- package/dist/components/notifications/NotificationWrapper.js +6 -0
- package/dist/components/notifications/NotificationsList.d.ts +12 -0
- package/dist/components/notifications/NotificationsList.js +88 -0
- package/dist/components/notifications/TypedNotification.d.ts +4 -0
- package/dist/components/notifications/TypedNotification.js +201 -0
- package/dist/components/notifications/index.d.ts +7 -0
- package/dist/components/notifications/index.js +5 -0
- package/dist/components/post/Feed.d.ts +20 -0
- package/dist/components/post/Feed.js +63 -0
- package/dist/components/post/FeedPost.d.ts +17 -0
- package/dist/components/post/FeedPost.js +31 -0
- package/dist/components/post/FeedPostContent.d.ts +5 -0
- package/dist/components/post/FeedPostContent.js +22 -0
- package/dist/components/post/FullPostLayout.d.ts +7 -0
- package/dist/components/post/FullPostLayout.js +23 -0
- package/dist/components/post/Markdown.d.ts +2 -0
- package/dist/components/post/Markdown.js +1 -0
- package/dist/components/post/NewEventButton.d.ts +14 -0
- package/dist/components/post/NewEventButton.js +39 -0
- package/dist/components/post/NewNoteButton.d.ts +14 -0
- package/dist/components/post/NewNoteButton.js +38 -0
- package/dist/components/post/PinnedPost.d.ts +5 -0
- package/dist/components/post/PinnedPost.js +15 -0
- package/dist/components/post/PostDetail.d.ts +4 -0
- package/dist/components/post/PostDetail.js +31 -0
- package/dist/components/post/ReplyBox.d.ts +5 -0
- package/dist/components/post/ReplyBox.js +30 -0
- package/dist/components/post/VideoPlayOverlay.d.ts +5 -0
- package/dist/components/post/VideoPlayOverlay.js +8 -0
- package/dist/components/post/attachmentPreview.d.ts +5 -0
- package/dist/components/post/attachmentPreview.js +14 -0
- package/dist/components/post/feed/events/EventsFeed.d.ts +7 -0
- package/dist/components/post/feed/events/EventsFeed.js +44 -0
- package/dist/components/post/feed/threaded/ThreadPost.d.ts +9 -0
- package/dist/components/post/feed/threaded/ThreadPost.js +19 -0
- package/dist/components/post/feed/threaded/ThreadedFeed.d.ts +10 -0
- package/dist/components/post/feed/threaded/ThreadedFeed.js +8 -0
- package/dist/components/post/helpers.d.ts +6 -0
- package/dist/components/post/helpers.js +24 -0
- package/dist/components/post/index.d.ts +78 -0
- package/dist/components/post/index.js +57 -0
- package/dist/components/post/pieces/Attachments.d.ts +5 -0
- package/dist/components/post/pieces/Attachments.js +44 -0
- package/dist/components/post/pieces/EventLocation.d.ts +7 -0
- package/dist/components/post/pieces/EventLocation.js +28 -0
- package/dist/components/post/pieces/EventMenu.d.ts +6 -0
- package/dist/components/post/pieces/EventMenu.js +35 -0
- package/dist/components/post/pieces/EventRsvpButton.d.ts +5 -0
- package/dist/components/post/pieces/EventRsvpButton.js +60 -0
- package/dist/components/post/pieces/FeedPostStats.d.ts +5 -0
- package/dist/components/post/pieces/FeedPostStats.js +27 -0
- package/dist/components/post/pieces/GalleryModal.d.ts +7 -0
- package/dist/components/post/pieces/GalleryModal.js +16 -0
- package/dist/components/post/pieces/ParticipantsCard.d.ts +8 -0
- package/dist/components/post/pieces/ParticipantsCard.js +13 -0
- package/dist/components/post/pieces/PollContent.d.ts +5 -0
- package/dist/components/post/pieces/PollContent.js +109 -0
- package/dist/components/post/pieces/PostActions.d.ts +6 -0
- package/dist/components/post/pieces/PostActions.js +63 -0
- package/dist/components/post/pieces/PostInfoHeader.d.ts +7 -0
- package/dist/components/post/pieces/PostInfoHeader.js +8 -0
- package/dist/components/post/pieces/PostMenu.d.ts +6 -0
- package/dist/components/post/pieces/PostMenu.js +77 -0
- package/dist/components/post/pieces/PostReactionHeader.d.ts +12 -0
- package/dist/components/post/pieces/PostReactionHeader.js +31 -0
- package/dist/components/post/pieces/ShareMenu.d.ts +6 -0
- package/dist/components/post/pieces/ShareMenu.js +46 -0
- package/dist/components/post/pieces/UnreadPostIndicator.d.ts +9 -0
- package/dist/components/post/pieces/UnreadPostIndicator.js +6 -0
- package/dist/components/post/pieces/VideoPlayer.d.ts +16 -0
- package/dist/components/post/pieces/VideoPlayer.js +127 -0
- package/dist/components/post/pieces/modals/DeletePostModal.d.ts +8 -0
- package/dist/components/post/pieces/modals/DeletePostModal.js +20 -0
- package/dist/components/post/pieces/modals/ReactionsModal.d.ts +7 -0
- package/dist/components/post/pieces/modals/ReactionsModal.js +11 -0
- package/dist/components/post/pieces/modals/RepostModal.d.ts +7 -0
- package/dist/components/post/pieces/modals/RepostModal.js +13 -0
- package/dist/components/post/post-form/ArticleForm.d.ts +7 -0
- package/dist/components/post/post-form/ArticleForm.js +45 -0
- package/dist/components/post/post-form/AttachmentCard.d.ts +29 -0
- package/dist/components/post/post-form/AttachmentCard.js +120 -0
- package/dist/components/post/post-form/ComposeAttachments.d.ts +25 -0
- package/dist/components/post/post-form/ComposeAttachments.js +137 -0
- package/dist/components/post/post-form/ComposePreviewLinks.d.ts +4 -0
- package/dist/components/post/post-form/ComposePreviewLinks.js +9 -0
- package/dist/components/post/post-form/DescriptionEditModal.d.ts +13 -0
- package/dist/components/post/post-form/DescriptionEditModal.js +22 -0
- package/dist/components/post/post-form/EditPostModal.d.ts +6 -0
- package/dist/components/post/post-form/EditPostModal.js +81 -0
- package/dist/components/post/post-form/EditPostModalContext.d.ts +10 -0
- package/dist/components/post/post-form/EditPostModalContext.js +18 -0
- package/dist/components/post/post-form/EventForm.d.ts +7 -0
- package/dist/components/post/post-form/EventForm.js +104 -0
- package/dist/components/post/post-form/EventTypeSwitcher.d.ts +8 -0
- package/dist/components/post/post-form/EventTypeSwitcher.js +165 -0
- package/dist/components/post/post-form/NewPostModal.d.ts +13 -0
- package/dist/components/post/post-form/NewPostModal.js +272 -0
- package/dist/components/post/post-form/NewPostModalContext.d.ts +15 -0
- package/dist/components/post/post-form/NewPostModalContext.js +20 -0
- package/dist/components/post/post-form/OpenpeepsMarkdownInput.d.ts +19 -0
- package/dist/components/post/post-form/OpenpeepsMarkdownInput.js +65 -0
- package/dist/components/post/post-form/PollComposerFields.d.ts +12 -0
- package/dist/components/post/post-form/PollComposerFields.js +19 -0
- package/dist/components/post/post-form/PostAudienceSelector.d.ts +12 -0
- package/dist/components/post/post-form/PostAudienceSelector.js +83 -0
- package/dist/components/post/post-form/PostTypeSwitcher.d.ts +16 -0
- package/dist/components/post/post-form/PostTypeSwitcher.js +22 -0
- package/dist/components/post/post-form/ReplyModal.d.ts +6 -0
- package/dist/components/post/post-form/ReplyModal.js +202 -0
- package/dist/components/post/post-form/ReplyModalContext.d.ts +10 -0
- package/dist/components/post/post-form/ReplyModalContext.js +18 -0
- package/dist/components/post/post-form/VisibilitySelector.d.ts +8 -0
- package/dist/components/post/post-form/VisibilitySelector.js +35 -0
- package/dist/components/post/post-form/audienceChoices.d.ts +14 -0
- package/dist/components/post/post-form/audienceChoices.js +66 -0
- package/dist/components/post/types/Article.d.ts +5 -0
- package/dist/components/post/types/Article.js +14 -0
- package/dist/components/post/types/Event.d.ts +5 -0
- package/dist/components/post/types/Event.js +19 -0
- package/dist/components/post/types/Note.d.ts +5 -0
- package/dist/components/post/types/Note.js +10 -0
- package/dist/components/post/types/Poll.d.ts +7 -0
- package/dist/components/post/types/Poll.js +11 -0
- package/dist/components/post/types/article/FullArticle.d.ts +5 -0
- package/dist/components/post/types/article/FullArticle.js +8 -0
- package/dist/components/post/types/event/CardEvent.d.ts +5 -0
- package/dist/components/post/types/event/CardEvent.js +45 -0
- package/dist/components/post/types/event/FullEvent.d.ts +5 -0
- package/dist/components/post/types/event/FullEvent.js +161 -0
- package/dist/components/post/types/event/ProfileEventRelationship.d.ts +5 -0
- package/dist/components/post/types/event/ProfileEventRelationship.js +31 -0
- package/dist/components/post/types/note/FullNote.d.ts +5 -0
- package/dist/components/post/types/note/FullNote.js +5 -0
- package/dist/components/post/types/poll/FullPoll.d.ts +5 -0
- package/dist/components/post/types/poll/FullPoll.js +7 -0
- package/dist/components/post/visibility.d.ts +7 -0
- package/dist/components/post/visibility.js +10 -0
- package/dist/components/preview-link/LocalPreviewLink.d.ts +4 -0
- package/dist/components/preview-link/LocalPreviewLink.js +12 -0
- package/dist/components/preview-link/PreviewLink.d.ts +4 -0
- package/dist/components/preview-link/PreviewLink.js +11 -0
- package/dist/components/preview-link/RemotePreviewLink.d.ts +4 -0
- package/dist/components/preview-link/RemotePreviewLink.js +21 -0
- package/dist/components/preview-link/helpers.d.ts +7 -0
- package/dist/components/preview-link/helpers.js +31 -0
- package/dist/components/preview-link/index.d.ts +3 -0
- package/dist/components/preview-link/index.js +2 -0
- package/dist/components/preview-link/local/GroupPreview.d.ts +4 -0
- package/dist/components/preview-link/local/GroupPreview.js +15 -0
- package/dist/components/preview-link/local/JamPreview.d.ts +9 -0
- package/dist/components/preview-link/local/JamPreview.js +20 -0
- package/dist/components/preview-link/local/PostPreview.d.ts +4 -0
- package/dist/components/preview-link/local/PostPreview.js +15 -0
- package/dist/components/profile/Avatar.d.ts +17 -0
- package/dist/components/profile/Avatar.js +36 -0
- package/dist/components/profile/AvatarWithName.d.ts +5 -0
- package/dist/components/profile/AvatarWithName.js +5 -0
- package/dist/components/profile/FollowUnfollowButton.d.ts +8 -0
- package/dist/components/profile/FollowUnfollowButton.js +27 -0
- package/dist/components/profile/ProfileBadge.d.ts +7 -0
- package/dist/components/profile/ProfileBadge.js +12 -0
- package/dist/components/profile/ProfileCard.d.ts +24 -0
- package/dist/components/profile/ProfileCard.js +12 -0
- package/dist/components/profile/ProfileFromId.d.ts +6 -0
- package/dist/components/profile/ProfileFromId.js +15 -0
- package/dist/components/profile/ProfileHeader.d.ts +10 -0
- package/dist/components/profile/ProfileHeader.js +16 -0
- package/dist/components/profile/ProfileLink.d.ts +9 -0
- package/dist/components/profile/ProfileLink.js +9 -0
- package/dist/components/profile/ProfilePageAction.d.ts +6 -0
- package/dist/components/profile/ProfilePageAction.js +35 -0
- package/dist/components/profile/ProfilePostsAndReplies.d.ts +9 -0
- package/dist/components/profile/ProfilePostsAndReplies.js +24 -0
- package/dist/components/profile/ProfileSelector.d.ts +14 -0
- package/dist/components/profile/ProfileSelector.js +72 -0
- package/dist/components/profile/ProfileStats.d.ts +5 -0
- package/dist/components/profile/ProfileStats.js +6 -0
- package/dist/components/profile/ProfileWithActionCard.d.ts +5 -0
- package/dist/components/profile/ProfileWithActionCard.js +6 -0
- package/dist/components/profile/ProfilesInput.d.ts +15 -0
- package/dist/components/profile/ProfilesInput.js +31 -0
- package/dist/components/profile/ReportProfileOrPostModal.d.ts +9 -0
- package/dist/components/profile/ReportProfileOrPostModal.js +75 -0
- package/dist/components/profile/index.d.ts +30 -0
- package/dist/components/profile/index.js +15 -0
- package/dist/components/registry/ErrorComponent.d.ts +6 -0
- package/dist/components/registry/ErrorComponent.js +7 -0
- package/dist/components/registry/PluginLoader.d.ts +3 -0
- package/dist/components/registry/PluginLoader.js +51 -0
- package/dist/components/registry/PluginRegistryProvider.d.ts +23 -0
- package/dist/components/registry/PluginRegistryProvider.js +57 -0
- package/dist/components/registry/PluginSlot.d.ts +7 -0
- package/dist/components/registry/PluginSlot.js +31 -0
- package/dist/components/registry/index.d.ts +10 -0
- package/dist/components/registry/index.js +16 -0
- package/dist/components/server-data/ServerDataProvider.d.ts +8 -0
- package/dist/components/server-data/ServerDataProvider.js +30 -0
- package/dist/components/server-data/context.d.ts +121 -0
- package/dist/components/server-data/context.js +10 -0
- package/dist/components/server-data/index.d.ts +4 -0
- package/dist/components/server-data/index.js +2 -0
- package/dist/components/server-data/types.d.ts +5 -0
- package/dist/components/server-data/types.js +1 -0
- package/dist/contexts/credentialsStore/index.d.ts +8 -0
- package/dist/contexts/credentialsStore/index.js +13 -0
- package/dist/contexts/credentialsStore/types.d.ts +4 -0
- package/dist/contexts/credentialsStore/types.js +1 -0
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/index.js +3 -0
- package/dist/contexts/openpeeps/helpers.d.ts +93 -0
- package/dist/contexts/openpeeps/helpers.js +311 -0
- package/dist/contexts/openpeeps/hooks/accounts.d.ts +302 -0
- package/dist/contexts/openpeeps/hooks/accounts.js +17 -0
- package/dist/contexts/openpeeps/hooks/admin.d.ts +17177 -0
- package/dist/contexts/openpeeps/hooks/admin.js +115 -0
- package/dist/contexts/openpeeps/hooks/auth.d.ts +55 -0
- package/dist/contexts/openpeeps/hooks/auth.js +22 -0
- package/dist/contexts/openpeeps/hooks/conversations.d.ts +9815 -0
- package/dist/contexts/openpeeps/hooks/conversations.js +6 -0
- package/dist/contexts/openpeeps/hooks/groups.d.ts +319 -0
- package/dist/contexts/openpeeps/hooks/groups.js +31 -0
- package/dist/contexts/openpeeps/hooks/index.d.ts +18 -0
- package/dist/contexts/openpeeps/hooks/index.js +26 -0
- package/dist/contexts/openpeeps/hooks/jams.d.ts +3318 -0
- package/dist/contexts/openpeeps/hooks/jams.js +32 -0
- package/dist/contexts/openpeeps/hooks/other.d.ts +239 -0
- package/dist/contexts/openpeeps/hooks/other.js +89 -0
- package/dist/contexts/openpeeps/hooks/payments.d.ts +36 -0
- package/dist/contexts/openpeeps/hooks/payments.js +10 -0
- package/dist/contexts/openpeeps/hooks/posts.d.ts +26001 -0
- package/dist/contexts/openpeeps/hooks/posts.js +139 -0
- package/dist/contexts/openpeeps/hooks/profiles.d.ts +6896 -0
- package/dist/contexts/openpeeps/hooks/profiles.js +43 -0
- package/dist/contexts/openpeeps/hooks/search.d.ts +9620 -0
- package/dist/contexts/openpeeps/hooks/search.js +24 -0
- package/dist/contexts/openpeeps/hooks/streaming.d.ts +26 -0
- package/dist/contexts/openpeeps/hooks/streaming.js +10 -0
- package/dist/contexts/openpeeps/hooks/useHasAuthToken.d.ts +2 -0
- package/dist/contexts/openpeeps/hooks/useHasAuthToken.js +35 -0
- package/dist/contexts/openpeeps/index.d.ts +21 -0
- package/dist/contexts/openpeeps/index.js +180 -0
- package/dist/contexts/openpeeps/types.d.ts +11 -0
- package/dist/contexts/openpeeps/types.js +1 -0
- package/dist/contexts/router/index.d.ts +28 -0
- package/dist/contexts/router/index.js +69 -0
- package/dist/email/index.d.ts +13 -0
- package/dist/email/index.js +10 -0
- package/dist/i18n/I18nProvider.d.ts +19 -0
- package/dist/i18n/I18nProvider.js +33 -0
- package/dist/i18n/context.d.ts +8 -0
- package/dist/i18n/context.js +10 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.js +23 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/lib/apiErrorMessage.d.ts +3 -0
- package/dist/lib/apiErrorMessage.js +14 -0
- package/dist/lib/canvasUtils.d.ts +12 -0
- package/dist/lib/canvasUtils.js +104 -0
- package/dist/lib/configuration/helpers.d.ts +7 -0
- package/dist/lib/configuration/helpers.js +83 -0
- package/dist/lib/configuration/resolveSchema.d.ts +3 -0
- package/dist/lib/configuration/resolveSchema.js +8 -0
- package/dist/lib/groupCapabilityHelpers.d.ts +24 -0
- package/dist/lib/groupCapabilityHelpers.js +119 -0
- package/dist/lib/notificationBadge.d.ts +5 -0
- package/dist/lib/notificationBadge.js +25 -0
- package/dist/lib/postUnread.d.ts +2 -0
- package/dist/lib/postUnread.js +1 -0
- package/dist/lib/postViewCounter.d.ts +17 -0
- package/dist/lib/postViewCounter.js +162 -0
- package/dist/lib/threadHelpers.d.ts +5 -0
- package/dist/lib/threadHelpers.js +23 -0
- package/dist/lib/unseenCountsOptimistic.d.ts +15 -0
- package/dist/lib/unseenCountsOptimistic.js +43 -0
- package/dist/log/index.d.ts +11 -0
- package/dist/log/index.js +14 -0
- package/dist/push/index.d.ts +16 -0
- package/dist/push/index.js +145 -0
- package/dist/push/usePushSubscription.d.ts +18 -0
- package/dist/push/usePushSubscription.js +102 -0
- package/dist/push/vapid.d.ts +6 -0
- package/dist/push/vapid.js +12 -0
- package/dist/pwa/InstallPrompt.d.ts +13 -0
- package/dist/pwa/InstallPrompt.js +17 -0
- package/dist/pwa/NotificationPermissionPrompt.d.ts +22 -0
- package/dist/pwa/NotificationPermissionPrompt.js +56 -0
- package/dist/pwa/PwaProvider.d.ts +16 -0
- package/dist/pwa/PwaProvider.js +56 -0
- package/dist/pwa/UpdatePrompt.d.ts +14 -0
- package/dist/pwa/UpdatePrompt.js +14 -0
- package/dist/pwa/index.d.ts +18 -0
- package/dist/pwa/index.js +16 -0
- package/dist/pwa/navigationUrl.d.ts +16 -0
- package/dist/pwa/navigationUrl.js +51 -0
- package/dist/pwa/pushInvalidate.d.ts +7 -0
- package/dist/pwa/pushInvalidate.js +29 -0
- package/dist/pwa/registration.d.ts +28 -0
- package/dist/pwa/registration.js +71 -0
- package/dist/pwa/sw-types.d.ts +14 -0
- package/dist/pwa/sw-types.js +1 -0
- package/dist/pwa/sw.d.ts +2 -0
- package/dist/pwa/sw.js +171 -0
- package/dist/pwa/useInstallPrompt.d.ts +10 -0
- package/dist/pwa/useInstallPrompt.js +45 -0
- package/dist/pwa/useNotificationBadgeSync.d.ts +2 -0
- package/dist/pwa/useNotificationBadgeSync.js +23 -0
- package/dist/pwa/useServiceWorker.d.ts +19 -0
- package/dist/pwa/useServiceWorker.js +49 -0
- package/dist/pwa/vite.d.ts +50 -0
- package/dist/pwa/vite.js +53 -0
- package/dist/react-native.d.ts +11 -0
- package/dist/react-native.js +11 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/setupTests.js +5 -0
- package/dist/stores/breadcrumbs.d.ts +5 -0
- package/dist/stores/breadcrumbs.js +5 -0
- package/dist/stores/createStore.d.ts +19 -0
- package/dist/stores/createStore.js +63 -0
- package/dist/stores/index.d.ts +7 -0
- package/dist/stores/index.js +9 -0
- package/dist/stores/newPosts.d.ts +591 -0
- package/dist/stores/newPosts.js +191 -0
- package/dist/stores/pageHeader.d.ts +15 -0
- package/dist/stores/pageHeader.js +22 -0
- package/dist/stores/plusButton.d.ts +5 -0
- package/dist/stores/plusButton.js +13 -0
- package/dist/stores/types.d.ts +35 -0
- package/dist/stores/types.js +1 -0
- package/dist/streaming.d.ts +6 -0
- package/dist/streaming.js +6 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/index.js +1 -0
- package/package.json +72 -0
- package/src/pwa/navigationUrl.ts +61 -0
- package/src/pwa/sw-types.ts +9 -0
- package/src/pwa/sw.ts +228 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { apiHook, infiniteChronologicalQueryApiHook, payloadMutation, noPayloadMutation, noPayloadStream, } from '../helpers.js';
|
|
2
|
+
export const jamHooks = (client) => ({
|
|
3
|
+
useJams: () => apiHook(client.jams.list, {
|
|
4
|
+
queryParams: { live: 'true' },
|
|
5
|
+
refetchInterval: 10_000,
|
|
6
|
+
}),
|
|
7
|
+
closeJamAction: noPayloadMutation(client.jams.close, [['jams']]),
|
|
8
|
+
useJamToken: (id) => apiHook(client.jams.token, { pathParams: { id } }),
|
|
9
|
+
useJamState: (id) => apiHook(client.jams.state, { pathParams: { id }, refetchInterval: 1500 }),
|
|
10
|
+
muteJamParticipantAction: payloadMutation(client.jams.muteParticipant),
|
|
11
|
+
useJamEvents: (id) => apiHook(client.jams.events.list, { pathParams: { id } }),
|
|
12
|
+
useInfiniteJamEvents: (id, limit = 100) => infiniteChronologicalQueryApiHook(client.jams.events.list, {
|
|
13
|
+
pathParams: { id },
|
|
14
|
+
queryParams: { limit },
|
|
15
|
+
}),
|
|
16
|
+
createJamEventAction: payloadMutation(client.jams.events.create, [['jams']]),
|
|
17
|
+
useJamAttendance: (id) => apiHook(client.jams.events.attendance, { pathParams: { id } }),
|
|
18
|
+
useWaitingRoomStream: (id) => noPayloadStream(client.jams.waitingRoom.listen).last({
|
|
19
|
+
pathParameters: { id },
|
|
20
|
+
}),
|
|
21
|
+
admitParticipantAction: noPayloadMutation(client.jams.waitingRoom.admit),
|
|
22
|
+
useJoinWaitingRoomStream: (id) => noPayloadStream(client.jams.waitingRoom.join).last({
|
|
23
|
+
pathParameters: { id },
|
|
24
|
+
}),
|
|
25
|
+
startRecordingAction: noPayloadMutation(client.jams.recordings.start, [
|
|
26
|
+
['jams'],
|
|
27
|
+
]),
|
|
28
|
+
stopRecordingAction: noPayloadMutation(client.jams.recordings.stop, [
|
|
29
|
+
['jams'],
|
|
30
|
+
]),
|
|
31
|
+
useObserverLink: (id) => apiHook(client.jams.recordings.observerLink, { pathParams: { id } }),
|
|
32
|
+
});
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import type { OpenpeepsClient } from '@openpeepshq/client';
|
|
2
|
+
import type { MediaAttachment, MediaStorageRequestInput, SuccessFailureResponse } from '@openpeepshq/common';
|
|
3
|
+
export type OtherHooks = ReturnType<typeof otherHooks>;
|
|
4
|
+
export interface MediaUploadState {
|
|
5
|
+
uploading: boolean;
|
|
6
|
+
uploadPercent: number;
|
|
7
|
+
/** Linear ETA for the byte-transfer phase, in ms. */
|
|
8
|
+
uploadEstimatedRemainingMs?: number;
|
|
9
|
+
attachment?: MediaAttachment;
|
|
10
|
+
error?: SuccessFailureResponse | unknown;
|
|
11
|
+
}
|
|
12
|
+
export declare const otherHooks: (client: OpenpeepsClient) => {
|
|
13
|
+
createMediaAttachmentAction: (defaultPathParams?: undefined) => (input: MediaStorageRequestInput, pathParams?: undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<MediaAttachment>;
|
|
14
|
+
/**
|
|
15
|
+
* Same as {@link createMediaAttachmentAction} but routes through the XHR
|
|
16
|
+
* upload path so callers can pass an `onUploadProgress` callback as the
|
|
17
|
+
* 5th argument to receive byte-level upload progress.
|
|
18
|
+
*/
|
|
19
|
+
createMediaAttachmentWithProgressAction: (defaultPathParams?: undefined) => (input: MediaStorageRequestInput, pathParams?: undefined, queryParams?: undefined, headers?: Record<string, string>, onUploadProgress?: ((event: import("@openpeepshq/fetch-client").UploadProgressEvent) => void) | undefined) => Promise<MediaAttachment>;
|
|
20
|
+
/**
|
|
21
|
+
* Returns an `upload` callback and a state object with byte-level upload
|
|
22
|
+
* progress + the partial/ready `MediaAttachment` returned from the server.
|
|
23
|
+
* Pair with `useMediaProgress` (or read `attachment.id`) to track the
|
|
24
|
+
* background processing phase.
|
|
25
|
+
*/
|
|
26
|
+
useMediaUpload: () => {
|
|
27
|
+
state: MediaUploadState;
|
|
28
|
+
upload: (input: MediaStorageRequestInput) => Promise<MediaAttachment>;
|
|
29
|
+
abort: () => void | undefined;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Subscribe to the media-processing SSE feed for a single attachment.
|
|
33
|
+
* Returns the latest progress event, with `progressPercent` capped server
|
|
34
|
+
* side at 95% until the worker finishes.
|
|
35
|
+
*/
|
|
36
|
+
useMediaProgress: (id: string | undefined) => import("@openpeepshq/common").MediaProgressEvent | undefined;
|
|
37
|
+
useServerInfo: () => import("@tanstack/react-query").UseQueryResult<{
|
|
38
|
+
version: string;
|
|
39
|
+
environment: string;
|
|
40
|
+
publicContent: boolean;
|
|
41
|
+
communityConfig: {
|
|
42
|
+
theme: {
|
|
43
|
+
base: string;
|
|
44
|
+
primaryHex: string;
|
|
45
|
+
light: {
|
|
46
|
+
primaryHex: string;
|
|
47
|
+
logoSmall?: string | undefined;
|
|
48
|
+
defaultProfileAvatar?: string | undefined;
|
|
49
|
+
defaultGroupAvatar?: string | undefined;
|
|
50
|
+
backgroundAuth?: string | undefined;
|
|
51
|
+
background?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
dark: {
|
|
54
|
+
primaryHex: string;
|
|
55
|
+
logoSmall?: string | undefined;
|
|
56
|
+
defaultProfileAvatar?: string | undefined;
|
|
57
|
+
defaultGroupAvatar?: string | undefined;
|
|
58
|
+
backgroundAuth?: string | undefined;
|
|
59
|
+
background?: string | undefined;
|
|
60
|
+
};
|
|
61
|
+
icon?: string | undefined;
|
|
62
|
+
mobileIcon?: string | undefined;
|
|
63
|
+
logoFull?: string | undefined;
|
|
64
|
+
logoSmall?: string | undefined;
|
|
65
|
+
defaultProfileAvatar?: string | undefined;
|
|
66
|
+
defaultGroupAvatar?: string | undefined;
|
|
67
|
+
backgroundAuth?: string | undefined;
|
|
68
|
+
background?: string | undefined;
|
|
69
|
+
};
|
|
70
|
+
info: {
|
|
71
|
+
name: string;
|
|
72
|
+
tagLine: string;
|
|
73
|
+
contactEmail?: string | undefined;
|
|
74
|
+
privacyPolicy?: string | undefined;
|
|
75
|
+
termsAndConditions?: string | undefined;
|
|
76
|
+
};
|
|
77
|
+
content: {
|
|
78
|
+
aboutPage?: string | undefined;
|
|
79
|
+
welcomePage?: string | undefined;
|
|
80
|
+
codeOfConduct?: string | undefined;
|
|
81
|
+
welcomeEmail?: string | undefined;
|
|
82
|
+
pinnedPost?: string | undefined;
|
|
83
|
+
};
|
|
84
|
+
settings: {
|
|
85
|
+
openRegistrations: boolean;
|
|
86
|
+
defaultLanguage?: string | undefined;
|
|
87
|
+
};
|
|
88
|
+
roles: {
|
|
89
|
+
onRegistration: {
|
|
90
|
+
add: string[];
|
|
91
|
+
remove: string[];
|
|
92
|
+
};
|
|
93
|
+
onEmailValidation: {
|
|
94
|
+
add: string[];
|
|
95
|
+
remove: string[];
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
profiles?: {
|
|
99
|
+
additionalFields?: {
|
|
100
|
+
key: string;
|
|
101
|
+
label: string;
|
|
102
|
+
icon?: string | undefined;
|
|
103
|
+
linkPattern?: string | undefined;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
} | undefined;
|
|
106
|
+
};
|
|
107
|
+
jams: {
|
|
108
|
+
livekit: {
|
|
109
|
+
url: string;
|
|
110
|
+
enabled: boolean;
|
|
111
|
+
recordingEnabled: boolean;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
vapid: {
|
|
115
|
+
publicKey?: string | undefined;
|
|
116
|
+
};
|
|
117
|
+
sentryConfig: {
|
|
118
|
+
enabled: boolean;
|
|
119
|
+
dsn?: string | undefined;
|
|
120
|
+
replayEnabled?: boolean | undefined;
|
|
121
|
+
};
|
|
122
|
+
payments: {
|
|
123
|
+
stripe: {
|
|
124
|
+
paidMembership: {
|
|
125
|
+
enabled: boolean;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
maxProfiles?: number | undefined;
|
|
130
|
+
sso?: {
|
|
131
|
+
oidc: {
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
}[];
|
|
135
|
+
} | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
success: boolean;
|
|
138
|
+
message?: string | undefined;
|
|
139
|
+
key?: string | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
authenticateGenericSSOAction: (defaultPathParams?: undefined) => (input: {
|
|
142
|
+
data: Record<string, string>;
|
|
143
|
+
}, pathParams?: undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
144
|
+
success: true;
|
|
145
|
+
token: string;
|
|
146
|
+
checkoutUrl?: string | undefined;
|
|
147
|
+
}>;
|
|
148
|
+
usePreviewLink: (url: string) => import("@tanstack/react-query").UseQueryResult<{
|
|
149
|
+
statusCode: number;
|
|
150
|
+
success: boolean;
|
|
151
|
+
data: {
|
|
152
|
+
image: string;
|
|
153
|
+
title: string;
|
|
154
|
+
description: string;
|
|
155
|
+
url: string;
|
|
156
|
+
};
|
|
157
|
+
}, {
|
|
158
|
+
success: boolean;
|
|
159
|
+
message?: string | undefined;
|
|
160
|
+
key?: string | undefined;
|
|
161
|
+
}>;
|
|
162
|
+
useGeocode: (query: string) => Promise<{
|
|
163
|
+
data: {
|
|
164
|
+
name: string;
|
|
165
|
+
bbox: {
|
|
166
|
+
lat: number;
|
|
167
|
+
lng: number;
|
|
168
|
+
alt?: number | undefined;
|
|
169
|
+
}[];
|
|
170
|
+
center: {
|
|
171
|
+
lat: number;
|
|
172
|
+
lng: number;
|
|
173
|
+
alt?: number | undefined;
|
|
174
|
+
};
|
|
175
|
+
icon?: string | undefined;
|
|
176
|
+
properties?: Record<string, any> | undefined;
|
|
177
|
+
}[];
|
|
178
|
+
} | {
|
|
179
|
+
error: {
|
|
180
|
+
success: boolean;
|
|
181
|
+
message?: string | undefined;
|
|
182
|
+
key?: string | undefined;
|
|
183
|
+
};
|
|
184
|
+
}>;
|
|
185
|
+
usei18n: (lang: string) => import("@tanstack/react-query").UseQueryResult<import("i18next").ResourceLanguage, {
|
|
186
|
+
success: boolean;
|
|
187
|
+
message?: string | undefined;
|
|
188
|
+
key?: string | undefined;
|
|
189
|
+
}>;
|
|
190
|
+
usei18nLanguages: () => import("@tanstack/react-query").UseQueryResult<string[], {
|
|
191
|
+
success: boolean;
|
|
192
|
+
message?: string | undefined;
|
|
193
|
+
key?: string | undefined;
|
|
194
|
+
}>;
|
|
195
|
+
useReportsList: () => import("@tanstack/react-query").UseQueryResult<import("@openpeepshq/common").PublicReport[], {
|
|
196
|
+
success: boolean;
|
|
197
|
+
message?: string | undefined;
|
|
198
|
+
key?: string | undefined;
|
|
199
|
+
}>;
|
|
200
|
+
useReport: (reportId: string) => import("@tanstack/react-query").UseQueryResult<import("@openpeepshq/common").PublicReport, {
|
|
201
|
+
success: boolean;
|
|
202
|
+
message?: string | undefined;
|
|
203
|
+
key?: string | undefined;
|
|
204
|
+
}>;
|
|
205
|
+
createReportAction: (defaultPathParams?: undefined) => (input: {
|
|
206
|
+
report: {
|
|
207
|
+
comment: string;
|
|
208
|
+
category: "other" | "spam" | "violation";
|
|
209
|
+
uri?: string | undefined;
|
|
210
|
+
forward?: boolean | undefined;
|
|
211
|
+
ruleIds?: number[] | undefined;
|
|
212
|
+
resolution?: "remove" | "other" | "ignore" | "warn" | "ban" | undefined;
|
|
213
|
+
};
|
|
214
|
+
profileId: string;
|
|
215
|
+
postIds: string[];
|
|
216
|
+
}, pathParams?: undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<import("@openpeepshq/common").PublicReport>;
|
|
217
|
+
/**
|
|
218
|
+
* VOD HLS streaming. Idempotent: requesting a stream for a source that
|
|
219
|
+
* has already been transcoded just refreshes its access timestamp on the
|
|
220
|
+
* server and returns the existing `MediaStream`.
|
|
221
|
+
*/
|
|
222
|
+
createVodStreamAction: (defaultPathParams?: undefined) => (input: {
|
|
223
|
+
url: string;
|
|
224
|
+
}, pathParams?: undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
225
|
+
storageId: string;
|
|
226
|
+
status: "error" | "processing" | "ready";
|
|
227
|
+
error?: string | undefined;
|
|
228
|
+
}>;
|
|
229
|
+
/** Polls the current status of a previously-created VOD stream. */
|
|
230
|
+
getVodStreamStatusAction: (defaultPathParams?: {
|
|
231
|
+
storageId: string;
|
|
232
|
+
} | undefined) => (pathParams?: {
|
|
233
|
+
storageId: string;
|
|
234
|
+
} | undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
235
|
+
storageId: string;
|
|
236
|
+
status: "error" | "processing" | "ready";
|
|
237
|
+
error?: string | undefined;
|
|
238
|
+
}>;
|
|
239
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
import { apiHook, noPayloadMutation, noPayloadStream, payloadMutation, payloadProgressMutation, } from '../helpers.js';
|
|
3
|
+
export const otherHooks = (client) => ({
|
|
4
|
+
// Media
|
|
5
|
+
createMediaAttachmentAction: payloadMutation(client.mediaAttachment.create),
|
|
6
|
+
/**
|
|
7
|
+
* Same as {@link createMediaAttachmentAction} but routes through the XHR
|
|
8
|
+
* upload path so callers can pass an `onUploadProgress` callback as the
|
|
9
|
+
* 5th argument to receive byte-level upload progress.
|
|
10
|
+
*/
|
|
11
|
+
createMediaAttachmentWithProgressAction: payloadProgressMutation(client.mediaAttachment.createWithProgress),
|
|
12
|
+
/**
|
|
13
|
+
* Returns an `upload` callback and a state object with byte-level upload
|
|
14
|
+
* progress + the partial/ready `MediaAttachment` returned from the server.
|
|
15
|
+
* Pair with `useMediaProgress` (or read `attachment.id`) to track the
|
|
16
|
+
* background processing phase.
|
|
17
|
+
*/
|
|
18
|
+
useMediaUpload: () => {
|
|
19
|
+
const [state, setState] = useState({
|
|
20
|
+
uploading: false,
|
|
21
|
+
uploadPercent: 0,
|
|
22
|
+
});
|
|
23
|
+
const [controller, setController] = useState();
|
|
24
|
+
const upload = useCallback(async (input) => {
|
|
25
|
+
const ctrl = new AbortController();
|
|
26
|
+
setController(ctrl);
|
|
27
|
+
setState({ uploading: true, uploadPercent: 0 });
|
|
28
|
+
const result = await client.mediaAttachment.createWithProgress(input, {
|
|
29
|
+
signal: ctrl.signal,
|
|
30
|
+
onUploadProgress: ({ percent, estimatedRemainingMs }) => setState((s) => ({
|
|
31
|
+
...s,
|
|
32
|
+
uploadPercent: percent,
|
|
33
|
+
uploadEstimatedRemainingMs: estimatedRemainingMs,
|
|
34
|
+
})),
|
|
35
|
+
});
|
|
36
|
+
if ('data' in result) {
|
|
37
|
+
setState({
|
|
38
|
+
uploading: false,
|
|
39
|
+
uploadPercent: 100,
|
|
40
|
+
uploadEstimatedRemainingMs: 0,
|
|
41
|
+
attachment: result.data,
|
|
42
|
+
});
|
|
43
|
+
return result.data;
|
|
44
|
+
}
|
|
45
|
+
setState({
|
|
46
|
+
uploading: false,
|
|
47
|
+
uploadPercent: 0,
|
|
48
|
+
error: result.error,
|
|
49
|
+
});
|
|
50
|
+
throw result.error;
|
|
51
|
+
}, []);
|
|
52
|
+
const abort = useCallback(() => controller?.abort(), [controller]);
|
|
53
|
+
return { state, upload, abort };
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Subscribe to the media-processing SSE feed for a single attachment.
|
|
57
|
+
* Returns the latest progress event, with `progressPercent` capped server
|
|
58
|
+
* side at 95% until the worker finishes.
|
|
59
|
+
*/
|
|
60
|
+
useMediaProgress: (id) =>
|
|
61
|
+
// Pass an empty `id` (not an empty object) when there's nothing to track
|
|
62
|
+
// yet: the stream's `.last` guard only skips when a param *value* is
|
|
63
|
+
// blank, so `{}` would otherwise open a broken `/media//progress` feed
|
|
64
|
+
// during the byte-upload phase.
|
|
65
|
+
noPayloadStream(client.mediaAttachment.progress.listen).last({
|
|
66
|
+
pathParameters: { id: id ?? '' },
|
|
67
|
+
}),
|
|
68
|
+
// Server
|
|
69
|
+
useServerInfo: () => apiHook(client.server.info),
|
|
70
|
+
// SSO
|
|
71
|
+
authenticateGenericSSOAction: payloadMutation(client.sso.generic.authenticate),
|
|
72
|
+
// Link Preview
|
|
73
|
+
usePreviewLink: (url) => apiHook(client.previewLink, { pathParams: { url } }),
|
|
74
|
+
useGeocode: (query) => client.location.geocode({ queryParameters: { query } }),
|
|
75
|
+
usei18n: (lang) => apiHook(client.i18n.translations, { pathParams: { lang } }),
|
|
76
|
+
usei18nLanguages: () => apiHook(client.i18n.languages),
|
|
77
|
+
// Reports
|
|
78
|
+
useReportsList: () => apiHook(client.reports.list),
|
|
79
|
+
useReport: (reportId) => apiHook(client.reports.findById, { pathParams: { reportId } }),
|
|
80
|
+
createReportAction: payloadMutation(client.reports.create, [['reports']]),
|
|
81
|
+
/**
|
|
82
|
+
* VOD HLS streaming. Idempotent: requesting a stream for a source that
|
|
83
|
+
* has already been transcoded just refreshes its access timestamp on the
|
|
84
|
+
* server and returns the existing `MediaStream`.
|
|
85
|
+
*/
|
|
86
|
+
createVodStreamAction: payloadMutation(client.streaming.vod.create),
|
|
87
|
+
/** Polls the current status of a previously-created VOD stream. */
|
|
88
|
+
getVodStreamStatusAction: noPayloadMutation(client.streaming.vod.status),
|
|
89
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { OpenpeepsClient } from '@openpeepshq/client';
|
|
2
|
+
export type PaymentHooks = ReturnType<typeof paymentHooks>;
|
|
3
|
+
export declare const paymentHooks: (client: OpenpeepsClient) => {
|
|
4
|
+
usePaymentStatus: (options?: {
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}) => import("@tanstack/react-query").UseQueryResult<{
|
|
7
|
+
subscriptionId: string | null;
|
|
8
|
+
status: "active" | "incomplete" | "incomplete_expired" | "trialing" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
9
|
+
priceId: string | null;
|
|
10
|
+
currentPeriodStart: number | null;
|
|
11
|
+
currentPeriodEnd: number | null;
|
|
12
|
+
cancelAtPeriodEnd: boolean;
|
|
13
|
+
paymentMethod: {
|
|
14
|
+
brand: string | null;
|
|
15
|
+
last4: string | null;
|
|
16
|
+
} | null;
|
|
17
|
+
} | {
|
|
18
|
+
status: "none";
|
|
19
|
+
}, {
|
|
20
|
+
success: boolean;
|
|
21
|
+
message?: string | undefined;
|
|
22
|
+
key?: string | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
createCustomerPortalAction: (defaultPathParams?: undefined) => (pathParams?: undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
25
|
+
success: boolean;
|
|
26
|
+
message?: string | undefined;
|
|
27
|
+
key?: string | undefined;
|
|
28
|
+
url?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
createCheckoutAction: (defaultPathParams?: undefined) => (pathParams?: undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
31
|
+
success: boolean;
|
|
32
|
+
url: string | null;
|
|
33
|
+
message?: string | undefined;
|
|
34
|
+
key?: string | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { apiHook, noPayloadMutation } from '../helpers.js';
|
|
2
|
+
export const paymentHooks = (client) => ({
|
|
3
|
+
usePaymentStatus: (options) => apiHook(client.payments.status, options),
|
|
4
|
+
createCustomerPortalAction: noPayloadMutation(client.payments.createPortal, [
|
|
5
|
+
['payments'],
|
|
6
|
+
]),
|
|
7
|
+
createCheckoutAction: noPayloadMutation(client.payments.createCheckout, [
|
|
8
|
+
['payments'],
|
|
9
|
+
]),
|
|
10
|
+
});
|