@intlayer/design-system 8.1.3 → 8.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/esm/components/Input/Checkbox.mjs +1 -1
  2. package/dist/esm/components/Input/Checkbox.mjs.map +1 -1
  3. package/dist/esm/components/LanguageBackground/index.mjs +1 -1
  4. package/dist/esm/components/LanguageBackground/index.mjs.map +1 -1
  5. package/dist/esm/components/MarkDownRender/MarkDownRender.mjs +1 -1
  6. package/dist/esm/components/MarkDownRender/MarkDownRender.mjs.map +1 -1
  7. package/dist/esm/hooks/usePersistedStore.mjs +1 -1
  8. package/dist/esm/hooks/usePersistedStore.mjs.map +1 -1
  9. package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts +1 -1
  10. package/dist/types/components/Browser/Browser.content.d.ts +8 -8
  11. package/dist/types/components/Button/Button.d.ts +4 -4
  12. package/dist/types/components/Carousel/index.content.d.ts +3 -3
  13. package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +2 -2
  14. package/dist/types/components/Command/index.d.ts +1 -1
  15. package/dist/types/components/Container/index.d.ts +6 -6
  16. package/dist/types/components/CopyButton/CopyButton.content.d.ts +1 -1
  17. package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +12 -12
  18. package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +4 -4
  19. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +27 -27
  20. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +16 -16
  21. package/dist/types/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +12 -12
  22. package/dist/types/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +16 -16
  23. package/dist/types/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +4 -4
  24. package/dist/types/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +3 -3
  25. package/dist/types/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +2 -2
  26. package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +15 -15
  27. package/dist/types/components/ExpandCollapse/expandCollapse.content.d.ts +1 -1
  28. package/dist/types/components/IDE/code.content.d.ts +2 -2
  29. package/dist/types/components/IDE/copyCode.content.d.ts +2 -2
  30. package/dist/types/components/IDE/selectors.content.d.ts +6 -6
  31. package/dist/types/components/Input/Checkbox.d.ts +3 -2
  32. package/dist/types/components/Input/Checkbox.d.ts.map +1 -1
  33. package/dist/types/components/LanguageBackground/index.d.ts.map +1 -1
  34. package/dist/types/components/Link/Link.d.ts +3 -3
  35. package/dist/types/components/Loader/index.content.d.ts +1 -1
  36. package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +8 -8
  37. package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +6 -6
  38. package/dist/types/components/MarkDownRender/MarkDownRender.d.ts.map +1 -1
  39. package/dist/types/components/Pagination/Pagination.d.ts +1 -1
  40. package/dist/types/components/Pagination/pagination.content.d.ts +5 -5
  41. package/dist/types/components/RightDrawer/rightDrawer.content.d.ts +2 -2
  42. package/dist/types/components/SwitchSelector/index.d.ts +1 -1
  43. package/dist/types/components/Tab/Tab.d.ts +2 -2
  44. package/dist/types/components/TabSelector/TabSelector.d.ts +1 -1
  45. package/dist/types/components/Table/table.content.d.ts +1 -1
  46. package/dist/types/components/Tag/index.d.ts +3 -3
  47. package/dist/types/components/Terminal/terminal.content.d.ts +2 -2
  48. package/dist/types/components/Toaster/Toast.d.ts +1 -1
  49. package/package.json +25 -25
@@ -1,2 +1,2 @@
1
- import{cn as e}from"../../utils/cn.mjs";import{cva as t}from"class-variance-authority";import{jsx as n,jsxs as r}from"react/jsx-runtime";const i=t([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:border-current checked:bg-current checked:hover:bg-current/80`,`ring-current/20 ring-offset-current`,`hover:bg-current/20`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`accent-primary`,secondary:`accent-secondary`,destructive:`accent-destructive`,neutral:`accent-neutral`,light:`accent-light`,text:`accent-text`,dark:`accent-dark`,error:`accent-error`,success:`accent-success`,custom:`accent-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}});let a=function(e){return e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e}({}),o=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.DESTRUCTIVE=`destructive`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.TEXT=`text`,e.DARK=`dark`,e.ERROR=`error`,e.SUCCESS=`success`,e.CUSTOM=`custom`,e}({});const s=({validationStyleEnabled:t=!1,label:r,size:a,color:o,name:s,variant:c,className:l,labelClassName:u,...d})=>n(`input`,{type:`checkbox`,className:e(i({variant:c,size:a,color:o,validationStyleEnabled:t?`enabled`:`disabled`}),l),...d}),c=t=>{let{label:i,name:a,id:o}=t;return i?r(`label`,{htmlFor:o??a,className:e(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,t.labelClassName),children:[n(s,{id:o??a,...t}),i]}):n(s,{id:o??a,...t})};export{c as Checkbox,o as CheckboxColor,a as CheckboxSize,i as checkboxVariants};
1
+ import{cn as e}from"../../utils/cn.mjs";import{cva as t}from"class-variance-authority";import{jsx as n,jsxs as r}from"react/jsx-runtime";const i=t([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:border-current checked:bg-current checked:hover:bg-current/80`,`ring-current/20 ring-offset-current`,`hover:bg-current/20`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`accent-primary`,secondary:`accent-secondary`,destructive:`accent-destructive`,neutral:`accent-neutral`,light:`accent-light`,text:`accent-text`,dark:`accent-dark`,error:`accent-error`,success:`accent-success`,custom:`accent-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}});let a=function(e){return e.XS=`xs`,e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e}({}),o=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.DESTRUCTIVE=`destructive`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.TEXT=`text`,e.DARK=`dark`,e.ERROR=`error`,e.SUCCESS=`success`,e.CUSTOM=`custom`,e}({});const s=({validationStyleEnabled:t=!1,label:r,size:a,color:o,name:s,variant:c,className:l,labelClassName:u,...d})=>n(`input`,{type:`checkbox`,className:e(i({variant:c,size:a,color:o,validationStyleEnabled:t?`enabled`:`disabled`}),l),...d}),c=t=>{let{label:i,name:a,id:o}=t;return i?r(`label`,{htmlFor:o??a,className:e(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,t.labelClassName),children:[n(s,{id:o??a,...t}),i]}):n(s,{id:o??a,...t})};export{c as Checkbox,o as CheckboxColor,a as CheckboxSize,i as checkboxVariants};
2
2
  //# sourceMappingURL=Checkbox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.mjs","names":[],"sources":["../../../../src/components/Input/Checkbox.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type {\n DetailedHTMLProps,\n FC,\n InputHTMLAttributes,\n ReactNode,\n} from 'react';\n\nexport const checkboxVariants = cva(\n [\n 'appearance-none',\n 'relative cursor-pointer border-2',\n 'focus:outline-0',\n 'checked:border-current checked:bg-current checked:hover:bg-current/80',\n 'ring-current/20 ring-offset-current',\n 'hover:bg-current/20',\n 'disabled:opacity-50',\n\n // Ring + animation\n 'ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6',\n\n // centered custom checkmark with text-opposite color\n \"checked:before:absolute checked:before:inset-0 checked:before:content-['✓']\",\n 'checked:before:flex checked:before:items-center checked:before:justify-center',\n 'checked:before:text-text-opposite/80',\n\n // Corner shape\n 'rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl',\n\n // --- FIX START ---\n // Invisible Hit Area Expansion\n // extends the interaction zone by 0.5rem (8px) on all sides\n \"after:absolute after:-inset-2 after:content-['']\",\n // --- FIX END ---\n ].join(' '),\n {\n variants: {\n variant: {\n default: '',\n },\n size: {\n sm: 'size-4 rounded-md',\n md: 'size-5 rounded-lg',\n lg: 'size-6 rounded-xl',\n },\n color: {\n primary: 'accent-primary',\n secondary: 'accent-secondary',\n destructive: 'accent-destructive',\n neutral: 'accent-neutral',\n light: 'accent-light',\n text: 'accent-text',\n dark: 'accent-dark',\n error: 'accent-error',\n success: 'accent-success',\n custom: 'accent-custom',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n validationStyleEnabled: 'disabled',\n size: 'md',\n },\n }\n);\n\nexport enum CheckboxSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport enum CheckboxColor {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n DESTRUCTIVE = 'destructive',\n NEUTRAL = 'neutral',\n LIGHT = 'light',\n TEXT = 'text',\n DARK = 'dark',\n ERROR = 'error',\n SUCCESS = 'success',\n CUSTOM = 'custom',\n}\n\nexport type CheckboxProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'size'\n> & {\n name: string;\n validationStyleEnabled?: boolean;\n label?: ReactNode;\n} & Omit<\n VariantProps<typeof checkboxVariants>,\n 'validationStyleEnabled' | 'size' | 'color'\n > & {\n size?: CheckboxSize | `${CheckboxSize}`;\n color?: CheckboxColor | `${CheckboxColor}`;\n labelClassName?: string;\n };\n\nconst Input: FC<CheckboxProps> = ({\n validationStyleEnabled = false,\n label,\n size,\n color,\n name,\n variant,\n className,\n labelClassName,\n ...props\n}) => (\n <input\n type=\"checkbox\"\n className={cn(\n checkboxVariants({\n variant,\n size,\n color,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n }),\n className\n )}\n {...props}\n />\n);\n\nexport const Checkbox: FC<CheckboxProps> = (props) => {\n const { label, name, id } = props;\n\n return label ? (\n <label\n htmlFor={id ?? name}\n className={cn(\n 'flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm',\n props.labelClassName\n )}\n >\n <Input id={id ?? name} {...props} />\n {label}\n </label>\n ) : (\n <Input id={id ?? name} {...props} />\n );\n};\n"],"mappings":"yIASA,MAAa,EAAmB,EAC9B,CACE,kBACA,mCACA,kBACA,wEACA,sCACA,sBACA,sBAGA,mFAGA,8EACA,gFACA,uCAGA,kFAKA,mDAED,CAAC,KAAK,IAAI,CACX,CACE,SAAU,CACR,QAAS,CACP,QAAS,GACV,CACD,KAAM,CACJ,GAAI,oBACJ,GAAI,oBACJ,GAAI,oBACL,CACD,MAAO,CACL,QAAS,iBACT,UAAW,mBACX,YAAa,qBACb,QAAS,iBACT,MAAO,eACP,KAAM,cACN,KAAM,cACN,MAAO,eACP,QAAS,iBACT,OAAQ,gBACT,CACD,uBAAwB,CACtB,SAAU,GACV,QAAS,4CACV,CACF,CACD,gBAAiB,CACf,QAAS,UACT,MAAO,UACP,uBAAwB,WACxB,KAAM,KACP,CACF,CACF,CAED,IAAY,EAAA,SAAA,EAAL,OACL,GAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,YAGU,EAAA,SAAA,EAAL,OACL,GAAA,QAAA,UACA,EAAA,UAAA,YACA,EAAA,YAAA,cACA,EAAA,QAAA,UACA,EAAA,MAAA,QACA,EAAA,KAAA,OACA,EAAA,KAAA,OACA,EAAA,MAAA,QACA,EAAA,QAAA,UACA,EAAA,OAAA,gBAmBF,MAAM,GAA4B,CAChC,yBAAyB,GACzB,QACA,OACA,QACA,OACA,UACA,YACA,iBACA,GAAG,KAEH,EAAC,QAAA,CACC,KAAK,WACL,UAAW,EACT,EAAiB,CACf,UACA,OACA,QACA,uBAAwB,EAAyB,UAAY,WAC9D,CAAC,CACF,EACD,CACD,GAAI,GACJ,CAGS,EAA+B,GAAU,CACpD,GAAM,CAAE,QAAO,OAAM,MAAO,EAE5B,OAAO,EACL,EAAC,QAAA,CACC,QAAS,GAAM,EACf,UAAW,EACT,sEACA,EAAM,eACP,WAED,EAAC,EAAA,CAAM,GAAI,GAAM,EAAM,GAAI,GAAS,CACnC,EAAA,EACK,CAER,EAAC,EAAA,CAAM,GAAI,GAAM,EAAM,GAAI,GAAS"}
1
+ {"version":3,"file":"Checkbox.mjs","names":[],"sources":["../../../../src/components/Input/Checkbox.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type {\n DetailedHTMLProps,\n FC,\n InputHTMLAttributes,\n ReactNode,\n} from 'react';\n\nexport const checkboxVariants = cva(\n [\n 'appearance-none',\n 'relative cursor-pointer border-2',\n 'focus:outline-0',\n 'checked:border-current checked:bg-current checked:hover:bg-current/80',\n 'ring-current/20 ring-offset-current',\n 'hover:bg-current/20',\n 'disabled:opacity-50',\n\n // Ring + animation\n 'ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6',\n\n // centered custom checkmark with text-opposite color\n \"checked:before:absolute checked:before:inset-0 checked:before:content-['✓']\",\n 'checked:before:flex checked:before:items-center checked:before:justify-center',\n 'checked:before:text-text-opposite/80',\n\n // Corner shape\n 'rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl',\n\n \"after:absolute after:-inset-2 after:content-['']\",\n ].join(' '),\n {\n variants: {\n variant: {\n default: '',\n },\n size: {\n xs: 'size-3 rounded-sm',\n sm: 'size-4 rounded-md',\n md: 'size-5 rounded-lg',\n lg: 'size-6 rounded-xl',\n },\n color: {\n primary: 'accent-primary',\n secondary: 'accent-secondary',\n destructive: 'accent-destructive',\n neutral: 'accent-neutral',\n light: 'accent-light',\n text: 'accent-text',\n dark: 'accent-dark',\n error: 'accent-error',\n success: 'accent-success',\n custom: 'accent-custom',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n validationStyleEnabled: 'disabled',\n size: 'md',\n },\n }\n);\n\nexport enum CheckboxSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport enum CheckboxColor {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n DESTRUCTIVE = 'destructive',\n NEUTRAL = 'neutral',\n LIGHT = 'light',\n TEXT = 'text',\n DARK = 'dark',\n ERROR = 'error',\n SUCCESS = 'success',\n CUSTOM = 'custom',\n}\n\nexport type CheckboxProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'size'\n> & {\n name: string;\n validationStyleEnabled?: boolean;\n label?: ReactNode;\n} & Omit<\n VariantProps<typeof checkboxVariants>,\n 'validationStyleEnabled' | 'size' | 'color'\n > & {\n size?: CheckboxSize | `${CheckboxSize}`;\n color?: CheckboxColor | `${CheckboxColor}`;\n labelClassName?: string;\n };\n\nconst Input: FC<CheckboxProps> = ({\n validationStyleEnabled = false,\n label,\n size,\n color,\n name,\n variant,\n className,\n labelClassName,\n ...props\n}) => (\n <input\n type=\"checkbox\"\n className={cn(\n checkboxVariants({\n variant,\n size,\n color,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n }),\n className\n )}\n {...props}\n />\n);\n\nexport const Checkbox: FC<CheckboxProps> = (props) => {\n const { label, name, id } = props;\n\n return label ? (\n <label\n htmlFor={id ?? name}\n className={cn(\n 'flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm',\n props.labelClassName\n )}\n >\n <Input id={id ?? name} {...props} />\n {label}\n </label>\n ) : (\n <Input id={id ?? name} {...props} />\n );\n};\n"],"mappings":"yIASA,MAAa,EAAmB,EAC9B,CACE,kBACA,mCACA,kBACA,wEACA,sCACA,sBACA,sBAGA,mFAGA,8EACA,gFACA,uCAGA,kFAEA,mDACD,CAAC,KAAK,IAAI,CACX,CACE,SAAU,CACR,QAAS,CACP,QAAS,GACV,CACD,KAAM,CACJ,GAAI,oBACJ,GAAI,oBACJ,GAAI,oBACJ,GAAI,oBACL,CACD,MAAO,CACL,QAAS,iBACT,UAAW,mBACX,YAAa,qBACb,QAAS,iBACT,MAAO,eACP,KAAM,cACN,KAAM,cACN,MAAO,eACP,QAAS,iBACT,OAAQ,gBACT,CACD,uBAAwB,CACtB,SAAU,GACV,QAAS,4CACV,CACF,CACD,gBAAiB,CACf,QAAS,UACT,MAAO,UACP,uBAAwB,WACxB,KAAM,KACP,CACF,CACF,CAED,IAAY,EAAA,SAAA,EAAL,OACL,GAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,YAGU,EAAA,SAAA,EAAL,OACL,GAAA,QAAA,UACA,EAAA,UAAA,YACA,EAAA,YAAA,cACA,EAAA,QAAA,UACA,EAAA,MAAA,QACA,EAAA,KAAA,OACA,EAAA,KAAA,OACA,EAAA,MAAA,QACA,EAAA,QAAA,UACA,EAAA,OAAA,gBAmBF,MAAM,GAA4B,CAChC,yBAAyB,GACzB,QACA,OACA,QACA,OACA,UACA,YACA,iBACA,GAAG,KAEH,EAAC,QAAA,CACC,KAAK,WACL,UAAW,EACT,EAAiB,CACf,UACA,OACA,QACA,uBAAwB,EAAyB,UAAY,WAC9D,CAAC,CACF,EACD,CACD,GAAI,GACJ,CAGS,EAA+B,GAAU,CACpD,GAAM,CAAE,QAAO,OAAM,MAAO,EAE5B,OAAO,EACL,EAAC,QAAA,CACC,QAAS,GAAM,EACf,UAAW,EACT,sEACA,EAAM,eACP,WAED,EAAC,EAAA,CAAM,GAAI,GAAM,EAAM,GAAI,GAAS,CACnC,EAAA,EACK,CAER,EAAC,EAAA,CAAM,GAAI,GAAM,EAAM,GAAI,GAAS"}
@@ -1,2 +1,2 @@
1
- "use client";import{cn as e}from"../../utils/cn.mjs";import{useEffect as t,useState as n}from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{Container as o,Flag as s}from"@intlayer/design-system";import{Locales as c,getHTMLTextDir as l,getLocaleName as u}from"intlayer";const d=(e,t)=>{let n=[...e];for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return t?n.slice(0,t):n},f=({locale:e,...t})=>i(`div`,{className:`group z-10 mx-8 inline-flex shrink-0 transition-transform duration-300 hover:scale-105`,...t,children:a(o,{roundedSize:`xl`,className:`flex flex-row items-center gap-5 p-3`,children:[i(s,{locale:e,className:`max-h-5 max-w-5 rounded-sm grayscale-80 transition duration-300 group-hover:grayscale-0`,width:640,height:480,loading:`lazy`}),i(`span`,{dir:l(e),lang:e,className:`flex text-nowrap`,children:u(e)})]})}),p=({localeList:t,className:n,...r})=>i(`div`,{className:`relative flex w-full overflow-hidden`,...r,children:a(`div`,{className:e(`inline-flex shrink-0 will-change-transform`,n),children:[t.map((e,t)=>i(f,{locale:e},`${e}-first-${t}`)),t.map((e,t)=>i(f,{locale:e},`${e}-second-${t}`))]})}),m=[,,,,].fill(0).map(()=>[]),h=[,,,,].fill(0).map(()=>d(Object.values(c.ALL_LOCALES),15)),g=({className:r,...o})=>{let[s,c]=n(m),[l,u,d,f]=s;return t(()=>{c(h)},[]),i(`section`,{className:e(`mask-[linear-gradient(to_right,transparent_0,black_128px,black_calc(100%-128px),transparent_100%)] my-10 w-full overflow-hidden`,r),...o,children:a(`div`,{className:`relative flex w-full flex-col gap-5 py-3`,children:[i(p,{localeList:l,className:`horizontal-loop-1`}),i(p,{localeList:u,className:`horizontal-loop-2`}),i(p,{localeList:d,className:`horizontal-loop-1`}),i(p,{localeList:f,className:`horizontal-loop-2`})]})})},_=({children:e})=>a(r,{children:[i(`div`,{className:`absolute top-0 left-0 z-0 flex size-full items-center justify-center`,children:i(g,{className:`mt-[30%]`})}),e]});export{_ as LanguageBackground,g as LanguageSection};
1
+ "use client";import{cn as e}from"../../utils/cn.mjs";import{Container as t}from"../Container/index.mjs";import{Flag as n}from"../Flags/Flag.mjs";import{useEffect as r,useState as i}from"react";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";import{Locales as c,getHTMLTextDir as l,getLocaleName as u}from"intlayer";const d=(e,t)=>{let n=[...e];for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return t?n.slice(0,t):n},f=({locale:e,...r})=>o(`div`,{className:`group z-10 mx-8 inline-flex shrink-0 transition-transform duration-300 hover:scale-105`,...r,children:s(t,{roundedSize:`xl`,className:`flex flex-row items-center gap-5 p-3`,children:[o(n,{locale:e,className:`max-h-5 max-w-5 rounded-sm grayscale-80 transition duration-300 group-hover:grayscale-0`,width:640,height:480,loading:`lazy`}),o(`span`,{dir:l(e),lang:e,className:`flex text-nowrap`,children:u(e)})]})}),p=({localeList:t,className:n,...r})=>o(`div`,{className:`relative flex w-full overflow-hidden`,...r,children:s(`div`,{className:e(`inline-flex shrink-0 will-change-transform`,n),children:[t.map((e,t)=>o(f,{locale:e},`${e}-first-${t}`)),t.map((e,t)=>o(f,{locale:e},`${e}-second-${t}`))]})}),m=[,,,,].fill(0).map(()=>[]),h=[,,,,].fill(0).map(()=>d(Object.values(c.ALL_LOCALES),15)),g=({className:t,...n})=>{let[a,c]=i(m),[l,u,d,f]=a;return r(()=>{c(h)},[]),o(`section`,{className:e(`mask-[linear-gradient(to_right,transparent_0,black_128px,black_calc(100%-128px),transparent_100%)] my-10 w-full overflow-hidden`,t),...n,children:s(`div`,{className:`relative flex w-full flex-col gap-5 py-3`,children:[o(p,{localeList:l,className:`horizontal-loop-1`}),o(p,{localeList:u,className:`horizontal-loop-2`}),o(p,{localeList:d,className:`horizontal-loop-1`}),o(p,{localeList:f,className:`horizontal-loop-2`})]})})},_=({children:e})=>s(a,{children:[o(`div`,{className:`absolute top-0 left-0 z-0 flex size-full items-center justify-center`,children:o(g,{className:`mt-[30%]`})}),e]});export{_ as LanguageBackground,g as LanguageSection};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/LanguageBackground/index.tsx"],"sourcesContent":["'use client';\n\nimport { Container, Flag } from '@intlayer/design-system';\nimport { cn } from '@utils/cn';\nimport { getHTMLTextDir, getLocaleName, type Locale, Locales } from 'intlayer';\nimport {\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n useEffect,\n useState,\n} from 'react';\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(Locales.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 <LocalCardList localeList={firstPart} className=\"horizontal-loop-1\" />\n <LocalCardList localeList={secondPart} className=\"horizontal-loop-2\" />\n <LocalCardList localeList={thirdPart} className=\"horizontal-loop-1\" />\n <LocalCardList localeList={fourthPart} className=\"horizontal-loop-2\" />\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":"6SAaA,MAAM,GAAgB,EAAiB,IAAmB,CACxD,IAAM,EAAW,CAAC,GAAG,EAAM,CAE3B,IAAK,IAAI,EAAI,EAAS,OAAS,EAAG,EAAI,EAAG,IAAK,CAC5C,IAAM,EAAc,KAAK,MAAM,KAAK,QAAQ,EAAI,EAAI,GAAG,CAEvD,CAAC,EAAS,GAAI,EAAS,IAAgB,CAAC,EAAS,GAAc,EAAS,GAAG,CAG7E,OAAO,EAAQ,EAAS,MAAM,EAAG,EAAM,CAAG,GAGtC,GAAqC,CAAE,SAAQ,GAAG,KACtD,EAAC,MAAA,CACC,UAAU,yFACV,GAAI,WAEJ,EAAC,EAAA,CACC,YAAY,KACZ,UAAU,iDAEV,EAAC,EAAA,CACS,SACR,UAAU,0FACV,MAAO,IACP,OAAQ,IACR,QAAQ,QACR,CACF,EAAC,OAAA,CACC,IAAK,EAAe,EAAiB,CACrC,KAAM,EACN,UAAU,4BAET,EAAc,EAAiB,EAC3B,CAAA,EACG,EACR,CAGF,GAAmE,CACvE,aACA,YACA,GAAG,KAEH,EAAC,MAAA,CAAI,UAAU,uCAAuC,GAAI,WACxD,EAAC,MAAA,CACC,UAAW,EAAG,6CAA8C,EAAU,WAGrE,EAAW,KAAK,EAAQ,IACvB,EAAC,EAAA,CAAmD,SAAA,CAApC,GAAG,EAAO,SAAS,IAA2B,CAC9D,CAED,EAAW,KAAK,EAAQ,IACvB,EAAC,EAAA,CAAoD,SAAA,CAArC,GAAG,EAAO,UAAU,IAA2B,CAC/D,CAAA,EACE,EACF,CAKF,EAAiC,MAAY,CAAC,KAAK,EAAE,CAAC,QAAU,EAAE,CAAC,CACnE,EAA4B,MAAY,CAC3C,KAAK,EAAE,CACP,QAAU,EAAa,OAAO,OAAO,EAAQ,YAAY,CAAE,GAAe,CAAC,CAEjE,GAAoD,CAC/D,YACA,GAAG,KACC,CACJ,GAAM,CAAC,EAAY,GAAiB,EAAS,EAAmB,CAC1D,CAAC,EAAW,EAAY,EAAW,GAAc,EAMvD,OAJA,MAAgB,CACd,EAAc,EAAc,EAC3B,EAAE,CAAC,CAGJ,EAAC,UAAA,CACC,UAAW,EACT,kIACA,EACD,CACD,GAAI,WAEJ,EAAC,MAAA,CAAI,UAAU,qDACb,EAAC,EAAA,CAAc,WAAY,EAAW,UAAU,qBAAsB,CACtE,EAAC,EAAA,CAAc,WAAY,EAAY,UAAU,qBAAsB,CACvE,EAAC,EAAA,CAAc,WAAY,EAAW,UAAU,qBAAsB,CACtE,EAAC,EAAA,CAAc,WAAY,EAAY,UAAU,qBAAsB,GACnE,EACE,EAID,GAA6C,CAAE,cAC1D,EAAA,EAAA,CAAA,SAAA,CACE,EAAC,MAAA,CAAI,UAAU,gFACb,EAAC,EAAA,CAAgB,UAAU,WAAA,CAAa,EACpC,CACL,EAAA,CAAA,CACA"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/LanguageBackground/index.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@utils/cn';\nimport { getHTMLTextDir, getLocaleName, type Locale, Locales } from 'intlayer';\nimport {\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\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(Locales.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 <LocalCardList localeList={firstPart} className=\"horizontal-loop-1\" />\n <LocalCardList localeList={secondPart} className=\"horizontal-loop-2\" />\n <LocalCardList localeList={thirdPart} className=\"horizontal-loop-1\" />\n <LocalCardList localeList={fourthPart} className=\"horizontal-loop-2\" />\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":"2UAcA,MAAM,GAAgB,EAAiB,IAAmB,CACxD,IAAM,EAAW,CAAC,GAAG,EAAM,CAE3B,IAAK,IAAI,EAAI,EAAS,OAAS,EAAG,EAAI,EAAG,IAAK,CAC5C,IAAM,EAAc,KAAK,MAAM,KAAK,QAAQ,EAAI,EAAI,GAAG,CAEvD,CAAC,EAAS,GAAI,EAAS,IAAgB,CAAC,EAAS,GAAc,EAAS,GAAG,CAG7E,OAAO,EAAQ,EAAS,MAAM,EAAG,EAAM,CAAG,GAGtC,GAAqC,CAAE,SAAQ,GAAG,KACtD,EAAC,MAAA,CACC,UAAU,yFACV,GAAI,WAEJ,EAAC,EAAA,CACC,YAAY,KACZ,UAAU,iDAEV,EAAC,EAAA,CACS,SACR,UAAU,0FACV,MAAO,IACP,OAAQ,IACR,QAAQ,QACR,CACF,EAAC,OAAA,CACC,IAAK,EAAe,EAAiB,CACrC,KAAM,EACN,UAAU,4BAET,EAAc,EAAiB,EAC3B,CAAA,EACG,EACR,CAGF,GAAmE,CACvE,aACA,YACA,GAAG,KAEH,EAAC,MAAA,CAAI,UAAU,uCAAuC,GAAI,WACxD,EAAC,MAAA,CACC,UAAW,EAAG,6CAA8C,EAAU,WAGrE,EAAW,KAAK,EAAQ,IACvB,EAAC,EAAA,CAAmD,SAAA,CAApC,GAAG,EAAO,SAAS,IAA2B,CAC9D,CAED,EAAW,KAAK,EAAQ,IACvB,EAAC,EAAA,CAAoD,SAAA,CAArC,GAAG,EAAO,UAAU,IAA2B,CAC/D,CAAA,EACE,EACF,CAKF,EAAiC,MAAY,CAAC,KAAK,EAAE,CAAC,QAAU,EAAE,CAAC,CACnE,EAA4B,MAAY,CAC3C,KAAK,EAAE,CACP,QAAU,EAAa,OAAO,OAAO,EAAQ,YAAY,CAAE,GAAe,CAAC,CAEjE,GAAoD,CAC/D,YACA,GAAG,KACC,CACJ,GAAM,CAAC,EAAY,GAAiB,EAAS,EAAmB,CAC1D,CAAC,EAAW,EAAY,EAAW,GAAc,EAMvD,OAJA,MAAgB,CACd,EAAc,EAAc,EAC3B,EAAE,CAAC,CAGJ,EAAC,UAAA,CACC,UAAW,EACT,kIACA,EACD,CACD,GAAI,WAEJ,EAAC,MAAA,CAAI,UAAU,qDACb,EAAC,EAAA,CAAc,WAAY,EAAW,UAAU,qBAAsB,CACtE,EAAC,EAAA,CAAc,WAAY,EAAY,UAAU,qBAAsB,CACvE,EAAC,EAAA,CAAc,WAAY,EAAW,UAAU,qBAAsB,CACtE,EAAC,EAAA,CAAc,WAAY,EAAY,UAAU,qBAAsB,GACnE,EACE,EAID,GAA6C,CAAE,cAC1D,EAAA,EAAA,CAAA,SAAA,CACE,EAAC,MAAA,CAAI,UAAU,gFACb,EAAC,EAAA,CAAgB,UAAU,WAAA,CAAa,EACpC,CACL,EAAA,CAAA,CACA"}
@@ -1,2 +1,2 @@
1
- import{cn as e}from"../../utils/cn.mjs";import{Link as t}from"../Link/Link.mjs";import{H1 as n,H2 as r,H3 as i,H4 as a,H5 as o,H6 as s}from"../Headers/index.mjs";import{CodeProvider as c}from"../IDE/CodeContext.mjs";import{Code as l}from"../IDE/Code.mjs";import{TabProvider as u}from"../Tab/TabContext.mjs";import{Tab as d}from"../Tab/Tab.mjs";import{Table as f}from"../Table/Table.mjs";import{jsx as p}from"react/jsx-runtime";import{renderMarkdown as m}from"react-intlayer";const h=c=>({components:{h1:e=>p(n,{isClickable:!0,...e}),h2:e=>p(r,{isClickable:!0,className:`mt-16`,...e}),h3:e=>p(i,{isClickable:!0,className:`mt-5`,...e}),h4:e=>p(a,{isClickable:!0,className:`mt-3`,...e}),h5:e=>p(o,{isClickable:!0,className:`mt-3`,...e}),h6:e=>p(s,{isClickable:!0,className:`mt-3`,...e}),code:({className:e,children:t,...n})=>{let r=String(t??``).replace(/\n$/,``);if(!e)return p(`strong`,{className:`rounded bg-card/60 box-decoration-clone px-1 py-0.5 font-mono text-sm`,children:r});let i=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return console.log({rest:n}),p(l,{...n,language:i,showHeader:!0,isDarkMode:c,children:r})},blockquote:({className:t,...n})=>p(`blockquote`,{className:e(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral`,t),...n}),ul:({className:t,...n})=>p(`ul`,{className:e(`mt-5 flex list-disc flex-col gap-3 pl-5`,t),...n}),ol:({className:t,...n})=>p(`ol`,{className:e(`mt-5 flex list-decimal flex-col gap-3 pl-5`,t),...n}),img:({className:t,...n})=>p(`img`,{...n,alt:n.alt??``,loading:`lazy`,className:e(`max-h-[80vh] max-w-full rounded-md`,t),src:`${n.src}?raw=true`}),a:e=>p(t,{isExternalLink:e.href?.startsWith(`http`),underlined:!0,...e,color:`neutral`}),pre:e=>e.children,table:e=>p(f,{isRollable:!0,...e}),th:({className:t,...n})=>p(`th`,{className:e(`border-neutral border-b bg-neutral/10 p-4`,t),...n}),tr:({className:t,...n})=>p(`tr`,{className:e(`hover:/10 hover:bg-neutral/10`,t),...n}),td:({className:t,...n})=>p(`td`,{className:e(`border-neutral-500/50 border-b p-4`,t),...n}),hr:({className:t,...n})=>p(`hr`,{className:e(`mx-6 mt-16 text-neutral`,t),...n}),Tabs:e=>p(d,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:d.Item,Columns:({className:t,...n})=>p(`div`,{className:e(`flex gap-4 max-md:flex-col`,t),...n}),Column:({className:t,...n})=>p(`div`,{className:e(`flex-1`,t),...n})}}),g=({children:e,isDarkMode:n,locale:r,forceBlock:i,preserveFrontmatter:a,tagfilter:o,components:s,wrapper:d})=>{let f=h(n??!1);return p(c,{children:p(u,{children:m(e,{components:{...f.components,code:({className:e,children:t,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return p(`strong`,{className:`rounded bg-card/60 box-decoration-clone px-1 py-0.5 font-mono text-sm`,children:i});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return p(l,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},a:e=>p(t,{isExternalLink:e.href?.startsWith(`http`),underlined:!0,locale:r,...e,color:`neutral`}),...s},wrapper:d??f.wrapper,forceBlock:i??f.forceBlock,preserveFrontmatter:a??f.preserveFrontmatter,tagfilter:o??f.tagfilter})})})};export{g as MarkdownRenderer,h as getIntlayerMarkdownOptions};
1
+ import{cn as e}from"../../utils/cn.mjs";import{Link as t}from"../Link/Link.mjs";import{H1 as n,H2 as r,H3 as i,H4 as a,H5 as o,H6 as s}from"../Headers/index.mjs";import{CodeProvider as c}from"../IDE/CodeContext.mjs";import{Code as l}from"../IDE/Code.mjs";import{TabProvider as u}from"../Tab/TabContext.mjs";import{Tab as d}from"../Tab/Tab.mjs";import{Table as f}from"../Table/Table.mjs";import{jsx as p}from"react/jsx-runtime";import{renderMarkdown as m}from"react-intlayer";const h=c=>({components:{h1:e=>p(n,{isClickable:!0,...e}),h2:e=>p(r,{isClickable:!0,className:`mt-16`,...e}),h3:e=>p(i,{isClickable:!0,className:`mt-5`,...e}),h4:e=>p(a,{isClickable:!0,className:`mt-3`,...e}),h5:e=>p(o,{isClickable:!0,className:`mt-3`,...e}),h6:e=>p(s,{isClickable:!0,className:`mt-3`,...e}),code:({className:e,children:t,...n})=>{let r=String(t??``).replace(/\n$/,``);if(!e)return p(`strong`,{className:`rounded bg-card/60 box-decoration-clone px-1 py-0.5 font-mono text-sm`,children:r});let i=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return p(l,{...n,language:i,showHeader:!0,isDarkMode:c,children:r})},blockquote:({className:t,...n})=>p(`blockquote`,{className:e(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral`,t),...n}),ul:({className:t,...n})=>p(`ul`,{className:e(`mt-5 flex list-disc flex-col gap-3 pl-5`,t),...n}),ol:({className:t,...n})=>p(`ol`,{className:e(`mt-5 flex list-decimal flex-col gap-3 pl-5`,t),...n}),img:({className:t,...n})=>p(`img`,{...n,alt:n.alt??``,loading:`lazy`,className:e(`max-h-[80vh] max-w-full rounded-md`,t),src:`${n.src}?raw=true`}),a:e=>p(t,{isExternalLink:e.href?.startsWith(`http`),underlined:!0,...e,color:`neutral`}),pre:e=>e.children,table:e=>p(f,{isRollable:!0,...e}),th:({className:t,...n})=>p(`th`,{className:e(`border-neutral border-b bg-neutral/10 p-4`,t),...n}),tr:({className:t,...n})=>p(`tr`,{className:e(`hover:/10 hover:bg-neutral/10`,t),...n}),td:({className:t,...n})=>p(`td`,{className:e(`border-neutral-500/50 border-b p-4`,t),...n}),hr:({className:t,...n})=>p(`hr`,{className:e(`mx-6 mt-16 text-neutral`,t),...n}),Tabs:e=>p(d,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:d.Item,Columns:({className:t,...n})=>p(`div`,{className:e(`flex gap-4 max-md:flex-col`,t),...n}),Column:({className:t,...n})=>p(`div`,{className:e(`flex-1`,t),...n})}}),g=({children:e,isDarkMode:n,locale:r,forceBlock:i,preserveFrontmatter:a,tagfilter:o,components:s,wrapper:d})=>{let f=h(n??!1);return p(c,{children:p(u,{children:m(e,{components:{...f.components,code:({className:e,children:t,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return p(`strong`,{className:`rounded bg-card/60 box-decoration-clone px-1 py-0.5 font-mono text-sm`,children:i});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return p(l,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},a:e=>p(t,{isExternalLink:e.href?.startsWith(`http`),underlined:!0,locale:r,...e,color:`neutral`}),...s},wrapper:d??f.wrapper,forceBlock:i??f.forceBlock,preserveFrontmatter:a??f.preserveFrontmatter,tagfilter:o??f.tagfilter})})})};export{g as MarkdownRenderer,h as getIntlayerMarkdownOptions};
2
2
  //# sourceMappingURL=MarkDownRender.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkDownRender.mjs","names":[],"sources":["../../../../src/components/MarkDownRender/MarkDownRender.tsx"],"sourcesContent":["import type { LocalesValues } from '@intlayer/types';\nimport { cn } from '@utils/cn';\nimport type { ComponentProps, ComponentPropsWithoutRef, FC } from 'react';\nimport {\n type MarkdownRenderer as MarkdownRendererIntlayer,\n type RenderMarkdownProps,\n renderMarkdown,\n} from 'react-intlayer';\nimport type { BundledLanguage } from 'shiki/bundle/web';\nimport { H1, H2, H3, H4, H5, H6 } from '../Headers';\nimport { Code } from '../IDE/Code';\nimport { CodeProvider } from '../IDE/CodeContext';\nimport { Link } from '../Link';\nimport { Tab } from '../Tab';\nimport { TabProvider } from '../Tab/TabContext';\nimport { Table } from '../Table';\n\ntype MarkdownRendererProps = {\n children: string;\n isDarkMode?: boolean;\n locale?: LocalesValues;\n forceBlock?: boolean;\n preserveFrontmatter?: boolean;\n tagfilter?: boolean;\n components?: ComponentProps<typeof MarkdownRendererIntlayer>['components'];\n wrapper?: ComponentProps<typeof MarkdownRendererIntlayer>['wrapper'];\n};\n\nexport const getIntlayerMarkdownOptions: (\n isDarkMode: boolean\n) => RenderMarkdownProps = (isDarkMode) => ({\n components: {\n h1: (props) => <H1 isClickable={true} {...props} />,\n h2: (props) => <H2 isClickable={true} className=\"mt-16\" {...props} />,\n h3: (props) => <H3 isClickable={true} className=\"mt-5\" {...props} />,\n h4: (props) => <H4 isClickable={true} className=\"mt-3\" {...props} />,\n h5: (props) => <H5 isClickable={true} className=\"mt-3\" {...props} />,\n h6: (props) => <H6 isClickable={true} className=\"mt-3\" {...props} />,\n\n code: ({ className, children, ...rest }: ComponentProps<'code'>) => {\n // Ensure children is a string (Markdown renderer might pass ReactNodes)\n const content = String(children ?? '').replace(/\\n$/, '');\n\n // Determine if it is inline code or a code block\n // Code blocks usually have a className like 'language-ts'\n const isBlock = !!className;\n\n if (!isBlock) {\n return (\n <strong className=\"rounded bg-card/60 box-decoration-clone px-1 py-0.5 font-mono text-sm\">\n {content}\n </strong>\n );\n }\n\n // Extract language from className (e.g., \"language-typescript\" -> \"typescript\")\n const language = (className?.replace(/lang(?:uage)?-/, '') ||\n 'plaintext') as BundledLanguage;\n\n console.log({ rest });\n\n return (\n <Code\n {...rest}\n language={language}\n showHeader={true}\n isDarkMode={isDarkMode} // Ensure this variable is available in scope\n >\n {content}\n </Code>\n );\n },\n\n blockquote: ({ className, ...props }) => (\n <blockquote\n className={cn(\n 'mt-5 gap-3 border-card border-l-4 pl-5 text-neutral',\n className\n )}\n {...props}\n />\n ),\n ul: ({ className, ...props }) => (\n <ul\n className={cn('mt-5 flex list-disc flex-col gap-3 pl-5', className)}\n {...props}\n />\n ),\n ol: ({ className, ...props }) => (\n <ol\n className={cn('mt-5 flex list-decimal flex-col gap-3 pl-5', className)}\n {...props}\n />\n ),\n img: ({ className, ...props }) => (\n <img\n {...props}\n alt={props.alt ?? ''}\n loading=\"lazy\"\n className={cn('max-h-[80vh] max-w-full rounded-md', className)}\n src={`${props.src}?raw=true`}\n />\n ),\n a: (props) => (\n // @ts-expect-error - label is not required in LinkProps\n <Link\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n // locale={locale}\n {...props}\n color=\"neutral\"\n />\n ),\n pre: (props) => props.children,\n\n table: (props: ComponentProps<typeof Table>) => (\n <Table isRollable={true} {...props} />\n ),\n th: ({ className, ...props }) => (\n <th\n className={cn('border-neutral border-b bg-neutral/10 p-4', className)}\n {...props}\n />\n ),\n tr: ({ className, ...props }) => (\n <tr\n className={cn('hover:/10 hover:bg-neutral/10', className)}\n {...props}\n />\n ),\n td: ({ className, ...props }) => (\n <td\n className={cn('border-neutral-500/50 border-b p-4', className)}\n {...props}\n />\n ),\n hr: ({ className, ...props }) => (\n <hr className={cn('mx-6 mt-16 text-neutral', className)} {...props} />\n ),\n Tabs: (props: ComponentProps<typeof Tab>) => (\n <Tab\n {...props}\n className=\"rounded-xl border border-card\"\n headerClassName=\"sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto\"\n />\n ),\n Tab: Tab.Item,\n Columns: ({ className, ...props }: ComponentPropsWithoutRef<'div'>) => (\n <div className={cn('flex gap-4 max-md:flex-col', className)} {...props} />\n ),\n Column: ({ className, ...props }: ComponentPropsWithoutRef<'div'>) => (\n <div className={cn('flex-1', className)} {...props} />\n ),\n },\n});\n\n/**\n * MarkdownRenderer Component\n *\n * A comprehensive markdown renderer that transforms markdown text into rich,\n * interactive HTML with custom styling and Intlayer integration. Supports\n * code syntax highlighting, responsive tables, internationalized links,\n * and automatic frontmatter stripping.\n *\n * @component\n */\nexport const MarkdownRenderer: FC<MarkdownRendererProps> = ({\n children,\n isDarkMode,\n locale,\n forceBlock,\n preserveFrontmatter,\n tagfilter,\n components: componentsProp,\n wrapper,\n}) => {\n const markdownOptions = getIntlayerMarkdownOptions(isDarkMode ?? false);\n\n const markdownContent = renderMarkdown(children, {\n components: {\n ...markdownOptions.components,\n // Pass dynamic props to components\n code: ({ className, children, ...rest }: ComponentProps<'code'>) => {\n // Ensure children is a string (Markdown renderer might pass ReactNodes)\n const content = String(children ?? '').replace(/\\n$/, '');\n\n // Determine if it is inline code or a code block\n // Code blocks usually have a className like 'language-ts'\n const isBlock = !!className;\n\n if (!isBlock) {\n return (\n <strong className=\"rounded bg-card/60 box-decoration-clone px-1 py-0.5 font-mono text-sm\">\n {content}\n </strong>\n );\n }\n\n // Extract language from className (e.g., \"language-typescript\" -> \"typescript\")\n const language = (className?.replace(/lang(?:uage)?-/, '') ||\n 'plaintext') as BundledLanguage;\n\n return (\n <Code\n {...rest}\n language={language}\n showHeader={true}\n isDarkMode={isDarkMode} // Ensure this variable is available in scope\n >\n {content}\n </Code>\n );\n },\n\n a: (props) => (\n // @ts-expect-error - label is not required in LinkProps\n <Link\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n locale={locale}\n {...props}\n color=\"neutral\"\n />\n ),\n ...componentsProp,\n },\n wrapper: wrapper ?? markdownOptions.wrapper,\n forceBlock: forceBlock ?? markdownOptions.forceBlock,\n preserveFrontmatter:\n preserveFrontmatter ?? markdownOptions.preserveFrontmatter,\n tagfilter: tagfilter ?? markdownOptions.tagfilter,\n });\n\n return (\n <CodeProvider>\n <TabProvider>{markdownContent}</TabProvider>\n </CodeProvider>\n );\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"MarkDownRender.mjs","names":[],"sources":["../../../../src/components/MarkDownRender/MarkDownRender.tsx"],"sourcesContent":["import type { LocalesValues } from '@intlayer/types';\nimport { cn } from '@utils/cn';\nimport type { ComponentProps, ComponentPropsWithoutRef, FC } from 'react';\nimport {\n type MarkdownRenderer as MarkdownRendererIntlayer,\n type RenderMarkdownProps,\n renderMarkdown,\n} from 'react-intlayer';\nimport type { BundledLanguage } from 'shiki/bundle/web';\nimport { H1, H2, H3, H4, H5, H6 } from '../Headers';\nimport { Code } from '../IDE/Code';\nimport { CodeProvider } from '../IDE/CodeContext';\nimport { Link } from '../Link';\nimport { Tab } from '../Tab';\nimport { TabProvider } from '../Tab/TabContext';\nimport { Table } from '../Table';\n\ntype MarkdownRendererProps = {\n children: string;\n isDarkMode?: boolean;\n locale?: LocalesValues;\n forceBlock?: boolean;\n preserveFrontmatter?: boolean;\n tagfilter?: boolean;\n components?: ComponentProps<typeof MarkdownRendererIntlayer>['components'];\n wrapper?: ComponentProps<typeof MarkdownRendererIntlayer>['wrapper'];\n};\n\nexport const getIntlayerMarkdownOptions: (\n isDarkMode: boolean\n) => RenderMarkdownProps = (isDarkMode) => ({\n components: {\n h1: (props) => <H1 isClickable={true} {...props} />,\n h2: (props) => <H2 isClickable={true} className=\"mt-16\" {...props} />,\n h3: (props) => <H3 isClickable={true} className=\"mt-5\" {...props} />,\n h4: (props) => <H4 isClickable={true} className=\"mt-3\" {...props} />,\n h5: (props) => <H5 isClickable={true} className=\"mt-3\" {...props} />,\n h6: (props) => <H6 isClickable={true} className=\"mt-3\" {...props} />,\n\n code: ({ className, children, ...rest }: ComponentProps<'code'>) => {\n // Ensure children is a string (Markdown renderer might pass ReactNodes)\n const content = String(children ?? '').replace(/\\n$/, '');\n\n // Determine if it is inline code or a code block\n // Code blocks usually have a className like 'language-ts'\n const isBlock = !!className;\n\n if (!isBlock) {\n return (\n <strong className=\"rounded bg-card/60 box-decoration-clone px-1 py-0.5 font-mono text-sm\">\n {content}\n </strong>\n );\n }\n\n // Extract language from className (e.g., \"language-typescript\" -> \"typescript\")\n const language = (className?.replace(/lang(?:uage)?-/, '') ||\n 'plaintext') as BundledLanguage;\n\n return (\n <Code\n {...rest}\n language={language}\n showHeader={true}\n isDarkMode={isDarkMode} // Ensure this variable is available in scope\n >\n {content}\n </Code>\n );\n },\n\n blockquote: ({ className, ...props }) => (\n <blockquote\n className={cn(\n 'mt-5 gap-3 border-card border-l-4 pl-5 text-neutral',\n className\n )}\n {...props}\n />\n ),\n ul: ({ className, ...props }) => (\n <ul\n className={cn('mt-5 flex list-disc flex-col gap-3 pl-5', className)}\n {...props}\n />\n ),\n ol: ({ className, ...props }) => (\n <ol\n className={cn('mt-5 flex list-decimal flex-col gap-3 pl-5', className)}\n {...props}\n />\n ),\n img: ({ className, ...props }) => (\n <img\n {...props}\n alt={props.alt ?? ''}\n loading=\"lazy\"\n className={cn('max-h-[80vh] max-w-full rounded-md', className)}\n src={`${props.src}?raw=true`}\n />\n ),\n a: (props) => (\n // @ts-expect-error - label is not required in LinkProps\n <Link\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n // locale={locale}\n {...props}\n color=\"neutral\"\n />\n ),\n pre: (props) => props.children,\n\n table: (props: ComponentProps<typeof Table>) => (\n <Table isRollable={true} {...props} />\n ),\n th: ({ className, ...props }) => (\n <th\n className={cn('border-neutral border-b bg-neutral/10 p-4', className)}\n {...props}\n />\n ),\n tr: ({ className, ...props }) => (\n <tr\n className={cn('hover:/10 hover:bg-neutral/10', className)}\n {...props}\n />\n ),\n td: ({ className, ...props }) => (\n <td\n className={cn('border-neutral-500/50 border-b p-4', className)}\n {...props}\n />\n ),\n hr: ({ className, ...props }) => (\n <hr className={cn('mx-6 mt-16 text-neutral', className)} {...props} />\n ),\n Tabs: (props: ComponentProps<typeof Tab>) => (\n <Tab\n {...props}\n className=\"rounded-xl border border-card\"\n headerClassName=\"sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto\"\n />\n ),\n Tab: Tab.Item,\n Columns: ({ className, ...props }: ComponentPropsWithoutRef<'div'>) => (\n <div className={cn('flex gap-4 max-md:flex-col', className)} {...props} />\n ),\n Column: ({ className, ...props }: ComponentPropsWithoutRef<'div'>) => (\n <div className={cn('flex-1', className)} {...props} />\n ),\n },\n});\n\n/**\n * MarkdownRenderer Component\n *\n * A comprehensive markdown renderer that transforms markdown text into rich,\n * interactive HTML with custom styling and Intlayer integration. Supports\n * code syntax highlighting, responsive tables, internationalized links,\n * and automatic frontmatter stripping.\n *\n * @component\n */\nexport const MarkdownRenderer: FC<MarkdownRendererProps> = ({\n children,\n isDarkMode,\n locale,\n forceBlock,\n preserveFrontmatter,\n tagfilter,\n components: componentsProp,\n wrapper,\n}) => {\n const markdownOptions = getIntlayerMarkdownOptions(isDarkMode ?? false);\n\n const markdownContent = renderMarkdown(children, {\n components: {\n ...markdownOptions.components,\n // Pass dynamic props to components\n code: ({ className, children, ...rest }: ComponentProps<'code'>) => {\n // Ensure children is a string (Markdown renderer might pass ReactNodes)\n const content = String(children ?? '').replace(/\\n$/, '');\n\n // Determine if it is inline code or a code block\n // Code blocks usually have a className like 'language-ts'\n const isBlock = !!className;\n\n if (!isBlock) {\n return (\n <strong className=\"rounded bg-card/60 box-decoration-clone px-1 py-0.5 font-mono text-sm\">\n {content}\n </strong>\n );\n }\n\n // Extract language from className (e.g., \"language-typescript\" -> \"typescript\")\n const language = (className?.replace(/lang(?:uage)?-/, '') ||\n 'plaintext') as BundledLanguage;\n\n return (\n <Code\n {...rest}\n language={language}\n showHeader={true}\n isDarkMode={isDarkMode} // Ensure this variable is available in scope\n >\n {content}\n </Code>\n );\n },\n\n a: (props) => (\n // @ts-expect-error - label is not required in LinkProps\n <Link\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n locale={locale}\n {...props}\n color=\"neutral\"\n />\n ),\n ...componentsProp,\n },\n wrapper: wrapper ?? markdownOptions.wrapper,\n forceBlock: forceBlock ?? markdownOptions.forceBlock,\n preserveFrontmatter:\n preserveFrontmatter ?? markdownOptions.preserveFrontmatter,\n tagfilter: tagfilter ?? markdownOptions.tagfilter,\n });\n\n return (\n <CodeProvider>\n <TabProvider>{markdownContent}</TabProvider>\n </CodeProvider>\n );\n};\n"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use client";import{useCallback as e,useEffect as t,useMemo as n,useState as r}from"react";const i=(i,a)=>{let[o,s]=r(()=>{if(a!==void 0){let e=typeof a==`function`?a():a;if(typeof window>`u`)return e;let t=localStorage?.getItem(i);if(t)try{return JSON.parse(t)}catch(e){console.error(e)}return e}});t(()=>{let e=localStorage?.getItem(i);if(e&&e!==`undefined`&&o===void 0)try{s(JSON.parse(e))}catch(e){console.error(e)}else a!==void 0&&o===void 0&&s(a)},[i,o]);let c=e(e=>{s(t=>{let n=typeof e==`function`?e(t):e;return n===`undefined`?t:(localStorage?.setItem(i,JSON.stringify(n)),n)})},[i,s]),l=e(()=>{let e=localStorage?.getItem(i);e&&s(JSON.parse(e))},[i,s]),u=e(()=>{localStorage?.removeItem(i),s(void 0)},[i]);return n(()=>[o,c,l,u],[o,c,l,u])};export{i as usePersistedStore};
1
+ "use client";import{useCallback as e,useEffect as t,useMemo as n,useState as r}from"react";const i=(i,a)=>{let[o,s]=r(()=>{if(a!==void 0){let e=typeof a==`function`?a():a;if(typeof window>`u`)return e;let t=localStorage?.getItem(i);if(t)try{return JSON.parse(t)}catch(e){console.error(e)}return e}});t(()=>{let e=localStorage?.getItem(i);if(e&&e!==`undefined`&&o===void 0)try{s(JSON.parse(e))}catch(e){console.error(e)}else a!==void 0&&o===void 0&&s(a)},[i,o]);let c=e(e=>{s(t=>{let n=typeof e==`function`?e(t):e;return n===void 0?t:(localStorage?.setItem(i,JSON.stringify(n)),n)})},[i,s]),l=e(()=>{let e=localStorage?.getItem(i);e&&s(JSON.parse(e))},[i,s]),u=e(()=>{localStorage?.removeItem(i),s(void 0)},[i]);return n(()=>[o,c,l,u],[o,c,l,u])};export{i as usePersistedStore};
2
2
  //# sourceMappingURL=usePersistedStore.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePersistedStore.mjs","names":[],"sources":["../../../src/hooks/usePersistedStore.ts"],"sourcesContent":["'use client';\n\nimport {\n type Dispatch,\n type SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nexport const usePersistedStore = <S>(\n key: string,\n initialState?: S | (() => S)\n): [S, Dispatch<SetStateAction<S>>, () => void, () => void] => {\n const [state, setState] = useState<S>(() => {\n // If you have an initial value on the client, send a message out immediately\n if (initialState !== undefined) {\n const result: S =\n typeof initialState === 'function'\n ? (initialState as () => S)()\n : initialState;\n\n if (typeof window === 'undefined') return result;\n\n const persistedState = localStorage?.getItem(key);\n\n if (persistedState) {\n try {\n return JSON.parse(persistedState);\n } catch (e) {\n console.error(e);\n }\n }\n\n return result;\n }\n\n return undefined as S;\n });\n\n useEffect(() => {\n const persistedState = localStorage?.getItem(key);\n\n if (\n persistedState &&\n persistedState !== 'undefined' &&\n state === undefined\n ) {\n try {\n setState(JSON.parse(persistedState));\n } catch (e) {\n console.error(e);\n }\n } else if (initialState !== undefined && state === undefined) {\n setState(initialState);\n }\n }, [key, state]);\n\n /**\n * Allows setting state either directly or via a functional update.\n * If passed a function, we merge/update based on the previous state.\n */\n const setStateWrapper: typeof setState = useCallback(\n (valueOrUpdater: SetStateAction<S>) => {\n setState((prev) => {\n const newValue: S =\n typeof valueOrUpdater === 'function'\n ? (valueOrUpdater as (prevVal: S) => S)(prev)\n : valueOrUpdater;\n\n if (newValue !== 'undefined') {\n localStorage?.setItem(key, JSON.stringify(newValue));\n return newValue;\n }\n\n return prev;\n });\n },\n [key, setState]\n );\n\n const loadState = useCallback(() => {\n const savedState = localStorage?.getItem(key);\n if (savedState) {\n setState(JSON.parse(savedState));\n }\n }, [key, setState]);\n\n const clearState = useCallback(() => {\n localStorage?.removeItem(key);\n setState(undefined as S);\n }, [key]);\n\n return useMemo(\n () => [state, setStateWrapper, loadState, clearState],\n [state, setStateWrapper, loadState, clearState]\n );\n};\n"],"mappings":"2FAWA,MAAa,GACX,EACA,IAC6D,CAC7D,GAAM,CAAC,EAAO,GAAY,MAAkB,CAE1C,GAAI,IAAiB,IAAA,GAAW,CAC9B,IAAM,EACJ,OAAO,GAAiB,WACnB,GAA0B,CAC3B,EAEN,GAAI,OAAO,OAAW,IAAa,OAAO,EAE1C,IAAM,EAAiB,cAAc,QAAQ,EAAI,CAEjD,GAAI,EACF,GAAI,CACF,OAAO,KAAK,MAAM,EAAe,OAC1B,EAAG,CACV,QAAQ,MAAM,EAAE,CAIpB,OAAO,IAIT,CAEF,MAAgB,CACd,IAAM,EAAiB,cAAc,QAAQ,EAAI,CAEjD,GACE,GACA,IAAmB,aACnB,IAAU,IAAA,GAEV,GAAI,CACF,EAAS,KAAK,MAAM,EAAe,CAAC,OAC7B,EAAG,CACV,QAAQ,MAAM,EAAE,MAET,IAAiB,IAAA,IAAa,IAAU,IAAA,IACjD,EAAS,EAAa,EAEvB,CAAC,EAAK,EAAM,CAAC,CAMhB,IAAM,EAAmC,EACtC,GAAsC,CACrC,EAAU,GAAS,CACjB,IAAM,EACJ,OAAO,GAAmB,WACrB,EAAqC,EAAK,CAC3C,EAON,OALI,IAAa,YAKV,GAJL,cAAc,QAAQ,EAAK,KAAK,UAAU,EAAS,CAAC,CAC7C,IAIT,EAEJ,CAAC,EAAK,EAAS,CAChB,CAEK,EAAY,MAAkB,CAClC,IAAM,EAAa,cAAc,QAAQ,EAAI,CACzC,GACF,EAAS,KAAK,MAAM,EAAW,CAAC,EAEjC,CAAC,EAAK,EAAS,CAAC,CAEb,EAAa,MAAkB,CACnC,cAAc,WAAW,EAAI,CAC7B,EAAS,IAAA,GAAe,EACvB,CAAC,EAAI,CAAC,CAET,OAAO,MACC,CAAC,EAAO,EAAiB,EAAW,EAAW,CACrD,CAAC,EAAO,EAAiB,EAAW,EAAW,CAChD"}
1
+ {"version":3,"file":"usePersistedStore.mjs","names":[],"sources":["../../../src/hooks/usePersistedStore.ts"],"sourcesContent":["'use client';\n\nimport {\n type Dispatch,\n type SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nexport const usePersistedStore = <S>(\n key: string,\n initialState?: S | (() => S)\n): [S, Dispatch<SetStateAction<S>>, () => void, () => void] => {\n const [state, setState] = useState<S>(() => {\n // If you have an initial value on the client, send a message out immediately\n if (initialState !== undefined) {\n const result: S =\n typeof initialState === 'function'\n ? (initialState as () => S)()\n : initialState;\n\n if (typeof window === 'undefined') return result;\n\n const persistedState = localStorage?.getItem(key);\n\n if (persistedState) {\n try {\n return JSON.parse(persistedState);\n } catch (e) {\n console.error(e);\n }\n }\n\n return result;\n }\n\n return undefined as S;\n });\n\n useEffect(() => {\n const persistedState = localStorage?.getItem(key);\n\n if (\n persistedState &&\n persistedState !== 'undefined' &&\n state === undefined\n ) {\n try {\n setState(JSON.parse(persistedState));\n } catch (e) {\n console.error(e);\n }\n } else if (initialState !== undefined && state === undefined) {\n setState(initialState);\n }\n }, [key, state]);\n\n /**\n * Allows setting state either directly or via a functional update.\n * If passed a function, we merge/update based on the previous state.\n */\n const setStateWrapper: typeof setState = useCallback(\n (valueOrUpdater: SetStateAction<S>) => {\n setState((prev) => {\n const newValue: S =\n typeof valueOrUpdater === 'function'\n ? (valueOrUpdater as (prevVal: S) => S)(prev)\n : valueOrUpdater;\n\n if (typeof newValue !== 'undefined') {\n localStorage?.setItem(key, JSON.stringify(newValue));\n return newValue;\n }\n\n return prev;\n });\n },\n [key, setState]\n );\n\n const loadState = useCallback(() => {\n const savedState = localStorage?.getItem(key);\n if (savedState) {\n setState(JSON.parse(savedState));\n }\n }, [key, setState]);\n\n const clearState = useCallback(() => {\n localStorage?.removeItem(key);\n setState(undefined as S);\n }, [key]);\n\n return useMemo(\n () => [state, setStateWrapper, loadState, clearState],\n [state, setStateWrapper, loadState, clearState]\n );\n};\n"],"mappings":"2FAWA,MAAa,GACX,EACA,IAC6D,CAC7D,GAAM,CAAC,EAAO,GAAY,MAAkB,CAE1C,GAAI,IAAiB,IAAA,GAAW,CAC9B,IAAM,EACJ,OAAO,GAAiB,WACnB,GAA0B,CAC3B,EAEN,GAAI,OAAO,OAAW,IAAa,OAAO,EAE1C,IAAM,EAAiB,cAAc,QAAQ,EAAI,CAEjD,GAAI,EACF,GAAI,CACF,OAAO,KAAK,MAAM,EAAe,OAC1B,EAAG,CACV,QAAQ,MAAM,EAAE,CAIpB,OAAO,IAIT,CAEF,MAAgB,CACd,IAAM,EAAiB,cAAc,QAAQ,EAAI,CAEjD,GACE,GACA,IAAmB,aACnB,IAAU,IAAA,GAEV,GAAI,CACF,EAAS,KAAK,MAAM,EAAe,CAAC,OAC7B,EAAG,CACV,QAAQ,MAAM,EAAE,MAET,IAAiB,IAAA,IAAa,IAAU,IAAA,IACjD,EAAS,EAAa,EAEvB,CAAC,EAAK,EAAM,CAAC,CAMhB,IAAM,EAAmC,EACtC,GAAsC,CACrC,EAAU,GAAS,CACjB,IAAM,EACJ,OAAO,GAAmB,WACrB,EAAqC,EAAK,CAC3C,EAON,OALW,IAAa,OAKjB,GAJL,cAAc,QAAQ,EAAK,KAAK,UAAU,EAAS,CAAC,CAC7C,IAIT,EAEJ,CAAC,EAAK,EAAS,CAChB,CAEK,EAAY,MAAkB,CAClC,IAAM,EAAa,cAAc,QAAQ,EAAI,CACzC,GACF,EAAS,KAAK,MAAM,EAAW,CAAC,EAEjC,CAAC,EAAK,EAAS,CAAC,CAEb,EAAa,MAAkB,CACnC,cAAc,WAAW,EAAI,CAC7B,EAAS,IAAA,GAAe,EACvB,CAAC,EAAI,CAAC,CAET,OAAO,MACC,CAAC,EAAO,EAAiB,EAAW,EAAW,CACrD,CAAC,EAAO,EAAiB,EAAW,EAAW,CAChD"}
@@ -24,7 +24,7 @@ declare const breadCrumbContent: {
24
24
  vi: string;
25
25
  uk: string;
26
26
  }, {
27
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
27
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
28
28
  } & {
29
29
  translation: {
30
30
  en: string;
@@ -24,7 +24,7 @@ declare const browserContent: {
24
24
  vi: string;
25
25
  uk: string;
26
26
  }, {
27
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
27
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
28
28
  } & {
29
29
  translation: {
30
30
  en: string;
@@ -67,7 +67,7 @@ declare const browserContent: {
67
67
  vi: string;
68
68
  uk: string;
69
69
  }, {
70
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
70
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
71
71
  } & {
72
72
  translation: {
73
73
  en: string;
@@ -111,7 +111,7 @@ declare const browserContent: {
111
111
  vi: string;
112
112
  uk: string;
113
113
  }, {
114
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
114
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
115
115
  } & {
116
116
  translation: {
117
117
  en: string;
@@ -154,7 +154,7 @@ declare const browserContent: {
154
154
  vi: string;
155
155
  uk: string;
156
156
  }, {
157
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
157
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
158
158
  } & {
159
159
  translation: {
160
160
  en: string;
@@ -197,7 +197,7 @@ declare const browserContent: {
197
197
  vi: string;
198
198
  uk: string;
199
199
  }, {
200
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
200
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
201
201
  } & {
202
202
  translation: {
203
203
  en: string;
@@ -240,7 +240,7 @@ declare const browserContent: {
240
240
  vi: string;
241
241
  uk: string;
242
242
  }, {
243
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
243
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
244
244
  } & {
245
245
  translation: {
246
246
  en: string;
@@ -283,7 +283,7 @@ declare const browserContent: {
283
283
  vi: string;
284
284
  uk: string;
285
285
  }, {
286
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
286
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
287
287
  } & {
288
288
  translation: {
289
289
  en: string;
@@ -326,7 +326,7 @@ declare const browserContent: {
326
326
  vi: string;
327
327
  uk: string;
328
328
  }, {
329
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
329
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
330
330
  } & {
331
331
  translation: {
332
332
  en: string;
@@ -60,10 +60,10 @@ declare enum ButtonTextAlign {
60
60
  * Enhanced button variants with improved accessibility and focus states
61
61
  */
62
62
  declare const buttonVariants: (props?: {
63
- size?: "lg" | "md" | "sm" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
64
- color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "card" | "light" | "dark" | "current" | "text-inverse" | "error" | "success" | "custom";
65
- roundedSize?: "lg" | "none" | "md" | "sm" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full";
66
- variant?: "none" | "default" | "outline" | "link" | "invisible-link" | "hoverable" | "fade" | "input";
63
+ size?: "md" | "lg" | "sm" | "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?: "md" | "lg" | "none" | "sm" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full";
66
+ variant?: "default" | "none" | "input" | "outline" | "link" | "invisible-link" | "hoverable" | "fade";
67
67
  textAlign?: "left" | "center" | "right";
68
68
  isFullWidth?: boolean;
69
69
  } & class_variance_authority_types0.ClassProp) => string;
@@ -25,7 +25,7 @@ declare const carouselContent: {
25
25
  vi: string;
26
26
  zh: string;
27
27
  }, {
28
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
28
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
29
29
  } & {
30
30
  translation: {
31
31
  ar: string;
@@ -68,7 +68,7 @@ declare const carouselContent: {
68
68
  vi: string;
69
69
  uk: string;
70
70
  }, {
71
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
71
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
72
72
  } & {
73
73
  translation: {
74
74
  en: string;
@@ -111,7 +111,7 @@ declare const carouselContent: {
111
111
  vi: string;
112
112
  uk: string;
113
113
  }, {
114
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
114
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
115
115
  } & {
116
116
  translation: {
117
117
  en: string;
@@ -5,8 +5,8 @@ import { VariantProps } from "class-variance-authority";
5
5
  //#region src/components/CollapsibleTable/CollapsibleTable.d.ts
6
6
  declare const collapsibleTableVariants: (props?: {
7
7
  size?: "sm" | "md" | "lg" | "xl" | "full";
8
- variant?: "dark" | "default" | "ghost" | "outlined";
9
- spacing?: "none" | "sm" | "md" | "lg" | "auto";
8
+ variant?: "default" | "dark" | "ghost" | "outlined";
9
+ spacing?: "sm" | "md" | "lg" | "none" | "auto";
10
10
  } & class_variance_authority_types0.ClassProp) => string;
11
11
  interface CollapsibleTableProps extends Omit<HTMLAttributes<HTMLElement>, 'title'>, VariantProps<typeof collapsibleTableVariants> {
12
12
  /** Table title displayed in the header */
@@ -29,7 +29,7 @@ declare const Command: {
29
29
  ref?: React.Ref<HTMLInputElement>;
30
30
  } & {
31
31
  asChild?: boolean;
32
- }, "key" | keyof react.InputHTMLAttributes<HTMLInputElement> | "asChild">, "type" | "value" | "onChange"> & {
32
+ }, "key" | "asChild" | keyof react.InputHTMLAttributes<HTMLInputElement>>, "value" | "onChange" | "type"> & {
33
33
  value?: string;
34
34
  onValueChange?: (search: string) => void;
35
35
  } & react.RefAttributes<HTMLInputElement>>;
@@ -8,14 +8,14 @@ import { VariantProps } from "class-variance-authority";
8
8
  * Provides flexible styling options for background, padding, borders, and layout
9
9
  */
10
10
  declare const containerVariants: (props?: {
11
- roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "full";
12
- transparency?: "none" | "sm" | "md" | "lg" | "xl" | "full" | "xs";
13
- padding?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
11
+ roundedSize?: "sm" | "md" | "lg" | "xl" | "full" | "none" | "2xl" | "3xl" | "4xl";
12
+ transparency?: "sm" | "md" | "lg" | "xl" | "full" | "none" | "xs";
13
+ padding?: "sm" | "md" | "lg" | "xl" | "none" | "2xl";
14
14
  separator?: "without" | "x" | "y" | "both";
15
- border?: "none" | "with";
15
+ border?: "with" | "none";
16
16
  borderColor?: "primary" | "secondary" | "neutral" | "card" | "text" | "error" | "warning" | "success";
17
- background?: "none" | "with" | "hoverable";
18
- gap?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
17
+ background?: "with" | "none" | "hoverable";
18
+ gap?: "sm" | "md" | "lg" | "xl" | "none" | "2xl";
19
19
  } & class_variance_authority_types0.ClassProp) => string;
20
20
  /** Available rounded corner sizes for the container */
21
21
  declare enum ContainerRoundedSize {
@@ -24,7 +24,7 @@ declare const copyContentContent: {
24
24
  vi: string;
25
25
  uk: string;
26
26
  }, {
27
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
27
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
28
28
  } & {
29
29
  translation: {
30
30
  en: string;
@@ -25,7 +25,7 @@ declare const dictionaryFormContent: {
25
25
  vi: string;
26
26
  uk: string;
27
27
  }, {
28
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
28
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
29
29
  } & {
30
30
  translation: {
31
31
  en: string;
@@ -68,7 +68,7 @@ declare const dictionaryFormContent: {
68
68
  vi: string;
69
69
  uk: string;
70
70
  }, {
71
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
71
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
72
72
  } & {
73
73
  translation: {
74
74
  en: string;
@@ -113,7 +113,7 @@ declare const dictionaryFormContent: {
113
113
  vi: string;
114
114
  uk: string;
115
115
  }, {
116
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
116
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
117
117
  } & {
118
118
  translation: {
119
119
  en: string;
@@ -156,7 +156,7 @@ declare const dictionaryFormContent: {
156
156
  vi: string;
157
157
  uk: string;
158
158
  }, {
159
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
159
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
160
160
  } & {
161
161
  translation: {
162
162
  en: string;
@@ -201,7 +201,7 @@ declare const dictionaryFormContent: {
201
201
  vi: string;
202
202
  uk: string;
203
203
  }, {
204
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
204
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
205
205
  } & {
206
206
  translation: {
207
207
  en: string;
@@ -244,7 +244,7 @@ declare const dictionaryFormContent: {
244
244
  vi: string;
245
245
  uk: string;
246
246
  }, {
247
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
247
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
248
248
  } & {
249
249
  translation: {
250
250
  en: string;
@@ -288,7 +288,7 @@ declare const dictionaryFormContent: {
288
288
  vi: string;
289
289
  uk: string;
290
290
  }, {
291
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
291
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
292
292
  } & {
293
293
  translation: {
294
294
  en: string;
@@ -331,7 +331,7 @@ declare const dictionaryFormContent: {
331
331
  vi: string;
332
332
  uk: string;
333
333
  }, {
334
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
334
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
335
335
  } & {
336
336
  translation: {
337
337
  en: string;
@@ -375,7 +375,7 @@ declare const dictionaryFormContent: {
375
375
  vi: string;
376
376
  uk: string;
377
377
  }, {
378
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
378
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
379
379
  } & {
380
380
  translation: {
381
381
  en: string;
@@ -418,7 +418,7 @@ declare const dictionaryFormContent: {
418
418
  vi: string;
419
419
  uk: string;
420
420
  }, {
421
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
421
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
422
422
  } & {
423
423
  translation: {
424
424
  en: string;
@@ -463,7 +463,7 @@ declare const dictionaryFormContent: {
463
463
  vi: string;
464
464
  uk: string;
465
465
  }, {
466
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
466
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
467
467
  } & {
468
468
  translation: {
469
469
  en: string;
@@ -506,7 +506,7 @@ declare const dictionaryFormContent: {
506
506
  vi: string;
507
507
  uk: string;
508
508
  }, {
509
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
509
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
510
510
  } & {
511
511
  translation: {
512
512
  en: string;
@@ -24,7 +24,7 @@ declare const dictionaryFormSchemaContent: {
24
24
  vi: string;
25
25
  uk: string;
26
26
  }, {
27
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
27
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
28
28
  } & {
29
29
  translation: {
30
30
  en: string;
@@ -67,7 +67,7 @@ declare const dictionaryFormSchemaContent: {
67
67
  vi: string;
68
68
  uk: string;
69
69
  }, {
70
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
70
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
71
71
  } & {
72
72
  translation: {
73
73
  en: string;
@@ -110,7 +110,7 @@ declare const dictionaryFormSchemaContent: {
110
110
  vi: string;
111
111
  uk: string;
112
112
  }, {
113
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
113
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
114
114
  } & {
115
115
  translation: {
116
116
  en: string;
@@ -153,7 +153,7 @@ declare const dictionaryFormSchemaContent: {
153
153
  vi: string;
154
154
  uk: string;
155
155
  }, {
156
- nodeType: "translation" | _intlayer_types0.NodeType.Translation;
156
+ nodeType: _intlayer_types0.NodeType.Translation | "translation";
157
157
  } & {
158
158
  translation: {
159
159
  en: string;