@dialecte/core 0.7.0 → 0.8.0

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 (692) hide show
  1. package/dist/assets/hub.worker-B1HcVDhn.js +2 -0
  2. package/dist/diagnostics/diagnostics.d.ts +4 -0
  3. package/dist/diagnostics/diagnostics.d.ts.map +1 -1
  4. package/dist/diagnostics/types.d.ts +6 -1
  5. package/dist/diagnostics/types.d.ts.map +1 -1
  6. package/dist/dialecte/create-dialecte-project.d.ts +11 -0
  7. package/dist/dialecte/create-dialecte-project.d.ts.map +1 -0
  8. package/dist/dialecte/create-project-factory.d.ts +14 -0
  9. package/dist/dialecte/create-project-factory.d.ts.map +1 -0
  10. package/dist/dialecte/define-dialecte.d.ts +12 -0
  11. package/dist/dialecte/define-dialecte.d.ts.map +1 -0
  12. package/dist/dialecte/dialecte.constants.d.ts +4 -0
  13. package/dist/dialecte/dialecte.constants.d.ts.map +1 -0
  14. package/dist/dialecte/dialecte.types.d.ts +75 -0
  15. package/dist/dialecte/dialecte.types.d.ts.map +1 -0
  16. package/dist/dialecte/index.d.ts +4 -0
  17. package/dist/dialecte/index.d.ts.map +1 -0
  18. package/dist/{project-DIKdMMHx.js → dialecte-gIPrRzni.js} +8031 -8457
  19. package/dist/document/bind-extensions.d.ts +4 -1
  20. package/dist/document/bind-extensions.d.ts.map +1 -1
  21. package/dist/document/document.d.ts +58 -5
  22. package/dist/document/document.d.ts.map +1 -1
  23. package/dist/document/progress/progress.types.d.ts +21 -4
  24. package/dist/document/progress/progress.types.d.ts.map +1 -1
  25. package/dist/document/query/find/ancestor/find-ancestor.d.ts +2 -0
  26. package/dist/document/query/find/ancestor/find-ancestor.d.ts.map +1 -1
  27. package/dist/document/query/find/by-attribute/find-by-attributes.d.ts +4 -0
  28. package/dist/document/query/find/by-attribute/find-by-attributes.d.ts.map +1 -1
  29. package/dist/document/query/find/descendant/find-descendant.d.ts +2 -0
  30. package/dist/document/query/find/descendant/find-descendant.d.ts.map +1 -1
  31. package/dist/document/query/get/attribute/get-attribute.d.ts +4 -0
  32. package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
  33. package/dist/document/query/get/attribute/get-attributes.d.ts +4 -0
  34. package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
  35. package/dist/document/query/get/definition/get-definition.d.ts +2 -0
  36. package/dist/document/query/get/definition/get-definition.d.ts.map +1 -1
  37. package/dist/document/query/get/record/get-child.d.ts +2 -0
  38. package/dist/document/query/get/record/get-child.d.ts.map +1 -1
  39. package/dist/document/query/get/record/get-children.d.ts +2 -0
  40. package/dist/document/query/get/record/get-children.d.ts.map +1 -1
  41. package/dist/document/query/get/record/get-record.d.ts +2 -0
  42. package/dist/document/query/get/record/get-record.d.ts.map +1 -1
  43. package/dist/document/query/get/record/get-records-by-tagname.d.ts +2 -0
  44. package/dist/document/query/get/record/get-records-by-tagname.d.ts.map +1 -1
  45. package/dist/document/query/get/record/get-records.d.ts +2 -0
  46. package/dist/document/query/get/record/get-records.d.ts.map +1 -1
  47. package/dist/document/query/get/record/load-live-records.d.ts +2 -0
  48. package/dist/document/query/get/record/load-live-records.d.ts.map +1 -1
  49. package/dist/document/query/get/record/resolve-record.d.ts +2 -0
  50. package/dist/document/query/get/record/resolve-record.d.ts.map +1 -1
  51. package/dist/document/query/get/record/staged-lookup.d.ts +4 -0
  52. package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
  53. package/dist/document/query/get/tree/get-tree.d.ts +6 -0
  54. package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
  55. package/dist/document/query/main.d.ts +50 -15
  56. package/dist/document/query/main.d.ts.map +1 -1
  57. package/dist/document/query/snapshot/collect-snapshot.d.ts +2 -0
  58. package/dist/document/query/snapshot/collect-snapshot.d.ts.map +1 -1
  59. package/dist/document/query/snapshot/get-snapshot.d.ts +2 -0
  60. package/dist/document/query/snapshot/get-snapshot.d.ts.map +1 -1
  61. package/dist/document/query/snapshot/records-to-tree.d.ts +2 -0
  62. package/dist/document/query/snapshot/records-to-tree.d.ts.map +1 -1
  63. package/dist/document/query/tree-filter/omit.d.ts +8 -0
  64. package/dist/document/query/tree-filter/omit.d.ts.map +1 -1
  65. package/dist/document/query/tree-filter/order.d.ts +5 -2
  66. package/dist/document/query/tree-filter/order.d.ts.map +1 -1
  67. package/dist/document/query/tree-filter/unwrap.d.ts +2 -0
  68. package/dist/document/query/tree-filter/unwrap.d.ts.map +1 -1
  69. package/dist/document/staged-operations.d.ts +5 -1
  70. package/dist/document/staged-operations.d.ts.map +1 -1
  71. package/dist/document/transaction/clone/clone.d.ts +2 -0
  72. package/dist/document/transaction/clone/clone.d.ts.map +1 -1
  73. package/dist/document/transaction/commit/commit.d.ts.map +1 -1
  74. package/dist/document/transaction/commit/merge-operations.d.ts +1 -1
  75. package/dist/document/transaction/commit/merge-operations.d.ts.map +1 -1
  76. package/dist/document/transaction/commit/summarize-operations.d.ts +16 -0
  77. package/dist/document/transaction/commit/summarize-operations.d.ts.map +1 -0
  78. package/dist/document/transaction/commit/summarize-operations.types.d.ts +17 -0
  79. package/dist/document/transaction/commit/summarize-operations.types.d.ts.map +1 -0
  80. package/dist/document/transaction/create/create.d.ts +2 -0
  81. package/dist/document/transaction/create/create.d.ts.map +1 -1
  82. package/dist/document/transaction/guard.d.ts +5 -0
  83. package/dist/document/transaction/guard.d.ts.map +1 -1
  84. package/dist/document/transaction/index.d.ts +2 -0
  85. package/dist/document/transaction/index.d.ts.map +1 -1
  86. package/dist/document/transaction/main.d.ts +46 -16
  87. package/dist/document/transaction/main.d.ts.map +1 -1
  88. package/dist/document/transaction/stage-operations.d.ts.map +1 -1
  89. package/dist/document/transaction/update/update.d.ts +2 -0
  90. package/dist/document/transaction/update/update.d.ts.map +1 -1
  91. package/dist/document/types.d.ts +3 -5
  92. package/dist/document/types.d.ts.map +1 -1
  93. package/dist/engine-store-CIEqgPUb.js +348 -0
  94. package/dist/engine.constants-DBMjMmV9.js +98 -0
  95. package/dist/engine.d.ts +9 -0
  96. package/dist/engine.d.ts.map +1 -0
  97. package/dist/engine.js +15805 -0
  98. package/dist/errors/codes.d.ts +451 -0
  99. package/dist/errors/codes.d.ts.map +1 -1
  100. package/dist/errors/errors.constants.d.ts +3 -0
  101. package/dist/errors/errors.constants.d.ts.map +1 -0
  102. package/dist/errors/errors.d.ts +10 -0
  103. package/dist/errors/errors.d.ts.map +1 -1
  104. package/dist/errors/types.d.ts +14 -0
  105. package/dist/errors/types.d.ts.map +1 -1
  106. package/dist/helpers/assert-fixed.d.ts +3 -1
  107. package/dist/helpers/assert-fixed.d.ts.map +1 -1
  108. package/dist/helpers/assert-xml-characters.d.ts +35 -0
  109. package/dist/helpers/assert-xml-characters.d.ts.map +1 -0
  110. package/dist/helpers/assert-xml-characters.types.d.ts +26 -0
  111. package/dist/helpers/assert-xml-characters.types.d.ts.map +1 -0
  112. package/dist/helpers/assert-xsi-type.d.ts +4 -0
  113. package/dist/helpers/assert-xsi-type.d.ts.map +1 -1
  114. package/dist/helpers/converter.d.ts +21 -6
  115. package/dist/helpers/converter.d.ts.map +1 -1
  116. package/dist/helpers/evaluate-expectations.d.ts +21 -0
  117. package/dist/helpers/evaluate-expectations.d.ts.map +1 -0
  118. package/dist/helpers/evaluate-expectations.types.d.ts +31 -0
  119. package/dist/helpers/evaluate-expectations.types.d.ts.map +1 -0
  120. package/dist/helpers/guard.d.ts +24 -4
  121. package/dist/helpers/guard.d.ts.map +1 -1
  122. package/dist/helpers/index.d.ts +2 -0
  123. package/dist/helpers/index.d.ts.map +1 -1
  124. package/dist/helpers/merge-extensions.d.ts +2 -0
  125. package/dist/helpers/merge-extensions.d.ts.map +1 -1
  126. package/dist/helpers/read-attributes.d.ts +4 -0
  127. package/dist/helpers/read-attributes.d.ts.map +1 -1
  128. package/dist/helpers/standardizing.d.ts +10 -0
  129. package/dist/helpers/standardizing.d.ts.map +1 -1
  130. package/dist/helpers/strip-attributes.d.ts +2 -0
  131. package/dist/helpers/strip-attributes.d.ts.map +1 -1
  132. package/dist/helpers-DVShv41E.js +489 -0
  133. package/dist/helpers.js +3 -439
  134. package/dist/in-process-link-DBeAOZRp.js +2791 -0
  135. package/dist/index.d.ts +1 -0
  136. package/dist/index.d.ts.map +1 -1
  137. package/dist/index.js +13 -12
  138. package/dist/perf/create-perf.d.ts +8 -1
  139. package/dist/perf/create-perf.d.ts.map +1 -1
  140. package/dist/perf/index.d.ts +1 -1
  141. package/dist/perf/index.d.ts.map +1 -1
  142. package/dist/perf/noop-perf.d.ts.map +1 -1
  143. package/dist/perf/perf.types.d.ts +65 -6
  144. package/dist/perf/perf.types.d.ts.map +1 -1
  145. package/dist/project/index.d.ts +7 -5
  146. package/dist/project/index.d.ts.map +1 -1
  147. package/dist/project/io/export-blob.d.ts +5 -2
  148. package/dist/project/io/export-blob.d.ts.map +1 -1
  149. package/dist/project/io/export-document.d.ts +5 -4
  150. package/dist/project/io/export-document.d.ts.map +1 -1
  151. package/dist/project/io/index.d.ts +1 -1
  152. package/dist/project/io/index.d.ts.map +1 -1
  153. package/dist/project/io/init-empty-document.d.ts +2 -0
  154. package/dist/project/io/init-empty-document.d.ts.map +1 -1
  155. package/dist/project/io/run-export.d.ts +19 -0
  156. package/dist/project/io/run-export.d.ts.map +1 -0
  157. package/dist/project/io/run-export.types.d.ts +45 -0
  158. package/dist/project/io/run-export.types.d.ts.map +1 -0
  159. package/dist/project/io/run-import.d.ts +15 -0
  160. package/dist/project/io/run-import.d.ts.map +1 -0
  161. package/dist/project/io/run-import.types.d.ts +19 -0
  162. package/dist/project/io/run-import.types.d.ts.map +1 -0
  163. package/dist/project/io/store-runtime.constants.d.ts +6 -0
  164. package/dist/project/io/store-runtime.constants.d.ts.map +1 -0
  165. package/dist/project/io/store-runtime.d.ts +12 -0
  166. package/dist/project/io/store-runtime.d.ts.map +1 -0
  167. package/dist/project/io/store-runtime.types.d.ts +18 -0
  168. package/dist/project/io/store-runtime.types.d.ts.map +1 -0
  169. package/dist/project/project-channel.d.ts +11 -0
  170. package/dist/project/project-channel.d.ts.map +1 -0
  171. package/dist/project/project.constants.d.ts +12 -0
  172. package/dist/project/project.constants.d.ts.map +1 -0
  173. package/dist/project/project.d.ts +315 -31
  174. package/dist/project/project.d.ts.map +1 -1
  175. package/dist/project/state/document-lifecycle.d.ts +0 -12
  176. package/dist/project/state/document-lifecycle.d.ts.map +1 -1
  177. package/dist/project/state/document-state.d.ts +4 -0
  178. package/dist/project/state/document-state.d.ts.map +1 -1
  179. package/dist/project/types.d.ts +126 -60
  180. package/dist/project/types.d.ts.map +1 -1
  181. package/dist/project-key-Ch34EtFa.js +1435 -0
  182. package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
  183. package/dist/running-operations-vnijBvn7.js +76 -0
  184. package/dist/same-json-value-C6kUaoyt.js +1603 -0
  185. package/dist/sqlite.d.ts +5 -0
  186. package/dist/sqlite.d.ts.map +1 -0
  187. package/dist/sqlite.js +2671 -0
  188. package/dist/sqlite3.wasm +0 -0
  189. package/dist/store/apply-record-patch.d.ts +13 -0
  190. package/dist/store/apply-record-patch.d.ts.map +1 -0
  191. package/dist/store/closing-connections.d.ts +7 -0
  192. package/dist/store/closing-connections.d.ts.map +1 -0
  193. package/dist/store/closing-connections.types.d.ts +13 -0
  194. package/dist/store/closing-connections.types.d.ts.map +1 -0
  195. package/dist/store/commit-progress.d.ts +10 -0
  196. package/dist/store/commit-progress.d.ts.map +1 -0
  197. package/dist/store/compare-by-id.d.ts +10 -0
  198. package/dist/store/compare-by-id.d.ts.map +1 -0
  199. package/dist/store/document-path.constants.d.ts +20 -0
  200. package/dist/store/document-path.constants.d.ts.map +1 -0
  201. package/dist/store/document-path.d.ts +75 -0
  202. package/dist/store/document-path.d.ts.map +1 -0
  203. package/dist/store/document-path.types.d.ts +11 -0
  204. package/dist/store/document-path.types.d.ts.map +1 -0
  205. package/dist/store/engine/client/check-engine-wire.d.ts +8 -0
  206. package/dist/store/engine/client/check-engine-wire.d.ts.map +1 -0
  207. package/dist/store/engine/client/client.constants.d.ts +30 -0
  208. package/dist/store/engine/client/client.constants.d.ts.map +1 -0
  209. package/dist/store/engine/client/client.types.d.ts +200 -0
  210. package/dist/store/engine/client/client.types.d.ts.map +1 -0
  211. package/dist/store/engine/client/engine-client.d.ts +15 -0
  212. package/dist/store/engine/client/engine-client.d.ts.map +1 -0
  213. package/dist/store/engine/client/engine-control.d.ts +16 -0
  214. package/dist/store/engine/client/engine-control.d.ts.map +1 -0
  215. package/dist/store/engine/client/heartbeat-watch.d.ts +17 -0
  216. package/dist/store/engine/client/heartbeat-watch.d.ts.map +1 -0
  217. package/dist/store/engine/client/hub-connector.d.ts +11 -0
  218. package/dist/store/engine/client/hub-connector.d.ts.map +1 -0
  219. package/dist/store/engine/client/hub-connector.types.d.ts +25 -0
  220. package/dist/store/engine/client/hub-connector.types.d.ts.map +1 -0
  221. package/dist/store/engine/client/worker-connector.d.ts +32 -0
  222. package/dist/store/engine/client/worker-connector.d.ts.map +1 -0
  223. package/dist/store/engine/creation-refusal.d.ts +10 -0
  224. package/dist/store/engine/creation-refusal.d.ts.map +1 -0
  225. package/dist/store/engine/dialecte-refusal.d.ts +18 -0
  226. package/dist/store/engine/dialecte-refusal.d.ts.map +1 -0
  227. package/dist/store/engine/engine-store.d.ts +163 -0
  228. package/dist/store/engine/engine-store.d.ts.map +1 -0
  229. package/dist/store/engine/engine-store.types.d.ts +53 -0
  230. package/dist/store/engine/engine-store.types.d.ts.map +1 -0
  231. package/dist/store/engine/engine.constants.d.ts +14 -0
  232. package/dist/store/engine/engine.constants.d.ts.map +1 -0
  233. package/dist/store/engine/engine.types.d.ts +165 -0
  234. package/dist/store/engine/engine.types.d.ts.map +1 -0
  235. package/dist/store/engine/host/engine-wire.d.ts +19 -0
  236. package/dist/store/engine/host/engine-wire.d.ts.map +1 -0
  237. package/dist/store/engine/host/heartbeat.d.ts +33 -0
  238. package/dist/store/engine/host/heartbeat.d.ts.map +1 -0
  239. package/dist/store/engine/host/host.constants.d.ts +13 -0
  240. package/dist/store/engine/host/host.constants.d.ts.map +1 -0
  241. package/dist/store/engine/host/host.types.d.ts +65 -0
  242. package/dist/store/engine/host/host.types.d.ts.map +1 -0
  243. package/dist/store/engine/host/store-events.d.ts +14 -0
  244. package/dist/store/engine/host/store-events.d.ts.map +1 -0
  245. package/dist/store/engine/hub/hub-client.constants.d.ts +27 -0
  246. package/dist/store/engine/hub/hub-client.constants.d.ts.map +1 -0
  247. package/dist/store/engine/hub/hub-client.d.ts +46 -0
  248. package/dist/store/engine/hub/hub-client.d.ts.map +1 -0
  249. package/dist/store/engine/hub/hub-client.types.d.ts +208 -0
  250. package/dist/store/engine/hub/hub-client.types.d.ts.map +1 -0
  251. package/dist/store/engine/hub/hub-protocol.types.d.ts +193 -0
  252. package/dist/store/engine/hub/hub-protocol.types.d.ts.map +1 -0
  253. package/dist/store/engine/hub/hub-router.d.ts +9 -0
  254. package/dist/store/engine/hub/hub-router.d.ts.map +1 -0
  255. package/dist/store/engine/hub/hub-shell.d.ts +13 -0
  256. package/dist/store/engine/hub/hub-shell.d.ts.map +1 -0
  257. package/dist/store/engine/hub/hub-shell.types.d.ts +64 -0
  258. package/dist/store/engine/hub/hub-shell.types.d.ts.map +1 -0
  259. package/dist/store/engine/hub/hub.constants.d.ts +33 -0
  260. package/dist/store/engine/hub/hub.constants.d.ts.map +1 -0
  261. package/dist/store/engine/hub/hub.types.d.ts +305 -0
  262. package/dist/store/engine/hub/hub.types.d.ts.map +1 -0
  263. package/dist/store/engine/hub/hub.worker.d.ts +2 -0
  264. package/dist/store/engine/hub/hub.worker.d.ts.map +1 -0
  265. package/dist/store/engine/hub/realm-host.d.ts +10 -0
  266. package/dist/store/engine/hub/realm-host.d.ts.map +1 -0
  267. package/dist/store/engine/hub/realm-host.types.d.ts +78 -0
  268. package/dist/store/engine/hub/realm-host.types.d.ts.map +1 -0
  269. package/dist/store/engine/project-key.d.ts +15 -0
  270. package/dist/store/engine/project-key.d.ts.map +1 -0
  271. package/dist/store/engine/wire/error-envelope.d.ts +25 -0
  272. package/dist/store/engine/wire/error-envelope.d.ts.map +1 -0
  273. package/dist/store/engine/wire/wire-values.d.ts +33 -0
  274. package/dist/store/engine/wire/wire-values.d.ts.map +1 -0
  275. package/dist/store/engine/wire/wire.constants.d.ts +116 -0
  276. package/dist/store/engine/wire/wire.constants.d.ts.map +1 -0
  277. package/dist/store/engine/wire/wire.types.d.ts +119 -0
  278. package/dist/store/engine/wire/wire.types.d.ts.map +1 -0
  279. package/dist/store/hub-public.d.ts +33 -0
  280. package/dist/store/hub-public.d.ts.map +1 -0
  281. package/dist/store/ignore-destroy-outcome.d.ts +6 -0
  282. package/dist/store/ignore-destroy-outcome.d.ts.map +1 -0
  283. package/dist/store/in-memory/in-memory-state.d.ts +46 -0
  284. package/dist/store/in-memory/in-memory-state.d.ts.map +1 -0
  285. package/dist/store/in-memory/in-memory-store.constants.d.ts +7 -0
  286. package/dist/store/in-memory/in-memory-store.constants.d.ts.map +1 -0
  287. package/dist/store/in-memory/in-memory-store.d.ts +105 -17
  288. package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
  289. package/dist/store/in-memory/types.d.ts +55 -1
  290. package/dist/store/in-memory/types.d.ts.map +1 -1
  291. package/dist/store/index.d.ts +8 -2
  292. package/dist/store/index.d.ts.map +1 -1
  293. package/dist/store/json-values.constants.d.ts +18 -0
  294. package/dist/store/json-values.constants.d.ts.map +1 -0
  295. package/dist/store/json-values.d.ts +40 -0
  296. package/dist/store/json-values.d.ts.map +1 -0
  297. package/dist/store/json-values.types.d.ts +18 -0
  298. package/dist/store/json-values.types.d.ts.map +1 -0
  299. package/dist/store/local/dexie-store.constants.d.ts +20 -0
  300. package/dist/store/local/dexie-store.constants.d.ts.map +1 -0
  301. package/dist/store/local/dexie-store.d.ts +134 -5
  302. package/dist/store/local/dexie-store.d.ts.map +1 -1
  303. package/dist/store/local/types.d.ts +6 -0
  304. package/dist/store/local/types.d.ts.map +1 -1
  305. package/dist/store/lost-write.d.ts +32 -0
  306. package/dist/store/lost-write.d.ts.map +1 -0
  307. package/dist/store/lost-write.types.d.ts +4 -0
  308. package/dist/store/lost-write.types.d.ts.map +1 -0
  309. package/dist/store/open-connections.d.ts +4 -0
  310. package/dist/store/open-connections.d.ts.map +1 -0
  311. package/dist/store/open-connections.types.d.ts +17 -0
  312. package/dist/store/open-connections.types.d.ts.map +1 -0
  313. package/dist/store/own-import.d.ts +10 -0
  314. package/dist/store/own-import.d.ts.map +1 -0
  315. package/dist/store/project-name.d.ts +10 -0
  316. package/dist/store/project-name.d.ts.map +1 -0
  317. package/dist/store/resolve-store.d.ts +28 -4
  318. package/dist/store/resolve-store.d.ts.map +1 -1
  319. package/dist/store/running-operations.d.ts +7 -0
  320. package/dist/store/running-operations.d.ts.map +1 -0
  321. package/dist/store/running-operations.types.d.ts +10 -0
  322. package/dist/store/running-operations.types.d.ts.map +1 -0
  323. package/dist/store/same-json-value.d.ts +9 -0
  324. package/dist/store/same-json-value.d.ts.map +1 -0
  325. package/dist/store/sqlite/adapter/in-process-link.d.ts +20 -0
  326. package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -0
  327. package/dist/store/sqlite/adapter/in-process-link.types.d.ts +21 -0
  328. package/dist/store/sqlite/adapter/in-process-link.types.d.ts.map +1 -0
  329. package/dist/store/sqlite/adapter/realm-storage.d.ts +10 -0
  330. package/dist/store/sqlite/adapter/realm-storage.d.ts.map +1 -0
  331. package/dist/store/sqlite/adapter/sqlite-connector.d.ts +14 -0
  332. package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -0
  333. package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts +4 -0
  334. package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts.map +1 -0
  335. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -0
  336. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -0
  337. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +5 -0
  338. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -0
  339. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +8 -0
  340. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -0
  341. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +5 -0
  342. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -0
  343. package/dist/store/sqlite/engine/blobs.d.ts +55 -0
  344. package/dist/store/sqlite/engine/blobs.d.ts.map +1 -0
  345. package/dist/store/sqlite/engine/bulk-insert.d.ts +31 -0
  346. package/dist/store/sqlite/engine/bulk-insert.d.ts.map +1 -0
  347. package/dist/store/sqlite/engine/commit.d.ts +20 -0
  348. package/dist/store/sqlite/engine/commit.d.ts.map +1 -0
  349. package/dist/store/sqlite/engine/device-cache.d.ts +13 -0
  350. package/dist/store/sqlite/engine/device-cache.d.ts.map +1 -0
  351. package/dist/store/sqlite/engine/engine-errors.d.ts +26 -0
  352. package/dist/store/sqlite/engine/engine-errors.d.ts.map +1 -0
  353. package/dist/store/sqlite/engine/engine.constants.d.ts +144 -0
  354. package/dist/store/sqlite/engine/engine.constants.d.ts.map +1 -0
  355. package/dist/store/sqlite/engine/engine.types.d.ts +361 -0
  356. package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -0
  357. package/dist/store/sqlite/engine/history.d.ts +114 -0
  358. package/dist/store/sqlite/engine/history.d.ts.map +1 -0
  359. package/dist/store/sqlite/engine/import-queue.d.ts +7 -0
  360. package/dist/store/sqlite/engine/import-queue.d.ts.map +1 -0
  361. package/dist/store/sqlite/engine/import-target.d.ts +23 -0
  362. package/dist/store/sqlite/engine/import-target.d.ts.map +1 -0
  363. package/dist/store/sqlite/engine/import-window.d.ts +23 -0
  364. package/dist/store/sqlite/engine/import-window.d.ts.map +1 -0
  365. package/dist/store/sqlite/engine/reclaim.d.ts +13 -0
  366. package/dist/store/sqlite/engine/reclaim.d.ts.map +1 -0
  367. package/dist/store/sqlite/engine/records.d.ts +117 -0
  368. package/dist/store/sqlite/engine/records.d.ts.map +1 -0
  369. package/dist/store/sqlite/engine/registry.d.ts +76 -0
  370. package/dist/store/sqlite/engine/registry.d.ts.map +1 -0
  371. package/dist/store/sqlite/engine/schema.d.ts +57 -0
  372. package/dist/store/sqlite/engine/schema.d.ts.map +1 -0
  373. package/dist/store/sqlite/engine/sqlite-engine.d.ts +14 -0
  374. package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -0
  375. package/dist/store/sqlite/engine/transaction.d.ts +12 -0
  376. package/dist/store/sqlite/engine/transaction.d.ts.map +1 -0
  377. package/dist/store/sqlite/list-projects.constants.d.ts +12 -0
  378. package/dist/store/sqlite/list-projects.constants.d.ts.map +1 -0
  379. package/dist/store/sqlite/list-projects.d.ts +22 -0
  380. package/dist/store/sqlite/list-projects.d.ts.map +1 -0
  381. package/dist/store/sqlite/list-projects.types.d.ts +28 -0
  382. package/dist/store/sqlite/list-projects.types.d.ts.map +1 -0
  383. package/dist/store/sqlite/load-sqlite.d.ts +11 -0
  384. package/dist/store/sqlite/load-sqlite.d.ts.map +1 -0
  385. package/dist/store/sqlite/runtime/close-engine.d.ts +18 -0
  386. package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -0
  387. package/dist/store/sqlite/runtime/install-pool.d.ts +94 -0
  388. package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -0
  389. package/dist/store/sqlite/runtime/pool-header.d.ts +13 -0
  390. package/dist/store/sqlite/runtime/pool-header.d.ts.map +1 -0
  391. package/dist/store/sqlite/runtime/progress-beat.d.ts +13 -0
  392. package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -0
  393. package/dist/store/sqlite/runtime/runtime.constants.d.ts +57 -0
  394. package/dist/store/sqlite/runtime/runtime.constants.d.ts.map +1 -0
  395. package/dist/store/sqlite/runtime/runtime.types.d.ts +56 -0
  396. package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -0
  397. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +16 -0
  398. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +1 -0
  399. package/dist/store/sqlite/sqlite-store-of.d.ts +7 -0
  400. package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -0
  401. package/dist/store/sqlite/sqlite-text.d.ts +20 -0
  402. package/dist/store/sqlite/sqlite-text.d.ts.map +1 -0
  403. package/dist/store/sqlite/sqlite-wasm-url.d.ts +9 -0
  404. package/dist/store/sqlite/sqlite-wasm-url.d.ts.map +1 -0
  405. package/dist/store/sqlite/sqlite.constants.d.ts +15 -0
  406. package/dist/store/sqlite/sqlite.constants.d.ts.map +1 -0
  407. package/dist/store/sqlite/sqlite.types.d.ts +36 -0
  408. package/dist/store/sqlite/sqlite.types.d.ts.map +1 -0
  409. package/dist/store/sqlite-storage.constants.d.ts +14 -0
  410. package/dist/store/sqlite-storage.constants.d.ts.map +1 -0
  411. package/dist/store/sqlite-storage.d.ts +22 -0
  412. package/dist/store/sqlite-storage.d.ts.map +1 -0
  413. package/dist/store/sqlite-storage.types.d.ts +24 -0
  414. package/dist/store/sqlite-storage.types.d.ts.map +1 -0
  415. package/dist/store/store-errors.d.ts +51 -0
  416. package/dist/store/store-errors.d.ts.map +1 -0
  417. package/dist/store/store.constants.d.ts +15 -3
  418. package/dist/store/store.constants.d.ts.map +1 -1
  419. package/dist/store/store.types.d.ts +280 -16
  420. package/dist/store/store.types.d.ts.map +1 -1
  421. package/dist/store/stored-record.d.ts +16 -0
  422. package/dist/store/stored-record.d.ts.map +1 -0
  423. package/dist/store/unfinished-imports.d.ts +15 -0
  424. package/dist/store/unfinished-imports.d.ts.map +1 -0
  425. package/dist/store/write-outcome.d.ts +34 -0
  426. package/dist/store/write-outcome.d.ts.map +1 -0
  427. package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts +7 -0
  428. package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts.map +1 -0
  429. package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +19 -18
  430. package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
  431. package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts +8 -4
  432. package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts.map +1 -1
  433. package/dist/test/assert-xml/assert-xml.constants.d.ts +25 -0
  434. package/dist/test/assert-xml/assert-xml.constants.d.ts.map +1 -0
  435. package/dist/test/assert-xml/assert-xml.d.ts +23 -34
  436. package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
  437. package/dist/test/assert-xml/assert-xml.types.d.ts +48 -0
  438. package/dist/test/assert-xml/assert-xml.types.d.ts.map +1 -0
  439. package/dist/test/assert-xml/describe-nearby.d.ts +16 -0
  440. package/dist/test/assert-xml/describe-nearby.d.ts.map +1 -0
  441. package/dist/test/assert-xml/describe-node-place.d.ts +15 -0
  442. package/dist/test/assert-xml/describe-node-place.d.ts.map +1 -0
  443. package/dist/test/assert-xml/index.d.ts +1 -1
  444. package/dist/test/assert-xml/index.d.ts.map +1 -1
  445. package/dist/test/assert-xml/query-failure-message.d.ts +24 -0
  446. package/dist/test/assert-xml/query-failure-message.d.ts.map +1 -0
  447. package/dist/test/assert-xml/read-xpath-step.d.ts +8 -0
  448. package/dist/test/assert-xml/read-xpath-step.d.ts.map +1 -0
  449. package/dist/test/assert-xml/xpath-parser.d.ts +2 -1
  450. package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -1
  451. package/dist/test/config.d.ts +5 -0
  452. package/dist/test/config.d.ts.map +1 -1
  453. package/dist/test/constant.d.ts +2 -0
  454. package/dist/test/constant.d.ts.map +1 -1
  455. package/dist/test/create-test-dialecte.d.ts +32 -37
  456. package/dist/test/create-test-dialecte.d.ts.map +1 -1
  457. package/dist/test/create-test-dialecte.types.d.ts +99 -0
  458. package/dist/test/create-test-dialecte.types.d.ts.map +1 -0
  459. package/dist/test/create-test-helpers-internal.types.d.ts +19 -0
  460. package/dist/test/create-test-helpers-internal.types.d.ts.map +1 -0
  461. package/dist/test/create-test-helpers.d.ts +13 -0
  462. package/dist/test/create-test-helpers.d.ts.map +1 -0
  463. package/dist/test/create-test-helpers.types.d.ts +50 -0
  464. package/dist/test/create-test-helpers.types.d.ts.map +1 -0
  465. package/dist/test/fixtures/test-entry-scan-constraint.d.ts +3 -0
  466. package/dist/test/fixtures/test-entry-scan-constraint.d.ts.map +1 -0
  467. package/dist/test/fixtures/test-entry-scan-edges.types.d.ts +10 -0
  468. package/dist/test/fixtures/test-entry-scan-edges.types.d.ts.map +1 -0
  469. package/dist/test/fixtures/test-entry-scan-recursive.d.ts +4 -0
  470. package/dist/test/fixtures/test-entry-scan-recursive.d.ts.map +1 -0
  471. package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts +15 -0
  472. package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts.map +1 -0
  473. package/dist/test/fixtures/test-entry-scan-shapes.d.ts +14 -0
  474. package/dist/test/fixtures/test-entry-scan-shapes.d.ts.map +1 -0
  475. package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts +14 -0
  476. package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts.map +1 -0
  477. package/dist/test/fixtures/test-entry-scan-tree.d.ts +3 -0
  478. package/dist/test/fixtures/test-entry-scan-tree.d.ts.map +1 -0
  479. package/dist/test/fixtures/test-entry-scan.d.ts +5 -0
  480. package/dist/test/fixtures/test-entry-scan.d.ts.map +1 -0
  481. package/dist/test/fixtures/test-entry-scan.types.d.ts +5 -0
  482. package/dist/test/fixtures/test-entry-scan.types.d.ts.map +1 -0
  483. package/dist/test/generated/definition.generated.d.ts +5 -0
  484. package/dist/test/generated/definition.generated.d.ts.map +1 -1
  485. package/dist/test/in-memory-storage.setup.d.ts +2 -0
  486. package/dist/test/in-memory-storage.setup.d.ts.map +1 -0
  487. package/dist/test/index.d.ts +6 -0
  488. package/dist/test/index.d.ts.map +1 -1
  489. package/dist/test/normalize-uuids.constants.d.ts +3 -0
  490. package/dist/test/normalize-uuids.constants.d.ts.map +1 -0
  491. package/dist/test/normalize-uuids.d.ts +12 -0
  492. package/dist/test/normalize-uuids.d.ts.map +1 -1
  493. package/dist/test/run-test-cases.d.ts +30 -11
  494. package/dist/test/run-test-cases.d.ts.map +1 -1
  495. package/dist/test/run-test-cases.type.d.ts +16 -0
  496. package/dist/test/run-test-cases.type.d.ts.map +1 -1
  497. package/dist/test/sqlite-storage.setup.d.ts +1 -0
  498. package/dist/test/sqlite-storage.setup.d.ts.map +1 -0
  499. package/dist/test/test-dialecte-setup.d.ts +31 -0
  500. package/dist/test/test-dialecte-setup.d.ts.map +1 -0
  501. package/dist/test/test-dialecte-setup.types.d.ts +29 -0
  502. package/dist/test/test-dialecte-setup.types.d.ts.map +1 -0
  503. package/dist/test/test-dialecte.d.ts +2722 -0
  504. package/dist/test/test-dialecte.d.ts.map +1 -0
  505. package/dist/test/test-dialecte.types.d.ts +3 -0
  506. package/dist/test/test-dialecte.types.d.ts.map +1 -0
  507. package/dist/test/test-dialecte.worker.d.ts +2 -0
  508. package/dist/test/test-dialecte.worker.d.ts.map +1 -0
  509. package/dist/test/test-entry-environment.constants.d.ts +27 -0
  510. package/dist/test/test-entry-environment.constants.d.ts.map +1 -0
  511. package/dist/test/test-record.d.ts +49 -1
  512. package/dist/test/test-record.d.ts.map +1 -1
  513. package/dist/test/test-storage/index.d.ts +5 -0
  514. package/dist/test/test-storage/index.d.ts.map +1 -0
  515. package/dist/test/test-storage/read-test-storage.d.ts +4 -0
  516. package/dist/test/test-storage/read-test-storage.d.ts.map +1 -0
  517. package/dist/test/test-storage/resolve-test-storage.d.ts +9 -0
  518. package/dist/test/test-storage/resolve-test-storage.d.ts.map +1 -0
  519. package/dist/test/test-storage/test-storage.constants.d.ts +9 -0
  520. package/dist/test/test-storage/test-storage.constants.d.ts.map +1 -0
  521. package/dist/test/test-storage/test-storage.types.d.ts +15 -0
  522. package/dist/test/test-storage/test-storage.types.d.ts.map +1 -0
  523. package/dist/test/test-storage/test-store-for.d.ts +19 -0
  524. package/dist/test/test-storage/test-store-for.d.ts.map +1 -0
  525. package/dist/test/test-storage/use-test-storage.d.ts +14 -0
  526. package/dist/test/test-storage/use-test-storage.d.ts.map +1 -0
  527. package/dist/test/test-timing.constants.d.ts +15 -0
  528. package/dist/test/test-timing.constants.d.ts.map +1 -0
  529. package/dist/test/xml/engine-console.d.ts +6 -0
  530. package/dist/test/xml/engine-console.d.ts.map +1 -0
  531. package/dist/test/xml/engine.d.ts +3 -0
  532. package/dist/test/xml/engine.d.ts.map +1 -0
  533. package/dist/test/xml/index.d.ts +8 -0
  534. package/dist/test/xml/index.d.ts.map +1 -0
  535. package/dist/test/xml/malformed-xml-error.d.ts +5 -0
  536. package/dist/test/xml/malformed-xml-error.d.ts.map +1 -0
  537. package/dist/test/xml/print-node.d.ts +7 -0
  538. package/dist/test/xml/print-node.d.ts.map +1 -0
  539. package/dist/test/xml/select-nodes.d.ts +14 -0
  540. package/dist/test/xml/select-nodes.d.ts.map +1 -0
  541. package/dist/test/xml/with-xml-document.constants.d.ts +7 -0
  542. package/dist/test/xml/with-xml-document.constants.d.ts.map +1 -0
  543. package/dist/test/xml/with-xml-document.d.ts +14 -0
  544. package/dist/test/xml/with-xml-document.d.ts.map +1 -0
  545. package/dist/test/xml/xml-query-refused-error.d.ts +13 -0
  546. package/dist/test/xml/xml-query-refused-error.d.ts.map +1 -0
  547. package/dist/test/xml/xml.constants.d.ts +16 -0
  548. package/dist/test/xml/xml.constants.d.ts.map +1 -0
  549. package/dist/test/xml/xml.types.d.ts +31 -0
  550. package/dist/test/xml/xml.types.d.ts.map +1 -0
  551. package/dist/test/xsd/test-ext.xsd +226 -0
  552. package/dist/test/xsd/test.xsd +528 -0
  553. package/dist/test.js +3427 -406
  554. package/dist/types/dialecte-config.d.ts +6 -0
  555. package/dist/types/dialecte-config.d.ts.map +1 -1
  556. package/dist/types/io.d.ts +5 -0
  557. package/dist/types/io.d.ts.map +1 -1
  558. package/dist/utils/attribute-rules.d.ts +16 -1
  559. package/dist/utils/attribute-rules.d.ts.map +1 -1
  560. package/dist/utils/child-occurrences.constants.d.ts +4 -0
  561. package/dist/utils/child-occurrences.constants.d.ts.map +1 -0
  562. package/dist/utils/child-occurrences.d.ts +17 -0
  563. package/dist/utils/child-occurrences.d.ts.map +1 -0
  564. package/dist/utils/child-occurrences.types.d.ts +6 -0
  565. package/dist/utils/child-occurrences.types.d.ts.map +1 -0
  566. package/dist/utils/datatype.d.ts +4 -0
  567. package/dist/utils/datatype.d.ts.map +1 -1
  568. package/dist/utils/format-xml.d.ts +4 -0
  569. package/dist/utils/format-xml.d.ts.map +1 -1
  570. package/dist/utils/index.d.ts +5 -1
  571. package/dist/utils/index.d.ts.map +1 -1
  572. package/dist/utils/invariant.d.ts +2 -0
  573. package/dist/utils/invariant.d.ts.map +1 -1
  574. package/dist/utils/namespaces.d.ts +15 -1
  575. package/dist/utils/namespaces.d.ts.map +1 -1
  576. package/dist/utils/order-children.d.ts +14 -3
  577. package/dist/utils/order-children.d.ts.map +1 -1
  578. package/dist/utils/order-children.types.d.ts +10 -0
  579. package/dist/utils/order-children.types.d.ts.map +1 -0
  580. package/dist/utils/particle-occurrences.d.ts +4 -0
  581. package/dist/utils/particle-occurrences.d.ts.map +1 -0
  582. package/dist/utils/required-choices.d.ts +17 -0
  583. package/dist/utils/required-choices.d.ts.map +1 -0
  584. package/dist/utils/required-choices.types.d.ts +15 -0
  585. package/dist/utils/required-choices.types.d.ts.map +1 -0
  586. package/dist/utils/resolve-definition.d.ts +4 -0
  587. package/dist/utils/resolve-definition.d.ts.map +1 -1
  588. package/dist/utils/save-to-disk.constants.d.ts +3 -0
  589. package/dist/utils/save-to-disk.constants.d.ts.map +1 -0
  590. package/dist/utils/save-to-disk.d.ts +17 -5
  591. package/dist/utils/save-to-disk.d.ts.map +1 -1
  592. package/dist/utils/save-to-disk.types.d.ts +17 -0
  593. package/dist/utils/save-to-disk.types.d.ts.map +1 -0
  594. package/dist/utils/seeded-uuid.constants.d.ts +5 -0
  595. package/dist/utils/seeded-uuid.constants.d.ts.map +1 -0
  596. package/dist/utils/seeded-uuid.d.ts +15 -0
  597. package/dist/utils/seeded-uuid.d.ts.map +1 -0
  598. package/dist/utils/seeded-uuid.types.d.ts +8 -0
  599. package/dist/utils/seeded-uuid.types.d.ts.map +1 -0
  600. package/dist/utils/tell-listener.constants.d.ts +9 -0
  601. package/dist/utils/tell-listener.constants.d.ts.map +1 -0
  602. package/dist/utils/tell-listener.d.ts +24 -0
  603. package/dist/utils/tell-listener.d.ts.map +1 -0
  604. package/dist/utils/xml-characters.constants.d.ts +9 -0
  605. package/dist/utils/xml-characters.constants.d.ts.map +1 -0
  606. package/dist/utils/xml-characters.d.ts +8 -0
  607. package/dist/utils/xml-characters.d.ts.map +1 -0
  608. package/dist/utils/xml-whitespace.constants.d.ts +8 -0
  609. package/dist/utils/xml-whitespace.constants.d.ts.map +1 -0
  610. package/dist/utils/xml-whitespace.d.ts +19 -0
  611. package/dist/utils/xml-whitespace.d.ts.map +1 -0
  612. package/dist/utils/xsi-type.d.ts +4 -0
  613. package/dist/utils/xsi-type.d.ts.map +1 -1
  614. package/dist/utils/yield-to-queue.d.ts +6 -0
  615. package/dist/utils/yield-to-queue.d.ts.map +1 -0
  616. package/dist/utils-USNkj4sT.js +1275 -0
  617. package/dist/utils.js +1 -2
  618. package/dist/xml/build/document-root.d.ts +7 -0
  619. package/dist/xml/build/document-root.d.ts.map +1 -0
  620. package/dist/xml/build/index.d.ts +0 -5
  621. package/dist/xml/build/index.d.ts.map +1 -1
  622. package/dist/xml/build/record-element.d.ts +15 -0
  623. package/dist/xml/build/record-element.d.ts.map +1 -0
  624. package/dist/xml/build/record-element.types.d.ts +12 -0
  625. package/dist/xml/build/record-element.types.d.ts.map +1 -0
  626. package/dist/xml/build/write-xml-records.d.ts +7 -0
  627. package/dist/xml/build/write-xml-records.d.ts.map +1 -0
  628. package/dist/xml/build/write-xml-records.types.d.ts +11 -0
  629. package/dist/xml/build/write-xml-records.types.d.ts.map +1 -0
  630. package/dist/xml/build/xml-element.d.ts +79 -0
  631. package/dist/xml/build/xml-element.d.ts.map +1 -0
  632. package/dist/xml/build/xml-element.types.d.ts +34 -0
  633. package/dist/xml/build/xml-element.types.d.ts.map +1 -0
  634. package/dist/xml/build/xml-writer.constants.d.ts +24 -0
  635. package/dist/xml/build/xml-writer.constants.d.ts.map +1 -0
  636. package/dist/xml/build/xml-writer.d.ts +40 -0
  637. package/dist/xml/build/xml-writer.d.ts.map +1 -0
  638. package/dist/xml/build/xml-writer.types.d.ts +34 -0
  639. package/dist/xml/build/xml-writer.types.d.ts.map +1 -0
  640. package/dist/xml/dom/index.d.ts +3 -0
  641. package/dist/xml/dom/index.d.ts.map +1 -0
  642. package/dist/xml/dom/xml-document-from-file.d.ts +10 -0
  643. package/dist/xml/dom/xml-document-from-file.d.ts.map +1 -0
  644. package/dist/xml/dom/xml-document-from-file.types.d.ts +5 -0
  645. package/dist/xml/dom/xml-document-from-file.types.d.ts.map +1 -0
  646. package/dist/xml/index.d.ts +1 -0
  647. package/dist/xml/index.d.ts.map +1 -1
  648. package/dist/xml/inspect-xml.d.ts +2 -0
  649. package/dist/xml/inspect-xml.d.ts.map +1 -1
  650. package/dist/xml/parse/index.d.ts +1 -1
  651. package/dist/xml/parse/index.d.ts.map +1 -1
  652. package/dist/xml/parse/parse-xml-document.constants.d.ts +5 -0
  653. package/dist/xml/parse/parse-xml-document.constants.d.ts.map +1 -0
  654. package/dist/xml/parse/parse-xml-document.d.ts +13 -2
  655. package/dist/xml/parse/parse-xml-document.d.ts.map +1 -1
  656. package/dist/xml/parse/parse-xml-document.types.d.ts +7 -2
  657. package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
  658. package/dist/xml/parse/parser.constants.d.ts +7 -0
  659. package/dist/xml/parse/parser.constants.d.ts.map +1 -0
  660. package/dist/xml/parse/parser.d.ts.map +1 -1
  661. package/package.json +88 -8
  662. package/skills/dialecte/SKILL.md +276 -0
  663. package/skills/dialecte/references/api.json +1830 -0
  664. package/skills/dialecte/references/api.md +557 -0
  665. package/skills/dialecte/references/core-api.md +204 -0
  666. package/skills/dialecte/references/testing.md +116 -0
  667. package/skills/dialecte-contributing/SKILL.md +328 -0
  668. package/skills/dialecte-contributing/references/code-rules.md +108 -0
  669. package/skills/dialecte-contributing/references/landing-changes.md +83 -0
  670. package/skills/dialecte-contributing/references/perf.md +39 -0
  671. package/skills/dialecte-contributing/references/traps.md +89 -0
  672. package/skills/dialecte-lot/SKILL.md +471 -0
  673. package/skills/dialecte-lot/references/briefs.md +152 -0
  674. package/skills/dialecte-lot/references/model-tiers.md +52 -0
  675. package/skills/dialecte-lot/references/retro.md +51 -0
  676. package/dist/project/io/import-document.d.ts +0 -7
  677. package/dist/project/io/import-document.d.ts.map +0 -1
  678. package/dist/test/assert-xml/types.d.ts +0 -2
  679. package/dist/test/assert-xml/types.d.ts.map +0 -1
  680. package/dist/utils-DJN0Md0v.js +0 -624
  681. package/dist/xml/build/build-xml-document.d.ts +0 -10
  682. package/dist/xml/build/build-xml-document.d.ts.map +0 -1
  683. package/dist/xml/build/build-xml-document.types.d.ts +0 -22
  684. package/dist/xml/build/build-xml-document.types.d.ts.map +0 -1
  685. package/dist/xml/build/download-file.d.ts +0 -7
  686. package/dist/xml/build/download-file.d.ts.map +0 -1
  687. package/dist/xml/build/formatter.d.ts +0 -2
  688. package/dist/xml/build/formatter.d.ts.map +0 -1
  689. package/dist/xml/build/serialize.d.ts +0 -11
  690. package/dist/xml/build/serialize.d.ts.map +0 -1
  691. package/dist/xml/build/serialize.types.d.ts +0 -12
  692. package/dist/xml/build/serialize.types.d.ts.map +0 -1
@@ -0,0 +1,204 @@
1
+ # @dialecte/core API map
2
+
3
+ A map to find the right existing function, not a signature reference. Confirm the exact signature
4
+ in the installed `.d.ts` or the repo before calling. Paths are relative to the core package `src/`.
5
+
6
+ ## Contents
7
+
8
+ - Entry points
9
+ - Project
10
+ - Document
11
+ - Query
12
+ - Transaction
13
+ - Records, refs, operations
14
+ - Hooks (signatures and rules)
15
+ - Extensions mechanism
16
+ - Helpers (`@dialecte/core/helpers`)
17
+ - Utils (`@dialecte/core/utils`)
18
+ - Errors, diagnostics, perf
19
+ - Stores
20
+ - Easy-to-duplicate list
21
+
22
+ ## Entry points
23
+
24
+ | Import | What is there |
25
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
26
+ | `@dialecte/core` | Project, Document, Query, Transaction, `defineDialecte`, `createProjectFactory`, stores, XML parse/build, errors, diagnostics, perf, all types |
27
+ | `@dialecte/core/helpers` | record converters, guards, `readAttribute(s)`, `standardizeRecord`, `mergeExtensions`, `stripAttributes`, write-path guards, namespace constants |
28
+ | `@dialecte/core/utils` | attribute rules, definition resolution, xsi:type, namespaces, ordering, `invariant`, `formatXml` / `formatEmbeddedXml`, `saveToDisk` |
29
+ | `@dialecte/core/test` | `createTestHelpers`, `createTestRunner`, `createTestProject`, XML/XPath assertions, test dialecte, `normalizeUuids` |
30
+ | `@dialecte/core/sqlite` | opt-in SQLite storage: importing it registers `{ type: 'sqlite' }`; `connectHub`, `adoptHubPort`, `listProjects` |
31
+
32
+ ## Project (`project/project.ts`)
33
+
34
+ - `open(name)` - must come first; opens the store, hydrates `state.documents`. `close()` is async
35
+ and waits for running imports. `destroy()` deletes the database; it is refused `PROJECT_OPEN_ELSEWHERE`,
36
+ nothing removed and the project closed, while another connection of the name is open (another project
37
+ or store, in this page or another tab): close that one, then call `destroy()` again. A test closes the stores
38
+ `createTestContext` opened by name with `closeTestContexts()` before destroying their project.
39
+ - `importFile(file)` → `{ documentId, fileName, recordCount, diagnostics }` or throws; `import(files)`
40
+ → per-file `{ status: 'imported' | 'failed' }`, never rejects. The import runs inside the store; imports
41
+ are serialised per project; a document being imported is invisible until ready.
42
+ - `export({ documentId, indent?, withDatabaseIds?, xmlDocument?, download? })` → `{ file: Blob, filename }`
43
+ (+ `xmlDocument` when asked, page only). The store writes the file without a DOM, so export works in a
44
+ worker and in Node.
45
+ - `initEmptyDocument()`, `removeDocument(id)`, `getDocuments()`, `getDocument(id)`,
46
+ `openDocument(id)`, `getDocumentStatus(id)`, `getDocumentConfig(id)`.
47
+ - `undo(id)` / `redo(id)` - store-level change log.
48
+ - Blobs: `addBlob`, `getBlob`, `exportBlob`, `attachBlob`, `detachBlob`, `removeBlob`,
49
+ `getBlobsByDocument`, `getBlobsByRecord`, `getStandaloneBlobs`. `getDatabaseInstance()` for the raw DB.
50
+ - Cross-document: `queryFirst(fn)`, `queryAll(fn)`.
51
+ - `state` (documents map), `perf`, `createChannel()` (a BroadcastChannel on the project's channel: what changed,
52
+ this tab's changes and other tabs'). On a store that announces its changes (`Store.subscribe`: SQLite,
53
+ in-memory) the channel is the Project's own and reposts what the store tells; on `local` (IndexedDB) it is
54
+ shared by project name.
55
+ - `listProjects({ dialecteId? })` from `@dialecte/core/sqlite` (SQLite projects of the origin, read from the private
56
+ file system) and `factory.destroyProject({ name })` (delete one without opening it).
57
+
58
+ ## Document (`document/document.ts`)
59
+
60
+ - `query` - getter, a new Query each access (extensions bound).
61
+ - `transaction(fn, { label? })` - callback → `beforeCommit` → atomic commit → broadcast → history.
62
+ - `prepare(fn)` → `{ operations, summary, query, commit(), discard() }` - preview before commit.
63
+ - `state` (`loading, error, progress, history, lastUpdate`), `subscribe(cb)`, `documentId`.
64
+
65
+ ## Method index (generated from the source)
66
+
67
+ <!-- dialecte-skills:generated core-methods -->
68
+
69
+ - Query (`doc.query`, also on `tx`): `findAncestors`, `findByAttributes`, `findDescendants`, `getAttribute`, `getAttributes`, `getChild`, `getChildren`, `getDefinition`, `getDocumentInfo`, `getRecord`, `getRecords`, `getRecordsByTagName`, `getRoot`, `getSnapshot`, `getTree`
70
+ - Transaction only (`tx`): `addChild`, `clearRecordCache`, `clearStagedOperations`, `commit`, `deepClone`, `delete`, `ensureChild`, `finishStaging`, `getStagedOperations`, `update`
71
+ - Document: `close`, `destroy`, `prepare`, `subscribe`, `transaction`
72
+ - Project: `addBlob`, `attachBlob`, `close`, `createChannel`, `destroy`, `detachBlob`, `export`, `exportBlob`, `getBlob`, `getBlobsByDocument`, `getBlobsByRecord`, `getDatabaseInstance`, `getDocument`, `getDocumentConfig`, `getDocumentStatus`, `getDocuments`, `getStandaloneBlobs`, `import`, `importFile`, `initEmptyDocument`, `open`, `openDocument`, `queryAll`, `queryFirst`, `redo`, `removeBlob`, `removeDocument`, `undo`
73
+ <!-- /dialecte-skills:generated -->
74
+
75
+ ## Query (`document/query/main.ts`)
76
+
77
+ | Method | Use it for |
78
+ | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
79
+ | `getRoot()` | the root record |
80
+ | `getRecord(ref)` / `getRecords(refs)` | one / many records, `undefined` when missing |
81
+ | `getChild(ref, tag)` / `getChildren(ref, tag)` | direct children by tag |
82
+ | `getRecordsByTagName(tag)` | every record of a tag in the document |
83
+ | `findDescendants(ref, { collect, omit })` | descendants grouped by tag (NOT document order) |
84
+ | `findAncestors(ref, { depth, stopAtTagName, order })` | the ancestor chain (bottom-up by default) |
85
+ | `findByAttributes({ tagName, attributes })` | lookup by attribute values |
86
+ | `getTree(ref, { select: { where, ... }, omit, unwrap, depth })` | a subtree in document order; unwraps transparent elements by default; whole-document load unless a committed read with `id` + `depth` |
87
+ | `getSnapshot({ ref, ancestors, siblings, depth, as: 'tree' \| 'xml' \| 'both' })` | a view with staged ops overlaid |
88
+ | `getAttribute(ref, { name, namespace?, fullObject?, defaults? })` | one attribute (`''` when absent) |
89
+ | `getAttributes(ref, { namespace?, fullObject?, defaults? })` | value object of attributes |
90
+ | `getDefinition(ref)` | resolved definition (parent- and xsi:type-aware) |
91
+ | `getDocumentInfo()` | the document's registry record |
92
+ | `any` | untyped escape hatch - avoid in domain code |
93
+
94
+ ## Transaction (`document/transaction/main.ts`, extends Query)
95
+
96
+ | Method | Use it for |
97
+ | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
98
+ | `addChild(parent, { tagName, attributes, namespace?, value?, id? })` | create; standardised, hooks fire |
99
+ | `ensureChild(parent, params)` | get-or-create among direct children (match by attributes, then id, then tag) |
100
+ | `update(ref, { attributes?, value? })` | change; an `undefined`/`null` attribute value removes it; no-op updates stage nothing |
101
+ | `delete(ref)` | delete with cascade; root is protected |
102
+ | `deepClone(parent, treeRecord)` | copy a `getTree` result under a parent; always new ids; returns source→target mappings |
103
+ | `progress` | `plan`, `nextStep`, `endPlan` for long operations |
104
+
105
+ `finishStaging`, `commit`, `getStagedOperations`, `clear*` are internal - Document calls them.
106
+
107
+ ## Records, refs, operations (`types/records.ts`, `document/types.ref.ts`, `types/operations.ts`)
108
+
109
+ - `RawRecord` `{ id, tagName, namespace, attributes[], value, parent: {id, tagName} | null, children[] }`
110
+ (stored shape; a root's `parent` is `null`, not `undefined`).
111
+ - `TrackedRecord` = raw + `status` (created/updated/deleted/unchanged) - what queries return.
112
+ - `TreeRecord` = tracked + `tree[]` - what `getTree` returns.
113
+ - `Ref` `{ tagName, id }` (id optional only for singletons). Methods accept any `RefOrRecord`.
114
+ - `Operation`: created(new) | updated(old, new) | deleted(old).
115
+ - Attribute forms: value object uses stored names (`'ext:cA'`, `'xsi:type'`); full-object form
116
+ takes a local `name` plus `namespace` - a prefixed name there is rejected.
117
+
118
+ ## Hooks (`types/dialecte-config.ts`, `types/io.ts`)
119
+
120
+ Provided by the dialecte package (on the Project, built once per project), not by app code in
121
+ general. Signatures in the installed `.d.ts`; behaviour:
122
+
123
+ | Hook | Receives | Returns | Notes |
124
+ | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
125
+ | `beforeClone` | `{ record }` (tree) | `{ shouldBeCloned, transformedRecord }` | sync, per node; false drops the subtree |
126
+ | `afterStandardizedRecord` | `{ record }` | record | sync, idempotent; runs on create, update, import, init |
127
+ | `afterCreated` | `{ childRecord, parentRecord, query }` | `Operation[]` | after child + parent staged |
128
+ | `afterUpdated` | `{ oldRecord, newRecord, query }` | `Operation[]` | skipped for no-op updates |
129
+ | `beforeDelete` | `{ record, query }` | `Operation[]` | once on the deletion root, subtree still readable |
130
+ | `afterDelete` | `{ record, parentRecord, query }` | `Operation[]` | subtree gone |
131
+ | `beforeCommit` | `{ operations, query }` | `Operation[]` | once per transaction; its ops fire no hooks |
132
+ | `beforeImport` | xml string | xml string | whole-file normalisation |
133
+ | `createImportSession` → `beforeImportRecord` (one session per file; `recordTagNames` narrows the records it sees) | `{ record, ancestry }` | void | sync, per record at its closing tag (children before parent); `ancestry` = still-open parents, not standardised; collect only |
134
+ | `afterImport` | - | `{ creates, updates, deletes, diagnostics }` (the diagnostics reach the app with the import result) | resolve from collected state; bulk write, no undo |
135
+
136
+ Hook-returned operations skip standardisation, guards and further hooks. A returned `deleted`
137
+ needs the parent's `updated` (children list) too.
138
+
139
+ ## Extensions mechanism (`document/types.extensions.ts`, `helpers/merge-extensions.ts`, `document/bind-extensions.ts`)
140
+
141
+ - A module is `{ query?, transaction? }`, groups nest to any depth.
142
+ - `mergeExtensions({ base, custom })` merges per method at Project construction; duplicates throw
143
+ `EXTENSION_METHOD_COLLISION`.
144
+ - `bindExtensions` drops the first argument: `fn(query, params)` becomes `doc.query.<ns>.fn(params)`.
145
+ - Inside a transaction both query and transaction groups are bound to `tx`.
146
+ - Naming an augmented document: `ExtendedDocument<Config, Modules>`; do not hand-write intersections.
147
+
148
+ ## Helpers (`@dialecte/core/helpers`)
149
+
150
+ - `toRef(recordOrRef)`, `toRawRecord`, `toTrackedRecord`, `toTreeRecord`, `widen`, `toFullAttributeArray`.
151
+ - Guards: `isRawRecord`, `isTrackedRecord`, `isTreeRecord`, `isRecordOf`, `isChildOf`, `isParentOf`,
152
+ `isElementOf`, `isAttributeOf`, `isFullAttributeArray`.
153
+ - `readAttribute` / `readAttributes` - sync, same options and results as the query methods, on a
154
+ record as held (no staged writes); take `dialecteConfig`. A dialecte package may export a bound
155
+ version - prefer it.
156
+ - `standardizeRecord`, `stripAttributes`, `mergeExtensions`.
157
+ - Write guards: `assertNoFixedViolation`, `assertXsiTypeAdmitted`, `assertXsiTypeChangeLeavesNothing`.
158
+ - Constants: `CUSTOM_RECORD_ID_ATTRIBUTE` (`dev:db-id`), `DIALECTE_DEV_NAMESPACE`, `XSI_NAMESPACE`, ...
159
+
160
+ ## Utils (`@dialecte/core/utils`)
161
+
162
+ - `invariant(condition, { detail, key?, ref?, meta? })`.
163
+ - Attribute rules: `getAttributeRules`, `resolveSchemaAttributeValue`, `isSchemaDefaultValue`, `extractLocalName`.
164
+ - Definitions: `resolveDefinition(record)` (needs a record; for a ref use `query.getDefinition`),
165
+ `admittedXsiTypes`, `resolveXsiType`, `canonicalXsiType`.
166
+ - Datatypes: `enumeratedValues`, `valuePatterns`.
167
+ - Namespaces: `resolveNamespaceByPrefix`, `resolveNamespaceByScope`, `resolvePrefixByNamespaceScope`,
168
+ `compareQualifiedAttributes`, `orderAttributesBySequence`, `isNamespaceAllowedByWildcard`.
169
+ - Ordering: `orderByConfigSequence`.
170
+ - XML text: `formatXml` (template-tolerant, for fixtures), `formatEmbeddedXml` - only from
171
+ `@dialecte/core/utils`; the main entry has no `formatXml` (`project.export` formats its file).
172
+
173
+ ## Errors, diagnostics, perf
174
+
175
+ - `throwDialecteError(key, { detail, ref?, meta?, cause? })`, `createDialecteError`, `toDialecteError`,
176
+ `isKnownDialecteError(err, { catalogues })`, `defineErrors(catalogue)` for a dialecte's own codes.
177
+ - Core codes by range: D0 general, D1 store, D2 records, D3 constraint violations, D4 transaction,
178
+ D5 IO, D6 config (extension collision), D7 project.
179
+ - Diagnostics (import warnings, validation): `createDiagnostic(catalogue, code, { ref, meta })`,
180
+ `isKnownDiagnostic`. LSP-shaped `{ code, severity, source, message, ref }`.
181
+ - Perf: `dev: { perf: true }` on project creation (when the package factory accepts `dev`; check its signature); `perf.start/stop/count/time/report()`; marks are
182
+ `dialecte::<layer>::<name>` on the standard performance timeline.
183
+
184
+ ## Stores (`store/`)
185
+
186
+ - `storage` param: `{ type: 'local' }` (IndexedDB, the default), `{ type: 'sqlite' }` (the SQLite
187
+ engine in a worker, one per project shared by every tab through the hub; opt-in: the app imports
188
+ `@dialecte/core/sqlite` once, else `PROJECT_SQLITE_NOT_IMPORTED`; opened from a dialecte's project
189
+ factory, which names its engine worker),
190
+ `{ type: 'inMemory', writable? }`,
191
+ `{ type: 'custom', store }`. The store is a switch: results must be identical on every store,
192
+ only speed changes. A difference is a store bug.
193
+ - `Store` interface is public surface for custom stores. The patch merge every built-in store uses
194
+ is internal to the stores (not exported): a custom store merges a `RecordPatch` itself.
195
+
196
+ ## Easy-to-duplicate list - grep these before writing
197
+
198
+ ref conversion `toRef` · record shapes `toRawRecord`/`toTreeRecord`/`widen` · attribute reads
199
+ `getAttributes`/`readAttributes` · lookup by attributes `findByAttributes` · canonical order
200
+ `orderAttributesBySequence`/`orderByConfigSequence` · definition `getDefinition`/`resolveDefinition`
201
+ · xsi:type `canonicalXsiType` · namespaces `utils/namespaces.ts` · errors `invariant`/`throwDialecteError`
202
+ · diagnostics `createDiagnostic` · binding `bindExtensions` ·
203
+ subtree copy `getTree` + `deepClone` (but check the dialecte for a faithful domain copy first) ·
204
+ XML text `formatXml`.
@@ -0,0 +1,116 @@
1
+ # Testing with Dialecte
2
+
3
+ Every dialecte package ships table-driven runners built on core's `createTestRunner`. Use them;
4
+ do not hand-roll project setup, import, export and cleanup in each test.
5
+
6
+ | Package | Import | Runner |
7
+ | ------------------------------ | -------------------------- | --------------------------------------------------------------------------------------------------------------------- |
8
+ | core (its dummy test dialecte) | `@dialecte/core/test` | `createTestHelpers({ dialecte })` → `runTestCases`, `createTestProject`, ...; the dummy dialecte's own `runTestCases` |
9
+ | a dialecte package | `<package>/<version>/test` | `run<Name>TestCases`, `create<Name>TestProject`, ... (see that dialecte's skill) |
10
+
11
+ ## The three modes
12
+
13
+ - `.withExport({ testCases, act })` - the outcome is XML. `act` performs the write and may return
14
+ `{ assertOn: 'source' | 'target', withDatabaseIds? }` (default: source, ids kept) or
15
+ `{ assertOn: 'custom', xmlString }`; each case lists `expectedQueries` / `unexpectedQueries`.
16
+ XPath prefixes are the config's namespace KEYS, not the XML prefixes: `default:` for the default
17
+ namespace, the config key for every other one.
18
+ - `.withoutExport({ testCases, act })` - the outcome is a value or a call. `act` asserts with
19
+ `expect` itself and returns nothing.
20
+ - `.generic(testCases, act)` - pure synchronous functions, no XML, no database.
21
+
22
+ ## Shape
23
+
24
+ ```ts
25
+ // core's own tests, on its dummy schema (Root > A > AA_1 > AAA_1, required attributes aA, aAA_1, ...)
26
+ import { CUSTOM_RECORD_ID_ATTRIBUTE } from '@dialecte/core/helpers'
27
+ import { XMLNS_DEFAULT_NAMESPACE, XMLNS_DEV_NAMESPACE, runTestCases } from '@dialecte/core/test'
28
+
29
+ import type { ActParams, ActResult, BaseXmlTestCase, TestDialecteConfig } from '@dialecte/core/test'
30
+
31
+ type TestCase = BaseXmlTestCase & { params: { value: string } }
32
+
33
+ const testCases: Record<string, TestCase> = {
34
+ 'A without AA_1 → AA_1 added with the value': {
35
+ sourceXml: /* xml */ `
36
+ <Root ${XMLNS_DEFAULT_NAMESPACE} ${XMLNS_DEV_NAMESPACE} ${CUSTOM_RECORD_ID_ATTRIBUTE}="root">
37
+ <A ${CUSTOM_RECORD_ID_ATTRIBUTE}="a-without-child" aA="one" />
38
+ <!-- no AA_1 yet -->
39
+ </Root>`,
40
+ params: { value: 'added' },
41
+ expectedQueries: ['//default:A[@aA="one"]/default:AA_1[@aAA_1="added"]'],
42
+ },
43
+ }
44
+
45
+ async function act({
46
+ testCase,
47
+ source,
48
+ }: ActParams<TestDialecteConfig, TestCase>): Promise<ActResult> {
49
+ await source.transaction(async (tx) => addFirstChild(tx, testCase.params))
50
+ return { assertOn: 'source' }
51
+ }
52
+
53
+ runTestCases.withExport({ testCases, act })
54
+ ```
55
+
56
+ A dialecte package's runner has the same shape with its own types (`<Name>Test.TestCases`,
57
+ `<Name>Test.ActParams`) and its root element.
58
+
59
+ ## Rules
60
+
61
+ - **Red first, one case at a time.** Add one case with `only: true`, run it, see it fail for the
62
+ right reason (an assertion, not a missing module - stub the function with the right type first),
63
+ write the minimum code, then the next case. Remove every `only` at the end. A table written after
64
+ the implementation only pins what the code happens to do.
65
+ - **Case keys** read `<initial state> → <outcome>`.
66
+ - **Fixtures are inline XML** in the test file. `dev:db-id` (`CUSTOM_RECORD_ID_ATTRIBUTE`) gives
67
+ records stable ids; choose ids that say intent (`orphaned-ref`, `a-without-child`). Comment the
68
+ elements that are deliberately absent. No `<?xml ?>` declaration in template literals.
69
+ - **Expectations are structural XPath with meaningful predicates.** `//default:AA_1` alone proves
70
+ nothing; a case can pass because ANOTHER element matched. Do not assert on `dev:db-id` in XPath.
71
+ Pair `unexpectedQueries` with the commented-out source when asserting a deletion.
72
+ - **Fixtures are validated against the schema before a case runs** by the runners `createTestHelpers`
73
+ builds - every dialecte package's `run<Name>TestCases` / `create<Name>TestProject` (a dialecte may
74
+ add its own checks, see its skill). Opt out of those extra checks only with a written reason
75
+ (`skipExtraChecks: '<why>'` on `createTestProject`). Core's own `runTestCases` on the dummy
76
+ dialecte (`createTestRunner`) validates nothing.
77
+ - **Test the function directly** (`fn(source.query, params)` / `fn(tx, params)`), not through the
78
+ bound extension method. Use public interfaces; no mocks of internal collaborators.
79
+ - **No test names its store: the runner chooses it.** A node vitest project whose setup file calls
80
+ `useTestStorage({ type: 'inMemory' })` (core 0.8+) runs your tests in Node on the in-memory store;
81
+ without one, the runner's default store. A second project whose setup imports
82
+ `@dialecte/core/sqlite` and calls `useTestStorage({ type: 'sqlite' })` (core 0.8+) runs the same
83
+ suites on the SQLite engine in the test's own process, no test changed. A test file never calls `useTestStorage` and passes no
84
+ `storage`; only a test about one store itself (an IndexedDB-only behaviour) names it. The
85
+ interface is the truth: a result that differs per store is a store bug, never a reason to pin one
86
+ store.
87
+ - **XML assertions take XML text.** `expectedQueries`, `assertOn: 'custom'` (`xmlString`), and the
88
+ `assertExpectedElementQueries({ xml, queries })` / `assertUnexpectedElementQueries({ xml, queries })`
89
+ that `createXmlAssertions({ namespaces })` returns, read a string, the same way in Node and in the
90
+ browser. Holding a DOM? Serialize it first. Never build one for a test (`xmlDocument: true`,
91
+ `DOMParser`, `document.evaluate`): they exist only in the page.
92
+ - **XPath for small exact output, record expectations for big files.** On a fixture of megabytes, a
93
+ `//` query over the whole export takes seconds and its failure prints too much. State what must
94
+ hold as record expectations - a tag, attribute values, the parent, a count - and check them on
95
+ the records in `.withoutExport`, with the query API:
96
+
97
+ ```ts
98
+ // .withoutExport: the expectations read the records, no export, no XPath
99
+ async function act({ testCase, source }: ActParams<Config, TestCase>): Promise<void> {
100
+ await source.transaction(async (tx) => renameParts(tx, testCase.params))
101
+ const root = await source.query.getRoot()
102
+ const { Part = [], Assembly = [] } = await source.query.findDescendants(root, {
103
+ collect: ['Part', 'Assembly'],
104
+ })
105
+ expect(Part).toHaveLength(3) // count
106
+ for (const assembly of Assembly) {
107
+ const parent = await source.query.getRecord(assembly.parent) // the parent
108
+ expect(parent?.tagName).toBe('Line')
109
+ }
110
+ }
111
+ ```
112
+
113
+ - **Green by accident** is the classic trap: last-wins indexes, id order, an XPath matching a
114
+ sibling. When a case passes on the first run, break the code on purpose and watch it fail.
115
+ - Re-indent `/* xml */` fixtures with core's `dialecte-xmlfmt "<glob>"`; the code formatter does not
116
+ touch them.