aptechka 0.13.1 → 0.15.0
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/{Animation-De9aUv3b.cjs → Animation-DI864E0i.cjs} +1 -1
- package/lib/{Animation-NAGXiFv5.js → Animation-w6BLTCum.js} +1 -1
- package/lib/{Damped-DbJKrUIf.js → Damped-DEHDEq-b.js} +1 -1
- package/lib/{Damped-DYJ6Z0xo.cjs → Damped-ipnDc0iX.cjs} +1 -1
- package/lib/Store-CDb6RMce.cjs +1 -0
- package/lib/Store-OTdcl6SX.js +134 -0
- package/lib/{Tweened-BkkD9s4n.cjs → Tweened-B1TfANfR.cjs} +1 -1
- package/lib/{Tweened-DOSHLCZa.js → Tweened-C52xXDLY.js} +1 -1
- package/lib/{Viewport-Cv4TRGiv.cjs → Viewport-BDPsnAF4.cjs} +1 -1
- package/lib/{Viewport-B55BvLsV.js → Viewport-taEXS8Uv.js} +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +13 -13
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +36 -39
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +4 -4
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +848 -122
- package/lib/element-resizer/index.js +8 -8
- package/lib/en3/index.cjs +8 -1
- package/lib/en3/index.js +372 -4
- package/lib/file-BEr-o55N.js +31 -0
- package/lib/file-C9BbxzVU.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/intersector/index.js +7 -7
- package/lib/jss-CjccJC-K.js +21 -0
- package/lib/jss-GJLvaNfT.cjs +1 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/layout-box/index.js +14 -14
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/need_redo_tweaker/index.cjs +18 -0
- package/lib/need_redo_tweaker/index.js +1337 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +3 -3
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +68 -76
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +577 -610
- package/lib/scroll-entries/index.js +15 -15
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +55 -86
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +154 -62
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +71 -37
- package/lib/ticker/index.js +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +67 -65
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +7 -72
- package/lib/Composed-C_4slJQ6.cjs +0 -1
- package/lib/Composed-CfWa-69I.js +0 -31
- package/lib/Derived-BIBU-y7Z.cjs +0 -1
- package/lib/Derived-Vo_RsJfi.js +0 -23
- package/lib/SourceManager-B6wZpXUZ.js +0 -104
- package/lib/SourceManager-CfHcGLUa.cjs +0 -1
- package/lib/Store-C46i0nvr.js +0 -137
- package/lib/Store-npaZHvX4.cjs +0 -1
- package/lib/accordion/index.cjs +0 -1
- package/lib/accordion/index.js +0 -167
- package/lib/checkbox/index.cjs +0 -1
- package/lib/checkbox/index.js +0 -112
- package/lib/createStylesheet-COAZH1Mw.js +0 -8
- package/lib/createStylesheet-Csfmh-MH.cjs +0 -1
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/en3/helpers/index.cjs +0 -1
- package/lib/en3/helpers/index.js +0 -1870
- package/lib/en3/libs/index.cjs +0 -1
- package/lib/en3/libs/index.js +0 -200
- package/lib/en3/loaders/index.cjs +0 -1
- package/lib/en3/loaders/index.js +0 -1742
- package/lib/en3/misc/index.cjs +0 -10
- package/lib/en3/misc/index.js +0 -110
- package/lib/en3/utils/index.cjs +0 -1
- package/lib/en3/utils/index.js +0 -20
- package/lib/en3-C1fLmsjs.cjs +0 -8
- package/lib/en3-x-Ki30MY.js +0 -344
- package/lib/events-BGwqaxVW.cjs +0 -1
- package/lib/events-CJTUMSLU.js +0 -20
- package/lib/file-EevnUtRj.cjs +0 -1
- package/lib/file-lxi_oXJf.js +0 -13
- package/lib/index-BuAuBz2_.cjs +0 -9
- package/lib/index-CenF0JbH.js +0 -261
- package/lib/modal/index.cjs +0 -1
- package/lib/modal/index.js +0 -133
- package/lib/select/index.cjs +0 -1
- package/lib/select/index.js +0 -7
- package/lib/tags-6_ETuR75.cjs +0 -1
- package/lib/tags-BL3kQp9o.js +0 -833
- package/lib/theme/index.cjs +0 -1
- package/lib/theme/index.js +0 -25
- package/lib/traverseMaterials-CD_3_56D.cjs +0 -1
- package/lib/traverseMaterials-mGC2_FkG.js +0 -29
- package/lib/tweaker/index.cjs +0 -10
- package/lib/tweaker/index.js +0 -989
|
@@ -3,10 +3,10 @@ var h = (n) => {
|
|
|
3
3
|
};
|
|
4
4
|
var y = (n, t, s) => t.has(n) || h("Cannot " + s);
|
|
5
5
|
var r = (n, t, s) => (y(n, t, "read from private field"), s ? s.call(n) : t.get(n)), b = (n, t, s) => t.has(n) ? h("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, s), u = (n, t, s, e) => (y(n, t, "write to private field"), e ? e.call(n, s) : t.set(n, s), s);
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
6
|
+
import { i as p } from "../browser-0zX67oeU.js";
|
|
7
|
+
import { g as w } from "../dom-0S_WDL4g.js";
|
|
8
8
|
var i, o, f;
|
|
9
|
-
class
|
|
9
|
+
class z {
|
|
10
10
|
constructor() {
|
|
11
11
|
b(this, i, []);
|
|
12
12
|
b(this, o, null);
|
|
@@ -18,10 +18,10 @@ class w {
|
|
|
18
18
|
e.entry && (e.subscriber.entry = e.entry, e.subscriber.callback(e.entry));
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
p && window.ResizeObserver && u(this, o, new ResizeObserver(r(this, f)));
|
|
22
22
|
}
|
|
23
23
|
subscribe(t, s) {
|
|
24
|
-
const e =
|
|
24
|
+
const e = w(t);
|
|
25
25
|
if (!e)
|
|
26
26
|
return () => {
|
|
27
27
|
};
|
|
@@ -54,8 +54,8 @@ class w {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
i = new WeakMap(), o = new WeakMap(), f = new WeakMap();
|
|
57
|
-
const
|
|
57
|
+
const g = new z();
|
|
58
58
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
z as ElementResizer,
|
|
60
|
+
g as elementResizer
|
|
61
61
|
};
|
package/lib/en3/index.cjs
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var ue=Object.defineProperty,me=Object.defineProperties;var fe=Object.getOwnPropertyDescriptors;var J=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var ee=s=>{throw TypeError(s)};var Q=(s,e,i)=>e in s?ue(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i,A=(s,e)=>{for(var i in e||(e={}))ge.call(e,i)&&Q(s,i,e[i]);if(J)for(var i of J(e))Ee.call(e,i)&&Q(s,i,e[i]);return s},te=(s,e)=>me(s,fe(e));var ie=(s,e,i)=>e.has(s)||ee("Cannot "+i);var t=(s,e,i)=>(ie(s,e,"read from private field"),i?i.call(s):e.get(s)),r=(s,e,i)=>e.has(s)?ee("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,i),n=(s,e,i,a)=>(ie(s,e,"write to private field"),a?a.call(s,i):e.set(s,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("../order/index.cjs"),re=require("../window-resizer/index.cjs"),ne=require("../ticker/index.cjs"),he=require("../dom-JBOkFLTh.cjs"),u=require("three"),ae=require("../layout-box/index.cjs");function ce(s){const e=i=>{i.dispose();for(const a of Object.keys(i)){const h=i[a];h&&typeof h=="object"&&"minFilter"in h&&h.dispose()}};s.traverse(i=>{if(i instanceof u.Mesh){if(i.geometry.dispose(),!Array.isArray(i.material)&&i.material.isMaterial)e(i.material);else if(Array.isArray(i.material))for(const a of i.material)e(a)}})}var P,o,V,v,w,O,D,R;class X{constructor(e,i){r(this,P);r(this,o);r(this,V);r(this,v);r(this,w);r(this,O);r(this,D);r(this,R);n(this,P,e),n(this,o,(i==null?void 0:i.cameraType)==="orthographic"?new u.OrthographicCamera:new u.PerspectiveCamera),n(this,V,new u.Scene),n(this,v,[]),n(this,w,(i==null?void 0:i.cameraDistance)||1e3),t(this,o).near=(i==null?void 0:i.cameraNear)||1,t(this,o).far=(i==null?void 0:i.cameraFar)||11e3,n(this,O,(i==null?void 0:i.cameraFov)||"auto"),t(this,o).position.z=t(this,w),t(this,o).name=`Cameras.${t(this,P)}`,n(this,D,he.getElement(i==null?void 0:i.sizeElement)||document.documentElement),this.beforeRenderCallback=i==null?void 0:i.beforeRender,n(this,R,new ae.LayoutBox(t(this,D))),t(this,R).onResize(()=>{this.resize()})}get name(){return t(this,P)}get camera(){return t(this,o)}get scene(){return t(this,V)}get box(){return t(this,R)}get cameraDistance(){return t(this,w)}set cameraDistance(e){n(this,w,e),this.resize()}get sizeElement(){return t(this,D)}get isClipped(){return t(this,D)!==d.containerElement}resize(){const{width:e,height:i}=t(this,R);t(this,o).userData.controlled||(t(this,o).position.z=t(this,w)),t(this,o)instanceof u.PerspectiveCamera?(t(this,o).aspect=e/i,t(this,o).fov=t(this,O)==="auto"?2*Math.atan(i/2/t(this,w))*(180/Math.PI):t(this,o).userData.controlled?t(this,o).fov:t(this,O)):t(this,o)instanceof u.OrthographicCamera&&(t(this,o).left=e/-2,t(this,o).right=e/2,t(this,o).top=i/2,t(this,o).bottom=i/-2),t(this,o).updateProjectionMatrix()}destroy(){t(this,v).forEach(e=>{e.userData.box.destroy()}),t(this,V).clear(),ce(t(this,V)),d.destroyView(this.name),t(this,R).destroy()}attachToHTMLElement(e,i,a){const h=new ae.LayoutBox(e,te(A({},a),{containerElement:t(this,D),cartesian:!0,scrollStep:!this.isClipped}));return h.bindObject(i),i.userData.box=h,t(this,v).push(i),i}detachFromHTMLElement(e){n(this,v,t(this,v).filter(i=>i===e?(e.userData.box.destroy(),!1):!0))}add(...e){const i=e[0],a=e[1],h=e[2];return a&&this.attachToHTMLElement(a,i,h),this.scene.add(i),i}remove(e,i){this.scene.remove(e),i&&this.detachFromHTMLElement(e)}}P=new WeakMap,o=new WeakMap,V=new WeakMap,v=new WeakMap,w=new WeakMap,O=new WeakMap,D=new WeakMap,R=new WeakMap;var H,F,I,z,N;class xe{constructor(e){r(this,H);r(this,F);r(this,I);r(this,z);r(this,N);n(this,H,e.targetName||void 0),n(this,F,e.eventDispatcher||e.object3D),n(this,I,e.propagation||!1),n(this,z,e.object3D),n(this,N,t(this,H)?()=>t(this,z).getObjectByName(t(this,H))||t(this,z):()=>t(this,z))}get object3D(){return t(this,z)}get eventDispatcher(){return t(this,F)}get propagation(){return t(this,I)}get target(){return t(this,N).call(this)}dispatch(e,i){this.eventDispatcher.dispatchEvent(A({originalEvent:i,type:e},this.intersection))}}H=new WeakMap,F=new WeakMap,I=new WeakMap,z=new WeakMap,N=new WeakMap;var y,m,j,_,q,B,W;class ye{constructor(){r(this,y,[]);r(this,m,[]);r(this,j,new u.Vector2);r(this,_,new u.Raycaster);r(this,q,e=>{for(let i=0;i<t(this,m).length;i++)t(this,m)[i].dispatch("pointerDown",e)});r(this,B,e=>{for(let i=0;i<t(this,m).length;i++)t(this,m)[i].dispatch("pointerUp",e)});r(this,W,e=>{if(!t(this,y).length)return;t(this,j).x=e.clientX/d.width*2-1,t(this,j).y=-(e.clientY/d.height)*2+1,d.camera&&t(this,_).setFromCamera(t(this,j),d.camera);const i=[];for(const c of t(this,y)){const f=t(this,_).intersectObject(c.target);f.length&&(c.intersection=f[0],i.push(c))}let a=!1;const h=t(this,m).filter(c=>!i.find(f=>f.object3D.uuid===c.object3D.uuid)),x=i.sort((c,f)=>f.object3D.position.z-c.object3D.position.z).filter((c,f)=>a?(h.push(c),!1):(a=!c.propagation,!0)),p=x.filter(c=>!t(this,m).find(f=>f.object3D.uuid===c.object3D.uuid));for(let c=0;c<h.length;c++)h[c].dispatch("pointerLeave",e);for(let c=0;c<p.length;c++)p[c].dispatch("pointerEnter",e);n(this,m,x);for(let c=0;c<t(this,m).length;c++)t(this,m)[c].dispatch("pointerMove",e)});d.containerElement.addEventListener("pointerdown",t(this,q)),d.containerElement.addEventListener("pointerup",t(this,B)),d.containerElement.addEventListener("pointermove",t(this,W))}destroy(){d.containerElement.removeEventListener("pointerdown",t(this,q)),d.containerElement.removeEventListener("pointerup",t(this,B)),d.containerElement.removeEventListener("pointermove",t(this,W)),n(this,y,[]),n(this,m,[])}add(e,i){if(t(this,y).find(h=>h.object3D.uuid===e.uuid))return;const a=new xe(A({object3D:e},i));t(this,y).push(a)}remove(e){n(this,y,t(this,y).filter(i=>i.object3D.uuid!==e.uuid)),n(this,m,t(this,m).filter(i=>i.object3D.uuid!==e.uuid))}}y=new WeakMap,m=new WeakMap,j=new WeakMap,_=new WeakMap,q=new WeakMap,B=new WeakMap,W=new WeakMap;var U,b,l,k,g,T,C,L,Y,S,Z,E,$,G;class be{constructor(){r(this,U,`https://unpkg.com/three@0.${u.REVISION}.x`);r(this,b,null);r(this,l,null);r(this,k,null);r(this,g,new Map);r(this,T,0);r(this,C,0);r(this,L,0);r(this,Y,2);r(this,S,!1);r(this,Z,!1);r(this,E,null);r(this,$,()=>{n(this,T,t(this,b).clientWidth),n(this,C,t(this,b).clientHeight),n(this,L,Math.min(t(this,Y),devicePixelRatio||1)),t(this,l).setPixelRatio(t(this,L)),t(this,l).setSize(t(this,T),t(this,C)),t(this,E)&&(t(this,E).setPixelRatio(t(this,L)),t(this,E).setSize(t(this,T),t(this,C)))});r(this,G,()=>{t(this,l).setRenderTarget(null),t(this,g).forEach(e=>{this.render(e)})})}get CDNVersion(){return t(this,U)}get containerElement(){return t(this,b)}get webglRenderer(){return t(this,l)}get raycaster(){return t(this,k)}get views(){return t(this,g)}get view(){return this.getView("default")}get camera(){return this.getView("default").camera}get scene(){return this.getView("default").scene}get width(){return t(this,T)}get height(){return t(this,C)}get pixelRatio(){return t(this,L)}get composer(){return t(this,E)}setup(e){if(t(this,S)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}n(this,b,he.getElement(e==null?void 0:e.containerElement)||document.body),n(this,Y,(e==null?void 0:e.maxPixelRatio)||2),n(this,l,new u.WebGLRenderer(e==null?void 0:e.webGLRendererParameters)),t(this,l).domElement.style.cssText=`
|
|
2
|
+
position: fixed;
|
|
3
|
+
left: 0;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
z-index: ${(e==null?void 0:e.zIndex)||0};
|
|
8
|
+
`,(t(this,b).shadowRoot||t(this,b)).append(t(this,l).domElement),t(this,g).set("default",new X("default",A({sizeElement:t(this,b)},e==null?void 0:e.view))),n(this,k,new ye),e!=null&&e.composer&&(n(this,E,new e.composer(t(this,l))),this.render=()=>{t(this,E).render()}),n(this,S,!0),re.windowResizer.subscribe(t(this,$),se.RESIZE_ORDER.EN3),ne.ticker.subscribe(t(this,G),{order:se.TICK_ORDER.EN3})}destroy(){if(!t(this,S)){console.warn("[en3.setup]: You are trying to destory en3 but it has not been initialized.");return}re.windowResizer.unsubscribe(t(this,$)),ne.ticker.unsubscribe(t(this,G)),t(this,k).destroy(),t(this,g).forEach(e=>{e.destroy()}),t(this,l).dispose(),t(this,l).domElement.remove(),n(this,l,null),t(this,E).dispose(),n(this,E,null),n(this,S,!1)}createView(e,i){const a=t(this,g).size,h=new X(e,i);return t(this,g).set(e,h),a===1&&t(this,l).setScissorTest(!0),h}getView(e){return t(this,g).get(e)}destroyView(e){const i=t(this,g).get(e);i&&(t(this,g).delete(e),i.destroy(),t(this,g).size<=1&&t(this,l).setScissorTest(!1))}render(e){var i;if(t(this,g).size>1||this.view.isClipped){const a=e.box.left+e.box.CSSTranslation.x+e.box.scrollValue.x,h=d.height-e.box.height-e.box.top+e.box.CSSTranslation.y+e.box.scrollValue.y*-1;t(this,l).setScissor(a,h,e.box.width,e.box.height),t(this,l).setViewport(a,h,e.box.width,e.box.height)}(i=e.beforeRenderCallback)==null||i.call(e),t(this,l).render(e.scene,e.camera)}}U=new WeakMap,b=new WeakMap,l=new WeakMap,k=new WeakMap,g=new WeakMap,T=new WeakMap,C=new WeakMap,L=new WeakMap,Y=new WeakMap,S=new WeakMap,Z=new WeakMap,E=new WeakMap,$=new WeakMap,G=new WeakMap;const d=new be;function we(s,e,i){const a=e.x,h=e.y,M=i||s.image.width/s.image.height;let x=0,p=0,c=s.offset.x,f=s.offset.y,oe=s.rotation,le=s.center.x,de=s.center.y;a/h>M?(x=1,p=h/a*M):(p=1,x=a/h/M),s.matrix.setUvTransform(c,f,x,p,oe,le,de)}const K=new u.Vector3,pe=new u.Vector3;function ve(s,e="default"){const i=d.getView(e),{width:a,height:h}=d,M=a/h;s instanceof u.Vector3?K.copy(s):K.set(...s);const x=i.camera.getWorldPosition(pe).distanceTo(K);if(i.camera instanceof u.OrthographicCamera)return{width:a/i.camera.zoom,height:h/i.camera.zoom,factor:1,distance:x,aspect:M};{const p=i.camera.fov*Math.PI/180,c=2*Math.tan(p/2)*x,f=c*(a/h);return{width:f,height:c,factor:a/f,distance:x,aspect:M}}}function De(s,e){s.traverse(i=>{i instanceof u.Mesh&&i.material&&(Array.isArray(i.material)?i.material:[i.material]).forEach(e)})}function Re(s,e){s.traverse(i=>{i instanceof u.Mesh&&e(i)})}exports.En3View=X;exports.coverTexture=we;exports.dispose=ce;exports.en3=d;exports.getCurrentViewport=ve;exports.traverseMaterials=De;exports.traverseMeshes=Re;
|
package/lib/en3/index.js
CHANGED
|
@@ -1,6 +1,374 @@
|
|
|
1
|
-
|
|
1
|
+
var me = Object.defineProperty, fe = Object.defineProperties;
|
|
2
|
+
var ge = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Q = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ee = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var te = (s) => {
|
|
6
|
+
throw TypeError(s);
|
|
7
|
+
};
|
|
8
|
+
var ee = (s, e, i) => e in s ? me(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i, k = (s, e) => {
|
|
9
|
+
for (var i in e || (e = {}))
|
|
10
|
+
Ee.call(e, i) && ee(s, i, e[i]);
|
|
11
|
+
if (Q)
|
|
12
|
+
for (var i of Q(e))
|
|
13
|
+
be.call(e, i) && ee(s, i, e[i]);
|
|
14
|
+
return s;
|
|
15
|
+
}, ie = (s, e) => fe(s, ge(e));
|
|
16
|
+
var se = (s, e, i) => e.has(s) || te("Cannot " + i);
|
|
17
|
+
var t = (s, e, i) => (se(s, e, "read from private field"), i ? i.call(s) : e.get(s)), r = (s, e, i) => e.has(s) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, i), a = (s, e, i, h) => (se(s, e, "write to private field"), h ? h.call(s, i) : e.set(s, i), i);
|
|
18
|
+
import { RESIZE_ORDER as ye, TICK_ORDER as xe } from "../order/index.js";
|
|
19
|
+
import { windowResizer as re } from "../window-resizer/index.js";
|
|
20
|
+
import { ticker as ae } from "../ticker/index.js";
|
|
21
|
+
import { g as oe } from "../dom-0S_WDL4g.js";
|
|
22
|
+
import { Mesh as q, OrthographicCamera as X, PerspectiveCamera as he, Scene as we, Vector2 as pe, Raycaster as De, REVISION as Re, WebGLRenderer as ve, Vector3 as J } from "three";
|
|
23
|
+
import { LayoutBox as ne } from "../layout-box/index.js";
|
|
24
|
+
function ze(s) {
|
|
25
|
+
const e = (i) => {
|
|
26
|
+
i.dispose();
|
|
27
|
+
for (const h of Object.keys(i)) {
|
|
28
|
+
const n = i[h];
|
|
29
|
+
n && typeof n == "object" && "minFilter" in n && n.dispose();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
s.traverse((i) => {
|
|
33
|
+
if (i instanceof q) {
|
|
34
|
+
if (i.geometry.dispose(), !Array.isArray(i.material) && i.material.isMaterial)
|
|
35
|
+
e(i.material);
|
|
36
|
+
else if (Array.isArray(i.material))
|
|
37
|
+
for (const h of i.material) e(h);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
var S, o, L, p, x, P, D, R;
|
|
42
|
+
class ce {
|
|
43
|
+
constructor(e, i) {
|
|
44
|
+
r(this, S);
|
|
45
|
+
r(this, o);
|
|
46
|
+
r(this, L);
|
|
47
|
+
r(this, p);
|
|
48
|
+
r(this, x);
|
|
49
|
+
r(this, P);
|
|
50
|
+
r(this, D);
|
|
51
|
+
r(this, R);
|
|
52
|
+
a(this, S, e), a(this, o, (i == null ? void 0 : i.cameraType) === "orthographic" ? new X() : new he()), a(this, L, new we()), a(this, p, []), a(this, x, (i == null ? void 0 : i.cameraDistance) || 1e3), t(this, o).near = (i == null ? void 0 : i.cameraNear) || 1, t(this, o).far = (i == null ? void 0 : i.cameraFar) || 11e3, a(this, P, (i == null ? void 0 : i.cameraFov) || "auto"), t(this, o).position.z = t(this, x), t(this, o).name = `Cameras.${t(this, S)}`, a(this, D, oe(i == null ? void 0 : i.sizeElement) || document.documentElement), this.beforeRenderCallback = i == null ? void 0 : i.beforeRender, a(this, R, new ne(t(this, D))), t(this, R).onResize(() => {
|
|
53
|
+
this.resize();
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
get name() {
|
|
57
|
+
return t(this, S);
|
|
58
|
+
}
|
|
59
|
+
get camera() {
|
|
60
|
+
return t(this, o);
|
|
61
|
+
}
|
|
62
|
+
get scene() {
|
|
63
|
+
return t(this, L);
|
|
64
|
+
}
|
|
65
|
+
get box() {
|
|
66
|
+
return t(this, R);
|
|
67
|
+
}
|
|
68
|
+
get cameraDistance() {
|
|
69
|
+
return t(this, x);
|
|
70
|
+
}
|
|
71
|
+
set cameraDistance(e) {
|
|
72
|
+
a(this, x, e), this.resize();
|
|
73
|
+
}
|
|
74
|
+
get sizeElement() {
|
|
75
|
+
return t(this, D);
|
|
76
|
+
}
|
|
77
|
+
get isClipped() {
|
|
78
|
+
return t(this, D) !== u.containerElement;
|
|
79
|
+
}
|
|
80
|
+
resize() {
|
|
81
|
+
const { width: e, height: i } = t(this, R);
|
|
82
|
+
t(this, o).userData.controlled || (t(this, o).position.z = t(this, x)), t(this, o) instanceof he ? (t(this, o).aspect = e / i, t(this, o).fov = t(this, P) === "auto" ? 2 * Math.atan(i / 2 / t(this, x)) * (180 / Math.PI) : t(this, o).userData.controlled ? t(this, o).fov : t(this, P)) : t(this, o) instanceof X && (t(this, o).left = e / -2, t(this, o).right = e / 2, t(this, o).top = i / 2, t(this, o).bottom = i / -2), t(this, o).updateProjectionMatrix();
|
|
83
|
+
}
|
|
84
|
+
destroy() {
|
|
85
|
+
t(this, p).forEach((e) => {
|
|
86
|
+
e.userData.box.destroy();
|
|
87
|
+
}), t(this, L).clear(), ze(t(this, L)), u.destroyView(this.name), t(this, R).destroy();
|
|
88
|
+
}
|
|
89
|
+
attachToHTMLElement(e, i, h) {
|
|
90
|
+
const n = new ne(e, ie(k({}, h), {
|
|
91
|
+
containerElement: t(this, D),
|
|
92
|
+
cartesian: !0,
|
|
93
|
+
scrollStep: !this.isClipped
|
|
94
|
+
}));
|
|
95
|
+
return n.bindObject(i), i.userData.box = n, t(this, p).push(i), i;
|
|
96
|
+
}
|
|
97
|
+
detachFromHTMLElement(e) {
|
|
98
|
+
a(this, p, t(this, p).filter((i) => i === e ? (e.userData.box.destroy(), !1) : !0));
|
|
99
|
+
}
|
|
100
|
+
add(...e) {
|
|
101
|
+
const i = e[0], h = e[1], n = e[2];
|
|
102
|
+
return h && this.attachToHTMLElement(h, i, n), this.scene.add(i), i;
|
|
103
|
+
}
|
|
104
|
+
remove(e, i) {
|
|
105
|
+
this.scene.remove(e), i && this.detachFromHTMLElement(e);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
S = new WeakMap(), o = new WeakMap(), L = new WeakMap(), p = new WeakMap(), x = new WeakMap(), P = new WeakMap(), D = new WeakMap(), R = new WeakMap();
|
|
109
|
+
var H, A, F, v, I;
|
|
110
|
+
class Le {
|
|
111
|
+
constructor(e) {
|
|
112
|
+
r(this, H);
|
|
113
|
+
r(this, A);
|
|
114
|
+
r(this, F);
|
|
115
|
+
r(this, v);
|
|
116
|
+
r(this, I);
|
|
117
|
+
a(this, H, e.targetName || void 0), a(this, A, e.eventDispatcher || e.object3D), a(this, F, e.propagation || !1), a(this, v, e.object3D), a(this, I, t(this, H) ? () => t(this, v).getObjectByName(t(this, H)) || t(this, v) : () => t(this, v));
|
|
118
|
+
}
|
|
119
|
+
get object3D() {
|
|
120
|
+
return t(this, v);
|
|
121
|
+
}
|
|
122
|
+
get eventDispatcher() {
|
|
123
|
+
return t(this, A);
|
|
124
|
+
}
|
|
125
|
+
get propagation() {
|
|
126
|
+
return t(this, F);
|
|
127
|
+
}
|
|
128
|
+
get target() {
|
|
129
|
+
return t(this, I).call(this);
|
|
130
|
+
}
|
|
131
|
+
dispatch(e, i) {
|
|
132
|
+
this.eventDispatcher.dispatchEvent(k({
|
|
133
|
+
originalEvent: i,
|
|
134
|
+
type: e
|
|
135
|
+
}, this.intersection));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
H = new WeakMap(), A = new WeakMap(), F = new WeakMap(), v = new WeakMap(), I = new WeakMap();
|
|
139
|
+
var b, d, O, N, W, Y, _;
|
|
140
|
+
class Te {
|
|
141
|
+
constructor() {
|
|
142
|
+
r(this, b, []);
|
|
143
|
+
r(this, d, []);
|
|
144
|
+
r(this, O, new pe());
|
|
145
|
+
r(this, N, new De());
|
|
146
|
+
r(this, W, (e) => {
|
|
147
|
+
for (let i = 0; i < t(this, d).length; i++)
|
|
148
|
+
t(this, d)[i].dispatch("pointerDown", e);
|
|
149
|
+
});
|
|
150
|
+
r(this, Y, (e) => {
|
|
151
|
+
for (let i = 0; i < t(this, d).length; i++)
|
|
152
|
+
t(this, d)[i].dispatch("pointerUp", e);
|
|
153
|
+
});
|
|
154
|
+
r(this, _, (e) => {
|
|
155
|
+
if (!t(this, b).length)
|
|
156
|
+
return;
|
|
157
|
+
t(this, O).x = e.clientX / u.width * 2 - 1, t(this, O).y = -(e.clientY / u.height) * 2 + 1, u.camera && t(this, N).setFromCamera(t(this, O), u.camera);
|
|
158
|
+
const i = [];
|
|
159
|
+
for (const c of t(this, b)) {
|
|
160
|
+
const m = t(this, N).intersectObject(c.target);
|
|
161
|
+
m.length && (c.intersection = m[0], i.push(c));
|
|
162
|
+
}
|
|
163
|
+
let h = !1;
|
|
164
|
+
const n = t(this, d).filter(
|
|
165
|
+
(c) => !i.find((m) => m.object3D.uuid === c.object3D.uuid)
|
|
166
|
+
), E = i.sort(
|
|
167
|
+
(c, m) => m.object3D.position.z - c.object3D.position.z
|
|
168
|
+
).filter((c, m) => h ? (n.push(c), !1) : (h = !c.propagation, !0)), w = E.filter(
|
|
169
|
+
(c) => !t(this, d).find((m) => m.object3D.uuid === c.object3D.uuid)
|
|
170
|
+
);
|
|
171
|
+
for (let c = 0; c < n.length; c++)
|
|
172
|
+
n[c].dispatch("pointerLeave", e);
|
|
173
|
+
for (let c = 0; c < w.length; c++)
|
|
174
|
+
w[c].dispatch("pointerEnter", e);
|
|
175
|
+
a(this, d, E);
|
|
176
|
+
for (let c = 0; c < t(this, d).length; c++)
|
|
177
|
+
t(this, d)[c].dispatch("pointerMove", e);
|
|
178
|
+
});
|
|
179
|
+
u.containerElement.addEventListener(
|
|
180
|
+
"pointerdown",
|
|
181
|
+
t(this, W)
|
|
182
|
+
), u.containerElement.addEventListener("pointerup", t(this, Y)), u.containerElement.addEventListener(
|
|
183
|
+
"pointermove",
|
|
184
|
+
t(this, _)
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
destroy() {
|
|
188
|
+
u.containerElement.removeEventListener(
|
|
189
|
+
"pointerdown",
|
|
190
|
+
t(this, W)
|
|
191
|
+
), u.containerElement.removeEventListener(
|
|
192
|
+
"pointerup",
|
|
193
|
+
t(this, Y)
|
|
194
|
+
), u.containerElement.removeEventListener(
|
|
195
|
+
"pointermove",
|
|
196
|
+
t(this, _)
|
|
197
|
+
), a(this, b, []), a(this, d, []);
|
|
198
|
+
}
|
|
199
|
+
add(e, i) {
|
|
200
|
+
if (t(this, b).find((n) => n.object3D.uuid === e.uuid))
|
|
201
|
+
return;
|
|
202
|
+
const h = new Le(k({
|
|
203
|
+
object3D: e
|
|
204
|
+
}, i));
|
|
205
|
+
t(this, b).push(h);
|
|
206
|
+
}
|
|
207
|
+
remove(e) {
|
|
208
|
+
a(this, b, t(this, b).filter(
|
|
209
|
+
(i) => i.object3D.uuid !== e.uuid
|
|
210
|
+
)), a(this, d, t(this, d).filter((i) => i.object3D.uuid !== e.uuid));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
b = new WeakMap(), d = new WeakMap(), O = new WeakMap(), N = new WeakMap(), W = new WeakMap(), Y = new WeakMap(), _ = new WeakMap();
|
|
214
|
+
var U, y, l, j, f, T, V, M, $, C, Z, g, B, G;
|
|
215
|
+
class Ve {
|
|
216
|
+
constructor() {
|
|
217
|
+
r(this, U, `https://unpkg.com/three@0.${Re}.x`);
|
|
218
|
+
r(this, y, null);
|
|
219
|
+
r(this, l, null);
|
|
220
|
+
r(this, j, null);
|
|
221
|
+
r(this, f, /* @__PURE__ */ new Map());
|
|
222
|
+
r(this, T, 0);
|
|
223
|
+
r(this, V, 0);
|
|
224
|
+
r(this, M, 0);
|
|
225
|
+
r(this, $, 2);
|
|
226
|
+
r(this, C, !1);
|
|
227
|
+
r(this, Z, !1);
|
|
228
|
+
r(this, g, null);
|
|
229
|
+
r(this, B, () => {
|
|
230
|
+
a(this, T, t(this, y).clientWidth), a(this, V, t(this, y).clientHeight), a(this, M, Math.min(t(this, $), devicePixelRatio || 1)), t(this, l).setPixelRatio(t(this, M)), t(this, l).setSize(t(this, T), t(this, V)), t(this, g) && (t(this, g).setPixelRatio(t(this, M)), t(this, g).setSize(t(this, T), t(this, V)));
|
|
231
|
+
});
|
|
232
|
+
r(this, G, () => {
|
|
233
|
+
t(this, l).setRenderTarget(null), t(this, f).forEach((e) => {
|
|
234
|
+
this.render(e);
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
get CDNVersion() {
|
|
239
|
+
return t(this, U);
|
|
240
|
+
}
|
|
241
|
+
get containerElement() {
|
|
242
|
+
return t(this, y);
|
|
243
|
+
}
|
|
244
|
+
get webglRenderer() {
|
|
245
|
+
return t(this, l);
|
|
246
|
+
}
|
|
247
|
+
get raycaster() {
|
|
248
|
+
return t(this, j);
|
|
249
|
+
}
|
|
250
|
+
get views() {
|
|
251
|
+
return t(this, f);
|
|
252
|
+
}
|
|
253
|
+
get view() {
|
|
254
|
+
return this.getView("default");
|
|
255
|
+
}
|
|
256
|
+
get camera() {
|
|
257
|
+
return this.getView("default").camera;
|
|
258
|
+
}
|
|
259
|
+
get scene() {
|
|
260
|
+
return this.getView("default").scene;
|
|
261
|
+
}
|
|
262
|
+
get width() {
|
|
263
|
+
return t(this, T);
|
|
264
|
+
}
|
|
265
|
+
get height() {
|
|
266
|
+
return t(this, V);
|
|
267
|
+
}
|
|
268
|
+
get pixelRatio() {
|
|
269
|
+
return t(this, M);
|
|
270
|
+
}
|
|
271
|
+
get composer() {
|
|
272
|
+
return t(this, g);
|
|
273
|
+
}
|
|
274
|
+
setup(e) {
|
|
275
|
+
if (t(this, C)) {
|
|
276
|
+
console.warn("[en3.setup]: You are trying to setup en3 again.");
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
a(this, y, oe(e == null ? void 0 : e.containerElement) || document.body), a(this, $, (e == null ? void 0 : e.maxPixelRatio) || 2), a(this, l, new ve(e == null ? void 0 : e.webGLRendererParameters)), t(this, l).domElement.style.cssText = `
|
|
280
|
+
position: fixed;
|
|
281
|
+
left: 0;
|
|
282
|
+
top: 0;
|
|
283
|
+
width: 100%;
|
|
284
|
+
height: 100%;
|
|
285
|
+
z-index: ${(e == null ? void 0 : e.zIndex) || 0};
|
|
286
|
+
`, (t(this, y).shadowRoot || t(this, y)).append(t(this, l).domElement), t(this, f).set(
|
|
287
|
+
"default",
|
|
288
|
+
new ce("default", k({
|
|
289
|
+
sizeElement: t(this, y)
|
|
290
|
+
}, e == null ? void 0 : e.view))
|
|
291
|
+
), a(this, j, new Te()), e != null && e.composer && (a(this, g, new e.composer(t(this, l))), this.render = () => {
|
|
292
|
+
t(this, g).render();
|
|
293
|
+
}), a(this, C, !0), re.subscribe(t(this, B), ye.EN3), ae.subscribe(t(this, G), { order: xe.EN3 });
|
|
294
|
+
}
|
|
295
|
+
destroy() {
|
|
296
|
+
if (!t(this, C)) {
|
|
297
|
+
console.warn(
|
|
298
|
+
"[en3.setup]: You are trying to destory en3 but it has not been initialized."
|
|
299
|
+
);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
re.unsubscribe(t(this, B)), ae.unsubscribe(t(this, G)), t(this, j).destroy(), t(this, f).forEach((e) => {
|
|
303
|
+
e.destroy();
|
|
304
|
+
}), t(this, l).dispose(), t(this, l).domElement.remove(), a(this, l, null), t(this, g).dispose(), a(this, g, null), a(this, C, !1);
|
|
305
|
+
}
|
|
306
|
+
createView(e, i) {
|
|
307
|
+
const h = t(this, f).size, n = new ce(e, i);
|
|
308
|
+
return t(this, f).set(e, n), h === 1 && t(this, l).setScissorTest(!0), n;
|
|
309
|
+
}
|
|
310
|
+
getView(e) {
|
|
311
|
+
return t(this, f).get(e);
|
|
312
|
+
}
|
|
313
|
+
destroyView(e) {
|
|
314
|
+
const i = t(this, f).get(e);
|
|
315
|
+
i && (t(this, f).delete(e), i.destroy(), t(this, f).size <= 1 && t(this, l).setScissorTest(!1));
|
|
316
|
+
}
|
|
317
|
+
render(e) {
|
|
318
|
+
var i;
|
|
319
|
+
if (t(this, f).size > 1 || this.view.isClipped) {
|
|
320
|
+
const h = e.box.left + e.box.CSSTranslation.x + e.box.scrollValue.x, n = u.height - e.box.height - e.box.top + e.box.CSSTranslation.y + e.box.scrollValue.y * -1;
|
|
321
|
+
t(this, l).setScissor(h, n, e.box.width, e.box.height), t(this, l).setViewport(
|
|
322
|
+
h,
|
|
323
|
+
n,
|
|
324
|
+
e.box.width,
|
|
325
|
+
e.box.height
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
(i = e.beforeRenderCallback) == null || i.call(e), t(this, l).render(e.scene, e.camera);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
U = new WeakMap(), y = new WeakMap(), l = new WeakMap(), j = new WeakMap(), f = new WeakMap(), T = new WeakMap(), V = new WeakMap(), M = new WeakMap(), $ = new WeakMap(), C = new WeakMap(), Z = new WeakMap(), g = new WeakMap(), B = new WeakMap(), G = new WeakMap();
|
|
332
|
+
const u = new Ve();
|
|
333
|
+
function Ae(s, e, i) {
|
|
334
|
+
const h = e.x, n = e.y, z = i || s.image.width / s.image.height;
|
|
335
|
+
let E = 0, w = 0, c = s.offset.x, m = s.offset.y, le = s.rotation, de = s.center.x, ue = s.center.y;
|
|
336
|
+
h / n > z ? (E = 1, w = n / h * z) : (w = 1, E = h / n / z), s.matrix.setUvTransform(c, m, E, w, le, de, ue);
|
|
337
|
+
}
|
|
338
|
+
const K = new J(), Me = new J();
|
|
339
|
+
function Fe(s, e = "default") {
|
|
340
|
+
const i = u.getView(e), { width: h, height: n } = u, z = h / n;
|
|
341
|
+
s instanceof J ? K.copy(s) : K.set(...s);
|
|
342
|
+
const E = i.camera.getWorldPosition(Me).distanceTo(K);
|
|
343
|
+
if (i.camera instanceof X)
|
|
344
|
+
return {
|
|
345
|
+
width: h / i.camera.zoom,
|
|
346
|
+
height: n / i.camera.zoom,
|
|
347
|
+
factor: 1,
|
|
348
|
+
distance: E,
|
|
349
|
+
aspect: z
|
|
350
|
+
};
|
|
351
|
+
{
|
|
352
|
+
const w = i.camera.fov * Math.PI / 180, c = 2 * Math.tan(w / 2) * E, m = c * (h / n);
|
|
353
|
+
return { width: m, height: c, factor: h / m, distance: E, aspect: z };
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
function Ie(s, e) {
|
|
357
|
+
s.traverse((i) => {
|
|
358
|
+
i instanceof q && i.material && (Array.isArray(i.material) ? i.material : [i.material]).forEach(e);
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
function Ne(s, e) {
|
|
362
|
+
s.traverse((i) => {
|
|
363
|
+
i instanceof q && e(i);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
2
366
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
367
|
+
ce as En3View,
|
|
368
|
+
Ae as coverTexture,
|
|
369
|
+
ze as dispose,
|
|
370
|
+
u as en3,
|
|
371
|
+
Fe as getCurrentViewport,
|
|
372
|
+
Ie as traverseMaterials,
|
|
373
|
+
Ne as traverseMeshes
|
|
6
374
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function c(n) {
|
|
2
|
+
n.dispatchEvent(
|
|
3
|
+
new CustomEvent("sizeChange", {
|
|
4
|
+
bubbles: !0,
|
|
5
|
+
composed: !0
|
|
6
|
+
})
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
function s(n) {
|
|
10
|
+
n.dispatchEvent(
|
|
11
|
+
new CustomEvent("beforeSizeChange", {
|
|
12
|
+
bubbles: !0,
|
|
13
|
+
composed: !0
|
|
14
|
+
})
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function i(n, t) {
|
|
18
|
+
const o = new Blob([JSON.stringify(t)], { type: "application/json" }), e = document.createElement("a");
|
|
19
|
+
e.download = n + ".json", e.href = window.URL.createObjectURL(o), e.dataset.downloadurl = ["application/json", e.download, e.href].join(":");
|
|
20
|
+
const a = new MouseEvent("click", {
|
|
21
|
+
view: window,
|
|
22
|
+
bubbles: !0,
|
|
23
|
+
cancelable: !0
|
|
24
|
+
});
|
|
25
|
+
e.dispatchEvent(a), e.remove();
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
s as a,
|
|
29
|
+
i as c,
|
|
30
|
+
c as d
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(n){n.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function c(n){n.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}function s(n,t){const o=new Blob([JSON.stringify(t)],{type:"application/json"}),e=document.createElement("a");e.download=n+".json",e.href=window.URL.createObjectURL(o),e.dataset.downloadurl=["application/json",e.download,e.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(a),e.remove()}exports.createJSONAndSave=s;exports.dispatchBeforeSizeChangeEvent=c;exports.dispatchSizeChangeEvent=i;
|
package/lib/image/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-CDb6RMce.cjs");const r=require("../source/index.cjs");class e extends r.SourceElement{createConsumer(){return document.createElement("img")}consumeSource(t){this.consumerElement.src=t||""}}customElements.get("e-image")||customElements.define("e-image",e);exports.ImageElement=e;
|
package/lib/image/index.js
CHANGED
package/lib/intersector/index.js
CHANGED
|
@@ -3,10 +3,10 @@ var m = (n) => {
|
|
|
3
3
|
};
|
|
4
4
|
var y = (n, t, s) => t.has(n) || m("Cannot " + s);
|
|
5
5
|
var r = (n, t, s) => (y(n, t, "read from private field"), s ? s.call(n) : t.get(n)), f = (n, t, s) => t.has(n) ? m("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, s), l = (n, t, s, e) => (y(n, t, "write to private field"), e ? e.call(n, s) : t.set(n, s), s);
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
6
|
+
import { i as g } from "../browser-0zX67oeU.js";
|
|
7
|
+
import { g as p } from "../dom-0S_WDL4g.js";
|
|
8
8
|
var i, b, u;
|
|
9
|
-
class
|
|
9
|
+
class w {
|
|
10
10
|
constructor() {
|
|
11
11
|
f(this, i, []);
|
|
12
12
|
f(this, b, null);
|
|
@@ -18,12 +18,12 @@ class g {
|
|
|
18
18
|
e.entry && (e.subscriber.entry = e.entry, e.subscriber.callback(e.entry));
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
g && window.IntersectionObserver && l(this, b, new IntersectionObserver(
|
|
22
22
|
r(this, u)
|
|
23
23
|
));
|
|
24
24
|
}
|
|
25
25
|
subscribe(t, s) {
|
|
26
|
-
const e =
|
|
26
|
+
const e = p(t);
|
|
27
27
|
if (!e)
|
|
28
28
|
return () => {
|
|
29
29
|
};
|
|
@@ -56,8 +56,8 @@ class g {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
i = new WeakMap(), b = new WeakMap(), u = new WeakMap();
|
|
59
|
-
const E = new
|
|
59
|
+
const E = new w();
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
w as Intersector,
|
|
62
62
|
E as intersector
|
|
63
63
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { i as s } from "./browser-0zX67oeU.js";
|
|
2
|
+
import { c } from "./string-f0Dnk0L1.js";
|
|
3
|
+
function o(t) {
|
|
4
|
+
let e = "";
|
|
5
|
+
for (const r in t) {
|
|
6
|
+
const n = t[r];
|
|
7
|
+
typeof n == "object" ? (e += `${r} {`, e += o(n), e += "}") : e += `${c(r)}: ${n};`;
|
|
8
|
+
}
|
|
9
|
+
return e;
|
|
10
|
+
}
|
|
11
|
+
function a(t) {
|
|
12
|
+
if (s) {
|
|
13
|
+
const e = new CSSStyleSheet();
|
|
14
|
+
return e.replaceSync(o(t)), e;
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
a as c,
|
|
20
|
+
o as s
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./browser-CpzFX2xg.cjs"),c=require("./string-DhgS_iFl.cjs");function s(t){let e="";for(const r in t){const n=t[r];typeof n=="object"?(e+=`${r} {`,e+=s(n),e+="}"):e+=`${c.camelToKebab(r)}: ${n};`}return e}function l(t){if(o.isBrowser){const e=new CSSStyleSheet;return e.replaceSync(s(t)),e}return null}exports.createStylesheet=l;exports.styleToString=s;
|
package/lib/ladder/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty;var S=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var v=t=>{throw TypeError(t)};var k=(t,s,e)=>s in t?M(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,w=(t,s)=>{for(var e in s||(s={}))V.call(s,e)&&k(t,e,s[e]);if(S)for(var e of S(s))m.call(s,e)&&k(t,e,s[e]);return t};var g=(t,s,e)=>s.has(t)||v("Cannot "+e);var o=(t,s,e)=>(g(t,s,"read from private field"),e?e.call(t):s.get(t)),p=(t,s,e)=>s.has(t)?v("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),f=(t,s,e,i)=>(g(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),b=(t,s,e)=>(g(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../Store-
|
|
1
|
+
"use strict";var M=Object.defineProperty;var S=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var v=t=>{throw TypeError(t)};var k=(t,s,e)=>s in t?M(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,w=(t,s)=>{for(var e in s||(s={}))V.call(s,e)&&k(t,e,s[e]);if(S)for(var e of S(s))m.call(s,e)&&k(t,e,s[e]);return t};var g=(t,s,e)=>s.has(t)||v("Cannot "+e);var o=(t,s,e)=>(g(t,s,"read from private field"),e?e.call(t):s.get(t)),p=(t,s,e)=>s.has(t)?v("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),f=(t,s,e,i)=>(g(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),b=(t,s,e)=>(g(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../Store-CDb6RMce.cjs");var d,u,a,h,y;class x extends q.Store{constructor(e){super(e,{equalityCheck:()=>!1});p(this,h);p(this,d);p(this,u);p(this,a);f(this,d,w({},e)),f(this,u,new Map),f(this,a,new Set)}get base(){return o(this,d)}get steps(){return o(this,u)}close(){super.close(),o(this,a).clear(),o(this,u).clear()}bind(e){o(this,a).add(e)}unbind(e){o(this,a).delete(e)}deleteStep(e){this.steps.delete(e)}getStepValue(e){var i;return(i=this.steps.get(e))==null?void 0:i[1]}getExcludedStepsValue(...e){const i=new Map;return e.map(c=>{const n=this.steps.get(c);n&&i.set(c,n)}),b(this,h,y).call(this,i)}getIncludedStepsValue(...e){const i=new Map(this.steps);return e.map(c=>{this.steps.has(c)&&i.delete(c)}),b(this,h,y).call(this,i)}setStep(e,i,c){const n={};for(const r in this.current)n[r]=c[r]||0;this.steps.set(e,[i,n]),this.calculate()}calculate(){this.current=b(this,h,y).call(this,o(this,u))}}d=new WeakMap,u=new WeakMap,a=new WeakMap,h=new WeakSet,y=function(e){const i={};for(const c in this.base)i[c]=this.base[c];for(const c of e){const n=c[1];if(n[0]==="+")for(const r in this.base){const l=n[1][r];i[r]+=l}else if(n[0]==="*")for(const r in this.base){const l=n[1][r];i[r]*=l}else if(n[0]==="/")for(const r in this.base){const l=n[1][r];i[r]/=l}else if(n[0]==="-")for(const r in this.base){const l=n[1][r];i[r]-=l}}for(const c of o(this,a))for(const n in i)c[n]=i[n];return i};exports.Ladder=x;
|
package/lib/ladder/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var S = (t, s, e) => s in t ? V(t, s, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
};
|
|
15
15
|
var g = (t, s, e) => s.has(t) || v("Cannot " + e);
|
|
16
16
|
var r = (t, s, e) => (g(t, s, "read from private field"), e ? e.call(t) : s.get(t)), p = (t, s, e) => s.has(t) ? v("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), d = (t, s, e, i) => (g(t, s, "write to private field"), i ? i.call(t, e) : s.set(t, e), e), b = (t, s, e) => (g(t, s, "access private method"), e);
|
|
17
|
-
import { S as M } from "../Store-
|
|
17
|
+
import { S as M } from "../Store-OTdcl6SX.js";
|
|
18
18
|
var f, h, a, u, y;
|
|
19
19
|
class E extends M {
|
|
20
20
|
constructor(e) {
|
package/lib/layout-box/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { RESIZE_ORDER as St, TICK_ORDER as dt } from "../order/index.js";
|
|
|
9
9
|
import { scrollEntries as $ } from "../scroll-entries/index.js";
|
|
10
10
|
import { ticker as j } from "../ticker/index.js";
|
|
11
11
|
import { i as tt } from "../browser-0zX67oeU.js";
|
|
12
|
-
import {
|
|
12
|
+
import { g as et } from "../dom-0S_WDL4g.js";
|
|
13
13
|
import { g as F, a as G } from "../layout-HoBT_Da2.js";
|
|
14
14
|
import { elementResizer as st } from "../element-resizer/index.js";
|
|
15
15
|
import { windowResizer as it } from "../window-resizer/index.js";
|
|
@@ -37,7 +37,7 @@ function pt(i) {
|
|
|
37
37
|
translationZ: O
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
var a, z, b, _, W, X, v, w, q, B, x, M, Y, S, d, C, H, I, D, p,
|
|
40
|
+
var a, z, b, _, W, X, v, w, q, B, x, M, Y, S, d, C, H, I, D, p, g, m, c, n, o, E, R, T, f, J, ht, rt, nt, P, U, Z;
|
|
41
41
|
class Ct {
|
|
42
42
|
constructor(e, s) {
|
|
43
43
|
h(this, f);
|
|
@@ -61,8 +61,8 @@ class Ct {
|
|
|
61
61
|
h(this, I, 0);
|
|
62
62
|
h(this, D, 0);
|
|
63
63
|
h(this, p, { x: 0, y: 0, z: 0 });
|
|
64
|
-
h(this,
|
|
65
|
-
h(this,
|
|
64
|
+
h(this, g, { x: 0, y: 0, z: 0 });
|
|
65
|
+
h(this, m, { x: 1, y: 1, z: 1 });
|
|
66
66
|
h(this, c, new N({ x: 0, y: 0, z: 0 }));
|
|
67
67
|
h(this, n, new N({ x: 0, y: 0, z: 0 }));
|
|
68
68
|
h(this, o, new N({ x: 0, y: 0, z: 0 }));
|
|
@@ -139,10 +139,10 @@ class Ct {
|
|
|
139
139
|
return t(this, p);
|
|
140
140
|
}
|
|
141
141
|
get CSSRotation() {
|
|
142
|
-
return t(this,
|
|
142
|
+
return t(this, g);
|
|
143
143
|
}
|
|
144
144
|
get CSSScale() {
|
|
145
|
-
return t(this,
|
|
145
|
+
return t(this, m);
|
|
146
146
|
}
|
|
147
147
|
get front() {
|
|
148
148
|
return t(this, C);
|
|
@@ -243,7 +243,7 @@ class Ct {
|
|
|
243
243
|
return t(this, T).unsubscribe(...e);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
a = new WeakMap(), z = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), W = new WeakMap(), X = new WeakMap(), v = new WeakMap(), w = new WeakMap(), q = new WeakMap(), B = new WeakMap(), x = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), S = new WeakMap(), d = new WeakMap(), C = new WeakMap(), H = new WeakMap(), I = new WeakMap(), D = new WeakMap(), p = new WeakMap(),
|
|
246
|
+
a = new WeakMap(), z = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), W = new WeakMap(), X = new WeakMap(), v = new WeakMap(), w = new WeakMap(), q = new WeakMap(), B = new WeakMap(), x = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), S = new WeakMap(), d = new WeakMap(), C = new WeakMap(), H = new WeakMap(), I = new WeakMap(), D = new WeakMap(), p = new WeakMap(), g = new WeakMap(), m = new WeakMap(), c = new WeakMap(), n = new WeakMap(), o = new WeakMap(), E = new WeakMap(), R = new WeakMap(), T = new WeakMap(), f = new WeakSet(), J = function() {
|
|
247
247
|
t(this, o).calculate(), t(this, n).calculate(), t(this, c).calculate();
|
|
248
248
|
}, ht = function() {
|
|
249
249
|
t(this, o).setStep("_size", "+", {
|
|
@@ -257,17 +257,17 @@ a = new WeakMap(), z = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), W =
|
|
|
257
257
|
y: s,
|
|
258
258
|
z: l
|
|
259
259
|
}), t(this, q) ? (t(this, o).setStep("_scale", "*", {
|
|
260
|
-
x: t(this,
|
|
261
|
-
y: t(this,
|
|
262
|
-
z: t(this,
|
|
260
|
+
x: t(this, m).x,
|
|
261
|
+
y: t(this, m).y,
|
|
262
|
+
z: t(this, m).z
|
|
263
263
|
}), t(this, n).setStep("_translation", "+", {
|
|
264
264
|
x: t(this, p).x,
|
|
265
265
|
y: t(this, p).y,
|
|
266
266
|
z: t(this, p).z
|
|
267
267
|
}), t(this, c).setStep("_rotation", "+", {
|
|
268
|
-
x: t(this,
|
|
269
|
-
y: t(this,
|
|
270
|
-
z: t(this,
|
|
268
|
+
x: t(this, g).x,
|
|
269
|
+
y: t(this, g).y,
|
|
270
|
+
z: t(this, g).z
|
|
271
271
|
})) : (t(this, o).setStep("_scale", "*", {
|
|
272
272
|
x: 1,
|
|
273
273
|
y: 1,
|
|
@@ -299,7 +299,7 @@ a = new WeakMap(), z = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), W =
|
|
|
299
299
|
r(this, H, t(this, d)), r(this, I, t(this, S));
|
|
300
300
|
r(this, D, t(this, C) * -1);
|
|
301
301
|
const k = new WebKitCSSMatrix(e.transform), u = pt(k);
|
|
302
|
-
t(this, p).x = u.translationX, t(this, p).y = u.translationY, t(this, p).z = u.translationZ, t(this,
|
|
302
|
+
t(this, p).x = u.translationX, t(this, p).y = u.translationY, t(this, p).z = u.translationZ, t(this, m).x = u.scaleX, t(this, m).y = u.scaleY, t(this, m).z = u.scaleZ, t(this, g).x = u.rotationX, t(this, g).y = u.rotationY, t(this, g).z = u.rotationZ, L(this, f, ht).call(this), L(this, f, J).call(this), t(this, T).notify();
|
|
303
303
|
}, nt = function() {
|
|
304
304
|
t(this, E).x = 0, t(this, E).y = 0, t(this, E).z = 0;
|
|
305
305
|
for (let e = 0; e < t(this, b).length; e++) {
|