@gradio/gallery 0.6.1 → 0.7.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 +8 -1
- package/Gallery.test.ts +12 -6
- package/Index.svelte +0 -3
- package/package.json +6 -7
- package/shared/Gallery.svelte +2 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @gradio/gallery
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#7183](https://github.com/gradio-app/gradio/pull/7183) [`49d9c48`](https://github.com/gradio-app/gradio/commit/49d9c48537aa706bf72628e3640389470138bdc6) - [WIP] Refactor file normalization to be in the backend and remove it from the frontend of each component. Thanks [@abidlabs](https://github.com/abidlabs)!
|
|
8
|
+
- [#7369](https://github.com/gradio-app/gradio/pull/7369) [`7b10d97`](https://github.com/gradio-app/gradio/commit/7b10d97b0f928fde6a71a94460fb8ca784e7a31d) - Remove the `@gradio/wasm` dependency from `@gradio/gallery` that is not used. Thanks [@whitphx](https://github.com/whitphx)!
|
|
9
|
+
|
|
3
10
|
## 0.6.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -325,4 +332,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
|
|
|
325
332
|
|
|
326
333
|
### Features
|
|
327
334
|
|
|
328
|
-
- [#4995](https://github.com/gradio-app/gradio/pull/4995) [`3f8c210b`](https://github.com/gradio-app/gradio/commit/3f8c210b01ef1ceaaf8ee73be4bf246b5b745bbf) - Implement left and right click in `Gallery` component and show implicit images in `Gallery` grid. Thanks [@hannahblair](https://github.com/hannahblair)!
|
|
335
|
+
- [#4995](https://github.com/gradio-app/gradio/pull/4995) [`3f8c210b`](https://github.com/gradio-app/gradio/commit/3f8c210b01ef1ceaaf8ee73be4bf246b5b745bbf) - Implement left and right click in `Gallery` component and show implicit images in `Gallery` grid. Thanks [@hannahblair](https://github.com/hannahblair)!
|
package/Gallery.test.ts
CHANGED
|
@@ -35,8 +35,10 @@ describe("Gallery", () => {
|
|
|
35
35
|
value: [
|
|
36
36
|
{
|
|
37
37
|
image: {
|
|
38
|
-
path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
|
|
39
|
-
|
|
38
|
+
path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
|
|
39
|
+
url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
|
|
40
|
+
},
|
|
41
|
+
caption: null
|
|
40
42
|
}
|
|
41
43
|
]
|
|
42
44
|
});
|
|
@@ -58,8 +60,10 @@ describe("Gallery", () => {
|
|
|
58
60
|
value: [
|
|
59
61
|
{
|
|
60
62
|
image: {
|
|
61
|
-
path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
|
|
62
|
-
|
|
63
|
+
path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
|
|
64
|
+
url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
|
|
65
|
+
},
|
|
66
|
+
caption: null
|
|
63
67
|
}
|
|
64
68
|
]
|
|
65
69
|
});
|
|
@@ -69,8 +73,10 @@ describe("Gallery", () => {
|
|
|
69
73
|
value: [
|
|
70
74
|
{
|
|
71
75
|
image: {
|
|
72
|
-
path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
|
|
73
|
-
|
|
76
|
+
path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
|
|
77
|
+
url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
|
|
78
|
+
},
|
|
79
|
+
caption: null
|
|
74
80
|
}
|
|
75
81
|
]
|
|
76
82
|
});
|
package/Index.svelte
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
export let show_label: boolean;
|
|
17
17
|
export let label: string;
|
|
18
18
|
export let root: string;
|
|
19
|
-
export let proxy_url: null | string;
|
|
20
19
|
export let elem_id = "";
|
|
21
20
|
export let elem_classes: string[] = [];
|
|
22
21
|
export let visible = true;
|
|
@@ -91,8 +90,6 @@
|
|
|
91
90
|
on:error={(e) => gradio.dispatch("error", e.detail)}
|
|
92
91
|
{label}
|
|
93
92
|
{show_label}
|
|
94
|
-
{root}
|
|
95
|
-
{proxy_url}
|
|
96
93
|
{columns}
|
|
97
94
|
{rows}
|
|
98
95
|
{height}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/gallery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -9,14 +9,13 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"dequal": "^2.0.2",
|
|
11
11
|
"@gradio/atoms": "^0.5.1",
|
|
12
|
-
"@gradio/client": "^0.
|
|
13
|
-
"@gradio/image": "^0.8.0",
|
|
14
|
-
"@gradio/statustracker": "^0.4.5",
|
|
12
|
+
"@gradio/client": "^0.12.0",
|
|
15
13
|
"@gradio/icons": "^0.3.2",
|
|
16
|
-
"@gradio/
|
|
14
|
+
"@gradio/image": "^0.9.0",
|
|
15
|
+
"@gradio/statustracker": "^0.4.5",
|
|
16
|
+
"@gradio/upload": "^0.7.2",
|
|
17
17
|
"@gradio/utils": "^0.2.2",
|
|
18
|
-
"@gradio/file": "^0.
|
|
19
|
-
"@gradio/wasm": "^0.6.0"
|
|
18
|
+
"@gradio/file": "^0.5.0"
|
|
20
19
|
},
|
|
21
20
|
"main": "./Index.svelte",
|
|
22
21
|
"main_changeset": true,
|
package/shared/Gallery.svelte
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { tick } from "svelte";
|
|
9
9
|
|
|
10
10
|
import { Download, Image as ImageIcon } from "@gradio/icons";
|
|
11
|
-
import {
|
|
11
|
+
import { FileData } from "@gradio/client";
|
|
12
12
|
import { format_gallery_for_sharing } from "./utils";
|
|
13
13
|
import { IconButton } from "@gradio/atoms";
|
|
14
14
|
import type { I18nFormatter } from "@gradio/utils";
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
|
|
19
19
|
export let show_label = true;
|
|
20
20
|
export let label: string;
|
|
21
|
-
export let root = "";
|
|
22
|
-
export let proxy_url: null | string = null;
|
|
23
21
|
export let value: GalleryData | null = null;
|
|
24
22
|
export let columns: number | number[] | undefined = [2];
|
|
25
23
|
export let rows: number | number[] | undefined = undefined;
|
|
@@ -49,7 +47,7 @@
|
|
|
49
47
|
value == null
|
|
50
48
|
? null
|
|
51
49
|
: value.map((data) => ({
|
|
52
|
-
image:
|
|
50
|
+
image: data.image as FileData,
|
|
53
51
|
caption: data.caption
|
|
54
52
|
}));
|
|
55
53
|
|