Upload folder using huggingface_hub
Browse files- 6.2.0/plot/Index.svelte +15 -8
- 6.2.0/plot/package.json +1 -1
- 6.2.0/plot/types.ts +3 -1
6.2.0/plot/Index.svelte
CHANGED
|
@@ -39,14 +39,21 @@
|
|
| 39 |
label={gradio.shared.label || gradio.i18n("plot.plot")}
|
| 40 |
Icon={PlotIcon}
|
| 41 |
/>
|
| 42 |
-
{#if gradio.props.show_fullscreen_button}
|
| 43 |
-
<IconButtonWrapper
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
</IconButtonWrapper>
|
| 51 |
{/if}
|
| 52 |
<StatusTracker
|
|
|
|
| 39 |
label={gradio.shared.label || gradio.i18n("plot.plot")}
|
| 40 |
Icon={PlotIcon}
|
| 41 |
/>
|
| 42 |
+
{#if (gradio.props.buttons && gradio.props.buttons.length > 0) || gradio.props.show_fullscreen_button}
|
| 43 |
+
<IconButtonWrapper
|
| 44 |
+
buttons={gradio.props.buttons ?? []}
|
| 45 |
+
on_custom_button_click={(id) => {
|
| 46 |
+
gradio.dispatch("custom_button_click", { id });
|
| 47 |
+
}}
|
| 48 |
+
>
|
| 49 |
+
{#if gradio.props.show_fullscreen_button}
|
| 50 |
+
<FullscreenButton
|
| 51 |
+
{fullscreen}
|
| 52 |
+
on:fullscreen={({ detail }) => {
|
| 53 |
+
fullscreen = detail;
|
| 54 |
+
}}
|
| 55 |
+
/>
|
| 56 |
+
{/if}
|
| 57 |
</IconButtonWrapper>
|
| 58 |
{/if}
|
| 59 |
<StatusTracker
|
6.2.0/plot/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/plot",
|
| 3 |
-
"version": "0.
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/plot",
|
| 3 |
+
"version": "0.10.0",
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
6.2.0/plot/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import type { SelectData } from "@gradio/utils";
|
| 2 |
import type { LoadingStatus } from "@gradio/statustracker";
|
| 3 |
|
| 4 |
export type ThemeMode = "system" | "light" | "dark";
|
|
@@ -12,10 +12,12 @@ export interface PlotProps {
|
|
| 12 |
_selectable: boolean;
|
| 13 |
x_lim: [number, number] | null;
|
| 14 |
show_fullscreen_button: boolean;
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
export interface PlotEvents {
|
| 18 |
change: never;
|
| 19 |
select: SelectData;
|
| 20 |
clear_status: LoadingStatus;
|
|
|
|
| 21 |
}
|
|
|
|
| 1 |
+
import type { SelectData, CustomButton } from "@gradio/utils";
|
| 2 |
import type { LoadingStatus } from "@gradio/statustracker";
|
| 3 |
|
| 4 |
export type ThemeMode = "system" | "light" | "dark";
|
|
|
|
| 12 |
_selectable: boolean;
|
| 13 |
x_lim: [number, number] | null;
|
| 14 |
show_fullscreen_button: boolean;
|
| 15 |
+
buttons: (string | CustomButton)[] | null;
|
| 16 |
}
|
| 17 |
|
| 18 |
export interface PlotEvents {
|
| 19 |
change: never;
|
| 20 |
select: SelectData;
|
| 21 |
clear_status: LoadingStatus;
|
| 22 |
+
custom_button_click: { id: number };
|
| 23 |
}
|