@gradio/button 0.2.0-beta.5 → 0.2.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,28 @@
1
1
  # @gradio/button
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Features
6
+
7
+ - [#5498](https://github.com/gradio-app/gradio/pull/5498) [`287fe6782`](https://github.com/gradio-app/gradio/commit/287fe6782825479513e79a5cf0ba0fbfe51443d7) - fix circular dependency with client + upload. Thanks [@pngwn](https://github.com/pngwn)!
8
+ - [#5498](https://github.com/gradio-app/gradio/pull/5498) [`287fe6782`](https://github.com/gradio-app/gradio/commit/287fe6782825479513e79a5cf0ba0fbfe51443d7) - Clean root url. Thanks [@pngwn](https://github.com/pngwn)!
9
+ - [#5498](https://github.com/gradio-app/gradio/pull/5498) [`287fe6782`](https://github.com/gradio-app/gradio/commit/287fe6782825479513e79a5cf0ba0fbfe51443d7) - Publish all components to npm. Thanks [@pngwn](https://github.com/pngwn)!
10
+ - [#5498](https://github.com/gradio-app/gradio/pull/5498) [`287fe6782`](https://github.com/gradio-app/gradio/commit/287fe6782825479513e79a5cf0ba0fbfe51443d7) - Custom components. Thanks [@pngwn](https://github.com/pngwn)!
11
+
12
+ ## 0.2.0-beta.7
13
+
14
+ ### Features
15
+
16
+ - [#6143](https://github.com/gradio-app/gradio/pull/6143) [`e4f7b4b40`](https://github.com/gradio-app/gradio/commit/e4f7b4b409323b01aa01b39e15ce6139e29aa073) - fix circular dependency with client + upload. Thanks [@pngwn](https://github.com/pngwn)!
17
+ - [#6136](https://github.com/gradio-app/gradio/pull/6136) [`667802a6c`](https://github.com/gradio-app/gradio/commit/667802a6cdbfb2ce454a3be5a78e0990b194548a) - JS Component Documentation. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
18
+ - [#6149](https://github.com/gradio-app/gradio/pull/6149) [`90318b1dd`](https://github.com/gradio-app/gradio/commit/90318b1dd118ae08a695a50e7c556226234ab6dc) - swap `mode` on the frontned to `interactive` to match the backend. Thanks [@pngwn](https://github.com/pngwn)!
19
+
20
+ ## 0.2.0-beta.6
21
+
22
+ ### Fixes
23
+
24
+ - [#6046](https://github.com/gradio-app/gradio/pull/6046) [`dbb7de5e0`](https://github.com/gradio-app/gradio/commit/dbb7de5e02c53fee05889d696d764d212cb96c74) - fix tests. Thanks [@pngwn](https://github.com/pngwn)!
25
+
3
26
  ## 0.2.0-beta.5
4
27
 
5
28
  ### Features
package/Index.svelte CHANGED
@@ -12,7 +12,7 @@
12
12
  export let visible = true;
13
13
  export let value: string;
14
14
  export let variant: "primary" | "secondary" | "stop" = "secondary";
15
- export let mode: "static" | "interactive" = "interactive";
15
+ export let interactive: boolean;
16
16
  export let size: "sm" | "lg" = "lg";
17
17
  export let scale: number | null = null;
18
18
  export let icon: string | null = null;
@@ -22,7 +22,7 @@
22
22
  click: never;
23
23
  }>;
24
24
  export let root = "";
25
- export let root_url: null | string = null;
25
+ export let proxy_url: null | string = null;
26
26
  </script>
27
27
 
28
28
  <Button
@@ -37,8 +37,8 @@
37
37
  {min_width}
38
38
  {visible}
39
39
  {root}
40
- {root_url}
41
- disabled={mode === "static"}
40
+ {proxy_url}
41
+ disabled={!interactive}
42
42
  on:click={() => gradio.dispatch("click")}
43
43
  >
44
44
  {gradio.i18n(value)}
package/README.md CHANGED
@@ -1,11 +1,27 @@
1
1
  # `@gradio/button`
2
2
 
3
- ```html
3
+ ```javascript
4
4
  <script>
5
- import { Button } from "@gradio/button";
5
+ import { BaseButton } from "@gradio/button";
6
+ import { createEventDispatcher, tick, getContext } from "svelte";
7
+ const dispatch = createEventDispatcher();
6
8
  </script>
7
9
 
8
- <button type="primary|secondary" href="string" on:click="{e.detail === href}">
9
- content
10
- </button>
10
+ <BaseButton
11
+ {value}
12
+ {variant}
13
+ {elem_id}
14
+ {elem_classes}
15
+ {size}
16
+ {scale}
17
+ {link}
18
+ {icon}
19
+ {min_width}
20
+ {visible}
21
+ {root}
22
+ {root_url}
23
+ on:click={() => dispatch("click")}
24
+ >
25
+ {"My Button"}
26
+ </Button>
11
27
  ```
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@gradio/button",
3
- "version": "0.2.0-beta.5",
3
+ "version": "0.2.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
7
7
  "license": "ISC",
8
8
  "private": false,
9
9
  "dependencies": {
10
- "@gradio/upload": "^0.3.0-beta.4",
11
- "@gradio/utils": "^0.2.0-beta.4"
10
+ "@gradio/client": "^0.7.0",
11
+ "@gradio/upload": "^0.3.0",
12
+ "@gradio/utils": "^0.2.0"
12
13
  },
14
+ "main": "./Index.svelte",
13
15
  "main_changeset": true,
14
16
  "exports": {
15
17
  ".": "./Index.svelte",
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { get_fetchable_url_or_file } from "@gradio/upload";
2
+ import { get_fetchable_url_or_file } from "@gradio/client";
3
3
 
4
4
  export let elem_id = "";
5
5
  export let elem_classes: string[] = [];
@@ -13,8 +13,8 @@
13
13
  export let scale: number | null = null;
14
14
  export let min_width: number | undefined = undefined;
15
15
  export let root = "";
16
- export let root_url: string | null = null;
17
- $: icon_path = get_fetchable_url_or_file(icon, root, root_url);
16
+ export let proxy_url: string | null = null;
17
+ $: icon_path = get_fetchable_url_or_file(icon, root, proxy_url);
18
18
  </script>
19
19
 
20
20
  {#if link && link.length > 0}