Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
37b7dca212 | |||
7d9dc1ad65 | |||
20f06e5935 | |||
d3fa33f0cc | |||
aa91dad272 | |||
05a22599b8 |
98
package-lock.json
generated
98
package-lock.json
generated
@ -1,14 +1,34 @@
|
||||
{
|
||||
"name": "@designestate/dees-domtools",
|
||||
"version": "1.0.26",
|
||||
"version": "1.0.29",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest": {
|
||||
"version": "1.0.38",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-1.0.38.tgz",
|
||||
"integrity": "sha512-A0kFQJEadwOc9Zlnc4QvVoqL0e5zaEGye+dUDlfq3p9jvis6KbDSamG+xcGXw1HTz7BxFp66Ix73qwHUzWkHeg==",
|
||||
"requires": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.13",
|
||||
"@pushrocks/lik": "^4.0.13",
|
||||
"@pushrocks/smartdelay": "^2.0.9",
|
||||
"@pushrocks/webrequest": "^2.0.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.9.tgz",
|
||||
"integrity": "sha512-aVZJit1wq4fBG6ft2LJSPEnNbLSbRUuwNYggSeDqLtY7mXvAQmu4SIsXx18gfOtf69CoZR36RY3ff/IJv62C7w==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@apiglobal/typedrequest-interfaces": {
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.13.tgz",
|
||||
"integrity": "sha512-3mk0mMC7unqh+Bb0mPEMwEfJcLAGl5ZjA1If/OGyk56KQOBqA2mLATS40HREeGoAEcUOHU2VCwPuU/tpSVMY/w==",
|
||||
"dev": true
|
||||
"integrity": "sha512-3mk0mMC7unqh+Bb0mPEMwEfJcLAGl5ZjA1If/OGyk56KQOBqA2mLATS40HREeGoAEcUOHU2VCwPuU/tpSVMY/w=="
|
||||
},
|
||||
"@babel/code-frame": {
|
||||
"version": "7.8.3",
|
||||
@ -1159,6 +1179,23 @@
|
||||
"@pushrocks/smartpromise": "^3.0.6"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartenv": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartenv/-/smartenv-4.0.10.tgz",
|
||||
"integrity": "sha512-b9jJbBSaOl0nlujyEu/0q5lkOFSMmfcOwPGb3pYrF1B37O15qmVpuqYwA5T8BXj8A6y+oA2bwrrtDzQ7hYp1zg==",
|
||||
"requires": {
|
||||
"@pushrocks/smartparam": "^1.1.6",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@types/node": "^14.0.14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "14.0.14",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.0.14.tgz",
|
||||
"integrity": "sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartevent": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartevent/-/smartevent-2.0.5.tgz",
|
||||
@ -1307,7 +1344,6 @@
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartparam/-/smartparam-1.1.6.tgz",
|
||||
"integrity": "sha512-1El/F2QTWYDGy4Nh6vz9Ry1JVg1FEeyexB7Uvi4zHElpXYVxwso6xImRTLj+SW50JAg7nwEZ+ljkzTG9XvnwWA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"is-promise": "^2.1.0",
|
||||
@ -1337,6 +1373,14 @@
|
||||
"form-data": "^2.5.1"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartrouter": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.2.tgz",
|
||||
"integrity": "sha512-G7/Mb03TLOyarpDngfTOeWZqQv3GxMoG2JtoPH4mQ0y7SosQdaminnx++oopmP/CTzyj5mtAPCnWv/qcDBkv7Q==",
|
||||
"requires": {
|
||||
"path-to-regexp": "^6.1.0"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartrx": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.5.tgz",
|
||||
@ -1443,6 +1487,26 @@
|
||||
"smartchai": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"@pushrocks/webrequest": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebrequest/-/webrequest-2.0.9.tgz",
|
||||
"integrity": "sha512-cHKbVlS6j26SRzFMjvV+4hwwimXJ9NX/NnUmLmPSTZguzz6dEp1dYd+aNzGaGC8Da4ewvH7klhx7a5LI3Gv5tw==",
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.9",
|
||||
"@pushrocks/smartenv": "^4.0.10",
|
||||
"node-fetch": "^2.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.9.tgz",
|
||||
"integrity": "sha512-aVZJit1wq4fBG6ft2LJSPEnNbLSbRUuwNYggSeDqLtY7mXvAQmu4SIsXx18gfOtf69CoZR36RY3ff/IJv62C7w==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@rollup/plugin-commonjs": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@rollup%2fplugin-commonjs/-/plugin-commonjs-12.0.0.tgz",
|
||||
@ -1777,14 +1841,12 @@
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://verdaccio.lossless.one/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@ -2002,8 +2064,7 @@
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"convert-source-map": {
|
||||
"version": "1.7.0",
|
||||
@ -2380,8 +2441,7 @@
|
||||
"is-promise": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://verdaccio.lossless.one/is-promise/-/is-promise-2.2.2.tgz",
|
||||
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
|
||||
},
|
||||
"is-reference": {
|
||||
"version": "1.1.4",
|
||||
@ -2592,7 +2652,6 @@
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@ -2648,6 +2707,11 @@
|
||||
"lower-case": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://verdaccio.lossless.one/node-fetch/-/node-fetch-2.6.0.tgz",
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"node-releases": {
|
||||
"version": "1.1.56",
|
||||
"resolved": "https://verdaccio.lossless.one/node-releases/-/node-releases-1.1.56.tgz",
|
||||
@ -2771,6 +2835,11 @@
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||
"dev": true
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/path-to-regexp/-/path-to-regexp-6.1.0.tgz",
|
||||
"integrity": "sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw=="
|
||||
},
|
||||
"pathval": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/pathval/-/pathval-1.1.0.tgz",
|
||||
@ -3169,6 +3238,11 @@
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"sweet-scroll": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/sweet-scroll/-/sweet-scroll-4.0.0.tgz",
|
||||
"integrity": "sha512-mR6fRsAQANtm3zpzhUE73KAOt2aT4ZsWzNSggiEsSqdO6Zh4gM7ioJG81EngrZEl0XAc3ZvzEfhxggOoEBc8jA=="
|
||||
},
|
||||
"symbol-tree": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-domtools",
|
||||
"version": "1.0.26",
|
||||
"version": "1.0.29",
|
||||
"private": false,
|
||||
"description": "tools to simplify complex css structures",
|
||||
"main": "dist_ts/index.js",
|
||||
@ -22,10 +22,13 @@
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest": "^1.0.38",
|
||||
"@pushrocks/lik": "^4.0.13",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@pushrocks/smartrouter": "^1.0.2",
|
||||
"@pushrocks/smartstate": "^1.0.16",
|
||||
"lit-element": "^2.3.1"
|
||||
"lit-element": "^2.3.1",
|
||||
"sweet-scroll": "^4.0.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { DomTools } from './domtools.classes.domtools';
|
||||
|
||||
export const desktop = 1240;
|
||||
export const tablet = 700;
|
||||
export const phablet = 500;
|
||||
export const tablet = 1024;
|
||||
export const phablet = 600;
|
||||
export const phone = 400;
|
||||
|
||||
export type TViewport = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
|
||||
|
@ -8,6 +8,12 @@ export interface IDomToolsState {
|
||||
}
|
||||
|
||||
export class DomTools {
|
||||
// ======
|
||||
// STATIC
|
||||
// ======
|
||||
/**
|
||||
* setups domtools
|
||||
*/
|
||||
public static async setupDomTools() {
|
||||
let domToolsInstance: DomTools;
|
||||
if (!globalThis.deesDomTools) {
|
||||
@ -30,16 +36,25 @@ export class DomTools {
|
||||
return domToolsInstance;
|
||||
}
|
||||
|
||||
// ========
|
||||
// INSTANCE
|
||||
// ========
|
||||
public smartstate = new plugins.smartstate.Smartstate();
|
||||
public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', {
|
||||
virtualViewport: 'native'
|
||||
virtualViewport: 'native',
|
||||
});
|
||||
|
||||
public actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(async (statePart, payload) => {
|
||||
public router = new plugins.smartrouter.SmartRouter({
|
||||
debug: false
|
||||
});
|
||||
|
||||
private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
|
||||
async (statePart, payload) => {
|
||||
const currentState = statePart.getState();
|
||||
currentState.virtualViewport = payload;
|
||||
return currentState;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
public domToolsReady = plugins.smartpromise.defer();
|
||||
public domReady = plugins.smartpromise.defer();
|
||||
@ -51,12 +66,10 @@ export class DomTools {
|
||||
bodyElement: HTMLElement;
|
||||
} = {
|
||||
headElement: null,
|
||||
bodyElement: null
|
||||
bodyElement: null,
|
||||
};
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
constructor() {}
|
||||
|
||||
public async setGlobalStyles(stylesText: string) {
|
||||
await this.domReady.promise;
|
||||
@ -83,7 +96,7 @@ export class DomTools {
|
||||
this.runOnceTrackerStringMap.removeString(runningId);
|
||||
}
|
||||
return await this.runOnceTrackerStringMap.registerUntilTrue(
|
||||
stringMap => {
|
||||
(stringMap) => {
|
||||
return !stringMap.includes(runningId);
|
||||
},
|
||||
() => {
|
||||
|
@ -1 +0,0 @@
|
||||
import * as plugins from './domtools.plugins';
|
1
ts/domtools.move.ts
Normal file
1
ts/domtools.move.ts
Normal file
@ -0,0 +1 @@
|
||||
import * as plugins from './domtools.plugins';
|
@ -1,5 +1,6 @@
|
||||
// pushrocks scope
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartrouter from '@pushrocks/smartrouter';
|
||||
import * as smartstate from '@pushrocks/smartstate';
|
||||
|
||||
export { smartpromise, smartstate };
|
||||
export { smartpromise, smartrouter, smartstate };
|
||||
|
@ -6,3 +6,5 @@ import * as css from './domtools.css';
|
||||
|
||||
export { css, breakpoints, elementBasic };
|
||||
export { DomTools } from './domtools.classes.domtools';
|
||||
export { TypedRequest } from '@apiglobal/typedrequest';
|
||||
|
||||
|
Reference in New Issue
Block a user