Releases: manzt/anywidget
create-anywidget@0.7.1
Patch Changes
- Update templates to esbuild v0.23 (#620)
create-anywidget@0.7.0
Minor Changes
- Upgrade templates to TypeScript v5.5 (#611)
anywidget@0.9.13
Patch Changes
- Improve legacy ESM deprecation notice with widget provenance and Python migration instruction (#609)
@anywidget/vite@0.2.0
Minor Changes
- Support anywidget lifecycle APIs (i.e.,
default
export) in Vite plugin. (#598)
Drops support for CJS-based usage of the plugin. The CJS Node API of Vite is deprecated in v5. Follow the migration guide for more details:
In a basic Vite project, make sure:
- The
vite.config.js
file content is using the ESM syntax.- The closest
package.json
file has"type": "module"
, or use the.mjs
/.mts
extension, e.g.vite.config.mjs
orvite.config.mts
.
create-anywidget@0.6.3
Patch Changes
- Bump esbuild to 0.21.4 (#599)
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]
:%load_ext anywidget
In[2]
:%%vfile index.js export default { render({ model, el }) { el.innerHTML = `<h1>Hello, ${model.get("name")}!</h1>`; } }
In[3]
:import anywidget import traitlets class Widget(anywidget.AnyWidget): _esm = "vfile:index.js" name = traitlets.Unicode("world").tag(sync=True) Widget()
create-anywidget@0.6.2
Patch Changes
- Bump esbuild version (#584)
anywidget@0.9.11
Patch Changes
-
Relax version pinning for anywidget front end (#521)
Adopted
~major.minor.*
notation for more flexible version compatibility in the front end, mirroring practices improve compatability in environments where bumping the front-end versions is not possible for end users (i.e., JupyterHub). This change is intended to enhance adaptability without causing disruptions. If issues arise, please report them on our issues page.
create-anywidget@0.6.1
Patch Changes
- Simplify default CSS class names (#576)
create-anywidget@0.6.0
Minor Changes
- Rename Python Counter class to Widget (#574)