- add genstudio.scene3d for webgpu-backed 3d visualizations
- fix Slider init
childEvents
includes modifier properties on eventchildEvents
supports onMouseEnter, onMouseLeave
- remove genjax dep, relax python versions
- Slider sets initial state if undefined
- Slider disposes interval correctly
- add maxWidth option to plots
- rename
yarn watch
toyarn dev
- release.py: remove padding from version numbers
- support alpha releases
- publish docs to github pages
- release to PyPI instead of artifact registry
- support html display mode
- FIX: breaking changes in esm.sh broke genstudio's js bundle
- fix replaceBuffers ndarray handling
- clarify Plot.js vs Plot.Import
- return html/svg elements directly in hiccup/html
- bring genstudio.api into Plot.js scope
- use a
source=
param with https?: and path: prefixes possible - add Plot.Import
- Add html to evaluation env
- add React to evaluation env
- Plot.events: add event.key for draw events to distinguish lines in 32 bits
- Plot.events: only preventDefault on mousedown when in rectangle and dragging is enabled
- Slider: don't clobber initialState value
- in python, apply updates immutably
- add tab example to llms.py
- event.preventDefault() in Plot.events handleMouseDown
- relax types, because JSCode can be anywhere
- fix Row/Column ordering
- add types
- support dot notation (eg. event.value) in python callbacks
- add types
- serialize
attributes_dict
(for Pytree.dataclass, etc) - support 'multi.segment.paths.0' in js $state, with reactivity preserved for nested changes.
- computed, transactional js state updates (GEN-867)
- sync computed state with python
- ensure that computed state and onChange listeners are transacted together
- ensure that python sees a consistent view of js state, including computed state
- add Plot.cond and Plot.case for conditional rendering
- Plot.Slider accepts className/style, which are applied to an outer div.
- allow chained/dependent onChange listeners
- trimLeft js_source (so it's ok to put source on a new line inside
Plot.js
)
- add llms.py (instructions for LLMs)
- clean up Plot.grid() and Plot.hideAxis() argument handling
- add Plot.plot to mirror Observable Plot api
- rename Plot.domain args from xd, yd to x, y
- increase max-width of p/ul/ol in .prose
- fix Plot.events: allow onDraw and onMouseMove to co-exist
- Plot.events is now order-independent and won't block pointer events
- Plot.Slider accepts
"raf"
as an fps value - Plot.Slider accepts
controls=["slider", "play", "fps"]
to flexibly control ui - Plot.Slider's range option, if a single number, represents the upper bound (EXCLUSIVE) of a 0-n range, as in python's
range(n)
- Fix pixels mark in Safari (poor foreignObject support)
- Add "className" option to plots to add classes to container
- Improve grid/hideAxis argument handling
- docs: add pixels, adev, and live edit examples to website
- docs: fix website css (twind fails, use tailwind)
- Prevent update cycles in onChange listeners
- support columnar data with array buffers
- fix asset versioning
- rename Plot.listen to Plot.onChange
- handle NaN values
- Slider: add back positional range arg
- binary data works in html display mode
- Run tests in CI
- bring back support for multi-dimensional arrays (serialize to js arrays + typed array leaves)
- Add a version query param to static assets on release
- Add support for binary data (in plot specifications, and updates in both directions python<>js). Numpy/jax arrays are converted to appropriate TypedArray types in js.
- Add a
Plot.pixels
mark for rendering a single image, given an array of rgb/rgba pixels and an imageWidth/imageHeight - Use CDN for releases (vastly smaller file sizes for notebooks)
- Slider: add showFps option, improve layout
Plot.initialState({"name": "value"})
now takes only a dict, rather than a single key/value.Plot.html
would previously create an element if passed a string as the first argument. Now it is required to use a list, eg.Plot.html(["div", ...content])
. This allows for wrapping primitive values (strings, numbers) inPlot.html
in order to compose them, eg.Plot.html("Hello, world") & ["div", {...}, "my button"])
.Plot.ref
now takes astate_key
variable instead ofid
(but we expect to usePlot.ref
less often, now with the new state features).- Python callbacks now take two arguments,
(widget, data)
instead of onlydata
.
Row
/Column
/Grid
now accept more options (eg. widths/heights).Plot.initialState(...)
accepts async
option,True
to sync all variables or a set of variable names, egsync={"foo"}
. Synced variables will send updates from js to python automatically.widget.state
is a new interface for reading synced variables (widget.state.foo
) and updating any variable (widget.state.update({"foo": "bar"}, ["bax", "append", 1])
).Plot.listen({state_key: listener})
is a layout item which subscribes listener functions to state changes. Adding a listener for a variable implicitly setssync=True
for that variable.
- add rgb(a) section in colors
- add interactive-density example
- use
containerWidth
instead of a React context to set widths - improve rendering of custom "height" on a plot
- Add API documentation to website
- Add
Plot.katex
- Plot.js supports parameters
- Improved js event data parsing
- BREAKING: rename
Plot.draw
toPlot.events
- add
onClick
,onMouseMove
, andonMouseDown
callbacks - add
startTime
to draw event data - support dictionaries as arguments to Plot.initial_state and widget.update_state
- add repr_html to LayoutItem (for treescope)
- ariaLabel is a default option, not a channel
Plot.img
mark for specifying image sizes in x/y coords- use import maps for js deps
- apply scale correction to Plot.render.childEvents
- deps: add pillow as a required dependency
- rename: Plot.cache -> Plot.ref
- refactor: unify $state/cache implementations
- tests: add dependency tests using the new (simplified) state store, independent of React
- add Plot.draw mark (onDrawStart, onDraw, onDrawEnd)
- add Plot.render.draggableChildren (onDragStart, onDrag, onDragEnd, onClick)
- add widget.update_state([CachedObject, operation, payload]) for reactively updating cached data
- add Plot.initial_state for initializing js $state variables
- support Tailwind (via twind)
- Hiccup with one child
- ci: always build docs
- slim down genstudio deps
- refactor: added api.js module
- refactor: JSRef/JSCall use path instead of module/name
- tests: added widget.test.jsx
- update_cache accepts multiple updates
- Allow cache entries to reference each other (non-circular)
- Bylight code highlighting
- Plot.Reactive can animate, Plot.Frames accepts slider=False
- refactor: JSCall, JSCode, now inherit from LayoutItem
- use bylight from a cdn
- use Google Font
- explain JSON serialization
- bump: Observable Plot 0.6.16
- a reactive variable maintains its current value when a plot is reset, unless reactive variable definitions change
- Plot.constantly for colors
- JSON serialization
- Exporting and Saving
- values => data (in arguments to Plot.{mark})
- Initial release