jit-viewer 1.1.0 → 1.1.2

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
@@ -15,12 +15,22 @@ visible: boolean;
15
15
  visible: boolean;
16
16
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
17
17
 
18
+ declare const __VLS_component_2: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_7<__VLS_TypePropsToRuntimeProps_12<Props_12>, {
19
+ watermark: null;
20
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_7<__VLS_TypePropsToRuntimeProps_12<Props_12>, {
21
+ watermark: null;
22
+ }>>> & Readonly<{}>, {
23
+ watermark: WatermarkConfig | null;
24
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
25
+
18
26
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
27
 
20
28
  declare type __VLS_NonUndefinedable_10<T> = T extends undefined ? never : T;
21
29
 
22
30
  declare type __VLS_NonUndefinedable_11<T> = T extends undefined ? never : T;
23
31
 
32
+ declare type __VLS_NonUndefinedable_12<T> = T extends undefined ? never : T;
33
+
24
34
  declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
25
35
 
26
36
  declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
@@ -61,6 +71,10 @@ declare type __VLS_Prettify_6<T> = {
61
71
  [K in keyof T]: T[K];
62
72
  } & {};
63
73
 
74
+ declare type __VLS_Prettify_7<T> = {
75
+ [K in keyof T]: T[K];
76
+ } & {};
77
+
64
78
  declare function __VLS_template(): {
65
79
  "top-left"?(_: {}): any;
66
80
  "top-center"?(_: {}): any;
@@ -70,6 +84,10 @@ declare function __VLS_template(): {
70
84
  "bottom-right"?(_: {}): any;
71
85
  };
72
86
 
87
+ declare function __VLS_template_2(): {
88
+ default?(_: {}): any;
89
+ };
90
+
73
91
  declare type __VLS_TypePropsToRuntimeProps<T> = {
74
92
  [K in keyof T]-?: {} extends Pick<T, K> ? {
75
93
  type: PropType<__VLS_NonUndefinedable<T[K]>>;
@@ -97,6 +115,15 @@ declare type __VLS_TypePropsToRuntimeProps_11<T> = {
97
115
  };
98
116
  };
99
117
 
118
+ declare type __VLS_TypePropsToRuntimeProps_12<T> = {
119
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
120
+ type: PropType<__VLS_NonUndefinedable_12<T[K]>>;
121
+ } : {
122
+ type: PropType<T[K]>;
123
+ required: true;
124
+ };
125
+ };
126
+
100
127
  declare type __VLS_TypePropsToRuntimeProps_2<T> = {
101
128
  [K in keyof T]-?: {} extends Pick<T, K> ? {
102
129
  type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
@@ -205,12 +232,24 @@ declare type __VLS_WithDefaults_6<P, D> = {
205
232
  }> : P[K];
206
233
  };
207
234
 
235
+ declare type __VLS_WithDefaults_7<P, D> = {
236
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_7<P[K] & {
237
+ default: D[K];
238
+ }> : P[K];
239
+ };
240
+
208
241
  declare type __VLS_WithTemplateSlots<T, S> = T & {
209
242
  new (): {
210
243
  $slots: S;
211
244
  };
212
245
  };
213
246
 
247
+ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
248
+ new (): {
249
+ $slots: S;
250
+ };
251
+ };
252
+
214
253
  /**
215
254
  * 创建DOM元素
216
255
  */
@@ -760,6 +799,10 @@ declare interface Props_11 {
760
799
  zoom?: number;
761
800
  }
762
801
 
802
+ declare interface Props_12 {
803
+ watermark?: WatermarkConfig | null;
804
+ }
805
+
763
806
  declare interface Props_2 {
764
807
  config?: ToolbarConfig;
765
808
  visible?: boolean;
@@ -1339,6 +1382,7 @@ export declare interface ViewerOptions {
1339
1382
  className?: string;
1340
1383
  style?: Record<string, string>;
1341
1384
  pdfRender?: 'native' | 'inset';
1385
+ watermark?: WatermarkConfig | null;
1342
1386
  proxyUrl?: string;
1343
1387
  requestAdapter?: RequestAdapter;
1344
1388
  onReady?: () => void;
@@ -1368,4 +1412,25 @@ export declare interface ViewerState {
1368
1412
  fullscreen: boolean;
1369
1413
  }
1370
1414
 
1415
+ export declare const Watermark: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, ReturnType<typeof __VLS_template_2>>;
1416
+
1417
+ export declare interface WatermarkConfig {
1418
+ type: 'text' | 'image';
1419
+ content?: string;
1420
+ image?: string;
1421
+ fontSize?: number;
1422
+ color?: string;
1423
+ fontFamily?: string;
1424
+ fontWeight?: string | number;
1425
+ imageWidth?: number;
1426
+ imageHeight?: number;
1427
+ opacity?: number;
1428
+ rotate?: number;
1429
+ gapX?: number;
1430
+ gapY?: number;
1431
+ position?: 'top' | 'bottom';
1432
+ width?: string | number;
1433
+ height?: string | number;
1434
+ }
1435
+
1371
1436
  export { }