@gradio/file 0.3.0 → 0.4.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 CHANGED
@@ -1,11 +1,27 @@
1
1
  # @gradio/file
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Features
6
+
7
+ - [#6398](https://github.com/gradio-app/gradio/pull/6398) [`67ddd40`](https://github.com/gradio-app/gradio/commit/67ddd40b4b70d3a37cb1637c33620f8d197dbee0) - Lite v4. Thanks [@whitphx](https://github.com/whitphx)!
8
+
9
+ ## 0.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [[`206af31`](https://github.com/gradio-app/gradio/commit/206af31d7c1a31013364a44e9b40cf8df304ba50)]:
14
+ - @gradio/icons@0.3.1
15
+ - @gradio/atoms@0.3.1
16
+ - @gradio/statustracker@0.4.1
17
+ - @gradio/upload@0.5.2
18
+
3
19
  ## 0.3.0
4
20
 
5
21
  ### Features
6
22
 
7
- - [#6511](https://github.com/gradio-app/gradio/pull/6511) [`71f1a1f99`](https://github.com/gradio-app/gradio/commit/71f1a1f9931489d465c2c1302a5c8d768a3cd23a) - Mark `FileData.orig_name` optional on the frontend aligning the type definition on the Python side. Thanks [@whitphx](https://github.com/whitphx)!
8
- - [#6520](https://github.com/gradio-app/gradio/pull/6520) [`f94db6b73`](https://github.com/gradio-app/gradio/commit/f94db6b7319be902428887867500311a6a32a165) - File table style with accessible file name texts. Thanks [@whitphx](https://github.com/whitphx)!
23
+ - [#6511](https://github.com/gradio-app/gradio/pull/6511) [`71f1a1f99`](https://github.com/gradio-app/gradio/commit/71f1a1f9931489d465c2c1302a5c8d768a3cd23a) - Mark `FileData.orig_name` optional on the frontend aligning the type definition on the Python side. Thanks [@whitphx](https://github.com/whitphx)!
24
+ - [#6520](https://github.com/gradio-app/gradio/pull/6520) [`f94db6b73`](https://github.com/gradio-app/gradio/commit/f94db6b7319be902428887867500311a6a32a165) - File table style with accessible file name texts. Thanks [@whitphx](https://github.com/whitphx)!
9
25
 
10
26
  ## 0.2.7
11
27
 
@@ -25,9 +25,9 @@
25
25
  args={{
26
26
  value: [
27
27
  {
28
- path: "groot.jpg",
29
- orig_name: "groot.jpg",
30
- url: "https://i.ibb.co/6BgKdSj/groot.jpg",
28
+ path: "cheetah.jpg",
29
+ orig_name: "cheetah.jpg",
30
+ url: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg",
31
31
  size: 10000
32
32
  }
33
33
  ]
@@ -37,9 +37,9 @@
37
37
  name="Multiple files, with height set to 150px"
38
38
  args={{
39
39
  value: Array(10).fill({
40
- path: "groot.jpg",
41
- orig_name: "groot.jpg",
42
- url: "https://i.ibb.co/6BgKdSj/groot.jpg",
40
+ path: "cheetah.jpg",
41
+ orig_name: "cheetah.jpg",
42
+ url: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg",
43
43
  size: 10000
44
44
  }),
45
45
  height: 150
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@gradio/file",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
7
7
  "license": "ISC",
8
8
  "private": false,
9
9
  "dependencies": {
10
- "@gradio/atoms": "^0.3.0",
11
- "@gradio/icons": "^0.3.0",
12
- "@gradio/statustracker": "^0.4.0",
13
- "@gradio/client": "^0.8.2",
14
- "@gradio/upload": "^0.5.1",
15
- "@gradio/utils": "^0.2.0"
10
+ "@gradio/atoms": "^0.4.0",
11
+ "@gradio/client": "^0.9.0",
12
+ "@gradio/icons": "^0.3.2",
13
+ "@gradio/statustracker": "^0.4.2",
14
+ "@gradio/upload": "^0.5.3",
15
+ "@gradio/utils": "^0.2.0",
16
+ "@gradio/wasm": "^0.4.0"
16
17
  },
17
18
  "main": "./Index.svelte",
18
19
  "main_changeset": true,
@@ -3,6 +3,7 @@
3
3
  import { prettyBytes } from "./utils";
4
4
  import { createEventDispatcher } from "svelte";
5
5
  import type { I18nFormatter, SelectData } from "@gradio/utils";
6
+ import { DownloadLink } from "@gradio/wasm/svelte";
6
7
 
7
8
  const dispatch = createEventDispatcher<{
8
9
  select: SelectData;
@@ -53,15 +54,14 @@
53
54
 
54
55
  <td class="download">
55
56
  {#if file.url}
56
- <a
57
+ <DownloadLink
57
58
  href={file.url}
58
- target="_blank"
59
59
  download={window.__is_colab__ ? null : file.orig_name}
60
60
  >
61
61
  {@html file.size != null
62
62
  ? prettyBytes(file.size)
63
63
  : "(size unknown)"}&nbsp;&#8675;
64
- </a>
64
+ </DownloadLink>
65
65
  {:else}
66
66
  {i18n("file.uploading")}
67
67
  {/if}
@@ -114,17 +114,17 @@
114
114
  .download:hover {
115
115
  text-decoration: underline;
116
116
  }
117
- .download > a {
117
+ .download > :global(a) {
118
118
  color: var(--link-text-color);
119
119
  }
120
120
 
121
- .download > a:hover {
121
+ .download > :global(a:hover) {
122
122
  color: var(--link-text-color-hover);
123
123
  }
124
- .download > a:visited {
124
+ .download > :global(a:visited) {
125
125
  color: var(--link-text-color-visited);
126
126
  }
127
- .download > a:active {
127
+ .download > :global(a:active) {
128
128
  color: var(--link-text-color-active);
129
129
  }
130
130
  .selectable {