@gradio/dataset 0.1.25 → 0.1.27
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 +22 -0
- package/Index.svelte +16 -14
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# @gradio/dataset
|
2
2
|
|
3
|
+
## 0.1.27
|
4
|
+
|
5
|
+
### Fixes
|
6
|
+
|
7
|
+
- [#7761](https://github.com/gradio-app/gradio/pull/7761) [`ca42748`](https://github.com/gradio-app/gradio/commit/ca42748590536e1d940b44ec7c9b6ea402905707) - Ensure `paginate` updates when samples value changes in `Dataset`. Thanks @hannahblair!
|
8
|
+
|
9
|
+
### Dependency updates
|
10
|
+
|
11
|
+
- @gradio/upload@0.8.1
|
12
|
+
- @gradio/atoms@0.6.0
|
13
|
+
|
14
|
+
## 0.1.26
|
15
|
+
|
16
|
+
### Fixes
|
17
|
+
|
18
|
+
- [#7564](https://github.com/gradio-app/gradio/pull/7564) [`5d1e8da`](https://github.com/gradio-app/gradio/commit/5d1e8dae5ac23f605c3b5f41dbe18751dff380a0) - batch UI updates on a per frame basis. Thanks @pngwn!
|
19
|
+
|
20
|
+
### Dependency updates
|
21
|
+
|
22
|
+
- @gradio/client@0.14.0
|
23
|
+
- @gradio/upload@0.8.0
|
24
|
+
|
3
25
|
## 0.1.25
|
4
26
|
|
5
27
|
### Dependency updates
|
package/Index.svelte
CHANGED
@@ -7,8 +7,7 @@
|
|
7
7
|
export let component_map: Map<
|
8
8
|
string,
|
9
9
|
Promise<{
|
10
|
-
|
11
|
-
component: { default: ComponentType<SvelteComponent> };
|
10
|
+
default: ComponentType<SvelteComponent>;
|
12
11
|
}>
|
13
12
|
>;
|
14
13
|
export let label = "Examples";
|
@@ -46,11 +45,13 @@
|
|
46
45
|
function handle_mouseenter(i: number): void {
|
47
46
|
current_hover = i;
|
48
47
|
}
|
48
|
+
|
49
49
|
function handle_mouseleave(): void {
|
50
50
|
current_hover = -1;
|
51
51
|
}
|
52
52
|
|
53
53
|
$: {
|
54
|
+
paginate = samples.length > samples_per_page;
|
54
55
|
if (paginate) {
|
55
56
|
visible_pages = [];
|
56
57
|
selected_samples = samples.slice(
|
@@ -83,18 +84,19 @@
|
|
83
84
|
|
84
85
|
async function get_component_meta(selected_samples: any[][]): Promise<void> {
|
85
86
|
component_meta = await Promise.all(
|
86
|
-
selected_samples
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
87
|
+
selected_samples &&
|
88
|
+
selected_samples.map(
|
89
|
+
async (sample_row) =>
|
90
|
+
await Promise.all(
|
91
|
+
sample_row.map(async (sample_cell, j) => {
|
92
|
+
return {
|
93
|
+
value: sample_cell,
|
94
|
+
component: (await component_map.get(components[j]))
|
95
|
+
?.default as ComponentType<SvelteComponent>
|
96
|
+
};
|
97
|
+
})
|
98
|
+
)
|
99
|
+
)
|
98
100
|
);
|
99
101
|
}
|
100
102
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/dataset",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.27",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
6
|
"author": "",
|
@@ -12,9 +12,9 @@
|
|
12
12
|
"./package.json": "./package.json"
|
13
13
|
},
|
14
14
|
"dependencies": {
|
15
|
-
"@gradio/
|
16
|
-
"@gradio/
|
17
|
-
"@gradio/
|
18
|
-
"@gradio/
|
15
|
+
"@gradio/client": "^0.14.0",
|
16
|
+
"@gradio/atoms": "^0.6.0",
|
17
|
+
"@gradio/upload": "^0.8.1",
|
18
|
+
"@gradio/utils": "^0.3.0"
|
19
19
|
}
|
20
20
|
}
|