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