Compare commits

...

33 Commits

Author SHA1 Message Date
9db1f92ba3 1.0.58 2020-11-05 17:20:01 +00:00
772d0b0b97 fix(core): update 2020-11-05 17:20:01 +00:00
a68e9e1bf9 1.0.57 2020-11-05 15:40:35 +00:00
f9507b0dbd fix(core): update 2020-11-05 15:40:35 +00:00
f8c1a0135a 1.0.56 2020-11-04 18:35:46 +00:00
7d884f6556 fix(core): update 2020-11-04 18:35:45 +00:00
8a8ee5cd7b 1.0.55 2020-10-07 13:13:22 +00:00
1660381be6 fix(core): update 2020-10-07 13:13:21 +00:00
f0ad441415 1.0.54 2020-10-06 22:08:27 +00:00
27c087b693 fix(core): update 2020-10-06 22:08:26 +00:00
63463a751c 1.0.53 2020-09-16 15:10:53 +00:00
a01f5a5b8a fix(core): update 2020-09-16 15:10:52 +00:00
bb1ad4e037 1.0.52 2020-09-16 13:57:16 +00:00
eb871161f9 fix(core): update 2020-09-16 13:57:16 +00:00
090e5b4d42 1.0.51 2020-09-16 11:29:27 +00:00
8168dd1a0c fix(core): update 2020-09-16 11:29:26 +00:00
de15bc0d1c 1.0.50 2020-09-16 10:06:23 +00:00
13fa3d655e fix(core): update 2020-09-16 10:06:22 +00:00
18b93b860d 1.0.49 2020-09-15 20:56:34 +00:00
e8e6416b6f fix(core): update 2020-09-15 20:56:33 +00:00
fbe2f381c9 1.0.48 2020-09-15 20:24:12 +00:00
3cb0aceaad fix(core): update 2020-09-15 20:24:11 +00:00
6d6c92eee4 1.0.47 2020-09-13 15:53:31 +00:00
4385909677 fix(core): update 2020-09-13 15:53:30 +00:00
2dc36d8170 1.0.46 2020-09-13 14:58:27 +00:00
ffbde62744 fix(core): update 2020-09-13 14:58:26 +00:00
7bde843e43 1.0.45 2020-09-13 14:57:31 +00:00
faa7adcffe fix(core): update 2020-09-13 14:57:30 +00:00
7977538c05 1.0.44 2020-09-12 14:00:12 +00:00
afaa88047c 1.0.43 2020-09-12 13:14:17 +00:00
8aabe2820e fix(core): update 2020-09-12 13:14:17 +00:00
570d370c97 1.0.42 2020-09-12 13:11:11 +00:00
73552ad80f fix(core): update 2020-09-12 13:11:10 +00:00
8 changed files with 1148 additions and 894 deletions

View File

@ -19,23 +19,35 @@ mirror:
stage: security stage: security
script: script:
- npmci git mirror - npmci git mirror
only:
- tags
tags: tags:
- lossless - lossless
- docker - docker
- notpriv - notpriv
audit: auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci npm prepare
- npmci command npm install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high - npmci command npm audit --audit-level=high --only=dev
tags: tags:
- lossless
- docker - docker
- notpriv allow_failure: true
# ==================== # ====================
# test stage # test stage
@ -50,9 +62,7 @@ testStable:
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- docker - docker
- priv
testBuild: testBuild:
stage: test stage: test
@ -63,9 +73,7 @@ testBuild:
- npmci command npm run build - npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- docker - docker
- notpriv
release: release:
stage: release stage: release
@ -85,6 +93,8 @@ release:
codequality: codequality:
stage: metadata stage: metadata
allow_failure: true allow_failure: true
only:
- tags
script: script:
- npmci command npm install -g tslint typescript - npmci command npm install -g tslint typescript
- npmci npm prepare - npmci npm prepare

View File

@ -15,7 +15,7 @@
"properties": { "properties": {
"projectType": { "projectType": {
"type": "string", "type": "string",
"enum": ["website", "element", "service", "npm"] "enum": ["website", "element", "service", "npm", "wcc"]
} }
} }
} }

1921
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-domtools", "name": "@designestate/dees-domtools",
"version": "1.0.41", "version": "1.0.58",
"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",
@ -13,24 +13,26 @@
"format": "(gitzone format)" "format": "(gitzone format)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsbundle": "^1.0.72", "@gitzone/tsbundle": "^1.0.78",
"@gitzone/tstest": "^1.0.43", "@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.2.9", "@pushrocks/tapbundle": "^3.2.9",
"@types/node": "^14.0.26", "@types/node": "^14.14.6",
"tslint": "^6.1.2", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.15.0"
}, },
"dependencies": { "dependencies": {
"@apiglobal/typedrequest": "^1.0.41", "@apiglobal/typedrequest": "^1.0.54",
"@designestate/dees-comms": "^1.0.7",
"@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.1.3",
"@pushrocks/smartrouter": "^1.0.4", "@pushrocks/smartrouter": "^1.0.4",
"@pushrocks/smartstate": "^1.0.17", "@pushrocks/smartstate": "^1.0.17",
"@pushrocks/webrequest": "^2.0.10", "@pushrocks/webrequest": "^2.0.13",
"@pushrocks/websetup": "^2.0.18", "@pushrocks/websetup": "^3.0.6",
"lit-element": "^2.3.1", "@pushrocks/webstore": "^1.0.16",
"lit-element": "^2.4.0",
"sweet-scroll": "^4.0.0" "sweet-scroll": "^4.0.0"
}, },
"files": [ "files": [

View File

@ -5,6 +5,7 @@ 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 { WebSetup } from '@pushrocks/websetup';
export interface IDomToolsState { export interface IDomToolsState {
virtualViewport: TViewport; virtualViewport: TViewport;
@ -22,6 +23,7 @@ export class DomTools {
if (!globalThis.deesDomTools) { if (!globalThis.deesDomTools) {
globalThis.deesDomTools = new DomTools(); globalThis.deesDomTools = new DomTools();
domToolsInstance = globalThis.deesDomTools; domToolsInstance = globalThis.deesDomTools;
// 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') {
@ -42,7 +44,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');
@ -62,6 +64,8 @@ export class DomTools {
bodyElement: null, bodyElement: null,
}; };
public websetup: WebSetup;
public smartstate = new plugins.smartstate.Smartstate(); public smartstate = new plugins.smartstate.Smartstate();
public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', { public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', {
virtualViewport: 'native', virtualViewport: 'native',
@ -72,11 +76,13 @@ export class DomTools {
}); });
public convenience = { public convenience = {
smartdelay: plugins.smartdelay smartdelay: plugins.smartdelay,
}; };
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();
@ -139,7 +145,7 @@ export class DomTools {
} }
public async setWebsiteInfo(optionsArg: plugins.websetup.IWebSetupConstructorOptions) { public async setWebsiteInfo(optionsArg: plugins.websetup.IWebSetupConstructorOptions) {
const websetup = new plugins.websetup.WebSetup(optionsArg); this.websetup = new plugins.websetup.WebSetup(optionsArg);
await websetup.setup(); await this.websetup.readyPromise;
} }
} }

28
ts/domtools.css.theme.ts Normal file
View File

@ -0,0 +1,28 @@
import { DomTools } from './domtools.classes.domtools';
/**
* changes scrollbar styles to be consistent across OS borders
*/
export const scrollBarStyles = (() => {
const returnStyles = navigator.userAgent.indexOf("Windows") !== -1 ? `
/* width */
::-webkit-scrollbar {
width: 8px;
}
/* Track */
::-webkit-scrollbar-track {
background: #111;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #666;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #777;
}
` : ``;
})();

View File

@ -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}
`); `);
}); });
}; };

View File

@ -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';