@gradio/gallery 0.19.1 → 0.19.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 +41 -0
- package/Example.svelte +9 -3
- package/Gallery.test.ts +0 -14
- package/Index.svelte +1 -1
- package/dist/Example.svelte +9 -3
- package/dist/Example.svelte.d.ts +4 -18
- package/dist/Index.svelte +1 -1
- package/dist/shared/Gallery.svelte +8 -5
- package/package.json +10 -10
- package/shared/Gallery.svelte +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @gradio/gallery
|
|
2
2
|
|
|
3
|
+
## 0.19.2
|
|
4
|
+
|
|
5
|
+
### Dependency updates
|
|
6
|
+
|
|
7
|
+
- @gradio/upload@0.19.0
|
|
8
|
+
- @gradio/statustracker@0.15.4
|
|
9
|
+
- @gradio/client@2.7.1
|
|
10
|
+
- @gradio/image@0.28.4
|
|
11
|
+
- @gradio/file@0.16.1
|
|
12
|
+
- @gradio/video@0.23.2
|
|
13
|
+
|
|
14
|
+
## 0.19.1
|
|
15
|
+
|
|
16
|
+
### Dependency updates
|
|
17
|
+
|
|
18
|
+
- @gradio/utils@0.14.2
|
|
19
|
+
- @gradio/client@2.7.0
|
|
20
|
+
|
|
21
|
+
## 0.19.1
|
|
22
|
+
|
|
23
|
+
### Dependency updates
|
|
24
|
+
|
|
25
|
+
- @gradio/client@2.6.0
|
|
26
|
+
- @gradio/atoms@0.26.2
|
|
27
|
+
- @gradio/utils@0.14.1
|
|
28
|
+
- @gradio/upload@0.18.3
|
|
29
|
+
- @gradio/image@0.28.3
|
|
30
|
+
- @gradio/video@0.23.1
|
|
31
|
+
|
|
32
|
+
## 0.19.1
|
|
33
|
+
|
|
34
|
+
### Dependency updates
|
|
35
|
+
|
|
36
|
+
- @gradio/client@2.5.1
|
|
37
|
+
|
|
38
|
+
## 0.19.1
|
|
39
|
+
|
|
40
|
+
### Dependency updates
|
|
41
|
+
|
|
42
|
+
- @gradio/client@2.5.0
|
|
43
|
+
|
|
3
44
|
## 0.19.1
|
|
4
45
|
|
|
5
46
|
### Dependency updates
|
package/Example.svelte
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { GalleryImage, GalleryVideo } from "./types";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
let {
|
|
5
|
+
value,
|
|
6
|
+
type,
|
|
7
|
+
selected = false
|
|
8
|
+
}: {
|
|
9
|
+
value: (GalleryImage | GalleryVideo)[] | null;
|
|
10
|
+
type: "gallery" | "table";
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
} = $props();
|
|
7
13
|
</script>
|
|
8
14
|
|
|
9
15
|
<div
|
package/Gallery.test.ts
CHANGED
|
@@ -630,20 +630,6 @@ describe("Props: sources", () => {
|
|
|
630
630
|
});
|
|
631
631
|
});
|
|
632
632
|
|
|
633
|
-
describe("Props: visual-only", () => {
|
|
634
|
-
test.todo(
|
|
635
|
-
"VISUAL: object_fit='contain' vs 'cover' changes image display in thumbnails — needs Playwright visual regression screenshot comparison"
|
|
636
|
-
);
|
|
637
|
-
|
|
638
|
-
test.todo(
|
|
639
|
-
"VISUAL: height prop sets gallery container height — needs Playwright visual regression screenshot comparison"
|
|
640
|
-
);
|
|
641
|
-
|
|
642
|
-
test.todo(
|
|
643
|
-
"VISUAL: rows prop controls grid row count — needs Playwright visual regression screenshot comparison"
|
|
644
|
-
);
|
|
645
|
-
});
|
|
646
|
-
|
|
647
633
|
describe("Events: change", () => {
|
|
648
634
|
afterEach(() => cleanup());
|
|
649
635
|
|
package/Index.svelte
CHANGED
package/dist/Example.svelte
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { GalleryImage, GalleryVideo } from "./types";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
let {
|
|
5
|
+
value,
|
|
6
|
+
type,
|
|
7
|
+
selected = false
|
|
8
|
+
}: {
|
|
9
|
+
value: (GalleryImage | GalleryVideo)[] | null;
|
|
10
|
+
type: "gallery" | "table";
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
} = $props();
|
|
7
13
|
</script>
|
|
8
14
|
|
|
9
15
|
<div
|
package/dist/Example.svelte.d.ts
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import type { GalleryImage, GalleryVideo } from "./types";
|
|
2
|
-
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: Props & {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const Example: $$__sveltets_2_IsomorphicComponent<{
|
|
2
|
+
type $$ComponentProps = {
|
|
16
3
|
value: (GalleryImage | GalleryVideo)[] | null;
|
|
17
4
|
type: "gallery" | "table";
|
|
18
5
|
selected?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
type Example = InstanceType<typeof Example>;
|
|
6
|
+
};
|
|
7
|
+
declare const Example: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type Example = ReturnType<typeof Example>;
|
|
23
9
|
export default Example;
|
package/dist/Index.svelte
CHANGED
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
<div class="gallery-container" bind:this={image_container}>
|
|
559
559
|
{#if selected_media && allow_preview}
|
|
560
560
|
<span
|
|
561
|
-
|
|
561
|
+
onkeydown={on_keydown}
|
|
562
562
|
class="preview"
|
|
563
563
|
class:minimal={mode === "minimal"}
|
|
564
564
|
>
|
|
@@ -623,7 +623,7 @@
|
|
|
623
623
|
</IconButtonWrapper>
|
|
624
624
|
<button
|
|
625
625
|
class="media-button"
|
|
626
|
-
|
|
626
|
+
onclick={"image" in selected_media
|
|
627
627
|
? (event) => handle_preview_click(event)
|
|
628
628
|
: null}
|
|
629
629
|
style="height: calc(100% - {selected_media.caption
|
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
{#each resolved_value as media, i}
|
|
672
672
|
<button
|
|
673
673
|
bind:this={el[i]}
|
|
674
|
-
|
|
674
|
+
onclick={() => {
|
|
675
675
|
selected_index = i;
|
|
676
676
|
dispatch_select(i);
|
|
677
677
|
}}
|
|
@@ -805,7 +805,7 @@
|
|
|
805
805
|
<button
|
|
806
806
|
class="thumbnail-item thumbnail-lg"
|
|
807
807
|
class:selected={selected_index === i}
|
|
808
|
-
|
|
808
|
+
onclick={() => {
|
|
809
809
|
if (selected_index === null && allow_preview) {
|
|
810
810
|
onpreview_open();
|
|
811
811
|
}
|
|
@@ -846,7 +846,10 @@
|
|
|
846
846
|
{#if interactive}
|
|
847
847
|
<button
|
|
848
848
|
class="delete-button"
|
|
849
|
-
|
|
849
|
+
onclick={(event) => {
|
|
850
|
+
event.stopPropagation();
|
|
851
|
+
handle_item_delete(i);
|
|
852
|
+
}}
|
|
850
853
|
aria-label="Delete image"
|
|
851
854
|
>
|
|
852
855
|
<Clear />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/gallery",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.2",
|
|
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.3",
|
|
11
|
-
"@gradio/
|
|
11
|
+
"@gradio/client": "^2.7.1",
|
|
12
|
+
"@gradio/atoms": "^0.26.2",
|
|
13
|
+
"@gradio/file": "^0.16.1",
|
|
14
|
+
"@gradio/image": "^0.28.4",
|
|
15
|
+
"@gradio/statustracker": "^0.15.4",
|
|
16
|
+
"@gradio/upload": "^0.19.0",
|
|
12
17
|
"@gradio/icons": "^0.16.0",
|
|
13
|
-
"@gradio/
|
|
14
|
-
"@gradio/
|
|
15
|
-
"@gradio/upload": "^0.18.2",
|
|
16
|
-
"@gradio/utils": "^0.14.0",
|
|
17
|
-
"@gradio/video": "^0.23.0",
|
|
18
|
-
"@gradio/file": "^0.16.0",
|
|
19
|
-
"@gradio/statustracker": "^0.15.2"
|
|
18
|
+
"@gradio/utils": "^0.14.2",
|
|
19
|
+
"@gradio/video": "^0.23.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@gradio/preview": "^0.17.
|
|
22
|
+
"@gradio/preview": "^0.17.1"
|
|
23
23
|
},
|
|
24
24
|
"main": "./Index.svelte",
|
|
25
25
|
"main_changeset": true,
|
package/shared/Gallery.svelte
CHANGED
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
<div class="gallery-container" bind:this={image_container}>
|
|
559
559
|
{#if selected_media && allow_preview}
|
|
560
560
|
<span
|
|
561
|
-
|
|
561
|
+
onkeydown={on_keydown}
|
|
562
562
|
class="preview"
|
|
563
563
|
class:minimal={mode === "minimal"}
|
|
564
564
|
>
|
|
@@ -623,7 +623,7 @@
|
|
|
623
623
|
</IconButtonWrapper>
|
|
624
624
|
<button
|
|
625
625
|
class="media-button"
|
|
626
|
-
|
|
626
|
+
onclick={"image" in selected_media
|
|
627
627
|
? (event) => handle_preview_click(event)
|
|
628
628
|
: null}
|
|
629
629
|
style="height: calc(100% - {selected_media.caption
|
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
{#each resolved_value as media, i}
|
|
672
672
|
<button
|
|
673
673
|
bind:this={el[i]}
|
|
674
|
-
|
|
674
|
+
onclick={() => {
|
|
675
675
|
selected_index = i;
|
|
676
676
|
dispatch_select(i);
|
|
677
677
|
}}
|
|
@@ -805,7 +805,7 @@
|
|
|
805
805
|
<button
|
|
806
806
|
class="thumbnail-item thumbnail-lg"
|
|
807
807
|
class:selected={selected_index === i}
|
|
808
|
-
|
|
808
|
+
onclick={() => {
|
|
809
809
|
if (selected_index === null && allow_preview) {
|
|
810
810
|
onpreview_open();
|
|
811
811
|
}
|
|
@@ -846,7 +846,10 @@
|
|
|
846
846
|
{#if interactive}
|
|
847
847
|
<button
|
|
848
848
|
class="delete-button"
|
|
849
|
-
|
|
849
|
+
onclick={(event) => {
|
|
850
|
+
event.stopPropagation();
|
|
851
|
+
handle_item_delete(i);
|
|
852
|
+
}}
|
|
850
853
|
aria-label="Delete image"
|
|
851
854
|
>
|
|
852
855
|
<Clear />
|