Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
f0ad441415 | |||
27c087b693 | |||
63463a751c | |||
a01f5a5b8a | |||
bb1ad4e037 | |||
eb871161f9 | |||
090e5b4d42 | |||
8168dd1a0c | |||
de15bc0d1c | |||
13fa3d655e | |||
18b93b860d | |||
e8e6416b6f | |||
fbe2f381c9 | |||
3cb0aceaad | |||
6d6c92eee4 | |||
4385909677 | |||
2dc36d8170 | |||
ffbde62744 | |||
7bde843e43 | |||
faa7adcffe |
42
package-lock.json
generated
42
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-domtools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.44",
|
"version": "1.0.54",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -27,8 +27,7 @@
|
|||||||
"@apiglobal/typedrequest-interfaces": {
|
"@apiglobal/typedrequest-interfaces": {
|
||||||
"version": "1.0.15",
|
"version": "1.0.15",
|
||||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.15.tgz",
|
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.15.tgz",
|
||||||
"integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA==",
|
"integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"@babel/code-frame": {
|
"@babel/code-frame": {
|
||||||
"version": "7.10.4",
|
"version": "7.10.4",
|
||||||
@ -1132,6 +1131,30 @@
|
|||||||
"to-fast-properties": "^2.0.0"
|
"to-fast-properties": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@designestate/dees-comms": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-comms/-/dees-comms-1.0.6.tgz",
|
||||||
|
"integrity": "sha512-l6J1E23jl2R/eUML0mhanIjfsGA38dDauBj1dZP8BCax1WKk5BSgs9mnPYg8Yja62v0jvEPTanDQxb9rar+Nvw==",
|
||||||
|
"requires": {
|
||||||
|
"@apiglobal/typedrequest": "^1.0.53",
|
||||||
|
"@apiglobal/typedrequest-interfaces": "^1.0.15"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@apiglobal/typedrequest": {
|
||||||
|
"version": "1.0.53",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-1.0.53.tgz",
|
||||||
|
"integrity": "sha512-9KfG+ZfhryepIY1Q++OIMSU6k3Qy1MGRPXPLXQyPua5uXgHTPgT59+pczwpTAo1Mru4o0H87Xtwt596HV7FGsg==",
|
||||||
|
"requires": {
|
||||||
|
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||||
|
"@pushrocks/isounique": "^1.0.4",
|
||||||
|
"@pushrocks/lik": "^4.0.17",
|
||||||
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
|
"@pushrocks/webrequest": "^2.0.10"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@gitzone/tsbuild": {
|
"@gitzone/tsbuild": {
|
||||||
"version": "2.1.25",
|
"version": "2.1.25",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.25.tgz",
|
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.25.tgz",
|
||||||
@ -2183,6 +2206,14 @@
|
|||||||
"@tsclass/tsclass": "^3.0.18"
|
"@tsclass/tsclass": "^3.0.18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pushrocks/webstore": {
|
||||||
|
"version": "1.0.8",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebstore/-/webstore-1.0.8.tgz",
|
||||||
|
"integrity": "sha512-KxxTO8+GTZWQrXppx3DLGbcEzJtLL+JO0lalA/57J8+NSvYm5+e1BZoUbcC4HLqHtLQAV9kW3XIvpyWVMMqOng==",
|
||||||
|
"requires": {
|
||||||
|
"idb": "^5.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@rollup/plugin-commonjs": {
|
"@rollup/plugin-commonjs": {
|
||||||
"version": "14.0.0",
|
"version": "14.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/@rollup%2fplugin-commonjs/-/plugin-commonjs-14.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/@rollup%2fplugin-commonjs/-/plugin-commonjs-14.0.0.tgz",
|
||||||
@ -6655,6 +6686,11 @@
|
|||||||
"integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=",
|
"integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"idb": {
|
||||||
|
"version": "5.0.6",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/idb/-/idb-5.0.6.tgz",
|
||||||
|
"integrity": "sha512-/PFvOWPzRcEPmlDt5jEvzVZVs0wyd/EvGvkDIcbBpGuMMLQKrTPG0TxvE2UJtgZtCQCmOtM2QD7yQJBVEjKGOw=="
|
||||||
|
},
|
||||||
"ieee754": {
|
"ieee754": {
|
||||||
"version": "1.1.13",
|
"version": "1.1.13",
|
||||||
"resolved": "https://verdaccio.lossless.one/ieee754/-/ieee754-1.1.13.tgz",
|
"resolved": "https://verdaccio.lossless.one/ieee754/-/ieee754-1.1.13.tgz",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-domtools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.44",
|
"version": "1.0.54",
|
||||||
"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",
|
||||||
@ -23,6 +23,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest": "^1.0.43",
|
"@apiglobal/typedrequest": "^1.0.43",
|
||||||
|
"@designestate/dees-comms": "^1.0.6",
|
||||||
"@pushrocks/lik": "^4.0.17",
|
"@pushrocks/lik": "^4.0.17",
|
||||||
"@pushrocks/smartdelay": "^2.0.10",
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
@ -30,6 +31,7 @@
|
|||||||
"@pushrocks/smartstate": "^1.0.17",
|
"@pushrocks/smartstate": "^1.0.17",
|
||||||
"@pushrocks/webrequest": "^2.0.10",
|
"@pushrocks/webrequest": "^2.0.10",
|
||||||
"@pushrocks/websetup": "^2.0.18",
|
"@pushrocks/websetup": "^2.0.18",
|
||||||
|
"@pushrocks/webstore": "^1.0.8",
|
||||||
"lit-element": "^2.4.0",
|
"lit-element": "^2.4.0",
|
||||||
"sweet-scroll": "^4.0.0"
|
"sweet-scroll": "^4.0.0"
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,6 @@ import { TViewport } from './domtools.breakpoints';
|
|||||||
|
|
||||||
import { Scroller } from './domtools.classes.scroller';
|
import { Scroller } from './domtools.classes.scroller';
|
||||||
import { delayForRandom } from '@pushrocks/smartdelay';
|
import { delayForRandom } from '@pushrocks/smartdelay';
|
||||||
import { setupGlobalTheme } from './domtools.css.theme';
|
|
||||||
|
|
||||||
export interface IDomToolsState {
|
export interface IDomToolsState {
|
||||||
virtualViewport: TViewport;
|
virtualViewport: TViewport;
|
||||||
@ -24,9 +23,6 @@ export class DomTools {
|
|||||||
globalThis.deesDomTools = new DomTools();
|
globalThis.deesDomTools = new DomTools();
|
||||||
domToolsInstance = globalThis.deesDomTools;
|
domToolsInstance = globalThis.deesDomTools;
|
||||||
|
|
||||||
// lets setup theming
|
|
||||||
setupGlobalTheme(domToolsInstance);
|
|
||||||
|
|
||||||
// lets make sure the dom is ready
|
// lets make sure the dom is ready
|
||||||
const readyStateChangedFunc = () => {
|
const readyStateChangedFunc = () => {
|
||||||
if (document.readyState === 'interactive' || document.readyState === 'complete') {
|
if (document.readyState === 'interactive' || document.readyState === 'complete') {
|
||||||
@ -47,7 +43,7 @@ export class DomTools {
|
|||||||
/**
|
/**
|
||||||
* if you can, use the static asysnc .setupDomTools() function instead since it is safer to use.
|
* if you can, use the static asysnc .setupDomTools() function instead since it is safer to use.
|
||||||
*/
|
*/
|
||||||
public static getGlobalDomToolsSync() {
|
public static getGlobalDomToolsSync(): DomTools {
|
||||||
const globalDomTools: DomTools = globalThis.deesDomTools;
|
const globalDomTools: DomTools = globalThis.deesDomTools;
|
||||||
if (!globalDomTools) {
|
if (!globalDomTools) {
|
||||||
throw new Error('You tried to access domtools synchronously too early');
|
throw new Error('You tried to access domtools synchronously too early');
|
||||||
@ -82,6 +78,8 @@ export class DomTools {
|
|||||||
|
|
||||||
public scroller: plugins.SweetScroll;
|
public scroller: plugins.SweetScroll;
|
||||||
|
|
||||||
|
public deesComms = new plugins.deesComms.DeesComms();
|
||||||
|
|
||||||
private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
|
private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
|
||||||
async (statePart, payload) => {
|
async (statePart, payload) => {
|
||||||
const currentState = statePart.getState();
|
const currentState = statePart.getState();
|
||||||
|
@ -1,27 +1,28 @@
|
|||||||
import { DomTools } from './domtools.classes.domtools';
|
import { DomTools } from './domtools.classes.domtools';
|
||||||
|
|
||||||
export const setupGlobalTheme = (domToolsInstance: DomTools) => {
|
/**
|
||||||
const styles = `
|
* changes scrollbar styles to be consistent across OS borders
|
||||||
/* width */
|
*/
|
||||||
::-webkit-scrollbar {
|
export const scrollBarStyles = (() => {
|
||||||
width: 8px;
|
const returnStyles = navigator.userAgent.indexOf("Windows") !== -1 ? `
|
||||||
}
|
/* width */
|
||||||
|
::-webkit-scrollbar {
|
||||||
/* Track */
|
width: 8px;
|
||||||
::-webkit-scrollbar-track {
|
}
|
||||||
background: #111;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle */
|
|
||||||
::-webkit-scrollbar-thumb {
|
|
||||||
background: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle on hover */
|
|
||||||
::-webkit-scrollbar-thumb:hover {
|
|
||||||
background: #777;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
domToolsInstance.setGlobalStyles(styles);
|
/* Track */
|
||||||
};
|
::-webkit-scrollbar-track {
|
||||||
|
background: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Handle */
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Handle on hover */
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: #777;
|
||||||
|
}
|
||||||
|
` : ``;
|
||||||
|
})();
|
||||||
|
@ -1,13 +1,20 @@
|
|||||||
import * as plugins from './domtools.plugins';
|
import * as plugins from './domtools.plugins';
|
||||||
import { DomTools } from './domtools.classes.domtools';
|
import { DomTools } from './domtools.classes.domtools';
|
||||||
|
import { scrollBarStyles } from './domtools.css.theme';
|
||||||
|
|
||||||
import { html } from 'lit-element';
|
import { html } from 'lit-element';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* styles to be included in every webcomponent
|
||||||
|
*/
|
||||||
export const styles = html`
|
export const styles = html`
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${scrollBarStyles}
|
||||||
</style>
|
</style>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -39,7 +46,13 @@ export const setup = async () => {
|
|||||||
|
|
||||||
// Roboto Font
|
// Roboto Font
|
||||||
domTools.setGlobalStyles(`
|
domTools.setGlobalStyles(`
|
||||||
@import url('https://fonts.googleapis.com/css?family=Roboto');
|
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400');
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;300;400');
|
||||||
|
`);
|
||||||
|
|
||||||
|
// scrollbars
|
||||||
|
domTools.setGlobalStyles(`
|
||||||
|
${scrollBarStyles}
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
// api glbal scope
|
// designestate scope
|
||||||
|
import * as deesComms from '@designestate/dees-comms';
|
||||||
|
|
||||||
|
export {
|
||||||
|
deesComms
|
||||||
|
};
|
||||||
|
|
||||||
|
// apiglobal scope
|
||||||
import * as typedrequest from '@apiglobal/typedrequest';
|
import * as typedrequest from '@apiglobal/typedrequest';
|
||||||
|
|
||||||
export { typedrequest };
|
export { typedrequest };
|
||||||
@ -10,8 +17,9 @@ import * as smartrouter from '@pushrocks/smartrouter';
|
|||||||
import * as smartstate from '@pushrocks/smartstate';
|
import * as smartstate from '@pushrocks/smartstate';
|
||||||
import * as webrequest from '@pushrocks/webrequest';
|
import * as webrequest from '@pushrocks/webrequest';
|
||||||
import * as websetup from '@pushrocks/websetup';
|
import * as websetup from '@pushrocks/websetup';
|
||||||
|
import * as webstore from '@pushrocks/webstore';
|
||||||
|
|
||||||
export { smartdelay, smartpromise, smartrouter, smartstate, webrequest, websetup };
|
export { smartdelay, smartpromise, smartrouter, smartstate, webrequest, websetup, webstore };
|
||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import SweetScroll from 'sweet-scroll';
|
import SweetScroll from 'sweet-scroll';
|
||||||
|
Reference in New Issue
Block a user