@dialecte/core 0.8.1 → 0.10.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 (304) hide show
  1. package/dist/assets/hub.worker-35vzG0HK.js +2 -0
  2. package/dist/dialecte/create-dialecte-project.d.ts +1 -2
  3. package/dist/dialecte/create-dialecte-project.d.ts.map +1 -1
  4. package/dist/dialecte/create-project-factory.d.ts +5 -5
  5. package/dist/dialecte/create-project-factory.d.ts.map +1 -1
  6. package/dist/dialecte/define-dialecte.d.ts +2 -2
  7. package/dist/dialecte/dialecte.types.d.ts +11 -23
  8. package/dist/dialecte/dialecte.types.d.ts.map +1 -1
  9. package/dist/{dialecte-gIPrRzni.js → dialecte-CVLWSkgW.js} +1726 -1673
  10. package/dist/document/document.d.ts +1 -1
  11. package/dist/document/query/get/record/get-record.d.ts +14 -1
  12. package/dist/document/query/get/record/get-record.d.ts.map +1 -1
  13. package/dist/document/query/get/record/get-records.d.ts +12 -2
  14. package/dist/document/query/get/record/get-records.d.ts.map +1 -1
  15. package/dist/{engine-store-CIEqgPUb.js → engine-store-Deo9XNhr.js} +21 -21
  16. package/dist/engine.constants-Bi4gw6BR.js +205 -0
  17. package/dist/errors/{codes.d.ts → codes.constants.d.ts} +33 -105
  18. package/dist/errors/{codes.d.ts.map → codes.constants.d.ts.map} +1 -1
  19. package/dist/errors/core-codes.constants.d.ts +3 -0
  20. package/dist/errors/core-codes.constants.d.ts.map +1 -0
  21. package/dist/errors/errors.constants.d.ts +5 -0
  22. package/dist/errors/errors.constants.d.ts.map +1 -1
  23. package/dist/errors/errors.d.ts.map +1 -1
  24. package/dist/errors/index.d.ts +1 -1
  25. package/dist/errors/index.d.ts.map +1 -1
  26. package/dist/errors/types.d.ts +1 -1
  27. package/dist/errors/types.d.ts.map +1 -1
  28. package/dist/{helpers-DVShv41E.js → helpers-D8p0KiJu.js} +1 -1
  29. package/dist/helpers.js +2 -2
  30. package/dist/{in-process-link-DBeAOZRp.js → in-process-link-B-TCHrlb.js} +996 -993
  31. package/dist/index.js +8 -7
  32. package/dist/project/index.d.ts +1 -1
  33. package/dist/project/index.d.ts.map +1 -1
  34. package/dist/project/io/store-runtime.types.d.ts +1 -3
  35. package/dist/project/io/store-runtime.types.d.ts.map +1 -1
  36. package/dist/project/project.d.ts +13 -15
  37. package/dist/project/project.d.ts.map +1 -1
  38. package/dist/project/types.d.ts +24 -19
  39. package/dist/project/types.d.ts.map +1 -1
  40. package/dist/{project-key-Ch34EtFa.js → project-key-2ccZ-0gu.js} +195 -205
  41. package/dist/running-operations-DCKvzlU7.js +107 -0
  42. package/dist/{same-json-value-C6kUaoyt.js → same-json-value-_AChwM_n.js} +41 -41
  43. package/dist/sqlite-engine.d.ts +7 -0
  44. package/dist/sqlite-engine.d.ts.map +1 -0
  45. package/dist/{engine.js → sqlite-engine.js} +4144 -4079
  46. package/dist/sqlite.d.ts +27 -2
  47. package/dist/sqlite.d.ts.map +1 -1
  48. package/dist/sqlite.js +1118 -917
  49. package/dist/store/in-memory/in-memory-state.constants.d.ts +14 -0
  50. package/dist/store/in-memory/in-memory-state.constants.d.ts.map +1 -0
  51. package/dist/store/in-memory/in-memory-state.d.ts +0 -4
  52. package/dist/store/in-memory/in-memory-state.d.ts.map +1 -1
  53. package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
  54. package/dist/store/in-memory/types.d.ts +1 -2
  55. package/dist/store/in-memory/types.d.ts.map +1 -1
  56. package/dist/store/index.d.ts +2 -1
  57. package/dist/store/index.d.ts.map +1 -1
  58. package/dist/store/lost-write.d.ts +8 -8
  59. package/dist/store/lost-write.d.ts.map +1 -1
  60. package/dist/store/lost-write.types.d.ts +1 -1
  61. package/dist/store/lost-write.types.d.ts.map +1 -1
  62. package/dist/store/{engine/project-key.d.ts → project-key.d.ts} +0 -5
  63. package/dist/store/project-key.d.ts.map +1 -0
  64. package/dist/store/resolve-store.d.ts +6 -18
  65. package/dist/store/resolve-store.d.ts.map +1 -1
  66. package/dist/store/sqlite/adapter/in-process-link.constants.d.ts +12 -0
  67. package/dist/store/sqlite/adapter/in-process-link.constants.d.ts.map +1 -0
  68. package/dist/store/sqlite/adapter/in-process-link.d.ts +1 -1
  69. package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -1
  70. package/dist/store/sqlite/adapter/sqlite-connector.d.ts +12 -11
  71. package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -1
  72. package/dist/store/sqlite/adapter/sqlite-connector.types.d.ts +7 -0
  73. package/dist/store/sqlite/adapter/sqlite-connector.types.d.ts.map +1 -0
  74. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -3
  75. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -1
  76. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +12 -1
  77. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -1
  78. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +2 -2
  79. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -1
  80. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +1 -1
  81. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -1
  82. package/dist/store/sqlite/engine/engine.types.d.ts +2 -2
  83. package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -1
  84. package/dist/store/sqlite/engine/schema.d.ts.map +1 -1
  85. package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -1
  86. package/dist/store/{hub-public.d.ts → sqlite/hub-public.d.ts} +9 -9
  87. package/dist/store/sqlite/hub-public.d.ts.map +1 -0
  88. package/dist/store/sqlite/packaging/engine-packaging.constants.d.ts +15 -0
  89. package/dist/store/sqlite/packaging/engine-packaging.constants.d.ts.map +1 -0
  90. package/dist/store/sqlite/runtime/close-engine.d.ts +5 -2
  91. package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -1
  92. package/dist/store/sqlite/runtime/engine-control-loop.d.ts +11 -0
  93. package/dist/store/sqlite/runtime/engine-control-loop.d.ts.map +1 -0
  94. package/dist/store/sqlite/runtime/install-pool.d.ts +1 -1
  95. package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -1
  96. package/dist/store/sqlite/runtime/progress-beat.d.ts +1 -1
  97. package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -1
  98. package/dist/store/sqlite/runtime/runtime.types.d.ts +7 -4
  99. package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -1
  100. package/dist/store/sqlite/runtime/serve-sqlite-engine.d.ts +9 -0
  101. package/dist/store/sqlite/runtime/serve-sqlite-engine.d.ts.map +1 -0
  102. package/dist/store/sqlite/runtime/serve-sqlite-engine.types.d.ts +27 -0
  103. package/dist/store/sqlite/runtime/serve-sqlite-engine.types.d.ts.map +1 -0
  104. package/dist/store/sqlite/served/client/check-engine-wire.d.ts.map +1 -0
  105. package/dist/store/{engine → sqlite/served}/client/client.constants.d.ts +3 -3
  106. package/dist/store/sqlite/served/client/client.constants.d.ts.map +1 -0
  107. package/dist/store/{engine → sqlite/served}/client/client.types.d.ts +13 -8
  108. package/dist/store/sqlite/served/client/client.types.d.ts.map +1 -0
  109. package/dist/store/{engine → sqlite/served}/client/engine-client.d.ts +1 -1
  110. package/dist/store/sqlite/served/client/engine-client.d.ts.map +1 -0
  111. package/dist/store/sqlite/served/client/engine-control.d.ts.map +1 -0
  112. package/dist/store/sqlite/served/client/heartbeat-watch.d.ts.map +1 -0
  113. package/dist/store/{engine → sqlite/served}/client/hub-connector.d.ts +1 -1
  114. package/dist/store/sqlite/served/client/hub-connector.d.ts.map +1 -0
  115. package/dist/store/{engine → sqlite/served}/client/hub-connector.types.d.ts +6 -7
  116. package/dist/store/sqlite/served/client/hub-connector.types.d.ts.map +1 -0
  117. package/dist/store/sqlite/served/client/worker-connector.d.ts.map +1 -0
  118. package/dist/store/sqlite/served/creation-refusal.d.ts.map +1 -0
  119. package/dist/store/sqlite/served/dialecte-refusal.d.ts +19 -0
  120. package/dist/store/sqlite/served/dialecte-refusal.d.ts.map +1 -0
  121. package/dist/store/sqlite/served/engine-lock.d.ts +6 -0
  122. package/dist/store/sqlite/served/engine-lock.d.ts.map +1 -0
  123. package/dist/store/sqlite/served/engine-store.constants.d.ts +3 -0
  124. package/dist/store/sqlite/served/engine-store.constants.d.ts.map +1 -0
  125. package/dist/store/{engine → sqlite/served}/engine-store.d.ts +6 -6
  126. package/dist/store/sqlite/served/engine-store.d.ts.map +1 -0
  127. package/dist/store/sqlite/served/engine-store.types.d.ts.map +1 -0
  128. package/dist/store/sqlite/served/engine.constants.d.ts.map +1 -0
  129. package/dist/store/{engine → sqlite/served}/engine.types.d.ts +2 -4
  130. package/dist/store/sqlite/served/engine.types.d.ts.map +1 -0
  131. package/dist/store/sqlite/served/host/changed.d.ts +5 -0
  132. package/dist/store/sqlite/served/host/changed.d.ts.map +1 -0
  133. package/dist/store/sqlite/served/host/engine-wire.d.ts.map +1 -0
  134. package/dist/store/{engine → sqlite/served}/host/heartbeat.d.ts +1 -1
  135. package/dist/store/sqlite/served/host/heartbeat.d.ts.map +1 -0
  136. package/dist/store/sqlite/served/host/host.constants.d.ts.map +1 -0
  137. package/dist/store/{engine → sqlite/served}/host/host.types.d.ts +4 -3
  138. package/dist/store/sqlite/served/host/host.types.d.ts.map +1 -0
  139. package/dist/store/sqlite/served/host/store-events.constants.d.ts +9 -0
  140. package/dist/store/sqlite/served/host/store-events.constants.d.ts.map +1 -0
  141. package/dist/store/sqlite/served/host/store-events.d.ts.map +1 -0
  142. package/dist/store/sqlite/served/hub/hub-client.constants.d.ts.map +1 -0
  143. package/dist/store/sqlite/served/hub/hub-client.d.ts.map +1 -0
  144. package/dist/store/{engine → sqlite/served}/hub/hub-client.types.d.ts +2 -9
  145. package/dist/store/sqlite/served/hub/hub-client.types.d.ts.map +1 -0
  146. package/dist/store/sqlite/served/hub/hub-protocol.types.d.ts.map +1 -0
  147. package/dist/store/sqlite/served/hub/hub-router.d.ts.map +1 -0
  148. package/dist/store/sqlite/served/hub/hub-shell.d.ts.map +1 -0
  149. package/dist/store/sqlite/served/hub/hub-shell.types.d.ts.map +1 -0
  150. package/dist/store/{engine → sqlite/served}/hub/hub.constants.d.ts +3 -3
  151. package/dist/store/sqlite/served/hub/hub.constants.d.ts.map +1 -0
  152. package/dist/store/{engine → sqlite/served}/hub/hub.types.d.ts +2 -2
  153. package/dist/store/sqlite/served/hub/hub.types.d.ts.map +1 -0
  154. package/dist/store/sqlite/served/hub/hub.worker.d.ts.map +1 -0
  155. package/dist/store/sqlite/served/hub/realm-host.d.ts.map +1 -0
  156. package/dist/store/{engine → sqlite/served}/hub/realm-host.types.d.ts +3 -3
  157. package/dist/store/sqlite/served/hub/realm-host.types.d.ts.map +1 -0
  158. package/dist/store/sqlite/served/wire/error-envelope.d.ts.map +1 -0
  159. package/dist/store/sqlite/served/wire/wire-values.d.ts.map +1 -0
  160. package/dist/store/sqlite/served/wire/wire.constants.d.ts.map +1 -0
  161. package/dist/store/{engine → sqlite/served}/wire/wire.types.d.ts +1 -1
  162. package/dist/store/sqlite/served/wire/wire.types.d.ts.map +1 -0
  163. package/dist/store/sqlite/sqlite-connector-params.d.ts +13 -0
  164. package/dist/store/sqlite/sqlite-connector-params.d.ts.map +1 -0
  165. package/dist/store/sqlite/sqlite-engine-registration.d.ts +30 -0
  166. package/dist/store/sqlite/sqlite-engine-registration.d.ts.map +1 -0
  167. package/dist/store/sqlite/sqlite-error-entry.d.ts +10 -0
  168. package/dist/store/sqlite/sqlite-error-entry.d.ts.map +1 -0
  169. package/dist/store/sqlite/sqlite-errors.constants.d.ts +110 -0
  170. package/dist/store/sqlite/sqlite-errors.constants.d.ts.map +1 -0
  171. package/dist/store/sqlite/sqlite-errors.types.d.ts +7 -0
  172. package/dist/store/sqlite/sqlite-errors.types.d.ts.map +1 -0
  173. package/dist/store/sqlite/sqlite-storage-kind.constants.d.ts +10 -0
  174. package/dist/store/sqlite/sqlite-storage-kind.constants.d.ts.map +1 -0
  175. package/dist/store/sqlite/sqlite-storage-kind.d.ts +3 -0
  176. package/dist/store/sqlite/sqlite-storage-kind.d.ts.map +1 -0
  177. package/dist/store/sqlite/sqlite-storage.constants.d.ts +24 -0
  178. package/dist/store/sqlite/sqlite-storage.constants.d.ts.map +1 -0
  179. package/dist/store/sqlite/sqlite-storage.types.d.ts +27 -0
  180. package/dist/store/sqlite/sqlite-storage.types.d.ts.map +1 -0
  181. package/dist/store/sqlite/sqlite-store-of.d.ts +8 -3
  182. package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -1
  183. package/dist/store/storage-kinds.constants.d.ts +16 -0
  184. package/dist/store/storage-kinds.constants.d.ts.map +1 -0
  185. package/dist/store/storage-kinds.d.ts +43 -0
  186. package/dist/store/storage-kinds.d.ts.map +1 -0
  187. package/dist/store/storage-kinds.types.d.ts +46 -0
  188. package/dist/store/storage-kinds.types.d.ts.map +1 -0
  189. package/dist/store/store.types.d.ts +6 -4
  190. package/dist/store/store.types.d.ts.map +1 -1
  191. package/dist/test/assert-xml/assert-xml.d.ts +4 -2
  192. package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
  193. package/dist/test/assert-xml/index.d.ts +1 -0
  194. package/dist/test/assert-xml/index.d.ts.map +1 -1
  195. package/dist/test/assert-xml/xml-assertion-error.d.ts +8 -0
  196. package/dist/test/assert-xml/xml-assertion-error.d.ts.map +1 -0
  197. package/dist/test/create-test-dialecte.constants.d.ts +4 -0
  198. package/dist/test/create-test-dialecte.constants.d.ts.map +1 -0
  199. package/dist/test/create-test-dialecte.d.ts.map +1 -1
  200. package/dist/test/indexeddb-storage.setup.d.ts +1 -0
  201. package/dist/test/indexeddb-storage.setup.d.ts.map +1 -0
  202. package/dist/test/test-storage/index.d.ts +1 -1
  203. package/dist/test/test-storage/index.d.ts.map +1 -1
  204. package/dist/test/test-storage/sqlite-test-store.d.ts +15 -0
  205. package/dist/test/test-storage/sqlite-test-store.d.ts.map +1 -0
  206. package/dist/test/test-storage/test-storage.types.d.ts +12 -0
  207. package/dist/test/test-storage/test-storage.types.d.ts.map +1 -1
  208. package/dist/test/test-storage/test-store-for.d.ts +18 -6
  209. package/dist/test/test-storage/test-store-for.d.ts.map +1 -1
  210. package/dist/test/test-storage/test-store-providers.constants.d.ts +8 -0
  211. package/dist/test/test-storage/test-store-providers.constants.d.ts.map +1 -0
  212. package/dist/test/test-storage/test-store-providers.d.ts +11 -0
  213. package/dist/test/test-storage/test-store-providers.d.ts.map +1 -0
  214. package/dist/test.js +805 -765
  215. package/dist/{utils-USNkj4sT.js → utils-Cv4oHia0.js} +63 -137
  216. package/dist/utils.js +1 -1
  217. package/package.json +40 -8
  218. package/skills/dialecte/SKILL.md +8 -6
  219. package/skills/dialecte/references/api.json +93 -66
  220. package/skills/dialecte/references/api.md +463 -461
  221. package/skills/dialecte/references/core-api.md +42 -15
  222. package/skills/dialecte/references/testing.md +167 -11
  223. package/skills/dialecte-contributing/SKILL.md +1 -1
  224. package/skills/dialecte-contributing/references/code-rules.md +7 -0
  225. package/skills/dialecte-contributing/references/landing-changes.md +4 -4
  226. package/skills/dialecte-lot/SKILL.md +67 -28
  227. package/skills/dialecte-lot/references/briefs.md +30 -6
  228. package/skills/dialecte-lot/references/standard-check.md +2 -2
  229. package/skills/dialecte-lot/references/stations.md +5 -3
  230. package/dist/assets/hub.worker-B1HcVDhn.js +0 -2
  231. package/dist/engine.constants-DBMjMmV9.js +0 -98
  232. package/dist/engine.d.ts +0 -9
  233. package/dist/engine.d.ts.map +0 -1
  234. package/dist/running-operations-vnijBvn7.js +0 -76
  235. package/dist/store/engine/client/check-engine-wire.d.ts.map +0 -1
  236. package/dist/store/engine/client/client.constants.d.ts.map +0 -1
  237. package/dist/store/engine/client/client.types.d.ts.map +0 -1
  238. package/dist/store/engine/client/engine-client.d.ts.map +0 -1
  239. package/dist/store/engine/client/engine-control.d.ts.map +0 -1
  240. package/dist/store/engine/client/heartbeat-watch.d.ts.map +0 -1
  241. package/dist/store/engine/client/hub-connector.d.ts.map +0 -1
  242. package/dist/store/engine/client/hub-connector.types.d.ts.map +0 -1
  243. package/dist/store/engine/client/worker-connector.d.ts.map +0 -1
  244. package/dist/store/engine/creation-refusal.d.ts.map +0 -1
  245. package/dist/store/engine/dialecte-refusal.d.ts +0 -18
  246. package/dist/store/engine/dialecte-refusal.d.ts.map +0 -1
  247. package/dist/store/engine/engine-store.d.ts.map +0 -1
  248. package/dist/store/engine/engine-store.types.d.ts.map +0 -1
  249. package/dist/store/engine/engine.constants.d.ts.map +0 -1
  250. package/dist/store/engine/engine.types.d.ts.map +0 -1
  251. package/dist/store/engine/host/engine-wire.d.ts.map +0 -1
  252. package/dist/store/engine/host/heartbeat.d.ts.map +0 -1
  253. package/dist/store/engine/host/host.constants.d.ts.map +0 -1
  254. package/dist/store/engine/host/host.types.d.ts.map +0 -1
  255. package/dist/store/engine/host/store-events.d.ts.map +0 -1
  256. package/dist/store/engine/hub/hub-client.constants.d.ts.map +0 -1
  257. package/dist/store/engine/hub/hub-client.d.ts.map +0 -1
  258. package/dist/store/engine/hub/hub-client.types.d.ts.map +0 -1
  259. package/dist/store/engine/hub/hub-protocol.types.d.ts.map +0 -1
  260. package/dist/store/engine/hub/hub-router.d.ts.map +0 -1
  261. package/dist/store/engine/hub/hub-shell.d.ts.map +0 -1
  262. package/dist/store/engine/hub/hub-shell.types.d.ts.map +0 -1
  263. package/dist/store/engine/hub/hub.constants.d.ts.map +0 -1
  264. package/dist/store/engine/hub/hub.types.d.ts.map +0 -1
  265. package/dist/store/engine/hub/hub.worker.d.ts.map +0 -1
  266. package/dist/store/engine/hub/realm-host.d.ts.map +0 -1
  267. package/dist/store/engine/hub/realm-host.types.d.ts.map +0 -1
  268. package/dist/store/engine/project-key.d.ts.map +0 -1
  269. package/dist/store/engine/wire/error-envelope.d.ts.map +0 -1
  270. package/dist/store/engine/wire/wire-values.d.ts.map +0 -1
  271. package/dist/store/engine/wire/wire.constants.d.ts.map +0 -1
  272. package/dist/store/engine/wire/wire.types.d.ts.map +0 -1
  273. package/dist/store/hub-public.d.ts.map +0 -1
  274. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +0 -16
  275. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +0 -1
  276. package/dist/store/sqlite-storage.constants.d.ts +0 -14
  277. package/dist/store/sqlite-storage.constants.d.ts.map +0 -1
  278. package/dist/store/sqlite-storage.d.ts +0 -22
  279. package/dist/store/sqlite-storage.d.ts.map +0 -1
  280. package/dist/store/sqlite-storage.types.d.ts +0 -24
  281. package/dist/store/sqlite-storage.types.d.ts.map +0 -1
  282. package/dist/test/test-dialecte.worker.d.ts +0 -2
  283. package/dist/test/test-dialecte.worker.d.ts.map +0 -1
  284. /package/dist/store/{engine → sqlite/served}/client/check-engine-wire.d.ts +0 -0
  285. /package/dist/store/{engine → sqlite/served}/client/engine-control.d.ts +0 -0
  286. /package/dist/store/{engine → sqlite/served}/client/heartbeat-watch.d.ts +0 -0
  287. /package/dist/store/{engine → sqlite/served}/client/worker-connector.d.ts +0 -0
  288. /package/dist/store/{engine → sqlite/served}/creation-refusal.d.ts +0 -0
  289. /package/dist/store/{engine → sqlite/served}/engine-store.types.d.ts +0 -0
  290. /package/dist/store/{engine → sqlite/served}/engine.constants.d.ts +0 -0
  291. /package/dist/store/{engine → sqlite/served}/host/engine-wire.d.ts +0 -0
  292. /package/dist/store/{engine → sqlite/served}/host/host.constants.d.ts +0 -0
  293. /package/dist/store/{engine → sqlite/served}/host/store-events.d.ts +0 -0
  294. /package/dist/store/{engine → sqlite/served}/hub/hub-client.constants.d.ts +0 -0
  295. /package/dist/store/{engine → sqlite/served}/hub/hub-client.d.ts +0 -0
  296. /package/dist/store/{engine → sqlite/served}/hub/hub-protocol.types.d.ts +0 -0
  297. /package/dist/store/{engine → sqlite/served}/hub/hub-router.d.ts +0 -0
  298. /package/dist/store/{engine → sqlite/served}/hub/hub-shell.d.ts +0 -0
  299. /package/dist/store/{engine → sqlite/served}/hub/hub-shell.types.d.ts +0 -0
  300. /package/dist/store/{engine → sqlite/served}/hub/hub.worker.d.ts +0 -0
  301. /package/dist/store/{engine → sqlite/served}/hub/realm-host.d.ts +0 -0
  302. /package/dist/store/{engine → sqlite/served}/wire/error-envelope.d.ts +0 -0
  303. /package/dist/store/{engine → sqlite/served}/wire/wire-values.d.ts +0 -0
  304. /package/dist/store/{engine → sqlite/served}/wire/wire.constants.d.ts +0 -0
@@ -78,7 +78,7 @@
78
78
  "report a caught error as a dialecte error without throwing",
79
79
  "build the Error throwDialecteError would throw"
80
80
  ],
81
- "declaredAt": "src/errors/errors.ts:41"
81
+ "declaredAt": "src/errors/errors.ts:43"
82
82
  },
83
83
  {
84
84
  "path": "@dialecte/core.createPerf",
@@ -99,16 +99,15 @@
99
99
  "entry": "@dialecte/core",
100
100
  "otherRoutes": [],
101
101
  "signature": "<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericConfigKey extends string = string>(params: CreateProjectFactoryParams<GenericConfig, GenericModules, GenericConfigKey>) => ProjectFactory<GenericConfig, GenericModules, GenericConfigKey>",
102
- "summary": "The project factory of a dialecte: every config, the default key, the dialecte's extensions merged under the consumer's, and a fresh hooks instance per Project. It carries the declaration, `engineUrl`, the address of the dialecte's engine worker, for the store that spawns it, and `spawner`, the engine as a page registers it with the hub (`connectHub({ spawners })`). `destroyProject({ name })` deletes the dialecte's project of that name on SQLite storage without opening it (an outdated or lost one too).",
102
+ "summary": "The project factory of a dialecte: every config, the default key, the dialecte's extensions merged under the consumer's, and a fresh hooks instance per Project. It carries the declaration and names no store: each Project it makes opens on the `storage` given to it, core's own or a kind an entry registers (SQLite storage with `@dialecte/core/sqlite`, whose page tells once where its engine worker is). `destroyProject({ name, storage })` deletes the dialecte's project of that name on that storage without opening it (one a store cannot open too).",
103
103
  "intents": [
104
104
  "open projects of a dialecte from an app",
105
105
  "get the factory that creates a dialecte's projects",
106
106
  "delete a dialecte's project without opening it",
107
- "register a dialecte's engine with the hub",
108
- "use SQLite storage in an app (import `@dialecte/core/sqlite` once and open with `storage: { type: 'sqlite' }`)",
107
+ "use SQLite storage in an app (register the app's engine with `registerSqliteEngine` from `@dialecte/core/sqlite` and open with `storage: { type: 'sqlite' }`)",
109
108
  "share one SQLite engine per project between the tabs of an app"
110
109
  ],
111
- "declaredAt": "src/dialecte/create-project-factory.ts:24"
110
+ "declaredAt": "src/dialecte/create-project-factory.ts:23"
112
111
  },
113
112
  {
114
113
  "path": "@dialecte/core.defineDialecte",
@@ -116,7 +115,7 @@
116
115
  "entry": "@dialecte/core",
117
116
  "otherRoutes": [],
118
117
  "signature": "<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericConfigKey extends string = string>(params: DefineDialecteParams<GenericConfig, GenericModules, GenericConfigKey>) => DialecteDeclaration<GenericConfig, GenericModules, GenericConfigKey>",
119
- "summary": "Declare a dialecte once: its identity, its configs, its extensions and how its hooks are made. Core derives the rest: `createProjectFactory`, `createTestRunner`, `createTestProject` and, in a worker, the engine. The declaration is frozen.",
118
+ "summary": "Declare a dialecte once: its identity, its configs, its extensions and how its hooks are made. Core derives the rest: `createProjectFactory`, `createTestRunner`, `createTestProject` and what a store serving it elsewhere runs (SQLite's engine worker). The declaration is frozen.",
120
119
  "intents": [
121
120
  "declare a dialecte package",
122
121
  "register a dialecte's configs and extensions and hooks once",
@@ -135,7 +134,7 @@
135
134
  "declare a dialecte's own error catalogue",
136
135
  "add error keys usable with invariant and throwDialecteError"
137
136
  ],
138
- "declaredAt": "src/errors/errors.ts:71"
137
+ "declaredAt": "src/errors/errors.ts:73"
139
138
  },
140
139
  {
141
140
  "path": "@dialecte/core.importOutcomeOf",
@@ -245,6 +244,20 @@
245
244
  ],
246
245
  "declaredAt": "src/store/store.constants.ts:37"
247
246
  },
247
+ {
248
+ "path": "@dialecte/core.registerStorageKind",
249
+ "root": "export",
250
+ "entry": "@dialecte/core",
251
+ "otherRoutes": [],
252
+ "signature": "<GenericType extends RegistrableStorageType>(params: { type: GenericType; kind: StorageKind<GenericType>; }) => void",
253
+ "summary": "Register the store a storage type gets, for every copy of `@dialecte/core` of the same storage version in this realm: a project opened on `{ type }` gets the store `kind.storeOf` builds, a test project the one `kind.testStoreOf` answers (or the storage as it is, without it). The type is first declared by a module augmentation (`declare module '@dialecte/core' { interface StorageKinds { <type>: { type: '<type>'; ... } } }`), then registered once, by the entry that brings the kind (importing it is the app's opt-in). The first registration of a type is kept: the same `kind.id` again does nothing (a module evaluated twice, another copy of the package); another `id` is refused `STORE_KIND_TAKEN`, nothing replaced. Core's own types (`local`, `inMemory`, `custom`) are refused `ASSERTION_FAILED`: core serves them, no kind takes their place.",
254
+ "intents": [
255
+ "add a storage kind to core",
256
+ "register a store a project opens on by its storage type",
257
+ "write a package that brings its own storage"
258
+ ],
259
+ "declaredAt": "src/store/storage-kinds.ts:19"
260
+ },
248
261
  {
249
262
  "path": "@dialecte/core.removeUnfinishedImports",
250
263
  "root": "export",
@@ -312,7 +325,7 @@
312
325
  "fail with a core or dialecte error key",
313
326
  "raise an error a consumer can read by key"
314
327
  ],
315
- "declaredAt": "src/errors/errors.ts:28",
328
+ "declaredAt": "src/errors/errors.ts:30",
316
329
  "example": "throwDialecteError('ELEMENT_NOT_FOUND', { detail: 'parent not found' })"
317
330
  },
318
331
  {
@@ -341,20 +354,6 @@
341
354
  ],
342
355
  "declaredAt": "src/store/write-outcome.ts:32"
343
356
  },
344
- {
345
- "path": "@dialecte/core/engine.serveDialecteEngine",
346
- "root": "export",
347
- "entry": "@dialecte/core/engine",
348
- "otherRoutes": [],
349
- "signature": "<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules, GenericConfigKey extends string>(params: { dialecte: DialecteDeclaration<GenericConfig, GenericModules, GenericConfigKey>; }) => void",
350
- "summary": "Serve the dialecte's project engine from this worker, the one call of a dialecte package's engine worker file - today the SQLite engine on the origin's private file system (opfs-sahpool). The realm that spawned it (or the hub, through it) sends control messages - open the project, adopt a client's port, a client gone, close, destroy - handled one at a time and each answered once; every adopted port is served the engine's members. One project per worker.",
351
- "intents": [
352
- "serve a dialecte's engine from a worker",
353
- "write a dialecte package's engine worker file",
354
- "ship a dialecte's SQLite engine in its package"
355
- ],
356
- "declaredAt": "src/store/sqlite/runtime/serve-dialecte-engine.ts:42"
357
- },
358
357
  {
359
358
  "path": "@dialecte/core/helpers.evaluateExpectations",
360
359
  "root": "export",
@@ -610,28 +609,27 @@
610
609
  "entry": "@dialecte/core/sqlite",
611
610
  "otherRoutes": [],
612
611
  "signature": "(params: { port: MessagePort; }) => Promise<HubRealm | undefined>",
613
- "summary": "Join the hub through a port a page made with `createHubPort` (a document that cannot reach the hub's script), and get that document's connection: a client only, whose liveness is that page's. A port nobody answers fails the join `STORE_CONNECTION_FAILED` once the welcome budget has passed. A document that connected already gets its connection - `undefined` when that one found no hub. One the hub dropped with its page (its calls refused `STORE_ENGINE_LOST`, `realm-dropped`) joins again on the new port, on its own: the page makes it one from `onRejoined`, and a join that fails leaves it dropped until the next one.",
612
+ "summary": "Join the hub through a port a page made with `createHubPort` (a document that cannot reach the hub's script), and get that document's connection: a client only, whose liveness is that page's. A port nobody answers fails the join `STORE_CONNECTION_FAILED` once the welcome budget has passed. A document that connected already gets its connection - `undefined` when that one found no hub. One the hub dropped with its page (its calls refused `STORE_CONNECTION_LOST`, `realm-dropped`) joins again on the new port, on its own: the page makes it one from `onRejoined`, and a join that fails leaves it dropped until the next one.",
614
613
  "intents": [
615
614
  "join the hub from an iframe of another origin",
616
615
  "open projects on SQLite storage in a child frame through its page's engine",
617
616
  "bind a child frame again after its page rejoined the hub"
618
617
  ],
619
- "declaredAt": "src/store/hub-public.ts:55"
618
+ "declaredAt": "src/store/sqlite/hub-public.ts:45"
620
619
  },
621
620
  {
622
621
  "path": "@dialecte/core/sqlite.connectHub",
623
622
  "root": "export",
624
623
  "entry": "@dialecte/core/sqlite",
625
624
  "otherRoutes": [],
626
- "signature": "(params?: ConnectHubParams) => Promise<HubRealm | undefined>",
627
- "summary": "Connect this page to the origin's hub, once, and get its connection (`HubRealm`: `realmId`, `createHubPort` to bind a child frame, `onRejoined`, the moment to bind child frames again after a freeze or a drop): a second call - from this copy of the library or another one of the same protocol - gets the same connection. Answers `undefined` where the browser has no SharedWorker, or the hub never welcomed the page (its script failed to load or was blocked, or it stayed silent): a later call tries again. A hub of another protocol refuses the page: `STORE_PROTOCOL_MISMATCH`; the browser refusing to make the hub's worker (a `DOMException`) is no hub, any other error thrown making it is thrown. The page registers the engines it can start whose worker is of its own origin (each dialecte's `factory.spawner`); a later call adds those it does not run yet - a project opened on `sqlite` adds its own as it opens - and one naming a dialecte the page runs at another version is refused `STORE_HUB_SPAWNERS_FIXED`, the connection kept. A document that joined through `adoptHubPort` hosts no engine: the spawners it names are not registered; neither are those of a page that cannot store (no private file system; two versions of one dialecte refused all the same): its own projects on `sqlite` are refused `STORE_UNAVAILABLE` unless its page bound it, its connection serving to hand ports to its children. An engine's files (the SQLite wasm) are fetched when the page first starts one.",
625
+ "signature": "() => Promise<HubRealm | undefined>",
626
+ "summary": "Connect this page to the origin's hub, once, and get its connection (`HubRealm`: `realmId`, `createHubPort` to bind a child frame, `onRejoined`, the moment to bind child frames again after a freeze or a drop): a second call - from this copy of the library or another one of the same protocol - gets the same connection. Answers `undefined` where the browser has no SharedWorker, or the hub never welcomed the page (its script failed to load or was blocked, or it stayed silent): a later call tries again. A hub of another protocol refuses the page: `STORE_PROTOCOL_MISMATCH`; the browser refusing to make the hub's worker (a `DOMException`) is no hub, any other error thrown making it is thrown. The page offers the hub the engines the app registered (`registerSqliteEngine`), one per dialecte on the one worker file, when that file is of its own origin; connecting before registering is allowed and offers nothing - a later call adds those registered since, as a project opened on `sqlite` does - so register first. A document that joined through `adoptHubPort` hosts no engine and offers none; neither does a page that cannot store (no private file system): its own projects on `sqlite` are refused `STORE_UNAVAILABLE` unless its page bound it, its connection serving to hand ports to its children. An engine's files (the SQLite wasm) are fetched when the page first starts one.",
628
627
  "intents": [
629
- "register this page's dialecte engines with the hub before any project opens",
630
- "connect a page to the origin's hub",
631
- "offer a dialecte's engine to the hub (`factory.spawner`)",
628
+ "connect a page to the origin's hub before any project opens",
629
+ "offer the engines an app registered to the hub",
632
630
  "get a port to hand a child frame of another origin"
633
631
  ],
634
- "declaredAt": "src/store/hub-public.ts:25"
632
+ "declaredAt": "src/store/sqlite/hub-public.ts:25"
635
633
  },
636
634
  {
637
635
  "path": "@dialecte/core/sqlite.listProjects",
@@ -648,18 +646,47 @@
648
646
  ],
649
647
  "declaredAt": "src/store/sqlite/list-projects.ts:33"
650
648
  },
649
+ {
650
+ "path": "@dialecte/core/sqlite.registerSqliteEngine",
651
+ "root": "export",
652
+ "entry": "@dialecte/core/sqlite",
653
+ "otherRoutes": [],
654
+ "signature": "(params: SqliteEngineRegistration) => void",
655
+ "summary": "Tell this page where the app's SQLite engine is: `url`, its one worker file (a `?worker&url` import of the file that calls `serveSqliteEngine`), and `dialectes`, the dialectes that file serves (their declarations fit; only each id and version are kept, as plain data on the realm's `globalThis`, so every copy of the library of the same SQLite storage version finds them). Call it once, before the first project opens on `sqlite`; a project of a dialecte it does not name is refused `PROJECT_SQLITE_ENGINE_NOT_REGISTERED`. The same URL and the same dialectes again, in any order, do nothing (a module evaluated twice). Anything else is refused `STORE_SQLITE_ENGINE_FIXED`, the first kept: there is no additive call, the app names all its dialectes at once. Two versions of one dialecte are refused `STORE_HUB_SPAWNERS_FIXED`, nothing kept. A child frame of another origin does not register: its shell does, and it joins through `adoptHubPort`.",
656
+ "intents": [
657
+ "use SQLite storage in an app",
658
+ "tell the page where an app's SQLite engine worker is",
659
+ "register the dialectes an app's engine worker serves",
660
+ "open projects of several dialectes on one SQLite engine worker"
661
+ ],
662
+ "declaredAt": "src/store/sqlite/sqlite-engine-registration.ts:21"
663
+ },
664
+ {
665
+ "path": "@dialecte/core/sqlite.serveSqliteEngine",
666
+ "root": "export",
667
+ "entry": "@dialecte/core/sqlite",
668
+ "otherRoutes": [],
669
+ "signature": "(params: ServeSqliteEngineParams) => void",
670
+ "summary": "This worker serves the engine of a project of any of the dialectes given, the one call of an app's engine worker file: the realm that spawned it (or the hub, through it) opens a project of the dialecte it names, adopts clients, closes and destroys it, each message answered once. A dialecte not given, or given at another version, is refused as data with nothing touched. One worker file for all the app's dialectes, one project per worker instance; the engine and its wasm stay out of the page's bundle.",
671
+ "intents": [
672
+ "serve the engines of an app's dialectes from one worker",
673
+ "write an app's engine worker file",
674
+ "keep sqlite-wasm out of the page's bundle"
675
+ ],
676
+ "declaredAt": "src/sqlite.ts:51"
677
+ },
651
678
  {
652
679
  "path": "@dialecte/core/test.assertExpectedElementQueries",
653
680
  "root": "export",
654
681
  "entry": "@dialecte/core/test",
655
682
  "otherRoutes": [],
656
683
  "signature": "(params: XmlQueriesWithNamespacesParams) => void",
657
- "summary": "Asserts that each XPath query selects at least one node of the XML text, parsed once for all of them. A failure names the steps that matched, the step that failed, where the last match sits, what the failing step finds there without its predicates, and the XML around it.",
684
+ "summary": "Asserts that each XPath query selects at least one node of the XML text, parsed once for all of them. A failure names the steps that matched, the step that failed, where the last match sits, what the failing step finds there without its predicates, and the XML around it. A query that selects nothing throws an `XmlAssertionError`.",
658
685
  "intents": [
659
686
  "assert that XML holds the elements XPath queries select",
660
687
  "check that an export holds an element"
661
688
  ],
662
- "declaredAt": "src/test/assert-xml/assert-xml.ts:47"
689
+ "declaredAt": "src/test/assert-xml/assert-xml.ts:49"
663
690
  },
664
691
  {
665
692
  "path": "@dialecte/core/test.assertUnexpectedElementQueries",
@@ -667,12 +694,12 @@
667
694
  "entry": "@dialecte/core/test",
668
695
  "otherRoutes": [],
669
696
  "signature": "(params: XmlQueriesWithNamespacesParams) => void",
670
- "summary": "Asserts that no XPath query selects a node of the XML text, parsed once for all of them.",
697
+ "summary": "Asserts that no XPath query selects a node of the XML text, parsed once for all of them. A query that selects a node throws an `XmlAssertionError`.",
671
698
  "intents": [
672
699
  "assert that XML does not hold an element",
673
700
  "check that an element was removed from an export"
674
701
  ],
675
- "declaredAt": "src/test/assert-xml/assert-xml.ts:61"
702
+ "declaredAt": "src/test/assert-xml/assert-xml.ts:64"
676
703
  },
677
704
  {
678
705
  "path": "@dialecte/core/test.createMockRandomUUID",
@@ -709,7 +736,7 @@
709
736
  "open a project in a test with a fixture imported",
710
737
  "get documents to test against"
711
738
  ],
712
- "declaredAt": "src/test/create-test-dialecte.ts:32"
739
+ "declaredAt": "src/test/create-test-dialecte.ts:33"
713
740
  },
714
741
  {
715
742
  "path": "@dialecte/core/test.createTestRecordFactory",
@@ -748,7 +775,7 @@
748
775
  "make XPath assertions bound to a dialecte's namespaces",
749
776
  "assert exported XML in tests"
750
777
  ],
751
- "declaredAt": "src/test/assert-xml/assert-xml.ts:26"
778
+ "declaredAt": "src/test/assert-xml/assert-xml.ts:27"
752
779
  },
753
780
  {
754
781
  "path": "@dialecte/core/test.createXmlSchemaAssertions",
@@ -1459,7 +1486,7 @@
1459
1486
  "signature": "(documentId: string, file: File, attachedTo?: BlobAttachment[]) => Promise<string>",
1460
1487
  "summary": "Add a blob owned by `documentId`. The binary lives in `blob_{documentId}`. Returns the generated blob id.",
1461
1488
  "intents": ["store a binary file in the project", "add an attachment owned by a document"],
1462
- "declaredAt": "src/project/project.ts:1233"
1489
+ "declaredAt": "src/project/project.ts:1232"
1463
1490
  },
1464
1491
  {
1465
1492
  "path": "project.attachBlob",
@@ -1468,7 +1495,7 @@
1468
1495
  "signature": "(blobId: string, ref: BlobAttachment) => Promise<void>",
1469
1496
  "summary": "Reference an existing blob from an element of a document (optionally from one of its attributes) and tell other tabs.",
1470
1497
  "intents": ["link a stored file to an element", "attach a blob to a record"],
1471
- "declaredAt": "src/project/project.ts:1305"
1498
+ "declaredAt": "src/project/project.ts:1304"
1472
1499
  },
1473
1500
  {
1474
1501
  "path": "project.close",
@@ -1477,7 +1504,7 @@
1477
1504
  "signature": "() => Promise<void>",
1478
1505
  "summary": "Close the store and release resources, once the imports in flight (running and queued), the project's writes running (a Document's transaction or prepared commit included) and the work other realms' messages started have settled. Then the channel and the store are closed, `state.documents` is emptied and the Documents' subscriptions are dropped. From the call on, the project is closed: a new call throws `PROJECT_NOT_OPENED`, a Document opened before answers `STORE_CLOSED` (on a `custom` store opened again it writes but tells nothing: open it again). The stored documents stay. Runs in turn with the Project's other `open`, `close` and `destroy` calls.",
1479
1506
  "intents": ["close a project", "release the database connection when leaving a page"],
1480
- "declaredAt": "src/project/project.ts:747"
1507
+ "declaredAt": "src/project/project.ts:744"
1481
1508
  },
1482
1509
  {
1483
1510
  "path": "project.createChannel",
@@ -1486,7 +1513,7 @@
1486
1513
  "signature": "() => BroadcastChannel",
1487
1514
  "summary": "Convenience: a fresh BroadcastChannel on this project's channel. The caller owns it — call channel.close() when done listening.",
1488
1515
  "intents": ["listen to project events", "receive commits and imports made in other tabs"],
1489
- "declaredAt": "src/project/project.ts:254"
1516
+ "declaredAt": "src/project/project.ts:253"
1490
1517
  },
1491
1518
  {
1492
1519
  "path": "project.destroy",
@@ -1495,7 +1522,7 @@
1495
1522
  "signature": "() => Promise<void>",
1496
1523
  "summary": "Destroy the project - deletes the database entirely, every document with its history and blobs, once the imports in flight have landed; refused `PROJECT_OPEN_ELSEWHERE`, nothing removed, while another connection - a project or store of the name, in this page or another tab - has it open. To delete one document, use `removeDocument`.",
1497
1524
  "intents": ["delete a whole project", "wipe the project database with every document"],
1498
- "declaredAt": "src/project/project.ts:811"
1525
+ "declaredAt": "src/project/project.ts:808"
1499
1526
  },
1500
1527
  {
1501
1528
  "path": "project.detachBlob",
@@ -1504,7 +1531,7 @@
1504
1531
  "signature": "(blobId: string, ref: { documentId: string; recordRef: string; }) => Promise<void>",
1505
1532
  "summary": "Drop the reference from an element of a document to a blob; the blob itself stays stored.",
1506
1533
  "intents": ["unlink a file from an element", "detach a blob from a record"],
1507
- "declaredAt": "src/project/project.ts:1317"
1534
+ "declaredAt": "src/project/project.ts:1316"
1508
1535
  },
1509
1536
  {
1510
1537
  "path": "project.export",
@@ -1519,7 +1546,7 @@
1519
1546
  "save a document as XML",
1520
1547
  "read the exported XML as a DOM"
1521
1548
  ],
1522
- "declaredAt": "src/project/project.ts:1051"
1549
+ "declaredAt": "src/project/project.ts:1049"
1523
1550
  },
1524
1551
  {
1525
1552
  "path": "project.exportBlob",
@@ -1532,7 +1559,7 @@
1532
1559
  "save a blob to disk",
1533
1560
  "read a blob with its file name"
1534
1561
  ],
1535
- "declaredAt": "src/project/project.ts:1269"
1562
+ "declaredAt": "src/project/project.ts:1268"
1536
1563
  },
1537
1564
  {
1538
1565
  "path": "project.getBlob",
@@ -1541,7 +1568,7 @@
1541
1568
  "signature": "(blobId: string) => Promise<{ entry: BlobRecord; data: Blob; } | undefined>",
1542
1569
  "summary": "Read a stored blob: its metadata entry and its binary data, or `undefined` when the id is unknown.",
1543
1570
  "intents": ["read an attached file's content", "load a blob by id"],
1544
- "declaredAt": "src/project/project.ts:1259"
1571
+ "declaredAt": "src/project/project.ts:1258"
1545
1572
  },
1546
1573
  {
1547
1574
  "path": "project.getBlobsByDocument",
@@ -1550,7 +1577,7 @@
1550
1577
  "signature": "(documentId: string) => Promise<BlobRecord[]>",
1551
1578
  "summary": "The blobs referenced from a document (any of their attachments points into it).",
1552
1579
  "intents": ["list the files attached to a document"],
1553
- "declaredAt": "src/project/project.ts:1278"
1580
+ "declaredAt": "src/project/project.ts:1277"
1554
1581
  },
1555
1582
  {
1556
1583
  "path": "project.getBlobsByRecord",
@@ -1559,14 +1586,14 @@
1559
1586
  "signature": "(documentId: string, recordRef: string) => Promise<BlobRecord[]>",
1560
1587
  "summary": "The blobs referenced from one element of a document.",
1561
1588
  "intents": ["list the files attached to one element"],
1562
- "declaredAt": "src/project/project.ts:1287"
1589
+ "declaredAt": "src/project/project.ts:1286"
1563
1590
  },
1564
1591
  {
1565
1592
  "path": "project.getDatabaseInstance",
1566
1593
  "root": "project",
1567
1594
  "otherRoutes": [],
1568
1595
  "signature": "() => ReturnType<GenericStore['getDatabaseInstance']>",
1569
- "summary": "Expose the store's own database object, for debugging: the Dexie instance on `local` (cast it: the type is the store's, `unknown` unless the Project's store type is given), `null` on `sqlite` and `inMemory`.",
1596
+ "summary": "Expose the store's own database object, for debugging: the Dexie instance on `local` (cast it: the type is the store's, `unknown` unless the Project's store type is given), `null` on `inMemory` and on a store with no such object.",
1570
1597
  "intents": ["inspect the underlying database", "debug what the store holds"],
1571
1598
  "declaredAt": "src/project/project.ts:1422"
1572
1599
  },
@@ -1577,7 +1604,7 @@
1577
1604
  "signature": "(documentId: string) => Promise<DocumentRecord | undefined>",
1578
1605
  "summary": "The metadata record of one document of the project, or `undefined` when it is unknown or still importing.",
1579
1606
  "intents": ["check a document exists", "read a document's name or config key by id"],
1580
- "declaredAt": "src/project/project.ts:1082"
1607
+ "declaredAt": "src/project/project.ts:1081"
1581
1608
  },
1582
1609
  {
1583
1610
  "path": "project.getDocumentConfig",
@@ -1586,7 +1613,7 @@
1586
1613
  "signature": "(documentId: string) => GenericConfig | undefined",
1587
1614
  "summary": "Get the dialecte config a document uses, or `undefined` for a document the project does not know.",
1588
1615
  "intents": ["get the dialecte config of a document", "know which schema a document uses"],
1589
- "declaredAt": "src/project/project.ts:1167"
1616
+ "declaredAt": "src/project/project.ts:1166"
1590
1617
  },
1591
1618
  {
1592
1619
  "path": "project.getDocuments",
@@ -1595,7 +1622,7 @@
1595
1622
  "signature": "() => Promise<DocumentRecord[]>",
1596
1623
  "summary": "The documents of the project; one still importing - here or in another realm - is not among them.",
1597
1624
  "intents": ["list the documents of a project", "show the files a project holds"],
1598
- "declaredAt": "src/project/project.ts:1073"
1625
+ "declaredAt": "src/project/project.ts:1071"
1599
1626
  },
1600
1627
  {
1601
1628
  "path": "project.getDocumentStatus",
@@ -1607,7 +1634,7 @@
1607
1634
  "check that a document imported in another tab can be opened",
1608
1635
  "wait for a document from another realm"
1609
1636
  ],
1610
- "declaredAt": "src/project/project.ts:1154"
1637
+ "declaredAt": "src/project/project.ts:1153"
1611
1638
  },
1612
1639
  {
1613
1640
  "path": "project.getStandaloneBlobs",
@@ -1616,28 +1643,28 @@
1616
1643
  "signature": "() => Promise<BlobRecord[]>",
1617
1644
  "summary": "The blobs of the project that no document references (no attachment).",
1618
1645
  "intents": ["list unattached files", "find orphan blobs to clean up"],
1619
- "declaredAt": "src/project/project.ts:1296"
1646
+ "declaredAt": "src/project/project.ts:1295"
1620
1647
  },
1621
1648
  {
1622
1649
  "path": "project.import",
1623
1650
  "root": "project",
1624
1651
  "otherRoutes": [],
1625
1652
  "signature": "(files: File[], options?: ImportFilesOptions) => Promise<ImportEntry[]>",
1626
- "summary": "Import Files into the project: one entry per file, in the order given. The files are imported one after the other - memory is bounded by one file's batches, the registry sees one import - and a file that fails is its own `failed` entry, the next file still attempted: nothing of a failed file lands (but an import whose engine was lost after it landed: see `importFile`). The call itself rejects only for what is about the call: an unknown `configKey`, a project not open, a `path` (`DOCUMENT_PATH_INVALID`: a path names one file, `importFile` takes it).",
1653
+ "summary": "Import Files into the project: one entry per file, in the order given. The files are imported one after the other - memory is bounded by one file's batches, the registry sees one import - and a file that fails is its own `failed` entry, the next file still attempted: nothing of a failed file lands (but an import whose connection was lost after it landed: see `importFile`). The call itself rejects only for what is about the call: an unknown `configKey`, a project not open, a `path` (`DOCUMENT_PATH_INVALID`: a path names one file, `importFile` takes it).",
1627
1654
  "intents": [
1628
1655
  "import several XML files at once",
1629
1656
  "get one result per file without a throw for a failed file"
1630
1657
  ],
1631
- "declaredAt": "src/project/project.ts:898"
1658
+ "declaredAt": "src/project/project.ts:895"
1632
1659
  },
1633
1660
  {
1634
1661
  "path": "project.importFile",
1635
1662
  "root": "project",
1636
1663
  "otherRoutes": [],
1637
1664
  "signature": "(file: File, options?: ImportDocumentOptions) => Promise<ImportedDocument>",
1638
- "summary": "Import one File into the project: the store registers, parses and stores it next to the data. The document is in the project state and broadcast once the store answers it `ready`; whatever fails before that, or an abort through `options.signal`, leaves nothing and is thrown (`PARSE_ERROR` for a malformed file, `IMPORT_ABORTED`, `IMPORT_FAILED` wrapping a foreign error). One refusal leaves its document: an import whose engine was lost after it landed is refused `STORE_ENGINE_LOST`, `meta.outcome` `applied`, its document in the state and broadcast. `options.onProgress` is told after each stored batch, never awaited. One file is in flight per project: a call made while another import runs waits for it.",
1665
+ "summary": "Import one File into the project: the store registers, parses and stores it next to the data. The document is in the project state and broadcast once the store answers it `ready`; whatever fails before that, or an abort through `options.signal`, leaves nothing and is thrown (`PARSE_ERROR` for a malformed file, `IMPORT_ABORTED`, `IMPORT_FAILED` wrapping a foreign error). One refusal leaves its document: an import whose connection was lost after it landed is refused `STORE_CONNECTION_LOST`, `meta.outcome` `applied`, its document in the state and broadcast. `options.onProgress` is told after each stored batch, never awaited. One file is in flight per project: a call made while another import runs waits for it.",
1639
1666
  "intents": ["import an XML file", "load a file into the project", "parse XML into records"],
1640
- "declaredAt": "src/project/project.ts:939"
1667
+ "declaredAt": "src/project/project.ts:937"
1641
1668
  },
1642
1669
  {
1643
1670
  "path": "project.initEmptyDocument",
@@ -1646,7 +1673,7 @@
1646
1673
  "signature": "(options?: InitEmptyDocumentOptions) => Promise<string>",
1647
1674
  "summary": "Register a new empty document in the project. Returns the new documentId. Records are added later via import or transactions.",
1648
1675
  "intents": ["create a new empty document", "start a document from scratch without a file"],
1649
- "declaredAt": "src/project/project.ts:834"
1676
+ "declaredAt": "src/project/project.ts:831"
1650
1677
  },
1651
1678
  {
1652
1679
  "path": "project.open",
@@ -1659,7 +1686,7 @@
1659
1686
  "start working on a project",
1660
1687
  "reopen a project after close"
1661
1688
  ],
1662
- "declaredAt": "src/project/project.ts:510"
1689
+ "declaredAt": "src/project/project.ts:507"
1663
1690
  },
1664
1691
  {
1665
1692
  "path": "project.openDocument",
@@ -1668,7 +1695,7 @@
1668
1695
  "signature": "(documentId: string) => Document<GenericConfig, MergedExtensions<GenericModules>>",
1669
1696
  "summary": "Open a file-scoped Document for querying and mutating a specific file.",
1670
1697
  "intents": ["open a document to read or write it", "get the Document of an id"],
1671
- "declaredAt": "src/project/project.ts:1094"
1698
+ "declaredAt": "src/project/project.ts:1093"
1672
1699
  },
1673
1700
  {
1674
1701
  "path": "project.queryAll",
@@ -1677,7 +1704,7 @@
1677
1704
  "signature": "<Result>(queryFunction: (query: Query<GenericConfig> & QueryExtensions<MergedExtensions<GenericModules>>) => Promise<Result[]>) => Promise<Result[]>",
1678
1705
  "summary": "Run a query function across all documents, collect and flatten results. Iterates documents sequentially; merges all non-empty arrays.",
1679
1706
  "intents": ["collect results from every document", "run one query over all documents"],
1680
- "declaredAt": "src/project/project.ts:1365"
1707
+ "declaredAt": "src/project/project.ts:1364"
1681
1708
  },
1682
1709
  {
1683
1710
  "path": "project.queryFirst",
@@ -1689,7 +1716,7 @@
1689
1716
  "find the first match across every document",
1690
1717
  "search all documents of a project"
1691
1718
  ],
1692
- "declaredAt": "src/project/project.ts:1344"
1719
+ "declaredAt": "src/project/project.ts:1343"
1693
1720
  },
1694
1721
  {
1695
1722
  "path": "project.redo",
@@ -1698,7 +1725,7 @@
1698
1725
  "signature": "(documentId: string) => Promise<void>",
1699
1726
  "summary": "Re-apply the last undone transaction of a document and tell other tabs. Does nothing when there is nothing to redo.",
1700
1727
  "intents": ["redo an undone change to a document"],
1701
- "declaredAt": "src/project/project.ts:1206"
1728
+ "declaredAt": "src/project/project.ts:1205"
1702
1729
  },
1703
1730
  {
1704
1731
  "path": "project.removeBlob",
@@ -1707,7 +1734,7 @@
1707
1734
  "signature": "(blobId: string) => Promise<void>",
1708
1735
  "summary": "Delete a blob and its binary data from the project and tell other tabs. Does nothing when the id is unknown.",
1709
1736
  "intents": ["delete a stored file", "remove a blob for good"],
1710
- "declaredAt": "src/project/project.ts:1329"
1737
+ "declaredAt": "src/project/project.ts:1328"
1711
1738
  },
1712
1739
  {
1713
1740
  "path": "project.removeDocument",
@@ -1716,7 +1743,7 @@
1716
1743
  "signature": "(documentId: string) => Promise<void>",
1717
1744
  "summary": "Remove one document from the project - its records, history and blobs - and tell other tabs. The other documents stay.",
1718
1745
  "intents": ["delete a document from the project", "remove one file and its records"],
1719
- "declaredAt": "src/project/project.ts:863"
1746
+ "declaredAt": "src/project/project.ts:860"
1720
1747
  },
1721
1748
  {
1722
1749
  "path": "project.undo",
@@ -1725,7 +1752,7 @@
1725
1752
  "signature": "(documentId: string) => Promise<void>",
1726
1753
  "summary": "Revert the last committed transaction of a document and tell other tabs. Does nothing when there is nothing to undo.",
1727
1754
  "intents": ["undo the last change to a document", "roll back a commit"],
1728
- "declaredAt": "src/project/project.ts:1180"
1755
+ "declaredAt": "src/project/project.ts:1179"
1729
1756
  },
1730
1757
  {
1731
1758
  "path": "tx.addChild",