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

@3mo/theme

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@3mo/theme - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

1

dist/Accent.d.ts

@@ -13,3 +13,4 @@ import { LocalStorage } from '@a11d/local-storage';

injectCss(): void;
private get onAccentColorBase();
}
//# sourceMappingURL=Accent.d.ts.map

@@ -53,5 +53,14 @@ import { css, unsafeCSS } from '@a11d/lit';

--mo-color-accent-gradient-3: ${unsafeCSS(thirdColor === null || thirdColor === void 0 ? void 0 : thirdColor.rgb)};
--mo-color-on-accent-base: ${unsafeCSS(this.onAccentColorBase)};
}
`, this.styleElement);
}
get onAccentColorBase() {
if (!this.medianColor) {
return '0 0 0';
}
const { r, g, b } = this.medianColor;
const sum = Math.round((r * 299 + g * 587 + b * 114) / 1000);
return sum > 128 ? '0 0 0' : '255 255 255';
}
}

2

dist/Background.js

@@ -7,3 +7,3 @@ import { LocalStorage } from '@a11d/local-storage';

Background["Dark"] = "dark";
})(Background = Background || (Background = {}));
})(Background || (Background = {}));
export class BackgroundStorage extends LocalStorage {

@@ -10,0 +10,0 @@ constructor() {

@@ -51,5 +51,5 @@ import { css } from '@a11d/lit';

/* TODO: Replace with @color-contrast when available: https://caniuse.com/mdn-css_types_color_color-contrast */
/* More info: https://css-tricks.com/css-variables-calc-rgb-enforcing-high-contrast-colors/ */
--mo-color-on-accent-base-value: calc(((((var(--mo-color-accent-base-r) * 299) + (var(--mo-color-accent-base-g) * 587) + (var(--mo-color-accent-base-b) * 114)) / 1000) - 128) * -1000);
--mo-color-on-accent-base: var(--mo-color-on-accent-base-value), var(--mo-color-on-accent-base-value), var(--mo-color-on-accent-base-value);
/* The solution presented in https://css-tricks.com/css-variables-calc-rgb-enforcing-high-contrast-colors/ doesn't work in Chrome as of late-2023 */
/* --mo-color-on-accent-base-value: calc(((((var(--mo-color-accent-base-r) * 299) + (var(--mo-color-accent-base-g) * 587) + (var(--mo-color-accent-base-b) * 114)) / 1000) - 128) * -1000); */
/* --mo-color-on-accent-base: var(--mo-color-on-accent-base-value), var(--mo-color-on-accent-base-value), var(--mo-color-on-accent-base-value); */
--mo-color-on-accent: rgb(var(--mo-color-on-accent-base));

@@ -56,0 +56,0 @@ --mo-color-accent-base: var(--mo-color-accent-base-r), var(--mo-color-accent-base-g), var(--mo-color-accent-base-b);

import { BackgroundStorage } from './Background.js';
import { AccentStorage } from './Accent.js';
class Theme {
export class Theme {
}
Theme.background = new BackgroundStorage;
Theme.accent = new AccentStorage;
export { Theme };
{
"name": "@3mo/theme",
"version": "0.0.14",
"version": "0.0.15",
"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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc