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.
New %%vfile cell magic for prototyping widgets in notebooks. Enables syntax highlighting and anywidget's Hot Module Replacement (HMR) directly within the notebook.
Previously, front-end code had to be inline strings or file paths, causing loss of widget state when editing inline-strings in notebooks. The new %%vfile cell magic allows editing front-end code within the notebook with live reloading on cell re-execution.
Use %%vfile <filename> to create a virtual file for either JavaScript or CSS, and use vfile:<filename> in _esm or _css attributes of an AnyWidget subclass to reference the virtual file. Anywidget applies HMR updates automatically on cell re-execution.
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.12
Patch Changes
Add IPython Cell Magic for HMR (#594)
New
%%vfile
cell magic for prototyping widgets in notebooks. Enables syntax highlighting and anywidget's Hot Module Replacement (HMR) directly within the notebook.Previously, front-end code had to be inline strings or file paths, causing loss of widget state when editing inline-strings in notebooks. The new
%%vfile
cell magic allows editing front-end code within the notebook with live reloading on cell re-execution.Use
%%vfile <filename>
to create a virtual file for either JavaScript or CSS, and usevfile:<filename>
in_esm
or_css
attributes of anAnyWidget
subclass to reference the virtual file. Anywidget applies HMR updates automatically on cell re-execution.In[1]
:In[2]
:In[3]
:create-anywidget@0.6.3
Patch Changes