@gradio/code 0.2.9 → 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 +7 -1
- package/package.json +7 -6
- package/shared/Download.svelte +14 -16
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
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
|
+
|
3
9
|
## 0.2.9
|
4
10
|
|
5
11
|
### Patch Changes
|
@@ -195,4 +201,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
|
|
195
201
|
|
196
202
|
- Updated dependencies []:
|
197
203
|
- @gradio/atoms@0.0.2
|
198
|
-
- @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/icons": "^0.3.
|
31
|
-
"@gradio/atoms": "^0.
|
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;
|