aptechka 0.41.3 → 0.41.6

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)),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;
1
+ "use strict";var I=r=>{throw TypeError(r)};var V=(r,n,t)=>n.has(r)||I("Cannot "+t);var e=(r,n,t)=>(V(r,n,"read from private field"),t?t.call(r):n.get(r)),u=(r,n,t)=>n.has(r)?I("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,t),s=(r,n,t,h)=>(V(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"),k=require("../window-resizer/vanilla/index.cjs"),z=require("../Store-C2J4Q87x.cjs");var w,f,M,d,a,o,y;class B{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=/\b\d{1,2}x\b/g,p=t.find(l=>l.match(h)&&parseInt(l));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(l=>l.match(c)),i=t.find(l=>l.match(g)),m=t.find(l=>l.match(S)),b=t.find(l=>l.match(E));m?(s(this,a,parseInt(m)),s(this,o,"max"),s(this,d,`(max-aspect-ratio: ${e(this,a)})`)):b?(s(this,a,parseInt(b)),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 m=new B(i);c.push([m.query,m])});const g=c.filter(i=>i[1].queryType.includes("max")).sort((i,m)=>m[1].queryValue-i[1].queryValue),S=c.filter(i=>i[1].queryType.includes("min")&&i[1].queryValue!==0).sort((i,m)=>i[1].queryValue-m[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(){k.windowResizer.subscribe(e(this,q),_.RESIZE_ORDER.SOURCE_MANAGER),e(this,q).call(this)}disconnect(){k.windowResizer.unsubscribe(e(this,q))}}R=new WeakMap,q=new WeakMap;exports.Source=B;exports.SourceManager=A;exports.SourceSet=T;
@@ -1,10 +1,10 @@
1
- var B = (r) => {
1
+ var b = (r) => {
2
2
  throw TypeError(r);
3
3
  };
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)), 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);
4
+ var k = (r, n, t) => n.has(r) || b("Cannot " + t);
5
+ var e = (r, n, t) => (k(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) => (k(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
- import { windowResizer as b } from "../window-resizer/vanilla/index.js";
7
+ import { windowResizer as B } from "../window-resizer/vanilla/index.js";
8
8
  import { S } from "../Store-Cm3LPXlx.js";
9
9
  var w, f, E, d, h, o, y;
10
10
  class T {
@@ -18,10 +18,10 @@ class T {
18
18
  m(this, y);
19
19
  i(this, w, n);
20
20
  let t = n.split(".");
21
- const c = /\d+x/g, p = t.find((l) => l.match(c));
21
+ const c = /\b\d{1,2}x\b/g, p = t.find((u) => u.match(c) && parseInt(u));
22
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(
23
+ const a = /\d+max/g, g = /\d+min/g, R = /\d+mar/g, $ = /\d+mir/g, I = t.find((u) => u.match(a)), s = t.find((u) => u.match(g)), l = t.find((u) => u.match(R)), V = t.find((u) => u.match($));
24
+ l ? (i(this, h, parseInt(l)), i(this, o, "max"), i(this, d, `(max-aspect-ratio: ${e(this, h)})`)) : V ? (i(this, h, parseInt(V)), i(this, o, "max"), i(this, d, `(min-aspect-ratio: ${e(this, h)})`)) : I ? (i(this, h, parseInt(I)), 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
25
  `.${e(this, h)}${e(this, o)}`,
26
26
  ""
27
27
  )), i(this, y, t[t.length - 1] === e(this, f) ? "" : "." + t[t.length - 1]), i(this, y, e(this, y).replace(
@@ -59,10 +59,10 @@ class O {
59
59
  i(this, x, /* @__PURE__ */ new Map());
60
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
61
  p.forEach((s) => {
62
- const u = new T(s);
63
- a.push([u.query, u]);
62
+ const l = new T(s);
63
+ a.push([l.query, l]);
64
64
  });
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)");
65
+ const g = a.filter((s) => s[1].queryType.includes("max")).sort((s, l) => l[1].queryValue - s[1].queryValue), R = a.filter((s) => s[1].queryType.includes("min") && s[1].queryValue !== 0).sort((s, l) => s[1].queryValue - l[1].queryValue), $ = a.filter((s) => s[0] === "(min-width: 0px)");
66
66
  ($ ? [...$, ...g, ...R] : [...g, ...R]).forEach((s) => {
67
67
  e(this, x).has(s[0]) || e(this, x).set(s[0], []), e(this, x).get(s[0]).push(s[1]);
68
68
  });
@@ -93,10 +93,10 @@ class _ extends S {
93
93
  super.close(), this.disconnect();
94
94
  }
95
95
  connect() {
96
- b.subscribe(e(this, q), A.SOURCE_MANAGER), e(this, q).call(this);
96
+ B.subscribe(e(this, q), A.SOURCE_MANAGER), e(this, q).call(this);
97
97
  }
98
98
  disconnect() {
99
- b.unsubscribe(e(this, q));
99
+ B.unsubscribe(e(this, q));
100
100
  }
101
101
  }
102
102
  M = new WeakMap(), q = new WeakMap();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.41.3",
3
+ "version": "0.41.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"