aptechka 0.47.0 → 0.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,8 +3,6 @@ declare class Device {
3
3
  #private;
4
4
  constructor();
5
5
  get OS(): string;
6
- get gpu(): string;
7
- get gpuTier(): number;
8
6
  get isMobile(): boolean;
9
7
  get isTouch(): boolean;
10
8
  get isWebgl(): boolean;
@@ -1 +1 @@
1
- "use strict";var P=t=>{throw TypeError(t)};var S=(t,s,n)=>s.has(t)||P("Cannot "+n);var i=(t,s,n)=>(S(t,s,"read from private field"),n?n.call(t):s.get(t)),o=(t,s,n)=>s.has(t)?P("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,n),e=(t,s,n,f)=>(S(t,s,"write to private field"),f?f.call(t,n):s.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../order/index.cjs"),k=require("../window-resizer/index.cjs"),z=require("../index-Cqw2NKev.cjs"),D=require("../Store-DRp_K37w.cjs");var r,p,b,d,a,u,l,c;class M{constructor(){o(this,r);o(this,p);o(this,b);o(this,d);o(this,a);o(this,u);o(this,l);o(this,c);var s,n;if(e(this,r,"unknown"),e(this,p,"unknown"),e(this,b,0),e(this,d,!1),e(this,a,!1),e(this,u,!1),e(this,l,!1),e(this,c,!1),this.resize=()=>{e(this,d,/Mobi|Android/i.test(navigator.userAgent)),e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},z.isBrowser){this.resize(),k.windowResizer.subscribe(this.resize,W.RESIZE_ORDER.DEVICE);{const x=document.createElement("canvas"),E=x.getContext("webgl")||x.getContext("experimental-webgl");e(this,u,E&&E instanceof WebGLRenderingContext||!1)}{const x=document.createElement("canvas");x.getContext("2d")&&e(this,l,x.toDataURL("image/webp").indexOf("data:image/webp")==0)}const f=window.navigator.userAgent,v=((n=(s=window.navigator)==null?void 0:s.userAgentData)==null?void 0:n.platform)||window.navigator.platform,C=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],R=["Win32","Win64","Windows","WinCE"],T=["iPhone","iPad","iPod"];C.includes(v)?(e(this,r,"macOS"),e(this,c,!0)):T.includes(v)?(e(this,r,"iOS"),e(this,c,!0)):R.includes(v)?e(this,r,"Windows"):/Android/.test(f)?e(this,r,"Android"):/Linux/.test(v)?e(this,r,"Linux"):e(this,r,"unknown")}}get OS(){return i(this,r)}get gpu(){return i(this,p)}get gpuTier(){return i(this,b)}get isMobile(){return i(this,d)}get isTouch(){return i(this,a)}get isWebgl(){return i(this,u)}get isWebp(){return i(this,l)}get isApple(){return i(this,c)}}r=new WeakMap,p=new WeakMap,b=new WeakMap,d=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap;const I=new M;var A=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(A||{}),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||{}),m,g,w,h;class _{constructor(){o(this,m);o(this,g);o(this,w);o(this,h);e(this,m,0),e(this,g,0),e(this,w,0),e(this,h,new D.Store(void 0)),this.resize=()=>{e(this,m,document.documentElement.clientWidth),e(this,g,innerHeight),e(this,w,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")},z.isBrowser&&(this.resize(),k.windowResizer.subscribe(this.resize,W.RESIZE_ORDER.DEVICE))}get width(){return i(this,m)}get height(){return i(this,g)}get type(){return i(this,h)}get pixelRatio(){return i(this,w)}}m=new WeakMap,g=new WeakMap,w=new WeakMap,h=new WeakMap;const q=new _;exports.ViewportBreakpoints=A;exports.ViewportMediaRules=O;exports.device=I;exports.viewport=q;
1
+ "use strict";var v=t=>{throw TypeError(t)};var E=(t,i,n)=>i.has(t)||v("Cannot "+n);var s=(t,i,n)=>(E(t,i,"read from private field"),n?n.call(t):i.get(t)),o=(t,i,n)=>i.has(t)?v("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,n),e=(t,i,n,b)=>(E(t,i,"write to private field"),b?b.call(t,n):i.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../order/index.cjs"),S=require("../window-resizer/index.cjs"),W=require("../index-Cqw2NKev.cjs"),R=require("../Store-DRp_K37w.cjs");var r,d,a,l,m,c;class D{constructor(){o(this,r);o(this,d);o(this,a);o(this,l);o(this,m);o(this,c);var i,n;if(e(this,r,"unknown"),e(this,d,!1),e(this,a,!1),e(this,l,!1),e(this,m,!1),e(this,c,!1),this.resize=()=>{e(this,d,/Mobi|Android/i.test(navigator.userAgent)),e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},W.isBrowser){this.resize(),S.windowResizer.subscribe(this.resize,P.RESIZE_ORDER.DEVICE);{const g=document.createElement("canvas"),f=g.getContext("webgl")||g.getContext("experimental-webgl");e(this,l,f&&f instanceof WebGLRenderingContext||!1)}{const g=document.createElement("canvas");g.getContext("2d")&&e(this,m,g.toDataURL("image/webp").indexOf("data:image/webp")==0)}const b=window.navigator.userAgent,p=((n=(i=window.navigator)==null?void 0:i.userAgentData)==null?void 0:n.platform)||window.navigator.platform,O=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],k=["Win32","Win64","Windows","WinCE"],C=["iPhone","iPad","iPod"];O.includes(p)?(e(this,r,"macOS"),e(this,c,!0)):C.includes(p)?(e(this,r,"iOS"),e(this,c,!0)):k.includes(p)?e(this,r,"Windows"):/Android/.test(b)?e(this,r,"Android"):/Linux/.test(p)?e(this,r,"Linux"):e(this,r,"unknown")}}get OS(){return s(this,r)}get isMobile(){return s(this,d)}get isTouch(){return s(this,a)}get isWebgl(){return s(this,l)}get isWebp(){return s(this,m)}get isApple(){return s(this,c)}}r=new WeakMap,d=new WeakMap,a=new WeakMap,l=new WeakMap,m=new WeakMap,c=new WeakMap;const M=new D;var z=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(z||{}),A=(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))(A||{}),u,w,x,h;class T{constructor(){o(this,u);o(this,w);o(this,x);o(this,h);e(this,u,0),e(this,w,0),e(this,x,0),e(this,h,new R.Store(void 0)),this.resize=()=>{e(this,u,document.documentElement.clientWidth),e(this,w,innerHeight),e(this,x,devicePixelRatio),matchMedia("(max-width: 600px)").matches?s(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?s(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?s(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(s(this,h).current="desktop")},W.isBrowser&&(this.resize(),S.windowResizer.subscribe(this.resize,P.RESIZE_ORDER.DEVICE))}get width(){return s(this,u)}get height(){return s(this,w)}get type(){return s(this,h)}get pixelRatio(){return s(this,x)}}u=new WeakMap,w=new WeakMap,x=new WeakMap,h=new WeakMap;const I=new T;exports.ViewportBreakpoints=z;exports.ViewportMediaRules=A;exports.device=M;exports.viewport=I;
@@ -1,116 +1,108 @@
1
- var P = (t) => {
1
+ var v = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var W = (t, s, n) => s.has(t) || P("Cannot " + n);
5
- var e = (t, s, n) => (W(t, s, "read from private field"), n ? n.call(t) : s.get(t)), o = (t, s, n) => s.has(t) ? P("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, n), i = (t, s, n, b) => (W(t, s, "write to private field"), b ? b.call(t, n) : s.set(t, n), n);
6
- import { RESIZE_ORDER as A } from "../order/index.js";
7
- import { windowResizer as k } from "../window-resizer/index.js";
8
- import { i as C } from "../index-euf5anj6.js";
9
- import { S as T } from "../Store-D2xCXENW.js";
10
- var h, w, f, m, a, d, l, c;
11
- class D {
4
+ var E = (t, e, n) => e.has(t) || v("Cannot " + n);
5
+ var s = (t, e, n) => (E(t, e, "read from private field"), n ? n.call(t) : e.get(t)), o = (t, e, n) => e.has(t) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), i = (t, e, n, f) => (E(t, e, "write to private field"), f ? f.call(t, n) : e.set(t, n), n);
6
+ import { RESIZE_ORDER as P } from "../order/index.js";
7
+ import { windowResizer as W } from "../window-resizer/index.js";
8
+ import { i as A } from "../index-euf5anj6.js";
9
+ import { S as z } from "../Store-D2xCXENW.js";
10
+ var h, m, r, d, l, c;
11
+ class O {
12
12
  constructor() {
13
13
  o(this, h);
14
- o(this, w);
15
- o(this, f);
16
14
  o(this, m);
17
- o(this, a);
15
+ o(this, r);
18
16
  o(this, d);
19
17
  o(this, l);
20
18
  o(this, c);
21
- var s, n;
22
- if (i(this, h, "unknown"), i(this, w, "unknown"), i(this, f, 0), i(this, m, !1), i(this, a, !1), i(this, d, !1), i(this, l, !1), i(this, c, !1), this.resize = () => {
23
- i(this, m, /Mobi|Android/i.test(navigator.userAgent)), i(this, a, "ontouchstart" in window || navigator.maxTouchPoints > 0), setTimeout(() => {
24
- i(this, a, "ontouchstart" in window || navigator.maxTouchPoints > 0);
19
+ var e, n;
20
+ if (i(this, h, "unknown"), i(this, m, !1), i(this, r, !1), i(this, d, !1), i(this, l, !1), i(this, c, !1), this.resize = () => {
21
+ i(this, m, /Mobi|Android/i.test(navigator.userAgent)), i(this, r, "ontouchstart" in window || navigator.maxTouchPoints > 0), setTimeout(() => {
22
+ i(this, r, "ontouchstart" in window || navigator.maxTouchPoints > 0);
25
23
  }, 0);
26
- }, C) {
27
- this.resize(), k.subscribe(this.resize, A.DEVICE);
24
+ }, A) {
25
+ this.resize(), W.subscribe(this.resize, P.DEVICE);
28
26
  {
29
- const p = document.createElement("canvas"), E = p.getContext("webgl") || p.getContext("experimental-webgl");
30
- i(this, d, E && E instanceof WebGLRenderingContext || !1);
27
+ const w = document.createElement("canvas"), b = w.getContext("webgl") || w.getContext("experimental-webgl");
28
+ i(this, d, b && b instanceof WebGLRenderingContext || !1);
31
29
  }
32
30
  {
33
- const p = document.createElement("canvas");
34
- p.getContext("2d") && i(this, l, p.toDataURL("image/webp").indexOf("data:image/webp") == 0);
31
+ const w = document.createElement("canvas");
32
+ w.getContext("2d") && i(this, l, w.toDataURL("image/webp").indexOf("data:image/webp") == 0);
35
33
  }
36
- const b = window.navigator.userAgent, v = ((n = (s = window.navigator) == null ? void 0 : s.userAgentData) == null ? void 0 : n.platform) || window.navigator.platform, S = [
34
+ const f = window.navigator.userAgent, p = ((n = (e = window.navigator) == null ? void 0 : e.userAgentData) == null ? void 0 : n.platform) || window.navigator.platform, C = [
37
35
  "Macintosh",
38
36
  "MacIntel",
39
37
  "MacPPC",
40
38
  "Mac68K",
41
39
  "macOS"
42
- ], z = ["Win32", "Win64", "Windows", "WinCE"], O = ["iPhone", "iPad", "iPod"];
43
- S.includes(v) ? (i(this, h, "macOS"), i(this, c, !0)) : O.includes(v) ? (i(this, h, "iOS"), i(this, c, !0)) : z.includes(v) ? i(this, h, "Windows") : /Android/.test(b) ? i(this, h, "Android") : /Linux/.test(v) ? i(this, h, "Linux") : i(this, h, "unknown");
40
+ ], S = ["Win32", "Win64", "Windows", "WinCE"], k = ["iPhone", "iPad", "iPod"];
41
+ C.includes(p) ? (i(this, h, "macOS"), i(this, c, !0)) : k.includes(p) ? (i(this, h, "iOS"), i(this, c, !0)) : S.includes(p) ? i(this, h, "Windows") : /Android/.test(f) ? i(this, h, "Android") : /Linux/.test(p) ? i(this, h, "Linux") : i(this, h, "unknown");
44
42
  }
45
43
  }
46
44
  get OS() {
47
- return e(this, h);
48
- }
49
- get gpu() {
50
- return e(this, w);
51
- }
52
- get gpuTier() {
53
- return e(this, f);
45
+ return s(this, h);
54
46
  }
55
47
  get isMobile() {
56
- return e(this, m);
48
+ return s(this, m);
57
49
  }
58
50
  get isTouch() {
59
- return e(this, a);
51
+ return s(this, r);
60
52
  }
61
53
  get isWebgl() {
62
- return e(this, d);
54
+ return s(this, d);
63
55
  }
64
56
  get isWebp() {
65
- return e(this, l);
57
+ return s(this, l);
66
58
  }
67
59
  get isApple() {
68
- return e(this, c);
60
+ return s(this, c);
69
61
  }
70
62
  }
71
- h = new WeakMap(), w = new WeakMap(), f = new WeakMap(), m = new WeakMap(), a = new WeakMap(), d = new WeakMap(), l = new WeakMap(), c = new WeakMap();
72
- const U = new D();
73
- var I = /* @__PURE__ */ ((t) => (t.mobile = "600px", t.tablet = "1024px", t.notebook = "1280px", t.desktop = "1281px", t))(I || {}), L = /* @__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))(L || {}), u, g, x, r;
74
- class M {
63
+ h = new WeakMap(), m = new WeakMap(), r = new WeakMap(), d = new WeakMap(), l = new WeakMap(), c = new WeakMap();
64
+ const H = new O();
65
+ var D = /* @__PURE__ */ ((t) => (t.mobile = "600px", t.tablet = "1024px", t.notebook = "1280px", t.desktop = "1281px", t))(D || {}), T = /* @__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))(T || {}), u, x, g, a;
66
+ class I {
75
67
  constructor() {
76
68
  o(this, u);
77
- o(this, g);
78
69
  o(this, x);
79
- o(this, r);
80
- i(this, u, 0), i(this, g, 0), i(this, x, 0), i(this, r, new T(void 0)), this.resize = () => {
81
- i(this, u, document.documentElement.clientWidth), i(this, g, innerHeight), i(this, x, devicePixelRatio), matchMedia(
70
+ o(this, g);
71
+ o(this, a);
72
+ i(this, u, 0), i(this, x, 0), i(this, g, 0), i(this, a, new z(void 0)), this.resize = () => {
73
+ i(this, u, document.documentElement.clientWidth), i(this, x, innerHeight), i(this, g, devicePixelRatio), matchMedia(
82
74
  "(max-width: 600px)"
83
75
  /* <=mobile */
84
- ).matches ? e(this, r).current = "mobile" : matchMedia(
76
+ ).matches ? s(this, a).current = "mobile" : matchMedia(
85
77
  "(max-width: 1024px)"
86
78
  /* <=tablet */
87
- ).matches ? e(this, r).current = "tablet" : matchMedia(
79
+ ).matches ? s(this, a).current = "tablet" : matchMedia(
88
80
  "(max-width: 1280px)"
89
81
  /* <=notebook */
90
- ).matches ? e(this, r).current = "notebook" : matchMedia(
82
+ ).matches ? s(this, a).current = "notebook" : matchMedia(
91
83
  "(min-width: 1281px)"
92
84
  /* >=desktop */
93
- ).matches && (e(this, r).current = "desktop");
94
- }, C && (this.resize(), k.subscribe(this.resize, A.DEVICE));
85
+ ).matches && (s(this, a).current = "desktop");
86
+ }, A && (this.resize(), W.subscribe(this.resize, P.DEVICE));
95
87
  }
96
88
  get width() {
97
- return e(this, u);
89
+ return s(this, u);
98
90
  }
99
91
  get height() {
100
- return e(this, g);
92
+ return s(this, x);
101
93
  }
102
94
  get type() {
103
- return e(this, r);
95
+ return s(this, a);
104
96
  }
105
97
  get pixelRatio() {
106
- return e(this, x);
98
+ return s(this, g);
107
99
  }
108
100
  }
109
- u = new WeakMap(), g = new WeakMap(), x = new WeakMap(), r = new WeakMap();
110
- const Z = new M();
101
+ u = new WeakMap(), x = new WeakMap(), g = new WeakMap(), a = new WeakMap();
102
+ const K = new I();
111
103
  export {
112
- I as ViewportBreakpoints,
113
- L as ViewportMediaRules,
114
- U as device,
115
- Z as viewport
104
+ D as ViewportBreakpoints,
105
+ T as ViewportMediaRules,
106
+ H as device,
107
+ K as viewport
116
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.47.0",
3
+ "version": "0.47.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -385,19 +385,19 @@
385
385
  "dev": "vite --host --mode site"
386
386
  },
387
387
  "devDependencies": {
388
- "@types/node": "^22.7.7",
389
- "@types/three": "^0.169.0",
390
- "tsx": "^4.19.1",
391
- "vite": "^5.4.9",
392
- "vite-plugin-dts": "^4.2.4",
388
+ "@types/node": "^22.10.1",
389
+ "@types/three": "^0.170.0",
390
+ "tsx": "^4.19.2",
391
+ "vite": "^6.0.1",
392
+ "vite-plugin-dts": "^4.3.0",
393
393
  "vite-plugin-htmc": "0.1.15"
394
394
  },
395
395
  "dependencies": {
396
- "three": "^0.169.0",
396
+ "three": "^0.170.0",
397
397
  "urlpattern-polyfill": "^10.0.0"
398
398
  },
399
399
  "peerDependencies": {
400
- "three": "^0.167.1",
400
+ "three": "^0.170.0",
401
401
  "urlpattern-polyfill": "^10.0.0"
402
402
  }
403
403
  }