aptechka 0.1.12 → 0.1.15
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/lib/Damped-Fy7tHx4d.js +33 -0
- package/lib/Damped-mdFs8WSd.cjs +1 -0
- package/lib/{WheelControls-CX9WUbBC.js → WheelControls-BN4XGOpG.js} +29 -34
- package/lib/WheelControls-Dc1xcVG6.cjs +1 -0
- package/lib/animation/Tweened.d.ts +0 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +20 -26
- package/lib/component/Component.d.ts +7 -3
- package/lib/component/hooks/custom-element.d.ts +2 -0
- package/lib/component/index.cjs +1 -1
- package/lib/component/index.d.ts +2 -1
- package/lib/component/index.js +174 -139
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +20 -23
- package/lib/en3/{test → core}/En3Raycaster.d.ts +1 -1
- package/lib/en3/core/en3.d.ts +2 -0
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.d.ts +1 -1
- package/lib/en3/index.js +540 -523
- package/lib/index-B-ZmkQyB.cjs +9 -0
- package/lib/{index-BWTXnG5n.js → index-Dizn7btU.js} +96 -96
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +15 -0
- package/lib/layout-box/index.js +102 -93
- package/lib/morph/Morph.d.ts +1 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +130 -122
- package/lib/object-BZELAoVj.cjs +1 -0
- package/lib/object-R34VLqhp.js +85 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +1 -0
- package/lib/order/index.js +1 -1
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +50 -50
- package/lib/resized/index.d.ts +11 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +101 -105
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +2 -2
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/studio/index.cjs +1 -1
- package/lib/studio/index.js +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +15 -14
- package/lib/utils/object.d.ts +1 -0
- package/package.json +1 -1
- package/lib/Damped-BwpMU9Gi.cjs +0 -1
- package/lib/Damped-urvryQLo.js +0 -36
- package/lib/WheelControls-CfDeGCOU.cjs +0 -1
- package/lib/component/hooks/shadow.d.ts +0 -1
- package/lib/index-3G1lTMEf.cjs +0 -9
- package/lib/object-C1ph624j.cjs +0 -1
- package/lib/object-DIPjdukP.js +0 -73
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";var I=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var z=(t,e,s)=>(I(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},H=(t,e,s,i)=>(I(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s);const E=require("./custom-element/index.cjs");require("./Store-D0_rDIsE.cjs");const M=require("./browser-CpzFX2xg.cjs"),N=require("./events-Crwi8fz6.cjs"),Y=require("./style-At6aDoqG.cjs"),a=require("./tags-75InVOh4.cjs"),P=require("./createStylesheet-DTOK6fTn.cjs"),w=require("./theme/index.cjs");var Z=Object.defineProperty,J=Object.getOwnPropertyDescriptor,Q=(t,e,s,i)=>{for(var n=i>1?void 0:i?J(e,s):e,l=t.length-1,h;l>=0;l--)(h=t[l])&&(n=(i?h(e,s,n):h(n))||n);return i&&n&&Z(e,s,n),n},q=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(q(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},d=(t,e,s,i)=>(q(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),B=(t,e,s)=>(q(t,e,"access private method"),s),y,S,o,v,u,f,L,C,W;const V=P.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:`var(--duration, ${w.aptechkaTheme.durationShort.var})`,transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});exports.SelectElement=class extends E.CustomElement{constructor(){super(),c(this,C),c(this,y,null),c(this,S,""),c(this,o,null),c(this,v,!1),c(this,u,void 0),c(this,f,null),c(this,L,()=>{N.dispatchSizeChangeEvent(this)}),M.isBrowser&&(this.openShadow(V),d(this,y,this.attachInternals()),d(this,f,new ResizeObserver(r(this,L))),a.element(this,{children:[a.button({class:"head",children:a.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),a.div({class:"body",style:{height:"0px"},children:a.div({class:"body-inner",children:a.slot()}),ref:e=>{d(this,o,e)}})]}))}get value(){return r(this,S)}set value(e){d(this,S,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}get internals(){return r(this,y)}get opened(){return r(this,v)}open(){clearTimeout(r(this,u)),d(this,v,!0),r(this,o).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),r(this,o).style.height=r(this,o).scrollHeight+"px",B(this,C,W).call(this)},0)}close(){d(this,v,!1),r(this,o).style.height="0px",this.classList.remove("opened"),B(this,C,W).call(this),d(this,u,setTimeout(()=>{this.classList.remove("triggered"),r(this,o).style.display="none"},Y.getElementTransitionDurationMS(r(this,o))))}connectedCallback(){r(this,f).observe(r(this,o))}disconnectedCallback(){clearTimeout(r(this,u)),r(this,f).disconnect()}};y=new WeakMap;S=new WeakMap;o=new WeakMap;v=new WeakMap;u=new WeakMap;f=new WeakMap;L=new WeakMap;C=new WeakSet;W=function(){this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:r(this,v)}}))};exports.SelectElement.formAssociated=!0;exports.SelectElement=Q([E.define("e-select")],exports.SelectElement);var _;class D extends E.CustomElement{constructor(){super(...arguments);A(this,_,null)}get selectElement(){return z(this,_)}connectedCallback(){var i,n;const s=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;s?H(this,_,s):console.log(this,"e-select not found")}}_=new WeakMap;var X=Object.defineProperty,j=Object.getOwnPropertyDescriptor,ee=(t,e,s,i)=>{for(var n=i>1?void 0:i?j(e,s):e,l=t.length-1,h;l>=0;l--)(h=t[l])&&(n=(i?h(e,s,n):h(n))||n);return i&&n&&X(e,s,n),n},U=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},O=(t,e,s)=>(U(t,e,"read from private field"),s?s.call(t):e.get(t)),G=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},R=(t,e,s)=>(U(t,e,"access private method"),s),m,T,b;const te=P.createStylesheet({":host":{width:"100%",height:w.aptechkaTheme.heightInput.var,display:"inline-flex",alignItems:"center"}});exports.SelectOptionElement=class extends D{constructor(){super(),G(this,T),G(this,m,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""}),M.isBrowser&&(this.openShadow(te),a.element(this,{tabIndex:"0",onClick:()=>{R(this,T,b).call(this)},onKeydown:e=>{e.code==="Space"&&R(this,T,b).call(this)},children:[a.slot()]}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",O(this,m)),setTimeout(()=>{O(this,m).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",O(this,m))}};m=new WeakMap;T=new WeakSet;b=function(){this.selectElement.value=this.value,this.selectElement.close()};exports.SelectOptionElement=ee([E.define("e-select-option")],exports.SelectOptionElement);const F=`<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
width="32"
|
|
4
|
+
height="32"
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
>
|
|
7
|
+
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
|
+
</svg>
|
|
9
|
+
`;var se=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,ne=(t,e,s,i)=>{for(var n=i>1?void 0:i?ie(e,s):e,l=t.length-1,h;l>=0;l--)(h=t[l])&&(n=(i?h(e,s,n):h(n))||n);return i&&n&&se(e,s,n),n},K=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},p=(t,e,s)=>(K(t,e,"read from private field"),s?s.call(t):e.get(t)),$=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},re=(t,e,s,i)=>(K(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),k,g,x;const ae=P.createStylesheet({":host":{width:"100%",height:w.aptechkaTheme.heightInput.var,display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${w.aptechkaTheme.colorDark.var})`,transitionProperty:"transform",transitionDuration:`var(--duration, ${w.aptechkaTheme.durationShort.var})`},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});exports.SelectHeadElement=class extends D{constructor(){super(),$(this,k,null),$(this,g,()=>{const s=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(i=>i.value===this.selectElement.value);s&&(p(this,k).innerHTML=s.innerHTML)}),$(this,x,()=>{this.classList.toggle("opened",this.selectElement.opened)}),M.isBrowser&&(this.openShadow(ae),a.element(this,{children:[a.slot(),a.slot({name:"arrow",children:a.element(F,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),re(this,k,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",p(this,g)),p(this,g).call(this),this.selectElement.addEventListener("selectToggle",p(this,x))}disconnectedCallback(){this.selectElement.removeEventListener("change",p(this,g)),this.selectElement.removeEventListener("selectToggle",p(this,x))}};k=new WeakMap;g=new WeakMap;x=new WeakMap;exports.SelectHeadElement=ne([E.define("e-select-head")],exports.SelectHeadElement);exports.SelectUserElement=D;exports.arrowIcon=F;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var I = (
|
|
2
|
-
if (!
|
|
1
|
+
var I = (e, t, s) => {
|
|
2
|
+
if (!t.has(e))
|
|
3
3
|
throw TypeError("Cannot " + s);
|
|
4
4
|
};
|
|
5
|
-
var H = (
|
|
6
|
-
if (
|
|
5
|
+
var H = (e, t, s) => (I(e, t, "read from private field"), s ? s.call(e) : t.get(e)), G = (e, t, s) => {
|
|
6
|
+
if (t.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
}, R = (
|
|
8
|
+
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
9
|
+
}, R = (e, t, s, i) => (I(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s);
|
|
10
10
|
import { CustomElement as Y, define as P } from "./custom-element/index.js";
|
|
11
11
|
import "./Store-JOKrNVEr.js";
|
|
12
12
|
import { i as D } from "./browser-0zX67oeU.js";
|
|
13
|
-
import { d as
|
|
14
|
-
import { g as
|
|
15
|
-
import { e as
|
|
13
|
+
import { d as V } from "./events-_C2CztxR.js";
|
|
14
|
+
import { g as X } from "./style-j2TwriJ_.js";
|
|
15
|
+
import { e as x, p as j, ay as _, D as q } from "./tags-DgRVzazL.js";
|
|
16
16
|
import { c as z } from "./createStylesheet-Zqf3lXhM.js";
|
|
17
17
|
import { aptechkaTheme as m } from "./theme/index.js";
|
|
18
|
-
var
|
|
19
|
-
for (var
|
|
20
|
-
(l =
|
|
21
|
-
return i &&
|
|
22
|
-
},
|
|
23
|
-
if (!
|
|
18
|
+
var ee = Object.defineProperty, te = Object.getOwnPropertyDescriptor, se = (e, t, s, i) => {
|
|
19
|
+
for (var a = i > 1 ? void 0 : i ? te(t, s) : t, r = e.length - 1, l; r >= 0; r--)
|
|
20
|
+
(l = e[r]) && (a = (i ? l(t, s, a) : l(a)) || a);
|
|
21
|
+
return i && a && ee(t, s, a), a;
|
|
22
|
+
}, A = (e, t, s) => {
|
|
23
|
+
if (!t.has(e))
|
|
24
24
|
throw TypeError("Cannot " + s);
|
|
25
|
-
},
|
|
26
|
-
if (
|
|
25
|
+
}, n = (e, t, s) => (A(e, t, "read from private field"), s ? s.call(e) : t.get(e)), h = (e, t, s) => {
|
|
26
|
+
if (t.has(e))
|
|
27
27
|
throw TypeError("Cannot add the same private member more than once");
|
|
28
|
-
|
|
29
|
-
}, c = (
|
|
30
|
-
const
|
|
28
|
+
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
29
|
+
}, c = (e, t, s, i) => (A(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s), B = (e, t, s) => (A(e, t, "access private method"), s), E, y, o, p, v, u, O, C, W;
|
|
30
|
+
const ie = z({
|
|
31
31
|
":host": {
|
|
32
32
|
position: "relative"
|
|
33
33
|
},
|
|
@@ -62,13 +62,13 @@ const ae = z({
|
|
|
62
62
|
paddingTop: "var(--gap, 0px)"
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
let
|
|
65
|
+
let b = class extends Y {
|
|
66
66
|
constructor() {
|
|
67
|
-
super(), h(this, C), h(this, E, null), h(this, y, ""), h(this, o, null), h(this, p, !1), h(this, v, void 0), h(this, u, null), h(this,
|
|
68
|
-
|
|
69
|
-
}), D && (this.openShadow(
|
|
67
|
+
super(), h(this, C), h(this, E, null), h(this, y, ""), h(this, o, null), h(this, p, !1), h(this, v, void 0), h(this, u, null), h(this, O, () => {
|
|
68
|
+
V(this);
|
|
69
|
+
}), D && (this.openShadow(ie), c(this, E, this.attachInternals()), c(this, u, new ResizeObserver(n(this, O))), x(this, {
|
|
70
70
|
children: [
|
|
71
|
-
|
|
71
|
+
j({
|
|
72
72
|
class: "head",
|
|
73
73
|
children: _({ name: "head" }),
|
|
74
74
|
onClick: () => {
|
|
@@ -84,18 +84,18 @@ let W = class extends Y {
|
|
|
84
84
|
class: "body-inner",
|
|
85
85
|
children: _()
|
|
86
86
|
}),
|
|
87
|
-
ref: (
|
|
88
|
-
c(this, o,
|
|
87
|
+
ref: (e) => {
|
|
88
|
+
c(this, o, e);
|
|
89
89
|
}
|
|
90
90
|
})
|
|
91
91
|
]
|
|
92
92
|
}));
|
|
93
93
|
}
|
|
94
94
|
get value() {
|
|
95
|
-
return
|
|
95
|
+
return n(this, y);
|
|
96
96
|
}
|
|
97
|
-
set value(
|
|
98
|
-
c(this, y,
|
|
97
|
+
set value(e) {
|
|
98
|
+
c(this, y, e), this.dispatchEvent(
|
|
99
99
|
new Event("change", {
|
|
100
100
|
bubbles: !0,
|
|
101
101
|
composed: !0
|
|
@@ -103,26 +103,26 @@ let W = class extends Y {
|
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
get internals() {
|
|
106
|
-
return
|
|
106
|
+
return n(this, E);
|
|
107
107
|
}
|
|
108
108
|
get opened() {
|
|
109
|
-
return
|
|
109
|
+
return n(this, p);
|
|
110
110
|
}
|
|
111
111
|
open() {
|
|
112
|
-
clearTimeout(
|
|
113
|
-
this.classList.add("opened"),
|
|
112
|
+
clearTimeout(n(this, v)), c(this, p, !0), n(this, o).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
|
|
113
|
+
this.classList.add("opened"), n(this, o).style.height = n(this, o).scrollHeight + "px", B(this, C, W).call(this);
|
|
114
114
|
}, 0);
|
|
115
115
|
}
|
|
116
116
|
close() {
|
|
117
|
-
c(this, p, !1),
|
|
118
|
-
this.classList.remove("triggered"),
|
|
119
|
-
},
|
|
117
|
+
c(this, p, !1), n(this, o).style.height = "0px", this.classList.remove("opened"), B(this, C, W).call(this), c(this, v, setTimeout(() => {
|
|
118
|
+
this.classList.remove("triggered"), n(this, o).style.display = "none";
|
|
119
|
+
}, X(n(this, o))));
|
|
120
120
|
}
|
|
121
121
|
connectedCallback() {
|
|
122
|
-
|
|
122
|
+
n(this, u).observe(n(this, o));
|
|
123
123
|
}
|
|
124
124
|
disconnectedCallback() {
|
|
125
|
-
clearTimeout(
|
|
125
|
+
clearTimeout(n(this, v)), n(this, u).disconnect();
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
128
|
E = /* @__PURE__ */ new WeakMap();
|
|
@@ -131,25 +131,25 @@ o = /* @__PURE__ */ new WeakMap();
|
|
|
131
131
|
p = /* @__PURE__ */ new WeakMap();
|
|
132
132
|
v = /* @__PURE__ */ new WeakMap();
|
|
133
133
|
u = /* @__PURE__ */ new WeakMap();
|
|
134
|
-
|
|
134
|
+
O = /* @__PURE__ */ new WeakMap();
|
|
135
135
|
C = /* @__PURE__ */ new WeakSet();
|
|
136
|
-
|
|
136
|
+
W = function() {
|
|
137
137
|
this.dispatchEvent(
|
|
138
138
|
new CustomEvent("selectToggle", {
|
|
139
139
|
bubbles: !0,
|
|
140
140
|
composed: !0,
|
|
141
141
|
detail: {
|
|
142
|
-
opened:
|
|
142
|
+
opened: n(this, p)
|
|
143
143
|
}
|
|
144
144
|
})
|
|
145
145
|
);
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
b.formAssociated = !0;
|
|
148
|
+
b = se([
|
|
149
149
|
P("e-select")
|
|
150
|
-
],
|
|
150
|
+
], b);
|
|
151
151
|
var w;
|
|
152
|
-
class
|
|
152
|
+
class Z extends Y {
|
|
153
153
|
constructor() {
|
|
154
154
|
super(...arguments);
|
|
155
155
|
G(this, w, null);
|
|
@@ -158,25 +158,25 @@ class J extends Y {
|
|
|
158
158
|
return H(this, w);
|
|
159
159
|
}
|
|
160
160
|
connectedCallback() {
|
|
161
|
-
var i,
|
|
162
|
-
const s = (
|
|
161
|
+
var i, a;
|
|
162
|
+
const s = (a = (i = this.assignedSlot) == null ? void 0 : i.getRootNode()) == null ? void 0 : a.host;
|
|
163
163
|
s ? R(this, w, s) : console.log(this, "e-select not found");
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
w = new WeakMap();
|
|
167
|
-
var
|
|
168
|
-
for (var
|
|
169
|
-
(l =
|
|
170
|
-
return i &&
|
|
171
|
-
},
|
|
172
|
-
if (!
|
|
167
|
+
var ae = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, re = (e, t, s, i) => {
|
|
168
|
+
for (var a = i > 1 ? void 0 : i ? ne(t, s) : t, r = e.length - 1, l; r >= 0; r--)
|
|
169
|
+
(l = e[r]) && (a = (i ? l(t, s, a) : l(a)) || a);
|
|
170
|
+
return i && a && ae(t, s, a), a;
|
|
171
|
+
}, J = (e, t, s) => {
|
|
172
|
+
if (!t.has(e))
|
|
173
173
|
throw TypeError("Cannot " + s);
|
|
174
|
-
},
|
|
175
|
-
if (
|
|
174
|
+
}, $ = (e, t, s) => (J(e, t, "read from private field"), s ? s.call(e) : t.get(e)), F = (e, t, s) => {
|
|
175
|
+
if (t.has(e))
|
|
176
176
|
throw TypeError("Cannot add the same private member more than once");
|
|
177
|
-
|
|
178
|
-
},
|
|
179
|
-
const
|
|
177
|
+
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
178
|
+
}, K = (e, t, s) => (J(e, t, "access private method"), s), f, S, M;
|
|
179
|
+
const le = z({
|
|
180
180
|
":host": {
|
|
181
181
|
width: "100%",
|
|
182
182
|
height: m.heightInput.var,
|
|
@@ -184,17 +184,17 @@ const he = z({
|
|
|
184
184
|
alignItems: "center"
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
|
-
let
|
|
187
|
+
let N = class extends Z {
|
|
188
188
|
constructor() {
|
|
189
189
|
super(), F(this, S), F(this, f, () => {
|
|
190
190
|
this.selectElement.value === this.value ? this.style.display = "none" : this.style.display = "";
|
|
191
|
-
}), D && (this.openShadow(
|
|
191
|
+
}), D && (this.openShadow(le), x(this, {
|
|
192
192
|
tabIndex: "0",
|
|
193
193
|
onClick: () => {
|
|
194
|
-
|
|
194
|
+
K(this, S, M).call(this);
|
|
195
195
|
},
|
|
196
|
-
onKeydown: (
|
|
197
|
-
|
|
196
|
+
onKeydown: (e) => {
|
|
197
|
+
e.code === "Space" && K(this, S, M).call(this);
|
|
198
198
|
},
|
|
199
199
|
children: [_()]
|
|
200
200
|
}));
|
|
@@ -203,12 +203,12 @@ let K = class extends J {
|
|
|
203
203
|
return (this.hasAttribute("value") ? this.getAttribute("value") : this.innerText) || "";
|
|
204
204
|
}
|
|
205
205
|
connectedCallback() {
|
|
206
|
-
super.connectedCallback(), this.hasAttribute("default") && (this.selectElement.value || (this.selectElement.value = this.value)), this.selectElement.addEventListener("change",
|
|
207
|
-
|
|
206
|
+
super.connectedCallback(), this.hasAttribute("default") && (this.selectElement.value || (this.selectElement.value = this.value)), this.selectElement.addEventListener("change", $(this, f)), setTimeout(() => {
|
|
207
|
+
$(this, f).call(this);
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
disconnectedCallback() {
|
|
211
|
-
this.selectElement.removeEventListener("change",
|
|
211
|
+
this.selectElement.removeEventListener("change", $(this, f));
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
f = /* @__PURE__ */ new WeakMap();
|
|
@@ -216,10 +216,10 @@ S = /* @__PURE__ */ new WeakSet();
|
|
|
216
216
|
M = function() {
|
|
217
217
|
this.selectElement.value = this.value, this.selectElement.close();
|
|
218
218
|
};
|
|
219
|
-
|
|
219
|
+
N = re([
|
|
220
220
|
P("e-select-option")
|
|
221
|
-
],
|
|
222
|
-
const
|
|
221
|
+
], N);
|
|
222
|
+
const oe = `<svg
|
|
223
223
|
xmlns="http://www.w3.org/2000/svg"
|
|
224
224
|
width="32"
|
|
225
225
|
height="32"
|
|
@@ -228,19 +228,19 @@ const ce = `<svg
|
|
|
228
228
|
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
229
229
|
</svg>
|
|
230
230
|
`;
|
|
231
|
-
var
|
|
232
|
-
for (var
|
|
233
|
-
(l =
|
|
234
|
-
return i &&
|
|
235
|
-
},
|
|
236
|
-
if (!
|
|
231
|
+
var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, de = (e, t, s, i) => {
|
|
232
|
+
for (var a = i > 1 ? void 0 : i ? ce(t, s) : t, r = e.length - 1, l; r >= 0; r--)
|
|
233
|
+
(l = e[r]) && (a = (i ? l(t, s, a) : l(a)) || a);
|
|
234
|
+
return i && a && he(t, s, a), a;
|
|
235
|
+
}, Q = (e, t, s) => {
|
|
236
|
+
if (!t.has(e))
|
|
237
237
|
throw TypeError("Cannot " + s);
|
|
238
|
-
}, d = (
|
|
239
|
-
if (
|
|
238
|
+
}, d = (e, t, s) => (Q(e, t, "read from private field"), s ? s.call(e) : t.get(e)), L = (e, t, s) => {
|
|
239
|
+
if (t.has(e))
|
|
240
240
|
throw TypeError("Cannot add the same private member more than once");
|
|
241
|
-
|
|
242
|
-
},
|
|
243
|
-
const
|
|
241
|
+
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
242
|
+
}, pe = (e, t, s, i) => (Q(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s), T, g, k;
|
|
243
|
+
const ve = z({
|
|
244
244
|
":host": {
|
|
245
245
|
width: "100%",
|
|
246
246
|
height: m.heightInput.var,
|
|
@@ -260,42 +260,42 @@ const fe = z({
|
|
|
260
260
|
transform: "scaleY(-1)"
|
|
261
261
|
}
|
|
262
262
|
});
|
|
263
|
-
let U = class extends
|
|
263
|
+
let U = class extends Z {
|
|
264
264
|
constructor() {
|
|
265
|
-
super(),
|
|
266
|
-
const
|
|
265
|
+
super(), L(this, T, null), L(this, g, () => {
|
|
266
|
+
const t = this.selectElement.shadowRoot.querySelector(
|
|
267
267
|
".body slot"
|
|
268
268
|
).assignedElements().find((s) => s.value === this.selectElement.value);
|
|
269
|
-
|
|
270
|
-
}),
|
|
269
|
+
t && (d(this, T).innerHTML = t.innerHTML);
|
|
270
|
+
}), L(this, k, () => {
|
|
271
271
|
this.classList.toggle("opened", this.selectElement.opened);
|
|
272
|
-
}), D && (this.openShadow(
|
|
272
|
+
}), D && (this.openShadow(ve), x(this, {
|
|
273
273
|
children: [
|
|
274
274
|
_(),
|
|
275
275
|
_({
|
|
276
276
|
name: "arrow",
|
|
277
|
-
children:
|
|
277
|
+
children: x(oe, { class: "default-arrow" })
|
|
278
278
|
})
|
|
279
279
|
]
|
|
280
280
|
}), this.slot = "head");
|
|
281
281
|
}
|
|
282
282
|
connectedCallback() {
|
|
283
|
-
super.connectedCallback(),
|
|
283
|
+
super.connectedCallback(), pe(this, T, this.querySelector("[data-value-holder]") || this), this.selectElement.addEventListener("change", d(this, g)), d(this, g).call(this), this.selectElement.addEventListener("selectToggle", d(this, k));
|
|
284
284
|
}
|
|
285
285
|
disconnectedCallback() {
|
|
286
|
-
this.selectElement.removeEventListener("change", d(this, g)), this.selectElement.removeEventListener("selectToggle", d(this,
|
|
286
|
+
this.selectElement.removeEventListener("change", d(this, g)), this.selectElement.removeEventListener("selectToggle", d(this, k));
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
289
|
T = /* @__PURE__ */ new WeakMap();
|
|
290
290
|
g = /* @__PURE__ */ new WeakMap();
|
|
291
|
-
|
|
292
|
-
U =
|
|
291
|
+
k = /* @__PURE__ */ new WeakMap();
|
|
292
|
+
U = de([
|
|
293
293
|
P("e-select-head")
|
|
294
294
|
], U);
|
|
295
295
|
export {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
b as S,
|
|
297
|
+
oe as a,
|
|
298
|
+
Z as b,
|
|
299
|
+
N as c,
|
|
300
300
|
U as d
|
|
301
301
|
};
|
package/lib/layout-box/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var K=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(K(i,e,"read from private field"),s?s.call(i):e.get(i)),h=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},n=(i,e,s,o)=>(K(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);var L=(i,e,s)=>(K(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const lt=require("../css-unit-parser/index.cjs"),I=require("../ladder/index.cjs"),F=require("../order/index.cjs"),G=require("../window-resizer/index.cjs"),ot=require("../scroll-entries/index.cjs"),J=require("../ticker/index.cjs"),N=require("../browser-CpzFX2xg.cjs"),Q=require("../dom-qY2LdCVL.cjs"),b=require("../layout-8ryRAMGJ.cjs");function j(i){const e=Math.sqrt(i.m11*i.m11+i.m12*i.m12+i.m13*i.m13),s=Math.sqrt(i.m21*i.m21+i.m22*i.m22+i.m23*i.m23),o=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),T=Math.atan2(i.m32,i.m33),X=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),V=Math.atan2(i.m21,i.m11),u=i.m41,C=i.m42,O=i.m43;return{scaleX:e,scaleY:s,scaleZ:o,rotationX:T,rotationY:X,rotationZ:V,translationX:u,translationY:C,translationZ:O}}var a,f,p,M,Y,q,x,v,H,m,_,P,d,S,w,R,E,B,g,y,z,c,r,l,Z,$,k,tt,D,et,U,st,A,W;class at{constructor(e,s){h(this,Z);h(this,k);h(this,D);h(this,U);h(this,a,null);h(this,f,null);h(this,p,[]);h(this,M,"auto");h(this,Y,"top");h(this,q,!1);h(this,x,!0);h(this,v,!0);h(this,H,!0);h(this,m,0);h(this,_,0);h(this,P,0);h(this,d,0);h(this,S,0);h(this,w,0);h(this,R,0);h(this,E,0);h(this,B,0);h(this,g,{x:0,y:0,z:0});h(this,y,{x:0,y:0,z:0});h(this,z,{x:1,y:1,z:1});h(this,c,new I.Ladder({x:0,y:0,z:0}));h(this,r,new I.Ladder({x:0,y:0,z:0}));h(this,l,new I.Ladder({x:0,y:0,z:0}));h(this,A,()=>{N.isBrowser&&L(this,D,et).call(this)});h(this,W,()=>{L(this,U,st).call(this),L(this,Z,$).call(this)});N.isBrowser&&(n(this,a,Q.getElement(e)||document.body),n(this,f,Q.getElement(s==null?void 0:s.containerElement)||document.body),n(this,M,(s==null?void 0:s.scrollAxis)||"auto"),n(this,Y,(s==null?void 0:s.frontSide)||"top"),n(this,q,(s==null?void 0:s.cartesian)||!1),n(this,x,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),n(this,v,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),n(this,H,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),t(this,l).setStep("_size","+",{x:1,y:1,z:1}),t(this,r).setStep("_position","+",{x:0,y:0,z:0}),t(this,l).setStep("_scale","*",{x:1,y:1,z:1}),t(this,r).setStep("_translation","+",{x:0,y:0,z:0}),t(this,c).setStep("_rotation","+",{x:0,y:0,z:0}),addEventListener("DOMContentLoaded",()=>{ot.scrollEntries.getAll(this.element).forEach(o=>{this.setScrollStep(()=>o)})}),J.ticker.subscribe(t(this,W),{order:F.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}),G.windowResizer.subscribe(t(this,A),F.TICK_ORDER.LAYOUT_BOX))}get element(){return t(this,a)}get containerElement(){return t(this,f)}get position(){return t(this,r).current}get rotation(){return t(this,c).current}get scale(){return t(this,l).current}get left(){return t(this,S)}get top(){return t(this,d)}get front(){return t(this,w)}get width(){return t(this,m)}get height(){return t(this,_)}get depth(){return t(this,P)}bindObject(e){e.position&&t(this,r).bind(e.position),e.rotation&&t(this,c).bind(e.rotation),e.scale&&t(this,l).bind(e.scale)}unbindObject(e){e.position&&t(this,r).unbind(e.position),e.rotation&&t(this,c).unbind(e.rotation),e.scale&&t(this,l).unbind(e.scale)}setScrollStep(e){return t(this,p).includes(e)||t(this,p).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){n(this,p,t(this,p).filter(s=>s!==e))}destroy(){J.ticker.unsubscribe(t(this,W)),G.windowResizer.unsubscribe(t(this,A)),t(this,r).close(),t(this,c).close(),t(this,l).close()}setPositionStep(...e){t(this,r).setStep(...e)}getPositionStep(...e){return t(this,r).getStepValue(...e)}setRotationStep(...e){t(this,c).setStep(...e)}getRotationStep(...e){return t(this,c).getStepValue(...e)}setScaleStep(...e){t(this,l).setStep(...e)}getScaleStep(...e){return t(this,l).getStepValue(...e)}deletePositionStep(...e){t(this,r).deleteStep(...e)}deleteRotationStep(...e){t(this,c).deleteStep(...e)}deleteScaleStep(...e){t(this,l).deleteStep(...e)}}a=new WeakMap,f=new WeakMap,p=new WeakMap,M=new WeakMap,Y=new WeakMap,q=new WeakMap,x=new WeakMap,v=new WeakMap,H=new WeakMap,m=new WeakMap,_=new WeakMap,P=new WeakMap,d=new WeakMap,S=new WeakMap,w=new WeakMap,R=new WeakMap,E=new WeakMap,B=new WeakMap,g=new WeakMap,y=new WeakMap,z=new WeakMap,c=new WeakMap,r=new WeakMap,l=new WeakMap,Z=new WeakSet,$=function(){t(this,l).calculate(),t(this,r).calculate(),t(this,c).calculate()},k=new WeakSet,tt=function(){t(this,l).setStep("_size","+",{x:t(this,x)?t(this,m):1,y:t(this,x)?t(this,_):1,z:t(this,x)?t(this,P):1});const e=t(this,v)?t(this,R):0,s=t(this,v)?t(this,E):0,o=t(this,v)?t(this,B):0;t(this,r).setStep("_position","+",{x:e,y:s,z:o}),t(this,H)?(t(this,l).setStep("_scale","*",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,r).setStep("_translation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z}),t(this,c).setStep("_rotation","+",{x:t(this,y).x,y:t(this,y).y,z:t(this,y).z})):(t(this,l).setStep("_scale","*",{x:1,y:1,z:1}),t(this,r).setStep("_translation","+",{x:0,y:0,z:0}),t(this,c).setStep("_rotation","+",{x:0,y:0,z:0}))},D=new WeakSet,et=function(){const e=getComputedStyle(t(this,a));n(this,m,Math.max(t(this,a).clientWidth,1)),n(this,_,Math.max(t(this,a).clientHeight,1)),n(this,P,Math.max(lt.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=b.getCumulativeOffsetLeft(t(this,f)),o=b.getCumulativeOffsetTop(t(this,f)),T=t(this,f).clientWidth,X=t(this,f).clientHeight;if(n(this,S,b.getCumulativeOffsetLeft(t(this,a))-s),n(this,d,b.getCumulativeOffsetTop(t(this,a))-o),t(this,M)==="z"){const C=t(this,S)/T,O=t(this,d)/X;n(this,S,(C-Math.floor(C))*T),n(this,d,(O-Math.floor(O))*X),t(this,Y)==="left"?n(this,w,b.getCumulativeOffsetLeft(t(this,a))-s-t(this,S)):n(this,w,b.getCumulativeOffsetTop(t(this,a))-o-t(this,d))}if(n(this,S,t(this,S)+t(this,a).clientLeft),n(this,d,t(this,d)+t(this,a).clientTop),t(this,q)){const C=Math.round(T/2),O=Math.round(X/2),it=t(this,m)?Math.round(t(this,m)/2):0,ht=t(this,_)?Math.round(t(this,_)/2):0,nt=t(this,S)-C+it,rt=(t(this,d)-O+ht)*-1;n(this,R,nt),n(this,E,rt)}else n(this,R,t(this,S)),n(this,E,t(this,d));n(this,B,t(this,w)*-1);const V=new WebKitCSSMatrix(e.transform),u=j(V);t(this,g).x=u.translationX,t(this,g).y=u.translationY,t(this,g).z=u.translationZ,t(this,z).x=u.scaleX,t(this,z).y=u.scaleY,t(this,z).z=u.scaleZ,t(this,y).x=u.rotationX,t(this,y).y=u.rotationY,t(this,y).z=u.rotationZ,L(this,k,tt).call(this),L(this,Z,$).call(this)},U=new WeakSet,st=function(){for(let e=0;e<t(this,p).length;e++){const s=t(this,p)[e]();let o=s.axis;t(this,M)!=="auto"&&(o=t(this,M)),t(this,r).setStep(`_scroll_${e}`,"+",{[o]:s.value*(o==="x"?-1:t(this,q)?1:-1)})}},A=new WeakMap,W=new WeakMap;exports.LayoutBox=at;exports.decomposeCSSMatrix=j;
|
|
@@ -71,8 +71,23 @@ export declare class LayoutBox {
|
|
|
71
71
|
deleteScrollStep(callback: LayoutBoxScrollStepCallback): void;
|
|
72
72
|
destroy(): void;
|
|
73
73
|
setPositionStep(...args: Parameters<Ladder['setStep']>): void;
|
|
74
|
+
getPositionStep(...args: Parameters<Ladder['getStepValue']>): {
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
z: number;
|
|
78
|
+
};
|
|
74
79
|
setRotationStep(...args: Parameters<Ladder['setStep']>): void;
|
|
80
|
+
getRotationStep(...args: Parameters<Ladder['getStepValue']>): {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
z: number;
|
|
84
|
+
};
|
|
75
85
|
setScaleStep(...args: Parameters<Ladder['setStep']>): void;
|
|
86
|
+
getScaleStep(...args: Parameters<Ladder['getStepValue']>): {
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
z: number;
|
|
90
|
+
};
|
|
76
91
|
deletePositionStep(...args: Parameters<Ladder['deleteStep']>): void;
|
|
77
92
|
deleteRotationStep(...args: Parameters<Ladder['deleteStep']>): void;
|
|
78
93
|
deleteScaleStep(...args: Parameters<Ladder['deleteStep']>): void;
|