@gradio/imageeditor 0.12.14 → 0.14.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.
Files changed (131) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/Example.svelte +1 -1
  3. package/IMAGE_EDITOR_OVERVIEW.md +224 -0
  4. package/ImageEditor.stories.svelte +13 -5
  5. package/Index.svelte +46 -45
  6. package/{shared/InteractiveImageEditor.svelte → InteractiveImageEditor.svelte} +65 -103
  7. package/README.md +2 -0
  8. package/dist/Example.svelte.d.ts +1 -1
  9. package/dist/Index.svelte +35 -33
  10. package/dist/Index.svelte.d.ts +25 -16
  11. package/dist/{shared/InteractiveImageEditor.svelte → InteractiveImageEditor.svelte} +54 -88
  12. package/dist/{shared/InteractiveImageEditor.svelte.d.ts → InteractiveImageEditor.svelte.d.ts} +17 -15
  13. package/dist/shared/Anchor.svelte +311 -0
  14. package/dist/shared/Anchor.svelte.d.ts +18 -0
  15. package/dist/shared/Controls.svelte +169 -18
  16. package/dist/shared/Controls.svelte.d.ts +9 -2
  17. package/dist/shared/{tools/IconButton.svelte → IconButton.svelte} +19 -3
  18. package/dist/shared/{tools/IconButton.svelte.d.ts → IconButton.svelte.d.ts} +4 -1
  19. package/dist/shared/ImageEditor.svelte +572 -289
  20. package/dist/shared/ImageEditor.svelte.d.ts +54 -56
  21. package/dist/shared/Layers.svelte +260 -0
  22. package/dist/shared/Layers.svelte.d.ts +37 -0
  23. package/dist/shared/Resize.svelte +218 -0
  24. package/dist/shared/Resize.svelte.d.ts +29 -0
  25. package/dist/shared/SecondaryToolbar.svelte +55 -0
  26. package/dist/shared/SecondaryToolbar.svelte.d.ts +37 -0
  27. package/dist/shared/Toolbar.svelte +337 -0
  28. package/dist/shared/Toolbar.svelte.d.ts +42 -0
  29. package/dist/shared/{tools → brush}/BrushOptions.svelte +68 -64
  30. package/dist/shared/{tools → brush}/BrushOptions.svelte.d.ts +9 -9
  31. package/dist/shared/{tools → brush}/BrushSize.svelte +2 -27
  32. package/dist/shared/{tools → brush}/ColorField.svelte +2 -1
  33. package/dist/shared/{tools → brush}/ColorField.svelte.d.ts +1 -0
  34. package/dist/shared/{tools → brush}/ColorPicker.svelte +81 -9
  35. package/dist/shared/{tools → brush}/ColorPicker.svelte.d.ts +1 -0
  36. package/dist/shared/{tools → brush}/ColorSwatch.svelte +78 -38
  37. package/dist/shared/{tools → brush}/ColorSwatch.svelte.d.ts +6 -2
  38. package/dist/shared/brush/brush-cursor.d.ts +101 -0
  39. package/dist/shared/brush/brush-cursor.js +327 -0
  40. package/dist/shared/brush/brush-textures.d.ts +65 -0
  41. package/dist/shared/brush/brush-textures.js +385 -0
  42. package/dist/shared/brush/brush-utils.d.ts +32 -0
  43. package/dist/shared/brush/brush-utils.js +59 -0
  44. package/dist/shared/brush/brush.d.ts +152 -0
  45. package/dist/shared/brush/brush.js +397 -0
  46. package/dist/shared/brush/types.d.ts +37 -0
  47. package/dist/shared/brush/types.js +1 -0
  48. package/dist/shared/core/editor.d.ts +261 -0
  49. package/dist/shared/core/editor.js +1264 -0
  50. package/dist/shared/crop/crop.d.ts +201 -0
  51. package/dist/shared/crop/crop.js +727 -0
  52. package/dist/shared/image/image.d.ts +89 -0
  53. package/dist/shared/image/image.js +183 -0
  54. package/dist/shared/resize/resize.d.ts +270 -0
  55. package/dist/shared/resize/resize.js +1413 -0
  56. package/dist/shared/types.d.ts +16 -0
  57. package/dist/shared/utils/pixi.d.ts +16 -57
  58. package/dist/shared/utils/pixi.js +15 -113
  59. package/dist/shared/zoom/zoom.d.ts +136 -0
  60. package/dist/shared/zoom/zoom.js +548 -0
  61. package/package.json +8 -7
  62. package/shared/Anchor.svelte +384 -0
  63. package/shared/Controls.svelte +178 -37
  64. package/shared/{tools/IconButton.svelte → IconButton.svelte} +21 -4
  65. package/shared/ImageEditor.svelte +712 -350
  66. package/shared/Layers.svelte +282 -0
  67. package/shared/Resize.svelte +239 -0
  68. package/shared/SecondaryToolbar.svelte +67 -0
  69. package/shared/Toolbar.svelte +386 -0
  70. package/shared/brush/BRUSH_TOOL.md +134 -0
  71. package/shared/brush/BrushOptions.svelte +200 -0
  72. package/shared/{tools → brush}/BrushSize.svelte +2 -30
  73. package/shared/{tools → brush}/ColorField.svelte +3 -1
  74. package/shared/{tools → brush}/ColorPicker.svelte +86 -9
  75. package/shared/{tools → brush}/ColorSwatch.svelte +95 -42
  76. package/shared/brush/brush-cursor.ts +408 -0
  77. package/shared/brush/brush-textures.ts +485 -0
  78. package/shared/brush/brush-utils.ts +76 -0
  79. package/shared/brush/brush.ts +510 -0
  80. package/shared/brush/types.ts +41 -0
  81. package/shared/core/EDITOR.md +182 -0
  82. package/shared/core/editor.ts +1788 -0
  83. package/shared/crop/CROP.md +139 -0
  84. package/shared/crop/crop.ts +1027 -0
  85. package/shared/image/IMAGE.md +135 -0
  86. package/shared/image/image.ts +298 -0
  87. package/shared/resize/resize.ts +1894 -0
  88. package/shared/types.ts +19 -0
  89. package/shared/utils/pixi.ts +19 -246
  90. package/shared/zoom/zoom.ts +729 -0
  91. package/dist/shared/layers/Layers.svelte +0 -231
  92. package/dist/shared/layers/Layers.svelte.d.ts +0 -18
  93. package/dist/shared/layers/utils.d.ts +0 -73
  94. package/dist/shared/layers/utils.js +0 -156
  95. package/dist/shared/tools/Brush.svelte +0 -215
  96. package/dist/shared/tools/Brush.svelte.d.ts +0 -29
  97. package/dist/shared/tools/Crop.svelte +0 -155
  98. package/dist/shared/tools/Crop.svelte.d.ts +0 -16
  99. package/dist/shared/tools/Cropper.svelte +0 -271
  100. package/dist/shared/tools/Cropper.svelte.d.ts +0 -41
  101. package/dist/shared/tools/Handle.svelte +0 -260
  102. package/dist/shared/tools/Handle.svelte.d.ts +0 -29
  103. package/dist/shared/tools/Sources.svelte +0 -257
  104. package/dist/shared/tools/Sources.svelte.d.ts +0 -34
  105. package/dist/shared/tools/Tools.svelte +0 -102
  106. package/dist/shared/tools/Tools.svelte.d.ts +0 -48
  107. package/dist/shared/tools/brush.d.ts +0 -62
  108. package/dist/shared/tools/brush.js +0 -133
  109. package/dist/shared/tools/crop.d.ts +0 -15
  110. package/dist/shared/tools/crop.js +0 -154
  111. package/dist/shared/tools/index.d.ts +0 -5
  112. package/dist/shared/tools/index.js +0 -5
  113. package/dist/shared/tools/sources.d.ts +0 -46
  114. package/dist/shared/tools/sources.js +0 -121
  115. package/dist/shared/tools/types.d.ts +0 -1
  116. package/shared/layers/Layers.svelte +0 -250
  117. package/shared/layers/utils.ts +0 -294
  118. package/shared/tools/Brush.svelte +0 -280
  119. package/shared/tools/BrushOptions.svelte +0 -180
  120. package/shared/tools/Crop.svelte +0 -189
  121. package/shared/tools/Cropper.svelte +0 -346
  122. package/shared/tools/Handle.svelte +0 -289
  123. package/shared/tools/Sources.svelte +0 -283
  124. package/shared/tools/Tools.svelte +0 -162
  125. package/shared/tools/brush.ts +0 -247
  126. package/shared/tools/crop.ts +0 -213
  127. package/shared/tools/index.ts +0 -5
  128. package/shared/tools/sources.ts +0 -195
  129. package/shared/tools/types.ts +0 -1
  130. /package/dist/shared/{tools → brush}/BrushSize.svelte.d.ts +0 -0
  131. /package/dist/shared/{tools/types.js → types.js} +0 -0
@@ -1,29 +0,0 @@
1
- import { SvelteComponent } from "svelte";
2
- import { type ColorInput } from "tinycolor2";
3
- export interface Eraser {
4
- /**
5
- * The default size of the eraser.
6
- */
7
- default_size: number | "auto";
8
- }
9
- export interface Brush extends Eraser {
10
- /**
11
- * The default color of the brush.
12
- */
13
- default_color: ColorInput;
14
- /**
15
- * The colors to show in the color swatch
16
- */
17
- colors: ColorInput[];
18
- /**
19
- * Whether to show _only_ the color swatches specified in `colors`, or to show the color swatches specified in `colors` along with the colorpicker.
20
- */
21
- color_mode: "fixed" | "defaults";
22
- }
23
- declare const __propDef: any;
24
- export type BrushProps = typeof __propDef.props;
25
- export type BrushEvents = typeof __propDef.events;
26
- export type BrushSlots = typeof __propDef.slots;
27
- export default class Brush extends SvelteComponent<BrushProps, BrushEvents, BrushSlots> {
28
- }
29
- export {};
@@ -1,155 +0,0 @@
1
- <script>import { getContext, onDestroy, onMount, tick } from "svelte";
2
- import { TOOL_KEY } from "./Tools.svelte";
3
- import { EDITOR_KEY } from "../ImageEditor.svelte";
4
- import { crop_canvas, resize_and_reposition } from "./crop";
5
- import Cropper from "./Cropper.svelte";
6
- const { active_tool, register_tool } = getContext(TOOL_KEY);
7
- const {
8
- dimensions,
9
- editor_box,
10
- pixi,
11
- crop,
12
- command_manager,
13
- current_history
14
- } = getContext(EDITOR_KEY);
15
- let cropper;
16
- export let crop_constraint;
17
- let _crop_constraint = null;
18
- $: {
19
- if (typeof crop_constraint === "string") {
20
- const [w, h] = crop_constraint.split(":");
21
- _crop_constraint = parseInt(w) / parseInt(h);
22
- } else if (Array.isArray(crop_constraint)) {
23
- _crop_constraint = crop_constraint[0] / crop_constraint[1];
24
- }
25
- }
26
- let w_p = 1;
27
- let h_p = 1;
28
- let l_p = 0;
29
- let t_p = 0;
30
- let current_opacity = 0;
31
- let manually_cropped = false;
32
- $: {
33
- if (!manually_cropped && _crop_constraint && $pixi && $active_tool) {
34
- requestAnimationFrame(() => {
35
- initial_crop();
36
- });
37
- }
38
- }
39
- let c = null;
40
- async function initial_crop() {
41
- if (c || $current_history.previous)
42
- return;
43
- const { new_height, new_width, x_offset, y_offset } = resize_and_reposition(
44
- $editor_box.child_width,
45
- $editor_box.child_height,
46
- "c",
47
- _crop_constraint,
48
- $editor_box.child_width,
49
- $editor_box.child_height
50
- );
51
- w_p = new_width / $editor_box.child_width;
52
- h_p = new_height / $editor_box.child_height;
53
- l_p = x_offset / $editor_box.child_width;
54
- t_p = y_offset / $editor_box.child_height;
55
- c = crop_canvas($pixi.renderer, $pixi.background_container, crop, 0.2);
56
- c.start(...$dimensions, current_crop, false);
57
- c.continue(
58
- [
59
- l_p * $dimensions[0],
60
- t_p * $dimensions[1],
61
- w_p * $dimensions[0],
62
- h_p * $dimensions[1]
63
- ],
64
- false
65
- );
66
- c.stop();
67
- c.execute();
68
- c = null;
69
- current_opacity = 0;
70
- }
71
- function handle_crop(type, {
72
- x,
73
- y,
74
- width,
75
- height
76
- }) {
77
- if (!$pixi)
78
- return;
79
- if (type === "start") {
80
- if (cropper) {
81
- current_opacity = cropper.stop();
82
- cropper = null;
83
- }
84
- cropper = crop_canvas(
85
- $pixi?.renderer,
86
- $pixi.background_container,
87
- crop,
88
- current_opacity
89
- );
90
- cropper.start(...$dimensions, current_crop);
91
- } else if (type === "continue") {
92
- if (!cropper)
93
- return;
94
- cropper.continue([
95
- x * $dimensions[0],
96
- y * $dimensions[1],
97
- width * $dimensions[0],
98
- height * $dimensions[1]
99
- ]);
100
- } else if (type === "stop") {
101
- if (!cropper)
102
- return;
103
- command_manager.execute(cropper);
104
- }
105
- manually_cropped = true;
106
- }
107
- let measured = false;
108
- function get_measurements() {
109
- if (measured)
110
- return;
111
- if (!$editor_box.child_height)
112
- return;
113
- const _height = $editor_box.child_height;
114
- const _width = $editor_box.child_width;
115
- const _top = $editor_box.child_top - $editor_box.parent_top;
116
- const _left = $editor_box.child_left - $editor_box.parent_left;
117
- w_p = _width / $editor_box.child_width;
118
- h_p = _height / $editor_box.child_height;
119
- l_p = (_left - $editor_box.child_left + $editor_box.parent_left) / $editor_box.child_width;
120
- t_p = (_top - $editor_box.child_top + $editor_box.parent_top) / $editor_box.child_height;
121
- measured = true;
122
- }
123
- let current_crop;
124
- $:
125
- current_crop = [
126
- l_p * $dimensions[0],
127
- t_p * $dimensions[1],
128
- w_p * $dimensions[0],
129
- h_p * $dimensions[1]
130
- ];
131
- $: {
132
- l_p = $crop[0];
133
- t_p = $crop[1];
134
- w_p = $crop[2];
135
- h_p = $crop[3];
136
- }
137
- $:
138
- $editor_box && get_measurements();
139
- const unregister = register_tool("crop");
140
- onDestroy(unregister);
141
- </script>
142
-
143
- {#if $active_tool === "crop" && measured}
144
- <Cropper
145
- crop_constraint={_crop_constraint}
146
- {w_p}
147
- {h_p}
148
- {l_p}
149
- {t_p}
150
- {editor_box}
151
- on:crop_start={({ detail }) => handle_crop("start", detail)}
152
- on:crop_continue={({ detail }) => handle_crop("continue", detail)}
153
- on:crop_end={({ detail }) => handle_crop("stop", detail)}
154
- />
155
- {/if}
@@ -1,16 +0,0 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- crop_constraint: [number, number] | `${string}:${string}` | null;
5
- };
6
- events: {
7
- [evt: string]: CustomEvent<any>;
8
- };
9
- slots: {};
10
- };
11
- export type CropProps = typeof __propDef.props;
12
- export type CropEvents = typeof __propDef.events;
13
- export type CropSlots = typeof __propDef.slots;
14
- export default class Crop extends SvelteComponent<CropProps, CropEvents, CropSlots> {
15
- }
16
- export {};
@@ -1,271 +0,0 @@
1
- <script>import { createEventDispatcher } from "svelte";
2
- import Handle from "./Handle.svelte";
3
- import {} from "../ImageEditor.svelte";
4
- import { clamp } from "../utils/pixi";
5
- import { resize_and_reposition } from "./crop";
6
- export let editor_box;
7
- export let crop_constraint;
8
- const dispatch = createEventDispatcher();
9
- let _height = $editor_box.child_height;
10
- let _width = $editor_box.child_width;
11
- let _top = $editor_box.child_top - $editor_box.parent_top;
12
- let _left = $editor_box.child_left - $editor_box.parent_left;
13
- let _right = $editor_box.child_right - $editor_box.parent_left;
14
- let _bottom = 0;
15
- let dragging = false;
16
- export let w_p;
17
- export let h_p;
18
- export let l_p;
19
- export let t_p;
20
- const positions = ["tl", "br", "tr", "bl", "t", "b", "l", "r"];
21
- let finished;
22
- let timer;
23
- let triggered = false;
24
- $: {
25
- if (dragging || position_drag) {
26
- clearTimeout(timer);
27
- finished = false;
28
- } else {
29
- set_finished_with_timeout_and_delay();
30
- }
31
- }
32
- function set_finished_with_timeout_and_delay() {
33
- if (timer) {
34
- clearTimeout(timer);
35
- }
36
- timer = setTimeout(() => {
37
- if (triggered) {
38
- dispatch("crop_end", {
39
- x: l_p,
40
- y: t_p,
41
- width: w_p,
42
- height: h_p
43
- });
44
- triggered = false;
45
- }
46
- finished = true;
47
- position_drag = false;
48
- }, 1e3);
49
- }
50
- function handle_change({
51
- top,
52
- bottom,
53
- left,
54
- right
55
- }, position) {
56
- _top = clamp(
57
- top ? top - $editor_box.parent_top : _top,
58
- $editor_box.child_top - $editor_box.parent_top,
59
- $editor_box.child_bottom - $editor_box.parent_top
60
- );
61
- _left = clamp(
62
- left ? left - $editor_box.parent_left : _left,
63
- $editor_box.child_left - $editor_box.parent_left,
64
- $editor_box.child_right - $editor_box.parent_left
65
- );
66
- _right = clamp(
67
- right ? right - $editor_box.parent_left : _right,
68
- $editor_box.child_left - $editor_box.parent_left,
69
- $editor_box.child_right - $editor_box.parent_left
70
- );
71
- _bottom = clamp(
72
- bottom ? bottom - $editor_box.parent_top : _bottom,
73
- $editor_box.child_top - $editor_box.parent_top,
74
- $editor_box.child_bottom - $editor_box.parent_top
75
- );
76
- _width = clamp(
77
- right ? right - _left - $editor_box.parent_left : _width,
78
- 0,
79
- _right - _left
80
- );
81
- _width = clamp(
82
- left ? _right - left + $editor_box.parent_left : _width,
83
- 0,
84
- _right - _left
85
- );
86
- _height = clamp(
87
- bottom ? bottom - _top - $editor_box.parent_top : _height,
88
- 0,
89
- _bottom - _top
90
- );
91
- _height = clamp(
92
- top ? _bottom - top + $editor_box.parent_top : _height,
93
- 0,
94
- _bottom - _top
95
- );
96
- const anchors_for_position = {
97
- tl: "br",
98
- tr: "bl",
99
- bl: "tr",
100
- br: "tl",
101
- t: "b",
102
- b: "t",
103
- l: "r",
104
- r: "l",
105
- c: "c"
106
- };
107
- if (crop_constraint) {
108
- const max_w = ["t", "b"].includes(position) ? $editor_box.child_width : _right - _left;
109
- const max_h = ["l", "r"].includes(position) ? $editor_box.child_height : _bottom - _top;
110
- let result = resize_and_reposition(
111
- _width,
112
- _height,
113
- anchors_for_position[position],
114
- crop_constraint,
115
- max_w,
116
- max_h
117
- );
118
- _width = result.new_width;
119
- _height = result.new_height;
120
- _left = _left + result.x_offset;
121
- _top = _top + result.y_offset;
122
- _right = _left + _width;
123
- _bottom = _top + _height;
124
- }
125
- w_p = _width / $editor_box.child_width;
126
- h_p = _height / $editor_box.child_height;
127
- l_p = (_left - $editor_box.child_left + $editor_box.parent_left) / $editor_box.child_width;
128
- t_p = (_top - $editor_box.child_top + $editor_box.parent_top) / $editor_box.child_height;
129
- dispatch(triggered ? "crop_continue" : "crop_start", {
130
- x: l_p,
131
- y: t_p,
132
- width: w_p,
133
- height: h_p
134
- });
135
- triggered = true;
136
- }
137
- function resize() {
138
- _width = w_p * $editor_box.child_width;
139
- _height = h_p * $editor_box.child_height;
140
- _left = l_p * $editor_box.child_width + ($editor_box.child_left - $editor_box.parent_left);
141
- _top = t_p * $editor_box.child_height + ($editor_box.child_top - $editor_box.parent_top);
142
- _right = _left + _width;
143
- _bottom = _top + _height;
144
- }
145
- $:
146
- $editor_box && resize();
147
- let start_x = 0;
148
- let start_y = 0;
149
- let position_drag = false;
150
- function handle_drag_start(e) {
151
- position_drag = true;
152
- start_x = e.clientX;
153
- start_y = e.clientY;
154
- if (!finished)
155
- return;
156
- finished = false;
157
- dispatch("crop_start", {
158
- x: l_p,
159
- y: t_p,
160
- width: w_p,
161
- height: h_p
162
- });
163
- }
164
- function handle_drag_end(e) {
165
- if (!position_drag)
166
- return;
167
- position_drag = false;
168
- }
169
- function handle_dragging(e) {
170
- if (!position_drag)
171
- return;
172
- const x_delta = e.clientX - start_x;
173
- const y_delta = e.clientY - start_y;
174
- _left = clamp(
175
- _left + x_delta,
176
- $editor_box.child_left - $editor_box.parent_left,
177
- $editor_box.child_right - $editor_box.parent_left - _width
178
- );
179
- _top = clamp(
180
- _top + y_delta,
181
- $editor_box.child_top - $editor_box.parent_top,
182
- $editor_box.child_bottom - $editor_box.parent_top - _height
183
- );
184
- _right = _left + _width;
185
- _bottom = _top + _height;
186
- l_p = (_left - $editor_box.child_left + $editor_box.parent_left) / $editor_box.child_width;
187
- t_p = (_top - $editor_box.child_top + $editor_box.parent_top) / $editor_box.child_height;
188
- start_x = e.clientX;
189
- start_y = e.clientY;
190
- dispatch("crop_continue", {
191
- x: l_p,
192
- y: t_p,
193
- width: w_p,
194
- height: h_p
195
- });
196
- triggered = true;
197
- }
198
- </script>
199
-
200
- <svelte:window on:mousemove={handle_dragging} on:mouseup={handle_drag_end} />
201
-
202
- <div class="wrap">
203
- <div
204
- class="box"
205
- style:width="{_width}px"
206
- style:height="{_height}px"
207
- style:top="{_top}px"
208
- style:left="{_left}px"
209
- >
210
- {#each positions as position}
211
- <Handle
212
- on:change={({ detail }) => handle_change(detail, position)}
213
- bind:dragging
214
- location={position}
215
- />
216
- {/each}
217
-
218
- <!-- svelte-ignore a11y-no-static-element-interactions -->
219
- <div class="grid" class:finished on:mousedown={handle_drag_start}>
220
- {#each { length: 25 } as _}
221
- <div></div>
222
- {/each}
223
- </div>
224
- </div>
225
- </div>
226
-
227
- <style>
228
- .grid {
229
- height: 100%;
230
- width: 100%;
231
- display: grid;
232
- grid-template-rows: 1fr 1px 1fr 1px 1fr;
233
- grid-template-columns: 1fr 1px 1fr 1px 1fr;
234
- overflow: hidden;
235
- transition: 0.2s;
236
- opacity: 1;
237
- /* pointer-events: none; */
238
- }
239
-
240
- .grid.finished {
241
- opacity: 0;
242
- }
243
-
244
- .grid > div {
245
- width: 100%;
246
- height: 100%;
247
- }
248
-
249
- .grid > div:nth-of-type(even) {
250
- background: black;
251
- opacity: 0.5;
252
- }
253
-
254
- .wrap {
255
- position: absolute;
256
- top: 0;
257
- left: 0;
258
- width: 100%;
259
- height: 100%;
260
-
261
- /* transform: translateY(-20px); */
262
- }
263
-
264
- .box {
265
- position: absolute;
266
- width: 100%;
267
- height: 100%;
268
- border: 1px solid black;
269
- z-index: var(--layer-top);
270
- }
271
- </style>
@@ -1,41 +0,0 @@
1
- import { SvelteComponent } from "svelte";
2
- import { type EditorContext } from "../ImageEditor.svelte";
3
- declare const __propDef: {
4
- props: {
5
- editor_box: EditorContext["editor_box"];
6
- crop_constraint: number | null;
7
- w_p: number;
8
- h_p: number;
9
- l_p: number;
10
- t_p: number;
11
- };
12
- events: {
13
- crop_start: CustomEvent<{
14
- x: number;
15
- y: number;
16
- width: number;
17
- height: number;
18
- }>;
19
- crop_continue: CustomEvent<{
20
- x: number;
21
- y: number;
22
- width: number;
23
- height: number;
24
- }>;
25
- crop_end: CustomEvent<{
26
- x: number;
27
- y: number;
28
- width: number;
29
- height: number;
30
- }>;
31
- } & {
32
- [evt: string]: CustomEvent<any>;
33
- };
34
- slots: {};
35
- };
36
- export type CropperProps = typeof __propDef.props;
37
- export type CropperEvents = typeof __propDef.events;
38
- export type CropperSlots = typeof __propDef.slots;
39
- export default class Cropper extends SvelteComponent<CropperProps, CropperEvents, CropperSlots> {
40
- }
41
- export {};