@intlayer/design-system 8.10.0 → 8.10.1

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 (51) hide show
  1. package/dist/esm/components/Browser/Browser.mjs +12 -4
  2. package/dist/esm/components/Browser/Browser.mjs.map +1 -1
  3. package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs +1 -1
  4. package/dist/esm/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs +2 -2
  5. package/dist/esm/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs.map +1 -1
  6. package/dist/esm/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +2 -2
  7. package/dist/esm/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs.map +1 -1
  8. package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +2 -2
  9. package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
  10. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +3 -3
  11. package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -1
  12. package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +1 -1
  13. package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +2 -2
  14. package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -1
  15. package/dist/esm/components/Form/elements/OTPElement.mjs +1 -1
  16. package/dist/esm/components/Form/layout/FormItemLayout.mjs +1 -1
  17. package/dist/esm/components/Form/layout/FormItemLayout.mjs.map +1 -1
  18. package/dist/esm/components/LanguageBackground/LanguageSection.mjs +85 -0
  19. package/dist/esm/components/LanguageBackground/LanguageSection.mjs.map +1 -0
  20. package/dist/esm/components/LanguageBackground/index.mjs +4 -77
  21. package/dist/esm/components/LanguageBackground/index.mjs.map +1 -1
  22. package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -1
  23. package/dist/esm/components/Modal/Modal.mjs +2 -2
  24. package/dist/esm/components/Navbar/MobileNavbar.mjs +1 -1
  25. package/dist/esm/components/Pagination/Pagination.mjs +1 -1
  26. package/dist/esm/components/RightDrawer/RightDrawer.mjs +3 -3
  27. package/dist/esm/components/Tab/Tab.mjs +1 -1
  28. package/dist/esm/components/Toaster/Toast.mjs +1 -1
  29. package/dist/esm/components/Toaster/Toast.mjs.map +1 -1
  30. package/dist/esm/components/index.mjs +2 -1
  31. package/dist/esm/hooks/index.mjs +9 -9
  32. package/dist/esm/hooks/useAuth/useOAuth2.mjs +1 -1
  33. package/dist/esm/hooks/useAuth/useSession.mjs +1 -1
  34. package/dist/esm/libs/auth.mjs +1 -1
  35. package/dist/types/components/Badge/index.d.ts +1 -1
  36. package/dist/types/components/Browser/Browser.d.ts.map +1 -1
  37. package/dist/types/components/Button/Button.d.ts +3 -3
  38. package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +2 -2
  39. package/dist/types/components/Command/index.d.ts +1 -1
  40. package/dist/types/components/Container/index.d.ts +6 -6
  41. package/dist/types/components/Input/Checkbox.d.ts +1 -1
  42. package/dist/types/components/LanguageBackground/LanguageSection.d.ts +7 -0
  43. package/dist/types/components/LanguageBackground/LanguageSection.d.ts.map +1 -0
  44. package/dist/types/components/LanguageBackground/index.d.ts +2 -2
  45. package/dist/types/components/LanguageBackground/index.d.ts.map +1 -1
  46. package/dist/types/components/Link/Link.d.ts +2 -2
  47. package/dist/types/components/Pagination/Pagination.d.ts +1 -1
  48. package/dist/types/components/TabSelector/TabSelector.d.ts +1 -1
  49. package/dist/types/components/Tag/index.d.ts +2 -2
  50. package/dist/types/components/index.d.ts +2 -1
  51. package/package.json +11 -11
@@ -12,6 +12,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
12
12
  import { useIntlayer } from "react-intlayer";
13
13
 
14
14
  //#region src/components/Browser/Browser.tsx
15
+ const UrlPath = ({ url }) => {
16
+ const parts = getUrlPath(url).split("/").filter(Boolean);
17
+ if (parts.length === 0) return /* @__PURE__ */ jsx("span", { children: "/" });
18
+ return parts.flatMap((part, index, array) => [/* @__PURE__ */ jsx("span", { children: part }, `part-${index}`), index < array.length - 1 && /* @__PURE__ */ jsx("span", {
19
+ className: "mx-2 text-neutral",
20
+ children: "/"
21
+ }, `sep-${index}`)]);
22
+ };
15
23
  const getUrlPath = (url) => {
16
24
  try {
17
25
  const { pathname, search, hash } = new URL(url);
@@ -232,7 +240,7 @@ const Browser = ({ initialUrl = "https://example.com", path, className, style, s
232
240
  /* @__PURE__ */ jsx("label", {
233
241
  htmlFor: "browser-url",
234
242
  className: "sr-only",
235
- children: content.urlLabel.value
243
+ children: content.urlLabel
236
244
  }),
237
245
  /* @__PURE__ */ jsx(Input, {
238
246
  id: "browser-url",
@@ -312,10 +320,10 @@ const Browser = ({ initialUrl = "https://example.com", path, className, style, s
312
320
  "aria-label": content.sitemapButtonLabel.value,
313
321
  children: sitemapLoading ? /* @__PURE__ */ jsx("li", {
314
322
  className: "px-3 py-4 text-center text-neutral text-xs",
315
- children: content.sitemapLoading.value
323
+ children: content.sitemapLoading
316
324
  }) : sitemapError || !sitemapLoading && filteredSitemapUrls.length === 0 ? /* @__PURE__ */ jsx("li", {
317
325
  className: "px-3 py-4 text-center text-neutral text-xs",
318
- children: sitemapError ? content.sitemapError.value : content.sitemapEmpty.value
326
+ children: sitemapError ? content.sitemapError : content.sitemapEmpty
319
327
  }) : filteredSitemapUrls.map((url) => /* @__PURE__ */ jsx("li", {
320
328
  className: "py-0.5",
321
329
  children: /* @__PURE__ */ jsx(Button, {
@@ -330,7 +338,7 @@ const Browser = ({ initialUrl = "https://example.com", path, className, style, s
330
338
  },
331
339
  children: /* @__PURE__ */ jsx("span", {
332
340
  className: "max-w-64 truncate text-left text-base",
333
- children: getUrlPath(url)
341
+ children: /* @__PURE__ */ jsx(UrlPath, { url })
334
342
  })
335
343
  })
336
344
  }, url))
@@ -1 +1 @@
1
- {"version":3,"file":"Browser.mjs","names":[],"sources":["../../../../src/components/Browser/Browser.tsx"],"sourcesContent":["'use client';\n\nimport { Container } from '@components/Container';\nimport { cn } from '@utils/cn';\nimport {\n ArrowLeft,\n ArrowRight,\n Globe,\n List,\n RotateCw,\n ScanSearch,\n} from 'lucide-react';\nimport {\n type CSSProperties,\n type HTMLAttributes,\n type RefObject,\n type SubmitEvent,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { ClickOutsideDiv } from '../ClickOutsideDiv';\nimport { DropDown } from '../DropDown';\nimport { Input, inputVariants } from '../Input';\n\nexport type BrowserProps = {\n initialUrl?: string;\n path?: string;\n className?: string;\n style?: CSSProperties;\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n 'aria-label'?: string;\n sandbox?: string;\n ref?: RefObject<HTMLIFrameElement | null>;\n domainRestriction?: string;\n} & HTMLAttributes<HTMLIFrameElement>;\n\nconst getUrlPath = (url: string) => {\n try {\n const { pathname, search, hash } = new URL(url);\n return `${pathname}${search}${hash}` || '/';\n } catch {\n return url;\n }\n};\n\nexport const Browser = ({\n initialUrl = 'https://example.com',\n path,\n className,\n style,\n size = 'md',\n 'aria-label': ariaLabel,\n sandbox = 'allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads',\n ref,\n domainRestriction,\n ...props\n}: BrowserProps) => {\n // --- State -----------------------------------------------------------------\n const [inputUrl, setInputUrl] = useState(initialUrl);\n const [currentUrl, setCurrentUrl] = useState(initialUrl);\n\n // History Management\n const [history, setHistory] = useState<string[]>([initialUrl]);\n const [currentIndex, setCurrentIndex] = useState(0);\n\n const [error, setError] = useState<string | null>(null);\n const [submitted, setSubmitted] = useState(false);\n const internalIframeRef = useRef<HTMLIFrameElement>(null);\n\n // Sitemap explorer state\n const [sitemapOpen, setSitemapOpen] = useState(false);\n const [sitemapUrls, setSitemapUrls] = useState<string[]>([]);\n const [sitemapSearch, setSitemapSearch] = useState('');\n const [sitemapLoading, setSitemapLoading] = useState(false);\n const [sitemapFetched, setSitemapFetched] = useState(false);\n const [sitemapError, setSitemapError] = useState(false);\n const sitemapInputRef = useRef<HTMLInputElement>(null);\n\n useImperativeHandle(ref, () => internalIframeRef.current!, []);\n const content = useIntlayer('browser');\n\n // --- Effects ---------------------------------------------------------------\n\n // Reset everything if initialUrl changes completely\n useEffect(() => {\n setInputUrl(initialUrl);\n setCurrentUrl(initialUrl);\n setHistory([initialUrl]);\n setCurrentIndex(0);\n setError(null);\n setSubmitted(false);\n setSitemapOpen(false);\n setSitemapUrls([]);\n setSitemapSearch('');\n setSitemapFetched(false);\n setSitemapError(false);\n }, [initialUrl]);\n\n // Sync external path changes with the URL bar and History\n useEffect(() => {\n if (!path) return;\n\n try {\n const baseOrigin = domainRestriction ?? initialUrl;\n const origin = new URL(baseOrigin).origin;\n const fullUrl = `${origin}${path}`;\n\n // Update Input (Always update the visual bar)\n setInputUrl(fullUrl);\n\n // Check internal iframe state to avoid reload if already there\n let isAlreadyAtUrl = false;\n if (internalIframeRef.current?.contentWindow) {\n try {\n const currentIframeHref =\n internalIframeRef.current.contentWindow.location.href;\n if (new URL(currentIframeHref).href === new URL(fullUrl).href) {\n isAlreadyAtUrl = true;\n }\n } catch {\n // Cross-origin access ignored\n }\n }\n\n // Update History Stack regardless of isAlreadyAtUrl so arrow navigation is always correct\n if (history[currentIndex] !== fullUrl) {\n setHistory((prev) => {\n const newHistory = prev.slice(0, currentIndex + 1);\n newHistory.push(fullUrl);\n return newHistory;\n });\n setCurrentIndex((prev) => prev + 1);\n }\n\n // Navigate only if NOT already there to avoid refreshing on internal iframe navigation\n if (!isAlreadyAtUrl) {\n setCurrentUrl(fullUrl);\n }\n\n setError(null);\n } catch {\n // Ignore invalid paths\n }\n }, [path, domainRestriction, initialUrl]); // Removed currentIndex dependency to prevent loops\n\n // Imperatively keep the iframe src in sync with currentUrl.\n // React's attribute reconciliation can be unreliable for cross-origin iframes after\n // internal navigation, so this effect is the source of truth for navigation.\n useEffect(() => {\n const iframe = internalIframeRef.current;\n if (!iframe) return;\n if (iframe.src !== currentUrl) {\n iframe.src = currentUrl;\n }\n }, [currentUrl]);\n\n // --- Navigation Logic ------------------------------------------------------\n\n const handleNavigateTo = (url: string) => {\n try {\n const validated = normalizeUrl(url);\n\n // If we are navigating to the exact same URL, just reload\n if (validated === currentUrl) {\n handleReload();\n return;\n }\n\n setCurrentUrl(validated);\n setInputUrl(validated);\n setError(null);\n\n // Update History: Slice future if we went back, then push new\n const newHistory = history.slice(0, currentIndex + 1);\n newHistory.push(validated);\n setHistory(newHistory);\n setCurrentIndex(newHistory.length - 1);\n } catch (e) {\n if (\n e instanceof Error &&\n e.message === 'URL does not match allowed domain' &&\n domainRestriction\n ) {\n setError(\n content.domainRestrictionError?.value ??\n `Only URLs from ${domainRestriction} are allowed.`\n );\n } else {\n setError(content.errorMessage.value);\n }\n }\n };\n\n const handleBack = () => {\n if (currentIndex > 0) {\n const newIndex = currentIndex - 1;\n const prevUrl = history[newIndex];\n setCurrentIndex(newIndex);\n setCurrentUrl(prevUrl);\n setInputUrl(prevUrl);\n setError(null);\n }\n };\n\n const handleForward = () => {\n if (currentIndex < history.length - 1) {\n const newIndex = currentIndex + 1;\n const nextUrl = history[newIndex];\n setCurrentIndex(newIndex);\n setCurrentUrl(nextUrl);\n setInputUrl(nextUrl);\n setError(null);\n }\n };\n\n const handleSubmit = (e: SubmitEvent<HTMLFormElement>) => {\n e.preventDefault();\n setSubmitted(true);\n handleNavigateTo(inputUrl);\n };\n\n const handleReload = () => {\n const iframe = internalIframeRef.current;\n if (!iframe) return;\n const src = iframe.src;\n iframe.src = '';\n setTimeout(() => {\n if (internalIframeRef.current) internalIframeRef.current.src = src;\n }, 50);\n };\n\n // --- Validation Helpers ----------------------------------------------------\n const isValidHostname = (host: string) => {\n if (host === 'localhost') return true;\n if (/^(\\d{1,3}\\.){3}\\d{1,3}$/.test(host)) return true;\n if (/^[a-f0-9:]+$/i.test(host)) return true;\n if (!/^[a-z0-9.-]+$/i.test(host)) return false;\n if (/^[-.]/.test(host) || /[-.]$/.test(host)) return false;\n if (host.includes('..')) return false;\n if (!host.includes('.')) return false;\n return true;\n };\n\n const getRestrictionOrigin = (): URL | null => {\n if (!domainRestriction) return null;\n try {\n return new URL(domainRestriction);\n } catch {\n return null;\n }\n };\n\n const normalizeUrl = (raw: string) => {\n const trimmed = raw.trim();\n if (!trimmed || /\\s/.test(trimmed)) throw new Error('Invalid');\n\n const restrictionOrigin = getRestrictionOrigin();\n const isRelativePath = trimmed.startsWith('/') && !trimmed.startsWith('//');\n\n if (isRelativePath) {\n if (restrictionOrigin) {\n return new URL(`${restrictionOrigin.origin}${trimmed}`).toString();\n }\n return new URL(`${new URL(currentUrl).origin}${trimmed}`).toString();\n }\n\n const hasProtocol = /^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(trimmed);\n const candidate = hasProtocol ? trimmed : `https://${trimmed}`;\n const url = new URL(candidate);\n\n if (url.protocol !== 'http:' && url.protocol !== 'https:') {\n throw new Error('Only http(s) is allowed');\n }\n\n if (!isValidHostname(url.hostname)) throw new Error('Invalid host');\n\n if (restrictionOrigin) {\n const urlMatches =\n url.hostname === restrictionOrigin.hostname &&\n url.protocol === restrictionOrigin.protocol &&\n (restrictionOrigin.port === '' ||\n url.port === restrictionOrigin.port ||\n url.host === restrictionOrigin.host);\n\n if (!urlMatches) throw new Error('URL does not match allowed domain');\n }\n\n return url.toString();\n };\n\n const handleSitemapToggle = async () => {\n const nextOpen = !sitemapOpen;\n setSitemapOpen(nextOpen);\n\n if (nextOpen && !sitemapFetched) {\n setSitemapLoading(true);\n setSitemapError(false);\n setSitemapFetched(true);\n try {\n const { extractUrlFromSitemap } = await import(\n './extractUrlFromSitemap'\n );\n const urls = await extractUrlFromSitemap(currentUrl);\n setSitemapUrls(urls);\n if (urls.length === 0) setSitemapError(false);\n } catch {\n setSitemapError(true);\n } finally {\n setSitemapLoading(false);\n }\n setTimeout(() => sitemapInputRef.current?.focus(), 50);\n }\n };\n\n const filteredSitemapUrls = useMemo(() => {\n const query = sitemapSearch.trim().toLowerCase();\n if (!query) return sitemapUrls;\n return sitemapUrls.filter((url) => url.toLowerCase().includes(query));\n }, [sitemapUrls, sitemapSearch]);\n\n const showError = submitted && !!error;\n const canGoBack = currentIndex > 0;\n const canGoForward = currentIndex < history.length - 1;\n\n return (\n <section\n className={cn(\n 'flex w-full flex-col overflow-hidden rounded-xl bg-background shadow-[0_4px_12px_rgba(0,0,0,0.4),0_0_1px_rgba(0,0,0,0.2)]',\n className\n )}\n style={style}\n aria-label={ariaLabel ?? content.ariaLabel.value}\n >\n {/* Top bar */}\n <div className=\"relative z-10 flex shrink-0 items-center gap-3 rounded-t-xl bg-text/15 px-4 py-2\">\n {/* Navigation Controls */}\n <div className=\"flex items-center gap-1\">\n <Button\n type=\"button\"\n onClick={handleBack}\n disabled={!canGoBack}\n variant=\"hoverable\"\n size=\"icon-md\"\n label={content.backButtonLabel.value}\n Icon={ArrowLeft}\n />\n <Button\n type=\"button\"\n onClick={handleForward}\n disabled={!canGoForward}\n variant=\"hoverable\"\n size=\"icon-md\"\n label={content.forwardButtonLabel.value}\n Icon={ArrowRight}\n />\n </div>\n\n {/* URL Bar */}\n <form\n onSubmit={handleSubmit}\n noValidate\n className={cn(\n inputVariants(),\n 'flex w-full gap-2 rounded-xl p-0.5! supports-[corner-shape:squircle]:rounded-2xl',\n 'bg-neutral/10 text-text/50 placeholder:text-neutral/80'\n )}\n >\n <label htmlFor=\"browser-url\" className=\"sr-only\">\n {content.urlLabel.value}\n </label>\n <Input\n id=\"browser-url\"\n type=\"text\"\n inputMode=\"url\"\n spellCheck={false}\n autoCapitalize=\"off\"\n variant=\"invisible\"\n className=\"ml-3 p-0!\"\n size=\"sm\"\n autoCorrect=\"off\"\n value={inputUrl}\n onChange={(e) => {\n setInputUrl(e.target.value);\n if (showError) setError(null);\n }}\n placeholder={content.urlPlaceholder.value}\n aria-label={content.urlLabel.value}\n aria-invalid={showError}\n aria-describedby={showError ? 'browser-url-error' : undefined}\n />\n\n <Button\n type=\"button\"\n onClick={handleReload}\n variant=\"hoverable\"\n size=\"icon-md\"\n className=\"p-1!\"\n label={'content.reloadButtonTitle.value'}\n Icon={RotateCw}\n />\n\n {/* invisible submit */}\n <button type=\"submit\" className=\"sr-only absolute\" tabIndex={-1} />\n </form>\n\n {/* Sitemap Explorer */}\n <ClickOutsideDiv\n onClickOutSide={() => setSitemapOpen(false)}\n disabled={!sitemapOpen}\n role=\"none\"\n >\n <DropDown identifier=\"sitemap-explorer\">\n <DropDown.Trigger\n identifier=\"sitemap-explorer-trigger\"\n type=\"button\"\n color=\"text\"\n onClick={handleSitemapToggle}\n variant=\"hoverable\"\n size=\"icon-md\"\n label={content.sitemapButtonLabel.value}\n Icon={ScanSearch}\n />\n\n <DropDown.Panel\n identifier=\"sitemap-explorer\"\n isHidden={!sitemapOpen}\n align=\"end\"\n isFocusable\n isOverable\n >\n <Container\n className=\"min-w-28 rounded-md!\"\n roundedSize=\"sm\"\n border\n borderColor=\"neutral\"\n >\n <div className=\"p-2\">\n <Input\n type=\"search\"\n ref={sitemapInputRef}\n aria-label={content.sitemapSearchAriaLabel.value}\n placeholder={content.sitemapSearchPlaceholder.value}\n onChange={(e) => setSitemapSearch(e.target.value)}\n value={sitemapSearch}\n size=\"sm\"\n />\n </div>\n <ul\n className=\"max-h-64 divide-y divide-dotted divide-neutral/30 overflow-y-auto p-1 text-center\"\n aria-label={content.sitemapButtonLabel.value}\n >\n {sitemapLoading ? (\n <li className=\"px-3 py-4 text-center text-neutral text-xs\">\n {content.sitemapLoading.value}\n </li>\n ) : sitemapError ||\n (!sitemapLoading && filteredSitemapUrls.length === 0) ? (\n <li className=\"px-3 py-4 text-center text-neutral text-xs\">\n {sitemapError\n ? content.sitemapError.value\n : content.sitemapEmpty.value}\n </li>\n ) : (\n filteredSitemapUrls.map((url) => (\n <li key={url} className=\"py-0.5\">\n <Button\n variant=\"hoverable\"\n color=\"text\"\n size=\"sm\"\n className=\"w-full text-left\"\n label={url}\n onClick={() => {\n handleNavigateTo(url);\n setSitemapOpen(false);\n }}\n >\n <span className=\"max-w-64 truncate text-left text-base\">\n {getUrlPath(url)}\n </span>\n </Button>\n </li>\n ))\n )}\n </ul>\n </Container>\n </DropDown.Panel>\n </DropDown>\n </ClickOutsideDiv>\n\n {/* Error Message Tooltip */}\n {showError && (\n <div className=\"absolute top-full left-4 z-20 mt-1\">\n <p\n id=\"browser-url-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n className=\"rounded-md bg-red-900/90 px-3 py-1.5 text-red-100 text-xs shadow-md backdrop-blur-sm\"\n >\n {error}\n </p>\n </div>\n )}\n </div>\n\n {/* Iframe */}\n <div className=\"relative z-0 flex min-h-0 w-full flex-1 flex-col overflow-hidden rounded-b-xl bg-background\">\n <iframe\n ref={internalIframeRef}\n src={currentUrl}\n title={content.iframeTitle.value}\n className=\"size-full flex-1\"\n sandbox={sandbox}\n loading=\"lazy\"\n aria-live=\"polite\"\n {...props}\n />\n </div>\n </section>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAyCA,MAAM,cAAc,QAAgB;CAClC,IAAI;EACF,MAAM,EAAE,UAAU,QAAQ,SAAS,IAAI,IAAI,GAAG;EAC9C,OAAO,GAAG,WAAW,SAAS,UAAU;CAC1C,QAAQ;EACN,OAAO;CACT;AACF;AAEA,MAAa,WAAW,EACtB,aAAa,uBACb,MACA,WACA,OACA,OAAO,MACP,cAAc,WACd,UAAU,2GACV,KACA,mBACA,GAAG,YACe;CAElB,MAAM,CAAC,UAAU,eAAe,SAAS,UAAU;CACnD,MAAM,CAAC,YAAY,iBAAiB,SAAS,UAAU;CAGvD,MAAM,CAAC,SAAS,cAAc,SAAmB,CAAC,UAAU,CAAC;CAC7D,MAAM,CAAC,cAAc,mBAAmB,SAAS,CAAC;CAElD,MAAM,CAAC,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WAAU;QACV,aAAY;QACZ;QACA,aAAY;kBAJd,CAME,oBAAC,OAAD;SAAK,WAAU;mBACb,oBAAC,OAAD;UACE,MAAK;UACL,KAAK;UACL,cAAY,QAAQ,uBAAuB;UAC3C,aAAa,QAAQ,yBAAyB;UAC9C,WAAW,MAAM,iBAAiB,EAAE,OAAO,KAAK;UAChD,OAAO;UACP,MAAK;SACN;QACE,IACL,oBAAC,MAAD;SACE,WAAU;SACV,cAAY,QAAQ,mBAAmB;mBAEtC,iBACC,oBAAC,MAAD;UAAI,WAAU;oBACX,QAAQ,eAAe;SACtB,KACF,gBACD,CAAC,kBAAkB,oBAAoB,WAAW,IACnD,oBAAC,MAAD;UAAI,WAAU;oBACX,eACG,QAAQ,aAAa,QACrB,QAAQ,aAAa;SACvB,KAEJ,oBAAoB,KAAK,QACvB,oBAAC,MAAD;UAAc,WAAU;oBACtB,oBAAC,QAAD;WACE,SAAQ;WACR,OAAM;WACN,MAAK;WACL,WAAU;WACV,OAAO;WACP,eAAe;YACb,iBAAiB,GAAG;YACpB,eAAe,KAAK;WACtB;qBAEA,oBAAC,QAAD;YAAM,WAAU;sBACb,WAAW,GAAG;WACX;UACA;SACN,GAhBK,GAgBL,CACL;QAED,EACK;;MACG,EACR;;IACK;IAGhB,aACC,oBAAC,OAAD;KAAK,WAAU;eACb,oBAAC,KAAD;MACE,IAAG;MACH,MAAK;MACL,aAAU;MACV,WAAU;gBAET;KACA;IACA;GAEJ;MAGL,oBAAC,OAAD;GAAK,WAAU;aACb,oBAAC,UAAD;IACE,KAAK;IACL,KAAK;IACL,OAAO,QAAQ,YAAY;IAC3B,WAAU;IACD;IACT,SAAQ;IACR,aAAU;IACV,GAAI;GACL;EACE,EACE;;AAEb"}
1
+ {"version":3,"file":"Browser.mjs","names":[],"sources":["../../../../src/components/Browser/Browser.tsx"],"sourcesContent":["'use client';\n\nimport { Container } from '@components/Container';\nimport { cn } from '@utils/cn';\nimport { ArrowLeft, ArrowRight, RotateCw, ScanSearch } from 'lucide-react';\nimport {\n type CSSProperties,\n type HTMLAttributes,\n type RefObject,\n type SubmitEvent,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { ClickOutsideDiv } from '../ClickOutsideDiv';\nimport { DropDown } from '../DropDown';\nimport { Input, inputVariants } from '../Input';\n\nexport type BrowserProps = {\n initialUrl?: string;\n path?: string;\n className?: string;\n style?: CSSProperties;\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n 'aria-label'?: string;\n sandbox?: string;\n ref?: RefObject<HTMLIFrameElement | null>;\n domainRestriction?: string;\n} & HTMLAttributes<HTMLIFrameElement>;\n\nconst UrlPath = ({ url }: { url: string }) => {\n const parts = getUrlPath(url).split('/').filter(Boolean);\n\n if (parts.length === 0) return <span>/</span>;\n\n return parts.flatMap((part, index, array) => [\n <span key={`part-${index}`}>{part}</span>,\n index < array.length - 1 && (\n <span key={`sep-${index}`} className=\"mx-2 text-neutral\">\n /\n </span>\n ),\n ]);\n};\n\nconst getUrlPath = (url: string) => {\n try {\n const { pathname, search, hash } = new URL(url);\n\n return `${pathname}${search}${hash}` || '/';\n } catch {\n return url;\n }\n};\n\nexport const Browser = ({\n initialUrl = 'https://example.com',\n path,\n className,\n style,\n size = 'md',\n 'aria-label': ariaLabel,\n sandbox = 'allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads',\n ref,\n domainRestriction,\n ...props\n}: BrowserProps) => {\n // --- State -----------------------------------------------------------------\n const [inputUrl, setInputUrl] = useState(initialUrl);\n const [currentUrl, setCurrentUrl] = useState(initialUrl);\n\n // History Management\n const [history, setHistory] = useState<string[]>([initialUrl]);\n const [currentIndex, setCurrentIndex] = useState(0);\n\n const [error, setError] = useState<string | null>(null);\n const [submitted, setSubmitted] = useState(false);\n const internalIframeRef = useRef<HTMLIFrameElement>(null);\n\n // Sitemap explorer state\n const [sitemapOpen, setSitemapOpen] = useState(false);\n const [sitemapUrls, setSitemapUrls] = useState<string[]>([]);\n const [sitemapSearch, setSitemapSearch] = useState('');\n const [sitemapLoading, setSitemapLoading] = useState(false);\n const [sitemapFetched, setSitemapFetched] = useState(false);\n const [sitemapError, setSitemapError] = useState(false);\n const sitemapInputRef = useRef<HTMLInputElement>(null);\n\n useImperativeHandle(ref, () => internalIframeRef.current!, []);\n const content = useIntlayer('browser');\n\n // --- Effects ---------------------------------------------------------------\n\n // Reset everything if initialUrl changes completely\n useEffect(() => {\n setInputUrl(initialUrl);\n setCurrentUrl(initialUrl);\n setHistory([initialUrl]);\n setCurrentIndex(0);\n setError(null);\n setSubmitted(false);\n setSitemapOpen(false);\n setSitemapUrls([]);\n setSitemapSearch('');\n setSitemapFetched(false);\n setSitemapError(false);\n }, [initialUrl]);\n\n // Sync external path changes with the URL bar and History\n useEffect(() => {\n if (!path) return;\n\n try {\n const baseOrigin = domainRestriction ?? initialUrl;\n const origin = new URL(baseOrigin).origin;\n const fullUrl = `${origin}${path}`;\n\n // Update Input (Always update the visual bar)\n setInputUrl(fullUrl);\n\n // Check internal iframe state to avoid reload if already there\n let isAlreadyAtUrl = false;\n if (internalIframeRef.current?.contentWindow) {\n try {\n const currentIframeHref =\n internalIframeRef.current.contentWindow.location.href;\n if (new URL(currentIframeHref).href === new URL(fullUrl).href) {\n isAlreadyAtUrl = true;\n }\n } catch {\n // Cross-origin access ignored\n }\n }\n\n // Update History Stack regardless of isAlreadyAtUrl so arrow navigation is always correct\n if (history[currentIndex] !== fullUrl) {\n setHistory((prev) => {\n const newHistory = prev.slice(0, currentIndex + 1);\n newHistory.push(fullUrl);\n return newHistory;\n });\n setCurrentIndex((prev) => prev + 1);\n }\n\n // Navigate only if NOT already there to avoid refreshing on internal iframe navigation\n if (!isAlreadyAtUrl) {\n setCurrentUrl(fullUrl);\n }\n\n setError(null);\n } catch {\n // Ignore invalid paths\n }\n }, [path, domainRestriction, initialUrl]); // Removed currentIndex dependency to prevent loops\n\n // Imperatively keep the iframe src in sync with currentUrl.\n // React's attribute reconciliation can be unreliable for cross-origin iframes after\n // internal navigation, so this effect is the source of truth for navigation.\n useEffect(() => {\n const iframe = internalIframeRef.current;\n if (!iframe) return;\n if (iframe.src !== currentUrl) {\n iframe.src = currentUrl;\n }\n }, [currentUrl]);\n\n // --- Navigation Logic ------------------------------------------------------\n\n const handleNavigateTo = (url: string) => {\n try {\n const validated = normalizeUrl(url);\n\n // If we are navigating to the exact same URL, just reload\n if (validated === currentUrl) {\n handleReload();\n return;\n }\n\n setCurrentUrl(validated);\n setInputUrl(validated);\n setError(null);\n\n // Update History: Slice future if we went back, then push new\n const newHistory = history.slice(0, currentIndex + 1);\n newHistory.push(validated);\n setHistory(newHistory);\n setCurrentIndex(newHistory.length - 1);\n } catch (e) {\n if (\n e instanceof Error &&\n e.message === 'URL does not match allowed domain' &&\n domainRestriction\n ) {\n setError(\n content.domainRestrictionError?.value ??\n `Only URLs from ${domainRestriction} are allowed.`\n );\n } else {\n setError(content.errorMessage.value);\n }\n }\n };\n\n const handleBack = () => {\n if (currentIndex > 0) {\n const newIndex = currentIndex - 1;\n const prevUrl = history[newIndex];\n setCurrentIndex(newIndex);\n setCurrentUrl(prevUrl);\n setInputUrl(prevUrl);\n setError(null);\n }\n };\n\n const handleForward = () => {\n if (currentIndex < history.length - 1) {\n const newIndex = currentIndex + 1;\n const nextUrl = history[newIndex];\n setCurrentIndex(newIndex);\n setCurrentUrl(nextUrl);\n setInputUrl(nextUrl);\n setError(null);\n }\n };\n\n const handleSubmit = (e: SubmitEvent<HTMLFormElement>) => {\n e.preventDefault();\n setSubmitted(true);\n handleNavigateTo(inputUrl);\n };\n\n const handleReload = () => {\n const iframe = internalIframeRef.current;\n if (!iframe) return;\n const src = iframe.src;\n iframe.src = '';\n setTimeout(() => {\n if (internalIframeRef.current) internalIframeRef.current.src = src;\n }, 50);\n };\n\n // --- Validation Helpers ----------------------------------------------------\n const isValidHostname = (host: string) => {\n if (host === 'localhost') return true;\n if (/^(\\d{1,3}\\.){3}\\d{1,3}$/.test(host)) return true;\n if (/^[a-f0-9:]+$/i.test(host)) return true;\n if (!/^[a-z0-9.-]+$/i.test(host)) return false;\n if (/^[-.]/.test(host) || /[-.]$/.test(host)) return false;\n if (host.includes('..')) return false;\n if (!host.includes('.')) return false;\n return true;\n };\n\n const getRestrictionOrigin = (): URL | null => {\n if (!domainRestriction) return null;\n try {\n return new URL(domainRestriction);\n } catch {\n return null;\n }\n };\n\n const normalizeUrl = (raw: string) => {\n const trimmed = raw.trim();\n if (!trimmed || /\\s/.test(trimmed)) throw new Error('Invalid');\n\n const restrictionOrigin = getRestrictionOrigin();\n const isRelativePath = trimmed.startsWith('/') && !trimmed.startsWith('//');\n\n if (isRelativePath) {\n if (restrictionOrigin) {\n return new URL(`${restrictionOrigin.origin}${trimmed}`).toString();\n }\n return new URL(`${new URL(currentUrl).origin}${trimmed}`).toString();\n }\n\n const hasProtocol = /^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(trimmed);\n const candidate = hasProtocol ? trimmed : `https://${trimmed}`;\n const url = new URL(candidate);\n\n if (url.protocol !== 'http:' && url.protocol !== 'https:') {\n throw new Error('Only http(s) is allowed');\n }\n\n if (!isValidHostname(url.hostname)) throw new Error('Invalid host');\n\n if (restrictionOrigin) {\n const urlMatches =\n url.hostname === restrictionOrigin.hostname &&\n url.protocol === restrictionOrigin.protocol &&\n (restrictionOrigin.port === '' ||\n url.port === restrictionOrigin.port ||\n url.host === restrictionOrigin.host);\n\n if (!urlMatches) throw new Error('URL does not match allowed domain');\n }\n\n return url.toString();\n };\n\n const handleSitemapToggle = async () => {\n const nextOpen = !sitemapOpen;\n setSitemapOpen(nextOpen);\n\n if (nextOpen && !sitemapFetched) {\n setSitemapLoading(true);\n setSitemapError(false);\n setSitemapFetched(true);\n try {\n const { extractUrlFromSitemap } = await import(\n './extractUrlFromSitemap'\n );\n const urls = await extractUrlFromSitemap(currentUrl);\n setSitemapUrls(urls);\n if (urls.length === 0) setSitemapError(false);\n } catch {\n setSitemapError(true);\n } finally {\n setSitemapLoading(false);\n }\n setTimeout(() => sitemapInputRef.current?.focus(), 50);\n }\n };\n\n const filteredSitemapUrls = useMemo(() => {\n const query = sitemapSearch.trim().toLowerCase();\n if (!query) return sitemapUrls;\n return sitemapUrls.filter((url) => url.toLowerCase().includes(query));\n }, [sitemapUrls, sitemapSearch]);\n\n const showError = submitted && !!error;\n const canGoBack = currentIndex > 0;\n const canGoForward = currentIndex < history.length - 1;\n\n return (\n <section\n className={cn(\n 'flex w-full flex-col overflow-hidden rounded-xl bg-background shadow-[0_4px_12px_rgba(0,0,0,0.4),0_0_1px_rgba(0,0,0,0.2)]',\n className\n )}\n style={style}\n aria-label={ariaLabel ?? content.ariaLabel.value}\n >\n {/* Top bar */}\n <div className=\"relative z-10 flex shrink-0 items-center gap-3 rounded-t-xl bg-text/15 px-4 py-2\">\n {/* Navigation Controls */}\n <div className=\"flex items-center gap-1\">\n <Button\n type=\"button\"\n onClick={handleBack}\n disabled={!canGoBack}\n variant=\"hoverable\"\n size=\"icon-md\"\n label={content.backButtonLabel.value}\n Icon={ArrowLeft}\n />\n <Button\n type=\"button\"\n onClick={handleForward}\n disabled={!canGoForward}\n variant=\"hoverable\"\n size=\"icon-md\"\n label={content.forwardButtonLabel.value}\n Icon={ArrowRight}\n />\n </div>\n\n {/* URL Bar */}\n <form\n onSubmit={handleSubmit}\n noValidate\n className={cn(\n inputVariants(),\n 'flex w-full gap-2 rounded-xl p-0.5! supports-[corner-shape:squircle]:rounded-2xl',\n 'bg-neutral/10 text-text/50 placeholder:text-neutral/80'\n )}\n >\n <label htmlFor=\"browser-url\" className=\"sr-only\">\n {content.urlLabel}\n </label>\n <Input\n id=\"browser-url\"\n type=\"text\"\n inputMode=\"url\"\n spellCheck={false}\n autoCapitalize=\"off\"\n variant=\"invisible\"\n className=\"ml-3 p-0!\"\n size=\"sm\"\n autoCorrect=\"off\"\n value={inputUrl}\n onChange={(e) => {\n setInputUrl(e.target.value);\n if (showError) setError(null);\n }}\n placeholder={content.urlPlaceholder.value}\n aria-label={content.urlLabel.value}\n aria-invalid={showError}\n aria-describedby={showError ? 'browser-url-error' : undefined}\n />\n\n <Button\n type=\"button\"\n onClick={handleReload}\n variant=\"hoverable\"\n size=\"icon-md\"\n className=\"p-1!\"\n label={'content.reloadButtonTitle.value'}\n Icon={RotateCw}\n />\n\n {/* invisible submit */}\n <button type=\"submit\" className=\"sr-only absolute\" tabIndex={-1} />\n </form>\n\n {/* Sitemap Explorer */}\n <ClickOutsideDiv\n onClickOutSide={() => setSitemapOpen(false)}\n disabled={!sitemapOpen}\n role=\"none\"\n >\n <DropDown identifier=\"sitemap-explorer\">\n <DropDown.Trigger\n identifier=\"sitemap-explorer-trigger\"\n type=\"button\"\n color=\"text\"\n onClick={handleSitemapToggle}\n variant=\"hoverable\"\n size=\"icon-md\"\n label={content.sitemapButtonLabel.value}\n Icon={ScanSearch}\n />\n\n <DropDown.Panel\n identifier=\"sitemap-explorer\"\n isHidden={!sitemapOpen}\n align=\"end\"\n isFocusable\n isOverable\n >\n <Container\n className=\"min-w-28 rounded-md!\"\n roundedSize=\"sm\"\n border\n borderColor=\"neutral\"\n >\n <div className=\"p-2\">\n <Input\n type=\"search\"\n ref={sitemapInputRef}\n aria-label={content.sitemapSearchAriaLabel.value}\n placeholder={content.sitemapSearchPlaceholder.value}\n onChange={(e) => setSitemapSearch(e.target.value)}\n value={sitemapSearch}\n size=\"sm\"\n />\n </div>\n <ul\n className=\"max-h-64 divide-y divide-dotted divide-neutral/30 overflow-y-auto p-1 text-center\"\n aria-label={content.sitemapButtonLabel.value}\n >\n {sitemapLoading ? (\n <li className=\"px-3 py-4 text-center text-neutral text-xs\">\n {content.sitemapLoading}\n </li>\n ) : sitemapError ||\n (!sitemapLoading && filteredSitemapUrls.length === 0) ? (\n <li className=\"px-3 py-4 text-center text-neutral text-xs\">\n {sitemapError\n ? content.sitemapError\n : content.sitemapEmpty}\n </li>\n ) : (\n filteredSitemapUrls.map((url) => (\n <li key={url} className=\"py-0.5\">\n <Button\n variant=\"hoverable\"\n color=\"text\"\n size=\"sm\"\n className=\"w-full text-left\"\n label={url}\n onClick={() => {\n handleNavigateTo(url);\n setSitemapOpen(false);\n }}\n >\n <span className=\"max-w-64 truncate text-left text-base\">\n <UrlPath url={url} />\n </span>\n </Button>\n </li>\n ))\n )}\n </ul>\n </Container>\n </DropDown.Panel>\n </DropDown>\n </ClickOutsideDiv>\n\n {/* Error Message Tooltip */}\n {showError && (\n <div className=\"absolute top-full left-4 z-20 mt-1\">\n <p\n id=\"browser-url-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n className=\"rounded-md bg-red-900/90 px-3 py-1.5 text-red-100 text-xs shadow-md backdrop-blur-sm\"\n >\n {error}\n </p>\n </div>\n )}\n </div>\n\n {/* Iframe */}\n <div className=\"relative z-0 flex min-h-0 w-full flex-1 flex-col overflow-hidden rounded-b-xl bg-background\">\n <iframe\n ref={internalIframeRef}\n src={currentUrl}\n title={content.iframeTitle.value}\n className=\"size-full flex-1\"\n sandbox={sandbox}\n loading=\"lazy\"\n aria-live=\"polite\"\n {...props}\n />\n </div>\n </section>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAkCA,MAAM,WAAW,EAAE,UAA2B;CAC5C,MAAM,QAAQ,WAAW,GAAG,EAAE,MAAM,GAAG,EAAE,OAAO,OAAO;CAEvD,IAAI,MAAM,WAAW,GAAG,OAAO,oBAAC,QAAD,YAAM,IAAO;CAE5C,OAAO,MAAM,SAAS,MAAM,OAAO,UAAU,CAC3C,oBAAC,QAAD,YAA6B,KAAW,GAA7B,QAAQ,OAAqB,GACxC,QAAQ,MAAM,SAAS,KACrB,oBAAC,QAAD;EAA2B,WAAU;YAAoB;CAEnD,GAFK,OAAO,OAEZ,CAEV,CAAC;AACH;AAEA,MAAM,cAAc,QAAgB;CAClC,IAAI;EACF,MAAM,EAAE,UAAU,QAAQ,SAAS,IAAI,IAAI,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AK;MACL,aAAU;MACV,WAAU;gBAET;KACA;IACA;GAEJ;MAGL,oBAAC,OAAD;GAAK,WAAU;aACb,oBAAC,UAAD;IACE,KAAK;IACL,KAAK;IACL,OAAO,QAAQ,YAAY;IAC3B,WAAU;IACD;IACT,SAAQ;IACR,aAAU;IACV,GAAI;GACL;EACE,EACE;;AAEb"}
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
+ import { useUser } from "../../hooks/useUser/index.mjs";
3
4
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
4
5
  import { AutoCompleteTextarea } from "../TextArea/AutocompleteTextArea.mjs";
5
- import { useUser } from "../../hooks/useUser/index.mjs";
6
6
  import { useEffect, useState } from "react";
7
7
  import { Check, X } from "lucide-react";
8
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { NodeWrapper, traceKeys } from "./index.mjs";
1
+ import { NodeWrapper } from "./index.mjs";
2
2
  import { createElement } from "react";
3
3
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
4
4
  import * as NodeTypes from "@intlayer/types/nodeType";
@@ -8,7 +8,7 @@ const ConditionWrapper = (props) => {
8
8
  const { keyPath, section } = props;
9
9
  return /* @__PURE__ */ jsx("div", {
10
10
  className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
11
- children: Object.keys(section).filter((key) => !traceKeys.includes(key)).map((key) => {
11
+ children: Object.keys(section[NodeTypes.CONDITION]).map((key) => {
12
12
  const newKeyPathEl = {
13
13
  type: NodeTypes.CONDITION,
14
14
  key
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/ConditionWrapper.tsx"],"sourcesContent":["import type { ConditionContent } from '@intlayer/core/transpiler';\nimport type { ContentNode } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps, traceKeys } from './index';\n\ntype ConditionWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: ConditionContent<ContentNode>;\n};\n\nexport const ConditionWrapper: FC<ConditionWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeTypes.CONDITION,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section[NodeTypes.CONDITION][\n key as keyof (typeof section)[typeof NodeTypes.CONDITION]\n ]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAa,oBAA+C,UAAU;CACpE,MAAM,EAAE,SAAS,YAAY;CAE7B,OACE,oBAAC,OAAD;EAAK,WAAU;YACZ,OAAO,KAAK,OAAO,EACjB,QAAQ,QAAQ,CAAC,UAAU,SAAS,GAAG,CAAC,EACxC,KAAK,QAAQ;GACZ,MAAM,eAAwB;IAC5B,MAAM,UAAU;IAChB;GACF;GACA,MAAM,aAAwB,CAAC,GAAG,SAAS,YAAY;GAEvD,MAAM,aACJ,QAAQ,UAAU,WAChB;GAGJ,OACE,8CACE,oBAAC,QAAD;IAAM,WAAU;cAA+B;GAAU,IACzD,8BAAC,aAAD;IACE,GAAI;IACC;IACL,SAAS;IACT,SAAS;GACV,EACD;EAEN,CAAC;CACA;AAET"}
1
+ {"version":3,"file":"ConditionWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/ConditionWrapper.tsx"],"sourcesContent":["import type { ConditionContent } from '@intlayer/core/transpiler';\nimport type { ContentNode } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype ConditionWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: ConditionContent<ContentNode>;\n};\n\nexport const ConditionWrapper: FC<ConditionWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section[NodeTypes.CONDITION]).map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeTypes.CONDITION,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section[NodeTypes.CONDITION][\n key as keyof (typeof section)[typeof NodeTypes.CONDITION]\n ]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAa,oBAA+C,UAAU;CACpE,MAAM,EAAE,SAAS,YAAY;CAE7B,OACE,oBAAC,OAAD;EAAK,WAAU;YACZ,OAAO,KAAK,QAAQ,UAAU,UAAU,EAAE,KAAK,QAAQ;GACtD,MAAM,eAAwB;IAC5B,MAAM,UAAU;IAChB;GACF;GACA,MAAM,aAAwB,CAAC,GAAG,SAAS,YAAY;GAEvD,MAAM,aACJ,QAAQ,UAAU,WAChB;GAGJ,OACE,8CACE,oBAAC,QAAD;IAAM,WAAU;cAA+B;GAAU,IACzD,8BAAC,aAAD;IACE,GAAI;IACC;IACL,SAAS;IACT,SAAS;GACV,EACD;EAEN,CAAC;CACE;AAET"}
@@ -1,4 +1,4 @@
1
- import { NodeWrapper, traceKeys } from "./index.mjs";
1
+ import { NodeWrapper } from "./index.mjs";
2
2
  import { createElement } from "react";
3
3
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
4
4
  import * as NodeTypes from "@intlayer/types/nodeType";
@@ -8,7 +8,7 @@ const EnumerationWrapper = (props) => {
8
8
  const { keyPath, section } = props;
9
9
  return /* @__PURE__ */ jsx("div", {
10
10
  className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
11
- children: Object.keys(section).filter((key) => !traceKeys.includes(key)).map((key) => {
11
+ children: Object.keys(section[NodeTypes.ENUMERATION]).map((key) => {
12
12
  const newKeyPathEl = {
13
13
  type: NodeTypes.ENUMERATION,
14
14
  key
@@ -1 +1 @@
1
- {"version":3,"file":"EnumerationWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx"],"sourcesContent":["import type { EnumerationContent } from '@intlayer/core/transpiler';\nimport type { ContentNode } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps, traceKeys } from './index';\n\ntype EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: EnumerationContent<ContentNode>;\n};\n\nexport const EnumerationWrapper: FC<EnumerationWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeTypes.ENUMERATION,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section[NodeTypes.ENUMERATION][\n key as keyof (typeof section)[typeof NodeTypes.ENUMERATION]\n ]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAa,sBAAmD,UAAU;CACxE,MAAM,EAAE,SAAS,YAAY;CAE7B,OACE,oBAAC,OAAD;EAAK,WAAU;YACZ,OAAO,KAAK,OAAO,EACjB,QAAQ,QAAQ,CAAC,UAAU,SAAS,GAAG,CAAC,EACxC,KAAK,QAAQ;GACZ,MAAM,eAAwB;IAC5B,MAAM,UAAU;IAChB;GACF;GACA,MAAM,aAAwB,CAAC,GAAG,SAAS,YAAY;GAEvD,MAAM,aACJ,QAAQ,UAAU,aAChB;GAGJ,OACE,8CACE,oBAAC,QAAD;IAAM,WAAU;cAA+B;GAAU,IACzD,8BAAC,aAAD;IACE,GAAI;IACC;IACL,SAAS;IACT,SAAS;GACV,EACD;EAEN,CAAC;CACA;AAET"}
1
+ {"version":3,"file":"EnumerationWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx"],"sourcesContent":["import type { EnumerationContent } from '@intlayer/core/transpiler';\nimport type { ContentNode } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: EnumerationContent<ContentNode>;\n};\n\nexport const EnumerationWrapper: FC<EnumerationWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section[NodeTypes.ENUMERATION]).map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeTypes.ENUMERATION,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section[NodeTypes.ENUMERATION][\n key as keyof (typeof section)[typeof NodeTypes.ENUMERATION]\n ]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAa,sBAAmD,UAAU;CACxE,MAAM,EAAE,SAAS,YAAY;CAE7B,OACE,oBAAC,OAAD;EAAK,WAAU;YACZ,OAAO,KAAK,QAAQ,UAAU,YAAY,EAAE,KAAK,QAAQ;GACxD,MAAM,eAAwB;IAC5B,MAAM,UAAU;IAChB;GACF;GACA,MAAM,aAAwB,CAAC,GAAG,SAAS,YAAY;GAEvD,MAAM,aACJ,QAAQ,UAAU,aAChB;GAGJ,OACE,8CACE,oBAAC,QAAD;IAAM,WAAU;cAA+B;GAAU,IACzD,8BAAC,aAAD;IACE,GAAI;IACC;IACL,SAAS;IACT,SAAS;GACV,EACD;EAEN,CAAC;CACE;AAET"}
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
 
3
+ import { useAuditContentDeclarationField } from "../../../hooks/reactQuery.mjs";
3
4
  import { Container } from "../../Container/index.mjs";
4
5
  import { Loader } from "../../Loader/index.mjs";
5
6
  import { Button, ButtonColor, ButtonSize, ButtonTextAlign, ButtonVariant } from "../../Button/Button.mjs";
@@ -8,7 +9,6 @@ import { InputVariant } from "../../Input/Input.mjs";
8
9
  import { SwitchSelector, SwitchSelectorColor, SwitchSelectorSize } from "../../SwitchSelector/SwitchSelector.mjs";
9
10
  import { useLocaleSwitcherContent } from "../../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
10
11
  import { ContentEditorInput as ContentEditorInput$1 } from "../../ContentEditor/ContentEditorInput.mjs";
11
- import { useAuditContentDeclarationField } from "../../../hooks/reactQuery.mjs";
12
12
  import { ContentEditorTextArea as ContentEditorTextArea$1 } from "../../ContentEditor/ContentEditorTextArea.mjs";
13
13
  import { renameKey } from "./object.mjs";
14
14
  import { Label } from "../../Label/index.mjs";
@@ -17,9 +17,9 @@ import { SafeHtmlRenderer } from "./SafeHtmlRenderer.mjs";
17
17
  import { Fragment, Suspense, lazy, memo, useState } from "react";
18
18
  import { Plus, Trash, WandSparkles } from "lucide-react";
19
19
  import { jsx, jsxs } from "react/jsx-runtime";
20
+ import { useConfiguration, useEditedContent } from "@intlayer/editor-react";
20
21
  import { useIntlayer, useLocale } from "react-intlayer";
21
22
  import { getLocaleName } from "@intlayer/core/localization";
22
- import { useConfiguration, useEditedContent } from "@intlayer/editor-react";
23
23
  import { getEmptyNode, getNodeType } from "@intlayer/core/dictionaryManipulator";
24
24
  import * as NodeTypes from "@intlayer/types/nodeType";
25
25
  import { camelCaseToSentence } from "@intlayer/config/client";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { ButtonColor } from "../../Button/Button.mjs";
4
3
  import { useSession } from "../../../hooks/useAuth/useSession.mjs";
5
4
  import { useAddDictionary, useGetProjects } from "../../../hooks/reactQuery.mjs";
5
+ import { ButtonColor } from "../../Button/Button.mjs";
6
6
  import { MultiSelect } from "../../Select/Multiselect.mjs";
7
7
  import { useForm } from "../../Form/FormBase.mjs";
8
8
  import { Form } from "../../Form/Form.mjs";
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
+ import { useSession } from "../../../hooks/useAuth/useSession.mjs";
4
+ import { useAuditContentDeclarationMetadata, useGetProjects, useGetTags } from "../../../hooks/reactQuery.mjs";
3
5
  import { Loader } from "../../Loader/index.mjs";
4
6
  import { ButtonColor, ButtonSize, ButtonVariant } from "../../Button/Button.mjs";
5
7
  import { Checkbox } from "../../Input/Checkbox.mjs";
6
- import { useSession } from "../../../hooks/useAuth/useSession.mjs";
7
- import { useAuditContentDeclarationMetadata, useGetProjects, useGetTags } from "../../../hooks/reactQuery.mjs";
8
8
  import { MultiSelect } from "../../Select/Multiselect.mjs";
9
9
  import { Select } from "../../Select/Select.mjs";
10
10
  import { useForm as useForm$1 } from "../../Form/FormBase.mjs";
@@ -13,8 +13,8 @@ import { useDictionaryDetailsSchema } from "./useDictionaryDetailsSchema.mjs";
13
13
  import { useEffect } from "react";
14
14
  import { WandSparkles } from "lucide-react";
15
15
  import { jsx, jsxs } from "react/jsx-runtime";
16
- import { useIntlayer } from "react-intlayer";
17
16
  import { useEditedContent } from "@intlayer/editor-react";
17
+ import { useIntlayer } from "react-intlayer";
18
18
  import { useWatch } from "react-hook-form";
19
19
  import { AnimatePresence, motion } from "framer-motion";
20
20
 
@@ -13,8 +13,8 @@ import { StructureEditor } from "./StructureEditor.mjs";
13
13
  import { useEffect, useState } from "react";
14
14
  import { ArrowLeft } from "lucide-react";
15
15
  import { jsx, jsxs } from "react/jsx-runtime";
16
- import { useIntlayer } from "react-intlayer";
17
16
  import { useConfiguration, useDictionariesRecordActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
17
+ import { useIntlayer } from "react-intlayer";
18
18
 
19
19
  //#region src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx
20
20
  const DictionaryFieldEditor = ({ dictionary, onClickDictionaryList, isDarkMode, mode, onDelete, onSave, showReturnButton = true }) => {
@@ -5,8 +5,8 @@ import { getIsEditableSection } from "../getIsEditableSection.mjs";
5
5
  import { useState } from "react";
6
6
  import { ChevronRight, Plus } from "lucide-react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
- import { useIntlayer } from "react-intlayer";
9
8
  import { useEditedContentActions, useEditorLocale, useFocusUnmergedDictionary } from "@intlayer/editor-react";
9
+ import { useIntlayer } from "react-intlayer";
10
10
  import { getContentNodeByKeyPath, getEmptyNode, getNodeType } from "@intlayer/core/dictionaryManipulator";
11
11
  import * as NodeTypes from "@intlayer/types/nodeType";
12
12
  import { isSameKeyPath } from "@intlayer/core/utils";
@@ -1,16 +1,16 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../../utils/cn.mjs";
4
- import { ButtonColor, ButtonVariant } from "../../Button/Button.mjs";
5
4
  import { useAuth } from "../../../hooks/useAuth/useAuth.mjs";
6
5
  import { useDeleteDictionary, usePushDictionaries, useWriteDictionary } from "../../../hooks/reactQuery.mjs";
6
+ import { ButtonColor, ButtonVariant } from "../../Button/Button.mjs";
7
7
  import { Form } from "../../Form/Form.mjs";
8
8
  import { Modal, ModalSize } from "../../Modal/Modal.mjs";
9
9
  import { useState } from "react";
10
10
  import { ArrowUpFromLine, Download, RotateCcw, Save, Trash } from "lucide-react";
11
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
- import { useIntlayer } from "react-intlayer";
13
12
  import { useDictionariesRecordActions, useEditedContent } from "@intlayer/editor-react";
13
+ import { useIntlayer } from "react-intlayer";
14
14
 
15
15
  //#region src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx
16
16
  const SaveForm = ({ dictionary, mode, className, onDelete, onSave, ...props }) => {
@@ -7,8 +7,8 @@ import { EditableFieldInput } from "../../EditableField/EditableFieldInput.mjs";
7
7
  import { NodeTypeSelector } from "../NodeTypeSelector.mjs";
8
8
  import { Plus, Trash } from "lucide-react";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
- import { useIntlayer } from "react-intlayer";
11
10
  import { useConfiguration, useEditedContentActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
11
+ import { useIntlayer } from "react-intlayer";
12
12
  import { getDefaultNode, getNodeChildren, getNodeType } from "@intlayer/core/dictionaryManipulator";
13
13
  import * as NodeTypes from "@intlayer/types/nodeType";
14
14
  import { isSameKeyPath } from "@intlayer/core/utils";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "../../Input/OTPInput.mjs";
4
3
  import { useItemSelector } from "../../../hooks/useItemSelector.mjs";
4
+ import { InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "../../Input/OTPInput.mjs";
5
5
  import { useFormField } from "../FormField.mjs";
6
6
  import { FormItemLayout } from "../layout/FormItemLayout.mjs";
7
7
  import { Form } from "../Form.mjs";
@@ -8,7 +8,7 @@ const FormItemLayout = ({ label, description, isRequired, info, children, showEr
8
8
  className: cn("flex w-full flex-col flex-wrap gap-2 px-1 py-2", className),
9
9
  children: [
10
10
  (description || label) && /* @__PURE__ */ jsxs("div", {
11
- className: "flex flex-col gap-1 p-1 leading-none",
11
+ className: "flex max-w-full flex-col gap-1 p-1 leading-none",
12
12
  children: [label && /* @__PURE__ */ jsx(FormLabelLayout, {
13
13
  isRequired,
14
14
  info,
@@ -1 +1 @@
1
- {"version":3,"file":"FormItemLayout.mjs","names":[],"sources":["../../../../../src/components/Form/layout/FormItemLayout.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport type { FC, ReactNode } from 'react';\nimport { Form } from '../Form';\nimport { FormLabelLayout, type FormLabelLayoutProps } from './FormLabelLayout';\n\nexport type FormItemLayoutProps = Omit<FormLabelLayoutProps, 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n showErrorMessage?: boolean;\n className?: string;\n};\n\nexport const FormItemLayout: FC<FormItemLayoutProps> = ({\n label,\n description,\n isRequired,\n info,\n children,\n showErrorMessage = true,\n htmlFor,\n className,\n}) => (\n <Form.Item\n className={cn('flex w-full flex-col flex-wrap gap-2 px-1 py-2', className)}\n >\n {(description || label) && (\n <div className=\"flex flex-col gap-1 p-1 leading-none\">\n {label && (\n <FormLabelLayout\n isRequired={isRequired}\n info={info}\n htmlFor={htmlFor}\n >\n {label}\n </FormLabelLayout>\n )}\n {description && <Form.Description>{description}</Form.Description>}\n </div>\n )}\n <Form.Control>{children}</Form.Control>\n\n {showErrorMessage && <Form.Message data-testid=\"error-message\" />}\n </Form.Item>\n);\n"],"mappings":";;;;;;AAaA,MAAa,kBAA2C,EACtD,OACA,aACA,YACA,MACA,UACA,mBAAmB,MACnB,SACA,gBAEA,qBAAC,KAAK,MAAN;CACE,WAAW,GAAG,kDAAkD,SAAS;WAD3E;GAGI,eAAe,UACf,qBAAC,OAAD;GAAK,WAAU;aAAf,CACG,SACC,oBAAC,iBAAD;IACc;IACN;IACG;cAER;GACc,IAElB,eAAe,oBAAC,KAAK,aAAN,YAAmB,YAA8B,EAC9D;;EAEP,oBAAC,KAAK,SAAN,EAAe,SAAuB;EAErC,oBAAoB,oBAAC,KAAK,SAAN,EAAc,eAAY,gBAAiB;CACvD"}
1
+ {"version":3,"file":"FormItemLayout.mjs","names":[],"sources":["../../../../../src/components/Form/layout/FormItemLayout.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport type { FC, ReactNode } from 'react';\nimport { Form } from '../Form';\nimport { FormLabelLayout, type FormLabelLayoutProps } from './FormLabelLayout';\n\nexport type FormItemLayoutProps = Omit<FormLabelLayoutProps, 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n showErrorMessage?: boolean;\n className?: string;\n};\n\nexport const FormItemLayout: FC<FormItemLayoutProps> = ({\n label,\n description,\n isRequired,\n info,\n children,\n showErrorMessage = true,\n htmlFor,\n className,\n}) => (\n <Form.Item\n className={cn('flex w-full flex-col flex-wrap gap-2 px-1 py-2', className)}\n >\n {(description || label) && (\n <div className=\"flex max-w-full flex-col gap-1 p-1 leading-none\">\n {label && (\n <FormLabelLayout\n isRequired={isRequired}\n info={info}\n htmlFor={htmlFor}\n >\n {label}\n </FormLabelLayout>\n )}\n {description && <Form.Description>{description}</Form.Description>}\n </div>\n )}\n <Form.Control>{children}</Form.Control>\n\n {showErrorMessage && <Form.Message data-testid=\"error-message\" />}\n </Form.Item>\n);\n"],"mappings":";;;;;;AAaA,MAAa,kBAA2C,EACtD,OACA,aACA,YACA,MACA,UACA,mBAAmB,MACnB,SACA,gBAEA,qBAAC,KAAK,MAAN;CACE,WAAW,GAAG,kDAAkD,SAAS;WAD3E;GAGI,eAAe,UACf,qBAAC,OAAD;GAAK,WAAU;aAAf,CACG,SACC,oBAAC,iBAAD;IACc;IACN;IACG;cAER;GACc,IAElB,eAAe,oBAAC,KAAK,aAAN,YAAmB,YAA8B,EAC9D;;EAEP,oBAAC,KAAK,SAAN,EAAe,SAAuB;EAErC,oBAAoB,oBAAC,KAAK,SAAN,EAAc,eAAY,gBAAiB;CACvD"}
@@ -0,0 +1,85 @@
1
+ 'use client';
2
+
3
+ import { cn } from "../../utils/cn.mjs";
4
+ import { Container } from "../Container/index.mjs";
5
+ import { Flag } from "../Flags/Flag.mjs";
6
+ import { Suspense, useEffect, useState } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { ALL_LOCALES, getHTMLTextDir, getLocaleName } from "intlayer";
9
+
10
+ //#region src/components/LanguageBackground/LanguageSection.tsx
11
+ const shuffleArray = (array, limit) => {
12
+ const shuffled = [...array];
13
+ for (let i = shuffled.length - 1; i > 0; i--) {
14
+ const randomIndex = Math.floor(Math.random() * (i + 1));
15
+ [shuffled[i], shuffled[randomIndex]] = [shuffled[randomIndex], shuffled[i]];
16
+ }
17
+ return limit ? shuffled.slice(0, limit) : shuffled;
18
+ };
19
+ const LocalCard = ({ locale, ...props }) => /* @__PURE__ */ jsx("div", {
20
+ className: "group z-10 mx-8 inline-flex shrink-0 transition-transform duration-300 hover:scale-105",
21
+ ...props,
22
+ children: /* @__PURE__ */ jsxs(Container, {
23
+ roundedSize: "xl",
24
+ className: "flex flex-row items-center gap-5 p-3",
25
+ children: [/* @__PURE__ */ jsx(Flag, {
26
+ locale,
27
+ className: "max-h-5 max-w-5 rounded-sm grayscale-80 transition duration-300 group-hover:grayscale-0",
28
+ width: 640,
29
+ height: 480,
30
+ loading: "lazy"
31
+ }), /* @__PURE__ */ jsx("span", {
32
+ dir: getHTMLTextDir(locale),
33
+ lang: locale,
34
+ className: "flex text-nowrap",
35
+ children: getLocaleName(locale)
36
+ })]
37
+ })
38
+ });
39
+ const LocalCardList = ({ localeList, className, ...props }) => /* @__PURE__ */ jsx("div", {
40
+ className: "relative flex w-full overflow-hidden",
41
+ ...props,
42
+ children: /* @__PURE__ */ jsxs("div", {
43
+ className: cn("inline-flex shrink-0 will-change-transform", className),
44
+ children: [localeList.map((locale, index) => /* @__PURE__ */ jsx(LocalCard, { locale }, `${locale}-first-${index}`)), localeList.map((locale, index) => /* @__PURE__ */ jsx(LocalCard, { locale }, `${locale}-second-${index}`))]
45
+ })
46
+ });
47
+ const NUM_OF_LOCALES = 15;
48
+ const emptyArrayOfLocale = new Array(4).fill(0).map(() => []);
49
+ const arrayOfLocale = new Array(4).fill(0).map(() => shuffleArray(Object.values(ALL_LOCALES), NUM_OF_LOCALES));
50
+ const LanguageSection = ({ className, ...props }) => {
51
+ const [localeList, setLocaleList] = useState(emptyArrayOfLocale);
52
+ const [firstPart, secondPart, thirdPart, fourthPart] = localeList;
53
+ useEffect(() => {
54
+ setLocaleList(arrayOfLocale);
55
+ }, []);
56
+ return /* @__PURE__ */ jsx("section", {
57
+ className: cn("mask-[linear-gradient(to_right,transparent_0,black_128px,black_calc(100%-128px),transparent_100%)] my-10 w-full overflow-hidden", className),
58
+ ...props,
59
+ children: /* @__PURE__ */ jsx("div", {
60
+ className: "relative flex w-full flex-col gap-5 py-3",
61
+ children: /* @__PURE__ */ jsxs(Suspense, { children: [
62
+ /* @__PURE__ */ jsx(LocalCardList, {
63
+ localeList: firstPart,
64
+ className: "horizontal-loop-1"
65
+ }),
66
+ /* @__PURE__ */ jsx(LocalCardList, {
67
+ localeList: secondPart,
68
+ className: "horizontal-loop-2"
69
+ }),
70
+ /* @__PURE__ */ jsx(LocalCardList, {
71
+ localeList: thirdPart,
72
+ className: "horizontal-loop-1"
73
+ }),
74
+ /* @__PURE__ */ jsx(LocalCardList, {
75
+ localeList: fourthPart,
76
+ className: "horizontal-loop-2"
77
+ })
78
+ ] })
79
+ })
80
+ });
81
+ };
82
+
83
+ //#endregion
84
+ export { LanguageSection };
85
+ //# sourceMappingURL=LanguageSection.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageSection.mjs","names":[],"sources":["../../../../src/components/LanguageBackground/LanguageSection.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@utils/cn';\nimport {\n ALL_LOCALES,\n getHTMLTextDir,\n getLocaleName,\n type Locale,\n} from 'intlayer';\nimport {\n type FC,\n type HTMLAttributes,\n Suspense,\n useEffect,\n useState,\n} from 'react';\nimport { Container } from '../Container';\nimport { Flag } from '../Flags';\n\nconst shuffleArray = (array: string[], limit?: number) => {\n const shuffled = [...array];\n\n for (let i = shuffled.length - 1; i > 0; i--) {\n const randomIndex = Math.floor(Math.random() * (i + 1));\n\n [shuffled[i], shuffled[randomIndex]] = [shuffled[randomIndex], shuffled[i]];\n }\n\n return limit ? shuffled.slice(0, limit) : shuffled;\n};\n\nconst LocalCard: FC<{ locale: string }> = ({ locale, ...props }) => (\n <div\n className=\"group z-10 mx-8 inline-flex shrink-0 transition-transform duration-300 hover:scale-105\"\n {...props}\n >\n <Container\n roundedSize=\"xl\"\n className=\"flex flex-row items-center gap-5 p-3\"\n >\n <Flag\n locale={locale as Locale}\n className=\"max-h-5 max-w-5 rounded-sm grayscale-80 transition duration-300 group-hover:grayscale-0\"\n width={640}\n height={480}\n loading=\"lazy\"\n />\n <span\n dir={getHTMLTextDir(locale as Locale)}\n lang={locale as Locale}\n className=\"flex text-nowrap\"\n >\n {getLocaleName(locale as Locale)}\n </span>\n </Container>\n </div>\n);\n\nconst LocalCardList: FC<{ localeList: string[]; className?: string }> = ({\n localeList,\n className,\n ...props\n}) => (\n <div className=\"relative flex w-full overflow-hidden\" {...props}>\n <div\n className={cn('inline-flex shrink-0 will-change-transform', className)}\n >\n {/* First set of cards */}\n {localeList.map((locale, index) => (\n <LocalCard key={`${locale}-first-${index}`} locale={locale} />\n ))}\n {/* Duplicate set for seamless loop */}\n {localeList.map((locale, index) => (\n <LocalCard key={`${locale}-second-${index}`} locale={locale} />\n ))}\n </div>\n </div>\n);\n\nconst NUM_OF_LOCALES = 15;\n\nconst emptyArrayOfLocale: string[][] = new Array(4).fill(0).map(() => []);\nconst arrayOfLocale: string[][] = new Array(4)\n .fill(0)\n .map(() => shuffleArray(Object.values(ALL_LOCALES), NUM_OF_LOCALES));\n\nexport const LanguageSection: FC<HTMLAttributes<HTMLElement>> = ({\n className,\n ...props\n}) => {\n const [localeList, setLocaleList] = useState(emptyArrayOfLocale);\n const [firstPart, secondPart, thirdPart, fourthPart] = localeList;\n\n useEffect(() => {\n setLocaleList(arrayOfLocale);\n }, []);\n\n return (\n <section\n className={cn(\n 'mask-[linear-gradient(to_right,transparent_0,black_128px,black_calc(100%-128px),transparent_100%)] my-10 w-full overflow-hidden',\n className\n )}\n {...props}\n >\n <div className=\"relative flex w-full flex-col gap-5 py-3\">\n <Suspense>\n <LocalCardList localeList={firstPart} className=\"horizontal-loop-1\" />\n <LocalCardList\n localeList={secondPart}\n className=\"horizontal-loop-2\"\n />\n <LocalCardList localeList={thirdPart} className=\"horizontal-loop-1\" />\n <LocalCardList\n localeList={fourthPart}\n className=\"horizontal-loop-2\"\n />\n </Suspense>\n </div>\n </section>\n );\n};\n"],"mappings":";;;;;;;;;;AAmBA,MAAM,gBAAgB,OAAiB,UAAmB;CACxD,MAAM,WAAW,CAAC,GAAG,KAAK;CAE1B,KAAK,IAAI,IAAI,SAAS,SAAS,GAAG,IAAI,GAAG,KAAK;EAC5C,MAAM,cAAc,KAAK,MAAM,KAAK,OAAO,KAAK,IAAI,EAAE;EAEtD,CAAC,SAAS,IAAI,SAAS,gBAAgB,CAAC,SAAS,cAAc,SAAS,EAAE;CAC5E;CAEA,OAAO,QAAQ,SAAS,MAAM,GAAG,KAAK,IAAI;AAC5C;AAEA,MAAM,aAAqC,EAAE,QAAQ,GAAG,YACtD,oBAAC,OAAD;CACE,WAAU;CACV,GAAI;WAEJ,qBAAC,WAAD;EACE,aAAY;EACZ,WAAU;YAFZ,CAIE,oBAAC,MAAD;GACU;GACR,WAAU;GACV,OAAO;GACP,QAAQ;GACR,SAAQ;EACT,IACD,oBAAC,QAAD;GACE,KAAK,eAAe,MAAgB;GACpC,MAAM;GACN,WAAU;aAET,cAAc,MAAgB;EAC3B,EACG;;AACR;AAGP,MAAM,iBAAmE,EACvE,YACA,WACA,GAAG,YAEH,oBAAC,OAAD;CAAK,WAAU;CAAuC,GAAI;WACxD,qBAAC,OAAD;EACE,WAAW,GAAG,8CAA8C,SAAS;YADvE,CAIG,WAAW,KAAK,QAAQ,UACvB,oBAAC,WAAD,EAAoD,OAAS,GAA7C,GAAG,OAAO,SAAS,OAA0B,CAC9D,GAEA,WAAW,KAAK,QAAQ,UACvB,oBAAC,WAAD,EAAqD,OAAS,GAA9C,GAAG,OAAO,UAAU,OAA0B,CAC/D,CACE;;AACF;AAGP,MAAM,iBAAiB;AAEvB,MAAM,qBAAiC,IAAI,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AACxE,MAAM,gBAA4B,IAAI,MAAM,CAAC,EAC1C,KAAK,CAAC,EACN,UAAU,aAAa,OAAO,OAAO,WAAW,GAAG,cAAc,CAAC;AAErE,MAAa,mBAAoD,EAC/D,WACA,GAAG,YACC;CACJ,MAAM,CAAC,YAAY,iBAAiB,SAAS,kBAAkB;CAC/D,MAAM,CAAC,WAAW,YAAY,WAAW,cAAc;CAEvD,gBAAgB;EACd,cAAc,aAAa;CAC7B,GAAG,CAAC,CAAC;CAEL,OACE,oBAAC,WAAD;EACE,WAAW,GACT,mIACA,SACF;EACA,GAAI;YAEJ,oBAAC,OAAD;GAAK,WAAU;aACb,qBAAC,UAAD;IACE,oBAAC,eAAD;KAAe,YAAY;KAAW,WAAU;IAAqB;IACrE,oBAAC,eAAD;KACE,YAAY;KACZ,WAAU;IACX;IACD,oBAAC,eAAD;KAAe,YAAY;KAAW,WAAU;IAAqB;IACrE,oBAAC,eAAD;KACE,YAAY;KACZ,WAAU;IACX;GACO;EACP;CACE;AAEb"}
@@ -1,87 +1,14 @@
1
1
  'use client';
2
2
 
3
- import { cn } from "../../utils/cn.mjs";
4
- import { Container } from "../Container/index.mjs";
5
- import { Flag } from "../Flags/Flag.mjs";
6
- import { Suspense, useEffect, useState } from "react";
3
+ import { LanguageSection } from "./LanguageSection.mjs";
4
+ import { Suspense, lazy } from "react";
7
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
- import { ALL_LOCALES, getHTMLTextDir, getLocaleName } from "intlayer";
9
6
 
10
7
  //#region src/components/LanguageBackground/index.tsx
11
- const shuffleArray = (array, limit) => {
12
- const shuffled = [...array];
13
- for (let i = shuffled.length - 1; i > 0; i--) {
14
- const randomIndex = Math.floor(Math.random() * (i + 1));
15
- [shuffled[i], shuffled[randomIndex]] = [shuffled[randomIndex], shuffled[i]];
16
- }
17
- return limit ? shuffled.slice(0, limit) : shuffled;
18
- };
19
- const LocalCard = ({ locale, ...props }) => /* @__PURE__ */ jsx("div", {
20
- className: "group z-10 mx-8 inline-flex shrink-0 transition-transform duration-300 hover:scale-105",
21
- ...props,
22
- children: /* @__PURE__ */ jsxs(Container, {
23
- roundedSize: "xl",
24
- className: "flex flex-row items-center gap-5 p-3",
25
- children: [/* @__PURE__ */ jsx(Flag, {
26
- locale,
27
- className: "max-h-5 max-w-5 rounded-sm grayscale-80 transition duration-300 group-hover:grayscale-0",
28
- width: 640,
29
- height: 480,
30
- loading: "lazy"
31
- }), /* @__PURE__ */ jsx("span", {
32
- dir: getHTMLTextDir(locale),
33
- lang: locale,
34
- className: "flex text-nowrap",
35
- children: getLocaleName(locale)
36
- })]
37
- })
38
- });
39
- const LocalCardList = ({ localeList, className, ...props }) => /* @__PURE__ */ jsx("div", {
40
- className: "relative flex w-full overflow-hidden",
41
- ...props,
42
- children: /* @__PURE__ */ jsxs("div", {
43
- className: cn("inline-flex shrink-0 will-change-transform", className),
44
- children: [localeList.map((locale, index) => /* @__PURE__ */ jsx(LocalCard, { locale }, `${locale}-first-${index}`)), localeList.map((locale, index) => /* @__PURE__ */ jsx(LocalCard, { locale }, `${locale}-second-${index}`))]
45
- })
46
- });
47
- const NUM_OF_LOCALES = 15;
48
- const emptyArrayOfLocale = new Array(4).fill(0).map(() => []);
49
- const arrayOfLocale = new Array(4).fill(0).map(() => shuffleArray(Object.values(ALL_LOCALES), NUM_OF_LOCALES));
50
- const LanguageSection = ({ className, ...props }) => {
51
- const [localeList, setLocaleList] = useState(emptyArrayOfLocale);
52
- const [firstPart, secondPart, thirdPart, fourthPart] = localeList;
53
- useEffect(() => {
54
- setLocaleList(arrayOfLocale);
55
- }, []);
56
- return /* @__PURE__ */ jsx("section", {
57
- className: cn("mask-[linear-gradient(to_right,transparent_0,black_128px,black_calc(100%-128px),transparent_100%)] my-10 w-full overflow-hidden", className),
58
- ...props,
59
- children: /* @__PURE__ */ jsx("div", {
60
- className: "relative flex w-full flex-col gap-5 py-3",
61
- children: /* @__PURE__ */ jsxs(Suspense, { children: [
62
- /* @__PURE__ */ jsx(LocalCardList, {
63
- localeList: firstPart,
64
- className: "horizontal-loop-1"
65
- }),
66
- /* @__PURE__ */ jsx(LocalCardList, {
67
- localeList: secondPart,
68
- className: "horizontal-loop-2"
69
- }),
70
- /* @__PURE__ */ jsx(LocalCardList, {
71
- localeList: thirdPart,
72
- className: "horizontal-loop-1"
73
- }),
74
- /* @__PURE__ */ jsx(LocalCardList, {
75
- localeList: fourthPart,
76
- className: "horizontal-loop-2"
77
- })
78
- ] })
79
- })
80
- });
81
- };
8
+ const LazyLanguageSection = lazy(() => import("./LanguageSection.mjs").then((m) => ({ default: m.LanguageSection })));
82
9
  const LanguageBackground = ({ children }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
83
10
  className: "absolute top-0 left-0 z-0 flex size-full items-center justify-center",
84
- children: /* @__PURE__ */ jsx(LanguageSection, { className: "mt-[30%]" })
11
+ children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(LazyLanguageSection, { className: "mt-[30%]" }) })
85
12
  }), children] });
86
13
 
87
14
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/LanguageBackground/index.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@utils/cn';\nimport {\n ALL_LOCALES,\n getHTMLTextDir,\n getLocaleName,\n type Locale,\n} from 'intlayer';\nimport {\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n Suspense,\n useEffect,\n useState,\n} from 'react';\nimport { Container } from '../Container';\nimport { Flag } from '../Flags';\n\nconst shuffleArray = (array: string[], limit?: number) => {\n const shuffled = [...array];\n\n for (let i = shuffled.length - 1; i > 0; i--) {\n const randomIndex = Math.floor(Math.random() * (i + 1));\n\n [shuffled[i], shuffled[randomIndex]] = [shuffled[randomIndex], shuffled[i]];\n }\n\n return limit ? shuffled.slice(0, limit) : shuffled;\n};\n\nconst LocalCard: FC<{ locale: string }> = ({ locale, ...props }) => (\n <div\n className=\"group z-10 mx-8 inline-flex shrink-0 transition-transform duration-300 hover:scale-105\"\n {...props}\n >\n <Container\n roundedSize=\"xl\"\n className=\"flex flex-row items-center gap-5 p-3\"\n >\n <Flag\n locale={locale as Locale}\n className=\"max-h-5 max-w-5 rounded-sm grayscale-80 transition duration-300 group-hover:grayscale-0\"\n width={640}\n height={480}\n loading=\"lazy\"\n />\n <span\n dir={getHTMLTextDir(locale as Locale)}\n lang={locale as Locale}\n className=\"flex text-nowrap\"\n >\n {getLocaleName(locale as Locale)}\n </span>\n </Container>\n </div>\n);\n\nconst LocalCardList: FC<{ localeList: string[]; className?: string }> = ({\n localeList,\n className,\n ...props\n}) => (\n <div className=\"relative flex w-full overflow-hidden\" {...props}>\n <div\n className={cn('inline-flex shrink-0 will-change-transform', className)}\n >\n {/* First set of cards */}\n {localeList.map((locale, index) => (\n <LocalCard key={`${locale}-first-${index}`} locale={locale} />\n ))}\n {/* Duplicate set for seamless loop */}\n {localeList.map((locale, index) => (\n <LocalCard key={`${locale}-second-${index}`} locale={locale} />\n ))}\n </div>\n </div>\n);\n\nconst NUM_OF_LOCALES = 15;\n\nconst emptyArrayOfLocale: string[][] = new Array(4).fill(0).map(() => []);\nconst arrayOfLocale: string[][] = new Array(4)\n .fill(0)\n .map(() => shuffleArray(Object.values(ALL_LOCALES), NUM_OF_LOCALES));\n\nexport const LanguageSection: FC<HTMLAttributes<HTMLElement>> = ({\n className,\n ...props\n}) => {\n const [localeList, setLocaleList] = useState(emptyArrayOfLocale);\n const [firstPart, secondPart, thirdPart, fourthPart] = localeList;\n\n useEffect(() => {\n setLocaleList(arrayOfLocale);\n }, []);\n\n return (\n <section\n className={cn(\n 'mask-[linear-gradient(to_right,transparent_0,black_128px,black_calc(100%-128px),transparent_100%)] my-10 w-full overflow-hidden',\n className\n )}\n {...props}\n >\n <div className=\"relative flex w-full flex-col gap-5 py-3\">\n <Suspense>\n <LocalCardList localeList={firstPart} className=\"horizontal-loop-1\" />\n <LocalCardList\n localeList={secondPart}\n className=\"horizontal-loop-2\"\n />\n <LocalCardList localeList={thirdPart} className=\"horizontal-loop-1\" />\n <LocalCardList\n localeList={fourthPart}\n className=\"horizontal-loop-2\"\n />\n </Suspense>\n </div>\n </section>\n );\n};\n\nexport const LanguageBackground: FC<PropsWithChildren> = ({ children }) => (\n <>\n <div className=\"absolute top-0 left-0 z-0 flex size-full items-center justify-center\">\n <LanguageSection className=\"mt-[30%]\" />\n </div>\n {children}\n </>\n);\n"],"mappings":";;;;;;;;;;AAoBA,MAAM,gBAAgB,OAAiB,UAAmB;CACxD,MAAM,WAAW,CAAC,GAAG,KAAK;CAE1B,KAAK,IAAI,IAAI,SAAS,SAAS,GAAG,IAAI,GAAG,KAAK;EAC5C,MAAM,cAAc,KAAK,MAAM,KAAK,OAAO,KAAK,IAAI,EAAE;EAEtD,CAAC,SAAS,IAAI,SAAS,gBAAgB,CAAC,SAAS,cAAc,SAAS,EAAE;CAC5E;CAEA,OAAO,QAAQ,SAAS,MAAM,GAAG,KAAK,IAAI;AAC5C;AAEA,MAAM,aAAqC,EAAE,QAAQ,GAAG,YACtD,oBAAC,OAAD;CACE,WAAU;CACV,GAAI;WAEJ,qBAAC,WAAD;EACE,aAAY;EACZ,WAAU;YAFZ,CAIE,oBAAC,MAAD;GACU;GACR,WAAU;GACV,OAAO;GACP,QAAQ;GACR,SAAQ;EACT,IACD,oBAAC,QAAD;GACE,KAAK,eAAe,MAAgB;GACpC,MAA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ACpC,IACJ,QACD"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/LanguageBackground/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, lazy, type PropsWithChildren, Suspense } from 'react';\n\nconst LazyLanguageSection = lazy(() =>\n import('./LanguageSection').then((m) => ({ default: m.LanguageSection }))\n);\n\nexport { LanguageSection } from './LanguageSection';\n\nexport const LanguageBackground: FC<PropsWithChildren> = ({ children }) => (\n <>\n <div className=\"absolute top-0 left-0 z-0 flex size-full items-center justify-center\">\n <Suspense>\n <LazyLanguageSection className=\"mt-[30%]\" />\n </Suspense>\n </div>\n {children}\n </>\n);\n"],"mappings":";;;;;;;AAIA,MAAM,sBAAsB,WAC1B,OAAO,yBAAqB,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAC1E;AAIA,MAAa,sBAA6C,EAAE,eAC1D,8CACE,oBAAC,OAAD;CAAK,WAAU;WACb,oBAAC,UAAD,YACE,oBAAC,qBAAD,EAAqB,WAAU,WAAY,GACnC;AACP,IACJ,QACD"}
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
+ import { usePersistedStore } from "../../hooks/usePersistedStore.mjs";
3
4
  import { Container } from "../Container/index.mjs";
4
5
  import { Button, ButtonColor, ButtonSize, ButtonTextAlign, ButtonVariant } from "../Button/Button.mjs";
5
6
  import { DropDown } from "../DropDown/index.mjs";
6
7
  import { Input } from "../Input/Input.mjs";
7
8
  import { SwitchSelector, SwitchSelectorColor, SwitchSelectorSize } from "../SwitchSelector/SwitchSelector.mjs";
8
- import { usePersistedStore } from "../../hooks/usePersistedStore.mjs";
9
9
  import { useLocaleSwitcherContent } from "./LocaleSwitcherContentContext.mjs";
10
10
  import { useMemo, useRef, useState } from "react";
11
11
  import { Check, Globe, MoveVertical } from "lucide-react";
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { Container } from "../Container/index.mjs";
5
- import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
6
4
  import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
7
5
  import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
6
+ import { Container } from "../Container/index.mjs";
7
+ import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
8
8
  import { H3 } from "../Headers/index.mjs";
9
9
  import { useEffect } from "react";
10
10
  import { cva } from "class-variance-authority";
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
5
4
  import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
6
5
  import { useScrollDetection } from "../../hooks/useScrollDetection.mjs";
6
+ import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
7
7
  import { Burger } from "./Burger.mjs";
8
8
  import { useRef, useState } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
5
4
  import { useItemSelector } from "../../hooks/useItemSelector.mjs";
5
+ import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
6
6
  import { useEffect, useRef } from "react";
7
7
  import { cva } from "class-variance-authority";
8
8
  import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
 
3
+ import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
4
+ import { useDevice } from "../../hooks/useDevice.mjs";
5
+ import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
3
6
  import { Container } from "../Container/index.mjs";
4
7
  import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
5
- import { useDevice } from "../../hooks/useDevice.mjs";
6
8
  import { KeyboardShortcut } from "../KeyboardShortcut/KeyboardShortcut.mjs";
7
9
  import { Popover } from "../Popover/dynamic.mjs";
8
- import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
9
- import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
10
10
  import { MaxWidthSmoother } from "../MaxWidthSmoother/index.mjs";
11
11
  import { isElementAtTopAndNotCovered } from "./isElementAtTopAndNotCovered.mjs";
12
12
  import { useRightDrawer } from "./useRightDrawer.mjs";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { cn } from "../../utils/cn.mjs";
4
- import { TabSelector, TabSelectorColor } from "../TabSelector/TabSelector.mjs";
5
4
  import { useHorizontalSwipe } from "../../hooks/useHorizontalSwipe.mjs";
5
+ import { TabSelector, TabSelectorColor } from "../TabSelector/TabSelector.mjs";
6
6
  import { useTabContext } from "./TabContext.mjs";
7
7
  import { Children, createContext, isValidElement, useState } from "react";
8
8
  import { cva } from "class-variance-authority";
@@ -184,7 +184,7 @@ const ToastTitle = ({ className, ...props }) => /* @__PURE__ */ jsx(ToastPrimiti
184
184
  * ```
185
185
  */
186
186
  const ToastDescription = ({ className, ...props }) => /* @__PURE__ */ jsx(ToastPrimitives.Description, {
187
- className: cn("text-sm opacity-90", className),
187
+ className: cn("overflow-scroll text-sm opacity-90", className),
188
188
  ...props
189
189
  });
190
190
 
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.mjs","names":[],"sources":["../../../../src/components/Toaster/Toast.tsx"],"sourcesContent":["'use client';\n\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { cn } from '@utils/cn';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { X } from 'lucide-react';\nimport type { ComponentProps, FC, ReactElement } from 'react';\n\nexport const ToastProvider = ToastPrimitives;\n\nexport const ToastViewport: FC<\n ComponentProps<typeof ToastPrimitives.Viewport>\n> = ({ className, ...props }) => (\n <ToastPrimitives.Viewport\n className={cn(\n 'fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]',\n className\n )}\n {...props}\n />\n);\n\n/**\n * Toast variant styles using class-variance-authority.\n *\n * Defines visual styles for different toast types with semantic colors,\n * animations, and responsive behavior.\n *\n * @example\n * ```tsx\n * // Error toast with red background\n * <Toast variant=\"error\">Error message</Toast>\n *\n * // Success toast with green background\n * <Toast variant=\"success\">Success message</Toast>\n *\n * // Default toast with neutral styling\n * <Toast variant=\"default\">Info message</Toast>\n * ```\n */\nexport const toastVariants = cva(\n 'group data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-xl p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all [corner-shape:squircle] data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none supports-[corner-shape:squircle]:rounded-3xl',\n {\n variants: {\n /** Toast visual variants for different message types */\n variant: {\n /** Error state with red styling for failures and warnings */\n error: 'bg-error/40 text-text',\n /** Success state with green styling for confirmations */\n success: 'bg-success/30 text-text',\n /** Default neutral styling for general information */\n default: 'bg-card/80 text-text',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\n/**\n * Toast Component\n *\n * A notification component that displays temporary messages to users using Radix UI primitives.\n * Supports different visual variants, animations, and user interactions including swipe-to-dismiss.\n *\n * ## Features\n * - **Visual Variants**: Error, success, and default styling themes\n * - **Animations**: Smooth slide-in/slide-out transitions with fade effects\n * - **Swipe Gestures**: Touch-friendly swipe-to-dismiss functionality\n * - **Accessibility**: Full screen reader support and keyboard navigation\n * - **Positioning**: Smart positioning with responsive viewport handling\n * - **Auto-dismiss**: Configurable automatic dismissal timing\n *\n * ## Technical Implementation\n * - Built on Radix UI Toast primitives for accessibility compliance\n * - Uses Framer Motion for smooth animations and gestures\n * - CVA (class-variance-authority) for consistent styling variants\n * - Backdrop blur effects for modern visual appeal\n * - CSS transforms for hardware-accelerated animations\n *\n * @example\n * ```tsx\n * // Basic toast with title and description\n * <Toast variant=\"default\">\n * <ToastTitle>Notification</ToastTitle>\n * <ToastDescription>Your action was completed successfully.</ToastDescription>\n * <ToastClose />\n * </Toast>\n *\n * // Error toast with action button\n * <Toast variant=\"error\">\n * <ToastTitle>Upload Failed</ToastTitle>\n * <ToastDescription>Could not upload file. Please try again.</ToastDescription>\n * <ToastAction altText=\"Retry upload\">Retry</ToastAction>\n * <ToastClose />\n * </Toast>\n * ```\n */\nexport const Toast: FC<\n ComponentProps<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n> = ({ className, variant, ...props }) => {\n return (\n <ToastPrimitives.Root\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n};\n\n/**\n * ToastAction Component\n *\n * An interactive button component for toast notifications that allows users to take\n * actions related to the notification message.\n *\n * ## Features\n * - **Accessibility**: Requires `altText` prop for screen readers\n * - **Visual States**: Hover, focus, and disabled state styling\n * - **Theme Integration**: Supports destructive and default themes\n * - **Keyboard Navigation**: Full keyboard accessibility support\n *\n * ## Usage Guidelines\n * - Use for actionable notifications (retry, undo, view details)\n * - Keep action text short and descriptive\n * - Provide meaningful `altText` for accessibility\n * - Limit to one primary action per toast\n *\n * @example\n * ```tsx\n * // Retry action for failed operations\n * <ToastAction altText=\"Retry the failed operation\">\n * Retry\n * </ToastAction>\n *\n * // Undo action for reversible operations\n * <ToastAction altText=\"Undo the last action\">\n * Undo\n * </ToastAction>\n *\n * // Navigation action\n * <ToastAction altText=\"View the uploaded file\">\n * View File\n * </ToastAction>\n * ```\n */\nexport const ToastAction: FC<ComponentProps<typeof ToastPrimitives.Action>> = ({\n className,\n ...props\n}) => (\n <ToastPrimitives.Action\n className={cn(\n 'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 font-medium text-sm transition-colors hover:bg-text focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:focus:ring-destructive group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground',\n className\n )}\n {...props}\n />\n);\n\nexport const ToastClose: FC<ComponentProps<typeof ToastPrimitives.Close>> = ({\n className,\n ...props\n}) => (\n <ToastPrimitives.Close\n className={cn(\n 'absolute top-1 right-1 rounded-md p-1 text-text/50 opacity-0 transition-opacity hover:text-text/80 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 group-[.destructive]:hover:text-red-50',\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"size-5\" />\n </ToastPrimitives.Close>\n);\n/**\n * ToastTitle Component\n *\n * The primary heading text for toast notifications. Provides semantic structure\n * and proper typography hierarchy within the toast.\n *\n * ## Styling Features\n * - Semi-bold font weight for emphasis\n * - Automatic text sizing adjustments for descriptions\n * - Proper spacing relationships with other toast elements\n *\n * @example\n * ```tsx\n * <ToastTitle>File Upload Complete</ToastTitle>\n * <ToastTitle>Error: Connection Failed</ToastTitle>\n * <ToastTitle>Settings Saved</ToastTitle>\n * ```\n */\nexport const ToastTitle: FC<ComponentProps<typeof ToastPrimitives.Title>> = ({\n className,\n ...props\n}) => (\n <ToastPrimitives.Title\n className={cn('font-semibold text-sm [&+div]:text-xs', className)}\n {...props}\n />\n);\n\n/**\n * ToastDescription Component\n *\n * Supporting text that provides additional context or details for the toast notification.\n * Complements the ToastTitle with more detailed information.\n *\n * ## Styling Features\n * - Slightly reduced opacity for visual hierarchy\n * - Smaller text size than title\n * - Optimal line height for readability\n *\n * ## Content Guidelines\n * - Keep descriptions concise but informative\n * - Provide actionable information when possible\n * - Use plain language for better accessibility\n *\n * @example\n * ```tsx\n * <ToastDescription>\n * Your document has been uploaded successfully and is now available for sharing.\n * </ToastDescription>\n *\n * <ToastDescription>\n * Please check your internet connection and try again.\n * </ToastDescription>\n * ```\n */\nexport const ToastDescription: FC<\n ComponentProps<typeof ToastPrimitives.Description>\n> = ({ className, ...props }) => (\n <ToastPrimitives.Description\n className={cn('text-sm opacity-90', className)}\n {...props}\n />\n);\n/**\n * Props type for Toast component including all Radix UI Toast.Root props\n * and variant styling options.\n */\nexport type ToastProps = ComponentProps<typeof Toast>;\n\n/**\n * Type for ToastAction elements used in toast configurations.\n * Ensures type safety when passing action elements to toast functions.\n */\nexport type ToastActionElement = ReactElement<typeof ToastAction>;\n"],"mappings":";;;;;;;;;AAQA,MAAa,gBAAgB;AAE7B,MAAa,iBAER,EAAE,WAAW,GAAG,YACnB,oBAAC,gBAAgB,UAAjB;CACE,WAAW,GACT,mIACA,SACF;CACA,GAAI;AACL;;;;;;;;;;;;;;;;;;;AAqBH,MAAa,gBAAgB,IAC3B,usBACA;CACE,UAAU;;AAER,SAAS;;EAEP,OAAO;;EAEP,SAAS;;EAET,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,SAGR,EAAE,WAAW,SAAS,GAAG,YAAY;CACxC,OACE,oBAAC,gBAAgB,MAAjB;EACE,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;EACnD,GAAI;CACL;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,eAAkE,EAC7E,WACA,GAAG,YAEH,oBAAC,gBAAgB,QAAjB;CACE,WAAW,GACT,wdACA,SACF;CACA,GAAI;AACL;AAGH,MAAa,cAAgE,EAC3E,WACA,GAAG,YAEH,oBAAC,gBAAgB,OAAjB;CACE,WAAW,GACT,kVACA,SACF;CACA,eAAY;CACZ,GAAI;WAEJ,oBAAC,GAAD,EAAG,WAAU,SAAU;AACF;;;;;;;;;;;;;;;;;;;AAoBzB,MAAa,cAAgE,EAC3E,WACA,GAAG,YAEH,oBAAC,gBAAgB,OAAjB;CACE,WAAW,GAAG,yCAAyC,SAAS;CAChE,GAAI;AACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BH,MAAa,oBAER,EAAE,WAAW,GAAG,YACnB,oBAAC,gBAAgB,aAAjB;CACE,WAAW,GAAG,sBAAsB,SAAS;CAC7C,GAAI;AACL"}
1
+ {"version":3,"file":"Toast.mjs","names":[],"sources":["../../../../src/components/Toaster/Toast.tsx"],"sourcesContent":["'use client';\n\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { cn } from '@utils/cn';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { X } from 'lucide-react';\nimport type { ComponentProps, FC, ReactElement } from 'react';\n\nexport const ToastProvider = ToastPrimitives;\n\nexport const ToastViewport: FC<\n ComponentProps<typeof ToastPrimitives.Viewport>\n> = ({ className, ...props }) => (\n <ToastPrimitives.Viewport\n className={cn(\n 'fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]',\n className\n )}\n {...props}\n />\n);\n\n/**\n * Toast variant styles using class-variance-authority.\n *\n * Defines visual styles for different toast types with semantic colors,\n * animations, and responsive behavior.\n *\n * @example\n * ```tsx\n * // Error toast with red background\n * <Toast variant=\"error\">Error message</Toast>\n *\n * // Success toast with green background\n * <Toast variant=\"success\">Success message</Toast>\n *\n * // Default toast with neutral styling\n * <Toast variant=\"default\">Info message</Toast>\n * ```\n */\nexport const toastVariants = cva(\n 'group data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-xl p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all [corner-shape:squircle] data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none supports-[corner-shape:squircle]:rounded-3xl',\n {\n variants: {\n /** Toast visual variants for different message types */\n variant: {\n /** Error state with red styling for failures and warnings */\n error: 'bg-error/40 text-text',\n /** Success state with green styling for confirmations */\n success: 'bg-success/30 text-text',\n /** Default neutral styling for general information */\n default: 'bg-card/80 text-text',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\n/**\n * Toast Component\n *\n * A notification component that displays temporary messages to users using Radix UI primitives.\n * Supports different visual variants, animations, and user interactions including swipe-to-dismiss.\n *\n * ## Features\n * - **Visual Variants**: Error, success, and default styling themes\n * - **Animations**: Smooth slide-in/slide-out transitions with fade effects\n * - **Swipe Gestures**: Touch-friendly swipe-to-dismiss functionality\n * - **Accessibility**: Full screen reader support and keyboard navigation\n * - **Positioning**: Smart positioning with responsive viewport handling\n * - **Auto-dismiss**: Configurable automatic dismissal timing\n *\n * ## Technical Implementation\n * - Built on Radix UI Toast primitives for accessibility compliance\n * - Uses Framer Motion for smooth animations and gestures\n * - CVA (class-variance-authority) for consistent styling variants\n * - Backdrop blur effects for modern visual appeal\n * - CSS transforms for hardware-accelerated animations\n *\n * @example\n * ```tsx\n * // Basic toast with title and description\n * <Toast variant=\"default\">\n * <ToastTitle>Notification</ToastTitle>\n * <ToastDescription>Your action was completed successfully.</ToastDescription>\n * <ToastClose />\n * </Toast>\n *\n * // Error toast with action button\n * <Toast variant=\"error\">\n * <ToastTitle>Upload Failed</ToastTitle>\n * <ToastDescription>Could not upload file. Please try again.</ToastDescription>\n * <ToastAction altText=\"Retry upload\">Retry</ToastAction>\n * <ToastClose />\n * </Toast>\n * ```\n */\nexport const Toast: FC<\n ComponentProps<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n> = ({ className, variant, ...props }) => {\n return (\n <ToastPrimitives.Root\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n};\n\n/**\n * ToastAction Component\n *\n * An interactive button component for toast notifications that allows users to take\n * actions related to the notification message.\n *\n * ## Features\n * - **Accessibility**: Requires `altText` prop for screen readers\n * - **Visual States**: Hover, focus, and disabled state styling\n * - **Theme Integration**: Supports destructive and default themes\n * - **Keyboard Navigation**: Full keyboard accessibility support\n *\n * ## Usage Guidelines\n * - Use for actionable notifications (retry, undo, view details)\n * - Keep action text short and descriptive\n * - Provide meaningful `altText` for accessibility\n * - Limit to one primary action per toast\n *\n * @example\n * ```tsx\n * // Retry action for failed operations\n * <ToastAction altText=\"Retry the failed operation\">\n * Retry\n * </ToastAction>\n *\n * // Undo action for reversible operations\n * <ToastAction altText=\"Undo the last action\">\n * Undo\n * </ToastAction>\n *\n * // Navigation action\n * <ToastAction altText=\"View the uploaded file\">\n * View File\n * </ToastAction>\n * ```\n */\nexport const ToastAction: FC<ComponentProps<typeof ToastPrimitives.Action>> = ({\n className,\n ...props\n}) => (\n <ToastPrimitives.Action\n className={cn(\n 'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 font-medium text-sm transition-colors hover:bg-text focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:focus:ring-destructive group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground',\n className\n )}\n {...props}\n />\n);\n\nexport const ToastClose: FC<ComponentProps<typeof ToastPrimitives.Close>> = ({\n className,\n ...props\n}) => (\n <ToastPrimitives.Close\n className={cn(\n 'absolute top-1 right-1 rounded-md p-1 text-text/50 opacity-0 transition-opacity hover:text-text/80 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 group-[.destructive]:hover:text-red-50',\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"size-5\" />\n </ToastPrimitives.Close>\n);\n/**\n * ToastTitle Component\n *\n * The primary heading text for toast notifications. Provides semantic structure\n * and proper typography hierarchy within the toast.\n *\n * ## Styling Features\n * - Semi-bold font weight for emphasis\n * - Automatic text sizing adjustments for descriptions\n * - Proper spacing relationships with other toast elements\n *\n * @example\n * ```tsx\n * <ToastTitle>File Upload Complete</ToastTitle>\n * <ToastTitle>Error: Connection Failed</ToastTitle>\n * <ToastTitle>Settings Saved</ToastTitle>\n * ```\n */\nexport const ToastTitle: FC<ComponentProps<typeof ToastPrimitives.Title>> = ({\n className,\n ...props\n}) => (\n <ToastPrimitives.Title\n className={cn('font-semibold text-sm [&+div]:text-xs', className)}\n {...props}\n />\n);\n\n/**\n * ToastDescription Component\n *\n * Supporting text that provides additional context or details for the toast notification.\n * Complements the ToastTitle with more detailed information.\n *\n * ## Styling Features\n * - Slightly reduced opacity for visual hierarchy\n * - Smaller text size than title\n * - Optimal line height for readability\n *\n * ## Content Guidelines\n * - Keep descriptions concise but informative\n * - Provide actionable information when possible\n * - Use plain language for better accessibility\n *\n * @example\n * ```tsx\n * <ToastDescription>\n * Your document has been uploaded successfully and is now available for sharing.\n * </ToastDescription>\n *\n * <ToastDescription>\n * Please check your internet connection and try again.\n * </ToastDescription>\n * ```\n */\nexport const ToastDescription: FC<\n ComponentProps<typeof ToastPrimitives.Description>\n> = ({ className, ...props }) => (\n <ToastPrimitives.Description\n className={cn('overflow-scroll text-sm opacity-90', className)}\n {...props}\n />\n);\n/**\n * Props type for Toast component including all Radix UI Toast.Root props\n * and variant styling options.\n */\nexport type ToastProps = ComponentProps<typeof Toast>;\n\n/**\n * Type for ToastAction elements used in toast configurations.\n * Ensures type safety when passing action elements to toast functions.\n */\nexport type ToastActionElement = ReactElement<typeof ToastAction>;\n"],"mappings":";;;;;;;;;AAQA,MAAa,gBAAgB;AAE7B,MAAa,iBAER,EAAE,WAAW,GAAG,YACnB,oBAAC,gBAAgB,UAAjB;CACE,WAAW,GACT,mIACA,SACF;CACA,GAAI;AACL;;;;;;;;;;;;;;;;;;;AAqBH,MAAa,gBAAgB,IAC3B,usBACA;CACE,UAAU;;AAER,SAAS;;EAEP,OAAO;;EAEP,SAAS;;EAET,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,SAGR,EAAE,WAAW,SAAS,GAAG,YAAY;CACxC,OACE,oBAAC,gBAAgB,MAAjB;EACE,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;EACnD,GAAI;CACL;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,eAAkE,EAC7E,WACA,GAAG,YAEH,oBAAC,gBAAgB,QAAjB;CACE,WAAW,GACT,wdACA,SACF;CACA,GAAI;AACL;AAGH,MAAa,cAAgE,EAC3E,WACA,GAAG,YAEH,oBAAC,gBAAgB,OAAjB;CACE,WAAW,GACT,kVACA,SACF;CACA,eAAY;CACZ,GAAI;WAEJ,oBAAC,GAAD,EAAG,WAAU,SAAU;AACF;;;;;;;;;;;;;;;;;;;AAoBzB,MAAa,cAAgE,EAC3E,WACA,GAAG,YAEH,oBAAC,gBAAgB,OAAjB;CACE,WAAW,GAAG,yCAAyC,SAAS;CAChE,GAAI;AACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BH,MAAa,oBAER,EAAE,WAAW,GAAG,YACnB,oBAAC,gBAAgB,aAAjB;CACE,WAAW,GAAG,sCAAsC,SAAS;CAC7D,GAAI;AACL"}
@@ -87,7 +87,8 @@ import { FileList } from "./IDE/FileList.mjs";
87
87
  import { WithResizer } from "./WithResizer/index.mjs";
88
88
  import { IDE } from "./IDE/IDE.mjs";
89
89
  import { KeyboardScreenAdapter } from "./KeyboardScreenAdapter/index.mjs";
90
- import { LanguageBackground, LanguageSection } from "./LanguageBackground/index.mjs";
90
+ import { LanguageSection } from "./LanguageBackground/LanguageSection.mjs";
91
+ import { LanguageBackground } from "./LanguageBackground/index.mjs";
91
92
  import { LocaleSwitcher } from "./LocaleSwitcherDropDown/LocaleSwitcher.mjs";
92
93
  import { MarkDownIframe } from "./MarkDownRender/MarkDownIframe.mjs";
93
94
  import { Tab } from "./Tab/Tab.mjs";
@@ -1,22 +1,22 @@
1
- import { calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useDevice } from "./useDevice.mjs";
2
- import { useItemSelector } from "./useItemSelector.mjs";
1
+ import { useKeyboardDetector } from "./useKeyboardDetector.mjs";
2
+ import { useGetElementOrWindow } from "./useGetElementOrWindow.mjs";
3
+ import { useScrollY } from "./useScrollY.mjs";
3
4
  import { usePersistedStore } from "./usePersistedStore.mjs";
5
+ import { useHorizontalSwipe } from "./useHorizontalSwipe.mjs";
6
+ import { useItemSelector } from "./useItemSelector.mjs";
7
+ import { calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useDevice } from "./useDevice.mjs";
4
8
  import { useOAuth2 } from "./useAuth/useOAuth2.mjs";
5
9
  import { useSession } from "./useAuth/useSession.mjs";
6
10
  import { useAuth } from "./useAuth/useAuth.mjs";
7
11
  import { useIntlayerAuth, useIntlayerOAuth } from "./useIntlayerAPI.mjs";
8
12
  import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useChat, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeleteOrganizationById, useDeletePasskey, useDeleteProject, useDeleteProjectById, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGithubToken, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useInfiniteGetDictionaries, useLinkSocial, useListAccounts, useListPasskeys, useListSSOProviders, useLogin, useLogout, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, usePushProjectConfiguration, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnlinkAccount, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUploadUserAvatar, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary } from "./reactQuery.mjs";
9
- import { useUser } from "./useUser/index.mjs";
13
+ import { useSearch } from "./useSearch.mjs";
14
+ import { useIsMounted } from "./useIsMounted.mjs";
10
15
  import { useGetElementById } from "./useGetElementById.mjs";
11
- import { useGetElementOrWindow } from "./useGetElementOrWindow.mjs";
12
- import { useHorizontalSwipe } from "./useHorizontalSwipe.mjs";
13
16
  import { useIsDarkMode } from "./useIsDarkMode.mjs";
14
- import { useIsMounted } from "./useIsMounted.mjs";
15
- import { useKeyboardDetector } from "./useKeyboardDetector.mjs";
16
17
  import { useScreenWidth } from "./useScreenWidth.mjs";
17
18
  import { useScrollBlockage } from "./useScrollBlockage/index.mjs";
18
19
  import { useScrollDetection } from "./useScrollDetection.mjs";
19
- import { useScrollY } from "./useScrollY.mjs";
20
- import { useSearch } from "./useSearch.mjs";
20
+ import { useUser } from "./useUser/index.mjs";
21
21
 
22
22
  export { calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAuth, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useChat, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeleteOrganizationById, useDeletePasskey, useDeleteProject, useDeleteProjectById, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDevice, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetElementById, useGetElementOrWindow, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGithubToken, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useHorizontalSwipe, useInfiniteGetDictionaries, useIntlayerAuth, useIntlayerOAuth, useIsDarkMode, useIsMounted, useItemSelector, useKeyboardDetector, useLinkSocial, useListAccounts, useListPasskeys, useListSSOProviders, useLogin, useLogout, useOAuth2, usePauseTranslationJob, usePersistedStore, usePushCIConfig, usePushDictionaries, usePushProjectConfiguration, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useScreenWidth, useScrollBlockage, useScrollDetection, useScrollY, useSearch, useSearchDoc, useSelectOrganization, useSelectProject, useSession, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnlinkAccount, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUploadUserAvatar, useUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
3
  import { useQuery } from "@tanstack/react-query";
4
- import configuration from "@intlayer/config/built";
5
4
  import { useConfiguration } from "@intlayer/editor-react";
6
5
  import { getOAuthAPI } from "@intlayer/api";
6
+ import configuration from "@intlayer/config/built";
7
7
  import { defu } from "defu";
8
8
 
9
9
  //#region src/hooks/useAuth/useOAuth2.ts
@@ -3,8 +3,8 @@
3
3
  import { getAuthAPI } from "../../libs/auth.mjs";
4
4
  import { useQueryClient } from "../reactQuery.mjs";
5
5
  import { useQuery } from "@tanstack/react-query";
6
- import configuration from "@intlayer/config/built";
7
6
  import { useConfiguration } from "@intlayer/editor-react";
7
+ import configuration from "@intlayer/config/built";
8
8
 
9
9
  //#region src/hooks/useAuth/useSession.ts
10
10
  const useSession = (sessionProp, intlayerConfiguration) => {
@@ -1,6 +1,6 @@
1
+ import configuration from "@intlayer/config/built";
1
2
  import { passkeyClient } from "@better-auth/passkey/client";
2
3
  import { ssoClient } from "@better-auth/sso/client";
3
- import configuration from "@intlayer/config/built";
4
4
  import { BACKEND_URL } from "@intlayer/config/defaultValues";
5
5
  import { createAuthClient } from "better-auth/client";
6
6
  import { magicLinkClient, twoFactorClient } from "better-auth/client/plugins";
@@ -42,7 +42,7 @@ declare enum BadgeSize {
42
42
  * @description Defines the styling variants for different badge combinations
43
43
  */
44
44
  declare const badgeVariants: (props?: {
45
- color?: "text" | "error" | "custom" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "success";
45
+ color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "error" | "success" | "custom";
46
46
  variant?: "none" | "default" | "outline" | "hoverable";
47
47
  size?: "sm" | "md" | "lg";
48
48
  } & import("class-variance-authority/types").ClassProp) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"Browser.d.ts","names":[],"sources":["../../../../src/components/Browser/Browser.tsx"],"mappings":";;;KA6BY,YAAA;EACV,UAAA;EACA,IAAA;EACA,SAAA;EACA,KAAA,GAAQ,aAAA;EACR,IAAA;EACA,YAAA;EACA,OAAA;EACA,GAAA,GAAM,SAAA,CAAU,iBAAA;EAChB,iBAAA;AAAA,IACE,cAAA,CAAe,iBAAA;AAAA,cAWN,OAAA;EAAW,UAAA;EAAA,IAAA;EAAA,SAAA;EAAA,KAAA;EAAA,IAAA;EAAA,cAAA,SAAA;EAAA,OAAA;EAAA,GAAA;EAAA,iBAAA;EAAA,GAAA;AAAA,GAWrB,YAAA,iCAAY,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"Browser.d.ts","names":[],"sources":["../../../../src/components/Browser/Browser.tsx"],"mappings":";;;KAsBY,YAAA;EACV,UAAA;EACA,IAAA;EACA,SAAA;EACA,KAAA,GAAQ,aAAA;EACR,IAAA;EACA,YAAA;EACA,OAAA;EACA,GAAA,GAAM,SAAA,CAAU,iBAAA;EAChB,iBAAA;AAAA,IACE,cAAA,CAAe,iBAAA;AAAA,cA2BN,OAAA;EAAW,UAAA;EAAA,IAAA;EAAA,SAAA;EAAA,KAAA;EAAA,IAAA;EAAA,cAAA,SAAA;EAAA,OAAA;EAAA,GAAA;EAAA,iBAAA;EAAA,GAAA;AAAA,GAWrB,YAAA,iCAAY,GAAA,CAAA,OAAA"}
@@ -61,9 +61,9 @@ declare enum ButtonTextAlign {
61
61
  */
62
62
  declare const buttonVariants: (props?: {
63
63
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
64
- color?: "text" | "error" | "custom" | "primary" | "secondary" | "destructive" | "neutral" | "card" | "light" | "dark" | "current" | "text-inverse" | "success";
65
- roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "4xl" | "5xl" | "full";
66
- variant?: "none" | "default" | "input" | "outline" | "link" | "invisible-link" | "hoverable" | "fade";
64
+ color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "card" | "light" | "dark" | "current" | "text-inverse" | "error" | "success" | "custom";
65
+ roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full";
66
+ variant?: "input" | "none" | "default" | "outline" | "link" | "invisible-link" | "hoverable" | "fade";
67
67
  textAlign?: "left" | "center" | "right";
68
68
  isFullWidth?: boolean;
69
69
  } & import("class-variance-authority/types").ClassProp) => string;
@@ -4,8 +4,8 @@ import { VariantProps } from "class-variance-authority";
4
4
  //#region src/components/CollapsibleTable/CollapsibleTable.d.ts
5
5
  declare const collapsibleTableVariants: (props?: {
6
6
  size?: "sm" | "md" | "lg" | "xl" | "full";
7
- variant?: "default" | "dark" | "ghost" | "outlined";
8
- spacing?: "sm" | "md" | "lg" | "none" | "auto";
7
+ variant?: "default" | "ghost" | "dark" | "outlined";
8
+ spacing?: "none" | "sm" | "md" | "lg" | "auto";
9
9
  } & import("class-variance-authority/types").ClassProp) => string;
10
10
  interface CollapsibleTableProps extends Omit<HTMLAttributes<HTMLElement>, 'title'>, VariantProps<typeof collapsibleTableVariants> {
11
11
  /** Table title displayed in the header */
@@ -27,7 +27,7 @@ declare const Command: {
27
27
  ref?: React.Ref<HTMLInputElement>;
28
28
  } & {
29
29
  asChild?: boolean;
30
- }, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement> | "asChild">, "onChange" | "type" | "value"> & {
30
+ }, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement> | "asChild">, "type" | "onChange" | "value"> & {
31
31
  value?: string;
32
32
  onValueChange?: (search: string) => void;
33
33
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -7,14 +7,14 @@ import { VariantProps } from "class-variance-authority";
7
7
  * Provides flexible styling options for background, padding, borders, and layout
8
8
  */
9
9
  declare const containerVariants: (props?: {
10
- roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "4xl" | "full";
11
- transparency?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full";
12
- padding?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
10
+ roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "full";
11
+ transparency?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
12
+ padding?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
13
13
  separator?: "both" | "without" | "x" | "y";
14
- border?: "none" | "with";
14
+ border?: "with" | "none";
15
15
  borderColor?: "error" | "success" | "text" | "primary" | "secondary" | "neutral" | "card" | "warning";
16
- background?: "none" | "with" | "hoverable";
17
- gap?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
16
+ background?: "with" | "none" | "hoverable";
17
+ gap?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
18
18
  } & import("class-variance-authority/types").ClassProp) => string;
19
19
  /** Available rounded corner sizes for the container */
20
20
  declare enum ContainerRoundedSize {
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
5
5
  declare const checkboxVariants: (props?: {
6
6
  variant?: "default";
7
7
  size?: "xs" | "sm" | "md" | "lg";
8
- color?: "error" | "success" | "text" | "custom" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text-inverse";
8
+ color?: "error" | "success" | "text" | "primary" | "secondary" | "neutral" | "destructive" | "light" | "dark" | "text-inverse" | "custom";
9
9
  validationStyleEnabled?: "enabled" | "disabled";
10
10
  } & import("class-variance-authority/types").ClassProp) => string;
11
11
  declare enum CheckboxSize {
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from "react";
2
+
3
+ //#region src/components/LanguageBackground/LanguageSection.d.ts
4
+ declare const LanguageSection: FC<HTMLAttributes<HTMLElement>>;
5
+ //#endregion
6
+ export { LanguageSection };
7
+ //# sourceMappingURL=LanguageSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageSection.d.ts","names":[],"sources":["../../../../src/components/LanguageBackground/LanguageSection.tsx"],"mappings":";;;cAsFa,eAAA,EAAiB,EAAA,CAAG,cAAA,CAAe,WAAA"}
@@ -1,7 +1,7 @@
1
- import { FC, HTMLAttributes, PropsWithChildren } from "react";
1
+ import { LanguageSection } from "./LanguageSection.js";
2
+ import { FC, PropsWithChildren } from "react";
2
3
 
3
4
  //#region src/components/LanguageBackground/index.d.ts
4
- declare const LanguageSection: FC<HTMLAttributes<HTMLElement>>;
5
5
  declare const LanguageBackground: FC<PropsWithChildren>;
6
6
  //#endregion
7
7
  export { LanguageBackground, LanguageSection };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/LanguageBackground/index.tsx"],"mappings":";;;cAuFa,eAAA,EAAiB,EAAA,CAAG,cAAA,CAAe,WAAA;AAAA,cAqCnC,kBAAA,EAAoB,EAAE,CAAC,iBAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/LanguageBackground/index.tsx"],"mappings":";;;;cAUa,kBAAA,EAAoB,EAAE,CAAC,iBAAA"}
@@ -53,8 +53,8 @@ declare enum LinkUnderlined {
53
53
  }
54
54
  declare const linkVariants: (props?: {
55
55
  variant?: "default" | "invisible-link" | "hoverable" | "button" | "button-outlined";
56
- roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
57
- color?: "text" | "error" | "custom" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text-inverse" | "success";
56
+ roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full";
57
+ color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text-inverse" | "error" | "success" | "custom";
58
58
  size?: "sm" | "md" | "lg" | "xl" | "custom";
59
59
  underlined?: boolean | LinkUnderlined.DEFAULT;
60
60
  } & import("class-variance-authority/types").ClassProp) => string;
@@ -4,7 +4,7 @@ import { VariantProps } from "class-variance-authority";
4
4
  //#region src/components/Pagination/Pagination.d.ts
5
5
  declare const paginationVariants: (props?: {
6
6
  size?: "sm" | "md" | "lg";
7
- color?: "text" | "primary" | "secondary" | "destructive" | "neutral";
7
+ color?: "text" | "primary" | "secondary" | "neutral" | "destructive";
8
8
  variant?: "default" | "bordered" | "ghost";
9
9
  } & import("class-variance-authority/types").ClassProp) => string;
10
10
  declare enum PaginationSize {
@@ -13,7 +13,7 @@ declare enum TabSelectorColor {
13
13
  TEXT = "text"
14
14
  }
15
15
  declare const tabSelectorVariant: (props?: {
16
- color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
16
+ color?: "text" | "primary" | "secondary" | "neutral" | "destructive" | "light" | "dark";
17
17
  } & import("class-variance-authority/types").ClassProp) => string;
18
18
  type TabSelectorItemProps = HTMLAttributes<HTMLElement> & {
19
19
  key: string | number;
@@ -184,8 +184,8 @@ declare enum TagBackground {
184
184
  WITH = "with"
185
185
  }
186
186
  declare const containerVariants: (props?: {
187
- roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
188
- color?: "text" | "error" | "primary" | "neutral" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
187
+ roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full";
188
+ color?: "text" | "primary" | "neutral" | "error" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
189
189
  size?: "xs" | "sm" | "md" | "lg" | "xl";
190
190
  border?: "none" | "with";
191
191
  background?: "none" | "with";
@@ -53,7 +53,8 @@ import { IDE, IDEProps } from "./IDE/IDE.js";
53
53
  import { InformationTag } from "./InformationTag/index.js";
54
54
  import { KeyboardScreenAdapter } from "./KeyboardScreenAdapter/index.js";
55
55
  import { KeyList, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutType } from "./KeyboardShortcut/KeyboardShortcut.js";
56
- import { LanguageBackground, LanguageSection } from "./LanguageBackground/index.js";
56
+ import { LanguageSection } from "./LanguageBackground/LanguageSection.js";
57
+ import { LanguageBackground } from "./LanguageBackground/index.js";
57
58
  import { Loader, LoaderProps } from "./Loader/index.js";
58
59
  import { LocaleSwitcherContent, LocaleSwitcherContentProps } from "./LocaleSwitcherContentDropDown/LocaleSwitcherContent.js";
59
60
  import { LocaleSwitcherContentProvider, useLocaleSwitcherContent } from "./LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "8.10.0",
3
+ "version": "8.10.1",
4
4
  "private": false,
5
5
  "description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
6
6
  "keywords": [
@@ -421,12 +421,12 @@
421
421
  "dependencies": {
422
422
  "@better-auth/passkey": "1.6.11",
423
423
  "@better-auth/sso": "1.6.11",
424
- "@intlayer/api": "8.10.0",
425
- "@intlayer/config": "8.10.0",
426
- "@intlayer/core": "8.10.0",
427
- "@intlayer/dictionaries-entry": "8.10.0",
428
- "@intlayer/editor-react": "8.10.0",
429
- "@intlayer/types": "8.10.0",
424
+ "@intlayer/api": "8.10.1",
425
+ "@intlayer/config": "8.10.1",
426
+ "@intlayer/core": "8.10.1",
427
+ "@intlayer/dictionaries-entry": "8.10.1",
428
+ "@intlayer/editor-react": "8.10.1",
429
+ "@intlayer/types": "8.10.1",
430
430
  "@radix-ui/react-dialog": "1.1.15",
431
431
  "@radix-ui/react-select": "2.2.6",
432
432
  "@radix-ui/react-slot": "1.2.4",
@@ -446,7 +446,7 @@
446
446
  "zod": "4.4.3"
447
447
  },
448
448
  "devDependencies": {
449
- "@intlayer/backend": "8.10.0",
449
+ "@intlayer/backend": "8.10.1",
450
450
  "@shikijs/transformers": "4.0.2",
451
451
  "@storybook/addon-a11y": "8.6.14",
452
452
  "@storybook/addon-essentials": "8.6.14",
@@ -477,7 +477,7 @@
477
477
  "@utils/ts-config-types": "1.0.4",
478
478
  "clsx": "2.1.1",
479
479
  "fast-glob": "3.3.3",
480
- "intlayer": "8.10.0",
480
+ "intlayer": "8.10.1",
481
481
  "rimraf": "6.1.3",
482
482
  "shiki": "4.0.2",
483
483
  "storybook": "8.6.17",
@@ -492,14 +492,14 @@
492
492
  "peerDependencies": {
493
493
  "@better-fetch/fetch": "1.1.21",
494
494
  "@hookform/resolvers": "5.2.2",
495
- "@intlayer/backend": "8.10.0",
495
+ "@intlayer/backend": "8.10.1",
496
496
  "@monaco-editor/react": "4.7.0",
497
497
  "@shikijs/transformers": "4.0.2",
498
498
  "@tanstack/react-query": "5.100.11",
499
499
  "@tanstack/react-query-devtools": "5.100.11",
500
500
  "framer-motion": "12.39.0",
501
501
  "fuse.js": "7.3.0",
502
- "intlayer": "8.10.0",
502
+ "intlayer": "8.10.1",
503
503
  "lucide-react": "1.16.0",
504
504
  "react": ">=16.0.0",
505
505
  "react-dom": ">=16.0.0",