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
package/dist/index.d.cts
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as
|
|
1
|
+
import { $ as ObjectShape, D as snapshot, E as assign, F as ChangeSet, G as DocumentTreeNode, H as DocumentAnchor, I as MemberChange, K as DocumentTreeValue, L as ValueTransition, P as Change, Q as ObjectNode, S as DocumentImpact, T as Read, U as DocumentListConfig, V as DocumentAddress, W as DocumentNode, X as ListNode, Y as Infer, Z as MapNode, _ as Unsubscribe, _t as ParseError, a as DocumentDisposedError, at as TreeNode, b as MutationIssueCode, bt as parse, c as DocumentReentrancyError, ct as VariantShape, d as LocalHistory, dt as map, et as OptionalNode, f as ObserverError, ft as object, g as TransactionResult, gt as variant, h as TransactionRejected, ht as tree, i as DocumentDiagnostic, it as TableNode, l as DocumentRuntime, lt as field, mt as table, n as CommitSource, nt as ReadonlyValue, o as DocumentProblem, p as OperationResult, pt as optional, q as FieldNode, r as DocumentCommit, rt as SchemaPath, s as DocumentReadable, st as VariantNode, u as HistoryState, ut as list, v as Readable, vt as ParseIssue, w as Draft, x as CollectionImpact, y as MutationIssue, yt as Validator } from "./contract-CIU5FCC1.cjs";
|
|
2
|
+
import { C as ProjectionDisposedError, S as project, _ as ProjectionSources, a as AdvancedCollectionSpec, b as ValueProjection, c as CollectionProjection, d as DocumentCollectionProjection, f as DocumentEvent, g as ProjectionEvents, h as Projection, i as AdvancedCollectionProcess, l as CollectionSource, m as InputProjection, n as createProjectionStore, o as AdvancedValueSpec, p as DocumentProjection, s as CollectionEvent, t as ProjectionStore, u as DocumentCollectionEvent, v as ProjectionValues, w as ProjectionError, x as input, y as ValueEvent } from "./store-CD0KdGsq.cjs";
|
|
3
3
|
|
|
4
|
-
//#region \0rolldown/runtime.js
|
|
5
|
-
//#endregion
|
|
6
4
|
//#region core/src/runtime.d.ts
|
|
7
|
-
declare const createDocument: <
|
|
8
|
-
readonly schema:
|
|
9
|
-
readonly initial:
|
|
5
|
+
declare const createDocument: <S extends ObjectNode>(input: {
|
|
6
|
+
readonly schema: S;
|
|
7
|
+
readonly initial: Infer<S>;
|
|
10
8
|
readonly history?: {
|
|
11
9
|
readonly capacity?: number;
|
|
12
10
|
} | false;
|
|
13
|
-
}) => DocumentRuntime<
|
|
11
|
+
}) => DocumentRuntime<S>;
|
|
14
12
|
//#endregion
|
|
15
13
|
//#region core/src/runtime/readable.d.ts
|
|
16
|
-
declare const asReadable: <TSchema extends
|
|
17
|
-
declare namespace impact_target_d_exports {
|
|
18
|
-
export { address, belongs, bucket, id, same };
|
|
19
|
-
}
|
|
20
|
-
declare const address: (target: ImpactTarget<unknown>) => DocumentAddress;
|
|
21
|
-
declare const id: (target: ImpactTarget<unknown>) => string | undefined;
|
|
22
|
-
declare const belongs: (target: ImpactTarget<unknown>, schema: DocumentSchema) => boolean;
|
|
23
|
-
declare const same: (left: ImpactTarget<unknown>, right: ImpactTarget<unknown>) => boolean;
|
|
24
|
-
declare const bucket: (target: ImpactTarget<unknown>) => string | undefined;
|
|
14
|
+
declare const asReadable: <TSchema extends ObjectNode>(runtime: DocumentRuntime<TSchema>) => DocumentReadable<TSchema>;
|
|
25
15
|
//#endregion
|
|
26
16
|
//#region core/src/projection/select.d.ts
|
|
27
|
-
type DocumentSelector<TSchema extends
|
|
28
|
-
declare const select: <TSchema extends
|
|
17
|
+
type DocumentSelector<TSchema extends ObjectNode, TResult> = (read: Read<TSchema>) => TResult;
|
|
18
|
+
declare const select: <TSchema extends ObjectNode, TResult>(runtime: DocumentReadable<TSchema>, selector: DocumentSelector<TSchema, TResult>) => TResult;
|
|
29
19
|
//#endregion
|
|
30
|
-
export { type
|
|
20
|
+
export { type AdvancedCollectionProcess, type AdvancedCollectionSpec, type AdvancedValueSpec, type Change, type ChangeSet, type CollectionEvent, type CollectionImpact, type CollectionProjection, type CollectionSource, type CommitSource, type DocumentAddress, type DocumentAnchor, type DocumentCollectionEvent, type DocumentCollectionProjection, type DocumentCommit, type DocumentDiagnostic, DocumentDisposedError, type DocumentEvent, type DocumentImpact, type DocumentListConfig, type DocumentNode, type DocumentProblem, type DocumentProjection, type DocumentReadable, DocumentReentrancyError, type DocumentRuntime, type DocumentSelector, type DocumentTreeNode, type DocumentTreeValue, type Draft, type FieldNode, type HistoryState, type Infer, type InputProjection, type ListNode, type LocalHistory, type MapNode, type MemberChange, type MutationIssue, type MutationIssueCode, type ObjectNode, type ObjectShape, type ObserverError, type OperationResult, type OptionalNode, ParseError, type ParseIssue, type Projection, ProjectionDisposedError, ProjectionError, type ProjectionEvents, type ProjectionSources, type ProjectionStore, type ProjectionValues, type Read, type Readable, type ReadonlyValue, type SchemaPath, type TableNode, TransactionRejected, type TransactionResult, type TreeNode, type Unsubscribe, type Validator, type ValueEvent, type ValueProjection, type ValueTransition, type VariantNode, type VariantShape, asReadable, assign, createDocument, createProjectionStore, field, input, list, map, object, optional, parse, project, select, snapshot, table, tree, variant };
|
|
31
21
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as
|
|
1
|
+
import { $ as ObjectShape, D as snapshot, E as assign, F as ChangeSet, G as DocumentTreeNode, H as DocumentAnchor, I as MemberChange, K as DocumentTreeValue, L as ValueTransition, P as Change, Q as ObjectNode, S as DocumentImpact, T as Read, U as DocumentListConfig, V as DocumentAddress, W as DocumentNode, X as ListNode, Y as Infer, Z as MapNode, _ as Unsubscribe, _t as ParseError, a as DocumentDisposedError, at as TreeNode, b as MutationIssueCode, bt as parse, c as DocumentReentrancyError, ct as VariantShape, d as LocalHistory, dt as map, et as OptionalNode, f as ObserverError, ft as object, g as TransactionResult, gt as variant, h as TransactionRejected, ht as tree, i as DocumentDiagnostic, it as TableNode, l as DocumentRuntime, lt as field, mt as table, n as CommitSource, nt as ReadonlyValue, o as DocumentProblem, p as OperationResult, pt as optional, q as FieldNode, r as DocumentCommit, rt as SchemaPath, s as DocumentReadable, st as VariantNode, u as HistoryState, ut as list, v as Readable, vt as ParseIssue, w as Draft, x as CollectionImpact, y as MutationIssue, yt as Validator } from "./contract-BNStLbSE.js";
|
|
2
|
+
import { C as ProjectionDisposedError, S as project, _ as ProjectionSources, a as AdvancedCollectionSpec, b as ValueProjection, c as CollectionProjection, d as DocumentCollectionProjection, f as DocumentEvent, g as ProjectionEvents, h as Projection, i as AdvancedCollectionProcess, l as CollectionSource, m as InputProjection, n as createProjectionStore, o as AdvancedValueSpec, p as DocumentProjection, s as CollectionEvent, t as ProjectionStore, u as DocumentCollectionEvent, v as ProjectionValues, w as ProjectionError, x as input, y as ValueEvent } from "./store-cp5CpfCy.js";
|
|
3
3
|
|
|
4
4
|
//#region core/src/runtime.d.ts
|
|
5
|
-
declare const createDocument: <
|
|
6
|
-
readonly schema:
|
|
7
|
-
readonly initial:
|
|
5
|
+
declare const createDocument: <S extends ObjectNode>(input: {
|
|
6
|
+
readonly schema: S;
|
|
7
|
+
readonly initial: Infer<S>;
|
|
8
8
|
readonly history?: {
|
|
9
9
|
readonly capacity?: number;
|
|
10
10
|
} | false;
|
|
11
|
-
}) => DocumentRuntime<
|
|
11
|
+
}) => DocumentRuntime<S>;
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region core/src/runtime/readable.d.ts
|
|
14
|
-
declare const asReadable: <TSchema extends
|
|
15
|
-
declare namespace impact_target_d_exports {
|
|
16
|
-
export { address, belongs, bucket, id, same };
|
|
17
|
-
}
|
|
18
|
-
declare const address: (target: ImpactTarget<unknown>) => DocumentAddress;
|
|
19
|
-
declare const id: (target: ImpactTarget<unknown>) => string | undefined;
|
|
20
|
-
declare const belongs: (target: ImpactTarget<unknown>, schema: DocumentSchema) => boolean;
|
|
21
|
-
declare const same: (left: ImpactTarget<unknown>, right: ImpactTarget<unknown>) => boolean;
|
|
22
|
-
declare const bucket: (target: ImpactTarget<unknown>) => string | undefined;
|
|
14
|
+
declare const asReadable: <TSchema extends ObjectNode>(runtime: DocumentRuntime<TSchema>) => DocumentReadable<TSchema>;
|
|
23
15
|
//#endregion
|
|
24
16
|
//#region core/src/projection/select.d.ts
|
|
25
|
-
type DocumentSelector<TSchema extends
|
|
26
|
-
declare const select: <TSchema extends
|
|
17
|
+
type DocumentSelector<TSchema extends ObjectNode, TResult> = (read: Read<TSchema>) => TResult;
|
|
18
|
+
declare const select: <TSchema extends ObjectNode, TResult>(runtime: DocumentReadable<TSchema>, selector: DocumentSelector<TSchema, TResult>) => TResult;
|
|
27
19
|
//#endregion
|
|
28
|
-
export { type
|
|
20
|
+
export { type AdvancedCollectionProcess, type AdvancedCollectionSpec, type AdvancedValueSpec, type Change, type ChangeSet, type CollectionEvent, type CollectionImpact, type CollectionProjection, type CollectionSource, type CommitSource, type DocumentAddress, type DocumentAnchor, type DocumentCollectionEvent, type DocumentCollectionProjection, type DocumentCommit, type DocumentDiagnostic, DocumentDisposedError, type DocumentEvent, type DocumentImpact, type DocumentListConfig, type DocumentNode, type DocumentProblem, type DocumentProjection, type DocumentReadable, DocumentReentrancyError, type DocumentRuntime, type DocumentSelector, type DocumentTreeNode, type DocumentTreeValue, type Draft, type FieldNode, type HistoryState, type Infer, type InputProjection, type ListNode, type LocalHistory, type MapNode, type MemberChange, type MutationIssue, type MutationIssueCode, type ObjectNode, type ObjectShape, type ObserverError, type OperationResult, type OptionalNode, ParseError, type ParseIssue, type Projection, ProjectionDisposedError, ProjectionError, type ProjectionEvents, type ProjectionSources, type ProjectionStore, type ProjectionValues, type Read, type Readable, type ReadonlyValue, type SchemaPath, type TableNode, TransactionRejected, type TransactionResult, type TreeNode, type Unsubscribe, type Validator, type ValueEvent, type ValueProjection, type ValueTransition, type VariantNode, type VariantShape, asReadable, assign, createDocument, createProjectionStore, field, input, list, map, object, optional, parse, project, select, snapshot, table, tree, variant };
|
|
29
21
|
//# sourceMappingURL=index.d.ts.map
|