@gradio/multimodaltextbox 0.6.1 → 0.7.0
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,19 @@
|
|
|
1
1
|
# @gradio/multimodaltextbox
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#9677](https://github.com/gradio-app/gradio/pull/9677) [`3a19e69`](https://github.com/gradio-app/gradio/commit/3a19e690ef8de12c4494429d52988b863065eed3) - Revert text disable. Thanks @whitphx!
|
|
8
|
+
|
|
9
|
+
## 0.6.2
|
|
10
|
+
|
|
11
|
+
### Dependency updates
|
|
12
|
+
|
|
13
|
+
- @gradio/upload@0.13.1
|
|
14
|
+
- @gradio/image@0.16.2
|
|
15
|
+
- @gradio/video@0.11.2
|
|
16
|
+
|
|
3
17
|
## 0.6.1
|
|
4
18
|
|
|
5
19
|
### Dependency updates
|
|
@@ -64,8 +64,6 @@ $:
|
|
|
64
64
|
value = { text: "", files: [] };
|
|
65
65
|
$:
|
|
66
66
|
value, el && lines !== max_lines && resize(el, lines, max_lines);
|
|
67
|
-
$:
|
|
68
|
-
can_submit = value.text !== "" || value.files.length > 0;
|
|
69
67
|
const dispatch = createEventDispatcher();
|
|
70
68
|
beforeUpdate(() => {
|
|
71
69
|
can_scroll = el && el.offsetHeight + el.scrollTop > el.scrollHeight - 100;
|
|
@@ -103,14 +101,10 @@ async function handle_keypress(e) {
|
|
|
103
101
|
await tick();
|
|
104
102
|
if (e.key === "Enter" && e.shiftKey && lines > 1) {
|
|
105
103
|
e.preventDefault();
|
|
106
|
-
|
|
107
|
-
dispatch("submit");
|
|
108
|
-
}
|
|
104
|
+
dispatch("submit");
|
|
109
105
|
} else if (e.key === "Enter" && !e.shiftKey && lines === 1 && max_lines >= 1) {
|
|
110
106
|
e.preventDefault();
|
|
111
|
-
|
|
112
|
-
dispatch("submit");
|
|
113
|
-
}
|
|
107
|
+
dispatch("submit");
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
110
|
function handle_scroll(event) {
|
|
@@ -302,7 +296,6 @@ function handle_drop(event) {
|
|
|
302
296
|
class="submit-button"
|
|
303
297
|
class:padded-button={submit_btn !== true}
|
|
304
298
|
on:click={handle_submit}
|
|
305
|
-
disabled={!can_submit}
|
|
306
299
|
>
|
|
307
300
|
{#if submit_btn === true}
|
|
308
301
|
<Send />
|
|
@@ -419,6 +412,11 @@ function handle_drop(event) {
|
|
|
419
412
|
background: var(--button-secondary-background-fill);
|
|
420
413
|
cursor: initial;
|
|
421
414
|
}
|
|
415
|
+
.stop-button:active,
|
|
416
|
+
.upload-button:active,
|
|
417
|
+
.submit-button:active {
|
|
418
|
+
box-shadow: var(--button-shadow-active);
|
|
419
|
+
}
|
|
422
420
|
|
|
423
421
|
.submit-button :global(svg) {
|
|
424
422
|
height: 22px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/multimodaltextbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"./package.json": "./package.json"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@gradio/statustracker": "^0.8.1",
|
|
26
25
|
"@gradio/atoms": "^0.9.0",
|
|
27
|
-
"@gradio/utils": "^0.7.0",
|
|
28
|
-
"@gradio/upload": "^0.13.0",
|
|
29
26
|
"@gradio/icons": "^0.8.0",
|
|
30
|
-
"@gradio/
|
|
31
|
-
"@gradio/
|
|
27
|
+
"@gradio/statustracker": "^0.8.1",
|
|
28
|
+
"@gradio/utils": "^0.7.0",
|
|
29
|
+
"@gradio/upload": "^0.13.1",
|
|
30
|
+
"@gradio/image": "^0.16.2",
|
|
31
|
+
"@gradio/video": "^0.11.2",
|
|
32
32
|
"@gradio/client": "^1.6.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
|
|
69
69
|
$: if (value === null) value = { text: "", files: [] };
|
|
70
70
|
$: value, el && lines !== max_lines && resize(el, lines, max_lines);
|
|
71
|
-
$: can_submit = value.text !== "" || value.files.length > 0;
|
|
72
71
|
|
|
73
72
|
const dispatch = createEventDispatcher<{
|
|
74
73
|
change: typeof value;
|
|
@@ -128,9 +127,7 @@
|
|
|
128
127
|
await tick();
|
|
129
128
|
if (e.key === "Enter" && e.shiftKey && lines > 1) {
|
|
130
129
|
e.preventDefault();
|
|
131
|
-
|
|
132
|
-
dispatch("submit");
|
|
133
|
-
}
|
|
130
|
+
dispatch("submit");
|
|
134
131
|
} else if (
|
|
135
132
|
e.key === "Enter" &&
|
|
136
133
|
!e.shiftKey &&
|
|
@@ -138,9 +135,7 @@
|
|
|
138
135
|
max_lines >= 1
|
|
139
136
|
) {
|
|
140
137
|
e.preventDefault();
|
|
141
|
-
|
|
142
|
-
dispatch("submit");
|
|
143
|
-
}
|
|
138
|
+
dispatch("submit");
|
|
144
139
|
}
|
|
145
140
|
}
|
|
146
141
|
|
|
@@ -346,7 +341,6 @@
|
|
|
346
341
|
class="submit-button"
|
|
347
342
|
class:padded-button={submit_btn !== true}
|
|
348
343
|
on:click={handle_submit}
|
|
349
|
-
disabled={!can_submit}
|
|
350
344
|
>
|
|
351
345
|
{#if submit_btn === true}
|
|
352
346
|
<Send />
|
|
@@ -463,6 +457,11 @@
|
|
|
463
457
|
background: var(--button-secondary-background-fill);
|
|
464
458
|
cursor: initial;
|
|
465
459
|
}
|
|
460
|
+
.stop-button:active,
|
|
461
|
+
.upload-button:active,
|
|
462
|
+
.submit-button:active {
|
|
463
|
+
box-shadow: var(--button-shadow-active);
|
|
464
|
+
}
|
|
466
465
|
|
|
467
466
|
.submit-button :global(svg) {
|
|
468
467
|
height: 22px;
|