aptechka 0.5.42 → 0.7.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-6Na1MCtM.cjs +1 -0
- package/lib/Animation-CELiTw3n.js +132 -0
- package/lib/Composed-DmLYTh1b.js +35 -0
- package/lib/Composed-Dx2hs-va.cjs +1 -0
- package/lib/{Damped-P4MkCGoY.js → Damped-Mx_FNNVz.js} +2 -5
- package/lib/Damped-loFiBsBy.cjs +1 -0
- package/lib/{Derived-kPJs5JC5.js → Derived-DlCvc0xQ.js} +1 -1
- package/lib/{Derived-B-g8dYgh.cjs → Derived-a6MDQEPY.cjs} +1 -1
- package/lib/ElementConstructor-CAZ2ra8m.cjs +1 -0
- package/lib/ElementConstructor-OYlPJf2L.js +366 -0
- package/lib/Resource-D3TQormz.cjs +1 -0
- package/lib/Resource-DIcoALGo.js +64 -0
- package/lib/{SourceManager-Q-PB-Rkh.js → SourceManager-Bz329f90.js} +1 -1
- package/lib/{SourceManager-vSlsMKUE.cjs → SourceManager-kxr5eUyL.cjs} +1 -1
- package/lib/Store-6s0YXK4o.cjs +1 -0
- package/lib/{Store-BQXXikps.js → Store-BI2xxXOA.js} +42 -42
- package/lib/Tweened-B_mclQ61.cjs +1 -0
- package/lib/Tweened-NE8M9onF.js +48 -0
- package/lib/{Viewport-DMB0dO-s.cjs → Viewport-CJeKnL5V.cjs} +1 -1
- package/lib/{Viewport-CFFhFKqX.js → Viewport-D9IL7kUQ.js} +1 -1
- package/lib/_createStore-Cf1MyeHa.cjs +1 -0
- package/lib/_createStore-Ck9bHolX.js +12 -0
- package/lib/accordion/AccordionElement.d.ts +5 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +141 -105
- package/lib/animation/Animation.d.ts +11 -19
- package/lib/animation/Damped.d.ts +4 -6
- package/lib/animation/Tweened.d.ts +2 -4
- 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.d.ts +1 -1
- package/lib/attribute/index.js +31 -31
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +29 -29
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +20 -20
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/AutoplayControls.d.ts +1 -1
- package/lib/controls/DragControls.d.ts +1 -1
- package/lib/controls/WheelControls.d.ts +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/counter/index.d.ts +8 -0
- package/lib/{createStylesheet-DBCEbDjI.js → createStylesheet-CR_yi5tp.js} +1 -1
- package/lib/{createStylesheet-CqHU9_qv.cjs → createStylesheet-p23sZ7Ey.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +2 -1
- package/lib/css-property/index.js +36 -32
- package/lib/custom-element/index.d.ts +1 -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/element-constructor/ElementConstructor.d.ts +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/en3/core/En3Raycaster.d.ts +20 -0
- package/lib/en3/core/En3View.d.ts +1 -1
- package/lib/en3/core/en3.d.ts +7 -3
- package/lib/en3/helpers/En3Controls.d.ts +5 -0
- package/lib/en3/helpers/En3GridHelper.d.ts +8 -0
- package/lib/en3/helpers/En3Object3dManager.d.ts +12 -0
- package/lib/en3/helpers/En3OrbitControls.d.ts +8 -0
- package/lib/en3/helpers/En3TransformControls.d.ts +8 -0
- package/lib/en3/helpers/index.cjs +1 -0
- package/lib/en3/helpers/index.d.ts +2 -0
- package/lib/en3/helpers/index.js +1165 -0
- package/lib/en3/index.cjs +1 -215
- package/lib/en3/index.d.ts +1 -19
- package/lib/en3/index.js +4 -4227
- package/lib/en3/libs/index.cjs +1 -0
- package/lib/en3/libs/index.d.ts +1 -0
- package/lib/en3/libs/index.js +201 -0
- package/lib/en3/loaders/_En3GLTFLoader.d.ts +12 -0
- package/lib/en3/loaders/_En3TextureLoader.d.ts +8 -0
- package/lib/en3/loaders/index.cjs +1 -0
- package/lib/en3/loaders/index.d.ts +3 -0
- package/lib/en3/loaders/index.js +1757 -0
- package/lib/en3/loaders/loaders.d.ts +13 -0
- package/lib/en3/misc/index.cjs +10 -0
- package/lib/en3/misc/index.d.ts +2 -0
- package/lib/en3/misc/index.js +115 -0
- package/lib/en3/objects/En3Clip.d.ts +1 -1
- package/lib/en3/objects/En3ClipHelpers.d.ts +1 -1
- package/lib/en3/objects/En3GLTF.d.ts +4 -3
- package/lib/en3/objects/En3Image.d.ts +1 -1
- package/lib/en3/objects/En3ImageLike.d.ts +3 -2
- package/lib/en3/objects/En3SourceConsumer.d.ts +1 -1
- package/lib/en3/objects/En3Video.d.ts +1 -1
- package/lib/en3/objects/fluid/Advection.d.ts +1 -1
- package/lib/en3/objects/fluid/Divergence.d.ts +1 -1
- package/lib/en3/objects/fluid/En3Fluid.d.ts +1 -1
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -1
- package/lib/en3/objects/fluid/ExternalForce.d.ts +1 -1
- package/lib/en3/objects/fluid/Poisson.d.ts +1 -1
- package/lib/en3/objects/fluid/Pressure.d.ts +1 -1
- package/lib/en3/objects/fluid/Simulation.d.ts +1 -1
- package/lib/en3/objects/fluid/Viscous.d.ts +1 -1
- package/lib/en3/objects/fluid/index.d.ts +0 -3
- package/lib/en3/objects/index.d.ts +7 -0
- package/lib/en3/utils/coverTexture.d.ts +1 -1
- package/lib/en3/utils/index.cjs +1 -0
- package/lib/en3/utils/index.d.ts +5 -0
- package/lib/en3/utils/index.js +43 -0
- package/lib/en3-C4mzaF6q.cjs +8 -0
- package/lib/en3-hbkN1OPu.js +343 -0
- package/lib/globals-DMjysUXI.js +8 -0
- package/lib/globals-bYKki-b9.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{index-BtsOv9u0.js → index-BAH_fO2N.js} +66 -66
- package/lib/index-D1LQUR-R.cjs +9 -0
- package/lib/instantiate-D19Uvc31.js +125 -0
- package/lib/instantiate-Db5gGSYG.cjs +1 -0
- package/lib/jsx/ComponentElement.d.ts +18 -0
- package/lib/jsx/globals.d.ts +13 -0
- package/lib/jsx/h.d.ts +7 -0
- package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
- package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
- package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
- package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
- package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
- package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
- package/lib/jsx/hooks/onAnimationFrame.js +22 -0
- package/lib/jsx/hooks/onElementResize.cjs +1 -0
- package/lib/jsx/hooks/onElementResize.d.ts +5 -0
- package/lib/jsx/hooks/onElementResize.js +11 -0
- package/lib/jsx/hooks/onIntersection.cjs +1 -0
- package/lib/jsx/hooks/onIntersection.d.ts +5 -0
- package/lib/jsx/hooks/onIntersection.js +11 -0
- package/lib/jsx/hooks/onWindowResize.cjs +1 -0
- package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
- package/lib/jsx/hooks/onWindowResize.js +8 -0
- package/lib/jsx/hooks/store/createArrayStore.d.ts +3 -0
- package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedComponent.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedComponents.d.ts +3 -0
- package/lib/jsx/hooks/store/createResource.d.ts +3 -0
- package/lib/jsx/hooks/store/createStore.d.ts +3 -0
- package/lib/jsx/hooks/store/index.cjs +1 -0
- package/lib/jsx/hooks/store/index.d.ts +7 -0
- package/lib/jsx/hooks/store/index.js +49 -0
- package/lib/jsx/hooks/watchAttribute.cjs +1 -0
- package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
- package/lib/jsx/hooks/watchAttribute.js +17 -0
- package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
- package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
- package/lib/jsx/hooks/watchCSSProperty.js +17 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +13 -0
- package/lib/jsx/index.js +91 -0
- package/lib/jsx/instantiate.d.ts +5 -0
- package/lib/jsx/register.d.ts +1 -0
- package/lib/jsx/render.d.ts +6 -0
- package/lib/jsx/type.d.ts +188 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.d.ts +2 -0
- package/lib/ladder/index.js +84 -66
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +11 -2
- package/lib/layout-box/index.js +190 -164
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +16 -16
- package/lib/morph/Morph.d.ts +2 -2
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.d.ts +1 -1
- package/lib/morph/index.js +135 -143
- package/lib/notifier/index.d.ts +2 -2
- package/lib/notifier/index.js +3 -1
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/pointer/Pointer.d.ts +1 -1
- package/lib/pointer/PointerElement.d.ts +1 -1
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +3 -3
- package/lib/polyfills-CM4SCDTt.cjs +1 -0
- package/lib/polyfills-X6KXuHg-.js +33 -0
- package/lib/popover/PopoverButtonElement.d.ts +1 -1
- package/lib/popover/PopoverElement.d.ts +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +49 -49
- package/lib/router/Router.d.ts +11 -3
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +1 -1
- package/lib/router/index.js +185 -165
- package/lib/scroll/ScrollElement.d.ts +8 -25
- package/lib/scroll/ScrollSection.d.ts +23 -0
- package/lib/scroll/ScrollSegmentElement.d.ts +3 -3
- package/lib/scroll/ScrollUserElement.d.ts +1 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +87 -83
- package/lib/scroll-entries/index.d.ts +1 -1
- package/lib/select/SelectUserElement.d.ts +1 -1
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.d.ts +1 -1
- package/lib/sequence/index.js +8 -8
- package/lib/slicer/SlicerElement.d.ts +2 -2
- package/lib/slicer/index.cjs +4 -4
- package/lib/slicer/index.js +31 -31
- package/lib/source/SourceElement.d.ts +2 -2
- package/lib/source/SourceManager.d.ts +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/ArrayStore.d.ts +21 -0
- package/lib/store/Store.d.ts +1 -7
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -2
- package/lib/store/index.js +65 -139
- package/lib/tags-BqJKcIve.js +485 -0
- package/lib/tags-ld5jemJw.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/TweakerBooleanManagerElement.d.ts +2 -2
- package/lib/tweaker/TweakerColorManagerElement.d.ts +2 -2
- package/lib/tweaker/TweakerElement.d.ts +1 -1
- package/lib/tweaker/TweakerFieldElement.d.ts +2 -2
- package/lib/tweaker/TweakerFolderElement.d.ts +5 -3
- package/lib/tweaker/TweakerLinkManagerElement.d.ts +2 -2
- package/lib/tweaker/TweakerNumberManagerElement.d.ts +4 -8
- package/lib/tweaker/TweakerSelectManagerElement.d.ts +2 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +7 -7
- package/lib/tweaker/TweakerStringManagerElement.d.ts +3 -5
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +535 -412
- package/lib/tweaker/tweakerManagerConstructors.d.ts +2 -2
- package/lib/tweaker/tweakerStorage.d.ts +8 -1
- package/lib/url-C3dWnJQg.cjs +1 -0
- package/lib/url-DMNfW7uN.js +22 -0
- package/lib/utils/function.d.ts +2 -2
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +39 -34
- package/lib/utils/layout.d.ts +1 -1
- package/lib/utils/number.d.ts +1 -0
- package/lib/utils/url.d.ts +9 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +14 -14
- package/package.json +108 -12
- package/lib/Animation-DDHjrbtL.cjs +0 -1
- package/lib/Animation-Dq_05jlR.js +0 -217
- package/lib/Damped-l0mnlhar.cjs +0 -1
- package/lib/Store-C-1ruEIm.cjs +0 -1
- package/lib/Tweened-CwDC2zl8.js +0 -51
- package/lib/Tweened-DIt9j9B-.cjs +0 -1
- package/lib/animation/AnimationLink.d.ts +0 -13
- package/lib/en3/loaders/en3GLTFLoader.d.ts +0 -14
- package/lib/en3/loaders/en3TextureLoader.d.ts +0 -3
- package/lib/en3/test/En3HTML.d.ts +0 -10
- package/lib/index-Buf76Qoq.cjs +0 -9
- package/lib/polyfills-BA-CL_HF.js +0 -27
- package/lib/polyfills-DHs2SNbz.cjs +0 -1
- package/lib/resized/index.cjs +0 -1
- package/lib/resized/index.d.ts +0 -12
- package/lib/resized/index.js +0 -30
- package/lib/store/CumulativeResource.d.ts +0 -13
- package/lib/tags-CMPg9ETZ.js +0 -848
- package/lib/tags-Djb6mb1o.cjs +0 -1
- package/lib/tweaker/TweakerRangeManagerElement.d.ts +0 -11
- package/lib/en3/{loaders → core}/en3Cache.d.ts +0 -0
- package/lib/en3/{test → misc}/En3ModifiedMaterial.d.ts +0 -0
- package/lib/en3/{attachments → misc}/En3SourceManager.d.ts +2 -2
package/lib/morph/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var rt=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var Q=(n,t,i)=>{if(!t.has(n))throw TypeError("Cannot "+i)};var e=(n,t,i)=>(Q(n,t,"read from private field"),i?i.call(n):t.get(n)),r=(n,t,i)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,i)},c=(n,t,i,a)=>(Q(n,t,"write to private field"),a?a.call(n,i):t.set(n,i),i);var f=(n,t,i)=>(Q(n,t,"access private method"),i);var T=(n,t,i)=>new Promise((a,s)=>{var l=u=>{try{d(i.next(u))}catch(m){s(m)}},g=u=>{try{d(i.throw(u))}catch(m){s(m)}},d=u=>u.done?a(u.value):Promise.resolve(u.value).then(l,g);d((i=i.apply(n,t)).next())});var at=(n,t,i)=>(t=n[rt("asyncIterator")])?t.call(n):(n=n[rt("iterator")](),t={},i=(a,s)=>(s=n[a])&&(t[a]=l=>new Promise((g,d,u)=>(l=s.call(n,l),u=l.done,Promise.resolve(l.value).then(m=>g({value:m,done:u}),d)))),i("next"),i("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ht=require("../notifier/index.cjs"),dt=require("../browser-CpzFX2xg.cjs"),U=require("../url-C3dWnJQg.cjs");var w,o,p,k,P,C,A;class mt{constructor(t,i){r(this,w,void 0);r(this,o,void 0);r(this,p,void 0);r(this,k,void 0);r(this,P,void 0);r(this,C,t=>{t.preventDefault(),e(this,w).links.forEach(i=>{var a;e(this,p)===e(i,p)||(a=e(i,P))!=null&&a.includes(e(this,p))?e(i,o).classList.add("clicked"):e(i,o).classList.remove("clicked")}),e(this,w).navigate(e(this,p),e(this,k))});r(this,A,()=>{e(this,w).prefetch(e(this,p)),e(this,o).removeEventListener("pointerenter",e(this,A))});var l,g;c(this,w,i),c(this,o,t),c(this,p,e(this,o).getAttribute("href")||"/"),c(this,k,e(this,o).getAttribute("data-history-action")||"push"),e(this,o).addEventListener("click",e(this,C));const a=i.normalizePath(e(this,p)),s=i.normalizePath(location.pathname);c(this,P,(l=e(this,o).getAttribute("data-match-paths"))==null?void 0:l.split(",").map(d=>i.normalizePath(d.trim()).pathname)),e(this,o).hasAttribute("data-include")?s.pathname.includes(a.pathname)&&e(this,o).classList.add("current"):a.pathname===s.pathname||(g=e(this,P))!=null&&g.includes(s.pathname)?(e(this,o).classList.add("current"),e(this,o).classList.add("clicked")):e(this,o).classList.remove("clicked"),e(this,o).hasAttribute("data-prefetch")&&e(this,o).addEventListener("pointerenter",e(this,A))}destroy(){e(this,o).removeEventListener("click",e(this,C)),e(this,o).removeEventListener("pointerenter",e(this,A)),e(this,o).classList.remove("current")}}w=new WeakMap,o=new WeakMap,p=new WeakMap,k=new WeakMap,P=new WeakMap,C=new WeakMap,A=new WeakMap;var M,S,z,q,H,j,y,L,b,x,D,R,V,F,X,I,Z,K,ot,O,$,Y;class ft{constructor(t){r(this,R);r(this,F);r(this,I);r(this,K);r(this,O);r(this,M,null);r(this,S,null);r(this,z,null);r(this,q,null);r(this,H,[]);r(this,j,new DOMParser);r(this,y,new Map);r(this,L,void 0);r(this,b,null);r(this,x,new ht.Notifier);r(this,D,new ht.Notifier);r(this,Y,t=>{t.state&&this.navigate(t.state,"none")});dt.isBrowser&&(t!=null&&t.base?c(this,M,U.normalizeBase(t.base)):c(this,M,"/"),c(this,S,(t==null?void 0:t.waitForHeadToLoad)!==!1),c(this,z,(t==null?void 0:t.cachePages)!==!1),c(this,q,f(this,I,Z).call(this,document.body)),c(this,b,this.normalizePath(location.pathname).pathname),document.documentElement.setAttribute("data-current-pathname",e(this,b)),f(this,F,X).call(this),addEventListener("popstate",e(this,Y)))}get currentPathname(){return e(this,b)}get links(){return e(this,H)}normalizePath(t){return U.splitPath(t,e(this,M))}beforeNavigationEvent(t){return e(this,x).subscribe(t)}afterNavigationEvent(t){return e(this,D).subscribe(t)}prefetch(t){return T(this,null,function*(){const i=this.normalizePath(t);return f(this,R,V).call(this,i.pathname)})}navigate(t,i="push"){return T(this,null,function*(){var u;const a=this.normalizePath(t);let{pathname:s,hash:l,parameters:g}=a;if(e(this,L)===s||e(this,b)===s)return;c(this,L,s);const d=e(this,y).has(s);try{let m=!0;if(e(this,x).notify({pathname:s,isCached:d}),this.preprocessor)try{yield new Promise((h,E)=>{var v;(v=this.preprocessor)==null||v.call(this,{pathname:s,resolve:h,reject:E,isCached:d})})}catch(h){h?console.error(h):console.log("Route change canceled"),m=!1}if(!m||e(this,L)!==s)return;const tt=e(this,y).get(s)||(yield f(this,R,V).call(this,s));if(e(this,L)!==s)return;const et=Array.from(document.head.children),it=Array.from(tt.head.cloneNode(!0).children),st=f(this,K,ot).call(this,et,it),ct=f(this,O,$).call(this,et,st),B=f(this,O,$).call(this,it,st);B.forEach((h,E)=>{if(h.tagName==="SCRIPT"&&h.getAttribute("src")){const v=document.createElement("script");v.type="module",v.src=h.getAttribute("src"),B[E]=v}}),B.forEach(h=>{document.head.appendChild(h)});const _=B.filter(h=>h.tagName==="STYLE"||h.tagName==="SCRIPT"||h.tagName==="LINK");e(this,S)&&_.length&&(yield new Promise(h=>T(this,null,function*(){let E=0;try{for(var v=at(_),ut,G,W;ut=!(G=yield v.next()).done;ut=!1){const N=G.value;N.onload=()=>{E++,E===_.length&&h()}}}catch(G){W=[G]}finally{try{ut&&(G=v.return)&&(yield G.call(v))}finally{if(W)throw W[0]}}}))),ct.forEach(h=>{h.hasAttribute("data-permanent")||h.remove()}),c(this,b,s),U.changeHistory(i,s,g,l);const lt=f(this,I,Z).call(this,tt.body.cloneNode(!0));e(this,q).forEach((h,E)=>{const v=lt[E];let ut=[...h.childNodes],G=[...v.childNodes];ut.forEach(W=>{if(W instanceof HTMLElement){const N=W.getAttribute("data-remain");let nt;G=G.filter(J=>J instanceof HTMLElement&&N&&J.getAttribute("data-remain")===N?(nt=J,!1):!0),N&&nt||W.remove()}else W.remove()}),h.append(...G)}),f(this,F,X).call(this),document.documentElement.setAttribute("data-current-pathname",s),(u=this.postprocessor)==null||u.call(this,{pathname:s,isCached:d}),e(this,D).notify({pathname:s,isCached:d})}catch(m){console.error(m)}c(this,L,void 0)})}}M=new WeakMap,S=new WeakMap,z=new WeakMap,q=new WeakMap,H=new WeakMap,j=new WeakMap,y=new WeakMap,L=new WeakMap,b=new WeakMap,x=new WeakMap,D=new WeakMap,R=new WeakSet,V=function(t){return T(this,null,function*(){const i=e(this,y).get(t);if(i)return i;const s=yield(yield fetch(t)).text(),l=e(this,j).parseFromString(s,"text/html");return e(this,z)&&e(this,y).set(t,l),l})},F=new WeakSet,X=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(i=>{var a;return(a=i.getAttribute("href"))==null?void 0:a.startsWith("/")});e(this,H).forEach(i=>i.destroy()),c(this,H,t.map(i=>new mt(i,this)))},I=new WeakSet,Z=function(t){return[...t.querySelectorAll("[data-morph]")]},K=new WeakSet,ot=function(t,i){return t.filter(a=>i.find(s=>s.outerHTML===a.outerHTML))},O=new WeakSet,$=function(t,i){return t.filter(a=>!i.find(s=>s.outerHTML===a.outerHTML))},Y=new WeakMap;exports.Morph=ft;
|
package/lib/morph/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Morph, type MorphPostprocessor, type MorphNavigationCallback, type MorphPreprocessor, type MorphPreprocessorEntry, type MorphNavigationEntry, type MorphParameters,
|
|
1
|
+
export { Morph, type MorphPostprocessor, type MorphNavigationCallback, type MorphPreprocessor, type MorphPreprocessorEntry, type MorphNavigationEntry, type MorphParameters, } from './Morph';
|
package/lib/morph/index.js
CHANGED
|
@@ -1,233 +1,225 @@
|
|
|
1
|
-
var
|
|
2
|
-
var U = (
|
|
3
|
-
if (!t.has(
|
|
4
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var nt = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n);
|
|
2
|
+
var U = (n, t, i) => {
|
|
3
|
+
if (!t.has(n))
|
|
4
|
+
throw TypeError("Cannot " + i);
|
|
5
5
|
};
|
|
6
|
-
var e = (
|
|
7
|
-
if (t.has(
|
|
6
|
+
var e = (n, t, i) => (U(n, t, "read from private field"), i ? i.call(n) : t.get(n)), r = (n, t, i) => {
|
|
7
|
+
if (t.has(n))
|
|
8
8
|
throw TypeError("Cannot add the same private member more than once");
|
|
9
|
-
t instanceof WeakSet ? t.add(
|
|
10
|
-
},
|
|
11
|
-
var
|
|
12
|
-
var T = (
|
|
13
|
-
var
|
|
9
|
+
t instanceof WeakSet ? t.add(n) : t.set(n, i);
|
|
10
|
+
}, c = (n, t, i, a) => (U(n, t, "write to private field"), a ? a.call(n, i) : t.set(n, i), i);
|
|
11
|
+
var f = (n, t, i) => (U(n, t, "access private method"), i);
|
|
12
|
+
var T = (n, t, i) => new Promise((a, s) => {
|
|
13
|
+
var l = (u) => {
|
|
14
14
|
try {
|
|
15
|
-
|
|
15
|
+
d(i.next(u));
|
|
16
16
|
} catch (m) {
|
|
17
|
-
|
|
17
|
+
s(m);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, g = (u) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
21
|
+
d(i.throw(u));
|
|
22
22
|
} catch (m) {
|
|
23
|
-
|
|
23
|
+
s(m);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
|
|
25
|
+
}, d = (u) => u.done ? a(u.value) : Promise.resolve(u.value).then(l, g);
|
|
26
|
+
d((i = i.apply(n, t)).next());
|
|
27
27
|
});
|
|
28
|
-
var
|
|
29
|
-
import { Notifier as
|
|
30
|
-
import { i as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
var rt = (n, t, i) => (t = n[nt("asyncIterator")]) ? t.call(n) : (n = n[nt("iterator")](), t = {}, i = (a, s) => (s = n[a]) && (t[a] = (l) => new Promise((g, d, u) => (l = s.call(n, l), u = l.done, Promise.resolve(l.value).then((m) => g({ value: m, done: u }), d)))), i("next"), i("return"), t);
|
|
29
|
+
import { Notifier as at } from "../notifier/index.js";
|
|
30
|
+
import { i as ut } from "../browser-0zX67oeU.js";
|
|
31
|
+
import { n as dt, s as mt, c as ft } from "../url-DMNfW7uN.js";
|
|
32
|
+
var w, o, p, k, P, C, A;
|
|
33
|
+
class pt {
|
|
34
|
+
constructor(t, i) {
|
|
35
|
+
r(this, w, void 0);
|
|
36
|
+
r(this, o, void 0);
|
|
37
|
+
r(this, p, void 0);
|
|
38
|
+
r(this, k, void 0);
|
|
39
|
+
r(this, P, void 0);
|
|
40
|
+
r(this, C, (t) => {
|
|
41
|
+
t.preventDefault(), e(this, w).links.forEach((i) => {
|
|
42
|
+
var a;
|
|
43
|
+
e(this, p) === e(i, p) || (a = e(i, P)) != null && a.includes(e(this, p)) ? e(i, o).classList.add("clicked") : e(i, o).classList.remove("clicked");
|
|
44
|
+
}), e(this, w).navigate(e(this, p), e(this, k));
|
|
44
45
|
});
|
|
45
|
-
|
|
46
|
-
e(this,
|
|
46
|
+
r(this, A, () => {
|
|
47
|
+
e(this, w).prefetch(e(this, p)), e(this, o).removeEventListener("pointerenter", e(this, A));
|
|
47
48
|
});
|
|
48
|
-
var
|
|
49
|
-
|
|
49
|
+
var l, g;
|
|
50
|
+
c(this, w, i), c(this, o, t), c(this, p, e(this, o).getAttribute("href") || "/"), c(this, k, e(this, o).getAttribute(
|
|
50
51
|
"data-history-action"
|
|
51
52
|
) || "push"), e(this, o).addEventListener("click", e(this, C));
|
|
52
|
-
const
|
|
53
|
-
|
|
53
|
+
const a = i.normalizePath(e(this, p)), s = i.normalizePath(location.pathname);
|
|
54
|
+
c(this, P, (l = e(this, o).getAttribute("data-match-paths")) == null ? void 0 : l.split(",").map((d) => i.normalizePath(d.trim()).pathname)), e(this, o).hasAttribute("data-include") ? s.pathname.includes(a.pathname) && e(this, o).classList.add("current") : a.pathname === s.pathname || (g = e(this, P)) != null && g.includes(s.pathname) ? (e(this, o).classList.add("current"), e(this, o).classList.add("clicked")) : e(this, o).classList.remove("clicked"), e(this, o).hasAttribute("data-prefetch") && e(this, o).addEventListener("pointerenter", e(this, A));
|
|
54
55
|
}
|
|
55
56
|
destroy() {
|
|
56
|
-
e(this, o).removeEventListener("click", e(this, C)), e(this, o).removeEventListener("pointerenter", e(this,
|
|
57
|
+
e(this, o).removeEventListener("click", e(this, C)), e(this, o).removeEventListener("pointerenter", e(this, A)), e(this, o).classList.remove("current");
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
-
var
|
|
60
|
+
w = new WeakMap(), o = new WeakMap(), p = new WeakMap(), k = new WeakMap(), P = new WeakMap(), C = new WeakMap(), A = new WeakMap();
|
|
61
|
+
var H, S, z, x, M, K, y, v, b, D, R, F, V, I, X, q, Z, Y, ht, B, _, j;
|
|
61
62
|
class bt {
|
|
62
63
|
constructor(t) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
64
|
+
r(this, F);
|
|
65
|
+
r(this, I);
|
|
66
|
+
r(this, q);
|
|
67
|
+
r(this, Y);
|
|
68
|
+
r(this, B);
|
|
69
|
+
r(this, H, null);
|
|
70
|
+
r(this, S, null);
|
|
71
|
+
r(this, z, null);
|
|
72
|
+
r(this, x, null);
|
|
73
|
+
r(this, M, []);
|
|
74
|
+
r(this, K, new DOMParser());
|
|
75
|
+
r(this, y, /* @__PURE__ */ new Map());
|
|
76
|
+
r(this, v, void 0);
|
|
77
|
+
r(this, b, null);
|
|
78
|
+
r(this, D, new at());
|
|
79
|
+
r(this, R, new at());
|
|
80
|
+
r(this, j, (t) => {
|
|
80
81
|
t.state && this.navigate(t.state, "none");
|
|
81
82
|
});
|
|
82
|
-
|
|
83
|
+
ut && (t != null && t.base ? c(this, H, dt(t.base)) : c(this, H, "/"), c(this, S, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, z, (t == null ? void 0 : t.cachePages) !== !1), c(this, x, f(this, q, Z).call(this, document.body)), c(this, b, this.normalizePath(location.pathname).pathname), document.documentElement.setAttribute(
|
|
83
84
|
"data-current-pathname",
|
|
84
|
-
e(this,
|
|
85
|
-
),
|
|
85
|
+
e(this, b)
|
|
86
|
+
), f(this, I, X).call(this), addEventListener("popstate", e(this, j)));
|
|
86
87
|
}
|
|
87
88
|
get currentPathname() {
|
|
88
|
-
return e(this,
|
|
89
|
+
return e(this, b);
|
|
89
90
|
}
|
|
90
91
|
get links() {
|
|
91
|
-
return e(this,
|
|
92
|
+
return e(this, M);
|
|
92
93
|
}
|
|
93
94
|
normalizePath(t) {
|
|
94
|
-
t
|
|
95
|
-
const s = t.split("#"), n = s[0].split("?"), i = n[0].endsWith("/") ? n[0].slice(0, -1) : n[0], c = e(this, E) + i, f = n == null ? void 0 : n[1], u = s == null ? void 0 : s[1];
|
|
96
|
-
return {
|
|
97
|
-
leaf: i,
|
|
98
|
-
pathname: c,
|
|
99
|
-
parameters: f,
|
|
100
|
-
hash: u
|
|
101
|
-
};
|
|
95
|
+
return mt(t, e(this, H));
|
|
102
96
|
}
|
|
103
97
|
beforeNavigationEvent(t) {
|
|
104
|
-
return e(this,
|
|
98
|
+
return e(this, D).subscribe(t);
|
|
105
99
|
}
|
|
106
100
|
afterNavigationEvent(t) {
|
|
107
|
-
return e(this,
|
|
101
|
+
return e(this, R).subscribe(t);
|
|
108
102
|
}
|
|
109
103
|
prefetch(t) {
|
|
110
104
|
return T(this, null, function* () {
|
|
111
|
-
const
|
|
112
|
-
return
|
|
105
|
+
const i = this.normalizePath(t);
|
|
106
|
+
return f(this, F, V).call(this, i.pathname);
|
|
113
107
|
});
|
|
114
108
|
}
|
|
115
|
-
navigate(t,
|
|
109
|
+
navigate(t, i = "push") {
|
|
116
110
|
return T(this, null, function* () {
|
|
117
|
-
var
|
|
118
|
-
const
|
|
119
|
-
let { pathname:
|
|
120
|
-
if (e(this,
|
|
111
|
+
var u;
|
|
112
|
+
const a = this.normalizePath(t);
|
|
113
|
+
let { pathname: s, hash: l, parameters: g } = a;
|
|
114
|
+
if (e(this, v) === s || e(this, b) === s)
|
|
121
115
|
return;
|
|
122
|
-
|
|
123
|
-
const
|
|
116
|
+
c(this, v, s);
|
|
117
|
+
const d = e(this, y).has(s);
|
|
124
118
|
try {
|
|
125
119
|
let m = !0;
|
|
126
|
-
if (e(this,
|
|
127
|
-
pathname:
|
|
128
|
-
isCached:
|
|
120
|
+
if (e(this, D).notify({
|
|
121
|
+
pathname: s,
|
|
122
|
+
isCached: d
|
|
129
123
|
}), this.preprocessor)
|
|
130
124
|
try {
|
|
131
|
-
yield new Promise((h,
|
|
132
|
-
var
|
|
133
|
-
(
|
|
125
|
+
yield new Promise((h, E) => {
|
|
126
|
+
var L;
|
|
127
|
+
(L = this.preprocessor) == null || L.call(this, { pathname: s, resolve: h, reject: E, isCached: d });
|
|
134
128
|
});
|
|
135
129
|
} catch (h) {
|
|
136
130
|
h ? console.error(h) : console.log("Route change canceled"), m = !1;
|
|
137
131
|
}
|
|
138
|
-
if (!m || e(this,
|
|
132
|
+
if (!m || e(this, v) !== s)
|
|
139
133
|
return;
|
|
140
|
-
const
|
|
141
|
-
if (e(this,
|
|
134
|
+
const $ = e(this, y).get(s) || (yield f(this, F, V).call(this, s));
|
|
135
|
+
if (e(this, v) !== s)
|
|
142
136
|
return;
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
), it =
|
|
146
|
-
|
|
137
|
+
const tt = Array.from(document.head.children), et = Array.from(
|
|
138
|
+
$.head.cloneNode(!0).children
|
|
139
|
+
), it = f(this, Y, ht).call(this, tt, et), ot = f(this, B, _).call(this, tt, it), O = f(this, B, _).call(this, et, it);
|
|
140
|
+
O.forEach((h, E) => {
|
|
147
141
|
if (h.tagName === "SCRIPT" && h.getAttribute("src")) {
|
|
148
|
-
const
|
|
149
|
-
|
|
142
|
+
const L = document.createElement("script");
|
|
143
|
+
L.type = "module", L.src = h.getAttribute("src"), O[E] = L;
|
|
150
144
|
}
|
|
151
|
-
}),
|
|
145
|
+
}), O.forEach((h) => {
|
|
152
146
|
document.head.appendChild(h);
|
|
153
147
|
});
|
|
154
|
-
const G =
|
|
148
|
+
const G = O.filter(
|
|
155
149
|
(h) => h.tagName === "STYLE" || h.tagName === "SCRIPT" || h.tagName === "LINK"
|
|
156
150
|
);
|
|
157
151
|
e(this, S) && G.length && (yield new Promise((h) => T(this, null, function* () {
|
|
158
|
-
let
|
|
152
|
+
let E = 0;
|
|
159
153
|
try {
|
|
160
|
-
for (var
|
|
154
|
+
for (var L = rt(G), lt, J, W; lt = !(J = yield L.next()).done; lt = !1) {
|
|
161
155
|
const N = J.value;
|
|
162
156
|
N.onload = () => {
|
|
163
|
-
|
|
157
|
+
E++, E === G.length && h();
|
|
164
158
|
};
|
|
165
159
|
}
|
|
166
160
|
} catch (J) {
|
|
167
|
-
|
|
161
|
+
W = [J];
|
|
168
162
|
} finally {
|
|
169
163
|
try {
|
|
170
|
-
|
|
164
|
+
lt && (J = L.return) && (yield J.call(L));
|
|
171
165
|
} finally {
|
|
172
|
-
if (
|
|
173
|
-
throw
|
|
166
|
+
if (W)
|
|
167
|
+
throw W[0];
|
|
174
168
|
}
|
|
175
169
|
}
|
|
176
|
-
}))),
|
|
170
|
+
}))), ot.forEach((h) => {
|
|
177
171
|
h.hasAttribute("data-permanent") || h.remove();
|
|
178
|
-
}),
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const N = B.getAttribute("data-remain");
|
|
188
|
-
let rt;
|
|
172
|
+
}), c(this, b, s), ft(i, s, g, l);
|
|
173
|
+
const ct = f(this, q, Z).call(this, $.body.cloneNode(!0));
|
|
174
|
+
e(this, x).forEach((h, E) => {
|
|
175
|
+
const L = ct[E];
|
|
176
|
+
let lt = [...h.childNodes], J = [...L.childNodes];
|
|
177
|
+
lt.forEach((W) => {
|
|
178
|
+
if (W instanceof HTMLElement) {
|
|
179
|
+
const N = W.getAttribute("data-remain");
|
|
180
|
+
let st;
|
|
189
181
|
J = J.filter(
|
|
190
|
-
(Q) => Q instanceof HTMLElement && N && Q.getAttribute("data-remain") === N ? (
|
|
191
|
-
), N &&
|
|
182
|
+
(Q) => Q instanceof HTMLElement && N && Q.getAttribute("data-remain") === N ? (st = Q, !1) : !0
|
|
183
|
+
), N && st || W.remove();
|
|
192
184
|
} else
|
|
193
|
-
|
|
185
|
+
W.remove();
|
|
194
186
|
}), h.append(...J);
|
|
195
|
-
}),
|
|
187
|
+
}), f(this, I, X).call(this), document.documentElement.setAttribute("data-current-pathname", s), (u = this.postprocessor) == null || u.call(this, { pathname: s, isCached: d }), e(this, R).notify({ pathname: s, isCached: d });
|
|
196
188
|
} catch (m) {
|
|
197
189
|
console.error(m);
|
|
198
190
|
}
|
|
199
|
-
|
|
191
|
+
c(this, v, void 0);
|
|
200
192
|
});
|
|
201
193
|
}
|
|
202
194
|
}
|
|
203
|
-
|
|
195
|
+
H = new WeakMap(), S = new WeakMap(), z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), K = new WeakMap(), y = new WeakMap(), v = new WeakMap(), b = new WeakMap(), D = new WeakMap(), R = new WeakMap(), F = new WeakSet(), V = function(t) {
|
|
204
196
|
return T(this, null, function* () {
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
return
|
|
208
|
-
const
|
|
209
|
-
return e(this, z) && e(this,
|
|
197
|
+
const i = e(this, y).get(t);
|
|
198
|
+
if (i)
|
|
199
|
+
return i;
|
|
200
|
+
const s = yield (yield fetch(t)).text(), l = e(this, K).parseFromString(s, "text/html");
|
|
201
|
+
return e(this, z) && e(this, y).set(t, l), l;
|
|
210
202
|
});
|
|
211
|
-
},
|
|
203
|
+
}, I = new WeakSet(), X = function() {
|
|
212
204
|
const t = [
|
|
213
205
|
...document.documentElement.querySelectorAll("a")
|
|
214
|
-
].filter((
|
|
215
|
-
var
|
|
216
|
-
return (
|
|
206
|
+
].filter((i) => {
|
|
207
|
+
var a;
|
|
208
|
+
return (a = i.getAttribute("href")) == null ? void 0 : a.startsWith("/");
|
|
217
209
|
});
|
|
218
|
-
e(this,
|
|
219
|
-
},
|
|
210
|
+
e(this, M).forEach((i) => i.destroy()), c(this, M, t.map((i) => new pt(i, this)));
|
|
211
|
+
}, q = new WeakSet(), Z = function(t) {
|
|
220
212
|
return [...t.querySelectorAll("[data-morph]")];
|
|
221
|
-
}, Y = new WeakSet(),
|
|
213
|
+
}, Y = new WeakSet(), ht = function(t, i) {
|
|
222
214
|
return t.filter(
|
|
223
|
-
(
|
|
224
|
-
(
|
|
215
|
+
(a) => i.find(
|
|
216
|
+
(s) => s.outerHTML === a.outerHTML
|
|
225
217
|
)
|
|
226
218
|
);
|
|
227
|
-
},
|
|
219
|
+
}, B = new WeakSet(), _ = function(t, i) {
|
|
228
220
|
return t.filter(
|
|
229
|
-
(
|
|
230
|
-
(
|
|
221
|
+
(a) => !i.find(
|
|
222
|
+
(s) => s.outerHTML === a.outerHTML
|
|
231
223
|
)
|
|
232
224
|
);
|
|
233
225
|
}, j = new WeakMap();
|
package/lib/notifier/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export declare class Notifier<Callback extends
|
|
1
|
+
export type NotifierCallback = (...args: any[]) => void;
|
|
2
|
+
export declare class Notifier<Callback extends NotifierCallback = NotifierCallback> {
|
|
3
3
|
#private;
|
|
4
4
|
close(): void;
|
|
5
5
|
subscribe(callback: Callback, order?: number): () => void;
|
package/lib/notifier/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./globals-bYKki-b9.cjs");function o(n){e.currentComponentElement.value.addConnectCallback(n)}exports.onConnect=o;
|
package/lib/pointer/Pointer.d.ts
CHANGED
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(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)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(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)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-6s0YXK4o.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-loFiBsBy.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),x=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),b=(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)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),e.set(i,s),s),h,S,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),b(this,h,void 0),b(this,S,new x.CSSProperty(this,"--damping",20)),b(this,g,new x.CSSProperty(this,"--mass",0)),b(this,z,new x.CSSProperty(this,"--stiffness",0)),b(this,W,new x.CSSProperty(this,"--cartesian",!1)),b(this,R,new x.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,S).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,S).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,S).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;S=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
|
package/lib/pointer/index.js
CHANGED
|
@@ -18,12 +18,12 @@ var s = (e, t, i) => (T(e, t, "read from private field"), i ? i.call(e) : t.get(
|
|
|
18
18
|
throw TypeError("Cannot add the same private member more than once");
|
|
19
19
|
t instanceof WeakSet ? t.add(e) : t.set(e, i);
|
|
20
20
|
}, p = (e, t, i, o) => (T(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
|
|
21
|
-
import "../Store-
|
|
21
|
+
import "../Store-BI2xxXOA.js";
|
|
22
22
|
import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
|
|
23
23
|
import { g as U } from "../dom-0S_WDL4g.js";
|
|
24
24
|
import { c as A } from "../math-BOBiC4TN.js";
|
|
25
25
|
import "../ticker/index.js";
|
|
26
|
-
import { D as W } from "../Damped-
|
|
26
|
+
import { D as W } from "../Damped-Mx_FNNVz.js";
|
|
27
27
|
import { elementResizer as B } from "../element-resizer/index.js";
|
|
28
28
|
import { windowResizer as G } from "../window-resizer/index.js";
|
|
29
29
|
import { CustomElement as V, define as X } from "../custom-element/index.js";
|
|
@@ -119,7 +119,7 @@ var Z = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, j = (e, t, i
|
|
|
119
119
|
if (t.has(e))
|
|
120
120
|
throw TypeError("Cannot add the same private member more than once");
|
|
121
121
|
t instanceof WeakSet ? t.add(e) : t.set(e, i);
|
|
122
|
-
}, tt = (e, t, i, o) => (q(e, t, "write to private field"),
|
|
122
|
+
}, tt = (e, t, i, o) => (q(e, t, "write to private field"), t.set(e, i), i), h, z, P, _, M, k;
|
|
123
123
|
let H = class extends V {
|
|
124
124
|
constructor() {
|
|
125
125
|
super(), w(this, h, void 0), w(this, z, new x(this, "--damping", 20)), w(this, P, new x(this, "--mass", 0)), w(this, _, new x(this, "--stiffness", 0)), w(this, M, new x(this, "--cartesian", !1)), w(this, k, new x(this, "--normalize", !1)), tt(this, h, new Y({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10];function o(e,n=5){return Math.round(e*i[n])/i[n]}function u(e,n){return Math.round(e/n)*n}function c(e,n){var r;const t=((r=n.toString().split(".")[1])==null?void 0:r.length)||0;return t?+e.toFixed(t):Math.ceil(e)}function s(e,n){return typeof e=="undefined"?n:e}exports.nullishCoalescing=s;exports.preciseNumber=o;exports.roundNumberTo=u;exports.toStep=c;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const i = [
|
|
2
|
+
1,
|
|
3
|
+
10,
|
|
4
|
+
100,
|
|
5
|
+
1e3,
|
|
6
|
+
1e4,
|
|
7
|
+
1e5,
|
|
8
|
+
1e6,
|
|
9
|
+
1e7,
|
|
10
|
+
1e8,
|
|
11
|
+
1e9,
|
|
12
|
+
1e10
|
|
13
|
+
];
|
|
14
|
+
function o(e, n = 5) {
|
|
15
|
+
return Math.round(e * i[n]) / i[n];
|
|
16
|
+
}
|
|
17
|
+
function u(e, n) {
|
|
18
|
+
return Math.round(e / n) * n;
|
|
19
|
+
}
|
|
20
|
+
function s(e, n) {
|
|
21
|
+
var r;
|
|
22
|
+
const t = ((r = n.toString().split(".")[1]) == null ? void 0 : r.length) || 0;
|
|
23
|
+
return t ? +e.toFixed(t) : Math.ceil(e);
|
|
24
|
+
}
|
|
25
|
+
function c(e, n) {
|
|
26
|
+
return typeof e == "undefined" ? n : e;
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
c as n,
|
|
30
|
+
o as p,
|
|
31
|
+
u as r,
|
|
32
|
+
s as t
|
|
33
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PopoverElement } from './PopoverElement';
|
|
2
1
|
import { CustomElement } from '../custom-element';
|
|
2
|
+
import { PopoverElement } from './PopoverElement';
|
|
3
3
|
|
|
4
4
|
export type PopoverButtonType = 'open' | 'close' | 'toggle';
|
|
5
5
|
export declare class PopoverButtonElement extends CustomElement {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Store } from '../store';
|
|
2
|
-
import { CustomElement } from '../custom-element';
|
|
3
1
|
import { Attribute } from '../attribute';
|
|
2
|
+
import { CustomElement } from '../custom-element';
|
|
3
|
+
import { Store } from '../store';
|
|
4
4
|
|
|
5
5
|
export declare class PopoverElement extends CustomElement {
|
|
6
6
|
#private;
|