sakura-preview-file 1.0.3 → 1.0.5
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/dist/index.es.js +2 -3
- package/dist/index.umd.js +1 -1
- package/index.d.ts +103 -0
- package/package.json +11 -12
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/hooks/index.d.ts +0 -5
- package/dist/types/hooks/use-file-preview-tools/index.d.ts +0 -19
- package/dist/types/hooks/use-file-state/index.d.ts +0 -5
- package/dist/types/hooks/use-mouse-event/index.d.ts +0 -7
- package/dist/types/hooks/use-namespace/index.d.ts +0 -26
- package/dist/types/hooks/use-wheel-event/index.d.ts +0 -14
- package/dist/types/index.d.ts +0 -3
- package/dist/types/preview-file/Image/Close.vue.d.ts +0 -3
- package/dist/types/preview-file/Image/Image.vue.d.ts +0 -14
- package/dist/types/preview-file/Image/ZoomIn.vue.d.ts +0 -3
- package/dist/types/preview-file/Image/ZoomOut.vue.d.ts +0 -3
- package/dist/types/preview-file/Loading/Circle.vue.d.ts +0 -8
- package/dist/types/preview-file/Loading/Cube.vue.d.ts +0 -8
- package/dist/types/preview-file/Loading/Dot.vue.d.ts +0 -9
- package/dist/types/preview-file/Loading/Progress.vue.d.ts +0 -10
- package/dist/types/preview-file/Loading/index.d.ts +0 -26
- package/dist/types/preview-file/Loading/props.d.ts +0 -40
- package/dist/types/preview-file/Pdf/Pdf.vue.d.ts +0 -37
- package/dist/types/preview-file/Pdf/use-preview-pdf.d.ts +0 -9
- package/dist/types/preview-file/Tools.vue.d.ts +0 -34
- package/dist/types/preview-file/Word/Word.vue.d.ts +0 -30
- package/dist/types/preview-file/constant.d.ts +0 -6
- package/dist/types/preview-file/event.d.ts +0 -29
- package/dist/types/preview-file/index.d.ts +0 -8
- package/dist/types/preview-file/preview-file.vue.d.ts +0 -31
- package/dist/types/preview-file/type.d.ts +0 -64
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/utils/index.d.ts +0 -23
package/dist/index.es.js
CHANGED
|
@@ -1065,12 +1065,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1065
1065
|
};
|
|
1066
1066
|
}
|
|
1067
1067
|
});
|
|
1068
|
-
|
|
1069
|
-
PreviewFile.install = (app) => {
|
|
1068
|
+
_sfc_main.install = (app) => {
|
|
1070
1069
|
app.component("PreviewFile", _sfc_main);
|
|
1071
1070
|
app.component("Loading", Loading);
|
|
1072
1071
|
};
|
|
1073
1072
|
export {
|
|
1074
1073
|
Loading,
|
|
1075
|
-
|
|
1074
|
+
_sfc_main as default
|
|
1076
1075
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("vue"),require("sakura-utils"),require("vue-pdf-embed"),require("pdfjs-dist"),require("@vueuse/core"),require("docx-preview")):"function"==typeof define&&define.amd?define(["exports","vue","sakura-utils","vue-pdf-embed","pdfjs-dist","@vueuse/core","docx-preview"],a):a((e="undefined"!=typeof globalThis?globalThis:e||self).SakuraPreviewFile={},e.Vue,e.sakuraUtils,e.VuePdfEmbed,null,e.core,e.docxPreview)}(this,(function(e,a,l,o,t,n,r){"use strict";const s=["stroke"],i=(e,a)=>{const l=e.__vccOpts||e;for(const[o,t]of a)l[o]=t;return l},u={Circle:i(a.defineComponent({__name:"Circle",props:{size:{default:50},color:{default:"#409eff"},duration:{default:2}},setup(e){const o=e,t=a.computed(()=>{const{size:e,duration:a}=o;return{"--circle-size":l.addUnit(e),"--circle-duration":a+"s"}});return(l,o)=>(a.openBlock(),a.createElementBlock("svg",{class:"circular",viewBox:"0 0 50 50",style:a.normalizeStyle([t.value])},[a.createElementVNode("circle",{class:"circular__path-inner",cx:"25",cy:"25",r:"20",fill:"none",stroke:e.color,"stroke-width":"4","stroke-miterlimit":"10"},null,8,s)],4))}}),[["__scopeId","data-v-51d1fa15"]]),Dot:i(a.defineComponent({__name:"Dot",props:{gap:{default:6},color:{default:"var(--preview-file-primary-color)"},size:{default:10},duration:{default:1.4}},setup(e){const o=e,t=a.computed(()=>{const{size:e,gap:a,duration:t,color:n}=o;return{"--dot-size":l.addUnit(e),"--dot-duration":t+"s","--dot-gap":l.addUnit(a),"--dot-color":n}});return(e,l)=>(a.openBlock(),a.createElementBlock("div",{class:"dot",style:a.normalizeStyle([t.value])},[...l[0]||(l[0]=[a.createElementVNode("div",{class:"dot__item"},null,-1),a.createElementVNode("div",{class:"dot__item"},null,-1),a.createElementVNode("div",{class:"dot__item"},null,-1)])],4))}}),[["__scopeId","data-v-2acd99b5"]]),Progress:i(a.defineComponent({__name:"Progress",props:{width:{default:200},height:{default:4},background:{default:"#ebeef5"},radius:{},color:{default:"var(--preview-file-primary-color)"},duration:{default:2}},setup(e){const o=e,t=a.computed(()=>{const{width:e,height:a,color:t,duration:n,radius:r,background:s}=o;return{"--progress-width":l.addUnit(e),"--progress-height":l.addUnit(a),"--progress-border-radius":l.addUnit(r||Number(a)/2),"--progress-background":s,"--progress-duration":n+"s","--progress-color":t}});return(e,l)=>(a.openBlock(),a.createElementBlock("div",{class:"progress",style:a.normalizeStyle([t.value])},[...l[0]||(l[0]=[a.createElementVNode("div",{class:"progress__bar"},null,-1)])],4))}}),[["__scopeId","data-v-3a710001"]]),Cube:i(a.defineComponent({__name:"Cube",props:{size:{default:40},color:{default:"var(--preview-file-primary-color)"},duration:{default:1.3}},setup(e){const o=e,t=a.computed(()=>{const{size:e,duration:a,color:t}=o;return{"--cube-size":l.addUnit(e),"--cube-color":t,"--cube-duration":a+"s"}});return(e,l)=>(a.openBlock(),a.createElementBlock("div",{class:"cube",style:a.normalizeStyle([t.value])},[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(9,e=>a.createElementVNode("div",{key:e,class:"cube__item"})),64))],4))}}),[["__scopeId","data-v-0e6bb9d0"]])},c=(e,a,l,o,t)=>{let n=e+"-"+a;return l&&(n+="-"+l),o&&(n+="__"+o),t&&(n+="--"+t),n},d=e=>{const o=a.ref(""),t=a.computed(()=>l.isEmpty(o.value)?l.FILE_TYPE.IMAGE:l.getFileType(e.convertToLocalFileUrl?e.src:o.value));return a.watchEffect(async()=>{const{src:a}=e;o.value="",a instanceof Blob?o.value=l.base64ToFileUrl(await l.blobToBase64(a)):l.isBase64File(a)?o.value=l.base64ToFileUrl(a):o.value=e.convertToLocalFileUrl?await l.networkFileUrlToLocalFileUrl(a):a}),{fileType:t,fileUrl:o}},m=(e={})=>{const{maxScale:o=3,minScale:t=.4,stepNum:r=.2,wheelNum:s=.3}=e,i=a.ref(1),u=a.computed(()=>l.numberToFixed(100*i.value,0)+"%"),c=(e=r)=>{i.value=Math.max(t,i.value-=e)},d=(e=r)=>{i.value=(i.value+=e)>o?o:i.value},m=n.useThrottleFn(()=>c(),300),p=n.useThrottleFn(()=>d(),300);return{clickMinusScale:m,clickPlusScale:p,scale:i,scaleText:u,onWheel:e=>{e.ctrlKey&&(e.preventDefault(),e.deltaY>0?c(Math.random()*s):d(Math.random()*s))},resetWheelState:()=>{i.value=1}}},p=(e,l)=>{const{onWheel:o,clickMinusScale:t,clickPlusScale:n,resetWheelState:r,scale:s,scaleText:i}=m(),{isMouseDown:u,onMouseStart:c,resetMouseState:d,translateX:p,translateY:f}=(()=>{const e=a.ref(!1),l=a.ref(0),o=a.ref(0),t=a.ref(0),n=a.ref(0),r=a=>{if(!e.value)return;a.preventDefault();const r=a.clientX,s=a.clientY;t.value=r-l.value,n.value=s-o.value},s=()=>{e.value=!1,window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",s)};return{resetMouseState:()=>{l.value=0,o.value=0,t.value=0,n.value=0,e.value=!1},onMouseStart:a=>{e.value=!0,l.value=a.clientX-t.value,o.value=a.clientY-n.value,window.addEventListener("mousemove",r),window.addEventListener("mouseup",s)},translateX:t,translateY:n,isMouseDown:e}})(),v=a.computed(()=>({transform:`translate(${p.value}px, ${f.value}px) scale(${s.value})`,transformOrigin:"center center"})),k=()=>{d(),r()};a.watch(()=>null==l?void 0:l.value,k);const g=a.ref(null);return a.watch(()=>e.value,()=>{g.value&&(g.value.scrollTop=0,k())}),{wrapperRef:g,onWheel:o,clickMinusScale:t,clickPlusScale:n,resetWheelState:r,scale:s,scaleText:i,isMouseDown:u,onMouseStart:c,resetMouseState:d,translateX:p,translateY:f,wrapperStyle:v}};var f=(e=>(e["完成"]="loaded",e["改变"]="change",e["下一页"]="next",e["上一页"]="prev",e["放大"]="zoomIn",e["缩小"]="zoomOut",e))(f||{});const v={class:"sakura-file-data__tools"},k={class:"sakura-file-data__page"},g={class:"sakura-file-data__text"},b={key:1,class:"sakura-file-data__scale"},w={class:"sakura-file-data__scale-text"},h=a.defineComponent({__name:"Tools",props:a.mergeModels({showTools:{type:Boolean},total:{},scaleText:{},nextPageDisabled:{type:Boolean},prevPageDisabled:{type:Boolean},enablePagination:{type:Boolean},enableMove:{type:Boolean},enableScale:{type:Boolean}},{modelValue:{type:Number,default:1},modelModifiers:{}}),emits:a.mergeModels([f.改变,f.下一页,f.上一页,f.放大,f.缩小],["update:modelValue"]),setup(e,{emit:l}){const o=l,t=a.useModel(e,"modelValue");return(l,n)=>(a.openBlock(),a.createElementBlock("div",v,[a.renderSlot(l.$slots,"default"),e.showTools?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[e.enablePagination?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",{class:a.normalizeClass(["sakura-file-data__arrow sakura-file-data__arrow-prev",[e.prevPageDisabled?"is-disabled":""]]),onClick:n[0]||(n[0]=e=>o(a.unref(f).上一页))},null,2),a.createElementVNode("div",k,[a.withDirectives(a.createElementVNode("input",{class:"sakura-file-data__input","onUpdate:modelValue":n[1]||(n[1]=e=>t.value=e),onBlur:n[2]||(n[2]=e=>o(a.unref(f).改变))},null,544),[[a.vModelText,t.value]]),a.createElementVNode("span",g," / "+a.toDisplayString(e.total),1)]),a.createElementVNode("div",{class:a.normalizeClass(["sakura-file-data__arrow sakura-file-data__arrow-next",[e.nextPageDisabled?"is-disabled":""]]),onClick:n[3]||(n[3]=e=>o(a.unref(f).下一页))},null,2)],64)):a.createCommentVNode("",!0),e.enableScale?(a.openBlock(),a.createElementBlock("div",b,[a.createElementVNode("div",{class:"sakura-file-data__icon sakura-file-data__minus",onClick:n[4]||(n[4]=e=>o(a.unref(f).缩小))}),a.createElementVNode("span",w,a.toDisplayString(e.scaleText),1),a.createElementVNode("div",{class:"sakura-file-data__icon sakura-file-data__plus",onClick:n[5]||(n[5]=e=>o(a.unref(f).放大))})])):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)]))}}),y={class:"sakura-file-data"},_=a.defineComponent({__name:"Pdf",props:a.mergeModels({enablePagination:{type:Boolean,default:!0},enableScale:{type:Boolean,default:!0},enableMove:{type:Boolean,default:!0},fileUrl:{},showTools:{type:Boolean,default:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:a.mergeModels([f.完成],["update:modelValue"]),setup(e,{emit:t}){const r=e,s=t,i=a.useModel(e,"modelValue"),u=a.computed(()=>({url:r.fileUrl,fontExtraProperties:!0,cMapUrl:"./cmaps/",cMapPacked:!0,disableFontFace:!1,enableXfa:!0,fontLoadTimeout:3e4,verbosity:0})),c=a.reactive({pageNum:1,total:0,isError:!1}),d=a.ref(0),m=async e=>{var o;c.total=e._pdfInfo.numPages,await a.nextTick(),await l.sleep(50),d.value=(null==(o=document.querySelector(".vue-file-dataembed"))?void 0:o.clientHeight)??0},v=()=>{c.isError=!0},k=async()=>{await l.sleep(300),i.value=!1,s(f.完成)},{prevPageDisabled:g,nextPageDisabled:b,nextPage:w,_pageNum:_,onPageNumChange:B,prevPage:V}=(e=>{const l=a.computed(()=>e.pageNum>=e.total),o=n.useThrottleFn(()=>{l.value||e.pageNum++},500),t=a.computed(()=>e.pageNum<=1),r=n.useThrottleFn(()=>{t.value||e.pageNum--},500),s=a.ref(1);return a.watchEffect(()=>{s.value=e.pageNum}),{nextPage:o,nextPageDisabled:l,prevPage:r,prevPageDisabled:t,_pageNum:s,onPageNumChange:()=>{const{total:a}=e;e.pageNum=Math.max(Math.min(s.value,a),1)}}})(c),N=()=>{i.value=!0,_.value=1,l.extend(c,{pageNum:1,total:0,isError:!1})};a.watch(()=>r.fileUrl,N),a.onMounted(N);const{pageNum:E}=a.toRefs(c),{fileUrl:S}=a.toRefs(r),{onWheel:M,clickMinusScale:x,clickPlusScale:C,isMouseDown:P,scaleText:T,onMouseStart:U,wrapperStyle:F}=p(S,E);return(l,t)=>(a.openBlock(),a.createElementBlock("div",y,[a.createElementVNode("div",{ref:"wrapperRef",class:a.normalizeClass(["sakura-file-data__wrapper",[a.unref(P)?"is-drag":""]]),onMousedown:t[0]||(t[0]=l=>e.enableMove&&a.unref(U)(l)),onWheel:t[1]||(t[1]=l=>e.enableScale&&a.unref(M)(l))},[a.createElementVNode("div",{style:a.normalizeStyle([a.unref(F)])},[a.createVNode(a.unref(o),{class:"pdf",source:u.value,page:e.enablePagination?c.pageNum:void 0,scale:1,onLoaded:m,onRendered:k,onError:v},null,8,["source","page"])],4)],34),e.enablePagination||e.enableScale||e.showTools?(a.openBlock(),a.createBlock(h,{key:0,modelValue:a.unref(_),"onUpdate:modelValue":t[2]||(t[2]=e=>a.isRef(_)?_.value=e:null),total:c.total,"prev-page-disabled":a.unref(g),"next-page-disabled":a.unref(b),"scale-text":a.unref(T),"show-tools":e.showTools,"enable-pagination":e.enablePagination,"enable-scale":e.enableScale,"enable-move":e.enableMove,onChange:a.unref(B),onNext:a.unref(w),onPrev:a.unref(V),onZoomIn:a.unref(C),onZoomOut:a.unref(x)},{default:a.withCtx(()=>[a.renderSlot(l.$slots,"default",{fileDataState:c})]),_:3},8,["modelValue","total","prev-page-disabled","next-page-disabled","scale-text","show-tools","enable-pagination","enable-scale","enable-move","onChange","onNext","onPrev","onZoomIn","onZoomOut"])):a.createCommentVNode("",!0)]))}}),B={class:"sakura-file-data"},V=a.defineComponent({__name:"Word",props:a.mergeModels({enablePagination:{type:Boolean},enableScale:{type:Boolean},enableMove:{type:Boolean},fileUrl:{},showTools:{type:Boolean,default:!0},isLocalFile:{type:Boolean,default:!1},enableWrapper:{type:Boolean,default:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:a.mergeModels([f.完成],["update:modelValue"]),setup(e,{emit:o}){const t=e,n=a.useModel(e,"modelValue"),s=a.useTemplateRef("wordFileRef"),i=async()=>{try{n.value=!0,s.value&&(s.value.innerHTML="");const e=await(async()=>{const e=await fetch(t.fileUrl),a=await e.blob();return l.base64ToFile(await l.blobToBase64(a),l.generateId()+".docx")})();await r.renderAsync(e,s.value,void 0,{className:"docx",inWrapper:t.enableWrapper,ignoreWidth:!0,ignoreHeight:!1,ignoreFonts:!0,breakPages:!0,ignoreLastRenderedPageBreak:!0,experimental:!1,trimXmlDeclaration:!0}),await a.nextTick()}catch(e){console.log("fileUrl---",t.fileUrl),console.log("加载word文件失败----",e)}finally{n.value=!1}};a.onMounted(i),a.watch(()=>t.fileUrl,i);const{fileUrl:u}=a.toRefs(t),{onWheel:c,clickMinusScale:d,clickPlusScale:m,isMouseDown:f,scaleText:v,onMouseStart:k,wrapperStyle:g}=p(u);return(l,o)=>(a.openBlock(),a.createElementBlock("div",B,[a.createElementVNode("div",{ref:"wrapperRef",class:a.normalizeClass(["sakura-file-data__wrapper",[a.unref(f)?"is-drag":"",e.enableWrapper?"is-enable-wrapper":""]]),onMousedown:o[0]||(o[0]=l=>e.enableMove&&a.unref(k)(l)),onWheel:o[1]||(o[1]=l=>e.enableScale&&a.unref(c)(l))},[a.createElementVNode("div",{ref_key:"wordFileRef",ref:s,style:a.normalizeStyle([a.unref(g)])},null,4)],34),e.enablePagination||e.enableScale||e.showTools?(a.openBlock(),a.createBlock(h,{key:0,"scale-text":a.unref(v),"show-tools":e.showTools,"enable-scale":e.enableScale,"enable-move":e.enableMove,onZoomIn:a.unref(m),onZoomOut:a.unref(d)},{default:a.withCtx(()=>[a.renderSlot(l.$slots,"default")]),_:3},8,["scale-text","show-tools","enable-scale","enable-move","onZoomIn","onZoomOut"])):a.createCommentVNode("",!0)]))}}),N={width:"24",height:"24",fill:"none"};const E=i({},[["render",function(e,l){return a.openBlock(),a.createElementBlock("svg",N,[...l[0]||(l[0]=[a.createElementVNode("circle",{cx:"10.5",cy:"10.5",r:"6.5",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M15.5 15.5L20 20",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}]]),S={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const M=i({},[["render",function(e,l){return a.openBlock(),a.createElementBlock("svg",S,[...l[0]||(l[0]=[a.createElementVNode("circle",{cx:"10.5",cy:"10.5",r:"6.5",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M7.5 10.5H13.5",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M15.5 15.5L20 20",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}]]),x={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const C=i({},[["render",function(e,l){return a.openBlock(),a.createElementBlock("svg",x,[...l[0]||(l[0]=[a.createElementVNode("path",{d:"M7 7L17 17",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M7 17L17 7",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}]]),P={class:"sakura-file-data"},T={class:"sakura-file-data__wrapper is-image"},U=["src"],F={class:"sakura-preview__image--data"},z=["src"],D={key:0,class:"sakura-preview__image--tools"},L=a.defineComponent({__name:"Image",props:a.mergeModels({enablePagination:{type:Boolean},enableScale:{type:Boolean},enableMove:{type:Boolean},fileUrl:{},showTools:{type:Boolean}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,t=a.useModel(e,"modelValue"),r=()=>{t.value=!1},{width:s,height:i}=n.useWindowSize(),u=a.ref(0),c=a.ref(0);a.onMounted(async()=>{const e=o.fileUrl;u.value=0,c.value=0;const a=new Image;a.src=e,a.onload=()=>{u.value=a.width,c.value=a.height}});const d=a.computed(()=>u.value>s.value?{width:"auto",height:l.addUnit(i.value)}:{width:l.addUnit(u.value),height:l.addUnit(c.value)}),{fileUrl:m}=a.toRefs(o),{onWheel:f,onMouseStart:v,isMouseDown:k,clickMinusScale:g,clickPlusScale:b,wrapperStyle:w}=p(m),h=a.ref(!1),y=()=>{h.value=!h.value};return(l,o)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",P,[a.createElementVNode("div",T,[a.createElementVNode("img",{class:"sakura-file-data__image",src:a.unref(m),alt:"",onLoad:r,onClick:y},null,40,U)])]),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.createElementVNode("div",{class:a.normalizeClass(["sakura-preview-dialog",[h.value?"is-visible":""]])},[o[2]||(o[2]=a.createElementVNode("div",{class:"sakura-preview__image--mark"},null,-1)),a.createElementVNode("div",{ref:"wrapperRef",class:a.normalizeClass(["sakura-preview__image",[a.unref(k)?"is-drag":""]]),onMousedown:o[0]||(o[0]=l=>e.enableMove&&a.unref(v)(l)),onWheel:o[1]||(o[1]=l=>e.enableScale&&a.unref(f)(l))},[a.createElementVNode("div",F,[a.createElementVNode("img",{class:"dot-move",src:a.unref(m),style:a.normalizeStyle([d.value,a.unref(w)]),alt:""},null,12,z)]),a.createElementVNode("div",{class:"sakura-preview__image--close",onClick:y},[a.createVNode(C)]),e.enableScale?(a.openBlock(),a.createElementBlock("div",D,[a.createVNode(E,{onClick:a.unref(b)},null,8,["onClick"]),a.createVNode(M,{onClick:a.unref(g)},null,8,["onClick"])])):a.createCommentVNode("",!0)],34)],2)]))],64))}}),$=Symbol("PreviewFile"),W=a.defineComponent({__name:"preview-file",props:{width:{default:"100%"},height:{default:"100%"},src:{},enablePagination:{type:Boolean,default:!0},enableScale:{type:Boolean,default:!0},enableMove:{type:Boolean,default:!0},loadingType:{default:"circle"},loadingState:{default:()=>({})},convertToLocalFileUrl:{type:Boolean,default:!1},themeColor:{default:"#409eff"}},setup(e){const o=e;a.provide($,o);const t=((e,l)=>{const o=a.unref(l)??"sakura"??e,t=e=>`${o}-${e}`,n=(e,a)=>`${o}-${e}-${a}`;return{b:(a="")=>c(o,e,a,"",""),e:(a="")=>a?c(o,e,"",a,""):"",m:(a="")=>a?c(o,e,"","",a):"",be:(a="",l="")=>a&&l?c(o,e,a,l,""):"",em:(a="",l="")=>a&&l?c(o,e,"",a,l):"",bm:(a="",l="")=>a&&l?c(o,e,a,"",l):"",bem:(a="",l="",t="")=>a&&l&&t?c(o,e,a,l,t):"",is:(e,...a)=>(!a.length||a[0])&&e?"is-"+e:"",cssVar:e=>{const a={};for(const l in e)e[l]&&(a[`--${o}-${l} `]=e[l]);return a},cssBlockVar:(e,a)=>{const l={};for(const t in a)a[t]&&(l[`--${o}-${e}-${t}`]=a[t]);return l},cssVarName:t,cssBlockVarName:n,cssVarNameValue:e=>`var(--${t(e)})`,cssBlockVarNameValue:(e,a)=>`var(--${n(e,a)})`}})("preview-file"),n=a.computed(()=>{const{width:e,height:a,themeColor:t}=o,n={"--preview-file-primary-color":t};return l.isEmpty(e)||(n.width=l.addUnit(e)),l.isEmpty(a)||(n.height=l.addUnit(a)),n}),{fileType:r,fileUrl:s}=d(o),i=a.ref(!0),m=a.computed(()=>{const{loadingType:e}=o;switch(e){case"circle":return u.Circle;case"dot":return u.Dot;case"cube":return u.Cube;case"progress":default:return u.Progress}});return(u,c)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(a.unref(t).b()),style:a.normalizeStyle([n.value])},[a.unref(l.isEmpty)(a.unref(s))?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass([a.unref(t).e("wrapper")])},[a.unref(l.isPdfFile)(a.unref(r))?(a.openBlock(),a.createBlock(_,{key:0,modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=e=>i.value=e),"file-url":a.unref(s),"show-tools":!u.$slots.default,"enable-pagination":e.enablePagination,"enable-scale":e.enableScale,"enable-move":e.enableMove},{default:a.withCtx(({fileDataState:e})=>[a.renderSlot(u.$slots,"default",{fileState:e,data:o})]),_:3},8,["modelValue","file-url","show-tools","enable-pagination","enable-scale","enable-move"])):a.createCommentVNode("",!0),a.unref(l.isWordFile)(a.unref(r))?(a.openBlock(),a.createBlock(V,{key:1,modelValue:i.value,"onUpdate:modelValue":c[1]||(c[1]=e=>i.value=e),"file-url":a.unref(s),"show-tools":!u.$slots.default,"enable-pagination":e.enablePagination,"enable-scale":e.enableScale,"enable-move":e.enableMove,"is-local-file":e.convertToLocalFileUrl},null,8,["modelValue","file-url","show-tools","enable-pagination","enable-scale","enable-move","is-local-file"])):a.unref(l.isImageFile)(a.unref(r))?(a.openBlock(),a.createBlock(L,{key:2,modelValue:i.value,"onUpdate:modelValue":c[2]||(c[2]=e=>i.value=e),"file-url":a.unref(s),"show-tools":!u.$slots.default,"enable-scale":e.enableScale,"enable-move":e.enableMove},null,8,["modelValue","file-url","show-tools","enable-scale","enable-move"])):a.createCommentVNode("",!0)],2)),a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass([a.unref(t).e("loading")])},[a.createElementVNode("div",{class:a.normalizeClass([a.unref(t).e("loading-spinner")])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(m.value),a.normalizeProps(a.guardReactiveProps({...e.loadingState,color:e.themeColor})),null,16))],2)],2),[[a.vShow,i.value]])],6))}}),I=W;I.install=e=>{e.component("PreviewFile",W),e.component("Loading",u)},e.Loading=u,e.PreviewFile=I,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("vue"),require("sakura-utils"),require("vue-pdf-embed"),require("pdfjs-dist"),require("@vueuse/core"),require("docx-preview")):"function"==typeof define&&define.amd?define(["exports","vue","sakura-utils","vue-pdf-embed","pdfjs-dist","@vueuse/core","docx-preview"],a):a((e="undefined"!=typeof globalThis?globalThis:e||self).SakuraPreviewFile={},e.Vue,e.sakuraUtils,e.VuePdfEmbed,null,e.core,e.docxPreview)}(this,(function(e,a,l,o,t,n,r){"use strict";const s=["stroke"],i=(e,a)=>{const l=e.__vccOpts||e;for(const[o,t]of a)l[o]=t;return l},u={Circle:i(a.defineComponent({__name:"Circle",props:{size:{default:50},color:{default:"#409eff"},duration:{default:2}},setup(e){const o=e,t=a.computed(()=>{const{size:e,duration:a}=o;return{"--circle-size":l.addUnit(e),"--circle-duration":a+"s"}});return(l,o)=>(a.openBlock(),a.createElementBlock("svg",{class:"circular",viewBox:"0 0 50 50",style:a.normalizeStyle([t.value])},[a.createElementVNode("circle",{class:"circular__path-inner",cx:"25",cy:"25",r:"20",fill:"none",stroke:e.color,"stroke-width":"4","stroke-miterlimit":"10"},null,8,s)],4))}}),[["__scopeId","data-v-51d1fa15"]]),Dot:i(a.defineComponent({__name:"Dot",props:{gap:{default:6},color:{default:"var(--preview-file-primary-color)"},size:{default:10},duration:{default:1.4}},setup(e){const o=e,t=a.computed(()=>{const{size:e,gap:a,duration:t,color:n}=o;return{"--dot-size":l.addUnit(e),"--dot-duration":t+"s","--dot-gap":l.addUnit(a),"--dot-color":n}});return(e,l)=>(a.openBlock(),a.createElementBlock("div",{class:"dot",style:a.normalizeStyle([t.value])},[...l[0]||(l[0]=[a.createElementVNode("div",{class:"dot__item"},null,-1),a.createElementVNode("div",{class:"dot__item"},null,-1),a.createElementVNode("div",{class:"dot__item"},null,-1)])],4))}}),[["__scopeId","data-v-2acd99b5"]]),Progress:i(a.defineComponent({__name:"Progress",props:{width:{default:200},height:{default:4},background:{default:"#ebeef5"},radius:{},color:{default:"var(--preview-file-primary-color)"},duration:{default:2}},setup(e){const o=e,t=a.computed(()=>{const{width:e,height:a,color:t,duration:n,radius:r,background:s}=o;return{"--progress-width":l.addUnit(e),"--progress-height":l.addUnit(a),"--progress-border-radius":l.addUnit(r||Number(a)/2),"--progress-background":s,"--progress-duration":n+"s","--progress-color":t}});return(e,l)=>(a.openBlock(),a.createElementBlock("div",{class:"progress",style:a.normalizeStyle([t.value])},[...l[0]||(l[0]=[a.createElementVNode("div",{class:"progress__bar"},null,-1)])],4))}}),[["__scopeId","data-v-3a710001"]]),Cube:i(a.defineComponent({__name:"Cube",props:{size:{default:40},color:{default:"var(--preview-file-primary-color)"},duration:{default:1.3}},setup(e){const o=e,t=a.computed(()=>{const{size:e,duration:a,color:t}=o;return{"--cube-size":l.addUnit(e),"--cube-color":t,"--cube-duration":a+"s"}});return(e,l)=>(a.openBlock(),a.createElementBlock("div",{class:"cube",style:a.normalizeStyle([t.value])},[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(9,e=>a.createElementVNode("div",{key:e,class:"cube__item"})),64))],4))}}),[["__scopeId","data-v-0e6bb9d0"]])},c=(e,a,l,o,t)=>{let n=e+"-"+a;return l&&(n+="-"+l),o&&(n+="__"+o),t&&(n+="--"+t),n},d=e=>{const o=a.ref(""),t=a.computed(()=>l.isEmpty(o.value)?l.FILE_TYPE.IMAGE:l.getFileType(e.convertToLocalFileUrl?e.src:o.value));return a.watchEffect(async()=>{const{src:a}=e;o.value="",a instanceof Blob?o.value=l.base64ToFileUrl(await l.blobToBase64(a)):l.isBase64File(a)?o.value=l.base64ToFileUrl(a):o.value=e.convertToLocalFileUrl?await l.networkFileUrlToLocalFileUrl(a):a}),{fileType:t,fileUrl:o}},m=(e={})=>{const{maxScale:o=3,minScale:t=.4,stepNum:r=.2,wheelNum:s=.3}=e,i=a.ref(1),u=a.computed(()=>l.numberToFixed(100*i.value,0)+"%"),c=(e=r)=>{i.value=Math.max(t,i.value-=e)},d=(e=r)=>{i.value=(i.value+=e)>o?o:i.value},m=n.useThrottleFn(()=>c(),300),p=n.useThrottleFn(()=>d(),300);return{clickMinusScale:m,clickPlusScale:p,scale:i,scaleText:u,onWheel:e=>{e.ctrlKey&&(e.preventDefault(),e.deltaY>0?c(Math.random()*s):d(Math.random()*s))},resetWheelState:()=>{i.value=1}}},p=(e,l)=>{const{onWheel:o,clickMinusScale:t,clickPlusScale:n,resetWheelState:r,scale:s,scaleText:i}=m(),{isMouseDown:u,onMouseStart:c,resetMouseState:d,translateX:p,translateY:f}=(()=>{const e=a.ref(!1),l=a.ref(0),o=a.ref(0),t=a.ref(0),n=a.ref(0),r=a=>{if(!e.value)return;a.preventDefault();const r=a.clientX,s=a.clientY;t.value=r-l.value,n.value=s-o.value},s=()=>{e.value=!1,window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",s)};return{resetMouseState:()=>{l.value=0,o.value=0,t.value=0,n.value=0,e.value=!1},onMouseStart:a=>{e.value=!0,l.value=a.clientX-t.value,o.value=a.clientY-n.value,window.addEventListener("mousemove",r),window.addEventListener("mouseup",s)},translateX:t,translateY:n,isMouseDown:e}})(),v=a.computed(()=>({transform:`translate(${p.value}px, ${f.value}px) scale(${s.value})`,transformOrigin:"center center"})),k=()=>{d(),r()};a.watch(()=>null==l?void 0:l.value,k);const g=a.ref(null);return a.watch(()=>e.value,()=>{g.value&&(g.value.scrollTop=0,k())}),{wrapperRef:g,onWheel:o,clickMinusScale:t,clickPlusScale:n,resetWheelState:r,scale:s,scaleText:i,isMouseDown:u,onMouseStart:c,resetMouseState:d,translateX:p,translateY:f,wrapperStyle:v}};var f=(e=>(e["完成"]="loaded",e["改变"]="change",e["下一页"]="next",e["上一页"]="prev",e["放大"]="zoomIn",e["缩小"]="zoomOut",e))(f||{});const v={class:"sakura-file-data__tools"},k={class:"sakura-file-data__page"},g={class:"sakura-file-data__text"},b={key:1,class:"sakura-file-data__scale"},w={class:"sakura-file-data__scale-text"},h=a.defineComponent({__name:"Tools",props:a.mergeModels({showTools:{type:Boolean},total:{},scaleText:{},nextPageDisabled:{type:Boolean},prevPageDisabled:{type:Boolean},enablePagination:{type:Boolean},enableMove:{type:Boolean},enableScale:{type:Boolean}},{modelValue:{type:Number,default:1},modelModifiers:{}}),emits:a.mergeModels([f.改变,f.下一页,f.上一页,f.放大,f.缩小],["update:modelValue"]),setup(e,{emit:l}){const o=l,t=a.useModel(e,"modelValue");return(l,n)=>(a.openBlock(),a.createElementBlock("div",v,[a.renderSlot(l.$slots,"default"),e.showTools?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[e.enablePagination?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",{class:a.normalizeClass(["sakura-file-data__arrow sakura-file-data__arrow-prev",[e.prevPageDisabled?"is-disabled":""]]),onClick:n[0]||(n[0]=e=>o(a.unref(f).上一页))},null,2),a.createElementVNode("div",k,[a.withDirectives(a.createElementVNode("input",{class:"sakura-file-data__input","onUpdate:modelValue":n[1]||(n[1]=e=>t.value=e),onBlur:n[2]||(n[2]=e=>o(a.unref(f).改变))},null,544),[[a.vModelText,t.value]]),a.createElementVNode("span",g," / "+a.toDisplayString(e.total),1)]),a.createElementVNode("div",{class:a.normalizeClass(["sakura-file-data__arrow sakura-file-data__arrow-next",[e.nextPageDisabled?"is-disabled":""]]),onClick:n[3]||(n[3]=e=>o(a.unref(f).下一页))},null,2)],64)):a.createCommentVNode("",!0),e.enableScale?(a.openBlock(),a.createElementBlock("div",b,[a.createElementVNode("div",{class:"sakura-file-data__icon sakura-file-data__minus",onClick:n[4]||(n[4]=e=>o(a.unref(f).缩小))}),a.createElementVNode("span",w,a.toDisplayString(e.scaleText),1),a.createElementVNode("div",{class:"sakura-file-data__icon sakura-file-data__plus",onClick:n[5]||(n[5]=e=>o(a.unref(f).放大))})])):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)]))}}),y={class:"sakura-file-data"},_=a.defineComponent({__name:"Pdf",props:a.mergeModels({enablePagination:{type:Boolean,default:!0},enableScale:{type:Boolean,default:!0},enableMove:{type:Boolean,default:!0},fileUrl:{},showTools:{type:Boolean,default:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:a.mergeModels([f.完成],["update:modelValue"]),setup(e,{emit:t}){const r=e,s=t,i=a.useModel(e,"modelValue"),u=a.computed(()=>({url:r.fileUrl,fontExtraProperties:!0,cMapUrl:"./cmaps/",cMapPacked:!0,disableFontFace:!1,enableXfa:!0,fontLoadTimeout:3e4,verbosity:0})),c=a.reactive({pageNum:1,total:0,isError:!1}),d=a.ref(0),m=async e=>{var o;c.total=e._pdfInfo.numPages,await a.nextTick(),await l.sleep(50),d.value=(null==(o=document.querySelector(".vue-file-dataembed"))?void 0:o.clientHeight)??0},v=()=>{c.isError=!0},k=async()=>{await l.sleep(300),i.value=!1,s(f.完成)},{prevPageDisabled:g,nextPageDisabled:b,nextPage:w,_pageNum:_,onPageNumChange:B,prevPage:V}=(e=>{const l=a.computed(()=>e.pageNum>=e.total),o=n.useThrottleFn(()=>{l.value||e.pageNum++},500),t=a.computed(()=>e.pageNum<=1),r=n.useThrottleFn(()=>{t.value||e.pageNum--},500),s=a.ref(1);return a.watchEffect(()=>{s.value=e.pageNum}),{nextPage:o,nextPageDisabled:l,prevPage:r,prevPageDisabled:t,_pageNum:s,onPageNumChange:()=>{const{total:a}=e;e.pageNum=Math.max(Math.min(s.value,a),1)}}})(c),N=()=>{i.value=!0,_.value=1,l.extend(c,{pageNum:1,total:0,isError:!1})};a.watch(()=>r.fileUrl,N),a.onMounted(N);const{pageNum:E}=a.toRefs(c),{fileUrl:S}=a.toRefs(r),{onWheel:M,clickMinusScale:x,clickPlusScale:C,isMouseDown:P,scaleText:T,onMouseStart:U,wrapperStyle:F}=p(S,E);return(l,t)=>(a.openBlock(),a.createElementBlock("div",y,[a.createElementVNode("div",{ref:"wrapperRef",class:a.normalizeClass(["sakura-file-data__wrapper",[a.unref(P)?"is-drag":""]]),onMousedown:t[0]||(t[0]=l=>e.enableMove&&a.unref(U)(l)),onWheel:t[1]||(t[1]=l=>e.enableScale&&a.unref(M)(l))},[a.createElementVNode("div",{style:a.normalizeStyle([a.unref(F)])},[a.createVNode(a.unref(o),{class:"pdf",source:u.value,page:e.enablePagination?c.pageNum:void 0,scale:1,onLoaded:m,onRendered:k,onError:v},null,8,["source","page"])],4)],34),e.enablePagination||e.enableScale||e.showTools?(a.openBlock(),a.createBlock(h,{key:0,modelValue:a.unref(_),"onUpdate:modelValue":t[2]||(t[2]=e=>a.isRef(_)?_.value=e:null),total:c.total,"prev-page-disabled":a.unref(g),"next-page-disabled":a.unref(b),"scale-text":a.unref(T),"show-tools":e.showTools,"enable-pagination":e.enablePagination,"enable-scale":e.enableScale,"enable-move":e.enableMove,onChange:a.unref(B),onNext:a.unref(w),onPrev:a.unref(V),onZoomIn:a.unref(C),onZoomOut:a.unref(x)},{default:a.withCtx(()=>[a.renderSlot(l.$slots,"default",{fileDataState:c})]),_:3},8,["modelValue","total","prev-page-disabled","next-page-disabled","scale-text","show-tools","enable-pagination","enable-scale","enable-move","onChange","onNext","onPrev","onZoomIn","onZoomOut"])):a.createCommentVNode("",!0)]))}}),B={class:"sakura-file-data"},V=a.defineComponent({__name:"Word",props:a.mergeModels({enablePagination:{type:Boolean},enableScale:{type:Boolean},enableMove:{type:Boolean},fileUrl:{},showTools:{type:Boolean,default:!0},isLocalFile:{type:Boolean,default:!1},enableWrapper:{type:Boolean,default:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:a.mergeModels([f.完成],["update:modelValue"]),setup(e,{emit:o}){const t=e,n=a.useModel(e,"modelValue"),s=a.useTemplateRef("wordFileRef"),i=async()=>{try{n.value=!0,s.value&&(s.value.innerHTML="");const e=await(async()=>{const e=await fetch(t.fileUrl),a=await e.blob();return l.base64ToFile(await l.blobToBase64(a),l.generateId()+".docx")})();await r.renderAsync(e,s.value,void 0,{className:"docx",inWrapper:t.enableWrapper,ignoreWidth:!0,ignoreHeight:!1,ignoreFonts:!0,breakPages:!0,ignoreLastRenderedPageBreak:!0,experimental:!1,trimXmlDeclaration:!0}),await a.nextTick()}catch(e){console.log("fileUrl---",t.fileUrl),console.log("加载word文件失败----",e)}finally{n.value=!1}};a.onMounted(i),a.watch(()=>t.fileUrl,i);const{fileUrl:u}=a.toRefs(t),{onWheel:c,clickMinusScale:d,clickPlusScale:m,isMouseDown:f,scaleText:v,onMouseStart:k,wrapperStyle:g}=p(u);return(l,o)=>(a.openBlock(),a.createElementBlock("div",B,[a.createElementVNode("div",{ref:"wrapperRef",class:a.normalizeClass(["sakura-file-data__wrapper",[a.unref(f)?"is-drag":"",e.enableWrapper?"is-enable-wrapper":""]]),onMousedown:o[0]||(o[0]=l=>e.enableMove&&a.unref(k)(l)),onWheel:o[1]||(o[1]=l=>e.enableScale&&a.unref(c)(l))},[a.createElementVNode("div",{ref_key:"wordFileRef",ref:s,style:a.normalizeStyle([a.unref(g)])},null,4)],34),e.enablePagination||e.enableScale||e.showTools?(a.openBlock(),a.createBlock(h,{key:0,"scale-text":a.unref(v),"show-tools":e.showTools,"enable-scale":e.enableScale,"enable-move":e.enableMove,onZoomIn:a.unref(m),onZoomOut:a.unref(d)},{default:a.withCtx(()=>[a.renderSlot(l.$slots,"default")]),_:3},8,["scale-text","show-tools","enable-scale","enable-move","onZoomIn","onZoomOut"])):a.createCommentVNode("",!0)]))}}),N={width:"24",height:"24",fill:"none"};const E=i({},[["render",function(e,l){return a.openBlock(),a.createElementBlock("svg",N,[...l[0]||(l[0]=[a.createElementVNode("circle",{cx:"10.5",cy:"10.5",r:"6.5",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M15.5 15.5L20 20",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}]]),S={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const M=i({},[["render",function(e,l){return a.openBlock(),a.createElementBlock("svg",S,[...l[0]||(l[0]=[a.createElementVNode("circle",{cx:"10.5",cy:"10.5",r:"6.5",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M7.5 10.5H13.5",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M15.5 15.5L20 20",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}]]),x={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const C=i({},[["render",function(e,l){return a.openBlock(),a.createElementBlock("svg",x,[...l[0]||(l[0]=[a.createElementVNode("path",{d:"M7 7L17 17",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M7 17L17 7",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}]]),P={class:"sakura-file-data"},T={class:"sakura-file-data__wrapper is-image"},U=["src"],F={class:"sakura-preview__image--data"},z=["src"],D={key:0,class:"sakura-preview__image--tools"},L=a.defineComponent({__name:"Image",props:a.mergeModels({enablePagination:{type:Boolean},enableScale:{type:Boolean},enableMove:{type:Boolean},fileUrl:{},showTools:{type:Boolean}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,t=a.useModel(e,"modelValue"),r=()=>{t.value=!1},{width:s,height:i}=n.useWindowSize(),u=a.ref(0),c=a.ref(0);a.onMounted(async()=>{const e=o.fileUrl;u.value=0,c.value=0;const a=new Image;a.src=e,a.onload=()=>{u.value=a.width,c.value=a.height}});const d=a.computed(()=>u.value>s.value?{width:"auto",height:l.addUnit(i.value)}:{width:l.addUnit(u.value),height:l.addUnit(c.value)}),{fileUrl:m}=a.toRefs(o),{onWheel:f,onMouseStart:v,isMouseDown:k,clickMinusScale:g,clickPlusScale:b,wrapperStyle:w}=p(m),h=a.ref(!1),y=()=>{h.value=!h.value};return(l,o)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",P,[a.createElementVNode("div",T,[a.createElementVNode("img",{class:"sakura-file-data__image",src:a.unref(m),alt:"",onLoad:r,onClick:y},null,40,U)])]),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.createElementVNode("div",{class:a.normalizeClass(["sakura-preview-dialog",[h.value?"is-visible":""]])},[o[2]||(o[2]=a.createElementVNode("div",{class:"sakura-preview__image--mark"},null,-1)),a.createElementVNode("div",{ref:"wrapperRef",class:a.normalizeClass(["sakura-preview__image",[a.unref(k)?"is-drag":""]]),onMousedown:o[0]||(o[0]=l=>e.enableMove&&a.unref(v)(l)),onWheel:o[1]||(o[1]=l=>e.enableScale&&a.unref(f)(l))},[a.createElementVNode("div",F,[a.createElementVNode("img",{class:"dot-move",src:a.unref(m),style:a.normalizeStyle([d.value,a.unref(w)]),alt:""},null,12,z)]),a.createElementVNode("div",{class:"sakura-preview__image--close",onClick:y},[a.createVNode(C)]),e.enableScale?(a.openBlock(),a.createElementBlock("div",D,[a.createVNode(E,{onClick:a.unref(b)},null,8,["onClick"]),a.createVNode(M,{onClick:a.unref(g)},null,8,["onClick"])])):a.createCommentVNode("",!0)],34)],2)]))],64))}}),$=Symbol("PreviewFile"),W=a.defineComponent({__name:"preview-file",props:{width:{default:"100%"},height:{default:"100%"},src:{},enablePagination:{type:Boolean,default:!0},enableScale:{type:Boolean,default:!0},enableMove:{type:Boolean,default:!0},loadingType:{default:"circle"},loadingState:{default:()=>({})},convertToLocalFileUrl:{type:Boolean,default:!1},themeColor:{default:"#409eff"}},setup(e){const o=e;a.provide($,o);const t=((e,l)=>{const o=a.unref(l)??"sakura"??e,t=e=>`${o}-${e}`,n=(e,a)=>`${o}-${e}-${a}`;return{b:(a="")=>c(o,e,a,"",""),e:(a="")=>a?c(o,e,"",a,""):"",m:(a="")=>a?c(o,e,"","",a):"",be:(a="",l="")=>a&&l?c(o,e,a,l,""):"",em:(a="",l="")=>a&&l?c(o,e,"",a,l):"",bm:(a="",l="")=>a&&l?c(o,e,a,"",l):"",bem:(a="",l="",t="")=>a&&l&&t?c(o,e,a,l,t):"",is:(e,...a)=>(!a.length||a[0])&&e?"is-"+e:"",cssVar:e=>{const a={};for(const l in e)e[l]&&(a[`--${o}-${l} `]=e[l]);return a},cssBlockVar:(e,a)=>{const l={};for(const t in a)a[t]&&(l[`--${o}-${e}-${t}`]=a[t]);return l},cssVarName:t,cssBlockVarName:n,cssVarNameValue:e=>`var(--${t(e)})`,cssBlockVarNameValue:(e,a)=>`var(--${n(e,a)})`}})("preview-file"),n=a.computed(()=>{const{width:e,height:a,themeColor:t}=o,n={"--preview-file-primary-color":t};return l.isEmpty(e)||(n.width=l.addUnit(e)),l.isEmpty(a)||(n.height=l.addUnit(a)),n}),{fileType:r,fileUrl:s}=d(o),i=a.ref(!0),m=a.computed(()=>{const{loadingType:e}=o;switch(e){case"circle":return u.Circle;case"dot":return u.Dot;case"cube":return u.Cube;case"progress":default:return u.Progress}});return(u,c)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(a.unref(t).b()),style:a.normalizeStyle([n.value])},[a.unref(l.isEmpty)(a.unref(s))?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass([a.unref(t).e("wrapper")])},[a.unref(l.isPdfFile)(a.unref(r))?(a.openBlock(),a.createBlock(_,{key:0,modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=e=>i.value=e),"file-url":a.unref(s),"show-tools":!u.$slots.default,"enable-pagination":e.enablePagination,"enable-scale":e.enableScale,"enable-move":e.enableMove},{default:a.withCtx(({fileDataState:e})=>[a.renderSlot(u.$slots,"default",{fileState:e,data:o})]),_:3},8,["modelValue","file-url","show-tools","enable-pagination","enable-scale","enable-move"])):a.createCommentVNode("",!0),a.unref(l.isWordFile)(a.unref(r))?(a.openBlock(),a.createBlock(V,{key:1,modelValue:i.value,"onUpdate:modelValue":c[1]||(c[1]=e=>i.value=e),"file-url":a.unref(s),"show-tools":!u.$slots.default,"enable-pagination":e.enablePagination,"enable-scale":e.enableScale,"enable-move":e.enableMove,"is-local-file":e.convertToLocalFileUrl},null,8,["modelValue","file-url","show-tools","enable-pagination","enable-scale","enable-move","is-local-file"])):a.unref(l.isImageFile)(a.unref(r))?(a.openBlock(),a.createBlock(L,{key:2,modelValue:i.value,"onUpdate:modelValue":c[2]||(c[2]=e=>i.value=e),"file-url":a.unref(s),"show-tools":!u.$slots.default,"enable-scale":e.enableScale,"enable-move":e.enableMove},null,8,["modelValue","file-url","show-tools","enable-scale","enable-move"])):a.createCommentVNode("",!0)],2)),a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass([a.unref(t).e("loading")])},[a.createElementVNode("div",{class:a.normalizeClass([a.unref(t).e("loading-spinner")])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(m.value),a.normalizeProps(a.guardReactiveProps({...e.loadingState,color:e.themeColor})),null,16))],2)],2),[[a.vShow,i.value]])],6))}});W.install=e=>{e.component("PreviewFile",W),e.component("Loading",u)},e.Loading=u,e.default=W,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { DefineComponent } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 预览文件props
|
|
5
|
+
*/
|
|
6
|
+
export type PreviewFileProps = {
|
|
7
|
+
// 宽度
|
|
8
|
+
width?: string | number
|
|
9
|
+
// 高度
|
|
10
|
+
height?: string | number
|
|
11
|
+
// 浏览地址
|
|
12
|
+
src: string | Blob
|
|
13
|
+
// 是否启用分页
|
|
14
|
+
enablePagination?: boolean
|
|
15
|
+
// 是否启用缩放
|
|
16
|
+
enableScale?: boolean
|
|
17
|
+
// 是否启用拖拽
|
|
18
|
+
enableMove?: boolean
|
|
19
|
+
// 加载类型
|
|
20
|
+
loadingType?: 'circle' | 'cube' | 'dot' | 'progress'
|
|
21
|
+
// 加载属性
|
|
22
|
+
loadingState?: LoadingProps
|
|
23
|
+
// 是否转换为本地文件地址
|
|
24
|
+
convertToLocalFileUrl?: boolean
|
|
25
|
+
// 主题颜色
|
|
26
|
+
themeColor?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 圆形加载props
|
|
31
|
+
*/
|
|
32
|
+
export type CircleProps = {
|
|
33
|
+
size?: string | number
|
|
34
|
+
color?: string
|
|
35
|
+
duration?: number | string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 旋转方块加载props
|
|
40
|
+
*/
|
|
41
|
+
export type CubeProps = {
|
|
42
|
+
size?: string | number
|
|
43
|
+
color?: string
|
|
44
|
+
duration?: string | number
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 点状动画props
|
|
49
|
+
*/
|
|
50
|
+
export type DotProps = {
|
|
51
|
+
gap?: string | number
|
|
52
|
+
color?: string
|
|
53
|
+
size?: string | number
|
|
54
|
+
duration?: number | string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 进度条动画props
|
|
59
|
+
*/
|
|
60
|
+
export type ProgressProps = {
|
|
61
|
+
width?: string | number
|
|
62
|
+
height?: string | number
|
|
63
|
+
background?: string
|
|
64
|
+
radius?: string | number
|
|
65
|
+
color?: string
|
|
66
|
+
duration?: string | number
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 加载属性集合
|
|
71
|
+
*/
|
|
72
|
+
export type LoadingProps = CircleProps & DotProps & CubeProps & ProgressProps
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Loading组件类型
|
|
76
|
+
*/
|
|
77
|
+
export interface LoadingComponent {
|
|
78
|
+
Circle: DefineComponent<CircleProps, {}, any>
|
|
79
|
+
Dot: DefineComponent<DotProps, {}, any>
|
|
80
|
+
Progress: DefineComponent<ProgressProps, {}, any>
|
|
81
|
+
Cube: DefineComponent<CubeProps, {}, any>
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* PreviewFile组件类型
|
|
86
|
+
*/
|
|
87
|
+
export interface PreviewFileComponent extends DefineComponent<PreviewFileProps, {}, any> {
|
|
88
|
+
install: (app: any) => void
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 默认导出PreviewFile组件
|
|
93
|
+
*/
|
|
94
|
+
declare const PreviewFile: PreviewFileComponent
|
|
95
|
+
|
|
96
|
+
export default PreviewFile
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 导出Loading组件
|
|
100
|
+
*/
|
|
101
|
+
declare const Loading: LoadingComponent
|
|
102
|
+
|
|
103
|
+
export { Loading }
|
package/package.json
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sakura-preview-file",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "预览文件",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"sideEffects":
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.scss",
|
|
8
|
+
"*.css"
|
|
9
|
+
],
|
|
7
10
|
"private": false,
|
|
8
11
|
"main": "./dist/index.umd.js",
|
|
9
12
|
"module": "./dist/index.es.js",
|
|
10
|
-
"types": "./
|
|
13
|
+
"types": "./index.d.ts",
|
|
11
14
|
"exports": {
|
|
12
15
|
".": {
|
|
13
|
-
"types": "./
|
|
16
|
+
"types": "./index.d.ts",
|
|
14
17
|
"import": "./dist/index.es.js",
|
|
15
18
|
"require": "./dist/index.umd.js"
|
|
16
19
|
},
|
|
17
20
|
"./style.css": "./dist/style.css",
|
|
18
|
-
"./dist/style.css": "./dist/style.css"
|
|
19
|
-
"./*": "./*"
|
|
21
|
+
"./dist/style.css": "./dist/style.css"
|
|
20
22
|
},
|
|
21
23
|
"files": [
|
|
22
24
|
"dist",
|
|
@@ -24,9 +26,7 @@
|
|
|
24
26
|
],
|
|
25
27
|
"scripts": {
|
|
26
28
|
"dev": "vite",
|
|
27
|
-
"build": "
|
|
28
|
-
"build:bundle": "vite build",
|
|
29
|
-
"build:types": "npx vue-tsc --declaration --emitDeclarationOnly --outDir dist/types",
|
|
29
|
+
"build": "vite build",
|
|
30
30
|
"type-check": "npx vue-tsc --noEmit",
|
|
31
31
|
"test": "vitest",
|
|
32
32
|
"test:ui": "vitest --ui",
|
|
@@ -54,10 +54,9 @@
|
|
|
54
54
|
"sass": "^1.97.0",
|
|
55
55
|
"typescript": "^5.0.0",
|
|
56
56
|
"vite": "^4.0.0",
|
|
57
|
+
"vite-plugin-dts": "^4.5.4",
|
|
57
58
|
"vitest": "^0.34.0",
|
|
58
59
|
"vue-tsc": "^3.2.1"
|
|
59
60
|
},
|
|
60
|
-
"dependencies": {
|
|
61
|
-
"sakura-preview-file": "file:.yalc/sakura-preview-file"
|
|
62
|
-
}
|
|
61
|
+
"dependencies": {}
|
|
63
62
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"fileNames":["../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/.pnpm/@vue+shared@3.5.25/node_modules/@vue/shared/dist/shared.d.ts","../node_modules/.pnpm/@vue+reactivity@3.5.25/node_modules/@vue/reactivity/dist/reactivity.d.ts","../node_modules/.pnpm/@vue+runtime-core@3.5.25/node_modules/@vue/runtime-core/dist/runtime-core.d.ts","../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../node_modules/.pnpm/@vue+runtime-dom@3.5.25/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts","../node_modules/.pnpm/vue@3.5.25_typescript@5.9.3/node_modules/vue/jsx-runtime/index.d.ts","../lib/preview-file/loading/props.ts","../lib/preview-file/type.ts","../node_modules/.pnpm/@vue+language-core@3.2.1/node_modules/@vue/language-core/types/template-helpers.d.ts","../node_modules/.pnpm/@vue+language-core@3.2.1/node_modules/@vue/language-core/types/props-fallback.d.ts","../node_modules/.pnpm/@babel+types@7.28.5/node_modules/@babel/types/lib/index.d.ts","../node_modules/.pnpm/@babel+parser@7.28.5/node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/.pnpm/@vue+compiler-core@3.5.25/node_modules/@vue/compiler-core/dist/compiler-core.d.ts","../node_modules/.pnpm/@vue+compiler-dom@3.5.25/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts","../node_modules/.pnpm/vue@3.5.25_typescript@5.9.3/node_modules/vue/dist/vue.d.mts","../node_modules/.pnpm/sakura-utils@1.0.7/node_modules/sakura-utils/dist/index.d.ts","../lib/preview-file/loading/circle.vue","../lib/preview-file/loading/dot.vue","../lib/preview-file/loading/progress.vue","../lib/preview-file/loading/cube.vue","../lib/preview-file/loading/index.ts","../lib/hooks/use-namespace/index.ts","../lib/utils/index.ts","../lib/hooks/use-file-state/index.ts","../lib/hooks/use-mouse-event/index.ts","../node_modules/.pnpm/@vueuse+shared@12.8.2_typescript@5.9.3/node_modules/@vueuse/shared/index.d.mts","../node_modules/.pnpm/@vueuse+core@12.8.2_typescript@5.9.3/node_modules/@vueuse/core/index.d.mts","../lib/hooks/use-wheel-event/index.ts","../lib/hooks/use-file-preview-tools/index.ts","../lib/hooks/index.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/shared/util.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/tools.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/toolbar.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/editor.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/freetext.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/highlight.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/draw.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/drawers/outline.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/drawers/inkdraw.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/ink.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/stamp.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/display_utils.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/text_accessibility.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/optional_content_config.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/annotation_storage.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/canvas_factory.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/cmap_reader_factory.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/filter_factory.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/standard_fontdata_factory.d.ts","../node_modules/.pnpm/@napi-rs+canvas@0.1.84/node_modules/@napi-rs/canvas/index.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/node_utils.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/metadata.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/shared/message_handler.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/api.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/interfaces.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/struct_tree_layer_builder.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/annotation_layer.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/draw_layer.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/annotation_editor_layer.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/editor/color_picker.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/svg_factory.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/worker_options.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/text_layer.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/touch_manager.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/display/xfa_layer.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/src/pdf.d.ts","../node_modules/.pnpm/vue-pdf-embed@2.1.3_vue@3.5.25_typescript@5.9.3_/node_modules/vue-pdf-embed/dist/types/types.d.ts","../node_modules/.pnpm/vue-pdf-embed@2.1.3_vue@3.5.25_typescript@5.9.3_/node_modules/vue-pdf-embed/dist/types/composables.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/annotation_layer_builder.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/download_manager.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/event_utils.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_find_controller.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/l10n.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/genericl10n.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_link_service.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/ui_utils.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_history.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/text_highlighter.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/text_layer_builder.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/xfa_layer_builder.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_scripting_manager.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_viewer.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_thumbnail_viewer.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_rendering_queue.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_page_view.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_scripting_manager.component.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_single_page_viewer.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/types/web/pdf_viewer.component.d.ts","../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/web/pdf_viewer.d.mts","../node_modules/.pnpm/vue-pdf-embed@2.1.3_vue@3.5.25_typescript@5.9.3_/node_modules/vue-pdf-embed/dist/types/vuepdfembed.vue.d.ts","../node_modules/.pnpm/vue-pdf-embed@2.1.3_vue@3.5.25_typescript@5.9.3_/node_modules/vue-pdf-embed/dist/types/index.d.ts","../lib/preview-file/event.ts","../lib/preview-file/pdf/use-preview-pdf.ts","../lib/preview-file/tools.vue","../lib/preview-file/pdf/pdf.vue","../node_modules/.pnpm/docx-preview@0.3.7/node_modules/docx-preview/dist/docx-preview.d.ts","../lib/preview-file/word/word.vue","../lib/preview-file/image/zoomin.vue","../lib/preview-file/image/zoomout.vue","../lib/preview-file/image/close.vue","../lib/preview-file/image/image.vue","../lib/preview-file/constant.ts","../lib/preview-file/preview-file.vue","../lib/preview-file/index.ts","../lib/index.ts","../lib/types/index.ts","../lib/types/pdfjs-dist.d.ts"],"fileIdsList":[[53,69,71,72,75,76],[53,62,77],[53,62,63,70,151],[53,62],[53,62,63,74],[53,151],[53,55,62],[53],[53,56,57,62],[53,55,56,57,62,63,74,77,145,146,147],[53,55,68,150],[53,54,56,57,62,63],[53,64,65,66,67],[53,55,56,57,62,63,70,77,138,139,140,141],[53,55,62,74],[53,54,55,56,57,62,63,68,77,142,144,148,149],[53,55,56,57,62,139],[53,54],[53,55,56,57,62,63,77,139,141,143],[154],[53,154],[58],[48,58,59],[60],[48],[48,49,50,52],[49,50,51,52],[62,73],[62],[89,90,92,101,102,103],[89,91,92,93,94,95,96,98,99,100],[79,81,82,83,87,88,89,90,102,104,105],[81],[85],[79,80,106],[81,106],[84,86],[93,94,95,96,97],[89,101],[89,92,102],[78,79,89,101,104,105,106,107,108,109,110,111,112],[78],[79,89,90,92,101,102,113],[102],[102,120],[101,102,118],[102,118],[89,91,102,113,116,118,121,126,127,131],[102,129,130],[128],[118],[129],[101,102,118,131],[103,116,117,118,119,121,122,123,124,126,127,129,132,133,134],[89,91,101,102,118,119,121,122,128,131],[118,119],[89,90,101,125],[89,92,101,102],[135],[62,101,114,154],[115,137],[62,101,114,136],[52,61],[52]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"f468b74459f1ad4473b36a36d49f2b255f3c6b5d536c81239c2b2971df089eaf","impliedFormat":1},{"version":"4ff3cc3b6d36d0b2f8353b88e41c757d40a1e66200fb87415b9e284ed1b19ed9","impliedFormat":1},{"version":"a4c03a45daf8b7ed7b9621f1aeba679b14fdaba396489a1a6a8117098b40078e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"df513895e96e0c3ba6a73d96c762b9fbc4f277f06f855d756e29b4068c9b8aff","impliedFormat":1},{"version":"318d19118bf6bf8d088441c948990f53cafc79ed581b78f3d41a0f7a3f5f145c","impliedFormat":1},{"version":"08f99a9224e89c8fa5c235928e55cba1f038397eeb40e6731be2fd5cb604d4dd","signature":"4b7a9b2f44beafb4f712eb02867de7055acab4a88b4638a4dc48ed36c10d19fb"},{"version":"82a8d35d695522038dbd862ecdf98c67cddc21a6148a1340967620614a13c47e","signature":"2edf0480692b56cc6a1d27bdbf205605507baa87fba6d97b09e3a528a59494c8"},{"version":"6df1e261ceb51e997b9cc7141f5edb8a4b53b03693813eaae0774b4b2fceb324","affectsGlobalScope":true,"impliedFormat":1},{"version":"0b346992df6d898a855dc7c681864f8f05f701e7f3ddfbf4686747b4788d54aa","affectsGlobalScope":true,"impliedFormat":1},{"version":"c2c2a861a338244d7dd700d0c52a78916b4bb75b98fc8ca5e7c501899fc03796","impliedFormat":1},{"version":"adb467429462e3891de5bb4a82a4189b92005d61c7f9367c089baf03997c104e","impliedFormat":1},{"version":"7477168b7b2b2dd69c8eba111f3d3ed1912ec968f3b63f0f940c0d830261b712","impliedFormat":1},{"version":"cf76e2f59b26aea7c923015783083b4820d6c0d85cda2fec3a0f232aabfc56c3","impliedFormat":1},{"version":"c0191592be8eb7906f99ac4b8798d80a585b94001ea1a5f50d6ce5b0d13a5c62","impliedFormat":99},{"version":"5ca9c7ad7918f5c4cb2bc7896c1caea5abd84c87a8a0c85bc5c9e10f60366657","impliedFormat":99},{"version":"51683e7fcce7847253e8441fc55066a42260e0980bd870dcbbd07bcb822e698c","signature":"cdb66a17ffdf9707a2a28fd807bbceee932af712a95e7539fbe2feb7bbe8a532"},{"version":"2b488255d1f964d753ba1355c8ac1504eea759ac006b4a3c6a3d81fbe2cadc6f","signature":"f76a5add3d6de337ec44ce0f9a44569856d35abcd8a6082f9fd44633fc680538"},{"version":"643525b887aacad2393b012da4778748eb3abea14b9c146a330c793b416aba32","signature":"21f3e29ede9b8a31db5769d5331d17446e4f8dcf741337a2a82368ba42c79b09"},{"version":"2a22d9001fa591a9dd0f990bc082ea3e1122218221832b1756c9784e42dd8286","signature":"9697cc1d2a8a3f8acb32772020775dac2e92ded3acf7e18f56a5731b43f28052"},{"version":"4185a1375cc3d9ad669b63e2d10c86c589000e8cd2e84e6fff35c33c47c7f492","signature":"dba1125d236597b825435b74adda40b47a919b8a769951a4aa0597375ced799a"},{"version":"e34dad05ef3f6ff82cd14effc28693b1d339f437da280998627ebd59a1a2225e","signature":"b5f3ad1c5bfd359781f77cd4c7a0a35e437795f6fb4490e2cc34a6aa9fe54da4"},{"version":"b28c2f0a03bc4f286de7fbf48339757ad02b8202f0c58ed0da80c0f68e03256a","signature":"ca32754813234d0f9988002433293099efcbd3ee2b67f531367fa78eef065aea"},{"version":"da46a16e9b5c3a1c2e33c7f5d615462a156604ca15c97d9938a7f38fad8e8128","signature":"85c008d28990097f1711b63fd9a2f40761a7e70a9e1056235b3c0489ba115abd"},{"version":"f3c8d19e4304879169990af3c42999a50a5f02f47fd4bcf2d5d1d71332e9fdf8","signature":"e4dee9beadb670c842f96d4e8eb2d7fbe08a22c290da08cb10049d827f5efd6f"},{"version":"5b2f1e43f07ae5590bd899398b23b2d114ed9c3b6b3fb4cb60d4c6216d712b87","impliedFormat":99},{"version":"94c8b35ee85f4a36f1536050dd2eed1490239340f72733d787b84f6ee13b3dbb","impliedFormat":99},{"version":"7d4ff228a26408a9bea8e924eb1102b1f33bc6d2fc7c4aec04c7e0cf4f291c9f","signature":"99bcb8f8e577755a24fdcb06ba3ff770305e7bfcd950c553aea31d1cec361104"},{"version":"f1a8a60710a45d849fa93619d033acbc3a4b0448a10de3dfc3ee5c697e06478d","signature":"33e076667b9df7df734bb903cc5836be1dddfb00eb4491398ddf1078dcc86e7c"},{"version":"1e7b949d41c760e813848a71ae3ac1929f549808e180510ce99d67468cf19d19","signature":"2390d14d49f13597dee7a2cb7e437e1497018ded7f7f7032f7a079c78f994ec0"},{"version":"53fda3abe6662d07e72613927e7a968e80d35613799dc3086ba7bbe4d59ddfae","impliedFormat":1},{"version":"5c725f17385565c7e3c78ec3a11b5a0f30d510323813406984d157c3431caaa8","impliedFormat":1},{"version":"636f588e6ea4f82381de50571b1c557ce5eeb8e34ee66d6b05b53ad6db125402","impliedFormat":1},{"version":"23d3bfea0763bfa4fbbbae4c1f90cd04582ec56bf39e22c300a5b10937c3b9b5","impliedFormat":1},{"version":"a1e9a6a7db7bc4e804080976fab5fbbc4cbfa2748a166f0af9f5f4d3818a2b83","impliedFormat":1},{"version":"0636b00dd562c55e1a44513713d6aa5b14aa6916c62943d7052afd1a43066eb9","impliedFormat":1},{"version":"cd354c7ad23abc89923588b5d568cb616d707ff8deec36c26ed39af302b08101","impliedFormat":1},{"version":"32b789a883704fb6be047f8a8f600685933eeda17f1ca9898ec42af0951bc5b1","impliedFormat":1},{"version":"5348f3b408c1584e0eb9a3d576268b8fed1e49d768dda3cd53f69c2e79fe3e1d","impliedFormat":1},{"version":"070e0020bdd10198d489056ba87d51b3108eef8f06c155c1cdae560df4de84a0","impliedFormat":1},{"version":"1817d049239173b4c33ddfebe3cd57f487d3689fe7a00889e52d8479df0ae874","impliedFormat":1},{"version":"a823a598bc97463c142805d90c244d0dc4c69798826bd52e01a1ce37eec50dc8","impliedFormat":1},{"version":"1705b40e0698ec8a6e844ba21fecec6b2fa5ecd6d126dbf7bfa8bf69e77b741c","impliedFormat":1},{"version":"06be66d549632ca988073fba2813f46253c1458543393bd3aa7ae8242eff6724","impliedFormat":1},{"version":"e631d9cf4e832195734f07e8ebcf3daa01f1abb5161137b25d0c384336fdf0f8","impliedFormat":1},{"version":"af04eab88984284356d9c55376b6b34bde50e8829fe227572096f7da1af668b7","impliedFormat":1},{"version":"6cc65f5e8033d5ee3f793a02b328b5e9b5b4c130a236b604e46dc35daab59b35","impliedFormat":1},{"version":"59a5cf5fe28bb6192bf1556ede3247b9f447df0afb58f355799d77637cc02938","impliedFormat":1},{"version":"21380278c92c8c5fc9a7ba08e1ef61ef5ff08d319b69d9d72f041464dc9f533e","impliedFormat":1},{"version":"a9b74f5e1715d0d7bc26c2f41e19f27605dc4c7f6e3303c3e8029d40dda5fa63","impliedFormat":1},{"version":"7ac626e15d0591568060aef70133fb70fec3cf291b1aafcbb1308a3ae882f4e7","impliedFormat":1},{"version":"bb5b39273362cc03aed160b19136fb5d17752b3fea99b038082b4c1b13bfb1ac","impliedFormat":1},{"version":"a8ecb53ccb5de8d9a86af853422709e542bde7d2b1a9c9fdacbfa98bbee03c03","impliedFormat":1},{"version":"5db5bbb96aa8a32fe1fe9f884902a9dc630f3ee41e82364a7678d06179a2310a","impliedFormat":1},{"version":"b72123b1d2bc40c98869b15dda3af4afa153dfeec5c1984ec3fc37b19b2138bf","impliedFormat":1},{"version":"08034b22390fe45b2773846c7802efbc63f289a4de760dace93b330ce2ef02d7","impliedFormat":1},{"version":"40fdb753dff144f033dbd7ab1d00a0d1c5cdd9784e9f94340b90dd3484dd37ce","impliedFormat":1},{"version":"cb818d5a60d4bd75c7193cf0484a0827a56d5ce747478450d43dde0a9abdad90","impliedFormat":1},{"version":"8e06e0e3454d6566e9ab29d9feadbe80085072ed34694c52851c3abe698daae3","impliedFormat":1},{"version":"120d183567e622fcaf1654355cf3ef6b2162e45b39389916e82bdd82444da76c","impliedFormat":1},{"version":"22759dfadc7f47badde31230a0a34ba6810f88b29ff314fb5e0ffd5fe91ba379","impliedFormat":1},{"version":"ed78498c4ca9640259a1077289759833c9f081b6d40a163ade6b231c2125f446","impliedFormat":1},{"version":"d75b17155d1e8bac72b02f631131d2c014f66144d156cb9c08ea8f8d653ea4d3","impliedFormat":1},{"version":"da1abaabcf85db5535481011edc5552983a03ce134d1b12844ee374686494721","impliedFormat":1},{"version":"027a4481143e6e6e28440b7f79e34ec1fd7bb0ddfced3d701694a1940c19672e","impliedFormat":1},{"version":"0fce014e1b25dcd6d1be951bd80d90eb7528ef5bc52010ec2ec2e930f08c14b9","impliedFormat":1},{"version":"fa1f82e952db573f44dd9762722dd79971ec6bdfe47d97fea0d46ca01d74aecb","impliedFormat":1},{"version":"4526705dea5faf9dacd4dc49a040e335209a7e1213909e7dc56f17757b9e5b4e","impliedFormat":1},{"version":"1a07c03474666977ec9892cf76d2fff54e7412466ec02f8065088dd88992d0a1","impliedFormat":1},{"version":"80c441898e72d951f96ad4ece1ae9ccc95e66955f2727c06050f83443c4ed6aa","impliedFormat":1},{"version":"2735940aacc8b96e08021595e425625d84d979ab329e61e402e0637c981d0e22","impliedFormat":1},{"version":"216b10a20041186db0e7d6260bb0455c95e95eb884eef2749d4e04f072b3de73","impliedFormat":1},{"version":"a4d1607eed16943cb9665e36560b0e4bcc9a2f85267edd5c2e7f7e122f669909","impliedFormat":1},{"version":"30bd0c880dcc3182d72819f8983e401ee87a854935246cca1951c78ea5fc2b97","impliedFormat":1},{"version":"774913e8f0e9feab32cd87c6fa57a6a74c9ecbc61c83ae00eab7735df42f0e4f","impliedFormat":1},{"version":"6424b7042f83d6ad7b9acc3c823e3def8df004bdb64ad52a4b8f3a2e3ad2b07c","impliedFormat":1},{"version":"a0a8dca948649a0fd90d8e4a223ff1a5a460e3c682ca740e1f311bbce5266586","impliedFormat":1},{"version":"7cc647c90e6bbb4e4fb866f8deb8f1a6a742129135a9c10b57ff787dbf7c3fa5","impliedFormat":1},{"version":"58619921d15ce4b4e64387bfa7f23f5618f7a687589db4d1c747524dfcb501bb","impliedFormat":1},{"version":"200c930a381230544933bb05dbee9196869bdb107981b21c99366ffba4971c33","impliedFormat":1},{"version":"41a24fe58dcfddc543a1df12eff551d9b04e66275dd3c6ef078c5e58ca8ce1ce","impliedFormat":1},{"version":"831242288ca62422d136667c51fec464e79350895578f6b4d5a08ad8f69d38fa","impliedFormat":1},{"version":"935bda0488a6e92c3ceff1607a093f126fbcc5a839422c25b3fd267ca9daf2dc","impliedFormat":1},{"version":"b2ada5425e9fb05e85195149131db9427102370cfe33846615cf83e960abf585","impliedFormat":1},{"version":"83b8a78f4f341d9c0c40cd846dc80859c10173ebd430fe2c8d192783829d1402","impliedFormat":1},{"version":"e68c0160c90b14d4b56de5a511770d86d0df85c482248840fa7972520b5291d6","impliedFormat":1},{"version":"670de16502dfdb66b259b73fb7fe3046128a5d15cd4ecc91d4a357fc9da21ee1","impliedFormat":1},{"version":"784afb222209864ed79a8c5b914947940e4cef58e1a31b597321db7305703a96","impliedFormat":1},{"version":"85ad88b315ef15eff4fa2311c4a1d29aa77e1db0355de822a14cb007c2b713b4","impliedFormat":99},{"version":"7896b98249a3d5f0ecde1a1e1ab00e28d54b6aadee85b02a3ec9dfaebd5a7130","impliedFormat":1},{"version":"001532a17f7dffc340512e01660a570739398aab8d73e38c9771719fe5398e54","impliedFormat":1},{"version":"a4acc38c943f0496ceee938251fa18781dee8befc539c8f643d2296301a3be60","signature":"2774d94abe13cf7ac65d091677006552c448447b0b40d206b6e408244c0c8005"},{"version":"92c37b7425885a02dd908f8c99f4d91ac6a6230b1696a3465c4e96ddeb683bd1","signature":"6cdcdde0ed9c90a9d2971317f0744a680aa306585a1412d03b8bfe08a4b296a7"},{"version":"98dd8b1ce254479a64293c21532dff6ea6b2e491bd1ada5ba12daf4406ac9a39","signature":"a60bc10a9405e4c93d5ed4c78238535c9f21af558eecc10d1e2569eb8010339f"},{"version":"5295d5a180a570e72e0e7c1bc7dce91e6cf42dac504f4566196b9958ae4e10d3","signature":"4bc2f10e28e3c4ff2299ac61a166db1c3c1a162208a4545e78fd528e813a8ad8"},{"version":"2071eb2c0425b688f7a86feb18bf6d39423803fd7f37c83b2811f67e07a4b9b9","impliedFormat":1},{"version":"9abca8913c5b1e29c195171001f8af5b8b3f38d3e0bc75dc05d9481189f14c36","signature":"c26fd9d247849d89481e3f8809e71e4ec4241dd1475a2c4f9671076056f4606d"},{"version":"5fecfdbb6bacfe82c884f9696227b9515736a34eed9e2c396db34365c1252003","signature":"720c2acbad2528546f9260e00b918ba43830a5f1497e24d738c9125ca36063d0"},{"version":"118fbc24e4723e37a3c42fa3e5db9d2d7840f56fc63f4ddecb5238c2ad0cbbd6","signature":"720c2acbad2528546f9260e00b918ba43830a5f1497e24d738c9125ca36063d0"},{"version":"66c93c71eeddf4f42116cf448c15e42300f35409f2f95e9c4a61aafae11f999e","signature":"720c2acbad2528546f9260e00b918ba43830a5f1497e24d738c9125ca36063d0"},{"version":"f4789877267b3801efc27b0cca163f1ac6826a1e91b44d4cb6d50038f4cade37","signature":"a6a18397382b4eabd664255c14cc95e48a9a5ee2bb5cc61eb463efb6ac500748"},{"version":"b29351cc6fb8224ca51f63c017e0336ffcc3628a910163805002607f2a72f928","signature":"7891c2d0c1fa2212a8168e7134b136636321ab2eb4fb85b440d6d58b91147d19"},{"version":"7c64b261cc553e689fd7083089608a1ac789653da1802658b670cc20bee53500","signature":"834f049c9f5738b3f5a678753df28228c56a2044a403fa44261f78b936d5298e"},{"version":"02a665082531ebc7c44c27a56fba055c603bdffefadcb96078ff14819cb5187d","signature":"b437bcc05dc42c132e9775b5b12af5d9f2cb493f3c4c82a9c201ece9e47e9cb5"},{"version":"9aae062bc914ede635a44512e876860b1ceb2a2c78406d890423882f15ce4ebe","signature":"374a8c648f09cf5826a53bbf90e8b89f1d0fd6ad59e6393b59e3f08c9489569e"},{"version":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"e5843b79d81687feddb975f07f7b78557e73704df202192ee8af5295f4e68d9e"],"root":[54,55,[64,72],[75,77],[139,142],[144,154]],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"declarationDir":"./types","declarationMap":false,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":1,"jsxImportSource":"vue","module":99,"noFallthroughCasesInSwitch":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./types","rootDir":"../lib","skipLibCheck":true,"strict":true,"target":7,"useDefineForClassFields":true,"verbatimModuleSyntax":true},"referencedMap":[[77,1],[76,2],[71,3],[72,4],[69,4],[75,5],[152,6],[149,7],[139,8],[147,9],[148,10],[145,9],[146,9],[151,11],[64,12],[67,12],[65,12],[68,13],[66,12],[54,8],[142,14],[140,15],[150,16],[141,17],[55,18],[144,19],[153,8],[154,20],[70,21],[59,22],[60,23],[61,24],[49,25],[50,26],[52,27],[74,28],[73,29],[104,30],[101,31],[106,32],[84,33],[86,34],[81,35],[82,36],[83,33],[87,37],[88,33],[79,36],[98,38],[110,39],[112,40],[113,41],[100,42],[116,43],[117,44],[121,45],[102,39],[120,44],[119,46],[124,47],[122,47],[132,48],[131,49],[133,50],[128,51],[134,52],[130,53],[135,54],[129,55],[125,56],[126,57],[127,58],[136,59],[115,60],[138,61],[114,20],[137,62],[62,63],[53,64]],"latestChangedDtsFile":"./types/types/index.d.ts","version":"5.9.3"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
export declare const usePreviewFileTools: (fileUrl: Ref<string>, pageNum?: Ref<number>) => {
|
|
3
|
-
wrapperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
4
|
-
onWheel: (e: WheelEvent) => void;
|
|
5
|
-
clickMinusScale: import("@vueuse/core").PromisifyFn<() => void>;
|
|
6
|
-
clickPlusScale: import("@vueuse/core").PromisifyFn<() => void>;
|
|
7
|
-
resetWheelState: () => void;
|
|
8
|
-
scale: Ref<number, number>;
|
|
9
|
-
scaleText: import("vue").ComputedRef<string>;
|
|
10
|
-
isMouseDown: Ref<boolean, boolean>;
|
|
11
|
-
onMouseStart: (e: MouseEvent) => void;
|
|
12
|
-
resetMouseState: () => void;
|
|
13
|
-
translateX: Ref<number, number>;
|
|
14
|
-
translateY: Ref<number, number>;
|
|
15
|
-
wrapperStyle: import("vue").ComputedRef<{
|
|
16
|
-
transform: string;
|
|
17
|
-
transformOrigin: string;
|
|
18
|
-
}>;
|
|
19
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const useMouseEvent: () => {
|
|
2
|
-
resetMouseState: () => void;
|
|
3
|
-
onMouseStart: (e: MouseEvent) => void;
|
|
4
|
-
translateX: import("vue").Ref<number, number>;
|
|
5
|
-
translateY: import("vue").Ref<number, number>;
|
|
6
|
-
isMouseDown: import("vue").Ref<boolean, boolean>;
|
|
7
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* 默认的命名空间前缀
|
|
4
|
-
*/
|
|
5
|
-
export declare const defaultNamespace = "sakura";
|
|
6
|
-
/**
|
|
7
|
-
* 创建组件的命名空间
|
|
8
|
-
* @param block 组件名称
|
|
9
|
-
* @param namespaceOverrides 传递了的话就会重写命名空间不传则”s“
|
|
10
|
-
*/
|
|
11
|
-
export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined> | string) => {
|
|
12
|
-
b: (blockSuffix?: string) => string;
|
|
13
|
-
e: (element?: string) => string;
|
|
14
|
-
m: (modifier?: string) => string;
|
|
15
|
-
be: (blockSuffix?: string, element?: string) => string;
|
|
16
|
-
em: (element?: string, modifier?: string) => string;
|
|
17
|
-
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
18
|
-
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
19
|
-
is: (name: string, ...args: any[]) => string;
|
|
20
|
-
cssVar: (object: Record<string, any>) => Record<string, any>;
|
|
21
|
-
cssBlockVar: (block: string, object: Record<string, any>) => Record<string, any>;
|
|
22
|
-
cssVarName: (name: string) => string;
|
|
23
|
-
cssBlockVarName: (block: string, name: string) => string;
|
|
24
|
-
cssVarNameValue: (name: string) => string;
|
|
25
|
-
cssBlockVarNameValue: (block: string, name: string) => string;
|
|
26
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const useWheelEvent: (state?: WheelEventState) => {
|
|
2
|
-
clickMinusScale: import("@vueuse/core").PromisifyFn<() => void>;
|
|
3
|
-
clickPlusScale: import("@vueuse/core").PromisifyFn<() => void>;
|
|
4
|
-
scale: import("vue").Ref<number, number>;
|
|
5
|
-
scaleText: import("vue").ComputedRef<string>;
|
|
6
|
-
onWheel: (e: WheelEvent) => void;
|
|
7
|
-
resetWheelState: () => void;
|
|
8
|
-
};
|
|
9
|
-
export type WheelEventState = Partial<{
|
|
10
|
-
stepNum: number;
|
|
11
|
-
minScale: number;
|
|
12
|
-
maxScale: number;
|
|
13
|
-
wheelNum: number;
|
|
14
|
-
}>;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
declare const _default: typeof __VLS_export;
|
|
3
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { PreviewImageProps } from '../type';
|
|
2
|
-
type __VLS_Props = PreviewImageProps;
|
|
3
|
-
declare const pdfLoading: import("vue").ModelRef<boolean, string, boolean, boolean>;
|
|
4
|
-
type __VLS_ModelProps = {
|
|
5
|
-
'modelValue'?: typeof pdfLoading['value'];
|
|
6
|
-
};
|
|
7
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
-
"update:modelValue": (value: boolean) => any;
|
|
10
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
12
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
-
declare const _default: typeof __VLS_export;
|
|
14
|
-
export default _default;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
declare const _default: typeof __VLS_export;
|
|
3
|
-
export default _default;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
declare const _default: typeof __VLS_export;
|
|
3
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { CircleProps } from './props';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<CircleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CircleProps> & Readonly<{}>, {
|
|
3
|
-
size: string | number;
|
|
4
|
-
color: string;
|
|
5
|
-
duration: number | string;
|
|
6
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
-
declare const _default: typeof __VLS_export;
|
|
8
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { CubeProps } from './props';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<CubeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CubeProps> & Readonly<{}>, {
|
|
3
|
-
size: string | number;
|
|
4
|
-
color: string;
|
|
5
|
-
duration: string | number;
|
|
6
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
-
declare const _default: typeof __VLS_export;
|
|
8
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DotProps } from './props';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<DotProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DotProps> & Readonly<{}>, {
|
|
3
|
-
size: string | number;
|
|
4
|
-
color: string;
|
|
5
|
-
duration: number | string;
|
|
6
|
-
gap: string | number;
|
|
7
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
-
declare const _default: typeof __VLS_export;
|
|
9
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ProgressProps } from './props';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
|
|
3
|
-
width: string | number;
|
|
4
|
-
height: string | number;
|
|
5
|
-
color: string;
|
|
6
|
-
duration: string | number;
|
|
7
|
-
background: string;
|
|
8
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
declare const _default: typeof __VLS_export;
|
|
10
|
-
export default _default;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
Circle: import("vue").DefineComponent<import("./props.ts").CircleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("./props.ts").CircleProps> & Readonly<{}>, {
|
|
3
|
-
size: string | number;
|
|
4
|
-
color: string;
|
|
5
|
-
duration: number | string;
|
|
6
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
-
Dot: import("vue").DefineComponent<import("./props.ts").DotProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("./props.ts").DotProps> & Readonly<{}>, {
|
|
8
|
-
size: string | number;
|
|
9
|
-
color: string;
|
|
10
|
-
duration: number | string;
|
|
11
|
-
gap: string | number;
|
|
12
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
-
Progress: import("vue").DefineComponent<import("./props.ts").ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("./props.ts").ProgressProps> & Readonly<{}>, {
|
|
14
|
-
width: string | number;
|
|
15
|
-
height: string | number;
|
|
16
|
-
color: string;
|
|
17
|
-
duration: string | number;
|
|
18
|
-
background: string;
|
|
19
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
-
Cube: import("vue").DefineComponent<import("./props.ts").CubeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("./props.ts").CubeProps> & Readonly<{}>, {
|
|
21
|
-
size: string | number;
|
|
22
|
-
color: string;
|
|
23
|
-
duration: string | number;
|
|
24
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
-
};
|
|
26
|
-
export default _default;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 圆形加载
|
|
3
|
-
*/
|
|
4
|
-
export type CircleProps = {
|
|
5
|
-
size?: string | number;
|
|
6
|
-
color?: string;
|
|
7
|
-
duration?: number | string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* 旋转方块加载
|
|
11
|
-
*/
|
|
12
|
-
export type CubeProps = {
|
|
13
|
-
size?: string | number;
|
|
14
|
-
color?: string;
|
|
15
|
-
duration?: string | number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* 点状动画
|
|
19
|
-
*/
|
|
20
|
-
export type DotProps = {
|
|
21
|
-
gap?: string | number;
|
|
22
|
-
color?: string;
|
|
23
|
-
size?: string | number;
|
|
24
|
-
duration?: number | string;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* 进度条动画
|
|
28
|
-
*/
|
|
29
|
-
export type ProgressProps = {
|
|
30
|
-
width?: string | number;
|
|
31
|
-
height?: string | number;
|
|
32
|
-
background?: string;
|
|
33
|
-
radius?: string | number;
|
|
34
|
-
color?: string;
|
|
35
|
-
duration?: string | number;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* 加载属性集合
|
|
39
|
-
*/
|
|
40
|
-
export type LoadingProps = CircleProps & DotProps & CubeProps & ProgressProps;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { PreviewPdfProps } from '../type';
|
|
2
|
-
type __VLS_Props = PreviewPdfProps;
|
|
3
|
-
declare const pdfLoading: import("vue").ModelRef<boolean, string, boolean, boolean>;
|
|
4
|
-
type __VLS_ModelProps = {
|
|
5
|
-
'modelValue'?: typeof pdfLoading['value'];
|
|
6
|
-
};
|
|
7
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
-
declare var __VLS_22: {
|
|
9
|
-
fileDataState: {
|
|
10
|
-
pageNum: number;
|
|
11
|
-
total: number;
|
|
12
|
-
isError: boolean;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
type __VLS_Slots = {} & {
|
|
16
|
-
default?: (props: typeof __VLS_22) => any;
|
|
17
|
-
};
|
|
18
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
-
loaded: (...args: any[]) => void;
|
|
20
|
-
"update:modelValue": (value: boolean) => void;
|
|
21
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
-
onLoaded?: ((...args: any[]) => any) | undefined;
|
|
23
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
24
|
-
}>, {
|
|
25
|
-
enablePagination: boolean;
|
|
26
|
-
enableMove: boolean;
|
|
27
|
-
enableScale: boolean;
|
|
28
|
-
showTools: boolean;
|
|
29
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
-
declare const _default: typeof __VLS_export;
|
|
32
|
-
export default _default;
|
|
33
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
-
new (): {
|
|
35
|
-
$slots: S;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PreviewPdfState } from '../type';
|
|
2
|
-
export declare const usePreviewPdf: (state: PreviewPdfState) => {
|
|
3
|
-
nextPage: import("@vueuse/core").PromisifyFn<() => void>;
|
|
4
|
-
nextPageDisabled: import("vue").ComputedRef<boolean>;
|
|
5
|
-
prevPage: import("@vueuse/core").PromisifyFn<() => void>;
|
|
6
|
-
prevPageDisabled: import("vue").ComputedRef<boolean>;
|
|
7
|
-
_pageNum: import("vue").Ref<number, number>;
|
|
8
|
-
onPageNumChange: () => void;
|
|
9
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { PreviewToolsProps } from './type';
|
|
2
|
-
type __VLS_Props = PreviewToolsProps;
|
|
3
|
-
declare const _pageNum: import("vue").ModelRef<number, string, number, number>;
|
|
4
|
-
type __VLS_ModelProps = {
|
|
5
|
-
'modelValue'?: typeof _pageNum['value'];
|
|
6
|
-
};
|
|
7
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
-
declare var __VLS_1: {};
|
|
9
|
-
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof __VLS_1) => any;
|
|
11
|
-
};
|
|
12
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
-
change: (...args: any[]) => void;
|
|
14
|
-
next: (...args: any[]) => void;
|
|
15
|
-
prev: (...args: any[]) => void;
|
|
16
|
-
zoomIn: (...args: any[]) => void;
|
|
17
|
-
zoomOut: (...args: any[]) => void;
|
|
18
|
-
"update:modelValue": (value: number) => void;
|
|
19
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
21
|
-
onNext?: ((...args: any[]) => any) | undefined;
|
|
22
|
-
onPrev?: ((...args: any[]) => any) | undefined;
|
|
23
|
-
onZoomIn?: ((...args: any[]) => any) | undefined;
|
|
24
|
-
onZoomOut?: ((...args: any[]) => any) | undefined;
|
|
25
|
-
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
26
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
-
declare const _default: typeof __VLS_export;
|
|
29
|
-
export default _default;
|
|
30
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
-
new (): {
|
|
32
|
-
$slots: S;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { PreviewWordProps } from '../type';
|
|
2
|
-
type __VLS_Props = PreviewWordProps;
|
|
3
|
-
declare const wordLoading: import("vue").ModelRef<boolean, string, boolean, boolean>;
|
|
4
|
-
type __VLS_ModelProps = {
|
|
5
|
-
'modelValue'?: typeof wordLoading['value'];
|
|
6
|
-
};
|
|
7
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
-
declare var __VLS_10: {};
|
|
9
|
-
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof __VLS_10) => any;
|
|
11
|
-
};
|
|
12
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
-
loaded: (...args: any[]) => void;
|
|
14
|
-
"update:modelValue": (value: boolean) => void;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
-
onLoaded?: ((...args: any[]) => any) | undefined;
|
|
17
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
18
|
-
}>, {
|
|
19
|
-
showTools: boolean;
|
|
20
|
-
isLocalFile: boolean;
|
|
21
|
-
enableWrapper: boolean;
|
|
22
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
-
declare const _default: typeof __VLS_export;
|
|
25
|
-
export default _default;
|
|
26
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
-
new (): {
|
|
28
|
-
$slots: S;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 事件
|
|
3
|
-
*/
|
|
4
|
-
export declare enum EVENT_NAME {
|
|
5
|
-
/**
|
|
6
|
-
* 加载完成
|
|
7
|
-
*/
|
|
8
|
-
完成 = "loaded",
|
|
9
|
-
/**
|
|
10
|
-
* 改变
|
|
11
|
-
*/
|
|
12
|
-
改变 = "change",
|
|
13
|
-
/**
|
|
14
|
-
* 下一页
|
|
15
|
-
*/
|
|
16
|
-
下一页 = "next",
|
|
17
|
-
/**
|
|
18
|
-
* 上一页
|
|
19
|
-
*/
|
|
20
|
-
上一页 = "prev",
|
|
21
|
-
/**
|
|
22
|
-
* 放大
|
|
23
|
-
*/
|
|
24
|
-
放大 = "zoomIn",
|
|
25
|
-
/**
|
|
26
|
-
* 缩小
|
|
27
|
-
*/
|
|
28
|
-
缩小 = "zoomOut"
|
|
29
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './type';
|
|
2
|
-
import '../style/index.scss';
|
|
3
|
-
import Loading from './Loading';
|
|
4
|
-
import PreviewFileComponent from './preview-file.vue';
|
|
5
|
-
declare const PreviewFile: typeof PreviewFileComponent & {
|
|
6
|
-
install: (app: any) => void;
|
|
7
|
-
};
|
|
8
|
-
export { PreviewFile, Loading };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { PreviewFileProps } from './type';
|
|
2
|
-
import type { LoadingProps } from './Loading/props';
|
|
3
|
-
type __VLS_Slots = {
|
|
4
|
-
default?: (props: {
|
|
5
|
-
fileState: {
|
|
6
|
-
pageNum: number;
|
|
7
|
-
total: number;
|
|
8
|
-
isError: boolean;
|
|
9
|
-
};
|
|
10
|
-
data: PreviewFileProps;
|
|
11
|
-
}) => any;
|
|
12
|
-
};
|
|
13
|
-
declare const __VLS_base: import("vue").DefineComponent<PreviewFileProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PreviewFileProps> & Readonly<{}>, {
|
|
14
|
-
enablePagination: boolean;
|
|
15
|
-
enableMove: boolean;
|
|
16
|
-
enableScale: boolean;
|
|
17
|
-
width: string | number;
|
|
18
|
-
height: string | number;
|
|
19
|
-
loadingType: "circle" | "cube" | "dot" | "progress";
|
|
20
|
-
loadingState: LoadingProps;
|
|
21
|
-
convertToLocalFileUrl: boolean;
|
|
22
|
-
themeColor: string;
|
|
23
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
-
declare const _default: typeof __VLS_export;
|
|
26
|
-
export default _default;
|
|
27
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
-
new (): {
|
|
29
|
-
$slots: S;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { LoadingProps } from './Loading/props';
|
|
2
|
-
/**
|
|
3
|
-
* 预览文件props
|
|
4
|
-
*/
|
|
5
|
-
export type PreviewFileProps = {
|
|
6
|
-
width?: string | number;
|
|
7
|
-
height?: string | number;
|
|
8
|
-
src: string | Blob;
|
|
9
|
-
enablePagination?: boolean;
|
|
10
|
-
enableScale?: boolean;
|
|
11
|
-
enableMove?: boolean;
|
|
12
|
-
loadingType?: 'circle' | 'cube' | 'dot' | 'progress';
|
|
13
|
-
loadingState?: LoadingProps;
|
|
14
|
-
convertToLocalFileUrl?: boolean;
|
|
15
|
-
themeColor?: string;
|
|
16
|
-
};
|
|
17
|
-
export type PreviewToolsProps = {
|
|
18
|
-
showTools?: boolean;
|
|
19
|
-
total?: number;
|
|
20
|
-
scaleText?: string;
|
|
21
|
-
nextPageDisabled?: boolean;
|
|
22
|
-
prevPageDisabled?: boolean;
|
|
23
|
-
} & Pick<PreviewFileProps, 'enablePagination' | 'enableMove' | 'enableScale'>;
|
|
24
|
-
/**
|
|
25
|
-
* 预览文件数据props
|
|
26
|
-
*/
|
|
27
|
-
export type PreviewFileDataProps = Pick<PreviewFileProps, 'enablePagination' | 'enableScale' | 'enableMove'> & {
|
|
28
|
-
fileUrl: string;
|
|
29
|
-
showTools?: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* 预览地址
|
|
33
|
-
*/
|
|
34
|
-
export type PreviewPdfProps = PreviewFileDataProps;
|
|
35
|
-
/**
|
|
36
|
-
* 预览pdf参数
|
|
37
|
-
*/
|
|
38
|
-
export type PreviewPdfState = {
|
|
39
|
-
pageNum: number;
|
|
40
|
-
total: number;
|
|
41
|
-
isError: boolean;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* pdf拖拽参数
|
|
45
|
-
*/
|
|
46
|
-
export type DragState = {
|
|
47
|
-
x: number;
|
|
48
|
-
y: number;
|
|
49
|
-
startX: number;
|
|
50
|
-
startY: number;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* 预览word数据props
|
|
54
|
-
*/
|
|
55
|
-
export type PreviewWordProps = PreviewFileDataProps & {
|
|
56
|
-
isLocalFile?: boolean;
|
|
57
|
-
enableWrapper?: boolean;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* 预览image
|
|
61
|
-
*/
|
|
62
|
-
export type PreviewImageProps = PreviewFileDataProps & {
|
|
63
|
-
showTools?: boolean;
|
|
64
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 是否是流数据
|
|
3
|
-
* @param value
|
|
4
|
-
*/
|
|
5
|
-
export declare const isBlob: (value: any) => value is Blob;
|
|
6
|
-
/**
|
|
7
|
-
* 获取PDF文件的页数
|
|
8
|
-
* @param fileUrl - PDF文件地址
|
|
9
|
-
* @returns PDF页数
|
|
10
|
-
*/
|
|
11
|
-
export declare const getPdfPageCount: (fileUrl: string) => Promise<number>;
|
|
12
|
-
/**
|
|
13
|
-
* 获取预览pdf配置
|
|
14
|
-
*/
|
|
15
|
-
export declare const getConfigurePdfJs: () => {
|
|
16
|
-
fontExtraProperties: boolean;
|
|
17
|
-
cMapUrl: string;
|
|
18
|
-
cMapPacked: boolean;
|
|
19
|
-
disableFontFace: boolean;
|
|
20
|
-
enableXfa: boolean;
|
|
21
|
-
fontLoadTimeout: number;
|
|
22
|
-
verbosity: number;
|
|
23
|
-
};
|