@gradio/core 0.2.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 +73 -0
- package/dist/src/Blocks.svelte +1 -1
- package/dist/src/api_docs/ApiDocs.svelte +1 -0
- package/dist/src/api_docs/RecordingSnippet.svelte +5 -3
- package/dist/src/api_docs/RecordingSnippet.svelte.d.ts +1 -0
- package/dist/src/init.js +1 -2
- package/package.json +52 -51
- package/src/Blocks.svelte +1 -1
- package/src/api_docs/ApiDocs.svelte +1 -0
- package/src/api_docs/RecordingSnippet.svelte +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,78 @@
|
|
|
1
1
|
# @gradio/core
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#9950](https://github.com/gradio-app/gradio/pull/9950) [`fc06fe4`](https://github.com/gradio-app/gradio/commit/fc06fe41f015678a0545f4e5c99f6ae2704f0031) - Add ability to read and write from LocalStorage. Thanks @abidlabs!
|
|
8
|
+
|
|
9
|
+
### Dependency updates
|
|
10
|
+
|
|
11
|
+
- @gradio/video@0.11.8
|
|
12
|
+
- @gradio/atoms@0.11.1
|
|
13
|
+
- @gradio/code@0.10.8
|
|
14
|
+
- @gradio/paramviewer@0.5.7
|
|
15
|
+
- @gradio/tabitem@0.3.4
|
|
16
|
+
- @gradio/tabs@0.3.4
|
|
17
|
+
- @gradio/client@1.8.0
|
|
18
|
+
- @gradio/utils@0.8.0
|
|
19
|
+
- @gradio/button@0.3.7
|
|
20
|
+
- @gradio/upload@0.14.1
|
|
21
|
+
- @gradio/statustracker@0.9.5
|
|
22
|
+
- @gradio/gallery@0.13.8
|
|
23
|
+
- @gradio/plot@0.9.2
|
|
24
|
+
- @gradio/image@0.16.8
|
|
25
|
+
- @gradio/file@0.11.1
|
|
26
|
+
- @gradio/checkbox@0.4.7
|
|
27
|
+
- @gradio/textbox@0.8.6
|
|
28
|
+
- @gradio/column@0.2.0
|
|
29
|
+
|
|
30
|
+
## 0.3.0
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
- [#9786](https://github.com/gradio-app/gradio/pull/9786) [`f109497`](https://github.com/gradio-app/gradio/commit/f109497e8281b3429b58e3f6a293dd63ebcc08af) - Fix frontend errors on ApiDocs and RecordingSnippet. Thanks @whitphx!
|
|
35
|
+
|
|
36
|
+
### Dependency updates
|
|
37
|
+
|
|
38
|
+
- @gradio/code@0.10.7
|
|
39
|
+
- @gradio/paramviewer@0.5.6
|
|
40
|
+
- @gradio/video@0.11.7
|
|
41
|
+
- @gradio/statustracker@0.9.4
|
|
42
|
+
- @gradio/button@0.3.6
|
|
43
|
+
- @gradio/atoms@0.11.0
|
|
44
|
+
- @gradio/column@0.2.0
|
|
45
|
+
- @gradio/file@0.11.0
|
|
46
|
+
- @gradio/upload@0.14.0
|
|
47
|
+
- @gradio/checkbox@0.4.6
|
|
48
|
+
- @gradio/wasm@0.15.0
|
|
49
|
+
- @gradio/image@0.16.7
|
|
50
|
+
- @gradio/gallery@0.13.7
|
|
51
|
+
- @gradio/plot@0.9.1
|
|
52
|
+
- @gradio/textbox@0.8.5
|
|
53
|
+
|
|
54
|
+
## 0.2.1
|
|
55
|
+
|
|
56
|
+
### Dependency updates
|
|
57
|
+
|
|
58
|
+
- @gradio/video@0.11.6
|
|
59
|
+
- @gradio/statustracker@0.9.3
|
|
60
|
+
- @gradio/atoms@0.10.1
|
|
61
|
+
- @gradio/client@1.7.1
|
|
62
|
+
- @gradio/image@0.16.6
|
|
63
|
+
- @gradio/upload@0.13.5
|
|
64
|
+
- @gradio/plot@0.9.0
|
|
65
|
+
- @gradio/gallery@0.13.6
|
|
66
|
+
- @gradio/tabs@0.3.3
|
|
67
|
+
- @gradio/tabitem@0.3.3
|
|
68
|
+
- @gradio/code@0.10.6
|
|
69
|
+
- @gradio/paramviewer@0.5.5
|
|
70
|
+
- @gradio/button@0.3.5
|
|
71
|
+
- @gradio/textbox@0.8.4
|
|
72
|
+
- @gradio/column@0.2.0
|
|
73
|
+
- @gradio/checkbox@0.4.5
|
|
74
|
+
- @gradio/file@0.10.6
|
|
75
|
+
|
|
3
76
|
## 0.2.1
|
|
4
77
|
|
|
5
78
|
### Fixes
|
package/dist/src/Blocks.svelte
CHANGED
|
@@ -651,7 +651,7 @@ onMount(() => {
|
|
|
651
651
|
on:close={(event) => {
|
|
652
652
|
set_api_docs_visible(false);
|
|
653
653
|
api_calls = [];
|
|
654
|
-
api_recorder_visible = event.detail
|
|
654
|
+
api_recorder_visible = event.detail?.api_recorder_visible;
|
|
655
655
|
}}
|
|
656
656
|
{dependencies}
|
|
657
657
|
{root}
|
|
@@ -5,6 +5,7 @@ import { onMount, tick } from "svelte";
|
|
|
5
5
|
export let dependencies;
|
|
6
6
|
export let short_root;
|
|
7
7
|
export let root;
|
|
8
|
+
export let api_prefix = "";
|
|
8
9
|
export let current_language;
|
|
9
10
|
export let username;
|
|
10
11
|
let python_code;
|
|
@@ -13,7 +14,9 @@ let js_code;
|
|
|
13
14
|
let bash_code;
|
|
14
15
|
export let api_calls = [];
|
|
15
16
|
async function get_info() {
|
|
16
|
-
let response = await fetch(
|
|
17
|
+
let response = await fetch(
|
|
18
|
+
root.replace(/\/$/, "") + api_prefix + "/info/?all_endpoints=true"
|
|
19
|
+
);
|
|
17
20
|
let data = await response.json();
|
|
18
21
|
return data;
|
|
19
22
|
}
|
|
@@ -146,8 +149,7 @@ const app = await Client.connect(<span class="token string">"{short_root}"</span
|
|
|
146
149
|
await client.predict(<span
|
|
147
150
|
class="api-name">
|
|
148
151
|
"/{api_name}"</span
|
|
149
|
-
>{#if call},
|
|
150
|
-
{/if}{call});
|
|
152
|
+
>{#if call}, {call}{/if});
|
|
151
153
|
{/each}</pre>
|
|
152
154
|
</div>
|
|
153
155
|
</code>
|
package/dist/src/init.js
CHANGED
|
@@ -148,10 +148,9 @@ export function create_components(initial_layout) {
|
|
|
148
148
|
}
|
|
149
149
|
if (instance.type === "tabs" && !instance.props.initial_tabs) {
|
|
150
150
|
const tab_items_props = node.children?.map((c) => {
|
|
151
|
-
var _a;
|
|
152
151
|
const instance = instance_map[c.id];
|
|
153
152
|
// console.log("tabs", JSON.stringify(instance.props, null, 2));
|
|
154
|
-
|
|
153
|
+
instance.props.id ??= c.id;
|
|
155
154
|
return {
|
|
156
155
|
type: instance.type,
|
|
157
156
|
props: {
|
package/package.json
CHANGED
|
@@ -1,64 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@gradio/accordion": "^0.
|
|
7
|
-
"@gradio/annotatedimage": "^0.8.
|
|
8
|
-
"@gradio/
|
|
9
|
-
"@gradio/
|
|
10
|
-
"@gradio/
|
|
11
|
-
"@gradio/
|
|
12
|
-
"@gradio/
|
|
13
|
-
"@gradio/checkboxgroup": "^0.6.
|
|
14
|
-
"@gradio/
|
|
15
|
-
"@gradio/client": "^1.
|
|
6
|
+
"@gradio/accordion": "^0.5.1",
|
|
7
|
+
"@gradio/annotatedimage": "^0.8.8",
|
|
8
|
+
"@gradio/atoms": "^0.11.1",
|
|
9
|
+
"@gradio/audio": "^0.14.8",
|
|
10
|
+
"@gradio/button": "^0.3.7",
|
|
11
|
+
"@gradio/checkbox": "^0.4.7",
|
|
12
|
+
"@gradio/box": "^0.2.6",
|
|
13
|
+
"@gradio/checkboxgroup": "^0.6.7",
|
|
14
|
+
"@gradio/chatbot": "^0.16.3",
|
|
15
|
+
"@gradio/client": "^1.8.0",
|
|
16
|
+
"@gradio/code": "^0.10.8",
|
|
16
17
|
"@gradio/column": "^0.2.0",
|
|
17
|
-
"@gradio/colorpicker": "^0.4.
|
|
18
|
-
"@gradio/
|
|
19
|
-
"@gradio/
|
|
20
|
-
"@gradio/
|
|
21
|
-
"@gradio/
|
|
22
|
-
"@gradio/
|
|
23
|
-
"@gradio/
|
|
24
|
-
"@gradio/
|
|
25
|
-
"@gradio/fileexplorer": "^0.5.
|
|
26
|
-
"@gradio/
|
|
27
|
-
"@gradio/
|
|
28
|
-
"@gradio/gallery": "^0.13.5",
|
|
18
|
+
"@gradio/colorpicker": "^0.4.7",
|
|
19
|
+
"@gradio/dataframe": "^0.12.3",
|
|
20
|
+
"@gradio/dataset": "^0.3.9",
|
|
21
|
+
"@gradio/datetime": "^0.2.7",
|
|
22
|
+
"@gradio/downloadbutton": "^0.2.7",
|
|
23
|
+
"@gradio/dropdown": "^0.9.5",
|
|
24
|
+
"@gradio/fallback": "^0.4.7",
|
|
25
|
+
"@gradio/file": "^0.11.1",
|
|
26
|
+
"@gradio/fileexplorer": "^0.5.8",
|
|
27
|
+
"@gradio/form": "^0.2.6",
|
|
28
|
+
"@gradio/gallery": "^0.13.8",
|
|
29
29
|
"@gradio/group": "^0.2.0",
|
|
30
|
-
"@gradio/highlightedtext": "^0.8.
|
|
31
|
-
"@gradio/html": "^0.4.
|
|
32
|
-
"@gradio/image": "^0.16.5",
|
|
30
|
+
"@gradio/highlightedtext": "^0.8.7",
|
|
31
|
+
"@gradio/html": "^0.4.7",
|
|
33
32
|
"@gradio/icons": "^0.8.1",
|
|
34
|
-
"@gradio/
|
|
35
|
-
"@gradio/imageeditor": "^0.11.
|
|
36
|
-
"@gradio/label": "^0.4.
|
|
37
|
-
"@gradio/
|
|
38
|
-
"@gradio/
|
|
39
|
-
"@gradio/
|
|
40
|
-
"@gradio/
|
|
41
|
-
"@gradio/
|
|
42
|
-
"@gradio/
|
|
33
|
+
"@gradio/image": "^0.16.8",
|
|
34
|
+
"@gradio/imageeditor": "^0.11.8",
|
|
35
|
+
"@gradio/label": "^0.4.7",
|
|
36
|
+
"@gradio/browserstate": "^0.2.0",
|
|
37
|
+
"@gradio/json": "^0.5.7",
|
|
38
|
+
"@gradio/markdown": "^0.11.3",
|
|
39
|
+
"@gradio/model3d": "^0.13.8",
|
|
40
|
+
"@gradio/multimodaltextbox": "^0.7.6",
|
|
41
|
+
"@gradio/number": "^0.5.7",
|
|
42
|
+
"@gradio/nativeplot": "^0.5.1",
|
|
43
|
+
"@gradio/paramviewer": "^0.5.7",
|
|
44
|
+
"@gradio/radio": "^0.6.7",
|
|
45
|
+
"@gradio/plot": "^0.9.2",
|
|
46
|
+
"@gradio/simpledropdown": "^0.3.7",
|
|
43
47
|
"@gradio/row": "^0.2.0",
|
|
44
|
-
"@gradio/
|
|
45
|
-
"@gradio/
|
|
46
|
-
"@gradio/
|
|
47
|
-
"@gradio/
|
|
48
|
-
"@gradio/simpletextbox": "^0.3.4",
|
|
49
|
-
"@gradio/slider": "^0.5.4",
|
|
48
|
+
"@gradio/simpleimage": "^0.8.8",
|
|
49
|
+
"@gradio/simpletextbox": "^0.3.7",
|
|
50
|
+
"@gradio/slider": "^0.5.7",
|
|
51
|
+
"@gradio/statustracker": "^0.9.5",
|
|
50
52
|
"@gradio/state": "^0.1.2",
|
|
51
|
-
"@gradio/tabitem": "^0.3.
|
|
52
|
-
"@gradio/tabs": "^0.3.
|
|
53
|
-
"@gradio/textbox": "^0.8.3",
|
|
53
|
+
"@gradio/tabitem": "^0.3.4",
|
|
54
|
+
"@gradio/tabs": "^0.3.4",
|
|
54
55
|
"@gradio/theme": "^0.3.0",
|
|
55
|
-
"@gradio/
|
|
56
|
-
"@gradio/
|
|
57
|
-
"@gradio/
|
|
58
|
-
"@gradio/
|
|
59
|
-
"@gradio/
|
|
60
|
-
"@gradio/video": "^0.11.
|
|
61
|
-
"@gradio/wasm": "^0.
|
|
56
|
+
"@gradio/textbox": "^0.8.6",
|
|
57
|
+
"@gradio/timer": "^0.4.1",
|
|
58
|
+
"@gradio/upload": "^0.14.1",
|
|
59
|
+
"@gradio/utils": "^0.8.0",
|
|
60
|
+
"@gradio/uploadbutton": "^0.7.7",
|
|
61
|
+
"@gradio/video": "^0.11.8",
|
|
62
|
+
"@gradio/wasm": "^0.15.0"
|
|
62
63
|
},
|
|
63
64
|
"msw": {
|
|
64
65
|
"workerDirectory": "public"
|
package/src/Blocks.svelte
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export let dependencies: Dependency[];
|
|
9
9
|
export let short_root: string;
|
|
10
10
|
export let root: string;
|
|
11
|
+
export let api_prefix = "";
|
|
11
12
|
export let current_language: "python" | "javascript" | "bash";
|
|
12
13
|
export let username: string | null;
|
|
13
14
|
|
|
@@ -22,7 +23,9 @@
|
|
|
22
23
|
named_endpoints: any;
|
|
23
24
|
unnamed_endpoints: any;
|
|
24
25
|
}> {
|
|
25
|
-
let response = await fetch(
|
|
26
|
+
let response = await fetch(
|
|
27
|
+
root.replace(/\/$/, "") + api_prefix + "/info/?all_endpoints=true"
|
|
28
|
+
);
|
|
26
29
|
let data = await response.json();
|
|
27
30
|
return data;
|
|
28
31
|
}
|
|
@@ -160,8 +163,7 @@ const app = await Client.connect(<span class="token string">"{short_root}"</span
|
|
|
160
163
|
await client.predict(<span
|
|
161
164
|
class="api-name">
|
|
162
165
|
"/{api_name}"</span
|
|
163
|
-
>{#if call},
|
|
164
|
-
{/if}{call});
|
|
166
|
+
>{#if call}, {call}{/if});
|
|
165
167
|
{/each}</pre>
|
|
166
168
|
</div>
|
|
167
169
|
</code>
|