aptechka 0.9.0 → 0.10.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.
Files changed (126) hide show
  1. package/lib/{Animation-BCA-DBje.cjs → Animation-BInSRYNr.cjs} +1 -1
  2. package/lib/{Animation-DrSYnbgb.js → Animation-uimN7sdT.js} +1 -1
  3. package/lib/{Composed-pnupzTOv.js → Composed-Fa7owymK.js} +1 -1
  4. package/lib/{Composed-7Fe7TW_T.cjs → Composed-Iihn8fT4.cjs} +1 -1
  5. package/lib/{Damped-CSEZ0qwp.cjs → Damped-Da3EnNN4.cjs} +1 -1
  6. package/lib/{Damped-C2FuK_3K.js → Damped-yrNXlkDE.js} +1 -1
  7. package/lib/Derived-CNbsNMn_.cjs +1 -0
  8. package/lib/Derived-rInkx3e4.js +60 -0
  9. package/lib/ElementConstructor-OK-6OPjh.cjs +1 -0
  10. package/lib/{ElementConstructor-CZKbNIQK.js → ElementConstructor-rValMo8f.js} +94 -88
  11. package/lib/{SourceManager-CmhlHGx7.js → SourceManager--L_rA28b.js} +1 -1
  12. package/lib/{SourceManager-DYnGpBi1.cjs → SourceManager-D6D2LVKf.cjs} +1 -1
  13. package/lib/{Store-kzJycezD.cjs → Store-Cr3VaD9G.cjs} +1 -1
  14. package/lib/{Store-Dsft7GtM.js → Store-Qr3SNOSf.js} +1 -1
  15. package/lib/{Tweened-BrD2cPSC.js → Tweened-CjgvoOwL.js} +1 -1
  16. package/lib/{Tweened-D6dAu8Zi.cjs → Tweened-DksN-Rz6.cjs} +1 -1
  17. package/lib/{Viewport-DRNfjjDY.cjs → Viewport-BBYt1Ivy.cjs} +1 -1
  18. package/lib/{Viewport-Ud7nellV.js → Viewport-Cgtq2I_K.js} +1 -1
  19. package/lib/{_createStore-Cf1MyeHa.cjs → _createStore-C75y9luu.cjs} +1 -1
  20. package/lib/_createStore-D3qHYaSz.js +12 -0
  21. package/lib/animation/index.cjs +1 -1
  22. package/lib/animation/index.js +3 -3
  23. package/lib/attribute/index.cjs +1 -1
  24. package/lib/attribute/index.js +1 -1
  25. package/lib/canvas/index.cjs +1 -1
  26. package/lib/canvas/index.d.ts +3 -3
  27. package/lib/canvas/index.js +4 -4
  28. package/lib/checkbox/index.cjs +1 -1
  29. package/lib/checkbox/index.js +14 -13
  30. package/lib/class-linked-status/index.cjs +1 -1
  31. package/lib/class-linked-status/index.js +1 -1
  32. package/lib/connector/index.cjs +1 -1
  33. package/lib/connector/index.d.ts +2 -2
  34. package/lib/connector/index.js +39 -34
  35. package/lib/controls/index.cjs +1 -1
  36. package/lib/controls/index.js +2 -2
  37. package/lib/{createStylesheet-Di9WRypw.cjs → createStylesheet-9nksoWW0.cjs} +1 -1
  38. package/lib/{createStylesheet-C2gpLy4r.js → createStylesheet-BrFGJ8Q7.js} +1 -1
  39. package/lib/css-property/index.cjs +1 -1
  40. package/lib/css-property/index.js +1 -1
  41. package/lib/dev/index.cjs +1 -1
  42. package/lib/dev/index.js +1 -1
  43. package/lib/device/index.cjs +1 -1
  44. package/lib/device/index.js +1 -1
  45. package/lib/element-constructor/ElementConstructor.d.ts +9 -7
  46. package/lib/element-constructor/index.cjs +1 -1
  47. package/lib/element-constructor/index.js +3 -3
  48. package/lib/en3/helpers/index.cjs +1 -1
  49. package/lib/en3/helpers/index.js +2 -2
  50. package/lib/en3/misc/index.cjs +1 -1
  51. package/lib/en3/misc/index.js +2 -2
  52. package/lib/image/index.cjs +1 -1
  53. package/lib/image/index.js +1 -1
  54. package/lib/{index-BtB-3MG7.js → index-3R8YL-P3.js} +22 -21
  55. package/lib/index-CyQAdqFu.cjs +9 -0
  56. package/lib/{instantiate-BPZZn8jK.js → instantiate-D19vO5Ku.js} +27 -25
  57. package/lib/instantiate-DF1bIAXR.cjs +1 -0
  58. package/lib/jsx/hooks/animation/createDamped.d.ts +3 -0
  59. package/lib/jsx/hooks/animation/createTweened.d.ts +3 -0
  60. package/lib/jsx/hooks/animation/index.cjs +1 -0
  61. package/lib/jsx/hooks/animation/index.d.ts +2 -0
  62. package/lib/jsx/hooks/animation/index.js +15 -0
  63. package/lib/jsx/hooks/basic/createRef.d.ts +3 -0
  64. package/lib/jsx/hooks/basic/onStoreChange.d.ts +3 -0
  65. package/lib/jsx/hooks/store/createCached.d.ts +4 -0
  66. package/lib/jsx/hooks/store/createDerived.d.ts +3 -2
  67. package/lib/jsx/hooks/store/createDerivedArray.d.ts +2 -1
  68. package/lib/jsx/hooks/store/index.cjs +1 -1
  69. package/lib/jsx/hooks/store/index.d.ts +3 -2
  70. package/lib/jsx/hooks/store/index.js +36 -18
  71. package/lib/jsx/index.cjs +1 -1
  72. package/lib/jsx/index.d.ts +5 -3
  73. package/lib/jsx/index.js +73 -58
  74. package/lib/jsx/type.d.ts +16 -13
  75. package/lib/ladder/index.cjs +1 -1
  76. package/lib/ladder/index.js +1 -1
  77. package/lib/media/index.cjs +1 -1
  78. package/lib/media/index.js +1 -1
  79. package/lib/modal/index.cjs +1 -1
  80. package/lib/modal/index.js +4 -3
  81. package/lib/order/index.cjs +1 -1
  82. package/lib/order/index.d.ts +5 -4
  83. package/lib/order/index.js +1 -1
  84. package/lib/pointer/index.cjs +1 -1
  85. package/lib/pointer/index.js +2 -2
  86. package/lib/popover/index.cjs +1 -1
  87. package/lib/popover/index.js +3 -2
  88. package/lib/router/index.cjs +1 -1
  89. package/lib/router/index.js +1 -1
  90. package/lib/scroll/index.cjs +1 -1
  91. package/lib/scroll/index.js +7 -7
  92. package/lib/select/index.cjs +1 -1
  93. package/lib/select/index.js +1 -1
  94. package/lib/sequence/index.cjs +1 -1
  95. package/lib/sequence/index.js +1 -1
  96. package/lib/source/index.cjs +1 -1
  97. package/lib/source/index.js +2 -2
  98. package/lib/store/Cached.d.ts +18 -0
  99. package/lib/store/Derived.d.ts +6 -1
  100. package/lib/store/DerivedArray.d.ts +6 -1
  101. package/lib/store/index.cjs +1 -1
  102. package/lib/store/index.d.ts +3 -3
  103. package/lib/store/index.js +121 -32
  104. package/lib/{tags-BBOGIzDK.cjs → tags-BosXYPYv.cjs} +1 -1
  105. package/lib/{tags-CefGDQtF.js → tags-D0kLlFdQ.js} +1 -1
  106. package/lib/theme/index.cjs +1 -1
  107. package/lib/theme/index.js +3 -2
  108. package/lib/tweaker/index.cjs +2 -2
  109. package/lib/tweaker/index.js +6 -5
  110. package/lib/utils/bytes.d.ts +1 -0
  111. package/lib/utils/index.cjs +1 -1
  112. package/lib/utils/index.d.ts +2 -0
  113. package/lib/utils/index.js +135 -110
  114. package/lib/utils/promises.d.ts +1 -0
  115. package/lib/video/index.cjs +1 -1
  116. package/lib/video/index.js +1 -1
  117. package/package.json +9 -1
  118. package/lib/Derived-CFnbeEgJ.js +0 -27
  119. package/lib/Derived-Dko3EP7m.cjs +0 -1
  120. package/lib/ElementConstructor-9S0f1yAH.cjs +0 -1
  121. package/lib/Resource-BhF6Tj1p.js +0 -49
  122. package/lib/Resource-WCQEgLpB.cjs +0 -1
  123. package/lib/_createStore-Ck9bHolX.js +0 -12
  124. package/lib/index-DQo2-dnB.cjs +0 -9
  125. package/lib/instantiate-BWM-ipPW.cjs +0 -1
  126. package/lib/store/Keyed.d.ts +0 -13
@@ -1,148 +1,173 @@
1
- import { a as g, p as b } from "../attributes-69we3byR.js";
2
- import { i as C } from "../browser-0zX67oeU.js";
3
- import { a as S, c as O, f as y, m as w } from "../canvas-DeZ0SLUJ.js";
4
- import { g as v, n as P, s as T } from "../coordinates-CgdGoSYs.js";
5
- import { f as Q, b as D, g as R, a as z } from "../dom-P5QbAASX.js";
6
- import { c as j, n as N, f as V, p as B, b as M, i as U, m as W, e as q, g as H, j as J, d as K, o as L, a as $, h as F, k as G, l as X } from "../easings-BKi40vHz.js";
7
- import { d as Z, a as _ } from "../events-CJTUMSLU.js";
8
- import { c as ae } from "../file-lxi_oXJf.js";
9
- import { d as te, t as oe } from "../function-C10DGppn.js";
10
- import { s as re } from "../gestures-D2Fdra_G.js";
11
- import { g as ce, a as ue, b as le } from "../layout-HoBT_Da2.js";
12
- import { e as pe, f as me, c as de, d as xe, l as ge, m as be, r as he, b as Ce, a as Ee, s as Se } from "../math-BOBiC4TN.js";
13
- import { n as ye, p as we, r as Ie, t as ve } from "../polyfills-X6KXuHg-.js";
14
- import { c as Te, d as Ae, i as Qe, b as De, a as Re, m as ze, e as ke, o as je, p as Ne } from "../object-D6MVWB4l.js";
15
- import { c as Be, a as Me, g as Ue, i as We, k as qe, s as He, t as Je, u as Ke } from "../string-f0Dnk0L1.js";
16
- import { g as $e, a as Fe } from "../style-j2TwriJ_.js";
17
- import { c as Xe, n as Ye, s as Ze } from "../url-DMNfW7uN.js";
18
- function i(a, e, ...s) {
19
- return [...a.slice(0, e), ...s, ...a.slice(e)];
1
+ import { a as b, p as C } from "../attributes-69we3byR.js";
2
+ import { i as w } from "../browser-0zX67oeU.js";
3
+ import { a as y, c as O, f as B, m as I } from "../canvas-DeZ0SLUJ.js";
4
+ import { g as T, n as v, s as A } from "../coordinates-CgdGoSYs.js";
5
+ import { f as D, b as M, g as R, a as z } from "../dom-P5QbAASX.js";
6
+ import { c as j, n as N, f as V, p as U, b as $, i as F, m as K, e as W, g as q, j as G, d as H, o as J, a as L, h as Y, k as Z, l as X } from "../easings-BKi40vHz.js";
7
+ import { d as ee, a as ae } from "../events-CJTUMSLU.js";
8
+ import { c as se } from "../file-lxi_oXJf.js";
9
+ import { d as ne, t as re } from "../function-C10DGppn.js";
10
+ import { s as ue } from "../gestures-D2Fdra_G.js";
11
+ import { g as le, a as fe, b as pe } from "../layout-HoBT_Da2.js";
12
+ import { e as de, f as ge, c as xe, d as he, l as be, m as Ce, r as Ee, b as we, a as Se, s as ye } from "../math-BOBiC4TN.js";
13
+ import { n as Be, p as Ie, r as Pe, t as Te } from "../polyfills-X6KXuHg-.js";
14
+ import { c as Ae, d as Qe, i as De, b as Me, a as Re, m as ze, e as ke, o as je, p as Ne } from "../object-D6MVWB4l.js";
15
+ import { c as Ue, a as $e, g as Fe, i as Ke, k as We, s as qe, t as Ge, u as He } from "../string-f0Dnk0L1.js";
16
+ import { g as Le, a as Ye } from "../style-j2TwriJ_.js";
17
+ import { c as Xe, n as _e, s as ea } from "../url-DMNfW7uN.js";
18
+ function i(a, e, ...t) {
19
+ return [...a.slice(0, e), ...t, ...a.slice(e)];
20
20
  }
21
- function c(a, e) {
22
- const s = a.length;
23
- e = e % s;
24
- const t = new Array(s);
25
- for (let o = 0; o < s; o++) {
26
- const n = (o + e) % s;
27
- t[n] = a[o];
21
+ function u(a, e) {
22
+ const t = a.length;
23
+ e = e % t;
24
+ const s = new Array(t);
25
+ for (let o = 0; o < t; o++) {
26
+ const n = (o + e) % t;
27
+ s[n] = a[o];
28
28
  }
29
- return t;
29
+ return s;
30
30
  }
31
- function u(a, e) {
32
- return a.x < e.x + e.width && a.x > e.x && a.y < e.y + e.height && a.y > e.y;
31
+ function c(a, e = 2) {
32
+ if (!+a)
33
+ return "0 Bytes";
34
+ const t = 1024, s = e < 0 ? 0 : e, o = [
35
+ "Bytes",
36
+ "KiB",
37
+ "MiB",
38
+ "GiB",
39
+ "TiB",
40
+ "PiB",
41
+ "EiB",
42
+ "ZiB",
43
+ "YiB"
44
+ ], n = Math.floor(Math.log(a) / Math.log(t));
45
+ return `${parseFloat((a / Math.pow(t, n)).toFixed(s))} ${o[n]}`;
33
46
  }
34
47
  function l(a, e) {
48
+ return a.x < e.x + e.width && a.x > e.x && a.y < e.y + e.height && a.y > e.y;
49
+ }
50
+ function f(a, e) {
35
51
  return Math.sqrt((a.x - e.x) ** 2 + (a.y - e.y) ** 2) < e.radius;
36
52
  }
37
53
  function r(a, e) {
38
- const s = a.styleMap.get(e);
39
- if (s) {
40
- const t = s.toString();
41
- return t.startsWith("var") ? r(a, t.slice(4, -1)) : t;
54
+ const t = a.styleMap.get(e);
55
+ if (t) {
56
+ const s = t.toString();
57
+ return s.startsWith("var") ? r(a, s.slice(4, -1)) : s;
42
58
  }
43
59
  }
44
- function f(...a) {
60
+ function p(...a) {
45
61
  const e = {};
46
- return Array.from(document.styleSheets).forEach((s) => {
47
- Array.from(s.cssRules).forEach((t) => {
48
- t instanceof CSSStyleRule && t.selectorText === ":root" && a.forEach((o) => {
49
- const n = r(t, o);
62
+ return Array.from(document.styleSheets).forEach((t) => {
63
+ Array.from(t.cssRules).forEach((s) => {
64
+ s instanceof CSSStyleRule && s.selectorText === ":root" && a.forEach((o) => {
65
+ const n = r(s, o);
50
66
  n && (e[o] = n);
51
67
  });
52
68
  });
53
- }), a.forEach((s) => {
54
- e[s] || console.warn(`variable named ${s} not found`);
69
+ }), a.forEach((t) => {
70
+ e[t] || console.warn(`variable named ${t} not found`);
55
71
  }), e;
56
72
  }
57
- function p(a) {
73
+ function m(a) {
58
74
  const e = window.atob(a);
59
75
  return decodeURIComponent(window.escape(e));
60
76
  }
61
- function m(a) {
77
+ function d(a) {
62
78
  const e = window.unescape(encodeURIComponent(a));
63
79
  return window.btoa(e);
64
80
  }
81
+ function g(a) {
82
+ return new Promise((e) => {
83
+ setTimeout(() => {
84
+ e();
85
+ }, a);
86
+ });
87
+ }
65
88
  export {
66
- pe as calculateDistance,
67
- me as calculateDistanceWithRadius,
68
- Be as camelToKebab,
69
- Me as capitalize,
89
+ de as calculateDistance,
90
+ ge as calculateDistanceWithRadius,
91
+ Ue as camelToKebab,
92
+ $e as capitalize,
70
93
  Xe as changeHistory,
71
- de as clamp,
72
- Te as cloneDeep,
73
- Ae as compareObjects,
74
- S as contain,
94
+ xe as clamp,
95
+ Ae as cloneDeep,
96
+ Qe as compareObjects,
97
+ y as contain,
75
98
  O as cover,
76
- ae as createJSONAndSave,
77
- xe as damp,
78
- te as debounce,
79
- m as decode,
80
- Z as dispatchBeforeSizeChangeEvent,
81
- _ as dispatchSizeChangeEvent,
82
- l as dotCircleCollision,
83
- u as dotRectCollision,
99
+ se as createJSONAndSave,
100
+ he as damp,
101
+ ne as debounce,
102
+ d as decode,
103
+ ee as dispatchBeforeSizeChangeEvent,
104
+ ae as dispatchSizeChangeEvent,
105
+ f as dotCircleCollision,
106
+ l as dotRectCollision,
84
107
  j as easeInCubic,
85
108
  N as easeInExpo,
86
109
  V as easeInOutCubic,
87
- B as easeInOutExpo,
88
- M as easeInOutQuad,
89
- U as easeInOutQuart,
90
- W as easeInOutQuint,
91
- q as easeInQuad,
92
- H as easeInQuart,
93
- J as easeInQuint,
94
- K as easeOutCubic,
95
- L as easeOutExpo,
96
- $ as easeOutQuad,
97
- F as easeOutQuart,
98
- G as easeOutQuint,
99
- p as encode,
100
- Q as findParentElement,
101
- D as findScrollParentElement,
102
- y as fixPosition,
103
- Ue as generateId,
110
+ U as easeInOutExpo,
111
+ $ as easeInOutQuad,
112
+ F as easeInOutQuart,
113
+ K as easeInOutQuint,
114
+ W as easeInQuad,
115
+ q as easeInQuart,
116
+ G as easeInQuint,
117
+ H as easeOutCubic,
118
+ J as easeOutExpo,
119
+ L as easeOutQuad,
120
+ Y as easeOutQuart,
121
+ Z as easeOutQuint,
122
+ m as encode,
123
+ D as findParentElement,
124
+ M as findScrollParentElement,
125
+ B as fixPosition,
126
+ c as formatBytes,
127
+ Fe as generateId,
104
128
  R as getAllParentElements,
105
- ce as getCumulativeOffsetLeft,
106
- ue as getCumulativeOffsetTop,
107
- le as getCumulativePosition,
129
+ le as getCumulativeOffsetLeft,
130
+ fe as getCumulativeOffsetTop,
131
+ pe as getCumulativePosition,
108
132
  z as getElement,
109
- $e as getElementTransitionDurationMS,
110
- Fe as getElementTransitionDurationS,
111
- v as getPointerPosition,
112
- f as getRootVariables,
133
+ Le as getElementTransitionDurationMS,
134
+ Ye as getElementTransitionDurationS,
135
+ T as getPointerPosition,
136
+ p as getRootVariables,
113
137
  i as insert,
114
- C as isBrowser,
115
- Qe as isESClass,
116
- De as isNullish,
138
+ w as isBrowser,
139
+ De as isESClass,
140
+ Me as isNullish,
117
141
  Re as isObject,
118
- We as isUppercase,
119
- qe as kebabToCamel,
120
- ge as lerp,
142
+ Ke as isUppercase,
143
+ We as kebabToCamel,
144
+ be as lerp,
121
145
  X as linear,
122
- be as mapRange,
123
- w as measureText,
146
+ Ce as mapRange,
147
+ I as measureText,
124
148
  ze as mergeDeep,
125
149
  ke as mixin,
126
- P as normalize,
127
- Ye as normalizeBase,
128
- ye as nullishCoalescing,
150
+ v as normalize,
151
+ _e as normalizeBase,
152
+ Be as nullishCoalescing,
129
153
  je as omit,
130
- g as parseAttribute,
131
- b as parseAttributeValue,
154
+ b as parseAttribute,
155
+ C as parseAttributeValue,
132
156
  Ne as pick,
133
- we as preciseNumber,
134
- he as round,
135
- Ie as roundNumberTo,
136
- T as screenToCartesian,
137
- re as setupDrag,
138
- c as shiftArray,
139
- Ce as smootherstep,
140
- Ee as smoothstep,
141
- He as snakeToDotted,
142
- Ze as splitPath,
143
- Se as step,
144
- oe as throttle,
145
- Je as toPascalCase,
146
- ve as toStep,
147
- Ke as uncapitalize
157
+ Ie as preciseNumber,
158
+ Ee as round,
159
+ Pe as roundNumberTo,
160
+ A as screenToCartesian,
161
+ ue as setupDrag,
162
+ u as shiftArray,
163
+ we as smootherstep,
164
+ Se as smoothstep,
165
+ qe as snakeToDotted,
166
+ ea as splitPath,
167
+ ye as step,
168
+ re as throttle,
169
+ Ge as toPascalCase,
170
+ Te as toStep,
171
+ He as uncapitalize,
172
+ g as wait
148
173
  };
@@ -0,0 +1 @@
1
+ export declare function wait(dur: number): Promise<void>;
@@ -1 +1 @@
1
- "use strict";var l=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var i=(t,s,e)=>(l(t,s,"read from private field"),e?e.call(t):s.get(t)),n=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},c=(t,s,e,o)=>(l(t,s,"write to private field"),o?o.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-kzJycezD.cjs");const h=require("../source/index.cjs"),u=require("../ticker/index.cjs");var r,a;class d extends h.SourceElement{constructor(){super(...arguments);n(this,r,0);n(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e>i(this,r)&&c(this,r,e),this.dispatchEvent(new CustomEvent("readyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}})),this.consumerElement.readyState===4&&u.ticker.unsubscribe(i(this,a))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{u.ticker.subscribe(i(this,a)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),u.ticker.unsubscribe(i(this,a)),c(this,r,0)}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||""}}r=new WeakMap,a=new WeakMap;customElements.get("e-video")||customElements.define("e-video",d);exports.VideoElement=d;
1
+ "use strict";var l=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var i=(t,s,e)=>(l(t,s,"read from private field"),e?e.call(t):s.get(t)),n=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},c=(t,s,e,o)=>(l(t,s,"write to private field"),o?o.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-Cr3VaD9G.cjs");const h=require("../source/index.cjs"),u=require("../ticker/index.cjs");var r,a;class d extends h.SourceElement{constructor(){super(...arguments);n(this,r,0);n(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e>i(this,r)&&c(this,r,e),this.dispatchEvent(new CustomEvent("readyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}})),this.consumerElement.readyState===4&&u.ticker.unsubscribe(i(this,a))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{u.ticker.subscribe(i(this,a)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),u.ticker.unsubscribe(i(this,a)),c(this,r,0)}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||""}}r=new WeakMap,a=new WeakMap;customElements.get("e-video")||customElements.define("e-video",d);exports.VideoElement=d;
@@ -8,7 +8,7 @@ var i = (t, s, e) => (m(t, s, "read from private field"), e ? e.call(t) : s.get(
8
8
  s instanceof WeakSet ? s.add(t) : s.set(t, e);
9
9
  }, c = (t, s, e, u) => (m(t, s, "write to private field"), u ? u.call(t, e) : s.set(t, e), e);
10
10
  import "../window-resizer/index.js";
11
- import "../Store-Dsft7GtM.js";
11
+ import "../Store-Qr3SNOSf.js";
12
12
  import { SourceElement as h } from "../source/index.js";
13
13
  import { ticker as o } from "../ticker/index.js";
14
14
  var r, a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -138,6 +138,11 @@
138
138
  "default": "./lib/jsx/index.js",
139
139
  "types": "./lib/jsx/index.d.ts"
140
140
  },
141
+ "./jsx/hooks/animation": {
142
+ "require": "./lib/jsx/hooks/animation/index.cjs",
143
+ "default": "./lib/jsx/hooks/animation/index.js",
144
+ "types": "./lib/jsx/hooks/animation/index.d.ts"
145
+ },
141
146
  "./jsx/hooks/store": {
142
147
  "require": "./lib/jsx/hooks/store/index.cjs",
143
148
  "default": "./lib/jsx/hooks/store/index.js",
@@ -376,6 +381,9 @@
376
381
  "jsx": [
377
382
  "lib/jsx/index.d.ts"
378
383
  ],
384
+ "jsx/hooks/animation": [
385
+ "lib/jsx/hooks/animation/index.d.ts"
386
+ ],
379
387
  "jsx/hooks/store": [
380
388
  "lib/jsx/hooks/store/index.d.ts"
381
389
  ],
@@ -1,27 +0,0 @@
1
- var u = (s, r, e) => {
2
- if (!r.has(s))
3
- throw TypeError("Cannot " + e);
4
- };
5
- var o = (s, r, e) => (u(s, r, "read from private field"), e ? e.call(s) : r.get(s)), i = (s, r, e) => {
6
- if (r.has(s))
7
- throw TypeError("Cannot add the same private member more than once");
8
- r instanceof WeakSet ? r.add(s) : r.set(s, e);
9
- }, n = (s, r, e, c) => (u(s, r, "write to private field"), c ? c.call(s, e) : r.set(s, e), e);
10
- import { S as p } from "./Store-Dsft7GtM.js";
11
- var t;
12
- class d extends p {
13
- constructor(e, c, l) {
14
- super(null, l);
15
- i(this, t, void 0);
16
- n(this, t, e.subscribe((b) => {
17
- this.current = c(b.current);
18
- }));
19
- }
20
- close() {
21
- super.close(), o(this, t).call(this);
22
- }
23
- }
24
- t = new WeakMap();
25
- export {
26
- d as D
27
- };
@@ -1 +0,0 @@
1
- "use strict";var u=(e,r,s)=>{if(!r.has(e))throw TypeError("Cannot "+s)};var i=(e,r,s)=>(u(e,r,"read from private field"),s?s.call(e):r.get(e)),n=(e,r,s)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,s)},o=(e,r,s,c)=>(u(e,r,"write to private field"),c?c.call(e,s):r.set(e,s),s);const d=require("./Store-kzJycezD.cjs");var t;class h extends d.Store{constructor(s,c,l){super(null,l);n(this,t,void 0);o(this,t,s.subscribe(b=>{this.current=c(b.current)}))}close(){super.close(),i(this,t).call(this)}}t=new WeakMap;exports.Derived=h;
@@ -1 +0,0 @@
1
- "use strict";var Z=(f,e,t)=>{if(!e.has(f))throw TypeError("Cannot "+t)};var i=(f,e,t)=>(Z(f,e,"read from private field"),t?t.call(f):e.get(f)),c=(f,e,t)=>{if(e.has(f))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(f):e.set(f,t)},E=(f,e,t,s)=>(Z(f,e,"write to private field"),s?s.call(f,t):e.set(f,t),t);var r=(f,e,t)=>(Z(f,e,"access private method"),t);const b=require("./Store-kzJycezD.cjs"),he=require("./browser-CpzFX2xg.cjs"),de=require("./object-CCiXnER2.cjs"),_=require("./string-DhgS_iFl.cjs"),we=require("./connector/index.cjs"),Le=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view"]);var o,S,l,w,d,u,P,ue,B,me,R,ge,L,j,T,ee,G,Se,W,Ee,$,be,z,Ce,v,te,A,se,I,ye,k,ie,M,ne,J,pe,D,oe,N,F,x,re,q,ce,H,ae,V,K;const U=class U{constructor(...e){c(this,P);c(this,B);c(this,R);c(this,L);c(this,T);c(this,G);c(this,W);c(this,$);c(this,z);c(this,v);c(this,A);c(this,I);c(this,k);c(this,M);c(this,J);c(this,D);c(this,N);c(this,x);c(this,q);c(this,H);c(this,o,null);c(this,S,new Set);c(this,l,new Set);c(this,w,void 0);c(this,d,void 0);c(this,u,void 0);c(this,V,()=>{i(this,S).forEach(e=>{e()}),i(this,S).clear()});c(this,K,e=>{i(this,l).forEach(t=>{t(e)}),i(this,l).clear(),r(this,M,ne).call(this)});if(he.isBrowser){const t=e[0],s=e[1];E(this,o,r(this,P,ue).call(this,t,s==null?void 0:s.forceSvg)),r(this,R,ge).call(this,s)}}get node(){return i(this,o)}set node(e){var t;r(this,M,ne).call(this),E(this,o,e),(t=i(this,w))==null||t.call(this),i(this,o)instanceof Element&&E(this,d,[...i(this,o).querySelectorAll("store-root")]),r(this,k,ie).call(this),r(this,L,j).call(this)}};o=new WeakMap,S=new WeakMap,l=new WeakMap,w=new WeakMap,d=new WeakMap,u=new WeakMap,P=new WeakSet,ue=function(e,t){let s=null;if(e instanceof Node)s=e;else if(typeof e=="string")if(!e.includes("<")&&e.includes("-"))s=new(customElements.get(e));else if(e.includes("<")){const n=document.createElement("div");n.innerHTML=e,s=n.firstElementChild}else Le.has(e)||t?s=document.createElementNS("http://www.w3.org/2000/svg",e):s=document.createElement(e);else s=document.createElement("div");return s},B=new WeakSet,me=function(e){return e instanceof HTMLElement||e instanceof SVGElement},R=new WeakSet,ge=function(e){if(!e)return;const t=r(this,B,me).call(this,i(this,o)),s=e.ref;delete e.ref,e!=null&&e.onConnect&&(i(this,S).add(e.onConnect),delete e.onConnect),e!=null&&e.onDisconnect&&(i(this,l).add(e.onDisconnect),delete e.onDisconnect);let n,a;for(const h in e){const m=e[h];h==="class"&&t?r(this,T,ee).call(this,m):h==="style"&&t?r(this,$,be).call(this,m):h==="lightChildren"?r(this,N,F).call(this,i(this,o),m):h==="children"?r(this,N,F).call(this,i(this,o)instanceof Element?i(this,o).shadowRoot||i(this,o):i(this,o),m):h.startsWith("on")?(a||(a={}),a[h]=m):(n||(n={}),n[h]=m)}r(this,J,pe).call(this,n),r(this,I,ye).call(this,a),s&&(typeof s=="function"?s(i(this,o)):s.current=i(this,o)),r(this,L,j).call(this)},L=new WeakSet,j=function(){if(he.isBrowser&&(i(this,l).size||i(this,S).size)){const e=i(this,o)instanceof DocumentFragment?i(this,o).firstChild:i(this,o);E(this,w,we.connector.subscribe(e,{connectCallback:i(this,V),disconnectCallback:i(this,K),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,ee=function(e){if(e){if(typeof e=="string")i(this,o).classList.add(e);else if(Array.isArray(e))e.forEach(t=>{r(this,T,ee).call(this,t)});else if(typeof e=="object")if(e instanceof b.Store)r(this,G,Se).call(this,e);else for(const t in e){const s=e[t];s instanceof b.Store?r(this,W,Ee).call(this,t,s):s?i(this,o).classList.add(t):i(this,o).classList.remove(t)}}else return},G=new WeakSet,Se=function(e){i(this,l).add(e.subscribe(({current:t,previous:s})=>{s&&[s].flat().forEach(n=>{n&&i(this,o).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&i(this,o).classList.add(n)})}))},W=new WeakSet,Ee=function(e,t){i(this,l).add(t.subscribe(({current:s})=>{s?i(this,o).classList.add(e):i(this,o).classList.remove(e)}))},$=new WeakSet,be=function(e){if(!e)return;i(this,o).tagName==="style"||i(this,o).tagName==="STYLE"?r(this,v,te).call(this,e):r(this,z,Ce).call(this,e)},z=new WeakSet,Ce=function(e){for(const t in e){const s=t,n=e[s];n instanceof b.Store?i(this,l).add(n.subscribe(({current:a})=>{r(this,A,se).call(this,s,a)})):r(this,A,se).call(this,s,n)}},v=new WeakSet,te=function(e){for(const t in e){const s=e[t];if(typeof s=="object"&&!(s instanceof b.Store))i(this,o).appendChild(document.createTextNode(`${t} {`)),r(this,v,te).call(this,s),i(this,o).appendChild(document.createTextNode("}"));else if(s instanceof b.Store){const n=document.createTextNode("");i(this,l).add(s.subscribe(a=>{a.current?n.nodeValue=`${_.camelToKebab(t)}: ${a.current};`:n.nodeValue=""})),i(this,o).appendChild(n)}else i(this,o).appendChild(document.createTextNode(`${_.camelToKebab(t)}: ${s};`))}},A=new WeakSet,se=function(e,t){e.includes("--")?t?i(this,o).style.setProperty(e,t.toString()):i(this,o).style.removeProperty(e):t?i(this,o).style[e]=t.toString():i(this,o).style[e]=""},I=new WeakSet,ye=function(e){if(e){i(this,u)||E(this,u,[]);for(const t in e){const s=t,n=_.uncapitalize(s.split("on").slice(1).join("on")),a=e[s];typeof a=="object"?i(this,u).push({name:n,callback:a.callback,options:a.options}):typeof a=="function"&&i(this,u).push({name:n,callback:a})}r(this,k,ie).call(this)}},k=new WeakSet,ie=function(){var e;(e=i(this,u))==null||e.forEach(t=>{i(this,o).addEventListener(t.name,t.callback,t.options)})},M=new WeakSet,ne=function(){var e;(e=i(this,u))==null||e.forEach(t=>{i(this,o).removeEventListener(t.name,t.callback,t.options)})},J=new WeakSet,pe=function(e){for(const t in e){const s=e[t];s instanceof b.Store?i(this,l).add(s.subscribe(({current:n})=>{r(this,D,oe).call(this,t,n)})):r(this,D,oe).call(this,t,s)}},D=new WeakSet,oe=function(e,t){var n,a;const s=i(this,o);e in s&&!((a=(n=s.constructor)==null?void 0:n.observedAttributes)!=null&&a.includes(e))?t!=null&&(s[e]=t.toString()):t!=null&&s.setAttribute(e,t.toString())},N=new WeakSet,F=function(e,t){t&&(t=[t].flat(),t.forEach(s=>{if(s instanceof b.Store){const n=document.createElement("div");n.style.display="contents",e.appendChild(n),i(this,d)||E(this,d,[]);const a=i(this,d).length;n.setAttribute("store-root",""),i(this,d).push(n),i(this,l).add(s.subscribe(({current:h,previous:m})=>{const C=i(this,d)[a];C.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Y=Array.from(C.childNodes),fe=[h].flat(),Ne=[m].flat(),le=[],Q=[];Ne.forEach((g,y)=>{!fe.includes(g)&&Y[y]?le.push(Y[y]):Q.push(g)}),fe.forEach((g,y)=>{if(Q[y]){if(g!==Q[y]){const p=r(this,q,ce).call(this,g),X=Y[y];p instanceof Node?X.isEqualNode(p)||C.replaceChild(p,X):C.removeChild(X)}}else{const p=r(this,q,ce).call(this,g);p instanceof Node&&n.appendChild(p)}}),le.forEach(g=>{C.removeChild(g)}),C.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(s instanceof U)r(this,x,re).call(this,e,s.node);else if(s instanceof Function)r(this,N,F).call(this,e,de.isESClass(s)?new s:s());else{const n=r(this,H,ae).call(this,s);n instanceof Node&&r(this,x,re).call(this,e,n)}}))},x=new WeakSet,re=function(e,t){!(e instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(i(this,S).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),i(this,l).add(()=>{t.remove()})):e.appendChild(t)},q=new WeakSet,ce=function(e){return e instanceof U?e.node:typeof e=="function"?de.isESClass(e)?new e:e():r(this,H,ae).call(this,e)},H=new WeakSet,ae=function(e){if(e instanceof Node)return e;if(e!=null){const t=String(e);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const s=document.createElement("div");return s.innerHTML=t,s.firstElementChild}else return document.createTextNode(t)}else return},V=new WeakMap,K=new WeakMap;let O=U;exports.ElementConstructor=O;
@@ -1,49 +0,0 @@
1
- var x = (r, s, e) => {
2
- if (!s.has(r))
3
- throw TypeError("Cannot " + e);
4
- };
5
- var t = (r, s, e) => (x(r, s, "read from private field"), e ? e.call(r) : s.get(r)), u = (r, s, e) => {
6
- if (s.has(r))
7
- throw TypeError("Cannot add the same private member more than once");
8
- s instanceof WeakSet ? s.add(r) : s.set(r, e);
9
- }, a = (r, s, e, c) => (x(r, s, "write to private field"), c ? c.call(r, e) : s.set(r, e), e);
10
- import { S as d } from "./Store-Dsft7GtM.js";
11
- var f;
12
- class P extends d {
13
- constructor(e, c, i) {
14
- super(null, i);
15
- u(this, f, void 0);
16
- a(this, f, e.subscribe((b) => {
17
- this.current = b.current.map((m, o, g) => c(m, o, g));
18
- }));
19
- }
20
- close() {
21
- super.close(), t(this, f).call(this);
22
- }
23
- }
24
- f = new WeakMap();
25
- var l, h, n;
26
- class R extends d {
27
- constructor(e, c, i) {
28
- super(e, i);
29
- u(this, l, void 0);
30
- u(this, h, void 0);
31
- u(this, n, 0);
32
- a(this, h, new d(!1)), a(this, l, c), i != null && i.manualControl || this.refetch();
33
- }
34
- get isPending() {
35
- return t(this, h);
36
- }
37
- refetch() {
38
- t(this, h).current = !0, a(this, n, t(this, n) + 1);
39
- const e = t(this, n);
40
- t(this, l).call(this).then((c) => {
41
- e === t(this, n) && (t(this, h).current = !1, this.current = c);
42
- });
43
- }
44
- }
45
- l = new WeakMap(), h = new WeakMap(), n = new WeakMap();
46
- export {
47
- P as D,
48
- R
49
- };
@@ -1 +0,0 @@
1
- "use strict";var o=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var s=(r,t,e)=>(o(r,t,"read from private field"),e?e.call(r):t.get(r)),n=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},l=(r,t,e,c)=>(o(r,t,"write to private field"),c?c.call(r,e):t.set(r,e),e);const d=require("./Store-kzJycezD.cjs");var a;class m extends d.Store{constructor(e,c,i){super(null,i);n(this,a,void 0);l(this,a,e.subscribe(b=>{this.current=b.current.map((x,S,g)=>c(x,S,g))}))}close(){super.close(),s(this,a).call(this)}}a=new WeakMap;var f,u,h;class v extends d.Store{constructor(e,c,i){super(e,i);n(this,f,void 0);n(this,u,void 0);n(this,h,0);l(this,u,new d.Store(!1)),l(this,f,c),i!=null&&i.manualControl||this.refetch()}get isPending(){return s(this,u)}refetch(){s(this,u).current=!0,l(this,h,s(this,h)+1);const e=s(this,h);s(this,f).call(this).then(c=>{e===s(this,h)&&(s(this,u).current=!1,this.current=c)})}}f=new WeakMap,u=new WeakMap,h=new WeakMap;exports.DerivedArray=m;exports.Resource=v;
@@ -1,12 +0,0 @@
1
- import { c as o } from "./globals-DMjysUXI.js";
2
- function t(n) {
3
- o.value.addDisconnectCallback(n);
4
- }
5
- function r(n) {
6
- const e = typeof n == "function" ? n(o.value) : n;
7
- return o && t(() => e.close()), e;
8
- }
9
- export {
10
- r as _,
11
- t as o
12
- };
@@ -1,9 +0,0 @@
1
- "use strict";var T=(s,i,t)=>{if(!i.has(s))throw TypeError("Cannot "+t)};var e=(s,i,t)=>(T(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>{if(i.has(s))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(s):i.set(s,t)},h=(s,i,t,l)=>(T(s,i,"write to private field"),l?l.call(s,t):i.set(s,t),t);var v=(s,i,t)=>(T(s,i,"access private method"),t);require("./Store-kzJycezD.cjs");const q=require("./browser-CpzFX2xg.cjs"),M=require("./events-BGwqaxVW.cjs"),$=require("./style-At6aDoqG.cjs"),o=require("./tags-BBOGIzDK.cjs"),z=require("./createStylesheet-Di9WRypw.cjs"),D=require("./theme/index.cjs"),R=z.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var c,d,r,a,u,m,L,E,C;const I=class I extends HTMLElement{constructor(){super();n(this,E);n(this,c,null);n(this,d,"");n(this,r,null);n(this,a,!1);n(this,u,void 0);n(this,m,null);n(this,L,()=>{M.dispatchSizeChangeEvent(this)});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(R),h(this,c,this.attachInternals()),h(this,m,new ResizeObserver(e(this,L))),o.element(this,{children:[o.button({class:"head",children:o.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),o.div({class:"body",style:{height:"0px"},children:o.div({class:"body-inner",children:o.slot()}),ref:l=>{h(this,r,l)}})]}))}get value(){return e(this,d)}set value(t){h(this,d,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,c).setFormValue(e(this,d))}get internals(){return e(this,c)}get opened(){return e(this,a)}open(){clearTimeout(e(this,u)),h(this,a,!0),e(this,r).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,r).style.height=e(this,r).scrollHeight+"px",v(this,E,C).call(this)},0)}close(){h(this,a,!1),e(this,r).style.height="0px",this.classList.remove("opened"),v(this,E,C).call(this),h(this,u,setTimeout(()=>{this.classList.remove("triggered"),e(this,r).style.display="none"},$.getElementTransitionDurationMS(e(this,r))))}connectedCallback(){e(this,m).observe(e(this,r))}disconnectedCallback(){clearTimeout(e(this,u)),e(this,m).disconnect()}};c=new WeakMap,d=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakMap,m=new WeakMap,L=new WeakMap,E=new WeakSet,C=function(){M.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,a)}}))},I.formAssociated=!0;let x=I;customElements.get("e-select")||customElements.define("e-select",x);var f;class H extends HTMLElement{constructor(){super(...arguments);n(this,f,null)}get selectElement(){return e(this,f)}connectedCallback(){var l,S;const t=(S=(l=this.assignedSlot)==null?void 0:l.getRootNode())==null?void 0:S.host;t?h(this,f,t):console.log(this,"e-select not found")}}f=new WeakMap;const F=z.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var p,w,k;class O extends H{constructor(){super();n(this,w);n(this,p,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(F),o.element(this,{tabindex:0,onClick:()=>{v(this,w,k).call(this)},onKeydown:l=>{l.code==="Space"&&v(this,w,k).call(this)},children:o.slot()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,p)),setTimeout(()=>{e(this,p).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,p))}}p=new WeakMap,w=new WeakSet,k=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",O);const A=`<svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="32"
4
- height="32"
5
- viewBox="0 0 24 24"
6
- >
7
- <path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
8
- </svg>
9
- `,P=z.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${D.aptechkaTheme.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var y,g,b;class B extends H{constructor(){super();n(this,y,null);n(this,g,()=>{const l=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(S=>S.value===this.selectElement.value);l&&(e(this,y).innerHTML=l.innerHTML)});n(this,b,()=>{this.classList.toggle("opened",this.selectElement.opened)});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(P),o.element(this,{children:[o.slot(),o.slot({name:"arrow",children:o.element(A,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),h(this,y,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,g)),e(this,g).call(this),this.selectElement.addEventListener("selectToggle",e(this,b))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,g)),this.selectElement.removeEventListener("selectToggle",e(this,b))}}y=new WeakMap,g=new WeakMap,b=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",B);exports.SelectElement=x;exports.SelectHeadElement=B;exports.SelectOptionElement=O;exports.SelectUserElement=H;exports.arrowIcon=A;
@@ -1 +0,0 @@
1
- "use strict";var L=Object.defineProperty,T=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var y=(n,e,t)=>e in n?L(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,i=(n,e)=>{for(var t in e||(e={}))F.call(e,t)&&y(n,t,e[t]);if(g)for(var t of g(e))M.call(e,t)&&y(n,t,e[t]);return n},w=(n,e)=>T(n,_(e));var R=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var c=(n,e,t)=>(R(n,e,"read from private field"),t?t.call(n):e.get(n)),h=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)};const k=require("./ElementConstructor-9S0f1yAH.cjs"),D=require("./object-CCiXnER2.cjs"),j=require("./string-DhgS_iFl.cjs"),r=require("./globals-bYKki-b9.cjs");require("./Store-kzJycezD.cjs");var a,d,m,C,u;class H extends HTMLElement{constructor(t){var s;super();h(this,a,new Set);h(this,d,new Set);h(this,m,new Map);h(this,C,()=>{r.contextStack.value.unshift(c(this,m))});h(this,u,()=>{r.contextStack.value=r.contextStack.value.filter(t=>t!==c(this,m))});const o=r.currentComponentElement.value;r.currentComponentElement.value=this,c(this,C).call(this);const f=t==null?void 0:t.tag(i({},t.attributes)),v=(s=r.nextComponentAttributes.value)!=null&&s.lightChildren?"lightChildren":"children";new k.ElementConstructor(this,w(i({},r.nextComponentAttributes.value),{[v]:f})),r.currentComponentElement.value=o,r.nextComponentAttributes.value=null,c(this,u).call(this)}addConnectCallback(t){c(this,a).add(t)}addDisconnectCallback(t){c(this,d).add(t)}createContext(t,o){c(this,m).set(t,o)}connectedCallback(){r.currentComponentElement.value=this,c(this,a).forEach(t=>{const o=t(this);o&&c(this,d).add(o)}),r.currentComponentElement.value=null,this.addEventListener("beforeChildrenChange",c(this,C)),this.addEventListener("afterChildrenChange",c(this,u))}disconnectedCallback(){c(this,d).forEach(t=>{t(this)}),this.removeEventListener("beforeChildrenChange",c(this,C)),this.removeEventListener("afterChildrenChange",c(this,u))}}a=new WeakMap,d=new WeakMap,m=new WeakMap,C=new WeakMap,u=new WeakMap;function A(n,e,...t){var s;t=t.flat().filter(l=>l!=null);const o=[],f=[];e=e||{},o.push(...t.reverse());const v=n==="instance";if(v&&e.from&&(n=e.from,e==null||delete e.from),typeof n=="function")if(v){let l=null;return D.isESClass(n)?l=new n:l=n(),delete e.children,()=>new k.ElementConstructor(l,e).node}else{if(n===x)return x(t);e.children=o.reverse();const l={noCustomElement:n.noCustomElement,onlyRegister:e.__register};if(e==null||delete e.__register,l.noCustomElement){const S=n(i({},e));return()=>S}const p=`e-${j.camelToKebab(n.name)}`;let E=customElements.get(p);return E||(E=(s=class extends H{constructor(q){super(l.onlyRegister?{tag:n,attributes:e}:q)}},s.formAssociated=n.formAssociated,s),customElements.define(p,E)),()=>l.onlyRegister?E:new E({tag:n,attributes:e})}for(;o.length;){const l=o.pop();Array.isArray(l)?o.push(...l):l!=null&&f.push(l)}if(n==="component"){const l=x(f);return r.nextComponentAttributes.value=e,l.node}else{const l=e!=null&&e.lightChildren?"lightChildren":"children";return e==null||delete e.children,n?new k.ElementConstructor(n,w(i({},e),{[l]:f})):null}}function x(n){return new k.ElementConstructor(document.createDocumentFragment(),{children:n})}function I(n,e){const t=e==null?void 0:e.children,o=e==null?void 0:e.attributes;return A(n,i({},o),t)()}exports.Fragment=x;exports.h=A;exports.instantiate=I;
@@ -1,13 +0,0 @@
1
- import { Store, StoreOptions } from './Store';
2
-
3
- export type KeyedCallback<Type, SourceType extends Array<KeyedSource>> = (value: SourceType[number]['value'], index: number, arr: SourceType) => Type;
4
- export interface KeyedSource<T = any> {
5
- key: any;
6
- value: T;
7
- revalidate?: boolean;
8
- }
9
- export declare class Keyed<Type, SourceType extends Array<KeyedSource>> extends Store<Array<Type>> {
10
- #private;
11
- constructor(store: Store<SourceType, any>, callback: KeyedCallback<Type, SourceType>, parameters?: StoreOptions<Array<Type>>);
12
- close(): void;
13
- }