@noy-db/hub 0.3.0-pre.1 → 0.3.0-pre.10

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 (435) hide show
  1. package/dist/aggregate/index.d.ts +3 -4
  2. package/dist/aggregate/index.js +9 -8
  3. package/dist/aggregate/index.js.map +1 -1
  4. package/dist/api-TX2EX2FX.js +20 -0
  5. package/dist/as/index.d.ts +4 -5
  6. package/dist/as/index.js +12 -6
  7. package/dist/at/index.d.ts +2 -3
  8. package/dist/attestation/index.d.ts +3 -4
  9. package/dist/attestation/index.js +19 -13
  10. package/dist/attestation/index.js.map +1 -1
  11. package/dist/{backup-XV3IOEGB.js → backup-R7NTDFKY.js} +14 -6
  12. package/dist/backup-R7NTDFKY.js.map +1 -0
  13. package/dist/blobs/index.d.ts +4 -5
  14. package/dist/blobs/index.js +12 -6
  15. package/dist/blobs/index.js.map +1 -1
  16. package/dist/bundle/index.d.ts +5 -6
  17. package/dist/bundle/index.js +21 -15
  18. package/dist/bundle/index.js.map +1 -1
  19. package/dist/{bundle-CH-H06dp.d.ts → bundle-D6GxiUfq.d.ts} +1 -1
  20. package/dist/by/index.js +2 -2
  21. package/dist/cargo/index.d.ts +4 -6
  22. package/dist/cargo/index.js +27 -21
  23. package/dist/chunk-2OV5NVE7.js +95 -0
  24. package/dist/chunk-2OV5NVE7.js.map +1 -0
  25. package/dist/{chunk-5N6CZTCY.js → chunk-2OZXVKVP.js} +3 -3
  26. package/dist/{chunk-BG3SPSR4.js → chunk-2REPHKET.js} +5 -4
  27. package/dist/chunk-2REPHKET.js.map +1 -0
  28. package/dist/{chunk-LXQT4WMP.js → chunk-3JXPAHOZ.js} +8 -6
  29. package/dist/{chunk-LXQT4WMP.js.map → chunk-3JXPAHOZ.js.map} +1 -1
  30. package/dist/{chunk-UAG5KWVA.js → chunk-3MATJ6O4.js} +3 -3
  31. package/dist/chunk-3OPY6MK2.js +404 -0
  32. package/dist/chunk-3OPY6MK2.js.map +1 -0
  33. package/dist/{chunk-62QYRORB.js → chunk-3QSIU3UT.js} +34 -63
  34. package/dist/chunk-3QSIU3UT.js.map +1 -0
  35. package/dist/{chunk-DGDI2D4M.js → chunk-4OMCIY6F.js} +29 -9
  36. package/dist/chunk-4OMCIY6F.js.map +1 -0
  37. package/dist/chunk-5I35DOHK.js +94 -0
  38. package/dist/chunk-5I35DOHK.js.map +1 -0
  39. package/dist/{chunk-2P2HZEXU.js → chunk-5VG4IJR7.js} +11 -9
  40. package/dist/{chunk-2P2HZEXU.js.map → chunk-5VG4IJR7.js.map} +1 -1
  41. package/dist/{chunk-AZAOEIKW.js → chunk-5YESYH2C.js} +2 -2
  42. package/dist/{chunk-GYGWYIOZ.js → chunk-6G5ORS5D.js} +7 -5
  43. package/dist/{chunk-GYGWYIOZ.js.map → chunk-6G5ORS5D.js.map} +1 -1
  44. package/dist/{chunk-VCTFO5CO.js → chunk-6P5XCKSD.js} +2 -2
  45. package/dist/{chunk-IO6GRPT6.js → chunk-7BWJHO2A.js} +2 -2
  46. package/dist/{chunk-IPB7FTQX.js → chunk-7P2SDJG3.js} +15 -9
  47. package/dist/chunk-7P2SDJG3.js.map +1 -0
  48. package/dist/{chunk-SRB2XEWB.js → chunk-ANB77BVV.js} +6 -4
  49. package/dist/chunk-ANB77BVV.js.map +1 -0
  50. package/dist/{chunk-UDRIWL7A.js → chunk-BKARNZJN.js} +3 -3
  51. package/dist/{chunk-Y22T3KQE.js → chunk-BQISD5ZV.js} +3 -3
  52. package/dist/chunk-BQISD5ZV.js.map +1 -0
  53. package/dist/{chunk-UIU2THRG.js → chunk-BUAQ7YI3.js} +138 -378
  54. package/dist/chunk-BUAQ7YI3.js.map +1 -0
  55. package/dist/{chunk-V7RWQRG7.js → chunk-CB7CWSKW.js} +3 -3
  56. package/dist/{chunk-LV7M27WM.js → chunk-DFVUTGT2.js} +14 -201
  57. package/dist/chunk-DFVUTGT2.js.map +1 -0
  58. package/dist/{chunk-CWPPNPOH.js → chunk-DJ7KIPLV.js} +2 -2
  59. package/dist/{chunk-5R5JW2JT.js → chunk-DSKDQP3G.js} +3480 -1916
  60. package/dist/chunk-DSKDQP3G.js.map +1 -0
  61. package/dist/{chunk-VFQGRQIH.js → chunk-DV4HUP5G.js} +7 -5
  62. package/dist/{chunk-VFQGRQIH.js.map → chunk-DV4HUP5G.js.map} +1 -1
  63. package/dist/{chunk-5LUY7UTV.js → chunk-EOXAAJTY.js} +289 -48
  64. package/dist/chunk-EOXAAJTY.js.map +1 -0
  65. package/dist/chunk-ET67AY6B.js +74 -0
  66. package/dist/chunk-ET67AY6B.js.map +1 -0
  67. package/dist/{chunk-TA66UMI4.js → chunk-F4CEK5YM.js} +2 -2
  68. package/dist/chunk-FORYWFN6.js +130 -0
  69. package/dist/chunk-FORYWFN6.js.map +1 -0
  70. package/dist/{chunk-IELYAOGG.js → chunk-FRP6D2DM.js} +19 -6
  71. package/dist/chunk-FRP6D2DM.js.map +1 -0
  72. package/dist/chunk-FUOE7UUV.js +341 -0
  73. package/dist/chunk-FUOE7UUV.js.map +1 -0
  74. package/dist/{chunk-SM3AVUHC.js → chunk-G4JYND6L.js} +2 -2
  75. package/dist/{chunk-AXRXJTE2.js → chunk-G6XV4H65.js} +5 -5
  76. package/dist/{chunk-I2NOIW44.js → chunk-GNMXXTMN.js} +8 -6
  77. package/dist/{chunk-I2NOIW44.js.map → chunk-GNMXXTMN.js.map} +1 -1
  78. package/dist/chunk-GYGLAVCX.js +19 -0
  79. package/dist/chunk-GYGLAVCX.js.map +1 -0
  80. package/dist/{chunk-UV5MFVO3.js → chunk-HPWKV3YB.js} +2 -2
  81. package/dist/chunk-HY3AUMFI.js +41 -0
  82. package/dist/chunk-HY3AUMFI.js.map +1 -0
  83. package/dist/chunk-HYR4WZZ3.js +69 -0
  84. package/dist/chunk-HYR4WZZ3.js.map +1 -0
  85. package/dist/{chunk-SKF73JOP.js → chunk-ICXIFFYZ.js} +3 -3
  86. package/dist/chunk-IGJCYUT5.js +99 -0
  87. package/dist/chunk-IGJCYUT5.js.map +1 -0
  88. package/dist/{chunk-MD3Y6J3L.js → chunk-IVLTXX4W.js} +7 -5
  89. package/dist/{chunk-MD3Y6J3L.js.map → chunk-IVLTXX4W.js.map} +1 -1
  90. package/dist/{chunk-WWGT2MDV.js → chunk-J4LPNIGK.js} +26 -11
  91. package/dist/chunk-J4LPNIGK.js.map +1 -0
  92. package/dist/chunk-JJZ2LW6T.js +36 -0
  93. package/dist/chunk-JJZ2LW6T.js.map +1 -0
  94. package/dist/{chunk-RUIMKQTA.js → chunk-JK733I5V.js} +1 -1
  95. package/dist/chunk-JK733I5V.js.map +1 -0
  96. package/dist/{chunk-UPJNJGGA.js → chunk-KJ2BCBTL.js} +25 -8
  97. package/dist/chunk-KJ2BCBTL.js.map +1 -0
  98. package/dist/{chunk-LMTH2RM6.js → chunk-KNZB6JMR.js} +2 -2
  99. package/dist/{chunk-I3TIKTJO.js → chunk-KPZS5QAQ.js} +29 -10
  100. package/dist/chunk-KPZS5QAQ.js.map +1 -0
  101. package/dist/{chunk-PKHL44ER.js → chunk-LEJIKBBB.js} +2 -2
  102. package/dist/{chunk-AQTBSL7R.js → chunk-LL2NIVUR.js} +14 -7
  103. package/dist/chunk-LL2NIVUR.js.map +1 -0
  104. package/dist/chunk-LP7BEXCT.js +32 -0
  105. package/dist/chunk-LP7BEXCT.js.map +1 -0
  106. package/dist/{chunk-5O3AOPDT.js → chunk-MCHVVJIA.js} +443 -467
  107. package/dist/chunk-MCHVVJIA.js.map +1 -0
  108. package/dist/chunk-NO272T7Q.js +194 -0
  109. package/dist/chunk-NO272T7Q.js.map +1 -0
  110. package/dist/{chunk-LFLXAY2W.js → chunk-NUEQU36L.js} +71 -93
  111. package/dist/chunk-NUEQU36L.js.map +1 -0
  112. package/dist/chunk-O45M6LDB.js +38 -0
  113. package/dist/chunk-O45M6LDB.js.map +1 -0
  114. package/dist/{chunk-PSMV73A5.js → chunk-OBKWYKYC.js} +5 -5
  115. package/dist/{chunk-CMGR4ZEW.js → chunk-OHHKHSJP.js} +2 -2
  116. package/dist/{chunk-HCIPRAGS.js → chunk-OT76OZL6.js} +2 -2
  117. package/dist/{chunk-ITNUCOXM.js → chunk-OVYRLHPE.js} +7 -5
  118. package/dist/{chunk-ITNUCOXM.js.map → chunk-OVYRLHPE.js.map} +1 -1
  119. package/dist/{chunk-SMXWYP24.js → chunk-OXCSVM3B.js} +3 -3
  120. package/dist/{chunk-IGUYVGGI.js → chunk-P33LUIML.js} +3 -3
  121. package/dist/{chunk-JNUWZ6D3.js → chunk-PLS64NCS.js} +7 -5
  122. package/dist/{chunk-JNUWZ6D3.js.map → chunk-PLS64NCS.js.map} +1 -1
  123. package/dist/{chunk-EIZUR2XW.js → chunk-PS2NEWEX.js} +2 -2
  124. package/dist/chunk-QA2KUPCP.js +45 -0
  125. package/dist/chunk-QA2KUPCP.js.map +1 -0
  126. package/dist/{chunk-WYSO2NIH.js → chunk-QOC3VYL2.js} +2 -2
  127. package/dist/{chunk-FISN7WE4.js → chunk-QSFOZUYL.js} +30 -5
  128. package/dist/{chunk-FISN7WE4.js.map → chunk-QSFOZUYL.js.map} +1 -1
  129. package/dist/{chunk-KVOXU4T5.js → chunk-RHK32N73.js} +2 -2
  130. package/dist/{chunk-3YFXJ3ZP.js → chunk-RW3Y22MW.js} +2 -2
  131. package/dist/{chunk-ZYUC53LT.js → chunk-S7VFUQM2.js} +117 -3
  132. package/dist/chunk-S7VFUQM2.js.map +1 -0
  133. package/dist/chunk-T7WSLRAU.js +49 -0
  134. package/dist/chunk-T7WSLRAU.js.map +1 -0
  135. package/dist/{chunk-IUEN57TV.js → chunk-TAKWLZZX.js} +280 -58
  136. package/dist/chunk-TAKWLZZX.js.map +1 -0
  137. package/dist/chunk-THNJ3IKU.js +17 -0
  138. package/dist/chunk-THNJ3IKU.js.map +1 -0
  139. package/dist/{chunk-MTMJVJ5W.js → chunk-TMBXVJKT.js} +5 -3
  140. package/dist/chunk-TMBXVJKT.js.map +1 -0
  141. package/dist/{chunk-QHJW5EXU.js → chunk-TWKKOM55.js} +2 -2
  142. package/dist/{chunk-M6OST55S.js → chunk-U3WZCU7E.js} +2 -2
  143. package/dist/{chunk-AIWULCUO.js → chunk-UF362QVH.js} +5 -3
  144. package/dist/{chunk-AIWULCUO.js.map → chunk-UF362QVH.js.map} +1 -1
  145. package/dist/{chunk-KXGNJJXB.js → chunk-UN4FVIBH.js} +7 -7
  146. package/dist/chunk-VEAVKDDB.js +29 -0
  147. package/dist/chunk-VEAVKDDB.js.map +1 -0
  148. package/dist/chunk-VEPTFUJY.js +29 -0
  149. package/dist/chunk-VEPTFUJY.js.map +1 -0
  150. package/dist/{chunk-TEILUWOI.js → chunk-VJV7GKQK.js} +10 -12
  151. package/dist/chunk-VJV7GKQK.js.map +1 -0
  152. package/dist/chunk-VQRAIPYF.js +50 -0
  153. package/dist/chunk-VQRAIPYF.js.map +1 -0
  154. package/dist/{chunk-NF5JWERG.js → chunk-VRIYFLBA.js} +2 -2
  155. package/dist/chunk-VWM3DAVB.js +265 -0
  156. package/dist/chunk-VWM3DAVB.js.map +1 -0
  157. package/dist/{chunk-RUEKROOS.js → chunk-VWRRVE6D.js} +2 -2
  158. package/dist/chunk-VYYM3MEN.js +98 -0
  159. package/dist/chunk-VYYM3MEN.js.map +1 -0
  160. package/dist/chunk-WBJIQSLL.js +167 -0
  161. package/dist/chunk-WBJIQSLL.js.map +1 -0
  162. package/dist/{chunk-XXYIOFUB.js → chunk-WIGQB62E.js} +5 -5
  163. package/dist/chunk-WZSCE6RM.js +466 -0
  164. package/dist/chunk-WZSCE6RM.js.map +1 -0
  165. package/dist/{chunk-5R3ERCDH.js → chunk-XGDAPN6M.js} +25 -9
  166. package/dist/{chunk-5R3ERCDH.js.map → chunk-XGDAPN6M.js.map} +1 -1
  167. package/dist/{chunk-DFEMTNPJ.js → chunk-XH7XP3OL.js} +8 -6
  168. package/dist/{chunk-DFEMTNPJ.js.map → chunk-XH7XP3OL.js.map} +1 -1
  169. package/dist/{chunk-IAGBDSCS.js → chunk-XREOISSI.js} +2 -2
  170. package/dist/chunk-XUBPSPKD.js +164 -0
  171. package/dist/chunk-XUBPSPKD.js.map +1 -0
  172. package/dist/chunk-Y3A5CB5G.js +247 -0
  173. package/dist/chunk-Y3A5CB5G.js.map +1 -0
  174. package/dist/{chunk-ZCGAHGUS.js → chunk-YCXCR7VG.js} +2 -2
  175. package/dist/{chunk-76722EBH.js → chunk-YMVQD5Q5.js} +11 -9
  176. package/dist/{chunk-76722EBH.js.map → chunk-YMVQD5Q5.js.map} +1 -1
  177. package/dist/{chunk-5TDJ56JE.js → chunk-YN5IAHN6.js} +1 -1
  178. package/dist/chunk-YN5IAHN6.js.map +1 -0
  179. package/dist/{chunk-TJYQIGAP.js → chunk-ZYJ55N7N.js} +9 -5
  180. package/dist/chunk-ZYJ55N7N.js.map +1 -0
  181. package/dist/classified/index.d.ts +16 -0
  182. package/dist/classified/index.js +40 -0
  183. package/dist/classified-marker-H6YSHYNK.js +24 -0
  184. package/dist/classified-marker-H6YSHYNK.js.map +1 -0
  185. package/dist/collection-facade-LVD22JLM.js +39 -0
  186. package/dist/computed-EXDMQODG.js +11 -0
  187. package/dist/consent/index.d.ts +3 -4
  188. package/dist/consent/index.js +10 -4
  189. package/dist/consent/index.js.map +1 -1
  190. package/dist/crdt/index.d.ts +3 -4
  191. package/dist/dead-filter-HQIE2YG7.js +28 -0
  192. package/dist/dead-filter-HQIE2YG7.js.map +1 -0
  193. package/dist/delegation-BJP73GAP.js +25 -0
  194. package/dist/derivations/index.d.ts +4 -5
  195. package/dist/derivations/index.js +13 -6
  196. package/dist/derive-BME7HDWO.js +21 -0
  197. package/dist/{dev-unlock-C9Ro3v_O.d.ts → dev-unlock-Bmm2pgJ0.d.ts} +1 -1
  198. package/dist/{enclave-UL5LW66V.js → enclave-NHORSWSF.js} +55 -18
  199. package/dist/executor-FE6X4LFX.js +9 -0
  200. package/dist/executor-KSHKRJXP.js +25 -0
  201. package/dist/executor-ZHTJJICG.js +9 -0
  202. package/dist/export-accessible-DACHM5VT.js +23 -0
  203. package/dist/extract-partition-RNENZZ4T.js +36 -0
  204. package/dist/{fanout-sidecar-GF3DJ6KR.js → fanout-sidecar-OFWN3NM7.js} +17 -14
  205. package/dist/fanout-sidecar-OFWN3NM7.js.map +1 -0
  206. package/dist/fence-watcher-DHQ775JB.js +69 -0
  207. package/dist/fence-watcher-DHQ775JB.js.map +1 -0
  208. package/dist/find-BNGBJNKP.js +11 -0
  209. package/dist/forget/index.d.ts +2 -2
  210. package/dist/forget/index.js +10 -4
  211. package/dist/forget/index.js.map +1 -1
  212. package/dist/guards/index.d.ts +4 -5
  213. package/dist/guards/index.js +4 -4
  214. package/dist/{hash-Cp5uwiox.d.ts → hash-DAJjMsCE.d.ts} +7 -2
  215. package/dist/history/index.d.ts +4 -5
  216. package/dist/history/index.js +12 -6
  217. package/dist/history/index.js.map +1 -1
  218. package/dist/i18n/index.d.ts +24 -5
  219. package/dist/i18n/index.js +50 -31
  220. package/dist/i18n/index.js.map +1 -1
  221. package/dist/in/index.d.ts +2 -3
  222. package/dist/{index-BzUo1B6n.d.ts → index-DjWbxsjb.d.ts} +8596 -5747
  223. package/dist/{index-BF9_96A5.d.ts → index-qwuNvO2B.d.ts} +26 -5
  224. package/dist/index.d.ts +116 -24
  225. package/dist/index.js +1479 -139
  226. package/dist/index.js.map +1 -1
  227. package/dist/indexing/index.d.ts +3 -4
  228. package/dist/indexing/index.js +4 -4
  229. package/dist/issue-NDI4CVZU.js +19 -0
  230. package/dist/json-schema-I22JCYCG.js +44 -0
  231. package/dist/json-schema-I22JCYCG.js.map +1 -0
  232. package/dist/lazy/index.d.ts +20 -0
  233. package/dist/lazy/index.js +12 -0
  234. package/dist/{ledger-RYI35CDS.js → ledger-6NDS2EO4.js} +12 -6
  235. package/dist/liberate-HN3RIGIP.js +24 -0
  236. package/dist/link-set-SJB2MVJV.js +31 -0
  237. package/dist/materialized-views/index.d.ts +22 -6
  238. package/dist/materialized-views/index.js +20 -10
  239. package/dist/{mime-magic-CGhw37_E.d.ts → mime-magic-bBj5OgUC.d.ts} +1 -1
  240. package/dist/noydb-BWF6EPIR.js +66 -0
  241. package/dist/on/index.d.ts +2 -3
  242. package/dist/on/index.js +10 -4
  243. package/dist/overlay-views/index.d.ts +4 -5
  244. package/dist/overlay-views/index.js +4 -4
  245. package/dist/periods/index.d.ts +3 -4
  246. package/dist/periods/index.js +21 -7
  247. package/dist/pod/index.d.ts +3 -4
  248. package/dist/pod/index.js +12 -6
  249. package/dist/{policy-IXK4FVXP.js → policy-WGNAG5H6.js} +5 -5
  250. package/dist/portability/index.d.ts +3 -4
  251. package/dist/portability/index.js +8 -8
  252. package/dist/post-register-CWKBQRC7.js +55 -0
  253. package/dist/post-register-CWKBQRC7.js.map +1 -0
  254. package/dist/{public-envelope-JHDQCPSX.js → public-envelope-EJLVIFX7.js} +4 -4
  255. package/dist/query/index.d.ts +2 -3
  256. package/dist/query/index.js +9 -6
  257. package/dist/{read-only-facade-5ADRJVTM.js → read-only-facade-CHCKSEPD.js} +2 -2
  258. package/dist/register-SBIX7TVV.js +23 -0
  259. package/dist/registry-3EQG6OOE.js +18 -0
  260. package/dist/registry-CA327ACV.js +9 -0
  261. package/dist/registry-E7OXOTSV.js +19 -0
  262. package/dist/request-withdrawal-KAH2AAXC.js +31 -0
  263. package/dist/reveal-R3JLHMUF.js +38 -0
  264. package/dist/reveal-R3JLHMUF.js.map +1 -0
  265. package/dist/revoke-IXLOJ3IH.js +24 -0
  266. package/dist/satellites/index.d.ts +4 -0
  267. package/dist/satellites/index.js +8 -0
  268. package/dist/sealed-record/index.d.ts +3 -4
  269. package/dist/sealed-record/index.js +13 -7
  270. package/dist/sealed-record/index.js.map +1 -1
  271. package/dist/session/index.d.ts +4 -5
  272. package/dist/session/index.js +10 -4
  273. package/dist/session/index.js.map +1 -1
  274. package/dist/shadow/index.d.ts +3 -4
  275. package/dist/shadow/index.js +2 -2
  276. package/dist/signer-Y46N2GJ3.js +25 -0
  277. package/dist/signer-Y46N2GJ3.js.map +1 -0
  278. package/dist/snapshots/index.d.ts +3 -4
  279. package/dist/snapshots/index.js +11 -5
  280. package/dist/snapshots/index.js.map +1 -1
  281. package/dist/{stale-3JWHNDIY.js → stale-Z7IW6RIL.js} +2 -2
  282. package/dist/stale-Z7IW6RIL.js.map +1 -0
  283. package/dist/storage-ADNP2UWI.js +23 -0
  284. package/dist/storage-ADNP2UWI.js.map +1 -0
  285. package/dist/{store-coordination-provider-3I7XWZZK.js → store-coordination-provider-DTDMI6VL.js} +3 -3
  286. package/dist/{subject-index-O75wKshW.d.ts → subject-index-CyOgGMJL.d.ts} +18 -0
  287. package/dist/sync/index.d.ts +2 -3
  288. package/dist/sync/index.js +10 -4
  289. package/dist/sync/index.js.map +1 -1
  290. package/dist/team/index.d.ts +45 -7
  291. package/dist/team/index.js +25 -12
  292. package/dist/tiers/index.d.ts +2 -3
  293. package/dist/tiers/index.js +11 -5
  294. package/dist/to/index.d.ts +2 -3
  295. package/dist/to/index.js +1 -2
  296. package/dist/{transition-guard-C7ol6oPw.d.ts → transition-guard-DI-krBsZ.d.ts} +1 -1
  297. package/dist/tx/index.d.ts +3 -4
  298. package/dist/tx/index.js +3 -3
  299. package/dist/ui/index.d.ts +4 -1
  300. package/dist/util/index.js +1 -1
  301. package/dist/validators-BUcli5Nh.d.ts +101 -0
  302. package/dist/{vault-diff-B5fYNBL7.d.ts → vault-diff-Z2DUayMe.d.ts} +1 -1
  303. package/dist/verify-JPF2YR5E.js +139 -0
  304. package/dist/verify-JPF2YR5E.js.map +1 -0
  305. package/dist/walk-XYA2O3LW.js +241 -0
  306. package/dist/walk-XYA2O3LW.js.map +1 -0
  307. package/dist/with/index.d.ts +3 -4
  308. package/dist/with/index.js +12 -6
  309. package/dist/{with-materialized-view-6p0Fk8bL.d.ts → with-materialized-view-BUmzlXue.d.ts} +1 -1
  310. package/dist/{with-overlayed-view-BJ6mXGMd.d.ts → with-overlayed-view-m4FaXXTO.d.ts} +1 -1
  311. package/dist/{with-rollup-BvQo3ROo.d.ts → with-rollup-DEKGI9vb.d.ts} +1 -1
  312. package/dist/withdraw-accessible-WLV4MTEN.js +28 -0
  313. package/dist/withdraw-accessible-WLV4MTEN.js.map +1 -0
  314. package/package.json +16 -16
  315. package/dist/adapter/index.d.ts +0 -5
  316. package/dist/adapter/index.js +0 -15
  317. package/dist/api-RW3KP7WU.js +0 -14
  318. package/dist/backup-XV3IOEGB.js.map +0 -1
  319. package/dist/chunk-26LGBE4T.js +0 -42
  320. package/dist/chunk-26LGBE4T.js.map +0 -1
  321. package/dist/chunk-5LUY7UTV.js.map +0 -1
  322. package/dist/chunk-5O3AOPDT.js.map +0 -1
  323. package/dist/chunk-5R5JW2JT.js.map +0 -1
  324. package/dist/chunk-5TDJ56JE.js.map +0 -1
  325. package/dist/chunk-62QYRORB.js.map +0 -1
  326. package/dist/chunk-AQTBSL7R.js.map +0 -1
  327. package/dist/chunk-BG3SPSR4.js.map +0 -1
  328. package/dist/chunk-BGIZAFY7.js +0 -1
  329. package/dist/chunk-DGDI2D4M.js.map +0 -1
  330. package/dist/chunk-I3TIKTJO.js.map +0 -1
  331. package/dist/chunk-IELYAOGG.js.map +0 -1
  332. package/dist/chunk-IPB7FTQX.js.map +0 -1
  333. package/dist/chunk-IUEN57TV.js.map +0 -1
  334. package/dist/chunk-K2WCO3NX.js +0 -1
  335. package/dist/chunk-LFLXAY2W.js.map +0 -1
  336. package/dist/chunk-LV7M27WM.js.map +0 -1
  337. package/dist/chunk-M2YKN37S.js +0 -524
  338. package/dist/chunk-M2YKN37S.js.map +0 -1
  339. package/dist/chunk-MTMJVJ5W.js.map +0 -1
  340. package/dist/chunk-Q7SS3IME.js +0 -120
  341. package/dist/chunk-Q7SS3IME.js.map +0 -1
  342. package/dist/chunk-RUIMKQTA.js.map +0 -1
  343. package/dist/chunk-SRB2XEWB.js.map +0 -1
  344. package/dist/chunk-TEILUWOI.js.map +0 -1
  345. package/dist/chunk-TJYQIGAP.js.map +0 -1
  346. package/dist/chunk-UIU2THRG.js.map +0 -1
  347. package/dist/chunk-UPJNJGGA.js.map +0 -1
  348. package/dist/chunk-WWGT2MDV.js.map +0 -1
  349. package/dist/chunk-Y22T3KQE.js.map +0 -1
  350. package/dist/chunk-ZYUC53LT.js.map +0 -1
  351. package/dist/collection-facade-GQAOGJP2.js +0 -33
  352. package/dist/delegation-UL5HKLER.js +0 -19
  353. package/dist/describe/index.d.ts +0 -1
  354. package/dist/describe/index.js +0 -1
  355. package/dist/describe-aBkJR2sd.d.ts +0 -131
  356. package/dist/executor-2FWQRLMG.js +0 -15
  357. package/dist/executor-QZ7BXICW.js +0 -9
  358. package/dist/executor-Z5ZLJVTV.js +0 -9
  359. package/dist/export-accessible-KRV5W4GH.js +0 -17
  360. package/dist/extract-partition-GLKBOXFQ.js +0 -30
  361. package/dist/fanout-sidecar-GF3DJ6KR.js.map +0 -1
  362. package/dist/issue-Y6UVIR43.js +0 -13
  363. package/dist/kernel/index.d.ts +0 -32
  364. package/dist/kernel/index.js +0 -53
  365. package/dist/liberate-CRPZEV7O.js +0 -18
  366. package/dist/noydb-367AM4HT.js +0 -50
  367. package/dist/registry-45RJNWGU.js +0 -9
  368. package/dist/registry-5GRV5VXI.js +0 -13
  369. package/dist/registry-WEUCHBO4.js +0 -11
  370. package/dist/request-withdrawal-GBPH2FDY.js +0 -25
  371. package/dist/revoke-TUFRGI6S.js +0 -18
  372. package/dist/signer-PNKTBVF7.js +0 -19
  373. package/dist/withdraw-accessible-FFS46EOD.js +0 -22
  374. /package/dist/{adapter/index.js.map → api-TX2EX2FX.js.map} +0 -0
  375. /package/dist/{chunk-5N6CZTCY.js.map → chunk-2OZXVKVP.js.map} +0 -0
  376. /package/dist/{chunk-UAG5KWVA.js.map → chunk-3MATJ6O4.js.map} +0 -0
  377. /package/dist/{chunk-AZAOEIKW.js.map → chunk-5YESYH2C.js.map} +0 -0
  378. /package/dist/{chunk-VCTFO5CO.js.map → chunk-6P5XCKSD.js.map} +0 -0
  379. /package/dist/{chunk-IO6GRPT6.js.map → chunk-7BWJHO2A.js.map} +0 -0
  380. /package/dist/{chunk-UDRIWL7A.js.map → chunk-BKARNZJN.js.map} +0 -0
  381. /package/dist/{chunk-V7RWQRG7.js.map → chunk-CB7CWSKW.js.map} +0 -0
  382. /package/dist/{chunk-CWPPNPOH.js.map → chunk-DJ7KIPLV.js.map} +0 -0
  383. /package/dist/{chunk-TA66UMI4.js.map → chunk-F4CEK5YM.js.map} +0 -0
  384. /package/dist/{chunk-SM3AVUHC.js.map → chunk-G4JYND6L.js.map} +0 -0
  385. /package/dist/{chunk-AXRXJTE2.js.map → chunk-G6XV4H65.js.map} +0 -0
  386. /package/dist/{chunk-UV5MFVO3.js.map → chunk-HPWKV3YB.js.map} +0 -0
  387. /package/dist/{chunk-SKF73JOP.js.map → chunk-ICXIFFYZ.js.map} +0 -0
  388. /package/dist/{chunk-LMTH2RM6.js.map → chunk-KNZB6JMR.js.map} +0 -0
  389. /package/dist/{chunk-PKHL44ER.js.map → chunk-LEJIKBBB.js.map} +0 -0
  390. /package/dist/{chunk-PSMV73A5.js.map → chunk-OBKWYKYC.js.map} +0 -0
  391. /package/dist/{chunk-CMGR4ZEW.js.map → chunk-OHHKHSJP.js.map} +0 -0
  392. /package/dist/{chunk-HCIPRAGS.js.map → chunk-OT76OZL6.js.map} +0 -0
  393. /package/dist/{chunk-SMXWYP24.js.map → chunk-OXCSVM3B.js.map} +0 -0
  394. /package/dist/{chunk-IGUYVGGI.js.map → chunk-P33LUIML.js.map} +0 -0
  395. /package/dist/{chunk-EIZUR2XW.js.map → chunk-PS2NEWEX.js.map} +0 -0
  396. /package/dist/{chunk-WYSO2NIH.js.map → chunk-QOC3VYL2.js.map} +0 -0
  397. /package/dist/{chunk-KVOXU4T5.js.map → chunk-RHK32N73.js.map} +0 -0
  398. /package/dist/{chunk-3YFXJ3ZP.js.map → chunk-RW3Y22MW.js.map} +0 -0
  399. /package/dist/{chunk-QHJW5EXU.js.map → chunk-TWKKOM55.js.map} +0 -0
  400. /package/dist/{chunk-M6OST55S.js.map → chunk-U3WZCU7E.js.map} +0 -0
  401. /package/dist/{chunk-KXGNJJXB.js.map → chunk-UN4FVIBH.js.map} +0 -0
  402. /package/dist/{chunk-NF5JWERG.js.map → chunk-VRIYFLBA.js.map} +0 -0
  403. /package/dist/{chunk-RUEKROOS.js.map → chunk-VWRRVE6D.js.map} +0 -0
  404. /package/dist/{chunk-XXYIOFUB.js.map → chunk-WIGQB62E.js.map} +0 -0
  405. /package/dist/{chunk-IAGBDSCS.js.map → chunk-XREOISSI.js.map} +0 -0
  406. /package/dist/{chunk-ZCGAHGUS.js.map → chunk-YCXCR7VG.js.map} +0 -0
  407. /package/dist/{describe → classified}/index.js.map +0 -0
  408. /package/dist/{api-RW3KP7WU.js.map → collection-facade-LVD22JLM.js.map} +0 -0
  409. /package/dist/{chunk-BGIZAFY7.js.map → computed-EXDMQODG.js.map} +0 -0
  410. /package/dist/{chunk-K2WCO3NX.js.map → delegation-BJP73GAP.js.map} +0 -0
  411. /package/dist/{collection-facade-GQAOGJP2.js.map → derive-BME7HDWO.js.map} +0 -0
  412. /package/dist/{delegation-UL5HKLER.js.map → enclave-NHORSWSF.js.map} +0 -0
  413. /package/dist/{enclave-UL5LW66V.js.map → executor-FE6X4LFX.js.map} +0 -0
  414. /package/dist/{executor-2FWQRLMG.js.map → executor-KSHKRJXP.js.map} +0 -0
  415. /package/dist/{executor-QZ7BXICW.js.map → executor-ZHTJJICG.js.map} +0 -0
  416. /package/dist/{executor-Z5ZLJVTV.js.map → export-accessible-DACHM5VT.js.map} +0 -0
  417. /package/dist/{export-accessible-KRV5W4GH.js.map → extract-partition-RNENZZ4T.js.map} +0 -0
  418. /package/dist/{extract-partition-GLKBOXFQ.js.map → find-BNGBJNKP.js.map} +0 -0
  419. /package/dist/{issue-Y6UVIR43.js.map → issue-NDI4CVZU.js.map} +0 -0
  420. /package/dist/{kernel → lazy}/index.js.map +0 -0
  421. /package/dist/{ledger-RYI35CDS.js.map → ledger-6NDS2EO4.js.map} +0 -0
  422. /package/dist/{liberate-CRPZEV7O.js.map → liberate-HN3RIGIP.js.map} +0 -0
  423. /package/dist/{noydb-367AM4HT.js.map → link-set-SJB2MVJV.js.map} +0 -0
  424. /package/dist/{policy-IXK4FVXP.js.map → noydb-BWF6EPIR.js.map} +0 -0
  425. /package/dist/{public-envelope-JHDQCPSX.js.map → policy-WGNAG5H6.js.map} +0 -0
  426. /package/dist/{read-only-facade-5ADRJVTM.js.map → public-envelope-EJLVIFX7.js.map} +0 -0
  427. /package/dist/{registry-45RJNWGU.js.map → read-only-facade-CHCKSEPD.js.map} +0 -0
  428. /package/dist/{registry-5GRV5VXI.js.map → register-SBIX7TVV.js.map} +0 -0
  429. /package/dist/{registry-WEUCHBO4.js.map → registry-3EQG6OOE.js.map} +0 -0
  430. /package/dist/{request-withdrawal-GBPH2FDY.js.map → registry-CA327ACV.js.map} +0 -0
  431. /package/dist/{revoke-TUFRGI6S.js.map → registry-E7OXOTSV.js.map} +0 -0
  432. /package/dist/{signer-PNKTBVF7.js.map → request-withdrawal-KAH2AAXC.js.map} +0 -0
  433. /package/dist/{stale-3JWHNDIY.js.map → revoke-IXLOJ3IH.js.map} +0 -0
  434. /package/dist/{withdraw-accessible-FFS46EOD.js.map → satellites/index.js.map} +0 -0
  435. /package/dist/{store-coordination-provider-3I7XWZZK.js.map → store-coordination-provider-DTDMI6VL.js.map} +0 -0
@@ -1,26 +1,18 @@
1
1
  import {
2
- reducerBuilder,
3
- wrapMoneyReducers
4
- } from "./chunk-LV7M27WM.js";
2
+ reducerBuilder
3
+ } from "./chunk-DFVUTGT2.js";
5
4
  import {
6
- MoneyPrecisionError,
7
5
  evaluateClause,
8
- formatScaledInt,
9
6
  hasFnClause,
10
- moneyFieldClause,
11
- parseToScaledInt,
12
7
  readPath
13
- } from "./chunk-M2YKN37S.js";
14
- import {
15
- applyI18nLocale
16
- } from "./chunk-5LUY7UTV.js";
8
+ } from "./chunk-IGJCYUT5.js";
17
9
  import {
18
10
  CrossJoinSourceUnknownError,
19
11
  CrossJoinTooLargeError,
20
12
  DanglingReferenceError,
21
- JoinTooLargeError,
22
- ValidationError
23
- } from "./chunk-ZYUC53LT.js";
13
+ FieldNotQueryableError,
14
+ JoinTooLargeError
15
+ } from "./chunk-S7VFUQM2.js";
24
16
 
25
17
  // src/kernel/query/join.ts
26
18
  var DEFAULT_JOIN_MAX_ROWS = 5e4;
@@ -114,26 +106,26 @@ function applyOneJoin(leftRows, leg, context, locale) {
114
106
  warnCeilingApproaching(leg.target, "right", rightSnapshot.length, maxRows);
115
107
  }
116
108
  const effLocale = locale ?? context.defaultLocale;
117
- const i18nResolve = effLocale !== void 0 && source.i18nFields !== void 0 ? (right) => right !== null && typeof right === "object" ? applyI18nLocale(right, source.i18nFields, effLocale, void 0, "join") : right : void 0;
109
+ const presentResolve = effLocale !== void 0 && source.presentForJoin !== void 0 ? (right) => right !== null && typeof right === "object" ? source.presentForJoin(right, effLocale) : right : void 0;
118
110
  const strategy = leg.strategy ?? (source.lookupById ? "nested" : "hash");
119
111
  if (strategy === "nested" && source.lookupById) {
120
112
  const lookup = (id) => source.lookupById?.(id);
121
- return nestedLoopJoin(leftRows, leg, lookup, i18nResolve);
113
+ return nestedLoopJoin(leftRows, leg, lookup, presentResolve);
122
114
  }
123
- return hashJoin(leftRows, leg, rightSnapshot, i18nResolve);
115
+ return hashJoin(leftRows, leg, rightSnapshot, presentResolve);
124
116
  }
125
- function nestedLoopJoin(leftRows, leg, lookupById, i18nResolve) {
117
+ function nestedLoopJoin(leftRows, leg, lookupById, presentResolve) {
126
118
  const out = [];
127
119
  for (const left of leftRows) {
128
120
  const rawId = readPath(left, leg.field);
129
121
  const key = coerceRefKey(rawId);
130
122
  let right = key === null ? void 0 : lookupById(key);
131
- if (i18nResolve && right !== void 0) right = i18nResolve(right);
123
+ if (presentResolve && right !== void 0) right = presentResolve(right);
132
124
  out.push(attachJoin(left, leg, right, rawId));
133
125
  }
134
126
  return out;
135
127
  }
136
- function hashJoin(leftRows, leg, rightSnapshot, i18nResolve) {
128
+ function hashJoin(leftRows, leg, rightSnapshot, presentResolve) {
137
129
  const rightMap = /* @__PURE__ */ new Map();
138
130
  for (const record of rightSnapshot) {
139
131
  const rawId = readPath(record, "id");
@@ -147,7 +139,7 @@ function hashJoin(leftRows, leg, rightSnapshot, i18nResolve) {
147
139
  const rawId = readPath(left, leg.field);
148
140
  const key = coerceRefKey(rawId);
149
141
  let right = key === null ? void 0 : rightMap.get(key);
150
- if (i18nResolve && right !== void 0) right = i18nResolve(right);
142
+ if (presentResolve && right !== void 0) right = presentResolve(right);
151
143
  out.push(attachJoin(left, leg, right, rawId));
152
144
  }
153
145
  return out;
@@ -271,277 +263,6 @@ var NO_AGGREGATE = {
271
263
  }
272
264
  };
273
265
 
274
- // src/with-shape/money/paths.ts
275
- var SEGMENT_RE = /^(\*|[^.[\]*]+)(\[\])?$/;
276
- var parseCache = /* @__PURE__ */ new Map();
277
- function parseMoneyPath(path) {
278
- const cached = parseCache.get(path);
279
- if (cached) return cached;
280
- if (typeof path !== "string" || path.length === 0) {
281
- throw new ValidationError("moneyFields: path must be a non-empty string");
282
- }
283
- const segments = [];
284
- for (const part of path.split(".")) {
285
- const m = SEGMENT_RE.exec(part);
286
- if (!m) {
287
- throw new ValidationError(
288
- `moneyFields: invalid path "${path}" \u2014 segment "${part}" must be a key, "key[]", "*", or "*[]"`
289
- );
290
- }
291
- const array = m[2] === "[]";
292
- segments.push(
293
- m[1] === "*" ? { kind: "wildcard", array } : { kind: "key", key: m[1], array }
294
- );
295
- }
296
- parseCache.set(path, segments);
297
- return segments;
298
- }
299
- function isSimpleMoneyPath(path) {
300
- return !path.includes(".") && !path.includes("[") && !path.includes("*");
301
- }
302
- function validateMoneyFieldPaths(moneyFields) {
303
- for (const path of Object.keys(moneyFields)) parseMoneyPath(path);
304
- }
305
- function transformAtMoneyPath(node, path, segments, index, visit, lenient) {
306
- if (node === null || node === void 0) return node;
307
- const seg = segments[index];
308
- const last = index === segments.length - 1;
309
- if (seg.kind === "key") {
310
- if (typeof node !== "object" || Array.isArray(node)) {
311
- if (lenient) return node;
312
- throw new ValidationError(
313
- `moneyFields: path "${path}" expected an object at segment "${seg.key}", got ${Array.isArray(node) ? "an array" : typeof node}`
314
- );
315
- }
316
- const obj2 = node;
317
- if (!(seg.key in obj2) || obj2[seg.key] === null || obj2[seg.key] === void 0) return node;
318
- if (seg.array) {
319
- const arr = obj2[seg.key];
320
- if (!Array.isArray(arr)) {
321
- if (lenient) return node;
322
- throw new ValidationError(
323
- `moneyFields: path "${path}" declares "${seg.key}[]" but the value is not an array`
324
- );
325
- }
326
- const cloned = [...arr];
327
- if (last) {
328
- for (let i = 0; i < cloned.length; i++) visit(cloned, i);
329
- } else {
330
- for (let i = 0; i < cloned.length; i++) {
331
- cloned[i] = transformAtMoneyPath(cloned[i], path, segments, index + 1, visit, lenient);
332
- }
333
- }
334
- return { ...obj2, [seg.key]: cloned };
335
- }
336
- const clone2 = { ...obj2 };
337
- if (last) {
338
- visit(clone2, seg.key);
339
- } else {
340
- clone2[seg.key] = transformAtMoneyPath(clone2[seg.key], path, segments, index + 1, visit, lenient);
341
- }
342
- return clone2;
343
- }
344
- if (seg.array) {
345
- if (!Array.isArray(node)) {
346
- if (lenient) return node;
347
- throw new ValidationError(`moneyFields: path "${path}" declares "*[]" but the value is not an array`);
348
- }
349
- const cloned = [...node];
350
- if (last) {
351
- for (let i = 0; i < cloned.length; i++) visit(cloned, i);
352
- } else {
353
- for (let i = 0; i < cloned.length; i++) {
354
- cloned[i] = transformAtMoneyPath(cloned[i], path, segments, index + 1, visit, lenient);
355
- }
356
- }
357
- return cloned;
358
- }
359
- if (typeof node !== "object" || Array.isArray(node)) {
360
- if (lenient) return node;
361
- throw new ValidationError(
362
- `moneyFields: path "${path}" applies "*" to a non-object (${Array.isArray(node) ? 'array \u2014 use "*[]"' : typeof node})`
363
- );
364
- }
365
- const obj = node;
366
- const clone = { ...obj };
367
- for (const key of Object.keys(obj)) {
368
- const v = clone[key];
369
- if (v === null || v === void 0) continue;
370
- if (last) visit(clone, key);
371
- else clone[key] = transformAtMoneyPath(v, path, segments, index + 1, visit, lenient);
372
- }
373
- return clone;
374
- }
375
-
376
- // src/with-shape/money/normalize.ts
377
- function isMoneyValueObject(v) {
378
- return typeof v === "object" && v !== null && "currency" in v;
379
- }
380
- function quantizeAmount(field, input, scale, rounding) {
381
- const r = parseToScaledInt(input, scale, rounding);
382
- if (!r.ok) {
383
- if (r.reason === "precision") throw new MoneyPrecisionError(field, input, scale);
384
- throw new TypeError(`money: field "${field}" value ${JSON.stringify(input)} is not a finite decimal`);
385
- }
386
- return r.value.toString();
387
- }
388
- function canonicalizeStoredMoney(record, moneyFields) {
389
- if (record === null || record === void 0) return record;
390
- if (!moneyFields || Object.keys(moneyFields).length === 0) return record;
391
- return decodeMoneyFields(record, moneyFields, "raw");
392
- }
393
- function canonicalizeIncomingMoney(record, moneyFields) {
394
- if (!moneyFields || Object.keys(moneyFields).length === 0) return record;
395
- try {
396
- return decodeMoneyFields(
397
- quantizeMoneyFields(record, moneyFields),
398
- moneyFields,
399
- "raw"
400
- );
401
- } catch {
402
- return record;
403
- }
404
- }
405
- function quantizeValue(field, raw, desc) {
406
- if (desc.mode === "fixed") {
407
- const currency2 = desc.fixedCurrency;
408
- return quantizeAmount(field, raw, desc.scaleFor(currency2), desc.rounding);
409
- }
410
- let amount;
411
- let currency;
412
- if (isMoneyValueObject(raw)) {
413
- currency = String(raw.currency);
414
- amount = raw.amount;
415
- } else {
416
- const sole = desc.soleCurrency();
417
- if (sole === void 0) {
418
- throw new TypeError(
419
- `money: field "${field}" is multi-currency \u2014 write { amount, currency }, not a bare amount`
420
- );
421
- }
422
- currency = sole;
423
- amount = raw;
424
- }
425
- const scale = desc.scaleFor(currency);
426
- return { amount: quantizeAmount(field, amount, scale, desc.rounding), currency };
427
- }
428
- function quantizeMoneyFields(record, moneyFields) {
429
- let out = { ...record };
430
- for (const [path, desc] of Object.entries(moneyFields)) {
431
- if (isSimpleMoneyPath(path)) {
432
- const raw = out[path];
433
- if (raw === null || raw === void 0) continue;
434
- out[path] = quantizeValue(path, raw, desc);
435
- continue;
436
- }
437
- out = transformAtMoneyPath(
438
- out,
439
- path,
440
- parseMoneyPath(path),
441
- 0,
442
- (container, key) => {
443
- const raw = container[key];
444
- if (raw === null || raw === void 0) return;
445
- container[key] = quantizeValue(path, raw, desc);
446
- },
447
- /* lenient */
448
- false
449
- );
450
- }
451
- return out;
452
- }
453
- function formatCurrency(decimal, currency, scale, locale) {
454
- const fmt = new Intl.NumberFormat(locale, {
455
- style: "currency",
456
- currency,
457
- minimumFractionDigits: scale,
458
- maximumFractionDigits: scale
459
- });
460
- return fmt.format(decimal);
461
- }
462
- function moneyScaledValue(stored, desc) {
463
- let raw;
464
- if (desc.mode === "fixed") {
465
- raw = stored;
466
- } else {
467
- if (!isMoneyValueObject(stored)) return null;
468
- raw = stored.amount;
469
- }
470
- if (typeof raw !== "string" && typeof raw !== "number") return null;
471
- try {
472
- return BigInt(String(raw));
473
- } catch {
474
- return null;
475
- }
476
- }
477
- function decodeValue(stored, desc) {
478
- let currency;
479
- let scaledIntString;
480
- if (desc.mode === "fixed") {
481
- if (typeof stored !== "string" && typeof stored !== "number") return null;
482
- currency = desc.fixedCurrency;
483
- scaledIntString = String(stored);
484
- } else {
485
- if (!isMoneyValueObject(stored)) return null;
486
- const amount = stored.amount;
487
- if (typeof stored.currency !== "string" || typeof amount !== "string" && typeof amount !== "number") return null;
488
- currency = stored.currency;
489
- scaledIntString = String(amount);
490
- }
491
- const scale = desc.scaleFor(currency);
492
- let decimal;
493
- try {
494
- decimal = formatScaledInt(BigInt(scaledIntString), scale);
495
- } catch {
496
- return null;
497
- }
498
- return {
499
- decoded: desc.mode === "fixed" ? decimal : { amount: decimal, currency },
500
- decimal,
501
- currency,
502
- scale
503
- };
504
- }
505
- function decodeMoneyFields(record, moneyFields, locale) {
506
- let out = { ...record };
507
- const format = locale !== "raw";
508
- const fmtLocale = typeof locale === "string" && locale !== "raw" ? locale : "en-US";
509
- for (const [path, desc] of Object.entries(moneyFields)) {
510
- if (isSimpleMoneyPath(path)) {
511
- const stored = out[path];
512
- if (stored === null || stored === void 0) continue;
513
- const r = decodeValue(stored, desc);
514
- if (r === null) continue;
515
- out[path] = r.decoded;
516
- if (format) {
517
- out[`${path}Formatted`] = formatCurrency(r.decimal, r.currency, r.scale, fmtLocale);
518
- out[`${path}Number`] = Number(r.decimal);
519
- }
520
- continue;
521
- }
522
- out = transformAtMoneyPath(
523
- out,
524
- path,
525
- parseMoneyPath(path),
526
- 0,
527
- (container, key) => {
528
- const stored = container[key];
529
- if (stored === null || stored === void 0) return;
530
- const r = decodeValue(stored, desc);
531
- if (r === null) return;
532
- container[key] = r.decoded;
533
- if (format && typeof key === "string" && !Array.isArray(container)) {
534
- container[`${key}Formatted`] = formatCurrency(r.decimal, r.currency, r.scale, fmtLocale);
535
- container[`${key}Number`] = Number(r.decimal);
536
- }
537
- },
538
- /* lenient */
539
- true
540
- );
541
- }
542
- return out;
543
- }
544
-
545
266
  // src/kernel/query/builder.ts
546
267
  var EMPTY_PLAN = {
547
268
  clauses: [],
@@ -672,10 +393,29 @@ var Query = class _Query {
672
393
  * quantized into stored scaled-int space at build time and evaluated
673
394
  * BigInt-exact per record. A malformed operand or a string operator
674
395
  * (`contains`/`startsWith`) throws here, at the call site.
396
+ *
397
+ * Consults the Via pipeline's posture before building a clause (#629
398
+ * Task 8): a field whose posture is `queryable: 'none'` (e.g. a
399
+ * `blobFields` slot) throws `FieldNotQueryableError` here, at the call
400
+ * site. Every other posture is unaffected — the existing per-binding
401
+ * `buildClause` machinery runs exactly as before.
675
402
  */
676
403
  where(field, op, value) {
677
- const desc = this.source.moneyFields?.[field];
678
- const clause = desc ? moneyFieldClause(field, op, value, desc) : { type: "field", field, op, value };
404
+ const via = this.source.via;
405
+ if (via?.postureFor(field)?.queryable === "none") throw new FieldNotQueryableError(field);
406
+ const viaClause = via?.buildClause(field, op, value);
407
+ const clause = viaClause ? {
408
+ type: "field",
409
+ field,
410
+ op,
411
+ value,
412
+ via: {
413
+ brand: viaClause.brand,
414
+ payload: viaClause.payload,
415
+ evaluate: (actual, evalOp) => via.evaluateClause(viaClause, actual, evalOp),
416
+ indexValue: via.indexProbe(viaClause, op)
417
+ }
418
+ } : { type: "field", field, op, value };
679
419
  return new _Query(
680
420
  this.source,
681
421
  { ...this.plan, clauses: [...this.plan.clauses, clause] },
@@ -745,8 +485,13 @@ var Query = class _Query {
745
485
  * Sort by a field. Subsequent calls are tie-breakers. Pass
746
486
  * `{ by: 'label' }` to sort a `dictKey`/`staticDict` field by its resolved
747
487
  * label at the query locale instead of the stored code.
488
+ *
489
+ * Consults the Via pipeline's posture (#629 Task 8): a field whose posture
490
+ * is `queryable: 'none'` throws `FieldNotQueryableError` here, at the call
491
+ * site — same gate as `where()`.
748
492
  */
749
493
  orderBy(field, direction = "asc", opts) {
494
+ if (this.source.via?.postureFor(field)?.queryable === "none") throw new FieldNotQueryableError(field);
750
495
  const entry = opts?.by === "label" ? { field, direction, by: "label" } : { field, direction };
751
496
  return new _Query(
752
497
  this.source,
@@ -960,7 +705,7 @@ var Query = class _Query {
960
705
  * (Left/base i18n fields are resolved by `get`/`list`, not here.)
961
706
  */
962
707
  toArray(opts) {
963
- const base = this.decodeMoney(executePlanWithSource(this.source, this.plan, this.joinContext, opts?.locale));
708
+ const base = this.decodeVia(executePlanWithSource(this.source, this.plan, this.joinContext, opts?.locale));
964
709
  if (this.plan.joins.length === 0) return base;
965
710
  if (!this.joinContext) {
966
711
  throw new Error(
@@ -970,21 +715,23 @@ var Query = class _Query {
970
715
  return applyJoins(base, this.plan.joins, this.joinContext, opts?.locale);
971
716
  }
972
717
  /**
973
- * Decode this source's money fields on read (stored scaled-int → canonical
974
- * decimal), so `query().toArray()` agrees with `get()`/`sum()` on the value.
975
- * No-op when the source declares no money fields.
718
+ * Decode this source's Via-covered fields on read (e.g. money: stored
719
+ * scaled-int → canonical decimal), so `query().toArray()` agrees with
720
+ * `get()`/`sum()` on the value. No-op when the source's Via pipeline
721
+ * declares no result decode.
976
722
  *
977
- * The query layer carries no locale context, so we decode with `'raw'` —
978
- * canonical decimal, WITHOUT fabricating locale-formatted `<field>Formatted`
979
- * / `<field>Number` virtuals. Producing a guessed-locale string here would
980
- * reintroduce a "two read paths disagree" failure on the virtual
981
- * field (e.g. it-IT via `get()` vs en-US here). Consumers who need formatted
982
- * money read through `get()`/`list()` with a locale.
723
+ * The query layer carries no locale context, so money decodes with
724
+ * `'raw'` — canonical decimal, WITHOUT fabricating locale-formatted
725
+ * `<field>Formatted` / `<field>Number` virtuals. Producing a
726
+ * guessed-locale string here would reintroduce a "two read paths
727
+ * disagree" failure on the virtual field (e.g. it-IT via `get()` vs
728
+ * en-US here). Consumers who need formatted money read through
729
+ * `get()`/`list()` with a locale.
983
730
  */
984
- decodeMoney(records) {
985
- const moneyFields = this.source.moneyFields;
986
- if (!moneyFields || Object.keys(moneyFields).length === 0) return records;
987
- return records.map((r) => decodeMoneyFields(r, moneyFields, "raw"));
731
+ decodeVia(records) {
732
+ const via = this.source.via;
733
+ if (!via || !via.hasResultDecode) return records;
734
+ return records.map((r) => via.decodeResults(r));
988
735
  }
989
736
  /** Return the first matching record, or null. Joins are applied. `opts.locale` resolves joined i18n fields. */
990
737
  first(opts) {
@@ -1015,10 +762,7 @@ var Query = class _Query {
1015
762
  }
1016
763
  aggregate(specOrBuild) {
1017
764
  let spec = typeof specOrBuild === "function" ? specOrBuild(reducerBuilder) : specOrBuild;
1018
- const moneyFields = this.source.moneyFields;
1019
- if (moneyFields) {
1020
- spec = wrapMoneyReducers(spec, moneyFields);
1021
- }
765
+ spec = this.source.via?.wrapReducers(spec) ?? spec;
1022
766
  const source = this.source;
1023
767
  const clauses = this.plan.clauses;
1024
768
  const joinCtx = this.joinContext;
@@ -1067,14 +811,14 @@ var Query = class _Query {
1067
811
  field,
1068
812
  upstreams,
1069
813
  dictLabelResolver,
1070
- this.source.moneyFields
814
+ this.source.via
1071
815
  );
1072
816
  }
1073
817
  return this.aggregateStrategy.groupByN(
1074
818
  executeRecords,
1075
819
  fields,
1076
820
  upstreams,
1077
- this.source.moneyFields
821
+ this.source.via
1078
822
  );
1079
823
  }
1080
824
  /**
@@ -1207,8 +951,8 @@ function executePlanWithSource(source, plan, joinContext, locale) {
1207
951
  result = remainingClauses.length === 0 ? [...candidates] : filterRecords(candidates, remainingClauses, fnViewDecoder(source));
1208
952
  }
1209
953
  if (plan.orderBy.length > 0) {
1210
- const labelMaps = buildOrderLabelMaps(plan.orderBy, joinContext, locale);
1211
- result = sortRecords(result, plan.orderBy, source.moneyFields, labelMaps);
954
+ const labelMaps = buildOrderLabelMaps(plan.orderBy, joinContext, locale, source.via);
955
+ result = sortRecords(result, plan.orderBy, source.via, labelMaps);
1212
956
  }
1213
957
  if (plan.offset > 0) {
1214
958
  result = result.slice(plan.offset);
@@ -1228,12 +972,13 @@ function candidateRecords(source, clauses) {
1228
972
  const clause = clauses[i];
1229
973
  if (clause.type !== "field") continue;
1230
974
  if (!indexes.has(clause.field)) continue;
1231
- if (clause.money?.mode === "multi") continue;
975
+ if (clause.via && clause.via.indexValue === void 0) continue;
976
+ const probeValue = clause.via ? clause.via.indexValue : clause.value;
1232
977
  let ids = null;
1233
978
  if (clause.op === "==") {
1234
- ids = indexes.lookupEqual(clause.field, clause.value);
1235
- } else if (clause.op === "in" && Array.isArray(clause.value)) {
1236
- ids = indexes.lookupIn(clause.field, clause.value);
979
+ ids = indexes.lookupEqual(clause.field, probeValue);
980
+ } else if (clause.op === "in" && Array.isArray(probeValue)) {
981
+ ids = indexes.lookupIn(clause.field, probeValue);
1237
982
  }
1238
983
  if (ids !== null) {
1239
984
  const remaining = [];
@@ -1275,9 +1020,9 @@ function executePlan(records, plan) {
1275
1020
  return result;
1276
1021
  }
1277
1022
  function fnViewDecoder(source) {
1278
- const mf = source.moneyFields;
1279
- if (!mf || Object.keys(mf).length === 0) return void 0;
1280
- return (r) => decodeMoneyFields(r, mf, "raw");
1023
+ const via = source.via;
1024
+ if (!via || !via.hasResultDecode) return void 0;
1025
+ return (r) => via.decodeResults(r);
1281
1026
  }
1282
1027
  function filterRecords(records, clauses, decodeForFns) {
1283
1028
  if (clauses.length === 0) return [...records];
@@ -1365,55 +1110,55 @@ function applyCrossJoin(leftRel, clause, rightSource) {
1365
1110
  }
1366
1111
  return expanded;
1367
1112
  }
1368
- function sortRecords(records, orderBy, moneyFields, labelMaps) {
1113
+ function sortRecords(records, orderBy, via, labelMaps) {
1369
1114
  return [...records].sort((a, b) => {
1370
1115
  for (const { field, direction, by } of orderBy) {
1371
1116
  let av = readField(a, field);
1372
1117
  let bv = readField(b, field);
1373
- const labelMap = by === "label" ? labelMaps?.get(field) : void 0;
1374
- if (labelMap) {
1375
- av = (typeof av === "string" ? labelMap.get(av) : void 0) ?? av;
1376
- bv = (typeof bv === "string" ? labelMap.get(bv) : void 0) ?? bv;
1118
+ const labelResolver = by === "label" ? labelMaps?.get(field) : void 0;
1119
+ if (labelResolver) {
1120
+ av = (typeof av === "string" ? labelResolver(av) : void 0) ?? av;
1121
+ bv = (typeof bv === "string" ? labelResolver(bv) : void 0) ?? bv;
1377
1122
  const cmp2 = compareValues(av, bv);
1378
1123
  if (cmp2 !== 0) return direction === "asc" ? cmp2 : -cmp2;
1379
1124
  continue;
1380
1125
  }
1381
- const desc = moneyFields?.[field];
1382
- const cmp = desc ? compareMoney(av, bv, desc) : compareValues(av, bv);
1126
+ const viaCmp = via?.compareForOrder(field, av, bv);
1127
+ const cmp = viaCmp !== void 0 ? viaCmp : compareValues(av, bv);
1383
1128
  if (cmp !== 0) return direction === "asc" ? cmp : -cmp;
1384
1129
  }
1385
1130
  return 0;
1386
1131
  });
1387
1132
  }
1388
- function buildOrderLabelMaps(orderBy, joinContext, locale) {
1389
- if (!joinContext?.resolveDictSource) return void 0;
1390
- const resolveDict = joinContext.resolveDictSource.bind(joinContext);
1133
+ function buildOrderLabelMaps(orderBy, joinContext, locale, via) {
1391
1134
  let maps;
1392
1135
  for (const { field, by } of orderBy) {
1393
1136
  if (by !== "label") continue;
1394
- const dictSource = resolveDict(field);
1395
- if (!dictSource) continue;
1396
- const loc = locale ?? dictSource.displayLocale;
1397
- if (loc === void 0) continue;
1398
- const codeToLabel = /* @__PURE__ */ new Map();
1399
- for (const entry of dictSource.snapshot()) {
1400
- const k = entry["key"];
1401
- const labels = entry["labels"];
1402
- const label = labels?.[loc];
1403
- if (typeof k === "string" && typeof label === "string") codeToLabel.set(k, label);
1137
+ const dictSource = joinContext?.resolveDictSource?.(field);
1138
+ if (dictSource) {
1139
+ const loc = locale ?? dictSource.displayLocale;
1140
+ if (loc === void 0) continue;
1141
+ const codeToLabel = /* @__PURE__ */ new Map();
1142
+ for (const entry of dictSource.snapshot()) {
1143
+ const k = entry["key"];
1144
+ const labels = entry["labels"];
1145
+ const label = labels?.[loc];
1146
+ if (typeof k === "string" && typeof label === "string") codeToLabel.set(k, label);
1147
+ }
1148
+ ;
1149
+ (maps ??= /* @__PURE__ */ new Map()).set(field, (code) => codeToLabel.get(code));
1150
+ continue;
1151
+ }
1152
+ if (via) {
1153
+ const cache = /* @__PURE__ */ new Map();
1154
+ (maps ??= /* @__PURE__ */ new Map()).set(field, (code) => {
1155
+ if (!cache.has(code)) cache.set(code, via.resolveOrderLabel(field, code, locale));
1156
+ return cache.get(code);
1157
+ });
1404
1158
  }
1405
- ;
1406
- (maps ??= /* @__PURE__ */ new Map()).set(field, codeToLabel);
1407
1159
  }
1408
1160
  return maps;
1409
1161
  }
1410
- function compareMoney(a, b, desc) {
1411
- const av = moneyScaledValue(a, desc);
1412
- const bv = moneyScaledValue(b, desc);
1413
- if (av === null) return bv === null ? 0 : 1;
1414
- if (bv === null) return -1;
1415
- return av < bv ? -1 : av > bv ? 1 : 0;
1416
- }
1417
1162
  function readField(record, field) {
1418
1163
  if (record === null || record === void 0) return void 0;
1419
1164
  if (!field.includes(".")) {
@@ -1555,28 +1300,30 @@ var ScanBuilder = class _ScanBuilder {
1555
1300
  */
1556
1301
  joinContext;
1557
1302
  /**
1558
- * Money field descriptors for the backing collection. When present, yielded
1559
- * records are decoded (stored scaled-int → canonical decimal) so `scan()`
1560
- * agrees with `get()`/`list()`/`query().toArray()`. Decoded with
1561
- * `'raw'` (canonical decimal, no locale-formatted virtuals) since the scan
1562
- * stream carries no locale context, mirroring `Query.toArray()`.
1303
+ * The backing collection's compiled Via pipeline (money now; more Via
1304
+ * features later). When it declares a result decode, yielded records
1305
+ * are decoded (e.g. money: stored scaled-int → canonical decimal) so
1306
+ * `scan()` agrees with `get()`/`list()`/`query().toArray()`. Decoded
1307
+ * with `'raw'` (canonical decimal, no locale-formatted virtuals) since
1308
+ * the scan stream carries no locale context, mirroring `Query.toArray()`.
1563
1309
  */
1564
- moneyFields;
1565
- constructor(pageProvider, pageSize = DEFAULT_SCAN_PAGE_SIZE, clauses = [], joins = [], joinContext, moneyFields) {
1310
+ via;
1311
+ constructor(pageProvider, pageSize = DEFAULT_SCAN_PAGE_SIZE, clauses = [], joins = [], joinContext, via) {
1566
1312
  this.pageProvider = pageProvider;
1567
1313
  this.pageSize = pageSize;
1568
1314
  this.clauses = clauses;
1569
1315
  this.joins = joins;
1570
1316
  this.joinContext = joinContext;
1571
- this.moneyFields = moneyFields;
1317
+ this.via = via;
1572
1318
  }
1573
1319
  /**
1574
- * Decode this scan's money fields on a record (stored scaled-int → canonical
1575
- * decimal). No-op when no money fields are declared. See {@link moneyFields}.
1320
+ * Decode this scan's Via-covered fields on a record (e.g. money: stored
1321
+ * scaled-int → canonical decimal). No-op when the Via pipeline declares
1322
+ * no result decode. See {@link via}.
1576
1323
  */
1577
- decodeMoney(record) {
1578
- if (!this.moneyFields || Object.keys(this.moneyFields).length === 0) return record;
1579
- return decodeMoneyFields(record, this.moneyFields, "raw");
1324
+ decodeVia(record) {
1325
+ if (!this.via || !this.via.hasResultDecode) return record;
1326
+ return this.via.decodeResults(record);
1580
1327
  }
1581
1328
  /**
1582
1329
  * Add a field comparison. Runs per record as the scan stream
@@ -1590,17 +1337,34 @@ var ScanBuilder = class _ScanBuilder {
1590
1337
  * the in-memory cache where indexes live. Index-accelerated scans
1591
1338
  * are a future optimization — the current implementation
1592
1339
  * evaluates clauses per record in O(1) per clause.
1340
+ *
1341
+ * Consults the Via pipeline's posture before building a clause (#629
1342
+ * Task 8): a field whose posture is `queryable: 'none'` throws
1343
+ * `FieldNotQueryableError` here, at the call site — same gate as
1344
+ * `Query.where()`.
1593
1345
  */
1594
1346
  where(field, op, value) {
1595
- const desc = this.moneyFields?.[field];
1596
- const clause = desc ? moneyFieldClause(field, op, value, desc) : { type: "field", field, op, value };
1347
+ const via = this.via;
1348
+ if (via?.postureFor(field)?.queryable === "none") throw new FieldNotQueryableError(field);
1349
+ const viaClause = via?.buildClause(field, op, value);
1350
+ const clause = viaClause ? {
1351
+ type: "field",
1352
+ field,
1353
+ op,
1354
+ value,
1355
+ via: {
1356
+ brand: viaClause.brand,
1357
+ payload: viaClause.payload,
1358
+ evaluate: (actual, evalOp) => via.evaluateClause(viaClause, actual, evalOp)
1359
+ }
1360
+ } : { type: "field", field, op, value };
1597
1361
  return new _ScanBuilder(
1598
1362
  this.pageProvider,
1599
1363
  this.pageSize,
1600
1364
  [...this.clauses, clause],
1601
1365
  this.joins,
1602
1366
  this.joinContext,
1603
- this.moneyFields
1367
+ this.via
1604
1368
  );
1605
1369
  }
1606
1370
  /**
@@ -1620,7 +1384,7 @@ var ScanBuilder = class _ScanBuilder {
1620
1384
  [...this.clauses, clause],
1621
1385
  this.joins,
1622
1386
  this.joinContext,
1623
- this.moneyFields
1387
+ this.via
1624
1388
  );
1625
1389
  }
1626
1390
  /**
@@ -1732,7 +1496,7 @@ var ScanBuilder = class _ScanBuilder {
1732
1496
  this.clauses,
1733
1497
  [...this.joins, leg],
1734
1498
  this.joinContext,
1735
- this.moneyFields
1499
+ this.via
1736
1500
  );
1737
1501
  }
1738
1502
  /**
@@ -1749,7 +1513,7 @@ var ScanBuilder = class _ScanBuilder {
1749
1513
  while (true) {
1750
1514
  for (const record of page.items) {
1751
1515
  if (!this.recordMatches(record)) continue;
1752
- const decoded = this.decodeMoney(record);
1516
+ const decoded = this.decodeVia(record);
1753
1517
  if (joinResolvers === null) {
1754
1518
  yield decoded;
1755
1519
  } else {
@@ -1879,6 +1643,7 @@ var ScanBuilder = class _ScanBuilder {
1879
1643
  }
1880
1644
  async aggregate(specOrBuild) {
1881
1645
  const spec = typeof specOrBuild === "function" ? specOrBuild(reducerBuilder) : specOrBuild;
1646
+ this.via?.refuseUnqueryableReducers(spec);
1882
1647
  const keys = Object.keys(spec);
1883
1648
  const state = {};
1884
1649
  for (const key of keys) {
@@ -1904,7 +1669,7 @@ var ScanBuilder = class _ScanBuilder {
1904
1669
  */
1905
1670
  recordMatches(record) {
1906
1671
  if (this.clauses.length === 0) return true;
1907
- const fnView = this.moneyFields && Object.keys(this.moneyFields).length > 0 && hasFnClause(this.clauses) ? this.decodeMoney(record) : void 0;
1672
+ const fnView = this.via?.hasResultDecode && hasFnClause(this.clauses) ? this.decodeVia(record) : void 0;
1908
1673
  for (const clause of this.clauses) {
1909
1674
  if (!evaluateClause(record, clause, fnView)) return false;
1910
1675
  }
@@ -1919,11 +1684,6 @@ function coerceRefKey2(value) {
1919
1684
  }
1920
1685
 
1921
1686
  export {
1922
- validateMoneyFieldPaths,
1923
- canonicalizeStoredMoney,
1924
- canonicalizeIncomingMoney,
1925
- quantizeMoneyFields,
1926
- decodeMoneyFields,
1927
1687
  DEFAULT_JOIN_MAX_ROWS,
1928
1688
  applyJoins,
1929
1689
  resetJoinWarnings,
@@ -1934,4 +1694,4 @@ export {
1934
1694
  executePlan,
1935
1695
  ScanBuilder
1936
1696
  };
1937
- //# sourceMappingURL=chunk-UIU2THRG.js.map
1697
+ //# sourceMappingURL=chunk-BUAQ7YI3.js.map