Compare commits

...

116 Commits

Author SHA1 Message Date
d102d5a7e6 2.0.0 2022-03-16 13:42:30 +01:00
8be31958b4 1.0.115 2022-03-16 13:39:50 +01:00
e21f6c3920 fix(core): update 2022-03-16 13:39:50 +01:00
356a756962 1.0.114 2022-03-04 08:21:58 +01:00
0bb66e8221 fix(core): update 2022-03-04 08:21:57 +01:00
b70077c43f 1.0.113 2022-03-02 19:18:40 +01:00
9c5f024e5f 1.0.112 2022-03-02 19:00:52 +01:00
5eea208924 fix(core): update 2022-03-02 19:00:52 +01:00
f21fdb2eb8 1.0.111 2022-03-02 18:00:35 +01:00
d6ea74cb71 fix(core): update 2022-03-02 18:00:35 +01:00
10375576a7 1.0.110 2022-03-02 17:44:46 +01:00
367be854ff fix(core): update 2022-03-02 17:44:45 +01:00
0933c1d83b 1.0.109 2022-01-28 18:05:57 +01:00
af1eb73028 fix(core): update 2022-01-28 18:05:57 +01:00
4bff0091c9 1.0.108 2022-01-28 16:03:13 +01:00
7bae4585f3 fix(core): update 2022-01-28 16:03:13 +01:00
d9cdff2897 1.0.107 2022-01-24 06:56:32 +01:00
189060f11d fix(core): update 2022-01-24 06:56:30 +01:00
fc2dfa8018 1.0.106 2022-01-22 18:59:30 +01:00
be44cb7a78 fix(core): update 2022-01-22 18:59:29 +01:00
de6aba4289 1.0.105 2022-01-22 18:56:31 +01:00
3babbce2c5 fix(core): update 2022-01-22 18:56:30 +01:00
707956b7ee 1.0.104 2022-01-14 18:20:46 +01:00
c71a6170d5 fix(core): update 2022-01-14 18:20:45 +01:00
3f98f2867c 1.0.103 2021-12-13 23:18:07 +01:00
7c86f5a8f6 fix(core): update 2021-12-13 23:18:06 +01:00
472ec3158e 1.0.102 2021-11-26 17:36:00 +01:00
9a0d09d9de fix(core): update 2021-11-26 17:36:00 +01:00
5975ca7320 1.0.101 2021-11-26 16:21:11 +01:00
97583c650d fix(core): update 2021-11-26 16:21:11 +01:00
f5fd0662d3 1.0.100 2021-11-26 15:26:16 +01:00
14c91ed81f fix(core): update 2021-11-26 15:26:15 +01:00
1aabacdf87 1.0.99 2021-11-21 16:14:28 +01:00
1747afe04a fix(core): update 2021-11-21 16:14:27 +01:00
a1bd7f74a7 1.0.98 2021-11-21 16:08:28 +01:00
6ff89390b7 fix(core): update 2021-11-21 16:08:27 +01:00
2ad8d0a9fd 1.0.97 2021-11-21 15:52:49 +01:00
ae01670361 fix(core): update 2021-11-21 15:52:49 +01:00
5657b0be1d 1.0.96 2021-09-27 12:35:39 +02:00
781ae3c3b1 fix(core): update 2021-09-27 12:35:39 +02:00
da79e623cc 1.0.95 2021-09-16 16:49:24 +02:00
3ca6b5e34e fix(core): update 2021-09-16 16:49:24 +02:00
98f0bc013d 1.0.94 2021-09-13 20:35:34 +02:00
d32a544de2 fix(core): update 2021-09-13 20:35:33 +02:00
070221d6c9 1.0.93 2021-09-08 23:10:04 +02:00
19714854ba fix(core): update 2021-09-08 23:10:04 +02:00
50ebea1b5f 1.0.92 2021-09-08 22:42:33 +02:00
df0527f3c1 fix(core): update 2021-09-08 22:42:32 +02:00
b620b7393e 1.0.91 2021-09-01 21:05:55 +02:00
ab5b9511fd fix(core): update 2021-09-01 21:05:54 +02:00
da86e64056 1.0.90 2021-09-01 00:37:05 +02:00
effc331a67 fix(core): update 2021-09-01 00:37:05 +02:00
fa24708a47 1.0.89 2021-08-26 20:24:29 +02:00
31126e30eb fix(core): update 2021-08-26 20:24:28 +02:00
ef0a4eae80 1.0.88 2021-08-19 22:12:22 +02:00
e711302c28 fix(core): update 2021-08-19 22:12:22 +02:00
1cfc07fe8e 1.0.87 2021-03-28 21:51:12 +00:00
7f221c1a8c fix(core): update 2021-03-28 21:51:11 +00:00
09f927c0d4 1.0.86 2021-03-10 17:01:33 +00:00
1042e79625 fix(core): update 2021-03-10 17:01:32 +00:00
fced2efcbd 1.0.85 2021-03-10 16:57:26 +00:00
83fe1d62e7 fix(core): update 2021-03-10 16:57:25 +00:00
78bce9600c 1.0.84 2020-12-07 23:23:02 +00:00
2860b5b6e0 fix(core): update 2020-12-07 23:23:02 +00:00
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
4456f00816 1.0.80 2020-12-07 03:13:34 +00:00
b60a1bebe0 fix(core): update 2020-12-07 03:13:34 +00:00
94127227a6 1.0.79 2020-12-01 21:06:54 +00:00
b5af1b1226 fix(core): update 2020-12-01 21:06:53 +00:00
a6f382dd7f 1.0.78 2020-12-01 17:31:38 +00:00
0de00cb2c1 fix(core): update 2020-12-01 17:31:37 +00:00
570a026cf8 1.0.77 2020-11-30 20:03:05 +00:00
48b5cc770c fix(core): update 2020-11-30 20:03:05 +00:00
7ae2de5843 1.0.76 2020-11-30 10:25:00 +00:00
e4d87ae882 fix(core): update 2020-11-30 10:25:00 +00:00
259a669e24 1.0.75 2020-11-29 23:56:20 +00:00
bf461dd1a0 fix(core): update 2020-11-29 23:56:19 +00:00
63c9ae97d4 1.0.74 2020-11-25 15:42:56 +00:00
a83239e0d9 fix(core): update 2020-11-25 15:42:55 +00:00
8da64f1b50 1.0.73 2020-11-25 15:14:48 +00:00
2d4c0e4e49 fix(core): update 2020-11-25 15:14:48 +00:00
1c8f7fa59e 1.0.72 2020-11-25 14:56:09 +00:00
a613c0aca2 fix(core): update 2020-11-25 14:56:08 +00:00
127564cd71 1.0.71 2020-11-25 14:43:23 +00:00
e077bf5b25 fix(core): update 2020-11-25 14:43:23 +00:00
64a3f57813 1.0.70 2020-11-24 20:57:42 +00:00
1315e8c3f6 fix(core): update 2020-11-24 20:57:41 +00:00
d059862841 1.0.69 2020-11-24 19:48:14 +00:00
ad34affb9e fix(core): update 2020-11-24 19:48:14 +00:00
011b3fb76a 1.0.68 2020-11-24 19:23:07 +00:00
47099d02b5 fix(core): update 2020-11-24 19:23:06 +00:00
f4029ed008 1.0.67 2020-11-24 19:19:00 +00:00
d5732822e4 fix(core): update 2020-11-24 19:18:59 +00:00
c467a92e7c 1.0.66 2020-11-24 16:55:58 +00:00
746c1148e3 fix(core): update 2020-11-24 16:55:57 +00:00
d75e66ba78 1.0.65 2020-11-23 20:41:27 +00:00
7c805a075e fix(core): update 2020-11-23 20:41:26 +00:00
5e1a44ad88 1.0.64 2020-11-21 16:50:14 +00:00
093eae2c97 fix(core): update 2020-11-21 16:50:13 +00:00
991d318de6 1.0.63 2020-11-06 01:27:47 +00:00
c7c3650fe9 fix(core): update 2020-11-06 01:27:46 +00:00
8d355f234f 1.0.62 2020-11-05 20:08:07 +00:00
a5c22ec1db fix(core): update 2020-11-05 20:08:07 +00:00
f5263a0cc4 1.0.61 2020-11-05 18:50:28 +00:00
4a022a7d1d fix(core): update 2020-11-05 18:50:28 +00:00
bd6ba6d6db 1.0.60 2020-11-05 18:08:42 +00:00
317bc63bc7 fix(core): update 2020-11-05 18:08:42 +00:00
22eeb7809b 1.0.59 2020-11-05 17:37:45 +00:00
fdd550ec21 fix(core): update 2020-11-05 17:37:45 +00:00
9db1f92ba3 1.0.58 2020-11-05 17:20:01 +00:00
772d0b0b97 fix(core): update 2020-11-05 17:20:01 +00:00
15 changed files with 16197 additions and 7998 deletions

View File

@ -36,6 +36,7 @@ auditProductionDependencies:
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci

23559
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +1,40 @@
{
"name": "@designestate/dees-domtools",
"version": "1.0.57",
"version": "2.0.0",
"private": false,
"description": "tools to simplify complex css structures",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web && tsbundle npm)",
"build": "(tsbuild --web --allowimplicitany --skiplibcheck && tsbundle npm)",
"format": "(gitzone format)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsbundle": "^1.0.78",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.2.9",
"@types/node": "^14.14.6",
"@gitzone/tsbuild": "^2.1.56",
"@gitzone/tsbundle": "^1.0.98",
"@gitzone/tstest": "^1.0.68",
"@pushrocks/tapbundle": "^5.0.2",
"@types/node": "^17.0.21",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {
"@apiglobal/typedrequest": "^1.0.54",
"@designestate/dees-comms": "^1.0.7",
"@pushrocks/lik": "^4.0.17",
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartrouter": "^1.0.4",
"@pushrocks/smartstate": "^1.0.17",
"@pushrocks/webrequest": "^2.0.13",
"@pushrocks/websetup": "^3.0.5",
"@pushrocks/webstore": "^1.0.16",
"lit-element": "^2.4.0",
"@apiglobal/typedrequest": "^1.0.65",
"@designestate/dees-comms": "^1.0.16",
"@pushrocks/lik": "^5.0.4",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartrouter": "^1.0.12",
"@pushrocks/smartrx": "^2.0.25",
"@pushrocks/smartstate": "^1.0.23",
"@pushrocks/webrequest": "^2.0.15",
"@pushrocks/websetup": "^3.0.16",
"@pushrocks/webstore": "^1.0.18",
"lit": "^2.2.1",
"sweet-scroll": "^4.0.0"
},
"files": [

View File

@ -3,7 +3,7 @@ import * as domtools from '../ts/index';
tap.test('first test', async () => {
const domtoolsInstance = await domtools.DomTools.setupDomTools();
expect(domtoolsInstance).to.be.instanceof(domtools.DomTools);
expect(domtoolsInstance).toBeInstanceOf(domtools.DomTools);
});
tap.start();

View File

@ -1,71 +0,0 @@
import { DomTools } from './domtools.classes.domtools';
export const desktop = 1240;
export const tablet = 1024;
export const phablet = 600;
export const phone = 400;
export type TViewport = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
export const getEnvironment = (): TViewport => {
if (
globalThis.deesDomTools &&
globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport
) {
return globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport;
} else {
return 'native';
}
};
export const cssForTablet = (contentArg) => {
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
return `
@media (max-width: ${tablet}px) {
${contentArg}
}
`;
} else if (
getEnvironment() === 'tablet' ||
getEnvironment() === 'phablet' ||
getEnvironment() === 'phone'
) {
return `
@media (min-width: 0px) {
${contentArg}
}
`;
}
};
export const cssForPhablet = (contentArg) => {
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
return `
@media (max-width: ${phablet}px) {
${contentArg}
}
`;
} else if (getEnvironment() === 'phablet' || getEnvironment() === 'phone') {
return `
@media (min-width: 0px) {
${contentArg}
}
`;
}
};
export const cssForPhone = (contentArg) => {
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
return `
@media (max-width: ${phone}px) {
${contentArg}
}
`;
} else if (getEnvironment() === 'phone') {
return `
@media (min-width: 0px) {
${contentArg}
}
`;
}
};

View File

@ -1,14 +1,15 @@
import * as plugins from './domtools.plugins';
import { Stringmap } from '@pushrocks/lik/dist_ts/lik.stringmap';
import { FastMap } from '@pushrocks/lik/dist_ts/lik.fastmap';
import { TViewport } from './domtools.breakpoints';
import * as plugins from './domtools.plugins.js';
import { Stringmap } from '@pushrocks/lik/dist_ts/lik.stringmap.js';
import { FastMap } from '@pushrocks/lik/dist_ts/lik.fastmap.js';
import { TViewport } from './domtools.css.breakpoints.js';
import { Scroller } from './domtools.classes.scroller';
import { delayForRandom } from '@pushrocks/smartdelay';
import { Scroller } from './domtools.classes.scroller.js';
import { WebSetup } from '@pushrocks/websetup';
import { ThemeManager } from './domtools.classes.thememanager.js';
export interface IDomToolsState {
virtualViewport: TViewport;
jwt: string;
}
export class DomTools {
@ -64,11 +65,16 @@ export class DomTools {
bodyElement: null,
};
public websetup: WebSetup;
public websetup: WebSetup = new WebSetup({
metaObject: {
title: 'loading...',
},
});
public smartstate = new plugins.smartstate.Smartstate();
public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', {
virtualViewport: 'native',
jwt: null
});
public router = new plugins.smartrouter.SmartRouter({
@ -76,14 +82,17 @@ export class DomTools {
});
public convenience = {
typedrequest: plugins.typedrequest,
smartdelay: plugins.smartdelay,
};
public scroller: plugins.SweetScroll;
public deesComms = new plugins.deesComms.DeesComms();
public scroller = new plugins.SweetScroll({
/* some options */
}); // TODO: switch to scroller class
public themeManager = new ThemeManager(this);
private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
/* private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
async (statePart, payload) => {
const currentState = statePart.getState();
currentState.virtualViewport = payload;
@ -91,21 +100,19 @@ export class DomTools {
}
);
public setVirtualViewport(environmentArg: TViewport) {
this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg);
} */
public domToolsReady = plugins.smartpromise.defer();
public domReady = plugins.smartpromise.defer();
public globalStylesReady = plugins.smartpromise.defer();
constructor() {
// lets care about third party stuff
this.domToolsReady.promise.then(() => {
this.scroller = new plugins.SweetScroll({
/* some options */
});
});
}
constructor() {}
private runOnceTrackerStringMap = new Stringmap();
private runOnceResultMap = new FastMap();
/**
* run a function once and always get the Promise of the first execution
* @param identifierArg the indentifier arg identifies functions. functions with the same identifier are considered equal
@ -131,7 +138,10 @@ export class DomTools {
}
// setStuff
/**
* allows to set global styles
* @param stylesText the css text you want to set
*/
public async setGlobalStyles(stylesText: string) {
await this.domReady.promise;
const styleElement = document.createElement('style');
@ -140,12 +150,24 @@ export class DomTools {
this.elements.headElement.appendChild(styleElement);
}
public setVirtualViewport(environmentArg: TViewport) {
this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg);
/**
* allows setting external css files
* @param cssLinkArg a url to an external stylesheet
*/
public async setExternalCss(cssLinkArg: string) {
const cssTag = document.createElement('link');
cssTag.rel = 'stylesheet';
cssTag.crossOrigin = 'anonymous';
cssTag.href = cssLinkArg;
document.head.append(cssTag);
}
/**
* allows setting of website infos
* @param optionsArg the website info
*/
public async setWebsiteInfo(optionsArg: plugins.websetup.IWebSetupConstructorOptions) {
this.websetup = new plugins.websetup.WebSetup(optionsArg);
await this.websetup.setup(optionsArg);
await this.websetup.readyPromise;
}
}

View File

@ -1,4 +1,4 @@
import * as plugins from './domtools.plugins';
import * as plugins from './domtools.plugins.js';
export class Scroller {
// TODO: move sweet scroll over to here;

View File

@ -0,0 +1,54 @@
import { DomTools } from './domtools.classes.domtools.js';
import * as plugins from './domtools.plugins.js';
export class ThemeManager {
public domtoolsRef: DomTools;
public goBrightBoolean = false;
public preferredColorSchemeMediaMatch = window.matchMedia('(prefers-color-scheme: light)');
public themeObservable = new plugins.smartrx.rxjs.ReplaySubject<boolean>(1);
constructor(domtoolsRefArg: DomTools) {
this.domtoolsRef = domtoolsRefArg;
// lets care
this.goBrightBoolean = this.preferredColorSchemeMediaMatch.matches;
this.preferredColorSchemeMediaMatch.addEventListener('change', (eventArg) => {
this.goBrightBoolean = eventArg.matches;
this.updateAllConnectedElements();
});
this.updateAllConnectedElements();
}
private async updateAllConnectedElements() {
if (document.body && document.body.style) {
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000';
}
this.themeObservable.next(this.goBrightBoolean);
}
/**
* set the theme of the website to bright
*/
public goBright() {
this.goBrightBoolean = true;
this.updateAllConnectedElements();
}
/**
* set the theme of the website to dark
*/
public goDark() {
this.goBrightBoolean = false;
this.updateAllConnectedElements();
}
/**
* simply toggle between bright and dark
*/
public toggleDarkBright() {
this.goBrightBoolean = !this.goBrightBoolean;
this.updateAllConnectedElements();
}
}

View File

@ -0,0 +1,59 @@
import { DomTools } from './domtools.classes.domtools.js';
import { css, unsafeCSS } from 'lit';
/**
* changes scrollbar styles to be consistent across OS borders
*/
export const scrollBarStyles: string = (() => {
const returnStyles =
navigator.userAgent.indexOf('Mac OS X') === -1
? css`
/* width */
::-webkit-scrollbar {
width: 6px;
}
/* Track */
::-webkit-scrollbar-track {
background: #111;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #666;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #777;
}
`.cssText
: ``;
return returnStyles;
})();
export const globalBaseStyles: string = css`
/* global material font */
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v42/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2)
format('woff2');
}
/* Roboto Font */
@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');
/* global body styles */
body {
margin: 0px;
font-family: 'Roboto', sans-serif;
box-sizing: border-box;
}
/* scroll bar styles */
${unsafeCSS(scrollBarStyles)}
`.cssText;

View File

@ -0,0 +1,43 @@
import { DomTools } from './domtools.classes.domtools.js';
import { CSSResult, unsafeCSS } from 'lit';
export const desktop = 1240;
export const tablet = 1024;
export const phablet = 600;
export const phone = 400;
export type TViewport = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
export const cssForTablet = (cssArg: CSSResult) => {
return unsafeCSS(`
@container wccToolsViewport size(max-width: ${tablet}px) {
${cssArg.cssText}
}
@media (max-width: ${tablet}px) {
${cssArg.cssText}
}
`);
};
export const cssForPhablet = (cssArg: CSSResult) => {
return unsafeCSS(`
@container wccToolsViewport size(max-width: ${phablet}px) {
${cssArg.cssText}
}
@media (max-width: ${phablet}px) {
${cssArg.cssText}
}
`);
};
export const cssForPhone = (cssArg: CSSResult) => {
return unsafeCSS(`
@container wccToolsViewport size(max-width: ${phone}px) {
${cssArg.cssText}
}
@media (max-width: ${phone}px) {
${cssArg.cssText}
}
`);
};

View File

@ -1,28 +0,0 @@
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,8 +1,22 @@
import * as plugins from './domtools.plugins';
import { DomTools } from './domtools.classes.domtools';
import { scrollBarStyles } from './domtools.css.theme';
import * as plugins from './domtools.plugins.js';
import { DomTools } from './domtools.classes.domtools.js';
import { scrollBarStyles, globalBaseStyles } from './domtools.css.basestyles.js';
import { html } from 'lit-element';
import { html, LitElement, css, unsafeCSS } from 'lit';
export const staticStyles = css`
* {
transition: background 0.1s, color 0.1s;
box-sizing: border-box;
}
:host {
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
${unsafeCSS(scrollBarStyles)}
`;
/**
* styles to be included in every webcomponent
@ -10,10 +24,14 @@ import { html } from 'lit-element';
export const styles = html`
<style>
* {
font-family: 'Roboto', sans-serif;
transition: background 0.1s, color 0.1s;
box-sizing: border-box;
}
:host {
font-family: 'Roboto', sans-serif;
}
${scrollBarStyles}
</style>
`;
@ -22,37 +40,17 @@ export const styles = html`
* a basic setup for elements
* makes sure everything is in check
*/
export const setup = async () => {
export const setup = async (elementArg?: LitElement): Promise<DomTools> => {
const domTools = await DomTools.setupDomTools();
if (elementArg) {
// lets do something with the element
// not used right now
}
domTools.runOnce('elementBasicSetup', async () => {
// bodyStyles
domTools.setGlobalStyles(`
body {
margin: 0px;
font-family: 'Roboto', sans-serif;
box-sizing: border-box;
}
`);
// material font
domTools.setGlobalStyles(`
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v42/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2) format('woff2');
}
`);
// Roboto Font
domTools.setGlobalStyles(`
@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}
`);
domTools.setGlobalStyles(globalBaseStyles);
});
return domTools;
};

View File

@ -1,9 +1,7 @@
// designestate scope
import * as deesComms from '@designestate/dees-comms';
export {
deesComms
};
export { deesComms };
// apiglobal scope
import * as typedrequest from '@apiglobal/typedrequest';
@ -14,12 +12,29 @@ export { typedrequest };
import * as smartdelay from '@pushrocks/smartdelay';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrouter from '@pushrocks/smartrouter';
import * as smartrx from '@pushrocks/smartrx';
import * as smartstate from '@pushrocks/smartstate';
import * as webrequest from '@pushrocks/webrequest';
import * as websetup from '@pushrocks/websetup';
import * as webstore from '@pushrocks/webstore';
export { smartdelay, smartpromise, smartrouter, smartstate, webrequest, websetup, webstore };
// subscope lik
import { ObjectMap } from '@pushrocks/lik/dist_ts/lik.objectmap.js';
const lik = {
ObjectMap,
};
export {
lik,
smartdelay,
smartpromise,
smartrouter,
smartrx,
smartstate,
webrequest,
websetup,
webstore,
};
// third party scope
import SweetScroll from 'sweet-scroll';

View File

@ -1,15 +1,20 @@
export * from './domtools.colors';
export * from './domtools.colors.js';
import * as elementBasic from './domtools.elementbasic';
import * as breakpoints from './domtools.breakpoints';
import * as css from './domtools.css';
import * as elementBasic from './domtools.elementbasic.js';
import * as breakpoints from './domtools.css.breakpoints.js';
import * as css from './domtools.css.js';
export { css, breakpoints, elementBasic };
export { DomTools } from './domtools.classes.domtools';
export { DomTools } from './domtools.classes.domtools.js';
export { TypedRequest } from '@apiglobal/typedrequest';
export { IWebSetupConstructorOptions } from '@pushrocks/websetup';
export { rxjs } from '@pushrocks/smartrx';
import * as allPlugins from './domtools.plugins';
import * as allPlugins from './domtools.plugins.js';
export const plugins = {
smartdelay: allPlugins.smartdelay,
smartpromise: allPlugins.smartpromise,
SweetScroll: allPlugins.SweetScroll,
smartstate: allPlugins.smartstate
};

6
tsconfig.json Normal file
View File

@ -0,0 +1,6 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "Node12"
}
}