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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/lib/components/CustomDrawer.js +17 -1
  2. package/lib/components/CustomDrawer.js.map +1 -1
  3. package/lib/compute.js +57 -1
  4. package/lib/compute.js.map +1 -1
  5. package/lib/config/env-config.js +11 -1
  6. package/lib/config/env-config.js.map +1 -1
  7. package/lib/features/agent-chat/NativeAgentChat.js +7 -0
  8. package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
  9. package/lib/features/canvas/extendVideo.js +5 -1
  10. package/lib/features/canvas/extendVideo.js.map +1 -1
  11. package/lib/features/canvas/workflow/StepSheet.js +18 -1
  12. package/lib/features/canvas/workflow/StepSheet.js.map +1 -1
  13. package/lib/features/canvas/workflow/workflowSteps.js +102 -31
  14. package/lib/features/canvas/workflow/workflowSteps.js.map +1 -1
  15. package/lib/features/chat/ComposerMicSend.js +35 -0
  16. package/lib/features/chat/ComposerMicSend.js.map +1 -0
  17. package/lib/features/chat/ComposerModeSwitch.js +64 -1
  18. package/lib/features/chat/ComposerModeSwitch.js.map +1 -1
  19. package/lib/features/chat/askUser.js +6 -1
  20. package/lib/features/chat/askUser.js.map +1 -1
  21. package/lib/features/connectors/ConnectorSheet.js +443 -0
  22. package/lib/features/connectors/ConnectorSheet.js.map +1 -0
  23. package/lib/features/connectors/ConnectorsPage.js +320 -0
  24. package/lib/features/connectors/ConnectorsPage.js.map +1 -0
  25. package/lib/features/connectors/connectConnector.js +278 -0
  26. package/lib/features/connectors/connectConnector.js.map +1 -0
  27. package/lib/features/connectors/connectorCatalog.js +222 -0
  28. package/lib/features/connectors/connectorCatalog.js.map +1 -0
  29. package/lib/features/connectors/useConnectorCatalog.js +153 -0
  30. package/lib/features/connectors/useConnectorCatalog.js.map +1 -0
  31. package/lib/features/home/needsYou/HomeNeedsYou.js +618 -0
  32. package/lib/features/home/needsYou/HomeNeedsYou.js.map +1 -0
  33. package/lib/features/home/needsYou/chatFollowUps.js +333 -0
  34. package/lib/features/home/needsYou/chatFollowUps.js.map +1 -0
  35. package/lib/features/home/needsYou/format.js +47 -0
  36. package/lib/features/home/needsYou/format.js.map +1 -0
  37. package/lib/features/home/needsYou/historyText.js +40 -0
  38. package/lib/features/home/needsYou/historyText.js.map +1 -0
  39. package/lib/features/home/needsYou/inboxHighlights.js +152 -0
  40. package/lib/features/home/needsYou/inboxHighlights.js.map +1 -0
  41. package/lib/features/home/needsYou/panelsSettings.js +71 -0
  42. package/lib/features/home/needsYou/panelsSettings.js.map +1 -0
  43. package/lib/features/home/needsYou/ported/commandConfirmProtocol.js +13 -0
  44. package/lib/features/home/needsYou/ported/commandConfirmProtocol.js.map +1 -0
  45. package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js +91 -0
  46. package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js.map +1 -0
  47. package/lib/features/home/needsYou/ported/resultCardModels.js +659 -0
  48. package/lib/features/home/needsYou/ported/resultCardModels.js.map +1 -0
  49. package/lib/features/home/needsYou/types.js +1 -0
  50. package/lib/features/home/needsYou/types.js.map +1 -0
  51. package/lib/features/home/needsYou/useChatFollowUps.js +149 -0
  52. package/lib/features/home/needsYou/useChatFollowUps.js.map +1 -0
  53. package/lib/features/home/needsYou/useHomeBriefing.js +68 -0
  54. package/lib/features/home/needsYou/useHomeBriefing.js.map +1 -0
  55. package/lib/features/home/needsYou/useInboxHighlights.js +173 -0
  56. package/lib/features/home/needsYou/useInboxHighlights.js.map +1 -0
  57. package/lib/features/home/needsYou/usePanelsSettings.js +105 -0
  58. package/lib/features/home/needsYou/usePanelsSettings.js.map +1 -0
  59. package/lib/features/shopping/DealCard.js +8 -1
  60. package/lib/features/shopping/DealCard.js.map +1 -1
  61. package/lib/features/shopping/DealRails.js +24 -7
  62. package/lib/features/shopping/DealRails.js.map +1 -1
  63. package/lib/features/shopping/DealsPanel.js +1 -1
  64. package/lib/features/shopping/DealsPanel.js.map +1 -1
  65. package/lib/features/shopping/HolidayDealsPanel.js +529 -0
  66. package/lib/features/shopping/HolidayDealsPanel.js.map +1 -0
  67. package/lib/features/shopping/HolidayDealsParts.js +954 -0
  68. package/lib/features/shopping/HolidayDealsParts.js.map +1 -0
  69. package/lib/features/shopping/HolidayOffers.js +351 -0
  70. package/lib/features/shopping/HolidayOffers.js.map +1 -0
  71. package/lib/features/shopping/ProductCard.js +80 -14
  72. package/lib/features/shopping/ProductCard.js.map +1 -1
  73. package/lib/features/shopping/ProductDetailSheet.js +22 -3
  74. package/lib/features/shopping/ProductDetailSheet.js.map +1 -1
  75. package/lib/features/shopping/SavedPanel.js +341 -5
  76. package/lib/features/shopping/SavedPanel.js.map +1 -1
  77. package/lib/features/shopping/SearchResults.js +8 -2
  78. package/lib/features/shopping/SearchResults.js.map +1 -1
  79. package/lib/features/shopping/ShoppingAgentChatPane.js +12 -0
  80. package/lib/features/shopping/ShoppingAgentChatPane.js.map +1 -1
  81. package/lib/features/shopping/ShoppingExperience.js +56 -19
  82. package/lib/features/shopping/ShoppingExperience.js.map +1 -1
  83. package/lib/features/shopping/TrendingSections.js +13 -4
  84. package/lib/features/shopping/TrendingSections.js.map +1 -1
  85. package/lib/features/shopping/WatchlistPanel.js +61 -5
  86. package/lib/features/shopping/WatchlistPanel.js.map +1 -1
  87. package/lib/features/shopping/catalog.js +41 -2
  88. package/lib/features/shopping/catalog.js.map +1 -1
  89. package/lib/features/shopping/chat/brainRouter.js +14 -0
  90. package/lib/features/shopping/chat/brainRouter.js.map +1 -1
  91. package/lib/features/shopping/chat/shoppingTurn.js +88 -16
  92. package/lib/features/shopping/chat/shoppingTurn.js.map +1 -1
  93. package/lib/features/shopping/hooks/useHolidayDeals.js +388 -0
  94. package/lib/features/shopping/hooks/useHolidayDeals.js.map +1 -0
  95. package/lib/features/shopping/hooks/useProductMedia.js +33 -6
  96. package/lib/features/shopping/hooks/useProductMedia.js.map +1 -1
  97. package/lib/features/shopping/hooks/useShoppingHistorySync.js +8 -4
  98. package/lib/features/shopping/hooks/useShoppingHistorySync.js.map +1 -1
  99. package/lib/features/shopping/hooks/useTrendingProducts.js +11 -3
  100. package/lib/features/shopping/hooks/useTrendingProducts.js.map +1 -1
  101. package/lib/features/shopping/savedProducts.js +76 -6
  102. package/lib/features/shopping/savedProducts.js.map +1 -1
  103. package/lib/features/shopping/services/aiRelevance.js +212 -0
  104. package/lib/features/shopping/services/aiRelevance.js.map +1 -0
  105. package/lib/features/shopping/services/blackFriday.js +301 -0
  106. package/lib/features/shopping/services/blackFriday.js.map +1 -0
  107. package/lib/features/shopping/services/blackFridayBrowserSites.js +137 -0
  108. package/lib/features/shopping/services/blackFridayBrowserSites.js.map +1 -0
  109. package/lib/features/shopping/services/catalogProductSearch.js +21 -3
  110. package/lib/features/shopping/services/catalogProductSearch.js.map +1 -1
  111. package/lib/features/shopping/services/holidayDeals.js +143 -0
  112. package/lib/features/shopping/services/holidayDeals.js.map +1 -0
  113. package/lib/features/shopping/services/mediaShape.js +7 -0
  114. package/lib/features/shopping/services/mediaShape.js.map +1 -0
  115. package/lib/features/shopping/services/modelStep.js +95 -0
  116. package/lib/features/shopping/services/modelStep.js.map +1 -0
  117. package/lib/features/shopping/services/modelWords.js +14 -0
  118. package/lib/features/shopping/services/modelWords.js.map +1 -0
  119. package/lib/features/shopping/services/productAvailability.js +5 -1
  120. package/lib/features/shopping/services/productAvailability.js.map +1 -1
  121. package/lib/features/shopping/services/productFilters.js +2 -2
  122. package/lib/features/shopping/services/productFilters.js.map +1 -1
  123. package/lib/features/shopping/services/productMedia.js +103 -18
  124. package/lib/features/shopping/services/productMedia.js.map +1 -1
  125. package/lib/features/shopping/services/retailerUrl.js +11 -8
  126. package/lib/features/shopping/services/retailerUrl.js.map +1 -1
  127. package/lib/features/shopping/services/salesDealsStore.js +3 -2
  128. package/lib/features/shopping/services/salesDealsStore.js.map +1 -1
  129. package/lib/features/shopping/services/savedReads.js +82 -0
  130. package/lib/features/shopping/services/savedReads.js.map +1 -0
  131. package/lib/features/shopping/services/searchCardFields.js +2 -0
  132. package/lib/features/shopping/services/searchCardFields.js.map +1 -1
  133. package/lib/features/shopping/services/searchRelevance.js +154 -24
  134. package/lib/features/shopping/services/searchRelevance.js.map +1 -1
  135. package/lib/features/shopping/services/secondHand.js +12 -0
  136. package/lib/features/shopping/services/secondHand.js.map +1 -0
  137. package/lib/features/shopping/services/shoppingProductSearch.js +82 -10
  138. package/lib/features/shopping/services/shoppingProductSearch.js.map +1 -1
  139. package/lib/features/shopping/services/shoppingSearchConnectorClient.js +14 -1
  140. package/lib/features/shopping/services/shoppingSearchConnectorClient.js.map +1 -1
  141. package/lib/features/shopping/services/shoppingSubgraph.js +2 -1
  142. package/lib/features/shopping/services/shoppingSubgraph.js.map +1 -1
  143. package/lib/features/shopping/services/storedGalleries.js +130 -0
  144. package/lib/features/shopping/services/storedGalleries.js.map +1 -0
  145. package/lib/features/shopping/services/usedSites.js +263 -0
  146. package/lib/features/shopping/services/usedSites.js.map +1 -0
  147. package/lib/features/shopping/services/verifyProducts.js +3 -3
  148. package/lib/features/shopping/services/verifyProducts.js.map +1 -1
  149. package/lib/features/shopping/services/watchDeal.js +61 -0
  150. package/lib/features/shopping/services/watchDeal.js.map +1 -0
  151. package/lib/features/shopping/shoppingRuntime.js +7 -2
  152. package/lib/features/shopping/shoppingRuntime.js.map +1 -1
  153. package/lib/features/shopping/state/accountCaches.js +20 -0
  154. package/lib/features/shopping/state/accountCaches.js.map +1 -0
  155. package/lib/features/shopping/state/holidayDealsRequest.js +22 -0
  156. package/lib/features/shopping/state/holidayDealsRequest.js.map +1 -0
  157. package/lib/features/shopping/tutorials/ShoppingTutorialDock.js +1 -1
  158. package/lib/features/shopping/tutorials/ShoppingTutorialDock.js.map +1 -1
  159. package/lib/features/shopping/tutorials/shoppingTutorials.js +2 -0
  160. package/lib/features/shopping/tutorials/shoppingTutorials.js.map +1 -1
  161. package/lib/features/shopping/useShoppingSearch.js +74 -18
  162. package/lib/features/shopping/useShoppingSearch.js.map +1 -1
  163. package/lib/features/team-chat/TeamChatExperience.js +474 -0
  164. package/lib/features/team-chat/TeamChatExperience.js.map +1 -0
  165. package/lib/features/team-chat/api/client.js +198 -0
  166. package/lib/features/team-chat/api/client.js.map +1 -0
  167. package/lib/features/team-chat/api/live.js +160 -0
  168. package/lib/features/team-chat/api/live.js.map +1 -0
  169. package/lib/features/team-chat/api/ops.js +241 -0
  170. package/lib/features/team-chat/api/ops.js.map +1 -0
  171. package/lib/features/team-chat/app.js +12 -0
  172. package/lib/features/team-chat/app.js.map +1 -0
  173. package/lib/features/team-chat/components/Avatar.js +107 -0
  174. package/lib/features/team-chat/components/Avatar.js.map +1 -0
  175. package/lib/features/team-chat/components/Composer.js +641 -0
  176. package/lib/features/team-chat/components/Composer.js.map +1 -0
  177. package/lib/features/team-chat/components/Dialogs.js +598 -0
  178. package/lib/features/team-chat/components/Dialogs.js.map +1 -0
  179. package/lib/features/team-chat/components/EmojiPicker.js +165 -0
  180. package/lib/features/team-chat/components/EmojiPicker.js.map +1 -0
  181. package/lib/features/team-chat/components/MessageItem.js +658 -0
  182. package/lib/features/team-chat/components/MessageItem.js.map +1 -0
  183. package/lib/features/team-chat/components/MessageList.js +248 -0
  184. package/lib/features/team-chat/components/MessageList.js.map +1 -0
  185. package/lib/features/team-chat/components/Mrkdwn.js +228 -0
  186. package/lib/features/team-chat/components/Mrkdwn.js.map +1 -0
  187. package/lib/features/team-chat/components/QuickSwitcher.js +215 -0
  188. package/lib/features/team-chat/components/QuickSwitcher.js.map +1 -0
  189. package/lib/features/team-chat/components/ui.js +662 -0
  190. package/lib/features/team-chat/components/ui.js.map +1 -0
  191. package/lib/features/team-chat/nativeTeamChatRegistry.js +15 -0
  192. package/lib/features/team-chat/nativeTeamChatRegistry.js.map +1 -0
  193. package/lib/features/team-chat/state/fetched.js +39 -0
  194. package/lib/features/team-chat/state/fetched.js.map +1 -0
  195. package/lib/features/team-chat/state/lists.js +230 -0
  196. package/lib/features/team-chat/state/lists.js.map +1 -0
  197. package/lib/features/team-chat/state/store.js +1108 -0
  198. package/lib/features/team-chat/state/store.js.map +1 -0
  199. package/lib/features/team-chat/state/useChannelDirectory.js +21 -0
  200. package/lib/features/team-chat/state/useChannelDirectory.js.map +1 -0
  201. package/lib/features/team-chat/theme.js +77 -0
  202. package/lib/features/team-chat/theme.js.map +1 -0
  203. package/lib/features/team-chat/utils/composeText.js +72 -0
  204. package/lib/features/team-chat/utils/composeText.js.map +1 -0
  205. package/lib/features/team-chat/utils/emoji.js +369 -0
  206. package/lib/features/team-chat/utils/emoji.js.map +1 -0
  207. package/lib/features/team-chat/utils/format.js +109 -0
  208. package/lib/features/team-chat/utils/format.js.map +1 -0
  209. package/lib/features/team-chat/utils/messageRows.js +24 -0
  210. package/lib/features/team-chat/utils/messageRows.js.map +1 -0
  211. package/lib/features/team-chat/utils/mrkdwn.js +222 -0
  212. package/lib/features/team-chat/utils/mrkdwn.js.map +1 -0
  213. package/lib/features/team-chat/utils/notify.js +47 -0
  214. package/lib/features/team-chat/utils/notify.js.map +1 -0
  215. package/lib/features/team-chat/utils/pickFiles.js +81 -0
  216. package/lib/features/team-chat/utils/pickFiles.js.map +1 -0
  217. package/lib/features/team-chat/views/ActivityView.js +235 -0
  218. package/lib/features/team-chat/views/ActivityView.js.map +1 -0
  219. package/lib/features/team-chat/views/BrowseView.js +179 -0
  220. package/lib/features/team-chat/views/BrowseView.js.map +1 -0
  221. package/lib/features/team-chat/views/ChannelView.js +475 -0
  222. package/lib/features/team-chat/views/ChannelView.js.map +1 -0
  223. package/lib/features/team-chat/views/DetailsPane.js +816 -0
  224. package/lib/features/team-chat/views/DetailsPane.js.map +1 -0
  225. package/lib/features/team-chat/views/DraftsView.js +212 -0
  226. package/lib/features/team-chat/views/DraftsView.js.map +1 -0
  227. package/lib/features/team-chat/views/FilesView.js +152 -0
  228. package/lib/features/team-chat/views/FilesView.js.map +1 -0
  229. package/lib/features/team-chat/views/NewMessageView.js +286 -0
  230. package/lib/features/team-chat/views/NewMessageView.js.map +1 -0
  231. package/lib/features/team-chat/views/PeopleView.js +118 -0
  232. package/lib/features/team-chat/views/PeopleView.js.map +1 -0
  233. package/lib/features/team-chat/views/ProfilePane.js +220 -0
  234. package/lib/features/team-chat/views/ProfilePane.js.map +1 -0
  235. package/lib/features/team-chat/views/SavedView.js +113 -0
  236. package/lib/features/team-chat/views/SavedView.js.map +1 -0
  237. package/lib/features/team-chat/views/SearchView.js +307 -0
  238. package/lib/features/team-chat/views/SearchView.js.map +1 -0
  239. package/lib/features/team-chat/views/Sidebar.js +368 -0
  240. package/lib/features/team-chat/views/Sidebar.js.map +1 -0
  241. package/lib/features/team-chat/views/ThreadPane.js +139 -0
  242. package/lib/features/team-chat/views/ThreadPane.js.map +1 -0
  243. package/lib/features/team-chat/views/ThreadsView.js +157 -0
  244. package/lib/features/team-chat/views/ThreadsView.js.map +1 -0
  245. package/lib/features/webbuilder/WebBuilderExperience.js +276 -42
  246. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  247. package/lib/features/webbuilder/buildFragments.js +10 -4
  248. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  249. package/lib/features/webbuilder/components/AssetChips.js +61 -0
  250. package/lib/features/webbuilder/components/AssetChips.js.map +1 -0
  251. package/lib/features/webbuilder/components/AssetSiteChooser.js +100 -0
  252. package/lib/features/webbuilder/components/AssetSiteChooser.js.map +1 -0
  253. package/lib/features/webbuilder/components/CommentsLayer.js +485 -0
  254. package/lib/features/webbuilder/components/CommentsLayer.js.map +1 -0
  255. package/lib/features/webbuilder/components/Composer.js +16 -2
  256. package/lib/features/webbuilder/components/Composer.js.map +1 -1
  257. package/lib/features/webbuilder/components/ComposerModeSwitch.js +71 -0
  258. package/lib/features/webbuilder/components/ComposerModeSwitch.js.map +1 -0
  259. package/lib/features/webbuilder/components/MyAssetsPicker.js +500 -0
  260. package/lib/features/webbuilder/components/MyAssetsPicker.js.map +1 -0
  261. package/lib/features/webbuilder/components/PlanDocument.js +165 -0
  262. package/lib/features/webbuilder/components/PlanDocument.js.map +1 -0
  263. package/lib/features/webbuilder/components/PlanDraftCard.js +205 -0
  264. package/lib/features/webbuilder/components/PlanDraftCard.js.map +1 -0
  265. package/lib/features/webbuilder/components/PlanView.js +788 -0
  266. package/lib/features/webbuilder/components/PlanView.js.map +1 -0
  267. package/lib/features/webbuilder/components/PreviewConsoleSheet.js +334 -0
  268. package/lib/features/webbuilder/components/PreviewConsoleSheet.js.map +1 -0
  269. package/lib/features/webbuilder/components/PreviewFrame.js +45 -3
  270. package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
  271. package/lib/features/webbuilder/components/PreviewScreen.js +94 -10
  272. package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
  273. package/lib/features/webbuilder/components/ProjectChat.js +84 -14
  274. package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
  275. package/lib/features/webbuilder/components/StudioHome.js +69 -6
  276. package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
  277. package/lib/features/webbuilder/components/StyleDirectionsSheet.js +291 -0
  278. package/lib/features/webbuilder/components/StyleDirectionsSheet.js.map +1 -0
  279. package/lib/features/webbuilder/components/VersionChangesView.js +574 -0
  280. package/lib/features/webbuilder/components/VersionChangesView.js.map +1 -0
  281. package/lib/features/webbuilder/components/VersionPreviewView.js +186 -0
  282. package/lib/features/webbuilder/components/VersionPreviewView.js.map +1 -0
  283. package/lib/features/webbuilder/components/VersionsSheet.js +673 -16
  284. package/lib/features/webbuilder/components/VersionsSheet.js.map +1 -1
  285. package/lib/features/webbuilder/connectorTemplates.js +6 -1
  286. package/lib/features/webbuilder/connectorTemplates.js.map +1 -1
  287. package/lib/features/webbuilder/myAssets.js +101 -0
  288. package/lib/features/webbuilder/myAssets.js.map +1 -0
  289. package/lib/features/webbuilder/planChat.js +146 -0
  290. package/lib/features/webbuilder/planChat.js.map +1 -0
  291. package/lib/features/webbuilder/planDocument.js +89 -0
  292. package/lib/features/webbuilder/planDocument.js.map +1 -0
  293. package/lib/features/webbuilder/planStore.js +55 -0
  294. package/lib/features/webbuilder/planStore.js.map +1 -0
  295. package/lib/features/webbuilder/previewCommentsScript.js +218 -0
  296. package/lib/features/webbuilder/previewCommentsScript.js.map +1 -0
  297. package/lib/features/webbuilder/previewConsoleScript.js +39 -0
  298. package/lib/features/webbuilder/previewConsoleScript.js.map +1 -0
  299. package/lib/features/webbuilder/styleDirections.js +85 -0
  300. package/lib/features/webbuilder/styleDirections.js.map +1 -0
  301. package/lib/features/webbuilder/useCanvasComments.js +335 -0
  302. package/lib/features/webbuilder/useCanvasComments.js.map +1 -0
  303. package/lib/features/webbuilder/useCatalogTemplates.js +37 -0
  304. package/lib/features/webbuilder/useCatalogTemplates.js.map +1 -0
  305. package/lib/features/webbuilder/usePlanMode.js +145 -0
  306. package/lib/features/webbuilder/usePlanMode.js.map +1 -0
  307. package/lib/features/webbuilder/useStyleDirections.js +112 -0
  308. package/lib/features/webbuilder/useStyleDirections.js.map +1 -0
  309. package/lib/features/webbuilder/web/assets/assetsApi.js +174 -0
  310. package/lib/features/webbuilder/web/assets/assetsApi.js.map +1 -0
  311. package/lib/features/webbuilder/web/assets/assetsApi.ts +173 -0
  312. package/lib/features/webbuilder/web/assets/myAssets.js +341 -0
  313. package/lib/features/webbuilder/web/assets/myAssets.js.map +1 -0
  314. package/lib/features/webbuilder/web/assets/myAssets.ts +396 -0
  315. package/lib/features/webbuilder/web/canvas/elementName.js +46 -0
  316. package/lib/features/webbuilder/web/canvas/elementName.js.map +1 -0
  317. package/lib/features/webbuilder/web/canvas/visualEditorBridge.js +95 -0
  318. package/lib/features/webbuilder/web/canvas/visualEditorBridge.js.map +1 -0
  319. package/lib/features/webbuilder/web/chat/agentTurn.js +24 -0
  320. package/lib/features/webbuilder/web/chat/agentTurn.js.map +1 -0
  321. package/lib/features/webbuilder/web/chat/planMode.js +164 -0
  322. package/lib/features/webbuilder/web/chat/planMode.js.map +1 -0
  323. package/lib/features/webbuilder/web/chat/realPlans.js +66 -0
  324. package/lib/features/webbuilder/web/chat/realPlans.js.map +1 -0
  325. package/lib/features/webbuilder/web/comments/comments.js +336 -0
  326. package/lib/features/webbuilder/web/comments/comments.js.map +1 -0
  327. package/lib/features/webbuilder/web/comments/commentsApi.js +59 -0
  328. package/lib/features/webbuilder/web/comments/commentsApi.js.map +1 -0
  329. package/lib/features/webbuilder/web/components/planView.js +21 -0
  330. package/lib/features/webbuilder/web/components/planView.js.map +1 -0
  331. package/lib/features/webbuilder/web/console/consolePanel.js +43 -0
  332. package/lib/features/webbuilder/web/console/consolePanel.js.map +1 -0
  333. package/lib/features/webbuilder/web/console/previewConsole.js +256 -0
  334. package/lib/features/webbuilder/web/console/previewConsole.js.map +1 -0
  335. package/lib/features/webbuilder/web/console/usePreviewConsole.js +147 -0
  336. package/lib/features/webbuilder/web/console/usePreviewConsole.js.map +1 -0
  337. package/lib/features/webbuilder/web/design/directions.js +419 -1
  338. package/lib/features/webbuilder/web/design/directions.js.map +1 -1
  339. package/lib/features/webbuilder/web/history/diffActions.js +222 -0
  340. package/lib/features/webbuilder/web/history/diffActions.js.map +1 -0
  341. package/lib/features/webbuilder/web/history/diffHighlight.js +18 -0
  342. package/lib/features/webbuilder/web/history/diffHighlight.js.map +1 -0
  343. package/lib/features/webbuilder/web/history/versionActions.js +272 -0
  344. package/lib/features/webbuilder/web/history/versionActions.js.map +1 -0
  345. package/lib/features/webbuilder/web/history/versionDiff.js +338 -0
  346. package/lib/features/webbuilder/web/history/versionDiff.js.map +1 -0
  347. package/lib/features/webbuilder/web/history/versionPreview.js +83 -0
  348. package/lib/features/webbuilder/web/history/versionPreview.js.map +1 -0
  349. package/lib/features/webbuilder/web/history/versionPreviewMachine.js +150 -0
  350. package/lib/features/webbuilder/web/history/versionPreviewMachine.js.map +1 -0
  351. package/lib/features/webbuilder/web/history/versions.js +326 -1
  352. package/lib/features/webbuilder/web/history/versions.js.map +1 -1
  353. package/lib/features/webbuilder/web/hosted/hostedTurn.js +36 -0
  354. package/lib/features/webbuilder/web/hosted/hostedTurn.js.map +1 -0
  355. package/lib/features/webbuilder/web/studio/brandKit.js +25 -0
  356. package/lib/features/webbuilder/web/studio/brandKit.js.map +1 -0
  357. package/lib/features/webbuilder/web/utils/promptSafe.js +15 -0
  358. package/lib/features/webbuilder/web/utils/promptSafe.js.map +1 -0
  359. package/lib/features/webbuilder/web/webServices.js +3 -1
  360. package/lib/features/webbuilder/web/webServices.js.map +1 -1
  361. package/lib/index.js +1 -1
  362. package/lib/index.js.map +1 -1
  363. package/lib/routes.json +55 -0
  364. package/lib/screens/Account/index.js +13 -5
  365. package/lib/screens/Account/index.js.map +1 -1
  366. package/lib/screens/Chat/index.js +16 -0
  367. package/lib/screens/Chat/index.js.map +1 -1
  368. package/lib/screens/Home/HomeScreen.js +202 -39
  369. package/lib/screens/Home/HomeScreen.js.map +1 -1
  370. package/lib/screens/Home/components/HomeHero.js +52 -38
  371. package/lib/screens/Home/components/HomeHero.js.map +1 -1
  372. package/lib/screens/Home/components/homeCatalog.js +8 -1
  373. package/lib/screens/Home/components/homeCatalog.js.map +1 -1
  374. package/lib/screens/TeamChat/index.js +41 -0
  375. package/lib/screens/TeamChat/index.js.map +1 -0
  376. package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js +9 -2
  377. package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js.map +1 -1
  378. package/lib/screens/WebBuilderNative/index.js +13 -3
  379. package/lib/screens/WebBuilderNative/index.js.map +1 -1
  380. package/lib/screens/WebBuilderNative/useConnectorTemplates.js +2 -2
  381. package/lib/screens/WebBuilderNative/useConnectorTemplates.js.map +1 -1
  382. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useCallback,useEffect}from'react';import {StyleSheet,ScrollView,View,Text,Pressable,ActivityIndicator,Linking}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {formatPrice}from'./catalog.js';import {fetchWatchStatus}from'./services/catalogProductSearch.js';import {fetchLivePriceStatus,subscribePriceCheckUpdates}from'./services/livePriceCheckClient.js';const GREEN = "#067d62";
1
+ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useCallback,useEffect}from'react';import {StyleSheet,ScrollView,View,Text,Pressable,ActivityIndicator,Linking}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {formatPrice}from'./catalog.js';import {removePriceWatch,fetchWatchStatus}from'./services/catalogProductSearch.js';import {fetchLivePriceStatus,subscribePriceCheckUpdates}from'./services/livePriceCheckClient.js';const GREEN = "#067d62";
2
2
  const RED = "#b12704";
3
3
  function Delta({
4
4
  delta,
@@ -68,6 +68,28 @@ function WatchlistPanel({
68
68
  const [hint, setHint] = useState(null);
69
69
  const [error, setError] = useState(null);
70
70
  const [isLoading, setIsLoading] = useState(false);
71
+ const [stopping, setStopping] = useState(null);
72
+ const [stopError, setStopError] = useState(null);
73
+ const stopWatching = useCallback(async (row) => {
74
+ if (!row.retailerId || !row.productId) return;
75
+ setStopping(row.key);
76
+ setStopError(null);
77
+ try {
78
+ await removePriceWatch({
79
+ retailer: row.retailerId,
80
+ productId: row.productId
81
+ });
82
+ setRows((current) => current.filter((r) => r.key !== row.key));
83
+ } catch (err) {
84
+ console.warn("[shopping] stop watching failed:", err);
85
+ setStopError({
86
+ key: row.key,
87
+ message: "Couldn\u2019t stop watching this - try again in a moment."
88
+ });
89
+ } finally {
90
+ setStopping(null);
91
+ }
92
+ }, []);
71
93
  const load = useCallback(async () => {
72
94
  var _a;
73
95
  setIsLoading(true);
@@ -162,10 +184,10 @@ function WatchlistPanel({
162
184
  ] }) : null,
163
185
  !isLoading && !error && rows.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles.empty, {
164
186
  color: muted
165
- }], children: hint != null ? hint : "Nothing tracked yet. Open a catalog result and tap \u201CWatch this price\u201D, or ask the agent to \u201Cprice check\u201D a product." }) : null,
187
+ }], children: hint != null ? hint : "Nothing watched yet. Open a catalog result, choose \u201CCompare & track\u201D, then \u201CWatch this price\u201D - you\u2019ll get a notification when it drops. Or ask the agent to watch a product." }) : null,
166
188
  !isLoading && !error && rows.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
167
189
  rows.map((row) => {
168
- var _a, _b, _c, _d, _e, _f, _g;
190
+ var _a, _b, _c, _d, _e, _f, _g, _h;
169
191
  const {
170
192
  indexed,
171
193
  live
@@ -230,7 +252,10 @@ function WatchlistPanel({
230
252
  }], children: [
231
253
  "last check: ",
232
254
  live.error
233
- ] }) : null
255
+ ] }) : null,
256
+ (stopError == null ? void 0 : stopError.key) === row.key ? /* @__PURE__ */ jsx(Text, { style: [styles.tiny, {
257
+ color: RED
258
+ }], accessibilityRole: "alert", children: stopError.message }) : null
234
259
  ] })
235
260
  ] }),
236
261
  /* @__PURE__ */ jsxs(View, { style: styles.rowSide, children: [
@@ -244,10 +269,20 @@ function WatchlistPanel({
244
269
  (live == null ? void 0 : live.livePrice) == null && (indexed == null ? void 0 : indexed.priceSource) === "pinned" ? /* @__PURE__ */ jsx(Text, { style: [styles.tiny, {
245
270
  color: muted
246
271
  }], children: "as pinned" }) : null,
247
- link ? /* @__PURE__ */ jsx(Pressable, { onPress: () => void Linking.openURL(link).catch(() => void 0), accessibilityRole: "link", accessibilityLabel: `Open ${(_g = row.name) != null ? _g : "the listing"}`, hitSlop: 8, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "open-in-new", size: 15, color: "#007185" }) }) : null
272
+ link ? /* @__PURE__ */ jsx(Pressable, { onPress: () => void Linking.openURL(link).catch(() => void 0), accessibilityRole: "link", accessibilityLabel: `Open ${(_g = row.name) != null ? _g : "the listing"}`, hitSlop: 8, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "open-in-new", size: 15, color: "#007185" }) }) : null,
273
+ indexed && row.retailerId && row.productId ? /* @__PURE__ */ jsx(Pressable, { onPress: () => void stopWatching(row), disabled: stopping === row.key, accessibilityRole: "button", accessibilityLabel: `Stop watching ${(_h = row.name) != null ? _h : "this product"}`, accessibilityState: {
274
+ disabled: stopping === row.key,
275
+ busy: stopping === row.key
276
+ }, style: [styles.stop, stopping === row.key && styles.stopBusy], hitSlop: 6, children: stopping === row.key ? /* @__PURE__ */ jsx(ActivityIndicator, { size: "small" }) : /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "bell-off-outline", size: 16, color: muted }) }) : null
248
277
  ] })
249
278
  ] }, row.key);
250
279
  }),
280
+ /* @__PURE__ */ jsxs(View, { style: styles.alertsOn, testID: "watchlist-alerts-on", children: [
281
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "bell-ring-outline", size: 12, color: ink }),
282
+ /* @__PURE__ */ jsx(Text, { style: [styles.tiny, styles.alertsOnText, {
283
+ color: ink
284
+ }], children: "Price alerts are on: you\u2019ll get a notification here and on your phone when a watched price drops (under its target, when it has one) or the product is back in stock." })
285
+ ] }),
251
286
  /* @__PURE__ */ jsx(Text, { style: [styles.tiny, styles.footer, {
252
287
  color: muted
253
288
  }], children: liveCount > 0 ? "Live prices are validated hourly by your Computer\u2019s browser; other prices are as of the last catalog index." : "Prices come from the catalog - as of the last index, or looked up today where nothing is indexed yet. Ask the agent to \u201Cprice check\u201D a product for hourly live validation." })
@@ -368,5 +403,26 @@ const styles = StyleSheet.create({
368
403
  footer: {
369
404
  paddingHorizontal: 4,
370
405
  lineHeight: 15
406
+ },
407
+ alertsOn: {
408
+ flexDirection: "row",
409
+ alignItems: "flex-start",
410
+ gap: 4,
411
+ paddingHorizontal: 4
412
+ },
413
+ alertsOnText: {
414
+ flex: 1,
415
+ lineHeight: 15
416
+ },
417
+ stop: {
418
+ width: 36,
419
+ height: 36,
420
+ borderRadius: 18,
421
+ alignItems: "center",
422
+ justifyContent: "center",
423
+ marginRight: -6
424
+ },
425
+ stopBusy: {
426
+ opacity: 0.6
371
427
  }
372
428
  });export{WatchlistPanel,agoLabel,mergeWatchRows};//# sourceMappingURL=WatchlistPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WatchlistPanel.js","sources":["../../../src/features/shopping/WatchlistPanel.tsx"],"sourcesContent":["/**\n * The Watchlist view: what moved since the last look. Native twin of the web\n * surface's `WatchlistPanel.tsx` (0.37.0).\n *\n * Two lanes feed it, and the panel says which is which. The INDEX lane is the\n * catalog store - \"previous price\" means the previous *indexed* price. The\n * LIVE lane is the hourly price check: the user's Computer browser opens the\n * product page, validates the shelf price and records it. Live rows carry a\n * timestamp because a watchlist that silently lags the shelf is worse than one\n * that says when it was last read.\n */\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { ActivityIndicator, Linking, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { formatPrice } from './catalog';\nimport { fetchWatchStatus, type WatchRow } from './services/catalogProductSearch';\nimport {\n fetchLivePriceStatus,\n subscribePriceCheckUpdates,\n type LivePriceCheckRow,\n} from './services/livePriceCheckClient';\n\nconst GREEN = '#067d62';\nconst RED = '#b12704';\n\nfunction Delta({ delta, muted }: { delta?: number; muted: string }) {\n if (delta == null || delta === 0) {\n return <Text style={[styles.small, { color: muted }]}>no change</Text>;\n }\n const dropped = delta < 0;\n return (\n <Text style={[styles.small, { color: dropped ? GREEN : RED, fontWeight: '600' }]}>\n {dropped ? '▾' : 'â–ē'} {formatPrice(Math.abs(delta))}\n </Text>\n );\n}\n\n/** \"3m ago\" / \"2h ago\" for a live check timestamp. */\nexport function agoLabel(iso: string, now: number = Date.now()): string {\n const ms = now - Date.parse(iso);\n if (!Number.isFinite(ms) || ms < 0) return '';\n const minutes = Math.round(ms / 60_000);\n if (minutes < 1) return 'just now';\n if (minutes < 90) return `${minutes}m ago`;\n return `${Math.round(minutes / 60)}h ago`;\n}\n\n/** One panel row: an indexed watch, its live check, or both merged. */\nexport interface MergedRow {\n key: string;\n retailerId?: string;\n productId?: string;\n name?: string;\n indexed?: WatchRow;\n live?: LivePriceCheckRow;\n}\n\nexport function mergeWatchRows(indexed: WatchRow[], live: LivePriceCheckRow[]): MergedRow[] {\n const byKey = new Map<string, MergedRow>();\n for (const row of indexed) {\n const key = `${row.retailerId}:${row.productId}`;\n byKey.set(key, { key, retailerId: row.retailerId, productId: row.productId, name: row.name, indexed: row });\n }\n for (const row of live) {\n const key = row.retailer && row.productId ? `${row.retailer}:${row.productId}` : row.key;\n const existing = byKey.get(key);\n if (existing) {\n existing.live = row;\n existing.name = row.name ?? existing.name;\n } else {\n byKey.set(key, {\n key,\n retailerId: row.retailer,\n productId: row.productId,\n name: row.name,\n live: row,\n });\n }\n }\n return [...byKey.values()];\n}\n\nexport function WatchlistPanel({\n card,\n border,\n ink,\n muted,\n}: {\n card: string;\n border: string;\n ink: string;\n muted: string;\n}) {\n const [rows, setRows] = useState<MergedRow[]>([]);\n const [hint, setHint] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n const load = useCallback(async () => {\n setIsLoading(true);\n setError(null);\n try {\n // The live lane failing (older connector, no checks yet) must not\n // blank the indexed watchlist - and vice versa.\n const [indexed, live] = await Promise.all([\n fetchWatchStatus().catch((err) => {\n // Keep the reason: with BOTH lanes empty it is the error shown.\n return { rows: [] as WatchRow[], hint: err instanceof Error ? err.message : String(err) };\n }),\n fetchLivePriceStatus().catch(() => ({ rows: [] as LivePriceCheckRow[], count: 0, series: {} })),\n ]);\n const merged = mergeWatchRows(indexed.rows, live.rows);\n setRows(merged);\n setHint(merged.length === 0 ? (indexed.hint ?? null) : null);\n } catch (err) {\n setRows([]);\n setHint(null);\n setError(err instanceof Error ? err.message : 'Could not read the watchlist');\n } finally {\n setIsLoading(false);\n }\n }, []);\n\n useEffect(() => {\n void load();\n }, [load]);\n\n // A finished live check (the first one runs right after \"price check X\")\n // repaints the panel without the user hunting for Refresh.\n useEffect(() => subscribePriceCheckUpdates(() => void load()), [load]);\n\n const hits = rows.filter((row) => row.live?.hitTarget || row.indexed?.hitTarget).length;\n const liveCount = rows.filter((row) => row.live?.livePrice != null).length;\n\n return (\n <ScrollView contentContainerStyle={styles.body}>\n <View style={[styles.card, { backgroundColor: card, borderColor: border }]}>\n <View style={styles.head}>\n <View style={styles.titleRow}>\n <MaterialCommunityIcons name=\"bell-ring-outline\" size={16} color={ink} />\n <Text style={[styles.title, { color: ink }]}>Watchlist</Text>\n </View>\n <Pressable\n onPress={() => void load()}\n accessibilityRole=\"button\"\n style={[styles.refreshButton, { borderColor: border }]}\n >\n <MaterialCommunityIcons name=\"refresh\" size={13} color={ink} />\n <Text style={[styles.refresh, { color: ink }]}>Refresh</Text>\n </Pressable>\n </View>\n {rows.length > 0 ? (\n <Text style={[styles.small, { color: muted }]}>\n {rows.length} tracked\n {liveCount > 0 ? (\n <Text style={{ color: ink, fontWeight: '600' }}> · {liveCount} live-checked hourly</Text>\n ) : null}\n {hits > 0 ? (\n <Text style={{ color: GREEN, fontWeight: '700' }}> · {hits} hit target</Text>\n ) : null}\n </Text>\n ) : null}\n </View>\n\n {isLoading ? (\n <View style={styles.center}>\n <ActivityIndicator />\n <Text style={[styles.small, { color: muted }]}>Reading watched pricesâ€Ķ</Text>\n </View>\n ) : null}\n\n {!isLoading && error ? (\n <View style={styles.center} accessibilityRole=\"alert\">\n <Text style={styles.error}>{error}</Text>\n <Pressable onPress={() => void load()} accessibilityRole=\"button\" style={styles.retry}>\n <Text style={styles.retryText}>Try again</Text>\n </Pressable>\n </View>\n ) : null}\n\n {!isLoading && !error && rows.length === 0 ? (\n <Text style={[styles.empty, { color: muted }]}>\n {hint ??\n 'Nothing tracked yet. Open a catalog result and tap “Watch this price”, or ask the agent to “price check” a product.'}\n </Text>\n ) : null}\n\n {!isLoading && !error && rows.length > 0 ? (\n <>\n {rows.map((row) => {\n const { indexed, live } = row;\n const headline = live?.livePrice ?? indexed?.currentPrice;\n const hitTarget = live?.hitTarget ?? indexed?.hitTarget;\n const target = live?.targetPrice ?? indexed?.targetPrice;\n const link = live?.url || indexed?.url;\n return (\n <View key={row.key} style={[styles.row, { backgroundColor: card, borderColor: border }]}>\n <View style={styles.rowMain}>\n <Text style={[styles.name, { color: ink }]} numberOfLines={2}>\n {row.name ?? row.retailerId ?? 'watched page'}\n <Text style={[styles.small, { color: muted, fontWeight: '400' }]}>\n {' '}\n {row.name ? row.retailerId : row.productId}\n </Text>\n </Text>\n <View style={styles.facts}>\n <Delta delta={live?.delta ?? indexed?.delta} muted={muted} />\n {indexed?.previousPrice != null ? (\n <Text style={[styles.tiny, { color: muted }]}>\n was {formatPrice(indexed.previousPrice)}\n </Text>\n ) : null}\n {target != null ? (\n <Text style={[styles.tiny, { color: muted }]}>\n target {formatPrice(target)}\n </Text>\n ) : null}\n {live?.livePrice != null ? (\n <View style={styles.liveTag}>\n <MaterialCommunityIcons name=\"monitor-eye\" size={12} color={ink} />\n <Text style={[styles.tiny, { color: ink, fontWeight: '600' }]}>\n live {agoLabel(live.checkedAt)}\n {live.driftFromIndexed != null && live.driftFromIndexed !== 0 ? (\n <Text style={{ color: muted, fontWeight: '400' }}>\n {' '}\n ({live.driftFromIndexed > 0 ? '+' : '−'}\n {formatPrice(Math.abs(live.driftFromIndexed))} vs index)\n </Text>\n ) : null}\n </Text>\n </View>\n ) : null}\n {live?.error ? (\n <Text style={[styles.tiny, { color: RED }]}>last check: {live.error}</Text>\n ) : null}\n </View>\n </View>\n <View style={styles.rowSide}>\n <Text style={[styles.price, { color: ink }]}>\n {headline != null ? formatPrice(headline) : '—'}\n </Text>\n {hitTarget ? <Text style={[styles.tiny, styles.hit]}>hit target</Text> : null}\n {/* Say where a non-live number came from when it is not this pod's index. */}\n {live?.livePrice == null && indexed?.priceSource === 'live' ? (\n <Text style={[styles.tiny, { color: muted }]}>catalog, today</Text>\n ) : null}\n {live?.livePrice == null && indexed?.priceSource === 'pinned' ? (\n <Text style={[styles.tiny, { color: muted }]}>as pinned</Text>\n ) : null}\n {link ? (\n <Pressable\n onPress={() => void Linking.openURL(link).catch(() => undefined)}\n accessibilityRole=\"link\"\n accessibilityLabel={`Open ${row.name ?? 'the listing'}`}\n hitSlop={8}\n >\n <MaterialCommunityIcons name=\"open-in-new\" size={15} color=\"#007185\" />\n </Pressable>\n ) : null}\n </View>\n </View>\n );\n })}\n <Text style={[styles.tiny, styles.footer, { color: muted }]}>\n {liveCount > 0\n ? 'Live prices are validated hourly by your Computer’s browser; other prices are as of the last catalog index.'\n : 'Prices come from the catalog - as of the last index, or looked up today where nothing is indexed yet. Ask the agent to “price check” a product for hourly live validation.'}\n </Text>\n </>\n ) : null}\n </ScrollView>\n );\n}\n\nconst styles = StyleSheet.create({\n body: { padding: 16, gap: 10, paddingBottom: 32 },\n card: { borderWidth: 1, borderRadius: 16, padding: 14, gap: 6 },\n head: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' },\n titleRow: { flexDirection: 'row', alignItems: 'center', gap: 6 },\n title: { fontSize: 15, fontWeight: '700' },\n refreshButton: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n borderWidth: 1,\n borderRadius: 999,\n paddingHorizontal: 10,\n paddingVertical: 4,\n },\n refresh: { fontWeight: '600', fontSize: 12 },\n center: { paddingVertical: 24, alignItems: 'center', gap: 8 },\n error: { color: RED, textAlign: 'center' },\n retry: { backgroundColor: '#ffd814', borderRadius: 999, paddingHorizontal: 16, paddingVertical: 7 },\n retryText: { color: '#0f1111', fontSize: 13, fontWeight: '600' },\n empty: { textAlign: 'center', paddingVertical: 28, paddingHorizontal: 8, lineHeight: 19 },\n row: { borderWidth: 1, borderRadius: 12, padding: 12, flexDirection: 'row', gap: 10 },\n rowMain: { flex: 1, minWidth: 0, gap: 4 },\n rowSide: { alignItems: 'flex-end', gap: 3 },\n name: { fontSize: 13, fontWeight: '600' },\n facts: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', columnGap: 8, rowGap: 2 },\n liveTag: { flexDirection: 'row', alignItems: 'center', gap: 3 },\n price: { fontSize: 15, fontWeight: '800' },\n hit: { color: GREEN, fontWeight: '700' },\n small: { fontSize: 12 },\n tiny: { fontSize: 11 },\n footer: { paddingHorizontal: 4, lineHeight: 15 },\n});\n"],"names":[],"mappings":"scAiBA,MAAM,KAAQ,GAAA,SAAA;AACd,MAAM,GAAM,GAAA,SAAA;AACZ,SAAS,KAAM,CAAA;AAAA,EACb,KAAA;AAAA,EACA;AACF,CAGG,EAAA;AACD,EAAI,IAAA,KAAA,IAAS,IAAQ,IAAA,KAAA,KAAU,CAAG,EAAA;AAChC,IAAA,uBAAQ,GAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,CAAC,OAAO,KAAO,EAAA;AAAA,MACjC,KAAO,EAAA;AAAA,KACR,GAAG,QAAS,EAAA,WAAA,EAAA,CAAA;AAAA;AAEf,EAAA,MAAM,UAAU,KAAQ,GAAA,CAAA;AACxB,EAAA,uBAAQ,IAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,CAAC,OAAO,KAAO,EAAA;AAAA,IACjC,KAAA,EAAO,UAAU,KAAQ,GAAA,GAAA;AAAA,IACzB,UAAY,EAAA;AAAA,GACb,CACU,EAAA,QAAA,EAAA;AAAA,IAAA,OAAA,GAAU,QAAM,GAAA,QAAA;AAAA,IAAI,GAAA;AAAA,IAAE,WAAY,CAAA,IAAA,CAAK,GAAI,CAAA,KAAK,CAAC;AAAA,GACtD,EAAA,CAAA;AACR;AAGO,SAAS,QAAS,CAAA,GAAA,EAAa,GAAc,GAAA,IAAA,CAAK,KAAe,EAAA;AACtE,EAAA,MAAM,EAAK,GAAA,GAAA,GAAM,IAAK,CAAA,KAAA,CAAM,GAAG,CAAA;AAC/B,EAAA,IAAI,CAAC,MAAO,CAAA,QAAA,CAAS,EAAE,CAAK,IAAA,EAAA,GAAK,GAAU,OAAA,EAAA;AAC3C,EAAA,MAAM,OAAU,GAAA,IAAA,CAAK,KAAM,CAAA,EAAA,GAAK,GAAM,CAAA;AACtC,EAAI,IAAA,OAAA,GA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A,KAAO,EAAA;AAAA,IACL,aAAe,EAAA,KAAA;AAAA,IACf,QAAU,EAAA,MAAA;AAAA,IACV,UAAY,EAAA,QAAA;AAAA,IACZ,SAAW,EAAA,CAAA;AAAA,IACX,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,GAAK,EAAA;AAAA,GACP;AAAA,EACA,KAAO,EAAA;AAAA,IACL,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,GAAK,EAAA;AAAA,IACH,KAAO,EAAA,KAAA;AAAA,IACP,UAAY,EAAA;AAAA,GACd;AAAA,EACA,KAAO,EAAA;AAAA,IACL,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,iBAAmB,EAAA,CAAA;AAAA,IACnB,UAAY,EAAA;AAAA;AAEhB,CAAC,CAAA"}
1
+ {"version":3,"file":"WatchlistPanel.js","sources":["../../../src/features/shopping/WatchlistPanel.tsx"],"sourcesContent":["/**\n * The Watchlist view: what moved since the last look. Native twin of the web\n * surface's `WatchlistPanel.tsx` (0.49.0).\n *\n * Two lanes feed it, and the panel says which is which. The INDEX lane is the\n * catalog store - \"previous price\" means the previous *indexed* price. The\n * LIVE lane is the hourly price check: the user's Computer browser opens the\n * product page, validates the shelf price and records it. Live rows carry a\n * timestamp because a watchlist that silently lags the shelf is worse than one\n * that says when it was last read.\n *\n * Every watched product also has price alerts (web 0.41.0): the connector\n * checks it hourly and notifies the person when it drops under its target or\n * comes back in stock. Stopping a watch (`WATCH_REMOVE`) stops its alerts.\n */\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { ActivityIndicator, Linking, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { formatPrice } from './catalog';\nimport { fetchWatchStatus, removePriceWatch, type WatchRow } from './services/catalogProductSearch';\nimport {\n fetchLivePriceStatus,\n subscribePriceCheckUpdates,\n type LivePriceCheckRow,\n} from './services/livePriceCheckClient';\n\nconst GREEN = '#067d62';\nconst RED = '#b12704';\n\nfunction Delta({ delta, muted }: { delta?: number; muted: string }) {\n if (delta == null || delta === 0) {\n return <Text style={[styles.small, { color: muted }]}>no change</Text>;\n }\n const dropped = delta < 0;\n return (\n <Text style={[styles.small, { color: dropped ? GREEN : RED, fontWeight: '600' }]}>\n {dropped ? '▾' : 'â–ē'} {formatPrice(Math.abs(delta))}\n </Text>\n );\n}\n\n/** \"3m ago\" / \"2h ago\" for a live check timestamp. */\nexport function agoLabel(iso: string, now: number = Date.now()): string {\n const ms = now - Date.parse(iso);\n if (!Number.isFinite(ms) || ms < 0) return '';\n const minutes = Math.round(ms / 60_000);\n if (minutes < 1) return 'just now';\n if (minutes < 90) return `${minutes}m ago`;\n return `${Math.round(minutes / 60)}h ago`;\n}\n\n/** One panel row: an indexed watch, its live check, or both merged. */\nexport interface MergedRow {\n key: string;\n retailerId?: string;\n productId?: string;\n name?: string;\n indexed?: WatchRow;\n live?: LivePriceCheckRow;\n}\n\nexport function mergeWatchRows(indexed: WatchRow[], live: LivePriceCheckRow[]): MergedRow[] {\n const byKey = new Map<string, MergedRow>();\n for (const row of indexed) {\n const key = `${row.retailerId}:${row.productId}`;\n byKey.set(key, { key, retailerId: row.retailerId, productId: row.productId, name: row.name, indexed: row });\n }\n for (const row of live) {\n const key = row.retailer && row.productId ? `${row.retailer}:${row.productId}` : row.key;\n const existing = byKey.get(key);\n if (existing) {\n existing.live = row;\n existing.name = row.name ?? existing.name;\n } else {\n byKey.set(key, {\n key,\n retailerId: row.retailer,\n productId: row.productId,\n name: row.name,\n live: row,\n });\n }\n }\n return [...byKey.values()];\n}\n\nexport function WatchlistPanel({\n card,\n border,\n ink,\n muted,\n}: {\n card: string;\n border: string;\n ink: string;\n muted: string;\n}) {\n const [rows, setRows] = useState<MergedRow[]>([]);\n const [hint, setHint] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n /** The row whose watch is being stopped, and a stop that failed (shown on its row). */\n const [stopping, setStopping] = useState<string | null>(null);\n const [stopError, setStopError] = useState<{ key: string; message: string } | null>(null);\n\n const stopWatching = useCallback(async (row: MergedRow) => {\n if (!row.retailerId || !row.productId) return;\n setStopping(row.key);\n setStopError(null);\n try {\n await removePriceWatch({ retailer: row.retailerId, productId: row.productId });\n setRows((current) => current.filter((r) => r.key !== row.key));\n } catch (err) {\n // The connector's error is for whoever debugs it; a shopper gets what to do next.\n console.warn('[shopping] stop watching failed:', err);\n setStopError({ key: row.key, message: 'Couldn’t stop watching this - try again in a moment.' });\n } finally {\n setStopping(null);\n }\n }, []);\n\n const load = useCallback(async () => {\n setIsLoading(true);\n setError(null);\n try {\n // The live lane failing (older connector, no checks yet) must not\n // blank the indexed watchlist - and vice versa.\n const [indexed, live] = await Promise.all([\n fetchWatchStatus().catch((err) => {\n // Keep the reason: with BOTH lanes empty it is the error shown.\n return { rows: [] as WatchRow[], hint: err instanceof Error ? err.message : String(err) };\n }),\n fetchLivePriceStatus().catch(() => ({ rows: [] as LivePriceCheckRow[], count: 0, series: {} })),\n ]);\n const merged = mergeWatchRows(indexed.rows, live.rows);\n setRows(merged);\n setHint(merged.length === 0 ? (indexed.hint ?? null) : null);\n } catch (err) {\n setRows([]);\n setHint(null);\n setError(err instanceof Error ? err.message : 'Could not read the watchlist');\n } finally {\n setIsLoading(false);\n }\n }, []);\n\n useEffect(() => {\n void load();\n }, [load]);\n\n // A finished live check (the first one runs right after \"price check X\")\n // repaints the panel without the user hunting for Refresh.\n useEffect(() => subscribePriceCheckUpdates(() => void load()), [load]);\n\n const hits = rows.filter((row) => row.live?.hitTarget || row.indexed?.hitTarget).length;\n const liveCount = rows.filter((row) => row.live?.livePrice != null).length;\n\n return (\n <ScrollView contentContainerStyle={styles.body}>\n <View style={[styles.card, { backgroundColor: card, borderColor: border }]}>\n <View style={styles.head}>\n <View style={styles.titleRow}>\n <MaterialCommunityIcons name=\"bell-ring-outline\" size={16} color={ink} />\n <Text style={[styles.title, { color: ink }]}>Watchlist</Text>\n </View>\n <Pressable\n onPress={() => void load()}\n accessibilityRole=\"button\"\n style={[styles.refreshButton, { borderColor: border }]}\n >\n <MaterialCommunityIcons name=\"refresh\" size={13} color={ink} />\n <Text style={[styles.refresh, { color: ink }]}>Refresh</Text>\n </Pressable>\n </View>\n {rows.length > 0 ? (\n <Text style={[styles.small, { color: muted }]}>\n {rows.length} tracked\n {liveCount > 0 ? (\n <Text style={{ color: ink, fontWeight: '600' }}> · {liveCount} live-checked hourly</Text>\n ) : null}\n {hits > 0 ? (\n <Text style={{ color: GREEN, fontWeight: '700' }}> · {hits} hit target</Text>\n ) : null}\n </Text>\n ) : null}\n </View>\n\n {isLoading ? (\n <View style={styles.center}>\n <ActivityIndicator />\n <Text style={[styles.small, { color: muted }]}>Reading watched pricesâ€Ķ</Text>\n </View>\n ) : null}\n\n {!isLoading && error ? (\n <View style={styles.center} accessibilityRole=\"alert\">\n <Text style={styles.error}>{error}</Text>\n <Pressable onPress={() => void load()} accessibilityRole=\"button\" style={styles.retry}>\n <Text style={styles.retryText}>Try again</Text>\n </Pressable>\n </View>\n ) : null}\n\n {!isLoading && !error && rows.length === 0 ? (\n <Text style={[styles.empty, { color: muted }]}>\n {hint ??\n 'Nothing watched yet. Open a catalog result, choose “Compare & track”, then “Watch this price” - you’ll get a notification when it drops. Or ask the agent to watch a product.'}\n </Text>\n ) : null}\n\n {!isLoading && !error && rows.length > 0 ? (\n <>\n {rows.map((row) => {\n const { indexed, live } = row;\n const headline = live?.livePrice ?? indexed?.currentPrice;\n const hitTarget = live?.hitTarget ?? indexed?.hitTarget;\n const target = live?.targetPrice ?? indexed?.targetPrice;\n const link = live?.url || indexed?.url;\n return (\n <View key={row.key} style={[styles.row, { backgroundColor: card, borderColor: border }]}>\n <View style={styles.rowMain}>\n <Text style={[styles.name, { color: ink }]} numberOfLines={2}>\n {row.name ?? row.retailerId ?? 'watched page'}\n <Text style={[styles.small, { color: muted, fontWeight: '400' }]}>\n {' '}\n {row.name ? row.retailerId : row.productId}\n </Text>\n </Text>\n <View style={styles.facts}>\n <Delta delta={live?.delta ?? indexed?.delta} muted={muted} />\n {indexed?.previousPrice != null ? (\n <Text style={[styles.tiny, { color: muted }]}>\n was {formatPrice(indexed.previousPrice)}\n </Text>\n ) : null}\n {target != null ? (\n <Text style={[styles.tiny, { color: muted }]}>\n target {formatPrice(target)}\n </Text>\n ) : null}\n {live?.livePrice != null ? (\n <View style={styles.liveTag}>\n <MaterialCommunityIcons name=\"monitor-eye\" size={12} color={ink} />\n <Text style={[styles.tiny, { color: ink, fontWeight: '600' }]}>\n live {agoLabel(live.checkedAt)}\n {live.driftFromIndexed != null && live.driftFromIndexed !== 0 ? (\n <Text style={{ color: muted, fontWeight: '400' }}>\n {' '}\n ({live.driftFromIndexed > 0 ? '+' : '−'}\n {formatPrice(Math.abs(live.driftFromIndexed))} vs index)\n </Text>\n ) : null}\n </Text>\n </View>\n ) : null}\n {live?.error ? (\n <Text style={[styles.tiny, { color: RED }]}>last check: {live.error}</Text>\n ) : null}\n {stopError?.key === row.key ? (\n <Text style={[styles.tiny, { color: RED }]} accessibilityRole=\"alert\">\n {stopError.message}\n </Text>\n ) : null}\n </View>\n </View>\n <View style={styles.rowSide}>\n <Text style={[styles.price, { color: ink }]}>\n {headline != null ? formatPrice(headline) : '—'}\n </Text>\n {hitTarget ? <Text style={[styles.tiny, styles.hit]}>hit target</Text> : null}\n {/* Say where a non-live number came from when it is not this pod's index. */}\n {live?.livePrice == null && indexed?.priceSource === 'live' ? (\n <Text style={[styles.tiny, { color: muted }]}>catalog, today</Text>\n ) : null}\n {live?.livePrice == null && indexed?.priceSource === 'pinned' ? (\n <Text style={[styles.tiny, { color: muted }]}>as pinned</Text>\n ) : null}\n {link ? (\n <Pressable\n onPress={() => void Linking.openURL(link).catch(() => undefined)}\n accessibilityRole=\"link\"\n accessibilityLabel={`Open ${row.name ?? 'the listing'}`}\n hitSlop={8}\n >\n <MaterialCommunityIcons name=\"open-in-new\" size={15} color=\"#007185\" />\n </Pressable>\n ) : null}\n {/* Only a pinned watch can be stopped here; a live-only row is a price\n check the agent armed, paused with \"stop the price check\". */}\n {indexed && row.retailerId && row.productId ? (\n <Pressable\n onPress={() => void stopWatching(row)}\n disabled={stopping === row.key}\n accessibilityRole=\"button\"\n accessibilityLabel={`Stop watching ${row.name ?? 'this product'}`}\n accessibilityState={{\n disabled: stopping === row.key,\n busy: stopping === row.key,\n }}\n style={[styles.stop, stopping === row.key && styles.stopBusy]}\n hitSlop={6}\n >\n {stopping === row.key ? (\n <ActivityIndicator size=\"small\" />\n ) : (\n <MaterialCommunityIcons\n name=\"bell-off-outline\"\n size={16}\n color={muted}\n />\n )}\n </Pressable>\n ) : null}\n </View>\n </View>\n );\n })}\n <View style={styles.alertsOn} testID=\"watchlist-alerts-on\">\n <MaterialCommunityIcons name=\"bell-ring-outline\" size={12} color={ink} />\n <Text style={[styles.tiny, styles.alertsOnText, { color: ink }]}>\n Price alerts are on: you’ll get a notification here and on your phone when a watched price\n drops (under its target, when it has one) or the product is back in stock.\n </Text>\n </View>\n <Text style={[styles.tiny, styles.footer, { color: muted }]}>\n {liveCount > 0\n ? 'Live prices are validated hourly by your Computer’s browser; other prices are as of the last catalog index.'\n : 'Prices come from the catalog - as of the last index, or looked up today where nothing is indexed yet. Ask the agent to “price check” a product for hourly live validation.'}\n </Text>\n </>\n ) : null}\n </ScrollView>\n );\n}\n\nconst styles = StyleSheet.create({\n body: { padding: 16, gap: 10, paddingBottom: 32 },\n card: { borderWidth: 1, borderRadius: 16, padding: 14, gap: 6 },\n head: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' },\n titleRow: { flexDirection: 'row', alignItems: 'center', gap: 6 },\n title: { fontSize: 15, fontWeight: '700' },\n refreshButton: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n borderWidth: 1,\n borderRadius: 999,\n paddingHorizontal: 10,\n paddingVertical: 4,\n },\n refresh: { fontWeight: '600', fontSize: 12 },\n center: { paddingVertical: 24, alignItems: 'center', gap: 8 },\n error: { color: RED, textAlign: 'center' },\n retry: { backgroundColor: '#ffd814', borderRadius: 999, paddingHorizontal: 16, paddingVertical: 7 },\n retryText: { color: '#0f1111', fontSize: 13, fontWeight: '600' },\n empty: { textAlign: 'center', paddingVertical: 28, paddingHorizontal: 8, lineHeight: 19 },\n row: { borderWidth: 1, borderRadius: 12, padding: 12, flexDirection: 'row', gap: 10 },\n rowMain: { flex: 1, minWidth: 0, gap: 4 },\n rowSide: { alignItems: 'flex-end', gap: 3 },\n name: { fontSize: 13, fontWeight: '600' },\n facts: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', columnGap: 8, rowGap: 2 },\n liveTag: { flexDirection: 'row', alignItems: 'center', gap: 3 },\n price: { fontSize: 15, fontWeight: '800' },\n hit: { color: GREEN, fontWeight: '700' },\n small: { fontSize: 12 },\n tiny: { fontSize: 11 },\n footer: { paddingHorizontal: 4, lineHeight: 15 },\n alertsOn: { flexDirection: 'row', alignItems: 'flex-start', gap: 4, paddingHorizontal: 4 },\n alertsOnText: { flex: 1, lineHeight: 15 },\n stop: { width: 36, height: 36, borderRadius: 18, alignItems: 'center', justifyContent: 'center', marginRight: -6 },\n stopBusy: { opacity: 0.6 },\n});\n"],"names":[],"mappings":"udAqBA,MAAM,KAAQ,GAAA,SAAA;AACd,MAAM,GAAM,GAAA,SAAA;AACZ,SAAS,KAAM,CAAA;AAAA,EACb,KAAA;AAAA,EACA;AACF,CAGG,EAAA;AACD,EAAI,IAAA,KAAA,IAAS,IAAQ,IAAA,KAAA,KAAU,CAAG,EAAA;AAChC,IAAA,uBAAQ,GAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,CAAC,OAAO,K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A,GACd;AAAA,EACA,KAAO,EAAA;AAAA,IACL,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,iBAAmB,EAAA,CAAA;AAAA,IACnB,UAAY,EAAA;AAAA,GACd;AAAA,EACA,QAAU,EAAA;AAAA,IACR,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,YAAA;AAAA,IACZ,GAAK,EAAA,CAAA;AAAA,IACL,iBAAmB,EAAA;AAAA,GACrB;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,CAAA;AAAA,IACN,UAAY,EAAA;AAAA,GACd;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,KAAO,EAAA,EAAA;AAAA,IACP,MAAQ,EAAA,EAAA;AAAA,IACR,YAAc,EAAA,EAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,WAAa,EAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,OAAS,EAAA;AAAA;AAEb,CAAC,CAAA"}
@@ -1,4 +1,25 @@
1
- const PRODUCT_SOURCES = ["catalog", "amazon", "walmart", "bestbuy", "ebay", "target", "shopify", "temu", "costco", "homedepot", "lowes", "newegg", "google", "yantra"];
1
+ const PRODUCT_SOURCES = [
2
+ "catalog",
3
+ "amazon",
4
+ "walmart",
5
+ "bestbuy",
6
+ "ebay",
7
+ "target",
8
+ "shopify",
9
+ "temu",
10
+ "costco",
11
+ "homedepot",
12
+ "lowes",
13
+ "newegg",
14
+ // Second-hand marketplaces, thrift and resale shops (services/usedSites), read
15
+ // in the shopper's own browser. One source for all of them: each card names
16
+ // its site from its link (retailerBadge), and they share the Used section.
17
+ // On a phone the source comes from a server row's link on one of those
18
+ // sites (detectRetailerSourceFromUrl), e.g. a Google Shopping row re-homed.
19
+ "used",
20
+ "google",
21
+ "yantra"
22
+ ];
2
23
  function isProductSource(value) {
3
24
  return !!value && PRODUCT_SOURCES.includes(value);
4
25
  }
@@ -180,7 +201,24 @@ function productDisplayName(name) {
180
201
  const cleaned = name.replace(/^\s*(?:www\.)?[a-z0-9-]+(?:\.[a-z0-9-]+)*\.(?:com|net|org|co\.uk|ca|in)\s*:\s*/i, "").trim();
181
202
  return cleaned || name.trim();
182
203
  }
183
- const SOURCE_ORDER = ["catalog", "amazon", "walmart", "bestbuy", "ebay", "target", "costco", "homedepot", "lowes", "newegg", "shopify", "temu", "google", "yantra"];
204
+ const SOURCE_ORDER = [
205
+ "catalog",
206
+ "amazon",
207
+ "walmart",
208
+ "bestbuy",
209
+ "ebay",
210
+ "target",
211
+ "costco",
212
+ "homedepot",
213
+ "lowes",
214
+ "newegg",
215
+ "shopify",
216
+ "temu",
217
+ // Second-hand listings and refurbished stock, after the stores' new stock.
218
+ "used",
219
+ "google",
220
+ "yantra"
221
+ ];
184
222
  const SOURCE_LABELS = {
185
223
  catalog: "Catalog",
186
224
  amazon: "Amazon",
@@ -194,6 +232,7 @@ const SOURCE_LABELS = {
194
232
  newegg: "Newegg",
195
233
  shopify: "Shopify",
196
234
  temu: "Temu",
235
+ used: "Used",
197
236
  google: "Google Shopping",
198
237
  yantra: "Yantra picks"
199
238
  };
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.js","sources":["../../../src/features/shopping/catalog.ts"],"sourcesContent":["/**\n * Storefront catalog types and department metadata — native twin of the web\n * surface's `catalog.ts` (`@yantra/shopping-surface` 0.37.0). Native also keeps\n * the source ordering / labels / sections here (web holds them in\n * `services/shoppingProductSearch.ts` and `ProductRow.tsx`), plus\n * `productDisplayName`.\n */\nimport { amazonImageUrlFromAsin } from './resolveProductImage';\n\n// `costco` / `homedepot` / `lowes` / `newegg` are bot-walled to a server-side\n// fetch, and Costco's real price is member-gated. They reach the page two ways:\n// the user's paired browser, or `google` - the aggregator lane, whose rows are\n// hosted by the merchant and get re-homed to that merchant's section by URL.\n// A list rather than a bare union, so the runtime can ask \"is this a source?\"\n// instead of each caller keeping its own hand-written copy of the members —\n// three of them had one, and each was missing a different source.\nexport const PRODUCT_SOURCES = [\n 'catalog',\n 'amazon',\n 'walmart',\n 'bestbuy',\n 'ebay',\n 'target',\n 'shopify',\n 'temu',\n 'costco',\n 'homedepot',\n 'lowes',\n 'newegg',\n 'google',\n 'yantra',\n] as const;\n\nexport type ProductSource = (typeof PRODUCT_SOURCES)[number];\n\n/** Narrow a free-text `source` (a stored widget, a connector payload) to the union. */\nexport function isProductSource(value: string | undefined): value is ProductSource {\n return !!value && (PRODUCT_SOURCES as readonly string[]).includes(value);\n}\n\nexport interface Department {\n id: string;\n title: string;\n /** Emoji used as the department thumbnail. */\n icon: string;\n tagline: string;\n /** Tailwind-ish accent (hex) used for the card tint. */\n accent: string;\n}\n\n/** One playable product video, as the connector's PRODUCT_MEDIA action answers it. */\nexport interface ProductVideo {\n url: string;\n /** `application/vnd.apple.mpegurl` (HLS: native in Safari, hls.js elsewhere), `video/mp4`, `video/webm`. */\n mime: string;\n poster?: string;\n title?: string;\n durationSeconds?: number;\n width?: number;\n height?: number;\n}\n\nexport interface Product {\n id: string;\n name: string;\n departmentId: string;\n price: number;\n /** 0–5, one decimal. */\n rating: number;\n reviews: number;\n icon: string;\n accent: string;\n /** Product photo from retailer / shopping-search connector. */\n imageUrl?: string;\n /**\n * The rest of the listing's gallery, when a lane already carried it (Google\n * Shopping rows ship every photo). The card shows `imageUrl` first, then these.\n */\n images?: string[];\n /** Playable listing videos, when a lane carried them. */\n videos?: ProductVideo[];\n url?: string;\n /** Amazon ASIN when sourced from Amazon SERP. */\n asin?: string;\n isPrime?: boolean;\n sponsored?: boolean;\n /** Where this card came from — used to section the storefront. */\n source?: ProductSource;\n\n // ─── Typed catalog fields (LemmeBuyIt via the connector's lemmebuyit provider) ───\n // A SERP scrape cannot supply these: the price it finds is the first $-shaped\n // match in a page excerpt, and identifiers appear nowhere in a rendered page.\n\n /** List price before discount, so the card can strike it through. */\n originalPrice?: number;\n /** 0–100. Drives the discount badge. */\n discountPercent?: number;\n /** ISO code; catalog rows can be non-USD. */\n currency?: string;\n inStock?: boolean;\n /**\n * The product page was fetched and carried product markup - the link opens a\n * real listing. Absent means \"not checked\", never \"broken\": a page we could\n * not read (bot wall, timeout) leaves this unset rather than false.\n */\n linkVerified?: boolean;\n /** `price` was read off the live product page, not a search excerpt or an index. */\n priceVerified?: boolean;\n brand?: string;\n /** Retailer id/slug as the catalog knows it — the argument compare/watch take. */\n retailerId?: string;\n /** Retailer SKU, the id price-history and watch are keyed on. */\n sku?: string;\n /** Shared product identifiers — what makes cross-retailer compare possible. */\n upc?: string;\n ean?: string;\n gtin?: string;\n mpn?: string;\n\n // ─── Google Shopping (Real-Time Product Search via the connector's OFFERS action) ───\n /** Google's product id: `/product-offers` on it lists every merchant selling this product. */\n offerProductId?: string;\n /** Google groups more than one merchant under this product. */\n hasMultipleOffers?: boolean;\n\n // ─── Store search-card details (shopping parity contract, section 1) ───\n // Each one is the store's own words for THIS card, read off its results page.\n // Absent means the store did not print it - the card then shows nothing, never\n // a guess.\n\n /** \"FREE delivery Sat, Nov 14\". */\n delivery?: string;\n /** ISO date (`2026-11-14`), only when the delivery text names a date. */\n deliveryDate?: string;\n /** \"Or fastest delivery Tomorrow, Nov 13\". */\n fastestDelivery?: string;\n /** \"Save $80 with coupon\". */\n coupon?: string;\n /** \"5K+ bought in past month\". */\n boughtRecently?: string;\n /** The store's own tags: \"Best Seller\", \"Overall Pick\", \"Limited time deal\". */\n badges?: string[];\n /** The colours / sizes this card stands for, when it stands for more than one. */\n variants?: ProductVariant[];\n /** How many variants the store says there are, when it does not list them (\"+3 colors\"). */\n variantCount?: number;\n}\n\n/**\n * One colour / size of a product, as a search card or product page lists it\n * (shopping parity contract, section 3). Picking it on a card changes the\n * card's photo, price and link. The same shape the product drawer reads a\n * page's variants into, so one type serves both.\n */\nexport interface ProductVariant {\n /** \"Black Truffle\", \"Large\", \"Black Truffle / 2 lb\". */\n label: string;\n price?: string;\n amount?: number;\n currency?: string;\n url?: string;\n image?: string;\n /** Dimension to value, named as the store names it: `{ Color: \"Black Truffle\" }`, `{ Size: \"L\" }`. */\n attributes: Record<string, string>;\n /** The variant the card or page shows now. */\n selected: boolean;\n available?: boolean;\n asin?: string;\n /**\n * Set when the surface merged separate search rows into one card: the id of\n * the row this variant was. Picking it puts that row's own id in the cart.\n */\n productId?: string;\n}\n\n/** The identifier `compare` should look up for a product, and which kind it is. */\nexport function productIdentifier(\n product: Pick<Product, 'upc' | 'ean' | 'gtin' | 'asin'>,\n): { identifier: string; lookupType: 'upc' | 'ean' | 'gtin' | 'asin' } | null {\n if (product.upc) return { identifier: product.upc, lookupType: 'upc' };\n if (product.ean) return { identifier: product.ean, lookupType: 'ean' };\n if (product.gtin) return { identifier: product.gtin, lookupType: 'gtin' };\n if (product.asin) return { identifier: product.asin, lookupType: 'asin' };\n return null;\n}\n\nexport const DEPARTMENTS: Department[] = [\n { id: 'high-tech', title: 'High-Tech', icon: 'ðŸ’ŧ', tagline: 'Phones, laptops & audio', accent: '#6366F1' },\n { id: 'sports', title: 'Sports & leisure', icon: 'ðŸšī', tagline: 'Gear for every season', accent: '#10B981' },\n { id: 'beauty', title: 'Beauty & wellness', icon: '💄', tagline: 'Skincare, makeup & more', accent: '#EC4899' },\n { id: 'home-garden', title: 'Lawn & Garden', icon: 'ðŸŠī', tagline: 'Furniture, BBQ & lighting', accent: '#F59E0B' },\n { id: 'office', title: 'Offices', icon: 'ðŸ–Ĩïļ', tagline: 'Desks, tablets & supplies', accent: '#0EA5E9' },\n { id: 'toys', title: 'Toys & Games', icon: 'ðŸ§ļ', tagline: 'Fun for all ages', accent: '#EF4444' },\n { id: 'fashion', title: 'Clothing & Shoes', icon: '👟', tagline: 'Apparel, shoes & bags', accent: '#8B5CF6' },\n { id: 'grocery', title: 'Grocery & Household', icon: '🛒', tagline: 'Pantry, cleaning & paper', accent: '#14B8A6' },\n { id: 'auto', title: 'Auto & Tools', icon: '🔧', tagline: 'Car care & power tools', accent: '#64748B' },\n { id: 'pets', title: 'Pet Supplies', icon: 'ðŸū', tagline: 'Food, toys & beds', accent: '#F97316' },\n {\n id: 'kitchen',\n title: 'Kitchen & Dining',\n icon: 'ðŸģ',\n tagline: 'Cookware, appliances & tableware',\n accent: '#E11D48',\n },\n {\n id: 'furniture',\n title: 'Furniture & Decor',\n icon: '🛋ïļ',\n tagline: 'Sofas, storage & lighting',\n accent: '#A16207',\n },\n { id: 'baby', title: 'Baby & Kids', icon: '🍞', tagline: 'Strollers, car seats & clothing', accent: '#F472B6' },\n {\n id: 'health',\n title: 'Health & Fitness',\n icon: '💊',\n tagline: 'Supplements, trackers & equipment',\n accent: '#22C55E',\n },\n { id: 'gaming', title: 'Gaming', icon: 'ðŸŽŪ', tagline: 'Consoles, PC parts & accessories', accent: '#7C3AED' },\n { id: 'books', title: 'Books & Media', icon: '📚', tagline: 'Books, music & movies', accent: '#0891B2' },\n {\n id: 'jewelry',\n title: 'Jewelry & Watches',\n icon: '⌚',\n tagline: 'Watches, rings & fine jewelry',\n accent: '#CA8A04',\n },\n {\n id: 'travel',\n title: 'Travel & Luggage',\n icon: 'ðŸ§ģ',\n tagline: 'Suitcases, bags & accessories',\n accent: '#2563EB',\n },\n {\n id: 'music',\n title: 'Musical Instruments',\n icon: 'ðŸŽļ',\n tagline: 'Guitars, keyboards & audio gear',\n accent: '#DC2626',\n },\n { id: 'camera', title: 'Cameras & Photo', icon: '📷', tagline: 'Cameras, lenses & drones', accent: '#475569' },\n];\n\n/**\n * The badge a row wears when it claims NO department.\n *\n * A free-text search can return anything — a t-shirt, dog food, a brake pad —\n * and none of it belongs to one of the six browse aisles. Falling back to\n * `DEPARTMENTS[0]` put a laptop emoji and an indigo tint on all of it, which\n * reads as \"this is an electronics store\" for every other category. A neutral\n * badge says \"no picture yet\" instead of asserting an aisle the row never\n * claimed.\n */\nexport const NEUTRAL_DEPARTMENT: Department = {\n id: '',\n title: 'All departments',\n icon: '\\u{1F6CD}',\n tagline: 'Everything the stores carry',\n accent: '#94A3B8',\n};\n\n/**\n * The department badge a product row should wear: the department it was browsed\n * from, or {@link NEUTRAL_DEPARTMENT} when the row came from a search that named\n * none. Single definition — five services each had their own copy of this,\n * every one of them defaulting to High-Tech.\n */\nexport function departmentBadge(departmentId?: string): Department {\n return (departmentId && DEPARTMENTS.find((d) => d.id === departmentId)) || NEUTRAL_DEPARTMENT;\n}\n\n/**\n * The site a listing lives on, as a shopper reads it: `\"greenleaf-supply.example\"`\n * for `https://www.greenleaf-supply.example/products/â€Ķ`. Undefined without a\n * usable http(s) link.\n */\nexport function listingHost(url?: string): string | undefined {\n if (!url) return undefined;\n try {\n const parsed = new URL(url);\n if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') return undefined;\n return parsed.hostname.replace(/^www\\./, '') || undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Format a number as a locale-aware price string (e.g. en → \"$1,199.00\").\n *\n * Takes an optional ISO currency because not every source is a USD source:\n * coupon and voucher feeds are country-scoped and routinely return GBP, EUR or\n * INR rows, and rendering those with a `$` states a price the merchant does not\n * charge. An unknown or malformed code falls back to USD rather than throwing —\n * `Intl` rejects a bad code, and a card must not disappear over a currency\n * label.\n */\nexport function formatPrice(value: number, currency?: string): string {\n const code = currency?.trim().toUpperCase();\n try {\n return new Intl.NumberFormat(undefined, { style: 'currency', currency: code || 'USD' }).format(value);\n } catch {\n return new Intl.NumberFormat(undefined, { style: 'currency', currency: 'USD' }).format(value);\n }\n}\n\n/**\n * A product name as a shopper reads it. Names taken from a page title carry the\n * site in front (\"Amazon.com: 100Pcs Mochi Squishy Toy...\"), which repeats the\n * store badge and pushes the product words off a two-line card.\n */\nexport function productDisplayName(name: string): string {\n const cleaned = name\n .replace(/^\\s*(?:www\\.)?[a-z0-9-]+(?:\\.[a-z0-9-]+)*\\.(?:com|net|org|co\\.uk|ca|in)\\s*:\\s*/i, '')\n .trim();\n return cleaned || name.trim();\n}\n\n/**\n * Section and merge order, as web's `shoppingProductSearch.ts` keeps it. Catalog\n * first (typed prices and identifiers), then the shops, Temu after the dedicated\n * lanes, Google after every shop (its rows for a known shop are re-homed there),\n * and the web research last.\n */\nexport const SOURCE_ORDER: ProductSource[] = [\n 'catalog',\n 'amazon',\n 'walmart',\n 'bestbuy',\n 'ebay',\n 'target',\n 'costco',\n 'homedepot',\n 'lowes',\n 'newegg',\n 'shopify',\n 'temu',\n 'google',\n 'yantra',\n];\n\nexport const SOURCE_LABELS: Record<ProductSource, string> = {\n catalog: 'Catalog',\n amazon: 'Amazon',\n walmart: 'Walmart',\n bestbuy: 'Best Buy',\n ebay: 'eBay',\n target: 'Target',\n costco: 'Costco',\n homedepot: 'Home Depot',\n lowes: \"Lowe's\",\n newegg: 'Newegg',\n shopify: 'Shopify',\n temu: 'Temu',\n google: 'Google Shopping',\n yantra: 'Yantra picks',\n};\n\nexport const SOURCE_SECTION: Record<ProductSource, { title: string; subtitle: string }> = {\n catalog: {\n title: 'Catalog matches',\n subtitle: 'Typed rows via LemmeBuyIt — list price, discount and identifiers',\n },\n amazon: { title: 'Amazon results', subtitle: 'Live Amazon SERP via yantra-shopping-search' },\n walmart: { title: 'Walmart results', subtitle: 'Live Walmart SERP via yantra-shopping-search' },\n bestbuy: { title: 'Best Buy results', subtitle: 'Live Best Buy listings via yantra-shopping-search' },\n ebay: { title: 'eBay results', subtitle: 'Live eBay SERP via yantra-shopping-search' },\n target: { title: 'Target results', subtitle: 'Live Target SERP via yantra-shopping-search' },\n costco: { title: 'Costco results', subtitle: 'Indexed and live retailer coverage' },\n homedepot: { title: 'Home Depot results', subtitle: 'Indexed and live retailer coverage' },\n lowes: { title: \"Lowe's results\", subtitle: 'Indexed and live retailer coverage' },\n newegg: { title: 'Newegg results', subtitle: 'Indexed and live retailer coverage' },\n shopify: { title: 'Shopify results', subtitle: 'Live Shopify SERP via yantra-shopping-search' },\n temu: { title: 'Temu results', subtitle: 'Live Temu SERP via yantra-shopping-search' },\n google: {\n title: 'Google Shopping results',\n subtitle: 'Shops with no section of their own — matched across the web',\n },\n yantra: { title: 'Yantra picks', subtitle: 'Curated research via yantra-shopping-search' },\n};\n\nexport function productSource(product: Product): ProductSource {\n return product.source && isProductSource(product.source) ? product.source : 'yantra';\n}\n\n/** Re-exported for older native callers; the definition lives in `resolveProductImage.ts` (as on web). */\nexport { amazonImageUrlFromAsin };\n"],"names":[],"mappings":"AAgBO,MAAM,eAAkB,GAAA,CAAC,SAAW,EAAA,QAAA,EAAU,WAAW,SAAW,EAAA,MAAA,EAAQ,QAAU,EAAA,SAAA,EAAW,QAAQ,QAAU,EAAA,WAAA,EAAa,OAAS,EAAA,QAAA,EAAU,UAAU,QAAQ;AAIrK,SAAS,gBAAgB,KAAmD,EAAA;AACjF,EAAA,OAAO,CAAC,CAAC,KAAU,IAAA,eAAA,CAAsC,SAAS,KAAK,CAAA;AACzE;AAwIO,SAAS,kBAAkB,OAGzB,EAAA;AACP,EAAI,IAAA,OAAA,CAAQ,KAAY,OAAA;AAAA,IACtB,YAAY,OAAQ,CAAA,GAAA;AAAA,IACpB,UAAY,EAAA;AAAA,GACd;AACA,EAAI,IAAA,OAAA,CAAQ,KAAY,OAAA;AAAA,IACtB,YAAY,OAAQ,CAAA,GAAA;AAAA,IACpB,UAAY,EAAA;AAAA,GACd;AACA,EAAI,IAAA,OAAA,CAAQ,MAAa,OAAA;AAAA,IACvB,YAAY,OAAQ,CAAA,IAAA;AAAA,IACpB,UAAY,EAAA;AAAA,GACd;AACA,EAAI,IAAA,OAAA,CAAQ,MAAa,OAAA;AAAA,IACvB,YAAY,OAAQ,CAAA,IAAA;AAAA,IACpB,UAAY,EAAA;AAAA,GACd;AACA,EAAO,OAAA,IAAA;AACT;AACO,MAAM,cAA4B,CAAC;AAAA,EACxC,EAAI,EAAA,WAAA;AAAA,EACJ,KAAO,EAAA,WAAA;AAAA,EACP,IAAM,EAAA,WAAA;AAAA,EACN,OAAS,EAAA,yBAAA;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EAAA,YAAA;AAAA,EACX,KAAO,EAAA,QAAA;AAAA,EACP,MAAQ,EAAA,QAAA;AAAA,EACR,OAAS,EAAA,SAAA;AAAA,EACT,IAAM,EAAA,MAAA;AAAA,EACN,MAAQ,EAAA,iBAAA;AAAA,EACR,MAAQ,EAAA;AACV;AA8DO,SAAS,cAAc,OAAiC,EAAA;AAC7D,EAAA,OAAO,QAAQ,MAAU,IAAA,eAAA,CAAgB,QAAQ,MAAM,CAAA,GAAI,QAAQ,MAAS,GAAA,QAAA;AAC9E"}
1
+ {"version":3,"file":"catalog.js","sources":["../../../src/features/shopping/catalog.ts"],"sourcesContent":["/**\n * Storefront catalog types and department metadata — native twin of the web\n * surface's `catalog.ts` (`@yantra/shopping-surface` 0.49.0). Native also keeps\n * the source ordering / labels / sections here (web holds them in\n * `services/shoppingProductSearch.ts` and `ProductRow.tsx`), plus\n * `productDisplayName`.\n */\nimport { amazonImageUrlFromAsin } from './resolveProductImage';\n\n// `costco` / `homedepot` / `lowes` / `newegg` are bot-walled to a server-side\n// fetch, and Costco's real price is member-gated. They reach the page two ways:\n// the user's paired browser, or `google` - the aggregator lane, whose rows are\n// hosted by the merchant and get re-homed to that merchant's section by URL.\n// A list rather than a bare union, so the runtime can ask \"is this a source?\"\n// instead of each caller keeping its own hand-written copy of the members —\n// three of them had one, and each was missing a different source.\nexport const PRODUCT_SOURCES = [\n 'catalog',\n 'amazon',\n 'walmart',\n 'bestbuy',\n 'ebay',\n 'target',\n 'shopify',\n 'temu',\n 'costco',\n 'homedepot',\n 'lowes',\n 'newegg',\n // Second-hand marketplaces, thrift and resale shops (services/usedSites), read\n // in the shopper's own browser. One source for all of them: each card names\n // its site from its link (retailerBadge), and they share the Used section.\n // On a phone the source comes from a server row's link on one of those\n // sites (detectRetailerSourceFromUrl), e.g. a Google Shopping row re-homed.\n 'used',\n 'google',\n 'yantra',\n] as const;\n\nexport type ProductSource = (typeof PRODUCT_SOURCES)[number];\n\n/** Narrow a free-text `source` (a stored widget, a connector payload) to the union. */\nexport function isProductSource(value: string | undefined): value is ProductSource {\n return !!value && (PRODUCT_SOURCES as readonly string[]).includes(value);\n}\n\nexport interface Department {\n id: string;\n title: string;\n /** Emoji used as the department thumbnail. */\n icon: string;\n tagline: string;\n /** Tailwind-ish accent (hex) used for the card tint. */\n accent: string;\n}\n\n/** One playable product video, as the connector's PRODUCT_MEDIA action answers it. */\nexport interface ProductVideo {\n url: string;\n /** `application/vnd.apple.mpegurl` (HLS: native in Safari, hls.js elsewhere), `video/mp4`, `video/webm`. */\n mime: string;\n poster?: string;\n title?: string;\n durationSeconds?: number;\n width?: number;\n height?: number;\n}\n\nexport interface Product {\n id: string;\n name: string;\n departmentId: string;\n price: number;\n /** 0–5, one decimal. */\n rating: number;\n reviews: number;\n icon: string;\n accent: string;\n /** Product photo from retailer / shopping-search connector. */\n imageUrl?: string;\n /**\n * The rest of the listing's gallery, when a lane already carried it (Google\n * Shopping rows ship every photo). The card shows `imageUrl` first, then these.\n */\n images?: string[];\n /** Playable listing videos, when a lane carried them. */\n videos?: ProductVideo[];\n /**\n * Where the retailer itself files the listing (\"Pre-Owned Books\", \"electronics > â€Ķ > electronics cases\"),\n * when the lane carried it. Read by the relevance filter: a book about an iPad is not an iPad cover.\n */\n storeCategory?: string;\n url?: string;\n /** Amazon ASIN when sourced from Amazon SERP. */\n asin?: string;\n isPrime?: boolean;\n sponsored?: boolean;\n /** Where this card came from — used to section the storefront. */\n source?: ProductSource;\n\n // ─── Typed catalog fields (LemmeBuyIt via the connector's lemmebuyit provider) ───\n // A SERP scrape cannot supply these: the price it finds is the first $-shaped\n // match in a page excerpt, and identifiers appear nowhere in a rendered page.\n\n /** List price before discount, so the card can strike it through. */\n originalPrice?: number;\n /** 0–100. Drives the discount badge. */\n discountPercent?: number;\n /** ISO code; catalog rows can be non-USD. */\n currency?: string;\n inStock?: boolean;\n /**\n * The product page was fetched and carried product markup - the link opens a\n * real listing. Absent means \"not checked\", never \"broken\": a page we could\n * not read (bot wall, timeout) leaves this unset rather than false.\n */\n linkVerified?: boolean;\n /** `price` was read off the live product page, not a search excerpt or an index. */\n priceVerified?: boolean;\n /**\n * Read off the store's own results page in the shopper's browser just now, by\n * a card reader (web services/ownBrowserCards): its price and stock are what\n * the store shows the shopper, so they win over another lane's copy of the\n * same listing (see combineSameListing). Never set on a phone (no paired\n * browser); kept so the merge reads as web's.\n */\n readInBrowser?: boolean;\n /**\n * How the AI reading of the search judged this listing (services/aiRelevance):\n * `exact` is the product searched for, `close` the same product differing in\n * something the shopper named (another chip, size or line). Absent: not read.\n */\n match?: 'exact' | 'close';\n /** For a `close` match, what differs from the search, in a few words (\"M3 chip, not M3 Pro\"). */\n matchNote?: string;\n brand?: string;\n /** Retailer id/slug as the catalog knows it — the argument compare/watch take. */\n retailerId?: string;\n /** Retailer SKU, the id price-history and watch are keyed on. */\n sku?: string;\n /** Shared product identifiers — what makes cross-retailer compare possible. */\n upc?: string;\n ean?: string;\n gtin?: string;\n mpn?: string;\n\n // ─── Google Shopping (Real-Time Product Search via the connector's OFFERS action) ───\n /** Google's product id: `/product-offers` on it lists every merchant selling this product. */\n offerProductId?: string;\n /** Google groups more than one merchant under this product. */\n hasMultipleOffers?: boolean;\n\n // ─── Store search-card details (shopping parity contract, section 1) ───\n // Each one is the store's own words for THIS card, read off its results page.\n // Absent means the store did not print it - the card then shows nothing, never\n // a guess.\n\n /** \"FREE delivery Sat, Nov 14\". */\n delivery?: string;\n /** ISO date (`2026-11-14`), only when the delivery text names a date. */\n deliveryDate?: string;\n /** \"Or fastest delivery Tomorrow, Nov 13\". */\n fastestDelivery?: string;\n /** \"Save $80 with coupon\". */\n coupon?: string;\n /** \"5K+ bought in past month\". */\n boughtRecently?: string;\n /** The store's own tags: \"Best Seller\", \"Overall Pick\", \"Limited time deal\". */\n badges?: string[];\n /**\n * The condition the store gives a second-hand listing, in its own words\n * (\"Pre-Owned\", \"Used – Very Good\", \"Refurbished Excellent\"). Absent on new\n * stock. A row with one is shown in the Used section (services/secondHand).\n */\n condition?: string;\n /** Where a local listing is, as the site prints it (\"Atlanta, GA\"): pickup, usually. */\n location?: string;\n /** An auction listing: its bids so far and when it ends, in the site's own time (\"2026-11-19T16:00:00\", Pacific). */\n auction?: { bids: number; endsAt?: string };\n /**\n * `price` is the lowest of several listings or conditions (a model page on a\n * refurbished store, \"10+ available, $339-$504\"), so the card says \"From\".\n */\n priceFrom?: boolean;\n /** The colours / sizes this card stands for, when it stands for more than one. */\n variants?: ProductVariant[];\n /** How many variants the store says there are, when it does not list them (\"+3 colors\"). */\n variantCount?: number;\n}\n\n/**\n * One colour / size of a product, as a search card or product page lists it\n * (shopping parity contract, section 3). Picking it on a card changes the\n * card's photo, price and link. The same shape the product drawer reads a\n * page's variants into, so one type serves both.\n */\nexport interface ProductVariant {\n /** \"Black Truffle\", \"Large\", \"Black Truffle / 2 lb\". */\n label: string;\n price?: string;\n amount?: number;\n currency?: string;\n url?: string;\n image?: string;\n /** Dimension to value, named as the store names it: `{ Color: \"Black Truffle\" }`, `{ Size: \"L\" }`. */\n attributes: Record<string, string>;\n /** The variant the card or page shows now. */\n selected: boolean;\n available?: boolean;\n asin?: string;\n /**\n * Set when the surface merged separate search rows into one card: the id of\n * the row this variant was. Picking it puts that row's own id in the cart.\n */\n productId?: string;\n}\n\n/** The identifier `compare` should look up for a product, and which kind it is. */\nexport function productIdentifier(\n product: Pick<Product, 'upc' | 'ean' | 'gtin' | 'asin'>,\n): { identifier: string; lookupType: 'upc' | 'ean' | 'gtin' | 'asin' } | null {\n if (product.upc) return { identifier: product.upc, lookupType: 'upc' };\n if (product.ean) return { identifier: product.ean, lookupType: 'ean' };\n if (product.gtin) return { identifier: product.gtin, lookupType: 'gtin' };\n if (product.asin) return { identifier: product.asin, lookupType: 'asin' };\n return null;\n}\n\nexport const DEPARTMENTS: Department[] = [\n { id: 'high-tech', title: 'High-Tech', icon: 'ðŸ’ŧ', tagline: 'Phones, laptops & audio', accent: '#6366F1' },\n { id: 'sports', title: 'Sports & leisure', icon: 'ðŸšī', tagline: 'Gear for every season', accent: '#10B981' },\n { id: 'beauty', title: 'Beauty & wellness', icon: '💄', tagline: 'Skincare, makeup & more', accent: '#EC4899' },\n { id: 'home-garden', title: 'Lawn & Garden', icon: 'ðŸŠī', tagline: 'Furniture, BBQ & lighting', accent: '#F59E0B' },\n { id: 'office', title: 'Offices', icon: 'ðŸ–Ĩïļ', tagline: 'Desks, tablets & supplies', accent: '#0EA5E9' },\n { id: 'toys', title: 'Toys & Games', icon: 'ðŸ§ļ', tagline: 'Fun for all ages', accent: '#EF4444' },\n { id: 'fashion', title: 'Clothing & Shoes', icon: '👟', tagline: 'Apparel, shoes & bags', accent: '#8B5CF6' },\n { id: 'grocery', title: 'Grocery & Household', icon: '🛒', tagline: 'Pantry, cleaning & paper', accent: '#14B8A6' },\n { id: 'auto', title: 'Auto & Tools', icon: '🔧', tagline: 'Car care & power tools', accent: '#64748B' },\n { id: 'pets', title: 'Pet Supplies', icon: 'ðŸū', tagline: 'Food, toys & beds', accent: '#F97316' },\n {\n id: 'kitchen',\n title: 'Kitchen & Dining',\n icon: 'ðŸģ',\n tagline: 'Cookware, appliances & tableware',\n accent: '#E11D48',\n },\n {\n id: 'furniture',\n title: 'Furniture & Decor',\n icon: '🛋ïļ',\n tagline: 'Sofas, storage & lighting',\n accent: '#A16207',\n },\n { id: 'baby', title: 'Baby & Kids', icon: '🍞', tagline: 'Strollers, car seats & clothing', accent: '#F472B6' },\n {\n id: 'health',\n title: 'Health & Fitness',\n icon: '💊',\n tagline: 'Supplements, trackers & equipment',\n accent: '#22C55E',\n },\n { id: 'gaming', title: 'Gaming', icon: 'ðŸŽŪ', tagline: 'Consoles, PC parts & accessories', accent: '#7C3AED' },\n { id: 'books', title: 'Books & Media', icon: '📚', tagline: 'Books, music & movies', accent: '#0891B2' },\n {\n id: 'jewelry',\n title: 'Jewelry & Watches',\n icon: '⌚',\n tagline: 'Watches, rings & fine jewelry',\n accent: '#CA8A04',\n },\n {\n id: 'travel',\n title: 'Travel & Luggage',\n icon: 'ðŸ§ģ',\n tagline: 'Suitcases, bags & accessories',\n accent: '#2563EB',\n },\n {\n id: 'music',\n title: 'Musical Instruments',\n icon: 'ðŸŽļ',\n tagline: 'Guitars, keyboards & audio gear',\n accent: '#DC2626',\n },\n { id: 'camera', title: 'Cameras & Photo', icon: '📷', tagline: 'Cameras, lenses & drones', accent: '#475569' },\n];\n\n/**\n * The badge a row wears when it claims NO department.\n *\n * A free-text search can return anything — a t-shirt, dog food, a brake pad —\n * and none of it belongs to one of the six browse aisles. Falling back to\n * `DEPARTMENTS[0]` put a laptop emoji and an indigo tint on all of it, which\n * reads as \"this is an electronics store\" for every other category. A neutral\n * badge says \"no picture yet\" instead of asserting an aisle the row never\n * claimed.\n */\nexport const NEUTRAL_DEPARTMENT: Department = {\n id: '',\n title: 'All departments',\n icon: '\\u{1F6CD}',\n tagline: 'Everything the stores carry',\n accent: '#94A3B8',\n};\n\n/**\n * The department badge a product row should wear: the department it was browsed\n * from, or {@link NEUTRAL_DEPARTMENT} when the row came from a search that named\n * none. Single definition — five services each had their own copy of this,\n * every one of them defaulting to High-Tech.\n */\nexport function departmentBadge(departmentId?: string): Department {\n return (departmentId && DEPARTMENTS.find((d) => d.id === departmentId)) || NEUTRAL_DEPARTMENT;\n}\n\n/**\n * The site a listing lives on, as a shopper reads it: `\"greenleaf-supply.example\"`\n * for `https://www.greenleaf-supply.example/products/â€Ķ`. Undefined without a\n * usable http(s) link.\n */\nexport function listingHost(url?: string): string | undefined {\n if (!url) return undefined;\n try {\n const parsed = new URL(url);\n if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') return undefined;\n return parsed.hostname.replace(/^www\\./, '') || undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Format a number as a locale-aware price string (e.g. en → \"$1,199.00\").\n *\n * Takes an optional ISO currency because not every source is a USD source:\n * coupon and voucher feeds are country-scoped and routinely return GBP, EUR or\n * INR rows, and rendering those with a `$` states a price the merchant does not\n * charge. An unknown or malformed code falls back to USD rather than throwing —\n * `Intl` rejects a bad code, and a card must not disappear over a currency\n * label.\n */\nexport function formatPrice(value: number, currency?: string): string {\n const code = currency?.trim().toUpperCase();\n try {\n return new Intl.NumberFormat(undefined, { style: 'currency', currency: code || 'USD' }).format(value);\n } catch {\n return new Intl.NumberFormat(undefined, { style: 'currency', currency: 'USD' }).format(value);\n }\n}\n\n/**\n * A product name as a shopper reads it. Names taken from a page title carry the\n * site in front (\"Amazon.com: 100Pcs Mochi Squishy Toy...\"), which repeats the\n * store badge and pushes the product words off a two-line card.\n */\nexport function productDisplayName(name: string): string {\n const cleaned = name\n .replace(/^\\s*(?:www\\.)?[a-z0-9-]+(?:\\.[a-z0-9-]+)*\\.(?:com|net|org|co\\.uk|ca|in)\\s*:\\s*/i, '')\n .trim();\n return cleaned || name.trim();\n}\n\n/**\n * Section and merge order, as web's `shoppingProductSearch.ts` keeps it. Catalog\n * first (typed prices and identifiers), then the shops, Temu after the dedicated\n * lanes, Google after every shop (its rows for a known shop are re-homed there),\n * and the web research last.\n */\nexport const SOURCE_ORDER: ProductSource[] = [\n 'catalog',\n 'amazon',\n 'walmart',\n 'bestbuy',\n 'ebay',\n 'target',\n 'costco',\n 'homedepot',\n 'lowes',\n 'newegg',\n 'shopify',\n 'temu',\n // Second-hand listings and refurbished stock, after the stores' new stock.\n 'used',\n 'google',\n 'yantra',\n];\n\nexport const SOURCE_LABELS: Record<ProductSource, string> = {\n catalog: 'Catalog',\n amazon: 'Amazon',\n walmart: 'Walmart',\n bestbuy: 'Best Buy',\n ebay: 'eBay',\n target: 'Target',\n costco: 'Costco',\n homedepot: 'Home Depot',\n lowes: \"Lowe's\",\n newegg: 'Newegg',\n shopify: 'Shopify',\n temu: 'Temu',\n used: 'Used',\n google: 'Google Shopping',\n yantra: 'Yantra picks',\n};\n\nexport const SOURCE_SECTION: Record<ProductSource, { title: string; subtitle: string }> = {\n catalog: {\n title: 'Catalog matches',\n subtitle: 'Typed rows via LemmeBuyIt — list price, discount and identifiers',\n },\n amazon: { title: 'Amazon results', subtitle: 'Live Amazon SERP via yantra-shopping-search' },\n walmart: { title: 'Walmart results', subtitle: 'Live Walmart SERP via yantra-shopping-search' },\n bestbuy: { title: 'Best Buy results', subtitle: 'Live Best Buy listings via yantra-shopping-search' },\n ebay: { title: 'eBay results', subtitle: 'Live eBay SERP via yantra-shopping-search' },\n target: { title: 'Target results', subtitle: 'Live Target SERP via yantra-shopping-search' },\n costco: { title: 'Costco results', subtitle: 'Indexed and live retailer coverage' },\n homedepot: { title: 'Home Depot results', subtitle: 'Indexed and live retailer coverage' },\n lowes: { title: \"Lowe's results\", subtitle: 'Indexed and live retailer coverage' },\n newegg: { title: 'Newegg results', subtitle: 'Indexed and live retailer coverage' },\n shopify: { title: 'Shopify results', subtitle: 'Live Shopify SERP via yantra-shopping-search' },\n temu: { title: 'Temu results', subtitle: 'Live Temu SERP via yantra-shopping-search' },\n used: {\n title: 'Used & refurbished',\n subtitle:\n \"Marketplaces, thrift and resale shops, and stores' own refurbished stock - check the condition before you buy\",\n },\n google: {\n title: 'Google Shopping results',\n subtitle: 'Shops with no section of their own — matched across the web',\n },\n yantra: { title: 'Yantra picks', subtitle: 'Curated research via yantra-shopping-search' },\n};\n\nexport function productSource(product: Product): ProductSource {\n return product.source && isProductSource(product.source) ? product.source : 'yantra';\n}\n\n/** Re-exported for older native callers; the definition lives in `resolveProductImage.ts` (as on web). */\nexport { amazonImageUrlFromAsin };\n"],"names":[],"mappings":"AAgBO,MAAM,eAAkB,GAAA;AAAA,EAAC,SAAA;AAAA,EAAW,QAAA;AAAA,EAAU,SAAA;AAAA,EAAW,SAAA;AAAA,EAAW,MAAA;AAAA,EAAQ,QAAA;AAAA,EAAU,SAAA;AAAA,EAAW,MAAA;AAAA,EAAQ,QAAA;AAAA,EAAU,WAAA;AAAA,EAAa,OAAA;AAAA,EAAS,QAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhJ,MAAA;A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AA,CAAgB,QAAQ,MAAM,CAAA,GAAI,QAAQ,MAAS,GAAA,QAAA;AAC9E"}
@@ -57,6 +57,8 @@ Actions:
57
57
  - "stop_watch": stop or pause the price checks, in whatever language it is said ("stop watching", "band kar do", "para de vigiar"). {"action":"stop_watch"}.
58
58
  - "clarify": they want to act on ONE product but their words fit SEVERAL on screen, or none clearly ("add it to the cart" with many on screen). {"action":"clarify","candidates":[<the indexes that fit, may be empty>],"question":"<one short question naming them>"}.
59
59
  - "computer": the message is about a real web page, not about this grid - searching ON a named store's own site ("search amazon for nike shoes", "in the amazon page search for X", "use the computer"), their signed-in account there ("my amazon cart", "add it to my amazon cart", "buy it on amazon"), a checkout, a payment, opening a product's own page, or signing in. The assistant has a cloud browser - the user's Computer - and hands the turn to it. {"action":"computer"}, or {"action":"computer","index":<n>} when they mean one of the products on screen ("open it in the computer", "add the first one to my amazon cart"). Prefer it over "open", "cart" and "save" whenever the message points at a page or a store account rather than at this list.
60
+ - "deals": Black Friday, Cyber Monday or holiday deals - on something ("black friday deals on a 65 inch tv", "cyber monday airpods") or the season's best ("what are the best black friday deals"), whether a deal is real or they should wait, or when a store's Black Friday sale starts and reminders for it. {"action":"deals","query":"<the product words, empty for the season's best or a store's sale dates>"}. Choose it over "search" whenever they ask for deals, sales or discounts for the holiday season.
61
+ - "link": the message carries a link to a social post - TikTok, Instagram, YouTube, Pinterest, Facebook, X, Threads - about a product ("saw this on tiktok, is it a good price? https://..."). {"action":"link","url":"<the link exactly as written>"}. A link to a store's own product page is not a "link": it is a "computer" (open it) or a "search" (find it elsewhere).
60
62
  - "reply": nothing to run - a greeting, thanks, a question about the products on screen or about shopping in general, where things stand, a comment. {"action":"reply","text":"<a short helpful answer in the assistant's own voice, two or three sentences, plain text, no lists: answer questions about the products on screen from the numbered list only (their exact prices, ratings and stores), say what is in the cart or being watched when asked, and when it fits invite them to name what they are looking for. Never invent products, prices, stores or stock>"}.
61
63
 
62
64
  Rules: never turn small talk or a question into a search. Never point at a product that is not on screen. NEVER write a "reply" that says the assistant cannot browse, cannot open a link, cannot search a store's site, cannot use the computer, or that it only updates the cart "in this shopping session" - every one of those is a "computer". Never answer "I do not see a product" to a message that points at the list or at the page; that is a "computer" or a "clarify". A "computer" message that does not say WHICH product, with several on screen, may be a "clarify" naming them - and then the answer that picks one is a "computer" with that index, never an "open": the lane the question came from is still the lane. A store named to pick a row OUT of the list ("the one from target", "the walmart one", "the cheapest amazon one") is identifying a product, not pointing at that store's site - those are "open", "cart", "save" or "clarify" as usual. "first" or "last" inside a sentence is a position only when it points at the list. For a superlative ("the cheapest", "the second cheapest", "best rated") read the sorted orders in the situation; a brand or store named with it ("the cheapest sony") restricts it to those rows. A comparative between named rows ("the cheaper sony", "the better rated of the two") is read off the same orders. One verdict acts on ONE product: when they name several ("the two cheapest", "#2 and #4"), answer with "reply" or "clarify" saying you do them one at a time and naming them - never silently act on just one. When a message stops one thing and starts another ("stop watching X and watch Y instead"), the action is the thing to START. A question ABOUT a product ("how much is #3", "is the xm5 good on planes") is a "reply" with the answer, not an "open". A pick with no verb is an "open", never a "cart" or "save". Prefer "clarify" over guessing between two products. Write "reply" and "clarify" text in the language the user wrote in. The message may be in any language, with slang or typos - route it the same way. Output ONLY the JSON object.`;
@@ -151,6 +153,18 @@ function parseVerdict(content, state) {
151
153
  }, index !== void 0 ? {
152
154
  index
153
155
  } : {});
156
+ case "deals":
157
+ return {
158
+ action: "deals",
159
+ query: typeof obj.query === "string" ? obj.query.trim().slice(0, 120) : ""
160
+ };
161
+ case "link": {
162
+ const url = trimmedString(obj.url);
163
+ return url && /^https?:\/\/\S+$/i.test(url) ? {
164
+ action: "link",
165
+ url
166
+ } : null;
167
+ }
154
168
  default:
155
169
  return null;
156
170
  }