@themodcraft/addon-packs 1.1.1 → 1.1.3

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 +1,2 @@
1
- "use client";import{jsx as A}from"react/jsx-runtime";import{useEffect as m,useRef as V,useState as y}from"react";function j({className:u,durationMs:s=800,format:f=e=>String(Math.round(e)),value:t}){const[e,l]=y(t),n=V(t);return m(()=>{n.current=e},[e]),m(()=>{const p=performance.now(),a=n.current,d=t-a;let r=0;function o(h){const c=Math.min((h-p)/s,1),x=1-Math.pow(1-c,3),i=a+d*x;n.current=i,l(i),c<1&&(r=requestAnimationFrame(o))}return r=requestAnimationFrame(o),()=>cancelAnimationFrame(r)},[s,t]),A("span",{className:u,children:f(e)})}export{j as AnimatedNumber};
1
+ "use client";
2
+ import{useState as r,useRef as n,useEffect as t}from"react";import{jsx as e}from"react/jsx-runtime";function a({className:a,durationMs:o=800,format:c=r=>String(Math.round(r)),value:m}){const[i,u]=r(m),s=n(m);return t(()=>{s.current=i},[i]),t(()=>{const r=performance.now(),n=s.current,t=m-n;let e=0;return e=requestAnimationFrame(function a(c){const m=Math.min((c-r)/o,1),i=1-Math.pow(1-m,3),f=n+t*i;s.current=f,u(f),m<1&&(e=requestAnimationFrame(a))}),()=>cancelAnimationFrame(e)},[o,m]),e("span",{className:a,children:c(i)})}export{a as AnimatedNumber};
@@ -1 +1 @@
1
- import{AnimatedNumber as r}from"./AnimatedNumber";export{r as AnimatedNumber};
1
+ export{AnimatedNumber}from"./AnimatedNumber.js";
@@ -1 +1 @@
1
- function h(t){return Math.max(0,Math.min(255,Math.round(t)))}function x(t){return Math.max(0,Math.min(1,t))}function i(t){return h(t).toString(16).padStart(2,"0").toUpperCase()}function b(t){const n=t.trim();if(/^#([0-9A-Fa-f]{3})$/.test(n)){const[,r]=n.match(/^#([0-9A-Fa-f]{3})$/)??[];return`#${r.split("").map(e=>`${e}${e}`).join("")}`.toUpperCase()}return/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(n)?n.toUpperCase():null}function M({h:t,l:n,s:r}){const e=(t%360+360)%360,o=Math.max(0,Math.min(100,r))/100,g=Math.max(0,Math.min(100,n))/100,a=(1-Math.abs(2*g-1))*o,s=a*(1-Math.abs(e/60%2-1)),p=g-a/2;let u=0,f=0,c=0;return e<60?(u=a,f=s):e<120?(u=s,f=a):e<180?(f=a,c=s):e<240?(f=s,c=a):e<300?(u=s,c=a):(u=a,c=s),{b:h((c+p)*255),g:h((f+p)*255),r:h((u+p)*255)}}function H(t){return!!b(t)}function F(t){const n=t.match(/-?\d+(\.\d+)?/g)?.map(Number);if(!n||n.length<3)return null;const[r,e,o]=n;return`#${i(r)}${i(e)}${i(o)}`}function l({a:t,b:n,g:r,r:e}){const o=typeof t=="number"?i(x(t)*255):"";return`#${i(e)}${i(r)}${i(n)}${o}`}function m(t){const n=b(t);return n?{b:parseInt(n.slice(5,7),16),g:parseInt(n.slice(3,5),16),r:parseInt(n.slice(1,3),16)}:null}function d(t){if(typeof t=="string"){const e=b(t);return e||F(t)}if("r"in t)return l(t);const n=M(t),r=typeof t.a=="number"?i(x(t.a)*255):"";return`${l(n)}${r}`}function $(t,n){const r=m(t);return r?l({b:r.b+n,g:r.g+n,r:r.r+n}):"#000000"}function C(t,n){return $(t,-Math.abs(n))}function y(t,n){return $(t,Math.abs(n))}function A(t,n){const r=m(t);if(!r)return"#000000";if(n==="contrast")return(r.r*299+r.g*587+r.b*114)/1e3>=128?"#000000":"#FFFFFF";if(n==="invert")return l({b:255-r.b,g:255-r.g,r:255-r.r});const e=.2126*r.r+.7152*r.g+.0722*r.b;return l({b:e,g:e,r:e})}export{d as convertToHex,C as darken,m as hexToRgb,H as isValidHex,y as lighten,F as rgbToHex,l as rgbaToHex,$ as shiftColorLightness,A as transformColor};
1
+ function t(t){return Math.max(0,Math.min(255,Math.round(t)))}function n(t){return Math.max(0,Math.min(1,t))}function r(n){return t(n).toString(16).padStart(2,"0").toUpperCase()}function e(t){const n=t.trim();if(/^#([0-9A-Fa-f]{3})$/.test(n)){const[,t]=n.match(/^#([0-9A-Fa-f]{3})$/)??[];return`#${t.split("").map(t=>`${t}${t}`).join("")}`.toUpperCase()}return/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(n)?n.toUpperCase():null}function a(t){return Boolean(e(t))}function u(t){const n=t.match(/-?\d+(\.\d+)?/g)?.map(Number);if(!n||n.length<3)return null;const[e,a,u]=n;return`#${r(e)}${r(a)}${r(u)}`}function o({a:t,b:e,g:a,r:u}){const o="number"==typeof t?r(255*n(t)):"";return`#${r(u)}${r(a)}${r(e)}${o}`}function i(t){const n=e(t);return n?{b:parseInt(n.slice(5,7),16),g:parseInt(n.slice(3,5),16),r:parseInt(n.slice(1,3),16)}:null}function c(a){if("string"==typeof a){const t=e(a);return t||u(a)}if("r"in a)return o(a);const i=function({h:n,l:r,s:e}){const a=(n%360+360)%360,u=Math.max(0,Math.min(100,e))/100,o=Math.max(0,Math.min(100,r))/100,i=(1-Math.abs(2*o-1))*u,c=i*(1-Math.abs(a/60%2-1)),s=o-i/2;let f=0,b=0,h=0;return a<60?(f=i,b=c):a<120?(f=c,b=i):a<180?(b=i,h=c):a<240?(b=c,h=i):a<300?(f=c,h=i):(f=i,h=c),{b:t(255*(h+s)),g:t(255*(b+s)),r:t(255*(f+s))}}(a),c="number"==typeof a.a?r(255*n(a.a)):"";return`${o(i)}${c}`}function s(t,n){const r=i(t);return r?o({b:r.b+n,g:r.g+n,r:r.r+n}):"#000000"}function f(t,n){return s(t,-Math.abs(n))}function b(t,n){return s(t,Math.abs(n))}function h(t,n){const r=i(t);if(!r)return"#000000";if("contrast"===n){return(299*r.r+587*r.g+114*r.b)/1e3>=128?"#000000":"#FFFFFF"}if("invert"===n)return o({b:255-r.b,g:255-r.g,r:255-r.r});const e=.2126*r.r+.7152*r.g+.0722*r.b;return o({b:e,g:e,r:e})}export{c as convertToHex,f as darken,i as hexToRgb,a as isValidHex,b as lighten,u as rgbToHex,o as rgbaToHex,s as shiftColorLightness,h as transformColor};
@@ -1 +1 @@
1
- import{convertToHex as r,darken as t,hexToRgb as x,isValidHex as g,lighten as i,rgbaToHex as n,rgbToHex as s,shiftColorLightness as a,transformColor as h}from"./color-utils";export{r as convertToHex,t as darken,x as hexToRgb,g as isValidHex,i as lighten,s as rgbToHex,n as rgbaToHex,a as shiftColorLightness,h as transformColor};
1
+ export{convertToHex,darken,hexToRgb,isValidHex,lighten,rgbToHex,rgbaToHex,shiftColorLightness,transformColor}from"./color-utils.js";
@@ -1 +1,2 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import{BarElement as f,CategoryScale as y,Chart as h,LinearScale as b,Tooltip as x}from"chart.js";import{useMemo as n}from"react";import{Bar as C}from"react-chartjs-2";h.register(y,b,f,x);function M(e,r){return{...e,...r,plugins:{...e.plugins,...r?.plugins},scales:{...e.scales,...r?.scales}}}function j({ariaLabel:e="Mini bar chart",chartOptions:r,className:p,data:l,height:m,maxValue:c,showXAxis:i=!1,showYAxis:t=!0}){const s=c??Math.max(...l.map(a=>a.value),1),u=m??Math.max(l.length*42,120),d=n(()=>({labels:l.map(a=>a.label),datasets:[{backgroundColor:l.map(a=>a.color??"#0b63ce"),borderRadius:6,borderSkipped:!1,data:l.map(a=>a.value),label:e}]}),[e,l]),g=n(()=>M({animation:{duration:220},indexAxis:"y",maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0}},responsive:!0,scales:{x:{beginAtZero:!0,display:i,grid:{display:i},max:s,ticks:{precision:0}},y:{display:t,grid:{display:!1}}}},r),[s,r,i,t]);return o("div",{"aria-label":e,className:p,role:"img",style:{height:u},children:o(C,{data:d,options:g})})}export{j as MiniBarChart};
1
+ "use client";
2
+ import{c as a}from"react/compiler-runtime";import{Chart as i,CategoryScale as t,LinearScale as e,BarElement as r,Tooltip as s}from"chart.js";import{Bar as n}from"react-chartjs-2";import{jsx as o}from"react/jsx-runtime";function l(i){const t=a(31),{ariaLabel:e,chartOptions:r,className:s,data:l,height:u,maxValue:g,showXAxis:h,showYAxis:b}=i,x=void 0===e?"Mini bar chart":e,f=void 0!==h&&h,y=void 0===b||b;let v;t[0]!==l||t[1]!==g?(v=g??Math.max(...l.map(m),1),t[0]=l,t[1]=g,t[2]=v):v=t[2];const A=v,j=u??Math.max(42*l.length,120);let k,M,w,N,R;t[3]!==l?(k=l.map(d),t[3]=l,t[4]=k):k=t[4],t[5]!==l?(M=l.map(p),t[5]=l,t[6]=M):M=t[6],t[7]!==l?(w=l.map(c),t[7]=l,t[8]=w):w=t[8],t[9]!==x||t[10]!==M||t[11]!==w?(N=[{backgroundColor:M,borderRadius:6,borderSkipped:!1,data:w,label:x}],t[9]=x,t[10]=M,t[11]=w,t[12]=N):N=t[12],t[13]!==k||t[14]!==N?(R={labels:k,datasets:N},t[13]=k,t[14]=N,t[15]=R):R=t[15];const C=R;let L;t[16]!==A||t[17]!==r||t[18]!==f||t[19]!==y?(L=function(a,i){return{...a,...i,plugins:{...a.plugins,...i?.plugins},scales:{...a.scales,...i?.scales}}}({animation:{duration:220},indexAxis:"y",maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0}},responsive:!0,scales:{x:{beginAtZero:!0,display:f,grid:{display:f},max:A,ticks:{precision:0}},y:{display:y,grid:{display:!1}}}},r),t[16]=A,t[17]=r,t[18]=f,t[19]=y,t[20]=L):L=t[20];const O=L;let S,V,X;return t[21]!==j?(S={height:j},t[21]=j,t[22]=S):S=t[22],t[23]!==C||t[24]!==O?(V=o(n,{data:C,options:O}),t[23]=C,t[24]=O,t[25]=V):V=t[25],t[26]!==x||t[27]!==s||t[28]!==S||t[29]!==V?(X=o("div",{"aria-label":x,className:s,role:"img",style:S,children:V}),t[26]=x,t[27]=s,t[28]=S,t[29]=V,t[30]=X):X=t[30],X}function c(a){return a.value}function p(a){return a.color??"#0b63ce"}function d(a){return a.label}function m(a){return a.value}i.register(t,e,r,s);export{l as MiniBarChart};
@@ -1 +1 @@
1
- import{MiniBarChart as i}from"./MiniBarChart";export{i as MiniBarChart};
1
+ export{MiniBarChart}from"./MiniBarChart.js";
@@ -1 +1 @@
1
- export*from"./artstyles";export*from"./animations";export*from"./charts";export*from"./configs";export*from"./integrations";export*from"./paywall";export*from"./providers";export*from"./themes";
1
+ export*from"@themodcraft/addon-animations";export*from"@themodcraft/addon-artstyles";export*from"@themodcraft/addon-charts";export*from"@themodcraft/addon-configs";export*from"@themodcraft/addon-integrations";export*from"@themodcraft/addon-paywall";export*from"@themodcraft/addon-providers";export*from"@themodcraft/addon-themes";
@@ -1 +1 @@
1
- function u(e){return e?.user?{email:e.user.email??null,image:e.user.image??null,name:e.user.name??null,username:e.user.username??null}:null}export{u as profileFromBetterAuthSession};
1
+ function e(e){return e?.user?{email:e.user.email??null,image:e.user.image??null,name:e.user.name??null,username:e.user.username??null}:null}export{e as profileFromBetterAuthSession};
@@ -1 +1,2 @@
1
- "use client";import{jsxs as D,jsx as g}from"react/jsx-runtime";import{createContext as B,isValidElement as T,useCallback as v,useContext as R,useEffect as q,useMemo as _,useState as F}from"react";const P=B(null);function k(e){return e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[]}function z(e,o,r="all"){const n=k(o);return n.length?r==="any"?n.some(t=>e.includes(t)):n.every(t=>e.includes(t)):!0}function G(e,o,r="all"){const n=k(o);return r==="any"&&n.some(t=>e.includes(t))?[]:n.filter(t=>!e.includes(t))}function L(e,o,r){return typeof e=="function"&&!T(e)?e(o,r):e}function M({decision:e,startCheckout:o}){const r=e.plan?.label??"Pro";return D("div",{role:"group",style:{border:"1px solid var(--tmc-color-border, #d7dde5)",borderRadius:"8px",padding:"16px"},children:[D("p",{style:{color:"var(--tmc-color-text, #111827)",fontWeight:600,margin:0},children:[r," access required"]}),g("p",{style:{color:"var(--tmc-color-text-muted, #5f6b7a)",margin:"8px 0 0"},children:"This package area is locked until the required entitlement is active."}),g("button",{onClick:()=>{o()},style:{background:"var(--tmc-color-accent, #0b63ce)",border:0,borderRadius:"6px",color:"var(--tmc-color-accent-text, #ffffff)",cursor:"pointer",marginTop:"12px",padding:"8px 12px"},type:"button",children:"Unlock"})]})}function H({checkoutUrl:e,children:o,defaultFallback:r,entitlements:n=[],onCheckout:t,plans:a=[],resolveEntitlements:i,status:s="ready"}){const[l,m]=F(n),[p,x]=F(s);q(()=>{m(n),x(s)},[n,s]);const w=v(async()=>{if(!i)return l;x("loading");try{const c=await i();return m(c),x("ready"),c}catch{return x("error"),[]}},[i,l]);q(()=>{i&&w()},[w,i]);const d=v((c,u="all",f)=>{const y=k(c),h=a.find(b=>b.id===f)??a.find(b=>b.entitlements?.some(A=>y.includes(A)));return{allowed:p==="ready"&&z(l,y,u),missingEntitlements:G(l,y,u),plan:h,requiredEntitlements:y,status:p}},[a,l,p]),C=v((c,u="all")=>d(c,u).allowed,[d]),E=v(async(c,u)=>{const f=a.find(j=>j.id===c)??u?.plan,y=u??d(f?.entitlements,"all",f?.id);if(t){await t(f,y);return}const h=f?.checkoutUrl??e;h&&typeof window<"u"&&(window.location.href=h)},[e,d,t,a]),S=_(()=>({checkoutUrl:e,defaultFallback:r,entitlements:l,getDecision:d,hasEntitlements:C,plans:a,refreshEntitlements:w,startCheckout:E,status:p}),[e,r,d,C,a,w,l,p,E]);return g(P.Provider,{value:S,children:o})}function O(){const e=R(P);if(!e)throw new Error("usePaywall must be used inside PaywallProvider.");return e}function J(){return R(P)}function K({children:e,fallback:o,loadingFallback:r=null,mode:n="all",planId:t,required:a}){const i=O(),s=i.getDecision(a,n,t),l={refreshEntitlements:i.refreshEntitlements,startCheckout:()=>i.startCheckout(t,s)};if(s.status==="loading")return r;if(s.allowed)return e;const m=L(o??i.defaultFallback,s,l);return m||g(M,{decision:s,startCheckout:l.startCheckout})}export{K as PaywallGate,H as PaywallProvider,J as useOptionalPaywall,O as usePaywall};
1
+ "use client";
2
+ import{c as e}from"react/compiler-runtime";import{useState as t,useEffect as n,useContext as r,isValidElement as o,createContext as l}from"react";import{jsx as i,jsxs as c}from"react/jsx-runtime";const a=l(null);function s(e){return e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[]}function u(e,t,n="all"){const r=s(t);return"any"===n&&r.some(t=>e.includes(t))?[]:r.filter(t=>!e.includes(t))}function d(t){const n=e(13),{decision:r,startCheckout:o}=t,l=r.plan?.label??"Pro";let a,s,u,d,f,m,h,p;return n[0]===Symbol.for("react.memo_cache_sentinel")?(a={border:"1px solid var(--tmc-color-border, #d7dde5)",borderRadius:"8px",padding:"16px"},s={color:"var(--tmc-color-text, #111827)",fontWeight:600,margin:0},n[0]=a,n[1]=s):(a=n[0],s=n[1]),n[2]!==l?(u=c("p",{style:s,children:[l," access required"]}),n[2]=l,n[3]=u):u=n[3],n[4]===Symbol.for("react.memo_cache_sentinel")?(d=i("p",{style:{color:"var(--tmc-color-text-muted, #5f6b7a)",margin:"8px 0 0"},children:"This package area is locked until the required entitlement is active."}),n[4]=d):d=n[4],n[5]!==o?(f=()=>{o()},n[5]=o,n[6]=f):f=n[6],n[7]===Symbol.for("react.memo_cache_sentinel")?(m={background:"var(--tmc-color-accent, #0b63ce)",border:0,borderRadius:"6px",color:"var(--tmc-color-accent-text, #ffffff)",cursor:"pointer",marginTop:"12px",padding:"8px 12px"},n[7]=m):m=n[7],n[8]!==f?(h=i("button",{onClick:f,style:m,type:"button",children:"Unlock"}),n[8]=f,n[9]=h):h=n[9],n[10]!==u||n[11]!==h?(p=c("div",{role:"group",style:a,children:[u,d,h]}),n[10]=u,n[11]=h,n[12]=p):p=n[12],p}function f(r){const o=e(39),{checkoutUrl:l,children:c,defaultFallback:d,entitlements:f,onCheckout:m,plans:h,resolveEntitlements:p,status:y}=r;let b;o[0]!==f?(b=void 0===f?[]:f,o[0]=f,o[1]=b):b=o[1];const k=b;let v;o[2]!==h?(v=void 0===h?[]:h,o[2]=h,o[3]=v):v=o[3];const g=v,w=void 0===y?"ready":y,[x,C]=t(k),[_,E]=t(w);let P,S,q;o[4]!==k||o[5]!==w?(P=()=>{C(k),E(w)},S=[k,w],o[4]=k,o[5]=w,o[6]=P,o[7]=S):(P=o[6],S=o[7]),n(P,S),o[8]!==p||o[9]!==x?(q=async()=>{if(!p)return x;E("loading");try{const e=await p();return C(e),E("ready"),e}catch{return E("error"),[]}},o[8]=p,o[9]=x,o[10]=q):q=o[10];const F=q;let U,A,B;o[11]!==F||o[12]!==p?(A=()=>{p&&F()},U=[F,p],o[11]=F,o[12]=p,o[13]=U,o[14]=A):(U=o[13],A=o[14]),n(A,U),o[15]!==g||o[16]!==x||o[17]!==_?(B=(e,t,n)=>{const r=void 0===t?"all":t,o=s(e),l=g.find(e=>e.id===n)??g.find(e=>e.entitlements?.some(e=>o.includes(e))),i="ready"===_&&function(e,t,n="all"){const r=s(t);return!r.length||("any"===n?r.some(t=>e.includes(t)):r.every(t=>e.includes(t)))}(x,o,r);return{allowed:i,missingEntitlements:u(x,o,r),plan:l,requiredEntitlements:o,status:_}},o[15]=g,o[16]=x,o[17]=_,o[18]=B):B=o[18];const D=B;let R;o[19]!==D?(R=(e,t)=>D(e,void 0===t?"all":t).allowed,o[19]=D,o[20]=R):R=o[20];const T=R;let j;o[21]!==l||o[22]!==D||o[23]!==m||o[24]!==g?(j=async(e,t)=>{const n=g.find(t=>t.id===e)??t?.plan,r=t??D(n?.entitlements,"all",n?.id);if(m)return void await m(n,r);const o=n?.checkoutUrl??l;o&&"undefined"!=typeof window&&(window.location.href=o)},o[21]=l,o[22]=D,o[23]=m,o[24]=g,o[25]=j):j=o[25];const I=j;let W;o[26]!==l||o[27]!==d||o[28]!==D||o[29]!==T||o[30]!==g||o[31]!==F||o[32]!==x||o[33]!==_||o[34]!==I?(W={checkoutUrl:l,defaultFallback:d,entitlements:x,getDecision:D,hasEntitlements:T,plans:g,refreshEntitlements:F,startCheckout:I,status:_},o[26]=l,o[27]=d,o[28]=D,o[29]=T,o[30]=g,o[31]=F,o[32]=x,o[33]=_,o[34]=I,o[35]=W):W=o[35];const z=W;let G;return o[36]!==c||o[37]!==z?(G=i(a.Provider,{value:z,children:c}),o[36]=c,o[37]=z,o[38]=G):G=o[38],G}function m(){const e=r(a);if(!e)throw new Error("usePaywall must be used inside PaywallProvider.");return e}function h(){return r(a)}function p(t){const n=e(14),{children:r,fallback:l,loadingFallback:c,mode:a,planId:s,required:u}=t,f=void 0===c?null:c,h=void 0===a?"all":a,p=m();let y,b,k,v;if(n[0]!==r||n[1]!==l||n[2]!==f||n[3]!==h||n[4]!==p||n[5]!==s||n[6]!==u?(v=Symbol.for("react.early_return_sentinel"),b=p.getDecision(u,h,s),y={refreshEntitlements:p.refreshEntitlements,startCheckout:()=>p.startCheckout(s,b)},"loading"!==b.status?b.allowed?v=r:k=function(e,t,n){return"function"!=typeof e||o(e)?e:e(t,n)}(l??p.defaultFallback,b,y):v=f,n[0]=r,n[1]=l,n[2]=f,n[3]=h,n[4]=p,n[5]=s,n[6]=u,n[7]=y,n[8]=b,n[9]=k,n[10]=v):(y=n[7],b=n[8],k=n[9],v=n[10]),v!==Symbol.for("react.early_return_sentinel"))return v;if(k)return k;let g;return n[11]!==y.startCheckout||n[12]!==b?(g=i(d,{decision:b,startCheckout:y.startCheckout}),n[11]=y.startCheckout,n[12]=b,n[13]=g):g=n[13],g}export{p as PaywallGate,f as PaywallProvider,h as useOptionalPaywall,m as usePaywall};
@@ -1 +1,2 @@
1
- "use client";import{jsx as F}from"react/jsx-runtime";import{createContext as _,useCallback as v,useContext as b,useEffect as E,useMemo as q,useState as A}from"react";const I=_(null),h="tmc:nexus-auth";function g(n,o){return o||(n?"authenticated":"anonymous")}function k(n){if(!n||typeof window>"u")return null;try{const o=window.localStorage.getItem(n);return o?JSON.parse(o):null}catch{return null}}function p(n,o){if(!(!n||typeof window>"u")){if(!o){window.localStorage.removeItem(n),window.dispatchEvent(new CustomEvent(h,{detail:null}));return}window.localStorage.setItem(n,JSON.stringify(o)),window.dispatchEvent(new CustomEvent(h,{detail:o}))}}function D({children:n,loginUrl:o,logoutUrl:C,onLogout:L,profileImage:S,refreshOnMount:N=!0,resolveProfileImage:d,resolveUser:m,settingsUrl:P,status:x,storageKey:u="tmc-nexus-auth",user:i=null}){const[f,c]=A(i),[j,l]=A(S??i?.image??null),[J,r]=A(g(i,x));E(()=>{const t=k(u);if(t){c(t.user),l(t.profileImage),r(t.status);return}c(i),l(S??i?.image??null),r(g(i,x))},[i,S,x,u]),E(()=>{function t(e){if(e.key!==u)return;const s=k(u);c(s?.user??null),l(s?.profileImage??null),r(s?.status??"anonymous")}function a(e){const s=e.detail;c(s?.user??null),l(s?.profileImage??null),r(s?.status??"anonymous")}return window.addEventListener("storage",t),window.addEventListener(h,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(h,a)}},[u]);const O=v(async()=>{if(!m)return f;r("loading");const t=await m(),a=d?await d(t):t?.image??null;return c(t),l(a),r(t?"authenticated":"anonymous"),p(u,{profileImage:a,status:t?"authenticated":"anonymous",user:t}),t},[d,m,u,f]);E(()=>{if(!N||!m)return;let t=!1;async function a(){const e=await m?.();if(t)return;const s=d?await d(e??null):e?.image??null;t||(c(e??null),l(s),r(e?"authenticated":"anonymous"),p(u,{profileImage:s,status:e?"authenticated":"anonymous",user:e??null}))}return a(),()=>{t=!0}},[N,d,m,u]);const w=v(t=>{const a=t?.image??null,e=t?"authenticated":"anonymous";c(t),l(a),r(e),p(u,{profileImage:a,status:e,user:t})},[u]),R=v(async()=>{await L?.(),w(null),p(u,null)},[L,w,u]),y=q(()=>({loginUrl:o,logout:R,logoutUrl:C,profileImage:j,refreshUser:O,setUser:w,settingsUrl:P,status:J,user:f}),[o,R,C,O,j,J,w,P,f]);return F(I.Provider,{value:y,children:n})}function G(){const n=b(I);if(!n)throw new Error("useAuth must be used inside AuthProvider.");return n}function H(){return b(I)}export{D as AuthProvider,G as useAuth,H as useOptionalAuth};
1
+ "use client";
2
+ import{c as t}from"react/compiler-runtime";import{useState as e,useEffect as n,useContext as o,createContext as r}from"react";import{jsx as u}from"react/jsx-runtime";const i=r(null),s="tmc:nexus-auth";function l(t,e){return e||(t?"authenticated":"anonymous")}function a(t){if(!t||"undefined"==typeof window)return null;try{const e=window.localStorage.getItem(t);return e?JSON.parse(e):null}catch{return null}}function c(t,e){if(t&&"undefined"!=typeof window){if(!e)return window.localStorage.removeItem(t),void window.dispatchEvent(new CustomEvent(s,{detail:null}));window.localStorage.setItem(t,JSON.stringify(e)),window.dispatchEvent(new CustomEvent(s,{detail:e}))}}function d(o){const r=t(42),{children:d,loginUrl:m,logoutUrl:f,onLogout:g,profileImage:w,refreshOnMount:v,resolveProfileImage:h,resolveUser:p,settingsUrl:y,status:I,storageKey:E,user:U}=o,L=void 0===v||v,S=void 0===E?"tmc-nexus-auth":E,x=void 0===U?null:U,[O,P]=e(x),[A,C]=e(w??x?.image??null);let J;r[0]!==x||r[1]!==I?(J=l(x,I),r[0]=x,r[1]=I,r[2]=J):J=r[2];const[N,b]=e(J);let j,k,K,M,q;r[3]!==x||r[4]!==w||r[5]!==I||r[6]!==S?(j=()=>{const t=a(S);if(t)return P(t.user),C(t.profileImage),void b(t.status);P(x),C(w??x?.image??null),b(l(x,I))},k=[x,w,I,S],r[3]=x,r[4]=w,r[5]=I,r[6]=S,r[7]=j,r[8]=k):(j=r[7],k=r[8]),n(j,k),r[9]!==S?(K=()=>{const t=function(t){if(t.key!==S)return;const e=a(S);P(e?.user??null),C(e?.profileImage??null),b(e?.status??"anonymous")},e=function(t){const e=t.detail;P(e?.user??null),C(e?.profileImage??null),b(e?.status??"anonymous")};return window.addEventListener("storage",t),window.addEventListener(s,e),()=>{window.removeEventListener("storage",t),window.removeEventListener(s,e)}},M=[S],r[9]=S,r[10]=K,r[11]=M):(K=r[10],M=r[11]),n(K,M),r[12]!==h||r[13]!==p||r[14]!==S||r[15]!==O?(q=async()=>{if(!p)return O;b("loading");const t=await p(),e=h?await h(t):t?.image??null;return P(t),C(e),b(t?"authenticated":"anonymous"),c(S,{profileImage:e,status:t?"authenticated":"anonymous",user:t}),t},r[12]=h,r[13]=p,r[14]=S,r[15]=O,r[16]=q):q=r[16];const z=q;let B,D,F;r[17]!==L||r[18]!==h||r[19]!==p||r[20]!==S?(B=()=>{if(!L||!p)return;let t=!1;return async function(){const e=await(p?.());if(t)return;const n=h?await h(e??null):e?.image??null;t||(P(e??null),C(n),b(e?"authenticated":"anonymous"),c(S,{profileImage:n,status:e?"authenticated":"anonymous",user:e??null}))}(),()=>{t=!0}},D=[L,h,p,S],r[17]=L,r[18]=h,r[19]=p,r[20]=S,r[21]=B,r[22]=D):(B=r[21],D=r[22]),n(B,D),r[23]!==S?(F=t=>{const e=t?.image??null,n=t?"authenticated":"anonymous";P(t),C(e),b(n),c(S,{profileImage:e,status:n,user:t})},r[23]=S,r[24]=F):F=r[24];const G=F;let H;r[25]!==g||r[26]!==G||r[27]!==S?(H=async()=>{await(g?.()),G(null),c(S,null)},r[25]=g,r[26]=G,r[27]=S,r[28]=H):H=r[28];const Q=H;let R;r[29]!==m||r[30]!==Q||r[31]!==f||r[32]!==z||r[33]!==A||r[34]!==N||r[35]!==G||r[36]!==y||r[37]!==O?(R={loginUrl:m,logout:Q,logoutUrl:f,profileImage:A,refreshUser:z,setUser:G,settingsUrl:y,status:N,user:O},r[29]=m,r[30]=Q,r[31]=f,r[32]=z,r[33]=A,r[34]=N,r[35]=G,r[36]=y,r[37]=O,r[38]=R):R=r[38];const T=R;let V;return r[39]!==d||r[40]!==T?(V=u(i.Provider,{value:T,children:d}),r[39]=d,r[40]=T,r[41]=V):V=r[41],V}function m(){const t=o(i);if(!t)throw new Error("useAuth must be used inside AuthProvider.");return t}function f(){return o(i)}export{d as AuthProvider,m as useAuth,f as useOptionalAuth};
@@ -1 +1,2 @@
1
- "use client";import{jsx as n}from"react/jsx-runtime";import{createContext as i,useContext as u,useMemo as s}from"react";const o=i({});function f({children:t,config:e={}}){const r=s(()=>e,[e]);return n(o.Provider,{value:r,children:t})}function C(){return u(o)}export{f as ConfigProvider,C as useConfig};
1
+ "use client";
2
+ import{c as r}from"react/compiler-runtime";import{useContext as t,createContext as o}from"react";import{jsx as e}from"react/jsx-runtime";const n=o({});function i(t){const o=r(5),{children:i,config:c}=t;let m;o[0]!==c?(m=void 0===c?{}:c,o[0]=c,o[1]=m):m=o[1];const u=m;let f;return o[2]!==i||o[3]!==u?(f=e(n.Provider,{value:u,children:i}),o[2]=i,o[3]=u,o[4]=f):f=o[4],f}function c(){return t(n)}export{i as ConfigProvider,c as useConfig};
@@ -1 +1 @@
1
- export*from"./auth-provider";export*from"./config-provider";export*from"./keyboard-provider";export*from"./nexus-provider";export*from"./theme-provider";export*from"./ui-overlay-provider";
1
+ export{AuthProvider,useAuth,useOptionalAuth}from"./auth-provider.js";export{ConfigProvider,useConfig}from"./config-provider.js";export{KeyboardProvider,handleKeyboardClick,useKeyboard,useKeyboardShortcut,useOptionalKeyboard}from"./keyboard-provider.js";export{NexusProvider}from"./nexus-provider.js";export{ThemeProvider,useOptionalTheme,useTheme}from"./theme-provider.js";export{UIOverlayProvider,useOptionalUIOverlay,useUIOverlay}from"./ui-overlay-provider.js";
@@ -1 +1,2 @@
1
- "use client";import{jsx as p}from"react/jsx-runtime";import{createContext as K,useCallback as f,useContext as y,useEffect as s,useMemo as w,useRef as E}from"react";const h=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-keyboard-focusable='true']"].join(","),u=K(null);function k(e){return e instanceof HTMLElement?e.isContentEditable||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement:!1}function B(e,n){return n.enabled!==!1&&e.key.toLowerCase()===n.key.toLowerCase()&&!!e.altKey==!!n.altKey&&!!e.ctrlKey==!!n.ctrlKey&&!!e.metaKey==!!n.metaKey&&!!e.shiftKey==!!n.shiftKey}function b(e){return Array.from(document.querySelectorAll(e)).filter(n=>{const a=window.getComputedStyle(n);return!n.hasAttribute("disabled")&&a.display!=="none"&&a.visibility!=="hidden"})}function v({children:e,focusSelector:n=h,shortcuts:a=[]}){const i=E(new Map);s(()=>{i.current=new Map(a.map(t=>[t.id,t]))},[a]),s(()=>{function t(r){for(const o of i.current.values())B(r,o)&&(!o.allowInEditable&&k(r.target)||((o.preventDefault??!0)&&r.preventDefault(),o.handler(r)))}return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]);const d=f(t=>(i.current.set(t.id,t),()=>{i.current.delete(t.id)}),[]),l=f((t,r=n)=>{const o=b(r);if(!o.length)return;const c=document.activeElement instanceof HTMLElement?o.indexOf(document.activeElement):-1,x=c===-1?0:(c+t+o.length)%o.length;o[x]?.focus()},[n]),m=w(()=>({focusFirst:(t=n)=>b(t)[0]?.focus(),focusNext:(t=n)=>l(1,t),focusPrevious:(t=n)=>l(-1,t),registerShortcut:d}),[l,n,d]);return p(u.Provider,{value:m,children:e})}function C(){const e=y(u);if(!e)throw new Error("useKeyboard must be used inside KeyboardProvider.");return e}function T(){return y(u)}function g(e){const n=C();s(()=>n.registerShortcut(e),[n,e])}function H(e,n){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),n())}export{v as KeyboardProvider,H as handleKeyboardClick,C as useKeyboard,g as useKeyboardShortcut,T as useOptionalKeyboard};
1
+ "use client";
2
+ import{c as e}from"react/compiler-runtime";import{useRef as t,useEffect as n,useContext as o,createContext as r}from"react";import{jsx as i}from"react/jsx-runtime";const c=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-keyboard-focusable='true']"].join(","),l=r(null);function a(e){return e instanceof HTMLElement&&(e.isContentEditable||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)}function s(e,t){return!1!==t.enabled&&e.key.toLowerCase()===t.key.toLowerCase()&&Boolean(e.altKey)===Boolean(t.altKey)&&Boolean(e.ctrlKey)===Boolean(t.ctrlKey)&&Boolean(e.metaKey)===Boolean(t.metaKey)&&Boolean(e.shiftKey)===Boolean(t.shiftKey)}function u(e){return Array.from(document.querySelectorAll(e)).filter(e=>{const t=window.getComputedStyle(e);return!e.hasAttribute("disabled")&&"none"!==t.display&&"hidden"!==t.visibility})}function d(o){const r=e(24),{children:d,focusSelector:m,shortcuts:y}=o,b=void 0===m?c:m;let v;r[0]!==y?(v=void 0===y?[]:y,r[0]=y,r[1]=v):v=r[1];const h=v;let p;r[2]===Symbol.for("react.memo_cache_sentinel")?(p=new Map,r[2]=p):p=r[2];const w=t(p);let E,K,L,S,x;r[3]!==h?(E=()=>{w.current=new Map(h.map(f))},K=[h],r[3]=h,r[4]=E,r[5]=K):(E=r[4],K=r[5]),n(E,K),r[6]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{const e=function(e){for(const t of w.current.values())s(e,t)&&(!t.allowInEditable&&a(e.target)||((t.preventDefault??1)&&e.preventDefault(),t.handler(e)))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},S=[],r[6]=L,r[7]=S):(L=r[6],S=r[7]),n(L,S),r[8]===Symbol.for("react.memo_cache_sentinel")?(x=e=>(w.current.set(e.id,e),()=>{w.current.delete(e.id)}),r[8]=x):x=r[8];const B=x;let g;r[9]!==b?(g=(e,t)=>{const n=u(void 0===t?b:t);if(!n.length)return;const o=document.activeElement instanceof HTMLElement?n.indexOf(document.activeElement):-1,r=-1===o?0:(o+e+n.length)%n.length;n[r]?.focus()},r[9]=b,r[10]=g):g=r[10];const k=g;let M,T,_,H;r[11]!==b?(M=e=>{const t=void 0===e?b:e;return u(t)[0]?.focus()},r[11]=b,r[12]=M):M=r[12],r[13]!==k||r[14]!==b?(T=e=>k(1,void 0===e?b:e),_=e=>k(-1,void 0===e?b:e),r[13]=k,r[14]=b,r[15]=T,r[16]=_):(T=r[15],_=r[16]),r[17]!==M||r[18]!==T||r[19]!==_?(H={focusFirst:M,focusNext:T,focusPrevious:_,registerShortcut:B},r[17]=M,r[18]=T,r[19]=_,r[20]=H):H=r[20];const A=H;let C;return r[21]!==d||r[22]!==A?(C=i(l.Provider,{value:A,children:d}),r[21]=d,r[22]=A,r[23]=C):C=r[23],C}function f(e){return[e.id,e]}function m(){const e=o(l);if(!e)throw new Error("useKeyboard must be used inside KeyboardProvider.");return e}function y(){return o(l)}function b(t){const o=e(4),r=m();let i,c;o[0]!==r||o[1]!==t?(i=()=>r.registerShortcut(t),c=[r,t],o[0]=r,o[1]=t,o[2]=i,o[3]=c):(i=o[2],c=o[3]),n(i,c)}function v(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())}export{d as KeyboardProvider,v as handleKeyboardClick,m as useKeyboard,b as useKeyboardShortcut,y as useOptionalKeyboard};
@@ -1 +1,2 @@
1
- "use client";import{jsx as r}from"react/jsx-runtime";import{AuthProvider as n}from"./auth-provider";import{ConfigProvider as f}from"./config-provider";import{KeyboardProvider as c}from"./keyboard-provider";import{ThemeProvider as h}from"./theme-provider";import{UIOverlayProvider as l}from"./ui-overlay-provider";function a({auth:o,children:e,config:i,keyboard:m,overlay:d,theme:t}){return r(f,{...i,children:r(h,{...t,children:r(n,{...o,children:r(c,{...m,children:r(l,{...d,children:e})})})})})}export{a as NexusProvider};
1
+ "use client";
2
+ import{c as r}from"react/compiler-runtime";import{AuthProvider as o}from"./auth-provider.js";import{ConfigProvider as e}from"./config-provider.js";import{KeyboardProvider as i}from"./keyboard-provider.js";import{ThemeProvider as t}from"./theme-provider.js";import{UIOverlayProvider as m}from"./ui-overlay-provider.js";import{jsx as n}from"react/jsx-runtime";function p(p){const c=r(15),{auth:d,children:f,config:h,keyboard:l,overlay:a,theme:s}=p;let u,v,j,y,b;return c[0]!==f||c[1]!==a?(u=n(m,{...a,children:f}),c[0]=f,c[1]=a,c[2]=u):u=c[2],c[3]!==l||c[4]!==u?(v=n(i,{...l,children:u}),c[3]=l,c[4]=u,c[5]=v):v=c[5],c[6]!==d||c[7]!==v?(j=n(o,{...d,children:v}),c[6]=d,c[7]=v,c[8]=j):j=c[8],c[9]!==j||c[10]!==s?(y=n(t,{...s,children:j}),c[9]=j,c[10]=s,c[11]=y):y=c[11],c[12]!==h||c[13]!==y?(b=n(e,{...h,children:y}),c[12]=h,c[13]=y,c[14]=b):b=c[14],b}export{p as NexusProvider};
@@ -1 +1,2 @@
1
- "use client";import{jsx as $}from"react/jsx-runtime";import{createContext as N,useCallback as I,useContext as T,useEffect as w,useMemo as P,useState as b}from"react";const f=N(null),E="tmc:nexus-theme-mode",v="tmc:nexus-theme-id";function M(i){return i.startsWith("--")?i:`--tmc-${i.replace(/[A-Z]/g,m=>`-${m.toLowerCase()}`).replace(/[_\s]+/g,"-")}`}function x(i,m){if(!m){document.documentElement.removeAttribute(i);return}document.documentElement.setAttribute(i,m)}function j({children:i,defaultMode:m="system",defaultThemeId:L,storageKey:t,themes:c=[]}){const V=L??c[0]?.id??"default",[h,a]=b(V),[l,u]=b(m),n=c.find(e=>e.id===h)??c[0];w(()=>{if(!t)return;const e=window.localStorage.getItem(`${t}:theme`),s=window.localStorage.getItem(`${t}:mode`);e&&a(e),(s==="light"||s==="dark"||s==="system")&&u(s)},[t]),w(()=>{if(!t)return;function e(o){o.key===`${t}:theme`&&o.newValue&&a(o.newValue),o.key===`${t}:mode`&&(o.newValue==="light"||o.newValue==="dark"||o.newValue==="system")&&u(o.newValue)}function s(o){const r=o.detail?.mode;(r==="light"||r==="dark"||r==="system")&&u(r)}function d(o){const r=o.detail?.themeId;r&&a(r)}return window.addEventListener("storage",e),window.addEventListener(E,s),window.addEventListener(v,d),()=>{window.removeEventListener("storage",e),window.removeEventListener(E,s),window.removeEventListener(v,d)}},[t]),w(()=>{const e=document.documentElement,s=[];return x("data-tmc-theme",n?.id),x("data-tmc-theme-mode",l),n?.className&&e.classList.add(n.className),n?.colorScheme&&(e.style.colorScheme=n.colorScheme),Object.entries(n?.cssVariables??{}).forEach(([d,o])=>{const r=M(d);s.push(r),e.style.setProperty(r,String(o))}),()=>{s.forEach(d=>e.style.removeProperty(d)),n?.className&&e.classList.remove(n.className),n?.colorScheme&&e.style.removeProperty("color-scheme")}},[n,l]);const p=I(e=>{a(e),t&&(window.localStorage.setItem(`${t}:theme`,e),window.dispatchEvent(new CustomEvent(v,{detail:{themeId:e}})))},[t]),S=I(e=>{u(e),t&&(window.localStorage.setItem(`${t}:mode`,e),window.dispatchEvent(new CustomEvent(E,{detail:{mode:e}})))},[t]),C=P(()=>({activeTheme:n,mode:l,setMode:S,setThemeId:p,themeId:h,themes:c}),[n,l,S,p,h,c]);return $(f.Provider,{value:C,children:i})}function g(){const i=T(f);if(!i)throw new Error("useTheme must be used inside ThemeProvider.");return i}function O(){return T(f)}export{j as ThemeProvider,O as useOptionalTheme,g as useTheme};
1
+ "use client";
2
+ import{c as e}from"react/compiler-runtime";import{useState as t,useEffect as o,useContext as n,createContext as r}from"react";import{jsx as s}from"react/jsx-runtime";const m=r(null),d="tmc:nexus-theme-mode",c="tmc:nexus-theme-id";function i(e,t){t?document.documentElement.setAttribute(e,t):document.documentElement.removeAttribute(e)}function a(n){const r=e(29),{children:a,defaultMode:l,defaultThemeId:u,storageKey:w,themes:h}=n,v=void 0===l?"system":l;let f;r[0]!==h?(f=void 0===h?[]:h,r[0]=h,r[1]=f):f=r[1];const E=f,g=u??E[0]?.id??"default",[y,p]=t(g),[I,L]=t(v);let S;r[2]!==y||r[3]!==E?(S=E.find(e=>e.id===y)??E[0],r[2]=y,r[3]=E,r[4]=S):S=r[4];const $=S;let V,b,k,P,T,x,N;r[5]!==w?(V=()=>{if(!w)return;const e=window.localStorage.getItem(`${w}:theme`),t=window.localStorage.getItem(`${w}:mode`);e&&p(e),"light"!==t&&"dark"!==t&&"system"!==t||L(t)},b=[w],r[5]=w,r[6]=V,r[7]=b):(V=r[6],b=r[7]),o(V,b),r[8]!==w?(k=()=>{if(!w)return;const e=function(e){e.key===`${w}:theme`&&e.newValue&&p(e.newValue),e.key!==`${w}:mode`||"light"!==e.newValue&&"dark"!==e.newValue&&"system"!==e.newValue||L(e.newValue)},t=function(e){const t=e.detail?.mode;"light"!==t&&"dark"!==t&&"system"!==t||L(t)},o=function(e){const t=e.detail?.themeId;t&&p(t)};return window.addEventListener("storage",e),window.addEventListener(d,t),window.addEventListener(c,o),()=>{window.removeEventListener("storage",e),window.removeEventListener(d,t),window.removeEventListener(c,o)}},P=[w],r[8]=w,r[9]=k,r[10]=P):(k=r[9],P=r[10]),o(k,P),r[11]!==$||r[12]!==I?(x=()=>{const e=document.documentElement,t=[];return i("data-tmc-theme",$?.id),i("data-tmc-theme-mode",I),$?.className&&e.classList.add($.className),$?.colorScheme&&(e.style.colorScheme=$.colorScheme),Object.entries($?.cssVariables??{}).forEach(o=>{const[n,r]=o,s=(m=n).startsWith("--")?m:`--tmc-${m.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[_\s]+/g,"-")}`;var m;t.push(s),e.style.setProperty(s,String(r))}),()=>{t.forEach(t=>e.style.removeProperty(t)),$?.className&&e.classList.remove($.className),$?.colorScheme&&e.style.removeProperty("color-scheme")}},T=[$,I],r[11]=$,r[12]=I,r[13]=T,r[14]=x):(T=r[13],x=r[14]),o(x,T),r[15]!==w?(N=e=>{p(e),w&&(window.localStorage.setItem(`${w}:theme`,e),window.dispatchEvent(new CustomEvent(c,{detail:{themeId:e}})))},r[15]=w,r[16]=N):N=r[16];const A=N;let C;r[17]!==w?(C=e=>{L(e),w&&(window.localStorage.setItem(`${w}:mode`,e),window.dispatchEvent(new CustomEvent(d,{detail:{mode:e}})))},r[17]=w,r[18]=C):C=r[18];const j=C;let M;r[19]!==$||r[20]!==I||r[21]!==j||r[22]!==A||r[23]!==y||r[24]!==E?(M={activeTheme:$,mode:I,setMode:j,setThemeId:A,themeId:y,themes:E},r[19]=$,r[20]=I,r[21]=j,r[22]=A,r[23]=y,r[24]=E,r[25]=M):M=r[25];const K=M;let O;return r[26]!==a||r[27]!==K?(O=s(m.Provider,{value:K,children:a}),r[26]=a,r[27]=K,r[28]=O):O=r[28],O}function l(){const e=n(m);if(!e)throw new Error("useTheme must be used inside ThemeProvider.");return e}function u(){return n(m)}export{a as ThemeProvider,u as useOptionalTheme,l as useTheme};
@@ -1 +1,2 @@
1
- "use client";import{jsx as y}from"react/jsx-runtime";import{createContext as p,useCallback as l,useContext as c,useMemo as x,useState as d}from"react";const a=p(null);function m({children:o}){const[r,n]=d([]),u=l(e=>{n(t=>t.includes(e)?t:[...t,e])},[]),i=l(e=>{n(t=>t.filter(s=>s!==e))},[]),v=l(e=>{n(t=>t.includes(e)?t.filter(s=>s!==e):[...t,e])},[]),O=x(()=>({closeOverlay:i,isOverlayOpen:e=>r.includes(e),openOverlay:u,openOverlayIds:r,toggleOverlay:v}),[i,u,r,v]);return y(a.Provider,{value:O,children:o})}function U(){const o=c(a);if(!o)throw new Error("useUIOverlay must be used inside UIOverlayProvider.");return o}function C(){return c(a)}export{m as UIOverlayProvider,C as useOptionalUIOverlay,U as useUIOverlay};
1
+ "use client";
2
+ import{c as e}from"react/compiler-runtime";import{useState as r,useContext as t,createContext as o}from"react";import{jsx as n}from"react/jsx-runtime";const l=o(null);function c(t){const o=e(12),{children:c}=t;let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],o[0]=i):i=o[0];const[s,m]=r(i);let a;o[1]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{m(r=>r.includes(e)?r:[...r,e])},o[1]=a):a=o[1];const u=a;let f;o[2]===Symbol.for("react.memo_cache_sentinel")?(f=e=>{m(r=>r.filter(r=>r!==e))},o[2]=f):f=o[2];const y=f;let d;o[3]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{m(r=>r.includes(e)?r.filter(r=>r!==e):[...r,e])},o[3]=d):d=o[3];const v=d;let p,O;o[4]!==s?(p=e=>s.includes(e),o[4]=s,o[5]=p):p=o[5],o[6]!==s||o[7]!==p?(O={closeOverlay:y,isOverlayOpen:p,openOverlay:u,openOverlayIds:s,toggleOverlay:v},o[6]=s,o[7]=p,o[8]=O):O=o[8];const _=O;let h;return o[9]!==c||o[10]!==_?(h=n(l.Provider,{value:_,children:c}),o[9]=c,o[10]=_,o[11]=h):h=o[11],h}function i(){const e=t(l);if(!e)throw new Error("useUIOverlay must be used inside UIOverlayProvider.");return e}function s(){return t(l)}export{c as UIOverlayProvider,s as useOptionalUIOverlay,i as useUIOverlay};
File without changes
File without changes
@@ -1 +1 @@
1
- :root{--neutral-50: #FFFFFF;--neutral-100: #D9D9D9;--neutral-200: #9E9E9E;--neutral-300: #828282;--neutral-400: #696969;--neutral-500: #4A4A4A;--neutral-600: #3c3c3c;--neutral-700: #212121;--neutral-800: #161616;--neutral-850: #131313;--neutral-900: #121212;--neutral-999: #000000;--accent-green-400: #5DFF33;--accent-green-500: #30FA00;--accent-green-600: #28D900;--accent-green-700: #21BA00;--accent-green-800: #137D00;--accent-green-900: #064600;--accent-green-999: #000300;--accent-blue-500: #005EFE;--accent-blue-600: #0051DD;--accent-blue-700: #0044BD;--accent-blue-800: #002B80;--accent-blue-900: #001447;--accent-blue-999: #000003;--accent-cyan-400: #00f2ff;--accent-cyan-500: #00d2de;--accent-cyan-600: #00b4be;--accent-cyan-700: #00969e;--accent-cyan-750: #007980;--accent-cyan-800: #005e63;--accent-cyan-850: #004348;--accent-cyan-900: #002b2e;--accent-cyan-950: #001416;--accent-cyan-999: #000303;--border-radius: 15px;--border-radius-sm: 6px;--font-mono: "JetBrains Mono", "Fira Code", monospace;--font-main: "Inter", system-ui, sans-serif;--font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;--glass-border: rgba(255, 255, 255, .08);--glass-bg: rgba(10, 10, 10, .6);--glow-green: 0 0 15px rgba(48, 250, 0, .3);--glow-blue: 0 0 15px rgba(0, 94, 254, .3)}@media(prefers-color-scheme:dark){:root{--primary-background: var(--neutral-700);--secondary-background: var(--neutral-800);--primary-text: var(--neutral-50);--secondary-text: var(--neutral-300);--tertiary-text: var(--neutral-500);--border-color: var(--neutral-600);--cta-color: var(--accent-green-500);--link-color: var(--accent-blue-500);--hover-overlay: rgba(0, 0, 0, .49)}}:root[data-tmc-theme-mode=light]{--primary-background: #f3f5f8;--secondary-background: #fbfcfe;--primary-text: #151821;--secondary-text: #5f6b7a;--tertiary-text: #7a8795;--border-color: #d7dde5;--cta-color: var(--accent-blue-500);--link-color: var(--accent-blue-700);--hover-overlay: rgba(0, 94, 254, .08)}:root[data-tmc-theme-mode=dark]{--primary-background: var(--neutral-700);--secondary-background: var(--neutral-800);--primary-text: var(--neutral-50);--secondary-text: var(--neutral-300);--tertiary-text: var(--neutral-500);--border-color: var(--neutral-600);--cta-color: var(--accent-green-500);--link-color: var(--accent-blue-500);--hover-overlay: rgba(0, 0, 0, .49)}
1
+ :root{--neutral-50:#fff;--neutral-100:#d9d9d9;--neutral-200:#9e9e9e;--neutral-300:#828282;--neutral-400:#696969;--neutral-500:#4a4a4a;--neutral-600:#3c3c3c;--neutral-700:#212121;--neutral-800:#161616;--neutral-850:#131313;--neutral-900:#121212;--neutral-999:#000;--accent-green-400:#5dff33;--accent-green-500:#30fa00;--accent-green-600:#28d900;--accent-green-700:#21ba00;--accent-green-800:#137d00;--accent-green-900:#064600;--accent-green-999:#000300;--accent-blue-500:#005efe;--accent-blue-600:#0051dd;--accent-blue-700:#0044bd;--accent-blue-800:#002b80;--accent-blue-900:#001447;--accent-blue-999:#000003;--accent-cyan-400:#00f2ff;--accent-cyan-500:#00d2de;--accent-cyan-600:#00b4be;--accent-cyan-700:#00969e;--accent-cyan-750:#007980;--accent-cyan-800:#005e63;--accent-cyan-850:#004348;--accent-cyan-900:#002b2e;--accent-cyan-950:#001416;--accent-cyan-999:#000303;--border-radius:15px;--border-radius-sm:6px;--font-mono:"JetBrains Mono","Fira Code",monospace;--font-main:"Inter",system-ui,sans-serif;--font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--glass-border:hsla(0,0%,100%,.08);--glass-bg:hsla(0,0%,4%,.6);--glow-green:0 0 15px rgba(48,250,0,.3);--glow-blue:0 0 15px rgba(0,94,254,.3)}@media (prefers-color-scheme:dark){:root{--primary-background:var(--neutral-700);--secondary-background:var(--neutral-800);--primary-text:var(--neutral-50);--secondary-text:var(--neutral-300);--tertiary-text:var(--neutral-500);--border-color:var(--neutral-600);--cta-color:var(--accent-green-500);--link-color:var(--accent-blue-500);--hover-overlay:rgba(0,0,0,.49)}}:root[data-tmc-theme-mode=light]{--primary-background:#f3f5f8;--secondary-background:#fbfcfe;--primary-text:#151821;--secondary-text:#5f6b7a;--tertiary-text:#7a8795;--border-color:#d7dde5;--cta-color:var(--accent-blue-500);--link-color:var(--accent-blue-700);--hover-overlay:rgba(0,94,254,.08)}:root[data-tmc-theme-mode=dark]{--primary-background:var(--neutral-700);--secondary-background:var(--neutral-800);--primary-text:var(--neutral-50);--secondary-text:var(--neutral-300);--tertiary-text:var(--neutral-500);--border-color:var(--neutral-600);--cta-color:var(--accent-green-500);--link-color:var(--accent-blue-500);--hover-overlay:rgba(0,0,0,.49)}
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@themodcraft/addon-packs",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "type": "module",
8
- "files": ["dist"],
8
+ "files": [
9
+ "dist"
10
+ ],
9
11
  "exports": {
10
12
  ".": {
11
13
  "types": "./dist/index.d.ts",
@@ -80,19 +82,19 @@
80
82
  "typecheck": "tsc -p tsconfig.json --noEmit"
81
83
  },
82
84
  "dependencies": {
83
- "@themodcraft/addon-animations": "1.1.1",
84
- "@themodcraft/addon-artstyles": "1.1.1",
85
- "@themodcraft/addon-charts": "1.1.1",
86
- "@themodcraft/addon-configs": "1.1.1",
87
- "@themodcraft/addon-integrations": "1.1.1",
88
- "@themodcraft/addon-paywall": "1.1.1",
89
- "@themodcraft/addon-providers": "1.1.1",
90
- "@themodcraft/addon-themes": "1.1.1",
91
- "@themodcraft/license-client": "1.1.1"
85
+ "@themodcraft/addon-animations": "1.1.3",
86
+ "@themodcraft/addon-artstyles": "1.1.3",
87
+ "@themodcraft/addon-charts": "1.1.3",
88
+ "@themodcraft/addon-configs": "1.1.3",
89
+ "@themodcraft/addon-integrations": "1.1.3",
90
+ "@themodcraft/addon-paywall": "1.1.3",
91
+ "@themodcraft/addon-providers": "1.1.3",
92
+ "@themodcraft/addon-themes": "1.1.3",
93
+ "@themodcraft/license-client": "1.1.3"
92
94
  },
93
95
  "peerDependencies": {
94
- "@themodcraft/core-ui": "1.1.1",
95
- "@themodcraft/pro-kit": "1.1.1",
96
+ "@themodcraft/core-ui": "1.1.3",
97
+ "@themodcraft/pro-kit": "1.1.3",
96
98
  "better-auth": "*",
97
99
  "react": "^19.0.0",
98
100
  "react-dom": "^19.0.0"
File without changes