aptechka 0.47.3 → 0.47.4

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 P=s=>{throw TypeError(s)};var q=(s,i,t)=>i.has(s)||P("Cannot "+t);var e=(s,i,t)=>(q(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>i.has(s)?P("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),d=(s,i,t,l)=>(q(s,i,"write to private field"),l?l.call(s,t):i.set(s,t),t),E=(s,i,t)=>(q(s,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../index-Cqw2NKev.cjs"),T=require("../dom-JBOkFLTh.cjs"),M=require("../css-property/index.cjs"),_=require("../events-KVanG9sR.cjs"),j=require("../number-0243DApo.cjs");var b,m,f,u,c,h,k,L,y,w,I;class S extends HTMLElement{constructor(){super(...arguments);n(this,h);n(this,b,new M.CSSProperty(this,"--autoplay",!1));n(this,m);n(this,f,!1);n(this,u,[]);n(this,c,0);n(this,L,t=>{d(this,f,t.isIntersecting),e(this,f)?E(this,h,k).call(this):clearInterval(e(this,m))});n(this,y,()=>{clearInterval(e(this,m)),e(this,f)&&d(this,m,setInterval(e(this,I),parseFloat(e(this,b).current||"0")*1e3))});n(this,I,()=>{E(this,h,w).call(this,e(this,c)+1)})}get counter(){return e(this,c)}get itemElements(){return e(this,u)}set(t){E(this,h,w).call(this,t),E(this,h,k).call(this)}shift(t){this.set(e(this,c)+t)}connectedCallback(){var t;d(this,u,[...this.querySelectorAll("[data-billboard-item]")]),(t=e(this,u)[0])==null||t.classList.add("current"),e(this,b).subscribe(l=>{E(this,h,k).call(this)}),e(this,b).observe(),x.intersector.subscribe(this,e(this,L))}disconnectedCallback(){e(this,b).unobserve(),x.intersector.unsubscribe(e(this,L)),clearInterval(e(this,m))}}b=new WeakMap,m=new WeakMap,f=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakSet,k=function(){e(this,b).current!==!1&&e(this,y).call(this)},L=new WeakMap,y=new WeakMap,w=function(t){d(this,c,j.loopNumber(t,e(this,u).length)),e(this,u).forEach((l,o)=>{o===e(this,c)?l.classList.add("current"):l.classList.remove("current")}),_.dispatchEvent(this,"billboardChange",{detail:{counter:e(this,c)}})},I=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",S);var r,a,C,v;class A extends HTMLElement{constructor(){super(...arguments);n(this,r,null);n(this,a,[]);n(this,C,t=>{const l=t.currentTarget,o=e(this,a).findIndex(B=>B===l);o>=0&&e(this,r).set(o)});n(this,v,()=>{e(this,a).forEach((t,l)=>{l===e(this,r).counter?t.classList.add("current"):t.classList.remove("current")})})}connectedCallback(){d(this,r,T.findParentElement(this,S)),e(this,r)&&customElements.whenDefined("e-billboard").then(()=>{var t;if(this.isConnected){const l=e(this,r).itemElements.length;for(let o=0;o<l;o++){const B=document.createElement("button");e(this,a).push(B),this.appendChild(B)}e(this,a).forEach(o=>{o.addEventListener("click",e(this,C))}),(t=e(this,r))==null||t.addEventListener("billboardChange",e(this,v)),e(this,v).call(this)}})}disconnectedCallback(){var t;e(this,a).forEach(l=>{l.removeEventListener("click",e(this,C))}),(t=e(this,r))==null||t.removeEventListener("billboardChange",e(this,v)),this.innerHTML="",d(this,a,[])}}r=new WeakMap,a=new WeakMap,C=new WeakMap,v=new WeakMap;x.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",A);var p,g;class H extends HTMLElement{constructor(){super();n(this,p,new M.CSSProperty(this,"--step",1));n(this,g,null);this.addEventListener("click",()=>{e(this,g)&&e(this,g).shift(e(this,p).current)})}connectedCallback(){this.tabIndex=0,d(this,g,T.findParentElement(this,S)),e(this,p).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),e(this,p).unobserve()}}p=new WeakMap,g=new WeakMap;x.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",H);exports.BillboardBulletsElement=A;exports.BillboardElement=S;exports.BillboardStepButtonElement=H;
1
+ "use strict";var P=s=>{throw TypeError(s)};var w=(s,i,t)=>i.has(s)||P("Cannot "+t);var e=(s,i,t)=>(w(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>i.has(s)?P("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),h=(s,i,t,r)=>(w(s,i,"write to private field"),r?r.call(s,t):i.set(s,t),t),E=(s,i,t)=>(w(s,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../index-Cqw2NKev.cjs"),T=require("../dom-JBOkFLTh.cjs"),M=require("../css-property/index.cjs"),_=require("../events-KVanG9sR.cjs"),j=require("../number-0243DApo.cjs");var b,u,f,m,a,c,I,v,y,x,S;class q extends HTMLElement{constructor(){super(...arguments);n(this,c);n(this,b,new M.CSSProperty(this,"--autoplay",!1));n(this,u);n(this,f,!1);n(this,m,[]);n(this,a,0);n(this,v,t=>{h(this,f,t.isIntersecting),e(this,f)?E(this,c,I).call(this):clearInterval(e(this,u))});n(this,y,()=>{clearInterval(e(this,u)),e(this,f)&&h(this,u,setInterval(e(this,S),parseFloat(e(this,b).current||"0")*1e3))});n(this,S,()=>{E(this,c,x).call(this,e(this,a)+1)})}get counter(){return e(this,a)}get itemElements(){return e(this,m)}set(t){E(this,c,x).call(this,t),E(this,c,I).call(this)}shift(t){this.set(e(this,a)+t)}connectedCallback(){var t;h(this,m,[...this.querySelectorAll("[data-billboard-item]")]),(t=e(this,m)[0])==null||t.classList.add("current"),e(this,b).subscribe(r=>{r.current?(C.intersector.subscribe(this,e(this,v)),E(this,c,I).call(this)):(h(this,f,!0),C.intersector.unsubscribe(e(this,v)),clearInterval(e(this,u)),E(this,c,x).call(this,0))}),e(this,b).observe()}disconnectedCallback(){e(this,b).unobserve(),C.intersector.unsubscribe(e(this,v)),clearInterval(e(this,u))}}b=new WeakMap,u=new WeakMap,f=new WeakMap,m=new WeakMap,a=new WeakMap,c=new WeakSet,I=function(){e(this,b).current!==!1&&e(this,y).call(this)},v=new WeakMap,y=new WeakMap,x=function(t){h(this,a,j.loopNumber(t,e(this,m).length)),e(this,m).forEach((r,o)=>{o===e(this,a)?r.classList.add("current"):r.classList.remove("current")}),_.dispatchEvent(this,"billboardChange",{detail:{counter:e(this,a)}})},S=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",q);var l,d,B,p;class A extends HTMLElement{constructor(){super(...arguments);n(this,l,null);n(this,d,[]);n(this,B,t=>{const r=t.currentTarget,o=e(this,d).findIndex(k=>k===r);o>=0&&e(this,l).set(o)});n(this,p,()=>{e(this,d).forEach((t,r)=>{r===e(this,l).counter?t.classList.add("current"):t.classList.remove("current")})})}connectedCallback(){h(this,l,T.findParentElement(this,q)),e(this,l)&&customElements.whenDefined("e-billboard").then(()=>{var t;if(this.isConnected){const r=e(this,l).itemElements.length;for(let o=0;o<r;o++){const k=document.createElement("button");e(this,d).push(k),this.appendChild(k)}e(this,d).forEach(o=>{o.addEventListener("click",e(this,B))}),(t=e(this,l))==null||t.addEventListener("billboardChange",e(this,p)),e(this,p).call(this)}})}disconnectedCallback(){var t;e(this,d).forEach(r=>{r.removeEventListener("click",e(this,B))}),(t=e(this,l))==null||t.removeEventListener("billboardChange",e(this,p)),this.innerHTML="",h(this,d,[])}}l=new WeakMap,d=new WeakMap,B=new WeakMap,p=new WeakMap;C.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",A);var g,L;class H extends HTMLElement{constructor(){super();n(this,g,new M.CSSProperty(this,"--step",1));n(this,L,null);this.addEventListener("click",()=>{e(this,L)&&e(this,L).shift(e(this,g).current)})}connectedCallback(){this.tabIndex=0,h(this,L,T.findParentElement(this,q)),e(this,g).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),e(this,g).unobserve()}}g=new WeakMap,L=new WeakMap;C.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",H);exports.BillboardBulletsElement=A;exports.BillboardElement=q;exports.BillboardStepButtonElement=H;
@@ -1,139 +1,139 @@
1
- var T = (s) => {
1
+ var A = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
- var B = (s, i, e) => i.has(s) || T("Cannot " + e);
5
- var t = (s, i, e) => (B(s, i, "read from private field"), e ? e.call(s) : i.get(s)), n = (s, i, e) => i.has(s) ? T("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, e), d = (s, i, e, l) => (B(s, i, "write to private field"), l ? l.call(s, e) : i.set(s, e), e), f = (s, i, e) => (B(s, i, "access private method"), e);
6
- import { a as A, i as H } from "../index-euf5anj6.js";
4
+ var w = (s, i, e) => i.has(s) || A("Cannot " + e);
5
+ var t = (s, i, e) => (w(s, i, "read from private field"), e ? e.call(s) : i.get(s)), n = (s, i, e) => i.has(s) ? A("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, e), c = (s, i, e, l) => (w(s, i, "write to private field"), l ? l.call(s, e) : i.set(s, e), e), f = (s, i, e) => (w(s, i, "access private method"), e);
6
+ import { a as S, i as H } from "../index-euf5anj6.js";
7
7
  import { b as M } from "../dom-CVWzyXPH.js";
8
8
  import { CSSProperty as P } from "../css-property/index.js";
9
9
  import { d as q } from "../events-CsVF98U6.js";
10
10
  import { l as D } from "../number-DwCxt_Ck.js";
11
- var b, m, E, u, h, c, I, g, x, w, y;
12
- class S extends HTMLElement {
11
+ var b, u, E, m, o, h, I, p, y, x, B;
12
+ class T extends HTMLElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
- n(this, c);
15
+ n(this, h);
16
16
  n(this, b, new P(this, "--autoplay", !1));
17
- n(this, m);
17
+ n(this, u);
18
18
  n(this, E, !1);
19
- n(this, u, []);
20
- n(this, h, 0);
21
- n(this, g, (e) => {
22
- d(this, E, e.isIntersecting), t(this, E) ? f(this, c, I).call(this) : clearInterval(t(this, m));
19
+ n(this, m, []);
20
+ n(this, o, 0);
21
+ n(this, p, (e) => {
22
+ c(this, E, e.isIntersecting), t(this, E) ? f(this, h, I).call(this) : clearInterval(t(this, u));
23
23
  });
24
- n(this, x, () => {
25
- clearInterval(t(this, m)), t(this, E) && d(this, m, setInterval(
26
- t(this, y),
24
+ n(this, y, () => {
25
+ clearInterval(t(this, u)), t(this, E) && c(this, u, setInterval(
26
+ t(this, B),
27
27
  parseFloat(t(this, b).current || "0") * 1e3
28
28
  ));
29
29
  });
30
- n(this, y, () => {
31
- f(this, c, w).call(this, t(this, h) + 1);
30
+ n(this, B, () => {
31
+ f(this, h, x).call(this, t(this, o) + 1);
32
32
  });
33
33
  }
34
34
  get counter() {
35
- return t(this, h);
35
+ return t(this, o);
36
36
  }
37
37
  get itemElements() {
38
- return t(this, u);
38
+ return t(this, m);
39
39
  }
40
40
  set(e) {
41
- f(this, c, w).call(this, e), f(this, c, I).call(this);
41
+ f(this, h, x).call(this, e), f(this, h, I).call(this);
42
42
  }
43
43
  shift(e) {
44
- this.set(t(this, h) + e);
44
+ this.set(t(this, o) + e);
45
45
  }
46
46
  connectedCallback() {
47
47
  var e;
48
- d(this, u, [
48
+ c(this, m, [
49
49
  ...this.querySelectorAll("[data-billboard-item]")
50
- ]), (e = t(this, u)[0]) == null || e.classList.add("current"), t(this, b).subscribe((l) => {
51
- f(this, c, I).call(this);
52
- }), t(this, b).observe(), A.subscribe(this, t(this, g));
50
+ ]), (e = t(this, m)[0]) == null || e.classList.add("current"), t(this, b).subscribe((l) => {
51
+ l.current ? (S.subscribe(this, t(this, p)), f(this, h, I).call(this)) : (c(this, E, !0), S.unsubscribe(t(this, p)), clearInterval(t(this, u)), f(this, h, x).call(this, 0));
52
+ }), t(this, b).observe();
53
53
  }
54
54
  disconnectedCallback() {
55
- t(this, b).unobserve(), A.unsubscribe(t(this, g)), clearInterval(t(this, m));
55
+ t(this, b).unobserve(), S.unsubscribe(t(this, p)), clearInterval(t(this, u));
56
56
  }
57
57
  }
58
- b = new WeakMap(), m = new WeakMap(), E = new WeakMap(), u = new WeakMap(), h = new WeakMap(), c = new WeakSet(), I = function() {
59
- t(this, b).current !== !1 && t(this, x).call(this);
60
- }, g = new WeakMap(), x = new WeakMap(), w = function(e) {
61
- d(this, h, D(e, t(this, u).length)), t(this, u).forEach((l, a) => {
62
- a === t(this, h) ? l.classList.add("current") : l.classList.remove("current");
58
+ b = new WeakMap(), u = new WeakMap(), E = new WeakMap(), m = new WeakMap(), o = new WeakMap(), h = new WeakSet(), I = function() {
59
+ t(this, b).current !== !1 && t(this, y).call(this);
60
+ }, p = new WeakMap(), y = new WeakMap(), x = function(e) {
61
+ c(this, o, D(e, t(this, m).length)), t(this, m).forEach((l, a) => {
62
+ a === t(this, o) ? l.classList.add("current") : l.classList.remove("current");
63
63
  }), q(this, "billboardChange", {
64
64
  detail: {
65
- counter: t(this, h)
65
+ counter: t(this, o)
66
66
  }
67
67
  });
68
- }, y = new WeakMap();
69
- customElements.get("e-billboard") || customElements.define("e-billboard", S);
70
- var r, o, C, p;
68
+ }, B = new WeakMap();
69
+ customElements.get("e-billboard") || customElements.define("e-billboard", T);
70
+ var r, d, C, v;
71
71
  class F extends HTMLElement {
72
72
  constructor() {
73
73
  super(...arguments);
74
74
  n(this, r, null);
75
- n(this, o, []);
75
+ n(this, d, []);
76
76
  n(this, C, (e) => {
77
- const l = e.currentTarget, a = t(this, o).findIndex((k) => k === l);
77
+ const l = e.currentTarget, a = t(this, d).findIndex((k) => k === l);
78
78
  a >= 0 && t(this, r).set(a);
79
79
  });
80
- n(this, p, () => {
81
- t(this, o).forEach((e, l) => {
80
+ n(this, v, () => {
81
+ t(this, d).forEach((e, l) => {
82
82
  l === t(this, r).counter ? e.classList.add("current") : e.classList.remove("current");
83
83
  });
84
84
  });
85
85
  }
86
86
  connectedCallback() {
87
- d(this, r, M(this, S)), t(this, r) && customElements.whenDefined("e-billboard").then(() => {
87
+ c(this, r, M(this, T)), t(this, r) && customElements.whenDefined("e-billboard").then(() => {
88
88
  var e;
89
89
  if (this.isConnected) {
90
90
  const l = t(this, r).itemElements.length;
91
91
  for (let a = 0; a < l; a++) {
92
92
  const k = document.createElement("button");
93
- t(this, o).push(k), this.appendChild(k);
93
+ t(this, d).push(k), this.appendChild(k);
94
94
  }
95
- t(this, o).forEach((a) => {
95
+ t(this, d).forEach((a) => {
96
96
  a.addEventListener("click", t(this, C));
97
97
  }), (e = t(this, r)) == null || e.addEventListener(
98
98
  "billboardChange",
99
- t(this, p)
100
- ), t(this, p).call(this);
99
+ t(this, v)
100
+ ), t(this, v).call(this);
101
101
  }
102
102
  });
103
103
  }
104
104
  disconnectedCallback() {
105
105
  var e;
106
- t(this, o).forEach((l) => {
106
+ t(this, d).forEach((l) => {
107
107
  l.removeEventListener("click", t(this, C));
108
108
  }), (e = t(this, r)) == null || e.removeEventListener(
109
109
  "billboardChange",
110
- t(this, p)
111
- ), this.innerHTML = "", d(this, o, []);
110
+ t(this, v)
111
+ ), this.innerHTML = "", c(this, d, []);
112
112
  }
113
113
  }
114
- r = new WeakMap(), o = new WeakMap(), C = new WeakMap(), p = new WeakMap();
114
+ r = new WeakMap(), d = new WeakMap(), C = new WeakMap(), v = new WeakMap();
115
115
  H && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", F);
116
- var v, L;
116
+ var L, g;
117
117
  class N extends HTMLElement {
118
118
  constructor() {
119
119
  super();
120
- n(this, v, new P(this, "--step", 1));
121
- n(this, L, null);
120
+ n(this, L, new P(this, "--step", 1));
121
+ n(this, g, null);
122
122
  this.addEventListener("click", () => {
123
- t(this, L) && t(this, L).shift(t(this, v).current);
123
+ t(this, g) && t(this, g).shift(t(this, L).current);
124
124
  });
125
125
  }
126
126
  connectedCallback() {
127
- this.tabIndex = 0, d(this, L, M(this, S)), t(this, v).observe();
127
+ this.tabIndex = 0, c(this, g, M(this, T)), t(this, L).observe();
128
128
  }
129
129
  disconnectedCallback() {
130
- this.removeAttribute("tabindex"), t(this, v).unobserve();
130
+ this.removeAttribute("tabindex"), t(this, L).unobserve();
131
131
  }
132
132
  }
133
- v = new WeakMap(), L = new WeakMap();
133
+ L = new WeakMap(), g = new WeakMap();
134
134
  H && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", N);
135
135
  export {
136
136
  F as BillboardBulletsElement,
137
- S as BillboardElement,
137
+ T as BillboardElement,
138
138
  N as BillboardStepButtonElement
139
139
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.47.3",
3
+ "version": "0.47.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"