@adminide-stack/yantra-mobile 12.0.196-alpha.0 → 12.0.196-alpha.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.
- package/lib/components/CustomDrawer.js +17 -1
- package/lib/components/CustomDrawer.js.map +1 -1
- package/lib/compute.js +57 -1
- package/lib/compute.js.map +1 -1
- package/lib/config/env-config.js +11 -1
- package/lib/config/env-config.js.map +1 -1
- package/lib/features/agent-chat/NativeAgentChat.js +7 -0
- package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
- package/lib/features/canvas/extendVideo.js +5 -1
- package/lib/features/canvas/extendVideo.js.map +1 -1
- package/lib/features/canvas/workflow/StepSheet.js +18 -1
- package/lib/features/canvas/workflow/StepSheet.js.map +1 -1
- package/lib/features/canvas/workflow/workflowSteps.js +102 -31
- package/lib/features/canvas/workflow/workflowSteps.js.map +1 -1
- package/lib/features/chat/ComposerMicSend.js +35 -0
- package/lib/features/chat/ComposerMicSend.js.map +1 -0
- package/lib/features/chat/ComposerModeSwitch.js +64 -1
- package/lib/features/chat/ComposerModeSwitch.js.map +1 -1
- package/lib/features/chat/askUser.js +6 -1
- package/lib/features/chat/askUser.js.map +1 -1
- package/lib/features/connectors/ConnectorSheet.js +443 -0
- package/lib/features/connectors/ConnectorSheet.js.map +1 -0
- package/lib/features/connectors/ConnectorsPage.js +320 -0
- package/lib/features/connectors/ConnectorsPage.js.map +1 -0
- package/lib/features/connectors/connectConnector.js +278 -0
- package/lib/features/connectors/connectConnector.js.map +1 -0
- package/lib/features/connectors/connectorCatalog.js +222 -0
- package/lib/features/connectors/connectorCatalog.js.map +1 -0
- package/lib/features/connectors/useConnectorCatalog.js +153 -0
- package/lib/features/connectors/useConnectorCatalog.js.map +1 -0
- package/lib/features/home/needsYou/HomeNeedsYou.js +618 -0
- package/lib/features/home/needsYou/HomeNeedsYou.js.map +1 -0
- package/lib/features/home/needsYou/chatFollowUps.js +333 -0
- package/lib/features/home/needsYou/chatFollowUps.js.map +1 -0
- package/lib/features/home/needsYou/format.js +47 -0
- package/lib/features/home/needsYou/format.js.map +1 -0
- package/lib/features/home/needsYou/historyText.js +40 -0
- package/lib/features/home/needsYou/historyText.js.map +1 -0
- package/lib/features/home/needsYou/inboxHighlights.js +152 -0
- package/lib/features/home/needsYou/inboxHighlights.js.map +1 -0
- package/lib/features/home/needsYou/panelsSettings.js +71 -0
- package/lib/features/home/needsYou/panelsSettings.js.map +1 -0
- package/lib/features/home/needsYou/ported/commandConfirmProtocol.js +13 -0
- package/lib/features/home/needsYou/ported/commandConfirmProtocol.js.map +1 -0
- package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js +91 -0
- package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js.map +1 -0
- package/lib/features/home/needsYou/ported/resultCardModels.js +659 -0
- package/lib/features/home/needsYou/ported/resultCardModels.js.map +1 -0
- package/lib/features/home/needsYou/types.js +1 -0
- package/lib/features/home/needsYou/types.js.map +1 -0
- package/lib/features/home/needsYou/useChatFollowUps.js +149 -0
- package/lib/features/home/needsYou/useChatFollowUps.js.map +1 -0
- package/lib/features/home/needsYou/useHomeBriefing.js +68 -0
- package/lib/features/home/needsYou/useHomeBriefing.js.map +1 -0
- package/lib/features/home/needsYou/useInboxHighlights.js +173 -0
- package/lib/features/home/needsYou/useInboxHighlights.js.map +1 -0
- package/lib/features/home/needsYou/usePanelsSettings.js +105 -0
- package/lib/features/home/needsYou/usePanelsSettings.js.map +1 -0
- package/lib/features/shopping/DealCard.js +8 -1
- package/lib/features/shopping/DealCard.js.map +1 -1
- package/lib/features/shopping/DealRails.js +24 -7
- package/lib/features/shopping/DealRails.js.map +1 -1
- package/lib/features/shopping/DealsPanel.js +1 -1
- package/lib/features/shopping/DealsPanel.js.map +1 -1
- package/lib/features/shopping/HolidayDealsPanel.js +529 -0
- package/lib/features/shopping/HolidayDealsPanel.js.map +1 -0
- package/lib/features/shopping/HolidayDealsParts.js +954 -0
- package/lib/features/shopping/HolidayDealsParts.js.map +1 -0
- package/lib/features/shopping/HolidayOffers.js +351 -0
- package/lib/features/shopping/HolidayOffers.js.map +1 -0
- package/lib/features/shopping/ProductCard.js +80 -14
- package/lib/features/shopping/ProductCard.js.map +1 -1
- package/lib/features/shopping/ProductDetailSheet.js +22 -3
- package/lib/features/shopping/ProductDetailSheet.js.map +1 -1
- package/lib/features/shopping/SavedPanel.js +341 -5
- package/lib/features/shopping/SavedPanel.js.map +1 -1
- package/lib/features/shopping/SearchResults.js +8 -2
- package/lib/features/shopping/SearchResults.js.map +1 -1
- package/lib/features/shopping/ShoppingAgentChatPane.js +12 -0
- package/lib/features/shopping/ShoppingAgentChatPane.js.map +1 -1
- package/lib/features/shopping/ShoppingExperience.js +56 -19
- package/lib/features/shopping/ShoppingExperience.js.map +1 -1
- package/lib/features/shopping/TrendingSections.js +13 -4
- package/lib/features/shopping/TrendingSections.js.map +1 -1
- package/lib/features/shopping/WatchlistPanel.js +61 -5
- package/lib/features/shopping/WatchlistPanel.js.map +1 -1
- package/lib/features/shopping/catalog.js +41 -2
- package/lib/features/shopping/catalog.js.map +1 -1
- package/lib/features/shopping/chat/brainRouter.js +14 -0
- package/lib/features/shopping/chat/brainRouter.js.map +1 -1
- package/lib/features/shopping/chat/shoppingTurn.js +88 -16
- package/lib/features/shopping/chat/shoppingTurn.js.map +1 -1
- package/lib/features/shopping/hooks/useHolidayDeals.js +388 -0
- package/lib/features/shopping/hooks/useHolidayDeals.js.map +1 -0
- package/lib/features/shopping/hooks/useProductMedia.js +33 -6
- package/lib/features/shopping/hooks/useProductMedia.js.map +1 -1
- package/lib/features/shopping/hooks/useShoppingHistorySync.js +8 -4
- package/lib/features/shopping/hooks/useShoppingHistorySync.js.map +1 -1
- package/lib/features/shopping/hooks/useTrendingProducts.js +11 -3
- package/lib/features/shopping/hooks/useTrendingProducts.js.map +1 -1
- package/lib/features/shopping/savedProducts.js +76 -6
- package/lib/features/shopping/savedProducts.js.map +1 -1
- package/lib/features/shopping/services/aiRelevance.js +212 -0
- package/lib/features/shopping/services/aiRelevance.js.map +1 -0
- package/lib/features/shopping/services/blackFriday.js +301 -0
- package/lib/features/shopping/services/blackFriday.js.map +1 -0
- package/lib/features/shopping/services/blackFridayBrowserSites.js +137 -0
- package/lib/features/shopping/services/blackFridayBrowserSites.js.map +1 -0
- package/lib/features/shopping/services/catalogProductSearch.js +21 -3
- package/lib/features/shopping/services/catalogProductSearch.js.map +1 -1
- package/lib/features/shopping/services/holidayDeals.js +143 -0
- package/lib/features/shopping/services/holidayDeals.js.map +1 -0
- package/lib/features/shopping/services/mediaShape.js +7 -0
- package/lib/features/shopping/services/mediaShape.js.map +1 -0
- package/lib/features/shopping/services/modelStep.js +95 -0
- package/lib/features/shopping/services/modelStep.js.map +1 -0
- package/lib/features/shopping/services/modelWords.js +14 -0
- package/lib/features/shopping/services/modelWords.js.map +1 -0
- package/lib/features/shopping/services/productAvailability.js +5 -1
- package/lib/features/shopping/services/productAvailability.js.map +1 -1
- package/lib/features/shopping/services/productFilters.js +2 -2
- package/lib/features/shopping/services/productFilters.js.map +1 -1
- package/lib/features/shopping/services/productMedia.js +103 -18
- package/lib/features/shopping/services/productMedia.js.map +1 -1
- package/lib/features/shopping/services/retailerUrl.js +11 -8
- package/lib/features/shopping/services/retailerUrl.js.map +1 -1
- package/lib/features/shopping/services/salesDealsStore.js +3 -2
- package/lib/features/shopping/services/salesDealsStore.js.map +1 -1
- package/lib/features/shopping/services/savedReads.js +82 -0
- package/lib/features/shopping/services/savedReads.js.map +1 -0
- package/lib/features/shopping/services/searchCardFields.js +2 -0
- package/lib/features/shopping/services/searchCardFields.js.map +1 -1
- package/lib/features/shopping/services/searchRelevance.js +154 -24
- package/lib/features/shopping/services/searchRelevance.js.map +1 -1
- package/lib/features/shopping/services/secondHand.js +12 -0
- package/lib/features/shopping/services/secondHand.js.map +1 -0
- package/lib/features/shopping/services/shoppingProductSearch.js +82 -10
- package/lib/features/shopping/services/shoppingProductSearch.js.map +1 -1
- package/lib/features/shopping/services/shoppingSearchConnectorClient.js +14 -1
- package/lib/features/shopping/services/shoppingSearchConnectorClient.js.map +1 -1
- package/lib/features/shopping/services/shoppingSubgraph.js +2 -1
- package/lib/features/shopping/services/shoppingSubgraph.js.map +1 -1
- package/lib/features/shopping/services/storedGalleries.js +130 -0
- package/lib/features/shopping/services/storedGalleries.js.map +1 -0
- package/lib/features/shopping/services/usedSites.js +263 -0
- package/lib/features/shopping/services/usedSites.js.map +1 -0
- package/lib/features/shopping/services/verifyProducts.js +3 -3
- package/lib/features/shopping/services/verifyProducts.js.map +1 -1
- package/lib/features/shopping/services/watchDeal.js +61 -0
- package/lib/features/shopping/services/watchDeal.js.map +1 -0
- package/lib/features/shopping/shoppingRuntime.js +7 -2
- package/lib/features/shopping/shoppingRuntime.js.map +1 -1
- package/lib/features/shopping/state/accountCaches.js +20 -0
- package/lib/features/shopping/state/accountCaches.js.map +1 -0
- package/lib/features/shopping/state/holidayDealsRequest.js +22 -0
- package/lib/features/shopping/state/holidayDealsRequest.js.map +1 -0
- package/lib/features/shopping/tutorials/ShoppingTutorialDock.js +1 -1
- package/lib/features/shopping/tutorials/ShoppingTutorialDock.js.map +1 -1
- package/lib/features/shopping/tutorials/shoppingTutorials.js +2 -0
- package/lib/features/shopping/tutorials/shoppingTutorials.js.map +1 -1
- package/lib/features/shopping/useShoppingSearch.js +74 -18
- package/lib/features/shopping/useShoppingSearch.js.map +1 -1
- package/lib/features/team-chat/TeamChatExperience.js +474 -0
- package/lib/features/team-chat/TeamChatExperience.js.map +1 -0
- package/lib/features/team-chat/api/client.js +198 -0
- package/lib/features/team-chat/api/client.js.map +1 -0
- package/lib/features/team-chat/api/live.js +160 -0
- package/lib/features/team-chat/api/live.js.map +1 -0
- package/lib/features/team-chat/api/ops.js +241 -0
- package/lib/features/team-chat/api/ops.js.map +1 -0
- package/lib/features/team-chat/app.js +12 -0
- package/lib/features/team-chat/app.js.map +1 -0
- package/lib/features/team-chat/components/Avatar.js +107 -0
- package/lib/features/team-chat/components/Avatar.js.map +1 -0
- package/lib/features/team-chat/components/Composer.js +641 -0
- package/lib/features/team-chat/components/Composer.js.map +1 -0
- package/lib/features/team-chat/components/Dialogs.js +598 -0
- package/lib/features/team-chat/components/Dialogs.js.map +1 -0
- package/lib/features/team-chat/components/EmojiPicker.js +165 -0
- package/lib/features/team-chat/components/EmojiPicker.js.map +1 -0
- package/lib/features/team-chat/components/MessageItem.js +658 -0
- package/lib/features/team-chat/components/MessageItem.js.map +1 -0
- package/lib/features/team-chat/components/MessageList.js +248 -0
- package/lib/features/team-chat/components/MessageList.js.map +1 -0
- package/lib/features/team-chat/components/Mrkdwn.js +228 -0
- package/lib/features/team-chat/components/Mrkdwn.js.map +1 -0
- package/lib/features/team-chat/components/QuickSwitcher.js +215 -0
- package/lib/features/team-chat/components/QuickSwitcher.js.map +1 -0
- package/lib/features/team-chat/components/ui.js +662 -0
- package/lib/features/team-chat/components/ui.js.map +1 -0
- package/lib/features/team-chat/nativeTeamChatRegistry.js +15 -0
- package/lib/features/team-chat/nativeTeamChatRegistry.js.map +1 -0
- package/lib/features/team-chat/state/fetched.js +39 -0
- package/lib/features/team-chat/state/fetched.js.map +1 -0
- package/lib/features/team-chat/state/lists.js +230 -0
- package/lib/features/team-chat/state/lists.js.map +1 -0
- package/lib/features/team-chat/state/store.js +1108 -0
- package/lib/features/team-chat/state/store.js.map +1 -0
- package/lib/features/team-chat/state/useChannelDirectory.js +21 -0
- package/lib/features/team-chat/state/useChannelDirectory.js.map +1 -0
- package/lib/features/team-chat/theme.js +77 -0
- package/lib/features/team-chat/theme.js.map +1 -0
- package/lib/features/team-chat/utils/composeText.js +72 -0
- package/lib/features/team-chat/utils/composeText.js.map +1 -0
- package/lib/features/team-chat/utils/emoji.js +369 -0
- package/lib/features/team-chat/utils/emoji.js.map +1 -0
- package/lib/features/team-chat/utils/format.js +109 -0
- package/lib/features/team-chat/utils/format.js.map +1 -0
- package/lib/features/team-chat/utils/messageRows.js +24 -0
- package/lib/features/team-chat/utils/messageRows.js.map +1 -0
- package/lib/features/team-chat/utils/mrkdwn.js +222 -0
- package/lib/features/team-chat/utils/mrkdwn.js.map +1 -0
- package/lib/features/team-chat/utils/notify.js +47 -0
- package/lib/features/team-chat/utils/notify.js.map +1 -0
- package/lib/features/team-chat/utils/pickFiles.js +81 -0
- package/lib/features/team-chat/utils/pickFiles.js.map +1 -0
- package/lib/features/team-chat/views/ActivityView.js +235 -0
- package/lib/features/team-chat/views/ActivityView.js.map +1 -0
- package/lib/features/team-chat/views/BrowseView.js +179 -0
- package/lib/features/team-chat/views/BrowseView.js.map +1 -0
- package/lib/features/team-chat/views/ChannelView.js +475 -0
- package/lib/features/team-chat/views/ChannelView.js.map +1 -0
- package/lib/features/team-chat/views/DetailsPane.js +816 -0
- package/lib/features/team-chat/views/DetailsPane.js.map +1 -0
- package/lib/features/team-chat/views/DraftsView.js +212 -0
- package/lib/features/team-chat/views/DraftsView.js.map +1 -0
- package/lib/features/team-chat/views/FilesView.js +152 -0
- package/lib/features/team-chat/views/FilesView.js.map +1 -0
- package/lib/features/team-chat/views/NewMessageView.js +286 -0
- package/lib/features/team-chat/views/NewMessageView.js.map +1 -0
- package/lib/features/team-chat/views/PeopleView.js +118 -0
- package/lib/features/team-chat/views/PeopleView.js.map +1 -0
- package/lib/features/team-chat/views/ProfilePane.js +220 -0
- package/lib/features/team-chat/views/ProfilePane.js.map +1 -0
- package/lib/features/team-chat/views/SavedView.js +113 -0
- package/lib/features/team-chat/views/SavedView.js.map +1 -0
- package/lib/features/team-chat/views/SearchView.js +307 -0
- package/lib/features/team-chat/views/SearchView.js.map +1 -0
- package/lib/features/team-chat/views/Sidebar.js +368 -0
- package/lib/features/team-chat/views/Sidebar.js.map +1 -0
- package/lib/features/team-chat/views/ThreadPane.js +139 -0
- package/lib/features/team-chat/views/ThreadPane.js.map +1 -0
- package/lib/features/team-chat/views/ThreadsView.js +157 -0
- package/lib/features/team-chat/views/ThreadsView.js.map +1 -0
- package/lib/features/webbuilder/WebBuilderExperience.js +276 -42
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
- package/lib/features/webbuilder/buildFragments.js +10 -4
- package/lib/features/webbuilder/buildFragments.js.map +1 -1
- package/lib/features/webbuilder/components/AssetChips.js +61 -0
- package/lib/features/webbuilder/components/AssetChips.js.map +1 -0
- package/lib/features/webbuilder/components/AssetSiteChooser.js +100 -0
- package/lib/features/webbuilder/components/AssetSiteChooser.js.map +1 -0
- package/lib/features/webbuilder/components/CommentsLayer.js +485 -0
- package/lib/features/webbuilder/components/CommentsLayer.js.map +1 -0
- package/lib/features/webbuilder/components/Composer.js +16 -2
- package/lib/features/webbuilder/components/Composer.js.map +1 -1
- package/lib/features/webbuilder/components/ComposerModeSwitch.js +71 -0
- package/lib/features/webbuilder/components/ComposerModeSwitch.js.map +1 -0
- package/lib/features/webbuilder/components/MyAssetsPicker.js +500 -0
- package/lib/features/webbuilder/components/MyAssetsPicker.js.map +1 -0
- package/lib/features/webbuilder/components/PlanDocument.js +165 -0
- package/lib/features/webbuilder/components/PlanDocument.js.map +1 -0
- package/lib/features/webbuilder/components/PlanDraftCard.js +205 -0
- package/lib/features/webbuilder/components/PlanDraftCard.js.map +1 -0
- package/lib/features/webbuilder/components/PlanView.js +788 -0
- package/lib/features/webbuilder/components/PlanView.js.map +1 -0
- package/lib/features/webbuilder/components/PreviewConsoleSheet.js +334 -0
- package/lib/features/webbuilder/components/PreviewConsoleSheet.js.map +1 -0
- package/lib/features/webbuilder/components/PreviewFrame.js +45 -3
- package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewScreen.js +94 -10
- package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectChat.js +84 -14
- package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
- package/lib/features/webbuilder/components/StudioHome.js +69 -6
- package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
- package/lib/features/webbuilder/components/StyleDirectionsSheet.js +291 -0
- package/lib/features/webbuilder/components/StyleDirectionsSheet.js.map +1 -0
- package/lib/features/webbuilder/components/VersionChangesView.js +574 -0
- package/lib/features/webbuilder/components/VersionChangesView.js.map +1 -0
- package/lib/features/webbuilder/components/VersionPreviewView.js +186 -0
- package/lib/features/webbuilder/components/VersionPreviewView.js.map +1 -0
- package/lib/features/webbuilder/components/VersionsSheet.js +673 -16
- package/lib/features/webbuilder/components/VersionsSheet.js.map +1 -1
- package/lib/features/webbuilder/connectorTemplates.js +6 -1
- package/lib/features/webbuilder/connectorTemplates.js.map +1 -1
- package/lib/features/webbuilder/myAssets.js +101 -0
- package/lib/features/webbuilder/myAssets.js.map +1 -0
- package/lib/features/webbuilder/planChat.js +146 -0
- package/lib/features/webbuilder/planChat.js.map +1 -0
- package/lib/features/webbuilder/planDocument.js +89 -0
- package/lib/features/webbuilder/planDocument.js.map +1 -0
- package/lib/features/webbuilder/planStore.js +55 -0
- package/lib/features/webbuilder/planStore.js.map +1 -0
- package/lib/features/webbuilder/previewCommentsScript.js +218 -0
- package/lib/features/webbuilder/previewCommentsScript.js.map +1 -0
- package/lib/features/webbuilder/previewConsoleScript.js +39 -0
- package/lib/features/webbuilder/previewConsoleScript.js.map +1 -0
- package/lib/features/webbuilder/styleDirections.js +85 -0
- package/lib/features/webbuilder/styleDirections.js.map +1 -0
- package/lib/features/webbuilder/useCanvasComments.js +335 -0
- package/lib/features/webbuilder/useCanvasComments.js.map +1 -0
- package/lib/features/webbuilder/useCatalogTemplates.js +37 -0
- package/lib/features/webbuilder/useCatalogTemplates.js.map +1 -0
- package/lib/features/webbuilder/usePlanMode.js +145 -0
- package/lib/features/webbuilder/usePlanMode.js.map +1 -0
- package/lib/features/webbuilder/useStyleDirections.js +112 -0
- package/lib/features/webbuilder/useStyleDirections.js.map +1 -0
- package/lib/features/webbuilder/web/assets/assetsApi.js +174 -0
- package/lib/features/webbuilder/web/assets/assetsApi.js.map +1 -0
- package/lib/features/webbuilder/web/assets/assetsApi.ts +173 -0
- package/lib/features/webbuilder/web/assets/myAssets.js +341 -0
- package/lib/features/webbuilder/web/assets/myAssets.js.map +1 -0
- package/lib/features/webbuilder/web/assets/myAssets.ts +396 -0
- package/lib/features/webbuilder/web/canvas/elementName.js +46 -0
- package/lib/features/webbuilder/web/canvas/elementName.js.map +1 -0
- package/lib/features/webbuilder/web/canvas/visualEditorBridge.js +95 -0
- package/lib/features/webbuilder/web/canvas/visualEditorBridge.js.map +1 -0
- package/lib/features/webbuilder/web/chat/agentTurn.js +24 -0
- package/lib/features/webbuilder/web/chat/agentTurn.js.map +1 -0
- package/lib/features/webbuilder/web/chat/planMode.js +164 -0
- package/lib/features/webbuilder/web/chat/planMode.js.map +1 -0
- package/lib/features/webbuilder/web/chat/realPlans.js +66 -0
- package/lib/features/webbuilder/web/chat/realPlans.js.map +1 -0
- package/lib/features/webbuilder/web/comments/comments.js +336 -0
- package/lib/features/webbuilder/web/comments/comments.js.map +1 -0
- package/lib/features/webbuilder/web/comments/commentsApi.js +59 -0
- package/lib/features/webbuilder/web/comments/commentsApi.js.map +1 -0
- package/lib/features/webbuilder/web/components/planView.js +21 -0
- package/lib/features/webbuilder/web/components/planView.js.map +1 -0
- package/lib/features/webbuilder/web/console/consolePanel.js +43 -0
- package/lib/features/webbuilder/web/console/consolePanel.js.map +1 -0
- package/lib/features/webbuilder/web/console/previewConsole.js +256 -0
- package/lib/features/webbuilder/web/console/previewConsole.js.map +1 -0
- package/lib/features/webbuilder/web/console/usePreviewConsole.js +147 -0
- package/lib/features/webbuilder/web/console/usePreviewConsole.js.map +1 -0
- package/lib/features/webbuilder/web/design/directions.js +419 -1
- package/lib/features/webbuilder/web/design/directions.js.map +1 -1
- package/lib/features/webbuilder/web/history/diffActions.js +222 -0
- package/lib/features/webbuilder/web/history/diffActions.js.map +1 -0
- package/lib/features/webbuilder/web/history/diffHighlight.js +18 -0
- package/lib/features/webbuilder/web/history/diffHighlight.js.map +1 -0
- package/lib/features/webbuilder/web/history/versionActions.js +272 -0
- package/lib/features/webbuilder/web/history/versionActions.js.map +1 -0
- package/lib/features/webbuilder/web/history/versionDiff.js +338 -0
- package/lib/features/webbuilder/web/history/versionDiff.js.map +1 -0
- package/lib/features/webbuilder/web/history/versionPreview.js +83 -0
- package/lib/features/webbuilder/web/history/versionPreview.js.map +1 -0
- package/lib/features/webbuilder/web/history/versionPreviewMachine.js +150 -0
- package/lib/features/webbuilder/web/history/versionPreviewMachine.js.map +1 -0
- package/lib/features/webbuilder/web/history/versions.js +326 -1
- package/lib/features/webbuilder/web/history/versions.js.map +1 -1
- package/lib/features/webbuilder/web/hosted/hostedTurn.js +36 -0
- package/lib/features/webbuilder/web/hosted/hostedTurn.js.map +1 -0
- package/lib/features/webbuilder/web/studio/brandKit.js +25 -0
- package/lib/features/webbuilder/web/studio/brandKit.js.map +1 -0
- package/lib/features/webbuilder/web/utils/promptSafe.js +15 -0
- package/lib/features/webbuilder/web/utils/promptSafe.js.map +1 -0
- package/lib/features/webbuilder/web/webServices.js +3 -1
- package/lib/features/webbuilder/web/webServices.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/routes.json +55 -0
- package/lib/screens/Account/index.js +13 -5
- package/lib/screens/Account/index.js.map +1 -1
- package/lib/screens/Chat/index.js +16 -0
- package/lib/screens/Chat/index.js.map +1 -1
- package/lib/screens/Home/HomeScreen.js +202 -39
- package/lib/screens/Home/HomeScreen.js.map +1 -1
- package/lib/screens/Home/components/HomeHero.js +52 -38
- package/lib/screens/Home/components/HomeHero.js.map +1 -1
- package/lib/screens/Home/components/homeCatalog.js +8 -1
- package/lib/screens/Home/components/homeCatalog.js.map +1 -1
- package/lib/screens/TeamChat/index.js +41 -0
- package/lib/screens/TeamChat/index.js.map +1 -0
- package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js +9 -2
- package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js.map +1 -1
- package/lib/screens/WebBuilderNative/index.js +13 -3
- package/lib/screens/WebBuilderNative/index.js.map +1 -1
- package/lib/screens/WebBuilderNative/useConnectorTemplates.js +2 -2
- package/lib/screens/WebBuilderNative/useConnectorTemplates.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useEffect,useMemo}from'react';import {Text,StyleSheet,View,Pressable,TextInput}from'react-native';import {Ionicons}from'@expo/vector-icons';import {api}from'../api/ops.js';import {useApp,usePalette,useChat}from'../app.js';import {timeOf,nameOf}from'../utils/format.js';import {Avatar}from'./Avatar.js';import {EmojiPicker}from'./EmojiPicker.js';import {Sheet,Field,ChannelGlyph,Input,Toggle,Button,IconButton,SectionLabel,MenuRow}from'./ui.js';const MAX_NAME = 80;
|
|
2
|
+
const MAX_PURPOSE = 250;
|
|
3
|
+
const MAX_STATUS = 100;
|
|
4
|
+
function normalizeChannelName(raw) {
|
|
5
|
+
return raw.trim().toLowerCase().replace(/^#+/, "").replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "").replace(/-{2,}/g, "-").slice(0, MAX_NAME);
|
|
6
|
+
}
|
|
7
|
+
function personRank(user, query) {
|
|
8
|
+
const q = query.trim().toLowerCase().replace(/^@/, "");
|
|
9
|
+
if (!q) return 0;
|
|
10
|
+
const name = nameOf(user).toLowerCase();
|
|
11
|
+
const real = user.realName.toLowerCase();
|
|
12
|
+
const email = user.email.toLowerCase();
|
|
13
|
+
if (name.startsWith(q) || real.startsWith(q)) return 0;
|
|
14
|
+
const word = (s) => s.split(/[\s._-]+/).some((w) => w.startsWith(q));
|
|
15
|
+
if (word(name) || word(real) || email.startsWith(q)) return 1;
|
|
16
|
+
if (name.includes(q) || real.includes(q) || email.includes(q)) return 2;
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
function whenLabel(iso) {
|
|
20
|
+
const d = new Date(iso);
|
|
21
|
+
if (d.toDateString() === (/* @__PURE__ */ new Date()).toDateString()) return timeOf(iso);
|
|
22
|
+
return `${d.toLocaleDateString([], {
|
|
23
|
+
weekday: "short",
|
|
24
|
+
month: "short",
|
|
25
|
+
day: "numeric"
|
|
26
|
+
})} at ${timeOf(iso)}`;
|
|
27
|
+
}
|
|
28
|
+
function PersonOption({
|
|
29
|
+
user,
|
|
30
|
+
onPress,
|
|
31
|
+
trailing
|
|
32
|
+
}) {
|
|
33
|
+
const p = usePalette();
|
|
34
|
+
return /* @__PURE__ */ jsxs(Pressable, { onPress, accessibilityRole: "button", style: ({
|
|
35
|
+
pressed
|
|
36
|
+
}) => [styles.personRow, pressed && {
|
|
37
|
+
backgroundColor: p.muted
|
|
38
|
+
}], children: [
|
|
39
|
+
/* @__PURE__ */ jsx(Avatar, { user, size: "md", presence: true }),
|
|
40
|
+
/* @__PURE__ */ jsxs(View, { style: styles.personText, children: [
|
|
41
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles.personName, {
|
|
42
|
+
color: p.foreground
|
|
43
|
+
}], numberOfLines: 1, children: [
|
|
44
|
+
nameOf(user),
|
|
45
|
+
user.statusEmoji ? ` ${user.statusEmoji}` : "",
|
|
46
|
+
user.isSelf ? /* @__PURE__ */ jsx(Text, { style: {
|
|
47
|
+
color: p.mutedForeground,
|
|
48
|
+
fontWeight: "400"
|
|
49
|
+
}, children: " (you)" }) : null
|
|
50
|
+
] }),
|
|
51
|
+
user.realName && user.realName !== nameOf(user) ? /* @__PURE__ */ jsx(Text, { style: [styles.personSub, {
|
|
52
|
+
color: p.mutedForeground
|
|
53
|
+
}], numberOfLines: 1, children: user.realName }) : null
|
|
54
|
+
] }),
|
|
55
|
+
trailing
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
function PersonChip({
|
|
59
|
+
user,
|
|
60
|
+
onRemove
|
|
61
|
+
}) {
|
|
62
|
+
const p = usePalette();
|
|
63
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles.chip, {
|
|
64
|
+
backgroundColor: p.accent
|
|
65
|
+
}], children: [
|
|
66
|
+
/* @__PURE__ */ jsx(Avatar, { user, size: "xs" }),
|
|
67
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.chipText, {
|
|
68
|
+
color: p.accentForeground
|
|
69
|
+
}], numberOfLines: 1, children: nameOf(user) }),
|
|
70
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: onRemove, accessibilityLabel: `Remove ${nameOf(user)}`, hitSlop: 8, children: /* @__PURE__ */ jsx(Ionicons, { name: "close", size: 14, color: p.accentForeground }) })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
function PeoplePicker({
|
|
74
|
+
label,
|
|
75
|
+
selected,
|
|
76
|
+
onChange,
|
|
77
|
+
exclude,
|
|
78
|
+
placeholder = "Search by name or email",
|
|
79
|
+
autoFocus
|
|
80
|
+
}) {
|
|
81
|
+
const p = usePalette();
|
|
82
|
+
const people = useChat((s) => s.people);
|
|
83
|
+
const [query, setQuery] = useState("");
|
|
84
|
+
const q = query.trim();
|
|
85
|
+
const options = useMemo(() => {
|
|
86
|
+
if (!q) return [];
|
|
87
|
+
return Object.values(people).map((u) => ({
|
|
88
|
+
u,
|
|
89
|
+
rank: u.active && !selected.includes(u.id) && !(exclude == null ? void 0 : exclude.has(u.id)) ? personRank(u, q) : null
|
|
90
|
+
})).filter((x) => x.rank != null).sort((a, b) => a.rank - b.rank || nameOf(a.u).localeCompare(nameOf(b.u))).slice(0, 8).map((x) => x.u);
|
|
91
|
+
}, [people, q, selected, exclude]);
|
|
92
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.picker, children: [
|
|
93
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.label, {
|
|
94
|
+
color: p.foreground
|
|
95
|
+
}], children: label }),
|
|
96
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.pickerBox, {
|
|
97
|
+
borderColor: p.input,
|
|
98
|
+
backgroundColor: p.background
|
|
99
|
+
}], children: [
|
|
100
|
+
selected.map((uid) => /* @__PURE__ */ jsx(PersonChip, { user: people[uid], onRemove: () => onChange(selected.filter((x) => x !== uid)) }, uid)),
|
|
101
|
+
/* @__PURE__ */ jsx(TextInput, { value: query, onChangeText: setQuery, autoFocus, autoCapitalize: "none", autoCorrect: false, placeholder: selected.length ? "" : placeholder, placeholderTextColor: p.mutedForeground, onKeyPress: (e) => {
|
|
102
|
+
if (e.nativeEvent.key === "Backspace" && !query && selected.length) onChange(selected.slice(0, -1));
|
|
103
|
+
}, onSubmitEditing: () => {
|
|
104
|
+
if (options[0]) {
|
|
105
|
+
onChange([...selected, options[0].id]);
|
|
106
|
+
setQuery("");
|
|
107
|
+
}
|
|
108
|
+
}, style: [styles.pickerInput, {
|
|
109
|
+
color: p.foreground
|
|
110
|
+
}], accessibilityLabel: label })
|
|
111
|
+
] }),
|
|
112
|
+
options.length ? /* @__PURE__ */ jsx(View, { style: [styles.options, {
|
|
113
|
+
borderColor: p.border
|
|
114
|
+
}], children: options.map((u) => /* @__PURE__ */ jsx(PersonOption, { user: u, onPress: () => {
|
|
115
|
+
onChange([...selected, u.id]);
|
|
116
|
+
setQuery("");
|
|
117
|
+
} }, u.id)) }) : q ? /* @__PURE__ */ jsxs(Text, { style: [styles.hint, {
|
|
118
|
+
color: p.mutedForeground
|
|
119
|
+
}], children: [
|
|
120
|
+
"No one else matches \u201C",
|
|
121
|
+
q,
|
|
122
|
+
"\u201D."
|
|
123
|
+
] }) : null
|
|
124
|
+
] });
|
|
125
|
+
}
|
|
126
|
+
function CreateChannelSheet({
|
|
127
|
+
open,
|
|
128
|
+
onClose
|
|
129
|
+
}) {
|
|
130
|
+
const app = useApp();
|
|
131
|
+
const p = usePalette();
|
|
132
|
+
const {
|
|
133
|
+
actions
|
|
134
|
+
} = app.store;
|
|
135
|
+
const meId = useChat((s) => {
|
|
136
|
+
var _a;
|
|
137
|
+
return (_a = s.me) == null ? void 0 : _a.user.id;
|
|
138
|
+
});
|
|
139
|
+
const [name, setName] = useState("");
|
|
140
|
+
const [purpose, setPurpose] = useState("");
|
|
141
|
+
const [isPrivate, setPrivate] = useState(false);
|
|
142
|
+
const [memberIds, setMemberIds] = useState([]);
|
|
143
|
+
const [error, setError] = useState(null);
|
|
144
|
+
const [saving, setSaving] = useState(false);
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (!open) return;
|
|
147
|
+
setName("");
|
|
148
|
+
setPurpose("");
|
|
149
|
+
setPrivate(false);
|
|
150
|
+
setMemberIds([]);
|
|
151
|
+
setError(null);
|
|
152
|
+
setSaving(false);
|
|
153
|
+
}, [open]);
|
|
154
|
+
const normalized = normalizeChannelName(name);
|
|
155
|
+
const exclude = useMemo(() => new Set(meId ? [meId] : []), [meId]);
|
|
156
|
+
const create = async () => {
|
|
157
|
+
if (!normalized || saving) return;
|
|
158
|
+
setSaving(true);
|
|
159
|
+
setError(null);
|
|
160
|
+
try {
|
|
161
|
+
const c = await api.createChannel(normalized, isPrivate, purpose.trim(), memberIds);
|
|
162
|
+
actions.putChannel(c);
|
|
163
|
+
await actions.refreshSidebar();
|
|
164
|
+
onClose();
|
|
165
|
+
app.openChannel(c.id);
|
|
166
|
+
} catch (err) {
|
|
167
|
+
setError(err.message);
|
|
168
|
+
setSaving(false);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const hint = name.trim() && !normalized ? "Use at least one letter or number." : normalized && normalized !== name.trim() ? `It will be created as #${normalized}.` : "Lowercase letters, numbers, hyphens and underscores.";
|
|
172
|
+
return /* @__PURE__ */ jsxs(Sheet, { visible: open, onClose, title: "Create a channel", tall: true, footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
173
|
+
/* @__PURE__ */ jsx(Button, { label: "Cancel", onPress: onClose }),
|
|
174
|
+
/* @__PURE__ */ jsx(Button, { label: "Create", variant: "primary", loading: saving, disabled: !normalized, onPress: () => void create() })
|
|
175
|
+
] }), children: [
|
|
176
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.lead, {
|
|
177
|
+
color: p.mutedForeground
|
|
178
|
+
}], children: "Channels are where conversations happen around a topic. Use a name that is easy to find and understand." }),
|
|
179
|
+
/* @__PURE__ */ jsx(Field, { label: "Name", error, hint, children: /* @__PURE__ */ jsxs(View, { style: styles.nameRow, children: [
|
|
180
|
+
/* @__PURE__ */ jsx(View, { style: styles.nameIcon, children: /* @__PURE__ */ jsx(ChannelGlyph, { kind: isPrivate ? "private" : "public" }) }),
|
|
181
|
+
/* @__PURE__ */ jsx(Input, { value: name, onChangeText: (t) => {
|
|
182
|
+
setName(t);
|
|
183
|
+
setError(null);
|
|
184
|
+
}, maxLength: MAX_NAME + 20, autoCapitalize: "none", autoCorrect: false, placeholder: "e.g. plan-budget", invalid: Boolean(error), style: styles.nameInput, accessibilityLabel: "Channel name" }),
|
|
185
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.counter, {
|
|
186
|
+
color: p.mutedForeground
|
|
187
|
+
}], children: MAX_NAME - normalized.length })
|
|
188
|
+
] }) }),
|
|
189
|
+
/* @__PURE__ */ jsx(Field, { label: "Description (optional)", hint: "What is this channel about?", children: /* @__PURE__ */ jsx(Input, { value: purpose, onChangeText: setPurpose, maxLength: MAX_PURPOSE, multiline: true, style: styles.multiline, accessibilityLabel: "Description" }) }),
|
|
190
|
+
/* @__PURE__ */ jsx(Toggle, { value: isPrivate, onChange: setPrivate, label: "Make private", description: isPrivate ? "Only people you invite can find, read and join this channel. This can\u2019t be changed later." : "Anyone in the workspace can find, read and join it. Private channels are invite only, and that can\u2019t be changed later." }),
|
|
191
|
+
/* @__PURE__ */ jsx(View, { style: styles.gap }),
|
|
192
|
+
/* @__PURE__ */ jsx(PeoplePicker, { label: "Add people (optional)", selected: memberIds, onChange: setMemberIds, exclude })
|
|
193
|
+
] });
|
|
194
|
+
}
|
|
195
|
+
const PRESETS = [{
|
|
196
|
+
emoji: "\u{1F4C5}",
|
|
197
|
+
text: "In a meeting",
|
|
198
|
+
clear: "1h"
|
|
199
|
+
}, {
|
|
200
|
+
emoji: "\u{1F68C}",
|
|
201
|
+
text: "Commuting",
|
|
202
|
+
clear: "30m"
|
|
203
|
+
}, {
|
|
204
|
+
emoji: "\u{1F912}",
|
|
205
|
+
text: "Out sick",
|
|
206
|
+
clear: "today"
|
|
207
|
+
}, {
|
|
208
|
+
emoji: "\u{1F334}",
|
|
209
|
+
text: "Vacationing",
|
|
210
|
+
clear: "never"
|
|
211
|
+
}, {
|
|
212
|
+
emoji: "\u{1F3E1}",
|
|
213
|
+
text: "Working remotely",
|
|
214
|
+
clear: "today"
|
|
215
|
+
}];
|
|
216
|
+
const CLEAR_AFTER = [{
|
|
217
|
+
id: "never",
|
|
218
|
+
label: "Don\u2019t clear"
|
|
219
|
+
}, {
|
|
220
|
+
id: "30m",
|
|
221
|
+
label: "30 minutes"
|
|
222
|
+
}, {
|
|
223
|
+
id: "1h",
|
|
224
|
+
label: "1 hour"
|
|
225
|
+
}, {
|
|
226
|
+
id: "4h",
|
|
227
|
+
label: "4 hours"
|
|
228
|
+
}, {
|
|
229
|
+
id: "today",
|
|
230
|
+
label: "Today"
|
|
231
|
+
}, {
|
|
232
|
+
id: "week",
|
|
233
|
+
label: "This week"
|
|
234
|
+
}];
|
|
235
|
+
function expiryFor(clear, current) {
|
|
236
|
+
const now = /* @__PURE__ */ new Date();
|
|
237
|
+
switch (clear) {
|
|
238
|
+
case "keep":
|
|
239
|
+
return current && new Date(current).getTime() > now.getTime() ? current : null;
|
|
240
|
+
case "never":
|
|
241
|
+
return null;
|
|
242
|
+
case "30m":
|
|
243
|
+
return new Date(now.getTime() + 30 * 6e4).toISOString();
|
|
244
|
+
case "1h":
|
|
245
|
+
return new Date(now.getTime() + 36e5).toISOString();
|
|
246
|
+
case "4h":
|
|
247
|
+
return new Date(now.getTime() + 4 * 36e5).toISOString();
|
|
248
|
+
case "today":
|
|
249
|
+
now.setHours(23, 59, 59, 999);
|
|
250
|
+
return now.toISOString();
|
|
251
|
+
case "week": {
|
|
252
|
+
now.setDate(now.getDate() + (7 - now.getDay()) % 7);
|
|
253
|
+
now.setHours(23, 59, 59, 999);
|
|
254
|
+
return now.toISOString();
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
function StatusSheet({
|
|
259
|
+
open,
|
|
260
|
+
onClose
|
|
261
|
+
}) {
|
|
262
|
+
const app = useApp();
|
|
263
|
+
const p = usePalette();
|
|
264
|
+
const {
|
|
265
|
+
actions
|
|
266
|
+
} = app.store;
|
|
267
|
+
const user = useChat((s) => {
|
|
268
|
+
var _a;
|
|
269
|
+
return s.me ? (_a = s.people[s.me.user.id]) != null ? _a : s.me.user : null;
|
|
270
|
+
});
|
|
271
|
+
const [emoji, setEmoji] = useState(null);
|
|
272
|
+
const [text, setText] = useState("");
|
|
273
|
+
const [clear, setClear] = useState("never");
|
|
274
|
+
const [pickerOpen, setPickerOpen] = useState(false);
|
|
275
|
+
const [saving, setSaving] = useState(null);
|
|
276
|
+
const [error, setError] = useState(null);
|
|
277
|
+
const currentExpiry = (user == null ? void 0 : user.statusExpiresAt) && new Date(user.statusExpiresAt).getTime() > Date.now() ? user.statusExpiresAt : null;
|
|
278
|
+
const hasStatus = Boolean((user == null ? void 0 : user.statusEmoji) || (user == null ? void 0 : user.statusText));
|
|
279
|
+
useEffect(() => {
|
|
280
|
+
var _a, _b;
|
|
281
|
+
if (!open) return;
|
|
282
|
+
setEmoji((_a = user == null ? void 0 : user.statusEmoji) != null ? _a : null);
|
|
283
|
+
setText((_b = user == null ? void 0 : user.statusText) != null ? _b : "");
|
|
284
|
+
setClear(currentExpiry ? "keep" : "never");
|
|
285
|
+
setPickerOpen(false);
|
|
286
|
+
setSaving(null);
|
|
287
|
+
setError(null);
|
|
288
|
+
}, [open]);
|
|
289
|
+
const trimmed = text.trim();
|
|
290
|
+
const canSave = Boolean(emoji || trimmed) && !saving;
|
|
291
|
+
const expiry = expiryFor(clear, currentExpiry);
|
|
292
|
+
const save = async () => {
|
|
293
|
+
if (!canSave) return;
|
|
294
|
+
setSaving("save");
|
|
295
|
+
setError(null);
|
|
296
|
+
try {
|
|
297
|
+
actions.putUser(await api.setStatus(emoji, trimmed || null, expiry));
|
|
298
|
+
app.toast("Your status is set.");
|
|
299
|
+
onClose();
|
|
300
|
+
} catch (err) {
|
|
301
|
+
setError(err.message);
|
|
302
|
+
setSaving(null);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
const clearStatus = async () => {
|
|
306
|
+
setSaving("clear");
|
|
307
|
+
setError(null);
|
|
308
|
+
try {
|
|
309
|
+
actions.putUser(await api.setStatus(null, null, null));
|
|
310
|
+
app.toast("Your status is cleared.");
|
|
311
|
+
onClose();
|
|
312
|
+
} catch (err) {
|
|
313
|
+
setError(err.message);
|
|
314
|
+
setSaving(null);
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
return /* @__PURE__ */ jsxs(Sheet, { visible: open, onClose, title: hasStatus ? "Edit your status" : "Set a status", tall: true, footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
318
|
+
hasStatus ? /* @__PURE__ */ jsx(Button, { label: "Clear status", variant: "ghost", loading: saving === "clear", disabled: Boolean(saving), onPress: () => void clearStatus(), style: styles.clearButton }) : null,
|
|
319
|
+
/* @__PURE__ */ jsx(Button, { label: "Cancel", onPress: onClose }),
|
|
320
|
+
/* @__PURE__ */ jsx(Button, { label: "Save", variant: "primary", loading: saving === "save", disabled: !canSave, onPress: () => void save() })
|
|
321
|
+
] }), children: [
|
|
322
|
+
/* @__PURE__ */ jsx(Field, { label: "Status", error, children: /* @__PURE__ */ jsxs(View, { style: styles.statusRow, children: [
|
|
323
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => setPickerOpen(true), accessibilityLabel: emoji ? `Change emoji (${emoji})` : "Choose an emoji", style: [styles.emojiButton, {
|
|
324
|
+
borderColor: p.input
|
|
325
|
+
}], children: emoji ? /* @__PURE__ */ jsx(Text, { style: styles.emoji, children: emoji }) : /* @__PURE__ */ jsx(Ionicons, { name: "happy-outline", size: 20, color: p.mutedForeground }) }),
|
|
326
|
+
/* @__PURE__ */ jsx(Input, { value: text, onChangeText: (t) => {
|
|
327
|
+
setText(t);
|
|
328
|
+
setError(null);
|
|
329
|
+
}, maxLength: MAX_STATUS, placeholder: "What\u2019s your status?", invalid: Boolean(error), style: styles.flex, accessibilityLabel: "Status" }),
|
|
330
|
+
emoji || text ? /* @__PURE__ */ jsx(IconButton, { icon: "close-circle", label: "Clear the status field", onPress: () => {
|
|
331
|
+
setEmoji(null);
|
|
332
|
+
setText("");
|
|
333
|
+
setClear("never");
|
|
334
|
+
} }) : null
|
|
335
|
+
] }) }),
|
|
336
|
+
!trimmed ? /* @__PURE__ */ jsxs(View, { style: styles.presets, children: [
|
|
337
|
+
/* @__PURE__ */ jsx(SectionLabel, { children: "Suggestions" }),
|
|
338
|
+
PRESETS.map((preset) => {
|
|
339
|
+
var _a;
|
|
340
|
+
return /* @__PURE__ */ jsxs(Pressable, { onPress: () => {
|
|
341
|
+
setEmoji(preset.emoji);
|
|
342
|
+
setText(preset.text);
|
|
343
|
+
setClear(preset.clear);
|
|
344
|
+
}, style: ({
|
|
345
|
+
pressed
|
|
346
|
+
}) => [styles.preset, pressed && {
|
|
347
|
+
backgroundColor: p.muted
|
|
348
|
+
}], children: [
|
|
349
|
+
/* @__PURE__ */ jsx(Text, { style: styles.emoji, children: preset.emoji }),
|
|
350
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.presetText, {
|
|
351
|
+
color: p.foreground
|
|
352
|
+
}], children: preset.text }),
|
|
353
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.presetHint, {
|
|
354
|
+
color: p.mutedForeground
|
|
355
|
+
}], children: (_a = CLEAR_AFTER.find((c) => c.id === preset.clear)) == null ? void 0 : _a.label })
|
|
356
|
+
] }, preset.text);
|
|
357
|
+
})
|
|
358
|
+
] }) : null,
|
|
359
|
+
/* @__PURE__ */ jsx(Field, { label: "Clear after", hint: expiry ? `Until ${whenLabel(expiry)}.` : "It stays until you change it.", children: /* @__PURE__ */ jsx(View, { style: styles.choices, children: [...currentExpiry ? [{
|
|
360
|
+
id: "keep",
|
|
361
|
+
label: `Until ${whenLabel(currentExpiry)}`
|
|
362
|
+
}] : [], ...CLEAR_AFTER].map((c) => {
|
|
363
|
+
const on = clear === c.id;
|
|
364
|
+
return /* @__PURE__ */ jsx(Pressable, { onPress: () => setClear(c.id), accessibilityRole: "radio", accessibilityState: {
|
|
365
|
+
checked: on
|
|
366
|
+
}, style: [styles.choice, {
|
|
367
|
+
borderColor: on ? p.primary : p.border,
|
|
368
|
+
backgroundColor: on ? p.accent : p.background
|
|
369
|
+
}], children: /* @__PURE__ */ jsx(Text, { style: [styles.choiceText, {
|
|
370
|
+
color: on ? p.accentForeground : p.foreground
|
|
371
|
+
}], children: c.label }) }, c.id);
|
|
372
|
+
}) }) }),
|
|
373
|
+
/* @__PURE__ */ jsx(EmojiPicker, { open: pickerOpen, onClose: () => setPickerOpen(false), onPick: setEmoji })
|
|
374
|
+
] });
|
|
375
|
+
}
|
|
376
|
+
function YouSheet({
|
|
377
|
+
open,
|
|
378
|
+
onClose
|
|
379
|
+
}) {
|
|
380
|
+
const app = useApp();
|
|
381
|
+
const p = usePalette();
|
|
382
|
+
const user = useChat((s) => {
|
|
383
|
+
var _a;
|
|
384
|
+
return s.me ? (_a = s.people[s.me.user.id]) != null ? _a : s.me.user : null;
|
|
385
|
+
});
|
|
386
|
+
if (!user) return null;
|
|
387
|
+
const fail = (e) => app.toast(e.message, "error");
|
|
388
|
+
const dnd = Boolean(user.dndUntil && new Date(user.dndUntil).getTime() > Date.now());
|
|
389
|
+
const pause = (hours) => {
|
|
390
|
+
onClose();
|
|
391
|
+
void api.setDnd(hours == null ? null : new Date(Date.now() + hours * 36e5).toISOString()).then((u) => app.store.actions.putUser(u), fail);
|
|
392
|
+
};
|
|
393
|
+
return /* @__PURE__ */ jsxs(Sheet, { visible: open, onClose, flush: true, children: [
|
|
394
|
+
/* @__PURE__ */ jsxs(View, { style: styles.youHead, children: [
|
|
395
|
+
/* @__PURE__ */ jsx(Avatar, { user, size: "md", presence: true, ring: p.popover }),
|
|
396
|
+
/* @__PURE__ */ jsxs(View, { style: styles.flex, children: [
|
|
397
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.personName, {
|
|
398
|
+
color: p.foreground
|
|
399
|
+
}], numberOfLines: 1, children: nameOf(user) }),
|
|
400
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.personSub, {
|
|
401
|
+
color: p.mutedForeground
|
|
402
|
+
}], children: user.presence === "active" ? "Active" : "Away" })
|
|
403
|
+
] })
|
|
404
|
+
] }),
|
|
405
|
+
/* @__PURE__ */ jsx(MenuRow, { icon: "happy-outline", label: user.statusText || user.statusEmoji ? "Edit status" : "Update your status", onPress: () => {
|
|
406
|
+
onClose();
|
|
407
|
+
app.openStatus();
|
|
408
|
+
} }),
|
|
409
|
+
/* @__PURE__ */ jsx(MenuRow, { icon: "remove-circle-outline", label: user.away ? "Set yourself as active" : "Set yourself as away", onPress: () => {
|
|
410
|
+
onClose();
|
|
411
|
+
void api.setAway(!user.away).then((u) => app.store.actions.putUser(u), fail);
|
|
412
|
+
} }),
|
|
413
|
+
/* @__PURE__ */ jsx(View, { style: [styles.rule, {
|
|
414
|
+
backgroundColor: p.border
|
|
415
|
+
}] }),
|
|
416
|
+
dnd ? /* @__PURE__ */ jsx(MenuRow, { icon: "notifications-outline", label: "Resume notifications", onPress: () => pause(null) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
417
|
+
/* @__PURE__ */ jsx(MenuRow, { icon: "notifications-off-outline", label: "Pause notifications for 30 minutes", onPress: () => pause(0.5) }),
|
|
418
|
+
/* @__PURE__ */ jsx(MenuRow, { icon: "notifications-off-outline", label: "Pause for 1 hour", onPress: () => pause(1) }),
|
|
419
|
+
/* @__PURE__ */ jsx(MenuRow, { icon: "notifications-off-outline", label: "Pause for 8 hours", onPress: () => pause(8) })
|
|
420
|
+
] }),
|
|
421
|
+
/* @__PURE__ */ jsx(View, { style: [styles.rule, {
|
|
422
|
+
backgroundColor: p.border
|
|
423
|
+
}] }),
|
|
424
|
+
/* @__PURE__ */ jsx(MenuRow, { iconNode: /* @__PURE__ */ jsx(Avatar, { user, size: "xs" }), label: "Profile", onPress: () => {
|
|
425
|
+
onClose();
|
|
426
|
+
app.openProfile(user.id);
|
|
427
|
+
} })
|
|
428
|
+
] });
|
|
429
|
+
}
|
|
430
|
+
const styles = StyleSheet.create({
|
|
431
|
+
flex: {
|
|
432
|
+
flex: 1
|
|
433
|
+
},
|
|
434
|
+
gap: {
|
|
435
|
+
height: 10
|
|
436
|
+
},
|
|
437
|
+
personRow: {
|
|
438
|
+
flexDirection: "row",
|
|
439
|
+
alignItems: "center",
|
|
440
|
+
gap: 12,
|
|
441
|
+
paddingVertical: 8,
|
|
442
|
+
paddingHorizontal: 12,
|
|
443
|
+
borderRadius: 10
|
|
444
|
+
},
|
|
445
|
+
personText: {
|
|
446
|
+
flex: 1,
|
|
447
|
+
minWidth: 0
|
|
448
|
+
},
|
|
449
|
+
personName: {
|
|
450
|
+
fontSize: 15,
|
|
451
|
+
fontWeight: "700"
|
|
452
|
+
},
|
|
453
|
+
personSub: {
|
|
454
|
+
fontSize: 13,
|
|
455
|
+
marginTop: 1
|
|
456
|
+
},
|
|
457
|
+
chip: {
|
|
458
|
+
flexDirection: "row",
|
|
459
|
+
alignItems: "center",
|
|
460
|
+
gap: 6,
|
|
461
|
+
borderRadius: 8,
|
|
462
|
+
paddingLeft: 3,
|
|
463
|
+
paddingRight: 8,
|
|
464
|
+
height: 28,
|
|
465
|
+
maxWidth: 200
|
|
466
|
+
},
|
|
467
|
+
chipText: {
|
|
468
|
+
fontSize: 13,
|
|
469
|
+
fontWeight: "600",
|
|
470
|
+
flexShrink: 1
|
|
471
|
+
},
|
|
472
|
+
picker: {
|
|
473
|
+
gap: 6
|
|
474
|
+
},
|
|
475
|
+
label: {
|
|
476
|
+
fontSize: 14,
|
|
477
|
+
fontWeight: "700"
|
|
478
|
+
},
|
|
479
|
+
pickerBox: {
|
|
480
|
+
flexDirection: "row",
|
|
481
|
+
flexWrap: "wrap",
|
|
482
|
+
alignItems: "center",
|
|
483
|
+
gap: 6,
|
|
484
|
+
borderWidth: 1,
|
|
485
|
+
borderRadius: 10,
|
|
486
|
+
padding: 6,
|
|
487
|
+
minHeight: 44
|
|
488
|
+
},
|
|
489
|
+
pickerInput: {
|
|
490
|
+
flexGrow: 1,
|
|
491
|
+
minWidth: 120,
|
|
492
|
+
fontSize: 15,
|
|
493
|
+
paddingVertical: 4,
|
|
494
|
+
paddingHorizontal: 4
|
|
495
|
+
},
|
|
496
|
+
options: {
|
|
497
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
498
|
+
borderRadius: 10,
|
|
499
|
+
paddingVertical: 4
|
|
500
|
+
},
|
|
501
|
+
hint: {
|
|
502
|
+
fontSize: 13,
|
|
503
|
+
paddingHorizontal: 2
|
|
504
|
+
},
|
|
505
|
+
lead: {
|
|
506
|
+
fontSize: 14,
|
|
507
|
+
lineHeight: 20,
|
|
508
|
+
marginBottom: 14
|
|
509
|
+
},
|
|
510
|
+
nameRow: {
|
|
511
|
+
flexDirection: "row",
|
|
512
|
+
alignItems: "center"
|
|
513
|
+
},
|
|
514
|
+
nameIcon: {
|
|
515
|
+
position: "absolute",
|
|
516
|
+
left: 12,
|
|
517
|
+
zIndex: 1
|
|
518
|
+
},
|
|
519
|
+
nameInput: {
|
|
520
|
+
flex: 1,
|
|
521
|
+
paddingLeft: 32,
|
|
522
|
+
paddingRight: 40
|
|
523
|
+
},
|
|
524
|
+
counter: {
|
|
525
|
+
position: "absolute",
|
|
526
|
+
right: 12,
|
|
527
|
+
fontSize: 12
|
|
528
|
+
},
|
|
529
|
+
multiline: {
|
|
530
|
+
minHeight: 70,
|
|
531
|
+
textAlignVertical: "top"
|
|
532
|
+
},
|
|
533
|
+
statusRow: {
|
|
534
|
+
flexDirection: "row",
|
|
535
|
+
alignItems: "center",
|
|
536
|
+
gap: 8
|
|
537
|
+
},
|
|
538
|
+
emojiButton: {
|
|
539
|
+
width: 44,
|
|
540
|
+
height: 44,
|
|
541
|
+
borderRadius: 10,
|
|
542
|
+
borderWidth: 1,
|
|
543
|
+
alignItems: "center",
|
|
544
|
+
justifyContent: "center"
|
|
545
|
+
},
|
|
546
|
+
emoji: {
|
|
547
|
+
fontSize: 22
|
|
548
|
+
},
|
|
549
|
+
presets: {
|
|
550
|
+
marginHorizontal: -18,
|
|
551
|
+
marginBottom: 6
|
|
552
|
+
},
|
|
553
|
+
preset: {
|
|
554
|
+
flexDirection: "row",
|
|
555
|
+
alignItems: "center",
|
|
556
|
+
gap: 12,
|
|
557
|
+
paddingHorizontal: 18,
|
|
558
|
+
height: 46
|
|
559
|
+
},
|
|
560
|
+
presetText: {
|
|
561
|
+
flex: 1,
|
|
562
|
+
fontSize: 15,
|
|
563
|
+
fontWeight: "500"
|
|
564
|
+
},
|
|
565
|
+
presetHint: {
|
|
566
|
+
fontSize: 13
|
|
567
|
+
},
|
|
568
|
+
choices: {
|
|
569
|
+
flexDirection: "row",
|
|
570
|
+
flexWrap: "wrap",
|
|
571
|
+
gap: 8
|
|
572
|
+
},
|
|
573
|
+
choice: {
|
|
574
|
+
borderWidth: 1,
|
|
575
|
+
borderRadius: 999,
|
|
576
|
+
paddingHorizontal: 12,
|
|
577
|
+
height: 34,
|
|
578
|
+
justifyContent: "center"
|
|
579
|
+
},
|
|
580
|
+
choiceText: {
|
|
581
|
+
fontSize: 13,
|
|
582
|
+
fontWeight: "600"
|
|
583
|
+
},
|
|
584
|
+
clearButton: {
|
|
585
|
+
marginRight: "auto"
|
|
586
|
+
},
|
|
587
|
+
youHead: {
|
|
588
|
+
flexDirection: "row",
|
|
589
|
+
alignItems: "center",
|
|
590
|
+
gap: 12,
|
|
591
|
+
paddingVertical: 8,
|
|
592
|
+
paddingHorizontal: 18
|
|
593
|
+
},
|
|
594
|
+
rule: {
|
|
595
|
+
height: StyleSheet.hairlineWidth,
|
|
596
|
+
marginVertical: 4
|
|
597
|
+
}
|
|
598
|
+
});export{CreateChannelSheet,PeoplePicker,PersonChip,PersonOption,StatusSheet,YouSheet,expiryFor,normalizeChannelName,personRank,whenLabel};//# sourceMappingURL=Dialogs.js.map
|