aptechka 0.1.0 → 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 (299) hide show
  1. package/README.md +1 -0
  2. package/lib/Damped-1hlKSFaB.cjs +1 -0
  3. package/lib/Damped-523xgzT3.js +152 -0
  4. package/lib/SourceManager-3c3kr7oj.cjs +1 -0
  5. package/lib/SourceManager-F94MRde6.js +108 -0
  6. package/lib/Store-2hWEUGTj.js +135 -0
  7. package/lib/Store-WXFmsaEI.cjs +1 -0
  8. package/lib/WheelControls-F-xg5-oq.js +102 -0
  9. package/lib/WheelControls-Hp5NWRZY.cjs +1 -0
  10. package/lib/animation/Animated.d.ts +41 -0
  11. package/lib/animation/Damped.d.ts +11 -0
  12. package/lib/animation/Tweened.d.ts +16 -0
  13. package/lib/animation/index.cjs +1 -0
  14. package/lib/animation/index.d.ts +3 -0
  15. package/lib/animation/index.js +56 -0
  16. package/lib/attribute/index.cjs +1 -0
  17. package/lib/attribute/index.d.ts +8 -0
  18. package/lib/attribute/index.js +47 -0
  19. package/lib/attributes-_2U65GDl.cjs +1 -0
  20. package/lib/attributes-w0u-KiIb.js +10 -0
  21. package/lib/browser-QbF6EW-w.cjs +1 -0
  22. package/lib/browser-S4eq8AeN.js +4 -0
  23. package/lib/canvas-2d/index.cjs +5 -0
  24. package/lib/canvas-2d/index.d.ts +30 -0
  25. package/lib/canvas-2d/index.js +90 -0
  26. package/lib/controls/Controls.d.ts +9 -0
  27. package/lib/controls/KeyboardControls.d.ts +10 -0
  28. package/lib/controls/LinearControls.d.ts +11 -0
  29. package/lib/controls/User.d.ts +7 -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 +5 -0
  33. package/lib/controls/index.js +43 -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 +1389 -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/Derived.d.ts +7 -0
  150. package/lib/store/DerivedArray.d.ts +7 -0
  151. package/lib/store/Resource.d.ts +11 -0
  152. package/lib/store/Store.d.ts +32 -0
  153. package/lib/store/StoreRegistry.d.ts +22 -0
  154. package/lib/store/index.cjs +1 -0
  155. package/lib/store/index.d.ts +6 -0
  156. package/lib/store/index.js +96 -0
  157. package/lib/string-GmxZA5Nq.js +31 -0
  158. package/lib/string-WmNOGq16.cjs +1 -0
  159. package/lib/ticker/index.cjs +1 -0
  160. package/lib/ticker/index.d.ts +19 -0
  161. package/lib/ticker/index.js +107 -0
  162. package/lib/utils/array.d.ts +1 -0
  163. package/lib/utils/attributes.d.ts +2 -0
  164. package/lib/utils/browser.d.ts +1 -0
  165. package/lib/utils/canvas.d.ts +6 -0
  166. package/lib/utils/collisions.d.ts +3 -0
  167. package/lib/utils/coordinates.d.ts +13 -0
  168. package/lib/utils/decoding.d.ts +2 -0
  169. package/lib/utils/dev.d.ts +3 -0
  170. package/lib/utils/dom.d.ts +4 -0
  171. package/lib/utils/easings.d.ts +17 -0
  172. package/lib/utils/file.d.ts +1 -0
  173. package/lib/utils/function.d.ts +2 -0
  174. package/lib/utils/index.cjs +1 -0
  175. package/lib/utils/index.d.ts +19 -0
  176. package/lib/utils/index.js +203 -0
  177. package/lib/utils/layout.d.ts +3 -0
  178. package/lib/utils/math.d.ts +11 -0
  179. package/lib/utils/number.d.ts +3 -0
  180. package/lib/utils/object.d.ts +7 -0
  181. package/lib/utils/string.d.ts +5 -0
  182. package/lib/utils/ts-shape.d.ts +19 -0
  183. package/lib/utils/ts-utility.d.ts +19 -0
  184. package/lib/video/index.cjs +1 -0
  185. package/lib/video/index.d.ts +11 -0
  186. package/lib/video/index.js +37 -0
  187. package/package.json +120 -118
  188. package/.prettierignore +0 -16
  189. package/.prettierrc +0 -9
  190. package/.vscode/extensions.json +0 -4
  191. package/.vscode/launch.json +0 -11
  192. package/.vscode/settings.json +0 -18
  193. package/index.html +0 -32
  194. package/public/vite.svg +0 -1
  195. package/src/packages/animation/Animated.ts +0 -189
  196. package/src/packages/animation/Damped.ts +0 -39
  197. package/src/packages/animation/Tweened.ts +0 -51
  198. package/src/packages/animation/index.ts +0 -10
  199. package/src/packages/attribute/index.ts +0 -59
  200. package/src/packages/canvas-2d/index.ts +0 -137
  201. package/src/packages/controls/Controls.ts +0 -15
  202. package/src/packages/controls/KeyboardControls.ts +0 -63
  203. package/src/packages/controls/LinearControls.ts +0 -27
  204. package/src/packages/controls/User.ts +0 -20
  205. package/src/packages/controls/WheelControls.ts +0 -92
  206. package/src/packages/controls/index.ts +0 -5
  207. package/src/packages/css-unit-parser/index.ts +0 -32
  208. package/src/packages/custom-element/index.ts +0 -19
  209. package/src/packages/device/Device.ts +0 -113
  210. package/src/packages/device/Viewport.ts +0 -67
  211. package/src/packages/device/index.ts +0 -2
  212. package/src/packages/element-constructor/ElementConstructor.ts +0 -577
  213. package/src/packages/element-constructor/htmlTags.ts +0 -679
  214. package/src/packages/element-constructor/index.ts +0 -4
  215. package/src/packages/element-constructor/specialObjects.ts +0 -8
  216. package/src/packages/element-constructor/svgTags.ts +0 -588
  217. package/src/packages/en3/attachments/En3SourceManager.ts +0 -116
  218. package/src/packages/en3/core/en3.ts +0 -306
  219. package/src/packages/en3/index.ts +0 -52
  220. package/src/packages/en3/instances/en3LazyLoader.ts +0 -22
  221. package/src/packages/en3/libs/MeshoptDecoder.js +0 -138
  222. package/src/packages/en3/loaders/en3GLTFLoader.ts +0 -54
  223. package/src/packages/en3/loaders/en3TextureLoader.ts +0 -3
  224. package/src/packages/en3/objects/En3Clip.ts +0 -53
  225. package/src/packages/en3/objects/En3ClipHelpers.ts +0 -12
  226. package/src/packages/en3/objects/En3GLTF.ts +0 -35
  227. package/src/packages/en3/objects/En3Image.ts +0 -18
  228. package/src/packages/en3/objects/En3ImageLike.ts +0 -101
  229. package/src/packages/en3/objects/En3Video.ts +0 -88
  230. package/src/packages/en3/test/En3HTML.ts +0 -55
  231. package/src/packages/en3/test/En3ModifiedMaterial.ts +0 -221
  232. package/src/packages/en3/test/En3Raycaster.ts +0 -187
  233. package/src/packages/en3/utils/coverTexture.ts +0 -29
  234. package/src/packages/en3/utils/dispose.ts +0 -27
  235. package/src/packages/en3/utils/traverseMaterials.ts +0 -10
  236. package/src/packages/en3/utils/traverseMeshes.ts +0 -9
  237. package/src/packages/image/index.ts +0 -19
  238. package/src/packages/intersector/index.ts +0 -83
  239. package/src/packages/ladder/index.ts +0 -112
  240. package/src/packages/layout-box/index.ts +0 -417
  241. package/src/packages/loading/index.ts +0 -131
  242. package/src/packages/measurer/CumulativeOffsetLeft.ts +0 -8
  243. package/src/packages/measurer/CumulativeOffsetTop.ts +0 -8
  244. package/src/packages/measurer/Meaurer.ts +0 -38
  245. package/src/packages/measurer/index.ts +0 -3
  246. package/src/packages/media/index.ts +0 -38
  247. package/src/packages/morph/Link.ts +0 -32
  248. package/src/packages/morph/Morph.ts +0 -246
  249. package/src/packages/morph/index.ts +0 -10
  250. package/src/packages/notifier/index.ts +0 -41
  251. package/src/packages/order/index.ts +0 -14
  252. package/src/packages/resizer/index.ts +0 -55
  253. package/src/packages/router/Link.ts +0 -33
  254. package/src/packages/router/Route.ts +0 -152
  255. package/src/packages/router/RouteElement.ts +0 -34
  256. package/src/packages/router/Router.ts +0 -190
  257. package/src/packages/router/index.ts +0 -13
  258. package/src/packages/scroll/ScrollElement.ts +0 -618
  259. package/src/packages/scroll/ScrollUserElement.ts +0 -21
  260. package/src/packages/scroll/ScrollbarElement.ts +0 -170
  261. package/src/packages/scroll/index.ts +0 -2
  262. package/src/packages/scroll-entries/index.ts +0 -74
  263. package/src/packages/source/SourceClass.ts +0 -77
  264. package/src/packages/source/SourceElement.ts +0 -177
  265. package/src/packages/source/SourceManager.ts +0 -61
  266. package/src/packages/source/SourceSet.ts +0 -52
  267. package/src/packages/source/index.ts +0 -8
  268. package/src/packages/store/Composed.ts +0 -33
  269. package/src/packages/store/Derived.ts +0 -24
  270. package/src/packages/store/DerivedArray.ts +0 -36
  271. package/src/packages/store/Resource.ts +0 -38
  272. package/src/packages/store/Store.ts +0 -144
  273. package/src/packages/store/StoreRegistry.ts +0 -105
  274. package/src/packages/store/index.ts +0 -23
  275. package/src/packages/ticker/index.ts +0 -173
  276. package/src/packages/utils/array.ts +0 -3
  277. package/src/packages/utils/attributes.ts +0 -19
  278. package/src/packages/utils/browser.ts +0 -2
  279. package/src/packages/utils/canvas.ts +0 -46
  280. package/src/packages/utils/collisions.ts +0 -12
  281. package/src/packages/utils/coordinates.ts +0 -40
  282. package/src/packages/utils/decoding.ts +0 -11
  283. package/src/packages/utils/dev.ts +0 -5
  284. package/src/packages/utils/dom.ts +0 -48
  285. package/src/packages/utils/easings.ts +0 -69
  286. package/src/packages/utils/file.ts +0 -17
  287. package/src/packages/utils/function.ts +0 -29
  288. package/src/packages/utils/index.ts +0 -61
  289. package/src/packages/utils/layout.ts +0 -22
  290. package/src/packages/utils/math.ts +0 -74
  291. package/src/packages/utils/number.ts +0 -26
  292. package/src/packages/utils/object.ts +0 -108
  293. package/src/packages/utils/string.ts +0 -49
  294. package/src/packages/utils/ts-shape.ts +0 -25
  295. package/src/packages/utils/ts-utility.ts +0 -47
  296. package/src/packages/video/index.ts +0 -39
  297. package/src/playground/index.ts +0 -0
  298. package/tsconfig.json +0 -31
  299. package/vite.config.ts +0 -65
@@ -0,0 +1 @@
1
+ "use strict";var v=(e,r,t)=>{if(!r.has(e))throw TypeError("Cannot "+t)};var s=(e,r,t)=>(v(e,r,"read from private field"),t?t.call(e):r.get(e)),b=(e,r,t)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,t)},a=(e,r,t,c)=>(v(e,r,"write to private field"),c?c.call(e,t):r.set(e,t),t);var d=(e,r,t)=>(v(e,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../Store-WXFmsaEI.cjs"),A=require("../attributes-_2U65GDl.cjs"),f=require("../browser-QbF6EW-w.cjs"),S=require("../dom-QhWsdQS2.cjs");var i,u,o,h,m;class q extends w.Store{constructor(t,c,g,p){super(g,p);b(this,h);b(this,i,null);b(this,u,void 0);b(this,o,null);a(this,u,c),this.subscribe(l=>{var n;(n=s(this,i))==null||n.setAttribute(s(this,u),l.current.toString())}),f.isBrowser&&(a(this,i,S.getElement(t)),a(this,o,new MutationObserver(l=>{l.forEach(n=>{n.type==="attributes"&&n.attributeName===s(this,u)&&d(this,h,m).call(this)})})))}unobserve(){f.isBrowser&&s(this,o).disconnect()}observe(){f.isBrowser&&s(this,i)&&(s(this,o).observe(s(this,i),{attributes:!0}),d(this,h,m).call(this))}}i=new WeakMap,u=new WeakMap,o=new WeakMap,h=new WeakSet,m=function(){const t=s(this,i).getAttribute(s(this,u));t!=null&&(this.current=A.parseAttributeValue(t))};exports.Attribute=q;
@@ -0,0 +1,8 @@
1
+ import { Store, StoreOptions } from '../store';
2
+ import { ElementOrSelector } from '../utils';
3
+ export declare class Attribute<T extends string | number | boolean> extends Store<T> {
4
+ #private;
5
+ constructor(elementOrSelector: ElementOrSelector, name: string, defaultValue: T, options?: StoreOptions<T>);
6
+ unobserve(): void;
7
+ observe(): void;
8
+ }
@@ -0,0 +1,47 @@
1
+ var f = (e, s, t) => {
2
+ if (!s.has(e))
3
+ throw TypeError("Cannot " + t);
4
+ };
5
+ var i = (e, s, t) => (f(e, s, "read from private field"), t ? t.call(e) : s.get(e)), a = (e, s, t) => {
6
+ if (s.has(e))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ s instanceof WeakSet ? s.add(e) : s.set(e, t);
9
+ }, m = (e, s, t, b) => (f(e, s, "write to private field"), b ? b.call(e, t) : s.set(e, t), t);
10
+ var p = (e, s, t) => (f(e, s, "access private method"), t);
11
+ import { S as A } from "../Store-2hWEUGTj.js";
12
+ import { p as S } from "../attributes-w0u-KiIb.js";
13
+ import { i as l } from "../browser-S4eq8AeN.js";
14
+ import { g as w } from "../dom-bHEwc_xV.js";
15
+ var r, o, u, n, v;
16
+ class M extends A {
17
+ constructor(t, b, d, g) {
18
+ super(d, g);
19
+ a(this, n);
20
+ a(this, r, null);
21
+ a(this, o, void 0);
22
+ a(this, u, null);
23
+ m(this, o, b), this.subscribe((c) => {
24
+ var h;
25
+ (h = i(this, r)) == null || h.setAttribute(i(this, o), c.current.toString());
26
+ }), l && (m(this, r, w(t)), m(this, u, new MutationObserver((c) => {
27
+ c.forEach((h) => {
28
+ h.type === "attributes" && h.attributeName === i(this, o) && p(this, n, v).call(this);
29
+ });
30
+ })));
31
+ }
32
+ unobserve() {
33
+ l && i(this, u).disconnect();
34
+ }
35
+ observe() {
36
+ l && i(this, r) && (i(this, u).observe(i(this, r), {
37
+ attributes: !0
38
+ }), p(this, n, v).call(this));
39
+ }
40
+ }
41
+ r = new WeakMap(), o = new WeakMap(), u = new WeakMap(), n = new WeakSet(), v = function() {
42
+ const t = i(this, r).getAttribute(i(this, o));
43
+ t != null && (this.current = S(t));
44
+ };
45
+ export {
46
+ M as Attribute
47
+ };
@@ -0,0 +1 @@
1
+ "use strict";function u(e,r){return t(e.getAttribute(r))}function t(e){return e==null?null:e?isNaN(Number(e))?e==="true"?!0:e==="false"?!1:e:Number(e):!0}exports.parseAttribute=u;exports.parseAttributeValue=t;
@@ -0,0 +1,10 @@
1
+ function u(e, r) {
2
+ return t(e.getAttribute(r));
3
+ }
4
+ function t(e) {
5
+ return e == null ? null : e ? isNaN(Number(e)) ? e === "true" ? !0 : e === "false" ? !1 : e : Number(e) : !0;
6
+ }
7
+ export {
8
+ u as a,
9
+ t as p
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=typeof window!="undefined"&&typeof window.document!="undefined";exports.isBrowser=e;
@@ -0,0 +1,4 @@
1
+ const e = typeof window != "undefined" && typeof window.document != "undefined";
2
+ export {
3
+ e as i
4
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../custom-element/index.cjs"),C=require("../notifier/index.cjs"),x=require("../resizer/index.cjs"),y=require("../ticker/index.cjs"),M=require("../math-FNUBmQPK.cjs");require("../browser-QbF6EW-w.cjs");require("../function-QP7IreXR.cjs");require("../intersector/index.cjs");var W=Object.defineProperty,b=Object.getOwnPropertyDescriptor,R=(i,e,s,r)=>{for(var n=r>1?void 0:r?b(e,s):e,m=i.length-1,f;m>=0;m--)(f=i[m])&&(n=(r?f(e,s,n):f(n))||n);return r&&n&&W(e,s,n),n},E=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(E(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,r)=>(E(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s),p,h,d,c,o,u,v,_,w,g;exports.Canvas2DElement=class extends k.CustomElement{constructor(){super(...arguments),a(this,p,new C.Notifier),a(this,h,null),a(this,d,null),a(this,c,0),a(this,o,0),a(this,u,1),a(this,v,0),a(this,_,1),a(this,w,()=>{l(this,u,M.clamp(devicePixelRatio,1,2));const e=this.getBoundingClientRect();l(this,c,e.width),l(this,o,e.height),t(this,h).width=t(this,c)*this.pixelRatio,t(this,h).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),this.renderEvent.notify(this.detail)}),a(this,g,e=>{l(this,v,e.timestamp),l(this,_,e.elapsed),t(this,p).notify(this.detail)})}get renderEvent(){return t(this,p)}get canvasElement(){return t(this,h)}get context(){return t(this,d)}get pixelRatio(){return t(this,u)}get width(){return t(this,c)}get height(){return t(this,o)}get detail(){return{width:t(this,c),height:t(this,o),element:this,canvasElement:t(this,h),pixelRatio:t(this,u),context:t(this,d),timestamp:t(this,v),elapsed:t(this,_)}}connectedCallback(){this.style.display="block",this.style.width="100%",this.style.height="100%",l(this,h,document.createElement("canvas")),t(this,h).style.cssText=`
2
+ display: block;
3
+ width: 100%;
4
+ height: 100%;
5
+ `,l(this,d,t(this,h).getContext("2d")),this.appendChild(t(this,h)),x.resizer.subscribe(t(this,w)),this.hasAttribute("static")||y.ticker.subscribe(t(this,g),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){x.resizer.unsubscribe(t(this,w)),y.ticker.unsubscribe(t(this,g)),t(this,p).close(),t(this,h).remove(),this.style.display="",this.style.width="",this.style.height=""}};p=new WeakMap;h=new WeakMap;d=new WeakMap;c=new WeakMap;o=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;w=new WeakMap;g=new WeakMap;exports.Canvas2DElement=R([k.define("canvas-2d")],exports.Canvas2DElement);
@@ -0,0 +1,30 @@
1
+ import { CustomElement } from '../custom-element';
2
+ import { Notifier } from '../notifier';
3
+ export interface Canvas2DRenderDetail {
4
+ pixelRatio: number;
5
+ width: number;
6
+ height: number;
7
+ element: HTMLElement;
8
+ canvasElement: HTMLElement;
9
+ context: CanvasRenderingContext2D;
10
+ timestamp: number;
11
+ elapsed: number;
12
+ }
13
+ export type Canvas2DRenderCallback = (detail: Canvas2DRenderDetail) => void;
14
+ export declare class Canvas2DElement extends CustomElement {
15
+ #private;
16
+ get renderEvent(): Notifier<Canvas2DRenderCallback>;
17
+ get canvasElement(): HTMLCanvasElement;
18
+ get context(): CanvasRenderingContext2D;
19
+ get pixelRatio(): number;
20
+ get width(): number;
21
+ get height(): number;
22
+ get detail(): Canvas2DRenderDetail;
23
+ protected connectedCallback(): void;
24
+ protected disconnectedCallback(): void;
25
+ }
26
+ declare global {
27
+ interface HTMLElementTagNameMap {
28
+ 'canvas-2d': Canvas2DElement;
29
+ }
30
+ }
@@ -0,0 +1,90 @@
1
+ import { CustomElement as E, define as W } from "../custom-element/index.js";
2
+ import { Notifier as M } from "../notifier/index.js";
3
+ import { resizer as x } from "../resizer/index.js";
4
+ import { ticker as y } from "../ticker/index.js";
5
+ import { c as R } from "../math-_a3IpKOc.js";
6
+ import "../browser-S4eq8AeN.js";
7
+ import "../function-zwSFehNd.js";
8
+ import "../intersector/index.js";
9
+ var b = Object.defineProperty, P = Object.getOwnPropertyDescriptor, A = (e, i, s, r) => {
10
+ for (var n = r > 1 ? void 0 : r ? P(i, s) : i, f = e.length - 1, g; f >= 0; f--)
11
+ (g = e[f]) && (n = (r ? g(i, s, n) : g(n)) || n);
12
+ return r && n && b(i, s, n), n;
13
+ }, C = (e, i, s) => {
14
+ if (!i.has(e))
15
+ throw TypeError("Cannot " + s);
16
+ }, t = (e, i, s) => (C(e, i, "read from private field"), s ? s.call(e) : i.get(e)), a = (e, i, s) => {
17
+ if (i.has(e))
18
+ throw TypeError("Cannot add the same private member more than once");
19
+ i instanceof WeakSet ? i.add(e) : i.set(e, s);
20
+ }, l = (e, i, s, r) => (C(e, i, "write to private field"), r ? r.call(e, s) : i.set(e, s), s), c, h, d, p, o, m, u, v, w, _;
21
+ let k = class extends E {
22
+ constructor() {
23
+ super(...arguments), a(this, c, new M()), a(this, h, null), a(this, d, null), a(this, p, 0), a(this, o, 0), a(this, m, 1), a(this, u, 0), a(this, v, 1), a(this, w, () => {
24
+ l(this, m, R(devicePixelRatio, 1, 2));
25
+ const e = this.getBoundingClientRect();
26
+ l(this, p, e.width), l(this, o, e.height), t(this, h).width = t(this, p) * this.pixelRatio, t(this, h).height = t(this, o) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), this.renderEvent.notify(this.detail);
27
+ }), a(this, _, (e) => {
28
+ l(this, u, e.timestamp), l(this, v, e.elapsed), t(this, c).notify(this.detail);
29
+ });
30
+ }
31
+ get renderEvent() {
32
+ return t(this, c);
33
+ }
34
+ get canvasElement() {
35
+ return t(this, h);
36
+ }
37
+ get context() {
38
+ return t(this, d);
39
+ }
40
+ get pixelRatio() {
41
+ return t(this, m);
42
+ }
43
+ get width() {
44
+ return t(this, p);
45
+ }
46
+ get height() {
47
+ return t(this, o);
48
+ }
49
+ get detail() {
50
+ return {
51
+ width: t(this, p),
52
+ height: t(this, o),
53
+ element: this,
54
+ canvasElement: t(this, h),
55
+ pixelRatio: t(this, m),
56
+ context: t(this, d),
57
+ timestamp: t(this, u),
58
+ elapsed: t(this, v)
59
+ };
60
+ }
61
+ connectedCallback() {
62
+ this.style.display = "block", this.style.width = "100%", this.style.height = "100%", l(this, h, document.createElement("canvas")), t(this, h).style.cssText = `
63
+ display: block;
64
+ width: 100%;
65
+ height: 100%;
66
+ `, l(this, d, t(this, h).getContext("2d")), this.appendChild(t(this, h)), x.subscribe(t(this, w)), this.hasAttribute("static") || y.subscribe(t(this, _), {
67
+ culling: this,
68
+ maxFPS: this.hasAttribute("fps") ? parseInt(this.getAttribute("fps")) : void 0
69
+ });
70
+ }
71
+ disconnectedCallback() {
72
+ x.unsubscribe(t(this, w)), y.unsubscribe(t(this, _)), t(this, c).close(), t(this, h).remove(), this.style.display = "", this.style.width = "", this.style.height = "";
73
+ }
74
+ };
75
+ c = /* @__PURE__ */ new WeakMap();
76
+ h = /* @__PURE__ */ new WeakMap();
77
+ d = /* @__PURE__ */ new WeakMap();
78
+ p = /* @__PURE__ */ new WeakMap();
79
+ o = /* @__PURE__ */ new WeakMap();
80
+ m = /* @__PURE__ */ new WeakMap();
81
+ u = /* @__PURE__ */ new WeakMap();
82
+ v = /* @__PURE__ */ new WeakMap();
83
+ w = /* @__PURE__ */ new WeakMap();
84
+ _ = /* @__PURE__ */ new WeakMap();
85
+ k = A([
86
+ W("canvas-2d")
87
+ ], k);
88
+ export {
89
+ k as Canvas2DElement
90
+ };
@@ -0,0 +1,9 @@
1
+ import { Notifier } from '../notifier';
2
+ export type ControlsValue = number | 'max' | 'min';
3
+ export type ControlsCallback = (value: ControlsValue) => void;
4
+ export declare abstract class Controls {
5
+ #private;
6
+ get changeEvent(): Notifier<ControlsCallback>;
7
+ abstract connect(): void;
8
+ abstract disconnect(): void;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { Controls } from './Controls';
2
+ export interface KeyboardControlsOptions {
3
+ element?: HTMLElement;
4
+ }
5
+ export declare class KeyboardControls extends Controls {
6
+ #private;
7
+ constructor(options?: KeyboardControlsOptions);
8
+ connect(): void;
9
+ disconnect(): void;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { Controls } from './Controls';
2
+ export interface LinearControlsOptions {
3
+ speed?: number;
4
+ }
5
+ export declare class LinearControls extends Controls {
6
+ #private;
7
+ speed: number;
8
+ constructor(options?: LinearControlsOptions);
9
+ connect(): void;
10
+ disconnect(): void;
11
+ }
@@ -0,0 +1,7 @@
1
+ declare class User {
2
+ #private;
3
+ get isIdle(): boolean;
4
+ registerInteraction(): void;
5
+ }
6
+ export declare const user: User;
7
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Axes2D } from '../utils';
2
+ import { Controls } from './Controls';
3
+ export interface WheelControlsOptions {
4
+ axis?: Axes2D;
5
+ speed?: number;
6
+ debounce?: boolean;
7
+ element?: HTMLElement;
8
+ }
9
+ export declare class WheelControls extends Controls {
10
+ #private;
11
+ axis: Axes2D;
12
+ speed: number;
13
+ debounce: boolean;
14
+ constructor(options?: WheelControlsOptions);
15
+ connect(): void;
16
+ disconnect(): void;
17
+ }
@@ -0,0 +1 @@
1
+ "use strict";var u=Object.defineProperty;var a=(s,e,r)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var i=(s,e,r)=>(a(s,typeof e!="symbol"?e+"":e,r),r),d=(s,e,r)=>{if(!e.has(s))throw TypeError("Cannot "+r)};var n=(s,e,r)=>(d(s,e,"read from private field"),r?r.call(s):e.get(s)),l=(s,e,r)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,r)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../WheelControls-Hp5NWRZY.cjs"),c=require("../ticker/index.cjs");require("../browser-QbF6EW-w.cjs");require("../dom-QhWsdQS2.cjs");require("../notifier/index.cjs");require("../intersector/index.cjs");var t;class C extends o.Controls{constructor(r){super();i(this,"speed");l(this,t,r=>{this.changeEvent.notify(r.elapsed*this.speed)});this.speed=(r==null?void 0:r.speed)||1}connect(){c.ticker.subscribe(n(this,t))}disconnect(){c.ticker.unsubscribe(n(this,t))}}t=new WeakMap;exports.Controls=o.Controls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.user=o.user;exports.LinearControls=C;
@@ -0,0 +1,5 @@
1
+ export { Controls, type ControlsValue } from './Controls';
2
+ export { KeyboardControls } from './KeyboardControls';
3
+ export { LinearControls, type LinearControlsOptions } from './LinearControls';
4
+ export { WheelControls, type WheelControlsOptions } from './WheelControls';
5
+ export { user } from './User';
@@ -0,0 +1,43 @@
1
+ var c = Object.defineProperty;
2
+ var m = (s, e, r) => e in s ? c(s, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[e] = r;
3
+ var i = (s, e, r) => (m(s, typeof e != "symbol" ? e + "" : e, r), r), p = (s, e, r) => {
4
+ if (!e.has(s))
5
+ throw TypeError("Cannot " + r);
6
+ };
7
+ var o = (s, e, r) => (p(s, e, "read from private field"), r ? r.call(s) : e.get(s)), a = (s, e, r) => {
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, r);
11
+ };
12
+ import { C as l } from "../WheelControls-F-xg5-oq.js";
13
+ import { K as W, W as g, u as v } from "../WheelControls-F-xg5-oq.js";
14
+ import { ticker as n } from "../ticker/index.js";
15
+ import "../browser-S4eq8AeN.js";
16
+ import "../dom-bHEwc_xV.js";
17
+ import "../notifier/index.js";
18
+ import "../intersector/index.js";
19
+ var t;
20
+ class k extends l {
21
+ constructor(r) {
22
+ super();
23
+ i(this, "speed");
24
+ a(this, t, (r) => {
25
+ this.changeEvent.notify(r.elapsed * this.speed);
26
+ });
27
+ this.speed = (r == null ? void 0 : r.speed) || 1;
28
+ }
29
+ connect() {
30
+ n.subscribe(o(this, t));
31
+ }
32
+ disconnect() {
33
+ n.unsubscribe(o(this, t));
34
+ }
35
+ }
36
+ t = new WeakMap();
37
+ export {
38
+ l as Controls,
39
+ W as KeyboardControls,
40
+ k as LinearControls,
41
+ g as WheelControls,
42
+ v as user
43
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";var r=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var n=(t,e,s)=>(r(t,e,"read from private field"),s?s.call(t):e.get(t)),d=(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)},c=(t,e,s,l)=>(r(t,e,"write to private field"),l?l.call(t,s):e.set(t,s),s);var a=(t,e,s)=>(r(t,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i,o,h;class u{constructor(){d(this,o);d(this,i,null)}parse(e){a(this,o,h).call(this),n(this,i).style.left=e;const s=getComputedStyle(n(this,i)).getPropertyValue("left");return parseFloat(s)}}i=new WeakMap,o=new WeakSet,h=function(){n(this,i)||(c(this,i,document.createElement("div")),n(this,i).style.cssText=`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 0;
6
+ height: 0;
7
+ visibility: hidden;
8
+ `),document.body.contains(n(this,i))||document.body.prepend(n(this,i))};const m=new u;exports.cssUnitParser=m;
@@ -0,0 +1,6 @@
1
+ declare class CSSUnitParser {
2
+ #private;
3
+ parse(value: string): number;
4
+ }
5
+ export declare const cssUnitParser: CSSUnitParser;
6
+ export {};
@@ -0,0 +1,36 @@
1
+ var d = (t, e, i) => {
2
+ if (!e.has(t))
3
+ throw TypeError("Cannot " + i);
4
+ };
5
+ var n = (t, e, i) => (d(t, e, "read from private field"), i ? i.call(t) : e.get(t)), l = (t, e, i) => {
6
+ if (e.has(t))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ e instanceof WeakSet ? e.add(t) : e.set(t, i);
9
+ }, h = (t, e, i, r) => (d(t, e, "write to private field"), r ? r.call(t, i) : e.set(t, i), i);
10
+ var c = (t, e, i) => (d(t, e, "access private method"), i);
11
+ var s, o, m;
12
+ class a {
13
+ constructor() {
14
+ l(this, o);
15
+ l(this, s, null);
16
+ }
17
+ parse(e) {
18
+ c(this, o, m).call(this), n(this, s).style.left = e;
19
+ const i = getComputedStyle(n(this, s)).getPropertyValue("left");
20
+ return parseFloat(i);
21
+ }
22
+ }
23
+ s = new WeakMap(), o = new WeakSet(), m = function() {
24
+ n(this, s) || (h(this, s, document.createElement("div")), n(this, s).style.cssText = `
25
+ position: fixed;
26
+ top: 0;
27
+ left: 0;
28
+ width: 0;
29
+ height: 0;
30
+ visibility: hidden;
31
+ `), document.body.contains(n(this, s)) || document.body.prepend(n(this, s));
32
+ };
33
+ const u = new a();
34
+ export {
35
+ u as cssUnitParser
36
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../browser-QbF6EW-w.cjs");function n(e){return function(s){t.isBrowser&&!customElements.get(e)&&customElements.define(e,s)}}const o=t.isBrowser?window.HTMLElement:class{attachShadow(...e){}};class r extends o{}exports.CustomElement=r;exports.define=n;
@@ -0,0 +1,8 @@
1
+ export declare function define(name: string): (Constructor: CustomElementConstructor) => void;
2
+ declare const HTMLElement: {
3
+ new (): HTMLElement;
4
+ prototype: HTMLElement;
5
+ };
6
+ export declare class CustomElement extends HTMLElement {
7
+ }
8
+ export {};
@@ -0,0 +1,16 @@
1
+ import { i as t } from "../browser-S4eq8AeN.js";
2
+ function i(e) {
3
+ return function(n) {
4
+ t && !customElements.get(e) && customElements.define(e, n);
5
+ };
6
+ }
7
+ const s = t ? window.HTMLElement : class {
8
+ attachShadow(...e) {
9
+ }
10
+ };
11
+ class m extends s {
12
+ }
13
+ export {
14
+ m as CustomElement,
15
+ i as define
16
+ };
@@ -0,0 +1,17 @@
1
+ import { TierResult } from 'detect-gpu';
2
+ export type DeviceOS = 'macOS' | 'iOS' | 'Windows' | 'Android' | 'Linux' | 'unknown';
3
+ declare class Device {
4
+ #private;
5
+ constructor();
6
+ get OS(): string;
7
+ get gpu(): string;
8
+ get gpuTier(): number;
9
+ get gpuDetection(): Promise<TierResult>;
10
+ get isMobile(): boolean;
11
+ get isTouch(): boolean;
12
+ get isWebgl(): boolean;
13
+ get isWebp(): boolean;
14
+ get isApple(): boolean;
15
+ }
16
+ export declare const device: Device;
17
+ export {};
@@ -0,0 +1,27 @@
1
+ import { Store } from '../store';
2
+ export declare enum ViewportBreakpoints {
3
+ 'mobile' = "600px",
4
+ 'tablet' = "1024px",
5
+ 'notebook' = "1280px",
6
+ 'desktop' = "1281px"
7
+ }
8
+ export declare enum ViewportMediaRules {
9
+ '<=mobile' = "(max-width: 600px)",
10
+ '>=mobile' = "(min-width: 601px)",
11
+ '<=tablet' = "(max-width: 1024px)",
12
+ '>=tablet' = "(min-width: 1025px)",
13
+ '<=notebook' = "(max-width: 1280px)",
14
+ '>=notebook' = "(min-width: 1281px)",
15
+ '<=desktop' = "(max-width: 1280px)",
16
+ '>=desktop' = "(min-width: 1281px)"
17
+ }
18
+ declare class Viewport {
19
+ #private;
20
+ constructor();
21
+ get width(): number;
22
+ get height(): number;
23
+ get store_type(): Store<"mobile" | "tablet" | "notebook" | "desktop" | undefined, import('../store').StoreEntry<"mobile" | "tablet" | "notebook" | "desktop" | undefined>>;
24
+ get pixelRatio(): number;
25
+ }
26
+ export declare const viewport: Viewport;
27
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";var S=(t,n,r)=>{if(!n.has(t))throw TypeError("Cannot "+r)};var i=(t,n,r)=>(S(t,n,"read from private field"),r?r.call(t):n.get(t)),s=(t,n,r)=>{if(n.has(t))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(t):n.set(t,r)},e=(t,n,r,v)=>(S(t,n,"write to private field"),v?v.call(t,r):n.set(t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../order/index.cjs"),k=require("../resizer/index.cjs"),A=require("../browser-QbF6EW-w.cjs"),M=require("detect-gpu"),_=require("../Store-WXFmsaEI.cjs");require("../notifier/index.cjs");require("../function-QP7IreXR.cjs");var o,l,g,c,m,u,p,x,d;class I{constructor(){s(this,o,"unknown");s(this,l,"unknown");s(this,g,0);s(this,c,null);s(this,m,!1);s(this,u,!1);s(this,p,!1);s(this,x,!1);s(this,d,!1);var n,r;if(A.isBrowser){e(this,c,M.getGPUTier()),i(this,c).then(a=>{e(this,l,a.gpu||"unknown"),e(this,g,a.tier)}),k.resizer.subscribe(()=>{e(this,m,/Mobi|Android/i.test(navigator.userAgent)),e(this,u,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,u,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},W.RESIZE_ORDER.DEVICE);{const a=document.createElement("canvas"),P=a.getContext("webgl")||a.getContext("experimental-webgl");e(this,p,P&&P instanceof WebGLRenderingContext||!1)}{const a=document.createElement("canvas");a.getContext("2d")&&e(this,x,a.toDataURL("image/webp").indexOf("data:image/webp")==0)}const v=window.navigator.userAgent,E=((r=(n=window.navigator)==null?void 0:n.userAgentData)==null?void 0:r.platform)||window.navigator.platform,T=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],C=["Win32","Win64","Windows","WinCE"],q=["iPhone","iPad","iPod"];T.includes(E)?(e(this,o,"macOS"),e(this,d,!0)):q.includes(E)?(e(this,o,"iOS"),e(this,d,!0)):C.includes(E)?e(this,o,"Windows"):/Android/.test(v)?e(this,o,"Android"):/Linux/.test(E)?e(this,o,"Linux"):e(this,o,"unknown")}}get OS(){return i(this,o)}get gpu(){return i(this,l)}get gpuTier(){return i(this,g)}get gpuDetection(){return i(this,c)}get isMobile(){return i(this,m)}get isTouch(){return i(this,u)}get isWebgl(){return i(this,p)}get isWebp(){return i(this,x)}get isApple(){return i(this,d)}}o=new WeakMap,l=new WeakMap,g=new WeakMap,c=new WeakMap,m=new WeakMap,u=new WeakMap,p=new WeakMap,x=new WeakMap,d=new WeakMap;const R=new I;var D=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(D||{}),O=(t=>(t["<=mobile"]="(max-width: 600px)",t[">=mobile"]="(min-width: 601px)",t["<=tablet"]="(max-width: 1024px)",t[">=tablet"]="(min-width: 1025px)",t["<=notebook"]="(max-width: 1280px)",t[">=notebook"]="(min-width: 1281px)",t["<=desktop"]="(max-width: 1280px)",t[">=desktop"]="(min-width: 1281px)",t))(O||{}),w,b,f,h;class y{constructor(){s(this,w,0);s(this,b,0);s(this,f,0);s(this,h,new _.Store(void 0));A.isBrowser&&k.resizer.subscribe(()=>{e(this,w,document.documentElement.clientWidth),e(this,b,innerHeight),e(this,f,devicePixelRatio),matchMedia("(max-width: 600px)").matches?i(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?i(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?i(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(i(this,h).current="desktop")},W.RESIZE_ORDER.DEVICE)}get width(){return i(this,w)}get height(){return i(this,b)}get store_type(){return i(this,h)}get pixelRatio(){return i(this,f)}}w=new WeakMap,b=new WeakMap,f=new WeakMap,h=new WeakMap;const L=new y;exports.ViewportBreakpoints=D;exports.ViewportMediaRules=O;exports.device=R;exports.viewport=L;
@@ -0,0 +1,2 @@
1
+ export { device, type DeviceOS } from './Device';
2
+ export { viewport, ViewportBreakpoints, ViewportMediaRules } from './Viewport';
@@ -0,0 +1,123 @@
1
+ var W = (t, n, o) => {
2
+ if (!n.has(t))
3
+ throw TypeError("Cannot " + o);
4
+ };
5
+ var i = (t, n, o) => (W(t, n, "read from private field"), o ? o.call(t) : n.get(t)), s = (t, n, o) => {
6
+ if (n.has(t))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ n instanceof WeakSet ? n.add(t) : n.set(t, o);
9
+ }, e = (t, n, o, v) => (W(t, n, "write to private field"), v ? v.call(t, o) : n.set(t, o), o);
10
+ import { RESIZE_ORDER as k } from "../order/index.js";
11
+ import { resizer as A } from "../resizer/index.js";
12
+ import { i as C } from "../browser-S4eq8AeN.js";
13
+ import { getGPUTier as O } from "detect-gpu";
14
+ import { S as I } from "../Store-2hWEUGTj.js";
15
+ import "../notifier/index.js";
16
+ import "../function-zwSFehNd.js";
17
+ var r, d, l, c, g, m, p, x, u;
18
+ class L {
19
+ constructor() {
20
+ s(this, r, "unknown");
21
+ s(this, d, "unknown");
22
+ s(this, l, 0);
23
+ s(this, c, null);
24
+ s(this, g, !1);
25
+ s(this, m, !1);
26
+ s(this, p, !1);
27
+ s(this, x, !1);
28
+ s(this, u, !1);
29
+ var n, o;
30
+ if (C) {
31
+ e(this, c, O()), i(this, c).then((a) => {
32
+ e(this, d, a.gpu || "unknown"), e(this, l, a.tier);
33
+ }), A.subscribe(() => {
34
+ e(this, g, /Mobi|Android/i.test(navigator.userAgent)), e(this, m, "ontouchstart" in window || navigator.maxTouchPoints > 0), setTimeout(() => {
35
+ e(this, m, "ontouchstart" in window || navigator.maxTouchPoints > 0);
36
+ }, 0);
37
+ }, k.DEVICE);
38
+ {
39
+ const a = document.createElement("canvas"), E = a.getContext("webgl") || a.getContext("experimental-webgl");
40
+ e(this, p, E && E instanceof WebGLRenderingContext || !1);
41
+ }
42
+ {
43
+ const a = document.createElement("canvas");
44
+ a.getContext("2d") && e(this, x, a.toDataURL("image/webp").indexOf("data:image/webp") == 0);
45
+ }
46
+ const v = window.navigator.userAgent, P = ((o = (n = window.navigator) == null ? void 0 : n.userAgentData) == null ? void 0 : o.platform) || window.navigator.platform, D = ["Macintosh", "MacIntel", "MacPPC", "Mac68K", "macOS"], S = ["Win32", "Win64", "Windows", "WinCE"], T = ["iPhone", "iPad", "iPod"];
47
+ D.includes(P) ? (e(this, r, "macOS"), e(this, u, !0)) : T.includes(P) ? (e(this, r, "iOS"), e(this, u, !0)) : S.includes(P) ? e(this, r, "Windows") : /Android/.test(v) ? e(this, r, "Android") : /Linux/.test(P) ? e(this, r, "Linux") : e(this, r, "unknown");
48
+ }
49
+ }
50
+ get OS() {
51
+ return i(this, r);
52
+ }
53
+ get gpu() {
54
+ return i(this, d);
55
+ }
56
+ get gpuTier() {
57
+ return i(this, l);
58
+ }
59
+ get gpuDetection() {
60
+ return i(this, c);
61
+ }
62
+ get isMobile() {
63
+ return i(this, g);
64
+ }
65
+ get isTouch() {
66
+ return i(this, m);
67
+ }
68
+ get isWebgl() {
69
+ return i(this, p);
70
+ }
71
+ get isWebp() {
72
+ return i(this, x);
73
+ }
74
+ get isApple() {
75
+ return i(this, u);
76
+ }
77
+ }
78
+ r = new WeakMap(), d = new WeakMap(), l = new WeakMap(), c = new WeakMap(), g = new WeakMap(), m = new WeakMap(), p = new WeakMap(), x = new WeakMap(), u = new WeakMap();
79
+ const q = new L();
80
+ var M = /* @__PURE__ */ ((t) => (t.mobile = "600px", t.tablet = "1024px", t.notebook = "1280px", t.desktop = "1281px", t))(M || {}), _ = /* @__PURE__ */ ((t) => (t["<=mobile"] = "(max-width: 600px)", t[">=mobile"] = "(min-width: 601px)", t["<=tablet"] = "(max-width: 1024px)", t[">=tablet"] = "(min-width: 1025px)", t["<=notebook"] = "(max-width: 1280px)", t[">=notebook"] = "(min-width: 1281px)", t["<=desktop"] = "(max-width: 1280px)", t[">=desktop"] = "(min-width: 1281px)", t))(_ || {}), w, f, b, h;
81
+ class y {
82
+ constructor() {
83
+ s(this, w, 0);
84
+ s(this, f, 0);
85
+ s(this, b, 0);
86
+ s(this, h, new I(void 0));
87
+ C && A.subscribe(() => {
88
+ e(this, w, document.documentElement.clientWidth), e(this, f, innerHeight), e(this, b, devicePixelRatio), matchMedia(
89
+ "(max-width: 600px)"
90
+ /* <=mobile */
91
+ ).matches ? i(this, h).current = "mobile" : matchMedia(
92
+ "(max-width: 1024px)"
93
+ /* <=tablet */
94
+ ).matches ? i(this, h).current = "tablet" : matchMedia(
95
+ "(max-width: 1280px)"
96
+ /* <=notebook */
97
+ ).matches ? i(this, h).current = "notebook" : matchMedia(
98
+ "(min-width: 1281px)"
99
+ /* >=desktop */
100
+ ).matches && (i(this, h).current = "desktop");
101
+ }, k.DEVICE);
102
+ }
103
+ get width() {
104
+ return i(this, w);
105
+ }
106
+ get height() {
107
+ return i(this, f);
108
+ }
109
+ get store_type() {
110
+ return i(this, h);
111
+ }
112
+ get pixelRatio() {
113
+ return i(this, b);
114
+ }
115
+ }
116
+ w = new WeakMap(), f = new WeakMap(), b = new WeakMap(), h = new WeakMap();
117
+ const F = new y();
118
+ export {
119
+ M as ViewportBreakpoints,
120
+ _ as ViewportMediaRules,
121
+ q as device,
122
+ F as viewport
123
+ };
@@ -0,0 +1 @@
1
+ "use strict";function r(t,e){if(!t)return null;let n=t.parentElement;return t.parentElement instanceof e||(n=r(t.parentElement,e)),n}function l(t,e=document){return typeof t=="string"?e.querySelector(t):t}function u(t,e=null){if(e=e||t,!t||!(t instanceof HTMLElement))return document.body;if(e!==t){const n=getComputedStyle(t);if(n.overflow.includes("auto")||n.overflow.includes("scroll"))return t}return u(t.parentNode,e)}exports.findParentElement=r;exports.findScrollParentElement=u;exports.getElement=l;
@@ -0,0 +1,24 @@
1
+ function r(t, n) {
2
+ if (!t)
3
+ return null;
4
+ let e = t.parentElement;
5
+ return t.parentElement instanceof n || (e = r(t.parentElement, n)), e;
6
+ }
7
+ function f(t, n = document) {
8
+ return typeof t == "string" ? n.querySelector(t) : t;
9
+ }
10
+ function u(t, n = null) {
11
+ if (n = n || t, !t || !(t instanceof HTMLElement))
12
+ return document.body;
13
+ if (n !== t) {
14
+ const e = getComputedStyle(t);
15
+ if (e.overflow.includes("auto") || e.overflow.includes("scroll"))
16
+ return t;
17
+ }
18
+ return u(t.parentNode, n);
19
+ }
20
+ export {
21
+ u as a,
22
+ r as f,
23
+ f as g
24
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=e=>e,n=e=>e*e,s=e=>e*(2-e),a=e=>e<.5?2*e*e:-1+(4-2*e)*e,r=e=>e*e*e,c=e=>--e*e*e+1,o=e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,I=e=>e*e*e*e,O=e=>1- --e*e*e*e,Q=e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,i=e=>e*e*e*e*e,t=e=>1+--e*e*e*e*e,b=e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e,d=e=>e===0?0:2**(10*(e-1)),p=e=>e===1?1:1-2**(-10*e),x=e=>e===0||e===1?e:e<.5?.5*2**(20*(e-.5)):.5*(2-Math.abs(2**(-20*(e-.5))));exports.easeInCubic=r;exports.easeInExpo=d;exports.easeInOutCubic=o;exports.easeInOutExpo=x;exports.easeInOutQuad=a;exports.easeInOutQuart=Q;exports.easeInOutQuint=b;exports.easeInQuad=n;exports.easeInQuart=I;exports.easeInQuint=i;exports.easeOutCubic=c;exports.easeOutExpo=p;exports.easeOutQuad=s;exports.easeOutQuart=O;exports.easeOutQuint=t;exports.linear=u;