fix(core): update
This commit is contained in:
parent
5657b0be1d
commit
ae01670361
1787
package-lock.json
generated
1787
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -13,17 +13,17 @@
|
|||||||
"format": "(gitzone format)"
|
"format": "(gitzone format)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.27",
|
"@gitzone/tsbuild": "^2.1.28",
|
||||||
"@gitzone/tsbundle": "^1.0.87",
|
"@gitzone/tsbundle": "^1.0.88",
|
||||||
"@gitzone/tstest": "^1.0.57",
|
"@gitzone/tstest": "^1.0.60",
|
||||||
"@pushrocks/tapbundle": "^3.2.14",
|
"@pushrocks/tapbundle": "^3.2.14",
|
||||||
"@types/node": "^16.10.1",
|
"@types/node": "^16.11.9",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-prettier": "^1.15.0"
|
"tslint-config-prettier": "^1.15.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest": "^1.0.58",
|
"@apiglobal/typedrequest": "^1.0.65",
|
||||||
"@designestate/dees-comms": "^1.0.10",
|
"@designestate/dees-comms": "^1.0.11",
|
||||||
"@pushrocks/lik": "^5.0.0",
|
"@pushrocks/lik": "^5.0.0",
|
||||||
"@pushrocks/smartdelay": "^2.0.13",
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"@pushrocks/smartpromise": "^3.1.6",
|
||||||
@ -33,7 +33,7 @@
|
|||||||
"@pushrocks/webrequest": "^2.0.13",
|
"@pushrocks/webrequest": "^2.0.13",
|
||||||
"@pushrocks/websetup": "^3.0.15",
|
"@pushrocks/websetup": "^3.0.15",
|
||||||
"@pushrocks/webstore": "^1.0.16",
|
"@pushrocks/webstore": "^1.0.16",
|
||||||
"lit-element": "^3.0.0",
|
"lit-element": "^3.0.2",
|
||||||
"sweet-scroll": "^4.0.0"
|
"sweet-scroll": "^4.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import { DomTools } from './domtools.classes.domtools';
|
import { DomTools } from './domtools.classes.domtools';
|
||||||
|
|
||||||
|
import { CSSResult } from 'lit-element';
|
||||||
|
|
||||||
export const desktop = 1240;
|
export const desktop = 1240;
|
||||||
export const tablet = 1024;
|
export const tablet = 1024;
|
||||||
export const phablet = 600;
|
export const phablet = 600;
|
||||||
@ -7,65 +9,35 @@ export const phone = 400;
|
|||||||
|
|
||||||
export type TViewport = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
|
export type TViewport = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
|
||||||
|
|
||||||
export const getEnvironment = (): TViewport => {
|
export const cssForTablet = (cssArg: CSSResult) => {
|
||||||
if (
|
return `
|
||||||
globalThis.deesDomTools &&
|
@container wccToolsViewport (min-width: ${tablet}px) {
|
||||||
globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport
|
${cssArg.cssText}
|
||||||
) {
|
|
||||||
return globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport;
|
|
||||||
} else {
|
|
||||||
return 'native';
|
|
||||||
}
|
}
|
||||||
|
@media (min-width: ${tablet}px) {
|
||||||
|
${cssArg.cssText}
|
||||||
|
}
|
||||||
|
`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const cssForTablet = (contentArg) => {
|
export const cssForPhablet = (cssArg: CSSResult) => {
|
||||||
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
|
|
||||||
return `
|
return `
|
||||||
@media (max-width: ${tablet}px) {
|
@container wccToolsViewport (min-width: ${phablet}px) {
|
||||||
${contentArg}
|
${cssArg.cssText}
|
||||||
|
}
|
||||||
|
@media (min-width: ${phablet}px) {
|
||||||
|
${cssArg.cssText}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
} else if (
|
|
||||||
getEnvironment() === 'tablet' ||
|
|
||||||
getEnvironment() === 'phablet' ||
|
|
||||||
getEnvironment() === 'phone'
|
|
||||||
) {
|
|
||||||
return `
|
|
||||||
@media (min-width: 0px) {
|
|
||||||
${contentArg}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const cssForPhablet = (contentArg) => {
|
export const cssForPhone = (cssArg: CSSResult) => {
|
||||||
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
|
|
||||||
return `
|
return `
|
||||||
@media (max-width: ${phablet}px) {
|
@container wccToolsViewport (min-width: ${phone}px) {
|
||||||
${contentArg}
|
${cssArg.cssText}
|
||||||
|
}
|
||||||
|
@media (min-width: ${phone}px) {
|
||||||
|
${cssArg.cssText}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
} 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}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user