Skip to content

Releases: manzt/anywidget

anywidget@0.9.6

02 Apr 23:05
3ce5888
Compare
Choose a tag to compare

Patch Changes

anywidget@0.9.5

02 Apr 21:04
8753d21
Compare
Choose a tag to compare

Patch Changes

  • feat: Suppress errors when inspecting widget for commands (#522)

@anywidget/types@0.1.8

02 Apr 23:06
3ce5888
Compare
Choose a tag to compare

Patch Changes

  • Export Experimental type (#524)

@anywidget/svelte@0.0.7

02 Apr 23:05
3ce5888
Compare
Choose a tag to compare

Patch Changes

@anywidget/react@0.0.6

02 Apr 23:06
3ce5888
Compare
Choose a tag to compare

Patch Changes

anywidget@0.9.4

01 Apr 18:55
6a55c1e
Compare
Choose a tag to compare

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/types@0.1.7

01 Apr 18:56
6a55c1e
Compare
Choose a tag to compare

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

@anywidget/svelte@0.0.6

01 Apr 18:56
6a55c1e
Compare
Choose a tag to compare

Patch Changes

@anywidget/react@0.0.5

01 Apr 18:55
6a55c1e
Compare
Choose a tag to compare

Patch Changes

@anywidget/deno@0.1.2

23 Mar 13:14
54bc7e3
Compare
Choose a tag to compare

Patch Changes

  • Prefer interface over type for WidgetOptions (#498)