@gradio/core 0.18.0 → 0.18.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 +27 -0
- package/dist/src/Blocks.svelte +5 -2
- package/dist/src/api_docs/ApiDocs.svelte +17 -17
- package/package.json +49 -49
- package/src/Blocks.svelte +6 -3
- package/src/api_docs/ApiDocs.svelte +18 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @gradio/core
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#11289](https://github.com/gradio-app/gradio/pull/11289) [`1b6bd1e`](https://github.com/gradio-app/gradio/commit/1b6bd1ee5a96541e88b5834784b9acd6bd344187) - Include default values in MCP docs. Thanks @abidlabs!
|
|
8
|
+
|
|
9
|
+
### Fixes
|
|
10
|
+
|
|
11
|
+
- [#11271](https://github.com/gradio-app/gradio/pull/11271) [`ab25fb9`](https://github.com/gradio-app/gradio/commit/ab25fb9adb4e0401a060cdd07c0985483075123c) - Ensure i18n setup is complete when rendering. Thanks @hannahblair!
|
|
12
|
+
|
|
13
|
+
### Dependency updates
|
|
14
|
+
|
|
15
|
+
- @gradio/statustracker@0.10.12
|
|
16
|
+
- @gradio/column@0.2.0
|
|
17
|
+
- @gradio/code@0.14.5
|
|
18
|
+
- @gradio/paramviewer@0.7.10
|
|
19
|
+
- @gradio/client@1.15.1
|
|
20
|
+
- @gradio/button@0.5.1
|
|
21
|
+
- @gradio/upload@0.16.6
|
|
22
|
+
- @gradio/image@0.22.7
|
|
23
|
+
- @gradio/gallery@0.15.20
|
|
24
|
+
- @gradio/plot@0.9.17
|
|
25
|
+
- @gradio/checkbox@0.4.22
|
|
26
|
+
- @gradio/file@0.12.19
|
|
27
|
+
- @gradio/video@0.14.15
|
|
28
|
+
- @gradio/textbox@0.10.12
|
|
29
|
+
|
|
3
30
|
## 0.18.0
|
|
4
31
|
|
|
5
32
|
### Features
|
package/dist/src/Blocks.svelte
CHANGED
|
@@ -36,7 +36,6 @@ export let api_prefix = "";
|
|
|
36
36
|
export let max_file_size = void 0;
|
|
37
37
|
export let initial_layout = void 0;
|
|
38
38
|
export let css = null;
|
|
39
|
-
setupi18n(app.config?.i18n_translations ?? void 0);
|
|
40
39
|
let {
|
|
41
40
|
layout: _layout,
|
|
42
41
|
targets,
|
|
@@ -661,6 +660,10 @@ function screen_recording() {
|
|
|
661
660
|
screen_recorder.startRecording();
|
|
662
661
|
}
|
|
663
662
|
}
|
|
663
|
+
let i18n_ready = false;
|
|
664
|
+
setupi18n(app.config?.i18n_translations ?? void 0).then(() => {
|
|
665
|
+
i18n_ready = true;
|
|
666
|
+
});
|
|
664
667
|
</script>
|
|
665
668
|
|
|
666
669
|
<svelte:head>
|
|
@@ -674,7 +677,7 @@ function screen_recording() {
|
|
|
674
677
|
|
|
675
678
|
<div class="wrap" style:min-height={app_mode ? "100%" : "auto"}>
|
|
676
679
|
<div class="contain" style:flex-grow={app_mode ? "1" : "auto"}>
|
|
677
|
-
{#if $_layout && app.config}
|
|
680
|
+
{#if $_layout && app.config && i18n_ready}
|
|
678
681
|
<MountComponents
|
|
679
682
|
rootNode={$_layout}
|
|
680
683
|
{root}
|
|
@@ -213,24 +213,24 @@ onMount(() => {
|
|
|
213
213
|
<div class="tool-content">
|
|
214
214
|
{#if Object.keys(tool.parameters).length > 0}
|
|
215
215
|
<div class="tool-parameters">
|
|
216
|
-
{#
|
|
217
|
-
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
</
|
|
229
|
-
|
|
230
|
-
{
|
|
231
|
-
<p>No parameters</p>
|
|
232
|
-
{/if}
|
|
216
|
+
{#each Object.entries(tool.parameters) as [name, param]}
|
|
217
|
+
<div class="parameter">
|
|
218
|
+
<code>{name}</code>
|
|
219
|
+
<span class="parameter-type">
|
|
220
|
+
({param.type}{param.default !== undefined
|
|
221
|
+
? `, default: ${JSON.stringify(param.default)}`
|
|
222
|
+
: ""})
|
|
223
|
+
</span>
|
|
224
|
+
<p class="parameter-description">
|
|
225
|
+
{param.description
|
|
226
|
+
? param.description
|
|
227
|
+
: "⚠︎ No description for this parameter in function docstring"}
|
|
228
|
+
</p>
|
|
229
|
+
</div>
|
|
230
|
+
{/each}
|
|
233
231
|
</div>
|
|
232
|
+
{:else}
|
|
233
|
+
<p>Takes no input parameters</p>
|
|
234
234
|
{/if}
|
|
235
235
|
</div>
|
|
236
236
|
{/if}
|
package/package.json
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/core",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@gradio/accordion": "^0.5.
|
|
7
|
-
"@gradio/annotatedimage": "^0.9.
|
|
8
|
-
"@gradio/box": "^0.2.19",
|
|
6
|
+
"@gradio/accordion": "^0.5.16",
|
|
7
|
+
"@gradio/annotatedimage": "^0.9.20",
|
|
9
8
|
"@gradio/atoms": "^0.16.1",
|
|
10
|
-
"@gradio/
|
|
11
|
-
"@gradio/
|
|
12
|
-
"@gradio/
|
|
13
|
-
"@gradio/
|
|
14
|
-
"@gradio/
|
|
15
|
-
"@gradio/
|
|
16
|
-
"@gradio/
|
|
17
|
-
"@gradio/
|
|
9
|
+
"@gradio/box": "^0.2.19",
|
|
10
|
+
"@gradio/audio": "^0.17.15",
|
|
11
|
+
"@gradio/button": "^0.5.1",
|
|
12
|
+
"@gradio/chatbot": "^0.26.9",
|
|
13
|
+
"@gradio/checkbox": "^0.4.22",
|
|
14
|
+
"@gradio/checkboxgroup": "^0.6.22",
|
|
15
|
+
"@gradio/code": "^0.14.5",
|
|
16
|
+
"@gradio/client": "^1.15.1",
|
|
17
|
+
"@gradio/colorpicker": "^0.4.22",
|
|
18
18
|
"@gradio/column": "^0.2.0",
|
|
19
|
-
"@gradio/
|
|
20
|
-
"@gradio/
|
|
21
|
-
"@gradio/
|
|
22
|
-
"@gradio/
|
|
23
|
-
"@gradio/
|
|
24
|
-
"@gradio/
|
|
25
|
-
"@gradio/
|
|
26
|
-
"@gradio/fileexplorer": "^0.5.
|
|
19
|
+
"@gradio/datetime": "^0.3.14",
|
|
20
|
+
"@gradio/dataframe": "^0.17.13",
|
|
21
|
+
"@gradio/dataset": "^0.4.20",
|
|
22
|
+
"@gradio/downloadbutton": "^0.4.1",
|
|
23
|
+
"@gradio/fallback": "^0.4.22",
|
|
24
|
+
"@gradio/file": "^0.12.19",
|
|
25
|
+
"@gradio/dropdown": "^0.9.22",
|
|
26
|
+
"@gradio/fileexplorer": "^0.5.30",
|
|
27
27
|
"@gradio/form": "^0.2.19",
|
|
28
|
-
"@gradio/gallery": "^0.15.19",
|
|
29
28
|
"@gradio/group": "^0.2.0",
|
|
30
|
-
"@gradio/html": "^0.6.13",
|
|
31
|
-
"@gradio/highlightedtext": "^0.9.4",
|
|
32
29
|
"@gradio/icons": "^0.12.0",
|
|
33
|
-
"@gradio/
|
|
34
|
-
"@gradio/
|
|
35
|
-
"@gradio/
|
|
36
|
-
"@gradio/
|
|
30
|
+
"@gradio/gallery": "^0.15.20",
|
|
31
|
+
"@gradio/html": "^0.6.14",
|
|
32
|
+
"@gradio/image": "^0.22.7",
|
|
33
|
+
"@gradio/imageslider": "^0.2.3",
|
|
34
|
+
"@gradio/imageeditor": "^0.15.1",
|
|
35
|
+
"@gradio/highlightedtext": "^0.9.5",
|
|
36
|
+
"@gradio/json": "^0.5.24",
|
|
37
|
+
"@gradio/label": "^0.5.14",
|
|
37
38
|
"@gradio/browserstate": "^0.3.2",
|
|
38
|
-
"@gradio/
|
|
39
|
-
"@gradio/
|
|
40
|
-
"@gradio/
|
|
41
|
-
"@gradio/
|
|
42
|
-
"@gradio/
|
|
43
|
-
"@gradio/
|
|
44
|
-
"@gradio/
|
|
45
|
-
"@gradio/
|
|
46
|
-
"@gradio/
|
|
47
|
-
"@gradio/sidebar": "^0.1.13",
|
|
39
|
+
"@gradio/markdown": "^0.13.14",
|
|
40
|
+
"@gradio/multimodaltextbox": "^0.10.7",
|
|
41
|
+
"@gradio/model3d": "^0.14.15",
|
|
42
|
+
"@gradio/nativeplot": "^0.5.17",
|
|
43
|
+
"@gradio/paramviewer": "^0.7.10",
|
|
44
|
+
"@gradio/plot": "^0.9.17",
|
|
45
|
+
"@gradio/number": "^0.5.22",
|
|
46
|
+
"@gradio/radio": "^0.7.5",
|
|
47
|
+
"@gradio/sidebar": "^0.1.14",
|
|
48
48
|
"@gradio/row": "^0.2.1",
|
|
49
|
-
"@gradio/
|
|
50
|
-
"@gradio/
|
|
51
|
-
"@gradio/
|
|
52
|
-
"@gradio/
|
|
49
|
+
"@gradio/simpleimage": "^0.8.30",
|
|
50
|
+
"@gradio/simpledropdown": "^0.3.22",
|
|
51
|
+
"@gradio/simpletextbox": "^0.3.22",
|
|
52
|
+
"@gradio/sketchbox": "^0.6.9",
|
|
53
|
+
"@gradio/slider": "^0.6.11",
|
|
54
|
+
"@gradio/statustracker": "^0.10.12",
|
|
53
55
|
"@gradio/state": "^0.1.2",
|
|
54
|
-
"@gradio/sketchbox": "^0.6.8",
|
|
55
|
-
"@gradio/statustracker": "^0.10.11",
|
|
56
56
|
"@gradio/tabitem": "^0.4.4",
|
|
57
57
|
"@gradio/tabs": "^0.4.4",
|
|
58
|
-
"@gradio/textbox": "^0.10.11",
|
|
59
|
-
"@gradio/timer": "^0.4.5",
|
|
60
58
|
"@gradio/theme": "^0.4.0",
|
|
61
|
-
"@gradio/upload": "^0.16.
|
|
62
|
-
"@gradio/
|
|
63
|
-
"@gradio/
|
|
59
|
+
"@gradio/upload": "^0.16.6",
|
|
60
|
+
"@gradio/textbox": "^0.10.12",
|
|
61
|
+
"@gradio/timer": "^0.4.5",
|
|
64
62
|
"@gradio/utils": "^0.10.2",
|
|
65
|
-
"@gradio/
|
|
63
|
+
"@gradio/video": "^0.14.15",
|
|
64
|
+
"@gradio/wasm": "^0.18.1",
|
|
65
|
+
"@gradio/uploadbutton": "^0.9.1"
|
|
66
66
|
},
|
|
67
67
|
"msw": {
|
|
68
68
|
"workerDirectory": "public"
|
package/src/Blocks.svelte
CHANGED
|
@@ -53,8 +53,6 @@
|
|
|
53
53
|
export let initial_layout: ComponentMeta | undefined = undefined;
|
|
54
54
|
export let css: string | null | undefined = null;
|
|
55
55
|
|
|
56
|
-
setupi18n(app.config?.i18n_translations ?? undefined);
|
|
57
|
-
|
|
58
56
|
let {
|
|
59
57
|
layout: _layout,
|
|
60
58
|
targets,
|
|
@@ -833,6 +831,11 @@
|
|
|
833
831
|
screen_recorder.startRecording();
|
|
834
832
|
}
|
|
835
833
|
}
|
|
834
|
+
|
|
835
|
+
let i18n_ready = false;
|
|
836
|
+
setupi18n(app.config?.i18n_translations ?? undefined).then(() => {
|
|
837
|
+
i18n_ready = true;
|
|
838
|
+
});
|
|
836
839
|
</script>
|
|
837
840
|
|
|
838
841
|
<svelte:head>
|
|
@@ -846,7 +849,7 @@
|
|
|
846
849
|
|
|
847
850
|
<div class="wrap" style:min-height={app_mode ? "100%" : "auto"}>
|
|
848
851
|
<div class="contain" style:flex-grow={app_mode ? "1" : "auto"}>
|
|
849
|
-
{#if $_layout && app.config}
|
|
852
|
+
{#if $_layout && app.config && i18n_ready}
|
|
850
853
|
<MountComponents
|
|
851
854
|
rootNode={$_layout}
|
|
852
855
|
{root}
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
type: string;
|
|
102
102
|
description: string;
|
|
103
103
|
format?: string;
|
|
104
|
+
default?: any;
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
interface Tool {
|
|
@@ -267,24 +268,24 @@
|
|
|
267
268
|
<div class="tool-content">
|
|
268
269
|
{#if Object.keys(tool.parameters).length > 0}
|
|
269
270
|
<div class="tool-parameters">
|
|
270
|
-
{#
|
|
271
|
-
|
|
272
|
-
<
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
</
|
|
283
|
-
|
|
284
|
-
{
|
|
285
|
-
<p>No parameters</p>
|
|
286
|
-
{/if}
|
|
271
|
+
{#each Object.entries(tool.parameters) as [name, param]}
|
|
272
|
+
<div class="parameter">
|
|
273
|
+
<code>{name}</code>
|
|
274
|
+
<span class="parameter-type">
|
|
275
|
+
({param.type}{param.default !== undefined
|
|
276
|
+
? `, default: ${JSON.stringify(param.default)}`
|
|
277
|
+
: ""})
|
|
278
|
+
</span>
|
|
279
|
+
<p class="parameter-description">
|
|
280
|
+
{param.description
|
|
281
|
+
? param.description
|
|
282
|
+
: "⚠︎ No description for this parameter in function docstring"}
|
|
283
|
+
</p>
|
|
284
|
+
</div>
|
|
285
|
+
{/each}
|
|
287
286
|
</div>
|
|
287
|
+
{:else}
|
|
288
|
+
<p>Takes no input parameters</p>
|
|
288
289
|
{/if}
|
|
289
290
|
</div>
|
|
290
291
|
{/if}
|