@intlayer/design-system 5.5.11 → 5.7.0
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/README.md +1 -1
- package/dist/.vite/manifest.json +126 -570
- package/dist/components/Command/index.d.ts +5 -5
- package/dist/components/Container/index.cjs +2 -1
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +2 -3
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +3 -2
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +2 -27
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +1 -26
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/{IDE/CopyButton.cjs → CopyButton/index.cjs} +6 -5
- package/dist/components/CopyButton/index.cjs.map +1 -0
- package/dist/components/{IDE/CopyButton.d.ts → CopyButton/index.d.ts} +3 -2
- package/dist/components/CopyButton/index.d.ts.map +1 -0
- package/dist/components/{IDE/CopyButton.mjs → CopyButton/index.mjs} +6 -5
- package/dist/components/CopyButton/index.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +2 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +2 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +9 -28
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +8 -27
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +10 -26
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +9 -25
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +7 -20
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +6 -19
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +2 -2
- package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -2
- package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -2
- package/dist/components/Form/elements/FormElementWrapper.cjs +1 -1
- package/dist/components/Form/elements/FormElementWrapper.mjs +1 -1
- package/dist/components/IDE/Code.cjs +3 -3
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.d.ts +1 -1
- package/dist/components/IDE/Code.d.ts.map +1 -1
- package/dist/components/IDE/Code.mjs +3 -3
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +2 -2
- package/dist/components/IDE/CodeContext.mjs +2 -2
- package/dist/components/IDE/CopyCode.cjs +28 -0
- package/dist/components/IDE/CopyCode.cjs.map +1 -0
- package/dist/components/IDE/CopyCode.d.ts +7 -0
- package/dist/components/IDE/CopyCode.d.ts.map +1 -0
- package/dist/components/IDE/CopyCode.mjs +28 -0
- package/dist/components/IDE/CopyCode.mjs.map +1 -0
- package/dist/components/IDE/MonacoCode.cjs +2 -2
- package/dist/components/IDE/MonacoCode.cjs.map +1 -1
- package/dist/components/IDE/MonacoCode.mjs +1 -1
- package/dist/components/IDE/MonacoCode.mjs.map +1 -1
- package/dist/components/IDE/code.content.cjs +39 -0
- package/dist/components/IDE/code.content.cjs.map +1 -0
- package/dist/components/{Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts → IDE/code.content.d.ts} +23 -56
- package/dist/components/IDE/code.content.d.ts.map +1 -0
- package/dist/components/IDE/code.content.mjs +40 -0
- package/dist/components/IDE/code.content.mjs.map +1 -0
- package/dist/components/IDE/copyCode.content.cjs +39 -0
- package/dist/components/IDE/copyCode.content.cjs.map +1 -0
- package/dist/components/IDE/copyCode.content.d.ts +73 -0
- package/dist/components/IDE/copyCode.content.d.ts.map +1 -0
- package/dist/components/IDE/copyCode.content.mjs +40 -0
- package/dist/components/IDE/copyCode.content.mjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +2 -2
- package/dist/components/Modal/Modal.cjs +3 -3
- package/dist/components/Modal/Modal.mjs +3 -3
- package/dist/components/Navbar/MobileNavbar.cjs +2 -2
- package/dist/components/Navbar/MobileNavbar.mjs +2 -2
- package/dist/components/Navbar/index.cjs +3 -3
- package/dist/components/Navbar/index.mjs +3 -3
- package/dist/components/Pattern/GridPattern.cjs +45 -48
- package/dist/components/Pattern/GridPattern.cjs.map +1 -1
- package/dist/components/Pattern/GridPattern.d.ts.map +1 -1
- package/dist/components/Pattern/GridPattern.mjs +45 -48
- package/dist/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/components/Popover/index.cjs +59 -15
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.d.ts +32 -6
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.mjs +60 -16
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/SocialNetworks/index.cjs +1 -1
- package/dist/components/SocialNetworks/index.cjs.map +1 -1
- package/dist/components/SocialNetworks/index.mjs +1 -1
- package/dist/components/SocialNetworks/index.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +2 -2
- package/dist/components/SwitchSelector/index.mjs +2 -2
- package/dist/components/TabSelector/TabSelector.cjs +2 -2
- package/dist/components/TabSelector/TabSelector.mjs +2 -2
- package/dist/components/TextArea/AutocompleteTextArea.cjs +90 -13
- package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.d.ts.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.mjs +92 -15
- package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
- package/dist/components/index.cjs +3 -38
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +4 -39
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +8 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +9 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +29 -31
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +678 -10
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +29 -31
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +0 -1
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +0 -1
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAuth/index.cjs +9 -0
- package/dist/{components/Auth/AuthenticationBarrier → hooks/useAuth}/index.cjs.map +1 -1
- package/dist/hooks/useAuth/index.d.ts +4 -0
- package/dist/hooks/useAuth/index.d.ts.map +1 -0
- package/dist/hooks/useAuth/index.mjs +9 -0
- package/dist/{components/Auth/ExternalsLoginButtons → hooks/useAuth}/index.mjs.map +1 -1
- package/dist/hooks/useAuth/useAuth.cjs +25 -0
- package/dist/hooks/useAuth/useAuth.cjs.map +1 -0
- package/dist/{components/Auth/useAuth/index.d.ts → hooks/useAuth/useAuth.d.ts} +3 -13
- package/dist/hooks/useAuth/useAuth.d.ts.map +1 -0
- package/dist/{components/Auth/useAuth/index.mjs → hooks/useAuth/useAuth.mjs} +2 -8
- package/dist/hooks/useAuth/useAuth.mjs.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useOAuth2.cjs +3 -3
- package/dist/hooks/useAuth/useOAuth2.cjs.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useOAuth2.d.ts +1 -1
- package/dist/hooks/useAuth/useOAuth2.d.ts.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useOAuth2.mjs +4 -4
- package/dist/hooks/useAuth/useOAuth2.mjs.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useSession.cjs +6 -25
- package/dist/hooks/useAuth/useSession.cjs.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useSession.d.ts +3 -3
- package/dist/hooks/useAuth/useSession.d.ts.map +1 -0
- package/dist/hooks/useAuth/useSession.mjs +47 -0
- package/dist/hooks/useAuth/useSession.mjs.map +1 -0
- package/dist/hooks/useIntlayerAPI.cjs +5 -4
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs +5 -4
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/{components/Auth → hooks}/useUser/index.cjs +7 -5
- package/dist/hooks/useUser/index.cjs.map +1 -0
- package/dist/hooks/useUser/index.d.ts +8 -0
- package/dist/hooks/useUser/index.d.ts.map +1 -0
- package/dist/{components/Auth → hooks}/useUser/index.mjs +6 -4
- package/dist/hooks/useUser/index.mjs.map +1 -0
- package/dist/{schemas-itjzX6bG.js → schemas-BIuxHDyZ.js} +3 -7
- package/dist/{schemas-itjzX6bG.js.map → schemas-BIuxHDyZ.js.map} +1 -1
- package/dist/{schemas-DlCjM5d_.cjs → schemas-Q6C7ZNs3.cjs} +3 -7
- package/dist/{schemas-DlCjM5d_.cjs.map → schemas-Q6C7ZNs3.cjs.map} +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +18 -18
- package/dist/components/Auth/AuthModal/index.cjs +0 -106
- package/dist/components/Auth/AuthModal/index.cjs.map +0 -1
- package/dist/components/Auth/AuthModal/index.d.ts +0 -20
- package/dist/components/Auth/AuthModal/index.d.ts.map +0 -1
- package/dist/components/Auth/AuthModal/index.mjs +0 -106
- package/dist/components/Auth/AuthModal/index.mjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs +0 -36
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts +0 -5
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs +0 -36
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs +0 -22
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts +0 -8
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs +0 -22
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs +0 -15
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts +0 -4
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs +0 -15
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/index.cjs +0 -7
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts +0 -23
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/index.mjs +0 -7
- package/dist/components/Auth/AuthenticationBarrier/index.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +0 -95
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +0 -9
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +0 -95
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs +0 -138
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts +0 -278
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs +0 -138
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.cjs +0 -7
- package/dist/components/Auth/ChangePasswordForm/index.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.d.ts +0 -3
- package/dist/components/Auth/ChangePasswordForm/index.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.mjs +0 -7
- package/dist/components/Auth/ChangePasswordForm/index.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs +0 -34
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs +0 -131
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts +0 -271
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs +0 -131
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts +0 -8
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs +0 -34
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs +0 -81
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.d.ts +0 -9
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs +0 -81
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs +0 -106
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.d.ts +0 -210
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs +0 -106
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/index.cjs +0 -7
- package/dist/components/Auth/DefineNewPasswordForm/index.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/index.d.ts +0 -3
- package/dist/components/Auth/DefineNewPasswordForm/index.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/index.mjs +0 -7
- package/dist/components/Auth/DefineNewPasswordForm/index.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs +0 -29
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs +0 -101
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.d.ts +0 -205
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs +0 -101
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.d.ts +0 -7
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs +0 -29
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +0 -81
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts +0 -9
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +0 -81
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs +0 -15
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts +0 -3
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs +0 -15
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs +0 -23
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts +0 -3
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs +0 -23
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs +0 -90
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +0 -176
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs +0 -90
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/index.cjs +0 -7
- package/dist/components/Auth/ExternalsLoginButtons/index.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/index.d.ts +0 -2
- package/dist/components/Auth/ExternalsLoginButtons/index.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/index.mjs +0 -7
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +0 -113
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +0 -11
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +0 -113
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.cjs +0 -7
- package/dist/components/Auth/ResetPasswordForm/index.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.d.ts +0 -3
- package/dist/components/Auth/ResetPasswordForm/index.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.mjs +0 -7
- package/dist/components/Auth/ResetPasswordForm/index.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs +0 -123
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts +0 -245
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs +0 -123
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs +0 -15
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs +0 -56
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs +0 -56
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts +0 -6
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs +0 -15
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +0 -105
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts +0 -11
- package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +0 -105
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/index.cjs +0 -7
- package/dist/components/Auth/SignInForm/index.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/index.d.ts +0 -3
- package/dist/components/Auth/SignInForm/index.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/index.mjs +0 -7
- package/dist/components/Auth/SignInForm/index.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/signIn.content.cjs +0 -217
- package/dist/components/Auth/SignInForm/signIn.content.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/signIn.content.d.ts +0 -447
- package/dist/components/Auth/SignInForm/signIn.content.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/signIn.content.mjs +0 -217
- package/dist/components/Auth/SignInForm/signIn.content.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs +0 -23
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs +0 -71
- package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts +0 -139
- package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs +0 -71
- package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.d.ts +0 -7
- package/dist/components/Auth/SignInForm/useSignInSchema.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs +0 -23
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +0 -98
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +0 -10
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +0 -98
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/index.cjs +0 -7
- package/dist/components/Auth/SignUpForm/index.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/index.d.ts +0 -3
- package/dist/components/Auth/SignUpForm/index.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/index.mjs +0 -7
- package/dist/components/Auth/SignUpForm/index.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.cjs +0 -184
- package/dist/components/Auth/SignUpForm/signUpForm.content.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +0 -380
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.mjs +0 -185
- package/dist/components/Auth/SignUpForm/signUpForm.content.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs +0 -33
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs +0 -116
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts +0 -238
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs +0 -116
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts +0 -8
- package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs +0 -33
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +0 -79
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts +0 -10
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +0 -79
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.cjs +0 -8
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.cjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.d.ts +0 -4
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.d.ts.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.mjs +0 -8
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.mjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.cjs +0 -5
- package/dist/components/Auth/VerifyEmailForm/index.cjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.content.cjs +0 -73
- package/dist/components/Auth/VerifyEmailForm/index.content.cjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.content.d.ts +0 -143
- package/dist/components/Auth/VerifyEmailForm/index.content.d.ts.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.content.mjs +0 -74
- package/dist/components/Auth/VerifyEmailForm/index.content.mjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.d.ts +0 -2
- package/dist/components/Auth/VerifyEmailForm/index.d.ts.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.mjs +0 -5
- package/dist/components/Auth/VerifyEmailForm/index.mjs.map +0 -1
- package/dist/components/Auth/index.cjs +0 -39
- package/dist/components/Auth/index.cjs.map +0 -1
- package/dist/components/Auth/index.d.ts +0 -12
- package/dist/components/Auth/index.d.ts.map +0 -1
- package/dist/components/Auth/index.mjs +0 -39
- package/dist/components/Auth/index.mjs.map +0 -1
- package/dist/components/Auth/useAuth/index.cjs +0 -31
- package/dist/components/Auth/useAuth/index.cjs.map +0 -1
- package/dist/components/Auth/useAuth/index.d.ts.map +0 -1
- package/dist/components/Auth/useAuth/index.mjs.map +0 -1
- package/dist/components/Auth/useAuth/useCSRF.cjs +0 -27
- package/dist/components/Auth/useAuth/useCSRF.cjs.map +0 -1
- package/dist/components/Auth/useAuth/useCSRF.d.ts +0 -6
- package/dist/components/Auth/useAuth/useCSRF.d.ts.map +0 -1
- package/dist/components/Auth/useAuth/useCSRF.mjs +0 -27
- package/dist/components/Auth/useAuth/useCSRF.mjs.map +0 -1
- package/dist/components/Auth/useAuth/useOAuth2.cjs.map +0 -1
- package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +0 -1
- package/dist/components/Auth/useAuth/useOAuth2.mjs.map +0 -1
- package/dist/components/Auth/useAuth/useSession.cjs.map +0 -1
- package/dist/components/Auth/useAuth/useSession.d.ts.map +0 -1
- package/dist/components/Auth/useAuth/useSession.mjs +0 -66
- package/dist/components/Auth/useAuth/useSession.mjs.map +0 -1
- package/dist/components/Auth/useUser/index.cjs.map +0 -1
- package/dist/components/Auth/useUser/index.d.ts +0 -8
- package/dist/components/Auth/useUser/index.d.ts.map +0 -1
- package/dist/components/Auth/useUser/index.mjs.map +0 -1
- package/dist/components/IDE/CopyButton.cjs.map +0 -1
- package/dist/components/IDE/CopyButton.d.ts.map +0 -1
- package/dist/components/IDE/CopyButton.mjs.map +0 -1
- package/dist/components/ProfileDropDown/index.cjs +0 -25
- package/dist/components/ProfileDropDown/index.cjs.map +0 -1
- package/dist/components/ProfileDropDown/index.d.ts +0 -6
- package/dist/components/ProfileDropDown/index.d.ts.map +0 -1
- package/dist/components/ProfileDropDown/index.mjs +0 -25
- package/dist/components/ProfileDropDown/index.mjs.map +0 -1
- package/dist/hooks/useIntlayerAPI.d.ts +0 -103
- package/dist/hooks/useIntlayerAPI.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteTextArea.mjs","sources":["../../../src/components/TextArea/AutocompleteTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { type FC, useState, useEffect } from 'react';\nimport { useAutocomplete } from '../../hooks';\nimport {\n type AutoSizedTextAreaProps,\n AutoSizedTextArea,\n} from './AutoSizeTextArea';\n\nexport const useDebounce = <T,>(value: T, delay: number): T => {\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cleanup the timer if value changes before 'delay' ms\n return () => clearTimeout(timer);\n }, [value, delay]);\n\n return debouncedValue;\n};\n\nexport type AutocompleteTextAreaProps = AutoSizedTextAreaProps & {\n isActive?: boolean;\n suggestion?: string;\n};\n\nexport const AutoCompleteTextarea: FC<AutocompleteTextAreaProps> = ({\n isActive = true,\n suggestion: suggestionProp,\n ...props\n}) => {\n const defaultValue = String(props.value ?? props.defaultValue ?? '');\n const { autocomplete } = useAutocomplete();\n const configuration = useConfiguration();\n const [isTyped, setIsTyped] = useState(false);\n const [text, setText] = useState(defaultValue);\n const [suggestion, setSuggestion] = useState('');\n\n // Only update this “debouncedText” after the user stops typing for 500ms\n const debouncedText = useDebounce(text, 200);\n\n useEffect(() => {\n if (typeof props.value === 'undefined') return;\n setText(defaultValue);\n }, [props.value, props.defaultValue]);\n\n useEffect(() => {\n if (!isActive) return;\n if (!isTyped) return;\n\n const fetchSuggestion = async () => {\n try {\n const response = await autocomplete({\n text: debouncedText,\n openAiApiKey: configuration.editor.openAiApiKey,\n model: configuration.editor.openAiApiModel,\n temperature: configuration.editor.openAiApiTemperature,\n });\n // e.g. response.data.autocompletion = \"Hello World\"\n const autocompletion = response?.data?.autocompletion ?? '';\n\n // If the suggested text starts with what the user typed,\n // we only store the *remaining* part as the suggestion\n // so that we can render \"ghost\" text appropriately.\n if (autocompletion.startsWith(debouncedText)) {\n const remaining = autocompletion.slice(debouncedText.length);\n return setSuggestion(remaining);\n }\n\n return setSuggestion(autocompletion);\n } catch (err) {\n console.error('Autocomplete error:', err);\n }\n };\n\n if (debouncedText.length > 3) {\n // Only fetch if user typed more than 3 chars and has paused\n setSuggestion('');\n fetchSuggestion();\n } else {\n // If typed less than threshold, clear the suggestion\n setSuggestion('');\n }\n }, [debouncedText, isActive]);\n\n const acceptSuggestion = () => {\n // Merge the typed text with the suggestion\n setText((prevText) => prevText + suggestion);\n setSuggestion('');\n };\n\n return (\n <div className=\"relative w-full\">\n {/*\n --- Background/Ghost layer ---\n Mirrors user's typed text and shows suggestion as ghosted/gray\n */}\n <div\n className=\"pointer-events-none absolute inset-0 whitespace-pre-wrap break-words px-1 py-3 text-base leading-[1.45rem] md:py-1 md:text-sm md:leading-[1.23rem]\"\n aria-hidden=\"true\"\n >\n <span className=\"align-text-top text-transparent\">{text}</span>\n {(suggestion || suggestionProp) && (\n <span className=\"text-neutral ml-3 align-text-top\">\n {suggestionProp ?? suggestion}\n </span>\n )}\n </div>\n {/*\n --- Actual editable textarea ---\n Must share the same styling (font size, line-height, etc.) so\n text lines up exactly underneath the background layer.\n */}\n <AutoSizedTextArea\n {...props}\n value={text}\n onChange={(e) => {\n setIsTyped(true);\n setText(e.target.value);\n props.onChange?.(e);\n }}\n onKeyDown={(e) => {\n // If user presses Tab and we have a suggestion, accept it\n if (e.key === 'Tab' && suggestion) {\n e.preventDefault();\n acceptSuggestion();\n }\n props.onKeyDown?.(e);\n }}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAUa,MAAA,cAAc,CAAK,OAAU,UAAqB;AAC7D,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAY,KAAK;AAE7D,YAAU,MAAM;AACR,UAAA,QAAQ,WAAW,MAAM;AAC7B,wBAAkB,KAAK;AAAA,OACtB,KAAK;AAGD,WAAA,MAAM,aAAa,KAAK;AAAA,EAAA,GAC9B,CAAC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AAC;AAE5B,QAAM,mBAAmB,MAAM;AAErB,YAAA,CAAC,aAAa,WAAW,UAAU;AAC3C,kBAAc,EAAE;AAAA,EAClB;AAGE,SAAA,qBAAC,OAAI,EAAA,WAAU,mBAKb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,eAAY;AAAA,QAEZ,UAAA;AAAA,UAAC,oBAAA,QAAA,EAAK,WAAU,mCAAmC,UAAK,MAAA;AAAA,WACtD,cAAc,mBACd,oBAAC,UAAK,WAAU,oCACb,4BAAkB,WACrB,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,IAMA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,OAAO;AAAA,QACP,UAAU,CAAC,MAAM;AACf,qBAAW,IAAI;AACP,kBAAA,EAAE,OAAO,KAAK;AACtB,gBAAM,WAAW,CAAC;AAAA,QACpB;AAAA,QACA,WAAW,CAAC,MAAM;AAEZ,cAAA,EAAE,QAAQ,SAAS,YAAY;AACjC,cAAE,eAAe;AACA,6BAAA;AAAA,UAAA;AAEnB,gBAAM,YAAY,CAAC;AAAA,QAAA;AAAA,MACrB;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"AutocompleteTextArea.mjs","sources":["../../../src/components/TextArea/AutocompleteTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { type FC, useEffect, useRef, useState } from 'react';\nimport { useAutocomplete } from '../../hooks';\nimport {\n type AutoSizedTextAreaProps,\n AutoSizedTextArea,\n} from './AutoSizeTextArea';\n\nexport const useDebounce = <T,>(value: T, delay: number): T => {\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cleanup the timer if value changes before 'delay' ms\n return () => clearTimeout(timer);\n }, [value, delay]);\n\n return debouncedValue;\n};\n\nexport type AutocompleteTextAreaProps = AutoSizedTextAreaProps & {\n isActive?: boolean;\n suggestion?: string;\n};\n\nexport const AutoCompleteTextarea: FC<AutocompleteTextAreaProps> = ({\n isActive = true,\n suggestion: suggestionProp,\n ...props\n}) => {\n const defaultValue = String(props.value ?? props.defaultValue ?? '');\n const { autocomplete } = useAutocomplete();\n const configuration = useConfiguration();\n const [isTyped, setIsTyped] = useState(false);\n const [text, setText] = useState(defaultValue);\n const [suggestion, setSuggestion] = useState('');\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const placeholderRef = useRef<HTMLSpanElement>(null);\n const ghostLayerRef = useRef<HTMLDivElement>(null);\n const [suggestionPosition, setSuggestionPosition] = useState<{\n left: number;\n top: number;\n } | null>(null);\n const [cursorAtFetch, setCursorAtFetch] = useState(-1);\n\n // Only update this “debouncedText” after the user stops typing for 200ms\n const debouncedText = useDebounce(text, 200);\n\n useEffect(() => {\n if (typeof props.value === 'undefined') return;\n setText(defaultValue);\n }, [props.value, props.defaultValue]);\n\n useEffect(() => {\n if (!isActive) return;\n if (!isTyped) return;\n\n const fetchSuggestion = async () => {\n try {\n const cursor =\n textareaRef.current?.selectionStart ?? debouncedText.length;\n const before = debouncedText.slice(0, cursor);\n const after = debouncedText.slice(cursor);\n const numLines = 5;\n const beforeLines = before.split('\\n');\n const contextBeforeLines = beforeLines.slice(\n Math.max(0, beforeLines.length - numLines - 1),\n -1\n );\n const contextBefore = contextBeforeLines.join('\\n');\n const currentLine = beforeLines[beforeLines.length - 1] ?? '';\n const afterLines = after.split('\\n');\n const contextAfter = afterLines.slice(1, numLines + 1).join('\\n');\n\n const response = await autocomplete({\n text: before,\n contextBefore,\n currentLine,\n contextAfter,\n aiOptions: {\n apiKey: configuration.editor.openAiApiKey,\n model: configuration.editor.openAiApiModel,\n temperature: configuration.editor.openAiApiTemperature,\n },\n });\n const autocompletion = response?.data?.autocompletion ?? '';\n\n setSuggestion(autocompletion);\n setCursorAtFetch(cursor);\n } catch (err) {\n console.error('Autocomplete error:', err);\n }\n };\n\n if (debouncedText.length > 3) {\n // Only fetch if user typed more than 3 chars and has paused\n setSuggestion('');\n fetchSuggestion();\n } else {\n // If typed less than threshold, clear the suggestion\n setSuggestion('');\n }\n }, [debouncedText, isActive, autocomplete, configuration]);\n\n useEffect(() => {\n if (\n !suggestion ||\n cursorAtFetch === -1 ||\n !placeholderRef.current ||\n !ghostLayerRef.current\n ) {\n setSuggestionPosition(null);\n return;\n }\n\n const rect = placeholderRef.current.getBoundingClientRect();\n const parentRect = ghostLayerRef.current.getBoundingClientRect();\n setSuggestionPosition({\n left: rect.left - parentRect.left,\n top: rect.top - parentRect.top,\n });\n }, [suggestion, cursorAtFetch, text]);\n\n const acceptSuggestion = () => {\n const currentCursor = textareaRef.current?.selectionStart ?? cursorAtFetch;\n if (currentCursor !== cursorAtFetch) return;\n const newText =\n text.slice(0, currentCursor) + suggestion + text.slice(currentCursor);\n setText(newText);\n setSuggestion('');\n setCursorAtFetch(-1);\n setTimeout(() => {\n textareaRef.current?.focus();\n const newCursorPos = currentCursor + suggestion.length;\n textareaRef.current?.setSelectionRange(newCursorPos, newCursorPos);\n }, 0);\n };\n\n return (\n <div className=\"relative w-full\">\n <div\n ref={ghostLayerRef}\n className=\"pointer-events-none absolute inset-0 whitespace-pre-wrap break-words px-1 py-3 text-base leading-[1.45rem] md:py-1 md:text-sm md:leading-[1.23rem]\"\n aria-hidden=\"true\"\n >\n {suggestion && cursorAtFetch !== -1 ? (\n <>\n <span className=\"align-text-top text-transparent\">\n {text.slice(0, cursorAtFetch)}\n </span>\n <span\n ref={placeholderRef}\n style={{ visibility: 'hidden' }}\n aria-hidden=\"true\"\n >\n {suggestion}\n </span>\n <span className=\"align-text-top text-transparent\">\n {text.slice(cursorAtFetch)}\n </span>\n </>\n ) : (\n <span className=\"align-text-top text-transparent\">{text}</span>\n )}\n {suggestionProp && (\n <span className=\"text-neutral align-text-top\">{suggestionProp}</span>\n )}\n </div>\n {suggestion && suggestionPosition && (\n <div\n className=\"pointer-events-none text-neutral whitespace-pre-wrap break-words text-base leading-[1.45rem] md:text-sm md:leading-[1.23rem]\"\n style={{\n position: 'absolute',\n left: suggestionPosition.left,\n top: suggestionPosition.top,\n }}\n >\n {suggestion}\n </div>\n )}\n <AutoSizedTextArea\n {...props}\n ref={textareaRef}\n value={text}\n onChange={(e) => {\n setIsTyped(true);\n setText(e.target.value);\n setSuggestion('');\n props.onChange?.(e);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Tab' && suggestion) {\n e.preventDefault();\n acceptSuggestion();\n }\n props.onKeyDown?.(e);\n }}\n onSelect={(e) => {\n if (\n suggestion &&\n (e.target as HTMLTextAreaElement).selectionStart !== cursorAtFetch\n ) {\n setSuggestion('');\n setCursorAtFetch(-1);\n }\n props.onSelect?.(e);\n }}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAUa,MAAA,cAAc,CAAK,OAAU,UAAqB;AAC7D,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAY,KAAK;AAE7D,YAAU,MAAM;AACR,UAAA,QAAQ,WAAW,MAAM;AAC7B,wBAAkB,KAAK;AAAA,OACtB,KAAK;AAGD,WAAA,MAAM,aAAa,KAAK;AAAA,EAAA,GAC9B,CAAC,OAAO,KAAK,CAAC;AAEV,SAAA;AACT;AAOO,MAAM,uBAAsD,CAAC;AAAA,EAClE,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,GAAG;AACL,MAAM;AACJ,QAAM,eAAe,OAAO,MAAM,SAAS,MAAM,gBAAgB,EAAE;AAC7D,QAAA,EAAE,aAAa,IAAI,gBAAgB;AACzC,QAAM,gBAAgB,iBAAiB;AACvC,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,YAAY;AAC7C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,EAAE;AACzC,QAAA,cAAc,OAA4B,IAAI;AAC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2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const components_Accordion_Accordion = require("./Accordion/Accordion.cjs");
|
|
4
|
-
const components_Auth_ExternalsLoginButtons_ExternalsLoginButtons = require("./Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs");
|
|
5
|
-
const components_Auth_SignInForm_SignInForm = require("./Auth/SignInForm/SignInForm.cjs");
|
|
6
|
-
const components_Auth_SignInForm_useSignInSchema = require("./Auth/SignInForm/useSignInSchema.cjs");
|
|
7
|
-
const components_Auth_SignUpForm_SignUpForm = require("./Auth/SignUpForm/SignUpForm.cjs");
|
|
8
|
-
const components_Auth_SignUpForm_useSignUpSchema = require("./Auth/SignUpForm/useSignUpSchema.cjs");
|
|
9
|
-
const components_Auth_ChangePasswordForm_ChangePasswordForm = require("./Auth/ChangePasswordForm/ChangePasswordForm.cjs");
|
|
10
|
-
const components_Auth_ChangePasswordForm_useChangePasswordSchema = require("./Auth/ChangePasswordForm/useChangePasswordSchema.cjs");
|
|
11
|
-
const components_Auth_ResetPasswordForm_ResetPasswordForm = require("./Auth/ResetPasswordForm/ResetPasswordForm.cjs");
|
|
12
|
-
const components_Auth_ResetPasswordForm_useResetPasswordSchema = require("./Auth/ResetPasswordForm/useResetPasswordSchema.cjs");
|
|
13
|
-
const components_Auth_AuthModal_index = require("./Auth/AuthModal/index.cjs");
|
|
14
|
-
const components_Auth_useAuth_index = require("./Auth/useAuth/index.cjs");
|
|
15
|
-
const components_Auth_AuthenticationBarrier_AuthenticationBarrierServer = require("./Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs");
|
|
16
|
-
const components_Auth_AuthenticationBarrier_AuthenticationBarrierClient = require("./Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs");
|
|
17
|
-
const components_Auth_useUser_index = require("./Auth/useUser/index.cjs");
|
|
18
|
-
const components_Auth_VerifyEmailForm_VerifyEmailForm = require("./Auth/VerifyEmailForm/VerifyEmailForm.cjs");
|
|
19
|
-
const components_Auth_DefineNewPasswordForm_DefineNewPasswordForm = require("./Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs");
|
|
20
|
-
const components_Auth_DefineNewPasswordForm_useDefineNewPasswordSchema = require("./Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs");
|
|
21
4
|
const components_Avatar_index = require("./Avatar/index.cjs");
|
|
22
5
|
const components_Badge_index = require("./Badge/index.cjs");
|
|
23
6
|
const components_Breadcrumb_index = require("./Breadcrumb/index.cjs");
|
|
@@ -26,6 +9,7 @@ const components_ClickOutsideDiv_index = require("./ClickOutsideDiv/index.cjs");
|
|
|
26
9
|
const components_Command_index = require("./Command/index.cjs");
|
|
27
10
|
const components_Container_index = require("./Container/index.cjs");
|
|
28
11
|
const components_ContentSelector_ContentSelector = require("./ContentSelector/ContentSelector.cjs");
|
|
12
|
+
const components_CopyButton_index = require("./CopyButton/index.cjs");
|
|
29
13
|
const components_CopyToClipboard_index = require("./CopyToClipboard/index.cjs");
|
|
30
14
|
const components_DictionaryEditor_DictionaryEditor = require("./DictionaryEditor/DictionaryEditor.cjs");
|
|
31
15
|
const components_DictionaryFieldEditor_DictionaryCreationForm_DictionaryCreationForm = require("./DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs");
|
|
@@ -70,7 +54,6 @@ const components_Pattern_DotPattern = require("./Pattern/DotPattern.cjs");
|
|
|
70
54
|
const components_Pattern_SpotLight = require("./Pattern/SpotLight.cjs");
|
|
71
55
|
const components_Popover_index = require("./Popover/index.cjs");
|
|
72
56
|
const components_PressableSpan_PressableSpan = require("./PressableSpan/PressableSpan.cjs");
|
|
73
|
-
const components_ProfileDropDown_index = require("./ProfileDropDown/index.cjs");
|
|
74
57
|
const components_RightDrawer_RightDrawer = require("./RightDrawer/RightDrawer.cjs");
|
|
75
58
|
const components_RightDrawer_useRightDrawerStore = require("./RightDrawer/useRightDrawerStore.cjs");
|
|
76
59
|
const components_Select_Multiselect = require("./Select/Multiselect.cjs");
|
|
@@ -97,25 +80,6 @@ const components_SocialNetworks_TiktokLogo = require("./SocialNetworks/TiktokLog
|
|
|
97
80
|
const components_SocialNetworks_XLogo = require("./SocialNetworks/XLogo.cjs");
|
|
98
81
|
const components_SocialNetworks_YoutubeLogo = require("./SocialNetworks/YoutubeLogo.cjs");
|
|
99
82
|
exports.Accordion = components_Accordion_Accordion.Accordion;
|
|
100
|
-
exports.ExternalsLoginButtons = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.ExternalsLoginButtons;
|
|
101
|
-
exports.GitHubLoginButton = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.GitHubLoginButton;
|
|
102
|
-
exports.GoogleLoginButton = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.GoogleLoginButton;
|
|
103
|
-
exports.SignInForm = components_Auth_SignInForm_SignInForm.SignInForm;
|
|
104
|
-
exports.useSignInSchema = components_Auth_SignInForm_useSignInSchema.useSignInSchema;
|
|
105
|
-
exports.SignUpForm = components_Auth_SignUpForm_SignUpForm.SignUpForm;
|
|
106
|
-
exports.useSignUpSchema = components_Auth_SignUpForm_useSignUpSchema.useSignUpSchema;
|
|
107
|
-
exports.ChangePasswordForm = components_Auth_ChangePasswordForm_ChangePasswordForm.ChangePasswordForm;
|
|
108
|
-
exports.useChangePasswordSchema = components_Auth_ChangePasswordForm_useChangePasswordSchema.useChangePasswordSchema;
|
|
109
|
-
exports.ResetPasswordForm = components_Auth_ResetPasswordForm_ResetPasswordForm.ResetPasswordForm;
|
|
110
|
-
exports.useResetPasswordSchema = components_Auth_ResetPasswordForm_useResetPasswordSchema.useResetPasswordSchema;
|
|
111
|
-
exports.AuthModal = components_Auth_AuthModal_index.AuthModal;
|
|
112
|
-
exports.useAuth = components_Auth_useAuth_index.useAuth;
|
|
113
|
-
exports.AuthenticationBarrierServer = components_Auth_AuthenticationBarrier_AuthenticationBarrierServer.AuthenticationBarrierServer;
|
|
114
|
-
exports.AuthenticationBarrierClient = components_Auth_AuthenticationBarrier_AuthenticationBarrierClient.AuthenticationBarrierClient;
|
|
115
|
-
exports.useUser = components_Auth_useUser_index.useUser;
|
|
116
|
-
exports.VerifyEmailForm = components_Auth_VerifyEmailForm_VerifyEmailForm.VerifyEmailForm;
|
|
117
|
-
exports.DefineNewPasswordForm = components_Auth_DefineNewPasswordForm_DefineNewPasswordForm.DefineNewPasswordForm;
|
|
118
|
-
exports.useDefineNewPasswordSchema = components_Auth_DefineNewPasswordForm_useDefineNewPasswordSchema.useDefineNewPasswordSchema;
|
|
119
83
|
exports.Avatar = components_Avatar_index.Avatar;
|
|
120
84
|
exports.Badge = components_Badge_index.Badge;
|
|
121
85
|
exports.badgeVariants = components_Badge_index.badgeVariants;
|
|
@@ -125,7 +89,9 @@ exports.ClickOutsideDiv = components_ClickOutsideDiv_index.ClickOutsideDiv;
|
|
|
125
89
|
exports.Command = components_Command_index.Command;
|
|
126
90
|
exports.CommandRoot = components_Command_index.CommandRoot;
|
|
127
91
|
exports.Container = components_Container_index.Container;
|
|
92
|
+
exports.containerVariants = components_Container_index.containerVariants;
|
|
128
93
|
exports.ContentSelector = components_ContentSelector_ContentSelector.ContentSelector;
|
|
94
|
+
exports.CopyButton = components_CopyButton_index.CopyButton;
|
|
129
95
|
exports.CopyToClipboard = components_CopyToClipboard_index.CopyToClipboard;
|
|
130
96
|
exports.DictionaryEditor = components_DictionaryEditor_DictionaryEditor.DictionaryEditor;
|
|
131
97
|
exports.DictionaryCreationForm = components_DictionaryFieldEditor_DictionaryCreationForm_DictionaryCreationForm.DictionaryCreationForm;
|
|
@@ -180,7 +146,6 @@ exports.DotPattern = components_Pattern_DotPattern.DotPattern;
|
|
|
180
146
|
exports.Spotlight = components_Pattern_SpotLight.Spotlight;
|
|
181
147
|
exports.Popover = components_Popover_index.Popover;
|
|
182
148
|
exports.PressableSpan = components_PressableSpan_PressableSpan.PressableSpan;
|
|
183
|
-
exports.ProfileDropDown = components_ProfileDropDown_index.ProfileDropDown;
|
|
184
149
|
exports.RightDrawer = components_RightDrawer_RightDrawer.RightDrawer;
|
|
185
150
|
exports.useRightDrawerStore = components_RightDrawer_useRightDrawerStore.useRightDrawerStore;
|
|
186
151
|
exports.MultiSelect = components_Select_Multiselect.MultiSelect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './Accordion';
|
|
2
|
-
export * from './Auth';
|
|
3
2
|
export * from './Avatar';
|
|
4
3
|
export * from './Badge';
|
|
5
4
|
export * from './Breadcrumb';
|
|
@@ -8,6 +7,7 @@ export * from './ClickOutsideDiv';
|
|
|
8
7
|
export * from './Command';
|
|
9
8
|
export * from './Container';
|
|
10
9
|
export * from './ContentSelector';
|
|
10
|
+
export * from './CopyButton';
|
|
11
11
|
export * from './CopyToClipboard';
|
|
12
12
|
export * from './DictionaryEditor';
|
|
13
13
|
export * from './DictionaryFieldEditor';
|
|
@@ -36,7 +36,6 @@ export * from './Navbar';
|
|
|
36
36
|
export * from './Pattern';
|
|
37
37
|
export * from './Popover';
|
|
38
38
|
export * from './PressableSpan';
|
|
39
|
-
export * from './ProfileDropDown';
|
|
40
39
|
export * from './RightDrawer';
|
|
41
40
|
export * from './Select';
|
|
42
41
|
export * from './SocialNetworks';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B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cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
import { Accordion } from "./Accordion/Accordion.mjs";
|
|
2
|
-
import { ExternalsLoginButtons, GitHubLoginButton, GoogleLoginButton } from "./Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs";
|
|
3
|
-
import { SignInForm } from "./Auth/SignInForm/SignInForm.mjs";
|
|
4
|
-
import { useSignInSchema } from "./Auth/SignInForm/useSignInSchema.mjs";
|
|
5
|
-
import { SignUpForm } from "./Auth/SignUpForm/SignUpForm.mjs";
|
|
6
|
-
import { useSignUpSchema } from "./Auth/SignUpForm/useSignUpSchema.mjs";
|
|
7
|
-
import { ChangePasswordForm } from "./Auth/ChangePasswordForm/ChangePasswordForm.mjs";
|
|
8
|
-
import { useChangePasswordSchema } from "./Auth/ChangePasswordForm/useChangePasswordSchema.mjs";
|
|
9
|
-
import { ResetPasswordForm } from "./Auth/ResetPasswordForm/ResetPasswordForm.mjs";
|
|
10
|
-
import { useResetPasswordSchema } from "./Auth/ResetPasswordForm/useResetPasswordSchema.mjs";
|
|
11
|
-
import { AuthModal } from "./Auth/AuthModal/index.mjs";
|
|
12
|
-
import { useAuth } from "./Auth/useAuth/index.mjs";
|
|
13
|
-
import { AuthenticationBarrierServer } from "./Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs";
|
|
14
|
-
import { AuthenticationBarrierClient } from "./Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs";
|
|
15
|
-
import { useUser } from "./Auth/useUser/index.mjs";
|
|
16
|
-
import { VerifyEmailForm } from "./Auth/VerifyEmailForm/VerifyEmailForm.mjs";
|
|
17
|
-
import { DefineNewPasswordForm } from "./Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs";
|
|
18
|
-
import { useDefineNewPasswordSchema } from "./Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs";
|
|
19
2
|
import { Avatar } from "./Avatar/index.mjs";
|
|
20
3
|
import { Badge, badgeVariants } from "./Badge/index.mjs";
|
|
21
4
|
import { Breadcrumb } from "./Breadcrumb/index.mjs";
|
|
22
5
|
import { Button } from "./Button/Button.mjs";
|
|
23
6
|
import { ClickOutsideDiv } from "./ClickOutsideDiv/index.mjs";
|
|
24
7
|
import { Command, CommandRoot } from "./Command/index.mjs";
|
|
25
|
-
import { Container } from "./Container/index.mjs";
|
|
8
|
+
import { Container, containerVariants } from "./Container/index.mjs";
|
|
26
9
|
import { ContentSelector } from "./ContentSelector/ContentSelector.mjs";
|
|
10
|
+
import { CopyButton } from "./CopyButton/index.mjs";
|
|
27
11
|
import { CopyToClipboard } from "./CopyToClipboard/index.mjs";
|
|
28
12
|
import { DictionaryEditor } from "./DictionaryEditor/DictionaryEditor.mjs";
|
|
29
13
|
import { DictionaryCreationForm } from "./DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs";
|
|
@@ -68,7 +52,6 @@ import { DotPattern } from "./Pattern/DotPattern.mjs";
|
|
|
68
52
|
import { Spotlight } from "./Pattern/SpotLight.mjs";
|
|
69
53
|
import { Popover } from "./Popover/index.mjs";
|
|
70
54
|
import { PressableSpan } from "./PressableSpan/PressableSpan.mjs";
|
|
71
|
-
import { ProfileDropDown } from "./ProfileDropDown/index.mjs";
|
|
72
55
|
import { RightDrawer } from "./RightDrawer/RightDrawer.mjs";
|
|
73
56
|
import { useRightDrawerStore } from "./RightDrawer/useRightDrawerStore.mjs";
|
|
74
57
|
import { MultiSelect } from "./Select/Multiselect.mjs";
|
|
@@ -96,16 +79,12 @@ import { XLogo } from "./SocialNetworks/XLogo.mjs";
|
|
|
96
79
|
import { YoutubeLogo } from "./SocialNetworks/YoutubeLogo.mjs";
|
|
97
80
|
export {
|
|
98
81
|
Accordion,
|
|
99
|
-
AuthModal,
|
|
100
|
-
AuthenticationBarrierClient,
|
|
101
|
-
AuthenticationBarrierServer,
|
|
102
82
|
AutoCompleteTextarea,
|
|
103
83
|
AutoSizedTextArea,
|
|
104
84
|
Avatar,
|
|
105
85
|
Badge,
|
|
106
86
|
Breadcrumb,
|
|
107
87
|
Button,
|
|
108
|
-
ChangePasswordForm,
|
|
109
88
|
Checkbox,
|
|
110
89
|
ClickOutsideDiv,
|
|
111
90
|
Code,
|
|
@@ -113,8 +92,8 @@ export {
|
|
|
113
92
|
CommandRoot,
|
|
114
93
|
Container,
|
|
115
94
|
ContentSelector,
|
|
95
|
+
CopyButton,
|
|
116
96
|
CopyToClipboard,
|
|
117
|
-
DefineNewPasswordForm,
|
|
118
97
|
DesktopThemeSwitcher,
|
|
119
98
|
DictionaryCreationForm,
|
|
120
99
|
DictionaryEditor,
|
|
@@ -123,14 +102,11 @@ export {
|
|
|
123
102
|
DropDown,
|
|
124
103
|
EditableFieldInput,
|
|
125
104
|
EditableFieldTextArea,
|
|
126
|
-
ExternalsLoginButtons,
|
|
127
105
|
FacebookLogo,
|
|
128
106
|
FileList,
|
|
129
107
|
Flag,
|
|
130
108
|
Footer,
|
|
131
109
|
F as Form,
|
|
132
|
-
GitHubLoginButton,
|
|
133
|
-
GoogleLoginButton,
|
|
134
110
|
GridPattern,
|
|
135
111
|
H1,
|
|
136
112
|
H2,
|
|
@@ -166,15 +142,11 @@ export {
|
|
|
166
142
|
Popover,
|
|
167
143
|
PressableSpan,
|
|
168
144
|
ProductHuntLogo,
|
|
169
|
-
ProfileDropDown,
|
|
170
|
-
ResetPasswordForm,
|
|
171
145
|
RightDrawer,
|
|
172
146
|
Select,
|
|
173
147
|
SelectContent,
|
|
174
148
|
SelectLabel,
|
|
175
149
|
SelectSeparator,
|
|
176
|
-
SignInForm,
|
|
177
|
-
SignUpForm,
|
|
178
150
|
SocialNetworks,
|
|
179
151
|
Spotlight,
|
|
180
152
|
SwitchSelector,
|
|
@@ -190,7 +162,6 @@ export {
|
|
|
190
162
|
ToastTitle,
|
|
191
163
|
ToastViewport,
|
|
192
164
|
Toaster,
|
|
193
|
-
VerifyEmailForm,
|
|
194
165
|
VersionSwitcher,
|
|
195
166
|
VersionSwitcherProvider,
|
|
196
167
|
WithResizer,
|
|
@@ -199,23 +170,17 @@ export {
|
|
|
199
170
|
badgeVariants,
|
|
200
171
|
checkIsExternalLink,
|
|
201
172
|
checkboxVariants,
|
|
173
|
+
containerVariants,
|
|
202
174
|
inputVariants,
|
|
203
175
|
linkVariants,
|
|
204
176
|
reducer,
|
|
205
177
|
toast,
|
|
206
|
-
useAuth,
|
|
207
|
-
useChangePasswordSchema,
|
|
208
178
|
useDebounce,
|
|
209
|
-
useDefineNewPasswordSchema,
|
|
210
179
|
useForm,
|
|
211
180
|
useFormField,
|
|
212
181
|
useLocaleSwitcherContent,
|
|
213
|
-
useResetPasswordSchema,
|
|
214
182
|
useRightDrawerStore,
|
|
215
|
-
useSignInSchema,
|
|
216
|
-
useSignUpSchema,
|
|
217
183
|
useToast,
|
|
218
|
-
useUser,
|
|
219
184
|
useVersionSwitcher
|
|
220
185
|
};
|
|
221
186
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const hooks_intlayerAPIHooks = require("./intlayerAPIHooks.cjs");
|
|
4
4
|
const hooks_useAsync_useAsync = require("./useAsync/useAsync.cjs");
|
|
5
5
|
const hooks_useAsync_useAsyncStateStore = require("./useAsync/useAsyncStateStore.cjs");
|
|
6
|
+
const hooks_useAuth_useAuth = require("./useAuth/useAuth.cjs");
|
|
7
|
+
const hooks_useAuth_useOAuth2 = require("./useAuth/useOAuth2.cjs");
|
|
8
|
+
const hooks_useAuth_useSession = require("./useAuth/useSession.cjs");
|
|
6
9
|
const hooks_useDevice = require("./useDevice.cjs");
|
|
7
10
|
const hooks_useGetAllDictionaries = require("./useGetAllDictionaries.cjs");
|
|
8
11
|
const hooks_useGetElementOrWindow = require("./useGetElementOrWindow.cjs");
|
|
@@ -14,6 +17,7 @@ const hooks_usePersistedStore = require("./usePersistedStore.cjs");
|
|
|
14
17
|
const hooks_useScreenWidth = require("./useScreenWidth.cjs");
|
|
15
18
|
const hooks_useScrollBlockage_index = require("../index-BYzBot7l.cjs");
|
|
16
19
|
const hooks_useScrollDetection = require("./useScrollDetection.cjs");
|
|
20
|
+
const hooks_useUser_index = require("./useUser/index.cjs");
|
|
17
21
|
exports.useAddDictionary = hooks_intlayerAPIHooks.useAddDictionary;
|
|
18
22
|
exports.useAddNewAccessKey = hooks_intlayerAPIHooks.useAddNewAccessKey;
|
|
19
23
|
exports.useAddOrganization = hooks_intlayerAPIHooks.useAddOrganization;
|
|
@@ -29,7 +33,6 @@ exports.useAuditTag = hooks_intlayerAPIHooks.useAuditTag;
|
|
|
29
33
|
exports.useAutocomplete = hooks_intlayerAPIHooks.useAutocomplete;
|
|
30
34
|
exports.useCancelSubscription = hooks_intlayerAPIHooks.useCancelSubscription;
|
|
31
35
|
exports.useChangePassword = hooks_intlayerAPIHooks.useChangePassword;
|
|
32
|
-
exports.useCheckIfUserHasPassword = hooks_intlayerAPIHooks.useCheckIfUserHasPassword;
|
|
33
36
|
exports.useCreateUser = hooks_intlayerAPIHooks.useCreateUser;
|
|
34
37
|
exports.useDefineNewPassword = hooks_intlayerAPIHooks.useDefineNewPassword;
|
|
35
38
|
exports.useDeleteAccessKey = hooks_intlayerAPIHooks.useDeleteAccessKey;
|
|
@@ -75,6 +78,9 @@ exports.useWriteDictionary = hooks_intlayerAPIHooks.useWriteDictionary;
|
|
|
75
78
|
exports.useAsync = hooks_useAsync_useAsync.useAsync;
|
|
76
79
|
exports.AsyncStateProvider = hooks_useAsync_useAsyncStateStore.AsyncStateProvider;
|
|
77
80
|
exports.useAsyncState = hooks_useAsync_useAsyncStateStore.useAsyncState;
|
|
81
|
+
exports.useAuth = hooks_useAuth_useAuth.useAuth;
|
|
82
|
+
exports.useOAuth2 = hooks_useAuth_useOAuth2.useOAuth2;
|
|
83
|
+
exports.useSession = hooks_useAuth_useSession.useSession;
|
|
78
84
|
exports.calculateIsMobile = hooks_useDevice.calculateIsMobile;
|
|
79
85
|
exports.checkIsIphoneOrSafariDevice = hooks_useDevice.checkIsIphoneOrSafariDevice;
|
|
80
86
|
exports.checkIsMobileScreen = hooks_useDevice.checkIsMobileScreen;
|
|
@@ -91,4 +97,5 @@ exports.usePersistedStore = hooks_usePersistedStore.usePersistedStore;
|
|
|
91
97
|
exports.useScreenWidth = hooks_useScreenWidth.useScreenWidth;
|
|
92
98
|
exports.useScrollBlockage = hooks_useScrollBlockage_index.useScrollBlockage;
|
|
93
99
|
exports.useScrollDetection = hooks_useScrollDetection.useScrollDetection;
|
|
100
|
+
exports.useUser = hooks_useUser_index.useUser;
|
|
94
101
|
//# sourceMappingURL=index.cjs.map
|
package/dist/hooks/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './intlayerAPIHooks';
|
|
2
2
|
export * from './useAsync';
|
|
3
|
+
export * from './useAuth';
|
|
3
4
|
export * from './useDevice';
|
|
4
5
|
export * from './useGetAllDictionaries';
|
|
5
6
|
export * from './useGetElementOrWindow';
|
|
@@ -11,4 +12,5 @@ export * from './usePersistedStore';
|
|
|
11
12
|
export * from './useScreenWidth';
|
|
12
13
|
export * from './useScrollBlockage';
|
|
13
14
|
export * from './useScrollDetection';
|
|
15
|
+
export * from './useUser';
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC"}
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddProject, useAddTag, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditTag, useAutocomplete, useCancelSubscription, useChangePassword,
|
|
1
|
+
import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddProject, useAddTag, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditTag, useAutocomplete, useCancelSubscription, useChangePassword, useCreateUser, useDefineNewPassword, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeleteProject, useDeleteTag, useDeleteUser, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetEditorDictionaries, useGetNewsletterStatus, useGetOrganizations, useGetPricing, useGetProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUsers, useLogin, useLogout, usePushDictionaries, useRefreshAccessKey, useRegister, useSearchDoc, useSelectOrganization, useSelectProject, useSubscribeToNewsletter, useTranslateJSONDeclaration, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateProject, useUpdateProjectMembers, useUpdateTag, useUpdateUser, useVerifyEmail, useWriteDictionary } from "./intlayerAPIHooks.mjs";
|
|
2
2
|
import { useAsync } from "./useAsync/useAsync.mjs";
|
|
3
3
|
import { AsyncStateProvider, useAsyncState } from "./useAsync/useAsyncStateStore.mjs";
|
|
4
|
+
import { useAuth } from "./useAuth/useAuth.mjs";
|
|
5
|
+
import { useOAuth2 } from "./useAuth/useOAuth2.mjs";
|
|
6
|
+
import { useSession } from "./useAuth/useSession.mjs";
|
|
4
7
|
import { calculateIsMobile, checkIsIphoneOrSafariDevice, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useDevice } from "./useDevice.mjs";
|
|
5
8
|
import { useGetAllDictionaries } from "./useGetAllDictionaries.mjs";
|
|
6
9
|
import { useGetElementOrWindow } from "./useGetElementOrWindow.mjs";
|
|
@@ -12,6 +15,7 @@ import { usePersistedStore } from "./usePersistedStore.mjs";
|
|
|
12
15
|
import { useScreenWidth } from "./useScreenWidth.mjs";
|
|
13
16
|
import { u } from "../index-BCuMWKyy.js";
|
|
14
17
|
import { useScrollDetection } from "./useScrollDetection.mjs";
|
|
18
|
+
import { useUser } from "./useUser/index.mjs";
|
|
15
19
|
export {
|
|
16
20
|
AsyncStateProvider,
|
|
17
21
|
calculateIsMobile,
|
|
@@ -33,10 +37,10 @@ export {
|
|
|
33
37
|
useAuditContentDeclarationField,
|
|
34
38
|
useAuditContentDeclarationMetadata,
|
|
35
39
|
useAuditTag,
|
|
40
|
+
useAuth,
|
|
36
41
|
useAutocomplete,
|
|
37
42
|
useCancelSubscription,
|
|
38
43
|
useChangePassword,
|
|
39
|
-
useCheckIfUserHasPassword,
|
|
40
44
|
useCreateUser,
|
|
41
45
|
useDefineNewPassword,
|
|
42
46
|
useDeleteAccessKey,
|
|
@@ -66,6 +70,7 @@ export {
|
|
|
66
70
|
useKeyboardDetector,
|
|
67
71
|
useLogin,
|
|
68
72
|
useLogout,
|
|
73
|
+
useOAuth2,
|
|
69
74
|
usePersistedStore,
|
|
70
75
|
usePushDictionaries,
|
|
71
76
|
useRefreshAccessKey,
|
|
@@ -76,6 +81,7 @@ export {
|
|
|
76
81
|
useSearchDoc,
|
|
77
82
|
useSelectOrganization,
|
|
78
83
|
useSelectProject,
|
|
84
|
+
useSession,
|
|
79
85
|
useSubscribeToNewsletter,
|
|
80
86
|
useTranslateJSONDeclaration,
|
|
81
87
|
useUnselectOrganization,
|
|
@@ -88,6 +94,7 @@ export {
|
|
|
88
94
|
useUpdateProjectMembers,
|
|
89
95
|
useUpdateTag,
|
|
90
96
|
useUpdateUser,
|
|
97
|
+
useUser,
|
|
91
98
|
useVerifyEmail,
|
|
92
99
|
useWriteDictionary
|
|
93
100
|
};
|
package/dist/hooks/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const editorReact = require("@intlayer/editor-react");
|
|
5
|
-
const components_Auth_useAuth_index = require("../components/Auth/useAuth/index.cjs");
|
|
6
5
|
require("../components/Toaster/Toast.cjs");
|
|
7
6
|
const components_Toaster_useToast = require("../components/Toaster/useToast.cjs");
|
|
8
7
|
require("react/jsx-runtime");
|
|
9
8
|
const hooks_useAsync_useAsync = require("./useAsync/useAsync.cjs");
|
|
9
|
+
const hooks_useAuth_useAuth = require("./useAuth/useAuth.cjs");
|
|
10
|
+
require("@intlayer/api");
|
|
11
|
+
require("@intlayer/config/built");
|
|
12
|
+
require("./useAsync/useAsyncStateStore.cjs");
|
|
10
13
|
const hooks_useIntlayerAPI = require("./useIntlayerAPI.cjs");
|
|
11
14
|
var define_process_env_default = {};
|
|
12
|
-
const formatErrorCode = (errorCode) =>
|
|
13
|
-
return errorCode.split("_").join(" ");
|
|
14
|
-
};
|
|
15
|
+
const formatErrorCode = (errorCode) => errorCode.split("_").join(" ");
|
|
15
16
|
const useErrorHandling = (options) => {
|
|
16
17
|
const { toast } = components_Toaster_useToast.useToast();
|
|
17
18
|
return {
|
|
@@ -36,6 +37,15 @@ const useErrorHandling = (options) => {
|
|
|
36
37
|
options.onError?.(errorMessage);
|
|
37
38
|
},
|
|
38
39
|
onSuccess: (data) => {
|
|
40
|
+
if (data?.error) {
|
|
41
|
+
toast({
|
|
42
|
+
title: formatErrorCode(
|
|
43
|
+
data.error.title ?? data.error.code ?? "Error"
|
|
44
|
+
),
|
|
45
|
+
description: data.error.message ?? data.error.code ?? "An error occurred",
|
|
46
|
+
variant: "error"
|
|
47
|
+
});
|
|
48
|
+
}
|
|
39
49
|
if (data?.message)
|
|
40
50
|
toast({
|
|
41
51
|
title: data.message,
|
|
@@ -48,7 +58,7 @@ const useErrorHandling = (options) => {
|
|
|
48
58
|
};
|
|
49
59
|
const useAuthEnable = (options, { requireUser, requireProject, requireOrganization } = {}) => {
|
|
50
60
|
const configuration = editorReact.useConfiguration();
|
|
51
|
-
const {
|
|
61
|
+
const { oAuth2AccessToken, session } = hooks_useAuth_useAuth.useAuth({
|
|
52
62
|
intlayerConfiguration: configuration
|
|
53
63
|
});
|
|
54
64
|
const isEnabledOption = options?.enable ?? true;
|
|
@@ -58,9 +68,7 @@ const useAuthEnable = (options, { requireUser, requireProject, requireOrganizati
|
|
|
58
68
|
const isUserEnabled = requireUser ? Boolean(user) : true;
|
|
59
69
|
const isProjectEnabled = requireProject ? Boolean(project) : true;
|
|
60
70
|
const isOrganizationEnabled = requireOrganization ? Boolean(organization) : true;
|
|
61
|
-
const
|
|
62
|
-
!session && Boolean(oAuth2AccessToken);
|
|
63
|
-
const isEnabled = isEnabledOption && isUserEnabled && isProjectEnabled && isOrganizationEnabled && isCSRFEnabled;
|
|
71
|
+
const isEnabled = isEnabledOption && isUserEnabled && isProjectEnabled && isOrganizationEnabled;
|
|
64
72
|
return {
|
|
65
73
|
...options,
|
|
66
74
|
enable: isEnabled
|
|
@@ -75,43 +83,34 @@ const useEditorAsync = (key, asyncFunction, options) => {
|
|
|
75
83
|
const optionsWithErrorHandling = useErrorHandling(options ?? {});
|
|
76
84
|
return hooks_useAsync_useAsync.useAsync(key, asyncFunction, optionsWithErrorHandling);
|
|
77
85
|
};
|
|
78
|
-
const useLogin = (args) => useAppAsync("login", hooks_useIntlayerAPI.useIntlayerAuth().auth.
|
|
86
|
+
const useLogin = (args) => useAppAsync("login", hooks_useIntlayerAPI.useIntlayerAuth().auth.signInEmail, {
|
|
79
87
|
invalidateQueries: ["getSession"],
|
|
80
88
|
...args
|
|
81
89
|
});
|
|
82
|
-
const useRegister = (args) => useAppAsync("register", hooks_useIntlayerAPI.useIntlayerAuth().auth.
|
|
90
|
+
const useRegister = (args) => useAppAsync("register", hooks_useIntlayerAPI.useIntlayerAuth().auth.signUpEmail, {
|
|
83
91
|
invalidateQueries: ["getSession"],
|
|
84
92
|
...args
|
|
85
93
|
});
|
|
86
|
-
const useLogout = (args) => useAppAsync("logout", hooks_useIntlayerAPI.useIntlayerAuth().auth.
|
|
87
|
-
invalidateQueries: ["getSession"],
|
|
94
|
+
const useLogout = (args) => useAppAsync("logout", hooks_useIntlayerAPI.useIntlayerAuth().auth.signOut, {
|
|
88
95
|
...args
|
|
89
96
|
});
|
|
90
|
-
const useChangePassword = (args) => useAppAsync(
|
|
97
|
+
const useChangePassword = (args) => useAppAsync(
|
|
98
|
+
"changePassword",
|
|
99
|
+
hooks_useIntlayerAPI.useIntlayerAuth().auth.changePasswordSession,
|
|
100
|
+
args
|
|
101
|
+
);
|
|
91
102
|
const useAskResetPassword = (args) => useAppAsync(
|
|
92
103
|
"askResetPassword",
|
|
93
|
-
hooks_useIntlayerAPI.useIntlayerAuth().auth.
|
|
104
|
+
hooks_useIntlayerAPI.useIntlayerAuth().auth.requestPasswordResetSession,
|
|
94
105
|
args
|
|
95
106
|
);
|
|
96
107
|
const useDefineNewPassword = (args) => useAppAsync(
|
|
97
108
|
"defineNewPassword",
|
|
98
|
-
hooks_useIntlayerAPI.useIntlayerAuth().auth.
|
|
99
|
-
args
|
|
100
|
-
);
|
|
101
|
-
const useCheckIfUserHasPassword = (args) => useAppAsync(
|
|
102
|
-
"checkIfUserHasPassword",
|
|
103
|
-
hooks_useIntlayerAPI.useIntlayerAuth().auth.checkIfUserHasPassword,
|
|
104
|
-
args,
|
|
105
|
-
{
|
|
106
|
-
requireUser: true
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
const useVerifyEmail = (args) => useAppAsync("verifyEmail", hooks_useIntlayerAPI.useIntlayerAuth().auth.verifyEmail, args);
|
|
110
|
-
const useGetUserByAccount = (args) => useAppAsync(
|
|
111
|
-
"getUserByAccount",
|
|
112
|
-
hooks_useIntlayerAPI.useIntlayerAuth().user.getUserByAccount,
|
|
109
|
+
hooks_useIntlayerAPI.useIntlayerAuth().auth.changePasswordSession,
|
|
113
110
|
args
|
|
114
111
|
);
|
|
112
|
+
const useVerifyEmail = (args) => useAppAsync("verifyEmail", hooks_useIntlayerAPI.useIntlayerAuth().auth.verifyEmailSession, args);
|
|
113
|
+
const useGetUserByAccount = (args) => useAppAsync("getUserByAccount", hooks_useIntlayerAPI.useIntlayerAuth().auth.accountInfo, args);
|
|
115
114
|
const useGetUsers = (args) => useAppAsync(
|
|
116
115
|
"getUsers",
|
|
117
116
|
hooks_useIntlayerAPI.useIntlayerAuth().user.getUsers,
|
|
@@ -128,7 +127,7 @@ const useGetUsers = (args) => useAppAsync(
|
|
|
128
127
|
requireUser: true
|
|
129
128
|
}
|
|
130
129
|
);
|
|
131
|
-
const useCreateUser = (args) => useAppAsync("createUser", hooks_useIntlayerAPI.useIntlayerAuth().
|
|
130
|
+
const useCreateUser = (args) => useAppAsync("createUser", hooks_useIntlayerAPI.useIntlayerAuth().auth.updateUser, {
|
|
132
131
|
invalidateQueries: ["getUsers"],
|
|
133
132
|
...args
|
|
134
133
|
});
|
|
@@ -499,7 +498,6 @@ exports.useAuditTag = useAuditTag;
|
|
|
499
498
|
exports.useAutocomplete = useAutocomplete;
|
|
500
499
|
exports.useCancelSubscription = useCancelSubscription;
|
|
501
500
|
exports.useChangePassword = useChangePassword;
|
|
502
|
-
exports.useCheckIfUserHasPassword = useCheckIfUserHasPassword;
|
|
503
501
|
exports.useCreateUser = useCreateUser;
|
|
504
502
|
exports.useDefineNewPassword = useDefineNewPassword;
|
|
505
503
|
exports.useDeleteAccessKey = useDeleteAccessKey;
|