@intlayer/design-system 8.6.3 → 8.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/esm/components/Accordion/Accordion.mjs +1 -1
  2. package/dist/esm/components/Avatar/index.mjs +1 -1
  3. package/dist/esm/components/Breadcrumb/index.mjs +1 -1
  4. package/dist/esm/components/Browser/Browser.mjs +1 -1
  5. package/dist/esm/components/Carousel/index.mjs +1 -1
  6. package/dist/esm/components/CollapsibleTable/CollapsibleTable.mjs +1 -1
  7. package/dist/esm/components/ContentEditor/ContentEditor.mjs +1 -1
  8. package/dist/esm/components/ContentEditor/ContentEditorInput.mjs +1 -1
  9. package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs +2 -2
  10. package/dist/esm/components/CopyButton/index.mjs +1 -1
  11. package/dist/esm/components/CopyToClipboard/index.mjs +1 -1
  12. package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +3 -3
  13. package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
  14. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +4 -4
  15. package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +2 -2
  16. package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +3 -3
  17. package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  18. package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +3 -3
  19. package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -1
  20. package/dist/esm/components/EditableField/EditableFieldLayout.mjs +1 -1
  21. package/dist/esm/components/Form/elements/OTPElement.mjs +1 -1
  22. package/dist/esm/components/HideShow/index.mjs +1 -1
  23. package/dist/esm/components/IDE/FileTree.mjs +1 -1
  24. package/dist/esm/components/Input/InputPassword.mjs +1 -1
  25. package/dist/esm/components/Input/OTPInput.mjs +1 -1
  26. package/dist/esm/components/Link/Link.mjs +1 -1
  27. package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -2
  28. package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +1 -1
  29. package/dist/esm/components/Modal/Modal.mjs +3 -3
  30. package/dist/esm/components/Navbar/MobileNavbar.mjs +1 -1
  31. package/dist/esm/components/Pagination/Pagination.mjs +2 -2
  32. package/dist/esm/components/RightDrawer/RightDrawer.mjs +4 -4
  33. package/dist/esm/components/Select/Multiselect.mjs +1 -1
  34. package/dist/esm/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +1 -1
  35. package/dist/esm/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs +1 -1
  36. package/dist/esm/components/Toaster/Toast.mjs +2 -2
  37. package/dist/esm/components/index.mjs +3 -3
  38. package/dist/esm/hooks/index.mjs +9 -9
  39. package/dist/esm/hooks/reactQuery.mjs +1 -1
  40. package/dist/esm/hooks/useAuth/useOAuth2.mjs +1 -1
  41. package/dist/esm/hooks/useAuth/useOAuth2.mjs.map +1 -1
  42. package/dist/esm/hooks/useAuth/useSession.mjs +1 -1
  43. package/dist/esm/hooks/useAuth/useSession.mjs.map +1 -1
  44. package/dist/esm/libs/auth.mjs.map +1 -1
  45. package/dist/esm/providers/ReactQueryProvider.mjs +1 -1
  46. package/dist/types/components/Badge/index.d.ts +1 -1
  47. package/dist/types/components/Button/Button.d.ts +3 -3
  48. package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +2 -2
  49. package/dist/types/components/Command/index.d.ts +1 -1
  50. package/dist/types/components/Container/index.d.ts +7 -7
  51. package/dist/types/components/Input/Checkbox.d.ts +1 -1
  52. package/dist/types/components/Link/Link.d.ts +3 -3
  53. package/dist/types/components/Pagination/Pagination.d.ts +2 -2
  54. package/dist/types/components/Tab/Tab.d.ts +1 -1
  55. package/dist/types/components/TabSelector/TabSelector.d.ts +1 -1
  56. package/dist/types/components/Tag/index.d.ts +2 -2
  57. package/package.json +17 -17
@@ -3,8 +3,8 @@
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { Button, ButtonColor, ButtonVariant } from "../Button/Button.mjs";
5
5
  import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
6
- import { ChevronDown } from "lucide-react";
7
6
  import { useId, useState } from "react";
7
+ import { ChevronDown } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/Accordion/Accordion.tsx
@@ -1,7 +1,7 @@
1
1
  import { cn } from "../../utils/cn.mjs";
2
2
  import { Loader } from "../Loader/index.mjs";
3
- import { User } from "lucide-react";
4
3
  import { useMemo } from "react";
4
+ import { User } from "lucide-react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/Avatar/index.tsx
@@ -3,9 +3,9 @@
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { Button, ButtonVariant } from "../Button/Button.mjs";
5
5
  import { Link, LinkColor } from "../Link/Link.mjs";
6
- import { ChevronRightIcon } from "lucide-react";
7
6
  import { Fragment, createElement } from "react";
8
7
  import { cva } from "class-variance-authority";
8
+ import { ChevronRightIcon } from "lucide-react";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
10
  import { getIntlayer } from "intlayer";
11
11
  import { useIntlayer } from "react-intlayer";
@@ -3,8 +3,8 @@
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { Button } from "../Button/Button.mjs";
5
5
  import { Input, inputVariants } from "../Input/Input.mjs";
6
- import { ArrowLeft, ArrowRight, RotateCw } from "lucide-react";
7
6
  import { useEffect, useImperativeHandle, useRef, useState } from "react";
7
+ import { ArrowLeft, ArrowRight, RotateCw } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { useIntlayer } from "react-intlayer";
10
10
 
@@ -4,8 +4,8 @@ import { cn } from "../../utils/cn.mjs";
4
4
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
5
5
  import { KeyboardShortcut } from "../KeyboardShortcut/KeyboardShortcut.mjs";
6
6
  import { Popover } from "../Popover/dynamic.mjs";
7
- import { ChevronLeft, ChevronRight } from "lucide-react";
8
7
  import { Children, createContext, isValidElement, useContext, useEffect, useRef, useState } from "react";
8
+ import { ChevronLeft, ChevronRight } from "lucide-react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { useIntlayer } from "react-intlayer";
11
11
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
5
- import { ChevronRight } from "lucide-react";
6
5
  import { useState } from "react";
7
6
  import { cva } from "class-variance-authority";
7
+ import { ChevronRight } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/CollapsibleTable/CollapsibleTable.tsx
@@ -3,8 +3,8 @@
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { InputVariant } from "../Input/Input.mjs";
5
5
  import { AutoSizedTextArea } from "../TextArea/AutoSizeTextArea.mjs";
6
- import { Check, X } from "lucide-react";
7
6
  import { useState } from "react";
7
+ import { Check, X } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/ContentEditor/ContentEditor.tsx
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
4
4
  import { Input, InputVariant } from "../Input/Input.mjs";
5
- import { Check, X } from "lucide-react";
6
5
  import { useEffect, useState } from "react";
6
+ import { Check, X } from "lucide-react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
 
9
9
  //#region src/components/ContentEditor/ContentEditorInput.tsx
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
+ import { useUser } from "../../hooks/useUser/index.mjs";
3
4
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
4
5
  import { AutoCompleteTextarea } from "../TextArea/AutocompleteTextArea.mjs";
5
- import { useUser } from "../../hooks/useUser/index.mjs";
6
- import { Check, X } from "lucide-react";
7
6
  import { useEffect, useState } from "react";
7
+ import { Check, X } from "lucide-react";
8
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/ContentEditor/ContentEditorTextArea.tsx
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
4
- import { CopyCheckIcon, CopyIcon } from "lucide-react";
5
4
  import { useEffect, useState } from "react";
5
+ import { CopyCheckIcon, CopyIcon } from "lucide-react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import { useIntlayer } from "react-intlayer";
8
8
 
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { CopyCheck, CopyIcon } from "lucide-react";
5
4
  import { useState } from "react";
5
+ import { CopyCheck, CopyIcon } from "lucide-react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/components/CopyToClipboard/index.tsx
@@ -1,23 +1,23 @@
1
1
  'use client';
2
2
 
3
+ import { useAuditContentDeclarationField } from "../../../hooks/reactQuery.mjs";
3
4
  import { Container } from "../../Container/index.mjs";
4
5
  import { Button, ButtonColor, ButtonSize, ButtonTextAlign, ButtonVariant } from "../../Button/Button.mjs";
5
6
  import { InputVariant } from "../../Input/Input.mjs";
6
7
  import { SwitchSelector, SwitchSelectorColor, SwitchSelectorSize } from "../../SwitchSelector/index.mjs";
7
8
  import { useLocaleSwitcherContent } from "../../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
8
9
  import { ContentEditorInput as ContentEditorInput$1 } from "../../ContentEditor/ContentEditorInput.mjs";
9
- import { useAuditContentDeclarationField } from "../../../hooks/reactQuery.mjs";
10
10
  import { ContentEditorTextArea as ContentEditorTextArea$1 } from "../../ContentEditor/ContentEditorTextArea.mjs";
11
11
  import { renameKey } from "./object.mjs";
12
12
  import { Label } from "../../Label/index.mjs";
13
13
  import { MarkdownRenderer as MarkdownRenderer$1 } from "../../MarkDownRender/MarkDownRender.mjs";
14
14
  import { EnumKeyInput } from "../EnumKeyInput.mjs";
15
- import { Plus, Trash, WandSparkles } from "lucide-react";
16
15
  import { Fragment, useState } from "react";
16
+ import { Plus, Trash, WandSparkles } from "lucide-react";
17
17
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
18
+ import { useConfiguration, useEditedContent } from "@intlayer/editor-react";
18
19
  import { useIntlayer, useLocale } from "react-intlayer";
19
20
  import { getLocaleName } from "@intlayer/core/localization";
20
- import { useConfiguration, useEditedContent } from "@intlayer/editor-react";
21
21
  import { getEmptyNode, getNodeType } from "@intlayer/core/dictionaryManipulator";
22
22
  import * as NodeTypes from "@intlayer/types/nodeType";
23
23
 
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { ButtonColor } from "../../Button/Button.mjs";
4
3
  import { useSession } from "../../../hooks/useAuth/useSession.mjs";
5
4
  import { useAddDictionary, useGetProjects } from "../../../hooks/reactQuery.mjs";
5
+ import { ButtonColor } from "../../Button/Button.mjs";
6
6
  import { MultiSelect } from "../../Select/Multiselect.mjs";
7
7
  import { useForm } from "../../Form/FormBase.mjs";
8
8
  import { Form } from "../../Form/Form.mjs";
@@ -1,20 +1,20 @@
1
1
  'use client';
2
2
 
3
+ import { useSession } from "../../../hooks/useAuth/useSession.mjs";
4
+ import { useAuditContentDeclarationMetadata, useGetProjects, useGetTags } from "../../../hooks/reactQuery.mjs";
3
5
  import { Loader } from "../../Loader/index.mjs";
4
6
  import { ButtonColor, ButtonSize, ButtonVariant } from "../../Button/Button.mjs";
5
7
  import { Checkbox } from "../../Input/Checkbox.mjs";
6
- import { useSession } from "../../../hooks/useAuth/useSession.mjs";
7
- import { useAuditContentDeclarationMetadata, useGetProjects, useGetTags } from "../../../hooks/reactQuery.mjs";
8
8
  import { MultiSelect } from "../../Select/Multiselect.mjs";
9
9
  import { Select } from "../../Select/Select.mjs";
10
10
  import { useForm as useForm$1 } from "../../Form/FormBase.mjs";
11
11
  import { Form } from "../../Form/Form.mjs";
12
12
  import { useDictionaryDetailsSchema } from "./useDictionaryDetailsSchema.mjs";
13
- import { WandSparkles } from "lucide-react";
14
13
  import { useEffect } from "react";
14
+ import { WandSparkles } from "lucide-react";
15
15
  import { jsx, jsxs } from "react/jsx-runtime";
16
- import { useIntlayer } from "react-intlayer";
17
16
  import { useEditedContent } from "@intlayer/editor-react";
17
+ import { useIntlayer } from "react-intlayer";
18
18
  import { AnimatePresence, motion } from "framer-motion";
19
19
  import { useWatch } from "react-hook-form";
20
20
 
@@ -9,11 +9,11 @@ import { DictionaryDetailsForm } from "./DictionaryDetails/DictionaryDetailsForm
9
9
  import { JSONEditor } from "./JSONEditor.mjs";
10
10
  import { SaveForm } from "./SaveForm/SaveForm.mjs";
11
11
  import { StructureEditor } from "./StructureEditor.mjs";
12
- import { ArrowLeft } from "lucide-react";
13
12
  import { useEffect } from "react";
13
+ import { ArrowLeft } from "lucide-react";
14
14
  import { jsx, jsxs } from "react/jsx-runtime";
15
- import { useIntlayer } from "react-intlayer";
16
15
  import { useConfiguration, useDictionariesRecordActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
16
+ import { useIntlayer } from "react-intlayer";
17
17
 
18
18
  //#region src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx
19
19
  const DictionaryFieldEditor = ({ dictionary, onClickDictionaryList, isDarkMode, mode, onDelete, onSave, showReturnButton = true }) => {
@@ -1,11 +1,11 @@
1
1
  import { Button, ButtonColor, ButtonTextAlign, ButtonVariant } from "../../Button/Button.mjs";
2
2
  import { Accordion } from "../../Accordion/Accordion.mjs";
3
3
  import { getIsEditableSection } from "../getIsEditableSection.mjs";
4
- import configuration from "@intlayer/config/built";
5
4
  import { ChevronRight, Plus } from "lucide-react";
6
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
- import { useIntlayer } from "react-intlayer";
6
+ import { internationalization } from "@intlayer/config/built";
8
7
  import { useEditedContentActions, useEditorLocale, useFocusUnmergedDictionary } from "@intlayer/editor-react";
8
+ import { useIntlayer } from "react-intlayer";
9
9
  import { getContentNodeByKeyPath, getEmptyNode, getNodeType } from "@intlayer/core/dictionaryManipulator";
10
10
  import * as NodeTypes from "@intlayer/types/nodeType";
11
11
  import { isSameKeyPath } from "@intlayer/core/utils";
@@ -18,7 +18,7 @@ const traceKeys = [
18
18
  "nodeType"
19
19
  ];
20
20
  const NavigationViewNode = ({ section: sectionProp, keyPath, dictionary }) => {
21
- const { locales } = configuration.internationalization;
21
+ const { locales } = internationalization;
22
22
  const section = getContentNodeByKeyPath(sectionProp, keyPath, useEditorLocale());
23
23
  const { addEditedContent } = useEditedContentActions();
24
24
  const { setFocusedContentKeyPath, focusedContent } = useFocusUnmergedDictionary();
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationViewNode.mjs","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.tsx"],"sourcesContent":["import { Accordion } from '@components/Accordion';\nimport {\n Button,\n ButtonColor,\n ButtonTextAlign,\n ButtonVariant,\n} from '@components/Button';\nimport configuration from '@intlayer/config/built';\nimport { camelCaseToSentence } from '@intlayer/config/client';\nimport {\n getContentNodeByKeyPath,\n getEmptyNode,\n getNodeType,\n} from '@intlayer/core/dictionaryManipulator';\nimport { isSameKeyPath } from '@intlayer/core/utils';\nimport {\n useEditedContentActions,\n useEditorLocale,\n useFocusUnmergedDictionary,\n} from '@intlayer/editor-react';\nimport type { LocalDictionaryId } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport type { ContentNode, Dictionary } from 'intlayer';\nimport { ChevronRight, Plus } from 'lucide-react';\nimport type { FC } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { getIsEditableSection } from '../getIsEditableSection';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\nexport type NodeWrapperProps = {\n keyPath: KeyPath[];\n section: ContentNode;\n dictionary: Dictionary;\n};\n\nexport const NavigationViewNode: FC<NodeWrapperProps> = ({\n section: sectionProp,\n keyPath,\n dictionary,\n}) => {\n const { locales } = configuration.internationalization;\n const currentLocale = useEditorLocale();\n const section = getContentNodeByKeyPath(sectionProp, keyPath, currentLocale);\n const { addEditedContent } = useEditedContentActions();\n const { setFocusedContentKeyPath, focusedContent } =\n useFocusUnmergedDictionary();\n const { addNewElement, goToField } = useIntlayer('navigation-view');\n const nodeType = getNodeType(section);\n const getIsSelected = (keyPath: KeyPath[]) =>\n (focusedContent?.keyPath?.length ?? 0) > 0 &&\n isSameKeyPath(keyPath, focusedContent?.keyPath ?? []);\n const isEditableSubSection = getIsEditableSection(section);\n\n if (!section) return <></>;\n\n if (isEditableSubSection) {\n return (\n <Button\n label={goToField.label.value}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n className=\"w-full\"\n onClick={() => setFocusedContentKeyPath(keyPath)}\n IconRight={ChevronRight}\n >\n {camelCaseToSentence(keyPath[keyPath.length - 1].key as string)}\n </Button>\n );\n }\n\n if (typeof section === 'object') {\n if (nodeType === NodeTypes.REACT_NODE) {\n return <>React Node</>;\n }\n\n if (nodeType === NodeTypes.TRANSLATION) {\n return (\n <div className=\"flex flex-col justify-between gap-2\">\n {locales.map((translationKey) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeTypes.TRANSLATION, key: translationKey },\n ];\n\n return (\n <NavigationViewNode\n key={translationKey}\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n );\n })}\n </div>\n );\n }\n\n if (\n nodeType === NodeTypes.ENUMERATION ||\n nodeType === NodeTypes.CONDITION\n ) {\n return (\n <div className=\"flex flex-col justify-between gap-2\">\n {Object.keys(\n (section as any)[nodeType as unknown as keyof typeof section]\n ).map((key) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: nodeType, key },\n ];\n\n return (\n <NavigationViewNode\n key={key}\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n );\n })}\n </div>\n );\n }\n\n if (nodeType === NodeTypes.ARRAY) {\n return (\n <div className=\"flex flex-col justify-between gap-2\">\n {(section as unknown as ContentNode[]).map((subSection, index) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeTypes.ARRAY, key: index },\n ];\n\n const isEditableSubSection = getIsEditableSection(subSection);\n\n if (isEditableSubSection) {\n return (\n <Button\n key={JSON.stringify(childKeyPath)}\n label={`${goToField.label.value} ${index}`}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n className=\"w-full\"\n onClick={() => setFocusedContentKeyPath(childKeyPath)}\n IconRight={ChevronRight}\n isActive={getIsSelected(childKeyPath)}\n >\n Item {index}\n </Button>\n );\n }\n\n return (\n <Accordion\n key={JSON.stringify(childKeyPath)}\n label={`${goToField.label.value} ${index}`}\n header={`Item ${index}`}\n isActive={getIsSelected(childKeyPath)}\n onClick={() => setFocusedContentKeyPath(childKeyPath)}\n >\n <div className=\"mt-2 flex w-full max-w-full\">\n <div className=\"flex-1 pl-10\">\n <NavigationViewNode\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n </div>\n </div>\n </Accordion>\n );\n })}\n\n <Button\n label={addNewElement.label.value}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.NEUTRAL}\n textAlign={ButtonTextAlign.LEFT}\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeTypes.ARRAY,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n const sectionArray = section as unknown as ContentNode[];\n const emptySectionEl =\n getEmptyNode(\n sectionArray[\n (sectionArray.length - 1) as keyof typeof sectionArray\n ] as ContentNode\n ) ?? '';\n addEditedContent(\n dictionary.localId as LocalDictionaryId,\n emptySectionEl,\n newKeyPath,\n false\n );\n setFocusedContentKeyPath(newKeyPath);\n }}\n Icon={Plus}\n >\n {addNewElement.text}\n </Button>\n </div>\n );\n }\n\n if (typeof section.nodeType === 'string') {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: section.nodeType } as KeyPath,\n ];\n\n return (\n <NavigationViewNode\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n );\n }\n\n const sectionArray = Object.keys(section);\n return (\n <div className=\"flex w-full max-w-full flex-col justify-between gap-2\">\n {sectionArray.map((key) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeTypes.OBJECT, key },\n ];\n\n const subSection = getContentNodeByKeyPath(sectionProp, childKeyPath);\n const isEditableSubSection = getIsEditableSection(subSection);\n\n if (isEditableSubSection) {\n return (\n <Button\n label={`${goToField.label.value} ${key}`}\n key={key}\n isActive={getIsSelected(childKeyPath)}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n className=\"w-full\"\n onClick={() => setFocusedContentKeyPath(childKeyPath)}\n IconRight={ChevronRight}\n >\n {camelCaseToSentence(key)}\n </Button>\n );\n }\n\n return (\n <Accordion\n key={key}\n label={`${goToField.label.value} ${key}`}\n isActive={getIsSelected(childKeyPath)}\n onClick={() => setFocusedContentKeyPath(childKeyPath)}\n header={camelCaseToSentence(key)}\n >\n <div className=\"mt-2 flex w-full max-w-full\">\n <div className=\"flex-1 pl-10\">\n <NavigationViewNode\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n </div>\n </div>\n </Accordion>\n );\n })}\n </div>\n );\n }\n\n return (\n <>\n Error loading section --\n {nodeType}\n --\n {JSON.stringify(section)}\n --\n {JSON.stringify(keyPath)}\n </>\n );\n};\n"],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SAP4B,CAC9B,GAAG,SACH,EAAE,MAAM,QAAQ,UAAU,CAC3B;GAKG,SAAS;GACG;GACZ;AAKN,SACE,oBAAC,OAAD;GAAK,WAAU;aAFI,OAAO,KAAK,QAAQ,CAGvB,KAAK,QAAQ;IACzB,MAAM,eAA0B,CAC9B,GAAG,SACH;KAAE,MAAM,UAAU;KAAQ;KAAK,CAChC;AAKD,QAF6B,qBADV,wBAAwB,aAAa,aAAa,CACR,CAG3D,QACE,oBAAC,QAAD;KACE,OAAO,GAAG,UAAU,MAAM,MAAM,GAAG;KAEnC,UAAU,cAAc,aAAa;KACrC,SAAS,cAAc;KACvB,OAAO,YAAY;KACnB,WAAU;KACV,eAAe,yBAAyB,aAAa;KACrD,WAAW;eAEV,oBAAoB,IAAI;KAClB,EATF,IASE;AAIb,WACE,oBAAC,WAAD;KAEE,OAAO,GAAG,UAAU,MAAM,MAAM,GAAG;KACnC,UAAU,cAAc,aAAa;KACrC,eAAe,yBAAyB,aAAa;KACrD,QAAQ,oBAAoB,IAAI;eAEhC,oBAAC,OAAD;MAAK,WAAU;gBACb,oBAAC,OAAD;OAAK,WAAU;iBACb,oBAAC,oBAAD;QACE,SAAS;QACT,SAAS;QACG;QACZ;OACE;MACF;KACI,EAfL,IAeK;KAEd;GACE;;AAIV,QACE;EAAE;EAEC;EAAS;EAET,KAAK,UAAU,QAAQ;EAAC;EAExB,KAAK,UAAU,QAAQ;EACvB"}
1
+ {"version":3,"file":"NavigationViewNode.mjs","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.tsx"],"sourcesContent":["import { Accordion } from '@components/Accordion';\nimport {\n Button,\n ButtonColor,\n ButtonTextAlign,\n ButtonVariant,\n} from '@components/Button';\nimport { internationalization } from '@intlayer/config/built';\nimport { camelCaseToSentence } from '@intlayer/config/client';\nimport {\n getContentNodeByKeyPath,\n getEmptyNode,\n getNodeType,\n} from '@intlayer/core/dictionaryManipulator';\nimport { isSameKeyPath } from '@intlayer/core/utils';\nimport {\n useEditedContentActions,\n useEditorLocale,\n useFocusUnmergedDictionary,\n} from '@intlayer/editor-react';\nimport type { LocalDictionaryId } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport type { ContentNode, Dictionary } from 'intlayer';\nimport { ChevronRight, Plus } from 'lucide-react';\nimport type { FC } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { getIsEditableSection } from '../getIsEditableSection';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\nexport type NodeWrapperProps = {\n keyPath: KeyPath[];\n section: ContentNode;\n dictionary: Dictionary;\n};\n\nexport const NavigationViewNode: FC<NodeWrapperProps> = ({\n section: sectionProp,\n keyPath,\n dictionary,\n}) => {\n const { locales } = internationalization;\n\n const currentLocale = useEditorLocale();\n const section = getContentNodeByKeyPath(sectionProp, keyPath, currentLocale);\n const { addEditedContent } = useEditedContentActions();\n const { setFocusedContentKeyPath, focusedContent } =\n useFocusUnmergedDictionary();\n const { addNewElement, goToField } = useIntlayer('navigation-view');\n const nodeType = getNodeType(section);\n const getIsSelected = (keyPath: KeyPath[]) =>\n (focusedContent?.keyPath?.length ?? 0) > 0 &&\n isSameKeyPath(keyPath, focusedContent?.keyPath ?? []);\n const isEditableSubSection = getIsEditableSection(section);\n\n if (!section) return <></>;\n\n if (isEditableSubSection) {\n return (\n <Button\n label={goToField.label.value}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n className=\"w-full\"\n onClick={() => setFocusedContentKeyPath(keyPath)}\n IconRight={ChevronRight}\n >\n {camelCaseToSentence(keyPath[keyPath.length - 1].key as string)}\n </Button>\n );\n }\n\n if (typeof section === 'object') {\n if (nodeType === NodeTypes.REACT_NODE) {\n return <>React Node</>;\n }\n\n if (nodeType === NodeTypes.TRANSLATION) {\n return (\n <div className=\"flex flex-col justify-between gap-2\">\n {locales.map((translationKey) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeTypes.TRANSLATION, key: translationKey },\n ];\n\n return (\n <NavigationViewNode\n key={translationKey}\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n );\n })}\n </div>\n );\n }\n\n if (\n nodeType === NodeTypes.ENUMERATION ||\n nodeType === NodeTypes.CONDITION\n ) {\n return (\n <div className=\"flex flex-col justify-between gap-2\">\n {Object.keys(\n (section as any)[nodeType as unknown as keyof typeof section]\n ).map((key) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: nodeType, key },\n ];\n\n return (\n <NavigationViewNode\n key={key}\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n );\n })}\n </div>\n );\n }\n\n if (nodeType === NodeTypes.ARRAY) {\n return (\n <div className=\"flex flex-col justify-between gap-2\">\n {(section as unknown as ContentNode[]).map((subSection, index) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeTypes.ARRAY, key: index },\n ];\n\n const isEditableSubSection = getIsEditableSection(subSection);\n\n if (isEditableSubSection) {\n return (\n <Button\n key={JSON.stringify(childKeyPath)}\n label={`${goToField.label.value} ${index}`}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n className=\"w-full\"\n onClick={() => setFocusedContentKeyPath(childKeyPath)}\n IconRight={ChevronRight}\n isActive={getIsSelected(childKeyPath)}\n >\n Item {index}\n </Button>\n );\n }\n\n return (\n <Accordion\n key={JSON.stringify(childKeyPath)}\n label={`${goToField.label.value} ${index}`}\n header={`Item ${index}`}\n isActive={getIsSelected(childKeyPath)}\n onClick={() => setFocusedContentKeyPath(childKeyPath)}\n >\n <div className=\"mt-2 flex w-full max-w-full\">\n <div className=\"flex-1 pl-10\">\n <NavigationViewNode\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n </div>\n </div>\n </Accordion>\n );\n })}\n\n <Button\n label={addNewElement.label.value}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.NEUTRAL}\n textAlign={ButtonTextAlign.LEFT}\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeTypes.ARRAY,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n const sectionArray = section as unknown as ContentNode[];\n const emptySectionEl =\n getEmptyNode(\n sectionArray[\n (sectionArray.length - 1) as keyof typeof sectionArray\n ] as ContentNode\n ) ?? '';\n addEditedContent(\n dictionary.localId as LocalDictionaryId,\n emptySectionEl,\n newKeyPath,\n false\n );\n setFocusedContentKeyPath(newKeyPath);\n }}\n Icon={Plus}\n >\n {addNewElement.text}\n </Button>\n </div>\n );\n }\n\n if (typeof section.nodeType === 'string') {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: section.nodeType } as KeyPath,\n ];\n\n return (\n <NavigationViewNode\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n );\n }\n\n const sectionArray = Object.keys(section);\n return (\n <div className=\"flex w-full max-w-full flex-col justify-between gap-2\">\n {sectionArray.map((key) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeTypes.OBJECT, key },\n ];\n\n const subSection = getContentNodeByKeyPath(sectionProp, childKeyPath);\n const isEditableSubSection = getIsEditableSection(subSection);\n\n if (isEditableSubSection) {\n return (\n <Button\n label={`${goToField.label.value} ${key}`}\n key={key}\n isActive={getIsSelected(childKeyPath)}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n className=\"w-full\"\n onClick={() => setFocusedContentKeyPath(childKeyPath)}\n IconRight={ChevronRight}\n >\n {camelCaseToSentence(key)}\n </Button>\n );\n }\n\n return (\n <Accordion\n key={key}\n label={`${goToField.label.value} ${key}`}\n isActive={getIsSelected(childKeyPath)}\n onClick={() => setFocusedContentKeyPath(childKeyPath)}\n header={camelCaseToSentence(key)}\n >\n <div className=\"mt-2 flex w-full max-w-full\">\n <div className=\"flex-1 pl-10\">\n <NavigationViewNode\n keyPath={childKeyPath}\n section={sectionProp}\n dictionary={dictionary}\n />\n </div>\n </div>\n </Accordion>\n );\n })}\n </div>\n );\n }\n\n return (\n <>\n Error loading section --\n {nodeType}\n --\n {JSON.stringify(section)}\n --\n {JSON.stringify(keyPath)}\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA6BA,MAAa,YAAsB;CAAC;CAAY;CAAM;CAAW;AAQjE,MAAa,sBAA4C,EACvD,SAAS,aACT,SACA,iBACI;CACJ,MAAM,EAAE,YAAY;CAGpB,MAAM,UAAU,wBAAwB,aAAa,SAD/B,iBAAiB,CACqC;CAC5E,MAAM,EAAE,qBAAqB,yBAAyB;CACtD,MAAM,EAAE,0BAA0B,mBAChC,4BAA4B;CAC9B,MAAM,EAAE,eAAe,cAAc,YAAY,kBAAkB;CACnE,MAAM,WAAW,YAAY,QAAQ;CACrC,MAAM,iBAAiB,aACpB,gBAAgB,SAAS,UAAU,KAAK,KACzC,cAAc,SAAS,gBAAgB,WAAW,EAAE,CAAC;CACvD,MAAM,uBAAuB,qBAAqB,QAAQ;AAE1D,KAAI,CAAC,QAAS,QAAO,gCAAK;AAE1B,KAAI,qBACF,QACE,oBAAC,QAAD;EACE,OAAO,UAAU,MAAM;EACvB,SAAS,cAAc;EACvB,OAAO,YAAY;EACnB,WAAU;EACV,eAAe,yBAAyB,QAAQ;EAChD,WAAW;YAEV,oBAAoB,QAAQ,QAAQ,SAAS,GAAG,IAAc;EACxD;AAIb,KAAI,OAAO,YAAY,UAAU;AAC/B,MAAI,aAAa,UAAU,WACzB,QAAO,0CAAE,cAAa;AAGxB,MAAI,aAAa,UAAU,YACzB,QACE,oBAAC,OAAD;GAAK,WAAU;aACZ,QAAQ,KAAK,mBAAmB;AAM/B,WACE,oBAAC,oBAAD;KAEE,SAR4B,CAC9B,GAAG,SACH;MAAE,MAAM,UAAU;MAAa,KAAK;MAAgB,CACrD;KAMG,SAAS;KACG;KACZ,EAJK,eAIL;KAEJ;GACE;AAIV,MACE,aAAa,UAAU,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,IAAI;AACP,sBACE,WAAW,SACX,gBACA,YACA,MACD;AACD,8BAAyB,WAAW;;IAEtC,MAAM;cAEL,cAAc;IACR,EACL;;AAIV,MAAI,OAAO,QAAQ,aAAa,SAM9B,QACE,oBAAC,oBAAD;GACE,SAP4B,CAC9B,GAAG,SACH,EAAE,MAAM,QAAQ,UAAU,CAC3B;GAKG,SAAS;GACG;GACZ;AAKN,SACE,oBAAC,OAAD;GAAK,WAAU;aAFI,OAAO,KAAK,QAAQ,CAGvB,KAAK,QAAQ;IACzB,MAAM,eAA0B,CAC9B,GAAG,SACH;KAAE,MAAM,UAAU;KAAQ;KAAK,CAChC;AAKD,QAF6B,qBADV,wBAAwB,aAAa,aAAa,CACR,CAG3D,QACE,oBAAC,QAAD;KACE,OAAO,GAAG,UAAU,MAAM,MAAM,GAAG;KAEnC,UAAU,cAAc,aAAa;KACrC,SAAS,cAAc;KACvB,OAAO,YAAY;KACnB,WAAU;KACV,eAAe,yBAAyB,aAAa;KACrD,WAAW;eAEV,oBAAoB,IAAI;KAClB,EATF,IASE;AAIb,WACE,oBAAC,WAAD;KAEE,OAAO,GAAG,UAAU,MAAM,MAAM,GAAG;KACnC,UAAU,cAAc,aAAa;KACrC,eAAe,yBAAyB,aAAa;KACrD,QAAQ,oBAAoB,IAAI;eAEhC,oBAAC,OAAD;MAAK,WAAU;gBACb,oBAAC,OAAD;OAAK,WAAU;iBACb,oBAAC,oBAAD;QACE,SAAS;QACT,SAAS;QACG;QACZ;OACE;MACF;KACI,EAfL,IAeK;KAEd;GACE;;AAIV,QACE;EAAE;EAEC;EAAS;EAET,KAAK,UAAU,QAAQ;EAAC;EAExB,KAAK,UAAU,QAAQ;EACvB"}
@@ -1,16 +1,16 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../../utils/cn.mjs";
4
- import { ButtonColor, ButtonVariant } from "../../Button/Button.mjs";
5
4
  import { useAuth } from "../../../hooks/useAuth/useAuth.mjs";
6
5
  import { useDeleteDictionary, usePushDictionaries, useWriteDictionary } from "../../../hooks/reactQuery.mjs";
6
+ import { ButtonColor, ButtonVariant } from "../../Button/Button.mjs";
7
7
  import { Modal, ModalSize } from "../../Modal/Modal.mjs";
8
8
  import { Form } from "../../Form/Form.mjs";
9
- import { ArrowUpFromLine, Download, RotateCcw, Save, Trash } from "lucide-react";
10
9
  import { useState } from "react";
10
+ import { ArrowUpFromLine, Download, RotateCcw, Save, Trash } from "lucide-react";
11
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
- import { useIntlayer } from "react-intlayer";
13
12
  import { useDictionariesRecordActions, useEditedContent } from "@intlayer/editor-react";
13
+ import { useIntlayer } from "react-intlayer";
14
14
 
15
15
  //#region src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx
16
16
  const SaveForm = ({ dictionary, mode, className, onDelete, onSave, ...props }) => {
@@ -7,8 +7,8 @@ import { EditableFieldInput } from "../../EditableField/EditableFieldInput.mjs";
7
7
  import { NodeTypeSelector } from "../NodeTypeSelector.mjs";
8
8
  import { Plus, Trash } from "lucide-react";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
- import { useIntlayer } from "react-intlayer";
11
10
  import { useConfiguration, useEditedContentActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
11
+ import { useIntlayer } from "react-intlayer";
12
12
  import { getDefaultNode, getNodeChildren, getNodeType } from "@intlayer/core/dictionaryManipulator";
13
13
  import * as NodeTypes from "@intlayer/types/nodeType";
14
14
  import { isSameKeyPath } from "@intlayer/core/utils";
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
5
- import { Check, Pencil, X } from "lucide-react";
6
5
  import { useCallback, useEffect, useRef, useState } from "react";
6
+ import { Check, Pencil, X } from "lucide-react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
 
9
9
  //#region src/components/EditableField/EditableFieldLayout.tsx
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "../../Input/OTPInput.mjs";
4
3
  import { useItemSelector } from "../../../hooks/useItemSelector.mjs";
4
+ import { InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "../../Input/OTPInput.mjs";
5
5
  import { useFormField } from "../FormField.mjs";
6
6
  import { FormItemLayout } from "../layout/FormItemLayout.mjs";
7
7
  import { Form } from "../Form.mjs";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { Eye, EyeOff } from "lucide-react";
5
4
  import { useEffect, useMemo, useRef, useState } from "react";
5
+ import { Eye, EyeOff } from "lucide-react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/components/HideShow/index.tsx
@@ -3,8 +3,8 @@
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
5
5
  import { createFileTree } from "./createFileTree.mjs";
6
- import { ChevronRight } from "lucide-react";
7
6
  import { useState } from "react";
7
+ import { ChevronRight } from "lucide-react";
8
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/IDE/FileTree.tsx
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { Input } from "./Input.mjs";
4
- import { EyeIcon, EyeOffIcon } from "lucide-react";
5
4
  import { useState } from "react";
5
+ import { EyeIcon, EyeOffIcon } from "lucide-react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/components/Input/InputPassword.tsx
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { Button } from "../Button/Button.mjs";
5
- import { MinusIcon } from "lucide-react";
6
5
  import { createContext, useContext, useEffect, useRef, useState } from "react";
7
6
  import { cva } from "class-variance-authority";
7
+ import { MinusIcon } from "lucide-react";
8
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/Input/OTPInput.tsx
@@ -1,7 +1,7 @@
1
1
  import { cn } from "../../utils/cn.mjs";
2
- import { ExternalLink, MoveRight } from "lucide-react";
3
2
  import { isValidElement } from "react";
4
3
  import { cva } from "class-variance-authority";
4
+ import { ExternalLink, MoveRight } from "lucide-react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { getLocalizedUrl } from "@intlayer/core/localization";
7
7
 
@@ -1,14 +1,14 @@
1
1
  'use client';
2
2
 
3
+ import { usePersistedStore } from "../../hooks/usePersistedStore.mjs";
3
4
  import { Container } from "../Container/index.mjs";
4
5
  import { Button, ButtonColor, ButtonSize, ButtonTextAlign, ButtonVariant } from "../Button/Button.mjs";
5
6
  import { Input } from "../Input/Input.mjs";
6
7
  import { SwitchSelector, SwitchSelectorColor, SwitchSelectorSize } from "../SwitchSelector/index.mjs";
7
- import { usePersistedStore } from "../../hooks/usePersistedStore.mjs";
8
8
  import { DropDown } from "../DropDown/index.mjs";
9
9
  import { useLocaleSwitcherContent } from "./LocaleSwitcherContentContext.mjs";
10
- import { Check, Globe, MoveVertical } from "lucide-react";
11
10
  import { useMemo, useRef, useState } from "react";
11
+ import { Check, Globe, MoveVertical } from "lucide-react";
12
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
13
  import { useIntlayer, useLocale } from "react-intlayer";
14
14
  import { getHTMLTextDir, getLocaleName } from "@intlayer/core/localization";
@@ -4,8 +4,8 @@ import { Container } from "../Container/index.mjs";
4
4
  import { Button, ButtonColor, ButtonTextAlign, ButtonVariant } from "../Button/Button.mjs";
5
5
  import { Input } from "../Input/Input.mjs";
6
6
  import { DropDown } from "../DropDown/index.mjs";
7
- import { MoveVertical } from "lucide-react";
8
7
  import { useCallback, useMemo, useRef, useState } from "react";
8
+ import { MoveVertical } from "lucide-react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { useIntlayer } from "react-intlayer";
11
11
  import { getHTMLTextDir, getLocaleName } from "@intlayer/core/localization";
@@ -1,14 +1,14 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
+ import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
5
+ import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
4
6
  import { Container } from "../Container/index.mjs";
5
7
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
6
8
  import { H3 } from "../Headers/index.mjs";
7
- import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
8
- import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
9
- import { X } from "lucide-react";
10
9
  import { useEffect } from "react";
11
10
  import { cva } from "class-variance-authority";
11
+ import { X } from "lucide-react";
12
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
13
  import { motion } from "framer-motion";
14
14
  import { createPortal } from "react-dom";
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
5
4
  import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
6
5
  import { useScrollDetection } from "../../hooks/useScrollDetection.mjs";
6
+ import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
7
7
  import { Burger } from "./Burger.mjs";
8
8
  import { useRef, useState } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
5
4
  import { useItemSelector } from "../../hooks/useItemSelector.mjs";
6
- import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
5
+ import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
7
6
  import { useEffect, useRef } from "react";
8
7
  import { cva } from "class-variance-authority";
8
+ import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
 
11
11
  //#region src/components/Pagination/Pagination.tsx
@@ -1,17 +1,17 @@
1
1
  'use client';
2
2
 
3
+ import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
4
+ import { useDevice } from "../../hooks/useDevice.mjs";
5
+ import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
3
6
  import { Container } from "../Container/index.mjs";
4
7
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
5
- import { useDevice } from "../../hooks/useDevice.mjs";
6
8
  import { KeyboardShortcut } from "../KeyboardShortcut/KeyboardShortcut.mjs";
7
9
  import { Popover } from "../Popover/dynamic.mjs";
8
- import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
9
- import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
10
10
  import { MaxWidthSmoother } from "../MaxWidthSmoother/index.mjs";
11
11
  import { isElementAtTopAndNotCovered } from "./isElementAtTopAndNotCovered.mjs";
12
12
  import { useRightDrawer } from "./useRightDrawer.mjs";
13
- import { ChevronLeft, X } from "lucide-react";
14
13
  import { useEffect, useRef } from "react";
14
+ import { ChevronLeft, X } from "lucide-react";
15
15
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
16
16
  import { useIntlayer } from "react-intlayer";
17
17
  import { createPortal } from "react-dom";
@@ -3,8 +3,8 @@
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { Badge, BadgeColor } from "../Badge/index.mjs";
5
5
  import { Command, CommandRoot } from "../Command/index.mjs";
6
- import { Check, X } from "lucide-react";
7
6
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
7
+ import { Check, X } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/Select/Multiselect.tsx
@@ -4,8 +4,8 @@ import { Container } from "../Container/index.mjs";
4
4
  import { Button, ButtonVariant } from "../Button/Button.mjs";
5
5
  import { DropDown } from "../DropDown/index.mjs";
6
6
  import { Modes } from "./types.mjs";
7
- import { CircleDashed, Moon, Sun } from "lucide-react";
8
7
  import { useState } from "react";
8
+ import { CircleDashed, Moon, Sun } from "lucide-react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
 
11
11
  //#region src/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.tsx
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
4
  import { Modes } from "./types.mjs";
5
- import { CircleDashed, Moon, Sun } from "lucide-react";
6
5
  import { useState } from "react";
6
+ import { CircleDashed, Moon, Sun } from "lucide-react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
 
9
9
  //#region src/components/ThemeSwitcherDropDown/MobileThemeSwitcher.tsx
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { X } from "lucide-react";
4
+ import * as ToastPrimitives from "@radix-ui/react-toast";
5
5
  import { cva } from "class-variance-authority";
6
+ import { X } from "lucide-react";
6
7
  import { jsx } from "react/jsx-runtime";
7
- import * as ToastPrimitives from "@radix-ui/react-toast";
8
8
 
9
9
  //#region src/components/Toaster/Toast.tsx
10
10
  const ToastProvider = ToastPrimitives;
@@ -1,3 +1,6 @@
1
+ import { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from "./Toaster/Toast.mjs";
2
+ import { reducer, toast, useToast } from "./Toaster/useToast.mjs";
3
+ import { Toaster } from "./Toaster/Toaster.mjs";
1
4
  import { Container, ContainerBackground, ContainerBorderColor, ContainerGap, ContainerPadding, ContainerRoundedSize, ContainerSeparator, ContainerTransparency, containerVariants } from "./Container/index.mjs";
2
5
  import { Loader } from "./Loader/index.mjs";
3
6
  import { Button, ButtonColor, ButtonSize, ButtonTextAlign, ButtonVariant, buttonVariants } from "./Button/Button.mjs";
@@ -106,8 +109,5 @@ import { Terminal } from "./Terminal/Terminal.mjs";
106
109
  import { Modes } from "./ThemeSwitcherDropDown/types.mjs";
107
110
  import { DesktopThemeSwitcher } from "./ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs";
108
111
  import { MobileThemeSwitcher } from "./ThemeSwitcherDropDown/MobileThemeSwitcher.mjs";
109
- import { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from "./Toaster/Toast.mjs";
110
- import { reducer, toast, useToast } from "./Toaster/useToast.mjs";
111
- import { Toaster } from "./Toaster/Toaster.mjs";
112
112
 
113
113
  export { Accordion, AutoCompleteTextarea, AutoSizedTextArea, Avatar, Badge, BadgeColor, BadgeSize, BadgeVariant, BitbucketLogo, Breadcrumb, Browser, Button, ButtonColor, ButtonSize, ButtonTextAlign, ButtonVariant, Carousel, Checkbox, CheckboxColor, CheckboxSize, ClickOutsideDiv, Code, CodeBlock, CodeDefault, CollapsibleTable, Command, CommandRoot, Container, ContainerBackground, ContainerBorderColor, ContainerGap, ContainerPadding, ContainerRoundedSize, ContainerSeparator, ContainerTransparency, ContentEditableTextArea, ContentEditor, ContentSelector, CopyButton, CopyToClipboard, DesktopThemeSwitcher, Detail, DictionaryCreationForm, DictionaryEditor, DictionaryFieldEditor, DiscordLogo, DotPattern, DropDown, DropDownAlign, DropDownYAlign, EditableFieldInput, EditableFieldTextArea, ExpandCollapse, FacebookLogo, FileList, Flag, flags_exports as Flags, Footer, Form, GitHubLogo, GitLabLogo, GoogleLogo, GridPattern, H1, H2, H3, H4, H5, H6, HTMLRenderer, HeightResizer, HideShow, IDE, InformationTag, Input, InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputPassword, InputSize, InputVariant, InstagramLogo, KeyList, KeyPathBreadcrumb, KeyboardScreenAdapter, KeyboardShortcut, Label, LanguageBackground, LanguageSection, Link, LinkColor, LinkRoundedSize, LinkSize, LinkUnderlined, LinkVariant, LinkedInLogo, Loader, LocaleSwitcher, LocaleSwitcherContent, LocaleSwitcherContentProvider, Logo, LogoTextOnly, LogoWithText, LogoWithTextBelow, MarkdownRenderer, MaxHeightSmoother, MaxWidthSmoother, MobileThemeSwitcher, Modal, ModalSize, Modes, MultiSelect, Navbar, NumberItemsSelector, OTPInput, OTPInputContext, Pagination, PaginationSize, PaginationVariant, Popover, PopoverStatic, PopoverXAlign, PopoverYAlign, PressableSpan, ProductHuntLogo, RightDrawer, SaveForm, SearchInput, Select, SelectContent, SelectContentPosition, SelectLabel, SelectSeparator, ShowingResultsNumberItems, SocialNetworks, Spotlight, SwitchSelector, SwitchSelectorColor, SwitchSelectorSize, Tab, TabSelector, TabSelectorColor, Table, Tag, TagBackground, TagBorder, TagColor, TagRoundedSize, TagSize, TechLogo, TechLogoName, techLogos_exports as TechLogos, Terminal, TextArea, TextEditor, TextEditorContainer, TiktokLogo, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, VersionSwitcher, VersionSwitcherProvider, WithResizer, XLogo, YoutubeLogo, badgeVariants, baseMarkdownComponents, buttonVariants, checkIsExternalLink, checkboxVariants, containerVariants, drawerManager, getCapitals, getIntlayerHTMLOptions, getIntlayerMarkdownOptions, inputSlotVariants, inputVariants, isTextChildren, linkVariants, paginationVariants, reducer, toast, traceKeys, useContentEditable, useCopyToClipboard, useForm, useFormField, useLocaleSwitcherContent, usePasswordManagerBadge, usePrevious, useRightDrawer, useToast, useVersionSwitcher };
@@ -1,22 +1,22 @@
1
- import { calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useDevice } from "./useDevice.mjs";
2
- import { useItemSelector } from "./useItemSelector.mjs";
1
+ import { useKeyboardDetector } from "./useKeyboardDetector.mjs";
2
+ import { useGetElementOrWindow } from "./useGetElementOrWindow.mjs";
3
+ import { useScrollY } from "./useScrollY.mjs";
3
4
  import { usePersistedStore } from "./usePersistedStore.mjs";
5
+ import { useHorizontalSwipe } from "./useHorizontalSwipe.mjs";
6
+ import { useItemSelector } from "./useItemSelector.mjs";
7
+ import { calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useDevice } from "./useDevice.mjs";
4
8
  import { useOAuth2 } from "./useAuth/useOAuth2.mjs";
5
9
  import { useSession } from "./useAuth/useSession.mjs";
6
10
  import { useAuth } from "./useAuth/useAuth.mjs";
7
11
  import { useIntlayerAuth, useIntlayerOAuth } from "./useIntlayerAPI.mjs";
8
12
  import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useInfiniteGetDictionaries, useListPasskeys, useListSSOProviders, useLogin, useLogout, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary } from "./reactQuery.mjs";
9
- import { useUser } from "./useUser/index.mjs";
10
- import { useHorizontalSwipe } from "./useHorizontalSwipe.mjs";
13
+ import { useSearch } from "./useSearch.mjs";
14
+ import { useIsMounted } from "./useIsMounted.mjs";
11
15
  import { useGetElementById } from "./useGetElementById.mjs";
12
- import { useGetElementOrWindow } from "./useGetElementOrWindow.mjs";
13
16
  import { useIsDarkMode } from "./useIsDarkMode.mjs";
14
- import { useIsMounted } from "./useIsMounted.mjs";
15
- import { useKeyboardDetector } from "./useKeyboardDetector.mjs";
16
17
  import { useScreenWidth } from "./useScreenWidth.mjs";
17
18
  import { useScrollBlockage } from "./useScrollBlockage/index.mjs";
18
19
  import { useScrollDetection } from "./useScrollDetection.mjs";
19
- import { useScrollY } from "./useScrollY.mjs";
20
- import { useSearch } from "./useSearch.mjs";
20
+ import { useUser } from "./useUser/index.mjs";
21
21
 
22
22
  export { calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAuth, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDevice, useDisableTwoFactor, useEnableTwoFactor, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetElementById, useGetElementOrWindow, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useHorizontalSwipe, useInfiniteGetDictionaries, useIntlayerAuth, useIntlayerOAuth, useIsDarkMode, useIsMounted, useItemSelector, useKeyboardDetector, useListPasskeys, useListSSOProviders, useLogin, useLogout, useOAuth2, usePersistedStore, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useScreenWidth, useScrollBlockage, useScrollDetection, useScrollY, useSearch, useSearchDoc, useSelectOrganization, useSelectProject, useSession, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { useAuth } from "./useAuth/useAuth.mjs";
4
4
  import { useIntlayerAuth, useIntlayerOAuth } from "./useIntlayerAPI.mjs";
5
- import { useConfiguration } from "@intlayer/editor-react";
6
5
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
6
+ import { useConfiguration } from "@intlayer/editor-react";
7
7
 
8
8
  //#region src/hooks/reactQuery.ts
9
9
  /**
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
+ import { useQuery } from "@tanstack/react-query";
3
4
  import configuration from "@intlayer/config/built";
4
5
  import { useConfiguration } from "@intlayer/editor-react";
5
- import { useQuery } from "@tanstack/react-query";
6
6
  import { getOAuthAPI } from "@intlayer/api";
7
7
 
8
8
  //#region src/hooks/useAuth/useOAuth2.ts
@@ -1 +1 @@
1
- {"version":3,"file":"useOAuth2.mjs","names":["configuration","defaultConfiguration"],"sources":["../../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getOAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getOAuthAPI(config);\n\n const { data } = useQuery({\n queryKey: ['oAuth2AccessToken'],\n queryFn: intlayerAPI.getOAuth2AccessToken,\n enabled: !!(config.editor.clientId && config.editor.clientSecret),\n staleTime: 0,\n gcTime: 0,\n refetchOnWindowFocus: false,\n refetchOnMount: false,\n refetchOnReconnect: false,\n refetchInterval: false,\n refetchIntervalInBackground: false,\n });\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"mappings":";;;;;;;;AAQA,MAAa,aAAa,0BAA2C;CACnE,MAAMA,kBAAgB,kBAAkB;CACxC,MAAM,SAAS,yBAAyBA,mBAAiBC;CAGzD,MAAM,EAAE,SAAS,SAAS;EACxB,UAAU,CAAC,oBAAoB;EAC/B,SAJkB,YAAY,OAAO,CAIhB;EACrB,SAAS,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;EACpD,WAAW;EACX,QAAQ;EACR,sBAAsB;EACtB,gBAAgB;EAChB,oBAAoB;EACpB,iBAAiB;EACjB,6BAA6B;EAC9B,CAAC;AAIF,QAAO,EACL,mBAHwB,MAAM,MAI/B"}
1
+ {"version":3,"file":"useOAuth2.mjs","names":["configuration","defaultConfiguration"],"sources":["../../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getOAuthAPI } from '@intlayer/api';\nimport { default as defaultConfiguration } from '@intlayer/config/built';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getOAuthAPI(config);\n\n const { data } = useQuery({\n queryKey: ['oAuth2AccessToken'],\n queryFn: intlayerAPI.getOAuth2AccessToken,\n enabled: !!(config.editor.clientId && config.editor.clientSecret),\n staleTime: 0,\n gcTime: 0,\n refetchOnWindowFocus: false,\n refetchOnMount: false,\n refetchOnReconnect: false,\n refetchInterval: false,\n refetchIntervalInBackground: false,\n });\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"mappings":";;;;;;;;AAQA,MAAa,aAAa,0BAA2C;CACnE,MAAMA,kBAAgB,kBAAkB;CACxC,MAAM,SAAS,yBAAyBA,mBAAiBC;CAGzD,MAAM,EAAE,SAAS,SAAS;EACxB,UAAU,CAAC,oBAAoB;EAC/B,SAJkB,YAAY,OAAO,CAIhB;EACrB,SAAS,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;EACpD,WAAW;EACX,QAAQ;EACR,sBAAsB;EACtB,gBAAgB;EAChB,oBAAoB;EACpB,iBAAiB;EACjB,6BAA6B;EAC9B,CAAC;AAIF,QAAO,EACL,mBAHwB,MAAM,MAI/B"}
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { getAuthAPI } from "../../libs/auth.mjs";
4
4
  import { useQueryClient } from "../reactQuery.mjs";
5
+ import { useQuery } from "@tanstack/react-query";
5
6
  import configuration from "@intlayer/config/built";
6
7
  import { useConfiguration } from "@intlayer/editor-react";
7
- import { useQuery } from "@tanstack/react-query";
8
8
 
9
9
  //#region src/hooks/useAuth/useSession.ts
10
10
  const useSession = (sessionProp, intlayerConfiguration) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useSession.mjs","names":["configuration","defaultConfiguration"],"sources":["../../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { useQueryClient } from '@hooks/reactQuery';\nimport type { SessionAPI } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { getAuthAPI } from '@libs/auth';\nimport { useQuery } from '@tanstack/react-query';\n\nexport type UseSessionResult = {\n /** The current session: `undefined` while loading, `null` if fetched and no session, otherwise the session. */\n session: SessionAPI | null | undefined;\n /** Refetches the session and returns it (undefined while loading). */\n fetchSession: () => Promise<SessionAPI | null | undefined>;\n /** Alias of `fetchSession` for ergonomics. */\n revalidateSession: () => Promise<SessionAPI | null | undefined>;\n /** Manually set the session cache. */\n setSession: (nextSession: SessionAPI | null) => void;\n};\n\nexport const useSession = (\n sessionProp?: SessionAPI | null,\n intlayerConfiguration?: IntlayerConfig\n): UseSessionResult => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n\n const queryClient = useQueryClient();\n\n // Keep TanStack generics internal so they don't leak into the d.ts\n const { data, isFetched, refetch } = useQuery({\n queryKey: ['session'],\n queryFn: async () => {\n const intlayerAPI = getAuthAPI(config);\n const result = await intlayerAPI.getSession();\n // Narrow to the public shape we want to expose\n return result.data as unknown as SessionAPI;\n },\n // Session data rarely changes during navigation, so keep it fresh for 1 minute\n // This prevents unnecessary refetches when navigating between pages\n staleTime: 60 * 1000,\n gcTime: 5 * 60 * 1000,\n // Only refetch if data is stale (not on every mount)\n refetchOnMount: true,\n refetchOnWindowFocus: false,\n refetchOnReconnect: false,\n enabled: !sessionProp,\n });\n\n const session = data ?? (isFetched ? null : undefined);\n\n const setSession = (nextSession: SessionAPI | null) => {\n queryClient.setQueryData(['session'], nextSession);\n };\n\n const fetchSession = async (): Promise<SessionAPI | null | undefined> => {\n const res = await refetch();\n return res.data as SessionAPI | null | undefined;\n };\n\n const revalidateSession = fetchSession;\n\n return {\n session,\n fetchSession,\n revalidateSession,\n setSession,\n };\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAa,cACX,aACA,0BACqB;CACrB,MAAMA,kBAAgB,kBAAkB;CACxC,MAAM,SAAS,yBAAyBA,mBAAiBC;CAEzD,MAAM,cAAc,gBAAgB;CAGpC,MAAM,EAAE,MAAM,WAAW,YAAY,SAAS;EAC5C,UAAU,CAAC,UAAU;EACrB,SAAS,YAAY;AAInB,WAFe,MADK,WAAW,OAAO,CACL,YAAY,EAE/B;;EAIhB,WAAW,KAAK;EAChB,QAAQ,MAAS;EAEjB,gBAAgB;EAChB,sBAAsB;EACtB,oBAAoB;EACpB,SAAS,CAAC;EACX,CAAC;CAEF,MAAM,UAAU,SAAS,YAAY,OAAO;CAE5C,MAAM,cAAc,gBAAmC;AACrD,cAAY,aAAa,CAAC,UAAU,EAAE,YAAY;;CAGpD,MAAM,eAAe,YAAoD;AAEvE,UADY,MAAM,SAAS,EAChB;;AAKb,QAAO;EACL;EACA;EACA,mBALwB;EAMxB;EACD"}
1
+ {"version":3,"file":"useSession.mjs","names":["configuration","defaultConfiguration"],"sources":["../../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { useQueryClient } from '@hooks/reactQuery';\nimport type { SessionAPI } from '@intlayer/backend';\nimport { default as defaultConfiguration } from '@intlayer/config/built';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { getAuthAPI } from '@libs/auth';\nimport { useQuery } from '@tanstack/react-query';\n\nexport type UseSessionResult = {\n /** The current session: `undefined` while loading, `null` if fetched and no session, otherwise the session. */\n session: SessionAPI | null | undefined;\n /** Refetches the session and returns it (undefined while loading). */\n fetchSession: () => Promise<SessionAPI | null | undefined>;\n /** Alias of `fetchSession` for ergonomics. */\n revalidateSession: () => Promise<SessionAPI | null | undefined>;\n /** Manually set the session cache. */\n setSession: (nextSession: SessionAPI | null) => void;\n};\n\nexport const useSession = (\n sessionProp?: SessionAPI | null,\n intlayerConfiguration?: IntlayerConfig\n): UseSessionResult => {\n const configuration = useConfiguration();\n const config = (intlayerConfiguration ??\n configuration ??\n defaultConfiguration) as IntlayerConfig;\n\n const queryClient = useQueryClient();\n\n // Keep TanStack generics internal so they don't leak into the d.ts\n const { data, isFetched, refetch } = useQuery({\n queryKey: ['session'],\n queryFn: async () => {\n const intlayerAPI = getAuthAPI(config);\n const result = await intlayerAPI.getSession();\n // Narrow to the public shape we want to expose\n return result.data as unknown as SessionAPI;\n },\n // Session data rarely changes during navigation, so keep it fresh for 1 minute\n // This prevents unnecessary refetches when navigating between pages\n staleTime: 60 * 1000,\n gcTime: 5 * 60 * 1000,\n // Only refetch if data is stale (not on every mount)\n refetchOnMount: true,\n refetchOnWindowFocus: false,\n refetchOnReconnect: false,\n enabled: !sessionProp,\n });\n\n const session = data ?? (isFetched ? null : undefined);\n\n const setSession = (nextSession: SessionAPI | null) => {\n queryClient.setQueryData(['session'], nextSession);\n };\n\n const fetchSession = async (): Promise<SessionAPI | null | undefined> => {\n const res = await refetch();\n return res.data as SessionAPI | null | undefined;\n };\n\n const revalidateSession = fetchSession;\n\n return {\n session,\n fetchSession,\n revalidateSession,\n setSession,\n };\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAa,cACX,aACA,0BACqB;CACrB,MAAMA,kBAAgB,kBAAkB;CACxC,MAAM,SAAU,yBACdA,mBACAC;CAEF,MAAM,cAAc,gBAAgB;CAGpC,MAAM,EAAE,MAAM,WAAW,YAAY,SAAS;EAC5C,UAAU,CAAC,UAAU;EACrB,SAAS,YAAY;AAInB,WAFe,MADK,WAAW,OAAO,CACL,YAAY,EAE/B;;EAIhB,WAAW,KAAK;EAChB,QAAQ,MAAS;EAEjB,gBAAgB;EAChB,sBAAsB;EACtB,oBAAoB;EACpB,SAAS,CAAC;EACX,CAAC;CAEF,MAAM,UAAU,SAAS,YAAY,OAAO;CAE5C,MAAM,cAAc,gBAAmC;AACrD,cAAY,aAAa,CAAC,UAAU,EAAE,YAAY;;CAGpD,MAAM,eAAe,YAAoD;AAEvE,UADY,MAAM,SAAS,EAChB;;AAKb,QAAO;EACL;EACA;EACA,mBALwB;EAMxB;EACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"auth.mjs","names":[],"sources":["../../../src/libs/auth.ts"],"sourcesContent":["import { passkeyClient } from '@better-auth/passkey/client';\nimport { ssoClient } from '@better-auth/sso/client';\nimport configuration from '@intlayer/config/built';\nimport { BACKEND_URL } from '@intlayer/config/defaultValues';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { createAuthClient } from 'better-auth/client';\nimport { magicLinkClient, twoFactorClient } from 'better-auth/client/plugins';\n\nconst getAuthClient = (backendURL: string) =>\n createAuthClient({\n baseURL: backendURL,\n withCredentials: true, // makes fetch forward cookies\n plugins: [\n twoFactorClient({\n onTwoFactorRedirect: () => {\n // Preserve redirect_url when redirecting to 2FA\n const searchParams = new URLSearchParams(window.location.search);\n const redirectUrl = searchParams.get('redirect_url');\n const twoFaUrl = redirectUrl\n ? `/auth/2fa?redirect_url=${encodeURIComponent(redirectUrl)}`\n : '/auth/2fa';\n window.location.href = twoFaUrl;\n },\n }),\n passkeyClient(),\n magicLinkClient() as never,\n ssoClient(),\n ],\n });\n\ntype AuthClient = ReturnType<typeof getAuthClient>;\n\nexport interface AuthAPI {\n getAuthClient: () => AuthClient;\n signInEmail: AuthClient['signIn']['email'];\n signUpEmail: AuthClient['signUp']['email'];\n signOut: AuthClient['signOut'];\n signInSocial: AuthClient['signIn']['social'];\n linkSocial: AuthClient['linkSocial'];\n changePasswordSession: AuthClient['changePassword'];\n requestPasswordResetSession: AuthClient['requestPasswordReset'];\n resetPassword: AuthClient['resetPassword'];\n verifyEmailSession: AuthClient['verifyEmail'];\n getSession: AuthClient['getSession'];\n forgetPassword: AuthClient['requestPasswordReset'];\n sendVerificationEmail: AuthClient['sendVerificationEmail'];\n changeEmail: AuthClient['changeEmail'];\n deleteUser: AuthClient['deleteUser'];\n revokeSession: AuthClient['revokeSession'];\n revokeSessions: AuthClient['revokeSessions'];\n revokeOtherSessions: AuthClient['revokeOtherSessions'];\n listAccounts: AuthClient['listAccounts'];\n unlinkAccount: AuthClient['unlinkAccount'];\n refreshToken: AuthClient['refreshToken'];\n getAccessToken: AuthClient['getAccessToken'];\n accountInfo: AuthClient['accountInfo'];\n updateUser: AuthClient['updateUser'];\n listSessions: AuthClient['listSessions'];\n enableTwoFactor: AuthClient['twoFactor']['enable'];\n disableTwoFactor: AuthClient['twoFactor']['disable'];\n verifyTotp: AuthClient['twoFactor']['verifyTotp'];\n verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode'];\n addPasskey: AuthClient['passkey']['addPasskey'];\n signInPasskey: AuthClient['signIn']['passkey'];\n deletePasskey: AuthClient['passkey']['deletePasskey'];\n listPasskeys: () => Promise<any>;\n signInMagicLink: (\n // Redeclare it because of type inference issues\n input: { email: string; callbackURL: string }\n ) => any;\n registerSSO: AuthClient['sso']['register'];\n listSSOProviders: () => Promise<any>;\n deleteSSOProvider: (args: { providerId: string }) => Promise<any>;\n signInSSO: AuthClient['signIn']['sso'];\n}\n\nexport const getAuthAPI = (intlayerConfig?: IntlayerConfig): AuthAPI => {\n let backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n backendURL = BACKEND_URL;\n console.dir({ intlayerConfig, configuration }, { depth: null });\n console.error('Backend URL is not defined in the Intlayer configuration.');\n }\n\n const client = getAuthClient(backendURL);\n\n const signInEmail: AuthClient['signIn']['email'] = async (...args) => {\n return client.signIn.email(...args);\n };\n\n const signInSocial: AuthClient['signIn']['social'] = async (...args) => {\n return client.signIn.social(...args);\n };\n\n const signUpEmail: AuthClient['signUp']['email'] = async (...args) => {\n return client.signUp.email(...args);\n };\n\n const signOut: AuthClient['signOut'] = async (...args) => {\n return client.signOut(...args);\n };\n\n const changePasswordSession: AuthClient['changePassword'] = async (\n ...args\n ) => {\n return client.changePassword(...args);\n };\n\n const requestPasswordResetSession: AuthClient['requestPasswordReset'] =\n async (...args) => {\n return client.requestPasswordReset(...args);\n };\n\n // @ts-ignore - resetPassword is not typed\n const resetPassword: AuthClient['resetPassword'] = async (...args) => {\n return client.resetPassword(...args);\n };\n\n const verifyEmailSession: AuthClient['verifyEmail'] = async (...args) => {\n return client.verifyEmail(...args);\n };\n\n const getSession: AuthClient['getSession'] = async (...args) => {\n return client.getSession(...args);\n };\n\n const forgetPassword: AuthClient['requestPasswordReset'] = async (\n ...args\n ) => {\n return client.requestPasswordReset(...args);\n };\n\n const sendVerificationEmail: AuthClient['sendVerificationEmail'] = async (\n ...args\n ) => {\n return client.sendVerificationEmail(...args);\n };\n\n const changeEmail: AuthClient['changeEmail'] = async (...args) => {\n return client.changeEmail(...args);\n };\n\n // @ts-ignore - deleteUser is not typed\n const deleteUser: AuthClient['deleteUser'] = async (...args) => {\n return client.deleteUser(...args);\n };\n\n const revokeSession: AuthClient['revokeSession'] = async (...args) => {\n return client.revokeSession(...args);\n };\n\n const revokeSessions: AuthClient['revokeSessions'] = async (...args) => {\n return client.revokeSessions(...args);\n };\n\n const revokeOtherSessions: AuthClient['revokeOtherSessions'] = async (\n ...args\n ) => {\n return client.revokeOtherSessions(...args);\n };\n\n const linkSocial: AuthClient['linkSocial'] = async (...args) => {\n return client.linkSocial(...args);\n };\n\n const listAccounts: AuthClient['listAccounts'] = async (...args) => {\n return client.listAccounts(...args);\n };\n\n const unlinkAccount: AuthClient['unlinkAccount'] = async (...args) => {\n return client.unlinkAccount(...args);\n };\n\n const refreshToken: AuthClient['refreshToken'] = async (...args) => {\n return client.refreshToken(...args);\n };\n\n const getAccessToken: AuthClient['getAccessToken'] = async (...args) => {\n return client.getAccessToken(...args);\n };\n\n const accountInfo: AuthClient['accountInfo'] = async (...args) => {\n return client.accountInfo(...args);\n };\n\n const updateUser: AuthClient['updateUser'] = async (...args) => {\n return client.updateUser(...args);\n };\n\n const listSessions: AuthClient['listSessions'] = async (...args) => {\n return client.listSessions(...args);\n };\n\n const enableTwoFactor: AuthClient['twoFactor']['enable'] = async (\n ...args\n ) => {\n return client.twoFactor.enable(...args) as ReturnType<\n AuthClient['twoFactor']['enable']\n >;\n };\n\n const disableTwoFactor: AuthClient['twoFactor']['disable'] = async (\n ...args\n ) => {\n return client.twoFactor.disable(...args) as ReturnType<\n AuthClient['twoFactor']['disable']\n >;\n };\n\n const verifyTotp: AuthClient['twoFactor']['verifyTotp'] = async (...args) => {\n return client.twoFactor.verifyTotp(...args) as ReturnType<\n AuthClient['twoFactor']['verifyTotp']\n >;\n };\n\n const verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode'] = async (\n ...args\n ) => {\n return client.twoFactor.verifyBackupCode(...args) as ReturnType<\n AuthClient['twoFactor']['verifyBackupCode']\n >;\n };\n\n const addPasskey: AuthClient['passkey']['addPasskey'] = async (...args) => {\n return client.passkey.addPasskey(...args);\n };\n\n const signInPasskey: AuthClient['signIn']['passkey'] = async (...args) => {\n return client.signIn.passkey(...args);\n };\n\n const deletePasskey: AuthClient['passkey']['deletePasskey'] = async (\n ...args\n ) => {\n return client.passkey.deletePasskey(...args);\n };\n\n const listPasskeys = async () => {\n // @ts-ignore - listPasskeys may not be typed yet\n return client.$fetch('/passkey/list-user-passkeys', {\n method: 'GET',\n });\n };\n\n const signInMagicLink: any = async (...args: any[]) => {\n return (client.signIn as any).magicLink(...args);\n };\n\n const signInSSO: AuthClient['signIn']['sso'] = async (...args) => {\n return client.signIn.sso(...args);\n };\n\n const registerSSO: AuthClient['sso']['register'] = async (...args) => {\n return client.sso.register(...args);\n };\n\n const listSSOProviders = async () => {\n // Not implemented yet\n };\n\n const deleteSSOProvider = async (_args: { providerId: string }) => {\n // Not implemented yet\n };\n\n return {\n getAuthClient: () => client,\n signInEmail,\n signUpEmail,\n signOut,\n signInSocial,\n linkSocial,\n changePasswordSession,\n requestPasswordResetSession,\n resetPassword,\n verifyEmailSession,\n getSession,\n forgetPassword,\n sendVerificationEmail,\n changeEmail,\n deleteUser,\n revokeSession,\n revokeSessions,\n revokeOtherSessions,\n listAccounts,\n unlinkAccount,\n refreshToken,\n getAccessToken,\n accountInfo,\n updateUser,\n listSessions,\n enableTwoFactor,\n disableTwoFactor,\n verifyTotp,\n verifyBackupCode,\n addPasskey,\n signInPasskey,\n deletePasskey,\n listPasskeys,\n signInMagicLink,\n signInSSO,\n registerSSO,\n listSSOProviders,\n deleteSSOProvider,\n };\n};\n"],"mappings":";;;;;;;;AAQA,MAAM,iBAAiB,eACrB,iBAAiB;CACf,SAAS;CACT,iBAAiB;CACjB,SAAS;EACP,gBAAgB,EACd,2BAA2B;GAGzB,MAAM,cADe,IAAI,gBAAgB,OAAO,SAAS,OAAO,CAC/B,IAAI,eAAe;GACpD,MAAM,WAAW,cACb,0BAA0B,mBAAmB,YAAY,KACzD;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E,GAAG,SACA;AACH,SAAO,OAAO,UAAU,iBAAiB,GAAG,KAAK;;CAKnD,MAAM,aAAkD,OAAO,GAAG,SAAS;AACzE,SAAO,OAAO,QAAQ,WAAW,GAAG,KAAK;;CAG3C,MAAM,gBAAiD,OAAO,GAAG,SAAS;AACxE,SAAO,OAAO,OAAO,QAAQ,GAAG,KAAK;;CAGvC,MAAM,gBAAwD,OAC5D,GAAG,SACA;AACH,SAAO,OAAO,QAAQ,cAAc,GAAG,KAAK;;CAG9C,MAAM,eAAe,YAAY;AAE/B,SAAO,OAAO,OAAO,+BAA+B,EAClD,QAAQ,OACT,CAAC;;CAGJ,MAAM,kBAAuB,OAAO,GAAG,SAAgB;AACrD,SAAQ,OAAO,OAAe,UAAU,GAAG,KAAK;;CAGlD,MAAM,YAAyC,OAAO,GAAG,SAAS;AAChE,SAAO,OAAO,OAAO,IAAI,GAAG,KAAK;;CAGnC,MAAM,cAA6C,OAAO,GAAG,SAAS;AACpE,SAAO,OAAO,IAAI,SAAS,GAAG,KAAK;;CAGrC,MAAM,mBAAmB,YAAY;CAIrC,MAAM,oBAAoB,OAAO,UAAkC;AAInE,QAAO;EACL,qBAAqB;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
1
+ {"version":3,"file":"auth.mjs","names":[],"sources":["../../../src/libs/auth.ts"],"sourcesContent":["import { passkeyClient } from '@better-auth/passkey/client';\nimport { ssoClient } from '@better-auth/sso/client';\nimport { default as configuration } from '@intlayer/config/built';\nimport { BACKEND_URL } from '@intlayer/config/defaultValues';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { createAuthClient } from 'better-auth/client';\nimport { magicLinkClient, twoFactorClient } from 'better-auth/client/plugins';\n\nconst getAuthClient = (backendURL: string) =>\n createAuthClient({\n baseURL: backendURL,\n withCredentials: true, // makes fetch forward cookies\n plugins: [\n twoFactorClient({\n onTwoFactorRedirect: () => {\n // Preserve redirect_url when redirecting to 2FA\n const searchParams = new URLSearchParams(window.location.search);\n const redirectUrl = searchParams.get('redirect_url');\n const twoFaUrl = redirectUrl\n ? `/auth/2fa?redirect_url=${encodeURIComponent(redirectUrl)}`\n : '/auth/2fa';\n window.location.href = twoFaUrl;\n },\n }),\n passkeyClient(),\n magicLinkClient() as never,\n ssoClient(),\n ],\n });\n\ntype AuthClient = ReturnType<typeof getAuthClient>;\n\nexport interface AuthAPI {\n getAuthClient: () => AuthClient;\n signInEmail: AuthClient['signIn']['email'];\n signUpEmail: AuthClient['signUp']['email'];\n signOut: AuthClient['signOut'];\n signInSocial: AuthClient['signIn']['social'];\n linkSocial: AuthClient['linkSocial'];\n changePasswordSession: AuthClient['changePassword'];\n requestPasswordResetSession: AuthClient['requestPasswordReset'];\n resetPassword: AuthClient['resetPassword'];\n verifyEmailSession: AuthClient['verifyEmail'];\n getSession: AuthClient['getSession'];\n forgetPassword: AuthClient['requestPasswordReset'];\n sendVerificationEmail: AuthClient['sendVerificationEmail'];\n changeEmail: AuthClient['changeEmail'];\n deleteUser: AuthClient['deleteUser'];\n revokeSession: AuthClient['revokeSession'];\n revokeSessions: AuthClient['revokeSessions'];\n revokeOtherSessions: AuthClient['revokeOtherSessions'];\n listAccounts: AuthClient['listAccounts'];\n unlinkAccount: AuthClient['unlinkAccount'];\n refreshToken: AuthClient['refreshToken'];\n getAccessToken: AuthClient['getAccessToken'];\n accountInfo: AuthClient['accountInfo'];\n updateUser: AuthClient['updateUser'];\n listSessions: AuthClient['listSessions'];\n enableTwoFactor: AuthClient['twoFactor']['enable'];\n disableTwoFactor: AuthClient['twoFactor']['disable'];\n verifyTotp: AuthClient['twoFactor']['verifyTotp'];\n verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode'];\n addPasskey: AuthClient['passkey']['addPasskey'];\n signInPasskey: AuthClient['signIn']['passkey'];\n deletePasskey: AuthClient['passkey']['deletePasskey'];\n listPasskeys: () => Promise<any>;\n signInMagicLink: (\n // Redeclare it because of type inference issues\n input: { email: string; callbackURL: string }\n ) => any;\n registerSSO: AuthClient['sso']['register'];\n listSSOProviders: () => Promise<any>;\n deleteSSOProvider: (args: { providerId: string }) => Promise<any>;\n signInSSO: AuthClient['signIn']['sso'];\n}\n\nexport const getAuthAPI = (intlayerConfig?: IntlayerConfig): AuthAPI => {\n let backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n backendURL = BACKEND_URL;\n console.dir({ intlayerConfig, configuration }, { depth: null });\n console.error('Backend URL is not defined in the Intlayer configuration.');\n }\n\n const client = getAuthClient(backendURL);\n\n const signInEmail: AuthClient['signIn']['email'] = async (...args) => {\n return client.signIn.email(...args);\n };\n\n const signInSocial: AuthClient['signIn']['social'] = async (...args) => {\n return client.signIn.social(...args);\n };\n\n const signUpEmail: AuthClient['signUp']['email'] = async (...args) => {\n return client.signUp.email(...args);\n };\n\n const signOut: AuthClient['signOut'] = async (...args) => {\n return client.signOut(...args);\n };\n\n const changePasswordSession: AuthClient['changePassword'] = async (\n ...args\n ) => {\n return client.changePassword(...args);\n };\n\n const requestPasswordResetSession: AuthClient['requestPasswordReset'] =\n async (...args) => {\n return client.requestPasswordReset(...args);\n };\n\n // @ts-ignore - resetPassword is not typed\n const resetPassword: AuthClient['resetPassword'] = async (...args) => {\n return client.resetPassword(...args);\n };\n\n const verifyEmailSession: AuthClient['verifyEmail'] = async (...args) => {\n return client.verifyEmail(...args);\n };\n\n const getSession: AuthClient['getSession'] = async (...args) => {\n return client.getSession(...args);\n };\n\n const forgetPassword: AuthClient['requestPasswordReset'] = async (\n ...args\n ) => {\n return client.requestPasswordReset(...args);\n };\n\n const sendVerificationEmail: AuthClient['sendVerificationEmail'] = async (\n ...args\n ) => {\n return client.sendVerificationEmail(...args);\n };\n\n const changeEmail: AuthClient['changeEmail'] = async (...args) => {\n return client.changeEmail(...args);\n };\n\n // @ts-ignore - deleteUser is not typed\n const deleteUser: AuthClient['deleteUser'] = async (...args) => {\n return client.deleteUser(...args);\n };\n\n const revokeSession: AuthClient['revokeSession'] = async (...args) => {\n return client.revokeSession(...args);\n };\n\n const revokeSessions: AuthClient['revokeSessions'] = async (...args) => {\n return client.revokeSessions(...args);\n };\n\n const revokeOtherSessions: AuthClient['revokeOtherSessions'] = async (\n ...args\n ) => {\n return client.revokeOtherSessions(...args);\n };\n\n const linkSocial: AuthClient['linkSocial'] = async (...args) => {\n return client.linkSocial(...args);\n };\n\n const listAccounts: AuthClient['listAccounts'] = async (...args) => {\n return client.listAccounts(...args);\n };\n\n const unlinkAccount: AuthClient['unlinkAccount'] = async (...args) => {\n return client.unlinkAccount(...args);\n };\n\n const refreshToken: AuthClient['refreshToken'] = async (...args) => {\n return client.refreshToken(...args);\n };\n\n const getAccessToken: AuthClient['getAccessToken'] = async (...args) => {\n return client.getAccessToken(...args);\n };\n\n const accountInfo: AuthClient['accountInfo'] = async (...args) => {\n return client.accountInfo(...args);\n };\n\n const updateUser: AuthClient['updateUser'] = async (...args) => {\n return client.updateUser(...args);\n };\n\n const listSessions: AuthClient['listSessions'] = async (...args) => {\n return client.listSessions(...args);\n };\n\n const enableTwoFactor: AuthClient['twoFactor']['enable'] = async (\n ...args\n ) => {\n return client.twoFactor.enable(...args) as ReturnType<\n AuthClient['twoFactor']['enable']\n >;\n };\n\n const disableTwoFactor: AuthClient['twoFactor']['disable'] = async (\n ...args\n ) => {\n return client.twoFactor.disable(...args) as ReturnType<\n AuthClient['twoFactor']['disable']\n >;\n };\n\n const verifyTotp: AuthClient['twoFactor']['verifyTotp'] = async (...args) => {\n return client.twoFactor.verifyTotp(...args) as ReturnType<\n AuthClient['twoFactor']['verifyTotp']\n >;\n };\n\n const verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode'] = async (\n ...args\n ) => {\n return client.twoFactor.verifyBackupCode(...args) as ReturnType<\n AuthClient['twoFactor']['verifyBackupCode']\n >;\n };\n\n const addPasskey: AuthClient['passkey']['addPasskey'] = async (...args) => {\n return client.passkey.addPasskey(...args);\n };\n\n const signInPasskey: AuthClient['signIn']['passkey'] = async (...args) => {\n return client.signIn.passkey(...args);\n };\n\n const deletePasskey: AuthClient['passkey']['deletePasskey'] = async (\n ...args\n ) => {\n return client.passkey.deletePasskey(...args);\n };\n\n const listPasskeys = async () => {\n // @ts-ignore - listPasskeys may not be typed yet\n return client.$fetch('/passkey/list-user-passkeys', {\n method: 'GET',\n });\n };\n\n const signInMagicLink: any = async (...args: any[]) => {\n return (client.signIn as any).magicLink(...args);\n };\n\n const signInSSO: AuthClient['signIn']['sso'] = async (...args) => {\n return client.signIn.sso(...args);\n };\n\n const registerSSO: AuthClient['sso']['register'] = async (...args) => {\n return client.sso.register(...args);\n };\n\n const listSSOProviders = async () => {\n // Not implemented yet\n };\n\n const deleteSSOProvider = async (_args: { providerId: string }) => {\n // Not implemented yet\n };\n\n return {\n getAuthClient: () => client,\n signInEmail,\n signUpEmail,\n signOut,\n signInSocial,\n linkSocial,\n changePasswordSession,\n requestPasswordResetSession,\n resetPassword,\n verifyEmailSession,\n getSession,\n forgetPassword,\n sendVerificationEmail,\n changeEmail,\n deleteUser,\n revokeSession,\n revokeSessions,\n revokeOtherSessions,\n listAccounts,\n unlinkAccount,\n refreshToken,\n getAccessToken,\n accountInfo,\n updateUser,\n listSessions,\n enableTwoFactor,\n disableTwoFactor,\n verifyTotp,\n verifyBackupCode,\n addPasskey,\n signInPasskey,\n deletePasskey,\n listPasskeys,\n signInMagicLink,\n signInSSO,\n registerSSO,\n listSSOProviders,\n deleteSSOProvider,\n };\n};\n"],"mappings":";;;;;;;;AAQA,MAAM,iBAAiB,eACrB,iBAAiB;CACf,SAAS;CACT,iBAAiB;CACjB,SAAS;EACP,gBAAgB,EACd,2BAA2B;GAGzB,MAAM,cADe,IAAI,gBAAgB,OAAO,SAAS,OAAO,CAC/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3E,SAAO,OAAO,UAAU,WAAW,GAAG,KAAK;;CAK7C,MAAM,mBAAgE,OACpE,GAAG,SACA;AACH,SAAO,OAAO,UAAU,iBAAiB,GAAG,KAAK;;CAKnD,MAAM,aAAkD,OAAO,GAAG,SAAS;AACzE,SAAO,OAAO,QAAQ,WAAW,GAAG,KAAK;;CAG3C,MAAM,gBAAiD,OAAO,GAAG,SAAS;AACxE,SAAO,OAAO,OAAO,QAAQ,GAAG,KAAK;;CAGvC,MAAM,gBAAwD,OAC5D,GAAG,SACA;AACH,SAAO,OAAO,QAAQ,cAAc,GAAG,KAAK;;CAG9C,MAAM,eAAe,YAAY;AAE/B,SAAO,OAAO,OAAO,+BAA+B,EAClD,QAAQ,OACT,CAAC;;CAGJ,MAAM,kBAAuB,OAAO,GAAG,SAAgB;AACrD,SAAQ,OAAO,OAAe,UAAU,GAAG,KAAK;;CAGlD,MAAM,YAAyC,OAAO,GAAG,SAAS;AAChE,SAAO,OAAO,OAAO,IAAI,GAAG,KAAK;;CAGnC,MAAM,cAA6C,OAAO,GAAG,SAAS;AACpE,SAAO,OAAO,IAAI,SAAS,GAAG,KAAK;;CAGrC,MAAM,mBAAmB,YAAY;CAIrC,MAAM,oBAAoB,OAAO,UAAkC;AAInE,QAAO;EACL,qBAAqB;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
3
  import { useToast } from "../components/Toaster/useToast.mjs";
4
+ import { MutationCache, QueryClient, QueryClientProvider } from "@tanstack/react-query";
4
5
  import { useRef } from "react";
5
6
  import { jsx } from "react/jsx-runtime";
6
- import { MutationCache, QueryClient, QueryClientProvider } from "@tanstack/react-query";
7
7
 
8
8
  //#region src/providers/ReactQueryProvider.tsx
9
9
  const defaultQueryOptions = {
@@ -43,7 +43,7 @@ declare enum BadgeSize {
43
43
  * @description Defines the styling variants for different badge combinations
44
44
  */
45
45
  declare const badgeVariants: (props?: {
46
- color?: "text" | "primary" | "secondary" | "destructive" | "success" | "error" | "neutral" | "light" | "dark" | "custom";
46
+ color?: "text" | "error" | "custom" | "primary" | "secondary" | "destructive" | "success" | "neutral" | "light" | "dark";
47
47
  variant?: "none" | "default" | "outline" | "hoverable";
48
48
  size?: "sm" | "md" | "lg";
49
49
  } & _$class_variance_authority_types0.ClassProp) => string;
@@ -61,10 +61,10 @@ declare enum ButtonTextAlign {
61
61
  */
62
62
  declare const buttonVariants: (props?: {
63
63
  size?: "sm" | "md" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
64
- color?: "text" | "primary" | "secondary" | "destructive" | "success" | "error" | "neutral" | "light" | "dark" | "custom" | "card" | "current" | "text-inverse";
65
- roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full" | "4xl" | "5xl";
64
+ color?: "text" | "error" | "custom" | "primary" | "secondary" | "destructive" | "success" | "neutral" | "light" | "dark" | "card" | "current" | "text-inverse";
65
+ roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full";
66
66
  variant?: "input" | "none" | "default" | "outline" | "hoverable" | "link" | "invisible-link" | "fade";
67
- textAlign?: "left" | "right" | "center";
67
+ textAlign?: "left" | "center" | "right";
68
68
  isFullWidth?: boolean;
69
69
  } & _$class_variance_authority_types0.ClassProp) => string;
70
70
  /**
@@ -5,8 +5,8 @@ import { VariantProps } from "class-variance-authority";
5
5
  //#region src/components/CollapsibleTable/CollapsibleTable.d.ts
6
6
  declare const collapsibleTableVariants: (props?: {
7
7
  size?: "sm" | "md" | "lg" | "xl" | "full";
8
- variant?: "default" | "dark" | "ghost" | "outlined";
9
- spacing?: "sm" | "md" | "lg" | "none" | "auto";
8
+ variant?: "default" | "ghost" | "dark" | "outlined";
9
+ spacing?: "none" | "sm" | "md" | "lg" | "auto";
10
10
  } & _$class_variance_authority_types0.ClassProp) => string;
11
11
  interface CollapsibleTableProps extends Omit<HTMLAttributes<HTMLElement>, 'title'>, VariantProps<typeof collapsibleTableVariants> {
12
12
  /** Table title displayed in the header */
@@ -29,7 +29,7 @@ declare const Command: {
29
29
  ref?: React.Ref<HTMLInputElement>;
30
30
  } & {
31
31
  asChild?: boolean;
32
- }, "key" | "asChild" | keyof _$react.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
32
+ }, "key" | "asChild" | keyof _$react.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
33
33
  value?: string;
34
34
  onValueChange?: (search: string) => void;
35
35
  } & _$react.RefAttributes<HTMLInputElement>>;
@@ -8,14 +8,14 @@ import { VariantProps } from "class-variance-authority";
8
8
  * Provides flexible styling options for background, padding, borders, and layout
9
9
  */
10
10
  declare const containerVariants: (props?: {
11
- roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "full" | "3xl" | "4xl";
12
- transparency?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full";
13
- padding?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
11
+ roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "full";
12
+ transparency?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
13
+ padding?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
14
14
  separator?: "both" | "without" | "x" | "y";
15
- border?: "none" | "with";
16
- borderColor?: "error" | "success" | "text" | "primary" | "secondary" | "neutral" | "warning" | "card";
17
- background?: "none" | "hoverable" | "with";
18
- gap?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
15
+ border?: "with" | "none";
16
+ borderColor?: "error" | "success" | "text" | "primary" | "secondary" | "neutral" | "card" | "warning";
17
+ background?: "with" | "none" | "hoverable";
18
+ gap?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
19
19
  } & _$class_variance_authority_types0.ClassProp) => string;
20
20
  /** Available rounded corner sizes for the container */
21
21
  declare enum ContainerRoundedSize {
@@ -6,7 +6,7 @@ import { VariantProps } from "class-variance-authority";
6
6
  declare const checkboxVariants: (props?: {
7
7
  variant?: "default";
8
8
  size?: "xs" | "sm" | "md" | "lg";
9
- color?: "error" | "success" | "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "custom";
9
+ color?: "error" | "success" | "text" | "primary" | "secondary" | "neutral" | "destructive" | "custom" | "light" | "dark";
10
10
  validationStyleEnabled?: "enabled" | "disabled";
11
11
  } & _$class_variance_authority_types0.ClassProp) => string;
12
12
  declare enum CheckboxSize {
@@ -53,9 +53,9 @@ declare enum LinkUnderlined {
53
53
  FALSE = "false"
54
54
  }
55
55
  declare const linkVariants: (props?: {
56
- variant?: "default" | "hoverable" | "button" | "invisible-link" | "button-outlined";
57
- roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
58
- color?: "text" | "primary" | "secondary" | "destructive" | "success" | "error" | "neutral" | "light" | "dark" | "custom" | "text-inverse";
56
+ variant?: "default" | "hoverable" | "invisible-link" | "button" | "button-outlined";
57
+ roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full";
58
+ color?: "text" | "error" | "custom" | "primary" | "secondary" | "destructive" | "success" | "neutral" | "light" | "dark" | "text-inverse";
59
59
  size?: "sm" | "md" | "lg" | "xl" | "custom";
60
60
  underlined?: boolean | LinkUnderlined.DEFAULT;
61
61
  } & _$class_variance_authority_types0.ClassProp) => string;
@@ -5,8 +5,8 @@ import { VariantProps } from "class-variance-authority";
5
5
  //#region src/components/Pagination/Pagination.d.ts
6
6
  declare const paginationVariants: (props?: {
7
7
  size?: "sm" | "md" | "lg";
8
- color?: "text" | "primary" | "secondary" | "destructive" | "neutral";
9
- variant?: "default" | "ghost" | "bordered";
8
+ color?: "text" | "primary" | "secondary" | "neutral" | "destructive";
9
+ variant?: "default" | "bordered" | "ghost";
10
10
  } & _$class_variance_authority_types0.ClassProp) => string;
11
11
  declare enum PaginationSize {
12
12
  SM = "sm",
@@ -6,7 +6,7 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
  //#region src/components/Tab/Tab.d.ts
7
7
  declare const tabContainerVariant: (props?: {
8
8
  background?: "with" | "without";
9
- variant?: "default" | "ghost" | "bordered";
9
+ variant?: "default" | "bordered" | "ghost";
10
10
  } & _$class_variance_authority_types0.ClassProp) => string;
11
11
  type TabProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof tabContainerVariant> & {
12
12
  defaultTab?: string;
@@ -15,7 +15,7 @@ declare enum TabSelectorColor {
15
15
  TEXT = "text"
16
16
  }
17
17
  declare const tabSelectorVariant: (props?: {
18
- color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
18
+ color?: "text" | "primary" | "secondary" | "neutral" | "destructive" | "light" | "dark";
19
19
  } & _$class_variance_authority_types0.ClassProp) => string;
20
20
  type TabSelectorItemProps = HTMLAttributes<HTMLElement> & {
21
21
  key: string | number;
@@ -185,8 +185,8 @@ declare enum TagBackground {
185
185
  WITH = "with"
186
186
  }
187
187
  declare const containerVariants: (props?: {
188
- roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
189
- color?: "text" | "primary" | "success" | "error" | "neutral" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
188
+ roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full";
189
+ color?: "text" | "error" | "primary" | "success" | "neutral" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
190
190
  size?: "xs" | "sm" | "md" | "lg" | "xl";
191
191
  border?: "none" | "with";
192
192
  background?: "none" | "with";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "8.6.3",
3
+ "version": "8.6.4",
4
4
  "private": false,
5
5
  "description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
6
6
  "keywords": [
@@ -114,28 +114,28 @@
114
114
  "typecheck_": "tsc --noEmit --project tsconfig.types.json"
115
115
  },
116
116
  "dependencies": {
117
- "@better-auth/passkey": "1.5.5",
118
- "@better-auth/sso": "1.5.5",
119
- "@intlayer/api": "8.6.3",
120
- "@intlayer/config": "8.6.3",
121
- "@intlayer/core": "8.6.3",
122
- "@intlayer/dictionaries-entry": "8.6.3",
123
- "@intlayer/editor-react": "8.6.3",
124
- "@intlayer/types": "8.6.3",
117
+ "@better-auth/passkey": "1.5.6",
118
+ "@better-auth/sso": "1.5.6",
119
+ "@intlayer/api": "8.6.4",
120
+ "@intlayer/config": "8.6.4",
121
+ "@intlayer/core": "8.6.4",
122
+ "@intlayer/dictionaries-entry": "8.6.4",
123
+ "@intlayer/editor-react": "8.6.4",
124
+ "@intlayer/types": "8.6.4",
125
125
  "@radix-ui/react-dialog": "1.1.15",
126
126
  "@radix-ui/react-select": "2.2.6",
127
127
  "@radix-ui/react-slot": "1.2.4",
128
128
  "@radix-ui/react-toast": "1.2.15",
129
129
  "@tailwindcss/aspect-ratio": "0.4.2",
130
- "better-auth": "1.5.5",
130
+ "better-auth": "1.5.6",
131
131
  "class-variance-authority": "0.7.1",
132
132
  "cmdk": "1.1.1",
133
- "react-intlayer": "8.6.3",
133
+ "react-intlayer": "8.6.4",
134
134
  "rollup-preserve-directives": "1.1.3",
135
135
  "zod": "4.3.6"
136
136
  },
137
137
  "devDependencies": {
138
- "@intlayer/backend": "8.6.3",
138
+ "@intlayer/backend": "8.6.4",
139
139
  "@shikijs/transformers": "4.0.2",
140
140
  "@storybook/addon-a11y": "8.6.14",
141
141
  "@storybook/addon-essentials": "8.6.14",
@@ -165,7 +165,7 @@
165
165
  "@utils/ts-config-types": "1.0.4",
166
166
  "clsx": "2.1.1",
167
167
  "fast-glob": "3.3.3",
168
- "intlayer": "8.6.3",
168
+ "intlayer": "8.6.4",
169
169
  "rimraf": "6.1.3",
170
170
  "shiki": "4.0.2",
171
171
  "storybook": "8.6.17",
@@ -173,26 +173,26 @@
173
173
  "tsdown": "0.21.7",
174
174
  "typescript": "6.0.2",
175
175
  "vite": "8.0.3",
176
- "vite-intlayer": "8.6.3",
176
+ "vite-intlayer": "8.6.4",
177
177
  "vite-plugin-dts": "4.5.4",
178
178
  "vitest": "4.1.2"
179
179
  },
180
180
  "peerDependencies": {
181
181
  "@better-fetch/fetch": "1.1.21",
182
182
  "@hookform/resolvers": "5.2.2",
183
- "@intlayer/backend": "8.6.3",
183
+ "@intlayer/backend": "8.6.4",
184
184
  "@monaco-editor/react": "4.7.0",
185
185
  "@shikijs/transformers": "4.0.2",
186
186
  "@tanstack/react-query": "5.95.2",
187
187
  "@tanstack/react-query-devtools": "5.95.2",
188
188
  "framer-motion": "12.38.0",
189
189
  "fuse.js": "7.1.0",
190
- "intlayer": "8.6.3",
190
+ "intlayer": "8.6.4",
191
191
  "lucide-react": "1.7.0",
192
192
  "react": ">=16.0.0",
193
193
  "react-dom": ">=16.0.0",
194
194
  "react-hook-form": "7.72.0",
195
- "react-intlayer": "8.6.3",
195
+ "react-intlayer": "8.6.4",
196
196
  "shiki": "4.0.2",
197
197
  "tailwindcss": "4.2.1"
198
198
  },