@adminide-stack/yantra-mobile 12.0.160-alpha.1 → 12.0.160-alpha.2

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 (489) hide show
  1. package/lib/assets/channels/lucy.jpg +0 -0
  2. package/lib/components/GatewayConnector/GatewayConnector.js +3 -2
  3. package/lib/components/GatewayConnector/GatewayConnector.js.map +1 -1
  4. package/lib/components/GatewayToolbarButtonMobile.js +4 -2
  5. package/lib/components/GatewayToolbarButtonMobile.js.map +1 -1
  6. package/lib/components/NavigationHeader/HeaderMoreMenu.js +2 -1
  7. package/lib/components/NavigationHeader/HeaderMoreMenu.js.map +1 -1
  8. package/lib/components/NavigationHeader/NavigationHeader.js +13 -11
  9. package/lib/components/NavigationHeader/NavigationHeader.js.map +1 -1
  10. package/lib/features/attachments/ComposerAttachMenu.js +15 -6
  11. package/lib/features/attachments/ComposerAttachMenu.js.map +1 -1
  12. package/lib/features/canvas/AudioEditorExperience.js +44 -1
  13. package/lib/features/canvas/AudioEditorExperience.js.map +1 -1
  14. package/lib/features/canvas/CanvasAppsPanel.js +240 -0
  15. package/lib/features/canvas/CanvasAppsPanel.js.map +1 -0
  16. package/lib/features/canvas/CanvasBoardsGrid.js +264 -803
  17. package/lib/features/canvas/CanvasBoardsGrid.js.map +1 -1
  18. package/lib/features/canvas/CanvasEditToolsPanel.js +320 -66
  19. package/lib/features/canvas/CanvasEditToolsPanel.js.map +1 -1
  20. package/lib/features/canvas/CanvasExperience.js +366 -235
  21. package/lib/features/canvas/CanvasExperience.js.map +1 -1
  22. package/lib/features/canvas/CanvasGeneratePanel.js +437 -117
  23. package/lib/features/canvas/CanvasGeneratePanel.js.map +1 -1
  24. package/lib/features/canvas/CanvasLibrarySheet.js +218 -18
  25. package/lib/features/canvas/CanvasLibrarySheet.js.map +1 -1
  26. package/lib/features/canvas/CanvasLooksPanel.js +2 -2
  27. package/lib/features/canvas/CanvasLooksPanel.js.map +1 -1
  28. package/lib/features/canvas/CanvasTasksPanel.js +52 -12
  29. package/lib/features/canvas/CanvasTasksPanel.js.map +1 -1
  30. package/lib/features/canvas/CanvasTemplatesPanel.js +2 -2
  31. package/lib/features/canvas/CanvasTemplatesPanel.js.map +1 -1
  32. package/lib/features/canvas/CanvasToolDock.js +146 -37
  33. package/lib/features/canvas/CanvasToolDock.js.map +1 -1
  34. package/lib/features/canvas/DesignCategoryGallery.js +264 -7
  35. package/lib/features/canvas/DesignCategoryGallery.js.map +1 -1
  36. package/lib/features/canvas/NativeCanvasViewer.js +54 -7
  37. package/lib/features/canvas/NativeCanvasViewer.js.map +1 -1
  38. package/lib/features/canvas/SetStudioExperience.js +7 -5
  39. package/lib/features/canvas/SetStudioExperience.js.map +1 -1
  40. package/lib/features/canvas/VideoEditorExperience.js +9 -5
  41. package/lib/features/canvas/VideoEditorExperience.js.map +1 -1
  42. package/lib/features/canvas/VideoGeneratorExperience.js +295 -96
  43. package/lib/features/canvas/VideoGeneratorExperience.js.map +1 -1
  44. package/lib/features/canvas/appsCatalog.js +554 -0
  45. package/lib/features/canvas/appsCatalog.js.map +1 -0
  46. package/lib/features/canvas/boardActions.js +547 -0
  47. package/lib/features/canvas/boardActions.js.map +1 -0
  48. package/lib/features/canvas/boardHistory.js +264 -0
  49. package/lib/features/canvas/boardHistory.js.map +1 -0
  50. package/lib/features/canvas/canvasAgentChat.js +3 -2
  51. package/lib/features/canvas/canvasAgentChat.js.map +1 -1
  52. package/lib/features/canvas/canvasArtifacts.js +115 -0
  53. package/lib/features/canvas/canvasArtifacts.js.map +1 -0
  54. package/lib/features/canvas/canvasCore.js +5 -2
  55. package/lib/features/canvas/canvasCore.js.map +1 -1
  56. package/lib/features/canvas/canvasEditHistory.js +42 -0
  57. package/lib/features/canvas/canvasEditHistory.js.map +1 -0
  58. package/lib/features/canvas/canvasEditOps.js +27 -21
  59. package/lib/features/canvas/canvasEditOps.js.map +1 -1
  60. package/lib/features/canvas/canvasTasks.js +5 -4
  61. package/lib/features/canvas/canvasTasks.js.map +1 -1
  62. package/lib/features/canvas/canvasUi.js +9 -4
  63. package/lib/features/canvas/canvasUi.js.map +1 -1
  64. package/lib/features/canvas/catalogSearchIndex.js +271 -0
  65. package/lib/features/canvas/catalogSearchIndex.js.map +1 -0
  66. package/lib/features/canvas/characters/CharacterBuilder.js +331 -0
  67. package/lib/features/canvas/characters/CharacterBuilder.js.map +1 -0
  68. package/lib/features/canvas/characters/CharacterPicker.js +207 -0
  69. package/lib/features/canvas/characters/CharacterPicker.js.map +1 -0
  70. package/lib/features/canvas/characters/CharacterStudio.js +106 -0
  71. package/lib/features/canvas/characters/CharacterStudio.js.map +1 -0
  72. package/lib/features/canvas/characters/PhotoDumpTool.js +157 -0
  73. package/lib/features/canvas/characters/PhotoDumpTool.js.map +1 -0
  74. package/lib/features/canvas/characters/PhotoSlot.js +104 -0
  75. package/lib/features/canvas/characters/PhotoSlot.js.map +1 -0
  76. package/lib/features/canvas/characters/RunFooter.js +126 -0
  77. package/lib/features/canvas/characters/RunFooter.js.map +1 -0
  78. package/lib/features/canvas/characters/StoryFramesTool.js +245 -0
  79. package/lib/features/canvas/characters/StoryFramesTool.js.map +1 -0
  80. package/lib/features/canvas/characters/SubjectPicker.js +198 -0
  81. package/lib/features/canvas/characters/SubjectPicker.js.map +1 -0
  82. package/lib/features/canvas/characters/characterActions.js +364 -0
  83. package/lib/features/canvas/characters/characterActions.js.map +1 -0
  84. package/lib/features/canvas/characters/characterRuns.js +256 -0
  85. package/lib/features/canvas/characters/characterRuns.js.map +1 -0
  86. package/lib/features/canvas/characters/characterStore.js +137 -0
  87. package/lib/features/canvas/characters/characterStore.js.map +1 -0
  88. package/lib/features/canvas/characters/characterTools.js +33 -0
  89. package/lib/features/canvas/characters/characterTools.js.map +1 -0
  90. package/lib/features/canvas/characters/characterVocabulary.js +1138 -0
  91. package/lib/features/canvas/characters/characterVocabulary.js.map +1 -0
  92. package/lib/features/canvas/characters/charactersRpc.js +70 -0
  93. package/lib/features/canvas/characters/charactersRpc.js.map +1 -0
  94. package/lib/features/canvas/characters/photoDumpPacks.js +252 -0
  95. package/lib/features/canvas/characters/photoDumpPacks.js.map +1 -0
  96. package/lib/features/canvas/characters/placement.js +114 -0
  97. package/lib/features/canvas/characters/placement.js.map +1 -0
  98. package/lib/features/canvas/characters/storyboard.js +188 -0
  99. package/lib/features/canvas/characters/storyboard.js.map +1 -0
  100. package/lib/features/canvas/createTiles.js +16 -98
  101. package/lib/features/canvas/createTiles.js.map +1 -1
  102. package/lib/features/canvas/creditsOffer.js +21 -0
  103. package/lib/features/canvas/creditsOffer.js.map +1 -0
  104. package/lib/features/canvas/deepLinks.js.map +1 -1
  105. package/lib/features/canvas/designCatalog.js +6 -13
  106. package/lib/features/canvas/designCatalog.js.map +1 -1
  107. package/lib/features/canvas/editTools.js +122 -10
  108. package/lib/features/canvas/editTools.js.map +1 -1
  109. package/lib/features/canvas/editorControls.js +1 -1
  110. package/lib/features/canvas/elements/ElementForm.js +389 -0
  111. package/lib/features/canvas/elements/ElementForm.js.map +1 -0
  112. package/lib/features/canvas/elements/ElementMentionMenu.js +125 -0
  113. package/lib/features/canvas/elements/ElementMentionMenu.js.map +1 -0
  114. package/lib/features/canvas/elements/ElementThumb.js +23 -0
  115. package/lib/features/canvas/elements/ElementThumb.js.map +1 -0
  116. package/lib/features/canvas/elements/ElementsButton.js +55 -0
  117. package/lib/features/canvas/elements/ElementsButton.js.map +1 -0
  118. package/lib/features/canvas/elements/ElementsSheet.js +392 -0
  119. package/lib/features/canvas/elements/ElementsSheet.js.map +1 -0
  120. package/lib/features/canvas/elements/MentionedElements.js +159 -0
  121. package/lib/features/canvas/elements/MentionedElements.js.map +1 -0
  122. package/lib/features/canvas/elements/elementCopy.js +37 -0
  123. package/lib/features/canvas/elements/elementCopy.js.map +1 -0
  124. package/lib/features/canvas/elements/elementImages.js +66 -0
  125. package/lib/features/canvas/elements/elementImages.js.map +1 -0
  126. package/lib/features/canvas/elements/elementsStore.js +164 -0
  127. package/lib/features/canvas/elements/elementsStore.js.map +1 -0
  128. package/lib/features/canvas/elements/shotMentions.js +94 -0
  129. package/lib/features/canvas/elements/shotMentions.js.map +1 -0
  130. package/lib/features/canvas/elements/unicodeWords.js +13 -0
  131. package/lib/features/canvas/elements/unicodeWords.js.map +1 -0
  132. package/lib/features/canvas/elements/useElementMentions.js +94 -0
  133. package/lib/features/canvas/elements/useElementMentions.js.map +1 -0
  134. package/lib/features/canvas/elements/useGeneratorElements.js +83 -0
  135. package/lib/features/canvas/elements/useGeneratorElements.js.map +1 -0
  136. package/lib/features/canvas/elements/useSavedElements.js +170 -0
  137. package/lib/features/canvas/elements/useSavedElements.js.map +1 -0
  138. package/lib/features/canvas/enhance/AnimateControls.js +249 -0
  139. package/lib/features/canvas/enhance/AnimateControls.js.map +1 -0
  140. package/lib/features/canvas/enhance/ClipAudioControls.js +184 -0
  141. package/lib/features/canvas/enhance/ClipAudioControls.js.map +1 -0
  142. package/lib/features/canvas/enhance/ImageAiControls.js +293 -0
  143. package/lib/features/canvas/enhance/ImageAiControls.js.map +1 -0
  144. package/lib/features/canvas/enhance/MediaSlot.js +220 -0
  145. package/lib/features/canvas/enhance/MediaSlot.js.map +1 -0
  146. package/lib/features/canvas/enhance/PixelToolControls.js +236 -0
  147. package/lib/features/canvas/enhance/PixelToolControls.js.map +1 -0
  148. package/lib/features/canvas/enhance/RemixControls.js +166 -0
  149. package/lib/features/canvas/enhance/RemixControls.js.map +1 -0
  150. package/lib/features/canvas/enhance/enhanceUi.js +182 -0
  151. package/lib/features/canvas/enhance/enhanceUi.js.map +1 -0
  152. package/lib/features/canvas/enhance/useEnhanceRunner.js +218 -0
  153. package/lib/features/canvas/enhance/useEnhanceRunner.js.map +1 -0
  154. package/lib/features/canvas/enhanceCatalog.js +110 -0
  155. package/lib/features/canvas/enhanceCatalog.js.map +1 -0
  156. package/lib/features/canvas/enhanceOps.js +630 -0
  157. package/lib/features/canvas/enhanceOps.js.map +1 -0
  158. package/lib/features/canvas/enhanceRpc.js +404 -0
  159. package/lib/features/canvas/enhanceRpc.js.map +1 -0
  160. package/lib/features/canvas/generationModels.js +82 -11
  161. package/lib/features/canvas/generationModels.js.map +1 -1
  162. package/lib/features/canvas/generationTasks.js +46 -17
  163. package/lib/features/canvas/generationTasks.js.map +1 -1
  164. package/lib/features/canvas/generator/GeneratorModelMenu.js +118 -0
  165. package/lib/features/canvas/generator/GeneratorModelMenu.js.map +1 -0
  166. package/lib/features/canvas/generator/audio/AudioLaneSettings.js +127 -0
  167. package/lib/features/canvas/generator/audio/AudioLaneSettings.js.map +1 -0
  168. package/lib/features/canvas/generator/audio/audioLane.js +163 -0
  169. package/lib/features/canvas/generator/audio/audioLane.js.map +1 -0
  170. package/lib/features/canvas/generator/audio/audioVoices.js +108 -0
  171. package/lib/features/canvas/generator/audio/audioVoices.js.map +1 -0
  172. package/lib/features/canvas/generator/audio/clipAudio.js +149 -0
  173. package/lib/features/canvas/generator/audio/clipAudio.js.map +1 -0
  174. package/lib/features/canvas/generator/audio/dub.js +109 -0
  175. package/lib/features/canvas/generator/audio/dub.js.map +1 -0
  176. package/lib/features/canvas/generator/audio/soundtrack.js +70 -0
  177. package/lib/features/canvas/generator/audio/soundtrack.js.map +1 -0
  178. package/lib/features/canvas/generator/audio/useAudioVoices.js +38 -0
  179. package/lib/features/canvas/generator/audio/useAudioVoices.js.map +1 -0
  180. package/lib/features/canvas/generator/audio/useSamplePlayer.js +72 -0
  181. package/lib/features/canvas/generator/audio/useSamplePlayer.js.map +1 -0
  182. package/lib/features/canvas/generator/audio/useSampleUploads.js +11 -0
  183. package/lib/features/canvas/generator/audio/useSampleUploads.js.map +1 -0
  184. package/lib/features/canvas/generator/batchImages.js +198 -0
  185. package/lib/features/canvas/generator/batchImages.js.map +1 -0
  186. package/lib/features/canvas/generator/batchLayout.js +36 -0
  187. package/lib/features/canvas/generator/batchLayout.js.map +1 -0
  188. package/lib/features/canvas/generator/brandKitGeneration.js +47 -0
  189. package/lib/features/canvas/generator/brandKitGeneration.js.map +1 -0
  190. package/lib/features/canvas/generator/cameraVocabulary.js +90 -0
  191. package/lib/features/canvas/generator/cameraVocabulary.js.map +1 -1
  192. package/lib/features/canvas/generator/cinematicVocabulary.js +58 -0
  193. package/lib/features/canvas/generator/cinematicVocabulary.js.map +1 -1
  194. package/lib/features/canvas/generator/elementMentions.js +402 -0
  195. package/lib/features/canvas/generator/elementMentions.js.map +1 -0
  196. package/lib/features/canvas/generator/reuse/BatchCountPill.js +136 -0
  197. package/lib/features/canvas/generator/reuse/BatchCountPill.js.map +1 -0
  198. package/lib/features/canvas/generator/reuse/busyRuns.js +17 -0
  199. package/lib/features/canvas/generator/reuse/busyRuns.js.map +1 -0
  200. package/lib/features/canvas/generator/reuse/generationRecord.js +368 -0
  201. package/lib/features/canvas/generator/reuse/generationRecord.js.map +1 -0
  202. package/lib/features/canvas/generator/reuse/generationReuse.js +77 -0
  203. package/lib/features/canvas/generator/reuse/generationReuse.js.map +1 -0
  204. package/lib/features/canvas/generator/reuse/laneInputs.js +75 -0
  205. package/lib/features/canvas/generator/reuse/laneInputs.js.map +1 -0
  206. package/lib/features/canvas/generator/reuse/modelFavourites.js +87 -0
  207. package/lib/features/canvas/generator/reuse/modelFavourites.js.map +1 -0
  208. package/lib/features/canvas/generator/reuse/recreate.js +121 -0
  209. package/lib/features/canvas/generator/reuse/recreate.js.map +1 -0
  210. package/lib/features/canvas/generator/reuse/retryJob.js +142 -0
  211. package/lib/features/canvas/generator/reuse/retryJob.js.map +1 -0
  212. package/lib/features/canvas/generator/reuse/reusePlan.js +203 -0
  213. package/lib/features/canvas/generator/reuse/reusePlan.js.map +1 -0
  214. package/lib/features/canvas/generator/reuse/runBoard.js +117 -0
  215. package/lib/features/canvas/generator/reuse/runBoard.js.map +1 -0
  216. package/lib/features/canvas/generator/useShotSpec.js +4 -3
  217. package/lib/features/canvas/generator/useShotSpec.js.map +1 -1
  218. package/lib/features/canvas/generator/video/VideoExtrasControls.js +276 -0
  219. package/lib/features/canvas/generator/video/VideoExtrasControls.js.map +1 -0
  220. package/lib/features/canvas/generator/video/cameraMotions.js +66 -0
  221. package/lib/features/canvas/generator/video/cameraMotions.js.map +1 -0
  222. package/lib/features/canvas/generator/video/clipTile.js +20 -0
  223. package/lib/features/canvas/generator/video/clipTile.js.map +1 -0
  224. package/lib/features/canvas/generator/video/mediaSeconds.js +31 -0
  225. package/lib/features/canvas/generator/video/mediaSeconds.js.map +1 -0
  226. package/lib/features/canvas/generator/video/referenceMedia.js +156 -0
  227. package/lib/features/canvas/generator/video/referenceMedia.js.map +1 -0
  228. package/lib/features/canvas/generator/video/useVideoGenExtras.js +179 -0
  229. package/lib/features/canvas/generator/video/useVideoGenExtras.js.map +1 -0
  230. package/lib/features/canvas/generator/video/videoExtras.js +34 -0
  231. package/lib/features/canvas/generator/video/videoExtras.js.map +1 -0
  232. package/lib/features/canvas/generator/video/videoModelCaps.js +96 -0
  233. package/lib/features/canvas/generator/video/videoModelCaps.js.map +1 -0
  234. package/lib/features/canvas/home/BoardHistorySheet.js +266 -0
  235. package/lib/features/canvas/home/BoardHistorySheet.js.map +1 -0
  236. package/lib/features/canvas/home/BoardMenuSheet.js +157 -0
  237. package/lib/features/canvas/home/BoardMenuSheet.js.map +1 -0
  238. package/lib/features/canvas/home/BoardTile.js +224 -0
  239. package/lib/features/canvas/home/BoardTile.js.map +1 -0
  240. package/lib/features/canvas/home/HeroComposer.js +72 -6
  241. package/lib/features/canvas/home/HeroComposer.js.map +1 -1
  242. package/lib/features/canvas/home/SlidesPrompt.js +79 -0
  243. package/lib/features/canvas/home/SlidesPrompt.js.map +1 -0
  244. package/lib/features/canvas/home/TemplatesGallery.js +2 -19
  245. package/lib/features/canvas/home/TemplatesGallery.js.map +1 -1
  246. package/lib/features/canvas/home/TrashView.js +299 -0
  247. package/lib/features/canvas/home/TrashView.js.map +1 -0
  248. package/lib/features/canvas/home/heroShots.js +4 -2
  249. package/lib/features/canvas/home/heroShots.js.map +1 -1
  250. package/lib/features/canvas/home/templatesGallerySources.js +13 -58
  251. package/lib/features/canvas/home/templatesGallerySources.js.map +1 -1
  252. package/lib/features/canvas/home/useYourWork.js +218 -0
  253. package/lib/features/canvas/home/useYourWork.js.map +1 -0
  254. package/lib/features/canvas/homeWork.js +54 -119
  255. package/lib/features/canvas/homeWork.js.map +1 -1
  256. package/lib/features/canvas/influencer/influencerPipeline.js +9 -8
  257. package/lib/features/canvas/influencer/influencerPipeline.js.map +1 -1
  258. package/lib/features/canvas/lazyEditors.js +3 -2
  259. package/lib/features/canvas/lazyEditors.js.map +1 -1
  260. package/lib/features/canvas/lookReading.js +38 -0
  261. package/lib/features/canvas/lookReading.js.map +1 -0
  262. package/lib/features/canvas/matchLook.js +81 -0
  263. package/lib/features/canvas/matchLook.js.map +1 -0
  264. package/lib/features/canvas/mediaUrls.js +22 -1
  265. package/lib/features/canvas/mediaUrls.js.map +1 -1
  266. package/lib/features/canvas/pngPixels.js +224 -0
  267. package/lib/features/canvas/pngPixels.js.map +1 -0
  268. package/lib/features/canvas/rankedCatalogSearch.js +1 -1
  269. package/lib/features/canvas/serverTasks.js +12 -5
  270. package/lib/features/canvas/serverTasks.js.map +1 -1
  271. package/lib/features/canvas/studioCatalog.js +1 -1
  272. package/lib/features/canvas/surfaceIndex.js +287 -11
  273. package/lib/features/canvas/surfaceIndex.js.map +1 -1
  274. package/lib/features/canvas/templateSearch.js +90 -11
  275. package/lib/features/canvas/templateSearch.js.map +1 -1
  276. package/lib/features/canvas/videoEditor/agent/agentLoop.js +6 -5
  277. package/lib/features/canvas/videoEditor/agent/agentLoop.js.map +1 -1
  278. package/lib/features/canvas/videoEditor/agent/brainClient.js +13 -2
  279. package/lib/features/canvas/videoEditor/agent/brainClient.js.map +1 -1
  280. package/lib/features/canvas/videoEditor/agent/cutTools.js +150 -4
  281. package/lib/features/canvas/videoEditor/agent/cutTools.js.map +1 -1
  282. package/lib/features/canvas/videoEditor/exportTask.js +5 -2
  283. package/lib/features/canvas/videoEditor/exportTask.js.map +1 -1
  284. package/lib/features/canvas/videoEditor/formWidgets.js +1 -1
  285. package/lib/features/canvas/videoEditor/mediaActions.js +18 -3
  286. package/lib/features/canvas/videoEditor/mediaActions.js.map +1 -1
  287. package/lib/features/canvas/videoEditor/produce/ProduceVideoSheet.js +25 -2
  288. package/lib/features/canvas/videoEditor/produce/ProduceVideoSheet.js.map +1 -1
  289. package/lib/features/canvas/videoEditor/produce/produceScenes.js +15 -7
  290. package/lib/features/canvas/videoEditor/produce/produceScenes.js.map +1 -1
  291. package/lib/features/canvas/videoEditor/remoteMediaClient.js +3 -3
  292. package/lib/features/canvas/videoEditor/remoteMediaClient.js.map +1 -1
  293. package/lib/features/channels/ChannelIcon.js +62 -0
  294. package/lib/features/channels/ChannelIcon.js.map +1 -0
  295. package/lib/features/channels/ConnectAppsSheet.js +721 -0
  296. package/lib/features/channels/ConnectAppsSheet.js.map +1 -0
  297. package/lib/features/channels/HomeImessage.js +48 -0
  298. package/lib/features/channels/HomeImessage.js.map +1 -0
  299. package/lib/features/channels/channelLinks.js +90 -0
  300. package/lib/features/channels/channelLinks.js.map +1 -0
  301. package/lib/features/channels/useChannelsApi.js +299 -0
  302. package/lib/features/channels/useChannelsApi.js.map +1 -0
  303. package/lib/features/chat/AskUserCard.js +327 -21
  304. package/lib/features/chat/AskUserCard.js.map +1 -1
  305. package/lib/features/chat/ChatModelSheet.js +414 -0
  306. package/lib/features/chat/ChatModelSheet.js.map +1 -0
  307. package/lib/features/chat/TemplatesChatCards.js +32 -1
  308. package/lib/features/chat/TemplatesChatCards.js.map +1 -1
  309. package/lib/features/chat/askUser.js +130 -17
  310. package/lib/features/chat/askUser.js.map +1 -1
  311. package/lib/features/chat/chatModelCredentials.js +76 -0
  312. package/lib/features/chat/chatModelCredentials.js.map +1 -0
  313. package/lib/features/chat/chatModelPick.js +67 -0
  314. package/lib/features/chat/chatModelPick.js.map +1 -0
  315. package/lib/features/chat/credentialTemplates.js +43 -0
  316. package/lib/features/chat/credentialTemplates.js.map +1 -0
  317. package/lib/features/design/DesignEditorExperience.js +208 -22
  318. package/lib/features/design/DesignEditorExperience.js.map +1 -1
  319. package/lib/features/design/DesignExperience.js +23 -6
  320. package/lib/features/design/DesignExperience.js.map +1 -1
  321. package/lib/features/design/doc/aiDesign.js +6 -16
  322. package/lib/features/design/doc/aiDesign.js.map +1 -1
  323. package/lib/features/design/doc/arrange.js +72 -0
  324. package/lib/features/design/doc/arrange.js.map +1 -0
  325. package/lib/features/design/doc/artifacts.js +40 -10
  326. package/lib/features/design/doc/artifacts.js.map +1 -1
  327. package/lib/features/design/doc/bleedRunout.js +201 -0
  328. package/lib/features/design/doc/bleedRunout.js.map +1 -0
  329. package/lib/features/design/doc/briefForms.js +218 -0
  330. package/lib/features/design/doc/briefForms.js.map +1 -0
  331. package/lib/features/design/doc/chart.js +11 -1
  332. package/lib/features/design/doc/chart.js.map +1 -1
  333. package/lib/features/design/doc/deletedWork.js +13 -0
  334. package/lib/features/design/doc/deletedWork.js.map +1 -0
  335. package/lib/features/design/doc/demoVideo.js +91 -0
  336. package/lib/features/design/doc/demoVideo.js.map +1 -0
  337. package/lib/features/design/doc/docOps.js +15 -0
  338. package/lib/features/design/doc/docOps.js.map +1 -1
  339. package/lib/features/design/doc/layoutGuides.js +159 -0
  340. package/lib/features/design/doc/layoutGuides.js.map +1 -0
  341. package/lib/features/design/doc/pageTemplates.js +286 -0
  342. package/lib/features/design/doc/pageTemplates.js.map +1 -0
  343. package/lib/features/design/doc/resize.js +8 -3
  344. package/lib/features/design/doc/resize.js.map +1 -1
  345. package/lib/features/design/doc/sizes.js +18 -5
  346. package/lib/features/design/doc/sizes.js.map +1 -1
  347. package/lib/features/design/doc/textRuns.js +67 -0
  348. package/lib/features/design/doc/textRuns.js.map +1 -0
  349. package/lib/features/design/doc/types.js +8 -1
  350. package/lib/features/design/doc/types.js.map +1 -1
  351. package/lib/features/design/editor/AiPanel.js +71 -74
  352. package/lib/features/design/editor/AiPanel.js.map +1 -1
  353. package/lib/features/design/editor/AllPagesPanel.js +64 -0
  354. package/lib/features/design/editor/AllPagesPanel.js.map +1 -0
  355. package/lib/features/design/editor/CarouselWizard.js +139 -0
  356. package/lib/features/design/editor/CarouselWizard.js.map +1 -0
  357. package/lib/features/design/editor/DesignCanvas.js +205 -14
  358. package/lib/features/design/editor/DesignCanvas.js.map +1 -1
  359. package/lib/features/design/editor/ExportSheet.js +24 -8
  360. package/lib/features/design/editor/ExportSheet.js.map +1 -1
  361. package/lib/features/design/editor/FlyerBriefForm.js +221 -0
  362. package/lib/features/design/editor/FlyerBriefForm.js.map +1 -0
  363. package/lib/features/design/editor/GuidesPanel.js +152 -0
  364. package/lib/features/design/editor/GuidesPanel.js.map +1 -0
  365. package/lib/features/design/editor/LayerTools.js +24 -1
  366. package/lib/features/design/editor/LayerTools.js.map +1 -1
  367. package/lib/features/design/editor/LayersPanel.js +156 -0
  368. package/lib/features/design/editor/LayersPanel.js.map +1 -0
  369. package/lib/features/design/editor/ToolPanels.js +34 -1
  370. package/lib/features/design/editor/ToolPanels.js.map +1 -1
  371. package/lib/features/design/editor/WordStyleRow.js +66 -0
  372. package/lib/features/design/editor/WordStyleRow.js.map +1 -0
  373. package/lib/features/design/editor/useDesignSave.js +36 -2
  374. package/lib/features/design/editor/useDesignSave.js.map +1 -1
  375. package/lib/features/design/export/exportDesign.js +79 -19
  376. package/lib/features/design/export/exportDesign.js.map +1 -1
  377. package/lib/features/design/export/fetchBytes.js +26 -0
  378. package/lib/features/design/export/fetchBytes.js.map +1 -0
  379. package/lib/features/design/export/pdf.js +16 -1
  380. package/lib/features/design/export/pdf.js.map +1 -1
  381. package/lib/features/design/export/pptx.js +621 -0
  382. package/lib/features/design/export/pptx.js.map +1 -0
  383. package/lib/features/design/export/pptxChart.js +106 -0
  384. package/lib/features/design/export/pptxChart.js.map +1 -0
  385. package/lib/features/design/export/pptxGeometry.js +219 -0
  386. package/lib/features/design/export/pptxGeometry.js.map +1 -0
  387. package/lib/features/design/export/printFile.js +19 -0
  388. package/lib/features/design/export/printFile.js.map +1 -0
  389. package/lib/features/design/export/zip.js +91 -0
  390. package/lib/features/design/export/zip.js.map +1 -0
  391. package/lib/features/design/render/PageCapture.js +95 -23
  392. package/lib/features/design/render/PageCapture.js.map +1 -1
  393. package/lib/features/design/render/TextMeasure.js +1 -1
  394. package/lib/features/design/render/layers.js +1 -1
  395. package/lib/features/design/surface/BoardScreen.js +139 -102
  396. package/lib/features/design/surface/BoardScreen.js.map +1 -1
  397. package/lib/features/design/surface/BrandSheet.js +407 -0
  398. package/lib/features/design/surface/BrandSheet.js.map +1 -0
  399. package/lib/features/design/surface/ChatWorkView.js +154 -0
  400. package/lib/features/design/surface/ChatWorkView.js.map +1 -0
  401. package/lib/features/design/surface/CreationScreen.js +36 -2
  402. package/lib/features/design/surface/CreationScreen.js.map +1 -1
  403. package/lib/features/design/surface/DesignAgentChatPane.js +7 -1
  404. package/lib/features/design/surface/DesignAgentChatPane.js.map +1 -1
  405. package/lib/features/design/surface/DesignHome.js +505 -0
  406. package/lib/features/design/surface/DesignHome.js.map +1 -0
  407. package/lib/features/design/surface/DesignSurfaceExperience.js +182 -9
  408. package/lib/features/design/surface/DesignSurfaceExperience.js.map +1 -1
  409. package/lib/features/design/surface/TasksSheet.js +141 -0
  410. package/lib/features/design/surface/TasksSheet.js.map +1 -0
  411. package/lib/features/design/surface/TemplatesGallery.js +67 -17
  412. package/lib/features/design/surface/TemplatesGallery.js.map +1 -1
  413. package/lib/features/design/surface/WorkTiles.js +207 -0
  414. package/lib/features/design/surface/WorkTiles.js.map +1 -0
  415. package/lib/features/design/surface/agentTurn.js +4 -4
  416. package/lib/features/design/surface/agentTurn.js.map +1 -1
  417. package/lib/features/design/surface/brandKit.js +204 -0
  418. package/lib/features/design/surface/brandKit.js.map +1 -0
  419. package/lib/features/design/surface/designBoard.js +269 -58
  420. package/lib/features/design/surface/designBoard.js.map +1 -1
  421. package/lib/features/design/surface/designChannel.js +30 -6
  422. package/lib/features/design/surface/designChannel.js.map +1 -1
  423. package/lib/features/design/surface/designConnector.js +11 -3
  424. package/lib/features/design/surface/designConnector.js.map +1 -1
  425. package/lib/features/design/surface/designErrors.js +92 -0
  426. package/lib/features/design/surface/designErrors.js.map +1 -0
  427. package/lib/features/design/surface/designLinks.js +64 -1
  428. package/lib/features/design/surface/designLinks.js.map +1 -1
  429. package/lib/features/design/surface/designRun.js +7 -3
  430. package/lib/features/design/surface/designRun.js.map +1 -1
  431. package/lib/features/design/surface/designTheme.js +54 -93
  432. package/lib/features/design/surface/designTheme.js.map +1 -1
  433. package/lib/features/design/surface/execStream.js +2 -2
  434. package/lib/features/design/surface/execStream.js.map +1 -1
  435. package/lib/features/design/surface/freshLinks.js +69 -0
  436. package/lib/features/design/surface/freshLinks.js.map +1 -0
  437. package/lib/features/design/surface/graphicChat.js +37 -0
  438. package/lib/features/design/surface/graphicChat.js.map +1 -0
  439. package/lib/features/design/surface/templateKinds.js +61 -0
  440. package/lib/features/design/surface/templateKinds.js.map +1 -0
  441. package/lib/features/design/surface/useBrandKitInUse.js +90 -0
  442. package/lib/features/design/surface/useBrandKitInUse.js.map +1 -0
  443. package/lib/features/design/surface/useDesignSurface.js +202 -43
  444. package/lib/features/design/surface/useDesignSurface.js.map +1 -1
  445. package/lib/features/design/surface/workList.js +184 -0
  446. package/lib/features/design/surface/workList.js.map +1 -0
  447. package/lib/features/devices/bodyComposition.js.map +1 -1
  448. package/lib/features/docs/DocsEditorExperience.js +18 -3
  449. package/lib/features/docs/DocsEditorExperience.js.map +1 -1
  450. package/lib/features/docs/docArtifacts.js +11 -23
  451. package/lib/features/docs/docArtifacts.js.map +1 -1
  452. package/lib/features/docs/docExport.js +1 -13
  453. package/lib/features/docs/docExport.js.map +1 -1
  454. package/lib/features/docs/docShare.js +28 -1
  455. package/lib/features/docs/docShare.js.map +1 -1
  456. package/lib/features/docs/docxFile.js +221 -0
  457. package/lib/features/docs/docxFile.js.map +1 -0
  458. package/lib/features/home/sky/HomeSky.js +526 -0
  459. package/lib/features/home/sky/HomeSky.js.map +1 -0
  460. package/lib/features/home/sky/homeSkyBar.js +16 -0
  461. package/lib/features/home/sky/homeSkyBar.js.map +1 -0
  462. package/lib/features/home/sky/skyScene.js +273 -0
  463. package/lib/features/home/sky/skyScene.js.map +1 -0
  464. package/lib/features/home/sky/useSkyScene.js +32 -0
  465. package/lib/features/home/sky/useSkyScene.js.map +1 -0
  466. package/lib/features/home/weather.js +8 -3
  467. package/lib/features/home/weather.js.map +1 -1
  468. package/lib/features/links/openInApp.js +8 -1
  469. package/lib/features/links/openInApp.js.map +1 -1
  470. package/lib/features/webbuilder/codezenHandoff.js +7 -1
  471. package/lib/features/webbuilder/codezenHandoff.js.map +1 -1
  472. package/lib/hooks/useChatStream.js +3 -2
  473. package/lib/hooks/useChatStream.js.map +1 -1
  474. package/lib/screens/DesignNative/index.js +13 -3
  475. package/lib/screens/DesignNative/index.js.map +1 -1
  476. package/lib/screens/Devices/index.js.map +1 -1
  477. package/lib/screens/Home/HomeScreen.js +150 -28
  478. package/lib/screens/Home/HomeScreen.js.map +1 -1
  479. package/lib/screens/Home/components/HomeHero.js +7 -4
  480. package/lib/screens/Home/components/HomeHero.js.map +1 -1
  481. package/lib/screens/Home/components/HomeSuggestions.js +5 -3
  482. package/lib/screens/Home/components/HomeSuggestions.js.map +1 -1
  483. package/package.json +2 -2
  484. package/lib/features/design/surface/DesignBoards.js +0 -441
  485. package/lib/features/design/surface/DesignBoards.js.map +0 -1
  486. package/lib/features/design/surface/WetPaint.js +0 -140
  487. package/lib/features/design/surface/WetPaint.js.map +0 -1
  488. package/lib/features/design/surface/metaball.js +0 -48
  489. package/lib/features/design/surface/metaball.js.map +0 -1
@@ -0,0 +1,721 @@
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState,useEffect,useRef,useCallback,useMemo}from'react';import {Modal,View,StyleSheet,Pressable,Text,ScrollView,ActivityIndicator,Platform,Linking,Image}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {useSafeAreaInsets}from'react-native-safe-area-context';import*as WebBrowser from'expo-web-browser';import {mobileColors}from'../../theme/mobileTokens.js';import {ChannelIcon}from'./ChannelIcon.js';import {CHANNELS,planFirstMessage,buildWhatsAppHref,buildImessageHref,pairingRefusalMessage,AGENTS,qrImageUrl,expiryLabel}from'./channelLinks.js';import {useChannelBindings,useMessagesRecipient,useWhatsAppRecipient,useChannelActions,usePairingWatcher}from'./useChannelsApi.js';var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ const LUCY_PHOTO = require("../../assets/channels/lucy.jpg");
21
+ const LINKED_CLOSE_MS = 3e3;
22
+ const PAIRED_CLOSE_MS = 1200;
23
+ function errorText(err) {
24
+ return err instanceof Error && err.message ? err.message : "Something went wrong. Please try again.";
25
+ }
26
+ function useExpiryLabel(expiresAt) {
27
+ const [now, setNow] = useState(() => Date.now());
28
+ useEffect(() => {
29
+ if (!expiresAt) return void 0;
30
+ setNow(Date.now());
31
+ const timer = setInterval(() => setNow(Date.now()), 3e4);
32
+ return () => clearInterval(timer);
33
+ }, [expiresAt]);
34
+ return expiryLabel(expiresAt, now);
35
+ }
36
+ function Button({
37
+ label,
38
+ colors,
39
+ onPress,
40
+ disabled,
41
+ busy,
42
+ tone = "primary"
43
+ }) {
44
+ const filled = tone === "primary";
45
+ const ink = {
46
+ primary: "#fff",
47
+ line: colors.text,
48
+ danger: colors.dangerText
49
+ }[tone];
50
+ return /* @__PURE__ */ jsxs(Pressable, { onPress, disabled: disabled || busy, accessibilityRole: "button", accessibilityLabel: label, style: ({
51
+ pressed
52
+ }) => [styles.button, filled ? {
53
+ backgroundColor: colors.primary
54
+ } : {
55
+ borderColor: colors.border,
56
+ borderWidth: 1
57
+ }, (pressed || disabled) && styles.dim], children: [
58
+ busy ? /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: ink }) : null,
59
+ /* @__PURE__ */ jsx(Text, { style: [styles.buttonLabel, {
60
+ color: ink
61
+ }], children: label })
62
+ ] });
63
+ }
64
+ function Waiting({
65
+ label,
66
+ colors
67
+ }) {
68
+ return /* @__PURE__ */ jsxs(View, { style: [styles.note, {
69
+ backgroundColor: colors.surfaceMuted
70
+ }], children: [
71
+ /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: colors.textMuted }),
72
+ /* @__PURE__ */ jsx(Text, { style: [styles.noteText, {
73
+ color: colors.textMuted
74
+ }], children: label })
75
+ ] });
76
+ }
77
+ function Linked({
78
+ label,
79
+ colors
80
+ }) {
81
+ return /* @__PURE__ */ jsxs(View, { style: [styles.note, {
82
+ backgroundColor: colors.successSoft
83
+ }], children: [
84
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "check-circle", size: 16, color: colors.successText }),
85
+ /* @__PURE__ */ jsx(Text, { style: [styles.noteText, {
86
+ color: colors.successText
87
+ }], children: label })
88
+ ] });
89
+ }
90
+ function Problem({
91
+ label,
92
+ colors
93
+ }) {
94
+ return /* @__PURE__ */ jsxs(View, { accessibilityRole: "alert", style: [styles.note, {
95
+ backgroundColor: colors.dangerSoft
96
+ }], children: [
97
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "alert-circle-outline", size: 16, color: colors.dangerText }),
98
+ /* @__PURE__ */ jsx(Text, { style: [styles.noteText, {
99
+ color: colors.dangerText
100
+ }], children: label })
101
+ ] });
102
+ }
103
+ function useDisconnect({
104
+ binding,
105
+ reload
106
+ }) {
107
+ const {
108
+ revoke
109
+ } = useChannelActions();
110
+ const [busy, setBusy] = useState(false);
111
+ const [error, setError] = useState();
112
+ const disconnect = useCallback(async () => {
113
+ if (!binding) return;
114
+ setBusy(true);
115
+ setError(void 0);
116
+ try {
117
+ if (!await revoke(binding.id)) throw new Error("Could not disconnect. Please try again.");
118
+ await reload();
119
+ } catch (err) {
120
+ setError(errorText(err));
121
+ } finally {
122
+ setBusy(false);
123
+ }
124
+ }, [binding, reload, revoke]);
125
+ return {
126
+ disconnect,
127
+ busy,
128
+ error
129
+ };
130
+ }
131
+ function AlreadyConnected({
132
+ channel,
133
+ binding,
134
+ colors,
135
+ reload,
136
+ onPairAnother
137
+ }) {
138
+ var _a;
139
+ const {
140
+ disconnect,
141
+ busy,
142
+ error
143
+ } = useDisconnect({
144
+ binding,
145
+ reload
146
+ });
147
+ const name = ((_a = binding.externalUserName) == null ? void 0 : _a.trim()) || binding.externalChatId;
148
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
149
+ /* @__PURE__ */ jsx(Linked, { label: `Connected to ${channel.name} as ${name}`, colors }),
150
+ /* @__PURE__ */ jsx(Button, { label: "Disconnect", tone: "danger", colors, busy, onPress: () => void disconnect() }),
151
+ /* @__PURE__ */ jsx(Button, { label: "Pair another account", tone: "line", colors, disabled: busy, onPress: onPairAnother }),
152
+ error ? /* @__PURE__ */ jsx(Problem, { label: error, colors }) : null
153
+ ] });
154
+ }
155
+ function AgentsPanel({
156
+ channel,
157
+ binding,
158
+ colors,
159
+ ensureChatSessionId,
160
+ onDone,
161
+ reload
162
+ }) {
163
+ var _a, _b;
164
+ const whatsApp = channel.id === "whatsapp";
165
+ const smsOnly = !whatsApp && Platform.OS === "android";
166
+ const messages = useMessagesRecipient({
167
+ skip: whatsApp,
168
+ smsOnly
169
+ });
170
+ const whatsAppAddress = useWhatsAppRecipient({
171
+ skip: !whatsApp
172
+ });
173
+ const {
174
+ address: recipient,
175
+ loading,
176
+ error: recipientError,
177
+ refetch
178
+ } = whatsApp ? whatsAppAddress : messages;
179
+ const appName = smsOnly ? "Messages" : channel.name;
180
+ const linkedThing = smsOnly ? "phone" : channel.name;
181
+ const {
182
+ bindToChat,
183
+ generateToken
184
+ } = useChannelActions();
185
+ const {
186
+ disconnect,
187
+ busy: unlinking,
188
+ error: unlinkError
189
+ } = useDisconnect({
190
+ binding,
191
+ reload
192
+ });
193
+ const [selected, setSelected] = useState(null);
194
+ const [phase, setPhase] = useState("idle");
195
+ const [plan, setPlan] = useState(null);
196
+ const [href, setHref] = useState();
197
+ const [token, setToken] = useState();
198
+ const [expiresAt, setExpiresAt] = useState();
199
+ const [chatSessionId, setChatSessionId] = useState(null);
200
+ const [refusal, setRefusal] = useState(null);
201
+ const [error, setError] = useState();
202
+ const expiry = useExpiryLabel(expiresAt);
203
+ const ignoreIds = useRef(new Set(binding ? [binding.id] : [])).current;
204
+ const closeTimer = useRef(void 0);
205
+ useEffect(() => () => clearTimeout(closeTimer.current), []);
206
+ const finish = useCallback((delay) => {
207
+ setPhase("linked");
208
+ closeTimer.current = setTimeout(onDone, delay);
209
+ }, [onDone]);
210
+ const pick = useCallback(async (agent) => {
211
+ if (phase === "preparing") return;
212
+ setSelected(agent);
213
+ setError(void 0);
214
+ setRefusal(null);
215
+ setPhase("preparing");
216
+ try {
217
+ const sessionId = ensureChatSessionId();
218
+ if (!sessionId) throw new Error("Your workspace is still loading. Try again in a moment.");
219
+ if (!recipient) throw new Error(`${appName} isn\u2019t available right now. Try again in a minute.`);
220
+ let next;
221
+ if (binding) {
222
+ if (!await bindToChat(binding, sessionId)) {
223
+ throw new Error(`Could not link your ${linkedThing} to this chat. Please try again.`);
224
+ }
225
+ next = planFirstMessage(agent, {
226
+ alreadyLinked: true
227
+ });
228
+ } else {
229
+ const result = await generateToken(channel.type, sessionId);
230
+ if (!(result == null ? void 0 : result.token)) throw new Error("Could not start the link. Please try again.");
231
+ setToken(result.token);
232
+ setExpiresAt(result.expiresAt);
233
+ next = planFirstMessage(agent, {
234
+ alreadyLinked: false,
235
+ pairingToken: result.token
236
+ });
237
+ }
238
+ const link = whatsApp ? buildWhatsAppHref(recipient, next.body) : buildImessageHref(recipient, next.body);
239
+ setChatSessionId(sessionId);
240
+ setPlan(next);
241
+ setHref(link);
242
+ await Linking.openURL(link).catch(() => {
243
+ throw new Error(`Could not open ${appName} on this device.`);
244
+ });
245
+ if (next.kind === "linked") finish(LINKED_CLOSE_MS);
246
+ else setPhase("opened");
247
+ } catch (err) {
248
+ setError(errorText(err));
249
+ setPhase("idle");
250
+ }
251
+ }, [phase, ensureChatSessionId, recipient, appName, binding, bindToChat, linkedThing, generateToken, channel.type, whatsApp, finish]);
252
+ usePairingWatcher({
253
+ enabled: phase === "opened" && (plan == null ? void 0 : plan.kind) === "first-contact",
254
+ channelType: channel.type,
255
+ chatSessionId,
256
+ ignoreIds,
257
+ token,
258
+ onPaired: () => {
259
+ void reload();
260
+ finish(PAIRED_CLOSE_MS);
261
+ },
262
+ onRefused: setRefusal
263
+ });
264
+ const reset = () => {
265
+ clearTimeout(closeTimer.current);
266
+ setSelected(null);
267
+ setPlan(null);
268
+ setHref(void 0);
269
+ setToken(void 0);
270
+ setExpiresAt(void 0);
271
+ setRefusal(null);
272
+ setError(void 0);
273
+ setPhase("idle");
274
+ };
275
+ if (selected && plan && href && (phase === "opened" || phase === "linked")) {
276
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
277
+ /* @__PURE__ */ jsxs(View, { style: styles.centered, children: [
278
+ /* @__PURE__ */ jsx(Image, { source: LUCY_PHOTO, accessibilityIgnoresInvertColors: true, style: styles.avatarLarge }),
279
+ /* @__PURE__ */ jsxs(Text, { style: [styles.strong, {
280
+ color: colors.text
281
+ }], children: [
282
+ "Say \u201C",
283
+ selected.greeting,
284
+ "\u201D to ",
285
+ selected.name
286
+ ] }),
287
+ /* @__PURE__ */ jsxs(Text, { style: [styles.body, styles.centerText, {
288
+ color: colors.textMuted
289
+ }], children: [
290
+ appName,
291
+ " opened with \u201C",
292
+ selected.greeting,
293
+ "\u201D ready to send",
294
+ plan.kind === "first-contact" ? `. Sending it links your ${linkedThing} to Yantra` : "",
295
+ ".",
296
+ " ",
297
+ selected.name,
298
+ " replies there and in this chat."
299
+ ] })
300
+ ] }),
301
+ /* @__PURE__ */ jsx(Button, { label: `Open ${appName}`, colors, onPress: () => void Linking.openURL(href) }),
302
+ phase === "linked" ? /* @__PURE__ */ jsx(Linked, { label: "Linked to this chat", colors }) : null,
303
+ phase !== "linked" && refusal ? /* @__PURE__ */ jsx(Problem, { label: pairingRefusalMessage(refusal, linkedThing), colors }) : null,
304
+ phase !== "linked" && !refusal ? /* @__PURE__ */ jsx(Waiting, { label: `Waiting for your message in ${appName}\u2026`, colors }) : null,
305
+ plan.kind === "first-contact" && phase !== "linked" && expiry ? /* @__PURE__ */ jsx(Text, { style: [styles.caption, {
306
+ color: colors.textMuted
307
+ }], children: expiry }) : null,
308
+ /* @__PURE__ */ jsx(Button, { label: "Pick a different agent", tone: "line", colors, onPress: reset })
309
+ ] });
310
+ }
311
+ const linkedAs = ((_a = binding == null ? void 0 : binding.externalUserName) == null ? void 0 : _a.trim()) || ((_b = binding == null ? void 0 : binding.externalUserId) == null ? void 0 : _b.trim());
312
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
313
+ linkedAs ? /* @__PURE__ */ jsxs(Text, { style: [styles.body, {
314
+ color: colors.textMuted
315
+ }], children: [
316
+ "Linked as ",
317
+ /* @__PURE__ */ jsx(Text, { style: {
318
+ color: colors.text
319
+ }, children: linkedAs }),
320
+ "."
321
+ ] }) : null,
322
+ AGENTS.map((agent) => {
323
+ const busy = phase === "preparing" && (selected == null ? void 0 : selected.id) === agent.id;
324
+ return /* @__PURE__ */ jsxs(Pressable, { onPress: () => void pick(agent), disabled: phase === "preparing" || !recipient, accessibilityRole: "button", accessibilityLabel: `${agent.name}, ${agent.role}`, style: ({
325
+ pressed
326
+ }) => [styles.agent, {
327
+ borderColor: colors.border
328
+ }, (pressed || !recipient) && styles.dim], children: [
329
+ /* @__PURE__ */ jsx(Image, { source: LUCY_PHOTO, accessibilityIgnoresInvertColors: true, style: styles.avatar }),
330
+ /* @__PURE__ */ jsxs(View, { style: styles.flex, children: [
331
+ /* @__PURE__ */ jsx(Text, { style: [styles.strong, {
332
+ color: colors.text
333
+ }], children: agent.name }),
334
+ /* @__PURE__ */ jsxs(Text, { numberOfLines: 1, style: [styles.caption, styles.left, {
335
+ color: colors.textMuted
336
+ }], children: [
337
+ agent.role,
338
+ " \xB7 says \u201C",
339
+ agent.greeting,
340
+ "\u201D for you"
341
+ ] })
342
+ ] }),
343
+ busy ? /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: colors.textMuted }) : /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-right", size: 18, color: colors.textMuted })
344
+ ] }, agent.id);
345
+ }),
346
+ !recipient && loading ? /* @__PURE__ */ jsx(Waiting, { label: `Finding ${appName}\u2026`, colors }) : null,
347
+ !recipient && !loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
348
+ /* @__PURE__ */ jsx(Problem, { label: recipientError ? `Couldn\u2019t reach ${appName}: ${recipientError.message}` : `${appName} isn\u2019t set up on this server yet.`, colors }),
349
+ /* @__PURE__ */ jsx(Button, { label: "Try again", tone: "line", colors, onPress: () => void refetch() })
350
+ ] }) : null,
351
+ error ? /* @__PURE__ */ jsx(Problem, { label: error, colors }) : null,
352
+ binding ? /* @__PURE__ */ jsx(Button, { label: `Unlink ${channel.name}`, tone: "danger", colors, busy: unlinking, onPress: () => void disconnect() }) : null,
353
+ unlinkError ? /* @__PURE__ */ jsx(Problem, { label: unlinkError, colors }) : null
354
+ ] });
355
+ }
356
+ function PairingPanel({
357
+ channel,
358
+ binding,
359
+ colors,
360
+ ensureChatSessionId,
361
+ onDone,
362
+ reload
363
+ }) {
364
+ const {
365
+ generateToken
366
+ } = useChannelActions();
367
+ const [pairAnother, setPairAnother] = useState(false);
368
+ const [link, setLink] = useState(null);
369
+ const [chatSessionId, setChatSessionId] = useState(null);
370
+ const [busy, setBusy] = useState(false);
371
+ const [paired, setPaired] = useState(false);
372
+ const [error, setError] = useState();
373
+ const expiry = useExpiryLabel(link == null ? void 0 : link.expiresAt);
374
+ const ignoreIds = useMemo(() => new Set(binding ? [binding.id] : []), [binding]);
375
+ const showConnected = Boolean(binding) && !pairAnother && !paired;
376
+ const generate = useCallback(async () => {
377
+ setBusy(true);
378
+ setError(void 0);
379
+ try {
380
+ const sessionId = ensureChatSessionId();
381
+ if (!sessionId) throw new Error("Your workspace is still loading. Try again in a moment.");
382
+ const result = await generateToken(channel.type, sessionId);
383
+ if (!(result == null ? void 0 : result.token)) throw new Error("Could not start pairing. Please try again.");
384
+ setChatSessionId(sessionId);
385
+ setLink(result);
386
+ } catch (err) {
387
+ setError(errorText(err));
388
+ } finally {
389
+ setBusy(false);
390
+ }
391
+ }, [channel.type, ensureChatSessionId, generateToken]);
392
+ useEffect(() => {
393
+ if (!showConnected && !link) void generate();
394
+ }, [showConnected]);
395
+ usePairingWatcher({
396
+ enabled: Boolean(link) && !paired && !showConnected,
397
+ channelType: channel.type,
398
+ chatSessionId,
399
+ ignoreIds,
400
+ onPaired: () => {
401
+ setPaired(true);
402
+ void reload();
403
+ setTimeout(onDone, PAIRED_CLOSE_MS);
404
+ }
405
+ });
406
+ if (showConnected && binding) {
407
+ return /* @__PURE__ */ jsx(AlreadyConnected, { channel, binding, colors, reload, onPairAnother: () => setPairAnother(true) });
408
+ }
409
+ const expired = expiry == null ? void 0 : expiry.startsWith("Link expired");
410
+ const qrData = (link == null ? void 0 : link.deepLink) || (link == null ? void 0 : link.token);
411
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
412
+ (link == null ? void 0 : link.deepLink) && !expired ? /* @__PURE__ */ jsx(Button, { label: `Open in ${channel.name}`, colors, onPress: () => void Linking.openURL(link.deepLink) }) : null,
413
+ qrData ? /* @__PURE__ */ jsx(View, { style: [styles.qr, expired && styles.dim], children: /* @__PURE__ */ jsx(Image, { source: {
414
+ uri: qrImageUrl(qrData)
415
+ }, accessibilityLabel: "Pairing QR code", style: styles.qrImage }) }) : null,
416
+ expiry ? /* @__PURE__ */ jsx(Text, { style: [styles.caption, {
417
+ color: colors.textMuted
418
+ }], children: expiry }) : null,
419
+ paired ? /* @__PURE__ */ jsx(Linked, { label: "Paired successfully", colors }) : null,
420
+ !paired && link && !expired ? /* @__PURE__ */ jsx(Waiting, { label: `Waiting for you to tap Start in ${channel.name}\u2026`, colors }) : null,
421
+ error ? /* @__PURE__ */ jsx(Problem, { label: error, colors }) : null,
422
+ !paired && (expired || error) ? /* @__PURE__ */ jsx(Button, { label: "Regenerate", tone: "line", colors, busy, onPress: () => void generate() }) : null
423
+ ] });
424
+ }
425
+ function OAuthPanel({
426
+ channel,
427
+ binding,
428
+ colors,
429
+ ensureChatSessionId,
430
+ onDone,
431
+ reload
432
+ }) {
433
+ const {
434
+ startOAuth
435
+ } = useChannelActions();
436
+ const [pairAnother, setPairAnother] = useState(false);
437
+ const [opened, setOpened] = useState(false);
438
+ const [busy, setBusy] = useState(false);
439
+ const [paired, setPaired] = useState(false);
440
+ const [chatSessionId, setChatSessionId] = useState(null);
441
+ const [error, setError] = useState();
442
+ const ignoreIds = useMemo(() => new Set(binding ? [binding.id] : []), [binding]);
443
+ const start = useCallback(async () => {
444
+ setBusy(true);
445
+ setError(void 0);
446
+ try {
447
+ const sessionId = ensureChatSessionId();
448
+ if (!sessionId) throw new Error("Your workspace is still loading. Try again in a moment.");
449
+ const url = await startOAuth(channel.id === "discord" ? "discord" : "slack", sessionId);
450
+ if (!url) throw new Error("No authorization link came back. Please try again.");
451
+ setChatSessionId(sessionId);
452
+ setOpened(true);
453
+ await WebBrowser.openBrowserAsync(url);
454
+ } catch (err) {
455
+ setError(errorText(err));
456
+ } finally {
457
+ setBusy(false);
458
+ }
459
+ }, [channel.id, ensureChatSessionId, startOAuth]);
460
+ usePairingWatcher({
461
+ enabled: opened && !paired,
462
+ channelType: channel.type,
463
+ chatSessionId,
464
+ ignoreIds,
465
+ onPaired: () => {
466
+ setPaired(true);
467
+ void reload();
468
+ setTimeout(onDone, PAIRED_CLOSE_MS);
469
+ }
470
+ });
471
+ if (binding && !pairAnother && !paired) {
472
+ return /* @__PURE__ */ jsx(AlreadyConnected, { channel, binding, colors, reload, onPairAnother: () => setPairAnother(true) });
473
+ }
474
+ if (paired) return /* @__PURE__ */ jsx(Linked, { label: `Connected to ${channel.name}`, colors });
475
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
476
+ /* @__PURE__ */ jsx(Button, { label: opened ? `Open ${channel.name} again` : `Add to ${channel.name}`, colors, busy, onPress: () => void start() }),
477
+ opened ? /* @__PURE__ */ jsx(Waiting, { label: `Waiting for authorization in ${channel.name}\u2026`, colors }) : null,
478
+ error ? /* @__PURE__ */ jsx(Problem, { label: error, colors }) : null
479
+ ] });
480
+ }
481
+ function ConnectAppsSheet({
482
+ visible,
483
+ isDark,
484
+ initialChannel,
485
+ ensureChatSessionId,
486
+ onClose
487
+ }) {
488
+ const colors = mobileColors(isDark);
489
+ const insets = useSafeAreaInsets();
490
+ const {
491
+ bindings,
492
+ loading,
493
+ reload
494
+ } = useChannelBindings({
495
+ skip: !visible
496
+ });
497
+ const [channelId, setChannelId] = useState(initialChannel != null ? initialChannel : null);
498
+ useEffect(() => {
499
+ if (visible) {
500
+ setChannelId(initialChannel != null ? initialChannel : null);
501
+ void reload();
502
+ }
503
+ }, [visible, initialChannel, reload]);
504
+ const channel = CHANNELS.find((item) => item.id === channelId);
505
+ const bindingFor = (item) => bindings.find((binding) => binding.channelType === item.type);
506
+ const panelProps = channel ? {
507
+ channel,
508
+ binding: bindingFor(channel),
509
+ colors,
510
+ ensureChatSessionId,
511
+ onDone: onClose,
512
+ reload
513
+ } : null;
514
+ return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ jsxs(View, { style: styles.scrimWrap, children: [
515
+ /* @__PURE__ */ jsx(Pressable, { style: styles.scrim, onPress: onClose, accessibilityLabel: "Close" }),
516
+ /* @__PURE__ */ jsxs(View, { accessibilityViewIsModal: true, style: [styles.sheet, {
517
+ backgroundColor: colors.surface,
518
+ paddingBottom: Math.max(insets.bottom, 12)
519
+ }], children: [
520
+ /* @__PURE__ */ jsx(View, { style: [styles.grabber, {
521
+ backgroundColor: colors.border
522
+ }] }),
523
+ /* @__PURE__ */ jsxs(View, { style: styles.head, children: [
524
+ channel && !initialChannel ? /* @__PURE__ */ jsx(Pressable, { onPress: () => setChannelId(null), hitSlop: 10, accessibilityRole: "button", accessibilityLabel: "Back to apps", style: styles.back, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "chevron-left", size: 24, color: colors.text }) }) : null,
525
+ channel ? /* @__PURE__ */ jsx(ChannelIcon, { id: channel.id, size: 24, ink: colors.text }) : null,
526
+ /* @__PURE__ */ jsxs(View, { style: styles.flex, children: [
527
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles.title, {
528
+ color: colors.text
529
+ }], children: channel ? `Connect ${channel.name}` : "Connect apps" }),
530
+ /* @__PURE__ */ jsx(Text, { style: [styles.body, {
531
+ color: colors.textMuted
532
+ }], children: channel ? channel.description : "Chat with Yantra from the apps you already use." })
533
+ ] }),
534
+ /* @__PURE__ */ jsx(Pressable, { onPress: onClose, hitSlop: 10, accessibilityRole: "button", accessibilityLabel: "Close", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 22, color: colors.textMuted }) })
535
+ ] }),
536
+ /* @__PURE__ */ jsxs(ScrollView, { style: styles.scroll, contentContainerStyle: styles.scrollBody, keyboardShouldPersistTaps: "handled", children: [
537
+ !channel ? CHANNELS.map((item) => {
538
+ const connected = Boolean(bindingFor(item));
539
+ return /* @__PURE__ */ jsxs(Pressable, { onPress: () => setChannelId(item.id), accessibilityRole: "button", accessibilityLabel: connected ? `${item.name}, connected` : item.name, style: ({
540
+ pressed
541
+ }) => [styles.row, pressed && styles.dim], children: [
542
+ /* @__PURE__ */ jsx(View, { style: [styles.rowIcon, {
543
+ backgroundColor: isDark ? "#334155" : "#f4f4f5"
544
+ }], children: /* @__PURE__ */ jsx(ChannelIcon, { id: item.id, ink: colors.text }) }),
545
+ /* @__PURE__ */ jsx(Text, { style: [styles.rowName, {
546
+ color: colors.text
547
+ }], children: item.name }),
548
+ loading && !bindings.length ? /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: colors.textMuted }) : connected ? /* @__PURE__ */ jsxs(View, { style: styles.connected, children: [
549
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "check-circle", size: 14, color: colors.successText }),
550
+ /* @__PURE__ */ jsx(Text, { style: [styles.connectedText, {
551
+ color: colors.successText
552
+ }], children: "Connected" })
553
+ ] }) : /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "chevron-right", size: 20, color: colors.textMuted })
554
+ ] }, item.id);
555
+ }) : null,
556
+ (panelProps == null ? void 0 : panelProps.channel.flow) === "agents" ? /* @__PURE__ */ jsx(AgentsPanel, __spreadValues({}, panelProps), panelProps.channel.id) : null,
557
+ (panelProps == null ? void 0 : panelProps.channel.flow) === "pairing" ? /* @__PURE__ */ jsx(PairingPanel, __spreadValues({}, panelProps), panelProps.channel.id) : null,
558
+ (panelProps == null ? void 0 : panelProps.channel.flow) === "oauth" ? /* @__PURE__ */ jsx(OAuthPanel, __spreadValues({}, panelProps), panelProps.channel.id) : null
559
+ ] })
560
+ ] })
561
+ ] }) });
562
+ }
563
+ const styles = StyleSheet.create({
564
+ scrimWrap: {
565
+ flex: 1,
566
+ justifyContent: "flex-end"
567
+ },
568
+ scrim: __spreadProps(__spreadValues({}, StyleSheet.absoluteFillObject), {
569
+ backgroundColor: "rgba(0,0,0,0.5)"
570
+ }),
571
+ sheet: {
572
+ maxHeight: "85%",
573
+ width: "100%",
574
+ maxWidth: 560,
575
+ alignSelf: "center",
576
+ borderTopLeftRadius: 16,
577
+ borderTopRightRadius: 16
578
+ },
579
+ grabber: {
580
+ alignSelf: "center",
581
+ width: 36,
582
+ height: 4,
583
+ marginTop: 8,
584
+ borderRadius: 2
585
+ },
586
+ head: {
587
+ flexDirection: "row",
588
+ alignItems: "flex-start",
589
+ gap: 10,
590
+ paddingHorizontal: 20,
591
+ paddingTop: 12,
592
+ paddingBottom: 8
593
+ },
594
+ back: {
595
+ marginLeft: -6
596
+ },
597
+ flex: {
598
+ flex: 1,
599
+ minWidth: 0
600
+ },
601
+ title: {
602
+ fontSize: 16,
603
+ fontWeight: "600"
604
+ },
605
+ body: {
606
+ marginTop: 2,
607
+ fontSize: 13,
608
+ lineHeight: 18
609
+ },
610
+ scroll: {
611
+ flexGrow: 0
612
+ },
613
+ scrollBody: {
614
+ paddingHorizontal: 16,
615
+ paddingTop: 8,
616
+ paddingBottom: 16,
617
+ gap: 10
618
+ },
619
+ row: {
620
+ flexDirection: "row",
621
+ alignItems: "center",
622
+ gap: 12,
623
+ minHeight: 56
624
+ },
625
+ rowIcon: {
626
+ width: 40,
627
+ height: 40,
628
+ borderRadius: 12,
629
+ alignItems: "center",
630
+ justifyContent: "center"
631
+ },
632
+ rowName: {
633
+ flex: 1,
634
+ fontSize: 15,
635
+ fontWeight: "500"
636
+ },
637
+ connected: {
638
+ flexDirection: "row",
639
+ alignItems: "center",
640
+ gap: 4
641
+ },
642
+ connectedText: {
643
+ fontSize: 12,
644
+ fontWeight: "500"
645
+ },
646
+ agent: {
647
+ flexDirection: "row",
648
+ alignItems: "center",
649
+ gap: 12,
650
+ padding: 12,
651
+ borderRadius: 12,
652
+ borderWidth: 1
653
+ },
654
+ avatar: {
655
+ width: 48,
656
+ height: 48,
657
+ borderRadius: 24
658
+ },
659
+ avatarLarge: {
660
+ width: 80,
661
+ height: 80,
662
+ borderRadius: 40
663
+ },
664
+ centered: {
665
+ alignItems: "center",
666
+ gap: 8
667
+ },
668
+ centerText: {
669
+ textAlign: "center"
670
+ },
671
+ strong: {
672
+ fontSize: 15,
673
+ fontWeight: "600"
674
+ },
675
+ caption: {
676
+ fontSize: 12,
677
+ lineHeight: 16,
678
+ textAlign: "center"
679
+ },
680
+ left: {
681
+ textAlign: "left"
682
+ },
683
+ button: {
684
+ flexDirection: "row",
685
+ alignItems: "center",
686
+ justifyContent: "center",
687
+ gap: 8,
688
+ minHeight: 44,
689
+ paddingHorizontal: 16,
690
+ borderRadius: 12
691
+ },
692
+ buttonLabel: {
693
+ fontSize: 14,
694
+ fontWeight: "600"
695
+ },
696
+ note: {
697
+ flexDirection: "row",
698
+ alignItems: "center",
699
+ gap: 8,
700
+ padding: 12,
701
+ borderRadius: 12
702
+ },
703
+ noteText: {
704
+ flex: 1,
705
+ fontSize: 13,
706
+ lineHeight: 18
707
+ },
708
+ qr: {
709
+ alignSelf: "center",
710
+ padding: 12,
711
+ borderRadius: 12,
712
+ backgroundColor: "#fff"
713
+ },
714
+ qrImage: {
715
+ width: 180,
716
+ height: 180
717
+ },
718
+ dim: {
719
+ opacity: 0.6
720
+ }
721
+ });export{ConnectAppsSheet};//# sourceMappingURL=ConnectAppsSheet.js.map