@component-hook/pdf-canvas 0.1.1 → 0.1.3-alpha.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @component-hook/pdf-canvas
2
2
 
3
- Rendering PDF documents onto a canvas with vue3 component ([DEMO](https://tzuyi0817.github.io/component-hook/#/pdf-canvas))
3
+ Rendering PDF documents onto a canvas with vue3 component ([DEMO](https://tzuyi0817.github.io/component-hook/#/component/pdf-canvas))
4
4
  Implementation depository: [PDF-signature](https://github.com/tzuyi0817/PDF-signature)
5
5
 
6
6
  <p>
@@ -23,13 +23,13 @@ Implementation depository: [PDF-signature](https://github.com/tzuyi0817/PDF-sign
23
23
  ## Installation
24
24
 
25
25
  ```bash
26
- npm install @component-hook/pdf-canvas
26
+ $ npm install @component-hook/pdf-canvas
27
27
 
28
28
  # or use yarn
29
- yarn add @component-hook/pdf-canvas
29
+ $ yarn add @component-hook/pdf-canvas
30
30
 
31
31
  # or use pnpm
32
- pnpm install @component-hook/pdf-canvas
32
+ $ pnpm install @component-hook/pdf-canvas
33
33
  ```
34
34
 
35
35
  ## Basic Usage
@@ -93,7 +93,7 @@ async function uploadFile(event: Event) {
93
93
  | fileScale | false | `number` | The actual size of the canvas will affect the display clarity | 1 |
94
94
  | canvasClass | false | `string` | Canvas dom class selector | — |
95
95
  | isDrop | false | `boolean` | Control whether to drag and drop images and text onto the canvas | false |
96
- | password | false | `string` | Open password for encrypted PDF files | - |
96
+ | password | false | `string` | Open password for encrypted PDF files | — |
97
97
  | dropTextOptions | false | `object` | [fabric.js FabricText options](https://github.com/fabricjs/fabric.js) | [text options](https://github.com/tzuyi0817/component-hook/blob/master/packages/pdf-canvas/configs/index.ts) |
98
98
  | dropImageOptions | false | `object` | [fabric.js FabricImage options](https://github.com/fabricjs/fabric.js) | [image options](https://github.com/tzuyi0817/component-hook/blob/master/packages/pdf-canvas/configs/index.ts) |
99
99
  | closeSvgOptions | false | `object` | Setup close svg options | [close options](https://github.com/tzuyi0817/component-hook/blob/master/packages/pdf-canvas/configs/index.ts) |
package/dist/index.d.ts CHANGED
@@ -21,7 +21,7 @@ declare type __VLS_Prettify<T> = {
21
21
  [K in keyof T]: T[K];
22
22
  } & {};
23
23
 
24
- declare type __VLS_TypePropsToRuntimeProps<T> = {
24
+ declare type __VLS_TypePropsToOption<T> = {
25
25
  [K in keyof T]-?: {} extends Pick<T, K> ? {
26
26
  type: PropType<__VLS_NonUndefinedable<T[K]>>;
27
27
  } : {
@@ -53,7 +53,7 @@ export declare interface CreateCloseFabricArgs {
53
53
  uuid?: number;
54
54
  }
55
55
 
56
- declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
56
+ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
57
57
  canvasId: string;
58
58
  class: string;
59
59
  canvasClass: string;
@@ -67,8 +67,8 @@ addImage: typeof addImage;
67
67
  addText: typeof addText;
68
68
  clearActive: () => void;
69
69
  deleteCanvas: () => void;
70
- canvasRef: Ref<HTMLCanvasElement | null>;
71
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
70
+ canvasRef: Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
71
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
72
72
  canvasId: string;
73
73
  class: string;
74
74
  canvasClass: string;