@gradio/imageslider 0.4.0 → 0.4.1
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 +23 -0
- package/dist/shared/ClearImage.svelte +1 -1
- package/dist/shared/Image.svelte +3 -6
- package/dist/shared/SliderPreview.svelte +2 -2
- package/dist/shared/SliderPreview.svelte.d.ts +1 -1
- package/package.json +9 -9
- package/shared/ClearImage.svelte +1 -1
- package/shared/Image.svelte +3 -6
- package/shared/SliderPreview.svelte +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @gradio/imageslider
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- [#12800](https://github.com/gradio-app/gradio/pull/12800) [`7a1c321`](https://github.com/gradio-app/gradio/commit/7a1c321b6546ba05a353488f5133e8262c4a8a39) - Bump svelte/kit for security reasons. Thanks @freddyaboulton!
|
|
8
|
+
- [#12779](https://github.com/gradio-app/gradio/pull/12779) [`ea2d3e9`](https://github.com/gradio-app/gradio/commit/ea2d3e985a8b42d188e551f517c5825c00790628) - Migrate Audio + Upload + Atoms to Svelte 5. Thanks @dawoodkhan82!
|
|
9
|
+
|
|
10
|
+
### Dependency updates
|
|
11
|
+
|
|
12
|
+
- @gradio/statustracker@0.12.2
|
|
13
|
+
- @gradio/atoms@0.20.1
|
|
14
|
+
- @gradio/utils@0.11.2
|
|
15
|
+
- @gradio/icons@0.15.1
|
|
16
|
+
- @gradio/upload@0.17.4
|
|
17
|
+
- @gradio/client@2.0.3
|
|
18
|
+
|
|
19
|
+
## 0.4.0
|
|
20
|
+
|
|
21
|
+
### Dependency updates
|
|
22
|
+
|
|
23
|
+
- @gradio/utils@0.11.1
|
|
24
|
+
- @gradio/client@2.0.2
|
|
25
|
+
|
|
3
26
|
## 0.4.0
|
|
4
27
|
|
|
5
28
|
### Features
|
package/dist/shared/Image.svelte
CHANGED
|
@@ -35,10 +35,7 @@
|
|
|
35
35
|
let el_width: number;
|
|
36
36
|
let el_height: number;
|
|
37
37
|
|
|
38
|
-
async function handle_upload(
|
|
39
|
-
{ detail }: CustomEvent<FileData[]>,
|
|
40
|
-
n: number
|
|
41
|
-
): Promise<void> {
|
|
38
|
+
async function handle_upload(detail: FileData[], n: number): Promise<void> {
|
|
42
39
|
const new_value = [value[0], value[1]] as [
|
|
43
40
|
FileData | null,
|
|
44
41
|
FileData | null
|
|
@@ -121,7 +118,7 @@
|
|
|
121
118
|
bind:upload_promise
|
|
122
119
|
bind:dragging
|
|
123
120
|
filetype="image/*"
|
|
124
|
-
|
|
121
|
+
onload={(e) => handle_upload(e, 0)}
|
|
125
122
|
disable_click={!!value?.[0]}
|
|
126
123
|
{root}
|
|
127
124
|
file_count="multiple"
|
|
@@ -147,7 +144,7 @@
|
|
|
147
144
|
bind:upload_promise
|
|
148
145
|
bind:dragging
|
|
149
146
|
filetype="image/*"
|
|
150
|
-
|
|
147
|
+
onload={(e) => handle_upload(e, 1)}
|
|
151
148
|
disable_click={!!value?.[1]}
|
|
152
149
|
{root}
|
|
153
150
|
file_count="multiple"
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
Icon={Undo}
|
|
142
142
|
label={i18n("common.undo")}
|
|
143
143
|
disabled={$transform.z === 1}
|
|
144
|
-
|
|
144
|
+
onclick={() => zoomable_image?.reset_zoom()}
|
|
145
145
|
/>
|
|
146
146
|
{#if show_fullscreen_button}
|
|
147
147
|
<FullscreenButton {fullscreen} on:fullscreen />
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
<IconButton
|
|
160
160
|
Icon={Clear}
|
|
161
161
|
label="Remove Image"
|
|
162
|
-
|
|
162
|
+
onclick={(event) => {
|
|
163
163
|
value = [null, null];
|
|
164
164
|
dispatch("clear");
|
|
165
165
|
event.stopPropagation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/imageslider",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"@types/d3-selection": "^3.0.11",
|
|
12
12
|
"d3-drag": "^3.0.0",
|
|
13
13
|
"d3-selection": "^3.0.0",
|
|
14
|
-
"@gradio/atoms": "^0.20.
|
|
15
|
-
"@gradio/client": "^2.0.
|
|
16
|
-
"@gradio/icons": "^0.15.
|
|
17
|
-
"@gradio/statustracker": "^0.12.
|
|
18
|
-
"@gradio/
|
|
19
|
-
"@gradio/
|
|
14
|
+
"@gradio/atoms": "^0.20.1",
|
|
15
|
+
"@gradio/client": "^2.0.3",
|
|
16
|
+
"@gradio/icons": "^0.15.1",
|
|
17
|
+
"@gradio/statustracker": "^0.12.2",
|
|
18
|
+
"@gradio/upload": "^0.17.4",
|
|
19
|
+
"@gradio/utils": "^0.11.2"
|
|
20
20
|
},
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"./package.json": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@gradio/preview": "^0.15.
|
|
35
|
+
"@gradio/preview": "^0.15.2"
|
|
36
36
|
},
|
|
37
37
|
"main_changeset": true,
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"svelte": "^5.
|
|
39
|
+
"svelte": "^5.48.0"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
package/shared/ClearImage.svelte
CHANGED
package/shared/Image.svelte
CHANGED
|
@@ -35,10 +35,7 @@
|
|
|
35
35
|
let el_width: number;
|
|
36
36
|
let el_height: number;
|
|
37
37
|
|
|
38
|
-
async function handle_upload(
|
|
39
|
-
{ detail }: CustomEvent<FileData[]>,
|
|
40
|
-
n: number
|
|
41
|
-
): Promise<void> {
|
|
38
|
+
async function handle_upload(detail: FileData[], n: number): Promise<void> {
|
|
42
39
|
const new_value = [value[0], value[1]] as [
|
|
43
40
|
FileData | null,
|
|
44
41
|
FileData | null
|
|
@@ -121,7 +118,7 @@
|
|
|
121
118
|
bind:upload_promise
|
|
122
119
|
bind:dragging
|
|
123
120
|
filetype="image/*"
|
|
124
|
-
|
|
121
|
+
onload={(e) => handle_upload(e, 0)}
|
|
125
122
|
disable_click={!!value?.[0]}
|
|
126
123
|
{root}
|
|
127
124
|
file_count="multiple"
|
|
@@ -147,7 +144,7 @@
|
|
|
147
144
|
bind:upload_promise
|
|
148
145
|
bind:dragging
|
|
149
146
|
filetype="image/*"
|
|
150
|
-
|
|
147
|
+
onload={(e) => handle_upload(e, 1)}
|
|
151
148
|
disable_click={!!value?.[1]}
|
|
152
149
|
{root}
|
|
153
150
|
file_count="multiple"
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
Icon={Undo}
|
|
142
142
|
label={i18n("common.undo")}
|
|
143
143
|
disabled={$transform.z === 1}
|
|
144
|
-
|
|
144
|
+
onclick={() => zoomable_image?.reset_zoom()}
|
|
145
145
|
/>
|
|
146
146
|
{#if show_fullscreen_button}
|
|
147
147
|
<FullscreenButton {fullscreen} on:fullscreen />
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
<IconButton
|
|
160
160
|
Icon={Clear}
|
|
161
161
|
label="Remove Image"
|
|
162
|
-
|
|
162
|
+
onclick={(event) => {
|
|
163
163
|
value = [null, null];
|
|
164
164
|
dispatch("clear");
|
|
165
165
|
event.stopPropagation();
|