@gradio/upload 0.12.4 → 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
CHANGED
@@ -1,5 +1,36 @@
|
|
1
1
|
# @gradio/upload
|
2
2
|
|
3
|
+
## 0.13.0-beta.3
|
4
|
+
|
5
|
+
### Dependency updates
|
6
|
+
|
7
|
+
- @gradio/client@1.6.0-beta.3
|
8
|
+
|
9
|
+
## 0.13.0-beta.2
|
10
|
+
|
11
|
+
### Features
|
12
|
+
|
13
|
+
- [#9339](https://github.com/gradio-app/gradio/pull/9339) [`4c8c6f2`](https://github.com/gradio-app/gradio/commit/4c8c6f2fe603081941c5fdc43f48a0632b9f31ad) - Ssr part 2. Thanks @pngwn!
|
14
|
+
- [#9250](https://github.com/gradio-app/gradio/pull/9250) [`350b0a5`](https://github.com/gradio-app/gradio/commit/350b0a5cafb9176f914f62e7c90de51d4352cc77) - Improve Icon Button consistency. Thanks @hannahblair!
|
15
|
+
|
16
|
+
### Dependency updates
|
17
|
+
|
18
|
+
- @gradio/atoms@0.9.0-beta.2
|
19
|
+
- @gradio/wasm@0.14.0-beta.2
|
20
|
+
- @gradio/client@1.6.0-beta.2
|
21
|
+
- @gradio/icons@0.8.0-beta.2
|
22
|
+
- @gradio/utils@0.7.0-beta.2
|
23
|
+
|
24
|
+
## 0.12.4-beta.1
|
25
|
+
|
26
|
+
### Dependency updates
|
27
|
+
|
28
|
+
- @gradio/atoms@0.8.1-beta.1
|
29
|
+
- @gradio/icons@0.8.0-beta.1
|
30
|
+
- @gradio/utils@0.7.0-beta.1
|
31
|
+
- @gradio/client@1.6.0-beta.1
|
32
|
+
- @gradio/wasm@0.13.1-beta.1
|
33
|
+
|
3
34
|
## 0.12.4
|
4
35
|
|
5
36
|
### Fixes
|
@@ -1,19 +1,15 @@
|
|
1
|
-
<script>import { IconButton } from "@gradio/atoms";
|
1
|
+
<script>import { IconButton, IconButtonWrapper } from "@gradio/atoms";
|
2
2
|
import { Edit, Clear, Undo, Download } from "@gradio/icons";
|
3
3
|
import { DownloadLink } from "@gradio/wasm/svelte";
|
4
4
|
import { createEventDispatcher } from "svelte";
|
5
5
|
export let editable = false;
|
6
6
|
export let undoable = false;
|
7
7
|
export let download = null;
|
8
|
-
export let absolute = true;
|
9
8
|
export let i18n;
|
10
9
|
const dispatch = createEventDispatcher();
|
11
10
|
</script>
|
12
11
|
|
13
|
-
<
|
14
|
-
class:not-absolute={!absolute}
|
15
|
-
style:position={absolute ? "absolute" : "static"}
|
16
|
-
>
|
12
|
+
<IconButtonWrapper>
|
17
13
|
{#if editable}
|
18
14
|
<IconButton
|
19
15
|
Icon={Edit}
|
@@ -36,6 +32,8 @@ const dispatch = createEventDispatcher();
|
|
36
32
|
</DownloadLink>
|
37
33
|
{/if}
|
38
34
|
|
35
|
+
<slot />
|
36
|
+
|
39
37
|
<IconButton
|
40
38
|
Icon={Clear}
|
41
39
|
label={i18n("common.clear")}
|
@@ -44,19 +42,4 @@ const dispatch = createEventDispatcher();
|
|
44
42
|
event.stopPropagation();
|
45
43
|
}}
|
46
44
|
/>
|
47
|
-
</
|
48
|
-
|
49
|
-
<style>
|
50
|
-
div {
|
51
|
-
display: flex;
|
52
|
-
top: var(--size-2);
|
53
|
-
right: var(--size-2);
|
54
|
-
justify-content: flex-end;
|
55
|
-
gap: var(--spacing-sm);
|
56
|
-
z-index: var(--layer-1);
|
57
|
-
}
|
58
|
-
|
59
|
-
.not-absolute {
|
60
|
-
margin: var(--size-1);
|
61
|
-
}
|
62
|
-
</style>
|
45
|
+
</IconButtonWrapper>
|
@@ -5,7 +5,6 @@ declare const __propDef: {
|
|
5
5
|
editable?: boolean | undefined;
|
6
6
|
undoable?: boolean | undefined;
|
7
7
|
download?: (string | null) | undefined;
|
8
|
-
absolute?: boolean | undefined;
|
9
8
|
i18n: I18nFormatter;
|
10
9
|
};
|
11
10
|
events: {
|
@@ -15,7 +14,9 @@ declare const __propDef: {
|
|
15
14
|
} & {
|
16
15
|
[evt: string]: CustomEvent<any>;
|
17
16
|
};
|
18
|
-
slots: {
|
17
|
+
slots: {
|
18
|
+
default: {};
|
19
|
+
};
|
19
20
|
};
|
20
21
|
export type ModifyUploadProps = typeof __propDef.props;
|
21
22
|
export type ModifyUploadEvents = typeof __propDef.events;
|
@@ -28,7 +28,7 @@ function getProgress(file) {
|
|
28
28
|
}
|
29
29
|
onMount(async () => {
|
30
30
|
stream = await stream_handler(
|
31
|
-
new URL(`${root}/upload_progress?upload_id=${upload_id}`)
|
31
|
+
new URL(`${root}/gradio_api/upload_progress?upload_id=${upload_id}`)
|
32
32
|
);
|
33
33
|
if (stream == null) {
|
34
34
|
throw new Error("Event source is not defined");
|
package/package.json
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/upload",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.13.0-beta.3",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
6
|
"main": "src/index.ts",
|
7
7
|
"author": "",
|
8
8
|
"license": "ISC",
|
9
9
|
"dependencies": {
|
10
|
-
"@gradio/
|
11
|
-
"@gradio/
|
12
|
-
"@gradio/
|
13
|
-
"@gradio/
|
14
|
-
"@gradio/
|
10
|
+
"@gradio/atoms": "^0.9.0-beta.2",
|
11
|
+
"@gradio/icons": "^0.8.0-beta.2",
|
12
|
+
"@gradio/utils": "^0.7.0-beta.2",
|
13
|
+
"@gradio/wasm": "^0.14.0-beta.2",
|
14
|
+
"@gradio/client": "^1.6.0-beta.3"
|
15
15
|
},
|
16
16
|
"main_changeset": true,
|
17
17
|
"exports": {
|
package/src/ModifyUpload.svelte
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<script lang="ts">
|
2
|
-
import { IconButton } from "@gradio/atoms";
|
2
|
+
import { IconButton, IconButtonWrapper } from "@gradio/atoms";
|
3
3
|
import type { I18nFormatter } from "@gradio/utils";
|
4
4
|
import { Edit, Clear, Undo, Download } from "@gradio/icons";
|
5
5
|
import { DownloadLink } from "@gradio/wasm/svelte";
|
@@ -9,7 +9,6 @@
|
|
9
9
|
export let editable = false;
|
10
10
|
export let undoable = false;
|
11
11
|
export let download: string | null = null;
|
12
|
-
export let absolute = true;
|
13
12
|
export let i18n: I18nFormatter;
|
14
13
|
|
15
14
|
const dispatch = createEventDispatcher<{
|
@@ -19,10 +18,7 @@
|
|
19
18
|
}>();
|
20
19
|
</script>
|
21
20
|
|
22
|
-
<
|
23
|
-
class:not-absolute={!absolute}
|
24
|
-
style:position={absolute ? "absolute" : "static"}
|
25
|
-
>
|
21
|
+
<IconButtonWrapper>
|
26
22
|
{#if editable}
|
27
23
|
<IconButton
|
28
24
|
Icon={Edit}
|
@@ -45,6 +41,8 @@
|
|
45
41
|
</DownloadLink>
|
46
42
|
{/if}
|
47
43
|
|
44
|
+
<slot />
|
45
|
+
|
48
46
|
<IconButton
|
49
47
|
Icon={Clear}
|
50
48
|
label={i18n("common.clear")}
|
@@ -53,19 +51,4 @@
|
|
53
51
|
event.stopPropagation();
|
54
52
|
}}
|
55
53
|
/>
|
56
|
-
</
|
57
|
-
|
58
|
-
<style>
|
59
|
-
div {
|
60
|
-
display: flex;
|
61
|
-
top: var(--size-2);
|
62
|
-
right: var(--size-2);
|
63
|
-
justify-content: flex-end;
|
64
|
-
gap: var(--spacing-sm);
|
65
|
-
z-index: var(--layer-1);
|
66
|
-
}
|
67
|
-
|
68
|
-
.not-absolute {
|
69
|
-
margin: var(--size-1);
|
70
|
-
}
|
71
|
-
</style>
|
54
|
+
</IconButtonWrapper>
|