aptechka 0.35.1 → 0.35.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.
@@ -1 +1 @@
1
- "use strict";var T=a=>{throw TypeError(a)};var _=(a,e,t)=>e.has(a)||T("Cannot "+t);var r=(a,e,t)=>(_(a,e,"read from private field"),t?t.call(a):e.get(a)),o=(a,e,t)=>e.has(a)?T("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),s=(a,e,t,n)=>(_(a,e,"write to private field"),n?n.call(a,t):e.set(a,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../order/index.cjs"),$=require("../window-resizer/vanilla/index.cjs"),B=require("../Store-CDb6RMce.cjs");var y,g,q,m,c,d,w;class k{constructor(e){o(this,y);o(this,g);o(this,q);o(this,m);o(this,c);o(this,d);o(this,w);s(this,y,e);const t=e.indexOf("?");t>=0&&(e=e.slice(0,t));const n=e.split(".");s(this,g,n[0]);const x=/\d+x/g,h=n.find(u=>u.match(x));s(this,q,h?parseInt(h):1);const f=/\d+max/g,S=/\d+min/g,i=/\d+mar/g,l=/\d+mir/g,E=n.find(u=>u.match(f)),I=n.find(u=>u.match(S)),V=n.find(u=>u.match(i)),b=n.find(u=>u.match(l));V?(s(this,c,parseInt(V)),s(this,d,"max"),s(this,m,`(max-aspect-ratio: ${r(this,c)})`)):b?(s(this,c,parseInt(b)),s(this,d,"max"),s(this,m,`(min-aspect-ratio: ${r(this,c)})`)):E?(s(this,c,parseInt(E)),s(this,d,"max"),s(this,m,`(max-width: ${r(this,c)}px)`)):I?(s(this,c,parseInt(I)),s(this,m,`(min-width: ${r(this,c)}px)`),s(this,d,"min")):(s(this,c,0),s(this,m,`(min-width: ${r(this,c)}px)`),s(this,d,"min")),s(this,w,"."+n[n.length-1])}get url(){return r(this,y)}get name(){return r(this,g)}get density(){return r(this,q)}get query(){return r(this,m)}get extension(){return r(this,w)}get queryType(){return r(this,d)}get queryValue(){return r(this,c)}}y=new WeakMap,g=new WeakMap,q=new WeakMap,m=new WeakMap,c=new WeakMap,d=new WeakMap,w=new WeakMap;var p;class z{constructor(e){o(this,p);s(this,p,new Map);const t=typeof e=="string"?e.trim().split(",").map(i=>i.trim()).filter(i=>!!i):e,n=[];t.forEach(i=>{const l=new k(i);n.push([l.query,l])});const x=n.filter(i=>i[1].queryType.includes("max")).sort((i,l)=>l[1].queryValue-i[1].queryValue),h=n.filter(i=>i[1].queryType.includes("min")&&i[1].queryValue!==0).sort((i,l)=>i[1].queryValue-l[1].queryValue),f=n.filter(i=>i[0]==="(min-width: 0px)");(f?[...f,...x,...h]:[...x,...h]).forEach(i=>{r(this,p).has(i[0])||r(this,p).set(i[0],[]),r(this,p).get(i[0]).push(i[1])})}get mediaBuckets(){return r(this,p)}}p=new WeakMap;var R,M;class O extends B.Store{constructor(t){super(void 0);o(this,R);o(this,M,()=>{let t;r(this,R).mediaBuckets.forEach((h,f)=>{matchMedia(f).matches&&(t=h)});let n,x=0;t==null||t.forEach(h=>{h.density>x&&h.density<=Math.max(devicePixelRatio,1)&&(x=h.density,n=h)}),t!=null&&t.length&&!n&&(n=t[0]),this.current=n});s(this,R,new z(t.srcset))}close(){super.close(),this.disconnect()}connect(){$.windowResizer.subscribe(r(this,M),A.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){$.windowResizer.unsubscribe(r(this,M))}}R=new WeakMap,M=new WeakMap;exports.Source=k;exports.SourceManager=O;exports.SourceSet=z;
1
+ "use strict";var T=a=>{throw TypeError(a)};var _=(a,e,t)=>e.has(a)||T("Cannot "+t);var r=(a,e,t)=>(_(a,e,"read from private field"),t?t.call(a):e.get(a)),o=(a,e,t)=>e.has(a)?T("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),s=(a,e,t,n)=>(_(a,e,"write to private field"),n?n.call(a,t):e.set(a,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../order/index.cjs"),$=require("../window-resizer/vanilla/index.cjs"),B=require("../Store-CDb6RMce.cjs");var y,g,q,m,c,d,w;class k{constructor(e){o(this,y);o(this,g);o(this,q);o(this,m);o(this,c);o(this,d);o(this,w);s(this,y,e);const t=e.indexOf("?");t>=0&&(e=e.slice(0,t));const n=e.split(".");s(this,g,n.slice(0,-1).join("."));const x=/\d+x/g,h=n.find(u=>u.match(x));s(this,q,h?parseInt(h):1);const f=/\d+max/g,S=/\d+min/g,i=/\d+mar/g,l=/\d+mir/g,E=n.find(u=>u.match(f)),I=n.find(u=>u.match(S)),V=n.find(u=>u.match(i)),b=n.find(u=>u.match(l));V?(s(this,c,parseInt(V)),s(this,d,"max"),s(this,m,`(max-aspect-ratio: ${r(this,c)})`)):b?(s(this,c,parseInt(b)),s(this,d,"max"),s(this,m,`(min-aspect-ratio: ${r(this,c)})`)):E?(s(this,c,parseInt(E)),s(this,d,"max"),s(this,m,`(max-width: ${r(this,c)}px)`)):I?(s(this,c,parseInt(I)),s(this,m,`(min-width: ${r(this,c)}px)`),s(this,d,"min")):(s(this,c,0),s(this,m,`(min-width: ${r(this,c)}px)`),s(this,d,"min")),s(this,w,"."+n[n.length-1])}get url(){return r(this,y)}get name(){return r(this,g)}get density(){return r(this,q)}get query(){return r(this,m)}get extension(){return r(this,w)}get queryType(){return r(this,d)}get queryValue(){return r(this,c)}}y=new WeakMap,g=new WeakMap,q=new WeakMap,m=new WeakMap,c=new WeakMap,d=new WeakMap,w=new WeakMap;var p;class z{constructor(e){o(this,p);s(this,p,new Map);const t=typeof e=="string"?e.trim().split(",").map(i=>i.trim()).filter(i=>!!i):e,n=[];t.forEach(i=>{const l=new k(i);n.push([l.query,l])});const x=n.filter(i=>i[1].queryType.includes("max")).sort((i,l)=>l[1].queryValue-i[1].queryValue),h=n.filter(i=>i[1].queryType.includes("min")&&i[1].queryValue!==0).sort((i,l)=>i[1].queryValue-l[1].queryValue),f=n.filter(i=>i[0]==="(min-width: 0px)");(f?[...f,...x,...h]:[...x,...h]).forEach(i=>{r(this,p).has(i[0])||r(this,p).set(i[0],[]),r(this,p).get(i[0]).push(i[1])})}get mediaBuckets(){return r(this,p)}}p=new WeakMap;var R,M;class O extends B.Store{constructor(t){super(void 0);o(this,R);o(this,M,()=>{let t;r(this,R).mediaBuckets.forEach((h,f)=>{matchMedia(f).matches&&(t=h)});let n,x=0;t==null||t.forEach(h=>{h.density>x&&h.density<=Math.max(devicePixelRatio,1)&&(x=h.density,n=h)}),t!=null&&t.length&&!n&&(n=t[0]),this.current=n});s(this,R,new z(t.srcset))}close(){super.close(),this.disconnect()}connect(){$.windowResizer.subscribe(r(this,M),A.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){$.windowResizer.unsubscribe(r(this,M))}}R=new WeakMap,M=new WeakMap;exports.Source=k;exports.SourceManager=O;exports.SourceSet=z;
@@ -20,7 +20,7 @@ class O {
20
20
  const t = e.indexOf("?");
21
21
  t >= 0 && (e = e.slice(0, t));
22
22
  const n = e.split(".");
23
- i(this, g, n[0]);
23
+ i(this, g, n.slice(0, -1).join("."));
24
24
  const f = /\d+x/g, h = n.find((m) => m.match(f));
25
25
  i(this, q, h ? parseInt(h) : 1);
26
26
  const x = /\d+max/g, M = /\d+min/g, s = /\d+mar/g, p = /\d+mir/g, I = n.find((m) => m.match(x)), V = n.find((m) => m.match(M)), $ = n.find((m) => m.match(s)), b = n.find((m) => m.match(p));
@@ -70,7 +70,7 @@ class P {
70
70
  }
71
71
  l = new WeakMap();
72
72
  var E, R;
73
- class G extends T {
73
+ class C extends T {
74
74
  constructor(t) {
75
75
  super(void 0);
76
76
  o(this, E);
@@ -99,6 +99,6 @@ class G extends T {
99
99
  E = new WeakMap(), R = new WeakMap();
100
100
  export {
101
101
  O as Source,
102
- G as SourceManager,
102
+ C as SourceManager,
103
103
  P as SourceSet
104
104
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.35.1",
3
+ "version": "0.35.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"