@ionite/react 0.0.22 → 0.0.23-beta.20260729.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{defaultLogger as VM,silentLogger as _M}from"@ionite/core";import{silentLogger as ZW}from"@ionite/core";import{createContext as $W,useContext as i,useMemo as OW}from"react";import{silentLogger as S}from"@ionite/core";import{useCallback as R,useEffect as v,useRef as c,useState as U}from"react";var JW=/^[a-zA-Z0-9._-]{1,1024}$/;function QW(W,M){if(!W.trim())throw Error(`${M} storageKey must be a non-empty string.`);if(!JW.test(W))throw Error(`${M} storageKey must be 1-1024 characters and contain only letters, numbers, dots, underscores, and hyphens.`)}function D(W,M,C){if(M===void 0||M==="")return W;return QW(M,C),M}function n(W,M,C,H=S){if(typeof window>"u")return null;try{let q=W==="local"?localStorage:sessionStorage,J=q.getItem(M);if(!J)return null;let Q=JSON.parse(J),Z=C.validate(Q);if(!Z)return q.removeItem(M),null;let $=C.revive(Z);if(C.isExpired($))return q.removeItem(M),null;return $}catch(q){return H.error("Error loading auth record from storage:",q),null}}async function g(W,M,C,H=S){try{let q=await fetch(W,C);if(q.status===401)return{kind:"unauthenticated"};if(!q.ok){let Z=Error(`Failed to fetch auth record: ${q.status} ${q.statusText}`);return H.error("Error fetching auth record from URL:",Z),{kind:"error",error:Z}}let J=await q.json(),Q=M.validate(J);if(!Q){let Z=Error("Auth record from server failed validation.");return H.error("Error validating auth record from URL:",Z),{kind:"error",error:Z}}return{kind:"ok",value:M.revive(Q)}}catch(q){let J=q instanceof Error?q:Error(String(q));return H.error("Error fetching auth record from URL:",J),{kind:"error",error:J}}}function V(W){let{url:M,storage:C,storageKey:H,disableListener:q,logoutEventName:J,codec:Q}=W,[Z,$]=U(null),[I,O]=U(!!M),[X,P]=U(null),N=c(W.fetchInit);N.current=W.fetchInit;let z=c(W.log);z.current=W.log;let A=R((B)=>{if(C==="memory"||typeof window>"u")return;try{let f=C==="local"?localStorage:sessionStorage;if(B===null)f.removeItem(H);else f.setItem(H,JSON.stringify(B))}catch(f){z.current.error("Error saving auth record to storage:",f)}},[C,H]),w=R((B)=>{$(B),A(B)},[A]),j=R(()=>{if(C==="memory")return null;return n(C,H,Q,z.current)},[C,H,Q]),Y=R(async()=>{if(!M)return;O(!0);try{let B=await g(M,Q,N.current,z.current);if(B.kind==="ok")$(B.value),P(null),A(B.value);else if(B.kind==="unauthenticated")$(null),P(null),A(null);else P(B.error)}finally{O(!1)}},[M,Q,A]);return v(()=>{let B=j();if(B)$(B);if(M)Y();else O(!1)},[j,M,Y]),v(()=>{if(q||C==="memory")return;let B=(F)=>{if(F.key!==H)return;if(F.newValue===null){$(null);return}try{let x=JSON.parse(F.newValue),E=Q.validate(x);if(!E)return;let u=Q.revive(E);if(Q.isExpired(u)){$(null);return}$(u)}catch(x){z.current.error("Error parsing auth record from storage event:",x)}},f=()=>{$(null),P(null)};return window.addEventListener("storage",B),window.addEventListener(J,f),()=>{window.removeEventListener("storage",B),window.removeEventListener(J,f)}},[q,C,H,J,Q]),{value:Z,setValue:w,isLoading:I,error:X}}async function d(W,M,C){let{storageKey:H,storage:q,fetchInit:J,log:Q=S}=C;if(q==="local"||q==="session"){let Z=n(q,H,M,Q);if(Z)return Z}if(W){let Z=await g(W,M,J,Q);if(Z.kind==="ok")return Z.value}return}async function _(W,M,C){try{let H=await fetch(W,{...C?.fetchInit,headers:{Accept:"application/json",...C?.fetchInit?.headers}});if(!H.ok)return{success:!1,error:`HTTP ${H.status}`};let q=await H.json();if(!q.success)return{success:!1,error:q.message||"Logout failed"};let J=typeof q.redirect==="string"?q.redirect:void 0;if(typeof window<"u"){let Q=D(M.defaultStorageKey,C?.storageKey,M.providerLabel);if(localStorage.removeItem(Q),sessionStorage.removeItem(Q),window.dispatchEvent(new CustomEvent(M.logoutEventName)),J&&C?.navigate!==!1)window.location.assign(J)}return{success:!0,redirect:J}}catch(H){return{success:!1,error:H instanceof Error?H.message:"Network error"}}}import{jsx as PW}from"react/jsx-runtime";var m="ion.ciam.customer",l="es-ciam-logout",T="CIAMProvider",s={validate(W){if(!W||typeof W!=="object")return null;let M=W;if(typeof M.userName!=="string"||typeof M.name!=="string"||typeof M.email!=="string")return null;return W},revive(W){if(W.ciam?.expires)W.ciam.expires=new Date(W.ciam.expires);return W},isExpired(W){let M=W.ciam?.expires;if(!M)return!1;let C=M instanceof Date?M.getTime():new Date(M).getTime();return Number.isFinite(C)&&C<=Date.now()}},y=$W(void 0);function BW({storageKey:W,customerUrl:M,storage:C="memory",disableListener:H=!1,fetchInit:q,log:J=ZW,children:Q}){let Z=D(m,W,T),{value:$,setValue:I,isLoading:O,error:X}=V({url:M,storage:C,storageKey:Z,disableListener:H,logoutEventName:l,codec:s,fetchInit:q,log:J}),P=OW(()=>({customer:$,setCustomer:I,isLoading:O,error:X}),[$,I,O,X]);return PW(y.Provider,{value:P,children:Q})}function IW(){let W=i(y);if(W===void 0)throw Error("useCIAMContext must be used within a CIAMProvider");return W}function G(){return i(y)}async function XW(W,M){return d(W,s,{storageKey:D(m,M?.storageKey,T),storage:M?.storage??"memory",fetchInit:M?.fetchInit,log:M?.log})}async function YW(W,M){return _(W,{defaultStorageKey:m,logoutEventName:l,providerLabel:T},M)}import{silentLogger as a}from"@ionite/core";import{useCallback as zW,useEffect as AW,useState as b}from"react";import{jsx as h,jsxs as K}from"react/jsx-runtime";function t(W,M=a){let[C,H]=b([]),[q,J]=b(Boolean(W)),[Q,Z]=b(null),$=zW(()=>{if(!W)return;let I=!1;return J(!0),Z(null),fetch(W,{headers:{Accept:"application/json"}}).then(async(O)=>{if(!O.ok)throw Error(`Failed to fetch CIAM providers: ${O.status} ${O.statusText}`);let X=await O.json();if(!I)H(Array.isArray(X.providers)?X.providers:[])}).catch((O)=>{let X=O instanceof Error?O:Error(String(O));if(M.error("Error fetching CIAM providers:",X),!I)H([]),Z(X)}).finally(()=>{if(!I)J(!1)}),()=>{I=!0}},[W,M]);return AW(()=>{return $()},[$]),{providers:C,isLoading:q,error:Q,refresh:$}}function fW(W,M){return{display:"flex",alignItems:"center",gap:"0.5rem",width:"100%",padding:"0.625rem 0.875rem",border:"1px solid rgba(0,0,0,0.15)",borderRadius:"0.5rem",background:(M==="dark"?W.colors?.dark:W.colors?.light)??(M==="dark"?"#1f1f1f":"#ffffff"),color:M==="dark"?"#ffffff":"#111111",textDecoration:"none",font:"inherit",cursor:"pointer"}}function GW({providersUrl:W,limit:M,theme:C="light",renderProvider:H,loadingFallback:q,emptyFallback:J,errorFallback:Q,moreLabel:Z="Show more",className:$,log:I=a}){let{providers:O,isLoading:X,error:P,refresh:N}=t(W,I),[z,A]=b(!1);if(X)return q??null;if(P)return Q?Q(P,N):J??null;if(O.length===0)return J??null;let w=!z&&typeof M==="number"&&M>0?O.slice(0,M):O,j=w.length<O.length;return K("div",{className:$,style:{display:"flex",flexDirection:"column",gap:"0.5rem"},"data-es-ciam-providers":"",children:[w.map((Y)=>H?h("span",{children:H(Y)},Y.name):K("a",{href:Y.loginUrl,style:fW(Y,C),"data-es-ciam-provider":Y.name,children:[Y.iconUrl?h("img",{src:Y.iconUrl,alt:"",width:20,height:20,"aria-hidden":"true"}):null,K("span",{children:["Continue with ",Y.displayName]})]},Y.name)),j?h("button",{type:"button",onClick:()=>A(!0),"data-es-ciam-show-more":"",children:Z}):null]})}import{silentLogger as kW}from"@ionite/core";import{createContext as DW,useContext as o,useMemo as NW}from"react";import{jsx as _W}from"react/jsx-runtime";var r="ion.sso.user",e="es-sso-logout",WW="SSOProvider",wW={validate(W){if(!W||typeof W!=="object")return null;let M=W;if(typeof M.userName!=="string"||typeof M.name!=="string"||typeof M.email!=="string")return null;return W},revive(W){if(W.sso?.expires)W.sso.expires=new Date(W.sso.expires);return W},isExpired(W){let M=W.sso?.expires;if(!M)return!1;let C=M instanceof Date?M.getTime():new Date(M).getTime();return Number.isFinite(C)&&C<=Date.now()}},L=DW(void 0);function jW({storageKey:W,userUrl:M,storage:C="memory",disableListener:H=!1,fetchInit:q,log:J=kW,children:Q}){let Z=D(r,W,WW),{value:$,setValue:I,isLoading:O,error:X}=V({url:M,storage:C,storageKey:Z,disableListener:H,logoutEventName:e,codec:wW,fetchInit:q,log:J}),P=NW(()=>({user:$,setUser:I,isLoading:O,error:X}),[$,I,O,X]);return _W(L.Provider,{value:P,children:Q})}function RW(){let W=o(L);if(W===void 0)throw Error("useSSOContext must be used within a SSOProvider");return W}function k(){return o(L)}async function VW(W,M){return _(W,{defaultStorageKey:r,logoutEventName:e,providerLabel:WW},M)}import{jsx as xW,Fragment as FW}from"react/jsx-runtime";function bW({complete:W=!1,audience:M="workforce",children:C}){let H=k(),q=G();if((M==="customer"?!!q?.isLoading:!!H?.isLoading)&&!W)return xW(FW,{children:C});return null}import{jsx as mW,Fragment as SW}from"react/jsx-runtime";function UW({audience:W="workforce",children:M}){let C=k(),H=G();if(W==="customer"?!!H?.customer:!!C?.user)return mW(SW,{children:M});return null}import{jsx as hW,Fragment as yW}from"react/jsx-runtime";function TW({audience:W="workforce",children:M}){let C=k(),H=G(),q=W==="customer"?!!H?.customer:!!C?.user,J=W==="customer"?!!H?.isLoading:!!C?.isLoading;if(q||J)return null;return hW(yW,{children:M})}import{buildTenantPath as MW,DEFAULT_TENANT_API_NAMESPACE as KW,DEFAULT_TENANT_UI_NAMESPACE as LW,normalizeTenantRoutingStrategy as CW}from"@ionite/core";import{createContext as pW,useContext as qW,useMemo as EW}from"react";import{jsx as nW}from"react/jsx-runtime";var p=pW(null);function HW(W,M){let C=CW(M),H=C.ui??LW,q=C.api??KW;return{ui:(J="/")=>MW(W,J,H),api:(J="/")=>MW(W,J,q)}}function uW({id:W,strategy:M,children:C}){let H=EW(()=>{let q=CW(M);return{id:W,strategy:q,urls:HW(W,q)}},[M,W]);return nW(p.Provider,{value:H,children:C})}function vW(){let W=qW(p);if(!W)throw Error("useTenant() must be used within a TenantProvider");return W}function cW(){return qW(p)??void 0}export{vW as useTenant,RW as useSSOContext,cW as useOptionalTenant,k as useOptionalSSOContext,G as useOptionalCIAMContext,t as useCIAMProviders,IW as useCIAMContext,_M as silentLogger,YW as logoutCustomer,VW as logout,XW as getCustomer,VM as defaultLogger,HW as createTenantUrls,uW as TenantProvider,TW as SignedOut,UW as SignedIn,bW as SignInLoading,jW as SSOProvider,GW as CIAMProviderList,BW as CIAMProvider};
1
+ import{defaultLogger as VM,silentLogger as _M}from"@ionite/core";import{silentLogger as ZW}from"@ionite/core";import{createContext as $W,useContext as i,useMemo as OW}from"react";import{silentLogger as S}from"@ionite/core";import{useCallback as R,useEffect as v,useRef as c,useState as U}from"react";var JW=/^[a-zA-Z0-9._-]{1,1024}$/;function QW(W,M){if(!W.trim())throw Error(`${M} storageKey must be a non-empty string.`);if(!JW.test(W))throw Error(`${M} storageKey must be 1-1024 characters and contain only letters, numbers, dots, underscores, and hyphens.`)}function D(W,M,C){if(M===void 0||M==="")return W;return QW(M,C),M}function n(W,M,C,H=S){if(typeof window>"u")return null;try{let q=W==="local"?localStorage:sessionStorage,J=q.getItem(M);if(!J)return null;let Q=JSON.parse(J),Z=C.validate(Q);if(!Z)return q.removeItem(M),null;let $=C.revive(Z);if(C.isExpired($))return q.removeItem(M),null;return $}catch(q){return H.error("Error loading auth record from storage:",q),null}}async function g(W,M,C,H=S){try{let q=await fetch(W,C);if(q.status===401)return{kind:"unauthenticated"};if(!q.ok){let Z=Error(`Failed to fetch auth record: ${q.status} ${q.statusText}`);return H.error("Error fetching auth record from URL:",Z),{kind:"error",error:Z}}let J=await q.json(),Q=M.validate(J);if(!Q){let Z=Error("Auth record from server failed validation.");return H.error("Error validating auth record from URL:",Z),{kind:"error",error:Z}}return{kind:"ok",value:M.revive(Q)}}catch(q){let J=q instanceof Error?q:Error(String(q));return H.error("Error fetching auth record from URL:",J),{kind:"error",error:J}}}function V(W){let{url:M,storage:C,storageKey:H,disableListener:q,logoutEventName:J,codec:Q}=W,[Z,$]=U(null),[I,O]=U(!!M),[X,P]=U(null),N=c(W.fetchInit);N.current=W.fetchInit;let z=c(W.log);z.current=W.log;let A=R((B)=>{if(C==="memory"||typeof window>"u")return;try{let f=C==="local"?localStorage:sessionStorage;if(B===null)f.removeItem(H);else f.setItem(H,JSON.stringify(B))}catch(f){z.current.error("Error saving auth record to storage:",f)}},[C,H]),w=R((B)=>{$(B),A(B)},[A]),j=R(()=>{if(C==="memory")return null;return n(C,H,Q,z.current)},[C,H,Q]),Y=R(async()=>{if(!M)return;O(!0);try{let B=await g(M,Q,N.current,z.current);if(B.kind==="ok")$(B.value),P(null),A(B.value);else if(B.kind==="unauthenticated")$(null),P(null),A(null);else P(B.error)}finally{O(!1)}},[M,Q,A]);return v(()=>{let B=j();if(B)$(B);if(M)Y();else O(!1)},[j,M,Y]),v(()=>{if(q||C==="memory")return;let B=(F)=>{if(F.key!==H)return;if(F.newValue===null){$(null);return}try{let x=JSON.parse(F.newValue),E=Q.validate(x);if(!E)return;let u=Q.revive(E);if(Q.isExpired(u)){$(null);return}$(u)}catch(x){z.current.error("Error parsing auth record from storage event:",x)}},f=()=>{$(null),P(null)};return window.addEventListener("storage",B),window.addEventListener(J,f),()=>{window.removeEventListener("storage",B),window.removeEventListener(J,f)}},[q,C,H,J,Q]),{value:Z,setValue:w,isLoading:I,error:X}}async function d(W,M,C){let{storageKey:H,storage:q,fetchInit:J,log:Q=S}=C;if(q==="local"||q==="session"){let Z=n(q,H,M,Q);if(Z)return Z}if(W){let Z=await g(W,M,J,Q);if(Z.kind==="ok")return Z.value}return}async function _(W,M,C){try{let H=await fetch(W,{...C?.fetchInit,headers:{Accept:"application/json",...C?.fetchInit?.headers}});if(!H.ok)return{success:!1,error:`HTTP ${H.status}`};let q=await H.json();if(!q.success)return{success:!1,error:q.message||"Logout failed"};let J=typeof q.redirect==="string"?q.redirect:void 0;if(typeof window<"u"){let Q=D(M.defaultStorageKey,C?.storageKey,M.providerLabel);if(localStorage.removeItem(Q),sessionStorage.removeItem(Q),window.dispatchEvent(new CustomEvent(M.logoutEventName)),J&&C?.navigate!==!1)window.location.assign(J)}return{success:!0,redirect:J}}catch(H){return{success:!1,error:H instanceof Error?H.message:"Network error"}}}import{jsx as PW}from"react/jsx-runtime";var m="ion.ciam.customer",l="ion-ciam-logout",T="CIAMProvider",s={validate(W){if(!W||typeof W!=="object")return null;let M=W;if(typeof M.userName!=="string"||typeof M.name!=="string"||typeof M.email!=="string")return null;return W},revive(W){if(W.ciam?.expires)W.ciam.expires=new Date(W.ciam.expires);return W},isExpired(W){let M=W.ciam?.expires;if(!M)return!1;let C=M instanceof Date?M.getTime():new Date(M).getTime();return Number.isFinite(C)&&C<=Date.now()}},y=$W(void 0);function BW({storageKey:W,customerUrl:M,storage:C="memory",disableListener:H=!1,fetchInit:q,log:J=ZW,children:Q}){let Z=D(m,W,T),{value:$,setValue:I,isLoading:O,error:X}=V({url:M,storage:C,storageKey:Z,disableListener:H,logoutEventName:l,codec:s,fetchInit:q,log:J}),P=OW(()=>({customer:$,setCustomer:I,isLoading:O,error:X}),[$,I,O,X]);return PW(y.Provider,{value:P,children:Q})}function IW(){let W=i(y);if(W===void 0)throw Error("useCIAMContext must be used within a CIAMProvider");return W}function G(){return i(y)}async function XW(W,M){return d(W,s,{storageKey:D(m,M?.storageKey,T),storage:M?.storage??"memory",fetchInit:M?.fetchInit,log:M?.log})}async function YW(W,M){return _(W,{defaultStorageKey:m,logoutEventName:l,providerLabel:T},M)}import{silentLogger as a}from"@ionite/core";import{useCallback as zW,useEffect as AW,useState as b}from"react";import{jsx as h,jsxs as K}from"react/jsx-runtime";function t(W,M=a){let[C,H]=b([]),[q,J]=b(Boolean(W)),[Q,Z]=b(null),$=zW(()=>{if(!W)return;let I=!1;return J(!0),Z(null),fetch(W,{headers:{Accept:"application/json"}}).then(async(O)=>{if(!O.ok)throw Error(`Failed to fetch CIAM providers: ${O.status} ${O.statusText}`);let X=await O.json();if(!I)H(Array.isArray(X.providers)?X.providers:[])}).catch((O)=>{let X=O instanceof Error?O:Error(String(O));if(M.error("Error fetching CIAM providers:",X),!I)H([]),Z(X)}).finally(()=>{if(!I)J(!1)}),()=>{I=!0}},[W,M]);return AW(()=>{return $()},[$]),{providers:C,isLoading:q,error:Q,refresh:$}}function fW(W,M){return{display:"flex",alignItems:"center",gap:"0.5rem",width:"100%",padding:"0.625rem 0.875rem",border:"1px solid rgba(0,0,0,0.15)",borderRadius:"0.5rem",background:(M==="dark"?W.colors?.dark:W.colors?.light)??(M==="dark"?"#1f1f1f":"#ffffff"),color:M==="dark"?"#ffffff":"#111111",textDecoration:"none",font:"inherit",cursor:"pointer"}}function GW({providersUrl:W,limit:M,theme:C="light",renderProvider:H,loadingFallback:q,emptyFallback:J,errorFallback:Q,moreLabel:Z="Show more",className:$,log:I=a}){let{providers:O,isLoading:X,error:P,refresh:N}=t(W,I),[z,A]=b(!1);if(X)return q??null;if(P)return Q?Q(P,N):J??null;if(O.length===0)return J??null;let w=!z&&typeof M==="number"&&M>0?O.slice(0,M):O,j=w.length<O.length;return K("div",{className:$,style:{display:"flex",flexDirection:"column",gap:"0.5rem"},"data-ion-ciam-providers":"",children:[w.map((Y)=>H?h("span",{children:H(Y)},Y.name):K("a",{href:Y.loginUrl,style:fW(Y,C),"data-ion-ciam-provider":Y.name,children:[Y.iconUrl?h("img",{src:Y.iconUrl,alt:"",width:20,height:20,"aria-hidden":"true"}):null,K("span",{children:["Continue with ",Y.displayName]})]},Y.name)),j?h("button",{type:"button",onClick:()=>A(!0),"data-ion-ciam-show-more":"",children:Z}):null]})}import{silentLogger as kW}from"@ionite/core";import{createContext as DW,useContext as o,useMemo as NW}from"react";import{jsx as _W}from"react/jsx-runtime";var r="ion.sso.user",e="ion-sso-logout",WW="SSOProvider",wW={validate(W){if(!W||typeof W!=="object")return null;let M=W;if(typeof M.userName!=="string"||typeof M.name!=="string"||typeof M.email!=="string")return null;return W},revive(W){if(W.sso?.expires)W.sso.expires=new Date(W.sso.expires);return W},isExpired(W){let M=W.sso?.expires;if(!M)return!1;let C=M instanceof Date?M.getTime():new Date(M).getTime();return Number.isFinite(C)&&C<=Date.now()}},L=DW(void 0);function jW({storageKey:W,userUrl:M,storage:C="memory",disableListener:H=!1,fetchInit:q,log:J=kW,children:Q}){let Z=D(r,W,WW),{value:$,setValue:I,isLoading:O,error:X}=V({url:M,storage:C,storageKey:Z,disableListener:H,logoutEventName:e,codec:wW,fetchInit:q,log:J}),P=NW(()=>({user:$,setUser:I,isLoading:O,error:X}),[$,I,O,X]);return _W(L.Provider,{value:P,children:Q})}function RW(){let W=o(L);if(W===void 0)throw Error("useSSOContext must be used within a SSOProvider");return W}function k(){return o(L)}async function VW(W,M){return _(W,{defaultStorageKey:r,logoutEventName:e,providerLabel:WW},M)}import{jsx as xW,Fragment as FW}from"react/jsx-runtime";function bW({complete:W=!1,audience:M="workforce",children:C}){let H=k(),q=G();if((M==="customer"?!!q?.isLoading:!!H?.isLoading)&&!W)return xW(FW,{children:C});return null}import{jsx as mW,Fragment as SW}from"react/jsx-runtime";function UW({audience:W="workforce",children:M}){let C=k(),H=G();if(W==="customer"?!!H?.customer:!!C?.user)return mW(SW,{children:M});return null}import{jsx as hW,Fragment as yW}from"react/jsx-runtime";function TW({audience:W="workforce",children:M}){let C=k(),H=G(),q=W==="customer"?!!H?.customer:!!C?.user,J=W==="customer"?!!H?.isLoading:!!C?.isLoading;if(q||J)return null;return hW(yW,{children:M})}import{buildTenantPath as MW,DEFAULT_TENANT_API_NAMESPACE as KW,DEFAULT_TENANT_UI_NAMESPACE as LW,normalizeTenantRoutingStrategy as CW}from"@ionite/core";import{createContext as pW,useContext as qW,useMemo as EW}from"react";import{jsx as nW}from"react/jsx-runtime";var p=pW(null);function HW(W,M){let C=CW(M),H=C.ui??LW,q=C.api??KW;return{ui:(J="/")=>MW(W,J,H),api:(J="/")=>MW(W,J,q)}}function uW({id:W,strategy:M,children:C}){let H=EW(()=>{let q=CW(M);return{id:W,strategy:q,urls:HW(W,q)}},[M,W]);return nW(p.Provider,{value:H,children:C})}function vW(){let W=qW(p);if(!W)throw Error("useTenant() must be used within a TenantProvider");return W}function cW(){return qW(p)??void 0}export{vW as useTenant,RW as useSSOContext,cW as useOptionalTenant,k as useOptionalSSOContext,G as useOptionalCIAMContext,t as useCIAMProviders,IW as useCIAMContext,_M as silentLogger,YW as logoutCustomer,VW as logout,XW as getCustomer,VM as defaultLogger,HW as createTenantUrls,uW as TenantProvider,TW as SignedOut,UW as SignedIn,bW as SignInLoading,jW as SSOProvider,GW as CIAMProviderList,BW as CIAMProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionite/react",
3
- "version": "0.0.22",
3
+ "version": "0.0.23-beta.20260729.1",
4
4
  "description": "ionite React Components",
5
5
  "private": false,
6
6
  "author": "ionite",
@@ -24,7 +24,7 @@
24
24
  "./package.json": "./package.json"
25
25
  },
26
26
  "dependencies": {
27
- "@ionite/core": "^0.0.22"
27
+ "@ionite/core": "0.0.23-beta.20260729.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": "^18.0.0 || ^19.0.0",