foldkit@0.112.0
Minor Changes
-
34c4025: Add a
closeButtonbundle to theUi.Dialogrender info. Spread it onto an in-panel
dismiss control such as a Cancel or close button to close the dialog without
wiring up a parent message. It carries the sameOnClickclose handler as the
backdrop, including the suppression that keeps a click from interrupting a leave
animation. -
a481ddb: Split UI components and the in-browser DevTools overlay out of core.
The 24 UI components move from
foldkit/ui/*to the new@foldkit/uipackage, and the DevTools overlay moves to the new@foldkit/devtoolspackage. Breaking changes in either no longer force a core version bump.Migration:
-
Component usage moves to named imports from the new package:
import { Ui } from 'foldkit'withUi.Button.view(...)becomesimport { Button } from '@foldkit/ui'withButton.view(...). Thefoldkit/ui/buttonsubpath becomes@foldkit/ui/button. Add@foldkit/uito your dependencies. When a component name collides with another import (for example core'sCalendar), alias it:import { Calendar as UiCalendar } from '@foldkit/ui'. -
The DevTools overlay is now opt-in.
devTools: true(or adevToolsconfig object) still records history and serves the WebSocket bridge for the DevTools MCP server, but no longer mounts the in-browser panel on its own. To show the panel, install@foldkit/devtoolsand pass its overlay factory:import { overlay } from '@foldkit/devtools' Runtime.makeApplication({ // ... devTools: { Message, overlay }, })
New public surface on core to support the split: the
foldkit/submodelsubpath,foldkit/devtools-host(the instrumentation API the overlay builds on), andDevToolsOverlay/DevToolsPositionfromfoldkit/runtime. -
Patch Changes
- 34c4025: Dialog now returns focus when it closes. Opening a dialog records the element
that had focus, and closing it restores focus there, so dismissing a dialog
returns to its trigger and closing a stacked dialog returns to the one beneath
it. The component opens withshow()rather thanshowModal(), so it does this
restoration itself rather than relying on the browser. - 34c4025: Fix Escape and Tab handling when more than one Dialog is open at once. Only
the topmost dialog now responds, so Escape closes stacked dialogs from the top
down and focus stays trapped in the frontmost dialog.