aptechka 0.1.1 → 0.1.3

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 (300) hide show
  1. package/lib/Damped-DdPj4Sho.cjs +1 -0
  2. package/lib/Damped-H3PuZwKV.js +152 -0
  3. package/lib/SourceManager-tmQlXkSD.cjs +1 -0
  4. package/lib/SourceManager-vXInLlh_.js +108 -0
  5. package/lib/Store-qq7IjRLE.js +136 -0
  6. package/lib/Store-txkR3wXU.cjs +1 -0
  7. package/lib/WheelControls-9ZQKSYYq.js +83 -0
  8. package/lib/WheelControls-TYhGU6oA.cjs +1 -0
  9. package/lib/accordion/AccordionElement.d.ts +7 -0
  10. package/lib/accordion/index.d.ts +1 -0
  11. package/lib/animation/Animated.d.ts +41 -0
  12. package/lib/animation/Damped.d.ts +11 -0
  13. package/lib/animation/Tweened.d.ts +16 -0
  14. package/lib/animation/index.cjs +1 -0
  15. package/lib/animation/index.d.ts +3 -0
  16. package/lib/animation/index.js +56 -0
  17. package/lib/attribute/index.cjs +1 -0
  18. package/lib/attribute/index.d.ts +8 -0
  19. package/lib/attribute/index.js +47 -0
  20. package/lib/attributes-_2U65GDl.cjs +1 -0
  21. package/lib/attributes-w0u-KiIb.js +10 -0
  22. package/lib/browser-QbF6EW-w.cjs +1 -0
  23. package/lib/browser-S4eq8AeN.js +4 -0
  24. package/lib/canvas-2d/index.cjs +5 -0
  25. package/lib/canvas-2d/index.d.ts +30 -0
  26. package/lib/canvas-2d/index.js +90 -0
  27. package/lib/controls/Controls.d.ts +9 -0
  28. package/lib/controls/KeyboardControls.d.ts +10 -0
  29. package/lib/controls/LinearControls.d.ts +11 -0
  30. package/lib/controls/WheelControls.d.ts +17 -0
  31. package/lib/controls/index.cjs +1 -0
  32. package/lib/controls/index.d.ts +4 -0
  33. package/lib/controls/index.js +42 -0
  34. package/lib/css-unit-parser/index.cjs +8 -0
  35. package/lib/css-unit-parser/index.d.ts +6 -0
  36. package/lib/css-unit-parser/index.js +36 -0
  37. package/lib/custom-element/index.cjs +1 -0
  38. package/lib/custom-element/index.d.ts +8 -0
  39. package/lib/custom-element/index.js +16 -0
  40. package/lib/device/Device.d.ts +17 -0
  41. package/lib/device/Viewport.d.ts +27 -0
  42. package/lib/device/index.cjs +1 -0
  43. package/lib/device/index.d.ts +2 -0
  44. package/lib/device/index.js +123 -0
  45. package/lib/dom-QhWsdQS2.cjs +1 -0
  46. package/lib/dom-bHEwc_xV.js +24 -0
  47. package/lib/easings-_wFs9ZWc.cjs +1 -0
  48. package/lib/easings-uF-tgahf.js +19 -0
  49. package/lib/element-constructor/ElementConstructor.d.ts +76 -0
  50. package/lib/element-constructor/htmlTags.d.ts +113 -0
  51. package/lib/element-constructor/index.cjs +1 -0
  52. package/lib/element-constructor/index.d.ts +4 -0
  53. package/lib/element-constructor/index.js +1390 -0
  54. package/lib/element-constructor/specialObjects.d.ts +2 -0
  55. package/lib/element-constructor/svgTags.d.ts +64 -0
  56. package/lib/en3/attachments/En3SourceManager.d.ts +30 -0
  57. package/lib/en3/core/en3.d.ts +55 -0
  58. package/lib/en3/index.cjs +28 -0
  59. package/lib/en3/index.d.ts +18 -0
  60. package/lib/en3/index.js +3249 -0
  61. package/lib/en3/instances/en3LazyLoader.d.ts +7 -0
  62. package/lib/en3/libs/MeshoptDecoder.d.ts +1 -0
  63. package/lib/en3/loaders/en3GLTFLoader.d.ts +16 -0
  64. package/lib/en3/loaders/en3TextureLoader.d.ts +2 -0
  65. package/lib/en3/objects/En3Clip.d.ts +10 -0
  66. package/lib/en3/objects/En3ClipHelpers.d.ts +5 -0
  67. package/lib/en3/objects/En3GLTF.d.ts +9 -0
  68. package/lib/en3/objects/En3Image.d.ts +7 -0
  69. package/lib/en3/objects/En3ImageLike.d.ts +22 -0
  70. package/{src/packages/en3/objects/En3SourceConsumer.ts → lib/en3/objects/En3SourceConsumer.d.ts} +2 -3
  71. package/lib/en3/objects/En3Video.d.ts +12 -0
  72. package/lib/en3/test/En3HTML.d.ts +9 -0
  73. package/lib/en3/test/En3ModifiedMaterial.d.ts +32 -0
  74. package/lib/en3/test/En3Raycaster.d.ts +19 -0
  75. package/lib/en3/utils/coverTexture.d.ts +6 -0
  76. package/lib/en3/utils/dispose.d.ts +2 -0
  77. package/lib/en3/utils/traverseMaterials.d.ts +2 -0
  78. package/lib/en3/utils/traverseMeshes.d.ts +2 -0
  79. package/lib/function-QP7IreXR.cjs +1 -0
  80. package/lib/function-zwSFehNd.js +17 -0
  81. package/lib/image/index.cjs +1 -0
  82. package/lib/image/index.d.ts +10 -0
  83. package/lib/image/index.js +30 -0
  84. package/lib/intersector/index.cjs +1 -0
  85. package/lib/intersector/index.d.ts +8 -0
  86. package/lib/intersector/index.js +55 -0
  87. package/lib/ladder/index.cjs +1 -0
  88. package/lib/ladder/index.d.ts +21 -0
  89. package/lib/ladder/index.js +97 -0
  90. package/lib/layout-5SJlcXTY.js +12 -0
  91. package/lib/layout-box/index.cjs +1 -0
  92. package/lib/layout-box/index.d.ts +78 -0
  93. package/lib/layout-box/index.js +235 -0
  94. package/lib/layout-rZzbsLPd.cjs +1 -0
  95. package/lib/loading/index.cjs +1 -0
  96. package/lib/loading/index.d.ts +38 -0
  97. package/lib/loading/index.js +99 -0
  98. package/lib/math-FNUBmQPK.cjs +1 -0
  99. package/lib/math-_a3IpKOc.js +45 -0
  100. package/lib/measurer/CumulativeOffsetLeft.d.ts +4 -0
  101. package/lib/measurer/CumulativeOffsetTop.d.ts +4 -0
  102. package/lib/measurer/Meaurer.d.ts +8 -0
  103. package/lib/measurer/index.cjs +1 -0
  104. package/lib/measurer/index.d.ts +3 -0
  105. package/lib/measurer/index.js +48 -0
  106. package/lib/media/index.cjs +1 -0
  107. package/lib/media/index.d.ts +11 -0
  108. package/lib/media/index.js +33 -0
  109. package/lib/morph/Link.d.ts +6 -0
  110. package/lib/morph/Morph.d.ts +26 -0
  111. package/lib/morph/index.cjs +1 -0
  112. package/lib/morph/index.d.ts +1 -0
  113. package/lib/morph/index.js +182 -0
  114. package/lib/notifier/index.cjs +1 -0
  115. package/lib/notifier/index.d.ts +8 -0
  116. package/lib/notifier/index.js +38 -0
  117. package/lib/number-2bR0KBcX.cjs +1 -0
  118. package/lib/number-bCHB2GAD.js +31 -0
  119. package/lib/order/index.cjs +1 -0
  120. package/lib/order/index.d.ts +13 -0
  121. package/lib/order/index.js +5 -0
  122. package/lib/resizer/index.cjs +1 -0
  123. package/lib/resizer/index.d.ts +10 -0
  124. package/lib/resizer/index.js +45 -0
  125. package/lib/router/Link.d.ts +6 -0
  126. package/lib/router/Route.d.ts +15 -0
  127. package/lib/router/RouteElement.d.ts +14 -0
  128. package/lib/router/Router.d.ts +33 -0
  129. package/lib/router/index.cjs +1 -0
  130. package/lib/router/index.d.ts +3 -0
  131. package/lib/router/index.js +266 -0
  132. package/lib/scroll/ScrollElement.d.ts +40 -0
  133. package/lib/scroll/ScrollUserElement.d.ts +7 -0
  134. package/lib/scroll/ScrollbarElement.d.ts +13 -0
  135. package/lib/scroll/index.cjs +71 -0
  136. package/lib/scroll/index.d.ts +2 -0
  137. package/lib/scroll/index.js +444 -0
  138. package/lib/scroll-entries/index.cjs +1 -0
  139. package/lib/scroll-entries/index.d.ts +17 -0
  140. package/lib/scroll-entries/index.js +56 -0
  141. package/lib/source/SourceClass.d.ts +11 -0
  142. package/lib/source/SourceElement.d.ts +16 -0
  143. package/lib/source/SourceManager.d.ts +13 -0
  144. package/lib/source/SourceSet.d.ts +8 -0
  145. package/lib/source/index.cjs +5 -0
  146. package/lib/source/index.d.ts +4 -0
  147. package/lib/source/index.js +95 -0
  148. package/lib/store/Composed.d.ts +7 -0
  149. package/lib/store/CumulativeResource.d.ts +12 -0
  150. package/lib/store/Derived.d.ts +7 -0
  151. package/lib/store/DerivedArray.d.ts +7 -0
  152. package/lib/store/Resource.d.ts +14 -0
  153. package/lib/store/Store.d.ts +33 -0
  154. package/lib/store/StoreRegistry.d.ts +22 -0
  155. package/lib/store/index.cjs +1 -0
  156. package/lib/store/index.d.ts +6 -0
  157. package/lib/store/index.js +99 -0
  158. package/lib/string-GmxZA5Nq.js +31 -0
  159. package/lib/string-WmNOGq16.cjs +1 -0
  160. package/lib/studio/StudioElement.d.ts +9 -0
  161. package/lib/studio/index.d.ts +1 -0
  162. package/lib/ticker/index.cjs +1 -0
  163. package/lib/ticker/index.d.ts +19 -0
  164. package/lib/ticker/index.js +107 -0
  165. package/lib/utils/array.d.ts +1 -0
  166. package/lib/utils/attributes.d.ts +2 -0
  167. package/lib/utils/browser.d.ts +1 -0
  168. package/lib/utils/canvas.d.ts +6 -0
  169. package/lib/utils/collisions.d.ts +3 -0
  170. package/lib/utils/coordinates.d.ts +13 -0
  171. package/lib/utils/decoding.d.ts +2 -0
  172. package/lib/utils/dev.d.ts +3 -0
  173. package/lib/utils/dom.d.ts +4 -0
  174. package/lib/utils/easings.d.ts +17 -0
  175. package/lib/utils/file.d.ts +1 -0
  176. package/lib/utils/function.d.ts +2 -0
  177. package/lib/utils/index.cjs +1 -0
  178. package/lib/utils/index.d.ts +19 -0
  179. package/lib/utils/index.js +203 -0
  180. package/lib/utils/layout.d.ts +3 -0
  181. package/lib/utils/math.d.ts +11 -0
  182. package/lib/utils/number.d.ts +3 -0
  183. package/lib/utils/object.d.ts +7 -0
  184. package/lib/utils/string.d.ts +5 -0
  185. package/lib/utils/ts-shape.d.ts +19 -0
  186. package/lib/utils/ts-utility.d.ts +19 -0
  187. package/lib/video/index.cjs +1 -0
  188. package/lib/video/index.d.ts +11 -0
  189. package/lib/video/index.js +37 -0
  190. package/package.json +7 -7
  191. package/.github/workflows/publish.yml +0 -20
  192. package/.prettierignore +0 -16
  193. package/.prettierrc +0 -9
  194. package/index.html +0 -32
  195. package/public/vite.svg +0 -1
  196. package/src/packages/animation/Animated.ts +0 -189
  197. package/src/packages/animation/Damped.ts +0 -39
  198. package/src/packages/animation/Tweened.ts +0 -51
  199. package/src/packages/animation/index.ts +0 -10
  200. package/src/packages/attribute/index.ts +0 -59
  201. package/src/packages/canvas-2d/index.ts +0 -137
  202. package/src/packages/controls/Controls.ts +0 -15
  203. package/src/packages/controls/KeyboardControls.ts +0 -63
  204. package/src/packages/controls/LinearControls.ts +0 -27
  205. package/src/packages/controls/User.ts +0 -20
  206. package/src/packages/controls/WheelControls.ts +0 -92
  207. package/src/packages/controls/index.ts +0 -5
  208. package/src/packages/css-unit-parser/index.ts +0 -32
  209. package/src/packages/custom-element/index.ts +0 -19
  210. package/src/packages/device/Device.ts +0 -113
  211. package/src/packages/device/Viewport.ts +0 -67
  212. package/src/packages/device/index.ts +0 -2
  213. package/src/packages/element-constructor/ElementConstructor.ts +0 -577
  214. package/src/packages/element-constructor/htmlTags.ts +0 -679
  215. package/src/packages/element-constructor/index.ts +0 -4
  216. package/src/packages/element-constructor/specialObjects.ts +0 -8
  217. package/src/packages/element-constructor/svgTags.ts +0 -588
  218. package/src/packages/en3/attachments/En3SourceManager.ts +0 -116
  219. package/src/packages/en3/core/en3.ts +0 -306
  220. package/src/packages/en3/index.ts +0 -52
  221. package/src/packages/en3/instances/en3LazyLoader.ts +0 -22
  222. package/src/packages/en3/libs/MeshoptDecoder.js +0 -138
  223. package/src/packages/en3/loaders/en3GLTFLoader.ts +0 -54
  224. package/src/packages/en3/loaders/en3TextureLoader.ts +0 -3
  225. package/src/packages/en3/objects/En3Clip.ts +0 -53
  226. package/src/packages/en3/objects/En3ClipHelpers.ts +0 -12
  227. package/src/packages/en3/objects/En3GLTF.ts +0 -35
  228. package/src/packages/en3/objects/En3Image.ts +0 -18
  229. package/src/packages/en3/objects/En3ImageLike.ts +0 -101
  230. package/src/packages/en3/objects/En3Video.ts +0 -88
  231. package/src/packages/en3/test/En3HTML.ts +0 -55
  232. package/src/packages/en3/test/En3ModifiedMaterial.ts +0 -221
  233. package/src/packages/en3/test/En3Raycaster.ts +0 -187
  234. package/src/packages/en3/utils/coverTexture.ts +0 -29
  235. package/src/packages/en3/utils/dispose.ts +0 -27
  236. package/src/packages/en3/utils/traverseMaterials.ts +0 -10
  237. package/src/packages/en3/utils/traverseMeshes.ts +0 -9
  238. package/src/packages/image/index.ts +0 -19
  239. package/src/packages/intersector/index.ts +0 -83
  240. package/src/packages/ladder/index.ts +0 -112
  241. package/src/packages/layout-box/index.ts +0 -417
  242. package/src/packages/loading/index.ts +0 -131
  243. package/src/packages/measurer/CumulativeOffsetLeft.ts +0 -8
  244. package/src/packages/measurer/CumulativeOffsetTop.ts +0 -8
  245. package/src/packages/measurer/Meaurer.ts +0 -38
  246. package/src/packages/measurer/index.ts +0 -3
  247. package/src/packages/media/index.ts +0 -38
  248. package/src/packages/morph/Link.ts +0 -32
  249. package/src/packages/morph/Morph.ts +0 -246
  250. package/src/packages/morph/index.ts +0 -10
  251. package/src/packages/notifier/index.ts +0 -41
  252. package/src/packages/order/index.ts +0 -14
  253. package/src/packages/resizer/index.ts +0 -55
  254. package/src/packages/router/Link.ts +0 -33
  255. package/src/packages/router/Route.ts +0 -152
  256. package/src/packages/router/RouteElement.ts +0 -34
  257. package/src/packages/router/Router.ts +0 -190
  258. package/src/packages/router/index.ts +0 -13
  259. package/src/packages/scroll/ScrollElement.ts +0 -618
  260. package/src/packages/scroll/ScrollUserElement.ts +0 -21
  261. package/src/packages/scroll/ScrollbarElement.ts +0 -170
  262. package/src/packages/scroll/index.ts +0 -2
  263. package/src/packages/scroll-entries/index.ts +0 -74
  264. package/src/packages/source/SourceClass.ts +0 -77
  265. package/src/packages/source/SourceElement.ts +0 -177
  266. package/src/packages/source/SourceManager.ts +0 -61
  267. package/src/packages/source/SourceSet.ts +0 -52
  268. package/src/packages/source/index.ts +0 -8
  269. package/src/packages/store/Composed.ts +0 -33
  270. package/src/packages/store/Derived.ts +0 -24
  271. package/src/packages/store/DerivedArray.ts +0 -36
  272. package/src/packages/store/Resource.ts +0 -38
  273. package/src/packages/store/Store.ts +0 -144
  274. package/src/packages/store/StoreRegistry.ts +0 -105
  275. package/src/packages/store/index.ts +0 -23
  276. package/src/packages/ticker/index.ts +0 -173
  277. package/src/packages/utils/array.ts +0 -3
  278. package/src/packages/utils/attributes.ts +0 -19
  279. package/src/packages/utils/browser.ts +0 -2
  280. package/src/packages/utils/canvas.ts +0 -46
  281. package/src/packages/utils/collisions.ts +0 -12
  282. package/src/packages/utils/coordinates.ts +0 -40
  283. package/src/packages/utils/decoding.ts +0 -11
  284. package/src/packages/utils/dev.ts +0 -5
  285. package/src/packages/utils/dom.ts +0 -48
  286. package/src/packages/utils/easings.ts +0 -69
  287. package/src/packages/utils/file.ts +0 -17
  288. package/src/packages/utils/function.ts +0 -29
  289. package/src/packages/utils/index.ts +0 -61
  290. package/src/packages/utils/layout.ts +0 -22
  291. package/src/packages/utils/math.ts +0 -74
  292. package/src/packages/utils/number.ts +0 -26
  293. package/src/packages/utils/object.ts +0 -108
  294. package/src/packages/utils/string.ts +0 -49
  295. package/src/packages/utils/ts-shape.ts +0 -25
  296. package/src/packages/utils/ts-utility.ts +0 -47
  297. package/src/packages/video/index.ts +0 -39
  298. package/src/playground/index.ts +0 -0
  299. package/tsconfig.json +0 -31
  300. package/vite.config.ts +0 -78
@@ -0,0 +1,235 @@
1
+ var K = (i, s, e) => {
2
+ if (!s.has(i))
3
+ throw TypeError("Cannot " + e);
4
+ };
5
+ var t = (i, s, e) => (K(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
6
+ if (s.has(i))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ s instanceof WeakSet ? s.add(i) : s.set(i, e);
9
+ }, n = (i, s, e, o) => (K(i, s, "write to private field"), o ? o.call(i, e) : s.set(i, e), e);
10
+ var g = (i, s, e) => (K(i, s, "access private method"), e);
11
+ import { cssUnitParser as ot } from "../css-unit-parser/index.js";
12
+ import { Ladder as I } from "../ladder/index.js";
13
+ import { TICK_ORDER as J } from "../order/index.js";
14
+ import { resizer as N } from "../resizer/index.js";
15
+ import { scrollEnties as lt } from "../scroll-entries/index.js";
16
+ import { ticker as Q } from "../ticker/index.js";
17
+ import { i as j } from "../browser-S4eq8AeN.js";
18
+ import { g as V, a as $ } from "../layout-5SJlcXTY.js";
19
+ import "../Store-qq7IjRLE.js";
20
+ import "../notifier/index.js";
21
+ import "../function-zwSFehNd.js";
22
+ import "../intersector/index.js";
23
+ function at(i) {
24
+ const s = Math.sqrt(
25
+ i.m11 * i.m11 + i.m12 * i.m12 + i.m13 * i.m13
26
+ ), e = Math.sqrt(
27
+ i.m21 * i.m21 + i.m22 * i.m22 + i.m23 * i.m23
28
+ ), o = Math.sqrt(
29
+ i.m31 * i.m31 + i.m32 * i.m32 + i.m33 * i.m33
30
+ ), v = Math.atan2(i.m32, i.m33), H = Math.atan2(
31
+ -i.m31,
32
+ Math.sqrt(i.m32 * i.m32 + i.m33 * i.m33)
33
+ ), k = Math.atan2(i.m21, i.m11), u = i.m41, E = i.m42, L = i.m43;
34
+ return {
35
+ scaleX: s,
36
+ scaleY: e,
37
+ scaleZ: o,
38
+ rotationX: v,
39
+ rotationY: H,
40
+ rotationZ: k,
41
+ translationX: u,
42
+ translationY: E,
43
+ translationZ: L
44
+ };
45
+ }
46
+ var l, p, f, C, R, O, b, x, M, _, P, S, d, w, X, Y, T, m, y, z, c, r, a, Z, F, B, tt, D, st, U, et, q, G, A, W;
47
+ class Ct {
48
+ constructor(s, e) {
49
+ h(this, Z);
50
+ h(this, B);
51
+ h(this, D);
52
+ h(this, U);
53
+ h(this, q);
54
+ h(this, l, null);
55
+ h(this, p, null);
56
+ h(this, f, []);
57
+ h(this, C, "auto");
58
+ h(this, R, "top");
59
+ h(this, O, !1);
60
+ h(this, b, !0);
61
+ h(this, x, !0);
62
+ h(this, M, 0);
63
+ h(this, _, 0);
64
+ h(this, P, 0);
65
+ h(this, S, 0);
66
+ h(this, d, 0);
67
+ h(this, w, 0);
68
+ h(this, X, 0);
69
+ h(this, Y, 0);
70
+ h(this, T, 0);
71
+ h(this, m, { x: 0, y: 0, z: 0 });
72
+ h(this, y, { x: 0, y: 0, z: 0 });
73
+ h(this, z, { x: 1, y: 1, z: 1 });
74
+ h(this, c, new I({ x: 0, y: 0, z: 0 }));
75
+ h(this, r, new I({ x: 0, y: 0, z: 0 }));
76
+ h(this, a, new I({ x: 0, y: 0, z: 0 }));
77
+ h(this, A, () => {
78
+ j && g(this, D, st).call(this);
79
+ });
80
+ h(this, W, () => {
81
+ g(this, U, et).call(this), g(this, Z, F).call(this);
82
+ });
83
+ j && (n(this, l, g(this, q, G).call(this, s) || document.body), n(this, p, g(this, q, G).call(this, e == null ? void 0 : e.containerElement) || document.body), n(this, C, (e == null ? void 0 : e.scrollAxis) || "auto"), n(this, R, (e == null ? void 0 : e.frontSide) || "top"), n(this, O, (e == null ? void 0 : e.cartesian) || !1), n(this, b, (e == null ? void 0 : e.sizeStep) !== void 0 ? e.sizeStep : !0), n(this, x, (e == null ? void 0 : e.positionStep) !== void 0 ? e.positionStep : !0), t(this, a).setStep("_size", "+", {
84
+ x: 1,
85
+ y: 1,
86
+ z: 1
87
+ }), t(this, r).setStep("_position", "+", {
88
+ x: 0,
89
+ y: 0,
90
+ z: 0
91
+ }), t(this, a).setStep("_scale", "*", {
92
+ x: 1,
93
+ y: 1,
94
+ z: 1
95
+ }), t(this, r).setStep("_translation", "+", {
96
+ x: 0,
97
+ y: 0,
98
+ z: 0
99
+ }), t(this, c).setStep("_rotation", "+", {
100
+ x: 0,
101
+ y: 0,
102
+ z: 0
103
+ }), addEventListener("DOMContentLoaded", () => {
104
+ lt.getAll(this.element).forEach((v) => {
105
+ this.setScrollStep(() => v);
106
+ });
107
+ }), Q.subscribe(t(this, W), {
108
+ order: J.LAYOUT_BOX,
109
+ culling: e != null && e.culling ? this.element : void 0
110
+ }), N.subscribe(t(this, A), J.LAYOUT_BOX));
111
+ }
112
+ get element() {
113
+ return t(this, l);
114
+ }
115
+ get containerElement() {
116
+ return t(this, p);
117
+ }
118
+ get position() {
119
+ return t(this, r).current;
120
+ }
121
+ get rotation() {
122
+ return t(this, c).current;
123
+ }
124
+ get scale() {
125
+ return t(this, a).current;
126
+ }
127
+ get left() {
128
+ return t(this, d);
129
+ }
130
+ get top() {
131
+ return t(this, S);
132
+ }
133
+ get front() {
134
+ return t(this, w);
135
+ }
136
+ get width() {
137
+ return t(this, M);
138
+ }
139
+ get height() {
140
+ return t(this, _);
141
+ }
142
+ get depth() {
143
+ return t(this, P);
144
+ }
145
+ bindObject(s) {
146
+ s.position && t(this, r).bind(s.position), s.rotation && t(this, c).bind(s.rotation), s.scale && t(this, a).bind(s.scale);
147
+ }
148
+ unbindObject(s) {
149
+ s.position && t(this, r).unbind(s.position), s.rotation && t(this, c).unbind(s.rotation), s.scale && t(this, a).unbind(s.scale);
150
+ }
151
+ setScrollStep(s) {
152
+ return t(this, f).includes(s) || t(this, f).push(s), () => this.deleteScrollStep(s);
153
+ }
154
+ deleteScrollStep(s) {
155
+ n(this, f, t(this, f).filter((e) => e !== s));
156
+ }
157
+ destroy() {
158
+ Q.unsubscribe(t(this, W)), N.unsubscribe(t(this, A)), t(this, r).close(), t(this, c).close(), t(this, a).close();
159
+ }
160
+ setPositionStep(...s) {
161
+ t(this, r).setStep(...s);
162
+ }
163
+ setRotationStep(...s) {
164
+ t(this, c).setStep(...s);
165
+ }
166
+ setScaleStep(...s) {
167
+ t(this, a).setStep(...s);
168
+ }
169
+ deletePositionStep(...s) {
170
+ t(this, r).deleteStep(...s);
171
+ }
172
+ deleteRotationStep(...s) {
173
+ t(this, c).deleteStep(...s);
174
+ }
175
+ deleteScaleStep(...s) {
176
+ t(this, a).deleteStep(...s);
177
+ }
178
+ }
179
+ l = new WeakMap(), p = new WeakMap(), f = new WeakMap(), C = new WeakMap(), R = new WeakMap(), O = new WeakMap(), b = new WeakMap(), x = new WeakMap(), M = new WeakMap(), _ = new WeakMap(), P = new WeakMap(), S = new WeakMap(), d = new WeakMap(), w = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), T = new WeakMap(), m = new WeakMap(), y = new WeakMap(), z = new WeakMap(), c = new WeakMap(), r = new WeakMap(), a = new WeakMap(), Z = new WeakSet(), F = function() {
180
+ t(this, a).calculate(), t(this, r).calculate(), t(this, c).calculate();
181
+ }, B = new WeakSet(), tt = function() {
182
+ t(this, a).setStep("_size", "+", {
183
+ x: t(this, b) ? t(this, M) : 1,
184
+ y: t(this, b) ? t(this, _) : 1,
185
+ z: t(this, b) ? t(this, P) : 1
186
+ });
187
+ const s = t(this, x) ? t(this, X) : 0, e = t(this, x) ? t(this, Y) : 0, o = t(this, x) ? t(this, T) : 0;
188
+ t(this, r).setStep("_position", "+", {
189
+ x: s,
190
+ y: e,
191
+ z: o
192
+ }), t(this, a).setStep("_scale", "*", {
193
+ x: t(this, z).x,
194
+ y: t(this, z).y,
195
+ z: t(this, z).z
196
+ }), t(this, r).setStep("_translation", "+", {
197
+ x: t(this, m).x,
198
+ y: t(this, m).y,
199
+ z: t(this, m).z
200
+ }), t(this, c).setStep("_rotation", "+", {
201
+ x: t(this, y).x,
202
+ y: t(this, y).y,
203
+ z: t(this, y).z
204
+ });
205
+ }, D = new WeakSet(), st = function() {
206
+ const s = getComputedStyle(t(this, l));
207
+ n(this, M, Math.max(t(this, l).clientWidth, 1)), n(this, _, Math.max(t(this, l).clientHeight, 1)), n(this, P, Math.max(ot.parse(s.getPropertyValue("--depth") || "0px"), 1));
208
+ const e = V(t(this, p)), o = $(t(this, p)), v = t(this, p).clientWidth, H = t(this, p).clientHeight;
209
+ if (n(this, d, V(t(this, l)) - e), n(this, S, $(t(this, l)) - o), t(this, C) === "z") {
210
+ const E = t(this, d) / v, L = t(this, S) / H;
211
+ n(this, d, (E - Math.floor(E)) * v), n(this, S, (L - Math.floor(L)) * H), t(this, R) === "left" ? n(this, w, V(t(this, l)) - e - t(this, d)) : n(this, w, $(t(this, l)) - o - t(this, S));
212
+ }
213
+ if (n(this, d, t(this, d) + t(this, l).clientLeft), n(this, S, t(this, S) + t(this, l).clientTop), t(this, O)) {
214
+ const E = Math.round(v / 2), L = Math.round(H / 2), it = t(this, M) ? Math.round(t(this, M) / 2) : 0, ht = t(this, _) ? Math.round(t(this, _) / 2) : 0, nt = t(this, d) - E + it, rt = (t(this, S) - L + ht) * -1;
215
+ n(this, X, nt), n(this, Y, rt);
216
+ } else
217
+ n(this, X, t(this, d)), n(this, Y, t(this, S));
218
+ n(this, T, t(this, w) * -1);
219
+ const k = new WebKitCSSMatrix(s.transform), u = at(k);
220
+ t(this, m).x = u.translationX, t(this, m).y = u.translationY, t(this, m).z = u.translationZ, t(this, z).x = u.scaleX, t(this, z).y = u.scaleY, t(this, z).z = u.scaleZ, t(this, y).x = u.rotationX, t(this, y).y = u.rotationY, t(this, y).z = u.rotationZ, g(this, B, tt).call(this), g(this, Z, F).call(this);
221
+ }, U = new WeakSet(), et = function() {
222
+ for (let s = 0; s < t(this, f).length; s++) {
223
+ const e = t(this, f)[s]();
224
+ let o = e.axis;
225
+ t(this, C) !== "auto" && (o = t(this, C)), t(this, r).setStep(`_scroll_${s}`, "+", {
226
+ [o]: e.value * (o === "x" ? -1 : t(this, O) ? 1 : -1)
227
+ });
228
+ }
229
+ }, q = new WeakSet(), G = function(s) {
230
+ return typeof s == "string" ? document.querySelector(s) : s;
231
+ }, A = new WeakMap(), W = new WeakMap();
232
+ export {
233
+ Ct as LayoutBox,
234
+ at as decomposeCSSMatrix
235
+ };
@@ -0,0 +1 @@
1
+ "use strict";const f=(t,e="offsetLeft",o)=>{let u=0;do u+=t[e]||0,t=t.offsetParent;while(t&&t!==o);return u},s=(t,e)=>f(t,"offsetLeft",e),i=(t,e)=>f(t,"offsetTop",e);exports.getCumulativeOffsetLeft=s;exports.getCumulativeOffsetTop=i;exports.getCumulativePosition=f;
@@ -0,0 +1 @@
1
+ "use strict";var p=Object.defineProperty,b=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var S=(s,t,e)=>t in s?p(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,f=(s,t)=>{for(var e in t||(t={}))L.call(t,e)&&S(s,e,t[e]);if(E)for(var e of E(t))N.call(t,e)&&S(s,e,t[e]);return s},c=(s,t)=>b(s,C(t));var w=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var r=(s,t,e)=>(w(s,t,"read from private field"),e?e.call(s):t.get(s)),l=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},v=(s,t,e,o)=>(w(s,t,"write to private field"),o?o.call(s,e):t.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../notifier/index.cjs"),_=require("../function-QP7IreXR.cjs");var i,h,a,d,n,u,g;class q{constructor(){l(this,i,new Map);l(this,h,new y.Notifier);l(this,a,new y.Notifier);l(this,d,new y.Notifier);l(this,n,!1);l(this,u,t=>{const{loaded:e,total:o}=this.getStats();r(this,h).notify({progress:e/o,loaded:e,total:o,namespace:t}),r(this,g).call(this)});l(this,g,_.debounce(()=>{const{loaded:t,total:e}=this.getStats();if(t===e){v(this,n,!0);const{total:o}=this.getStats();r(this,a).notify({total:o})}},150))}get progressEvent(){return r(this,h)}get completeEvent(){return r(this,a)}get errorEvent(){return r(this,d)}get _counter(){return r(this,i)}get isComplete(){return r(this,n)}reset(){v(this,n,!1),r(this,i).clear()}setTotal(t,e=1){r(this,n)||r(this,i).set(t,{loaded:0,total:e})}setLoaded(t,e=1){if(!r(this,n)&&r(this,i).has(t)){const o=r(this,i).get(t);o.loaded!==e&&(r(this,i).set(t,c(f({},o),{loaded:e})),r(this,u).call(this,t))}}setError(t,e){if(!r(this,n)&&r(this,i).has(t)){const o=r(this,i).get(t);r(this,i).set(t,c(f({},o),{total:o.total-1})),r(this,d).notify({namespace:t,url:e})}}getStats(){return Array.from(r(this,i)).reduce((t,e)=>({loaded:t.loaded+e[1].loaded,total:t.total+e[1].total}),{loaded:0,total:0})}}i=new WeakMap,h=new WeakMap,a=new WeakMap,d=new WeakMap,n=new WeakMap,u=new WeakMap,g=new WeakMap;const M=new q;exports.loading=M;
@@ -0,0 +1,38 @@
1
+ import { Notifier } from '../notifier';
2
+ export interface LoadingProgressDetail {
3
+ loaded: number;
4
+ total: number;
5
+ progress: number;
6
+ namespace: string;
7
+ }
8
+ export interface LoadingErrorDetail {
9
+ namespace: string;
10
+ url: string;
11
+ }
12
+ export interface LoadingCompleteDetail {
13
+ total: number;
14
+ }
15
+ export type LoadingProgressSubscriber = (detail: LoadingProgressDetail) => void;
16
+ export type LoadingErrorSubscriber = (detail: LoadingErrorDetail) => void;
17
+ export type LoadingCompleteSubscriber = (detail: LoadingCompleteDetail) => void;
18
+ declare class Loading {
19
+ #private;
20
+ get progressEvent(): Notifier<LoadingProgressSubscriber>;
21
+ get completeEvent(): Notifier<LoadingCompleteSubscriber>;
22
+ get errorEvent(): Notifier<LoadingErrorSubscriber>;
23
+ get _counter(): Map<string, {
24
+ total: number;
25
+ loaded: number;
26
+ }>;
27
+ get isComplete(): boolean;
28
+ reset(): void;
29
+ setTotal(namespace: string, total?: number): void;
30
+ setLoaded(namespace: string, loaded?: number): void;
31
+ setError(namespace: string, url: string): void;
32
+ getStats(): {
33
+ loaded: number;
34
+ total: number;
35
+ };
36
+ }
37
+ export declare const loading: Loading;
38
+ export {};
@@ -0,0 +1,99 @@
1
+ var m = Object.defineProperty, S = Object.defineProperties;
2
+ var C = Object.getOwnPropertyDescriptors;
3
+ var v = Object.getOwnPropertySymbols;
4
+ var L = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
5
+ var w = (s, t, e) => t in s ? m(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, u = (s, t) => {
6
+ for (var e in t || (t = {}))
7
+ L.call(t, e) && w(s, e, t[e]);
8
+ if (v)
9
+ for (var e of v(t))
10
+ b.call(t, e) && w(s, e, t[e]);
11
+ return s;
12
+ }, c = (s, t) => S(s, C(t));
13
+ var y = (s, t, e) => {
14
+ if (!t.has(s))
15
+ throw TypeError("Cannot " + e);
16
+ };
17
+ var r = (s, t, e) => (y(s, t, "read from private field"), e ? e.call(s) : t.get(s)), h = (s, t, e) => {
18
+ if (t.has(s))
19
+ throw TypeError("Cannot add the same private member more than once");
20
+ t instanceof WeakSet ? t.add(s) : t.set(s, e);
21
+ }, E = (s, t, e, o) => (y(s, t, "write to private field"), o ? o.call(s, e) : t.set(s, e), e);
22
+ import { Notifier as p } from "../notifier/index.js";
23
+ import { d as x } from "../function-zwSFehNd.js";
24
+ var i, l, a, d, n, g, f;
25
+ class A {
26
+ constructor() {
27
+ h(this, i, /* @__PURE__ */ new Map());
28
+ h(this, l, new p());
29
+ h(this, a, new p());
30
+ h(this, d, new p());
31
+ h(this, n, !1);
32
+ h(this, g, (t) => {
33
+ const { loaded: e, total: o } = this.getStats();
34
+ r(this, l).notify({
35
+ progress: e / o,
36
+ loaded: e,
37
+ total: o,
38
+ namespace: t
39
+ }), r(this, f).call(this);
40
+ });
41
+ h(this, f, x(() => {
42
+ const { loaded: t, total: e } = this.getStats();
43
+ if (t === e) {
44
+ E(this, n, !0);
45
+ const { total: o } = this.getStats();
46
+ r(this, a).notify({
47
+ total: o
48
+ });
49
+ }
50
+ }, 150));
51
+ }
52
+ get progressEvent() {
53
+ return r(this, l);
54
+ }
55
+ get completeEvent() {
56
+ return r(this, a);
57
+ }
58
+ get errorEvent() {
59
+ return r(this, d);
60
+ }
61
+ get _counter() {
62
+ return r(this, i);
63
+ }
64
+ get isComplete() {
65
+ return r(this, n);
66
+ }
67
+ reset() {
68
+ E(this, n, !1), r(this, i).clear();
69
+ }
70
+ setTotal(t, e = 1) {
71
+ r(this, n) || r(this, i).set(t, { loaded: 0, total: e });
72
+ }
73
+ setLoaded(t, e = 1) {
74
+ if (!r(this, n) && r(this, i).has(t)) {
75
+ const o = r(this, i).get(t);
76
+ o.loaded !== e && (r(this, i).set(t, c(u({}, o), { loaded: e })), r(this, g).call(this, t));
77
+ }
78
+ }
79
+ setError(t, e) {
80
+ if (!r(this, n) && r(this, i).has(t)) {
81
+ const o = r(this, i).get(t);
82
+ r(this, i).set(t, c(u({}, o), { total: o.total - 1 })), r(this, d).notify({
83
+ namespace: t,
84
+ url: e
85
+ });
86
+ }
87
+ }
88
+ getStats() {
89
+ return Array.from(r(this, i)).reduce(
90
+ (t, e) => ({ loaded: t.loaded + e[1].loaded, total: t.total + e[1].total }),
91
+ { loaded: 0, total: 0 }
92
+ );
93
+ }
94
+ }
95
+ i = new WeakMap(), l = new WeakMap(), a = new WeakMap(), d = new WeakMap(), n = new WeakMap(), g = new WeakMap(), f = new WeakMap();
96
+ const _ = new A();
97
+ export {
98
+ _ as loading
99
+ };
@@ -0,0 +1 @@
1
+ "use strict";function r(t,n,e){return(1-e)*t+e*n}function p(t,n,e,c){return r(t,n,1-Math.exp(-e*c))}function l(t,n,e=0,c=1){return n<t?e:c}function d(t,n=5){return+t.toFixed(n)}function i(t,n=0,e=0){return Math.max(n,Math.min(t,e))}function f(t,n,e){const a=(t-n[0])/(n[1]-n[0])*(e[1]-e[0])+e[0];return i(a,e[0],e[1])}function h(t,n,e){return t<=n?0:t>=e?1:(t=(t-n)/(e-n),t*t*(3-2*t))}function m(t,n,e){return t<=n?0:t>=e?1:(t=(t-n)/(e-n),t*t*t*(t*(t*6-15)+10))}function M(t,n){const e=n.x-t.x,c=n.y-t.y;return Math.sqrt(Math.pow(e,2)+Math.pow(c,2))}function D(t,n,e,c,a,u){const s=c-t,o=a-n;return Math.sqrt(s*s+o*o)-(e+u)}exports.calculateDistance=M;exports.calculateDistanceWithRadius=D;exports.clamp=i;exports.damp=p;exports.lerp=r;exports.mapRange=f;exports.round=d;exports.smootherstep=m;exports.smoothstep=h;exports.step=l;
@@ -0,0 +1,45 @@
1
+ function o(t, n, a) {
2
+ return (1 - a) * t + a * n;
3
+ }
4
+ function p(t, n, a, s) {
5
+ return o(t, n, 1 - Math.exp(-a * s));
6
+ }
7
+ function d(t, n, a = 0, s = 1) {
8
+ return n < t ? a : s;
9
+ }
10
+ function l(t, n = 5) {
11
+ return +t.toFixed(n);
12
+ }
13
+ function i(t, n = 0, a = 0) {
14
+ return Math.max(n, Math.min(t, a));
15
+ }
16
+ function h(t, n, a) {
17
+ const c = (t - n[0]) / (n[1] - n[0]) * (a[1] - a[0]) + a[0];
18
+ return i(c, a[0], a[1]);
19
+ }
20
+ function M(t, n, a) {
21
+ return t <= n ? 0 : t >= a ? 1 : (t = (t - n) / (a - n), t * t * (3 - 2 * t));
22
+ }
23
+ function m(t, n, a) {
24
+ return t <= n ? 0 : t >= a ? 1 : (t = (t - n) / (a - n), t * t * t * (t * (t * 6 - 15) + 10));
25
+ }
26
+ function y(t, n) {
27
+ const a = n.x - t.x, s = n.y - t.y;
28
+ return Math.sqrt(Math.pow(a, 2) + Math.pow(s, 2));
29
+ }
30
+ function D(t, n, a, s, c, e) {
31
+ const r = s - t, u = c - n;
32
+ return Math.sqrt(r * r + u * u) - (a + e);
33
+ }
34
+ export {
35
+ M as a,
36
+ m as b,
37
+ i as c,
38
+ p as d,
39
+ y as e,
40
+ D as f,
41
+ o as l,
42
+ h as m,
43
+ l as r,
44
+ d as s
45
+ };
@@ -0,0 +1,4 @@
1
+ import { Measurer } from './Meaurer';
2
+ export declare class CumulativeOffsetLeft extends Measurer {
3
+ protected handleResize(): number;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { Measurer } from './Meaurer';
2
+ export declare class CumulativeOffsetTop extends Measurer {
3
+ protected handleResize(): number;
4
+ }
@@ -0,0 +1,8 @@
1
+ export declare abstract class Measurer {
2
+ #private;
3
+ constructor(element: HTMLElement);
4
+ get element(): HTMLElement;
5
+ value: (modifier?: ((current: number) => number) | undefined) => number;
6
+ destroy(): void;
7
+ protected abstract handleResize(): number;
8
+ }
@@ -0,0 +1 @@
1
+ "use strict";var O=Object.defineProperty;var m=(t,e,s)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var c=(t,e,s)=>(m(t,typeof e!="symbol"?e+"":e,s),s),v=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var r=(t,e,s)=>(v(t,e,"read from private field"),s?s.call(t):e.get(t)),n=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},a=(t,e,s,h)=>(v(t,e,"write to private field"),h?h.call(t,s):e.set(t,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../browser-QbF6EW-w.cjs"),d=require("../layout-rZzbsLPd.cjs");var i,u,l,o;class f{constructor(e){n(this,i,void 0);n(this,u,null);n(this,l,0);c(this,"value",e=>e?e(r(this,l)):r(this,l));n(this,o,()=>{a(this,l,this.handleResize()),r(this,i).isConnected||this.destroy()});a(this,i,e),b.isBrowser&&(a(this,u,new ResizeObserver(r(this,o))),r(this,u).observe(e))}get element(){return r(this,i)}destroy(){r(this,u).disconnect()}}i=new WeakMap,u=new WeakMap,l=new WeakMap,o=new WeakMap;class C extends f{handleResize(){return d.getCumulativeOffsetLeft(this.element)}}class z extends f{handleResize(){return d.getCumulativeOffsetTop(this.element)}}exports.CumulativeOffsetLeft=C;exports.CumulativeOffsetTop=z;exports.Measurer=f;
@@ -0,0 +1,3 @@
1
+ export { Measurer } from './Meaurer';
2
+ export { CumulativeOffsetLeft } from './CumulativeOffsetLeft';
3
+ export { CumulativeOffsetTop } from './CumulativeOffsetTop';
@@ -0,0 +1,48 @@
1
+ var c = Object.defineProperty;
2
+ var d = (s, e, t) => e in s ? c(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var f = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t), m = (s, e, t) => {
4
+ if (!e.has(s))
5
+ throw TypeError("Cannot " + t);
6
+ };
7
+ var i = (s, e, t) => (m(s, e, "read from private field"), t ? t.call(s) : e.get(s)), n = (s, e, t) => {
8
+ if (e.has(s))
9
+ throw TypeError("Cannot add the same private member more than once");
10
+ e instanceof WeakSet ? e.add(s) : e.set(s, t);
11
+ }, h = (s, e, t, o) => (m(s, e, "write to private field"), o ? o.call(s, t) : e.set(s, t), t);
12
+ import { i as O } from "../browser-S4eq8AeN.js";
13
+ import { g as z, a as C } from "../layout-5SJlcXTY.js";
14
+ var r, a, l, u;
15
+ class v {
16
+ constructor(e) {
17
+ n(this, r, void 0);
18
+ n(this, a, null);
19
+ n(this, l, 0);
20
+ f(this, "value", (e) => e ? e(i(this, l)) : i(this, l));
21
+ n(this, u, () => {
22
+ h(this, l, this.handleResize()), i(this, r).isConnected || this.destroy();
23
+ });
24
+ h(this, r, e), O && (h(this, a, new ResizeObserver(i(this, u))), i(this, a).observe(e));
25
+ }
26
+ get element() {
27
+ return i(this, r);
28
+ }
29
+ destroy() {
30
+ i(this, a).disconnect();
31
+ }
32
+ }
33
+ r = new WeakMap(), a = new WeakMap(), l = new WeakMap(), u = new WeakMap();
34
+ class R extends v {
35
+ handleResize() {
36
+ return z(this.element);
37
+ }
38
+ }
39
+ class x extends v {
40
+ handleResize() {
41
+ return C(this.element);
42
+ }
43
+ }
44
+ export {
45
+ R as CumulativeOffsetLeft,
46
+ x as CumulativeOffsetTop,
47
+ v as Measurer
48
+ };
@@ -0,0 +1 @@
1
+ "use strict";var a=(e,r,s)=>{if(!r.has(e))throw TypeError("Cannot "+s)};var u=(e,r,s)=>(a(e,r,"read from private field"),s?s.call(e):r.get(e)),c=(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,n)=>(a(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../order/index.cjs"),l=require("../resizer/index.cjs"),h=require("../Store-txkR3wXU.cjs");require("../notifier/index.cjs");require("../browser-QbF6EW-w.cjs");require("../function-QP7IreXR.cjs");var i,t;class q extends h.Store{constructor(s){super(!1);c(this,i,void 0);c(this,t,void 0);o(this,i,s),o(this,t,l.resizer.subscribe(()=>{matchMedia(u(this,i)).matches?this.current=!0:this.current=!1},d.RESIZE_ORDER.MEDIA))}close(){super.close(),u(this,t).call(this)}}i=new WeakMap,t=new WeakMap;exports.Media=q;
@@ -0,0 +1,11 @@
1
+ import { Store } from '../store';
2
+ export type MediaCallback = () => void;
3
+ export type MediaQueries<T extends string = string> = Map<T, {
4
+ match: MediaCallback;
5
+ unmatch?: MediaCallback;
6
+ }>;
7
+ export declare class Media extends Store<boolean> {
8
+ #private;
9
+ constructor(query: string);
10
+ close(): void;
11
+ }
@@ -0,0 +1,33 @@
1
+ var p = (r, e, s) => {
2
+ if (!e.has(r))
3
+ throw TypeError("Cannot " + s);
4
+ };
5
+ var o = (r, e, s) => (p(r, e, "read from private field"), s ? s.call(r) : e.get(r)), m = (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
+ }, c = (r, e, s, u) => (p(r, e, "write to private field"), u ? u.call(r, s) : e.set(r, s), s);
10
+ import { RESIZE_ORDER as a } from "../order/index.js";
11
+ import { resizer as h } from "../resizer/index.js";
12
+ import { S as f } from "../Store-qq7IjRLE.js";
13
+ import "../notifier/index.js";
14
+ import "../browser-S4eq8AeN.js";
15
+ import "../function-zwSFehNd.js";
16
+ var t, i;
17
+ class S extends f {
18
+ constructor(s) {
19
+ super(!1);
20
+ m(this, t, void 0);
21
+ m(this, i, void 0);
22
+ c(this, t, s), c(this, i, h.subscribe(() => {
23
+ matchMedia(o(this, t)).matches ? this.current = !0 : this.current = !1;
24
+ }, a.MEDIA));
25
+ }
26
+ close() {
27
+ super.close(), o(this, i).call(this);
28
+ }
29
+ }
30
+ t = new WeakMap(), i = new WeakMap();
31
+ export {
32
+ S as Media
33
+ };
@@ -0,0 +1,6 @@
1
+ import { Morph } from './Morph';
2
+ export declare class Link {
3
+ #private;
4
+ constructor(element: HTMLAnchorElement, morph: Morph);
5
+ destroy(): void;
6
+ }
@@ -0,0 +1,26 @@
1
+ export type MorphHistoryAction = 'replace' | 'push' | 'none';
2
+ export interface MorphParameters {
3
+ base?: string;
4
+ waitForHeadToLoad?: boolean;
5
+ cachePages?: boolean;
6
+ }
7
+ export interface MorphNavigationEntry {
8
+ pathname: string;
9
+ isCached: boolean;
10
+ }
11
+ export interface MorphPreprocessorEntry extends MorphNavigationEntry {
12
+ resolve: () => void;
13
+ reject: () => void;
14
+ }
15
+ export type MorphPreprocessor = (entry: MorphPreprocessorEntry) => void;
16
+ export type MorphNavigationCallback = (entry: MorphNavigationEntry) => void;
17
+ export type MorphPostprocessor = MorphNavigationCallback;
18
+ export declare class Morph {
19
+ #private;
20
+ preprocessor?: MorphPreprocessor;
21
+ postprocessor?: MorphPostprocessor;
22
+ constructor(parameters?: MorphParameters);
23
+ beforeNavigationEvent(callback: MorphNavigationCallback): () => void;
24
+ afterNavigationEvent(callback: MorphNavigationCallback): () => void;
25
+ navigate(pathname: string, historyAction?: MorphHistoryAction): Promise<void>;
26
+ }
@@ -0,0 +1 @@
1
+ "use strict";var st=Object.defineProperty;var U=(i,t)=>(t=Symbol[i])?t:Symbol.for("Symbol."+i);var ot=(i,t,e)=>t in i?st(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var Y=(i,t,e)=>(ot(i,typeof t!="symbol"?t+"":t,e),e),_=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var s=(i,t,e)=>(_(i,t,"read from private field"),e?e.call(i):t.get(i)),o=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},r=(i,t,e,n)=>(_(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e);var d=(i,t,e)=>(_(i,t,"access private method"),e);var F=(i,t,e)=>new Promise((n,h)=>{var u=l=>{try{g(e.next(l))}catch(w){h(w)}},E=l=>{try{g(e.throw(l))}catch(w){h(w)}},g=l=>l.done?n(l.value):Promise.resolve(l.value).then(u,E);g((e=e.apply(i,t)).next())});var V=(i,t,e)=>(t=i[U("asyncIterator")])?t.call(i):(i=i[U("iterator")](),t={},e=(n,h)=>(h=i[n])&&(t[n]=u=>new Promise((E,g,l)=>(u=h.call(i,u),l=u.done,Promise.resolve(u.value).then(w=>E({value:w,done:l}),g)))),e("next"),e("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("../notifier/index.cjs"),nt=require("../browser-QbF6EW-w.cjs");var H,f,y,T,N;class rt{constructor(t,e){o(this,H,void 0);o(this,f,void 0);o(this,y,void 0);o(this,T,void 0);o(this,N,t=>{t.preventDefault(),s(this,H).navigate(s(this,y),s(this,T))});r(this,H,e),r(this,f,t),r(this,y,s(this,f).getAttribute("href")||"/"),r(this,T,s(this,f).getAttribute("data-history-action")||"push"),s(this,f).addEventListener("click",s(this,N)),s(this,y)===location.pathname&&s(this,f).classList.add("current")}destroy(){s(this,f).removeEventListener("click",s(this,N)),s(this,f).classList.remove("current")}}H=new WeakMap,f=new WeakMap,y=new WeakMap,T=new WeakMap,N=new WeakMap;var a,P,S,k,C,O,b,v,M,A,x,I,Z,j,$,D,z,q,G,m,p,R,J,B;class ct{constructor(t){o(this,I);o(this,j);o(this,D);o(this,q);o(this,m);o(this,R);o(this,a,null);o(this,P,null);o(this,S,null);o(this,k,null);o(this,C,[]);o(this,O,new DOMParser);o(this,b,new Map);o(this,v,void 0);o(this,M,null);Y(this,"preprocessor");Y(this,"postprocessor");o(this,A,new X.Notifier);o(this,x,new X.Notifier);o(this,B,t=>{t.state&&this.navigate(t.state,"none")});nt.isBrowser&&(r(this,a,(t==null?void 0:t.base)||"/"),t!=null&&t.base?(r(this,a,t.base),t.base.endsWith("/")||r(this,a,s(this,a)+"/")):r(this,a,"/"),r(this,P,(t==null?void 0:t.waitForHeadToLoad)!==!1),r(this,S,(t==null?void 0:t.cachePages)!==!1),r(this,k,d(this,q,G).call(this,document)),r(this,M,location.pathname),d(this,D,z).call(this),addEventListener("popstate",s(this,B)))}beforeNavigationEvent(t){return s(this,A).subscribe(t)}afterNavigationEvent(t){return s(this,x).subscribe(t)}navigate(t,e="push"){return F(this,null,function*(){var h;if(t=d(this,j,$).call(this,t),s(this,v)===t||s(this,M)===t)return;r(this,v,t);const n=s(this,b).has(t);try{let u=!0;if(this.preprocessor)try{yield new Promise((c,L)=>{var W;(W=this.preprocessor)==null||W.call(this,{pathname:t,resolve:c,reject:L,isCached:n})})}catch(c){c?console.error(c):console.log("Route change canceled"),u=!1}if(s(this,A).notify({pathname:t,isCached:n}),!u||s(this,v)!==t)return;const E=yield d(this,I,Z).call(this,t);if(s(this,S)&&s(this,b).set(t,E),s(this,v)!==t)return;const g=Array.from(document.head.children),l=Array.from(E.head.cloneNode(!0).children),w=d(this,m,p).call(this,g,l),tt=d(this,R,J).call(this,g,w),Q=d(this,R,J).call(this,l,w);tt.forEach(c=>c.remove()),Q.forEach(c=>document.head.appendChild(c));const K=Q.filter(c=>c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK");s(this,P)&&K.length&&(yield new Promise(c=>F(this,null,function*(){let L=0;try{for(var W=V(K),ut,dt,ft;ut=!(dt=yield W.next()).done;ut=!1){const it=dt.value;it.onload=()=>{L++,L===K.length&&c()}}}catch(dt){ft=[dt]}finally{try{ut&&(dt=W.return)&&(yield dt.call(W))}finally{if(ft)throw ft[0]}}})));const et=d(this,q,G).call(this,E);s(this,k).forEach((c,L)=>{const W=et[L];c.innerHTML=W.innerHTML}),r(this,M,t),e==="push"?history.pushState(t,"",t+location.search):e==="replace"&&history.replaceState(t,"",t+location.search),d(this,D,z).call(this),(h=this.postprocessor)==null||h.call(this,{pathname:t,isCached:n}),s(this,x).notify({pathname:t,isCached:n})}catch(u){console.error(u)}r(this,v,void 0)})}}a=new WeakMap,P=new WeakMap,S=new WeakMap,k=new WeakMap,C=new WeakMap,O=new WeakMap,b=new WeakMap,v=new WeakMap,M=new WeakMap,A=new WeakMap,x=new WeakMap,I=new WeakSet,Z=function(t){return F(this,null,function*(){const e=s(this,b).get(t);if(e)return e;const h=yield(yield fetch(t)).text();return s(this,O).parseFromString(h,"text/html")})},j=new WeakSet,$=function(t){return t=t.replace(s(this,a),""),t.startsWith("/")&&(t=t.slice(1)),s(this,a)+t},D=new WeakSet,z=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(e=>{var n;return(n=e.getAttribute("href"))==null?void 0:n.startsWith("/")});s(this,C).forEach(e=>e.destroy()),r(this,C,t.map(e=>new rt(e,this)))},q=new WeakSet,G=function(t){const e=t.querySelectorAll("[data-morph]");return e.length?[...e]:[t.body]},m=new WeakSet,p=function(t,e){return t.filter(n=>e.find(h=>h.outerHTML===n.outerHTML))},R=new WeakSet,J=function(t,e){return t.filter(n=>!e.find(h=>h.outerHTML===n.outerHTML))},B=new WeakMap;exports.Morph=ct;
@@ -0,0 +1 @@
1
+ export { Morph, type MorphPostprocessor, type MorphNavigationCallback, type MorphPreprocessor, type MorphPreprocessorEntry, type MorphNavigationEntry, type MorphParameters, type MorphHistoryAction, } from './Morph';