aptechka 0.4.2 → 0.4.4

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.
Files changed (83) hide show
  1. package/lib/{Damped-B0eRyTcV.cjs → Damped-9h4qaGcS.cjs} +1 -1
  2. package/lib/{Damped-Do9H-LKf.js → Damped-HhitpTP_.js} +1 -1
  3. package/lib/{Derived-vGokdC4b.cjs → Derived-B-g8dYgh.cjs} +1 -1
  4. package/lib/{Derived-Dbjm-dob.js → Derived-kPJs5JC5.js} +1 -1
  5. package/lib/{SourceManager-noBYGNeX.js → SourceManager-4OHacQoQ.js} +1 -1
  6. package/lib/{SourceManager-CzcqsC3z.cjs → SourceManager-Bc68GDrb.cjs} +1 -1
  7. package/lib/Store-BQXXikps.js +156 -0
  8. package/lib/Store-C-1ruEIm.cjs +1 -0
  9. package/lib/{Viewport-CRLSlcoi.cjs → Viewport-DAjFJF5V.cjs} +1 -1
  10. package/lib/{Viewport-VSV_isot.js → Viewport-wlgZaIn7.js} +19 -21
  11. package/lib/WheelControls-0zNcnAB3.cjs +1 -0
  12. package/lib/WheelControls-BAyRKpRZ.js +97 -0
  13. package/lib/abstract-elements/index.cjs +1 -1
  14. package/lib/abstract-elements/index.js +3 -3
  15. package/lib/animation/index.cjs +1 -1
  16. package/lib/animation/index.js +2 -2
  17. package/lib/attribute/index.cjs +1 -1
  18. package/lib/attribute/index.js +1 -1
  19. package/lib/canvas/index.cjs +1 -1
  20. package/lib/canvas/index.js +3 -3
  21. package/lib/controls/Controls.d.ts +1 -2
  22. package/lib/controls/KeyboardControls.d.ts +3 -0
  23. package/lib/controls/index.cjs +1 -1
  24. package/lib/controls/index.d.ts +1 -1
  25. package/lib/controls/index.js +2 -2
  26. package/lib/{createStylesheet-CR-XQRVT.js → createStylesheet-DrkbCUJk.js} +1 -1
  27. package/lib/{createStylesheet-B4vLzvah.cjs → createStylesheet-u1ZQ2BI5.cjs} +1 -1
  28. package/lib/css-property/index.cjs +1 -0
  29. package/lib/css-property/index.d.ts +12 -0
  30. package/lib/css-property/index.js +54 -0
  31. package/lib/css-value-parser/index.cjs +1 -0
  32. package/lib/css-value-parser/index.d.ts +6 -0
  33. package/lib/css-value-parser/index.js +40 -0
  34. package/lib/dev/index.cjs +1 -0
  35. package/lib/dev/index.d.ts +1 -0
  36. package/lib/dev/index.js +14 -0
  37. package/lib/device/Viewport.d.ts +1 -1
  38. package/lib/device/index.cjs +1 -1
  39. package/lib/device/index.js +1 -1
  40. package/lib/element-constructor/index.cjs +1 -1
  41. package/lib/element-constructor/index.js +2 -2
  42. package/lib/en3/index.cjs +1 -1
  43. package/lib/en3/index.js +2 -2
  44. package/lib/image/index.cjs +1 -1
  45. package/lib/image/index.js +1 -1
  46. package/lib/{index-MKoD8NCT.cjs → index-CUE4tEUr.cjs} +1 -1
  47. package/lib/{index-D-FPaxdJ.js → index-DGji4duy.js} +3 -3
  48. package/lib/ladder/index.cjs +1 -1
  49. package/lib/ladder/index.js +1 -1
  50. package/lib/media/index.cjs +1 -1
  51. package/lib/media/index.js +1 -1
  52. package/lib/modal/index.cjs +1 -1
  53. package/lib/modal/index.js +8 -8
  54. package/lib/order/index.cjs +1 -1
  55. package/lib/order/index.d.ts +5 -4
  56. package/lib/order/index.js +2 -2
  57. package/lib/popover/index.cjs +1 -1
  58. package/lib/popover/index.js +1 -1
  59. package/lib/resized/index.cjs +1 -1
  60. package/lib/resized/index.js +1 -1
  61. package/lib/scroll/ScrollElement.d.ts +12 -10
  62. package/lib/scroll/index.cjs +1 -1
  63. package/lib/scroll/index.js +178 -174
  64. package/lib/select/index.cjs +1 -1
  65. package/lib/select/index.js +1 -1
  66. package/lib/source/index.cjs +1 -1
  67. package/lib/source/index.js +2 -2
  68. package/lib/store/Store.d.ts +1 -0
  69. package/lib/store/index.cjs +1 -1
  70. package/lib/store/index.js +3 -3
  71. package/lib/studio/index.cjs +1 -1
  72. package/lib/studio/index.js +5 -5
  73. package/lib/{tags-D9nd9mMM.js → tags-CAxO5Rs3.js} +1 -1
  74. package/lib/{tags-D3-tO-m6.cjs → tags-Dz_Yisj_.cjs} +1 -1
  75. package/lib/theme/index.cjs +1 -1
  76. package/lib/theme/index.js +2 -2
  77. package/lib/video/index.cjs +1 -1
  78. package/lib/video/index.js +1 -1
  79. package/package.json +25 -1
  80. package/lib/Store-DdDuj5hz.js +0 -153
  81. package/lib/Store-Dis8QUAR.cjs +0 -1
  82. package/lib/WheelControls-BqO_fTyY.js +0 -92
  83. package/lib/WheelControls-fiz52vcl.cjs +0 -1
@@ -2,74 +2,75 @@ var Mt = (e, s, i) => {
2
2
  if (!s.has(e))
3
3
  throw TypeError("Cannot " + i);
4
4
  };
5
- var n = (e, s, i) => (Mt(e, s, "read from private field"), i ? i.call(e) : s.get(e)), H = (e, s, i) => {
5
+ var n = (e, s, i) => (Mt(e, s, "read from private field"), i ? i.call(e) : s.get(e)), F = (e, s, i) => {
6
6
  if (s.has(e))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  s instanceof WeakSet ? s.add(e) : s.set(e, i);
9
- }, D = (e, s, i, r) => (Mt(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i);
10
- import { D as Ft } from "../Damped-Do9H-LKf.js";
11
- import { S as Bt } from "../Store-DdDuj5hz.js";
12
- import { D as Kt } from "../Derived-Dbjm-dob.js";
13
- import { i as Lt } from "../browser-0zX67oeU.js";
14
- import { a as bt, g as vt } from "../layout-HoBT_Da2.js";
15
- import { c as Pt } from "../math-BOBiC4TN.js";
9
+ }, V = (e, s, i, r) => (Mt(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i);
10
+ import { D as Bt } from "../Damped-HhitpTP_.js";
11
+ import { S as Kt } from "../Store-BQXXikps.js";
12
+ import { D as Gt } from "../Derived-kPJs5JC5.js";
13
+ import { i as zt } from "../browser-0zX67oeU.js";
14
+ import { a as vt, g as wt } from "../layout-HoBT_Da2.js";
15
+ import { c as At } from "../math-BOBiC4TN.js";
16
16
  import "../ticker/index.js";
17
- import { Attribute as W } from "../attribute/index.js";
18
- import { W as Gt, K as Ut } from "../WheelControls-BqO_fTyY.js";
19
- import { CustomElement as zt, define as $t } from "../custom-element/index.js";
20
- import { TICK_ORDER as Zt, RESIZE_ORDER as Ot } from "../order/index.js";
17
+ import { W as Ut, K as Zt } from "../WheelControls-BAyRKpRZ.js";
18
+ import { CustomElement as $t, define as Dt } from "../custom-element/index.js";
19
+ import { TICK_ORDER as qt, RESIZE_ORDER as Ot } from "../order/index.js";
21
20
  import { windowResizer as ct } from "../window-resizer/index.js";
22
- import { scrollEntries as G } from "../scroll-entries/index.js";
23
- import { e as Vt, D as Ct, ay as wt } from "../tags-D9nd9mMM.js";
24
- import { c as Dt } from "../createStylesheet-CR-XQRVT.js";
25
- import { cssUnitParser as qt } from "../css-unit-parser/index.js";
26
- import { f as Jt } from "../dom-0S_WDL4g.js";
27
- var Nt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, Xt = (e, s, i, r) => {
28
- for (var a = r > 1 ? void 0 : r ? Qt(s, i) : s, f = e.length - 1, v; f >= 0; f--)
29
- (v = e[f]) && (a = (r ? v(s, i, a) : v(a)) || a);
30
- return r && a && Nt(s, i, a), a;
31
- }, Et = (e, s, i) => {
21
+ import { scrollEntries as U } from "../scroll-entries/index.js";
22
+ import { e as Vt, D as Ct, ay as bt } from "../tags-CAxO5Rs3.js";
23
+ import { c as Rt } from "../createStylesheet-DrkbCUJk.js";
24
+ import { cssUnitParser as Jt } from "../css-unit-parser/index.js";
25
+ import { CSSProperty as E } from "../css-property/index.js";
26
+ import { f as Nt } from "../dom-0S_WDL4g.js";
27
+ import { aptechkaTheme as Pt } from "../theme/index.js";
28
+ var Qt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, Yt = (e, s, i, r) => {
29
+ for (var l = r > 1 ? void 0 : r ? Xt(s, i) : s, f = e.length - 1, w; f >= 0; f--)
30
+ (w = e[f]) && (l = (r ? w(s, i, l) : w(l)) || l);
31
+ return r && l && Qt(s, i, l), l;
32
+ }, kt = (e, s, i) => {
32
33
  if (!s.has(e))
33
34
  throw TypeError("Cannot " + i);
34
- }, t = (e, s, i) => (Et(e, s, "read from private field"), i ? i.call(e) : s.get(e)), h = (e, s, i) => {
35
+ }, t = (e, s, i) => (kt(e, s, "read from private field"), i ? i.call(e) : s.get(e)), h = (e, s, i) => {
35
36
  if (s.has(e))
36
37
  throw TypeError("Cannot add the same private member more than once");
37
38
  s instanceof WeakSet ? s.add(e) : s.set(e, i);
38
- }, d = (e, s, i, r) => (Et(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), m = (e, s, i) => (Et(e, s, "access private method"), i), l, E, L, y, P, F, x, R, B, K, u, ut, c, j, tt, _, p, O, M, U, b, q, T, Q, pt, Z, X, ft, Wt, dt, yt, et, _t, st, St, I, gt, xt, Rt, it, rt, kt, S, g, V, C;
39
- class Yt {
39
+ }, d = (e, s, i, r) => (kt(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), m = (e, s, i) => (kt(e, s, "access private method"), i), a, x, L, W, z, B, y, R, K, G, u, ut, c, j, tt, _, p, D, M, H, v, q, T, Q, pt, Z, X, ft, Et, dt, Wt, et, _t, st, St, I, gt, xt, Tt, it, rt, yt, S, g, O, C;
40
+ class jt {
40
41
  constructor(s, i) {
41
- H(this, S, void 0);
42
- H(this, g, void 0);
43
- H(this, V, 0);
44
- H(this, C, 0);
45
- D(this, S, s), D(this, g, i), G.register(n(this, S));
42
+ F(this, S, void 0);
43
+ F(this, g, void 0);
44
+ F(this, O, 0);
45
+ F(this, C, 0);
46
+ V(this, S, s), V(this, g, i), U.register(n(this, S));
46
47
  }
47
48
  get size() {
48
- return n(this, V);
49
+ return n(this, O);
49
50
  }
50
51
  get position() {
51
52
  return n(this, C);
52
53
  }
53
54
  destroy() {
54
- G.unregister(n(this, S)), n(this, S).style.transform = "";
55
+ U.unregister(n(this, S)), n(this, S).style.transform = "";
55
56
  }
56
57
  resize() {
57
- D(this, V, n(this, g).vertical ? n(this, S).offsetHeight : n(this, S).offsetWidth), D(this, C, n(this, g).vertical ? bt(n(this, S)) : vt(n(this, S))), D(this, C, n(this, C) - n(this, g).contentPosition);
58
+ V(this, O, n(this, g).vertical ? n(this, S).offsetHeight : n(this, S).offsetWidth), V(this, C, n(this, g).vertical ? vt(n(this, S)) : wt(n(this, S))), V(this, C, n(this, C) - n(this, g).contentPosition);
58
59
  }
59
60
  transform() {
60
61
  let s = 0;
61
- const i = n(this, g).viewportSize - n(this, V);
62
- n(this, g).infiniteAttribute.current && n(this, g).overscroll && n(this, C) + n(this, V) < n(this, g).currentScrollValue && (s = n(this, g).distance * -1 - n(this, g).gap), G.update(
62
+ const i = n(this, g).viewportSize - n(this, O);
63
+ n(this, g).infiniteProperty.current && n(this, g).overscroll && n(this, C) + n(this, O) < n(this, g).currentScrollValue && (s = n(this, g).distance * -1 - n(this, g).gap), U.update(
63
64
  n(this, S),
64
65
  n(this, g).axisAttibute.current,
65
66
  s
66
67
  );
67
- const r = n(this, g).currentScrollValue + s, a = n(this, C) - n(this, g).viewportSize - i, f = n(this, C) + n(this, V) + i, v = Pt(r, a, f);
68
- n(this, g).vertical ? n(this, S).style.transform = `translate3d(0px, ${v * -1}px, 0px)` : n(this, S).style.transform = `translate3d(${v * -1}px, 0px, 0px)`;
68
+ const r = n(this, g).currentScrollValue + s, l = n(this, C) - n(this, g).viewportSize - i, f = n(this, C) + n(this, O) + i, w = At(r, l, f);
69
+ n(this, g).vertical ? n(this, S).style.transform = `translate3d(0px, ${w * -1}px, 0px)` : n(this, S).style.transform = `translate3d(${w * -1}px, 0px, 0px)`;
69
70
  }
70
71
  }
71
- S = new WeakMap(), g = new WeakMap(), V = new WeakMap(), C = new WeakMap();
72
- const jt = Dt({
72
+ S = new WeakMap(), g = new WeakMap(), O = new WeakMap(), C = new WeakMap();
73
+ const te = Rt({
73
74
  ":host": {
74
75
  position: "relative",
75
76
  width: "100%",
@@ -101,135 +102,131 @@ const jt = Dt({
101
102
  flexShrink: "0"
102
103
  }
103
104
  });
104
- let mt = class extends zt {
105
+ let mt = class extends $t {
105
106
  constructor() {
106
- super(), h(this, Q), h(this, Z), h(this, ft), h(this, dt), h(this, et), h(this, st), h(this, xt), h(this, rt), h(this, l, null), h(this, E, new W(this, "axis", "y")), h(this, L, new W(this, "pages", 0, {
107
+ super(), h(this, Q), h(this, Z), h(this, ft), h(this, dt), h(this, et), h(this, st), h(this, xt), h(this, rt), h(this, a, null), h(this, x, new E(this, "--axis", "y")), h(this, L, new E(this, "--pages", 0, {
107
108
  validate: (e) => Math.max(0, e - 1)
108
- })), h(this, y, new W(this, "split", !1)), h(this, P, new W(this, "sectional", !1)), h(this, F, new W(
109
+ })), h(this, W, new E(this, "--split", !1)), h(this, z, new E(this, "--sectional", !1)), h(this, B, new E(
109
110
  this,
110
- "wheel-max-delta",
111
+ "--wheel-max-delta",
111
112
  !1
112
- )), h(this, x, new W(this, "infinite", !1)), h(this, R, new W(this, "damping", 0.03)), h(this, B, new W(this, "disabled", !1)), h(this, K, new W(this, "hibernated", !1)), h(this, u, null), h(this, ut, null), h(this, c, []), h(this, j, 0), h(this, tt, 0), h(this, _, 0), h(this, p, 0), h(this, O, 0), h(this, M, null), h(this, U, null), h(this, b, new Bt(0)), h(this, q, 0), h(this, T, 0), h(this, I, () => {
113
+ )), h(this, y, new E(this, "--infinite", !1)), h(this, R, new E(this, "--damping", 0.03)), h(this, K, new E(this, "--disabled", !1)), h(this, G, new E(this, "--hibernated", !1)), h(this, u, null), h(this, ut, null), h(this, c, []), h(this, j, 0), h(this, tt, 0), h(this, _, 0), h(this, p, 0), h(this, D, 0), h(this, M, null), h(this, H, null), h(this, v, new Kt(0)), h(this, q, 0), h(this, T, 0), h(this, I, () => {
113
114
  const e = this.currentScrollValue / t(this, p) || 0;
114
- if (d(this, j, this.vertical ? bt(this) : vt(this)), d(this, tt, this.vertical ? bt(t(this, u)) : vt(t(this, u))), d(this, _, this.vertical ? this.offsetHeight : this.offsetWidth), t(this, L).current) {
115
+ if (d(this, j, this.vertical ? vt(this) : wt(this)), d(this, tt, this.vertical ? vt(t(this, u)) : wt(t(this, u))), d(this, _, this.vertical ? this.offsetHeight : this.offsetWidth), t(this, L).current) {
115
116
  d(this, p, t(this, _) * t(this, L).current);
116
117
  const s = t(this, p) + t(this, _);
117
118
  this.vertical ? (t(this, u).style.width = s + "px", t(this, u).style.height = "100%") : (t(this, u).style.height = s + "px", t(this, u).style.width = "100%");
118
119
  } else
119
120
  this.vertical ? (t(this, u).style.width = "100%", t(this, u).style.height = "max-content", d(this, p, t(this, u).offsetHeight - t(this, _))) : (t(this, u).style.width = "max-content", t(this, u).style.height = "100%", d(this, p, t(this, u).offsetWidth - t(this, _)));
120
- if (d(this, O, qt.parse(getComputedStyle(t(this, u)).gap)), !t(this, x).current) {
121
+ if (d(this, D, Jt.parse(getComputedStyle(t(this, u)).gap)), !t(this, y).current) {
121
122
  const s = getComputedStyle(this);
122
- d(this, p, t(this, p) + (this.vertical ? parseFloat(s.paddingBlockStart) + parseFloat(s.paddingBlockEnd) : parseFloat(s.paddingInlineStart) + parseFloat(s.paddingInlineEnd))), t(this, l).max = t(this, p);
123
+ d(this, p, t(this, p) + (this.vertical ? parseFloat(s.paddingBlockStart) + parseFloat(s.paddingBlockEnd) : parseFloat(s.paddingInlineStart) + parseFloat(s.paddingInlineEnd))), t(this, a).max = t(this, p);
123
124
  }
124
125
  if (t(this, c).forEach((s) => {
125
126
  s.resize(), s.transform();
126
- }), t(this, x).current && t(this, c).length) {
127
+ }), t(this, y).current && t(this, c).length) {
127
128
  const s = t(this, c)[t(this, c).length - 1], i = s.position + s.size - t(this, _), r = t(this, p) - i;
128
129
  d(this, T, s.position + s.size + r);
129
130
  } else
130
131
  d(this, T, t(this, p));
131
- if (t(this, P).current && t(this, c).length) {
132
- const s = t(this, c)[t(this, b).current];
133
- t(this, l).set(s.position, !0);
132
+ if (t(this, z).current && t(this, c).length) {
133
+ const s = t(this, c)[t(this, v).current];
134
+ t(this, a).set(s.position, !0);
134
135
  } else
135
- t(this, l).set(e * t(this, p), !0);
136
+ t(this, a).set(e * t(this, p), !0);
136
137
  }), h(this, gt, () => {
137
138
  const e = this.currentScrollValue;
138
139
  if (d(this, q, Math.max(0, e - t(this, p))), t(this, c).length) {
139
140
  let s = 0;
140
141
  for (let i = 0; i < t(this, c).length; i++) {
141
142
  const r = t(this, c)[i];
142
- r.transform(), // this.targetScrollValue + this.viewportSize / 2 >=
143
- this.targetScrollValue + this.viewportSize / 2 >= r.position && (s = i);
143
+ r.transform(), this.targetScrollValue + this.viewportSize / 2 >= r.position && (s = i);
144
144
  }
145
- t(this, b).current = s;
145
+ t(this, v).current = s;
146
146
  } else
147
147
  this.vertical ? t(this, u).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, u).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
148
- G.update(this, t(this, E).current, e);
148
+ U.update(this, t(this, x).current, e);
149
149
  }), h(this, it, (e) => {
150
- if (typeof e == "number")
151
- if (t(this, P).current) {
152
- const s = Math.sign(e);
153
- t(this, c).length ? this.shiftSections(s) : t(this, l).shift(s * t(this, _));
154
- } else
155
- t(this, l).shift(e);
156
- else
157
- e === "min" ? t(this, l).set(t(this, l).min) : e === "max" && t(this, l).set(t(this, l).length);
158
- }), Lt && (d(this, l, new Ft(0, {
150
+ if (t(this, z).current) {
151
+ const s = Math.sign(e);
152
+ t(this, c).length ? this.shiftSections(s) : t(this, a).shift(s * t(this, _));
153
+ } else
154
+ t(this, a).shift(e);
155
+ }), zt && (d(this, a, new Bt(0, {
159
156
  damping: 0.01,
160
157
  min: 0,
161
- order: Zt.SCROLL
162
- })), this.openShadow(jt), Vt(this, {
158
+ order: qt.SCROLL
159
+ })), this.openShadow(te), Vt(this, {
163
160
  tabIndex: 0,
164
161
  children: [
165
162
  Ct({
166
163
  class: "static",
167
- children: [wt({ name: "static" })]
164
+ children: [bt({ name: "static" })]
168
165
  }),
169
166
  Ct({
170
167
  class: "content",
171
- children: [wt({ ref: (e) => d(this, ut, e) })],
168
+ children: [bt({ ref: (e) => d(this, ut, e) })],
172
169
  style: {
173
- flexDirection: new Kt(
174
- t(this, E),
170
+ flexDirection: new Gt(
171
+ t(this, x),
175
172
  (e) => e === "x" ? "row" : "column"
176
173
  )
177
174
  },
178
175
  ref: (e) => d(this, u, e)
179
176
  })
180
177
  ]
181
- }), d(this, M, new Gt({ element: this })), t(this, M).changeEvent.subscribe(t(this, it)), d(this, U, new Ut({ element: this })), t(this, U).changeEvent.subscribe(t(this, it)), t(this, E).subscribe(({ current: e }) => {
182
- t(this, u).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, F).current ? "max" : e, this.isConnected && t(this, I).call(this);
183
- }), t(this, F).subscribe((e) => {
184
- t(this, M).axis = e.current ? "max" : t(this, E).current;
178
+ }), d(this, M, new Ut({ element: this })), t(this, M).changeEvent.subscribe(t(this, it)), d(this, H, new Zt({ element: this })), t(this, H).changeEvent.subscribe(t(this, it)), t(this, x).subscribe(({ current: e }) => {
179
+ t(this, u).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, B).current ? "max" : e, t(this, H).dimension = e === "x" ? "width" : "height", this.isConnected && t(this, I).call(this);
180
+ }), t(this, B).subscribe((e) => {
181
+ t(this, M).axis = e.current ? "max" : t(this, x).current;
185
182
  }), t(this, L).subscribe(() => {
186
183
  this.isConnected && t(this, I).call(this);
187
- }), t(this, y).subscribe(({ current: e }) => {
184
+ }), t(this, W).subscribe(({ current: e }) => {
188
185
  this.isConnected && (e ? m(this, Q, pt).call(this) : m(this, Z, X).call(this));
189
- }), t(this, P).subscribe((e) => {
190
- t(this, b).current = 0, t(this, M).debounce = e.current, t(this, l).reset(), this.isConnected && (e.current && !e.previous ? m(this, Q, pt).call(this) : !e.current && e.previous && m(this, Z, X).call(this));
191
- }), t(this, x).subscribe((e) => {
192
- e.current ? (this.isConnected && (t(this, c).length || (t(this, y).current = !0)), t(this, c).length && (t(this, l).max = 1 / 0, t(this, l).min = -1 / 0)) : (d(this, q, 0), t(this, l).max = t(this, p), t(this, l).min = 0);
186
+ }), t(this, z).subscribe((e) => {
187
+ t(this, v).current = 0, t(this, M).debounce = e.current, t(this, a).reset(), this.isConnected && (e.current && !e.previous ? m(this, Q, pt).call(this) : !e.current && e.previous && m(this, Z, X).call(this));
188
+ }), t(this, y).subscribe((e) => {
189
+ e.current ? (this.isConnected && (t(this, c).length || (t(this, W).current = !0)), t(this, c).length && (t(this, a).max = 1 / 0, t(this, a).min = -1 / 0)) : (d(this, q, 0), t(this, a).max = t(this, p), t(this, a).min = 0);
193
190
  }), t(this, R).subscribe((e) => {
194
- t(this, l).damping = e.current;
195
- }), t(this, B).subscribe((e) => {
196
- e.current && !e.previous ? m(this, ft, Wt).call(this) : !e.current && e.previous && m(this, dt, yt).call(this);
191
+ t(this, a).damping = e.current;
197
192
  }), t(this, K).subscribe((e) => {
193
+ e.current && !e.previous ? m(this, ft, Et).call(this) : !e.current && e.previous && m(this, dt, Wt).call(this);
194
+ }), t(this, G).subscribe((e) => {
198
195
  e.current && !e.previous ? m(this, et, _t).call(this) : !e.current && e.previous && m(this, st, St).call(this);
199
196
  }));
200
197
  }
201
- get dampingAttribute() {
198
+ get dampingProperty() {
202
199
  return t(this, R);
203
200
  }
204
201
  get axisAttibute() {
205
- return t(this, E);
202
+ return t(this, x);
206
203
  }
207
204
  get pagesAttibute() {
208
205
  return t(this, L);
209
206
  }
210
207
  get splitAttibute() {
211
- return t(this, y);
208
+ return t(this, W);
212
209
  }
213
210
  get sectionalAttibute() {
214
- return t(this, P);
211
+ return t(this, z);
215
212
  }
216
- get infiniteAttribute() {
217
- return t(this, x);
213
+ get infiniteProperty() {
214
+ return t(this, y);
218
215
  }
219
216
  get dampingAttibute() {
220
217
  return t(this, R);
221
218
  }
222
219
  get disabledAttibute() {
223
- return t(this, B);
220
+ return t(this, K);
224
221
  }
225
222
  get hibernatedAttibute() {
226
- return t(this, K);
223
+ return t(this, G);
227
224
  }
228
225
  get currentScrollValue() {
229
- return m(this, rt, kt).call(this, "current");
226
+ return m(this, rt, yt).call(this, "current");
230
227
  }
231
228
  get targetScrollValue() {
232
- return m(this, rt, kt).call(this, "target");
229
+ return m(this, rt, yt).call(this, "target");
233
230
  }
234
231
  get contentElement() {
235
232
  return t(this, u);
@@ -247,10 +244,10 @@ let mt = class extends zt {
247
244
  return t(this, p);
248
245
  }
249
246
  get gap() {
250
- return t(this, O);
247
+ return t(this, D);
251
248
  }
252
249
  get counter() {
253
- return t(this, b);
250
+ return t(this, v);
254
251
  }
255
252
  get distance() {
256
253
  return t(this, T);
@@ -259,7 +256,7 @@ let mt = class extends zt {
259
256
  return t(this, q);
260
257
  }
261
258
  get vertical() {
262
- return t(this, E).current === "y";
259
+ return t(this, x).current === "y";
263
260
  }
264
261
  get currentProgress() {
265
262
  return this.currentScrollValue / t(this, T) || 0;
@@ -268,68 +265,74 @@ let mt = class extends zt {
268
265
  return this.targetScrollValue / t(this, T) || 0;
269
266
  }
270
267
  get speed() {
271
- return t(this, l).speed;
268
+ return t(this, a).speed;
272
269
  }
273
270
  get direction() {
274
- return t(this, l).direction;
271
+ return t(this, a).direction;
275
272
  }
276
273
  get isRunning() {
277
- return t(this, l).isRunning;
274
+ return t(this, a).isRunning;
275
+ }
276
+ get scrollWidth() {
277
+ return t(this, x).current === "y" ? 0 : t(this, a).length;
278
+ }
279
+ get scrollHeight() {
280
+ return t(this, x).current === "x" ? 0 : t(this, a).length;
278
281
  }
279
282
  onScroll(...e) {
280
- return t(this, l).subscribe(...e);
283
+ return t(this, a).subscribe(...e);
281
284
  }
282
285
  offScroll(...e) {
283
- t(this, l).unsubscribe(...e);
286
+ t(this, a).unsubscribe(...e);
284
287
  }
285
288
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
286
289
  range(e, s, i = 0) {
287
- const r = e - i, a = r + s + i * 2;
288
- return this.currentProgress < r ? 0 : this.currentProgress > a ? 1 : (this.currentProgress - r) / (a - r);
290
+ const r = e - i, l = r + s + i * 2;
291
+ return this.currentProgress < r ? 0 : this.currentProgress > l ? 1 : (this.currentProgress - r) / (l - r);
289
292
  }
290
293
  curve(e, s, i = 0) {
291
294
  return Math.sin(this.range(e, s, i) * Math.PI);
292
295
  }
293
296
  visible(e, s, i = 0) {
294
- const r = e - i, a = r + s + i * 2;
295
- return this.currentProgress >= r && this.currentProgress <= a;
297
+ const r = e - i, l = r + s + i * 2;
298
+ return this.currentProgress >= r && this.currentProgress <= l;
296
299
  }
297
300
  // TODO: Поправить значение когда скролл не секционный ??
298
301
  scrollToSection(e, s = "smooth") {
299
302
  if (!t(this, c).length)
300
303
  return;
301
- const i = t(this, b).current;
302
- m(this, xt, Rt).call(this, e);
303
- const r = t(this, c)[i], a = t(this, c)[t(this, b).current];
304
- if (r && a) {
304
+ const i = t(this, v).current;
305
+ m(this, xt, Tt).call(this, e);
306
+ const r = t(this, c)[i], l = t(this, c)[t(this, v).current];
307
+ if (r && l) {
305
308
  let f = 0;
306
- const v = t(this, c).length - 1;
307
- t(this, x).current ? t(this, b).current === 0 && i === v ? f = t(this, p) + t(this, _) - r.position + t(this, O) : t(this, b).current === v && i === 0 ? f = a.position - (t(this, p) + t(this, _) + t(this, O)) : f = a.position - r.position : f = a.position - r.position, t(this, l).shift(f, s === "instant");
309
+ const w = t(this, c).length - 1;
310
+ t(this, y).current ? t(this, v).current === 0 && i === w ? f = t(this, p) + t(this, _) - r.position + t(this, D) : t(this, v).current === w && i === 0 ? f = l.position - (t(this, p) + t(this, _) + t(this, D)) : f = l.position - r.position : f = l.position - r.position, t(this, a).shift(f, s === "instant");
308
311
  }
309
312
  }
310
313
  shiftSections(e, s = "smooth") {
311
- t(this, c).length && this.scrollToSection(t(this, b).current + e, s);
314
+ t(this, c).length && this.scrollToSection(t(this, v).current + e, s);
312
315
  }
313
316
  setPosition(e, s = "smooth") {
314
- t(this, l).set(e, s === "instant");
317
+ t(this, a).set(e, s === "instant");
315
318
  }
316
319
  connectedCallback() {
317
- t(this, E).observe(), t(this, L).observe(), t(this, y).observe(), t(this, P).observe(), t(this, F).observe(), t(this, x).observe(), t(this, R).observe(), t(this, B).observe(), t(this, K).observe(), m(this, st, St).call(this);
320
+ t(this, x).observe(), t(this, L).observe(), t(this, W).observe(), t(this, z).observe(), t(this, B).observe(), t(this, y).observe(), t(this, R).observe(), t(this, K).observe(), t(this, G).observe(), m(this, st, St).call(this);
318
321
  }
319
322
  disconnectedCallback() {
320
- t(this, E).unobserve(), t(this, L).unobserve(), t(this, y).unobserve(), t(this, P).unobserve(), t(this, F).unobserve(), t(this, x).unobserve(), t(this, R).unobserve(), t(this, B).unobserve(), t(this, K).unobserve(), m(this, et, _t).call(this);
323
+ t(this, x).unobserve(), t(this, L).unobserve(), t(this, W).unobserve(), t(this, z).unobserve(), t(this, B).unobserve(), t(this, y).unobserve(), t(this, R).unobserve(), t(this, K).unobserve(), t(this, G).unobserve(), m(this, et, _t).call(this);
321
324
  }
322
325
  };
323
- l = /* @__PURE__ */ new WeakMap();
324
- E = /* @__PURE__ */ new WeakMap();
326
+ a = /* @__PURE__ */ new WeakMap();
327
+ x = /* @__PURE__ */ new WeakMap();
325
328
  L = /* @__PURE__ */ new WeakMap();
329
+ W = /* @__PURE__ */ new WeakMap();
330
+ z = /* @__PURE__ */ new WeakMap();
331
+ B = /* @__PURE__ */ new WeakMap();
326
332
  y = /* @__PURE__ */ new WeakMap();
327
- P = /* @__PURE__ */ new WeakMap();
328
- F = /* @__PURE__ */ new WeakMap();
329
- x = /* @__PURE__ */ new WeakMap();
330
333
  R = /* @__PURE__ */ new WeakMap();
331
- B = /* @__PURE__ */ new WeakMap();
332
334
  K = /* @__PURE__ */ new WeakMap();
335
+ G = /* @__PURE__ */ new WeakMap();
333
336
  u = /* @__PURE__ */ new WeakMap();
334
337
  ut = /* @__PURE__ */ new WeakMap();
335
338
  c = /* @__PURE__ */ new WeakMap();
@@ -337,16 +340,16 @@ j = /* @__PURE__ */ new WeakMap();
337
340
  tt = /* @__PURE__ */ new WeakMap();
338
341
  _ = /* @__PURE__ */ new WeakMap();
339
342
  p = /* @__PURE__ */ new WeakMap();
340
- O = /* @__PURE__ */ new WeakMap();
343
+ D = /* @__PURE__ */ new WeakMap();
341
344
  M = /* @__PURE__ */ new WeakMap();
342
- U = /* @__PURE__ */ new WeakMap();
343
- b = /* @__PURE__ */ new WeakMap();
345
+ H = /* @__PURE__ */ new WeakMap();
346
+ v = /* @__PURE__ */ new WeakMap();
344
347
  q = /* @__PURE__ */ new WeakMap();
345
348
  T = /* @__PURE__ */ new WeakMap();
346
349
  Q = /* @__PURE__ */ new WeakSet();
347
350
  pt = function() {
348
351
  m(this, Z, X).call(this), t(this, ut).assignedElements().forEach((e) => {
349
- e instanceof HTMLElement && t(this, c).push(new Yt(e, this));
352
+ e instanceof HTMLElement && t(this, c).push(new jt(e, this));
350
353
  }), t(this, u).style.transform = "", t(this, I).call(this);
351
354
  };
352
355
  Z = /* @__PURE__ */ new WeakSet();
@@ -356,71 +359,71 @@ X = function() {
356
359
  }), d(this, c, []);
357
360
  };
358
361
  ft = /* @__PURE__ */ new WeakSet();
359
- Wt = function() {
360
- t(this, l).unsubscribe(t(this, gt)), t(this, l).stopAnimation(), t(this, M).disconnect(), t(this, U).disconnect();
362
+ Et = function() {
363
+ t(this, a).unsubscribe(t(this, gt)), t(this, a).stopAnimation(), t(this, M).disconnect(), t(this, H).disconnect();
361
364
  };
362
365
  dt = /* @__PURE__ */ new WeakSet();
363
- yt = function() {
364
- t(this, l).subscribe(t(this, gt)), t(this, M).connect(), t(this, U).connect();
366
+ Wt = function() {
367
+ t(this, a).subscribe(t(this, gt)), t(this, M).connect(), t(this, H).connect();
365
368
  };
366
369
  et = /* @__PURE__ */ new WeakSet();
367
370
  _t = function() {
368
- ct.unsubscribe(t(this, I)), t(this, l).reset(), m(this, ft, Wt).call(this), t(this, u).style.transform = "", t(this, y).current && m(this, Z, X).call(this), G.unregister(this);
371
+ ct.unsubscribe(t(this, I)), t(this, a).reset(), m(this, ft, Et).call(this), t(this, u).style.transform = "", t(this, W).current && m(this, Z, X).call(this), U.unregister(this);
369
372
  };
370
373
  st = /* @__PURE__ */ new WeakSet();
371
374
  St = function() {
372
- t(this, y).current && m(this, Q, pt).call(this), G.register(this), ct.subscribe(t(this, I), Ot.SCROLL), m(this, dt, yt).call(this);
375
+ t(this, W).current && m(this, Q, pt).call(this), U.register(this), ct.subscribe(t(this, I), Ot.SCROLL), m(this, dt, Wt).call(this);
373
376
  };
374
377
  I = /* @__PURE__ */ new WeakMap();
375
378
  gt = /* @__PURE__ */ new WeakMap();
376
379
  xt = /* @__PURE__ */ new WeakSet();
377
- Rt = function(e) {
378
- t(this, x).current ? (t(this, b).current = e % t(this, c).length, t(this, b).current = t(this, b).current < 0 ? t(this, c).length + t(this, b).current : t(this, b).current) : t(this, b).current = Pt(e, 0, t(this, c).length - 1);
380
+ Tt = function(e) {
381
+ t(this, y).current ? (t(this, v).current = e % t(this, c).length, t(this, v).current = t(this, v).current < 0 ? t(this, c).length + t(this, v).current : t(this, v).current) : t(this, v).current = At(e, 0, t(this, c).length - 1);
379
382
  };
380
383
  it = /* @__PURE__ */ new WeakMap();
381
384
  rt = /* @__PURE__ */ new WeakSet();
382
- kt = function(e = "current") {
383
- if (t(this, x).current && t(this, c).length) {
384
- const s = t(this, l)[e] % (t(this, p) + t(this, _) + t(this, O));
385
- return s < 0 ? t(this, p) + s + t(this, _) + t(this, O) : s;
385
+ yt = function(e = "current") {
386
+ if (t(this, y).current && t(this, c).length) {
387
+ const s = t(this, a)[e] % (t(this, p) + t(this, _) + t(this, D));
388
+ return s < 0 ? t(this, p) + s + t(this, _) + t(this, D) : s;
386
389
  } else
387
- return t(this, l)[e];
390
+ return t(this, a)[e];
388
391
  };
389
- mt = Xt([
390
- $t("e-scroll")
392
+ mt = Yt([
393
+ Dt("e-scroll")
391
394
  ], mt);
392
395
  var Y;
393
- class te extends zt {
396
+ class ee extends $t {
394
397
  constructor() {
395
398
  super(...arguments);
396
- H(this, Y, null);
399
+ F(this, Y, null);
397
400
  }
398
401
  get scrollElement() {
399
402
  return n(this, Y);
400
403
  }
401
404
  connectedCallback() {
402
- const i = Jt(this, mt);
403
- i instanceof mt ? D(this, Y, i) : console.error(this, "e-scroll not found");
405
+ const i = Nt(this, mt);
406
+ i instanceof mt ? V(this, Y, i) : console.error(this, "e-scroll not found");
404
407
  }
405
408
  }
406
409
  Y = new WeakMap();
407
- var ee = Object.defineProperty, se = Object.getOwnPropertyDescriptor, ie = (e, s, i, r) => {
408
- for (var a = r > 1 ? void 0 : r ? se(s, i) : s, f = e.length - 1, v; f >= 0; f--)
409
- (v = e[f]) && (a = (r ? v(s, i, a) : v(a)) || a);
410
- return r && a && ee(s, i, a), a;
411
- }, Tt = (e, s, i) => {
410
+ var se = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, re = (e, s, i, r) => {
411
+ for (var l = r > 1 ? void 0 : r ? ie(s, i) : s, f = e.length - 1, w; f >= 0; f--)
412
+ (w = e[f]) && (l = (r ? w(s, i, l) : w(l)) || l);
413
+ return r && l && se(s, i, l), l;
414
+ }, Ht = (e, s, i) => {
412
415
  if (!s.has(e))
413
416
  throw TypeError("Cannot " + i);
414
- }, o = (e, s, i) => (Tt(e, s, "read from private field"), i ? i.call(e) : s.get(e)), k = (e, s, i) => {
417
+ }, o = (e, s, i) => (Ht(e, s, "read from private field"), i ? i.call(e) : s.get(e)), k = (e, s, i) => {
415
418
  if (s.has(e))
416
419
  throw TypeError("Cannot add the same private member more than once");
417
420
  s instanceof WeakSet ? s.add(e) : s.set(e, i);
418
- }, A = (e, s, i, r) => (Tt(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), nt, w, z, $, J, N, ht, ot, lt, at;
419
- const re = Dt({
421
+ }, P = (e, s, i, r) => (Ht(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), nt, b, A, $, J, N, ht, ot, lt, at;
422
+ const ne = Rt({
420
423
  ":host": {
421
424
  display: "inline-block",
422
425
  zIndex: "1",
423
- backgroundColor: "#efefef"
426
+ backgroundColor: Pt.colorLight.var
424
427
  },
425
428
  ':host([axis="y"])': {
426
429
  position: "absolute",
@@ -437,7 +440,7 @@ const re = Dt({
437
440
  height: "1vmin"
438
441
  },
439
442
  ".default-thumb": {
440
- backgroundColor: "#181818",
443
+ backgroundColor: Pt.colorDark.var,
441
444
  borderRadius: "1vmin",
442
445
  touchAction: "none"
443
446
  },
@@ -445,44 +448,45 @@ const re = Dt({
445
448
  touchAction: "none"
446
449
  }
447
450
  });
448
- let At = class extends te {
451
+ let Lt = class extends ee {
449
452
  constructor() {
450
- super(), k(this, nt, null), k(this, w, null), k(this, z, !1), k(this, $, 0), k(this, J, 0), k(this, N, 0), k(this, ht, () => {
451
- A(this, z, this.offsetWidth > this.offsetHeight);
452
- const e = o(this, z) ? this.offsetWidth : this.offsetHeight;
453
- A(this, $, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), A(this, $, Math.max(o(this, $), 30)), o(this, z) ? (o(this, w).style.width = o(this, $) + "px", o(this, w).style.height = "100%") : (o(this, w).style.width = "100%", o(this, w).style.height = o(this, $) + "px"), A(this, J, e - o(this, $)), this.scrollElement.scrollSize || (this.style.display = "none");
453
+ super(), k(this, nt, null), k(this, b, null), k(this, A, !1), k(this, $, 0), k(this, J, 0), k(this, N, 0), k(this, ht, () => {
454
+ P(this, A, this.offsetWidth > this.offsetHeight);
455
+ const e = o(this, A) ? this.offsetWidth : this.offsetHeight;
456
+ P(this, $, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), P(this, $, Math.max(o(this, $), 30)), o(this, A) ? (o(this, b).style.width = o(this, $) + "px", o(this, b).style.height = "100%") : (o(this, b).style.width = "100%", o(this, b).style.height = o(this, $) + "px"), P(this, J, e - o(this, $)), this.scrollElement.scrollSize || (this.style.display = "none");
454
457
  }), k(this, ot, () => {
455
- A(this, N, this.scrollElement.currentProgress * o(this, J)), o(this, z) ? o(this, w).style.transform = `translate3d(${o(this, N)}px, 0px, 0px)` : o(this, w).style.transform = `translate3d(0px, ${o(this, N)}px, 0px)`;
458
+ P(this, N, this.scrollElement.currentProgress * o(this, J)), o(this, A) ? o(this, b).style.transform = `translate3d(${o(this, N)}px, 0px, 0px)` : o(this, b).style.transform = `translate3d(0px, ${o(this, N)}px, 0px)`;
456
459
  }), k(this, lt, () => {
457
460
  this.setAttribute("axis", this.scrollElement.axisAttibute.current);
458
461
  }), k(this, at, (e) => {
459
462
  const s = (f) => {
460
- const v = o(this, z) ? f.x : f.y, It = this.scrollElement.distance / o(this, J), Ht = (v - a) * It;
461
- this.scrollElement.setPosition(r + Ht);
463
+ const w = o(this, A) ? f.x : f.y, It = this.scrollElement.distance / o(this, J), Ft = (w - l) * It;
464
+ this.scrollElement.setPosition(r + Ft);
462
465
  }, i = () => {
463
466
  removeEventListener("pointermove", s), removeEventListener("pointerup", i), removeEventListener("touchend", i);
464
467
  };
465
468
  addEventListener("pointermove", s), addEventListener("pointerup", i), addEventListener("touchend", i);
466
- const r = this.scrollElement.targetScrollValue, a = o(this, z) ? e.x : e.y;
467
- }), Lt && (this.openShadow(re), Vt(this, {
468
- children: [wt({ ref: (e) => A(this, nt, e) })]
469
+ const r = this.scrollElement.targetScrollValue, l = o(this, A) ? e.x : e.y;
470
+ }), zt && (this.openShadow(ne), Vt(this, {
471
+ slot: "static",
472
+ children: [bt({ ref: (e) => P(this, nt, e) })]
469
473
  }));
470
474
  }
471
475
  get thumbElement() {
472
- return o(this, w);
476
+ return o(this, b);
473
477
  }
474
478
  connectedCallback() {
475
479
  super.connectedCallback();
476
480
  const e = o(this, nt).assignedElements()[0];
477
- e instanceof HTMLElement ? A(this, w, e) : (A(this, w, document.createElement("div")), o(this, w).classList.add("default-thumb"), this.shadowRoot.appendChild(o(this, w))), o(this, w).addEventListener("pointerdown", o(this, at)), ct.subscribe(o(this, ht), Ot.SCROLL + 1), this.scrollElement.onScroll(o(this, ot)), this.scrollElement.axisAttibute.subscribe(o(this, lt));
481
+ e instanceof HTMLElement ? P(this, b, e) : (P(this, b, document.createElement("div")), o(this, b).classList.add("default-thumb"), this.shadowRoot.appendChild(o(this, b))), o(this, b).addEventListener("pointerdown", o(this, at)), ct.subscribe(o(this, ht), Ot.SCROLL + 1), this.scrollElement.onScroll(o(this, ot)), this.scrollElement.axisAttibute.subscribe(o(this, lt));
478
482
  }
479
483
  disconnectedCallback() {
480
- o(this, w).removeEventListener("pointerdown", o(this, at)), ct.unsubscribe(o(this, ht)), this.scrollElement.offScroll(o(this, ot)), this.scrollElement.axisAttibute.unsubscribe(o(this, lt));
484
+ o(this, b).removeEventListener("pointerdown", o(this, at)), ct.unsubscribe(o(this, ht)), this.scrollElement.offScroll(o(this, ot)), this.scrollElement.axisAttibute.unsubscribe(o(this, lt));
481
485
  }
482
486
  };
483
487
  nt = /* @__PURE__ */ new WeakMap();
484
- w = /* @__PURE__ */ new WeakMap();
485
- z = /* @__PURE__ */ new WeakMap();
488
+ b = /* @__PURE__ */ new WeakMap();
489
+ A = /* @__PURE__ */ new WeakMap();
486
490
  $ = /* @__PURE__ */ new WeakMap();
487
491
  J = /* @__PURE__ */ new WeakMap();
488
492
  N = /* @__PURE__ */ new WeakMap();
@@ -490,10 +494,10 @@ ht = /* @__PURE__ */ new WeakMap();
490
494
  ot = /* @__PURE__ */ new WeakMap();
491
495
  lt = /* @__PURE__ */ new WeakMap();
492
496
  at = /* @__PURE__ */ new WeakMap();
493
- At = ie([
494
- $t("e-scrollbar")
495
- ], At);
497
+ Lt = re([
498
+ Dt("e-scrollbar")
499
+ ], Lt);
496
500
  export {
497
501
  mt as ScrollElement,
498
- At as ScrollbarElement
502
+ Lt as ScrollbarElement
499
503
  };