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.
Files changed (72) hide show
  1. package/README.md +35 -7
  2. package/dist/{advanced-FgdTwu5b.d.ts → advanced-CLJCWkHa.d.cts} +3 -3
  3. package/dist/{advanced-COFJtWMT.js → advanced-CRNHfJBu.js} +482 -446
  4. package/dist/advanced-CRNHfJBu.js.map +1 -0
  5. package/dist/{advanced-BRL5pN0y.cjs → advanced-Cle5g3B4.cjs} +615 -459
  6. package/dist/advanced-Cle5g3B4.cjs.map +1 -0
  7. package/dist/{advanced-DfKc7TZR.d.cts → advanced-d6J61er9.d.ts} +3 -3
  8. package/dist/advanced.cjs +1 -1
  9. package/dist/advanced.d.cts +1 -1
  10. package/dist/advanced.d.ts +1 -1
  11. package/dist/advanced.js +1 -1
  12. package/dist/context-BcLKGfq8.cjs +149 -0
  13. package/dist/context-BcLKGfq8.cjs.map +1 -0
  14. package/dist/context-DFEaDUv5.js +84 -0
  15. package/dist/context-DFEaDUv5.js.map +1 -0
  16. package/dist/{contract-CdmDHRUq.d.cts → contract-SYJFP0lM.d.cts} +62 -88
  17. package/dist/{contract-KG5XnQZt.d.ts → contract-ULPQmiEs.d.ts} +62 -88
  18. package/dist/driver-BD3DQOW6.cjs +382 -0
  19. package/dist/driver-BD3DQOW6.cjs.map +1 -0
  20. package/dist/{driver-CLYJOGDQ.js → driver-yFfvDMX5.js} +155 -26
  21. package/dist/driver-yFfvDMX5.js.map +1 -0
  22. package/dist/index.cjs +2370 -406
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +6 -5
  25. package/dist/index.d.ts +6 -5
  26. package/dist/index.js +2293 -330
  27. package/dist/index.js.map +1 -1
  28. package/dist/local-sync.cjs +5 -5
  29. package/dist/local-sync.cjs.map +1 -1
  30. package/dist/local-sync.d.cts +1 -1
  31. package/dist/local-sync.d.ts +1 -1
  32. package/dist/local-sync.js +2 -2
  33. package/dist/local-sync.js.map +1 -1
  34. package/dist/react.cjs +2 -69
  35. package/dist/react.cjs.map +1 -1
  36. package/dist/react.d.cts +0 -1
  37. package/dist/react.d.ts +1 -2
  38. package/dist/react.js +3 -70
  39. package/dist/react.js.map +1 -1
  40. package/package.json +1 -6
  41. package/skills/doxum-runtime/SKILL.md +7 -1
  42. package/skills/doxum-runtime/references/guide.en.md +17 -6
  43. package/skills/doxum-runtime/references/guide.zh-CN.md +15 -5
  44. package/skills/doxum-runtime/references/invariants.en.md +5 -3
  45. package/skills/doxum-runtime/references/invariants.zh-CN.md +4 -3
  46. package/skills/doxum-runtime/references/projections.en.md +5 -0
  47. package/skills/doxum-runtime/references/projections.zh-CN.md +5 -0
  48. package/dist/access-BeSV5ve-.js +0 -816
  49. package/dist/access-BeSV5ve-.js.map +0 -1
  50. package/dist/access-Bienf28h.cjs +0 -911
  51. package/dist/access-Bienf28h.cjs.map +0 -1
  52. package/dist/advanced-BRL5pN0y.cjs.map +0 -1
  53. package/dist/advanced-COFJtWMT.js.map +0 -1
  54. package/dist/driver-CLYJOGDQ.js.map +0 -1
  55. package/dist/driver-Djr3BVvo.cjs +0 -241
  56. package/dist/driver-Djr3BVvo.cjs.map +0 -1
  57. package/dist/integration-C4Isp8lJ.js +0 -26
  58. package/dist/integration-C4Isp8lJ.js.map +0 -1
  59. package/dist/integration-Z6MsfFI7.cjs +0 -31
  60. package/dist/integration-Z6MsfFI7.cjs.map +0 -1
  61. package/dist/integration.cjs +0 -12
  62. package/dist/integration.d.cts +0 -17
  63. package/dist/integration.d.ts +0 -17
  64. package/dist/integration.js +0 -4
  65. package/dist/issue-DjK1xp5K.cjs +0 -881
  66. package/dist/issue-DjK1xp5K.cjs.map +0 -1
  67. package/dist/issue-W0hT8u8D.js +0 -642
  68. package/dist/issue-W0hT8u8D.js.map +0 -1
  69. package/dist/notification-Bkjau6B6.js +0 -232
  70. package/dist/notification-Bkjau6B6.js.map +0 -1
  71. package/dist/notification-DJfouMEb.cjs +0 -309
  72. package/dist/notification-DJfouMEb.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as OptionalNode, B as DocumentAddress, C as Draft, E as snapshot, F as MemberChange, G as DocumentTreeValue, H as DocumentListConfig, I as ValueTransition, J as Infer, K as FieldNode, N as Change, P as ChangeSet, Q as ObjectShape, S as DocumentImpact, T as replace, U as DocumentNode, V as DocumentAnchor, W as DocumentTreeNode, X as MapNode, Y as ListNode, Z as ObjectNode, _ as Unsubscribe, _t as Validator, a as DocumentDisposedError, at as VariantNode, b as MutationIssueCode, c as DocumentReentrancyError, ct as list, d as LocalHistory, dt as optional, et as PathValueOf, f as ObserverError, ft as table, g as TransactionResult, gt as ParseIssue, h as TransactionRejected, ht as ParseError, i as DocumentDiagnostic, it as TreeNode, l as DocumentRuntime, lt as map, mt as variant, n as CommitSource, nt as SchemaPath, o as DocumentProblem, ot as VariantShape, p as OperationResult, pt as tree, r as DocumentCommit, rt as TableNode, s as DocumentReadable, st as field, tt as ReadonlyValue, u as HistoryState, ut as object, v as Readable, vt as parse, w as Read, x as CollectionImpact, y as MutationIssue } from "./contract-CdmDHRUq.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-DfKc7TZR.cjs";
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/projection/select.d.ts
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>(runtime: DocumentReadable<TSchema>, selector: DocumentSelector<TSchema, TResult>) => 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 OptionalNode, B as DocumentAddress, C as Draft, E as snapshot, F as MemberChange, G as DocumentTreeValue, H as DocumentListConfig, I as ValueTransition, J as Infer, K as FieldNode, N as Change, P as ChangeSet, Q as ObjectShape, S as DocumentImpact, T as replace, U as DocumentNode, V as DocumentAnchor, W as DocumentTreeNode, X as MapNode, Y as ListNode, Z as ObjectNode, _ as Unsubscribe, _t as Validator, a as DocumentDisposedError, at as VariantNode, b as MutationIssueCode, c as DocumentReentrancyError, ct as list, d as LocalHistory, dt as optional, et as PathValueOf, f as ObserverError, ft as table, g as TransactionResult, gt as ParseIssue, h as TransactionRejected, ht as ParseError, i as DocumentDiagnostic, it as TreeNode, l as DocumentRuntime, lt as map, mt as variant, n as CommitSource, nt as SchemaPath, o as DocumentProblem, ot as VariantShape, p as OperationResult, pt as tree, r as DocumentCommit, rt as TableNode, s as DocumentReadable, st as field, tt as ReadonlyValue, u as HistoryState, ut as object, v as Readable, vt as parse, w as Read, x as CollectionImpact, y as MutationIssue } from "./contract-KG5XnQZt.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-FgdTwu5b.js";
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/projection/select.d.ts
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>(runtime: DocumentReadable<TSchema>, selector: DocumentSelector<TSchema, TResult>) => 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