@gradio/model3d 0.4.2 → 0.4.3

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,11 @@
1
1
  # @gradio/model3d
2
2
 
3
+ ## 0.4.3
4
+
5
+ ### Fixes
6
+
7
+ - [#6414](https://github.com/gradio-app/gradio/pull/6414) [`da1e31832`](https://github.com/gradio-app/gradio/commit/da1e31832f85ec76540e474ae35badfde8a18b6f) - Fix Model3D download button and other issues. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
8
+
3
9
  ## 0.4.2
4
10
 
5
11
  ### Patch Changes
@@ -161,4 +167,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
161
167
 
162
168
  - Updated dependencies []:
163
169
  - @gradio/atoms@0.0.2
164
- - @gradio/upload@0.0.2
170
+ - @gradio/upload@0.0.2
package/Index.svelte CHANGED
@@ -114,7 +114,14 @@
114
114
  on:change={({ detail }) => (value = detail)}
115
115
  on:drag={({ detail }) => (dragging = detail)}
116
116
  on:change={({ detail }) => gradio.dispatch("change", detail)}
117
- on:clear={() => gradio.dispatch("clear")}
117
+ on:clear={() => {
118
+ value = null;
119
+ gradio.dispatch("clear");
120
+ }}
121
+ on:load={({ detail }) => {
122
+ value = detail;
123
+ gradio.dispatch("upload");
124
+ }}
118
125
  i18n={gradio.i18n}
119
126
  >
120
127
  <UploadText i18n={gradio.i18n} type="file" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/model3d",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -11,11 +11,11 @@
11
11
  "babylonjs": "^4.2.1",
12
12
  "babylonjs-loaders": "^4.2.1",
13
13
  "@gradio/atoms": "^0.2.1",
14
- "@gradio/client": "^0.8.0",
15
14
  "@gradio/icons": "^0.2.0",
16
15
  "@gradio/statustracker": "^0.3.1",
17
- "@gradio/upload": "^0.4.0",
18
- "@gradio/utils": "^0.2.0"
16
+ "@gradio/client": "^0.8.1",
17
+ "@gradio/utils": "^0.2.0",
18
+ "@gradio/upload": "^0.4.1"
19
19
  },
20
20
  "main_changeset": true,
21
21
  "main": "./Index.svelte",
@@ -94,7 +94,7 @@
94
94
  <div class="buttons">
95
95
  <IconButton Icon={Undo} label="Undo" on:click={() => handle_undo()} />
96
96
  <a
97
- href={value.path}
97
+ href={value.url}
98
98
  target={window.__is_colab__ ? "_blank" : null}
99
99
  download={window.__is_colab__ ? null : value.orig_name || value.path}
100
100
  >
@@ -60,6 +60,7 @@
60
60
  await tick();
61
61
  reset_scene();
62
62
  dispatch("change", value);
63
+ dispatch("load", value);
63
64
  }
64
65
 
65
66
  async function handle_clear(): Promise<void> {
@@ -70,6 +71,7 @@
70
71
  value = null;
71
72
  await tick();
72
73
  dispatch("clear");
74
+ dispatch("change");
73
75
  }
74
76
 
75
77
  async function handle_undo(): Promise<void> {
@@ -80,6 +82,7 @@
80
82
  change: FileData | null;
81
83
  clear: undefined;
82
84
  drag: boolean;
85
+ load: FileData;
83
86
  }>();
84
87
 
85
88
  let dragging = false;