@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.
- package/dist/Form-BDcoNTLV.cjs.map +1 -1
- package/dist/Form-DhsgC7kB.js.map +1 -1
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
- package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +10 -10
- package/dist/components/Auth/ChangePasswordForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +5 -5
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +7 -7
- package/dist/components/Auth/ResetPasswordForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInSchema.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInSchema.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/index.content.d.ts +13 -13
- package/dist/components/Auth/SignInForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/index.content.d.ts +11 -11
- package/dist/components/Auth/SignUpForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/useAuth/index.cjs.map +1 -1
- package/dist/components/Auth/useAuth/index.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
- package/dist/components/Auth/useUser/index.cjs.map +1 -1
- package/dist/components/Auth/useUser/index.mjs.map +1 -1
- package/dist/components/Avatar/index.cjs.map +1 -1
- package/dist/components/Avatar/index.mjs.map +1 -1
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.mjs.map +1 -1
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Command/index.cjs.map +1 -1
- package/dist/components/Command/index.mjs.map +1 -1
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/CopyToClipboard/index.cjs.map +1 -1
- package/dist/components/CopyToClipboard/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Footer/index.cjs.map +1 -1
- package/dist/components/Footer/index.mjs.map +1 -1
- package/dist/components/Form/FormBase.cjs.map +1 -1
- package/dist/components/Form/FormBase.mjs.map +1 -1
- package/dist/components/Form/FormControl.cjs.map +1 -1
- package/dist/components/Form/FormControl.mjs.map +1 -1
- package/dist/components/Form/FormDescription.cjs.map +1 -1
- package/dist/components/Form/FormDescription.mjs.map +1 -1
- package/dist/components/Form/FormField.cjs.map +1 -1
- package/dist/components/Form/FormField.mjs.map +1 -1
- package/dist/components/Form/FormItem.cjs.map +1 -1
- package/dist/components/Form/FormItem.mjs.map +1 -1
- package/dist/components/Form/FormLabel.cjs.map +1 -1
- package/dist/components/Form/FormLabel.mjs.map +1 -1
- package/dist/components/Form/FormMessage.cjs.map +1 -1
- package/dist/components/Form/FormMessage.mjs.map +1 -1
- package/dist/components/Form/elements/FormElementWrapper.cjs.map +1 -1
- package/dist/components/Form/elements/FormElementWrapper.mjs.map +1 -1
- package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
- package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
- package/dist/components/Headers/SectionScroller.cjs.map +1 -1
- package/dist/components/Headers/SectionScroller.mjs.map +1 -1
- package/dist/components/Headers/index.cjs.map +1 -1
- package/dist/components/Headers/index.mjs.map +1 -1
- package/dist/components/IDE/CodeRender.cjs.map +1 -1
- package/dist/components/IDE/CodeRender.mjs.map +1 -1
- package/dist/components/IDE/FileList.cjs.map +1 -1
- package/dist/components/IDE/FileList.mjs.map +1 -1
- package/dist/components/IDE/FileTree.cjs.map +1 -1
- package/dist/components/IDE/FileTree.mjs.map +1 -1
- package/dist/components/IDE/IDE.cjs +1 -1
- package/dist/components/IDE/IDE.cjs.map +1 -1
- package/dist/components/IDE/IDE.mjs +1 -1
- package/dist/components/IDE/IDE.mjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/components/IDE/createFileTree.cjs.map +1 -1
- package/dist/components/IDE/createFileTree.mjs.map +1 -1
- package/dist/components/Input/Checkbox.cjs.map +1 -1
- package/dist/components/Input/Checkbox.mjs.map +1 -1
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/InputPassword.cjs.map +1 -1
- package/dist/components/Input/InputPassword.mjs.map +1 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Loader/spinner.cjs.map +1 -1
- package/dist/components/Loader/spinner.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/Logo/LogoCircle.cjs.map +1 -1
- package/dist/components/Logo/LogoCircle.mjs.map +1 -1
- package/dist/components/Logo/LogoNoFrame.cjs.map +1 -1
- package/dist/components/Logo/LogoNoFrame.mjs.map +1 -1
- package/dist/components/Logo/LogoSquare.cjs.map +1 -1
- package/dist/components/Logo/LogoSquare.mjs.map +1 -1
- package/dist/components/Logo/LogoSquircle.cjs.map +1 -1
- package/dist/components/Logo/LogoSquircle.mjs.map +1 -1
- package/dist/components/Logo/LogoTextOnly.cjs.map +1 -1
- package/dist/components/Logo/LogoTextOnly.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowCircle.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowCircle.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowSquircle.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowSquircle.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextCircle.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextCircle.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextNoFrame.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextNoFrame.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextSquircle.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextSquircle.mjs.map +1 -1
- package/dist/components/Logo/index.cjs.map +1 -1
- package/dist/components/Logo/index.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/components/MaxWidthSmoother/index.cjs.map +1 -1
- package/dist/components/MaxWidthSmoother/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/Burger.cjs.map +1 -1
- package/dist/components/Navbar/Burger.mjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Navbar/useNavigation.cjs.map +1 -1
- package/dist/components/Navbar/useNavigation.mjs.map +1 -1
- package/dist/components/Pattern/DotPattern.cjs.map +1 -1
- package/dist/components/Pattern/DotPattern.mjs.map +1 -1
- package/dist/components/Pattern/GridPattern.cjs.map +1 -1
- package/dist/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/components/Pattern/SpotLight.cjs.map +1 -1
- package/dist/components/Pattern/SpotLight.mjs.map +1 -1
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.cjs.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.mjs.map +1 -1
- package/dist/components/ProfileDropDown/index.cjs.map +1 -1
- package/dist/components/ProfileDropDown/index.mjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/components/RightDrawer/useRightDrawerStore.cjs.map +1 -1
- package/dist/components/RightDrawer/useRightDrawerStore.mjs.map +1 -1
- package/dist/components/Select/Multiselect.cjs.map +1 -1
- package/dist/components/Select/Multiselect.mjs.map +1 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
- package/dist/components/Toaster/Toast.cjs.map +1 -1
- package/dist/components/Toaster/Toast.mjs.map +1 -1
- package/dist/components/Toaster/Toaster.cjs.map +1 -1
- package/dist/components/Toaster/Toaster.mjs.map +1 -1
- package/dist/components/Toaster/useToast.cjs.map +1 -1
- package/dist/components/Toaster/useToast.mjs.map +1 -1
- package/dist/components/WithResizer/index.cjs.map +1 -1
- package/dist/components/WithResizer/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useDevice.cjs.map +1 -1
- package/dist/hooks/useDevice.mjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
- package/dist/hooks/useGetElementOrWindow.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/hooks/useIsMounted.cjs.map +1 -1
- package/dist/hooks/useIsMounted.mjs.map +1 -1
- package/dist/hooks/useItemSelector.cjs.map +1 -1
- package/dist/hooks/useItemSelector.mjs.map +1 -1
- package/dist/hooks/usePersistedStore.cjs.map +1 -1
- package/dist/hooks/usePersistedStore.mjs.map +1 -1
- package/dist/hooks/useScrollBlockage/index.cjs.map +1 -1
- package/dist/hooks/useScrollBlockage/index.mjs.map +1 -1
- package/dist/hooks/useScrollBlockage/useScrollBlockageStore.cjs.map +1 -1
- package/dist/hooks/useScrollBlockage/useScrollBlockageStore.mjs.map +1 -1
- package/dist/hooks/useScrollDetection.cjs.map +1 -1
- package/dist/hooks/useScrollDetection.mjs.map +1 -1
- package/dist/index-BtZWYJhL.cjs.map +1 -1
- package/dist/index-D9oaKvKC.js.map +1 -1
- package/dist/jsx-runtime-DaNGiM0W.js.map +1 -1
- package/dist/jsx-runtime-XHKiWCTo.cjs.map +1 -1
- package/dist/libs/intlayer-api/auth.cjs.map +1 -1
- package/dist/libs/intlayer-api/auth.mjs.map +1 -1
- package/dist/libs/intlayer-api/dictionary.cjs.map +1 -1
- package/dist/libs/intlayer-api/dictionary.mjs.map +1 -1
- package/dist/libs/intlayer-api/fetcher.cjs.map +1 -1
- package/dist/libs/intlayer-api/fetcher.mjs.map +1 -1
- package/dist/libs/intlayer-api/organization.cjs.map +1 -1
- package/dist/libs/intlayer-api/organization.mjs.map +1 -1
- package/dist/libs/intlayer-api/project.cjs.map +1 -1
- package/dist/libs/intlayer-api/project.mjs.map +1 -1
- package/dist/libs/intlayer-api/stripe.cjs.map +1 -1
- package/dist/libs/intlayer-api/stripe.mjs.map +1 -1
- package/dist/libs/intlayer-api/user.cjs.map +1 -1
- package/dist/libs/intlayer-api/user.mjs.map +1 -1
- package/dist/shallow-lhDIFtEp.cjs.map +1 -1
- package/dist/shallow-m9BpCkKh.js.map +1 -1
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.mjs.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/utils/camelCase.cjs.map +1 -1
- package/dist/utils/camelCase.mjs.map +1 -1
- package/dist/utils/capitalize.cjs.map +1 -1
- package/dist/utils/capitalize.mjs.map +1 -1
- package/dist/utils/dictionary.cjs.map +1 -1
- package/dist/utils/dictionary.mjs.map +1 -1
- package/dist/utils/isElementAtTopAndNotCovered.cjs.map +1 -1
- package/dist/utils/isElementAtTopAndNotCovered.mjs.map +1 -1
- package/dist/utils/object.cjs.map +1 -1
- package/dist/utils/object.mjs.map +1 -1
- package/dist/zod-BV4nCGJE.js.map +1 -1
- package/dist/zod-DSrtTSD_.cjs.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camelCase.cjs","sources":["../../src/utils/camelCase.ts"],"sourcesContent":["export const sentenceToCamelCase = (string: string): string => {\n const sentence = string\n .split(' ')\n .map(\n (word) => `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`\n )\n .join('');\n\n return `${sentence.charAt(0).toLowerCase()}${sentence.slice(1)}`;\n};\n\nexport const camelCaseToSentence = (string: string): string => {\n const result = string.replace(/([A-Z])/g, ' $1');\n return result.toLowerCase().trim();\n};\n"],"names":[],"mappings":";;AAAa,MAAA,sBAAsB,CAAC,WAA2B;AAC7D,QAAM,WAAW,OACd,MAAM,GAAG,EACT;AAAA,IACC,CAAC,SAAS,GAAG,KAAK,OAAO,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"camelCase.cjs","sources":["../../src/utils/camelCase.ts"],"sourcesContent":["export const sentenceToCamelCase = (string: string): string => {\n const sentence = string\n .split(' ')\n .map(\n (word) => `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`\n )\n .join('');\n\n return `${sentence.charAt(0).toLowerCase()}${sentence.slice(1)}`;\n};\n\nexport const camelCaseToSentence = (string: string): string => {\n const result = string.replace(/([A-Z])/g, ' $1');\n return result.toLowerCase().trim();\n};\n"],"names":[],"mappings":";;AAAa,MAAA,sBAAsB,CAAC,WAA2B;AAC7D,QAAM,WAAW,OACd,MAAM,GAAG,EACT;AAAA,IACC,CAAC,SAAS,GAAG,KAAK,OAAO,CAAC,EAAE,YAAa,CAAA,GAAG,KAAK,MAAM,CAAC,EAAE,aAAa;AAAA,EAAA,EAExE,KAAK,EAAE;AAEH,SAAA,GAAG,SAAS,OAAO,CAAC,EAAE,YAAa,CAAA,GAAG,SAAS,MAAM,CAAC,CAAC;AAChE;AAEa,MAAA,sBAAsB,CAAC,WAA2B;AAC7D,QAAM,SAAS,OAAO,QAAQ,YAAY,KAAK;AACxC,SAAA,OAAO,YAAY,EAAE,KAAK;AACnC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camelCase.mjs","sources":["../../src/utils/camelCase.ts"],"sourcesContent":["export const sentenceToCamelCase = (string: string): string => {\n const sentence = string\n .split(' ')\n .map(\n (word) => `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`\n )\n .join('');\n\n return `${sentence.charAt(0).toLowerCase()}${sentence.slice(1)}`;\n};\n\nexport const camelCaseToSentence = (string: string): string => {\n const result = string.replace(/([A-Z])/g, ' $1');\n return result.toLowerCase().trim();\n};\n"],"names":[],"mappings":"AAAa,MAAA,sBAAsB,CAAC,WAA2B;AAC7D,QAAM,WAAW,OACd,MAAM,GAAG,EACT;AAAA,IACC,CAAC,SAAS,GAAG,KAAK,OAAO,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"camelCase.mjs","sources":["../../src/utils/camelCase.ts"],"sourcesContent":["export const sentenceToCamelCase = (string: string): string => {\n const sentence = string\n .split(' ')\n .map(\n (word) => `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`\n )\n .join('');\n\n return `${sentence.charAt(0).toLowerCase()}${sentence.slice(1)}`;\n};\n\nexport const camelCaseToSentence = (string: string): string => {\n const result = string.replace(/([A-Z])/g, ' $1');\n return result.toLowerCase().trim();\n};\n"],"names":[],"mappings":"AAAa,MAAA,sBAAsB,CAAC,WAA2B;AAC7D,QAAM,WAAW,OACd,MAAM,GAAG,EACT;AAAA,IACC,CAAC,SAAS,GAAG,KAAK,OAAO,CAAC,EAAE,YAAa,CAAA,GAAG,KAAK,MAAM,CAAC,EAAE,aAAa;AAAA,EAAA,EAExE,KAAK,EAAE;AAEH,SAAA,GAAG,SAAS,OAAO,CAAC,EAAE,YAAa,CAAA,GAAG,SAAS,MAAM,CAAC,CAAC;AAChE;AAEa,MAAA,sBAAsB,CAAC,WAA2B;AAC7D,QAAM,SAAS,OAAO,QAAQ,YAAY,KAAK;AACxC,SAAA,OAAO,YAAY,EAAE,KAAK;AACnC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capitalize.cjs","sources":["../../src/utils/capitalize.ts"],"sourcesContent":["export const capitalize = (string: string | undefined) => {\n if (!string) {\n return '';\n }\n\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n"],"names":[],"mappings":";;AAAa,MAAA,aAAa,CAAC,WAA+B;AACxD,MAAI,CAAC,QAAQ;AACJ,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"capitalize.cjs","sources":["../../src/utils/capitalize.ts"],"sourcesContent":["export const capitalize = (string: string | undefined) => {\n if (!string) {\n return '';\n }\n\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n"],"names":[],"mappings":";;AAAa,MAAA,aAAa,CAAC,WAA+B;AACxD,MAAI,CAAC,QAAQ;AACJ,WAAA;AAAA,EAAA;AAGF,SAAA,OAAO,OAAO,CAAC,EAAE,gBAAgB,OAAO,MAAM,CAAC;AACxD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capitalize.mjs","sources":["../../src/utils/capitalize.ts"],"sourcesContent":["export const capitalize = (string: string | undefined) => {\n if (!string) {\n return '';\n }\n\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n"],"names":[],"mappings":"AAAa,MAAA,aAAa,CAAC,WAA+B;AACxD,MAAI,CAAC,QAAQ;AACJ,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"capitalize.mjs","sources":["../../src/utils/capitalize.ts"],"sourcesContent":["export const capitalize = (string: string | undefined) => {\n if (!string) {\n return '';\n }\n\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n"],"names":[],"mappings":"AAAa,MAAA,aAAa,CAAC,WAA+B;AACxD,MAAI,CAAC,QAAQ;AACJ,WAAA;AAAA,EAAA;AAGF,SAAA,OAAO,OAAO,CAAC,EAAE,gBAAgB,OAAO,MAAM,CAAC;AACxD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.cjs","sources":["../../src/utils/dictionary.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n NodeType,\n type TranslationContent,\n type DictionaryValue,\n type KeyPath,\n type EnumerationContent,\n} from '@intlayer/core';\nimport { isValidElement } from 'react';\n\nexport const getDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = JSON.parse(JSON.stringify(dictionaryContent ?? {}));\n\n for (const keyObj of keyPath) {\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n currentValue = currentValue?.[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n currentValue = currentValue?.[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n currentValue = currentValue?.[NodeType.Enumeration][keyObj.key];\n }\n }\n\n return currentValue as DictionaryValue;\n};\n\ntype LastKeyType = string | number;\n\nexport const editDictionaryByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[],\n newValue: DictionaryValue\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKeys: LastKeyType[] = [];\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue = {\n ...currentValue,\n [keyObj.key]: {},\n };\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Array) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue[keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKeys = [NodeType.Translation, keyObj.key];\n\n if (!currentValue[NodeType.Translation]) {\n currentValue[NodeType.Translation] = {\n ...currentValue[NodeType.Translation],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKeys = [NodeType.Enumeration, keyObj.key];\n\n if (!currentValue[NodeType.Enumeration]) {\n currentValue[NodeType.Enumeration] = {\n ...currentValue[NodeType.Enumeration],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n // Assign the new value to the last key of the parent\n if (parentValue && lastKeys.length > 0) {\n for (const key of lastKeys.slice(0, -1)) {\n parentValue = parentValue[key];\n }\n if (\n // Remove the field if the new value is undefined\n typeof newValue === 'undefined'\n ) {\n delete parentValue[lastKeys[lastKeys.length - 1]];\n } else {\n parentValue[lastKeys[lastKeys.length - 1]] = newValue;\n }\n }\n\n return dictionaryContent;\n};\n\nexport const removeDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue.splice(lastKey as unknown as number, 1);\n } else {\n delete parentValue[lastKey];\n }\n }\n\n return dictionaryContent;\n};\n\nexport const renameDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n newKey: string | number,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n // Assign the new value to the last key of the parent while preserving the order\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue[lastKey as number] = currentValue;\n } else {\n const newParentValue: any = {};\n for (const key of Object.keys(parentValue)) {\n if (key === lastKey) {\n newParentValue[newKey] = currentValue;\n } else {\n newParentValue[key] = parentValue[key];\n }\n }\n // Replace the contents of parentValue with newParentValue\n Object.keys(parentValue).forEach((key) => delete parentValue[key]);\n Object.assign(parentValue, newParentValue);\n }\n }\n\n return dictionaryContent;\n};\n\nexport const getSectionType = (section: DictionaryValue): NodeType => {\n if (typeof section === 'string') {\n return NodeType.Text;\n }\n\n if (\n (section as TranslationContent<unknown>)?.nodeType === NodeType.Translation\n ) {\n return NodeType.Translation;\n }\n\n if (\n (section as EnumerationContent<unknown>)?.nodeType === NodeType.Enumeration\n ) {\n return NodeType.Enumeration;\n }\n\n if (Array.isArray(section)) {\n return NodeType.Array;\n }\n\n if (isValidElement(section)) {\n return NodeType.ReactNode;\n }\n\n return NodeType.Object;\n};\n"],"names":["NodeType","isValidElement"],"mappings":";;;;AAUa,MAAA,8BAA8B,CACzC,mBACA,YACoB;AAChB,MAAA,eAAoB,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAE,CAAA,CAAC;AAE1E,aAAW,UAAU,SAAS;AAC5B,QAAI,OAAO,SAASA,cAAS,UAAU,OAAO,SAASA,cAAS,OAAO;AACtD,qBAAA,eAAe,OAAO,GAAG;AAAA,IAC/B,WAAA,OAAO,SAASA,KAAAA,SAAS,aAAa;AAC/C,qBAAe,eAAeA,KAAA,SAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IACrD,WAAA,OAAO,SAASA,KAAAA,SAAS,aAAa;AAC/C,qBAAe,eAAeA,KAAA,SAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAChE;AAAA,EACF;AAEO,SAAA;AACT;AAIO,MAAM,0BAA0B,CACrC,mBACA,SACA,aACoB;AACpB,MAAI,eAAoB;AACxB,MAAI,cAAmB;AACvB,MAAI,WAA0B,CAAA;AAE9B,aAAW,UAAU,SAAS;AACd,kBAAA;AAEV,QAAA,OAAO,SAASA,KAAA,SAAS,QAAQ;AACxB,iBAAA,CAAC,OAAO,GAAG;AAEtB,UAAI,CAAC,aAAa,OAAO,GAAG,GAAG;AACd,uBAAA;AAAA,UACb,GAAG;AAAA,UACH,CAAC,OAAO,GAAG,GAAG,CAAC;AAAA,QAAA;AAAA,MAEnB;AACe,qBAAA,aAAa,OAAO,GAAG;AAAA,IAC7B,WAAA,OAAO,SAASA,KAAAA,SAAS,OAAO;AAC9B,iBAAA,CAAC,OAAO,GAAG;AAEtB,UAAI,CAAC,aAAa,OAAO,GAAG,GAAG;AAChB,qBAAA,OAAO,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;AACL,YAAM,iBAAsB,CAAA;AAC5B,iBAAW,OAAO,OAAO,KAAK,WAAW,GAAG;AAC1C,YAAI,QAAQ,SAAS;AACnB,yBAAe,MAAM,IAAI;AAAA,QAAA,OACpB;AACU,yBAAA,GAAG,IAAI,YAAY,GAAG;AAAA,QACvC;AAAA,MACF;AAEO,aAAA,KAAK,WAAW,EAAE,QAAQ,CAAC,QAAQ,OAAO,YAAY,GAAG,CAAC;AAC1D,aAAA,OAAO,aAAa,cAAc;AAAA,IAC3C;AAAA,EACF;AAEO,SAAA;AACT;AAEa,MAAA,iBAAiB,CAAC,YAAuC;AAChE,MAAA,OAAO,YAAY,UAAU;AAC/B,WAAOA,KAAAA,SAAS;AAAA,EAClB;AAGG,MAAA,SAAyC,aAAaA,KAAA,SAAS,aAChE;AACA,WAAOA,KAAAA,SAAS;AAAA,EAClB;AAGG,MAAA,SAAyC,aAAaA,KAAA,SAAS,aAChE;AACA,WAAOA,KAAAA,SAAS;AAAA,EAClB;AAEI,MAAA,MAAM,QAAQ,OAAO,GAAG;AAC1B,WAAOA,KAAAA,SAAS;AAAA,EAClB;AAEI,MAAAC,WAAAA,eAAe,OAAO,GAAG;AAC3B,WAAOD,KAAAA,SAAS;AAAA,EAClB;AAEA,SAAOA,KAAAA,SAAS;AAClB;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dictionary.cjs","sources":["../../src/utils/dictionary.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n NodeType,\n type TranslationContent,\n type DictionaryValue,\n type KeyPath,\n type EnumerationContent,\n} from '@intlayer/core';\nimport { isValidElement } from 'react';\n\nexport const getDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = JSON.parse(JSON.stringify(dictionaryContent ?? {}));\n\n for (const keyObj of keyPath) {\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n currentValue = currentValue?.[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n currentValue = currentValue?.[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n currentValue = currentValue?.[NodeType.Enumeration][keyObj.key];\n }\n }\n\n return currentValue as DictionaryValue;\n};\n\ntype LastKeyType = string | number;\n\nexport const editDictionaryByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[],\n newValue: DictionaryValue\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKeys: LastKeyType[] = [];\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue = {\n ...currentValue,\n [keyObj.key]: {},\n };\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Array) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue[keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKeys = [NodeType.Translation, keyObj.key];\n\n if (!currentValue[NodeType.Translation]) {\n currentValue[NodeType.Translation] = {\n ...currentValue[NodeType.Translation],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKeys = [NodeType.Enumeration, keyObj.key];\n\n if (!currentValue[NodeType.Enumeration]) {\n currentValue[NodeType.Enumeration] = {\n ...currentValue[NodeType.Enumeration],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n // Assign the new value to the last key of the parent\n if (parentValue && lastKeys.length > 0) {\n for (const key of lastKeys.slice(0, -1)) {\n parentValue = parentValue[key];\n }\n if (\n // Remove the field if the new value is undefined\n typeof newValue === 'undefined'\n ) {\n delete parentValue[lastKeys[lastKeys.length - 1]];\n } else {\n parentValue[lastKeys[lastKeys.length - 1]] = newValue;\n }\n }\n\n return dictionaryContent;\n};\n\nexport const removeDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue.splice(lastKey as unknown as number, 1);\n } else {\n delete parentValue[lastKey];\n }\n }\n\n return dictionaryContent;\n};\n\nexport const renameDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n newKey: string | number,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n // Assign the new value to the last key of the parent while preserving the order\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue[lastKey as number] = currentValue;\n } else {\n const newParentValue: any = {};\n for (const key of Object.keys(parentValue)) {\n if (key === lastKey) {\n newParentValue[newKey] = currentValue;\n } else {\n newParentValue[key] = parentValue[key];\n }\n }\n // Replace the contents of parentValue with newParentValue\n Object.keys(parentValue).forEach((key) => delete parentValue[key]);\n Object.assign(parentValue, newParentValue);\n }\n }\n\n return dictionaryContent;\n};\n\nexport const getSectionType = (section: DictionaryValue): NodeType => {\n if (typeof section === 'string') {\n return NodeType.Text;\n }\n\n if (\n (section as TranslationContent<unknown>)?.nodeType === NodeType.Translation\n ) {\n return NodeType.Translation;\n }\n\n if (\n (section as EnumerationContent<unknown>)?.nodeType === NodeType.Enumeration\n ) {\n return NodeType.Enumeration;\n }\n\n if (Array.isArray(section)) {\n return NodeType.Array;\n }\n\n if (isValidElement(section)) {\n return NodeType.ReactNode;\n }\n\n return NodeType.Object;\n};\n"],"names":["NodeType","isValidElement"],"mappings":";;;;AAUa,MAAA,8BAA8B,CACzC,mBACA,YACoB;AAChB,MAAA,eAAoB,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAA,CAAE,CAAC;AAE1E,aAAW,UAAU,SAAS;AAC5B,QAAI,OAAO,SAASA,cAAS,UAAU,OAAO,SAASA,cAAS,OAAO;AACtD,qBAAA,eAAe,OAAO,GAAG;AAAA,IAC/B,WAAA,OAAO,SAASA,KAAAA,SAAS,aAAa;AAC/C,qBAAe,eAAeA,KAAA,SAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IACrD,WAAA,OAAO,SAASA,KAAAA,SAAS,aAAa;AAC/C,qBAAe,eAAeA,KAAA,SAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAAA;AAAA,EAChE;AAGK,SAAA;AACT;AAIO,MAAM,0BAA0B,CACrC,mBACA,SACA,aACoB;AACpB,MAAI,eAAoB;AACxB,MAAI,cAAmB;AACvB,MAAI,WAA0B,CAAC;AAE/B,aAAW,UAAU,SAAS;AACd,kBAAA;AAEV,QAAA,OAAO,SAASA,KAAA,SAAS,QAAQ;AACxB,iBAAA,CAAC,OAAO,GAAG;AAEtB,UAAI,CAAC,aAAa,OAAO,GAAG,GAAG;AACd,uBAAA;A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GAAG;AAAA,IACnD,WAAA,OAAO,SAASA,KAAAA,SAAS,aAAa;AAC/C,gBAAUA,KAAS,SAAA;AACnB,qBAAe,aAAaA,KAAA,SAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAAA;AAAA,EAC9D;AAIE,MAAA,eAAe,YAAY,MAAM;AAC/B,QAAA,MAAM,QAAQ,WAAW,GAAG;AAC9B,kBAAY,OAAiB,IAAI;AAAA,IAAA,OAC5B;AACL,YAAM,iBAAsB,CAAC;AAC7B,iBAAW,OAAO,OAAO,KAAK,WAAW,GAAG;AAC1C,YAAI,QAAQ,SAAS;AACnB,yBAAe,MAAM,IAAI;AAAA,QAAA,OACpB;AACU,yBAAA,GAAG,IAAI,YAAY,GAAG;AAAA,QAAA;AAAA,MACvC;AAGK,aAAA,KAAK,WAAW,EAAE,QAAQ,CAAC,QAAQ,OAAO,YAAY,GAAG,CAAC;AAC1D,aAAA,OAAO,aAAa,cAAc;AAAA,IAAA;AAAA,EAC3C;AAGK,SAAA;AACT;AAEa,MAAA,iBAAiB,CAAC,YAAuC;AAChE,MAAA,OAAO,YAAY,UAAU;AAC/B,WAAOA,KAAS,SAAA;AAAA,EAAA;AAIf,MAAA,SAAyC,aAAaA,KAAA,SAAS,aAChE;AACA,WAAOA,KAAS,SAAA;AAAA,EAAA;AAIf,MAAA,SAAyC,aAAaA,KAAA,SAAS,aAChE;AACA,WAAOA,KAAS,SAAA;AAAA,EAAA;AAGd,MAAA,MAAM,QAAQ,OAAO,GAAG;AAC1B,WAAOA,KAAS,SAAA;AAAA,EAAA;AAGd,MAAAC,WAAAA,eAAe,OAAO,GAAG;AAC3B,WAAOD,KAAS,SAAA;AAAA,EAAA;AAGlB,SAAOA,KAAS,SAAA;AAClB;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.mjs","sources":["../../src/utils/dictionary.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n NodeType,\n type TranslationContent,\n type DictionaryValue,\n type KeyPath,\n type EnumerationContent,\n} from '@intlayer/core';\nimport { isValidElement } from 'react';\n\nexport const getDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = JSON.parse(JSON.stringify(dictionaryContent ?? {}));\n\n for (const keyObj of keyPath) {\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n currentValue = currentValue?.[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n currentValue = currentValue?.[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n currentValue = currentValue?.[NodeType.Enumeration][keyObj.key];\n }\n }\n\n return currentValue as DictionaryValue;\n};\n\ntype LastKeyType = string | number;\n\nexport const editDictionaryByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[],\n newValue: DictionaryValue\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKeys: LastKeyType[] = [];\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue = {\n ...currentValue,\n [keyObj.key]: {},\n };\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Array) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue[keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKeys = [NodeType.Translation, keyObj.key];\n\n if (!currentValue[NodeType.Translation]) {\n currentValue[NodeType.Translation] = {\n ...currentValue[NodeType.Translation],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKeys = [NodeType.Enumeration, keyObj.key];\n\n if (!currentValue[NodeType.Enumeration]) {\n currentValue[NodeType.Enumeration] = {\n ...currentValue[NodeType.Enumeration],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n // Assign the new value to the last key of the parent\n if (parentValue && lastKeys.length > 0) {\n for (const key of lastKeys.slice(0, -1)) {\n parentValue = parentValue[key];\n }\n if (\n // Remove the field if the new value is undefined\n typeof newValue === 'undefined'\n ) {\n delete parentValue[lastKeys[lastKeys.length - 1]];\n } else {\n parentValue[lastKeys[lastKeys.length - 1]] = newValue;\n }\n }\n\n return dictionaryContent;\n};\n\nexport const removeDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue.splice(lastKey as unknown as number, 1);\n } else {\n delete parentValue[lastKey];\n }\n }\n\n return dictionaryContent;\n};\n\nexport const renameDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n newKey: string | number,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n // Assign the new value to the last key of the parent while preserving the order\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue[lastKey as number] = currentValue;\n } else {\n const newParentValue: any = {};\n for (const key of Object.keys(parentValue)) {\n if (key === lastKey) {\n newParentValue[newKey] = currentValue;\n } else {\n newParentValue[key] = parentValue[key];\n }\n }\n // Replace the contents of parentValue with newParentValue\n Object.keys(parentValue).forEach((key) => delete parentValue[key]);\n Object.assign(parentValue, newParentValue);\n }\n }\n\n return dictionaryContent;\n};\n\nexport const getSectionType = (section: DictionaryValue): NodeType => {\n if (typeof section === 'string') {\n return NodeType.Text;\n }\n\n if (\n (section as TranslationContent<unknown>)?.nodeType === NodeType.Translation\n ) {\n return NodeType.Translation;\n }\n\n if (\n (section as EnumerationContent<unknown>)?.nodeType === NodeType.Enumeration\n ) {\n return NodeType.Enumeration;\n }\n\n if (Array.isArray(section)) {\n return NodeType.Array;\n }\n\n if (isValidElement(section)) {\n return NodeType.ReactNode;\n }\n\n return NodeType.Object;\n};\n"],"names":[],"mappings":";;AAUa,MAAA,8BAA8B,CACzC,mBACA,YACoB;AAChB,MAAA,eAAoB,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAE,
|
|
1
|
+
{"version":3,"file":"dictionary.mjs","sources":["../../src/utils/dictionary.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n NodeType,\n type TranslationContent,\n type DictionaryValue,\n type KeyPath,\n type EnumerationContent,\n} from '@intlayer/core';\nimport { isValidElement } from 'react';\n\nexport const getDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = JSON.parse(JSON.stringify(dictionaryContent ?? {}));\n\n for (const keyObj of keyPath) {\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n currentValue = currentValue?.[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n currentValue = currentValue?.[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n currentValue = currentValue?.[NodeType.Enumeration][keyObj.key];\n }\n }\n\n return currentValue as DictionaryValue;\n};\n\ntype LastKeyType = string | number;\n\nexport const editDictionaryByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[],\n newValue: DictionaryValue\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKeys: LastKeyType[] = [];\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue = {\n ...currentValue,\n [keyObj.key]: {},\n };\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Array) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue[keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKeys = [NodeType.Translation, keyObj.key];\n\n if (!currentValue[NodeType.Translation]) {\n currentValue[NodeType.Translation] = {\n ...currentValue[NodeType.Translation],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKeys = [NodeType.Enumeration, keyObj.key];\n\n if (!currentValue[NodeType.Enumeration]) {\n currentValue[NodeType.Enumeration] = {\n ...currentValue[NodeType.Enumeration],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n // Assign the new value to the last key of the parent\n if (parentValue && lastKeys.length > 0) {\n for (const key of lastKeys.slice(0, -1)) {\n parentValue = parentValue[key];\n }\n if (\n // Remove the field if the new value is undefined\n typeof newValue === 'undefined'\n ) {\n delete parentValue[lastKeys[lastKeys.length - 1]];\n } else {\n parentValue[lastKeys[lastKeys.length - 1]] = newValue;\n }\n }\n\n return dictionaryContent;\n};\n\nexport const removeDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue.splice(lastKey as unknown as number, 1);\n } else {\n delete parentValue[lastKey];\n }\n }\n\n return dictionaryContent;\n};\n\nexport const renameDictionaryValueByKeyPath = (\n dictionaryContent: DictionaryValue,\n newKey: string | number,\n keyPath: KeyPath[]\n): DictionaryValue => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n }\n }\n\n // Assign the new value to the last key of the parent while preserving the order\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue[lastKey as number] = currentValue;\n } else {\n const newParentValue: any = {};\n for (const key of Object.keys(parentValue)) {\n if (key === lastKey) {\n newParentValue[newKey] = currentValue;\n } else {\n newParentValue[key] = parentValue[key];\n }\n }\n // Replace the contents of parentValue with newParentValue\n Object.keys(parentValue).forEach((key) => delete parentValue[key]);\n Object.assign(parentValue, newParentValue);\n }\n }\n\n return dictionaryContent;\n};\n\nexport const getSectionType = (section: DictionaryValue): NodeType => {\n if (typeof section === 'string') {\n return NodeType.Text;\n }\n\n if (\n (section as TranslationContent<unknown>)?.nodeType === NodeType.Translation\n ) {\n return NodeType.Translation;\n }\n\n if (\n (section as EnumerationContent<unknown>)?.nodeType === NodeType.Enumeration\n ) {\n return NodeType.Enumeration;\n }\n\n if (Array.isArray(section)) {\n return NodeType.Array;\n }\n\n if (isValidElement(section)) {\n return NodeType.ReactNode;\n }\n\n return NodeType.Object;\n};\n"],"names":[],"mappings":";;AAUa,MAAA,8BAA8B,CACzC,mBACA,YACoB;AAChB,MAAA,eAAoB,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAA,CAAE,CAAC;AAE1E,aAAW,UAAU,SAAS;AAC5B,QAAI,OAAO,SAAS,SAAS,UAAU,OAAO,SAAS,SAAS,OAAO;AACtD,qBAAA,eAAe,OAAO,GAAG;AAAA,IAC/B,WAAA,OAAO,SAAS,SAAS,aAAa;AAC/C,qBAAe,eAAe,SAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IACrD,WAAA,OAAO,SAAS,SAAS,aAAa;AAC/C,qBAAe,eAAe,SAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAAA;AAAA,EAChE;AAGK,SAAA;AACT;AAIO,MAAM,0BAA0B,CACrC,mBACA,SACA,aACoB;AACpB,MAAI,eAAoB;AACxB,MAAI,cAAmB;AACvB,MAAI,WAA0B,CAAC;AAE/B,aAAW,UAAU,SAAS;AACd,kBAAA;AAEV,QAAA,OAAO,SAAS,SAAS,QAAQ;AACxB,iBAAA,CAAC,OAAO,GAAG;AAEtB,UAAI,CAAC,aAAa,OAAO,GAAG,GAAG;AACd,uBAAA;AAAA,UACb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eAAe,YAAY,MAAM;AAC/B,QAAA,MAAM,QAAQ,WAAW,GAAG;AAC9B,kBAAY,OAAiB,IAAI;AAAA,IAAA,OAC5B;AACL,YAAM,iBAAsB,CAAC;AAC7B,iBAAW,OAAO,OAAO,KAAK,WAAW,GAAG;AAC1C,YAAI,QAAQ,SAAS;AACnB,yBAAe,MAAM,IAAI;AAAA,QAAA,OACpB;AACU,yBAAA,GAAG,IAAI,YAAY,GAAG;AAAA,QAAA;AAAA,MACvC;AAGK,aAAA,KAAK,WAAW,EAAE,QAAQ,CAAC,QAAQ,OAAO,YAAY,GAAG,CAAC;AAC1D,aAAA,OAAO,aAAa,cAAc;AAAA,IAAA;AAAA,EAC3C;AAGK,SAAA;AACT;AAEa,MAAA,iBAAiB,CAAC,YAAuC;AAChE,MAAA,OAAO,YAAY,UAAU;AAC/B,WAAO,SAAS;AAAA,EAAA;AAIf,MAAA,SAAyC,aAAa,SAAS,aAChE;AACA,WAAO,SAAS;AAAA,EAAA;AAIf,MAAA,SAAyC,aAAa,SAAS,aAChE;AACA,WAAO,SAAS;AAAA,EAAA;AAGd,MAAA,MAAM,QAAQ,OAAO,GAAG;AAC1B,WAAO,SAAS;AAAA,EAAA;AAGd,MAAA,eAAe,OAAO,GAAG;AAC3B,WAAO,SAAS;AAAA,EAAA;AAGlB,SAAO,SAAS;AAClB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isElementAtTopAndNotCovered.cjs","sources":["../../src/utils/isElementAtTopAndNotCovered.tsx"],"sourcesContent":["export const isElementAtTopAndNotCovered = (element: HTMLElement) => {\n const rect = element.getBoundingClientRect();\n const elemTop = rect.top;\n const elemBottom = rect.bottom;\n\n // Check if element is at the top of the viewport\n const isVisibleAtTop = elemTop >= 0 && elemBottom <= window.innerHeight;\n\n // Further check if the element is not covered by any other element at the center point of its top boundary\n if (isVisibleAtTop) {\n const centerX = rect.left + rect.width / 2;\n const centerY = rect.top + 10; // slight offset from the very top to ensure we're within the element bounds\n const topElement = document.elementFromPoint(centerX, centerY);\n\n // Check if our element is the topmost element at these coordinates or a child of the topmost element\n return element === topElement || element.contains(topElement);\n }\n\n return false;\n};\n"],"names":[],"mappings":";;AAAa,MAAA,8BAA8B,CAAC,YAAyB;AAC7D,QAAA,OAAO,QAAQ;
|
|
1
|
+
{"version":3,"file":"isElementAtTopAndNotCovered.cjs","sources":["../../src/utils/isElementAtTopAndNotCovered.tsx"],"sourcesContent":["export const isElementAtTopAndNotCovered = (element: HTMLElement) => {\n const rect = element.getBoundingClientRect();\n const elemTop = rect.top;\n const elemBottom = rect.bottom;\n\n // Check if element is at the top of the viewport\n const isVisibleAtTop = elemTop >= 0 && elemBottom <= window.innerHeight;\n\n // Further check if the element is not covered by any other element at the center point of its top boundary\n if (isVisibleAtTop) {\n const centerX = rect.left + rect.width / 2;\n const centerY = rect.top + 10; // slight offset from the very top to ensure we're within the element bounds\n const topElement = document.elementFromPoint(centerX, centerY);\n\n // Check if our element is the topmost element at these coordinates or a child of the topmost element\n return element === topElement || element.contains(topElement);\n }\n\n return false;\n};\n"],"names":[],"mappings":";;AAAa,MAAA,8BAA8B,CAAC,YAAyB;AAC7D,QAAA,OAAO,QAAQ,sBAAsB;AAC3C,QAAM,UAAU,KAAK;AACrB,QAAM,aAAa,KAAK;AAGxB,QAAM,iBAAiB,WAAW,KAAK,cAAc,OAAO;AAG5D,MAAI,gBAAgB;AAClB,UAAM,UAAU,KAAK,OAAO,KAAK,QAAQ;AACnC,UAAA,UAAU,KAAK,MAAM;AAC3B,UAAM,aAAa,SAAS,iBAAiB,SAAS,OAAO;AAG7D,WAAO,YAAY,cAAc,QAAQ,SAAS,UAAU;AAAA,EAAA;AAGvD,SAAA;AACT;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isElementAtTopAndNotCovered.mjs","sources":["../../src/utils/isElementAtTopAndNotCovered.tsx"],"sourcesContent":["export const isElementAtTopAndNotCovered = (element: HTMLElement) => {\n const rect = element.getBoundingClientRect();\n const elemTop = rect.top;\n const elemBottom = rect.bottom;\n\n // Check if element is at the top of the viewport\n const isVisibleAtTop = elemTop >= 0 && elemBottom <= window.innerHeight;\n\n // Further check if the element is not covered by any other element at the center point of its top boundary\n if (isVisibleAtTop) {\n const centerX = rect.left + rect.width / 2;\n const centerY = rect.top + 10; // slight offset from the very top to ensure we're within the element bounds\n const topElement = document.elementFromPoint(centerX, centerY);\n\n // Check if our element is the topmost element at these coordinates or a child of the topmost element\n return element === topElement || element.contains(topElement);\n }\n\n return false;\n};\n"],"names":[],"mappings":"AAAa,MAAA,8BAA8B,CAAC,YAAyB;AAC7D,QAAA,OAAO,QAAQ;
|
|
1
|
+
{"version":3,"file":"isElementAtTopAndNotCovered.mjs","sources":["../../src/utils/isElementAtTopAndNotCovered.tsx"],"sourcesContent":["export const isElementAtTopAndNotCovered = (element: HTMLElement) => {\n const rect = element.getBoundingClientRect();\n const elemTop = rect.top;\n const elemBottom = rect.bottom;\n\n // Check if element is at the top of the viewport\n const isVisibleAtTop = elemTop >= 0 && elemBottom <= window.innerHeight;\n\n // Further check if the element is not covered by any other element at the center point of its top boundary\n if (isVisibleAtTop) {\n const centerX = rect.left + rect.width / 2;\n const centerY = rect.top + 10; // slight offset from the very top to ensure we're within the element bounds\n const topElement = document.elementFromPoint(centerX, centerY);\n\n // Check if our element is the topmost element at these coordinates or a child of the topmost element\n return element === topElement || element.contains(topElement);\n }\n\n return false;\n};\n"],"names":[],"mappings":"AAAa,MAAA,8BAA8B,CAAC,YAAyB;AAC7D,QAAA,OAAO,QAAQ,sBAAsB;AAC3C,QAAM,UAAU,KAAK;AACrB,QAAM,aAAa,KAAK;AAGxB,QAAM,iBAAiB,WAAW,KAAK,cAAc,OAAO;AAG5D,MAAI,gBAAgB;AAClB,UAAM,UAAU,KAAK,OAAO,KAAK,QAAQ;AACnC,UAAA,UAAU,KAAK,MAAM;AAC3B,UAAM,aAAa,SAAS,iBAAiB,SAAS,OAAO;AAG7D,WAAO,YAAY,cAAc,QAAQ,SAAS,UAAU;AAAA,EAAA;AAGvD,SAAA;AACT;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.cjs","sources":["../../src/utils/object.ts"],"sourcesContent":["/**\n * Rename a key in an object by keeping the element order\n *\n * @param obj The original object\n * @param oldKey The key in the object that needs to be renamed\n * @param newKey The new key name to replace the old key\n * @returns A new object with the renamed key\n */\nexport const renameKey = <T extends object>(\n obj: T,\n oldKey: keyof T,\n newKey: string\n): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Iterate over all keys of the original object\n for (const key of Object.keys(obj)) {\n // Check if the current key is the one that needs to be renamed\n if (key === (oldKey as string)) {\n // Assign the value of the old key to the new key in newObj\n newObj[newKey as keyof T] = obj[oldKey];\n // Optionally, delete the old key from newObj if you don't want both keys\n delete newObj[oldKey];\n } else {\n // For all other keys, ensure they are copied over correctly\n newObj[key as keyof T] = obj[key as keyof T];\n }\n }\n // Return the new object with the renamed key\n return newObj;\n};\n\n/**\n * Remove a key from an object\n *\n * @param obj The original object\n * @param key The key in the object that needs to be removed\n * @returns A new object without the specified key\n */\nexport const removeKey = <T extends object>(obj: T, key: keyof T): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Delete the key from the object\n delete newObj[key];\n\n return newObj;\n};\n"],"names":[],"mappings":";;AAQO,MAAM,YAAY,CACvB,KACA,QACA,WACM;AAEA,QAAA,SAAY,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"object.cjs","sources":["../../src/utils/object.ts"],"sourcesContent":["/**\n * Rename a key in an object by keeping the element order\n *\n * @param obj The original object\n * @param oldKey The key in the object that needs to be renamed\n * @param newKey The new key name to replace the old key\n * @returns A new object with the renamed key\n */\nexport const renameKey = <T extends object>(\n obj: T,\n oldKey: keyof T,\n newKey: string\n): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Iterate over all keys of the original object\n for (const key of Object.keys(obj)) {\n // Check if the current key is the one that needs to be renamed\n if (key === (oldKey as string)) {\n // Assign the value of the old key to the new key in newObj\n newObj[newKey as keyof T] = obj[oldKey];\n // Optionally, delete the old key from newObj if you don't want both keys\n delete newObj[oldKey];\n } else {\n // For all other keys, ensure they are copied over correctly\n newObj[key as keyof T] = obj[key as keyof T];\n }\n }\n // Return the new object with the renamed key\n return newObj;\n};\n\n/**\n * Remove a key from an object\n *\n * @param obj The original object\n * @param key The key in the object that needs to be removed\n * @returns A new object without the specified key\n */\nexport const removeKey = <T extends object>(obj: T, key: keyof T): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Delete the key from the object\n delete newObj[key];\n\n return newObj;\n};\n"],"names":[],"mappings":";;AAQO,MAAM,YAAY,CACvB,KACA,QACA,WACM;AAEA,QAAA,SAAY,EAAE,GAAG,IAAI;AAG3B,aAAW,OAAO,OAAO,KAAK,GAAG,GAAG;AAElC,QAAI,QAAS,QAAmB;AAEvB,aAAA,MAAiB,IAAI,IAAI,MAAM;AAEtC,aAAO,OAAO,MAAM;AAAA,IAAA,OACf;AAEE,aAAA,GAAc,IAAI,IAAI,GAAc;AAAA,IAAA;AAAA,EAC7C;AAGK,SAAA;AACT;AASa,MAAA,YAAY,CAAmB,KAAQ,QAAoB;AAEhE,QAAA,SAAY,EAAE,GAAG,IAAI;AAG3B,SAAO,OAAO,GAAG;AAEV,SAAA;AACT;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.mjs","sources":["../../src/utils/object.ts"],"sourcesContent":["/**\n * Rename a key in an object by keeping the element order\n *\n * @param obj The original object\n * @param oldKey The key in the object that needs to be renamed\n * @param newKey The new key name to replace the old key\n * @returns A new object with the renamed key\n */\nexport const renameKey = <T extends object>(\n obj: T,\n oldKey: keyof T,\n newKey: string\n): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Iterate over all keys of the original object\n for (const key of Object.keys(obj)) {\n // Check if the current key is the one that needs to be renamed\n if (key === (oldKey as string)) {\n // Assign the value of the old key to the new key in newObj\n newObj[newKey as keyof T] = obj[oldKey];\n // Optionally, delete the old key from newObj if you don't want both keys\n delete newObj[oldKey];\n } else {\n // For all other keys, ensure they are copied over correctly\n newObj[key as keyof T] = obj[key as keyof T];\n }\n }\n // Return the new object with the renamed key\n return newObj;\n};\n\n/**\n * Remove a key from an object\n *\n * @param obj The original object\n * @param key The key in the object that needs to be removed\n * @returns A new object without the specified key\n */\nexport const removeKey = <T extends object>(obj: T, key: keyof T): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Delete the key from the object\n delete newObj[key];\n\n return newObj;\n};\n"],"names":[],"mappings":"AAQO,MAAM,YAAY,CACvB,KACA,QACA,WACM;AAEA,QAAA,SAAY,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"object.mjs","sources":["../../src/utils/object.ts"],"sourcesContent":["/**\n * Rename a key in an object by keeping the element order\n *\n * @param obj The original object\n * @param oldKey The key in the object that needs to be renamed\n * @param newKey The new key name to replace the old key\n * @returns A new object with the renamed key\n */\nexport const renameKey = <T extends object>(\n obj: T,\n oldKey: keyof T,\n newKey: string\n): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Iterate over all keys of the original object\n for (const key of Object.keys(obj)) {\n // Check if the current key is the one that needs to be renamed\n if (key === (oldKey as string)) {\n // Assign the value of the old key to the new key in newObj\n newObj[newKey as keyof T] = obj[oldKey];\n // Optionally, delete the old key from newObj if you don't want both keys\n delete newObj[oldKey];\n } else {\n // For all other keys, ensure they are copied over correctly\n newObj[key as keyof T] = obj[key as keyof T];\n }\n }\n // Return the new object with the renamed key\n return newObj;\n};\n\n/**\n * Remove a key from an object\n *\n * @param obj The original object\n * @param key The key in the object that needs to be removed\n * @returns A new object without the specified key\n */\nexport const removeKey = <T extends object>(obj: T, key: keyof T): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Delete the key from the object\n delete newObj[key];\n\n return newObj;\n};\n"],"names":[],"mappings":"AAQO,MAAM,YAAY,CACvB,KACA,QACA,WACM;AAEA,QAAA,SAAY,EAAE,GAAG,IAAI;AAG3B,aAAW,OAAO,OAAO,KAAK,GAAG,GAAG;AAElC,QAAI,QAAS,QAAmB;AAEvB,aAAA,MAAiB,IAAI,IAAI,MAAM;AAEtC,aAAO,OAAO,MAAM;AAAA,IAAA,OACf;AAEE,aAAA,GAAc,IAAI,IAAI,GAAc;AAAA,IAAA;AAAA,EAC7C;AAGK,SAAA;AACT;AASa,MAAA,YAAY,CAAmB,KAAQ,QAAoB;AAEhE,QAAA,SAAY,EAAE,GAAG,IAAI;AAG3B,SAAO,OAAO,GAAG;AAEV,SAAA;AACT;"}
|
package/dist/zod-BV4nCGJE.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-BV4nCGJE.js","sources":["../../../../node_modules/.pnpm/@hookform+resolvers@3.9.1_react-hook-form@7.
|
|
1
|
+
{"version":3,"file":"zod-BV4nCGJE.js","sources":["../../../../node_modules/.pnpm/@hookform+resolvers@3.9.1_react-hook-form@7.54.0_react@18.3.1_/node_modules/@hookform/resolvers/zod/dist/zod.mjs"],"sourcesContent":["import{validateFieldsNatively as r,toNestErrors as e}from\"@hookform/resolvers\";import{appendErrors as o}from\"react-hook-form\";var n=function(r,e){for(var n={};r.length;){var t=r[0],s=t.code,i=t.message,a=t.path.join(\".\");if(!n[a])if(\"unionErrors\"in t){var u=t.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:i,type:s};if(\"unionErrors\"in t&&t.unionErrors.forEach(function(e){return e.errors.forEach(function(e){return r.push(e)})}),e){var c=n[a].types,f=c&&c[t.code];n[a]=o(a,e,n,s,f?[].concat(f,t.message):t.message)}r.shift()}return n},t=function(o,t,s){return void 0===s&&(s={}),function(i,a,u){try{return Promise.resolve(function(e,n){try{var a=Promise.resolve(o[\"sync\"===s.mode?\"parse\":\"parseAsync\"](i,t)).then(function(e){return u.shouldUseNativeValidation&&r({},u),{errors:{},values:s.raw?i:e}})}catch(r){return n(r)}return a&&a.then?a.then(void 0,n):a}(0,function(r){if(function(r){return Array.isArray(null==r?void 0:r.errors)}(r))return{values:{},errors:e(n(r.errors,!u.shouldUseNativeValidation&&\"all\"===u.criteriaMode),u)};throw r}))}catch(r){return Promise.reject(r)}}};export{t as zodResolver};\n//# sourceMappingURL=zod.module.js.map\n"],"names":["n","t","e","o","a","r"],"mappings":";;AAAiI,IAAC,IAAE,SAAS,GAAE,GAAE;AAAC,WAAQA,KAAE,CAAE,GAAC,EAAE,UAAQ;AAAC,QAAIC,KAAE,EAAE,CAAC,GAAE,IAAEA,GAAE,MAAK,IAAEA,GAAE,SAAQ,IAAEA,GAAE,KAAK,KAAK,GAAG;AAAE,QAAG,CAACD,GAAE,CAAC,EAAE,KAAG,iBAAgBC,IAAE;AAAC,UAAI,IAAEA,GAAE,YAAY,CAAC,EAAE,OAAO,CAAC;AAAE,MAAAD,GAAE,CAAC,IAAE,EAAC,SAAQ,EAAE,SAAQ,MAAK,EAAE,KAAI;AAAA,IAAC,MAAM,CAAAA,GAAE,CAAC,IAAE,EAAC,SAAQ,GAAE,MAAK,EAAC;AAAE,QAAG,iBAAgBC,MAAGA,GAAE,YAAY,QAAQ,SAASC,IAAE;AAAC,aAAOA,GAAE,OAAO,QAAQ,SAASA,IAAE;AAAC,eAAO,EAAE,KAAKA,EAAC;AAAA,MAAC,CAAC;AAAA,IAAC,CAAC,GAAE,GAAE;AAAC,UAAI,IAAEF,GAAE,CAAC,EAAE,OAAM,IAAE,KAAG,EAAEC,GAAE,IAAI;AAAE,MAAAD,GAAE,CAAC,IAAEG,aAAE,GAAE,GAAEH,IAAE,GAAE,IAAE,CAAE,EAAC,OAAO,GAAEC,GAAE,OAAO,IAAEA,GAAE,OAAO;AAAA,IAAC;AAAC,MAAE,MAAO;AAAA,EAAA;AAAC,SAAOD;AAAC,GAAE,IAAE,SAAS,GAAEC,IAAE,GAAE;AAAC,SAAO,WAAS,MAAI,IAAE,CAAE,IAAE,SAAS,GAAE,GAAE,GAAE;AAAC,QAAG;AAAC,aAAO,QAAQ,QAAQ,SAAS,GAAED,IAAE;AAAC,YAAG;AAAC,cAAII,KAAE,QAAQ,QAAQ,EAAE,WAAS,EAAE,OAAK,UAAQ,YAAY,EAAE,GAAEH,EAAC,CAAC,EAAE,KAAK,SAASC,IAAE;AAAC,mBAAO,EAAE,6BAA2BG,uBAAE,CAAE,GAAC,CAAC,GAAE,EAAC,QAAO,CAAA,GAAG,QAAO,EAAE,MAAI,IAAEH,GAAC;AAAA,UAAC,CAAC;AAAA,QAAC,SAAO,GAAE;AAAC,iBAAOF,GAAE,CAAC;AAAA,QAAC;AAAC,eAAOI,MAAGA,GAAE,OAAKA,GAAE,KAAK,QAAOJ,EAAC,IAAEI;AAAA,MAAC,EAAE,GAAE,SAAS,GAAE;AAAC,YAAG,SAASC,IAAE;AAAC,iBAAO,MAAM,QAAQ,QAAMA,KAAE,SAAOA,GAAE,MAAM;AAAA,QAAC,EAAE,CAAC,EAAE,QAAM,EAAC,QAAO,CAAE,GAAC,QAAOH,aAAE,EAAE,EAAE,QAAO,CAAC,EAAE,6BAA2B,UAAQ,EAAE,YAAY,GAAE,CAAC,EAAC;AAAE,cAAM;AAAA,MAAC,CAAC,CAAC;AAAA,IAAC,SAAO,GAAE;AAAC,aAAO,QAAQ,OAAO,CAAC;AAAA,IAAC;AAAA,EAAC;AAAC;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-DSrtTSD_.cjs","sources":["../../../../node_modules/.pnpm/@hookform+resolvers@3.9.1_react-hook-form@7.
|
|
1
|
+
{"version":3,"file":"zod-DSrtTSD_.cjs","sources":["../../../../node_modules/.pnpm/@hookform+resolvers@3.9.1_react-hook-form@7.54.0_react@18.3.1_/node_modules/@hookform/resolvers/zod/dist/zod.mjs"],"sourcesContent":["import{validateFieldsNatively as r,toNestErrors as e}from\"@hookform/resolvers\";import{appendErrors as o}from\"react-hook-form\";var n=function(r,e){for(var n={};r.length;){var t=r[0],s=t.code,i=t.message,a=t.path.join(\".\");if(!n[a])if(\"unionErrors\"in t){var u=t.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:i,type:s};if(\"unionErrors\"in t&&t.unionErrors.forEach(function(e){return e.errors.forEach(function(e){return r.push(e)})}),e){var c=n[a].types,f=c&&c[t.code];n[a]=o(a,e,n,s,f?[].concat(f,t.message):t.message)}r.shift()}return n},t=function(o,t,s){return void 0===s&&(s={}),function(i,a,u){try{return Promise.resolve(function(e,n){try{var a=Promise.resolve(o[\"sync\"===s.mode?\"parse\":\"parseAsync\"](i,t)).then(function(e){return u.shouldUseNativeValidation&&r({},u),{errors:{},values:s.raw?i:e}})}catch(r){return n(r)}return a&&a.then?a.then(void 0,n):a}(0,function(r){if(function(r){return Array.isArray(null==r?void 0:r.errors)}(r))return{values:{},errors:e(n(r.errors,!u.shouldUseNativeValidation&&\"all\"===u.criteriaMode),u)};throw r}))}catch(r){return Promise.reject(r)}}};export{t as zodResolver};\n//# sourceMappingURL=zod.module.js.map\n"],"names":["n","t","e","o","a","r"],"mappings":";;;AAAiI,IAAC,IAAE,SAAS,GAAE,GAAE;AAAC,WAAQA,KAAE,CAAE,GAAC,EAAE,UAAQ;AAAC,QAAIC,KAAE,EAAE,CAAC,GAAE,IAAEA,GAAE,MAAK,IAAEA,GAAE,SAAQ,IAAEA,GAAE,KAAK,KAAK,GAAG;AAAE,QAAG,CAACD,GAAE,CAAC,EAAE,KAAG,iBAAgBC,IAAE;AAAC,UAAI,IAAEA,GAAE,YAAY,CAAC,EAAE,OAAO,CAAC;AAAE,MAAAD,GAAE,CAAC,IAAE,EAAC,SAAQ,EAAE,SAAQ,MAAK,EAAE,KAAI;AAAA,IAAC,MAAM,CAAAA,GAAE,CAA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,QAAOH,UAAC,aAAC,EAAE,EAAE,QAAO,CAAC,EAAE,6BAA2B,UAAQ,EAAE,YAAY,GAAE,CAAC,EAAC;AAAE,cAAM;AAAA,MAAC,CAAC,CAAC;AAAA,IAAC,SAAO,GAAE;AAAC,aAAO,QAAQ,OAAO,CAAC;AAAA,IAAC;AAAA,EAAC;AAAC;;","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/design-system",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"tailwindcss-animate": "^1.0.7",
|
|
78
78
|
"zod": "^3.23.8",
|
|
79
79
|
"zustand": "^4.5.5",
|
|
80
|
-
"@intlayer/
|
|
81
|
-
"@intlayer/
|
|
82
|
-
"@intlayer/dictionaries-entry": "^3.5.
|
|
83
|
-
"react-intlayer": "^3.5.
|
|
80
|
+
"@intlayer/config": "^3.5.1",
|
|
81
|
+
"@intlayer/core": "^3.5.1",
|
|
82
|
+
"@intlayer/dictionaries-entry": "^3.5.1",
|
|
83
|
+
"react-intlayer": "^3.5.1"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@chromatic-com/storybook": "^3.2.2",
|
|
@@ -118,21 +118,21 @@
|
|
|
118
118
|
"typescript": "^5.7.2",
|
|
119
119
|
"vite": "^6.0.3",
|
|
120
120
|
"vite-plugin-dts": "^4.3.0",
|
|
121
|
-
"@intlayer/backend": "^3.5.
|
|
122
|
-
"@utils/ts-config": "^1.0.4",
|
|
121
|
+
"@intlayer/backend": "^3.5.1",
|
|
123
122
|
"@utils/ts-config-types": "^1.0.4",
|
|
124
|
-
"@utils/tsup-config": "^1.0.4"
|
|
123
|
+
"@utils/tsup-config": "^1.0.4",
|
|
124
|
+
"@utils/ts-config": "^1.0.4"
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
127
|
"react": ">=18.3.1",
|
|
128
128
|
"react-dom": ">=18.3.1",
|
|
129
129
|
"zustand": "^4.5.5",
|
|
130
|
-
"@intlayer/
|
|
131
|
-
"@intlayer/
|
|
132
|
-
"@intlayer/
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"intlayer": "^3.5.
|
|
130
|
+
"@intlayer/core": "^3.5.1",
|
|
131
|
+
"@intlayer/dictionaries-entry": "^3.5.1",
|
|
132
|
+
"@intlayer/backend": "^3.5.1",
|
|
133
|
+
"@intlayer/config": "^3.5.1",
|
|
134
|
+
"react-intlayer": "^3.5.1",
|
|
135
|
+
"intlayer": "^3.5.1"
|
|
136
136
|
},
|
|
137
137
|
"scripts": {
|
|
138
138
|
"build": "pnpm build:package && pnpm build:css && pnpm build:storybook",
|