@dialecte/core 0.0.3

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 (225) hide show
  1. package/README.md +1 -0
  2. package/dist/chain-methods/chain-assembler.d.ts +10 -0
  3. package/dist/chain-methods/chain-assembler.d.ts.map +1 -0
  4. package/dist/chain-methods/chain-creator.d.ts +18 -0
  5. package/dist/chain-methods/chain-creator.d.ts.map +1 -0
  6. package/dist/chain-methods/ending/index.d.ts +3 -0
  7. package/dist/chain-methods/ending/index.d.ts.map +1 -0
  8. package/dist/chain-methods/ending/queries/context.d.ts +12 -0
  9. package/dist/chain-methods/ending/queries/context.d.ts.map +1 -0
  10. package/dist/chain-methods/ending/queries/descendants/filter-utils.helper.d.ts +11 -0
  11. package/dist/chain-methods/ending/queries/descendants/filter-utils.helper.d.ts.map +1 -0
  12. package/dist/chain-methods/ending/queries/descendants/find-descendants.d.ts +16 -0
  13. package/dist/chain-methods/ending/queries/descendants/find-descendants.d.ts.map +1 -0
  14. package/dist/chain-methods/ending/queries/descendants/flatten-tree.helper.d.ts +6 -0
  15. package/dist/chain-methods/ending/queries/descendants/flatten-tree.helper.d.ts.map +1 -0
  16. package/dist/chain-methods/ending/queries/descendants/group-records.helper.d.ts +15 -0
  17. package/dist/chain-methods/ending/queries/descendants/group-records.helper.d.ts.map +1 -0
  18. package/dist/chain-methods/ending/queries/descendants/index.d.ts +3 -0
  19. package/dist/chain-methods/ending/queries/descendants/index.d.ts.map +1 -0
  20. package/dist/chain-methods/ending/queries/descendants/types.d.ts +39 -0
  21. package/dist/chain-methods/ending/queries/descendants/types.d.ts.map +1 -0
  22. package/dist/chain-methods/ending/queries/descendants/validate-descendants.helper.d.ts +17 -0
  23. package/dist/chain-methods/ending/queries/descendants/validate-descendants.helper.d.ts.map +1 -0
  24. package/dist/chain-methods/ending/queries/find-children.d.ts +9 -0
  25. package/dist/chain-methods/ending/queries/find-children.d.ts.map +1 -0
  26. package/dist/chain-methods/ending/queries/find-children.types.d.ts +6 -0
  27. package/dist/chain-methods/ending/queries/find-children.types.d.ts.map +1 -0
  28. package/dist/chain-methods/ending/queries/get-parent.d.ts +8 -0
  29. package/dist/chain-methods/ending/queries/get-parent.d.ts.map +1 -0
  30. package/dist/chain-methods/ending/queries/get-tree.d.ts +9 -0
  31. package/dist/chain-methods/ending/queries/get-tree.d.ts.map +1 -0
  32. package/dist/chain-methods/ending/queries/get-tree.types.d.ts +18 -0
  33. package/dist/chain-methods/ending/queries/get-tree.types.d.ts.map +1 -0
  34. package/dist/chain-methods/ending/queries/index.d.ts +8 -0
  35. package/dist/chain-methods/ending/queries/index.d.ts.map +1 -0
  36. package/dist/chain-methods/ending/queries/todo/ancestor.d.ts +1 -0
  37. package/dist/chain-methods/ending/queries/todo/ancestor.d.ts.map +1 -0
  38. package/dist/chain-methods/ending/queries/todo/descendants.d.ts +1 -0
  39. package/dist/chain-methods/ending/queries/todo/descendants.d.ts.map +1 -0
  40. package/dist/chain-methods/ending/queries/todo/find-ancestor.d.ts +1 -0
  41. package/dist/chain-methods/ending/queries/todo/find-ancestor.d.ts.map +1 -0
  42. package/dist/chain-methods/ending/queries/todo/find-child.d.ts +1 -0
  43. package/dist/chain-methods/ending/queries/todo/find-child.d.ts.map +1 -0
  44. package/dist/chain-methods/ending/queries/todo/find-descendant.d.ts +1 -0
  45. package/dist/chain-methods/ending/queries/todo/find-descendant.d.ts.map +1 -0
  46. package/dist/chain-methods/ending/queries/todo/observable.d.ts +1 -0
  47. package/dist/chain-methods/ending/queries/todo/observable.d.ts.map +1 -0
  48. package/dist/chain-methods/ending/queries/todo/read.d.ts +1 -0
  49. package/dist/chain-methods/ending/queries/todo/read.d.ts.map +1 -0
  50. package/dist/chain-methods/ending/transaction/commit.d.ts +16 -0
  51. package/dist/chain-methods/ending/transaction/commit.d.ts.map +1 -0
  52. package/dist/chain-methods/ending/transaction/index.d.ts +2 -0
  53. package/dist/chain-methods/ending/transaction/index.d.ts.map +1 -0
  54. package/dist/chain-methods/ending/transaction/merge-operations.d.ts +33 -0
  55. package/dist/chain-methods/ending/transaction/merge-operations.d.ts.map +1 -0
  56. package/dist/chain-methods/index.d.ts +6 -0
  57. package/dist/chain-methods/index.d.ts.map +1 -0
  58. package/dist/chain-methods/mutations/clone.d.ts +17 -0
  59. package/dist/chain-methods/mutations/clone.d.ts.map +1 -0
  60. package/dist/chain-methods/mutations/clone.types.d.ts +17 -0
  61. package/dist/chain-methods/mutations/clone.types.d.ts.map +1 -0
  62. package/dist/chain-methods/mutations/create.d.ts +17 -0
  63. package/dist/chain-methods/mutations/create.d.ts.map +1 -0
  64. package/dist/chain-methods/mutations/create.types.d.ts +32 -0
  65. package/dist/chain-methods/mutations/create.types.d.ts.map +1 -0
  66. package/dist/chain-methods/mutations/delete.d.ts +19 -0
  67. package/dist/chain-methods/mutations/delete.d.ts.map +1 -0
  68. package/dist/chain-methods/mutations/index.d.ts +8 -0
  69. package/dist/chain-methods/mutations/index.d.ts.map +1 -0
  70. package/dist/chain-methods/mutations/update.d.ts +19 -0
  71. package/dist/chain-methods/mutations/update.d.ts.map +1 -0
  72. package/dist/chain-methods/mutations/update.types.d.ts +6 -0
  73. package/dist/chain-methods/mutations/update.types.d.ts.map +1 -0
  74. package/dist/chain-methods/navigation/go-to-element.d.ts +19 -0
  75. package/dist/chain-methods/navigation/go-to-element.d.ts.map +1 -0
  76. package/dist/chain-methods/navigation/go-to-parent.d.ts +18 -0
  77. package/dist/chain-methods/navigation/go-to-parent.d.ts.map +1 -0
  78. package/dist/chain-methods/navigation/index.d.ts +4 -0
  79. package/dist/chain-methods/navigation/index.d.ts.map +1 -0
  80. package/dist/chain-methods/navigation/types.d.ts +10 -0
  81. package/dist/chain-methods/navigation/types.d.ts.map +1 -0
  82. package/dist/chain-methods/secific-types-to-review.d.ts +23 -0
  83. package/dist/chain-methods/secific-types-to-review.d.ts.map +1 -0
  84. package/dist/chain-methods/types.d.ts +54 -0
  85. package/dist/chain-methods/types.d.ts.map +1 -0
  86. package/dist/database/index.d.ts +3 -0
  87. package/dist/database/index.d.ts.map +1 -0
  88. package/dist/database/instance.d.ts +8 -0
  89. package/dist/database/instance.d.ts.map +1 -0
  90. package/dist/database/types.d.ts +16 -0
  91. package/dist/database/types.d.ts.map +1 -0
  92. package/dist/dialecte/entrypoints.d.ts +19 -0
  93. package/dist/dialecte/entrypoints.d.ts.map +1 -0
  94. package/dist/dialecte/index.d.ts +4 -0
  95. package/dist/dialecte/index.d.ts.map +1 -0
  96. package/dist/dialecte/main.d.ts +7 -0
  97. package/dist/dialecte/main.d.ts.map +1 -0
  98. package/dist/dialecte/state.d.ts +54 -0
  99. package/dist/dialecte/state.d.ts.map +1 -0
  100. package/dist/dialecte/types.d.ts +32 -0
  101. package/dist/dialecte/types.d.ts.map +1 -0
  102. package/dist/errors/codes.d.ts +39 -0
  103. package/dist/errors/codes.d.ts.map +1 -0
  104. package/dist/errors/errors.d.ts +34 -0
  105. package/dist/errors/errors.d.ts.map +1 -0
  106. package/dist/errors/index.d.ts +4 -0
  107. package/dist/errors/index.d.ts.map +1 -0
  108. package/dist/errors/types.d.ts +23 -0
  109. package/dist/errors/types.d.ts.map +1 -0
  110. package/dist/generated/constants.generated.d.ts +1476 -0
  111. package/dist/generated/constants.generated.d.ts.map +1 -0
  112. package/dist/generated/descendants-ancestors.generated.d.ts +442 -0
  113. package/dist/generated/descendants-ancestors.generated.d.ts.map +1 -0
  114. package/dist/generated/types.generated.d.ts +3055 -0
  115. package/dist/generated/types.generated.d.ts.map +1 -0
  116. package/dist/helpers/assert.d.ts +2 -0
  117. package/dist/helpers/assert.d.ts.map +1 -0
  118. package/dist/helpers/index.d.ts +5 -0
  119. package/dist/helpers/index.d.ts.map +1 -0
  120. package/dist/helpers/record/converter.d.ts +34 -0
  121. package/dist/helpers/record/converter.d.ts.map +1 -0
  122. package/dist/helpers/record/guard.d.ts +18 -0
  123. package/dist/helpers/record/guard.d.ts.map +1 -0
  124. package/dist/helpers/record/index.d.ts +6 -0
  125. package/dist/helpers/record/index.d.ts.map +1 -0
  126. package/dist/helpers/record/operations.d.ts +24 -0
  127. package/dist/helpers/record/operations.d.ts.map +1 -0
  128. package/dist/helpers/record/query/find-by-attributes.d.ts +23 -0
  129. package/dist/helpers/record/query/find-by-attributes.d.ts.map +1 -0
  130. package/dist/helpers/record/query/index.d.ts +4 -0
  131. package/dist/helpers/record/query/index.d.ts.map +1 -0
  132. package/dist/helpers/record/query/record.d.ts +68 -0
  133. package/dist/helpers/record/query/record.d.ts.map +1 -0
  134. package/dist/helpers/record/query/scope-ancestors.d.ts +1 -0
  135. package/dist/helpers/record/query/scope-ancestors.d.ts.map +1 -0
  136. package/dist/helpers/record/query/types.d.ts +11 -0
  137. package/dist/helpers/record/query/types.d.ts.map +1 -0
  138. package/dist/helpers/record/standardizing.d.ts +9 -0
  139. package/dist/helpers/record/standardizing.d.ts.map +1 -0
  140. package/dist/helpers/test-fixtures/config.d.ts +210 -0
  141. package/dist/helpers/test-fixtures/config.d.ts.map +1 -0
  142. package/dist/helpers/test-fixtures/constant.d.ts +20 -0
  143. package/dist/helpers/test-fixtures/constant.d.ts.map +1 -0
  144. package/dist/helpers/test-fixtures/create-test-dialecte.d.ts +18 -0
  145. package/dist/helpers/test-fixtures/create-test-dialecte.d.ts.map +1 -0
  146. package/dist/helpers/test-fixtures/generated/constants.generated.d.ts +211 -0
  147. package/dist/helpers/test-fixtures/generated/constants.generated.d.ts.map +1 -0
  148. package/dist/helpers/test-fixtures/generated/definition.d.ts +3 -0
  149. package/dist/helpers/test-fixtures/generated/definition.d.ts.map +1 -0
  150. package/dist/helpers/test-fixtures/generated/index.d.ts +4 -0
  151. package/dist/helpers/test-fixtures/generated/index.d.ts.map +1 -0
  152. package/dist/helpers/test-fixtures/generated/types.generated.d.ts +191 -0
  153. package/dist/helpers/test-fixtures/generated/types.generated.d.ts.map +1 -0
  154. package/dist/helpers/test-fixtures/index.d.ts +7 -0
  155. package/dist/helpers/test-fixtures/index.d.ts.map +1 -0
  156. package/dist/helpers/test-fixtures/test-operations.d.ts +12 -0
  157. package/dist/helpers/test-fixtures/test-operations.d.ts.map +1 -0
  158. package/dist/helpers/test-fixtures/test-operations.types.d.ts +14 -0
  159. package/dist/helpers/test-fixtures/test-operations.types.d.ts.map +1 -0
  160. package/dist/helpers/test-fixtures/test-record.d.ts +36 -0
  161. package/dist/helpers/test-fixtures/test-record.d.ts.map +1 -0
  162. package/dist/index.d.ts +8 -0
  163. package/dist/index.d.ts.map +1 -0
  164. package/dist/index.js +6601 -0
  165. package/dist/io/export/constant.d.ts +2 -0
  166. package/dist/io/export/constant.d.ts.map +1 -0
  167. package/dist/io/export/formatter.d.ts +2 -0
  168. package/dist/io/export/formatter.d.ts.map +1 -0
  169. package/dist/io/export/index.d.ts +4 -0
  170. package/dist/io/export/index.d.ts.map +1 -0
  171. package/dist/io/export/main.d.ts +22 -0
  172. package/dist/io/export/main.d.ts.map +1 -0
  173. package/dist/io/import/database-helpers.d.ts +21 -0
  174. package/dist/io/import/database-helpers.d.ts.map +1 -0
  175. package/dist/io/import/guards.d.ts +4 -0
  176. package/dist/io/import/guards.d.ts.map +1 -0
  177. package/dist/io/import/index.d.ts +3 -0
  178. package/dist/io/import/index.d.ts.map +1 -0
  179. package/dist/io/import/main.d.ts +15 -0
  180. package/dist/io/import/main.d.ts.map +1 -0
  181. package/dist/io/import/parser.d.ts +13 -0
  182. package/dist/io/import/parser.d.ts.map +1 -0
  183. package/dist/io/import/relationships.d.ts +9 -0
  184. package/dist/io/import/relationships.d.ts.map +1 -0
  185. package/dist/io/import/test.handler.d.ts +9 -0
  186. package/dist/io/import/test.handler.d.ts.map +1 -0
  187. package/dist/io/import/test.types.d.ts +4 -0
  188. package/dist/io/import/test.types.d.ts.map +1 -0
  189. package/dist/io/import/types.d.ts +13 -0
  190. package/dist/io/import/types.d.ts.map +1 -0
  191. package/dist/io/index.d.ts +3 -0
  192. package/dist/io/index.d.ts.map +1 -0
  193. package/dist/script/element-parent-mapping.d.ts +2 -0
  194. package/dist/script/element-parent-mapping.d.ts.map +1 -0
  195. package/dist/script/find-unreferenced-elements.d.ts +3 -0
  196. package/dist/script/find-unreferenced-elements.d.ts.map +1 -0
  197. package/dist/script/generate-definition.d.ts +3 -0
  198. package/dist/script/generate-definition.d.ts.map +1 -0
  199. package/dist/script/generate-definition.types.d.ts +86 -0
  200. package/dist/script/generate-definition.types.d.ts.map +1 -0
  201. package/dist/script/generate-descendants-ancestors.d.ts +17 -0
  202. package/dist/script/generate-descendants-ancestors.d.ts.map +1 -0
  203. package/dist/script/generate-test-fixtures.d.ts +16 -0
  204. package/dist/script/generate-test-fixtures.d.ts.map +1 -0
  205. package/dist/script/sorted-dexie-dump-json.d.ts +2 -0
  206. package/dist/script/sorted-dexie-dump-json.d.ts.map +1 -0
  207. package/dist/types/context.d.ts +16 -0
  208. package/dist/types/context.d.ts.map +1 -0
  209. package/dist/types/definition.d.ts +70 -0
  210. package/dist/types/definition.d.ts.map +1 -0
  211. package/dist/types/dialecte-config.d.ts +138 -0
  212. package/dist/types/dialecte-config.d.ts.map +1 -0
  213. package/dist/types/index.d.ts +7 -0
  214. package/dist/types/index.d.ts.map +1 -0
  215. package/dist/types/io.d.ts +17 -0
  216. package/dist/types/io.d.ts.map +1 -0
  217. package/dist/types/operations.d.ts +27 -0
  218. package/dist/types/operations.d.ts.map +1 -0
  219. package/dist/types/records.d.ts +56 -0
  220. package/dist/types/records.d.ts.map +1 -0
  221. package/dist/utils/attributes.d.ts +9 -0
  222. package/dist/utils/attributes.d.ts.map +1 -0
  223. package/dist/utils/index.d.ts +2 -0
  224. package/dist/utils/index.d.ts.map +1 -0
  225. package/package.json +61 -0
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # Dialecte
@@ -0,0 +1,10 @@
1
+ import { Chain } from './types';
2
+ import { DatabaseInstance } from '../database';
3
+ import { Context, AnyDialecteConfig, ElementsOf } from '../types';
4
+ export declare function chain<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
5
+ dialecteConfig: GenericConfig;
6
+ databaseInstance: DatabaseInstance<GenericConfig>;
7
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
8
+ tagName: GenericElement;
9
+ }): Chain<GenericConfig, GenericElement>;
10
+ //# sourceMappingURL=chain-assembler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-assembler.d.ts","sourceRoot":"","sources":["../../src/chain-methods/chain-assembler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAgB,MAAM,SAAS,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAErE,wBAAgB,KAAK,CACpB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,OAAO,EAAE,cAAc,CAAA;CACvB,GAAG,KAAK,CAAC,aAAa,EAAE,cAAc,CAAC,CAiCvC"}
@@ -0,0 +1,18 @@
1
+ import { CoreChain, Chain, ChainFactory } from './types';
2
+ import { DatabaseInstance } from '../database';
3
+ import { Context, AnyDialecteConfig, ElementsOf } from '../types';
4
+ export declare function createCoreChain<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
5
+ chain: ChainFactory;
6
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
7
+ dialecteConfig: GenericConfig;
8
+ databaseInstance: DatabaseInstance<GenericConfig>;
9
+ tagName: GenericElement;
10
+ }): CoreChain<GenericConfig, GenericElement>;
11
+ export declare function createExtensionChain<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
12
+ coreChain: CoreChain<GenericConfig, GenericElement>;
13
+ tagName: GenericElement;
14
+ chain: ChainFactory;
15
+ dialecteConfig: GenericConfig;
16
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
17
+ }): Chain<GenericConfig, GenericElement>;
18
+ //# sourceMappingURL=chain-creator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-creator.d.ts","sourceRoot":"","sources":["../../src/chain-methods/chain-creator.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EACX,OAAO,EACP,iBAAiB,EACjB,UAAU,EAGV,MAAM,SAAS,CAAA;AAEhB,wBAAgB,eAAe,CAC9B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,OAAO,EAAE,cAAc,CAAA;CACvB,GAAG,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,CAiE3C;AAED,wBAAgB,oBAAoB,CACnC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,SAAS,EAAE,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACnD,OAAO,EAAE,cAAc,CAAA;IACvB,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,aAAa,CAAA;IAC7B,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;CAC/D,GAAG,KAAK,CAAC,aAAa,EAAE,cAAc,CAAC,CAgBvC"}
@@ -0,0 +1,3 @@
1
+ export * from './queries';
2
+ export * from './transaction';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/ending/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { AnyDialecteConfig, ElementsOf } from '../../../types';
2
+ import { Context } from '../../../types/context';
3
+ /**
4
+ * Get the internal chain context
5
+ *
6
+ * @param contextPromise - Current chain context
7
+ * @returns Async function to get context (ending method)
8
+ */
9
+ export declare function createGetContextMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
10
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
11
+ }): () => Promise<Context<GenericConfig, GenericElement>>;
12
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACrC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IAAE,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;CAAE,SAElD,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAIzE"}
@@ -0,0 +1,11 @@
1
+ import { DescendantsFilter, PathLevel } from './types';
2
+ import { AnyDialecteConfig, ElementsOf } from '../../../../types';
3
+ /**
4
+ * Flatten nested filter to ordered path array (root to leaf)
5
+ */
6
+ export declare function filterToPath<GenericConfig extends AnyDialecteConfig>(filter: DescendantsFilter<GenericConfig>): PathLevel<GenericConfig, ElementsOf<GenericConfig>>[];
7
+ /**
8
+ * Extract all tag names from nested filter
9
+ */
10
+ export declare function extractTags<GenericConfig extends AnyDialecteConfig>(filter: DescendantsFilter<GenericConfig>): ElementsOf<GenericConfig>[];
11
+ //# sourceMappingURL=filter-utils.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-utils.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/filter-utils.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE5D;;GAEG;AACH,wBAAgB,YAAY,CAAC,aAAa,SAAS,iBAAiB,EACnE,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,GACtC,SAAS,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAavD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,aAAa,SAAS,iBAAiB,EAClE,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,GACtC,UAAU,CAAC,aAAa,CAAC,EAAE,CAQ7B"}
@@ -0,0 +1,16 @@
1
+ import { DatabaseInstance } from '../../../../database';
2
+ import { FindDescendantsReturn, DescendantsFilter } from './types';
3
+ import { AnyDialecteConfig, Context, ElementsOf } from '../../../../types';
4
+ /**
5
+ * Find descendants matching filter with path validation
6
+ *
7
+ * Two modes:
8
+ * 1. No filter → get all descendants from tree
9
+ * 2. With filter → query deepest level, validate path bottom-up
10
+ */
11
+ export declare function createFindDescendantsMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
12
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
13
+ dialecteConfig: GenericConfig;
14
+ databaseInstance: DatabaseInstance<GenericConfig>;
15
+ }): <GenericFilter extends DescendantsFilter<GenericConfig> | undefined>(filter?: GenericFilter) => FindDescendantsReturn<GenericConfig, GenericFilter, GenericElement>;
16
+ //# sourceMappingURL=find-descendants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-descendants.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/find-descendants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAS7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAA;AAEjG;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAC1C,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAIC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAAG,SAAS,WACxD,aAAa,KAAG,qBAAqB,CAAC,aAAa,EAAE,aAAa,EAAE,cAAc,CAAC,CAqB9F"}
@@ -0,0 +1,6 @@
1
+ import { AnyDialecteConfig, ChainRecord, ElementsOf, TreeRecord } from '../../../../types';
2
+ /**
3
+ * Flatten tree to flat list of all descendant records (excluding root)
4
+ */
5
+ export declare function flattenTree<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(tree: TreeRecord<GenericConfig, GenericElement>): ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[];
6
+ //# sourceMappingURL=flatten-tree.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten-tree.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/flatten-tree.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAErF;;GAEG;AACH,wBAAgB,WAAW,CAC1B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAEhD,IAAI,EAAE,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,GAC7C,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAczD"}
@@ -0,0 +1,15 @@
1
+ import { CollectedTags, ResultMap } from './types';
2
+ import { AnyDialecteConfig, ChainRecord, ElementsOf } from '../../../../types';
3
+ /**
4
+ * Group records by tagName
5
+ */
6
+ export declare function groupByTag<GenericConfig extends AnyDialecteConfig>(records: ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[], includeTags?: Set<string>): Partial<ResultMap<GenericConfig, string>>;
7
+ /**
8
+ * Deduplicate records by id within each tag
9
+ */
10
+ export declare function deduplicateByTag<GenericConfig extends AnyDialecteConfig>(collected: CollectedTags<GenericConfig>): CollectedTags<GenericConfig>;
11
+ /**
12
+ * Convert Map to result object with empty arrays for missing tags
13
+ */
14
+ export declare function mapToResult<GenericConfig extends AnyDialecteConfig>(collected: CollectedTags<GenericConfig>, tags: Set<string>): Record<string, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]>;
15
+ //# sourceMappingURL=group-records.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group-records.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/group-records.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAiB,MAAM,SAAS,CAAA;AAExF;;GAEG;AACH,wBAAgB,UAAU,CAAC,aAAa,SAAS,iBAAiB,EACjE,OAAO,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,EAChE,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GACvB,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAa3C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,SAAS,iBAAiB,EACvE,SAAS,EAAE,aAAa,CAAC,aAAa,CAAC,GACrC,aAAa,CAAC,aAAa,CAAC,CAc9B;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,aAAa,SAAS,iBAAiB,EAClE,SAAS,EAAE,aAAa,CAAC,aAAa,CAAC,EACvC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,GACf,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAQzE"}
@@ -0,0 +1,3 @@
1
+ export * from './find-descendants';
2
+ export type * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,mBAAmB,SAAS,CAAA"}
@@ -0,0 +1,39 @@
1
+ import { FilterAttributes } from '../../../../helpers';
2
+ import { AnyDialecteConfig, DescendantsOf, ElementsOf, ChainRecord } from '../../../../types';
3
+ export type FindDescendantsReturn<GenericConfig extends AnyDialecteConfig, GenericFilter extends DescendantsFilter<GenericConfig> | undefined, GenericElement extends ElementsOf<GenericConfig> = ElementsOf<GenericConfig>> = Promise<GenericFilter extends undefined ? Record<GenericElement | DescendantsOf<GenericConfig, GenericElement>, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]> : GenericFilter extends DescendantsFilter<GenericConfig> ? ResultMap<GenericConfig, ExtractTags<GenericFilter>> : never>;
4
+ export type PathLevel<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
5
+ tagName: GenericElement;
6
+ attributes?: FilterAttributes<GenericConfig, GenericElement>;
7
+ };
8
+ type Depth = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
9
+ type FilterNode<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, D extends number> = Depth[D] extends never ? never : {
10
+ [K in DescendantsOf<GenericConfig, GenericElement>]: {
11
+ tagName: K;
12
+ attributes?: FilterAttributes<GenericConfig, K>;
13
+ descendant?: FilterNode<GenericConfig, K, Depth[D]>;
14
+ };
15
+ }[DescendantsOf<GenericConfig, GenericElement>];
16
+ export type DescendantsFilter<GenericConfig extends AnyDialecteConfig> = {
17
+ [K in ElementsOf<GenericConfig>]: {
18
+ tagName: K;
19
+ attributes?: FilterAttributes<GenericConfig, K>;
20
+ descendant?: FilterNode<GenericConfig, K, 10>;
21
+ };
22
+ }[ElementsOf<GenericConfig>];
23
+ export type ExtractTags<F> = F extends {
24
+ tagName: infer T;
25
+ } ? T | (F extends {
26
+ descendant?: infer D;
27
+ } ? ExtractTags<D> : never) : never;
28
+ export type TagsArray<F> = ExtractTags<F> extends infer U ? ReadonlyArray<U> : never;
29
+ export type ResultMap<GenericConfig extends AnyDialecteConfig, GenericTags extends string> = {
30
+ [K in GenericTags]: ChainRecord<GenericConfig, K>[];
31
+ };
32
+ export type FindResult<GenericConfig extends AnyDialecteConfig, GenericFilter extends DescendantsFilter<GenericConfig>, GenericInclude extends ReadonlyArray<any> | ExtractTags<GenericFilter>> = ResultMap<GenericConfig, GenericInclude extends ReadonlyArray<any> ? GenericInclude[number] : GenericInclude>;
33
+ export type CollectedTags<GenericConfig extends AnyDialecteConfig> = Map<string, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]>;
34
+ export type ValidationResult<GenericConfig extends AnyDialecteConfig> = {
35
+ valid: boolean;
36
+ ancestors?: ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[];
37
+ };
38
+ export {};
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAExF,MAAM,MAAM,qBAAqB,CAChC,aAAa,SAAS,iBAAiB,EACvC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAAG,SAAS,EAClE,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,aAAa,CAAC,IACzE,OAAO,CACV,aAAa,SAAS,SAAS,GAC5B,MAAM,CACN,cAAc,GAAG,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,EAC7D,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CACvD,GACA,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GACrD,SAAS,CAAC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,GACpD,KAAK,CACT,CAAA;AAMD,MAAM,MAAM,SAAS,CACpB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,OAAO,EAAE,cAAc,CAAA;IACvB,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;CAC5D,CAAA;AAMD,KAAK,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AAEtD,KAAK,UAAU,CACd,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,CAAC,SAAS,MAAM,IACb,KAAK,CAAC,CAAC,CAAC,SAAS,KAAK,GACvB,KAAK,GACL;KACC,CAAC,IAAI,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG;QACpD,OAAO,EAAE,CAAC,CAAA;QACV,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;QAC/C,UAAU,CAAC,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;KACnD;CACD,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;AAEjD,MAAM,MAAM,iBAAiB,CAAC,aAAa,SAAS,iBAAiB,IAAI;KACvE,CAAC,IAAI,UAAU,CAAC,aAAa,CAAC,GAAG;QACjC,OAAO,EAAE,CAAC,CAAA;QACV,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;QAC/C,UAAU,CAAC,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;KAC7C;CACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;AAM5B,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC,CAAA;CAAE,GACxD,CAAC,GAAG,CAAC,CAAC,SAAS;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GACjE,KAAK,CAAA;AAER,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;AAMpF,MAAM,MAAM,SAAS,CAAC,aAAa,SAAS,iBAAiB,EAAE,WAAW,SAAS,MAAM,IAAI;KAC3F,CAAC,IAAI,WAAW,GAAG,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;CACnD,CAAA;AAED,MAAM,MAAM,UAAU,CACrB,aAAa,SAAS,iBAAiB,EACvC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,EACtD,cAAc,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,aAAa,CAAC,IACnE,SAAS,CACZ,aAAa,EACb,cAAc,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,cAAc,CACnF,CAAA;AAMD,MAAM,MAAM,aAAa,CAAC,aAAa,SAAS,iBAAiB,IAAI,GAAG,CACvE,MAAM,EACN,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CACvD,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,aAAa,SAAS,iBAAiB,IAAI;IACvE,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;CACnE,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { PathLevel } from './types';
2
+ import { DatabaseInstance } from '../../../../index';
3
+ import { AnyDialecteConfig, Context, ChainRecord, ElementsOf } from '../../../../types';
4
+ /**
5
+ * Validate all candidates and collect ancestor tags
6
+ * Returns grouped, deduplicated result
7
+ */
8
+ export declare function validateDescendants<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
9
+ context: Context<GenericConfig, ElementsOf<GenericConfig>>;
10
+ dialecteConfig: GenericConfig;
11
+ databaseInstance: DatabaseInstance<GenericConfig>;
12
+ candidates: ChainRecord<GenericConfig, GenericElement>[];
13
+ focus: ChainRecord<GenericConfig, ElementsOf<GenericConfig>>;
14
+ path?: PathLevel<GenericConfig, ElementsOf<GenericConfig>>[];
15
+ collectTags: Set<string>;
16
+ }): Promise<Record<string, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]>>;
17
+ //# sourceMappingURL=validate-descendants.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-descendants.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/validate-descendants.helper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAmC,MAAM,SAAS,CAAA;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAElF;;;GAGG;AACH,wBAAsB,mBAAmB,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,OAAO,EAAE,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IAC1D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,UAAU,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,CAAA;IACxD,KAAK,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IAC5D,IAAI,CAAC,EAAE,SAAS,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;IAC5D,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACxB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CA0BnF"}
@@ -0,0 +1,9 @@
1
+ import { FindChildrenParams } from './find-children.types';
2
+ import { DatabaseInstance } from '../../../index';
3
+ import { AnyDialecteConfig, ElementsOf, Context, ChildrenOf, ChainRecord } from '../../../types';
4
+ export declare function createFindChildrenMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
5
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
6
+ dialecteConfig: GenericConfig;
7
+ databaseInstance: DatabaseInstance<GenericConfig>;
8
+ }): <GenericChild extends ChildrenOf<GenericConfig, GenericElement>>(filters: FindChildrenParams<GenericConfig, GenericElement, GenericChild>) => Promise<Record<GenericChild, ChainRecord<GenericConfig, GenericChild>[]>>;
9
+ //# sourceMappingURL=find-children.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-children.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/find-children.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE9F,wBAAgB,wBAAwB,CACvC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAGuB,YAAY,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EACpF,SAAS,kBAAkB,CAAC,aAAa,EAAE,cAAc,EAAE,YAAY,CAAC,KACtE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,aAAa,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CA6B5E"}
@@ -0,0 +1,6 @@
1
+ import { FilterAttributes } from '../../../helpers';
2
+ import { AnyDialecteConfig, ElementsOf, ChildrenOf } from '../../../types';
3
+ export type FindChildrenParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChild extends ChildrenOf<GenericConfig, GenericElement>> = Partial<{
4
+ [K in GenericChild]: FilterAttributes<GenericConfig, K>;
5
+ }>;
6
+ //# sourceMappingURL=find-children.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-children.types.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/find-children.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAExE,MAAM,MAAM,kBAAkB,CAC7B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,YAAY,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,IAC3D,OAAO,CAAC;KACV,CAAC,IAAI,YAAY,GAAG,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC;CACvD,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { DatabaseInstance } from '../../../index';
2
+ import { AnyDialecteConfig, ElementsOf, Context, ParentsOf, ChainRecord } from '../../../types';
3
+ export declare function createGetParentMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericParentElement extends ParentsOf<GenericConfig, GenericElement>>(params: {
4
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
5
+ dialecteConfig: GenericConfig;
6
+ databaseInstance: DatabaseInstance<GenericConfig>;
7
+ }): () => Promise<ChainRecord<GenericConfig, GenericParentElement>>;
8
+ //# sourceMappingURL=get-parent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parent.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/get-parent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE7F,wBAAgB,qBAAqB,CACpC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,EACpE,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,SAE0B,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC,CAiBnF"}
@@ -0,0 +1,9 @@
1
+ import { GetTreeParams } from './get-tree.types';
2
+ import { DatabaseInstance } from '../../../index';
3
+ import { AnyDialecteConfig, ElementsOf, Context, TreeRecord } from '../../../types';
4
+ export declare function createGetTreeMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
5
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
6
+ dialecteConfig: GenericConfig;
7
+ databaseInstance: DatabaseInstance<GenericConfig>;
8
+ }): (params?: GetTreeParams<GenericConfig, GenericElement>) => Promise<TreeRecord<GenericConfig, GenericElement>>;
9
+ //# sourceMappingURL=get-tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tree.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/get-tree.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgC,MAAM,kBAAkB,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAe,UAAU,EAAE,MAAM,SAAS,CAAA;AAE9F,wBAAgB,mBAAmB,CAClC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAIC,SAAQ,aAAa,CAAC,aAAa,EAAE,cAAc,CAAM,KACvD,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAmBrD"}
@@ -0,0 +1,18 @@
1
+ import { FilterAttributes } from '../../../helpers';
2
+ import { AnyDialecteConfig, ElementsOf, ChildrenOf } from '../../../types';
3
+ export type GetTreeParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
4
+ include?: IncludeFilter<GenericConfig, GenericElement>;
5
+ exclude?: ExcludeFilter<GenericConfig>[];
6
+ unwrap?: ElementsOf<GenericConfig>[];
7
+ };
8
+ export type IncludeFilter<GenericConfig extends AnyDialecteConfig, GenericParent extends ElementsOf<GenericConfig>> = ChildrenOf<GenericConfig, GenericParent> extends infer Child ? Child extends ElementsOf<GenericConfig> ? {
9
+ tagName: Child;
10
+ attributes?: FilterAttributes<GenericConfig, Child>;
11
+ children?: IncludeFilter<GenericConfig, Child>[];
12
+ } : never : never;
13
+ export type ExcludeFilter<GenericConfig extends AnyDialecteConfig> = {
14
+ tagName: ElementsOf<GenericConfig>;
15
+ attributes?: FilterAttributes<GenericConfig, ElementsOf<GenericConfig>>;
16
+ scope?: 'self' | 'children';
17
+ };
18
+ //# sourceMappingURL=get-tree.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tree.types.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/get-tree.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAExE,MAAM,MAAM,aAAa,CACxB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACtD,OAAO,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,EAAE,CAAA;IACxC,MAAM,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,EAAE,CAAA;CACpC,CAAA;AAGD,MAAM,MAAM,aAAa,CACxB,aAAa,SAAS,iBAAiB,EACvC,aAAa,SAAS,UAAU,CAAC,aAAa,CAAC,IAE/C,UAAU,CAAC,aAAa,EAAE,aAAa,CAAC,SAAS,MAAM,KAAK,GACzD,KAAK,SAAS,UAAU,CAAC,aAAa,CAAC,GACtC;IACA,OAAO,EAAE,KAAK,CAAA;IACd,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;IACnD,QAAQ,CAAC,EAAE,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,CAAA;CAChD,GACA,KAAK,GACN,KAAK,CAAA;AAGT,MAAM,MAAM,aAAa,CAAC,aAAa,SAAS,iBAAiB,IAAI;IACpE,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;IAClC,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IACvE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CAC3B,CAAA"}
@@ -0,0 +1,8 @@
1
+ export * from './context';
2
+ export * from './get-parent';
3
+ export * from './find-children';
4
+ export * from './descendants';
5
+ export * from './get-tree';
6
+ export type * from './find-children.types';
7
+ export type * from './get-tree.types';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAE1B,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,kBAAkB,CAAA"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=ancestor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ancestor.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/todo/ancestor.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=descendants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descendants.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/todo/descendants.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=find-ancestor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-ancestor.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/todo/find-ancestor.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=find-child.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-child.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/todo/find-child.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=find-descendant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-descendant.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/todo/find-descendant.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=observable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/todo/observable.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/todo/read.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { DatabaseInstance } from '../../../database';
2
+ import { AnyDialecteConfig, ElementsOf, Context } from '../../../types';
3
+ /**
4
+ * Commit all staged operations to the database atomically.
5
+ * Terminal operation - returns Promise<void>, operations cleared after success.
6
+ *
7
+ * @param contextPromise - Current builder context
8
+ * @param dialecteConfig - Dialecte configuration
9
+ * @returns Async function to commit operations (terminal, returns void)
10
+ */
11
+ export declare function createCommitMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
12
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
13
+ dialecteConfig: GenericConfig;
14
+ databaseInstance: DatabaseInstance<GenericConfig>;
15
+ }): () => Promise<void>;
16
+ //# sourceMappingURL=commit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/transaction/commit.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAErE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CACjC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,SACgC,OAAO,CAAC,IAAI,CAAC,CA2E7C"}
@@ -0,0 +1,2 @@
1
+ export * from './commit';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/transaction/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
@@ -0,0 +1,33 @@
1
+ import { AnyDialecteConfig, Operation } from '../../../types';
2
+ /**
3
+ * Merge operations by element ID to optimize database operations.
4
+ * Consolidates multiple operations on the same element into a single final operation.
5
+ *
6
+ * Merge rules:
7
+ * - created + updated → created (with final state)
8
+ * - created + deleted → no-op (removed)
9
+ * - updated + updated → updated (with final state)
10
+ * - updated + deleted → deleted (with original old state)
11
+ * - deleted → terminal (no further merging)
12
+ *
13
+ * @param operations - Array of staged operations to merge
14
+ * @returns Object containing arrays of merged creates, updates, and deletes
15
+ */
16
+ export declare function mergeOperations<GenericConfig extends AnyDialecteConfig>(operations: Operation<GenericConfig>[]): {
17
+ creates: {
18
+ status: "created";
19
+ oldRecord: undefined;
20
+ newRecord: import('../../../types').RawRecord<GenericConfig, import('../../../types').ElementsOf<GenericConfig>>;
21
+ }[];
22
+ updates: {
23
+ status: "updated";
24
+ oldRecord: import('../../../types').RawRecord<GenericConfig, import('../../../types').ElementsOf<GenericConfig>>;
25
+ newRecord: import('../../../types').RawRecord<GenericConfig, import('../../../types').ElementsOf<GenericConfig>>;
26
+ }[];
27
+ deletes: {
28
+ status: "deleted";
29
+ oldRecord: import('../../../types').RawRecord<GenericConfig, import('../../../types').ElementsOf<GenericConfig>>;
30
+ newRecord: undefined;
31
+ }[];
32
+ };
33
+ //# sourceMappingURL=merge-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-operations.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/transaction/merge-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,aAAa,SAAS,iBAAiB,EACtE,UAAU,EAAE,SAAS,CAAC,aAAa,CAAC,EAAE;;;;;;;;;;;;;;;;EAuDtC"}
@@ -0,0 +1,6 @@
1
+ export * from './chain-assembler';
2
+ export type * from './types';
3
+ export type * from './ending';
4
+ export type * from './mutations';
5
+ export type * from './navigation';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chain-methods/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AAEjC,mBAAmB,SAAS,CAAA;AAC5B,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,aAAa,CAAA;AAChC,mBAAmB,cAAc,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { DeepCloneChildParams } from './clone.types';
2
+ import { Chain, ChainFactory } from '../types';
3
+ import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context } from '../../types';
4
+ /**
5
+ * Deep clones the child element under the current focused element.
6
+ *
7
+ * @param chain - Chain factory to create new builder instances
8
+ * @param contextPromise - Current chain context
9
+ * @param dialecteConfig - Dialecte configuration
10
+ * @returns Function to create element (sync chainable)
11
+ */
12
+ export declare function createDeepCloneChildMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
13
+ chain: ChainFactory;
14
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
15
+ dialecteConfig: GenericConfig;
16
+ }): <GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>>(params: DeepCloneChildParams<GenericConfig, GenericElement>) => Chain<GenericConfig, GenericChildElement> | Chain<GenericConfig, GenericElement>;
17
+ //# sourceMappingURL=clone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAc,MAAM,SAAS,CAAA;AAE7F;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;CAC7B,IAGiB,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EACrF,QAAQ,oBAAoB,CAAC,aAAa,EAAE,cAAc,CAAC,sFAqD5D"}
@@ -0,0 +1,17 @@
1
+ import { AnyDialecteConfig, ElementsOf, TreeRecord } from '../../types';
2
+ /**
3
+ * DeepCloneChild with setFocus: true - narrows to child element type
4
+ */
5
+ export type DeepCloneChildWithFocusParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
6
+ record: TreeRecord<GenericConfig, GenericElement>;
7
+ setFocus: true;
8
+ };
9
+ /**
10
+ * DeepCloneChild with setFocus: false - stays on current element
11
+ */
12
+ export type DeepCloneChildWithoutFocusParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
13
+ record: TreeRecord<GenericConfig, GenericElement>;
14
+ setFocus: false;
15
+ };
16
+ export type DeepCloneChildParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = DeepCloneChildWithFocusParams<GenericConfig, GenericElement> | DeepCloneChildWithoutFocusParams<GenericConfig, GenericElement>;
17
+ //# sourceMappingURL=clone.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clone.types.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/clone.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAExE;;GAEG;AACH,MAAM,MAAM,6BAA6B,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,MAAM,EAAE,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACjD,QAAQ,EAAE,IAAI,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,CAC3C,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,MAAM,EAAE,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACjD,QAAQ,EAAE,KAAK,CAAA;CACf,CAAA;AAED,MAAM,MAAM,oBAAoB,CAC/B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAE9C,6BAA6B,CAAC,aAAa,EAAE,cAAc,CAAC,GAC5D,gCAAgC,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { AddChildParams } from './create.types';
2
+ import { ChainFactory } from '../types';
3
+ import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context } from '../../types';
4
+ /**
5
+ * Creates a child element under the current focused element.
6
+ *
7
+ * @param chain - Chain factory to create new builder instances
8
+ * @param contextPromise - Current chain context
9
+ * @param dialecteConfig - Dialecte configuration
10
+ * @returns Function to create element (sync chainable)
11
+ */
12
+ export declare function createAddChildMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
13
+ chain: ChainFactory;
14
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
15
+ dialecteConfig: GenericConfig;
16
+ }): <GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>>(params: AddChildParams<GenericConfig, GenericElement, GenericChildElement>) => import('../types').Chain<GenericConfig, GenericChildElement> | import('../types').Chain<GenericConfig, GenericElement>;
17
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAM/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,OAAO,EAGP,MAAM,SAAS,CAAA;AAEhB;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CACnC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;CAC7B,IAGiB,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EACrF,QAAQ,cAAc,CAAC,aAAa,EAAE,cAAc,EAAE,mBAAmB,CAAC,4HA+D3E"}
@@ -0,0 +1,32 @@
1
+ import { AnyDialecteConfig, ElementsOf, ChildrenOf, Namespace, AttributesValueObjectOf, FullAttributeObjectOf } from '../../types';
2
+ /**
3
+ * AddChild with setFocus: true - narrows to child element type
4
+ */
5
+ export type AddChildParamsWithFocus<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>> = {
6
+ id?: `${string}-${string}-${string}-${string}-${string}`;
7
+ tagName: GenericChildElement;
8
+ namespace?: Namespace;
9
+ attributes: AttributesValueObjectOf<GenericConfig, GenericChildElement> | FullAttributeObjectOf<GenericConfig, GenericChildElement>[];
10
+ value?: string;
11
+ setFocus: true;
12
+ };
13
+ /**
14
+ * AddChild with setFocus: false - stays on current element
15
+ */
16
+ export type AddChildParamsWithoutFocus<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>> = {
17
+ id?: `${string}-${string}-${string}-${string}-${string}`;
18
+ tagName: GenericChildElement;
19
+ namespace?: Namespace;
20
+ attributes: AttributesValueObjectOf<GenericConfig, GenericChildElement> | FullAttributeObjectOf<GenericConfig, GenericChildElement>[];
21
+ value?: string;
22
+ setFocus?: false;
23
+ };
24
+ /**
25
+ * Union type for both addChild variants
26
+ */
27
+ export type AddChildParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>> = AddChildParamsWithFocus<GenericConfig, GenericElement, GenericChildElement> | AddChildParamsWithoutFocus<GenericConfig, GenericElement, GenericChildElement>;
28
+ /**
29
+ * Any addChild params - for tests or generic operations
30
+ */
31
+ export type AnyAddChildParams = AddChildParams<AnyDialecteConfig, string, string>;
32
+ //# sourceMappingURL=create.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.types.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/create.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,MAAM,SAAS,CAAA;AAEhB;;GAEG;AACH,MAAM,MAAM,uBAAuB,CAClC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,IAClE;IACH,EAAE,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;IACxD,OAAO,EAAE,mBAAmB,CAAA;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,EACP,uBAAuB,CAAC,aAAa,EAAE,mBAAmB,CAAC,GAC3D,qBAAqB,CAAC,aAAa,EAAE,mBAAmB,CAAC,EAAE,CAAA;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,IAAI,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,0BAA0B,CACrC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,IAClE;IACH,EAAE,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;IACxD,OAAO,EAAE,mBAAmB,CAAA;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,EACP,uBAAuB,CAAC,aAAa,EAAE,mBAAmB,CAAC,GAC3D,qBAAqB,CAAC,aAAa,EAAE,mBAAmB,CAAC,EAAE,CAAA;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAA;CAChB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,CACzB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,IAEnE,uBAAuB,CAAC,aAAa,EAAE,cAAc,EAAE,mBAAmB,CAAC,GAC3E,0BAA0B,CAAC,aAAa,EAAE,cAAc,EAAE,mBAAmB,CAAC,CAAA;AAEjF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { DatabaseInstance } from '../../index';
2
+ import { ChainFactory } from '../types';
3
+ import { AnyDialecteConfig, ElementsOf, Context, ParentsOf } from '../../types';
4
+ /**
5
+ * Deletes the current focused element.
6
+ * Returns builder focused on parent element.
7
+ *
8
+ * @param chain - Chain factory to create new builder instances
9
+ * @param contextPromise - Current chain context
10
+ * @param dialecteConfig - Dialecte configuration
11
+ * @returns Function to delete element (sync chainable, narrows to parent)
12
+ */
13
+ export declare function createDeleteElementMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
14
+ chain: ChainFactory;
15
+ contextPromise: Promise<Context<GenericConfig, GenericElement>>;
16
+ dialecteConfig: GenericConfig;
17
+ databaseInstance: DatabaseInstance<GenericConfig>;
18
+ }): <GenericParentElement extends ParentsOf<GenericConfig, GenericElement>>() => import('../../index').Chain<GenericConfig, ParentsOf<GenericConfig, GenericElement>>;
19
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EAEV,OAAO,EACP,SAAS,EAGT,MAAM,SAAS,CAAA;AAEhB;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAGiB,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,wFAiCtF"}