Skip to content

Commit 6a55c1e

Browse files
Version Packages (#517)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 777fc26 commit 6a55c1e

File tree

9 files changed

+77
-32
lines changed

9 files changed

+77
-32
lines changed

.changeset/nervous-goats-rescue.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/anywidget/CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# anywidget
22

3+
## 0.9.4
4+
5+
### Patch Changes
6+
7+
- Add experimental `invoke` API to call Python functions from the front end and ([#453](https://github.com/manzt/anywidget/pull/453))
8+
await the response.
9+
10+
This removes a lot of boilerplate required for this pattern. The API is
11+
experimental and opt-in only. Subclasses must use the `command` to register
12+
functions.
13+
14+
```py
15+
class Widget(anywidget.AnyWidget):
16+
_esm = """
17+
export default {
18+
async render({ model, el, experimental }) {
19+
let [msg, buffers] = await experimental.invoke("_echo", "hello, world");
20+
console.log(msg); // "HELLO, WORLD"
21+
},
22+
};
23+
"""
24+
25+
@anywidget.experimental.command
26+
def _echo(self, msg, buffers):
27+
# upper case the message
28+
return msg.upper(), buffers
29+
```
30+
31+
- Updated dependencies [[`777fc268ee06fcf13e48a1c00cfdf90c14d786dc`](https://github.com/manzt/anywidget/commit/777fc268ee06fcf13e48a1c00cfdf90c14d786dc)]:
32+
- @anywidget/types@0.1.7
33+
334
## 0.9.3
435

536
### Patch Changes

packages/anywidget/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "anywidget",
33
"type": "module",
4-
"version": "0.9.3",
4+
"version": "0.9.4",
55
"author": "Trevor Manz",
66
"license": "MIT",
77
"main": "dist/index.js",

packages/react/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @anywidget/react
22

3+
## 0.0.5
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`777fc268ee06fcf13e48a1c00cfdf90c14d786dc`](https://github.com/manzt/anywidget/commit/777fc268ee06fcf13e48a1c00cfdf90c14d786dc)]:
8+
- @anywidget/types@0.1.7
9+
310
## 0.0.4
411

512
### Patch Changes

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@anywidget/react",
33
"type": "module",
4-
"version": "0.0.4",
4+
"version": "0.0.5",
55
"description": "React utilities for anywidget",
66
"main": "index.js",
77
"types": "dist/index.d.ts",

packages/svelte/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @anywidget/svelte
22

3+
## 0.0.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`777fc268ee06fcf13e48a1c00cfdf90c14d786dc`](https://github.com/manzt/anywidget/commit/777fc268ee06fcf13e48a1c00cfdf90c14d786dc)]:
8+
- @anywidget/types@0.1.7
9+
310
## 0.0.5
411

512
### Patch Changes

packages/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@anywidget/svelte",
33
"type": "module",
4-
"version": "0.0.5",
4+
"version": "0.0.6",
55
"description": "Svelte utilities for anywidget",
66
"main": "src/index.js",
77
"types": "dist/index.d.ts",

packages/types/CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# @anywidget/types
22

3+
## 0.1.7
4+
5+
### Patch Changes
6+
7+
- Add experimental `invoke` API to call Python functions from the front end and ([#453](https://github.com/manzt/anywidget/pull/453))
8+
await the response.
9+
10+
This removes a lot of boilerplate required for this pattern. The API is
11+
experimental and opt-in only. Subclasses must use the `command` to register
12+
functions.
13+
14+
```py
15+
class Widget(anywidget.AnyWidget):
16+
_esm = """
17+
export default {
18+
async render({ model, el, experimental }) {
19+
let [msg, buffers] = await experimental.invoke("_echo", "hello, world");
20+
console.log(msg); // "HELLO, WORLD"
21+
},
22+
};
23+
"""
24+
25+
@anywidget.experimental.command
26+
def _echo(self, msg, buffers):
27+
# upper case the message
28+
return msg.upper(), buffers
29+
```
30+
331
## 0.1.6
432

533
### Patch Changes

packages/types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@anywidget/types",
33
"type": "module",
4-
"version": "0.1.6",
4+
"version": "0.1.7",
55
"description": "utility types for anywidget",
66
"main": "./index.ts",
77
"types": "./index.ts",

0 commit comments

Comments
 (0)