aptechka 0.49.1 → 0.49.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,4 +1,4 @@
|
|
|
1
|
-
"use strict";var u=t=>{throw TypeError(t)};var y=(t,s,e)=>s.has(t)||u("Cannot "+e);var i=(t,s,e)=>(y(t,s,"read from private field"),e?e.call(t):s.get(t)),r=(t,s,e)=>s.has(t)?u("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),
|
|
1
|
+
"use strict";var u=t=>{throw TypeError(t)};var y=(t,s,e)=>s.has(t)||u("Cannot "+e);var i=(t,s,e)=>(y(t,s,"read from private field"),e?e.call(t):s.get(t)),r=(t,s,e)=>s.has(t)?u("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),a=(t,s,e,l)=>(y(t,s,"write to private field"),l?l.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../dom-JBOkFLTh.cjs"),x=require("../jss-BXAMRO12.cjs");require("../index-Cqw2NKev.cjs");const v=x.createStylesheet(`
|
|
2
2
|
:host {
|
|
3
3
|
position: fixed;
|
|
4
4
|
top: 0;
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
input:hover {
|
|
46
46
|
opacity: 1
|
|
47
47
|
}
|
|
48
|
-
`);var o,n,c,
|
|
48
|
+
`);var o,n,c,h,p;class f extends HTMLElement{constructor(){super();r(this,o,null);r(this,n,null);r(this,c);r(this,h,()=>{if(!i(this,n))return;const e=i(this,o).scrollLeft*-1,l=i(this,o).scrollTop*-1;i(this,n).style.transform=`translate3d(${e}px, ${l}px, 0px)`});r(this,p,()=>{i(this,n)&&(i(this,n).style.opacity=i(this,c).value)});const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,v],e.innerHTML=`
|
|
49
49
|
<slot></slot>
|
|
50
50
|
<input type="range" min="0" max="1" step="0.01" value="${this.getAttribute("opacity")||0}"/>
|
|
51
|
-
`,
|
|
51
|
+
`,a(this,c,e.querySelector("input")),i(this,c).addEventListener("input",i(this,p))}connectedCallback(){var l,m;a(this,o,g.findScrollParentElement(this)),(l=i(this,o))==null||l.addEventListener("scroll",i(this,h));const e=(m=this.shadowRoot.querySelector("slot"))==null?void 0:m.assignedElements()[0];if(e instanceof HTMLElement){a(this,n,e);const d=i(this,n).querySelector("img");d&&(a(this,n,d),d.style.cssText=`
|
|
52
52
|
display: block;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: max-content;
|
|
55
55
|
object-fit: cover;
|
|
56
|
-
`)}i(this,
|
|
56
|
+
`)}i(this,p).call(this)}disconnectedCallback(){var e;(e=i(this,o))==null||e.removeEventListener("scroll",i(this,h))}}o=new WeakMap,n=new WeakMap,c=new WeakMap,h=new WeakMap,p=new WeakMap;customElements.get("e-pixel-perfect")||customElements.define("e-pixel-perfect",f);exports.PixelPerfectElement=f;
|
|
@@ -2,7 +2,7 @@ var u = (e) => {
|
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
4
|
var f = (e, s, t) => s.has(e) || u("Cannot " + t);
|
|
5
|
-
var i = (e, s, t) => (f(e, s, "read from private field"), t ? t.call(e) : s.get(e)), c = (e, s, t) => s.has(e) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t),
|
|
5
|
+
var i = (e, s, t) => (f(e, s, "read from private field"), t ? t.call(e) : s.get(e)), c = (e, s, t) => s.has(e) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), a = (e, s, t, l) => (f(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
|
|
6
6
|
import { f as y } from "../dom-CVWzyXPH.js";
|
|
7
7
|
import { c as x } from "../jss-Chm3yE5y.js";
|
|
8
8
|
import "../index-euf5anj6.js";
|
|
@@ -57,53 +57,53 @@ const g = x(
|
|
|
57
57
|
}
|
|
58
58
|
`
|
|
59
59
|
);
|
|
60
|
-
var o, n, r,
|
|
60
|
+
var o, n, r, h, p;
|
|
61
61
|
class v extends HTMLElement {
|
|
62
62
|
constructor() {
|
|
63
63
|
super();
|
|
64
64
|
c(this, o, null);
|
|
65
65
|
c(this, n, null);
|
|
66
66
|
c(this, r);
|
|
67
|
-
c(this,
|
|
67
|
+
c(this, h, () => {
|
|
68
68
|
if (!i(this, n))
|
|
69
69
|
return;
|
|
70
70
|
const t = i(this, o).scrollLeft * -1, l = i(this, o).scrollTop * -1;
|
|
71
71
|
i(this, n).style.transform = `translate3d(${t}px, ${l}px, 0px)`;
|
|
72
72
|
});
|
|
73
|
-
c(this,
|
|
73
|
+
c(this, p, () => {
|
|
74
74
|
i(this, n) && (i(this, n).style.opacity = i(this, r).value);
|
|
75
75
|
});
|
|
76
76
|
const t = this.attachShadow({ mode: "open" });
|
|
77
77
|
t.adoptedStyleSheets = [...t.adoptedStyleSheets, g], t.innerHTML = `
|
|
78
78
|
<slot></slot>
|
|
79
79
|
<input type="range" min="0" max="1" step="0.01" value="${this.getAttribute("opacity") || 0}"/>
|
|
80
|
-
`,
|
|
80
|
+
`, a(this, r, t.querySelector("input")), i(this, r).addEventListener("input", i(this, p));
|
|
81
81
|
}
|
|
82
82
|
connectedCallback() {
|
|
83
|
-
var l,
|
|
84
|
-
|
|
85
|
-
const t = (
|
|
83
|
+
var l, m;
|
|
84
|
+
a(this, o, y(this)), (l = i(this, o)) == null || l.addEventListener("scroll", i(this, h));
|
|
85
|
+
const t = (m = this.shadowRoot.querySelector("slot")) == null ? void 0 : m.assignedElements()[0];
|
|
86
86
|
if (t instanceof HTMLElement) {
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
87
|
+
a(this, n, t);
|
|
88
|
+
const d = i(this, n).querySelector("img");
|
|
89
|
+
d && (a(this, n, d), d.style.cssText = `
|
|
90
90
|
display: block;
|
|
91
91
|
width: 100%;
|
|
92
92
|
height: max-content;
|
|
93
93
|
object-fit: cover;
|
|
94
94
|
`);
|
|
95
95
|
}
|
|
96
|
-
i(this,
|
|
96
|
+
i(this, p).call(this);
|
|
97
97
|
}
|
|
98
98
|
disconnectedCallback() {
|
|
99
99
|
var t;
|
|
100
100
|
(t = i(this, o)) == null || t.removeEventListener(
|
|
101
101
|
"scroll",
|
|
102
|
-
i(this,
|
|
102
|
+
i(this, h)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
o = new WeakMap(), n = new WeakMap(), r = new WeakMap(),
|
|
106
|
+
o = new WeakMap(), n = new WeakMap(), r = new WeakMap(), h = new WeakMap(), p = new WeakMap();
|
|
107
107
|
customElements.get("e-pixel-perfect") || customElements.define("e-pixel-perfect", v);
|
|
108
108
|
export {
|
|
109
109
|
v as PixelPerfectElement
|