aptechka 0.5.39 → 0.5.40

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,5 +1,5 @@
1
- "use strict";var C=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(C(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},u=(i,r,t,o)=>(C(i,r,"write to private field"),o?o.call(i,t):r.set(i,t),t);var p=(i,r,t)=>(C(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../SourceManager-vSlsMKUE.cjs"),M=require("../custom-element/index.cjs"),w=require("../loading/index.cjs"),k=require("../class-linked-status/index.cjs"),x=require("../browser-CpzFX2xg.cjs");let A=0;var h,s,c,f,l,d,n,m,g,v,E,b,L;class q extends M.CustomElement{constructor(){super();a(this,g);a(this,h,null);a(this,s,null);a(this,c,!1);a(this,f,!1);a(this,l,!1);a(this,d,"");a(this,n,new k.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,m,null);a(this,E,t=>{const o=t[0];e(this,l)&&(!e(this,f)||this.hasAttribute("reload-source"))&&o.isIntersecting&&(e(this,h).current&&e(this,h).current!==e(this,h).previous&&p(this,g,v).call(this,e(this,h).current),u(this,f,!0)),o.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):(this.hasAttribute("reload-source")&&p(this,g,v).call(this,void 0),this.dispatchEvent(new CustomEvent("sourceRelease")))});a(this,b,()=>{e(this,n).set("loaded",!0),e(this,n).set("error",!1),e(this,n).set("loading",!1),!e(this,l)&&!e(this,c)&&w.loading.setLoaded(e(this,d),1),u(this,c,!0)});a(this,L,t=>{e(this,n).set("loaded",!1),e(this,n).set("error",!0),e(this,n).set("loading",!1),!e(this,l)&&!e(this,c)&&w.loading.setError(e(this,d),t),u(this,c,!0)});x.isBrowser&&(u(this,d,`source-consumer-${++A}`),u(this,m,new IntersectionObserver(e(this,E))))}get consumerElement(){return e(this,s)}get sourceManager(){return e(this,h)}get status(){return e(this,n)}get isLazy(){return e(this,l)}connectedCallback(){const t=this.getAttribute("srcset");t&&(u(this,s,this.createConsumer()),e(this,s).style.cssText=`
1
+ "use strict";var y=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(y(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},u=(i,r,t,o)=>(y(i,r,"write to private field"),o?o.call(i,t):r.set(i,t),t);var p=(i,r,t)=>(y(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../SourceManager-vSlsMKUE.cjs"),M=require("../custom-element/index.cjs"),w=require("../loading/index.cjs"),q=require("../class-linked-status/index.cjs"),x=require("../browser-CpzFX2xg.cjs"),A=require("../string-DhgS_iFl.cjs");let T=0;var h,s,c,f,l,d,n,m,g,v,E,b,C;class z extends M.CustomElement{constructor(){super();a(this,g);a(this,h,null);a(this,s,null);a(this,c,!1);a(this,f,!1);a(this,l,!1);a(this,d,"");a(this,n,new q.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,m,null);a(this,E,t=>{const o=t[0];e(this,l)&&(!e(this,f)||this.hasAttribute("reload-source"))&&o.isIntersecting&&(e(this,h).current&&e(this,h).current!==e(this,h).previous&&p(this,g,v).call(this,e(this,h).current),u(this,f,!0)),o.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):(this.hasAttribute("reload-source")&&p(this,g,v).call(this,void 0),this.dispatchEvent(new CustomEvent("sourceRelease")))});a(this,b,()=>{e(this,n).set("loaded",!0),e(this,n).set("error",!1),e(this,n).set("loading",!1),!e(this,l)&&!e(this,c)&&w.loading.setLoaded(e(this,d),1),u(this,c,!0)});a(this,C,t=>{e(this,n).set("loaded",!1),e(this,n).set("error",!0),e(this,n).set("loading",!1),!e(this,l)&&!e(this,c)&&w.loading.setError(e(this,d),t),u(this,c,!0)});x.isBrowser&&(u(this,d,`source-consumer-${++T}`),u(this,m,new IntersectionObserver(e(this,E))))}get consumerElement(){return e(this,s)}get sourceManager(){return e(this,h)}get status(){return e(this,n)}get isLazy(){return e(this,l)}connectedCallback(){const t=this.getAttribute("srcset");t&&(u(this,s,this.createConsumer()),e(this,s).style.cssText=`
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
5
- `,e(this,s).classList.add("source-consumer"),Array.from(this.attributes).forEach(o=>{if(o.name!=="srcset"){const S=o.nodeValue||"";o.name in e(this,s)&&(e(this,s)[o.name]=S||!0)}}),this.appendChild(e(this,s)),u(this,h,new y.SourceManager({srcset:t})),u(this,l,this.hasAttribute("lazy")),e(this,h).subscribe(o=>{(!e(this,l)||e(this,l)&&e(this,f))&&p(this,g,v).call(this,o.current)}),e(this,m).observe(this),e(this,h).connect())}disconnectedCallback(){e(this,m).disconnect(),e(this,h).close(),e(this,s).onloadeddata=null,e(this,s).onload=null,e(this,s).onerror=null,e(this,s).remove(),e(this,n).reset()}}h=new WeakMap,s=new WeakMap,c=new WeakMap,f=new WeakMap,l=new WeakMap,d=new WeakMap,n=new WeakMap,m=new WeakMap,g=new WeakSet,v=function(t){if(e(this,s).onloadeddata=null,e(this,s).onload=null,e(this,s).onerror=null,e(this,n).set("loaded",!1),e(this,n).set("error",!1),e(this,n).set("loading",!1),t){const o=this.hasAttribute("keep-source-parameters");e(this,n).set("loading",!0);const S=o?t.url:t.name+t.extension;this.consumeSource(S),!e(this,l)&&!e(this,c)&&w.loading.setTotal(e(this,d),1),e(this,s).onloadeddata=()=>{e(this,b).call(this)},e(this,s).onload=()=>{e(this,b).call(this)},e(this,s).onerror=()=>{e(this,L).call(this,S)}}else this.consumeSource(null)},E=new WeakMap,b=new WeakMap,L=new WeakMap;exports.Source=y.Source;exports.SourceManager=y.SourceManager;exports.SourceSet=y.SourceSet;exports.SourceElement=q;
5
+ `,e(this,s).classList.add("source-consumer"),Array.from(this.attributes).forEach(o=>{if(o.name!=="srcset"){const S=o.nodeValue||"",k=A.kebabToCamel(o.name);k in e(this,s)&&(e(this,s)[k]=S||!0)}}),this.appendChild(e(this,s)),u(this,h,new L.SourceManager({srcset:t})),u(this,l,this.hasAttribute("lazy")),e(this,h).subscribe(o=>{(!e(this,l)||e(this,l)&&e(this,f))&&p(this,g,v).call(this,o.current)}),e(this,m).observe(this),e(this,h).connect())}disconnectedCallback(){e(this,m).disconnect(),e(this,h).close(),e(this,s).onloadeddata=null,e(this,s).onload=null,e(this,s).onerror=null,e(this,s).remove(),e(this,n).reset()}}h=new WeakMap,s=new WeakMap,c=new WeakMap,f=new WeakMap,l=new WeakMap,d=new WeakMap,n=new WeakMap,m=new WeakMap,g=new WeakSet,v=function(t){if(e(this,s).onloadeddata=null,e(this,s).onload=null,e(this,s).onerror=null,e(this,n).set("loaded",!1),e(this,n).set("error",!1),e(this,n).set("loading",!1),t){const o=this.hasAttribute("keep-source-parameters");e(this,n).set("loading",!0);const S=o?t.url:t.name+t.extension;this.consumeSource(S),!e(this,l)&&!e(this,c)&&w.loading.setTotal(e(this,d),1),e(this,s).onloadeddata=()=>{e(this,b).call(this)},e(this,s).onload=()=>{e(this,b).call(this)},e(this,s).onerror=()=>{e(this,C).call(this,S)}}else this.consumeSource(null)},E=new WeakMap,b=new WeakMap,C=new WeakMap;exports.Source=L.Source;exports.SourceManager=L.SourceManager;exports.SourceSet=L.SourceSet;exports.SourceElement=z;
@@ -2,55 +2,56 @@ var L = (i, r, s) => {
2
2
  if (!r.has(i))
3
3
  throw TypeError("Cannot " + s);
4
4
  };
5
- var t = (i, r, s) => (L(i, r, "read from private field"), s ? s.call(i) : r.get(i)), h = (i, r, s) => {
5
+ var t = (i, r, s) => (L(i, r, "read from private field"), s ? s.call(i) : r.get(i)), a = (i, r, s) => {
6
6
  if (r.has(i))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  r instanceof WeakSet ? r.add(i) : r.set(i, s);
9
9
  }, u = (i, r, s, n) => (L(i, r, "write to private field"), n ? n.call(i, s) : r.set(i, s), s);
10
10
  var v = (i, r, s) => (L(i, r, "access private method"), s);
11
11
  import { S as y } from "../SourceManager-Q-PB-Rkh.js";
12
- import { a as R, b as V } from "../SourceManager-Q-PB-Rkh.js";
12
+ import { a as j, b as q } from "../SourceManager-Q-PB-Rkh.js";
13
13
  import { CustomElement as A } from "../custom-element/index.js";
14
- import { loading as w } from "../loading/index.js";
15
- import { ClassLinkedStatus as k } from "../class-linked-status/index.js";
16
- import { i as x } from "../browser-0zX67oeU.js";
17
- let z = 0;
18
- var a, e, c, f, l, d, o, m, p, S, E, b, C;
19
- class F extends A {
14
+ import { loading as k } from "../loading/index.js";
15
+ import { ClassLinkedStatus as x } from "../class-linked-status/index.js";
16
+ import { i as z } from "../browser-0zX67oeU.js";
17
+ import { k as I } from "../string-f0Dnk0L1.js";
18
+ let M = 0;
19
+ var h, e, c, f, l, d, o, m, p, C, S, g, E;
20
+ class R extends A {
20
21
  constructor() {
21
22
  super();
22
- h(this, p);
23
- h(this, a, null);
24
- h(this, e, null);
25
- h(this, c, !1);
26
- h(this, f, !1);
27
- h(this, l, !1);
28
- h(this, d, "");
29
- h(this, o, new k(this, {
23
+ a(this, p);
24
+ a(this, h, null);
25
+ a(this, e, null);
26
+ a(this, c, !1);
27
+ a(this, f, !1);
28
+ a(this, l, !1);
29
+ a(this, d, "");
30
+ a(this, o, new x(this, {
30
31
  loading: !1,
31
32
  loaded: !1,
32
33
  error: !1
33
34
  }));
34
- h(this, m, null);
35
- h(this, E, (s) => {
35
+ a(this, m, null);
36
+ a(this, S, (s) => {
36
37
  const n = s[0];
37
- t(this, l) && (!t(this, f) || this.hasAttribute("reload-source")) && n.isIntersecting && (t(this, a).current && t(this, a).current !== t(this, a).previous && v(this, p, S).call(this, t(this, a).current), u(this, f, !0)), n.isIntersecting ? this.dispatchEvent(new CustomEvent("sourceCapture")) : (this.hasAttribute("reload-source") && v(this, p, S).call(this, void 0), this.dispatchEvent(new CustomEvent("sourceRelease")));
38
+ t(this, l) && (!t(this, f) || this.hasAttribute("reload-source")) && n.isIntersecting && (t(this, h).current && t(this, h).current !== t(this, h).previous && v(this, p, C).call(this, t(this, h).current), u(this, f, !0)), n.isIntersecting ? this.dispatchEvent(new CustomEvent("sourceCapture")) : (this.hasAttribute("reload-source") && v(this, p, C).call(this, void 0), this.dispatchEvent(new CustomEvent("sourceRelease")));
38
39
  });
39
- h(this, b, () => {
40
- t(this, o).set("loaded", !0), t(this, o).set("error", !1), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && w.setLoaded(t(this, d), 1), u(this, c, !0);
40
+ a(this, g, () => {
41
+ t(this, o).set("loaded", !0), t(this, o).set("error", !1), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && k.setLoaded(t(this, d), 1), u(this, c, !0);
41
42
  });
42
- h(this, C, (s) => {
43
- t(this, o).set("loaded", !1), t(this, o).set("error", !0), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && w.setError(t(this, d), s), u(this, c, !0);
43
+ a(this, E, (s) => {
44
+ t(this, o).set("loaded", !1), t(this, o).set("error", !0), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && k.setError(t(this, d), s), u(this, c, !0);
44
45
  });
45
- x && (u(this, d, `source-consumer-${++z}`), u(this, m, new IntersectionObserver(
46
- t(this, E)
46
+ z && (u(this, d, `source-consumer-${++M}`), u(this, m, new IntersectionObserver(
47
+ t(this, S)
47
48
  )));
48
49
  }
49
50
  get consumerElement() {
50
51
  return t(this, e);
51
52
  }
52
53
  get sourceManager() {
53
- return t(this, a);
54
+ return t(this, h);
54
55
  }
55
56
  get status() {
56
57
  return t(this, o);
@@ -66,37 +67,37 @@ class F extends A {
66
67
  height: 100%;
67
68
  `, t(this, e).classList.add("source-consumer"), Array.from(this.attributes).forEach((n) => {
68
69
  if (n.name !== "srcset") {
69
- const g = n.nodeValue || "";
70
- n.name in t(this, e) && (t(this, e)[n.name] = g || !0);
70
+ const b = n.nodeValue || "", w = I(n.name);
71
+ w in t(this, e) && (t(this, e)[w] = b || !0);
71
72
  }
72
- }), this.appendChild(t(this, e)), u(this, a, new y({
73
+ }), this.appendChild(t(this, e)), u(this, h, new y({
73
74
  srcset: s
74
- })), u(this, l, this.hasAttribute("lazy")), t(this, a).subscribe((n) => {
75
- (!t(this, l) || t(this, l) && t(this, f)) && v(this, p, S).call(this, n.current);
76
- }), t(this, m).observe(this), t(this, a).connect());
75
+ })), u(this, l, this.hasAttribute("lazy")), t(this, h).subscribe((n) => {
76
+ (!t(this, l) || t(this, l) && t(this, f)) && v(this, p, C).call(this, n.current);
77
+ }), t(this, m).observe(this), t(this, h).connect());
77
78
  }
78
79
  disconnectedCallback() {
79
- t(this, m).disconnect(), t(this, a).close(), t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, e).remove(), t(this, o).reset();
80
+ t(this, m).disconnect(), t(this, h).close(), t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, e).remove(), t(this, o).reset();
80
81
  }
81
82
  }
82
- a = new WeakMap(), e = new WeakMap(), c = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), o = new WeakMap(), m = new WeakMap(), p = new WeakSet(), S = function(s) {
83
+ h = new WeakMap(), e = new WeakMap(), c = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), o = new WeakMap(), m = new WeakMap(), p = new WeakSet(), C = function(s) {
83
84
  if (t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, o).set("loaded", !1), t(this, o).set("error", !1), t(this, o).set("loading", !1), s) {
84
85
  const n = this.hasAttribute("keep-source-parameters");
85
86
  t(this, o).set("loading", !0);
86
- const g = n ? s.url : s.name + s.extension;
87
- this.consumeSource(g), !t(this, l) && !t(this, c) && w.setTotal(t(this, d), 1), t(this, e).onloadeddata = () => {
88
- t(this, b).call(this);
87
+ const b = n ? s.url : s.name + s.extension;
88
+ this.consumeSource(b), !t(this, l) && !t(this, c) && k.setTotal(t(this, d), 1), t(this, e).onloadeddata = () => {
89
+ t(this, g).call(this);
89
90
  }, t(this, e).onload = () => {
90
- t(this, b).call(this);
91
+ t(this, g).call(this);
91
92
  }, t(this, e).onerror = () => {
92
- t(this, C).call(this, g);
93
+ t(this, E).call(this, b);
93
94
  };
94
95
  } else
95
96
  this.consumeSource(null);
96
- }, E = new WeakMap(), b = new WeakMap(), C = new WeakMap();
97
+ }, S = new WeakMap(), g = new WeakMap(), E = new WeakMap();
97
98
  export {
98
- R as Source,
99
- F as SourceElement,
99
+ j as Source,
100
+ R as SourceElement,
100
101
  y as SourceManager,
101
- V as SourceSet
102
+ q as SourceSet
102
103
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.5.39",
3
+ "version": "0.5.40",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"