@slimr/css 2.1.78 → 2.1.84

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 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
- setTimeout(() => {
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
- }, 0);
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,UAAU,CAAC,GAAG,EAAE;QACf,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,EAAE,CAAC,CAAC,CAAA;AACN,CAAC;AACD,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,EAAU,CAAA;AAC9B,MAAM,CAAC,KAAK,GAAG,CAAC,CAAA"}
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
- setTimeout(() => {
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
- }, 0)
31
+ })
32
32
  }
33
33
  addCss.que = new Set<string>()
34
34
  addCss.count = 0
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
- setTimeout(() => {
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
- }, 0);
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,UAAU,CAAC,GAAG,EAAE;QACf,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,EAAE,CAAC,CAAC,CAAA;AACN,CAAC;AACD,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,EAAU,CAAA;AAC9B,MAAM,CAAC,KAAK,GAAG,CAAC,CAAA"}
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
- setTimeout(() => {
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
- }, 0)
31
+ })
32
32
  }
33
33
  addCss.que = new Set<string>()
34
34
  addCss.count = 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slimr/css",
3
- "version": "2.1.78",
3
+ "version": "2.1.84",
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.71"
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
- setTimeout(() => {
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
- }, 0)
31
+ })
32
32
  }
33
33
  addCss.que = new Set<string>()
34
34
  addCss.count = 0