-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte-pintura.d.ts
72 lines (67 loc) · 2.91 KB
/
svelte-pintura.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { SvelteComponent } from 'svelte';
import {
PinturaEditorDefaultOptions,
PinturaEditorModalOptions,
PinturaDefaultImageReaderResult,
PinturaDefaultImageWriterResult,
PinturaReadState,
PinturaWriteState,
PinturaImageState,
PinturaEditor as PinturaEditorInstance,
Shape,
Vector,
} from '@pqina/pintura';
declare module '@pqina/svelte-pintura' {
class PinturaComponentEvents {
init?: (e: CustomEvent<PinturaEditorInstance>) => void;
loadstart?: () => void;
loadabort?: (e: CustomEvent<PinturaReadState>) => void;
loaderror?: (e: CustomEvent<PinturaReadState>) => void;
loadprogress?: (e: CustomEvent<PinturaReadState>) => void;
load?: (e: CustomEvent<PinturaDefaultImageReaderResult>) => void;
processstart?: () => void;
processabort?: (e: CustomEvent<PinturaWriteState>) => void;
processerror?: (e: CustomEvent<PinturaWriteState>) => void;
processprogress?: (e: CustomEvent<PinturaWriteState>) => void;
process?: (e: CustomEvent<PinturaDefaultImageWriterResult>) => void;
loadpreview?: (e: CustomEvent<ImageData | ImageBitmap>) => void;
ready?: () => void;
update?: (e: CustomEvent<PinturaImageState>) => void;
undo?: (e: CustomEvent<number>) => void;
redo?: (e: CustomEvent<number>) => void;
revert?: () => void;
writehistory?: () => void;
close?: () => void;
destroy?: () => void;
addshape?: (e: CustomEvent<Shape>) => void;
selectshape?: (e: CustomEvent<Shape>) => void;
updateshape?: (e: CustomEvent<Shape>) => void;
removeshape?: (e: CustomEvent<Shape>) => void;
markuptap?: (e: CustomEvent<{ target?: Shape; position: Vector }>) => void;
markupzoom?: (e: CustomEvent<number>) => void;
markuppan?: (e: CustomEvent<Vector>) => void;
zoom?: (e: CustomEvent<number>) => void;
pan?: (e: CustomEvent<Vector>) => void;
selectstyle?: (e: CustomEvent<{ [key: string]: unknown }>) => void;
selectutil?: (e: CustomEvent<string>) => void;
selectcontrol?: (e: CustomEvent<string>) => void;
selectiondown?: (e: CustomEvent<string>) => void;
selectionup?: (e: CustomEvent<string>) => void;
selectionchange?: (e: CustomEvent<string>) => void;
}
class PinturaComponentModalEvents extends PinturaComponentEvents {
show?: () => void;
hide?: () => void;
}
export class PinturaEditor extends SvelteComponent<PinturaEditorDefaultOptions> {
$$events_def: PinturaComponentEvents;
}
export class PinturaEditorModal extends SvelteComponent<
PinturaEditorDefaultOptions & PinturaEditorModalOptions
> {
$$events_def: PinturaComponentModalEvents;
}
export class PinturaEditorOverlay extends SvelteComponent<PinturaEditorDefaultOptions> {
$$events_def: PinturaComponentEvents;
}
}