doxum 0.1.7 → 0.1.9
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 +217 -296
- package/dist/contract-BNStLbSE.d.ts +441 -0
- package/dist/contract-CIU5FCC1.d.cts +441 -0
- package/dist/driver-BlR81Dqg.js +200 -0
- package/dist/driver-BlR81Dqg.js.map +1 -0
- package/dist/driver-xOIkwrB8.cjs +241 -0
- package/dist/driver-xOIkwrB8.cjs.map +1 -0
- package/dist/index.cjs +666 -2222
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -20
- package/dist/index.d.ts +10 -18
- package/dist/index.js +634 -2189
- package/dist/index.js.map +1 -1
- package/dist/{integration-CZwCwFBS.cjs → integration-C87tjRop.cjs} +4 -9
- package/dist/integration-C87tjRop.cjs.map +1 -0
- package/dist/{integration-B56u1l9V.js → integration-D5XCBLJ8.js} +2 -7
- package/dist/integration-D5XCBLJ8.js.map +1 -0
- package/dist/integration.cjs +11 -11
- package/dist/integration.d.cts +10 -4
- package/dist/integration.d.ts +10 -4
- package/dist/integration.js +4 -3
- package/dist/issue-DVaGQGeP.js +576 -0
- package/dist/issue-DVaGQGeP.js.map +1 -0
- package/dist/issue-DhrNdQNg.cjs +797 -0
- package/dist/issue-DhrNdQNg.cjs.map +1 -0
- package/dist/local-sync.cjs +67 -39
- package/dist/local-sync.cjs.map +1 -1
- package/dist/local-sync.d.cts +10 -10
- package/dist/local-sync.d.ts +10 -10
- package/dist/local-sync.js +66 -38
- package/dist/local-sync.js.map +1 -1
- package/dist/react.cjs +23 -4
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +8 -3
- package/dist/react.d.ts +8 -3
- package/dist/react.js +21 -6
- package/dist/react.js.map +1 -1
- package/dist/store-1Uob0Ghk.cjs +2750 -0
- package/dist/store-1Uob0Ghk.cjs.map +1 -0
- package/dist/store-CD0KdGsq.d.cts +262 -0
- package/dist/store-D7QH6Rzw.js +2511 -0
- package/dist/store-D7QH6Rzw.js.map +1 -0
- package/dist/store-cp5CpfCy.d.ts +262 -0
- package/package.json +1 -1
- package/skills/doxum-runtime/SKILL.md +26 -44
- package/skills/doxum-runtime/references/guide.en.md +95 -359
- package/skills/doxum-runtime/references/guide.zh-CN.md +80 -285
- package/skills/doxum-runtime/references/invariants.en.md +42 -165
- package/skills/doxum-runtime/references/invariants.zh-CN.md +34 -97
- package/skills/doxum-runtime/references/patterns.en.md +73 -225
- package/skills/doxum-runtime/references/patterns.zh-CN.md +73 -179
- package/dist/chunk-pbuEa-1d.js +0 -13
- package/dist/contract-DNZ4D53r.d.ts +0 -563
- package/dist/contract-j3SLGAwh.d.cts +0 -563
- package/dist/driver-CNxqMVFH.cjs +0 -69
- package/dist/driver-CNxqMVFH.cjs.map +0 -1
- package/dist/driver-CbzfW5MR.js +0 -46
- package/dist/driver-CbzfW5MR.js.map +0 -1
- package/dist/integration-B56u1l9V.js.map +0 -1
- package/dist/integration-CZwCwFBS.cjs.map +0 -1
- package/dist/ownership-CY0nPXGF.cjs +0 -304
- package/dist/ownership-CY0nPXGF.cjs.map +0 -1
- package/dist/ownership-CduRygE7.js +0 -245
- package/dist/ownership-CduRygE7.js.map +0 -1
- package/dist/runtime-0mOFbe_H.cjs +0 -2439
- package/dist/runtime-0mOFbe_H.cjs.map +0 -1
- package/dist/runtime-B22tuj9A.d.cts +0 -150
- package/dist/runtime-BFmhzPpZ.d.ts +0 -150
- package/dist/runtime-DF1q9Gje.js +0 -2129
- package/dist/runtime-DF1q9Gje.js.map +0 -1
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_store = require("./store-1Uob0Ghk.cjs");
|
|
2
2
|
//#region core/src/access/dependency.ts
|
|
3
3
|
const createDependencyTracker = () => {
|
|
4
4
|
const targets = [];
|
|
5
5
|
return {
|
|
6
6
|
record: (value) => {
|
|
7
|
-
if (!targets.some((entry) =>
|
|
7
|
+
if (!targets.some((entry) => require_store.same(entry, value))) targets.push(value);
|
|
8
8
|
},
|
|
9
|
-
clear: () => {
|
|
10
|
-
targets.length = 0;
|
|
11
|
-
},
|
|
12
|
-
size: () => targets.length,
|
|
13
|
-
some: (test) => targets.some(test),
|
|
14
9
|
snapshot: () => Object.freeze(targets.slice())
|
|
15
10
|
};
|
|
16
11
|
};
|
|
@@ -18,7 +13,7 @@ const createDependencyTracker = () => {
|
|
|
18
13
|
//#region core/src/integration.ts
|
|
19
14
|
const track = (runtime, selector) => {
|
|
20
15
|
const dependencies = createDependencyTracker();
|
|
21
|
-
const value =
|
|
16
|
+
const value = require_store.readWith(runtime, selector, dependencies);
|
|
22
17
|
return Object.freeze({
|
|
23
18
|
value,
|
|
24
19
|
targets: dependencies.snapshot()
|
|
@@ -32,4 +27,4 @@ Object.defineProperty(exports, "track", {
|
|
|
32
27
|
}
|
|
33
28
|
});
|
|
34
29
|
|
|
35
|
-
//# sourceMappingURL=integration-
|
|
30
|
+
//# sourceMappingURL=integration-C87tjRop.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-C87tjRop.cjs","names":["readWith"],"sources":["../core/src/access/dependency.ts","../core/src/integration.ts"],"sourcesContent":["import type { ImpactTarget } from '../schema';\nimport * as impactTarget from '../impact-target';\n\nexport type DependencyTracker = {\n readonly record: (target: ImpactTarget<unknown>) => void;\n readonly snapshot: () => readonly ImpactTarget<unknown>[];\n};\n\nexport const createDependencyTracker = (): DependencyTracker => {\n const targets: ImpactTarget<unknown>[] = [];\n return {\n record: value => {\n if (!targets.some(entry => impactTarget.same(entry, value))) targets.push(value);\n },\n snapshot: () => Object.freeze(targets.slice()),\n };\n};\n","import type { ObjectNode, ImpactTarget } from './schema';\nimport type { Read } from './access/scope';\nimport type { DocumentReadable } from './runtime/contract';\nimport { createDependencyTracker } from './access/dependency';\nimport { readWith } from './runtime/access';\nexport { projectionStoreDebug } from './projection/store';\nexport type { AddressRef } from './address';\nexport { contains, debugKey, overlaps, read as readAddress, resolveAddress } from './address';\nexport { subscribeDependencies } from './runtime/notification';\nexport { same as sameTarget } from './impact-target';\nexport type { ImpactTarget } from './schema';\n\nexport type TrackedSelection<TValue> = {\n readonly value: TValue;\n readonly targets: readonly ImpactTarget<unknown>[];\n};\n\n// Framework adapters receive one immutable result instead of coordinating a\n// mutable collector with the reader's scoped lifetime themselves.\nexport const track = <TSchema extends ObjectNode, TValue>(\n runtime: DocumentReadable<TSchema>,\n selector: (read: Read<TSchema>) => TValue\n): TrackedSelection<TValue> => {\n const dependencies = createDependencyTracker();\n const value = readWith(runtime, selector, dependencies);\n return Object.freeze({ value, targets: dependencies.snapshot() });\n};\n"],"mappings":";;AAQA,MAAa,gCAAmD;CAC9D,MAAM,UAAmC,EAAE;AAC3C,QAAO;EACL,SAAQ,UAAS;AACf,OAAI,CAAC,QAAQ,MAAK,UAAA,cAAA,KAA2B,OAAO,MAAM,CAAC,CAAE,SAAQ,KAAK,MAAM;;EAElF,gBAAgB,OAAO,OAAO,QAAQ,OAAO,CAAC;EAC/C;;;;ACIH,MAAa,SACX,SACA,aAC6B;CAC7B,MAAM,eAAe,yBAAyB;CAC9C,MAAM,QAAQA,cAAAA,SAAS,SAAS,UAAU,aAAa;AACvD,QAAO,OAAO,OAAO;EAAE;EAAO,SAAS,aAAa,UAAU;EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as same, _ as readWith } from "./store-D7QH6Rzw.js";
|
|
2
2
|
//#region core/src/access/dependency.ts
|
|
3
3
|
const createDependencyTracker = () => {
|
|
4
4
|
const targets = [];
|
|
@@ -6,11 +6,6 @@ const createDependencyTracker = () => {
|
|
|
6
6
|
record: (value) => {
|
|
7
7
|
if (!targets.some((entry) => same(entry, value))) targets.push(value);
|
|
8
8
|
},
|
|
9
|
-
clear: () => {
|
|
10
|
-
targets.length = 0;
|
|
11
|
-
},
|
|
12
|
-
size: () => targets.length,
|
|
13
|
-
some: (test) => targets.some(test),
|
|
14
9
|
snapshot: () => Object.freeze(targets.slice())
|
|
15
10
|
};
|
|
16
11
|
};
|
|
@@ -27,4 +22,4 @@ const track = (runtime, selector) => {
|
|
|
27
22
|
//#endregion
|
|
28
23
|
export { track as t };
|
|
29
24
|
|
|
30
|
-
//# sourceMappingURL=integration-
|
|
25
|
+
//# sourceMappingURL=integration-D5XCBLJ8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-D5XCBLJ8.js","names":["impactTarget.same"],"sources":["../core/src/access/dependency.ts","../core/src/integration.ts"],"sourcesContent":["import type { ImpactTarget } from '../schema';\nimport * as impactTarget from '../impact-target';\n\nexport type DependencyTracker = {\n readonly record: (target: ImpactTarget<unknown>) => void;\n readonly snapshot: () => readonly ImpactTarget<unknown>[];\n};\n\nexport const createDependencyTracker = (): DependencyTracker => {\n const targets: ImpactTarget<unknown>[] = [];\n return {\n record: value => {\n if (!targets.some(entry => impactTarget.same(entry, value))) targets.push(value);\n },\n snapshot: () => Object.freeze(targets.slice()),\n };\n};\n","import type { ObjectNode, ImpactTarget } from './schema';\nimport type { Read } from './access/scope';\nimport type { DocumentReadable } from './runtime/contract';\nimport { createDependencyTracker } from './access/dependency';\nimport { readWith } from './runtime/access';\nexport { projectionStoreDebug } from './projection/store';\nexport type { AddressRef } from './address';\nexport { contains, debugKey, overlaps, read as readAddress, resolveAddress } from './address';\nexport { subscribeDependencies } from './runtime/notification';\nexport { same as sameTarget } from './impact-target';\nexport type { ImpactTarget } from './schema';\n\nexport type TrackedSelection<TValue> = {\n readonly value: TValue;\n readonly targets: readonly ImpactTarget<unknown>[];\n};\n\n// Framework adapters receive one immutable result instead of coordinating a\n// mutable collector with the reader's scoped lifetime themselves.\nexport const track = <TSchema extends ObjectNode, TValue>(\n runtime: DocumentReadable<TSchema>,\n selector: (read: Read<TSchema>) => TValue\n): TrackedSelection<TValue> => {\n const dependencies = createDependencyTracker();\n const value = readWith(runtime, selector, dependencies);\n return Object.freeze({ value, targets: dependencies.snapshot() });\n};\n"],"mappings":";;AAQA,MAAa,gCAAmD;CAC9D,MAAM,UAAmC,EAAE;AAC3C,QAAO;EACL,SAAQ,UAAS;AACf,OAAI,CAAC,QAAQ,MAAK,UAASA,KAAkB,OAAO,MAAM,CAAC,CAAE,SAAQ,KAAK,MAAM;;EAElF,gBAAgB,OAAO,OAAO,QAAQ,OAAO,CAAC;EAC/C;;;;ACIH,MAAa,SACX,SACA,aAC6B;CAC7B,MAAM,eAAe,yBAAyB;CAC9C,MAAM,QAAQ,SAAS,SAAS,UAAU,aAAa;AACvD,QAAO,OAAO,OAAO;EAAE;EAAO,SAAS,aAAa,UAAU;EAAE,CAAC"}
|
package/dist/integration.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
exports.contains =
|
|
6
|
-
exports.debugKey =
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
2
|
+
const require_issue = require("./issue-DhrNdQNg.cjs");
|
|
3
|
+
const require_store = require("./store-1Uob0Ghk.cjs");
|
|
4
|
+
const require_integration = require("./integration-C87tjRop.cjs");
|
|
5
|
+
exports.contains = require_issue.contains;
|
|
6
|
+
exports.debugKey = require_issue.debugKey;
|
|
7
|
+
exports.overlaps = require_issue.overlaps;
|
|
8
|
+
exports.projectionStoreDebug = require_store.projectionStoreDebug;
|
|
9
|
+
exports.readAddress = require_issue.read;
|
|
10
|
+
exports.resolveAddress = require_issue.resolveAddress;
|
|
11
|
+
exports.sameTarget = require_store.same;
|
|
12
|
+
exports.subscribeDependencies = require_store.subscribeDependencies;
|
|
13
13
|
exports.track = require_integration.track;
|
package/dist/integration.d.cts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as debugKey, J as ImpactTarget, M as read, N as resolveAddress, O as AddressRef, Q as ObjectNode, T as Read, _ as Unsubscribe, j as overlaps, k as contains, s as DocumentReadable, t as CommitListener } from "./contract-CIU5FCC1.cjs";
|
|
2
|
+
import { r as projectionStoreDebug } from "./store-CD0KdGsq.cjs";
|
|
3
3
|
|
|
4
|
+
//#region core/src/impact-target.d.ts
|
|
5
|
+
declare const same: (left: ImpactTarget<unknown>, right: ImpactTarget<unknown>) => boolean;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region core/src/runtime/notification.d.ts
|
|
8
|
+
declare const subscribeDependencies: <S extends ObjectNode>(runtime: DocumentReadable<S>, targets: readonly ImpactTarget[], listener: CommitListener<S>) => Unsubscribe;
|
|
9
|
+
//#endregion
|
|
4
10
|
//#region core/src/integration.d.ts
|
|
5
11
|
type TrackedSelection<TValue> = {
|
|
6
12
|
readonly value: TValue;
|
|
7
13
|
readonly targets: readonly ImpactTarget<unknown>[];
|
|
8
14
|
};
|
|
9
|
-
declare const track: <TSchema extends
|
|
15
|
+
declare const track: <TSchema extends ObjectNode, TValue>(runtime: DocumentReadable<TSchema>, selector: (read: Read<TSchema>) => TValue) => TrackedSelection<TValue>;
|
|
10
16
|
//#endregion
|
|
11
|
-
export { type AddressRef, type
|
|
17
|
+
export { type AddressRef, type ImpactTarget, TrackedSelection, contains, debugKey, overlaps, projectionStoreDebug, read as readAddress, resolveAddress, same as sameTarget, subscribeDependencies, track };
|
|
12
18
|
//# sourceMappingURL=integration.d.cts.map
|
package/dist/integration.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as debugKey, J as ImpactTarget, M as read, N as resolveAddress, O as AddressRef, Q as ObjectNode, T as Read, _ as Unsubscribe, j as overlaps, k as contains, s as DocumentReadable, t as CommitListener } from "./contract-BNStLbSE.js";
|
|
2
|
+
import { r as projectionStoreDebug } from "./store-cp5CpfCy.js";
|
|
3
3
|
|
|
4
|
+
//#region core/src/impact-target.d.ts
|
|
5
|
+
declare const same: (left: ImpactTarget<unknown>, right: ImpactTarget<unknown>) => boolean;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region core/src/runtime/notification.d.ts
|
|
8
|
+
declare const subscribeDependencies: <S extends ObjectNode>(runtime: DocumentReadable<S>, targets: readonly ImpactTarget[], listener: CommitListener<S>) => Unsubscribe;
|
|
9
|
+
//#endregion
|
|
4
10
|
//#region core/src/integration.d.ts
|
|
5
11
|
type TrackedSelection<TValue> = {
|
|
6
12
|
readonly value: TValue;
|
|
7
13
|
readonly targets: readonly ImpactTarget<unknown>[];
|
|
8
14
|
};
|
|
9
|
-
declare const track: <TSchema extends
|
|
15
|
+
declare const track: <TSchema extends ObjectNode, TValue>(runtime: DocumentReadable<TSchema>, selector: (read: Read<TSchema>) => TValue) => TrackedSelection<TValue>;
|
|
10
16
|
//#endregion
|
|
11
|
-
export { type AddressRef, type
|
|
17
|
+
export { type AddressRef, type ImpactTarget, TrackedSelection, contains, debugKey, overlaps, projectionStoreDebug, read as readAddress, resolveAddress, same as sameTarget, subscribeDependencies, track };
|
|
12
18
|
//# sourceMappingURL=integration.d.ts.map
|
package/dist/integration.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { c as debugKey, d as overlaps, f as read, o as contains, p as resolveAddress } from "./issue-DVaGQGeP.js";
|
|
2
|
+
import { S as same, f as subscribeDependencies, n as projectionStoreDebug } from "./store-D7QH6Rzw.js";
|
|
3
|
+
import { t as track } from "./integration-D5XCBLJ8.js";
|
|
4
|
+
export { contains, debugKey, overlaps, projectionStoreDebug, read as readAddress, resolveAddress, same as sameTarget, subscribeDependencies, track };
|