aptechka 0.7.2 → 0.7.4
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/accordion/AccordionElement.d.ts +0 -3
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +60 -71
- package/lib/en3/core/En3Raycaster.d.ts +1 -0
- package/lib/en3/core/en3.d.ts +3 -0
- package/lib/en3/helpers/En3ComposerManager.d.ts +5 -0
- package/lib/en3/helpers/{En3Controls.d.ts → En3Helpers.d.ts} +1 -1
- package/lib/en3/helpers/En3Object3dManager.d.ts +2 -0
- package/lib/en3/helpers/En3ParametersManager.d.ts +16 -0
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.d.ts +1 -1
- package/lib/en3/helpers/index.js +1409 -670
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +1 -1
- package/lib/en3/loaders/index.cjs +1 -1
- package/lib/en3/loaders/index.js +1 -1
- package/lib/en3/utils/index.cjs +1 -1
- package/lib/en3/utils/index.js +15 -38
- package/lib/en3-CBBYE8rb.cjs +8 -0
- package/lib/en3-sDqjL5Mg.js +349 -0
- package/lib/events-BGwqaxVW.cjs +1 -0
- package/lib/{events-_C2CztxR.js → events-C_coq1Mk.js} +9 -0
- package/lib/{index-BAH_fO2N.js → index-CoOTQk9H.js} +40 -40
- package/lib/{index-D1LQUR-R.cjs → index-DVUk3T-y.cjs} +2 -2
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +2 -2
- package/lib/order/index.js +1 -1
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/store/Store.d.ts +1 -0
- package/lib/traverseMaterials-BtBXV88O.cjs +1 -0
- package/lib/traverseMaterials-M-N1989i.js +29 -0
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +331 -313
- package/lib/tweaker/tweakerStorage.d.ts +2 -0
- package/lib/utils/events.d.ts +2 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +65 -64
- package/package.json +1 -1
- package/lib/en3-C4mzaF6q.cjs +0 -8
- package/lib/en3-hbkN1OPu.js +0 -343
- package/lib/events-Crwi8fz6.cjs +0 -1
package/lib/accordion/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var R=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(R(s,e,"read from private field"),i?i.call(s):e.get(s)),h=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},d=(s,e,i,n)=>(R(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);var o=(s,e,i)=>(R(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var R=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(R(s,e,"read from private field"),i?i.call(s):e.get(s)),h=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},d=(s,e,i,n)=>(R(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);var o=(s,e,i)=>(R(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("../custom-element/index.cjs"),F=require("../attribute/index.cjs"),X=require("../browser-CpzFX2xg.cjs"),Y=require("../dom-JBOkFLTh.cjs"),J=require("../events-BGwqaxVW.cjs"),Z=require("../style-At6aDoqG.cjs");var j=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=(s,e,i,n)=>{for(var p=n>1?void 0:n?ee(e,i):e,H=s.length-1,P;H>=0;H--)(P=s[H])&&(p=(n?P(e,i,p):P(p))||p);return n&&p&&j(e,i,p),p},U=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},c=(s,e,i)=>(U(s,e,"read from private field"),i?i.call(s):e.get(s)),A=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},D=(s,e,i,n)=>(U(s,e,"write to private field"),e.set(s,i),i),N,B,f,T,k,G,a,r,m,l,L,I,w,v,_,W,V,y,O,x,C,q,z,u,g,E,b,S,$,M;class K{constructor(e,i){h(this,W);h(this,y);h(this,u);h(this,E);h(this,S);h(this,a,null);h(this,r,null);h(this,m,null);h(this,l,null);h(this,L,null);h(this,I,!1);h(this,w,void 0);h(this,v,!1);h(this,_,[]);h(this,x,()=>{t(this,v)?this.close():this.open()});h(this,C,()=>{t(this,v)&&(o(this,u,g).call(this,0,!0),o(this,u,g).call(this,t(this,y,O)))});h(this,q,()=>{o(this,E,b).call(this,"size-change")});h(this,z,e=>{t(this,v)&&(o(this,u,g).call(this,0,!0),o(this,u,g).call(this,t(this,y,O)),t(this,_).forEach(i=>{i.element.scroll({left:t(this,a).axisAttribute.current==="x"?i.scroll:0,top:t(this,a).axisAttribute.current==="y"?i.scroll:0})}))});h(this,M,()=>{const e=Y.getAllParentElements(t(this,r));d(this,_,e.map(i=>({element:i,scroll:t(this,a).axisAttribute.current==="y"?i.scrollTop:i.scrollLeft})))});i.firstElementChild instanceof HTMLElement&&i.lastElementChild instanceof HTMLElement?(d(this,a,e),d(this,r,i),d(this,m,i.firstElementChild),d(this,l,i.lastElementChild),t(this,m).style.cursor="default",t(this,l).style.overflow="hidden",t(this,a).axisAttribute.current==="y"?t(this,l).style.height="0px":t(this,l).style.width="0px",d(this,L,new ResizeObserver(t(this,q))),addEventListener("resize",t(this,C)),t(this,m).addEventListener("click",t(this,x)),t(this,r).addEventListener("beforeSizeChange",t(this,M)),t(this,r).addEventListener("sizeChange",t(this,z)),t(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):e.removeItem(t(this,r))}get element(){return t(this,r)}destroy(){t(this,m)&&(t(this,r).classList.remove("opened","triggered"),t(this,m).style.cursor="",o(this,u,g).call(this,void 0),t(this,L).disconnect(),removeEventListener("resize",t(this,C)),t(this,m).removeEventListener("click",t(this,x)),t(this,r).removeEventListener("beforeSizeChange",t(this,M)),t(this,r).removeEventListener("sizeChange",t(this,z)),clearTimeout(t(this,w)))}open(e){o(this,E,b).call(this,"before-toggle"),e!=null&&e.skipTransition&&o(this,S,$).call(this),t(this,a).multipleAttribute.current||t(this,a).closeAll({exclude:t(this,r)}),t(this,I)||t(this,L).observe(t(this,l)),d(this,v,!0),clearTimeout(t(this,w)),t(this,r).classList.add("triggered"),o(this,u,g).call(this,t(this,y,O)),setTimeout(()=>{t(this,r).classList.add("opened")},0),o(this,E,b).call(this,"toggle")}close(e){o(this,E,b).call(this,"before-toggle"),e!=null&&e.skipTransition&&o(this,S,$).call(this),d(this,v,!1),t(this,r).classList.remove("opened"),o(this,u,g).call(this,0),d(this,w,setTimeout(()=>{t(this,r).classList.remove("triggered")},Z.getElementTransitionDurationMS(t(this,l)))),o(this,E,b).call(this,"toggle")}}a=new WeakMap,r=new WeakMap,m=new WeakMap,l=new WeakMap,L=new WeakMap,I=new WeakMap,w=new WeakMap,v=new WeakMap,_=new WeakMap,W=new WeakSet,V=function(){return t(this,r).parentElement||t(this,r).getRootNode()},y=new WeakSet,O=function(){return t(this,a).axisAttribute.current==="x"?t(this,l).scrollWidth:t(this,l).scrollHeight},x=new WeakMap,C=new WeakMap,q=new WeakMap,z=new WeakMap,u=new WeakSet,g=function(e,i=!1){i&&(t(this,l).style.transition="all 0s",setTimeout(()=>{t(this,l).style.transition=""}));const n=t(this,a).axisAttribute.current==="x"?"width":"height";e!=null?t(this,l).style[n]=`${e}px`:t(this,l).style[n]=""},E=new WeakSet,b=function(e){e==="before-toggle"?J.dispatchBeforeSizeChangeEvent(t(this,r)):e==="toggle"?t(this,r).dispatchEvent(new CustomEvent("accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:t(this,v)}})):e==="size-change"&&J.dispatchSizeChangeEvent(t(this,W,V))},S=new WeakSet,$=function(){t(this,l).style.transition="all 0s",setTimeout(()=>{t(this,l).style.transition=""},50)},M=new WeakMap;exports.AccordionElement=class extends Q.CustomElement{constructor(){super(),A(this,k),A(this,N,new F.Attribute(this,"axis","y")),A(this,B,new F.Attribute(this,"multiple",!1)),A(this,f,[]),A(this,T,null),X.isBrowser&&D(this,T,new MutationObserver(e=>{e.forEach(i=>{i.removedNodes.forEach(n=>{n instanceof HTMLElement&&this.removeItem(n)}),i.addedNodes.forEach(n=>{n instanceof HTMLElement&&this.createItem(n)})})}))}get axisAttribute(){return c(this,N)}get multipleAttribute(){return c(this,B)}createItem(e){c(this,f).find(i=>i.element===e)||c(this,f).push(new K(this,e))}removeItem(e){D(this,f,c(this,f).filter(i=>{if(i.element!==e)return!0;i.destroy()}))}closeAll(e){c(this,f).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.close(e)})}openAll(e){c(this,f).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.open(e)})}connectedCallback(){c(this,T).observe(c(this,k,G),{childList:!0}),D(this,f,[...c(this,k,G).children].map(e=>{if(e instanceof HTMLElement)return new K(this,e)}).filter(e=>!!e))}disconnectedCallback(){c(this,T).disconnect()}};N=new WeakMap;B=new WeakMap;f=new WeakMap;T=new WeakMap;k=new WeakSet;G=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=te([Q.define("e-accordion")],exports.AccordionElement);
|
package/lib/accordion/index.js
CHANGED
|
@@ -6,136 +6,125 @@ var e = (i, t, s) => (D(i, t, "read from private field"), s ? s.call(i) : t.get(
|
|
|
6
6
|
if (t.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
t instanceof WeakSet ? t.add(i) : t.set(i, s);
|
|
9
|
-
}, d = (i, t, s,
|
|
9
|
+
}, d = (i, t, s, o) => (D(i, t, "write to private field"), o ? o.call(i, s) : t.set(i, s), s);
|
|
10
10
|
var n = (i, t, s) => (D(i, t, "access private method"), s);
|
|
11
11
|
import { CustomElement as V, define as X } from "../custom-element/index.js";
|
|
12
12
|
import { Attribute as F } from "../attribute/index.js";
|
|
13
13
|
import { i as Y } from "../browser-0zX67oeU.js";
|
|
14
14
|
import { a as Z } from "../dom-0S_WDL4g.js";
|
|
15
|
-
import {
|
|
16
|
-
import { a as
|
|
17
|
-
var
|
|
18
|
-
for (var E =
|
|
19
|
-
(P = i[R]) && (E = (
|
|
20
|
-
return
|
|
15
|
+
import { a as j, d as ee } from "../events-C_coq1Mk.js";
|
|
16
|
+
import { a as te } from "../style-CklEF62D.js";
|
|
17
|
+
var ie = Object.defineProperty, se = Object.getOwnPropertyDescriptor, re = (i, t, s, o) => {
|
|
18
|
+
for (var E = o > 1 ? void 0 : o ? se(t, s) : t, R = i.length - 1, P; R >= 0; R--)
|
|
19
|
+
(P = i[R]) && (E = (o ? P(t, s, E) : P(E)) || E);
|
|
20
|
+
return o && E && ie(t, s, E), E;
|
|
21
21
|
}, Q = (i, t, s) => {
|
|
22
22
|
if (!t.has(i))
|
|
23
23
|
throw TypeError("Cannot " + s);
|
|
24
|
-
}, c = (i, t, s) => (Q(i, t, "read from private field"), s ? s.call(i) : t.get(i)),
|
|
24
|
+
}, c = (i, t, s) => (Q(i, t, "read from private field"), s ? s.call(i) : t.get(i)), y = (i, t, s) => {
|
|
25
25
|
if (t.has(i))
|
|
26
26
|
throw TypeError("Cannot add the same private member more than once");
|
|
27
27
|
t instanceof WeakSet ? t.add(i) : t.set(i, s);
|
|
28
|
-
}, N = (i, t, s,
|
|
28
|
+
}, N = (i, t, s, o) => (Q(i, t, "write to private field"), t.set(i, s), s), B, G, u, x, M, $, a, r, m, l, L, O, w, v, A, W, U, T, I, C, _, H, z, f, g, p, b, S, q, k;
|
|
29
29
|
class J {
|
|
30
30
|
constructor(t, s) {
|
|
31
31
|
h(this, W);
|
|
32
|
-
h(this,
|
|
32
|
+
h(this, T);
|
|
33
33
|
h(this, f);
|
|
34
34
|
h(this, p);
|
|
35
|
-
h(this,
|
|
36
|
-
h(this,
|
|
35
|
+
h(this, S);
|
|
36
|
+
h(this, a, null);
|
|
37
37
|
h(this, r, null);
|
|
38
|
-
h(this,
|
|
38
|
+
h(this, m, null);
|
|
39
39
|
h(this, l, null);
|
|
40
40
|
h(this, L, null);
|
|
41
41
|
h(this, O, !1);
|
|
42
|
-
h(this,
|
|
43
|
-
h(this,
|
|
44
|
-
h(this,
|
|
45
|
-
h(this, _, () => {
|
|
46
|
-
e(this, u) ? this.close() : this.open();
|
|
47
|
-
});
|
|
42
|
+
h(this, w, void 0);
|
|
43
|
+
h(this, v, !1);
|
|
44
|
+
h(this, A, []);
|
|
48
45
|
h(this, C, () => {
|
|
49
|
-
e(this,
|
|
46
|
+
e(this, v) ? this.close() : this.open();
|
|
47
|
+
});
|
|
48
|
+
h(this, _, () => {
|
|
49
|
+
e(this, v) && (n(this, f, g).call(this, 0, !0), n(this, f, g).call(this, e(this, T, I)));
|
|
50
50
|
});
|
|
51
51
|
h(this, H, () => {
|
|
52
52
|
n(this, p, b).call(this, "size-change");
|
|
53
53
|
});
|
|
54
54
|
h(this, z, (t) => {
|
|
55
|
-
e(this,
|
|
55
|
+
e(this, v) && (n(this, f, g).call(this, 0, !0), n(this, f, g).call(this, e(this, T, I)), e(this, A).forEach((s) => {
|
|
56
56
|
s.element.scroll({
|
|
57
|
-
left: e(this,
|
|
58
|
-
top: e(this,
|
|
57
|
+
left: e(this, a).axisAttribute.current === "x" ? s.scroll : 0,
|
|
58
|
+
top: e(this, a).axisAttribute.current === "y" ? s.scroll : 0
|
|
59
59
|
});
|
|
60
60
|
}));
|
|
61
61
|
});
|
|
62
|
-
h(this,
|
|
62
|
+
h(this, k, () => {
|
|
63
63
|
const t = Z(e(this, r));
|
|
64
|
-
d(this,
|
|
64
|
+
d(this, A, t.map((s) => ({
|
|
65
65
|
element: s,
|
|
66
|
-
scroll: e(this,
|
|
66
|
+
scroll: e(this, a).axisAttribute.current === "y" ? s.scrollTop : s.scrollLeft
|
|
67
67
|
})));
|
|
68
68
|
});
|
|
69
|
-
s.firstElementChild instanceof HTMLElement && s.lastElementChild instanceof HTMLElement ? (d(this,
|
|
69
|
+
s.firstElementChild instanceof HTMLElement && s.lastElementChild instanceof HTMLElement ? (d(this, a, t), d(this, r, s), d(this, m, s.firstElementChild), d(this, l, s.lastElementChild), e(this, m).style.cursor = "default", e(this, l).style.overflow = "hidden", e(this, a).axisAttribute.current === "y" ? e(this, l).style.height = "0px" : e(this, l).style.width = "0px", d(this, L, new ResizeObserver(e(this, H))), addEventListener("resize", e(this, _)), e(this, m).addEventListener("click", e(this, C)), e(this, r).addEventListener(
|
|
70
|
+
"beforeSizeChange",
|
|
71
|
+
e(this, k)
|
|
72
|
+
), e(this, r).addEventListener(
|
|
70
73
|
"sizeChange",
|
|
71
74
|
e(this, z)
|
|
72
|
-
), e(this, r).addEventListener(
|
|
73
|
-
"beforeAccordionItemToggle",
|
|
74
|
-
e(this, I)
|
|
75
75
|
), e(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : t.removeItem(e(this, r));
|
|
76
76
|
}
|
|
77
77
|
get element() {
|
|
78
78
|
return e(this, r);
|
|
79
79
|
}
|
|
80
80
|
destroy() {
|
|
81
|
-
e(this,
|
|
81
|
+
e(this, m) && (e(this, r).classList.remove("opened", "triggered"), e(this, m).style.cursor = "", n(this, f, g).call(this, void 0), e(this, L).disconnect(), removeEventListener("resize", e(this, _)), e(this, m).removeEventListener("click", e(this, C)), e(this, r).removeEventListener(
|
|
82
|
+
"beforeSizeChange",
|
|
83
|
+
e(this, k)
|
|
84
|
+
), e(this, r).removeEventListener(
|
|
82
85
|
"sizeChange",
|
|
83
86
|
e(this, z)
|
|
84
|
-
), e(this,
|
|
85
|
-
"beforeAccordionItemToggle",
|
|
86
|
-
e(this, I)
|
|
87
|
-
), clearTimeout(e(this, T)));
|
|
87
|
+
), clearTimeout(e(this, w)));
|
|
88
88
|
}
|
|
89
89
|
open(t) {
|
|
90
|
-
n(this, p, b).call(this, "before-toggle"), t != null && t.skipTransition && n(this,
|
|
90
|
+
n(this, p, b).call(this, "before-toggle"), t != null && t.skipTransition && n(this, S, q).call(this), e(this, a).multipleAttribute.current || e(this, a).closeAll({ exclude: e(this, r) }), e(this, O) || e(this, L).observe(e(this, l)), d(this, v, !0), clearTimeout(e(this, w)), e(this, r).classList.add("triggered"), n(this, f, g).call(this, e(this, T, I)), setTimeout(() => {
|
|
91
91
|
e(this, r).classList.add("opened");
|
|
92
92
|
}, 0), n(this, p, b).call(this, "toggle");
|
|
93
93
|
}
|
|
94
94
|
close(t) {
|
|
95
|
-
n(this, p, b).call(this, "before-toggle"), t != null && t.skipTransition && n(this,
|
|
95
|
+
n(this, p, b).call(this, "before-toggle"), t != null && t.skipTransition && n(this, S, q).call(this), d(this, v, !1), e(this, r).classList.remove("opened"), n(this, f, g).call(this, 0), d(this, w, setTimeout(() => {
|
|
96
96
|
e(this, r).classList.remove("triggered");
|
|
97
|
-
},
|
|
97
|
+
}, te(e(this, l)))), n(this, p, b).call(this, "toggle");
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
a = new WeakMap(), r = new WeakMap(), m = new WeakMap(), l = new WeakMap(), L = new WeakMap(), O = new WeakMap(), w = new WeakMap(), v = new WeakMap(), A = new WeakMap(), W = new WeakSet(), U = function() {
|
|
101
101
|
return e(this, r).parentElement || e(this, r).getRootNode();
|
|
102
|
-
},
|
|
103
|
-
return e(this,
|
|
104
|
-
},
|
|
102
|
+
}, T = new WeakSet(), I = function() {
|
|
103
|
+
return e(this, a).axisAttribute.current === "x" ? e(this, l).scrollWidth : e(this, l).scrollHeight;
|
|
104
|
+
}, C = new WeakMap(), _ = new WeakMap(), H = new WeakMap(), z = new WeakMap(), f = new WeakSet(), g = function(t, s = !1) {
|
|
105
105
|
s && (e(this, l).style.transition = "all 0s", setTimeout(() => {
|
|
106
106
|
e(this, l).style.transition = "";
|
|
107
107
|
}));
|
|
108
|
-
const
|
|
109
|
-
t != null ? e(this, l).style[
|
|
108
|
+
const o = e(this, a).axisAttribute.current === "x" ? "width" : "height";
|
|
109
|
+
t != null ? e(this, l).style[o] = `${t}px` : e(this, l).style[o] = "";
|
|
110
110
|
}, p = new WeakSet(), b = function(t) {
|
|
111
|
-
t === "before-toggle" ? e(this, r).dispatchEvent(
|
|
112
|
-
new CustomEvent(
|
|
113
|
-
"beforeAccordionItemToggle",
|
|
114
|
-
{
|
|
115
|
-
bubbles: !0,
|
|
116
|
-
composed: !0,
|
|
117
|
-
detail: {
|
|
118
|
-
opened: e(this, u)
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
) : t === "toggle" ? e(this, r).dispatchEvent(
|
|
111
|
+
t === "before-toggle" ? j(e(this, r)) : t === "toggle" ? e(this, r).dispatchEvent(
|
|
123
112
|
new CustomEvent("accordionItemToggle", {
|
|
124
113
|
bubbles: !0,
|
|
125
114
|
composed: !0,
|
|
126
115
|
detail: {
|
|
127
|
-
opened: e(this,
|
|
116
|
+
opened: e(this, v)
|
|
128
117
|
}
|
|
129
118
|
})
|
|
130
|
-
) : t === "size-change" &&
|
|
131
|
-
},
|
|
119
|
+
) : t === "size-change" && ee(e(this, W, U));
|
|
120
|
+
}, S = new WeakSet(), q = function() {
|
|
132
121
|
e(this, l).style.transition = "all 0s", setTimeout(() => {
|
|
133
122
|
e(this, l).style.transition = "";
|
|
134
123
|
}, 50);
|
|
135
|
-
},
|
|
124
|
+
}, k = new WeakMap();
|
|
136
125
|
let K = class extends V {
|
|
137
126
|
constructor() {
|
|
138
|
-
super(),
|
|
127
|
+
super(), y(this, M), y(this, B, new F(this, "axis", "y")), y(this, G, new F(this, "multiple", !1)), y(this, u, []), y(this, x, null), Y && N(this, x, new MutationObserver((i) => {
|
|
139
128
|
i.forEach((t) => {
|
|
140
129
|
t.removedNodes.forEach((s) => {
|
|
141
130
|
s instanceof HTMLElement && this.removeItem(s);
|
|
@@ -152,46 +141,46 @@ let K = class extends V {
|
|
|
152
141
|
return c(this, G);
|
|
153
142
|
}
|
|
154
143
|
createItem(i) {
|
|
155
|
-
c(this,
|
|
144
|
+
c(this, u).find((t) => t.element === i) || c(this, u).push(new J(this, i));
|
|
156
145
|
}
|
|
157
146
|
removeItem(i) {
|
|
158
|
-
N(this,
|
|
147
|
+
N(this, u, c(this, u).filter((t) => {
|
|
159
148
|
if (t.element !== i)
|
|
160
149
|
return !0;
|
|
161
150
|
t.destroy();
|
|
162
151
|
}));
|
|
163
152
|
}
|
|
164
153
|
closeAll(i) {
|
|
165
|
-
c(this,
|
|
154
|
+
c(this, u).forEach((t) => {
|
|
166
155
|
(i == null ? void 0 : i.exclude) !== t.element && t.close(i);
|
|
167
156
|
});
|
|
168
157
|
}
|
|
169
158
|
openAll(i) {
|
|
170
|
-
c(this,
|
|
159
|
+
c(this, u).forEach((t) => {
|
|
171
160
|
(i == null ? void 0 : i.exclude) !== t.element && t.open(i);
|
|
172
161
|
});
|
|
173
162
|
}
|
|
174
163
|
connectedCallback() {
|
|
175
|
-
c(this,
|
|
164
|
+
c(this, x).observe(c(this, M, $), {
|
|
176
165
|
childList: !0
|
|
177
|
-
}), N(this,
|
|
166
|
+
}), N(this, u, [...c(this, M, $).children].map((i) => {
|
|
178
167
|
if (i instanceof HTMLElement)
|
|
179
168
|
return new J(this, i);
|
|
180
169
|
}).filter((i) => !!i));
|
|
181
170
|
}
|
|
182
171
|
disconnectedCallback() {
|
|
183
|
-
c(this,
|
|
172
|
+
c(this, x).disconnect();
|
|
184
173
|
}
|
|
185
174
|
};
|
|
186
175
|
B = /* @__PURE__ */ new WeakMap();
|
|
187
176
|
G = /* @__PURE__ */ new WeakMap();
|
|
188
|
-
|
|
189
|
-
|
|
177
|
+
u = /* @__PURE__ */ new WeakMap();
|
|
178
|
+
x = /* @__PURE__ */ new WeakMap();
|
|
190
179
|
M = /* @__PURE__ */ new WeakSet();
|
|
191
180
|
$ = function() {
|
|
192
181
|
return this.shadowRoot ? this.shadowRoot : this;
|
|
193
182
|
};
|
|
194
|
-
K =
|
|
183
|
+
K = re([
|
|
195
184
|
X("e-accordion")
|
|
196
185
|
], K);
|
|
197
186
|
export {
|
|
@@ -4,6 +4,7 @@ export type En3RaycasterEventType = 'pointerDown' | 'pointerUp' | 'pointerMove'
|
|
|
4
4
|
export type En3RaycasterEvent = {
|
|
5
5
|
type: En3RaycasterEventType;
|
|
6
6
|
originalEvent: PointerEvent;
|
|
7
|
+
target: Object3D;
|
|
7
8
|
} & Intersection<Object3D>;
|
|
8
9
|
export interface En3RaycasterOptions {
|
|
9
10
|
targetName?: string;
|
package/lib/en3/core/en3.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ElementOrSelector } from '../../utils';
|
|
|
2
2
|
import { WebGLRenderer, WebGLRendererParameters } from 'three';
|
|
3
3
|
import { En3View, En3ViewOptions } from './En3View';
|
|
4
4
|
import { En3Raycaster } from './En3Raycaster';
|
|
5
|
+
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
|
|
5
6
|
|
|
6
7
|
export interface En3Options {
|
|
7
8
|
webGLRendererParameters?: WebGLRendererParameters;
|
|
@@ -10,6 +11,7 @@ export interface En3Options {
|
|
|
10
11
|
view?: En3ViewOptions;
|
|
11
12
|
cacheAssets?: boolean;
|
|
12
13
|
zIndex?: number;
|
|
14
|
+
composer?: typeof EffectComposer;
|
|
13
15
|
}
|
|
14
16
|
declare class En3 {
|
|
15
17
|
#private;
|
|
@@ -25,6 +27,7 @@ declare class En3 {
|
|
|
25
27
|
get height(): number;
|
|
26
28
|
get pixelRatio(): number;
|
|
27
29
|
get cacheAssets(): boolean;
|
|
30
|
+
get composer(): EffectComposer;
|
|
28
31
|
setup(options?: En3Options): void;
|
|
29
32
|
destroy(): void;
|
|
30
33
|
createView(viewName: string, viewOptions?: En3ViewOptions): En3View;
|
|
@@ -7,6 +7,8 @@ export declare class En3Object3dManager {
|
|
|
7
7
|
#private;
|
|
8
8
|
constructor(object3d: Object3D, options?: En3Object3dManagerOptions);
|
|
9
9
|
get object3d(): Object3D<import('three').Object3DEventMap>;
|
|
10
|
+
get helpers(): Object3D<import('three').Object3DEventMap>[];
|
|
11
|
+
get raycasterTarget(): Object3D<import('three').Object3DEventMap>;
|
|
10
12
|
destroy(): void;
|
|
11
13
|
save(): void;
|
|
12
14
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StoreManagers } from '../../store';
|
|
2
|
+
|
|
3
|
+
export type OptionsCatalog = {
|
|
4
|
+
[key: string]: StoreManagers[keyof StoreManagers];
|
|
5
|
+
};
|
|
6
|
+
export interface En3ParametersManagerOptions {
|
|
7
|
+
optionsCatalog?: OptionsCatalog;
|
|
8
|
+
folderName?: string;
|
|
9
|
+
skipKeys?: Array<string>;
|
|
10
|
+
afterChange?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare class En3ParametersManager {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(subject: any, options?: En3ParametersManagerOptions);
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|