@gradio/model3d 0.15.1-dev.2 → 0.16.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,41 @@
1
1
  # @gradio/model3d
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Features
6
+
7
+ - [#12539](https://github.com/gradio-app/gradio/pull/12539) [`f1d83fa`](https://github.com/gradio-app/gradio/commit/f1d83fac3d6e4bad60cf896a026fa2d572f26073) - Add ability to add custom buttons to components. Thanks @abidlabs!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/atoms@0.20.0
12
+ - @gradio/utils@0.11.0
13
+ - @gradio/client@2.0.1
14
+ - @gradio/statustracker@0.12.1
15
+ - @gradio/upload@0.17.3
16
+
17
+ ## 0.15.1
18
+
19
+ ### Dependency updates
20
+
21
+ - @gradio/utils@0.10.4
22
+
23
+ ## 0.15.1
24
+
25
+ ### Features
26
+
27
+ - [#11908](https://github.com/gradio-app/gradio/pull/11908) [`029034f`](https://github.com/gradio-app/gradio/commit/029034f7853ea018d110efe9b7e2ef7d1407091c) - Clear Error statuses
28
+ - [#12438](https://github.com/gradio-app/gradio/pull/12438) [`25ffc03`](https://github.com/gradio-app/gradio/commit/25ffc0398f8feb43d817c02b2ab970c16de6d797) - Svelte5 migration and bugfix
29
+
30
+ ### Dependencies
31
+
32
+ - @gradio/atoms@0.19.0
33
+ - @gradio/client@2.0.0
34
+ - @gradio/icons@0.15.0
35
+ - @gradio/statustracker@0.12.0
36
+ - @gradio/upload@0.17.2
37
+ - @gradio/utils@0.10.3
38
+
3
39
  ## 0.15.1-dev.2
4
40
 
5
41
  ### Dependency updates
package/Index.svelte CHANGED
@@ -11,7 +11,13 @@
11
11
  import { Gradio } from "@gradio/utils";
12
12
  import Model3D from "./shared/Model3D.svelte";
13
13
  import Model3DUpload from "./shared/Model3DUpload.svelte";
14
- import { BlockLabel, Block, Empty, UploadText } from "@gradio/atoms";
14
+ import {
15
+ BlockLabel,
16
+ Block,
17
+ Empty,
18
+ UploadText,
19
+ IconButtonWrapper
20
+ } from "@gradio/atoms";
15
21
  import { File } from "@gradio/icons";
16
22
  import { StatusTracker } from "@gradio/statustracker";
17
23
 
@@ -89,7 +95,7 @@
89
95
  autoscroll={gradio.shared.autoscroll}
90
96
  i18n={gradio.i18n}
91
97
  {...gradio.shared.loading_status}
92
- on:clear_status={() =>
98
+ on_clear_status={() =>
93
99
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
94
100
  />
95
101
 
@@ -106,6 +112,14 @@
106
112
  {has_change_history}
107
113
  />
108
114
  {:else}
115
+ {#if gradio.shared.show_label && gradio.props.buttons && gradio.props.buttons.length > 0}
116
+ <IconButtonWrapper
117
+ buttons={gradio.props.buttons}
118
+ on_custom_button_click={(id) => {
119
+ gradio.dispatch("custom_button_click", { id });
120
+ }}
121
+ />
122
+ {/if}
109
123
  <BlockLabel
110
124
  show_label={gradio.shared.show_label}
111
125
  Icon={File}
@@ -132,7 +146,7 @@
132
146
  autoscroll={gradio.shared.autoscroll}
133
147
  i18n={gradio.i18n}
134
148
  {...gradio.shared.loading_status}
135
- on:clear_status={() =>
149
+ on_clear_status={() =>
136
150
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
137
151
  />
138
152
 
package/dist/Index.svelte CHANGED
@@ -11,7 +11,13 @@
11
11
  import { Gradio } from "@gradio/utils";
12
12
  import Model3D from "./shared/Model3D.svelte";
13
13
  import Model3DUpload from "./shared/Model3DUpload.svelte";
14
- import { BlockLabel, Block, Empty, UploadText } from "@gradio/atoms";
14
+ import {
15
+ BlockLabel,
16
+ Block,
17
+ Empty,
18
+ UploadText,
19
+ IconButtonWrapper
20
+ } from "@gradio/atoms";
15
21
  import { File } from "@gradio/icons";
16
22
  import { StatusTracker } from "@gradio/statustracker";
17
23
 
@@ -89,7 +95,7 @@
89
95
  autoscroll={gradio.shared.autoscroll}
90
96
  i18n={gradio.i18n}
91
97
  {...gradio.shared.loading_status}
92
- on:clear_status={() =>
98
+ on_clear_status={() =>
93
99
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
94
100
  />
95
101
 
@@ -106,6 +112,14 @@
106
112
  {has_change_history}
107
113
  />
108
114
  {:else}
115
+ {#if gradio.shared.show_label && gradio.props.buttons && gradio.props.buttons.length > 0}
116
+ <IconButtonWrapper
117
+ buttons={gradio.props.buttons}
118
+ on_custom_button_click={(id) => {
119
+ gradio.dispatch("custom_button_click", { id });
120
+ }}
121
+ />
122
+ {/if}
109
123
  <BlockLabel
110
124
  show_label={gradio.shared.show_label}
111
125
  Icon={File}
@@ -132,7 +146,7 @@
132
146
  autoscroll={gradio.shared.autoscroll}
133
147
  i18n={gradio.i18n}
134
148
  {...gradio.shared.loading_status}
135
- on:clear_status={() =>
149
+ on_clear_status={() =>
136
150
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
137
151
  />
138
152
 
package/dist/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { FileData } from "@gradio/client";
2
2
  import type { LoadingStatus } from "js/statustracker";
3
+ import type { CustomButton } from "@gradio/utils";
3
4
  export interface Model3DProps {
4
5
  value: null | FileData;
5
6
  display_mode: "solid" | "point_cloud" | "wireframe";
@@ -8,6 +9,7 @@ export interface Model3DProps {
8
9
  zoom_speed: number;
9
10
  has_change_history: boolean;
10
11
  camera_position: [number | null, number | null, number | null];
12
+ buttons: (string | CustomButton)[] | null;
11
13
  }
12
14
  export interface Model3DEvents {
13
15
  change: FileData | null;
@@ -16,4 +18,7 @@ export interface Model3DEvents {
16
18
  clear: never;
17
19
  clear_status: LoadingStatus;
18
20
  error: string;
21
+ custom_button_click: {
22
+ id: number;
23
+ };
19
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/model3d",
3
- "version": "0.15.1-dev.2",
3
+ "version": "0.16.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -13,15 +13,15 @@
13
13
  "@types/babylon": "^6.16.9",
14
14
  "dequal": "^2.0.3",
15
15
  "gsplat": "^1.2.9",
16
- "@gradio/atoms": "^0.19.0-dev.1",
17
- "@gradio/statustracker": "^0.12.0-dev.1",
18
- "@gradio/client": "^2.0.0-dev.2",
19
- "@gradio/icons": "^0.15.0-dev.0",
20
- "@gradio/upload": "^0.17.2-dev.2",
21
- "@gradio/utils": "^0.10.3-dev.0"
16
+ "@gradio/atoms": "^0.20.0",
17
+ "@gradio/icons": "^0.15.0",
18
+ "@gradio/statustracker": "^0.12.1",
19
+ "@gradio/upload": "^0.17.3",
20
+ "@gradio/client": "^2.0.1",
21
+ "@gradio/utils": "^0.11.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@gradio/preview": "^0.15.0-dev.0"
24
+ "@gradio/preview": "^0.15.1"
25
25
  },
26
26
  "main_changeset": true,
27
27
  "main": "./Index.svelte",
package/types.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { FileData } from "@gradio/client";
2
2
  import type { LoadingStatus } from "js/statustracker";
3
+ import type { CustomButton } from "@gradio/utils";
3
4
 
4
5
  export interface Model3DProps {
5
6
  value: null | FileData;
@@ -9,6 +10,7 @@ export interface Model3DProps {
9
10
  zoom_speed: number;
10
11
  has_change_history: boolean;
11
12
  camera_position: [number | null, number | null, number | null];
13
+ buttons: (string | CustomButton)[] | null;
12
14
  }
13
15
 
14
16
  export interface Model3DEvents {
@@ -18,4 +20,5 @@ export interface Model3DEvents {
18
20
  clear: never;
19
21
  clear_status: LoadingStatus;
20
22
  error: string;
23
+ custom_button_click: { id: number };
21
24
  }