@gradio/file 0.3.1 → 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,5 +1,11 @@
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
+
3
9
  ## 0.3.1
4
10
 
5
11
  ### Patch Changes
@@ -257,4 +263,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
257
263
  - Updated dependencies []:
258
264
  - @gradio/utils@0.0.2
259
265
  - @gradio/atoms@0.0.2
260
- - @gradio/upload@0.0.2
266
+ - @gradio/upload@0.0.2
@@ -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.1",
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/client": "^0.8.2",
11
- "@gradio/atoms": "^0.3.1",
12
- "@gradio/icons": "^0.3.1",
13
- "@gradio/upload": "^0.5.2",
14
- "@gradio/statustracker": "^0.4.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 {