@intlayer/design-system 8.1.3 → 8.1.5

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.
@@ -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"}
@@ -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" | "sm" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
64
+ color?: "primary" | "success" | "error" | "neutral" | "text" | "secondary" | "destructive" | "light" | "dark" | "text-inverse" | "custom" | "card" | "current";
65
+ roundedSize?: "md" | "none" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "full" | "4xl" | "5xl";
66
+ variant?: "default" | "none" | "invisible-link" | "hoverable" | "input" | "outline" | "link" | "fade";
67
67
  textAlign?: "left" | "center" | "right";
68
68
  isFullWidth?: boolean;
69
69
  } & class_variance_authority_types0.ClassProp) => 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" | "ghost" | "dark" | "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" | keyof react.InputHTMLAttributes<HTMLInputElement> | "asChild">, "type" | "onChange" | "value"> & {
33
33
  value?: string;
34
34
  onValueChange?: (search: string) => void;
35
35
  } & react.RefAttributes<HTMLInputElement>>;
@@ -73,7 +73,7 @@ declare const Command: {
73
73
  ref?: React.Ref<HTMLDivElement>;
74
74
  } & {
75
75
  asChild?: boolean;
76
- }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild">, "disabled" | "value" | "onSelect"> & {
76
+ }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
77
77
  disabled?: boolean;
78
78
  onSelect?: (value: string) => void;
79
79
  value?: string;
@@ -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";
14
- separator?: "without" | "x" | "y" | "both";
11
+ roundedSize?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | "full" | "4xl";
12
+ transparency?: "sm" | "md" | "lg" | "none" | "xl" | "full" | "xs";
13
+ padding?: "sm" | "md" | "lg" | "none" | "xl" | "2xl";
14
+ separator?: "both" | "without" | "x" | "y";
15
15
  border?: "none" | "with";
16
- borderColor?: "primary" | "secondary" | "neutral" | "card" | "text" | "error" | "warning" | "success";
17
- background?: "none" | "with" | "hoverable";
18
- gap?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
16
+ borderColor?: "text" | "primary" | "secondary" | "neutral" | "success" | "error" | "warning" | "card";
17
+ background?: "hoverable" | "none" | "with";
18
+ gap?: "sm" | "md" | "lg" | "none" | "xl" | "2xl";
19
19
  } & class_variance_authority_types0.ClassProp) => string;
20
20
  /** Available rounded corner sizes for the container */
21
21
  declare enum ContainerRoundedSize {
@@ -5,11 +5,12 @@ import { VariantProps } from "class-variance-authority";
5
5
  //#region src/components/Input/Checkbox.d.ts
6
6
  declare const checkboxVariants: (props?: {
7
7
  variant?: "default";
8
- size?: "sm" | "md" | "lg";
9
- color?: "primary" | "secondary" | "neutral" | "text" | "error" | "success" | "destructive" | "light" | "dark" | "custom";
8
+ size?: "sm" | "md" | "lg" | "xs";
9
+ color?: "text" | "primary" | "secondary" | "neutral" | "destructive" | "light" | "dark" | "success" | "error" | "custom";
10
10
  validationStyleEnabled?: "disabled" | "enabled";
11
11
  } & class_variance_authority_types0.ClassProp) => string;
12
12
  declare enum CheckboxSize {
13
+ XS = "xs",
13
14
  SM = "sm",
14
15
  MD = "md",
15
16
  LG = "lg"
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","names":[],"sources":["../../../../src/components/Input/Checkbox.tsx"],"mappings":";;;;;cASa,gBAAA,GAAgB,KAAA;;;;;IA6D5B,+BAAA,CAAA,SAAA;AAAA,aAEW,YAAA;EACV,EAAA;EACA,EAAA;EACA,EAAA;AAAA;AAAA,aAGU,aAAA;EACV,OAAA;EACA,SAAA;EACA,WAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;EACA,IAAA;EACA,KAAA;EACA,OAAA;EACA,MAAA;AAAA;AAAA,KAGU,aAAA,GAAgB,IAAA,CAC1B,iBAAA,CAAkB,mBAAA,CAAoB,gBAAA,GAAmB,gBAAA;EAGzD,IAAA;EACA,sBAAA;EACA,KAAA,GAAQ,SAAA;AAAA,IACN,IAAA,CACA,YAAA,QAAoB,gBAAA;EAGpB,IAAA,GAAO,YAAA,MAAkB,YAAA;EACzB,KAAA,GAAQ,aAAA,MAAmB,aAAA;EAC3B,cAAA;AAAA;AAAA,cA6BS,QAAA,EAAU,EAAA,CAAG,aAAA"}
1
+ {"version":3,"file":"Checkbox.d.ts","names":[],"sources":["../../../../src/components/Input/Checkbox.tsx"],"mappings":";;;;;cASa,gBAAA,GAAgB,KAAA;;;;;IA0D5B,+BAAA,CAAA,SAAA;AAAA,aAEW,YAAA;EACV,EAAA;EACA,EAAA;EACA,EAAA;EACA,EAAA;AAAA;AAAA,aAGU,aAAA;EACV,OAAA;EACA,SAAA;EACA,WAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;EACA,IAAA;EACA,KAAA;EACA,OAAA;EACA,MAAA;AAAA;AAAA,KAGU,aAAA,GAAgB,IAAA,CAC1B,iBAAA,CAAkB,mBAAA,CAAoB,gBAAA,GAAmB,gBAAA;EAGzD,IAAA;EACA,sBAAA;EACA,KAAA,GAAQ,SAAA;AAAA,IACN,IAAA,CACA,YAAA,QAAoB,gBAAA;EAGpB,IAAA,GAAO,YAAA,MAAkB,YAAA;EACzB,KAAA,GAAQ,aAAA,MAAmB,aAAA;EAC3B,cAAA;AAAA;AAAA,cA6BS,QAAA,EAAU,EAAA,CAAG,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/LanguageBackground/index.tsx"],"mappings":";;;cAgFa,eAAA,EAAiB,EAAA,CAAG,cAAA,CAAe,WAAA;AAAA,cA6BnC,kBAAA,EAAoB,EAAA,CAAG,iBAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/LanguageBackground/index.tsx"],"mappings":";;;cAiFa,eAAA,EAAiB,EAAA,CAAG,cAAA,CAAe,WAAA;AAAA,cA6BnC,kBAAA,EAAoB,EAAA,CAAG,iBAAA"}
@@ -53,10 +53,10 @@ declare enum LinkUnderlined {
53
53
  FALSE = "false"
54
54
  }
55
55
  declare const linkVariants: (props?: {
56
- variant?: "default" | "invisible-link" | "hoverable" | "button" | "button-outlined";
57
- roundedSize?: "lg" | "none" | "md" | "sm" | "xl" | "2xl" | "3xl" | "full";
58
- color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text-inverse" | "error" | "success" | "custom";
59
- size?: "lg" | "md" | "sm" | "xl" | "custom";
56
+ variant?: "default" | "invisible-link" | "button" | "button-outlined" | "hoverable";
57
+ roundedSize?: "md" | "none" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "full";
58
+ color?: "primary" | "success" | "error" | "neutral" | "text" | "secondary" | "destructive" | "light" | "dark" | "text-inverse" | "custom";
59
+ size?: "md" | "sm" | "lg" | "xl" | "custom";
60
60
  underlined?: boolean | LinkUnderlined.DEFAULT;
61
61
  } & class_variance_authority_types0.ClassProp) => string;
62
62
  type LinkProps = DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & VariantProps<typeof linkVariants> & {
@@ -1 +1 @@
1
- {"version":3,"file":"MarkDownRender.d.ts","names":[],"sources":["../../../../src/components/MarkDownRender/MarkDownRender.tsx"],"mappings":";;;;;KAiBK,qBAAA;EACH,QAAA;EACA,UAAA;EACA,MAAA,GAAS,aAAA;EACT,UAAA;EACA,mBAAA;EACA,SAAA;EACA,UAAA,GAAa,cAAA,QAAsB,kBAAA;EACnC,OAAA,GAAU,cAAA,QAAsB,kBAAA;AAAA;AAAA,cAGrB,0BAAA,GACX,UAAA,cACG,mBAAA;;;;;;;;;;;cAwIQ,gBAAA,EAAkB,EAAA,CAAG,qBAAA"}
1
+ {"version":3,"file":"MarkDownRender.d.ts","names":[],"sources":["../../../../src/components/MarkDownRender/MarkDownRender.tsx"],"mappings":";;;;;KAiBK,qBAAA;EACH,QAAA;EACA,UAAA;EACA,MAAA,GAAS,aAAA;EACT,UAAA;EACA,mBAAA;EACA,SAAA;EACA,UAAA,GAAa,cAAA,QAAsB,kBAAA;EACnC,OAAA,GAAU,cAAA,QAAsB,kBAAA;AAAA;AAAA,cAGrB,0BAAA,GACX,UAAA,cACG,mBAAA;;;;;;;;;;;cAsIQ,gBAAA,EAAkB,EAAA,CAAG,qBAAA"}
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
5
5
  //#region src/components/Pagination/Pagination.d.ts
6
6
  declare const paginationVariants: (props?: {
7
7
  size?: "sm" | "md" | "lg";
8
- color?: "primary" | "secondary" | "neutral" | "text" | "destructive";
8
+ color?: "text" | "primary" | "secondary" | "neutral" | "destructive";
9
9
  variant?: "default" | "bordered" | "ghost";
10
10
  } & class_variance_authority_types0.ClassProp) => string;
11
11
  declare enum PaginationSize {
@@ -28,7 +28,7 @@ declare enum SwitchSelectorColor {
28
28
  TEXT = "text"
29
29
  }
30
30
  declare const switchSelectorVariant: (props?: {
31
- color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
31
+ color?: "primary" | "neutral" | "text" | "secondary" | "destructive" | "light" | "dark";
32
32
  disabled?: boolean;
33
33
  } & class_variance_authority_types0.ClassProp) => string;
34
34
  declare enum SwitchSelectorSize {
@@ -37,7 +37,7 @@ declare enum SwitchSelectorSize {
37
37
  LG = "lg"
38
38
  }
39
39
  declare const choiceVariant: (props?: {
40
- size?: "lg" | "md" | "sm";
40
+ size?: "md" | "sm" | "lg";
41
41
  } & class_variance_authority_types0.ClassProp) => string;
42
42
  /**
43
43
  *
@@ -5,7 +5,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/Tab/Tab.d.ts
7
7
  declare const tabContainerVariant: (props?: {
8
- background?: "without" | "with";
8
+ background?: "with" | "without";
9
9
  variant?: "default" | "bordered" | "ghost";
10
10
  } & class_variance_authority_types0.ClassProp) => string;
11
11
  type TabProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof tabContainerVariant> & {
@@ -15,7 +15,7 @@ declare enum TabSelectorColor {
15
15
  TEXT = "text"
16
16
  }
17
17
  declare const tabSelectorVariant: (props?: {
18
- color?: "primary" | "secondary" | "neutral" | "text" | "destructive" | "light" | "dark";
18
+ color?: "text" | "primary" | "secondary" | "neutral" | "destructive" | "light" | "dark";
19
19
  } & class_variance_authority_types0.ClassProp) => string;
20
20
  type TabSelectorItemProps = HTMLAttributes<HTMLElement> & {
21
21
  key: string | number;
@@ -185,9 +185,9 @@ declare enum TagBackground {
185
185
  WITH = "with"
186
186
  }
187
187
  declare const containerVariants: (props?: {
188
- roundedSize?: "lg" | "none" | "md" | "sm" | "xl" | "2xl" | "3xl" | "full";
189
- color?: "text" | "primary" | "neutral" | "error" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
190
- size?: "lg" | "md" | "sm" | "xl" | "xs";
188
+ roundedSize?: "md" | "none" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "full";
189
+ color?: "primary" | "success" | "error" | "warning" | "neutral" | "text" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
190
+ size?: "md" | "sm" | "lg" | "xl" | "xs";
191
191
  border?: "none" | "with";
192
192
  background?: "none" | "with";
193
193
  } & class_variance_authority_types0.ClassProp) => string;
@@ -25,7 +25,7 @@ declare const ToastViewport: FC<ComponentProps<typeof ToastPrimitives.Viewport>>
25
25
  * ```
26
26
  */
27
27
  declare const toastVariants: (props?: {
28
- variant?: "error" | "success" | "default";
28
+ variant?: "default" | "success" | "error";
29
29
  } & class_variance_authority_types0.ClassProp) => string;
30
30
  /**
31
31
  * Toast Component
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "8.1.3",
3
+ "version": "8.1.5",
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": [
@@ -105,12 +105,12 @@
105
105
  "dependencies": {
106
106
  "@better-auth/passkey": "1.4.18",
107
107
  "@better-auth/sso": "1.4.18",
108
- "@intlayer/api": "8.1.3",
109
- "@intlayer/config": "8.1.3",
110
- "@intlayer/core": "8.1.3",
111
- "@intlayer/dictionaries-entry": "8.1.3",
112
- "@intlayer/editor-react": "8.1.3",
113
- "@intlayer/types": "8.1.3",
108
+ "@intlayer/api": "8.1.5",
109
+ "@intlayer/config": "8.1.4",
110
+ "@intlayer/core": "8.1.4",
111
+ "@intlayer/dictionaries-entry": "8.1.5",
112
+ "@intlayer/editor-react": "8.1.5",
113
+ "@intlayer/types": "8.1.4",
114
114
  "@radix-ui/react-dialog": "1.1.15",
115
115
  "@radix-ui/react-select": "2.2.6",
116
116
  "@radix-ui/react-slot": "1.2.4",
@@ -119,12 +119,12 @@
119
119
  "bun": "1.3.2",
120
120
  "class-variance-authority": "0.7.1",
121
121
  "cmdk": "1.1.1",
122
- "react-intlayer": "8.1.3",
122
+ "react-intlayer": "8.1.4",
123
123
  "rollup-preserve-directives": "1.1.3",
124
124
  "zod": "4.3.6"
125
125
  },
126
126
  "devDependencies": {
127
- "@intlayer/backend": "8.1.3",
127
+ "@intlayer/backend": "8.1.4",
128
128
  "@shikijs/transformers": "3.22.0",
129
129
  "@storybook/addon-a11y": "8.6.14",
130
130
  "@storybook/addon-essentials": "8.6.14",
@@ -142,26 +142,26 @@
142
142
  "@svgr/core": "8.1.0",
143
143
  "@svgr/rollup": "8.1.0",
144
144
  "@tailwindcss/aspect-ratio": "0.4.2",
145
- "@tailwindcss/cli": "4.1.18",
146
- "@tailwindcss/vite": "4.1.18",
145
+ "@tailwindcss/cli": "4.2.0",
146
+ "@tailwindcss/vite": "4.2.0",
147
147
  "@testing-library/jest-dom": "6.9.1",
148
- "@testing-library/react": "16.3.1",
148
+ "@testing-library/react": "16.3.2",
149
149
  "@testing-library/user-event": "14.6.1",
150
- "@types/espree": "10.1.0",
151
- "@types/node": "25.2.3",
150
+ "@types/espree": "11.1.0",
151
+ "@types/node": "25.3.0",
152
152
  "@types/react": "19.2.14",
153
153
  "@types/react-dom": "19.2.3",
154
154
  "@utils/ts-config": "1.0.4",
155
155
  "@utils/ts-config-types": "1.0.4",
156
156
  "fast-glob": "3.3.3",
157
- "intlayer": "8.1.3",
157
+ "intlayer": "8.1.4",
158
158
  "rimraf": "6.1.3",
159
159
  "shiki": "3.22.0",
160
- "storybook": "8.6.14",
160
+ "storybook": "8.6.17",
161
161
  "tsdown": "0.20.3",
162
162
  "typescript": "5.9.3",
163
163
  "vite": "7.3.1",
164
- "vite-intlayer": "8.1.3",
164
+ "vite-intlayer": "8.1.4",
165
165
  "vite-plugin-dts": "4.5.4",
166
166
  "vite-tsconfig-paths": "6.1.1",
167
167
  "vitest": "4.0.18"
@@ -169,23 +169,23 @@
169
169
  "peerDependencies": {
170
170
  "@better-fetch/fetch": "1.1.21",
171
171
  "@hookform/resolvers": "5.2.2",
172
- "@intlayer/backend": "8.1.3",
172
+ "@intlayer/backend": "8.1.4",
173
173
  "@monaco-editor/react": "4.7.0",
174
174
  "@shikijs/transformers": "3.22.0",
175
175
  "@tanstack/react-query": "5.90.21",
176
176
  "@tanstack/react-query-devtools": "5.91.3",
177
177
  "clsx": "2.1.1",
178
- "framer-motion": "12.34.0",
178
+ "framer-motion": "12.34.3",
179
179
  "fuse.js": "7.1.0",
180
- "intlayer": "8.1.3",
181
- "lucide-react": "0.566.0",
180
+ "intlayer": "8.1.4",
181
+ "lucide-react": "0.575.0",
182
182
  "react": ">=16.0.0",
183
183
  "react-dom": ">=16.0.0",
184
- "react-hook-form": "7.71.1",
185
- "react-intlayer": "8.1.3",
184
+ "react-hook-form": "7.71.2",
185
+ "react-intlayer": "8.1.4",
186
186
  "shiki": "3.22.0",
187
- "tailwind-merge": "3.4.1",
188
- "tailwindcss": "4.1.18"
187
+ "tailwind-merge": "3.5.0",
188
+ "tailwindcss": "4.2.0"
189
189
  },
190
190
  "peerDependenciesMeta": {
191
191
  "@intlayer/backend": {