Repository navigation
v0.18.0
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 fromupdate.satisfyas 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.foldlifts it. -
foldkit-site: head metadata from the tree. A node'smeta(a function
of its route and the Model, returningfoldkit-ssr'sMeta) andindexed
flag, onSite.routeor theSite.nodebuilder.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'stitle, and an
unindexed routenoindex; it is an SSR plan'smetaas it stands.
Site.indexedOfreads the flag, which a node inherits from the nearest
ancestor that declares it.foldkit-ssris 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), andSite.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 andSite.hrefOf(site, route)
builds an address back, refusing a route no node holds.
Site.routeAt(site, url)is the route at an address, orNonewhere 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.keyBindingsbinding sending the Message made of its
landing target, refusing a shortcut with no landing or keys used twice. -
foldkit-primitives:pointedLinks()infoldkit-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'sarrived. 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, andnpx foldkit-plus setup.
Each package's entry points are re-exported by subpath (foldkit-remote/port
isfoldkit-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.setupprints, for the project it runs in, how to
install Effect, Foldkit and Foldkit Plus with that project's package manager,
whicheffectorfoldkitversion is wrong or missing, the agent skill, and
which package does which job, written for a coding agent to follow. -
foldkit-mixins: code colors inTheme.oklch. Asyntaxgroup colors
each kindfoldkit-richtext-codeandfoldkit-richtext-code-shikiname
(syntax-keywordreads--fk-syntax-keyword), in hues the palette already
has, readable in both schemes;syntaxChromasets how colorful. -
foldkit-mixins-ui:CodeBlock. Code with a title or language, line
numbers and a copy button, its tokens (afoldkit-richtext-codetokenizer's
{ from, to, kind }) drawn by kind and colored byRecipes.CodeBlockfrom
the theme'ssyntaxgroup. The block's text is the code exactly.
Changed
foldkit-builder: a shortcut is judged inupdate. The layers and the
canvas sendKeyPressedfor every key a command binds
(PageBuilder.keyPressed), andupdaterunskeyCommandagainst 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
attacheskeyPressedwhere it attachedkeyCommand, and a Builder handed
tofoldkit-mixins-builder's views must offerkeyPressedtoo.foldkit-site:Site.routingloads 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'sshortcutis a FoldkitKeySequence. Write
a sequence as an array (['G', 'H'], where it was'GH') and one press as
a string ('/','Mod+K'), asSubscription.keyBindingsnames keys.