@intlayer/design-system 7.5.13 → 7.6.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/_virtual/rolldown_runtime.mjs +2 -2
- package/dist/esm/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/esm/components/Avatar/index.mjs.map +1 -1
- package/dist/esm/components/Badge/index.mjs.map +1 -1
- package/dist/esm/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/esm/components/Button/Button.mjs.map +1 -1
- package/dist/esm/components/Carousel/index.mjs.map +1 -1
- package/dist/esm/components/ClickOutsideDiv/index.mjs.map +1 -1
- package/dist/esm/components/CollapsibleTable/CollapsibleTable.mjs.map +1 -1
- package/dist/esm/components/Command/index.mjs.map +1 -1
- package/dist/esm/components/Container/index.mjs +1 -0
- package/dist/esm/components/Container/index.mjs.map +1 -1
- package/dist/esm/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorInput.mjs.map +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/esm/components/ContentSelector/ContentSelector.mjs.map +1 -1
- package/dist/esm/components/CopyButton/index.mjs.map +1 -1
- package/dist/esm/components/CopyToClipboard/index.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/index.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
- package/dist/esm/components/DropDown/index.mjs.map +1 -1
- package/dist/esm/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/esm/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/esm/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/esm/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -1
- package/dist/esm/components/Flags/Flag.mjs.map +1 -1
- package/dist/esm/components/Flags/flags.mjs +2 -2
- package/dist/esm/components/Footer/index.mjs.map +1 -1
- package/dist/esm/components/Form/FormControl.mjs.map +1 -1
- package/dist/esm/components/Form/FormDescription.mjs.map +1 -1
- package/dist/esm/components/Form/FormItem.mjs.map +1 -1
- package/dist/esm/components/Form/FormLabel.mjs.map +1 -1
- package/dist/esm/components/Form/FormMessage.mjs.map +1 -1
- package/dist/esm/components/Form/elements/AutoSizeTextAreaElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/CheckboxElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/FormElementWrapper.mjs.map +1 -1
- package/dist/esm/components/Form/elements/InputElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/InputPasswordElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/SearchInputElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/TextAreaElement.mjs.map +1 -1
- package/dist/esm/components/Form/layout/FormItemLayout.mjs.map +1 -1
- package/dist/esm/components/Form/layout/FormLabelLayout.mjs.map +1 -1
- package/dist/esm/components/Form/layout/RequiredStar.mjs.map +1 -1
- package/dist/esm/components/Headers/index.mjs.map +1 -1
- package/dist/esm/components/HeightResizer/index.mjs.map +1 -1
- package/dist/esm/components/HideShow/index.mjs.map +1 -1
- package/dist/esm/components/IDE/Code.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockServer.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockShiki.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeConditionalRenderer.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeContext.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeFormatSelector.mjs.map +1 -1
- package/dist/esm/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -1
- package/dist/esm/components/IDE/CopyCode.mjs.map +1 -1
- package/dist/esm/components/IDE/FileList.mjs.map +1 -1
- package/dist/esm/components/IDE/FileTree.mjs.map +1 -1
- package/dist/esm/components/IDE/IDE.mjs.map +1 -1
- package/dist/esm/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/esm/components/IDE/MonacoCode.mjs.map +1 -1
- package/dist/esm/components/IDE/PackageManagerSelector.mjs.map +1 -1
- package/dist/esm/components/IDE/createFileTree.mjs.map +1 -1
- package/dist/esm/components/InformationTag/index.mjs.map +1 -1
- package/dist/esm/components/Input/Checkbox.mjs.map +1 -1
- package/dist/esm/components/Input/Input.mjs.map +1 -1
- package/dist/esm/components/Input/InputPassword.mjs.map +1 -1
- package/dist/esm/components/Input/OTPInput.mjs.map +1 -1
- package/dist/esm/components/KeyboardScreenAdapter/index.mjs.map +1 -1
- package/dist/esm/components/KeyboardShortcut/KeyboardShortcut.mjs.map +1 -1
- package/dist/esm/components/Label/index.mjs.map +1 -1
- package/dist/esm/components/LanguageBackground/index.mjs.map +1 -1
- package/dist/esm/components/Link/Link.mjs.map +1 -1
- package/dist/esm/components/Loader/index.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/esm/components/Logo/Logo.mjs.map +1 -1
- package/dist/esm/components/Logo/LogoTextOnly.mjs.map +1 -1
- package/dist/esm/components/Logo/LogoWithText.mjs.map +1 -1
- package/dist/esm/components/Logo/LogoWithTextBelow.mjs.map +1 -1
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs.map +1 -1
- package/dist/esm/components/MarkDownRender/processor.mjs.map +1 -1
- package/dist/esm/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/esm/components/Modal/Modal.mjs +1 -1
- package/dist/esm/components/Modal/Modal.mjs.map +1 -1
- package/dist/esm/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/esm/components/Navbar/useNavigation.mjs.map +1 -1
- package/dist/esm/components/Pagination/NumberItemsSelector.mjs.map +1 -1
- package/dist/esm/components/Pagination/Pagination.mjs.map +1 -1
- package/dist/esm/components/Pagination/ShowingResultsNumberItems.mjs.map +1 -1
- package/dist/esm/components/Pattern/DotPattern.mjs.map +1 -1
- package/dist/esm/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/esm/components/Pattern/SpotLight.mjs.map +1 -1
- package/dist/esm/components/Popover/dynamic.mjs.map +1 -1
- package/dist/esm/components/Popover/static.mjs.map +1 -1
- package/dist/esm/components/PressableSpan/PressableSpan.mjs.map +1 -1
- package/dist/esm/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/esm/components/Select/Multiselect.mjs.map +1 -1
- package/dist/esm/components/Select/Select.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/DiscordLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/FacebookLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/InstagramLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/LinkedInLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/ProductHuntLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/TiktokLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/XLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/YoutubeLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/index.mjs.map +1 -1
- package/dist/esm/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/esm/components/Tab/Tab.mjs.map +1 -1
- package/dist/esm/components/Tab/TabContext.mjs.map +1 -1
- package/dist/esm/components/Table/Table.mjs.map +1 -1
- package/dist/esm/components/Tag/index.mjs.map +1 -1
- package/dist/esm/components/Terminal/Terminal.mjs.map +1 -1
- package/dist/esm/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
- package/dist/esm/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
- package/dist/esm/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
- package/dist/esm/components/Toaster/Toast.mjs.map +1 -1
- package/dist/esm/components/Toaster/useToast.mjs.map +1 -1
- package/dist/esm/components/WithResizer/index.mjs.map +1 -1
- package/dist/esm/hooks/useHorizontalSwipe.mjs.map +1 -1
- package/dist/esm/hooks/useItemSelector.mjs.map +1 -1
- package/dist/esm/hooks/usePersistedStore.mjs.map +1 -1
- package/dist/esm/hooks/useScrollY.mjs.map +1 -1
- package/dist/esm/libs/auth.mjs.map +1 -1
- package/dist/esm/providers/ReactQueryProvider.mjs.map +1 -1
- package/dist/esm/utils/object.mjs.map +1 -1
- package/dist/types/components/Badge/index.d.ts +2 -2
- package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts +3 -3
- package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +2 -2
- package/dist/types/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/types/components/Browser/Browser.d.ts +2 -2
- package/dist/types/components/Browser/Browser.d.ts.map +1 -1
- package/dist/types/components/Browser/browser.content.d.ts +17 -17
- package/dist/types/components/Browser/browser.content.d.ts.map +1 -1
- package/dist/types/components/Button/Button.d.ts +5 -5
- package/dist/types/components/Carousel/index.content.d.ts +8 -8
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +2 -2
- package/dist/types/components/Command/index.d.ts +20 -20
- package/dist/types/components/Command/index.d.ts.map +1 -1
- package/dist/types/components/Container/index.d.ts +9 -8
- package/dist/types/components/Container/index.d.ts.map +1 -1
- package/dist/types/components/CopyButton/CopyButton.content.d.ts +3 -3
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +9 -9
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +33 -33
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +33 -33
- package/dist/types/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +9 -9
- package/dist/types/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +7 -7
- package/dist/types/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +5 -5
- package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +31 -31
- package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/types/components/ExpandCollapse/expandCollapse.content.d.ts +3 -3
- package/dist/types/components/Form/FormBase.d.ts +2 -2
- package/dist/types/components/Form/FormBase.d.ts.map +1 -1
- package/dist/types/components/Form/FormField.d.ts +2 -2
- package/dist/types/components/Form/FormField.d.ts.map +1 -1
- package/dist/types/components/Form/elements/EditableFieldInputElement.d.ts +2 -2
- package/dist/types/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/EditableFieldTextAreaElement.d.ts +2 -2
- package/dist/types/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/FormElement.d.ts +2 -2
- package/dist/types/components/Form/elements/FormElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/MultiselectElement.d.ts +2 -2
- package/dist/types/components/Form/elements/MultiselectElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/OTPElement.d.ts +2 -2
- package/dist/types/components/Form/elements/OTPElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/SelectElement.d.ts +2 -2
- package/dist/types/components/Form/elements/SelectElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/SwitchSelectorElement.d.ts +2 -2
- package/dist/types/components/Form/elements/SwitchSelectorElement.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeContext.d.ts +2 -2
- package/dist/types/components/IDE/CodeContext.d.ts.map +1 -1
- package/dist/types/components/IDE/code.content.d.ts +5 -5
- package/dist/types/components/IDE/copyCode.content.d.ts +5 -5
- package/dist/types/components/IDE/selectors.content.d.ts +13 -13
- package/dist/types/components/Input/Checkbox.d.ts +3 -3
- package/dist/types/components/Input/Checkbox.d.ts.map +1 -1
- package/dist/types/components/Input/Input.d.ts +2 -2
- package/dist/types/components/Input/OTPInput.d.ts +6 -6
- package/dist/types/components/Input/OTPInput.d.ts.map +1 -1
- package/dist/types/components/Input/SearchInput.d.ts +2 -2
- package/dist/types/components/Input/SearchInput.d.ts.map +1 -1
- package/dist/types/components/Link/Link.d.ts +6 -6
- package/dist/types/components/Loader/index.content.d.ts +3 -3
- package/dist/types/components/Loader/spinner.d.ts +2 -2
- package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +17 -17
- package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +13 -13
- package/dist/types/components/MaxWidthSmoother/index.d.ts +2 -2
- package/dist/types/components/MaxWidthSmoother/index.d.ts.map +1 -1
- package/dist/types/components/Navbar/Burger.d.ts +2 -2
- package/dist/types/components/Navbar/Burger.d.ts.map +1 -1
- package/dist/types/components/Navbar/DesktopNavbar.d.ts +2 -2
- package/dist/types/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/types/components/Navbar/MobileNavbar.d.ts +2 -2
- package/dist/types/components/Navbar/index.d.ts +2 -2
- package/dist/types/components/Navbar/index.d.ts.map +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +4 -4
- package/dist/types/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/components/Pagination/pagination.content.d.ts +12 -12
- package/dist/types/components/RightDrawer/rightDrawer.content.d.ts +5 -5
- package/dist/types/components/RightDrawer/useRightDrawerStore.d.ts +2 -2
- package/dist/types/components/Select/Select.d.ts +3 -3
- package/dist/types/components/Select/Select.d.ts.map +1 -1
- package/dist/types/components/SwitchSelector/index.d.ts +5 -5
- package/dist/types/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/types/components/Tab/Tab.d.ts +6 -6
- package/dist/types/components/Tab/Tab.d.ts.map +1 -1
- package/dist/types/components/Tab/TabContext.d.ts +2 -2
- package/dist/types/components/Tab/TabContext.d.ts.map +1 -1
- package/dist/types/components/TabSelector/TabSelector.d.ts +5 -5
- package/dist/types/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/types/components/Table/table.content.d.ts +3 -3
- package/dist/types/components/Tag/index.d.ts +5 -5
- package/dist/types/components/Tag/index.d.ts.map +1 -1
- package/dist/types/components/Terminal/terminal.content.d.ts +5 -5
- package/dist/types/components/Terminal/terminal.content.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toast.d.ts +2 -2
- package/dist/types/components/Toaster/Toast.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toaster.d.ts +2 -2
- package/dist/types/components/Toaster/Toaster.d.ts.map +1 -1
- package/dist/types/hooks/useDevice.d.ts.map +1 -1
- package/dist/types/hooks/useScrollBlockage/useScrollBlockageStore.d.ts +2 -2
- package/package.json +31 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useItemSelector.mjs","names":[
|
|
1
|
+
{"version":3,"file":"useItemSelector.mjs","names":[],"sources":["../../../src/hooks/useItemSelector.ts"],"sourcesContent":["'use client';\n\nimport { type RefObject, useEffect, useRef, useState } from 'react';\n\nexport type ItemSelectorOrientation = 'horizontal' | 'vertical';\n\ntype HorizontalStyleState = {\n left: number;\n width: number;\n opacity: number;\n};\n\ntype VerticalStyleState = {\n top: number;\n height: number;\n opacity: number;\n};\n\ntype StyleState = HorizontalStyleState | VerticalStyleState;\n\nconst selectorDefault = (option: HTMLElement) =>\n option?.getAttribute('aria-selected') === 'true';\n\ntype Options = {\n selector?: (option: HTMLElement, index: number) => boolean;\n isHoverable?: boolean;\n orientation?: ItemSelectorOrientation;\n};\n\nexport const useItemSelector = (\n optionsRefs: RefObject<HTMLElement[]>,\n {\n selector = selectorDefault,\n isHoverable = false,\n orientation = 'horizontal',\n }: Options = {\n selector: selectorDefault,\n isHoverable: false,\n orientation: 'horizontal',\n }\n) => {\n const [choiceIndicatorPosition, setChoiceIndicatorPosition] =\n useState<StyleState | null>(null);\n\n const [hoveredItem, setHoveredItem] = useState<HTMLElement | null>(null);\n const hideTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n const lastPositionRef = useRef<StyleState | null>(null);\n\n const itemsLength = optionsRefs.current.length;\n\n const calculatePosition = () => {\n let targetElement: HTMLElement | null = null;\n\n if (hoveredItem) {\n targetElement = hoveredItem;\n // Clear any pending hide timeout when hovering over an item\n if (hideTimeoutRef.current) {\n clearTimeout(hideTimeoutRef.current);\n hideTimeoutRef.current = null;\n }\n } else {\n targetElement = optionsRefs.current.find(selector) ?? null;\n }\n\n if (!targetElement) {\n // Keep previous position but set opacity to 0\n if (orientation === 'vertical') {\n setChoiceIndicatorPosition((prev) => {\n const verticalPrev = prev as VerticalStyleState | null;\n const newPosition: VerticalStyleState = {\n top: verticalPrev?.top ?? 0,\n height: verticalPrev?.height ?? 0,\n opacity: 0,\n };\n lastPositionRef.current = newPosition;\n return newPosition;\n });\n } else {\n setChoiceIndicatorPosition((prev) => {\n const horizontalPrev = prev as HorizontalStyleState | null;\n const newPosition: HorizontalStyleState = {\n left: horizontalPrev?.left ?? 0,\n width: horizontalPrev?.width ?? 0,\n opacity: 0,\n };\n lastPositionRef.current = newPosition;\n return newPosition;\n });\n }\n return;\n }\n\n if (orientation === 'vertical') {\n const top = targetElement.offsetTop;\n const height = targetElement.offsetHeight;\n\n const newPosition = {\n top,\n height,\n opacity: 1,\n };\n setChoiceIndicatorPosition(newPosition);\n lastPositionRef.current = newPosition;\n } else {\n const left = targetElement.offsetLeft;\n const width = targetElement.offsetWidth;\n\n const newPosition = {\n left,\n width,\n opacity: 1,\n };\n setChoiceIndicatorPosition(newPosition);\n lastPositionRef.current = newPosition;\n }\n };\n\n useEffect(() => {\n calculatePosition();\n\n // Event listeners for window events\n window.addEventListener('resize', calculatePosition);\n window.addEventListener('DOMContentLoaded', calculatePosition);\n\n // MutationObserver to watch for 'aria-selected' changes\n const mutationObservers: MutationObserver[] = [];\n\n optionsRefs.current.forEach((option) => {\n if (option) {\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (\n mutation.type === 'attributes' &&\n mutation.attributeName === 'aria-selected'\n ) {\n calculatePosition();\n break;\n }\n }\n });\n\n observer.observe(option, {\n attributes: true,\n attributeFilter: ['aria-selected'],\n });\n\n mutationObservers.push(observer);\n }\n });\n\n // ResizeObserver to watch for size changes\n const resizeObservers: ResizeObserver[] = [];\n\n const observeSize = (element: HTMLElement) => {\n if (!element) return;\n const resizeObserver = new ResizeObserver(() => {\n calculatePosition();\n });\n resizeObserver.observe(element);\n resizeObservers.push(resizeObserver);\n };\n\n // Observe the selected item\n const selectedItem = optionsRefs.current.find(selector) ?? null;\n\n if (selectedItem) {\n observeSize(selectedItem);\n }\n\n // Observe the hovered item\n if (hoveredItem) {\n observeSize(hoveredItem);\n }\n\n // Add hover event listeners\n const handleMouseEnter = (event: Event) => {\n // Clear any pending hide timeout\n if (hideTimeoutRef.current) {\n clearTimeout(hideTimeoutRef.current);\n hideTimeoutRef.current = null;\n }\n setHoveredItem(event.currentTarget as HTMLElement);\n };\n\n const handleMouseLeave = () => {\n // Clear any existing timeout\n if (hideTimeoutRef.current) {\n clearTimeout(hideTimeoutRef.current);\n }\n\n // Keep the indicator at its current position for 150ms\n // before removing the hovered item\n hideTimeoutRef.current = setTimeout(() => {\n setHoveredItem(null);\n }, 150); // 150ms delay before hiding\n };\n\n if (isHoverable) {\n optionsRefs.current.forEach((option) => {\n option?.addEventListener('mouseenter', handleMouseEnter, {\n passive: true,\n });\n option?.addEventListener('mouseleave', handleMouseLeave, {\n passive: true,\n });\n });\n }\n\n return () => {\n // Clear any pending hide timeout\n if (hideTimeoutRef.current) {\n clearTimeout(hideTimeoutRef.current);\n }\n\n // Cleanup window event listeners\n window.removeEventListener('resize', calculatePosition);\n window.removeEventListener('DOMContentLoaded', calculatePosition);\n\n // Disconnect MutationObservers\n mutationObservers.forEach((observer) => {\n observer.disconnect();\n });\n\n // Disconnect ResizeObservers\n resizeObservers.forEach((observer) => {\n observer.disconnect();\n });\n\n // Remove hover event listeners\n optionsRefs.current.forEach((option) => {\n option?.removeEventListener('mouseenter', handleMouseEnter);\n option?.removeEventListener('mouseleave', handleMouseLeave);\n });\n };\n }, [optionsRefs, selector, hoveredItem, itemsLength, orientation]);\n\n return { choiceIndicatorPosition, calculatePosition, orientation };\n};\n"],"mappings":";;;;;AAoBA,MAAM,mBAAmB,WACvB,QAAQ,aAAa,gBAAgB,KAAK;AAQ5C,MAAa,mBACX,aACA,EACE,WAAW,iBACX,cAAc,OACd,cAAc,iBACH;CACX,UAAU;CACV,aAAa;CACb,aAAa;CACd,KACE;CACH,MAAM,CAAC,yBAAyB,8BAC9B,SAA4B,KAAK;CAEnC,MAAM,CAAC,aAAa,kBAAkB,SAA6B,KAAK;CACxE,MAAM,iBAAiB,OAA8B,KAAK;CAC1D,MAAM,kBAAkB,OAA0B,KAAK;CAEvD,MAAM,cAAc,YAAY,QAAQ;CAExC,MAAM,0BAA0B;EAC9B,IAAI,gBAAoC;AAExC,MAAI,aAAa;AACf,mBAAgB;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":[],"sources":["../../../src/hooks/usePersistedStore.ts"],"sourcesContent":["'use client';\n\nimport {\n type Dispatch,\n type SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nexport const usePersistedStore = <S>(\n key: string,\n initialState?: S | (() => S)\n): [S, Dispatch<SetStateAction<S>>, () => void, () => void] => {\n const [state, setState] = useState<S>(() => {\n // If you have an initial value on the client, send a message out immediately\n if (initialState !== undefined) {\n const result: S =\n typeof initialState === 'function'\n ? (initialState as () => S)()\n : initialState;\n\n if (typeof window === 'undefined') return result;\n\n const persistedState = localStorage?.getItem(key);\n\n if (persistedState) {\n try {\n return JSON.parse(persistedState);\n } catch (e) {\n console.error(e);\n }\n }\n\n return result;\n }\n\n return undefined as S;\n });\n\n useEffect(() => {\n const persistedState = localStorage?.getItem(key);\n\n if (\n persistedState &&\n persistedState !== 'undefined' &&\n state === undefined\n ) {\n try {\n setState(JSON.parse(persistedState));\n } catch (e) {\n console.error(e);\n }\n } else if (initialState !== undefined && state === undefined) {\n setState(initialState);\n }\n }, [key, state]);\n\n /**\n * Allows setting state either directly or via a functional update.\n * If passed a function, we merge/update based on the previous state.\n */\n const setStateWrapper: typeof setState = useCallback(\n (valueOrUpdater: SetStateAction<S>) => {\n setState((prev) => {\n const newValue: S =\n typeof valueOrUpdater === 'function'\n ? (valueOrUpdater as (prevVal: S) => S)(prev)\n : valueOrUpdater;\n\n if (newValue !== 'undefined') {\n localStorage?.setItem(key, JSON.stringify(newValue));\n return newValue;\n }\n\n return prev;\n });\n },\n [key, setState]\n );\n\n const loadState = useCallback(() => {\n const savedState = localStorage?.getItem(key);\n if (savedState) {\n setState(JSON.parse(savedState));\n }\n }, [key, setState]);\n\n const clearState = useCallback(() => {\n localStorage?.removeItem(key);\n setState(undefined as S);\n }, [key]);\n\n return useMemo(\n () => [state, setStateWrapper, loadState, clearState],\n [state, setStateWrapper, loadState, clearState]\n );\n};\n"],"mappings":";;;;;AAWA,MAAa,qBACX,KACA,iBAC6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file":"useScrollY.mjs","names":["scrollY","scrollHeight","clientHeight","scrollYMax","scrollPercentage"],"sources":["../../../src/hooks/useScrollY.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useSyncExternalStore } from 'react';\nimport { useGetElementOrWindow } from './useGetElementOrWindow';\n\ntype UseScrollYProps = {\n element?: HTMLElement;\n};\n\ntype UseScrollYResult = {\n scrollY: number;\n scrollPercentage: number;\n scrollYMax: number;\n};\n\nconst INITIAL_SCROLL_STATE: UseScrollYResult = {\n scrollY: 0,\n scrollPercentage: 0,\n scrollYMax: 0,\n};\n\nlet lastSnapshot: UseScrollYResult = INITIAL_SCROLL_STATE;\n\nexport const useScrollY = (props?: UseScrollYProps): UseScrollYResult => {\n const { element } = props ?? {};\n\n const containerElement = useGetElementOrWindow(element);\n\n const subscribe = useCallback(\n (onChange: () => void) => {\n if (typeof window === 'undefined' || !containerElement) return () => {};\n let raf = 0;\n\n const handler = () => {\n if (raf) return;\n raf = window.requestAnimationFrame(() => {\n raf = 0;\n onChange();\n });\n };\n\n containerElement.addEventListener('scroll', handler, { passive: true });\n\n return () => {\n containerElement.removeEventListener('scroll', handler);\n if (raf) window.cancelAnimationFrame(raf);\n };\n },\n [containerElement]\n );\n\n const getSnapshot = (): UseScrollYResult => {\n if (typeof window === 'undefined' || !containerElement) {\n return INITIAL_SCROLL_STATE; // SSR/hydration-safe\n }\n\n // Handle custom element\n if (containerElement instanceof HTMLElement) {\n const scrollY = containerElement.scrollTop;\n const scrollHeight = containerElement.scrollHeight;\n const clientHeight = containerElement.clientHeight;\n const scrollYMax = Math.max(0, scrollHeight - clientHeight);\n const scrollPercentage = scrollYMax > 0 ? scrollY / scrollYMax : 0;\n\n if (\n lastSnapshot.scrollY === scrollY &&\n lastSnapshot.scrollPercentage === scrollPercentage &&\n lastSnapshot.scrollYMax === scrollYMax\n ) {\n return lastSnapshot;\n }\n\n lastSnapshot = { scrollY, scrollPercentage, scrollYMax };\n return lastSnapshot;\n }\n\n // Handle window\n const doc = document.documentElement;\n const body = document.body;\n\n const scrollY =\n window.scrollY ??\n window.pageYOffset ??\n doc?.scrollTop ??\n body?.scrollTop ??\n 0;\n\n const scrollHeight = doc?.scrollHeight ?? body?.scrollHeight ?? 0;\n const clientHeight = doc?.clientHeight ?? window.innerHeight ?? 0;\n const scrollYMax = Math.max(0, scrollHeight - clientHeight);\n const scrollPercentage = scrollYMax > 0 ? scrollY / scrollYMax : 0;\n\n if (\n lastSnapshot.scrollY === scrollY &&\n lastSnapshot.scrollPercentage === scrollPercentage &&\n lastSnapshot.scrollYMax === scrollYMax\n ) {\n return lastSnapshot;\n }\n\n lastSnapshot = { scrollY, scrollPercentage, scrollYMax };\n return lastSnapshot;\n };\n\n const getServerSnapshot = (): UseScrollYResult => INITIAL_SCROLL_STATE;\n\n return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n};\n"],"mappings":";;;;;;AAeA,MAAM,uBAAyC;CAC7C,SAAS;CACT,kBAAkB;CAClB,YAAY;CACb;AAED,IAAI,eAAiC;AAErC,MAAa,cAAc,UAA8C;CACvE,MAAM,EAAE,YAAY,SAAS,EAAE;CAE/B,MAAM,mBAAmB,sBAAsB,QAAQ;CAEvD,MAAM,YAAY,aACf,aAAyB;AACxB,MAAI,OAAO,WAAW,eAAe,CAAC,iBAAkB,cAAa;EACrE,IAAI,MAAM;EAEV,MAAM,gBAAgB;AACpB,OAAI,IAAK;AACT,SAAM,OAAO,4BAA4B;AACvC,UAAM;AACN,cAAU;KACV;;AAGJ,mBAAiB,iBAAiB,UAAU,SAAS,EAAE,SAAS,MAAM,CAAC;AAEvE,eAAa;AACX,oBAAiB,oBAAoB,UAAU,QAAQ;AACvD,OAAI,IAAK,QAAO,qBAAqB,IAAI;;IAG7C,CAAC,iBAAiB,CACnB;CAED,MAAM,oBAAsC;AAC1C,MAAI,OAAO,WAAW,eAAe,CAAC,iBACpC,QAAO;AAIT,MAAI,4BAA4B,aAAa;GAC3C,MAAMA,YAAU,iBAAiB;GACjC,MAAMC,iBAAe,iBAAiB;GACtC,MAAMC,iBAAe,iBAAiB;GACtC,MAAMC,eAAa,KAAK,IAAI,GAAGF,iBAAeC,eAAa;GAC3D,MAAME,qBAAmBD,eAAa,IAAIH,YAAUG,eAAa;AAEjE,OACE,aAAa,YAAYH,aACzB,aAAa,qBAAqBI,sBAClC,aAAa,eAAeD,aAE5B,QAAO;AAGT,kBAAe;IAAE;IAAS;IAAkB;IAAY;AACxD,UAAO;;EAIT,MAAM,MAAM,SAAS;EACrB,MAAM,OAAO,SAAS;EAEtB,MAAM,UACJ,OAAO,WACP,OAAO,eACP,KAAK,aACL,MAAM,aACN;EAEF,MAAM,eAAe,KAAK,gBAAgB,MAAM,gBAAgB;EAChE,MAAM,eAAe,KAAK,gBAAgB,OAAO,eAAe;EAChE,MAAM,aAAa,KAAK,IAAI,GAAG,eAAe,aAAa;EAC3D,MAAM,mBAAmB,aAAa,IAAI,UAAU,aAAa;AAEjE,MACE,aAAa,YAAY,WACzB,aAAa,qBAAqB,oBAClC,aAAa,eAAe,WAE5B,QAAO;AAGT,iBAAe;GAAE;GAAS;GAAkB;GAAY;AACxD,SAAO;;CAGT,MAAM,0BAA4C;AAElD,QAAO,qBAAqB,WAAW,aAAa,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.mjs","names":["signInEmail: AuthClient['signIn']['email']","signInSocial: AuthClient['signIn']['social']","signUpEmail: AuthClient['signUp']['email']","signOut: AuthClient['signOut']","changePasswordSession: AuthClient['changePassword']","requestPasswordResetSession: AuthClient['requestPasswordReset']","resetPassword: AuthClient['resetPassword']","verifyEmailSession: AuthClient['verifyEmail']","getSession: AuthClient['getSession']","forgetPassword: AuthClient['requestPasswordReset']","sendVerificationEmail: AuthClient['sendVerificationEmail']","changeEmail: AuthClient['changeEmail']","deleteUser: AuthClient['deleteUser']","revokeSession: AuthClient['revokeSession']","revokeSessions: AuthClient['revokeSessions']","revokeOtherSessions: AuthClient['revokeOtherSessions']","linkSocial: AuthClient['linkSocial']","listAccounts: AuthClient['listAccounts']","unlinkAccount: AuthClient['unlinkAccount']","refreshToken: AuthClient['refreshToken']","getAccessToken: AuthClient['getAccessToken']","accountInfo: AuthClient['accountInfo']","updateUser: AuthClient['updateUser']","listSessions: AuthClient['listSessions']","enableTwoFactor: AuthClient['twoFactor']['enable']","disableTwoFactor: AuthClient['twoFactor']['disable']","verifyTotp: AuthClient['twoFactor']['verifyTotp']","verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode']","addPasskey: AuthClient['passkey']['addPasskey']","signInPasskey: AuthClient['signIn']['passkey']","deletePasskey: AuthClient['passkey']['deletePasskey']","signInMagicLink: any","signInSSO: AuthClient['signIn']['sso']","registerSSO: AuthClient['sso']['register']"],"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 type { IntlayerConfig } from '@intlayer/types';\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 const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\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":";;;;;;;AAOA,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;AACJ,UAAO,SAAS,OAAO;KAE1B,CAAC;EACF,eAAe;EACf,iBAAiB;EACjB,WAAW;EACZ;CACF,CAAC;AAgDJ,MAAa,cAAc,mBAA6C;CACtE,MAAM,aACJ,gBAAgB,QAAQ,cAAc,eAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,SAAS,cAAc,WAAW;CAExC,MAAMA,cAA6C,OAAO,GAAG,SAAS;AACpE,SAAO,OAAO,OAAO,MAAM,GAAG,KAAK;;CAGrC,MAAMC,eAA+C,OAAO,GAAG,SAAS;AACtE,SAAO,OAAO,OAAO,OAAO,GAAG,KAAK;;CAGtC,MAAMC,cAA6C,OAAO,GAAG,SAAS;AACpE,SAAO,OAAO,OAAO,MAAM,GAAG,KAA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IAAI,GAAG,KAAK;;CAGnC,MAAMC,cAA6C,OAAO,GAAG,SAAS;AACpE,SAAO,OAAO,IAAI,SAAS,GAAG,KAAK;;CAGrC,MAAM,mBAAmB,YAAY;CAIrC,MAAM,oBAAoB,OAAO,SAAiC;AAIlE,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 configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\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 const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\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":";;;;;;;AAOA,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;AACJ,UAAO,SAAS,OAAO;KAE1B,CAAC;EACF,eAAe;EACf,iBAAiB;EACjB,WAAW;EACZ;CACF,CAAC;AAgDJ,MAAa,cAAc,mBAA6C;CACtE,MAAM,aACJ,gBAAgB,QAAQ,cAAc,eAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,SAAS,cAAc,WAAW;CAExC,MAAM,cAA6C,OAAO,GAAG,SAAS;AACpE,SAAO,OAAO,OAAO,MAAM,GAAG,KAAK;;CAGrC,MAAM,eAA+C,OAAO,GAAG,SAAS;AACtE,SAAO,OAAO,OAAO,OAAO,GAAG,KAAK;;CAGtC,MAAM,cAA6C,OAAO,GAAG,SAAS;AACpE,SAAO,OAAO,OAAO,MAAM,GAAG,KAAK;;CAGrC,MAAM,UAAiC,OAAO,GAAG,SAAS;AACxD,SAAO,OAAO,Q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K;;CAGrC,MAAM,mBAAmB,YAAY;CAIrC,MAAM,oBAAoB,OAAO,SAAiC;AAIlE,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactQueryProvider.mjs","names":[
|
|
1
|
+
{"version":3,"file":"ReactQueryProvider.mjs","names":[],"sources":["../../../src/providers/ReactQueryProvider.tsx"],"sourcesContent":["'use client';\n\nimport {\n type DefaultOptions,\n MutationCache,\n QueryClient,\n QueryClientProvider,\n type QueryKey,\n type UseMutationOptions,\n} from '@tanstack/react-query';\nimport { type FC, type PropsWithChildren, useRef } from 'react';\nimport { useToast } from '../components/Toaster';\n\nconst defaultQueryOptions: DefaultOptions = {\n queries: {\n retry: 1,\n // Keep data fresh for 30 seconds to avoid unnecessary refetches during navigation\n staleTime: 30 * 1000,\n // Give the cache a little breathing room across route transitions:\n gcTime: 5 * 60 * 1000, // e.g. 5 minutes\n // Only refetch on mount if data is stale (not every single mount)\n refetchOnMount: true,\n refetchOnWindowFocus: false,\n refetchOnReconnect: false,\n },\n mutations: {\n retry: 0,\n },\n};\n\ndeclare module '@tanstack/react-query' {\n interface Register {\n mutationMeta: {\n onSuccess?: UseMutationOptions['onSuccess'];\n onError?: UseMutationOptions['onError'];\n invalidateQueries?: QueryKey[];\n resetQueries?: QueryKey[];\n };\n }\n}\n\nconst formatErrorCode = (errorCode: string) => errorCode.split('_').join(' ');\n\n/**\n * Hook to handle error logging and toast notifications\n */\nconst useToastEvents = () => {\n const { toast } = useToast();\n\n const onError: MutationCache['config']['onError'] = (error: any) => {\n const parsed = (() => {\n try {\n if (typeof error === 'string') return JSON.parse(error);\n } catch (_) {}\n return error;\n })();\n\n [parsed].flat().forEach((err: any) => {\n // Check for nested error object (standard in your API responses: { statusCode, error: { ... } })\n const apiError = err?.error ?? err;\n\n toast({\n title: formatErrorCode(\n (process.env.NODE_ENV === 'production'\n ? (apiError?.title ?? err?.title)\n : (apiError?.code ?? err?.code)) ?? 'Error'\n ),\n description:\n apiError?.message ??\n err?.message ??\n String(apiError ?? 'An error occurred'),\n variant: 'error',\n });\n });\n };\n\n const onSuccess: MutationCache['config']['onSuccess'] = (data: any) => {\n if (data?.error) {\n toast({\n title: formatErrorCode(data.error.title ?? data.error.code ?? 'Error'),\n description:\n data.error.message ?? data.error.code ?? 'An error occurred',\n variant: 'error',\n });\n }\n\n if (data?.message) {\n toast({\n title: data.message,\n description: data.description,\n variant: 'success',\n });\n }\n };\n\n return {\n onError,\n onSuccess,\n };\n};\n\nexport const ReactQueryProvider: FC<PropsWithChildren> = ({ children }) => {\n const { onError, onSuccess } = useToastEvents();\n const clientRef = useRef<QueryClient>(null);\n\n if (!clientRef.current) {\n const mutationCache = new MutationCache({\n onSuccess,\n onError,\n onSettled: (_data, _error, _variables, _context, mutation) => {\n if (mutation.meta?.invalidateQueries) {\n mutation.meta.invalidateQueries.forEach((queryKey) => {\n queryClient.invalidateQueries({\n queryKey,\n });\n });\n }\n\n if (mutation.meta?.resetQueries) {\n mutation.meta.resetQueries.forEach((queryKey) => {\n queryClient.resetQueries({\n queryKey,\n });\n });\n }\n },\n });\n\n const queryClient = new QueryClient({\n defaultOptions: defaultQueryOptions,\n mutationCache,\n });\n clientRef.current = queryClient;\n }\n\n return (\n <QueryClientProvider client={clientRef.current}>\n {children}\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;AAaA,MAAM,sBAAsC;CAC1C,SAAS;EACP,OAAO;EAEP,WAAW,KAAK;EAEhB,QAAQ,MAAS;EAEjB,gBAAgB;EAChB,sBAAsB;EACtB,oBAAoB;EACrB;CACD,WAAW,EACT,OAAO,GACR;CACF;AAaD,MAAM,mBAAmB,cAAsB,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AC/C,kBAAY,aAAa,EACvB,UACD,CAAC;OACF;;IAGP,CAAC;GAKD,CAAC;AACF,YAAU,UAAU;;AAGtB,QACE,oBAAC;EAAoB,QAAQ,UAAU;EACpC;GACmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.mjs","names":[
|
|
1
|
+
{"version":3,"file":"object.mjs","names":[],"sources":["../../../src/utils/object.ts"],"sourcesContent":["/**\n * Rename a key in an object by keeping the element order\n *\n * @param obj The original object\n * @param oldKey The key in the object that needs to be renamed\n * @param newKey The new key name to replace the old key\n * @returns A new object with the renamed key\n */\nexport const renameKey = <T extends object>(\n obj: T,\n oldKey: keyof T,\n newKey: string\n): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Iterate over all keys of the original object\n for (const key of Object.keys(obj)) {\n // Check if the current key is the one that needs to be renamed\n if (key === (oldKey as string)) {\n // Assign the value of the old key to the new key in newObj\n newObj[newKey as keyof T] = obj[oldKey];\n // Optionally, delete the old key from newObj if you don't want both keys\n delete newObj[oldKey];\n } else {\n // For all other keys, ensure they are copied over correctly\n newObj[key as keyof T] = obj[key as keyof T];\n }\n }\n // Return the new object with the renamed key\n return newObj;\n};\n\n/**\n * Remove a key from an object\n *\n * @param obj The original object\n * @param key The key in the object that needs to be removed\n * @returns A new object without the specified key\n */\nexport const removeKey = <T extends object>(obj: T, key: keyof T): T => {\n // Create a shallow copy of the original object to avoid mutating it\n const newObj: T = { ...obj };\n\n // Delete the key from the object\n delete newObj[key];\n\n return newObj;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,aACX,KACA,QACA,WACM;CAEN,MAAM,SAAY,EAAE,GAAG,KAAK;AAG5B,MAAK,MAAM,OAAO,OAAO,KAAK,IAAI,CAEhC,KAAI,QAAS,QAAmB;AAE9B,SAAO,UAAqB,IAAI;AAEhC,SAAO,OAAO;OAGd,QAAO,OAAkB,IAAI;AAIjC,QAAO;;;;;;;;;AAUT,MAAa,aAA+B,KAAQ,QAAoB;CAEtE,MAAM,SAAY,EAAE,GAAG,KAAK;AAG5B,QAAO,OAAO;AAEd,QAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as class_variance_authority_types9 from "class-variance-authority/types";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Badge/index.d.ts
|
|
@@ -47,7 +47,7 @@ declare const badgeVariants: (props?: {
|
|
|
47
47
|
color?: BadgeColor;
|
|
48
48
|
variant?: BadgeVariant;
|
|
49
49
|
size?: BadgeSize;
|
|
50
|
-
} &
|
|
50
|
+
} & class_variance_authority_types9.ClassProp) => string;
|
|
51
51
|
/**
|
|
52
52
|
* Badge component props interface
|
|
53
53
|
* @description Comprehensive props for the Badge component with accessibility and interactive features
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types379 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Breadcrumb/breadcrumb.content.d.ts
|
|
4
4
|
declare const breadCrumbContent: {
|
|
5
5
|
key: string;
|
|
6
6
|
content: {
|
|
7
|
-
linkLabel:
|
|
7
|
+
linkLabel: _intlayer_types379.TypedNodeModel<_intlayer_types379.NodeType.Translation, {
|
|
8
8
|
en: string;
|
|
9
9
|
fr: string;
|
|
10
10
|
es: string;
|
|
@@ -24,7 +24,7 @@ declare const breadCrumbContent: {
|
|
|
24
24
|
vi: string;
|
|
25
25
|
uk: string;
|
|
26
26
|
}, {
|
|
27
|
-
nodeType:
|
|
27
|
+
nodeType: "translation" | _intlayer_types379.NodeType.Translation;
|
|
28
28
|
} & {
|
|
29
29
|
translation: {
|
|
30
30
|
en: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.content.d.ts","names":[],"sources":["../../../../src/components/Breadcrumb/breadcrumb.content.ts"],"sourcesContent":[],"mappings":";;;cAEa;;;IAAA,SAAA,
|
|
1
|
+
{"version":3,"file":"breadcrumb.content.d.ts","names":[],"sources":["../../../../src/components/Breadcrumb/breadcrumb.content.ts"],"sourcesContent":[],"mappings":";;;cAEa;;;IAAA,SAAA,mCA4BS,0CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LinkColor } from "../Link/Link.js";
|
|
2
2
|
import "../Link/index.js";
|
|
3
3
|
import { FC, HTMLAttributes, ReactNode } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types11 from "class-variance-authority/types";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
6
|
import { LocalesValues } from "@intlayer/types";
|
|
7
7
|
|
|
@@ -12,7 +12,7 @@ import { LocalesValues } from "@intlayer/types";
|
|
|
12
12
|
declare const breadcrumbVariants: (props?: {
|
|
13
13
|
size?: "small" | "medium" | "large";
|
|
14
14
|
spacing?: "compact" | "normal" | "loose";
|
|
15
|
-
} &
|
|
15
|
+
} & class_variance_authority_types11.ClassProp) => string;
|
|
16
16
|
/**
|
|
17
17
|
* Detailed breadcrumb link configuration with optional href or onClick
|
|
18
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;cA2EM,0BAgKgC;EAhKhC,IAAA,CAAA,EAAA,OAAA,GAAA,QAiBJ,GAAA,OAAA;EA2HG,OAAA,CAAA,EAAA,SAAA,GAAA,QAAsB,GAAA,OAAA;AAoB3B,CAAA,GA/IE
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;cA2EM,0BAgKgC;EAhKhC,IAAA,CAAA,EAAA,OAAA,GAAA,QAiBJ,GAAA,OAAA;EA2HG,OAAA,CAAA,EAAA,SAAA,GAAA,QAAsB,GAAA,OAAA;AAoB3B,CAAA,GA/IE,gCAAA,CAAA,SA+IoC,EAAA,GAAsB,MAAA;AAE5D;;;KAtBK,sBAAA,GA+BoB;EAId;;;EAyBP,IAAA,CAAA,EAAA,MAAA;EACa;;;EA4BJ,IAAA,EAAA,MAAA;;;;;;;;;;;KArED,cAAA,YAA0B;KAE1B,eAAA;;;;SAIH;;;;;UAKC,eAAe;;;;WAId;;;;;;;;;;cAUG;;;;;;;;;;;;;;;IAeV,oBAAoB,sBACtB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BJ,YAAY,GAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, HTMLAttributes, RefObject } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Browser/Browser.d.ts
|
|
5
5
|
type BrowserProps = {
|
|
@@ -24,7 +24,7 @@ declare const Browser: ({
|
|
|
24
24
|
ref,
|
|
25
25
|
domainRestriction,
|
|
26
26
|
...props
|
|
27
|
-
}: BrowserProps) =>
|
|
27
|
+
}: BrowserProps) => react_jsx_runtime18.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { Browser, BrowserProps };
|
|
30
30
|
//# sourceMappingURL=Browser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Browser.d.ts","names":[],"sources":["../../../../src/components/Browser/Browser.tsx"],"sourcesContent":[],"mappings":";;;;KAkBY,YAAA;;;EAAA,SAAA,CAAA,EAAA,MAAY;EAId,KAAA,CAAA,EAAA,aAAA;EAIQ,IAAA,CAAA,EAAA,IAAA,GAAA,IAAA,GAAA,IAAA,GAAA,IAAA,GAAA,IAAA;EAAV,YAAA,CAAA,EAAA,MAAA;EAEW,OAAA,CAAA,EAAA,MAAA;EAAf,GAAA,CAAA,EAFI,SAEJ,CAFc,iBAEd,GAAA,IAAA,CAAA;EAAc,iBAAA,CAAA,EAAA,MAAA;AAElB,CAAA,GAFI,cAqVH,CArVkB,iBAqVlB,CAAA;AAnVuB,cAAX,OAAW,EAAA,CAAA;EAAA,UAAA;EAAA,IAAA;EAAA,SAAA;EAAA,KAAA;EAAA,IAAA;EAAA,YAAA,EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;EAAA,iBAAA;EAAA,GAAA;AAAA,CAAA,EAWrB,YAXqB,EAAA,GAWT,
|
|
1
|
+
{"version":3,"file":"Browser.d.ts","names":[],"sources":["../../../../src/components/Browser/Browser.tsx"],"sourcesContent":[],"mappings":";;;;KAkBY,YAAA;;;EAAA,SAAA,CAAA,EAAA,MAAY;EAId,KAAA,CAAA,EAAA,aAAA;EAIQ,IAAA,CAAA,EAAA,IAAA,GAAA,IAAA,GAAA,IAAA,GAAA,IAAA,GAAA,IAAA;EAAV,YAAA,CAAA,EAAA,MAAA;EAEW,OAAA,CAAA,EAAA,MAAA;EAAf,GAAA,CAAA,EAFI,SAEJ,CAFc,iBAEd,GAAA,IAAA,CAAA;EAAc,iBAAA,CAAA,EAAA,MAAA;AAElB,CAAA,GAFI,cAqVH,CArVkB,iBAqVlB,CAAA;AAnVuB,cAAX,OAAW,EAAA,CAAA;EAAA,UAAA;EAAA,IAAA;EAAA,SAAA;EAAA,KAAA;EAAA,IAAA;EAAA,YAAA,EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;EAAA,iBAAA;EAAA,GAAA;AAAA,CAAA,EAWrB,YAXqB,EAAA,GAWT,mBAAA,CAAA,GAAA,CAAA,OAXS"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types331 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Browser/browser.content.d.ts
|
|
4
4
|
declare const browserContent: {
|
|
5
5
|
key: string;
|
|
6
6
|
content: {
|
|
7
|
-
ariaLabel:
|
|
7
|
+
ariaLabel: _intlayer_types331.TypedNodeModel<_intlayer_types331.NodeType.Translation, {
|
|
8
8
|
en: string;
|
|
9
9
|
'en-GB': string;
|
|
10
10
|
fr: string;
|
|
@@ -24,7 +24,7 @@ declare const browserContent: {
|
|
|
24
24
|
vi: string;
|
|
25
25
|
uk: string;
|
|
26
26
|
}, {
|
|
27
|
-
nodeType:
|
|
27
|
+
nodeType: "translation" | _intlayer_types331.NodeType.Translation;
|
|
28
28
|
} & {
|
|
29
29
|
translation: {
|
|
30
30
|
en: string;
|
|
@@ -47,7 +47,7 @@ declare const browserContent: {
|
|
|
47
47
|
uk: string;
|
|
48
48
|
};
|
|
49
49
|
}>;
|
|
50
|
-
urlLabel:
|
|
50
|
+
urlLabel: _intlayer_types331.TypedNodeModel<_intlayer_types331.NodeType.Translation, {
|
|
51
51
|
en: string;
|
|
52
52
|
'en-GB': string;
|
|
53
53
|
fr: string;
|
|
@@ -67,7 +67,7 @@ declare const browserContent: {
|
|
|
67
67
|
vi: string;
|
|
68
68
|
uk: string;
|
|
69
69
|
}, {
|
|
70
|
-
nodeType:
|
|
70
|
+
nodeType: "translation" | _intlayer_types331.NodeType.Translation;
|
|
71
71
|
} & {
|
|
72
72
|
translation: {
|
|
73
73
|
en: string;
|
|
@@ -91,7 +91,7 @@ declare const browserContent: {
|
|
|
91
91
|
};
|
|
92
92
|
}>;
|
|
93
93
|
urlPlaceholder: string;
|
|
94
|
-
errorMessage:
|
|
94
|
+
errorMessage: _intlayer_types331.TypedNodeModel<_intlayer_types331.NodeType.Translation, {
|
|
95
95
|
en: string;
|
|
96
96
|
'en-GB': string;
|
|
97
97
|
fr: string;
|
|
@@ -111,7 +111,7 @@ declare const browserContent: {
|
|
|
111
111
|
vi: string;
|
|
112
112
|
uk: string;
|
|
113
113
|
}, {
|
|
114
|
-
nodeType:
|
|
114
|
+
nodeType: "translation" | _intlayer_types331.NodeType.Translation;
|
|
115
115
|
} & {
|
|
116
116
|
translation: {
|
|
117
117
|
en: string;
|
|
@@ -134,7 +134,7 @@ declare const browserContent: {
|
|
|
134
134
|
uk: string;
|
|
135
135
|
};
|
|
136
136
|
}>;
|
|
137
|
-
domainRestrictionError:
|
|
137
|
+
domainRestrictionError: _intlayer_types331.TypedNodeModel<_intlayer_types331.NodeType.Translation, {
|
|
138
138
|
en: string;
|
|
139
139
|
'en-GB': string;
|
|
140
140
|
fr: string;
|
|
@@ -154,7 +154,7 @@ declare const browserContent: {
|
|
|
154
154
|
vi: string;
|
|
155
155
|
uk: string;
|
|
156
156
|
}, {
|
|
157
|
-
nodeType:
|
|
157
|
+
nodeType: "translation" | _intlayer_types331.NodeType.Translation;
|
|
158
158
|
} & {
|
|
159
159
|
translation: {
|
|
160
160
|
en: string;
|
|
@@ -177,7 +177,7 @@ declare const browserContent: {
|
|
|
177
177
|
uk: string;
|
|
178
178
|
};
|
|
179
179
|
}>;
|
|
180
|
-
backButtonLabel:
|
|
180
|
+
backButtonLabel: _intlayer_types331.TypedNodeModel<_intlayer_types331.NodeType.Translation, {
|
|
181
181
|
en: string;
|
|
182
182
|
'en-GB': string;
|
|
183
183
|
fr: string;
|
|
@@ -197,7 +197,7 @@ declare const browserContent: {
|
|
|
197
197
|
vi: string;
|
|
198
198
|
uk: string;
|
|
199
199
|
}, {
|
|
200
|
-
nodeType:
|
|
200
|
+
nodeType: "translation" | _intlayer_types331.NodeType.Translation;
|
|
201
201
|
} & {
|
|
202
202
|
translation: {
|
|
203
203
|
en: string;
|
|
@@ -220,7 +220,7 @@ declare const browserContent: {
|
|
|
220
220
|
uk: string;
|
|
221
221
|
};
|
|
222
222
|
}>;
|
|
223
|
-
forwardButtonLabel:
|
|
223
|
+
forwardButtonLabel: _intlayer_types331.TypedNodeModel<_intlayer_types331.NodeType.Translation, {
|
|
224
224
|
en: string;
|
|
225
225
|
'en-GB': string;
|
|
226
226
|
fr: string;
|
|
@@ -240,7 +240,7 @@ declare const browserContent: {
|
|
|
240
240
|
vi: string;
|
|
241
241
|
uk: string;
|
|
242
242
|
}, {
|
|
243
|
-
nodeType:
|
|
243
|
+
nodeType: "translation" | _intlayer_types331.NodeType.Translation;
|
|
244
244
|
} & {
|
|
245
245
|
translation: {
|
|
246
246
|
en: string;
|
|
@@ -263,7 +263,7 @@ declare const browserContent: {
|
|
|
263
263
|
uk: string;
|
|
264
264
|
};
|
|
265
265
|
}>;
|
|
266
|
-
reloadButtonTitle:
|
|
266
|
+
reloadButtonTitle: _intlayer_types331.TypedNodeModel<_intlayer_types331.NodeType.Translation, {
|
|
267
267
|
en: string;
|
|
268
268
|
'en-GB': string;
|
|
269
269
|
fr: string;
|
|
@@ -283,7 +283,7 @@ declare const browserContent: {
|
|
|
283
283
|
vi: string;
|
|
284
284
|
uk: string;
|
|
285
285
|
}, {
|
|
286
|
-
nodeType:
|
|
286
|
+
nodeType: "translation" | _intlayer_types331.NodeType.Translation;
|
|
287
287
|
} & {
|
|
288
288
|
translation: {
|
|
289
289
|
en: string;
|
|
@@ -306,7 +306,7 @@ declare const browserContent: {
|
|
|
306
306
|
uk: string;
|
|
307
307
|
};
|
|
308
308
|
}>;
|
|
309
|
-
iframeTitle:
|
|
309
|
+
iframeTitle: _intlayer_types331.TypedNodeModel<_intlayer_types331.NodeType.Translation, {
|
|
310
310
|
en: string;
|
|
311
311
|
'en-GB': string;
|
|
312
312
|
fr: string;
|
|
@@ -326,7 +326,7 @@ declare const browserContent: {
|
|
|
326
326
|
vi: string;
|
|
327
327
|
uk: string;
|
|
328
328
|
}, {
|
|
329
|
-
nodeType:
|
|
329
|
+
nodeType: "translation" | _intlayer_types331.NodeType.Translation;
|
|
330
330
|
} & {
|
|
331
331
|
translation: {
|
|
332
332
|
en: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.content.d.ts","names":[],"sources":["../../../../src/components/Browser/browser.content.ts"],"sourcesContent":[],"mappings":";;;cAEa;;;IAAA,SAAA,
|
|
1
|
+
{"version":3,"file":"browser.content.d.ts","names":[],"sources":["../../../../src/components/Browser/browser.content.ts"],"sourcesContent":[],"mappings":";;;cAEa;;;IAAA,SAAA,mCAyKS,0CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, DetailedHTMLProps, FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as class_variance_authority_types8 from "class-variance-authority/types";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import { LucideIcon } from "lucide-react";
|
|
5
5
|
|
|
@@ -61,12 +61,12 @@ declare enum ButtonTextAlign {
|
|
|
61
61
|
*/
|
|
62
62
|
declare const buttonVariants: (props?: {
|
|
63
63
|
size?: "md" | "sm" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
|
|
64
|
-
color?: "
|
|
65
|
-
roundedSize?: "md" | "sm" | "lg" | "
|
|
66
|
-
variant?: "default" | "input" | "
|
|
64
|
+
color?: "error" | "success" | "custom" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text" | "text-inverse" | "card" | "current";
|
|
65
|
+
roundedSize?: "md" | "sm" | "lg" | "none" | "xl" | "2xl" | "3xl" | "full" | "4xl" | "5xl";
|
|
66
|
+
variant?: "default" | "input" | "invisible-link" | "hoverable" | "none" | "outline" | "link" | "fade";
|
|
67
67
|
textAlign?: "left" | "center" | "right";
|
|
68
68
|
isFullWidth?: boolean;
|
|
69
|
-
} &
|
|
69
|
+
} & class_variance_authority_types8.ClassProp) => string;
|
|
70
70
|
/**
|
|
71
71
|
* Enhanced Button component props with comprehensive type safety and accessibility features
|
|
72
72
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _intlayer_types370 from "@intlayer/types";
|
|
2
|
+
import * as _intlayer_core1 from "@intlayer/core";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Carousel/index.content.d.ts
|
|
5
5
|
declare const carouselContent: {
|
|
6
6
|
key: string;
|
|
7
7
|
content: {
|
|
8
|
-
goToSlide:
|
|
8
|
+
goToSlide: _intlayer_core1.InsertionContent<_intlayer_types370.TypedNodeModel<_intlayer_types370.NodeType.Translation, {
|
|
9
9
|
ar: string;
|
|
10
10
|
de: string;
|
|
11
11
|
en: string;
|
|
@@ -25,7 +25,7 @@ declare const carouselContent: {
|
|
|
25
25
|
vi: string;
|
|
26
26
|
zh: string;
|
|
27
27
|
}, {
|
|
28
|
-
nodeType:
|
|
28
|
+
nodeType: "translation" | _intlayer_types370.NodeType.Translation;
|
|
29
29
|
} & {
|
|
30
30
|
translation: {
|
|
31
31
|
ar: string;
|
|
@@ -48,7 +48,7 @@ declare const carouselContent: {
|
|
|
48
48
|
zh: string;
|
|
49
49
|
};
|
|
50
50
|
}>>;
|
|
51
|
-
previousSlide:
|
|
51
|
+
previousSlide: _intlayer_types370.TypedNodeModel<_intlayer_types370.NodeType.Translation, {
|
|
52
52
|
en: string;
|
|
53
53
|
'en-GB': string;
|
|
54
54
|
ru: string;
|
|
@@ -68,7 +68,7 @@ declare const carouselContent: {
|
|
|
68
68
|
vi: string;
|
|
69
69
|
uk: string;
|
|
70
70
|
}, {
|
|
71
|
-
nodeType:
|
|
71
|
+
nodeType: "translation" | _intlayer_types370.NodeType.Translation;
|
|
72
72
|
} & {
|
|
73
73
|
translation: {
|
|
74
74
|
en: string;
|
|
@@ -91,7 +91,7 @@ declare const carouselContent: {
|
|
|
91
91
|
uk: string;
|
|
92
92
|
};
|
|
93
93
|
}>;
|
|
94
|
-
nextSlide:
|
|
94
|
+
nextSlide: _intlayer_types370.TypedNodeModel<_intlayer_types370.NodeType.Translation, {
|
|
95
95
|
en: string;
|
|
96
96
|
'en-GB': string;
|
|
97
97
|
ru: string;
|
|
@@ -111,7 +111,7 @@ declare const carouselContent: {
|
|
|
111
111
|
vi: string;
|
|
112
112
|
uk: string;
|
|
113
113
|
}, {
|
|
114
|
-
nodeType:
|
|
114
|
+
nodeType: "translation" | _intlayer_types370.NodeType.Translation;
|
|
115
115
|
} & {
|
|
116
116
|
translation: {
|
|
117
117
|
en: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as class_variance_authority_types7 from "class-variance-authority/types";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
5
|
//#region src/components/CollapsibleTable/CollapsibleTable.d.ts
|
|
@@ -7,7 +7,7 @@ declare const collapsibleTableVariants: (props?: {
|
|
|
7
7
|
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
8
8
|
variant?: "default" | "dark" | "ghost" | "outlined";
|
|
9
9
|
spacing?: "sm" | "md" | "lg" | "none" | "auto";
|
|
10
|
-
} &
|
|
10
|
+
} & class_variance_authority_types7.ClassProp) => string;
|
|
11
11
|
interface CollapsibleTableProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof collapsibleTableVariants> {
|
|
12
12
|
/** Table title displayed in the header */
|
|
13
13
|
title: string;
|