Socket
Socket
Sign inDemoInstall

@3mo/theme

Package Overview
Dependencies
20
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.13 to 0.0.14

2

dist/Background.d.ts
import { LocalStorage } from '@a11d/local-storage';
export declare const enum Background {
export declare enum Background {
System = "system",

@@ -4,0 +4,0 @@ Light = "light",

import { LocalStorage } from '@a11d/local-storage';
export var Background;
(function (Background) {
Background["System"] = "system";
Background["Light"] = "light";
Background["Dark"] = "dark";
})(Background = Background || (Background = {}));
export class BackgroundStorage extends LocalStorage {
constructor() {
super('Theme.Background', "system" /* Background.System */);
super('Theme.Background', Background.System);
window.matchMedia('(prefers-color-scheme: dark)').onchange = () => this.updateAttributeValue();

@@ -11,7 +17,7 @@ window.matchMedia('(prefers-color-scheme: light)').onchange = () => this.updateAttributeValue();

get calculatedValue() {
return this.value !== "system" /* Background.System */
return this.value !== Background.System
? this.value
: window.matchMedia('(prefers-color-scheme: dark)').matches
? "dark" /* Background.Dark */
: "light" /* Background.Light */;
? Background.Dark
: Background.Light;
}

@@ -18,0 +24,0 @@ updateAttributeValue() {

{
"name": "@3mo/theme",
"version": "0.0.13",
"version": "0.0.14",
"description": "Tools & tokens for theming 3MO components & applications.",

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc