@gradio/gallery 0.13.0-beta.1 → 0.13.0-beta.3
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 +39 -9
- package/Index.svelte +3 -3
- package/dist/Index.svelte +3 -3
- package/dist/shared/Gallery.svelte +19 -32
- package/package.json +11 -11
- package/shared/Gallery.svelte +19 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @gradio/gallery
|
|
2
2
|
|
|
3
|
+
## 0.13.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Dependency updates
|
|
6
|
+
|
|
7
|
+
- @gradio/upload@0.13.0-beta.3
|
|
8
|
+
- @gradio/video@0.11.0-beta.3
|
|
9
|
+
- @gradio/client@1.6.0-beta.3
|
|
10
|
+
- @gradio/file@0.10.0-beta.3
|
|
11
|
+
- @gradio/image@0.16.0-beta.3
|
|
12
|
+
|
|
13
|
+
## 0.13.0-beta.2
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- [#9339](https://github.com/gradio-app/gradio/pull/9339) [`4c8c6f2`](https://github.com/gradio-app/gradio/commit/4c8c6f2fe603081941c5fdc43f48a0632b9f31ad) - Ssr part 2. Thanks @pngwn!
|
|
18
|
+
- [#9250](https://github.com/gradio-app/gradio/pull/9250) [`350b0a5`](https://github.com/gradio-app/gradio/commit/350b0a5cafb9176f914f62e7c90de51d4352cc77) - Improve Icon Button consistency. Thanks @hannahblair!
|
|
19
|
+
|
|
20
|
+
### Dependency updates
|
|
21
|
+
|
|
22
|
+
- @gradio/atoms@0.9.0-beta.2
|
|
23
|
+
- @gradio/upload@0.13.0-beta.2
|
|
24
|
+
- @gradio/client@1.6.0-beta.2
|
|
25
|
+
- @gradio/icons@0.8.0-beta.2
|
|
26
|
+
- @gradio/statustracker@0.8.0-beta.2
|
|
27
|
+
- @gradio/utils@0.7.0-beta.2
|
|
28
|
+
- @gradio/file@0.10.0-beta.2
|
|
29
|
+
- @gradio/image@0.16.0-beta.2
|
|
30
|
+
- @gradio/video@0.11.0-beta.2
|
|
31
|
+
|
|
3
32
|
## 0.13.0-beta.1
|
|
4
33
|
|
|
5
34
|
### Dependency updates
|
|
@@ -20,21 +49,22 @@
|
|
|
20
49
|
|
|
21
50
|
- [#9052](https://github.com/gradio-app/gradio/pull/9052) [`f3652eb`](https://github.com/gradio-app/gradio/commit/f3652ebe08211e12739df73c15fd97e5ff81276a) - Video gallery. Thanks @dawoodkhan82!
|
|
22
51
|
|
|
52
|
+
## 0.12.2
|
|
53
|
+
|
|
23
54
|
### Fixes
|
|
24
55
|
|
|
25
56
|
- [#9163](https://github.com/gradio-app/gradio/pull/9163) [`2b6cbf2`](https://github.com/gradio-app/gradio/commit/2b6cbf25908e42cf027324e54ef2cc0baad11a91) - fix exports and generate types. Thanks @pngwn!
|
|
26
57
|
|
|
27
58
|
### Dependency updates
|
|
28
59
|
|
|
29
|
-
- @gradio/utils@0.
|
|
30
|
-
- @gradio/statustracker@0.
|
|
31
|
-
- @gradio/atoms@0.8.1
|
|
32
|
-
- @gradio/
|
|
33
|
-
- @gradio/
|
|
34
|
-
- @gradio/upload@0.12.4
|
|
35
|
-
- @gradio/image@0.
|
|
36
|
-
- @gradio/
|
|
37
|
-
- @gradio/file@0.9.4-beta.0
|
|
60
|
+
- @gradio/utils@0.6.1
|
|
61
|
+
- @gradio/statustracker@0.7.6
|
|
62
|
+
- @gradio/atoms@0.8.1
|
|
63
|
+
- @gradio/icons@0.7.2
|
|
64
|
+
- @gradio/client@1.5.2
|
|
65
|
+
- @gradio/upload@0.12.4
|
|
66
|
+
- @gradio/image@0.15.1
|
|
67
|
+
- @gradio/file@0.9.4
|
|
38
68
|
|
|
39
69
|
## 0.12.1
|
|
40
70
|
|
package/Index.svelte
CHANGED
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
file_count={"multiple"}
|
|
82
82
|
{file_types}
|
|
83
83
|
i18n={gradio.i18n}
|
|
84
|
-
upload={gradio.client.upload}
|
|
85
|
-
stream_handler={gradio.client.stream}
|
|
84
|
+
upload={(...args) => gradio.client.upload(...args)}
|
|
85
|
+
stream_handler={(...args) => gradio.client.stream(...args)}
|
|
86
86
|
on:upload={(e) => {
|
|
87
87
|
const files = Array.isArray(e.detail) ? e.detail : [e.detail];
|
|
88
88
|
value = files.map((x) =>
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
{show_share_button}
|
|
121
121
|
{show_download_button}
|
|
122
122
|
i18n={gradio.i18n}
|
|
123
|
-
_fetch={gradio.client.fetch}
|
|
123
|
+
_fetch={(...args) => gradio.client.fetch(...args)}
|
|
124
124
|
{show_fullscreen_button}
|
|
125
125
|
/>
|
|
126
126
|
{/if}
|
package/dist/Index.svelte
CHANGED
|
@@ -64,8 +64,8 @@ $:
|
|
|
64
64
|
file_count={"multiple"}
|
|
65
65
|
{file_types}
|
|
66
66
|
i18n={gradio.i18n}
|
|
67
|
-
upload={gradio.client.upload}
|
|
68
|
-
stream_handler={gradio.client.stream}
|
|
67
|
+
upload={(...args) => gradio.client.upload(...args)}
|
|
68
|
+
stream_handler={(...args) => gradio.client.stream(...args)}
|
|
69
69
|
on:upload={(e) => {
|
|
70
70
|
const files = Array.isArray(e.detail) ? e.detail : [e.detail];
|
|
71
71
|
value = files.map((x) =>
|
|
@@ -103,7 +103,7 @@ $:
|
|
|
103
103
|
{show_share_button}
|
|
104
104
|
{show_download_button}
|
|
105
105
|
i18n={gradio.i18n}
|
|
106
|
-
_fetch={gradio.client.fetch}
|
|
106
|
+
_fetch={(...args) => gradio.client.fetch(...args)}
|
|
107
107
|
{show_fullscreen_button}
|
|
108
108
|
/>
|
|
109
109
|
{/if}
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "@gradio/icons";
|
|
16
16
|
import { FileData } from "@gradio/client";
|
|
17
17
|
import { format_gallery_for_sharing } from "./utils";
|
|
18
|
-
import { IconButton } from "@gradio/atoms";
|
|
18
|
+
import { IconButton, IconButtonWrapper } from "@gradio/atoms";
|
|
19
19
|
export let show_label = true;
|
|
20
20
|
export let label;
|
|
21
21
|
export let value = null;
|
|
@@ -187,7 +187,7 @@ const toggle_full_screen = async () => {
|
|
|
187
187
|
class="preview"
|
|
188
188
|
class:minimal={mode === "minimal"}
|
|
189
189
|
>
|
|
190
|
-
<
|
|
190
|
+
<IconButtonWrapper>
|
|
191
191
|
{#if show_download_button}
|
|
192
192
|
<IconButton
|
|
193
193
|
Icon={Download}
|
|
@@ -233,7 +233,7 @@ const toggle_full_screen = async () => {
|
|
|
233
233
|
on:click={() => (selected_index = null)}
|
|
234
234
|
/>
|
|
235
235
|
{/if}
|
|
236
|
-
</
|
|
236
|
+
</IconButtonWrapper>
|
|
237
237
|
<button
|
|
238
238
|
class="media-button"
|
|
239
239
|
on:click={"image" in selected_media
|
|
@@ -326,24 +326,22 @@ const toggle_full_screen = async () => {
|
|
|
326
326
|
>
|
|
327
327
|
{#if interactive}
|
|
328
328
|
<div class="icon-button">
|
|
329
|
-
<ModifyUpload
|
|
330
|
-
{i18n}
|
|
331
|
-
absolute={false}
|
|
332
|
-
on:clear={() => (value = [])}
|
|
333
|
-
/>
|
|
334
|
-
</div>
|
|
335
|
-
{/if}
|
|
336
|
-
{#if show_share_button}
|
|
337
|
-
<div class="icon-button">
|
|
338
|
-
<ShareButton
|
|
339
|
-
{i18n}
|
|
340
|
-
on:share
|
|
341
|
-
on:error
|
|
342
|
-
value={resolved_value}
|
|
343
|
-
formatter={format_gallery_for_sharing}
|
|
344
|
-
/>
|
|
329
|
+
<ModifyUpload {i18n} on:clear={() => (value = [])} />
|
|
345
330
|
</div>
|
|
346
331
|
{/if}
|
|
332
|
+
<IconButtonWrapper>
|
|
333
|
+
{#if show_share_button}
|
|
334
|
+
<div class="icon-button">
|
|
335
|
+
<ShareButton
|
|
336
|
+
{i18n}
|
|
337
|
+
on:share
|
|
338
|
+
on:error
|
|
339
|
+
value={resolved_value}
|
|
340
|
+
formatter={format_gallery_for_sharing}
|
|
341
|
+
/>
|
|
342
|
+
</div>
|
|
343
|
+
{/if}
|
|
344
|
+
</IconButtonWrapper>
|
|
347
345
|
{#each resolved_value as entry, i}
|
|
348
346
|
<button
|
|
349
347
|
class="thumbnail-item thumbnail-lg"
|
|
@@ -603,19 +601,8 @@ const toggle_full_screen = async () => {
|
|
|
603
601
|
}
|
|
604
602
|
|
|
605
603
|
.icon-button {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
right: 0px;
|
|
609
|
-
z-index: var(--layer-1);
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
.icon-buttons {
|
|
613
|
-
display: flex;
|
|
614
|
-
position: absolute;
|
|
615
|
-
right: 0;
|
|
616
|
-
gap: var(--size-1);
|
|
617
|
-
z-index: 1;
|
|
618
|
-
margin: var(--size-1);
|
|
604
|
+
top: 1px;
|
|
605
|
+
right: 1px;
|
|
619
606
|
}
|
|
620
607
|
|
|
621
608
|
.grid-wrap.minimal {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/gallery",
|
|
3
|
-
"version": "0.13.0-beta.
|
|
3
|
+
"version": "0.13.0-beta.3",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"private": false,
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"dequal": "^2.0.2",
|
|
11
|
-
"@gradio/atoms": "^0.
|
|
12
|
-
"@gradio/client": "^1.6.0-beta.
|
|
13
|
-
"@gradio/
|
|
14
|
-
"@gradio/statustracker": "^0.8.0-beta.
|
|
15
|
-
"@gradio/
|
|
16
|
-
"@gradio/
|
|
17
|
-
"@gradio/
|
|
18
|
-
"@gradio/
|
|
19
|
-
"@gradio/
|
|
11
|
+
"@gradio/atoms": "^0.9.0-beta.2",
|
|
12
|
+
"@gradio/client": "^1.6.0-beta.3",
|
|
13
|
+
"@gradio/icons": "^0.8.0-beta.2",
|
|
14
|
+
"@gradio/statustracker": "^0.8.0-beta.2",
|
|
15
|
+
"@gradio/utils": "^0.7.0-beta.2",
|
|
16
|
+
"@gradio/image": "^0.16.0-beta.3",
|
|
17
|
+
"@gradio/video": "^0.11.0-beta.3",
|
|
18
|
+
"@gradio/file": "^0.10.0-beta.3",
|
|
19
|
+
"@gradio/upload": "^0.13.0-beta.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@gradio/preview": "^0.11.1
|
|
22
|
+
"@gradio/preview": "^0.11.1"
|
|
23
23
|
},
|
|
24
24
|
"main": "./Index.svelte",
|
|
25
25
|
"main_changeset": true,
|
package/shared/Gallery.svelte
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
} from "@gradio/icons";
|
|
20
20
|
import { FileData } from "@gradio/client";
|
|
21
21
|
import { format_gallery_for_sharing } from "./utils";
|
|
22
|
-
import { IconButton } from "@gradio/atoms";
|
|
22
|
+
import { IconButton, IconButtonWrapper } from "@gradio/atoms";
|
|
23
23
|
import type { I18nFormatter } from "@gradio/utils";
|
|
24
24
|
|
|
25
25
|
type GalleryData = GalleryImage | GalleryVideo;
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
class="preview"
|
|
247
247
|
class:minimal={mode === "minimal"}
|
|
248
248
|
>
|
|
249
|
-
<
|
|
249
|
+
<IconButtonWrapper>
|
|
250
250
|
{#if show_download_button}
|
|
251
251
|
<IconButton
|
|
252
252
|
Icon={Download}
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
on:click={() => (selected_index = null)}
|
|
293
293
|
/>
|
|
294
294
|
{/if}
|
|
295
|
-
</
|
|
295
|
+
</IconButtonWrapper>
|
|
296
296
|
<button
|
|
297
297
|
class="media-button"
|
|
298
298
|
on:click={"image" in selected_media
|
|
@@ -385,24 +385,22 @@
|
|
|
385
385
|
>
|
|
386
386
|
{#if interactive}
|
|
387
387
|
<div class="icon-button">
|
|
388
|
-
<ModifyUpload
|
|
389
|
-
{i18n}
|
|
390
|
-
absolute={false}
|
|
391
|
-
on:clear={() => (value = [])}
|
|
392
|
-
/>
|
|
393
|
-
</div>
|
|
394
|
-
{/if}
|
|
395
|
-
{#if show_share_button}
|
|
396
|
-
<div class="icon-button">
|
|
397
|
-
<ShareButton
|
|
398
|
-
{i18n}
|
|
399
|
-
on:share
|
|
400
|
-
on:error
|
|
401
|
-
value={resolved_value}
|
|
402
|
-
formatter={format_gallery_for_sharing}
|
|
403
|
-
/>
|
|
388
|
+
<ModifyUpload {i18n} on:clear={() => (value = [])} />
|
|
404
389
|
</div>
|
|
405
390
|
{/if}
|
|
391
|
+
<IconButtonWrapper>
|
|
392
|
+
{#if show_share_button}
|
|
393
|
+
<div class="icon-button">
|
|
394
|
+
<ShareButton
|
|
395
|
+
{i18n}
|
|
396
|
+
on:share
|
|
397
|
+
on:error
|
|
398
|
+
value={resolved_value}
|
|
399
|
+
formatter={format_gallery_for_sharing}
|
|
400
|
+
/>
|
|
401
|
+
</div>
|
|
402
|
+
{/if}
|
|
403
|
+
</IconButtonWrapper>
|
|
406
404
|
{#each resolved_value as entry, i}
|
|
407
405
|
<button
|
|
408
406
|
class="thumbnail-item thumbnail-lg"
|
|
@@ -662,19 +660,8 @@
|
|
|
662
660
|
}
|
|
663
661
|
|
|
664
662
|
.icon-button {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
right: 0px;
|
|
668
|
-
z-index: var(--layer-1);
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
.icon-buttons {
|
|
672
|
-
display: flex;
|
|
673
|
-
position: absolute;
|
|
674
|
-
right: 0;
|
|
675
|
-
gap: var(--size-1);
|
|
676
|
-
z-index: 1;
|
|
677
|
-
margin: var(--size-1);
|
|
663
|
+
top: 1px;
|
|
664
|
+
right: 1px;
|
|
678
665
|
}
|
|
679
666
|
|
|
680
667
|
.grid-wrap.minimal {
|