Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #517

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Version Packages #517

merged 1 commit into from
Apr 1, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 1, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

anywidget@0.9.4

Patch Changes

  • Add experimental invoke API to call Python functions from the front end and (#453)
    await the response.

    This removes a lot of boilerplate required for this pattern. The API is
    experimental and opt-in only. Subclasses must use the command to register
    functions.

    class Widget(anywidget.AnyWidget):
        _esm = """
        export default {
          async render({ model, el, experimental }) {
            let [msg, buffers] = await experimental.invoke("_echo", "hello, world");
            console.log(msg); // "HELLO, WORLD"
          },
        };
        """
    
        @anywidget.experimental.command
        def _echo(self, msg, buffers):
            # upper case the message
            return msg.upper(), buffers
  • Updated dependencies [777fc268ee06fcf13e48a1c00cfdf90c14d786dc]:

    • @anywidget/types@0.1.7

@anywidget/react@0.0.5

Patch Changes

@anywidget/svelte@0.0.6

Patch Changes

@anywidget/types@0.1.7

Patch Changes

  • Add experimental invoke API to call Python functions from the front end and (#453)
    await the response.

    This removes a lot of boilerplate required for this pattern. The API is
    experimental and opt-in only. Subclasses must use the command to register
    functions.

    class Widget(anywidget.AnyWidget):
        _esm = """
        export default {
          async render({ model, el, experimental }) {
            let [msg, buffers] = await experimental.invoke("_echo", "hello, world");
            console.log(msg); // "HELLO, WORLD"
          },
        };
        """
    
        @anywidget.experimental.command
        def _echo(self, msg, buffers):
            # upper case the message
            return msg.upper(), buffers

@manzt manzt merged commit 6a55c1e into main Apr 1, 2024
@manzt manzt deleted the changeset-release/main branch April 1, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant