Skip to content

v0.13.0

Choose a tag to compare

@github-actions github-actions released this 03 Oct 00:33
· 2355 commits to main since this release

foldkit-agent 0.6.0; foldkit-agent-a2a, foldkit-agent-mcp,
foldkit-agent-native and foldkit-agent-webmcp 0.5.0; foldkit-bundle
0.5.0; foldkit-bundle-surface 0.3.0; foldkit-cms 0.4.0;
foldkit-cms-drizzle 0.4.0; foldkit-crud 0.5.0; foldkit-durable 0.6.0;
foldkit-entity 0.6.0; foldkit-form 0.4.0; foldkit-mirror 0.5.0;
foldkit-mixins 0.6.0; foldkit-mixins-crud 0.6.0; foldkit-mixins-form
0.4.0; foldkit-mixins-richtext 0.2.0; foldkit-mixins-surface 0.5.0;
foldkit-mixins-ui 0.6.0; foldkit-primitives 0.5.0; foldkit-react 0.3.0;
foldkit-remote 0.10.0; foldkit-remote-drizzle 0.9.0;
foldkit-remote-server 0.10.0; foldkit-richtext 0.3.0;
foldkit-richtext-code, foldkit-richtext-code-shiki and
foldkit-richtext-markdown 0.2.0; foldkit-richtext-dom 0.3.0; foldkit-ssr
0.3.0; foldkit-surface 0.6.0; foldkit-sync 0.8.0. foldkit-metadata and
foldkit-react-codegen are unchanged.

Every package moves a minor version, including those whose only change is
the new requirement. A 0.x caret range accepts any patch of its minor, so a
patch that now needs Effect 4.0.0 would install itself into an application
still on the release candidate; a minor is the step an application takes on
purpose.

On stable Effect. Every package now requires Effect 4.0.0, the first
stable release of Effect 4, and Foldkit 0.165.0, the first Foldkit on it. The
code changes that follow from it are import paths and two type fixes; nothing
here changes behaviour on its own account.

Smaller additions. form.value reads a whole decoded form or nothing,
Link.child states a plain child once, RowListView draws a list as rows,
and the CMS history card can retry.

Upgrading from 0.12

  • Effect 4.0.0 stable and Foldkit 0.165.0. Every package now
    peer-depends on effect@^4.0.0 (from >=4.0.0-rc.116 <4.0.0-rc.118) and
    foldkit@^0.165.0 (from ^0.163.0); foldkit-mixins-ui peers
    @foldkit/ui@^0.165.0. Foldkit 0.165.0 is the first release on stable
    Effect and pins it exactly, so an application moves effect,
    @effect/platform-browser, any other @effect/* package, foldkit, and
    @foldkit/ui together, and @foldkit/vite-plugin to 0.26.0.
    foldkit-durable's @effect/sql-sqlite-node@4.0.0 needs Node 22.16 or newer.
    • Effect 4.0.0 removed effect/unstable/*. Import effect/http,
      effect/persistence, effect/rpc, and effect/sql; effect/unstable/httpapi
      is now effect/http-api. Every import here has moved.
    • Effect 4.0.0 reversed partition in Array, Chunk, Effect, and
      Record, and Option.partitionMap: successes now come first. A call
      site written for the rc still type-checks and swaps its results. Nothing
      in this repository calls them; check your own.
    • @foldkit/ui 0.164.0 added a transitionGeneration field to
      Animation.Model and a generation to its Messages; a test fixture that
      builds an Animation Model by hand needs it.
    • examples/livestore keeps effect@4.0.0-rc.112: LiveStore's Effect 4
      build still imports the removed effect/unstable/* paths.

Added

  • foldkit-form, form.value(model): the decoded input as Some when
    every key and row is valid as the form stands, None otherwise. All or
    nothing (unlike partial), so a parent that submits several forms reads one
    complete value per form without the nesting engine. Job Application composes
    its ApplicationPayload from it.
  • foldkit-mixins-form/ui, field: an optional FormView override for
    Text/Multiline fields drawn through the styled UI adapters, preserving
    Changed/Blurred dispatch, names, required state, descriptions, checking and
    errors. Form and Auth adopt it while keeping their application-owned layouts
    and styled submit buttons. The main entry retains its plain-HTML renderer.
  • foldkit-bundle, Link.child(link, update, view, slotId): a child
    that is not a Bundle, stated once: the Link names where its Model lives
    and how its Messages wrap, and the pair yields the fold for update and
    the drawing for view (branded once, absent draws nothing). The studio's
    two sections adopt it, deleting a fold and a submodel apiece. Children
    with view inputs or OutMessages of their own stay hand-rolled.
  • foldkit-cms, historyCard retry and announced states: an optional
    onRetry with retry words draws a retry button on a failed history
    read, on the restore slot so no new builder is required; the Failed and
    Loading states draw as an alert and a busy status instead of plain text.
    The body now branches through Match.tagsExhaustive.
  • foldkit-mixins-crud, RowListView: a list drawn as ul/li rows
    over the same state contract ListView carries (busy, empty, failed with
    the caller's retry, a failed refresh kept above its rows). The application
    draws each row's content through RowListInput.row; onOpen makes the
    whole row a button. Both lists share one implementation, so their states
    cannot drift.

Fixed

  • foldkit-primitives, the socket and SSE bundles under Foldkit 0.165:
    the private unlessSame helper inferred its type from both arguments, and
    Foldkit 0.165's match no longer passes the declared return type into each
    arm, so { ...model, status: 'connecting' } widened status to string
    and failed to type-check. It infers from the current Model alone now.
  • foldkit-primitives, PointerDrag's drop target: a drop named the
    place the last move reported, so a scroll or a layout change between the
    final move and the release dropped onto a stale target. The release is
    hit-tested again when it carries a position; one without keeps the last
    move's answer.
  • foldkit-mixins-ui, Recipes.Dialog: restores the modal's
    margin: auto, which Defaults.reset zeroes, so a dialog opens centered
    rather than in the top corner.
  • foldkit-bundle, Bundle.withServices in a compose pipe: it refused
    a composition whose placements were already readable (every child
    configured, or none), because its parameter typed the incoming services as
    any and Composition is invariant there. It is generic now, so
    Bundle.compose(fields).pipe(Bundle.withServices<S>(), Bundle.withChild(…))
    type-checks as the README says.

Changed

  • examples/foldkit/ui-showcase, on @foldkit/ui's own Meter, Progress
    and vertical Slider.
    The showcase drew local ports of Meter and Progress
    because @foldkit/ui had neither, and showed "Fractional steps" where
    upstream shows a vertical Slider because the Slider had no orientation. Both
    arrived in 0.164.0: the pages now draw upstream's components through the
    page's Slots, the volume slider stands upright (orientation: 'Vertical',
    styled by the data-vertical the Slider writes), and the ports are deleted.
    Their tests went with them; the new ones check what the page configures:
    each meter's value, label and thresholds, both progress states, and the
    slider's orientation.

  • foldkit-primitives, broken out into one reference per subpath. The
    package README is onboarding and a map: which of the five forms a primitive
    takes (bundle, bundle plus Behavior, entry, Mount, Command, or function),
    one placement walked through, the three other ways in, the rules every
    primitive keeps, and a table pointing at ten subpath pages. Each subpath
    README (media, net, time, state, motion, device, events,
    observers, dom, and a new interaction) now holds its primitives'
    Model shapes, Messages, args, a placement in Bundle.compose form, and the
    detail that used to sit in one 1000-line page. Every snippet is type-checked
    in test/readme.test-d.ts and test/readme/<subpath>.test-d.ts, which
    caught two snippets the old page could not keep: a SlotView.define whose
    input was unannotated, and a withChild config whose onOut returns
    Commands (written against Base.Model and given through configure).

  • foldkit-sync, foldkit-durable, and the replicated-state guide,
    rewritten for the reader who has an application and wants it to work
    offline.
    Both READMEs now lead with the normal path (declare, mount, run
    the loop; spread the contract into the journal) and keep the replica API,
    transports, presence, and LWW under an advanced section. The Sync README
    adds the three milestones an edit passes (visible, saved, committed) and
    which reader shows each, a section on testing with a memory Storage and
    the loopback transport, and a failure list ordered by what changes the
    design. The guide (docs/replication.md) is now one feature end to end
    and carries the server's exchange handler in full, which neither README
    could show: cursor check, append with deterministic rejections, paging,
    checkpoint below the floor, epoch, and Sync.transport.serve with a
    change notice. Every snippet is type-checked: the READMEs' in each
    package's test/readme.test-d.ts, the guide's in
    examples/sync/test/guide.test-d.ts.