@cesarv/v-image-crop-dialog 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 +278 -0
- package/dist/index.d.ts +6 -0
- package/dist/src/components/VImageCropDialog.vue.d.ts +314 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/v-image-crop-dialog.css +1 -0
- package/dist/v-image-crop-dialog.mjs +4482 -0
- package/dist/v-image-crop-dialog.umd.js +2 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# V-Image-Crop-Dialog
|
|
2
|
+
|
|
3
|
+
A Vue 3 dialog component for image cropping, built with Vuetify 3 and TypeScript. Based on `vue-advanced-cropper` for a powerful and intuitive cropping experience.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 Full integration with **Vuetify 3**
|
|
8
|
+
- 🔄 Support for **rectangular** and **circular** cropping
|
|
9
|
+
- 🖼️ Support for images via **File** or **URL**
|
|
10
|
+
- 🔧 Advanced controls: rotation, flip, zoom, and reset
|
|
11
|
+
- 📐 Customizable aspect ratio
|
|
12
|
+
- 🎯 Configurable output dimensions
|
|
13
|
+
- 💾 Automatic export in WebP format
|
|
14
|
+
- 📱 Fully responsive
|
|
15
|
+
- 🎭 TypeScript support
|
|
16
|
+
- 🎨 Customizable icons and button text
|
|
17
|
+
|
|
18
|
+
## Requirements
|
|
19
|
+
|
|
20
|
+
- Vue 3.5+
|
|
21
|
+
- Vuetify 3.11+
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install @cesarv/v-image-crop-dialog
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
### Setup
|
|
32
|
+
|
|
33
|
+
If you're using the component as a plugin:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { createApp } from 'vue';
|
|
37
|
+
import VImageCropDialog from '@cesarv/v-image-crop-dialog';
|
|
38
|
+
|
|
39
|
+
const app = createApp(App);
|
|
40
|
+
app.use(VImageCropDialog);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or import the component directly:
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<script setup lang="ts">
|
|
47
|
+
import { VImageCropDialog } from '@cesarv/v-image-crop-dialog';
|
|
48
|
+
import '@cesarv/v-image-crop-dialog/dist/v-image-crop-dialog.css';
|
|
49
|
+
</script>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Basic Example
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<template>
|
|
56
|
+
<div>
|
|
57
|
+
<VBtn @click="open = true">Open Cropper</VBtn>
|
|
58
|
+
|
|
59
|
+
<VImageCropDialog
|
|
60
|
+
v-model="open"
|
|
61
|
+
:url="imageUrl"
|
|
62
|
+
@update:file="handleCroppedImage"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script setup lang="ts">
|
|
68
|
+
import { ref } from 'vue';
|
|
69
|
+
import { VImageCropDialog } from '@cesarv/v-image-crop-dialog';
|
|
70
|
+
|
|
71
|
+
const open = ref(false);
|
|
72
|
+
const imageUrl = ref('https://example.com/image.jpg');
|
|
73
|
+
|
|
74
|
+
const handleCroppedImage = (file: File) => {
|
|
75
|
+
console.log('Cropped image:', file);
|
|
76
|
+
// Upload or process the file here
|
|
77
|
+
};
|
|
78
|
+
</script>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Examples
|
|
82
|
+
|
|
83
|
+
### Cropping with File
|
|
84
|
+
|
|
85
|
+
```html
|
|
86
|
+
<template>
|
|
87
|
+
<div>
|
|
88
|
+
<input type="file" @change="handleFileSelect" accept="image/*" />
|
|
89
|
+
|
|
90
|
+
<VImageCropDialog
|
|
91
|
+
v-model="open"
|
|
92
|
+
:file="selectedFile"
|
|
93
|
+
@update:file="handleCroppedImage"
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
97
|
+
|
|
98
|
+
<script setup lang="ts">
|
|
99
|
+
import { ref } from 'vue';
|
|
100
|
+
|
|
101
|
+
const open = ref(false);
|
|
102
|
+
const selectedFile = ref<File | null>(null);
|
|
103
|
+
|
|
104
|
+
const handleFileSelect = (event: Event) => {
|
|
105
|
+
const target = event.target as HTMLInputElement;
|
|
106
|
+
if (target.files && target.files[0]) {
|
|
107
|
+
selectedFile.value = target.files[0];
|
|
108
|
+
open.value = true;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const handleCroppedImage = (file: File) => {
|
|
113
|
+
console.log('Cropped image:', file);
|
|
114
|
+
};
|
|
115
|
+
</script>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Circular Crop with Fixed Aspect Ratio
|
|
119
|
+
|
|
120
|
+
```html
|
|
121
|
+
<template>
|
|
122
|
+
<VImageCropDialog
|
|
123
|
+
v-model="open"
|
|
124
|
+
:url="imageUrl"
|
|
125
|
+
stencil="circle"
|
|
126
|
+
:aspect-ratio="1"
|
|
127
|
+
@update:file="handleCroppedImage"
|
|
128
|
+
/>
|
|
129
|
+
</template>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Custom Dimensions
|
|
133
|
+
|
|
134
|
+
```html
|
|
135
|
+
<template>
|
|
136
|
+
<VImageCropDialog
|
|
137
|
+
v-model="open"
|
|
138
|
+
:url="imageUrl"
|
|
139
|
+
:img-width="800"
|
|
140
|
+
:img-height="600"
|
|
141
|
+
:aspect-ratio="4/3"
|
|
142
|
+
@update:file="handleCroppedImage"
|
|
143
|
+
/>
|
|
144
|
+
</template>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Persistent Dialog
|
|
148
|
+
|
|
149
|
+
```html
|
|
150
|
+
<template>
|
|
151
|
+
<VImageCropDialog
|
|
152
|
+
v-model="open"
|
|
153
|
+
:url="imageUrl"
|
|
154
|
+
persistent
|
|
155
|
+
max-width="800px"
|
|
156
|
+
@update:file="handleCroppedImage"
|
|
157
|
+
/>
|
|
158
|
+
</template>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Custom Icons and Button Text
|
|
162
|
+
|
|
163
|
+
```html
|
|
164
|
+
<template>
|
|
165
|
+
<VImageCropDialog
|
|
166
|
+
v-model="open"
|
|
167
|
+
:url="imageUrl"
|
|
168
|
+
icon-rotate-right="mdi-rotate-clockwise"
|
|
169
|
+
icon-flip-horizontal="mdi-swap-horizontal"
|
|
170
|
+
crop-button-text="Confirm"
|
|
171
|
+
icon-crop="mdi-check-circle"
|
|
172
|
+
@update:file="handleCroppedImage"
|
|
173
|
+
/>
|
|
174
|
+
</template>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## API
|
|
178
|
+
|
|
179
|
+
### Props
|
|
180
|
+
|
|
181
|
+
| Prop | Type | Default | Description |
|
|
182
|
+
|------|------|---------|-------------|
|
|
183
|
+
| `modelValue` | `boolean` | `false` | Controls dialog visibility |
|
|
184
|
+
| `file` | `File \| null` | `null` | Image file to crop |
|
|
185
|
+
| `url` | `string \| null` | `null` | Image URL to crop |
|
|
186
|
+
| `stencil` | `'rect' \| 'circle'` | `'rect'` | Type of crop stencil |
|
|
187
|
+
| `imgWidth` | `number` | `undefined` | Output image width in pixels |
|
|
188
|
+
| `imgHeight` | `number` | `undefined` | Output image height in pixels |
|
|
189
|
+
| `aspectRatio` | `number` | `undefined` | Crop aspect ratio (e.g., 16/9, 1) |
|
|
190
|
+
| `persistent` | `boolean` | `false` | Prevents dialog from closing when clicking outside |
|
|
191
|
+
| `maxWidth` | `string \| number` | `'auto'` | Maximum dialog width |
|
|
192
|
+
| `iconFlipVertical` | `string` | `'mdi-flip-vertical'` | Icon for vertical flip control |
|
|
193
|
+
| `iconFlipHorizontal` | `string` | `'mdi-flip-horizontal'` | Icon for horizontal flip control |
|
|
194
|
+
| `iconRotateRight` | `string` | `'mdi-rotate-right'` | Icon for rotate right control |
|
|
195
|
+
| `iconRotateLeft` | `string` | `'mdi-rotate-left'` | Icon for rotate left control |
|
|
196
|
+
| `iconZoomIn` | `string` | `'mdi-magnify-plus-outline'` | Icon for zoom in control |
|
|
197
|
+
| `iconZoomOut` | `string` | `'mdi-magnify-minus-outline'` | Icon for zoom out control |
|
|
198
|
+
| `iconReset` | `string` | `'mdi-refresh'` | Icon for reset control |
|
|
199
|
+
| `iconCrop` | `string` | `'mdi-check'` | Icon for crop button |
|
|
200
|
+
| `cropButtonText` | `string` | `'Crop'` | Text for crop button |
|
|
201
|
+
|
|
202
|
+
### Events
|
|
203
|
+
|
|
204
|
+
| Event | Payload | Description |
|
|
205
|
+
|-------|---------|-------------|
|
|
206
|
+
| `update:modelValue` | `boolean` | Emitted when dialog visibility changes |
|
|
207
|
+
| `update:file` | `File` | Emitted when image is cropped, returns WebP file |
|
|
208
|
+
|
|
209
|
+
### Slots
|
|
210
|
+
|
|
211
|
+
| Slot | Props | Description |
|
|
212
|
+
|------|-------|-------------|
|
|
213
|
+
| `activator` | `activatorProps` | Slot for element that activates the dialog |
|
|
214
|
+
| `crop-button` | `{ processing: boolean, crop: () => void }` | Slot for custom crop button |
|
|
215
|
+
|
|
216
|
+
### Activator Slot
|
|
217
|
+
|
|
218
|
+
Use the activator slot to customize the element that opens the dialog:
|
|
219
|
+
|
|
220
|
+
```html
|
|
221
|
+
<template>
|
|
222
|
+
<VImageCropDialog v-model="open" :url="imageUrl">
|
|
223
|
+
<template #activator="{ props: activatorProps }">
|
|
224
|
+
<VBtn v-bind="activatorProps" color="primary">
|
|
225
|
+
Crop Image
|
|
226
|
+
</VBtn>
|
|
227
|
+
</template>
|
|
228
|
+
</VImageCropDialog>
|
|
229
|
+
</template>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Crop Button Slot
|
|
233
|
+
|
|
234
|
+
Use the crop-button slot to completely customize the crop button:
|
|
235
|
+
|
|
236
|
+
```html
|
|
237
|
+
<template>
|
|
238
|
+
<VImageCropDialog v-model="open" :url="imageUrl">
|
|
239
|
+
<template #crop-button="{ processing, crop }">
|
|
240
|
+
<VBtn
|
|
241
|
+
color="success"
|
|
242
|
+
:loading="processing"
|
|
243
|
+
@click="crop"
|
|
244
|
+
>
|
|
245
|
+
<VIcon icon="mdi-check" start />
|
|
246
|
+
Confirm Crop
|
|
247
|
+
</VBtn>
|
|
248
|
+
</template>
|
|
249
|
+
</VImageCropDialog>
|
|
250
|
+
</template>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Cropper Controls
|
|
254
|
+
|
|
255
|
+
The component includes built-in controls for:
|
|
256
|
+
|
|
257
|
+
- **Rotate**: Rotate image 90° left or right
|
|
258
|
+
- **Flip**: Flip image horizontally or vertically
|
|
259
|
+
- **Zoom**: Zoom in or out
|
|
260
|
+
- **Reset**: Restore image to original state
|
|
261
|
+
|
|
262
|
+
These controls are displayed as floating buttons over the cropper and can be customized via icon props.
|
|
263
|
+
|
|
264
|
+
## Notes
|
|
265
|
+
|
|
266
|
+
- The cropped image is always exported in **WebP** format
|
|
267
|
+
- If `imgWidth` and `imgHeight` are not specified, the image will maintain its original dimensions
|
|
268
|
+
- The component requires either `file` or `url` to be provided to function
|
|
269
|
+
- Make sure Vuetify is properly configured in your project
|
|
270
|
+
- All icon props accept Material Design Icons (mdi-*) or any icon string compatible with Vuetify's VIcon component
|
|
271
|
+
|
|
272
|
+
## License
|
|
273
|
+
|
|
274
|
+
ISC
|
|
275
|
+
|
|
276
|
+
## Author
|
|
277
|
+
|
|
278
|
+
[Cesar Vieira](https://github.com/cesarvieira)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { CropperResult } from 'vue-advanced-cropper';
|
|
2
|
+
interface Props {
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
stencil?: 'rect' | 'circle';
|
|
5
|
+
imgWidth?: number;
|
|
6
|
+
imgHeight?: number;
|
|
7
|
+
persistent?: boolean;
|
|
8
|
+
maxWidth?: string | number;
|
|
9
|
+
file?: File | null;
|
|
10
|
+
url?: string | null;
|
|
11
|
+
aspectRatio?: number;
|
|
12
|
+
iconFlipVertical?: string;
|
|
13
|
+
iconFlipHorizontal?: string;
|
|
14
|
+
iconRotateRight?: string;
|
|
15
|
+
iconRotateLeft?: string;
|
|
16
|
+
iconZoomIn?: string;
|
|
17
|
+
iconZoomOut?: string;
|
|
18
|
+
iconReset?: string;
|
|
19
|
+
iconCrop?: string;
|
|
20
|
+
cropButtonText?: string;
|
|
21
|
+
}
|
|
22
|
+
declare function __VLS_template(): {
|
|
23
|
+
attrs: Partial<{}>;
|
|
24
|
+
slots: {
|
|
25
|
+
activator?(_: {
|
|
26
|
+
[x: string]: any;
|
|
27
|
+
}): any;
|
|
28
|
+
'crop-button'?(_: {
|
|
29
|
+
processing: boolean;
|
|
30
|
+
crop: () => Promise<void>;
|
|
31
|
+
}): any;
|
|
32
|
+
};
|
|
33
|
+
refs: {
|
|
34
|
+
cropperEl: ({
|
|
35
|
+
$: import('vue').ComponentInternalInstance;
|
|
36
|
+
$data: {};
|
|
37
|
+
$props: Partial<{} | {
|
|
38
|
+
[x: string]: any;
|
|
39
|
+
}> & Omit<{
|
|
40
|
+
readonly [x: string]: any;
|
|
41
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
|
|
42
|
+
$attrs: {
|
|
43
|
+
[x: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
$refs: {
|
|
46
|
+
[x: string]: unknown;
|
|
47
|
+
};
|
|
48
|
+
$slots: Readonly<{
|
|
49
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
52
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
53
|
+
$host: Element | null;
|
|
54
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
55
|
+
$el: any;
|
|
56
|
+
$options: import('vue').ComponentOptionsBase<Readonly<any>, {
|
|
57
|
+
getResult: () => CropperResult;
|
|
58
|
+
setCoordinates: (transform: import('vue-advanced-cropper').Transform | import('vue-advanced-cropper').Transform[]) => void;
|
|
59
|
+
refresh: () => void;
|
|
60
|
+
zoom: (factor: number, center?: import('vue-advanced-cropper').Point) => void;
|
|
61
|
+
move: (left: number, top?: number) => void;
|
|
62
|
+
rotate: (angle: number) => void;
|
|
63
|
+
flip: (horizontal: boolean, vertical?: boolean) => void;
|
|
64
|
+
reset: () => void;
|
|
65
|
+
}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {} | {
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
68
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
69
|
+
created?: (() => void) | (() => void)[];
|
|
70
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
71
|
+
mounted?: (() => void) | (() => void)[];
|
|
72
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
73
|
+
updated?: (() => void) | (() => void)[];
|
|
74
|
+
activated?: (() => void) | (() => void)[];
|
|
75
|
+
deactivated?: (() => void) | (() => void)[];
|
|
76
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
77
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
78
|
+
destroyed?: (() => void) | (() => void)[];
|
|
79
|
+
unmounted?: (() => void) | (() => void)[];
|
|
80
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
81
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
82
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
83
|
+
};
|
|
84
|
+
$forceUpdate: () => void;
|
|
85
|
+
$nextTick: typeof import('vue').nextTick;
|
|
86
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
87
|
+
} & Readonly<{}> & Omit<Readonly<any>, "getResult" | "setCoordinates" | "refresh" | "zoom" | "move" | "rotate" | "flip" | "reset"> & import('vue').ShallowUnwrapRef<{
|
|
88
|
+
getResult: () => CropperResult;
|
|
89
|
+
setCoordinates: (transform: import('vue-advanced-cropper').Transform | import('vue-advanced-cropper').Transform[]) => void;
|
|
90
|
+
refresh: () => void;
|
|
91
|
+
zoom: (factor: number, center?: import('vue-advanced-cropper').Point) => void;
|
|
92
|
+
move: (left: number, top?: number) => void;
|
|
93
|
+
rotate: (angle: number) => void;
|
|
94
|
+
flip: (horizontal: boolean, vertical?: boolean) => void;
|
|
95
|
+
reset: () => void;
|
|
96
|
+
}> & {
|
|
97
|
+
[x: string]: never;
|
|
98
|
+
} & import('vue').MethodOptions & import('vue').ComponentCustomProperties & {}) | ({
|
|
99
|
+
$: import('vue').ComponentInternalInstance;
|
|
100
|
+
$data: {};
|
|
101
|
+
$props: Partial<{} | {
|
|
102
|
+
[x: string]: any;
|
|
103
|
+
}> & Omit<{
|
|
104
|
+
readonly [x: string]: any;
|
|
105
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
|
|
106
|
+
$attrs: {
|
|
107
|
+
[x: string]: unknown;
|
|
108
|
+
};
|
|
109
|
+
$refs: {
|
|
110
|
+
[x: string]: unknown;
|
|
111
|
+
};
|
|
112
|
+
$slots: Readonly<{
|
|
113
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
116
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
117
|
+
$host: Element | null;
|
|
118
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
119
|
+
$el: any;
|
|
120
|
+
$options: import('vue').ComponentOptionsBase<Readonly<any>, {
|
|
121
|
+
getResult: () => CropperResult;
|
|
122
|
+
setCoordinates: (transform: import('vue-advanced-cropper').Transform | import('vue-advanced-cropper').Transform[]) => void;
|
|
123
|
+
refresh: () => void;
|
|
124
|
+
zoom: (factor: number, center?: import('vue-advanced-cropper').Point) => void;
|
|
125
|
+
move: (left: number, top?: number) => void;
|
|
126
|
+
rotate: (angle: number) => void;
|
|
127
|
+
flip: (horizontal: boolean, vertical?: boolean) => void;
|
|
128
|
+
reset: () => void;
|
|
129
|
+
}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {} | {
|
|
130
|
+
[x: string]: any;
|
|
131
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
132
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
133
|
+
created?: (() => void) | (() => void)[];
|
|
134
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
135
|
+
mounted?: (() => void) | (() => void)[];
|
|
136
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
137
|
+
updated?: (() => void) | (() => void)[];
|
|
138
|
+
activated?: (() => void) | (() => void)[];
|
|
139
|
+
deactivated?: (() => void) | (() => void)[];
|
|
140
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
141
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
142
|
+
destroyed?: (() => void) | (() => void)[];
|
|
143
|
+
unmounted?: (() => void) | (() => void)[];
|
|
144
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
145
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
146
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
147
|
+
};
|
|
148
|
+
$forceUpdate: () => void;
|
|
149
|
+
$nextTick: typeof import('vue').nextTick;
|
|
150
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
151
|
+
} & Readonly<{
|
|
152
|
+
[x: string]: any;
|
|
153
|
+
}> & Omit<Readonly<any>, "getResult" | "setCoordinates" | "refresh" | "zoom" | "move" | "rotate" | "flip" | "reset"> & import('vue').ShallowUnwrapRef<{
|
|
154
|
+
getResult: () => CropperResult;
|
|
155
|
+
setCoordinates: (transform: import('vue-advanced-cropper').Transform | import('vue-advanced-cropper').Transform[]) => void;
|
|
156
|
+
refresh: () => void;
|
|
157
|
+
zoom: (factor: number, center?: import('vue-advanced-cropper').Point) => void;
|
|
158
|
+
move: (left: number, top?: number) => void;
|
|
159
|
+
rotate: (angle: number) => void;
|
|
160
|
+
flip: (horizontal: boolean, vertical?: boolean) => void;
|
|
161
|
+
reset: () => void;
|
|
162
|
+
}> & {
|
|
163
|
+
[x: string]: never;
|
|
164
|
+
} & import('vue').MethodOptions & import('vue').ComponentCustomProperties & {}) | null;
|
|
165
|
+
};
|
|
166
|
+
rootEl: any;
|
|
167
|
+
};
|
|
168
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
169
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
170
|
+
"update:modelValue": (value: boolean) => any;
|
|
171
|
+
"update:file": (value: File) => any;
|
|
172
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
173
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
174
|
+
"onUpdate:file"?: ((value: File) => any) | undefined;
|
|
175
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
176
|
+
cropperEl: ({
|
|
177
|
+
$: import('vue').ComponentInternalInstance;
|
|
178
|
+
$data: {};
|
|
179
|
+
$props: Partial<{} | {
|
|
180
|
+
[x: string]: any;
|
|
181
|
+
}> & Omit<{
|
|
182
|
+
readonly [x: string]: any;
|
|
183
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
|
|
184
|
+
$attrs: {
|
|
185
|
+
[x: string]: unknown;
|
|
186
|
+
};
|
|
187
|
+
$refs: {
|
|
188
|
+
[x: string]: unknown;
|
|
189
|
+
};
|
|
190
|
+
$slots: Readonly<{
|
|
191
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
194
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
195
|
+
$host: Element | null;
|
|
196
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
197
|
+
$el: any;
|
|
198
|
+
$options: import('vue').ComponentOptionsBase<Readonly<any>, {
|
|
199
|
+
getResult: () => CropperResult;
|
|
200
|
+
setCoordinates: (transform: import('vue-advanced-cropper').Transform | import('vue-advanced-cropper').Transform[]) => void;
|
|
201
|
+
refresh: () => void;
|
|
202
|
+
zoom: (factor: number, center?: import('vue-advanced-cropper').Point) => void;
|
|
203
|
+
move: (left: number, top?: number) => void;
|
|
204
|
+
rotate: (angle: number) => void;
|
|
205
|
+
flip: (horizontal: boolean, vertical?: boolean) => void;
|
|
206
|
+
reset: () => void;
|
|
207
|
+
}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {} | {
|
|
208
|
+
[x: string]: any;
|
|
209
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
210
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
211
|
+
created?: (() => void) | (() => void)[];
|
|
212
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
213
|
+
mounted?: (() => void) | (() => void)[];
|
|
214
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
215
|
+
updated?: (() => void) | (() => void)[];
|
|
216
|
+
activated?: (() => void) | (() => void)[];
|
|
217
|
+
deactivated?: (() => void) | (() => void)[];
|
|
218
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
219
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
220
|
+
destroyed?: (() => void) | (() => void)[];
|
|
221
|
+
unmounted?: (() => void) | (() => void)[];
|
|
222
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
223
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
224
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
225
|
+
};
|
|
226
|
+
$forceUpdate: () => void;
|
|
227
|
+
$nextTick: typeof import('vue').nextTick;
|
|
228
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
229
|
+
} & Readonly<{}> & Omit<Readonly<any>, "getResult" | "setCoordinates" | "refresh" | "zoom" | "move" | "rotate" | "flip" | "reset"> & import('vue').ShallowUnwrapRef<{
|
|
230
|
+
getResult: () => CropperResult;
|
|
231
|
+
setCoordinates: (transform: import('vue-advanced-cropper').Transform | import('vue-advanced-cropper').Transform[]) => void;
|
|
232
|
+
refresh: () => void;
|
|
233
|
+
zoom: (factor: number, center?: import('vue-advanced-cropper').Point) => void;
|
|
234
|
+
move: (left: number, top?: number) => void;
|
|
235
|
+
rotate: (angle: number) => void;
|
|
236
|
+
flip: (horizontal: boolean, vertical?: boolean) => void;
|
|
237
|
+
reset: () => void;
|
|
238
|
+
}> & {
|
|
239
|
+
[x: string]: never;
|
|
240
|
+
} & import('vue').MethodOptions & import('vue').ComponentCustomProperties & {}) | ({
|
|
241
|
+
$: import('vue').ComponentInternalInstance;
|
|
242
|
+
$data: {};
|
|
243
|
+
$props: Partial<{} | {
|
|
244
|
+
[x: string]: any;
|
|
245
|
+
}> & Omit<{
|
|
246
|
+
readonly [x: string]: any;
|
|
247
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
|
|
248
|
+
$attrs: {
|
|
249
|
+
[x: string]: unknown;
|
|
250
|
+
};
|
|
251
|
+
$refs: {
|
|
252
|
+
[x: string]: unknown;
|
|
253
|
+
};
|
|
254
|
+
$slots: Readonly<{
|
|
255
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
256
|
+
}>;
|
|
257
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
258
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
259
|
+
$host: Element | null;
|
|
260
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
261
|
+
$el: any;
|
|
262
|
+
$options: import('vue').ComponentOptionsBase<Readonly<any>, {
|
|
263
|
+
getResult: () => CropperResult;
|
|
264
|
+
setCoordinates: (transform: import('vue-advanced-cropper').Transform | import('vue-advanced-cropper').Transform[]) => void;
|
|
265
|
+
refresh: () => void;
|
|
266
|
+
zoom: (factor: number, center?: import('vue-advanced-cropper').Point) => void;
|
|
267
|
+
move: (left: number, top?: number) => void;
|
|
268
|
+
rotate: (angle: number) => void;
|
|
269
|
+
flip: (horizontal: boolean, vertical?: boolean) => void;
|
|
270
|
+
reset: () => void;
|
|
271
|
+
}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {} | {
|
|
272
|
+
[x: string]: any;
|
|
273
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
274
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
275
|
+
created?: (() => void) | (() => void)[];
|
|
276
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
277
|
+
mounted?: (() => void) | (() => void)[];
|
|
278
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
279
|
+
updated?: (() => void) | (() => void)[];
|
|
280
|
+
activated?: (() => void) | (() => void)[];
|
|
281
|
+
deactivated?: (() => void) | (() => void)[];
|
|
282
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
283
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
284
|
+
destroyed?: (() => void) | (() => void)[];
|
|
285
|
+
unmounted?: (() => void) | (() => void)[];
|
|
286
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
287
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
288
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
289
|
+
};
|
|
290
|
+
$forceUpdate: () => void;
|
|
291
|
+
$nextTick: typeof import('vue').nextTick;
|
|
292
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
293
|
+
} & Readonly<{
|
|
294
|
+
[x: string]: any;
|
|
295
|
+
}> & Omit<Readonly<any>, "getResult" | "setCoordinates" | "refresh" | "zoom" | "move" | "rotate" | "flip" | "reset"> & import('vue').ShallowUnwrapRef<{
|
|
296
|
+
getResult: () => CropperResult;
|
|
297
|
+
setCoordinates: (transform: import('vue-advanced-cropper').Transform | import('vue-advanced-cropper').Transform[]) => void;
|
|
298
|
+
refresh: () => void;
|
|
299
|
+
zoom: (factor: number, center?: import('vue-advanced-cropper').Point) => void;
|
|
300
|
+
move: (left: number, top?: number) => void;
|
|
301
|
+
rotate: (angle: number) => void;
|
|
302
|
+
flip: (horizontal: boolean, vertical?: boolean) => void;
|
|
303
|
+
reset: () => void;
|
|
304
|
+
}> & {
|
|
305
|
+
[x: string]: never;
|
|
306
|
+
} & import('vue').MethodOptions & import('vue').ComponentCustomProperties & {}) | null;
|
|
307
|
+
}, any>;
|
|
308
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
309
|
+
export default _default;
|
|
310
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
311
|
+
new (): {
|
|
312
|
+
$slots: S;
|
|
313
|
+
};
|
|
314
|
+
};
|