@gradio/imageeditor 0.18.2-dev.0 → 0.18.2-dev.2
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/CHANGELOG.md +27 -0
- package/Index.svelte +122 -159
- package/InteractiveImageEditor.svelte +1 -0
- package/dist/Example.svelte +7 -4
- package/dist/Example.svelte.d.ts +20 -18
- package/dist/Index.svelte +152 -136
- package/dist/Index.svelte.d.ts +18 -202
- package/dist/InteractiveImageEditor.svelte +205 -148
- package/dist/InteractiveImageEditor.svelte.d.ts +55 -51
- package/dist/shared/Anchor.svelte +210 -136
- package/dist/shared/Anchor.svelte.d.ts +18 -16
- package/dist/shared/Controls.svelte +55 -36
- package/dist/shared/Controls.svelte.d.ts +35 -33
- package/dist/shared/IconButton.svelte +19 -17
- package/dist/shared/IconButton.svelte.d.ts +34 -32
- package/dist/shared/ImageEditor.svelte +673 -466
- package/dist/shared/ImageEditor.svelte.d.ts +4 -79
- package/dist/shared/Layers.svelte +52 -30
- package/dist/shared/Layers.svelte.d.ts +39 -36
- package/dist/shared/Resize.svelte +42 -21
- package/dist/shared/Resize.svelte.d.ts +29 -27
- package/dist/shared/SecondaryToolbar.svelte +17 -5
- package/dist/shared/SecondaryToolbar.svelte.d.ts +38 -36
- package/dist/shared/Toolbar.svelte +123 -69
- package/dist/shared/Toolbar.svelte.d.ts +40 -38
- package/dist/shared/brush/BrushOptions.svelte +119 -84
- package/dist/shared/brush/BrushOptions.svelte.d.ts +29 -27
- package/dist/shared/brush/BrushSize.svelte +12 -7
- package/dist/shared/brush/BrushSize.svelte.d.ts +23 -20
- package/dist/shared/brush/ColorField.svelte +49 -33
- package/dist/shared/brush/ColorField.svelte.d.ts +23 -21
- package/dist/shared/brush/ColorPicker.svelte +152 -108
- package/dist/shared/brush/ColorPicker.svelte.d.ts +19 -17
- package/dist/shared/brush/ColorSwatch.svelte +78 -46
- package/dist/shared/brush/ColorSwatch.svelte.d.ts +34 -32
- package/dist/types.d.ts +40 -0
- package/dist/types.js +25 -0
- package/package.json +12 -12
- package/shared/ImageEditor.svelte +1 -3
- package/shared/brush/BrushOptions.svelte +1 -1
- package/shared/brush/ColorPicker.svelte +2 -1
- package/types.ts +74 -0
package/dist/Index.svelte
CHANGED
|
@@ -1,161 +1,171 @@
|
|
|
1
1
|
<svelte:options accessors={true} immutable={true} />
|
|
2
2
|
|
|
3
|
-
<script
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import {
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import type { ImageBlobs } from "./InteractiveImageEditor.svelte";
|
|
5
|
+
|
|
6
|
+
import { FileData } from "@gradio/client";
|
|
7
|
+
|
|
8
|
+
import { BaseStaticImage as StaticImage } from "@gradio/image";
|
|
9
|
+
import InteractiveImageEditor from "./InteractiveImageEditor.svelte";
|
|
10
|
+
import { Block } from "@gradio/atoms";
|
|
11
|
+
import { StatusTracker } from "@gradio/statustracker";
|
|
12
|
+
|
|
13
|
+
import { Gradio } from "@gradio/utils";
|
|
14
|
+
import type { ImageEditorEvents, ImageEditorProps } from "./types";
|
|
15
|
+
|
|
16
|
+
let props = $props();
|
|
17
|
+
|
|
18
|
+
class ImageEditorGradio extends Gradio<ImageEditorEvents, ImageEditorProps> {
|
|
19
|
+
async get_data() {
|
|
20
|
+
const data = await super.get_data();
|
|
21
|
+
const value = await _get_value();
|
|
22
|
+
return { ...data, value: value };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const gradio = new ImageEditorGradio(props, {
|
|
26
|
+
server: { accept_blobs: () => {} },
|
|
27
|
+
buttons: [],
|
|
28
|
+
height: 350,
|
|
29
|
+
border_region: 0
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
let editor_instance: InteractiveImageEditor;
|
|
33
|
+
let image_id: null | string = $state(null);
|
|
34
|
+
|
|
35
|
+
let has_run_change = false;
|
|
36
|
+
let has_run_input = false;
|
|
37
|
+
|
|
38
|
+
async function _get_value(): Promise<ImageBlobs | { id: string }> {
|
|
39
|
+
if (image_id) {
|
|
40
|
+
const val = { id: image_id };
|
|
41
|
+
image_id = null;
|
|
42
|
+
return val;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const blobs = await editor_instance.get_data();
|
|
46
|
+
|
|
47
|
+
return blobs;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
let is_dragging: boolean;
|
|
51
|
+
|
|
52
|
+
const is_browser = typeof window !== "undefined";
|
|
53
|
+
|
|
54
|
+
// function handle_change(): void {
|
|
55
|
+
// if (gradio.props.value) gradio.dispatch("change");
|
|
56
|
+
// }
|
|
57
|
+
|
|
58
|
+
function handle_save(): void {
|
|
59
|
+
gradio.dispatch("apply");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// function handle_history_change(): void {
|
|
63
|
+
// gradio.dispatch("change");
|
|
64
|
+
|
|
65
|
+
// gradio.dispatch("input");
|
|
66
|
+
// }
|
|
67
|
+
|
|
68
|
+
let has_value = $derived(
|
|
69
|
+
gradio.props.value?.background ||
|
|
70
|
+
gradio.props.value?.layers?.length ||
|
|
71
|
+
gradio.props.value?.composite
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
let normalised_background = $derived(
|
|
75
|
+
gradio.props.value?.background
|
|
76
|
+
? new FileData(gradio.props.value.background)
|
|
77
|
+
: null
|
|
78
|
+
);
|
|
79
|
+
let normalised_composite = $derived(
|
|
80
|
+
gradio.props.value?.composite
|
|
81
|
+
? new FileData(gradio.props.value.composite)
|
|
82
|
+
: null
|
|
83
|
+
);
|
|
84
|
+
let normalised_layers = $derived(
|
|
85
|
+
gradio.props.value?.layers?.map((layer) => new FileData(layer)) || []
|
|
86
|
+
);
|
|
85
87
|
</script>
|
|
86
88
|
|
|
87
|
-
{#if !interactive}
|
|
89
|
+
{#if !gradio.shared.interactive}
|
|
88
90
|
<Block
|
|
89
|
-
{visible}
|
|
91
|
+
visible={gradio.shared.visible}
|
|
90
92
|
variant={"solid"}
|
|
91
93
|
border_mode={is_dragging ? "focus" : "base"}
|
|
92
94
|
padding={false}
|
|
93
|
-
{elem_id}
|
|
94
|
-
{elem_classes}
|
|
95
|
-
{height}
|
|
96
|
-
{width}
|
|
95
|
+
elem_id={gradio.shared.elem_id}
|
|
96
|
+
elem_classes={gradio.shared.elem_classes}
|
|
97
|
+
height={gradio.props.height}
|
|
98
|
+
width={gradio.props.width}
|
|
97
99
|
allow_overflow={true}
|
|
98
100
|
overflow_behavior="visible"
|
|
99
|
-
{container}
|
|
100
|
-
{scale}
|
|
101
|
-
{min_width}
|
|
101
|
+
container={gradio.shared.container}
|
|
102
|
+
scale={gradio.shared.scale}
|
|
103
|
+
min_width={gradio.shared.min_width}
|
|
102
104
|
>
|
|
103
105
|
<StatusTracker
|
|
104
|
-
autoscroll={gradio.autoscroll}
|
|
106
|
+
autoscroll={gradio.shared.autoscroll}
|
|
105
107
|
i18n={gradio.i18n}
|
|
106
|
-
{...loading_status}
|
|
107
|
-
on:clear_status={() =>
|
|
108
|
+
{...gradio.shared.loading_status}
|
|
109
|
+
on:clear_status={() =>
|
|
110
|
+
gradio.dispatch("clear_status", gradio.shared.loading_status)}
|
|
108
111
|
/>
|
|
109
112
|
<StaticImage
|
|
110
113
|
on:select={({ detail }) => gradio.dispatch("select", detail)}
|
|
111
114
|
on:share={({ detail }) => gradio.dispatch("share", detail)}
|
|
112
115
|
on:error={({ detail }) => gradio.dispatch("error", detail)}
|
|
113
|
-
value={value?.composite || null}
|
|
114
|
-
{label}
|
|
115
|
-
{show_label}
|
|
116
|
-
{buttons}
|
|
117
|
-
selectable={_selectable}
|
|
116
|
+
value={gradio.props.value?.composite || null}
|
|
117
|
+
label={gradio.shared.label}
|
|
118
|
+
show_label={gradio.shared.show_label}
|
|
119
|
+
buttons={gradio.props.buttons}
|
|
120
|
+
selectable={gradio.props._selectable}
|
|
118
121
|
i18n={gradio.i18n}
|
|
119
122
|
/>
|
|
120
123
|
</Block>
|
|
121
124
|
{:else}
|
|
122
125
|
<Block
|
|
123
|
-
{visible}
|
|
126
|
+
visible={gradio.shared.visible}
|
|
124
127
|
variant={has_value ? "solid" : "dashed"}
|
|
125
128
|
border_mode={is_dragging ? "focus" : "base"}
|
|
126
129
|
padding={false}
|
|
127
|
-
{elem_id}
|
|
128
|
-
{elem_classes}
|
|
129
|
-
{height}
|
|
130
|
-
{width}
|
|
130
|
+
elem_id={gradio.shared.elem_id}
|
|
131
|
+
elem_classes={gradio.shared.elem_classes}
|
|
132
|
+
height={gradio.props.height}
|
|
133
|
+
width={gradio.props.width}
|
|
131
134
|
allow_overflow={true}
|
|
132
135
|
overflow_behavior="visible"
|
|
133
|
-
{container}
|
|
134
|
-
{scale}
|
|
135
|
-
{min_width}
|
|
136
|
+
container={gradio.shared.container}
|
|
137
|
+
scale={gradio.shared.scale}
|
|
138
|
+
min_width={gradio.shared.min_width}
|
|
136
139
|
>
|
|
137
140
|
<StatusTracker
|
|
138
|
-
autoscroll={gradio.autoscroll}
|
|
141
|
+
autoscroll={gradio.shared.autoscroll}
|
|
139
142
|
i18n={gradio.i18n}
|
|
140
|
-
{...loading_status}
|
|
141
|
-
on:clear_status={() =>
|
|
143
|
+
{...gradio.shared.loading_status}
|
|
144
|
+
on:clear_status={() =>
|
|
145
|
+
gradio.dispatch("clear_status", gradio.shared.loading_status)}
|
|
142
146
|
/>
|
|
143
147
|
|
|
144
148
|
<InteractiveImageEditor
|
|
145
|
-
{border_region}
|
|
149
|
+
border_region={gradio.props.border_region}
|
|
146
150
|
bind:is_dragging
|
|
147
|
-
{canvas_size}
|
|
148
|
-
on:change={() => handle_history_change()}
|
|
151
|
+
canvas_size={gradio.props.canvas_size}
|
|
149
152
|
bind:image_id
|
|
150
153
|
layers={normalised_layers}
|
|
151
154
|
composite={normalised_composite}
|
|
152
155
|
background={normalised_background}
|
|
153
156
|
bind:this={editor_instance}
|
|
154
|
-
{root}
|
|
155
|
-
{sources}
|
|
156
|
-
{label}
|
|
157
|
-
{show_label}
|
|
158
|
-
{fixed_canvas}
|
|
157
|
+
root={gradio.shared.root}
|
|
158
|
+
sources={gradio.props.sources}
|
|
159
|
+
label={gradio.shared.label}
|
|
160
|
+
show_label={gradio.shared.show_label}
|
|
161
|
+
fixed_canvas={gradio.props.fixed_canvas}
|
|
162
|
+
on:input={() => {
|
|
163
|
+
if (!has_run_input) {
|
|
164
|
+
has_run_input = true;
|
|
165
|
+
} else {
|
|
166
|
+
gradio.dispatch("input");
|
|
167
|
+
}
|
|
168
|
+
}}
|
|
159
169
|
on:save={(e) => handle_save()}
|
|
160
170
|
on:edit={() => gradio.dispatch("edit")}
|
|
161
171
|
on:clear={() => gradio.dispatch("clear")}
|
|
@@ -163,34 +173,40 @@ $: normalised_layers = value?.layers?.map((layer) => new FileData(layer)) || [];
|
|
|
163
173
|
on:upload={() => gradio.dispatch("upload")}
|
|
164
174
|
on:share={({ detail }) => gradio.dispatch("share", detail)}
|
|
165
175
|
on:error={({ detail }) => {
|
|
166
|
-
loading_status = loading_status || {};
|
|
167
|
-
loading_status.status = "error";
|
|
176
|
+
gradio.shared.loading_status = gradio.shared.loading_status || {};
|
|
177
|
+
gradio.shared.loading_status.status = "error";
|
|
168
178
|
gradio.dispatch("error", detail);
|
|
169
179
|
}}
|
|
170
180
|
on:receive_null={() =>
|
|
171
|
-
(value = {
|
|
181
|
+
(gradio.props.value = {
|
|
172
182
|
background: null,
|
|
173
183
|
layers: [],
|
|
174
184
|
composite: null
|
|
175
185
|
})}
|
|
186
|
+
on:change={() => {
|
|
187
|
+
if (!has_run_change) {
|
|
188
|
+
has_run_change = true;
|
|
189
|
+
} else {
|
|
190
|
+
gradio.dispatch("change");
|
|
191
|
+
}
|
|
192
|
+
}}
|
|
176
193
|
on:error
|
|
177
|
-
{brush}
|
|
178
|
-
{eraser}
|
|
179
|
-
changeable={attached_events.includes("apply")}
|
|
180
|
-
realtime={attached_events.includes("change") ||
|
|
181
|
-
attached_events.includes("input")}
|
|
194
|
+
brush={gradio.props.brush}
|
|
195
|
+
eraser={gradio.props.eraser}
|
|
196
|
+
changeable={gradio.shared.attached_events.includes("apply")}
|
|
197
|
+
realtime={gradio.shared.attached_events.includes("change") ||
|
|
198
|
+
gradio.shared.attached_events.includes("input")}
|
|
182
199
|
i18n={gradio.i18n}
|
|
183
|
-
{transforms}
|
|
184
|
-
accept_blobs={server.accept_blobs}
|
|
185
|
-
layer_options={layers}
|
|
186
|
-
upload={(...args) => gradio.client.upload(...args)}
|
|
187
|
-
{placeholder}
|
|
188
|
-
|
|
189
|
-
{
|
|
190
|
-
show_download_button={buttons === null
|
|
200
|
+
transforms={gradio.props.transforms}
|
|
201
|
+
accept_blobs={gradio.shared.server.accept_blobs}
|
|
202
|
+
layer_options={gradio.props.layers}
|
|
203
|
+
upload={(...args) => gradio.shared.client.upload(...args)}
|
|
204
|
+
placeholder={gradio.props.placeholder}
|
|
205
|
+
webcam_options={gradio.props.webcam_options}
|
|
206
|
+
show_download_button={gradio.props.buttons === null
|
|
191
207
|
? true
|
|
192
|
-
: buttons.includes("download")}
|
|
193
|
-
{theme_mode}
|
|
208
|
+
: gradio.props.buttons.includes("download")}
|
|
209
|
+
theme_mode={gradio.shared.theme_mode}
|
|
194
210
|
on:download_error={(e) => gradio.dispatch("error", e.detail)}
|
|
195
211
|
></InteractiveImageEditor>
|
|
196
212
|
</Block>
|
package/dist/Index.svelte.d.ts
CHANGED
|
@@ -1,204 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
elem_classes?: string[];
|
|
12
|
-
visible?: boolean | "hidden";
|
|
13
|
-
value?: EditorData | null;
|
|
14
|
-
label: string;
|
|
15
|
-
show_label: boolean;
|
|
16
|
-
buttons?: string[] | null;
|
|
17
|
-
root: string;
|
|
18
|
-
value_is_output?: boolean;
|
|
19
|
-
height?: number;
|
|
20
|
-
width: number | undefined;
|
|
21
|
-
_selectable?: boolean;
|
|
22
|
-
container?: boolean;
|
|
23
|
-
scale?: number | null;
|
|
24
|
-
min_width?: number | undefined;
|
|
25
|
-
loading_status: LoadingStatus;
|
|
26
|
-
sources?: Source[];
|
|
27
|
-
interactive: boolean;
|
|
28
|
-
placeholder: string | undefined;
|
|
29
|
-
brush: Brush;
|
|
30
|
-
eraser: Eraser;
|
|
31
|
-
transforms?: Transform[];
|
|
32
|
-
layers: LayerOptions;
|
|
33
|
-
attached_events?: string[];
|
|
34
|
-
server: {
|
|
35
|
-
accept_blobs: (a: any) => void;
|
|
36
|
-
};
|
|
37
|
-
canvas_size: [number, number];
|
|
38
|
-
fixed_canvas?: boolean;
|
|
39
|
-
full_history?: CommandNode | null;
|
|
40
|
-
gradio: Gradio<{
|
|
41
|
-
change: never;
|
|
42
|
-
error: string;
|
|
43
|
-
input: never;
|
|
44
|
-
edit: never;
|
|
45
|
-
drag: never;
|
|
46
|
-
apply: never;
|
|
47
|
-
upload: never;
|
|
48
|
-
clear: never;
|
|
49
|
-
select: SelectData;
|
|
50
|
-
share: ShareData;
|
|
51
|
-
clear_status: LoadingStatus;
|
|
52
|
-
}>;
|
|
53
|
-
border_region?: number;
|
|
54
|
-
webcam_options: WebcamOptions;
|
|
55
|
-
theme_mode: "dark" | "light";
|
|
56
|
-
get_value?: () => Promise<ImageBlobs | {
|
|
57
|
-
id: string;
|
|
58
|
-
}>;
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
59
11
|
};
|
|
60
|
-
|
|
61
|
-
error: CustomEvent<any>;
|
|
62
|
-
} & {
|
|
63
|
-
[evt: string]: CustomEvent<any>;
|
|
64
|
-
};
|
|
65
|
-
slots: {};
|
|
66
|
-
exports?: {} | undefined;
|
|
67
|
-
bindings?: string | undefined;
|
|
68
|
-
};
|
|
69
|
-
export type IndexProps = typeof __propDef.props;
|
|
70
|
-
export type IndexEvents = typeof __propDef.events;
|
|
71
|
-
export type IndexSlots = typeof __propDef.slots;
|
|
72
|
-
export default class Index extends SvelteComponent<IndexProps, IndexEvents, IndexSlots> {
|
|
73
|
-
get get_value(): () => Promise<ImageBlobs | {
|
|
74
|
-
id: string;
|
|
75
|
-
}>;
|
|
76
|
-
get elem_id(): string | undefined;
|
|
77
|
-
/**accessor*/
|
|
78
|
-
set elem_id(_: string | undefined);
|
|
79
|
-
get elem_classes(): string[] | undefined;
|
|
80
|
-
/**accessor*/
|
|
81
|
-
set elem_classes(_: string[] | undefined);
|
|
82
|
-
get visible(): boolean | "hidden" | undefined;
|
|
83
|
-
/**accessor*/
|
|
84
|
-
set visible(_: boolean | "hidden" | undefined);
|
|
85
|
-
get value(): EditorData | null | undefined;
|
|
86
|
-
/**accessor*/
|
|
87
|
-
set value(_: EditorData | null | undefined);
|
|
88
|
-
get label(): string;
|
|
89
|
-
/**accessor*/
|
|
90
|
-
set label(_: string);
|
|
91
|
-
get show_label(): boolean;
|
|
92
|
-
/**accessor*/
|
|
93
|
-
set show_label(_: boolean);
|
|
94
|
-
get buttons(): string[] | null | undefined;
|
|
95
|
-
/**accessor*/
|
|
96
|
-
set buttons(_: string[] | null | undefined);
|
|
97
|
-
get root(): string;
|
|
98
|
-
/**accessor*/
|
|
99
|
-
set root(_: string);
|
|
100
|
-
get value_is_output(): boolean | undefined;
|
|
101
|
-
/**accessor*/
|
|
102
|
-
set value_is_output(_: boolean | undefined);
|
|
103
|
-
get height(): number | undefined;
|
|
104
|
-
/**accessor*/
|
|
105
|
-
set height(_: number | undefined);
|
|
106
|
-
get width(): number | undefined;
|
|
107
|
-
/**accessor*/
|
|
108
|
-
set width(_: number | undefined);
|
|
109
|
-
get _selectable(): boolean | undefined;
|
|
110
|
-
/**accessor*/
|
|
111
|
-
set _selectable(_: boolean | undefined);
|
|
112
|
-
get container(): boolean | undefined;
|
|
113
|
-
/**accessor*/
|
|
114
|
-
set container(_: boolean | undefined);
|
|
115
|
-
get scale(): number | null | undefined;
|
|
116
|
-
/**accessor*/
|
|
117
|
-
set scale(_: number | null | undefined);
|
|
118
|
-
get min_width(): number | undefined;
|
|
119
|
-
/**accessor*/
|
|
120
|
-
set min_width(_: number | undefined);
|
|
121
|
-
get loading_status(): LoadingStatus;
|
|
122
|
-
/**accessor*/
|
|
123
|
-
set loading_status(_: LoadingStatus);
|
|
124
|
-
get sources(): Source[] | undefined;
|
|
125
|
-
/**accessor*/
|
|
126
|
-
set sources(_: Source[] | undefined);
|
|
127
|
-
get interactive(): boolean;
|
|
128
|
-
/**accessor*/
|
|
129
|
-
set interactive(_: boolean);
|
|
130
|
-
get placeholder(): string | undefined;
|
|
131
|
-
/**accessor*/
|
|
132
|
-
set placeholder(_: string | undefined);
|
|
133
|
-
get brush(): Brush;
|
|
134
|
-
/**accessor*/
|
|
135
|
-
set brush(_: Brush);
|
|
136
|
-
get eraser(): Eraser;
|
|
137
|
-
/**accessor*/
|
|
138
|
-
set eraser(_: Eraser);
|
|
139
|
-
get transforms(): Transform[] | undefined;
|
|
140
|
-
/**accessor*/
|
|
141
|
-
set transforms(_: Transform[] | undefined);
|
|
142
|
-
get layers(): LayerOptions;
|
|
143
|
-
/**accessor*/
|
|
144
|
-
set layers(_: LayerOptions);
|
|
145
|
-
get attached_events(): string[] | undefined;
|
|
146
|
-
/**accessor*/
|
|
147
|
-
set attached_events(_: string[] | undefined);
|
|
148
|
-
get server(): {
|
|
149
|
-
accept_blobs: (a: any) => void;
|
|
150
|
-
};
|
|
151
|
-
/**accessor*/
|
|
152
|
-
set server(_: {
|
|
153
|
-
accept_blobs: (a: any) => void;
|
|
154
|
-
});
|
|
155
|
-
get canvas_size(): [number, number];
|
|
156
|
-
/**accessor*/
|
|
157
|
-
set canvas_size(_: [number, number]);
|
|
158
|
-
get fixed_canvas(): boolean | undefined;
|
|
159
|
-
/**accessor*/
|
|
160
|
-
set fixed_canvas(_: boolean | undefined);
|
|
161
|
-
get full_history(): CommandNode | null | undefined;
|
|
162
|
-
/**accessor*/
|
|
163
|
-
set full_history(_: CommandNode | null | undefined);
|
|
164
|
-
get gradio(): Gradio<{
|
|
165
|
-
change: never;
|
|
166
|
-
error: string;
|
|
167
|
-
input: never;
|
|
168
|
-
edit: never;
|
|
169
|
-
drag: never;
|
|
170
|
-
apply: never;
|
|
171
|
-
upload: never;
|
|
172
|
-
clear: never;
|
|
173
|
-
select: SelectData;
|
|
174
|
-
share: ShareData;
|
|
175
|
-
clear_status: LoadingStatus;
|
|
176
|
-
}>;
|
|
177
|
-
/**accessor*/
|
|
178
|
-
set gradio(_: Gradio<{
|
|
179
|
-
change: never;
|
|
180
|
-
error: string;
|
|
181
|
-
input: never;
|
|
182
|
-
edit: never;
|
|
183
|
-
drag: never;
|
|
184
|
-
apply: never;
|
|
185
|
-
upload: never;
|
|
186
|
-
clear: never;
|
|
187
|
-
select: SelectData;
|
|
188
|
-
share: ShareData;
|
|
189
|
-
clear_status: LoadingStatus;
|
|
190
|
-
}>);
|
|
191
|
-
get border_region(): number | undefined;
|
|
192
|
-
/**accessor*/
|
|
193
|
-
set border_region(_: number | undefined);
|
|
194
|
-
get webcam_options(): WebcamOptions;
|
|
195
|
-
/**accessor*/
|
|
196
|
-
set webcam_options(_: WebcamOptions);
|
|
197
|
-
get theme_mode(): "light" | "dark";
|
|
198
|
-
/**accessor*/
|
|
199
|
-
set theme_mode(_: "light" | "dark");
|
|
200
|
-
get undefined(): any;
|
|
201
|
-
/**accessor*/
|
|
202
|
-
set undefined(_: any);
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
203
13
|
}
|
|
204
|
-
|
|
14
|
+
declare const Index: $$__sveltets_2_IsomorphicComponent<$$ComponentProps, {
|
|
15
|
+
error: CustomEvent<any>;
|
|
16
|
+
} & {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
}, {}, {}, "">;
|
|
19
|
+
type Index = InstanceType<typeof Index>;
|
|
20
|
+
export default Index;
|