@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.
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 +3 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptSafe.js","sources":["../../../../../src/features/webbuilder/web/utils/promptSafe.ts"],"sourcesContent":["/**\n * Guards for page-derived strings (selectors, source paths, element text) that end up in\n * text the AI reads: comment pins, hosted canvas turns. Anyone with comment access controls\n * them, so they are reduced to plain data: no quotes, backticks, guillemets or newlines,\n * selectors limited to CSS-selector characters, paths to relative source paths.\n *\n * Pure - runs under `node --test`.\n */\n\nexport const SAFE_SELECTOR_MAX = 300;\nexport const SAFE_PATH_MAX = 300;\n\n/** CSS selector characters (no quotes, backticks, braces, semicolons or newlines). */\nconst SELECTOR_RE = /^[A-Za-z0-9_\\-#.:[\\]=>+~*() ,^$|@%\\\\]+$/;\n/** A relative source path: no leading slash, no `..`, path characters only. */\nconst RELATIVE_PATH_RE = /^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))[A-Za-z0-9._\\-\\/@+]+$/;\n\n/** Quotes, backticks, guillemets, newlines and control characters out; whitespace collapsed; capped. */\nexport function stripUnsafe(value: unknown, max = 200): string {\n if (typeof value !== 'string') return '';\n const t = value\n .replace(/[`\"«»\\u0000-\\u001F\\u007F]/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n return t.length > max ? `${t.slice(0, max - 1)}…` : t;\n}\n\nexport function isSafeSelector(value: unknown): value is string {\n return (\n typeof value === 'string' &&\n value.trim().length > 0 &&\n value.length <= SAFE_SELECTOR_MAX &&\n SELECTOR_RE.test(value)\n );\n}\n\nexport function isSafeRelativePath(value: unknown): value is string {\n return (\n typeof value === 'string' && value.length > 0 && value.length <= SAFE_PATH_MAX && RELATIVE_PATH_RE.test(value)\n );\n}\n"],"names":[],"mappings":"AASO,MAAM,iBAAoB,GAAA;AAC1B,MAAM,aAAgB,GAAA;AAG7B,MAAM,WAAc,GAAA,yCAAA;AAEpB,MAAM,gBAAmB,GAAA,wDAAA;AAGT,SAAA,WAAA,CAAY,KAAgB,EAAA,GAAA,GAAM,GAAa,EAAA;AAC7D,EAAI,IAAA,OAAO,KAAU,KAAA,QAAA,EAAiB,OAAA,EAAA;AACtC,EAAM,MAAA,CAAA,GAAI,KAAM,CAAA,OAAA,CAAQ,4BAA8B,EAAA,GAAG,EAAE,OAAQ,CAAA,MAAA,EAAQ,GAAG,CAAA,CAAE,IAAK,EAAA;AACrF,EAAO,OAAA,CAAA,CAAE,MAAS,GAAA,GAAA,GAAM,CAAG,EAAA,CAAA,CAAE,MAAM,CAAG,EAAA,GAAA,GAAM,CAAC,CAAC,CAAM,MAAA,CAAA,GAAA,CAAA;AACtD;AACO,SAAS,eAAe,KAAiC,EAAA;AAC9D,EAAA,OAAO,OAAO,KAAA,KAAU,QAAY,IAAA,KAAA,CAAM,IAAK,EAAA,CAAE,MAAS,GAAA,CAAA,IAAK,KAAM,CAAA,MAAA,IAAU,iBAAqB,IAAA,WAAA,CAAY,KAAK,KAAK,CAAA;AAC5H;AACO,SAAS,mBAAmB,KAAiC,EAAA;AAClE,EAAO,OAAA,OAAO,KAAU,KAAA,QAAA,IAAY,KAAM,CAAA,MAAA,GAAS,CAAK,IAAA,KAAA,CAAM,MAAU,IAAA,aAAA,IAAiB,gBAAiB,CAAA,IAAA,CAAK,KAAK,CAAA;AACtH"}
@@ -1,4 +1,4 @@
1
- import {createDataService}from'./data/dataApi.js';import {createSecretsService}from'./secrets/secretsApi.js';import {SecretsCredentialStore}from'./secrets/secretsStore.js';import {connectorConnectUrl,checkApiKey,API_KEY_CONNECT,INTEGRATION_CREDENTIALS_QUERY,parseCredentials,INTEGRATION_CATALOG_QUERY,withBuiltInEntries,parseCatalog}from'./integrations/catalog.js';import {createAppSecretsAdapter,mintAndStoreAppToken,appTokenStatusFromNames}from'./integrations/appToken.js';import {enableSiteBilling}from'./integrations/siteBilling.js';import {disableSiteMail,siteMailStatus,enableSiteMail}from'./integrations/siteMail.js';import {createSharingService}from'./sharing/sharingApi.js';import {createGithubConnectService}from'./github/githubConnectApi.js';import {createCoverRequester}from'./project/coverRequest.js';import {CLOUDFLARE_PROJECT_QUERY,siteFromLookup}from'./project/deleteFlow.js';import {PROJECT_SETTINGS_QUERY,parseServerProjectSettings}from'./project/serverSettings.js';var __defProp = Object.defineProperty;
1
+ import {createDataService}from'./data/dataApi.js';import {createSecretsService}from'./secrets/secretsApi.js';import {SecretsCredentialStore}from'./secrets/secretsStore.js';import {connectorConnectUrl,checkApiKey,API_KEY_CONNECT,INTEGRATION_CREDENTIALS_QUERY,parseCredentials,INTEGRATION_CATALOG_QUERY,withBuiltInEntries,parseCatalog}from'./integrations/catalog.js';import {createAppSecretsAdapter,mintAndStoreAppToken,appTokenStatusFromNames}from'./integrations/appToken.js';import {enableSiteBilling}from'./integrations/siteBilling.js';import {disableSiteMail,siteMailStatus,enableSiteMail}from'./integrations/siteMail.js';import {createSharingService}from'./sharing/sharingApi.js';import {createCommentsService}from'./comments/commentsApi.js';import {createGithubConnectService}from'./github/githubConnectApi.js';import {createCoverRequester}from'./project/coverRequest.js';import {CLOUDFLARE_PROJECT_QUERY,siteFromLookup}from'./project/deleteFlow.js';import {PROJECT_SETTINGS_QUERY,parseServerProjectSettings}from'./project/serverSettings.js';var __defProp = Object.defineProperty;
2
2
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
4
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -275,6 +275,7 @@ function createWebServices(opts) {
275
275
  };
276
276
  const runDocument = (document, variables) => /^\s*mutation\b/.test(document) ? transport.mutate(document, variables) : transport.query(document, variables);
277
277
  const sharing = createSharingService(runDocument);
278
+ const comments = createCommentsService(runDocument);
278
279
  const requestCover = createCoverRequester(runDocument);
279
280
  const serverSettings = async (channelId) => {
280
281
  var _a, _b, _c;
@@ -321,6 +322,7 @@ function createWebServices(opts) {
321
322
  appSecrets,
322
323
  integrations,
323
324
  sharing,
325
+ comments,
324
326
  githubConnect,
325
327
  serverSettings,
326
328
  requestCover,
@@ -1 +1 @@
1
- {"version":3,"file":"webServices.js","sources":["../../../../src/features/webbuilder/web/webServices.ts"],"sourcesContent":["/**\n * The web panels' services on the phone: Secrets (`secrets/secretsApi`), Cloud (`data/dataApi`) and\n * Integrations (web `integrations/useIntegrationsService`), built from the web's own modules over the\n * host's GraphQL seam. Each call is the web's request, unchanged. Pure (no React).\n */\nimport { createDataService, type WebBuilderDataService } from './data/dataApi';\nimport type { GraphqlTransport } from './data/graphql';\nimport { createSecretsService, type WebBuilderSecretsService } from './secrets/secretsApi';\nimport { SecretsCredentialStore } from './secrets/secretsStore';\nimport {\n API_KEY_CONNECT,\n INTEGRATION_CATALOG_QUERY,\n INTEGRATION_CREDENTIALS_QUERY,\n checkApiKey,\n connectorConnectUrl,\n parseCatalog,\n parseCredentials,\n withBuiltInEntries,\n type IntegrationCatalogEntry,\n type IntegrationCredential,\n} from './integrations/catalog';\nimport {\n appTokenStatusFromNames,\n createAppSecretsAdapter,\n mintAndStoreAppToken,\n type AppSecretsAdapter,\n type AppTokenStatus,\n} from './integrations/appToken';\nimport { enableSiteBilling } from './integrations/siteBilling';\nimport { disableSiteMail, enableSiteMail, siteMailStatus } from './integrations/siteMail';\nimport { createSharingService, type GqlCall, type WebBuilderSharingService } from './sharing/sharingApi';\nimport { createGithubConnectService, type GithubConnectService } from './github/githubConnectApi';\nimport { createCoverRequester, type CoverRequester } from './project/coverRequest';\nimport { CLOUDFLARE_PROJECT_QUERY, siteFromLookup, type KnownPublish, type SiteLookup } from './project/deleteFlow';\nimport {\n PROJECT_SETTINGS_QUERY,\n parseServerProjectSettings,\n type ProjectIntegration,\n type ServerProjectSettings,\n} from './project/serverSettings';\n\nexport interface WebScope {\n orgName: string;\n projectId: string;\n environmentTagId: string;\n}\n\n/**\n * The agent a published site calls (`YANTRA_AGENT_URL`) when the host names none. The host passes the\n * agent of its own plane (web 0.10.1: prod must never fall back to the dev agent).\n */\nexport const SITE_AGENT_URL = 'https://cdecli-agent.cdebase.dev';\n\n/** surface-kit `connectApiKeyConnector`'s request: the connector entry plus the key, recorded `active`. */\nconst CREATE_CUSTOM_CONNECTOR = `\n mutation CreateCustomConnectorExtension($input: CreateCustomConnectorExtensionInput!) {\n createCustomConnectorExtension(input: $input) {\n success message credentialId authorizationUrl connectorType\n }\n }`;\n\nfunction credentialSafeName(raw: string): string {\n return (\n raw\n .replace(/[^A-Za-z0-9 _-]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim() || 'Credential'\n );\n}\n\nfunction newUuid(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.floor(Math.random() * 16);\n return (c === 'x' ? r : (r % 4) + 8).toString(16);\n });\n}\n\n/** surface-kit `buildCustomConnectorInput` for an api_key connector (the fields Stripe sends). */\nfunction apiKeyConnectorInput(\n connectorId: string,\n spec: (typeof API_KEY_CONNECT)[string],\n key: string,\n scope: WebScope,\n): Record<string, unknown> {\n const name = credentialSafeName(`${spec.label} web builder`);\n return {\n name,\n description: `Custom connector for ${connectorId}`,\n extensionUuid: newUuid(),\n orgName: scope.orgName,\n projectId: scope.projectId,\n environmentTag: scope.environmentTagId,\n publisher: scope.orgName,\n connectorType: 'app',\n provider: {\n id: connectorId,\n name,\n title: name,\n description: `${spec.label} credential`,\n baseUrl: spec.baseUrl,\n providerUrl: '',\n logo: '',\n categories: ['other'],\n category: 'other',\n authMethods: ['api_key'],\n authorizationUrl: '',\n tokenUrl: '',\n revocationUrl: '',\n mcpUrl: '',\n scopes: '',\n clientAuthMethod: 'client_secret_post',\n useBasicAuth: false,\n useCustomOAuthEndpoints: false,\n usePKCE: false,\n color: '',\n iconName: 'AiOutlineApi',\n iconFontSize: 'large',\n enabled: true,\n fields: [\n {\n defaultValue: '',\n description: '',\n enumValues: '',\n genericType: 'api_key',\n iconType: '',\n isConfigField: true,\n isSecret: true,\n label: spec.field.label,\n name: spec.field.name,\n placeholder: '',\n placement: 'none',\n placementKey: '',\n readOnly: false,\n required: false,\n scope: 4,\n secretKey: spec.field.secretKey,\n secretType: 'ENVIRONMENT_VAR',\n type: 'string',\n uiWidget: 'password',\n },\n ],\n },\n values: { authMethod: 'api_key', [spec.field.name]: key.trim() },\n };\n}\n\n/** A project as the web services read it. */\nexport interface WebProjectRef {\n channelId: string;\n projectId?: string | null;\n sandboxId?: string | null;\n templateId?: string | null;\n}\n\nexport interface WebIntegrationsService {\n loadCatalog: () => Promise<IntegrationCatalogEntry[]>;\n /** The person's connections in this workspace; null when they can't be read. */\n loadConnections: () => Promise<IntegrationCredential[] | null>;\n connectUrl: (connectorId: string) => string | null;\n /** The project's saved integrations (server settings); null when they can't be read. */\n projectIntegrations: (channelId: string) => Promise<ProjectIntegration[] | null>;\n appTokenStatus: (project: WebProjectRef) => Promise<AppTokenStatus>;\n createAppToken: (project: WebProjectRef) => Promise<{ ok: boolean; message?: string }>;\n enableSiteBilling: (\n project: WebProjectRef,\n stripeCredentialId: string,\n ) => Promise<{ ok: boolean; message?: string }>;\n connectApiKey: (connectorId: string, key: string) => Promise<{ ok: boolean; message?: string }>;\n siteMail: {\n enable: (project: WebProjectRef, domain: string, notifyTo: string) => ReturnType<typeof enableSiteMail>;\n status: (project: WebProjectRef, diagnose?: boolean) => ReturnType<typeof siteMailStatus>;\n disable: (project: WebProjectRef) => ReturnType<typeof disableSiteMail>;\n };\n}\n\nexport interface WebServices {\n data: WebBuilderDataService;\n secrets: WebBuilderSecretsService;\n appSecrets: AppSecretsAdapter;\n integrations: WebIntegrationsService;\n sharing: WebBuilderSharingService;\n /** The person's own GitHub connection (web 0.20.0 Connect GitHub): status and paste-a-token. */\n githubConnect: GithubConnectService;\n /** The project's server settings (integrations, GitHub sync, database…); null when unreadable. */\n serverSettings: (channelId: string) => Promise<ServerProjectSettings | null>;\n /** Ask the server to take a build's cover: its preview is on screen and it has none (web 0.20.12). */\n requestCover: CoverRequester;\n /** The project's live site before a delete (web Phase 5 §7): a site, nothing published, or 'unknown'. */\n findPublishedSite: (channelId: string, known: KnownPublish) => Promise<SiteLookup>;\n}\n\nexport function createWebServices(opts: {\n transport: GraphqlTransport;\n scope: () => WebScope;\n appUrl?: string;\n /** The agent of the app's own plane (the build profile's CDECLI_AGENT_ENDPOINT). */\n agentUrl?: string;\n}): WebServices {\n const { transport, scope } = opts;\n const data = createDataService(transport);\n const secrets = createSecretsService({\n transport,\n data,\n store: new SecretsCredentialStore(null),\n scope: () => {\n const s = scope();\n return { orgName: s.orgName, project: s.projectId };\n },\n });\n const appSecrets = createAppSecretsAdapter(secrets);\n // The web helpers type `errors` as a plain array; the seam's is read-only (same values).\n const gql = <T>(query: string, variables: Record<string, unknown>) =>\n transport.mutate<T>(query, variables) as Promise<{ data?: T; errors?: Array<{ message: string }> }>;\n /** The project's secrets credential is recorded on its settings (web `settingsSync.update`). */\n const keepCredential = async (channelId: string, credentialId?: string | null) => {\n if (!credentialId) return;\n const s = await data.getSettings(channelId);\n if (s.ok && s.value?.secretsCredentialId !== credentialId) {\n await data.updateSettings(channelId, { secretsCredentialId: credentialId });\n }\n };\n let catalog: Promise<IntegrationCatalogEntry[]> | null = null;\n\n const integrations: WebIntegrationsService = {\n loadCatalog: async () => {\n if (!catalog) {\n catalog = transport\n .query<{ integrationConnectors?: unknown }>(INTEGRATION_CATALOG_QUERY, {})\n .then((r) => {\n if (r.errors?.length && !r.data?.integrationConnectors) {\n catalog = null;\n throw new Error(r.errors[0].message || \"Couldn't load the integrations.\");\n }\n return withBuiltInEntries(parseCatalog(r.data?.integrationConnectors));\n });\n }\n return catalog;\n },\n loadConnections: async () => {\n const s = scope();\n if (!s.orgName || !s.projectId) return null;\n const r = await transport.query<{ formBuilderCredentials?: { data?: unknown } }>(\n INTEGRATION_CREDENTIALS_QUERY,\n {\n filter: {\n orgName: s.orgName,\n projectId: s.projectId,\n ...(s.environmentTagId ? { environmentTag: s.environmentTagId } : {}),\n },\n limit: 200,\n },\n );\n if (r.errors?.length && !r.data?.formBuilderCredentials) return null;\n return parseCredentials(r.data?.formBuilderCredentials?.data);\n },\n connectUrl: (connectorId) =>\n opts.appUrl ? connectorConnectUrl(opts.appUrl, connectorId, scope().projectId) : null,\n projectIntegrations: async (channelId) => {\n const r = await transport.query<{ aiCodeProjectSettings?: unknown }>(PROJECT_SETTINGS_QUERY, { channelId });\n if (r.errors?.length && r.data?.aiCodeProjectSettings === undefined) return null;\n return parseServerProjectSettings(r.data?.aiCodeProjectSettings)?.integrations ?? [];\n },\n appTokenStatus: async (project) => {\n if (!project.channelId) return 'unavailable';\n try {\n return appTokenStatusFromNames(\n await appSecrets.listSecretNames({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n }),\n );\n } catch {\n return 'unavailable';\n }\n },\n createAppToken: async (project) => {\n if (!project.channelId) return { ok: false, message: 'Open a project first.' };\n const r = await mintAndStoreAppToken({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n scope: scope(),\n agentUrl: opts.agentUrl || SITE_AGENT_URL,\n secrets: appSecrets,\n gql,\n });\n // The web's result union, read without narrowing (native: no strict null checks).\n const minted = r as { ok: boolean; credentialId?: string; warning?: string; message?: string };\n if (!minted.ok) return { ok: false, message: minted.message };\n await keepCredential(project.channelId, minted.credentialId);\n return minted.warning ? { ok: true, message: minted.warning } : { ok: true };\n },\n enableSiteBilling: async (project, stripeCredentialId) => {\n if (!project.channelId) return { ok: false, message: 'Open a project first.' };\n const r = await enableSiteBilling({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n stripeCredentialId,\n secrets: appSecrets,\n gql,\n });\n const billed = r as { ok: boolean; credentialId?: string; message?: string };\n if (billed.ok) await keepCredential(project.channelId, billed.credentialId);\n return billed.ok ? { ok: true } : { ok: false, message: billed.message };\n },\n connectApiKey: async (connectorId, key) => {\n const spec = API_KEY_CONNECT[connectorId];\n if (!spec || !checkApiKey(connectorId, key).ok) {\n return { ok: false, message: `That doesn't look like a ${spec?.label ?? ''} secret key.` };\n }\n const s = scope();\n if (!s.orgName || !s.projectId || !s.environmentTagId) {\n return {\n ok: false,\n message: \"Can't tell which workspace to save the key in. Sign in again, then retry.\",\n };\n }\n const r = await transport.mutate<{\n createCustomConnectorExtension?: { credentialId?: string; message?: string };\n }>(CREATE_CUSTOM_CONNECTOR, { input: apiKeyConnectorInput(connectorId, spec, key, s) });\n const created = r.data?.createCustomConnectorExtension;\n if (!created?.credentialId) {\n return {\n ok: false,\n message: created?.message || r.errors?.[0]?.message || `${spec.label} couldn't be connected.`,\n };\n }\n return { ok: true };\n },\n siteMail: {\n enable: async (project, domain, notifyTo) => {\n const r = await enableSiteMail({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n domain,\n notifyTo,\n secrets: appSecrets,\n gql,\n });\n const mailed = r as { ok: boolean; credentialId?: string };\n if (mailed.ok) await keepCredential(project.channelId, mailed.credentialId);\n return r;\n },\n status: (project, diagnose) => siteMailStatus(gql, project.channelId, diagnose),\n disable: (project) => disableSiteMail(gql, project.channelId),\n },\n };\n\n // The web's sharing calls take one document runner: a mutation goes out as one, the rest as queries.\n const runDocument: GqlCall = (document, variables) =>\n /^\\s*mutation\\b/.test(document) ? transport.mutate(document, variables) : transport.query(document, variables);\n const sharing = createSharingService(runDocument);\n const requestCover = createCoverRequester(runDocument);\n\n const serverSettings = async (channelId: string) => {\n const r = await transport.query<{ aiCodeProjectSettings?: unknown }>(PROJECT_SETTINGS_QUERY, { channelId });\n if (r.errors?.length && r.data?.aiCodeProjectSettings === undefined) return null;\n return parseServerProjectSettings(r.data?.aiCodeProjectSettings);\n };\n\n const githubConnect = createGithubConnectService({\n transport,\n scope: () => {\n const s = scope();\n return { orgName: s.orgName, project: s.projectId };\n },\n currentUserId: () => sharing.currentUserId().catch(() => null),\n });\n\n const findPublishedSite = async (channelId: string, known: KnownPublish): Promise<SiteLookup> => {\n let name: string | null = null;\n let failed = false;\n try {\n // Ten seconds at most, as on the web: the delete waits on this.\n const r = await Promise.race([\n transport.query<{ aiCodeGetCloudflareProject?: string | null }>(CLOUDFLARE_PROJECT_QUERY, {\n channelId,\n }),\n new Promise<never>((_, reject) => {\n setTimeout(() => reject(new Error('timeout')), 10_000);\n }),\n ]);\n name = r.data?.aiCodeGetCloudflareProject || null;\n failed = !name && Boolean(r.errors?.length);\n } catch {\n failed = true;\n }\n // A failed lookup must not hide a live site: fall back to the live address, and with none say we\n // couldn't check ('unknown').\n return siteFromLookup({ name, failed }, known);\n };\n\n return {\n data,\n secrets,\n appSecrets,\n integrations,\n sharing,\n githubConnect,\n serverSettings,\n requestCover,\n findPublishedSite,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA4BO,MAAM,cAAiB,GAAA;AAG9B,MAAM,uBAA0B,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAAA,CAAA;AAMhC,SAAS,mBAAmB,GAAqB,EAAA;AAC/C,EAAO,OAAA,GAAA,CAAI,OAAQ,CAAA,mBAAA,EAAqB,GAAG,CAAA,CAAE,QAAQ,MAAQ,EAAA,GAAG,CAAE,CAAA,IAAA,EAAU,IAAA,YAAA;AAC9E;AACA,SAAS,OAAkB,GAAA;AACzB,EAAO,OAAA,sCAAA,CAAuC,OAAQ,CAAA,OAAA,EAAS,CAAK,CAAA,KAAA;AAClE,IAAA,MAAM,IAAI,IAAK,CAAA,KAAA,CAAM,IAAK,CAAA,MAAA,KAAW,EAAE,CAAA;AACvC,IAAA,OAAA,CAAQ,MAAM,GAAM,GAAA,CAAA,GAAI,IAAI,CAAI,GAAA,CAAA,EAAG,SAAS,EAAE,CAAA;AAAA,GAC/C,CAAA;AACH;AAGA,SAAS,oBAAqB,CAAA,WAAA,EAAqB,IAAwC,EAAA,GAAA,EAAa,KAA0C,EAAA;AAChJ,EAAA,MAAM,IAAO,GAAA,kBAAA,CAAmB,CAAG,EAAA,IAAA,CAAK,KAAK,CAAc,YAAA,CAAA,CAAA;AAC3D,EAAO,OAAA;AAAA,IACL,IAAA;AAAA,IACA,WAAA,EAAa,wBAAwB,WAAW,CAAA,CAAA;AAAA,IAChD,eAAe,OAAQ,EAAA;AAAA,IACvB,SAAS,KAAM,CAAA,OAAA;AAAA,IACf,WAAW,KAAM,CAAA,SAAA;AAAA,IACjB,gBAAgB,KAAM,CAAA,gBAAA;AAAA,IACtB,WAAW,KAAM,CAAA,OAAA;A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,GAAG,GAAM,CAAA;AAAA,OACtD,CAAC,CAAC,CAAA;AACH,MAAO,IAAA,GAAA,CAAA,CAAA,EAAA,GAAA,CAAA,CAAE,IAAF,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAQ,0BAA8B,KAAA,IAAA;AAC7C,MAAA,MAAA,GAAS,CAAC,IAAQ,IAAA,OAAA,CAAA,CAAQ,EAAE,GAAA,CAAA,CAAA,MAAA,KAAF,mBAAU,MAAM,CAAA;AAAA,KACpC,CAAA,OAAA,CAAA,EAAA;AACN,MAAS,MAAA,GAAA,IAAA;AAAA;AAIX,IAAA,OAAO,cAAe,CAAA;AAAA,MACpB,IAAA;AAAA,MACA;AAAA,OACC,KAAK,CAAA;AAAA,GACV;AACA,EAAO,OAAA;AAAA,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,aAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA;AAAA,GACF;AACF"}
1
+ {"version":3,"file":"webServices.js","sources":["../../../../src/features/webbuilder/web/webServices.ts"],"sourcesContent":["/**\n * The web panels' services on the phone: Secrets (`secrets/secretsApi`), Cloud (`data/dataApi`) and\n * Integrations (web `integrations/useIntegrationsService`), built from the web's own modules over the\n * host's GraphQL seam. Each call is the web's request, unchanged. Pure (no React).\n */\nimport { createDataService, type WebBuilderDataService } from './data/dataApi';\nimport type { GraphqlTransport } from './data/graphql';\nimport { createSecretsService, type WebBuilderSecretsService } from './secrets/secretsApi';\nimport { SecretsCredentialStore } from './secrets/secretsStore';\nimport {\n API_KEY_CONNECT,\n INTEGRATION_CATALOG_QUERY,\n INTEGRATION_CREDENTIALS_QUERY,\n checkApiKey,\n connectorConnectUrl,\n parseCatalog,\n parseCredentials,\n withBuiltInEntries,\n type IntegrationCatalogEntry,\n type IntegrationCredential,\n} from './integrations/catalog';\nimport {\n appTokenStatusFromNames,\n createAppSecretsAdapter,\n mintAndStoreAppToken,\n type AppSecretsAdapter,\n type AppTokenStatus,\n} from './integrations/appToken';\nimport { enableSiteBilling } from './integrations/siteBilling';\nimport { disableSiteMail, enableSiteMail, siteMailStatus } from './integrations/siteMail';\nimport { createSharingService, type GqlCall, type WebBuilderSharingService } from './sharing/sharingApi';\nimport { createCommentsService, type WebBuilderCommentsService } from './comments/commentsApi';\nimport { createGithubConnectService, type GithubConnectService } from './github/githubConnectApi';\nimport { createCoverRequester, type CoverRequester } from './project/coverRequest';\nimport { CLOUDFLARE_PROJECT_QUERY, siteFromLookup, type KnownPublish, type SiteLookup } from './project/deleteFlow';\nimport {\n PROJECT_SETTINGS_QUERY,\n parseServerProjectSettings,\n type ProjectIntegration,\n type ServerProjectSettings,\n} from './project/serverSettings';\n\nexport interface WebScope {\n orgName: string;\n projectId: string;\n environmentTagId: string;\n}\n\n/**\n * The agent a published site calls (`YANTRA_AGENT_URL`) when the host names none. The host passes the\n * agent of its own plane (web 0.10.1: prod must never fall back to the dev agent).\n */\nexport const SITE_AGENT_URL = 'https://cdecli-agent.cdebase.dev';\n\n/** surface-kit `connectApiKeyConnector`'s request: the connector entry plus the key, recorded `active`. */\nconst CREATE_CUSTOM_CONNECTOR = `\n mutation CreateCustomConnectorExtension($input: CreateCustomConnectorExtensionInput!) {\n createCustomConnectorExtension(input: $input) {\n success message credentialId authorizationUrl connectorType\n }\n }`;\n\nfunction credentialSafeName(raw: string): string {\n return (\n raw\n .replace(/[^A-Za-z0-9 _-]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim() || 'Credential'\n );\n}\n\nfunction newUuid(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.floor(Math.random() * 16);\n return (c === 'x' ? r : (r % 4) + 8).toString(16);\n });\n}\n\n/** surface-kit `buildCustomConnectorInput` for an api_key connector (the fields Stripe sends). */\nfunction apiKeyConnectorInput(\n connectorId: string,\n spec: (typeof API_KEY_CONNECT)[string],\n key: string,\n scope: WebScope,\n): Record<string, unknown> {\n const name = credentialSafeName(`${spec.label} web builder`);\n return {\n name,\n description: `Custom connector for ${connectorId}`,\n extensionUuid: newUuid(),\n orgName: scope.orgName,\n projectId: scope.projectId,\n environmentTag: scope.environmentTagId,\n publisher: scope.orgName,\n connectorType: 'app',\n provider: {\n id: connectorId,\n name,\n title: name,\n description: `${spec.label} credential`,\n baseUrl: spec.baseUrl,\n providerUrl: '',\n logo: '',\n categories: ['other'],\n category: 'other',\n authMethods: ['api_key'],\n authorizationUrl: '',\n tokenUrl: '',\n revocationUrl: '',\n mcpUrl: '',\n scopes: '',\n clientAuthMethod: 'client_secret_post',\n useBasicAuth: false,\n useCustomOAuthEndpoints: false,\n usePKCE: false,\n color: '',\n iconName: 'AiOutlineApi',\n iconFontSize: 'large',\n enabled: true,\n fields: [\n {\n defaultValue: '',\n description: '',\n enumValues: '',\n genericType: 'api_key',\n iconType: '',\n isConfigField: true,\n isSecret: true,\n label: spec.field.label,\n name: spec.field.name,\n placeholder: '',\n placement: 'none',\n placementKey: '',\n readOnly: false,\n required: false,\n scope: 4,\n secretKey: spec.field.secretKey,\n secretType: 'ENVIRONMENT_VAR',\n type: 'string',\n uiWidget: 'password',\n },\n ],\n },\n values: { authMethod: 'api_key', [spec.field.name]: key.trim() },\n };\n}\n\n/** A project as the web services read it. */\nexport interface WebProjectRef {\n channelId: string;\n projectId?: string | null;\n sandboxId?: string | null;\n templateId?: string | null;\n}\n\nexport interface WebIntegrationsService {\n loadCatalog: () => Promise<IntegrationCatalogEntry[]>;\n /** The person's connections in this workspace; null when they can't be read. */\n loadConnections: () => Promise<IntegrationCredential[] | null>;\n connectUrl: (connectorId: string) => string | null;\n /** The project's saved integrations (server settings); null when they can't be read. */\n projectIntegrations: (channelId: string) => Promise<ProjectIntegration[] | null>;\n appTokenStatus: (project: WebProjectRef) => Promise<AppTokenStatus>;\n createAppToken: (project: WebProjectRef) => Promise<{ ok: boolean; message?: string }>;\n enableSiteBilling: (\n project: WebProjectRef,\n stripeCredentialId: string,\n ) => Promise<{ ok: boolean; message?: string }>;\n connectApiKey: (connectorId: string, key: string) => Promise<{ ok: boolean; message?: string }>;\n siteMail: {\n enable: (project: WebProjectRef, domain: string, notifyTo: string) => ReturnType<typeof enableSiteMail>;\n status: (project: WebProjectRef, diagnose?: boolean) => ReturnType<typeof siteMailStatus>;\n disable: (project: WebProjectRef) => ReturnType<typeof disableSiteMail>;\n };\n}\n\nexport interface WebServices {\n data: WebBuilderDataService;\n secrets: WebBuilderSecretsService;\n appSecrets: AppSecretsAdapter;\n integrations: WebIntegrationsService;\n sharing: WebBuilderSharingService;\n /** W31 comments pinned on the preview (web `services.comments`); an old server answers `outdated`. */\n comments: WebBuilderCommentsService;\n /** The person's own GitHub connection (web 0.20.0 Connect GitHub): status and paste-a-token. */\n githubConnect: GithubConnectService;\n /** The project's server settings (integrations, GitHub sync, database…); null when unreadable. */\n serverSettings: (channelId: string) => Promise<ServerProjectSettings | null>;\n /** Ask the server to take a build's cover: its preview is on screen and it has none (web 0.20.12). */\n requestCover: CoverRequester;\n /** The project's live site before a delete (web Phase 5 §7): a site, nothing published, or 'unknown'. */\n findPublishedSite: (channelId: string, known: KnownPublish) => Promise<SiteLookup>;\n}\n\nexport function createWebServices(opts: {\n transport: GraphqlTransport;\n scope: () => WebScope;\n appUrl?: string;\n /** The agent of the app's own plane (the build profile's CDECLI_AGENT_ENDPOINT). */\n agentUrl?: string;\n}): WebServices {\n const { transport, scope } = opts;\n const data = createDataService(transport);\n const secrets = createSecretsService({\n transport,\n data,\n store: new SecretsCredentialStore(null),\n scope: () => {\n const s = scope();\n return { orgName: s.orgName, project: s.projectId };\n },\n });\n const appSecrets = createAppSecretsAdapter(secrets);\n // The web helpers type `errors` as a plain array; the seam's is read-only (same values).\n const gql = <T>(query: string, variables: Record<string, unknown>) =>\n transport.mutate<T>(query, variables) as Promise<{ data?: T; errors?: Array<{ message: string }> }>;\n /** The project's secrets credential is recorded on its settings (web `settingsSync.update`). */\n const keepCredential = async (channelId: string, credentialId?: string | null) => {\n if (!credentialId) return;\n const s = await data.getSettings(channelId);\n if (s.ok && s.value?.secretsCredentialId !== credentialId) {\n await data.updateSettings(channelId, { secretsCredentialId: credentialId });\n }\n };\n let catalog: Promise<IntegrationCatalogEntry[]> | null = null;\n\n const integrations: WebIntegrationsService = {\n loadCatalog: async () => {\n if (!catalog) {\n catalog = transport\n .query<{ integrationConnectors?: unknown }>(INTEGRATION_CATALOG_QUERY, {})\n .then((r) => {\n if (r.errors?.length && !r.data?.integrationConnectors) {\n catalog = null;\n throw new Error(r.errors[0].message || \"Couldn't load the integrations.\");\n }\n return withBuiltInEntries(parseCatalog(r.data?.integrationConnectors));\n });\n }\n return catalog;\n },\n loadConnections: async () => {\n const s = scope();\n if (!s.orgName || !s.projectId) return null;\n const r = await transport.query<{ formBuilderCredentials?: { data?: unknown } }>(\n INTEGRATION_CREDENTIALS_QUERY,\n {\n filter: {\n orgName: s.orgName,\n projectId: s.projectId,\n ...(s.environmentTagId ? { environmentTag: s.environmentTagId } : {}),\n },\n limit: 200,\n },\n );\n if (r.errors?.length && !r.data?.formBuilderCredentials) return null;\n return parseCredentials(r.data?.formBuilderCredentials?.data);\n },\n connectUrl: (connectorId) =>\n opts.appUrl ? connectorConnectUrl(opts.appUrl, connectorId, scope().projectId) : null,\n projectIntegrations: async (channelId) => {\n const r = await transport.query<{ aiCodeProjectSettings?: unknown }>(PROJECT_SETTINGS_QUERY, { channelId });\n if (r.errors?.length && r.data?.aiCodeProjectSettings === undefined) return null;\n return parseServerProjectSettings(r.data?.aiCodeProjectSettings)?.integrations ?? [];\n },\n appTokenStatus: async (project) => {\n if (!project.channelId) return 'unavailable';\n try {\n return appTokenStatusFromNames(\n await appSecrets.listSecretNames({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n }),\n );\n } catch {\n return 'unavailable';\n }\n },\n createAppToken: async (project) => {\n if (!project.channelId) return { ok: false, message: 'Open a project first.' };\n const r = await mintAndStoreAppToken({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n scope: scope(),\n agentUrl: opts.agentUrl || SITE_AGENT_URL,\n secrets: appSecrets,\n gql,\n });\n // The web's result union, read without narrowing (native: no strict null checks).\n const minted = r as { ok: boolean; credentialId?: string; warning?: string; message?: string };\n if (!minted.ok) return { ok: false, message: minted.message };\n await keepCredential(project.channelId, minted.credentialId);\n return minted.warning ? { ok: true, message: minted.warning } : { ok: true };\n },\n enableSiteBilling: async (project, stripeCredentialId) => {\n if (!project.channelId) return { ok: false, message: 'Open a project first.' };\n const r = await enableSiteBilling({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n stripeCredentialId,\n secrets: appSecrets,\n gql,\n });\n const billed = r as { ok: boolean; credentialId?: string; message?: string };\n if (billed.ok) await keepCredential(project.channelId, billed.credentialId);\n return billed.ok ? { ok: true } : { ok: false, message: billed.message };\n },\n connectApiKey: async (connectorId, key) => {\n const spec = API_KEY_CONNECT[connectorId];\n if (!spec || !checkApiKey(connectorId, key).ok) {\n return { ok: false, message: `That doesn't look like a ${spec?.label ?? ''} secret key.` };\n }\n const s = scope();\n if (!s.orgName || !s.projectId || !s.environmentTagId) {\n return {\n ok: false,\n message: \"Can't tell which workspace to save the key in. Sign in again, then retry.\",\n };\n }\n const r = await transport.mutate<{\n createCustomConnectorExtension?: { credentialId?: string; message?: string };\n }>(CREATE_CUSTOM_CONNECTOR, { input: apiKeyConnectorInput(connectorId, spec, key, s) });\n const created = r.data?.createCustomConnectorExtension;\n if (!created?.credentialId) {\n return {\n ok: false,\n message: created?.message || r.errors?.[0]?.message || `${spec.label} couldn't be connected.`,\n };\n }\n return { ok: true };\n },\n siteMail: {\n enable: async (project, domain, notifyTo) => {\n const r = await enableSiteMail({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n domain,\n notifyTo,\n secrets: appSecrets,\n gql,\n });\n const mailed = r as { ok: boolean; credentialId?: string };\n if (mailed.ok) await keepCredential(project.channelId, mailed.credentialId);\n return r;\n },\n status: (project, diagnose) => siteMailStatus(gql, project.channelId, diagnose),\n disable: (project) => disableSiteMail(gql, project.channelId),\n },\n };\n\n // The web's sharing calls take one document runner: a mutation goes out as one, the rest as queries.\n const runDocument: GqlCall = (document, variables) =>\n /^\\s*mutation\\b/.test(document) ? transport.mutate(document, variables) : transport.query(document, variables);\n const sharing = createSharingService(runDocument);\n const comments = createCommentsService(runDocument);\n const requestCover = createCoverRequester(runDocument);\n\n const serverSettings = async (channelId: string) => {\n const r = await transport.query<{ aiCodeProjectSettings?: unknown }>(PROJECT_SETTINGS_QUERY, { channelId });\n if (r.errors?.length && r.data?.aiCodeProjectSettings === undefined) return null;\n return parseServerProjectSettings(r.data?.aiCodeProjectSettings);\n };\n\n const githubConnect = createGithubConnectService({\n transport,\n scope: () => {\n const s = scope();\n return { orgName: s.orgName, project: s.projectId };\n },\n currentUserId: () => sharing.currentUserId().catch(() => null),\n });\n\n const findPublishedSite = async (channelId: string, known: KnownPublish): Promise<SiteLookup> => {\n let name: string | null = null;\n let failed = false;\n try {\n // Ten seconds at most, as on the web: the delete waits on this.\n const r = await Promise.race([\n transport.query<{ aiCodeGetCloudflareProject?: string | null }>(CLOUDFLARE_PROJECT_QUERY, {\n channelId,\n }),\n new Promise<never>((_, reject) => {\n setTimeout(() => reject(new Error('timeout')), 10_000);\n }),\n ]);\n name = r.data?.aiCodeGetCloudflareProject || null;\n failed = !name && Boolean(r.errors?.length);\n } catch {\n failed = true;\n }\n // A failed lookup must not hide a live site: fall back to the live address, and with none say we\n // couldn't check ('unknown').\n return siteFromLookup({ name, failed }, known);\n };\n\n return {\n data,\n secrets,\n appSecrets,\n integrations,\n sharing,\n comments,\n githubConnect,\n serverSettings,\n requestCover,\n findPublishedSite,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA6BO,MAAM,cAAiB,GAAA;AAG9B,MAAM,uBAA0B,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G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AAA,CAAQ,EAAE,GAAA,CAAA,CAAA,MAAA,KAAF,mBAAU,MAAM,CAAA;AAAA,KACpC,CAAA,OAAA,CAAA,EAAA;AACN,MAAS,MAAA,GAAA,IAAA;AAAA;AAIX,IAAA,OAAO,cAAe,CAAA;AAAA,MACpB,IAAA;AAAA,MACA;AAAA,OACC,KAAK,CAAA;AAAA,GACV;AACA,EAAO,OAAA;AAAA,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,aAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA;AAAA,GACF;AACF"}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- import {Feature}from'@common-stack/client-react';import YantraMobileModule from'./module.js';export{default as Home}from'./screens/Home/index.js';export{default as NewChat}from'./screens/NewChat/index.js';export{default as Account}from'./screens/Account/index.js';export{default as ChatHistory}from'./screens/ChatHistory/index.js';export{default as Apps}from'./screens/Apps/index.js';export{default as WebBuilder}from'./screens/WebBuilder/index.js';export{GatewayContextProvider,useGatewayContext}from'./contexts/GatewayContext.js';export{CdecliConnectionProvider}from'./contexts/CdecliConnectionContext.js';export{ChatLiveStreamEngine}from'./contexts/ChatLiveStreamContext.js';export{MemoryPressureResponder}from'./features/memory/MemoryPressureResponder.js';export{BUILTIN_MOBILE_GATEWAYS,MAX_CONCURRENT_TASKS,STORAGE_KEYS}from'./config/constants.js';export{config}from'./config/env-config.js';export{useCdecliAutoConnect}from'./hooks/useCdecliAutoConnect.js';export{useObtainSystemToken}from'./hooks/useObtainSystemToken.js';export{mintSurfaceSystemToken,resolveSurfaceCatalogBackend}from'./hooks/mintSurfaceSystemToken.js';export{buildCdecliTokenInjection,buildSurfaceGateRecoveryScript}from'./hooks/surfaceHandoffScript.js';export{isInstanceNotFoundError,useGatewayConnection}from'./hooks/useGatewayConnection.js';export{usePrerequisiteIds}from'./hooks/usePrerequisiteIds.js';export{useWorkspaceProvisioner}from'./hooks/useWorkspaceProvisioner.js';export{useGatewayRegistry}from'./hooks/useGatewayRegistry.js';export{agentSessionManager}from'./services/agentSessionManager.js';export{ensureGatewayApiKeys,resetGatewayApiKeyBridge}from'./services/gatewayApiKeyBridge.js';export{GatewayClient}from'./services/gatewayClient.js';export{BRIDGE_PROTOCOL_VERSION,BRIDGE_READY_ACTION,DEFAULT_BRIDGE_TIMEOUT_MS,DEFAULT_CHUNK_SIZE,MessageType}from'./bridge/types.js';export{WebViewManager}from'./bridge/WebViewManager.js';export{NativeWebViewBridge}from'./bridge/NativeWebViewBridge.js';export{TypedBridge}from'./bridge/TypedBridge.js';export{CancellableRequest}from'./bridge/CancellableRequest.js';export{ChunkedMessageHandler}from'./bridge/ChunkedMessageHandler.js';export{BridgeDebugger}from'./bridge/BridgeDebugger.js';export{WEB_BRIDGE_BOOTSTRAP}from'./bridge/webBridgeBootstrap.js';export{AuthenticatedFetch}from'./bridge/AuthenticatedFetch.js';export{AuthBridgeHandler}from'./bridge/handlers/AuthBridgeHandler.js';export{NavigationBridgeHandler}from'./bridge/handlers/NavigationBridgeHandler.js';export{AnalyticsBridgeHandler}from'./bridge/handlers/AnalyticsBridgeHandler.js';export{SURFACE_HOST_ACTIONS,SurfaceHostBridgeHandler}from'./bridge/handlers/SurfaceHostBridgeHandler.js';export{classifySurfaceNavigation}from'./bridge/surfaceLinkRouting.js';export{getPackagerHost,resolveMobileWebUrl}from'./bridge/resolveMobileWebUrl.js';export{YANTRA_LOADER_SIZE_COMPACT,YANTRA_LOADER_SIZE_DEFAULT,YantraBrandLoader}from'./components/YantraBrandLoader.js';export{default as CustomDrawer}from'./components/CustomDrawer.js';export{AppThemeProvider,useAppTheme}from'./theme/AppThemeProvider.js';export{InviteDeepLink}from'./features/invite/InviteDeepLink.js';export{ChatInviteDeepLink}from'./features/messaging/ChatInviteDeepLink.js';export{HealthSyncRunner}from'./features/health/HealthSyncRunner.js';export{startHealthBackgroundSync}from'./features/health/backgroundSync.js';export{FitnessWidgetRunner}from'./features/fitness-widgets/FitnessWidgetRunner.js';export{FitnessDeepLink}from'./features/fitness-widgets/FitnessDeepLink.js';export{TaskActivityRunner}from'./features/task-activity/TaskActivityRunner.js';export{inviteTokenFromUrl,isInviteUrl}from'./features/invite/inviteLink.js';export{isKeyboardControllerAvailable}from'./utils/keyboardController.js';export{getNativeCanvasExperience,getNativeCanvasViewer,preloadNativeCanvasExperience,registerCanvasExperiencePreload,registerNativeCanvasExperience,registerNativeCanvasViewer}from'./features/canvas/nativeViewerRegistry.js';export{getNativeCharactersExperience,registerNativeCharactersExperience}from'./features/characters/nativeCharactersRegistry.js';export{getNativeChatExperience,registerNativeChatExperience}from'./features/messaging/nativeChatRegistry.js';export{forgetChatPushToken,rememberChatPushToken}from'./features/messaging/chatPushToken.js';export{registerGameNotifications}from'./features/games/gameNotifications.js';export{inviteCodeInPush}from'./features/games/gameInvite.js';export{CHAT_NOTIFICATION_CONFIG_KEY,CHAT_NOTIFICATION_KEYS,chatPrefsFromSettings}from'./features/messaging/chatNotificationPrefs.js';export{settingsUriForAccount}from'./utils/cdecodeUri.js';export{getNativeShoppingExperience,preloadNativeShoppingExperience,registerNativeShoppingExperience,registerShoppingExperiencePreload}from'./features/shopping/nativeShoppingRegistry.js';export{getNativeTravelExperience,preloadNativeTravelExperience,registerNativeTravelExperience,registerTravelExperiencePreload}from'./features/travel/nativeTravelRegistry.js';export{getNativeJobSearchExperience,preloadNativeJobSearchExperience,registerJobSearchExperiencePreload,registerNativeJobSearchExperience}from'./features/job-search/nativeJobSearchRegistry.js';export{getNativeResumeExperience,preloadNativeResumeExperience,registerNativeResumeExperience,registerResumeExperiencePreload}from'./features/resume/nativeResumeRegistry.js';export{getNativeInboxExperience,preloadNativeInboxExperience,registerInboxExperiencePreload,registerNativeInboxExperience}from'./features/inbox/nativeInboxRegistry.js';export{getNativeStudyExperience,preloadNativeStudyExperience,registerNativeStudyExperience,registerStudyExperiencePreload}from'./features/study/nativeStudyRegistry.js';export{getNativeLocalServicesExperience,preloadNativeLocalServicesExperience,registerLocalServicesExperiencePreload,registerNativeLocalServicesExperience}from'./features/local-services/nativeLocalServicesRegistry.js';export{getNativeMoviesExperience,preloadNativeMoviesExperience,registerMoviesExperiencePreload,registerNativeMoviesExperience}from'./features/movies/nativeMoviesRegistry.js';export{getNativeExpensesExperience,preloadNativeExpensesExperience,registerExpensesExperiencePreload,registerNativeExpensesExperience}from'./features/expenses/nativeExpensesRegistry.js';export{getNativeWebBuilderExperience,preloadNativeWebBuilderExperience,registerNativeWebBuilderExperience,registerWebBuilderExperiencePreload}from'./features/webbuilder/nativeWebBuilderRegistry.js';export{NativeAgentChat}from'./features/agent-chat/NativeAgentChat.js';export{ChatLinkOpenerProvider}from'./features/links/ChatLinkOpenerProvider.js';export{FreeCreditsPhoneStepHost}from'./features/credits/FreeCreditsPhoneStepHost.js';export{askForVerifiedPhone,endPhoneStep}from'./features/credits/freeCreditsPhoneStep.js';export{useCdecliConnection}from'./contexts/cdecliConnection.js';export{resolveSurfaceAuthGraphqlUrl}from'./hooks/resolveSurfaceAuthGraphqlUrl.js';var index = new Feature(YantraMobileModule);export{index as default};//# sourceMappingURL=index.js.map
1
+ import {Feature}from'@common-stack/client-react';import YantraMobileModule from'./module.js';export{default as Home}from'./screens/Home/index.js';export{default as NewChat}from'./screens/NewChat/index.js';export{default as Account}from'./screens/Account/index.js';export{default as ChatHistory}from'./screens/ChatHistory/index.js';export{default as Apps}from'./screens/Apps/index.js';export{default as WebBuilder}from'./screens/WebBuilder/index.js';export{GatewayContextProvider,useGatewayContext}from'./contexts/GatewayContext.js';export{CdecliConnectionProvider}from'./contexts/CdecliConnectionContext.js';export{ChatLiveStreamEngine}from'./contexts/ChatLiveStreamContext.js';export{MemoryPressureResponder}from'./features/memory/MemoryPressureResponder.js';export{BUILTIN_MOBILE_GATEWAYS,MAX_CONCURRENT_TASKS,STORAGE_KEYS}from'./config/constants.js';export{config}from'./config/env-config.js';export{useCdecliAutoConnect}from'./hooks/useCdecliAutoConnect.js';export{useObtainSystemToken}from'./hooks/useObtainSystemToken.js';export{mintSurfaceSystemToken,resolveSurfaceCatalogBackend}from'./hooks/mintSurfaceSystemToken.js';export{buildCdecliTokenInjection,buildSurfaceGateRecoveryScript}from'./hooks/surfaceHandoffScript.js';export{isInstanceNotFoundError,useGatewayConnection}from'./hooks/useGatewayConnection.js';export{usePrerequisiteIds}from'./hooks/usePrerequisiteIds.js';export{useWorkspaceProvisioner}from'./hooks/useWorkspaceProvisioner.js';export{useGatewayRegistry}from'./hooks/useGatewayRegistry.js';export{agentSessionManager}from'./services/agentSessionManager.js';export{ensureGatewayApiKeys,resetGatewayApiKeyBridge}from'./services/gatewayApiKeyBridge.js';export{GatewayClient}from'./services/gatewayClient.js';export{BRIDGE_PROTOCOL_VERSION,BRIDGE_READY_ACTION,DEFAULT_BRIDGE_TIMEOUT_MS,DEFAULT_CHUNK_SIZE,MessageType}from'./bridge/types.js';export{WebViewManager}from'./bridge/WebViewManager.js';export{NativeWebViewBridge}from'./bridge/NativeWebViewBridge.js';export{TypedBridge}from'./bridge/TypedBridge.js';export{CancellableRequest}from'./bridge/CancellableRequest.js';export{ChunkedMessageHandler}from'./bridge/ChunkedMessageHandler.js';export{BridgeDebugger}from'./bridge/BridgeDebugger.js';export{WEB_BRIDGE_BOOTSTRAP}from'./bridge/webBridgeBootstrap.js';export{AuthenticatedFetch}from'./bridge/AuthenticatedFetch.js';export{AuthBridgeHandler}from'./bridge/handlers/AuthBridgeHandler.js';export{NavigationBridgeHandler}from'./bridge/handlers/NavigationBridgeHandler.js';export{AnalyticsBridgeHandler}from'./bridge/handlers/AnalyticsBridgeHandler.js';export{SURFACE_HOST_ACTIONS,SurfaceHostBridgeHandler}from'./bridge/handlers/SurfaceHostBridgeHandler.js';export{classifySurfaceNavigation}from'./bridge/surfaceLinkRouting.js';export{getPackagerHost,resolveMobileWebUrl}from'./bridge/resolveMobileWebUrl.js';export{YANTRA_LOADER_SIZE_COMPACT,YANTRA_LOADER_SIZE_DEFAULT,YantraBrandLoader}from'./components/YantraBrandLoader.js';export{default as CustomDrawer}from'./components/CustomDrawer.js';export{AppThemeProvider,useAppTheme}from'./theme/AppThemeProvider.js';export{InviteDeepLink}from'./features/invite/InviteDeepLink.js';export{ChatInviteDeepLink}from'./features/messaging/ChatInviteDeepLink.js';export{HealthSyncRunner}from'./features/health/HealthSyncRunner.js';export{startHealthBackgroundSync}from'./features/health/backgroundSync.js';export{FitnessWidgetRunner}from'./features/fitness-widgets/FitnessWidgetRunner.js';export{FitnessDeepLink}from'./features/fitness-widgets/FitnessDeepLink.js';export{TaskActivityRunner}from'./features/task-activity/TaskActivityRunner.js';export{inviteTokenFromUrl,isInviteUrl}from'./features/invite/inviteLink.js';export{isKeyboardControllerAvailable}from'./utils/keyboardController.js';export{getNativeCanvasExperience,getNativeCanvasViewer,preloadNativeCanvasExperience,registerCanvasExperiencePreload,registerNativeCanvasExperience,registerNativeCanvasViewer}from'./features/canvas/nativeViewerRegistry.js';export{getNativeCharactersExperience,registerNativeCharactersExperience}from'./features/characters/nativeCharactersRegistry.js';export{getNativeChatExperience,registerNativeChatExperience}from'./features/messaging/nativeChatRegistry.js';export{forgetChatPushToken,rememberChatPushToken}from'./features/messaging/chatPushToken.js';export{registerGameNotifications}from'./features/games/gameNotifications.js';export{inviteCodeInPush}from'./features/games/gameInvite.js';export{CHAT_NOTIFICATION_CONFIG_KEY,CHAT_NOTIFICATION_KEYS,chatPrefsFromSettings}from'./features/messaging/chatNotificationPrefs.js';export{settingsUriForAccount}from'./utils/cdecodeUri.js';export{getNativeShoppingExperience,preloadNativeShoppingExperience,registerNativeShoppingExperience,registerShoppingExperiencePreload}from'./features/shopping/nativeShoppingRegistry.js';export{getNativeTravelExperience,preloadNativeTravelExperience,registerNativeTravelExperience,registerTravelExperiencePreload}from'./features/travel/nativeTravelRegistry.js';export{getNativeJobSearchExperience,preloadNativeJobSearchExperience,registerJobSearchExperiencePreload,registerNativeJobSearchExperience}from'./features/job-search/nativeJobSearchRegistry.js';export{getNativeResumeExperience,preloadNativeResumeExperience,registerNativeResumeExperience,registerResumeExperiencePreload}from'./features/resume/nativeResumeRegistry.js';export{getNativeInboxExperience,preloadNativeInboxExperience,registerInboxExperiencePreload,registerNativeInboxExperience}from'./features/inbox/nativeInboxRegistry.js';export{getNativeStudyExperience,preloadNativeStudyExperience,registerNativeStudyExperience,registerStudyExperiencePreload}from'./features/study/nativeStudyRegistry.js';export{getNativeLocalServicesExperience,preloadNativeLocalServicesExperience,registerLocalServicesExperiencePreload,registerNativeLocalServicesExperience}from'./features/local-services/nativeLocalServicesRegistry.js';export{getNativeMoviesExperience,preloadNativeMoviesExperience,registerMoviesExperiencePreload,registerNativeMoviesExperience}from'./features/movies/nativeMoviesRegistry.js';export{getNativeExpensesExperience,preloadNativeExpensesExperience,registerExpensesExperiencePreload,registerNativeExpensesExperience}from'./features/expenses/nativeExpensesRegistry.js';export{getNativeTeamChatExperience,preloadNativeTeamChatExperience,registerNativeTeamChatExperience,registerTeamChatExperiencePreload}from'./features/team-chat/nativeTeamChatRegistry.js';export{getNativeWebBuilderExperience,preloadNativeWebBuilderExperience,registerNativeWebBuilderExperience,registerWebBuilderExperiencePreload}from'./features/webbuilder/nativeWebBuilderRegistry.js';export{NativeAgentChat}from'./features/agent-chat/NativeAgentChat.js';export{ChatLinkOpenerProvider}from'./features/links/ChatLinkOpenerProvider.js';export{FreeCreditsPhoneStepHost}from'./features/credits/FreeCreditsPhoneStepHost.js';export{askForVerifiedPhone,endPhoneStep}from'./features/credits/freeCreditsPhoneStep.js';export{useCdecliConnection}from'./contexts/cdecliConnection.js';export{resolveSurfaceAuthGraphqlUrl}from'./hooks/resolveSurfaceAuthGraphqlUrl.js';var index = new Feature(YantraMobileModule);export{index as default};//# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { Feature } from '@common-stack/client-react';\nimport YantraMobileModule from './module';\n\nexport default new Feature(YantraMobileModule);\nexport * from './screens';\nexport { GatewayContextProvider, useGatewayContext } from './contexts/GatewayContext';\nexport { CdecliConnectionProvider, useCdecliConnection } from './contexts/CdecliConnectionContext';\nexport { ChatLiveStreamEngine } from './contexts/ChatLiveStreamContext';\nexport { MemoryPressureResponder } from './features/memory/MemoryPressureResponder';\nexport * from './config/constants';\nexport { config } from './config/env-config';\nexport { useCdecliAutoConnect } from './hooks/useCdecliAutoConnect';\nexport { useObtainSystemToken } from './hooks/useObtainSystemToken';\nexport {\n mintSurfaceSystemToken,\n resolveSurfaceCatalogBackend,\n resolveSurfaceAuthGraphqlUrl,\n} from './hooks/mintSurfaceSystemToken';\nexport { buildCdecliTokenInjection, buildSurfaceGateRecoveryScript } from './hooks/surfaceHandoffScript';\nexport { useGatewayConnection, isInstanceNotFoundError } from './hooks/useGatewayConnection';\nexport { usePrerequisiteIds } from './hooks/usePrerequisiteIds';\nexport { useWorkspaceProvisioner } from './hooks/useWorkspaceProvisioner';\nexport { useGatewayRegistry } from './hooks/useGatewayRegistry';\nexport * from './services';\nexport * from './bridge';\nexport {\n YantraBrandLoader,\n YANTRA_LOADER_SIZE_DEFAULT,\n YANTRA_LOADER_SIZE_COMPACT,\n} from './components/YantraBrandLoader';\nexport { default as CustomDrawer } from './components/CustomDrawer';\nexport { AppThemeProvider, useAppTheme } from './theme/AppThemeProvider';\n// Invite deep links. Mounted by the app at the root (see portable-devices/mobile\n// App.tsx) rather than routed to: the invitee has neither an org nor a session,\n// and every mobile route requires both.\nexport { InviteDeepLink } from './features/invite/InviteDeepLink';\nexport { ChatInviteDeepLink } from './features/messaging/ChatInviteDeepLink';\n// Apple Health / Health Connect sync. Mounted at the app root like the invite\n// handlers: it syncs on every return to the foreground, whatever screen is open.\nexport { HealthSyncRunner } from './features/health/HealthSyncRunner';\n// Apple Health while the app is closed: started once at launch, before anything renders.\nexport { startHealthBackgroundSync } from './features/health/backgroundSync';\n// Fitness widgets (iOS): keeps the home / lock screen snapshot fresh, and opens the\n// Fitness surface when a widget or the workout Live Activity is tapped. Both at the root.\nexport { FitnessWidgetRunner } from './features/fitness-widgets/FitnessWidgetRunner';\nexport { FitnessDeepLink } from './features/fitness-widgets/FitnessDeepLink';\n// The chat task Live Activity (iOS): a running reply or Deep Search on the lock screen\n// and in the Dynamic Island, and its tap opening the conversation. At the root.\nexport { TaskActivityRunner } from './features/task-activity/TaskActivityRunner';\nexport { inviteTokenFromUrl, isInviteUrl } from './features/invite/inviteLink';\nexport { isKeyboardControllerAvailable } from './utils/keyboardController';\n// The canvas viewer seam. Exported from the index on purpose: the app (the MF\n// host) registers the federated viewer here and the CanvasBoard screen reads\n// it. Reachability from this entry is what makes rollup emit the registry as a\n// real shared module - as an internal-only file, `registerNativeCanvasViewer`\n// is never called inside the package, so rollup tree-shakes it and constant-\n// folds the screen down to its fallback branch.\nexport {\n registerNativeCanvasViewer,\n getNativeCanvasViewer,\n registerNativeCanvasExperience,\n getNativeCanvasExperience,\n registerCanvasExperiencePreload,\n preloadNativeCanvasExperience,\n} from './features/canvas/nativeViewerRegistry';\n// Characters seam - same reachability contract as the canvas registry above.\nexport {\n registerNativeCharactersExperience,\n getNativeCharactersExperience,\n} from './features/characters/nativeCharactersRegistry';\n// Chat seam - same reachability contract as the two registries above.\nexport { registerNativeChatExperience, getNativeChatExperience } from './features/messaging/nativeChatRegistry';\n// Chat push + notification preferences: the app (which owns expo-notifications and the\n// settings session) registers the token and serves the preferences through these.\nexport { rememberChatPushToken, forgetChatPushToken } from './features/messaging/chatPushToken';\nexport { registerGameNotifications } from './features/games/gameNotifications';\nexport { inviteCodeInPush } from './features/games/gameInvite';\nexport {\n CHAT_NOTIFICATION_CONFIG_KEY,\n CHAT_NOTIFICATION_KEYS,\n chatPrefsFromSettings,\n} from './features/messaging/chatNotificationPrefs';\nexport { settingsUriForAccount } from './utils/cdecodeUri';\nexport {\n registerNativeShoppingExperience,\n getNativeShoppingExperience,\n registerShoppingExperiencePreload,\n preloadNativeShoppingExperience,\n} from './features/shopping/nativeShoppingRegistry';\nexport type { ShoppingExperienceProps } from './features/shopping/ShoppingExperience';\nexport type { ShoppingHostChat } from './features/shopping/hostChat';\nexport {\n registerNativeTravelExperience,\n getNativeTravelExperience,\n registerTravelExperiencePreload,\n preloadNativeTravelExperience,\n} from './features/travel/nativeTravelRegistry';\nexport type { TravelExperienceProps } from './features/travel/TravelExperience';\nexport type { TravelHostChat } from './features/travel/hostChat';\nexport {\n registerNativeJobSearchExperience,\n getNativeJobSearchExperience,\n registerJobSearchExperiencePreload,\n preloadNativeJobSearchExperience,\n} from './features/job-search/nativeJobSearchRegistry';\nexport type { JobSearchExperienceProps } from './features/job-search/JobSearchExperience';\nexport type { JobSearchHostChat } from './features/job-search/hostChat';\nexport {\n registerNativeResumeExperience,\n getNativeResumeExperience,\n registerResumeExperiencePreload,\n preloadNativeResumeExperience,\n} from './features/resume/nativeResumeRegistry';\nexport type { ResumeExperienceProps } from './features/resume/ResumeExperience';\nexport type { ResumeHostChat } from './features/resume/hostChat';\nexport {\n registerNativeInboxExperience,\n getNativeInboxExperience,\n registerInboxExperiencePreload,\n preloadNativeInboxExperience,\n} from './features/inbox/nativeInboxRegistry';\nexport type { InboxExperienceProps } from './features/inbox/InboxExperience';\nexport type { InboxHostChat } from './features/inbox/hostChat';\nexport {\n registerNativeStudyExperience,\n getNativeStudyExperience,\n registerStudyExperiencePreload,\n preloadNativeStudyExperience,\n} from './features/study/nativeStudyRegistry';\nexport type { StudyExperienceProps } from './features/study/StudyExperience';\nexport type { StudyHostChat } from './features/study/hostChat';\nexport {\n registerNativeLocalServicesExperience,\n getNativeLocalServicesExperience,\n registerLocalServicesExperiencePreload,\n preloadNativeLocalServicesExperience,\n} from './features/local-services/nativeLocalServicesRegistry';\nexport type { LocalServicesExperienceProps } from './features/local-services/LocalServicesExperience';\nexport type { LocalServicesHostChat } from './features/local-services/hostChat';\nexport {\n registerNativeMoviesExperience,\n getNativeMoviesExperience,\n registerMoviesExperiencePreload,\n preloadNativeMoviesExperience,\n} from './features/movies/nativeMoviesRegistry';\nexport type { MoviesExperienceProps } from './features/movies/MoviesExperience';\nexport type { MoviesHostChat } from './features/movies/hostChat';\nexport {\n registerNativeExpensesExperience,\n getNativeExpensesExperience,\n registerExpensesExperiencePreload,\n preloadNativeExpensesExperience,\n} from './features/expenses/nativeExpensesRegistry';\nexport type { ExpensesExperienceProps } from './features/expenses/ExpensesExperience';\nexport type { ExpensesHostChat } from './features/expenses/hostChat';\nexport {\n registerNativeWebBuilderExperience,\n getNativeWebBuilderExperience,\n registerWebBuilderExperiencePreload,\n preloadNativeWebBuilderExperience,\n} from './features/webbuilder/nativeWebBuilderRegistry';\nexport type { WebBuilderExperienceProps } from './features/webbuilder/WebBuilderExperience';\nexport type { WebBuilderHostChat } from './features/webbuilder/hostChat';\nexport { NativeAgentChat } from './features/agent-chat';\nexport { ChatLinkOpenerProvider } from './features/links/ChatLinkOpenerProvider';\nexport { FreeCreditsPhoneStepHost } from './features/credits/FreeCreditsPhoneStepHost';\n// The same sheet's ask, for the app to hand the billing module's checkout (registerCheckoutPhoneStep).\nexport { askForVerifiedPhone, endPhoneStep } from './features/credits/freeCreditsPhoneStep';\nexport type { PhoneStepCopy, PhoneStepOutcome } from './features/credits/freeCreditsPhoneStep';\nexport type { AgentChatMessage, AgentChatSuggestion, NativeAgentChatProps } from './features/agent-chat';\nexport type {\n ChatHostServices,\n ChatViewer,\n FederatedChatProps,\n NativeChatExperienceProps,\n} from './features/messaging/chatHost';\n"],"names":[],"mappings":"iyNAEA,YAAe,IAAI,QAAQ,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { Feature } from '@common-stack/client-react';\nimport YantraMobileModule from './module';\n\nexport default new Feature(YantraMobileModule);\nexport * from './screens';\nexport { GatewayContextProvider, useGatewayContext } from './contexts/GatewayContext';\nexport { CdecliConnectionProvider, useCdecliConnection } from './contexts/CdecliConnectionContext';\nexport { ChatLiveStreamEngine } from './contexts/ChatLiveStreamContext';\nexport { MemoryPressureResponder } from './features/memory/MemoryPressureResponder';\nexport * from './config/constants';\nexport { config } from './config/env-config';\nexport { useCdecliAutoConnect } from './hooks/useCdecliAutoConnect';\nexport { useObtainSystemToken } from './hooks/useObtainSystemToken';\nexport {\n mintSurfaceSystemToken,\n resolveSurfaceCatalogBackend,\n resolveSurfaceAuthGraphqlUrl,\n} from './hooks/mintSurfaceSystemToken';\nexport { buildCdecliTokenInjection, buildSurfaceGateRecoveryScript } from './hooks/surfaceHandoffScript';\nexport { useGatewayConnection, isInstanceNotFoundError } from './hooks/useGatewayConnection';\nexport { usePrerequisiteIds } from './hooks/usePrerequisiteIds';\nexport { useWorkspaceProvisioner } from './hooks/useWorkspaceProvisioner';\nexport { useGatewayRegistry } from './hooks/useGatewayRegistry';\nexport * from './services';\nexport * from './bridge';\nexport {\n YantraBrandLoader,\n YANTRA_LOADER_SIZE_DEFAULT,\n YANTRA_LOADER_SIZE_COMPACT,\n} from './components/YantraBrandLoader';\nexport { default as CustomDrawer } from './components/CustomDrawer';\nexport { AppThemeProvider, useAppTheme } from './theme/AppThemeProvider';\n// Invite deep links. Mounted by the app at the root (see portable-devices/mobile\n// App.tsx) rather than routed to: the invitee has neither an org nor a session,\n// and every mobile route requires both.\nexport { InviteDeepLink } from './features/invite/InviteDeepLink';\nexport { ChatInviteDeepLink } from './features/messaging/ChatInviteDeepLink';\n// Apple Health / Health Connect sync. Mounted at the app root like the invite\n// handlers: it syncs on every return to the foreground, whatever screen is open.\nexport { HealthSyncRunner } from './features/health/HealthSyncRunner';\n// Apple Health while the app is closed: started once at launch, before anything renders.\nexport { startHealthBackgroundSync } from './features/health/backgroundSync';\n// Fitness widgets (iOS): keeps the home / lock screen snapshot fresh, and opens the\n// Fitness surface when a widget or the workout Live Activity is tapped. Both at the root.\nexport { FitnessWidgetRunner } from './features/fitness-widgets/FitnessWidgetRunner';\nexport { FitnessDeepLink } from './features/fitness-widgets/FitnessDeepLink';\n// The chat task Live Activity (iOS): a running reply or Deep Search on the lock screen\n// and in the Dynamic Island, and its tap opening the conversation. At the root.\nexport { TaskActivityRunner } from './features/task-activity/TaskActivityRunner';\nexport { inviteTokenFromUrl, isInviteUrl } from './features/invite/inviteLink';\nexport { isKeyboardControllerAvailable } from './utils/keyboardController';\n// The canvas viewer seam. Exported from the index on purpose: the app (the MF\n// host) registers the federated viewer here and the CanvasBoard screen reads\n// it. Reachability from this entry is what makes rollup emit the registry as a\n// real shared module - as an internal-only file, `registerNativeCanvasViewer`\n// is never called inside the package, so rollup tree-shakes it and constant-\n// folds the screen down to its fallback branch.\nexport {\n registerNativeCanvasViewer,\n getNativeCanvasViewer,\n registerNativeCanvasExperience,\n getNativeCanvasExperience,\n registerCanvasExperiencePreload,\n preloadNativeCanvasExperience,\n} from './features/canvas/nativeViewerRegistry';\n// Characters seam - same reachability contract as the canvas registry above.\nexport {\n registerNativeCharactersExperience,\n getNativeCharactersExperience,\n} from './features/characters/nativeCharactersRegistry';\n// Chat seam - same reachability contract as the two registries above.\nexport { registerNativeChatExperience, getNativeChatExperience } from './features/messaging/nativeChatRegistry';\n// Chat push + notification preferences: the app (which owns expo-notifications and the\n// settings session) registers the token and serves the preferences through these.\nexport { rememberChatPushToken, forgetChatPushToken } from './features/messaging/chatPushToken';\nexport { registerGameNotifications } from './features/games/gameNotifications';\nexport { inviteCodeInPush } from './features/games/gameInvite';\nexport {\n CHAT_NOTIFICATION_CONFIG_KEY,\n CHAT_NOTIFICATION_KEYS,\n chatPrefsFromSettings,\n} from './features/messaging/chatNotificationPrefs';\nexport { settingsUriForAccount } from './utils/cdecodeUri';\nexport {\n registerNativeShoppingExperience,\n getNativeShoppingExperience,\n registerShoppingExperiencePreload,\n preloadNativeShoppingExperience,\n} from './features/shopping/nativeShoppingRegistry';\nexport type { ShoppingExperienceProps } from './features/shopping/ShoppingExperience';\nexport type { ShoppingHostChat } from './features/shopping/hostChat';\nexport {\n registerNativeTravelExperience,\n getNativeTravelExperience,\n registerTravelExperiencePreload,\n preloadNativeTravelExperience,\n} from './features/travel/nativeTravelRegistry';\nexport type { TravelExperienceProps } from './features/travel/TravelExperience';\nexport type { TravelHostChat } from './features/travel/hostChat';\nexport {\n registerNativeJobSearchExperience,\n getNativeJobSearchExperience,\n registerJobSearchExperiencePreload,\n preloadNativeJobSearchExperience,\n} from './features/job-search/nativeJobSearchRegistry';\nexport type { JobSearchExperienceProps } from './features/job-search/JobSearchExperience';\nexport type { JobSearchHostChat } from './features/job-search/hostChat';\nexport {\n registerNativeResumeExperience,\n getNativeResumeExperience,\n registerResumeExperiencePreload,\n preloadNativeResumeExperience,\n} from './features/resume/nativeResumeRegistry';\nexport type { ResumeExperienceProps } from './features/resume/ResumeExperience';\nexport type { ResumeHostChat } from './features/resume/hostChat';\nexport {\n registerNativeInboxExperience,\n getNativeInboxExperience,\n registerInboxExperiencePreload,\n preloadNativeInboxExperience,\n} from './features/inbox/nativeInboxRegistry';\nexport type { InboxExperienceProps } from './features/inbox/InboxExperience';\nexport type { InboxHostChat } from './features/inbox/hostChat';\nexport {\n registerNativeStudyExperience,\n getNativeStudyExperience,\n registerStudyExperiencePreload,\n preloadNativeStudyExperience,\n} from './features/study/nativeStudyRegistry';\nexport type { StudyExperienceProps } from './features/study/StudyExperience';\nexport type { StudyHostChat } from './features/study/hostChat';\nexport {\n registerNativeLocalServicesExperience,\n getNativeLocalServicesExperience,\n registerLocalServicesExperiencePreload,\n preloadNativeLocalServicesExperience,\n} from './features/local-services/nativeLocalServicesRegistry';\nexport type { LocalServicesExperienceProps } from './features/local-services/LocalServicesExperience';\nexport type { LocalServicesHostChat } from './features/local-services/hostChat';\nexport {\n registerNativeMoviesExperience,\n getNativeMoviesExperience,\n registerMoviesExperiencePreload,\n preloadNativeMoviesExperience,\n} from './features/movies/nativeMoviesRegistry';\nexport type { MoviesExperienceProps } from './features/movies/MoviesExperience';\nexport type { MoviesHostChat } from './features/movies/hostChat';\nexport {\n registerNativeExpensesExperience,\n getNativeExpensesExperience,\n registerExpensesExperiencePreload,\n preloadNativeExpensesExperience,\n} from './features/expenses/nativeExpensesRegistry';\nexport type { ExpensesExperienceProps } from './features/expenses/ExpensesExperience';\nexport type { ExpensesHostChat } from './features/expenses/hostChat';\nexport {\n registerNativeTeamChatExperience,\n getNativeTeamChatExperience,\n registerTeamChatExperiencePreload,\n preloadNativeTeamChatExperience,\n} from './features/team-chat/nativeTeamChatRegistry';\nexport type { TeamChatExperienceProps } from './features/team-chat/TeamChatExperience';\nexport {\n registerNativeWebBuilderExperience,\n getNativeWebBuilderExperience,\n registerWebBuilderExperiencePreload,\n preloadNativeWebBuilderExperience,\n} from './features/webbuilder/nativeWebBuilderRegistry';\nexport type { WebBuilderExperienceProps } from './features/webbuilder/WebBuilderExperience';\nexport type { WebBuilderHostChat } from './features/webbuilder/hostChat';\nexport { NativeAgentChat } from './features/agent-chat';\nexport { ChatLinkOpenerProvider } from './features/links/ChatLinkOpenerProvider';\nexport { FreeCreditsPhoneStepHost } from './features/credits/FreeCreditsPhoneStepHost';\n// The same sheet's ask, for the app to hand the billing module's checkout (registerCheckoutPhoneStep).\nexport { askForVerifiedPhone, endPhoneStep } from './features/credits/freeCreditsPhoneStep';\nexport type { PhoneStepCopy, PhoneStepOutcome } from './features/credits/freeCreditsPhoneStep';\nexport type { AgentChatMessage, AgentChatSuggestion, NativeAgentChatProps } from './features/agent-chat';\nexport type {\n ChatHostServices,\n ChatViewer,\n FederatedChatProps,\n NativeChatExperienceProps,\n} from './features/messaging/chatHost';\n"],"names":[],"mappings":"49NAEA,YAAe,IAAI,QAAQ,kBAAkB,CAAA"}
package/lib/routes.json CHANGED
@@ -572,6 +572,61 @@
572
572
  "hasComponent": true
573
573
  }
574
574
  },
575
+ {
576
+ "/:orgName/l/team-chat": {
577
+ "key": "team-chat",
578
+ "path": "/:orgName/l/team-chat",
579
+ "name": "TeamChat",
580
+ "exact": true,
581
+ "priority": 3,
582
+ "hideInMenu": true,
583
+ "auth": true,
584
+ "menu_position": "side",
585
+ "importPaths": {
586
+ "navigationHeader": "@adminide-stack/yantra-mobile/lib/components/NavigationHeader/NavigationHeader.js"
587
+ },
588
+ "customHeader": {
589
+ "name": "NavigationHeader",
590
+ "component": "$.importPaths.navigationHeader",
591
+ "props": {
592
+ "showTitle": true,
593
+ "showToggle": true,
594
+ "showFilter": false,
595
+ "isSearchBack": false,
596
+ "showBack": false,
597
+ "showGateway": false,
598
+ "showApps": false,
599
+ "showHistory": false,
600
+ "showNewChat": false
601
+ }
602
+ },
603
+ "props": {
604
+ "initialParams": {
605
+ "orgName": null,
606
+ "hideNavigationHeader": true
607
+ },
608
+ "options": {
609
+ "title": "Teams",
610
+ "headerTintColor": "black",
611
+ "headerTitleStyle": {
612
+ "fontWeight": "bold"
613
+ },
614
+ "drawerItemStyle": {
615
+ "display": "none"
616
+ },
617
+ "headerTitleAlign": "left",
618
+ "gestureEnabled": false,
619
+ "swipeEnabled": false,
620
+ "animation": "fade",
621
+ "animationTypeForReplace": "pop",
622
+ "keyboardHandlingEnabled": false,
623
+ "freezeOnBlur": true
624
+ }
625
+ },
626
+ "componentPath": "@adminide-stack/yantra-mobile/lib/screens/TeamChat/index.js",
627
+ "hasComponent": true
628
+ }
629
+ },
575
630
  {
576
631
  "/:orgName/c/canvas-native": {
577
632
  "key": "canvas-native",
@@ -1,4 +1,4 @@
1
- import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {useContext,useMemo,useState,useCallback,useEffect,useRef}from'react';import {getApolloContext}from'@apollo/client/index.js';import {Animated,Easing,BackHandler,Linking,Alert,Pressable,StyleSheet,View,ScrollView,ActivityIndicator,Switch}from'react-native';import {Ionicons}from'@expo/vector-icons';import {Text}from'@admin-layout/gluestack-ui-mobile';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {useSafeAreaInsets,SafeAreaView}from'react-native-safe-area-context';import {useDispatch,useSelector}from'react-redux';import {userSelector,logoutAndRedirect}from'@adminide-stack/user-auth0-client';import {useAccountProfileQuery,useGetExtendedUserAccountQuery,useCountriesQuery,useDeleteUserAccountMutation}from'common/graphql';import {ProfileAvatar}from'../../components/ProfileAvatar.js';import {config}from'../../config/env-config.js';import {ChatModelSheet}from'../../features/chat/ChatModelSheet.js';import {useChatModelId,CHAT_MODELS}from'../../features/chat/chatModelPick.js';import {usePrerequisiteIds}from'../../hooks/usePrerequisiteIds.js';import {mobileTokens,mobileColors}from'../../theme/mobileTokens.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {pickPrimaryDisplayName,pickProfilePhotoUrl}from'../../utils/authUserDisplay.js';import {useHealthSync,healthSyncStore}from'../../features/health/healthSync.js';import {useDevices}from'../../features/devices/devices.js';import {reportAiContent}from'../../features/reporting/reportAiContent.js';import {useTaskActivitySetting}from'../../features/task-activity/taskActivitySwitch.js';import {AvatarSheet,NameSheet,UsernameSheet,GenderSheet,DobSheet,EmailSheet,PhoneSheet,PickerSheet}from'./AccountSheets.js';import {maskPhoneNumber,formatPhoneCode,genderLabel,formatDob,languageLabel,RESPONSE_LANGUAGES}from'./accountRules.js';import {useAccountPreferences}from'./useAccountPreferences.js';import {WorkspaceSection}from'./WorkspaceSection.js';import {navigateAction}from'../../utils/drawerRoutes.js';var __defProp = Object.defineProperty;
1
+ import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {useContext,useMemo,useState,useCallback,useEffect,useRef}from'react';import {getApolloContext}from'@apollo/client/index.js';import {Animated,Easing,BackHandler,Linking,Alert,Pressable,StyleSheet,View,ScrollView,ActivityIndicator,Switch}from'react-native';import {Ionicons}from'@expo/vector-icons';import {Text}from'@admin-layout/gluestack-ui-mobile';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {useSafeAreaInsets,SafeAreaView}from'react-native-safe-area-context';import {useDispatch,useSelector}from'react-redux';import {userSelector,logoutAndRedirect}from'@adminide-stack/user-auth0-client';import {useAccountProfileQuery,useGetExtendedUserAccountQuery,useCountriesQuery,useDeleteUserAccountMutation}from'common/graphql';import {ProfileAvatar}from'../../components/ProfileAvatar.js';import {ConnectorsPage}from'../../features/connectors/ConnectorsPage.js';import {config}from'../../config/env-config.js';import {ChatModelSheet}from'../../features/chat/ChatModelSheet.js';import {useChatModelId,CHAT_MODELS}from'../../features/chat/chatModelPick.js';import {usePrerequisiteIds}from'../../hooks/usePrerequisiteIds.js';import {mobileTokens,mobileColors}from'../../theme/mobileTokens.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {pickPrimaryDisplayName,pickProfilePhotoUrl}from'../../utils/authUserDisplay.js';import {useHealthSync,healthSyncStore}from'../../features/health/healthSync.js';import {useDevices}from'../../features/devices/devices.js';import {reportAiContent}from'../../features/reporting/reportAiContent.js';import {useTaskActivitySetting}from'../../features/task-activity/taskActivitySwitch.js';import {AvatarSheet,NameSheet,UsernameSheet,GenderSheet,DobSheet,EmailSheet,PhoneSheet,PickerSheet}from'./AccountSheets.js';import {maskPhoneNumber,formatPhoneCode,genderLabel,formatDob,languageLabel,RESPONSE_LANGUAGES}from'./accountRules.js';import {useAccountPreferences}from'./useAccountPreferences.js';import {WorkspaceSection}from'./WorkspaceSection.js';import {navigateAction}from'../../utils/drawerRoutes.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -22,7 +22,8 @@ const PAGE_TITLES = {
22
22
  profile: "Personal information",
23
23
  workspace: "Workspace",
24
24
  preferences: "Preferences",
25
- ai: "Artificial intelligence"
25
+ ai: "Artificial intelligence",
26
+ connectors: "Connectors"
26
27
  };
27
28
  const TILE = {
28
29
  brand: mobileTokens.color.primary,
@@ -250,7 +251,8 @@ function AccountScreen() {
250
251
  const taskIsland = useTaskActivitySetting();
251
252
  const {
252
253
  orgName: resolvedOrgName,
253
- projectId
254
+ projectId,
255
+ tagId
254
256
  } = usePrerequisiteIds();
255
257
  const chatModelId = useChatModelId();
256
258
  const [editing, setEditing] = useState(null);
@@ -414,7 +416,8 @@ function AccountScreen() {
414
416
  /* @__PURE__ */ jsxs(Group, { p, children: [
415
417
  /* @__PURE__ */ jsx(SettingsRow, { p, icon: "briefcase", tint: TILE.indigo, label: "Workspace", value: "Organization, project", onPress: () => go("workspace") }),
416
418
  /* @__PURE__ */ jsx(SettingsRow, { p, icon: "options", tint: TILE.brand, label: "Preferences", onPress: () => go("preferences") }),
417
- /* @__PURE__ */ jsx(SettingsRow, { p, icon: "sparkles", tint: TILE.violet, label: "Artificial intelligence", value: modelName, onPress: () => go("ai"), last: true })
419
+ /* @__PURE__ */ jsx(SettingsRow, { p, icon: "sparkles", tint: TILE.violet, label: "Artificial intelligence", value: modelName, onPress: () => go("ai") }),
420
+ /* @__PURE__ */ jsx(SettingsRow, { p, icon: "git-network", tint: TILE.teal, label: "Connectors", value: "Apps and APIs", onPress: () => go("connectors"), last: true })
418
421
  ] }),
419
422
  /* @__PURE__ */ jsxs(Group, { p, title: "HEALTH & DEVICES", children: [
420
423
  /* @__PURE__ */ jsx(SettingsRow, { p, icon: "heart", tint: TILE.pink, label: "Health", value: onOff(health.loaded, health.sync.connected), onPress: openHealth }),
@@ -491,7 +494,12 @@ function AccountScreen() {
491
494
  profile,
492
495
  workspace,
493
496
  preferences: preferencesPage,
494
- ai: aiPage
497
+ ai: aiPage,
498
+ connectors: /* @__PURE__ */ jsx(ConnectorsPage, { scope: {
499
+ orgName: resolvedOrgName != null ? resolvedOrgName : void 0,
500
+ projectId: projectId != null ? projectId : void 0,
501
+ environmentTag: tagId != null ? tagId : void 0
502
+ }, isDark })
495
503
  };
496
504
  return /* @__PURE__ */ jsxs(SafeAreaView, { edges: ["top", "left", "right"], style: [styles.safe, {
497
505
  backgroundColor: p.page