@component-hook/pdf-canvas 1.2.2 → 1.3.0-alpha.1

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.
@@ -129,22 +129,25 @@ export declare function loadFile(file: File, password?: string, id?: string): Pr
129
129
  PDFId: string;
130
130
  name: string;
131
131
  updateDate: number;
132
- PDFBase64: string;
132
+ data: ArrayBuffer;
133
+ type: string;
133
134
  } | undefined>;
134
135
 
135
136
  export declare interface PDF {
136
137
  PDFId: string;
137
138
  name: string;
138
139
  updateDate: number;
139
- PDFBase64: string;
140
+ data: ArrayBuffer;
140
141
  pages: number;
141
- canvas?: string[];
142
+ type: string;
143
+ canvas?: ArrayBuffer[];
142
144
  trashDate?: number;
143
145
  isUpdate?: boolean;
144
146
  }
145
147
 
146
148
  export declare interface RenderImageArgs {
147
- url: string;
149
+ data: ArrayBuffer;
150
+ type: string;
148
151
  scale?: number;
149
152
  }
150
153
 
@@ -156,7 +159,7 @@ declare function setPDF(): Promise<void>;
156
159
 
157
160
  export declare interface SpecifyPageArgs {
158
161
  page: number;
159
- PDFBase64: string;
162
+ data: ArrayBuffer;
160
163
  scale: number;
161
164
  password?: string;
162
165
  }
@@ -179,10 +182,11 @@ export declare function useFabric(params?: FabricHookParams & {
179
182
  PDFId: string;
180
183
  name: string;
181
184
  updateDate: number;
182
- PDFBase64: string;
185
+ data: ArrayBuffer;
186
+ type: string;
183
187
  } | undefined>;
184
188
  specifyPage: (specifyPageParams: SpecifyPageArgs) => Promise<number>;
185
- renderImage: ({ url, scale }: RenderImageArgs) => Promise<void>;
189
+ renderImage: ({ data, type, scale }: RenderImageArgs) => Promise<void>;
186
190
  addFabric: (src: string, options?: TOptions<ImageProps>, offset?: DropOffset) => Promise<void>;
187
191
  addTextFabric: (text: string, options?: TOptions<TextProps>, offset?: DropOffset) => void;
188
192
  clearActive: () => void;