@adminide-stack/yantra-mobile 12.0.196-alpha.0 → 12.0.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/lib/components/CustomDrawer.js +17 -1
  2. package/lib/components/CustomDrawer.js.map +1 -1
  3. package/lib/compute.js +57 -1
  4. package/lib/compute.js.map +1 -1
  5. package/lib/config/env-config.js +11 -1
  6. package/lib/config/env-config.js.map +1 -1
  7. package/lib/features/agent-chat/NativeAgentChat.js +7 -0
  8. package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
  9. package/lib/features/canvas/extendVideo.js +5 -1
  10. package/lib/features/canvas/extendVideo.js.map +1 -1
  11. package/lib/features/canvas/workflow/StepSheet.js +18 -1
  12. package/lib/features/canvas/workflow/StepSheet.js.map +1 -1
  13. package/lib/features/canvas/workflow/workflowSteps.js +102 -31
  14. package/lib/features/canvas/workflow/workflowSteps.js.map +1 -1
  15. package/lib/features/chat/ComposerMicSend.js +35 -0
  16. package/lib/features/chat/ComposerMicSend.js.map +1 -0
  17. package/lib/features/chat/ComposerModeSwitch.js +64 -1
  18. package/lib/features/chat/ComposerModeSwitch.js.map +1 -1
  19. package/lib/features/chat/askUser.js +6 -1
  20. package/lib/features/chat/askUser.js.map +1 -1
  21. package/lib/features/connectors/ConnectorSheet.js +443 -0
  22. package/lib/features/connectors/ConnectorSheet.js.map +1 -0
  23. package/lib/features/connectors/ConnectorsPage.js +320 -0
  24. package/lib/features/connectors/ConnectorsPage.js.map +1 -0
  25. package/lib/features/connectors/connectConnector.js +278 -0
  26. package/lib/features/connectors/connectConnector.js.map +1 -0
  27. package/lib/features/connectors/connectorCatalog.js +222 -0
  28. package/lib/features/connectors/connectorCatalog.js.map +1 -0
  29. package/lib/features/connectors/useConnectorCatalog.js +153 -0
  30. package/lib/features/connectors/useConnectorCatalog.js.map +1 -0
  31. package/lib/features/home/needsYou/HomeNeedsYou.js +618 -0
  32. package/lib/features/home/needsYou/HomeNeedsYou.js.map +1 -0
  33. package/lib/features/home/needsYou/chatFollowUps.js +333 -0
  34. package/lib/features/home/needsYou/chatFollowUps.js.map +1 -0
  35. package/lib/features/home/needsYou/format.js +47 -0
  36. package/lib/features/home/needsYou/format.js.map +1 -0
  37. package/lib/features/home/needsYou/historyText.js +40 -0
  38. package/lib/features/home/needsYou/historyText.js.map +1 -0
  39. package/lib/features/home/needsYou/inboxHighlights.js +152 -0
  40. package/lib/features/home/needsYou/inboxHighlights.js.map +1 -0
  41. package/lib/features/home/needsYou/panelsSettings.js +71 -0
  42. package/lib/features/home/needsYou/panelsSettings.js.map +1 -0
  43. package/lib/features/home/needsYou/ported/commandConfirmProtocol.js +13 -0
  44. package/lib/features/home/needsYou/ported/commandConfirmProtocol.js.map +1 -0
  45. package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js +91 -0
  46. package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js.map +1 -0
  47. package/lib/features/home/needsYou/ported/resultCardModels.js +659 -0
  48. package/lib/features/home/needsYou/ported/resultCardModels.js.map +1 -0
  49. package/lib/features/home/needsYou/types.js +1 -0
  50. package/lib/features/home/needsYou/types.js.map +1 -0
  51. package/lib/features/home/needsYou/useChatFollowUps.js +149 -0
  52. package/lib/features/home/needsYou/useChatFollowUps.js.map +1 -0
  53. package/lib/features/home/needsYou/useHomeBriefing.js +68 -0
  54. package/lib/features/home/needsYou/useHomeBriefing.js.map +1 -0
  55. package/lib/features/home/needsYou/useInboxHighlights.js +173 -0
  56. package/lib/features/home/needsYou/useInboxHighlights.js.map +1 -0
  57. package/lib/features/home/needsYou/usePanelsSettings.js +105 -0
  58. package/lib/features/home/needsYou/usePanelsSettings.js.map +1 -0
  59. package/lib/features/shopping/DealCard.js +8 -1
  60. package/lib/features/shopping/DealCard.js.map +1 -1
  61. package/lib/features/shopping/DealRails.js +24 -7
  62. package/lib/features/shopping/DealRails.js.map +1 -1
  63. package/lib/features/shopping/DealsPanel.js +1 -1
  64. package/lib/features/shopping/DealsPanel.js.map +1 -1
  65. package/lib/features/shopping/HolidayDealsPanel.js +529 -0
  66. package/lib/features/shopping/HolidayDealsPanel.js.map +1 -0
  67. package/lib/features/shopping/HolidayDealsParts.js +954 -0
  68. package/lib/features/shopping/HolidayDealsParts.js.map +1 -0
  69. package/lib/features/shopping/HolidayOffers.js +351 -0
  70. package/lib/features/shopping/HolidayOffers.js.map +1 -0
  71. package/lib/features/shopping/ProductCard.js +80 -14
  72. package/lib/features/shopping/ProductCard.js.map +1 -1
  73. package/lib/features/shopping/ProductDetailSheet.js +22 -3
  74. package/lib/features/shopping/ProductDetailSheet.js.map +1 -1
  75. package/lib/features/shopping/SavedPanel.js +341 -5
  76. package/lib/features/shopping/SavedPanel.js.map +1 -1
  77. package/lib/features/shopping/SearchResults.js +8 -2
  78. package/lib/features/shopping/SearchResults.js.map +1 -1
  79. package/lib/features/shopping/ShoppingAgentChatPane.js +12 -0
  80. package/lib/features/shopping/ShoppingAgentChatPane.js.map +1 -1
  81. package/lib/features/shopping/ShoppingExperience.js +56 -19
  82. package/lib/features/shopping/ShoppingExperience.js.map +1 -1
  83. package/lib/features/shopping/TrendingSections.js +13 -4
  84. package/lib/features/shopping/TrendingSections.js.map +1 -1
  85. package/lib/features/shopping/WatchlistPanel.js +61 -5
  86. package/lib/features/shopping/WatchlistPanel.js.map +1 -1
  87. package/lib/features/shopping/catalog.js +41 -2
  88. package/lib/features/shopping/catalog.js.map +1 -1
  89. package/lib/features/shopping/chat/brainRouter.js +14 -0
  90. package/lib/features/shopping/chat/brainRouter.js.map +1 -1
  91. package/lib/features/shopping/chat/shoppingTurn.js +88 -16
  92. package/lib/features/shopping/chat/shoppingTurn.js.map +1 -1
  93. package/lib/features/shopping/hooks/useHolidayDeals.js +388 -0
  94. package/lib/features/shopping/hooks/useHolidayDeals.js.map +1 -0
  95. package/lib/features/shopping/hooks/useProductMedia.js +33 -6
  96. package/lib/features/shopping/hooks/useProductMedia.js.map +1 -1
  97. package/lib/features/shopping/hooks/useShoppingHistorySync.js +8 -4
  98. package/lib/features/shopping/hooks/useShoppingHistorySync.js.map +1 -1
  99. package/lib/features/shopping/hooks/useTrendingProducts.js +11 -3
  100. package/lib/features/shopping/hooks/useTrendingProducts.js.map +1 -1
  101. package/lib/features/shopping/savedProducts.js +76 -6
  102. package/lib/features/shopping/savedProducts.js.map +1 -1
  103. package/lib/features/shopping/services/aiRelevance.js +212 -0
  104. package/lib/features/shopping/services/aiRelevance.js.map +1 -0
  105. package/lib/features/shopping/services/blackFriday.js +301 -0
  106. package/lib/features/shopping/services/blackFriday.js.map +1 -0
  107. package/lib/features/shopping/services/blackFridayBrowserSites.js +137 -0
  108. package/lib/features/shopping/services/blackFridayBrowserSites.js.map +1 -0
  109. package/lib/features/shopping/services/catalogProductSearch.js +21 -3
  110. package/lib/features/shopping/services/catalogProductSearch.js.map +1 -1
  111. package/lib/features/shopping/services/holidayDeals.js +143 -0
  112. package/lib/features/shopping/services/holidayDeals.js.map +1 -0
  113. package/lib/features/shopping/services/mediaShape.js +7 -0
  114. package/lib/features/shopping/services/mediaShape.js.map +1 -0
  115. package/lib/features/shopping/services/modelStep.js +95 -0
  116. package/lib/features/shopping/services/modelStep.js.map +1 -0
  117. package/lib/features/shopping/services/modelWords.js +14 -0
  118. package/lib/features/shopping/services/modelWords.js.map +1 -0
  119. package/lib/features/shopping/services/productAvailability.js +5 -1
  120. package/lib/features/shopping/services/productAvailability.js.map +1 -1
  121. package/lib/features/shopping/services/productFilters.js +2 -2
  122. package/lib/features/shopping/services/productFilters.js.map +1 -1
  123. package/lib/features/shopping/services/productMedia.js +103 -18
  124. package/lib/features/shopping/services/productMedia.js.map +1 -1
  125. package/lib/features/shopping/services/retailerUrl.js +11 -8
  126. package/lib/features/shopping/services/retailerUrl.js.map +1 -1
  127. package/lib/features/shopping/services/salesDealsStore.js +3 -2
  128. package/lib/features/shopping/services/salesDealsStore.js.map +1 -1
  129. package/lib/features/shopping/services/savedReads.js +82 -0
  130. package/lib/features/shopping/services/savedReads.js.map +1 -0
  131. package/lib/features/shopping/services/searchCardFields.js +2 -0
  132. package/lib/features/shopping/services/searchCardFields.js.map +1 -1
  133. package/lib/features/shopping/services/searchRelevance.js +154 -24
  134. package/lib/features/shopping/services/searchRelevance.js.map +1 -1
  135. package/lib/features/shopping/services/secondHand.js +12 -0
  136. package/lib/features/shopping/services/secondHand.js.map +1 -0
  137. package/lib/features/shopping/services/shoppingProductSearch.js +82 -10
  138. package/lib/features/shopping/services/shoppingProductSearch.js.map +1 -1
  139. package/lib/features/shopping/services/shoppingSearchConnectorClient.js +14 -1
  140. package/lib/features/shopping/services/shoppingSearchConnectorClient.js.map +1 -1
  141. package/lib/features/shopping/services/shoppingSubgraph.js +2 -1
  142. package/lib/features/shopping/services/shoppingSubgraph.js.map +1 -1
  143. package/lib/features/shopping/services/storedGalleries.js +130 -0
  144. package/lib/features/shopping/services/storedGalleries.js.map +1 -0
  145. package/lib/features/shopping/services/usedSites.js +263 -0
  146. package/lib/features/shopping/services/usedSites.js.map +1 -0
  147. package/lib/features/shopping/services/verifyProducts.js +3 -3
  148. package/lib/features/shopping/services/verifyProducts.js.map +1 -1
  149. package/lib/features/shopping/services/watchDeal.js +61 -0
  150. package/lib/features/shopping/services/watchDeal.js.map +1 -0
  151. package/lib/features/shopping/shoppingRuntime.js +7 -2
  152. package/lib/features/shopping/shoppingRuntime.js.map +1 -1
  153. package/lib/features/shopping/state/accountCaches.js +20 -0
  154. package/lib/features/shopping/state/accountCaches.js.map +1 -0
  155. package/lib/features/shopping/state/holidayDealsRequest.js +22 -0
  156. package/lib/features/shopping/state/holidayDealsRequest.js.map +1 -0
  157. package/lib/features/shopping/tutorials/ShoppingTutorialDock.js +1 -1
  158. package/lib/features/shopping/tutorials/ShoppingTutorialDock.js.map +1 -1
  159. package/lib/features/shopping/tutorials/shoppingTutorials.js +2 -0
  160. package/lib/features/shopping/tutorials/shoppingTutorials.js.map +1 -1
  161. package/lib/features/shopping/useShoppingSearch.js +74 -18
  162. package/lib/features/shopping/useShoppingSearch.js.map +1 -1
  163. package/lib/features/team-chat/TeamChatExperience.js +474 -0
  164. package/lib/features/team-chat/TeamChatExperience.js.map +1 -0
  165. package/lib/features/team-chat/api/client.js +198 -0
  166. package/lib/features/team-chat/api/client.js.map +1 -0
  167. package/lib/features/team-chat/api/live.js +160 -0
  168. package/lib/features/team-chat/api/live.js.map +1 -0
  169. package/lib/features/team-chat/api/ops.js +241 -0
  170. package/lib/features/team-chat/api/ops.js.map +1 -0
  171. package/lib/features/team-chat/app.js +12 -0
  172. package/lib/features/team-chat/app.js.map +1 -0
  173. package/lib/features/team-chat/components/Avatar.js +107 -0
  174. package/lib/features/team-chat/components/Avatar.js.map +1 -0
  175. package/lib/features/team-chat/components/Composer.js +641 -0
  176. package/lib/features/team-chat/components/Composer.js.map +1 -0
  177. package/lib/features/team-chat/components/Dialogs.js +598 -0
  178. package/lib/features/team-chat/components/Dialogs.js.map +1 -0
  179. package/lib/features/team-chat/components/EmojiPicker.js +165 -0
  180. package/lib/features/team-chat/components/EmojiPicker.js.map +1 -0
  181. package/lib/features/team-chat/components/MessageItem.js +658 -0
  182. package/lib/features/team-chat/components/MessageItem.js.map +1 -0
  183. package/lib/features/team-chat/components/MessageList.js +248 -0
  184. package/lib/features/team-chat/components/MessageList.js.map +1 -0
  185. package/lib/features/team-chat/components/Mrkdwn.js +228 -0
  186. package/lib/features/team-chat/components/Mrkdwn.js.map +1 -0
  187. package/lib/features/team-chat/components/QuickSwitcher.js +215 -0
  188. package/lib/features/team-chat/components/QuickSwitcher.js.map +1 -0
  189. package/lib/features/team-chat/components/ui.js +662 -0
  190. package/lib/features/team-chat/components/ui.js.map +1 -0
  191. package/lib/features/team-chat/nativeTeamChatRegistry.js +15 -0
  192. package/lib/features/team-chat/nativeTeamChatRegistry.js.map +1 -0
  193. package/lib/features/team-chat/state/fetched.js +39 -0
  194. package/lib/features/team-chat/state/fetched.js.map +1 -0
  195. package/lib/features/team-chat/state/lists.js +230 -0
  196. package/lib/features/team-chat/state/lists.js.map +1 -0
  197. package/lib/features/team-chat/state/store.js +1108 -0
  198. package/lib/features/team-chat/state/store.js.map +1 -0
  199. package/lib/features/team-chat/state/useChannelDirectory.js +21 -0
  200. package/lib/features/team-chat/state/useChannelDirectory.js.map +1 -0
  201. package/lib/features/team-chat/theme.js +77 -0
  202. package/lib/features/team-chat/theme.js.map +1 -0
  203. package/lib/features/team-chat/utils/composeText.js +72 -0
  204. package/lib/features/team-chat/utils/composeText.js.map +1 -0
  205. package/lib/features/team-chat/utils/emoji.js +369 -0
  206. package/lib/features/team-chat/utils/emoji.js.map +1 -0
  207. package/lib/features/team-chat/utils/format.js +109 -0
  208. package/lib/features/team-chat/utils/format.js.map +1 -0
  209. package/lib/features/team-chat/utils/messageRows.js +24 -0
  210. package/lib/features/team-chat/utils/messageRows.js.map +1 -0
  211. package/lib/features/team-chat/utils/mrkdwn.js +222 -0
  212. package/lib/features/team-chat/utils/mrkdwn.js.map +1 -0
  213. package/lib/features/team-chat/utils/notify.js +47 -0
  214. package/lib/features/team-chat/utils/notify.js.map +1 -0
  215. package/lib/features/team-chat/utils/pickFiles.js +81 -0
  216. package/lib/features/team-chat/utils/pickFiles.js.map +1 -0
  217. package/lib/features/team-chat/views/ActivityView.js +235 -0
  218. package/lib/features/team-chat/views/ActivityView.js.map +1 -0
  219. package/lib/features/team-chat/views/BrowseView.js +179 -0
  220. package/lib/features/team-chat/views/BrowseView.js.map +1 -0
  221. package/lib/features/team-chat/views/ChannelView.js +475 -0
  222. package/lib/features/team-chat/views/ChannelView.js.map +1 -0
  223. package/lib/features/team-chat/views/DetailsPane.js +816 -0
  224. package/lib/features/team-chat/views/DetailsPane.js.map +1 -0
  225. package/lib/features/team-chat/views/DraftsView.js +212 -0
  226. package/lib/features/team-chat/views/DraftsView.js.map +1 -0
  227. package/lib/features/team-chat/views/FilesView.js +152 -0
  228. package/lib/features/team-chat/views/FilesView.js.map +1 -0
  229. package/lib/features/team-chat/views/NewMessageView.js +286 -0
  230. package/lib/features/team-chat/views/NewMessageView.js.map +1 -0
  231. package/lib/features/team-chat/views/PeopleView.js +118 -0
  232. package/lib/features/team-chat/views/PeopleView.js.map +1 -0
  233. package/lib/features/team-chat/views/ProfilePane.js +220 -0
  234. package/lib/features/team-chat/views/ProfilePane.js.map +1 -0
  235. package/lib/features/team-chat/views/SavedView.js +113 -0
  236. package/lib/features/team-chat/views/SavedView.js.map +1 -0
  237. package/lib/features/team-chat/views/SearchView.js +307 -0
  238. package/lib/features/team-chat/views/SearchView.js.map +1 -0
  239. package/lib/features/team-chat/views/Sidebar.js +368 -0
  240. package/lib/features/team-chat/views/Sidebar.js.map +1 -0
  241. package/lib/features/team-chat/views/ThreadPane.js +139 -0
  242. package/lib/features/team-chat/views/ThreadPane.js.map +1 -0
  243. package/lib/features/team-chat/views/ThreadsView.js +157 -0
  244. package/lib/features/team-chat/views/ThreadsView.js.map +1 -0
  245. package/lib/features/webbuilder/WebBuilderExperience.js +276 -42
  246. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  247. package/lib/features/webbuilder/buildFragments.js +10 -4
  248. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  249. package/lib/features/webbuilder/components/AssetChips.js +61 -0
  250. package/lib/features/webbuilder/components/AssetChips.js.map +1 -0
  251. package/lib/features/webbuilder/components/AssetSiteChooser.js +100 -0
  252. package/lib/features/webbuilder/components/AssetSiteChooser.js.map +1 -0
  253. package/lib/features/webbuilder/components/CommentsLayer.js +485 -0
  254. package/lib/features/webbuilder/components/CommentsLayer.js.map +1 -0
  255. package/lib/features/webbuilder/components/Composer.js +16 -2
  256. package/lib/features/webbuilder/components/Composer.js.map +1 -1
  257. package/lib/features/webbuilder/components/ComposerModeSwitch.js +71 -0
  258. package/lib/features/webbuilder/components/ComposerModeSwitch.js.map +1 -0
  259. package/lib/features/webbuilder/components/MyAssetsPicker.js +500 -0
  260. package/lib/features/webbuilder/components/MyAssetsPicker.js.map +1 -0
  261. package/lib/features/webbuilder/components/PlanDocument.js +165 -0
  262. package/lib/features/webbuilder/components/PlanDocument.js.map +1 -0
  263. package/lib/features/webbuilder/components/PlanDraftCard.js +205 -0
  264. package/lib/features/webbuilder/components/PlanDraftCard.js.map +1 -0
  265. package/lib/features/webbuilder/components/PlanView.js +788 -0
  266. package/lib/features/webbuilder/components/PlanView.js.map +1 -0
  267. package/lib/features/webbuilder/components/PreviewConsoleSheet.js +334 -0
  268. package/lib/features/webbuilder/components/PreviewConsoleSheet.js.map +1 -0
  269. package/lib/features/webbuilder/components/PreviewFrame.js +45 -3
  270. package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
  271. package/lib/features/webbuilder/components/PreviewScreen.js +94 -10
  272. package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
  273. package/lib/features/webbuilder/components/ProjectChat.js +84 -14
  274. package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
  275. package/lib/features/webbuilder/components/StudioHome.js +69 -6
  276. package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
  277. package/lib/features/webbuilder/components/StyleDirectionsSheet.js +291 -0
  278. package/lib/features/webbuilder/components/StyleDirectionsSheet.js.map +1 -0
  279. package/lib/features/webbuilder/components/VersionChangesView.js +574 -0
  280. package/lib/features/webbuilder/components/VersionChangesView.js.map +1 -0
  281. package/lib/features/webbuilder/components/VersionPreviewView.js +186 -0
  282. package/lib/features/webbuilder/components/VersionPreviewView.js.map +1 -0
  283. package/lib/features/webbuilder/components/VersionsSheet.js +673 -16
  284. package/lib/features/webbuilder/components/VersionsSheet.js.map +1 -1
  285. package/lib/features/webbuilder/connectorTemplates.js +6 -1
  286. package/lib/features/webbuilder/connectorTemplates.js.map +1 -1
  287. package/lib/features/webbuilder/myAssets.js +101 -0
  288. package/lib/features/webbuilder/myAssets.js.map +1 -0
  289. package/lib/features/webbuilder/planChat.js +146 -0
  290. package/lib/features/webbuilder/planChat.js.map +1 -0
  291. package/lib/features/webbuilder/planDocument.js +89 -0
  292. package/lib/features/webbuilder/planDocument.js.map +1 -0
  293. package/lib/features/webbuilder/planStore.js +55 -0
  294. package/lib/features/webbuilder/planStore.js.map +1 -0
  295. package/lib/features/webbuilder/previewCommentsScript.js +218 -0
  296. package/lib/features/webbuilder/previewCommentsScript.js.map +1 -0
  297. package/lib/features/webbuilder/previewConsoleScript.js +39 -0
  298. package/lib/features/webbuilder/previewConsoleScript.js.map +1 -0
  299. package/lib/features/webbuilder/styleDirections.js +85 -0
  300. package/lib/features/webbuilder/styleDirections.js.map +1 -0
  301. package/lib/features/webbuilder/useCanvasComments.js +335 -0
  302. package/lib/features/webbuilder/useCanvasComments.js.map +1 -0
  303. package/lib/features/webbuilder/useCatalogTemplates.js +37 -0
  304. package/lib/features/webbuilder/useCatalogTemplates.js.map +1 -0
  305. package/lib/features/webbuilder/usePlanMode.js +145 -0
  306. package/lib/features/webbuilder/usePlanMode.js.map +1 -0
  307. package/lib/features/webbuilder/useStyleDirections.js +112 -0
  308. package/lib/features/webbuilder/useStyleDirections.js.map +1 -0
  309. package/lib/features/webbuilder/web/assets/assetsApi.js +174 -0
  310. package/lib/features/webbuilder/web/assets/assetsApi.js.map +1 -0
  311. package/lib/features/webbuilder/web/assets/assetsApi.ts +173 -0
  312. package/lib/features/webbuilder/web/assets/myAssets.js +341 -0
  313. package/lib/features/webbuilder/web/assets/myAssets.js.map +1 -0
  314. package/lib/features/webbuilder/web/assets/myAssets.ts +396 -0
  315. package/lib/features/webbuilder/web/canvas/elementName.js +46 -0
  316. package/lib/features/webbuilder/web/canvas/elementName.js.map +1 -0
  317. package/lib/features/webbuilder/web/canvas/visualEditorBridge.js +95 -0
  318. package/lib/features/webbuilder/web/canvas/visualEditorBridge.js.map +1 -0
  319. package/lib/features/webbuilder/web/chat/agentTurn.js +24 -0
  320. package/lib/features/webbuilder/web/chat/agentTurn.js.map +1 -0
  321. package/lib/features/webbuilder/web/chat/planMode.js +164 -0
  322. package/lib/features/webbuilder/web/chat/planMode.js.map +1 -0
  323. package/lib/features/webbuilder/web/chat/realPlans.js +66 -0
  324. package/lib/features/webbuilder/web/chat/realPlans.js.map +1 -0
  325. package/lib/features/webbuilder/web/comments/comments.js +336 -0
  326. package/lib/features/webbuilder/web/comments/comments.js.map +1 -0
  327. package/lib/features/webbuilder/web/comments/commentsApi.js +59 -0
  328. package/lib/features/webbuilder/web/comments/commentsApi.js.map +1 -0
  329. package/lib/features/webbuilder/web/components/planView.js +21 -0
  330. package/lib/features/webbuilder/web/components/planView.js.map +1 -0
  331. package/lib/features/webbuilder/web/console/consolePanel.js +43 -0
  332. package/lib/features/webbuilder/web/console/consolePanel.js.map +1 -0
  333. package/lib/features/webbuilder/web/console/previewConsole.js +256 -0
  334. package/lib/features/webbuilder/web/console/previewConsole.js.map +1 -0
  335. package/lib/features/webbuilder/web/console/usePreviewConsole.js +147 -0
  336. package/lib/features/webbuilder/web/console/usePreviewConsole.js.map +1 -0
  337. package/lib/features/webbuilder/web/design/directions.js +419 -1
  338. package/lib/features/webbuilder/web/design/directions.js.map +1 -1
  339. package/lib/features/webbuilder/web/history/diffActions.js +222 -0
  340. package/lib/features/webbuilder/web/history/diffActions.js.map +1 -0
  341. package/lib/features/webbuilder/web/history/diffHighlight.js +18 -0
  342. package/lib/features/webbuilder/web/history/diffHighlight.js.map +1 -0
  343. package/lib/features/webbuilder/web/history/versionActions.js +272 -0
  344. package/lib/features/webbuilder/web/history/versionActions.js.map +1 -0
  345. package/lib/features/webbuilder/web/history/versionDiff.js +338 -0
  346. package/lib/features/webbuilder/web/history/versionDiff.js.map +1 -0
  347. package/lib/features/webbuilder/web/history/versionPreview.js +83 -0
  348. package/lib/features/webbuilder/web/history/versionPreview.js.map +1 -0
  349. package/lib/features/webbuilder/web/history/versionPreviewMachine.js +150 -0
  350. package/lib/features/webbuilder/web/history/versionPreviewMachine.js.map +1 -0
  351. package/lib/features/webbuilder/web/history/versions.js +326 -1
  352. package/lib/features/webbuilder/web/history/versions.js.map +1 -1
  353. package/lib/features/webbuilder/web/hosted/hostedTurn.js +36 -0
  354. package/lib/features/webbuilder/web/hosted/hostedTurn.js.map +1 -0
  355. package/lib/features/webbuilder/web/studio/brandKit.js +25 -0
  356. package/lib/features/webbuilder/web/studio/brandKit.js.map +1 -0
  357. package/lib/features/webbuilder/web/utils/promptSafe.js +15 -0
  358. package/lib/features/webbuilder/web/utils/promptSafe.js.map +1 -0
  359. package/lib/features/webbuilder/web/webServices.js +3 -1
  360. package/lib/features/webbuilder/web/webServices.js.map +1 -1
  361. package/lib/index.js +1 -1
  362. package/lib/index.js.map +1 -1
  363. package/lib/routes.json +55 -0
  364. package/lib/screens/Account/index.js +13 -5
  365. package/lib/screens/Account/index.js.map +1 -1
  366. package/lib/screens/Chat/index.js +16 -0
  367. package/lib/screens/Chat/index.js.map +1 -1
  368. package/lib/screens/Home/HomeScreen.js +202 -39
  369. package/lib/screens/Home/HomeScreen.js.map +1 -1
  370. package/lib/screens/Home/components/HomeHero.js +52 -38
  371. package/lib/screens/Home/components/HomeHero.js.map +1 -1
  372. package/lib/screens/Home/components/homeCatalog.js +8 -1
  373. package/lib/screens/Home/components/homeCatalog.js.map +1 -1
  374. package/lib/screens/TeamChat/index.js +41 -0
  375. package/lib/screens/TeamChat/index.js.map +1 -0
  376. package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js +9 -2
  377. package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js.map +1 -1
  378. package/lib/screens/WebBuilderNative/index.js +13 -3
  379. package/lib/screens/WebBuilderNative/index.js.map +1 -1
  380. package/lib/screens/WebBuilderNative/useConnectorTemplates.js +2 -2
  381. package/lib/screens/WebBuilderNative/useConnectorTemplates.js.map +1 -1
  382. package/package.json +4 -4
@@ -0,0 +1,658 @@
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {memo,useEffect,useState}from'react';import {ScrollView,StyleSheet,Pressable,Text,View,TextInput,Clipboard}from'react-native';import {Image}from'expo-image';import {Ionicons}from'@expo/vector-icons';import {useApp,usePalette,useChat}from'../app.js';import {nameOf,timeOf,fileSize,relative}from'../utils/format.js';import {QUICK_REACTIONS,emojiName}from'../utils/emoji.js';import {fromTokens,toTokens}from'../utils/composeText.js';import {Avatar}from'./Avatar.js';import {Mrkdwn,EditedMark}from'./Mrkdwn.js';import {Sheet,MenuRow,MenuDivider,Button}from'./ui.js';const MessageItem = memo(function MessageItem2({
2
+ message,
3
+ continued,
4
+ mode = "channel",
5
+ isThreadRoot,
6
+ highlight,
7
+ context,
8
+ canPost = true,
9
+ editing: editingProp,
10
+ onEditingChange,
11
+ onOpen
12
+ }) {
13
+ var _a;
14
+ const app = useApp();
15
+ const p = usePalette();
16
+ const {
17
+ actions
18
+ } = app.store;
19
+ const fresh = useChat((s) => s.latest[message.id]);
20
+ const m = message.pending || !fresh ? message : fresh;
21
+ useEffect(() => {
22
+ if (!message.pending) actions.remember([message]);
23
+ }, [message, actions]);
24
+ const author = useChat((s) => m.author ? s.people[m.author.id] : void 0);
25
+ const meId = useChat((s) => {
26
+ var _a2;
27
+ return (_a2 = s.me) == null ? void 0 : _a2.user.id;
28
+ });
29
+ const [editingLocal, setEditingLocal] = useState(false);
30
+ const editing = editingProp != null ? editingProp : editingLocal;
31
+ const setEditing = (v) => onEditingChange ? onEditingChange(v) : setEditingLocal(v);
32
+ const mine = ((_a = m.author) == null ? void 0 : _a.id) === meId;
33
+ const mentionsMe = Boolean(meId && (m.mentions.includes(meId) || m.mentionAll) && !mine) && mode !== "context";
34
+ if (m.kind === "system") return /* @__PURE__ */ jsx(SystemLine, { message: m, author });
35
+ const fail = (err) => app.toast(err.message || "That did not work.", "error");
36
+ const react = (emoji) => void actions.react(m, emoji).catch(fail);
37
+ const compact = continued && mode !== "context";
38
+ const openActions = () => {
39
+ if (m.pending || m.deleted || editing) return;
40
+ app.showMessageActions({
41
+ message: m,
42
+ canPost,
43
+ mode,
44
+ isThreadRoot,
45
+ onEdit: () => setEditing(true)
46
+ });
47
+ };
48
+ return /* @__PURE__ */ jsxs(Pressable, { onLongPress: openActions, onPress: onOpen, delayLongPress: 300, accessibilityHint: "Long press for actions", style: ({
49
+ pressed
50
+ }) => [styles.row, compact ? styles.rowCompact : styles.rowFull, mentionsMe && {
51
+ backgroundColor: p.mentionsMeBg,
52
+ borderLeftColor: p.mentionsMeBar,
53
+ borderLeftWidth: 3,
54
+ paddingLeft: 13
55
+ }, highlight && {
56
+ backgroundColor: p.highlightBg
57
+ }, pressed && !highlight && {
58
+ backgroundColor: p.muted
59
+ }, m.pending === "sending" && styles.sending], children: [
60
+ /* @__PURE__ */ jsx(View, { style: styles.gutter, children: compact ? null : /* @__PURE__ */ jsx(Pressable, { onPress: () => author && app.openProfile(author.id), accessibilityLabel: `Open ${nameOf(author)}`, style: styles.avatar, children: /* @__PURE__ */ jsx(Avatar, { user: author }) }) }),
61
+ /* @__PURE__ */ jsxs(View, { style: styles.main, children: [
62
+ context ? /* @__PURE__ */ jsx(View, { style: styles.context, children: context }) : null,
63
+ m.pinned && mode !== "context" ? /* @__PURE__ */ jsxs(View, { style: styles.flag, children: [
64
+ /* @__PURE__ */ jsx(Ionicons, { name: "pin", size: 11, color: p.mutedForeground }),
65
+ /* @__PURE__ */ jsx(Text, { style: [styles.flagText, {
66
+ color: p.mutedForeground
67
+ }], children: "Pinned" })
68
+ ] }) : null,
69
+ m.saved && !m.pinned && mode !== "context" ? /* @__PURE__ */ jsxs(View, { style: styles.flag, children: [
70
+ /* @__PURE__ */ jsx(Ionicons, { name: "bookmark", size: 11, color: p.savedFg }),
71
+ /* @__PURE__ */ jsx(Text, { style: [styles.flagText, {
72
+ color: p.savedFg,
73
+ fontWeight: "600"
74
+ }], children: "Saved for later" })
75
+ ] }) : null,
76
+ !compact ? /* @__PURE__ */ jsxs(View, { style: styles.nameRow, children: [
77
+ /* @__PURE__ */ jsx(Text, { onPress: () => author && app.openProfile(author.id), style: [styles.name, {
78
+ color: p.foreground
79
+ }], numberOfLines: 1, children: nameOf(author) }),
80
+ (author == null ? void 0 : author.statusEmoji) ? /* @__PURE__ */ jsx(Text, { style: styles.statusEmoji, children: author.statusEmoji }) : null,
81
+ /* @__PURE__ */ jsx(Text, { style: [styles.time, {
82
+ color: p.mutedForeground
83
+ }], children: timeOf(m.createdAt) })
84
+ ] }) : null,
85
+ m.threadRootId && m.alsoInChannel && mode === "channel" ? /* @__PURE__ */ jsxs(Text, { style: [styles.also, {
86
+ color: p.mutedForeground
87
+ }], children: [
88
+ "replied to a thread:",
89
+ " ",
90
+ /* @__PURE__ */ jsx(Text, { style: {
91
+ color: p.link,
92
+ fontWeight: "600"
93
+ }, onPress: () => app.openThread(m.threadRootId, m.channelId, m.seq), children: "View thread" })
94
+ ] }) : null,
95
+ m.deleted ? /* @__PURE__ */ jsx(Text, { style: [styles.deleted, {
96
+ color: p.mutedForeground
97
+ }], children: "This message was deleted." }) : editing ? /* @__PURE__ */ jsx(InlineEditor, { message: m, onDone: () => setEditing(false) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
98
+ m.body ? /* @__PURE__ */ jsx(Mrkdwn, { body: m.body, edited: Boolean(m.editedAt) }) : m.editedAt ? /* @__PURE__ */ jsx(EditedMark, {}) : null,
99
+ m.files.length ? /* @__PURE__ */ jsx(Attachments, { message: m }) : null
100
+ ] }),
101
+ m.pending === "failed" ? /* @__PURE__ */ jsxs(View, { style: styles.failed, accessibilityRole: "alert", children: [
102
+ /* @__PURE__ */ jsx(Text, { style: [styles.failedText, {
103
+ color: p.destructive
104
+ }], children: "Not sent." }),
105
+ /* @__PURE__ */ jsx(Text, { style: [styles.failedAction, {
106
+ color: p.destructive
107
+ }], onPress: () => void actions.retry(m), children: "Try again" }),
108
+ /* @__PURE__ */ jsx(Text, { style: {
109
+ color: p.destructive
110
+ }, children: "\xB7" }),
111
+ /* @__PURE__ */ jsx(Text, { style: [styles.failedAction, {
112
+ color: p.destructive
113
+ }], onPress: () => actions.discard(m), children: "Delete" })
114
+ ] }) : null,
115
+ m.reactions.length && !m.deleted ? /* @__PURE__ */ jsx(Reactions, { message: m, onToggle: react, canReact: canPost }) : null,
116
+ !isThreadRoot && mode !== "thread" && m.replyCount > 0 ? /* @__PURE__ */ jsx(ThreadSummary, { message: m }) : null
117
+ ] })
118
+ ] });
119
+ });
120
+ function Reactions({
121
+ message: m,
122
+ onToggle,
123
+ canReact
124
+ }) {
125
+ const app = useApp();
126
+ const p = usePalette();
127
+ const people = useChat((s) => s.people);
128
+ const meId = useChat((s) => {
129
+ var _a;
130
+ return (_a = s.me) == null ? void 0 : _a.user.id;
131
+ });
132
+ return /* @__PURE__ */ jsxs(View, { style: styles.reactions, children: [
133
+ m.reactions.map((r) => {
134
+ const names = r.userIds.map((id) => id === meId ? "You" : nameOf(people[id]));
135
+ const who = names.length > 3 ? `${names.slice(0, 3).join(", ")} and ${names.length - 3} other${names.length - 3 === 1 ? "" : "s"}` : names.join(" and ");
136
+ return /* @__PURE__ */ jsxs(Pressable, { disabled: !canReact, onPress: () => onToggle(r.emoji), onLongPress: () => app.toast(`${who} reacted with :${emojiName(r.emoji)}:`), accessibilityLabel: `${r.emoji} ${r.count}. ${who} reacted.`, accessibilityState: {
137
+ selected: r.reacted
138
+ }, style: [styles.reaction, r.reacted ? {
139
+ backgroundColor: p.accent,
140
+ borderColor: p.primary
141
+ } : {
142
+ backgroundColor: p.muted,
143
+ borderColor: "transparent"
144
+ }], children: [
145
+ /* @__PURE__ */ jsx(Text, { style: styles.reactionEmoji, children: r.emoji }),
146
+ /* @__PURE__ */ jsx(Text, { style: [styles.reactionCount, {
147
+ color: r.reacted ? p.accentForeground : p.foreground
148
+ }], children: r.count })
149
+ ] }, r.emoji);
150
+ }),
151
+ canReact ? /* @__PURE__ */ jsxs(Pressable, { onPress: () => app.showReactionPicker(m), accessibilityLabel: "Add reaction", style: [styles.reaction, {
152
+ backgroundColor: p.muted,
153
+ borderColor: "transparent"
154
+ }], children: [
155
+ /* @__PURE__ */ jsx(Ionicons, { name: "happy-outline", size: 15, color: p.mutedForeground }),
156
+ /* @__PURE__ */ jsx(Text, { style: [styles.reactionCount, {
157
+ color: p.mutedForeground
158
+ }], children: "+" })
159
+ ] }) : null
160
+ ] });
161
+ }
162
+ function ThreadSummary({
163
+ message: m
164
+ }) {
165
+ const app = useApp();
166
+ const p = usePalette();
167
+ const people = useChat((s) => s.people);
168
+ return /* @__PURE__ */ jsxs(Pressable, { onPress: () => app.openThread(m.id, m.channelId), style: ({
169
+ pressed
170
+ }) => [styles.summary, pressed && {
171
+ backgroundColor: p.muted
172
+ }], accessibilityRole: "button", children: [
173
+ /* @__PURE__ */ jsx(View, { style: styles.summaryFaces, children: m.replyUsers.slice(0, 5).map((u, i) => /* @__PURE__ */ jsx(Avatar, { user: people[u.id], size: "sm", style: i ? styles.overlap : void 0 }, u.id)) }),
174
+ /* @__PURE__ */ jsxs(Text, { style: [styles.summaryCount, {
175
+ color: p.link
176
+ }], children: [
177
+ m.replyCount,
178
+ " ",
179
+ m.replyCount === 1 ? "reply" : "replies"
180
+ ] }),
181
+ m.lastReplyAt ? /* @__PURE__ */ jsxs(Text, { style: [styles.summaryWhen, {
182
+ color: p.mutedForeground
183
+ }], children: [
184
+ "Last reply ",
185
+ relative(m.lastReplyAt)
186
+ ] }) : null
187
+ ] });
188
+ }
189
+ function Attachments({
190
+ message: m
191
+ }) {
192
+ const app = useApp();
193
+ const p = usePalette();
194
+ return /* @__PURE__ */ jsx(View, { style: styles.files, children: m.files.map((f) => f.contentType.startsWith("image/") && f.url ? /* @__PURE__ */ jsx(Pressable, { onPress: () => app.openUrl(f.url), accessibilityLabel: `Open ${f.name}`, style: [styles.image, {
195
+ borderColor: p.border
196
+ }], children: /* @__PURE__ */ jsx(Image, { source: {
197
+ uri: f.url
198
+ }, style: styles.imageInner, contentFit: "cover", cachePolicy: "memory-disk" }) }, f.id) : /* @__PURE__ */ jsxs(Pressable, { onPress: () => f.url ? app.openUrl(f.url) : void 0, accessibilityLabel: `Open ${f.name}`, style: ({
199
+ pressed
200
+ }) => [styles.file, {
201
+ borderColor: p.border,
202
+ backgroundColor: pressed ? p.muted : p.background
203
+ }], children: [
204
+ /* @__PURE__ */ jsx(View, { style: [styles.fileIcon, {
205
+ backgroundColor: p.accent
206
+ }], children: /* @__PURE__ */ jsx(Ionicons, { name: f.contentType.startsWith("image/") ? "image-outline" : "document-text-outline", size: 20, color: p.accentForeground }) }),
207
+ /* @__PURE__ */ jsxs(View, { style: styles.fileText, children: [
208
+ /* @__PURE__ */ jsx(Text, { style: [styles.fileName, {
209
+ color: p.foreground
210
+ }], numberOfLines: 1, children: f.name }),
211
+ /* @__PURE__ */ jsx(Text, { style: [styles.fileMeta, {
212
+ color: p.mutedForeground
213
+ }], children: f.url ? fileSize(f.size) : `${fileSize(f.size)} \xB7 uploading\u2026` })
214
+ ] }),
215
+ /* @__PURE__ */ jsx(Ionicons, { name: "download-outline", size: 17, color: p.mutedForeground })
216
+ ] }, f.id)) });
217
+ }
218
+ function InlineEditor({
219
+ message: m,
220
+ onDone
221
+ }) {
222
+ const app = useApp();
223
+ const p = usePalette();
224
+ const people = useChat((s) => s.people);
225
+ const channels = useChat((s) => s.channels);
226
+ const [{
227
+ text: initial,
228
+ picks
229
+ }] = useState(() => fromTokens(m.body, {
230
+ user: (id) => people[id] ? nameOf(people[id]) : null,
231
+ channel: (id) => {
232
+ var _a, _b;
233
+ return (_b = (_a = channels[id]) == null ? void 0 : _a.name) != null ? _b : null;
234
+ }
235
+ }));
236
+ const [text, setText] = useState(initial);
237
+ const [saving, setSaving] = useState(false);
238
+ const save = async () => {
239
+ const body = toTokens(text.trim(), picks);
240
+ if (!body && !m.files.length) return;
241
+ if (body === m.body) return onDone();
242
+ setSaving(true);
243
+ try {
244
+ await app.store.actions.edit(m, body);
245
+ onDone();
246
+ } catch (err) {
247
+ app.toast(err.message, "error");
248
+ setSaving(false);
249
+ }
250
+ };
251
+ return /* @__PURE__ */ jsxs(View, { style: [styles.editor, {
252
+ borderColor: p.input,
253
+ backgroundColor: p.background
254
+ }], children: [
255
+ /* @__PURE__ */ jsx(TextInput, { autoFocus: true, value: text, onChangeText: setText, multiline: true, accessibilityLabel: "Edit message", style: [styles.editorInput, {
256
+ color: p.foreground
257
+ }], placeholderTextColor: p.mutedForeground }),
258
+ /* @__PURE__ */ jsxs(View, { style: styles.editorActions, children: [
259
+ /* @__PURE__ */ jsx(Button, { size: "sm", label: "Cancel", onPress: onDone }),
260
+ /* @__PURE__ */ jsx(Button, { size: "sm", variant: "primary", label: "Save", loading: saving, disabled: !text.trim() && !m.files.length, onPress: () => void save() })
261
+ ] })
262
+ ] });
263
+ }
264
+ function SystemLine({
265
+ message: m,
266
+ author
267
+ }) {
268
+ const app = useApp();
269
+ const p = usePalette();
270
+ const people = useChat((s) => s.people);
271
+ const channel = useChat((s) => s.channels[m.channelId]);
272
+ const meId = useChat((s) => {
273
+ var _a;
274
+ return (_a = s.me) == null ? void 0 : _a.user.id;
275
+ });
276
+ const sys = m.system;
277
+ const who = (id) => id === meId ? "you" : nameOf(people[id]);
278
+ const list = (ids) => {
279
+ const names = ids.map(who);
280
+ return names.length <= 2 ? names.join(" and ") : `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}`;
281
+ };
282
+ const where = (channel == null ? void 0 : channel.name) ? `#${channel.name}` : "the conversation";
283
+ let text;
284
+ switch (sys == null ? void 0 : sys.type) {
285
+ case "joined":
286
+ text = `joined ${where}.`;
287
+ break;
288
+ case "left":
289
+ text = `left ${where}.`;
290
+ break;
291
+ case "added":
292
+ text = `added ${list(sys.userIds)} to ${where}.`;
293
+ break;
294
+ case "removed":
295
+ text = `removed ${list(sys.userIds)} from ${where}.`;
296
+ break;
297
+ case "topic":
298
+ text = sys.text ? /* @__PURE__ */ jsxs(Fragment, { children: [
299
+ "set the channel topic: ",
300
+ /* @__PURE__ */ jsx(Text, { style: {
301
+ color: p.foreground
302
+ }, children: sys.text })
303
+ ] }) : "cleared the channel topic.";
304
+ break;
305
+ case "purpose":
306
+ text = sys.text ? /* @__PURE__ */ jsxs(Fragment, { children: [
307
+ "set the channel description: ",
308
+ /* @__PURE__ */ jsx(Text, { style: {
309
+ color: p.foreground
310
+ }, children: sys.text })
311
+ ] }) : "cleared the channel description.";
312
+ break;
313
+ case "renamed":
314
+ text = `renamed the channel from \u201C${sys.oldName}\u201D to \u201C${sys.newName}\u201D.`;
315
+ break;
316
+ case "archived":
317
+ text = "archived this channel.";
318
+ break;
319
+ case "unarchived":
320
+ text = "un-archived this channel.";
321
+ break;
322
+ case "pinned":
323
+ text = /* @__PURE__ */ jsxs(Fragment, { children: [
324
+ "pinned a message to this channel.",
325
+ " ",
326
+ sys.messageId ? /* @__PURE__ */ jsx(Text, { style: {
327
+ color: p.link
328
+ }, onPress: () => app.openPane({
329
+ kind: "details",
330
+ channelId: m.channelId,
331
+ tab: "pins"
332
+ }), children: "See pinned items" }) : null
333
+ ] });
334
+ break;
335
+ default:
336
+ text = "updated the channel.";
337
+ }
338
+ return /* @__PURE__ */ jsxs(View, { style: [styles.row, styles.rowSystem], children: [
339
+ /* @__PURE__ */ jsx(View, { style: styles.gutter, children: /* @__PURE__ */ jsx(Pressable, { onPress: () => author && app.openProfile(author.id), accessibilityLabel: `Open ${nameOf(author)}`, children: /* @__PURE__ */ jsx(Avatar, { user: author }) }) }),
340
+ /* @__PURE__ */ jsxs(Text, { style: [styles.systemText, {
341
+ color: p.mutedForeground
342
+ }], children: [
343
+ /* @__PURE__ */ jsx(Text, { style: {
344
+ color: p.foreground,
345
+ fontWeight: "700"
346
+ }, onPress: () => author && app.openProfile(author.id), children: nameOf(author) }),
347
+ " ",
348
+ text,
349
+ " ",
350
+ /* @__PURE__ */ jsx(Text, { style: styles.systemTime, children: timeOf(m.createdAt) })
351
+ ] })
352
+ ] });
353
+ }
354
+ function JoinedRun({
355
+ messages
356
+ }) {
357
+ const app = useApp();
358
+ const p = usePalette();
359
+ const people = useChat((s) => s.people);
360
+ const channel = useChat((s) => s.channels[messages[0].channelId]);
361
+ const ids = [...new Set(messages.map((m) => {
362
+ var _a;
363
+ return (_a = m.author) == null ? void 0 : _a.id;
364
+ }).filter(Boolean))];
365
+ const names = ids.map((id) => nameOf(people[id]));
366
+ const who = names.length <= 3 ? `${names.slice(0, -1).join(", ")}${names.length > 1 ? " and " : ""}${names[names.length - 1]}` : `${names.slice(0, 2).join(", ")} and ${names.length - 2} others`;
367
+ const last = messages[messages.length - 1];
368
+ return /* @__PURE__ */ jsxs(View, { style: [styles.row, styles.rowSystem], children: [
369
+ /* @__PURE__ */ jsx(View, { style: styles.gutter, children: /* @__PURE__ */ jsx(Pressable, { onPress: () => app.openProfile(ids[0]), accessibilityLabel: `Open ${nameOf(people[ids[0]])}`, children: /* @__PURE__ */ jsx(Avatar, { user: people[ids[0]] }) }) }),
370
+ /* @__PURE__ */ jsxs(Text, { style: [styles.systemText, {
371
+ color: p.mutedForeground
372
+ }], children: [
373
+ /* @__PURE__ */ jsx(Text, { style: {
374
+ color: p.foreground,
375
+ fontWeight: "700"
376
+ }, children: who }),
377
+ " joined",
378
+ " ",
379
+ (channel == null ? void 0 : channel.name) ? `#${channel.name}` : "the conversation",
380
+ ".",
381
+ " ",
382
+ /* @__PURE__ */ jsx(Text, { style: styles.systemTime, children: timeOf(last.createdAt) })
383
+ ] })
384
+ ] });
385
+ }
386
+ function MessageActionsSheet({
387
+ request,
388
+ onClose
389
+ }) {
390
+ var _a;
391
+ const app = useApp();
392
+ const p = usePalette();
393
+ const {
394
+ actions
395
+ } = app.store;
396
+ const meId = useChat((s) => {
397
+ var _a2;
398
+ return (_a2 = s.me) == null ? void 0 : _a2.user.id;
399
+ });
400
+ const isAdmin = useChat((s) => {
401
+ var _a2;
402
+ return Boolean((_a2 = s.me) == null ? void 0 : _a2.isAdmin);
403
+ });
404
+ const fresh = useChat((s) => request ? s.latest[request.message.id] : void 0);
405
+ const author = useChat((s) => (request == null ? void 0 : request.message.author) ? s.people[request.message.author.id] : void 0);
406
+ if (!request) return /* @__PURE__ */ jsx(Sheet, { visible: false, onClose, children: null });
407
+ const m = fresh != null ? fresh : request.message;
408
+ const {
409
+ canPost,
410
+ mode,
411
+ isThreadRoot
412
+ } = request;
413
+ const mine = ((_a = m.author) == null ? void 0 : _a.id) === meId;
414
+ const fail = (err) => app.toast(err.message || "That did not work.", "error");
415
+ const run = (fn) => {
416
+ onClose();
417
+ fn();
418
+ };
419
+ const canReply = !isThreadRoot && mode !== "thread" && !m.threadRootId;
420
+ return /* @__PURE__ */ jsxs(Sheet, { visible: true, onClose, flush: true, children: [
421
+ canPost ? /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.quick, keyboardShouldPersistTaps: "handled", children: [
422
+ QUICK_REACTIONS.map((e) => /* @__PURE__ */ jsx(Pressable, { onPress: () => run(() => void actions.react(m, e).catch(fail)), accessibilityLabel: `React with ${emojiName(e).replace(/_/g, " ")}`, style: [styles.quickButton, {
423
+ backgroundColor: p.muted
424
+ }], children: /* @__PURE__ */ jsx(Text, { style: styles.quickEmoji, children: e }) }, e)),
425
+ /* @__PURE__ */ jsx(Pressable, { onPress: () => run(() => app.showReactionPicker(m)), accessibilityLabel: "Add reaction", style: [styles.quickButton, {
426
+ backgroundColor: p.muted
427
+ }], children: /* @__PURE__ */ jsx(Ionicons, { name: "happy-outline", size: 22, color: p.mutedForeground }) })
428
+ ] }) : null,
429
+ canReply ? /* @__PURE__ */ jsx(MenuRow, { icon: "chatbubbles-outline", label: "Reply in thread", onPress: () => run(() => app.openThread(m.id, m.channelId)) }) : null,
430
+ /* @__PURE__ */ jsx(MenuRow, { icon: m.saved ? "bookmark" : "bookmark-outline", label: m.saved ? "Remove from saved" : "Save for later", onPress: () => run(() => void actions.save(m, !m.saved).catch(fail)) }),
431
+ /* @__PURE__ */ jsx(MenuRow, { icon: "eye-off-outline", label: "Mark unread", disabled: Boolean(m.threadRootId && !m.alsoInChannel), onPress: () => run(() => void actions.markUnread(m).catch(fail)) }),
432
+ /* @__PURE__ */ jsx(MenuRow, { icon: "copy-outline", label: "Copy text", onPress: () => run(() => {
433
+ Clipboard.setString(m.body);
434
+ app.toast("Copied the text.");
435
+ }) }),
436
+ canPost ? /* @__PURE__ */ jsx(MenuRow, { icon: m.pinned ? "pin-outline" : "pin", label: m.pinned ? "Unpin from channel" : "Pin to channel", onPress: () => run(() => void actions.pin(m, !m.pinned).then(() => app.toast(m.pinned ? "Unpinned." : "Pinned to the channel."), fail)) }) : null,
437
+ mine || isAdmin ? /* @__PURE__ */ jsx(MenuDivider, {}) : null,
438
+ mine && canPost && request.onEdit ? /* @__PURE__ */ jsx(MenuRow, { icon: "create-outline", label: "Edit message", onPress: () => run(() => {
439
+ var _a2;
440
+ return (_a2 = request.onEdit) == null ? void 0 : _a2.call(request);
441
+ }) }) : null,
442
+ mine || isAdmin ? /* @__PURE__ */ jsx(MenuRow, { danger: true, icon: "trash-outline", label: "Delete message", onPress: () => run(() => void app.confirm({
443
+ title: "Delete message",
444
+ body: mine ? "Delete this message? This can\u2019t be undone." : `Delete ${nameOf(author)}\u2019s message? This can\u2019t be undone.`,
445
+ action: "Delete",
446
+ danger: true
447
+ }).then((ok) => ok ? actions.remove(m) : void 0).catch(fail)) }) : null
448
+ ] });
449
+ }
450
+ const styles = StyleSheet.create({
451
+ row: {
452
+ flexDirection: "row",
453
+ paddingHorizontal: 16,
454
+ gap: 10
455
+ },
456
+ rowFull: {
457
+ paddingTop: 8,
458
+ paddingBottom: 4
459
+ },
460
+ rowCompact: {
461
+ paddingVertical: 2
462
+ },
463
+ rowSystem: {
464
+ paddingVertical: 4,
465
+ alignItems: "center"
466
+ },
467
+ sending: {
468
+ opacity: 0.6
469
+ },
470
+ gutter: {
471
+ width: 36
472
+ },
473
+ avatar: {
474
+ marginTop: 2
475
+ },
476
+ main: {
477
+ flex: 1,
478
+ minWidth: 0
479
+ },
480
+ context: {
481
+ marginBottom: 2
482
+ },
483
+ flag: {
484
+ flexDirection: "row",
485
+ alignItems: "center",
486
+ gap: 4,
487
+ marginBottom: 2
488
+ },
489
+ flagText: {
490
+ fontSize: 12
491
+ },
492
+ nameRow: {
493
+ flexDirection: "row",
494
+ alignItems: "baseline",
495
+ gap: 6
496
+ },
497
+ name: {
498
+ fontSize: 15,
499
+ fontWeight: "800",
500
+ flexShrink: 1
501
+ },
502
+ statusEmoji: {
503
+ fontSize: 13
504
+ },
505
+ time: {
506
+ fontSize: 12
507
+ },
508
+ also: {
509
+ fontSize: 13,
510
+ marginBottom: 1
511
+ },
512
+ deleted: {
513
+ fontSize: 15,
514
+ fontStyle: "italic"
515
+ },
516
+ failed: {
517
+ flexDirection: "row",
518
+ alignItems: "center",
519
+ gap: 8,
520
+ marginTop: 4
521
+ },
522
+ failedText: {
523
+ fontSize: 12
524
+ },
525
+ failedAction: {
526
+ fontSize: 12,
527
+ fontWeight: "700"
528
+ },
529
+ reactions: {
530
+ flexDirection: "row",
531
+ flexWrap: "wrap",
532
+ gap: 5,
533
+ marginTop: 5
534
+ },
535
+ reaction: {
536
+ flexDirection: "row",
537
+ alignItems: "center",
538
+ gap: 4,
539
+ height: 28,
540
+ paddingHorizontal: 9,
541
+ borderRadius: 14,
542
+ borderWidth: 1
543
+ },
544
+ reactionEmoji: {
545
+ fontSize: 15
546
+ },
547
+ reactionCount: {
548
+ fontSize: 12,
549
+ fontWeight: "700",
550
+ fontVariant: ["tabular-nums"]
551
+ },
552
+ summary: {
553
+ flexDirection: "row",
554
+ alignItems: "center",
555
+ gap: 8,
556
+ marginTop: 4,
557
+ paddingVertical: 4,
558
+ borderRadius: 8
559
+ },
560
+ summaryFaces: {
561
+ flexDirection: "row"
562
+ },
563
+ overlap: {
564
+ marginLeft: -6
565
+ },
566
+ summaryCount: {
567
+ fontSize: 13,
568
+ fontWeight: "800"
569
+ },
570
+ summaryWhen: {
571
+ fontSize: 12,
572
+ flexShrink: 1
573
+ },
574
+ files: {
575
+ gap: 6,
576
+ marginTop: 6
577
+ },
578
+ image: {
579
+ borderWidth: StyleSheet.hairlineWidth,
580
+ borderRadius: 10,
581
+ overflow: "hidden",
582
+ alignSelf: "flex-start"
583
+ },
584
+ imageInner: {
585
+ width: 240,
586
+ height: 180
587
+ },
588
+ file: {
589
+ flexDirection: "row",
590
+ alignItems: "center",
591
+ gap: 10,
592
+ borderWidth: StyleSheet.hairlineWidth,
593
+ borderRadius: 10,
594
+ padding: 10,
595
+ maxWidth: 320
596
+ },
597
+ fileIcon: {
598
+ width: 40,
599
+ height: 40,
600
+ borderRadius: 8,
601
+ alignItems: "center",
602
+ justifyContent: "center"
603
+ },
604
+ fileText: {
605
+ flex: 1,
606
+ minWidth: 0
607
+ },
608
+ fileName: {
609
+ fontSize: 14,
610
+ fontWeight: "700"
611
+ },
612
+ fileMeta: {
613
+ fontSize: 12,
614
+ marginTop: 1
615
+ },
616
+ editor: {
617
+ borderWidth: 1,
618
+ borderRadius: 10,
619
+ marginTop: 4
620
+ },
621
+ editorInput: {
622
+ fontSize: 15,
623
+ minHeight: 60,
624
+ maxHeight: 200,
625
+ paddingHorizontal: 10,
626
+ paddingTop: 8,
627
+ textAlignVertical: "top"
628
+ },
629
+ editorActions: {
630
+ flexDirection: "row",
631
+ justifyContent: "flex-end",
632
+ gap: 8,
633
+ padding: 8
634
+ },
635
+ systemText: {
636
+ flex: 1,
637
+ fontSize: 15,
638
+ lineHeight: 21
639
+ },
640
+ systemTime: {
641
+ fontSize: 12
642
+ },
643
+ quick: {
644
+ gap: 8,
645
+ paddingHorizontal: 18,
646
+ paddingVertical: 10
647
+ },
648
+ quickButton: {
649
+ width: 48,
650
+ height: 48,
651
+ borderRadius: 24,
652
+ alignItems: "center",
653
+ justifyContent: "center"
654
+ },
655
+ quickEmoji: {
656
+ fontSize: 24
657
+ }
658
+ });export{JoinedRun,MessageActionsSheet,MessageItem};//# sourceMappingURL=MessageItem.js.map