Skip to main content

API Reference

Everything an application needs is exported from the dziry package:

import { signal, computed, cn, Window, Outlet, useRouter } from "dziry";

Deep import paths (dziry/runtime/signal.ts and similar) resolve because the compiler writes them into generated modules, but they are not public API. The supported surface is what the package's root export provides.

Build-time and run-time APIs​

The exports split into two groups that run at different times, and the split explains most errors you can hit:

  • Build time. Window, Outlet, cn, bind, useRoute and useRouter run inside the compiler and do not exist in the shipped app.
  • Run time. signal, computed, batch, isSignal and $ are the runtime.

They are exported together because they are written together — a page imports cn and the signal it conditions on from the same place. But the split is why a signal created inside a component has nowhere to live, and why an inline style with a non-static value is a build error rather than a silent drop.

Pages​

  • Signals — signal, computed, effect, batch, source, resource, and the rest of the runtime.
  • Markup — cn, bind, Fragment, props, inline styles, lists.
  • Window — Window, Outlet, and window configuration.
  • Routing — useRoute, useRouter, Href.
  • CLI — dziry compile, dziry dev, dziry build.

API status​

Each API below is marked done, partial or planned. The badges are generated at build time from the project's tracking table (API.md), so this page cannot disagree with it.

SurfaceStatus
signal computed batch isSignaldone
cn(...) conditional classesdone
.map(fn, { key }) keyed listsdone
inline style= (string + object)done
per-row conditional classes — cn({ done: t.done })done
text runs follow their element's predicatesdone
checked={t.done} in list rowsdone
ref()partial
bind:valuedone
form controls — <Checkbox> <Switch> <Radio> <Toggle> <Tabs> <Input>planned
<form> — payload by name, onSubmit, validate, onInvaliddone
alert() — the platform's modal message boxdone
confirm() / prompt()planned
effect untrack peek cleanup, createScope disposal scopesdone
Showdone
sourcedone
resource / <Suspense> / error boundariesdone
token() (context)planned
onFrame(dt)planned
<Overlay>planned
route table from windows/*/pages/**done
Href union codegendone
useRoute typing + path checkdone
useRouter().pathdone
bare signal reads — {count * 2}, computed(() => count === 7)done
signal.set(value | fn)done
useRouter().matches(path)done
<Window> / <Outlet>done
one table set per window, inactive routes hiddendone
navigate / backdone
useRoute params as bindingsdone
href checked against the route tabledone
route loader — sync fn | async fn | Effect; exits drive navigationdone
<Window layer={…}> — Effect Layer as the window's DI rootdone
handlers may return an Effect — run on the window's runtimedone
Redirect / Cancel navigation tagsdone
defineQuery / defineMutationplanned
<table> — table layout and elementsplanned
import "./app.css" from a window moduledone
Tailwind as an ordinary project dependencydone
<style> in an .html documentdone
default stylesheetplanned
<Checkbox> <Switch> <Radio> <Toggle> <Tabs>planned
:checked / :disabled variantsdone
checkbox and radio activation, radio groups, label forwardingdone
:indeterminateplanned
::before / ::after + contentdone
::picker(select)done
::picker-icon ::checkmark ::markerplanned
attribute selectors — [a] = ~= |= ^= $= *=, i flagdone
<input> <select> <option> <textarea> <label> … as real tagsdone
<select> closed, with UA-supplied <button> + <selectedcontent>done
select > option, option:first-childdone
<select> picker (open state)done
the overlay layer — paint after, hit-test beforedone
opening a picker costs no relayoutdone
:opendone
anchor positioning, collision handlingdone
a picker as wide as its selectdone
keyboard: which keys open a closed selectdone
keyboard: reaching a select at alldone
<optgroup>done
scroll-outside dismissal, type-to-selectplanned
accent-color caret-color appearancedone
<Input>planned
onSubmit receives the form's payloaddone
a named field with no bind:valuedone
validate={schema} — Zod, Valibot, ArkType, Effectdone
onInvaliddone
field="…" — nesting by wrapperdone
errorClassName + <span error />done
<span error="city" /> — a named message inside a groupdone
validateOn="submit|change|blur"done
the submitter's own name/value entrydone
form="id" associationdone
a field wrapper holding a map() — repeating rowsdone
a row's own error message — <span error /> in the templatedone
a row's own error **styling** — :invaliddone
a submit button switched off by disabled={signal}done
an alert() raised from a handler shows the frame that caused itdone
onChange vs onInputplanned
a click focusing a bound fielddone
an empty field is still one line highdone
::placeholderdone
a disabled field refuses focusdone
<input type=number|range> is typeabledone
a field's **width** from sizeplanned
caret — position, blink, caret-colordone
arrow keys, Home/Enddone
insert and delete *at* the caretdone
box-shadow — the ring subsetdone
currentcolordone
outline / outline-offsetplanned
selection — drag, Shift+Arrow, Shift+clickdone
double click for a word, triple click / Ctrl+A for alldone
editing over a selectiondone
::selectiondone
clipboard — Ctrl+C/X/V, ⌘ on macOSdone
IME, double-click-then-drag by wordplanned
a <label> click focusing a text fieldplanned
the caret, selection and open picker as ledger entriesdone
opacitydone
transform — translate* rotate scale* skew*done
translate / rotate / scale as their own propertiesdone
transform-origindone
hit-testing a transformed nodedone
a transform in a variant — hover:scale-110done
transition-* — property, duration, delay, timing functiondone
@keyframes and the animation shorthanddone
per-keyframe animation-timing-functiondone
easing — keywords, cubic-bezier(), steps()done
interrupting a transitiondone
prefers-reduced-motionplanned
persistent handles (timer, socket, watcher)planned
writes (fs, network, db)planned