@decantr/css 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +8 -3
- package/dist/index.js +31 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -75,9 +75,9 @@ declare function injectMediaQuery(className: string, declaration: string, query:
|
|
|
75
75
|
*/
|
|
76
76
|
declare function extractCSS(): string;
|
|
77
77
|
/**
|
|
78
|
-
* Get
|
|
78
|
+
* Get array of injected class names.
|
|
79
79
|
*/
|
|
80
|
-
declare function getInjectedClasses():
|
|
80
|
+
declare function getInjectedClasses(): string[];
|
|
81
81
|
/**
|
|
82
82
|
* Reset all injected styles (for testing).
|
|
83
83
|
*/
|
|
@@ -94,4 +94,9 @@ declare function reset(): void;
|
|
|
94
94
|
*/
|
|
95
95
|
declare function resolveAtomDecl(atom: string): string | null;
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
declare function getAnimations(): boolean;
|
|
98
|
+
declare function setAnimations(v: boolean): void;
|
|
99
|
+
declare function getTheme(): string | null;
|
|
100
|
+
declare function setTheme(id: string | null): void;
|
|
101
|
+
|
|
102
|
+
export { BREAKPOINTS, CQ_WIDTHS, css, define, extractCSS, getAnimations, getInjectedClasses, getTheme, inject, injectContainer, injectGroupPeer, injectMediaQuery, injectPseudo, injectResponsive, reset, resolveAtomDecl, setAnimations, setTheme };
|
package/dist/index.js
CHANGED
|
@@ -232,8 +232,15 @@ var DIRECT = {
|
|
|
232
232
|
ring: "outline:2px solid var(--d-primary,#6366f1);outline-offset:2px",
|
|
233
233
|
ring1: "outline:1px solid var(--d-primary,#6366f1);outline-offset:1px",
|
|
234
234
|
ring2: "outline:2px solid var(--d-primary,#6366f1);outline-offset:2px",
|
|
235
|
-
// Container
|
|
236
|
-
|
|
235
|
+
// Container queries
|
|
236
|
+
cqinline: "container-type:inline-size",
|
|
237
|
+
// Container (max-width containment)
|
|
238
|
+
container: "max-width:1200px;margin-inline:auto;width:100%;padding-inline:1rem",
|
|
239
|
+
containersm: "max-width:640px;margin-inline:auto;width:100%;padding-inline:1rem",
|
|
240
|
+
containermd: "max-width:768px;margin-inline:auto;width:100%;padding-inline:1rem",
|
|
241
|
+
containerlg: "max-width:1024px;margin-inline:auto;width:100%;padding-inline:1rem",
|
|
242
|
+
containerxl: "max-width:1400px;margin-inline:auto;width:100%;padding-inline:1rem",
|
|
243
|
+
containerfull: "max-width:100%;margin-inline:auto;width:100%;padding-inline:1rem",
|
|
237
244
|
// Background
|
|
238
245
|
bgcover: "background-size:cover",
|
|
239
246
|
bgcontain: "background-size:contain",
|
|
@@ -753,7 +760,7 @@ function extractCSS() {
|
|
|
753
760
|
return css2;
|
|
754
761
|
}
|
|
755
762
|
function getInjectedClasses() {
|
|
756
|
-
return
|
|
763
|
+
return [...injected];
|
|
757
764
|
}
|
|
758
765
|
function reset() {
|
|
759
766
|
injected.clear();
|
|
@@ -996,13 +1003,31 @@ function css(...classes) {
|
|
|
996
1003
|
function define(name, declaration) {
|
|
997
1004
|
customAtoms.set(name, declaration);
|
|
998
1005
|
}
|
|
1006
|
+
|
|
1007
|
+
// src/index.ts
|
|
1008
|
+
var _animations = true;
|
|
1009
|
+
function getAnimations() {
|
|
1010
|
+
return _animations;
|
|
1011
|
+
}
|
|
1012
|
+
function setAnimations(v) {
|
|
1013
|
+
_animations = v;
|
|
1014
|
+
}
|
|
1015
|
+
var _themeId = null;
|
|
1016
|
+
function getTheme() {
|
|
1017
|
+
return _themeId;
|
|
1018
|
+
}
|
|
1019
|
+
function setTheme(id) {
|
|
1020
|
+
_themeId = id;
|
|
1021
|
+
}
|
|
999
1022
|
export {
|
|
1000
1023
|
BREAKPOINTS,
|
|
1001
1024
|
CQ_WIDTHS,
|
|
1002
1025
|
css,
|
|
1003
1026
|
define,
|
|
1004
1027
|
extractCSS,
|
|
1028
|
+
getAnimations,
|
|
1005
1029
|
getInjectedClasses,
|
|
1030
|
+
getTheme,
|
|
1006
1031
|
inject,
|
|
1007
1032
|
injectContainer,
|
|
1008
1033
|
injectGroupPeer,
|
|
@@ -1010,5 +1035,7 @@ export {
|
|
|
1010
1035
|
injectPseudo,
|
|
1011
1036
|
injectResponsive,
|
|
1012
1037
|
reset,
|
|
1013
|
-
resolveAtomDecl
|
|
1038
|
+
resolveAtomDecl,
|
|
1039
|
+
setAnimations,
|
|
1040
|
+
setTheme
|
|
1014
1041
|
};
|