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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/lib/components/CustomDrawer.js +17 -1
  2. package/lib/components/CustomDrawer.js.map +1 -1
  3. package/lib/compute.js +57 -1
  4. package/lib/compute.js.map +1 -1
  5. package/lib/config/env-config.js +11 -1
  6. package/lib/config/env-config.js.map +1 -1
  7. package/lib/features/agent-chat/NativeAgentChat.js +7 -0
  8. package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
  9. package/lib/features/canvas/extendVideo.js +5 -1
  10. package/lib/features/canvas/extendVideo.js.map +1 -1
  11. package/lib/features/canvas/workflow/StepSheet.js +18 -1
  12. package/lib/features/canvas/workflow/StepSheet.js.map +1 -1
  13. package/lib/features/canvas/workflow/workflowSteps.js +102 -31
  14. package/lib/features/canvas/workflow/workflowSteps.js.map +1 -1
  15. package/lib/features/chat/ComposerMicSend.js +35 -0
  16. package/lib/features/chat/ComposerMicSend.js.map +1 -0
  17. package/lib/features/chat/ComposerModeSwitch.js +64 -1
  18. package/lib/features/chat/ComposerModeSwitch.js.map +1 -1
  19. package/lib/features/chat/askUser.js +6 -1
  20. package/lib/features/chat/askUser.js.map +1 -1
  21. package/lib/features/connectors/ConnectorSheet.js +443 -0
  22. package/lib/features/connectors/ConnectorSheet.js.map +1 -0
  23. package/lib/features/connectors/ConnectorsPage.js +320 -0
  24. package/lib/features/connectors/ConnectorsPage.js.map +1 -0
  25. package/lib/features/connectors/connectConnector.js +278 -0
  26. package/lib/features/connectors/connectConnector.js.map +1 -0
  27. package/lib/features/connectors/connectorCatalog.js +222 -0
  28. package/lib/features/connectors/connectorCatalog.js.map +1 -0
  29. package/lib/features/connectors/useConnectorCatalog.js +153 -0
  30. package/lib/features/connectors/useConnectorCatalog.js.map +1 -0
  31. package/lib/features/home/needsYou/HomeNeedsYou.js +618 -0
  32. package/lib/features/home/needsYou/HomeNeedsYou.js.map +1 -0
  33. package/lib/features/home/needsYou/chatFollowUps.js +333 -0
  34. package/lib/features/home/needsYou/chatFollowUps.js.map +1 -0
  35. package/lib/features/home/needsYou/format.js +47 -0
  36. package/lib/features/home/needsYou/format.js.map +1 -0
  37. package/lib/features/home/needsYou/historyText.js +40 -0
  38. package/lib/features/home/needsYou/historyText.js.map +1 -0
  39. package/lib/features/home/needsYou/inboxHighlights.js +152 -0
  40. package/lib/features/home/needsYou/inboxHighlights.js.map +1 -0
  41. package/lib/features/home/needsYou/panelsSettings.js +71 -0
  42. package/lib/features/home/needsYou/panelsSettings.js.map +1 -0
  43. package/lib/features/home/needsYou/ported/commandConfirmProtocol.js +13 -0
  44. package/lib/features/home/needsYou/ported/commandConfirmProtocol.js.map +1 -0
  45. package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js +91 -0
  46. package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js.map +1 -0
  47. package/lib/features/home/needsYou/ported/resultCardModels.js +659 -0
  48. package/lib/features/home/needsYou/ported/resultCardModels.js.map +1 -0
  49. package/lib/features/home/needsYou/types.js +1 -0
  50. package/lib/features/home/needsYou/types.js.map +1 -0
  51. package/lib/features/home/needsYou/useChatFollowUps.js +149 -0
  52. package/lib/features/home/needsYou/useChatFollowUps.js.map +1 -0
  53. package/lib/features/home/needsYou/useHomeBriefing.js +68 -0
  54. package/lib/features/home/needsYou/useHomeBriefing.js.map +1 -0
  55. package/lib/features/home/needsYou/useInboxHighlights.js +173 -0
  56. package/lib/features/home/needsYou/useInboxHighlights.js.map +1 -0
  57. package/lib/features/home/needsYou/usePanelsSettings.js +105 -0
  58. package/lib/features/home/needsYou/usePanelsSettings.js.map +1 -0
  59. package/lib/features/shopping/DealCard.js +8 -1
  60. package/lib/features/shopping/DealCard.js.map +1 -1
  61. package/lib/features/shopping/DealRails.js +24 -7
  62. package/lib/features/shopping/DealRails.js.map +1 -1
  63. package/lib/features/shopping/DealsPanel.js +1 -1
  64. package/lib/features/shopping/DealsPanel.js.map +1 -1
  65. package/lib/features/shopping/HolidayDealsPanel.js +529 -0
  66. package/lib/features/shopping/HolidayDealsPanel.js.map +1 -0
  67. package/lib/features/shopping/HolidayDealsParts.js +954 -0
  68. package/lib/features/shopping/HolidayDealsParts.js.map +1 -0
  69. package/lib/features/shopping/HolidayOffers.js +351 -0
  70. package/lib/features/shopping/HolidayOffers.js.map +1 -0
  71. package/lib/features/shopping/ProductCard.js +80 -14
  72. package/lib/features/shopping/ProductCard.js.map +1 -1
  73. package/lib/features/shopping/ProductDetailSheet.js +22 -3
  74. package/lib/features/shopping/ProductDetailSheet.js.map +1 -1
  75. package/lib/features/shopping/SavedPanel.js +341 -5
  76. package/lib/features/shopping/SavedPanel.js.map +1 -1
  77. package/lib/features/shopping/SearchResults.js +8 -2
  78. package/lib/features/shopping/SearchResults.js.map +1 -1
  79. package/lib/features/shopping/ShoppingAgentChatPane.js +12 -0
  80. package/lib/features/shopping/ShoppingAgentChatPane.js.map +1 -1
  81. package/lib/features/shopping/ShoppingExperience.js +56 -19
  82. package/lib/features/shopping/ShoppingExperience.js.map +1 -1
  83. package/lib/features/shopping/TrendingSections.js +13 -4
  84. package/lib/features/shopping/TrendingSections.js.map +1 -1
  85. package/lib/features/shopping/WatchlistPanel.js +61 -5
  86. package/lib/features/shopping/WatchlistPanel.js.map +1 -1
  87. package/lib/features/shopping/catalog.js +41 -2
  88. package/lib/features/shopping/catalog.js.map +1 -1
  89. package/lib/features/shopping/chat/brainRouter.js +14 -0
  90. package/lib/features/shopping/chat/brainRouter.js.map +1 -1
  91. package/lib/features/shopping/chat/shoppingTurn.js +88 -16
  92. package/lib/features/shopping/chat/shoppingTurn.js.map +1 -1
  93. package/lib/features/shopping/hooks/useHolidayDeals.js +388 -0
  94. package/lib/features/shopping/hooks/useHolidayDeals.js.map +1 -0
  95. package/lib/features/shopping/hooks/useProductMedia.js +33 -6
  96. package/lib/features/shopping/hooks/useProductMedia.js.map +1 -1
  97. package/lib/features/shopping/hooks/useShoppingHistorySync.js +8 -4
  98. package/lib/features/shopping/hooks/useShoppingHistorySync.js.map +1 -1
  99. package/lib/features/shopping/hooks/useTrendingProducts.js +11 -3
  100. package/lib/features/shopping/hooks/useTrendingProducts.js.map +1 -1
  101. package/lib/features/shopping/savedProducts.js +76 -6
  102. package/lib/features/shopping/savedProducts.js.map +1 -1
  103. package/lib/features/shopping/services/aiRelevance.js +212 -0
  104. package/lib/features/shopping/services/aiRelevance.js.map +1 -0
  105. package/lib/features/shopping/services/blackFriday.js +301 -0
  106. package/lib/features/shopping/services/blackFriday.js.map +1 -0
  107. package/lib/features/shopping/services/blackFridayBrowserSites.js +137 -0
  108. package/lib/features/shopping/services/blackFridayBrowserSites.js.map +1 -0
  109. package/lib/features/shopping/services/catalogProductSearch.js +21 -3
  110. package/lib/features/shopping/services/catalogProductSearch.js.map +1 -1
  111. package/lib/features/shopping/services/holidayDeals.js +143 -0
  112. package/lib/features/shopping/services/holidayDeals.js.map +1 -0
  113. package/lib/features/shopping/services/mediaShape.js +7 -0
  114. package/lib/features/shopping/services/mediaShape.js.map +1 -0
  115. package/lib/features/shopping/services/modelStep.js +95 -0
  116. package/lib/features/shopping/services/modelStep.js.map +1 -0
  117. package/lib/features/shopping/services/modelWords.js +14 -0
  118. package/lib/features/shopping/services/modelWords.js.map +1 -0
  119. package/lib/features/shopping/services/productAvailability.js +5 -1
  120. package/lib/features/shopping/services/productAvailability.js.map +1 -1
  121. package/lib/features/shopping/services/productFilters.js +2 -2
  122. package/lib/features/shopping/services/productFilters.js.map +1 -1
  123. package/lib/features/shopping/services/productMedia.js +103 -18
  124. package/lib/features/shopping/services/productMedia.js.map +1 -1
  125. package/lib/features/shopping/services/retailerUrl.js +11 -8
  126. package/lib/features/shopping/services/retailerUrl.js.map +1 -1
  127. package/lib/features/shopping/services/salesDealsStore.js +3 -2
  128. package/lib/features/shopping/services/salesDealsStore.js.map +1 -1
  129. package/lib/features/shopping/services/savedReads.js +82 -0
  130. package/lib/features/shopping/services/savedReads.js.map +1 -0
  131. package/lib/features/shopping/services/searchCardFields.js +2 -0
  132. package/lib/features/shopping/services/searchCardFields.js.map +1 -1
  133. package/lib/features/shopping/services/searchRelevance.js +154 -24
  134. package/lib/features/shopping/services/searchRelevance.js.map +1 -1
  135. package/lib/features/shopping/services/secondHand.js +12 -0
  136. package/lib/features/shopping/services/secondHand.js.map +1 -0
  137. package/lib/features/shopping/services/shoppingProductSearch.js +82 -10
  138. package/lib/features/shopping/services/shoppingProductSearch.js.map +1 -1
  139. package/lib/features/shopping/services/shoppingSearchConnectorClient.js +14 -1
  140. package/lib/features/shopping/services/shoppingSearchConnectorClient.js.map +1 -1
  141. package/lib/features/shopping/services/shoppingSubgraph.js +2 -1
  142. package/lib/features/shopping/services/shoppingSubgraph.js.map +1 -1
  143. package/lib/features/shopping/services/storedGalleries.js +130 -0
  144. package/lib/features/shopping/services/storedGalleries.js.map +1 -0
  145. package/lib/features/shopping/services/usedSites.js +263 -0
  146. package/lib/features/shopping/services/usedSites.js.map +1 -0
  147. package/lib/features/shopping/services/verifyProducts.js +3 -3
  148. package/lib/features/shopping/services/verifyProducts.js.map +1 -1
  149. package/lib/features/shopping/services/watchDeal.js +61 -0
  150. package/lib/features/shopping/services/watchDeal.js.map +1 -0
  151. package/lib/features/shopping/shoppingRuntime.js +7 -2
  152. package/lib/features/shopping/shoppingRuntime.js.map +1 -1
  153. package/lib/features/shopping/state/accountCaches.js +20 -0
  154. package/lib/features/shopping/state/accountCaches.js.map +1 -0
  155. package/lib/features/shopping/state/holidayDealsRequest.js +22 -0
  156. package/lib/features/shopping/state/holidayDealsRequest.js.map +1 -0
  157. package/lib/features/shopping/tutorials/ShoppingTutorialDock.js +1 -1
  158. package/lib/features/shopping/tutorials/ShoppingTutorialDock.js.map +1 -1
  159. package/lib/features/shopping/tutorials/shoppingTutorials.js +2 -0
  160. package/lib/features/shopping/tutorials/shoppingTutorials.js.map +1 -1
  161. package/lib/features/shopping/useShoppingSearch.js +74 -18
  162. package/lib/features/shopping/useShoppingSearch.js.map +1 -1
  163. package/lib/features/team-chat/TeamChatExperience.js +474 -0
  164. package/lib/features/team-chat/TeamChatExperience.js.map +1 -0
  165. package/lib/features/team-chat/api/client.js +198 -0
  166. package/lib/features/team-chat/api/client.js.map +1 -0
  167. package/lib/features/team-chat/api/live.js +160 -0
  168. package/lib/features/team-chat/api/live.js.map +1 -0
  169. package/lib/features/team-chat/api/ops.js +241 -0
  170. package/lib/features/team-chat/api/ops.js.map +1 -0
  171. package/lib/features/team-chat/app.js +12 -0
  172. package/lib/features/team-chat/app.js.map +1 -0
  173. package/lib/features/team-chat/components/Avatar.js +107 -0
  174. package/lib/features/team-chat/components/Avatar.js.map +1 -0
  175. package/lib/features/team-chat/components/Composer.js +641 -0
  176. package/lib/features/team-chat/components/Composer.js.map +1 -0
  177. package/lib/features/team-chat/components/Dialogs.js +598 -0
  178. package/lib/features/team-chat/components/Dialogs.js.map +1 -0
  179. package/lib/features/team-chat/components/EmojiPicker.js +165 -0
  180. package/lib/features/team-chat/components/EmojiPicker.js.map +1 -0
  181. package/lib/features/team-chat/components/MessageItem.js +658 -0
  182. package/lib/features/team-chat/components/MessageItem.js.map +1 -0
  183. package/lib/features/team-chat/components/MessageList.js +248 -0
  184. package/lib/features/team-chat/components/MessageList.js.map +1 -0
  185. package/lib/features/team-chat/components/Mrkdwn.js +228 -0
  186. package/lib/features/team-chat/components/Mrkdwn.js.map +1 -0
  187. package/lib/features/team-chat/components/QuickSwitcher.js +215 -0
  188. package/lib/features/team-chat/components/QuickSwitcher.js.map +1 -0
  189. package/lib/features/team-chat/components/ui.js +662 -0
  190. package/lib/features/team-chat/components/ui.js.map +1 -0
  191. package/lib/features/team-chat/nativeTeamChatRegistry.js +15 -0
  192. package/lib/features/team-chat/nativeTeamChatRegistry.js.map +1 -0
  193. package/lib/features/team-chat/state/fetched.js +39 -0
  194. package/lib/features/team-chat/state/fetched.js.map +1 -0
  195. package/lib/features/team-chat/state/lists.js +230 -0
  196. package/lib/features/team-chat/state/lists.js.map +1 -0
  197. package/lib/features/team-chat/state/store.js +1108 -0
  198. package/lib/features/team-chat/state/store.js.map +1 -0
  199. package/lib/features/team-chat/state/useChannelDirectory.js +21 -0
  200. package/lib/features/team-chat/state/useChannelDirectory.js.map +1 -0
  201. package/lib/features/team-chat/theme.js +77 -0
  202. package/lib/features/team-chat/theme.js.map +1 -0
  203. package/lib/features/team-chat/utils/composeText.js +72 -0
  204. package/lib/features/team-chat/utils/composeText.js.map +1 -0
  205. package/lib/features/team-chat/utils/emoji.js +369 -0
  206. package/lib/features/team-chat/utils/emoji.js.map +1 -0
  207. package/lib/features/team-chat/utils/format.js +109 -0
  208. package/lib/features/team-chat/utils/format.js.map +1 -0
  209. package/lib/features/team-chat/utils/messageRows.js +24 -0
  210. package/lib/features/team-chat/utils/messageRows.js.map +1 -0
  211. package/lib/features/team-chat/utils/mrkdwn.js +222 -0
  212. package/lib/features/team-chat/utils/mrkdwn.js.map +1 -0
  213. package/lib/features/team-chat/utils/notify.js +47 -0
  214. package/lib/features/team-chat/utils/notify.js.map +1 -0
  215. package/lib/features/team-chat/utils/pickFiles.js +81 -0
  216. package/lib/features/team-chat/utils/pickFiles.js.map +1 -0
  217. package/lib/features/team-chat/views/ActivityView.js +235 -0
  218. package/lib/features/team-chat/views/ActivityView.js.map +1 -0
  219. package/lib/features/team-chat/views/BrowseView.js +179 -0
  220. package/lib/features/team-chat/views/BrowseView.js.map +1 -0
  221. package/lib/features/team-chat/views/ChannelView.js +475 -0
  222. package/lib/features/team-chat/views/ChannelView.js.map +1 -0
  223. package/lib/features/team-chat/views/DetailsPane.js +816 -0
  224. package/lib/features/team-chat/views/DetailsPane.js.map +1 -0
  225. package/lib/features/team-chat/views/DraftsView.js +212 -0
  226. package/lib/features/team-chat/views/DraftsView.js.map +1 -0
  227. package/lib/features/team-chat/views/FilesView.js +152 -0
  228. package/lib/features/team-chat/views/FilesView.js.map +1 -0
  229. package/lib/features/team-chat/views/NewMessageView.js +286 -0
  230. package/lib/features/team-chat/views/NewMessageView.js.map +1 -0
  231. package/lib/features/team-chat/views/PeopleView.js +118 -0
  232. package/lib/features/team-chat/views/PeopleView.js.map +1 -0
  233. package/lib/features/team-chat/views/ProfilePane.js +220 -0
  234. package/lib/features/team-chat/views/ProfilePane.js.map +1 -0
  235. package/lib/features/team-chat/views/SavedView.js +113 -0
  236. package/lib/features/team-chat/views/SavedView.js.map +1 -0
  237. package/lib/features/team-chat/views/SearchView.js +307 -0
  238. package/lib/features/team-chat/views/SearchView.js.map +1 -0
  239. package/lib/features/team-chat/views/Sidebar.js +368 -0
  240. package/lib/features/team-chat/views/Sidebar.js.map +1 -0
  241. package/lib/features/team-chat/views/ThreadPane.js +139 -0
  242. package/lib/features/team-chat/views/ThreadPane.js.map +1 -0
  243. package/lib/features/team-chat/views/ThreadsView.js +157 -0
  244. package/lib/features/team-chat/views/ThreadsView.js.map +1 -0
  245. package/lib/features/webbuilder/WebBuilderExperience.js +276 -42
  246. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  247. package/lib/features/webbuilder/buildFragments.js +10 -4
  248. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  249. package/lib/features/webbuilder/components/AssetChips.js +61 -0
  250. package/lib/features/webbuilder/components/AssetChips.js.map +1 -0
  251. package/lib/features/webbuilder/components/AssetSiteChooser.js +100 -0
  252. package/lib/features/webbuilder/components/AssetSiteChooser.js.map +1 -0
  253. package/lib/features/webbuilder/components/CommentsLayer.js +485 -0
  254. package/lib/features/webbuilder/components/CommentsLayer.js.map +1 -0
  255. package/lib/features/webbuilder/components/Composer.js +16 -2
  256. package/lib/features/webbuilder/components/Composer.js.map +1 -1
  257. package/lib/features/webbuilder/components/ComposerModeSwitch.js +71 -0
  258. package/lib/features/webbuilder/components/ComposerModeSwitch.js.map +1 -0
  259. package/lib/features/webbuilder/components/MyAssetsPicker.js +500 -0
  260. package/lib/features/webbuilder/components/MyAssetsPicker.js.map +1 -0
  261. package/lib/features/webbuilder/components/PlanDocument.js +165 -0
  262. package/lib/features/webbuilder/components/PlanDocument.js.map +1 -0
  263. package/lib/features/webbuilder/components/PlanDraftCard.js +205 -0
  264. package/lib/features/webbuilder/components/PlanDraftCard.js.map +1 -0
  265. package/lib/features/webbuilder/components/PlanView.js +788 -0
  266. package/lib/features/webbuilder/components/PlanView.js.map +1 -0
  267. package/lib/features/webbuilder/components/PreviewConsoleSheet.js +334 -0
  268. package/lib/features/webbuilder/components/PreviewConsoleSheet.js.map +1 -0
  269. package/lib/features/webbuilder/components/PreviewFrame.js +45 -3
  270. package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
  271. package/lib/features/webbuilder/components/PreviewScreen.js +94 -10
  272. package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
  273. package/lib/features/webbuilder/components/ProjectChat.js +84 -14
  274. package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
  275. package/lib/features/webbuilder/components/StudioHome.js +69 -6
  276. package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
  277. package/lib/features/webbuilder/components/StyleDirectionsSheet.js +291 -0
  278. package/lib/features/webbuilder/components/StyleDirectionsSheet.js.map +1 -0
  279. package/lib/features/webbuilder/components/VersionChangesView.js +574 -0
  280. package/lib/features/webbuilder/components/VersionChangesView.js.map +1 -0
  281. package/lib/features/webbuilder/components/VersionPreviewView.js +186 -0
  282. package/lib/features/webbuilder/components/VersionPreviewView.js.map +1 -0
  283. package/lib/features/webbuilder/components/VersionsSheet.js +673 -16
  284. package/lib/features/webbuilder/components/VersionsSheet.js.map +1 -1
  285. package/lib/features/webbuilder/connectorTemplates.js +6 -1
  286. package/lib/features/webbuilder/connectorTemplates.js.map +1 -1
  287. package/lib/features/webbuilder/myAssets.js +101 -0
  288. package/lib/features/webbuilder/myAssets.js.map +1 -0
  289. package/lib/features/webbuilder/planChat.js +146 -0
  290. package/lib/features/webbuilder/planChat.js.map +1 -0
  291. package/lib/features/webbuilder/planDocument.js +89 -0
  292. package/lib/features/webbuilder/planDocument.js.map +1 -0
  293. package/lib/features/webbuilder/planStore.js +55 -0
  294. package/lib/features/webbuilder/planStore.js.map +1 -0
  295. package/lib/features/webbuilder/previewCommentsScript.js +218 -0
  296. package/lib/features/webbuilder/previewCommentsScript.js.map +1 -0
  297. package/lib/features/webbuilder/previewConsoleScript.js +39 -0
  298. package/lib/features/webbuilder/previewConsoleScript.js.map +1 -0
  299. package/lib/features/webbuilder/styleDirections.js +85 -0
  300. package/lib/features/webbuilder/styleDirections.js.map +1 -0
  301. package/lib/features/webbuilder/useCanvasComments.js +335 -0
  302. package/lib/features/webbuilder/useCanvasComments.js.map +1 -0
  303. package/lib/features/webbuilder/useCatalogTemplates.js +37 -0
  304. package/lib/features/webbuilder/useCatalogTemplates.js.map +1 -0
  305. package/lib/features/webbuilder/usePlanMode.js +145 -0
  306. package/lib/features/webbuilder/usePlanMode.js.map +1 -0
  307. package/lib/features/webbuilder/useStyleDirections.js +112 -0
  308. package/lib/features/webbuilder/useStyleDirections.js.map +1 -0
  309. package/lib/features/webbuilder/web/assets/assetsApi.js +174 -0
  310. package/lib/features/webbuilder/web/assets/assetsApi.js.map +1 -0
  311. package/lib/features/webbuilder/web/assets/assetsApi.ts +173 -0
  312. package/lib/features/webbuilder/web/assets/myAssets.js +341 -0
  313. package/lib/features/webbuilder/web/assets/myAssets.js.map +1 -0
  314. package/lib/features/webbuilder/web/assets/myAssets.ts +396 -0
  315. package/lib/features/webbuilder/web/canvas/elementName.js +46 -0
  316. package/lib/features/webbuilder/web/canvas/elementName.js.map +1 -0
  317. package/lib/features/webbuilder/web/canvas/visualEditorBridge.js +95 -0
  318. package/lib/features/webbuilder/web/canvas/visualEditorBridge.js.map +1 -0
  319. package/lib/features/webbuilder/web/chat/agentTurn.js +24 -0
  320. package/lib/features/webbuilder/web/chat/agentTurn.js.map +1 -0
  321. package/lib/features/webbuilder/web/chat/planMode.js +164 -0
  322. package/lib/features/webbuilder/web/chat/planMode.js.map +1 -0
  323. package/lib/features/webbuilder/web/chat/realPlans.js +66 -0
  324. package/lib/features/webbuilder/web/chat/realPlans.js.map +1 -0
  325. package/lib/features/webbuilder/web/comments/comments.js +336 -0
  326. package/lib/features/webbuilder/web/comments/comments.js.map +1 -0
  327. package/lib/features/webbuilder/web/comments/commentsApi.js +59 -0
  328. package/lib/features/webbuilder/web/comments/commentsApi.js.map +1 -0
  329. package/lib/features/webbuilder/web/components/planView.js +21 -0
  330. package/lib/features/webbuilder/web/components/planView.js.map +1 -0
  331. package/lib/features/webbuilder/web/console/consolePanel.js +43 -0
  332. package/lib/features/webbuilder/web/console/consolePanel.js.map +1 -0
  333. package/lib/features/webbuilder/web/console/previewConsole.js +256 -0
  334. package/lib/features/webbuilder/web/console/previewConsole.js.map +1 -0
  335. package/lib/features/webbuilder/web/console/usePreviewConsole.js +147 -0
  336. package/lib/features/webbuilder/web/console/usePreviewConsole.js.map +1 -0
  337. package/lib/features/webbuilder/web/design/directions.js +419 -1
  338. package/lib/features/webbuilder/web/design/directions.js.map +1 -1
  339. package/lib/features/webbuilder/web/history/diffActions.js +222 -0
  340. package/lib/features/webbuilder/web/history/diffActions.js.map +1 -0
  341. package/lib/features/webbuilder/web/history/diffHighlight.js +18 -0
  342. package/lib/features/webbuilder/web/history/diffHighlight.js.map +1 -0
  343. package/lib/features/webbuilder/web/history/versionActions.js +272 -0
  344. package/lib/features/webbuilder/web/history/versionActions.js.map +1 -0
  345. package/lib/features/webbuilder/web/history/versionDiff.js +338 -0
  346. package/lib/features/webbuilder/web/history/versionDiff.js.map +1 -0
  347. package/lib/features/webbuilder/web/history/versionPreview.js +83 -0
  348. package/lib/features/webbuilder/web/history/versionPreview.js.map +1 -0
  349. package/lib/features/webbuilder/web/history/versionPreviewMachine.js +150 -0
  350. package/lib/features/webbuilder/web/history/versionPreviewMachine.js.map +1 -0
  351. package/lib/features/webbuilder/web/history/versions.js +326 -1
  352. package/lib/features/webbuilder/web/history/versions.js.map +1 -1
  353. package/lib/features/webbuilder/web/hosted/hostedTurn.js +36 -0
  354. package/lib/features/webbuilder/web/hosted/hostedTurn.js.map +1 -0
  355. package/lib/features/webbuilder/web/studio/brandKit.js +25 -0
  356. package/lib/features/webbuilder/web/studio/brandKit.js.map +1 -0
  357. package/lib/features/webbuilder/web/utils/promptSafe.js +15 -0
  358. package/lib/features/webbuilder/web/utils/promptSafe.js.map +1 -0
  359. package/lib/features/webbuilder/web/webServices.js +3 -1
  360. package/lib/features/webbuilder/web/webServices.js.map +1 -1
  361. package/lib/index.js +1 -1
  362. package/lib/index.js.map +1 -1
  363. package/lib/routes.json +55 -0
  364. package/lib/screens/Account/index.js +13 -5
  365. package/lib/screens/Account/index.js.map +1 -1
  366. package/lib/screens/Chat/index.js +16 -0
  367. package/lib/screens/Chat/index.js.map +1 -1
  368. package/lib/screens/Home/HomeScreen.js +202 -39
  369. package/lib/screens/Home/HomeScreen.js.map +1 -1
  370. package/lib/screens/Home/components/HomeHero.js +52 -38
  371. package/lib/screens/Home/components/HomeHero.js.map +1 -1
  372. package/lib/screens/Home/components/homeCatalog.js +8 -1
  373. package/lib/screens/Home/components/homeCatalog.js.map +1 -1
  374. package/lib/screens/TeamChat/index.js +41 -0
  375. package/lib/screens/TeamChat/index.js.map +1 -0
  376. package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js +9 -2
  377. package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js.map +1 -1
  378. package/lib/screens/WebBuilderNative/index.js +13 -3
  379. package/lib/screens/WebBuilderNative/index.js.map +1 -1
  380. package/lib/screens/WebBuilderNative/useConnectorTemplates.js +2 -2
  381. package/lib/screens/WebBuilderNative/useConnectorTemplates.js.map +1 -1
  382. package/package.json +4 -4
@@ -0,0 +1,788 @@
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {useState,useRef,useCallback,useEffect,useMemo}from'react';import {Platform,StyleSheet,View,Text,ActivityIndicator,TextInput,ScrollView}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {composePlannerFeedback,composePlanEditsMessage,planVersionLabel,PLAN_NOTE_STATUS_LABEL}from'../web/components/planView.js';import {PlanDocument}from'./PlanDocument.js';import {PrimaryButton,Sheet}from'./ui.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 MONO = Platform.OS === "ios" ? "Menlo" : "monospace";
21
+ function ToolButton({
22
+ icon,
23
+ label,
24
+ onPress,
25
+ on = false,
26
+ primary = false,
27
+ disabled = false,
28
+ theme,
29
+ testID
30
+ }) {
31
+ let colors = {
32
+ fill: theme.card,
33
+ border: theme.border,
34
+ ink: theme.muted
35
+ };
36
+ if (primary) colors = {
37
+ fill: theme.accent,
38
+ border: theme.accent,
39
+ ink: theme.accentInk
40
+ };
41
+ else if (on) colors = {
42
+ fill: theme.accentSoft,
43
+ border: theme.accent,
44
+ ink: theme.accent
45
+ };
46
+ return /* @__PURE__ */ jsxs(Tap, { onPress, disabled, accessibilityRole: "button", accessibilityLabel: label, accessibilityState: {
47
+ disabled,
48
+ selected: on
49
+ }, style: [styles.tool, {
50
+ backgroundColor: colors.fill,
51
+ borderColor: colors.border
52
+ }, disabled && styles.off], pressedStyle: DIM, hitSlop: 4, testID, children: [
53
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 15, color: colors.ink }),
54
+ /* @__PURE__ */ jsx(Text, { style: [styles.toolText, {
55
+ color: colors.ink
56
+ }, primary && styles.bold], children: label })
57
+ ] });
58
+ }
59
+ function noteTone(status, theme) {
60
+ if (status === "draft") return {
61
+ fill: theme.chip,
62
+ ink: theme.ink
63
+ };
64
+ if (status === "applied") return {
65
+ fill: theme.accent,
66
+ ink: theme.accentInk
67
+ };
68
+ return {
69
+ fill: theme.accentSoft,
70
+ ink: theme.accent
71
+ };
72
+ }
73
+ function PlanView({
74
+ channelId,
75
+ creation,
76
+ plans,
77
+ onSendEdits,
78
+ theme,
79
+ bottomInset = 0
80
+ }) {
81
+ var _a, _b;
82
+ const [versions, setVersions] = useState([]);
83
+ const [loading, setLoading] = useState(Boolean(channelId));
84
+ const [loadError, setLoadError] = useState(null);
85
+ const [selectedPlanId, setSelectedPlanId] = useState(null);
86
+ const [versionsOpen, setVersionsOpen] = useState(false);
87
+ const [annotate, setAnnotate] = useState(false);
88
+ const [notes, setNotes] = useState([]);
89
+ const [notesOpen, setNotesOpen] = useState(false);
90
+ const [pending, setPending] = useState(null);
91
+ const [pendingComment, setPendingComment] = useState("");
92
+ const [revising, setRevising] = useState(false);
93
+ const [actionError, setActionError] = useState(null);
94
+ const [statusNote, setStatusNote] = useState(null);
95
+ const noteSeq = useRef(0);
96
+ const [docSize, setDocSize] = useState({
97
+ width: 0,
98
+ height: 0
99
+ });
100
+ const refreshVersions = useCallback(async () => {
101
+ if (!channelId) return;
102
+ try {
103
+ setVersions(await plans.list(channelId));
104
+ setLoadError(null);
105
+ } catch (e) {
106
+ setLoadError(e instanceof Error ? e.message : String(e));
107
+ } finally {
108
+ setLoading(false);
109
+ }
110
+ }, [channelId, plans]);
111
+ useEffect(() => {
112
+ setLoading(Boolean(channelId));
113
+ setSelectedPlanId(null);
114
+ refreshVersions().catch(() => void 0);
115
+ }, [channelId, refreshVersions]);
116
+ const latest = (_a = versions[0]) != null ? _a : null;
117
+ const selected = useMemo(() => {
118
+ var _a2;
119
+ return (_a2 = versions.find((v) => v.planId === selectedPlanId)) != null ? _a2 : latest;
120
+ }, [versions, selectedPlanId, latest]);
121
+ const isLatest = Boolean(selected && latest && selected.planId === latest.planId);
122
+ const canAnnotate = isLatest && !revising;
123
+ useEffect(() => {
124
+ let cancelled = false;
125
+ setNotes([]);
126
+ setPending(null);
127
+ if (!selected) return void 0;
128
+ plans.loadAnnotations(selected).then((loaded) => {
129
+ if (cancelled) return;
130
+ setNotes(loaded);
131
+ noteSeq.current = loaded.reduce((max, a) => Math.max(max, a.id), 0);
132
+ }).catch(() => void 0);
133
+ return () => {
134
+ cancelled = true;
135
+ };
136
+ }, [selected, plans]);
137
+ const persist = useCallback((next) => {
138
+ setNotes(next);
139
+ if (selected) plans.saveAnnotations(selected, next).catch(() => void 0);
140
+ }, [selected, plans]);
141
+ const commitPending = useCallback(() => {
142
+ if (!pending || !selected) return;
143
+ const comment = pendingComment.trim();
144
+ if (!comment) {
145
+ setPending(null);
146
+ return;
147
+ }
148
+ noteSeq.current += 1;
149
+ persist([...notes, {
150
+ id: noteSeq.current,
151
+ planId: selected.planId,
152
+ xPct: pending.xPct,
153
+ yPct: pending.yPct,
154
+ comment,
155
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
156
+ status: "draft"
157
+ }]);
158
+ setPending(null);
159
+ setPendingComment("");
160
+ }, [pending, pendingComment, selected, notes, persist]);
161
+ const drafts = useMemo(() => notes.filter((a) => a.status === "draft"), [notes]);
162
+ const sendable = useMemo(() => notes.filter((a) => a.status === "draft" || a.status === "sent"), [notes]);
163
+ const canSendPlanner = Boolean(drafts.length && plans.submitFeedback && (selected == null ? void 0 : selected.source) === "live" && isLatest && !revising);
164
+ const sendToPlanner = useCallback(async () => {
165
+ if (!selected || !plans.submitFeedback || !drafts.length) return;
166
+ setActionError(null);
167
+ setRevising(true);
168
+ setNotesOpen(false);
169
+ persist(notes.map((a) => a.status === "draft" ? __spreadProps(__spreadValues({}, a), {
170
+ status: "sent"
171
+ }) : a));
172
+ try {
173
+ await plans.submitFeedback(selected, composePlannerFeedback(drafts));
174
+ setStatusNote("Notes sent - the planner is revising the plan.");
175
+ setSelectedPlanId(null);
176
+ await refreshVersions();
177
+ } catch (e) {
178
+ setActionError(e instanceof Error ? e.message : String(e));
179
+ persist(notes.map((a) => a.status === "sent" ? __spreadProps(__spreadValues({}, a), {
180
+ status: "draft"
181
+ }) : a));
182
+ } finally {
183
+ setRevising(false);
184
+ }
185
+ }, [selected, plans, drafts, notes, persist, refreshVersions]);
186
+ const [editing, setEditing] = useState(false);
187
+ const [editText, setEditText] = useState("");
188
+ const planMarkdown = (_b = selected == null ? void 0 : selected.markdown) != null ? _b : null;
189
+ const canEdit = Boolean(planMarkdown && isLatest && !revising);
190
+ const canBuildPlan = Boolean(planMarkdown && !revising);
191
+ useEffect(() => setEditing(false), [selected == null ? void 0 : selected.planId]);
192
+ const saveEdit = useCallback(async () => {
193
+ var _a2;
194
+ if (!channelId || !editText.trim()) return;
195
+ setActionError(null);
196
+ try {
197
+ await plans.savePlan(channelId, editText, (_a2 = selected == null ? void 0 : selected.brief) != null ? _a2 : void 0);
198
+ setEditing(false);
199
+ setSelectedPlanId(null);
200
+ await refreshVersions();
201
+ setStatusNote("Plan saved as a new version.");
202
+ } catch (e) {
203
+ setActionError(e instanceof Error ? e.message : String(e));
204
+ }
205
+ }, [channelId, plans, editText, selected, refreshVersions]);
206
+ const buildThisPlan = useCallback(() => {
207
+ var _a2;
208
+ const md = editing ? editText : planMarkdown;
209
+ if (!(md == null ? void 0 : md.trim())) return;
210
+ plans.buildPlan(md, {
211
+ creation: creation != null ? creation : void 0,
212
+ brief: (_a2 = selected == null ? void 0 : selected.brief) != null ? _a2 : void 0
213
+ });
214
+ setStatusNote("Build started. Follow along in the AI chat.");
215
+ }, [editing, editText, planMarkdown, plans, creation, selected]);
216
+ const applyToBuild = useCallback(() => {
217
+ if (!selected || !sendable.length || !onSendEdits) return;
218
+ setActionError(null);
219
+ if (!onSendEdits(composePlanEditsMessage(selected, sendable))) {
220
+ setActionError("Couldn't send your edits. Try again.");
221
+ return;
222
+ }
223
+ setNotesOpen(false);
224
+ setStatusNote("Edits sent to the AI.");
225
+ persist(notes.map((a) => a.status === "draft" || a.status === "sent" ? __spreadProps(__spreadValues({}, a), {
226
+ status: "queued"
227
+ }) : a));
228
+ }, [selected, sendable, onSendEdits, notes, persist]);
229
+ if (!channelId) {
230
+ return /* @__PURE__ */ jsx(View, { style: styles.center, children: /* @__PURE__ */ jsx(Text, { style: [styles.centerText, {
231
+ color: theme.muted
232
+ }], children: "This build has no channel yet - plans attach to the build conversation." }) });
233
+ }
234
+ if (loading) {
235
+ return /* @__PURE__ */ jsxs(View, { style: styles.center, children: [
236
+ /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.accent }),
237
+ /* @__PURE__ */ jsx(Text, { style: [styles.centerText, {
238
+ color: theme.muted
239
+ }], children: "Loading plan\u2026" })
240
+ ] });
241
+ }
242
+ if (!versions.length) {
243
+ return /* @__PURE__ */ jsxs(View, { style: styles.center, testID: "webbuilder-plan-empty", children: [
244
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "format-list-checks", size: 30, color: theme.muted }),
245
+ /* @__PURE__ */ jsx(Text, { style: [styles.centerTitle, {
246
+ color: theme.ink
247
+ }], children: "No plan for this build yet." }),
248
+ /* @__PURE__ */ jsx(Text, { style: [styles.centerText, {
249
+ color: theme.muted
250
+ }], children: "Switch the chat to Plan mode and describe what you want: the AI drafts a plan, and the one you build from is kept here." }),
251
+ loadError ? /* @__PURE__ */ jsx(Text, { style: [styles.centerText, {
252
+ color: theme.crit
253
+ }], children: loadError }) : null
254
+ ] });
255
+ }
256
+ const annotating = annotate && canAnnotate && !editing;
257
+ let bar = null;
258
+ if (revising) {
259
+ bar = /* @__PURE__ */ jsxs(View, { style: [styles.bar, {
260
+ backgroundColor: theme.accentSoft,
261
+ borderBottomColor: theme.border
262
+ }], children: [
263
+ /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: theme.accent }),
264
+ /* @__PURE__ */ jsx(Text, { style: [styles.barText, {
265
+ color: theme.ink
266
+ }], children: "Planner is revising the plan from your notes\u2026" })
267
+ ] });
268
+ } else if (statusNote) {
269
+ bar = /* @__PURE__ */ jsxs(View, { style: [styles.bar, {
270
+ backgroundColor: theme.chip,
271
+ borderBottomColor: theme.border
272
+ }], children: [
273
+ /* @__PURE__ */ jsx(Text, { style: [styles.barText, {
274
+ color: theme.muted
275
+ }], children: statusNote }),
276
+ /* @__PURE__ */ jsx(Tap, { onPress: () => setStatusNote(null), accessibilityRole: "button", accessibilityLabel: "Dismiss", hitSlop: 8, pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 14, color: theme.muted }) })
277
+ ] });
278
+ }
279
+ return /* @__PURE__ */ jsxs(View, { style: styles.fill, testID: "webbuilder-plan-view", children: [
280
+ /* @__PURE__ */ jsxs(View, { style: [styles.toolbar, {
281
+ borderBottomColor: theme.border
282
+ }], children: [
283
+ /* @__PURE__ */ jsxs(Tap, { onPress: () => setVersionsOpen(true), accessibilityRole: "button", accessibilityLabel: `Plan version: ${selected ? `v${selected.version}` : ""}. Change`, style: [styles.versionChip, {
284
+ borderColor: theme.border,
285
+ backgroundColor: theme.card
286
+ }], pressedStyle: DIM, testID: "webbuilder-plan-version", children: [
287
+ /* @__PURE__ */ jsx(Text, { style: [styles.versionText, {
288
+ color: theme.ink
289
+ }], children: selected ? planVersionLabel(selected, versions.indexOf(selected)) : "Plan" }),
290
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "chevron-down", size: 16, color: theme.muted })
291
+ ] }),
292
+ (selected == null ? void 0 : selected.source) === "live" ? /* @__PURE__ */ jsxs(View, { style: [styles.badge, {
293
+ backgroundColor: theme.accentSoft
294
+ }], children: [
295
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "radio-tower", size: 12, color: theme.accent }),
296
+ /* @__PURE__ */ jsx(Text, { style: [styles.badgeText, {
297
+ color: theme.accent
298
+ }], children: "Live session" })
299
+ ] }) : /* @__PURE__ */ jsxs(View, { style: [styles.badge, {
300
+ backgroundColor: theme.chip
301
+ }], children: [
302
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "cloud-download-outline", size: 12, color: theme.muted }),
303
+ /* @__PURE__ */ jsx(Text, { style: [styles.badgeText, {
304
+ color: theme.muted
305
+ }], children: "Saved copy" })
306
+ ] }),
307
+ /* @__PURE__ */ jsxs(View, { style: styles.tools, children: [
308
+ canEdit ? /* @__PURE__ */ jsx(ToolButton, { icon: "pencil-outline", label: "Edit", on: editing, onPress: () => {
309
+ setEditText(planMarkdown != null ? planMarkdown : "");
310
+ setAnnotate(false);
311
+ setEditing((v) => !v);
312
+ }, theme, testID: "webbuilder-plan-edit" }) : null,
313
+ /* @__PURE__ */ jsx(ToolButton, { icon: "gesture-tap", label: "Annotate", on: annotate && canAnnotate, disabled: !canAnnotate || editing, onPress: () => setAnnotate((v) => !v), theme, testID: "webbuilder-plan-annotate" }),
314
+ canBuildPlan ? /* @__PURE__ */ jsx(ToolButton, { icon: "hammer", label: "Build this plan", primary: true, onPress: buildThisPlan, theme, testID: "webbuilder-plan-build" }) : null
315
+ ] })
316
+ ] }),
317
+ !isLatest ? /* @__PURE__ */ jsx(Text, { style: [styles.readOnly, {
318
+ color: theme.muted
319
+ }], children: "read-only - annotate the latest version" }) : null,
320
+ bar,
321
+ actionError ? /* @__PURE__ */ jsx(View, { style: [styles.bar, {
322
+ backgroundColor: theme.critSoft,
323
+ borderBottomColor: theme.border
324
+ }], children: /* @__PURE__ */ jsx(Text, { style: [styles.barText, {
325
+ color: theme.crit
326
+ }], children: actionError }) }) : null,
327
+ editing ? /* @__PURE__ */ jsxs(View, { style: [styles.editorWrap, {
328
+ paddingBottom: bottomInset + 12
329
+ }], children: [
330
+ /* @__PURE__ */ jsx(TextInput, { value: editText, onChangeText: setEditText, multiline: true, textAlignVertical: "top", accessibilityLabel: "Plan markdown", style: [styles.editor, {
331
+ color: theme.ink,
332
+ borderColor: theme.border,
333
+ backgroundColor: theme.card
334
+ }], testID: "webbuilder-plan-editor" }),
335
+ /* @__PURE__ */ jsxs(View, { style: styles.editorActions, children: [
336
+ /* @__PURE__ */ jsx(Tap, { onPress: () => setEditing(false), accessibilityRole: "button", accessibilityLabel: "Cancel", style: [styles.cancel, {
337
+ borderColor: theme.border
338
+ }], pressedStyle: DIM, children: /* @__PURE__ */ jsx(Text, { style: [styles.cancelText, {
339
+ color: theme.muted
340
+ }], children: "Cancel" }) }),
341
+ /* @__PURE__ */ jsx(PrimaryButton, { label: "Save as new version", onPress: () => {
342
+ saveEdit().catch(() => void 0);
343
+ }, disabled: !editText.trim() || editText.trim() === (planMarkdown != null ? planMarkdown : "").trim(), theme, testID: "webbuilder-plan-save" })
344
+ ] })
345
+ ] }) : /* @__PURE__ */ jsxs(ScrollView, { style: [styles.fill, {
346
+ backgroundColor: theme.stage
347
+ }], contentContainerStyle: [styles.docOuter, {
348
+ paddingBottom: bottomInset + 80
349
+ }], children: [
350
+ /* @__PURE__ */ jsxs(View, { style: [styles.doc, {
351
+ backgroundColor: theme.card,
352
+ borderColor: theme.border
353
+ }], onLayout: (e) => setDocSize({
354
+ width: e.nativeEvent.layout.width,
355
+ height: e.nativeEvent.layout.height
356
+ }), children: [
357
+ planMarkdown ? /* @__PURE__ */ jsx(PlanDocument, { markdown: planMarkdown, version: selected == null ? void 0 : selected.version, theme }) : /* @__PURE__ */ jsx(Text, { style: [styles.centerText, {
358
+ color: theme.muted
359
+ }], children: loadError != null ? loadError : "This plan has no text to show." }),
360
+ /* @__PURE__ */ jsxs(View, { style: [StyleSheet.absoluteFill, annotating && [styles.overlayOn, {
361
+ borderColor: theme.accent
362
+ }]], pointerEvents: annotating ? "auto" : "box-none", onStartShouldSetResponder: () => annotating, onResponderRelease: (e) => {
363
+ if (!annotating || !docSize.width || !docSize.height) return;
364
+ const {
365
+ locationX,
366
+ locationY
367
+ } = e.nativeEvent;
368
+ setPending({
369
+ xPct: Math.max(0, Math.min(100, locationX / docSize.width * 100)),
370
+ yPct: Math.max(0, Math.min(100, locationY / docSize.height * 100))
371
+ });
372
+ setPendingComment("");
373
+ }, testID: "webbuilder-plan-overlay", children: [
374
+ notes.map((a, i) => /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles.pin, {
375
+ left: `${a.xPct}%`,
376
+ top: `${a.yPct}%`
377
+ }, a.status === "applied" ? {
378
+ backgroundColor: theme.chip,
379
+ borderColor: theme.border,
380
+ borderWidth: 1
381
+ } : {
382
+ backgroundColor: theme.accent
383
+ }], accessibilityLabel: `Note ${i + 1}: ${a.comment}`, children: /* @__PURE__ */ jsx(Text, { style: [styles.pinText, {
384
+ color: a.status === "applied" ? theme.muted : theme.accentInk
385
+ }], children: i + 1 }) }, a.id)),
386
+ pending ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles.pin, styles.pendingPin, {
387
+ left: `${pending.xPct}%`,
388
+ top: `${pending.yPct}%`,
389
+ borderColor: theme.accent
390
+ }] }) : null
391
+ ] })
392
+ ] }),
393
+ annotating ? /* @__PURE__ */ jsx(Text, { style: [styles.hint, {
394
+ color: theme.muted
395
+ }], children: "Tap anywhere in the plan to pin a note." }) : null
396
+ ] }),
397
+ !editing ? /* @__PURE__ */ jsx(View, { style: [styles.notesBar, {
398
+ bottom: bottomInset + 12
399
+ }], pointerEvents: "box-none", children: /* @__PURE__ */ jsxs(Tap, { onPress: () => setNotesOpen(true), accessibilityRole: "button", accessibilityLabel: `Annotations, ${notes.length}`, style: [styles.notesBtn, {
400
+ backgroundColor: theme.card,
401
+ borderColor: theme.border
402
+ }], pressedStyle: DIM, testID: "webbuilder-plan-notes", children: [
403
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "message-plus-outline", size: 16, color: theme.accent }),
404
+ /* @__PURE__ */ jsx(Text, { style: [styles.notesBtnText, {
405
+ color: theme.ink
406
+ }], children: "Annotations" }),
407
+ /* @__PURE__ */ jsx(View, { style: [styles.count, {
408
+ backgroundColor: theme.chip
409
+ }], children: /* @__PURE__ */ jsx(Text, { style: [styles.countText, {
410
+ color: theme.muted
411
+ }], children: notes.length }) })
412
+ ] }) }) : null,
413
+ /* @__PURE__ */ jsx(Sheet, { visible: versionsOpen, title: "Plan versions", onClose: () => setVersionsOpen(false), theme, children: /* @__PURE__ */ jsx(ScrollView, { style: styles.sheetList, children: versions.map((v, i) => /* @__PURE__ */ jsxs(Tap, { onPress: () => {
414
+ setSelectedPlanId(v.planId);
415
+ setVersionsOpen(false);
416
+ }, accessibilityRole: "button", accessibilityState: {
417
+ selected: v.planId === (selected == null ? void 0 : selected.planId)
418
+ }, style: [styles.versionRow, {
419
+ borderBottomColor: theme.border
420
+ }], pressedStyle: DIM, children: [
421
+ /* @__PURE__ */ jsx(Text, { style: [styles.versionRowText, {
422
+ color: theme.ink
423
+ }], children: planVersionLabel(v, i) }),
424
+ v.planId === (selected == null ? void 0 : selected.planId) ? /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "check", size: 18, color: theme.accent }) : null
425
+ ] }, v.planId)) }) }),
426
+ /* @__PURE__ */ jsxs(Sheet, { visible: notesOpen, title: "Annotations", onClose: () => setNotesOpen(false), theme, children: [
427
+ /* @__PURE__ */ jsx(ScrollView, { style: styles.sheetList, contentContainerStyle: styles.notesList, children: notes.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles.centerText, {
428
+ color: theme.muted
429
+ }], children: canAnnotate ? "Turn on Annotate and tap anywhere in the plan to pin a note." : "No annotations on this version." }) : notes.map((a, i) => {
430
+ const tone = noteTone(a.status, theme);
431
+ return /* @__PURE__ */ jsxs(View, { style: [styles.note, {
432
+ borderColor: theme.border
433
+ }], children: [
434
+ /* @__PURE__ */ jsxs(View, { style: styles.noteHead, children: [
435
+ /* @__PURE__ */ jsx(View, { style: [styles.noteNum, {
436
+ backgroundColor: theme.accent
437
+ }], children: /* @__PURE__ */ jsx(Text, { style: [styles.pinText, {
438
+ color: theme.accentInk
439
+ }], children: i + 1 }) }),
440
+ /* @__PURE__ */ jsx(Text, { style: [styles.noteText, {
441
+ color: theme.ink
442
+ }], children: a.comment }),
443
+ a.status === "draft" ? /* @__PURE__ */ jsx(Tap, { onPress: () => persist(notes.filter((n) => n.id !== a.id)), accessibilityRole: "button", accessibilityLabel: "Remove note", hitSlop: 8, pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 15, color: theme.muted }) }) : null
444
+ ] }),
445
+ /* @__PURE__ */ jsxs(View, { style: styles.noteFoot, children: [
446
+ /* @__PURE__ */ jsxs(Text, { style: [styles.noteAt, {
447
+ color: theme.faint
448
+ }], children: [
449
+ "@ ",
450
+ Math.round(a.xPct),
451
+ "%,",
452
+ Math.round(a.yPct),
453
+ "%"
454
+ ] }),
455
+ /* @__PURE__ */ jsx(View, { style: [styles.status, {
456
+ backgroundColor: tone.fill
457
+ }], children: /* @__PURE__ */ jsx(Text, { style: [styles.statusText, {
458
+ color: tone.ink
459
+ }], children: PLAN_NOTE_STATUS_LABEL[a.status] }) })
460
+ ] })
461
+ ] }, a.id);
462
+ }) }),
463
+ /* @__PURE__ */ jsxs(View, { style: styles.exits, children: [
464
+ /* @__PURE__ */ jsx(Tap, { onPress: () => {
465
+ sendToPlanner().catch(() => void 0);
466
+ }, disabled: !canSendPlanner, accessibilityRole: "button", accessibilityLabel: "Send to planner", style: [styles.exit, {
467
+ borderColor: theme.border
468
+ }, !canSendPlanner && styles.off], pressedStyle: DIM, testID: "webbuilder-plan-send-planner", children: /* @__PURE__ */ jsx(Text, { style: [styles.exitText, {
469
+ color: theme.ink
470
+ }], children: "Send to planner" }) }),
471
+ /* @__PURE__ */ jsx(PrimaryButton, { label: "Apply to build", onPress: applyToBuild, disabled: !sendable.length || !onSendEdits || revising, theme, testID: "webbuilder-plan-apply" }),
472
+ /* @__PURE__ */ jsx(Text, { style: [styles.exitHint, {
473
+ color: theme.faint
474
+ }], children: "Send to planner revises this plan. Apply to build turns the notes into an edit turn on the app." })
475
+ ] })
476
+ ] }),
477
+ /* @__PURE__ */ jsx(Sheet, { visible: Boolean(pending), title: "Add a note", onClose: () => setPending(null), theme, children: /* @__PURE__ */ jsxs(View, { style: styles.pendingBody, children: [
478
+ /* @__PURE__ */ jsx(TextInput, { value: pendingComment, onChangeText: setPendingComment, autoFocus: true, multiline: true, placeholder: "What should change here?", placeholderTextColor: theme.faint, style: [styles.pendingInput, {
479
+ color: theme.ink,
480
+ borderColor: theme.border
481
+ }], accessibilityLabel: "What should change here?", testID: "webbuilder-plan-note-input" }),
482
+ /* @__PURE__ */ jsxs(View, { style: styles.editorActions, children: [
483
+ /* @__PURE__ */ jsx(Tap, { onPress: () => setPending(null), accessibilityRole: "button", accessibilityLabel: "Cancel", style: [styles.cancel, {
484
+ borderColor: theme.border
485
+ }], pressedStyle: DIM, children: /* @__PURE__ */ jsx(Text, { style: [styles.cancelText, {
486
+ color: theme.muted
487
+ }], children: "Cancel" }) }),
488
+ /* @__PURE__ */ jsx(PrimaryButton, { label: "Add note", onPress: commitPending, disabled: !pendingComment.trim(), theme, testID: "webbuilder-plan-note-add" })
489
+ ] })
490
+ ] }) })
491
+ ] });
492
+ }
493
+ const styles = StyleSheet.create({
494
+ fill: {
495
+ flex: 1
496
+ },
497
+ center: {
498
+ flex: 1,
499
+ alignItems: "center",
500
+ justifyContent: "center",
501
+ gap: 8,
502
+ padding: 24
503
+ },
504
+ centerTitle: {
505
+ fontSize: 15,
506
+ fontWeight: "600",
507
+ textAlign: "center"
508
+ },
509
+ centerText: {
510
+ fontSize: 13,
511
+ lineHeight: 19,
512
+ textAlign: "center"
513
+ },
514
+ toolbar: {
515
+ flexDirection: "row",
516
+ flexWrap: "wrap",
517
+ alignItems: "center",
518
+ gap: 8,
519
+ paddingHorizontal: 12,
520
+ paddingVertical: 8,
521
+ borderBottomWidth: StyleSheet.hairlineWidth
522
+ },
523
+ versionChip: {
524
+ flexDirection: "row",
525
+ alignItems: "center",
526
+ gap: 4,
527
+ minHeight: 32,
528
+ paddingHorizontal: 10,
529
+ borderRadius: 10,
530
+ borderWidth: StyleSheet.hairlineWidth
531
+ },
532
+ versionText: {
533
+ fontSize: 13,
534
+ fontWeight: "600"
535
+ },
536
+ badge: {
537
+ flexDirection: "row",
538
+ alignItems: "center",
539
+ gap: 4,
540
+ borderRadius: 999,
541
+ paddingHorizontal: 8,
542
+ paddingVertical: 3
543
+ },
544
+ badgeText: {
545
+ fontSize: 11,
546
+ fontWeight: "600"
547
+ },
548
+ tools: {
549
+ flexDirection: "row",
550
+ flexWrap: "wrap",
551
+ alignItems: "center",
552
+ gap: 6,
553
+ marginLeft: "auto"
554
+ },
555
+ tool: {
556
+ flexDirection: "row",
557
+ alignItems: "center",
558
+ gap: 4,
559
+ minHeight: 32,
560
+ paddingHorizontal: 9,
561
+ borderRadius: 10,
562
+ borderWidth: StyleSheet.hairlineWidth
563
+ },
564
+ toolText: {
565
+ fontSize: 12.5
566
+ },
567
+ bold: {
568
+ fontWeight: "700"
569
+ },
570
+ off: {
571
+ opacity: 0.4
572
+ },
573
+ readOnly: {
574
+ fontSize: 12,
575
+ paddingHorizontal: 14,
576
+ paddingTop: 6
577
+ },
578
+ bar: {
579
+ flexDirection: "row",
580
+ alignItems: "center",
581
+ gap: 8,
582
+ paddingHorizontal: 14,
583
+ paddingVertical: 8,
584
+ borderBottomWidth: StyleSheet.hairlineWidth
585
+ },
586
+ barText: {
587
+ flex: 1,
588
+ fontSize: 12.5,
589
+ lineHeight: 17
590
+ },
591
+ docOuter: {
592
+ padding: 12
593
+ },
594
+ doc: {
595
+ borderRadius: 14,
596
+ borderWidth: StyleSheet.hairlineWidth,
597
+ paddingHorizontal: 18,
598
+ paddingVertical: 18
599
+ },
600
+ overlayOn: {
601
+ borderWidth: 2,
602
+ borderRadius: 14
603
+ },
604
+ pin: {
605
+ position: "absolute",
606
+ width: 22,
607
+ height: 22,
608
+ marginLeft: -11,
609
+ marginTop: -11,
610
+ borderRadius: 11,
611
+ alignItems: "center",
612
+ justifyContent: "center"
613
+ },
614
+ pendingPin: {
615
+ borderWidth: 2,
616
+ borderStyle: "dashed"
617
+ },
618
+ pinText: {
619
+ fontSize: 11,
620
+ fontWeight: "700"
621
+ },
622
+ hint: {
623
+ fontSize: 12,
624
+ textAlign: "center",
625
+ marginTop: 10
626
+ },
627
+ editorWrap: {
628
+ flex: 1,
629
+ padding: 12,
630
+ gap: 10
631
+ },
632
+ editor: {
633
+ flex: 1,
634
+ borderWidth: StyleSheet.hairlineWidth,
635
+ borderRadius: 12,
636
+ padding: 12,
637
+ fontFamily: MONO,
638
+ fontSize: 12.5,
639
+ lineHeight: 19
640
+ },
641
+ editorActions: {
642
+ flexDirection: "row",
643
+ justifyContent: "flex-end",
644
+ alignItems: "center",
645
+ gap: 8
646
+ },
647
+ cancel: {
648
+ minHeight: 44,
649
+ paddingHorizontal: 16,
650
+ borderRadius: 12,
651
+ borderWidth: StyleSheet.hairlineWidth,
652
+ alignItems: "center",
653
+ justifyContent: "center"
654
+ },
655
+ cancelText: {
656
+ fontSize: 14,
657
+ fontWeight: "600"
658
+ },
659
+ notesBar: {
660
+ position: "absolute",
661
+ left: 0,
662
+ right: 0,
663
+ alignItems: "center"
664
+ },
665
+ notesBtn: {
666
+ flexDirection: "row",
667
+ alignItems: "center",
668
+ gap: 6,
669
+ minHeight: 40,
670
+ paddingHorizontal: 14,
671
+ borderRadius: 20,
672
+ borderWidth: StyleSheet.hairlineWidth,
673
+ shadowColor: "#000",
674
+ shadowOpacity: 0.12,
675
+ shadowRadius: 10,
676
+ shadowOffset: {
677
+ width: 0,
678
+ height: 4
679
+ },
680
+ elevation: 4
681
+ },
682
+ notesBtnText: {
683
+ fontSize: 14,
684
+ fontWeight: "600"
685
+ },
686
+ count: {
687
+ borderRadius: 999,
688
+ paddingHorizontal: 7,
689
+ paddingVertical: 1
690
+ },
691
+ countText: {
692
+ fontSize: 11
693
+ },
694
+ sheetList: {
695
+ maxHeight: 360,
696
+ paddingHorizontal: 16
697
+ },
698
+ versionRow: {
699
+ flexDirection: "row",
700
+ alignItems: "center",
701
+ justifyContent: "space-between",
702
+ minHeight: 48,
703
+ borderBottomWidth: StyleSheet.hairlineWidth
704
+ },
705
+ versionRowText: {
706
+ fontSize: 15
707
+ },
708
+ notesList: {
709
+ gap: 8,
710
+ paddingBottom: 8
711
+ },
712
+ note: {
713
+ borderWidth: StyleSheet.hairlineWidth,
714
+ borderRadius: 12,
715
+ paddingHorizontal: 10,
716
+ paddingVertical: 9,
717
+ gap: 6
718
+ },
719
+ noteHead: {
720
+ flexDirection: "row",
721
+ alignItems: "flex-start",
722
+ gap: 8
723
+ },
724
+ noteNum: {
725
+ width: 18,
726
+ height: 18,
727
+ borderRadius: 9,
728
+ alignItems: "center",
729
+ justifyContent: "center",
730
+ marginTop: 1
731
+ },
732
+ noteText: {
733
+ flex: 1,
734
+ fontSize: 13.5,
735
+ lineHeight: 19
736
+ },
737
+ noteFoot: {
738
+ flexDirection: "row",
739
+ alignItems: "center",
740
+ justifyContent: "space-between",
741
+ paddingLeft: 26
742
+ },
743
+ noteAt: {
744
+ fontSize: 11
745
+ },
746
+ status: {
747
+ borderRadius: 999,
748
+ paddingHorizontal: 7,
749
+ paddingVertical: 2
750
+ },
751
+ statusText: {
752
+ fontSize: 11,
753
+ fontWeight: "600"
754
+ },
755
+ exits: {
756
+ gap: 8,
757
+ paddingHorizontal: 16,
758
+ paddingTop: 10
759
+ },
760
+ exit: {
761
+ minHeight: 44,
762
+ borderRadius: 12,
763
+ borderWidth: StyleSheet.hairlineWidth,
764
+ alignItems: "center",
765
+ justifyContent: "center"
766
+ },
767
+ exitText: {
768
+ fontSize: 14,
769
+ fontWeight: "600"
770
+ },
771
+ exitHint: {
772
+ fontSize: 11.5,
773
+ lineHeight: 16
774
+ },
775
+ pendingBody: {
776
+ gap: 10,
777
+ paddingHorizontal: 16
778
+ },
779
+ pendingInput: {
780
+ minHeight: 80,
781
+ maxHeight: 160,
782
+ borderWidth: StyleSheet.hairlineWidth,
783
+ borderRadius: 12,
784
+ padding: 10,
785
+ fontSize: 14,
786
+ textAlignVertical: "top"
787
+ }
788
+ });export{PlanView};//# sourceMappingURL=PlanView.js.map