@intlayer/design-system 8.7.11 → 8.7.13

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 (78) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/components/DictionaryEditor/NodeWrapper/BooleanWrapper.mjs +1 -1
  3. package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +1 -1
  4. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +2 -0
  5. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  6. package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -1
  7. package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  8. package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +1 -1
  9. package/dist/esm/components/Form/elements/SwitchSelectorElement.mjs +1 -1
  10. package/dist/esm/components/IDE/Code.mjs +4 -1
  11. package/dist/esm/components/IDE/Code.mjs.map +1 -1
  12. package/dist/esm/components/IDE/CodeBlockClient.mjs.map +1 -1
  13. package/dist/esm/components/IDE/CodeBlockHighlight.mjs +2 -2
  14. package/dist/esm/components/IDE/CodeBlockHighlight.mjs.map +1 -1
  15. package/dist/esm/components/IDE/CodeBlockShiki.mjs +1 -1
  16. package/dist/esm/components/IDE/CodeBlockShiki.mjs.map +1 -1
  17. package/dist/esm/components/Input/Checkbox.mjs +13 -13
  18. package/dist/esm/components/Input/Checkbox.mjs.map +1 -1
  19. package/dist/esm/components/Link/Link.mjs +3 -3
  20. package/dist/esm/components/Link/Link.mjs.map +1 -1
  21. package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -1
  22. package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
  23. package/dist/esm/components/Navbar/index.mjs.map +1 -1
  24. package/dist/esm/components/Popover/static.mjs +1 -1
  25. package/dist/esm/components/Popover/static.mjs.map +1 -1
  26. package/dist/esm/components/SwitchSelector/SwitchSelector.mjs +127 -0
  27. package/dist/esm/components/SwitchSelector/SwitchSelector.mjs.map +1 -0
  28. package/dist/esm/components/SwitchSelector/VerticalSwitchSelector.mjs +105 -0
  29. package/dist/esm/components/SwitchSelector/VerticalSwitchSelector.mjs.map +1 -0
  30. package/dist/esm/components/SwitchSelector/index.mjs +3 -145
  31. package/dist/esm/components/SwitchSelector/useSwitchSelector.mjs +44 -0
  32. package/dist/esm/components/SwitchSelector/useSwitchSelector.mjs.map +1 -0
  33. package/dist/esm/components/index.mjs +3 -2
  34. package/dist/esm/hooks/index.mjs +2 -2
  35. package/dist/esm/hooks/reactQuery.mjs +41 -12
  36. package/dist/esm/hooks/reactQuery.mjs.map +1 -1
  37. package/dist/esm/hooks/useAuth/useOAuth2.mjs +3 -3
  38. package/dist/esm/hooks/useAuth/useOAuth2.mjs.map +1 -1
  39. package/dist/esm/hooks/useAuth/useSession.mjs +7 -5
  40. package/dist/esm/hooks/useAuth/useSession.mjs.map +1 -1
  41. package/dist/esm/hooks/useItemSelector.mjs +41 -23
  42. package/dist/esm/hooks/useItemSelector.mjs.map +1 -1
  43. package/dist/esm/providers/ReactQueryProvider.mjs +56 -21
  44. package/dist/esm/providers/ReactQueryProvider.mjs.map +1 -1
  45. package/dist/types/components/Badge/index.d.ts +2 -2
  46. package/dist/types/components/Button/Button.d.ts +4 -4
  47. package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +2 -2
  48. package/dist/types/components/Container/index.d.ts +6 -6
  49. package/dist/types/components/IDE/Code.d.ts +2 -2
  50. package/dist/types/components/IDE/Code.d.ts.map +1 -1
  51. package/dist/types/components/IDE/CodeBlockClient.d.ts +3 -3
  52. package/dist/types/components/IDE/CodeBlockClient.d.ts.map +1 -1
  53. package/dist/types/components/IDE/CodeBlockHighlight.d.ts +2 -1
  54. package/dist/types/components/IDE/CodeBlockHighlight.d.ts.map +1 -1
  55. package/dist/types/components/IDE/CodeBlockShiki.d.ts +2 -2
  56. package/dist/types/components/IDE/CodeBlockShiki.d.ts.map +1 -1
  57. package/dist/types/components/Input/Checkbox.d.ts +1 -1
  58. package/dist/types/components/Input/Checkbox.d.ts.map +1 -1
  59. package/dist/types/components/Link/Link.d.ts +3 -3
  60. package/dist/types/components/Navbar/index.d.ts.map +1 -1
  61. package/dist/types/components/SwitchSelector/SwitchSelector.d.ts +56 -0
  62. package/dist/types/components/SwitchSelector/SwitchSelector.d.ts.map +1 -0
  63. package/dist/types/components/SwitchSelector/VerticalSwitchSelector.d.ts +22 -0
  64. package/dist/types/components/SwitchSelector/VerticalSwitchSelector.d.ts.map +1 -0
  65. package/dist/types/components/SwitchSelector/index.d.ts +3 -74
  66. package/dist/types/components/SwitchSelector/useSwitchSelector.d.ts +27 -0
  67. package/dist/types/components/SwitchSelector/useSwitchSelector.d.ts.map +1 -0
  68. package/dist/types/components/Tag/index.d.ts +2 -2
  69. package/dist/types/components/index.d.ts +3 -2
  70. package/dist/types/hooks/index.d.ts +2 -2
  71. package/dist/types/hooks/reactQuery.d.ts +4 -1
  72. package/dist/types/hooks/reactQuery.d.ts.map +1 -1
  73. package/dist/types/hooks/useAuth/useOAuth2.d.ts.map +1 -1
  74. package/dist/types/providers/ReactQueryProvider.d.ts +5 -2
  75. package/dist/types/providers/ReactQueryProvider.d.ts.map +1 -1
  76. package/package.json +24 -21
  77. package/dist/esm/components/SwitchSelector/index.mjs.map +0 -1
  78. package/dist/types/components/SwitchSelector/index.d.ts.map +0 -1
@@ -1,74 +1,3 @@
1
- import { HTMLAttributes, ReactNode } from "react";
2
- import * as _$class_variance_authority_types0 from "class-variance-authority/types";
3
- import { VariantProps } from "class-variance-authority";
4
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
-
6
- //#region src/components/SwitchSelector/index.d.ts
7
- type SwitchSelectorChoice<T = boolean> = {
8
- content: ReactNode;
9
- value: T;
10
- } & HTMLAttributes<HTMLButtonElement>;
11
- type SwitchSelectorChoices<T> = SwitchSelectorChoice<T>[];
12
- type SwitchSelectorProps<T = boolean> = {
13
- choices?: SwitchSelectorChoices<T>;
14
- value?: T;
15
- defaultValue?: T;
16
- onChange?: (choice: T) => void;
17
- className?: string;
18
- itemClassName?: string;
19
- hoverable?: boolean;
20
- disabled?: boolean;
21
- } & VariantProps<typeof switchSelectorVariant> & VariantProps<typeof choiceVariant>;
22
- declare enum SwitchSelectorColor {
23
- PRIMARY = "primary",
24
- SECONDARY = "secondary",
25
- DESTRUCTIVE = "destructive",
26
- NEUTRAL = "neutral",
27
- LIGHT = "light",
28
- DARK = "dark",
29
- TEXT = "text"
30
- }
31
- declare const switchSelectorVariant: (props?: {
32
- color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
33
- disabled?: boolean;
34
- } & _$class_variance_authority_types0.ClassProp) => string;
35
- declare enum SwitchSelectorSize {
36
- SM = "sm",
37
- MD = "md",
38
- LG = "lg"
39
- }
40
- declare const choiceVariant: (props?: {
41
- size?: "sm" | "md" | "lg";
42
- } & _$class_variance_authority_types0.ClassProp) => string;
43
- /**
44
- *
45
- * Component that allows the user to select one of the provided choices.
46
- *
47
- * Example:
48
- * ```jsx
49
- * <SwitchSelector
50
- * choices={[
51
- * { content: 'Option 1', value: 'option1' },
52
- * { content: 'Option 2', value: 'option2' },
53
- * { content: 'Option 3', value: 'option3' },
54
- * ]}
55
- * value="option1"
56
- * onChange={(choice) => console.log(choice)}
57
- * />
58
- * ```
59
- */
60
- declare const SwitchSelector: <T>({
61
- choices,
62
- value,
63
- defaultValue,
64
- onChange,
65
- color,
66
- size,
67
- className,
68
- itemClassName,
69
- hoverable,
70
- disabled
71
- }: SwitchSelectorProps<T>) => _$react_jsx_runtime0.JSX.Element;
72
- //#endregion
73
- export { SwitchSelector, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize };
74
- //# sourceMappingURL=index.d.ts.map
1
+ import { SwitchSelector, SwitchSelectorBaseProps, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, choiceVariant, defaultChoices, indicatorVariant, switchSelectorVariant } from "./SwitchSelector.js";
2
+ import { VerticalSwitchSelector, VerticalSwitchSelectorProps } from "./VerticalSwitchSelector.js";
3
+ export { SwitchSelector, SwitchSelectorBaseProps, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, VerticalSwitchSelector, VerticalSwitchSelectorProps, choiceVariant, defaultChoices, indicatorVariant, switchSelectorVariant };
@@ -0,0 +1,27 @@
1
+ import { SwitchSelectorBaseProps } from "./SwitchSelector.js";
2
+ import * as _$react from "react";
3
+ import { ItemSelectorOrientation } from "@hooks/useItemSelector";
4
+
5
+ //#region src/components/SwitchSelector/useSwitchSelector.d.ts
6
+ declare const useSwitchSelector: <T>({
7
+ choices,
8
+ value,
9
+ defaultValue,
10
+ onChange,
11
+ hoverable,
12
+ disabled
13
+ }: SwitchSelectorBaseProps<T>, orientation: ItemSelectorOrientation) => {
14
+ valueState: T;
15
+ hoveredIndex: number;
16
+ setHoveredIndex: _$react.Dispatch<_$react.SetStateAction<number>>;
17
+ optionsRefs: _$react.RefObject<HTMLButtonElement[]>;
18
+ indicatorRef: _$react.RefObject<HTMLDivElement>;
19
+ choiceIndicatorPosition: any;
20
+ selectedIndex: number;
21
+ indicatorIndex: number;
22
+ handleChange: (newValue: T) => void;
23
+ disabled: boolean;
24
+ };
25
+ //#endregion
26
+ export { useSwitchSelector };
27
+ //# sourceMappingURL=useSwitchSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSwitchSelector.d.ts","names":[],"sources":["../../../../src/components/SwitchSelector/useSwitchSelector.ts"],"mappings":";;;;;cASa,iBAAA;EACX,OAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,SAAA;EAAA;AAAA,GAOG,uBAAA,CAAwB,CAAA,GAC3B,WAAA,EAAa,uBAAA;;;;;;;;;2BAuBmB,CAAA"}
@@ -185,8 +185,8 @@ declare enum TagBackground {
185
185
  WITH = "with"
186
186
  }
187
187
  declare const containerVariants: (props?: {
188
- roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full";
189
- color?: "error" | "text" | "primary" | "neutral" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
188
+ roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
189
+ color?: "text" | "error" | "primary" | "neutral" | "success" | "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";
@@ -96,7 +96,8 @@ import { TiktokLogo } from "./SocialNetworks/TiktokLogo.js";
96
96
  import { XLogo } from "./SocialNetworks/XLogo.js";
97
97
  import { YoutubeLogo } from "./SocialNetworks/YoutubeLogo.js";
98
98
  import { SocialNetworks } from "./SocialNetworks/index.js";
99
- import { SwitchSelector, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize } from "./SwitchSelector/index.js";
99
+ import { SwitchSelector, SwitchSelectorBaseProps, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, choiceVariant, defaultChoices, indicatorVariant, switchSelectorVariant } from "./SwitchSelector/SwitchSelector.js";
100
+ import { VerticalSwitchSelector, VerticalSwitchSelectorProps } from "./SwitchSelector/VerticalSwitchSelector.js";
100
101
  import { Tab, TabItemProps, TabProps } from "./Tab/Tab.js";
101
102
  import { Table, TableProps } from "./Table/Table.js";
102
103
  import { SmartTable } from "./Table/SmartTable.js";
@@ -113,4 +114,4 @@ import { Toaster } from "./Toaster/Toaster.js";
113
114
  import { reducer, toast, useToast } from "./Toaster/useToast.js";
114
115
  import { WithResizer } from "./WithResizer/index.js";
115
116
  import { MarkdownRenderer, baseMarkdownComponents, getIntlayerMarkdownOptions } from "./MarkDownRender/MarkDownRender.js";
116
- export { Accordion, AccordionProps, AutoCompleteTextarea, AutoSizedTextArea, AutoSizedTextAreaProps, AutocompleteTextAreaProps, Avatar, AvatarProps, Badge, BadgeColor, BadgeProps, BadgeSize, BadgeVariant, BadgeVariantProps, BitbucketLogo, Breadcrumb, BreadcrumbLink, BreadcrumbProps, Browser, BrowserProps, Burger, Button, ButtonColor, ButtonProps, ButtonSize, ButtonTextAlign, ButtonVariant, Carousel, Checkbox, CheckboxColor, CheckboxProps, CheckboxSize, ClickOutsideDiv, ClickOutsideDivProps, Code, CodeBlock, CodeBlockProps, CodeCompAttributes, CodeDefault, CodeLanguage, CollapsibleTable, CollapsibleTableProps, Command, CommandRoot, Container, ContainerBackground, ContainerBorderColor, ContainerGap, ContainerPadding, ContainerProps, ContainerRoundedSize, ContainerSeparator, ContainerTransparency, ContentEditableTextArea, ContentEditableTextAreaHandle, ContentEditableTextAreaProps, ContentEditor, ContentSelector, CopyButton, CopyToClipboard, CopyToClipboardProps, DesktopNavbar, DesktopThemeSwitcher, Detail, DetailProps, DictionaryCreationForm, DictionaryEditor, DictionaryFieldEditor, DiscordLogo, DotPattern, DropDown, DropDownAlign, DropDownProps, DropDownType, DropDownYAlign, EditableFieldInput, EditableFieldTextArea, ExpandCollapse, ExpandCollapseProps, FacebookLogo, FileList, FileListProps, Flag, flags_d_exports as Flags, Footer, FooterLink, Form, GitHubLogo, GitLabLogo, GoogleLogo, GridPattern, H1, H2, H3, H4, H5, H6, HTMLRenderer, HeadingProps, HeightResizer, HideShow, HideShowProps, IDE, IDEProps, InformationTag, Input, InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputPassword, InputProps, InputSize, InputVariant, InstagramLogo, KeyList, KeyPathBreadcrumb, KeyboardScreenAdapter, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutType, Label, LabelProps, LanguageBackground, LanguageSection, Link, LinkColor, LinkGroup, LinkProps, LinkRoundedSize, LinkSize, LinkUnderlined, LinkVariant, LinkedInLogo, Loader, LoaderProps, LocaleSwitcher, LocaleSwitcherContent, LocaleSwitcherContentProps, LocaleSwitcherContentProvider, LocaleSwitcherProps, Logo, LogoTextOnly, LogoWithText, LogoWithTextBelow, MarkdownRenderer, MaxHeightSmoother, MaxWidthSmoother, MobileNavbar, MobileThemeSwitcher, Modal, ModalSize, Modes, MultiSelect, Navbar, NumberItemsSelector, NumberItemsSelectorProps, OTPInput, OTPInputContext, OTPInputProps, Pagination, PaginationProps, PaginationSize, PaginationVariant, PanelProps, Popover, PopoverProps, PopoverStatic, PopoverType, PopoverXAlign, PopoverYAlign, PressableSpan, ProductHuntLogo, RenderProps, RightDrawer, SaveForm, SearchInput, Select, SelectContent, SelectContentPosition, SelectLabel, SelectSeparator, ShowingResultsNumberItems, ShowingResultsNumberItemsProps, SlotProps, SmartTable, SocialNetworks, Spotlight, SwitchSelector, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, Tab, TabItemProps, TabProps, TabSelector, TabSelectorColor, TabSelectorItemProps, TabSelectorProps, Table, TableProps, Tag, TagBackground, TagBorder, TagColor, TagRoundedSize, TagSize, TechLogo, TechLogoName, techLogos_d_exports as TechLogos, Terminal, TerminalProps, TextArea, TextAreaProps, TextEditor, TextEditorContainer, TextEditorProps, TiktokLogo, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, TriggerProps, VersionSwitcher, VersionSwitcherProps, 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 };
117
+ export { Accordion, AccordionProps, AutoCompleteTextarea, AutoSizedTextArea, AutoSizedTextAreaProps, AutocompleteTextAreaProps, Avatar, AvatarProps, Badge, BadgeColor, BadgeProps, BadgeSize, BadgeVariant, BadgeVariantProps, BitbucketLogo, Breadcrumb, BreadcrumbLink, BreadcrumbProps, Browser, BrowserProps, Burger, Button, ButtonColor, ButtonProps, ButtonSize, ButtonTextAlign, ButtonVariant, Carousel, Checkbox, CheckboxColor, CheckboxProps, CheckboxSize, ClickOutsideDiv, ClickOutsideDivProps, Code, CodeBlock, CodeBlockProps, CodeCompAttributes, CodeDefault, CodeLanguage, CollapsibleTable, CollapsibleTableProps, Command, CommandRoot, Container, ContainerBackground, ContainerBorderColor, ContainerGap, ContainerPadding, ContainerProps, ContainerRoundedSize, ContainerSeparator, ContainerTransparency, ContentEditableTextArea, ContentEditableTextAreaHandle, ContentEditableTextAreaProps, ContentEditor, ContentSelector, CopyButton, CopyToClipboard, CopyToClipboardProps, DesktopNavbar, DesktopThemeSwitcher, Detail, DetailProps, DictionaryCreationForm, DictionaryEditor, DictionaryFieldEditor, DiscordLogo, DotPattern, DropDown, DropDownAlign, DropDownProps, DropDownType, DropDownYAlign, EditableFieldInput, EditableFieldTextArea, ExpandCollapse, ExpandCollapseProps, FacebookLogo, FileList, FileListProps, Flag, flags_d_exports as Flags, Footer, FooterLink, Form, GitHubLogo, GitLabLogo, GoogleLogo, GridPattern, H1, H2, H3, H4, H5, H6, HTMLRenderer, HeadingProps, HeightResizer, HideShow, HideShowProps, IDE, IDEProps, InformationTag, Input, InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputPassword, InputProps, InputSize, InputVariant, InstagramLogo, KeyList, KeyPathBreadcrumb, KeyboardScreenAdapter, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutType, Label, LabelProps, LanguageBackground, LanguageSection, Link, LinkColor, LinkGroup, LinkProps, LinkRoundedSize, LinkSize, LinkUnderlined, LinkVariant, LinkedInLogo, Loader, LoaderProps, LocaleSwitcher, LocaleSwitcherContent, LocaleSwitcherContentProps, LocaleSwitcherContentProvider, LocaleSwitcherProps, Logo, LogoTextOnly, LogoWithText, LogoWithTextBelow, MarkdownRenderer, MaxHeightSmoother, MaxWidthSmoother, MobileNavbar, MobileThemeSwitcher, Modal, ModalSize, Modes, MultiSelect, Navbar, NumberItemsSelector, NumberItemsSelectorProps, OTPInput, OTPInputContext, OTPInputProps, Pagination, PaginationProps, PaginationSize, PaginationVariant, PanelProps, Popover, PopoverProps, PopoverStatic, PopoverType, PopoverXAlign, PopoverYAlign, PressableSpan, ProductHuntLogo, RenderProps, RightDrawer, SaveForm, SearchInput, Select, SelectContent, SelectContentPosition, SelectLabel, SelectSeparator, ShowingResultsNumberItems, ShowingResultsNumberItemsProps, SlotProps, SmartTable, SocialNetworks, Spotlight, SwitchSelector, SwitchSelectorBaseProps, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, Tab, TabItemProps, TabProps, TabSelector, TabSelectorColor, TabSelectorItemProps, TabSelectorProps, Table, TableProps, Tag, TagBackground, TagBorder, TagColor, TagRoundedSize, TagSize, TechLogo, TechLogoName, techLogos_d_exports as TechLogos, Terminal, TerminalProps, TextArea, TextAreaProps, TextEditor, TextEditorContainer, TextEditorProps, TiktokLogo, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, TriggerProps, VersionSwitcher, VersionSwitcherProps, VersionSwitcherProvider, VerticalSwitchSelector, VerticalSwitchSelectorProps, WithResizer, XLogo, YoutubeLogo, badgeVariants, baseMarkdownComponents, buttonVariants, checkIsExternalLink, checkboxVariants, choiceVariant, containerVariants, defaultChoices, drawerManager, getCapitals, getIntlayerHTMLOptions, getIntlayerMarkdownOptions, indicatorVariant, inputSlotVariants, inputVariants, isTextChildren, linkVariants, paginationVariants, reducer, switchSelectorVariant, toast, traceKeys, useContentEditable, useCopyToClipboard, useForm, useFormField, useLocaleSwitcherContent, usePasswordManagerBadge, usePrevious, useRightDrawer, useToast, useVersionSwitcher };
@@ -1,5 +1,5 @@
1
1
  import { UseIntlayerAuthProps, useIntlayerAuth, useIntlayerOAuth } from "./useIntlayerAPI.js";
2
- 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, useFillAllTranslations, 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, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, 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.js";
2
+ import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, 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, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, 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.js";
3
3
  import { useAuth } from "./useAuth/useAuth.js";
4
4
  import { useOAuth2 } from "./useAuth/useOAuth2.js";
5
5
  import { UseSessionResult, useSession } from "./useAuth/useSession.js";
@@ -18,4 +18,4 @@ import { useScrollDetection } from "./useScrollDetection.js";
18
18
  import { useScrollY } from "./useScrollY.js";
19
19
  import { useSearch } from "./useSearch.js";
20
20
  import { useUser } from "./useUser/index.js";
21
- export { HorizontalSwipeConfig, HorizontalSwipeHook, ItemSelectorOrientation, SizeType, UseIntlayerAuthProps, UseSessionResult, 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, useFillAllTranslations, 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, usePauseTranslationJob, usePersistedStore, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useScreenWidth, useScrollBlockage, useScrollDetection, useScrollY, useSearch, useSearchDoc, useSelectOrganization, useSelectProject, useSession, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
21
+ export { HorizontalSwipeConfig, HorizontalSwipeHook, ItemSelectorOrientation, SizeType, UseIntlayerAuthProps, UseSessionResult, 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, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDevice, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetElementById, useGetElementOrWindow, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, 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, usePauseTranslationJob, usePersistedStore, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useScreenWidth, useScrollBlockage, useScrollDetection, useScrollY, useSearch, useSearchDoc, useSelectOrganization, useSelectProject, useSession, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
@@ -95,6 +95,9 @@ declare const useDeleteTag: () => any;
95
95
  declare const useGetPricing: (body: GetPricingBody, options?: Partial<UseQueryOptions<GetPricingResult>>) => QueryObserverResult<TData, TError>;
96
96
  declare const useGetSubscription: (body: GetCheckoutSessionBody, options?: Partial<UseQueryOptions>) => QueryObserverResult<TData, TError>;
97
97
  declare const useCancelSubscription: () => any;
98
+ declare const useGetInvoices: (options?: Partial<UseQueryOptions>) => QueryObserverResult<TData, TError>;
99
+ declare const useGetPaymentMethod: (options?: Partial<UseQueryOptions>) => QueryObserverResult<TData, TError>;
100
+ declare const useCreatePortalSession: () => any;
98
101
  /**
99
102
  * AI
100
103
  */
@@ -172,5 +175,5 @@ declare const useStopTranslationJob: () => any;
172
175
  declare const usePauseTranslationJob: () => any;
173
176
  declare const useResumeTranslationJob: () => any;
174
177
  //#endregion
175
- export { 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, useFillAllTranslations, 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, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
178
+ export { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, 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, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
176
179
  //# sourceMappingURL=reactQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reactQuery.d.ts","names":[],"sources":["../../../src/hooks/reactQuery.ts"],"mappings":";;;;;;cAwHa,WAAA,GACX,OAAA,EAAS,eAAA;EACP,WAAA;EACA,cAAA;EACA,mBAAA;AAAA,MACD,mBAAA,CAAA,KAAA,EAAA,MAAA;;;;cAuBU,QAAA;AAAA,cAqBA,uBAAA;AAAA,cAUA,WAAA;AAAA,cAUA,SAAA;AAAA,cAmBA,iBAAA;AAAA,cAUA,mBAAA;AAAA,cAUA,gBAAA;AAAA,cAUA,cAAA;AAAA,cAUA,mBAAA;AAAA,cAUA,kBAAA;AAAA,cASA,mBAAA;AAAA,cASA,aAAA;AAAA,cASA,mBAAA;AAAA,cASA,aAAA;AAAA,cASA,gBAAA;AAAA,cASA,gBAAA;AAAA,cASA,eAAA,QAAe,mBAAA,CAAA,KAAA,EAAA,MAAA;AAAA,cAQf,kBAAA;AAAA,cAQA,cAAA;AAAA,cAaA,YAAA;AAAA,cASA,mBAAA,QAAmB,mBAAA,CAAA,KAAA,EAAA,MAAA;AAAA,cAQnB,oBAAA;AA5Lb;;;AAAA,cA6Ma,WAAA,GACX,OAAA,GAAU,cAAA,EACV,OAAA,GAAU,OAAA,CAAQ,eAAA,MAAgB,mBAAA,CAAA,KAAA,EAAA,MAAA;AAAA,cAavB,cAAA,GAAkB,MAAA,aAAc,mBAAA,CAAA,KAAA,EAAA,MAAA;AAAA,cAUhC,aAAA;AAAA,cASA,aAAA;AAAA,cASA,aAAA;;;AA3Nb;cA2Oa,mBAAA,GAAuB,OAAA,GAAU,sBAAA,KAAsB,mBAAA,CAAA,KAAA,EAAA,MAAA;AAAA,cAYvD,kBAAA;AAAA,cAaA,qBAAA;AAAA,cAUA,4BAAA;AAAA,cAaA,gCAAA;AAAA,cAuBA,wBAAA;AAAA,cAaA,qBAAA;AAAA,cAYA,qBAAA;AAAA,cAgCA,uB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;cAcA,sBAAA,GACX,KAAA,GAAQ,qBAAA,EACR,OAAA,GAAU,OAAA,CAAQ,eAAA,CAAgB,yBAAA,OAA2B,mBAAA,CAAA,KAAA,EAAA,MAAA;AAAA,cAYlD,yBAAA,GACX,SAAA,EAAW,4BAAA,eACX,OAAA,GAAU,OAAA,CAAQ,eAAA,MAAgB,mBAAA,CAAA,KAAA,EAAA,MAAA;AAAA,cAevB,2BAAA,GACX,KAAA,EAAO,0BAAA,EACP,OAAA,GAAU,OAAA,CAAQ,eAAA,MAAgB,mBAAA,CAAA,KAAA,EAAA,MAAA;AAAA,cAevB,wBAAA,GAA4B,KAAA,GAAQ,oBAAA;AAAA,cAcpC,wBAAA,GAA4B,KAAA,GAAQ,oBAAA;AAAA,cAcpC,uBAAA,GAA2B,KAAA,GAAQ,oBAAA;AAAA,cAUnC,yBAAA,GAA6B,KAAA,GAAQ,oBAAA;AAAA,cAUrC,wBAAA,GAA4B,KAAA,GAAQ,oBAAA;;;;cA4BpC,sBAAA;AAAA,cA0BA,qBAAA;AAAA,cAUA,sBAAA;AAAA,cAUA,uBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useOAuth2.d.ts","names":[],"sources":["../../../../src/hooks/useAuth/useOAuth2.ts"],"mappings":";;;cAQa,SAAA,GAAa,qBAAA,GAAwB,cAAA"}
1
+ {"version":3,"file":"useOAuth2.d.ts","names":[],"sources":["../../../../src/hooks/useAuth/useOAuth2.ts"],"mappings":";;;cASa,SAAA,GAAa,qBAAA,GAAwB,cAAA"}
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
- import { QueryKey, UseMutationOptions } from "@tanstack/react-query";
2
+ import { QueryClient, QueryKey, UseMutationOptions } from "@tanstack/react-query";
3
3
 
4
4
  //#region src/providers/ReactQueryProvider.d.ts
5
5
  declare module '@tanstack/react-query' {
@@ -13,7 +13,10 @@ declare module '@tanstack/react-query' {
13
13
  }
14
14
  }
15
15
  declare const getQueryClient: () => any;
16
- declare const ReactQueryProvider: FC<PropsWithChildren>;
16
+ interface ReactQueryProviderProps {
17
+ client?: QueryClient;
18
+ }
19
+ declare const ReactQueryProvider: FC<PropsWithChildren<ReactQueryProviderProps>>;
17
20
  //#endregion
18
21
  export { ReactQueryProvider, getQueryClient };
19
22
  //# sourceMappingURL=ReactQueryProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReactQueryProvider.d.ts","names":[],"sources":["../../../src/providers/ReactQueryProvider.tsx"],"mappings":";;;;;YAiCY,QAAA;IACR,YAAA;MACE,SAAA,GAAY,kBAAA;MACZ,OAAA,GAAU,kBAAA;MACV,iBAAA,GAAoB,QAAA;MACpB,YAAA,GAAe,QAAA;IAAA;EAAA;AAAA;AAAA,cA0ER,cAAA;AAAA,cAGA,kBAAA,EAAoB,EAAA,CAAG,iBAAA"}
1
+ {"version":3,"file":"ReactQueryProvider.d.ts","names":[],"sources":["../../../src/providers/ReactQueryProvider.tsx"],"mappings":";;;;;YA0DY,QAAA;IACR,YAAA;MACE,SAAA,GAAY,kBAAA;MACZ,OAAA,GAAU,kBAAA;MACV,iBAAA,GAAoB,QAAA;MACpB,YAAA,GAAe,QAAA;IAAA;EAAA;AAAA;AAAA,cA0ER,cAAA;AAAA,UAGH,uBAAA;EACR,MAAA,GAAS,WAAA;AAAA;AAAA,cAGE,kBAAA,EAAoB,EAAA,CAC/B,iBAAA,CAAkB,uBAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "8.7.11",
3
+ "version": "8.7.13",
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": [
@@ -421,26 +421,29 @@
421
421
  "dependencies": {
422
422
  "@better-auth/passkey": "1.6.9",
423
423
  "@better-auth/sso": "1.6.9",
424
- "@intlayer/api": "8.7.11",
425
- "@intlayer/config": "8.7.11",
426
- "@intlayer/core": "8.7.11",
427
- "@intlayer/dictionaries-entry": "8.7.11",
428
- "@intlayer/editor-react": "8.7.11",
429
- "@intlayer/types": "8.7.11",
424
+ "@intlayer/api": "8.7.13",
425
+ "@intlayer/config": "8.7.13",
426
+ "@intlayer/core": "8.7.13",
427
+ "@intlayer/dictionaries-entry": "8.7.13",
428
+ "@intlayer/editor-react": "8.7.13",
429
+ "@intlayer/types": "8.7.13",
430
430
  "@radix-ui/react-dialog": "1.1.15",
431
431
  "@radix-ui/react-select": "2.2.6",
432
432
  "@radix-ui/react-slot": "1.2.4",
433
433
  "@radix-ui/react-toast": "1.2.15",
434
434
  "@tailwindcss/aspect-ratio": "0.4.2",
435
+ "@tanstack/query-async-storage-persister": "5.100.6",
436
+ "@tanstack/react-query-persist-client": "5.100.6",
435
437
  "better-auth": "1.6.9",
436
438
  "class-variance-authority": "0.7.1",
437
439
  "cmdk": "1.1.1",
438
- "react-intlayer": "8.7.11",
440
+ "defu": "6.1.7",
441
+ "react-intlayer": "8.7.13",
439
442
  "rollup-preserve-directives": "1.1.3",
440
- "zod": "4.3.6"
443
+ "zod": "4.4.2"
441
444
  },
442
445
  "devDependencies": {
443
- "@intlayer/backend": "8.7.11",
446
+ "@intlayer/backend": "8.7.13",
444
447
  "@shikijs/transformers": "4.0.2",
445
448
  "@storybook/addon-a11y": "8.6.14",
446
449
  "@storybook/addon-essentials": "8.6.14",
@@ -457,7 +460,7 @@
457
460
  "@storybook/theming": "8.6.14",
458
461
  "@svgr/core": "8.1.0",
459
462
  "@svgr/rollup": "8.1.0",
460
- "@tailwindcss/cli": "4.2.1",
463
+ "@tailwindcss/cli": "4.2.4",
461
464
  "@tailwindcss/vite": "4.2.4",
462
465
  "@testing-library/jest-dom": "6.9.1",
463
466
  "@testing-library/react": "16.3.2",
@@ -470,7 +473,7 @@
470
473
  "@utils/ts-config-types": "1.0.4",
471
474
  "clsx": "2.1.1",
472
475
  "fast-glob": "3.3.3",
473
- "intlayer": "8.7.11",
476
+ "intlayer": "8.7.13",
474
477
  "rimraf": "6.1.3",
475
478
  "shiki": "4.0.2",
476
479
  "storybook": "8.6.17",
@@ -478,26 +481,26 @@
478
481
  "tsdown": "0.21.10",
479
482
  "typescript": "6.0.3",
480
483
  "vite": "8.0.10",
481
- "vite-intlayer": "8.7.11",
482
- "vite-plugin-dts": "4.5.4",
484
+ "vite-intlayer": "8.7.13",
485
+ "vite-plugin-dts": "5.0.0",
483
486
  "vitest": "4.1.5"
484
487
  },
485
488
  "peerDependencies": {
486
489
  "@better-fetch/fetch": "1.1.21",
487
490
  "@hookform/resolvers": "5.2.2",
488
- "@intlayer/backend": "8.7.11",
491
+ "@intlayer/backend": "8.7.13",
489
492
  "@monaco-editor/react": "4.7.0",
490
493
  "@shikijs/transformers": "4.0.2",
491
- "@tanstack/react-query": "5.100.6",
492
- "@tanstack/react-query-devtools": "5.100.6",
494
+ "@tanstack/react-query": "5.100.9",
495
+ "@tanstack/react-query-devtools": "5.100.9",
493
496
  "framer-motion": "12.38.0",
494
497
  "fuse.js": "7.3.0",
495
- "intlayer": "8.7.11",
496
- "lucide-react": "1.12.0",
498
+ "intlayer": "8.7.13",
499
+ "lucide-react": "1.14.0",
497
500
  "react": ">=16.0.0",
498
501
  "react-dom": ">=16.0.0",
499
- "react-hook-form": "7.74.0",
500
- "react-intlayer": "8.7.11",
502
+ "react-hook-form": "7.75.0",
503
+ "react-intlayer": "8.7.13",
501
504
  "shiki": "4.0.2",
502
505
  "tailwindcss": "4.2.4"
503
506
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/SwitchSelector/index.tsx"],"sourcesContent":["'use client';\n\nimport { useItemSelector } from '@hooks/useItemSelector';\nimport { cn } from '@utils/cn';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type HTMLAttributes,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nexport type SwitchSelectorChoice<T = boolean> = {\n content: ReactNode;\n value: T;\n} & HTMLAttributes<HTMLButtonElement>;\nexport type SwitchSelectorChoices<T> = SwitchSelectorChoice<T>[];\n\nconst defaultChoices: SwitchSelectorChoices<boolean> = [\n { content: 'Off', value: false },\n { content: 'On', value: true },\n];\n\nexport type SwitchSelectorProps<T = boolean> = {\n choices?: SwitchSelectorChoices<T>;\n value?: T;\n defaultValue?: T;\n onChange?: (choice: T) => void;\n className?: string;\n itemClassName?: string;\n hoverable?: boolean;\n disabled?: boolean;\n} & VariantProps<typeof switchSelectorVariant> &\n VariantProps<typeof choiceVariant>;\n\nexport enum SwitchSelectorColor {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n DESTRUCTIVE = 'destructive',\n NEUTRAL = 'neutral',\n LIGHT = 'light',\n DARK = 'dark',\n TEXT = 'text',\n}\n\nconst switchSelectorVariant = cva(\n 'flex w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px] p-[1.5px]',\n {\n variants: {\n color: {\n [`${SwitchSelectorColor.PRIMARY}`]: 'border-primary text-primary',\n [`${SwitchSelectorColor.SECONDARY}`]: 'border-secondary text-secondary',\n [`${SwitchSelectorColor.DESTRUCTIVE}`]:\n 'border-destructive bg-destructive text-destructive',\n [`${SwitchSelectorColor.NEUTRAL}`]: 'border-neutral text-neutral',\n [`${SwitchSelectorColor.LIGHT}`]: 'border-white text-white',\n [`${SwitchSelectorColor.DARK}`]: 'border-neutral-800 text-neutral-800',\n [`${SwitchSelectorColor.TEXT}`]: 'border-text text-text',\n },\n disabled: {\n true: 'cursor-not-allowed opacity-50',\n false: '',\n },\n },\n defaultVariants: {\n color: `${SwitchSelectorColor.PRIMARY}`,\n disabled: false,\n },\n }\n);\n\nexport enum SwitchSelectorSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nconst choiceVariant = cva(\n 'z-1 w-full flex-1 cursor-pointer font-medium text-sm transition-all duration-300 ease-in-out aria-selected:cursor-default data-[indicator=true]:text-text-opposite motion-reduce:transition-none',\n {\n variants: {\n size: {\n [`${SwitchSelectorSize.SM}`]: 'px-2 py-1 text-xs',\n [`${SwitchSelectorSize.MD}`]: 'p-2 text-sm',\n [`${SwitchSelectorSize.LG}`]: 'p-4 text-base',\n },\n },\n defaultVariants: {\n size: `${SwitchSelectorSize.MD}`,\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-0 h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n [`${SwitchSelectorColor.PRIMARY}`]:\n 'bg-primary data-[indicator=true]:text-text',\n [`${SwitchSelectorColor.SECONDARY}`]:\n 'bg-secondary data-[indicator=true]:text-text',\n [`${SwitchSelectorColor.DESTRUCTIVE}`]:\n 'bg-destructive data-[indicator=true]:text-text',\n [`${SwitchSelectorColor.NEUTRAL}`]:\n 'bg-neutral data-[indicator=true]:text-white',\n [`${SwitchSelectorColor.LIGHT}`]:\n 'bg-white data-[indicator=true]:text-black',\n [`${SwitchSelectorColor.DARK}`]:\n 'bg-neutral-800 data-[indicator=true]:text-white',\n [`${SwitchSelectorColor.TEXT}`]:\n 'bg-text data-[indicator=true]:text-text-opposite',\n },\n },\n }\n);\n\n/**\n *\n * Component that allows the user to select one of the provided choices.\n *\n * Example:\n * ```jsx\n * <SwitchSelector\n * choices={[\n * { content: 'Option 1', value: 'option1' },\n * { content: 'Option 2', value: 'option2' },\n * { content: 'Option 3', value: 'option3' },\n * ]}\n * value=\"option1\"\n * onChange={(choice) => console.log(choice)}\n * />\n * ```\n */\nexport const SwitchSelector = <T,>({\n choices = defaultChoices as SwitchSelectorChoices<T>,\n value,\n defaultValue,\n onChange,\n color = SwitchSelectorColor.PRIMARY,\n size = SwitchSelectorSize.MD,\n className,\n itemClassName,\n hoverable = true,\n disabled = false,\n}: SwitchSelectorProps<T>) => {\n const [valueState, setValue] = useState<T>(\n value ?? defaultValue ?? choices[0].value\n );\n const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);\n\n const optionsRefs = useRef<HTMLButtonElement[]>([]);\n const indicatorRef = useRef<HTMLDivElement | null>(null);\n const { choiceIndicatorPosition } = useItemSelector(optionsRefs, {\n isHoverable: hoverable,\n });\n\n const selectedIndex = choices.findIndex(\n (choice) => choice.value === valueState\n );\n\n // The indicator follows hover if hoverable, otherwise the selected option\n const indicatorIndex =\n hoverable && hoveredIndex !== null ? hoveredIndex : selectedIndex;\n\n const handleChange = (newValue: T) => {\n setValue(newValue);\n onChange?.(newValue);\n };\n\n useEffect(() => {\n if (value === undefined) return;\n setValue(value);\n }, [value]);\n\n return (\n <div\n className={switchSelectorVariant({\n color,\n disabled,\n className,\n })}\n role=\"tablist\"\n aria-disabled={disabled ? 'true' : undefined}\n >\n <div className=\"relative flex size-full flex-row items-center justify-center\">\n {choices.map((choice, index) => {\n const { content, value, ...buttonProps } = choice;\n\n const isKeyOfKey =\n typeof value === 'string' || typeof value === 'number';\n\n const isSelected = index === selectedIndex;\n const isIndicatorOwner = index === indicatorIndex;\n\n return (\n <button\n {...buttonProps}\n className={cn(\n choiceVariant({\n size,\n }),\n disabled && 'cursor-not-allowed',\n itemClassName\n )}\n key={isKeyOfKey ? value : index}\n role=\"tab\"\n onClick={() => handleChange(value)}\n aria-selected={isSelected ? 'true' : undefined}\n data-indicator={isIndicatorOwner ? 'true' : undefined}\n disabled={disabled || isSelected}\n tabIndex={isSelected ? 0 : -1}\n ref={(el) => {\n optionsRefs.current[index] = el!;\n }}\n onMouseEnter={() => !disabled && setHoveredIndex(index)}\n onMouseLeave={() => !disabled && setHoveredIndex(null)}\n >\n {content}\n </button>\n );\n })}\n\n {choiceIndicatorPosition && (\n <div\n className={cn(\n indicatorVariant({\n color,\n })\n )}\n style={choiceIndicatorPosition}\n ref={indicatorRef}\n />\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAmBA,MAAM,iBAAiD,CACrD;CAAE,SAAS;CAAO,OAAO;CAAO,EAChC;CAAE,SAAS;CAAM,OAAO;CAAM,CAC/B;AAcD,IAAY,sBAAL;AACL;AACA;AACA;AAC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D;EACE,WAAW,sBAAsB;GAC/B;GACA;GACA;GACD,CAAC;EACF,MAAK;EACL,iBAAe,WAAW,SAAS;YAEnC,qBAAC,OAAD;GAAK,WAAU;aAAf,CACG,QAAQ,KAAK,QAAQ,UAAU;IAC9B,MAAM,EAAE,SAAS,OAAO,GAAG,gBAAgB;IAE3C,MAAM,aACJ,OAAO,UAAU,YAAY,OAAO,UAAU;IAEhD,MAAM,aAAa,UAAU;IAC7B,MAAM,mBAAmB,UAAU;AAEnC,WACE,8BAAC,UAAD;KACE,GAAI;KACJ,WAAW,GACT,cAAc,EACZ,MACD,CAAC,EACF,YAAY,sBACZ,cACD;KACD,KAAK,aAAa,QAAQ;KAC1B,MAAK;KACL,eAAe,aAAa,MAAM;KAClC,iBAAe,aAAa,SAAS;KACrC,kBAAgB,mBAAmB,SAAS;KAC5C,UAAU,YAAY;KACtB,UAAU,aAAa,IAAI;KAC3B,MAAM,OAAO;AACX,kBAAY,QAAQ,SAAS;;KAE/B,oBAAoB,CAAC,YAAY,gBAAgB,MAAM;KACvD,oBAAoB,CAAC,YAAY,gBAAgB,KAAK;KAG/C,EADN,QACM;KAEX,EAED,2BACC,oBAAC,OAAD;IACE,WAAW,GACT,iBAAiB,EACf,OACD,CAAC,CACH;IACD,OAAO;IACP,KAAK;IACL,EAEA;;EACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/SwitchSelector/index.tsx"],"mappings":";;;;;;KAaY,oBAAA;EACV,OAAA,EAAS,SAAA;EACT,KAAA,EAAO,CAAA;AAAA,IACL,cAAA,CAAe,iBAAA;AAAA,KACP,qBAAA,MAA2B,oBAAA,CAAqB,CAAA;AAAA,KAOhD,mBAAA;EACV,OAAA,GAAU,qBAAA,CAAsB,CAAA;EAChC,KAAA,GAAQ,CAAA;EACR,YAAA,GAAe,CAAA;EACf,QAAA,IAAY,MAAA,EAAQ,CAAA;EACpB,SAAA;EACA,aAAA;EACA,SAAA;EACA,QAAA;AAAA,IACE,YAAA,QAAoB,qBAAA,IACtB,YAAA,QAAoB,aAAA;AAAA,aAEV,mBAAA;EACV,OAAA;EACA,SAAA;EACA,WAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,cAGI,qBAAA,GAAqB,KAAA;;;IAwB1B,iCAAA,CAAA,SAAA;AAAA,aAEW,kBAAA;EACV,EAAA;EACA,EAAA;EACA,EAAA;AAAA;AAAA,cAGI,aAAA,GAAa,KAAA;;IAclB,iCAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cA2CY,cAAA;EAAsB,OAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,KAAA;EAAA,IAAA;EAAA,SAAA;EAAA,aAAA;EAAA,SAAA;EAAA;AAAA,GAWhC,mBAAA,CAAoB,CAAA,MAAE,oBAAA,CAAA,GAAA,CAAA,OAAA"}