@flyfish-group/file-viewer 1.0.6 → 1.0.8

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.
@@ -1 +1 @@
1
- var m=b;(function(d,e){var j=b,f=d();while(!![]){try{var g=-parseInt(j(0x121))/0x1+-parseInt(j(0x124))/0x2+-parseInt(j(0x126))/0x3*(-parseInt(j(0x128))/0x4)+-parseInt(j(0x122))/0x5+-parseInt(j(0x123))/0x6+-parseInt(j(0x129))/0x7+parseInt(j(0x125))/0x8;if(g===e)break;else f['push'](f['shift']());}catch(h){f['push'](f['shift']());}}}(a,0x859d5));var s=Object['defineProperty'],n=(d,f,g)=>f in d?s(d,f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':g}):d[f]=g,l=(d,f,g)=>(n(d,typeof f!='symbol'?f+'':f,g),g);const u='/node_modules/@flyfish-group/file-viewer/dist/worker/';function b(c,d){c=c-0x121;var e=a();var f=e[c];return f;}class i{constructor(d){var k=b;l(this,'worker',null),this[k(0x127)]=d;}[m(0x12a)](d){return this['worker']||d();}}function a(){var o=['333060cKVAzX','1458190IcEfha','17830384BfeuvR','150189czAaoj','worker','28bBNoHg','2593066EYOyUA','defaults','14235lhSXHa','4313380QZZaaA'];a=function(){return o;};return a();}function c(d,f=!0x1){let g=null;const h=''+u+d;return g=new Worker(new URL(h,import.meta.url),{'type':f?'module':'classic'}),new i(g);}export{c as r};
1
+ (function(d,e){var j=b,f=d();while(!![]){try{var g=parseInt(j(0xe3))/0x1+-parseInt(j(0xde))/0x2*(-parseInt(j(0xe0))/0x3)+parseInt(j(0xe4))/0x4*(-parseInt(j(0xe6))/0x5)+-parseInt(j(0xe7))/0x6+parseInt(j(0xe5))/0x7*(parseInt(j(0xe1))/0x8)+parseInt(j(0xdf))/0x9+parseInt(j(0xe2))/0xa*(-parseInt(j(0xdd))/0xb);if(g===e)break;else f['push'](f['shift']());}catch(h){f['push'](f['shift']());}}}(a,0xa722c));var s=Object['defineProperty'],n=(d,f,g)=>f in d?s(d,f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':g}):d[f]=g,l=(d,f,g)=>(n(d,typeof f!='symbol'?f+'':f,g),g);function a(){var k=['3501424mJjqlI','590peFTMW','808601ORHzZO','39700WEvUju','7wVweaW','80TEoEzy','1900062mObjcg','106513uihQzA','19966lzREEj','2658654JodbvI','57VmqMcU'];a=function(){return k;};return a();}const u='/node_modules/@flyfish-group/file-viewer/dist/worker/';class i{constructor(d){l(this,'worker',null),this['worker']=d;}['defaults'](d){return this['worker']||d();}}function c(d,f=!0x1){let g=null;const h=''+u+d;return g=new Worker(new URL(h,import.meta.url),{'type':f?'module':'classic'}),new i(g);}function b(c,d){c=c-0xdd;var e=a();var f=e[c];return f;}export{c as r};
package/dist/index.d.ts CHANGED
@@ -18,24 +18,55 @@ declare const _default: Installer;
18
18
  export default _default;
19
19
 
20
20
  /**
21
- * 文件引用,支持三种
21
+ * 组件可接受的本地二进制来源。
22
+ *
23
+ * 对外接入时最推荐传入带正确文件名的 `File`。如果业务侧拿到的是
24
+ * `Blob` 或 `ArrayBuffer`,请先包装成 `new File([...], 'demo.pdf')`,
25
+ * 这样渲染器才能通过扩展名选择正确的预览链路。
22
26
  */
23
27
  declare type FileRef = File | Blob | ArrayBuffer;
24
28
 
25
29
  export declare const FileViewer: DefineComponent<__VLS_TypePropsToRuntimeProps<{
30
+ /**
31
+ * 本地二进制输入。优先级高于 `url`。
32
+ *
33
+ * 推荐传入带正确扩展名的 `File`;如果业务侧只有 Blob 或 ArrayBuffer,
34
+ * 请先包装成 `new File([...], 'demo.pdf')`,保证格式识别稳定。
35
+ */
26
36
  file?: FileRef | undefined;
37
+ /**
38
+ * 远端文件地址。组件会在浏览器内下载该地址,再根据路径里的扩展名选择渲染器。
39
+ *
40
+ * 目标资源必须允许浏览器访问;鉴权或无扩展名下载接口建议由宿主侧先取回,
41
+ * 再通过 `file` 参数传入。
42
+ */
27
43
  url?: string | undefined;
28
44
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
45
+ /**
46
+ * 本地二进制输入。优先级高于 `url`。
47
+ *
48
+ * 推荐传入带正确扩展名的 `File`;如果业务侧只有 Blob 或 ArrayBuffer,
49
+ * 请先包装成 `new File([...], 'demo.pdf')`,保证格式识别稳定。
50
+ */
29
51
  file?: FileRef | undefined;
52
+ /**
53
+ * 远端文件地址。组件会在浏览器内下载该地址,再根据路径里的扩展名选择渲染器。
54
+ *
55
+ * 目标资源必须允许浏览器访问;鉴权或无扩展名下载接口建议由宿主侧先取回,
56
+ * 再通过 `file` 参数传入。
57
+ */
30
58
  url?: string | undefined;
31
59
  }>>>, {}>;
32
60
 
33
61
  declare interface FileViewerInstaller {
62
+ /**
63
+ * 全局注册 `<file-viewer>` 组件。
64
+ */
34
65
  install(Vue: any): void;
35
66
  }
36
67
 
37
68
  /**
38
- * 安装器
69
+ * Vue2 插件安装器。
39
70
  */
40
71
  declare class Installer implements FileViewerInstaller {
41
72
  private installed;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- (function(f,g){var k=c,h=f();while(!![]){try{var i=parseInt(k(0xa9))/0x1*(-parseInt(k(0xaa))/0x2)+-parseInt(k(0xab))/0x3+-parseInt(k(0xa8))/0x4+parseInt(k(0xa7))/0x5+-parseInt(k(0xa6))/0x6+parseInt(k(0xa4))/0x7+parseInt(k(0xa5))/0x8;if(i===g)break;else h['push'](h['shift']());}catch(j){h['push'](h['shift']());}}}(b,0x64ead));function b(){var l=['147160lzDDQy','1425240hZbxFI','790534mIEjdI','2FJxHbF','1065438yFjbJt','1591065hKQDpe','19728416dDpybF','4844592WggpNE'];b=function(){return l;};return b();}import{F as d,i as e}from'./components/index.js';import'vue';function c(a,d){a=a-0xa4;var e=b();var f=e[a];return f;}export{d as FileViewer,e as default};
1
+ (function(f,g){var k=c,h=f();while(!![]){try{var i=-parseInt(k(0x1f2))/0x1+-parseInt(k(0x1f4))/0x2*(-parseInt(k(0x1f7))/0x3)+-parseInt(k(0x1f5))/0x4*(parseInt(k(0x1f6))/0x5)+-parseInt(k(0x1f3))/0x6*(-parseInt(k(0x1f8))/0x7)+-parseInt(k(0x1f1))/0x8+parseInt(k(0x1f0))/0x9+parseInt(k(0x1ef))/0xa;if(i===g)break;else h['push'](h['shift']());}catch(j){h['push'](h['shift']());}}}(b,0x58145));import{F as d,i as e}from'./components/index.js';function b(){var l=['4CYkUEZ','264DNZOTc','50440RmaWns','81936utczPb','33677CheeJm','7853490ueBNVc','4353345iQFycB','1249440uYCfJH','222704pruSbc','102UiGype'];b=function(){return l;};return b();}function c(a,d){a=a-0x1ef;var e=b();var f=e[a];return f;}import'vue';export{d as FileViewer,e as default};