Compare commits

...

6 Commits

Author SHA1 Message Date
b802935d27 1.0.83 2020-12-07 21:54:54 +00:00
b73a702b74 fix(core): update 2020-12-07 21:54:53 +00:00
b3deb31ab5 1.0.82 2020-12-07 05:25:26 +00:00
6ea5482e3d fix(core): update 2020-12-07 05:25:25 +00:00
0ead7215ff 1.0.81 2020-12-07 03:47:39 +00:00
286bb0887a fix(core): update 2020-12-07 03:47:39 +00:00
4 changed files with 17 additions and 14 deletions

14
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-domtools", "name": "@designestate/dees-domtools",
"version": "1.0.80", "version": "1.0.83",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -1949,9 +1949,9 @@
} }
}, },
"@pushrocks/smartrouter": { "@pushrocks/smartrouter": {
"version": "1.0.6", "version": "1.0.7",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.6.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.7.tgz",
"integrity": "sha512-aKhZOkHsqOUiPFA3+61vkZvInGb1lQ/68FIfT7dBrrFdHXXPo6tY8cm+GnT4ELUnXLpZBmnNm2rxLa22z6j4dg==", "integrity": "sha512-ns4ye4uyzjpFUDr/vciOZog4y5QDsFBxwnYmXkSMxCA7hwiL0Fn64lvCexjez05t6Gz54ge5yflWSvyv63X0kA==",
"requires": { "requires": {
"path-to-regexp": "^6.1.0" "path-to-regexp": "^6.1.0"
} }
@ -2134,9 +2134,9 @@
} }
}, },
"@pushrocks/websetup": { "@pushrocks/websetup": {
"version": "3.0.11", "version": "3.0.12",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebsetup/-/websetup-3.0.11.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebsetup/-/websetup-3.0.12.tgz",
"integrity": "sha512-5nQqrQSiP5/WUv5pLsmjYAkfGosi2DqEH1mNrliOTr6iA8syGQ7bOQk4JY7jApjk64wO5L7l8qBGvKJuZ+p9Dw==", "integrity": "sha512-/E1IJQF0uG29E+Opb/pm/byq6Gd5P0ZZHuyZ4iVeIzSqMI4QC+W2IxwkXYDtbOLFAXDCe0qsn+6xako+WvAeEA==",
"requires": { "requires": {
"@pushrocks/smartdelay": "^2.0.10", "@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartpromise": "^3.1.3", "@pushrocks/smartpromise": "^3.1.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-domtools", "name": "@designestate/dees-domtools",
"version": "1.0.80", "version": "1.0.83",
"private": false, "private": false,
"description": "tools to simplify complex css structures", "description": "tools to simplify complex css structures",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -27,11 +27,11 @@
"@pushrocks/lik": "^4.0.20", "@pushrocks/lik": "^4.0.20",
"@pushrocks/smartdelay": "^2.0.10", "@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartpromise": "^3.1.3", "@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartrouter": "^1.0.6", "@pushrocks/smartrouter": "^1.0.7",
"@pushrocks/smartrx": "^2.0.19", "@pushrocks/smartrx": "^2.0.19",
"@pushrocks/smartstate": "^1.0.21", "@pushrocks/smartstate": "^1.0.21",
"@pushrocks/webrequest": "^2.0.13", "@pushrocks/webrequest": "^2.0.13",
"@pushrocks/websetup": "^3.0.11", "@pushrocks/websetup": "^3.0.12",
"@pushrocks/webstore": "^1.0.16", "@pushrocks/webstore": "^1.0.16",
"lit-element": "^2.4.0", "lit-element": "^2.4.0",
"sweet-scroll": "^4.0.0" "sweet-scroll": "^4.0.0"

View File

@ -4,7 +4,7 @@ import * as plugins from './domtools.plugins';
export class ThemeManager { export class ThemeManager {
public domtoolsRef: DomTools; public domtoolsRef: DomTools;
public goBrightBoolean = false; public goBrightBoolean = false;
public preferredColorSchemeMediaMatch = window.matchMedia('(prefers-color-scheme: light)'); public preferredColorSchemeMediaMatch = window.matchMedia('(prefers-color-scheme: light)');
@ -15,7 +15,7 @@ export class ThemeManager {
// lets care // lets care
this.goBrightBoolean = this.preferredColorSchemeMediaMatch.matches; this.goBrightBoolean = this.preferredColorSchemeMediaMatch.matches;
this.preferredColorSchemeMediaMatch.addEventListener('change', eventArg => { this.preferredColorSchemeMediaMatch.addEventListener('change', (eventArg) => {
this.goBrightBoolean = eventArg.matches; this.goBrightBoolean = eventArg.matches;
this.updateAllConnectedElements(); this.updateAllConnectedElements();
}); });
@ -23,7 +23,9 @@ export class ThemeManager {
} }
private async updateAllConnectedElements() { private async updateAllConnectedElements() {
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000'; if (document.body && document.body.style) {
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000';
}
this.themeObservable.next(this.goBrightBoolean); this.themeObservable.next(this.goBrightBoolean);
} }
@ -41,4 +43,4 @@ export class ThemeManager {
this.goBrightBoolean = !this.goBrightBoolean; this.goBrightBoolean = !this.goBrightBoolean;
this.updateAllConnectedElements(); this.updateAllConnectedElements();
} }
} }

View File

@ -7,6 +7,7 @@ import * as css from './domtools.css';
export { css, breakpoints, elementBasic }; export { css, breakpoints, elementBasic };
export { DomTools } from './domtools.classes.domtools'; export { DomTools } from './domtools.classes.domtools';
export { TypedRequest } from '@apiglobal/typedrequest'; export { TypedRequest } from '@apiglobal/typedrequest';
export { IWebSetupConstructorOptions } from '@pushrocks/websetup';
import * as allPlugins from './domtools.plugins'; import * as allPlugins from './domtools.plugins';