yamlover 0.3.52 → 0.3.53
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/bin/request-url.js +36 -0
- package/bin/yamlover.js +16 -11
- package/dist/client/assets/{decoded-DIrynyA3.js → decoded-D1-rSiME.js} +1 -1
- package/dist/client/assets/{djvu-nd21Uprr.js → djvu-Mwp4sXBt.js} +1 -1
- package/dist/client/assets/{docx-Vop1BSUJ.js → docx-CB6J14IE.js} +1 -1
- package/dist/client/assets/{heic-CsSwcPBN.js → heic-3lumWxbh.js} +1 -1
- package/dist/client/assets/{imagemap-zS65hQz-.js → imagemap-DW9oOX-E.js} +1 -1
- package/dist/client/assets/{index-DosWj0lR.js → index-BVK9vlzr.js} +131 -131
- package/dist/client/assets/{map-CWLpLgs5.js → map-Cdvi3ulU.js} +1 -1
- package/dist/client/assets/{openable-DE9jbyAc.js → openable-BgRIW6s1.js} +2 -2
- package/dist/client/assets/{paged-B9vOXGFT.js → paged-CMePxwer.js} +1 -1
- package/dist/client/assets/{pdf-BlhT_YB6.js → pdf-Dn7yQugW.js} +1 -1
- package/dist/client/assets/{psd-DqFDBsP9.js → psd-KS-xpL2T.js} +1 -1
- package/dist/client/assets/{spreadsheet-C1PFD0U5.js → spreadsheet-DReUrdn2.js} +1 -1
- package/dist/client/assets/{tiff-BhJNM15B.js → tiff-CoQYoJao.js} +1 -1
- package/dist/client/assets/{xyflow-CAiiOrwd.js → xyflow-AJHWfzJh.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,
|
|
1
|
+
import{r as i,z as B,A as C}from"./index-BVK9vlzr.js";function x(s,l,f){const c=i.useRef(B()).current,a=i.useRef(null),u=i.useRef(!1),g=i.useRef(!1),m=i.useRef(0),h=e=>{const t=s.current;return e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop},d=()=>{const e=s.current,t=l();if(!e||!t.length)return 1;const n=e.getBoundingClientRect().top+e.clientHeight*.3;for(let r=0;r<t.length;r++){const o=t[r]?.getBoundingClientRect();if(o&&n<o.bottom)return r+1}return t.length},A=e=>{const t=s.current;t&&(u.current=!0,t.scrollTop=e,setTimeout(()=>u.current=!1,120))},T=e=>{const t=l();if(!t.length)return;const n=t[Math.min(Math.max(e,1),t.length)-1];n&&A(h(n))};return i.useEffect(()=>{const e=s.current;if(!e||!f)return;let t=0;const n=()=>{t||(t=requestAnimationFrame(()=>{t=0,u.current||C(d())}))};return e.addEventListener("scroll",n,{passive:!0}),()=>{e.removeEventListener("scroll",n),t&&cancelAnimationFrame(t)}},[f]),i.useEffect(()=>{if(g.current||c<=1){g.current=!0;return}if(!f)return;const e=l(),t=e[Math.min(c,e.length)-1];if(!t)return;const n=t.getBoundingClientRect().height;T(c),n>0&&n===m.current&&(g.current=!0),m.current=n}),{captureAnchor:()=>{const e=s.current,t=l();if(!e||!t.length){a.current=null;return}const n=d(),r=t[n-1],o=r?.getBoundingClientRect().height??0;a.current=r?{page:n,fraction:o?(e.scrollTop-h(r))/o:0}:null},restoreAnchor:()=>{const e=a.current;if(!e)return;let t=0,n=-1;u.current=!0;const r=()=>{const o=s.current,p=l()[e.page-1];if(!o||!p){u.current=!1;return}o.scrollTop=h(p)+e.fraction*p.getBoundingClientRect().height,Math.abs(o.scrollTop-n)>1&&t++<8?(n=o.scrollTop,requestAnimationFrame(r)):setTimeout(()=>u.current=!1,120)};r()},scrollToPage:T,initialPage:c}}function F(s,l=14,f=!0){i.useEffect(()=>{const c=s.current;if(!c||!f)return;const a=()=>{const u=c.closest(".pane"),g=c.getBoundingClientRect().top+(u?.scrollTop??0);c.style.height=`${Math.max(360,window.innerHeight-g-l)}px`};return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[])}export{F as a,x as u};
|