@caspeco/casper-ui-library 9.10.0 → 9.11.0

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.
@@ -0,0 +1,33 @@
1
+ function d(t, r, u) {
2
+ const y = new Array(t);
3
+ return new Proxy(y, {
4
+ get(i, n, a) {
5
+ if (typeof n == "string") {
6
+ const c = n.charCodeAt(0);
7
+ if (c >= 48 && c <= 57) {
8
+ const e = +n;
9
+ if (Number.isInteger(e) && e >= 0 && e < t) {
10
+ let s = i[e];
11
+ if (!s) {
12
+ const f = r[e * 2];
13
+ s = i[e] = {
14
+ index: e,
15
+ key: u(e),
16
+ start: f,
17
+ size: r[e * 2 + 1],
18
+ end: f + r[e * 2 + 1],
19
+ lane: 0
20
+ };
21
+ }
22
+ return s;
23
+ }
24
+ }
25
+ if (n === "length") return t;
26
+ }
27
+ return Reflect.get(i, n, a);
28
+ }
29
+ });
30
+ }
31
+ export {
32
+ d as createLazyMeasurementsView
33
+ };
@@ -1,52 +1,53 @@
1
- function T(n, l, e) {
2
- let i = e.initialDeps ?? [], t, c = !0;
1
+ function E(n, i, e) {
2
+ let t = e.initialDeps ?? [], o, s = !0;
3
3
  function h() {
4
- var d, m, f;
5
- let g;
6
- e.key && ((d = e.debug) != null && d.call(e)) && (g = Date.now());
7
- const o = n();
8
- if (!(o.length !== i.length || o.some((r, a) => i[a] !== r)))
9
- return t;
10
- i = o;
11
- let s;
12
- if (e.key && ((m = e.debug) != null && m.call(e)) && (s = Date.now()), t = l(...o), e.key && ((f = e.debug) != null && f.call(e))) {
13
- const r = Math.round((Date.now() - g) * 100) / 100, a = Math.round((Date.now() - s) * 100) / 100, b = a / 16, w = (u, D) => {
14
- for (u = String(u); u.length < D; )
15
- u = " " + u;
16
- return u;
4
+ var d;
5
+ const r = process.env.NODE_ENV !== "production" && !!e.key && !!((d = e.debug) != null && d.call(e));
6
+ let m = 0;
7
+ r && (m = Date.now());
8
+ const u = n();
9
+ if (!(u.length !== t.length || u.some((c, a) => t[a] !== c)))
10
+ return o;
11
+ t = u;
12
+ let f = 0;
13
+ if (r && (f = Date.now()), o = i(...u), r) {
14
+ const c = Math.round((Date.now() - m) * 100) / 100, a = Math.round((Date.now() - f) * 100) / 100, p = a / 16, g = (l, w) => {
15
+ for (l = String(l); l.length < w; )
16
+ l = " " + l;
17
+ return l;
17
18
  };
18
19
  console.info(
19
- `%c⏱ ${w(a, 5)} /${w(r, 5)} ms`,
20
+ `%c⏱ ${g(a, 5)} /${g(c, 5)} ms`,
20
21
  `
21
22
  font-size: .6rem;
22
23
  font-weight: bold;
23
24
  color: hsl(${Math.max(
24
25
  0,
25
- Math.min(120 - 120 * b, 120)
26
+ Math.min(120 - 120 * p, 120)
26
27
  )}deg 100% 31%);`,
27
28
  e?.key
28
29
  );
29
30
  }
30
- return e?.onChange && !(c && e.skipInitialOnChange) && e.onChange(t), c = !1, t;
31
+ return e?.onChange && !(s && e.skipInitialOnChange) && e.onChange(o), s = !1, o;
31
32
  }
32
33
  return h.updateDeps = (d) => {
33
- i = d;
34
+ t = d;
34
35
  }, h;
35
36
  }
36
- function k(n, l) {
37
+ function b(n, i) {
37
38
  if (n === void 0)
38
39
  throw new Error("Unexpected undefined");
39
40
  return n;
40
41
  }
41
- const y = (n, l) => Math.abs(n - l) < 1.01, C = (n, l, e) => {
42
- let i;
43
- return function(...t) {
44
- n.clearTimeout(i), i = n.setTimeout(() => l.apply(this, t), e);
42
+ const T = (n, i) => Math.abs(n - i) < 1.01, v = (n, i, e) => {
43
+ let t;
44
+ return function(...o) {
45
+ n.clearTimeout(t), t = n.setTimeout(() => i.apply(this, o), e);
45
46
  };
46
47
  };
47
48
  export {
48
- y as approxEqual,
49
- C as debounce,
50
- T as memo,
51
- k as notUndefined
49
+ T as approxEqual,
50
+ v as debounce,
51
+ E as memo,
52
+ b as notUndefined
52
53
  };