@intlayer/design-system 3.5.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/dist/Form-BDcoNTLV.cjs.map +1 -1
  2. package/dist/Form-DhsgC7kB.js.map +1 -1
  3. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  4. package/dist/components/Accordion/Accordion.mjs.map +1 -1
  5. package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
  6. package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
  7. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +1 -1
  8. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +1 -1
  9. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs.map +1 -1
  10. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs.map +1 -1
  11. package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs.map +1 -1
  12. package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs.map +1 -1
  13. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
  14. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
  15. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs.map +1 -1
  16. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs.map +1 -1
  17. package/dist/components/Auth/ChangePasswordForm/index.content.cjs.map +1 -1
  18. package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +10 -10
  19. package/dist/components/Auth/ChangePasswordForm/index.content.mjs.map +1 -1
  20. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
  21. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
  22. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs.map +1 -1
  23. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs.map +1 -1
  24. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +1 -1
  25. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +5 -5
  26. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +1 -1
  27. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
  28. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
  29. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs.map +1 -1
  30. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs.map +1 -1
  31. package/dist/components/Auth/ResetPasswordForm/index.content.cjs.map +1 -1
  32. package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +7 -7
  33. package/dist/components/Auth/ResetPasswordForm/index.content.mjs.map +1 -1
  34. package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
  35. package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
  36. package/dist/components/Auth/SignInForm/SignInSchema.cjs.map +1 -1
  37. package/dist/components/Auth/SignInForm/SignInSchema.mjs.map +1 -1
  38. package/dist/components/Auth/SignInForm/index.content.cjs.map +1 -1
  39. package/dist/components/Auth/SignInForm/index.content.d.ts +13 -13
  40. package/dist/components/Auth/SignInForm/index.content.mjs.map +1 -1
  41. package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
  42. package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
  43. package/dist/components/Auth/SignUpForm/SignUpSchema.cjs.map +1 -1
  44. package/dist/components/Auth/SignUpForm/SignUpSchema.mjs.map +1 -1
  45. package/dist/components/Auth/SignUpForm/index.content.cjs.map +1 -1
  46. package/dist/components/Auth/SignUpForm/index.content.d.ts +11 -11
  47. package/dist/components/Auth/SignUpForm/index.content.mjs.map +1 -1
  48. package/dist/components/Auth/useAuth/index.cjs.map +1 -1
  49. package/dist/components/Auth/useAuth/index.mjs.map +1 -1
  50. package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -1
  51. package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -1
  52. package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -1
  53. package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -1
  54. package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
  55. package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
  56. package/dist/components/Auth/useUser/index.cjs.map +1 -1
  57. package/dist/components/Auth/useUser/index.mjs.map +1 -1
  58. package/dist/components/Avatar/index.cjs.map +1 -1
  59. package/dist/components/Avatar/index.mjs.map +1 -1
  60. package/dist/components/Badge/index.cjs.map +1 -1
  61. package/dist/components/Badge/index.mjs.map +1 -1
  62. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  63. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  64. package/dist/components/Button/Button.cjs.map +1 -1
  65. package/dist/components/Button/Button.mjs.map +1 -1
  66. package/dist/components/Command/index.cjs.map +1 -1
  67. package/dist/components/Command/index.mjs.map +1 -1
  68. package/dist/components/Container/index.cjs.map +1 -1
  69. package/dist/components/Container/index.mjs.map +1 -1
  70. package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
  71. package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
  72. package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
  73. package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
  74. package/dist/components/CopyToClipboard/index.cjs.map +1 -1
  75. package/dist/components/CopyToClipboard/index.mjs.map +1 -1
  76. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  77. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  78. package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
  79. package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
  80. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
  81. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
  82. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  83. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  84. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
  85. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
  86. package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
  87. package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
  88. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
  89. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
  90. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs.map +1 -1
  91. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs.map +1 -1
  92. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  93. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  94. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs.map +1 -1
  95. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs.map +1 -1
  96. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  97. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
  99. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
  100. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs.map +1 -1
  101. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs.map +1 -1
  102. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  103. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs.map +1 -1
  105. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs.map +1 -1
  106. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  107. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  108. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  109. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  110. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  111. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  112. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  113. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  114. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
  115. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
  116. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  117. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  118. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
  119. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
  120. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  121. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  122. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
  123. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
  124. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  125. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  126. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  127. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  128. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  129. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  130. package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.cjs.map +1 -1
  131. package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.mjs.map +1 -1
  132. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  133. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  134. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
  135. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
  136. package/dist/components/DictionaryFieldEditor/editorView.content.cjs.map +1 -1
  137. package/dist/components/DictionaryFieldEditor/editorView.content.mjs.map +1 -1
  138. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
  139. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
  140. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
  141. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
  142. package/dist/components/DropDown/index.cjs.map +1 -1
  143. package/dist/components/DropDown/index.mjs.map +1 -1
  144. package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
  145. package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
  146. package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
  147. package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
  148. package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
  149. package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
  150. package/dist/components/Footer/index.cjs.map +1 -1
  151. package/dist/components/Footer/index.mjs.map +1 -1
  152. package/dist/components/Form/FormBase.cjs.map +1 -1
  153. package/dist/components/Form/FormBase.mjs.map +1 -1
  154. package/dist/components/Form/FormControl.cjs.map +1 -1
  155. package/dist/components/Form/FormControl.mjs.map +1 -1
  156. package/dist/components/Form/FormDescription.cjs.map +1 -1
  157. package/dist/components/Form/FormDescription.mjs.map +1 -1
  158. package/dist/components/Form/FormField.cjs.map +1 -1
  159. package/dist/components/Form/FormField.mjs.map +1 -1
  160. package/dist/components/Form/FormItem.cjs.map +1 -1
  161. package/dist/components/Form/FormItem.mjs.map +1 -1
  162. package/dist/components/Form/FormLabel.cjs.map +1 -1
  163. package/dist/components/Form/FormLabel.mjs.map +1 -1
  164. package/dist/components/Form/FormMessage.cjs.map +1 -1
  165. package/dist/components/Form/FormMessage.mjs.map +1 -1
  166. package/dist/components/Form/elements/FormElementWrapper.cjs.map +1 -1
  167. package/dist/components/Form/elements/FormElementWrapper.mjs.map +1 -1
  168. package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
  169. package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
  170. package/dist/components/Headers/SectionScroller.cjs.map +1 -1
  171. package/dist/components/Headers/SectionScroller.mjs.map +1 -1
  172. package/dist/components/Headers/index.cjs.map +1 -1
  173. package/dist/components/Headers/index.mjs.map +1 -1
  174. package/dist/components/IDE/CodeRender.cjs.map +1 -1
  175. package/dist/components/IDE/CodeRender.mjs.map +1 -1
  176. package/dist/components/IDE/FileList.cjs.map +1 -1
  177. package/dist/components/IDE/FileList.mjs.map +1 -1
  178. package/dist/components/IDE/FileTree.cjs.map +1 -1
  179. package/dist/components/IDE/FileTree.mjs.map +1 -1
  180. package/dist/components/IDE/IDE.cjs +1 -1
  181. package/dist/components/IDE/IDE.cjs.map +1 -1
  182. package/dist/components/IDE/IDE.mjs +1 -1
  183. package/dist/components/IDE/IDE.mjs.map +1 -1
  184. package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
  185. package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
  186. package/dist/components/IDE/createFileTree.cjs.map +1 -1
  187. package/dist/components/IDE/createFileTree.mjs.map +1 -1
  188. package/dist/components/Input/Checkbox.cjs.map +1 -1
  189. package/dist/components/Input/Checkbox.mjs.map +1 -1
  190. package/dist/components/Input/Input.cjs.map +1 -1
  191. package/dist/components/Input/Input.mjs.map +1 -1
  192. package/dist/components/Input/InputPassword.cjs.map +1 -1
  193. package/dist/components/Input/InputPassword.mjs.map +1 -1
  194. package/dist/components/Link/Link.cjs.map +1 -1
  195. package/dist/components/Link/Link.mjs.map +1 -1
  196. package/dist/components/Loader/spinner.cjs.map +1 -1
  197. package/dist/components/Loader/spinner.mjs.map +1 -1
  198. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  199. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  200. package/dist/components/Logo/LogoCircle.cjs.map +1 -1
  201. package/dist/components/Logo/LogoCircle.mjs.map +1 -1
  202. package/dist/components/Logo/LogoNoFrame.cjs.map +1 -1
  203. package/dist/components/Logo/LogoNoFrame.mjs.map +1 -1
  204. package/dist/components/Logo/LogoSquare.cjs.map +1 -1
  205. package/dist/components/Logo/LogoSquare.mjs.map +1 -1
  206. package/dist/components/Logo/LogoSquircle.cjs.map +1 -1
  207. package/dist/components/Logo/LogoSquircle.mjs.map +1 -1
  208. package/dist/components/Logo/LogoTextOnly.cjs.map +1 -1
  209. package/dist/components/Logo/LogoTextOnly.mjs.map +1 -1
  210. package/dist/components/Logo/LogoWithTextBelowCircle.cjs.map +1 -1
  211. package/dist/components/Logo/LogoWithTextBelowCircle.mjs.map +1 -1
  212. package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs.map +1 -1
  213. package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs.map +1 -1
  214. package/dist/components/Logo/LogoWithTextBelowSquircle.cjs.map +1 -1
  215. package/dist/components/Logo/LogoWithTextBelowSquircle.mjs.map +1 -1
  216. package/dist/components/Logo/LogoWithTextCircle.cjs.map +1 -1
  217. package/dist/components/Logo/LogoWithTextCircle.mjs.map +1 -1
  218. package/dist/components/Logo/LogoWithTextNoFrame.cjs.map +1 -1
  219. package/dist/components/Logo/LogoWithTextNoFrame.mjs.map +1 -1
  220. package/dist/components/Logo/LogoWithTextSquircle.cjs.map +1 -1
  221. package/dist/components/Logo/LogoWithTextSquircle.mjs.map +1 -1
  222. package/dist/components/Logo/index.cjs.map +1 -1
  223. package/dist/components/Logo/index.mjs.map +1 -1
  224. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  225. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  226. package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
  227. package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
  228. package/dist/components/MaxWidthSmoother/index.cjs.map +1 -1
  229. package/dist/components/MaxWidthSmoother/index.mjs.map +1 -1
  230. package/dist/components/Modal/Modal.cjs.map +1 -1
  231. package/dist/components/Modal/Modal.mjs.map +1 -1
  232. package/dist/components/Navbar/Burger.cjs.map +1 -1
  233. package/dist/components/Navbar/Burger.mjs.map +1 -1
  234. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  235. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  236. package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
  237. package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
  238. package/dist/components/Navbar/index.cjs.map +1 -1
  239. package/dist/components/Navbar/index.mjs.map +1 -1
  240. package/dist/components/Navbar/useNavigation.cjs.map +1 -1
  241. package/dist/components/Navbar/useNavigation.mjs.map +1 -1
  242. package/dist/components/Pattern/DotPattern.cjs.map +1 -1
  243. package/dist/components/Pattern/DotPattern.mjs.map +1 -1
  244. package/dist/components/Pattern/GridPattern.cjs.map +1 -1
  245. package/dist/components/Pattern/GridPattern.mjs.map +1 -1
  246. package/dist/components/Pattern/SpotLight.cjs.map +1 -1
  247. package/dist/components/Pattern/SpotLight.mjs.map +1 -1
  248. package/dist/components/Popover/index.cjs.map +1 -1
  249. package/dist/components/Popover/index.mjs.map +1 -1
  250. package/dist/components/PressableSpan/PressableSpan.cjs.map +1 -1
  251. package/dist/components/PressableSpan/PressableSpan.mjs.map +1 -1
  252. package/dist/components/ProfileDropDown/index.cjs.map +1 -1
  253. package/dist/components/ProfileDropDown/index.mjs.map +1 -1
  254. package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
  255. package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
  256. package/dist/components/RightDrawer/useRightDrawerStore.cjs.map +1 -1
  257. package/dist/components/RightDrawer/useRightDrawerStore.mjs.map +1 -1
  258. package/dist/components/Select/Multiselect.cjs.map +1 -1
  259. package/dist/components/Select/Multiselect.mjs.map +1 -1
  260. package/dist/components/Select/Select.cjs.map +1 -1
  261. package/dist/components/Select/Select.mjs.map +1 -1
  262. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  263. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  264. package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
  265. package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
  266. package/dist/components/Tag/index.cjs.map +1 -1
  267. package/dist/components/Tag/index.mjs.map +1 -1
  268. package/dist/components/TextArea/AutoSizeTextArea.cjs.map +1 -1
  269. package/dist/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
  270. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  271. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  272. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
  273. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
  274. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.map +1 -1
  275. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
  276. package/dist/components/Toaster/Toast.cjs.map +1 -1
  277. package/dist/components/Toaster/Toast.mjs.map +1 -1
  278. package/dist/components/Toaster/Toaster.cjs.map +1 -1
  279. package/dist/components/Toaster/Toaster.mjs.map +1 -1
  280. package/dist/components/Toaster/useToast.cjs.map +1 -1
  281. package/dist/components/Toaster/useToast.mjs.map +1 -1
  282. package/dist/components/WithResizer/index.cjs.map +1 -1
  283. package/dist/components/WithResizer/index.mjs.map +1 -1
  284. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  285. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  286. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  287. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  288. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  289. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  290. package/dist/hooks/useDevice.cjs.map +1 -1
  291. package/dist/hooks/useDevice.mjs.map +1 -1
  292. package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
  293. package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
  294. package/dist/hooks/useGetElementOrWindow.cjs.map +1 -1
  295. package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
  296. package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
  297. package/dist/hooks/useIsMounted.cjs.map +1 -1
  298. package/dist/hooks/useIsMounted.mjs.map +1 -1
  299. package/dist/hooks/useItemSelector.cjs.map +1 -1
  300. package/dist/hooks/useItemSelector.mjs.map +1 -1
  301. package/dist/hooks/usePersistedStore.cjs.map +1 -1
  302. package/dist/hooks/usePersistedStore.mjs.map +1 -1
  303. package/dist/hooks/useScrollBlockage/index.cjs.map +1 -1
  304. package/dist/hooks/useScrollBlockage/index.mjs.map +1 -1
  305. package/dist/hooks/useScrollBlockage/useScrollBlockageStore.cjs.map +1 -1
  306. package/dist/hooks/useScrollBlockage/useScrollBlockageStore.mjs.map +1 -1
  307. package/dist/hooks/useScrollDetection.cjs.map +1 -1
  308. package/dist/hooks/useScrollDetection.mjs.map +1 -1
  309. package/dist/index-BtZWYJhL.cjs.map +1 -1
  310. package/dist/index-D9oaKvKC.js.map +1 -1
  311. package/dist/jsx-runtime-DaNGiM0W.js.map +1 -1
  312. package/dist/jsx-runtime-XHKiWCTo.cjs.map +1 -1
  313. package/dist/libs/intlayer-api/auth.cjs.map +1 -1
  314. package/dist/libs/intlayer-api/auth.mjs.map +1 -1
  315. package/dist/libs/intlayer-api/dictionary.cjs.map +1 -1
  316. package/dist/libs/intlayer-api/dictionary.mjs.map +1 -1
  317. package/dist/libs/intlayer-api/fetcher.cjs.map +1 -1
  318. package/dist/libs/intlayer-api/fetcher.mjs.map +1 -1
  319. package/dist/libs/intlayer-api/organization.cjs.map +1 -1
  320. package/dist/libs/intlayer-api/organization.mjs.map +1 -1
  321. package/dist/libs/intlayer-api/project.cjs.map +1 -1
  322. package/dist/libs/intlayer-api/project.mjs.map +1 -1
  323. package/dist/libs/intlayer-api/stripe.cjs.map +1 -1
  324. package/dist/libs/intlayer-api/stripe.mjs.map +1 -1
  325. package/dist/libs/intlayer-api/user.cjs.map +1 -1
  326. package/dist/libs/intlayer-api/user.mjs.map +1 -1
  327. package/dist/shallow-lhDIFtEp.cjs.map +1 -1
  328. package/dist/shallow-m9BpCkKh.js.map +1 -1
  329. package/dist/tailwind.config.cjs.map +1 -1
  330. package/dist/tailwind.config.mjs.map +1 -1
  331. package/dist/tailwind.css +1 -1
  332. package/dist/utils/camelCase.cjs.map +1 -1
  333. package/dist/utils/camelCase.mjs.map +1 -1
  334. package/dist/utils/capitalize.cjs.map +1 -1
  335. package/dist/utils/capitalize.mjs.map +1 -1
  336. package/dist/utils/dictionary.cjs.map +1 -1
  337. package/dist/utils/dictionary.mjs.map +1 -1
  338. package/dist/utils/isElementAtTopAndNotCovered.cjs.map +1 -1
  339. package/dist/utils/isElementAtTopAndNotCovered.mjs.map +1 -1
  340. package/dist/utils/object.cjs.map +1 -1
  341. package/dist/utils/object.mjs.map +1 -1
  342. package/dist/zod-BV4nCGJE.js.map +1 -1
  343. package/dist/zod-DSrtTSD_.cjs.map +1 -1
  344. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"file":"useGetElementOrWindow.cjs","sources":["../../src/hooks/useGetElementOrWindow.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nexport const useGetElementOrWindow = (container?: HTMLElement) => {\n const [containerElement, setContainerElement] = useState<\n HTMLElement | undefined\n >(container);\n\n // This useEffect avoids the error of not finding the container\n useEffect(() => {\n setContainerElement(container ?? window.document.body);\n }, [container]);\n\n return containerElement;\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAIa,MAAA,wBAAwB,CAAC,cAA4B;AAChE,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,oBAE9C,SAAS;AAGXC,aAAAA,UAAU,MAAM;AACM,wBAAA,aAAa,OAAO,SAAS,IAAI;AAAA,EAAA,GACpD,CAAC,SAAS,CAAC;AAEP,SAAA;AACT;;"}
1
+ {"version":3,"file":"useGetElementOrWindow.cjs","sources":["../../src/hooks/useGetElementOrWindow.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nexport const useGetElementOrWindow = (container?: HTMLElement) => {\n const [containerElement, setContainerElement] = useState<\n HTMLElement | undefined\n >(container);\n\n // This useEffect avoids the error of not finding the container\n useEffect(() => {\n setContainerElement(container ?? window.document.body);\n }, [container]);\n\n return containerElement;\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAIa,MAAA,wBAAwB,CAAC,cAA4B;AAChE,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,WAAAA,SAE9C,SAAS;AAGXC,aAAAA,UAAU,MAAM;AACM,wBAAA,aAAa,OAAO,SAAS,IAAI;AAAA,EAAA,GACpD,CAAC,SAAS,CAAC;AAEP,SAAA;AACT;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIntlayerAPI.cjs","sources":["../../src/hooks/useIntlayerAPI.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useAuth } from '../components/Auth/useAuth';\nimport { getIntlayerAPI } from '../libs/intlayer-api';\nimport { FetcherOptions } from '../libs/intlayer-api/fetcher';\n\nexport const useIntlayerAuth = (options?: FetcherOptions) => {\n const { csrfToken, oAuth2AccessToken } = useAuth();\n\n const headers = useMemo(\n () =>\n oAuth2AccessToken?.accessToken\n ? {\n Authorization: `Bearer ${oAuth2AccessToken.accessToken}`,\n }\n : undefined,\n [oAuth2AccessToken?.accessToken]\n );\n\n const body = useMemo(\n () => (csrfToken ? { csrf_token: csrfToken } : undefined),\n [csrfToken]\n );\n\n return useMemo(\n () =>\n getIntlayerAPI({\n headers,\n body,\n ...options,\n }),\n [body, headers]\n );\n};\n"],"names":["useAuth","useMemo","getIntlayerAPI"],"mappings":";;;;;AAKa,MAAA,kBAAkB,CAAC,YAA6B;AAC3D,QAAM,EAAE,WAAW,kBAAkB,IAAIA,8BAAQ,QAAA;AAEjD,QAAM,UAAUC,WAAA;AAAA,IACd,MACE,mBAAmB,cACf;AAAA,MACE,eAAe,UAAU,kBAAkB,WAAW;AAAA,IAExD,IAAA;AAAA,IACN,CAAC,mBAAmB,WAAW;AAAA,EAAA;AAGjC,QAAM,OAAOA,WAAA;AAAA,IACX,MAAO,YAAY,EAAE,YAAY,cAAc;AAAA,IAC/C,CAAC,SAAS;AAAA,EAAA;AAGL,SAAAA,WAAA;AAAA,IACL,MACEC,sCAAe;AAAA,MACb;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IAAA,CACJ;AAAA,IACH,CAAC,MAAM,OAAO;AAAA,EAAA;AAElB;;"}
1
+ {"version":3,"file":"useIntlayerAPI.cjs","sources":["../../src/hooks/useIntlayerAPI.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useAuth } from '../components/Auth/useAuth';\nimport { getIntlayerAPI } from '../libs/intlayer-api';\nimport { FetcherOptions } from '../libs/intlayer-api/fetcher';\n\nexport const useIntlayerAuth = (options?: FetcherOptions) => {\n const { csrfToken, oAuth2AccessToken } = useAuth();\n\n const headers = useMemo(\n () =>\n oAuth2AccessToken?.accessToken\n ? {\n Authorization: `Bearer ${oAuth2AccessToken.accessToken}`,\n }\n : undefined,\n [oAuth2AccessToken?.accessToken]\n );\n\n const body = useMemo(\n () => (csrfToken ? { csrf_token: csrfToken } : undefined),\n [csrfToken]\n );\n\n return useMemo(\n () =>\n getIntlayerAPI({\n headers,\n body,\n ...options,\n }),\n [body, headers]\n );\n};\n"],"names":["useAuth","useMemo","getIntlayerAPI"],"mappings":";;;;;AAKa,MAAA,kBAAkB,CAAC,YAA6B;AAC3D,QAAM,EAAE,WAAW,kBAAkB,IAAIA,sCAAQ;AAEjD,QAAM,UAAUC,WAAA;AAAA,IACd,MACE,mBAAmB,cACf;AAAA,MACE,eAAe,UAAU,kBAAkB,WAAW;AAAA,IAExD,IAAA;AAAA,IACN,CAAC,mBAAmB,WAAW;AAAA,EACjC;AAEA,QAAM,OAAOA,WAAA;AAAA,IACX,MAAO,YAAY,EAAE,YAAY,cAAc;AAAA,IAC/C,CAAC,SAAS;AAAA,EACZ;AAEO,SAAAA,WAAA;AAAA,IACL,MACEC,sCAAe;AAAA,MACb;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IAAA,CACJ;AAAA,IACH,CAAC,MAAM,OAAO;AAAA,EAChB;AACF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIntlayerAPI.mjs","sources":["../../src/hooks/useIntlayerAPI.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useAuth } from '../components/Auth/useAuth';\nimport { getIntlayerAPI } from '../libs/intlayer-api';\nimport { FetcherOptions } from '../libs/intlayer-api/fetcher';\n\nexport const useIntlayerAuth = (options?: FetcherOptions) => {\n const { csrfToken, oAuth2AccessToken } = useAuth();\n\n const headers = useMemo(\n () =>\n oAuth2AccessToken?.accessToken\n ? {\n Authorization: `Bearer ${oAuth2AccessToken.accessToken}`,\n }\n : undefined,\n [oAuth2AccessToken?.accessToken]\n );\n\n const body = useMemo(\n () => (csrfToken ? { csrf_token: csrfToken } : undefined),\n [csrfToken]\n );\n\n return useMemo(\n () =>\n getIntlayerAPI({\n headers,\n body,\n ...options,\n }),\n [body, headers]\n );\n};\n"],"names":[],"mappings":";;;AAKa,MAAA,kBAAkB,CAAC,YAA6B;AAC3D,QAAM,EAAE,WAAW,kBAAkB,IAAI,QAAQ;AAEjD,QAAM,UAAU;AAAA,IACd,MACE,mBAAmB,cACf;AAAA,MACE,eAAe,UAAU,kBAAkB,WAAW;AAAA,IAExD,IAAA;AAAA,IACN,CAAC,mBAAmB,WAAW;AAAA,EAAA;AAGjC,QAAM,OAAO;AAAA,IACX,MAAO,YAAY,EAAE,YAAY,cAAc;AAAA,IAC/C,CAAC,SAAS;AAAA,EAAA;AAGL,SAAA;AAAA,IACL,MACE,eAAe;AAAA,MACb;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IAAA,CACJ;AAAA,IACH,CAAC,MAAM,OAAO;AAAA,EAAA;AAElB;"}
1
+ {"version":3,"file":"useIntlayerAPI.mjs","sources":["../../src/hooks/useIntlayerAPI.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useAuth } from '../components/Auth/useAuth';\nimport { getIntlayerAPI } from '../libs/intlayer-api';\nimport { FetcherOptions } from '../libs/intlayer-api/fetcher';\n\nexport const useIntlayerAuth = (options?: FetcherOptions) => {\n const { csrfToken, oAuth2AccessToken } = useAuth();\n\n const headers = useMemo(\n () =>\n oAuth2AccessToken?.accessToken\n ? {\n Authorization: `Bearer ${oAuth2AccessToken.accessToken}`,\n }\n : undefined,\n [oAuth2AccessToken?.accessToken]\n );\n\n const body = useMemo(\n () => (csrfToken ? { csrf_token: csrfToken } : undefined),\n [csrfToken]\n );\n\n return useMemo(\n () =>\n getIntlayerAPI({\n headers,\n body,\n ...options,\n }),\n [body, headers]\n );\n};\n"],"names":[],"mappings":";;;AAKa,MAAA,kBAAkB,CAAC,YAA6B;AAC3D,QAAM,EAAE,WAAW,kBAAkB,IAAI,QAAQ;AAEjD,QAAM,UAAU;AAAA,IACd,MACE,mBAAmB,cACf;AAAA,MACE,eAAe,UAAU,kBAAkB,WAAW;AAAA,IAExD,IAAA;AAAA,IACN,CAAC,mBAAmB,WAAW;AAAA,EACjC;AAEA,QAAM,OAAO;AAAA,IACX,MAAO,YAAY,EAAE,YAAY,cAAc;AAAA,IAC/C,CAAC,SAAS;AAAA,EACZ;AAEO,SAAA;AAAA,IACL,MACE,eAAe;AAAA,MACb;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IAAA,CACJ;AAAA,IACH,CAAC,MAAM,OAAO;AAAA,EAChB;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIsMounted.cjs","sources":["../../src/hooks/useIsMounted.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nexport const useIsMounted = () => {\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return isMounted;\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAIO,MAAM,eAAe,MAAM;AAChC,QAAM,CAAC,WAAW,YAAY,IAAIA,oBAAS,KAAK;AAEhDC,aAAAA,UAAU,MAAM;AACd,iBAAa,IAAI;AAAA,EACnB,GAAG,CAAE,CAAA;AAEE,SAAA;AACT;;"}
1
+ {"version":3,"file":"useIsMounted.cjs","sources":["../../src/hooks/useIsMounted.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nexport const useIsMounted = () => {\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return isMounted;\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAIO,MAAM,eAAe,MAAM;AAChC,QAAM,CAAC,WAAW,YAAY,IAAIA,WAAAA,SAAS,KAAK;AAEhDC,aAAAA,UAAU,MAAM;AACd,iBAAa,IAAI;AAAA,EACnB,GAAG,EAAE;AAEE,SAAA;AACT;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIsMounted.mjs","sources":["../../src/hooks/useIsMounted.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nexport const useIsMounted = () => {\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return isMounted;\n};\n"],"names":[],"mappings":";;AAIO,MAAM,eAAe,MAAM;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAEhD,YAAU,MAAM;AACd,iBAAa,IAAI;AAAA,EACnB,GAAG,CAAE,CAAA;AAEE,SAAA;AACT;"}
1
+ {"version":3,"file":"useIsMounted.mjs","sources":["../../src/hooks/useIsMounted.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nexport const useIsMounted = () => {\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return isMounted;\n};\n"],"names":[],"mappings":";;AAIO,MAAM,eAAe,MAAM;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAEhD,YAAU,MAAM;AACd,iBAAa,IAAI;AAAA,EACnB,GAAG,EAAE;AAEE,SAAA;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useItemSelector.cjs","sources":["../../src/hooks/useItemSelector.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState, type MutableRefObject } from 'react';\n\ntype StyleState = {\n left: number;\n width: number;\n opacity: number;\n};\n\nconst selectorDefault = (option: HTMLElement) =>\n option?.getAttribute('aria-selected') === 'true';\n\nexport const useItemSelector = (\n optionsRefs: MutableRefObject<HTMLElement[]>,\n selector: (option: HTMLElement, index: number) => boolean = selectorDefault,\n isHoverable = false\n) => {\n const [choiceIndicatorPosition, setChoiceIndicatorPosition] =\n useState<StyleState | null>(null);\n\n const [hoveredItem, setHoveredItem] = useState<HTMLElement | null>(null);\n\n const itemsLength = optionsRefs.current.length;\n\n useEffect(() => {\n const calculatePosition = () => {\n let targetElement: HTMLElement | null = null;\n\n if (hoveredItem) {\n targetElement = hoveredItem;\n } else {\n targetElement = optionsRefs.current.find(selector) ?? null;\n }\n\n if (!targetElement) {\n setChoiceIndicatorPosition((prev) => ({\n left: 0,\n width: 0,\n ...prev,\n opacity: 0,\n }));\n return;\n }\n\n const left = targetElement.offsetLeft;\n const width = targetElement.offsetWidth;\n\n setChoiceIndicatorPosition({\n left,\n width,\n opacity: 1,\n });\n };\n\n calculatePosition();\n\n // Event listeners for window events\n window.addEventListener('resize', calculatePosition);\n window.addEventListener('DOMContentLoaded', calculatePosition);\n\n // MutationObserver to watch for 'aria-selected' changes\n const mutationObservers: MutationObserver[] = [];\n\n optionsRefs.current.forEach((option) => {\n if (option) {\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (\n mutation.type === 'attributes' &&\n mutation.attributeName === 'aria-selected'\n ) {\n calculatePosition();\n break;\n }\n }\n });\n\n observer.observe(option, {\n attributes: true,\n attributeFilter: ['aria-selected'],\n });\n\n mutationObservers.push(observer);\n }\n });\n\n // ResizeObserver to watch for size changes\n const resizeObservers: ResizeObserver[] = [];\n\n const observeSize = (element: HTMLElement) => {\n if (!element) return;\n const resizeObserver = new ResizeObserver(() => {\n calculatePosition();\n });\n resizeObserver.observe(element);\n resizeObservers.push(resizeObserver);\n };\n\n // Observe the selected item\n const selectedItem = optionsRefs.current.find(selector) ?? null;\n\n if (selectedItem) {\n observeSize(selectedItem);\n }\n\n // Observe the hovered item\n if (hoveredItem) {\n observeSize(hoveredItem);\n }\n\n // Add hover event listeners\n const handleMouseEnter = (event: Event) => {\n setHoveredItem(event.currentTarget as HTMLElement);\n };\n\n const handleMouseLeave = () => {\n setHoveredItem(null);\n };\n\n if (isHoverable) {\n optionsRefs.current.forEach((option) => {\n option?.addEventListener('mouseenter', handleMouseEnter);\n option?.addEventListener('mouseleave', handleMouseLeave);\n });\n }\n\n return () => {\n // Cleanup window event listeners\n window.removeEventListener('resize', calculatePosition);\n window.removeEventListener('DOMContentLoaded', calculatePosition);\n\n // Disconnect MutationObservers\n mutationObservers.forEach((observer) => observer.disconnect());\n\n // Disconnect ResizeObservers\n resizeObservers.forEach((observer) => observer.disconnect());\n\n // Remove hover event listeners\n optionsRefs.current.forEach((option) => {\n option?.removeEventListener('mouseenter', handleMouseEnter);\n option?.removeEventListener('mouseleave', handleMouseLeave);\n });\n };\n }, [optionsRefs, selector, hoveredItem, itemsLength]);\n\n return { choiceIndicatorPosition };\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAUA,MAAM,kBAAkB,CAAC,WACvB,QAAQ,aAAa,eAAe,MAAM;AAErC,MAAM,kBAAkB,CAC7B,aACA,WAA4D,iBAC5D,cAAc,UACX;AACH,QAAM,CAAC,yBAAyB,0BAA0B,IACxDA,oBAA4B,IAAI;AAElC,QAAM,CAAC,aAAa,cAAc,IAAIA,oBAA6B,IAAI;AAEjE,QAAA,cAAc,YAAY,QAAQ;AAExCC,aAAAA,UAAU,MAAM;AACd,UAAM,oBAAoB,MAAM;AAC9B,UAAI,gBAAoC;AAExC,UAAI,aAAa;AACC,wBAAA;AAAA,MAAA,OACX;AACL,wBAAgB,YAAY,QAAQ,KAAK,QAAQ,KAAK;AAAA,MACxD;AAEA,UAAI,CAAC,eAAe;AAClB,mCAA2B,CAAC,UAAU;AAAA,UACpC,MAAM;AAAA,UACN,OAAO;AAAA,UACP,GAAG;AAAA,UACH,SAAS;AAAA,QACT,EAAA;AACF;AAAA,MACF;AAEA,YAAM,OAAO,cAAc;AAC3B,YAAM,QAAQ,cAAc;AAED,iCAAA;AAAA,QACzB;AAAA,QACA;AAAA,QACA,SAAS;AAAA,MAAA,CACV;AAAA,IAAA;AAGe;AAGX,WAAA,iBAAiB,UAAU,iBAAiB;AAC5C,WAAA,iBAAiB,oBAAoB,iBAAiB;AAG7D,U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,SAAS,WAAY,CAAA;AAG/C,kBAAA,QAAQ,QAAQ,CAAC,WAAW;AAC9B,gBAAA,oBAAoB,cAAc,gBAAgB;AAClD,gBAAA,oBAAoB,cAAc,gBAAgB;AAAA,MAAA,CAC3D;AAAA,IAAA;AAAA,KAEF,CAAC,aAAa,UAAU,aAAa,WAAW,CAAC;AAEpD,SAAO,EAAE,wBAAwB;AACnC;;"}
1
+ {"version":3,"file":"useItemSelector.cjs","sources":["../../src/hooks/useItemSelector.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState, type MutableRefObject } from 'react';\n\ntype StyleState = {\n left: number;\n width: number;\n opacity: number;\n};\n\nconst selectorDefault = (option: HTMLElement) =>\n option?.getAttribute('aria-selected') === 'true';\n\nexport const useItemSelector = (\n optionsRefs: MutableRefObject<HTMLElement[]>,\n selector: (option: HTMLElement, index: number) => boolean = selectorDefault,\n isHoverable = false\n) => {\n const [choiceIndicatorPosition, setChoiceIndicatorPosition] =\n useState<StyleState | null>(null);\n\n const [hoveredItem, setHoveredItem] = useState<HTMLElement | null>(null);\n\n const itemsLength = optionsRefs.current.length;\n\n useEffect(() => {\n const calculatePosition = () => {\n let targetElement: HTMLElement | null = null;\n\n if (hoveredItem) {\n targetElement = hoveredItem;\n } else {\n targetElement = optionsRefs.current.find(selector) ?? null;\n }\n\n if (!targetElement) {\n setChoiceIndicatorPosition((prev) => ({\n left: 0,\n width: 0,\n ...prev,\n opacity: 0,\n }));\n return;\n }\n\n const left = targetElement.offsetLeft;\n const width = targetElement.offsetWidth;\n\n setChoiceIndicatorPosition({\n left,\n width,\n opacity: 1,\n });\n };\n\n calculatePosition();\n\n // Event listeners for window events\n window.addEventListener('resize', calculatePosition);\n window.addEventListener('DOMContentLoaded', calculatePosition);\n\n // MutationObserver to watch for 'aria-selected' changes\n const mutationObservers: MutationObserver[] = [];\n\n optionsRefs.current.forEach((option) => {\n if (option) {\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (\n mutation.type === 'attributes' &&\n mutation.attributeName === 'aria-selected'\n ) {\n calculatePosition();\n break;\n }\n }\n });\n\n observer.observe(option, {\n attributes: true,\n attributeFilter: ['aria-selected'],\n });\n\n mutationObservers.push(observer);\n }\n });\n\n // ResizeObserver to watch for size changes\n const resizeObservers: ResizeObserver[] = [];\n\n const observeSize = (element: HTMLElement) => {\n if (!element) return;\n const resizeObserver = new ResizeObserver(() => {\n calculatePosition();\n });\n resizeObserver.observe(element);\n resizeObservers.push(resizeObserver);\n };\n\n // Observe the selected item\n const selectedItem = optionsRefs.current.find(selector) ?? null;\n\n if (selectedItem) {\n observeSize(selectedItem);\n }\n\n // Observe the hovered item\n if (hoveredItem) {\n observeSize(hoveredItem);\n }\n\n // Add hover event listeners\n const handleMouseEnter = (event: Event) => {\n setHoveredItem(event.currentTarget as HTMLElement);\n };\n\n const handleMouseLeave = () => {\n setHoveredItem(null);\n };\n\n if (isHoverable) {\n optionsRefs.current.forEach((option) => {\n option?.addEventListener('mouseenter', handleMouseEnter);\n option?.addEventListener('mouseleave', handleMouseLeave);\n });\n }\n\n return () => {\n // Cleanup window event listeners\n window.removeEventListener('resize', calculatePosition);\n window.removeEventListener('DOMContentLoaded', calculatePosition);\n\n // Disconnect MutationObservers\n mutationObservers.forEach((observer) => observer.disconnect());\n\n // Disconnect ResizeObservers\n resizeObservers.forEach((observer) => observer.disconnect());\n\n // Remove hover event listeners\n optionsRefs.current.forEach((option) => {\n option?.removeEventListener('mouseenter', handleMouseEnter);\n option?.removeEventListener('mouseleave', handleMouseLeave);\n });\n };\n }, [optionsRefs, selector, hoveredItem, itemsLength]);\n\n return { choiceIndicatorPosition };\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAUA,MAAM,kBAAkB,CAAC,WACvB,QAAQ,aAAa,eAAe,MAAM;AAErC,MAAM,kBAAkB,CAC7B,aACA,WAA4D,iBAC5D,cAAc,UACX;AACH,QAAM,CAAC,yBAAyB,0BAA0B,IACxDA,WAAAA,SAA4B,IAAI;AA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O;AAC9B,sBAAgB,KAAK,cAAc;AAAA,IACrC;AAGA,UAAM,eAAe,YAAY,QAAQ,KAAK,QAAQ,KAAK;AAE3D,QAAI,cAAc;AAChB,kBAAY,YAAY;AAAA,IAAA;AAI1B,QAAI,aAAa;AACf,kBAAY,WAAW;AAAA,IAAA;AAInB,UAAA,mBAAmB,CAAC,UAAiB;AACzC,qBAAe,MAAM,aAA4B;AAAA,IACnD;AAEA,UAAM,mBAAmB,MAAM;AAC7B,qBAAe,IAAI;AAAA,IACrB;AAEA,QAAI,aAAa;AACH,kBAAA,QAAQ,QAAQ,CAAC,WAAW;AAC9B,gBAAA,iBAAiB,cAAc,gBAAgB;AAC/C,gBAAA,iBAAiB,cAAc,gBAAgB;AAAA,MAAA,CACxD;AAAA,IAAA;AAGH,WAAO,MAAM;AAEJ,aAAA,oBAAoB,UAAU,iBAAiB;AAC/C,aAAA,oBAAoB,oBAAoB,iBAAiB;AAGhE,wBAAkB,QAAQ,CAAC,aAAa,SAAS,YAAY;AAG7D,sBAAgB,QAAQ,CAAC,aAAa,SAAS,YAAY;AAG/C,kBAAA,QAAQ,QAAQ,CAAC,WAAW;AAC9B,gBAAA,oBAAoB,cAAc,gBAAgB;AAClD,gBAAA,oBAAoB,cAAc,gBAAgB;AAAA,MAAA,CAC3D;AAAA,IACH;AAAA,KACC,CAAC,aAAa,UAAU,aAAa,WAAW,CAAC;AAEpD,SAAO,EAAE,wBAAwB;AACnC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useItemSelector.mjs","sources":["../../src/hooks/useItemSelector.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState, type MutableRefObject } from 'react';\n\ntype StyleState = {\n left: number;\n width: number;\n opacity: number;\n};\n\nconst selectorDefault = (option: HTMLElement) =>\n option?.getAttribute('aria-selected') === 'true';\n\nexport const useItemSelector = (\n optionsRefs: MutableRefObject<HTMLElement[]>,\n selector: (option: HTMLElement, index: number) => boolean = selectorDefault,\n isHoverable = false\n) => {\n const [choiceIndicatorPosition, setChoiceIndicatorPosition] =\n useState<StyleState | null>(null);\n\n const [hoveredItem, setHoveredItem] = useState<HTMLElement | null>(null);\n\n const itemsLength = optionsRefs.current.length;\n\n useEffect(() => {\n const calculatePosition = () => {\n let targetElement: HTMLElement | null = null;\n\n if (hoveredItem) {\n targetElement = hoveredItem;\n } else {\n targetElement = optionsRefs.current.find(selector) ?? null;\n }\n\n if (!targetElement) {\n setChoiceIndicatorPosition((prev) => ({\n left: 0,\n width: 0,\n ...prev,\n opacity: 0,\n }));\n return;\n }\n\n const left = targetElement.offsetLeft;\n const width = targetElement.offsetWidth;\n\n setChoiceIndicatorPosition({\n left,\n width,\n opacity: 1,\n });\n };\n\n calculatePosition();\n\n // Event listeners for window events\n window.addEventListener('resize', calculatePosition);\n window.addEventListener('DOMContentLoaded', calculatePosition);\n\n // MutationObserver to watch for 'aria-selected' changes\n const mutationObservers: MutationObserver[] = [];\n\n optionsRefs.current.forEach((option) => {\n if (option) {\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (\n mutation.type === 'attributes' &&\n mutation.attributeName === 'aria-selected'\n ) {\n calculatePosition();\n break;\n }\n }\n });\n\n observer.observe(option, {\n attributes: true,\n attributeFilter: ['aria-selected'],\n });\n\n mutationObservers.push(observer);\n }\n });\n\n // ResizeObserver to watch for size changes\n const resizeObservers: ResizeObserver[] = [];\n\n const observeSize = (element: HTMLElement) => {\n if (!element) return;\n const resizeObserver = new ResizeObserver(() => {\n calculatePosition();\n });\n resizeObserver.observe(element);\n resizeObservers.push(resizeObserver);\n };\n\n // Observe the selected item\n const selectedItem = optionsRefs.current.find(selector) ?? null;\n\n if (selectedItem) {\n observeSize(selectedItem);\n }\n\n // Observe the hovered item\n if (hoveredItem) {\n observeSize(hoveredItem);\n }\n\n // Add hover event listeners\n const handleMouseEnter = (event: Event) => {\n setHoveredItem(event.currentTarget as HTMLElement);\n };\n\n const handleMouseLeave = () => {\n setHoveredItem(null);\n };\n\n if (isHoverable) {\n optionsRefs.current.forEach((option) => {\n option?.addEventListener('mouseenter', handleMouseEnter);\n option?.addEventListener('mouseleave', handleMouseLeave);\n });\n }\n\n return () => {\n // Cleanup window event listeners\n window.removeEventListener('resize', calculatePosition);\n window.removeEventListener('DOMContentLoaded', calculatePosition);\n\n // Disconnect MutationObservers\n mutationObservers.forEach((observer) => observer.disconnect());\n\n // Disconnect ResizeObservers\n resizeObservers.forEach((observer) => observer.disconnect());\n\n // Remove hover event listeners\n optionsRefs.current.forEach((option) => {\n option?.removeEventListener('mouseenter', handleMouseEnter);\n option?.removeEventListener('mouseleave', handleMouseLeave);\n });\n };\n }, [optionsRefs, selector, hoveredItem, itemsLength]);\n\n return { choiceIndicatorPosition };\n};\n"],"names":[],"mappings":";;AAUA,MAAM,kBAAkB,CAAC,WACvB,QAAQ,aAAa,eAAe,MAAM;AAErC,MAAM,kBAAkB,CAC7B,aACA,WAA4D,iBAC5D,cAAc,UACX;AACH,QAAM,CAAC,yBAAyB,0BAA0B,IACxD,SAA4B,IAAI;AAElC,QAAM,CAAC,aAAa,cAAc,IAAI,SAA6B,IAAI;AAEjE,QAAA,cAAc,YAAY,QAAQ;AAExC,YAAU,MAAM;AACd,UAAM,oBAAoB,MAAM;AAC9B,UAAI,gBAAoC;AAExC,UAAI,aAAa;AACC,wBAAA;AAAA,MAAA,OACX;AACL,wBAAgB,YAAY,QAAQ,KAAK,QAAQ,KAAK;AAAA,MACxD;AAEA,UAAI,CAAC,eAAe;AAClB,mCAA2B,CAAC,UAAU;AAAA,UACpC,MAAM;AAAA,UACN,OAAO;AAAA,UACP,GAAG;AAAA,UACH,SAAS;AAAA,QACT,EAAA;AACF;AAAA,MACF;AAEA,YAAM,OAAO,cAAc;AAC3B,YAAM,QAAQ,cAAc;AAED,iCAAA;AAAA,QACzB;AAAA,QACA;AAAA,QACA,SAAS;AAAA,MAAA,CACV;AAAA,IAAA;AAGe;AAGX,WAAA,iBAAiB,UAAU,iBAAiB;AAC5C,WAAA,iBA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7D,sBAAgB,QAAQ,CAAC,aAAa,SAAS,WAAY,CAAA;AAG/C,kBAAA,QAAQ,QAAQ,CAAC,WAAW;AAC9B,gBAAA,oBAAoB,cAAc,gBAAgB;AAClD,gBAAA,oBAAoB,cAAc,gBAAgB;AAAA,MAAA,CAC3D;AAAA,IAAA;AAAA,KAEF,CAAC,aAAa,UAAU,aAAa,WAAW,CAAC;AAEpD,SAAO,EAAE,wBAAwB;AACnC;"}
1
+ {"version":3,"file":"useItemSelector.mjs","sources":["../../src/hooks/useItemSelector.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState, type MutableRefObject } from 'react';\n\ntype StyleState = {\n left: number;\n width: number;\n opacity: number;\n};\n\nconst selectorDefault = (option: HTMLElement) =>\n option?.getAttribute('aria-selected') === 'true';\n\nexport const useItemSelector = (\n optionsRefs: MutableRefObject<HTMLElement[]>,\n selector: (option: HTMLElement, index: number) => boolean = selectorDefault,\n isHoverable = false\n) => {\n const [choiceIndicatorPosition, setChoiceIndicatorPosition] =\n useState<StyleState | null>(null);\n\n const [hoveredItem, setHoveredItem] = useState<HTMLElement | null>(null);\n\n const itemsLength = optionsRefs.current.length;\n\n useEffect(() => {\n const calculatePosition = () => {\n let targetElement: HTMLElement | null = null;\n\n if (hoveredItem) {\n targetElement = hoveredItem;\n } else {\n targetElement = optionsRefs.current.find(selector) ?? null;\n }\n\n if (!targetElement) {\n setChoiceIndicatorPosition((prev) => ({\n left: 0,\n width: 0,\n ...prev,\n opacity: 0,\n }));\n return;\n }\n\n const left = targetElement.offsetLeft;\n const width = targetElement.offsetWidth;\n\n setChoiceIndicatorPosition({\n left,\n width,\n opacity: 1,\n });\n };\n\n calculatePosition();\n\n // Event listeners for window events\n window.addEventListener('resize', calculatePosition);\n window.addEventListener('DOMContentLoaded', calculatePosition);\n\n // MutationObserver to watch for 'aria-selected' changes\n const mutationObservers: MutationObserver[] = [];\n\n optionsRefs.current.forEach((option) => {\n if (option) {\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (\n mutation.type === 'attributes' &&\n mutation.attributeName === 'aria-selected'\n ) {\n calculatePosition();\n break;\n }\n }\n });\n\n observer.observe(option, {\n attributes: true,\n attributeFilter: ['aria-selected'],\n });\n\n mutationObservers.push(observer);\n }\n });\n\n // ResizeObserver to watch for size changes\n const resizeObservers: ResizeObserver[] = [];\n\n const observeSize = (element: HTMLElement) => {\n if (!element) return;\n const resizeObserver = new ResizeObserver(() => {\n calculatePosition();\n });\n resizeObserver.observe(element);\n resizeObservers.push(resizeObserver);\n };\n\n // Observe the selected item\n const selectedItem = optionsRefs.current.find(selector) ?? null;\n\n if (selectedItem) {\n observeSize(selectedItem);\n }\n\n // Observe the hovered item\n if (hoveredItem) {\n observeSize(hoveredItem);\n }\n\n // Add hover event listeners\n const handleMouseEnter = (event: Event) => {\n setHoveredItem(event.currentTarget as HTMLElement);\n };\n\n const handleMouseLeave = () => {\n setHoveredItem(null);\n };\n\n if (isHoverable) {\n optionsRefs.current.forEach((option) => {\n option?.addEventListener('mouseenter', handleMouseEnter);\n option?.addEventListener('mouseleave', handleMouseLeave);\n });\n }\n\n return () => {\n // Cleanup window event listeners\n window.removeEventListener('resize', calculatePosition);\n window.removeEventListener('DOMContentLoaded', calculatePosition);\n\n // Disconnect MutationObservers\n mutationObservers.forEach((observer) => observer.disconnect());\n\n // Disconnect ResizeObservers\n resizeObservers.forEach((observer) => observer.disconnect());\n\n // Remove hover event listeners\n optionsRefs.current.forEach((option) => {\n option?.removeEventListener('mouseenter', handleMouseEnter);\n option?.removeEventListener('mouseleave', handleMouseLeave);\n });\n };\n }, [optionsRefs, selector, hoveredItem, itemsLength]);\n\n return { choiceIndicatorPosition };\n};\n"],"names":[],"mappings":";;AAUA,MAAM,kBAAkB,CAAC,WACvB,QAAQ,aAAa,eAAe,MAAM;AAErC,MAAM,kBAAkB,CAC7B,aACA,WAA4D,iBAC5D,cAAc,UACX;AACH,QAAM,CAAC,yBAAyB,0BAA0B,IACxD,SAA4B,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,sBAAgB,KAAK,cAAc;AAAA,IACrC;AAGA,UAAM,eAAe,YAAY,QAAQ,KAAK,QAAQ,KAAK;AAE3D,QAAI,cAAc;AAChB,kBAAY,YAAY;AAAA,IAAA;AAI1B,QAAI,aAAa;AACf,kBAAY,WAAW;AAAA,IAAA;AAInB,UAAA,mBAAmB,CAAC,UAAiB;AACzC,qBAAe,MAAM,aAA4B;AAAA,IACnD;AAEA,UAAM,mBAAmB,MAAM;AAC7B,qBAAe,IAAI;AAAA,IACrB;AAEA,QAAI,aAAa;AACH,kBAAA,QAAQ,QAAQ,CAAC,WAAW;AAC9B,gBAAA,iBAAiB,cAAc,gBAAgB;AAC/C,gBAAA,iBAAiB,cAAc,gBAAgB;AAAA,MAAA,CACxD;AAAA,IAAA;AAGH,WAAO,MAAM;AAEJ,aAAA,oBAAoB,UAAU,iBAAiB;AAC/C,aAAA,oBAAoB,oBAAoB,iBAAiB;AAGhE,wBAAkB,QAAQ,CAAC,aAAa,SAAS,YAAY;AAG7D,sBAAgB,QAAQ,CAAC,aAAa,SAAS,YAAY;AAG/C,kBAAA,QAAQ,QAAQ,CAAC,WAAW;AAC9B,gBAAA,oBAAoB,cAAc,gBAAgB;AAClD,gBAAA,oBAAoB,cAAc,gBAAgB;AAAA,MAAA,CAC3D;AAAA,IACH;AAAA,KACC,CAAC,aAAa,UAAU,aAAa,WAAW,CAAC;AAEpD,SAAO,EAAE,wBAAwB;AACnC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePersistedStore.cjs","sources":["../../src/hooks/usePersistedStore.ts"],"sourcesContent":["'use client';\n\nimport { useState, useEffect } from 'react';\n\nexport const usePersistedStore = <T>(key: string, initialValue?: T) => {\n const [state, setState] = useState<T>(() => {\n if (typeof window === 'undefined') return initialValue as T;\n\n const persistedState = sessionStorage?.getItem(key);\n\n if (persistedState) {\n return JSON.parse(persistedState);\n }\n\n return initialValue as T;\n });\n\n useEffect(() => {\n const persistedState = sessionStorage?.getItem(key);\n\n if (persistedState) {\n setState(JSON.parse(persistedState));\n }\n }, [key, initialValue]);\n\n return [state, setState] as const;\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAIa,MAAA,oBAAoB,CAAI,KAAa,iBAAqB;AACrE,QAAM,CAAC,OAAO,QAAQ,IAAIA,oBAAY,MAAM;AACtC,QAAA,OAAO,WAAW,YAAoB,QAAA;AAEpC,UAAA,iBAAiB,gBAAgB,QAAQ,GAAG;AAElD,QAAI,gBAAgB;AACX,aAAA,KAAK,MAAM,cAAc;AAAA,IAClC;AAEO,WAAA;AAAA,EAAA,CACR;AAEDC,aAAAA,UAAU,MAAM;AACR,UAAA,iBAAiB,gBAAgB,QAAQ,GAAG;AAElD,QAAI,gBAAgB;AACT,eAAA,KAAK,MAAM,cAAc,CAAC;AAAA,IACrC;AAAA,EAAA,GACC,CAAC,KAAK,YAAY,CAAC;AAEf,SAAA,CAAC,OAAO,QAAQ;AACzB;;"}
1
+ {"version":3,"file":"usePersistedStore.cjs","sources":["../../src/hooks/usePersistedStore.ts"],"sourcesContent":["'use client';\n\nimport { useState, useEffect } from 'react';\n\nexport const usePersistedStore = <T>(key: string, initialValue?: T) => {\n const [state, setState] = useState<T>(() => {\n if (typeof window === 'undefined') return initialValue as T;\n\n const persistedState = sessionStorage?.getItem(key);\n\n if (persistedState) {\n return JSON.parse(persistedState);\n }\n\n return initialValue as T;\n });\n\n useEffect(() => {\n const persistedState = sessionStorage?.getItem(key);\n\n if (persistedState) {\n setState(JSON.parse(persistedState));\n }\n }, [key, initialValue]);\n\n return [state, setState] as const;\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAIa,MAAA,oBAAoB,CAAI,KAAa,iBAAqB;AACrE,QAAM,CAAC,OAAO,QAAQ,IAAIA,oBAAY,MAAM;AACtC,QAAA,OAAO,WAAW,YAAoB,QAAA;AAEpC,UAAA,iBAAiB,gBAAgB,QAAQ,GAAG;AAElD,QAAI,gBAAgB;AACX,aAAA,KAAK,MAAM,cAAc;AAAA,IAAA;AAG3B,WAAA;AAAA,EAAA,CACR;AAEDC,aAAAA,UAAU,MAAM;AACR,UAAA,iBAAiB,gBAAgB,QAAQ,GAAG;AAElD,QAAI,gBAAgB;AACT,eAAA,KAAK,MAAM,cAAc,CAAC;AAAA,IAAA;AAAA,EACrC,GACC,CAAC,KAAK,YAAY,CAAC;AAEf,SAAA,CAAC,OAAO,QAAQ;AACzB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePersistedStore.mjs","sources":["../../src/hooks/usePersistedStore.ts"],"sourcesContent":["'use client';\n\nimport { useState, useEffect } from 'react';\n\nexport const usePersistedStore = <T>(key: string, initialValue?: T) => {\n const [state, setState] = useState<T>(() => {\n if (typeof window === 'undefined') return initialValue as T;\n\n const persistedState = sessionStorage?.getItem(key);\n\n if (persistedState) {\n return JSON.parse(persistedState);\n }\n\n return initialValue as T;\n });\n\n useEffect(() => {\n const persistedState = sessionStorage?.getItem(key);\n\n if (persistedState) {\n setState(JSON.parse(persistedState));\n }\n }, [key, initialValue]);\n\n return [state, setState] as const;\n};\n"],"names":[],"mappings":";;AAIa,MAAA,oBAAoB,CAAI,KAAa,iBAAqB;AACrE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAY,MAAM;AACtC,QAAA,OAAO,WAAW,YAAoB,QAAA;AAEpC,UAAA,iBAAiB,gBAAgB,QAAQ,GAAG;AAElD,QAAI,gBAAgB;AACX,aAAA,KAAK,MAAM,cAAc;AAAA,IAClC;AAEO,WAAA;AAAA,EAAA,CACR;AAED,YAAU,MAAM;AACR,UAAA,iBAAiB,gBAAgB,QAAQ,GAAG;AAElD,QAAI,gBAAgB;AACT,eAAA,KAAK,MAAM,cAAc,CAAC;AAAA,IACrC;AAAA,EAAA,GACC,CAAC,KAAK,YAAY,CAAC;AAEf,SAAA,CAAC,OAAO,QAAQ;AACzB;"}
1
+ {"version":3,"file":"usePersistedStore.mjs","sources":["../../src/hooks/usePersistedStore.ts"],"sourcesContent":["'use client';\n\nimport { useState, useEffect } from 'react';\n\nexport const usePersistedStore = <T>(key: string, initialValue?: T) => {\n const [state, setState] = useState<T>(() => {\n if (typeof window === 'undefined') return initialValue as T;\n\n const persistedState = sessionStorage?.getItem(key);\n\n if (persistedState) {\n return JSON.parse(persistedState);\n }\n\n return initialValue as T;\n });\n\n useEffect(() => {\n const persistedState = sessionStorage?.getItem(key);\n\n if (persistedState) {\n setState(JSON.parse(persistedState));\n }\n }, [key, initialValue]);\n\n return [state, setState] as const;\n};\n"],"names":[],"mappings":";;AAIa,MAAA,oBAAoB,CAAI,KAAa,iBAAqB;AACrE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAY,MAAM;AACtC,QAAA,OAAO,WAAW,YAAoB,QAAA;AAEpC,UAAA,iBAAiB,gBAAgB,QAAQ,GAAG;AAElD,QAAI,gBAAgB;AACX,aAAA,KAAK,MAAM,cAAc;AAAA,IAAA;AAG3B,WAAA;AAAA,EAAA,CACR;AAED,YAAU,MAAM;AACR,UAAA,iBAAiB,gBAAgB,QAAQ,GAAG;AAElD,QAAI,gBAAgB;AACT,eAAA,KAAK,MAAM,cAAc,CAAC;AAAA,IAAA;AAAA,EACrC,GACC,CAAC,KAAK,YAAY,CAAC;AAEf,SAAA,CAAC,OAAO,QAAQ;AACzB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetElementOrWindow } from '../useGetElementOrWindow';\n\nimport { useScrollBlockageStore } from './useScrollBlockageStore';\n\ntype useScrollBlockagePropsReadOnly = {\n disableScroll: undefined;\n key: undefined;\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\ntype useScrollBlockageProps = {\n disableScroll: boolean;\n key: string; // The key to identify the blockage to avoid conflicts. Required if disableScroll is defined\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\nexport const useScrollBlockage = (\n props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly\n) => {\n const {\n disableScroll = false,\n element,\n key = 'unnamed_blocker',\n } = props ?? {};\n\n const { isElementScrollBlocked, addBlockage, removeBlockage } =\n useScrollBlockageStore(\n useShallow((s) => ({\n isElementScrollBlocked: s.isElementScrollBlocked,\n addBlockage: s.addBlockage,\n removeBlockage: s.removeBlockage,\n }))\n );\n\n const containerElement = useGetElementOrWindow(element);\n\n useEffect(() => {\n const el = element ?? window.document.body;\n\n if (disableScroll) {\n addBlockage(key, el);\n } else {\n removeBlockage(key, el);\n }\n }, [addBlockage, disableScroll, element, key, removeBlockage]);\n\n const isScrollBlocked = containerElement\n ? isElementScrollBlocked(containerElement)\n : false;\n\n return { isScrollBlocked };\n};\n"],"names":["useScrollBlockageStore","useShallow","useGetElementOrWindow","useEffect"],"mappings":";;;;;;;AAoBa,MAAA,oBAAoB,CAC/B,UACG;AACG,QAAA;AAAA,IACJ,gBAAgB;AAAA,IAChB;AAAA,IACA,MAAM;AAAA,EAAA,IACJ,SAAS,CAAA;AAEb,QAAM,EAAE,wBAAwB,aAAa,eAC3C,IAAAA,+CAAA;AAAA,IACEC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,wBAAwB,EAAE;AAAA,MAC1B,aAAa,EAAE;AAAA,MACf,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EAAA;AAGA,QAAA,mBAAmBC,kDAAsB,OAAO;AAEtDC,aAAAA,UAAU,MAAM;AACR,UAAA,KAAK,WAAW,OAAO,SAAS;AAEtC,QAAI,eAAe;AACjB,kBAAY,KAAK,EAAE;AAAA,IAAA,OACd;AACL,qBAAe,KAAK,EAAE;AAAA,IACxB;AAAA,EAAA,GACC,CAAC,aAAa,eAAe,SAAS,KAAK,cAAc,CAAC;AAE7D,QAAM,kBAAkB,mBACpB,uBAAuB,gBAAgB,IACvC;AAEJ,SAAO,EAAE,gBAAgB;AAC3B;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetElementOrWindow } from '../useGetElementOrWindow';\n\nimport { useScrollBlockageStore } from './useScrollBlockageStore';\n\ntype useScrollBlockagePropsReadOnly = {\n disableScroll: undefined;\n key: undefined;\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\ntype useScrollBlockageProps = {\n disableScroll: boolean;\n key: string; // The key to identify the blockage to avoid conflicts. Required if disableScroll is defined\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\nexport const useScrollBlockage = (\n props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly\n) => {\n const {\n disableScroll = false,\n element,\n key = 'unnamed_blocker',\n } = props ?? {};\n\n const { isElementScrollBlocked, addBlockage, removeBlockage } =\n useScrollBlockageStore(\n useShallow((s) => ({\n isElementScrollBlocked: s.isElementScrollBlocked,\n addBlockage: s.addBlockage,\n removeBlockage: s.removeBlockage,\n }))\n );\n\n const containerElement = useGetElementOrWindow(element);\n\n useEffect(() => {\n const el = element ?? window.document.body;\n\n if (disableScroll) {\n addBlockage(key, el);\n } else {\n removeBlockage(key, el);\n }\n }, [addBlockage, disableScroll, element, key, removeBlockage]);\n\n const isScrollBlocked = containerElement\n ? isElementScrollBlocked(containerElement)\n : false;\n\n return { isScrollBlocked };\n};\n"],"names":["useScrollBlockageStore","useShallow","useGetElementOrWindow","useEffect"],"mappings":";;;;;;;AAoBa,MAAA,oBAAoB,CAC/B,UACG;AACG,QAAA;AAAA,IACJ,gBAAgB;AAAA,IAChB;AAAA,IACA,MAAM;AAAA,EACR,IAAI,SAAS,CAAC;AAEd,QAAM,EAAE,wBAAwB,aAAa,eAC3C,IAAAA,+CAAA;AAAA,IACEC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,wBAAwB,EAAE;AAAA,MAC1B,aAAa,EAAE;AAAA,MACf,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AAEI,QAAA,mBAAmBC,kDAAsB,OAAO;AAEtDC,aAAAA,UAAU,MAAM;AACR,UAAA,KAAK,WAAW,OAAO,SAAS;AAEtC,QAAI,eAAe;AACjB,kBAAY,KAAK,EAAE;AAAA,IAAA,OACd;AACL,qBAAe,KAAK,EAAE;AAAA,IAAA;AAAA,EACxB,GACC,CAAC,aAAa,eAAe,SAAS,KAAK,cAAc,CAAC;AAE7D,QAAM,kBAAkB,mBACpB,uBAAuB,gBAAgB,IACvC;AAEJ,SAAO,EAAE,gBAAgB;AAC3B;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetElementOrWindow } from '../useGetElementOrWindow';\n\nimport { useScrollBlockageStore } from './useScrollBlockageStore';\n\ntype useScrollBlockagePropsReadOnly = {\n disableScroll: undefined;\n key: undefined;\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\ntype useScrollBlockageProps = {\n disableScroll: boolean;\n key: string; // The key to identify the blockage to avoid conflicts. Required if disableScroll is defined\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\nexport const useScrollBlockage = (\n props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly\n) => {\n const {\n disableScroll = false,\n element,\n key = 'unnamed_blocker',\n } = props ?? {};\n\n const { isElementScrollBlocked, addBlockage, removeBlockage } =\n useScrollBlockageStore(\n useShallow((s) => ({\n isElementScrollBlocked: s.isElementScrollBlocked,\n addBlockage: s.addBlockage,\n removeBlockage: s.removeBlockage,\n }))\n );\n\n const containerElement = useGetElementOrWindow(element);\n\n useEffect(() => {\n const el = element ?? window.document.body;\n\n if (disableScroll) {\n addBlockage(key, el);\n } else {\n removeBlockage(key, el);\n }\n }, [addBlockage, disableScroll, element, key, removeBlockage]);\n\n const isScrollBlocked = containerElement\n ? isElementScrollBlocked(containerElement)\n : false;\n\n return { isScrollBlocked };\n};\n"],"names":[],"mappings":";;;;;AAoBa,MAAA,oBAAoB,CAC/B,UACG;AACG,QAAA;AAAA,IACJ,gBAAgB;AAAA,IAChB;AAAA,IACA,MAAM;AAAA,EAAA,IACJ,SAAS,CAAA;AAEb,QAAM,EAAE,wBAAwB,aAAa,eAC3C,IAAA;AAAA,IACE,WAAW,CAAC,OAAO;AAAA,MACjB,wBAAwB,EAAE;AAAA,MAC1B,aAAa,EAAE;AAAA,MACf,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EAAA;AAGA,QAAA,mBAAmB,sBAAsB,OAAO;AAEtD,YAAU,MAAM;AACR,UAAA,KAAK,WAAW,OAAO,SAAS;AAEtC,QAAI,eAAe;AACjB,kBAAY,KAAK,EAAE;AAAA,IAAA,OACd;AACL,qBAAe,KAAK,EAAE;AAAA,IACxB;AAAA,EAAA,GACC,CAAC,aAAa,eAAe,SAAS,KAAK,cAAc,CAAC;AAE7D,QAAM,kBAAkB,mBACpB,uBAAuB,gBAAgB,IACvC;AAEJ,SAAO,EAAE,gBAAgB;AAC3B;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetElementOrWindow } from '../useGetElementOrWindow';\n\nimport { useScrollBlockageStore } from './useScrollBlockageStore';\n\ntype useScrollBlockagePropsReadOnly = {\n disableScroll: undefined;\n key: undefined;\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\ntype useScrollBlockageProps = {\n disableScroll: boolean;\n key: string; // The key to identify the blockage to avoid conflicts. Required if disableScroll is defined\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\nexport const useScrollBlockage = (\n props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly\n) => {\n const {\n disableScroll = false,\n element,\n key = 'unnamed_blocker',\n } = props ?? {};\n\n const { isElementScrollBlocked, addBlockage, removeBlockage } =\n useScrollBlockageStore(\n useShallow((s) => ({\n isElementScrollBlocked: s.isElementScrollBlocked,\n addBlockage: s.addBlockage,\n removeBlockage: s.removeBlockage,\n }))\n );\n\n const containerElement = useGetElementOrWindow(element);\n\n useEffect(() => {\n const el = element ?? window.document.body;\n\n if (disableScroll) {\n addBlockage(key, el);\n } else {\n removeBlockage(key, el);\n }\n }, [addBlockage, disableScroll, element, key, removeBlockage]);\n\n const isScrollBlocked = containerElement\n ? isElementScrollBlocked(containerElement)\n : false;\n\n return { isScrollBlocked };\n};\n"],"names":[],"mappings":";;;;;AAoBa,MAAA,oBAAoB,CAC/B,UACG;AACG,QAAA;AAAA,IACJ,gBAAgB;AAAA,IAChB;AAAA,IACA,MAAM;AAAA,EACR,IAAI,SAAS,CAAC;AAEd,QAAM,EAAE,wBAAwB,aAAa,eAC3C,IAAA;AAAA,IACE,WAAW,CAAC,OAAO;AAAA,MACjB,wBAAwB,EAAE;AAAA,MAC1B,aAAa,EAAE;AAAA,MACf,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AAEI,QAAA,mBAAmB,sBAAsB,OAAO;AAEtD,YAAU,MAAM;AACR,UAAA,KAAK,WAAW,OAAO,SAAS;AAEtC,QAAI,eAAe;AACjB,kBAAY,KAAK,EAAE;AAAA,IAAA,OACd;AACL,qBAAe,KAAK,EAAE;AAAA,IAAA;AAAA,EACxB,GACC,CAAC,aAAa,eAAe,SAAS,KAAK,cAAc,CAAC;AAE7D,QAAM,kBAAkB,mBACpB,uBAAuB,gBAAgB,IACvC;AAEJ,SAAO,EAAE,gBAAgB;AAC3B;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useScrollBlockageStore.cjs","sources":["../../../src/hooks/useScrollBlockage/useScrollBlockageStore.ts"],"sourcesContent":["import { create } from 'zustand';\n\ntype Blocker = {\n element: Element;\n blockers: string[];\n};\n\ntype ScrollBlockageStore = {\n scrollBlockers: Blocker[];\n addBlockage: (blockerName: string, element: HTMLElement) => void;\n removeBlockage: (blockerName: string, element: HTMLElement) => void;\n isElementScrollBlocked: (element: HTMLElement) => boolean;\n};\n\nexport const useScrollBlockageStore = create<ScrollBlockageStore>(\n (set, get) => ({\n scrollBlockers: [],\n\n addBlockage: (blockerName: string, element: HTMLElement) =>\n set((state) => {\n const scrollBlockers = state.scrollBlockers;\n const blockersElement = scrollBlockers.find(\n (blocker) => blocker.element === element\n );\n\n if (blockersElement) {\n const isBlockerNameExist =\n blockersElement.blockers.includes(blockerName);\n\n const newBlockers = isBlockerNameExist\n ? blockersElement.blockers\n : [...blockersElement.blockers, blockerName];\n\n return {\n scrollBlockers: scrollBlockers.map((blocker) =>\n blocker.element === element\n ? { ...blocker, blockers: newBlockers }\n : blocker\n ),\n };\n }\n\n element.style.overflowY = 'hidden';\n element.style.overflowX = 'hidden';\n return {\n scrollBlockers: [\n ...scrollBlockers,\n { element, blockers: [blockerName] },\n ],\n };\n }),\n\n removeBlockage: (blockerName: string, element: HTMLElement) =>\n set((state) => {\n const scrollBlockers = state.scrollBlockers;\n const blocker = scrollBlockers.find(\n (blocker) => blocker.element === element\n );\n\n if (blocker) {\n // if there are more than one blocker, remove the blockerName from the list\n if (blocker.blockers.length > 1) {\n return {\n scrollBlockers: scrollBlockers.map((blocker) =>\n blocker.element === element\n ? {\n ...blocker,\n blockers: blocker.blockers.filter(\n (b) => b !== blockerName\n ),\n }\n : blocker\n ),\n };\n }\n\n // if there is only one blocker, remove the full blocker element\n element.style.overflowY = 'auto';\n return {\n scrollBlockers: scrollBlockers.filter(\n (blocker) => blocker.element !== element\n ),\n };\n }\n\n return {\n scrollBlockers,\n };\n }),\n\n isElementScrollBlocked: (element: HTMLElement) =>\n get().scrollBlockers.some((blocker) => blocker.element === element),\n })\n);\n"],"names":["create","blocker"],"mappings":";;;AAcO,MAAM,yBAAyBA,QAAA;AAAA,EACpC,CAAC,KAAK,SAAS;AAAA,IACb,gBAAgB,CAAC;AAAA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O,aAAA;AAAA,QACL;AAAA,MAAA;AAAA,IACF,CACD;AAAA,IAEH,wBAAwB,CAAC,YACvB,IAAI,EAAE,eAAe,KAAK,CAAC,YAAY,QAAQ,YAAY,OAAO;AAAA,EAAA;AAExE;;"}
1
+ {"version":3,"file":"useScrollBlockageStore.cjs","sources":["../../../src/hooks/useScrollBlockage/useScrollBlockageStore.ts"],"sourcesContent":["import { create } from 'zustand';\n\ntype Blocker = {\n element: Element;\n blockers: string[];\n};\n\ntype ScrollBlockageStore = {\n scrollBlockers: Blocker[];\n addBlockage: (blockerName: string, element: HTMLElement) => void;\n removeBlockage: (blockerName: string, element: HTMLElement) => void;\n isElementScrollBlocked: (element: HTMLElement) => boolean;\n};\n\nexport const useScrollBlockageStore = create<ScrollBlockageStore>(\n (set, get) => ({\n scrollBlockers: [],\n\n addBlockage: (blockerName: string, element: HTMLElement) =>\n set((state) => {\n const scrollBlockers = state.scrollBlockers;\n const blockersElement = scrollBlockers.find(\n (blocker) => blocker.element === element\n );\n\n if (blockersElement) {\n const isBlockerNameExist =\n blockersElement.blockers.includes(blockerName);\n\n const newBlockers = isBlockerNameExist\n ? blockersElement.blockers\n : [...blockersElement.blockers, blockerName];\n\n return {\n scrollBlockers: scrollBlockers.map((blocker) =>\n blocker.element === element\n ? { ...blocker, blockers: newBlockers }\n : blocker\n ),\n };\n }\n\n element.style.overflowY = 'hidden';\n element.style.overflowX = 'hidden';\n return {\n scrollBlockers: [\n ...scrollBlockers,\n { element, blockers: [blockerName] },\n ],\n };\n }),\n\n removeBlockage: (blockerName: string, element: HTMLElement) =>\n set((state) => {\n const scrollBlockers = state.scrollBlockers;\n const blocker = scrollBlockers.find(\n (blocker) => blocker.element === element\n );\n\n if (blocker) {\n // if there are more than one blocker, remove the blockerName from the list\n if (blocker.blockers.length > 1) {\n return {\n scrollBlockers: scrollBlockers.map((blocker) =>\n blocker.element === element\n ? {\n ...blocker,\n blockers: blocker.blockers.filter(\n (b) => b !== blockerName\n ),\n }\n : blocker\n ),\n };\n }\n\n // if there is only one blocker, remove the full blocker element\n element.style.overflowY = 'auto';\n return {\n scrollBlockers: scrollBlockers.filter(\n (blocker) => blocker.element !== element\n ),\n };\n }\n\n return {\n scrollBlockers,\n };\n }),\n\n isElementScrollBlocked: (element: HTMLElement) =>\n get().scrollBlockers.some((blocker) => blocker.element === element),\n })\n);\n"],"names":["create","blocker"],"mappings":";;;AAcO,MAAM,yBAAyBA,QAAA;AAAA,EACpC,CAAC,KAAK,SAAS;AAAA,IACb,gBAAgB,CAAC;AAAA,IAEjB,aAAa,CAAC,aAAqB,YACjC,IAAI,CAAC,UAAU;AACb,YAAM,iBAAiB,MAAM;AAC7B,YAAM,kBAAkB,eAAe;AAAA,QACrC,CAAC,YAAY,QAAQ,YAAY;AAAA,MACnC;AAEA,UAAI,iBAAiB;AACnB,cAAM,qBACJ,gBAAgB,SAAS,SAAS,WAAW;AAEzC,cAAA,cAAc,qBAChB,gBAAgB,WAChB,CAAC,GAAG,gBAAgB,UAAU,WAAW;AAEtC,eAAA;AAAA,UACL,gBAAgB,eAAe;AAAA,YAAI,CAAC,YAClC,QAAQ,YAAY,UAChB,EAAE,GAAG,SAAS,UAAU,gBACxB;AAAA,UAAA;AAAA,QAER;AAAA,MAAA;AAGF,cAAQ,MAAM,YAAY;AAC1B,cAAQ,MAAM,YAAY;AACnB,aAAA;AAAA,QACL,gBAAgB;AAAA,UACd,GAAG;AAAA,UACH,EAAE,SAAS,UAAU,CAAC,WAAW,EAAE;AAAA,QAAA;AAAA,MAEvC;AAAA,IAAA,CACD;AAAA,IAEH,gBAAgB,CAAC,aAAqB,YACpC,IAAI,CAAC,UAAU;AACb,YAAM,iBAAiB,MAAM;AAC7B,YAAM,UAAU,eAAe;AAAA,QAC7B,CAACC,aAAYA,SAAQ,YAAY;AAAA,MACnC;AAEA,UAAI,SAAS;AAEP,YAAA,QAAQ,SAAS,SAAS,GAAG;AACxB,iBAAA;AAAA,YACL,gBAAgB,eAAe;AAAA,cAAI,CAACA,aAClCA,SAAQ,YAAY,UAChB;AAAA,gBACE,GAAGA;AAAAA,gBACH,UAAUA,SAAQ,SAAS;AAAA,kBACzB,CAAC,MAAM,MAAM;AAAA,gBAAA;AAAA,cACf,IAEFA;AAAAA,YAAA;AAAA,UAER;AAAA,QAAA;AAIF,gBAAQ,MAAM,YAAY;AACnB,eAAA;AAAA,UACL,gBAAgB,eAAe;AAAA,YAC7B,CAACA,aAAYA,SAAQ,YAAY;AAAA,UAAA;AAAA,QAErC;AAAA,MAAA;AAGK,aAAA;AAAA,QACL;AAAA,MACF;AAAA,IAAA,CACD;AAAA,IAEH,wBAAwB,CAAC,YACvB,MAAM,eAAe,KAAK,CAAC,YAAY,QAAQ,YAAY,OAAO;AAAA,EACtE;AACF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useScrollBlockageStore.mjs","sources":["../../../src/hooks/useScrollBlockage/useScrollBlockageStore.ts"],"sourcesContent":["import { create } from 'zustand';\n\ntype Blocker = {\n element: Element;\n blockers: string[];\n};\n\ntype ScrollBlockageStore = {\n scrollBlockers: Blocker[];\n addBlockage: (blockerName: string, element: HTMLElement) => void;\n removeBlockage: (blockerName: string, element: HTMLElement) => void;\n isElementScrollBlocked: (element: HTMLElement) => boolean;\n};\n\nexport const useScrollBlockageStore = create<ScrollBlockageStore>(\n (set, get) => ({\n scrollBlockers: [],\n\n addBlockage: (blockerName: string, element: HTMLElement) =>\n set((state) => {\n const scrollBlockers = state.scrollBlockers;\n const blockersElement = scrollBlockers.find(\n (blocker) => blocker.element === element\n );\n\n if (blockersElement) {\n const isBlockerNameExist =\n blockersElement.blockers.includes(blockerName);\n\n const newBlockers = isBlockerNameExist\n ? blockersElement.blockers\n : [...blockersElement.blockers, blockerName];\n\n return {\n scrollBlockers: scrollBlockers.map((blocker) =>\n blocker.element === element\n ? { ...blocker, blockers: newBlockers }\n : blocker\n ),\n };\n }\n\n element.style.overflowY = 'hidden';\n element.style.overflowX = 'hidden';\n return {\n scrollBlockers: [\n ...scrollBlockers,\n { element, blockers: [blockerName] },\n ],\n };\n }),\n\n removeBlockage: (blockerName: string, element: HTMLElement) =>\n set((state) => {\n const scrollBlockers = state.scrollBlockers;\n const blocker = scrollBlockers.find(\n (blocker) => blocker.element === element\n );\n\n if (blocker) {\n // if there are more than one blocker, remove the blockerName from the list\n if (blocker.blockers.length > 1) {\n return {\n scrollBlockers: scrollBlockers.map((blocker) =>\n blocker.element === element\n ? {\n ...blocker,\n blockers: blocker.blockers.filter(\n (b) => b !== blockerName\n ),\n }\n : blocker\n ),\n };\n }\n\n // if there is only one blocker, remove the full blocker element\n element.style.overflowY = 'auto';\n return {\n scrollBlockers: scrollBlockers.filter(\n (blocker) => blocker.element !== element\n ),\n };\n }\n\n return {\n scrollBlockers,\n };\n }),\n\n isElementScrollBlocked: (element: HTMLElement) =>\n get().scrollBlockers.some((blocker) => blocker.element === element),\n })\n);\n"],"names":["blocker"],"mappings":";AAcO,MAAM,yBAAyB;AAAA,EACpC,CAAC,KAAK,SAAS;AAAA,IACb,gBAAgB,CAAC;AAAA,IAEjB,aAAa,CAAC,aAAqB,YACjC,IAAI,CAAC,UAAU;AACb,YAAM,iBAAiB,MAAM;AAC7B,YAAM,kBAAkB,eAAe;AAAA,QACrC,CAAC,YAAY,QAAQ,YAAY;AAAA,MAAA;AAGnC,UAAI,iBAAiB;AACnB,cAAM,qBACJ,gBAAgB,SAAS,SAAS,WAAW;AAEzC,cAAA,cAAc,qBAChB,gBAAgB,WAChB,CAAC,GAAG,gBAAgB,UAAU,WAAW;AAEtC,eAAA;AAAA,UACL,gBAAgB,eAAe;AAAA,YAAI,CAAC,YAClC,QAAQ,YAAY,UAChB,EAAE,GAAG,SAAS,UAAU,YAAA,IACxB;AAAA,UACN;AAAA,QAAA;AAAA,MAEJ;AAEA,cAAQ,MAAM,YAAY;AAC1B,cAAQ,MAAM,YAAY;AACnB,aAAA;AAAA,QACL,gBAAgB;AAAA,UACd,GAAG;AAAA,UACH,EAAE,SAAS,UAAU,CAAC,WAAW,EAAE;AAAA,QACrC;AAAA,MAAA;AAAA,IACF,CACD;AAAA,IAEH,gBAAgB,CAAC,aAAqB,YACpC,IAAI,CAAC,UAAU;AACb,YAAM,iBAAiB,MAAM;AAC7B,YAAM,UAAU,eAAe;AAAA,QAC7B,CAACA,aAAYA,SAAQ,YAAY;AAAA,MAAA;AAGnC,UAAI,SAAS;AAEP,YAAA,QAAQ,SAAS,SAAS,GAAG;AACxB,iBAAA;AAAA,YACL,gBAAgB,eAAe;AAAA,cAAI,CAACA,aAClCA,SAAQ,YAAY,UAChB;AAAA,gBACE,GAAGA;AAAAA,gBACH,UAAUA,SAAQ,SAAS;AAAA,kBACzB,CAAC,MAAM,MAAM;AAAA,gBACf;AAAA,cAAA,IAEFA;AAAAA,YACN;AAAA,UAAA;AAAA,QAEJ;AAGA,gBAAQ,MAAM,YAAY;AACnB,eAAA;AAAA,UACL,gBAAgB,eAAe;AAAA,YAC7B,CAACA,aAAYA,SAAQ,YAAY;AAAA,UACnC;AAAA,QAAA;AAAA,MAEJ;AAEO,aAAA;AAAA,QACL;AAAA,MAAA;AAAA,IACF,CACD;AAAA,IAEH,wBAAwB,CAAC,YACvB,IAAI,EAAE,eAAe,KAAK,CAAC,YAAY,QAAQ,YAAY,OAAO;AAAA,EAAA;AAExE;"}
1
+ {"version":3,"file":"useScrollBlockageStore.mjs","sources":["../../../src/hooks/useScrollBlockage/useScrollBlockageStore.ts"],"sourcesContent":["import { create } from 'zustand';\n\ntype Blocker = {\n element: Element;\n blockers: string[];\n};\n\ntype ScrollBlockageStore = {\n scrollBlockers: Blocker[];\n addBlockage: (blockerName: string, element: HTMLElement) => void;\n removeBlockage: (blockerName: string, element: HTMLElement) => void;\n isElementScrollBlocked: (element: HTMLElement) => boolean;\n};\n\nexport const useScrollBlockageStore = create<ScrollBlockageStore>(\n (set, get) => ({\n scrollBlockers: [],\n\n addBlockage: (blockerName: string, element: HTMLElement) =>\n set((state) => {\n const scrollBlockers = state.scrollBlockers;\n const blockersElement = scrollBlockers.find(\n (blocker) => blocker.element === element\n );\n\n if (blockersElement) {\n const isBlockerNameExist =\n blockersElement.blockers.includes(blockerName);\n\n const newBlockers = isBlockerNameExist\n ? blockersElement.blockers\n : [...blockersElement.blockers, blockerName];\n\n return {\n scrollBlockers: scrollBlockers.map((blocker) =>\n blocker.element === element\n ? { ...blocker, blockers: newBlockers }\n : blocker\n ),\n };\n }\n\n element.style.overflowY = 'hidden';\n element.style.overflowX = 'hidden';\n return {\n scrollBlockers: [\n ...scrollBlockers,\n { element, blockers: [blockerName] },\n ],\n };\n }),\n\n removeBlockage: (blockerName: string, element: HTMLElement) =>\n set((state) => {\n const scrollBlockers = state.scrollBlockers;\n const blocker = scrollBlockers.find(\n (blocker) => blocker.element === element\n );\n\n if (blocker) {\n // if there are more than one blocker, remove the blockerName from the list\n if (blocker.blockers.length > 1) {\n return {\n scrollBlockers: scrollBlockers.map((blocker) =>\n blocker.element === element\n ? {\n ...blocker,\n blockers: blocker.blockers.filter(\n (b) => b !== blockerName\n ),\n }\n : blocker\n ),\n };\n }\n\n // if there is only one blocker, remove the full blocker element\n element.style.overflowY = 'auto';\n return {\n scrollBlockers: scrollBlockers.filter(\n (blocker) => blocker.element !== element\n ),\n };\n }\n\n return {\n scrollBlockers,\n };\n }),\n\n isElementScrollBlocked: (element: HTMLElement) =>\n get().scrollBlockers.some((blocker) => blocker.element === element),\n })\n);\n"],"names":["blocker"],"mappings":";AAcO,MAAM,yBAAyB;AAAA,EACpC,CAAC,KAAK,SAAS;AAAA,IACb,gBAAgB,CAAC;AAAA,IAEjB,aAAa,CAAC,aAAqB,YACjC,IAAI,CAAC,UAAU;AACb,YAAM,iBAAiB,MAAM;AAC7B,YAAM,kBAAkB,eAAe;AAAA,QACrC,CAAC,YAAY,QAAQ,YAAY;AAAA,MACnC;AAEA,UAAI,iBAAiB;AACnB,cAAM,qBACJ,gBAAgB,SAAS,SAAS,WAAW;AAEzC,cAAA,cAAc,qBAChB,gBAAgB,WAChB,CAAC,GAAG,gBAAgB,UAAU,WAAW;AAEtC,eAAA;AAAA,UACL,gBAAgB,eAAe;AAAA,YAAI,CAAC,YAClC,QAAQ,YAAY,UAChB,EAAE,GAAG,SAAS,UAAU,gBACxB;AAAA,UAAA;AAAA,QAER;AAAA,MAAA;AAGF,cAAQ,MAAM,YAAY;AAC1B,cAAQ,MAAM,YAAY;AACnB,aAAA;AAAA,QACL,gBAAgB;AAAA,UACd,GAAG;AAAA,UACH,EAAE,SAAS,UAAU,CAAC,WAAW,EAAE;AAAA,QAAA;AAAA,MAEvC;AAAA,IAAA,CACD;AAAA,IAEH,gBAAgB,CAAC,aAAqB,YACpC,IAAI,CAAC,UAAU;AACb,YAAM,iBAAiB,MAAM;AAC7B,YAAM,UAAU,eAAe;AAAA,QAC7B,CAACA,aAAYA,SAAQ,YAAY;AAAA,MACnC;AAEA,UAAI,SAAS;AAEP,YAAA,QAAQ,SAAS,SAAS,GAAG;AACxB,iBAAA;AAAA,YACL,gBAAgB,eAAe;AAAA,cAAI,CAACA,aAClCA,SAAQ,YAAY,UAChB;AAAA,gBACE,GAAGA;AAAAA,gBACH,UAAUA,SAAQ,SAAS;AAAA,kBACzB,CAAC,MAAM,MAAM;AAAA,gBAAA;AAAA,cACf,IAEFA;AAAAA,YAAA;AAAA,UAER;AAAA,QAAA;AAIF,gBAAQ,MAAM,YAAY;AACnB,eAAA;AAAA,UACL,gBAAgB,eAAe;AAAA,YAC7B,CAACA,aAAYA,SAAQ,YAAY;AAAA,UAAA;AAAA,QAErC;AAAA,MAAA;AAGK,aAAA;AAAA,QACL;AAAA,MACF;AAAA,IAAA,CACD;AAAA,IAEH,wBAAwB,CAAC,YACvB,MAAM,eAAe,KAAK,CAAC,YAAY,QAAQ,YAAY,OAAO;AAAA,EACtE;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useScrollDetection.cjs","sources":["../../src/hooks/useScrollDetection.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { useGetElementOrWindow } from './useGetElementOrWindow';\nimport { useScrollBlockage } from './useScrollBlockage';\n\ntype useScrollDetectionProps = {\n isEnabled?: boolean;\n delta?: number; // how much user has to scroll to trigger the event\n deltaFromTop?: number; // how much user has to scroll from top to detect if the user has been scrolled\n onScrollDown?: (e: WheelEvent) => void;\n onScrollUp?: (e: WheelEvent) => void;\n element?: HTMLElement; // The element to detect the scroll on. If not defined, the window.document.body will be used\n};\n\nexport const useScrollDetection = (props?: useScrollDetectionProps) => {\n const {\n isEnabled = true,\n delta = 5,\n deltaFromTop = 0,\n onScrollDown,\n onScrollUp,\n element,\n } = props ?? {};\n\n const [isScrolled, setIsScrolled] = useState<boolean>(false);\n const [isScrollable, setIsScrollable] = useState<boolean>(false);\n\n const { isScrollBlocked } = useScrollBlockage();\n const containerElement = useGetElementOrWindow(element);\n\n const onMobileMove = useCallback(\n (event: globalThis.TouchEvent) => {\n const startY = event.touches?.[0]?.clientY ?? 0;\n\n const onMove = (event: globalThis.TouchEvent) => {\n if (isEnabled) {\n const currentY = event.touches?.[0]?.clientY ?? 0;\n const deltaY = startY - currentY;\n\n setIsScrolled(deltaY > 0);\n\n containerElement?.removeEventListener('touchmove', onMove);\n }\n };\n\n containerElement?.addEventListener('touchmove', onMove);\n },\n [isEnabled, containerElement]\n );\n\n const onScroll = useCallback(\n (e: WheelEvent) => {\n const isScrolledDown = e.deltaY > 0;\n\n if (isEnabled && !isScrollBlocked && isScrollable) {\n const isDeTected = Math.abs(e.deltaY) > Math.abs(delta);\n\n if (isDeTected) {\n if (isScrolledDown) {\n onScrollDown?.(e);\n } else {\n onScrollUp?.(e);\n }\n }\n\n setIsScrolled(window.scrollY > deltaFromTop);\n }\n },\n [isEnabled, isScrollBlocked, isScrollable]\n );\n\n useEffect(() => {\n if (isEnabled) {\n containerElement?.addEventListener('wheel', onScroll);\n containerElement?.addEventListener('touchstart', onMobileMove);\n } else {\n setIsScrolled(false);\n }\n\n return () => {\n containerElement?.removeEventListener('wheel', onScroll);\n containerElement?.removeEventListener('touchstart', onMobileMove);\n };\n }, [isEnabled, onScroll, onMobileMove, containerElement]);\n\n useEffect(() => {\n const isScrollable = window.innerHeight < window.document.body.scrollHeight;\n\n setIsScrollable(isScrollable);\n }, []);\n\n return { isScrolled, isScrollable };\n};\n"],"names":["useState","useScrollBlockage","useGetElementOrWindow","useCallback","event","useEffect","isScrollable"],"mappings":";;;;;;AAgBa,MAAA,qBAAqB,CAAC,UAAoC;AAC/D,QAAA;AAAA,IACJ,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,SAAS,CAAA;AAEb,QAAM,CAAC,YAAY,aAAa,IAAIA,oBAAkB,KAAK;AAC3D,QAAM,CAAC,cAAc,eAAe,IAAIA,oBAAkB,KAAK;AAEzD,QAAA,EAAE,oBAAoBC,8BAAAA;AACtB,QAAA,mBAAmBC,kDAAsB,OAAO;AAEtD,QAAM,eAAeC,WAAA;AAAA,IACnB,CAAC,UAAiC;AAChC,YAAM,SAAS,MAAM,UAAU,CAAC,GAAG,WAAW;AAExC,YAAA,SAAS,CAACC,WAAiC;AAC/C,YAAI,WAAW;AACb,gBAAM,WAAWA,OAAM,UAAU,CAAC,GAAG,WAAW;AAChD,gBAAM,SAAS,SAAS;AAExB,wBAAc,SAAS,CAAC;AAEN,4BAAA,oBAAoB,aAAa,MAAM;AAAA,QAC3D;AAAA,MAAA;AAGgB,wBAAA,iBAAiB,aAAa,MAAM;AAAA,IACxD;AAAA,IACA,CAAC,WAAW,gBAAgB;AAAA,EAAA;AAG9B,QAAM,WAAWD,WAAA;AAAA,IACf,CAAC,MAAkB;AACX,YAAA,iBAAiB,EAAE,SAAS;AAE9B,UAAA,aAAa,CAAC,mBAAmB,cAAc;AAC3C,cAAA,aAAa,KAAK,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,KAAK;AAEtD,YAAI,YAAY;AACd,cAAI,gBAAgB;AAClB,2BAAe,CAAC;AAAA,UAAA,OACX;AACL,yBAAa,CAAC;AAAA,UAChB;AAAA,QACF;AAEc,sBAAA,OAAO,UAAU,YAAY;AAAA,MAC7C;AAAA,IACF;AAAA,IACA,CAAC,WAAW,iBAAiB,YAAY;AAAA,EAAA;AAG3CE,aAAAA,UAAU,MAAM;AACd,QAAI,WAAW;AACK,wBAAA,iBAAiB,SAAS,QAAQ;AAClC,wBAAA,iBAAiB,cAAc,YAAY;AAAA,IAAA,OACxD;AACL,oBAAc,KAAK;AAAA,IACrB;AAEA,WAAO,MAAM;AACO,wBAAA,oBAAoB,SAAS,QAAQ;AACrC,wBAAA,oBAAoB,cAAc,YAAY;AAAA,IAAA;AAAA,KAEjE,CAAC,WAAW,UAAU,cAAc,gBAAgB,CAAC;AAExDA,aAAAA,UAAU,MAAM;AACd,UAAMC,gBAAe,OAAO,cAAc,OAAO,SAAS,KAAK;AAE/D,oBAAgBA,aAAY;AAAA,EAC9B,GAAG,CAAE,CAAA;AAEE,SAAA,EAAE,YAAY;AACvB;;"}
1
+ {"version":3,"file":"useScrollDetection.cjs","sources":["../../src/hooks/useScrollDetection.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { useGetElementOrWindow } from './useGetElementOrWindow';\nimport { useScrollBlockage } from './useScrollBlockage';\n\ntype useScrollDetectionProps = {\n isEnabled?: boolean;\n delta?: number; // how much user has to scroll to trigger the event\n deltaFromTop?: number; // how much user has to scroll from top to detect if the user has been scrolled\n onScrollDown?: (e: WheelEvent) => void;\n onScrollUp?: (e: WheelEvent) => void;\n element?: HTMLElement; // The element to detect the scroll on. If not defined, the window.document.body will be used\n};\n\nexport const useScrollDetection = (props?: useScrollDetectionProps) => {\n const {\n isEnabled = true,\n delta = 5,\n deltaFromTop = 0,\n onScrollDown,\n onScrollUp,\n element,\n } = props ?? {};\n\n const [isScrolled, setIsScrolled] = useState<boolean>(false);\n const [isScrollable, setIsScrollable] = useState<boolean>(false);\n\n const { isScrollBlocked } = useScrollBlockage();\n const containerElement = useGetElementOrWindow(element);\n\n const onMobileMove = useCallback(\n (event: globalThis.TouchEvent) => {\n const startY = event.touches?.[0]?.clientY ?? 0;\n\n const onMove = (event: globalThis.TouchEvent) => {\n if (isEnabled) {\n const currentY = event.touches?.[0]?.clientY ?? 0;\n const deltaY = startY - currentY;\n\n setIsScrolled(deltaY > 0);\n\n containerElement?.removeEventListener('touchmove', onMove);\n }\n };\n\n containerElement?.addEventListener('touchmove', onMove);\n },\n [isEnabled, containerElement]\n );\n\n const onScroll = useCallback(\n (e: WheelEvent) => {\n const isScrolledDown = e.deltaY > 0;\n\n if (isEnabled && !isScrollBlocked && isScrollable) {\n const isDeTected = Math.abs(e.deltaY) > Math.abs(delta);\n\n if (isDeTected) {\n if (isScrolledDown) {\n onScrollDown?.(e);\n } else {\n onScrollUp?.(e);\n }\n }\n\n setIsScrolled(window.scrollY > deltaFromTop);\n }\n },\n [isEnabled, isScrollBlocked, isScrollable]\n );\n\n useEffect(() => {\n if (isEnabled) {\n containerElement?.addEventListener('wheel', onScroll);\n containerElement?.addEventListener('touchstart', onMobileMove);\n } else {\n setIsScrolled(false);\n }\n\n return () => {\n containerElement?.removeEventListener('wheel', onScroll);\n containerElement?.removeEventListener('touchstart', onMobileMove);\n };\n }, [isEnabled, onScroll, onMobileMove, containerElement]);\n\n useEffect(() => {\n const isScrollable = window.innerHeight < window.document.body.scrollHeight;\n\n setIsScrollable(isScrollable);\n }, []);\n\n return { isScrolled, isScrollable };\n};\n"],"names":["useState","useScrollBlockage","useGetElementOrWindow","useCallback","event","useEffect","isScrollable"],"mappings":";;;;;;AAgBa,MAAA,qBAAqB,CAAC,UAAoC;AAC/D,QAAA;AAAA,IACJ,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,SAAS,CAAC;AAEd,QAAM,CAAC,YAAY,aAAa,IAA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AAAA,KACC,CAAC,WAAW,UAAU,cAAc,gBAAgB,CAAC;AAExDA,aAAAA,UAAU,MAAM;AACd,UAAMC,gBAAe,OAAO,cAAc,OAAO,SAAS,KAAK;AAE/D,oBAAgBA,aAAY;AAAA,EAC9B,GAAG,EAAE;AAEE,SAAA,EAAE,YAAY,aAAa;AACpC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useScrollDetection.mjs","sources":["../../src/hooks/useScrollDetection.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { useGetElementOrWindow } from './useGetElementOrWindow';\nimport { useScrollBlockage } from './useScrollBlockage';\n\ntype useScrollDetectionProps = {\n isEnabled?: boolean;\n delta?: number; // how much user has to scroll to trigger the event\n deltaFromTop?: number; // how much user has to scroll from top to detect if the user has been scrolled\n onScrollDown?: (e: WheelEvent) => void;\n onScrollUp?: (e: WheelEvent) => void;\n element?: HTMLElement; // The element to detect the scroll on. If not defined, the window.document.body will be used\n};\n\nexport const useScrollDetection = (props?: useScrollDetectionProps) => {\n const {\n isEnabled = true,\n delta = 5,\n deltaFromTop = 0,\n onScrollDown,\n onScrollUp,\n element,\n } = props ?? {};\n\n const [isScrolled, setIsScrolled] = useState<boolean>(false);\n const [isScrollable, setIsScrollable] = useState<boolean>(false);\n\n const { isScrollBlocked } = useScrollBlockage();\n const containerElement = useGetElementOrWindow(element);\n\n const onMobileMove = useCallback(\n (event: globalThis.TouchEvent) => {\n const startY = event.touches?.[0]?.clientY ?? 0;\n\n const onMove = (event: globalThis.TouchEvent) => {\n if (isEnabled) {\n const currentY = event.touches?.[0]?.clientY ?? 0;\n const deltaY = startY - currentY;\n\n setIsScrolled(deltaY > 0);\n\n containerElement?.removeEventListener('touchmove', onMove);\n }\n };\n\n containerElement?.addEventListener('touchmove', onMove);\n },\n [isEnabled, containerElement]\n );\n\n const onScroll = useCallback(\n (e: WheelEvent) => {\n const isScrolledDown = e.deltaY > 0;\n\n if (isEnabled && !isScrollBlocked && isScrollable) {\n const isDeTected = Math.abs(e.deltaY) > Math.abs(delta);\n\n if (isDeTected) {\n if (isScrolledDown) {\n onScrollDown?.(e);\n } else {\n onScrollUp?.(e);\n }\n }\n\n setIsScrolled(window.scrollY > deltaFromTop);\n }\n },\n [isEnabled, isScrollBlocked, isScrollable]\n );\n\n useEffect(() => {\n if (isEnabled) {\n containerElement?.addEventListener('wheel', onScroll);\n containerElement?.addEventListener('touchstart', onMobileMove);\n } else {\n setIsScrolled(false);\n }\n\n return () => {\n containerElement?.removeEventListener('wheel', onScroll);\n containerElement?.removeEventListener('touchstart', onMobileMove);\n };\n }, [isEnabled, onScroll, onMobileMove, containerElement]);\n\n useEffect(() => {\n const isScrollable = window.innerHeight < window.document.body.scrollHeight;\n\n setIsScrollable(isScrollable);\n }, []);\n\n return { isScrolled, isScrollable };\n};\n"],"names":["event","isScrollable"],"mappings":";;;;AAgBa,MAAA,qBAAqB,CAAC,UAAoC;AAC/D,QAAA;AAAA,IACJ,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,SAAS,CAAA;AAEb,QAAM,CAAC,YAAY,aAAa,IAAI,SAAkB,KAAK;AAC3D,QAAM,CAAC,cAAc,eAAe,IAAI,SAAkB,KAAK;AAEzD,QAAA,EAAE,oBAAoB;AACtB,QAAA,mBAAmB,sBAAsB,OAAO;AAEtD,QAAM,eAAe;AAAA,IACnB,CAAC,UAAiC;AAChC,YAAM,SAAS,MAAM,UAAU,CAAC,GAAG,WAAW;AAExC,YAAA,SAAS,CAACA,WAAiC;AAC/C,YAAI,WAAW;AACb,gBAAM,WAAWA,OAAM,UAAU,CAAC,GAAG,WAAW;AAChD,gBAAM,SAAS,SAAS;AAExB,wBAAc,SAAS,CAAC;AAEN,4BAAA,oBAAoB,aAAa,MAAM;AAAA,QAC3D;AAAA,MAAA;AAGgB,wBAAA,iBAAiB,aAAa,MAAM;AAAA,IACxD;AAAA,IACA,CAAC,WAAW,gBAAgB;AAAA,EAAA;AAG9B,QAAM,WAAW;AAAA,IACf,CAAC,MAAkB;AACX,YAAA,iBAAiB,EAAE,SAAS;AAE9B,UAAA,aAAa,CAAC,mBAAmB,cAAc;AAC3C,cAAA,aAAa,KAAK,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,KAAK;AAEtD,YAAI,YAAY;AACd,cAAI,gBAAgB;AAClB,2BAAe,CAAC;AAAA,UAAA,OACX;AACL,yBAAa,CAAC;AAAA,UAChB;AAAA,QACF;AAEc,sBAAA,OAAO,UAAU,YAAY;AAAA,MAC7C;AAAA,IACF;AAAA,IACA,CAAC,WAAW,iBAAiB,YAAY;AAAA,EAAA;AAG3C,YAAU,MAAM;AACd,QAAI,WAAW;AACK,wBAAA,iBAAiB,SAAS,QAAQ;AAClC,wBAAA,iBAAiB,cAAc,YAAY;AAAA,IAAA,OACxD;AACL,oBAAc,KAAK;AAAA,IACrB;AAEA,WAAO,MAAM;AACO,wBAAA,oBAAoB,SAAS,QAAQ;AACrC,wBAAA,oBAAoB,cAAc,YAAY;AAAA,IAAA;AAAA,KAEjE,CAAC,WAAW,UAAU,cAAc,gBAAgB,CAAC;AAExD,YAAU,MAAM;AACd,UAAMC,gBAAe,OAAO,cAAc,OAAO,SAAS,KAAK;AAE/D,oBAAgBA,aAAY;AAAA,EAC9B,GAAG,CAAE,CAAA;AAEE,SAAA,EAAE,YAAY;AACvB;"}
1
+ {"version":3,"file":"useScrollDetection.mjs","sources":["../../src/hooks/useScrollDetection.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { useGetElementOrWindow } from './useGetElementOrWindow';\nimport { useScrollBlockage } from './useScrollBlockage';\n\ntype useScrollDetectionProps = {\n isEnabled?: boolean;\n delta?: number; // how much user has to scroll to trigger the event\n deltaFromTop?: number; // how much user has to scroll from top to detect if the user has been scrolled\n onScrollDown?: (e: WheelEvent) => void;\n onScrollUp?: (e: WheelEvent) => void;\n element?: HTMLElement; // The element to detect the scroll on. If not defined, the window.document.body will be used\n};\n\nexport const useScrollDetection = (props?: useScrollDetectionProps) => {\n const {\n isEnabled = true,\n delta = 5,\n deltaFromTop = 0,\n onScrollDown,\n onScrollUp,\n element,\n } = props ?? {};\n\n const [isScrolled, setIsScrolled] = useState<boolean>(false);\n const [isScrollable, setIsScrollable] = useState<boolean>(false);\n\n const { isScrollBlocked } = useScrollBlockage();\n const containerElement = useGetElementOrWindow(element);\n\n const onMobileMove = useCallback(\n (event: globalThis.TouchEvent) => {\n const startY = event.touches?.[0]?.clientY ?? 0;\n\n const onMove = (event: globalThis.TouchEvent) => {\n if (isEnabled) {\n const currentY = event.touches?.[0]?.clientY ?? 0;\n const deltaY = startY - currentY;\n\n setIsScrolled(deltaY > 0);\n\n containerElement?.removeEventListener('touchmove', onMove);\n }\n };\n\n containerElement?.addEventListener('touchmove', onMove);\n },\n [isEnabled, containerElement]\n );\n\n const onScroll = useCallback(\n (e: WheelEvent) => {\n const isScrolledDown = e.deltaY > 0;\n\n if (isEnabled && !isScrollBlocked && isScrollable) {\n const isDeTected = Math.abs(e.deltaY) > Math.abs(delta);\n\n if (isDeTected) {\n if (isScrolledDown) {\n onScrollDown?.(e);\n } else {\n onScrollUp?.(e);\n }\n }\n\n setIsScrolled(window.scrollY > deltaFromTop);\n }\n },\n [isEnabled, isScrollBlocked, isScrollable]\n );\n\n useEffect(() => {\n if (isEnabled) {\n containerElement?.addEventListener('wheel', onScroll);\n containerElement?.addEventListener('touchstart', onMobileMove);\n } else {\n setIsScrolled(false);\n }\n\n return () => {\n containerElement?.removeEventListener('wheel', onScroll);\n containerElement?.removeEventListener('touchstart', onMobileMove);\n };\n }, [isEnabled, onScroll, onMobileMove, containerElement]);\n\n useEffect(() => {\n const isScrollable = window.innerHeight < window.document.body.scrollHeight;\n\n setIsScrollable(isScrollable);\n }, []);\n\n return { isScrolled, isScrollable };\n};\n"],"names":["event","isScrollable"],"mappings":";;;;AAgBa,MAA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AA,IAAA,OACxD;AACL,oBAAc,KAAK;AAAA,IAAA;AAGrB,WAAO,MAAM;AACO,wBAAA,oBAAoB,SAAS,QAAQ;AACrC,wBAAA,oBAAoB,cAAc,YAAY;AAAA,IAClE;AAAA,KACC,CAAC,WAAW,UAAU,cAAc,gBAAgB,CAAC;AAExD,YAAU,MAAM;AACd,UAAMC,gBAAe,OAAO,cAAc,OAAO,SAAS,KAAK;AAE/D,oBAAgBA,aAAY;AAAA,EAC9B,GAAG,EAAE;AAEE,SAAA,EAAE,YAAY,aAAa;AACpC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index-BtZWYJhL.cjs","sources":["../src/components/DictionaryEditor/NodeWrapper/ArrayWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/TranslationWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport {\n isSameKeyPath,\n NodeType,\n type DictionaryValue,\n type KeyPath,\n} from '@intlayer/core';\nimport { Edit } from 'lucide-react';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype ArrayWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: DictionaryValue[];\n};\n\nexport const ArrayWrapper: FC<ArrayWrapperProps> = (props) => {\n const {\n keyPath,\n section,\n onFocusKeyPath,\n onClickEdit,\n focusedKeyPath = [],\n } = props;\n\n return section.map((subSection, key) => {\n const newKeyPathEl: KeyPath = {\n key,\n type: NodeType.Array,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={JSON.stringify(subSection)}\n title={`${key}`}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(newKeyPath);\n }}\n rightParam={\n <Edit\n size={16}\n role=\"button\"\n aria-label=\"Open the editor\"\n onClick={(e) => {\n e.stopPropagation();\n\n onClickEdit?.(newKeyPath);\n }}\n />\n }\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </ItemLayout>\n );\n });\n};\n","/* eslint-disable import/no-cycle */\nimport {\n type KeyPath,\n NodeType,\n type EnumerationContent,\n type DictionaryValue,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, traceKeys, type NodeWrapperProps } from './index';\n\ntype EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: EnumerationContent<DictionaryValue>;\n};\n\nexport const EnumerationWrapper: FC<EnumerationWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeType.Enumeration,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section.enumeration[key as keyof (typeof section)['enumeration']]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n","/* eslint-disable import/no-cycle */\n\nimport {\n type KeyPath,\n isSameKeyPath,\n type DictionaryValue,\n NodeType,\n} from '@intlayer/core';\nimport { Edit } from 'lucide-react';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, traceKeys, type NodeWrapperProps } from './index';\n\ntype NestedObjectWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: Record<string, DictionaryValue>;\n};\n\nexport const NestedObjectWrapper: FC<NestedObjectWrapperProps> = (props) => {\n const {\n keyPath,\n section,\n focusedKeyPath = [],\n onClickEdit,\n onFocusKeyPath,\n } = props;\n\n return Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = { key, type: NodeType.Object };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={key}\n title={key}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n\n onFocusKeyPath(newKeyPath);\n }}\n rightParam={\n <Edit\n size={16}\n role=\"button\"\n aria-label=\"Open the editor\"\n onClick={(e) => {\n e.stopPropagation();\n\n onClickEdit?.(newKeyPath);\n }}\n />\n }\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={section[key]} />\n </ItemLayout>\n );\n });\n};\n","/* eslint-disable import/no-cycle */\n\nimport {\n type KeyPath,\n NodeType,\n type TranslationContent,\n type DictionaryValue,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype TranslationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: TranslationContent<DictionaryValue>;\n};\n\nexport const TranslationWrapper: FC<TranslationWrapperProps> = (props) => {\n const { keyPath, section, locale } = props;\n\n const newKeyPathEl: KeyPath = {\n type: NodeType.Translation,\n key: locale,\n };\n\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section.translation[\n locale as unknown as keyof (typeof section)['translation']\n ]!;\n\n return <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />;\n};\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport {\n type EnumerationContent,\n type TranslationContent,\n NodeType,\n type KeyPath,\n type DictionaryValue,\n} from '@intlayer/core';\nimport {\n createElement,\n type ReactElement,\n type ReactNode,\n type FC,\n} from 'react';\nimport { ArrayWrapper } from './ArrayWrapper';\nimport { EnumerationWrapper } from './EnumerationWrapper';\nimport { NestedObjectWrapper } from './NestedObjectWrapper';\nimport { StringWrapper } from './StringWrapper';\nimport { TranslationWrapper } from './TranslationWrapper';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\nconst isReactNode = (node: Record<string, unknown>): boolean =>\n typeof node?.key !== 'undefined' && typeof node?.props !== 'undefined';\n\nexport type NodeWrapperProps = {\n keyPath: KeyPath[];\n section: DictionaryValue;\n onContentChange: (content: { keyPath: KeyPath[]; newValue: string }) => void;\n locale: Locales;\n editedContent: DictionaryValue;\n focusedKeyPath: KeyPath[] | undefined;\n onFocusKeyPath: (keyPath: KeyPath[]) => void;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nconst createReactElement = (element: ReactElement) => {\n if (typeof element === 'string') {\n // If it's a string, simply return it (used for text content)\n return element;\n }\n\n const convertChildrenAsArray = (element: ReactElement): ReactElement => {\n if (element?.props && typeof element.props.children === 'object') {\n const childrenResult: ReactNode[] = [];\n const { children } = element.props;\n\n // Create the children elements recursively, if any\n Object.keys(children).forEach((key) => {\n childrenResult.push(createReactElement(children[key]));\n });\n\n return {\n ...element,\n props: { ...element.props, children: childrenResult },\n };\n }\n\n return {\n ...element,\n props: { ...element.props, children: element.props.children },\n };\n };\n\n const fixedElement = convertChildrenAsArray(element);\n\n const { type, props } = fixedElement;\n\n // Create and return the React element\n return createElement(type ?? 'div', props, ...props.children);\n};\n\nexport const NodeWrapper: FC<NodeWrapperProps> = (props) => {\n const { section } = props;\n\n if (typeof section === 'object') {\n if (isReactNode(section as Record<string, unknown>)) {\n return (\n <>\n {createReactElement(section as unknown as ReactElement)}\n <span className=\"text-neutral dark:text-neutral-dark text-xs\">\n React node not editable\n </span>\n </>\n );\n }\n\n if (\n (section as TranslationContent<DictionaryValue>).nodeType ===\n NodeType.Translation\n ) {\n return (\n <TranslationWrapper\n {...props}\n section={section as TranslationContent<DictionaryValue>}\n />\n );\n }\n\n if (\n (section as EnumerationContent<DictionaryValue>).nodeType ===\n NodeType.Enumeration\n ) {\n return (\n <EnumerationWrapper\n {...props}\n section={section as EnumerationContent<DictionaryValue>}\n />\n );\n }\n\n if (Array.isArray(section)) {\n return <ArrayWrapper {...props} section={section as DictionaryValue[]} />;\n }\n\n return (\n <NestedObjectWrapper\n {...props}\n section={section as Record<string, DictionaryValue>}\n />\n );\n }\n\n if (typeof section === 'string') {\n return <StringWrapper {...props} section={section} />;\n }\n};\n"],"names":["NodeType","jsx","ItemLayout","isSameKeyPath","Edit","jsxs","Fragment","createElement","element","StringWrapper"],"mappings":";;;;;;;;AAgBa,MAAA,eAAsC,CAAC,UAAU;AACtD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC;AAAA,EAChB,IAAA;AAEJ,SAAO,QAAQ,IAAI,CAAC,YAAY,QAAQ;AACtC,UAAM,eAAwB;AAAA,MAC5B;AAAA,MACA,MAAMA,KAAS,SAAA;AAAA,IAAA;AAEjB,UAAM,aAAwB,CAAC,GAAG,SAAS,YAAY;AAGrD,WAAAC,2BAAA,kBAAA;AAAA,MAACC,uCAAA;AAAA,MAAA;AAAA,QACC,OAAO,QAAQ;AAAA,QAEf,OAAO,GAAG,GAAG;AAAA,QACb,aAAY;AAAA,QACZ,YAAYC,KAAAA,cAAc,YAAY,cAAc;AAAA,QACpD,SAAS,CAAC,MAAM;AACd,YAAE,gBAAgB;AAClB,yBAAe,UAAU;AAAA,QAC3B;AAAA,QACA,YACEF,2BAAA,kBAAA;AAAA,UAACG,YAAA;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,MAAK;AAAA,YACL,cAAW;AAAA,YACX,SAAS,CAAC,MAAM;AACd,gBAAE,gBAAgB;AAElB,4BAAc,UAAU;AAAA,YAC1B;AAAA,UAAA;AAAA,QACF;AAAA,QAGF,2DAAC,aAAa,EAAA,GAAG,OAAO,SAAS,YAAY,SAAS,YAAY;AAAA,MAAA;AAAA,MArB7D,KAAK,UAAU,UAAU;AAAA,IAAA;AAAA,EAsBhC,CAEH;AACH;AC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A;AAAA,EAGN;AAEI,MAAA,OAAO,YAAY,UAAU;AAC/B,WAAQA,2BAAAA,kBAAAA,IAAAQ,sDAAAA,eAAA,EAAe,GAAG,OAAO,QAAkB,CAAA;AAAA,EACrD;AACF;;;;;;;"}
1
+ {"version":3,"file":"index-BtZWYJhL.cjs","sources":["../src/components/DictionaryEditor/NodeWrapper/ArrayWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/TranslationWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport {\n isSameKeyPath,\n NodeType,\n type DictionaryValue,\n type KeyPath,\n} from '@intlayer/core';\nimport { Edit } from 'lucide-react';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype ArrayWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: DictionaryValue[];\n};\n\nexport const ArrayWrapper: FC<ArrayWrapperProps> = (props) => {\n const {\n keyPath,\n section,\n onFocusKeyPath,\n onClickEdit,\n focusedKeyPath = [],\n } = props;\n\n return section.map((subSection, key) => {\n const newKeyPathEl: KeyPath = {\n key,\n type: NodeType.Array,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={JSON.stringify(subSection)}\n title={`${key}`}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(newKeyPath);\n }}\n rightParam={\n <Edit\n size={16}\n role=\"button\"\n aria-label=\"Open the editor\"\n onClick={(e) => {\n e.stopPropagation();\n\n onClickEdit?.(newKeyPath);\n }}\n />\n }\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </ItemLayout>\n );\n });\n};\n","/* eslint-disable import/no-cycle */\nimport {\n type KeyPath,\n NodeType,\n type EnumerationContent,\n type DictionaryValue,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, traceKeys, type NodeWrapperProps } from './index';\n\ntype EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: EnumerationContent<DictionaryValue>;\n};\n\nexport const EnumerationWrapper: FC<EnumerationWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeType.Enumeration,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section.enumeration[key as keyof (typeof section)['enumeration']]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n","/* eslint-disable import/no-cycle */\n\nimport {\n type KeyPath,\n isSameKeyPath,\n type DictionaryValue,\n NodeType,\n} from '@intlayer/core';\nimport { Edit } from 'lucide-react';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, traceKeys, type NodeWrapperProps } from './index';\n\ntype NestedObjectWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: Record<string, DictionaryValue>;\n};\n\nexport const NestedObjectWrapper: FC<NestedObjectWrapperProps> = (props) => {\n const {\n keyPath,\n section,\n focusedKeyPath = [],\n onClickEdit,\n onFocusKeyPath,\n } = props;\n\n return Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = { key, type: NodeType.Object };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={key}\n title={key}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n\n onFocusKeyPath(newKeyPath);\n }}\n rightParam={\n <Edit\n size={16}\n role=\"button\"\n aria-label=\"Open the editor\"\n onClick={(e) => {\n e.stopPropagation();\n\n onClickEdit?.(newKeyPath);\n }}\n />\n }\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={section[key]} />\n </ItemLayout>\n );\n });\n};\n","/* eslint-disable import/no-cycle */\n\nimport {\n type KeyPath,\n NodeType,\n type TranslationContent,\n type DictionaryValue,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype TranslationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: TranslationContent<DictionaryValue>;\n};\n\nexport const TranslationWrapper: FC<TranslationWrapperProps> = (props) => {\n const { keyPath, section, locale } = props;\n\n const newKeyPathEl: KeyPath = {\n type: NodeType.Translation,\n key: locale,\n };\n\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section.translation[\n locale as unknown as keyof (typeof section)['translation']\n ]!;\n\n return <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />;\n};\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport {\n type EnumerationContent,\n type TranslationContent,\n NodeType,\n type KeyPath,\n type DictionaryValue,\n} from '@intlayer/core';\nimport {\n createElement,\n type ReactElement,\n type ReactNode,\n type FC,\n} from 'react';\nimport { ArrayWrapper } from './ArrayWrapper';\nimport { EnumerationWrapper } from './EnumerationWrapper';\nimport { NestedObjectWrapper } from './NestedObjectWrapper';\nimport { StringWrapper } from './StringWrapper';\nimport { TranslationWrapper } from './TranslationWrapper';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\nconst isReactNode = (node: Record<string, unknown>): boolean =>\n typeof node?.key !== 'undefined' && typeof node?.props !== 'undefined';\n\nexport type NodeWrapperProps = {\n keyPath: KeyPath[];\n section: DictionaryValue;\n onContentChange: (content: { keyPath: KeyPath[]; newValue: string }) => void;\n locale: Locales;\n editedContent: DictionaryValue;\n focusedKeyPath: KeyPath[] | undefined;\n onFocusKeyPath: (keyPath: KeyPath[]) => void;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nconst createReactElement = (element: ReactElement) => {\n if (typeof element === 'string') {\n // If it's a string, simply return it (used for text content)\n return element;\n }\n\n const convertChildrenAsArray = (element: ReactElement): ReactElement => {\n if (element?.props && typeof element.props.children === 'object') {\n const childrenResult: ReactNode[] = [];\n const { children } = element.props;\n\n // Create the children elements recursively, if any\n Object.keys(children).forEach((key) => {\n childrenResult.push(createReactElement(children[key]));\n });\n\n return {\n ...element,\n props: { ...element.props, children: childrenResult },\n };\n }\n\n return {\n ...element,\n props: { ...element.props, children: element.props.children },\n };\n };\n\n const fixedElement = convertChildrenAsArray(element);\n\n const { type, props } = fixedElement;\n\n // Create and return the React element\n return createElement(type ?? 'div', props, ...props.children);\n};\n\nexport const NodeWrapper: FC<NodeWrapperProps> = (props) => {\n const { section } = props;\n\n if (typeof section === 'object') {\n if (isReactNode(section as Record<string, unknown>)) {\n return (\n <>\n {createReactElement(section as unknown as ReactElement)}\n <span className=\"text-neutral dark:text-neutral-dark text-xs\">\n React node not editable\n </span>\n </>\n );\n }\n\n if (\n (section as TranslationContent<DictionaryValue>).nodeType ===\n NodeType.Translation\n ) {\n return (\n <TranslationWrapper\n {...props}\n section={section as TranslationContent<DictionaryValue>}\n />\n );\n }\n\n if (\n (section as EnumerationContent<DictionaryValue>).nodeType ===\n NodeType.Enumeration\n ) {\n return (\n <EnumerationWrapper\n {...props}\n section={section as EnumerationContent<DictionaryValue>}\n />\n );\n }\n\n if (Array.isArray(section)) {\n return <ArrayWrapper {...props} section={section as DictionaryValue[]} />;\n }\n\n return (\n <NestedObjectWrapper\n {...props}\n section={section as Record<string, DictionaryValue>}\n />\n );\n }\n\n if (typeof section === 'string') {\n return <StringWrapper {...props} section={section} />;\n }\n};\n"],"names":["NodeType","jsx","ItemLayout","isSameKeyPath","Edit","jsxs","Fragment","createElement","element","StringWrapper"],"mappings":";;;;;;;;AAgBa,MAAA,eAAsC,CAAC,UAAU;AACtD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,CAAA;AAAA,EAAC,IAChB;AAEJ,SAAO,QAAQ,IAAI,CAAC,YAAY,QAAQ;AACtC,UAAM,eAAwB;AAAA,MAC5B;AAAA,MACA,MAAMA,KAAAA,SAAS;AAAA,IACjB;AACA,UAAM,aAAwB,CAAC,GAAG,SAAS,YAAY;AAGrD,WAAAC,2BAAA,kBAAA;AAAA,MAACC,uCAAA;AAAA,MAAA;AAAA,QACC,OAAO,QAAQ;AAAA,QAEf,OAAO,GAAG,GAAG;AAAA,QACb,aAAY;AAAA,QACZ,YAAYC,KAAAA,cAAc,YAAY,cAAc;AAAA,QACpD,SAAS,CAAC,MAAM;AACd,YAAE,gBAAgB;AAClB,yBAAe,UAAU;AAAA,QAC3B;AAAA,QACA,YACEF,2BAAA,kBAAA;AAAA,UAACG,YAAA;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,MAAK;AAAA,YACL,cAAW;AAAA,YACX,SAAS,CAAC,MAAM;AACd,gBAAE,gBAAgB;AAElB,4BAAc,UAAU;AAAA,YAAA;AAAA,UAC1B;AAAA,QACF;AAAA,QAGF,2DAAC,aAAa,EAAA,GAAG,OAAO,SAAS,YAAY,SAAS,WAAY,CAAA;AAAA,MAAA;AAAA,MArB7D,KAAK,UAAU,UAAU;AAAA,IAsBhC;AAAA,EAAA,CAEH;AACH;AC9Ca,MAAA,qBAAkD,CAAC,UAAU;AAClE,QAAA,EAAE,SAAS,QAAA,IAAY;AAE7B,0DACG,OAAI,EAAA,WAAU,wCACZ,UAAO,OAAA,KAAK,OAAO,EACjB,OAAO,CAAC,QAAQ,CAAC,UAAU,SAAS,GAAG,CAAC,EACxC,IAAI,C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/ArrayWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/TranslationWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport {\n isSameKeyPath,\n NodeType,\n type DictionaryValue,\n type KeyPath,\n} from '@intlayer/core';\nimport { Edit } from 'lucide-react';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype ArrayWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: DictionaryValue[];\n};\n\nexport const ArrayWrapper: FC<ArrayWrapperProps> = (props) => {\n const {\n keyPath,\n section,\n onFocusKeyPath,\n onClickEdit,\n focusedKeyPath = [],\n } = props;\n\n return section.map((subSection, key) => {\n const newKeyPathEl: KeyPath = {\n key,\n type: NodeType.Array,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={JSON.stringify(subSection)}\n title={`${key}`}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(newKeyPath);\n }}\n rightParam={\n <Edit\n size={16}\n role=\"button\"\n aria-label=\"Open the editor\"\n onClick={(e) => {\n e.stopPropagation();\n\n onClickEdit?.(newKeyPath);\n }}\n />\n }\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </ItemLayout>\n );\n });\n};\n","/* eslint-disable import/no-cycle */\nimport {\n type KeyPath,\n NodeType,\n type EnumerationContent,\n type DictionaryValue,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, traceKeys, type NodeWrapperProps } from './index';\n\ntype EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: EnumerationContent<DictionaryValue>;\n};\n\nexport const EnumerationWrapper: FC<EnumerationWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeType.Enumeration,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section.enumeration[key as keyof (typeof section)['enumeration']]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n","/* eslint-disable import/no-cycle */\n\nimport {\n type KeyPath,\n isSameKeyPath,\n type DictionaryValue,\n NodeType,\n} from '@intlayer/core';\nimport { Edit } from 'lucide-react';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, traceKeys, type NodeWrapperProps } from './index';\n\ntype NestedObjectWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: Record<string, DictionaryValue>;\n};\n\nexport const NestedObjectWrapper: FC<NestedObjectWrapperProps> = (props) => {\n const {\n keyPath,\n section,\n focusedKeyPath = [],\n onClickEdit,\n onFocusKeyPath,\n } = props;\n\n return Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = { key, type: NodeType.Object };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={key}\n title={key}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n\n onFocusKeyPath(newKeyPath);\n }}\n rightParam={\n <Edit\n size={16}\n role=\"button\"\n aria-label=\"Open the editor\"\n onClick={(e) => {\n e.stopPropagation();\n\n onClickEdit?.(newKeyPath);\n }}\n />\n }\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={section[key]} />\n </ItemLayout>\n );\n });\n};\n","/* eslint-disable import/no-cycle */\n\nimport {\n type KeyPath,\n NodeType,\n type TranslationContent,\n type DictionaryValue,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype TranslationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: TranslationContent<DictionaryValue>;\n};\n\nexport const TranslationWrapper: FC<TranslationWrapperProps> = (props) => {\n const { keyPath, section, locale } = props;\n\n const newKeyPathEl: KeyPath = {\n type: NodeType.Translation,\n key: locale,\n };\n\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section.translation[\n locale as unknown as keyof (typeof section)['translation']\n ]!;\n\n return <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />;\n};\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport {\n type EnumerationContent,\n type TranslationContent,\n NodeType,\n type KeyPath,\n type DictionaryValue,\n} from '@intlayer/core';\nimport {\n createElement,\n type ReactElement,\n type ReactNode,\n type FC,\n} from 'react';\nimport { ArrayWrapper } from './ArrayWrapper';\nimport { EnumerationWrapper } from './EnumerationWrapper';\nimport { NestedObjectWrapper } from './NestedObjectWrapper';\nimport { StringWrapper } from './StringWrapper';\nimport { TranslationWrapper } from './TranslationWrapper';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\nconst isReactNode = (node: Record<string, unknown>): boolean =>\n typeof node?.key !== 'undefined' && typeof node?.props !== 'undefined';\n\nexport type NodeWrapperProps = {\n keyPath: KeyPath[];\n section: DictionaryValue;\n onContentChange: (content: { keyPath: KeyPath[]; newValue: string }) => void;\n locale: Locales;\n editedContent: DictionaryValue;\n focusedKeyPath: KeyPath[] | undefined;\n onFocusKeyPath: (keyPath: KeyPath[]) => void;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nconst createReactElement = (element: ReactElement) => {\n if (typeof element === 'string') {\n // If it's a string, simply return it (used for text content)\n return element;\n }\n\n const convertChildrenAsArray = (element: ReactElement): ReactElement => {\n if (element?.props && typeof element.props.children === 'object') {\n const childrenResult: ReactNode[] = [];\n const { children } = element.props;\n\n // Create the children elements recursively, if any\n Object.keys(children).forEach((key) => {\n childrenResult.push(createReactElement(children[key]));\n });\n\n return {\n ...element,\n props: { ...element.props, children: childrenResult },\n };\n }\n\n return {\n ...element,\n props: { ...element.props, children: element.props.children },\n };\n };\n\n const fixedElement = convertChildrenAsArray(element);\n\n const { type, props } = fixedElement;\n\n // Create and return the React element\n return createElement(type ?? 'div', props, ...props.children);\n};\n\nexport const NodeWrapper: FC<NodeWrapperProps> = (props) => {\n const { section } = props;\n\n if (typeof section === 'object') {\n if (isReactNode(section as Record<string, unknown>)) {\n return (\n <>\n {createReactElement(section as unknown as ReactElement)}\n <span className=\"text-neutral dark:text-neutral-dark text-xs\">\n React node not editable\n </span>\n </>\n );\n }\n\n if (\n (section as TranslationContent<DictionaryValue>).nodeType ===\n NodeType.Translation\n ) {\n return (\n <TranslationWrapper\n {...props}\n section={section as TranslationContent<DictionaryValue>}\n />\n );\n }\n\n if (\n (section as EnumerationContent<DictionaryValue>).nodeType ===\n NodeType.Enumeration\n ) {\n return (\n <EnumerationWrapper\n {...props}\n section={section as EnumerationContent<DictionaryValue>}\n />\n );\n }\n\n if (Array.isArray(section)) {\n return <ArrayWrapper {...props} section={section as DictionaryValue[]} />;\n }\n\n return (\n <NestedObjectWrapper\n {...props}\n section={section as Record<string, DictionaryValue>}\n />\n );\n }\n\n if (typeof section === 'string') {\n return <StringWrapper {...props} section={section} />;\n }\n};\n"],"names":["jsx","jsxs","Fragment","element"],"mappings":";;;;;;;AAgBa,MAAA,eAAsC,CAAC,UAAU;AACtD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC;AAAA,EAChB,IAAA;AAEJ,SAAO,QAAQ,IAAI,CA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AAU,+CAA8C,UAE9D,2BAAA;AAAA,MACF,EAAA,CAAA;AAAA,IAEJ;AAGG,QAAA,QAAgD,aACjD,SAAS,aACT;AAEE,aAAAA,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAGN;AAGG,QAAA,QAAgD,aACjD,SAAS,aACT;AAEE,aAAAA,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAGN;AAEI,QAAA,MAAM,QAAQ,OAAO,GAAG;AAC1B,aAAQA,kCAAAA,IAAA,cAAA,EAAc,GAAG,OAAO,QAAuC,CAAA;AAAA,IACzE;AAGE,WAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AAEI,MAAA,OAAO,YAAY,UAAU;AAC/B,WAAQA,kCAAAA,IAAA,eAAA,EAAe,GAAG,OAAO,QAAkB,CAAA;AAAA,EACrD;AACF;"}
1
+ {"version":3,"file":"index-D9oaKvKC.js","sources":["../src/components/DictionaryEditor/NodeWrapper/ArrayWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/TranslationWrapper.tsx","../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport {\n isSameKeyPath,\n NodeType,\n type DictionaryValue,\n type KeyPath,\n} from '@intlayer/core';\nimport { Edit } from 'lucide-react';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype ArrayWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: DictionaryValue[];\n};\n\nexport const ArrayWrapper: FC<ArrayWrapperProps> = (props) => {\n const {\n keyPath,\n section,\n onFocusKeyPath,\n onClickEdit,\n focusedKeyPath = [],\n } = props;\n\n return section.map((subSection, key) => {\n const newKeyPathEl: KeyPath = {\n key,\n type: NodeType.Array,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={JSON.stringify(subSection)}\n title={`${key}`}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(newKeyPath);\n }}\n rightParam={\n <Edit\n size={16}\n role=\"button\"\n aria-label=\"Open the editor\"\n onClick={(e) => {\n e.stopPropagation();\n\n onClickEdit?.(newKeyPath);\n }}\n />\n }\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </ItemLayout>\n );\n });\n};\n","/* eslint-disable import/no-cycle */\nimport {\n type KeyPath,\n NodeType,\n type EnumerationContent,\n type DictionaryValue,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, traceKeys, type NodeWrapperProps } from './index';\n\ntype EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: EnumerationContent<DictionaryValue>;\n};\n\nexport const EnumerationWrapper: FC<EnumerationWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeType.Enumeration,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section.enumeration[key as keyof (typeof section)['enumeration']]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n","/* eslint-disable import/no-cycle */\n\nimport {\n type KeyPath,\n isSameKeyPath,\n type DictionaryValue,\n NodeType,\n} from '@intlayer/core';\nimport { Edit } from 'lucide-react';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, traceKeys, type NodeWrapperProps } from './index';\n\ntype NestedObjectWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: Record<string, DictionaryValue>;\n};\n\nexport const NestedObjectWrapper: FC<NestedObjectWrapperProps> = (props) => {\n const {\n keyPath,\n section,\n focusedKeyPath = [],\n onClickEdit,\n onFocusKeyPath,\n } = props;\n\n return Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = { key, type: NodeType.Object };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={key}\n title={key}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n\n onFocusKeyPath(newKeyPath);\n }}\n rightParam={\n <Edit\n size={16}\n role=\"button\"\n aria-label=\"Open the editor\"\n onClick={(e) => {\n e.stopPropagation();\n\n onClickEdit?.(newKeyPath);\n }}\n />\n }\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={section[key]} />\n </ItemLayout>\n );\n });\n};\n","/* eslint-disable import/no-cycle */\n\nimport {\n type KeyPath,\n NodeType,\n type TranslationContent,\n type DictionaryValue,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype TranslationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: TranslationContent<DictionaryValue>;\n};\n\nexport const TranslationWrapper: FC<TranslationWrapperProps> = (props) => {\n const { keyPath, section, locale } = props;\n\n const newKeyPathEl: KeyPath = {\n type: NodeType.Translation,\n key: locale,\n };\n\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section.translation[\n locale as unknown as keyof (typeof section)['translation']\n ]!;\n\n return <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />;\n};\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport {\n type EnumerationContent,\n type TranslationContent,\n NodeType,\n type KeyPath,\n type DictionaryValue,\n} from '@intlayer/core';\nimport {\n createElement,\n type ReactElement,\n type ReactNode,\n type FC,\n} from 'react';\nimport { ArrayWrapper } from './ArrayWrapper';\nimport { EnumerationWrapper } from './EnumerationWrapper';\nimport { NestedObjectWrapper } from './NestedObjectWrapper';\nimport { StringWrapper } from './StringWrapper';\nimport { TranslationWrapper } from './TranslationWrapper';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\nconst isReactNode = (node: Record<string, unknown>): boolean =>\n typeof node?.key !== 'undefined' && typeof node?.props !== 'undefined';\n\nexport type NodeWrapperProps = {\n keyPath: KeyPath[];\n section: DictionaryValue;\n onContentChange: (content: { keyPath: KeyPath[]; newValue: string }) => void;\n locale: Locales;\n editedContent: DictionaryValue;\n focusedKeyPath: KeyPath[] | undefined;\n onFocusKeyPath: (keyPath: KeyPath[]) => void;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nconst createReactElement = (element: ReactElement) => {\n if (typeof element === 'string') {\n // If it's a string, simply return it (used for text content)\n return element;\n }\n\n const convertChildrenAsArray = (element: ReactElement): ReactElement => {\n if (element?.props && typeof element.props.children === 'object') {\n const childrenResult: ReactNode[] = [];\n const { children } = element.props;\n\n // Create the children elements recursively, if any\n Object.keys(children).forEach((key) => {\n childrenResult.push(createReactElement(children[key]));\n });\n\n return {\n ...element,\n props: { ...element.props, children: childrenResult },\n };\n }\n\n return {\n ...element,\n props: { ...element.props, children: element.props.children },\n };\n };\n\n const fixedElement = convertChildrenAsArray(element);\n\n const { type, props } = fixedElement;\n\n // Create and return the React element\n return createElement(type ?? 'div', props, ...props.children);\n};\n\nexport const NodeWrapper: FC<NodeWrapperProps> = (props) => {\n const { section } = props;\n\n if (typeof section === 'object') {\n if (isReactNode(section as Record<string, unknown>)) {\n return (\n <>\n {createReactElement(section as unknown as ReactElement)}\n <span className=\"text-neutral dark:text-neutral-dark text-xs\">\n React node not editable\n </span>\n </>\n );\n }\n\n if (\n (section as TranslationContent<DictionaryValue>).nodeType ===\n NodeType.Translation\n ) {\n return (\n <TranslationWrapper\n {...props}\n section={section as TranslationContent<DictionaryValue>}\n />\n );\n }\n\n if (\n (section as EnumerationContent<DictionaryValue>).nodeType ===\n NodeType.Enumeration\n ) {\n return (\n <EnumerationWrapper\n {...props}\n section={section as EnumerationContent<DictionaryValue>}\n />\n );\n }\n\n if (Array.isArray(section)) {\n return <ArrayWrapper {...props} section={section as DictionaryValue[]} />;\n }\n\n return (\n <NestedObjectWrapper\n {...props}\n section={section as Record<string, DictionaryValue>}\n />\n );\n }\n\n if (typeof section === 'string') {\n return <StringWrapper {...props} section={section} />;\n }\n};\n"],"names":["jsx","jsxs","Fragment","element"],"mappings":";;;;;;;AAgBa,MAAA,eAAsC,CAAC,UAAU;AACtD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,CAAA;AAAA,EAAC,IAChB;AAEJ,SAAO,QAAQ,IAAI,CAAC,YAAY,QAAQ;AACtC,UAAM,eAAwB;AAAA,MAC5B;AAAA,MACA,MAAM,SAAS;AAAA,IACjB;AACA,UAAM,aAAwB,CAAC,GAAG,SAAS,YAAY;AAGrD,WAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAO,QAAQ;AAAA,QAEf,OAAO,GAAG,GAAG;AAAA,QACb,aAAY;AAAA,QACZ,YAAY,cAAc,YAAY,cAAc;AAAA,QACpD,SAAS,CAAC,MAAM;AACd,YAAE,gBAAgB;AAClB,yBAAe,UAAU;AAAA,QAC3B;AAAA,QACA,YACEA,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,MAAK;AAAA,YACL,cAAW;AAAA,YACX,SA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