@gradio/gallery 0.7.2 → 0.8.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 +13 -1
- package/Gallery.test.ts +0 -4
- package/package.json +6 -6
- package/shared/Gallery.svelte +13 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @gradio/gallery
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#7516](https://github.com/gradio-app/gradio/pull/7516) [`3645da5`](https://github.com/gradio-app/gradio/commit/3645da5f1e5539668cad75071a82fdd78f50263c) - Fix incorrect relative mouse coordinates for `Gallery` preview overlay. Thanks [@MMP0](https://github.com/MMP0)!
|
|
8
|
+
|
|
9
|
+
## 0.7.3
|
|
10
|
+
|
|
11
|
+
### Fixes
|
|
12
|
+
|
|
13
|
+
- [#7505](https://github.com/gradio-app/gradio/pull/7505) [`b186767`](https://github.com/gradio-app/gradio/commit/b18676774448f44a2ef3a9490224703254cffa7c) - Fix `Gallery` preview overlay and backdrop. Thanks [@MMP0](https://github.com/MMP0)!
|
|
14
|
+
|
|
3
15
|
## 0.7.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -357,4 +369,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
|
|
|
357
369
|
|
|
358
370
|
### Features
|
|
359
371
|
|
|
360
|
-
- [#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)!
|
|
372
|
+
- [#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
|
@@ -30,8 +30,6 @@ describe("Gallery", () => {
|
|
|
30
30
|
label: "Gallery",
|
|
31
31
|
loading_status: loading_status,
|
|
32
32
|
preview: true,
|
|
33
|
-
root: "",
|
|
34
|
-
proxy_url: "",
|
|
35
33
|
value: [
|
|
36
34
|
{
|
|
37
35
|
image: {
|
|
@@ -55,8 +53,6 @@ describe("Gallery", () => {
|
|
|
55
53
|
label: "Gallery",
|
|
56
54
|
loading_status: loading_status,
|
|
57
55
|
preview: true,
|
|
58
|
-
root: "",
|
|
59
|
-
proxy_url: "",
|
|
60
56
|
value: [
|
|
61
57
|
{
|
|
62
58
|
image: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/gallery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"private": false,
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"dequal": "^2.0.2",
|
|
11
|
-
"@gradio/client": "^0.12.1",
|
|
12
11
|
"@gradio/atoms": "^0.5.3",
|
|
13
|
-
"@gradio/image": "^0.9.2",
|
|
14
|
-
"@gradio/statustracker": "^0.4.7",
|
|
15
12
|
"@gradio/icons": "^0.3.3",
|
|
16
|
-
"@gradio/
|
|
13
|
+
"@gradio/client": "^0.12.2",
|
|
14
|
+
"@gradio/image": "^0.9.4",
|
|
15
|
+
"@gradio/statustracker": "^0.4.8",
|
|
16
|
+
"@gradio/upload": "^0.7.5",
|
|
17
17
|
"@gradio/utils": "^0.3.0",
|
|
18
|
-
"@gradio/file": "^0.5.
|
|
18
|
+
"@gradio/file": "^0.5.4"
|
|
19
19
|
},
|
|
20
20
|
"main": "./Index.svelte",
|
|
21
21
|
"main_changeset": true,
|
package/shared/Gallery.svelte
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
function handle_preview_click(event: MouseEvent): void {
|
|
84
84
|
const element = event.target as HTMLElement;
|
|
85
|
-
const x = event.
|
|
85
|
+
const x = event.offsetX;
|
|
86
86
|
const width = element.offsetWidth;
|
|
87
87
|
const centerX = width / 2;
|
|
88
88
|
|
|
@@ -338,14 +338,22 @@
|
|
|
338
338
|
.preview {
|
|
339
339
|
display: flex;
|
|
340
340
|
position: absolute;
|
|
341
|
-
top: 0px;
|
|
342
|
-
right: 0px;
|
|
343
|
-
bottom: 0px;
|
|
344
|
-
left: 0px;
|
|
345
341
|
flex-direction: column;
|
|
346
342
|
z-index: var(--layer-2);
|
|
343
|
+
border-radius: calc(var(--block-radius) - var(--block-border-width));
|
|
344
|
+
-webkit-backdrop-filter: blur(8px);
|
|
347
345
|
backdrop-filter: blur(8px);
|
|
346
|
+
width: var(--size-full);
|
|
347
|
+
height: var(--size-full);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.preview::before {
|
|
351
|
+
content: "";
|
|
352
|
+
position: absolute;
|
|
353
|
+
z-index: var(--layer-below);
|
|
348
354
|
background: var(--background-fill-primary);
|
|
355
|
+
opacity: 0.9;
|
|
356
|
+
width: var(--size-full);
|
|
349
357
|
height: var(--size-full);
|
|
350
358
|
}
|
|
351
359
|
|