vue-cropperjs2 0.0.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.
- package/README.md +5 -0
- package/dist/index.d.ts +145 -0
- package/dist/index.js +1633 -0
- package/dist/index.umd.cjs +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Vue 3 + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
3
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
|
+
import { CropperCanvas as CropperCanvas_2 } from 'cropperjs';
|
|
5
|
+
import { DefineComponent } from 'vue';
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
7
|
+
|
|
8
|
+
declare const __VLS_component: DefineComponent<CropperCanvasProps, {
|
|
9
|
+
$setAction: ((action: string) => CropperCanvas_2) | undefined;
|
|
10
|
+
$toCanvas: ((options?: {
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
beforeDraw?: (context: CanvasRenderingContext2D, canvas: HTMLCanvasElement) => void;
|
|
14
|
+
}) => Promise<HTMLCanvasElement>) | undefined;
|
|
15
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CropperCanvasProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
|
|
17
|
+
declare const __VLS_component_2: DefineComponent<SelectionProperty, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SelectionProperty> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
|
|
19
|
+
declare type __VLS_Props = {
|
|
20
|
+
resize?: "both" | "horizontal" | "vertical" | "none";
|
|
21
|
+
selection?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
declare function __VLS_template(): {
|
|
25
|
+
attrs: Partial<{}>;
|
|
26
|
+
slots: {
|
|
27
|
+
default?(_: {}): any;
|
|
28
|
+
};
|
|
29
|
+
refs: {
|
|
30
|
+
canvasRef: unknown;
|
|
31
|
+
};
|
|
32
|
+
rootEl: any;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare function __VLS_template_2(): {
|
|
36
|
+
attrs: Partial<{}>;
|
|
37
|
+
slots: {
|
|
38
|
+
default?(_: {}): any;
|
|
39
|
+
};
|
|
40
|
+
refs: {};
|
|
41
|
+
rootEl: any;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
45
|
+
|
|
46
|
+
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
47
|
+
|
|
48
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
55
|
+
new (): {
|
|
56
|
+
$slots: S;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
declare type CanvasImageProps = {
|
|
61
|
+
src: string;
|
|
62
|
+
alt?: string;
|
|
63
|
+
initialCenterSize?: "contain" | "cover";
|
|
64
|
+
rotatable?: boolean;
|
|
65
|
+
scalable?: boolean;
|
|
66
|
+
skewable?: boolean;
|
|
67
|
+
slottable?: boolean;
|
|
68
|
+
translatable?: boolean;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export declare const CropperCanvas: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
72
|
+
|
|
73
|
+
declare type CropperCanvasProps = {
|
|
74
|
+
background?: boolean;
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
scaleStep?: number;
|
|
77
|
+
themeColor?: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export declare const CropperCrosshair: DefineComponent<CropperCrosshairProperty, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CropperCrosshairProperty> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
81
|
+
|
|
82
|
+
declare type CropperCrosshairProperty = {
|
|
83
|
+
centered: boolean;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export declare const CropperGrid: DefineComponent<CropperGridProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CropperGridProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
87
|
+
|
|
88
|
+
declare type CropperGridProps = {
|
|
89
|
+
role?: "grid";
|
|
90
|
+
covered?: boolean;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export declare const CropperHandle: DefineComponent<CropperHandleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CropperHandleProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
94
|
+
|
|
95
|
+
declare type CropperHandleProps = {
|
|
96
|
+
action?: HandleAction;
|
|
97
|
+
plain?: boolean;
|
|
98
|
+
slottable?: boolean;
|
|
99
|
+
themeColor?: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export declare const CropperImage: DefineComponent<CanvasImageProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CanvasImageProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
103
|
+
|
|
104
|
+
export declare const CropperSelection: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
105
|
+
|
|
106
|
+
export declare const CropperShade: DefineComponent<CropperShadeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CropperShadeProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
107
|
+
|
|
108
|
+
declare type CropperShadeProps = {
|
|
109
|
+
x?: number;
|
|
110
|
+
y?: number;
|
|
111
|
+
width?: number;
|
|
112
|
+
height?: number;
|
|
113
|
+
slottable?: boolean;
|
|
114
|
+
themeColor?: string;
|
|
115
|
+
hidden?: boolean;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export declare const CropperViewer: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
119
|
+
|
|
120
|
+
declare const _default: {
|
|
121
|
+
install: (app: App) => void;
|
|
122
|
+
};
|
|
123
|
+
export default _default;
|
|
124
|
+
|
|
125
|
+
declare type HandleAction = "select" | "move" | "n-resize" | "e-resize" | "s-resize" | "w-resize" | "ne-resize" | "nw-resize" | "se-resize" | "sw-resize" | "none";
|
|
126
|
+
|
|
127
|
+
declare type SelectionProperty = {
|
|
128
|
+
x?: number;
|
|
129
|
+
y?: number;
|
|
130
|
+
width?: number;
|
|
131
|
+
height?: number;
|
|
132
|
+
aspectRatio?: number;
|
|
133
|
+
initialAspectRatio?: number;
|
|
134
|
+
initialCoverage?: number;
|
|
135
|
+
dynamic?: boolean;
|
|
136
|
+
movable?: boolean;
|
|
137
|
+
resizable?: boolean;
|
|
138
|
+
zoomable?: boolean;
|
|
139
|
+
multiple?: boolean;
|
|
140
|
+
keyboard?: boolean;
|
|
141
|
+
outlined?: boolean;
|
|
142
|
+
precise?: boolean;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export { }
|