doxum 0.1.18 → 0.1.20
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 +38 -3
- package/dist/{scope-d-L87NeC.js → access-B9XDWjHy.js} +54 -2
- package/dist/access-B9XDWjHy.js.map +1 -0
- package/dist/{scope-Ezs-Y3TY.cjs → access-EQ-XiFyl.cjs} +89 -1
- package/dist/access-EQ-XiFyl.cjs.map +1 -0
- package/dist/advanced-BIGP86NL.cjs +1361 -0
- package/dist/advanced-BIGP86NL.cjs.map +1 -0
- package/dist/advanced-Bcle5C2M.js +1188 -0
- package/dist/advanced-Bcle5C2M.js.map +1 -0
- package/dist/{advanced-c0F3gpLG.d.ts → advanced-CSjF-u_k.d.cts} +50 -12
- package/dist/{advanced-GTwIWcn6.d.cts → advanced-Du3O8O1A.d.ts} +50 -12
- package/dist/advanced.cjs +1 -1
- package/dist/advanced.d.cts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +1 -1
- package/dist/{contract-XmKnroJq.d.cts → contract-BDQth1pe.d.cts} +4 -4
- package/dist/{contract-CATCCVu5.d.ts → contract-BlEl8Ibo.d.ts} +4 -4
- package/dist/{driver-BCyfqxsl.cjs → driver-DRoWiadc.cjs} +1 -1
- package/dist/{driver-BCyfqxsl.cjs.map → driver-DRoWiadc.cjs.map} +1 -1
- package/dist/{driver-CSnhMjbP.js → driver-DiN-0Mnc.js} +1 -1
- package/dist/{driver-CSnhMjbP.js.map → driver-DiN-0Mnc.js.map} +1 -1
- package/dist/index.cjs +1181 -2114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1133 -2066
- package/dist/index.js.map +1 -1
- package/dist/{integration-CxVhq-KD.js → integration-DHxVpbxc.js} +3 -2
- package/dist/{integration-CxVhq-KD.js.map → integration-DHxVpbxc.js.map} +1 -1
- package/dist/{integration-B7VDgAOJ.cjs → integration-DL6dLuu1.cjs} +4 -3
- package/dist/{integration-B7VDgAOJ.cjs.map → integration-DL6dLuu1.cjs.map} +1 -1
- package/dist/integration.cjs +2 -2
- package/dist/integration.d.cts +1 -1
- package/dist/integration.d.ts +1 -1
- package/dist/integration.js +2 -2
- package/dist/local-sync.cjs +1 -1
- package/dist/local-sync.d.cts +1 -1
- package/dist/local-sync.d.ts +1 -1
- package/dist/local-sync.js +1 -1
- package/dist/{notification-IQIJyH3Q.js → notification-AXT94XYC.js} +2 -55
- package/dist/notification-AXT94XYC.js.map +1 -0
- package/dist/{notification-CDSUfiip.cjs → notification-DGv-_G9t.cjs} +1 -90
- package/dist/notification-DGv-_G9t.cjs.map +1 -0
- package/dist/react.cjs +2 -2
- package/dist/react.js +2 -2
- package/package.json +1 -1
- package/skills/doxum-runtime/SKILL.md +2 -1
- package/skills/doxum-runtime/references/projections.en.md +41 -3
- package/skills/doxum-runtime/references/projections.zh-CN.md +36 -2
- package/dist/advanced-DgRnyRAc.js +0 -233
- package/dist/advanced-DgRnyRAc.js.map +0 -1
- package/dist/advanced-Dgu8-bPS.cjs +0 -274
- package/dist/advanced-Dgu8-bPS.cjs.map +0 -1
- package/dist/notification-CDSUfiip.cjs.map +0 -1
- package/dist/notification-IQIJyH3Q.js.map +0 -1
- package/dist/scope-Ezs-Y3TY.cjs.map +0 -1
- package/dist/scope-d-L87NeC.js.map +0 -1
package/README.md
CHANGED
|
@@ -240,7 +240,7 @@ one Runtime. Collection values are
|
|
|
240
240
|
immutable `ReadonlyMap`-like snapshots, while a `Readable` owns selector
|
|
241
241
|
tracking, equality and subscription lifecycle.
|
|
242
242
|
|
|
243
|
-
Local projections
|
|
243
|
+
Local projections share the parent Runtime's scheduler and materialization owner:
|
|
244
244
|
|
|
245
245
|
```ts
|
|
246
246
|
const scope = runtime.scope();
|
|
@@ -249,7 +249,7 @@ const localVisible = scope.derive([tasks, localFilter], (tasks, filter) =>
|
|
|
249
249
|
filter === 'all' ? tasks : new Map([...tasks].filter(([, task]) => !task.done))
|
|
250
250
|
);
|
|
251
251
|
scope.get(localVisible);
|
|
252
|
-
scope.dispose(); // Releases local
|
|
252
|
+
scope.dispose(); // Releases local producers, state and subscriptions; parent tasks remain.
|
|
253
253
|
```
|
|
254
254
|
|
|
255
255
|
For Runtime-local keyed state, `input.collection` publishes the same exact
|
|
@@ -267,7 +267,10 @@ runtime.update(overrides, draft => {
|
|
|
267
267
|
|
|
268
268
|
`observe` is the single source boundary for documents, Doxum `Readable` values,
|
|
269
269
|
and eventful external sources. External sources declare `kind: 'value'` or
|
|
270
|
-
`kind: 'collection'`; collection invalidation remains keyed internally.
|
|
270
|
+
`kind: 'collection'`; collection invalidation remains keyed internally. Schema
|
|
271
|
+
`map`, `table`, and `list(field, { keyOf })` paths are all observed as keyed
|
|
272
|
+
collection projections. A schema `list` uses its `keyOf` identity and publishes
|
|
273
|
+
in document order; ordinary array-valued `field(...)` nodes remain scalar values.
|
|
271
274
|
|
|
272
275
|
For retained state, reverse indexes and keyed patches, use the isolated advanced
|
|
273
276
|
entry point. Whole-value processors use `incremental(...)`; keyed collection
|
|
@@ -279,6 +282,28 @@ import { incremental } from 'doxum/advanced';
|
|
|
279
282
|
const doubled = incremental.collection([tasks], ({ sources, output }) => {
|
|
280
283
|
for (const [id, task] of sources[0]) output.set(id, task.value * 2);
|
|
281
284
|
});
|
|
285
|
+
|
|
286
|
+
const render = incremental.group(
|
|
287
|
+
[tasks],
|
|
288
|
+
define => ({
|
|
289
|
+
node: {
|
|
290
|
+
shell: define.collection<string, { readonly title: string }>(),
|
|
291
|
+
content: define.collection<string, string>(),
|
|
292
|
+
},
|
|
293
|
+
labels: define.collection<string, string>(),
|
|
294
|
+
chrome: define.value<{ readonly count: number }>(),
|
|
295
|
+
revision: define.value<number>(),
|
|
296
|
+
}),
|
|
297
|
+
({ sources, outputs }) => {
|
|
298
|
+
for (const [id, task] of sources[0]) {
|
|
299
|
+
outputs.node.shell.set(id, { title: task.title });
|
|
300
|
+
outputs.node.content.set(id, task.title);
|
|
301
|
+
outputs.labels.set(id, task.title);
|
|
302
|
+
}
|
|
303
|
+
outputs.chrome.set({ count: sources[0].size });
|
|
304
|
+
outputs.revision.set(sources[0].size);
|
|
305
|
+
}
|
|
306
|
+
);
|
|
282
307
|
```
|
|
283
308
|
|
|
284
309
|
Incremental processors receive a dependency-aligned `changes` tuple. Collection
|
|
@@ -286,6 +311,16 @@ entries carry `added`/`updated`/`removed` transitions with complete
|
|
|
286
311
|
`before`/`after` values, so a processor can patch indexes without rescanning the
|
|
287
312
|
collection; scalar dependencies use `undefined` and the initial collection build
|
|
288
313
|
reports `{ kind: 'reset' }`.
|
|
314
|
+
`incremental.group` runs one processor for several named value and keyed collection
|
|
315
|
+
outputs. `define.collection<K, V>(equality?)` creates a keyed leaf;
|
|
316
|
+
`define.value<T>(equality?)` creates an ordinary scalar projection leaf. On an
|
|
317
|
+
initial build or rebuild every value leaf must be set; on an incremental update an
|
|
318
|
+
untouched value leaf keeps its published value. Its static nested namespace is only
|
|
319
|
+
API organization: every leaf is an ordinary `Projection`, all changed leaves publish
|
|
320
|
+
atomically in one causal settle, and downstream processors depend directly on those
|
|
321
|
+
leaves. All leaves reference one producer, so reading any leaf materializes that
|
|
322
|
+
producer once; split groups when outputs do not share computation or atomicity
|
|
323
|
+
requirements. There is no group runtime, output event bus, or per-output runtime.
|
|
289
324
|
|
|
290
325
|
In React, `useProjection(projection)` reads a value and
|
|
291
326
|
`useProjection(projection, selector, equality?)` tracks keyed reads such as
|
|
@@ -717,6 +717,58 @@ const collectionAccess = (context, at) => {
|
|
|
717
717
|
return value;
|
|
718
718
|
};
|
|
719
719
|
//#endregion
|
|
720
|
-
|
|
720
|
+
//#region core/src/runtime/contract.ts
|
|
721
|
+
var DocumentReentrancyError = class extends Error {
|
|
722
|
+
constructor() {
|
|
723
|
+
super("Document writes cannot be re-entered during an update or notification.");
|
|
724
|
+
this.name = "DocumentReentrancyError";
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
var DocumentDisposedError = class extends Error {
|
|
728
|
+
constructor() {
|
|
729
|
+
super("Doxum runtime has been disposed.");
|
|
730
|
+
this.name = "DocumentDisposedError";
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
var TransactionRejected = class extends Error {
|
|
734
|
+
issues;
|
|
735
|
+
constructor(input) {
|
|
736
|
+
super("Document update rejected.");
|
|
737
|
+
this.name = "TransactionRejected";
|
|
738
|
+
const issues = Array.isArray(input) ? input : [input];
|
|
739
|
+
this.issues = Object.freeze(issues.map((issue) => Object.freeze({
|
|
740
|
+
code: issue.code,
|
|
741
|
+
message: issue.message,
|
|
742
|
+
source: "application",
|
|
743
|
+
...issue.address === void 0 ? {} : { address: Object.freeze([...issue.address]) }
|
|
744
|
+
})));
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region core/src/runtime/access.ts
|
|
749
|
+
const states = /* @__PURE__ */ new WeakMap();
|
|
750
|
+
const bindRuntimeAccess = (runtime, state) => {
|
|
751
|
+
states.set(runtime, state);
|
|
752
|
+
};
|
|
753
|
+
const accessOf = (runtime) => {
|
|
754
|
+
const state = states.get(runtime);
|
|
755
|
+
if (!state) throw new Error("Unknown Doxum runtime.");
|
|
756
|
+
return state;
|
|
757
|
+
};
|
|
758
|
+
const readWith = (runtime, run, dependencies) => {
|
|
759
|
+
const state = accessOf(runtime);
|
|
760
|
+
if (state.disposed) throw new DocumentDisposedError();
|
|
761
|
+
state.projectionLocks = (state.projectionLocks ?? 0) + 1;
|
|
762
|
+
try {
|
|
763
|
+
return run(createAccess({
|
|
764
|
+
state,
|
|
765
|
+
dependencies
|
|
766
|
+
}));
|
|
767
|
+
} finally {
|
|
768
|
+
state.projectionLocks--;
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
//#endregion
|
|
772
|
+
export { DocumentReentrancyError as a, createAccess as c, ParseError as d, checkKey as f, parse as g, equalValue as h, DocumentDisposedError as i, replace as l, copyValue as m, bindRuntimeAccess as n, TransactionRejected as o, checkValue as p, readWith as r, collectionAccess as s, accessOf as t, snapshot as u };
|
|
721
773
|
|
|
722
|
-
//# sourceMappingURL=
|
|
774
|
+
//# sourceMappingURL=access-B9XDWjHy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access-B9XDWjHy.js","names":["anchor.keys","validTree","anchor.equal","remove","anchor.valid","index","anchor.index","remove","replace","insert","keys","anchor.keys","anchor.valid","anchor.index","replace","anchor.indexedKeys","remove","replace","move","keys","anchor.keys","anchor.valid","anchor.afterRemove","anchor.indexedKeys","tree.contains","tree.parent","children","tree.children"],"sources":["../core/src/schema-value.ts","../core/src/mutation/operations/map.ts","../core/src/mutation/operations/table.ts","../core/src/mutation/operations/list.ts","../core/src/mutation/operations/tree.ts","../core/src/mutation/operations/order.ts","../core/src/access/scope.ts","../core/src/runtime/contract.ts","../core/src/runtime/access.ts"],"sourcesContent":["import type { DocumentAddress, DocumentNode, Infer } from './schema';\nimport { compiledShape } from './address';\nimport { isPlainObject, isRecord } from './value/ownership';\nimport { validate as validTree } from './mutation/tree';\nimport * as anchor from './mutation/anchor';\nimport { profile } from './profile';\n\n/** Pure synchronous validation. Successful output is ignored; input is never transformed. */\nexport type Validator<T> =\n | ((value: unknown) => T)\n | {\n readonly '~standard': {\n readonly version: 1;\n readonly vendor: string;\n readonly types?: { readonly input: unknown; readonly output: T };\n validate(value: unknown):\n | { readonly value: T; readonly issues?: undefined }\n | {\n readonly issues: readonly {\n readonly message: string;\n readonly path?: readonly (PropertyKey | { readonly key: PropertyKey })[];\n }[];\n }\n | PromiseLike<unknown>;\n };\n };\n\nexport type ParseIssue = {\n readonly address: DocumentAddress;\n readonly code: 'invalid-value' | 'invalid-key' | 'missing-validator' | 'invalid-tree';\n readonly message: string;\n};\nexport class ParseError extends TypeError {\n readonly issues: readonly ParseIssue[];\n constructor(issue: ParseIssue) {\n super(`${issue.message} at ${JSON.stringify(issue.address)}`);\n this.name = 'ParseError';\n this.issues = Object.freeze([\n Object.freeze({ ...issue, address: Object.freeze([...issue.address]) }),\n ]);\n }\n}\n\nconst issue = (\n address: DocumentAddress,\n message: string,\n code: ParseIssue['code'] = 'invalid-value'\n): ParseIssue => ({ address, message, code });\n\nexport const checkScalar = (\n validator: Validator<unknown> | undefined,\n value: unknown,\n address: DocumentAddress,\n strict: boolean\n): ParseIssue | undefined => {\n if (!validator)\n return strict\n ? issue(address, 'A validator is required to parse an opaque value.', 'missing-validator')\n : undefined;\n try {\n const result =\n typeof validator === 'function' ? validator(value) : validator['~standard'].validate(value);\n if (\n result &&\n (typeof result === 'object' || typeof result === 'function') &&\n 'then' in result &&\n typeof result.then === 'function'\n )\n return issue(address, 'Validators must be synchronous.');\n if (typeof validator !== 'function') {\n if (!isRecord(result)) return issue(address, 'Malformed validator result.');\n if (Array.isArray(result.issues)) {\n const first = result.issues[0];\n return issue(\n [\n ...address,\n ...(first?.path ?? []).map((part: PropertyKey | { key: PropertyKey }) =>\n String(typeof part === 'object' ? part.key : part)\n ),\n ],\n first?.message ?? 'Value validation failed.'\n );\n }\n if (!Object.hasOwn(result, 'value')) return issue(address, 'Malformed validator result.');\n }\n return undefined;\n } catch (error) {\n return issue(address, error instanceof Error ? error.message : 'Value validation failed.');\n }\n};\n\nexport const checkKey = (\n validator: Validator<string> | undefined,\n value: unknown,\n address: DocumentAddress\n): ParseIssue | undefined => {\n if (typeof value !== 'string')\n return issue(address, 'Collection keys must be strings.', 'invalid-key');\n const failure = checkScalar(validator, value, address, false);\n return failure ? { ...failure, code: 'invalid-key' } : undefined;\n};\n\nexport const checkValue = (\n node: DocumentNode,\n value: unknown,\n address: DocumentAddress = [],\n strict = false\n): ParseIssue | undefined => {\n if (node.optional && value === undefined) return undefined;\n if (node.kind === 'field') return checkScalar(node.validator, value, address, strict);\n if (node.kind === 'object' || node.kind === 'variant') {\n if (!isPlainObject(value)) return issue(address, 'Expected an object.');\n if (node.kind === 'variant') {\n const tag = value[node.tag];\n if (\n !Object.hasOwn(value, node.tag) ||\n typeof tag !== 'string' ||\n !Object.hasOwn(node.variants, tag)\n )\n return issue([...address, node.tag], 'Unknown variant tag.');\n }\n const { members } = compiledShape(node, value)!;\n for (const key of Reflect.ownKeys(value)) {\n if (node.kind === 'variant' && key === node.tag) continue;\n if (typeof key !== 'string' || !members.has(key))\n return issue([...address, String(key)], 'Property is not declared in the object schema.');\n }\n for (const [key, member] of members) {\n const child = member.node;\n if (!Object.prototype.hasOwnProperty.call(value, key) && !child.optional)\n return issue([...address, key], 'Required property is missing.');\n const failure = checkValue(child, value[key], [...address, key], strict);\n if (failure) return failure;\n }\n return undefined;\n }\n if (node.kind === 'table' || node.kind === 'map') {\n if (!isPlainObject(value)) return issue(address, 'Expected a collection object.');\n const entries = node.kind === 'table' ? value.byId : value;\n if (!isPlainObject(entries)) return issue(address, 'Expected a byId object.');\n if (node.kind === 'table') {\n if (!Array.isArray(value.ids) || value.ids.length !== Object.keys(entries).length)\n return issue(address, 'Table ids and entries must agree.');\n const seen = new Set<string>();\n for (const id of value.ids) {\n const failure = checkKey(node.key, id, address);\n if (failure) return failure;\n if (seen.has(id) || !Object.prototype.hasOwnProperty.call(entries, id))\n return issue(address, 'Table ids must be unique and reference existing entries.');\n seen.add(id);\n }\n }\n for (const id of Object.keys(entries)) {\n const failure =\n checkKey(node.key, id, [...address, id]) ??\n checkValue(node.value, entries[id], [...address, id], strict);\n if (failure) return failure;\n }\n return undefined;\n }\n if (node.kind === 'list') {\n if (!Array.isArray(value)) return issue(address, 'Expected a list.');\n const seen = new Set<string>();\n const order = anchor.keys(value, node.keyOf);\n for (let i = 0; i < value.length; i++) {\n const failure = checkValue(node.value, value[i], [...address, String(i)], strict);\n if (failure) return failure;\n let key: unknown;\n try {\n key = order.at(i);\n } catch {\n return issue(address, 'List keyOf failed.');\n }\n if (typeof key !== 'string' || seen.has(key))\n return issue(address, 'List keys must be unique strings.', 'invalid-key');\n seen.add(key);\n }\n return undefined;\n }\n if (!validTree(value)) return issue(address, 'Invalid tree structure.', 'invalid-tree');\n if (isRecord(value) && isRecord(value.nodes)) {\n for (const id of Object.keys(value.nodes)) {\n const entry = value.nodes[id];\n if (isRecord(entry) && Object.prototype.hasOwnProperty.call(entry, 'value')) {\n const failure = checkValue(node.value, entry.value, [...address, id], strict);\n if (failure) return failure;\n }\n }\n }\n return undefined;\n};\n\n/** Copy editable structure; atomic payloads retain their immutable ownership contract. */\nexport const copyValue = (node: DocumentNode, value: unknown): unknown => {\n if (value === undefined || node.kind === 'field') return value;\n profile.copy.structure();\n if ((node.kind === 'object' || node.kind === 'variant') && isRecord(value)) {\n const result = Object.create(Object.getPrototypeOf(value));\n const { members } = compiledShape(node, value)!;\n for (const key of Object.getOwnPropertyNames(value)) {\n Object.defineProperty(result, key, {\n value:\n node.kind === 'variant' && key === node.tag\n ? value[key]\n : copyValue(members.get(key)!.node, value[key]),\n writable: true,\n enumerable: Object.getOwnPropertyDescriptor(value, key)?.enumerable,\n configurable: true,\n });\n }\n return result;\n }\n if ((node.kind === 'table' || node.kind === 'map') && isRecord(value)) {\n const entries = (node.kind === 'table' ? value.byId : value) as Record<string, unknown>;\n const result = Object.fromEntries(\n Object.keys(entries).map(id => [id, copyValue(node.value, entries[id])])\n );\n return node.kind === 'table' ? { ids: [...(value.ids as string[])], byId: result } : result;\n }\n if (node.kind === 'list') return [...(value as unknown[])];\n if (node.kind === 'tree' && isRecord(value)) {\n const entries = value.nodes as Record<string, { children: readonly string[] }>;\n return {\n ...value,\n nodes: Object.fromEntries(\n Object.entries(entries).map(([id, n]) => [id, { ...n, children: [...n.children] }])\n ),\n };\n }\n return value;\n};\n\nexport const equalValue = (node: DocumentNode, left: unknown, right: unknown): boolean => {\n if (Object.is(left, right)) return true;\n if (node.kind === 'field' || left === undefined || right === undefined) return false;\n if ((node.kind === 'object' || node.kind === 'variant') && isRecord(left) && isRecord(right)) {\n if (node.kind === 'variant' && left[node.tag] !== right[node.tag]) return false;\n for (const [key, member] of compiledShape(node, left)!.members) {\n if (Object.hasOwn(left, key) !== Object.hasOwn(right, key)) return false;\n if (!equalValue(member.node, left[key], right[key])) return false;\n }\n return true;\n }\n if (node.kind === 'list' && Array.isArray(left) && Array.isArray(right))\n return (\n left.length === right.length && left.every((v, i) => equalValue(node.value, v, right[i]))\n );\n if (node.kind === 'table' && isRecord(left) && isRecord(right))\n return (\n anchor.equal(left.ids as string[], right.ids as string[]) &&\n equalValue({ kind: 'map', value: node.value }, left.byId, right.byId)\n );\n if (node.kind === 'tree' && isRecord(left) && isRecord(right)) {\n if (left.rootId !== right.rootId) return false;\n const a = left.nodes as Record<\n string,\n { parentId?: string; children: string[]; value?: unknown }\n >,\n b = right.nodes as typeof a;\n return (\n Object.keys(a).length === Object.keys(b).length &&\n Object.keys(a).every(\n id =>\n Object.hasOwn(b, id) &&\n a[id].parentId === b[id].parentId &&\n anchor.equal(a[id].children, b[id].children) &&\n Object.hasOwn(a[id], 'value') === Object.hasOwn(b[id], 'value') &&\n equalValue(node.value, a[id].value, b[id].value)\n )\n );\n }\n if (node.kind === 'map' && isRecord(left) && isRecord(right)) {\n const keys = Object.keys(left);\n return (\n keys.length === Object.keys(right).length &&\n keys.every(key => Object.hasOwn(right, key) && equalValue(node.value, left[key], right[key]))\n );\n }\n return false;\n};\n\nexport const parse = <N extends DocumentNode>(node: N, input: unknown): Infer<N> => {\n const valueNode: DocumentNode = node;\n const failure = checkValue(valueNode, input, [], true);\n if (failure) throw new ParseError(failure);\n return copyValue(valueNode, input) as Infer<N>;\n};\n","import type { MutationSession } from '../session';\nimport type { ResolvedContainer } from '../../address';\nimport { fail } from '../issue';\n\nexport function put(\n session: MutationSession,\n container: ResolvedContainer,\n id: string,\n value: unknown\n): void {\n if (container.node.kind !== 'map')\n return fail(container.at, 'invalid-collection', 'Expected a map.');\n session.writeMember(container, id, value, 'set');\n}\n\nexport function remove(session: MutationSession, container: ResolvedContainer, id: string): void {\n if (container.node.kind !== 'map')\n return fail(container.at, 'invalid-collection', 'Expected a map.');\n session.writeMember(container, id, undefined, 'remove');\n}\n","import type { DocumentAnchor } from '../../schema';\nimport type { MutationSession } from '../session';\nimport type { ResolvedContainer } from '../../address';\nimport * as anchor from '../anchor';\nimport { fail } from '../issue';\nexport function create(\n session: MutationSession,\n container: ResolvedContainer,\n entries: readonly { id: string; value: unknown }[],\n position?: DocumentAnchor\n): void {\n const { at, node, value } = container;\n if (node.kind !== 'table') return fail(at, 'invalid-collection', 'Expected a table.');\n const table = value as { ids: string[]; byId: Record<string, unknown> };\n if (!anchor.valid(table.ids, position))\n return fail(at, 'invalid-anchor', 'Unknown table anchor.');\n const ids = new Set<string>();\n for (const entry of entries) {\n if (Object.hasOwn(table.byId, entry.id) || ids.has(entry.id))\n return fail(at, 'duplicate-entity', 'Table key already exists.');\n ids.add(entry.id);\n }\n if (!entries.length) return;\n const index = anchor.index(table.ids, position);\n for (const entry of entries) session.writeMember(container, entry.id, entry.value, 'set');\n const length = table.ids.length;\n table.ids.length += entries.length;\n table.ids.copyWithin(index + entries.length, index, length);\n for (let i = 0; i < entries.length; i++) table.ids[index + i] = entries[i].id;\n}\nexport function remove(\n session: MutationSession,\n container: ResolvedContainer,\n ids: readonly string[]\n): void {\n const { at, node, value } = container;\n if (node.kind !== 'table') return fail(at, 'invalid-collection', 'Expected a table.');\n const table = value as { ids: string[]; byId: Record<string, unknown> };\n for (const id of ids)\n if (!Object.hasOwn(table.byId, id))\n return fail(at, 'missing-entity', 'Table key does not exist.');\n if (!ids.length) return;\n const removed = new Set(ids);\n for (const id of removed) session.writeMember(container, id, undefined, 'remove');\n table.ids = table.ids.filter(id => !removed.has(id));\n}\n\nexport function replace(\n session: MutationSession,\n container: ResolvedContainer,\n id: string,\n value: unknown\n): void {\n const { at, node, value: tableValue } = container;\n if (node.kind !== 'table') return fail(at, 'invalid-collection', 'Expected a table.');\n const table = tableValue as { byId: Record<string, unknown> };\n if (!Object.hasOwn(table.byId, id))\n return fail(at.concat(id), 'missing-entity', 'Table key does not exist.');\n session.writeMember(container, id, value, 'set');\n}\n","import type { DocumentAnchor } from '../../schema';\nimport type { MutationSession } from '../session';\nimport type { ResolvedContainer } from '../../address';\nimport * as anchor from '../anchor';\nimport { fail } from '../issue';\nexport function insert(\n session: MutationSession,\n container: ResolvedContainer,\n value: unknown,\n position?: DocumentAnchor\n): void {\n const { at, node, value: current } = container;\n if (node.kind !== 'list') return fail(at, 'invalid-list-key', 'Expected a list.');\n session.validate(node.value, value, at);\n const id = node.keyOf(value);\n if (typeof id !== 'string') return fail(at, 'invalid-list-key', 'List key must be a string.');\n const items = current as unknown[],\n keys = anchor.keys(items, node.keyOf);\n if (keys.index(id) >= 0) return fail(at, 'duplicate-list-item', 'List key already exists.');\n if (!anchor.valid(keys, position)) return fail(at, 'invalid-anchor', 'Unknown list anchor.');\n session.recorder.order(container);\n session.recorder.member(container, id, session.definition(container, id), -1);\n anchor.insert(items, anchor.index(keys, position), value);\n session.invalidate();\n}\nexport function replace(\n session: MutationSession,\n container: ResolvedContainer,\n id: string,\n value: unknown\n): void {\n const { at, node, value: items } = container;\n if (node.kind !== 'list') return fail(at, 'invalid-list-key', 'Expected a list.');\n const index = anchor.indexedKeys(items as unknown[], node.keyOf).index(id);\n if (index < 0) return fail(at, 'missing-list-item', 'List key does not exist.');\n session.writeMember(container, id, value, 'set', index);\n}\nexport function remove(session: MutationSession, container: ResolvedContainer, id: string): void {\n const { at, node, value } = container;\n if (node.kind !== 'list') return fail(at, 'missing-list-item', 'List key does not exist.');\n const index = anchor.keys(value as unknown[], node.keyOf).index(id);\n if (index < 0) return fail(at, 'missing-list-item', 'List key does not exist.');\n session.writeMember(container, id, undefined, 'remove', index);\n}\n","import type { DocumentAddress } from '../../schema';\nimport type { ResolvedTreeContainer } from '../../address';\nimport type { MutationSession } from '../session';\nimport { contains, type MutableTree, type TreePosition } from '../tree';\nimport { fail } from '../issue';\nconst node = (tree: MutableTree, id: string) =>\n Object.hasOwn(tree.nodes, id) ? tree.nodes[id] : undefined;\nconst positionIndex = (index: number | undefined, length: number, at: DocumentAddress): number => {\n if (index !== undefined && (!Number.isInteger(index) || index < 0))\n return fail(at, 'invalid-tree-index', 'Tree index must be nonnegative.');\n return Math.min(index ?? length, length);\n};\nexport const insert = (\n session: MutationSession,\n container: ResolvedTreeContainer,\n id: string,\n value: unknown,\n position: TreePosition | undefined\n): void => {\n const { at, node: schema, value: tree } = container;\n if (typeof id !== 'string') return fail(at, 'invalid-key', 'Tree keys must be strings.');\n if (contains(tree, id)) return fail(at, 'duplicate-tree-node', 'Tree node already exists.');\n const parentId = position?.parentId;\n const parent = parentId === undefined ? undefined : node(tree, parentId);\n if (\n (tree.rootId !== undefined && !parent) ||\n (tree.rootId === undefined && parentId !== undefined)\n )\n return fail(at, 'missing-tree-parent', 'A nonempty tree requires an existing parent.');\n const index = positionIndex(position?.index, parent?.children.length ?? 0, at);\n session.validate(schema.value, value, at.concat(id));\n session.recorder.tree(container, id);\n if (parentId !== undefined) session.recorder.tree(container, parentId);\n Object.defineProperty(tree.nodes, id, {\n value: { ...(parentId === undefined ? {} : { parentId }), children: [], value },\n writable: true,\n configurable: true,\n enumerable: true,\n });\n if (parent) parent.children.splice(index, 0, id);\n else tree.rootId = id;\n session.invalidate();\n};\nexport const replace = (\n session: MutationSession,\n container: ResolvedTreeContainer,\n id: string,\n value: unknown\n): void => {\n const { at, node: schema, value: tree } = container;\n const entry = node(tree, id);\n if (!entry) return fail(at, 'missing-tree-node', 'Tree node does not exist.');\n if (Object.is(entry.value, value) && Object.hasOwn(entry, 'value')) return;\n session.validate(schema.value, value, at.concat(id));\n session.recorder.tree(container, id);\n entry.value = value;\n};\nexport const remove = (\n session: MutationSession,\n container: ResolvedTreeContainer,\n id: string\n): void => {\n const { at, value: tree } = container;\n const entry = node(tree, id);\n if (!entry) return fail(at, 'missing-tree-node', 'Tree node does not exist.');\n const ids: string[] = [],\n stack = [id];\n while (stack.length) {\n const current = stack.pop()!;\n ids.push(current);\n for (const child of tree.nodes[current].children) stack.push(child);\n }\n for (const key of ids) session.recorder.tree(container, key);\n if (entry.parentId !== undefined) session.recorder.tree(container, entry.parentId);\n if (entry.parentId === undefined) delete tree.rootId;\n else {\n const children = tree.nodes[entry.parentId].children;\n children.splice(children.indexOf(id), 1);\n }\n for (const key of ids) delete tree.nodes[key];\n session.invalidate();\n};\nexport const move = (\n session: MutationSession,\n container: ResolvedTreeContainer,\n id: string,\n position: TreePosition | undefined\n): void => {\n const { at, value: tree } = container;\n const entry = node(tree, id),\n parentId = position?.parentId;\n if (!entry) return fail(at, 'missing-tree-node', 'Tree node does not exist.');\n if (entry.parentId === undefined || parentId === undefined || !contains(tree, parentId))\n return fail(\n at,\n 'missing-tree-parent',\n 'Moving requires a non-root node and an existing parent.'\n );\n for (\n let ancestor: string | undefined = parentId;\n ancestor !== undefined;\n ancestor = tree.nodes[ancestor].parentId\n )\n if (ancestor === id) return fail(at, 'tree-cycle', 'Cannot move a node under its descendant.');\n const old = tree.nodes[entry.parentId],\n next = tree.nodes[parentId];\n const index = positionIndex(position?.index, next.children.length - (old === next ? 1 : 0), at);\n const previous = old.children.indexOf(id);\n if (old === next && previous === index) return;\n session.recorder.tree(container, id);\n session.recorder.tree(container, entry.parentId);\n session.recorder.tree(container, parentId);\n old.children.splice(previous, 1);\n next.children.splice(index, 0, id);\n entry.parentId = parentId;\n session.invalidate();\n};\n","import type { DocumentAnchor } from '../../schema';\nimport type { MutationSession } from '../session';\nimport type { ResolvedContainer } from '../../address';\nimport * as anchor from '../anchor';\nimport { fail } from '../issue';\nexport function move(\n session: MutationSession,\n container: ResolvedContainer,\n id: string,\n position?: DocumentAnchor\n): void {\n const { at, node, value } = container;\n if (node.kind !== 'table' && node.kind !== 'list')\n return fail(at, 'invalid-collection', 'Expected an ordered container.');\n const items = node.kind === 'table' ? (value as { ids: string[] }).ids : (value as unknown[]);\n const keys = node.kind === 'table' ? (items as string[]) : anchor.keys(items, node.keyOf);\n const index =\n node.kind === 'table' ? (items as string[]).indexOf(id) : (keys as anchor.KeyOrder).index(id);\n if (index < 0) return fail(at, 'missing-entity', 'Ordered key does not exist.');\n if (!anchor.valid(keys, position)) return fail(at, 'invalid-anchor', 'Unknown order anchor.');\n const next = anchor.afterRemove(keys, index, position);\n if (next === index) return;\n session.recorder.order(container);\n anchor.move(items, index, next);\n session.invalidate();\n}\n","import type {\n DocumentAddress,\n DocumentAnchor,\n DocumentNode,\n DocumentTreeValue,\n FieldNode,\n Infer,\n ListNode,\n MapNode,\n ObjectNode,\n ObjectShape,\n ReadonlyValue,\n TableNode,\n TreeNode,\n ValueSchemaNode,\n VariantNode,\n} from '../schema';\nimport {\n nodeAt,\n resolveChild,\n resolveLocated,\n compiledShape,\n type FixedMember,\n type ResolvedContainer,\n type ResolvedTreeContainer,\n} from '../address';\nimport { copyValue } from '../schema-value';\nimport type { DependencyTracker } from './dependency';\nimport type { CanonicalState } from '../mutation/state';\nimport type { MutationSession } from '../mutation/session';\nimport * as mapOperations from '../mutation/operations/map';\nimport * as tableOperations from '../mutation/operations/table';\nimport * as listOperations from '../mutation/operations/list';\nimport * as treeOperations from '../mutation/operations/tree';\nimport * as orderOperations from '../mutation/operations/order';\nimport * as tree from '../mutation/tree';\nimport * as anchor from '../mutation/anchor';\nimport { profile } from '../profile';\n\ndeclare const scopeValue: unique symbol;\ntype Scoped<N extends DocumentNode, W extends boolean, V = Infer<N>> = {\n readonly [scopeValue]?: readonly [node: N, writable: W, value: V];\n};\ntype ShapeAccess<S extends ObjectShape, W extends boolean> = W extends true\n ? { -readonly [K in keyof S]: Access<S[K], W> }\n : { readonly [K in keyof S]: Access<S[K], W> };\ntype MapAccess<K extends string, N extends ValueSchemaNode, W extends boolean> = {\n get(id: K): Access<N, W> | undefined;\n has(id: K): boolean;\n ids(): readonly K[];\n} & (W extends true\n ? {\n put(id: K, value: Infer<N>): void;\n remove(id: K): void;\n replace(value: Readonly<Record<K, Infer<N>>>): void;\n }\n : {});\ntype TableAccess<K extends string, N extends ValueSchemaNode, W extends boolean> = {\n get(id: K): Access<N, W> | undefined;\n has(id: K): boolean;\n ids(): readonly K[];\n} & (W extends true\n ? {\n create(id: K, value: Infer<N>, anchor?: DocumentAnchor<K>): void;\n create(\n entries: readonly { readonly id: K; readonly value: Infer<N> }[],\n anchor?: DocumentAnchor<K>\n ): void;\n remove(ids: K | readonly K[]): void;\n move(id: K, anchor?: DocumentAnchor<K>): void;\n replace(value: {\n readonly ids: readonly K[];\n readonly byId: Readonly<Record<K, Infer<N>>>;\n }): void;\n replace(id: K, value: Infer<N>): void;\n }\n : {});\ntype ListAccess<T, W extends boolean> = {\n get(key: string): ReadonlyValue<T> | undefined;\n has(key: string): boolean;\n ids(): readonly string[];\n} & (W extends true\n ? {\n insert(value: ReadonlyValue<T>, anchor?: DocumentAnchor): void;\n remove(key: string): void;\n move(key: string, anchor?: DocumentAnchor): void;\n replace(value: readonly ReadonlyValue<T>[]): void;\n replace(key: string, value: ReadonlyValue<T>): void;\n }\n : {});\ntype TreeAccess<T, W extends boolean> = {\n rootId(): string | undefined;\n get(id: string): ReadonlyValue<T> | undefined;\n has(id: string): boolean;\n parent(id: string): string | undefined;\n children(id: string): readonly string[] | undefined;\n} & (W extends true\n ? {\n insert(id: string, value: ReadonlyValue<T>, position?: tree.TreePosition): void;\n move(id: string, position?: tree.TreePosition): void;\n remove(id: string): void;\n replace(value: DocumentTreeValue<T>): void;\n replace(id: string, value: ReadonlyValue<T>): void;\n }\n : {});\ntype NodeAccess<N extends DocumentNode, W extends boolean> =\n N extends FieldNode<infer T, boolean>\n ? ReadonlyValue<T>\n : N extends ObjectNode<infer S>\n ? ShapeAccess<S, W> & Scoped<N, W>\n : N extends VariantNode<infer Tag, infer V>\n ? {\n [K in keyof V & string]: ShapeAccess<V[K]['shape'], W> & {\n readonly [P in Tag]: K;\n } & Scoped<N, W, Extract<Infer<N>, Record<Tag, K>>>;\n }[keyof V & string]\n : N extends MapNode<infer V, infer K>\n ? MapAccess<K, V, W> & Scoped<N, W>\n : N extends TableNode<infer V, infer K>\n ? TableAccess<K, V, W> & Scoped<N, W>\n : N extends ListNode<infer T>\n ? ListAccess<T, W> & Scoped<N, W>\n : N extends TreeNode<infer T>\n ? TreeAccess<T, W> & Scoped<N, W>\n : never;\ntype Access<N extends DocumentNode, W extends boolean> = N extends { readonly optional: true }\n ? NodeAccess<N, W> | undefined\n : NodeAccess<N, W>;\nexport type Read<N extends DocumentNode> = Access<N, false>;\nexport type Draft<N extends DocumentNode> = Access<N, true>;\ntype Snapshot<T> = T extends {\n readonly [scopeValue]?: readonly [DocumentNode, boolean, infer V];\n}\n ? V\n : ReadonlyValue<T>;\ntype Target = {\n at?: DocumentAddress;\n parent?: Target;\n key: string;\n node: DocumentNode | undefined;\n value: unknown;\n generation: number;\n children:\n | { kind: 'fixed'; schema: DocumentNode; slots: (Target | undefined)[] }\n | { kind: 'dynamic'; keys: Map<string, Target> }\n | undefined;\n proxy: object | undefined;\n container?: ResolvedContainer | ResolvedTreeContainer;\n};\ntype Location = { readonly context: AccessContext; readonly target: Target };\nconst locations = new WeakMap<object, Location>();\nconst locationOf = (value: object): Location | undefined => locations.get(value);\nconst addressOf = (target: Target): DocumentAddress => {\n if (target.at) return target.at;\n profile.access('addresses');\n return (target.at = addressOf(target.parent!).concat(target.key));\n};\nexport type AccessContext = {\n readonly state: CanonicalState;\n /** Omitted for borrowed synchronous Draft and readers that must not escape. */\n readonly active?: () => boolean;\n readonly dependencies?: DependencyTracker;\n readonly session?: MutationSession;\n};\nconst assertActive = (context: AccessContext) => {\n if (context.active && !context.active()) throw new Error('Document access scope has expired.');\n};\nconst collect = (\n context: AccessContext,\n at: DocumentAddress,\n kind: 'value' | 'collection' = 'value',\n id?: string\n) => {\n context.dependencies?.record(\n kind === 'value' ? { kind, at } : { kind, at, ...(id === undefined ? {} : { id }) }\n );\n};\nexport const snapshot = <T>(value: T): Snapshot<T> => {\n const location = value && typeof value === 'object' ? locationOf(value) : undefined;\n if (!location) return value as Snapshot<T>;\n const { context } = location;\n const at = addressOf(location.target);\n profile.access('snapshots');\n collect(context, at);\n const resolved = resolve(context, location.target);\n if (!resolved.node) throw new Error('The selected schema address no longer exists.');\n return copyValue(resolved.node, resolved.value) as Snapshot<T>;\n};\n/** Replace a member with its plain Infer value through the owning draft session. */\ntype ReplaceParentAccess = {\n readonly [scopeValue]?: readonly [\n Extract<DocumentNode, { readonly kind: 'object' | 'variant' }>,\n true,\n unknown,\n ];\n};\nexport const replace = <T extends object & ReplaceParentAccess, K extends keyof Snapshot<T>>(\n container: T,\n key: K,\n value: NoInfer<Snapshot<T>[K]>\n): void => {\n const location = locationOf(container);\n if (!location) throw new TypeError('replace requires scoped document access.');\n if (typeof key !== 'string') throw new TypeError('Document keys must be strings.');\n Reflect.set(container, key, value);\n};\n/** Projection collection contexts use the same scoped access, with explicit collection tools. */\nexport type CollectionAccess<K extends string, N extends ValueSchemaNode> = TableAccess<\n K,\n N,\n false\n>;\nconst resolve = (context: AccessContext, target: Target): Target => {\n assertActive(context);\n const generation = context.session?.generation ?? 0;\n if (target.generation !== generation) {\n profile.access('resolutions');\n if (!target.parent && !target.at!.length) {\n target.node = context.state.schema;\n target.value = context.state.document;\n } else {\n const parent = target.parent && resolve(context, target.parent);\n const location = parent\n ? resolveChild(parent.node, parent.value, target.key)\n : resolveLocated(context.state.schema, context.state.document, target.at!);\n target.node =\n location?.node ?? nodeAt(context.state.schema, addressOf(target), context.state.document);\n target.value =\n location && Object.hasOwn(location.parent, location.key)\n ? (location.parent as Record<string | number, unknown>)[location.key]\n : undefined;\n }\n target.generation = generation;\n }\n return target;\n};\n\nexport const createAccess = (context: AccessContext, initial: DocumentAddress = []): unknown => {\n profile.access('scopes');\n const mutable = (): MutationSession => {\n assertActive(context);\n if (!context.session) throw new TypeError('Cannot modify read-only document access.');\n return context.session;\n };\n const writableContainer = (target: Target, session: MutationSession): ResolvedContainer => {\n if (target.container?.generation === session.generation && 'layout' in target.container)\n return target.container;\n return (target.container = session.bind(addressOf(target), target.node, target.value));\n };\n const childAt = (target: Target, key: string): DocumentAddress => {\n profile.access('addresses');\n return addressOf(target).concat(key);\n };\n const access = (target: Target): unknown => {\n if (target.proxy) return target.proxy;\n const proxy = new Proxy(target, handler);\n profile.access('proxies');\n locations.set(proxy, { context, target });\n target.proxy = proxy;\n return proxy;\n };\n const createTarget = (\n at: DocumentAddress | undefined,\n parent: Target | undefined,\n key: string\n ): Target => ({\n at,\n parent,\n key,\n node: undefined,\n value: undefined,\n generation: -1,\n children: undefined,\n proxy: undefined,\n });\n const childAccess = (\n target: Target,\n member: string | FixedMember,\n node: DocumentNode,\n value: unknown\n ) => {\n const key = typeof member === 'string' ? member : member.key;\n if (node.kind === 'field' || value === undefined) {\n if (context.dependencies) collect(context, childAt(target, key));\n return value;\n }\n let children = target.children;\n let child: Target;\n if (typeof member !== 'string') {\n if (children?.kind !== 'fixed' || children.schema !== target.node)\n children = {\n kind: 'fixed',\n schema: target.node!,\n slots: new Array(compiledShape(target.node!, target.value)!.members.size),\n };\n child = children.slots[member.slot] ??= createTarget(undefined, target, key);\n } else {\n if (children?.kind !== 'dynamic') children = { kind: 'dynamic', keys: new Map() };\n const retained = children.keys.get(key);\n child = retained ?? createTarget(undefined, target, key);\n if (!retained) children.keys.set(key, child);\n }\n target.children = children;\n if (child.generation === target.generation) return child.proxy;\n child.node = node;\n child.value = value;\n child.generation = target.generation;\n return access(child);\n };\n const collectionValue = (target: Target, node: DocumentNode) => {\n const current = resolve(context, target);\n if (current.node !== node || current.value === undefined)\n throw new TypeError('The collection method belongs to a replaced schema branch.');\n return current.value;\n };\n const writableCollection = (target: Target, node: DocumentNode): ResolvedContainer => {\n const session = mutable();\n collectionValue(target, node);\n return writableContainer(target, session);\n };\n const writableTree = (target: Target, node: DocumentNode): ResolvedTreeContainer => {\n const session = mutable();\n collectionValue(target, node);\n if (target.container?.generation === session.generation && !('layout' in target.container))\n return target.container;\n return (target.container = session.bindTree(addressOf(target), target.node, target.value));\n };\n const replaceCollection = (target: Target, node: DocumentNode, value: unknown) => {\n const session = mutable();\n collectionValue(target, node);\n session.replace(addressOf(target), value);\n };\n const mapMethod = (\n target: Target,\n property: string,\n node: Extract<DocumentNode, { kind: 'map' }>\n ): unknown => {\n if (property === 'ids')\n return () => {\n const current = collectionValue(target, node) as Record<string, unknown>;\n if (context.dependencies) collect(context, addressOf(target), 'collection');\n return Object.keys(current);\n };\n if (property === 'has')\n return (id: string) => {\n const current = collectionValue(target, node) as Record<string, unknown>;\n if (context.dependencies) collect(context, addressOf(target), 'collection', id);\n return Object.hasOwn(current, id);\n };\n if (property === 'get')\n return (id: string) => {\n const current = collectionValue(target, node) as Record<string, unknown>;\n if (context.dependencies) collect(context, addressOf(target), 'collection', id);\n if (!Object.hasOwn(current, id)) return undefined;\n if (node.value.kind === 'field') {\n if (context.dependencies) collect(context, childAt(target, id));\n return current[id];\n }\n return childAccess(target, id, node.value, current[id]);\n };\n if (property === 'put')\n return (id: string, value: unknown) => {\n const writable = writableCollection(target, node);\n mapOperations.put(context.session!, writable, id, value);\n };\n if (property === 'remove')\n return (id: string) => {\n const writable = writableCollection(target, node);\n mapOperations.remove(context.session!, writable, id);\n };\n if (property === 'replace') return (value: unknown) => replaceCollection(target, node, value);\n return undefined;\n };\n const orderedMethod = (\n target: Target,\n property: string,\n node: Extract<DocumentNode, { kind: 'table' | 'list' }>\n ): unknown => {\n const at = addressOf(target);\n if (property === 'ids')\n return () => {\n const current = collectionValue(target, node);\n collect(context, at, 'collection');\n return node.kind === 'table'\n ? [...(current as { ids: string[] }).ids]\n : (current as unknown[]).map(node.keyOf);\n };\n if (property === 'has')\n return (id: string) => {\n const current = collectionValue(target, node);\n collect(context, at, 'collection', id);\n return node.kind === 'table'\n ? Object.hasOwn((current as { byId: object }).byId, id)\n : anchor.indexedKeys(current as unknown[], node.keyOf).index(id) >= 0;\n };\n if (property === 'get')\n return (id: string) => {\n const current = collectionValue(target, node);\n collect(context, at, 'collection', id);\n const location = resolveChild(node, current, id);\n if (!location || !Object.hasOwn(location.parent, location.key)) return undefined;\n return childAccess(\n target,\n id,\n location.node,\n (location.parent as Record<string | number, unknown>)[location.key]\n );\n };\n if (property === 'move')\n return (id: string, position?: DocumentAnchor) => {\n const writable = writableCollection(target, node);\n orderOperations.move(context.session!, writable, id, position);\n };\n return undefined;\n };\n const tableMethod = (\n target: Target,\n property: string,\n node: Extract<DocumentNode, { kind: 'table' }>\n ): unknown => {\n if (property === 'create')\n return (\n input: string | readonly { id: string; value: unknown }[],\n valueOrPosition?: unknown,\n position?: DocumentAnchor\n ) => {\n const writable = writableCollection(target, node);\n tableOperations.create(\n context.session!,\n writable,\n Array.isArray(input) ? input : [{ id: input as string, value: valueOrPosition }],\n Array.isArray(input) ? (valueOrPosition as DocumentAnchor | undefined) : position\n );\n };\n if (property === 'remove')\n return (ids: string | readonly string[]) => {\n const writable = writableCollection(target, node);\n tableOperations.remove(context.session!, writable, typeof ids === 'string' ? [ids] : ids);\n };\n if (property === 'replace')\n return (...args: [unknown, unknown?]) => {\n const [valueOrId, value] = args;\n if (args.length === 1) return replaceCollection(target, node, valueOrId);\n const writable = writableCollection(target, node);\n tableOperations.replace(context.session!, writable, valueOrId as string, value);\n };\n return orderedMethod(target, property, node);\n };\n const listMethod = (\n target: Target,\n property: string,\n node: Extract<DocumentNode, { kind: 'list' }>\n ): unknown => {\n if (property === 'insert')\n return (value: unknown, position?: DocumentAnchor) => {\n const writable = writableCollection(target, node);\n listOperations.insert(context.session!, writable, value, position);\n };\n if (property === 'remove')\n return (id: string) => {\n const writable = writableCollection(target, node);\n listOperations.remove(context.session!, writable, id);\n };\n if (property === 'replace')\n return (...args: [unknown, unknown?]) => {\n const [valueOrId, value] = args;\n if (args.length === 1) return replaceCollection(target, node, valueOrId);\n const writable = writableCollection(target, node);\n listOperations.replace(context.session!, writable, valueOrId as string, value);\n };\n return orderedMethod(target, property, node);\n };\n const treeMethod = (\n target: Target,\n property: string,\n node: Extract<DocumentNode, { kind: 'tree' }>\n ): unknown => {\n const at = addressOf(target);\n if (property === 'insert')\n return (id: string, value: unknown, position?: tree.TreePosition) => {\n const writable = writableTree(target, node);\n treeOperations.insert(context.session!, writable, id, value, position);\n };\n if (property === 'remove')\n return (id: string) => {\n const writable = writableTree(target, node);\n treeOperations.remove(context.session!, writable, id);\n };\n if (property === 'move')\n return (id: string, position?: tree.TreePosition) => {\n const writable = writableTree(target, node);\n treeOperations.move(context.session!, writable, id, position);\n };\n if (property === 'replace')\n return (...args: [unknown, unknown?]) => {\n const [valueOrId, value] = args;\n if (args.length === 1) return replaceCollection(target, node, valueOrId);\n const writable = writableTree(target, node);\n treeOperations.replace(context.session!, writable, valueOrId as string, value);\n };\n const current = () => {\n collect(context, at);\n return collectionValue(target, node) as tree.MutableTree;\n };\n if (property === 'rootId') return () => current().rootId;\n if (property === 'get')\n return (id: string) => {\n const value = current();\n return tree.contains(value, id) ? value.nodes[id].value : undefined;\n };\n if (property === 'has') return (id: string) => tree.contains(current(), id);\n if (property === 'parent') return (id: string) => tree.parent(current(), id);\n if (property === 'children')\n return (id: string) => {\n const children = tree.children(current(), id);\n return children ? [...children] : undefined;\n };\n return undefined;\n };\n const handler: ProxyHandler<Target> = {\n get: (target, property) => {\n const { node, value } = resolve(context, target);\n if (!node || value === undefined) return undefined;\n if (typeof property !== 'string') return undefined;\n if (node.kind === 'map') return mapMethod(target, property, node);\n if (node.kind === 'table') return tableMethod(target, property, node);\n if (node.kind === 'list') return listMethod(target, property, node);\n if (node.kind === 'tree') return treeMethod(target, property, node);\n if (node.kind === 'variant' && property === node.tag) {\n collect(context, childAt(target, property));\n return (value as Record<string, unknown>)[property];\n }\n const member = compiledShape(node, value)?.members.get(property);\n if (!member) return undefined;\n if (member.field) {\n if (context.dependencies) collect(context, childAt(target, property));\n return (value as Record<string, unknown>)[property];\n }\n return childAccess(\n target,\n node.kind === 'object' ? member : property,\n member.node,\n (value as Record<string, unknown>)[property]\n );\n },\n set: (target, property, value) => {\n const session = mutable(),\n { node } = resolve(context, target);\n if (\n typeof property !== 'string' ||\n !node ||\n (node.kind !== 'object' && node.kind !== 'variant')\n )\n throw new TypeError('Invalid structural assignment.');\n if (node.kind === 'variant' && node.tag === property)\n throw new TypeError('Variant discriminants are read-only.');\n session.assignMember(writableContainer(target, session), property, value);\n return true;\n },\n deleteProperty: (target, property) => {\n const session = mutable(),\n { node } = resolve(context, target);\n if (\n typeof property !== 'string' ||\n node?.kind === 'map' ||\n (node?.kind === 'variant' && node.tag === property)\n )\n throw new TypeError('Invalid structural deletion.');\n session.removeMember(writableContainer(target, session), property);\n return true;\n },\n has: (target, property) => {\n const { node, value } = resolve(context, target);\n if (typeof property !== 'string') return false;\n if (node?.kind === 'map') return false;\n collect(context, addressOf(target));\n return value !== undefined && Object.hasOwn(value as object, property);\n },\n ownKeys: target => {\n const { node, value } = resolve(context, target);\n if (node?.kind === 'map') return [];\n if (context.dependencies) collect(context, addressOf(target));\n return value && typeof value === 'object' ? Object.keys(value) : [];\n },\n getOwnPropertyDescriptor: (target, property) => {\n const { node, value } = resolve(context, target);\n if (node?.kind === 'map') return undefined;\n return value && Object.hasOwn(value as object, property)\n ? { enumerable: true, configurable: true }\n : undefined;\n },\n defineProperty: () => {\n assertActive(context);\n throw new TypeError('Use schema assignments.');\n },\n setPrototypeOf: () => {\n assertActive(context);\n throw new TypeError('Document prototypes are immutable.');\n },\n preventExtensions: () => {\n assertActive(context);\n throw new TypeError('Document access cannot be frozen.');\n },\n };\n const root = resolve(context, createTarget(initial, undefined, ''));\n if (!root.node || root.node.kind === 'field' || root.value === undefined) {\n if (context.dependencies) collect(context, initial);\n return root.value;\n }\n return access(root);\n};\nexport const collectionAccess = (\n context: AccessContext,\n at: DocumentAddress\n): CollectionAccess<string, ValueSchemaNode> => {\n const value = createAccess(context, at);\n if (value === undefined)\n return {\n get: () => {\n assertActive(context);\n return undefined;\n },\n has: () => {\n assertActive(context);\n return false;\n },\n ids: () => {\n assertActive(context);\n return [];\n },\n };\n return value as CollectionAccess<string, ValueSchemaNode>;\n};\n","import type { DocumentAddress, ObjectNode, PathPick, Infer } from '../schema';\nimport type { AddressRef } from '../address';\nimport type { ChangeSet } from '../changes';\nimport type { DocumentImpact } from '../impact';\nimport type { Draft } from '../access/scope';\nimport type { MutationIssue } from '../mutation/issue';\nimport type { Readable } from '../projection/readable';\nexport type Unsubscribe = () => void;\nexport type Synchronous<T> = T extends PromiseLike<unknown> ? never : T;\nexport type CommitSource = 'local' | 'system' | 'history' | 'remote';\nexport class DocumentReentrancyError extends Error {\n constructor() {\n super('Document writes cannot be re-entered during an update or notification.');\n this.name = 'DocumentReentrancyError';\n }\n}\nexport class DocumentDisposedError extends Error {\n constructor() {\n super('Doxum runtime has been disposed.');\n this.name = 'DocumentDisposedError';\n }\n}\nexport type DiagnosticInput = {\n readonly code: string;\n readonly message: string;\n readonly address?: DocumentAddress;\n};\nexport type DocumentDiagnostic = DiagnosticInput & { readonly source: 'application' };\nexport type DocumentProblem = DocumentDiagnostic | MutationIssue;\nexport class TransactionRejected extends Error {\n readonly issues: readonly DocumentDiagnostic[];\n constructor(input: DiagnosticInput | readonly DiagnosticInput[]) {\n super('Document update rejected.');\n this.name = 'TransactionRejected';\n const issues: readonly DiagnosticInput[] = Array.isArray(input)\n ? input\n : [input as DiagnosticInput];\n this.issues = Object.freeze(\n issues.map(issue =>\n Object.freeze({\n code: issue.code,\n message: issue.message,\n source: 'application' as const,\n ...(issue.address === undefined ? {} : { address: Object.freeze([...issue.address]) }),\n })\n )\n );\n }\n}\nexport type DocumentCommit<S extends ObjectNode> = {\n readonly revision: number;\n readonly source: CommitSource;\n readonly changes: ChangeSet;\n readonly impact: DocumentImpact<S>;\n};\nexport type ObserverError = {\n readonly phase: 'processor' | 'flush' | 'listener';\n readonly error: unknown;\n};\nexport type TransactionResult<V, C> =\n | {\n readonly status: 'committed';\n readonly value: V;\n readonly commit: C;\n readonly observerErrors: readonly ObserverError[];\n }\n | { readonly status: 'unchanged'; readonly value: V; readonly revision: number }\n | {\n readonly status: 'rejected';\n readonly issues: readonly DocumentProblem[];\n readonly revision: number;\n };\nexport type OperationResult<C> =\n | {\n readonly status: 'committed';\n readonly commit: C;\n readonly observerErrors: readonly ObserverError[];\n }\n | { readonly status: 'unchanged'; readonly revision: number }\n | {\n readonly status: 'rejected';\n readonly issues: readonly MutationIssue[];\n readonly revision: number;\n };\nexport type HistoryState = { readonly undoDepth: number; readonly redoDepth: number };\nexport type LocalHistory<C> = Readable<HistoryState> & {\n undo(): OperationResult<C>;\n redo(): OperationResult<C>;\n clear(): void;\n group(): { end(): void; cancel(): OperationResult<C> };\n};\nexport type CommitListener<S extends ObjectNode> = (commit: DocumentCommit<S>) => void;\nexport type DocumentReadable<S extends ObjectNode> = {\n readonly address: {\n resolve(address: DocumentAddress): AddressRef | undefined;\n read(address: DocumentAddress): unknown;\n contains(parent: DocumentAddress, child: DocumentAddress): boolean;\n overlaps(left: DocumentAddress, right: DocumentAddress): boolean;\n debugKey(address: DocumentAddress): string;\n };\n revision(): number;\n subscribe(listener: CommitListener<S>): Unsubscribe;\n subscribe(\n pick: PathPick<S> | readonly [PathPick<S>, ...PathPick<S>[]],\n listener: CommitListener<S>\n ): Unsubscribe;\n};\nexport type DocumentRuntime<S extends ObjectNode> = DocumentReadable<S> & {\n readonly schema: S;\n update<V>(\n run: (draft: Draft<S>) => Synchronous<V>,\n options?: {\n readonly source?: Extract<CommitSource, 'local' | 'system'>;\n readonly history?: boolean;\n }\n ): TransactionResult<V, DocumentCommit<S>>;\n apply(\n changes: unknown,\n options: {\n readonly expectedRevision: number;\n readonly source?: Exclude<CommitSource, 'history'>;\n readonly history?: boolean;\n }\n ): OperationResult<DocumentCommit<S>>;\n replace(\n value: Infer<S>,\n options?: { readonly source?: Extract<CommitSource, 'system' | 'remote'> }\n ): OperationResult<DocumentCommit<S>>;\n snapshot(): Infer<S>;\n readonly history: LocalHistory<DocumentCommit<S>>;\n dispose(): void;\n};\n","import type { ObjectNode, Infer } from '../schema';\nimport { createAccess, type Read } from '../access/scope';\nimport type { DependencyTracker } from '../access/dependency';\nimport { DocumentDisposedError } from './contract';\nimport type { DocumentReadable } from './contract';\n\nexport type RuntimeAccessState<TSchema extends ObjectNode> = {\n readonly schema: TSchema;\n document: Infer<TSchema>;\n disposed: boolean;\n projectionLocks?: number;\n};\n\nconst states = new WeakMap<object, RuntimeAccessState<ObjectNode>>();\n\nexport const bindRuntimeAccess = <TSchema extends ObjectNode>(\n runtime: DocumentReadable<TSchema>,\n state: RuntimeAccessState<TSchema>\n): void => {\n states.set(runtime as object, state as RuntimeAccessState<ObjectNode>);\n};\n\nexport const accessOf = <TSchema extends ObjectNode>(\n runtime: DocumentReadable<TSchema>\n): RuntimeAccessState<TSchema> => {\n const state = states.get(runtime as object);\n if (!state) throw new Error('Unknown Doxum runtime.');\n return state as RuntimeAccessState<TSchema>;\n};\n\nexport const readWith = <TSchema extends ObjectNode, TResult>(\n runtime: DocumentReadable<TSchema>,\n run: (read: Read<TSchema>) => TResult,\n dependencies?: DependencyTracker\n): TResult => {\n const state = accessOf(runtime);\n if (state.disposed) throw new DocumentDisposedError();\n state.projectionLocks = (state.projectionLocks ?? 0) + 1;\n try {\n const reader = createAccess({\n state,\n dependencies,\n }) as Read<TSchema>;\n return run(reader);\n } finally {\n // readWith is an internal borrowed-reader boundary. Retaining its reader or\n // collection methods after this callback is undefined behavior.\n state.projectionLocks!--;\n }\n};\n"],"mappings":";;AAgCA,IAAa,aAAb,cAAgC,UAAU;CACxC;CACA,YAAY,OAAmB;AAC7B,QAAM,GAAG,MAAM,QAAQ,MAAM,KAAK,UAAU,MAAM,QAAQ,GAAG;AAC7D,OAAK,OAAO;AACZ,OAAK,SAAS,OAAO,OAAO,CAC1B,OAAO,OAAO;GAAE,GAAG;GAAO,SAAS,OAAO,OAAO,CAAC,GAAG,MAAM,QAAQ,CAAC;GAAE,CAAC,CACxE,CAAC;;;AAIN,MAAM,SACJ,SACA,SACA,OAA2B,qBACX;CAAE;CAAS;CAAS;CAAM;AAE5C,MAAa,eACX,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,OAAO;;;AAGhB,IAAa,wBAAb,cAA2C,MAAM;CAC/C,cAAc;AACZ,QAAM,mCAAmC;AACzC,OAAK,OAAO;;;AAUhB,IAAa,sBAAb,cAAyC,MAAM;CAC7C;CACA,YAAY,OAAqD;AAC/D,QAAM,4BAA4B;AAClC,OAAK,OAAO;EACZ,MAAM,SAAqC,MAAM,QAAQ,MAAM,GAC3D,QACA,CAAC,MAAyB;AAC9B,OAAK,SAAS,OAAO,OACnB,OAAO,KAAI,UACT,OAAO,OAAO;GACZ,MAAM,MAAM;GACZ,SAAS,MAAM;GACf,QAAQ;GACR,GAAI,MAAM,YAAY,KAAA,IAAY,EAAE,GAAG,EAAE,SAAS,OAAO,OAAO,CAAC,GAAG,MAAM,QAAQ,CAAC,EAAE;GACtF,CAAC,CACH,CACF;;;;;ACjCL,MAAM,yBAAS,IAAI,SAAiD;AAEpE,MAAa,qBACX,SACA,UACS;AACT,QAAO,IAAI,SAAmB,MAAwC;;AAGxE,MAAa,YACX,YACgC;CAChC,MAAM,QAAQ,OAAO,IAAI,QAAkB;AAC3C,KAAI,CAAC,MAAO,OAAM,IAAI,MAAM,yBAAyB;AACrD,QAAO;;AAGT,MAAa,YACX,SACA,KACA,iBACY;CACZ,MAAM,QAAQ,SAAS,QAAQ;AAC/B,KAAI,MAAM,SAAU,OAAM,IAAI,uBAAuB;AACrD,OAAM,mBAAmB,MAAM,mBAAmB,KAAK;AACvD,KAAI;AAKF,SAAO,IAJQ,aAAa;GAC1B;GACA;GACD,CACgB,CAAC;WACV;AAGR,QAAM"}
|
|
@@ -717,12 +717,94 @@ const collectionAccess = (context, at) => {
|
|
|
717
717
|
return value;
|
|
718
718
|
};
|
|
719
719
|
//#endregion
|
|
720
|
+
//#region core/src/runtime/contract.ts
|
|
721
|
+
var DocumentReentrancyError = class extends Error {
|
|
722
|
+
constructor() {
|
|
723
|
+
super("Document writes cannot be re-entered during an update or notification.");
|
|
724
|
+
this.name = "DocumentReentrancyError";
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
var DocumentDisposedError = class extends Error {
|
|
728
|
+
constructor() {
|
|
729
|
+
super("Doxum runtime has been disposed.");
|
|
730
|
+
this.name = "DocumentDisposedError";
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
var TransactionRejected = class extends Error {
|
|
734
|
+
issues;
|
|
735
|
+
constructor(input) {
|
|
736
|
+
super("Document update rejected.");
|
|
737
|
+
this.name = "TransactionRejected";
|
|
738
|
+
const issues = Array.isArray(input) ? input : [input];
|
|
739
|
+
this.issues = Object.freeze(issues.map((issue) => Object.freeze({
|
|
740
|
+
code: issue.code,
|
|
741
|
+
message: issue.message,
|
|
742
|
+
source: "application",
|
|
743
|
+
...issue.address === void 0 ? {} : { address: Object.freeze([...issue.address]) }
|
|
744
|
+
})));
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region core/src/runtime/access.ts
|
|
749
|
+
const states = /* @__PURE__ */ new WeakMap();
|
|
750
|
+
const bindRuntimeAccess = (runtime, state) => {
|
|
751
|
+
states.set(runtime, state);
|
|
752
|
+
};
|
|
753
|
+
const accessOf = (runtime) => {
|
|
754
|
+
const state = states.get(runtime);
|
|
755
|
+
if (!state) throw new Error("Unknown Doxum runtime.");
|
|
756
|
+
return state;
|
|
757
|
+
};
|
|
758
|
+
const readWith = (runtime, run, dependencies) => {
|
|
759
|
+
const state = accessOf(runtime);
|
|
760
|
+
if (state.disposed) throw new DocumentDisposedError();
|
|
761
|
+
state.projectionLocks = (state.projectionLocks ?? 0) + 1;
|
|
762
|
+
try {
|
|
763
|
+
return run(createAccess({
|
|
764
|
+
state,
|
|
765
|
+
dependencies
|
|
766
|
+
}));
|
|
767
|
+
} finally {
|
|
768
|
+
state.projectionLocks--;
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
//#endregion
|
|
772
|
+
Object.defineProperty(exports, "DocumentDisposedError", {
|
|
773
|
+
enumerable: true,
|
|
774
|
+
get: function() {
|
|
775
|
+
return DocumentDisposedError;
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
Object.defineProperty(exports, "DocumentReentrancyError", {
|
|
779
|
+
enumerable: true,
|
|
780
|
+
get: function() {
|
|
781
|
+
return DocumentReentrancyError;
|
|
782
|
+
}
|
|
783
|
+
});
|
|
720
784
|
Object.defineProperty(exports, "ParseError", {
|
|
721
785
|
enumerable: true,
|
|
722
786
|
get: function() {
|
|
723
787
|
return ParseError;
|
|
724
788
|
}
|
|
725
789
|
});
|
|
790
|
+
Object.defineProperty(exports, "TransactionRejected", {
|
|
791
|
+
enumerable: true,
|
|
792
|
+
get: function() {
|
|
793
|
+
return TransactionRejected;
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
Object.defineProperty(exports, "accessOf", {
|
|
797
|
+
enumerable: true,
|
|
798
|
+
get: function() {
|
|
799
|
+
return accessOf;
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
Object.defineProperty(exports, "bindRuntimeAccess", {
|
|
803
|
+
enumerable: true,
|
|
804
|
+
get: function() {
|
|
805
|
+
return bindRuntimeAccess;
|
|
806
|
+
}
|
|
807
|
+
});
|
|
726
808
|
Object.defineProperty(exports, "checkKey", {
|
|
727
809
|
enumerable: true,
|
|
728
810
|
get: function() {
|
|
@@ -765,6 +847,12 @@ Object.defineProperty(exports, "parse", {
|
|
|
765
847
|
return parse;
|
|
766
848
|
}
|
|
767
849
|
});
|
|
850
|
+
Object.defineProperty(exports, "readWith", {
|
|
851
|
+
enumerable: true,
|
|
852
|
+
get: function() {
|
|
853
|
+
return readWith;
|
|
854
|
+
}
|
|
855
|
+
});
|
|
768
856
|
Object.defineProperty(exports, "replace", {
|
|
769
857
|
enumerable: true,
|
|
770
858
|
get: function() {
|
|
@@ -778,4 +866,4 @@ Object.defineProperty(exports, "snapshot", {
|
|
|
778
866
|
}
|
|
779
867
|
});
|
|
780
868
|
|
|
781
|
-
//# sourceMappingURL=
|
|
869
|
+
//# sourceMappingURL=access-EQ-XiFyl.cjs.map
|