@slimr/css 2.1.80 → 2.1.86
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/cjs/addCss.js +2 -2
- package/cjs/addCss.js.map +1 -1
- package/cjs/addCss.ts +2 -2
- package/cjs/shorthandProps.d.ts +2 -0
- package/cjs/shorthandProps.js +1 -0
- package/cjs/shorthandProps.js.map +1 -1
- package/cjs/shorthandProps.ts +3 -0
- package/esm/addCss.js +2 -2
- package/esm/addCss.js.map +1 -1
- package/esm/addCss.ts +2 -2
- package/esm/shorthandProps.d.ts +2 -0
- package/esm/shorthandProps.js +1 -0
- package/esm/shorthandProps.js.map +1 -1
- package/esm/shorthandProps.ts +3 -0
- package/package.json +3 -3
- package/src/addCss.ts +2 -2
- package/src/shorthandProps.ts +3 -0
package/cjs/addCss.js
CHANGED
|
@@ -22,7 +22,7 @@ const util_1 = require("@slimr/util");
|
|
|
22
22
|
*/
|
|
23
23
|
function addCss(css) {
|
|
24
24
|
addCss.que.add(css);
|
|
25
|
-
|
|
25
|
+
requestAnimationFrame(() => {
|
|
26
26
|
if (addCss.que.size) {
|
|
27
27
|
(0, util_1.appendStyle)({
|
|
28
28
|
id: `u${addCss.count++}`,
|
|
@@ -30,7 +30,7 @@ function addCss(css) {
|
|
|
30
30
|
});
|
|
31
31
|
addCss.que.clear();
|
|
32
32
|
}
|
|
33
|
-
}
|
|
33
|
+
});
|
|
34
34
|
}
|
|
35
35
|
addCss.que = new Set();
|
|
36
36
|
addCss.count = 0;
|
package/cjs/addCss.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addCss.js","sourceRoot":"","sources":["../src/addCss.ts"],"names":[],"mappings":";;AAoBA,wBAWC;AA/BD,sCAAyC;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,MAAM,CAAC,GAAW;IACjC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACnB,
|
|
1
|
+
{"version":3,"file":"addCss.js","sourceRoot":"","sources":["../src/addCss.ts"],"names":[],"mappings":";;AAoBA,wBAWC;AA/BD,sCAAyC;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,MAAM,CAAC,GAAW;IACjC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACnB,qBAAqB,CAAC,GAAG,EAAE;QAC1B,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YACrB,IAAA,kBAAW,EAAC;gBACX,EAAE,EAAE,IAAI,MAAM,CAAC,KAAK,EAAE,EAAE;gBACxB,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;aACrC,CAAC,CAAA;YACF,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAA;QACnB,CAAC;IACF,CAAC,CAAC,CAAA;AACH,CAAC;AACD,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,EAAU,CAAA;AAC9B,MAAM,CAAC,KAAK,GAAG,CAAC,CAAA"}
|
package/cjs/addCss.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { appendStyle } from "@slimr/util"
|
|
|
20
20
|
*/
|
|
21
21
|
export function addCss(css: string) {
|
|
22
22
|
addCss.que.add(css)
|
|
23
|
-
|
|
23
|
+
requestAnimationFrame(() => {
|
|
24
24
|
if (addCss.que.size) {
|
|
25
25
|
appendStyle({
|
|
26
26
|
id: `u${addCss.count++}`,
|
|
@@ -28,7 +28,7 @@ export function addCss(css: string) {
|
|
|
28
28
|
})
|
|
29
29
|
addCss.que.clear()
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
})
|
|
32
32
|
}
|
|
33
33
|
addCss.que = new Set<string>()
|
|
34
34
|
addCss.count = 0
|
package/cjs/shorthandProps.d.ts
CHANGED
package/cjs/shorthandProps.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthandProps.js","sourceRoot":"","sources":["../src/shorthandProps.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"shorthandProps.js","sourceRoot":"","sources":["../src/shorthandProps.ts"],"names":[],"mappings":";;;AAyEA,4CAUC;AAbD;;GAEG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IAC3C,GAAG,GAAG,KAAK,GAAG,EAAE,CAAA,CAAC,4CAA4C;IAC7D,gCAAgC;IAChC,GAAG,GAAG,GAAG;SACP,OAAO,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;SAC9C,OAAO,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAA;IACjD,MAAM,CAAC,OAAO,CAAC,yBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;QACpD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IACjE,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AAClB,CAAC;AAED;;GAEG;AACU,QAAA,iBAAiB,GAG1B;IACH,EAAE,EAAE,aAAa;IACjB,CAAC,EAAE,QAAQ;IACX,EAAE,EAAE,eAAe;IACnB,EAAE,EAAE,YAAY;IAChB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,gBAAgB;IACpB,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,QAAQ;IACX,EAAE,EAAE,iBAAiB;IACrB,CAAC,EAAE,QAAQ;IACX,EAAE,EAAE,aAAa;IACjB,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,CAAC,EAAE,SAAS;IACZ,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,eAAe;IACnB,EAAE,EAAE,aAAa;IACjB,EAAE,EAAE,gBAAgB;IACpB,GAAG,EAAE,UAAU;IACf,EAAE,EAAE,YAAY;IAChB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,SAAS;CACZ,CAAA"}
|
package/cjs/shorthandProps.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface ShorthandProps {
|
|
|
18
18
|
f?: string
|
|
19
19
|
/** shorthand for css:flex-direction */
|
|
20
20
|
fd?: string
|
|
21
|
+
/** shorthand for css:gap */
|
|
22
|
+
g?: number | string
|
|
21
23
|
/** shorthand for css:height */
|
|
22
24
|
h?: number | string
|
|
23
25
|
/** shorthand for css:inset */
|
|
@@ -96,6 +98,7 @@ export const shorthandPropsMap: Record<
|
|
|
96
98
|
d: "display",
|
|
97
99
|
f: "flex",
|
|
98
100
|
fd: "flex-direction",
|
|
101
|
+
g: "gap",
|
|
99
102
|
i: "inset",
|
|
100
103
|
h: "height",
|
|
101
104
|
jc: "justify-content",
|
package/esm/addCss.js
CHANGED
|
@@ -19,7 +19,7 @@ import { appendStyle } from "@slimr/util";
|
|
|
19
19
|
*/
|
|
20
20
|
export function addCss(css) {
|
|
21
21
|
addCss.que.add(css);
|
|
22
|
-
|
|
22
|
+
requestAnimationFrame(() => {
|
|
23
23
|
if (addCss.que.size) {
|
|
24
24
|
appendStyle({
|
|
25
25
|
id: `u${addCss.count++}`,
|
|
@@ -27,7 +27,7 @@ export function addCss(css) {
|
|
|
27
27
|
});
|
|
28
28
|
addCss.que.clear();
|
|
29
29
|
}
|
|
30
|
-
}
|
|
30
|
+
});
|
|
31
31
|
}
|
|
32
32
|
addCss.que = new Set();
|
|
33
33
|
addCss.count = 0;
|
package/esm/addCss.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addCss.js","sourceRoot":"","sources":["../src/addCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW;IACjC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACnB,
|
|
1
|
+
{"version":3,"file":"addCss.js","sourceRoot":"","sources":["../src/addCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW;IACjC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACnB,qBAAqB,CAAC,GAAG,EAAE;QAC1B,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YACrB,WAAW,CAAC;gBACX,EAAE,EAAE,IAAI,MAAM,CAAC,KAAK,EAAE,EAAE;gBACxB,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;aACrC,CAAC,CAAA;YACF,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAA;QACnB,CAAC;IACF,CAAC,CAAC,CAAA;AACH,CAAC;AACD,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,EAAU,CAAA;AAC9B,MAAM,CAAC,KAAK,GAAG,CAAC,CAAA"}
|
package/esm/addCss.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { appendStyle } from "@slimr/util"
|
|
|
20
20
|
*/
|
|
21
21
|
export function addCss(css: string) {
|
|
22
22
|
addCss.que.add(css)
|
|
23
|
-
|
|
23
|
+
requestAnimationFrame(() => {
|
|
24
24
|
if (addCss.que.size) {
|
|
25
25
|
appendStyle({
|
|
26
26
|
id: `u${addCss.count++}`,
|
|
@@ -28,7 +28,7 @@ export function addCss(css: string) {
|
|
|
28
28
|
})
|
|
29
29
|
addCss.que.clear()
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
})
|
|
32
32
|
}
|
|
33
33
|
addCss.que = new Set<string>()
|
|
34
34
|
addCss.count = 0
|
package/esm/shorthandProps.d.ts
CHANGED
package/esm/shorthandProps.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthandProps.js","sourceRoot":"","sources":["../src/shorthandProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shorthandProps.js","sourceRoot":"","sources":["../src/shorthandProps.ts"],"names":[],"mappings":"AAsEA;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC3C,GAAG,GAAG,KAAK,GAAG,EAAE,CAAA,CAAC,4CAA4C;IAC7D,gCAAgC;IAChC,GAAG,GAAG,GAAG;SACP,OAAO,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;SAC9C,OAAO,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAA;IACjD,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;QACpD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IACjE,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAG1B;IACH,EAAE,EAAE,aAAa;IACjB,CAAC,EAAE,QAAQ;IACX,EAAE,EAAE,eAAe;IACnB,EAAE,EAAE,YAAY;IAChB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,gBAAgB;IACpB,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,QAAQ;IACX,EAAE,EAAE,iBAAiB;IACrB,CAAC,EAAE,QAAQ;IACX,EAAE,EAAE,aAAa;IACjB,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,CAAC,EAAE,SAAS;IACZ,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,eAAe;IACnB,EAAE,EAAE,aAAa;IACjB,EAAE,EAAE,gBAAgB;IACpB,GAAG,EAAE,UAAU;IACf,EAAE,EAAE,YAAY;IAChB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,SAAS;CACZ,CAAA"}
|
package/esm/shorthandProps.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface ShorthandProps {
|
|
|
18
18
|
f?: string
|
|
19
19
|
/** shorthand for css:flex-direction */
|
|
20
20
|
fd?: string
|
|
21
|
+
/** shorthand for css:gap */
|
|
22
|
+
g?: number | string
|
|
21
23
|
/** shorthand for css:height */
|
|
22
24
|
h?: number | string
|
|
23
25
|
/** shorthand for css:inset */
|
|
@@ -96,6 +98,7 @@ export const shorthandPropsMap: Record<
|
|
|
96
98
|
d: "display",
|
|
97
99
|
f: "flex",
|
|
98
100
|
fd: "flex-direction",
|
|
101
|
+
g: "gap",
|
|
99
102
|
i: "inset",
|
|
100
103
|
h: "height",
|
|
101
104
|
jc: "justify-content",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slimr/css",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.86",
|
|
4
4
|
"author": "Brian Dombrowski",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"private": false,
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"start": "nodemon -w src -e '*' -x 'npm run build && cd ../demo && npm start'"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@slimr/util": "^3.2.
|
|
37
|
+
"@slimr/util": "^3.2.74"
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|
package/src/addCss.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { appendStyle } from "@slimr/util"
|
|
|
20
20
|
*/
|
|
21
21
|
export function addCss(css: string) {
|
|
22
22
|
addCss.que.add(css)
|
|
23
|
-
|
|
23
|
+
requestAnimationFrame(() => {
|
|
24
24
|
if (addCss.que.size) {
|
|
25
25
|
appendStyle({
|
|
26
26
|
id: `u${addCss.count++}`,
|
|
@@ -28,7 +28,7 @@ export function addCss(css: string) {
|
|
|
28
28
|
})
|
|
29
29
|
addCss.que.clear()
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
})
|
|
32
32
|
}
|
|
33
33
|
addCss.que = new Set<string>()
|
|
34
34
|
addCss.count = 0
|
package/src/shorthandProps.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface ShorthandProps {
|
|
|
18
18
|
f?: string
|
|
19
19
|
/** shorthand for css:flex-direction */
|
|
20
20
|
fd?: string
|
|
21
|
+
/** shorthand for css:gap */
|
|
22
|
+
g?: number | string
|
|
21
23
|
/** shorthand for css:height */
|
|
22
24
|
h?: number | string
|
|
23
25
|
/** shorthand for css:inset */
|
|
@@ -96,6 +98,7 @@ export const shorthandPropsMap: Record<
|
|
|
96
98
|
d: "display",
|
|
97
99
|
f: "flex",
|
|
98
100
|
fd: "flex-direction",
|
|
101
|
+
g: "gap",
|
|
99
102
|
i: "inset",
|
|
100
103
|
h: "height",
|
|
101
104
|
jc: "justify-content",
|