@noy-db/hub 0.2.0-pre.6 → 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 (254) 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 +326 -15
  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-W277AG6N.js → chunk-3O5FNO5O.js} +104 -47
  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-JICBEFBT.js → chunk-AYRTGXF3.js} +5 -5
  29. package/dist/{chunk-CCC25PA7.js → chunk-BE5ZALMB.js} +5 -5
  30. package/dist/{chunk-WEA4TDTJ.js → chunk-BNUCCUES.js} +3 -3
  31. package/dist/{chunk-PS5G6A3Y.js → chunk-BRZFN354.js} +4 -4
  32. package/dist/{chunk-RIHZBSWJ.js → chunk-CBHPW77B.js} +3 -3
  33. package/dist/{chunk-LWFQYT4N.js → chunk-CSHY53CZ.js} +2 -2
  34. package/dist/{chunk-MDIC4FAU.js → chunk-DCP4L4SH.js} +2 -2
  35. package/dist/{chunk-TNBIWSQ7.js → chunk-GI6S5ZF2.js} +2 -2
  36. package/dist/{chunk-G26QAQNI.js → chunk-GZIDTXC4.js} +2 -2
  37. package/dist/{chunk-ARZAHCCF.js → chunk-HNC55FLJ.js} +3 -3
  38. package/dist/{chunk-SGSHQ4PH.js → chunk-HNFXKQD7.js} +5 -5
  39. package/dist/{chunk-YEHUEUNP.js → chunk-JZDA2SRB.js} +4 -4
  40. package/dist/{chunk-PX3MJ6RB.js → chunk-KK44CQ5B.js} +3 -3
  41. package/dist/{chunk-OPD3PZOG.js → chunk-LSY46G55.js} +4 -4
  42. package/dist/{chunk-T6MTNGBM.js → chunk-N4CDTRDH.js} +4 -4
  43. package/dist/{chunk-ZQMYB56Z.js → chunk-O3JCRQT3.js} +3 -3
  44. package/dist/{chunk-LJO6Q3X6.js → chunk-OA6HE2RW.js} +3 -3
  45. package/dist/{chunk-HIELMTUK.js → chunk-OIF6LZUR.js} +2 -2
  46. package/dist/{chunk-YJ46RFCD.js → chunk-OXCFFRF3.js} +2 -2
  47. package/dist/{chunk-ED3E3OLO.js → chunk-PJKGXUMG.js} +2 -2
  48. package/dist/{chunk-6A4AMQ2H.js → chunk-QYO6I7KK.js} +4 -4
  49. package/dist/{chunk-6HJ2ZALB.js → chunk-REQJJIPP.js} +44 -2
  50. package/dist/chunk-REQJJIPP.js.map +1 -0
  51. package/dist/{chunk-7TX7HN42.js → chunk-SLJQIBT7.js} +20 -3
  52. package/dist/chunk-SLJQIBT7.js.map +1 -0
  53. package/dist/{chunk-A4JNVBPF.js → chunk-SYOSRZN4.js} +5 -5
  54. package/dist/{chunk-R4LTCI6O.js → chunk-TS4FQPDD.js} +2 -2
  55. package/dist/{chunk-ICH4AIGL.js → chunk-TV3YZ35S.js} +5 -1
  56. package/dist/chunk-TV3YZ35S.js.map +1 -0
  57. package/dist/{chunk-CKH247ZR.js → chunk-UPBZ7NVY.js} +4 -4
  58. package/dist/{chunk-XVJFFGTG.js → chunk-VZOZ3DBN.js} +3 -3
  59. package/dist/{chunk-5VMTAX4Y.js → chunk-W6EQLGMB.js} +2 -2
  60. package/dist/{chunk-JSYTGEX4.js → chunk-WBUG3324.js} +3 -3
  61. package/dist/{chunk-5OVIFUQE.js → chunk-WIRRPTFH.js} +1 -1
  62. package/dist/chunk-WIRRPTFH.js.map +1 -0
  63. package/dist/{chunk-25WFLKOH.js → chunk-WM5GFORS.js} +2 -2
  64. package/dist/{chunk-CGJFCT3X.js → chunk-WMKCAN4H.js} +2 -2
  65. package/dist/{chunk-R7JTYCRX.js → chunk-XZCBBZLS.js} +2 -2
  66. package/dist/{chunk-EKTOYEZ3.js → chunk-YAMTXW77.js} +2 -2
  67. package/dist/consent/index.cjs.map +1 -1
  68. package/dist/consent/index.d.cts +5 -5
  69. package/dist/consent/index.d.ts +5 -5
  70. package/dist/consent/index.js +3 -3
  71. package/dist/{crypto-5UDZZL26.js → crypto-TRZ5BJMY.js} +3 -3
  72. package/dist/{delegation-42LO4WFO.js → delegation-TLZTK2XW.js} +5 -5
  73. package/dist/derivations/index.cjs.map +1 -1
  74. package/dist/derivations/index.d.cts +6 -6
  75. package/dist/derivations/index.d.ts +6 -6
  76. package/dist/derivations/index.js +4 -4
  77. package/dist/{dev-unlock-Cvo-xCQC.d.ts → dev-unlock-ClAEZQC4.d.ts} +1 -1
  78. package/dist/{dev-unlock-Dy1qVpkL.d.cts → dev-unlock-L3z34v0J.d.cts} +1 -1
  79. package/dist/executor-HAVRTQN4.js +11 -0
  80. package/dist/executor-V3DKOADS.js +8 -0
  81. package/dist/executor-XO4M4243.js +8 -0
  82. package/dist/{fanout-sidecar-EVICRM46.js → fanout-sidecar-OKPMMPLG.js} +2 -2
  83. package/dist/guards/index.cjs.map +1 -1
  84. package/dist/guards/index.d.cts +6 -6
  85. package/dist/guards/index.d.ts +6 -6
  86. package/dist/guards/index.js +3 -3
  87. package/dist/{hash-BAlWR4WD.d.ts → hash-B3lV6lw3.d.ts} +1 -1
  88. package/dist/{hash-BgEQklQc.d.cts → hash-M6-JI3Yu.d.cts} +1 -1
  89. package/dist/history/index.cjs.map +1 -1
  90. package/dist/history/index.d.cts +6 -6
  91. package/dist/history/index.d.ts +6 -6
  92. package/dist/history/index.js +5 -5
  93. package/dist/i18n/index.cjs.map +1 -1
  94. package/dist/i18n/index.d.cts +5 -5
  95. package/dist/i18n/index.d.ts +5 -5
  96. package/dist/i18n/index.js +5 -5
  97. package/dist/{index-fIPPh5dg.d.ts → index-CmWQyC4e.d.ts} +84 -7
  98. package/dist/{index-5I0MZ0jQ.d.cts → index-vB43MAt4.d.cts} +84 -7
  99. package/dist/index.cjs +340 -9
  100. package/dist/index.cjs.map +1 -1
  101. package/dist/index.d.cts +13 -13
  102. package/dist/index.d.ts +13 -13
  103. package/dist/index.js +60 -52
  104. package/dist/index.js.map +1 -1
  105. package/dist/indexing/index.cjs +4 -0
  106. package/dist/indexing/index.cjs.map +1 -1
  107. package/dist/indexing/index.d.cts +3 -3
  108. package/dist/indexing/index.d.ts +3 -3
  109. package/dist/indexing/index.js +4 -4
  110. package/dist/issue-EJKUQ6FA.js +12 -0
  111. package/dist/{lazy-builder-D1MyR1qH.d.ts → lazy-builder-7tIpFyWN.d.ts} +1 -1
  112. package/dist/{lazy-builder-DXlSCNCJ.d.cts → lazy-builder-wY4pMCEe.d.cts} +1 -1
  113. package/dist/{ledger-UX4QIHWI.js → ledger-SQVVE2DR.js} +5 -5
  114. package/dist/materialized-views/index.cjs +18 -1
  115. package/dist/materialized-views/index.cjs.map +1 -1
  116. package/dist/materialized-views/index.d.cts +10 -8
  117. package/dist/materialized-views/index.d.ts +10 -8
  118. package/dist/materialized-views/index.js +12 -12
  119. package/dist/noydb-MK4UQ626.js +34 -0
  120. package/dist/overlay-views/index.cjs.map +1 -1
  121. package/dist/overlay-views/index.d.cts +6 -6
  122. package/dist/overlay-views/index.d.ts +6 -6
  123. package/dist/overlay-views/index.js +6 -6
  124. package/dist/periods/index.cjs.map +1 -1
  125. package/dist/periods/index.d.cts +5 -5
  126. package/dist/periods/index.d.ts +5 -5
  127. package/dist/periods/index.js +5 -5
  128. package/dist/{predicate-B0IKeBXx.d.cts → predicate-BSAGEyu5.d.cts} +26 -2
  129. package/dist/{predicate-B0IKeBXx.d.ts → predicate-BSAGEyu5.d.ts} +26 -2
  130. package/dist/{public-envelope-YKHKP74C.js → public-envelope-BXPXMN3U.js} +4 -4
  131. package/dist/query/index.cjs +244 -4
  132. package/dist/query/index.cjs.map +1 -1
  133. package/dist/query/index.d.cts +2 -2
  134. package/dist/query/index.d.ts +2 -2
  135. package/dist/query/index.js +12 -6
  136. package/dist/{registry-4NEW7LQY.js → registry-4R4IURUM.js} +3 -3
  137. package/dist/registry-GPBLCHG7.js +8 -0
  138. package/dist/registry-ZON5HNIV.js +8 -0
  139. package/dist/{revoke-R5NIQ74J.js → revoke-Y7UDOXGH.js} +6 -6
  140. package/dist/session/index.cjs.map +1 -1
  141. package/dist/session/index.d.cts +6 -6
  142. package/dist/session/index.d.ts +6 -6
  143. package/dist/session/index.js +3 -3
  144. package/dist/shadow/index.cjs.map +1 -1
  145. package/dist/shadow/index.d.cts +5 -5
  146. package/dist/shadow/index.d.ts +5 -5
  147. package/dist/shadow/index.js +2 -2
  148. package/dist/{signer-WGDJNWSU.js → signer-UD2ZSVDJ.js} +5 -5
  149. package/dist/snapshots/index.cjs +903 -0
  150. package/dist/snapshots/index.cjs.map +1 -0
  151. package/dist/snapshots/index.d.cts +21 -0
  152. package/dist/snapshots/index.d.ts +21 -0
  153. package/dist/snapshots/index.js +118 -0
  154. package/dist/snapshots/index.js.map +1 -0
  155. package/dist/{stale-74WGLVZ2.js → stale-F4V5E7ZK.js} +2 -2
  156. package/dist/store/index.cjs.map +1 -1
  157. package/dist/store/index.d.cts +5 -5
  158. package/dist/store/index.d.ts +5 -5
  159. package/dist/store/index.js +2 -2
  160. package/dist/sync/index.cjs.map +1 -1
  161. package/dist/sync/index.d.cts +4 -4
  162. package/dist/sync/index.d.ts +4 -4
  163. package/dist/sync/index.js +4 -4
  164. package/dist/team/index.cjs.map +1 -1
  165. package/dist/team/index.d.cts +5 -5
  166. package/dist/team/index.d.ts +5 -5
  167. package/dist/team/index.js +8 -8
  168. package/dist/tx/index.cjs.map +1 -1
  169. package/dist/tx/index.d.cts +5 -5
  170. package/dist/tx/index.d.ts +5 -5
  171. package/dist/tx/index.js +3 -3
  172. package/dist/{types-DlnZh1_i.d.ts → types-DT7cXRHq.d.ts} +63 -4
  173. package/dist/{types-DVlvNn2c.d.cts → types-r-y7TIqj.d.cts} +63 -4
  174. package/dist/{ulid-r98nkjVd.d.cts → ulid-BkW3mLlz.d.cts} +1 -1
  175. package/dist/{ulid-CzPONlhG.d.ts → ulid-Dt55yn4s.d.ts} +1 -1
  176. package/dist/util/index.cjs.map +1 -1
  177. package/dist/util/index.js +1 -1
  178. package/dist/{with-derivation-BMQ9pIHe.d.cts → with-derivation-DB63Po2m.d.cts} +1 -1
  179. package/dist/{with-derivation-B98shCV8.d.ts → with-derivation-D_Ids_H6.d.ts} +1 -1
  180. package/dist/{with-guard-DUnC3JDN.d.cts → with-guard-BHThLppa.d.cts} +1 -1
  181. package/dist/{with-guard-DmT50nVG.d.ts → with-guard-BJwdc0s6.d.ts} +1 -1
  182. package/dist/{with-materialized-view-eMTZ65_J.d.cts → with-materialized-view-BJmJ-FrO.d.cts} +1 -1
  183. package/dist/{with-materialized-view-Bp_M3sNG.d.ts → with-materialized-view-D-CRVSDX.d.ts} +1 -1
  184. package/dist/{with-overlayed-view-zzSnRQmS.d.ts → with-overlayed-view-CNf6GbDG.d.ts} +1 -1
  185. package/dist/{with-overlayed-view-BoY6PB3n.d.cts → with-overlayed-view-zePNtUSq.d.cts} +1 -1
  186. package/package.json +13 -3
  187. package/dist/chunk-5OVIFUQE.js.map +0 -1
  188. package/dist/chunk-6HJ2ZALB.js.map +0 -1
  189. package/dist/chunk-7TX7HN42.js.map +0 -1
  190. package/dist/chunk-ICH4AIGL.js.map +0 -1
  191. package/dist/chunk-W277AG6N.js.map +0 -1
  192. package/dist/chunk-XDW37COG.js.map +0 -1
  193. package/dist/executor-AWCHQ2KN.js +0 -8
  194. package/dist/executor-RWICJI7J.js +0 -11
  195. package/dist/executor-SOLEQVUB.js +0 -8
  196. package/dist/issue-IODMTPME.js +0 -12
  197. package/dist/noydb-FY2666NY.js +0 -34
  198. package/dist/registry-446I2NMN.js +0 -8
  199. package/dist/registry-524KJZG4.js +0 -8
  200. /package/dist/{chunk-E225X5CQ.js.map → chunk-22ESLVUM.js.map} +0 -0
  201. /package/dist/{chunk-5QPF2MJ5.js.map → chunk-2TXMTYWZ.js.map} +0 -0
  202. /package/dist/{chunk-34XGYMQT.js.map → chunk-3XCXUJTM.js.map} +0 -0
  203. /package/dist/{chunk-KGFV72WK.js.map → chunk-4YVVF6JN.js.map} +0 -0
  204. /package/dist/{chunk-UGVDIOY7.js.map → chunk-6ILPGZXZ.js.map} +0 -0
  205. /package/dist/{chunk-DFCINPB5.js.map → chunk-6MXGU2PW.js.map} +0 -0
  206. /package/dist/{chunk-Y3P5DEMZ.js.map → chunk-7IH5FDXD.js.map} +0 -0
  207. /package/dist/{chunk-2GMRNNI3.js.map → chunk-ASFE2X62.js.map} +0 -0
  208. /package/dist/{chunk-JICBEFBT.js.map → chunk-AYRTGXF3.js.map} +0 -0
  209. /package/dist/{chunk-CCC25PA7.js.map → chunk-BE5ZALMB.js.map} +0 -0
  210. /package/dist/{chunk-WEA4TDTJ.js.map → chunk-BNUCCUES.js.map} +0 -0
  211. /package/dist/{chunk-PS5G6A3Y.js.map → chunk-BRZFN354.js.map} +0 -0
  212. /package/dist/{chunk-RIHZBSWJ.js.map → chunk-CBHPW77B.js.map} +0 -0
  213. /package/dist/{chunk-LWFQYT4N.js.map → chunk-CSHY53CZ.js.map} +0 -0
  214. /package/dist/{chunk-MDIC4FAU.js.map → chunk-DCP4L4SH.js.map} +0 -0
  215. /package/dist/{chunk-TNBIWSQ7.js.map → chunk-GI6S5ZF2.js.map} +0 -0
  216. /package/dist/{chunk-G26QAQNI.js.map → chunk-GZIDTXC4.js.map} +0 -0
  217. /package/dist/{chunk-ARZAHCCF.js.map → chunk-HNC55FLJ.js.map} +0 -0
  218. /package/dist/{chunk-SGSHQ4PH.js.map → chunk-HNFXKQD7.js.map} +0 -0
  219. /package/dist/{chunk-YEHUEUNP.js.map → chunk-JZDA2SRB.js.map} +0 -0
  220. /package/dist/{chunk-PX3MJ6RB.js.map → chunk-KK44CQ5B.js.map} +0 -0
  221. /package/dist/{chunk-OPD3PZOG.js.map → chunk-LSY46G55.js.map} +0 -0
  222. /package/dist/{chunk-T6MTNGBM.js.map → chunk-N4CDTRDH.js.map} +0 -0
  223. /package/dist/{chunk-ZQMYB56Z.js.map → chunk-O3JCRQT3.js.map} +0 -0
  224. /package/dist/{chunk-LJO6Q3X6.js.map → chunk-OA6HE2RW.js.map} +0 -0
  225. /package/dist/{chunk-HIELMTUK.js.map → chunk-OIF6LZUR.js.map} +0 -0
  226. /package/dist/{chunk-YJ46RFCD.js.map → chunk-OXCFFRF3.js.map} +0 -0
  227. /package/dist/{chunk-ED3E3OLO.js.map → chunk-PJKGXUMG.js.map} +0 -0
  228. /package/dist/{chunk-6A4AMQ2H.js.map → chunk-QYO6I7KK.js.map} +0 -0
  229. /package/dist/{chunk-A4JNVBPF.js.map → chunk-SYOSRZN4.js.map} +0 -0
  230. /package/dist/{chunk-R4LTCI6O.js.map → chunk-TS4FQPDD.js.map} +0 -0
  231. /package/dist/{chunk-CKH247ZR.js.map → chunk-UPBZ7NVY.js.map} +0 -0
  232. /package/dist/{chunk-XVJFFGTG.js.map → chunk-VZOZ3DBN.js.map} +0 -0
  233. /package/dist/{chunk-5VMTAX4Y.js.map → chunk-W6EQLGMB.js.map} +0 -0
  234. /package/dist/{chunk-JSYTGEX4.js.map → chunk-WBUG3324.js.map} +0 -0
  235. /package/dist/{chunk-25WFLKOH.js.map → chunk-WM5GFORS.js.map} +0 -0
  236. /package/dist/{chunk-CGJFCT3X.js.map → chunk-WMKCAN4H.js.map} +0 -0
  237. /package/dist/{chunk-R7JTYCRX.js.map → chunk-XZCBBZLS.js.map} +0 -0
  238. /package/dist/{chunk-EKTOYEZ3.js.map → chunk-YAMTXW77.js.map} +0 -0
  239. /package/dist/{crypto-5UDZZL26.js.map → crypto-TRZ5BJMY.js.map} +0 -0
  240. /package/dist/{delegation-42LO4WFO.js.map → delegation-TLZTK2XW.js.map} +0 -0
  241. /package/dist/{executor-AWCHQ2KN.js.map → executor-HAVRTQN4.js.map} +0 -0
  242. /package/dist/{executor-RWICJI7J.js.map → executor-V3DKOADS.js.map} +0 -0
  243. /package/dist/{executor-SOLEQVUB.js.map → executor-XO4M4243.js.map} +0 -0
  244. /package/dist/{fanout-sidecar-EVICRM46.js.map → fanout-sidecar-OKPMMPLG.js.map} +0 -0
  245. /package/dist/{issue-IODMTPME.js.map → issue-EJKUQ6FA.js.map} +0 -0
  246. /package/dist/{ledger-UX4QIHWI.js.map → ledger-SQVVE2DR.js.map} +0 -0
  247. /package/dist/{noydb-FY2666NY.js.map → noydb-MK4UQ626.js.map} +0 -0
  248. /package/dist/{public-envelope-YKHKP74C.js.map → public-envelope-BXPXMN3U.js.map} +0 -0
  249. /package/dist/{registry-446I2NMN.js.map → registry-4R4IURUM.js.map} +0 -0
  250. /package/dist/{registry-4NEW7LQY.js.map → registry-GPBLCHG7.js.map} +0 -0
  251. /package/dist/{registry-524KJZG4.js.map → registry-ZON5HNIV.js.map} +0 -0
  252. /package/dist/{revoke-R5NIQ74J.js.map → revoke-Y7UDOXGH.js.map} +0 -0
  253. /package/dist/{signer-WGDJNWSU.js.map → signer-UD2ZSVDJ.js.map} +0 -0
  254. /package/dist/{stale-74WGLVZ2.js.map → stale-F4V5E7ZK.js.map} +0 -0
@@ -1,10 +1,10 @@
1
- import { a7 as PeriodsStrategy } from '../types-DVlvNn2c.cjs';
2
- export { a8 as CarryForwardContext, a9 as ClosePeriodOptions, aa as OpenPeriodOptions, ab as PERIODS_COLLECTION, ac as PeriodRecord, ad as ReadOnlyCollection, ae as appendPeriodLedgerEntry, af as assertTsWritable, ag as chainAnchor, ah as loadPeriods, ai as validatePeriodName } from '../types-DVlvNn2c.cjs';
3
- import '../lazy-builder-DXlSCNCJ.cjs';
4
- import '../predicate-B0IKeBXx.cjs';
1
+ import { a7 as PeriodsStrategy } from '../types-r-y7TIqj.cjs';
2
+ export { a8 as CarryForwardContext, a9 as ClosePeriodOptions, aa as OpenPeriodOptions, ab as PERIODS_COLLECTION, ac as PeriodRecord, ad as ReadOnlyCollection, ae as appendPeriodLedgerEntry, af as assertTsWritable, ag as chainAnchor, ah as loadPeriods, ai as validatePeriodName } from '../types-r-y7TIqj.cjs';
3
+ import '../lazy-builder-wY4pMCEe.cjs';
4
+ import '../predicate-BSAGEyu5.cjs';
5
5
  import '../strategy-DSTrsZ8t.cjs';
6
6
  import '../strategy-BSxFXGzb.cjs';
7
- import '../index-5I0MZ0jQ.cjs';
7
+ import '../index-vB43MAt4.cjs';
8
8
  import '@noy-db/attestation';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
- import { a7 as PeriodsStrategy } from '../types-DlnZh1_i.js';
2
- export { a8 as CarryForwardContext, a9 as ClosePeriodOptions, aa as OpenPeriodOptions, ab as PERIODS_COLLECTION, ac as PeriodRecord, ad as ReadOnlyCollection, ae as appendPeriodLedgerEntry, af as assertTsWritable, ag as chainAnchor, ah as loadPeriods, ai as validatePeriodName } from '../types-DlnZh1_i.js';
3
- import '../lazy-builder-D1MyR1qH.js';
4
- import '../predicate-B0IKeBXx.js';
1
+ import { a7 as PeriodsStrategy } from '../types-DT7cXRHq.js';
2
+ export { a8 as CarryForwardContext, a9 as ClosePeriodOptions, aa as OpenPeriodOptions, ab as PERIODS_COLLECTION, ac as PeriodRecord, ad as ReadOnlyCollection, ae as appendPeriodLedgerEntry, af as assertTsWritable, ag as chainAnchor, ah as loadPeriods, ai as validatePeriodName } from '../types-DT7cXRHq.js';
3
+ import '../lazy-builder-7tIpFyWN.js';
4
+ import '../predicate-BSAGEyu5.js';
5
5
  import '../strategy-DSTrsZ8t.js';
6
6
  import '../strategy-BSxFXGzb.js';
7
- import '../index-fIPPh5dg.js';
7
+ import '../index-CmWQyC4e.js';
8
8
  import '@noy-db/attestation';
9
9
 
10
10
  /**
@@ -6,13 +6,13 @@ import {
6
6
  loadPeriods,
7
7
  validatePeriodName,
8
8
  withPeriods
9
- } from "../chunk-ZQMYB56Z.js";
9
+ } from "../chunk-O3JCRQT3.js";
10
10
  import "../chunk-UF3BUNQZ.js";
11
- import "../chunk-6A4AMQ2H.js";
11
+ import "../chunk-QYO6I7KK.js";
12
12
  import "../chunk-Z6FNBOTC.js";
13
- import "../chunk-5OVIFUQE.js";
14
- import "../chunk-EKTOYEZ3.js";
15
- import "../chunk-6HJ2ZALB.js";
13
+ import "../chunk-WIRRPTFH.js";
14
+ import "../chunk-YAMTXW77.js";
15
+ import "../chunk-REQJJIPP.js";
16
16
  export {
17
17
  PERIODS_COLLECTION,
18
18
  appendPeriodLedgerEntry,
@@ -163,7 +163,31 @@ interface GroupClause {
163
163
  readonly op: 'and' | 'or';
164
164
  readonly clauses: readonly Clause[];
165
165
  }
166
- type Clause = FieldClause | FilterClause | WherePredicateClause | GroupClause;
166
+ /**
167
+ * Cartesian-product expansion clause. Appended to `QueryPlan.clauses`
168
+ * by `Query.crossJoin()`. Processed in declaration order by
169
+ * `executeClausePipeline` — NOT by `evaluateClause` (which is a
170
+ * per-record predicate and throws on this type).
171
+ */
172
+ interface CrossJoinClause {
173
+ readonly type: 'crossJoin';
174
+ /** Target collection name to cross-join against. */
175
+ readonly target: string;
176
+ /** Alias under which the right-side record is exposed on each result row. */
177
+ readonly as: string;
178
+ /**
179
+ * Lateral filter callback. `undefined` → full cartesian product.
180
+ * Two call shapes:
181
+ * - Subset: `(left) => TTarget[]` — returns the right rows for this left row
182
+ * - Predicate: `(left) => (right) => boolean` — executor materializes then filters
183
+ */
184
+ readonly on?: (left: unknown) => unknown[] | ((right: unknown) => boolean);
185
+ /** When `on:` was supplied as `{ predicate: name }`, the name is stored here for queryHash. */
186
+ readonly onPredicateName?: string;
187
+ /** Per-clause row ceiling override. `undefined` → `DEFAULT_CROSS_JOIN_MAX_ROWS`. */
188
+ readonly maxRows?: number;
189
+ }
190
+ type Clause = FieldClause | FilterClause | WherePredicateClause | GroupClause | CrossJoinClause;
167
191
  /**
168
192
  * Read a possibly nested field path like "address.city" from a record.
169
193
  * Returns undefined if any segment is missing.
@@ -182,4 +206,4 @@ declare function evaluateFieldClause(record: unknown, clause: FieldClause): bool
182
206
  */
183
207
  declare function evaluateClause(record: unknown, clause: Clause): boolean;
184
208
 
185
- export { CollectionIndexes as C, type FieldClause as F, type GroupClause as G, type HashIndex as H, type IndexDef as I, type Operator as O, type Clause as a, type FilterClause as b, evaluateFieldClause as c, evaluateClause as e, readPath as r };
209
+ export { CollectionIndexes as C, type FieldClause as F, type GroupClause as G, type HashIndex as H, type IndexDef as I, type Operator as O, type Clause as a, type FilterClause as b, evaluateFieldClause as c, type CrossJoinClause as d, evaluateClause as e, readPath as r };
@@ -163,7 +163,31 @@ interface GroupClause {
163
163
  readonly op: 'and' | 'or';
164
164
  readonly clauses: readonly Clause[];
165
165
  }
166
- type Clause = FieldClause | FilterClause | WherePredicateClause | GroupClause;
166
+ /**
167
+ * Cartesian-product expansion clause. Appended to `QueryPlan.clauses`
168
+ * by `Query.crossJoin()`. Processed in declaration order by
169
+ * `executeClausePipeline` — NOT by `evaluateClause` (which is a
170
+ * per-record predicate and throws on this type).
171
+ */
172
+ interface CrossJoinClause {
173
+ readonly type: 'crossJoin';
174
+ /** Target collection name to cross-join against. */
175
+ readonly target: string;
176
+ /** Alias under which the right-side record is exposed on each result row. */
177
+ readonly as: string;
178
+ /**
179
+ * Lateral filter callback. `undefined` → full cartesian product.
180
+ * Two call shapes:
181
+ * - Subset: `(left) => TTarget[]` — returns the right rows for this left row
182
+ * - Predicate: `(left) => (right) => boolean` — executor materializes then filters
183
+ */
184
+ readonly on?: (left: unknown) => unknown[] | ((right: unknown) => boolean);
185
+ /** When `on:` was supplied as `{ predicate: name }`, the name is stored here for queryHash. */
186
+ readonly onPredicateName?: string;
187
+ /** Per-clause row ceiling override. `undefined` → `DEFAULT_CROSS_JOIN_MAX_ROWS`. */
188
+ readonly maxRows?: number;
189
+ }
190
+ type Clause = FieldClause | FilterClause | WherePredicateClause | GroupClause | CrossJoinClause;
167
191
  /**
168
192
  * Read a possibly nested field path like "address.city" from a record.
169
193
  * Returns undefined if any segment is missing.
@@ -182,4 +206,4 @@ declare function evaluateFieldClause(record: unknown, clause: FieldClause): bool
182
206
  */
183
207
  declare function evaluateClause(record: unknown, clause: Clause): boolean;
184
208
 
185
- export { CollectionIndexes as C, type FieldClause as F, type GroupClause as G, type HashIndex as H, type IndexDef as I, type Operator as O, type Clause as a, type FilterClause as b, evaluateFieldClause as c, evaluateClause as e, readPath as r };
209
+ export { CollectionIndexes as C, type FieldClause as F, type GroupClause as G, type HashIndex as H, type IndexDef as I, type Operator as O, type Clause as a, type FilterClause as b, evaluateFieldClause as c, type CrossJoinClause as d, evaluateClause as e, readPath as r };
@@ -12,9 +12,9 @@ import {
12
12
  resolveLocale,
13
13
  savePublicEnvelope,
14
14
  validatePublicEnvelopeInput
15
- } from "./chunk-WEA4TDTJ.js";
16
- import "./chunk-5OVIFUQE.js";
17
- import "./chunk-6HJ2ZALB.js";
15
+ } from "./chunk-BNUCCUES.js";
16
+ import "./chunk-WIRRPTFH.js";
17
+ import "./chunk-REQJJIPP.js";
18
18
  export {
19
19
  DEFAULT_PUBLIC_ENVELOPE_SCHEMA,
20
20
  PUBLIC_ENVELOPE_FIELDS,
@@ -28,4 +28,4 @@ export {
28
28
  savePublicEnvelope,
29
29
  validatePublicEnvelopeInput
30
30
  };
31
- //# sourceMappingURL=public-envelope-YKHKP74C.js.map
31
+ //# sourceMappingURL=public-envelope-BXPXMN3U.js.map
@@ -22,6 +22,9 @@ var query_exports = {};
22
22
  __export(query_exports, {
23
23
  Aggregation: () => Aggregation,
24
24
  CollectionIndexes: () => CollectionIndexes,
25
+ CrossJoinSourceUnknownError: () => CrossJoinSourceUnknownError,
26
+ CrossJoinTooLargeError: () => CrossJoinTooLargeError,
27
+ DEFAULT_CROSS_JOIN_MAX_ROWS: () => DEFAULT_CROSS_JOIN_MAX_ROWS,
25
28
  DEFAULT_JOIN_MAX_ROWS: () => DEFAULT_JOIN_MAX_ROWS,
26
29
  DanglingReferenceError: () => DanglingReferenceError,
27
30
  GROUPBY_MAX_CARDINALITY: () => GROUPBY_MAX_CARDINALITY,
@@ -119,6 +122,10 @@ function evaluateClause(record, clause) {
119
122
  return clause.fn(record);
120
123
  case "wherePredicate":
121
124
  return clause.fn(record, clause.ctx);
125
+ case "crossJoin":
126
+ throw new Error(
127
+ `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.`
128
+ );
122
129
  case "group":
123
130
  if (clause.op === "and") {
124
131
  for (const child of clause.clauses) {
@@ -208,6 +215,34 @@ var JoinTooLargeError = class extends NoydbError {
208
215
  this.side = opts.side;
209
216
  }
210
217
  };
218
+ var CrossJoinTooLargeError = class extends NoydbError {
219
+ target;
220
+ expected;
221
+ limit;
222
+ constructor(opts) {
223
+ super(
224
+ "CROSS_JOIN_TOO_LARGE",
225
+ `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} }).`
226
+ );
227
+ this.name = "CrossJoinTooLargeError";
228
+ this.target = opts.target;
229
+ this.expected = opts.expected;
230
+ this.limit = opts.limit;
231
+ }
232
+ };
233
+ var CrossJoinSourceUnknownError = class extends NoydbError {
234
+ target;
235
+ leftCollection;
236
+ constructor(target, leftCollection) {
237
+ super(
238
+ "CROSS_JOIN_SOURCE_UNKNOWN",
239
+ `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.`
240
+ );
241
+ this.name = "CrossJoinSourceUnknownError";
242
+ this.target = target;
243
+ this.leftCollection = leftCollection;
244
+ }
245
+ };
211
246
  var DanglingReferenceError = class extends NoydbError {
212
247
  field;
213
248
  target;
@@ -474,6 +509,7 @@ var EMPTY_PLAN = {
474
509
  offset: 0,
475
510
  joins: []
476
511
  };
512
+ var DEFAULT_CROSS_JOIN_MAX_ROWS = 5e4;
477
513
  var Query = class _Query {
478
514
  source;
479
515
  plan;
@@ -755,6 +791,78 @@ var Query = class _Query {
755
791
  this.predicates
756
792
  );
757
793
  }
794
+ /**
795
+ * Cartesian-product cross-join against `target` collection. Each result row
796
+ * carries the original `T` fields plus `result[as]` populated from every
797
+ * right-side row (or the filtered subset when `on:` is supplied).
798
+ *
799
+ * **Order matters:** `.where().crossJoin()` filters BEFORE expanding (cheaper);
800
+ * `.crossJoin().where('alias.field', ...)` filters AFTER (required when the
801
+ * where clause references the aliased fields).
802
+ *
803
+ * **Cost ceiling:** `CrossJoinTooLargeError` fires before allocation when
804
+ * `leftRows × rightRows` (or the cumulative lateral count) exceeds the limit.
805
+ * Default: 50,000 rows. Override per-clause with `{ maxRows: N }`.
806
+ *
807
+ * **`on:` shapes:**
808
+ * - `on: (left) => TTarget[]` — subset form (most efficient)
809
+ * - `on: (left) => (right) => boolean` — predicate form
810
+ * - `on: { predicate: 'name' }` — MV-safe, hash-tracked form
811
+ * (requires the Query to have been augmented via `_withPredicates`)
812
+ *
813
+ * Requires a JoinContext (constructed via `collection.query()`).
814
+ */
815
+ crossJoin(target, opts) {
816
+ if (!this.joinContext) {
817
+ throw new Error(
818
+ `Query.crossJoin("${target}"): requires a join context. Use collection.query() to construct a cross-join-capable Query instead of the Query constructor directly.`
819
+ );
820
+ }
821
+ let onFn;
822
+ let onPredicateName;
823
+ if (opts.on !== void 0) {
824
+ if (typeof opts.on === "function") {
825
+ onFn = opts.on;
826
+ if (this.predicates) {
827
+ console.warn(
828
+ `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.`
829
+ );
830
+ }
831
+ } else {
832
+ const predName = opts.on.predicate;
833
+ if (!this.predicates) {
834
+ throw new Error(
835
+ `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 } }.`
836
+ );
837
+ }
838
+ const decl = this.predicates.get(predName);
839
+ if (!decl) {
840
+ throw new Error(
841
+ `Query.crossJoin("${target}"): predicate "${predName}" not registered. Available: ${[...this.predicates.keys()].join(", ") || "(none)"}.`
842
+ );
843
+ }
844
+ const as = opts.as;
845
+ const predicateFn = decl.fn;
846
+ onFn = (_left) => (right) => predicateFn({ ..._left, [as]: right });
847
+ onPredicateName = predName;
848
+ }
849
+ }
850
+ const clause = {
851
+ type: "crossJoin",
852
+ target,
853
+ as: opts.as,
854
+ ...onFn !== void 0 && { on: onFn },
855
+ ...onPredicateName !== void 0 && { onPredicateName },
856
+ ...opts.maxRows !== void 0 && { maxRows: opts.maxRows }
857
+ };
858
+ return new _Query(
859
+ this.source,
860
+ { ...this.plan, clauses: [...this.plan.clauses, clause] },
861
+ this.joinContext,
862
+ this.aggregateStrategy,
863
+ this.predicates
864
+ );
865
+ }
758
866
  /**
759
867
  * Execute the plan and return the matching records. When the plan
760
868
  * carries any join legs, they are applied after `where` / `orderBy`
@@ -762,7 +870,7 @@ var Query = class _Query {
762
870
  * for the ordering rationale.
763
871
  */
764
872
  toArray() {
765
- const base = executePlanWithSource(this.source, this.plan);
873
+ const base = executePlanWithSource(this.source, this.plan, this.joinContext);
766
874
  if (this.plan.joins.length === 0) return base;
767
875
  if (!this.joinContext) {
768
876
  throw new Error(
@@ -786,6 +894,14 @@ var Query = class _Query {
786
894
  * intent is purely to count.
787
895
  */
788
896
  count() {
897
+ if (this.plan.clauses.some((c) => c.type === "crossJoin")) {
898
+ if (!this.joinContext) {
899
+ throw new Error(
900
+ `Query.count(): plan contains crossJoin clauses but no JoinContext is attached.`
901
+ );
902
+ }
903
+ return executeClausePipeline(this.source, this.plan.clauses, this.joinContext).length;
904
+ }
789
905
  const { candidates, remainingClauses } = candidateRecords(this.source, this.plan.clauses);
790
906
  if (remainingClauses.length === 0) return candidates.length;
791
907
  return filterRecords(candidates, remainingClauses).length;
@@ -833,7 +949,13 @@ var Query = class _Query {
833
949
  aggregate(spec) {
834
950
  const source = this.source;
835
951
  const clauses = this.plan.clauses;
952
+ const joinCtx = this.joinContext;
953
+ const hasCrossJoins = clauses.some((c) => c.type === "crossJoin");
836
954
  const executeRecords = () => {
955
+ if (hasCrossJoins) {
956
+ if (!joinCtx) throw new Error("Query.aggregate(): crossJoin requires a join context");
957
+ return executeClausePipeline(source, clauses, joinCtx);
958
+ }
837
959
  const { candidates, remainingClauses } = candidateRecords(source, clauses);
838
960
  return remainingClauses.length === 0 ? candidates : filterRecords(candidates, remainingClauses);
839
961
  };
@@ -850,7 +972,13 @@ var Query = class _Query {
850
972
  }
851
973
  const source = this.source;
852
974
  const clauses = this.plan.clauses;
975
+ const joinCtx = this.joinContext;
976
+ const hasCrossJoins = clauses.some((c) => c.type === "crossJoin");
853
977
  const executeRecords = () => {
978
+ if (hasCrossJoins) {
979
+ if (!joinCtx) throw new Error("Query.groupBy(): crossJoin requires a join context");
980
+ return executeClausePipeline(source, clauses, joinCtx);
981
+ }
854
982
  const { candidates, remainingClauses } = candidateRecords(source, clauses);
855
983
  return remainingClauses.length === 0 ? candidates : filterRecords(candidates, remainingClauses);
856
984
  };
@@ -964,6 +1092,21 @@ var Query = class _Query {
964
1092
  }
965
1093
  }
966
1094
  }
1095
+ if (this.joinContext) {
1096
+ const subscribedCross = /* @__PURE__ */ new Set();
1097
+ for (const clause of this.plan.clauses) {
1098
+ if (clause.type !== "crossJoin") continue;
1099
+ if (subscribedCross.has(clause.target)) continue;
1100
+ subscribedCross.add(clause.target);
1101
+ const rightSource = this.joinContext.resolveSource(clause.target);
1102
+ if (rightSource?.subscribe) {
1103
+ const rightSubscribe = rightSource.subscribe.bind(rightSource);
1104
+ upstreams.push({
1105
+ subscribe: (cb) => rightSubscribe(cb)
1106
+ });
1107
+ }
1108
+ }
1109
+ }
967
1110
  return buildLiveQuery(() => this.toArray(), upstreams);
968
1111
  }
969
1112
  /**
@@ -975,9 +1118,20 @@ var Query = class _Query {
975
1118
  return serializePlan(this.plan);
976
1119
  }
977
1120
  };
978
- function executePlanWithSource(source, plan) {
979
- const { candidates, remainingClauses } = candidateRecords(source, plan.clauses);
980
- let result = remainingClauses.length === 0 ? [...candidates] : filterRecords(candidates, remainingClauses);
1121
+ function executePlanWithSource(source, plan, joinContext) {
1122
+ const hasCrossJoins = plan.clauses.some((c) => c.type === "crossJoin");
1123
+ let result;
1124
+ if (hasCrossJoins) {
1125
+ if (!joinContext) {
1126
+ throw new Error(
1127
+ `Query.toArray(): plan contains crossJoin clauses but no JoinContext is attached. Use collection.query() instead of new Query() for cross-join support.`
1128
+ );
1129
+ }
1130
+ result = executeClausePipeline(source, plan.clauses, joinContext);
1131
+ } else {
1132
+ const { candidates, remainingClauses } = candidateRecords(source, plan.clauses);
1133
+ result = remainingClauses.length === 0 ? [...candidates] : filterRecords(candidates, remainingClauses);
1134
+ }
981
1135
  if (plan.orderBy.length > 0) {
982
1136
  result = sortRecords(result, plan.orderBy);
983
1137
  }
@@ -1027,6 +1181,11 @@ function materializeIds(ids, lookupById) {
1027
1181
  return out;
1028
1182
  }
1029
1183
  function executePlan(records, plan) {
1184
+ if (plan.clauses.some((c) => c.type === "crossJoin")) {
1185
+ throw new Error(
1186
+ `executePlan(): does not support crossJoin clauses. executePlan is a stateless pure function \u2014 it cannot resolve cross-join right-side collections. Use Query.toArray() (via collection.query()) instead.`
1187
+ );
1188
+ }
1030
1189
  let result = filterRecords(records, plan.clauses);
1031
1190
  if (plan.orderBy.length > 0) {
1032
1191
  result = sortRecords(result, plan.orderBy);
@@ -1054,6 +1213,74 @@ function filterRecords(records, clauses) {
1054
1213
  }
1055
1214
  return out;
1056
1215
  }
1216
+ function executeClausePipeline(source, clauses, joinContext) {
1217
+ let rel = [...source.snapshot()];
1218
+ let filterBatch = [];
1219
+ for (const clause of clauses) {
1220
+ if (clause.type === "crossJoin") {
1221
+ if (filterBatch.length > 0) {
1222
+ rel = filterRecords(rel, filterBatch);
1223
+ filterBatch = [];
1224
+ }
1225
+ const rightSource = joinContext.resolveSource(clause.target);
1226
+ if (!rightSource) {
1227
+ throw new CrossJoinSourceUnknownError(clause.target, joinContext.leftCollection);
1228
+ }
1229
+ rel = applyCrossJoin(rel, clause, rightSource);
1230
+ } else {
1231
+ filterBatch.push(clause);
1232
+ }
1233
+ }
1234
+ if (filterBatch.length > 0) {
1235
+ rel = filterRecords(rel, filterBatch);
1236
+ }
1237
+ return rel;
1238
+ }
1239
+ function applyCrossJoin(leftRel, clause, rightSource) {
1240
+ const rightRows = rightSource.snapshot();
1241
+ const maxRows = clause.maxRows ?? DEFAULT_CROSS_JOIN_MAX_ROWS;
1242
+ const { as } = clause;
1243
+ if (!clause.on) {
1244
+ const product = leftRel.length * rightRows.length;
1245
+ if (product > maxRows) {
1246
+ throw new CrossJoinTooLargeError({ target: clause.target, expected: product, limit: maxRows });
1247
+ }
1248
+ const expanded2 = [];
1249
+ for (const left of leftRel) {
1250
+ const leftObj = left;
1251
+ for (const right of rightRows) {
1252
+ expanded2.push({ ...leftObj, [as]: right });
1253
+ }
1254
+ }
1255
+ return expanded2;
1256
+ }
1257
+ const expanded = [];
1258
+ let cumulative = 0;
1259
+ for (const left of leftRel) {
1260
+ const callbackResult = clause.on(left);
1261
+ let filteredRight;
1262
+ if (Array.isArray(callbackResult)) {
1263
+ filteredRight = callbackResult;
1264
+ } else {
1265
+ filteredRight = rightRows.filter(
1266
+ callbackResult
1267
+ );
1268
+ }
1269
+ cumulative += filteredRight.length;
1270
+ if (cumulative > maxRows) {
1271
+ throw new CrossJoinTooLargeError({
1272
+ target: clause.target,
1273
+ expected: cumulative,
1274
+ limit: maxRows
1275
+ });
1276
+ }
1277
+ const leftObj = left;
1278
+ for (const right of filteredRight) {
1279
+ expanded.push({ ...leftObj, [as]: right });
1280
+ }
1281
+ }
1282
+ return expanded;
1283
+ }
1057
1284
  function sortRecords(records, orderBy) {
1058
1285
  return [...records].sort((a, b) => {
1059
1286
  for (const { field, direction } of orderBy) {
@@ -1116,6 +1343,16 @@ function serializeClause(clause) {
1116
1343
  clauses: clause.clauses.map(serializeClause)
1117
1344
  };
1118
1345
  }
1346
+ if (clause.type === "crossJoin") {
1347
+ return {
1348
+ type: "crossJoin",
1349
+ target: clause.target,
1350
+ as: clause.as,
1351
+ on: clause.on ? "[function]" : void 0,
1352
+ onPredicateName: clause.onPredicateName,
1353
+ maxRows: clause.maxRows
1354
+ };
1355
+ }
1119
1356
  return clause;
1120
1357
  }
1121
1358
  function canonicalCtxHash(ctx) {
@@ -2102,6 +2339,9 @@ function coerceRefKey2(value) {
2102
2339
  0 && (module.exports = {
2103
2340
  Aggregation,
2104
2341
  CollectionIndexes,
2342
+ CrossJoinSourceUnknownError,
2343
+ CrossJoinTooLargeError,
2344
+ DEFAULT_CROSS_JOIN_MAX_ROWS,
2105
2345
  DEFAULT_JOIN_MAX_ROWS,
2106
2346
  DanglingReferenceError,
2107
2347
  GROUPBY_MAX_CARDINALITY,