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