@gradio/multimodaltextbox 0.10.21 → 0.11.0-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 +43 -0
- package/Index.svelte +103 -111
- package/dist/Example.svelte +27 -21
- package/dist/Example.svelte.d.ts +23 -21
- package/dist/Index.svelte +146 -111
- package/dist/Index.svelte.d.ts +3 -199
- package/dist/shared/MultimodalTextbox.svelte +714 -545
- package/dist/shared/MultimodalTextbox.svelte.d.ts +71 -67
- package/dist/types.d.ts +46 -0
- package/dist/types.js +1 -0
- package/package.json +12 -11
- package/shared/MultimodalTextbox.svelte +404 -314
- package/types.ts +42 -0
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { I18nFormatter } from "js/core/src/gradio_helper";
|
|
3
2
|
import type { FileData, Client } from "@gradio/client";
|
|
3
|
+
import type { WaveformOptions } from "@gradio/audio";
|
|
4
4
|
import type { SelectData } from "@gradio/utils";
|
|
5
5
|
import type { InputHTMLAttributes } from "./types";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
label: string;
|
|
18
|
-
info?: string | undefined;
|
|
19
|
-
show_label?: boolean;
|
|
20
|
-
max_lines: number;
|
|
21
|
-
submit_btn?: string | boolean | null;
|
|
22
|
-
stop_btn?: string | boolean | null;
|
|
23
|
-
rtl?: boolean;
|
|
24
|
-
autofocus?: boolean;
|
|
25
|
-
text_align?: "left" | "right" | undefined;
|
|
26
|
-
autoscroll?: boolean;
|
|
27
|
-
root: string;
|
|
28
|
-
file_types_string?: string | null;
|
|
29
|
-
max_file_size?: number | null;
|
|
30
|
-
upload: Client["upload"];
|
|
31
|
-
stream_handler: Client["stream"];
|
|
32
|
-
file_count?: "single" | "multiple" | "directory";
|
|
33
|
-
max_plain_text_length?: number;
|
|
34
|
-
waveform_settings: Record<string, any>;
|
|
35
|
-
waveform_options?: any;
|
|
36
|
-
sources_string?: "upload" | "upload,microphone" | "microphone" | "microphone,upload";
|
|
37
|
-
active_source?: "microphone" | null;
|
|
38
|
-
html_attributes?: InputHTMLAttributes | null;
|
|
39
|
-
dragging?: boolean;
|
|
6
|
+
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> {
|
|
7
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
8
|
+
$$bindings?: Bindings;
|
|
9
|
+
} & Exports;
|
|
10
|
+
(internal: unknown, props: Props & {
|
|
11
|
+
$$events?: Events;
|
|
12
|
+
$$slots?: Slots;
|
|
13
|
+
}): Exports & {
|
|
14
|
+
$set?: any;
|
|
15
|
+
$on?: any;
|
|
40
16
|
};
|
|
41
|
-
|
|
42
|
-
dragover: DragEvent;
|
|
43
|
-
error: CustomEvent<any>;
|
|
44
|
-
blur: CustomEvent<any>;
|
|
45
|
-
focus: CustomEvent<any>;
|
|
46
|
-
change: CustomEvent<{
|
|
47
|
-
text: string;
|
|
48
|
-
files: FileData[];
|
|
49
|
-
}>;
|
|
50
|
-
submit: CustomEvent<undefined>;
|
|
51
|
-
stop: CustomEvent<undefined>;
|
|
52
|
-
select: CustomEvent<SelectData>;
|
|
53
|
-
input: CustomEvent<undefined>;
|
|
54
|
-
drag: CustomEvent<boolean>;
|
|
55
|
-
upload: CustomEvent<any>;
|
|
56
|
-
clear: CustomEvent<undefined>;
|
|
57
|
-
load: CustomEvent<any>;
|
|
58
|
-
start_recording: CustomEvent<undefined>;
|
|
59
|
-
pause_recording: CustomEvent<undefined>;
|
|
60
|
-
stop_recording: CustomEvent<undefined>;
|
|
61
|
-
} & {
|
|
62
|
-
[evt: string]: CustomEvent<any>;
|
|
63
|
-
};
|
|
64
|
-
slots: {};
|
|
65
|
-
exports?: {} | undefined;
|
|
66
|
-
bindings?: string | undefined;
|
|
67
|
-
};
|
|
68
|
-
export type MultimodalTextboxProps = typeof __propDef.props;
|
|
69
|
-
export type MultimodalTextboxEvents = typeof __propDef.events;
|
|
70
|
-
export type MultimodalTextboxSlots = typeof __propDef.slots;
|
|
71
|
-
export default class MultimodalTextbox extends SvelteComponent<MultimodalTextboxProps, MultimodalTextboxEvents, MultimodalTextboxSlots> {
|
|
17
|
+
z_$$bindings?: Bindings;
|
|
72
18
|
}
|
|
73
|
-
|
|
19
|
+
declare const MultimodalTextbox: $$__sveltets_2_IsomorphicComponent<{
|
|
20
|
+
value?: {
|
|
21
|
+
text: string;
|
|
22
|
+
files: FileData[];
|
|
23
|
+
};
|
|
24
|
+
value_is_output?: boolean;
|
|
25
|
+
lines?: number;
|
|
26
|
+
i18n: I18nFormatter;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
label: string;
|
|
30
|
+
info?: string | undefined;
|
|
31
|
+
show_label?: boolean;
|
|
32
|
+
max_lines: number;
|
|
33
|
+
submit_btn?: string | boolean | null;
|
|
34
|
+
stop_btn?: string | boolean | null;
|
|
35
|
+
rtl?: boolean;
|
|
36
|
+
autofocus?: boolean;
|
|
37
|
+
text_align?: "left" | "right" | undefined;
|
|
38
|
+
autoscroll?: boolean;
|
|
39
|
+
root: string;
|
|
40
|
+
file_types_string?: string | null;
|
|
41
|
+
max_file_size?: number | null;
|
|
42
|
+
upload: Client["upload"];
|
|
43
|
+
stream_handler: Client["stream"];
|
|
44
|
+
file_count?: "single" | "multiple" | "directory";
|
|
45
|
+
max_plain_text_length?: number;
|
|
46
|
+
waveform_settings: Record<string, any>;
|
|
47
|
+
waveform_options?: WaveformOptions;
|
|
48
|
+
sources_string?: "upload" | "upload,microphone" | "microphone" | "microphone,upload";
|
|
49
|
+
active_source?: "microphone" | null;
|
|
50
|
+
html_attributes?: InputHTMLAttributes | null;
|
|
51
|
+
upload_promise?: Promise<any> | null;
|
|
52
|
+
dragging?: boolean;
|
|
53
|
+
}, {
|
|
54
|
+
dragover: DragEvent;
|
|
55
|
+
error: CustomEvent<any>;
|
|
56
|
+
blur: CustomEvent<any>;
|
|
57
|
+
focus: CustomEvent<any>;
|
|
58
|
+
change: CustomEvent<{
|
|
59
|
+
text: string;
|
|
60
|
+
files: FileData[];
|
|
61
|
+
}>;
|
|
62
|
+
submit: CustomEvent<undefined>;
|
|
63
|
+
stop: CustomEvent<undefined>;
|
|
64
|
+
select: CustomEvent<SelectData>;
|
|
65
|
+
input: CustomEvent<undefined>;
|
|
66
|
+
drag: CustomEvent<boolean>;
|
|
67
|
+
upload: CustomEvent<FileData | FileData[]>;
|
|
68
|
+
clear: CustomEvent<undefined>;
|
|
69
|
+
load: CustomEvent<FileData | FileData[]>;
|
|
70
|
+
start_recording: CustomEvent<undefined>;
|
|
71
|
+
pause_recording: CustomEvent<undefined>;
|
|
72
|
+
stop_recording: CustomEvent<undefined>;
|
|
73
|
+
} & {
|
|
74
|
+
[evt: string]: CustomEvent<any>;
|
|
75
|
+
}, {}, {}, string>;
|
|
76
|
+
type MultimodalTextbox = InstanceType<typeof MultimodalTextbox>;
|
|
77
|
+
export default MultimodalTextbox;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { FileData } from "@gradio/client";
|
|
2
|
+
import type { SelectData } from "@gradio/utils";
|
|
3
|
+
import type { LoadingStatus } from "@gradio/statustracker";
|
|
4
|
+
import type { InputHTMLAttributes } from "./shared/types";
|
|
5
|
+
import type { WaveformOptions } from "js/audio/shared/types";
|
|
6
|
+
export interface MultimodalTextboxEvents {
|
|
7
|
+
change: {
|
|
8
|
+
text: string;
|
|
9
|
+
files: FileData[];
|
|
10
|
+
};
|
|
11
|
+
submit: never;
|
|
12
|
+
stop: never;
|
|
13
|
+
blur: never;
|
|
14
|
+
select: SelectData;
|
|
15
|
+
input: never;
|
|
16
|
+
focus: never;
|
|
17
|
+
error: string;
|
|
18
|
+
clear_status: LoadingStatus;
|
|
19
|
+
start_recording: never;
|
|
20
|
+
pause_recording: never;
|
|
21
|
+
stop_recording: never;
|
|
22
|
+
upload: FileData[] | FileData;
|
|
23
|
+
clear: undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface MultimodalTextboxProps {
|
|
26
|
+
value: {
|
|
27
|
+
text: string;
|
|
28
|
+
files: FileData[];
|
|
29
|
+
};
|
|
30
|
+
file_types: string[] | null;
|
|
31
|
+
lines: number;
|
|
32
|
+
placeholder: string;
|
|
33
|
+
info: string | undefined;
|
|
34
|
+
max_lines: number;
|
|
35
|
+
submit_btn: string | boolean | null;
|
|
36
|
+
stop_btn: string | boolean | null;
|
|
37
|
+
value_is_output: boolean;
|
|
38
|
+
rtl: boolean;
|
|
39
|
+
text_align: "left" | "right" | undefined;
|
|
40
|
+
autofocus: boolean;
|
|
41
|
+
file_count: "single" | "multiple" | "directory";
|
|
42
|
+
max_plain_text_length: number;
|
|
43
|
+
sources: ("microphone" | "upload")[];
|
|
44
|
+
waveform_options: WaveformOptions;
|
|
45
|
+
html_attributes: InputHTMLAttributes | null;
|
|
46
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/multimodaltextbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0-dev.2",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -22,20 +22,21 @@
|
|
|
22
22
|
"./package.json": "./package.json"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@gradio/atoms": "^0.
|
|
26
|
-
"@gradio/icons": "^0.
|
|
27
|
-
"@gradio/utils": "^0.10.
|
|
28
|
-
"@gradio/
|
|
29
|
-
"@gradio/
|
|
30
|
-
"@gradio/image": "^0.
|
|
31
|
-
"@gradio/video": "^0.
|
|
32
|
-
"@gradio/client": "^
|
|
25
|
+
"@gradio/atoms": "^0.19.0-dev.1",
|
|
26
|
+
"@gradio/icons": "^0.15.0-dev.0",
|
|
27
|
+
"@gradio/utils": "^0.10.3-dev.0",
|
|
28
|
+
"@gradio/upload": "^0.17.2-dev.2",
|
|
29
|
+
"@gradio/statustracker": "^0.12.0-dev.1",
|
|
30
|
+
"@gradio/image": "^0.24.0-dev.2",
|
|
31
|
+
"@gradio/video": "^0.17.0-dev.2",
|
|
32
|
+
"@gradio/client": "^2.0.0-dev.2",
|
|
33
|
+
"@gradio/audio": "^0.20.0-dev.4"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
|
-
"@gradio/preview": "^0.
|
|
36
|
+
"@gradio/preview": "^0.15.0-dev.0"
|
|
36
37
|
},
|
|
37
38
|
"peerDependencies": {
|
|
38
|
-
"svelte": "^
|
|
39
|
+
"svelte": "^5.43.4"
|
|
39
40
|
},
|
|
40
41
|
"repository": {
|
|
41
42
|
"type": "git",
|