aptechka 0.5.44 → 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 +3 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +140 -104
- package/lib/animation/Animation.d.ts +10 -18
- package/lib/animation/Damped.d.ts +3 -5
- package/lib/animation/Tweened.d.ts +0 -2
- 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 +31 -31
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +3 -3
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +3 -3
- 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/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 +1 -0
- package/lib/css-property/index.js +36 -32
- 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/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 +5 -1
- 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 -213
- package/lib/en3/index.d.ts +1 -19
- package/lib/en3/index.js +4 -3305
- package/lib/en3/libs/index.d.ts +1 -0
- package/lib/en3/loaders/{en3GLTFLoader.d.ts → _En3GLTFLoader.d.ts} +2 -4
- 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/En3GLTF.d.ts +2 -1
- package/lib/en3/objects/En3ImageLike.d.ts +2 -1
- package/lib/en3/objects/En3SourceConsumer.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/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-BN9X-l9M.js → index-BAH_fO2N.js} +3 -3
- package/lib/{index-BbgmbQ-5.cjs → index-D1LQUR-R.cjs} +1 -1
- 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 +9 -0
- 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 +7 -7
- 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/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/polyfills-CM4SCDTt.cjs +1 -0
- package/lib/polyfills-X6KXuHg-.js +33 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- 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 +2 -19
- package/lib/scroll/ScrollSection.d.ts +23 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +81 -77
- 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.js +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 +1 -1
- package/lib/tweaker/TweakerColorManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerFolderElement.d.ts +2 -0
- package/lib/tweaker/TweakerLinkManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerNumberManagerElement.d.ts +4 -8
- package/lib/tweaker/TweakerSelectManagerElement.d.ts +1 -1
- 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/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +39 -34
- 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 +1 -1
- package/package.json +107 -3
- package/lib/Animation-DDHjrbtL.cjs +0 -1
- package/lib/Animation-Dq_05jlR.js +0 -217
- package/lib/DRACOLoader-C2CFpMGS.cjs +0 -2
- package/lib/DRACOLoader-D2KY2dku.js +0 -241
- package/lib/Damped-l0mnlhar.cjs +0 -1
- package/lib/KTX2Loader-DdUl1XiY.cjs +0 -2
- package/lib/KTX2Loader-DqpAffDj.js +0 -536
- 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/en3TextureLoader.d.ts +0 -3
- package/lib/en3/test/En3HTML.d.ts +0 -10
- package/lib/polyfills-BA-CL_HF.js +0 -27
- package/lib/polyfills-DHs2SNbz.cjs +0 -1
- 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/{MeshoptDecoder-CMeN3oU0.cjs → en3/libs/index.cjs} +0 -0
- /package/lib/{MeshoptDecoder-6XfTpOG2.js → en3/libs/index.js} +0 -0
- /package/lib/en3/{test → misc}/En3ModifiedMaterial.d.ts +0 -0
- /package/lib/en3/{attachments → misc}/En3SourceManager.d.ts +0 -0
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/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";
|
|
@@ -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
|
+
};
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../attribute/index.cjs"),W=require("../custom-element/index.cjs"),D=require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../attribute/index.cjs"),W=require("../custom-element/index.cjs"),D=require("../Store-6s0YXK4o.cjs"),I=require("../style-At6aDoqG.cjs"),N=require("../browser-CpzFX2xg.cjs"),G=require("../tags-ld5jemJw.cjs");var H=Object.defineProperty,R=Object.getOwnPropertyDescriptor,K=(s,e,t,o)=>{for(var a=o>1?void 0:o?R(e,t):e,c=s.length-1,d;c>=0;c--)(d=s[c])&&(a=(o?d(e,t,a):d(a))||a);return o&&a&&H(e,t,a),a},b=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)},i=(s,e,t)=>(b(s,e,"read from private field"),t?t.call(s):e.get(s)),h=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},S=(s,e,t,o)=>(b(s,e,"write to private field"),e.set(s,t),t),A=(s,e,t)=>(b(s,e,"access private method"),t),T,p,g,l,v,f,O,x,u,m,w,y,L,$,E;exports.PopoverElement=class extends W.CustomElement{constructor(){super(...arguments),h(this,O),h(this,u),h(this,L),h(this,T,-1),h(this,p,new D.Store(!1)),h(this,g,void 0),h(this,l,new q.Attribute(this,"history",!1)),h(this,v,new q.Attribute(this,"single",!1)),h(this,f,!1),this.open=(e=!0)=>{if(i(this,p).current)return;i(this,p).current=!0,i(this,v).current&&(exports.PopoverElement.__opened.forEach(o=>o.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),S(this,T,exports.PopoverElement.__opened.length-1),i(this,l).current&&i(this,f)&&history.pushState("","",i(this,O,x)),clearTimeout(i(this,g)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const t=()=>{addEventListener("click",i(this,w)),addEventListener("keydown",i(this,y)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};e?setTimeout(t):t()},this.close=()=>{if(i(this,p).current){if(i(this,p).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),i(this,l).current){const e=new URL(location.href);e.searchParams.delete(i(this,u,m)),history.replaceState(null,"",e.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",i(this,w)),removeEventListener("keydown",i(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},I.getElementTransitionDurationMS(this))}},h(this,w,e=>{A(this,L,$).call(this,()=>{const t=e.composedPath();!t.find(o=>o===this)&&!t.find(o=>o instanceof HTMLElement&&o.closest("e-popover-button"))&&t[0]instanceof HTMLElement&&!t[0].closest("[data-outside]")&&this.close()})}),h(this,y,e=>{A(this,L,$).call(this,()=>{e.code==="Escape"&&this.close()})}),h(this,E,()=>{S(this,f,!1),i(this,p).current&&i(this,l).current&&!location.search.includes(i(this,u,m))?this.close():!i(this,p).current&&i(this,l).current&&location.search.includes(i(this,u,m))&&this.open(),S(this,f,!0)})}get history(){return i(this,l)}get single(){return i(this,v)}get opened(){return i(this,p)}connectedCallback(){i(this,l).observe(),i(this,v).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",i(this,E)),setTimeout(()=>{i(this,E).call(this)},0)}disconnectedCallback(){i(this,l).unobserve(),i(this,v).unobserve(),exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),clearTimeout(i(this,g)),removeEventListener("popstate",i(this,E))}};T=new WeakMap;p=new WeakMap;g=new WeakMap;l=new WeakMap;v=new WeakMap;f=new WeakMap;O=new WeakSet;x=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${i(this,u,m)}`};u=new WeakSet;m=function(){return`modal-${this.id}`};w=new WeakMap;y=new WeakMap;L=new WeakSet;$=function(s){(exports.PopoverElement.__opened[i(this,T)-1]||exports.PopoverElement.__opened.length===1)&&s()};E=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=K([W.define("e-popover")],exports.PopoverElement);var U=Object.defineProperty,z=Object.getOwnPropertyDescriptor,F=(s,e,t,o)=>{for(var a=o>1?void 0:o?z(e,t):e,c=s.length-1,d;c>=0;c--)(d=s[c])&&(a=(o?d(e,t,a):d(a))||a);return o&&a&&U(e,t,a),a},B=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)},r=(s,e,t)=>(B(s,e,"read from private field"),t?t.call(s):e.get(s)),_=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},J=(s,e,t,o)=>(B(s,e,"write to private field"),e.set(s,t),t),n,P,C,k,M;exports.PopoverButtonElement=class extends W.CustomElement{constructor(){super(),_(this,n,void 0),_(this,P,()=>{this.classList.add("triggered")}),_(this,C,()=>{this.classList.add("opened")}),_(this,k,()=>{this.classList.remove("opened")}),_(this,M,()=>{this.classList.remove("triggered")}),N.isBrowser&&G.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(r(this,n)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!r(this,n).opened.current?r(this,n).open():(e==="close"||e==="toggle"&&r(this,n).opened.current)&&r(this,n).close()}},onKeydown:e=>{e.code==="Space"&&e.currentTarget.click()}})}get popoverElement(){return r(this,n)}connectedCallback(){const e=this.getAttribute("target");if(e){const t=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`);t?(J(this,n,t),r(this,n).addEventListener("popoverTriggered",r(this,P)),r(this,n).addEventListener("popoverOpened",r(this,C)),r(this,n).addEventListener("popoverClosing",r(this,k)),r(this,n).addEventListener("popoverClosed",r(this,M))):console.warn(this,`target ${e} not found`)}}disconnectedCallback(){r(this,n)&&(r(this,n).removeEventListener("popoverTriggered",r(this,P)),r(this,n).removeEventListener("popoverOpened",r(this,C)),r(this,n).removeEventListener("popoverClosing",r(this,k)),r(this,n).removeEventListener("popoverClosed",r(this,M)))}};n=new WeakMap;P=new WeakMap;C=new WeakMap;k=new WeakMap;M=new WeakMap;exports.PopoverButtonElement=F([W.define("e-popover-button")],exports.PopoverButtonElement);
|
package/lib/popover/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Attribute as x } from "../attribute/index.js";
|
|
2
2
|
import { CustomElement as I, define as N } from "../custom-element/index.js";
|
|
3
|
-
import { S as G } from "../Store-
|
|
3
|
+
import { S as G } from "../Store-BI2xxXOA.js";
|
|
4
4
|
import { a as H } from "../style-CklEF62D.js";
|
|
5
5
|
import { i as R } from "../browser-0zX67oeU.js";
|
|
6
|
-
import { e as K } from "../tags-
|
|
6
|
+
import { e as K } from "../tags-BqJKcIve.js";
|
|
7
7
|
var U = Object.defineProperty, z = Object.getOwnPropertyDescriptor, F = (e, t, s, p) => {
|
|
8
8
|
for (var o = p > 1 ? void 0 : p ? z(t, s) : t, l = e.length - 1, v; l >= 0; l--)
|
|
9
9
|
(v = e[l]) && (o = (p ? v(t, s, o) : v(o)) || o);
|