ilha 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -1,4 +1,4 @@
1
- # ilha 0.16.1 — agent guide
1
+ # ilha 0.16.2 — agent guide
2
2
 
3
3
  Generated from `src/index.ts` by `scripts/agent-docs.ts`. Do not edit by hand.
4
4
 
package/MIGRATIONS.json CHANGED
@@ -91,6 +91,16 @@
91
91
  "docs": "https://ilha.build/reference/ilha",
92
92
  "before": "const ops: PaintOps<Node, El> = { createElement, createText, createRaw, placeChildren, appendRoot, asRoot, asNode, asElement, createSlotHost, disconnect, /* ... */ };",
93
93
  "after": "const ops: PaintOps<Node, El> = { createElement, createText, createRaw, placeChildren, morph /* optional: reuseNode, committed, setStyle, setFormControl, bindEvents */ };"
94
+ },
95
+ {
96
+ "id": "atom-writable-handle",
97
+ "kind": "changed",
98
+ "api": "AtomHandle, atom",
99
+ "import": "ilha",
100
+ "replacement": "AtomHandle<A, W = A> types .set and .update with the atom's write type. atom(Atom.fn(...)) returns AtomHandle<AsyncResult<A, E>, Arg>, so .set takes the fn argument; drop casts like `as never`. Annotations written as AtomHandle<AsyncResult<...>> for a writable atom need the second parameter.",
101
+ "docs": "https://ilha.build/guide/ui/state",
102
+ "before": "const save = atom(Atom.fn((draft: Draft) => saveDraft(draft)));\nsave.set(draft as never);",
103
+ "after": "const save = atom(Atom.fn((draft: Draft) => saveDraft(draft)));\nsave.set(draft);"
94
104
  }
95
105
  ]
96
106
  }
package/MIGRATIONS.md CHANGED
@@ -196,3 +196,24 @@ const ops: PaintOps<Node, El> = {
196
196
  morph /* optional: reuseNode, committed, setStyle, setFormControl, bindEvents */,
197
197
  };
198
198
  ```
199
+
200
+ ## AtomHandle, atom
201
+
202
+ - Status: changed
203
+ - Import: `ilha`
204
+ - Replacement: AtomHandle<A, W = A> types .set and .update with the atom's write type. atom(Atom.fn(...)) returns AtomHandle<AsyncResult<A, E>, Arg>, so .set takes the fn argument; drop casts like `as never`. Annotations written as AtomHandle<AsyncResult<...>> for a writable atom need the second parameter.
205
+ - Docs: https://ilha.build/guide/ui/state
206
+
207
+ Before:
208
+
209
+ ```ts
210
+ const save = atom(Atom.fn((draft: Draft) => saveDraft(draft)));
211
+ save.set(draft as never);
212
+ ```
213
+
214
+ After:
215
+
216
+ ```ts
217
+ const save = atom(Atom.fn((draft: Draft) => saveDraft(draft)));
218
+ save.set(draft);
219
+ ```
package/dist/debug.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as SnapshotValue } from "./snapshot-rTWQB3iQ.js";
1
+ import { t as SnapshotValue } from "./snapshot-BFdyCq2T.js";
2
2
  /** An atom value made JSON-safe: functions and Effects become `<…>` strings. */
3
3
  export type InspectValue = SnapshotValue | string;
4
4
  export interface IlhaInspectAtom {
package/dist/debug.js CHANGED
@@ -1,4 +1,4 @@
1
- import { r as rootListeners, t as liveRoots } from "./start-KNXoCAb9.js";
1
+ import { r as rootListeners, t as liveRoots } from "./start-j8x3mJSh.js";
2
2
  import { c as isObject, l as isString, o as isFunction, r as SLOT_ATTR } from "./shared-Bz14CT7Z.js";
3
3
  import * as Atom from "effect/reactivity/Atom";
4
4
  import * as Effect from "effect/Effect";
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { _ as View, a as Component, b as WatchOnceCleanup, f as MountOptions, h as UnsafeHtml, i as AtomOptions, l as Instruction, n as AtomHandle, r as AtomLazyOptions, s as Fragment, t as AtomEquality, v as WatchCallback, x as Yielded, y as WatchContext } from "./types-PD4B3pFq.js";
2
- import { t as h } from "./vnode-R5QcXzyp.js";
3
- import { r as watch } from "./runtime-Z5KugPXX.js";
4
- import { n as mount, r as renderToString, t as RenderToStringOptions } from "./mount-DWQcWHqc.js";
1
+ import { _ as View, a as Component, b as WatchOnceCleanup, f as MountOptions, h as UnsafeHtml, i as AtomOptions, l as Instruction, n as AtomHandle, r as AtomLazyOptions, s as Fragment, t as AtomEquality, v as WatchCallback, x as Yielded, y as WatchContext } from "./types-a9_yNjbT.js";
2
+ import { t as h } from "./vnode-rJ7hy6yD.js";
3
+ import { r as watch } from "./runtime-3jr7FulJ.js";
4
+ import { n as mount, r as renderToString, t as RenderToStringOptions } from "./mount-ChhKs7A2.js";
5
5
  import * as Atom from "effect/reactivity/Atom";
6
6
  import * as Effect from "effect/Effect";
7
7
  import * as Stream from "effect/Stream";
@@ -45,18 +45,23 @@ export declare const untrack: <A>(fn: () => A) => A;
45
45
  interface AtomFn {
46
46
  /** An effect or stream runs once; the handle holds its `AsyncResult`. */
47
47
  <A, E>(init: Effect.Effect<A, E, AtomRegistry> | Stream.Stream<A, E, AtomRegistry>, options?: AtomOptions<AsyncResult.AsyncResult<A, E>>): AtomHandle<AsyncResult.AsyncResult<A, E>>;
48
+ /**
49
+ * A writable Effect atom (`Atom.fn`, `Atom.make`, …). `.set` and `.update`
50
+ * take the atom's write type — the `Atom.fn` argument — not the read type.
51
+ */
52
+ <R, W>(init: Atom.Writable<R, W>, options?: AtomOptions<R>): AtomHandle<R, W>;
48
53
  /**
49
54
  * An existing Effect atom, or a plain value. Store a function with
50
55
  * `atom.lazy(() => fn)`; the `ilha/oxlint` rule `function-in-atom` flags
51
56
  * `atom(fn)`.
52
57
  */
53
58
  <A>(init: Atom.Atom<A> | A, options?: AtomOptions<A>): AtomHandle<A>;
54
- lazy: <A>(init: () => A, options?: AtomLazyOptions) => AtomHandle<A>;
59
+ lazy: <A>(init: () => A, options?: AtomLazyOptions<A>) => AtomHandle<A>;
55
60
  }
56
61
  export declare const atom: AtomFn;
57
62
  export declare const batch: (f: () => void) => void;
58
63
  /** Rerun `body` for every value of `stream`, replacing the previous run. */
59
- export declare const when: <A, E = never, R = never>(stream: Stream.Stream<A, E, R>, body: (value: A) => Generator<Yielded, View | undefined, View>) => Instruction<void, E>;
64
+ export declare const when: <A, E = never, R = never>(stream: Stream.Stream<A, E, R>, body: (value: A) => Generator<Yielded, View | undefined, View> | Generator<Yielded, void, View>) => Instruction<void, E>;
60
65
  /**
61
66
  * Mark a string as pre-rendered HTML and paint it without escaping.
62
67
  * Use it for markup you built or sanitized yourself — SVG from an external
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { _ as IlhaError, c as batch, d as untrack, f as wrapHandle, g as makeFiber, h as getFiber, i as runSetup, l as instr, m as closeFiber, o as interpret, p as clearFiberView, s as atom } from "./start-KNXoCAb9.js";
1
+ import { _ as IlhaError, c as batch, d as untrack, f as wrapHandle, g as makeFiber, h as getFiber, i as runSetup, l as instr, m as closeFiber, o as interpret, p as clearFiberView, s as atom } from "./start-j8x3mJSh.js";
2
2
  import { i as errorView, o as isFunction } from "./shared-Bz14CT7Z.js";
3
- import { n as unsafe } from "./paint-core-BDV_pKgC.js";
4
- import { r as renderToString, t as mount } from "./mount-CLPxbsAX.js";
3
+ import { n as unsafe } from "./paint-core-cWLlHxoA.js";
4
+ import { r as renderToString, t as mount } from "./mount-nRxVumCX.js";
5
5
  import { r as Fragment, t as h } from "./vnode-C_vM-l5s.js";
6
6
  import * as Atom from "effect/reactivity/Atom";
7
7
  import * as Effect from "effect/Effect";
@@ -67,9 +67,10 @@ const ErrorBoundary = (props) => {
67
67
  const ONCE = Symbol("ilha.watch.once");
68
68
  /**
69
69
  * Serial runs of one watch slot. Each run gets a fresh signal; starting the
70
- * next run or cancelling aborts it, which also runs its cleanups.
70
+ * next run or cancelling aborts it, which also runs its cleanups. `ssr`
71
+ * reports whether the slot's fiber renders on the server.
71
72
  */
72
- const makeRunner = () => {
73
+ const makeRunner = (ssr) => {
73
74
  let ctrl;
74
75
  const cancel = () => ctrl?.abort();
75
76
  return {
@@ -92,7 +93,8 @@ const makeRunner = () => {
92
93
  };
93
94
  const out = fn({
94
95
  onCleanup,
95
- signal
96
+ signal,
97
+ ssr
96
98
  });
97
99
  if (out instanceof Promise) settle(out);
98
100
  else onCleanup(out);
@@ -124,7 +126,7 @@ const watch = Object.assign((source, fn) => {
124
126
  const ref = { fn };
125
127
  const key = isFunction(source) ? source.atom : source;
126
128
  return useWatchSlot(key, ref, (fiber) => {
127
- const runner = makeRunner();
129
+ const runner = makeRunner(fiber.runtime.ssr);
128
130
  const emit = (value) => runner.run((ctx) => ref.fn(value, ctx));
129
131
  const stop = Stream.isStream(source) ? fiber.run(Stream.runForEach(source, (v) => Effect.sync(() => emit(v)))) : fiber.registry.subscribe(isFunction(source) ? source.atom : source, emit, { immediate: true });
130
132
  return () => {
@@ -132,8 +134,8 @@ const watch = Object.assign((source, fn) => {
132
134
  stop();
133
135
  };
134
136
  });
135
- }, { once: (fn) => useWatchSlot(ONCE, {}, () => {
136
- const runner = makeRunner();
137
+ }, { once: (fn) => useWatchSlot(ONCE, {}, (fiber) => {
138
+ const runner = makeRunner(fiber.runtime.ssr);
137
139
  runner.run(fn);
138
140
  return runner.cancel;
139
141
  }) });
@@ -151,7 +153,7 @@ const when = (stream, body) => instr(Effect.suspend(() => {
151
153
  return Stream.runForEach(parent.runtime.ssr ? Stream.take(base, 1) : base, (value) => Effect.sync(() => {
152
154
  stop();
153
155
  child = makeFiber(parent.runtime, parent.root, parent.paintFn, { parent });
154
- interpret(() => body(value), child);
156
+ interpret((() => body(value)), child);
155
157
  })).pipe(Effect.asVoid);
156
158
  }));
157
159
 
@@ -1,4 +1,4 @@
1
- import { s as Fragment } from "./types-PD4B3pFq.js";
2
- import { n as JSX } from "./vnode-R5QcXzyp.js";
1
+ import { s as Fragment } from "./types-a9_yNjbT.js";
2
+ import { n as JSX } from "./vnode-rJ7hy6yD.js";
3
3
  import { jsx, jsxDEV, jsxs } from "./jsx-runtime.js";
4
4
  export { Fragment, type JSX, jsx, jsxDEV, jsxs };
@@ -1,5 +1,5 @@
1
- import { _ as View, d as JsxComponent, o as ComponentFn, p as PropBag, s as Fragment } from "./types-PD4B3pFq.js";
2
- import { n as JSX, t as h } from "./vnode-R5QcXzyp.js";
1
+ import { _ as View, d as JsxComponent, o as ComponentFn, p as PropBag, s as Fragment } from "./types-a9_yNjbT.js";
2
+ import { n as JSX, t as h } from "./vnode-rJ7hy6yD.js";
3
3
  export declare const jsx: (type: string | Fragment | ComponentFn | JsxComponent, props: PropBag | null, key?: string | number) => ReturnType<typeof h>;
4
4
  export declare const jsxs: typeof jsx;
5
5
  export declare const jsxDEV: typeof jsx;
@@ -1,4 +1,4 @@
1
- import { a as Component, f as MountOptions } from "./types-PD4B3pFq.js";
1
+ import { a as Component, f as MountOptions } from "./types-a9_yNjbT.js";
2
2
  interface RenderToStringOptions {
3
3
  /** Embed atom state for hydration. Default `true`. */
4
4
  snapshot?: boolean;
@@ -1,6 +1,6 @@
1
- import { a as startRoot, v as ilhaError, y as ilhaWarn } from "./start-KNXoCAb9.js";
1
+ import { a as startRoot, v as ilhaError, y as ilhaWarn } from "./start-j8x3mJSh.js";
2
2
  import { c as isObject, n as KEY_ATTR, r as SLOT_ATTR } from "./shared-Bz14CT7Z.js";
3
- import { i as bindEvents, r as adoptEvents, t as createPainter } from "./paint-core-BDV_pKgC.js";
3
+ import { i as bindEvents, r as adoptEvents, t as createPainter } from "./paint-core-cWLlHxoA.js";
4
4
 
5
5
  // src/morph.ts
6
6
  const PRESERVE_ATTR = "data-morph-preserve";
@@ -1,4 +1,4 @@
1
- import { g as makeFiber, i as runSetup, m as closeFiber, n as notifyRoots, r as rootListeners, u as isAtomHandle, y as ilhaWarn } from "./start-KNXoCAb9.js";
1
+ import { g as makeFiber, i as runSetup, m as closeFiber, n as notifyRoots, r as rootListeners, u as isAtomHandle, y as ilhaWarn } from "./start-j8x3mJSh.js";
2
2
  import { a as hasBrand, c as isObject, d as skip, l as isString, n as KEY_ATTR, o as isFunction, p as unwrap, r as SLOT_ATTR, s as isIterable, t as KEEP, u as noop } from "./shared-Bz14CT7Z.js";
3
3
  import { n as isVNode, r as Fragment } from "./vnode-C_vM-l5s.js";
4
4
  import * as Effect from "effect/Effect";
@@ -1,5 +1,5 @@
1
- import { _ as View, a as Component, c as IlhaRuntime, m as PropValue, p as PropBag } from "./types-PD4B3pFq.js";
2
- import { n as getFiber, t as FiberLocal } from "./runtime-Z5KugPXX.js";
1
+ import { _ as View, a as Component, c as IlhaRuntime, m as PropValue, p as PropBag } from "./types-a9_yNjbT.js";
2
+ import { n as getFiber, t as FiberLocal } from "./runtime-3jr7FulJ.js";
3
3
  /** Structural element API shared by DOM `Element`, the SSR shim, and custom hosts. */
4
4
  interface PaintEl<Node> {
5
5
  readonly tagName: string;
package/dist/renderer.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as startRoot, h as getFiber } from "./start-KNXoCAb9.js";
2
- import { i as bindEvents, t as createPainter } from "./paint-core-BDV_pKgC.js";
1
+ import { a as startRoot, h as getFiber } from "./start-j8x3mJSh.js";
2
+ import { i as bindEvents, t as createPainter } from "./paint-core-cWLlHxoA.js";
3
3
 
4
4
  // src/renderer.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { _ as View, b as WatchOnceCleanup, c as IlhaRuntime, l as Instruction, n as AtomHandle, p as PropBag, v as WatchCallback, y as WatchContext } from "./types-PD4B3pFq.js";
2
- import "./snapshot-rTWQB3iQ.js";
1
+ import { _ as View, b as WatchOnceCleanup, c as IlhaRuntime, l as Instruction, n as AtomHandle, p as PropBag, v as WatchCallback, y as WatchContext } from "./types-a9_yNjbT.js";
2
+ import "./snapshot-BFdyCq2T.js";
3
3
  import * as Atom from "effect/reactivity/Atom";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as Stream from "effect/Stream";
@@ -1,4 +1,4 @@
1
- import { u as JsonText } from "./types-PD4B3pFq.js";
1
+ import { u as JsonText } from "./types-a9_yNjbT.js";
2
2
  /** JSON values accepted in SSR hydrate snapshots. */
3
3
  type SnapshotValue = JsonText | SnapshotObject | readonly SnapshotValue[];
4
4
  interface SnapshotObject {
@@ -2,6 +2,8 @@ import { a as hasBrand, f as toError, i as errorView, o as isFunction, u as noop
2
2
  import * as Atom from "effect/reactivity/Atom";
3
3
  import * as Effect from "effect/Effect";
4
4
  import * as Equal from "effect/Equal";
5
+ import * as Option from "effect/Option";
6
+ import * as Schema from "effect/Schema";
5
7
  import * as Stream from "effect/Stream";
6
8
  import * as Cause from "effect/Cause";
7
9
  import * as Context from "effect/Context";
@@ -347,9 +349,11 @@ const wrapHandle = (atom, fiber) => {
347
349
  /**
348
350
  * Claim the fiber's next primitive slot. A fresh slot is built by `make`,
349
351
  * seeded from the hydration snapshot when `snapshotted`; SSR records its
350
- * value so hydration can restore it in the same order.
352
+ * value so hydration can restore it in the same order. `schema` encodes the
353
+ * recorded value and decodes the seed; an undecodable seed falls back to
354
+ * the initial value.
351
355
  */
352
- const useSlot = (snapshotted, make) => {
356
+ const useSlot = (snapshotted, make, schema) => {
353
357
  const fiber = getFiber();
354
358
  const { runtime } = fiber;
355
359
  const i = fiber.primitiveI ?? 0;
@@ -357,14 +361,20 @@ const useSlot = (snapshotted, make) => {
357
361
  fiber.primitives ??= [];
358
362
  let a = fiber.primitives[i];
359
363
  if (!a) {
364
+ const codec = snapshotted && schema ? Schema.toCodecJson(schema) : void 0;
360
365
  let hydrated;
361
366
  if (snapshotted && runtime.hydrateValues) {
362
- hydrated = runtime.hydrateValues[runtime.hydrateI];
367
+ const seed = runtime.hydrateValues[runtime.hydrateI];
363
368
  runtime.hydrateI += 1;
369
+ if (codec === void 0) hydrated = seed;
370
+ else if (seed !== void 0) hydrated = Option.getOrUndefined(Schema.decodeUnknownOption(codec)(seed));
364
371
  }
365
372
  a = make(fiber, hydrated);
366
373
  fiber.primitives[i] = a;
367
- if (snapshotted && runtime.ssr) runtime.ssrValues.push(fiber.registry.get(a));
374
+ if (snapshotted && runtime.ssr) {
375
+ const value = fiber.registry.get(a);
376
+ runtime.ssrValues.push(codec ? Schema.encodeSync(codec)(value) : value);
377
+ }
368
378
  }
369
379
  return wrapHandle(a, fiber);
370
380
  };
@@ -388,8 +398,8 @@ const atom = Object.assign((init, options) => {
388
398
  const made = Atom.make(seed === void 0 ? init : seed);
389
399
  const eq = options?.equals;
390
400
  return holdState(fiber, eq ? Atom.withEquality(made, eq === "structural" ? Equal.equals : eq) : made);
391
- });
392
- }, { lazy: (init, options) => useSlot(options?.snapshot !== false, (fiber, seed) => holdState(fiber, Atom.make(seed === void 0 ? init() : seed))) });
401
+ }, options?.schema);
402
+ }, { lazy: (init, options) => useSlot(options?.snapshot !== false, (fiber, seed) => holdState(fiber, Atom.make(seed === void 0 ? init() : seed)), options?.schema) });
393
403
  const { batch } = Atom;
394
404
 
395
405
  // src/interpret.ts
package/dist/test.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { a as Component } from "./types-PD4B3pFq.js";
2
- import { t as SnapshotValue } from "./snapshot-rTWQB3iQ.js";
1
+ import { a as Component } from "./types-a9_yNjbT.js";
2
+ import { t as SnapshotValue } from "./snapshot-BFdyCq2T.js";
3
3
  import { IlhaInspectNode } from "./debug.js";
4
- import { t as RenderToStringOptions } from "./mount-DWQcWHqc.js";
4
+ import { t as RenderToStringOptions } from "./mount-ChhKs7A2.js";
5
5
  export interface RenderOptions {
6
6
  /** Render on the server first and inject the HTML into the container. Default `false`. */
7
7
  ssr?: boolean;
package/dist/test.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { f as toError, l as isString } from "./shared-Bz14CT7Z.js";
2
- import { n as mountWithRuntime, r as renderToString } from "./mount-CLPxbsAX.js";
2
+ import { n as mountWithRuntime, r as renderToString } from "./mount-nRxVumCX.js";
3
3
  import { inspect } from "./debug.js";
4
4
 
5
5
  // src/test.ts
@@ -1,3 +1,4 @@
1
+ import * as Schema from "effect/Schema";
1
2
  import { AtomRegistry } from "effect/reactivity/AtomRegistry";
2
3
  import { Closeable } from "effect/Scope";
3
4
  import { Effect, Stream } from "effect";
@@ -63,12 +64,12 @@ interface AtomView {
63
64
  readonly $$atom: 1;
64
65
  readonly atom: Atom.Atom<unknown>;
65
66
  }
66
- interface AtomHandle<A> {
67
+ interface AtomHandle<A, W = A> {
67
68
  readonly $$atom: 1;
68
69
  readonly atom: Atom.Atom<A>;
69
70
  (): A;
70
- set: (next: A) => void;
71
- update: (f: (current: A) => A) => void;
71
+ set: (next: W) => void;
72
+ update: (f: (current: A) => W) => void;
72
73
  }
73
74
  /** Equality for plain-value atoms. `"structural"` deep-compares JSON-shaped values. */
74
75
  type AtomEquality<A> = "structural" | ((prev: A, next: A) => boolean);
@@ -80,24 +81,40 @@ interface AtomOptions<A = unknown> {
80
81
  * starts from its initial value on hydration. Default `true`.
81
82
  */
82
83
  readonly snapshot?: boolean;
84
+ /**
85
+ * Codec for the SSR snapshot entry, for values plain JSON cannot
86
+ * round-trip (dates, maps, branded types). SSR encodes the snapshot value
87
+ * and hydration decodes the seed; a seed that fails to decode falls back
88
+ * to the initial value. Plain values only.
89
+ */
90
+ readonly schema?: Schema.ConstraintCodec<NoInfer<A>, unknown>;
83
91
  }
84
92
  /** Options for `atom.lazy()`. */
85
- interface AtomLazyOptions {
93
+ interface AtomLazyOptions<A = unknown> {
86
94
  /**
87
95
  * Set `false` to keep the slot out of the SSR snapshot, for timers,
88
96
  * observers, and other mutable refs. Default `true`.
89
97
  */
90
98
  readonly snapshot?: boolean;
99
+ /**
100
+ * Codec for the SSR snapshot entry, for values plain JSON cannot
101
+ * round-trip (dates, maps, branded types). SSR encodes the snapshot value
102
+ * and hydration decodes the seed; a seed that fails to decode falls back
103
+ * to the initial value.
104
+ */
105
+ readonly schema?: Schema.ConstraintCodec<NoInfer<A>, unknown>;
91
106
  }
92
107
  /** Optional disposer returned from `watch.once`. */
93
108
  type WatchOnceCleanup = () => void;
94
109
  /**
95
110
  * Cancellation context handed to watch callbacks. `signal` aborts when the
96
111
  * run goes stale (a newer value arrives), on unmount, or on slot disposal.
97
- * Register extra teardowns with `onCleanup`.
112
+ * Register extra teardowns with `onCleanup`. `ssr` is `true` while
113
+ * `renderToString` runs the callback; skip browser-only work then.
98
114
  */
99
115
  interface WatchContext {
100
116
  readonly signal: AbortSignal;
117
+ readonly ssr: boolean;
101
118
  onCleanup: (fn: () => void) => void;
102
119
  }
103
120
  type WatchCallback<A> = (value: A, ctx: WatchContext) => WatchOnceCleanup | undefined | Promise<WatchOnceCleanup | undefined>;
@@ -1,4 +1,4 @@
1
- import { _ as View, d as JsxComponent, g as VNode, n as AtomHandle, o as ComponentFn, p as PropBag, s as Fragment } from "./types-PD4B3pFq.js";
1
+ import { _ as View, d as JsxComponent, g as VNode, n as AtomHandle, o as ComponentFn, p as PropBag, s as Fragment } from "./types-a9_yNjbT.js";
2
2
  declare namespace JSX {
3
3
  export type Element = View;
4
4
  export type ElementType = string | ((props: never) => View | Promise<View | undefined> | Generator<View, View | undefined, View> | undefined);
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # ilha
2
2
 
3
- > Tiny, isomorphic islands UI library on Effect 4. Function components, order-based `atom()` slots, JSX, SSR via `renderToString`, hydration via `mount(host, C, { hydrate: true })`. Version 0.16.1.
3
+ > Tiny, isomorphic islands UI library on Effect 4. Function components, order-based `atom()` slots, JSX, SSR via `renderToString`, hydration via `mount(host, C, { hydrate: true })`. Version 0.16.2.
4
4
 
5
5
  Start with the canonical-usage table: exactly one API per task, plus a never-do list.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ilha",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "Generator-first island UI on Effect",
5
5
  "keywords": [
6
6
  "effect",