@envive-ai/react-hooks 0.2.6-alpha-arthur-1 → 0.2.6-alpha.11

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 (676) hide show
  1. package/dist/{NewOrgConfig-CUQGpmw9.js → NewOrgConfig-BZCP9E7v.js} +2 -2
  2. package/dist/{NewOrgConfig-DD0oloeK.cjs → NewOrgConfig-DWLMI1ga.cjs} +2 -2
  3. package/dist/SystemSettingsContext-CO5c1L62.cjs +20 -0
  4. package/dist/SystemSettingsContext-CXmUlH8i.js +13 -0
  5. package/dist/TrackComponentVisibleEvent-BJgNOypY.js +52 -0
  6. package/dist/TrackComponentVisibleEvent-BRC2FTp-.cjs +59 -0
  7. package/dist/amplitudeContext-CCVyp5RU.d.cts +52 -0
  8. package/dist/amplitudeContext-DFYBDc0h.d.ts +52 -0
  9. package/dist/api-BWSsazAG.js +166 -0
  10. package/dist/api-DeW6rHj3.cjs +239 -0
  11. package/dist/application/models/graphql/index.cjs +3 -3
  12. package/dist/application/models/graphql/index.d.cts +2 -2
  13. package/dist/application/models/graphql/index.d.ts +2 -2
  14. package/dist/application/models/graphql/index.js +3 -2
  15. package/dist/application/models/guards/api/index.cjs +3 -3
  16. package/dist/application/models/guards/api/index.d.cts +2 -2
  17. package/dist/application/models/guards/api/index.d.ts +2 -2
  18. package/dist/application/models/guards/api/index.js +3 -3
  19. package/dist/application/models/guards/utils.cjs +1 -1
  20. package/dist/application/models/guards/utils.d.ts +1 -1
  21. package/dist/application/models/guards/utils.js +1 -1
  22. package/dist/application/models/index.cjs +23 -7
  23. package/dist/application/models/index.d.cts +12 -167
  24. package/dist/application/models/index.d.ts +13 -168
  25. package/dist/application/models/index.js +11 -7
  26. package/dist/application/models/utilityTypes/index.cjs +1 -0
  27. package/dist/application/models/utilityTypes/index.d.cts +2 -0
  28. package/dist/application/models/utilityTypes/index.d.ts +2 -0
  29. package/dist/application/models/utilityTypes/index.js +3 -0
  30. package/dist/application/models/variantInfo/index.cjs +3 -0
  31. package/dist/application/models/variantInfo/index.d.cts +2 -0
  32. package/dist/application/models/variantInfo/index.d.ts +2 -0
  33. package/dist/application/models/variantInfo/index.js +3 -0
  34. package/dist/application/utils/index.cjs +19 -10
  35. package/dist/application/utils/index.d.cts +64 -13
  36. package/dist/application/utils/index.d.ts +64 -13
  37. package/dist/application/utils/index.js +19 -10
  38. package/dist/{atomStore-CZKe3itM.cjs → atomStore-DNji91Im.cjs} +1 -1
  39. package/dist/{atomStore-BuopbV9k.js → atomStore-DXTVqiKc.js} +1 -1
  40. package/dist/atoms/app/index.cjs +24 -22
  41. package/dist/atoms/app/index.d.cts +21 -9
  42. package/dist/atoms/app/index.d.ts +20 -8
  43. package/dist/atoms/app/index.js +19 -17
  44. package/dist/atoms/atomStore/index.cjs +1 -1
  45. package/dist/atoms/atomStore/index.d.ts +1 -1
  46. package/dist/atoms/atomStore/index.js +1 -1
  47. package/dist/atoms/chat/index.cjs +21 -20
  48. package/dist/atoms/chat/index.d.cts +46 -36
  49. package/dist/atoms/chat/index.d.ts +44 -34
  50. package/dist/atoms/chat/index.js +21 -20
  51. package/dist/atoms/globalSearch/index.cjs +2 -1
  52. package/dist/atoms/globalSearch/index.d.cts +6 -6
  53. package/dist/atoms/globalSearch/index.d.ts +6 -6
  54. package/dist/atoms/globalSearch/index.js +2 -1
  55. package/dist/atoms/org/index.cjs +11 -10
  56. package/dist/atoms/org/index.d.cts +32 -19
  57. package/dist/atoms/org/index.d.ts +32 -19
  58. package/dist/atoms/org/index.js +3 -2
  59. package/dist/atoms/search/index.cjs +47 -7
  60. package/dist/atoms/search/index.d.cts +15 -76
  61. package/dist/atoms/search/index.d.ts +15 -76
  62. package/dist/atoms/search/index.js +29 -7
  63. package/dist/atoms/search/types.cjs +5 -0
  64. package/dist/atoms/search/types.d.cts +2 -0
  65. package/dist/atoms/search/types.d.ts +2 -0
  66. package/dist/atoms/search/types.js +3 -0
  67. package/dist/atoms/search/utils.cjs +1 -1
  68. package/dist/atoms/search/utils.d.cts +1 -1
  69. package/dist/atoms/search/utils.d.ts +1 -1
  70. package/dist/atoms/search/utils.js +1 -1
  71. package/dist/cdnContext-BnqmnEvR.js +38 -0
  72. package/dist/cdnContext-CnYcBOr9.cjs +53 -0
  73. package/dist/chat-CqPuT9_V.cjs +393 -0
  74. package/dist/chat-DH70QqJp.js +257 -0
  75. package/dist/chatElementDisplayLocation-CpgV2wR1.d.ts +25 -0
  76. package/dist/chatElementDisplayLocation-DWmfNX_u.d.cts +25 -0
  77. package/dist/chatSearch-ChyGuHbu.js +295 -0
  78. package/dist/chatSearch-DpnpRWAW.cjs +418 -0
  79. package/dist/chatState-CcFtSqJT.cjs +120 -0
  80. package/dist/chatState-DKnNHmwe.js +34 -0
  81. package/dist/config/index.d.cts +4 -4
  82. package/dist/config/index.d.ts +4 -4
  83. package/dist/config/locators/components/chat/index.d.cts +1 -1
  84. package/dist/config/locators/components/chat/index.d.ts +1 -1
  85. package/dist/config/locators/components/chat/variants/index.d.cts +1 -1
  86. package/dist/config/locators/components/chat/variants/index.d.ts +1 -1
  87. package/dist/config/locators/components/common/index.d.cts +1 -1
  88. package/dist/config/locators/components/common/index.d.ts +1 -1
  89. package/dist/config/locators/components/index.d.cts +1 -1
  90. package/dist/config/locators/components/index.d.ts +1 -1
  91. package/dist/config/locators/components/search/index.d.cts +1 -1
  92. package/dist/config/locators/components/search/index.d.ts +1 -1
  93. package/dist/config/locators/index.d.cts +4 -4
  94. package/dist/config/locators/index.d.ts +4 -4
  95. package/dist/contexts/amplitudeContext/index.cjs +22 -23
  96. package/dist/contexts/amplitudeContext/index.d.cts +2 -11
  97. package/dist/contexts/amplitudeContext/index.d.ts +2 -11
  98. package/dist/contexts/amplitudeContext/index.js +20 -22
  99. package/dist/contexts/cdnContext/index.cjs +4 -4
  100. package/dist/contexts/cdnContext/index.d.cts +6 -2
  101. package/dist/contexts/cdnContext/index.d.ts +6 -2
  102. package/dist/contexts/cdnContext/index.js +4 -4
  103. package/dist/contexts/chatContext/index.cjs +326 -0
  104. package/dist/contexts/chatContext/index.d.cts +15 -0
  105. package/dist/contexts/chatContext/index.d.ts +15 -0
  106. package/dist/contexts/chatContext/index.js +319 -0
  107. package/dist/contexts/enviveConfigContext/index.cjs +4 -4
  108. package/dist/contexts/enviveConfigContext/index.d.cts +25 -3
  109. package/dist/contexts/enviveConfigContext/index.d.ts +25 -3
  110. package/dist/contexts/enviveConfigContext/index.js +4 -4
  111. package/dist/contexts/enviveCssContext/index.cjs +19 -15
  112. package/dist/contexts/enviveCssContext/index.d.cts +5 -3
  113. package/dist/contexts/enviveCssContext/index.d.ts +5 -3
  114. package/dist/contexts/enviveCssContext/index.js +19 -15
  115. package/dist/contexts/featureFlagContext/index.cjs +10 -9
  116. package/dist/contexts/featureFlagContext/index.d.cts +12 -3
  117. package/dist/contexts/featureFlagContext/index.d.ts +12 -3
  118. package/dist/contexts/featureFlagContext/index.js +7 -6
  119. package/dist/contexts/featureFlagServiceContext/index.cjs +3 -4
  120. package/dist/contexts/featureFlagServiceContext/index.d.cts +5 -1
  121. package/dist/contexts/featureFlagServiceContext/index.d.ts +5 -1
  122. package/dist/contexts/featureFlagServiceContext/index.js +3 -4
  123. package/dist/contexts/graphqlContext/index.cjs +13 -8
  124. package/dist/contexts/graphqlContext/index.d.cts +15 -11
  125. package/dist/contexts/graphqlContext/index.d.ts +15 -11
  126. package/dist/contexts/graphqlContext/index.js +13 -8
  127. package/dist/contexts/localStorageContext/index.cjs +3 -3
  128. package/dist/contexts/localStorageContext/index.d.cts +22 -3
  129. package/dist/contexts/localStorageContext/index.d.ts +22 -3
  130. package/dist/contexts/localStorageContext/index.js +3 -4
  131. package/dist/contexts/newOrgConfigContext/index.cjs +17 -13
  132. package/dist/contexts/newOrgConfigContext/index.d.cts +16 -12
  133. package/dist/contexts/newOrgConfigContext/index.d.ts +16 -12
  134. package/dist/contexts/newOrgConfigContext/index.js +17 -13
  135. package/dist/contexts/searchContext/index.cjs +24 -23
  136. package/dist/contexts/searchContext/index.d.cts +7 -2
  137. package/dist/contexts/searchContext/index.d.ts +7 -2
  138. package/dist/contexts/searchContext/index.js +24 -23
  139. package/dist/contexts/sessionStorageContext/index.cjs +2 -2
  140. package/dist/contexts/sessionStorageContext/index.d.cts +6 -2
  141. package/dist/contexts/sessionStorageContext/index.d.ts +6 -2
  142. package/dist/contexts/sessionStorageContext/index.js +2 -2
  143. package/dist/contexts/shopifyUrlContext/index.cjs +2 -2
  144. package/dist/contexts/shopifyUrlContext/index.d.cts +12 -2
  145. package/dist/contexts/shopifyUrlContext/index.d.ts +12 -2
  146. package/dist/contexts/shopifyUrlContext/index.js +2 -2
  147. package/dist/contexts/systemSettingsContext/index.cjs +4 -4
  148. package/dist/contexts/systemSettingsContext/index.d.cts +15 -4
  149. package/dist/contexts/systemSettingsContext/index.d.ts +17 -6
  150. package/dist/contexts/systemSettingsContext/index.js +4 -4
  151. package/dist/contexts/types.cjs +7 -0
  152. package/dist/contexts/types.d.cts +5 -0
  153. package/dist/contexts/types.d.ts +5 -0
  154. package/dist/contexts/types.js +3 -0
  155. package/dist/contexts/userIdentityContext/index.cjs +21 -19
  156. package/dist/contexts/userIdentityContext/index.d.cts +2 -11
  157. package/dist/contexts/userIdentityContext/index.d.ts +2 -11
  158. package/dist/contexts/userIdentityContext/index.js +19 -17
  159. package/dist/custservice-types-CcPnAJ5k.d.ts +29 -0
  160. package/dist/custservice-types-_Dnz4sMy.d.cts +29 -0
  161. package/dist/domObserver-Bqf3ooj8.cjs +304 -0
  162. package/dist/{domObserver-LCBj1xw4.cjs → domObserver-v9ODTyfT.js} +4 -23
  163. package/dist/enviveConfig-DZBohDpc.js +62 -0
  164. package/dist/enviveConfig-Dv9-esGV.cjs +130 -0
  165. package/dist/enviveConfigContext-D2OELZDR.cjs +60 -0
  166. package/dist/enviveConfigContext-DrDjCems.js +45 -0
  167. package/dist/events/index.cjs +3 -2
  168. package/dist/events/index.d.cts +15 -2
  169. package/dist/events/index.d.ts +15 -2
  170. package/dist/events/index.js +2 -2
  171. package/dist/events-DYY4l817.cjs +90 -0
  172. package/dist/events-DyUix-Bn.js +78 -0
  173. package/dist/featureFlagServiceContext-B01ZkIwj.d.cts +23 -0
  174. package/dist/featureFlagServiceContext-CJyYItqu.cjs +62 -0
  175. package/dist/featureFlagServiceContext-FBM6DdMJ.js +42 -0
  176. package/dist/featureFlagServiceContext-jZzoym5C.d.ts +23 -0
  177. package/dist/featureGates-KEwAL8p_.js +26 -0
  178. package/dist/featureGates-qU_ulhpC.cjs +32 -0
  179. package/dist/frontendConfig-BIq8r6nC.d.cts +858 -0
  180. package/dist/frontendConfig-CixANNjw.d.ts +858 -0
  181. package/dist/{globalSearch-Cpc8egsM.cjs → globalSearch-Ba342VVG.cjs} +1 -1
  182. package/dist/globalSearch-DQCMamhv.js +1 -0
  183. package/dist/globalSearch-DYxPE02f.cjs +0 -0
  184. package/dist/{globalSearch-nmrfGLOn.js → globalSearch-eGx-9JQz.js} +1 -1
  185. package/dist/graphql-3PxNRFOc.js +36 -0
  186. package/dist/graphql-DGYfelZp.cjs +53 -0
  187. package/dist/graphqlConfig-GHZ1UgCw.cjs +73 -0
  188. package/dist/graphqlConfig-mDg6J44N.js +24 -0
  189. package/dist/graphqlContext-B4twVCqw.d.ts +28 -0
  190. package/dist/graphqlContext-BZPEAFSR.cjs +111 -0
  191. package/dist/graphqlContext-W6iEyEkv.d.cts +28 -0
  192. package/dist/graphqlContext-eaZPxgRE.js +96 -0
  193. package/dist/hooks/AmplitudeOperations/index.cjs +22 -23
  194. package/dist/hooks/AmplitudeOperations/index.d.cts +2 -2
  195. package/dist/hooks/AmplitudeOperations/index.d.ts +2 -2
  196. package/dist/hooks/AmplitudeOperations/index.js +21 -22
  197. package/dist/hooks/AppDetails/index.cjs +22 -20
  198. package/dist/hooks/AppDetails/index.d.cts +24 -3
  199. package/dist/hooks/AppDetails/index.d.ts +24 -3
  200. package/dist/hooks/AppDetails/index.js +22 -20
  201. package/dist/hooks/CdnOperations/index.cjs +4 -4
  202. package/dist/hooks/CdnOperations/index.js +4 -4
  203. package/dist/hooks/ChatToggle/index.cjs +25 -28
  204. package/dist/hooks/ChatToggle/index.d.cts +2 -2
  205. package/dist/hooks/ChatToggle/index.d.ts +2 -2
  206. package/dist/hooks/ChatToggle/index.js +22 -25
  207. package/dist/hooks/ChatToggleAnalytics/index.cjs +24 -25
  208. package/dist/hooks/ChatToggleAnalytics/index.d.cts +2 -2
  209. package/dist/hooks/ChatToggleAnalytics/index.d.ts +2 -2
  210. package/dist/hooks/ChatToggleAnalytics/index.js +23 -24
  211. package/dist/hooks/CustomerSupportHandoff/index.cjs +2 -2
  212. package/dist/hooks/CustomerSupportHandoff/index.d.cts +1 -1
  213. package/dist/hooks/CustomerSupportHandoff/index.js +2 -2
  214. package/dist/hooks/Debounce/index.cjs +2 -20
  215. package/dist/hooks/Debounce/index.d.cts +1 -1
  216. package/dist/hooks/Debounce/index.d.ts +1 -1
  217. package/dist/hooks/Debounce/index.js +2 -18
  218. package/dist/hooks/ElementObserver/index.cjs +6 -4
  219. package/dist/hooks/ElementObserver/index.d.cts +25 -4
  220. package/dist/hooks/ElementObserver/index.d.ts +25 -4
  221. package/dist/hooks/ElementObserver/index.js +6 -4
  222. package/dist/hooks/FloatingButtonVisibility/index.cjs +73 -0
  223. package/dist/hooks/FloatingButtonVisibility/index.d.cts +7 -0
  224. package/dist/hooks/FloatingButtonVisibility/index.d.ts +7 -0
  225. package/dist/hooks/FloatingButtonVisibility/index.js +69 -0
  226. package/dist/hooks/GrabAndScroll/index.cjs +1 -1
  227. package/dist/hooks/GrabAndScroll/index.d.ts +2 -2
  228. package/dist/hooks/GrabAndScroll/index.js +1 -1
  229. package/dist/hooks/GraphQLConfig/index.cjs +14 -9
  230. package/dist/hooks/GraphQLConfig/index.d.cts +14 -2
  231. package/dist/hooks/GraphQLConfig/index.d.ts +14 -2
  232. package/dist/hooks/GraphQLConfig/index.js +14 -9
  233. package/dist/hooks/IdentifyUser/index.cjs +21 -19
  234. package/dist/hooks/IdentifyUser/index.js +20 -18
  235. package/dist/hooks/ImageResolver/index.cjs +29 -20
  236. package/dist/hooks/ImageResolver/index.d.ts +1 -1
  237. package/dist/hooks/ImageResolver/index.js +29 -20
  238. package/dist/hooks/Intersection/index.cjs +1 -1
  239. package/dist/hooks/Intersection/index.js +1 -1
  240. package/dist/hooks/LastInteraction/index.cjs +34 -0
  241. package/dist/hooks/LastInteraction/index.d.cts +7 -0
  242. package/dist/hooks/LastInteraction/index.d.ts +7 -0
  243. package/dist/hooks/LastInteraction/index.js +32 -0
  244. package/dist/hooks/LocalStorageOperations/index.cjs +7 -8
  245. package/dist/hooks/LocalStorageOperations/index.js +3 -4
  246. package/dist/hooks/MessageFilter/index.cjs +12 -3
  247. package/dist/hooks/MessageFilter/index.d.cts +18 -2
  248. package/dist/hooks/MessageFilter/index.d.ts +18 -2
  249. package/dist/hooks/MessageFilter/index.js +11 -2
  250. package/dist/hooks/NewOrgConfig/index.cjs +18 -14
  251. package/dist/hooks/NewOrgConfig/index.d.cts +17 -3
  252. package/dist/hooks/NewOrgConfig/index.d.ts +17 -3
  253. package/dist/hooks/NewOrgConfig/index.js +18 -14
  254. package/dist/hooks/Search/index.cjs +173 -314
  255. package/dist/hooks/Search/index.d.cts +58 -3
  256. package/dist/hooks/Search/index.d.ts +58 -3
  257. package/dist/hooks/Search/index.js +162 -302
  258. package/dist/hooks/SearchOperations/index.cjs +25 -24
  259. package/dist/hooks/SearchOperations/index.d.cts +3 -2
  260. package/dist/hooks/SearchOperations/index.d.ts +3 -2
  261. package/dist/hooks/SearchOperations/index.js +25 -24
  262. package/dist/hooks/SessionStorageOperations/index.cjs +2 -2
  263. package/dist/hooks/SessionStorageOperations/index.js +2 -2
  264. package/dist/hooks/ShopifyUrlOperations/index.cjs +3 -3
  265. package/dist/hooks/ShopifyUrlOperations/index.d.cts +5 -2
  266. package/dist/hooks/ShopifyUrlOperations/index.d.ts +5 -2
  267. package/dist/hooks/ShopifyUrlOperations/index.js +3 -3
  268. package/dist/hooks/SnapCalculator/index.cjs +1 -1
  269. package/dist/hooks/SnapCalculator/index.d.cts +3 -4
  270. package/dist/hooks/SnapCalculator/index.d.ts +3 -4
  271. package/dist/hooks/SnapCalculator/index.js +1 -1
  272. package/dist/hooks/SystemSettingsContext/index.cjs +6 -17
  273. package/dist/hooks/SystemSettingsContext/index.d.cts +16 -5
  274. package/dist/hooks/SystemSettingsContext/index.d.ts +15 -4
  275. package/dist/hooks/SystemSettingsContext/index.js +6 -15
  276. package/dist/hooks/TrackComponentVisibleEvent/index.cjs +21 -23
  277. package/dist/hooks/TrackComponentVisibleEvent/index.d.cts +3 -2
  278. package/dist/hooks/TrackComponentVisibleEvent/index.d.ts +3 -2
  279. package/dist/hooks/TrackComponentVisibleEvent/index.js +21 -23
  280. package/dist/hooks/UpdateAnalyticsProps/index.cjs +24 -26
  281. package/dist/hooks/UpdateAnalyticsProps/index.js +20 -22
  282. package/dist/hooks/utils.cjs +1 -1
  283. package/dist/hooks/utils.d.cts +14 -20
  284. package/dist/hooks/utils.d.ts +14 -20
  285. package/dist/hooks/utils.js +1 -1
  286. package/dist/index-9oqgeOVC.d.cts +186 -0
  287. package/dist/index-A0HvA68Y.d.cts +1 -0
  288. package/dist/index-BC93l5Th.d.ts +1 -0
  289. package/dist/index-BEzmil_W.d.ts +44 -0
  290. package/dist/{index-DtzPIcQp.d.ts → index-BdjH4aRG.d.ts} +1 -1
  291. package/dist/{index-CsmO1rDH.d.ts → index-BfM7zKRO.d.ts} +1 -1
  292. package/dist/index-Bmub8e38.d.cts +98 -0
  293. package/dist/{index-mv7KvWDq.d.ts → index-CA1Eo7DA.d.ts} +1 -1
  294. package/dist/index-CCa4tZuO.d.ts +184 -0
  295. package/dist/{index-ChiZg0yw.d.cts → index-CCboEuTO.d.cts} +1 -1
  296. package/dist/index-CESxqFso.d.cts +228 -0
  297. package/dist/{index-BbqT4BQv.d.cts → index-COXkY78t.d.cts} +1 -1
  298. package/dist/index-CboygwjO.d.ts +676 -0
  299. package/dist/index-CiWEYzXl.d.cts +184 -0
  300. package/dist/{index-jFQefHda.d.ts → index-Cw9oYJnq.d.ts} +1 -1
  301. package/dist/index-D5lw0cMx.d.ts +186 -0
  302. package/dist/{index-CAJq_8bO.d.cts → index-DZtnHhlr.d.cts} +1 -1
  303. package/dist/index-Dfwnna1j.d.ts +228 -0
  304. package/dist/index-Dt_C-I-2.d.cts +676 -0
  305. package/dist/index-OkKEOL6H.d.cts +44 -0
  306. package/dist/index-bjMvkcBF.d.ts +98 -0
  307. package/dist/{index-npqPeJ1g.d.cts → index-hAqp0oYb.d.cts} +1 -1
  308. package/dist/interceptors/index.cjs +3 -28
  309. package/dist/interceptors/index.d.cts +16 -4
  310. package/dist/interceptors/index.d.ts +16 -4
  311. package/dist/interceptors/index.js +3 -25
  312. package/dist/interceptors/types.cjs +1 -0
  313. package/dist/interceptors/types.d.cts +14 -0
  314. package/dist/interceptors/types.d.ts +14 -0
  315. package/dist/interceptors/types.js +3 -0
  316. package/dist/localStorageContext-BPZ82q-G.js +95 -0
  317. package/dist/localStorageContext-NRP-CdmF.cjs +115 -0
  318. package/dist/{logger-BqHq67zN.cjs → logger-TBIl4uIH.cjs} +1 -1
  319. package/dist/{logger-BMVdhQOV.js → logger-W3lqg-4b.js} +1 -1
  320. package/dist/models-D-4db7XW.cjs +1537 -0
  321. package/dist/models-c86hYW-F.js +1296 -0
  322. package/dist/{newOrgConfigAtom-CDttTiuu.cjs → newOrgConfigAtom-D6R-7HCk.cjs} +1 -1
  323. package/dist/newOrgConfigAtom-bn1lnljf.js +8 -0
  324. package/dist/newOrgConfigContext-BC79qoiV.d.ts +16 -0
  325. package/dist/newOrgConfigContext-BqZwD8-B.cjs +68 -0
  326. package/dist/newOrgConfigContext-DbcDClwd.js +53 -0
  327. package/dist/newOrgConfigContext-eS4ZLo58.d.cts +16 -0
  328. package/dist/nodeSelector-DybpVr-i.d.ts +31 -0
  329. package/dist/nodeSelector-vKB44CDB.d.cts +31 -0
  330. package/dist/org-CIhjzxWr.cjs +43 -0
  331. package/dist/org-CeWXnpwF.js +12 -0
  332. package/dist/search-6RrxBXD6.d.cts +20 -0
  333. package/dist/search-BBu5YeQa.js +126 -0
  334. package/dist/search-D23INSNg.cjs +205 -0
  335. package/dist/search-filter-types-BItKtezf.d.cts +102 -0
  336. package/dist/search-filter-types-fZf91Pdw.d.ts +102 -0
  337. package/dist/search-nuWWnRRV.d.ts +20 -0
  338. package/dist/searchContext-BPT44uk-.js +129 -0
  339. package/dist/searchContext-CwRRiXQ3.cjs +145 -0
  340. package/dist/searchServiceAdapter-DEv1tTn0.cjs +34 -0
  341. package/dist/searchServiceAdapter-WyCU55NV.js +16 -0
  342. package/dist/sessionStorageContext-1Ks_d4Z0.cjs +66 -0
  343. package/dist/sessionStorageContext-CDcl7NVl.js +52 -0
  344. package/dist/shopifyUrlContext-CejRZfj7.js +61 -0
  345. package/dist/shopifyUrlContext-lnHoAOEf.cjs +75 -0
  346. package/dist/spiffyWidgets-CdxRcXhW.d.ts +20 -0
  347. package/dist/spiffyWidgets-eNbU1gMc.d.cts +20 -0
  348. package/dist/systemSettingsContext-Ba-wi2NZ.cjs +60 -0
  349. package/dist/systemSettingsContext-DumUaV0m.js +39 -0
  350. package/dist/test-types-B3YQpECG.d.cts +13 -0
  351. package/dist/test-types-C8NHqaUS.d.ts +13 -0
  352. package/dist/types/index.cjs +48 -3
  353. package/dist/types/index.d.cts +18 -2
  354. package/dist/types/index.d.ts +18 -2
  355. package/dist/types/index.js +44 -2
  356. package/dist/types-BGqrvAsw.d.ts +10 -0
  357. package/dist/types-CKPddlfS.cjs +0 -0
  358. package/dist/types-CS0Hrzja.js +30 -0
  359. package/dist/types-CtUb63bt.js +76 -0
  360. package/dist/types-CxObxLKs.cjs +48 -0
  361. package/dist/types-DIiH_5gL.d.cts +10 -0
  362. package/dist/types-Dc6hx6ei.js +1 -0
  363. package/dist/types-UUvB6h05.cjs +106 -0
  364. package/dist/types-aQTzSrH1.d.cts +51 -0
  365. package/dist/types-kAjmR2du.d.ts +51 -0
  366. package/dist/types.cjs +0 -0
  367. package/dist/types.d.cts +16 -0
  368. package/dist/types.d.ts +16 -0
  369. package/dist/types.js +1 -0
  370. package/dist/urlsParser-COzMdJaX.cjs +78 -0
  371. package/dist/urlsParser-DxjoLj98.js +42 -0
  372. package/dist/useAmplitudeOperations-Cv0fi3uj.cjs +41 -0
  373. package/dist/useAmplitudeOperations-Ti6phPPq.js +34 -0
  374. package/dist/useAppDetails-CsXHPAh1.cjs +38 -0
  375. package/dist/useAppDetails-PUfYwCjK.js +30 -0
  376. package/dist/useDebounce-DZ8Cgiwc.cjs +26 -0
  377. package/dist/useDebounce-v9cezyjn.js +19 -0
  378. package/dist/useGraphQLConfig-BizpCw23.cjs +76 -0
  379. package/dist/useGraphQLConfig-DFWl9Z89.js +63 -0
  380. package/dist/{useIntersection-BkMkuJcZ.js → useIntersection-Cncgxdmy.js} +1 -1
  381. package/dist/{useIntersection-BcBCa890.cjs → useIntersection-m4PEpvG7.cjs} +1 -1
  382. package/dist/useMessageInterceptor-BjGP_uXm.js +25 -0
  383. package/dist/useMessageInterceptor-arAqUq1Q.cjs +33 -0
  384. package/dist/userIdentityContext-W1OWF3cG.d.ts +20 -0
  385. package/dist/userIdentityContext-kU1PIo8K.d.cts +20 -0
  386. package/dist/utilityTypes-B2KuRn37.js +1 -0
  387. package/dist/utilityTypes-BGbL2WTP.cjs +0 -0
  388. package/dist/{utils-Buo4KU5l.cjs → utils-2SWrJ12w.cjs} +1 -1
  389. package/dist/utils-BewguHW0.d.cts +22 -0
  390. package/dist/{utils-CiJLDPjY.cjs → utils-CDw74BCO.cjs} +1 -1
  391. package/dist/utils-CLGXsOwE.cjs +1591 -0
  392. package/dist/{utils-BRNaQkCK.js → utils-CqBxIpEV.js} +1 -1
  393. package/dist/{utils-B1LVzQYK.js → utils-DIvMgPe8.js} +1 -1
  394. package/dist/utils-D_kATUj6.js +92 -0
  395. package/dist/{utils-BitIIghf.d.ts → utils-DpneNSJf.d.ts} +1 -1
  396. package/dist/utils-hKYwSBo9.d.ts +22 -0
  397. package/dist/utils-hYTjy7hJ.cjs +130 -0
  398. package/dist/utils-jYtD3hmA.js +1385 -0
  399. package/dist/variantInfo-BfKlkaWU.js +11 -0
  400. package/dist/variantInfo-DpLn4nHz.cjs +17 -0
  401. package/package.json +36 -9
  402. package/src/application/commerce-api.ts +37 -40
  403. package/src/application/models/api/context.ts +4 -0
  404. package/src/application/models/api/generationParams.ts +4 -0
  405. package/src/application/models/api/nextMessageRequest.ts +11 -0
  406. package/src/application/models/api/orgAnalyticsConfig.ts +19 -0
  407. package/src/application/models/api/orgConfigResults.ts +44 -0
  408. package/src/application/models/api/organizationConfig.ts +12 -0
  409. package/src/{types/ApiResponse.ts → application/models/api/response.ts} +29 -35
  410. package/src/application/models/api/responseGenerics.ts +67 -0
  411. package/src/application/models/api/search.ts +26 -0
  412. package/src/application/models/api/suggestion.ts +4 -0
  413. package/src/application/models/api/supportedEventRequest.ts +8 -0
  414. package/src/application/models/api/userEvent.ts +101 -0
  415. package/src/application/models/cachedValue.ts +8 -0
  416. package/src/application/models/chatElementDisplayLocation.ts +22 -0
  417. package/src/application/models/clientDetails.ts +18 -0
  418. package/src/application/models/colorsConfig.ts +28 -0
  419. package/src/application/models/conversationalSearchIds.ts +5 -0
  420. package/src/application/models/dataLayer.ts +45 -0
  421. package/src/application/models/events.ts +5 -0
  422. package/src/application/models/featureGates.ts +21 -0
  423. package/src/application/models/frontendConfig.ts +14 -0
  424. package/src/application/models/googleAnalyticsEvents.ts +8 -0
  425. package/src/application/models/graphql/index.ts +0 -1
  426. package/src/application/models/graphql/queries/getMerchantColorsQuery.ts +23 -1
  427. package/src/application/models/graphql/queries/getMerchantFrontendConfigQuery.ts +89 -1
  428. package/src/application/models/guards/api/isApiFormResponse.ts +4 -4
  429. package/src/application/models/guards/api/isApiFormSubmittedResponseAttributes.ts +2 -2
  430. package/src/application/models/guards/api/isApiOrderResponseAttributes.ts +20 -2
  431. package/src/application/models/guards/api/isApiOrgConfigResults.ts +9 -3
  432. package/src/application/models/guards/api/isApiOrganizationConfig.ts +32 -8
  433. package/src/application/models/guards/api/isApiPDPEventAttributes.ts +5 -8
  434. package/src/application/models/guards/api/isApiPLPEventAttributes.ts +10 -14
  435. package/src/application/models/guards/api/isApiPageResponseAttributes.ts +1 -1
  436. package/src/application/models/guards/api/isApiProductResponseAttributes.ts +4 -2
  437. package/src/application/models/guards/api/isApiProductSearchAttributes.ts +6 -9
  438. package/src/application/models/guards/api/isApiProductSearchFilterAttributes.ts +4 -7
  439. package/src/application/models/guards/api/isApiQueryTypedEventAttributes.ts +3 -8
  440. package/src/application/models/guards/api/isApiResponse.ts +15 -22
  441. package/src/application/models/guards/api/isApiReviewResponseAttributes.ts +1 -1
  442. package/src/application/models/guards/api/isApiReviewRichInformation.ts +1 -1
  443. package/src/application/models/guards/api/isApiTextResponseAttributes.ts +1 -1
  444. package/src/application/models/guards/graphQL/isGraphQLColorsConfig.ts +1 -1
  445. package/src/application/models/guards/isBaseEcommerceEvent.ts +2 -1
  446. package/src/application/models/guards/isGA4EcommerceEvent.ts +1 -1
  447. package/src/application/models/guards/isLegacyUAEcommerceEvent.ts +1 -1
  448. package/src/application/models/guards/isMobilePLPChatPlacementParameter.ts +3 -1
  449. package/src/application/models/guards/isSpanxTakeAQuizCtaParameter.ts +3 -5
  450. package/src/application/models/guards/isVariantInfo.ts +1 -6
  451. package/src/application/models/index.ts +95 -30
  452. package/src/application/models/localStorageEventListener.ts +4 -0
  453. package/src/{types/Message.ts → application/models/message.ts} +34 -38
  454. package/src/application/models/mobilePLPChatPlacementParameter.ts +3 -0
  455. package/src/application/models/orgsEnum.ts +36 -0
  456. package/src/application/models/productExperiment.ts +5 -0
  457. package/src/application/models/spanxTakeAQuizCtaParameter.ts +4 -0
  458. package/src/application/models/spiffyWidgets.ts +16 -0
  459. package/src/application/models/utilityTypes/camelCase.ts +87 -0
  460. package/src/application/models/utilityTypes/camelCasedPropertiesDeep.ts +80 -0
  461. package/src/application/models/utilityTypes/delimiterCase.ts +121 -0
  462. package/src/application/models/utilityTypes/delimiterCasedPropertiesDeep.ts +98 -0
  463. package/src/application/models/utilityTypes/index.ts +1 -0
  464. package/src/application/models/utilityTypes/internal.ts +93 -0
  465. package/src/application/models/utilityTypes/primitive.ts +8 -0
  466. package/src/application/models/utilityTypes/snakeCasedPropertiesDeep.ts +49 -0
  467. package/src/application/models/utilityTypes/splitWords.ts +76 -0
  468. package/src/application/models/utilityTypes/trim.ts +28 -0
  469. package/src/application/models/utilityTypes/unknownArray.ts +25 -0
  470. package/src/application/models/utils/snakeToCamelTransformer.ts +8 -8
  471. package/src/application/models/validators/validateGraphQLColorsConfig.ts +2 -6
  472. package/src/application/models/validators/validateGraphQLFrontendConfig.ts +6 -6
  473. package/src/application/models/validators/validateMobilePLPChatPlacementParameter.ts +3 -5
  474. package/src/application/models/validators/validateOrgConfigResults.ts +5 -6
  475. package/src/application/models/validators/validateOrganizationConfig.ts +8 -11
  476. package/src/application/models/validators/validateResponse.ts +44 -66
  477. package/src/application/models/validators/validateSuggestion.ts +1 -1
  478. package/src/application/models/validators/validateUserEvent.ts +12 -23
  479. package/src/application/models/variantInfo/index.ts +1 -0
  480. package/src/application/models/variantInfo/pageVisitInfo.ts +6 -0
  481. package/src/application/models/variantInfo/plpInfo.ts +3 -0
  482. package/src/application/models/variantInfo/productInfo.ts +5 -0
  483. package/src/application/models/variantInfo/variantInfo.ts +29 -0
  484. package/src/application/utils/__tests__/divideArrays.test.ts +14 -0
  485. package/src/application/utils/analyticsUtils.ts +8 -1
  486. package/src/application/utils/cdnUtils.ts +11 -0
  487. package/src/application/utils/coreContextToApiContext.ts +1 -3
  488. package/src/application/utils/coreUserEventToApiUserEvent.ts +2 -2
  489. package/src/application/utils/elementObserver.ts +1 -1
  490. package/src/application/utils/imageFilter.ts +2 -5
  491. package/src/application/utils/index.ts +21 -20
  492. package/src/application/utils/messageFromFormSubmittedEvent.ts +1 -1
  493. package/src/application/utils/messageFromQueryEvent.ts +1 -1
  494. package/src/application/utils/messageFromResponse.ts +10 -14
  495. package/src/application/utils/messageFromSuggestionEvent.ts +4 -6
  496. package/src/application/utils/mouseEventTypes.ts +1 -1
  497. package/src/application/utils/nextMessageRequestToApiRequest.ts +1 -1
  498. package/src/application/utils/overrides.ts +49 -1
  499. package/src/application/utils/supportedEventRequestToApiRequest.ts +1 -3
  500. package/src/application/utils/urlsParser.ts +7 -1
  501. package/src/atoms/amplitude/amplitudeTrackEventAtom.ts +1 -1
  502. package/src/atoms/app/index.ts +25 -15
  503. package/src/atoms/app/variant.ts +1 -1
  504. package/src/atoms/chat/chatState.ts +4 -4
  505. package/src/atoms/chat/form.ts +1 -1
  506. package/src/atoms/chat/messageQueue.ts +50 -25
  507. package/src/atoms/chat/replies.ts +2 -1
  508. package/src/atoms/chat/suggestions.ts +29 -34
  509. package/src/atoms/envive/enviveConfig.ts +20 -14
  510. package/src/atoms/org/customerService.ts +8 -4
  511. package/src/atoms/org/graphqlConfig.ts +15 -7
  512. package/src/atoms/org/index.ts +6 -4
  513. package/src/atoms/org/newOrgConfigAtom.ts +2 -2
  514. package/src/atoms/org/orgAnalyticsConfig.ts +1 -1
  515. package/src/atoms/search/chatSearch.ts +317 -0
  516. package/src/atoms/search/index.ts +1 -0
  517. package/src/atoms/search/productFilters.ts +52 -72
  518. package/src/atoms/search/productSorter.ts +2 -2
  519. package/src/atoms/search/searchAPI.ts +60 -42
  520. package/src/atoms/search/searchServiceAdapter.ts +1 -1
  521. package/src/atoms/search/types.ts +55 -0
  522. package/src/config/divIds.ts +27 -0
  523. package/src/config/socialProofClasses.ts +17 -0
  524. package/src/contexts/amplitudeContext/amplitudeContext.tsx +57 -16
  525. package/src/contexts/cdnContext/cdnContext.tsx +6 -1
  526. package/src/contexts/chatContext/chatContext.tsx +509 -0
  527. package/src/contexts/chatContext/index.ts +1 -0
  528. package/src/contexts/enviveConfigContext/enviveConfigContext.tsx +26 -12
  529. package/src/contexts/enviveCssContext/enviveCssContext.tsx +12 -5
  530. package/src/contexts/featureFlagContext/featureFlagContext.tsx +48 -27
  531. package/src/contexts/featureFlagServiceContext/featureFlagServiceContext.tsx +3 -11
  532. package/src/contexts/graphqlContext/graphqlContext.tsx +95 -40
  533. package/src/contexts/localStorageContext/localStorageContext.tsx +60 -26
  534. package/src/contexts/newOrgConfigContext/newOrgConfigContext.tsx +22 -10
  535. package/src/contexts/searchContext/searchContext.tsx +49 -29
  536. package/src/contexts/sessionStorageContext/sessionStorageContext.tsx +33 -12
  537. package/src/contexts/shopifyUrlContext/shopifyUrlContext.tsx +37 -20
  538. package/src/contexts/systemSettingsContext/systemSettingsContext.tsx +21 -8
  539. package/src/contexts/types.ts +1067 -0
  540. package/src/contexts/userIdentityContext/userIdentityContext.tsx +77 -33
  541. package/src/events/event-types.ts +11 -0
  542. package/src/events/index.ts +5 -8
  543. package/src/events/registerAnalyticsListeners.ts +13 -10
  544. package/src/hooks/AmplitudeOperations/useAmplitudeOperations.ts +11 -6
  545. package/src/hooks/AppDetails/useAppDetails.ts +24 -10
  546. package/src/hooks/ChatToggle/useChatToggle.ts +19 -7
  547. package/src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.ts +4 -4
  548. package/src/hooks/CustomerSupportHandoff/useCustomerSupportHandoff.ts +1 -1
  549. package/src/hooks/ElementObserver/useElementObserver.ts +32 -14
  550. package/src/hooks/FloatingButtonVisibility/index.ts +1 -0
  551. package/src/hooks/FloatingButtonVisibility/useFloatingButtonVisibility.ts +99 -0
  552. package/src/hooks/GrabAndScroll/useGrabAndScroll.ts +124 -125
  553. package/src/hooks/GraphQLConfig/useGraphQLConfig.ts +7 -5
  554. package/src/hooks/ImageResolver/useImageResolver.ts +31 -24
  555. package/src/hooks/LastInteraction/index.ts +1 -0
  556. package/src/hooks/LastInteraction/useLastInteraction.ts +42 -0
  557. package/src/hooks/LocalStorageOperations/useLocalStorageOperations.ts +19 -12
  558. package/src/hooks/MessageFilter/useMessageFilter.ts +7 -1
  559. package/src/hooks/Search/useSearch.tsx +217 -87
  560. package/src/hooks/SearchOperations/useSearchOperations.ts +12 -8
  561. package/src/hooks/ShopifyUrlOperations/useShopifyUrlOperations.ts +14 -8
  562. package/src/hooks/SnapCalculator/useSnapCalculator.ts +2 -1
  563. package/src/hooks/TrackComponentVisibleEvent/useTrackComponentVisibleEvent.ts +11 -8
  564. package/src/hooks/UpdateAnalyticsProps/useUpdateAnalyticsProps.ts +25 -11
  565. package/src/hooks/utils.ts +29 -19
  566. package/src/interceptors/index.ts +2 -1
  567. package/src/interceptors/types.ts +6 -0
  568. package/src/interceptors/useMessageInterceptor.ts +6 -10
  569. package/src/merchants/domInsertion.ts +30 -0
  570. package/src/merchants/gridInsertion.ts +19 -0
  571. package/src/types/config-versions.ts +6 -0
  572. package/src/types/customerService.ts +31 -0
  573. package/src/types/custservice-types.ts +28 -0
  574. package/src/{exceptions → types/exceptions}/unsupportedProductExceptions.ts +2 -2
  575. package/src/types/floatingbuttonoverrides-types.ts +10 -0
  576. package/src/types/index.ts +5 -4
  577. package/src/types/search-filter-types.ts +111 -0
  578. package/src/types/suggestionBarV2-types.ts +4 -0
  579. package/src/types/test-types.ts +3 -0
  580. package/src/types.ts +11 -0
  581. package/dist/AmplitudeOperations-CXU93q_4.js +0 -34
  582. package/dist/AmplitudeOperations-_uIb5QED.cjs +0 -41
  583. package/dist/TrackComponentVisibleEvent-D-hN3owz.cjs +0 -60
  584. package/dist/TrackComponentVisibleEvent-D-pvNVOP.js +0 -53
  585. package/dist/amplitudeContext-DFXeRauX.js +0 -233
  586. package/dist/amplitudeContext-DrFGH7Q7.cjs +0 -249
  587. package/dist/amplitudeTrackEventAtom-D66l5oFp.js +0 -8
  588. package/dist/amplitudeTrackEventAtom-f22P2U0u.cjs +0 -15
  589. package/dist/api-D4HaU2Gf.js +0 -166
  590. package/dist/api-D4Xoibs9.cjs +0 -239
  591. package/dist/app-BT3g-mDp.js +0 -515
  592. package/dist/app-DxwdFQlv.cjs +0 -570
  593. package/dist/cdnContext-D-qi0lub.js +0 -38
  594. package/dist/cdnContext-DIVgBnsl.cjs +0 -53
  595. package/dist/chat-ZaY3KY-R.js +0 -226
  596. package/dist/chat-rhEjVfrd.cjs +0 -326
  597. package/dist/chatState-BbI93m6r.js +0 -33
  598. package/dist/chatState-DlJpHAsW.cjs +0 -119
  599. package/dist/dist-C38adNK1.js +0 -5923
  600. package/dist/dist-VxRI6eQv.cjs +0 -6019
  601. package/dist/domObserver-CVhsCSkS.js +0 -285
  602. package/dist/enviveConfig-CQ_8mT-g.cjs +0 -130
  603. package/dist/enviveConfig-Cwlp7-Qz.js +0 -62
  604. package/dist/enviveConfigContext-CIavPzcm.js +0 -47
  605. package/dist/enviveConfigContext-DHEs077z.cjs +0 -62
  606. package/dist/events-CgFGtanE.cjs +0 -69
  607. package/dist/events-WOOrnUAx.js +0 -63
  608. package/dist/exceptions/index.cjs +0 -4
  609. package/dist/exceptions/index.d.cts +0 -12
  610. package/dist/exceptions/index.d.ts +0 -12
  611. package/dist/exceptions/index.js +0 -3
  612. package/dist/exceptions-BjDgLzGi.cjs +0 -32
  613. package/dist/exceptions-CUGY31Ua.js +0 -20
  614. package/dist/featureFlagServiceContext-ClnlCJV5.d.cts +0 -24
  615. package/dist/featureFlagServiceContext-CyPGEe2d.d.ts +0 -24
  616. package/dist/featureFlagServiceContext-Dr8Cw23n.js +0 -46
  617. package/dist/featureFlagServiceContext-rxZhpdEj.cjs +0 -66
  618. package/dist/graphql-CvAHWmel.js +0 -46
  619. package/dist/graphql-JaGqsToc.cjs +0 -70
  620. package/dist/graphqlContext-B8wuRZcp.cjs +0 -111
  621. package/dist/graphqlContext-CpHMbKoX.js +0 -96
  622. package/dist/index-5li6ZMDu.d.ts +0 -11
  623. package/dist/index-BVZbvpx_.d.cts +0 -11
  624. package/dist/index-CMZcE7pk.d.cts +0 -224
  625. package/dist/index-CuihhoIF.d.ts +0 -42
  626. package/dist/index-bEjLKG_Q.d.ts +0 -224
  627. package/dist/index-qOBU4GEh.d.cts +0 -42
  628. package/dist/localStorageContext-BFwvuEcf.js +0 -90
  629. package/dist/localStorageContext-CWc5xJ6U.cjs +0 -104
  630. package/dist/models-Cw0QcbQv.js +0 -1118
  631. package/dist/models-Dl0_Ujgj.cjs +0 -1305
  632. package/dist/newOrgConfigAtom-C8h3w_Ji.js +0 -8
  633. package/dist/newOrgConfigContext-BdzDnzUM.js +0 -53
  634. package/dist/newOrgConfigContext-cWeJAT6E.cjs +0 -68
  635. package/dist/nodeSelector-BAKg1h_y.d.ts +0 -28
  636. package/dist/nodeSelector-BYEAyrsj.d.cts +0 -28
  637. package/dist/org-BNs_maoW.cjs +0 -111
  638. package/dist/org-CScQqL4k.js +0 -32
  639. package/dist/search-CsXXamht.js +0 -233
  640. package/dist/search-DHhDpeQU.cjs +0 -312
  641. package/dist/searchContext-B5ZNLtvd.js +0 -129
  642. package/dist/searchContext-SFvF_Y8J.cjs +0 -145
  643. package/dist/searchServiceAdapter-BkvDIhV8.js +0 -16
  644. package/dist/searchServiceAdapter-C4zzBUl0.cjs +0 -34
  645. package/dist/sessionStorageContext-BuWrJQwc.cjs +0 -66
  646. package/dist/sessionStorageContext-DvFHbk81.js +0 -52
  647. package/dist/shopifyUrlContext-COc1eDR_.cjs +0 -75
  648. package/dist/shopifyUrlContext-CToAt_98.js +0 -61
  649. package/dist/systemSettingsContext-D9iNGz5v.js +0 -39
  650. package/dist/systemSettingsContext-DdV7Yte8.cjs +0 -60
  651. package/dist/types-1iJ_FnQQ.cjs +0 -39
  652. package/dist/types-D5du68Vp.js +0 -27
  653. package/dist/urlsParser-Dax4iVNC.cjs +0 -78
  654. package/dist/urlsParser-NAp2LwWP.js +0 -42
  655. package/dist/useAppDetails-D3T6kJY_.cjs +0 -38
  656. package/dist/useAppDetails-xPVs6fW7.js +0 -30
  657. package/dist/useGraphQLConfig-B1DaVvFx.cjs +0 -76
  658. package/dist/useGraphQLConfig-BtPxjtxw.js +0 -63
  659. package/dist/utils-BZT_oZ3n.js +0 -92
  660. package/dist/utils-D3MjNkd3.cjs +0 -716
  661. package/dist/utils-DMwh3QbT.js +0 -607
  662. package/dist/utils-qtHPLFby.cjs +0 -130
  663. package/src/atoms/search/productRetrievalAPI.ts +0 -72
  664. package/src/atoms/search/productRetrievalAdapter.ts +0 -28
  665. package/src/exceptions/index.ts +0 -2
  666. package/src/global.d.ts +0 -8
  667. package/src/hooks/Search/useRecommendedProducts.ts +0 -50
  668. package/src/hooks/Search/useSearchInput.ts +0 -237
  669. package/src/types/FilterAttribute.ts +0 -35
  670. package/src/types/Suggestion.ts +0 -6
  671. package/src/util/colorVar.ts +0 -4
  672. package/src/util/configVersion.ts +0 -4
  673. package/src/util/domInsertion.ts +0 -17
  674. /package/dist/{featureFlagServiceContext-Csgo-MUv.cjs → AmplitudeOperations-DxQnurSG.cjs} +0 -0
  675. /package/dist/{featureFlagServiceContext-CISyb90N.js → AmplitudeOperations-ni7wVevx.js} +0 -0
  676. /package/src/{exceptions → types/exceptions}/sessionExceptions.ts +0 -0
@@ -0,0 +1,87 @@
1
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/camel-case.d.ts
2
+
3
+ import { SplitWords } from './splitWords';
4
+
5
+ /**
6
+ * CamelCase options.
7
+ *
8
+ * @see {@link CamelCase}
9
+ */
10
+ export type CamelCaseOptions = {
11
+ /**
12
+ * Whether to preserved consecutive uppercase letter.
13
+ *
14
+ * @default true
15
+ */
16
+ preserveConsecutiveUppercase?: boolean;
17
+ };
18
+
19
+ /**
20
+ * Convert an array of words to camel-case.
21
+ */
22
+ type CamelCaseFromArray<
23
+ Words extends string[],
24
+ Options extends CamelCaseOptions,
25
+ OutputString extends string = '',
26
+ > = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]]
27
+ ? Options['preserveConsecutiveUppercase'] extends true
28
+ ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}`
29
+ : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}`
30
+ : OutputString;
31
+
32
+ /**
33
+ * Convert a string literal to camel-case.
34
+ *
35
+ * This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
36
+ *
37
+ * By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
38
+ *
39
+ * @example
40
+ * ```
41
+ * import type {CamelCase} from 'type-fest';
42
+ *
43
+ * // Simple
44
+ *
45
+ * const someVariable: CamelCase<'foo-bar'> = 'fooBar';
46
+ *
47
+ * // Advanced
48
+ *
49
+ * type CamelCasedProperties<T> = {
50
+ * [K in keyof T as CamelCase<K>]: T[K]
51
+ * };
52
+ *
53
+ * interface RawOptions {
54
+ * 'dry-run': boolean;
55
+ * 'full_family_name': string;
56
+ * foo: number;
57
+ * BAR: string;
58
+ * QUZ_QUX: number;
59
+ * 'OTHER-FIELD': boolean;
60
+ * }
61
+ *
62
+ * const dbResult: CamelCasedProperties<RawOptions> = {
63
+ * dryRun: true,
64
+ * fullFamilyName: 'bar.js',
65
+ * foo: 123,
66
+ * bar: 'foo',
67
+ * quzQux: 6,
68
+ * otherField: false
69
+ * };
70
+ * ```
71
+ *
72
+ * @category Change case
73
+ * @category Template literal
74
+ */
75
+ export type CamelCase<
76
+ Type,
77
+ Options extends CamelCaseOptions = { preserveConsecutiveUppercase: true },
78
+ > = Type extends string
79
+ ? string extends Type
80
+ ? Type
81
+ : Uncapitalize<
82
+ CamelCaseFromArray<
83
+ SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>,
84
+ Options
85
+ >
86
+ >
87
+ : Type;
@@ -0,0 +1,80 @@
1
+ import { CamelCase, CamelCaseOptions } from './camelCase';
2
+ import { UnknownArray } from './unknownArray';
3
+
4
+ /**
5
+ * Convert object properties to camel case recursively.
6
+ *
7
+ * This can be useful when, for example, converting some API types from a different style.
8
+ *
9
+ * @see CamelCasedProperties
10
+ * @see CamelCase
11
+ *
12
+ * @example
13
+ * ```
14
+ * import type {CamelCasedPropertiesDeep} from 'type-fest';
15
+ *
16
+ * interface User {
17
+ * UserId: number;
18
+ * UserName: string;
19
+ * }
20
+ *
21
+ * interface UserWithFriends {
22
+ * UserInfo: User;
23
+ * UserFriends: User[];
24
+ * }
25
+ *
26
+ * const result: CamelCasedPropertiesDeep<UserWithFriends> = {
27
+ * userInfo: {
28
+ * userId: 1,
29
+ * userName: 'Tom',
30
+ * },
31
+ * userFriends: [
32
+ * {
33
+ * userId: 2,
34
+ * userName: 'Jerry',
35
+ * },
36
+ * {
37
+ * userId: 3,
38
+ * userName: 'Spike',
39
+ * },
40
+ * ],
41
+ * };
42
+ * ```
43
+ *
44
+ * @category Change case
45
+ * @category Template literal
46
+ * @category Object
47
+ */
48
+ export type CamelCasedPropertiesDeep<
49
+ Value,
50
+ Options extends CamelCaseOptions = { preserveConsecutiveUppercase: true },
51
+ > = Value extends Function
52
+ ? Value
53
+ : Value extends UnknownArray
54
+ ? CamelCasedPropertiesArrayDeep<Value>
55
+ : Value extends Set<infer U>
56
+ ? Set<CamelCasedPropertiesDeep<U, Options>>
57
+ : {
58
+ [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options>;
59
+ };
60
+
61
+ // This is a copy of DelimiterCasedPropertiesArrayDeep (see: delimiter-cased-properties-deep.d.ts).
62
+ // These types should be kept in sync.
63
+ type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends []
64
+ ? []
65
+ : // Tailing spread array
66
+ Value extends [infer U, ...infer V]
67
+ ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>]
68
+ : Value extends readonly [infer U, ...infer V]
69
+ ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>]
70
+ : // Leading spread array
71
+ Value extends readonly [...infer U, infer V]
72
+ ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>]
73
+ : Value extends readonly [...infer U, infer V]
74
+ ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>]
75
+ : // Array
76
+ Value extends Array<infer U>
77
+ ? Array<CamelCasedPropertiesDeep<U>>
78
+ : Value extends ReadonlyArray<infer U>
79
+ ? ReadonlyArray<CamelCasedPropertiesDeep<U>>
80
+ : never;
@@ -0,0 +1,121 @@
1
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/delimiter-case.d.ts
2
+
3
+ import type { UpperCaseCharacters, WordSeparators } from './internal';
4
+
5
+ // Transforms a string that is fully uppercase into a fully lowercase version. Needed to add support for SCREAMING_SNAKE_CASE, see https://github.com/sindresorhus/type-fest/issues/385
6
+ type UpperCaseToLowerCase<T extends string> = T extends Uppercase<T> ? Lowercase<T> : T;
7
+
8
+ // This implementation does not support SCREAMING_SNAKE_CASE, it is used internally by `SplitIncludingDelimiters`.
9
+ type SplitIncludingDelimiters_<Source extends string, Delimiter extends string> = Source extends ''
10
+ ? []
11
+ : Source extends `${infer FirstPart}${Delimiter}${infer SecondPart}`
12
+ ? Source extends `${FirstPart}${infer UsedDelimiter}${SecondPart}`
13
+ ? UsedDelimiter extends Delimiter
14
+ ? Source extends `${infer FirstPart}${UsedDelimiter}${infer SecondPart}`
15
+ ? [
16
+ ...SplitIncludingDelimiters<FirstPart, Delimiter>,
17
+ UsedDelimiter,
18
+ ...SplitIncludingDelimiters<SecondPart, Delimiter>,
19
+ ]
20
+ : never
21
+ : never
22
+ : never
23
+ : [Source];
24
+
25
+ /**
26
+ * Unlike a simpler split, this one includes the delimiter splitted on in the resulting array literal. This is to enable splitting on, for example, upper-case characters.
27
+ *
28
+ * @category Template literal
29
+ */
30
+ export type SplitIncludingDelimiters<
31
+ Source extends string,
32
+ Delimiter extends string,
33
+ > = SplitIncludingDelimiters_<UpperCaseToLowerCase<Source>, Delimiter>;
34
+
35
+ /**
36
+ *Format a specific part of the splitted string literal that `StringArrayToDelimiterCase<>` fuses together, ensuring desired casing.
37
+ *
38
+ *@see StringArrayToDelimiterCase
39
+ */
40
+ type StringPartToDelimiterCase<
41
+ StringPart extends string,
42
+ Start extends boolean,
43
+ UsedWordSeparators extends string,
44
+ UsedUpperCaseCharacters extends string,
45
+ Delimiter extends string,
46
+ > = StringPart extends UsedWordSeparators
47
+ ? Delimiter
48
+ : Start extends true
49
+ ? Lowercase<StringPart>
50
+ : StringPart extends UsedUpperCaseCharacters
51
+ ? `${Delimiter}${Lowercase<StringPart>}`
52
+ : StringPart;
53
+
54
+ /**
55
+ * Takes the result of a splitted string literal and recursively concatenates it together into the desired casing.
56
+ *
57
+ * It receives `UsedWordSeparators` and `UsedUpperCaseCharacters` as input to ensure it's fully encapsulated.
58
+ *
59
+ * @see SplitIncludingDelimiters
60
+ */
61
+ type StringArrayToDelimiterCase<
62
+ Parts extends readonly any[],
63
+ Start extends boolean,
64
+ UsedWordSeparators extends string,
65
+ UsedUpperCaseCharacters extends string,
66
+ Delimiter extends string,
67
+ > = Parts extends [`${infer FirstPart}`, ...infer RemainingParts]
68
+ ? `${StringPartToDelimiterCase<FirstPart, Start, UsedWordSeparators, UsedUpperCaseCharacters, Delimiter>}${StringArrayToDelimiterCase<RemainingParts, false, UsedWordSeparators, UsedUpperCaseCharacters, Delimiter>}`
69
+ : Parts extends [string]
70
+ ? string
71
+ : '';
72
+
73
+ /**
74
+ * Convert a string literal to a custom string delimiter casing.
75
+ *
76
+ * This can be useful when, for example, converting a camel-cased object property to an oddly cased one.
77
+ *
78
+ * @see KebabCase
79
+ * @see SnakeCase
80
+ *
81
+ * @example
82
+ * ```
83
+ * import type {DelimiterCase} from 'type-fest';
84
+ *
85
+ * // Simple
86
+ *
87
+ * const someVariable: DelimiterCase<'fooBar', '#'> = 'foo#bar';
88
+ *
89
+ * // Advanced
90
+ *
91
+ * type OddlyCasedProperties<T> = {
92
+ * [K in keyof T as DelimiterCase<K, '#'>]: T[K]
93
+ * };
94
+ *
95
+ * interface SomeOptions {
96
+ * dryRun: boolean;
97
+ * includeFile: string;
98
+ * foo: number;
99
+ * }
100
+ *
101
+ * const rawCliOptions: OddlyCasedProperties<SomeOptions> = {
102
+ * 'dry#run': true,
103
+ * 'include#file': 'bar.js',
104
+ * foo: 123
105
+ * };
106
+ * ```
107
+ *
108
+ * @category Change case
109
+ * @category Template literal
110
+ */
111
+ export type DelimiterCase<Value, Delimiter extends string> = string extends Value
112
+ ? Value
113
+ : Value extends string
114
+ ? StringArrayToDelimiterCase<
115
+ SplitIncludingDelimiters<Value, WordSeparators | UpperCaseCharacters>,
116
+ true,
117
+ WordSeparators,
118
+ UpperCaseCharacters,
119
+ Delimiter
120
+ >
121
+ : Value;
@@ -0,0 +1,98 @@
1
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/delimiter-cased-properties-deep.d.ts
2
+
3
+ import type { DelimiterCase } from './delimiterCase';
4
+ import type { NonRecursiveType } from './internal';
5
+ import type { UnknownArray } from './unknownArray';
6
+
7
+ /**
8
+ * Convert object properties to delimiter case recursively.
9
+ *
10
+ * This can be useful when, for example, converting some API types from a different style.
11
+ *
12
+ * @see DelimiterCase
13
+ * @see DelimiterCasedProperties
14
+ *
15
+ * @example
16
+ * ```
17
+ * import type {DelimiterCasedPropertiesDeep} from 'type-fest';
18
+ *
19
+ * interface User {
20
+ * userId: number;
21
+ * userName: string;
22
+ * }
23
+ *
24
+ * interface UserWithFriends {
25
+ * userInfo: User;
26
+ * userFriends: User[];
27
+ * }
28
+ *
29
+ * const result: DelimiterCasedPropertiesDeep<UserWithFriends, '-'> = {
30
+ * 'user-info': {
31
+ * 'user-id': 1,
32
+ * 'user-name': 'Tom',
33
+ * },
34
+ * 'user-friends': [
35
+ * {
36
+ * 'user-id': 2,
37
+ * 'user-name': 'Jerry',
38
+ * },
39
+ * {
40
+ * 'user-id': 3,
41
+ * 'user-name': 'Spike',
42
+ * },
43
+ * ],
44
+ * };
45
+ * ```
46
+ *
47
+ * @category Change case
48
+ * @category Template literal
49
+ * @category Object
50
+ */
51
+ export type DelimiterCasedPropertiesDeep<
52
+ Value,
53
+ Delimiter extends string,
54
+ > = Value extends NonRecursiveType
55
+ ? Value
56
+ : Value extends UnknownArray
57
+ ? DelimiterCasedPropertiesArrayDeep<Value, Delimiter>
58
+ : Value extends Set<infer U>
59
+ ? Set<DelimiterCasedPropertiesDeep<U, Delimiter>>
60
+ : {
61
+ [K in keyof Value as DelimiterCase<K, Delimiter>]: DelimiterCasedPropertiesDeep<
62
+ Value[K],
63
+ Delimiter
64
+ >;
65
+ };
66
+
67
+ // This is a copy of CamelCasedPropertiesArrayDeep (see: camel-cased-properties-deep.d.ts).
68
+ // These types should be kept in sync.
69
+ type DelimiterCasedPropertiesArrayDeep<
70
+ Value extends UnknownArray,
71
+ Delimiter extends string,
72
+ > = Value extends []
73
+ ? []
74
+ : // Tailing spread array
75
+ Value extends [infer U, ...infer V]
76
+ ? [DelimiterCasedPropertiesDeep<U, Delimiter>, ...DelimiterCasedPropertiesDeep<V, Delimiter>]
77
+ : Value extends readonly [infer U, ...infer V]
78
+ ? readonly [
79
+ DelimiterCasedPropertiesDeep<U, Delimiter>,
80
+ ...DelimiterCasedPropertiesDeep<V, Delimiter>,
81
+ ]
82
+ : // Leading spread array
83
+ Value extends readonly [...infer U, infer V]
84
+ ? [
85
+ ...DelimiterCasedPropertiesDeep<U, Delimiter>,
86
+ DelimiterCasedPropertiesDeep<V, Delimiter>,
87
+ ]
88
+ : Value extends readonly [...infer U, infer V]
89
+ ? readonly [
90
+ ...DelimiterCasedPropertiesDeep<U, Delimiter>,
91
+ DelimiterCasedPropertiesDeep<V, Delimiter>,
92
+ ]
93
+ : // Array
94
+ Value extends Array<infer U>
95
+ ? Array<DelimiterCasedPropertiesDeep<U, Delimiter>>
96
+ : Value extends ReadonlyArray<infer U>
97
+ ? ReadonlyArray<DelimiterCasedPropertiesDeep<U, Delimiter>>
98
+ : never;
@@ -0,0 +1 @@
1
+ export * from './camelCasedPropertiesDeep';
@@ -0,0 +1,93 @@
1
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/internal.d.ts
2
+
3
+ import { Primitive } from './primitive';
4
+ import { Trim } from './trim';
5
+
6
+ /**
7
+ * Matches any primitive, `void`, `Date`, or `RegExp` value.
8
+ */
9
+ export type BuiltIns = Primitive | void | Date | RegExp;
10
+
11
+ /**
12
+ * Matches non-recursive types.
13
+ */
14
+ export type NonRecursiveType = BuiltIns | Function | (new (...arguments_: any[]) => unknown);
15
+
16
+ /**
17
+ * Returns a boolean for whether the string is numeric.
18
+ *
19
+ * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
20
+ */
21
+ export type IsNumeric<T extends string> = T extends `${number}`
22
+ ? Trim<T> extends T
23
+ ? true
24
+ : false
25
+ : false;
26
+
27
+ /**
28
+ * Returns a boolean for whether the string is lowercased.
29
+ */
30
+ export type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
31
+
32
+ /**
33
+ * Returns a boolean for whether the string is upper-cased.
34
+ */
35
+ export type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
36
+
37
+ export type WordSeparators = '-' | '_' | Whitespace;
38
+
39
+ export type Whitespace =
40
+ | '\u{9}' // '\t'
41
+ | '\u{A}' // '\n'
42
+ | '\u{B}' // '\v'
43
+ | '\u{C}' // '\f'
44
+ | '\u{D}' // '\r'
45
+ | '\u{20}' // ' '
46
+ | '\u{85}'
47
+ | '\u{A0}'
48
+ | '\u{1680}'
49
+ | '\u{2000}'
50
+ | '\u{2001}'
51
+ | '\u{2002}'
52
+ | '\u{2003}'
53
+ | '\u{2004}'
54
+ | '\u{2005}'
55
+ | '\u{2006}'
56
+ | '\u{2007}'
57
+ | '\u{2008}'
58
+ | '\u{2009}'
59
+ | '\u{200A}'
60
+ | '\u{2028}'
61
+ | '\u{2029}'
62
+ | '\u{202F}'
63
+ | '\u{205F}'
64
+ | '\u{3000}'
65
+ | '\u{FEFF}';
66
+
67
+ export type UpperCaseCharacters =
68
+ | 'A'
69
+ | 'B'
70
+ | 'C'
71
+ | 'D'
72
+ | 'E'
73
+ | 'F'
74
+ | 'G'
75
+ | 'H'
76
+ | 'I'
77
+ | 'J'
78
+ | 'K'
79
+ | 'L'
80
+ | 'M'
81
+ | 'N'
82
+ | 'O'
83
+ | 'P'
84
+ | 'Q'
85
+ | 'R'
86
+ | 'S'
87
+ | 'T'
88
+ | 'U'
89
+ | 'V'
90
+ | 'W'
91
+ | 'X'
92
+ | 'Y'
93
+ | 'Z';
@@ -0,0 +1,8 @@
1
+ // this type comes from https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts
2
+
3
+ /**
4
+ * Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
5
+ *
6
+ * @category Type
7
+ */
8
+ export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
@@ -0,0 +1,49 @@
1
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/snake-cased-properties-deep.d.ts
2
+
3
+ import type { DelimiterCasedPropertiesDeep } from './delimiterCasedPropertiesDeep';
4
+
5
+ /**
6
+ * Convert object properties to snake case recursively.
7
+ *
8
+ * This can be useful when, for example, converting some API types from a different style.
9
+ *
10
+ * @see SnakeCase
11
+ * @see SnakeCasedProperties
12
+ *
13
+ * @example
14
+ * ```
15
+ * import type {SnakeCasedPropertiesDeep} from 'type-fest';
16
+ *
17
+ * interface User {
18
+ * userId: number;
19
+ * userName: string;
20
+ * }
21
+ *
22
+ * interface UserWithFriends {
23
+ * userInfo: User;
24
+ * userFriends: User[];
25
+ * }
26
+ *
27
+ * const result: SnakeCasedPropertiesDeep<UserWithFriends> = {
28
+ * user_info: {
29
+ * user_id: 1,
30
+ * user_name: 'Tom',
31
+ * },
32
+ * user_friends: [
33
+ * {
34
+ * user_id: 2,
35
+ * user_name: 'Jerry',
36
+ * },
37
+ * {
38
+ * user_id: 3,
39
+ * user_name: 'Spike',
40
+ * },
41
+ * ],
42
+ * };
43
+ * ```
44
+ *
45
+ * @category Change case
46
+ * @category Template literal
47
+ * @category Object
48
+ */
49
+ export type SnakeCasedPropertiesDeep<Value> = DelimiterCasedPropertiesDeep<Value, '_'>;
@@ -0,0 +1,76 @@
1
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/split-words.d.ts
2
+
3
+ import type { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from './internal';
4
+
5
+ type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
6
+
7
+ type RemoveLastCharacter<
8
+ Sentence extends string,
9
+ Character extends string,
10
+ > = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
11
+
12
+ /**
13
+ * Split a string (almost) like Lodash's `_.words()` function.
14
+ *
15
+ * - Split on each word that begins with a capital letter.
16
+ * - Split on each {@link WordSeparators}.
17
+ * - Split on numeric sequence.
18
+ *
19
+ * @example
20
+ * ```
21
+ * type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
22
+ * type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
23
+ * type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
24
+ * type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
25
+ * type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
26
+ * ```
27
+ *
28
+ * @internal
29
+ * @category Change case
30
+ * @category Template literal
31
+ */
32
+ export type SplitWords<
33
+ Sentence extends string,
34
+ LastCharacter extends string = '',
35
+ CurrentWord extends string = '',
36
+ > = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}`
37
+ ? FirstCharacter extends WordSeparators
38
+ ? // Skip word separator
39
+ [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>]
40
+ : LastCharacter extends ''
41
+ ? // Fist char of word
42
+ SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>
43
+ : // Case change: non-numeric to numeric, push word
44
+ [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
45
+ ? [
46
+ ...SkipEmptyWord<CurrentWord>,
47
+ ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
48
+ ]
49
+ : // Case change: numeric to non-numeric, push word
50
+ [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
51
+ ? [
52
+ ...SkipEmptyWord<CurrentWord>,
53
+ ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
54
+ ]
55
+ : // No case change: concat word
56
+ [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
57
+ ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`>
58
+ : // Case change: lower to upper, push word
59
+ [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>]
60
+ ? [
61
+ ...SkipEmptyWord<CurrentWord>,
62
+ ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
63
+ ]
64
+ : // Case change: upper to lower, brings back the last character, push word
65
+ [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>]
66
+ ? [
67
+ ...RemoveLastCharacter<CurrentWord, LastCharacter>,
68
+ ...SplitWords<
69
+ RemainingCharacters,
70
+ FirstCharacter,
71
+ `${LastCharacter}${FirstCharacter}`
72
+ >,
73
+ ]
74
+ : // No case change: concat word
75
+ SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`>
76
+ : [...SkipEmptyWord<CurrentWord>];
@@ -0,0 +1,28 @@
1
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/trim.d.ts
2
+
3
+ import type { Whitespace } from './internal';
4
+
5
+ /**
6
+ * Remove spaces from the left side.
7
+ */
8
+ type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
9
+
10
+ /**
11
+ * Remove spaces from the right side.
12
+ */
13
+ type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
14
+
15
+ /**
16
+ * Remove leading and trailing spaces from a string.
17
+ * @example
18
+ * ```
19
+ * import type {Trim} from 'type-fest';
20
+ *
21
+ * Trim<' foo '>
22
+ * //=> 'foo'
23
+ * ```
24
+ *
25
+ * @category String
26
+ * @category Template literal
27
+ */
28
+ export type Trim<V extends string> = TrimLeft<TrimRight<V>>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Represents an array with `unknown` value.
3
+ *
4
+ * Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
5
+ *
6
+ * @example
7
+ * ```
8
+ * import type {UnknownArray} from 'type-fest';
9
+ *
10
+ * type IsArray<T> = T extends UnknownArray ? true : false;
11
+ *
12
+ * type A = IsArray<['foo']>;
13
+ * //=> true
14
+ *
15
+ * type B = IsArray<readonly number[]>;
16
+ * //=> true
17
+ *
18
+ * type C = IsArray<string>;
19
+ * //=> false
20
+ * ```
21
+ *
22
+ * @category Type
23
+ * @category Array
24
+ */
25
+ export type UnknownArray = readonly unknown[];