@gradio/multimodaltextbox 0.11.3 → 0.11.5
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 +37 -0
- package/Example.svelte +14 -10
- package/Index.svelte +17 -19
- package/MultimodalTextbox.stories.svelte +96 -59
- package/MultimodalTextboxExample.stories.svelte +17 -13
- package/dist/Example.svelte +14 -10
- package/dist/Example.svelte.d.ts +4 -18
- package/dist/Index.svelte +17 -19
- package/dist/shared/MultimodalTextbox.svelte +259 -194
- package/dist/shared/MultimodalTextbox.svelte.d.ts +19 -37
- package/dist/shared/types.d.ts +1 -1
- package/dist/types.d.ts +0 -2
- package/package.json +12 -12
- package/shared/MultimodalTextbox.svelte +259 -194
- package/shared/types.ts +1 -1
- package/types.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @gradio/multimodaltextbox
|
|
2
2
|
|
|
3
|
+
## 0.11.5
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- [#12789](https://github.com/gradio-app/gradio/pull/12789) [`af5e86f`](https://github.com/gradio-app/gradio/commit/af5e86f10d95cc71ee4cb950e455dbdc8e138983) - Migrate gr.MultimodalTextbox. Thanks @hannahblair!
|
|
8
|
+
|
|
9
|
+
### Dependency updates
|
|
10
|
+
|
|
11
|
+
- @gradio/atoms@0.21.0
|
|
12
|
+
- @gradio/client@2.0.4
|
|
13
|
+
- @gradio/statustracker@0.12.3
|
|
14
|
+
- @gradio/image@0.25.2
|
|
15
|
+
- @gradio/upload@0.17.5
|
|
16
|
+
- @gradio/video@0.20.2
|
|
17
|
+
- @gradio/audio@0.22.2
|
|
18
|
+
|
|
19
|
+
## 0.11.4
|
|
20
|
+
|
|
21
|
+
### Fixes
|
|
22
|
+
|
|
23
|
+
- [#12800](https://github.com/gradio-app/gradio/pull/12800) [`7a1c321`](https://github.com/gradio-app/gradio/commit/7a1c321b6546ba05a353488f5133e8262c4a8a39) - Bump svelte/kit for security reasons. Thanks @freddyaboulton!
|
|
24
|
+
- [#12779](https://github.com/gradio-app/gradio/pull/12779) [`ea2d3e9`](https://github.com/gradio-app/gradio/commit/ea2d3e985a8b42d188e551f517c5825c00790628) - Migrate Audio + Upload + Atoms to Svelte 5. Thanks @dawoodkhan82!
|
|
25
|
+
- [#12795](https://github.com/gradio-app/gradio/pull/12795) [`184968a`](https://github.com/gradio-app/gradio/commit/184968aa13636b5afe78f8ae443cd7fc29635bfa) - Add fade effect to overflowing text. Thanks @hannahblair!
|
|
26
|
+
- [#12594](https://github.com/gradio-app/gradio/pull/12594) [`c2f0f19`](https://github.com/gradio-app/gradio/commit/c2f0f1949d453bc850fa65e5b140067008a83e22) - add conditional rendering for the upload button in multimodal textbox. Thanks @hannahblair!
|
|
27
|
+
|
|
28
|
+
### Dependency updates
|
|
29
|
+
|
|
30
|
+
- @gradio/statustracker@0.12.2
|
|
31
|
+
- @gradio/atoms@0.20.1
|
|
32
|
+
- @gradio/utils@0.11.2
|
|
33
|
+
- @gradio/icons@0.15.1
|
|
34
|
+
- @gradio/upload@0.17.4
|
|
35
|
+
- @gradio/client@2.0.3
|
|
36
|
+
- @gradio/image@0.25.1
|
|
37
|
+
- @gradio/video@0.20.1
|
|
38
|
+
- @gradio/audio@0.22.1
|
|
39
|
+
|
|
3
40
|
## 0.11.3
|
|
4
41
|
|
|
5
42
|
### Fixes
|
package/Example.svelte
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { onMount } from "svelte";
|
|
3
2
|
import { Image } from "@gradio/image/shared";
|
|
4
3
|
import { Video } from "@gradio/video/shared";
|
|
5
4
|
import type { FileData } from "@gradio/client";
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
text: "",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
let {
|
|
7
|
+
value = { text: "", files: [] },
|
|
8
|
+
type,
|
|
9
|
+
selected = false
|
|
10
|
+
}: {
|
|
11
|
+
value?: { text: string; files: FileData[] };
|
|
12
|
+
type: "gallery" | "table";
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
} = $props();
|
|
13
15
|
|
|
14
|
-
let size
|
|
16
|
+
let size = $state<number>(0);
|
|
15
17
|
let el: HTMLDivElement;
|
|
16
18
|
|
|
17
19
|
function set_styles(element: HTMLElement, el_width: number): void {
|
|
@@ -22,8 +24,10 @@
|
|
|
22
24
|
element.style.whiteSpace = "unset";
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
$effect(() => {
|
|
28
|
+
if (el && size) {
|
|
29
|
+
set_styles(el, size);
|
|
30
|
+
}
|
|
27
31
|
});
|
|
28
32
|
</script>
|
|
29
33
|
|
package/Index.svelte
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
MultimodalTextboxEvents
|
|
18
18
|
} from "./types";
|
|
19
19
|
|
|
20
|
-
let upload_promise = $state<Promise<any
|
|
20
|
+
let upload_promise = $state<Promise<any> | null>(null);
|
|
21
21
|
|
|
22
22
|
class MultimodalTextboxGradio extends Gradio<
|
|
23
23
|
MultimodalTextboxEvents,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
let props = $props();
|
|
38
38
|
const gradio = new MultimodalTextboxGradio(props);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
gradio.props.value = gradio.props.value ?? { text: "", files: [] };
|
|
41
41
|
|
|
42
42
|
let dragging = $state<boolean>(false);
|
|
43
43
|
let active_source = $state<"microphone" | null>(null);
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
|
|
136
136
|
<MultimodalTextbox
|
|
137
137
|
bind:upload_promise
|
|
138
|
-
{value}
|
|
138
|
+
bind:value={gradio.props.value}
|
|
139
139
|
value_is_output
|
|
140
140
|
bind:dragging
|
|
141
141
|
bind:active_source
|
|
@@ -160,24 +160,22 @@
|
|
|
160
160
|
file_count={gradio.props.file_count}
|
|
161
161
|
{sources_string}
|
|
162
162
|
max_file_size={gradio.shared.max_file_size}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
gradio.dispatch("change", gradio.props.value)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
163
|
+
onchange={(e) => {
|
|
164
|
+
gradio.props.value = e;
|
|
165
|
+
gradio.dispatch("change", gradio.props.value);
|
|
166
|
+
}}
|
|
167
|
+
oninput={() => gradio.dispatch("input")}
|
|
168
|
+
onsubmit={() => gradio.dispatch("submit")}
|
|
169
|
+
onstop={() => gradio.dispatch("stop")}
|
|
170
|
+
onblur={() => gradio.dispatch("blur")}
|
|
171
|
+
onselect={(e) => gradio.dispatch("select", e)}
|
|
172
|
+
onfocus={() => gradio.dispatch("focus")}
|
|
173
|
+
onerror={(detail) => {
|
|
174
174
|
gradio.dispatch("error", detail);
|
|
175
175
|
}}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
on:upload={(e) => gradio.dispatch("upload", e.detail)}
|
|
180
|
-
on:clear={() => gradio.dispatch("clear")}
|
|
176
|
+
onstop_recording={() => gradio.dispatch("stop_recording")}
|
|
177
|
+
onupload={(e) => gradio.dispatch("upload", e)}
|
|
178
|
+
onclear={() => gradio.dispatch("clear")}
|
|
181
179
|
disabled={!gradio.shared.interactive}
|
|
182
180
|
upload={upload_fn}
|
|
183
181
|
stream_handler={stream_handler_fn}
|
|
@@ -1,60 +1,63 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
3
|
import MultimodalTextbox from "./Index.svelte";
|
|
4
|
-
|
|
4
|
+
import { wrapProps } from "../storybook/wrapProps";
|
|
5
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
|
-
|
|
6
|
+
const cheetah = "/cheetah.jpg";
|
|
7
|
+
|
|
8
|
+
const { Story } = defineMeta({
|
|
9
|
+
title: "Components/MultimodalTextbox",
|
|
10
|
+
component: MultimodalTextbox,
|
|
11
|
+
argTypes: {
|
|
12
|
+
label: {
|
|
13
|
+
control: "text",
|
|
14
|
+
description: "The textbox label",
|
|
15
|
+
name: "label"
|
|
16
|
+
},
|
|
17
|
+
show_label: {
|
|
18
|
+
options: [true, false],
|
|
19
|
+
description: "Whether to show the label",
|
|
20
|
+
control: { type: "boolean" },
|
|
21
|
+
defaultValue: true
|
|
22
|
+
},
|
|
23
|
+
text_align: {
|
|
24
|
+
options: ["left", "right"],
|
|
25
|
+
description: "Whether to align the text left or right",
|
|
26
|
+
control: { type: "select" },
|
|
27
|
+
defaultValue: "left"
|
|
28
|
+
},
|
|
29
|
+
lines: {
|
|
30
|
+
options: [1, 5, 10, 20],
|
|
31
|
+
description: "The number of lines to display in the textbox",
|
|
32
|
+
control: { type: "select" },
|
|
33
|
+
defaultValue: 1
|
|
34
|
+
},
|
|
35
|
+
max_lines: {
|
|
36
|
+
options: [1, 5, 10, 20],
|
|
37
|
+
description:
|
|
38
|
+
"The maximum number of lines to allow users to type in the textbox",
|
|
39
|
+
control: { type: "select" },
|
|
40
|
+
defaultValue: 1
|
|
41
|
+
},
|
|
42
|
+
rtl: {
|
|
43
|
+
options: [true, false],
|
|
44
|
+
description: "Whether to render right-to-left",
|
|
45
|
+
control: { type: "boolean" },
|
|
46
|
+
defaultValue: false
|
|
47
|
+
},
|
|
48
|
+
sources: {
|
|
49
|
+
options: ["upload", "microphone"],
|
|
50
|
+
description: "The sources to enable",
|
|
51
|
+
control: { type: "select" },
|
|
52
|
+
defaultValue: ["upload", "microphone"]
|
|
53
|
+
}
|
|
51
54
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
55
|
+
});
|
|
56
|
+
</script>
|
|
54
57
|
|
|
55
|
-
|
|
56
|
-
<MultimodalTextbox {...args} />
|
|
57
|
-
|
|
58
|
+
{#snippet template(args)}
|
|
59
|
+
<MultimodalTextbox {...wrapProps(args)} />
|
|
60
|
+
{/snippet}
|
|
58
61
|
|
|
59
62
|
<Story
|
|
60
63
|
name="MultimodalTextbox with file and label"
|
|
@@ -63,43 +66,77 @@
|
|
|
63
66
|
text: "sample text",
|
|
64
67
|
files: [
|
|
65
68
|
{
|
|
66
|
-
path:
|
|
67
|
-
url:
|
|
69
|
+
path: cheetah,
|
|
70
|
+
url: cheetah,
|
|
68
71
|
orig_name: "cheetah.jpg"
|
|
69
72
|
}
|
|
70
73
|
]
|
|
71
74
|
},
|
|
72
75
|
label: "My simple label",
|
|
73
|
-
show_label: true
|
|
76
|
+
show_label: true,
|
|
77
|
+
sources: ["upload", "microphone"],
|
|
78
|
+
file_types: [],
|
|
79
|
+
lines: 1,
|
|
80
|
+
max_lines: 5
|
|
74
81
|
}}
|
|
82
|
+
{template}
|
|
75
83
|
/>
|
|
76
84
|
<Story
|
|
77
85
|
name="MultimodalTextbox with 5 lines and max 5 lines"
|
|
78
|
-
args={{
|
|
86
|
+
args={{
|
|
87
|
+
lines: 5,
|
|
88
|
+
max_lines: 5,
|
|
89
|
+
sources: ["upload", "microphone"],
|
|
90
|
+
file_types: [],
|
|
91
|
+
value: { text: "", files: [] }
|
|
92
|
+
}}
|
|
93
|
+
{template}
|
|
94
|
+
/>
|
|
95
|
+
<Story
|
|
96
|
+
name="Right aligned textbox"
|
|
97
|
+
args={{
|
|
98
|
+
text_align: "right",
|
|
99
|
+
sources: ["upload", "microphone"],
|
|
100
|
+
file_types: [],
|
|
101
|
+
lines: 1,
|
|
102
|
+
max_lines: 5,
|
|
103
|
+
value: { text: "", files: [] }
|
|
104
|
+
}}
|
|
105
|
+
{template}
|
|
79
106
|
/>
|
|
80
|
-
<Story name="Right aligned textbox" args={{ text_align: "right" }} />
|
|
81
107
|
<Story
|
|
82
108
|
name="Single file upload"
|
|
83
109
|
args={{
|
|
84
110
|
file_count: "single",
|
|
85
111
|
submit_btn: true,
|
|
112
|
+
sources: ["upload"],
|
|
113
|
+
file_types: [],
|
|
114
|
+
lines: 1,
|
|
115
|
+
max_lines: 5,
|
|
86
116
|
value: {
|
|
87
117
|
text: "sample text",
|
|
88
118
|
files: [
|
|
89
119
|
{
|
|
90
|
-
path:
|
|
120
|
+
path: cheetah,
|
|
121
|
+
url: cheetah,
|
|
122
|
+
orig_name: "cheetah.jpg"
|
|
91
123
|
}
|
|
92
124
|
]
|
|
93
125
|
}
|
|
94
126
|
}}
|
|
127
|
+
{template}
|
|
95
128
|
/>
|
|
96
129
|
<Story
|
|
97
130
|
name="MultimodalTextbox with microphone input and right to left text"
|
|
98
131
|
args={{
|
|
99
132
|
label: "مرحبًا",
|
|
100
133
|
sources: ["microphone"],
|
|
134
|
+
file_types: [],
|
|
101
135
|
rtl: true,
|
|
102
136
|
submit_btn: true,
|
|
137
|
+
lines: 1,
|
|
138
|
+
max_lines: 5,
|
|
103
139
|
value: { text: "مرحبًا", files: [] }
|
|
104
140
|
}}
|
|
141
|
+
{template}
|
|
105
142
|
/>
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
3
|
import MultimodalTextbox from "./Example.svelte";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<Meta
|
|
7
|
-
title="Components/MultimodalTextbox/Example"
|
|
8
|
-
component={MultimodalTextbox}
|
|
9
|
-
/>
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: "Components/MultimodalTextbox/Example",
|
|
7
|
+
component: MultimodalTextbox
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
14
10
|
|
|
15
11
|
<Story
|
|
16
12
|
name="Text value"
|
|
17
13
|
args={{
|
|
18
14
|
value: { text: "the quick brown fox", files: [] }
|
|
19
15
|
}}
|
|
20
|
-
|
|
16
|
+
>
|
|
17
|
+
{#snippet template(args)}
|
|
18
|
+
<MultimodalTextbox {...args} />
|
|
19
|
+
{/snippet}
|
|
20
|
+
</Story>
|
|
21
21
|
|
|
22
22
|
<Story
|
|
23
23
|
name="Empty Value"
|
|
24
24
|
args={{
|
|
25
25
|
value: { text: "", files: [] }
|
|
26
26
|
}}
|
|
27
|
-
|
|
27
|
+
>
|
|
28
|
+
{#snippet template(args)}
|
|
29
|
+
<MultimodalTextbox {...args} />
|
|
30
|
+
{/snippet}
|
|
31
|
+
</Story>
|
package/dist/Example.svelte
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { onMount } from "svelte";
|
|
3
2
|
import { Image } from "@gradio/image/shared";
|
|
4
3
|
import { Video } from "@gradio/video/shared";
|
|
5
4
|
import type { FileData } from "@gradio/client";
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
text: "",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
let {
|
|
7
|
+
value = { text: "", files: [] },
|
|
8
|
+
type,
|
|
9
|
+
selected = false
|
|
10
|
+
}: {
|
|
11
|
+
value?: { text: string; files: FileData[] };
|
|
12
|
+
type: "gallery" | "table";
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
} = $props();
|
|
13
15
|
|
|
14
|
-
let size
|
|
16
|
+
let size = $state<number>(0);
|
|
15
17
|
let el: HTMLDivElement;
|
|
16
18
|
|
|
17
19
|
function set_styles(element: HTMLElement, el_width: number): void {
|
|
@@ -22,8 +24,10 @@
|
|
|
22
24
|
element.style.whiteSpace = "unset";
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
$effect(() => {
|
|
28
|
+
if (el && size) {
|
|
29
|
+
set_styles(el, size);
|
|
30
|
+
}
|
|
27
31
|
});
|
|
28
32
|
</script>
|
|
29
33
|
|
package/dist/Example.svelte.d.ts
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
import type { FileData } from "@gradio/client";
|
|
2
|
-
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: Props & {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const Example: $$__sveltets_2_IsomorphicComponent<{
|
|
2
|
+
type $$ComponentProps = {
|
|
16
3
|
value?: {
|
|
17
4
|
text: string;
|
|
18
5
|
files: FileData[];
|
|
19
6
|
};
|
|
20
7
|
type: "gallery" | "table";
|
|
21
8
|
selected?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
type Example = InstanceType<typeof Example>;
|
|
9
|
+
};
|
|
10
|
+
declare const Example: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
+
type Example = ReturnType<typeof Example>;
|
|
26
12
|
export default Example;
|
package/dist/Index.svelte
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
MultimodalTextboxEvents
|
|
18
18
|
} from "./types";
|
|
19
19
|
|
|
20
|
-
let upload_promise = $state<Promise<any
|
|
20
|
+
let upload_promise = $state<Promise<any> | null>(null);
|
|
21
21
|
|
|
22
22
|
class MultimodalTextboxGradio extends Gradio<
|
|
23
23
|
MultimodalTextboxEvents,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
let props = $props();
|
|
38
38
|
const gradio = new MultimodalTextboxGradio(props);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
gradio.props.value = gradio.props.value ?? { text: "", files: [] };
|
|
41
41
|
|
|
42
42
|
let dragging = $state<boolean>(false);
|
|
43
43
|
let active_source = $state<"microphone" | null>(null);
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
|
|
136
136
|
<MultimodalTextbox
|
|
137
137
|
bind:upload_promise
|
|
138
|
-
{value}
|
|
138
|
+
bind:value={gradio.props.value}
|
|
139
139
|
value_is_output
|
|
140
140
|
bind:dragging
|
|
141
141
|
bind:active_source
|
|
@@ -160,24 +160,22 @@
|
|
|
160
160
|
file_count={gradio.props.file_count}
|
|
161
161
|
{sources_string}
|
|
162
162
|
max_file_size={gradio.shared.max_file_size}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
gradio.dispatch("change", gradio.props.value)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
163
|
+
onchange={(e) => {
|
|
164
|
+
gradio.props.value = e;
|
|
165
|
+
gradio.dispatch("change", gradio.props.value);
|
|
166
|
+
}}
|
|
167
|
+
oninput={() => gradio.dispatch("input")}
|
|
168
|
+
onsubmit={() => gradio.dispatch("submit")}
|
|
169
|
+
onstop={() => gradio.dispatch("stop")}
|
|
170
|
+
onblur={() => gradio.dispatch("blur")}
|
|
171
|
+
onselect={(e) => gradio.dispatch("select", e)}
|
|
172
|
+
onfocus={() => gradio.dispatch("focus")}
|
|
173
|
+
onerror={(detail) => {
|
|
174
174
|
gradio.dispatch("error", detail);
|
|
175
175
|
}}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
on:upload={(e) => gradio.dispatch("upload", e.detail)}
|
|
180
|
-
on:clear={() => gradio.dispatch("clear")}
|
|
176
|
+
onstop_recording={() => gradio.dispatch("stop_recording")}
|
|
177
|
+
onupload={(e) => gradio.dispatch("upload", e)}
|
|
178
|
+
onclear={() => gradio.dispatch("clear")}
|
|
181
179
|
disabled={!gradio.shared.interactive}
|
|
182
180
|
upload={upload_fn}
|
|
183
181
|
stream_handler={stream_handler_fn}
|