doxum 0.1.21 → 0.1.23
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 +35 -7
- package/dist/{advanced-FgdTwu5b.d.ts → advanced-CLJCWkHa.d.cts} +3 -3
- package/dist/{advanced-COFJtWMT.js → advanced-CRNHfJBu.js} +482 -446
- package/dist/advanced-CRNHfJBu.js.map +1 -0
- package/dist/{advanced-BRL5pN0y.cjs → advanced-Cle5g3B4.cjs} +615 -459
- package/dist/advanced-Cle5g3B4.cjs.map +1 -0
- package/dist/{advanced-DfKc7TZR.d.cts → advanced-d6J61er9.d.ts} +3 -3
- package/dist/advanced.cjs +1 -1
- package/dist/advanced.d.cts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +1 -1
- package/dist/context-BcLKGfq8.cjs +149 -0
- package/dist/context-BcLKGfq8.cjs.map +1 -0
- package/dist/context-DFEaDUv5.js +84 -0
- package/dist/context-DFEaDUv5.js.map +1 -0
- package/dist/{contract-CdmDHRUq.d.cts → contract-SYJFP0lM.d.cts} +62 -88
- package/dist/{contract-KG5XnQZt.d.ts → contract-ULPQmiEs.d.ts} +62 -88
- package/dist/driver-BD3DQOW6.cjs +382 -0
- package/dist/driver-BD3DQOW6.cjs.map +1 -0
- package/dist/{driver-CLYJOGDQ.js → driver-yFfvDMX5.js} +155 -26
- package/dist/driver-yFfvDMX5.js.map +1 -0
- package/dist/index.cjs +2370 -406
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2293 -330
- package/dist/index.js.map +1 -1
- package/dist/local-sync.cjs +5 -5
- package/dist/local-sync.cjs.map +1 -1
- package/dist/local-sync.d.cts +1 -1
- package/dist/local-sync.d.ts +1 -1
- package/dist/local-sync.js +2 -2
- package/dist/local-sync.js.map +1 -1
- package/dist/react.cjs +2 -69
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +0 -1
- package/dist/react.d.ts +1 -2
- package/dist/react.js +3 -70
- package/dist/react.js.map +1 -1
- package/package.json +1 -6
- package/skills/doxum-runtime/SKILL.md +7 -1
- package/skills/doxum-runtime/references/guide.en.md +17 -6
- package/skills/doxum-runtime/references/guide.zh-CN.md +15 -5
- package/skills/doxum-runtime/references/invariants.en.md +5 -3
- package/skills/doxum-runtime/references/invariants.zh-CN.md +4 -3
- package/skills/doxum-runtime/references/projections.en.md +5 -0
- package/skills/doxum-runtime/references/projections.zh-CN.md +5 -0
- package/dist/access-BeSV5ve-.js +0 -816
- package/dist/access-BeSV5ve-.js.map +0 -1
- package/dist/access-Bienf28h.cjs +0 -911
- package/dist/access-Bienf28h.cjs.map +0 -1
- package/dist/advanced-BRL5pN0y.cjs.map +0 -1
- package/dist/advanced-COFJtWMT.js.map +0 -1
- package/dist/driver-CLYJOGDQ.js.map +0 -1
- package/dist/driver-Djr3BVvo.cjs +0 -241
- package/dist/driver-Djr3BVvo.cjs.map +0 -1
- package/dist/integration-C4Isp8lJ.js +0 -26
- package/dist/integration-C4Isp8lJ.js.map +0 -1
- package/dist/integration-Z6MsfFI7.cjs +0 -31
- package/dist/integration-Z6MsfFI7.cjs.map +0 -1
- package/dist/integration.cjs +0 -12
- package/dist/integration.d.cts +0 -17
- package/dist/integration.d.ts +0 -17
- package/dist/integration.js +0 -4
- package/dist/issue-DjK1xp5K.cjs +0 -881
- package/dist/issue-DjK1xp5K.cjs.map +0 -1
- package/dist/issue-W0hT8u8D.js +0 -642
- package/dist/issue-W0hT8u8D.js.map +0 -1
- package/dist/notification-Bkjau6B6.js +0 -232
- package/dist/notification-Bkjau6B6.js.map +0 -1
- package/dist/notification-DJfouMEb.cjs +0 -309
- package/dist/notification-DJfouMEb.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { C as ProjectionError, S as ProjectionDisposedError, _ as ExternalCollectionEvent, b as ExternalValueEvent, d as Input, f as Projection, g as CollectionChange, h as observe, m as input, p as derive, u as incremental, v as ExternalCollectionRead, x as ExternalValueSource, y as ExternalCollectionSource } from "./advanced-
|
|
1
|
+
import { $ as TreeNode, A as ParseError, B as DocumentTreeNode, C as Read, D as ChangeSet, E as Change, G as MapNode, H as FieldNode, I as DocumentAddress, J as OptionalNode, K as ObjectNode, L as DocumentAnchor, M as parse, O as MemberChange, Q as TableNode, R as DocumentListConfig, S as Draft, T as snapshot, U as Infer, V as DocumentTreeValue, W as ListNode, X as ReadonlyValue, Y as PathValueOf, Z as SchemaPath, _ as Unsubscribe, a as DocumentProblem, at as map, b as CollectionImpact, c as DocumentRuntime, ct as table, d as ObserverError, et as Validator, f as OperationResult, g as Readable, h as TransactionResult, i as DocumentDisposedError, it as list, j as ParseIssue, k as ValueTransition, l as HistoryState, lt as tree, m as TransactionRejected, n as DocumentCommit, nt as VariantShape, o as DocumentReadable, ot as object, q as ObjectShape, r as DocumentDiagnostic, rt as field, s as DocumentReentrancyError, st as optional, t as CommitSource, tt as VariantNode, u as LocalHistory, ut as variant, v as MutationIssue, w as replace, x as DocumentImpact, y as MutationIssueCode, z as DocumentNode } from "./contract-SYJFP0lM.cjs";
|
|
2
|
+
import { C as ProjectionError, S as ProjectionDisposedError, _ as ExternalCollectionEvent, b as ExternalValueEvent, d as Input, f as Projection, g as CollectionChange, h as observe, m as input, p as derive, u as incremental, v as ExternalCollectionRead, x as ExternalValueSource, y as ExternalCollectionSource } from "./advanced-CLJCWkHa.cjs";
|
|
3
3
|
|
|
4
4
|
//#region core/src/runtime.d.ts
|
|
5
5
|
declare const createDocument: <S extends ObjectNode>(input: {
|
|
@@ -13,9 +13,10 @@ declare const createDocument: <S extends ObjectNode>(input: {
|
|
|
13
13
|
//#region core/src/runtime/readable.d.ts
|
|
14
14
|
declare const asReadable: <TSchema extends ObjectNode>(runtime: DocumentRuntime<TSchema>) => DocumentReadable<TSchema>;
|
|
15
15
|
//#endregion
|
|
16
|
-
//#region core/src/
|
|
16
|
+
//#region core/src/runtime/select.d.ts
|
|
17
17
|
type DocumentSelector<TSchema extends ObjectNode, TResult> = (read: Read<TSchema>) => TResult;
|
|
18
|
-
declare const read: <TSchema extends ObjectNode, TResult>(
|
|
18
|
+
declare const read: <TSchema extends ObjectNode, TResult>(document: DocumentReadable<TSchema>, selector: DocumentSelector<TSchema, TResult>) => TResult;
|
|
19
|
+
declare const select: <TSchema extends ObjectNode, TResult>(document: DocumentReadable<TSchema>, selector: DocumentSelector<TSchema, TResult>, equality?: (previous: TResult, next: TResult) => boolean) => Readable<TResult>;
|
|
19
20
|
//#endregion
|
|
20
21
|
//#region core/src/projection/runtime.d.ts
|
|
21
22
|
type KeyedDraft<K extends string, V> = {
|
|
@@ -53,5 +54,5 @@ declare const createProjectionRuntime: (options?: {
|
|
|
53
54
|
readonly onError?: (error: ProjectionError) => void;
|
|
54
55
|
}) => ProjectionRuntime;
|
|
55
56
|
//#endregion
|
|
56
|
-
export { type Change, type ChangeSet, type CollectionChange, type CollectionImpact, type CommitSource, type DocumentAddress, type DocumentAnchor, type DocumentCommit, type DocumentDiagnostic, DocumentDisposedError, type DocumentImpact, type DocumentListConfig, type DocumentNode, type DocumentProblem, type DocumentReadable, DocumentReentrancyError, type DocumentRuntime, type DocumentSelector, type DocumentTreeNode, type DocumentTreeValue, type Draft, type ExternalCollectionEvent, type ExternalCollectionRead, type ExternalCollectionSource, type ExternalValueEvent, type ExternalValueSource, type FieldNode, type HistoryState, type Infer, type Input, 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 PathValueOf, type Projection, ProjectionDisposedError, ProjectionError, type ProjectionRuntime, type ProjectionScope, type Read, type Readable, type ReadonlyValue, type SchemaPath, type TableNode, TransactionRejected, type TransactionResult, type TreeNode, type Unsubscribe, type Validator, type ValueTransition, type VariantNode, type VariantShape, asReadable, createDocument, createProjectionRuntime, derive, field, input, list, map, object, observe, optional, parse, read, replace, snapshot, table, tree, variant };
|
|
57
|
+
export { type Change, type ChangeSet, type CollectionChange, type CollectionImpact, type CommitSource, type DocumentAddress, type DocumentAnchor, type DocumentCommit, type DocumentDiagnostic, DocumentDisposedError, type DocumentImpact, type DocumentListConfig, type DocumentNode, type DocumentProblem, type DocumentReadable, DocumentReentrancyError, type DocumentRuntime, type DocumentSelector, type DocumentTreeNode, type DocumentTreeValue, type Draft, type ExternalCollectionEvent, type ExternalCollectionRead, type ExternalCollectionSource, type ExternalValueEvent, type ExternalValueSource, type FieldNode, type HistoryState, type Infer, type Input, 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 PathValueOf, type Projection, ProjectionDisposedError, ProjectionError, type ProjectionRuntime, type ProjectionScope, type Read, type Readable, type ReadonlyValue, type SchemaPath, type TableNode, TransactionRejected, type TransactionResult, type TreeNode, type Unsubscribe, type Validator, type ValueTransition, type VariantNode, type VariantShape, asReadable, createDocument, createProjectionRuntime, derive, field, input, list, map, object, observe, optional, parse, read, replace, select, snapshot, table, tree, variant };
|
|
57
58
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { C as ProjectionError, S as ProjectionDisposedError, _ as ExternalCollectionEvent, b as ExternalValueEvent, d as Input, f as Projection, g as CollectionChange, h as observe, m as input, p as derive, u as incremental, v as ExternalCollectionRead, x as ExternalValueSource, y as ExternalCollectionSource } from "./advanced-
|
|
1
|
+
import { $ as TreeNode, A as ParseError, B as DocumentTreeNode, C as Read, D as ChangeSet, E as Change, G as MapNode, H as FieldNode, I as DocumentAddress, J as OptionalNode, K as ObjectNode, L as DocumentAnchor, M as parse, O as MemberChange, Q as TableNode, R as DocumentListConfig, S as Draft, T as snapshot, U as Infer, V as DocumentTreeValue, W as ListNode, X as ReadonlyValue, Y as PathValueOf, Z as SchemaPath, _ as Unsubscribe, a as DocumentProblem, at as map, b as CollectionImpact, c as DocumentRuntime, ct as table, d as ObserverError, et as Validator, f as OperationResult, g as Readable, h as TransactionResult, i as DocumentDisposedError, it as list, j as ParseIssue, k as ValueTransition, l as HistoryState, lt as tree, m as TransactionRejected, n as DocumentCommit, nt as VariantShape, o as DocumentReadable, ot as object, q as ObjectShape, r as DocumentDiagnostic, rt as field, s as DocumentReentrancyError, st as optional, t as CommitSource, tt as VariantNode, u as LocalHistory, ut as variant, v as MutationIssue, w as replace, x as DocumentImpact, y as MutationIssueCode, z as DocumentNode } from "./contract-ULPQmiEs.js";
|
|
2
|
+
import { C as ProjectionError, S as ProjectionDisposedError, _ as ExternalCollectionEvent, b as ExternalValueEvent, d as Input, f as Projection, g as CollectionChange, h as observe, m as input, p as derive, u as incremental, v as ExternalCollectionRead, x as ExternalValueSource, y as ExternalCollectionSource } from "./advanced-d6J61er9.js";
|
|
3
3
|
|
|
4
4
|
//#region core/src/runtime.d.ts
|
|
5
5
|
declare const createDocument: <S extends ObjectNode>(input: {
|
|
@@ -13,9 +13,10 @@ declare const createDocument: <S extends ObjectNode>(input: {
|
|
|
13
13
|
//#region core/src/runtime/readable.d.ts
|
|
14
14
|
declare const asReadable: <TSchema extends ObjectNode>(runtime: DocumentRuntime<TSchema>) => DocumentReadable<TSchema>;
|
|
15
15
|
//#endregion
|
|
16
|
-
//#region core/src/
|
|
16
|
+
//#region core/src/runtime/select.d.ts
|
|
17
17
|
type DocumentSelector<TSchema extends ObjectNode, TResult> = (read: Read<TSchema>) => TResult;
|
|
18
|
-
declare const read: <TSchema extends ObjectNode, TResult>(
|
|
18
|
+
declare const read: <TSchema extends ObjectNode, TResult>(document: DocumentReadable<TSchema>, selector: DocumentSelector<TSchema, TResult>) => TResult;
|
|
19
|
+
declare const select: <TSchema extends ObjectNode, TResult>(document: DocumentReadable<TSchema>, selector: DocumentSelector<TSchema, TResult>, equality?: (previous: TResult, next: TResult) => boolean) => Readable<TResult>;
|
|
19
20
|
//#endregion
|
|
20
21
|
//#region core/src/projection/runtime.d.ts
|
|
21
22
|
type KeyedDraft<K extends string, V> = {
|
|
@@ -53,5 +54,5 @@ declare const createProjectionRuntime: (options?: {
|
|
|
53
54
|
readonly onError?: (error: ProjectionError) => void;
|
|
54
55
|
}) => ProjectionRuntime;
|
|
55
56
|
//#endregion
|
|
56
|
-
export { type Change, type ChangeSet, type CollectionChange, type CollectionImpact, type CommitSource, type DocumentAddress, type DocumentAnchor, type DocumentCommit, type DocumentDiagnostic, DocumentDisposedError, type DocumentImpact, type DocumentListConfig, type DocumentNode, type DocumentProblem, type DocumentReadable, DocumentReentrancyError, type DocumentRuntime, type DocumentSelector, type DocumentTreeNode, type DocumentTreeValue, type Draft, type ExternalCollectionEvent, type ExternalCollectionRead, type ExternalCollectionSource, type ExternalValueEvent, type ExternalValueSource, type FieldNode, type HistoryState, type Infer, type Input, 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 PathValueOf, type Projection, ProjectionDisposedError, ProjectionError, type ProjectionRuntime, type ProjectionScope, type Read, type Readable, type ReadonlyValue, type SchemaPath, type TableNode, TransactionRejected, type TransactionResult, type TreeNode, type Unsubscribe, type Validator, type ValueTransition, type VariantNode, type VariantShape, asReadable, createDocument, createProjectionRuntime, derive, field, input, list, map, object, observe, optional, parse, read, replace, snapshot, table, tree, variant };
|
|
57
|
+
export { type Change, type ChangeSet, type CollectionChange, type CollectionImpact, type CommitSource, type DocumentAddress, type DocumentAnchor, type DocumentCommit, type DocumentDiagnostic, DocumentDisposedError, type DocumentImpact, type DocumentListConfig, type DocumentNode, type DocumentProblem, type DocumentReadable, DocumentReentrancyError, type DocumentRuntime, type DocumentSelector, type DocumentTreeNode, type DocumentTreeValue, type Draft, type ExternalCollectionEvent, type ExternalCollectionRead, type ExternalCollectionSource, type ExternalValueEvent, type ExternalValueSource, type FieldNode, type HistoryState, type Infer, type Input, 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 PathValueOf, type Projection, ProjectionDisposedError, ProjectionError, type ProjectionRuntime, type ProjectionScope, type Read, type Readable, type ReadonlyValue, type SchemaPath, type TableNode, TransactionRejected, type TransactionResult, type TreeNode, type Unsubscribe, type Validator, type ValueTransition, type VariantNode, type VariantShape, asReadable, createDocument, createProjectionRuntime, derive, field, input, list, map, object, observe, optional, parse, read, replace, select, snapshot, table, tree, variant };
|
|
57
58
|
//# sourceMappingURL=index.d.ts.map
|