@gradio/code 0.6.13 → 0.8.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,32 @@
1
1
  # @gradio/code
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Features
6
+
7
+ - [#8804](https://github.com/gradio-app/gradio/pull/8804) [`1d09925`](https://github.com/gradio-app/gradio/commit/1d09925469a5f96e8d3a972a28841903fa1c7265) - Fix Lite's <Playground />. Thanks @whitphx!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/wasm@0.12.0
12
+ - @gradio/statustracker@0.7.2
13
+ - @gradio/upload@0.12.0
14
+ - @gradio/atoms@0.7.7
15
+
16
+ ## 0.7.0
17
+
18
+ ### Features
19
+
20
+ - [#8665](https://github.com/gradio-app/gradio/pull/8665) [`3b8238c`](https://github.com/gradio-app/gradio/commit/3b8238c2e222a6537b19b8901198b7e369e8319a) - Add c/cpp code support. Thanks @ginazhouhuiwu!
21
+
22
+ ### Dependency updates
23
+
24
+ - @gradio/atoms@0.7.6
25
+ - @gradio/utils@0.5.1
26
+ - @gradio/statustracker@0.7.1
27
+ - @gradio/upload@0.11.5
28
+ - @gradio/icons@0.6.0
29
+
3
30
  ## 0.6.13
4
31
 
5
32
  ### Dependency updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/code",
3
- "version": "0.6.13",
3
+ "version": "0.8.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -27,12 +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/atoms": "^0.7.5",
31
- "@gradio/statustracker": "^0.7.0",
32
- "@gradio/utils": "^0.5.0",
33
- "@gradio/upload": "^0.11.4",
34
- "@gradio/icons": "^0.5.0",
35
- "@gradio/wasm": "^0.11.0"
30
+ "@gradio/atoms": "^0.7.7",
31
+ "@gradio/statustracker": "^0.7.2",
32
+ "@gradio/icons": "^0.6.0",
33
+ "@gradio/utils": "^0.5.1",
34
+ "@gradio/wasm": "^0.12.0",
35
+ "@gradio/upload": "^0.12.0"
36
36
  },
37
37
  "main_changeset": true,
38
38
  "main": "./Index.svelte",
@@ -42,6 +42,6 @@
42
42
  "./package.json": "./package.json"
43
43
  },
44
44
  "devDependencies": {
45
- "@gradio/preview": "^0.10.0"
45
+ "@gradio/preview": "^0.10.1"
46
46
  }
47
47
  }
@@ -41,7 +41,7 @@
41
41
  lang_extension = ext;
42
42
  }
43
43
 
44
- $: reconfigure(), lang_extension;
44
+ $: reconfigure(), lang_extension, readonly;
45
45
  $: set_doc(value);
46
46
  $: update_lines();
47
47
 
@@ -27,7 +27,9 @@
27
27
  dockerfile: "dockerfile",
28
28
  sh: "sh",
29
29
  shell: "sh",
30
- r: "r"
30
+ r: "r",
31
+ c: "c",
32
+ cpp: "cpp"
31
33
  };
32
34
 
33
35
  return exts[type] || "txt";
@@ -1,9 +1,12 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import { StreamLanguage } from "@codemirror/language";
3
3
  import { sql } from "@codemirror/legacy-modes/mode/sql";
4
+ import { _ } from "svelte-i18n";
4
5
 
5
6
  const possible_langs = [
6
7
  "python",
8
+ "c",
9
+ "cpp",
7
10
  "markdown",
8
11
  "json",
9
12
  "html",
@@ -35,6 +38,14 @@ const sql_dialects = [
35
38
 
36
39
  const lang_map: Record<string, (() => Promise<Extension>) | undefined> = {
37
40
  python: () => import("@codemirror/lang-python").then((m) => m.python()),
41
+ c: () =>
42
+ import("@codemirror/legacy-modes/mode/clike").then((m) =>
43
+ StreamLanguage.define(m.c)
44
+ ),
45
+ cpp: () =>
46
+ import("@codemirror/legacy-modes/mode/clike").then((m) =>
47
+ StreamLanguage.define(m.cpp)
48
+ ),
38
49
  markdown: async () => {
39
50
  const [md, frontmatter] = await Promise.all([
40
51
  import("@codemirror/lang-markdown"),