@intlayer/design-system 8.3.0-canary.4 → 8.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{ItemLayout as e}from"../ItemLayout.mjs";import{NodeWrapper as t,traceKeys as n}from"./index.mjs";import{camelCaseToSentence as r}from"@intlayer/config/client";import{memo as i,useMemo as a}from"react";import{jsx as o}from"react/jsx-runtime";import{NodeType as s}from"@intlayer/types/nodeType";import{isSameKeyPath as c}from"@intlayer/core/utils";const l=i(i=>{let{keyPath:l,section:u,focusedKeyPath:d=[],onFocusKeyPath:f}=i;return a(()=>Object.keys(u??{}).filter(e=>!n.includes(e)),[u]).map(n=>{let a={key:n,type:s.Object},p=[...l,a],m=c(p,d);return o(e,{level:l.length,title:r(n),description:``,isSelected:m,onClick:e=>{e.stopPropagation(),f(m?[]:p)},children:o(t,{...i,keyPath:p,section:u[n]})},n)})});export{l as NestedObjectWrapper};
1
+ import{ItemLayout as e}from"../ItemLayout.mjs";import{NodeWrapper as t,traceKeys as n}from"./index.mjs";import{memo as r,useMemo as i}from"react";import{jsx as a}from"react/jsx-runtime";import{camelCaseToSentence as o}from"@intlayer/config/client";import{NodeType as s}from"@intlayer/types/nodeType";import{isSameKeyPath as c}from"@intlayer/core/utils";const l=r(r=>{let{keyPath:l,section:u,focusedKeyPath:d=[],onFocusKeyPath:f}=r;return i(()=>Object.keys(u??{}).filter(e=>!n.includes(e)),[u]).map(n=>{let i={key:n,type:s.Object},p=[...l,i],m=c(p,d);return a(e,{level:l.length,title:o(n),description:``,isSelected:m,onClick:e=>{e.stopPropagation(),f(m?[]:p)},children:a(t,{...r,keyPath:p,section:u[n]})},n)})});export{l as NestedObjectWrapper};
2
2
  //# sourceMappingURL=NestedObjectWrapper.mjs.map
@@ -1,2 +1,2 @@
1
- import{Breadcrumb as e}from"../Breadcrumb/index.mjs";import{camelCaseToSentence as t}from"@intlayer/config/client";import{jsx as n}from"react/jsx-runtime";const r=({keyPath:r,dictionaryKey:i,onClickKeyPath:a,locale:o,color:s,showDictionaryKey:c=!0})=>n(e,{links:[...c?[{text:t(i),onClick:a?()=>a([]):void 0}]:[],...r.map((e,t)=>({onClick:a?()=>a?.(r.slice(0,t+1)):void 0,text:e.key?.toString()??``}))],locale:o,elementType:`location`,color:s});export{r as KeyPathBreadcrumb};
1
+ import{Breadcrumb as e}from"../Breadcrumb/index.mjs";import{jsx as t}from"react/jsx-runtime";import{camelCaseToSentence as n}from"@intlayer/config/client";const r=({keyPath:r,dictionaryKey:i,onClickKeyPath:a,locale:o,color:s,showDictionaryKey:c=!0})=>t(e,{links:[...c?[{text:n(i),onClick:a?()=>a([]):void 0}]:[],...r.map((e,t)=>({onClick:a?()=>a?.(r.slice(0,t+1)):void 0,text:e.key?.toString()??``}))],locale:o,elementType:`location`,color:s});export{r as KeyPathBreadcrumb};
2
2
  //# sourceMappingURL=KeyPathBreadcrumb.mjs.map
@@ -1,2 +1,2 @@
1
- import{Button as e,ButtonColor as t,ButtonTextAlign as n,ButtonVariant as r}from"../../Button/Button.mjs";import{Accordion as i}from"../../Accordion/Accordion.mjs";import{getIsEditableSection as a}from"../getIsEditableSection.mjs";import o from"@intlayer/config/built";import{camelCaseToSentence as s}from"@intlayer/config/client";import{ChevronRight as c,Plus as l}from"lucide-react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{useIntlayer as p}from"react-intlayer";import{useEditedContentActions as m,useEditorLocale as h,useFocusUnmergedDictionary as g}from"@intlayer/editor-react";import{getContentNodeByKeyPath as _,getEmptyNode as v,getNodeType as y}from"@intlayer/core/dictionaryManipulator";import{NodeType as b}from"@intlayer/types/nodeType";import{isSameKeyPath as x}from"@intlayer/core/utils";const S=[`filePath`,`id`,`nodeType`],C=({section:S,keyPath:w,dictionary:T})=>{let{locales:E}=o.internationalization,D=_(S,w,h()),{addEditedContent:O}=m(),{setFocusedContentKeyPath:k,focusedContent:A}=g(),{addNewElement:j,goToField:M}=p(`navigation-view`),N=y(D),P=e=>(A?.keyPath?.length??0)>0&&x(e,A?.keyPath??[]),F=a(D);return D?F?d(e,{label:M.label.value,variant:r.HOVERABLE,color:t.TEXT,className:`w-full`,onClick:()=>k(w),IconRight:c,children:s(w[w.length-1].key)}):typeof D==`object`?N===b.ReactNode?d(u,{children:`React Node`}):N===b.Translation?d(`div`,{className:`flex flex-col justify-between gap-2`,children:E.map(e=>d(C,{keyPath:[...w,{type:b.Translation,key:e}],section:S,dictionary:T},e))}):N===b.Enumeration||N===b.Condition?d(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(D[N]).map(e=>d(C,{keyPath:[...w,{type:N,key:e}],section:S,dictionary:T},e))}):N===b.Array?f(`div`,{className:`flex flex-col justify-between gap-2`,children:[D.map((n,o)=>{let s=[...w,{type:b.Array,key:o}];return a(n)?f(e,{label:`${M.label.value} ${o}`,variant:r.HOVERABLE,color:t.TEXT,className:`w-full`,onClick:()=>k(s),IconRight:c,isActive:P(s),children:[`Item `,o]},JSON.stringify(s)):d(i,{label:`${M.label.value} ${o}`,header:`Item ${o}`,isActive:P(s),onClick:()=>k(s),children:d(`div`,{className:`mt-2 flex w-full max-w-full`,children:d(`div`,{className:`flex-1 pl-10`,children:d(C,{keyPath:s,section:S,dictionary:T})})})},JSON.stringify(s))}),d(e,{label:j.label.value,variant:r.HOVERABLE,color:t.NEUTRAL,textAlign:n.LEFT,onClick:()=>{let e=[...w,{type:b.Array,key:D.length}],t=D,n=v(t[t.length-1])??``;O(T.localId,n,e,!1),k(e)},Icon:l,children:j.text})]}):typeof D.nodeType==`string`?d(C,{keyPath:[...w,{type:D.nodeType}],section:S,dictionary:T}):d(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(D).map(n=>{let o=[...w,{type:b.Object,key:n}];return a(_(S,o))?d(e,{label:`${M.label.value} ${n}`,isActive:P(o),variant:r.HOVERABLE,color:t.TEXT,className:`w-full`,onClick:()=>k(o),IconRight:c,children:s(n)},n):d(i,{label:`${M.label.value} ${n}`,isActive:P(o),onClick:()=>k(o),header:s(n),children:d(`div`,{className:`mt-2 flex w-full max-w-full`,children:d(`div`,{className:`flex-1 pl-10`,children:d(C,{keyPath:o,section:S,dictionary:T})})})},n)})}):f(u,{children:[`Error loading section --`,N,`--`,JSON.stringify(D),`--`,JSON.stringify(w)]}):d(u,{})};export{C as NavigationViewNode,S as traceKeys};
1
+ import{Button as e,ButtonColor as t,ButtonTextAlign as n,ButtonVariant as r}from"../../Button/Button.mjs";import{Accordion as i}from"../../Accordion/Accordion.mjs";import{getIsEditableSection as a}from"../getIsEditableSection.mjs";import{ChevronRight as o,Plus as s}from"lucide-react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import d from"@intlayer/config/built";import{camelCaseToSentence as f}from"@intlayer/config/client";import{useIntlayer as p}from"react-intlayer";import{useEditedContentActions as m,useEditorLocale as h,useFocusUnmergedDictionary as g}from"@intlayer/editor-react";import{getContentNodeByKeyPath as _,getEmptyNode as v,getNodeType as y}from"@intlayer/core/dictionaryManipulator";import{NodeType as b}from"@intlayer/types/nodeType";import{isSameKeyPath as x}from"@intlayer/core/utils";const S=[`filePath`,`id`,`nodeType`],C=({section:S,keyPath:w,dictionary:T})=>{let{locales:E}=d.internationalization,D=_(S,w,h()),{addEditedContent:O}=m(),{setFocusedContentKeyPath:k,focusedContent:A}=g(),{addNewElement:j,goToField:M}=p(`navigation-view`),N=y(D),P=e=>(A?.keyPath?.length??0)>0&&x(e,A?.keyPath??[]),F=a(D);return D?F?l(e,{label:M.label.value,variant:r.HOVERABLE,color:t.TEXT,className:`w-full`,onClick:()=>k(w),IconRight:o,children:f(w[w.length-1].key)}):typeof D==`object`?N===b.ReactNode?l(c,{children:`React Node`}):N===b.Translation?l(`div`,{className:`flex flex-col justify-between gap-2`,children:E.map(e=>l(C,{keyPath:[...w,{type:b.Translation,key:e}],section:S,dictionary:T},e))}):N===b.Enumeration||N===b.Condition?l(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(D[N]).map(e=>l(C,{keyPath:[...w,{type:N,key:e}],section:S,dictionary:T},e))}):N===b.Array?u(`div`,{className:`flex flex-col justify-between gap-2`,children:[D.map((n,s)=>{let c=[...w,{type:b.Array,key:s}];return a(n)?u(e,{label:`${M.label.value} ${s}`,variant:r.HOVERABLE,color:t.TEXT,className:`w-full`,onClick:()=>k(c),IconRight:o,isActive:P(c),children:[`Item `,s]},JSON.stringify(c)):l(i,{label:`${M.label.value} ${s}`,header:`Item ${s}`,isActive:P(c),onClick:()=>k(c),children:l(`div`,{className:`mt-2 flex w-full max-w-full`,children:l(`div`,{className:`flex-1 pl-10`,children:l(C,{keyPath:c,section:S,dictionary:T})})})},JSON.stringify(c))}),l(e,{label:j.label.value,variant:r.HOVERABLE,color:t.NEUTRAL,textAlign:n.LEFT,onClick:()=>{let e=[...w,{type:b.Array,key:D.length}],t=D,n=v(t[t.length-1])??``;O(T.localId,n,e,!1),k(e)},Icon:s,children:j.text})]}):typeof D.nodeType==`string`?l(C,{keyPath:[...w,{type:D.nodeType}],section:S,dictionary:T}):l(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(D).map(n=>{let s=[...w,{type:b.Object,key:n}];return a(_(S,s))?l(e,{label:`${M.label.value} ${n}`,isActive:P(s),variant:r.HOVERABLE,color:t.TEXT,className:`w-full`,onClick:()=>k(s),IconRight:o,children:f(n)},n):l(i,{label:`${M.label.value} ${n}`,isActive:P(s),onClick:()=>k(s),header:f(n),children:l(`div`,{className:`mt-2 flex w-full max-w-full`,children:l(`div`,{className:`flex-1 pl-10`,children:l(C,{keyPath:s,section:S,dictionary:T})})})},n)})}):u(c,{children:[`Error loading section --`,N,`--`,JSON.stringify(D),`--`,JSON.stringify(w)]}):l(c,{})};export{C as NavigationViewNode,S as traceKeys};
2
2
  //# sourceMappingURL=NavigationViewNode.mjs.map
@@ -1,2 +1,2 @@
1
- "use client";import{Container as e}from"../../Container/index.mjs";import{Button as t,ButtonColor as n,ButtonSize as r,ButtonVariant as i}from"../../Button/Button.mjs";import{InputVariant as a}from"../../Input/Input.mjs";import{EditableFieldInput as o}from"../../EditableField/EditableFieldInput.mjs";import{NodeTypeSelector as s}from"../NodeTypeSelector.mjs";import{camelCaseToSentence as c}from"@intlayer/config/client";import{Plus as l,Trash as u}from"lucide-react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{useIntlayer as m}from"react-intlayer";import{useConfiguration as h,useEditedContentActions as g,useFocusUnmergedDictionary as _}from"@intlayer/editor-react";import{getDefaultNode as v,getNodeChildren as y,getNodeType as b}from"@intlayer/core/dictionaryManipulator";import{NodeType as x}from"@intlayer/types/nodeType";import{isSameKeyPath as S}from"@intlayer/core/utils";const C=({section:e,dictionaryLocalId:t,keyPath:n,onNodeTypeChange:r})=>{let i=h()?.internationalization.locales??[],a=b(e),o=y(e),c=e=>{r(v(a,i,e))};if(a===x.Translation||a===x.Condition||a===x.Gender||a===x.Enumeration){let l=Object.keys(e[a])[0],u=[...n,{type:a,key:l}];return p(`div`,{className:`flex w-full flex-col gap-1`,children:[f(s,{section:e,onValueChange:e=>r(v(e,i))}),f(C,{section:o,keyPath:u,dictionaryLocalId:t,onNodeTypeChange:c})]})}if(a===x.Array){let l=[...n,{type:a,key:0}];return p(`div`,{className:`flex w-full flex-col gap-1`,children:[f(s,{section:e,onValueChange:e=>r(v(e,i))}),f(C,{section:o,keyPath:l,dictionaryLocalId:t,onNodeTypeChange:c})]})}return a===x.Object?p(d,{children:[f(s,{section:e,onValueChange:e=>r(v(e,i))}),f(`div`,{className:`mt-6 ml-10`,children:f(E,{keyPath:n,section:e,dictionaryLocalId:t})})]}):f(s,{section:e,onValueChange:e=>r(v(e,i))})},w=({sectionKey:s,section:l,keyPath:d,dictionaryLocalId:h})=>{let{focusedContent:v,setFocusedContentKeyPath:y}=_(),{renameEditedContent:b,addEditedContent:x}=g(),{titleInput:w,deleteButton:T}=m(`structure-view`),E=e=>{b(h,e,d);let t=d.slice(0,-1),n=d[d.length-1];y([...t,{...n,key:e}])};return f(e,{transparency:`xl`,roundedSize:`xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":S(d,v?.keyPath??[]),onClick:()=>y(d),children:p(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof s==`string`&&p(`div`,{className:`w-full`,children:[p(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[f(o,{name:`key`,"aria-label":`Key`,placeholder:w.placeholder.value,defaultValue:s,onSave:e=>E(e),variant:a.INVISIBLE}),f(t,{label:T.label.value,variant:i.HOVERABLE,size:r.ICON_SM,color:n.TEXT,className:`translate-x-2`,Icon:u,onClick:()=>{x(h,void 0,d),y(d.slice(0,-1))}})]}),p(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,c(s),` )`]})]}),f(C,{keyPath:d,dictionaryLocalId:h,section:l,onNodeTypeChange:e=>{x(h,e,d)}})]})})},T=({section:e,keyPath:a,dictionaryLocalId:o})=>{let{addNodeButton:s}=m(`structure-view`),{setFocusedContentKeyPath:c}=_(),{addEditedContent:u}=g();return!e||typeof e!=`object`?f(`div`,{children:`Not an object`}):p(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[f(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(e).map(t=>f(`li`,{className:`flex w-full`,children:f(w,{sectionKey:t,section:e?.[t],keyPath:[...a,{type:x.Object,key:t}],dictionaryLocalId:o})},`${JSON.stringify(a)}-object-${t}`))}),f(t,{label:s.label.value,variant:i.HOVERABLE,size:r.MD,color:n.TEXT,Icon:l,className:`flex-1`,onClick:()=>{let e=[...a,{type:x.Object,key:`newKey`}];u(o,``,e),c(e)},children:s.text})]})},E=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?f(w,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):f(T,{section:e,keyPath:t,dictionaryLocalId:n});export{w as NodeView,T as ObjectView,E as StructureView};
1
+ "use client";import{Container as e}from"../../Container/index.mjs";import{Button as t,ButtonColor as n,ButtonSize as r,ButtonVariant as i}from"../../Button/Button.mjs";import{InputVariant as a}from"../../Input/Input.mjs";import{EditableFieldInput as o}from"../../EditableField/EditableFieldInput.mjs";import{NodeTypeSelector as s}from"../NodeTypeSelector.mjs";import{Plus as c,Trash as l}from"lucide-react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{camelCaseToSentence as p}from"@intlayer/config/client";import{useIntlayer as m}from"react-intlayer";import{useConfiguration as h,useEditedContentActions as g,useFocusUnmergedDictionary as _}from"@intlayer/editor-react";import{getDefaultNode as v,getNodeChildren as y,getNodeType as b}from"@intlayer/core/dictionaryManipulator";import{NodeType as x}from"@intlayer/types/nodeType";import{isSameKeyPath as S}from"@intlayer/core/utils";const C=({section:e,dictionaryLocalId:t,keyPath:n,onNodeTypeChange:r})=>{let i=h()?.internationalization.locales??[],a=b(e),o=y(e),c=e=>{r(v(a,i,e))};if(a===x.Translation||a===x.Condition||a===x.Gender||a===x.Enumeration){let l=Object.keys(e[a])[0],u=[...n,{type:a,key:l}];return f(`div`,{className:`flex w-full flex-col gap-1`,children:[d(s,{section:e,onValueChange:e=>r(v(e,i))}),d(C,{section:o,keyPath:u,dictionaryLocalId:t,onNodeTypeChange:c})]})}if(a===x.Array){let l=[...n,{type:a,key:0}];return f(`div`,{className:`flex w-full flex-col gap-1`,children:[d(s,{section:e,onValueChange:e=>r(v(e,i))}),d(C,{section:o,keyPath:l,dictionaryLocalId:t,onNodeTypeChange:c})]})}return a===x.Object?f(u,{children:[d(s,{section:e,onValueChange:e=>r(v(e,i))}),d(`div`,{className:`mt-6 ml-10`,children:d(E,{keyPath:n,section:e,dictionaryLocalId:t})})]}):d(s,{section:e,onValueChange:e=>r(v(e,i))})},w=({sectionKey:s,section:c,keyPath:u,dictionaryLocalId:h})=>{let{focusedContent:v,setFocusedContentKeyPath:y}=_(),{renameEditedContent:b,addEditedContent:x}=g(),{titleInput:w,deleteButton:T}=m(`structure-view`),E=e=>{b(h,e,u);let t=u.slice(0,-1),n=u[u.length-1];y([...t,{...n,key:e}])};return d(e,{transparency:`xl`,roundedSize:`xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":S(u,v?.keyPath??[]),onClick:()=>y(u),children:f(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof s==`string`&&f(`div`,{className:`w-full`,children:[f(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[d(o,{name:`key`,"aria-label":`Key`,placeholder:w.placeholder.value,defaultValue:s,onSave:e=>E(e),variant:a.INVISIBLE}),d(t,{label:T.label.value,variant:i.HOVERABLE,size:r.ICON_SM,color:n.TEXT,className:`translate-x-2`,Icon:l,onClick:()=>{x(h,void 0,u),y(u.slice(0,-1))}})]}),f(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,p(s),` )`]})]}),d(C,{keyPath:u,dictionaryLocalId:h,section:c,onNodeTypeChange:e=>{x(h,e,u)}})]})})},T=({section:e,keyPath:a,dictionaryLocalId:o})=>{let{addNodeButton:s}=m(`structure-view`),{setFocusedContentKeyPath:l}=_(),{addEditedContent:u}=g();return!e||typeof e!=`object`?d(`div`,{children:`Not an object`}):f(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[d(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(e).map(t=>d(`li`,{className:`flex w-full`,children:d(w,{sectionKey:t,section:e?.[t],keyPath:[...a,{type:x.Object,key:t}],dictionaryLocalId:o})},`${JSON.stringify(a)}-object-${t}`))}),d(t,{label:s.label.value,variant:i.HOVERABLE,size:r.MD,color:n.TEXT,Icon:c,className:`flex-1`,onClick:()=>{let e=[...a,{type:x.Object,key:`newKey`}];u(o,``,e),l(e)},children:s.text})]})},E=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?d(w,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):d(T,{section:e,keyPath:t,dictionaryLocalId:n});export{w as NodeView,T as ObjectView,E as StructureView};
2
2
  //# sourceMappingURL=StructureView.mjs.map
@@ -1,2 +1,2 @@
1
- "use client";import e from"@intlayer/config/built";import{useQuery as t}from"@tanstack/react-query";import{useConfiguration as n}from"@intlayer/editor-react";import{getOAuthAPI as r}from"@intlayer/api";const i=i=>{let a=n(),o=i??a??e,{data:s}=t({queryKey:[`oAuth2AccessToken`],queryFn:r(o).getOAuth2AccessToken,enabled:!!(o.editor.clientId&&o.editor.clientSecret),staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1});return{oAuth2AccessToken:s?.data}};export{i as useOAuth2};
1
+ "use client";import{useQuery as e}from"@tanstack/react-query";import t from"@intlayer/config/built";import{useConfiguration as n}from"@intlayer/editor-react";import{getOAuthAPI as r}from"@intlayer/api";const i=i=>{let a=n(),o=i??a??t,{data:s}=e({queryKey:[`oAuth2AccessToken`],queryFn:r(o).getOAuth2AccessToken,enabled:!!(o.editor.clientId&&o.editor.clientSecret),staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1});return{oAuth2AccessToken:s?.data}};export{i as useOAuth2};
2
2
  //# sourceMappingURL=useOAuth2.mjs.map
@@ -1,2 +1,2 @@
1
- "use client";import{getAuthAPI as e}from"../../libs/auth.mjs";import{useQueryClient as t}from"../reactQuery.mjs";import n from"@intlayer/config/built";import{useQuery as r}from"@tanstack/react-query";import{useConfiguration as i}from"@intlayer/editor-react";const a=(a,o)=>{let s=i(),c=o??s??n,l=t(),{data:u,isFetched:d,refetch:f}=r({queryKey:[`session`],queryFn:async()=>(await e(c).getSession()).data,staleTime:60*1e3,gcTime:300*1e3,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:!a}),p=u??(d?null:void 0),m=e=>{l.setQueryData([`session`],e)},h=async()=>(await f()).data;return{session:p,fetchSession:h,revalidateSession:h,setSession:m}};export{a as useSession};
1
+ "use client";import{getAuthAPI as e}from"../../libs/auth.mjs";import{useQueryClient as t}from"../reactQuery.mjs";import{useQuery as n}from"@tanstack/react-query";import r from"@intlayer/config/built";import{useConfiguration as i}from"@intlayer/editor-react";const a=(a,o)=>{let s=i(),c=o??s??r,l=t(),{data:u,isFetched:d,refetch:f}=n({queryKey:[`session`],queryFn:async()=>(await e(c).getSession()).data,staleTime:60*1e3,gcTime:300*1e3,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:!a}),p=u??(d?null:void 0),m=e=>{l.setQueryData([`session`],e)},h=async()=>(await f()).data;return{session:p,fetchSession:h,revalidateSession:h,setSession:m}};export{a as useSession};
2
2
  //# sourceMappingURL=useSession.mjs.map
@@ -44,7 +44,7 @@ declare enum BadgeSize {
44
44
  */
45
45
  declare const badgeVariants: (props?: {
46
46
  color?: "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text" | "error" | "success" | "custom";
47
- variant?: "none" | "default" | "outline" | "hoverable";
47
+ variant?: "default" | "none" | "outline" | "hoverable";
48
48
  size?: "md" | "sm" | "lg";
49
49
  } & class_variance_authority_types0.ClassProp) => string;
50
50
  /**
@@ -62,8 +62,8 @@ declare enum ButtonTextAlign {
62
62
  declare const buttonVariants: (props?: {
63
63
  size?: "md" | "sm" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
64
64
  color?: "primary" | "secondary" | "destructive" | "neutral" | "card" | "light" | "dark" | "text" | "current" | "text-inverse" | "error" | "success" | "custom";
65
- roundedSize?: "none" | "md" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full";
66
- variant?: "input" | "none" | "default" | "outline" | "link" | "invisible-link" | "hoverable" | "fade";
65
+ roundedSize?: "md" | "sm" | "lg" | "xl" | "2xl" | "none" | "3xl" | "4xl" | "5xl" | "full";
66
+ variant?: "input" | "default" | "none" | "outline" | "link" | "invisible-link" | "hoverable" | "fade";
67
67
  textAlign?: "left" | "center" | "right";
68
68
  isFullWidth?: boolean;
69
69
  } & class_variance_authority_types0.ClassProp) => string;
@@ -6,7 +6,7 @@ import { VariantProps } from "class-variance-authority";
6
6
  declare const collapsibleTableVariants: (props?: {
7
7
  size?: "sm" | "md" | "lg" | "xl" | "full";
8
8
  variant?: "default" | "dark" | "ghost" | "outlined";
9
- spacing?: "none" | "sm" | "md" | "lg" | "auto";
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 */
@@ -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" | "xs" | "xl" | "full";
13
- padding?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
11
+ roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "4xl" | "full";
12
+ transparency?: "sm" | "md" | "lg" | "xs" | "xl" | "none" | "full";
13
+ padding?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
14
14
  separator?: "both" | "without" | "x" | "y";
15
- border?: "none" | "with";
16
- borderColor?: "error" | "success" | "primary" | "secondary" | "neutral" | "text" | "card" | "warning";
17
- background?: "none" | "with" | "hoverable";
18
- gap?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
15
+ border?: "with" | "none";
16
+ borderColor?: "error" | "success" | "primary" | "secondary" | "neutral" | "card" | "text" | "warning";
17
+ background?: "with" | "none" | "hoverable";
18
+ gap?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
19
19
  } & class_variance_authority_types0.ClassProp) => string;
20
20
  /** Available rounded corner sizes for the container */
21
21
  declare enum ContainerRoundedSize {
@@ -6,8 +6,8 @@ import { VariantProps } from "class-variance-authority";
6
6
  declare const checkboxVariants: (props?: {
7
7
  variant?: "default";
8
8
  size?: "sm" | "md" | "lg" | "xs";
9
- color?: "error" | "success" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "text" | "dark" | "custom";
10
- validationStyleEnabled?: "enabled" | "disabled";
9
+ color?: "error" | "success" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text" | "custom";
10
+ validationStyleEnabled?: "disabled" | "enabled";
11
11
  } & class_variance_authority_types0.ClassProp) => string;
12
12
  declare enum CheckboxSize {
13
13
  XS = "xs",
@@ -6,7 +6,7 @@ import { VariantProps } from "class-variance-authority";
6
6
  declare const inputVariants: (props?: {
7
7
  variant?: "default" | "invisible";
8
8
  size?: "sm" | "md" | "lg";
9
- validationStyleEnabled?: "enabled" | "disabled";
9
+ validationStyleEnabled?: "disabled" | "enabled";
10
10
  } & class_variance_authority_types0.ClassProp) => string;
11
11
  declare enum InputVariant {
12
12
  DEFAULT = "default",
@@ -54,7 +54,7 @@ declare enum LinkUnderlined {
54
54
  }
55
55
  declare const linkVariants: (props?: {
56
56
  variant?: "default" | "invisible-link" | "hoverable" | "button" | "button-outlined";
57
- roundedSize?: "none" | "md" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "full";
57
+ roundedSize?: "md" | "sm" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
58
58
  color?: "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text" | "text-inverse" | "error" | "success" | "custom";
59
59
  size?: "md" | "sm" | "lg" | "xl" | "custom";
60
60
  underlined?: boolean | LinkUnderlined.DEFAULT;
@@ -15,7 +15,7 @@ declare enum TabSelectorColor {
15
15
  TEXT = "text"
16
16
  }
17
17
  declare const tabSelectorVariant: (props?: {
18
- color?: "primary" | "secondary" | "destructive" | "neutral" | "light" | "text" | "dark";
18
+ color?: "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text";
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?: "none" | "md" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "full";
188
+ roundedSize?: "md" | "sm" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
189
189
  color?: "primary" | "neutral" | "text" | "error" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
190
- size?: "md" | "sm" | "lg" | "xl" | "xs";
190
+ size?: "md" | "xs" | "sm" | "lg" | "xl";
191
191
  border?: "none" | "with";
192
192
  background?: "none" | "with";
193
193
  } & class_variance_authority_types0.ClassProp) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "8.3.0-canary.4",
3
+ "version": "8.3.1",
4
4
  "private": false,
5
5
  "description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
6
6
  "keywords": [
@@ -106,12 +106,12 @@
106
106
  "dependencies": {
107
107
  "@better-auth/passkey": "1.5.4",
108
108
  "@better-auth/sso": "1.5.4",
109
- "@intlayer/api": "8.3.0-canary.4",
110
- "@intlayer/config": "8.3.0-canary.4",
111
- "@intlayer/core": "8.3.0-canary.4",
112
- "@intlayer/dictionaries-entry": "8.3.0-canary.4",
113
- "@intlayer/editor-react": "8.3.0-canary.4",
114
- "@intlayer/types": "8.3.0-canary.4",
109
+ "@intlayer/api": "8.3.1",
110
+ "@intlayer/config": "8.3.1",
111
+ "@intlayer/core": "8.3.1",
112
+ "@intlayer/dictionaries-entry": "8.3.1",
113
+ "@intlayer/editor-react": "8.3.1",
114
+ "@intlayer/types": "8.3.1",
115
115
  "@radix-ui/react-dialog": "1.1.15",
116
116
  "@radix-ui/react-select": "2.2.6",
117
117
  "@radix-ui/react-slot": "1.2.4",
@@ -120,12 +120,12 @@
120
120
  "better-auth": "1.4.21",
121
121
  "class-variance-authority": "0.7.1",
122
122
  "cmdk": "1.1.1",
123
- "react-intlayer": "8.3.0-canary.4",
123
+ "react-intlayer": "8.3.1",
124
124
  "rollup-preserve-directives": "1.1.3",
125
125
  "zod": "4.3.6"
126
126
  },
127
127
  "devDependencies": {
128
- "@intlayer/backend": "8.3.0-canary.4",
128
+ "@intlayer/backend": "8.3.1",
129
129
  "@shikijs/transformers": "4.0.1",
130
130
  "@storybook/addon-a11y": "8.6.14",
131
131
  "@storybook/addon-essentials": "8.6.14",
@@ -154,14 +154,14 @@
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.3.0-canary.4",
157
+ "intlayer": "8.3.1",
158
158
  "rimraf": "6.1.3",
159
159
  "shiki": "4.0.1",
160
160
  "storybook": "8.6.17",
161
161
  "tsdown": "0.21.2",
162
162
  "typescript": "5.9.3",
163
163
  "vite": "7.3.1",
164
- "vite-intlayer": "8.3.0-canary.4",
164
+ "vite-intlayer": "8.3.1",
165
165
  "vite-plugin-dts": "4.5.4",
166
166
  "vite-tsconfig-paths": "6.1.1",
167
167
  "vitest": "4.0.18"
@@ -169,7 +169,7 @@
169
169
  "peerDependencies": {
170
170
  "@better-fetch/fetch": "1.1.21",
171
171
  "@hookform/resolvers": "5.2.2",
172
- "@intlayer/backend": "8.3.0-canary.4",
172
+ "@intlayer/backend": "8.3.1",
173
173
  "@monaco-editor/react": "4.7.0",
174
174
  "@shikijs/transformers": "4.0.1",
175
175
  "@tanstack/react-query": "5.90.21",
@@ -177,12 +177,12 @@
177
177
  "clsx": "2.1.1",
178
178
  "framer-motion": "12.35.1",
179
179
  "fuse.js": "7.1.0",
180
- "intlayer": "8.3.0-canary.4",
180
+ "intlayer": "8.3.1",
181
181
  "lucide-react": "0.577.0",
182
182
  "react": ">=16.0.0",
183
183
  "react-dom": ">=16.0.0",
184
184
  "react-hook-form": "7.71.2",
185
- "react-intlayer": "8.3.0-canary.4",
185
+ "react-intlayer": "8.3.1",
186
186
  "shiki": "4.0.1",
187
187
  "tailwind-merge": "3.5.0",
188
188
  "tailwindcss": "4.2.1"