@envive-ai/react-widgets-v3 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/dist/CXIntegration/hooks/useUnifiedCXButton.cjs +23 -0
  2. package/dist/CXIntegration/hooks/useUnifiedCXButton.js +22 -0
  3. package/dist/CXIntegration/implementations/useDefaultUnifiedCXButton.cjs +11 -0
  4. package/dist/CXIntegration/implementations/useDefaultUnifiedCXButton.js +10 -0
  5. package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.cjs +20 -0
  6. package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.js +19 -0
  7. package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.cjs +53 -0
  8. package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.js +52 -0
  9. package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.cjs +45 -0
  10. package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.js +44 -0
  11. package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.cjs +70 -0
  12. package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.js +69 -0
  13. package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.cjs +59 -0
  14. package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.js +58 -0
  15. package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.cjs +65 -0
  16. package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.js +64 -0
  17. package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.cjs +53 -0
  18. package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.js +52 -0
  19. package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.cjs +18 -0
  20. package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.js +17 -0
  21. package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.cjs +54 -0
  22. package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.js +53 -0
  23. package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.cjs +18 -0
  24. package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.js +17 -0
  25. package/dist/CXIntegration/types.cjs +19 -0
  26. package/dist/CXIntegration/types.js +18 -0
  27. package/dist/CXIntegration/utils/functions.cjs +30 -0
  28. package/dist/CXIntegration/utils/functions.js +30 -0
  29. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  30. package/dist/hocs/withBaseWidget/index.cjs +3 -0
  31. package/dist/hocs/withBaseWidget/index.d.cts +3 -0
  32. package/dist/hocs/withBaseWidget/index.d.ts +3 -0
  33. package/dist/hocs/withBaseWidget/index.js +3 -0
  34. package/dist/hocs/withBaseWidget/types.d.cts +37 -0
  35. package/dist/hocs/withBaseWidget/types.d.ts +39 -0
  36. package/dist/hocs/withBaseWidget/withBaseWidget.cjs +101 -0
  37. package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +10 -0
  38. package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +10 -0
  39. package/dist/hocs/withBaseWidget/withBaseWidget.js +100 -0
  40. package/dist/hooks/dist/application/models/api/orgConfigResults.d.ts +1 -0
  41. package/dist/hooks/dist/application/models/frontendConfig.d.ts +1 -0
  42. package/dist/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +2 -0
  43. package/dist/hooks/dist/contexts/amplitudeContext/index.d.ts +2 -0
  44. package/dist/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +2 -0
  45. package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +8 -0
  46. package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +11 -0
  47. package/dist/hooks/dist/contexts/hardcopyContext/index.d.ts +1 -0
  48. package/dist/hooks/dist/contexts/types.d.cts +44 -0
  49. package/dist/hooks/dist/contexts/types.d.ts +47 -0
  50. package/dist/hooks/dist/contexts/typesV3.d.cts +201 -0
  51. package/dist/hooks/dist/contexts/typesV3.d.ts +201 -0
  52. package/dist/hooks/dist/services/amplitudeService/amplitudeService.d.cts +36 -0
  53. package/dist/hooks/dist/services/amplitudeService/amplitudeService.d.ts +37 -0
  54. package/dist/hooks/dist/types/customerService.d.cts +18 -0
  55. package/dist/hooks/dist/types/customerService.d.ts +18 -0
  56. package/dist/stories/SalesAgentTest/index.cjs +0 -0
  57. package/dist/stories/SalesAgentTest/index.d.cts +1 -0
  58. package/dist/stories/SalesAgentTest/index.d.ts +1 -0
  59. package/dist/stories/SalesAgentTest/index.js +0 -0
  60. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +98 -0
  61. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +19 -0
  62. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +19 -0
  63. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +96 -0
  64. package/dist/widgets/ChatPreviewComparisonWidget/index.cjs +4 -0
  65. package/dist/widgets/ChatPreviewComparisonWidget/index.d.cts +2 -0
  66. package/dist/widgets/ChatPreviewComparisonWidget/index.d.ts +2 -0
  67. package/dist/widgets/ChatPreviewComparisonWidget/index.js +3 -0
  68. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs +44 -0
  69. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +16 -0
  70. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +16 -0
  71. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js +42 -0
  72. package/dist/widgets/ChatPreviewLoadingWidget/index.cjs +4 -0
  73. package/dist/widgets/ChatPreviewLoadingWidget/index.d.cts +2 -0
  74. package/dist/widgets/ChatPreviewLoadingWidget/index.d.ts +2 -0
  75. package/dist/widgets/ChatPreviewLoadingWidget/index.js +3 -0
  76. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +86 -0
  77. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +19 -0
  78. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +19 -0
  79. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +84 -0
  80. package/dist/widgets/ChatPreviewWidget/index.cjs +4 -0
  81. package/dist/widgets/ChatPreviewWidget/index.d.cts +2 -0
  82. package/dist/widgets/ChatPreviewWidget/index.d.ts +2 -0
  83. package/dist/widgets/ChatPreviewWidget/index.js +3 -0
  84. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +66 -0
  85. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +64 -0
  86. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +70 -0
  87. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +10 -0
  88. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +10 -0
  89. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +69 -0
  90. package/dist/widgets/FloatingChatWidget/constants.cjs +6 -0
  91. package/dist/widgets/FloatingChatWidget/constants.d.cts +4 -0
  92. package/dist/widgets/FloatingChatWidget/constants.d.ts +4 -0
  93. package/dist/widgets/FloatingChatWidget/constants.js +5 -0
  94. package/dist/widgets/FloatingChatWidget/index.cjs +5 -0
  95. package/dist/widgets/FloatingChatWidget/index.d.cts +3 -0
  96. package/dist/widgets/FloatingChatWidget/index.d.ts +3 -0
  97. package/dist/widgets/FloatingChatWidget/index.js +4 -0
  98. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +60 -0
  99. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +19 -0
  100. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +19 -0
  101. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +58 -0
  102. package/dist/widgets/PromptButtonCarouselWithImageWidget/index.cjs +4 -0
  103. package/dist/widgets/PromptButtonCarouselWithImageWidget/index.d.cts +2 -0
  104. package/dist/widgets/PromptButtonCarouselWithImageWidget/index.d.ts +2 -0
  105. package/dist/widgets/PromptButtonCarouselWithImageWidget/index.js +3 -0
  106. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +64 -0
  107. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +14 -0
  108. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +14 -0
  109. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +63 -0
  110. package/dist/widgets/PromptCarouselWidget/index.cjs +3 -0
  111. package/dist/widgets/PromptCarouselWidget/index.d.cts +2 -0
  112. package/dist/widgets/PromptCarouselWidget/index.d.ts +2 -0
  113. package/dist/widgets/PromptCarouselWidget/index.js +3 -0
  114. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.cjs +35 -0
  115. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +14 -0
  116. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +14 -0
  117. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +34 -0
  118. package/dist/widgets/SocialProofFlowWidget/index.cjs +3 -0
  119. package/dist/widgets/SocialProofFlowWidget/index.d.cts +2 -0
  120. package/dist/widgets/SocialProofFlowWidget/index.d.ts +2 -0
  121. package/dist/widgets/SocialProofFlowWidget/index.js +3 -0
  122. package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +118 -0
  123. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +19 -0
  124. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +19 -0
  125. package/dist/widgets/SocialProofWidget/SocialProofWidget.js +116 -0
  126. package/dist/widgets/SocialProofWidget/index.cjs +4 -0
  127. package/dist/widgets/SocialProofWidget/index.d.cts +2 -0
  128. package/dist/widgets/SocialProofWidget/index.d.ts +2 -0
  129. package/dist/widgets/SocialProofWidget/index.js +3 -0
  130. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +67 -0
  131. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +14 -0
  132. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +14 -0
  133. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +66 -0
  134. package/dist/widgets/TitledPromptCarouselWidget/index.cjs +3 -0
  135. package/dist/widgets/TitledPromptCarouselWidget/index.d.cts +2 -0
  136. package/dist/widgets/TitledPromptCarouselWidget/index.d.ts +2 -0
  137. package/dist/widgets/TitledPromptCarouselWidget/index.js +3 -0
  138. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.cjs +35 -0
  139. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +14 -0
  140. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +14 -0
  141. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +34 -0
  142. package/dist/widgets/TypingAnimationFlowWidget/index.cjs +3 -0
  143. package/dist/widgets/TypingAnimationFlowWidget/index.d.cts +2 -0
  144. package/dist/widgets/TypingAnimationFlowWidget/index.d.ts +2 -0
  145. package/dist/widgets/TypingAnimationFlowWidget/index.js +3 -0
  146. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +90 -0
  147. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +19 -0
  148. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +19 -0
  149. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +88 -0
  150. package/dist/widgets/TypingAnimationWidget/index.cjs +4 -0
  151. package/dist/widgets/TypingAnimationWidget/index.d.cts +2 -0
  152. package/dist/widgets/TypingAnimationWidget/index.d.ts +2 -0
  153. package/dist/widgets/TypingAnimationWidget/index.js +3 -0
  154. package/dist/widgets/dist/SearchResults/SearchResults.d.cts +15 -0
  155. package/dist/widgets/dist/SearchResults/SearchResults.d.ts +15 -0
  156. package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +9 -0
  157. package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.ts +9 -0
  158. package/dist/widgets/dist/SearchResults/index.d.ts +2 -0
  159. package/dist/widgets/dist/SearchResults/types.d.cts +20 -0
  160. package/dist/widgets/dist/SearchResults/types.d.ts +20 -0
  161. package/dist/widgets/dist/SearchZeroState/SearchZeroState.d.cts +10 -0
  162. package/dist/widgets/dist/SearchZeroState/SearchZeroState.d.ts +10 -0
  163. package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +18 -0
  164. package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +18 -0
  165. package/dist/widgets/dist/SearchZeroState/index.d.ts +4 -0
  166. package/dist/widgets/dist/SearchZeroState/types.d.cts +13 -0
  167. package/dist/widgets/dist/SearchZeroState/types.d.ts +13 -0
  168. package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +36 -0
  169. package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.ts +36 -0
  170. package/dist/widgets/dist/SuggestionBar/index.d.ts +2 -0
  171. package/dist/widgets/dist/SuggestionBar/types.d.cts +9 -0
  172. package/dist/widgets/dist/SuggestionBar/types.d.ts +9 -0
  173. package/dist/widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.cts +9 -0
  174. package/dist/widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +9 -0
  175. package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +20 -0
  176. package/dist/widgets/dist/SuggestionButtonContainer/types.d.ts +20 -0
  177. package/dist/widgets/dist/config/BaseWidgetConfig.d.cts +13 -0
  178. package/dist/widgets/dist/config/BaseWidgetConfig.d.ts +13 -0
  179. package/dist/widgets/dist/config/WidgetType.d.cts +23 -0
  180. package/dist/widgets/dist/config/WidgetType.d.ts +23 -0
  181. package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.cts +14 -0
  182. package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +14 -0
  183. package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.cts +15 -0
  184. package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +15 -0
  185. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts +73 -0
  186. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +73 -0
  187. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +61 -0
  188. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +61 -0
  189. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.cts +25 -0
  190. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +25 -0
  191. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.cts +35 -0
  192. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +35 -0
  193. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.cts +32 -0
  194. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +32 -0
  195. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +32 -0
  196. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +32 -0
  197. package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +14 -0
  198. package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +15 -0
  199. package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +61 -0
  200. package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.ts +61 -0
  201. package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +60 -0
  202. package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +60 -0
  203. package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +11 -0
  204. package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +11 -0
  205. package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +28 -0
  206. package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +28 -0
  207. package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +10 -0
  208. package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.ts +10 -0
  209. package/dist/widgets/hooks/useGetWidgetStatus.cjs +27 -0
  210. package/dist/widgets/hooks/useGetWidgetStatus.js +26 -0
  211. package/dist/widgets/utils/functions.cjs +55 -0
  212. package/dist/widgets/utils/functions.js +48 -0
  213. package/dist/widgets-v2/SearchResults/index.cjs +5 -0
  214. package/dist/widgets-v2/SearchResults/index.d.cts +3 -0
  215. package/dist/widgets-v2/SearchResults/index.d.ts +4 -0
  216. package/dist/widgets-v2/SearchResults/index.js +3 -0
  217. package/dist/widgets-v2/SearchZeroState/index.cjs +8 -0
  218. package/dist/widgets-v2/SearchZeroState/index.d.cts +5 -0
  219. package/dist/widgets-v2/SearchZeroState/index.d.ts +6 -0
  220. package/dist/widgets-v2/SearchZeroState/index.js +3 -0
  221. package/dist/widgets-v2/SuggestionBar/index.cjs +5 -0
  222. package/dist/widgets-v2/SuggestionBar/index.d.cts +3 -0
  223. package/dist/widgets-v2/SuggestionBar/index.d.ts +4 -0
  224. package/dist/widgets-v2/SuggestionBar/index.js +3 -0
  225. package/dist/widgets-v2/SuggestionButtonContainer/index.cjs +5 -0
  226. package/dist/widgets-v2/SuggestionButtonContainer/index.d.cts +3 -0
  227. package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +3 -0
  228. package/dist/widgets-v2/SuggestionButtonContainer/index.js +3 -0
  229. package/package.json +158 -0
  230. package/src/CXIntegration/hooks/useUnifiedCXButton.ts +38 -0
  231. package/src/CXIntegration/implementations/useDefaultUnifiedCXButton.ts +8 -0
  232. package/src/CXIntegration/implementations/useGladlyUnifiedCXButton.ts +28 -0
  233. package/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.ts +67 -0
  234. package/src/CXIntegration/implementations/useGrooveUnifiedCXButton.ts +83 -0
  235. package/src/CXIntegration/implementations/useKustomerUnifiedCXButton.ts +120 -0
  236. package/src/CXIntegration/implementations/useReDoUnifiedCXButton.ts +80 -0
  237. package/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.ts +83 -0
  238. package/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts +78 -0
  239. package/src/CXIntegration/implementations/useTidioUnifiedCXButton.ts +34 -0
  240. package/src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts +69 -0
  241. package/src/CXIntegration/implementations/useZowieUnifiedCXButton.ts +34 -0
  242. package/src/CXIntegration/types.ts +24 -0
  243. package/src/CXIntegration/utils/functions.ts +50 -0
  244. package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +689 -0
  245. package/src/hocs/withBaseWidget/index.ts +2 -0
  246. package/src/hocs/withBaseWidget/types.ts +39 -0
  247. package/src/hocs/withBaseWidget/withBaseWidget.tsx +126 -0
  248. package/src/stories/FloatingChatWidget.stories.tsx +56 -0
  249. package/src/stories/PromptButtonCarouselWithImageWidget.stories.tsx +54 -0
  250. package/src/stories/PromptCarouselWidget.stories.tsx +54 -0
  251. package/src/stories/SalesAgentTest/SalesAgentTest.stories.tsx +18 -0
  252. package/src/stories/SalesAgentTest/SalesAgentTest.tsx +111 -0
  253. package/src/stories/SalesAgentTest/index.ts +0 -0
  254. package/src/stories/SearchResults.stories.tsx +29 -0
  255. package/src/stories/SearchZeroState.stories.tsx +52 -0
  256. package/src/stories/SocialProofFlowWidget.stories.tsx +77 -0
  257. package/src/stories/SuggestionBar.stories.tsx +45 -0
  258. package/src/stories/TitledPromptCarouselWidget.stories.tsx +71 -0
  259. package/src/stories/TypingAnimationFlowWidget.stories.tsx +67 -0
  260. package/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx +152 -0
  261. package/src/widgets/ChatPreviewComparisonWidget/index.ts +7 -0
  262. package/src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.tsx +82 -0
  263. package/src/widgets/ChatPreviewLoadingWidget/index.ts +7 -0
  264. package/src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx +119 -0
  265. package/src/widgets/ChatPreviewWidget/index.ts +4 -0
  266. package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +115 -0
  267. package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +110 -0
  268. package/src/widgets/FloatingChatWidget/constants.ts +1 -0
  269. package/src/widgets/FloatingChatWidget/index.ts +5 -0
  270. package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +87 -0
  271. package/src/widgets/PromptButtonCarouselWithImageWidget/index.ts +6 -0
  272. package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +83 -0
  273. package/src/widgets/PromptCarouselWidget/index.ts +2 -0
  274. package/src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.tsx +61 -0
  275. package/src/widgets/SocialProofFlowWidget/index.ts +4 -0
  276. package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +160 -0
  277. package/src/widgets/SocialProofWidget/index.ts +2 -0
  278. package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +93 -0
  279. package/src/widgets/TitledPromptCarouselWidget/index.ts +2 -0
  280. package/src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.tsx +61 -0
  281. package/src/widgets/TypingAnimationFlowWidget/index.ts +4 -0
  282. package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +115 -0
  283. package/src/widgets/TypingAnimationWidget/index.ts +2 -0
  284. package/src/widgets/hooks/useGetWidgetStatus.tsx +29 -0
  285. package/src/widgets/utils/functions.ts +104 -0
  286. package/src/widgets-v2/SearchResults/index.ts +3 -0
  287. package/src/widgets-v2/SearchZeroState/index.ts +15 -0
  288. package/src/widgets-v2/SuggestionBar/index.ts +6 -0
  289. package/src/widgets-v2/SuggestionButtonContainer/index.ts +6 -0
@@ -0,0 +1,73 @@
1
+ import { SplitWords } from "./splitWords.cjs";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/camelCase.d.ts
6
+ //#region src/application/models/utilityTypes/camelCase.d.ts
7
+ /**
8
+ * CamelCase options.
9
+ *
10
+ * @see {@link CamelCase}
11
+ */
12
+ type CamelCaseOptions = {
13
+ /**
14
+ * Whether to preserved consecutive uppercase letter.
15
+ *
16
+ * @default true
17
+ */
18
+ preserveConsecutiveUppercase?: boolean;
19
+ };
20
+ /**
21
+ * Convert an array of words to camel-case.
22
+ */
23
+ type CamelCaseFromArray<Words extends string[], Options extends CamelCaseOptions, OutputString extends string = ''> = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]] ? Options['preserveConsecutiveUppercase'] extends true ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}` : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}` : OutputString;
24
+ /**
25
+ * Convert a string literal to camel-case.
26
+ *
27
+ * This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
28
+ *
29
+ * By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
30
+ *
31
+ * @example
32
+ * ```
33
+ * import type {CamelCase} from 'type-fest';
34
+ *
35
+ * // Simple
36
+ *
37
+ * const someVariable: CamelCase<'foo-bar'> = 'fooBar';
38
+ *
39
+ * // Advanced
40
+ *
41
+ * type CamelCasedProperties<T> = {
42
+ * [K in keyof T as CamelCase<K>]: T[K]
43
+ * };
44
+ *
45
+ * interface RawOptions {
46
+ * 'dry-run': boolean;
47
+ * 'full_family_name': string;
48
+ * foo: number;
49
+ * BAR: string;
50
+ * QUZ_QUX: number;
51
+ * 'OTHER-FIELD': boolean;
52
+ * }
53
+ *
54
+ * const dbResult: CamelCasedProperties<RawOptions> = {
55
+ * dryRun: true,
56
+ * fullFamilyName: 'bar.js',
57
+ * foo: 123,
58
+ * bar: 'foo',
59
+ * quzQux: 6,
60
+ * otherField: false
61
+ * };
62
+ * ```
63
+ *
64
+ * @category Change case
65
+ * @category Template literal
66
+ */
67
+ type CamelCase<Type, Options extends CamelCaseOptions = {
68
+ preserveConsecutiveUppercase: true;
69
+ }> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
70
+ //#endregion
71
+ //#endregion
72
+ //#endregion
73
+ export { CamelCase, CamelCaseOptions };
@@ -0,0 +1,73 @@
1
+ import { SplitWords } from "./splitWords.js";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/camelCase.d.ts
6
+ //#region src/application/models/utilityTypes/camelCase.d.ts
7
+ /**
8
+ * CamelCase options.
9
+ *
10
+ * @see {@link CamelCase}
11
+ */
12
+ type CamelCaseOptions = {
13
+ /**
14
+ * Whether to preserved consecutive uppercase letter.
15
+ *
16
+ * @default true
17
+ */
18
+ preserveConsecutiveUppercase?: boolean;
19
+ };
20
+ /**
21
+ * Convert an array of words to camel-case.
22
+ */
23
+ type CamelCaseFromArray<Words extends string[], Options extends CamelCaseOptions, OutputString extends string = ''> = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]] ? Options['preserveConsecutiveUppercase'] extends true ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}` : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}` : OutputString;
24
+ /**
25
+ * Convert a string literal to camel-case.
26
+ *
27
+ * This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
28
+ *
29
+ * By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
30
+ *
31
+ * @example
32
+ * ```
33
+ * import type {CamelCase} from 'type-fest';
34
+ *
35
+ * // Simple
36
+ *
37
+ * const someVariable: CamelCase<'foo-bar'> = 'fooBar';
38
+ *
39
+ * // Advanced
40
+ *
41
+ * type CamelCasedProperties<T> = {
42
+ * [K in keyof T as CamelCase<K>]: T[K]
43
+ * };
44
+ *
45
+ * interface RawOptions {
46
+ * 'dry-run': boolean;
47
+ * 'full_family_name': string;
48
+ * foo: number;
49
+ * BAR: string;
50
+ * QUZ_QUX: number;
51
+ * 'OTHER-FIELD': boolean;
52
+ * }
53
+ *
54
+ * const dbResult: CamelCasedProperties<RawOptions> = {
55
+ * dryRun: true,
56
+ * fullFamilyName: 'bar.js',
57
+ * foo: 123,
58
+ * bar: 'foo',
59
+ * quzQux: 6,
60
+ * otherField: false
61
+ * };
62
+ * ```
63
+ *
64
+ * @category Change case
65
+ * @category Template literal
66
+ */
67
+ type CamelCase<Type, Options extends CamelCaseOptions = {
68
+ preserveConsecutiveUppercase: true;
69
+ }> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
70
+ //#endregion
71
+ //#endregion
72
+ //#endregion
73
+ export { CamelCase, CamelCaseOptions };
@@ -0,0 +1,61 @@
1
+ import { CamelCase, CamelCaseOptions } from "./camelCase.cjs";
2
+ import { UnknownArray } from "./unknownArray.cjs";
3
+
4
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
5
+
6
+ //#region ../hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
7
+ //#region src/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
8
+ /**
9
+ * Convert object properties to camel case recursively.
10
+ *
11
+ * This can be useful when, for example, converting some API types from a different style.
12
+ *
13
+ * @see CamelCasedProperties
14
+ * @see CamelCase
15
+ *
16
+ * @example
17
+ * ```
18
+ * import type {CamelCasedPropertiesDeep} from 'type-fest';
19
+ *
20
+ * interface User {
21
+ * UserId: number;
22
+ * UserName: string;
23
+ * }
24
+ *
25
+ * interface UserWithFriends {
26
+ * UserInfo: User;
27
+ * UserFriends: User[];
28
+ * }
29
+ *
30
+ * const result: CamelCasedPropertiesDeep<UserWithFriends> = {
31
+ * userInfo: {
32
+ * userId: 1,
33
+ * userName: 'Tom',
34
+ * },
35
+ * userFriends: [
36
+ * {
37
+ * userId: 2,
38
+ * userName: 'Jerry',
39
+ * },
40
+ * {
41
+ * userId: 3,
42
+ * userName: 'Spike',
43
+ * },
44
+ * ],
45
+ * };
46
+ * ```
47
+ *
48
+ * @category Change case
49
+ * @category Template literal
50
+ * @category Object
51
+ */
52
+ type CamelCasedPropertiesDeep<Value, Options extends CamelCaseOptions = {
53
+ preserveConsecutiveUppercase: true;
54
+ }> = Value extends Function ? Value : Value extends UnknownArray ? CamelCasedPropertiesArrayDeep<Value> : Value extends Set<infer U> ? Set<CamelCasedPropertiesDeep<U, Options>> : { [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options> };
55
+ type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends [] ? [] : Value extends [infer U, ...infer V] ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [infer U, ...infer V] ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends Array<infer U> ? Array<CamelCasedPropertiesDeep<U>> : Value extends ReadonlyArray<infer U> ? ReadonlyArray<CamelCasedPropertiesDeep<U>> : never;
56
+ //#endregion
57
+
58
+ //#endregion
59
+
60
+ //#endregion
61
+ export { CamelCasedPropertiesDeep };
@@ -0,0 +1,61 @@
1
+ import { CamelCase, CamelCaseOptions } from "./camelCase.js";
2
+ import { UnknownArray } from "./unknownArray.js";
3
+
4
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
5
+
6
+ //#region ../hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
7
+ //#region src/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
8
+ /**
9
+ * Convert object properties to camel case recursively.
10
+ *
11
+ * This can be useful when, for example, converting some API types from a different style.
12
+ *
13
+ * @see CamelCasedProperties
14
+ * @see CamelCase
15
+ *
16
+ * @example
17
+ * ```
18
+ * import type {CamelCasedPropertiesDeep} from 'type-fest';
19
+ *
20
+ * interface User {
21
+ * UserId: number;
22
+ * UserName: string;
23
+ * }
24
+ *
25
+ * interface UserWithFriends {
26
+ * UserInfo: User;
27
+ * UserFriends: User[];
28
+ * }
29
+ *
30
+ * const result: CamelCasedPropertiesDeep<UserWithFriends> = {
31
+ * userInfo: {
32
+ * userId: 1,
33
+ * userName: 'Tom',
34
+ * },
35
+ * userFriends: [
36
+ * {
37
+ * userId: 2,
38
+ * userName: 'Jerry',
39
+ * },
40
+ * {
41
+ * userId: 3,
42
+ * userName: 'Spike',
43
+ * },
44
+ * ],
45
+ * };
46
+ * ```
47
+ *
48
+ * @category Change case
49
+ * @category Template literal
50
+ * @category Object
51
+ */
52
+ type CamelCasedPropertiesDeep<Value, Options extends CamelCaseOptions = {
53
+ preserveConsecutiveUppercase: true;
54
+ }> = Value extends Function ? Value : Value extends UnknownArray ? CamelCasedPropertiesArrayDeep<Value> : Value extends Set<infer U> ? Set<CamelCasedPropertiesDeep<U, Options>> : { [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options> };
55
+ type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends [] ? [] : Value extends [infer U, ...infer V] ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [infer U, ...infer V] ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends Array<infer U> ? Array<CamelCasedPropertiesDeep<U>> : Value extends ReadonlyArray<infer U> ? ReadonlyArray<CamelCasedPropertiesDeep<U>> : never;
56
+ //#endregion
57
+
58
+ //#endregion
59
+
60
+ //#endregion
61
+ export { CamelCasedPropertiesDeep };
@@ -0,0 +1,25 @@
1
+ import { Trim } from "./trim.cjs";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/internal.d.ts
6
+ /**
7
+ * Returns a boolean for whether the string is numeric.
8
+ *
9
+ * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
10
+ */
11
+ type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
12
+ /**
13
+ * Returns a boolean for whether the string is lowercased.
14
+ */
15
+ type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
16
+ /**
17
+ * Returns a boolean for whether the string is upper-cased.
18
+ */
19
+ type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
20
+ type WordSeparators = '-' | '_' | Whitespace;
21
+ type Whitespace = '\u{9}' | '\u{A}' | '\u{B}' | '\u{C}' | '\u{D}' | '\u{20}' | '\u{85}' | '\u{A0}' | '\u{1680}' | '\u{2000}' | '\u{2001}' | '\u{2002}' | '\u{2003}' | '\u{2004}' | '\u{2005}' | '\u{2006}' | '\u{2007}' | '\u{2008}' | '\u{2009}' | '\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' | '\u{3000}' | '\u{FEFF}';
22
+ //#endregion
23
+
24
+ //#endregion
25
+ export { IsLowerCase, IsNumeric, IsUpperCase, Whitespace, WordSeparators };
@@ -0,0 +1,25 @@
1
+ import { Trim } from "./trim.js";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/internal.d.ts
6
+ /**
7
+ * Returns a boolean for whether the string is numeric.
8
+ *
9
+ * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
10
+ */
11
+ type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
12
+ /**
13
+ * Returns a boolean for whether the string is lowercased.
14
+ */
15
+ type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
16
+ /**
17
+ * Returns a boolean for whether the string is upper-cased.
18
+ */
19
+ type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
20
+ type WordSeparators = '-' | '_' | Whitespace;
21
+ type Whitespace = '\u{9}' | '\u{A}' | '\u{B}' | '\u{C}' | '\u{D}' | '\u{20}' | '\u{85}' | '\u{A0}' | '\u{1680}' | '\u{2000}' | '\u{2001}' | '\u{2002}' | '\u{2003}' | '\u{2004}' | '\u{2005}' | '\u{2006}' | '\u{2007}' | '\u{2008}' | '\u{2009}' | '\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' | '\u{3000}' | '\u{FEFF}';
22
+ //#endregion
23
+
24
+ //#endregion
25
+ export { IsLowerCase, IsNumeric, IsUpperCase, Whitespace, WordSeparators };
@@ -0,0 +1,35 @@
1
+ import { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from "./internal.cjs";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/splitWords.d.ts
6
+ //#region src/application/models/utilityTypes/splitWords.d.ts
7
+ type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
8
+ type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
9
+ /**
10
+ * Split a string (almost) like Lodash's `_.words()` function.
11
+ *
12
+ * - Split on each word that begins with a capital letter.
13
+ * - Split on each {@link WordSeparators}.
14
+ * - Split on numeric sequence.
15
+ *
16
+ * @example
17
+ * ```
18
+ * type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
19
+ * type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
20
+ * type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
21
+ * type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
22
+ * type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
23
+ * ```
24
+ *
25
+ * @internal
26
+ * @category Change case
27
+ * @category Template literal
28
+ */
29
+ type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
30
+ //#endregion
31
+
32
+ //#endregion
33
+
34
+ //#endregion
35
+ export { SplitWords };
@@ -0,0 +1,35 @@
1
+ import { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from "./internal.js";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/splitWords.d.ts
6
+ //#region src/application/models/utilityTypes/splitWords.d.ts
7
+ type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
8
+ type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
9
+ /**
10
+ * Split a string (almost) like Lodash's `_.words()` function.
11
+ *
12
+ * - Split on each word that begins with a capital letter.
13
+ * - Split on each {@link WordSeparators}.
14
+ * - Split on numeric sequence.
15
+ *
16
+ * @example
17
+ * ```
18
+ * type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
19
+ * type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
20
+ * type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
21
+ * type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
22
+ * type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
23
+ * ```
24
+ *
25
+ * @internal
26
+ * @category Change case
27
+ * @category Template literal
28
+ */
29
+ type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
30
+ //#endregion
31
+
32
+ //#endregion
33
+
34
+ //#endregion
35
+ export { SplitWords };
@@ -0,0 +1,32 @@
1
+ import { Whitespace } from "./internal.cjs";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/trim.d.ts
6
+ //#region src/application/models/utilityTypes/trim.d.ts
7
+ /**
8
+ * Remove spaces from the left side.
9
+ */
10
+ type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
11
+ /**
12
+ * Remove spaces from the right side.
13
+ */
14
+ type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
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
+ type Trim<V extends string> = TrimLeft<TrimRight<V>>;
29
+ //#endregion
30
+ //#endregion
31
+ //#endregion
32
+ export { Trim };
@@ -0,0 +1,32 @@
1
+ import { Whitespace } from "./internal.js";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts
4
+
5
+ //#region ../hooks/dist/application/models/utilityTypes/trim.d.ts
6
+ //#region src/application/models/utilityTypes/trim.d.ts
7
+ /**
8
+ * Remove spaces from the left side.
9
+ */
10
+ type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
11
+ /**
12
+ * Remove spaces from the right side.
13
+ */
14
+ type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
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
+ type Trim<V extends string> = TrimLeft<TrimRight<V>>;
29
+ //#endregion
30
+ //#endregion
31
+ //#endregion
32
+ export { Trim };
@@ -0,0 +1,32 @@
1
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts
2
+ //#region ../hooks/dist/application/models/utilityTypes/unknownArray.d.ts
3
+ //#region src/application/models/utilityTypes/unknownArray.d.ts
4
+ /**
5
+ * Represents an array with `unknown` value.
6
+ *
7
+ * Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
8
+ *
9
+ * @example
10
+ * ```
11
+ * import type {UnknownArray} from 'type-fest';
12
+ *
13
+ * type IsArray<T> = T extends UnknownArray ? true : false;
14
+ *
15
+ * type A = IsArray<['foo']>;
16
+ * //=> true
17
+ *
18
+ * type B = IsArray<readonly number[]>;
19
+ * //=> true
20
+ *
21
+ * type C = IsArray<string>;
22
+ * //=> false
23
+ * ```
24
+ *
25
+ * @category Type
26
+ * @category Array
27
+ */
28
+ type UnknownArray = readonly unknown[];
29
+ //#endregion
30
+ //#endregion
31
+ //#endregion
32
+ export { UnknownArray };
@@ -0,0 +1,32 @@
1
+ //#region ../widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts
2
+ //#region ../hooks/dist/application/models/utilityTypes/unknownArray.d.ts
3
+ //#region src/application/models/utilityTypes/unknownArray.d.ts
4
+ /**
5
+ * Represents an array with `unknown` value.
6
+ *
7
+ * Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
8
+ *
9
+ * @example
10
+ * ```
11
+ * import type {UnknownArray} from 'type-fest';
12
+ *
13
+ * type IsArray<T> = T extends UnknownArray ? true : false;
14
+ *
15
+ * type A = IsArray<['foo']>;
16
+ * //=> true
17
+ *
18
+ * type B = IsArray<readonly number[]>;
19
+ * //=> true
20
+ *
21
+ * type C = IsArray<string>;
22
+ * //=> false
23
+ * ```
24
+ *
25
+ * @category Type
26
+ * @category Array
27
+ */
28
+ type UnknownArray = readonly unknown[];
29
+ //#endregion
30
+ //#endregion
31
+ //#endregion
32
+ export { UnknownArray };
@@ -0,0 +1,14 @@
1
+ //#region ../widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts
2
+
3
+ //#region ../hooks/dist/atoms/search/searchAPI.d.ts
4
+
5
+ //#region src/atoms/search/searchAPI.d.ts
6
+ type SelectedFilterOption = {
7
+ id: string;
8
+ displayName: string;
9
+ filterId: string;
10
+ filterItemId: string;
11
+ };
12
+ //#endregion
13
+ //#endregion
14
+ export { SelectedFilterOption };
@@ -0,0 +1,15 @@
1
+ import "jotai";
2
+
3
+ //#region ../widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts
4
+
5
+ //#region ../hooks/dist/atoms/search/searchAPI.d.ts
6
+ //#region src/atoms/search/searchAPI.d.ts
7
+ type SelectedFilterOption = {
8
+ id: string;
9
+ displayName: string;
10
+ filterId: string;
11
+ filterItemId: string;
12
+ };
13
+ //#endregion
14
+ //#endregion
15
+ export { SelectedFilterOption };
@@ -0,0 +1,61 @@
1
+ //#region ../widgets/dist/packages/hooks/dist/contexts/types.d.ts
2
+
3
+ type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparentBordered';
4
+ type ProductCardHoverVariant = 'backgroundDark' | 'none';
5
+ type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
6
+ interface ProductCardConfig {
7
+ variant: ProductCardVariant;
8
+ hoverVariant: ProductCardHoverVariant;
9
+ layoutVariant: ProductCardLayoutVariant;
10
+ pricePrefix?: string;
11
+ }
12
+ type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
13
+ interface SuggestionButtonConfig {
14
+ variant?: SuggestionButtonVariant;
15
+ hoverVariant?: SuggestionButtonVariant;
16
+ answerVariant?: SuggestionButtonVariant;
17
+ borderRadius?: 'sm' | 'md' | 'lg';
18
+ }
19
+ type SearchZeroStateVariant = 'backgroundTertiary' | 'backgroundDark' | 'backgroundPrimary';
20
+ type SearchZeroStateLayout = 'input' | 'icon';
21
+ type SearchInputVariant = 'standard';
22
+ type SearchIconVariant = 'thin' | 'bold';
23
+ declare enum WidgetType {
24
+ ChatPreview = "ChatPreview",
25
+ SocialProofV2 = "SocialProofV2",
26
+ ChatPreviewV2 = "ChatPreviewV2",
27
+ ChatPreviewIsLoading = "ChatPreviewIsLoading",
28
+ ChatPreviewPostInteraction = "ChatPreviewPostInteraction",
29
+ ChatPreviewProductComparison = "ChatPreviewProductComparison",
30
+ SuggestionBar = "SuggestionBar",
31
+ SuggestionBarV2 = "SuggestionBarV2",
32
+ ImagePromptCard = "ImagePromptCard",
33
+ ImageBanner = "ImageBanner",
34
+ SingleImagePrompt = "SingleImagePrompt",
35
+ SearchPrompt = "SearchPrompt",
36
+ SearchZeroStateEntryPoint = "SearchZeroStateEntryPoint",
37
+ SearchResultsEntryPoint = "SearchResultsEntryPoint",
38
+ SearchOverlayHost = "SearchOverlayHost",
39
+ NoOp = "NoOp",
40
+ }
41
+ interface BaseWidgetConfig<T extends WidgetType> {
42
+ widgetConfigId: string;
43
+ type: T;
44
+ contentId?: string;
45
+ }
46
+ interface SearchEntryPointWidgetConfig extends BaseWidgetConfig<WidgetType.SearchZeroStateEntryPoint> {
47
+ searchZeroStateVariant: SearchZeroStateVariant;
48
+ searchInputVariant: SearchInputVariant;
49
+ searchIconVariant?: SearchIconVariant;
50
+ searchIconSize?: number;
51
+ suggestionButtonConfig: SuggestionButtonConfig;
52
+ layout: SearchZeroStateLayout;
53
+ searchBoxPlaceholder: string;
54
+ animationSpeed?: 'standard' | 'slow' | 'none';
55
+ compactLabel?: string;
56
+ initialSuggestions?: string[];
57
+ usingPortal?: boolean;
58
+ includeSubtitle?: boolean;
59
+ }
60
+ //#endregion
61
+ export { type ProductCardConfig, type SearchEntryPointWidgetConfig, SearchInputVariant, type SuggestionButtonVariant };