Skip to content

Releases: manzt/anywidget

@anywidget/vue@0.1.0

21 May 15:21
58180a8
Compare
Choose a tag to compare

Minor Changes

  • Initial release (1c5f07a)

    Thanks to @aryan02420, we now support Vue with an official framework bridge—similar to our React and Svelte bindings.

    Unlike @anywidget/react, the useModelState hook returns a Vue ShallowRef that you can update directly (e.g. value++), aligning with Vue’s reactivity model.

    // src/index.js
    import { createRender } from "@anywidget/vue";
    import CounterWidget from "./CounterWidget.vue";
    
    const render = createRender(CounterWidget);
    export default { render };
    <!-- src/CounterWidget.vue -->
    <script setup>
    import { useModelState } from "@anywidget/vue";
    const value = useModelState("value");
    </script>
    
    <template>
      <button :onClick="() => value++">count is {{ value }}</button>
    </template>

    See the README for build tool configuration.

create-anywidget@0.8.2

25 Mar 14:31
ad031b9
Compare
Choose a tag to compare

Patch Changes

  • Pin @anywidget/react ~v0.2 (#837)

@anywidget/react@0.2.0

25 Mar 14:23
29e30d7
Compare
Choose a tag to compare

Minor Changes

  • Use React.useSyncExternalStore for useModelState hook implementation (34f01a3)

    The React.useSyncExternalStore hook was introduced in React 18 and is designed for external sources of truth, like the anywidget model. It ensures a shared source within the component tree, and consistent behavior during concurrent rendering, avoiding subtle bugs present in useEffect-based patterns.

    This is marked as a breaking change to signal the internal shift in behavior, though in practice it should be considered an improvement. Most users should not notice any difference, aside from more consistent updates.

  • Mirror React.useState API in useModelState hook (34f01a3)

    Aligns the useModelState hook more closely with the React.useState API by allowing a callback function in the state setter.

Patch Changes

  • Add generic type parameter to useModel hook (34f01a3)

anywidget@0.9.18

23 Mar 20:01
0462f77
Compare
Choose a tag to compare

Patch Changes

  • experimental Fix descriptor API to send initial state on comm creation (#832)

anywidget@0.9.17

23 Mar 19:01
0b5a8b8
Compare
Choose a tag to compare

Patch Changes

  • Refactor: Manage front-end HMR runtimes with web AbortController (#826)

  • Improve robustness of HMR file watching (#831)

    Handles cases where atomic saves (e.g. by VS Code) temporarily delete and replace the file. The watcher now ensures the file does not exist on Change.delete events, preventing unexpected drops in hot reload behavior.

anywidget@0.9.16

15 Mar 02:39
81376ca
Compare
Choose a tag to compare

Patch Changes

  • Fix: Use temporary polyfill for Promise.withResolvers for Safari compat (#824)

create-anywidget@0.8.1

12 Mar 18:48
63b14e1
Compare
Choose a tag to compare

Patch Changes

  • Import RenderProps instead of RenderContext when scaffolding vanilla TS project (#821)

create-anywidget@0.8.0

11 Mar 03:09
72aaa03
Compare
Choose a tag to compare

Minor Changes

  • Upgrade TypeScript to v5.8 (#817)

anywidget@0.9.15

01 Mar 17:44
61df024
Compare
Choose a tag to compare

Patch Changes

  • Move @anywidget/types from devDependencies to dependencies (#812)

anywidget@0.9.14

21 Feb 23:58
34d5ca0
Compare
Choose a tag to compare

Patch Changes

  • Comm messages sent quickly after the creation of a widget could be lost because custom widgets' models were loaded asynchronously (#804)