doxum 0.1.18 → 0.1.19

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/README.md CHANGED
@@ -279,6 +279,24 @@ import { incremental } from 'doxum/advanced';
279
279
  const doubled = incremental.collection([tasks], ({ sources, output }) => {
280
280
  for (const [id, task] of sources[0]) output.set(id, task.value * 2);
281
281
  });
282
+
283
+ const render = incremental.group(
284
+ [tasks],
285
+ define => ({
286
+ node: {
287
+ shell: define.collection<string, { readonly title: string }>(),
288
+ content: define.collection<string, string>(),
289
+ },
290
+ labels: define.collection<string, string>(),
291
+ }),
292
+ ({ sources, outputs }) => {
293
+ for (const [id, task] of sources[0]) {
294
+ outputs.node.shell.set(id, { title: task.title });
295
+ outputs.node.content.set(id, task.title);
296
+ outputs.labels.set(id, task.title);
297
+ }
298
+ }
299
+ );
282
300
  ```
283
301
 
284
302
  Incremental processors receive a dependency-aligned `changes` tuple. Collection
@@ -286,6 +304,12 @@ entries carry `added`/`updated`/`removed` transitions with complete
286
304
  `before`/`after` values, so a processor can patch indexes without rescanning the
287
305
  collection; scalar dependencies use `undefined` and the initial collection build
288
306
  reports `{ kind: 'reset' }`.
307
+ `incremental.group` runs one processor for several named keyed collection outputs.
308
+ Its static nested namespace is only API organization: every leaf is an ordinary
309
+ `Projection`, all leaves publish atomically in one causal settle, and downstream
310
+ processors depend directly on those leaves. A group materializes as a whole when
311
+ any leaf is first read; split groups when outputs do not share computation or
312
+ atomicity requirements. There is no output event bus or per-output runtime.
289
313
 
290
314
  In React, `useProjection(projection)` reads a value and
291
315
  `useProjection(projection, selector, equality?)` tracks keyed reads such as