Skip to content

Releases: bcdev/remotestate

0.3.3

Choose a tag to compare

@forman forman released this 08 Jul 05:09
ffb7249

Version 0.3.3

  • Improved usability of the Python Store class:

    • Introduced public protocol StoreAt now returned from Store.at instead of internal _StoreAt type.
    • Added StoreAt.value read-only property to access the value of a node returned by Store.at.
  • The Python ServeResult class now renders as an HTML table in notebooks.

0.3.2

Choose a tag to compare

@forman forman released this 26 Jun 14:46
ae7e79c

Changes in Version 0.3.2

  • Fixed WebSocket serialization so store set messages with undefined values preserve the required value field by sending JSON null. (#42)

Full Changelog: v0.3.1...v0.3.2

0.3.1

Choose a tag to compare

@forman forman released this 26 Jun 06:05
952d05c

Changes in 0.3.1

  • Relaxed remotestate Python library dependencies:
    • fastapi >=0.136,<1
    • uvicorn >=0.46,<1

Full Changelog: v0.3.0...v0.3.1

0.3.0

Choose a tag to compare

@forman forman released this 23 Jun 07:02
9d9cafe

Changes in 0.3.0

Python library

  • Store now accepts any root state value, exposes it through the typed
    state property, and supports root reads/writes with the empty path.
  • Store.get() now defaults to the root state value when no path is passed.
  • Removed the built-in Service.get() query and Service.set() action.
    Store reads and writes now use dedicated get/set protocol messages, while
    service actions and queries are reserved for domain methods.
  • Service is now generic over the root state type, so service.store
    preserves the Store[T] type.
  • Added notebook-friendly Store.__getitem__() and Store.__setitem__()
    aliases:
    • store["items[0].label"] uses RemoteState string path syntax.
    • store["items", 0, "label"] uses tuple path segments.
    • store[()] addresses the root state value.
  • Added notebook-friendly store.at sugar for nested store paths:
    • store.at.items[0].label = "x" writes through Store.set().
    • evaluating store.at.items[0].label in notebooks renders the current
      stored value instead of the path accessor object.
  • Relaxed the path grammar so the empty string addresses the root value and
    paths may start with a bracketed array index or string key, such as
    [0].label or ["display name"].value.
  • Updated JSONPath conversion helpers so "" maps to $ and [0] maps to
    $[0].
  • Added public PathInput and PathSegmentInput aliases plus
    normalize_path() and normalize_path_segment() helpers under
    remotestate.path.
  • Removed the Python-only Property and Index parsed path segment classes.
    Parsed paths now use primitive tuple segments, such as ("items", 0, "label"), matching the TypeScript path model.
  • Aligned PathInput with TypeScript: pass a string path or a sequence of
    path segments. Root array entries can be addressed as "[0]" or (0,).
  • Changed the WebSocket protocol to carry normalized path arrays instead of
    path strings. Store update results now use [{path, value}] entries instead
    of path-to-value objects.

TypeScript library

  • Relaxed the shared path grammar so the empty string addresses the root value
    and paths may start with a bracketed array index or string key, such as
    [0].label or ["display name"].value.
  • Changed Path from a non-empty tuple type to a general segment array so
    [] represents the root state value.
  • Removed the redundant RelativePath export; Path is now the single parsed
    segment-array type.
  • Store.get() and useRemoteStateValue() now default to the root state value
    when no path is passed.
  • Store.set() now uses a dedicated store set protocol message and receives
    set_result updates instead of dispatching a service action named set.
  • Updated the transport-backed store cache so root subscriptions overlap all
    descendant updates, root updates materialize cached descendants, and leaf
    updates can patch cached root snapshots.
  • Renamed the public path input alias from PathLike to PathInput, and added
    PathSegmentInput for raw segment values.

Full Changelog: v0.2.0...v0.3.0

0.2.0

Choose a tag to compare

@forman forman released this 19 Jun 14:55
a2b7b36

Changes in version 0.2.0

Python package

  • Tightened the shared path grammar to a strict JSONPath subset without the
    $. prefix:
    • Root paths must start with an identifier.
    • Later segments may use dotted identifiers, bracketed integer indices, or
      bracketed string keys.
    • Bracketed string keys may use either single or double quotes; formatting
      stays canonical with double quotes.
    • Invalid paths now fail explicitly instead of silently returning a parsed
      prefix.
  • Added format_path() as the public Python path formatter.
  • Updated parser docstrings, README examples, and path tests to match the
    shared grammar.
  • Added twine to dev-dependencies.
  • Changed member names in the Service class:
    • init_app to _init_app
    • get_state to get
    • set_state to set
    • update_task to notify
  • Added __version__ attribute to main package.
  • Exposed the path submodule from the package root and moved Path,
    PathSegment, Property, and Index under remotestate.path.
  • Changed the Store default factory API:
    • Renamed the keyword argument from default_value_factory to
      default_factory.
    • The factory now receives a parsed Path tuple instead of a path string.
  • Changed store update notifications to emit only the exact paths written by
    Store.set(), instead of also including all parent prefixes.
  • Broadcast Python-side Store.set() updates to connected WebSocket clients
    even when the mutation did not originate from a JavaScript action.
  • Changed signature and behavior of serve() function:
    • Replaced open_browser and open_iframe with a generic display
      parameter.
    • serve() now returns a ServeResult with resolved server, WebSocket,
      and UI URLs.
    • Renamed iframe_heigh argument into height, and added width.
    • It is no longer using FastAPI/Uvicorn default
      logging. Instead, all server logs are written to server.log
      and logging to stdout/stderr is suppressed.

TypeScript package

  • Tightened the shared path grammar to a strict JSONPath subset without the
    $. prefix:
    • Root paths must start with an identifier.
    • Later segments may use dotted identifiers, bracketed integer indices, or
      bracketed string keys.
    • Bracketed string keys may use either single or double quotes; formatting
      stays canonical with double quotes.
    • Invalid paths now fail explicitly instead of silently returning a parsed
      prefix.
  • Added normalizePath() as the public path validator/normalizer.
  • Updated parser docstrings, README examples, and path tests to match the
    shared grammar.
  • Supporting optional remote backend with local state fallback:
    • Added fallback?: () => RemoteStateClient to RemoteStateProvider.
    • Added client?: RemoteStateClient support to RemoteStateProvider.
    • Removed active?: boolean from RemoteStateProvider.
    • Removed useOptionalRemoteStateClient<S>(); hooks now always require a
      provider with either url, client, or fallback.
    • createRemoteStateClient() now requires an explicit URL.
    • Added createLocalStateClient() to wrap local stores and
      action/query handlers as fallback clients.
    • Updated docs with:
      • a basic counter RemoteState usage example
      • an optional remote backend/local client fallback example
      • root README references to RemoteStateProvider
  • Slimmed store update handling:
    • The client now accepts exact changed paths from action_result updates
      instead of requiring redundant parent-prefix payloads.
    • Cached parent and child snapshots are reconciled locally when related
      paths update.
    • Subscribed parent and child snapshots are now materialized from related
      exact-path updates so useRemoteStateValue() rerenders for subpath
      changes.
    • Store.subscribe() now takes a required path first:
      subscribe(path, listener).
  • Improved TypeScript package build output:
    • Split library, Node/Vite config, and ESLint TypeScript projects.
    • Clean dist before rebuilding to prevent stale artifacts.
    • Keep API docs in the bundled .d.ts file while stripping JSDoc blocks
      from the bundled runtime JavaScript.
    • Ensure the library bundle externalizes React peer dependencies and avoids
      publishing test/dev-only artifacts.
  • Refactorings:
    • Renamed RemoteState to RemoteStateClient.
    • Renamed RemoteStateOptions to RemoteStateClientOptions.
    • Renamed createRemoteState to createRemoteStateClient.
    • Renamed useRemoteState to useRemoteStateClient.

Full Changelog: v0.1.0...v0.2.0

0.1.0

Choose a tag to compare

@forman forman released this 09 Jun 06:41
197b182

Version 0.1.0

Initial release from 2026-06-09.