@gradio/code 0.2.8 → 0.3.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 +17 -1
- package/package.json +7 -6
- package/shared/Download.svelte +14 -16
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @gradio/code
|
2
2
|
|
3
|
+
## 0.3.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.2.9
|
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.2.8
|
4
20
|
|
5
21
|
### Patch Changes
|
@@ -185,4 +201,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
|
|
185
201
|
|
186
202
|
- Updated dependencies []:
|
187
203
|
- @gradio/atoms@0.0.2
|
188
|
-
- @gradio/upload@0.0.2
|
204
|
+
- @gradio/upload@0.0.2
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/code",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.3.0",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
6
|
"author": "",
|
@@ -27,11 +27,12 @@
|
|
27
27
|
"cm6-theme-basic-dark": "^0.2.0",
|
28
28
|
"cm6-theme-basic-light": "^0.2.0",
|
29
29
|
"codemirror": "^6.0.1",
|
30
|
-
"@gradio/
|
31
|
-
"@gradio/
|
32
|
-
"@gradio/
|
33
|
-
"@gradio/
|
34
|
-
"@gradio/
|
30
|
+
"@gradio/icons": "^0.3.2",
|
31
|
+
"@gradio/atoms": "^0.4.0",
|
32
|
+
"@gradio/upload": "^0.5.3",
|
33
|
+
"@gradio/utils": "^0.2.0",
|
34
|
+
"@gradio/statustracker": "^0.4.2",
|
35
|
+
"@gradio/wasm": "^0.4.0"
|
35
36
|
},
|
36
37
|
"main_changeset": true,
|
37
38
|
"main": "./Index.svelte",
|
package/shared/Download.svelte
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
import { onDestroy } from "svelte";
|
3
3
|
import { fade } from "svelte/transition";
|
4
4
|
import { Download, Check } from "@gradio/icons";
|
5
|
+
import { DownloadLink } from "@gradio/wasm/svelte";
|
5
6
|
|
6
7
|
export let value: string;
|
7
8
|
export let language: string;
|
@@ -50,20 +51,21 @@
|
|
50
51
|
});
|
51
52
|
</script>
|
52
53
|
|
53
|
-
<
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
>
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
</
|
54
|
+
<div class="container">
|
55
|
+
<DownloadLink
|
56
|
+
download="file.{ext}"
|
57
|
+
href={download_value}
|
58
|
+
on:click={copy_feedback}
|
59
|
+
>
|
60
|
+
<Download />
|
61
|
+
{#if copied}
|
62
|
+
<span class="check" transition:fade><Check /></span>
|
63
|
+
{/if}
|
64
|
+
</DownloadLink>
|
65
|
+
</div>
|
64
66
|
|
65
67
|
<style>
|
66
|
-
|
68
|
+
.container {
|
67
69
|
position: relative;
|
68
70
|
cursor: pointer;
|
69
71
|
padding: 5px;
|
@@ -72,10 +74,6 @@
|
|
72
74
|
height: 22px;
|
73
75
|
}
|
74
76
|
|
75
|
-
.copied {
|
76
|
-
color: var(--color-green-500);
|
77
|
-
}
|
78
|
-
|
79
77
|
.check {
|
80
78
|
position: absolute;
|
81
79
|
top: 0;
|