@gradio/upload 0.12.4-beta.1 → 0.13.0-beta.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @gradio/upload
2
2
 
3
+ ## 0.13.0-beta.2
4
+
5
+ ### Features
6
+
7
+ - [#9339](https://github.com/gradio-app/gradio/pull/9339) [`4c8c6f2`](https://github.com/gradio-app/gradio/commit/4c8c6f2fe603081941c5fdc43f48a0632b9f31ad) - Ssr part 2. Thanks @pngwn!
8
+ - [#9250](https://github.com/gradio-app/gradio/pull/9250) [`350b0a5`](https://github.com/gradio-app/gradio/commit/350b0a5cafb9176f914f62e7c90de51d4352cc77) - Improve Icon Button consistency. Thanks @hannahblair!
9
+
10
+ ### Dependency updates
11
+
12
+ - @gradio/atoms@0.9.0-beta.2
13
+ - @gradio/wasm@0.14.0-beta.2
14
+ - @gradio/client@1.6.0-beta.2
15
+ - @gradio/icons@0.8.0-beta.2
16
+ - @gradio/utils@0.7.0-beta.2
17
+
3
18
  ## 0.12.4-beta.1
4
19
 
5
20
  ### Dependency updates
@@ -10,7 +25,7 @@
10
25
  - @gradio/client@1.6.0-beta.1
11
26
  - @gradio/wasm@0.13.1-beta.1
12
27
 
13
- ## 0.12.4-beta.0
28
+ ## 0.12.4
14
29
 
15
30
  ### Fixes
16
31
 
@@ -18,11 +33,11 @@
18
33
 
19
34
  ### Dependency updates
20
35
 
21
- - @gradio/utils@0.7.0-beta.0
22
- - @gradio/atoms@0.8.1-beta.0
23
- - @gradio/client@1.6.0-beta.0
24
- - @gradio/icons@0.8.0-beta.0
25
- - @gradio/wasm@0.13.1-beta.0
36
+ - @gradio/utils@0.6.1
37
+ - @gradio/atoms@0.8.1
38
+ - @gradio/icons@0.7.2
39
+ - @gradio/wasm@0.13.1
40
+ - @gradio/client@1.5.2
26
41
 
27
42
  ## 0.12.3
28
43
 
@@ -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
- <div
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
- </div>
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.12.4-beta.1",
3
+ "version": "0.13.0-beta.2",
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/atoms": "^0.8.1-beta.1",
11
- "@gradio/icons": "^0.8.0-beta.1",
12
- "@gradio/utils": "^0.7.0-beta.1",
13
- "@gradio/client": "^1.6.0-beta.1",
14
- "@gradio/wasm": "^0.13.1-beta.1"
10
+ "@gradio/atoms": "^0.9.0-beta.2",
11
+ "@gradio/icons": "^0.8.0-beta.2",
12
+ "@gradio/client": "^1.6.0-beta.2",
13
+ "@gradio/utils": "^0.7.0-beta.2",
14
+ "@gradio/wasm": "^0.14.0-beta.2"
15
15
  },
16
16
  "main_changeset": true,
17
17
  "exports": {
@@ -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
- <div
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
- </div>
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>
@@ -39,7 +39,7 @@
39
39
 
40
40
  onMount(async () => {
41
41
  stream = await stream_handler(
42
- new URL(`${root}/upload_progress?upload_id=${upload_id}`)
42
+ new URL(`${root}/gradio_api/upload_progress?upload_id=${upload_id}`)
43
43
  );
44
44
 
45
45
  if (stream == null) {