@envive-ai/react-hooks 0.1.1 → 0.1.3

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 (305) hide show
  1. package/dist/adapters/amplitude/index.cjs +14 -0
  2. package/dist/adapters/amplitude/index.d.cts +4 -0
  3. package/dist/adapters/amplitude/index.d.ts +4 -0
  4. package/dist/adapters/amplitude/index.js +12 -0
  5. package/dist/api-BtzLHcfU.cjs +268 -0
  6. package/dist/api-kpPTZhV9.js +189 -0
  7. package/dist/application/config/index.cjs +34 -0
  8. package/dist/application/config/index.d.cts +14 -0
  9. package/dist/application/config/index.d.ts +14 -0
  10. package/dist/application/config/index.js +32 -0
  11. package/dist/application/models/graphql/index.cjs +13 -0
  12. package/dist/application/models/graphql/index.d.cts +2 -0
  13. package/dist/application/models/graphql/index.d.ts +2 -0
  14. package/dist/application/models/graphql/index.js +12 -0
  15. package/dist/application/models/guards/api/index.cjs +15 -0
  16. package/dist/application/models/guards/api/index.d.cts +3 -0
  17. package/dist/application/models/guards/api/index.d.ts +3 -0
  18. package/dist/application/models/guards/api/index.js +4 -0
  19. package/dist/application/models/index.cjs +72 -0
  20. package/dist/application/models/index.d.cts +10 -0
  21. package/dist/application/models/index.d.ts +10 -0
  22. package/dist/application/models/index.js +12 -0
  23. package/dist/application/models/utilityTypes/index.cjs +1 -0
  24. package/dist/application/models/utilityTypes/index.d.cts +2 -0
  25. package/dist/application/models/utilityTypes/index.d.ts +2 -0
  26. package/dist/application/models/utilityTypes/index.js +3 -0
  27. package/dist/application/models/variantInfo/index.cjs +1 -0
  28. package/dist/application/models/variantInfo/index.d.cts +2 -0
  29. package/dist/application/models/variantInfo/index.d.ts +2 -0
  30. package/dist/application/models/variantInfo/index.js +3 -0
  31. package/dist/application/service/customerService/index.cjs +4 -0
  32. package/dist/application/service/customerService/index.d.cts +3 -0
  33. package/dist/application/service/customerService/index.d.ts +3 -0
  34. package/dist/application/service/customerService/index.js +4 -0
  35. package/dist/application/service/index.cjs +761 -0
  36. package/dist/application/service/index.d.cts +407 -0
  37. package/dist/application/service/index.d.ts +407 -0
  38. package/dist/application/service/index.js +727 -0
  39. package/dist/application/utils/index.cjs +38 -0
  40. package/dist/application/utils/index.d.cts +254 -0
  41. package/dist/application/utils/index.d.ts +254 -0
  42. package/dist/application/utils/index.js +12 -0
  43. package/dist/atomStore-B3tsg6mF.cjs +0 -0
  44. package/dist/atomStore-BNQyGmU_.cjs +57 -0
  45. package/dist/atomStore-FSZd_20F.js +1 -0
  46. package/dist/atomStore-TnLPtYns.js +31 -0
  47. package/dist/atoms/app/index.cjs +17 -0
  48. package/dist/atoms/app/index.d.cts +33 -0
  49. package/dist/atoms/app/index.d.ts +33 -0
  50. package/dist/atoms/app/index.js +12 -0
  51. package/dist/atoms/atomStore/index.cjs +7 -0
  52. package/dist/atoms/atomStore/index.d.cts +23 -0
  53. package/dist/atoms/atomStore/index.d.ts +23 -0
  54. package/dist/atoms/atomStore/index.js +4 -0
  55. package/dist/atoms/chat/index.cjs +41 -0
  56. package/dist/atoms/chat/index.d.cts +159 -0
  57. package/dist/atoms/chat/index.d.ts +159 -0
  58. package/dist/atoms/chat/index.js +12 -0
  59. package/dist/atoms/globalSearch/index.cjs +6 -0
  60. package/dist/atoms/globalSearch/index.d.cts +23 -0
  61. package/dist/atoms/globalSearch/index.d.ts +23 -0
  62. package/dist/atoms/globalSearch/index.js +3 -0
  63. package/dist/atoms/org/index.cjs +41 -0
  64. package/dist/atoms/org/index.d.cts +93 -0
  65. package/dist/atoms/org/index.d.ts +93 -0
  66. package/dist/atoms/org/index.js +13 -0
  67. package/dist/atoms/search/index.cjs +44 -0
  68. package/dist/atoms/search/index.d.cts +11 -0
  69. package/dist/atoms/search/index.d.ts +11 -0
  70. package/dist/atoms/search/index.js +14 -0
  71. package/dist/{bandolier-3rHPPhkF.cjs → bandolier-CQrxBHsk.cjs} +57 -47
  72. package/dist/{bandolier-DpF-HUG_.js → bandolier-Di9DpZ8e.js} +18 -8
  73. package/dist/{carpe-BG7Q_KCG.cjs → carpe-3NJOR-Rj.cjs} +36 -26
  74. package/dist/{carpe-DLuc07V7.js → carpe-DmWKaIQq.js} +18 -8
  75. package/dist/{cdnService-CAyO3axV.js → cdnService-BNreZjqy.js} +1 -1
  76. package/dist/{cdnService-DIF1i7VC.cjs → cdnService-vLxePdrU.cjs} +1 -1
  77. package/dist/chat-CCQMmhc1.cjs +5057 -0
  78. package/dist/chat-CCgyDehy.cjs +151 -0
  79. package/dist/chat-Dk6KPb1K.js +25 -0
  80. package/dist/chat-H6YcCS4I.js +4113 -0
  81. package/dist/components-CScS7Ii-.cjs +28 -0
  82. package/dist/components-DAQxVIn9.js +10 -0
  83. package/dist/config/locators/components/chat/index.cjs +23 -0
  84. package/dist/config/locators/components/chat/index.d.cts +2 -0
  85. package/dist/config/locators/components/chat/index.d.ts +2 -0
  86. package/dist/config/locators/components/chat/index.js +3 -0
  87. package/dist/config/locators/components/chat/variants/index.cjs +28 -0
  88. package/dist/config/locators/components/chat/variants/index.d.cts +15 -0
  89. package/dist/config/locators/components/chat/variants/index.d.ts +15 -0
  90. package/dist/config/locators/components/chat/variants/index.js +16 -0
  91. package/dist/config/locators/components/index.cjs +5 -0
  92. package/dist/config/locators/components/index.d.cts +2 -0
  93. package/dist/config/locators/components/index.d.ts +2 -0
  94. package/dist/config/locators/components/index.js +3 -0
  95. package/dist/config/locators/components/search/index.cjs +12 -0
  96. package/dist/config/locators/components/search/index.d.cts +7 -0
  97. package/dist/config/locators/components/search/index.d.ts +7 -0
  98. package/dist/config/locators/components/search/index.js +8 -0
  99. package/dist/config/locators/index.cjs +47 -0
  100. package/dist/config/locators/index.d.cts +24 -0
  101. package/dist/config/locators/index.d.ts +24 -0
  102. package/dist/config/locators/index.js +6 -0
  103. package/dist/contexts/index.cjs +21 -10
  104. package/dist/contexts/index.d.cts +12 -4
  105. package/dist/contexts/index.d.ts +12 -4
  106. package/dist/contexts/index.js +16 -5
  107. package/dist/{coterie-DUdvJvAs.cjs → coterie-D0UFsFC5.cjs} +26 -15
  108. package/dist/{coterie-FybYN_xE.js → coterie-JblRmIZL.js} +19 -8
  109. package/dist/customerService-C4wc0glQ.js +22 -0
  110. package/dist/customerService-zsDlp7g2.cjs +35 -0
  111. package/dist/custservice-types-D8Npo-5Z.js +22 -0
  112. package/dist/custservice-types-E9_OSaZ7.cjs +34 -0
  113. package/dist/default-C5ZTV8HA.cjs +4 -0
  114. package/dist/{default-CL94oJfj.js → default-DPv8m-eQ.js} +1 -1
  115. package/dist/{default-CKyjzyLc.cjs → default-DRKBosow.cjs} +1 -1
  116. package/dist/default-ao0vRl0W.js +4 -0
  117. package/dist/divIds-BWvq-i6I.js +22 -0
  118. package/dist/{divIds-BOqjn3bE.cjs → divIds-CFyAjjp3.cjs} +6 -79
  119. package/dist/{dreamlandBaby-WXcbsTXO.js → dreamlandBaby-CyS8oW8X.js} +18 -8
  120. package/dist/{dreamlandBaby-C8yzW4Nl.cjs → dreamlandBaby-y7kSvwH2.cjs} +29 -19
  121. package/dist/embedded-BlXJUbik.cjs +130 -0
  122. package/dist/embedded-C1jvFj3v.js +22 -0
  123. package/dist/events/index.cjs +4 -0
  124. package/dist/events/index.d.cts +45 -0
  125. package/dist/events/index.d.ts +45 -0
  126. package/dist/events/index.js +3 -0
  127. package/dist/events-DgFzlVJR.js +77 -0
  128. package/dist/events-bH-24eRW.cjs +89 -0
  129. package/dist/featureFlagService-CroFRxvD.d.cts +17 -0
  130. package/dist/featureFlagService-NkJ2fuEj.d.ts +17 -0
  131. package/dist/featureGates-BMWXU0dS.d.ts +90 -0
  132. package/dist/featureGates-N_gyHCTn.d.cts +90 -0
  133. package/dist/{fiveCbd-CZYzZPl3.cjs → fiveCbd-CXVuIBiZ.cjs} +33 -23
  134. package/dist/{fiveCbd-kl6CoxoF.js → fiveCbd-Cyc3-Ab9.js} +18 -8
  135. package/dist/{forLoveAndLemons-BNu-PfFB.cjs → forLoveAndLemons-CxQS0USq.cjs} +18 -10
  136. package/dist/{forLoveAndLemons-BD2qh-6B.js → forLoveAndLemons-D8mcgmdk.js} +14 -6
  137. package/dist/{types-DGoFEos_.d.cts → frontendConfig-KeNqU1wa.d.cts} +39 -275
  138. package/dist/{types-D4vlfTd0.d.ts → frontendConfig-cPvCTWm6.d.ts} +39 -275
  139. package/dist/globalSearch-BC0rOX3E.js +13 -0
  140. package/dist/globalSearch-hxbXekus.cjs +38 -0
  141. package/dist/{greenpan-LDDXZTsh.js → greenpan-JM6SHcqO.js} +18 -8
  142. package/dist/{greenpan-D6fDmjU8.cjs → greenpan-eIzyxVsn.cjs} +31 -21
  143. package/dist/{grooveLife-D-1qfxwj.js → grooveLife-BmsUc2cD.js} +19 -9
  144. package/dist/{grooveLife-CcylXabB.cjs → grooveLife-KdTizVUn.cjs} +30 -20
  145. package/dist/{homegrownCannabis-BEZzwFlm.cjs → homegrownCannabis-C0GDai4r.cjs} +28 -17
  146. package/dist/{homegrownCannabis-BScZhy9v.js → homegrownCannabis-a9udocBT.js} +18 -7
  147. package/dist/hooks/index.cjs +38 -27
  148. package/dist/hooks/index.d.cts +20 -310
  149. package/dist/hooks/index.d.ts +16 -307
  150. package/dist/hooks/index.js +16 -5
  151. package/dist/{contexts-C4Iz162H.cjs → hooks-DjOa7ihH.cjs} +300 -4600
  152. package/dist/{contexts-Dq7tO_0y.js → hooks-fneW8SWw.js} +121 -4428
  153. package/dist/index-BQErGgfM.d.cts +202 -0
  154. package/dist/index-BdNKc2ix.d.cts +8 -0
  155. package/dist/index-BrXuc_Ck.d.cts +24 -0
  156. package/dist/index-C4zjAR1c.d.cts +227 -0
  157. package/dist/index-CGB6CAmr.d.ts +6 -0
  158. package/dist/index-CIco0cCQ.d.ts +183 -0
  159. package/dist/index-COG1kOZG.d.ts +749 -0
  160. package/dist/index-CVxe7FpL.d.cts +6 -0
  161. package/dist/index-Cn1SeI5y.d.cts +183 -0
  162. package/dist/index-CnqHN_jz.d.ts +202 -0
  163. package/dist/index-Cqg6ltII.d.ts +38 -0
  164. package/dist/index-DE_7Q8qK.d.ts +94 -0
  165. package/dist/index-Da0UzyI9.d.ts +24 -0
  166. package/dist/index-DbWWcYax.d.cts +749 -0
  167. package/dist/index-DtoVXd6O.d.cts +97 -0
  168. package/dist/index-JClBRnSX.d.cts +94 -0
  169. package/dist/index-ghzD_356.d.ts +8 -0
  170. package/dist/index-hdbCEjYy.d.cts +38 -0
  171. package/dist/index-luJrHgPN.d.ts +97 -0
  172. package/dist/index-tfRj22E1.d.ts +227 -0
  173. package/dist/interceptors/index.cjs +14 -0
  174. package/dist/interceptors/index.d.cts +25 -0
  175. package/dist/interceptors/index.d.ts +25 -0
  176. package/dist/interceptors/index.js +13 -0
  177. package/dist/{jackArcher-BwMClqMP.cjs → jackArcher-B6OJ0N3a.cjs} +35 -25
  178. package/dist/{jackArcher-cJJVulZ9.js → jackArcher-B9fe4Hv8.js} +18 -8
  179. package/dist/{jordanCraig-DGsCO2o1.cjs → jordanCraig-0CB_m_ts.cjs} +78 -68
  180. package/dist/{jordanCraig-DNDMT0hn.js → jordanCraig-DNm1iw1L.js} +18 -8
  181. package/dist/{kindredBravely-ROyesnVk.js → kindredBravely-CZgt7DJA.js} +17 -7
  182. package/dist/{kindredBravely-wV2XT1r_.cjs → kindredBravely-KvYPbckZ.cjs} +28 -18
  183. package/dist/{kutFromTheKloth-B6GR8tO9.cjs → kutFromTheKloth-BxgtWZs9.cjs} +29 -19
  184. package/dist/{kutFromTheKloth-BCUOHegv.js → kutFromTheKloth-SmteSZjk.js} +18 -8
  185. package/dist/{larryAndSerges-CIqB9tKz.cjs → larryAndSerges-6O_u3L90.cjs} +21 -12
  186. package/dist/{larryAndSerges-CqS02fnX.js → larryAndSerges-DO-zG8ES.js} +14 -5
  187. package/dist/{leapsAndRebounds-j4YqSvNb.js → leapsAndRebounds-BK62AmXw.js} +18 -8
  188. package/dist/{leapsAndRebounds-CFj9F_z1.cjs → leapsAndRebounds-gPsWVUmQ.cjs} +31 -21
  189. package/dist/locators-C2DX_nX6.js +1 -0
  190. package/dist/locators-CUpyd9Wt.cjs +0 -0
  191. package/dist/logger-Be0NyKaY.cjs +25 -0
  192. package/dist/logger-BexDfK3W.js +19 -0
  193. package/dist/{longevityrx-C-Yc5LPR.cjs → longevityrx-DjKbwJo3.cjs} +26 -16
  194. package/dist/{longevityrx-9sUQZCVZ.js → longevityrx-eq5TeUcy.js} +18 -8
  195. package/dist/{lookOptic-dbaaorhR.cjs → lookOptic-BPPqms_j.cjs} +26 -16
  196. package/dist/{lookOptic-CQryypdM.js → lookOptic-jRpBXQCN.js} +18 -8
  197. package/dist/{mantraBrand-CifBQtHp.js → mantraBrand-BZOZfkUK.js} +19 -9
  198. package/dist/{mantraBrand-D5MTZ6Mj.cjs → mantraBrand-Cp8zptkj.cjs} +47 -37
  199. package/dist/{medterra-BCrXdmFE.cjs → medterra-BHYCBgvQ.cjs} +38 -28
  200. package/dist/{medterra-DhENCf-m.js → medterra-CShe6CLY.js} +18 -8
  201. package/dist/{modells-C_P_894S.cjs → modells-DE7-gmjK.cjs} +32 -22
  202. package/dist/{modells-aQrV10D7.js → modells-DFyJxNwT.js} +18 -8
  203. package/dist/nodeSelector-DpKXszfU.d.ts +30 -0
  204. package/dist/nodeSelector-vKB44CDB.d.cts +30 -0
  205. package/dist/org-Bkn6fl6I.cjs +106 -0
  206. package/dist/org-CX8HFbc9.js +63 -0
  207. package/dist/{pressedFloral-DErfwwl0.cjs → pressedFloral-BMkCVs8c.cjs} +37 -27
  208. package/dist/{pressedFloral-D-amnTQK.js → pressedFloral-aK9br-LF.js} +18 -8
  209. package/dist/search-DtIFZeMA.cjs +743 -0
  210. package/dist/search-eWwg8pNn.js +542 -0
  211. package/dist/search-filter-types-ByJnFPc4.d.cts +101 -0
  212. package/dist/search-filter-types-DPgeG8FS.d.ts +101 -0
  213. package/dist/{skinPerfection-DRVPJp3h.js → skinPerfection-B9G6yLM2.js} +18 -8
  214. package/dist/{skinPerfection-DF6nQXjh.cjs → skinPerfection-BBC1q65Z.cjs} +26 -16
  215. package/dist/{snapSupplements-CLZjItJi.cjs → snapSupplements-D7hx6Kgj.cjs} +26 -16
  216. package/dist/{snapSupplements-Yxs4jgC-.js → snapSupplements-DKvJl__T.js} +18 -8
  217. package/dist/{spanx-Cpbot5J5.cjs → spanx-D-ZKkxjM.cjs} +32 -22
  218. package/dist/{spanx-DVDyAyFC.js → spanx-yl7YfVrf.js} +20 -10
  219. package/dist/{spanxStaging-DbaVonN6.cjs → spanxStaging-CXeIg6zI.cjs} +36 -26
  220. package/dist/{spanxStaging-DAiFEMRU.js → spanxStaging-DzGXL9wD.js} +20 -10
  221. package/dist/suggestionBarV2-types-B0RbMStE.js +9 -0
  222. package/dist/suggestionBarV2-types-DG3Ekk44.cjs +15 -0
  223. package/dist/{supergoop-B5VQlsoe.cjs → supergoop-CSpDPOpl.cjs} +29 -18
  224. package/dist/{supergoop-C4McrZPT.js → supergoop-D0UkuRiA.js} +18 -7
  225. package/dist/test-types-C9b_OdfO.d.ts +39 -0
  226. package/dist/test-types-CpKCxk8U.d.cts +39 -0
  227. package/dist/types/index.cjs +6 -0
  228. package/dist/types/index.d.cts +3 -0
  229. package/dist/types/index.d.ts +3 -0
  230. package/dist/types/index.js +4 -0
  231. package/dist/types-BE4faOO_.d.cts +32 -0
  232. package/dist/{types-DZzSQ5a6.js → types-C3S1H4hl.js} +58 -58
  233. package/dist/types-TD8g7LnH.d.ts +32 -0
  234. package/dist/{types-QJObznro.cjs → types-lcjuhDBt.cjs} +58 -58
  235. package/dist/{uniqueVintage-BLp_UtBR.cjs → uniqueVintage-DygVpCqU.cjs} +48 -38
  236. package/dist/{uniqueVintage-CS4TgOJW.js → uniqueVintage-_n0FZFVj.js} +18 -8
  237. package/dist/useMessageInterceptor-BP6gzo8a.js +57 -0
  238. package/dist/useMessageInterceptor-BnUG2Pzt.cjs +72 -0
  239. package/dist/utilityTypes-DMdsI0DG.cjs +0 -0
  240. package/dist/utilityTypes-UWdNHElu.js +1 -0
  241. package/dist/variant-DH4zusMi.d.cts +12 -0
  242. package/dist/variant-DTEqSBHd.d.ts +12 -0
  243. package/dist/variantInfo-BTvC6CQh.js +1 -0
  244. package/dist/variantInfo-Cz2YXraO.cjs +0 -0
  245. package/dist/{venaCbd-DfnFV7Qp.js → venaCbd-BS0dvdBm.js} +18 -8
  246. package/dist/{venaCbd-BxmadOeJ.cjs → venaCbd-Pqg0bj-P.cjs} +31 -21
  247. package/dist/{westonJonBoucher-C0FE4Wup.js → westonJonBoucher-CLw8Hy6u.js} +18 -8
  248. package/dist/{westonJonBoucher-BZdusJgo.cjs → westonJonBoucher-CeA0jwxe.cjs} +31 -21
  249. package/dist/{wineEnthusiast-CmhNg47M.js → wineEnthusiast-M9P18d1w.js} +18 -8
  250. package/dist/{wineEnthusiast-DQxdV8Yg.cjs → wineEnthusiast-gHBaQMbe.cjs} +30 -20
  251. package/dist/{wolfMattress-vMvqmwgI.js → wolfMattress-BQHjoQYu.js} +18 -7
  252. package/dist/{wolfMattress-CqyOUgPB.cjs → wolfMattress-CdmN-Evm.cjs} +30 -19
  253. package/dist/{wolfTactical-DvqxZtoA.js → wolfTactical-Cc2ZLBRh.js} +18 -8
  254. package/dist/{wolfTactical-q3TVDP85.cjs → wolfTactical-dObnPgAG.cjs} +30 -20
  255. package/package.json +101 -3
  256. package/src/adapters/amplitude/amplitudeAdapter.ts +1 -1
  257. package/src/adapters/spiffy/commerce/api.ts +1 -1
  258. package/src/adapters/spiffy/commerce/graphql.ts +61 -37
  259. package/src/application/config/index.ts +1 -0
  260. package/src/application/models/index.ts +102 -17
  261. package/src/application/models/supportedOrgs.ts +89 -65
  262. package/src/application/service/index.ts +32 -0
  263. package/src/application/service/pageVariantService.ts +201 -114
  264. package/src/application/service/searchService.ts +1 -1
  265. package/src/application/service/windowFrontendConfigService.ts +40 -18
  266. package/src/application/utils/index.ts +22 -3
  267. package/src/atoms/app/variant.ts +48 -29
  268. package/src/atoms/atomStore/index.ts +1 -0
  269. package/src/atoms/chat/messageQueue.ts +34 -17
  270. package/src/atoms/chat/performanceMetrics.ts +51 -38
  271. package/src/atoms/chat/renderedWidgetRefs.ts +14 -15
  272. package/src/atoms/globalSearch/index.ts +1 -0
  273. package/src/atoms/org/org.ts +1 -3
  274. package/src/atoms/org/orgUIConfig.ts +31 -24
  275. package/src/contexts/chatContext.tsx +124 -72
  276. package/src/contexts/systemSettingsContext.tsx +21 -8
  277. package/src/events/registerAnalyticsListeners.ts +13 -9
  278. package/src/hooks/useFileUpload.ts +9 -7
  279. package/src/hooks/useSearch.tsx +9 -6
  280. package/src/initialize.ts +1 -1
  281. package/src/interceptors/index.ts +3 -0
  282. package/src/main.tsx +1 -1
  283. package/src/types/index.ts +4 -0
  284. package/src/types/search-filter-types.ts +7 -7
  285. package/dist/GridInsertionService-C00upKLB.js +0 -40
  286. package/dist/GridInsertionService-CMJVhD6q.cjs +0 -52
  287. package/dist/custservice-types-BgjGHCtD.cjs +0 -16
  288. package/dist/custservice-types-V6FWABp4.js +0 -10
  289. package/dist/default-DMtAjA62.cjs +0 -4
  290. package/dist/default-zcmT2032.js +0 -4
  291. package/dist/divIds-Cfp3v_rG.js +0 -35
  292. package/dist/domInsertionService-BtzuH2Sc.js +0 -65
  293. package/dist/domInsertionService-Cb9814oM.cjs +0 -89
  294. package/dist/suggestionBarV2-types-XHYD3j8E.cjs +0 -46
  295. package/dist/suggestionBarV2-types-aiQmVx5m.js +0 -34
  296. package/src/atoms/index.ts +0 -5
  297. package/src/index.ts +0 -31
  298. /package/dist/{entrypoints-RmIbdYxh.js → entrypoints-CmmOszXO.js} +0 -0
  299. /package/dist/{entrypoints-C8JwiMYA.cjs → entrypoints-fowCLUT2.cjs} +0 -0
  300. /package/dist/{enviveConfigContext-Dfr2VH6u.cjs → enviveConfigContext-Bs8kepnO.cjs} +0 -0
  301. /package/dist/{enviveConfigContext-CUGLpPGU.js → enviveConfigContext-CWVdVWKW.js} +0 -0
  302. /package/dist/{socialProofClasses-CaA83vI4.cjs → socialProofClasses-BYLiEXpU.cjs} +0 -0
  303. /package/dist/{socialProofClasses-KB7zOMmg.js → socialProofClasses-CkJufEGb.js} +0 -0
  304. /package/src/atoms/{atomStore.ts → atomStore/atomStore.ts} +0 -0
  305. /package/src/atoms/{globalSearch.ts → globalSearch/globalSearch.ts} +0 -0
@@ -0,0 +1,38 @@
1
+ require('../../events-bH-24eRW.cjs');
2
+ require('../../logger-Be0NyKaY.cjs');
3
+ const require_chat = require('../../chat-CCQMmhc1.cjs');
4
+ require('../../types-lcjuhDBt.cjs');
5
+ require('../../enviveConfigContext-Bs8kepnO.cjs');
6
+ require('../../atomStore-BNQyGmU_.cjs');
7
+ require('../../api-BtzLHcfU.cjs');
8
+ require('../../customerService-zsDlp7g2.cjs');
9
+ require('../../utilityTypes-DMdsI0DG.cjs');
10
+ require('../../variantInfo-Cz2YXraO.cjs');
11
+
12
+ exports.DOMObserver = require_chat.DOMObserver;
13
+ exports.ElementObserver = require_chat.ElementObserver;
14
+ exports.MutationHelper = require_chat.MutationHelper;
15
+ exports.NodeSelector = require_chat.NodeSelector;
16
+ exports.SelectorFactory = require_chat.SelectorFactory;
17
+ exports.StringUtils = require_chat.StringUtils;
18
+ exports.applyOverrides = require_chat.applyOverrides;
19
+ exports.buildSearchHash = require_chat.buildSearchHash;
20
+ exports.buildSearchStartHash = require_chat.buildSearchStartHash;
21
+ exports.coreContextToApiContext = require_chat.coreContextToApiContext;
22
+ exports.coreSupportedEventRequestToApiRequest = require_chat.coreSupportedEventRequestToApiRequest;
23
+ exports.coreUserEventToApiUserEvent = require_chat.coreUserEventToApiUserEvent;
24
+ exports.createUrlWithQueryParams = require_chat.createUrlWithQueryParams;
25
+ exports.divideArray = require_chat.divideArray;
26
+ exports.getQueryParam = require_chat.getQueryParam;
27
+ exports.getRecentProductImageUrls = require_chat.getRecentProductImageUrls;
28
+ exports.initAmplitude = require_chat.initAmplitude;
29
+ exports.initDataLayerWrapper = require_chat.initDataLayerWrapper;
30
+ exports.messageFromFormSubmittedEvent = require_chat.messageFromFormSubmittedEvent;
31
+ exports.messageFromQueryEvent = require_chat.messageFromQueryEvent;
32
+ exports.messageFromResponse = require_chat.messageFromResponse;
33
+ exports.messageFromSuggestionEvent = require_chat.messageFromSuggestionEvent;
34
+ exports.messageRequestToCommerceMessageRequest = require_chat.messageRequestToCommerceMessageRequest;
35
+ exports.parseHref = require_chat.parseHref;
36
+ exports.parseSearchHash = require_chat.parseSearchHash;
37
+ exports.prepareMerchantPage = require_chat.prepareMerchantPage;
38
+ exports.validateEmail = require_chat.validateEmail;
@@ -0,0 +1,254 @@
1
+ import "../../featureGates-N_gyHCTn.cjs";
2
+ import "../../index-DtoVXd6O.cjs";
3
+ import { FormResponseAttributes, Response as Response$1 } from "../../index-Cn1SeI5y.cjs";
4
+ import "../../index-C4zjAR1c.cjs";
5
+ import { Context as Context$1, Message, MessageRole, NextMessageRequest as NextMessageRequest$1, ProductSearchMessageMetadata, Suggestion as Suggestion$1, SupportedEventRequest as SupportedEventRequest$1, UserEvent as UserEvent$1 } from "../../index-DbWWcYax.cjs";
6
+ import "../../frontendConfig-KeNqU1wa.cjs";
7
+ import "../../types-BE4faOO_.cjs";
8
+ import "../../test-types-CpKCxk8U.cjs";
9
+ import "../../index-hdbCEjYy.cjs";
10
+ import { MouseEventTypes, NodeSelector, SelectorFactory } from "../../nodeSelector-vKB44CDB.cjs";
11
+ import { Context, NextMessageRequest, SupportedEventRequest, UserEvent } from "@spiffy-ai/commerce-api-client";
12
+ import * as react5 from "react";
13
+ import { ReactElement } from "react";
14
+
15
+ //#region src/application/utils/analyticsUtils.d.ts
16
+ /**
17
+ * Wraps the window.dataLayer.push method to intercept add_to_cart events and send them to Amplitude.
18
+ * This function runs on an interval until the dataLayer is available.
19
+ */
20
+ declare const initDataLayerWrapper: () => void;
21
+ declare const initAmplitude: () => void;
22
+ //#endregion
23
+ //#region src/application/utils/coreContextToApiContext.d.ts
24
+ declare const coreContextToApiContext: (context: Context$1) => Context;
25
+ //#endregion
26
+ //#region src/application/utils/coreUserEventToApiUserEvent.d.ts
27
+ declare const coreUserEventToApiUserEvent: (data: UserEvent$1) => UserEvent;
28
+ //#endregion
29
+ //#region src/application/utils/divideArray.d.ts
30
+ declare const divideArray: <T>(array: T[], size: number) => T[][];
31
+ //#endregion
32
+ //#region src/application/utils/elementObserver.d.ts
33
+ /**
34
+ * The `ElementObserver` class monitors all changes related to the specific element it is responsible for.
35
+ * It is automatically instantiated by the `useElementObserver` hook, which manages all instances of this class.
36
+ *
37
+ * How it works:
38
+ *
39
+ * Each instance of `ElementObserver` holds several pieces of information related to the node it is monitoring,
40
+ * such as the node's selector and its `MutationObserver`. This class is responsible for translating raw node
41
+ * changes into a more user-friendly format. For example, when the node is added to the DOM, the `ElementObserver`
42
+ * is notified by the `DOMObserver`, which triggers the `onAdd` callback function on the respective `useElementObserver`
43
+ * instance.
44
+ *
45
+ * Instances of `ElementObserver` are fully managed by the `useElementObserver` hook, requiring no additional configuration.
46
+ * When the hook is destroyed, its corresponding `ElementObserver` instance is automatically removed.
47
+ *
48
+ */
49
+ declare class ElementObserver {
50
+ private mutation;
51
+ private node;
52
+ private selector;
53
+ private eventListeners;
54
+ private classAdded;
55
+ private classRemoved;
56
+ private nodeDisplay;
57
+ private addFn;
58
+ private removeFn;
59
+ private changeFn;
60
+ private classChangeFn;
61
+ private addChildFn?;
62
+ private removeChildFn?;
63
+ private resetFn;
64
+ constructor(selector: NodeSelector);
65
+ private handleAttributes;
66
+ private handleChildList;
67
+ private addInitialListeners;
68
+ private clearEventListeners;
69
+ private renew;
70
+ getSelector(): NodeSelector;
71
+ getNode(): HTMLElement | null;
72
+ synchronize(): void;
73
+ init(): void;
74
+ watch(node: Node): void;
75
+ destroy(): void;
76
+ render(fn: () => ReactElement): react5.ReactPortal | undefined;
77
+ fire(event: MouseEventTypes): void;
78
+ show(): void;
79
+ hide(): void;
80
+ registerEvent(event: keyof HTMLElementEventMap, fn: EventListenerOrEventListenerObject): void;
81
+ registerOnReset(fn: () => void): void;
82
+ registerOnChange(fn: (el: HTMLElement | null) => void): void;
83
+ registerOnAdd(fn: (el: HTMLElement | null) => void): void;
84
+ registerOnRemove(fn: (el: HTMLElement | null) => void): void;
85
+ registerOnclassChange(fn: (classes?: DOMTokenList) => void): void;
86
+ registerOnAddChild(fn: (classes?: DOMTokenList) => void): void;
87
+ registerOnRemoveChild(fn: (classes?: DOMTokenList) => void): void;
88
+ registerOnClassAdded(className: string, fn: () => void): void;
89
+ registerOnClassRemoved(className: string, fn: () => void): void;
90
+ }
91
+ //#endregion
92
+ //#region src/application/utils/domObserver.d.ts
93
+ /**
94
+ * This class manages a `MutationObserver` for the `document.body`. It monitors nodes that are
95
+ * added or removed from the DOM and notifies the observers for each observable element
96
+ * when they are ready to be watched.
97
+ *
98
+ * How that works:
99
+ *
100
+ * When the `observe` function is called, it attaches a `MutationObserver` to the `document.body` element.
101
+ * All changes to `document.body` are tracked by this observer. When changes are detected, the `MutationObserver`
102
+ * iterates through all added and removed nodes and checks if each node exists in the main map of observable elements.
103
+ *
104
+ * If a match is found, it notifies the corresponding `ElementObserver` instance to start monitoring changes for that element.
105
+ *
106
+ * The primary `MutationObserver` remains active until the `destroy` function is called. Calling `destroy` will disconnect all
107
+ * individual element observers and release any associated resources.
108
+ *
109
+ * There is no need to explicitly call the `observe` function. It is automatically invoked when a `useElementObserver` hook is instantiated.
110
+ *
111
+ */
112
+ declare class DOMObserver {
113
+ private static documentObserver;
114
+ private static listeners;
115
+ private static notifyAdition;
116
+ private static notifyRemoval;
117
+ private static notifyChildrenChanges;
118
+ private static mapNodeInstancesToListeners;
119
+ static add(selector: NodeSelector): ElementObserver;
120
+ static remove(selector: NodeSelector): void;
121
+ static observe(): void;
122
+ static destroy(): void;
123
+ }
124
+ //#endregion
125
+ //#region src/application/utils/imageFilter.d.ts
126
+ declare const getRecentProductImageUrls: (lastMessages: Message[], currentProductId: string | undefined) => string[];
127
+ //#endregion
128
+ //#region src/application/utils/merchantUtils.d.ts
129
+ declare const prepareMerchantPage: () => void;
130
+ //#endregion
131
+ //#region src/application/utils/messageFromFormSubmittedEvent.d.ts
132
+ declare const messageFromFormSubmittedEvent: (event: UserEvent$1, formResponseAttributes: FormResponseAttributes["attributes"]) => Message | undefined;
133
+ //#endregion
134
+ //#region src/application/utils/messageFromQueryEvent.d.ts
135
+ /**
136
+ * Transforms a query UserEvent object into a Message object for presentation.
137
+ *
138
+ * @param event The user event object received from the server
139
+ *
140
+ * @returns A Message if the event is a query event, otherwise undefined
141
+ */
142
+ declare const messageFromQueryEvent: (event: UserEvent$1) => Message | undefined;
143
+ //#endregion
144
+ //#region src/application/utils/messageFromResponse.d.ts
145
+ /**
146
+ * Transforms a server Response object into a Message object for presentation.
147
+ *
148
+ * @param response The response object received from the server containing model generated content
149
+ *
150
+ * @returns A Message if the response contains known attributes, undefined otherwise
151
+ */
152
+ declare const messageFromResponse: (response?: Response$1) => Message | undefined;
153
+ //#endregion
154
+ //#region src/application/utils/messageFromSuggestionEvent.d.ts
155
+ /**
156
+ * Transforms a UserEvent object into a Message object for presentation.
157
+ *
158
+ * @param event The UserEvent object received from the server
159
+ * @param suggestions A list of generated suggestions to match the event to
160
+ *
161
+ * @returns A Message if the event is a suggestion click event, undefined otherwise
162
+ */
163
+ declare const messageFromSuggestionEvent: (event: UserEvent$1, suggestions: Suggestion$1[]) => Message | undefined;
164
+ //#endregion
165
+ //#region src/application/utils/mutationHelper.d.ts
166
+ declare class MutationHelper {
167
+ static fireClassChange(record: MutationRecord, node: HTMLElement | null, fn: (classes: DOMTokenList) => void): void;
168
+ static fireClassAdded(record: MutationRecord, node: HTMLElement | null, classMap: Map<string, () => void>): void;
169
+ static fireClassRemoved(record: MutationRecord, node: HTMLElement | null, classMap: Map<string, () => void>): void;
170
+ static fireSubtreeChange(nodes: NodeList, fn?: (nodes: NodeList) => void): void;
171
+ static isClass(mutation: MutationRecord): boolean;
172
+ static isChildList(mutation: MutationRecord): boolean;
173
+ }
174
+ //#endregion
175
+ //#region src/application/utils/nextMessageRequestToApiRequest.d.ts
176
+ declare const messageRequestToCommerceMessageRequest: (data: NextMessageRequest$1) => NextMessageRequest;
177
+ //#endregion
178
+ //#region src/application/utils/overrides.d.ts
179
+ type ReplaceOp<T> = {
180
+ $replace: T;
181
+ };
182
+ type DeleteOp = {
183
+ $delete: true;
184
+ };
185
+ type Builtin = Date | RegExp | ((...args: unknown[]) => unknown);
186
+ type Primitive = string | number | boolean | bigint | symbol | null | undefined;
187
+ /**
188
+ * Override<T> is a DeepPartial-like type with special operators:
189
+ * - { $replace: T } to replace an entire subtree/array
190
+ * - { $delete: true } to delete an object key
191
+ *
192
+ * Arrays behavior:
193
+ * - Arrays of objects: merge-by-index by default (unless `arrayStrategy: 'replace'` or `$replace` is used)
194
+ * - Arrays of primitives (string/number/boolean/...): replaced by default when a patch array is provided
195
+ */
196
+ type Override<T> = T extends Primitive | Builtin ? T | ReplaceOp<T> | DeleteOp : T extends (infer U)[] ? Array<Override<U> | undefined> | ReplaceOp<T> : T extends Map<unknown, unknown> | Set<unknown> ? ReplaceOp<T> : T extends object ? { [K in keyof T]?: Override<T[K]> | DeleteOp | null } | ReplaceOp<T> : T;
197
+ type MergeOptions = {
198
+ /**
199
+ * How to treat arrays when patch provides an array (not $replace):
200
+ * - 'replace': always use patch array as whole value
201
+ * - 'mergeByIndex': merge each index recursively (default for arrays of objects)
202
+ * Note: Arrays of primitives are replaced by default regardless of this option.
203
+ */
204
+ arrayStrategy?: 'replace' | 'mergeByIndex';
205
+ /**
206
+ * If true, a `null` patch value deletes the key from an object (RFC 7396-ish)
207
+ */
208
+ nullDeletes?: boolean;
209
+ };
210
+ type NoInfer<T> = [T][T extends unknown ? 0 : never];
211
+ declare function applyOverrides<T>(base: T, patch: Override<NoInfer<T>>, opts?: MergeOptions): T;
212
+ //#endregion
213
+ //#region src/application/utils/stringUtils.d.ts
214
+ declare class StringUtils {
215
+ static isNullOrEmpty(value: string | undefined): boolean;
216
+ static trimToNull(value: string | undefined): string | undefined;
217
+ static capitalize(type: string | undefined): string;
218
+ /**
219
+ * Finds the first pattern in an array that matches a given URL.
220
+ * Patterns can include a single wildcard '*' which matches any sequence of characters.
221
+ *
222
+ * @param patterns
223
+ * @param urlToTest
224
+ * @returns
225
+ */
226
+ static findMatchingPattern(patterns: string[], urlToTest: Location): string | undefined;
227
+ }
228
+ //#endregion
229
+ //#region src/application/utils/supportedEventRequestToApiRequest.d.ts
230
+ declare const coreSupportedEventRequestToApiRequest: (coreSupportedEventRequest: SupportedEventRequest$1) => SupportedEventRequest;
231
+ //#endregion
232
+ //#region src/application/utils/urlsParser.d.ts
233
+ declare const parseHref: (href: string) => {
234
+ url: URL | undefined;
235
+ urlSearchParams: URLSearchParams | undefined;
236
+ };
237
+ declare const createUrlWithQueryParams: (url: string, queryParams: Record<string, string>) => string;
238
+ declare const getQueryParam: (key: string) => string | null;
239
+ type SearchMessage = {
240
+ id: string;
241
+ role: MessageRole;
242
+ createdAt: string;
243
+ } & ProductSearchMessageMetadata;
244
+ declare const buildSearchHash: (message: SearchMessage) => string;
245
+ declare const buildSearchStartHash: (query: string) => string;
246
+ declare const parseSearchHash: (hash: string) => {
247
+ id: string | null;
248
+ query: string | null;
249
+ };
250
+ //#endregion
251
+ //#region src/application/utils/validation.d.ts
252
+ declare const validateEmail: (value: string) => boolean;
253
+ //#endregion
254
+ export { DOMObserver, DeleteOp, ElementObserver, MergeOptions, MouseEventTypes, MutationHelper, NodeSelector, Override, ReplaceOp, SelectorFactory, StringUtils, applyOverrides, buildSearchHash, buildSearchStartHash, coreContextToApiContext, coreSupportedEventRequestToApiRequest, coreUserEventToApiUserEvent, createUrlWithQueryParams, divideArray, getQueryParam, getRecentProductImageUrls, initAmplitude, initDataLayerWrapper, messageFromFormSubmittedEvent, messageFromQueryEvent, messageFromResponse, messageFromSuggestionEvent, messageRequestToCommerceMessageRequest, parseHref, parseSearchHash, prepareMerchantPage, validateEmail };
@@ -0,0 +1,254 @@
1
+ import "../../featureGates-BMWXU0dS.js";
2
+ import "../../index-luJrHgPN.js";
3
+ import { FormResponseAttributes, Response as Response$1 } from "../../index-CIco0cCQ.js";
4
+ import "../../index-tfRj22E1.js";
5
+ import { Context as Context$1, Message, MessageRole, NextMessageRequest as NextMessageRequest$1, ProductSearchMessageMetadata, Suggestion as Suggestion$1, SupportedEventRequest as SupportedEventRequest$1, UserEvent as UserEvent$1 } from "../../index-COG1kOZG.js";
6
+ import "../../frontendConfig-cPvCTWm6.js";
7
+ import "../../types-TD8g7LnH.js";
8
+ import "../../test-types-C9b_OdfO.js";
9
+ import "../../index-Cqg6ltII.js";
10
+ import { MouseEventTypes, NodeSelector, SelectorFactory } from "../../nodeSelector-DpKXszfU.js";
11
+ import * as react0 from "react";
12
+ import { ReactElement } from "react";
13
+ import { Context, NextMessageRequest, SupportedEventRequest, UserEvent } from "@spiffy-ai/commerce-api-client";
14
+
15
+ //#region src/application/utils/analyticsUtils.d.ts
16
+ /**
17
+ * Wraps the window.dataLayer.push method to intercept add_to_cart events and send them to Amplitude.
18
+ * This function runs on an interval until the dataLayer is available.
19
+ */
20
+ declare const initDataLayerWrapper: () => void;
21
+ declare const initAmplitude: () => void;
22
+ //#endregion
23
+ //#region src/application/utils/coreContextToApiContext.d.ts
24
+ declare const coreContextToApiContext: (context: Context$1) => Context;
25
+ //#endregion
26
+ //#region src/application/utils/coreUserEventToApiUserEvent.d.ts
27
+ declare const coreUserEventToApiUserEvent: (data: UserEvent$1) => UserEvent;
28
+ //#endregion
29
+ //#region src/application/utils/divideArray.d.ts
30
+ declare const divideArray: <T>(array: T[], size: number) => T[][];
31
+ //#endregion
32
+ //#region src/application/utils/elementObserver.d.ts
33
+ /**
34
+ * The `ElementObserver` class monitors all changes related to the specific element it is responsible for.
35
+ * It is automatically instantiated by the `useElementObserver` hook, which manages all instances of this class.
36
+ *
37
+ * How it works:
38
+ *
39
+ * Each instance of `ElementObserver` holds several pieces of information related to the node it is monitoring,
40
+ * such as the node's selector and its `MutationObserver`. This class is responsible for translating raw node
41
+ * changes into a more user-friendly format. For example, when the node is added to the DOM, the `ElementObserver`
42
+ * is notified by the `DOMObserver`, which triggers the `onAdd` callback function on the respective `useElementObserver`
43
+ * instance.
44
+ *
45
+ * Instances of `ElementObserver` are fully managed by the `useElementObserver` hook, requiring no additional configuration.
46
+ * When the hook is destroyed, its corresponding `ElementObserver` instance is automatically removed.
47
+ *
48
+ */
49
+ declare class ElementObserver {
50
+ private mutation;
51
+ private node;
52
+ private selector;
53
+ private eventListeners;
54
+ private classAdded;
55
+ private classRemoved;
56
+ private nodeDisplay;
57
+ private addFn;
58
+ private removeFn;
59
+ private changeFn;
60
+ private classChangeFn;
61
+ private addChildFn?;
62
+ private removeChildFn?;
63
+ private resetFn;
64
+ constructor(selector: NodeSelector);
65
+ private handleAttributes;
66
+ private handleChildList;
67
+ private addInitialListeners;
68
+ private clearEventListeners;
69
+ private renew;
70
+ getSelector(): NodeSelector;
71
+ getNode(): HTMLElement | null;
72
+ synchronize(): void;
73
+ init(): void;
74
+ watch(node: Node): void;
75
+ destroy(): void;
76
+ render(fn: () => ReactElement): react0.ReactPortal | undefined;
77
+ fire(event: MouseEventTypes): void;
78
+ show(): void;
79
+ hide(): void;
80
+ registerEvent(event: keyof HTMLElementEventMap, fn: EventListenerOrEventListenerObject): void;
81
+ registerOnReset(fn: () => void): void;
82
+ registerOnChange(fn: (el: HTMLElement | null) => void): void;
83
+ registerOnAdd(fn: (el: HTMLElement | null) => void): void;
84
+ registerOnRemove(fn: (el: HTMLElement | null) => void): void;
85
+ registerOnclassChange(fn: (classes?: DOMTokenList) => void): void;
86
+ registerOnAddChild(fn: (classes?: DOMTokenList) => void): void;
87
+ registerOnRemoveChild(fn: (classes?: DOMTokenList) => void): void;
88
+ registerOnClassAdded(className: string, fn: () => void): void;
89
+ registerOnClassRemoved(className: string, fn: () => void): void;
90
+ }
91
+ //#endregion
92
+ //#region src/application/utils/domObserver.d.ts
93
+ /**
94
+ * This class manages a `MutationObserver` for the `document.body`. It monitors nodes that are
95
+ * added or removed from the DOM and notifies the observers for each observable element
96
+ * when they are ready to be watched.
97
+ *
98
+ * How that works:
99
+ *
100
+ * When the `observe` function is called, it attaches a `MutationObserver` to the `document.body` element.
101
+ * All changes to `document.body` are tracked by this observer. When changes are detected, the `MutationObserver`
102
+ * iterates through all added and removed nodes and checks if each node exists in the main map of observable elements.
103
+ *
104
+ * If a match is found, it notifies the corresponding `ElementObserver` instance to start monitoring changes for that element.
105
+ *
106
+ * The primary `MutationObserver` remains active until the `destroy` function is called. Calling `destroy` will disconnect all
107
+ * individual element observers and release any associated resources.
108
+ *
109
+ * There is no need to explicitly call the `observe` function. It is automatically invoked when a `useElementObserver` hook is instantiated.
110
+ *
111
+ */
112
+ declare class DOMObserver {
113
+ private static documentObserver;
114
+ private static listeners;
115
+ private static notifyAdition;
116
+ private static notifyRemoval;
117
+ private static notifyChildrenChanges;
118
+ private static mapNodeInstancesToListeners;
119
+ static add(selector: NodeSelector): ElementObserver;
120
+ static remove(selector: NodeSelector): void;
121
+ static observe(): void;
122
+ static destroy(): void;
123
+ }
124
+ //#endregion
125
+ //#region src/application/utils/imageFilter.d.ts
126
+ declare const getRecentProductImageUrls: (lastMessages: Message[], currentProductId: string | undefined) => string[];
127
+ //#endregion
128
+ //#region src/application/utils/merchantUtils.d.ts
129
+ declare const prepareMerchantPage: () => void;
130
+ //#endregion
131
+ //#region src/application/utils/messageFromFormSubmittedEvent.d.ts
132
+ declare const messageFromFormSubmittedEvent: (event: UserEvent$1, formResponseAttributes: FormResponseAttributes["attributes"]) => Message | undefined;
133
+ //#endregion
134
+ //#region src/application/utils/messageFromQueryEvent.d.ts
135
+ /**
136
+ * Transforms a query UserEvent object into a Message object for presentation.
137
+ *
138
+ * @param event The user event object received from the server
139
+ *
140
+ * @returns A Message if the event is a query event, otherwise undefined
141
+ */
142
+ declare const messageFromQueryEvent: (event: UserEvent$1) => Message | undefined;
143
+ //#endregion
144
+ //#region src/application/utils/messageFromResponse.d.ts
145
+ /**
146
+ * Transforms a server Response object into a Message object for presentation.
147
+ *
148
+ * @param response The response object received from the server containing model generated content
149
+ *
150
+ * @returns A Message if the response contains known attributes, undefined otherwise
151
+ */
152
+ declare const messageFromResponse: (response?: Response$1) => Message | undefined;
153
+ //#endregion
154
+ //#region src/application/utils/messageFromSuggestionEvent.d.ts
155
+ /**
156
+ * Transforms a UserEvent object into a Message object for presentation.
157
+ *
158
+ * @param event The UserEvent object received from the server
159
+ * @param suggestions A list of generated suggestions to match the event to
160
+ *
161
+ * @returns A Message if the event is a suggestion click event, undefined otherwise
162
+ */
163
+ declare const messageFromSuggestionEvent: (event: UserEvent$1, suggestions: Suggestion$1[]) => Message | undefined;
164
+ //#endregion
165
+ //#region src/application/utils/mutationHelper.d.ts
166
+ declare class MutationHelper {
167
+ static fireClassChange(record: MutationRecord, node: HTMLElement | null, fn: (classes: DOMTokenList) => void): void;
168
+ static fireClassAdded(record: MutationRecord, node: HTMLElement | null, classMap: Map<string, () => void>): void;
169
+ static fireClassRemoved(record: MutationRecord, node: HTMLElement | null, classMap: Map<string, () => void>): void;
170
+ static fireSubtreeChange(nodes: NodeList, fn?: (nodes: NodeList) => void): void;
171
+ static isClass(mutation: MutationRecord): boolean;
172
+ static isChildList(mutation: MutationRecord): boolean;
173
+ }
174
+ //#endregion
175
+ //#region src/application/utils/nextMessageRequestToApiRequest.d.ts
176
+ declare const messageRequestToCommerceMessageRequest: (data: NextMessageRequest$1) => NextMessageRequest;
177
+ //#endregion
178
+ //#region src/application/utils/overrides.d.ts
179
+ type ReplaceOp<T> = {
180
+ $replace: T;
181
+ };
182
+ type DeleteOp = {
183
+ $delete: true;
184
+ };
185
+ type Builtin = Date | RegExp | ((...args: unknown[]) => unknown);
186
+ type Primitive = string | number | boolean | bigint | symbol | null | undefined;
187
+ /**
188
+ * Override<T> is a DeepPartial-like type with special operators:
189
+ * - { $replace: T } to replace an entire subtree/array
190
+ * - { $delete: true } to delete an object key
191
+ *
192
+ * Arrays behavior:
193
+ * - Arrays of objects: merge-by-index by default (unless `arrayStrategy: 'replace'` or `$replace` is used)
194
+ * - Arrays of primitives (string/number/boolean/...): replaced by default when a patch array is provided
195
+ */
196
+ type Override<T> = T extends Primitive | Builtin ? T | ReplaceOp<T> | DeleteOp : T extends (infer U)[] ? Array<Override<U> | undefined> | ReplaceOp<T> : T extends Map<unknown, unknown> | Set<unknown> ? ReplaceOp<T> : T extends object ? { [K in keyof T]?: Override<T[K]> | DeleteOp | null } | ReplaceOp<T> : T;
197
+ type MergeOptions = {
198
+ /**
199
+ * How to treat arrays when patch provides an array (not $replace):
200
+ * - 'replace': always use patch array as whole value
201
+ * - 'mergeByIndex': merge each index recursively (default for arrays of objects)
202
+ * Note: Arrays of primitives are replaced by default regardless of this option.
203
+ */
204
+ arrayStrategy?: 'replace' | 'mergeByIndex';
205
+ /**
206
+ * If true, a `null` patch value deletes the key from an object (RFC 7396-ish)
207
+ */
208
+ nullDeletes?: boolean;
209
+ };
210
+ type NoInfer<T> = [T][T extends unknown ? 0 : never];
211
+ declare function applyOverrides<T>(base: T, patch: Override<NoInfer<T>>, opts?: MergeOptions): T;
212
+ //#endregion
213
+ //#region src/application/utils/stringUtils.d.ts
214
+ declare class StringUtils {
215
+ static isNullOrEmpty(value: string | undefined): boolean;
216
+ static trimToNull(value: string | undefined): string | undefined;
217
+ static capitalize(type: string | undefined): string;
218
+ /**
219
+ * Finds the first pattern in an array that matches a given URL.
220
+ * Patterns can include a single wildcard '*' which matches any sequence of characters.
221
+ *
222
+ * @param patterns
223
+ * @param urlToTest
224
+ * @returns
225
+ */
226
+ static findMatchingPattern(patterns: string[], urlToTest: Location): string | undefined;
227
+ }
228
+ //#endregion
229
+ //#region src/application/utils/supportedEventRequestToApiRequest.d.ts
230
+ declare const coreSupportedEventRequestToApiRequest: (coreSupportedEventRequest: SupportedEventRequest$1) => SupportedEventRequest;
231
+ //#endregion
232
+ //#region src/application/utils/urlsParser.d.ts
233
+ declare const parseHref: (href: string) => {
234
+ url: URL | undefined;
235
+ urlSearchParams: URLSearchParams | undefined;
236
+ };
237
+ declare const createUrlWithQueryParams: (url: string, queryParams: Record<string, string>) => string;
238
+ declare const getQueryParam: (key: string) => string | null;
239
+ type SearchMessage = {
240
+ id: string;
241
+ role: MessageRole;
242
+ createdAt: string;
243
+ } & ProductSearchMessageMetadata;
244
+ declare const buildSearchHash: (message: SearchMessage) => string;
245
+ declare const buildSearchStartHash: (query: string) => string;
246
+ declare const parseSearchHash: (hash: string) => {
247
+ id: string | null;
248
+ query: string | null;
249
+ };
250
+ //#endregion
251
+ //#region src/application/utils/validation.d.ts
252
+ declare const validateEmail: (value: string) => boolean;
253
+ //#endregion
254
+ export { DOMObserver, DeleteOp, ElementObserver, MergeOptions, MouseEventTypes, MutationHelper, NodeSelector, Override, ReplaceOp, SelectorFactory, StringUtils, applyOverrides, buildSearchHash, buildSearchStartHash, coreContextToApiContext, coreSupportedEventRequestToApiRequest, coreUserEventToApiUserEvent, createUrlWithQueryParams, divideArray, getQueryParam, getRecentProductImageUrls, initAmplitude, initDataLayerWrapper, messageFromFormSubmittedEvent, messageFromQueryEvent, messageFromResponse, messageFromSuggestionEvent, messageRequestToCommerceMessageRequest, parseHref, parseSearchHash, prepareMerchantPage, validateEmail };
@@ -0,0 +1,12 @@
1
+ import "../../events-DgFzlVJR.js";
2
+ import "../../logger-BexDfK3W.js";
3
+ import { DOMObserver, ElementObserver, MutationHelper, NodeSelector, SelectorFactory, StringUtils, applyOverrides, buildSearchHash, buildSearchStartHash, coreContextToApiContext, coreSupportedEventRequestToApiRequest, coreUserEventToApiUserEvent, createUrlWithQueryParams, divideArray, getQueryParam, getRecentProductImageUrls, initAmplitude, initDataLayerWrapper, messageFromFormSubmittedEvent, messageFromQueryEvent, messageFromResponse, messageFromSuggestionEvent, messageRequestToCommerceMessageRequest, parseHref, parseSearchHash, prepareMerchantPage, validateEmail } from "../../chat-H6YcCS4I.js";
4
+ import "../../types-C3S1H4hl.js";
5
+ import "../../enviveConfigContext-CWVdVWKW.js";
6
+ import "../../atomStore-TnLPtYns.js";
7
+ import "../../api-kpPTZhV9.js";
8
+ import "../../customerService-C4wc0glQ.js";
9
+ import "../../utilityTypes-UWdNHElu.js";
10
+ import "../../variantInfo-BTvC6CQh.js";
11
+
12
+ export { DOMObserver, ElementObserver, MutationHelper, NodeSelector, SelectorFactory, StringUtils, applyOverrides, buildSearchHash, buildSearchStartHash, coreContextToApiContext, coreSupportedEventRequestToApiRequest, coreUserEventToApiUserEvent, createUrlWithQueryParams, divideArray, getQueryParam, getRecentProductImageUrls, initAmplitude, initDataLayerWrapper, messageFromFormSubmittedEvent, messageFromQueryEvent, messageFromResponse, messageFromSuggestionEvent, messageRequestToCommerceMessageRequest, parseHref, parseSearchHash, prepareMerchantPage, validateEmail };
File without changes
@@ -0,0 +1,57 @@
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ let jotai = require("jotai");
3
+ jotai = require_chunk.__toESM(jotai);
4
+ let jotai_utils = require("jotai/utils");
5
+ jotai_utils = require_chunk.__toESM(jotai_utils);
6
+
7
+ //#region src/atoms/atomStore/atomStore.ts
8
+ let atomStore = null;
9
+ const getAtomStore = () => {
10
+ if (!atomStore) atomStore = (0, jotai.getDefaultStore)();
11
+ return atomStore;
12
+ };
13
+ /**
14
+ * @internal
15
+ *
16
+ * Sets the global atom store to be the provided store.
17
+ *
18
+ * @param store - The store to set the global atom store to.
19
+ */
20
+ const setAtomStoreForTesting = (store) => {
21
+ atomStore = store;
22
+ };
23
+ /**
24
+ * @internal
25
+ *
26
+ * Resets the global atom store to null
27
+ */
28
+ const resetAtomStore = () => {
29
+ atomStore = null;
30
+ };
31
+ const sessionStorageUtil = (0, jotai_utils.createJSONStorage)(() => sessionStorage);
32
+
33
+ //#endregion
34
+ Object.defineProperty(exports, 'getAtomStore', {
35
+ enumerable: true,
36
+ get: function () {
37
+ return getAtomStore;
38
+ }
39
+ });
40
+ Object.defineProperty(exports, 'resetAtomStore', {
41
+ enumerable: true,
42
+ get: function () {
43
+ return resetAtomStore;
44
+ }
45
+ });
46
+ Object.defineProperty(exports, 'sessionStorageUtil', {
47
+ enumerable: true,
48
+ get: function () {
49
+ return sessionStorageUtil;
50
+ }
51
+ });
52
+ Object.defineProperty(exports, 'setAtomStoreForTesting', {
53
+ enumerable: true,
54
+ get: function () {
55
+ return setAtomStoreForTesting;
56
+ }
57
+ });
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,31 @@
1
+ import { getDefaultStore } from "jotai";
2
+ import { createJSONStorage } from "jotai/utils";
3
+
4
+ //#region src/atoms/atomStore/atomStore.ts
5
+ let atomStore = null;
6
+ const getAtomStore = () => {
7
+ if (!atomStore) atomStore = getDefaultStore();
8
+ return atomStore;
9
+ };
10
+ /**
11
+ * @internal
12
+ *
13
+ * Sets the global atom store to be the provided store.
14
+ *
15
+ * @param store - The store to set the global atom store to.
16
+ */
17
+ const setAtomStoreForTesting = (store) => {
18
+ atomStore = store;
19
+ };
20
+ /**
21
+ * @internal
22
+ *
23
+ * Resets the global atom store to null
24
+ */
25
+ const resetAtomStore = () => {
26
+ atomStore = null;
27
+ };
28
+ const sessionStorageUtil = createJSONStorage(() => sessionStorage);
29
+
30
+ //#endregion
31
+ export { getAtomStore, resetAtomStore, sessionStorageUtil, setAtomStoreForTesting };
@@ -0,0 +1,17 @@
1
+ require('../../events-bH-24eRW.cjs');
2
+ require('../../logger-Be0NyKaY.cjs');
3
+ const require_chat = require('../../chat-CCQMmhc1.cjs');
4
+ require('../../types-lcjuhDBt.cjs');
5
+ require('../../enviveConfigContext-Bs8kepnO.cjs');
6
+ require('../../atomStore-BNQyGmU_.cjs');
7
+ require('../../api-BtzLHcfU.cjs');
8
+ require('../../customerService-zsDlp7g2.cjs');
9
+ require('../../utilityTypes-DMdsI0DG.cjs');
10
+ require('../../variantInfo-Cz2YXraO.cjs');
11
+
12
+ exports.appDetailsAtom = require_chat.appDetailsAtom;
13
+ exports.appSourceAtom = require_chat.appSourceAtom;
14
+ exports.chatIdAtom = require_chat.chatIdAtom;
15
+ exports.envAtom = require_chat.envAtom;
16
+ exports.userIdAtom = require_chat.userIdAtom;
17
+ exports.variantInfoAtom = require_chat.variantInfoAtom;