@gradio/gallery 0.4.1 → 0.4.2
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 +7 -1
- package/Gallery.stories.svelte +37 -43
- package/Index.svelte +6 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @gradio/gallery
|
|
2
2
|
|
|
3
|
+
## 0.4.2
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- [#6277](https://github.com/gradio-app/gradio/pull/6277) [`5fe091367`](https://github.com/gradio-app/gradio/commit/5fe091367fbe0eecdd504aa734ca1c70b0621f52) - handle selected_index prop change for gallery. Thanks [@pngwn](https://github.com/pngwn)!
|
|
8
|
+
|
|
3
9
|
## 0.4.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -157,4 +163,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
|
|
|
157
163
|
|
|
158
164
|
### Features
|
|
159
165
|
|
|
160
|
-
- [#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)!
|
|
166
|
+
- [#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.stories.svelte
CHANGED
|
@@ -68,32 +68,54 @@
|
|
|
68
68
|
<Gallery
|
|
69
69
|
value={[
|
|
70
70
|
{
|
|
71
|
-
image:
|
|
72
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/cheetah_running.avif",
|
|
71
|
+
image: {
|
|
72
|
+
path: "https://gradio-builds.s3.amazonaws.com/demo-files/cheetah_running.avif",
|
|
73
|
+
url: "https://gradio-builds.s3.amazonaws.com/demo-files/cheetah_running.avif",
|
|
74
|
+
orig_name: "cheetah_running.avif"
|
|
75
|
+
},
|
|
73
76
|
caption: "A fast cheetah"
|
|
74
77
|
},
|
|
75
78
|
{
|
|
76
|
-
image:
|
|
77
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-002.jpg"
|
|
79
|
+
image: {
|
|
80
|
+
path: "https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-002.jpg",
|
|
81
|
+
url: "https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-002.jpg",
|
|
82
|
+
orig_name: "cheetah-002.jpg"
|
|
83
|
+
}
|
|
78
84
|
},
|
|
79
85
|
{
|
|
80
|
-
image:
|
|
81
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-003.jpg"
|
|
86
|
+
image: {
|
|
87
|
+
path: "https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-003.jpg",
|
|
88
|
+
url: "https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-003.jpg",
|
|
89
|
+
orig_name: "cheetah-003.jpg"
|
|
90
|
+
}
|
|
82
91
|
},
|
|
83
92
|
{
|
|
84
|
-
image:
|
|
93
|
+
image: {
|
|
94
|
+
path: "https://gradio-builds.s3.amazonaws.com/demo-files/cheetah3.webp",
|
|
95
|
+
url: "https://gradio-builds.s3.amazonaws.com/demo-files/cheetah3.webp",
|
|
96
|
+
orig_name: "cheetah3.webp"
|
|
97
|
+
}
|
|
85
98
|
},
|
|
86
99
|
{
|
|
87
|
-
image:
|
|
88
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg"
|
|
100
|
+
image: {
|
|
101
|
+
path: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg",
|
|
102
|
+
url: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg",
|
|
103
|
+
orig_name: "ghepardo-primo-piano.jpg"
|
|
104
|
+
}
|
|
89
105
|
},
|
|
90
106
|
{
|
|
91
|
-
image:
|
|
92
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/main-qimg-0bbf31c18a22178cb7a8dd53640a3d05-lq.jpeg"
|
|
107
|
+
image: {
|
|
108
|
+
path: "https://gradio-builds.s3.amazonaws.com/demo-files/main-qimg-0bbf31c18a22178cb7a8dd53640a3d05-lq.jpeg",
|
|
109
|
+
url: "https://gradio-builds.s3.amazonaws.com/demo-files/main-qimg-0bbf31c18a22178cb7a8dd53640a3d05-lq.jpeg",
|
|
110
|
+
orig_name: "main-qimg-0bbf31c18a22178cb7a8dd53640a3d05-lq.jpeg"
|
|
111
|
+
}
|
|
93
112
|
},
|
|
94
113
|
{
|
|
95
|
-
image:
|
|
96
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/TheCheethcat.jpg"
|
|
114
|
+
image: {
|
|
115
|
+
path: "https://gradio-builds.s3.amazonaws.com/demo-files/TheCheethcat.jpg",
|
|
116
|
+
url: "https://gradio-builds.s3.amazonaws.com/demo-files/TheCheethcat.jpg",
|
|
117
|
+
orig_name: "TheCheethcat.jpg"
|
|
118
|
+
}
|
|
97
119
|
}
|
|
98
120
|
]}
|
|
99
121
|
{...args}
|
|
@@ -204,29 +226,7 @@
|
|
|
204
226
|
show_label: true,
|
|
205
227
|
rows: 2,
|
|
206
228
|
columns: 2,
|
|
207
|
-
height: 400
|
|
208
|
-
value: [
|
|
209
|
-
{
|
|
210
|
-
image:
|
|
211
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-002.jpg"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
image:
|
|
215
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-003.jpg"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
image:
|
|
219
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg"
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
image:
|
|
223
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
image:
|
|
227
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-002.jpg"
|
|
228
|
-
}
|
|
229
|
-
]
|
|
229
|
+
height: 400
|
|
230
230
|
}}
|
|
231
231
|
/>
|
|
232
232
|
|
|
@@ -236,12 +236,6 @@
|
|
|
236
236
|
label: "My Cheetah Gallery",
|
|
237
237
|
rows: 2,
|
|
238
238
|
height: 400,
|
|
239
|
-
show_download_button: true
|
|
240
|
-
value: [
|
|
241
|
-
{
|
|
242
|
-
image:
|
|
243
|
-
"https://gradio-builds.s3.amazonaws.com/demo-files/cheetah-002.jpg"
|
|
244
|
-
}
|
|
245
|
-
]
|
|
239
|
+
show_download_button: true
|
|
246
240
|
}}
|
|
247
241
|
/>
|
package/Index.svelte
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { LoadingStatus } from "@gradio/statustracker";
|
|
10
10
|
import { StatusTracker } from "@gradio/statustracker";
|
|
11
11
|
import type { FileData } from "@gradio/client";
|
|
12
|
+
import { createEventDispatcher } from "svelte";
|
|
12
13
|
|
|
13
14
|
export let loading_status: LoadingStatus;
|
|
14
15
|
export let show_label: boolean;
|
|
@@ -40,7 +41,12 @@
|
|
|
40
41
|
select: SelectData;
|
|
41
42
|
share: ShareData;
|
|
42
43
|
error: string;
|
|
44
|
+
prop_change: Record<string, any>;
|
|
43
45
|
}>;
|
|
46
|
+
|
|
47
|
+
const dispatch = createEventDispatcher();
|
|
48
|
+
|
|
49
|
+
$: selected_index, dispatch("prop_change", { selected_index });
|
|
44
50
|
</script>
|
|
45
51
|
|
|
46
52
|
<Block
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/gallery",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"@gradio/atoms": "^0.2.0",
|
|
12
12
|
"@gradio/client": "^0.7.1",
|
|
13
13
|
"@gradio/icons": "^0.2.0",
|
|
14
|
-
"@gradio/image": "^0.3.
|
|
14
|
+
"@gradio/image": "^0.3.2",
|
|
15
15
|
"@gradio/statustracker": "^0.3.0",
|
|
16
|
-
"@gradio/upload": "^0.3.
|
|
16
|
+
"@gradio/upload": "^0.3.2",
|
|
17
17
|
"@gradio/utils": "^0.2.0"
|
|
18
18
|
},
|
|
19
19
|
"main": "./Index.svelte",
|