@gradio/core 0.29.0 → 0.29.1

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,30 @@
1
1
  # @gradio/core
2
2
 
3
+ ## 0.29.1
4
+
5
+ ### Fixes
6
+
7
+ - [#11992](https://github.com/gradio-app/gradio/pull/11992) [`1ae2a57`](https://github.com/gradio-app/gradio/commit/1ae2a57a253c56cd8f3d3e5d795688fec80cab2c) - fix iframe sizing on spaces for apps runing in SPA mode. Thanks @pngwn!
8
+ - [#11993](https://github.com/gradio-app/gradio/pull/11993) [`0dc0be8`](https://github.com/gradio-app/gradio/commit/0dc0be8ff1526d43ba7b01ccc7d8173f92c5eed2) - Trigger Change Event if component is in inactive tab. Thanks @freddyaboulton!
9
+
10
+ ### Dependency updates
11
+
12
+ - @gradio/client@1.19.1
13
+
14
+ ## 0.29.0
15
+
16
+ ### Dependency updates
17
+
18
+ - @gradio/image@0.23.1
19
+ - @gradio/upload@0.17.1
20
+ - @gradio/atoms@0.18.1
21
+
22
+ ## 0.29.0
23
+
24
+ ### Dependency updates
25
+
26
+ - @gradio/paramviewer@0.8.1
27
+
3
28
  ## 0.29.0
4
29
 
5
30
  ### Features
@@ -683,7 +683,11 @@ async function handle_mount() {
683
683
  const { id, prop, value } = e.detail;
684
684
  if (prop === "value") {
685
685
  update_value([
686
- { id, prop: "loading_status", value: { validation_error: void 0 } }
686
+ {
687
+ id,
688
+ prop: "loading_status",
689
+ value: { validation_error: void 0 }
690
+ }
687
691
  ]);
688
692
  }
689
693
  update_value([{ id, prop, value }]);
@@ -832,14 +836,13 @@ function screen_recording() {
832
836
  }
833
837
  let footer_height = 0;
834
838
  let root_container;
835
- $: root_node = $_layout && get_root_node(root_container);
836
839
  function get_root_node(container) {
837
840
  if (!container) return null;
838
841
  return container.children[container.children.length - 1];
839
842
  }
840
843
  function handle_resize() {
841
844
  if ("parentIFrame" in window) {
842
- const box = root_node?.getBoundingClientRect();
845
+ const box = root_container.children[0].getBoundingClientRect();
843
846
  if (!box) return;
844
847
  window.parentIFrame?.size(box.bottom + footer_height + 32);
845
848
  }
package/dist/src/init.js CHANGED
@@ -722,6 +722,9 @@ function is_visible(component) {
722
722
  return false;
723
723
  }
724
724
  else if (component.parent) {
725
+ if (component.parent.type === "tabitem") {
726
+ return is_tab_item_visible(component.parent, is_visible(component.parent));
727
+ }
725
728
  return is_visible(component.parent);
726
729
  }
727
730
  return true;
package/package.json CHANGED
@@ -1,66 +1,66 @@
1
1
  {
2
2
  "name": "@gradio/core",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
- "@gradio/annotatedimage": "^0.10.0",
7
6
  "@gradio/accordion": "^0.5.24",
8
- "@gradio/atoms": "^0.18.0",
9
- "@gradio/box": "^0.2.25",
7
+ "@gradio/annotatedimage": "^0.10.0",
8
+ "@gradio/atoms": "^0.18.1",
9
+ "@gradio/audio": "^0.19.2",
10
10
  "@gradio/browserstate": "^0.3.2",
11
- "@gradio/audio": "^0.19.0",
11
+ "@gradio/box": "^0.2.25",
12
12
  "@gradio/button": "^0.5.13",
13
13
  "@gradio/chatbot": "^0.27.0",
14
- "@gradio/checkbox": "^0.4.30",
15
14
  "@gradio/checkboxgroup": "^0.7.0",
15
+ "@gradio/checkbox": "^0.4.31",
16
+ "@gradio/client": "^1.19.1",
16
17
  "@gradio/code": "^0.15.0",
17
- "@gradio/colorpicker": "^0.4.29",
18
- "@gradio/client": "^1.19.0",
19
18
  "@gradio/column": "^0.2.2",
19
+ "@gradio/colorpicker": "^0.4.29",
20
+ "@gradio/dataframe": "^0.20.1",
20
21
  "@gradio/dataset": "^0.4.34",
21
- "@gradio/downloadbutton": "^0.4.12",
22
- "@gradio/dataframe": "^0.19.3",
23
22
  "@gradio/datetime": "^0.3.22",
23
+ "@gradio/downloadbutton": "^0.4.12",
24
24
  "@gradio/fallback": "^0.4.29",
25
- "@gradio/dropdown": "^0.10.4",
26
25
  "@gradio/file": "^0.13.0",
26
+ "@gradio/dropdown": "^0.10.4",
27
27
  "@gradio/fileexplorer": "^0.5.41",
28
28
  "@gradio/form": "^0.2.25",
29
- "@gradio/gallery": "^0.15.33",
30
- "@gradio/highlightedtext": "^0.9.12",
29
+ "@gradio/gallery": "^0.15.34",
31
30
  "@gradio/group": "^0.2.1",
32
- "@gradio/html": "^0.7.2",
33
- "@gradio/image": "^0.23.0",
34
31
  "@gradio/icons": "^0.14.0",
32
+ "@gradio/highlightedtext": "^0.9.13",
33
+ "@gradio/html": "^0.7.2",
34
+ "@gradio/image": "^0.23.1",
35
+ "@gradio/imageeditor": "^0.17.1",
35
36
  "@gradio/imageslider": "^0.3.0",
36
- "@gradio/imageeditor": "^0.17.0",
37
- "@gradio/label": "^0.5.21",
38
37
  "@gradio/json": "^0.5.31",
39
38
  "@gradio/markdown": "^0.13.22",
39
+ "@gradio/multimodaltextbox": "^0.10.20",
40
40
  "@gradio/model3d": "^0.15.0",
41
- "@gradio/multimodaltextbox": "^0.10.19",
42
- "@gradio/paramviewer": "^0.8.0",
41
+ "@gradio/label": "^0.5.21",
42
+ "@gradio/nativeplot": "^0.8.0",
43
+ "@gradio/paramviewer": "^0.8.1",
43
44
  "@gradio/number": "^0.7.1",
44
- "@gradio/nativeplot": "^0.7.6",
45
45
  "@gradio/plot": "^0.9.24",
46
46
  "@gradio/radio": "^0.7.12",
47
- "@gradio/simpledropdown": "^0.3.29",
48
- "@gradio/sidebar": "^0.1.22",
49
- "@gradio/simpleimage": "^0.9.0",
47
+ "@gradio/sidebar": "^0.1.23",
50
48
  "@gradio/row": "^0.2.2",
49
+ "@gradio/simpleimage": "^0.9.0",
51
50
  "@gradio/simpletextbox": "^0.3.30",
52
- "@gradio/slider": "^0.6.18",
53
51
  "@gradio/sketchbox": "^0.6.17",
52
+ "@gradio/simpledropdown": "^0.3.29",
53
+ "@gradio/slider": "^0.6.18",
54
54
  "@gradio/state": "^0.1.2",
55
55
  "@gradio/tabitem": "^0.6.1",
56
+ "@gradio/textbox": "^0.11.1",
56
57
  "@gradio/tabs": "^0.5.1",
57
58
  "@gradio/statustracker": "^0.11.1",
58
- "@gradio/textbox": "^0.11.1",
59
- "@gradio/theme": "^0.4.0",
60
59
  "@gradio/timer": "^0.4.5",
61
- "@gradio/upload": "^0.17.0",
62
- "@gradio/vibeeditor": "^0.2.4",
60
+ "@gradio/upload": "^0.17.1",
61
+ "@gradio/theme": "^0.4.0",
63
62
  "@gradio/uploadbutton": "^0.9.12",
63
+ "@gradio/vibeeditor": "^0.3.0",
64
64
  "@gradio/utils": "^0.10.2",
65
65
  "@gradio/video": "^0.16.0"
66
66
  },
package/src/Blocks.svelte CHANGED
@@ -876,7 +876,11 @@
876
876
  const { id, prop, value } = e.detail;
877
877
  if (prop === "value") {
878
878
  update_value([
879
- { id, prop: "loading_status", value: { validation_error: undefined } }
879
+ {
880
+ id,
881
+ prop: "loading_status",
882
+ value: { validation_error: undefined }
883
+ }
880
884
  ]);
881
885
  }
882
886
  update_value([{ id, prop, value }]);
@@ -1059,7 +1063,6 @@
1059
1063
  let footer_height = 0;
1060
1064
 
1061
1065
  let root_container: HTMLElement;
1062
- $: root_node = $_layout && get_root_node(root_container);
1063
1066
 
1064
1067
  function get_root_node(container: HTMLElement | null): HTMLElement | null {
1065
1068
  if (!container) return null;
@@ -1068,7 +1071,7 @@
1068
1071
 
1069
1072
  function handle_resize(): void {
1070
1073
  if ("parentIFrame" in window) {
1071
- const box = root_node?.getBoundingClientRect();
1074
+ const box = root_container.children[0].getBoundingClientRect();
1072
1075
  if (!box) return;
1073
1076
  window.parentIFrame?.size(box.bottom + footer_height + 32);
1074
1077
  }
package/src/init.ts CHANGED
@@ -1107,6 +1107,12 @@ function is_visible(component: ComponentMeta): boolean {
1107
1107
  ) {
1108
1108
  return false;
1109
1109
  } else if (component.parent) {
1110
+ if (component.parent.type === "tabitem") {
1111
+ return is_tab_item_visible(
1112
+ component.parent,
1113
+ is_visible(component.parent)
1114
+ );
1115
+ }
1110
1116
  return is_visible(component.parent);
1111
1117
  }
1112
1118
  return true;
@@ -1,11 +0,0 @@
1
- import type { StoryObj } from "@storybook/svelte";
2
- import I18nMultiLanguageTestComponent from "./I18nMultiLanguageTestComponent.svelte";
3
- declare const meta: {
4
- component: typeof I18nMultiLanguageTestComponent;
5
- parameters: {
6
- layout: string;
7
- };
8
- };
9
- export default meta;
10
- type Story = StoryObj<typeof meta>;
11
- export declare const Default: Story;