@intlayer/design-system 5.4.2 → 5.5.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.
Files changed (152) hide show
  1. package/dist/.vite/manifest.json +21 -67
  2. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +14 -2
  3. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  4. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +1 -0
  5. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  6. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +14 -2
  7. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  8. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +13 -2
  9. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  10. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -0
  11. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  12. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +13 -2
  13. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  14. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +30 -4
  15. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  16. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +2 -1
  17. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  18. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +32 -6
  19. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  20. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +32 -0
  21. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  22. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +68 -0
  23. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  24. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +32 -0
  25. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  26. package/dist/components/Footer/index.cjs +3 -3
  27. package/dist/components/Footer/index.cjs.map +1 -1
  28. package/dist/components/Footer/index.mjs +3 -3
  29. package/dist/components/Footer/index.mjs.map +1 -1
  30. package/dist/components/Link/Link.cjs +2 -2
  31. package/dist/components/Link/Link.cjs.map +1 -1
  32. package/dist/components/Link/Link.d.ts +1 -1
  33. package/dist/components/Link/Link.d.ts.map +1 -1
  34. package/dist/components/Link/Link.mjs +2 -2
  35. package/dist/components/Link/Link.mjs.map +1 -1
  36. package/dist/components/Logo/Logo.cjs +43 -0
  37. package/dist/components/Logo/Logo.cjs.map +1 -0
  38. package/dist/components/Logo/Logo.d.ts +6 -0
  39. package/dist/components/Logo/Logo.d.ts.map +1 -0
  40. package/dist/components/Logo/Logo.mjs +43 -0
  41. package/dist/components/Logo/Logo.mjs.map +1 -0
  42. package/dist/components/Logo/LogoTextOnly.cjs +14 -82
  43. package/dist/components/Logo/LogoTextOnly.cjs.map +1 -1
  44. package/dist/components/Logo/LogoTextOnly.d.ts +2 -3
  45. package/dist/components/Logo/LogoTextOnly.d.ts.map +1 -1
  46. package/dist/components/Logo/LogoTextOnly.mjs +14 -82
  47. package/dist/components/Logo/LogoTextOnly.mjs.map +1 -1
  48. package/dist/components/Logo/LogoWithText.cjs +43 -0
  49. package/dist/components/Logo/LogoWithText.cjs.map +1 -0
  50. package/dist/components/Logo/LogoWithText.d.ts +3 -0
  51. package/dist/components/Logo/LogoWithText.d.ts.map +1 -0
  52. package/dist/components/Logo/LogoWithText.mjs +43 -0
  53. package/dist/components/Logo/LogoWithText.mjs.map +1 -0
  54. package/dist/components/Logo/LogoWithTextBelow.cjs +43 -0
  55. package/dist/components/Logo/LogoWithTextBelow.cjs.map +1 -0
  56. package/dist/components/Logo/LogoWithTextBelow.d.ts +6 -0
  57. package/dist/components/Logo/LogoWithTextBelow.d.ts.map +1 -0
  58. package/dist/components/Logo/LogoWithTextBelow.mjs +43 -0
  59. package/dist/components/Logo/LogoWithTextBelow.mjs.map +1 -0
  60. package/dist/components/Logo/index.cjs +7 -63
  61. package/dist/components/Logo/index.cjs.map +1 -1
  62. package/dist/components/Logo/index.d.ts +4 -19
  63. package/dist/components/Logo/index.d.ts.map +1 -1
  64. package/dist/components/Logo/index.mjs +7 -63
  65. package/dist/components/Logo/index.mjs.map +1 -1
  66. package/dist/components/SocialNetworks/index.cjs +1 -1
  67. package/dist/components/SocialNetworks/index.cjs.map +1 -1
  68. package/dist/components/SocialNetworks/index.mjs +1 -1
  69. package/dist/components/SocialNetworks/index.mjs.map +1 -1
  70. package/dist/components/SwitchSelector/index.cjs +1 -1
  71. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  72. package/dist/components/SwitchSelector/index.d.ts +1 -1
  73. package/dist/components/SwitchSelector/index.d.ts.map +1 -1
  74. package/dist/components/SwitchSelector/index.mjs +1 -1
  75. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  76. package/dist/components/index.cjs +8 -2
  77. package/dist/components/index.cjs.map +1 -1
  78. package/dist/components/index.mjs +7 -1
  79. package/dist/components/index.mjs.map +1 -1
  80. package/dist/hooks/index.cjs +1 -0
  81. package/dist/hooks/index.cjs.map +1 -1
  82. package/dist/hooks/index.mjs +2 -1
  83. package/dist/hooks/intlayerAPIHooks.cjs +6 -0
  84. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  85. package/dist/hooks/intlayerAPIHooks.d.ts +2 -1
  86. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  87. package/dist/hooks/intlayerAPIHooks.mjs +6 -0
  88. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  89. package/dist/hooks/useIntlayerAPI.d.ts +2 -1
  90. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  91. package/dist/tailwind.css +1 -1
  92. package/package.json +18 -18
  93. package/dist/components/Logo/LogoCircle.cjs +0 -28
  94. package/dist/components/Logo/LogoCircle.cjs.map +0 -1
  95. package/dist/components/Logo/LogoCircle.d.ts +0 -4
  96. package/dist/components/Logo/LogoCircle.d.ts.map +0 -1
  97. package/dist/components/Logo/LogoCircle.mjs +0 -28
  98. package/dist/components/Logo/LogoCircle.mjs.map +0 -1
  99. package/dist/components/Logo/LogoNoFrame.cjs +0 -111
  100. package/dist/components/Logo/LogoNoFrame.cjs.map +0 -1
  101. package/dist/components/Logo/LogoNoFrame.d.ts +0 -4
  102. package/dist/components/Logo/LogoNoFrame.d.ts.map +0 -1
  103. package/dist/components/Logo/LogoNoFrame.mjs +0 -111
  104. package/dist/components/Logo/LogoNoFrame.mjs.map +0 -1
  105. package/dist/components/Logo/LogoSquare.cjs +0 -28
  106. package/dist/components/Logo/LogoSquare.cjs.map +0 -1
  107. package/dist/components/Logo/LogoSquare.d.ts +0 -4
  108. package/dist/components/Logo/LogoSquare.d.ts.map +0 -1
  109. package/dist/components/Logo/LogoSquare.mjs +0 -28
  110. package/dist/components/Logo/LogoSquare.mjs.map +0 -1
  111. package/dist/components/Logo/LogoSquircle.cjs +0 -65
  112. package/dist/components/Logo/LogoSquircle.cjs.map +0 -1
  113. package/dist/components/Logo/LogoSquircle.d.ts +0 -4
  114. package/dist/components/Logo/LogoSquircle.d.ts.map +0 -1
  115. package/dist/components/Logo/LogoSquircle.mjs +0 -65
  116. package/dist/components/Logo/LogoSquircle.mjs.map +0 -1
  117. package/dist/components/Logo/LogoWithTextBelowCircle.cjs +0 -115
  118. package/dist/components/Logo/LogoWithTextBelowCircle.cjs.map +0 -1
  119. package/dist/components/Logo/LogoWithTextBelowCircle.d.ts +0 -4
  120. package/dist/components/Logo/LogoWithTextBelowCircle.d.ts.map +0 -1
  121. package/dist/components/Logo/LogoWithTextBelowCircle.mjs +0 -115
  122. package/dist/components/Logo/LogoWithTextBelowCircle.mjs.map +0 -1
  123. package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs +0 -114
  124. package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs.map +0 -1
  125. package/dist/components/Logo/LogoWithTextBelowNoFrame.d.ts +0 -4
  126. package/dist/components/Logo/LogoWithTextBelowNoFrame.d.ts.map +0 -1
  127. package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs +0 -114
  128. package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs.map +0 -1
  129. package/dist/components/Logo/LogoWithTextBelowSquircle.cjs +0 -68
  130. package/dist/components/Logo/LogoWithTextBelowSquircle.cjs.map +0 -1
  131. package/dist/components/Logo/LogoWithTextBelowSquircle.d.ts +0 -4
  132. package/dist/components/Logo/LogoWithTextBelowSquircle.d.ts.map +0 -1
  133. package/dist/components/Logo/LogoWithTextBelowSquircle.mjs +0 -68
  134. package/dist/components/Logo/LogoWithTextBelowSquircle.mjs.map +0 -1
  135. package/dist/components/Logo/LogoWithTextCircle.cjs +0 -202
  136. package/dist/components/Logo/LogoWithTextCircle.cjs.map +0 -1
  137. package/dist/components/Logo/LogoWithTextCircle.d.ts +0 -4
  138. package/dist/components/Logo/LogoWithTextCircle.d.ts.map +0 -1
  139. package/dist/components/Logo/LogoWithTextCircle.mjs +0 -202
  140. package/dist/components/Logo/LogoWithTextCircle.mjs.map +0 -1
  141. package/dist/components/Logo/LogoWithTextNoFrame.cjs +0 -114
  142. package/dist/components/Logo/LogoWithTextNoFrame.cjs.map +0 -1
  143. package/dist/components/Logo/LogoWithTextNoFrame.d.ts +0 -4
  144. package/dist/components/Logo/LogoWithTextNoFrame.d.ts.map +0 -1
  145. package/dist/components/Logo/LogoWithTextNoFrame.mjs +0 -114
  146. package/dist/components/Logo/LogoWithTextNoFrame.mjs.map +0 -1
  147. package/dist/components/Logo/LogoWithTextSquircle.cjs +0 -68
  148. package/dist/components/Logo/LogoWithTextSquircle.cjs.map +0 -1
  149. package/dist/components/Logo/LogoWithTextSquircle.d.ts +0 -4
  150. package/dist/components/Logo/LogoWithTextSquircle.d.ts.map +0 -1
  151. package/dist/components/Logo/LogoWithTextSquircle.mjs +0 -68
  152. package/dist/components/Logo/LogoWithTextSquircle.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayer',\n component: <LinkedInLogo className=\"max-w-full max-h-full\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer_org/',\n component: <InstagramLogo className=\"max-w-full max-h-full\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":["jsx","ProductHuntLogo","XLogo","YoutubeLogo","LinkedInLogo","TiktokLogo","InstagramLogo","FacebookLogo","createElement"],"mappings":";;;;;;;;;;;AASA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAWA,2BAAAA,IAACC,0CAAAA,iBAAgB,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC9D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWD,2BAAAA,IAACE,gCAAAA,OAAM,EAAA,WAAU,wBAAwB,CAAA;AAAA,IACpD,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWF,2BAAAA,IAACG,sCAAAA,aAAY,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC1D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWH,2BAAAA,IAACI,uCAAAA,cAAa,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC3D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWJ,2BAAAA,IAACK,qCAAAA,YAAW,EAAA,WAAU,wBAAwB,CAAA;AAAA,IACzD,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWL,2BAAAA,IAACM,wCAAAA,eAAc,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC5D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWN,2BAAAA,IAACO,uCAAAA,cAAa,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC3D,OAAO;AAAA,EAAA;AAEX;AAiBA,MAAM,oBAAgD,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEP,2BAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC;AAAA,IACA,cAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAG;AAAA,IAEH,UAAA;AAAA,EAAA;AAAA,EANI;AAOP;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACCQ,6BAAA,cAAA,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAO,CAAA;AAErE;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer_org/',\n component: <InstagramLogo className=\"max-w-full max-h-full\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":["jsx","Product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,UAAA;AAAA,EAAA;AAAA,EANI;AAOP;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACCQ,6BAAA,cAAA,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAO,CAAA;AAErE;;;;;;;;;"}
@@ -24,7 +24,7 @@ const socialNetworks = [
24
24
  label: "YouTube"
25
25
  },
26
26
  {
27
- href: "https://www.linkedin.com/company/intlayer",
27
+ href: "https://www.linkedin.com/company/intlayerorg",
28
28
  component: /* @__PURE__ */ jsx(LinkedInLogo, { className: "max-w-full max-h-full" }),
29
29
  label: "LinkedIn"
30
30
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayer',\n component: <LinkedInLogo className=\"max-w-full max-h-full\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer_org/',\n component: <InstagramLogo className=\"max-w-full max-h-full\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":[],"mappings":";;;;;;;;;AASA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,iBAAgB,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC9D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,OAAM,EAAA,WAAU,wBAAwB,CAAA;AAAA,IACpD,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,aAAY,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC1D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,cAAa,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC3D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,YAAW,EAAA,WAAU,wBAAwB,CAAA;AAAA,IACzD,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,eAAc,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC5D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,cAAa,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC3D,OAAO;AAAA,EAAA;AAEX;AAiBA,MAAM,oBAAgD,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC;AAAA,IACA,cAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAG;AAAA,IAEH,UAAA;AAAA,EAAA;AAAA,EANI;AAOP;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACC,8BAAA,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAO,CAAA;AAErE;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer_org/',\n component: <InstagramLogo className=\"max-w-full max-h-full\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":[],"mappings":";;;;;;;;;AASA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,iBAAgB,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC9D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,OAAM,EAAA,WAAU,wBAAwB,CAAA;AAAA,IACpD,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,aAAY,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC1D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,cAAa,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC3D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,YAAW,EAAA,WAAU,wBAAwB,CAAA;AAAA,IACzD,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,eAAc,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC5D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,cAAa,EAAA,WAAU,wBAAwB,CAAA;AAAA,IAC3D,OAAO;AAAA,EAAA;AAEX;AAiBA,MAAM,oBAAgD,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC;AAAA,IACA,cAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAG;AAAA,IAEH,UAAA;AAAA,EAAA;AAAA,EANI;AAOP;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACC,8BAAA,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAO,CAAA;AAErE;"}
@@ -37,7 +37,7 @@ const switchSelectorVariant = classVarianceAuthority.cva(
37
37
  }
38
38
  );
39
39
  const choiceVariant = classVarianceAuthority.cva(
40
- "z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none",
40
+ "z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out cursor-pointer aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none",
41
41
  {
42
42
  variants: {
43
43
  size: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/SwitchSelector/index.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n useRef,\n type ReactNode,\n type HTMLAttributes,\n useState,\n useEffect,\n} from 'react';\nimport { useItemSelector } from '../../hooks';\nimport { cn } from '../../utils/cn';\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} & VariantProps<typeof switchSelectorVariant> &\n VariantProps<typeof choiceVariant>;\n\nconst switchSelectorVariant = cva(\n 'flex flex-row gap-2 rounded-full w-fit border-[1.5px] p-[1.5px]',\n {\n variants: {\n color: {\n primary: 'border-primary text-primary',\n secondary: 'border-secondary text-secondary',\n destructive: 'border-destructive bg-destructive text-destructive',\n neutral: 'border-neutral text-neutral ',\n light: 'border-white text-white',\n dark: 'border-neutral-800 text-neutral-800',\n text: 'border-text text-text',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nconst choiceVariant = cva(\n 'z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none',\n {\n variants: {\n size: {\n sm: 'py-1 px-2 text-xs',\n md: 'p-2 text-sm',\n lg: 'p-4 text-base',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-[-1] h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n primary: 'bg-primary aria-selected:text-text',\n secondary: 'bg-secondary aria-selected:text-text',\n destructive: 'bg-destructive aria-selected:text-text',\n neutral: 'bg-neutral aria-selected:text-white ',\n light: 'bg-white aria-selected:text-black',\n dark: 'bg-neutral-800 aria-selected:text-white',\n text: 'bg-text aria-selected: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 = 'primary',\n size = 'md',\n className,\n}: SwitchSelectorProps<T>) => {\n const [valueState, setValue] = useState<T>(\n value ?? defaultValue ?? choices[0].value\n );\n const optionsRefs = useRef<HTMLButtonElement[]>([]);\n const indicatorRef = useRef<HTMLDivElement | null>(null);\n const { choiceIndicatorPosition } = useItemSelector(optionsRefs);\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 className,\n })}\n role=\"tablist\"\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 = value === valueState;\n\n return (\n <button\n {...buttonProps}\n className={cn(\n choiceVariant({\n size,\n })\n )}\n key={isKeyOfKey ? value : index}\n role=\"tab\"\n onClick={() => handleChange(value)}\n aria-selected={isSelected}\n disabled={isSelected}\n ref={(el) => {\n optionsRefs.current[index] = el!;\n }}\n >\n {content}\n </button>\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"],"names":["cva","useState","useRef","useItemSelector","useEffect","jsx","jsxs","value","createElement","cn"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAM,iBAAiD;AAAA,EACrD,EAAE,SAAS,OAAO,OAAO,MAAM;AAAA,EAC/B,EAAE,SAAS,MAAM,OAAO,KAAK;AAC/B;AAWA,MAAM,wBAAwBA,uBAAA;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ;AAEA,MAAM,gBAAgBA,uBAAA;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IAER;AAAA,IACA,iBAAiB;AAAA,MACf,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;AAEA,MAAM,mBAAmBA,uBAAA;AAAA,EACvB;AAAA,EACA;A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kBACZ;AAAA,gBACD,CAAA;AAAA,cACH;AAAA,cACA,KAAK,aAAaF,SAAQ;AAAA,cAC1B,MAAK;AAAA,cACL,SAAS,MAAM,aAAaA,MAAK;AAAA,cACjC,iBAAe;AAAA,cACf,UAAU;AAAA,cACV,KAAK,CAAC,OAAO;AACC,4BAAA,QAAQ,KAAK,IAAI;AAAA,cAAA;AAAA,YAC/B;AAAA,YAEC;AAAA,UACH;AAAA,QAAA,CAEH;AAAA,QACA,2BACCF,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWI,SAAA;AAAA,cACT,iBAAiB;AAAA,gBACf;AAAA,cACD,CAAA;AAAA,YACH;AAAA,YACA,OAAO;AAAA,YACP,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACP,EAEJ,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/SwitchSelector/index.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n useEffect,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useItemSelector } from '../../hooks';\nimport { cn } from '../../utils/cn';\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} & VariantProps<typeof switchSelectorVariant> &\n VariantProps<typeof choiceVariant>;\n\nconst switchSelectorVariant = cva(\n 'flex flex-row gap-2 rounded-full w-fit border-[1.5px] p-[1.5px]',\n {\n variants: {\n color: {\n primary: 'border-primary text-primary',\n secondary: 'border-secondary text-secondary',\n destructive: 'border-destructive bg-destructive text-destructive',\n neutral: 'border-neutral text-neutral ',\n light: 'border-white text-white',\n dark: 'border-neutral-800 text-neutral-800',\n text: 'border-text text-text',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nconst choiceVariant = cva(\n 'z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out cursor-pointer aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none',\n {\n variants: {\n size: {\n sm: 'py-1 px-2 text-xs',\n md: 'p-2 text-sm',\n lg: 'p-4 text-base',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-[-1] h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n primary: 'bg-primary aria-selected:text-text',\n secondary: 'bg-secondary aria-selected:text-text',\n destructive: 'bg-destructive aria-selected:text-text',\n neutral: 'bg-neutral aria-selected:text-white ',\n light: 'bg-white aria-selected:text-black',\n dark: 'bg-neutral-800 aria-selected:text-white',\n text: 'bg-text aria-selected: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 = 'primary',\n size = 'md',\n className,\n}: SwitchSelectorProps<T>) => {\n const [valueState, setValue] = useState<T>(\n value ?? defaultValue ?? choices[0].value\n );\n const optionsRefs = useRef<HTMLButtonElement[]>([]);\n const indicatorRef = useRef<HTMLDivElement | null>(null);\n const { choiceIndicatorPosition } = useItemSelector(optionsRefs);\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 className,\n })}\n role=\"tablist\"\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 = value === valueState;\n\n return (\n <button\n {...buttonProps}\n className={cn(\n choiceVariant({\n size,\n })\n )}\n key={isKeyOfKey ? value : index}\n role=\"tab\"\n onClick={() => handleChange(value)}\n aria-selected={isSelected}\n disabled={isSelected}\n ref={(el) => {\n optionsRefs.current[index] = el!;\n }}\n >\n {content}\n </button>\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"],"names":["cva","useState","useRef","useItemSelector","useEffect","jsx","jsxs","value","createElement","cn"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAM,iBAAiD;AAAA,EACrD,EAAE,SAAS,OAAO,OAAO,MAAM;AAAA,EAC/B,EAAE,SAAS,MAAM,OAAO,KAAK;AAC/B;AAWA,MAAM,wBAAwBA,uBAAA;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ;AAEA,MAAM,gBAAgBA,uBAAA;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAA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BAAM,aAAaA,WAAU;AAG3B,iBAAAC,6BAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACE,GAAG;AAAA,cACJ,WAAWC,SAAA;AAAA,gBACT,cAAc;AAAA,kBACZ;AAAA,gBACD,CAAA;AAAA,cACH;AAAA,cACA,KAAK,aAAaF,SAAQ;AAAA,cAC1B,MAAK;AAAA,cACL,SAAS,MAAM,aAAaA,MAAK;AAAA,cACjC,iBAAe;AAAA,cACf,UAAU;AAAA,cACV,KAAK,CAAC,OAAO;AACC,4BAAA,QAAQ,KAAK,IAAI;AAAA,cAAA;AAAA,YAC/B;AAAA,YAEC;AAAA,UACH;AAAA,QAAA,CAEH;AAAA,QACA,2BACCF,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWI,SAAA;AAAA,cACT,iBAAiB;AAAA,gBACf;AAAA,cACD,CAAA;AAAA,YACH;AAAA,YACA,OAAO;AAAA,YACP,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACP,EAEJ,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ReactNode, HTMLAttributes } from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
3
  export type SwitchSelectorChoice<T = boolean> = {
4
4
  content: ReactNode;
5
5
  value: T;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchSelector/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,cAAc,EAGpB,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC9C,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,CAAC,CAAC;CACV,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;AACtC,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ACnC,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,GAC5C,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAErC,QAAA,MAAM,qBAAqB;;8EAkB1B,CAAC;AAEF,QAAA,MAAM,aAAa;;8EAclB,CAAC;AAmBF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,EAAG,qEAQhC,mBAAmB,CAAC,CAAC,CAAC,4CAsExB,CAAC"}
@@ -35,7 +35,7 @@ const switchSelectorVariant = cva(
35
35
  }
36
36
  );
37
37
  const choiceVariant = cva(
38
- "z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none",
38
+ "z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out cursor-pointer aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none",
39
39
  {
40
40
  variants: {
41
41
  size: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/SwitchSelector/index.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n useRef,\n type ReactNode,\n type HTMLAttributes,\n useState,\n useEffect,\n} from 'react';\nimport { useItemSelector } from '../../hooks';\nimport { cn } from '../../utils/cn';\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} & VariantProps<typeof switchSelectorVariant> &\n VariantProps<typeof choiceVariant>;\n\nconst switchSelectorVariant = cva(\n 'flex flex-row gap-2 rounded-full w-fit border-[1.5px] p-[1.5px]',\n {\n variants: {\n color: {\n primary: 'border-primary text-primary',\n secondary: 'border-secondary text-secondary',\n destructive: 'border-destructive bg-destructive text-destructive',\n neutral: 'border-neutral text-neutral ',\n light: 'border-white text-white',\n dark: 'border-neutral-800 text-neutral-800',\n text: 'border-text text-text',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nconst choiceVariant = cva(\n 'z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none',\n {\n variants: {\n size: {\n sm: 'py-1 px-2 text-xs',\n md: 'p-2 text-sm',\n lg: 'p-4 text-base',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-[-1] h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n primary: 'bg-primary aria-selected:text-text',\n secondary: 'bg-secondary aria-selected:text-text',\n destructive: 'bg-destructive aria-selected:text-text',\n neutral: 'bg-neutral aria-selected:text-white ',\n light: 'bg-white aria-selected:text-black',\n dark: 'bg-neutral-800 aria-selected:text-white',\n text: 'bg-text aria-selected: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 = 'primary',\n size = 'md',\n className,\n}: SwitchSelectorProps<T>) => {\n const [valueState, setValue] = useState<T>(\n value ?? defaultValue ?? choices[0].value\n );\n const optionsRefs = useRef<HTMLButtonElement[]>([]);\n const indicatorRef = useRef<HTMLDivElement | null>(null);\n const { choiceIndicatorPosition } = useItemSelector(optionsRefs);\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 className,\n })}\n role=\"tablist\"\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 = value === valueState;\n\n return (\n <button\n {...buttonProps}\n className={cn(\n choiceVariant({\n size,\n })\n )}\n key={isKeyOfKey ? value : index}\n role=\"tab\"\n onClick={() => handleChange(value)}\n aria-selected={isSelected}\n disabled={isSelected}\n ref={(el) => {\n optionsRefs.current[index] = el!;\n }}\n >\n {content}\n </button>\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"],"names":["value"],"mappings":";;;;;;;;;;;;;AAmBA,MAAM,iBAAiD;AAAA,EACrD,EAAE,SAAS,OAAO,OAAO,MAAM;AAAA,EAC/B,EAAE,SAAS,MAAM,OAAO,KAAK;AAC/B;AAWA,MAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,OAA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B,gBAAM,EAAE,SAAS,OAAAA,QAAO,GAAG,YAAgB,IAAA;AAE3C,gBAAM,aACJ,OAAOA,WAAU,YAAY,OAAOA,WAAU;AAEhD,gBAAM,aAAaA,WAAU;AAG3B,iBAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACE,GAAG;AAAA,cACJ,WAAW;AAAA,gBACT,cAAc;AAAA,kBACZ;AAAA,gBACD,CAAA;AAAA,cACH;AAAA,cACA,KAAK,aAAaA,SAAQ;AAAA,cAC1B,MAAK;AAAA,cACL,SAAS,MAAM,aAAaA,MAAK;AAAA,cACjC,iBAAe;AAAA,cACf,UAAU;AAAA,cACV,KAAK,CAAC,OAAO;AACC,4BAAA,QAAQ,KAAK,IAAI;AAAA,cAAA;AAAA,YAC/B;AAAA,YAEC;AAAA,UACH;AAAA,QAAA,CAEH;AAAA,QACA,2BACC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW;AAAA,cACT,iBAAiB;AAAA,gBACf;AAAA,cACD,CAAA;AAAA,YACH;AAAA,YACA,OAAO;AAAA,YACP,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACP,EAEJ,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/SwitchSelector/index.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n useEffect,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useItemSelector } from '../../hooks';\nimport { cn } from '../../utils/cn';\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} & VariantProps<typeof switchSelectorVariant> &\n VariantProps<typeof choiceVariant>;\n\nconst switchSelectorVariant = cva(\n 'flex flex-row gap-2 rounded-full w-fit border-[1.5px] p-[1.5px]',\n {\n variants: {\n color: {\n primary: 'border-primary text-primary',\n secondary: 'border-secondary text-secondary',\n destructive: 'border-destructive bg-destructive text-destructive',\n neutral: 'border-neutral text-neutral ',\n light: 'border-white text-white',\n dark: 'border-neutral-800 text-neutral-800',\n text: 'border-text text-text',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nconst choiceVariant = cva(\n 'z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out cursor-pointer aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none',\n {\n variants: {\n size: {\n sm: 'py-1 px-2 text-xs',\n md: 'p-2 text-sm',\n lg: 'p-4 text-base',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-[-1] h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n primary: 'bg-primary aria-selected:text-text',\n secondary: 'bg-secondary aria-selected:text-text',\n destructive: 'bg-destructive aria-selected:text-text',\n neutral: 'bg-neutral aria-selected:text-white ',\n light: 'bg-white aria-selected:text-black',\n dark: 'bg-neutral-800 aria-selected:text-white',\n text: 'bg-text aria-selected: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 = 'primary',\n size = 'md',\n className,\n}: SwitchSelectorProps<T>) => {\n const [valueState, setValue] = useState<T>(\n value ?? defaultValue ?? choices[0].value\n );\n const optionsRefs = useRef<HTMLButtonElement[]>([]);\n const indicatorRef = useRef<HTMLDivElement | null>(null);\n const { choiceIndicatorPosition } = useItemSelector(optionsRefs);\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 className,\n })}\n role=\"tablist\"\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 = value === valueState;\n\n return (\n <button\n {...buttonProps}\n className={cn(\n choiceVariant({\n size,\n })\n )}\n key={isKeyOfKey ? value : index}\n role=\"tab\"\n onClick={() => handleChange(value)}\n aria-selected={isSelected}\n disabled={isSelected}\n ref={(el) => {\n optionsRefs.current[index] = el!;\n }}\n >\n {content}\n </button>\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"],"names":["value"],"mappings":";;;;;;;;;;;;;AAmBA,MAAM,iBAAiD;AAAA,EACrD,EAAE,SAAS,OAAO,OAAO,MAAM;AAAA,EAC/B,EAAE,SAAS,MAAM,OAAO,KAAK;AAC/B;AAWA,MAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,EAC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AAAA,QAAO,GAAG,YAAgB,IAAA;AAE3C,gBAAM,aACJ,OAAOA,WAAU,YAAY,OAAOA,WAAU;AAEhD,gBAAM,aAAaA,WAAU;AAG3B,iBAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACE,GAAG;AAAA,cACJ,WAAW;AAAA,gBACT,cAAc;AAAA,kBACZ;AAAA,gBACD,CAAA;AAAA,cACH;AAAA,cACA,KAAK,aAAaA,SAAQ;AAAA,cAC1B,MAAK;AAAA,cACL,SAAS,MAAM,aAAaA,MAAK;AAAA,cACjC,iBAAe;AAAA,cACf,UAAU;AAAA,cACV,KAAK,CAAC,OAAO;AACC,4BAAA,QAAQ,KAAK,IAAI;AAAA,cAAA;AAAA,YAC/B;AAAA,YAEC;AAAA,UACH;AAAA,QAAA,CAEH;AAAA,QACA,2BACC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW;AAAA,cACT,iBAAiB;AAAA,gBACf;AAAA,cACD,CAAA;AAAA,YACH;AAAA,YACA,OAAO;AAAA,YACP,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACP,EAEJ,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -56,7 +56,10 @@ const components_Loader_index = require("./Loader/index.cjs");
56
56
  const components_LocaleSwitcherContentDropDown_LocaleSwitcherContent = require("./LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs");
57
57
  const components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext = require("./LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs");
58
58
  const components_LocaleSwitcherDropDown_LocaleSwitcher = require("./LocaleSwitcherDropDown/LocaleSwitcher.cjs");
59
- const components_Logo_index = require("./Logo/index.cjs");
59
+ const components_Logo_Logo = require("./Logo/Logo.cjs");
60
+ const components_Logo_LogoTextOnly = require("./Logo/LogoTextOnly.cjs");
61
+ const components_Logo_LogoWithText = require("./Logo/LogoWithText.cjs");
62
+ const components_Logo_LogoWithTextBelow = require("./Logo/LogoWithTextBelow.cjs");
60
63
  const components_MarkDownRender_index = require("./MarkDownRender/index.cjs");
61
64
  const components_MaxHeightSmoother_index = require("./MaxHeightSmoother/index.cjs");
62
65
  const components_MaxWidthSmoother_index = require("./MaxWidthSmoother/index.cjs");
@@ -163,7 +166,10 @@ exports.LocaleSwitcherContent = components_LocaleSwitcherContentDropDown_LocaleS
163
166
  exports.LocaleSwitcherContentProvider = components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext.LocaleSwitcherContentProvider;
164
167
  exports.useLocaleSwitcherContent = components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext.useLocaleSwitcherContent;
165
168
  exports.LocaleSwitcher = components_LocaleSwitcherDropDown_LocaleSwitcher.LocaleSwitcher;
166
- exports.Logo = components_Logo_index.Logo;
169
+ exports.Logo = components_Logo_Logo.Logo;
170
+ exports.LogoTextOnly = components_Logo_LogoTextOnly.LogoTextOnly;
171
+ exports.LogoWithText = components_Logo_LogoWithText.LogoWithText;
172
+ exports.LogoWithTextBelow = components_Logo_LogoWithTextBelow.LogoWithTextBelow;
167
173
  exports.MarkdownRenderer = components_MarkDownRender_index.MarkdownRenderer;
168
174
  exports.MaxHeightSmoother = components_MaxHeightSmoother_index.MaxHeightSmoother;
169
175
  exports.MaxWidthSmoother = components_MaxWidthSmoother_index.MaxWidthSmoother;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -54,7 +54,10 @@ import { Loader } from "./Loader/index.mjs";
54
54
  import { LocaleSwitcherContent } from "./LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs";
55
55
  import { LocaleSwitcherContentProvider, useLocaleSwitcherContent } from "./LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
56
56
  import { LocaleSwitcher } from "./LocaleSwitcherDropDown/LocaleSwitcher.mjs";
57
- import { Logo } from "./Logo/index.mjs";
57
+ import { Logo } from "./Logo/Logo.mjs";
58
+ import { LogoTextOnly } from "./Logo/LogoTextOnly.mjs";
59
+ import { LogoWithText } from "./Logo/LogoWithText.mjs";
60
+ import { LogoWithTextBelow } from "./Logo/LogoWithTextBelow.mjs";
58
61
  import { MarkdownRenderer } from "./MarkDownRender/index.mjs";
59
62
  import { MaxHeightSmoother } from "./MaxHeightSmoother/index.mjs";
60
63
  import { MaxWidthSmoother } from "./MaxWidthSmoother/index.mjs";
@@ -149,6 +152,9 @@ export {
149
152
  LocaleSwitcherContent,
150
153
  LocaleSwitcherContentProvider,
151
154
  Logo,
155
+ LogoTextOnly,
156
+ LogoWithText,
157
+ LogoWithTextBelow,
152
158
  MarkdownRenderer,
153
159
  MaxHeightSmoother,
154
160
  MaxWidthSmoother,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -68,6 +68,7 @@ exports.useRegister = hooks_intlayerAPIHooks.useRegister;
68
68
  exports.useResetPassword = hooks_intlayerAPIHooks.useResetPassword;
69
69
  exports.useSelectOrganization = hooks_intlayerAPIHooks.useSelectOrganization;
70
70
  exports.useSelectProject = hooks_intlayerAPIHooks.useSelectProject;
71
+ exports.useTranslateJSONDeclaration = hooks_intlayerAPIHooks.useTranslateJSONDeclaration;
71
72
  exports.useUnselectOrganization = hooks_intlayerAPIHooks.useUnselectOrganization;
72
73
  exports.useUnselectProject = hooks_intlayerAPIHooks.useUnselectProject;
73
74
  exports.useUpdateDictionary = hooks_intlayerAPIHooks.useUpdateDictionary;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,7 +5,7 @@ import { useIsMounted } from "./useIsMounted.mjs";
5
5
  import { useScrollDetection } from "./useScrollDetection.mjs";
6
6
  import { useAsync } from "./useAsync/useAsync.mjs";
7
7
  import { AsyncStateProvider, useAsyncState } from "./useAsync/useAsyncStateStore.mjs";
8
- import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddProject, useAddTag, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditTag, useAutocomplete, useCancelSubscription, useChangePassword, useCheckIfUserHasPassword, useCreateUser, useDefineNewPassword, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeleteProject, useDeleteTag, useDeleteUser, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetOrganizations, useGetPricing, useGetProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUsers, useLogin, useLogout, usePushDictionaries, useRefreshAccessKey, useRegister, useResetPassword, useSelectOrganization, useSelectProject, useUnselectOrganization, useUnselectProject, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateProject, useUpdateProjectMembers, useUpdateTag, useUpdateUser, useVerifyEmail, useWriteDictionary } from "./intlayerAPIHooks.mjs";
8
+ import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddProject, useAddTag, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditTag, useAutocomplete, useCancelSubscription, useChangePassword, useCheckIfUserHasPassword, useCreateUser, useDefineNewPassword, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeleteProject, useDeleteTag, useDeleteUser, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetOrganizations, useGetPricing, useGetProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUsers, useLogin, useLogout, usePushDictionaries, useRefreshAccessKey, useRegister, useResetPassword, useSelectOrganization, useSelectProject, useTranslateJSONDeclaration, useUnselectOrganization, useUnselectProject, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateProject, useUpdateProjectMembers, useUpdateTag, useUpdateUser, useVerifyEmail, useWriteDictionary } from "./intlayerAPIHooks.mjs";
9
9
  import { useItemSelector } from "./useItemSelector.mjs";
10
10
  import { useGetAllDictionaries } from "./useGetAllDictionaries.mjs";
11
11
  import { usePersistedStore } from "./usePersistedStore.mjs";
@@ -72,6 +72,7 @@ export {
72
72
  useScrollDetection,
73
73
  useSelectOrganization,
74
74
  useSelectProject,
75
+ useTranslateJSONDeclaration,
75
76
  useUnselectOrganization,
76
77
  useUnselectProject,
77
78
  useUpdateDictionary,
@@ -412,6 +412,11 @@ const useCancelSubscription = (args) => useAppAsync(
412
412
  requireOrganization: true
413
413
  }
414
414
  );
415
+ const useTranslateJSONDeclaration = (args) => useAppAsync("translateJSON", hooks_useIntlayerAPI.useIntlayerAuth().ai.translateJSON, args, {
416
+ requireUser: true,
417
+ requireOrganization: true,
418
+ requireProject: true
419
+ });
415
420
  const useAuditContentDeclaration = (args) => useAppAsync(
416
421
  "auditContentDeclaration",
417
422
  hooks_useIntlayerAPI.useIntlayerAuth().ai.auditContentDeclaration,
@@ -496,6 +501,7 @@ exports.useRegister = useRegister;
496
501
  exports.useResetPassword = useResetPassword;
497
502
  exports.useSelectOrganization = useSelectOrganization;
498
503
  exports.useSelectProject = useSelectProject;
504
+ exports.useTranslateJSONDeclaration = useTranslateJSONDeclaration;
499
505
  exports.useUnselectOrganization = useUnselectOrganization;
500
506
  exports.useUnselectProject = useUnselectProject;
501
507
  exports.useUpdateDictionary = useUpdateDictionary;
@@ -1 +1 @@
1
- {"version":3,"file":"intlayerAPIHooks.cjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["'use client';\n\nimport type { IntlayerAPI } from '@intlayer/api';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from '../components/Auth/useAuth/index';\nimport { useToast } from '../components/Toaster';\nimport { type UseAsyncOptions, useAsync } from './useAsync/useAsync';\nimport { useIntlayerAuth } from './useIntlayerAPI';\n\n/**\n * Hook to handle error logging and toast notifications\n */\nconst useErrorHandling = <T extends UseAsyncOptions<any>>(options: T): T => {\n const { toast } = useToast();\n\n return {\n ...options,\n onError: (errorMessage) => {\n let error;\n\n // If json is valid, parse it\n try {\n if (typeof errorMessage === 'undefined') return;\n\n error = JSON.parse(errorMessage);\n } catch (e) {\n // If json is not valid, set error to the original errorMessage\n\n error = errorMessage;\n }\n\n // render toast for each error if there is more than one\n // otherwise render the toast with the error message\n [error]\n .flatMap((error) => error)\n .forEach((error) =>\n toast({\n title:\n (process.env.NODE_ENV === 'production'\n ? error.title\n : error.code) ?? 'Error',\n description: error.message ?? errorMessage ?? 'An error occurred',\n variant: 'error',\n })\n );\n options.onError?.(errorMessage);\n },\n onSuccess: (data) => {\n if (data?.message)\n toast({\n title: data.message,\n description: data.description,\n variant: 'success',\n });\n options.onSuccess?.(data);\n },\n };\n};\n\ntype AuthEnableOptions = {\n requireUser?: boolean;\n requireProject?: boolean;\n requireOrganization?: boolean;\n};\n\n/**\n * Hook to enable authentication\n */\nconst useAuthEnable = <T extends UseAsyncOptions<any>>(\n options: T,\n { requireUser, requireProject, requireOrganization }: AuthEnableOptions = {}\n): T => {\n const configuration = useConfiguration();\n const { csrfToken, oAuth2AccessToken, session } = useAuth({\n intlayerConfiguration: configuration,\n });\n\n const isEnabledOption = options?.enable ?? true;\n const user = session ? session.user : oAuth2AccessToken?.user;\n\n const organization = session\n ? session.organization\n : oAuth2AccessToken?.organization;\n\n const project = session ? session.project : oAuth2AccessToken?.project;\n\n const isUserEnabled = requireUser ? Boolean(user) : true;\n\n const isProjectEnabled = requireProject ? Boolean(project) : true;\n\n const isOrganizationEnabled = requireOrganization\n ? Boolean(organization)\n : true;\n\n const isCSRFEnabled =\n Boolean(csrfToken) ||\n // If auth using session, csrf token is not required\n (!session && Boolean(oAuth2AccessToken));\n\n const isEnabled =\n isEnabledOption &&\n isUserEnabled &&\n isProjectEnabled &&\n isOrganizationEnabled &&\n isCSRFEnabled;\n\n return {\n ...options,\n enable: isEnabled,\n };\n};\n\nconst useAppAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>,\n authOptions?: AuthEnableOptions\n) => {\n // Enhance options using custom hooks\n const optionsWithAuth = useAuthEnable(options ?? {}, authOptions);\n\n const optionsWithErrorHandling = useErrorHandling(optionsWithAuth);\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\nconst useEditorAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const optionsWithErrorHandling = useErrorHandling(options ?? {});\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['login']>\n) =>\n useAppAsync('login', useIntlayerAuth().auth.login, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRegister = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['register']>\n) =>\n useAppAsync('register', useIntlayerAuth().auth.register, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useLogout = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['logout']>\n) =>\n useAppAsync('logout', useIntlayerAuth().auth.logout, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useChangePassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['changePassword']>\n) => useAppAsync('changePassword', useIntlayerAuth().auth.changePassword, args);\nexport const useAskResetPassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['askResetPassword']>\n) =>\n useAppAsync(\n 'askResetPassword',\n useIntlayerAuth().auth.askResetPassword,\n args\n );\nexport const useResetPassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['resetPassword']>\n) => useAppAsync('resetPassword', useIntlayerAuth().auth.resetPassword, args);\nexport const useDefineNewPassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['defineNewPassword']>\n) =>\n useAppAsync(\n 'defineNewPassword',\n useIntlayerAuth().auth.defineNewPassword,\n args\n );\nexport const useCheckIfUserHasPassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['checkIfUserHasPassword']>\n) =>\n useAppAsync(\n 'checkIfUserHasPassword',\n useIntlayerAuth().auth.checkIfUserHasPassword,\n args,\n {\n requireUser: true,\n }\n );\nexport const useVerifyEmail = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['verifyEmail']>\n) => useAppAsync('verifyEmail', useIntlayerAuth().auth.verifyEmail, args);\n\nexport const useGetUserByAccount = (\n args?: UseAsyncOptions<IntlayerAPI['user']['getUserByAccount']>\n) =>\n useAppAsync(\n 'getUserByAccount',\n useIntlayerAuth().user.getUserByAccount,\n args\n );\n\n/**\n * User\n */\n\nexport const useGetUsers = (\n args?: UseAsyncOptions<IntlayerAPI['user']['getUsers']>\n) =>\n useAppAsync(\n 'getUsers',\n useIntlayerAuth().user.getUsers,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\nexport const useCreateUser = (\n args?: UseAsyncOptions<IntlayerAPI['user']['createUser']>\n) =>\n useAppAsync('createUser', useIntlayerAuth().user.createUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\nexport const useUpdateUser = (\n args?: UseAsyncOptions<IntlayerAPI['user']['updateUser']>\n) =>\n useAppAsync('updateUser', useIntlayerAuth().user.updateUser, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteUser = (\n args?: UseAsyncOptions<IntlayerAPI['user']['deleteUser']>\n) =>\n useAppAsync('deleteUser', useIntlayerAuth().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['getOrganizations']>\n) =>\n useAppAsync(\n 'getOrganizations',\n useIntlayerAuth().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\n\nexport const useAddOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['addOrganization']>\n) =>\n useAppAsync(\n 'addOrganization',\n useIntlayerAuth().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useUpdateOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['updateOrganization']>\n) =>\n useAppAsync(\n 'updateOrganization',\n useIntlayerAuth().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUpdateOrganizationMembers = (\n args?: UseAsyncOptions<\n IntlayerAPI['organization']['updateOrganizationMembers']\n >\n) =>\n useAppAsync(\n 'updateOrganizationMembers',\n useIntlayerAuth().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useAddOrganizationMember = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['addOrganizationMember']>\n) =>\n useAppAsync(\n 'addOrganizationMember',\n useIntlayerAuth().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useDeleteOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['deleteOrganization']>\n) =>\n useAppAsync(\n 'deleteOrganization',\n useIntlayerAuth().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useSelectOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['selectOrganization']>\n) =>\n useAppAsync(\n 'selectOrganization',\n useIntlayerAuth().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUnselectOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['unselectOrganization']>\n) =>\n useAppAsync(\n 'unselectOrganization',\n useIntlayerAuth().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = (\n args?: UseAsyncOptions<IntlayerAPI['project']['getProjects']>\n) =>\n useAppAsync(\n 'getProjects',\n useIntlayerAuth().project.getProjects,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['addProject']>\n) =>\n useAppAsync('addProject', useIntlayerAuth().project.addProject, {\n invalidateQueries: ['getProjects'],\n ...args,\n });\nexport const useUpdateProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['updateProject']>\n) =>\n useAppAsync('updateProject', useIntlayerAuth().project.updateProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUpdateProjectMembers = (\n args?: UseAsyncOptions<IntlayerAPI['project']['updateProjectMembers']>\n) =>\n useAppAsync(\n 'updateProjectMembers',\n useIntlayerAuth().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useDeleteProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['deleteProject']>\n) =>\n useAppAsync('deleteProject', useIntlayerAuth().project.deleteProject, {\n invalidateQueries: ['getProjects', 'getSession'],\n ...args,\n });\nexport const useSelectProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['selectProject']>\n) =>\n useAppAsync('selectProject', useIntlayerAuth().project.selectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUnselectProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['unselectProject']>\n) =>\n useAppAsync('unselectProject', useIntlayerAuth().project.unselectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useAddNewAccessKey = (\n args?: UseAsyncOptions<IntlayerAPI['project']['addNewAccessKey']>\n) =>\n useAppAsync('addNewAccessKey', useIntlayerAuth().project.addNewAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteAccessKey = (\n args?: UseAsyncOptions<IntlayerAPI['project']['deleteAccessKey']>\n) =>\n useAppAsync('deleteAccessKey', useIntlayerAuth().project.deleteAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRefreshAccessKey = (\n args?: UseAsyncOptions<IntlayerAPI['project']['refreshAccessKey']>\n) =>\n useAppAsync('refreshAccessKey', useIntlayerAuth().project.refreshAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['getDictionaries']>\n) =>\n useAppAsync(\n 'getDictionaries',\n useIntlayerAuth().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionariesKeys = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['getDictionariesKeys']>\n) =>\n useAppAsync(\n 'getDictionariesKeys',\n useIntlayerAuth().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['getDictionary']>\n) =>\n useAppAsync(\n 'getDictionary',\n useIntlayerAuth().dictionary.getDictionary,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\nexport const useAddDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['addDictionary']>\n) =>\n useAppAsync('addDictionary', useIntlayerAuth().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n ...args,\n });\n\nexport const usePushDictionaries = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['pushDictionaries']>\n) =>\n useAppAsync(\n 'pushDictionaries',\n useIntlayerAuth().dictionary.pushDictionaries,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\nexport const useUpdateDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['updateDictionary']>\n) =>\n useAppAsync(\n 'updateDictionary',\n useIntlayerAuth().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionary'],\n ...args,\n }\n );\nexport const useDeleteDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['deleteDictionary']>\n) =>\n useAppAsync(\n 'deleteDictionary',\n useIntlayerAuth().dictionary.deleteDictionary,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\n\n/**\n * Tag\n */\n\nexport const useGetTags = (\n args?: UseAsyncOptions<IntlayerAPI['tag']['getTags']>\n) =>\n useAppAsync(\n 'getTags',\n useIntlayerAuth().tag.getTags,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddTag = (\n args?: UseAsyncOptions<IntlayerAPI['tag']['addTag']>\n) =>\n useAppAsync('addTag', useIntlayerAuth().tag.addTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useUpdateTag = (\n args?: UseAsyncOptions<IntlayerAPI['tag']['updateTag']>\n) =>\n useAppAsync('updateTag', useIntlayerAuth().tag.updateTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useDeleteTag = (\n args?: UseAsyncOptions<IntlayerAPI['tag']['deleteTag']>\n) =>\n useAppAsync('deleteTag', useIntlayerAuth().tag.deleteTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\n\n/**\n * Stripe\n */\n\nexport const useGetPricing = (\n args?: UseAsyncOptions<IntlayerAPI['stripe']['getPricing']>\n) =>\n useAppAsync('getPricing', useIntlayerAuth().stripe.getPricing, {\n store: true,\n cache: true,\n ...args,\n });\n\nexport const useGetSubscription = (\n args?: UseAsyncOptions<IntlayerAPI['stripe']['getSubscription']>\n) =>\n useAppAsync(\n 'getSubscription',\n useIntlayerAuth().stripe.getSubscription,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\nexport const useCancelSubscription = (\n args?: UseAsyncOptions<IntlayerAPI['stripe']['cancelSubscription']>\n) =>\n useAppAsync(\n 'cancelSubscription',\n useIntlayerAuth().stripe.cancelSubscription,\n { invalidateQueries: ['getSession'], ...args },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\n/**\n * AI\n */\n\nexport const useAuditContentDeclaration = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['auditContentDeclaration']>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclaration,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationMetadata = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['auditContentDeclarationMetadata']>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclarationMetadata,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationField = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['auditContentDeclarationField']>\n) =>\n useAppAsync(\n 'auditContentDeclarationField',\n useIntlayerAuth().ai.auditContentDeclarationField,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditTag = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['auditTag']>\n) =>\n useAppAsync('auditTag', useIntlayerAuth().ai.auditTag, args, {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n\nexport const useAskDocQuestion = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['askDocQuestion']>\n) => useAppAsync('askDocQuestion', useIntlayerAuth().ai.askDocQuestion, args);\n\nexport const useAutocomplete = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['autocomplete']>\n) => useAppAsync('autocomplete', useIntlayerAuth().ai.autocomplete, args);\n\n/**\n * Editor\n */\n\nexport const useWriteDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['editor']['writeDictionary']>\n) =>\n useEditorAsync(\n 'writeDictionary',\n useIntlayerAuth().editor.writeDictionary,\n args\n );\n"],"names":["useToast","error","useConfiguration","useAuth","useAsync","useIntlayerAuth"],"mappings":";;;;;;;;;;;AAYA,MAAM,mBAAmB,CAAiC,YAAkB;AACpE,QAAA,EAAE,MAAM,IAAIA,qCAAS;AAEpB,SAAA;AAAA,IACL,GAAG;AAAA,IACH,SAAS,CAAC,iBAAiB;AACrB,UAAA;AAGA,UAAA;AACE,YAAA,OAAO,iBAAiB,YAAa;AAEjC,gBAAA,KAAK,MAAM,YAAY;AAAA,eACxB,GAAG;AAGF,gBAAA;AAAA,MAAA;AAKV,OAAC,KAAK,EACH,QAAQ,CAACC,WAAUA,MAAK,EACxB;AAAA,QAAQ,CAACA,WACR,MAAM;AAAA,UACJ,QACG,2BAAY,aAAa,eACtBA,OAAM,QACNA,OAAM,SAAS;AAAA,UACrB,aAAaA,OAAM,WAAW,gBAAgB;AAAA,UAC9C,SAAS;AAAA,QACV,CAAA;AAAA,MACH;AACF,cAAQ,UAAU,YAAY;AAAA,IAChC;AAAA,IACA,WAAW,CAAC,SAAS;AACnB,UAAI,MAAM;AACF,cAAA;AAAA,UACJ,OAAO,KAAK;AAAA,UACZ,aAAa,KAAK;AAAA,UAClB,SAAS;AAAA,QAAA,CACV;AACH,cAAQ,YAAY,IAAI;AAAA,IAAA;AAAA,EAE5B;AACF;AAWA,MAAM,gBAAgB,CACpB,SACA,EAAE,aAAa,gBAAgB,oBAA2C,IAAA,OACpE;AACN,QAAM,gBAAgBC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B;AAAA,EAAA;AAEzB;AAMW,MAAA,6BAA6B,CACxC,SAEA;AAAA,EACE;AAAA,EACAA,qBAAA,gBAAA,EAAkB,GAAG;AAAA,EACrB;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,qBAAqB;AAAA,IACrB,gBAAgB;AAAA,EAAA;AAEpB;AAEW,MAAA,qCAAqC,CAChD,SAEA;AAAA,EACE;AAAA,EACAA,qBAAA,gBAAA,EAAkB,GAAG;AAAA,EACrB;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,qBAAqB;AAAA,IACrB,gBAAgB;AAAA,EAAA;AAEpB;AAEW,MAAA,kCAAkC,CAC7C,SAEA;AAAA,EACE;AAAA,EACAA,qBAAA,gBAAA,EAAkB,GAAG;AAAA,EACrB;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,qBAAqB;AAAA,IACrB,gBAAgB;AAAA,EAAA;AAEpB;AAEW,MAAA,cAAc,CACzB,SAEA,YAAY,YAAYA,qBAAAA,kBAAkB,GAAG,UAAU,MAAM;AAAA,EAC3D,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,gBAAgB;AAClB,CAAC;AAEU,MAAA,oBAAoB,CAC/B,SACG,YAAY,kBAAkBA,qBAAAA,kBAAkB,GAAG,gBAAgB,IAAI;AAE/D,MAAA,kBAAkB,CAC7B,SACG,YAAY,gBAAgBA,qBAAAA,kBAAkB,GAAG,cAAc,IAAI;AAM3D,MAAA,qBAAqB,CAChC,SAEA;AAAA,EACE;AAAA,EACAA,qBAAA,gBAAA,EAAkB,OAAO;AAAA,EACzB;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"intlayerAPIHooks.cjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["'use client';\n\nimport type { IntlayerAPI } from '@intlayer/api';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from '../components/Auth/useAuth/index';\nimport { useToast } from '../components/Toaster';\nimport { type UseAsyncOptions, useAsync } from './useAsync/useAsync';\nimport { useIntlayerAuth } from './useIntlayerAPI';\n\n/**\n * Hook to handle error logging and toast notifications\n */\nconst useErrorHandling = <T extends UseAsyncOptions<any>>(options: T): T => {\n const { toast } = useToast();\n\n return {\n ...options,\n onError: (errorMessage) => {\n let error;\n\n // If json is valid, parse it\n try {\n if (typeof errorMessage === 'undefined') return;\n\n error = JSON.parse(errorMessage);\n } catch (e) {\n // If json is not valid, set error to the original errorMessage\n\n error = errorMessage;\n }\n\n // render toast for each error if there is more than one\n // otherwise render the toast with the error message\n [error]\n .flatMap((error) => error)\n .forEach((error) =>\n toast({\n title:\n (process.env.NODE_ENV === 'production'\n ? error.title\n : error.code) ?? 'Error',\n description: error.message ?? errorMessage ?? 'An error occurred',\n variant: 'error',\n })\n );\n options.onError?.(errorMessage);\n },\n onSuccess: (data) => {\n if (data?.message)\n toast({\n title: data.message,\n description: data.description,\n variant: 'success',\n });\n options.onSuccess?.(data);\n },\n };\n};\n\ntype AuthEnableOptions = {\n requireUser?: boolean;\n requireProject?: boolean;\n requireOrganization?: boolean;\n};\n\n/**\n * Hook to enable authentication\n */\nconst useAuthEnable = <T extends UseAsyncOptions<any>>(\n options: T,\n { requireUser, requireProject, requireOrganization }: AuthEnableOptions = {}\n): T => {\n const configuration = useConfiguration();\n const { csrfToken, oAuth2AccessToken, session } = useAuth({\n intlayerConfiguration: configuration,\n });\n\n const isEnabledOption = options?.enable ?? true;\n const user = session ? session.user : oAuth2AccessToken?.user;\n\n const organization = session\n ? session.organization\n : oAuth2AccessToken?.organization;\n\n const project = session ? session.project : oAuth2AccessToken?.project;\n\n const isUserEnabled = requireUser ? Boolean(user) : true;\n\n const isProjectEnabled = requireProject ? Boolean(project) : true;\n\n const isOrganizationEnabled = requireOrganization\n ? Boolean(organization)\n : true;\n\n const isCSRFEnabled =\n Boolean(csrfToken) ||\n // If auth using session, csrf token is not required\n (!session && Boolean(oAuth2AccessToken));\n\n const isEnabled =\n isEnabledOption &&\n isUserEnabled &&\n isProjectEnabled &&\n isOrganizationEnabled &&\n isCSRFEnabled;\n\n return {\n ...options,\n enable: isEnabled,\n };\n};\n\nconst useAppAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>,\n authOptions?: AuthEnableOptions\n) => {\n // Enhance options using custom hooks\n const optionsWithAuth = useAuthEnable(options ?? {}, authOptions);\n\n const optionsWithErrorHandling = useErrorHandling(optionsWithAuth);\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\nconst useEditorAsync = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const optionsWithErrorHandling = useErrorHandling(options ?? {});\n\n // Call the main useAsync hook with enhanced options\n return useAsync(key, asyncFunction, optionsWithErrorHandling);\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['login']>\n) =>\n useAppAsync('login', useIntlayerAuth().auth.login, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRegister = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['register']>\n) =>\n useAppAsync('register', useIntlayerAuth().auth.register, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useLogout = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['logout']>\n) =>\n useAppAsync('logout', useIntlayerAuth().auth.logout, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useChangePassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['changePassword']>\n) => useAppAsync('changePassword', useIntlayerAuth().auth.changePassword, args);\nexport const useAskResetPassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['askResetPassword']>\n) =>\n useAppAsync(\n 'askResetPassword',\n useIntlayerAuth().auth.askResetPassword,\n args\n );\nexport const useResetPassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['resetPassword']>\n) => useAppAsync('resetPassword', useIntlayerAuth().auth.resetPassword, args);\nexport const useDefineNewPassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['defineNewPassword']>\n) =>\n useAppAsync(\n 'defineNewPassword',\n useIntlayerAuth().auth.defineNewPassword,\n args\n );\nexport const useCheckIfUserHasPassword = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['checkIfUserHasPassword']>\n) =>\n useAppAsync(\n 'checkIfUserHasPassword',\n useIntlayerAuth().auth.checkIfUserHasPassword,\n args,\n {\n requireUser: true,\n }\n );\nexport const useVerifyEmail = (\n args?: UseAsyncOptions<IntlayerAPI['auth']['verifyEmail']>\n) => useAppAsync('verifyEmail', useIntlayerAuth().auth.verifyEmail, args);\n\nexport const useGetUserByAccount = (\n args?: UseAsyncOptions<IntlayerAPI['user']['getUserByAccount']>\n) =>\n useAppAsync(\n 'getUserByAccount',\n useIntlayerAuth().user.getUserByAccount,\n args\n );\n\n/**\n * User\n */\n\nexport const useGetUsers = (\n args?: UseAsyncOptions<IntlayerAPI['user']['getUsers']>\n) =>\n useAppAsync(\n 'getUsers',\n useIntlayerAuth().user.getUsers,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\nexport const useCreateUser = (\n args?: UseAsyncOptions<IntlayerAPI['user']['createUser']>\n) =>\n useAppAsync('createUser', useIntlayerAuth().user.createUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\nexport const useUpdateUser = (\n args?: UseAsyncOptions<IntlayerAPI['user']['updateUser']>\n) =>\n useAppAsync('updateUser', useIntlayerAuth().user.updateUser, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteUser = (\n args?: UseAsyncOptions<IntlayerAPI['user']['deleteUser']>\n) =>\n useAppAsync('deleteUser', useIntlayerAuth().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n ...args,\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['getOrganizations']>\n) =>\n useAppAsync(\n 'getOrganizations',\n useIntlayerAuth().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n }\n );\n\nexport const useAddOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['addOrganization']>\n) =>\n useAppAsync(\n 'addOrganization',\n useIntlayerAuth().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n ...args,\n }\n );\nexport const useUpdateOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['updateOrganization']>\n) =>\n useAppAsync(\n 'updateOrganization',\n useIntlayerAuth().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUpdateOrganizationMembers = (\n args?: UseAsyncOptions<\n IntlayerAPI['organization']['updateOrganizationMembers']\n >\n) =>\n useAppAsync(\n 'updateOrganizationMembers',\n useIntlayerAuth().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useAddOrganizationMember = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['addOrganizationMember']>\n) =>\n useAppAsync(\n 'addOrganizationMember',\n useIntlayerAuth().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useDeleteOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['deleteOrganization']>\n) =>\n useAppAsync(\n 'deleteOrganization',\n useIntlayerAuth().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations', 'getSession'],\n ...args,\n }\n );\nexport const useSelectOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['selectOrganization']>\n) =>\n useAppAsync(\n 'selectOrganization',\n useIntlayerAuth().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useUnselectOrganization = (\n args?: UseAsyncOptions<IntlayerAPI['organization']['unselectOrganization']>\n) =>\n useAppAsync(\n 'unselectOrganization',\n useIntlayerAuth().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = (\n args?: UseAsyncOptions<IntlayerAPI['project']['getProjects']>\n) =>\n useAppAsync(\n 'getProjects',\n useIntlayerAuth().project.getProjects,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['addProject']>\n) =>\n useAppAsync('addProject', useIntlayerAuth().project.addProject, {\n invalidateQueries: ['getProjects'],\n ...args,\n });\nexport const useUpdateProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['updateProject']>\n) =>\n useAppAsync('updateProject', useIntlayerAuth().project.updateProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUpdateProjectMembers = (\n args?: UseAsyncOptions<IntlayerAPI['project']['updateProjectMembers']>\n) =>\n useAppAsync(\n 'updateProjectMembers',\n useIntlayerAuth().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n ...args,\n }\n );\nexport const useDeleteProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['deleteProject']>\n) =>\n useAppAsync('deleteProject', useIntlayerAuth().project.deleteProject, {\n invalidateQueries: ['getProjects', 'getSession'],\n ...args,\n });\nexport const useSelectProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['selectProject']>\n) =>\n useAppAsync('selectProject', useIntlayerAuth().project.selectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useUnselectProject = (\n args?: UseAsyncOptions<IntlayerAPI['project']['unselectProject']>\n) =>\n useAppAsync('unselectProject', useIntlayerAuth().project.unselectProject, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useAddNewAccessKey = (\n args?: UseAsyncOptions<IntlayerAPI['project']['addNewAccessKey']>\n) =>\n useAppAsync('addNewAccessKey', useIntlayerAuth().project.addNewAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useDeleteAccessKey = (\n args?: UseAsyncOptions<IntlayerAPI['project']['deleteAccessKey']>\n) =>\n useAppAsync('deleteAccessKey', useIntlayerAuth().project.deleteAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\nexport const useRefreshAccessKey = (\n args?: UseAsyncOptions<IntlayerAPI['project']['refreshAccessKey']>\n) =>\n useAppAsync('refreshAccessKey', useIntlayerAuth().project.refreshAccessKey, {\n invalidateQueries: ['getSession'],\n ...args,\n });\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['getDictionaries']>\n) =>\n useAppAsync(\n 'getDictionaries',\n useIntlayerAuth().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionariesKeys = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['getDictionariesKeys']>\n) =>\n useAppAsync(\n 'getDictionariesKeys',\n useIntlayerAuth().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useGetDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['getDictionary']>\n) =>\n useAppAsync(\n 'getDictionary',\n useIntlayerAuth().dictionary.getDictionary,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\nexport const useAddDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['addDictionary']>\n) =>\n useAppAsync('addDictionary', useIntlayerAuth().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n ...args,\n });\n\nexport const usePushDictionaries = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['pushDictionaries']>\n) =>\n useAppAsync(\n 'pushDictionaries',\n useIntlayerAuth().dictionary.pushDictionaries,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\nexport const useUpdateDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['updateDictionary']>\n) =>\n useAppAsync(\n 'updateDictionary',\n useIntlayerAuth().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionary'],\n ...args,\n }\n );\nexport const useDeleteDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['dictionary']['deleteDictionary']>\n) =>\n useAppAsync(\n 'deleteDictionary',\n useIntlayerAuth().dictionary.deleteDictionary,\n {\n invalidateQueries: [\n 'getDictionaries',\n 'getDictionary',\n 'getDictionariesKeys',\n ],\n ...args,\n }\n );\n\n/**\n * Tag\n */\n\nexport const useGetTags = (\n args?: UseAsyncOptions<IntlayerAPI['tag']['getTags']>\n) =>\n useAppAsync(\n 'getTags',\n useIntlayerAuth().tag.getTags,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n ...args,\n },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\nexport const useAddTag = (\n args?: UseAsyncOptions<IntlayerAPI['tag']['addTag']>\n) =>\n useAppAsync('addTag', useIntlayerAuth().tag.addTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useUpdateTag = (\n args?: UseAsyncOptions<IntlayerAPI['tag']['updateTag']>\n) =>\n useAppAsync('updateTag', useIntlayerAuth().tag.updateTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\nexport const useDeleteTag = (\n args?: UseAsyncOptions<IntlayerAPI['tag']['deleteTag']>\n) =>\n useAppAsync('deleteTag', useIntlayerAuth().tag.deleteTag, {\n invalidateQueries: ['getTags'],\n ...args,\n });\n\n/**\n * Stripe\n */\n\nexport const useGetPricing = (\n args?: UseAsyncOptions<IntlayerAPI['stripe']['getPricing']>\n) =>\n useAppAsync('getPricing', useIntlayerAuth().stripe.getPricing, {\n store: true,\n cache: true,\n ...args,\n });\n\nexport const useGetSubscription = (\n args?: UseAsyncOptions<IntlayerAPI['stripe']['getSubscription']>\n) =>\n useAppAsync(\n 'getSubscription',\n useIntlayerAuth().stripe.getSubscription,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\nexport const useCancelSubscription = (\n args?: UseAsyncOptions<IntlayerAPI['stripe']['cancelSubscription']>\n) =>\n useAppAsync(\n 'cancelSubscription',\n useIntlayerAuth().stripe.cancelSubscription,\n { invalidateQueries: ['getSession'], ...args },\n {\n requireUser: true,\n requireOrganization: true,\n }\n );\n\n/**\n * AI\n */\n\nexport const useTranslateJSONDeclaration = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['translateJSON']>\n) =>\n useAppAsync('translateJSON', useIntlayerAuth().ai.translateJSON, args, {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n\nexport const useAuditContentDeclaration = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['auditContentDeclaration']>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclaration,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationMetadata = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['auditContentDeclarationMetadata']>\n) =>\n useAppAsync(\n 'auditContentDeclaration',\n useIntlayerAuth().ai.auditContentDeclarationMetadata,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditContentDeclarationField = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['auditContentDeclarationField']>\n) =>\n useAppAsync(\n 'auditContentDeclarationField',\n useIntlayerAuth().ai.auditContentDeclarationField,\n args,\n {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n }\n );\n\nexport const useAuditTag = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['auditTag']>\n) =>\n useAppAsync('auditTag', useIntlayerAuth().ai.auditTag, args, {\n requireUser: true,\n requireOrganization: true,\n requireProject: true,\n });\n\nexport const useAskDocQuestion = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['askDocQuestion']>\n) => useAppAsync('askDocQuestion', useIntlayerAuth().ai.askDocQuestion, args);\n\nexport const useAutocomplete = (\n args?: UseAsyncOptions<IntlayerAPI['ai']['autocomplete']>\n) => useAppAsync('autocomplete', useIntlayerAuth().ai.autocomplete, args);\n\n/**\n * Editor\n */\n\nexport const useWriteDictionary = (\n args?: UseAsyncOptions<IntlayerAPI['editor']['writeDictionary']>\n) =>\n useEditorAsync(\n 'writeDictionary',\n useIntlayerAuth().editor.writeDictionary,\n args\n );\n"],"names":["useToast","error","useConfiguration","useAuth","useAsync","useIntlayerAuth"],"mappings":";;;;;;;;;;;AAYA,MAAM,mBAAmB,CAAiC,YAAkB;AACpE,QAAA,EAAE,MAAM,IAAIA,qCAAS;AAEpB,SAAA;AAAA,IACL,GAAG;AAAA,IACH,SAAS,CAAC,iBAAiB;AACrB,UAAA;AAGA,UAAA;AACE,YAAA,OAAO,iBAAiB,YAAa;AAEjC,gBAAA,KAAK,MAAM,YAAY;AAAA,eACxB,GAAG;AAGF,gBAAA;AAAA,MAAA;AAKV,OAAC,KAAK,EACH,QAAQ,CAACC,W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AAEpB;AAEW,MAAA,cAAc,CACzB,SAEA,YAAY,YAAYA,qBAAAA,kBAAkB,GAAG,UAAU,MAAM;AAAA,EAC3D,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,gBAAgB;AAClB,CAAC;AAEU,MAAA,oBAAoB,CAC/B,SACG,YAAY,kBAAkBA,qBAAAA,kBAAkB,GAAG,gBAAgB,IAAI;AAE/D,MAAA,kBAAkB,CAC7B,SACG,YAAY,gBAAgBA,qBAAAA,kBAAkB,GAAG,cAAc,IAAI;AAM3D,MAAA,qBAAqB,CAChC,SAEA;AAAA,EACE;AAAA,EACAA,qBAAA,gBAAA,EAAkB,OAAO;AAAA,EACzB;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -70,11 +70,12 @@ export declare const useCancelSubscription: (args?: UseAsyncOptions<IntlayerAPI[
70
70
  /**
71
71
  * AI
72
72
  */
73
+ export declare const useTranslateJSONDeclaration: (args?: UseAsyncOptions<IntlayerAPI["ai"]["translateJSON"]>) => import('./useAsync').UseAsyncResult<"translateJSON", (body?: TranslateJSONResultBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').TranslateJSONResult>>;
73
74
  export declare const useAuditContentDeclaration: (args?: UseAsyncOptions<IntlayerAPI["ai"]["auditContentDeclaration"]>) => import('./useAsync').UseAsyncResult<"auditContentDeclaration", (body?: import('@intlayer/backend').AuditContentDeclarationBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationResult>>;
74
75
  export declare const useAuditContentDeclarationMetadata: (args?: UseAsyncOptions<IntlayerAPI["ai"]["auditContentDeclarationMetadata"]>) => import('./useAsync').UseAsyncResult<"auditContentDeclaration", (body?: import('@intlayer/backend').AuditContentDeclarationMetadataBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationMetadataResult>>;
75
76
  export declare const useAuditContentDeclarationField: (args?: UseAsyncOptions<IntlayerAPI["ai"]["auditContentDeclarationField"]>) => import('./useAsync').UseAsyncResult<"auditContentDeclarationField", (body?: import('@intlayer/backend').AuditContentDeclarationFieldBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AuditContentDeclarationFieldResult>>;
76
77
  export declare const useAuditTag: (args?: UseAsyncOptions<IntlayerAPI["ai"]["auditTag"]>) => import('./useAsync').UseAsyncResult<"auditTag", (body?: import('@intlayer/backend').AuditTagBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AuditTagResult>>;
77
- export declare const useAskDocQuestion: (args?: UseAsyncOptions<IntlayerAPI["ai"]["askDocQuestion"]>) => import('./useAsync').UseAsyncResult<"askDocQuestion", (body?: import('node_modules/@intlayer/api/dist/types/getIntlayerAPI/ai').AskDocQuestionBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<void>>;
78
+ export declare const useAskDocQuestion: (args?: UseAsyncOptions<IntlayerAPI["ai"]["askDocQuestion"]>) => import('./useAsync').UseAsyncResult<"askDocQuestion", (body?: import('@intlayer/api').AskDocQuestionBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<void>>;
78
79
  export declare const useAutocomplete: (args?: UseAsyncOptions<IntlayerAPI["ai"]["autocomplete"]>) => import('./useAsync').UseAsyncResult<"autocomplete", (body?: import('@intlayer/backend').AutocompleteBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').AutocompleteResponse>>;
79
80
  /**
80
81
  * Editor
@@ -1 +1 @@
1
- {"version":3,"file":"intlayerAPIHooks.d.ts","sourceRoot":"","sources":["../../src/hooks/intlayerAPIHooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,qBAAqB,CAAC;AA0IrE;;GAEG;AAEH,eAAO,MAAM,QAAQ,G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ACX,oEAEyB,6BACP,EAmThB,CAAC"}
@@ -410,6 +410,11 @@ const useCancelSubscription = (args) => useAppAsync(
410
410
  requireOrganization: true
411
411
  }
412
412
  );
413
+ const useTranslateJSONDeclaration = (args) => useAppAsync("translateJSON", useIntlayerAuth().ai.translateJSON, args, {
414
+ requireUser: true,
415
+ requireOrganization: true,
416
+ requireProject: true
417
+ });
413
418
  const useAuditContentDeclaration = (args) => useAppAsync(
414
419
  "auditContentDeclaration",
415
420
  useIntlayerAuth().ai.auditContentDeclaration,
@@ -495,6 +500,7 @@ export {
495
500
  useResetPassword,
496
501
  useSelectOrganization,
497
502
  useSelectProject,
503
+ useTranslateJSONDeclaration,
498
504
  useUnselectOrganization,
499
505
  useUnselectProject,
500
506
  useUpdateDictionary,