aptechka 0.49.0 → 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.
package/README.md CHANGED
@@ -1 +1 @@
1
- # Инари
1
+
@@ -1,4 +1,4 @@
1
- "use strict";var u=t=>{throw TypeError(t)};var m=(t,n,e)=>n.has(t)||u("Cannot "+e);var i=(t,n,e)=>(m(t,n,"read from private field"),e?e.call(t):n.get(t)),r=(t,n,e)=>n.has(t)?u("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,e),p=(t,n,e,l)=>(m(t,n,"write to private field"),l?l.call(t,e):n.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../dom-JBOkFLTh.cjs"),v=require("../jss-BXAMRO12.cjs");require("../index-Cqw2NKev.cjs");const x=v.createStylesheet(`
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;
@@ -13,13 +13,17 @@
13
13
  user-select: none;
14
14
  }
15
15
 
16
- ::slotted(img),
17
- ::slotted(picture) {
16
+ ::slotted(img) {
17
+ display: block;
18
18
  width: 100%;
19
19
  height: max-content;
20
20
  object-fit: cover;
21
21
  }
22
22
 
23
+ ::slotted(picture) {
24
+ display: contents;
25
+ }
26
+
23
27
  input {
24
28
  position: fixed;
25
29
  z-index: 1;
@@ -41,7 +45,12 @@
41
45
  input:hover {
42
46
  opacity: 1
43
47
  }
44
- `);var s,o,c,a,h;class f extends HTMLElement{constructor(){super();r(this,s,null);r(this,o,null);r(this,c);r(this,a,()=>{if(!i(this,o))return;const e=i(this,s).scrollLeft*-1,l=i(this,s).scrollTop*-1;i(this,o).style.transform=`translate3d(${e}px, ${l}px, 0px)`});r(this,h,()=>{i(this,o)&&(i(this,o).style.opacity=i(this,c).value)});const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,x],e.innerHTML=`
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=`
45
49
  <slot></slot>
46
50
  <input type="range" min="0" max="1" step="0.01" value="${this.getAttribute("opacity")||0}"/>
47
- `,p(this,c,e.querySelector("input")),i(this,c).addEventListener("input",i(this,h))}connectedCallback(){var l,d;p(this,s,y.findScrollParentElement(this)),(l=i(this,s))==null||l.addEventListener("scroll",i(this,a));const e=(d=this.shadowRoot.querySelector("slot"))==null?void 0:d.assignedElements()[0];e instanceof HTMLElement&&p(this,o,e),i(this,h).call(this)}disconnectedCallback(){var e;(e=i(this,s))==null||e.removeEventListener("scroll",i(this,a))}}s=new WeakMap,o=new WeakMap,c=new WeakMap,a=new WeakMap,h=new WeakMap;customElements.get("e-pixel-perfect")||customElements.define("e-pixel-perfect",f);exports.PixelPerfectElement=f;
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
+ display: block;
53
+ width: 100%;
54
+ height: max-content;
55
+ object-fit: cover;
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;
@@ -1,12 +1,12 @@
1
- var d = (e) => {
1
+ var u = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var u = (e, s, t) => s.has(e) || d("Cannot " + t);
5
- var i = (e, s, t) => (u(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => s.has(e) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), p = (e, s, t, l) => (u(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
6
- import { f } from "../dom-CVWzyXPH.js";
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), a = (e, s, t, l) => (f(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
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";
9
- const y = x(
9
+ const g = x(
10
10
  /*css*/
11
11
  `
12
12
  :host {
@@ -23,13 +23,17 @@ const y = x(
23
23
  user-select: none;
24
24
  }
25
25
 
26
- ::slotted(img),
27
- ::slotted(picture) {
26
+ ::slotted(img) {
27
+ display: block;
28
28
  width: 100%;
29
29
  height: max-content;
30
30
  object-fit: cover;
31
31
  }
32
32
 
33
+ ::slotted(picture) {
34
+ display: contents;
35
+ }
36
+
33
37
  input {
34
38
  position: fixed;
35
39
  z-index: 1;
@@ -53,43 +57,53 @@ const y = x(
53
57
  }
54
58
  `
55
59
  );
56
- var n, o, c, a, h;
60
+ var o, n, r, h, p;
57
61
  class v extends HTMLElement {
58
62
  constructor() {
59
63
  super();
60
- r(this, n, null);
61
- r(this, o, null);
62
- r(this, c);
63
- r(this, a, () => {
64
- if (!i(this, o))
64
+ c(this, o, null);
65
+ c(this, n, null);
66
+ c(this, r);
67
+ c(this, h, () => {
68
+ if (!i(this, n))
65
69
  return;
66
- const t = i(this, n).scrollLeft * -1, l = i(this, n).scrollTop * -1;
67
- i(this, o).style.transform = `translate3d(${t}px, ${l}px, 0px)`;
70
+ const t = i(this, o).scrollLeft * -1, l = i(this, o).scrollTop * -1;
71
+ i(this, n).style.transform = `translate3d(${t}px, ${l}px, 0px)`;
68
72
  });
69
- r(this, h, () => {
70
- i(this, o) && (i(this, o).style.opacity = i(this, c).value);
73
+ c(this, p, () => {
74
+ i(this, n) && (i(this, n).style.opacity = i(this, r).value);
71
75
  });
72
76
  const t = this.attachShadow({ mode: "open" });
73
- t.adoptedStyleSheets = [...t.adoptedStyleSheets, y], t.innerHTML = `
77
+ t.adoptedStyleSheets = [...t.adoptedStyleSheets, g], t.innerHTML = `
74
78
  <slot></slot>
75
79
  <input type="range" min="0" max="1" step="0.01" value="${this.getAttribute("opacity") || 0}"/>
76
- `, p(this, c, t.querySelector("input")), i(this, c).addEventListener("input", i(this, h));
80
+ `, a(this, r, t.querySelector("input")), i(this, r).addEventListener("input", i(this, p));
77
81
  }
78
82
  connectedCallback() {
79
83
  var l, m;
80
- p(this, n, f(this)), (l = i(this, n)) == null || l.addEventListener("scroll", i(this, a));
84
+ a(this, o, y(this)), (l = i(this, o)) == null || l.addEventListener("scroll", i(this, h));
81
85
  const t = (m = this.shadowRoot.querySelector("slot")) == null ? void 0 : m.assignedElements()[0];
82
- t instanceof HTMLElement && p(this, o, t), i(this, h).call(this);
86
+ if (t instanceof HTMLElement) {
87
+ a(this, n, t);
88
+ const d = i(this, n).querySelector("img");
89
+ d && (a(this, n, d), d.style.cssText = `
90
+ display: block;
91
+ width: 100%;
92
+ height: max-content;
93
+ object-fit: cover;
94
+ `);
95
+ }
96
+ i(this, p).call(this);
83
97
  }
84
98
  disconnectedCallback() {
85
99
  var t;
86
- (t = i(this, n)) == null || t.removeEventListener(
100
+ (t = i(this, o)) == null || t.removeEventListener(
87
101
  "scroll",
88
- i(this, a)
102
+ i(this, h)
89
103
  );
90
104
  }
91
105
  }
92
- n = new WeakMap(), o = new WeakMap(), c = new WeakMap(), a = new WeakMap(), h = new WeakMap();
106
+ o = new WeakMap(), n = new WeakMap(), r = new WeakMap(), h = new WeakMap(), p = new WeakMap();
93
107
  customElements.get("e-pixel-perfect") || customElements.define("e-pixel-perfect", v);
94
108
  export {
95
109
  v as PixelPerfectElement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.49.0",
3
+ "version": "0.49.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"