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