@gradio/multimodaltextbox 0.10.9 → 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 CHANGED
@@ -1,5 +1,35 @@
1
1
  # @gradio/multimodaltextbox
2
2
 
3
+ ## 0.10.11
4
+
5
+ ### Dependency updates
6
+
7
+ - @gradio/upload@0.16.9
8
+ - @gradio/video@0.14.19
9
+ - @gradio/client@1.15.4
10
+ - @gradio/image@0.22.11
11
+
12
+ ## 0.10.10
13
+
14
+ ### Fixes
15
+
16
+ - [#11387](https://github.com/gradio-app/gradio/pull/11387) [`8245afc`](https://github.com/gradio-app/gradio/commit/8245afc669501e1e5f0d619f452455f68a3b7667) - Define root URL in frontend. Thanks @aliabid94!
17
+
18
+ ### Dependency updates
19
+
20
+ - @gradio/statustracker@0.10.13
21
+ - @gradio/video@0.14.18
22
+ - @gradio/atoms@0.16.2
23
+ - @gradio/client@1.15.3
24
+ - @gradio/upload@0.16.8
25
+ - @gradio/image@0.22.10
26
+
27
+ ## 0.10.9
28
+
29
+ ### Dependency updates
30
+
31
+ - @gradio/statustracker@0.10.12
32
+
3
33
  ## 0.10.9
4
34
 
5
35
  ### Dependency updates
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>
@@ -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;
@@ -256,7 +260,7 @@ function handle_drop(event) {
256
260
  role="group"
257
261
  aria-label="Multimedia input field"
258
262
  >
259
- <BlockTitle {root} {show_label} {info} {rtl}>{label}</BlockTitle>
263
+ <BlockTitle {show_label} {info} {rtl}>{label}</BlockTitle>
260
264
  {#if value.files.length > 0 || uploading}
261
265
  <div
262
266
  class="thumbnails scroll-hide"
@@ -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 {};
@@ -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";
@@ -39,3 +39,4 @@ export function text_area_resize(_el, _value) {
39
39
  destroy: () => _el.removeEventListener("input", handle_input)
40
40
  };
41
41
  }
42
+ export { convert_html_attributes } from "../../textbox/shared/utils";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/multimodaltextbox",
3
- "version": "0.10.9",
3
+ "version": "0.10.11",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -22,17 +22,17 @@
22
22
  "./package.json": "./package.json"
23
23
  },
24
24
  "dependencies": {
25
- "@gradio/atoms": "^0.16.1",
25
+ "@gradio/atoms": "^0.16.2",
26
26
  "@gradio/icons": "^0.12.0",
27
- "@gradio/statustracker": "^0.10.12",
27
+ "@gradio/statustracker": "^0.10.13",
28
+ "@gradio/upload": "^0.16.9",
28
29
  "@gradio/utils": "^0.10.2",
29
- "@gradio/upload": "^0.16.7",
30
- "@gradio/image": "^0.22.9",
31
- "@gradio/video": "^0.14.17",
32
- "@gradio/client": "^1.15.2"
30
+ "@gradio/image": "^0.22.11",
31
+ "@gradio/video": "^0.14.19",
32
+ "@gradio/client": "^1.15.4"
33
33
  },
34
34
  "devDependencies": {
35
- "@gradio/preview": "^0.13.1"
35
+ "@gradio/preview": "^0.13.2"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "svelte": "^4.0.0"
@@ -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;
@@ -311,7 +318,7 @@
311
318
  role="group"
312
319
  aria-label="Multimedia input field"
313
320
  >
314
- <BlockTitle {root} {show_label} {info} {rtl}>{label}</BlockTitle>
321
+ <BlockTitle {show_label} {info} {rtl}>{label}</BlockTitle>
315
322
  {#if value.files.length > 0 || uploading}
316
323
  <div
317
324
  class="thumbnails scroll-hide"
@@ -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
@@ -0,0 +1 @@
1
+ export type { InputHTMLAttributes } from "../../textbox/shared/types";
package/shared/utils.ts CHANGED
@@ -58,3 +58,5 @@ export function text_area_resize(
58
58
  destroy: () => _el.removeEventListener("input", handle_input)
59
59
  };
60
60
  }
61
+
62
+ export { convert_html_attributes } from "../../textbox/shared/utils";