@noy-db/hub 0.3.0-pre.3 → 0.3.0-pre.4

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 (386) hide show
  1. package/dist/adapter/index.d.ts +2 -2
  2. package/dist/adapter/index.js +1 -1
  3. package/dist/aggregate/index.d.ts +3 -3
  4. package/dist/aggregate/index.js +4 -4
  5. package/dist/api-JOXUNSKP.js +20 -0
  6. package/dist/as/index.d.ts +4 -4
  7. package/dist/as/index.js +12 -9
  8. package/dist/at/index.d.ts +2 -2
  9. package/dist/attestation/index.d.ts +3 -3
  10. package/dist/attestation/index.js +21 -18
  11. package/dist/attestation/index.js.map +1 -1
  12. package/dist/{backup-NGRJ46SH.js → backup-MOB27UUN.js} +12 -9
  13. package/dist/{backup-NGRJ46SH.js.map → backup-MOB27UUN.js.map} +1 -1
  14. package/dist/blobs/index.d.ts +4 -4
  15. package/dist/blobs/index.js +11 -8
  16. package/dist/blobs/index.js.map +1 -1
  17. package/dist/bundle/index.d.ts +5 -5
  18. package/dist/bundle/index.js +21 -18
  19. package/dist/bundle/index.js.map +1 -1
  20. package/dist/{bundle-B-P3_Jvb.d.ts → bundle-Bs13EZtX.d.ts} +1 -1
  21. package/dist/by/index.js +2 -2
  22. package/dist/cargo/index.d.ts +4 -4
  23. package/dist/cargo/index.js +23 -20
  24. package/dist/{chunk-VBYVKOMJ.js → chunk-3QRQOBS7.js} +3 -3
  25. package/dist/{chunk-JFYIHLU3.js → chunk-3Y4QLJ6K.js} +2 -2
  26. package/dist/{chunk-BZIWKN74.js → chunk-43ISXURO.js} +2 -2
  27. package/dist/{chunk-7IP75FP2.js → chunk-4K3MQ5S3.js} +2 -2
  28. package/dist/{chunk-6DP5HBQD.js → chunk-5CY35H55.js} +9 -9
  29. package/dist/chunk-5EWYUR5P.js +37 -0
  30. package/dist/chunk-5EWYUR5P.js.map +1 -0
  31. package/dist/{chunk-2KSPDSWI.js → chunk-5MRE3C4Q.js} +5 -5
  32. package/dist/{chunk-5ZPWVNL3.js → chunk-5W7AOFWA.js} +2 -2
  33. package/dist/{chunk-PUNJAEY6.js → chunk-6HNKCKFZ.js} +7 -7
  34. package/dist/{chunk-PJDK2PPQ.js → chunk-6RXPSMKR.js} +3 -3
  35. package/dist/{chunk-Z44OY24N.js → chunk-7J7JRYXW.js} +9 -5
  36. package/dist/chunk-7J7JRYXW.js.map +1 -0
  37. package/dist/{chunk-MCJAUQGE.js → chunk-A5DYVMDR.js} +3 -3
  38. package/dist/{chunk-MIOLJG2R.js → chunk-AF5ZRTZ4.js} +5 -2
  39. package/dist/chunk-AF5ZRTZ4.js.map +1 -0
  40. package/dist/{chunk-TICO2I2O.js → chunk-BKGIWGCX.js} +2 -2
  41. package/dist/{chunk-O5DNEXQC.js → chunk-BMQOH7MM.js} +2 -2
  42. package/dist/{chunk-U6OM4E67.js → chunk-CPXPHQGX.js} +6 -6
  43. package/dist/{chunk-3UDPDRUC.js → chunk-EWR7HL3K.js} +4 -4
  44. package/dist/{chunk-CVXLJIAV.js → chunk-FH52CDEW.js} +5 -5
  45. package/dist/chunk-G4MGYGSS.js +130 -0
  46. package/dist/chunk-G4MGYGSS.js.map +1 -0
  47. package/dist/{chunk-FELHYKIO.js → chunk-G7RDYYTE.js} +2 -2
  48. package/dist/{chunk-N2FP26NH.js → chunk-GBTUANXF.js} +16 -297
  49. package/dist/chunk-GBTUANXF.js.map +1 -0
  50. package/dist/{chunk-UP6EMMDI.js → chunk-GOUNIHFA.js} +10 -10
  51. package/dist/{chunk-DHIN36UC.js → chunk-GQOT6QJR.js} +8 -8
  52. package/dist/{chunk-DGUR3CC4.js → chunk-GXGK22QU.js} +2 -2
  53. package/dist/{chunk-YTIAXSUE.js → chunk-GZZL5R73.js} +4 -4
  54. package/dist/{chunk-E4YJUNPU.js → chunk-H5XRIJX3.js} +7 -7
  55. package/dist/{chunk-DA34OEZU.js → chunk-H7RYPVMJ.js} +2 -2
  56. package/dist/{chunk-2ZORB5RW.js → chunk-HBKDR7R3.js} +3 -3
  57. package/dist/{chunk-BV7KNFJY.js → chunk-HLUKZ36Q.js} +9 -9
  58. package/dist/{chunk-ZNI3RTFV.js → chunk-HMXLN43G.js} +2 -2
  59. package/dist/{chunk-BYW7EU5L.js → chunk-HY6ZGGEC.js} +2 -2
  60. package/dist/{chunk-OVIVYAQL.js → chunk-K5P46KB3.js} +25 -10
  61. package/dist/chunk-K5P46KB3.js.map +1 -0
  62. package/dist/chunk-KYY7L72M.js +106 -0
  63. package/dist/chunk-KYY7L72M.js.map +1 -0
  64. package/dist/{chunk-5Z3RNFJC.js → chunk-LIP6JWYK.js} +3 -3
  65. package/dist/{chunk-OCDUQUAP.js → chunk-LN22XH4B.js} +1 -1
  66. package/dist/chunk-LN22XH4B.js.map +1 -0
  67. package/dist/chunk-LP7BEXCT.js +32 -0
  68. package/dist/chunk-LP7BEXCT.js.map +1 -0
  69. package/dist/{chunk-IJW6K6UX.js → chunk-LPRPVCNY.js} +5 -5
  70. package/dist/{chunk-6EVZXETK.js → chunk-M66NAZA4.js} +3 -3
  71. package/dist/{chunk-HGQG3VIP.js → chunk-N5YVZHCB.js} +2 -2
  72. package/dist/{chunk-IWVWB7BZ.js → chunk-NB47TXGP.js} +12 -12
  73. package/dist/chunk-NO272T7Q.js +194 -0
  74. package/dist/chunk-NO272T7Q.js.map +1 -0
  75. package/dist/{chunk-6OQ7NKMZ.js → chunk-O2DB4C3M.js} +6 -6
  76. package/dist/{chunk-LHYQE3BP.js → chunk-OFBFAVLI.js} +6 -6
  77. package/dist/{chunk-ZFME46HJ.js → chunk-OPTFANOX.js} +3 -3
  78. package/dist/chunk-OPTFANOX.js.map +1 -0
  79. package/dist/{chunk-5EZAJEES.js → chunk-OVO2RZAE.js} +81 -27
  80. package/dist/chunk-OVO2RZAE.js.map +1 -0
  81. package/dist/{chunk-6I2YPLAG.js → chunk-P27Z66EB.js} +7 -7
  82. package/dist/{chunk-7MHVHGQZ.js → chunk-P2LDXRGP.js} +2 -2
  83. package/dist/chunk-P3NGV5RV.js +41 -0
  84. package/dist/chunk-P3NGV5RV.js.map +1 -0
  85. package/dist/{chunk-YN66UOXT.js → chunk-P3V7JTB6.js} +25 -9
  86. package/dist/{chunk-YN66UOXT.js.map → chunk-P3V7JTB6.js.map} +1 -1
  87. package/dist/{chunk-NPVICKZE.js → chunk-P5WXDYMD.js} +8 -197
  88. package/dist/chunk-P5WXDYMD.js.map +1 -0
  89. package/dist/{chunk-CPAROOKP.js → chunk-PGFY7IRW.js} +12 -41
  90. package/dist/chunk-PGFY7IRW.js.map +1 -0
  91. package/dist/{chunk-6RASM2J4.js → chunk-QKVILR7N.js} +2 -2
  92. package/dist/{chunk-LKBLAUOB.js → chunk-QNTEDPWP.js} +3 -3
  93. package/dist/{chunk-P6UXDALK.js → chunk-RDHAGBEB.js} +3 -3
  94. package/dist/{chunk-XRE4JOEO.js → chunk-RTS23VIJ.js} +2 -2
  95. package/dist/{chunk-PYWW4KLO.js → chunk-SEQ2JI3Y.js} +9 -9
  96. package/dist/{chunk-VHEEU4ZO.js → chunk-SW56GSYC.js} +2 -2
  97. package/dist/{chunk-46YGCU6Z.js → chunk-T2EGAXPM.js} +2 -2
  98. package/dist/{chunk-LES2Z7B4.js → chunk-T45LAT2Y.js} +2 -2
  99. package/dist/{chunk-4NMFWOS2.js → chunk-T65UZXR6.js} +3 -3
  100. package/dist/{chunk-2N4MUSF3.js → chunk-TB5RNNJ4.js} +7 -7
  101. package/dist/chunk-TCIUO62Z.js +29 -0
  102. package/dist/chunk-TCIUO62Z.js.map +1 -0
  103. package/dist/chunk-THNJ3IKU.js +17 -0
  104. package/dist/chunk-THNJ3IKU.js.map +1 -0
  105. package/dist/{chunk-L4IRFTIF.js → chunk-TLJOJBZD.js} +3 -23
  106. package/dist/chunk-TLJOJBZD.js.map +1 -0
  107. package/dist/chunk-TQ3REHVF.js +95 -0
  108. package/dist/chunk-TQ3REHVF.js.map +1 -0
  109. package/dist/{chunk-NIA5VQ7G.js → chunk-TVRQ3RYH.js} +28 -9
  110. package/dist/chunk-TVRQ3RYH.js.map +1 -0
  111. package/dist/{chunk-6CNLU4TO.js → chunk-TYGW5TOR.js} +7 -7
  112. package/dist/{chunk-BLZRNHMG.js → chunk-U23JUUPX.js} +8 -1
  113. package/dist/{chunk-BLZRNHMG.js.map → chunk-U23JUUPX.js.map} +1 -1
  114. package/dist/{chunk-U5DWHU3S.js → chunk-U24XHXNK.js} +2 -2
  115. package/dist/chunk-ULIHDPKL.js +94 -0
  116. package/dist/chunk-ULIHDPKL.js.map +1 -0
  117. package/dist/chunk-UOEWDCUX.js +69 -0
  118. package/dist/chunk-UOEWDCUX.js.map +1 -0
  119. package/dist/{chunk-5A6TC3RQ.js → chunk-VAWY44JW.js} +8 -8
  120. package/dist/{chunk-5A6TC3RQ.js.map → chunk-VAWY44JW.js.map} +1 -1
  121. package/dist/{chunk-NTHKOFVL.js → chunk-VFRNWE5P.js} +52 -8
  122. package/dist/chunk-VFRNWE5P.js.map +1 -0
  123. package/dist/{chunk-4DZGZ7II.js → chunk-VMJ5URU7.js} +8 -8
  124. package/dist/chunk-VMJ5URU7.js.map +1 -0
  125. package/dist/{chunk-YDP2SA5K.js → chunk-VPCMJ5Z4.js} +5 -5
  126. package/dist/{chunk-ZAWD6O46.js → chunk-VRPBEOWU.js} +2 -2
  127. package/dist/{chunk-AY4P6PHN.js → chunk-VWGCJUTV.js} +2 -2
  128. package/dist/{chunk-IIK7W3AN.js → chunk-XJR3COJO.js} +5 -5
  129. package/dist/{chunk-ZD4D7UM6.js → chunk-XYYW64LB.js} +2 -2
  130. package/dist/{chunk-4NZCZUGL.js → chunk-YFF2RP3X.js} +2 -2
  131. package/dist/{chunk-WVIIJPTJ.js → chunk-Z3FZC5GV.js} +7 -7
  132. package/dist/{chunk-55HDKLI3.js → chunk-Z5PIUYNB.js} +8 -8
  133. package/dist/{chunk-ZRDYQZYH.js → chunk-Z7KI4WHR.js} +2 -2
  134. package/dist/chunk-ZKF6HH7V.js +120 -0
  135. package/dist/chunk-ZKF6HH7V.js.map +1 -0
  136. package/dist/{chunk-P6DN5QU7.js → chunk-ZKYMKF2S.js} +8 -8
  137. package/dist/{chunk-ADBMJDBW.js → chunk-ZPHDGUZZ.js} +445 -1077
  138. package/dist/chunk-ZPHDGUZZ.js.map +1 -0
  139. package/dist/{chunk-NMRKAGHE.js → chunk-ZROMNP7Q.js} +2 -2
  140. package/dist/classified/index.d.ts +4 -4
  141. package/dist/classified/index.js +3 -3
  142. package/dist/collection-facade-MKEBZDWW.js +39 -0
  143. package/dist/computed-BMMEFRFJ.js +11 -0
  144. package/dist/config-drift-KGM7ZRW4.js +24 -0
  145. package/dist/config-drift-KGM7ZRW4.js.map +1 -0
  146. package/dist/consent/index.d.ts +3 -3
  147. package/dist/consent/index.js +10 -7
  148. package/dist/consent/index.js.map +1 -1
  149. package/dist/crdt/index.d.ts +3 -3
  150. package/dist/delegation-BQNIEHZE.js +25 -0
  151. package/dist/derivations/index.d.ts +4 -4
  152. package/dist/derivations/index.js +12 -9
  153. package/dist/describe/index.d.ts +1 -1
  154. package/dist/{describe-0tiXAjoO.d.ts → describe-C6iHNlqJ.d.ts} +9 -0
  155. package/dist/{dev-unlock-B_s9DUWa.d.ts → dev-unlock-Cqd5Xv5J.d.ts} +1 -1
  156. package/dist/{enclave-IS7HZSQ7.js → enclave-YN6223OG.js} +21 -8
  157. package/dist/executor-CBTNU5VZ.js +9 -0
  158. package/dist/executor-DJHNSTIR.js +9 -0
  159. package/dist/executor-FGISLQIN.js +21 -0
  160. package/dist/export-accessible-P7SLRLK3.js +23 -0
  161. package/dist/extract-partition-RNVSFHAB.js +36 -0
  162. package/dist/{fanout-sidecar-DDKRG2MX.js → fanout-sidecar-WS22Q5WH.js} +12 -9
  163. package/dist/{fanout-sidecar-DDKRG2MX.js.map → fanout-sidecar-WS22Q5WH.js.map} +1 -1
  164. package/dist/fence-watcher-DHQ775JB.js +69 -0
  165. package/dist/fence-watcher-DHQ775JB.js.map +1 -0
  166. package/dist/find-RNBG7LBY.js +11 -0
  167. package/dist/forget/index.js +10 -7
  168. package/dist/forget/index.js.map +1 -1
  169. package/dist/guards/index.d.ts +4 -4
  170. package/dist/guards/index.js +3 -3
  171. package/dist/{hash-CWxn7sf6.d.ts → hash-D8Q5MJLA.d.ts} +1 -1
  172. package/dist/history/index.d.ts +4 -4
  173. package/dist/history/index.js +12 -9
  174. package/dist/history/index.js.map +1 -1
  175. package/dist/i18n/index.d.ts +3 -3
  176. package/dist/i18n/index.js +14 -11
  177. package/dist/i18n/index.js.map +1 -1
  178. package/dist/in/index.d.ts +2 -2
  179. package/dist/{index-D05bV0_g.d.ts → index-D4GQe1Rx.d.ts} +818 -49
  180. package/dist/{index-DTMUUwwW.d.ts → index-DRxk8q_7.d.ts} +3 -3
  181. package/dist/index.d.ts +46 -17
  182. package/dist/index.js +1021 -122
  183. package/dist/index.js.map +1 -1
  184. package/dist/indexing/index.d.ts +3 -3
  185. package/dist/indexing/index.js +4 -4
  186. package/dist/issue-W5QG53B5.js +19 -0
  187. package/dist/json-schema-I22JCYCG.js +44 -0
  188. package/dist/json-schema-I22JCYCG.js.map +1 -0
  189. package/dist/kernel/index.d.ts +3 -3
  190. package/dist/kernel/index.js +13 -10
  191. package/dist/lazy/index.d.ts +21 -0
  192. package/dist/lazy/index.js +12 -0
  193. package/dist/{ledger-YUAJUNFP.js → ledger-KZWBKAG5.js} +12 -9
  194. package/dist/liberate-GMGCHIND.js +24 -0
  195. package/dist/link-set-UQEIYQAM.js +31 -0
  196. package/dist/materialized-views/index.d.ts +4 -4
  197. package/dist/materialized-views/index.js +16 -13
  198. package/dist/{mime-magic-Qr_4HjP6.d.ts → mime-magic-DmwT7OzZ.d.ts} +1 -1
  199. package/dist/noydb-KS2O2MRI.js +60 -0
  200. package/dist/on/index.d.ts +2 -2
  201. package/dist/on/index.js +10 -7
  202. package/dist/overlay-views/index.d.ts +4 -4
  203. package/dist/overlay-views/index.js +4 -4
  204. package/dist/periods/index.d.ts +3 -3
  205. package/dist/periods/index.js +13 -10
  206. package/dist/pod/index.d.ts +3 -3
  207. package/dist/pod/index.js +12 -9
  208. package/dist/{policy-LRE6HTO5.js → policy-YIKUH4AD.js} +5 -5
  209. package/dist/portability/index.d.ts +3 -3
  210. package/dist/portability/index.js +8 -8
  211. package/dist/{public-envelope-WVRRUVAJ.js → public-envelope-MRN5YYZZ.js} +4 -4
  212. package/dist/query/index.d.ts +2 -2
  213. package/dist/query/index.js +6 -6
  214. package/dist/register-K6DDSIXN.js +21 -0
  215. package/dist/registry-IMNMHWTM.js +17 -0
  216. package/dist/registry-K6VUQXKV.js +19 -0
  217. package/dist/registry-ZVO3T4M5.js +9 -0
  218. package/dist/request-withdrawal-EHALV66Y.js +31 -0
  219. package/dist/request-withdrawal-EHALV66Y.js.map +1 -0
  220. package/dist/{reveal-WSUHXCSS.js → reveal-TBLTFWQ2.js} +6 -5
  221. package/dist/{reveal-WSUHXCSS.js.map → reveal-TBLTFWQ2.js.map} +1 -1
  222. package/dist/revoke-MHAUAESM.js +24 -0
  223. package/dist/revoke-MHAUAESM.js.map +1 -0
  224. package/dist/sealed-record/index.d.ts +3 -3
  225. package/dist/sealed-record/index.js +13 -10
  226. package/dist/sealed-record/index.js.map +1 -1
  227. package/dist/session/index.d.ts +4 -4
  228. package/dist/session/index.js +10 -7
  229. package/dist/session/index.js.map +1 -1
  230. package/dist/shadow/index.d.ts +3 -3
  231. package/dist/shadow/index.js +2 -2
  232. package/dist/signer-PQ74YXRY.js +25 -0
  233. package/dist/signer-PQ74YXRY.js.map +1 -0
  234. package/dist/snapshots/index.d.ts +3 -3
  235. package/dist/snapshots/index.js +11 -8
  236. package/dist/snapshots/index.js.map +1 -1
  237. package/dist/{stale-LX4BR43V.js → stale-7Q62KVI3.js} +2 -2
  238. package/dist/stale-7Q62KVI3.js.map +1 -0
  239. package/dist/storage-5E6YB2JY.js +21 -0
  240. package/dist/storage-5E6YB2JY.js.map +1 -0
  241. package/dist/{store-coordination-provider-KTRIC6PR.js → store-coordination-provider-JJCEMTAE.js} +3 -3
  242. package/dist/sync/index.d.ts +2 -2
  243. package/dist/sync/index.js +10 -7
  244. package/dist/sync/index.js.map +1 -1
  245. package/dist/team/index.d.ts +18 -4
  246. package/dist/team/index.js +24 -14
  247. package/dist/tiers/index.d.ts +2 -2
  248. package/dist/tiers/index.js +11 -8
  249. package/dist/to/index.d.ts +2 -2
  250. package/dist/to/index.js +1 -1
  251. package/dist/{transition-guard-C1Pyz8nH.d.ts → transition-guard-C4hvR-Ac.d.ts} +1 -1
  252. package/dist/tx/index.d.ts +3 -3
  253. package/dist/tx/index.js +3 -3
  254. package/dist/ui/index.d.ts +1 -1
  255. package/dist/util/index.js +1 -1
  256. package/dist/validators-Ctgkj5qd.d.ts +101 -0
  257. package/dist/{vault-diff-Fn0WeY2w.d.ts → vault-diff-B1Ir6EGs.d.ts} +1 -1
  258. package/dist/{verify-SW6J63Q2.js → verify-YB5LQHNA.js} +11 -7
  259. package/dist/{verify-SW6J63Q2.js.map → verify-YB5LQHNA.js.map} +1 -1
  260. package/dist/walk-5C3GPKT2.js +241 -0
  261. package/dist/walk-5C3GPKT2.js.map +1 -0
  262. package/dist/with/index.d.ts +3 -3
  263. package/dist/with/index.js +12 -9
  264. package/dist/{with-materialized-view-NKxs6iK5.d.ts → with-materialized-view-Bp65kKdQ.d.ts} +1 -1
  265. package/dist/{with-overlayed-view-B4fPYHwV.d.ts → with-overlayed-view-BRhdQNrK.d.ts} +1 -1
  266. package/dist/{with-rollup-Bl0sRFEt.d.ts → with-rollup-bQRPc3y1.d.ts} +1 -1
  267. package/dist/withdraw-accessible-JMX2TCPX.js +28 -0
  268. package/dist/withdraw-accessible-JMX2TCPX.js.map +1 -0
  269. package/package.json +7 -3
  270. package/dist/api-LORZ2EZU.js +0 -17
  271. package/dist/chunk-4DZGZ7II.js.map +0 -1
  272. package/dist/chunk-5EZAJEES.js.map +0 -1
  273. package/dist/chunk-ADBMJDBW.js.map +0 -1
  274. package/dist/chunk-CPAROOKP.js.map +0 -1
  275. package/dist/chunk-L4IRFTIF.js.map +0 -1
  276. package/dist/chunk-MIOLJG2R.js.map +0 -1
  277. package/dist/chunk-N2FP26NH.js.map +0 -1
  278. package/dist/chunk-NIA5VQ7G.js.map +0 -1
  279. package/dist/chunk-NPVICKZE.js.map +0 -1
  280. package/dist/chunk-NTHKOFVL.js.map +0 -1
  281. package/dist/chunk-OCDUQUAP.js.map +0 -1
  282. package/dist/chunk-OVIVYAQL.js.map +0 -1
  283. package/dist/chunk-QLQS5A7X.js +0 -524
  284. package/dist/chunk-QLQS5A7X.js.map +0 -1
  285. package/dist/chunk-Z44OY24N.js.map +0 -1
  286. package/dist/chunk-ZFME46HJ.js.map +0 -1
  287. package/dist/collection-facade-XPVRHBGU.js +0 -36
  288. package/dist/delegation-4HUHUE6T.js +0 -22
  289. package/dist/executor-ANFBCOYA.js +0 -9
  290. package/dist/executor-IKT47SH2.js +0 -9
  291. package/dist/executor-OIECZXTV.js +0 -18
  292. package/dist/export-accessible-NZWCFZHL.js +0 -20
  293. package/dist/extract-partition-52LX6RQH.js +0 -33
  294. package/dist/issue-F4SYPJGJ.js +0 -16
  295. package/dist/liberate-6LDETRIW.js +0 -21
  296. package/dist/noydb-WQNBVJIG.js +0 -54
  297. package/dist/registry-6HZ2JSQ7.js +0 -14
  298. package/dist/registry-GPXZQ7DT.js +0 -9
  299. package/dist/registry-USYD2ECC.js +0 -16
  300. package/dist/request-withdrawal-54V4L6CR.js +0 -28
  301. package/dist/revoke-JV26NTQD.js +0 -21
  302. package/dist/signer-AE56T5HE.js +0 -22
  303. package/dist/validators-Dzn7T-3x.d.ts +0 -62
  304. package/dist/withdraw-accessible-DGA4V2TP.js +0 -25
  305. /package/dist/{api-LORZ2EZU.js.map → api-JOXUNSKP.js.map} +0 -0
  306. /package/dist/{chunk-VBYVKOMJ.js.map → chunk-3QRQOBS7.js.map} +0 -0
  307. /package/dist/{chunk-JFYIHLU3.js.map → chunk-3Y4QLJ6K.js.map} +0 -0
  308. /package/dist/{chunk-BZIWKN74.js.map → chunk-43ISXURO.js.map} +0 -0
  309. /package/dist/{chunk-7IP75FP2.js.map → chunk-4K3MQ5S3.js.map} +0 -0
  310. /package/dist/{chunk-6DP5HBQD.js.map → chunk-5CY35H55.js.map} +0 -0
  311. /package/dist/{chunk-2KSPDSWI.js.map → chunk-5MRE3C4Q.js.map} +0 -0
  312. /package/dist/{chunk-5ZPWVNL3.js.map → chunk-5W7AOFWA.js.map} +0 -0
  313. /package/dist/{chunk-PUNJAEY6.js.map → chunk-6HNKCKFZ.js.map} +0 -0
  314. /package/dist/{chunk-PJDK2PPQ.js.map → chunk-6RXPSMKR.js.map} +0 -0
  315. /package/dist/{chunk-MCJAUQGE.js.map → chunk-A5DYVMDR.js.map} +0 -0
  316. /package/dist/{chunk-TICO2I2O.js.map → chunk-BKGIWGCX.js.map} +0 -0
  317. /package/dist/{chunk-O5DNEXQC.js.map → chunk-BMQOH7MM.js.map} +0 -0
  318. /package/dist/{chunk-U6OM4E67.js.map → chunk-CPXPHQGX.js.map} +0 -0
  319. /package/dist/{chunk-3UDPDRUC.js.map → chunk-EWR7HL3K.js.map} +0 -0
  320. /package/dist/{chunk-CVXLJIAV.js.map → chunk-FH52CDEW.js.map} +0 -0
  321. /package/dist/{chunk-FELHYKIO.js.map → chunk-G7RDYYTE.js.map} +0 -0
  322. /package/dist/{chunk-UP6EMMDI.js.map → chunk-GOUNIHFA.js.map} +0 -0
  323. /package/dist/{chunk-DHIN36UC.js.map → chunk-GQOT6QJR.js.map} +0 -0
  324. /package/dist/{chunk-DGUR3CC4.js.map → chunk-GXGK22QU.js.map} +0 -0
  325. /package/dist/{chunk-YTIAXSUE.js.map → chunk-GZZL5R73.js.map} +0 -0
  326. /package/dist/{chunk-E4YJUNPU.js.map → chunk-H5XRIJX3.js.map} +0 -0
  327. /package/dist/{chunk-DA34OEZU.js.map → chunk-H7RYPVMJ.js.map} +0 -0
  328. /package/dist/{chunk-2ZORB5RW.js.map → chunk-HBKDR7R3.js.map} +0 -0
  329. /package/dist/{chunk-BV7KNFJY.js.map → chunk-HLUKZ36Q.js.map} +0 -0
  330. /package/dist/{chunk-ZNI3RTFV.js.map → chunk-HMXLN43G.js.map} +0 -0
  331. /package/dist/{chunk-BYW7EU5L.js.map → chunk-HY6ZGGEC.js.map} +0 -0
  332. /package/dist/{chunk-5Z3RNFJC.js.map → chunk-LIP6JWYK.js.map} +0 -0
  333. /package/dist/{chunk-IJW6K6UX.js.map → chunk-LPRPVCNY.js.map} +0 -0
  334. /package/dist/{chunk-6EVZXETK.js.map → chunk-M66NAZA4.js.map} +0 -0
  335. /package/dist/{chunk-HGQG3VIP.js.map → chunk-N5YVZHCB.js.map} +0 -0
  336. /package/dist/{chunk-IWVWB7BZ.js.map → chunk-NB47TXGP.js.map} +0 -0
  337. /package/dist/{chunk-6OQ7NKMZ.js.map → chunk-O2DB4C3M.js.map} +0 -0
  338. /package/dist/{chunk-LHYQE3BP.js.map → chunk-OFBFAVLI.js.map} +0 -0
  339. /package/dist/{chunk-6I2YPLAG.js.map → chunk-P27Z66EB.js.map} +0 -0
  340. /package/dist/{chunk-7MHVHGQZ.js.map → chunk-P2LDXRGP.js.map} +0 -0
  341. /package/dist/{chunk-6RASM2J4.js.map → chunk-QKVILR7N.js.map} +0 -0
  342. /package/dist/{chunk-LKBLAUOB.js.map → chunk-QNTEDPWP.js.map} +0 -0
  343. /package/dist/{chunk-P6UXDALK.js.map → chunk-RDHAGBEB.js.map} +0 -0
  344. /package/dist/{chunk-XRE4JOEO.js.map → chunk-RTS23VIJ.js.map} +0 -0
  345. /package/dist/{chunk-PYWW4KLO.js.map → chunk-SEQ2JI3Y.js.map} +0 -0
  346. /package/dist/{chunk-VHEEU4ZO.js.map → chunk-SW56GSYC.js.map} +0 -0
  347. /package/dist/{chunk-46YGCU6Z.js.map → chunk-T2EGAXPM.js.map} +0 -0
  348. /package/dist/{chunk-LES2Z7B4.js.map → chunk-T45LAT2Y.js.map} +0 -0
  349. /package/dist/{chunk-4NMFWOS2.js.map → chunk-T65UZXR6.js.map} +0 -0
  350. /package/dist/{chunk-2N4MUSF3.js.map → chunk-TB5RNNJ4.js.map} +0 -0
  351. /package/dist/{chunk-6CNLU4TO.js.map → chunk-TYGW5TOR.js.map} +0 -0
  352. /package/dist/{chunk-U5DWHU3S.js.map → chunk-U24XHXNK.js.map} +0 -0
  353. /package/dist/{chunk-YDP2SA5K.js.map → chunk-VPCMJ5Z4.js.map} +0 -0
  354. /package/dist/{chunk-ZAWD6O46.js.map → chunk-VRPBEOWU.js.map} +0 -0
  355. /package/dist/{chunk-AY4P6PHN.js.map → chunk-VWGCJUTV.js.map} +0 -0
  356. /package/dist/{chunk-IIK7W3AN.js.map → chunk-XJR3COJO.js.map} +0 -0
  357. /package/dist/{chunk-ZD4D7UM6.js.map → chunk-XYYW64LB.js.map} +0 -0
  358. /package/dist/{chunk-4NZCZUGL.js.map → chunk-YFF2RP3X.js.map} +0 -0
  359. /package/dist/{chunk-WVIIJPTJ.js.map → chunk-Z3FZC5GV.js.map} +0 -0
  360. /package/dist/{chunk-55HDKLI3.js.map → chunk-Z5PIUYNB.js.map} +0 -0
  361. /package/dist/{chunk-ZRDYQZYH.js.map → chunk-Z7KI4WHR.js.map} +0 -0
  362. /package/dist/{chunk-P6DN5QU7.js.map → chunk-ZKYMKF2S.js.map} +0 -0
  363. /package/dist/{chunk-NMRKAGHE.js.map → chunk-ZROMNP7Q.js.map} +0 -0
  364. /package/dist/{collection-facade-XPVRHBGU.js.map → collection-facade-MKEBZDWW.js.map} +0 -0
  365. /package/dist/{delegation-4HUHUE6T.js.map → computed-BMMEFRFJ.js.map} +0 -0
  366. /package/dist/{enclave-IS7HZSQ7.js.map → delegation-BQNIEHZE.js.map} +0 -0
  367. /package/dist/{executor-ANFBCOYA.js.map → enclave-YN6223OG.js.map} +0 -0
  368. /package/dist/{executor-IKT47SH2.js.map → executor-CBTNU5VZ.js.map} +0 -0
  369. /package/dist/{executor-OIECZXTV.js.map → executor-DJHNSTIR.js.map} +0 -0
  370. /package/dist/{export-accessible-NZWCFZHL.js.map → executor-FGISLQIN.js.map} +0 -0
  371. /package/dist/{extract-partition-52LX6RQH.js.map → export-accessible-P7SLRLK3.js.map} +0 -0
  372. /package/dist/{issue-F4SYPJGJ.js.map → extract-partition-RNVSFHAB.js.map} +0 -0
  373. /package/dist/{ledger-YUAJUNFP.js.map → find-RNBG7LBY.js.map} +0 -0
  374. /package/dist/{liberate-6LDETRIW.js.map → issue-W5QG53B5.js.map} +0 -0
  375. /package/dist/{noydb-WQNBVJIG.js.map → lazy/index.js.map} +0 -0
  376. /package/dist/{policy-LRE6HTO5.js.map → ledger-KZWBKAG5.js.map} +0 -0
  377. /package/dist/{public-envelope-WVRRUVAJ.js.map → liberate-GMGCHIND.js.map} +0 -0
  378. /package/dist/{registry-6HZ2JSQ7.js.map → link-set-UQEIYQAM.js.map} +0 -0
  379. /package/dist/{registry-GPXZQ7DT.js.map → noydb-KS2O2MRI.js.map} +0 -0
  380. /package/dist/{registry-USYD2ECC.js.map → policy-YIKUH4AD.js.map} +0 -0
  381. /package/dist/{request-withdrawal-54V4L6CR.js.map → public-envelope-MRN5YYZZ.js.map} +0 -0
  382. /package/dist/{revoke-JV26NTQD.js.map → register-K6DDSIXN.js.map} +0 -0
  383. /package/dist/{signer-AE56T5HE.js.map → registry-IMNMHWTM.js.map} +0 -0
  384. /package/dist/{stale-LX4BR43V.js.map → registry-K6VUQXKV.js.map} +0 -0
  385. /package/dist/{withdraw-accessible-DGA4V2TP.js.map → registry-ZVO3T4M5.js.map} +0 -0
  386. /package/dist/{store-coordination-provider-KTRIC6PR.js.map → store-coordination-provider-JJCEMTAE.js.map} +0 -0
@@ -0,0 +1,11 @@
1
+ import {
2
+ computeBidxTarget
3
+ } from "./chunk-UOEWDCUX.js";
4
+ import "./chunk-LP7BEXCT.js";
5
+ import "./chunk-TLJOJBZD.js";
6
+ import "./chunk-U23JUUPX.js";
7
+ import "./chunk-PZ5AY32C.js";
8
+ export {
9
+ computeBidxTarget
10
+ };
11
+ //# sourceMappingURL=find-RNBG7LBY.js.map
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  NO_FORGET,
3
3
  SUBJECT_INDEX_COLLECTION
4
- } from "../chunk-6OQ7NKMZ.js";
5
- import "../chunk-5EZAJEES.js";
6
- import "../chunk-6RASM2J4.js";
7
- import "../chunk-CPAROOKP.js";
8
- import "../chunk-L4IRFTIF.js";
9
- import "../chunk-OCDUQUAP.js";
10
- import "../chunk-BLZRNHMG.js";
4
+ } from "../chunk-O2DB4C3M.js";
5
+ import "../chunk-OVO2RZAE.js";
6
+ import "../chunk-QKVILR7N.js";
7
+ import "../chunk-LN22XH4B.js";
8
+ import "../chunk-PGFY7IRW.js";
9
+ import "../chunk-TCIUO62Z.js";
10
+ import "../chunk-UOEWDCUX.js";
11
+ import "../chunk-LP7BEXCT.js";
12
+ import "../chunk-TLJOJBZD.js";
13
+ import "../chunk-U23JUUPX.js";
11
14
  import "../chunk-PZ5AY32C.js";
12
15
 
13
16
  // src/with-audit/forget/active.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-audit/forget/active.ts"],"sourcesContent":["/**\n * `withForgetCascade` — the active factory for GDPR right-to-erasure via\n * per-record CEK crypto-shred. Mirrors the canonical\n * `strategy.ts` (type + `NO_FORGET` sentinel) / `active.ts` (factory) split\n * used by the other services.\n *\n * @module\n */\nimport type { SubjectDeclaration, ForgetStrategy } from './strategy.js'\n\n/**\n * Declare GDPR crypto-shred for one or more collections.\n *\n * Each declared collection is forced to `perRecordKeys: true` (a shred can\n * only guarantee erasure of a record whose body is keyed off a per-record\n * CEK). On write, Noydb extracts `record[subjectField]` and maintains an\n * encrypted `_subject_index` mapping `subject → [{collection, id}]`, so\n * `vault.forget(subjectId)` can find every record for a subject and rewrite\n * each to a tombstone (body + history permanently undecryptable) while the\n * collection DEK and every other record stay intact.\n *\n * @example\n * ```ts\n * createNoydb({\n * secret, user,\n * forgetStrategy: withForgetCascade({ subjects: { invoices: 'buyerId' } }),\n * })\n * const result = await vault.forget('buyer-123')\n * // → { subject, recordsShredded, historyVersionsShredded, collections, … }\n * ```\n */\nexport function withForgetCascade(opts: SubjectDeclaration): ForgetStrategy {\n return { subjects: { ...opts.subjects } }\n}\n"],"mappings":";;;;;;;;;;;;;AA+BO,SAAS,kBAAkB,MAA0C;AAC1E,SAAO,EAAE,UAAU,EAAE,GAAG,KAAK,SAAS,EAAE;AAC1C;","names":[]}
1
+ {"version":3,"sources":["../../src/with-audit/forget/active.ts"],"sourcesContent":["/**\n * `withForgetCascade` — the active factory for GDPR right-to-erasure via\n * per-record CEK crypto-shred. Mirrors the canonical\n * `strategy.ts` (type + `NO_FORGET` sentinel) / `active.ts` (factory) split\n * used by the other services.\n *\n * @module\n */\nimport type { SubjectDeclaration, ForgetStrategy } from './strategy.js'\n\n/**\n * Declare GDPR crypto-shred for one or more collections.\n *\n * Each declared collection is forced to `perRecordKeys: true` (a shred can\n * only guarantee erasure of a record whose body is keyed off a per-record\n * CEK). On write, Noydb extracts `record[subjectField]` and maintains an\n * encrypted `_subject_index` mapping `subject → [{collection, id}]`, so\n * `vault.forget(subjectId)` can find every record for a subject and rewrite\n * each to a tombstone (body + history permanently undecryptable) while the\n * collection DEK and every other record stay intact.\n *\n * @example\n * ```ts\n * createNoydb({\n * secret, user,\n * forgetStrategy: withForgetCascade({ subjects: { invoices: 'buyerId' } }),\n * })\n * const result = await vault.forget('buyer-123')\n * // → { subject, recordsShredded, historyVersionsShredded, collections, … }\n * ```\n */\nexport function withForgetCascade(opts: SubjectDeclaration): ForgetStrategy {\n return { subjects: { ...opts.subjects } }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+BO,SAAS,kBAAkB,MAA0C;AAC1E,SAAO,EAAE,UAAU,EAAE,GAAG,KAAK,SAAS,EAAE;AAC1C;","names":[]}
@@ -1,8 +1,8 @@
1
- export { I as ImmutableGuardConfig, T as TransitionGuardConfig, i as immutableGuard, t as transitionGuard, w as withGuard } from '../transition-guard-C1Pyz8nH.js';
2
- import { bJ as GuardStrategy, bK as GuardChange, bL as GuardContext } from '../index-D05bV0_g.js';
3
- export { bM as AmendmentForbiddenError, bN as FieldFrozenError, bO as GuardRegistry, bP as GuardStrategyHandle, bQ as IllegalTransitionError, bR as InvariantError, bS as ReadOnlyVaultFacade, bT as RecordLockedError } from '../index-D05bV0_g.js';
1
+ export { I as ImmutableGuardConfig, T as TransitionGuardConfig, i as immutableGuard, t as transitionGuard, w as withGuard } from '../transition-guard-C4hvR-Ac.js';
2
+ import { bJ as GuardStrategy, bK as GuardChange, bL as GuardContext } from '../index-D4GQe1Rx.js';
3
+ export { bM as AmendmentForbiddenError, bN as FieldFrozenError, bO as GuardRegistry, bP as GuardStrategyHandle, bQ as IllegalTransitionError, bR as InvariantError, bS as ReadOnlyVaultFacade, bT as RecordLockedError } from '../index-D4GQe1Rx.js';
4
4
  import '../subject-index-O75wKshW.js';
5
- import '../describe-0tiXAjoO.js';
5
+ import '../describe-C6iHNlqJ.js';
6
6
  import '../index-B9QdHytu.js';
7
7
  import '@noy-db/attestation';
8
8
 
@@ -2,7 +2,7 @@ import {
2
2
  immutableGuard,
3
3
  transitionGuard,
4
4
  withGuard
5
- } from "../chunk-46YGCU6Z.js";
5
+ } from "../chunk-T2EGAXPM.js";
6
6
  import {
7
7
  GuardRegistry
8
8
  } from "../chunk-YMUGBZN2.js";
@@ -11,14 +11,14 @@ import {
11
11
  } from "../chunk-RUIMKQTA.js";
12
12
  import {
13
13
  GuardExecutor
14
- } from "../chunk-DGUR3CC4.js";
14
+ } from "../chunk-GXGK22QU.js";
15
15
  import {
16
16
  AmendmentForbiddenError,
17
17
  FieldFrozenError,
18
18
  IllegalTransitionError,
19
19
  InvariantError,
20
20
  RecordLockedError
21
- } from "../chunk-BLZRNHMG.js";
21
+ } from "../chunk-U23JUUPX.js";
22
22
  import "../chunk-PZ5AY32C.js";
23
23
  export {
24
24
  AmendmentForbiddenError,
@@ -1,4 +1,4 @@
1
- import { cV as EncryptedEnvelope } from './index-D05bV0_g.js';
1
+ import { cV as EncryptedEnvelope } from './index-D4GQe1Rx.js';
2
2
 
3
3
  /**
4
4
  * Ledger storage constants — pinned in their own leaf module so
@@ -1,8 +1,8 @@
1
- import { cS as HistoryStrategy, cT as NoydbStore, cU as HistoryOptions, cV as EncryptedEnvelope, cW as PruneOptions } from '../index-D05bV0_g.js';
2
- export { cX as AppendInput, cY as ChangeType, cZ as CollectionInstant, cE as DiffEntry, c_ as JsonPatch, c$ as JsonPatchOp, d0 as LedgerStore, d1 as VaultEngine, d2 as VaultInstant, d3 as VerifyResult, d4 as applyPatch, d5 as computePatch, d6 as diff, d7 as formatDiff } from '../index-D05bV0_g.js';
1
+ import { cS as HistoryStrategy, cT as NoydbStore, cU as HistoryOptions, cV as EncryptedEnvelope, cW as PruneOptions } from '../index-D4GQe1Rx.js';
2
+ export { cX as AppendInput, cY as ChangeType, cZ as CollectionInstant, cE as DiffEntry, c_ as JsonPatch, c$ as JsonPatchOp, d0 as LedgerStore, d1 as VaultEngine, d2 as VaultInstant, d3 as VerifyResult, d4 as applyPatch, d5 as computePatch, d6 as diff, d7 as formatDiff } from '../index-D4GQe1Rx.js';
3
3
  export { L as LedgerEntry, d as canonicalJson, h as hashEntry, p as paddedIndex, e as parseIndex, s as sha256Hex } from '../subject-index-O75wKshW.js';
4
- export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-CWxn7sf6.js';
5
- import '../describe-0tiXAjoO.js';
4
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-D8Q5MJLA.js';
5
+ import '../describe-C6iHNlqJ.js';
6
6
  import '../index-B9QdHytu.js';
7
7
  import '@noy-db/attestation';
8
8
 
@@ -7,7 +7,7 @@ import {
7
7
  pruneHistory,
8
8
  saveHistory,
9
9
  tombstoneHistory
10
- } from "../chunk-WVIIJPTJ.js";
10
+ } from "../chunk-Z3FZC5GV.js";
11
11
  import {
12
12
  diff,
13
13
  formatDiff
@@ -16,7 +16,7 @@ import {
16
16
  LedgerStore,
17
17
  applyPatch,
18
18
  computePatch
19
- } from "../chunk-DHIN36UC.js";
19
+ } from "../chunk-GQOT6QJR.js";
20
20
  import {
21
21
  LEDGER_COLLECTION,
22
22
  LEDGER_DELTAS_COLLECTION
@@ -28,13 +28,16 @@ import {
28
28
  paddedIndex,
29
29
  parseIndex,
30
30
  sha256Hex
31
- } from "../chunk-6EVZXETK.js";
32
- import "../chunk-5EZAJEES.js";
33
- import "../chunk-6RASM2J4.js";
34
- import "../chunk-CPAROOKP.js";
35
- import "../chunk-L4IRFTIF.js";
36
- import "../chunk-OCDUQUAP.js";
37
- import "../chunk-BLZRNHMG.js";
31
+ } from "../chunk-M66NAZA4.js";
32
+ import "../chunk-OVO2RZAE.js";
33
+ import "../chunk-QKVILR7N.js";
34
+ import "../chunk-LN22XH4B.js";
35
+ import "../chunk-PGFY7IRW.js";
36
+ import "../chunk-TCIUO62Z.js";
37
+ import "../chunk-UOEWDCUX.js";
38
+ import "../chunk-LP7BEXCT.js";
39
+ import "../chunk-TLJOJBZD.js";
40
+ import "../chunk-U23JUUPX.js";
38
41
  import "../chunk-PZ5AY32C.js";
39
42
 
40
43
  // src/with-commit/history/active.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-commit/history/active.ts"],"sourcesContent":["/**\n * Active history strategy — `withHistory()` returns the real\n * implementation that wires per-record snapshots, the hash-chained\n * audit ledger, JSON-patch deltas, and time-machine reads into the\n * core write/read paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withHistory } from '@noy-db/hub/history'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * historyStrategy: withHistory(),\n * })\n * ```\n *\n * The factory is a thin wrapper that delegates to the existing\n * `history.ts`, `diff.ts`, `ledger/store.ts`, `ledger/patch.ts`, and\n * `time-machine.ts` modules. Splitting the import chain through this\n * file is what lets `tsup` tree-shake the heavy modules out of the\n * default `@noy-db/hub` bundle when no `withHistory()` import is\n * present in the consumer.\n *\n * @public\n */\n\nimport type { HistoryStrategy, BuildLedgerOptions } from './strategy.js'\nimport {\n saveHistory,\n getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n tombstoneHistory,\n} from './history.js'\nimport { diff as computeDiff } from './diff.js'\nimport { LedgerStore, envelopePayloadHash } from './ledger/store.js'\nimport { computePatch } from './ledger/patch.js'\nimport { VaultInstant } from './time-machine.js'\n\n/**\n * Build the active history strategy. Today the factory takes no\n * options; per-collection retention tuning still flows through\n * `HistoryConfig` on `Vault.collection()` / `vault.openVault()`.\n *\n * Future option slots (kept off the LTS surface for now):\n * - global maxVersions cap\n * - global beforeDate prune cadence\n * - ledger encryption toggle (today inferred from vault.encrypted)\n */\nexport function withHistory(): HistoryStrategy {\n return {\n saveHistory,\n getHistoryEntries: getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n tombstoneHistory,\n envelopePayloadHash,\n computePatch,\n diff: computeDiff,\n buildLedger(opts: BuildLedgerOptions): LedgerStore {\n return new LedgerStore({\n adapter: opts.adapter,\n vault: opts.vault,\n encrypted: opts.encrypted,\n getDEK: opts.getDEK,\n actor: opts.actor,\n })\n },\n buildVaultInstant(engine, timestamp): VaultInstant {\n return new VaultInstant(engine, timestamp)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL;AAAA,IACA,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY,MAAuC;AACjD,aAAO,IAAI,YAAY;AAAA,QACrB,SAAS,KAAK;AAAA,QACd,OAAO,KAAK;AAAA,QACZ,WAAW,KAAK;AAAA,QAChB,QAAQ,KAAK;AAAA,QACb,OAAO,KAAK;AAAA,MACd,CAAC;AAAA,IACH;AAAA,IACA,kBAAkB,QAAQ,WAAyB;AACjD,aAAO,IAAI,aAAa,QAAQ,SAAS;AAAA,IAC3C;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-commit/history/active.ts"],"sourcesContent":["/**\n * Active history strategy — `withHistory()` returns the real\n * implementation that wires per-record snapshots, the hash-chained\n * audit ledger, JSON-patch deltas, and time-machine reads into the\n * core write/read paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withHistory } from '@noy-db/hub/history'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * historyStrategy: withHistory(),\n * })\n * ```\n *\n * The factory is a thin wrapper that delegates to the existing\n * `history.ts`, `diff.ts`, `ledger/store.ts`, `ledger/patch.ts`, and\n * `time-machine.ts` modules. Splitting the import chain through this\n * file is what lets `tsup` tree-shake the heavy modules out of the\n * default `@noy-db/hub` bundle when no `withHistory()` import is\n * present in the consumer.\n *\n * @public\n */\n\nimport type { HistoryStrategy, BuildLedgerOptions } from './strategy.js'\nimport {\n saveHistory,\n getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n tombstoneHistory,\n} from './history.js'\nimport { diff as computeDiff } from './diff.js'\nimport { LedgerStore, envelopePayloadHash } from './ledger/store.js'\nimport { computePatch } from './ledger/patch.js'\nimport { VaultInstant } from './time-machine.js'\n\n/**\n * Build the active history strategy. Today the factory takes no\n * options; per-collection retention tuning still flows through\n * `HistoryConfig` on `Vault.collection()` / `vault.openVault()`.\n *\n * Future option slots (kept off the LTS surface for now):\n * - global maxVersions cap\n * - global beforeDate prune cadence\n * - ledger encryption toggle (today inferred from vault.encrypted)\n */\nexport function withHistory(): HistoryStrategy {\n return {\n saveHistory,\n getHistoryEntries: getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n tombstoneHistory,\n envelopePayloadHash,\n computePatch,\n diff: computeDiff,\n buildLedger(opts: BuildLedgerOptions): LedgerStore {\n return new LedgerStore({\n adapter: opts.adapter,\n vault: opts.vault,\n encrypted: opts.encrypted,\n getDEK: opts.getDEK,\n actor: opts.actor,\n })\n },\n buildVaultInstant(engine, timestamp): VaultInstant {\n return new VaultInstant(engine, timestamp)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL;AAAA,IACA,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY,MAAuC;AACjD,aAAO,IAAI,YAAY;AAAA,QACrB,SAAS,KAAK;AAAA,QACd,OAAO,KAAK;AAAA,QACZ,WAAW,KAAK;AAAA,QAChB,QAAQ,KAAK;AAAA,QACb,OAAO,KAAK;AAAA,MACd,CAAC;AAAA,IACH;AAAA,IACA,kBAAkB,QAAQ,WAAyB;AACjD,aAAO,IAAI,aAAa,QAAQ,SAAS;AAAA,IAC3C;AAAA,EACF;AACF;","names":[]}
@@ -1,7 +1,7 @@
1
- import { I as I18nStrategy } from '../index-D05bV0_g.js';
2
- export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictKeyInUseError, d as DictKeyMissingError, e as DictionaryHandle, f as DictionaryOptions, g as I18nMap, h as I18nTextDescriptor, i as I18nTextOptions, L as Layer, j as LocaleNotSpecifiedError, M as MissingTranslationError, O as OnMissing, k as OnMissingPolicy, R as ReservedCollectionNameError, l as ResolveI18nOptions, S as ScriptViolationError, m as ScriptWarning, n as StaticDictDescriptor, o as StaticDictReadonlyError, T as TranslatorNotConfiguredError, U as UnknownDictCodeError, p as applyI18nLocale, q as dictCollectionName, r as dictKey, s as enforceScript, t as getAtPath, u as i18nText, v as inferScripts, w as isDictCollectionName, x as isDictKeyDescriptor, y as isI18nTextDescriptor, z as isStaticDictDescriptor, A as resolveI18nText, B as resolvePolicy, C as setAtPathInPlace, E as staticDict, F as stripI18nFilled, G as validateI18nTextValue } from '../index-D05bV0_g.js';
1
+ import { I as I18nStrategy } from '../index-D4GQe1Rx.js';
2
+ export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictKeyInUseError, d as DictKeyMissingError, e as DictionaryHandle, f as DictionaryOptions, g as I18nMap, h as I18nTextDescriptor, i as I18nTextOptions, L as Layer, j as LocaleNotSpecifiedError, M as MissingTranslationError, O as OnMissing, k as OnMissingPolicy, R as ReservedCollectionNameError, l as ResolveI18nOptions, S as ScriptViolationError, m as ScriptWarning, n as StaticDictDescriptor, o as StaticDictReadonlyError, T as TranslatorNotConfiguredError, U as UnknownDictCodeError, p as applyI18nLocale, q as dictCollectionName, r as dictKey, s as enforceScript, t as getAtPath, u as i18nText, v as inferScripts, w as isDictCollectionName, x as isDictKeyDescriptor, y as isI18nTextDescriptor, z as isStaticDictDescriptor, A as resolveI18nText, B as resolvePolicy, C as setAtPathInPlace, E as staticDict, F as stripI18nFilled, G as validateI18nTextValue } from '../index-D4GQe1Rx.js';
3
3
  import '../subject-index-O75wKshW.js';
4
- import '../describe-0tiXAjoO.js';
4
+ import '../describe-C6iHNlqJ.js';
5
5
  import '../index-B9QdHytu.js';
6
6
  import '@noy-db/attestation';
7
7
 
@@ -7,15 +7,18 @@ import {
7
7
  isDictKeyDescriptor,
8
8
  isStaticDictDescriptor,
9
9
  staticDict
10
- } from "../chunk-PYWW4KLO.js";
11
- import "../chunk-5A6TC3RQ.js";
12
- import "../chunk-2N4MUSF3.js";
13
- import "../chunk-6EVZXETK.js";
14
- import "../chunk-5EZAJEES.js";
15
- import "../chunk-6RASM2J4.js";
16
- import "../chunk-CPAROOKP.js";
17
- import "../chunk-L4IRFTIF.js";
18
- import "../chunk-OCDUQUAP.js";
10
+ } from "../chunk-SEQ2JI3Y.js";
11
+ import "../chunk-VAWY44JW.js";
12
+ import "../chunk-TB5RNNJ4.js";
13
+ import "../chunk-M66NAZA4.js";
14
+ import "../chunk-OVO2RZAE.js";
15
+ import "../chunk-QKVILR7N.js";
16
+ import "../chunk-LN22XH4B.js";
17
+ import "../chunk-PGFY7IRW.js";
18
+ import "../chunk-TCIUO62Z.js";
19
+ import "../chunk-UOEWDCUX.js";
20
+ import "../chunk-LP7BEXCT.js";
21
+ import "../chunk-TLJOJBZD.js";
19
22
  import {
20
23
  applyI18nLocale,
21
24
  enforceScript,
@@ -28,7 +31,7 @@ import {
28
31
  setAtPathInPlace,
29
32
  stripI18nFilled,
30
33
  validateI18nTextValue
31
- } from "../chunk-7IP75FP2.js";
34
+ } from "../chunk-4K3MQ5S3.js";
32
35
  import {
33
36
  DictKeyInUseError,
34
37
  DictKeyMissingError,
@@ -39,7 +42,7 @@ import {
39
42
  StaticDictReadonlyError,
40
43
  TranslatorNotConfiguredError,
41
44
  UnknownDictCodeError
42
- } from "../chunk-BLZRNHMG.js";
45
+ } from "../chunk-U23JUUPX.js";
43
46
  import "../chunk-PZ5AY32C.js";
44
47
 
45
48
  // src/with-shape/i18n/densify.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-shape/i18n/densify.ts","../../src/with-shape/i18n/active.ts"],"sourcesContent":["/**\n * `densifyOnWrite` — eager-fill empty i18n slots from each field's\n * substitute chain at write time, recording provenance in the internal\n * `_i18nFilled` marker (decision A: dense map + prior-read).\n *\n * Pure functions over plain records; all DB wiring lives in collection.ts.\n * Only single-leaf i18n fields are supported (array-wildcard paths are\n * skipped, mirroring auto-translate).\n */\nimport { getAtPath, resolveI18nText } from './core.js'\nimport type { I18nTextDescriptor } from './core.js'\n\nconst MARKER = '_i18nFilled'\n\ntype Leaf = Record<string, string>\n\n/** Locales recorded as densify-filled on the prior record for `field`. */\nfunction priorFilled(prior: Record<string, unknown> | undefined, field: string): Set<string> {\n if (!prior) return new Set()\n const marker = prior[MARKER] as Record<string, string[]> | undefined\n return new Set(marker?.[field] ?? [])\n}\n\n/** The single leaf map for `field`, or undefined for absent / array-wildcard / non-object. */\nfunction singleLeaf(record: Record<string, unknown>, field: string): Leaf | undefined {\n const leaves = getAtPath(record, field)\n if (leaves.length !== 1) return undefined\n const leaf = leaves[0]\n if (!leaf || typeof leaf !== 'object' || Array.isArray(leaf)) return undefined\n return leaf as Leaf\n}\n\n/**\n * Per field, the locales that are UNCHANGED round-tripped densify fills — i.e.\n * marked filled on the prior record AND identical in the incoming record.\n * These are exempt from write-time script enforcement (they are derived copies,\n * not authored text). Slots the user changed are NOT exempt (validated as authored).\n */\nexport function computeExemptFills(\n prior: Record<string, unknown> | undefined,\n incoming: Record<string, unknown>,\n fields: Record<string, I18nTextDescriptor>,\n): Map<string, Set<string>> {\n const out = new Map<string, Set<string>>()\n if (!prior) return out\n for (const field of Object.keys(fields)) {\n const filled = priorFilled(prior, field)\n if (filled.size === 0) continue\n const priorLeaf = singleLeaf(prior, field)\n const incLeaf = singleLeaf(incoming, field)\n if (!priorLeaf || !incLeaf) continue\n const exempt = new Set<string>()\n for (const loc of filled) {\n if (incLeaf[loc] !== undefined && incLeaf[loc] !== '' && incLeaf[loc] === priorLeaf[loc]) {\n exempt.add(loc)\n }\n }\n if (exempt.size > 0) out.set(field, exempt)\n }\n return out\n}\n\n/**\n * Mutate `record` in place: fill empty declared-language slots for each\n * densify-enabled field from the field's substitute chain, recompute unchanged\n * prior fills, clear marks for slots that became authored, and write the\n * resulting `_i18nFilled` marker (removed when empty).\n *\n * `prior` is read-only — it is never mutated.\n *\n * Provenance uses value-equality (decision A): a slot counts as an unchanged\n * fill when it was prior-marked AND its value still equals the prior value. A\n * consequence is that re-authoring a value byte-identical to the existing fill\n * keeps it classified as a fill (the visible value is unchanged either way; the\n * slot stays script-exempt and will auto-refresh if its source later changes).\n * This is inherent to value-equality provenance, not a bug.\n */\nexport function densify(\n record: Record<string, unknown>,\n prior: Record<string, unknown> | undefined,\n fields: Record<string, I18nTextDescriptor>,\n): void {\n let marker = record[MARKER] as Record<string, string[]> | undefined\n\n for (const [field, descriptor] of Object.entries(fields)) {\n const leaf = singleLeaf(record, field)\n if (!leaf) continue\n const { languages, substitute, smartSubstitute } = descriptor.options\n const filledSet = priorFilled(prior, field)\n const priorLeaf = singleLeaf(prior ?? {}, field)\n const isUnchangedFill = (loc: string): boolean =>\n filledSet.has(loc) && priorLeaf?.[loc] !== undefined && leaf[loc] === priorLeaf[loc]\n\n // Authored source = present, non-empty, NOT an unchanged prior fill.\n const authored: Leaf = {}\n for (const [loc, val] of Object.entries(leaf)) {\n if (typeof val === 'string' && val !== '' && !isUnchangedFill(loc)) authored[loc] = val\n }\n\n const filled: string[] = []\n for (const loc of languages) {\n if (authored[loc] !== undefined) continue // real value present → not a fill\n const sub = resolveI18nText(authored, loc, undefined, field, {\n policy: 'substitute',\n substitute: substitute ?? ['any'],\n ...(smartSubstitute ? { smartSubstitute } : {}),\n })\n if (typeof sub === 'string' && sub !== '') {\n leaf[loc] = sub\n filled.push(loc)\n } else if (isUnchangedFill(loc)) {\n delete leaf[loc] // stale fill with no source left → drop it\n }\n }\n\n if (filled.length > 0) {\n marker ??= {}\n marker[field] = filled\n } else if (marker) {\n delete marker[field]\n }\n }\n\n if (marker && Object.keys(marker).length > 0) {\n record[MARKER] = marker\n } else {\n delete record[MARKER]\n }\n}\n","/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { enforceScript } from './script.js'\nimport { computeExemptFills, densify } from './densify.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n enforceScript,\n computeExemptFills,\n densify,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../../src/with-shape/i18n/densify.ts","../../src/with-shape/i18n/active.ts"],"sourcesContent":["/**\n * `densifyOnWrite` — eager-fill empty i18n slots from each field's\n * substitute chain at write time, recording provenance in the internal\n * `_i18nFilled` marker (decision A: dense map + prior-read).\n *\n * Pure functions over plain records; all DB wiring lives in collection.ts.\n * Only single-leaf i18n fields are supported (array-wildcard paths are\n * skipped, mirroring auto-translate).\n */\nimport { getAtPath, resolveI18nText } from './core.js'\nimport type { I18nTextDescriptor } from './core.js'\n\nconst MARKER = '_i18nFilled'\n\ntype Leaf = Record<string, string>\n\n/** Locales recorded as densify-filled on the prior record for `field`. */\nfunction priorFilled(prior: Record<string, unknown> | undefined, field: string): Set<string> {\n if (!prior) return new Set()\n const marker = prior[MARKER] as Record<string, string[]> | undefined\n return new Set(marker?.[field] ?? [])\n}\n\n/** The single leaf map for `field`, or undefined for absent / array-wildcard / non-object. */\nfunction singleLeaf(record: Record<string, unknown>, field: string): Leaf | undefined {\n const leaves = getAtPath(record, field)\n if (leaves.length !== 1) return undefined\n const leaf = leaves[0]\n if (!leaf || typeof leaf !== 'object' || Array.isArray(leaf)) return undefined\n return leaf as Leaf\n}\n\n/**\n * Per field, the locales that are UNCHANGED round-tripped densify fills — i.e.\n * marked filled on the prior record AND identical in the incoming record.\n * These are exempt from write-time script enforcement (they are derived copies,\n * not authored text). Slots the user changed are NOT exempt (validated as authored).\n */\nexport function computeExemptFills(\n prior: Record<string, unknown> | undefined,\n incoming: Record<string, unknown>,\n fields: Record<string, I18nTextDescriptor>,\n): Map<string, Set<string>> {\n const out = new Map<string, Set<string>>()\n if (!prior) return out\n for (const field of Object.keys(fields)) {\n const filled = priorFilled(prior, field)\n if (filled.size === 0) continue\n const priorLeaf = singleLeaf(prior, field)\n const incLeaf = singleLeaf(incoming, field)\n if (!priorLeaf || !incLeaf) continue\n const exempt = new Set<string>()\n for (const loc of filled) {\n if (incLeaf[loc] !== undefined && incLeaf[loc] !== '' && incLeaf[loc] === priorLeaf[loc]) {\n exempt.add(loc)\n }\n }\n if (exempt.size > 0) out.set(field, exempt)\n }\n return out\n}\n\n/**\n * Mutate `record` in place: fill empty declared-language slots for each\n * densify-enabled field from the field's substitute chain, recompute unchanged\n * prior fills, clear marks for slots that became authored, and write the\n * resulting `_i18nFilled` marker (removed when empty).\n *\n * `prior` is read-only — it is never mutated.\n *\n * Provenance uses value-equality (decision A): a slot counts as an unchanged\n * fill when it was prior-marked AND its value still equals the prior value. A\n * consequence is that re-authoring a value byte-identical to the existing fill\n * keeps it classified as a fill (the visible value is unchanged either way; the\n * slot stays script-exempt and will auto-refresh if its source later changes).\n * This is inherent to value-equality provenance, not a bug.\n */\nexport function densify(\n record: Record<string, unknown>,\n prior: Record<string, unknown> | undefined,\n fields: Record<string, I18nTextDescriptor>,\n): void {\n let marker = record[MARKER] as Record<string, string[]> | undefined\n\n for (const [field, descriptor] of Object.entries(fields)) {\n const leaf = singleLeaf(record, field)\n if (!leaf) continue\n const { languages, substitute, smartSubstitute } = descriptor.options\n const filledSet = priorFilled(prior, field)\n const priorLeaf = singleLeaf(prior ?? {}, field)\n const isUnchangedFill = (loc: string): boolean =>\n filledSet.has(loc) && priorLeaf?.[loc] !== undefined && leaf[loc] === priorLeaf[loc]\n\n // Authored source = present, non-empty, NOT an unchanged prior fill.\n const authored: Leaf = {}\n for (const [loc, val] of Object.entries(leaf)) {\n if (typeof val === 'string' && val !== '' && !isUnchangedFill(loc)) authored[loc] = val\n }\n\n const filled: string[] = []\n for (const loc of languages) {\n if (authored[loc] !== undefined) continue // real value present → not a fill\n const sub = resolveI18nText(authored, loc, undefined, field, {\n policy: 'substitute',\n substitute: substitute ?? ['any'],\n ...(smartSubstitute ? { smartSubstitute } : {}),\n })\n if (typeof sub === 'string' && sub !== '') {\n leaf[loc] = sub\n filled.push(loc)\n } else if (isUnchangedFill(loc)) {\n delete leaf[loc] // stale fill with no source left → drop it\n }\n }\n\n if (filled.length > 0) {\n marker ??= {}\n marker[field] = filled\n } else if (marker) {\n delete marker[field]\n }\n }\n\n if (marker && Object.keys(marker).length > 0) {\n record[MARKER] = marker\n } else {\n delete record[MARKER]\n }\n}\n","/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { enforceScript } from './script.js'\nimport { computeExemptFills, densify } from './densify.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n enforceScript,\n computeExemptFills,\n densify,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":"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","names":[]}
@@ -1,5 +1,5 @@
1
- export { eP as ChangeEvent, ci as Collection, gy as LiveQuery, h7 as Noydb, e7 as Query, V as Vault } from '../index-D05bV0_g.js';
1
+ export { eQ as ChangeEvent, ci as Collection, gz as LiveQuery, h9 as Noydb, e7 as Query, V as Vault } from '../index-D4GQe1Rx.js';
2
2
  import '../subject-index-O75wKshW.js';
3
- import '../describe-0tiXAjoO.js';
3
+ import '../describe-C6iHNlqJ.js';
4
4
  import '../index-B9QdHytu.js';
5
5
  import '@noy-db/attestation';