@gradio/dataset 0.6.0 → 0.7.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,19 @@
1
1
  # @gradio/dataset
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Features
6
+
7
+ - [#13526](https://github.com/gradio-app/gradio/pull/13526) [`53cb4ca`](https://github.com/gradio-app/gradio/commit/53cb4cae1ec3521e9170d12867253516413ba37a) - Run `pnpm lint` and `pnpm ts:check` on CI. Thanks @abidlabs!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/atoms@0.25.0
12
+ - @gradio/utils@0.13.0
13
+ - @gradio/client@2.3.0
14
+ - @gradio/upload@0.18.0
15
+ - @gradio/textbox@0.14.0
16
+
3
17
  ## 0.6.0
4
18
 
5
19
  ### Features
package/Dataset.svelte CHANGED
@@ -9,7 +9,7 @@
9
9
  import MountExample from "./MountExample.svelte";
10
10
 
11
11
  interface Props {
12
- components: string[];
12
+ components: { name: string; class_id: string }[];
13
13
  component_props: Record<string, any>[];
14
14
  load_component: load_component_type;
15
15
  headers: string[];
@@ -245,7 +245,7 @@
245
245
  onmouseleave={() => handle_mouseleave()}
246
246
  >
247
247
  {#each sample_row as { value, component, runtime }, j (j)}
248
- {@const component_name = components[j]}
248
+ {@const component_name = components[j]?.name}
249
249
 
250
250
  {#if component_name !== undefined}
251
251
  <td
package/Index.svelte CHANGED
@@ -48,13 +48,13 @@
48
48
 
49
49
  <Dataset
50
50
  onclick={(d) => (
51
- (gradio.props.value = d.index),
52
- gradio.dispatch("click", gradio.props.value)
51
+ (gradio.props.value = Array.isArray(d.index) ? d.index[0] : d.index),
52
+ gradio.dispatch("click")
53
53
  )}
54
54
  onselect={(data) => gradio.dispatch("select", data)}
55
55
  load_component={gradio.shared.load_component}
56
- {samples}
57
56
  {...gradio.props}
57
+ {samples}
58
58
  />
59
59
  </Block>
60
60
 
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  let { component, runtime, ...rest }: Props = $props();
11
- let el: HTMLElement = $state(null);
11
+ let el: HTMLElement | null = $state(null);
12
12
 
13
13
  $effect(() => {
14
14
  if (!el || !component) return;
@@ -9,7 +9,7 @@
9
9
  import MountExample from "./MountExample.svelte";
10
10
 
11
11
  interface Props {
12
- components: string[];
12
+ components: { name: string; class_id: string }[];
13
13
  component_props: Record<string, any>[];
14
14
  load_component: load_component_type;
15
15
  headers: string[];
@@ -245,7 +245,7 @@
245
245
  onmouseleave={() => handle_mouseleave()}
246
246
  >
247
247
  {#each sample_row as { value, component, runtime }, j (j)}
248
- {@const component_name = components[j]}
248
+ {@const component_name = components[j]?.name}
249
249
 
250
250
  {#if component_name !== undefined}
251
251
  <td
@@ -1,7 +1,10 @@
1
1
  import type { SelectData } from "@gradio/utils";
2
2
  import type { load_component as load_component_type } from "@gradio/utils";
3
3
  interface Props {
4
- components: string[];
4
+ components: {
5
+ name: string;
6
+ class_id: string;
7
+ }[];
5
8
  component_props: Record<string, any>[];
6
9
  load_component: load_component_type;
7
10
  headers: string[];
package/dist/Index.svelte CHANGED
@@ -48,13 +48,13 @@
48
48
 
49
49
  <Dataset
50
50
  onclick={(d) => (
51
- (gradio.props.value = d.index),
52
- gradio.dispatch("click", gradio.props.value)
51
+ (gradio.props.value = Array.isArray(d.index) ? d.index[0] : d.index),
52
+ gradio.dispatch("click")
53
53
  )}
54
54
  onselect={(data) => gradio.dispatch("select", data)}
55
55
  load_component={gradio.shared.load_component}
56
- {samples}
57
56
  {...gradio.props}
57
+ {samples}
58
58
  />
59
59
  </Block>
60
60
 
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  let { component, runtime, ...rest }: Props = $props();
11
- let el: HTMLElement = $state(null);
11
+ let el: HTMLElement | null = $state(null);
12
12
 
13
13
  $effect(() => {
14
14
  if (!el || !component) return;
package/dist/types.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import type { SelectData } from "@gradio/utils";
2
2
  export interface DatasetProps {
3
- components: string[];
3
+ components: {
4
+ name: string;
5
+ class_id: string;
6
+ }[];
4
7
  component_props: Record<string, any>[];
5
8
  headers: string[];
6
9
  samples: any[][] | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/dataset",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -16,11 +16,11 @@
16
16
  "./package.json": "./package.json"
17
17
  },
18
18
  "dependencies": {
19
- "@gradio/client": "^2.2.2",
20
- "@gradio/atoms": "^0.24.0",
21
- "@gradio/utils": "^0.12.2",
22
- "@gradio/upload": "^0.17.10",
23
- "@gradio/textbox": "^0.13.9"
19
+ "@gradio/atoms": "^0.25.0",
20
+ "@gradio/client": "^2.3.0",
21
+ "@gradio/textbox": "^0.14.0",
22
+ "@gradio/utils": "^0.13.0",
23
+ "@gradio/upload": "^0.18.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@gradio/preview": "^0.16.2"
package/types.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { SelectData } from "@gradio/utils";
2
2
 
3
3
  export interface DatasetProps {
4
- components: string[];
4
+ components: { name: string; class_id: string }[];
5
5
  component_props: Record<string, any>[];
6
6
  headers: string[];
7
7
  samples: any[][] | null;