jit-viewer 1.0.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
19
 
20
20
  declare type __VLS_NonUndefinedable_10<T> = T extends undefined ? never : T;
21
21
 
22
+ declare type __VLS_NonUndefinedable_11<T> = T extends undefined ? never : T;
23
+
22
24
  declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
23
25
 
24
26
  declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
@@ -55,6 +57,10 @@ declare type __VLS_Prettify_5<T> = {
55
57
  [K in keyof T]: T[K];
56
58
  } & {};
57
59
 
60
+ declare type __VLS_Prettify_6<T> = {
61
+ [K in keyof T]: T[K];
62
+ } & {};
63
+
58
64
  declare function __VLS_template(): {
59
65
  "top-left"?(_: {}): any;
60
66
  "top-center"?(_: {}): any;
@@ -82,6 +88,15 @@ declare type __VLS_TypePropsToRuntimeProps_10<T> = {
82
88
  };
83
89
  };
84
90
 
91
+ declare type __VLS_TypePropsToRuntimeProps_11<T> = {
92
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
93
+ type: PropType<__VLS_NonUndefinedable_11<T[K]>>;
94
+ } : {
95
+ type: PropType<T[K]>;
96
+ required: true;
97
+ };
98
+ };
99
+
85
100
  declare type __VLS_TypePropsToRuntimeProps_2<T> = {
86
101
  [K in keyof T]-?: {} extends Pick<T, K> ? {
87
102
  type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
@@ -184,6 +199,12 @@ declare type __VLS_WithDefaults_5<P, D> = {
184
199
  }> : P[K];
185
200
  };
186
201
 
202
+ declare type __VLS_WithDefaults_6<P, D> = {
203
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_6<P[K] & {
204
+ default: D[K];
205
+ }> : P[K];
206
+ };
207
+
187
208
  declare type __VLS_WithTemplateSlots<T, S> = T & {
188
209
  new (): {
189
210
  $slots: S;
@@ -511,7 +532,7 @@ export declare function fileToBlob(source: FileSource, options?: {
511
532
  */
512
533
  export declare function fileToUrl(source: FileSource): Promise<string>;
513
534
 
514
- export declare type FileType = 'docx' | 'xlsx' | 'xls' | 'pdf' | 'pptx' | 'ppt' | 'txt' | 'md' | 'markdown' | 'ofd' | 'html' | 'unknown';
535
+ export declare type FileType = 'docx' | 'xlsx' | 'xls' | 'pdf' | 'pptx' | 'ppt' | 'txt' | 'md' | 'markdown' | 'ofd' | 'html' | 'image' | 'unknown';
515
536
 
516
537
  /**
517
538
  * 全屏API封装
@@ -588,6 +609,20 @@ onLoad?: (() => any) | undefined;
588
609
  zoom: number;
589
610
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
590
611
 
612
+ export declare const ImageRender: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_6<__VLS_TypePropsToRuntimeProps_11<Props_11>, {
613
+ zoom: number;
614
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
615
+ error: (error: Error) => void;
616
+ load: () => void;
617
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_6<__VLS_TypePropsToRuntimeProps_11<Props_11>, {
618
+ zoom: number;
619
+ }>>> & Readonly<{
620
+ onError?: ((error: Error) => any) | undefined;
621
+ onLoad?: (() => any) | undefined;
622
+ }>, {
623
+ zoom: number;
624
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
625
+
591
626
  /**
592
627
  * 检查文件类型是否支持
593
628
  */
@@ -720,6 +755,11 @@ declare interface Props_10 {
720
755
  requestAdapter?: RequestAdapter;
721
756
  }
722
757
 
758
+ declare interface Props_11 {
759
+ source: FileSource;
760
+ zoom?: number;
761
+ }
762
+
723
763
  declare interface Props_2 {
724
764
  config?: ToolbarConfig;
725
765
  visible?: boolean;