Skip to content

v0.18.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 23:32
· 689 commits to main since this release

foldkit-site 0.2.0, foldkit-remote 0.15.0, foldkit-primitives 0.9.0,
foldkit-mixins 0.10.0, foldkit-mixins-ui 0.9.0, and foldkit-builder and
foldkit-mixins-builder 0.2.0 for the changes below, and foldkit-plus 0.1.0,
published for the first time. Republished to re-pin: foldkit-cms and
foldkit-cms-drizzle 0.6.2, foldkit-crud 0.7.2, foldkit-data-grid and
foldkit-mixins-data-grid 0.1.4, foldkit-mixins-crud 0.6.6,
foldkit-mixins-form 0.5.2, foldkit-mixins-richtext 0.2.4,
foldkit-remote-drizzle 0.11.2, foldkit-remote-server 0.13.2 and
foldkit-sync 0.10.2, each of which pins a bumped package. Every other
package is unchanged.

Two changes break code written for 0.17 (under Changed): a Site node's
shortcut is now a KeySequence, and a Builder's keys go through
keyPressed.

Added

  • foldkit-remote: Data.preload, prefetch from update. satisfy as a
    Command for a destination the reader has not reached (a hover over a link):
    it reads what the given Surfaces read in the Model you give it and yields one
    new Message, Preloaded, carrying the Messages that wrote it, so they reduce
    into the live Model as it is by then. It never fails, and refuses a Surface
    of another application when the Command is made. Remote.fold lifts it.

  • foldkit-site: head metadata from the tree. A node's meta (a function
    of its route and the Model, returning foldkit-ssr's Meta) and indexed
    flag, on Site.route or the Site.node builder. Site.metaOf(site, route, model) merges the route's chain root first, a deeper node's field replacing
    its ancestor's, the preview title falling back to the node's title, and an
    unindexed route noindex; it is an SSR plan's meta as it stands.
    Site.indexedOf reads the flag, which a node inherits from the nearest
    ancestor that declares it. foldkit-ssr is now a dependency, for the type.

  • foldkit-site: every address, and both directions, from the tree.
    Site.paths(node, list) lists a node's addresses from an Effect (with when
    each last changed), and Site.targets(site, paths) lists the whole site in
    tree order for a build, a sitemap or prefetch, refusing a node with params
    left unsaid. A tree's type now carries its routes: Site.parse(site, NotFound) is the application's URL parser and Site.hrefOf(site, route)
    builds an address back, refusing a route no node holds.
    Site.routeAt(site, url) is the route at an address, or None where no
    node takes it.

  • foldkit-site: Site.shortcuts, key bindings from the tree.
    Site.shortcuts(site, toMessage) is every node's shortcut as a
    Subscription.keyBindings binding sending the Message made of its
    landing target, refusing a shortcut with no landing or keys used twice.

  • foldkit-primitives: pointedLinks() in foldkit-primitives/dom, the
    address of each same-origin link the reader points at or tabs to, once
    while they stay on it: the trigger for reading a page ahead.

  • foldkit-site: Site.routing's arrived. What the application does
    once a new route is set and its routed pages are told, such as moving
    focus to what it drew; an echo of the shown address runs nothing.

  • foldkit-plus: every package in one install, and npx foldkit-plus setup.
    Each package's entry points are re-exported by subpath (foldkit-remote/port
    is foldkit-plus/remote/port), the namespaces most applications use from the
    root, and an adapter that needs a library of its own (React, Drizzle, Shiki,
    @foldkit/ui, Agent Native) is an optional peer, so none of those libraries
    is installed with it. setup prints, for the project it runs in, how to
    install Effect, Foldkit and Foldkit Plus with that project's package manager,
    which effect or foldkit version is wrong or missing, the agent skill, and
    which package does which job, written for a coding agent to follow.

  • foldkit-mixins: code colors in Theme.oklch. A syntax group colors
    each kind foldkit-richtext-code and foldkit-richtext-code-shiki name
    (syntax-keyword reads --fk-syntax-keyword), in hues the palette already
    has, readable in both schemes; syntaxChroma sets how colorful.

  • foldkit-mixins-ui: CodeBlock. Code with a title or language, line
    numbers and a copy button, its tokens (a foldkit-richtext-code tokenizer's
    { from, to, kind }) drawn by kind and colored by Recipes.CodeBlock from
    the theme's syntax group. The block's text is the code exactly.

Changed

  • foldkit-builder: a shortcut is judged in update. The layers and the
    canvas send KeyPressed for every key a command binds
    (PageBuilder.keyPressed), and update runs keyCommand against the Model
    as it is: a key pressed before the frame that drew a new selection deleted
    nothing, or the node selected before it. A bound key with nothing to do
    now has its default held back on those two. A view drawing a Builder by hand
    attaches keyPressed where it attached keyCommand, and a Builder handed
    to foldkit-mixins-builder's views must offer keyPressed too.
  • foldkit-site: Site.routing loads a link its tree does not hold. A
    tree is one application's document, so a click on an address of this
    origin that no node takes is a full load, where it was a Navigate Command
    that could only draw the application's NotFound.
  • foldkit-site: a node's shortcut is a Foldkit KeySequence. Write
    a sequence as an array (['G', 'H'], where it was 'GH') and one press as
    a string ('/', 'Mod+K'), as Subscription.keyBindings names keys.