New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nuxtjs/color-mode

Package Overview
Dependencies
Maintainers
5
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxtjs/color-mode - npm Package Compare versions

Comparing version 3.1.2 to 3.1.3

2

dist/module.json
{
"name": "@nuxtjs/color-mode",
"version": "3.1.2",
"version": "3.1.3",
"configKey": "colorMode",

@@ -5,0 +5,0 @@ "compatibility": {

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

const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("<%= options.storageKey %>")||"<%= options.preference %>";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addClass(value),w["<%= options.globalName %>"]={preference,value,getColorScheme,addClass,removeClass};function addClass(e){const o="<%= options.classPrefix %>"+e+"<%= options.classSuffix %>";de.classList?de.classList.add(o):de.className+=" "+o}function removeClass(e){const o="<%= options.classPrefix %>"+e+"<%= options.classSuffix %>";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),"")}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"<%= options.fallback %>"}
const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("<%= options.storageKey %>")||"<%= options.preference %>";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["<%= options.globalName %>"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o="<%= options.classPrefix %>"+e+"<%= options.classSuffix %>",t="<%= options.dataValue %>";de.classList?de.classList.add(o):de.className+=" "+o,de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o="<%= options.classPrefix %>"+e+"<%= options.classSuffix %>",t="<%= options.dataValue %>";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"<%= options.fallback %>"}
{
"name": "@nuxtjs/color-mode",
"version": "3.1.2",
"version": "3.1.3",
"description": "Dark and Light mode for Nuxt with auto detection",

@@ -5,0 +5,0 @@ "repository": "nuxt-community/color-mode-module",

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