gradio-pr-bot commited on
Commit
f6b3155
·
verified ·
1 Parent(s): e345c8e

Upload folder using huggingface_hub

Browse files
6.2.0/model3D/Index.svelte CHANGED
@@ -11,7 +11,13 @@
11
  import { Gradio } from "@gradio/utils";
12
  import Model3D from "./shared/Model3D.svelte";
13
  import Model3DUpload from "./shared/Model3DUpload.svelte";
14
- import { BlockLabel, Block, Empty, UploadText } from "@gradio/atoms";
 
 
 
 
 
 
15
  import { File } from "@gradio/icons";
16
  import { StatusTracker } from "@gradio/statustracker";
17
 
@@ -106,6 +112,14 @@
106
  {has_change_history}
107
  />
108
  {:else}
 
 
 
 
 
 
 
 
109
  <BlockLabel
110
  show_label={gradio.shared.show_label}
111
  Icon={File}
 
11
  import { Gradio } from "@gradio/utils";
12
  import Model3D from "./shared/Model3D.svelte";
13
  import Model3DUpload from "./shared/Model3DUpload.svelte";
14
+ import {
15
+ BlockLabel,
16
+ Block,
17
+ Empty,
18
+ UploadText,
19
+ IconButtonWrapper
20
+ } from "@gradio/atoms";
21
  import { File } from "@gradio/icons";
22
  import { StatusTracker } from "@gradio/statustracker";
23
 
 
112
  {has_change_history}
113
  />
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}
123
  <BlockLabel
124
  show_label={gradio.shared.show_label}
125
  Icon={File}
6.2.0/model3D/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@gradio/model3d",
3
- "version": "0.15.1",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
 
1
  {
2
  "name": "@gradio/model3d",
3
+ "version": "0.16.0",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
6.2.0/model3D/types.ts CHANGED
@@ -1,5 +1,6 @@
1
  import type { FileData } from "@gradio/client";
2
  import type { LoadingStatus } from "js/statustracker";
 
3
 
4
  export interface Model3DProps {
5
  value: null | FileData;
@@ -9,6 +10,7 @@ export interface Model3DProps {
9
  zoom_speed: number;
10
  has_change_history: boolean;
11
  camera_position: [number | null, number | null, number | null];
 
12
  }
13
 
14
  export interface Model3DEvents {
@@ -18,4 +20,5 @@ export interface Model3DEvents {
18
  clear: never;
19
  clear_status: LoadingStatus;
20
  error: string;
 
21
  }
 
1
  import type { FileData } from "@gradio/client";
2
  import type { LoadingStatus } from "js/statustracker";
3
+ import type { CustomButton } from "@gradio/utils";
4
 
5
  export interface Model3DProps {
6
  value: null | FileData;
 
10
  zoom_speed: number;
11
  has_change_history: boolean;
12
  camera_position: [number | null, number | null, number | null];
13
+ buttons: (string | CustomButton)[] | null;
14
  }
15
 
16
  export interface Model3DEvents {
 
20
  clear: never;
21
  clear_status: LoadingStatus;
22
  error: string;
23
+ custom_button_click: { id: number };
24
  }