Socket
Socket
Sign inDemoInstall

@nuxtjs/color-mode

Package Overview
Dependencies
167
Maintainers
6
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.8 to 3.2.0

2

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

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

@@ -13,3 +13,3 @@ export interface ColorModeInstance {

declare module 'vue/types/options' {
interface ComponentOptions<V extends any> {
interface ComponentOptions<V> {
/**

@@ -16,0 +16,0 @@ * Forces a color mode for current page

@@ -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),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,t&&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"),""),t&&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 %>"}
"use strict";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,t&&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"),""),t&&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 %>"}

@@ -10,2 +10,2 @@

export { default } from './module'
export { ModuleOptions, default } from './module'
{
"name": "@nuxtjs/color-mode",
"version": "3.1.8",
"version": "3.2.0",
"description": "Dark and Light mode for Nuxt with auto detection",

@@ -31,24 +31,25 @@ "repository": "nuxt-community/color-mode-module",

"release": "yarn test && standard-version && git push --follow-tags && npm publish",
"test": "yarn lint"
"test": "yarn vitest run --coverage"
},
"dependencies": {
"@nuxt/kit": "^3.0.0-rc.9",
"@nuxt/kit": "^3.0.0",
"lodash.template": "^4.5.0",
"pathe": "^0.3.5"
"pathe": "^1.0.0"
},
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@nuxt/module-builder": "^0.1.7",
"@nuxt/schema": "^3.0.0-rc.9",
"@nuxtjs/eslint-config-typescript": "^10.0.0",
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@nuxt/module-builder": "^0.2.1",
"@nuxt/schema": "^3.0.0",
"@nuxt/test-utils": "^3.0.0",
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"@types/lodash.template": "^4.5.1",
"@typescript-eslint/parser": "^5.34.0",
"babel-jest": "^28.1.3",
"eslint": "^8.22.0",
"husky": "8.0.1",
"jest": "^28.1.3",
"nuxt": "npm:nuxt3@latest",
"@vitest/coverage-c8": "^0.25.3",
"eslint": "^8.28.0",
"husky": "8.0.2",
"nuxt": "3.0.0",
"standard-version": "^9.5.0",
"typescript": "^4.7.4"
"typescript": "^4.9.3",
"vitest": "^0.25.3"
},

@@ -55,0 +56,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc