@noy-db/hub 0.2.0-pre.5 → 0.2.0-pre.7

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 (258) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.js +4 -4
  3. package/dist/attestation/index.cjs.map +1 -1
  4. package/dist/attestation/index.d.cts +4 -4
  5. package/dist/attestation/index.d.ts +4 -4
  6. package/dist/attestation/index.js +6 -6
  7. package/dist/blobs/index.cjs.map +1 -1
  8. package/dist/blobs/index.d.cts +5 -5
  9. package/dist/blobs/index.d.ts +5 -5
  10. package/dist/blobs/index.js +5 -5
  11. package/dist/bundle/index.cjs +379 -21
  12. package/dist/bundle/index.cjs.map +1 -1
  13. package/dist/bundle/index.d.cts +6 -6
  14. package/dist/bundle/index.d.ts +6 -6
  15. package/dist/bundle/index.js +12 -12
  16. package/dist/{chunk-E225X5CQ.js → chunk-22ESLVUM.js} +3 -3
  17. package/dist/{chunk-5QPF2MJ5.js → chunk-2TXMTYWZ.js} +3 -3
  18. package/dist/{chunk-BT7544RM.js → chunk-3O5FNO5O.js} +116 -54
  19. package/dist/chunk-3O5FNO5O.js.map +1 -0
  20. package/dist/{chunk-34XGYMQT.js → chunk-3XCXUJTM.js} +2 -2
  21. package/dist/{chunk-XDW37COG.js → chunk-4EOVWJL6.js} +212 -7
  22. package/dist/chunk-4EOVWJL6.js.map +1 -0
  23. package/dist/{chunk-KGFV72WK.js → chunk-4YVVF6JN.js} +5 -5
  24. package/dist/{chunk-UGVDIOY7.js → chunk-6ILPGZXZ.js} +2 -2
  25. package/dist/{chunk-DFCINPB5.js → chunk-6MXGU2PW.js} +2 -2
  26. package/dist/{chunk-Y3P5DEMZ.js → chunk-7IH5FDXD.js} +6 -6
  27. package/dist/{chunk-2GMRNNI3.js → chunk-ASFE2X62.js} +2 -2
  28. package/dist/{chunk-YZ6JETII.js → chunk-AYRTGXF3.js} +180 -5
  29. package/dist/chunk-AYRTGXF3.js.map +1 -0
  30. package/dist/{chunk-CCC25PA7.js → chunk-BE5ZALMB.js} +5 -5
  31. package/dist/{chunk-WEA4TDTJ.js → chunk-BNUCCUES.js} +3 -3
  32. package/dist/{chunk-PS5G6A3Y.js → chunk-BRZFN354.js} +4 -4
  33. package/dist/{chunk-RIHZBSWJ.js → chunk-CBHPW77B.js} +3 -3
  34. package/dist/{chunk-LWFQYT4N.js → chunk-CSHY53CZ.js} +2 -2
  35. package/dist/{chunk-MDIC4FAU.js → chunk-DCP4L4SH.js} +2 -2
  36. package/dist/{chunk-TNBIWSQ7.js → chunk-GI6S5ZF2.js} +2 -2
  37. package/dist/{chunk-G26QAQNI.js → chunk-GZIDTXC4.js} +2 -2
  38. package/dist/{chunk-ARZAHCCF.js → chunk-HNC55FLJ.js} +3 -3
  39. package/dist/{chunk-SGSHQ4PH.js → chunk-HNFXKQD7.js} +5 -5
  40. package/dist/{chunk-YEHUEUNP.js → chunk-JZDA2SRB.js} +4 -4
  41. package/dist/{chunk-PX3MJ6RB.js → chunk-KK44CQ5B.js} +3 -3
  42. package/dist/{chunk-OPD3PZOG.js → chunk-LSY46G55.js} +4 -4
  43. package/dist/{chunk-T6MTNGBM.js → chunk-N4CDTRDH.js} +4 -4
  44. package/dist/{chunk-ZQMYB56Z.js → chunk-O3JCRQT3.js} +3 -3
  45. package/dist/{chunk-LJO6Q3X6.js → chunk-OA6HE2RW.js} +3 -3
  46. package/dist/{chunk-HIELMTUK.js → chunk-OIF6LZUR.js} +2 -2
  47. package/dist/{chunk-YJ46RFCD.js → chunk-OXCFFRF3.js} +2 -2
  48. package/dist/{chunk-ED3E3OLO.js → chunk-PJKGXUMG.js} +2 -2
  49. package/dist/{chunk-6A4AMQ2H.js → chunk-QYO6I7KK.js} +4 -4
  50. package/dist/{chunk-6HJ2ZALB.js → chunk-REQJJIPP.js} +44 -2
  51. package/dist/chunk-REQJJIPP.js.map +1 -0
  52. package/dist/{chunk-7TX7HN42.js → chunk-SLJQIBT7.js} +20 -3
  53. package/dist/chunk-SLJQIBT7.js.map +1 -0
  54. package/dist/{chunk-A4JNVBPF.js → chunk-SYOSRZN4.js} +5 -5
  55. package/dist/{chunk-R4LTCI6O.js → chunk-TS4FQPDD.js} +2 -2
  56. package/dist/{chunk-ICH4AIGL.js → chunk-TV3YZ35S.js} +5 -1
  57. package/dist/chunk-TV3YZ35S.js.map +1 -0
  58. package/dist/{chunk-CKH247ZR.js → chunk-UPBZ7NVY.js} +4 -4
  59. package/dist/{chunk-XVJFFGTG.js → chunk-VZOZ3DBN.js} +3 -3
  60. package/dist/{chunk-5VMTAX4Y.js → chunk-W6EQLGMB.js} +2 -2
  61. package/dist/{chunk-JSYTGEX4.js → chunk-WBUG3324.js} +3 -3
  62. package/dist/{chunk-5OVIFUQE.js → chunk-WIRRPTFH.js} +1 -1
  63. package/dist/chunk-WIRRPTFH.js.map +1 -0
  64. package/dist/{chunk-25WFLKOH.js → chunk-WM5GFORS.js} +2 -2
  65. package/dist/{chunk-CGJFCT3X.js → chunk-WMKCAN4H.js} +2 -2
  66. package/dist/{chunk-R7JTYCRX.js → chunk-XZCBBZLS.js} +2 -2
  67. package/dist/{chunk-EKTOYEZ3.js → chunk-YAMTXW77.js} +2 -2
  68. package/dist/consent/index.cjs.map +1 -1
  69. package/dist/consent/index.d.cts +5 -5
  70. package/dist/consent/index.d.ts +5 -5
  71. package/dist/consent/index.js +3 -3
  72. package/dist/{crypto-5UDZZL26.js → crypto-TRZ5BJMY.js} +3 -3
  73. package/dist/{delegation-42LO4WFO.js → delegation-TLZTK2XW.js} +5 -5
  74. package/dist/derivations/index.cjs.map +1 -1
  75. package/dist/derivations/index.d.cts +6 -6
  76. package/dist/derivations/index.d.ts +6 -6
  77. package/dist/derivations/index.js +4 -4
  78. package/dist/{dev-unlock--ahUTrhc.d.ts → dev-unlock-ClAEZQC4.d.ts} +1 -1
  79. package/dist/{dev-unlock-BIwt2V3p.d.cts → dev-unlock-L3z34v0J.d.cts} +1 -1
  80. package/dist/executor-HAVRTQN4.js +11 -0
  81. package/dist/executor-V3DKOADS.js +8 -0
  82. package/dist/executor-XO4M4243.js +8 -0
  83. package/dist/{fanout-sidecar-EVICRM46.js → fanout-sidecar-OKPMMPLG.js} +2 -2
  84. package/dist/guards/index.cjs.map +1 -1
  85. package/dist/guards/index.d.cts +6 -6
  86. package/dist/guards/index.d.ts +6 -6
  87. package/dist/guards/index.js +3 -3
  88. package/dist/{hash-CJEFQxSD.d.ts → hash-B3lV6lw3.d.ts} +1 -1
  89. package/dist/{hash-BQVrGV-t.d.cts → hash-M6-JI3Yu.d.cts} +1 -1
  90. package/dist/history/index.cjs.map +1 -1
  91. package/dist/history/index.d.cts +6 -6
  92. package/dist/history/index.d.ts +6 -6
  93. package/dist/history/index.js +5 -5
  94. package/dist/i18n/index.cjs +75 -10
  95. package/dist/i18n/index.cjs.map +1 -1
  96. package/dist/i18n/index.d.cts +5 -5
  97. package/dist/i18n/index.d.ts +5 -5
  98. package/dist/i18n/index.js +15 -13
  99. package/dist/{index-fIPPh5dg.d.ts → index-CmWQyC4e.d.ts} +84 -7
  100. package/dist/{index-5I0MZ0jQ.d.cts → index-vB43MAt4.d.cts} +84 -7
  101. package/dist/index.cjs +516 -123
  102. package/dist/index.cjs.map +1 -1
  103. package/dist/index.d.cts +13 -13
  104. package/dist/index.d.ts +13 -13
  105. package/dist/index.js +66 -60
  106. package/dist/index.js.map +1 -1
  107. package/dist/indexing/index.cjs +4 -0
  108. package/dist/indexing/index.cjs.map +1 -1
  109. package/dist/indexing/index.d.cts +3 -3
  110. package/dist/indexing/index.d.ts +3 -3
  111. package/dist/indexing/index.js +4 -4
  112. package/dist/issue-EJKUQ6FA.js +12 -0
  113. package/dist/{lazy-builder-D1MyR1qH.d.ts → lazy-builder-7tIpFyWN.d.ts} +1 -1
  114. package/dist/{lazy-builder-DXlSCNCJ.d.cts → lazy-builder-wY4pMCEe.d.cts} +1 -1
  115. package/dist/{ledger-UX4QIHWI.js → ledger-SQVVE2DR.js} +5 -5
  116. package/dist/materialized-views/index.cjs +18 -1
  117. package/dist/materialized-views/index.cjs.map +1 -1
  118. package/dist/materialized-views/index.d.cts +10 -8
  119. package/dist/materialized-views/index.d.ts +10 -8
  120. package/dist/materialized-views/index.js +12 -12
  121. package/dist/noydb-MK4UQ626.js +34 -0
  122. package/dist/overlay-views/index.cjs.map +1 -1
  123. package/dist/overlay-views/index.d.cts +6 -6
  124. package/dist/overlay-views/index.d.ts +6 -6
  125. package/dist/overlay-views/index.js +6 -6
  126. package/dist/periods/index.cjs.map +1 -1
  127. package/dist/periods/index.d.cts +5 -5
  128. package/dist/periods/index.d.ts +5 -5
  129. package/dist/periods/index.js +5 -5
  130. package/dist/{predicate-B0IKeBXx.d.cts → predicate-BSAGEyu5.d.cts} +26 -2
  131. package/dist/{predicate-B0IKeBXx.d.ts → predicate-BSAGEyu5.d.ts} +26 -2
  132. package/dist/{public-envelope-YKHKP74C.js → public-envelope-BXPXMN3U.js} +4 -4
  133. package/dist/query/index.cjs +244 -4
  134. package/dist/query/index.cjs.map +1 -1
  135. package/dist/query/index.d.cts +2 -2
  136. package/dist/query/index.d.ts +2 -2
  137. package/dist/query/index.js +12 -6
  138. package/dist/{registry-4NEW7LQY.js → registry-4R4IURUM.js} +3 -3
  139. package/dist/registry-GPBLCHG7.js +8 -0
  140. package/dist/registry-ZON5HNIV.js +8 -0
  141. package/dist/{revoke-R5NIQ74J.js → revoke-Y7UDOXGH.js} +6 -6
  142. package/dist/session/index.cjs.map +1 -1
  143. package/dist/session/index.d.cts +6 -6
  144. package/dist/session/index.d.ts +6 -6
  145. package/dist/session/index.js +3 -3
  146. package/dist/shadow/index.cjs.map +1 -1
  147. package/dist/shadow/index.d.cts +5 -5
  148. package/dist/shadow/index.d.ts +5 -5
  149. package/dist/shadow/index.js +2 -2
  150. package/dist/{signer-WGDJNWSU.js → signer-UD2ZSVDJ.js} +5 -5
  151. package/dist/snapshots/index.cjs +903 -0
  152. package/dist/snapshots/index.cjs.map +1 -0
  153. package/dist/snapshots/index.d.cts +21 -0
  154. package/dist/snapshots/index.d.ts +21 -0
  155. package/dist/snapshots/index.js +118 -0
  156. package/dist/snapshots/index.js.map +1 -0
  157. package/dist/{stale-74WGLVZ2.js → stale-F4V5E7ZK.js} +2 -2
  158. package/dist/store/index.cjs.map +1 -1
  159. package/dist/store/index.d.cts +5 -5
  160. package/dist/store/index.d.ts +5 -5
  161. package/dist/store/index.js +2 -2
  162. package/dist/sync/index.cjs.map +1 -1
  163. package/dist/sync/index.d.cts +4 -4
  164. package/dist/sync/index.d.ts +4 -4
  165. package/dist/sync/index.js +4 -4
  166. package/dist/team/index.cjs.map +1 -1
  167. package/dist/team/index.d.cts +5 -5
  168. package/dist/team/index.d.ts +5 -5
  169. package/dist/team/index.js +8 -8
  170. package/dist/tx/index.cjs.map +1 -1
  171. package/dist/tx/index.d.cts +5 -5
  172. package/dist/tx/index.d.ts +5 -5
  173. package/dist/tx/index.js +3 -3
  174. package/dist/{types-BV4AZKmx.d.ts → types-DT7cXRHq.d.ts} +84 -8
  175. package/dist/{types-BeKi0hCx.d.cts → types-r-y7TIqj.d.cts} +84 -8
  176. package/dist/{ulid-Cvljl7ZZ.d.cts → ulid-BkW3mLlz.d.cts} +1 -1
  177. package/dist/{ulid-CQc0eBxE.d.ts → ulid-Dt55yn4s.d.ts} +1 -1
  178. package/dist/util/index.cjs.map +1 -1
  179. package/dist/util/index.js +1 -1
  180. package/dist/{with-derivation-BkOBDhsu.d.cts → with-derivation-DB63Po2m.d.cts} +1 -1
  181. package/dist/{with-derivation-BWcwmevt.d.ts → with-derivation-D_Ids_H6.d.ts} +1 -1
  182. package/dist/{with-guard-BD4Hyu8s.d.cts → with-guard-BHThLppa.d.cts} +1 -1
  183. package/dist/{with-guard-Du54s3Ti.d.ts → with-guard-BJwdc0s6.d.ts} +1 -1
  184. package/dist/{with-materialized-view-BCPPZdjC.d.cts → with-materialized-view-BJmJ-FrO.d.cts} +1 -1
  185. package/dist/{with-materialized-view-B5W4wFAC.d.ts → with-materialized-view-D-CRVSDX.d.ts} +1 -1
  186. package/dist/{with-overlayed-view-Cw-h9p9N.d.ts → with-overlayed-view-CNf6GbDG.d.ts} +1 -1
  187. package/dist/{with-overlayed-view-B8RrlLsG.d.cts → with-overlayed-view-zePNtUSq.d.cts} +1 -1
  188. package/package.json +13 -3
  189. package/dist/chunk-5OVIFUQE.js.map +0 -1
  190. package/dist/chunk-6HJ2ZALB.js.map +0 -1
  191. package/dist/chunk-7TX7HN42.js.map +0 -1
  192. package/dist/chunk-BT7544RM.js.map +0 -1
  193. package/dist/chunk-ICH4AIGL.js.map +0 -1
  194. package/dist/chunk-NONMIU6C.js +0 -118
  195. package/dist/chunk-NONMIU6C.js.map +0 -1
  196. package/dist/chunk-XDW37COG.js.map +0 -1
  197. package/dist/chunk-YZ6JETII.js.map +0 -1
  198. package/dist/executor-AWCHQ2KN.js +0 -8
  199. package/dist/executor-RWICJI7J.js +0 -11
  200. package/dist/executor-SOLEQVUB.js +0 -8
  201. package/dist/issue-IODMTPME.js +0 -12
  202. package/dist/noydb-6TADQIYH.js +0 -34
  203. package/dist/registry-446I2NMN.js +0 -8
  204. package/dist/registry-524KJZG4.js +0 -8
  205. /package/dist/{chunk-E225X5CQ.js.map → chunk-22ESLVUM.js.map} +0 -0
  206. /package/dist/{chunk-5QPF2MJ5.js.map → chunk-2TXMTYWZ.js.map} +0 -0
  207. /package/dist/{chunk-34XGYMQT.js.map → chunk-3XCXUJTM.js.map} +0 -0
  208. /package/dist/{chunk-KGFV72WK.js.map → chunk-4YVVF6JN.js.map} +0 -0
  209. /package/dist/{chunk-UGVDIOY7.js.map → chunk-6ILPGZXZ.js.map} +0 -0
  210. /package/dist/{chunk-DFCINPB5.js.map → chunk-6MXGU2PW.js.map} +0 -0
  211. /package/dist/{chunk-Y3P5DEMZ.js.map → chunk-7IH5FDXD.js.map} +0 -0
  212. /package/dist/{chunk-2GMRNNI3.js.map → chunk-ASFE2X62.js.map} +0 -0
  213. /package/dist/{chunk-CCC25PA7.js.map → chunk-BE5ZALMB.js.map} +0 -0
  214. /package/dist/{chunk-WEA4TDTJ.js.map → chunk-BNUCCUES.js.map} +0 -0
  215. /package/dist/{chunk-PS5G6A3Y.js.map → chunk-BRZFN354.js.map} +0 -0
  216. /package/dist/{chunk-RIHZBSWJ.js.map → chunk-CBHPW77B.js.map} +0 -0
  217. /package/dist/{chunk-LWFQYT4N.js.map → chunk-CSHY53CZ.js.map} +0 -0
  218. /package/dist/{chunk-MDIC4FAU.js.map → chunk-DCP4L4SH.js.map} +0 -0
  219. /package/dist/{chunk-TNBIWSQ7.js.map → chunk-GI6S5ZF2.js.map} +0 -0
  220. /package/dist/{chunk-G26QAQNI.js.map → chunk-GZIDTXC4.js.map} +0 -0
  221. /package/dist/{chunk-ARZAHCCF.js.map → chunk-HNC55FLJ.js.map} +0 -0
  222. /package/dist/{chunk-SGSHQ4PH.js.map → chunk-HNFXKQD7.js.map} +0 -0
  223. /package/dist/{chunk-YEHUEUNP.js.map → chunk-JZDA2SRB.js.map} +0 -0
  224. /package/dist/{chunk-PX3MJ6RB.js.map → chunk-KK44CQ5B.js.map} +0 -0
  225. /package/dist/{chunk-OPD3PZOG.js.map → chunk-LSY46G55.js.map} +0 -0
  226. /package/dist/{chunk-T6MTNGBM.js.map → chunk-N4CDTRDH.js.map} +0 -0
  227. /package/dist/{chunk-ZQMYB56Z.js.map → chunk-O3JCRQT3.js.map} +0 -0
  228. /package/dist/{chunk-LJO6Q3X6.js.map → chunk-OA6HE2RW.js.map} +0 -0
  229. /package/dist/{chunk-HIELMTUK.js.map → chunk-OIF6LZUR.js.map} +0 -0
  230. /package/dist/{chunk-YJ46RFCD.js.map → chunk-OXCFFRF3.js.map} +0 -0
  231. /package/dist/{chunk-ED3E3OLO.js.map → chunk-PJKGXUMG.js.map} +0 -0
  232. /package/dist/{chunk-6A4AMQ2H.js.map → chunk-QYO6I7KK.js.map} +0 -0
  233. /package/dist/{chunk-A4JNVBPF.js.map → chunk-SYOSRZN4.js.map} +0 -0
  234. /package/dist/{chunk-R4LTCI6O.js.map → chunk-TS4FQPDD.js.map} +0 -0
  235. /package/dist/{chunk-CKH247ZR.js.map → chunk-UPBZ7NVY.js.map} +0 -0
  236. /package/dist/{chunk-XVJFFGTG.js.map → chunk-VZOZ3DBN.js.map} +0 -0
  237. /package/dist/{chunk-5VMTAX4Y.js.map → chunk-W6EQLGMB.js.map} +0 -0
  238. /package/dist/{chunk-JSYTGEX4.js.map → chunk-WBUG3324.js.map} +0 -0
  239. /package/dist/{chunk-25WFLKOH.js.map → chunk-WM5GFORS.js.map} +0 -0
  240. /package/dist/{chunk-CGJFCT3X.js.map → chunk-WMKCAN4H.js.map} +0 -0
  241. /package/dist/{chunk-R7JTYCRX.js.map → chunk-XZCBBZLS.js.map} +0 -0
  242. /package/dist/{chunk-EKTOYEZ3.js.map → chunk-YAMTXW77.js.map} +0 -0
  243. /package/dist/{crypto-5UDZZL26.js.map → crypto-TRZ5BJMY.js.map} +0 -0
  244. /package/dist/{delegation-42LO4WFO.js.map → delegation-TLZTK2XW.js.map} +0 -0
  245. /package/dist/{executor-AWCHQ2KN.js.map → executor-HAVRTQN4.js.map} +0 -0
  246. /package/dist/{executor-RWICJI7J.js.map → executor-V3DKOADS.js.map} +0 -0
  247. /package/dist/{executor-SOLEQVUB.js.map → executor-XO4M4243.js.map} +0 -0
  248. /package/dist/{fanout-sidecar-EVICRM46.js.map → fanout-sidecar-OKPMMPLG.js.map} +0 -0
  249. /package/dist/{issue-IODMTPME.js.map → issue-EJKUQ6FA.js.map} +0 -0
  250. /package/dist/{ledger-UX4QIHWI.js.map → ledger-SQVVE2DR.js.map} +0 -0
  251. /package/dist/{noydb-6TADQIYH.js.map → noydb-MK4UQ626.js.map} +0 -0
  252. /package/dist/{public-envelope-YKHKP74C.js.map → public-envelope-BXPXMN3U.js.map} +0 -0
  253. /package/dist/{registry-446I2NMN.js.map → registry-4R4IURUM.js.map} +0 -0
  254. /package/dist/{registry-4NEW7LQY.js.map → registry-GPBLCHG7.js.map} +0 -0
  255. /package/dist/{registry-524KJZG4.js.map → registry-ZON5HNIV.js.map} +0 -0
  256. /package/dist/{revoke-R5NIQ74J.js.map → revoke-Y7UDOXGH.js.map} +0 -0
  257. /package/dist/{signer-WGDJNWSU.js.map → signer-UD2ZSVDJ.js.map} +0 -0
  258. /package/dist/{stale-74WGLVZ2.js.map → stale-F4V5E7ZK.js.map} +0 -0
@@ -1,11 +1,11 @@
1
- import { B as BlobStrategy } from '../types-BeKi0hCx.cjs';
2
- export { p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, s as BLOB_EVICTION_AUDIT_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, x as BlobEvictionEntry, y as BlobFieldPolicy, z as BlobFieldsConfig, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, G as BlobStrategyOpenArgs, H as CompactRunOptions, J as CompactionContext, K as CompactionResult, L as DEFAULT_CHUNK_SIZE, M as EXPORT_AUDIT_COLLECTION, N as ExportBlobsAbortedError, O as ExportBlobsAuditEntry, Q as ExportBlobsHandle, R as ExportBlobsOptions, T as ExportedBlob, U as SlotInfo, V as SlotRecord, W as VersionRecord, X as createExportBlobsHandle, Y as runCompaction } from '../types-BeKi0hCx.cjs';
1
+ import { B as BlobStrategy } from '../types-r-y7TIqj.cjs';
2
+ export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-r-y7TIqj.cjs';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.cjs';
4
- import '../lazy-builder-DXlSCNCJ.cjs';
5
- import '../predicate-B0IKeBXx.cjs';
4
+ import '../lazy-builder-wY4pMCEe.cjs';
5
+ import '../predicate-BSAGEyu5.cjs';
6
6
  import '../strategy-DSTrsZ8t.cjs';
7
7
  import '../strategy-BSxFXGzb.cjs';
8
- import '../index-5I0MZ0jQ.cjs';
8
+ import '../index-vB43MAt4.cjs';
9
9
  import '@noy-db/attestation';
10
10
 
11
11
  /**
@@ -1,11 +1,11 @@
1
- import { B as BlobStrategy } from '../types-BV4AZKmx.js';
2
- export { p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, s as BLOB_EVICTION_AUDIT_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, x as BlobEvictionEntry, y as BlobFieldPolicy, z as BlobFieldsConfig, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, G as BlobStrategyOpenArgs, H as CompactRunOptions, J as CompactionContext, K as CompactionResult, L as DEFAULT_CHUNK_SIZE, M as EXPORT_AUDIT_COLLECTION, N as ExportBlobsAbortedError, O as ExportBlobsAuditEntry, Q as ExportBlobsHandle, R as ExportBlobsOptions, T as ExportedBlob, U as SlotInfo, V as SlotRecord, W as VersionRecord, X as createExportBlobsHandle, Y as runCompaction } from '../types-BV4AZKmx.js';
1
+ import { B as BlobStrategy } from '../types-DT7cXRHq.js';
2
+ export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-DT7cXRHq.js';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.js';
4
- import '../lazy-builder-D1MyR1qH.js';
5
- import '../predicate-B0IKeBXx.js';
4
+ import '../lazy-builder-7tIpFyWN.js';
5
+ import '../predicate-BSAGEyu5.js';
6
6
  import '../strategy-DSTrsZ8t.js';
7
7
  import '../strategy-BSxFXGzb.js';
8
- import '../index-fIPPh5dg.js';
8
+ import '../index-CmWQyC4e.js';
9
9
  import '@noy-db/attestation';
10
10
 
11
11
  /**
@@ -9,17 +9,17 @@ import {
9
9
  detectMagic,
10
10
  detectMimeType,
11
11
  isPreCompressed
12
- } from "../chunk-KGFV72WK.js";
12
+ } from "../chunk-4YVVF6JN.js";
13
13
  import {
14
14
  BLOB_EVICTION_AUDIT_COLLECTION,
15
15
  EXPORT_AUDIT_COLLECTION,
16
16
  ExportBlobsAbortedError,
17
17
  createExportBlobsHandle,
18
18
  runCompaction
19
- } from "../chunk-JSYTGEX4.js";
20
- import "../chunk-5OVIFUQE.js";
21
- import "../chunk-EKTOYEZ3.js";
22
- import "../chunk-6HJ2ZALB.js";
19
+ } from "../chunk-WBUG3324.js";
20
+ import "../chunk-WIRRPTFH.js";
21
+ import "../chunk-YAMTXW77.js";
22
+ import "../chunk-REQJJIPP.js";
23
23
 
24
24
  // src/blobs/active.ts
25
25
  function withBlobs() {
@@ -31,7 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
33
  // src/errors.ts
34
- var NoydbError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, ExportCapabilityError, KeyringExpiredError, ImportCapabilityError, StoreCapabilityError, PrivilegeEscalationError, FieldFrozenError, InvariantError, AmendmentForbiddenError, TierNotGrantedError, ElevationExpiredError, AlreadyElevatedError, TierDemoteDeniedError, DelegationTargetMissingError, ConflictError, LedgerContentionError, BundleVersionConflictError, ValidationError, SchemaValidationError, SchemaUpdateError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, GroupCardinalityError, IndexRequiredError, IndexWriteFailureError, BundleIntegrityError, BundleSealMismatchError, ReservedCollectionNameError, TranslatorNotConfiguredError, BackupLedgerError, BackupCorruptedError, PartitionExtractionError, TransferSealError, AdoptionStateError, AttestationError, JoinTooLargeError, DanglingReferenceError, DerivationCycleError, DerivationOutputShapeError, DerivationCapExceededError, MaterializedViewCycleError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError;
34
+ var NoydbError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, ExportCapabilityError, KeyringExpiredError, ImportCapabilityError, StoreCapabilityError, PrivilegeEscalationError, FieldFrozenError, InvariantError, AmendmentForbiddenError, TierNotGrantedError, ElevationExpiredError, AlreadyElevatedError, TierDemoteDeniedError, DelegationTargetMissingError, ConflictError, LedgerContentionError, BundleVersionConflictError, ValidationError, SchemaValidationError, SchemaUpdateError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, GroupCardinalityError, IndexRequiredError, IndexWriteFailureError, BundleIntegrityError, BundleSealMismatchError, ReservedCollectionNameError, TranslatorNotConfiguredError, BackupLedgerError, BackupCorruptedError, PartitionExtractionError, TransferSealError, AdoptionStateError, AttestationError, JoinTooLargeError, CrossJoinTooLargeError, CrossJoinSourceUnknownError, DanglingReferenceError, DerivationCycleError, DerivationOutputShapeError, DerivationCapExceededError, MaterializedViewCycleError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError;
35
35
  var init_errors = __esm({
36
36
  "src/errors.ts"() {
37
37
  "use strict";
@@ -476,6 +476,34 @@ Resolutions:
476
476
  this.side = opts.side;
477
477
  }
478
478
  };
479
+ CrossJoinTooLargeError = class extends NoydbError {
480
+ target;
481
+ expected;
482
+ limit;
483
+ constructor(opts) {
484
+ super(
485
+ "CROSS_JOIN_TOO_LARGE",
486
+ `crossJoin("${opts.target}"): would produce ${opts.expected} rows, exceeding the limit of ${opts.limit}. Narrow the left side with .where() first, or raise the ceiling with crossJoin("${opts.target}", { ..., maxRows: ${opts.expected} }).`
487
+ );
488
+ this.name = "CrossJoinTooLargeError";
489
+ this.target = opts.target;
490
+ this.expected = opts.expected;
491
+ this.limit = opts.limit;
492
+ }
493
+ };
494
+ CrossJoinSourceUnknownError = class extends NoydbError {
495
+ target;
496
+ leftCollection;
497
+ constructor(target, leftCollection) {
498
+ super(
499
+ "CROSS_JOIN_SOURCE_UNKNOWN",
500
+ `crossJoin("${target}"): collection "${target}" is not known in the vault (cross-joining from "${leftCollection}"). Make sure "${target}" is open in the same vault before executing this query.`
501
+ );
502
+ this.name = "CrossJoinSourceUnknownError";
503
+ this.target = target;
504
+ this.leftCollection = leftCollection;
505
+ }
506
+ };
479
507
  DanglingReferenceError = class extends NoydbError {
480
508
  field;
481
509
  target;
@@ -3471,6 +3499,48 @@ var init_strategy = __esm({
3471
3499
  }
3472
3500
  });
3473
3501
 
3502
+ // src/i18n/core.ts
3503
+ function getAtPath(obj, path) {
3504
+ const arrayIdx = path.indexOf("[].");
3505
+ if (arrayIdx !== -1) {
3506
+ const arrayKey = path.slice(0, arrayIdx);
3507
+ const restPath = path.slice(arrayIdx + 3);
3508
+ const arr = obj[arrayKey];
3509
+ if (!Array.isArray(arr)) return [];
3510
+ return arr.flatMap((item) => {
3511
+ if (!item || typeof item !== "object" || Array.isArray(item)) return [];
3512
+ return getAtPath(item, restPath);
3513
+ });
3514
+ }
3515
+ const dotIdx = path.indexOf(".");
3516
+ if (dotIdx !== -1) {
3517
+ const head = path.slice(0, dotIdx);
3518
+ const rest = path.slice(dotIdx + 1);
3519
+ const nested = obj[head];
3520
+ if (!nested || typeof nested !== "object" || Array.isArray(nested)) return [];
3521
+ return getAtPath(nested, rest);
3522
+ }
3523
+ const val = obj[path];
3524
+ return val !== void 0 ? [val] : [];
3525
+ }
3526
+ function setAtPathInPlace(obj, path, value) {
3527
+ const dotIdx = path.indexOf(".");
3528
+ if (dotIdx !== -1) {
3529
+ const head = path.slice(0, dotIdx);
3530
+ const rest = path.slice(dotIdx + 1);
3531
+ const nested = obj[head];
3532
+ if (!nested || typeof nested !== "object" || Array.isArray(nested)) return;
3533
+ setAtPathInPlace(nested, rest, value);
3534
+ return;
3535
+ }
3536
+ obj[path] = value;
3537
+ }
3538
+ var init_core = __esm({
3539
+ "src/i18n/core.ts"() {
3540
+ "use strict";
3541
+ }
3542
+ });
3543
+
3474
3544
  // src/i18n/strategy.ts
3475
3545
  function notEnabled(op) {
3476
3546
  return new Error(
@@ -3667,6 +3737,10 @@ function evaluateClause(record, clause) {
3667
3737
  return clause.fn(record);
3668
3738
  case "wherePredicate":
3669
3739
  return clause.fn(record, clause.ctx);
3740
+ case "crossJoin":
3741
+ throw new Error(
3742
+ `evaluateClause: 'crossJoin' clauses are expansion primitives and are not evaluated per-record. This is a query planner routing error \u2014 crossJoin clauses must be extracted from the clause list before calling evaluateClause or filterRecords.`
3743
+ );
3670
3744
  case "group":
3671
3745
  if (clause.op === "and") {
3672
3746
  for (const child of clause.clauses) {
@@ -3949,9 +4023,20 @@ var init_strategy4 = __esm({
3949
4023
  });
3950
4024
 
3951
4025
  // src/query/builder.ts
3952
- function executePlanWithSource(source, plan) {
3953
- const { candidates, remainingClauses } = candidateRecords(source, plan.clauses);
3954
- let result = remainingClauses.length === 0 ? [...candidates] : filterRecords(candidates, remainingClauses);
4026
+ function executePlanWithSource(source, plan, joinContext) {
4027
+ const hasCrossJoins = plan.clauses.some((c) => c.type === "crossJoin");
4028
+ let result;
4029
+ if (hasCrossJoins) {
4030
+ if (!joinContext) {
4031
+ throw new Error(
4032
+ `Query.toArray(): plan contains crossJoin clauses but no JoinContext is attached. Use collection.query() instead of new Query() for cross-join support.`
4033
+ );
4034
+ }
4035
+ result = executeClausePipeline(source, plan.clauses, joinContext);
4036
+ } else {
4037
+ const { candidates, remainingClauses } = candidateRecords(source, plan.clauses);
4038
+ result = remainingClauses.length === 0 ? [...candidates] : filterRecords(candidates, remainingClauses);
4039
+ }
3955
4040
  if (plan.orderBy.length > 0) {
3956
4041
  result = sortRecords(result, plan.orderBy);
3957
4042
  }
@@ -4015,6 +4100,74 @@ function filterRecords(records, clauses) {
4015
4100
  }
4016
4101
  return out;
4017
4102
  }
4103
+ function executeClausePipeline(source, clauses, joinContext) {
4104
+ let rel = [...source.snapshot()];
4105
+ let filterBatch = [];
4106
+ for (const clause of clauses) {
4107
+ if (clause.type === "crossJoin") {
4108
+ if (filterBatch.length > 0) {
4109
+ rel = filterRecords(rel, filterBatch);
4110
+ filterBatch = [];
4111
+ }
4112
+ const rightSource = joinContext.resolveSource(clause.target);
4113
+ if (!rightSource) {
4114
+ throw new CrossJoinSourceUnknownError(clause.target, joinContext.leftCollection);
4115
+ }
4116
+ rel = applyCrossJoin(rel, clause, rightSource);
4117
+ } else {
4118
+ filterBatch.push(clause);
4119
+ }
4120
+ }
4121
+ if (filterBatch.length > 0) {
4122
+ rel = filterRecords(rel, filterBatch);
4123
+ }
4124
+ return rel;
4125
+ }
4126
+ function applyCrossJoin(leftRel, clause, rightSource) {
4127
+ const rightRows = rightSource.snapshot();
4128
+ const maxRows = clause.maxRows ?? DEFAULT_CROSS_JOIN_MAX_ROWS;
4129
+ const { as } = clause;
4130
+ if (!clause.on) {
4131
+ const product = leftRel.length * rightRows.length;
4132
+ if (product > maxRows) {
4133
+ throw new CrossJoinTooLargeError({ target: clause.target, expected: product, limit: maxRows });
4134
+ }
4135
+ const expanded2 = [];
4136
+ for (const left of leftRel) {
4137
+ const leftObj = left;
4138
+ for (const right of rightRows) {
4139
+ expanded2.push({ ...leftObj, [as]: right });
4140
+ }
4141
+ }
4142
+ return expanded2;
4143
+ }
4144
+ const expanded = [];
4145
+ let cumulative = 0;
4146
+ for (const left of leftRel) {
4147
+ const callbackResult = clause.on(left);
4148
+ let filteredRight;
4149
+ if (Array.isArray(callbackResult)) {
4150
+ filteredRight = callbackResult;
4151
+ } else {
4152
+ filteredRight = rightRows.filter(
4153
+ callbackResult
4154
+ );
4155
+ }
4156
+ cumulative += filteredRight.length;
4157
+ if (cumulative > maxRows) {
4158
+ throw new CrossJoinTooLargeError({
4159
+ target: clause.target,
4160
+ expected: cumulative,
4161
+ limit: maxRows
4162
+ });
4163
+ }
4164
+ const leftObj = left;
4165
+ for (const right of filteredRight) {
4166
+ expanded.push({ ...leftObj, [as]: right });
4167
+ }
4168
+ }
4169
+ return expanded;
4170
+ }
4018
4171
  function sortRecords(records, orderBy) {
4019
4172
  return [...records].sort((a, b) => {
4020
4173
  for (const { field, direction } of orderBy) {
@@ -4077,6 +4230,16 @@ function serializeClause(clause) {
4077
4230
  clauses: clause.clauses.map(serializeClause)
4078
4231
  };
4079
4232
  }
4233
+ if (clause.type === "crossJoin") {
4234
+ return {
4235
+ type: "crossJoin",
4236
+ target: clause.target,
4237
+ as: clause.as,
4238
+ on: clause.on ? "[function]" : void 0,
4239
+ onPredicateName: clause.onPredicateName,
4240
+ maxRows: clause.maxRows
4241
+ };
4242
+ }
4080
4243
  return clause;
4081
4244
  }
4082
4245
  function canonicalCtxHash(ctx) {
@@ -4126,12 +4289,13 @@ function buildDictLabelResolver(joinCtx, field) {
4126
4289
  return void 0;
4127
4290
  };
4128
4291
  }
4129
- var EMPTY_PLAN, Query;
4292
+ var EMPTY_PLAN, DEFAULT_CROSS_JOIN_MAX_ROWS, Query;
4130
4293
  var init_builder = __esm({
4131
4294
  "src/query/builder.ts"() {
4132
4295
  "use strict";
4133
4296
  init_predicate();
4134
4297
  init_join();
4298
+ init_errors();
4135
4299
  init_live();
4136
4300
  init_strategy4();
4137
4301
  EMPTY_PLAN = {
@@ -4141,6 +4305,7 @@ var init_builder = __esm({
4141
4305
  offset: 0,
4142
4306
  joins: []
4143
4307
  };
4308
+ DEFAULT_CROSS_JOIN_MAX_ROWS = 5e4;
4144
4309
  Query = class _Query {
4145
4310
  source;
4146
4311
  plan;
@@ -4422,6 +4587,78 @@ var init_builder = __esm({
4422
4587
  this.predicates
4423
4588
  );
4424
4589
  }
4590
+ /**
4591
+ * Cartesian-product cross-join against `target` collection. Each result row
4592
+ * carries the original `T` fields plus `result[as]` populated from every
4593
+ * right-side row (or the filtered subset when `on:` is supplied).
4594
+ *
4595
+ * **Order matters:** `.where().crossJoin()` filters BEFORE expanding (cheaper);
4596
+ * `.crossJoin().where('alias.field', ...)` filters AFTER (required when the
4597
+ * where clause references the aliased fields).
4598
+ *
4599
+ * **Cost ceiling:** `CrossJoinTooLargeError` fires before allocation when
4600
+ * `leftRows × rightRows` (or the cumulative lateral count) exceeds the limit.
4601
+ * Default: 50,000 rows. Override per-clause with `{ maxRows: N }`.
4602
+ *
4603
+ * **`on:` shapes:**
4604
+ * - `on: (left) => TTarget[]` — subset form (most efficient)
4605
+ * - `on: (left) => (right) => boolean` — predicate form
4606
+ * - `on: { predicate: 'name' }` — MV-safe, hash-tracked form
4607
+ * (requires the Query to have been augmented via `_withPredicates`)
4608
+ *
4609
+ * Requires a JoinContext (constructed via `collection.query()`).
4610
+ */
4611
+ crossJoin(target, opts) {
4612
+ if (!this.joinContext) {
4613
+ throw new Error(
4614
+ `Query.crossJoin("${target}"): requires a join context. Use collection.query() to construct a cross-join-capable Query instead of the Query constructor directly.`
4615
+ );
4616
+ }
4617
+ let onFn;
4618
+ let onPredicateName;
4619
+ if (opts.on !== void 0) {
4620
+ if (typeof opts.on === "function") {
4621
+ onFn = opts.on;
4622
+ if (this.predicates) {
4623
+ console.warn(
4624
+ `Query.crossJoin("${target}", { on: callback }): inline on: callback inside a withMaterializedView query() disables queryHash drift detection for this cross-join. Use on: { predicate: '<name>' } to enable it.`
4625
+ );
4626
+ }
4627
+ } else {
4628
+ const predName = opts.on.predicate;
4629
+ if (!this.predicates) {
4630
+ throw new Error(
4631
+ `Query.crossJoin("${target}", { on: { predicate: "${predName}" } }): the { predicate } form requires a predicates map. Use this form inside a withMaterializedView query() callback that declares predicates: { ${predName}: { hash, fn } }.`
4632
+ );
4633
+ }
4634
+ const decl = this.predicates.get(predName);
4635
+ if (!decl) {
4636
+ throw new Error(
4637
+ `Query.crossJoin("${target}"): predicate "${predName}" not registered. Available: ${[...this.predicates.keys()].join(", ") || "(none)"}.`
4638
+ );
4639
+ }
4640
+ const as = opts.as;
4641
+ const predicateFn = decl.fn;
4642
+ onFn = (_left) => (right) => predicateFn({ ..._left, [as]: right });
4643
+ onPredicateName = predName;
4644
+ }
4645
+ }
4646
+ const clause = {
4647
+ type: "crossJoin",
4648
+ target,
4649
+ as: opts.as,
4650
+ ...onFn !== void 0 && { on: onFn },
4651
+ ...onPredicateName !== void 0 && { onPredicateName },
4652
+ ...opts.maxRows !== void 0 && { maxRows: opts.maxRows }
4653
+ };
4654
+ return new _Query(
4655
+ this.source,
4656
+ { ...this.plan, clauses: [...this.plan.clauses, clause] },
4657
+ this.joinContext,
4658
+ this.aggregateStrategy,
4659
+ this.predicates
4660
+ );
4661
+ }
4425
4662
  /**
4426
4663
  * Execute the plan and return the matching records. When the plan
4427
4664
  * carries any join legs, they are applied after `where` / `orderBy`
@@ -4429,7 +4666,7 @@ var init_builder = __esm({
4429
4666
  * for the ordering rationale.
4430
4667
  */
4431
4668
  toArray() {
4432
- const base = executePlanWithSource(this.source, this.plan);
4669
+ const base = executePlanWithSource(this.source, this.plan, this.joinContext);
4433
4670
  if (this.plan.joins.length === 0) return base;
4434
4671
  if (!this.joinContext) {
4435
4672
  throw new Error(
@@ -4453,6 +4690,14 @@ var init_builder = __esm({
4453
4690
  * intent is purely to count.
4454
4691
  */
4455
4692
  count() {
4693
+ if (this.plan.clauses.some((c) => c.type === "crossJoin")) {
4694
+ if (!this.joinContext) {
4695
+ throw new Error(
4696
+ `Query.count(): plan contains crossJoin clauses but no JoinContext is attached.`
4697
+ );
4698
+ }
4699
+ return executeClausePipeline(this.source, this.plan.clauses, this.joinContext).length;
4700
+ }
4456
4701
  const { candidates, remainingClauses } = candidateRecords(this.source, this.plan.clauses);
4457
4702
  if (remainingClauses.length === 0) return candidates.length;
4458
4703
  return filterRecords(candidates, remainingClauses).length;
@@ -4500,7 +4745,13 @@ var init_builder = __esm({
4500
4745
  aggregate(spec) {
4501
4746
  const source = this.source;
4502
4747
  const clauses = this.plan.clauses;
4748
+ const joinCtx = this.joinContext;
4749
+ const hasCrossJoins = clauses.some((c) => c.type === "crossJoin");
4503
4750
  const executeRecords = () => {
4751
+ if (hasCrossJoins) {
4752
+ if (!joinCtx) throw new Error("Query.aggregate(): crossJoin requires a join context");
4753
+ return executeClausePipeline(source, clauses, joinCtx);
4754
+ }
4504
4755
  const { candidates, remainingClauses } = candidateRecords(source, clauses);
4505
4756
  return remainingClauses.length === 0 ? candidates : filterRecords(candidates, remainingClauses);
4506
4757
  };
@@ -4517,7 +4768,13 @@ var init_builder = __esm({
4517
4768
  }
4518
4769
  const source = this.source;
4519
4770
  const clauses = this.plan.clauses;
4771
+ const joinCtx = this.joinContext;
4772
+ const hasCrossJoins = clauses.some((c) => c.type === "crossJoin");
4520
4773
  const executeRecords = () => {
4774
+ if (hasCrossJoins) {
4775
+ if (!joinCtx) throw new Error("Query.groupBy(): crossJoin requires a join context");
4776
+ return executeClausePipeline(source, clauses, joinCtx);
4777
+ }
4521
4778
  const { candidates, remainingClauses } = candidateRecords(source, clauses);
4522
4779
  return remainingClauses.length === 0 ? candidates : filterRecords(candidates, remainingClauses);
4523
4780
  };
@@ -4631,6 +4888,21 @@ var init_builder = __esm({
4631
4888
  }
4632
4889
  }
4633
4890
  }
4891
+ if (this.joinContext) {
4892
+ const subscribedCross = /* @__PURE__ */ new Set();
4893
+ for (const clause of this.plan.clauses) {
4894
+ if (clause.type !== "crossJoin") continue;
4895
+ if (subscribedCross.has(clause.target)) continue;
4896
+ subscribedCross.add(clause.target);
4897
+ const rightSource = this.joinContext.resolveSource(clause.target);
4898
+ if (rightSource?.subscribe) {
4899
+ const rightSubscribe = rightSource.subscribe.bind(rightSource);
4900
+ upstreams.push({
4901
+ subscribe: (cb) => rightSubscribe(cb)
4902
+ });
4903
+ }
4904
+ }
4905
+ }
4634
4906
  return buildLiveQuery(() => this.toArray(), upstreams);
4635
4907
  }
4636
4908
  /**
@@ -5950,6 +6222,11 @@ function analyzeDependencies(query) {
5950
6222
  for (const leg of plan.joins) {
5951
6223
  deps.add(leg.target);
5952
6224
  }
6225
+ for (const clause of plan.clauses) {
6226
+ if (clause.type === "crossJoin") {
6227
+ deps.add(clause.target);
6228
+ }
6229
+ }
5953
6230
  walkClausesForJoins(plan, deps, ctx);
5954
6231
  return deps;
5955
6232
  }
@@ -5965,7 +6242,19 @@ function summarizeQueryPlan(query) {
5965
6242
  const ctx = query._joinContext();
5966
6243
  return JSON.stringify({
5967
6244
  root: ctx?.leftCollection ?? null,
5968
- clauses: plan.clauses,
6245
+ clauses: plan.clauses.map((c) => {
6246
+ if (c.type === "crossJoin") {
6247
+ return {
6248
+ type: "crossJoin",
6249
+ target: c.target,
6250
+ as: c.as,
6251
+ // Inline on: callback: use sentinel — drift detection disabled for this MV
6252
+ onPredicateName: c.onPredicateName ?? (c.on ? "[inline]" : null),
6253
+ maxRows: c.maxRows ?? null
6254
+ };
6255
+ }
6256
+ return c;
6257
+ }),
5969
6258
  orderBy: plan.orderBy,
5970
6259
  limit: plan.limit ?? null,
5971
6260
  offset: plan.offset,
@@ -6542,6 +6831,7 @@ var init_collection = __esm({
6542
6831
  "use strict";
6543
6832
  init_types();
6544
6833
  init_strategy();
6834
+ init_core();
6545
6835
  init_strategy2();
6546
6836
  init_crypto();
6547
6837
  init_errors();
@@ -7153,7 +7443,9 @@ var init_collection = __esm({
7153
7443
  const obj = record;
7154
7444
  for (const [field, descriptor] of Object.entries(this.i18nFields)) {
7155
7445
  if (!descriptor.options.autoTranslate) continue;
7156
- const value = obj[field];
7446
+ const leafValues = getAtPath(obj, field);
7447
+ if (leafValues.length !== 1) continue;
7448
+ const value = leafValues[0];
7157
7449
  if (!value || typeof value !== "object" || Array.isArray(value)) continue;
7158
7450
  const map = value;
7159
7451
  const { languages, required } = descriptor.options;
@@ -7177,8 +7469,7 @@ var init_collection = __esm({
7177
7469
  this.name
7178
7470
  );
7179
7471
  }
7180
- ;
7181
- record[field] = translated;
7472
+ setAtPathInPlace(obj, field, translated);
7182
7473
  }
7183
7474
  }
7184
7475
  if (this.i18nPutValidator !== void 0) {
@@ -11450,6 +11741,7 @@ var init_vault = __esm({
11450
11741
  init_strategy9();
11451
11742
  init_refs();
11452
11743
  init_dictionary();
11744
+ init_core();
11453
11745
  init_strategy2();
11454
11746
  init_sync_strategy();
11455
11747
  init_errors();
@@ -12053,9 +12345,11 @@ var init_vault = __esm({
12053
12345
  if (!record || typeof record !== "object") return;
12054
12346
  const obj = record;
12055
12347
  for (const [field, descriptor] of Object.entries(i18nFields)) {
12056
- const value = obj[field];
12057
- if (value === void 0 || value === null) continue;
12058
- this.i18nStrategy.validateI18nTextValue(value, field, descriptor);
12348
+ const values = getAtPath(obj, field);
12349
+ for (const value of values) {
12350
+ if (value === void 0 || value === null) continue;
12351
+ this.i18nStrategy.validateI18nTextValue(value, field, descriptor);
12352
+ }
12059
12353
  }
12060
12354
  }
12061
12355
  /**
@@ -14785,20 +15079,42 @@ var init_unlock_state = __esm({
14785
15079
  }
14786
15080
  });
14787
15081
 
14788
- // src/tx/strategy.ts
14789
- var NOT_ENABLED5, NO_TX;
15082
+ // src/snapshots/strategy.ts
15083
+ var NOT_ENABLED5, NO_SNAPSHOTS;
14790
15084
  var init_strategy10 = __esm({
14791
- "src/tx/strategy.ts"() {
15085
+ "src/snapshots/strategy.ts"() {
14792
15086
  "use strict";
14793
15087
  NOT_ENABLED5 = new Error(
15088
+ 'Snapshots require the snapshot strategy. Import `{ withSnapshots }` from "@noy-db/hub/snapshots" and pass it to `createNoydb({ snapshotStrategy: withSnapshots({ store }) })`.'
15089
+ );
15090
+ NO_SNAPSHOTS = {
15091
+ async snapshot() {
15092
+ throw NOT_ENABLED5;
15093
+ },
15094
+ async listSnapshots() {
15095
+ throw NOT_ENABLED5;
15096
+ },
15097
+ async restoreSnapshot() {
15098
+ throw NOT_ENABLED5;
15099
+ }
15100
+ };
15101
+ }
15102
+ });
15103
+
15104
+ // src/tx/strategy.ts
15105
+ var NOT_ENABLED6, NO_TX;
15106
+ var init_strategy11 = __esm({
15107
+ "src/tx/strategy.ts"() {
15108
+ "use strict";
15109
+ NOT_ENABLED6 = new Error(
14794
15110
  'Multi-record transactions require the tx strategy. Import `{ withTransactions }` from "@noy-db/hub/tx" and pass it to `createNoydb({ txStrategy: withTransactions() })`.'
14795
15111
  );
14796
15112
  NO_TX = {
14797
15113
  async runTransaction() {
14798
- throw NOT_ENABLED5;
15114
+ throw NOT_ENABLED6;
14799
15115
  },
14800
15116
  async runDryRun() {
14801
- throw NOT_ENABLED5;
15117
+ throw NOT_ENABLED6;
14802
15118
  }
14803
15119
  };
14804
15120
  }
@@ -14823,7 +15139,7 @@ function notEnabled4(op) {
14823
15139
  );
14824
15140
  }
14825
15141
  var NO_SESSION;
14826
- var init_strategy11 = __esm({
15142
+ var init_strategy12 = __esm({
14827
15143
  "src/session/strategy.ts"() {
14828
15144
  "use strict";
14829
15145
  NO_SESSION = {
@@ -15259,10 +15575,11 @@ var init_noydb = __esm({
15259
15575
  init_authenticators();
15260
15576
  init_unlock_state();
15261
15577
  init_sync_strategy();
15262
- init_transaction();
15263
15578
  init_strategy10();
15264
- init_sync_policy();
15579
+ init_transaction();
15265
15580
  init_strategy11();
15581
+ init_sync_policy();
15582
+ init_strategy12();
15266
15583
  init_policy2();
15267
15584
  ROLE_RANK = {
15268
15585
  client: 1,
@@ -15319,6 +15636,7 @@ var init_noydb = __esm({
15319
15636
  txStrategy;
15320
15637
  sessionStrategy;
15321
15638
  syncStrategy;
15639
+ snapshotStrategy;
15322
15640
  /**
15323
15641
  * Currently-running multi-record transaction, set by
15324
15642
  * `runTransaction` at the start of Phase 2 (commit) and cleared in
@@ -15343,6 +15661,7 @@ var init_noydb = __esm({
15343
15661
  this.txStrategy = options.txStrategy ?? NO_TX;
15344
15662
  this.sessionStrategy = options.sessionStrategy ?? NO_SESSION;
15345
15663
  this.syncStrategy = options.syncStrategy ?? NO_SYNC;
15664
+ this.snapshotStrategy = options.snapshotStrategy ?? NO_SNAPSHOTS;
15346
15665
  this.publicEnvelopeSchema = resolveSchema(options.publicEnvelope);
15347
15666
  if (options.sessionPolicy) {
15348
15667
  this.sessionStrategy.validateSessionPolicy(options.sessionPolicy);
@@ -17329,6 +17648,45 @@ var init_noydb = __esm({
17329
17648
  this.keyringCache.set(vault, keyring);
17330
17649
  return keyring;
17331
17650
  }
17651
+ /**
17652
+ * Take an on-demand checkpoint of the given vault.
17653
+ * Requires `snapshotStrategy: withSnapshots({ store })` in `createNoydb`.
17654
+ * @throws ValidationError when the vault is not open
17655
+ */
17656
+ async snapshot(vault, opts) {
17657
+ if (this.closed) throw new ValidationError("Instance is closed");
17658
+ const v = this.vaultCache.get(vault);
17659
+ if (!v) {
17660
+ throw new ValidationError(
17661
+ `Vault "${vault}" is not open. Call openVault() first.`
17662
+ );
17663
+ }
17664
+ return this.snapshotStrategy.snapshot(v, this.options.user, opts);
17665
+ }
17666
+ /**
17667
+ * List all snapshots for the given vault, newest first.
17668
+ * Reads only the sidecar index — does not download snapshot bytes.
17669
+ */
17670
+ async listSnapshots(vault) {
17671
+ if (this.closed) throw new ValidationError("Instance is closed");
17672
+ return this.snapshotStrategy.listSnapshots(vault);
17673
+ }
17674
+ /**
17675
+ * Restore the vault to a previously snapshotted state.
17676
+ * Runs `verifyBackupIntegrity()` automatically on restore.
17677
+ * @throws SnapshotNotFoundError when `version` doesn't exist in the store
17678
+ * @throws ValidationError when the vault is not open
17679
+ */
17680
+ async restoreSnapshot(vault, version) {
17681
+ if (this.closed) throw new ValidationError("Instance is closed");
17682
+ const v = this.vaultCache.get(vault);
17683
+ if (!v) {
17684
+ throw new ValidationError(
17685
+ `Vault "${vault}" is not open. Call openVault() first.`
17686
+ );
17687
+ }
17688
+ return this.snapshotStrategy.restoreSnapshot(v, version);
17689
+ }
17332
17690
  };
17333
17691
  }
17334
17692
  });