@gradio/dataframe 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 +65 -0
- package/Index.svelte +4 -0
- package/package.json +11 -7
- package/shared/Table.svelte +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
# @gradio/dataframe
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#8121](https://github.com/gradio-app/gradio/pull/8121) [`f5b710c`](https://github.com/gradio-app/gradio/commit/f5b710c919b0ce604ea955f0d5f4faa91095ca4a) - chore(deps): update dependency eslint to v9. Thanks @renovate!
|
|
8
|
+
- [#8209](https://github.com/gradio-app/gradio/pull/8209) [`b9afe93`](https://github.com/gradio-app/gradio/commit/b9afe93915401df5bd6737c89395c2477acfa585) - Rename `eventSource_Factory` and `fetch_implementation`. Thanks @hannahblair!
|
|
9
|
+
|
|
10
|
+
### Fixes
|
|
11
|
+
|
|
12
|
+
- [#8179](https://github.com/gradio-app/gradio/pull/8179) [`6a218b4`](https://github.com/gradio-app/gradio/commit/6a218b4148095aaa0c58d8c20973ba01c8764fc2) - rework upload to be a class method + pass client into each component. Thanks @pngwn!
|
|
13
|
+
|
|
14
|
+
### Dependency updates
|
|
15
|
+
|
|
16
|
+
- @gradio/atoms@0.7.2
|
|
17
|
+
- @gradio/client@0.18.0
|
|
18
|
+
- @gradio/upload@0.10.0
|
|
19
|
+
- @gradio/utils@0.4.1
|
|
20
|
+
- @gradio/statustracker@0.5.1
|
|
21
|
+
- @gradio/button@0.2.33
|
|
22
|
+
- @gradio/markdown@0.7.1
|
|
23
|
+
|
|
24
|
+
## 0.7.0
|
|
25
|
+
|
|
26
|
+
### Highlights
|
|
27
|
+
|
|
28
|
+
#### Setting File Upload Limits ([#7909](https://github.com/gradio-app/gradio/pull/7909) [`2afca65`](https://github.com/gradio-app/gradio/commit/2afca6541912b37dc84f447c7ad4af21607d7c72))
|
|
29
|
+
|
|
30
|
+
We have added a `max_file_size` size parameter to `launch()` that limits to size of files uploaded to the server. This limit applies to each individual file. This parameter can be specified as a string or an integer (corresponding to the size in bytes).
|
|
31
|
+
|
|
32
|
+
The following code snippet sets a max file size of 5 megabytes.
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
import gradio as gr
|
|
36
|
+
|
|
37
|
+
demo = gr.Interface(lambda x: x, "image", "image")
|
|
38
|
+
|
|
39
|
+
demo.launch(max_file_size="5mb")
|
|
40
|
+
# or
|
|
41
|
+
demo.launch(max_file_size=5 * gr.FileSize.MB)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
#### Error states can now be cleared
|
|
48
|
+
|
|
49
|
+
When a component encounters an error, the error state shown in the UI can now be cleared by clicking on the `x` icon in the top right of the component. This applies to all types of errors, whether it's raised in the UI or the server.
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
Thanks @freddyaboulton!
|
|
54
|
+
|
|
55
|
+
### Fixes
|
|
56
|
+
|
|
57
|
+
- [#8066](https://github.com/gradio-app/gradio/pull/8066) [`624f9b9`](https://github.com/gradio-app/gradio/commit/624f9b9477f74a581a6c14119234f9efdfcda398) - make gradio dev tools a local dependency rather than bundling. Thanks @pngwn!
|
|
58
|
+
|
|
59
|
+
### Dependency updates
|
|
60
|
+
|
|
61
|
+
- @gradio/atoms@0.7.1
|
|
62
|
+
- @gradio/button@0.2.32
|
|
63
|
+
- @gradio/markdown@0.7.0
|
|
64
|
+
- @gradio/statustracker@0.5.0
|
|
65
|
+
- @gradio/upload@0.9.0
|
|
66
|
+
- @gradio/utils@0.4.0
|
|
67
|
+
|
|
3
68
|
## 0.6.13
|
|
4
69
|
|
|
5
70
|
### Dependency updates
|
package/Index.svelte
CHANGED
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
change: never;
|
|
39
39
|
select: SelectData;
|
|
40
40
|
input: never;
|
|
41
|
+
clear_status: LoadingStatus;
|
|
41
42
|
}>;
|
|
42
43
|
export let latex_delimiters: {
|
|
43
44
|
left: string;
|
|
@@ -127,6 +128,7 @@
|
|
|
127
128
|
autoscroll={gradio.autoscroll}
|
|
128
129
|
i18n={gradio.i18n}
|
|
129
130
|
{...loading_status}
|
|
131
|
+
on:clear_status={() => gradio.dispatch("clear_status", loading_status)}
|
|
130
132
|
/>
|
|
131
133
|
<Table
|
|
132
134
|
{root}
|
|
@@ -148,5 +150,7 @@
|
|
|
148
150
|
i18n={gradio.i18n}
|
|
149
151
|
{line_breaks}
|
|
150
152
|
{column_widths}
|
|
153
|
+
upload={gradio.client.upload}
|
|
154
|
+
stream_handler={gradio.client.stream_factory}
|
|
151
155
|
/>
|
|
152
156
|
</Block>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/dataframe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -17,16 +17,20 @@
|
|
|
17
17
|
"dompurify": "^3.0.3",
|
|
18
18
|
"katex": "^0.16.7",
|
|
19
19
|
"marked": "^12.0.0",
|
|
20
|
-
"@gradio/atoms": "^0.7.
|
|
21
|
-
"@gradio/button": "^0.2.
|
|
22
|
-
"@gradio/
|
|
23
|
-
"@gradio/
|
|
24
|
-
"@gradio/
|
|
25
|
-
"@gradio/utils": "^0.
|
|
20
|
+
"@gradio/atoms": "^0.7.2",
|
|
21
|
+
"@gradio/button": "^0.2.33",
|
|
22
|
+
"@gradio/client": "^0.18.0",
|
|
23
|
+
"@gradio/markdown": "^0.7.1",
|
|
24
|
+
"@gradio/statustracker": "^0.5.1",
|
|
25
|
+
"@gradio/utils": "^0.4.1",
|
|
26
|
+
"@gradio/upload": "^0.10.0"
|
|
26
27
|
},
|
|
27
28
|
"exports": {
|
|
28
29
|
".": "./Index.svelte",
|
|
29
30
|
"./example": "./Example.svelte",
|
|
30
31
|
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@gradio/preview": "^0.9.0"
|
|
31
35
|
}
|
|
32
36
|
}
|
package/shared/Table.svelte
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import EditableCell from "./EditableCell.svelte";
|
|
9
9
|
import type { SelectData } from "@gradio/utils";
|
|
10
10
|
import type { I18nFormatter } from "js/app/src/gradio_helper";
|
|
11
|
+
import { type Client } from "@gradio/client";
|
|
11
12
|
import VirtualTable from "./VirtualTable.svelte";
|
|
12
13
|
import type {
|
|
13
14
|
Headers,
|
|
@@ -38,6 +39,8 @@
|
|
|
38
39
|
export let height = 500;
|
|
39
40
|
export let line_breaks = true;
|
|
40
41
|
export let column_widths: string[] = [];
|
|
42
|
+
export let upload: Client["upload"];
|
|
43
|
+
export let stream_handler: Client["stream_factory"];
|
|
41
44
|
|
|
42
45
|
let selected: false | [number, number] = false;
|
|
43
46
|
export let display_value: string[][] | null = null;
|
|
@@ -113,8 +116,8 @@
|
|
|
113
116
|
row_count[1] === "fixed"
|
|
114
117
|
? row_count[0]
|
|
115
118
|
: data_row_length < row_count[0]
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
? row_count[0]
|
|
120
|
+
: data_row_length
|
|
118
121
|
)
|
|
119
122
|
.fill(0)
|
|
120
123
|
.map((_, i) =>
|
|
@@ -122,8 +125,8 @@
|
|
|
122
125
|
col_count[1] === "fixed"
|
|
123
126
|
? col_count[0]
|
|
124
127
|
: data_row_length > 0
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
? _values[0].length
|
|
129
|
+
: headers.length
|
|
127
130
|
)
|
|
128
131
|
.fill(0)
|
|
129
132
|
.map((_, j) => {
|
|
@@ -722,6 +725,8 @@
|
|
|
722
725
|
</tbody>
|
|
723
726
|
</table>
|
|
724
727
|
<Upload
|
|
728
|
+
{upload}
|
|
729
|
+
{stream_handler}
|
|
725
730
|
flex={false}
|
|
726
731
|
center={false}
|
|
727
732
|
boundedheight={false}
|