@dialecte/core 0.1.2 → 0.1.4

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 (110) hide show
  1. package/dist/dialecte/main.d.ts +4 -3
  2. package/dist/dialecte/main.d.ts.map +1 -1
  3. package/dist/document/bind-extensions.d.ts +10 -0
  4. package/dist/document/bind-extensions.d.ts.map +1 -0
  5. package/dist/document/document.d.ts +10 -6
  6. package/dist/document/document.d.ts.map +1 -1
  7. package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
  8. package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
  9. package/dist/document/query/index.d.ts +1 -1
  10. package/dist/document/query/index.d.ts.map +1 -1
  11. package/dist/document/query/query.d.ts +182 -0
  12. package/dist/document/query/query.d.ts.map +1 -0
  13. package/dist/document/transaction/clone/clone.d.ts.map +1 -1
  14. package/dist/document/transaction/clone/clone.types.d.ts +2 -2
  15. package/dist/document/transaction/clone/clone.types.d.ts.map +1 -1
  16. package/dist/document/transaction/create/create.d.ts +2 -2
  17. package/dist/document/transaction/create/create.d.ts.map +1 -1
  18. package/dist/document/transaction/delete/delete.d.ts +2 -2
  19. package/dist/document/transaction/delete/delete.d.ts.map +1 -1
  20. package/dist/document/transaction/index.d.ts +1 -1
  21. package/dist/document/transaction/index.d.ts.map +1 -1
  22. package/dist/document/transaction/main.d.ts +9 -9
  23. package/dist/document/transaction/main.d.ts.map +1 -1
  24. package/dist/document/transaction/stage-operations.d.ts.map +1 -1
  25. package/dist/document/transaction/transaction.d.ts +109 -0
  26. package/dist/document/transaction/transaction.d.ts.map +1 -0
  27. package/dist/document/transaction/update/update.d.ts +2 -2
  28. package/dist/document/transaction/update/update.d.ts.map +1 -1
  29. package/dist/document/types.d.ts +3 -7
  30. package/dist/document/types.d.ts.map +1 -1
  31. package/dist/errors/errors.d.ts +2 -2
  32. package/dist/errors/errors.d.ts.map +1 -1
  33. package/dist/helpers/index.d.ts +1 -0
  34. package/dist/helpers/index.d.ts.map +1 -1
  35. package/dist/helpers/merge-extensions.d.ts +13 -0
  36. package/dist/helpers/merge-extensions.d.ts.map +1 -0
  37. package/dist/helpers.js +21 -126
  38. package/dist/{index-B67NZSGJ.js → index-CqwLClK7.js} +26 -16
  39. package/dist/{index-CCEg5JAo.js → index-YegaL-lT.js} +1898 -1898
  40. package/dist/index.js +4 -4
  41. package/dist/standardizing-CeZD5ywI.js +128 -0
  42. package/dist/store/dexie-store.d.ts.map +1 -1
  43. package/dist/{test-fixtures → test}/assert-xml/assert-xml.d.ts +1 -1
  44. package/dist/test/assert-xml/assert-xml.d.ts.map +1 -0
  45. package/dist/test/assert-xml/index.d.ts.map +1 -0
  46. package/dist/test/assert-xml/types.d.ts.map +1 -0
  47. package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -0
  48. package/dist/test/config.d.ts +2109 -0
  49. package/dist/test/config.d.ts.map +1 -0
  50. package/dist/test/constant.d.ts.map +1 -0
  51. package/dist/{test-fixtures → test}/create-test-dialecte.d.ts +0 -3
  52. package/dist/test/create-test-dialecte.d.ts.map +1 -0
  53. package/dist/{test-fixtures → test}/generated/constants.generated.d.ts +105 -121
  54. package/dist/test/generated/constants.generated.d.ts.map +1 -0
  55. package/dist/test/generated/definition.generated.d.ts +1901 -0
  56. package/dist/test/generated/definition.generated.d.ts.map +1 -0
  57. package/dist/test/generated/index.d.ts +4 -0
  58. package/dist/test/generated/index.d.ts.map +1 -0
  59. package/dist/{test-fixtures → test}/generated/types.generated.d.ts +52 -53
  60. package/dist/test/generated/types.generated.d.ts.map +1 -0
  61. package/dist/{test-fixtures → test}/index.d.ts +3 -0
  62. package/dist/test/index.d.ts.map +1 -0
  63. package/dist/test/run-test-cases.d.ts +12 -0
  64. package/dist/test/run-test-cases.d.ts.map +1 -0
  65. package/dist/test/run-test-cases.type.d.ts +24 -0
  66. package/dist/test/run-test-cases.type.d.ts.map +1 -0
  67. package/dist/test/test-record.d.ts +16804 -0
  68. package/dist/test/test-record.d.ts.map +1 -0
  69. package/dist/test/test-record.types.d.ts +8 -0
  70. package/dist/test/test-record.types.d.ts.map +1 -0
  71. package/dist/test.d.ts +1 -1
  72. package/dist/test.js +1498 -12228
  73. package/dist/types/definition.d.ts +67 -50
  74. package/dist/types/definition.d.ts.map +1 -1
  75. package/dist/types/extensions.d.ts +73 -0
  76. package/dist/types/extensions.d.ts.map +1 -0
  77. package/dist/types/index.d.ts +1 -0
  78. package/dist/types/index.d.ts.map +1 -1
  79. package/dist/types/io.d.ts +14 -5
  80. package/dist/types/io.d.ts.map +1 -1
  81. package/dist/types/ref.d.ts +0 -1
  82. package/dist/types/ref.d.ts.map +1 -1
  83. package/dist/utils/assert.d.ts +2 -3
  84. package/dist/utils/assert.d.ts.map +1 -1
  85. package/dist/utils.js +1 -1
  86. package/package.json +2 -1
  87. package/dist/document/query/main.types.d.ts +0 -22
  88. package/dist/document/query/main.types.d.ts.map +0 -1
  89. package/dist/magic-string.es-uPKorP4O.js +0 -663
  90. package/dist/test-fixtures/assert-xml/assert-xml.d.ts.map +0 -1
  91. package/dist/test-fixtures/assert-xml/index.d.ts.map +0 -1
  92. package/dist/test-fixtures/assert-xml/types.d.ts.map +0 -1
  93. package/dist/test-fixtures/assert-xml/xpath-parser.d.ts.map +0 -1
  94. package/dist/test-fixtures/config.d.ts +0 -210
  95. package/dist/test-fixtures/config.d.ts.map +0 -1
  96. package/dist/test-fixtures/constant.d.ts.map +0 -1
  97. package/dist/test-fixtures/create-test-dialecte.d.ts.map +0 -1
  98. package/dist/test-fixtures/generated/constants.generated.d.ts.map +0 -1
  99. package/dist/test-fixtures/generated/definition.d.ts +0 -3
  100. package/dist/test-fixtures/generated/definition.d.ts.map +0 -1
  101. package/dist/test-fixtures/generated/index.d.ts +0 -4
  102. package/dist/test-fixtures/generated/index.d.ts.map +0 -1
  103. package/dist/test-fixtures/generated/types.generated.d.ts.map +0 -1
  104. package/dist/test-fixtures/index.d.ts.map +0 -1
  105. package/dist/test-fixtures/test-record.d.ts +0 -36
  106. package/dist/test-fixtures/test-record.d.ts.map +0 -1
  107. /package/dist/{test-fixtures → test}/assert-xml/index.d.ts +0 -0
  108. /package/dist/{test-fixtures → test}/assert-xml/types.d.ts +0 -0
  109. /package/dist/{test-fixtures → test}/assert-xml/xpath-parser.d.ts +0 -0
  110. /package/dist/{test-fixtures → test}/constant.d.ts +0 -0
@@ -1,70 +1,87 @@
1
1
  import { Namespace } from './records';
2
- /**
3
- * Validation rules that can be applied to attributes, elements, or values
4
- */
5
- export type ValidationRules = {
6
- readonly enumeration: readonly string[] | null;
7
- readonly pattern: readonly string[] | null;
8
- readonly minInclusive: number | string | null;
9
- readonly maxInclusive: number | string | null;
10
- readonly minLength: number | string | null;
11
- readonly maxLength: number | string | null;
12
- readonly fractionDigits: number | string | null;
13
- readonly totalDigits: number | string | null;
14
- readonly whitespace: 'preserve' | 'replace' | 'collapse' | null;
15
- readonly assertions: readonly any[] | null;
16
- readonly minOccurrence: number | string | null;
17
- readonly maxOccurrence: number | string | null;
2
+ export type XPathStepKind = 'self' | 'name' | 'wildcard' | 'ns-wildcard';
3
+ export type XPathStep = {
4
+ readonly kind: XPathStepKind;
5
+ readonly value?: string;
6
+ };
7
+ export type SelectorPath = {
8
+ readonly deep?: true;
9
+ readonly steps: readonly XPathStep[];
10
+ };
11
+ export type FieldTargetKind = 'element' | 'attribute' | 'wildcard' | 'ns-wildcard';
12
+ export type FieldTarget = {
13
+ readonly kind: FieldTargetKind;
14
+ readonly value?: string;
15
+ readonly isAttribute?: true;
16
+ };
17
+ export type ConstraintField = {
18
+ readonly deep?: true;
19
+ readonly steps?: readonly XPathStep[];
20
+ readonly target: FieldTarget;
21
+ };
22
+ export type IdentityConstraint = {
23
+ readonly kind: 'unique' | 'key' | 'keyref';
24
+ readonly name: string;
25
+ readonly refer?: string;
26
+ readonly deep?: true;
27
+ readonly selector: readonly SelectorPath[];
28
+ readonly fields: readonly ConstraintField[];
29
+ };
30
+ export type Facets = {
31
+ readonly enumeration?: readonly string[];
32
+ readonly pattern?: readonly string[];
33
+ readonly minLength?: number;
34
+ readonly maxLength?: number;
35
+ readonly length?: number;
36
+ readonly minInclusive?: number | string;
37
+ readonly maxInclusive?: number | string;
38
+ readonly minExclusive?: number | string;
39
+ readonly maxExclusive?: number | string;
40
+ readonly totalDigits?: number;
41
+ readonly fractionDigits?: number;
42
+ readonly whiteSpace?: 'preserve' | 'replace' | 'collapse';
18
43
  };
19
- /**
20
- * Attribute definition with validation rules
21
- */
22
44
  export type AttributeDefinition = {
23
- readonly required: boolean;
24
- readonly default: string | null;
25
- readonly namespace: Namespace | null;
26
- readonly validation: ValidationRules;
45
+ readonly required?: true;
46
+ readonly default?: string;
47
+ readonly fixed?: string;
48
+ readonly namespace?: Namespace;
49
+ readonly facets?: Facets;
27
50
  };
28
- /**
29
- * Sub-element definition with constraints
30
- */
31
- export type SubElementDefinition = {
32
- readonly required: boolean;
33
- readonly validation: ValidationRules;
34
- readonly constraints: readonly any[] | null;
51
+ export type ChildDefinition = {
52
+ readonly required?: true;
53
+ readonly minOccurs?: number;
54
+ readonly maxOccurs?: number;
55
+ readonly constraints?: readonly IdentityConstraint[];
56
+ };
57
+ export type ChoiceGroup = {
58
+ readonly options: readonly string[];
59
+ readonly maxOccurs: number;
60
+ };
61
+ export type TextContent = {
62
+ readonly facets?: Facets;
35
63
  };
36
- /**
37
- * Generic element definition parameterized by element type
38
- * Provides typed access to attributes, sub-elements, and parents
39
- */
40
64
  export type ElementDefinition = {
41
65
  readonly tag: string;
42
66
  readonly namespace: Namespace;
43
- readonly documentation: string | null;
67
+ readonly documentation?: string;
44
68
  readonly parents: readonly string[];
45
- readonly validation: ValidationRules;
46
69
  readonly attributes: {
47
- readonly any: boolean;
48
70
  readonly sequence: readonly string[];
49
71
  readonly details: Record<string, AttributeDefinition>;
50
72
  };
51
- readonly subElements: {
52
- readonly any: boolean;
73
+ readonly children: {
53
74
  readonly sequence: readonly string[];
54
- readonly details: Record<string, SubElementDefinition>;
55
- readonly choices: readonly any[];
56
- };
57
- readonly constraints: readonly any[];
58
- readonly value: {
59
- readonly type: string | null;
60
- readonly validation: ValidationRules;
75
+ readonly any?: true;
76
+ readonly details: Record<string, ChildDefinition>;
77
+ readonly choices?: readonly ChoiceGroup[];
61
78
  };
79
+ readonly constraints?: readonly IdentityConstraint[];
80
+ readonly textContent?: TextContent;
62
81
  };
63
82
  /**
64
- * Complete definition - maps element names to their definitions
65
- * This is the raw JSON structure from XSD generation
66
- *
67
- * Each dialecte should define its own specific type extending this
83
+ * Complete definition maps element names to their definitions.
84
+ * Each dialecte should define its own specific type extending this.
68
85
  */
69
86
  export type AnyDefinition = Record<string, ElementDefinition>;
70
87
  //# sourceMappingURL=definition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/types/definition.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAE1C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;IAC9C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;IAC1C,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC7C,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC1C,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5C,QAAQ,CAAC,UAAU,EAAE,UAAU,GAA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AAS,MAAM,EAAE,CAAA;QACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;KACrD,CAAA;IACD,QAAQ,CAAC,QAAQ,EAAE;QAClB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;QACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAA;QACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;QACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,WAAW,EAAE,CAAA;KACzC,CAAA;IACD,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAA;CAClC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA"}
@@ -0,0 +1,73 @@
1
+ import { Query } from '../document/query';
2
+ import { Transaction } from '../document/transaction';
3
+ /**
4
+ * A query extension: a function whose first argument is the Query instance.
5
+ * The remaining arguments become the public signature after binding.
6
+ */
7
+ export type QueryExtensionFn = (query: Query<any>, ...args: any[]) => any;
8
+ /**
9
+ * A transaction extension: a function whose first argument is the Transaction instance.
10
+ * The remaining arguments become the public signature after binding.
11
+ */
12
+ export type TransactionExtensionFn = (tx: Transaction<any>, ...args: any[]) => any;
13
+ /** A group of extension functions keyed by method name. */
14
+ export type ExtensionGroup<Fn> = Record<string, Fn>;
15
+ /** A map of PascalCase group names → extension groups. */
16
+ export type ExtensionMap<Fn> = Record<string, ExtensionGroup<Fn>>;
17
+ /**
18
+ * A single named extension module, grouping its query and transaction methods.
19
+ * Use this as the shape for each element's extension file (e.g. History/index.ts).
20
+ */
21
+ export type ExtensionModule = {
22
+ query?: ExtensionGroup<QueryExtensionFn>;
23
+ transaction?: ExtensionGroup<TransactionExtensionFn>;
24
+ };
25
+ /**
26
+ * Extensions configuration for a dialecte.
27
+ * A record of named extension modules (e.g. { History: { query: ... } }).
28
+ * Produced by mergeExtensions().
29
+ */
30
+ export type ExtensionsRegistry = {
31
+ query?: Record<string, NonNullable<ExtensionModule['query']>>;
32
+ transaction?: Record<string, NonNullable<ExtensionModule['transaction']>>;
33
+ };
34
+ /**
35
+ * Compile-time guard: rejects any extension group name that collides
36
+ * with a core method on Query or Transaction.
37
+ */
38
+ export type AssertNoCollision<Extensions extends Record<string, unknown>, Reserved extends string> = {
39
+ [K in keyof Extensions]: K extends Reserved ? `Extension group "${K & string}" collides with a core method` : Extensions[K];
40
+ };
41
+ /**
42
+ * Given a map of extension groups, produces the same structure
43
+ * but with the first argument (query/tx) stripped from each function.
44
+ */
45
+ export type BoundExtensionMap<GenericExtensionMap extends ExtensionMap<QueryExtensionFn | TransactionExtensionFn>> = {
46
+ [Group in keyof GenericExtensionMap]: {
47
+ [Method in keyof GenericExtensionMap[Group]]: GenericExtensionMap[Group][Method] extends (first: any, ...rest: infer Rest) => infer InferredRest ? (...args: Rest) => InferredRest : never;
48
+ };
49
+ };
50
+ export type QueryExtensions<Ext extends ExtensionsRegistry> = Ext extends {
51
+ query: infer Q extends ExtensionMap<QueryExtensionFn>;
52
+ } ? BoundExtensionMap<Q> : {};
53
+ export type AllExtensions<Ext extends ExtensionsRegistry> = QueryExtensions<Ext> & (Ext extends {
54
+ transaction: infer M extends ExtensionMap<TransactionExtensionFn>;
55
+ } ? BoundExtensionMap<M> : {});
56
+ /**
57
+ * A record of named extension modules (keys are element names, e.g. 'History').
58
+ */
59
+ export type ExtensionModules = Record<string, ExtensionModule>;
60
+ /**
61
+ * Derives the merged ExtensionsRegistry type from a record of ExtensionModules.
62
+ * mergeExtensions({ History }) → { query: { History: ... }, transaction: {} }
63
+ * Modules without query/transaction are filtered out.
64
+ */
65
+ export type MergedExtensions<Modules extends ExtensionModules> = {
66
+ query: {
67
+ [K in keyof Modules as Modules[K]['query'] extends ExtensionGroup<QueryExtensionFn> ? K : never]: Modules[K]['query'] extends ExtensionGroup<QueryExtensionFn> ? Modules[K]['query'] : never;
68
+ };
69
+ transaction: {
70
+ [K in keyof Modules as Modules[K]['transaction'] extends ExtensionGroup<TransactionExtensionFn> ? K : never]: Modules[K]['transaction'] extends ExtensionGroup<TransactionExtensionFn> ? Modules[K]['transaction'] : never;
71
+ };
72
+ };
73
+ //# sourceMappingURL=extensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/types/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAIzD;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;AAEzE;;;GAGG;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,EAAE,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;AAIlF,2DAA2D;AAC3D,MAAM,MAAM,cAAc,CAAC,EAAE,IAAI,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAEnD,0DAA0D;AAC1D,MAAM,MAAM,YAAY,CAAC,EAAE,IAAI,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;AAIjE;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,KAAK,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAA;IACxC,WAAW,CAAC,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAA;CACpD,CAAA;AAID;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC,KAAK,CAAC,EAA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AAE,GAC/E,iBAAiB,CAAC,CAAC,CAAC,GACpB,EAAE,CAAC,CAAA;AAEP;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;AAE9D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,gBAAgB,IAAI;IAChE,KAAK,EAAE;SACL,CAAC,IAAI,MAAM,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,cAAc,CAAC,gBAAgB,CAAC,GAChF,CAAC,GACD,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,cAAc,CAAC,gBAAgB,CAAC,GACpE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GACnB,KAAK;KACR,CAAA;IACD,WAAW,EAAE;SACX,CAAC,IAAI,MAAM,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,cAAc,CAAC,sBAAsB,CAAC,GAC5F,CAAC,GACD,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,cAAc,CAAC,sBAAsB,CAAC,GAChF,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,GACzB,KAAK;KACR,CAAA;CACD,CAAA"}
@@ -4,4 +4,5 @@ export type * from './operations';
4
4
  export type * from './ref';
5
5
  export type * from './io';
6
6
  export type * from './definition';
7
+ export type * from './extensions';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,mBAAmB,CAAA;AACtC,mBAAmB,WAAW,CAAA;AAC9B,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,OAAO,CAAA;AAC1B,mBAAmB,MAAM,CAAA;AACzB,mBAAmB,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,mBAAmB,CAAA;AACtC,mBAAmB,WAAW,CAAA;AAC9B,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,OAAO,CAAA;AAC1B,mBAAmB,MAAM,CAAA;AACzB,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,cAAc,CAAA"}
@@ -23,6 +23,18 @@ export type ExportOptions = {
23
23
  export type RecordPatch = {
24
24
  recordId: string;
25
25
  } & Partial<Omit<AnyRawRecord, 'id'>>;
26
+ /**
27
+ * A warning produced during import.
28
+ *
29
+ * `type` is a discriminant string owned by the dialecte (e.g. `'unresolved-reference'`).
30
+ * `recordId` identifies the record that triggered the warning.
31
+ * `details` carries dialecte-specific context — its shape is defined by the dialecte.
32
+ */
33
+ export type ImportWarning = {
34
+ type: string;
35
+ recordId: string;
36
+ details?: Record<string, unknown>;
37
+ };
26
38
  /**
27
39
  * Return value of the afterImport hook.
28
40
  * Core applies each collection in order: creates → updates → deletes.
@@ -34,14 +46,11 @@ export type AfterImportResult = {
34
46
  updates?: RecordPatch[];
35
47
  /** IDs of records to remove */
36
48
  deletes?: string[];
49
+ /** Warnings collected during resolution — unresolved refs, unknown paths, etc. */
50
+ warnings?: ImportWarning[];
37
51
  };
38
52
  /**
39
53
  * IO hooks for import/export lifecycle.
40
- *
41
- * - `beforeImportRecord`: called synchronously per record during streaming.
42
- * Use to collect data (e.g., build path indexes) without blocking the parser.
43
- * - `afterImport`: called once after all records are stored.
44
- * Use for cross-record resolution (e.g., path → UUID) via bulk writes.
45
54
  */
46
55
  export type IOHooks = {
47
56
  beforeImportRecord?: (params: {
@@ -1 +1 @@
1
- {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../src/types/io.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IAC1B,SAAS,EA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M,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAA;AAElF;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B,4BAA4B;IAC5B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,WAAW,EAAE,CAAA;IACvB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAA;CAC1B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACrB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI,CAAA;IAClG,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAA;CAC9C,CAAA"}
@@ -7,7 +7,6 @@ import { DialecteRecord, ParentRelationship, ChildRelationship } from './records
7
7
  * id is optional for singleton elements — the system resolves the record by tagName alone.
8
8
  * id is required for all other elements.
9
9
  *
10
- * Obtained by: addChild, deepClone, find, findChildren, findDescendants, getRoot
11
10
  */
12
11
  export type Ref<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericElement extends SingletonElementsOf<GenericConfig> ? {
13
12
  readonly tagName: GenericElement;
@@ -1 +1 @@
1
- {"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../src/types/ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAEtF;;;;;;;;GAQG;AACH,MAAM,MAAM,GAAG,CACd,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAEhD,cAAc,SAAS,mBAAmB,CAAC,aAAa,CAAC,GACtD;IAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7D,MAAM,MAAM,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,CACtB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAE9C,GAAG,CAAC,aAAa,EAAE,cAAc,CAAC,GAClC,cAAc,CAAC,aAAa,EAAE,cAAc,CAAC,GAC7C,kBAAkB,CAAC,aAAa,EAAE,cAAc,CAAC,GACjD,iBAAiB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../src/types/ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAEtF;;;;;;;GAOG;AACH,MAAM,MAAM,GAAG,CACd,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAEhD,cAAc,SAAS,mBAAmB,CAAC,aAAa,CAAC,GACtD;IAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7D,MAAM,MAAM,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,CACtB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAE9C,GAAG,CAAC,aAAa,EAAE,cAAc,CAAC,GAClC,cAAc,CAAC,aAAa,EAAE,cAAc,CAAC,GAC7C,kBAAkB,CAAC,aAAa,EAAE,cAAc,CAAC,GACjD,iBAAiB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA"}
@@ -3,12 +3,11 @@ import { DialecteErrorKey } from '../errors';
3
3
  * Assert a condition, throwing a structured DialecteError if it fails.
4
4
  *
5
5
  * @example
6
- * assert(record, { detail: 'addChild: parent not found', method: 'addChild' })
7
- * assert(ref.id, { detail: 'Singleton element has no id', method: 'getRecord', key: 'ELEMENT_NOT_FOUND' })
6
+ * assert(record, { detail: 'addChild: parent not found' })
7
+ * assert(ref.id, { detail: 'Singleton element has no id', key: 'ELEMENT_NOT_FOUND' })
8
8
  */
9
9
  export declare function assert(condition: unknown, error: {
10
10
  detail: string;
11
- method: string;
12
11
  key?: DialecteErrorKey;
13
12
  ref?: {
14
13
  tagName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/utils/assert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD;;;;;;GAMG;AACH,wBAAgB,MAAM,CACrB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE;IACN,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,GAAG,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACtC,GACC,OAAO,CAAC,SAAS,CAInB"}
1
+ {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/utils/assert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD;;;;;;GAMG;AACH,wBAAgB,MAAM,CACrB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE;IACN,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,GAAG,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACtC,GACC,OAAO,CAAC,SAAS,CAInB"}
package/dist/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as s } from "./index-B67NZSGJ.js";
1
+ import { a as s } from "./index-CqwLClK7.js";
2
2
  export {
3
3
  s as assert
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialecte/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Dialecte - Core functionality for Dialecte SDK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -83,6 +83,7 @@
83
83
  "vite": "^7.3.1",
84
84
  "vite-plugin-dts": "^4.5.4",
85
85
  "vitepress": "^2.0.0-alpha.16",
86
+ "vitepress-plugin-llms": "^1.11.1",
86
87
  "vitest": "^3.2.4",
87
88
  "vitest-browser-vue": "^1.0.0"
88
89
  }
@@ -1,22 +0,0 @@
1
- import { Store } from '../../store';
2
- import { AnyDialecteConfig, Operation, AnyRawRecord } from '../../types';
3
- /**
4
- * Read-only context passed to record FP functions.
5
- *
6
- * Owned and built by Query, exposed as `this.context` for subclasses.
7
- * recordCache is only present inside a Transaction — Query passes undefined
8
- * so reads always hit the store directly (no staleness risk).
9
- */
10
- export type Context<GenericConfig extends AnyDialecteConfig> = {
11
- readonly store: Store;
12
- readonly recordCache: Map<string, AnyRawRecord> | undefined;
13
- stagedOperations: Operation<GenericConfig>[];
14
- };
15
- /**
16
- * Narrowed Context that has an active cache — only true inside a Transaction.
17
- * Use isTransactionContext() to narrow before cache reads/writes.
18
- */
19
- export type CachedContext<GenericConfig extends AnyDialecteConfig> = Context<GenericConfig> & {
20
- readonly recordCache: Map<string, AnyRawRecord>;
21
- };
22
- //# sourceMappingURL=main.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.types.d.ts","sourceRoot":"","sources":["../../../src/document/query/main.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEzE;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,CAAC,aAAa,SAAS,iBAAiB,IAAI;IAC9D,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAAS,CAAA;IAC3D,gBAAgB,EAAE,SAAS,CAAC,aAAa,CAAC,EAAE,CAAA;CAC5C,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,aAAa,SAAS,iBAAiB,IAAI,OAAO,CAAC,aAAa,CAAC,GAAG;IAC7F,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;CAC/C,CAAA"}