aptechka 0.1.1 → 0.1.2

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 (296) hide show
  1. package/lib/Damped-1hlKSFaB.cjs +1 -0
  2. package/lib/Damped-523xgzT3.js +152 -0
  3. package/lib/SourceManager-3c3kr7oj.cjs +1 -0
  4. package/lib/SourceManager-F94MRde6.js +108 -0
  5. package/lib/Store-2hWEUGTj.js +135 -0
  6. package/lib/Store-WXFmsaEI.cjs +1 -0
  7. package/lib/WheelControls-F-xg5-oq.js +102 -0
  8. package/lib/WheelControls-Hp5NWRZY.cjs +1 -0
  9. package/lib/animation/Animated.d.ts +41 -0
  10. package/lib/animation/Damped.d.ts +11 -0
  11. package/lib/animation/Tweened.d.ts +16 -0
  12. package/lib/animation/index.cjs +1 -0
  13. package/lib/animation/index.d.ts +3 -0
  14. package/lib/animation/index.js +56 -0
  15. package/lib/attribute/index.cjs +1 -0
  16. package/lib/attribute/index.d.ts +8 -0
  17. package/lib/attribute/index.js +47 -0
  18. package/lib/attributes-_2U65GDl.cjs +1 -0
  19. package/lib/attributes-w0u-KiIb.js +10 -0
  20. package/lib/browser-QbF6EW-w.cjs +1 -0
  21. package/lib/browser-S4eq8AeN.js +4 -0
  22. package/lib/canvas-2d/index.cjs +5 -0
  23. package/lib/canvas-2d/index.d.ts +30 -0
  24. package/lib/canvas-2d/index.js +90 -0
  25. package/lib/controls/Controls.d.ts +9 -0
  26. package/lib/controls/KeyboardControls.d.ts +10 -0
  27. package/lib/controls/LinearControls.d.ts +11 -0
  28. package/lib/controls/User.d.ts +7 -0
  29. package/lib/controls/WheelControls.d.ts +17 -0
  30. package/lib/controls/index.cjs +1 -0
  31. package/lib/controls/index.d.ts +5 -0
  32. package/lib/controls/index.js +43 -0
  33. package/lib/css-unit-parser/index.cjs +8 -0
  34. package/lib/css-unit-parser/index.d.ts +6 -0
  35. package/lib/css-unit-parser/index.js +36 -0
  36. package/lib/custom-element/index.cjs +1 -0
  37. package/lib/custom-element/index.d.ts +8 -0
  38. package/lib/custom-element/index.js +16 -0
  39. package/lib/device/Device.d.ts +17 -0
  40. package/lib/device/Viewport.d.ts +27 -0
  41. package/lib/device/index.cjs +1 -0
  42. package/lib/device/index.d.ts +2 -0
  43. package/lib/device/index.js +123 -0
  44. package/lib/dom-QhWsdQS2.cjs +1 -0
  45. package/lib/dom-bHEwc_xV.js +24 -0
  46. package/lib/easings-_wFs9ZWc.cjs +1 -0
  47. package/lib/easings-uF-tgahf.js +19 -0
  48. package/lib/element-constructor/ElementConstructor.d.ts +76 -0
  49. package/lib/element-constructor/htmlTags.d.ts +113 -0
  50. package/lib/element-constructor/index.cjs +1 -0
  51. package/lib/element-constructor/index.d.ts +4 -0
  52. package/lib/element-constructor/index.js +1389 -0
  53. package/lib/element-constructor/specialObjects.d.ts +2 -0
  54. package/lib/element-constructor/svgTags.d.ts +64 -0
  55. package/lib/en3/attachments/En3SourceManager.d.ts +30 -0
  56. package/lib/en3/core/en3.d.ts +55 -0
  57. package/lib/en3/index.cjs +28 -0
  58. package/lib/en3/index.d.ts +18 -0
  59. package/lib/en3/index.js +3249 -0
  60. package/lib/en3/instances/en3LazyLoader.d.ts +7 -0
  61. package/lib/en3/libs/MeshoptDecoder.d.ts +1 -0
  62. package/lib/en3/loaders/en3GLTFLoader.d.ts +16 -0
  63. package/lib/en3/loaders/en3TextureLoader.d.ts +2 -0
  64. package/lib/en3/objects/En3Clip.d.ts +10 -0
  65. package/lib/en3/objects/En3ClipHelpers.d.ts +5 -0
  66. package/lib/en3/objects/En3GLTF.d.ts +9 -0
  67. package/lib/en3/objects/En3Image.d.ts +7 -0
  68. package/lib/en3/objects/En3ImageLike.d.ts +22 -0
  69. package/{src/packages/en3/objects/En3SourceConsumer.ts → lib/en3/objects/En3SourceConsumer.d.ts} +2 -3
  70. package/lib/en3/objects/En3Video.d.ts +12 -0
  71. package/lib/en3/test/En3HTML.d.ts +9 -0
  72. package/lib/en3/test/En3ModifiedMaterial.d.ts +32 -0
  73. package/lib/en3/test/En3Raycaster.d.ts +19 -0
  74. package/lib/en3/utils/coverTexture.d.ts +6 -0
  75. package/lib/en3/utils/dispose.d.ts +2 -0
  76. package/lib/en3/utils/traverseMaterials.d.ts +2 -0
  77. package/lib/en3/utils/traverseMeshes.d.ts +2 -0
  78. package/lib/function-QP7IreXR.cjs +1 -0
  79. package/lib/function-zwSFehNd.js +17 -0
  80. package/lib/image/index.cjs +1 -0
  81. package/lib/image/index.d.ts +10 -0
  82. package/lib/image/index.js +30 -0
  83. package/lib/intersector/index.cjs +1 -0
  84. package/lib/intersector/index.d.ts +8 -0
  85. package/lib/intersector/index.js +55 -0
  86. package/lib/ladder/index.cjs +1 -0
  87. package/lib/ladder/index.d.ts +21 -0
  88. package/lib/ladder/index.js +97 -0
  89. package/lib/layout-5SJlcXTY.js +12 -0
  90. package/lib/layout-box/index.cjs +1 -0
  91. package/lib/layout-box/index.d.ts +78 -0
  92. package/lib/layout-box/index.js +235 -0
  93. package/lib/layout-rZzbsLPd.cjs +1 -0
  94. package/lib/loading/index.cjs +1 -0
  95. package/lib/loading/index.d.ts +38 -0
  96. package/lib/loading/index.js +99 -0
  97. package/lib/math-FNUBmQPK.cjs +1 -0
  98. package/lib/math-_a3IpKOc.js +45 -0
  99. package/lib/measurer/CumulativeOffsetLeft.d.ts +4 -0
  100. package/lib/measurer/CumulativeOffsetTop.d.ts +4 -0
  101. package/lib/measurer/Meaurer.d.ts +8 -0
  102. package/lib/measurer/index.cjs +1 -0
  103. package/lib/measurer/index.d.ts +3 -0
  104. package/lib/measurer/index.js +48 -0
  105. package/lib/media/index.cjs +1 -0
  106. package/lib/media/index.d.ts +11 -0
  107. package/lib/media/index.js +33 -0
  108. package/lib/morph/Link.d.ts +6 -0
  109. package/lib/morph/Morph.d.ts +26 -0
  110. package/lib/morph/index.cjs +1 -0
  111. package/lib/morph/index.d.ts +1 -0
  112. package/lib/morph/index.js +182 -0
  113. package/lib/notifier/index.cjs +1 -0
  114. package/lib/notifier/index.d.ts +8 -0
  115. package/lib/notifier/index.js +38 -0
  116. package/lib/number-2bR0KBcX.cjs +1 -0
  117. package/lib/number-bCHB2GAD.js +31 -0
  118. package/lib/order/index.cjs +1 -0
  119. package/lib/order/index.d.ts +13 -0
  120. package/lib/order/index.js +5 -0
  121. package/lib/resizer/index.cjs +1 -0
  122. package/lib/resizer/index.d.ts +10 -0
  123. package/lib/resizer/index.js +45 -0
  124. package/lib/router/Link.d.ts +6 -0
  125. package/lib/router/Route.d.ts +15 -0
  126. package/lib/router/RouteElement.d.ts +14 -0
  127. package/lib/router/Router.d.ts +33 -0
  128. package/lib/router/index.cjs +1 -0
  129. package/lib/router/index.d.ts +3 -0
  130. package/lib/router/index.js +266 -0
  131. package/lib/scroll/ScrollElement.d.ts +40 -0
  132. package/lib/scroll/ScrollUserElement.d.ts +7 -0
  133. package/lib/scroll/ScrollbarElement.d.ts +13 -0
  134. package/lib/scroll/index.cjs +71 -0
  135. package/lib/scroll/index.d.ts +2 -0
  136. package/lib/scroll/index.js +444 -0
  137. package/lib/scroll-entries/index.cjs +1 -0
  138. package/lib/scroll-entries/index.d.ts +17 -0
  139. package/lib/scroll-entries/index.js +56 -0
  140. package/lib/source/SourceClass.d.ts +11 -0
  141. package/lib/source/SourceElement.d.ts +16 -0
  142. package/lib/source/SourceManager.d.ts +13 -0
  143. package/lib/source/SourceSet.d.ts +8 -0
  144. package/lib/source/index.cjs +5 -0
  145. package/lib/source/index.d.ts +4 -0
  146. package/lib/source/index.js +95 -0
  147. package/lib/store/Composed.d.ts +7 -0
  148. package/lib/store/Derived.d.ts +7 -0
  149. package/lib/store/DerivedArray.d.ts +7 -0
  150. package/lib/store/Resource.d.ts +11 -0
  151. package/lib/store/Store.d.ts +32 -0
  152. package/lib/store/StoreRegistry.d.ts +22 -0
  153. package/lib/store/index.cjs +1 -0
  154. package/lib/store/index.d.ts +6 -0
  155. package/lib/store/index.js +96 -0
  156. package/lib/string-GmxZA5Nq.js +31 -0
  157. package/lib/string-WmNOGq16.cjs +1 -0
  158. package/lib/ticker/index.cjs +1 -0
  159. package/lib/ticker/index.d.ts +19 -0
  160. package/lib/ticker/index.js +107 -0
  161. package/lib/utils/array.d.ts +1 -0
  162. package/lib/utils/attributes.d.ts +2 -0
  163. package/lib/utils/browser.d.ts +1 -0
  164. package/lib/utils/canvas.d.ts +6 -0
  165. package/lib/utils/collisions.d.ts +3 -0
  166. package/lib/utils/coordinates.d.ts +13 -0
  167. package/lib/utils/decoding.d.ts +2 -0
  168. package/lib/utils/dev.d.ts +3 -0
  169. package/lib/utils/dom.d.ts +4 -0
  170. package/lib/utils/easings.d.ts +17 -0
  171. package/lib/utils/file.d.ts +1 -0
  172. package/lib/utils/function.d.ts +2 -0
  173. package/lib/utils/index.cjs +1 -0
  174. package/lib/utils/index.d.ts +19 -0
  175. package/lib/utils/index.js +203 -0
  176. package/lib/utils/layout.d.ts +3 -0
  177. package/lib/utils/math.d.ts +11 -0
  178. package/lib/utils/number.d.ts +3 -0
  179. package/lib/utils/object.d.ts +7 -0
  180. package/lib/utils/string.d.ts +5 -0
  181. package/lib/utils/ts-shape.d.ts +19 -0
  182. package/lib/utils/ts-utility.d.ts +19 -0
  183. package/lib/video/index.cjs +1 -0
  184. package/lib/video/index.d.ts +11 -0
  185. package/lib/video/index.js +37 -0
  186. package/package.json +6 -5
  187. package/.github/workflows/publish.yml +0 -20
  188. package/.prettierignore +0 -16
  189. package/.prettierrc +0 -9
  190. package/index.html +0 -32
  191. package/public/vite.svg +0 -1
  192. package/src/packages/animation/Animated.ts +0 -189
  193. package/src/packages/animation/Damped.ts +0 -39
  194. package/src/packages/animation/Tweened.ts +0 -51
  195. package/src/packages/animation/index.ts +0 -10
  196. package/src/packages/attribute/index.ts +0 -59
  197. package/src/packages/canvas-2d/index.ts +0 -137
  198. package/src/packages/controls/Controls.ts +0 -15
  199. package/src/packages/controls/KeyboardControls.ts +0 -63
  200. package/src/packages/controls/LinearControls.ts +0 -27
  201. package/src/packages/controls/User.ts +0 -20
  202. package/src/packages/controls/WheelControls.ts +0 -92
  203. package/src/packages/controls/index.ts +0 -5
  204. package/src/packages/css-unit-parser/index.ts +0 -32
  205. package/src/packages/custom-element/index.ts +0 -19
  206. package/src/packages/device/Device.ts +0 -113
  207. package/src/packages/device/Viewport.ts +0 -67
  208. package/src/packages/device/index.ts +0 -2
  209. package/src/packages/element-constructor/ElementConstructor.ts +0 -577
  210. package/src/packages/element-constructor/htmlTags.ts +0 -679
  211. package/src/packages/element-constructor/index.ts +0 -4
  212. package/src/packages/element-constructor/specialObjects.ts +0 -8
  213. package/src/packages/element-constructor/svgTags.ts +0 -588
  214. package/src/packages/en3/attachments/En3SourceManager.ts +0 -116
  215. package/src/packages/en3/core/en3.ts +0 -306
  216. package/src/packages/en3/index.ts +0 -52
  217. package/src/packages/en3/instances/en3LazyLoader.ts +0 -22
  218. package/src/packages/en3/libs/MeshoptDecoder.js +0 -138
  219. package/src/packages/en3/loaders/en3GLTFLoader.ts +0 -54
  220. package/src/packages/en3/loaders/en3TextureLoader.ts +0 -3
  221. package/src/packages/en3/objects/En3Clip.ts +0 -53
  222. package/src/packages/en3/objects/En3ClipHelpers.ts +0 -12
  223. package/src/packages/en3/objects/En3GLTF.ts +0 -35
  224. package/src/packages/en3/objects/En3Image.ts +0 -18
  225. package/src/packages/en3/objects/En3ImageLike.ts +0 -101
  226. package/src/packages/en3/objects/En3Video.ts +0 -88
  227. package/src/packages/en3/test/En3HTML.ts +0 -55
  228. package/src/packages/en3/test/En3ModifiedMaterial.ts +0 -221
  229. package/src/packages/en3/test/En3Raycaster.ts +0 -187
  230. package/src/packages/en3/utils/coverTexture.ts +0 -29
  231. package/src/packages/en3/utils/dispose.ts +0 -27
  232. package/src/packages/en3/utils/traverseMaterials.ts +0 -10
  233. package/src/packages/en3/utils/traverseMeshes.ts +0 -9
  234. package/src/packages/image/index.ts +0 -19
  235. package/src/packages/intersector/index.ts +0 -83
  236. package/src/packages/ladder/index.ts +0 -112
  237. package/src/packages/layout-box/index.ts +0 -417
  238. package/src/packages/loading/index.ts +0 -131
  239. package/src/packages/measurer/CumulativeOffsetLeft.ts +0 -8
  240. package/src/packages/measurer/CumulativeOffsetTop.ts +0 -8
  241. package/src/packages/measurer/Meaurer.ts +0 -38
  242. package/src/packages/measurer/index.ts +0 -3
  243. package/src/packages/media/index.ts +0 -38
  244. package/src/packages/morph/Link.ts +0 -32
  245. package/src/packages/morph/Morph.ts +0 -246
  246. package/src/packages/morph/index.ts +0 -10
  247. package/src/packages/notifier/index.ts +0 -41
  248. package/src/packages/order/index.ts +0 -14
  249. package/src/packages/resizer/index.ts +0 -55
  250. package/src/packages/router/Link.ts +0 -33
  251. package/src/packages/router/Route.ts +0 -152
  252. package/src/packages/router/RouteElement.ts +0 -34
  253. package/src/packages/router/Router.ts +0 -190
  254. package/src/packages/router/index.ts +0 -13
  255. package/src/packages/scroll/ScrollElement.ts +0 -618
  256. package/src/packages/scroll/ScrollUserElement.ts +0 -21
  257. package/src/packages/scroll/ScrollbarElement.ts +0 -170
  258. package/src/packages/scroll/index.ts +0 -2
  259. package/src/packages/scroll-entries/index.ts +0 -74
  260. package/src/packages/source/SourceClass.ts +0 -77
  261. package/src/packages/source/SourceElement.ts +0 -177
  262. package/src/packages/source/SourceManager.ts +0 -61
  263. package/src/packages/source/SourceSet.ts +0 -52
  264. package/src/packages/source/index.ts +0 -8
  265. package/src/packages/store/Composed.ts +0 -33
  266. package/src/packages/store/Derived.ts +0 -24
  267. package/src/packages/store/DerivedArray.ts +0 -36
  268. package/src/packages/store/Resource.ts +0 -38
  269. package/src/packages/store/Store.ts +0 -144
  270. package/src/packages/store/StoreRegistry.ts +0 -105
  271. package/src/packages/store/index.ts +0 -23
  272. package/src/packages/ticker/index.ts +0 -173
  273. package/src/packages/utils/array.ts +0 -3
  274. package/src/packages/utils/attributes.ts +0 -19
  275. package/src/packages/utils/browser.ts +0 -2
  276. package/src/packages/utils/canvas.ts +0 -46
  277. package/src/packages/utils/collisions.ts +0 -12
  278. package/src/packages/utils/coordinates.ts +0 -40
  279. package/src/packages/utils/decoding.ts +0 -11
  280. package/src/packages/utils/dev.ts +0 -5
  281. package/src/packages/utils/dom.ts +0 -48
  282. package/src/packages/utils/easings.ts +0 -69
  283. package/src/packages/utils/file.ts +0 -17
  284. package/src/packages/utils/function.ts +0 -29
  285. package/src/packages/utils/index.ts +0 -61
  286. package/src/packages/utils/layout.ts +0 -22
  287. package/src/packages/utils/math.ts +0 -74
  288. package/src/packages/utils/number.ts +0 -26
  289. package/src/packages/utils/object.ts +0 -108
  290. package/src/packages/utils/string.ts +0 -49
  291. package/src/packages/utils/ts-shape.ts +0 -25
  292. package/src/packages/utils/ts-utility.ts +0 -47
  293. package/src/packages/video/index.ts +0 -39
  294. package/src/playground/index.ts +0 -0
  295. package/tsconfig.json +0 -31
  296. package/vite.config.ts +0 -78
@@ -0,0 +1,95 @@
1
+ var v = (i, r, s) => {
2
+ if (!r.has(i))
3
+ throw TypeError("Cannot " + s);
4
+ };
5
+ var t = (i, r, s) => (v(i, r, "read from private field"), s ? s.call(i) : r.get(i)), o = (i, r, s) => {
6
+ if (r.has(i))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ r instanceof WeakSet ? r.add(i) : r.set(i, s);
9
+ }, l = (i, r, s, h) => (v(i, r, "write to private field"), h ? h.call(i, s) : r.set(i, s), s);
10
+ var E = (i, r, s) => (v(i, r, "access private method"), s);
11
+ import { S as k } from "../SourceManager-F94MRde6.js";
12
+ import { a as D, b as G } from "../SourceManager-F94MRde6.js";
13
+ import { CustomElement as w } from "../custom-element/index.js";
14
+ import { intersector as A } from "../intersector/index.js";
15
+ import { loading as S } from "../loading/index.js";
16
+ import { Notifier as x } from "../notifier/index.js";
17
+ import "../order/index.js";
18
+ import "../resizer/index.js";
19
+ import "../browser-S4eq8AeN.js";
20
+ import "../function-zwSFehNd.js";
21
+ import "../Store-2hWEUGTj.js";
22
+ let N = 0;
23
+ var n, e, c, m, a, u, p, f, g, y, L;
24
+ class j extends w {
25
+ constructor() {
26
+ super();
27
+ o(this, g);
28
+ o(this, n, null);
29
+ o(this, e, null);
30
+ o(this, c, !1);
31
+ o(this, m, !1);
32
+ o(this, a, !1);
33
+ o(this, u, void 0);
34
+ o(this, p, new x());
35
+ o(this, f, new x());
36
+ o(this, L, (s) => {
37
+ t(this, a) && !t(this, m) && s.isIntersecting && (t(this, n).current && t(this, n).current !== t(this, n).previous && E(this, g, y).call(this, t(this, n).current), l(this, m, !0)), s.isIntersecting ? t(this, p).notify() : t(this, f).notify();
38
+ });
39
+ l(this, u, `source-consumer-${++N}`);
40
+ }
41
+ get consumerElement() {
42
+ return t(this, e);
43
+ }
44
+ get captureEvent() {
45
+ return t(this, p);
46
+ }
47
+ get releaseEvent() {
48
+ return t(this, f);
49
+ }
50
+ connectedCallback() {
51
+ const s = this.getAttribute("srcset");
52
+ s && (l(this, e, this.createConsumer()), t(this, e).style.cssText = `
53
+ display: block;
54
+ width: 100%;
55
+ height: 100%;
56
+ `, t(this, e).classList.add("source-consumer"), Array.from(this.attributes).forEach((h) => {
57
+ if (h.nodeName.startsWith("e-")) {
58
+ const b = h.nodeName.slice(2), d = h.nodeValue || "";
59
+ t(this, e).setAttribute(b, d), t(this, e)[b] = d || !0;
60
+ }
61
+ }), this.appendChild(t(this, e)), l(this, n, new k({
62
+ srcset: s
63
+ })), l(this, a, this.hasAttribute("lazy")), t(this, n).subscribe((h) => {
64
+ (!t(this, a) || t(this, a) && t(this, m)) && E(this, g, y).call(this, h.current);
65
+ }), A.subscribe(this, t(this, L)), t(this, n).connect());
66
+ }
67
+ disconnectedCallback() {
68
+ A.unsubscribe(t(this, L)), t(this, p).close(), t(this, f).close(), t(this, n).close(), t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, e).remove();
69
+ }
70
+ }
71
+ n = new WeakMap(), e = new WeakMap(), c = new WeakMap(), m = new WeakMap(), a = new WeakMap(), u = new WeakMap(), p = new WeakMap(), f = new WeakMap(), g = new WeakSet(), y = function(s) {
72
+ if (t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, s) {
73
+ const h = this.hasAttribute("keep-source-parameters");
74
+ this.classList.remove("loaded"), this.classList.add("loading");
75
+ const b = h ? s.url : s.name + s.extension;
76
+ this.consumeSource(b);
77
+ const d = () => {
78
+ this.classList.remove("error"), this.classList.remove("loading"), this.classList.add("loaded"), !t(this, a) && !t(this, c) && S.setLoaded(t(this, u), 1), l(this, c, !0);
79
+ }, C = () => {
80
+ this.classList.remove("loading"), this.classList.add("error"), !t(this, a) && !t(this, c) && S.setError(t(this, u), b), l(this, c, !0);
81
+ };
82
+ !t(this, a) && !t(this, c) && S.setTotal(t(this, u), 1), t(this, e).onloadeddata = () => {
83
+ d();
84
+ }, t(this, e).onload = () => {
85
+ d();
86
+ }, t(this, e).onerror = C;
87
+ } else
88
+ this.consumeSource(null);
89
+ }, L = new WeakMap();
90
+ export {
91
+ D as Source,
92
+ j as SourceElement,
93
+ k as SourceManager,
94
+ G as SourceSet
95
+ };
@@ -0,0 +1,7 @@
1
+ import { Store, StoreOptions } from './Store';
2
+ export type ComposedCallback<ComposedType> = () => ComposedType;
3
+ export declare class Composed<ComposedType> extends Store<ComposedType> {
4
+ #private;
5
+ constructor(stores: Array<Store<any>>, callback: ComposedCallback<ComposedType>, parameters?: StoreOptions<ComposedType>);
6
+ close(): void;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { Store, StoreOptions } from './Store';
2
+ export type DerivedCallback<StoreType, DerivedType> = (value: StoreType) => DerivedType;
3
+ export declare class Derived<DerivedType, StoreType> extends Store<DerivedType> {
4
+ #private;
5
+ constructor(store: Store<StoreType>, callback: DerivedCallback<StoreType, DerivedType>, parameters?: StoreOptions<DerivedType>);
6
+ close(): void;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { Store, StoreOptions } from './Store';
2
+ export type DerivedArrayCallback<StoreType, DerivedType> = (value: StoreType) => DerivedType;
3
+ export declare class DerivedArray<DerivedType, StoreType extends Array<any> = Array<any>> extends Store<DerivedType[]> {
4
+ #private;
5
+ constructor(store: Store<StoreType>, callback: DerivedArrayCallback<StoreType[number], DerivedType>, parameters?: StoreOptions<DerivedType[]>);
6
+ close(): void;
7
+ }
@@ -0,0 +1,11 @@
1
+ import { Store, StoreOptions } from './Store';
2
+ export type ResourceFetcher<StoreType = unknown> = () => Promise<StoreType>;
3
+ export declare class Resource<StoreType> extends Store<StoreType> {
4
+ #private;
5
+ constructor(defaultValue: StoreType, fetcher: ResourceFetcher<StoreType>, parameters?: StoreOptions<StoreType>);
6
+ get isPending(): Store<boolean, import("./Store").StoreEntry<boolean>>;
7
+ /**
8
+ * Calls fetcher again and sets isPending to true.
9
+ */
10
+ refetch(): void;
11
+ }
@@ -0,0 +1,32 @@
1
+ export interface StoreEntry<StoreType> {
2
+ current: StoreType;
3
+ previous: StoreType | undefined;
4
+ }
5
+ export type StoreCallback<Entry extends StoreEntry<any>> = (entry: Entry) => void;
6
+ export type StoreEqualityCheckCallback<StoreType> = (currentValue: StoreType, newValue: StoreType) => boolean;
7
+ export type StoreValidateCallback<StoreType> = (value: StoreType) => StoreType;
8
+ export interface StorePassport {
9
+ name: string;
10
+ description?: string;
11
+ }
12
+ export interface StoreOptions<StoreType> {
13
+ equalityCheck?: StoreEqualityCheckCallback<StoreType>;
14
+ passport?: StorePassport;
15
+ validate?: StoreValidateCallback<StoreType>;
16
+ }
17
+ export declare class Store<StoreType = unknown, Entry extends StoreEntry<StoreType> = StoreEntry<StoreType>> {
18
+ #private;
19
+ constructor(value: StoreType, options?: StoreOptions<StoreType>);
20
+ get passport(): StorePassport | undefined;
21
+ get initial(): StoreType;
22
+ get previous(): StoreType | undefined;
23
+ get current(): StoreType;
24
+ set current(value: StoreType);
25
+ get subscribers(): Set<StoreCallback<Entry>>;
26
+ get entry(): Entry;
27
+ subscribe(callback: StoreCallback<Entry>): () => void;
28
+ unsubscribe(callback: StoreCallback<Entry>): void;
29
+ reset(): void;
30
+ close(): void;
31
+ }
32
+ export declare const activeStores: Store<Store<any, any>[], StoreEntry<Store<any, any>[]>>;
@@ -0,0 +1,22 @@
1
+ import { Store } from './Store';
2
+ export interface StoreRegistryStateStore {
3
+ name: string;
4
+ value: any;
5
+ }
6
+ export type StoreRegistryState = {
7
+ stores: Array<StoreRegistryStateStore>;
8
+ };
9
+ declare class StoreRegistry {
10
+ #private;
11
+ constructor();
12
+ get projectName(): string | undefined;
13
+ get localStoreRegistryName(): string;
14
+ get loadedState(): StoreRegistryState | null;
15
+ saveState(): void;
16
+ loadState(state?: string | StoreRegistryState | null): void;
17
+ resetState(): void;
18
+ updateStore(store: Store<any, any>): Store<any, any>;
19
+ getState(): StoreRegistryState;
20
+ }
21
+ export declare const storeRegistry: StoreRegistry;
22
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";var g=(r,s,e)=>{if(!s.has(r))throw TypeError("Cannot "+e)};var c=(r,s,e)=>(g(r,s,"read from private field"),e?e.call(r):s.get(r)),h=(r,s,e)=>{if(s.has(r))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(r):s.set(r,e)},a=(r,s,e,t)=>(g(r,s,"write to private field"),t?t.call(r,e):s.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../Store-WXFmsaEI.cjs"),x=require("../function-QP7IreXR.cjs");require("../browser-QbF6EW-w.cjs");var d;class D extends u.Store{constructor(e,t,o){super(null,o);h(this,d,void 0);a(this,d,e.subscribe(i=>{this.current=t(i.current)}))}close(){super.close(),c(this,d).call(this)}}d=new WeakMap;var b;class R extends u.Store{constructor(e,t,o){super(null,o);h(this,b,void 0);a(this,b,e.subscribe(i=>{const l=[];i.current.forEach((y,f)=>{var v;i.current[f]===((v=i.previous)==null?void 0:v[f])&&this.current[f]?l.push(this.current[f]):l.push(t(y))}),this.current=l}))}close(){super.close(),c(this,b).call(this)}}b=new WeakMap;var p,n;class m extends u.Store{constructor(e,t,o){super(e,o);h(this,p,void 0);h(this,n,void 0);a(this,n,new u.Store(!1)),a(this,p,t),this.refetch()}get isPending(){return c(this,n)}refetch(){c(this,n).current=!0,c(this,p).call(this).then(e=>{c(this,n).current=!1,this.current=e})}}p=new WeakMap,n=new WeakMap;var S;class q extends u.Store{constructor(e,t,o){super(null,o);h(this,S,[]);const i=x.debounce(()=>{this.current=t()},0);e.forEach(l=>{c(this,S).push(l.subscribe(()=>{i()}))})}close(){super.close(),c(this,S).forEach(e=>e())}}S=new WeakMap;exports.Store=u.Store;exports.activeStores=u.activeStores;exports.storeRegistry=u.storeRegistry;exports.Composed=q;exports.Derived=D;exports.DerivedArray=R;exports.Resource=m;
@@ -0,0 +1,6 @@
1
+ export { Store, activeStores, type StoreEntry, type StoreCallback, type StorePassport, type StoreOptions, type StoreEqualityCheckCallback, } from './Store';
2
+ export { Derived, type DerivedCallback } from './Derived';
3
+ export { DerivedArray, type DerivedArrayCallback } from './DerivedArray';
4
+ export { Resource, type ResourceFetcher } from './Resource';
5
+ export { Composed, type ComposedCallback } from './Composed';
6
+ export { storeRegistry, type StoreRegistryState, type StoreRegistryStateStore, } from './StoreRegistry';
@@ -0,0 +1,96 @@
1
+ var g = (r, e, s) => {
2
+ if (!e.has(r))
3
+ throw TypeError("Cannot " + s);
4
+ };
5
+ var c = (r, e, s) => (g(r, e, "read from private field"), s ? s.call(r) : e.get(r)), o = (r, e, s) => {
6
+ if (e.has(r))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ e instanceof WeakSet ? e.add(r) : e.set(r, s);
9
+ }, l = (r, e, s, t) => (g(r, e, "write to private field"), t ? t.call(r, s) : e.set(r, s), s);
10
+ import { S as p } from "../Store-2hWEUGTj.js";
11
+ import { a as q, s as z } from "../Store-2hWEUGTj.js";
12
+ import { d as E } from "../function-zwSFehNd.js";
13
+ import "../browser-S4eq8AeN.js";
14
+ var a;
15
+ class R extends p {
16
+ constructor(s, t, u) {
17
+ super(null, u);
18
+ o(this, a, void 0);
19
+ l(this, a, s.subscribe((i) => {
20
+ this.current = t(i.current);
21
+ }));
22
+ }
23
+ close() {
24
+ super.close(), c(this, a).call(this);
25
+ }
26
+ }
27
+ a = new WeakMap();
28
+ var b;
29
+ class w extends p {
30
+ constructor(s, t, u) {
31
+ super(null, u);
32
+ o(this, b, void 0);
33
+ l(this, b, s.subscribe((i) => {
34
+ const h = [];
35
+ i.current.forEach((v, m) => {
36
+ var x;
37
+ i.current[m] === ((x = i.previous) == null ? void 0 : x[m]) && this.current[m] ? h.push(this.current[m]) : h.push(t(v));
38
+ }), this.current = h;
39
+ }));
40
+ }
41
+ close() {
42
+ super.close(), c(this, b).call(this);
43
+ }
44
+ }
45
+ b = new WeakMap();
46
+ var d, n;
47
+ class A extends p {
48
+ constructor(s, t, u) {
49
+ super(s, u);
50
+ o(this, d, void 0);
51
+ o(this, n, void 0);
52
+ l(this, n, new p(!1)), l(this, d, t), this.refetch();
53
+ }
54
+ get isPending() {
55
+ return c(this, n);
56
+ }
57
+ /**
58
+ * Calls fetcher again and sets isPending to true.
59
+ */
60
+ refetch() {
61
+ c(this, n).current = !0, c(this, d).call(this).then((s) => {
62
+ c(this, n).current = !1, this.current = s;
63
+ });
64
+ }
65
+ }
66
+ d = new WeakMap(), n = new WeakMap();
67
+ var f;
68
+ class C extends p {
69
+ constructor(s, t, u) {
70
+ super(null, u);
71
+ o(this, f, []);
72
+ const i = E(() => {
73
+ this.current = t();
74
+ }, 0);
75
+ s.forEach((h) => {
76
+ c(this, f).push(
77
+ h.subscribe(() => {
78
+ i();
79
+ })
80
+ );
81
+ });
82
+ }
83
+ close() {
84
+ super.close(), c(this, f).forEach((s) => s());
85
+ }
86
+ }
87
+ f = new WeakMap();
88
+ export {
89
+ C as Composed,
90
+ R as Derived,
91
+ w as DerivedArray,
92
+ A as Resource,
93
+ p as Store,
94
+ q as activeStores,
95
+ z as storeRegistry
96
+ };
@@ -0,0 +1,31 @@
1
+ function n(e, s = !1) {
2
+ let t = "";
3
+ return e.split("-").forEach((a, o) => {
4
+ if (o === 0 && !s)
5
+ t += a;
6
+ else {
7
+ const c = a[0], r = a.slice(1), i = c.toUpperCase() + r;
8
+ t += i;
9
+ }
10
+ }), t;
11
+ }
12
+ function l(e) {
13
+ return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
14
+ }
15
+ function p(e) {
16
+ return e.split("_").join(".");
17
+ }
18
+ function f(e) {
19
+ return /^[a-z\d]+$/i.test(e) ? e.charAt(0).toUpperCase() + e.slice(1) : e.replace(/([a-z\d])([a-z\d]*)/gi, (s, t, a) => t.toUpperCase() + a.toLowerCase()).replace(/[^a-z\d]/gi, "");
20
+ }
21
+ function u(e, s = !1) {
22
+ const t = (a) => a.slice(0, 1).toUpperCase() + a.slice(1);
23
+ return s ? e.split(" ").map((a) => t(a)).join(" ") : t(e);
24
+ }
25
+ export {
26
+ u as a,
27
+ l as c,
28
+ n as k,
29
+ p as s,
30
+ f as t
31
+ };
@@ -0,0 +1 @@
1
+ "use strict";function r(e,o=!1){let t="";return e.split("-").forEach((a,c)=>{if(c===0&&!o)t+=a;else{const s=a[0],i=a.slice(1),l=s.toUpperCase()+i;t+=l}}),t}function n(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function p(e){return e.split("_").join(".")}function u(e){return/^[a-z\d]+$/i.test(e)?e.charAt(0).toUpperCase()+e.slice(1):e.replace(/([a-z\d])([a-z\d]*)/gi,(o,t,a)=>t.toUpperCase()+a.toLowerCase()).replace(/[^a-z\d]/gi,"")}function f(e,o=!1){const t=a=>a.slice(0,1).toUpperCase()+a.slice(1);return o?e.split(" ").map(a=>t(a)).join(" "):t(e)}exports.camelToKebab=n;exports.capitalize=f;exports.kebabToCamel=r;exports.snakeToDotted=p;exports.toPascalCase=u;
@@ -0,0 +1 @@
1
+ "use strict";var B=(r,e,s)=>{if(!e.has(r))throw TypeError("Cannot "+s)};var i=(r,e,s)=>(B(r,e,"read from private field"),s?s.call(r):e.get(r)),h=(r,e,s)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,s)},t=(r,e,s,n)=>(B(r,e,"write to private field"),n?n.call(r,s):e.set(r,s),s);var q=(r,e,s)=>(B(r,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../intersector/index.cjs"),g=require("../browser-QbF6EW-w.cjs");var d,u,y,b,l,o,k;class M{constructor(e,s){h(this,d,void 0);h(this,u,void 0);h(this,y,void 0);h(this,b,0);h(this,l,0);h(this,o,!1);h(this,k,e=>{t(this,o,e.isIntersecting)});t(this,d,e),t(this,u,s==null?void 0:s.maxFPS),t(this,y,(s==null?void 0:s.order)||0),s!=null&&s.culling&&g.isBrowser?S.intersector.subscribe(s.culling,i(this,k)):t(this,o,!0)}get callback(){return i(this,d)}get order(){return i(this,y)}sync(e){t(this,b,e-i(this,l))}tick(e){if(t(this,l,Math.max(0,e-i(this,b))),i(this,u))if(i(this,l)>=1e3/i(this,u))t(this,b,e-i(this,l)%i(this,u));else return;else t(this,b,e);i(this,o)&&i(this,d).call(this,{elapsed:i(this,l),timestamp:e})}destroy(){S.intersector.unsubscribe(i(this,k))}}d=new WeakMap,u=new WeakMap,y=new WeakMap,b=new WeakMap,l=new WeakMap,o=new WeakMap,k=new WeakMap;var w,f,a,m,c,A,E,F,L,v,T;class x{constructor(){h(this,A);h(this,F);h(this,w,0);h(this,f,0);h(this,a,void 0);h(this,m,!1);h(this,c,[]);h(this,v,e=>{if(i(this,m)){t(this,m,!1),t(this,w,e-i(this,f));for(const s of i(this,c))s.sync(i(this,f))}t(this,a,requestAnimationFrame(i(this,v))),t(this,f,e-i(this,w));for(const s of i(this,c))s.tick(i(this,f))});h(this,T,()=>{document.hidden&&t(this,m,!0)});g.isBrowser&&document.addEventListener("visibilitychange",i(this,T))}subscribe(e,s){if(g.isBrowser){if(!i(this,c).find(n=>n.callback===e)){const n=new M(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((P,I)=>P.order-I.order))}q(this,A,E).call(this)}}unsubscribe(e){if(!g.isBrowser)return;const s=i(this,c).filter(n=>n.callback===e);s.length&&(s.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==e)),i(this,c).length||q(this,F,L).call(this))}destroy(){g.isBrowser&&(q(this,F,L).call(this),document.removeEventListener("visibilitychange",i(this,T)))}}w=new WeakMap,f=new WeakMap,a=new WeakMap,m=new WeakMap,c=new WeakMap,A=new WeakSet,E=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,v)))},F=new WeakSet,L=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},v=new WeakMap,T=new WeakMap;const V=new x;exports.Ticker=x;exports.ticker=V;
@@ -0,0 +1,19 @@
1
+ import { ElementOrSelector } from '../utils';
2
+ export interface TickerCallbackEntry {
3
+ timestamp: number;
4
+ elapsed: number;
5
+ }
6
+ export type TickerCallback = (entry: TickerCallbackEntry) => void;
7
+ export interface TickerAddOptions {
8
+ maxFPS?: number;
9
+ order?: number;
10
+ culling?: ElementOrSelector;
11
+ }
12
+ export declare class Ticker {
13
+ #private;
14
+ constructor();
15
+ subscribe(callback: TickerCallback, options?: TickerAddOptions): void;
16
+ unsubscribe(callback: TickerCallback): void;
17
+ destroy(): void;
18
+ }
19
+ export declare const ticker: Ticker;
@@ -0,0 +1,107 @@
1
+ var T = (r, s, t) => {
2
+ if (!s.has(r))
3
+ throw TypeError("Cannot " + t);
4
+ };
5
+ var i = (r, s, t) => (T(r, s, "read from private field"), t ? t.call(r) : s.get(r)), h = (r, s, t) => {
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, t);
9
+ }, e = (r, s, t, n) => (T(r, s, "write to private field"), n ? n.call(r, t) : s.set(r, t), t);
10
+ var w = (r, s, t) => (T(r, s, "access private method"), t);
11
+ import { intersector as E } from "../intersector/index.js";
12
+ import { i as g } from "../browser-S4eq8AeN.js";
13
+ var m, u, y, f, l, d, F;
14
+ class V {
15
+ constructor(s, t) {
16
+ h(this, m, void 0);
17
+ h(this, u, void 0);
18
+ h(this, y, void 0);
19
+ h(this, f, 0);
20
+ h(this, l, 0);
21
+ h(this, d, !1);
22
+ h(this, F, (s) => {
23
+ e(this, d, s.isIntersecting);
24
+ });
25
+ e(this, m, s), e(this, u, t == null ? void 0 : t.maxFPS), e(this, y, (t == null ? void 0 : t.order) || 0), t != null && t.culling && g ? E.subscribe(t.culling, i(this, F)) : e(this, d, !0);
26
+ }
27
+ get callback() {
28
+ return i(this, m);
29
+ }
30
+ get order() {
31
+ return i(this, y);
32
+ }
33
+ sync(s) {
34
+ e(this, f, s - i(this, l));
35
+ }
36
+ tick(s) {
37
+ if (e(this, l, Math.max(0, s - i(this, f))), i(this, u))
38
+ if (i(this, l) >= 1e3 / i(this, u))
39
+ e(this, f, s - i(this, l) % i(this, u));
40
+ else
41
+ return;
42
+ else
43
+ e(this, f, s);
44
+ i(this, d) && i(this, m).call(this, {
45
+ elapsed: i(this, l),
46
+ timestamp: s
47
+ });
48
+ }
49
+ destroy() {
50
+ E.unsubscribe(i(this, F));
51
+ }
52
+ }
53
+ m = new WeakMap(), u = new WeakMap(), y = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), F = new WeakMap();
54
+ var k, b, a, o, c, x, S, v, q, A, L;
55
+ class B {
56
+ constructor() {
57
+ h(this, x);
58
+ h(this, v);
59
+ h(this, k, 0);
60
+ h(this, b, 0);
61
+ h(this, a, void 0);
62
+ h(this, o, !1);
63
+ h(this, c, []);
64
+ h(this, A, (s) => {
65
+ if (i(this, o)) {
66
+ e(this, o, !1), e(this, k, s - i(this, b));
67
+ for (const t of i(this, c))
68
+ t.sync(i(this, b));
69
+ }
70
+ e(this, a, requestAnimationFrame(i(this, A))), e(this, b, s - i(this, k));
71
+ for (const t of i(this, c))
72
+ t.tick(i(this, b));
73
+ });
74
+ h(this, L, () => {
75
+ document.hidden && e(this, o, !0);
76
+ });
77
+ g && document.addEventListener("visibilitychange", i(this, L));
78
+ }
79
+ subscribe(s, t) {
80
+ if (g) {
81
+ if (!i(this, c).find((n) => n.callback === s)) {
82
+ const n = new V(s, t);
83
+ n.sync(performance.now()), i(this, c).push(n), e(this, c, i(this, c).sort((I, P) => I.order - P.order));
84
+ }
85
+ w(this, x, S).call(this);
86
+ }
87
+ }
88
+ unsubscribe(s) {
89
+ if (!g)
90
+ return;
91
+ const t = i(this, c).filter((n) => n.callback === s);
92
+ t.length && (t.forEach((n) => n.destroy()), e(this, c, i(this, c).filter((n) => n.callback !== s)), i(this, c).length || w(this, v, q).call(this));
93
+ }
94
+ destroy() {
95
+ g && (w(this, v, q).call(this), document.removeEventListener("visibilitychange", i(this, L)));
96
+ }
97
+ }
98
+ k = new WeakMap(), b = new WeakMap(), a = new WeakMap(), o = new WeakMap(), c = new WeakMap(), x = new WeakSet(), S = function() {
99
+ i(this, c).length && !i(this, a) && e(this, a, requestAnimationFrame(i(this, A)));
100
+ }, v = new WeakSet(), q = function() {
101
+ i(this, a) && (cancelAnimationFrame(i(this, a)), e(this, a, void 0));
102
+ }, A = new WeakMap(), L = new WeakMap();
103
+ const M = new B();
104
+ export {
105
+ B as Ticker,
106
+ M as ticker
107
+ };
@@ -0,0 +1 @@
1
+ export declare function insert(arr: Array<any>, index: number, ...newItems: any[]): any[];
@@ -0,0 +1,2 @@
1
+ export declare function parseAttribute(element: HTMLElement, attributeName: string): string | number | boolean | null;
2
+ export declare function parseAttributeValue(value: string | null | undefined): string | number | boolean | null;
@@ -0,0 +1 @@
1
+ export declare const isBrowser: boolean;
@@ -0,0 +1,6 @@
1
+ export declare function measureText(context: CanvasRenderingContext2D, text: string): {
2
+ height: number;
3
+ width: number;
4
+ };
5
+ export declare function fixPosition(position: number): number;
6
+ export declare function cover(contentWidth: number, contentHeight: number, containerWidth: number, containerHeight: number, offsetLeft?: number, offsetTop?: number): readonly [number, number, number, number];
@@ -0,0 +1,3 @@
1
+ import { Circle, Dot2D, Rect2D } from './ts-shape.js';
2
+ export declare function dotRectCollision(dot: Dot2D, rect: Rect2D): boolean;
3
+ export declare function dotCircleCollision(dot: Dot2D, circle: Circle): boolean;
@@ -0,0 +1,13 @@
1
+ import { Dot2D, Rect2D } from './ts-shape.js';
2
+ export declare function screenToCartesian(screenCoordinate: Dot2D, container: Pick<Rect2D, 'width' | 'height'>, normalize?: boolean): {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ export declare function normalize(coordinate: Dot2D, size: Dot2D): {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ export declare function getPointerPosition(event: MouseEvent | PointerEvent | Dot2D, rect?: Rect2D): {
11
+ x: number;
12
+ y: number;
13
+ };
@@ -0,0 +1,2 @@
1
+ export declare function encode(string: string): string;
2
+ export declare function decode(string: string): string;
@@ -0,0 +1,3 @@
1
+ export declare function resizeInterval({ ms }?: {
2
+ ms?: number | undefined;
3
+ }): void;
@@ -0,0 +1,4 @@
1
+ export declare function findParentElement<T extends typeof Element>(element: Element | null, Constructor: T): T | null;
2
+ export type ElementOrSelector<T extends HTMLElement = HTMLElement> = string | T;
3
+ export declare function getElement<T extends HTMLElement>(elementOrSelector: ElementOrSelector<T>, from?: Document): T | null;
4
+ export declare function findScrollParentElement(node: Node | null, _initial?: Node | null): HTMLElement;
@@ -0,0 +1,17 @@
1
+ export type EasingFunction = (t: number) => number;
2
+ export declare const linear: EasingFunction;
3
+ export declare const easeInQuad: EasingFunction;
4
+ export declare const easeOutQuad: EasingFunction;
5
+ export declare const easeInOutQuad: EasingFunction;
6
+ export declare const easeInCubic: EasingFunction;
7
+ export declare const easeOutCubic: EasingFunction;
8
+ export declare const easeInOutCubic: EasingFunction;
9
+ export declare const easeInQuart: EasingFunction;
10
+ export declare const easeOutQuart: EasingFunction;
11
+ export declare const easeInOutQuart: EasingFunction;
12
+ export declare const easeInQuint: EasingFunction;
13
+ export declare const easeOutQuint: EasingFunction;
14
+ export declare const easeInOutQuint: EasingFunction;
15
+ export declare const easeInExpo: EasingFunction;
16
+ export declare const easeOutExpo: EasingFunction;
17
+ export declare const easeInOutExpo: EasingFunction;
@@ -0,0 +1 @@
1
+ export declare function createJSONAndSave(filename: string, dataObjToWrite: object): void;
@@ -0,0 +1,2 @@
1
+ export declare const debounce: <F extends (...args: Parameters<F>) => ReturnType<F>>(callback: F, delay?: number) => (...args: Parameters<F>) => void;
2
+ export declare const throttle: <F extends (...args: Parameters<F>) => ReturnType<F>>(callback: F, delay?: number) => (...args: Parameters<F>) => void;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-_2U65GDl.cjs"),v=require("../browser-QbF6EW-w.cjs"),p=require("../dom-QhWsdQS2.cjs"),s=require("../easings-_wFs9ZWc.cjs"),O=require("../function-QP7IreXR.cjs"),m=require("../layout-rZzbsLPd.cjs"),r=require("../math-FNUBmQPK.cjs"),y=require("../number-2bR0KBcX.cjs"),o=require("../string-WmNOGq16.cjs");function E(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Q(e,t){const n=e.measureText(t),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,a=n.width;return{height:i,width:a}}function P(e){return Math.floor(e)+.5}function A(e,t,n,i,a,u){let d=e/t,C=n/i,c=0,l=0;return a=typeof a=="undefined"?.5:a,u=typeof u=="undefined"?.5:u,d>C?(c=i,l=i*d):(l=n,c=n/d),[(n-l)*a,(i-c)*u,l,c]}function T(e,t){return e.x<t.x+t.width&&e.x>t.x&&e.y<t.y+t.height&&e.y>t.y}function k(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)<t.radius}function D(e,t,n=!1){let i=e.x-t.width/2,a=t.height/2-e.y;return n&&(i=i/(t.width/2),a=a/(t.height/2)),{x:i,y:a}}function R(e,t){const n=e.x/t.x,i=e.y/t.y;return{x:n,y:i}}function S(e,t){return t=t||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(e.x-t.x)/t.width*t.width,y:(e.y-t.y)/t.height*t.height}}function q(e){const t=window.atob(e);return decodeURIComponent(window.escape(t))}function b(e){const t=window.unescape(encodeURIComponent(e));return window.btoa(t)}function B({ms:e=200}={}){setInterval(()=>{window.dispatchEvent(new Event("resize"))},e)}function N(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=document.createElement("a");i.download=e+".json",i.href=window.URL.createObjectURL(n),i.dataset.downloadurl=["application/json",i.download,i.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});i.dispatchEvent(a),i.remove()}function w(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function g(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Node)return e;const t=Array.isArray(e)?[]:{};for(const n in e)e.hasOwnProperty(n)&&(t[n]=g(e[n]));return t}function x(e,t,n=w){for(const i in t)n(t[i])?(e[i]||Object.assign(e,{[i]:{}}),x(e[i],t[i],n)):Object.assign(e,{[i]:t[i]});return e}function I(e){return e===null||typeof e=="undefined"}function f(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(n=>I(n)))return e===t;if(Array.isArray(e)){const n=e.length>t.length?e:t,i=e.length>t.length?t:e;return n.every((a,u)=>f(a,i[u]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(typeof e[n]=="object"&&typeof t[n]=="object"){if(!f(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1}return!0}function z(e,t){const n={};for(const i in e)t.includes(i)&&(n[i]=e[i]);return n}function M(e,t){const n={};for(const i in e)t.includes(i)||(n[i]=e[i]);return n}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=v.isBrowser;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getElement=p.getElement;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.debounce=O.debounce;exports.throttle=O.throttle;exports.getCumulativeOffsetLeft=m.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=m.getCumulativeOffsetTop;exports.getCumulativePosition=m.getCumulativePosition;exports.calculateDistance=r.calculateDistance;exports.calculateDistanceWithRadius=r.calculateDistanceWithRadius;exports.clamp=r.clamp;exports.damp=r.damp;exports.lerp=r.lerp;exports.mapRange=r.mapRange;exports.round=r.round;exports.smootherstep=r.smootherstep;exports.smoothstep=r.smoothstep;exports.step=r.step;exports.fix=y.fix;exports.generateId=y.generateId;exports.roundTo=y.roundTo;exports.camelToKebab=o.camelToKebab;exports.capitalize=o.capitalize;exports.kebabToCamel=o.kebabToCamel;exports.snakeToDotted=o.snakeToDotted;exports.toPascalCase=o.toPascalCase;exports.cloneDeep=g;exports.compareObjects=f;exports.cover=A;exports.createJSONAndSave=N;exports.decode=b;exports.dotCircleCollision=k;exports.dotRectCollision=T;exports.encode=q;exports.fixPosition=P;exports.getPointerPosition=S;exports.insert=E;exports.isNullish=I;exports.isObject=w;exports.measureText=Q;exports.mergeDeep=x;exports.normalize=R;exports.omit=M;exports.pick=z;exports.resizeInterval=B;exports.screenToCartesian=D;
@@ -0,0 +1,19 @@
1
+ export { insert } from './array';
2
+ export { parseAttribute, parseAttributeValue } from './attributes';
3
+ export { isBrowser } from './browser';
4
+ export { measureText, fixPosition, cover } from './canvas';
5
+ export { dotRectCollision, dotCircleCollision } from './collisions';
6
+ export { screenToCartesian, normalize, getPointerPosition } from './coordinates';
7
+ export { encode, decode } from './decoding';
8
+ export { resizeInterval } from './dev';
9
+ export { findParentElement, getElement, findScrollParentElement, type ElementOrSelector, } from './dom';
10
+ export { linear, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, easeInQuint, easeOutQuint, easeInOutQuint, easeInExpo, easeOutExpo, easeInOutExpo, type EasingFunction, } from './easings';
11
+ export { createJSONAndSave } from './file';
12
+ export { debounce, throttle } from './function';
13
+ export { getCumulativePosition, getCumulativeOffsetLeft, getCumulativeOffsetTop } from './layout';
14
+ export { lerp, damp, step, round, clamp, mapRange, smoothstep, smootherstep, calculateDistance, calculateDistanceWithRadius, } from './math';
15
+ export { fix, roundTo, generateId } from './number';
16
+ export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit } from './object';
17
+ export { kebabToCamel, camelToKebab, snakeToDotted, toPascalCase, capitalize } from './string';
18
+ export type { Axes2D, Axes3D, Dot2D, Rect2D, Circle, Dot3D, Rect3D } from './ts-shape';
19
+ export type { NestedKeys, NestedValueOf, DeepOmit, DeepPartial, Requiredish, WithRequired, Split, } from './ts-utility';