@component-hook/pdf-canvas 1.3.0-alpha.0 → 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.
@@ -125,32 +125,29 @@ export declare type FabricSelectionCreatedEvent = Partial<TEvent<TPointerEvent>>
125
125
  };
126
126
 
127
127
  export declare function loadFile(file: File, password?: string, id?: string): Promise<{
128
- pages: number;
129
- PDFId: string;
130
- name: string;
131
- updateDate: number;
132
- PDFBase64: string;
133
- }> | Promise<{
134
128
  pages: number;
135
129
  PDFId: string;
136
130
  name: string;
137
131
  updateDate: number;
138
132
  data: ArrayBuffer;
133
+ type: string;
139
134
  } | undefined>;
140
135
 
141
136
  export declare interface PDF {
142
137
  PDFId: string;
143
138
  name: string;
144
139
  updateDate: number;
145
- data: ArrayBuffer | string;
140
+ data: ArrayBuffer;
146
141
  pages: number;
142
+ type: string;
147
143
  canvas?: ArrayBuffer[];
148
144
  trashDate?: number;
149
145
  isUpdate?: boolean;
150
146
  }
151
147
 
152
148
  export declare interface RenderImageArgs {
153
- url: string;
149
+ data: ArrayBuffer;
150
+ type: string;
154
151
  scale?: number;
155
152
  }
156
153
 
@@ -181,20 +178,15 @@ export declare function useFabric(params?: FabricHookParams & {
181
178
  }): {
182
179
  createCanvas: () => Canvas | undefined;
183
180
  loadFile: (file: File, password?: string) => Promise<{
184
- pages: number;
185
- PDFId: string;
186
- name: string;
187
- updateDate: number;
188
- PDFBase64: string;
189
- }> | Promise<{
190
181
  pages: number;
191
182
  PDFId: string;
192
183
  name: string;
193
184
  updateDate: number;
194
185
  data: ArrayBuffer;
186
+ type: string;
195
187
  } | undefined>;
196
188
  specifyPage: (specifyPageParams: SpecifyPageArgs) => Promise<number>;
197
- renderImage: ({ url, scale }: RenderImageArgs) => Promise<void>;
189
+ renderImage: ({ data, type, scale }: RenderImageArgs) => Promise<void>;
198
190
  addFabric: (src: string, options?: TOptions<ImageProps>, offset?: DropOffset) => Promise<void>;
199
191
  addTextFabric: (text: string, options?: TOptions<TextProps>, offset?: DropOffset) => void;
200
192
  clearActive: () => void;