@gradio/multimodaltextbox 0.13.0 → 0.14.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,22 @@
1
1
  # @gradio/multimodaltextbox
2
2
 
3
+ ## 0.14.0
4
+
5
+ ### Features
6
+
7
+ - [#13543](https://github.com/gradio-app/gradio/pull/13543) [`0533483`](https://github.com/gradio-app/gradio/commit/0533483bccdee38f334a598f18297e8c02966343) - Migrate Image components to Svelte 5. Thanks @dawoodkhan82!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/statustracker@0.15.1
12
+ - @gradio/icons@0.16.0
13
+ - @gradio/atoms@0.26.0
14
+ - @gradio/image@0.28.0
15
+ - @gradio/video@0.22.0
16
+ - @gradio/client@2.3.1
17
+ - @gradio/upload@0.18.1
18
+ - @gradio/audio@0.24.1
19
+
3
20
  ## 0.13.0
4
21
 
5
22
  ### Features
@@ -28,8 +28,12 @@ export async function resize(target, lines, max_lines) {
28
28
  function update_scrollbar_visibility(textarea) {
29
29
  const content_height = textarea.scrollHeight;
30
30
  const visible_height = textarea.clientHeight;
31
- const line_height = parseFloat(window.getComputedStyle(textarea).lineHeight);
32
- if (content_height > visible_height + line_height) {
31
+ const computed_style = window.getComputedStyle(textarea);
32
+ const line_height = parseFloat(computed_style.lineHeight);
33
+ const threshold = Number.isFinite(line_height)
34
+ ? line_height
35
+ : parseFloat(computed_style.fontSize) * 1.2;
36
+ if (content_height > visible_height + threshold) {
33
37
  textarea.style.overflowY = "scroll";
34
38
  }
35
39
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/multimodaltextbox",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -22,15 +22,15 @@
22
22
  "./package.json": "./package.json"
23
23
  },
24
24
  "dependencies": {
25
- "@gradio/atoms": "^0.25.0",
26
- "@gradio/icons": "^0.15.1",
27
- "@gradio/statustracker": "^0.15.0",
25
+ "@gradio/atoms": "^0.26.0",
26
+ "@gradio/icons": "^0.16.0",
27
+ "@gradio/statustracker": "^0.15.1",
28
28
  "@gradio/utils": "^0.13.0",
29
- "@gradio/upload": "^0.18.0",
30
- "@gradio/image": "^0.27.0",
31
- "@gradio/video": "^0.21.0",
32
- "@gradio/audio": "^0.24.0",
33
- "@gradio/client": "^2.3.0"
29
+ "@gradio/image": "^0.28.0",
30
+ "@gradio/video": "^0.22.0",
31
+ "@gradio/upload": "^0.18.1",
32
+ "@gradio/client": "^2.3.1",
33
+ "@gradio/audio": "^0.24.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@gradio/preview": "^0.16.2"
package/shared/utils.ts CHANGED
@@ -45,8 +45,12 @@ function update_scrollbar_visibility(
45
45
  ): void {
46
46
  const content_height = textarea.scrollHeight;
47
47
  const visible_height = textarea.clientHeight;
48
- const line_height = parseFloat(window.getComputedStyle(textarea).lineHeight);
49
- if (content_height > visible_height + line_height) {
48
+ const computed_style = window.getComputedStyle(textarea);
49
+ const line_height = parseFloat(computed_style.lineHeight);
50
+ const threshold = Number.isFinite(line_height)
51
+ ? line_height
52
+ : parseFloat(computed_style.fontSize) * 1.2;
53
+ if (content_height > visible_height + threshold) {
50
54
  textarea.style.overflowY = "scroll";
51
55
  } else {
52
56
  textarea.style.overflowY = "hidden";