@themodcraft/addon-packs 1.1.1 → 1.1.2
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.
- package/dist/addons/animations/animated-number/AnimatedNumber.js +2 -1
- package/dist/addons/animations/animated-number/index.js +1 -1
- package/dist/addons/artstyles/colors/color-utils.js +1 -1
- package/dist/addons/artstyles/colors/index.js +1 -1
- package/dist/addons/charts/mini-bar-chart/MiniBarChart.js +2 -1
- package/dist/addons/charts/mini-bar-chart/index.js +1 -1
- package/dist/addons/index.js +1 -1
- package/dist/addons/integrations/better-auth/better-auth.js +1 -1
- package/dist/addons/paywall/Paywall.js +2 -1
- package/dist/addons/providers/runtime/auth-provider.js +2 -1
- package/dist/addons/providers/runtime/config-provider.js +2 -1
- package/dist/addons/providers/runtime/index.js +1 -1
- package/dist/addons/providers/runtime/keyboard-provider.js +2 -1
- package/dist/addons/providers/runtime/nexus-provider.js +2 -1
- package/dist/addons/providers/runtime/theme-provider.js +2 -1
- package/dist/addons/providers/runtime/ui-overlay-provider.js +2 -1
- package/dist/configs/themodcraft-v3/navigation.json +0 -0
- package/dist/configs/themodcraft-v3/sliderHome.json +0 -0
- package/dist/theme-packs/themodcraft-v3/color-scheme.css +1 -1
- package/package.json +15 -13
- package/dist/addons/animations/animated-number/AnimatedNumber.types.js +0 -0
- package/dist/addons/charts/mini-bar-chart/MiniBarChart.types.js +0 -0
- package/dist/addons/paywall/Paywall.types.js +0 -0
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
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
|
-
|
|
1
|
+
export{AnimatedNumber}from"./AnimatedNumber.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
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
|
-
|
|
1
|
+
export{convertToHex,darken,hexToRgb,isValidHex,lighten,rgbToHex,rgbaToHex,shiftColorLightness,transformColor}from"./color-utils.js";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
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
|
-
|
|
1
|
+
export{MiniBarChart}from"./MiniBarChart.js";
|
package/dist/addons/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"
|
|
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
|
|
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";
|
|
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";
|
|
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";
|
|
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
|
|
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";
|
|
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";
|
|
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";
|
|
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";
|
|
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
|
|
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.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"type": "module",
|
|
8
|
-
"files": [
|
|
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.
|
|
84
|
-
"@themodcraft/addon-artstyles": "1.1.
|
|
85
|
-
"@themodcraft/addon-charts": "1.1.
|
|
86
|
-
"@themodcraft/addon-configs": "1.1.
|
|
87
|
-
"@themodcraft/addon-integrations": "1.1.
|
|
88
|
-
"@themodcraft/addon-paywall": "1.1.
|
|
89
|
-
"@themodcraft/addon-providers": "1.1.
|
|
90
|
-
"@themodcraft/addon-themes": "1.1.
|
|
91
|
-
"@themodcraft/license-client": "1.1.
|
|
85
|
+
"@themodcraft/addon-animations": "1.1.2",
|
|
86
|
+
"@themodcraft/addon-artstyles": "1.1.2",
|
|
87
|
+
"@themodcraft/addon-charts": "1.1.2",
|
|
88
|
+
"@themodcraft/addon-configs": "1.1.2",
|
|
89
|
+
"@themodcraft/addon-integrations": "1.1.2",
|
|
90
|
+
"@themodcraft/addon-paywall": "1.1.2",
|
|
91
|
+
"@themodcraft/addon-providers": "1.1.2",
|
|
92
|
+
"@themodcraft/addon-themes": "1.1.2",
|
|
93
|
+
"@themodcraft/license-client": "1.1.2"
|
|
92
94
|
},
|
|
93
95
|
"peerDependencies": {
|
|
94
|
-
"@themodcraft/core-ui": "1.1.
|
|
95
|
-
"@themodcraft/pro-kit": "1.1.
|
|
96
|
+
"@themodcraft/core-ui": "1.1.2",
|
|
97
|
+
"@themodcraft/pro-kit": "1.1.2",
|
|
96
98
|
"better-auth": "*",
|
|
97
99
|
"react": "^19.0.0",
|
|
98
100
|
"react-dom": "^19.0.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|