@gradio/multimodaltextbox 0.10.10 → 0.10.11
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 +9 -0
- package/Index.svelte +3 -0
- package/dist/Index.svelte +2 -0
- package/dist/Index.svelte.d.ts +5 -0
- package/dist/shared/MultimodalTextbox.svelte +5 -0
- package/dist/shared/MultimodalTextbox.svelte.d.ts +2 -0
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.js +1 -0
- package/dist/shared/utils.d.ts +1 -1
- package/dist/shared/utils.js +1 -0
- package/package.json +7 -7
- package/shared/MultimodalTextbox.svelte +8 -0
- package/shared/types.ts +1 -0
- package/shared/utils.ts +2 -0
package/CHANGELOG.md
CHANGED
package/Index.svelte
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import type { FileData } from "@gradio/client";
|
|
15
15
|
import { onMount } from "svelte";
|
|
16
16
|
import type { WaveformOptions } from "../audio/shared/types";
|
|
17
|
+
import type { InputHTMLAttributes } from "./shared/types";
|
|
17
18
|
|
|
18
19
|
export let gradio: Gradio<{
|
|
19
20
|
change: typeof value;
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
export let max_plain_text_length: number;
|
|
62
63
|
export let sources: ["microphone" | "upload"] = ["upload"];
|
|
63
64
|
export let waveform_options: WaveformOptions = {};
|
|
65
|
+
export let html_attributes: InputHTMLAttributes | null = null;
|
|
64
66
|
|
|
65
67
|
let dragging: boolean;
|
|
66
68
|
let active_source: "microphone" | null = null;
|
|
@@ -169,5 +171,6 @@
|
|
|
169
171
|
upload={(...args) => gradio.client.upload(...args)}
|
|
170
172
|
stream_handler={(...args) => gradio.client.stream(...args)}
|
|
171
173
|
{max_plain_text_length}
|
|
174
|
+
{html_attributes}
|
|
172
175
|
/>
|
|
173
176
|
</Block>
|
package/dist/Index.svelte
CHANGED
|
@@ -39,6 +39,7 @@ export let file_count;
|
|
|
39
39
|
export let max_plain_text_length;
|
|
40
40
|
export let sources = ["upload"];
|
|
41
41
|
export let waveform_options = {};
|
|
42
|
+
export let html_attributes = null;
|
|
42
43
|
let dragging;
|
|
43
44
|
let active_source = null;
|
|
44
45
|
let waveform_settings;
|
|
@@ -141,5 +142,6 @@ function set_trim_region_colour() {
|
|
|
141
142
|
upload={(...args) => gradio.client.upload(...args)}
|
|
142
143
|
stream_handler={(...args) => gradio.client.stream(...args)}
|
|
143
144
|
{max_plain_text_length}
|
|
145
|
+
{html_attributes}
|
|
144
146
|
/>
|
|
145
147
|
</Block>
|
package/dist/Index.svelte.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { default as BaseExample } from "./Example.svelte";
|
|
|
4
4
|
import type { Gradio, SelectData } from "@gradio/utils";
|
|
5
5
|
import type { LoadingStatus } from "@gradio/statustracker";
|
|
6
6
|
import type { FileData } from "@gradio/client";
|
|
7
|
+
import type { InputHTMLAttributes } from "./shared/types";
|
|
7
8
|
declare const __propDef: {
|
|
8
9
|
props: {
|
|
9
10
|
gradio: Gradio<{
|
|
@@ -55,6 +56,7 @@ declare const __propDef: {
|
|
|
55
56
|
max_plain_text_length: number;
|
|
56
57
|
sources?: ["microphone" | "upload"] | undefined;
|
|
57
58
|
waveform_options?: any;
|
|
59
|
+
html_attributes?: InputHTMLAttributes | null;
|
|
58
60
|
};
|
|
59
61
|
events: {
|
|
60
62
|
[evt: string]: CustomEvent<any>;
|
|
@@ -191,4 +193,7 @@ export default class Index extends SvelteComponent<IndexProps, IndexEvents, Inde
|
|
|
191
193
|
get waveform_options(): any;
|
|
192
194
|
/**accessor*/
|
|
193
195
|
set waveform_options(_: any);
|
|
196
|
+
get html_attributes(): any;
|
|
197
|
+
/**accessor*/
|
|
198
|
+
set html_attributes(_: any);
|
|
194
199
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
Microphone
|
|
21
21
|
} from "@gradio/icons";
|
|
22
22
|
import InteractiveAudio from "../../audio/interactive/InteractiveAudio.svelte";
|
|
23
|
+
import { convert_html_attributes } from "./utils";
|
|
23
24
|
export let value = {
|
|
24
25
|
text: "",
|
|
25
26
|
files: []
|
|
@@ -52,6 +53,9 @@ export let waveform_options = {
|
|
|
52
53
|
};
|
|
53
54
|
export let sources = ["upload"];
|
|
54
55
|
export let active_source = null;
|
|
56
|
+
export let html_attributes = null;
|
|
57
|
+
$:
|
|
58
|
+
html_attrs = convert_html_attributes(html_attributes);
|
|
55
59
|
let upload_component;
|
|
56
60
|
let el;
|
|
57
61
|
let can_scroll;
|
|
@@ -394,6 +398,7 @@ function handle_drop(event) {
|
|
|
394
398
|
on:scroll={handle_scroll}
|
|
395
399
|
on:paste={handle_paste}
|
|
396
400
|
style={text_align ? "text-align: " + text_align : ""}
|
|
401
|
+
{...html_attrs}
|
|
397
402
|
/>
|
|
398
403
|
{#if submit_btn}
|
|
399
404
|
<button
|
|
@@ -2,6 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import type { I18nFormatter } from "js/core/src/gradio_helper";
|
|
3
3
|
import type { FileData, Client } from "@gradio/client";
|
|
4
4
|
import type { SelectData } from "@gradio/utils";
|
|
5
|
+
import type { InputHTMLAttributes } from "./types";
|
|
5
6
|
declare const __propDef: {
|
|
6
7
|
props: {
|
|
7
8
|
value?: {
|
|
@@ -34,6 +35,7 @@ declare const __propDef: {
|
|
|
34
35
|
waveform_options?: any;
|
|
35
36
|
sources?: ["microphone" | "upload"] | undefined;
|
|
36
37
|
active_source?: ("microphone" | null) | undefined;
|
|
38
|
+
html_attributes?: InputHTMLAttributes | null;
|
|
37
39
|
dragging?: boolean | undefined;
|
|
38
40
|
};
|
|
39
41
|
events: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { InputHTMLAttributes } from "../../textbox/shared/types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/shared/utils.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ interface Value {
|
|
|
5
5
|
}
|
|
6
6
|
export declare function resize(target: HTMLTextAreaElement | HTMLInputElement, lines: number, max_lines: number): Promise<void>;
|
|
7
7
|
export declare function text_area_resize(_el: HTMLTextAreaElement, _value: Value): any | undefined;
|
|
8
|
-
export {};
|
|
8
|
+
export { convert_html_attributes } from "../../textbox/shared/utils";
|
package/dist/shared/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/multimodaltextbox",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.11",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"./package.json": "./package.json"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@gradio/
|
|
25
|
+
"@gradio/atoms": "^0.16.2",
|
|
26
26
|
"@gradio/icons": "^0.12.0",
|
|
27
|
+
"@gradio/statustracker": "^0.10.13",
|
|
28
|
+
"@gradio/upload": "^0.16.9",
|
|
27
29
|
"@gradio/utils": "^0.10.2",
|
|
28
|
-
"@gradio/
|
|
29
|
-
"@gradio/
|
|
30
|
-
"@gradio/
|
|
31
|
-
"@gradio/client": "^1.15.3",
|
|
32
|
-
"@gradio/video": "^0.14.18"
|
|
30
|
+
"@gradio/image": "^0.22.11",
|
|
31
|
+
"@gradio/video": "^0.14.19",
|
|
32
|
+
"@gradio/client": "^1.15.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@gradio/preview": "^0.13.2"
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
} from "@gradio/icons";
|
|
26
26
|
import type { SelectData } from "@gradio/utils";
|
|
27
27
|
import InteractiveAudio from "../../audio/interactive/InteractiveAudio.svelte";
|
|
28
|
+
import type { InputHTMLAttributes } from "./types";
|
|
29
|
+
import { convert_html_attributes } from "./utils";
|
|
28
30
|
|
|
29
31
|
export let value: { text: string; files: FileData[] } = {
|
|
30
32
|
text: "",
|
|
@@ -59,6 +61,11 @@
|
|
|
59
61
|
};
|
|
60
62
|
export let sources: ["microphone" | "upload"] = ["upload"];
|
|
61
63
|
export let active_source: "microphone" | null = null;
|
|
64
|
+
export let html_attributes: InputHTMLAttributes | null = null;
|
|
65
|
+
|
|
66
|
+
// Convert InputHTMLAttributes to HTML attributes
|
|
67
|
+
$: html_attrs = convert_html_attributes(html_attributes);
|
|
68
|
+
|
|
62
69
|
let upload_component: Upload;
|
|
63
70
|
let el: HTMLTextAreaElement | HTMLInputElement;
|
|
64
71
|
let can_scroll: boolean;
|
|
@@ -449,6 +456,7 @@
|
|
|
449
456
|
on:scroll={handle_scroll}
|
|
450
457
|
on:paste={handle_paste}
|
|
451
458
|
style={text_align ? "text-align: " + text_align : ""}
|
|
459
|
+
{...html_attrs}
|
|
452
460
|
/>
|
|
453
461
|
{#if submit_btn}
|
|
454
462
|
<button
|
package/shared/types.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { InputHTMLAttributes } from "../../textbox/shared/types";
|