aptechka 0.41.2 → 0.41.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.
@@ -1 +1 @@
1
- "use strict";var b=r=>{throw TypeError(r)};var k=(r,n,t)=>n.has(r)||b("Cannot "+t);var e=(r,n,t)=>(k(r,n,"read from private field"),t?t.call(r):n.get(r)),o=(r,n,t)=>n.has(r)?b("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,t),i=(r,n,t,c)=>(k(r,n,"write to private field"),c?c.call(r,t):n.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../order/index.cjs"),B=require("../window-resizer/vanilla/index.cjs"),z=require("../Store-C2J4Q87x.cjs");var w,m,M,f,a,l,x;class I{constructor(n){o(this,w);o(this,m);o(this,M);o(this,f);o(this,a);o(this,l);o(this,x);i(this,w,n);const t=n.split(".");i(this,m,t.length>1?t.slice(0,-1).join("."):t.join("."));const c=/\d+x/g,u=t.find(p=>p.match(c));i(this,M,u?parseInt(u):1),u&&i(this,m,e(this,m).replace(`.${u}`,""));const h=/\d+max/g,g=/\d+min/g,$=/\d+mar/g,S=/\d+mir/g,E=t.find(p=>p.match(h)),s=t.find(p=>p.match(g)),d=t.find(p=>p.match($)),V=t.find(p=>p.match(S));d?(i(this,a,parseInt(d)),i(this,l,"max"),i(this,f,`(max-aspect-ratio: ${e(this,a)})`)):V?(i(this,a,parseInt(V)),i(this,l,"max"),i(this,f,`(min-aspect-ratio: ${e(this,a)})`)):E?(i(this,a,parseInt(E)),i(this,l,"max"),i(this,f,`(max-width: ${e(this,a)}px)`)):s?(i(this,a,parseInt(s)),i(this,f,`(min-width: ${e(this,a)}px)`),i(this,l,"min")):(i(this,a,0),i(this,f,`(min-width: ${e(this,a)}px)`),i(this,l,"min")),i(this,m,e(this,m).replace(`.${e(this,a)}${e(this,l)}`,"")),i(this,x,t[t.length-1]===e(this,m)?"":"."+t[t.length-1]),i(this,x,e(this,x).replace(`.${e(this,a)}${e(this,l)}`,"")),u&&i(this,x,e(this,x).replace(`.${u}`,""))}get url(){return e(this,w)}get name(){return e(this,m)}get density(){return e(this,M)}get query(){return e(this,f)}get extension(){return e(this,x)}get queryType(){return e(this,l)}get queryValue(){return e(this,a)}}w=new WeakMap,m=new WeakMap,M=new WeakMap,f=new WeakMap,a=new WeakMap,l=new WeakMap,x=new WeakMap;var y;class T{constructor(n,t){o(this,y);i(this,y,new Map);const c=(t==null?void 0:t.mediaBuckets)!==!1,u=typeof n=="string"?c?n.trim().split(",").map(s=>s.trim()).filter(s=>!!s):[n]:n,h=[];u.forEach(s=>{const d=new I(s);h.push([d.query,d])});const g=h.filter(s=>s[1].queryType.includes("max")).sort((s,d)=>d[1].queryValue-s[1].queryValue),$=h.filter(s=>s[1].queryType.includes("min")&&s[1].queryValue!==0).sort((s,d)=>s[1].queryValue-d[1].queryValue),S=h.filter(s=>s[0]==="(min-width: 0px)");(S?[...S,...g,...$]:[...g,...$]).forEach(s=>{e(this,y).has(s[0])||e(this,y).set(s[0],[]),e(this,y).get(s[0]).push(s[1])})}get mediaBuckets(){return e(this,y)}}y=new WeakMap;var R,q;class A extends z.Store{constructor(t){super(void 0);o(this,R);o(this,q,()=>{let t;e(this,R).mediaBuckets.forEach((h,g)=>{matchMedia(g).matches&&(t=h)});let c,u=0;t==null||t.forEach(h=>{h.density>u&&h.density<=Math.max(devicePixelRatio,1)&&(u=h.density,c=h)}),t!=null&&t.length&&!c&&(c=t[0]),this.current=c});i(this,R,new T(t.srcset,t.sourceSetOptions))}close(){super.close(),this.disconnect()}connect(){B.windowResizer.subscribe(e(this,q),_.RESIZE_ORDER.SOURCE_MANAGER),e(this,q).call(this)}disconnect(){B.windowResizer.unsubscribe(e(this,q))}}R=new WeakMap,q=new WeakMap;exports.Source=I;exports.SourceManager=A;exports.SourceSet=T;
1
+ "use strict";var b=r=>{throw TypeError(r)};var k=(r,n,t)=>n.has(r)||b("Cannot "+t);var e=(r,n,t)=>(k(r,n,"read from private field"),t?t.call(r):n.get(r)),u=(r,n,t)=>n.has(r)?b("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,t),s=(r,n,t,h)=>(k(r,n,"write to private field"),h?h.call(r,t):n.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../order/index.cjs"),B=require("../window-resizer/vanilla/index.cjs"),z=require("../Store-C2J4Q87x.cjs");var w,f,M,d,a,o,y;class I{constructor(n){u(this,w);u(this,f);u(this,M);u(this,d);u(this,a);u(this,o);u(this,y);s(this,w,n);let t=n.split(".");const h=/\d+x/g,p=t.find(m=>m.match(h));s(this,M,p?parseInt(p):1),p&&(t=t.slice(0,-1)),s(this,f,t.length>1?t.slice(0,-1).join("."):t.join("."));const c=/\d+max/g,g=/\d+min/g,S=/\d+mar/g,E=/\d+mir/g,$=t.find(m=>m.match(c)),i=t.find(m=>m.match(g)),l=t.find(m=>m.match(S)),V=t.find(m=>m.match(E));l?(s(this,a,parseInt(l)),s(this,o,"max"),s(this,d,`(max-aspect-ratio: ${e(this,a)})`)):V?(s(this,a,parseInt(V)),s(this,o,"max"),s(this,d,`(min-aspect-ratio: ${e(this,a)})`)):$?(s(this,a,parseInt($)),s(this,o,"max"),s(this,d,`(max-width: ${e(this,a)}px)`)):i?(s(this,a,parseInt(i)),s(this,d,`(min-width: ${e(this,a)}px)`),s(this,o,"min")):(s(this,a,0),s(this,d,`(min-width: ${e(this,a)}px)`),s(this,o,"min")),s(this,f,e(this,f).replace(`.${e(this,a)}${e(this,o)}`,"")),s(this,y,t[t.length-1]===e(this,f)?"":"."+t[t.length-1]),s(this,y,e(this,y).replace(`.${e(this,a)}${e(this,o)}`,""))}get url(){return e(this,w)}get name(){return e(this,f)}get density(){return e(this,M)}get query(){return e(this,d)}get extension(){return e(this,y)}get queryType(){return e(this,o)}get queryValue(){return e(this,a)}}w=new WeakMap,f=new WeakMap,M=new WeakMap,d=new WeakMap,a=new WeakMap,o=new WeakMap,y=new WeakMap;var x;class T{constructor(n,t){u(this,x);s(this,x,new Map);const h=(t==null?void 0:t.mediaBuckets)!==!1,p=typeof n=="string"?h?n.trim().split(",").map(i=>i.trim()).filter(i=>!!i):[n]:n,c=[];p.forEach(i=>{const l=new I(i);c.push([l.query,l])});const g=c.filter(i=>i[1].queryType.includes("max")).sort((i,l)=>l[1].queryValue-i[1].queryValue),S=c.filter(i=>i[1].queryType.includes("min")&&i[1].queryValue!==0).sort((i,l)=>i[1].queryValue-l[1].queryValue),E=c.filter(i=>i[0]==="(min-width: 0px)");(E?[...E,...g,...S]:[...g,...S]).forEach(i=>{e(this,x).has(i[0])||e(this,x).set(i[0],[]),e(this,x).get(i[0]).push(i[1])})}get mediaBuckets(){return e(this,x)}}x=new WeakMap;var R,q;class A extends z.Store{constructor(t){super(void 0);u(this,R);u(this,q,()=>{let t;e(this,R).mediaBuckets.forEach((c,g)=>{matchMedia(g).matches&&(t=c)});let h,p=0;t==null||t.forEach(c=>{c.density>p&&c.density<=Math.max(devicePixelRatio,1)&&(p=c.density,h=c)}),t!=null&&t.length&&!h&&(h=t[0]),this.current=h});s(this,R,new T(t.srcset,t.sourceSetOptions))}close(){super.close(),this.disconnect()}connect(){B.windowResizer.subscribe(e(this,q),_.RESIZE_ORDER.SOURCE_MANAGER),e(this,q).call(this)}disconnect(){B.windowResizer.unsubscribe(e(this,q))}}R=new WeakMap,q=new WeakMap;exports.Source=I;exports.SourceManager=A;exports.SourceSet=T;
@@ -2,93 +2,92 @@ var B = (r) => {
2
2
  throw TypeError(r);
3
3
  };
4
4
  var I = (r, n, t) => n.has(r) || B("Cannot " + t);
5
- var e = (r, n, t) => (I(r, n, "read from private field"), t ? t.call(r) : n.get(r)), o = (r, n, t) => n.has(r) ? B("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), s = (r, n, t, c) => (I(r, n, "write to private field"), c ? c.call(r, t) : n.set(r, t), t);
5
+ var e = (r, n, t) => (I(r, n, "read from private field"), t ? t.call(r) : n.get(r)), m = (r, n, t) => n.has(r) ? B("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), i = (r, n, t, c) => (I(r, n, "write to private field"), c ? c.call(r, t) : n.set(r, t), t);
6
6
  import { RESIZE_ORDER as A } from "../order/index.js";
7
7
  import { windowResizer as b } from "../window-resizer/vanilla/index.js";
8
8
  import { S } from "../Store-Cm3LPXlx.js";
9
- var $, l, w, f, h, u, x;
9
+ var w, f, E, d, h, o, y;
10
10
  class T {
11
11
  constructor(n) {
12
- o(this, $);
13
- o(this, l);
14
- o(this, w);
15
- o(this, f);
16
- o(this, h);
17
- o(this, u);
18
- o(this, x);
19
- s(this, $, n);
20
- const t = n.split(".");
21
- s(this, l, t.length > 1 ? t.slice(0, -1).join(".") : t.join("."));
22
- const c = /\d+x/g, m = t.find((p) => p.match(c));
23
- s(this, w, m ? parseInt(m) : 1), m && s(this, l, e(this, l).replace(`.${m}`, ""));
24
- const a = /\d+max/g, g = /\d+min/g, M = /\d+mar/g, R = /\d+mir/g, V = t.find((p) => p.match(a)), i = t.find((p) => p.match(g)), d = t.find((p) => p.match(M)), k = t.find((p) => p.match(R));
25
- d ? (s(this, h, parseInt(d)), s(this, u, "max"), s(this, f, `(max-aspect-ratio: ${e(this, h)})`)) : k ? (s(this, h, parseInt(k)), s(this, u, "max"), s(this, f, `(min-aspect-ratio: ${e(this, h)})`)) : V ? (s(this, h, parseInt(V)), s(this, u, "max"), s(this, f, `(max-width: ${e(this, h)}px)`)) : i ? (s(this, h, parseInt(i)), s(this, f, `(min-width: ${e(this, h)}px)`), s(this, u, "min")) : (s(this, h, 0), s(this, f, `(min-width: ${e(this, h)}px)`), s(this, u, "min")), s(this, l, e(this, l).replace(
26
- `.${e(this, h)}${e(this, u)}`,
12
+ m(this, w);
13
+ m(this, f);
14
+ m(this, E);
15
+ m(this, d);
16
+ m(this, h);
17
+ m(this, o);
18
+ m(this, y);
19
+ i(this, w, n);
20
+ let t = n.split(".");
21
+ const c = /\d+x/g, p = t.find((l) => l.match(c));
22
+ i(this, E, p ? parseInt(p) : 1), p && (t = t.slice(0, -1)), i(this, f, t.length > 1 ? t.slice(0, -1).join(".") : t.join("."));
23
+ const a = /\d+max/g, g = /\d+min/g, R = /\d+mar/g, $ = /\d+mir/g, V = t.find((l) => l.match(a)), s = t.find((l) => l.match(g)), u = t.find((l) => l.match(R)), k = t.find((l) => l.match($));
24
+ u ? (i(this, h, parseInt(u)), i(this, o, "max"), i(this, d, `(max-aspect-ratio: ${e(this, h)})`)) : k ? (i(this, h, parseInt(k)), i(this, o, "max"), i(this, d, `(min-aspect-ratio: ${e(this, h)})`)) : V ? (i(this, h, parseInt(V)), i(this, o, "max"), i(this, d, `(max-width: ${e(this, h)}px)`)) : s ? (i(this, h, parseInt(s)), i(this, d, `(min-width: ${e(this, h)}px)`), i(this, o, "min")) : (i(this, h, 0), i(this, d, `(min-width: ${e(this, h)}px)`), i(this, o, "min")), i(this, f, e(this, f).replace(
25
+ `.${e(this, h)}${e(this, o)}`,
27
26
  ""
28
- )), s(this, x, t[t.length - 1] === e(this, l) ? "" : "." + t[t.length - 1]), s(this, x, e(this, x).replace(
29
- `.${e(this, h)}${e(this, u)}`,
27
+ )), i(this, y, t[t.length - 1] === e(this, f) ? "" : "." + t[t.length - 1]), i(this, y, e(this, y).replace(
28
+ `.${e(this, h)}${e(this, o)}`,
30
29
  ""
31
- )), m && s(this, x, e(this, x).replace(`.${m}`, ""));
30
+ ));
32
31
  }
33
32
  get url() {
34
- return e(this, $);
33
+ return e(this, w);
35
34
  }
36
35
  get name() {
37
- return e(this, l);
36
+ return e(this, f);
38
37
  }
39
38
  get density() {
40
- return e(this, w);
39
+ return e(this, E);
41
40
  }
42
41
  get query() {
43
- return e(this, f);
42
+ return e(this, d);
44
43
  }
45
44
  get extension() {
46
- return e(this, x);
45
+ return e(this, y);
47
46
  }
48
47
  get queryType() {
49
- return e(this, u);
48
+ return e(this, o);
50
49
  }
51
50
  get queryValue() {
52
51
  return e(this, h);
53
52
  }
54
53
  }
55
- $ = new WeakMap(), l = new WeakMap(), w = new WeakMap(), f = new WeakMap(), h = new WeakMap(), u = new WeakMap(), x = new WeakMap();
56
- var y;
54
+ w = new WeakMap(), f = new WeakMap(), E = new WeakMap(), d = new WeakMap(), h = new WeakMap(), o = new WeakMap(), y = new WeakMap();
55
+ var x;
57
56
  class O {
58
57
  constructor(n, t) {
59
- o(this, y);
60
- s(this, y, /* @__PURE__ */ new Map());
61
- const c = (t == null ? void 0 : t.mediaBuckets) !== !1, m = typeof n == "string" ? c ? n.trim().split(",").map((i) => i.trim()).filter((i) => !!i) : [n] : n, a = [];
62
- m.forEach((i) => {
63
- const d = new T(i);
64
- a.push([d.query, d]);
58
+ m(this, x);
59
+ i(this, x, /* @__PURE__ */ new Map());
60
+ const c = (t == null ? void 0 : t.mediaBuckets) !== !1, p = typeof n == "string" ? c ? n.trim().split(",").map((s) => s.trim()).filter((s) => !!s) : [n] : n, a = [];
61
+ p.forEach((s) => {
62
+ const u = new T(s);
63
+ a.push([u.query, u]);
65
64
  });
66
- const g = a.filter((i) => i[1].queryType.includes("max")).sort((i, d) => d[1].queryValue - i[1].queryValue), M = a.filter((i) => i[1].queryType.includes("min") && i[1].queryValue !== 0).sort((i, d) => i[1].queryValue - d[1].queryValue), R = a.filter((i) => i[0] === "(min-width: 0px)");
67
- (R ? [...R, ...g, ...M] : [...g, ...M]).forEach((i) => {
68
- e(this, y).has(i[0]) || e(this, y).set(i[0], []), e(this, y).get(i[0]).push(i[1]);
65
+ const g = a.filter((s) => s[1].queryType.includes("max")).sort((s, u) => u[1].queryValue - s[1].queryValue), R = a.filter((s) => s[1].queryType.includes("min") && s[1].queryValue !== 0).sort((s, u) => s[1].queryValue - u[1].queryValue), $ = a.filter((s) => s[0] === "(min-width: 0px)");
66
+ ($ ? [...$, ...g, ...R] : [...g, ...R]).forEach((s) => {
67
+ e(this, x).has(s[0]) || e(this, x).set(s[0], []), e(this, x).get(s[0]).push(s[1]);
69
68
  });
70
69
  }
71
70
  get mediaBuckets() {
72
- return e(this, y);
71
+ return e(this, x);
73
72
  }
74
73
  }
75
- y = new WeakMap();
76
- var E, q;
74
+ x = new WeakMap();
75
+ var M, q;
77
76
  class _ extends S {
78
77
  constructor(t) {
79
78
  super(void 0);
80
- o(this, E);
81
- o(this, q, () => {
79
+ m(this, M);
80
+ m(this, q, () => {
82
81
  let t;
83
- e(this, E).mediaBuckets.forEach((a, g) => {
82
+ e(this, M).mediaBuckets.forEach((a, g) => {
84
83
  matchMedia(g).matches && (t = a);
85
84
  });
86
- let c, m = 0;
85
+ let c, p = 0;
87
86
  t == null || t.forEach((a) => {
88
- a.density > m && a.density <= Math.max(devicePixelRatio, 1) && (m = a.density, c = a);
87
+ a.density > p && a.density <= Math.max(devicePixelRatio, 1) && (p = a.density, c = a);
89
88
  }), t != null && t.length && !c && (c = t[0]), this.current = c;
90
89
  });
91
- s(this, E, new O(t.srcset, t.sourceSetOptions));
90
+ i(this, M, new O(t.srcset, t.sourceSetOptions));
92
91
  }
93
92
  close() {
94
93
  super.close(), this.disconnect();
@@ -100,7 +99,7 @@ class _ extends S {
100
99
  b.unsubscribe(e(this, q));
101
100
  }
102
101
  }
103
- E = new WeakMap(), q = new WeakMap();
102
+ M = new WeakMap(), q = new WeakMap();
104
103
  export {
105
104
  T as Source,
106
105
  _ as SourceManager,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.41.2",
3
+ "version": "0.41.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"