Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nextjs-darkmode

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nextjs-darkmode - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

dist/chunk-24GHFFXD.mjs

2

dist/client/core/core.js

@@ -1,1 +0,1 @@

"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},w=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!M.call(t,r)&&r!==o&&a(t,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return t};var L=t=>w(a({},"__esModule",{value:!0}),t);var D={};T(D,{Core:()=>k});module.exports=L(D);var l="system",i="dark",v="";var C=require("r18gs");var g=()=>(0,C.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m:l,s:i};let t=document.documentElement;return{m:(e=t.getAttribute("data-m"))!=null?e:l,s:t.getAttribute("data-sm")}});var f=require("react");var S=t=>{var n;let[e,o]=["system","dark"];window.u=(r,c)=>{let s=r===e?c:r,d=document.documentElement;s===o?d.classList.add(o):d.classList.remove(o),[["sm",c],["rm",s],["m",r]].forEach(([P,R])=>d.setAttribute(`data-${P}`,R)),localStorage.setItem(t,r)},window.m=matchMedia(`(prefers-color-scheme: ${o})`),u((n=localStorage.getItem(t))!=null?n:e,m.matches?o:"")};var h=require("react/jsx-runtime"),p,y,A=({n:t,k:e})=>(0,h.jsx)("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${S.toString()})('${e}')`},nonce:t}),b=(t="none",e="")=>{let o=document.createElement("style");return o.textContent=`*,*:after,*:before{transition:${t.split(";")[0]} !important;}`,e&&o.setAttribute("nonce",e),document.head.appendChild(o),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(o),1)}},k=({t,nonce:e,k:o="o"})=>{typeof window!="undefined"&&!window.m&&S(o);let[{m:n,s:r},c]=g();return(0,f.useEffect)(()=>{[p,y]=[m,u],p.addEventListener("change",()=>c(s=>({...s,s:p.matches?i:v}))),addEventListener("storage",s=>{s.key===o&&c(d=>({...d,m:s.newValue}))})},[]),(0,f.useEffect)(()=>{let s=b(t,e);y(n,r),s()},[r,n,t,e]),(0,h.jsx)(A,{n:e,k:o})};0&&(module.exports={Core});
"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(o,e)=>{for(var t in e)a(o,t,{get:e[t],enumerable:!0})},w=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!M.call(o,r)&&r!==t&&a(o,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return o};var L=o=>w(a({},"__esModule",{value:!0}),o);var D={};T(D,{Core:()=>k});module.exports=L(D);var l="system",i="dark",v="";var C=require("r18gs");var g=()=>(0,C.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m:l,s:i};let[o,e]=["m","sm"].map(t=>document.documentElement.getAttribute("data-"+t));return{m:o!=null?o:l,s:e}});var f=require("react");var S=o=>{var n;let[e,t]=["system","dark"];window.u=(r,c)=>{let s=r===e?c:r,d=document.documentElement;s===t?d.classList.add(t):d.classList.remove(t),[["sm",c],["rm",s],["m",r]].forEach(([P,R])=>d.setAttribute(`data-${P}`,R)),localStorage.setItem(o,r)},window.m=matchMedia(`(prefers-color-scheme: ${t})`),u((n=localStorage.getItem(o))!=null?n:e,m.matches?t:"")};var h=require("react/jsx-runtime"),p,y,A=({n:o,k:e})=>(0,h.jsx)("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${S.toString()})('${e}')`},nonce:o}),b=(o="none",e="")=>{let t=document.createElement("style");return t.textContent=`*,*:after,*:before{transition:${o.split(";")[0]} !important;}`,e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(t),1)}},k=({t:o,nonce:e,k:t="o"})=>{typeof window!="undefined"&&!window.m&&S(t);let[{m:n,s:r},c]=g();return(0,f.useEffect)(()=>{[p,y]=[m,u],p.addEventListener("change",()=>c(s=>({...s,s:p.matches?i:v}))),addEventListener("storage",s=>{s.key===t&&c(d=>({...d,m:s.newValue}))})},[]),(0,f.useEffect)(()=>{let s=b(o,e);y(n,r),s()},[r,n,o,e]),(0,h.jsx)(A,{n:e,k:t})};0&&(module.exports={Core});
"use client";
"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},w=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!M.call(t,r)&&r!==o&&a(t,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return t};var L=t=>w(a({},"__esModule",{value:!0}),t);var D={};T(D,{Core:()=>k});module.exports=L(D);var l="system",i="dark",v="";var C=require("r18gs");var g=()=>(0,C.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m:l,s:i};let t=document.documentElement;return{m:(e=t.getAttribute("data-m"))!=null?e:l,s:t.getAttribute("data-sm")}});var f=require("react");var S=t=>{var n;let[e,o]=["system","dark"];window.u=(r,c)=>{let s=r===e?c:r,d=document.documentElement;s===o?d.classList.add(o):d.classList.remove(o),[["sm",c],["rm",s],["m",r]].forEach(([P,R])=>d.setAttribute(`data-${P}`,R)),localStorage.setItem(t,r)},window.m=matchMedia(`(prefers-color-scheme: ${o})`),u((n=localStorage.getItem(t))!=null?n:e,m.matches?o:"")};var h=require("react/jsx-runtime"),p,y,A=({n:t,k:e})=>(0,h.jsx)("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${S.toString()})('${e}')`},nonce:t}),b=(t="none",e="")=>{let o=document.createElement("style");return o.textContent=`*,*:after,*:before{transition:${t.split(";")[0]} !important;}`,e&&o.setAttribute("nonce",e),document.head.appendChild(o),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(o),1)}},k=({t,nonce:e,k:o="o"})=>{typeof window!="undefined"&&!window.m&&S(o);let[{m:n,s:r},c]=g();return(0,f.useEffect)(()=>{[p,y]=[m,u],p.addEventListener("change",()=>c(s=>({...s,s:p.matches?i:v}))),addEventListener("storage",s=>{s.key===o&&c(d=>({...d,m:s.newValue}))})},[]),(0,f.useEffect)(()=>{let s=b(t,e);y(n,r),s()},[r,n,t,e]),(0,h.jsx)(A,{n:e,k:o})};0&&(module.exports={Core});
"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(o,e)=>{for(var t in e)a(o,t,{get:e[t],enumerable:!0})},w=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!M.call(o,r)&&r!==t&&a(o,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return o};var L=o=>w(a({},"__esModule",{value:!0}),o);var D={};T(D,{Core:()=>k});module.exports=L(D);var l="system",i="dark",v="";var C=require("r18gs");var g=()=>(0,C.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m:l,s:i};let[o,e]=["m","sm"].map(t=>document.documentElement.getAttribute("data-"+t));return{m:o!=null?o:l,s:e}});var f=require("react");var S=o=>{var n;let[e,t]=["system","dark"];window.u=(r,c)=>{let s=r===e?c:r,d=document.documentElement;s===t?d.classList.add(t):d.classList.remove(t),[["sm",c],["rm",s],["m",r]].forEach(([P,R])=>d.setAttribute(`data-${P}`,R)),localStorage.setItem(o,r)},window.m=matchMedia(`(prefers-color-scheme: ${t})`),u((n=localStorage.getItem(o))!=null?n:e,m.matches?t:"")};var h=require("react/jsx-runtime"),p,y,A=({n:o,k:e})=>(0,h.jsx)("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${S.toString()})('${e}')`},nonce:o}),b=(o="none",e="")=>{let t=document.createElement("style");return t.textContent=`*,*:after,*:before{transition:${o.split(";")[0]} !important;}`,e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(t),1)}},k=({t:o,nonce:e,k:t="o"})=>{typeof window!="undefined"&&!window.m&&S(t);let[{m:n,s:r},c]=g();return(0,f.useEffect)(()=>{[p,y]=[m,u],p.addEventListener("change",()=>c(s=>({...s,s:p.matches?i:v}))),addEventListener("storage",s=>{s.key===t&&c(d=>({...d,m:s.newValue}))})},[]),(0,f.useEffect)(()=>{let s=b(o,e);y(n,r),s()},[r,n,o,e]),(0,h.jsx)(A,{n:e,k:t})};0&&(module.exports={Core});
"use client";
"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},w=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!M.call(t,r)&&r!==o&&a(t,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return t};var L=t=>w(a({},"__esModule",{value:!0}),t);var D={};T(D,{Core:()=>k});module.exports=L(D);var l="system",i="dark",v="";var C=require("r18gs");var g=()=>(0,C.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m:l,s:i};let t=document.documentElement;return{m:(e=t.getAttribute("data-m"))!=null?e:l,s:t.getAttribute("data-sm")}});var f=require("react");var S=t=>{var n;let[e,o]=["system","dark"];window.u=(r,c)=>{let s=r===e?c:r,d=document.documentElement;s===o?d.classList.add(o):d.classList.remove(o),[["sm",c],["rm",s],["m",r]].forEach(([P,R])=>d.setAttribute(`data-${P}`,R)),localStorage.setItem(t,r)},window.m=matchMedia(`(prefers-color-scheme: ${o})`),u((n=localStorage.getItem(t))!=null?n:e,m.matches?o:"")};var h=require("react/jsx-runtime"),p,y,A=({n:t,k:e})=>(0,h.jsx)("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${S.toString()})('${e}')`},nonce:t}),b=(t="none",e="")=>{let o=document.createElement("style");return o.textContent=`*,*:after,*:before{transition:${t.split(";")[0]} !important;}`,e&&o.setAttribute("nonce",e),document.head.appendChild(o),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(o),1)}},k=({t,nonce:e,k:o="o"})=>{typeof window!="undefined"&&!window.m&&S(o);let[{m:n,s:r},c]=g();return(0,f.useEffect)(()=>{[p,y]=[m,u],p.addEventListener("change",()=>c(s=>({...s,s:p.matches?i:v}))),addEventListener("storage",s=>{s.key===o&&c(d=>({...d,m:s.newValue}))})},[]),(0,f.useEffect)(()=>{let s=b(t,e);y(n,r),s()},[r,n,t,e]),(0,h.jsx)(A,{n:e,k:o})};0&&(module.exports={Core});
"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(o,e)=>{for(var t in e)a(o,t,{get:e[t],enumerable:!0})},w=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!M.call(o,r)&&r!==t&&a(o,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return o};var L=o=>w(a({},"__esModule",{value:!0}),o);var D={};T(D,{Core:()=>k});module.exports=L(D);var l="system",i="dark",v="";var C=require("r18gs");var g=()=>(0,C.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m:l,s:i};let[o,e]=["m","sm"].map(t=>document.documentElement.getAttribute("data-"+t));return{m:o!=null?o:l,s:e}});var f=require("react");var S=o=>{var n;let[e,t]=["system","dark"];window.u=(r,c)=>{let s=r===e?c:r,d=document.documentElement;s===t?d.classList.add(t):d.classList.remove(t),[["sm",c],["rm",s],["m",r]].forEach(([P,R])=>d.setAttribute(`data-${P}`,R)),localStorage.setItem(o,r)},window.m=matchMedia(`(prefers-color-scheme: ${t})`),u((n=localStorage.getItem(o))!=null?n:e,m.matches?t:"")};var h=require("react/jsx-runtime"),p,y,A=({n:o,k:e})=>(0,h.jsx)("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${S.toString()})('${e}')`},nonce:o}),b=(o="none",e="")=>{let t=document.createElement("style");return t.textContent=`*,*:after,*:before{transition:${o.split(";")[0]} !important;}`,e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(t),1)}},k=({t:o,nonce:e,k:t="o"})=>{typeof window!="undefined"&&!window.m&&S(t);let[{m:n,s:r},c]=g();return(0,f.useEffect)(()=>{[p,y]=[m,u],p.addEventListener("change",()=>c(s=>({...s,s:p.matches?i:v}))),addEventListener("storage",s=>{s.key===t&&c(d=>({...d,m:s.newValue}))})},[]),(0,f.useEffect)(()=>{let s=b(o,e);y(n,r),s()},[r,n,o,e]),(0,h.jsx)(A,{n:e,k:t})};0&&(module.exports={Core});
"use client";
"use strict";var d=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var o in e)d(t,o,{get:e[o],enumerable:!0})},v=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!b.call(t,r)&&r!==o&&d(t,r,{get:()=>e[r],enumerable:!(s=w(e,r))||s.enumerable});return t};var _=t=>v(d({},"__esModule",{value:!0}),t);var C={};y(C,{Switch:()=>z});module.exports=_(C);var m={switch:"ndm__switch",n:"ndm__n"};var u=require("r18gs");var a="system",l="dark",k="",i=[a,l,k];var S=()=>(0,u.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m:a,s:l};let t=document.documentElement;return{m:(e=t.getAttribute("data-m"))!=null?e:a,s:t.getAttribute("data-sm")}});var n=require("react/jsx-runtime"),z=({tag:t="button",size:e=24,skipSystem:o,children:s,...r})=>{let[p,x]=S(),f=()=>{let c=i.indexOf(p.m),h=i.length;o&&c===h-1&&(c=0),x({...p,m:i[(c+1)%h]})};return s?(0,n.jsxs)(t,{suppressHydrationWarning:!0,...r,onClick:f,children:[(0,n.jsx)("div",{className:m.switch,style:{"--size":`${e}px`}}),s]}):(0,n.jsx)(t,{suppressHydrationWarning:!0,...r,className:[r.className,m.switch].join(" "),style:{"--size":`${e}px`},onClick:f})};0&&(module.exports={Switch});
"use strict";var c=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var v=(e,t)=>{for(var r in t)c(e,r,{get:t[r],enumerable:!0})},g=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _(t))!b.call(e,o)&&o!==r&&c(e,o,{get:()=>t[o],enumerable:!(s=w(t,o))||s.enumerable});return e};var k=e=>g(c({},"__esModule",{value:!0}),e);var R={};v(R,{Switch:()=>C});module.exports=k(R);var p={switch:"ndm__switch",n:"ndm__n"};var f=require("r18gs");var n="system",a="dark",z="",i=[a,z,n];var h=()=>(0,f.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m:n,s:a};let[e,t]=["m","sm"].map(r=>document.documentElement.getAttribute("data-"+r));return{m:e!=null?e:n,s:t}});var m=require("react/jsx-runtime"),C=({tag:e="button",size:t=24,skipSystem:r,children:s,...o})=>{let[{m:u,s:S},x]=h(),y=i.length-(r?1:0);o.onClick=()=>x({s:S,m:i[(i.indexOf(u)+1)%y]});let d=p.switch,l={"--size":`${t}px`};return s||(o.className+=" "+d,o.style={...o.style,...l}),(0,m.jsxs)(e,{suppressHydrationWarning:!0,...o,children:[s&&(0,m.jsx)("div",{className:d,style:l}),s]})};0&&(module.exports={Switch});

@@ -20,2 +20,2 @@ import { HTMLProps } from "react";

*/
export declare const Switch: ({ tag: Tag, size, skipSystem, children, ...props }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
export declare const Switch: ({ tag: Tag, size, skipSystem, children, ...tagProps }: SwitchProps) => import("react/jsx-runtime").JSX.Element;

@@ -1,1 +0,1 @@

"use strict";var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var o in e)d(t,o,{get:e[o],enumerable:!0})},v=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!b.call(t,r)&&r!==o&&d(t,r,{get:()=>e[r],enumerable:!(s=x(e,r))||s.enumerable});return t};var _=t=>v(d({},"__esModule",{value:!0}),t);var C={};y(C,{Switch:()=>z});module.exports=_(C);var m={switch:"ndm__switch",n:"ndm__n"};var S=require("r18gs");var a="system",l="dark",k="",i=[a,l,k];var u=()=>(0,S.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m:a,s:l};let t=document.documentElement;return{m:(e=t.getAttribute("data-m"))!=null?e:a,s:t.getAttribute("data-sm")}});var n=require("react/jsx-runtime"),z=({tag:t="button",size:e=24,skipSystem:o,children:s,...r})=>{let[p,w]=u(),f=()=>{let c=i.indexOf(p.m),h=i.length;o&&c===h-1&&(c=0),w({...p,m:i[(c+1)%h]})};return s?(0,n.jsxs)(t,{suppressHydrationWarning:!0,...r,onClick:f,children:[(0,n.jsx)("div",{className:m.switch,style:{"--size":`${e}px`}}),s]}):(0,n.jsx)(t,{suppressHydrationWarning:!0,...r,className:[r.className,m.switch].join(" "),style:{"--size":`${e}px`},onClick:f})};0&&(module.exports={Switch});
"use strict";var a=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var v=(e,t)=>{for(var r in t)a(e,r,{get:t[r],enumerable:!0})},g=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _(t))!b.call(e,o)&&o!==r&&a(e,o,{get:()=>t[o],enumerable:!(s=w(t,o))||s.enumerable});return e};var k=e=>g(a({},"__esModule",{value:!0}),e);var R={};v(R,{Switch:()=>C});module.exports=k(R);var p={switch:"ndm__switch",n:"ndm__n"};var f=require("r18gs");var n="system",c="dark",z="",i=[c,z,n];var h=()=>(0,f.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m:n,s:c};let[e,t]=["m","sm"].map(r=>document.documentElement.getAttribute("data-"+r));return{m:e!=null?e:n,s:t}});var m=require("react/jsx-runtime"),C=({tag:e="button",size:t=24,skipSystem:r,children:s,...o})=>{let[{m:u,s:S},x]=h(),y=i.length-(r?1:0);o.onClick=()=>x({s:S,m:i[(i.indexOf(u)+1)%y]});let d=p.switch,l={"--size":`${t}px`};return s||(o.className+=" "+d,o.style={...o.style,...l}),(0,m.jsxs)(e,{suppressHydrationWarning:!0,...o,children:[s&&(0,m.jsx)("div",{className:d,style:l}),s]})};0&&(module.exports={Switch});

@@ -1,1 +0,1 @@

"use strict";var m=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(o,e)=>{for(var c in e)m(o,c,{get:e[c],enumerable:!0})},f=(o,e,c,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!d.call(o,r)&&r!==c&&m(o,r,{get:()=>e[r],enumerable:!(s=h(e,r))||s.enumerable});return o};var x=o=>f(m({},"__esModule",{value:!0}),o);var v={};p(v,{DARK:()=>S,LIGHT:()=>n,SYSTEM:()=>t,modes:()=>R});module.exports=x(v);var t="system",S="dark",n="",R=[t,S,n];0&&(module.exports={DARK,LIGHT,SYSTEM,modes});
"use strict";var m=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(o,e)=>{for(var c in e)m(o,c,{get:e[c],enumerable:!0})},f=(o,e,c,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!d.call(o,r)&&r!==c&&m(o,r,{get:()=>e[r],enumerable:!(s=h(e,r))||s.enumerable});return o};var x=o=>f(m({},"__esModule",{value:!0}),o);var v={};p(v,{DARK:()=>S,LIGHT:()=>n,SYSTEM:()=>t,modes:()=>R});module.exports=x(v);var t="system",S="dark",n="",R=[S,n,t];0&&(module.exports={DARK,LIGHT,SYSTEM,modes});

@@ -1,1 +0,1 @@

"use strict";var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(o,e)=>{for(var r in e)c(o,r,{get:e[r],enumerable:!0})},i=(o,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of f(e))!h.call(o,t)&&t!==r&&c(o,t,{get:()=>e[t],enumerable:!(s=l(e,t))||s.enumerable});return o};var a=o=>i(c({},"__esModule",{value:!0}),o);var v={};p(v,{useMode:()=>u});module.exports=a(v);var m="system",d="dark";var S=require("r18gs");var n=()=>(0,S.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m,s:d};let o=document.documentElement;return{m:(e=o.getAttribute("data-m"))!=null?e:m,s:o.getAttribute("data-sm")}});var u=()=>{let[{m:o,s:e},r]=n();return{mode:o,systemMode:e,resolvedMode:o===m?e:o,setMode:s=>r({s:e,m:s})}};0&&(module.exports={useMode});
"use strict";var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(e,o)=>{for(var r in o)c(e,r,{get:o[r],enumerable:!0})},i=(e,o,r,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of f(o))!h.call(e,t)&&t!==r&&c(e,t,{get:()=>o[t],enumerable:!(s=l(o,t))||s.enumerable});return e};var v=e=>i(c({},"__esModule",{value:!0}),e);var a={};p(a,{useMode:()=>R});module.exports=v(a);var m="system",d="dark";var S=require("r18gs");var n=()=>(0,S.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m,s:d};let[e,o]=["m","sm"].map(r=>document.documentElement.getAttribute("data-"+r));return{m:e!=null?e:m,s:o}});var R=()=>{let[{m:e,s:o},r]=n();return{mode:e,systemMode:o,resolvedMode:e===m?o:e,setMode:s=>r({s:o,m:s})}};0&&(module.exports={useMode});

@@ -1,1 +0,1 @@

"use strict";var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(o,e)=>{for(var r in e)c(o,r,{get:e[r],enumerable:!0})},i=(o,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of f(e))!h.call(o,t)&&t!==r&&c(o,t,{get:()=>e[t],enumerable:!(s=l(e,t))||s.enumerable});return o};var a=o=>i(c({},"__esModule",{value:!0}),o);var v={};p(v,{useMode:()=>u});module.exports=a(v);var m="system",d="dark";var S=require("r18gs");var n=()=>(0,S.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m,s:d};let o=document.documentElement;return{m:(e=o.getAttribute("data-m"))!=null?e:m,s:o.getAttribute("data-sm")}});var u=()=>{let[{m:o,s:e},r]=n();return{mode:o,systemMode:e,resolvedMode:o===m?e:o,setMode:s=>r({s:e,m:s})}};0&&(module.exports={useMode});
"use strict";var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(e,o)=>{for(var r in o)c(e,r,{get:o[r],enumerable:!0})},i=(e,o,r,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of f(o))!h.call(e,t)&&t!==r&&c(e,t,{get:()=>o[t],enumerable:!(s=l(o,t))||s.enumerable});return e};var v=e=>i(c({},"__esModule",{value:!0}),e);var a={};p(a,{useMode:()=>R});module.exports=v(a);var m="system",d="dark";var S=require("r18gs");var n=()=>(0,S.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m,s:d};let[e,o]=["m","sm"].map(r=>document.documentElement.getAttribute("data-"+r));return{m:e!=null?e:m,s:o}});var R=()=>{let[{m:e,s:o},r]=n();return{mode:e,systemMode:o,resolvedMode:e===m?o:e,setMode:s=>r({s:o,m:s})}};0&&(module.exports={useMode});
"use client";
"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},w=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!M.call(t,r)&&r!==o&&a(t,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return t};var L=t=>w(a({},"__esModule",{value:!0}),t);var D={};T(D,{Core:()=>k});module.exports=L(D);var l="system",i="dark",v="";var C=require("r18gs");var g=()=>(0,C.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m:l,s:i};let t=document.documentElement;return{m:(e=t.getAttribute("data-m"))!=null?e:l,s:t.getAttribute("data-sm")}});var f=require("react");var S=t=>{var n;let[e,o]=["system","dark"];window.u=(r,c)=>{let s=r===e?c:r,d=document.documentElement;s===o?d.classList.add(o):d.classList.remove(o),[["sm",c],["rm",s],["m",r]].forEach(([P,R])=>d.setAttribute(`data-${P}`,R)),localStorage.setItem(t,r)},window.m=matchMedia(`(prefers-color-scheme: ${o})`),u((n=localStorage.getItem(t))!=null?n:e,m.matches?o:"")};var h=require("react/jsx-runtime"),p,y,A=({n:t,k:e})=>(0,h.jsx)("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${S.toString()})('${e}')`},nonce:t}),b=(t="none",e="")=>{let o=document.createElement("style");return o.textContent=`*,*:after,*:before{transition:${t.split(";")[0]} !important;}`,e&&o.setAttribute("nonce",e),document.head.appendChild(o),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(o),1)}},k=({t,nonce:e,k:o="o"})=>{typeof window!="undefined"&&!window.m&&S(o);let[{m:n,s:r},c]=g();return(0,f.useEffect)(()=>{[p,y]=[m,u],p.addEventListener("change",()=>c(s=>({...s,s:p.matches?i:v}))),addEventListener("storage",s=>{s.key===o&&c(d=>({...d,m:s.newValue}))})},[]),(0,f.useEffect)(()=>{let s=b(t,e);y(n,r),s()},[r,n,t,e]),(0,h.jsx)(A,{n:e,k:o})};0&&(module.exports={Core});
"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var T=(o,e)=>{for(var t in e)a(o,t,{get:e[t],enumerable:!0})},w=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!M.call(o,r)&&r!==t&&a(o,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return o};var L=o=>w(a({},"__esModule",{value:!0}),o);var D={};T(D,{Core:()=>k});module.exports=L(D);var l="system",i="dark",v="";var C=require("r18gs");var y=()=>(0,C.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m:l,s:i};let[o,e]=["m","sm"].map(t=>document.documentElement.getAttribute("data-"+t));return{m:o!=null?o:l,s:e}});var f=require("react");var S=o=>{var n;let[e,t]=["system","dark"];window.u=(r,c)=>{let s=r===e?c:r,d=document.documentElement;s===t?d.classList.add(t):d.classList.remove(t),[["sm",c],["rm",s],["m",r]].forEach(([g,R])=>d.setAttribute(`data-${g}`,R)),localStorage.setItem(o,r)},window.m=matchMedia(`(prefers-color-scheme: ${t})`),u((n=localStorage.getItem(o))!=null?n:e,m.matches?t:"")};var h=require("react/jsx-runtime"),p,P,A=({n:o,k:e})=>(0,h.jsx)("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${S.toString()})('${e}')`},nonce:o}),b=(o="none",e="")=>{let t=document.createElement("style");return t.textContent=`*,*:after,*:before{transition:${o.split(";")[0]} !important;}`,e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(t),1)}},k=({t:o,nonce:e,k:t="o"})=>{typeof window!="undefined"&&!window.m&&S(t);let[{m:n,s:r},c]=y();return(0,f.useEffect)(()=>{[p,P]=[m,u],p.addEventListener("change",()=>c(s=>({...s,s:p.matches?i:v}))),addEventListener("storage",s=>{s.key===t&&c(d=>({...d,m:s.newValue}))})},[]),(0,f.useEffect)(()=>{let s=b(o,e);P(n,r),s()},[r,n,o,e]),(0,h.jsx)(A,{n:e,k:t})};0&&(module.exports={Core});

@@ -1,1 +0,1 @@

"use strict";var m=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var f=(o,e)=>{for(var t in e)m(o,t,{get:e[t],enumerable:!0})},h=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!p.call(o,r)&&r!==t&&m(o,r,{get:()=>e[r],enumerable:!(s=d(e,r))||s.enumerable});return o};var a=o=>h(m({},"__esModule",{value:!0}),o);var R={};f(R,{useStore:()=>u});module.exports=a(R);var S=require("r18gs");var c="system",n="dark";var u=()=>(0,S.useRGS)("ndm",()=>{var e;if(typeof document=="undefined")return{m:c,s:n};let o=document.documentElement;return{m:(e=o.getAttribute("data-m"))!=null?e:c,s:o.getAttribute("data-sm")}});0&&(module.exports={useStore});
"use strict";var m=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var l=(e,o)=>{for(var r in o)m(e,r,{get:o[r],enumerable:!0})},h=(e,o,r,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of p(o))!f.call(e,t)&&t!==r&&m(e,t,{get:()=>o[t],enumerable:!(s=d(o,t))||s.enumerable});return e};var a=e=>h(m({},"__esModule",{value:!0}),e);var R={};l(R,{useStore:()=>u});module.exports=a(R);var S=require("r18gs");var c="system",n="dark";var u=()=>(0,S.useRGS)("ndm",()=>{if(typeof document=="undefined")return{m:c,s:n};let[e,o]=["m","sm"].map(r=>document.documentElement.getAttribute("data-"+r));return{m:e!=null?e:c,s:o}});0&&(module.exports={useStore});

@@ -5,3 +5,3 @@ {

"private": false,
"version": "1.0.6",
"version": "1.0.7",
"description": "Unleash the Power of React Server Components! Use dark/light mode on your site with confidence, without losing any advantages of React Server Components",

@@ -78,3 +78,3 @@ "license": "MPL-2.0",

"dependencies": {
"r18gs": "^2.0.0"
"r18gs": "^2.0.1"
},

@@ -81,0 +81,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc