@gradio/code 0.2.9 → 0.3.1

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,18 @@
1
1
  # @gradio/code
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`5d51fbc`](https://github.com/gradio-app/gradio/commit/5d51fbce7826da840a2fd4940feb5d9ad6f1bc5a)]:
8
+ - @gradio/upload@0.5.4
9
+
10
+ ## 0.3.0
11
+
12
+ ### Features
13
+
14
+ - [#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)!
15
+
3
16
  ## 0.2.9
4
17
 
5
18
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/code",
3
- "version": "0.2.9",
3
+ "version": "0.3.1",
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.1",
31
- "@gradio/atoms": "^0.3.1",
32
- "@gradio/statustracker": "^0.4.1",
33
- "@gradio/upload": "^0.5.2",
34
- "@gradio/utils": "^0.2.0"
30
+ "@gradio/atoms": "^0.4.0",
31
+ "@gradio/icons": "^0.3.2",
32
+ "@gradio/upload": "^0.5.4",
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",
@@ -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
- <a
54
- download="file.{ext}"
55
- href={download_value}
56
- class:copied
57
- on:click={copy_feedback}
58
- >
59
- <Download />
60
- {#if copied}
61
- <span class="check" transition:fade><Check /></span>
62
- {/if}
63
- </a>
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
- a {
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;