@noy-db/hub 0.2.0-pre.1 → 0.2.0-pre.11

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 (306) hide show
  1. package/dist/aggregate/index.cjs +9 -0
  2. package/dist/aggregate/index.cjs.map +1 -1
  3. package/dist/aggregate/index.d.cts +2 -2
  4. package/dist/aggregate/index.d.ts +2 -2
  5. package/dist/aggregate/index.js +4 -4
  6. package/dist/attestation/index.cjs +305 -0
  7. package/dist/attestation/index.cjs.map +1 -0
  8. package/dist/attestation/index.d.cts +52 -0
  9. package/dist/attestation/index.d.ts +52 -0
  10. package/dist/attestation/index.js +36 -0
  11. package/dist/attestation/index.js.map +1 -0
  12. package/dist/blobs/index.cjs.map +1 -1
  13. package/dist/blobs/index.d.cts +7 -6
  14. package/dist/blobs/index.d.ts +7 -6
  15. package/dist/blobs/index.js +10 -8
  16. package/dist/blobs/index.js.map +1 -1
  17. package/dist/bundle/index.cjs +18912 -129
  18. package/dist/bundle/index.cjs.map +1 -1
  19. package/dist/bundle/index.d.cts +175 -6
  20. package/dist/bundle/index.d.ts +175 -6
  21. package/dist/bundle/index.js +533 -5
  22. package/dist/bundle/index.js.map +1 -1
  23. package/dist/{chunk-6HPZY4ON.js → chunk-26NK23DZ.js} +9 -4
  24. package/dist/chunk-26NK23DZ.js.map +1 -0
  25. package/dist/{chunk-XGSOTWYX.js → chunk-2LPPNWF6.js} +3 -3
  26. package/dist/{chunk-537VFZTR.js → chunk-3DGHRDCX.js} +4 -4
  27. package/dist/{chunk-HB3Z2GCR.js → chunk-5OEJ6GOT.js} +2 -2
  28. package/dist/chunk-5OEJ6GOT.js.map +1 -0
  29. package/dist/{chunk-UA4RI7OT.js → chunk-6MFH4BMK.js} +5 -5
  30. package/dist/chunk-6MFH4BMK.js.map +1 -0
  31. package/dist/{chunk-UZXLQCHP.js → chunk-6T2UDBKG.js} +2 -2
  32. package/dist/chunk-6T2UDBKG.js.map +1 -0
  33. package/dist/{chunk-23TTQXVO.js → chunk-6YLPHBKR.js} +214 -9
  34. package/dist/chunk-6YLPHBKR.js.map +1 -0
  35. package/dist/chunk-73YLDCNF.js +83 -0
  36. package/dist/chunk-73YLDCNF.js.map +1 -0
  37. package/dist/chunk-77DWLQRY.js +233 -0
  38. package/dist/chunk-77DWLQRY.js.map +1 -0
  39. package/dist/{chunk-Z72JH4KG.js → chunk-7CEGU63S.js} +5 -35
  40. package/dist/chunk-7CEGU63S.js.map +1 -0
  41. package/dist/{chunk-PEULZC6M.js → chunk-A3JMGXPG.js} +8 -1
  42. package/dist/chunk-A3JMGXPG.js.map +1 -0
  43. package/dist/{chunk-I6MX32UC.js → chunk-BDV7INMP.js} +4 -4
  44. package/dist/{chunk-MKSA2V7A.js → chunk-C3WE6UJY.js} +2 -2
  45. package/dist/{chunk-FCXOFQAJ.js → chunk-CH22FZHT.js} +19 -2
  46. package/dist/chunk-CH22FZHT.js.map +1 -0
  47. package/dist/{chunk-DYBQG5PQ.js → chunk-CXFOITNS.js} +2 -2
  48. package/dist/{chunk-5ZGZ6HIZ.js → chunk-CXJG63MA.js} +11 -2
  49. package/dist/chunk-CXJG63MA.js.map +1 -0
  50. package/dist/{chunk-EGQYGYIU.js → chunk-DAP2XL7Q.js} +3 -3
  51. package/dist/chunk-DAP2XL7Q.js.map +1 -0
  52. package/dist/chunk-EBVBE7UK.js +59 -0
  53. package/dist/chunk-EBVBE7UK.js.map +1 -0
  54. package/dist/{chunk-DPMFBCV6.js → chunk-FO3UEG4S.js} +20 -3
  55. package/dist/chunk-FO3UEG4S.js.map +1 -0
  56. package/dist/{chunk-SIZWEV2Y.js → chunk-GAUEWM7D.js} +7 -5
  57. package/dist/chunk-GAUEWM7D.js.map +1 -0
  58. package/dist/chunk-GKI4SDP7.js +57 -0
  59. package/dist/chunk-GKI4SDP7.js.map +1 -0
  60. package/dist/chunk-IMYKDWB4.js +139 -0
  61. package/dist/chunk-IMYKDWB4.js.map +1 -0
  62. package/dist/{chunk-5SCJ5UEF.js → chunk-JQ4NEJJ6.js} +3 -3
  63. package/dist/chunk-LJXYPGRH.js +251 -0
  64. package/dist/chunk-LJXYPGRH.js.map +1 -0
  65. package/dist/{chunk-5DWL3JBF.js → chunk-LSTBFLL2.js} +2 -2
  66. package/dist/chunk-MPOLUAMI.js +10531 -0
  67. package/dist/chunk-MPOLUAMI.js.map +1 -0
  68. package/dist/{chunk-ADQ5MQ54.js → chunk-O6EJ6WTI.js} +163 -2
  69. package/dist/chunk-O6EJ6WTI.js.map +1 -0
  70. package/dist/chunk-PC3ZZBTO.js +79 -0
  71. package/dist/chunk-PC3ZZBTO.js.map +1 -0
  72. package/dist/{chunk-OMLIZL2P.js → chunk-PC6ZEDRL.js} +12 -2
  73. package/dist/{chunk-OMLIZL2P.js.map → chunk-PC6ZEDRL.js.map} +1 -1
  74. package/dist/{chunk-34YSDCDP.js → chunk-PVUUIWHY.js} +2 -2
  75. package/dist/{chunk-PA6R5ZCI.js → chunk-QCXNMCHN.js} +18 -5
  76. package/dist/chunk-QCXNMCHN.js.map +1 -0
  77. package/dist/{chunk-DYECX3IX.js → chunk-QSOYKKMD.js} +4 -4
  78. package/dist/chunk-QSOYKKMD.js.map +1 -0
  79. package/dist/{chunk-WCA2NROQ.js → chunk-R233SLY3.js} +2 -2
  80. package/dist/chunk-RC6SU5NO.js +36 -0
  81. package/dist/chunk-RC6SU5NO.js.map +1 -0
  82. package/dist/{chunk-P7EQ2S5O.js → chunk-RRNA5GKT.js} +2 -2
  83. package/dist/{chunk-ZNOEIM6Y.js → chunk-RYIL3PI2.js} +2 -2
  84. package/dist/{chunk-YS3POABP.js → chunk-SLV4LAKX.js} +1 -1
  85. package/dist/chunk-SLV4LAKX.js.map +1 -0
  86. package/dist/chunk-STNPB3UM.js +9 -0
  87. package/dist/chunk-STNPB3UM.js.map +1 -0
  88. package/dist/{chunk-7H6DOO3E.js → chunk-TGALXXLV.js} +211 -36
  89. package/dist/chunk-TGALXXLV.js.map +1 -0
  90. package/dist/{chunk-MRIBLZL3.js → chunk-TV3YZ35S.js} +5 -1
  91. package/dist/chunk-TV3YZ35S.js.map +1 -0
  92. package/dist/{chunk-VMIO4IXG.js → chunk-V2PZC6AW.js} +6 -229
  93. package/dist/chunk-V2PZC6AW.js.map +1 -0
  94. package/dist/{chunk-YMYK7US4.js → chunk-WIBHRONM.js} +2 -2
  95. package/dist/chunk-WIBHRONM.js.map +1 -0
  96. package/dist/{chunk-KESP7GOK.js → chunk-Y26YV5R3.js} +3 -3
  97. package/dist/{chunk-MIQHZESA.js → chunk-YM7LFCG7.js} +5 -5
  98. package/dist/{chunk-MIQHZESA.js.map → chunk-YM7LFCG7.js.map} +1 -1
  99. package/dist/{chunk-CBAHB2BF.js → chunk-YVZRTCGG.js} +7 -70
  100. package/dist/chunk-YVZRTCGG.js.map +1 -0
  101. package/dist/{chunk-4TFSM22V.js → chunk-YW5DBAPG.js} +4 -4
  102. package/dist/{chunk-2AXFIYHT.js → chunk-Z6FNBOTC.js} +1 -1
  103. package/dist/chunk-Z6FNBOTC.js.map +1 -0
  104. package/dist/{chunk-NIOHFJPJ.js → chunk-ZBBW7YQN.js} +218 -119
  105. package/dist/chunk-ZBBW7YQN.js.map +1 -0
  106. package/dist/{chunk-RD5LYKD6.js → chunk-ZROPXHJY.js} +2 -2
  107. package/dist/chunk-ZROPXHJY.js.map +1 -0
  108. package/dist/consent/index.cjs.map +1 -1
  109. package/dist/consent/index.d.cts +7 -6
  110. package/dist/consent/index.d.ts +7 -6
  111. package/dist/consent/index.js +3 -3
  112. package/dist/{crypto-A7FRXYHC.js → crypto-2CRLG4F4.js} +3 -3
  113. package/dist/{delegation-YBA4X4JN.js → delegation-ZTRT2PRV.js} +5 -5
  114. package/dist/derivations/index.cjs +18 -1
  115. package/dist/derivations/index.cjs.map +1 -1
  116. package/dist/derivations/index.d.cts +10 -9
  117. package/dist/derivations/index.d.ts +10 -9
  118. package/dist/derivations/index.js +4 -4
  119. package/dist/{dev-unlock-D9s-loPr.d.ts → dev-unlock-BH6y3Hx0.d.ts} +1 -1
  120. package/dist/{dev-unlock-DRwVSy2S.d.cts → dev-unlock-H1Xwxc3U.d.cts} +1 -1
  121. package/dist/discriminant-BN9REW3o.d.cts +60 -0
  122. package/dist/discriminant-BN9REW3o.d.ts +60 -0
  123. package/dist/executor-S76VN45G.js +8 -0
  124. package/dist/executor-UCXLIGLW.js +11 -0
  125. package/dist/executor-ZCNZJMGR.js +8 -0
  126. package/dist/{fanout-sidecar-VJ52RIEY.js → fanout-sidecar-F3ZRFU4H.js} +2 -2
  127. package/dist/fanout-sidecar-F3ZRFU4H.js.map +1 -0
  128. package/dist/guards/index.cjs +7 -0
  129. package/dist/guards/index.cjs.map +1 -1
  130. package/dist/guards/index.d.cts +8 -7
  131. package/dist/guards/index.d.ts +8 -7
  132. package/dist/guards/index.js +4 -4
  133. package/dist/{hash-DXXXusyk.d.ts → hash-D89JdDbj.d.ts} +1 -1
  134. package/dist/{hash-DtRih9MQ.d.cts → hash-_sDFvtmX.d.cts} +1 -1
  135. package/dist/history/index.cjs +2 -2
  136. package/dist/history/index.cjs.map +1 -1
  137. package/dist/history/index.d.cts +8 -7
  138. package/dist/history/index.d.ts +8 -7
  139. package/dist/history/index.js +6 -6
  140. package/dist/i18n/index.cjs +287 -27
  141. package/dist/i18n/index.cjs.map +1 -1
  142. package/dist/i18n/index.d.cts +7 -6
  143. package/dist/i18n/index.d.ts +7 -6
  144. package/dist/i18n/index.js +21 -6
  145. package/dist/i18n/index.js.map +1 -1
  146. package/dist/{index-CmVgTkqk.d.cts → index-B8bjExET.d.cts} +214 -18
  147. package/dist/{index-CNwA-B6-.d.ts → index-DfUbNad8.d.ts} +214 -18
  148. package/dist/index.cjs +3343 -447
  149. package/dist/index.cjs.map +1 -1
  150. package/dist/index.d.cts +43 -22
  151. package/dist/index.d.ts +43 -22
  152. package/dist/index.js +179 -8799
  153. package/dist/index.js.map +1 -1
  154. package/dist/indexing/index.cjs +5 -1
  155. package/dist/indexing/index.cjs.map +1 -1
  156. package/dist/indexing/index.d.cts +3 -3
  157. package/dist/indexing/index.d.ts +3 -3
  158. package/dist/indexing/index.js +4 -4
  159. package/dist/issue-IVTVSKWW.js +12 -0
  160. package/dist/{lazy-builder-Rpd-V3jP.d.ts → lazy-builder-Ci5_YG73.d.cts} +2 -2
  161. package/dist/{lazy-builder-C-rPfWG0.d.cts → lazy-builder-D5GU14TS.d.ts} +2 -2
  162. package/dist/{ledger-3TXNP47J.js → ledger-NYCGJX2D.js} +6 -6
  163. package/dist/materialized-views/index.cjs +21 -2
  164. package/dist/materialized-views/index.cjs.map +1 -1
  165. package/dist/materialized-views/index.d.cts +23 -20
  166. package/dist/materialized-views/index.d.ts +23 -20
  167. package/dist/materialized-views/index.js +12 -12
  168. package/dist/noydb-SH4RLE47.js +34 -0
  169. package/dist/overlay-views/index.cjs +11 -1
  170. package/dist/overlay-views/index.cjs.map +1 -1
  171. package/dist/overlay-views/index.d.cts +10 -9
  172. package/dist/overlay-views/index.d.ts +10 -9
  173. package/dist/overlay-views/index.js +6 -4
  174. package/dist/periods/index.cjs.map +1 -1
  175. package/dist/periods/index.d.cts +7 -6
  176. package/dist/periods/index.d.ts +7 -6
  177. package/dist/periods/index.js +6 -6
  178. package/dist/{predicate-Dnu81tsS.d.cts → predicate-Bt5ft-9c.d.cts} +28 -3
  179. package/dist/{predicate-Dnu81tsS.d.ts → predicate-Bt5ft-9c.d.ts} +28 -3
  180. package/dist/{public-envelope-PY6NKFLI.js → public-envelope-QOXZEHKH.js} +4 -4
  181. package/dist/query/index.cjs +255 -6
  182. package/dist/query/index.cjs.map +1 -1
  183. package/dist/query/index.d.cts +3 -3
  184. package/dist/query/index.d.ts +3 -3
  185. package/dist/query/index.js +12 -6
  186. package/dist/registry-DKEXOJVO.js +7 -0
  187. package/dist/{registry-3L3N3PTG.js → registry-ST2VNFZC.js} +3 -3
  188. package/dist/registry-UFIK7CSR.js +8 -0
  189. package/dist/registry-ZGYYSM5I.js +8 -0
  190. package/dist/registry-ZGYYSM5I.js.map +1 -0
  191. package/dist/revoke-RT7QYB4G.js +17 -0
  192. package/dist/revoke-RT7QYB4G.js.map +1 -0
  193. package/dist/session/index.cjs.map +1 -1
  194. package/dist/session/index.d.cts +8 -7
  195. package/dist/session/index.d.ts +8 -7
  196. package/dist/session/index.js +3 -3
  197. package/dist/shadow/index.cjs.map +1 -1
  198. package/dist/shadow/index.d.cts +7 -6
  199. package/dist/shadow/index.d.ts +7 -6
  200. package/dist/shadow/index.js +2 -2
  201. package/dist/signer-QNU66JF5.js +18 -0
  202. package/dist/signer-QNU66JF5.js.map +1 -0
  203. package/dist/snapshots/index.cjs +937 -0
  204. package/dist/snapshots/index.cjs.map +1 -0
  205. package/dist/snapshots/index.d.cts +28 -0
  206. package/dist/snapshots/index.d.ts +28 -0
  207. package/dist/snapshots/index.js +152 -0
  208. package/dist/snapshots/index.js.map +1 -0
  209. package/dist/{stale-HSC5YO2O.js → stale-VKXSXJF4.js} +2 -2
  210. package/dist/stale-VKXSXJF4.js.map +1 -0
  211. package/dist/store/index.cjs.map +1 -1
  212. package/dist/store/index.d.cts +7 -6
  213. package/dist/store/index.d.ts +7 -6
  214. package/dist/store/index.js +2 -2
  215. package/dist/{strategy-DSTrsZ8t.d.cts → strategy-CT2LCKAX.d.cts} +12 -0
  216. package/dist/{strategy-DSTrsZ8t.d.ts → strategy-CT2LCKAX.d.ts} +12 -0
  217. package/dist/sync/index.cjs.map +1 -1
  218. package/dist/sync/index.d.cts +6 -5
  219. package/dist/sync/index.d.ts +6 -5
  220. package/dist/sync/index.js +4 -4
  221. package/dist/team/index.cjs +1 -1
  222. package/dist/team/index.cjs.map +1 -1
  223. package/dist/team/index.d.cts +7 -6
  224. package/dist/team/index.d.ts +7 -6
  225. package/dist/team/index.js +13 -11
  226. package/dist/tx/index.cjs +82 -2
  227. package/dist/tx/index.cjs.map +1 -1
  228. package/dist/tx/index.d.cts +8 -7
  229. package/dist/tx/index.d.ts +8 -7
  230. package/dist/tx/index.js +56 -3
  231. package/dist/tx/index.js.map +1 -1
  232. package/dist/{types-DW9RGSSs.d.ts → types-CD8mc8zR.d.ts} +1279 -259
  233. package/dist/{types-C4lwMKKF.d.cts → types-DiSXn3a4.d.cts} +1279 -259
  234. package/dist/{index-4agOpzqd.d.ts → ulid-8p83wbR4.d.ts} +64 -46
  235. package/dist/{index-hdFvZkBP.d.cts → ulid-DQ1hcJvZ.d.cts} +64 -46
  236. package/dist/util/index.cjs +7 -0
  237. package/dist/util/index.cjs.map +1 -1
  238. package/dist/util/index.d.cts +2 -0
  239. package/dist/util/index.d.ts +2 -0
  240. package/dist/util/index.js +5 -1
  241. package/dist/util/index.js.map +1 -1
  242. package/dist/{with-derivation-C8LDlV7t.d.cts → with-derivation-CVT7-dUt.d.cts} +1 -1
  243. package/dist/{with-derivation-g-pGoMzL.d.ts → with-derivation-DWMTpgEH.d.ts} +1 -1
  244. package/dist/{with-guard-DWOCK4Ca.d.ts → with-guard-BRvt53da.d.ts} +1 -1
  245. package/dist/{with-guard-jI1x9Z3k.d.cts → with-guard-Dx2zZnTA.d.cts} +1 -1
  246. package/dist/{with-materialized-view-DaKR-N6J.d.ts → with-materialized-view-BTTU3BNK.d.cts} +2 -2
  247. package/dist/{with-materialized-view-DcTx4H3j.d.cts → with-materialized-view-X0CoL8-L.d.ts} +2 -2
  248. package/dist/{with-overlayed-view-N7jYuNOS.d.ts → with-overlayed-view-DQjO_DSG.d.ts} +2 -2
  249. package/dist/{with-overlayed-view-D-6oWAgM.d.cts → with-overlayed-view-DcacRRsS.d.cts} +2 -2
  250. package/package.json +27 -4
  251. package/dist/chunk-23TTQXVO.js.map +0 -1
  252. package/dist/chunk-2AXFIYHT.js.map +0 -1
  253. package/dist/chunk-5ZGZ6HIZ.js.map +0 -1
  254. package/dist/chunk-6HPZY4ON.js.map +0 -1
  255. package/dist/chunk-7H6DOO3E.js.map +0 -1
  256. package/dist/chunk-ADQ5MQ54.js.map +0 -1
  257. package/dist/chunk-CBAHB2BF.js.map +0 -1
  258. package/dist/chunk-DPMFBCV6.js.map +0 -1
  259. package/dist/chunk-DYECX3IX.js.map +0 -1
  260. package/dist/chunk-EGQYGYIU.js.map +0 -1
  261. package/dist/chunk-FCXOFQAJ.js.map +0 -1
  262. package/dist/chunk-HB3Z2GCR.js.map +0 -1
  263. package/dist/chunk-MRIBLZL3.js.map +0 -1
  264. package/dist/chunk-NIOHFJPJ.js.map +0 -1
  265. package/dist/chunk-PA6R5ZCI.js.map +0 -1
  266. package/dist/chunk-PEULZC6M.js.map +0 -1
  267. package/dist/chunk-RD5LYKD6.js.map +0 -1
  268. package/dist/chunk-SIZWEV2Y.js.map +0 -1
  269. package/dist/chunk-UA4RI7OT.js.map +0 -1
  270. package/dist/chunk-UZXLQCHP.js.map +0 -1
  271. package/dist/chunk-VMIO4IXG.js.map +0 -1
  272. package/dist/chunk-YMYK7US4.js.map +0 -1
  273. package/dist/chunk-YS3POABP.js.map +0 -1
  274. package/dist/chunk-Z72JH4KG.js.map +0 -1
  275. package/dist/executor-7E3VFGW7.js +0 -11
  276. package/dist/executor-CEWX2FQI.js +0 -8
  277. package/dist/executor-X4SQ3ZLC.js +0 -8
  278. package/dist/fanout-sidecar-VJ52RIEY.js.map +0 -1
  279. package/dist/registry-O47PUPSY.js +0 -8
  280. package/dist/registry-RFGGMVNJ.js +0 -7
  281. package/dist/registry-WLLMODKN.js +0 -8
  282. /package/dist/{chunk-XGSOTWYX.js.map → chunk-2LPPNWF6.js.map} +0 -0
  283. /package/dist/{chunk-537VFZTR.js.map → chunk-3DGHRDCX.js.map} +0 -0
  284. /package/dist/{chunk-I6MX32UC.js.map → chunk-BDV7INMP.js.map} +0 -0
  285. /package/dist/{chunk-MKSA2V7A.js.map → chunk-C3WE6UJY.js.map} +0 -0
  286. /package/dist/{chunk-DYBQG5PQ.js.map → chunk-CXFOITNS.js.map} +0 -0
  287. /package/dist/{chunk-5SCJ5UEF.js.map → chunk-JQ4NEJJ6.js.map} +0 -0
  288. /package/dist/{chunk-5DWL3JBF.js.map → chunk-LSTBFLL2.js.map} +0 -0
  289. /package/dist/{chunk-34YSDCDP.js.map → chunk-PVUUIWHY.js.map} +0 -0
  290. /package/dist/{chunk-WCA2NROQ.js.map → chunk-R233SLY3.js.map} +0 -0
  291. /package/dist/{chunk-P7EQ2S5O.js.map → chunk-RRNA5GKT.js.map} +0 -0
  292. /package/dist/{chunk-ZNOEIM6Y.js.map → chunk-RYIL3PI2.js.map} +0 -0
  293. /package/dist/{chunk-KESP7GOK.js.map → chunk-Y26YV5R3.js.map} +0 -0
  294. /package/dist/{chunk-4TFSM22V.js.map → chunk-YW5DBAPG.js.map} +0 -0
  295. /package/dist/{crypto-A7FRXYHC.js.map → crypto-2CRLG4F4.js.map} +0 -0
  296. /package/dist/{delegation-YBA4X4JN.js.map → delegation-ZTRT2PRV.js.map} +0 -0
  297. /package/dist/{executor-7E3VFGW7.js.map → executor-S76VN45G.js.map} +0 -0
  298. /package/dist/{executor-CEWX2FQI.js.map → executor-UCXLIGLW.js.map} +0 -0
  299. /package/dist/{executor-X4SQ3ZLC.js.map → executor-ZCNZJMGR.js.map} +0 -0
  300. /package/dist/{ledger-3TXNP47J.js.map → issue-IVTVSKWW.js.map} +0 -0
  301. /package/dist/{public-envelope-PY6NKFLI.js.map → ledger-NYCGJX2D.js.map} +0 -0
  302. /package/dist/{registry-3L3N3PTG.js.map → noydb-SH4RLE47.js.map} +0 -0
  303. /package/dist/{registry-O47PUPSY.js.map → public-envelope-QOXZEHKH.js.map} +0 -0
  304. /package/dist/{registry-RFGGMVNJ.js.map → registry-DKEXOJVO.js.map} +0 -0
  305. /package/dist/{registry-WLLMODKN.js.map → registry-ST2VNFZC.js.map} +0 -0
  306. /package/dist/{stale-HSC5YO2O.js.map → registry-UFIK7CSR.js.map} +0 -0
@@ -1,11 +1,12 @@
1
- import { aN as HistoryStrategy, aO as NoydbStore, aP as HistoryOptions, aQ as EncryptedEnvelope, aR as PruneOptions } from '../types-C4lwMKKF.cjs';
2
- export { aS as AppendInput, aT as ChangeType, aU as CollectionInstant, aV as DiffEntry, aW as JsonPatch, aX as JsonPatchOp, aY as LedgerEntry, aZ as LedgerStore, a_ as VaultEngine, a$ as VaultInstant, b0 as VerifyResult, b1 as applyPatch, b2 as canonicalJson, b3 as computePatch, b4 as diff, b5 as formatDiff, b6 as hashEntry, b7 as paddedIndex, b8 as parseIndex, b9 as sha256Hex } from '../types-C4lwMKKF.cjs';
3
- export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-DtRih9MQ.cjs';
4
- import '../lazy-builder-C-rPfWG0.cjs';
5
- import '../predicate-Dnu81tsS.cjs';
6
- import '../strategy-DSTrsZ8t.cjs';
1
+ import { b2 as HistoryStrategy, b3 as NoydbStore, b4 as HistoryOptions, b5 as EncryptedEnvelope, b6 as PruneOptions } from '../types-DiSXn3a4.cjs';
2
+ export { b7 as AppendInput, b8 as ChangeType, b9 as CollectionInstant, ba as DiffEntry, bb as JsonPatch, bc as JsonPatchOp, bd as LedgerEntry, be as LedgerStore, bf as VaultEngine, bg as VaultInstant, bh as VerifyResult, bi as applyPatch, bj as canonicalJson, bk as computePatch, bl as diff, bm as formatDiff, bn as hashEntry, bo as paddedIndex, bp as parseIndex, bq as sha256Hex } from '../types-DiSXn3a4.cjs';
3
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-_sDFvtmX.cjs';
4
+ import '../lazy-builder-Ci5_YG73.cjs';
5
+ import '../predicate-Bt5ft-9c.cjs';
6
+ import '../strategy-CT2LCKAX.cjs';
7
7
  import '../strategy-BSxFXGzb.cjs';
8
- import '../index-CmVgTkqk.cjs';
8
+ import '../index-B8bjExET.cjs';
9
+ import '@noy-db/attestation';
9
10
 
10
11
  /**
11
12
  * Active history strategy — `withHistory()` returns the real
@@ -1,11 +1,12 @@
1
- import { aN as HistoryStrategy, aO as NoydbStore, aP as HistoryOptions, aQ as EncryptedEnvelope, aR as PruneOptions } from '../types-DW9RGSSs.js';
2
- export { aS as AppendInput, aT as ChangeType, aU as CollectionInstant, aV as DiffEntry, aW as JsonPatch, aX as JsonPatchOp, aY as LedgerEntry, aZ as LedgerStore, a_ as VaultEngine, a$ as VaultInstant, b0 as VerifyResult, b1 as applyPatch, b2 as canonicalJson, b3 as computePatch, b4 as diff, b5 as formatDiff, b6 as hashEntry, b7 as paddedIndex, b8 as parseIndex, b9 as sha256Hex } from '../types-DW9RGSSs.js';
3
- export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-DXXXusyk.js';
4
- import '../lazy-builder-Rpd-V3jP.js';
5
- import '../predicate-Dnu81tsS.js';
6
- import '../strategy-DSTrsZ8t.js';
1
+ import { b2 as HistoryStrategy, b3 as NoydbStore, b4 as HistoryOptions, b5 as EncryptedEnvelope, b6 as PruneOptions } from '../types-CD8mc8zR.js';
2
+ export { b7 as AppendInput, b8 as ChangeType, b9 as CollectionInstant, ba as DiffEntry, bb as JsonPatch, bc as JsonPatchOp, bd as LedgerEntry, be as LedgerStore, bf as VaultEngine, bg as VaultInstant, bh as VerifyResult, bi as applyPatch, bj as canonicalJson, bk as computePatch, bl as diff, bm as formatDiff, bn as hashEntry, bo as paddedIndex, bp as parseIndex, bq as sha256Hex } from '../types-CD8mc8zR.js';
3
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-D89JdDbj.js';
4
+ import '../lazy-builder-D5GU14TS.js';
5
+ import '../predicate-Bt5ft-9c.js';
6
+ import '../strategy-CT2LCKAX.js';
7
7
  import '../strategy-BSxFXGzb.js';
8
- import '../index-CNwA-B6-.js';
8
+ import '../index-DfUbNad8.js';
9
+ import '@noy-db/attestation';
9
10
 
10
11
  /**
11
12
  * Active history strategy — `withHistory()` returns the real
@@ -8,14 +8,14 @@ import {
8
8
  getVersionEnvelope,
9
9
  pruneHistory,
10
10
  saveHistory
11
- } from "../chunk-MIQHZESA.js";
11
+ } from "../chunk-YM7LFCG7.js";
12
12
  import {
13
13
  LEDGER_COLLECTION,
14
14
  LEDGER_DELTAS_COLLECTION,
15
15
  LedgerStore,
16
16
  applyPatch,
17
17
  computePatch
18
- } from "../chunk-UA4RI7OT.js";
18
+ } from "../chunk-6MFH4BMK.js";
19
19
  import {
20
20
  canonicalJson,
21
21
  envelopePayloadHash,
@@ -23,10 +23,10 @@ import {
23
23
  paddedIndex,
24
24
  parseIndex,
25
25
  sha256Hex
26
- } from "../chunk-2AXFIYHT.js";
27
- import "../chunk-YS3POABP.js";
28
- import "../chunk-WCA2NROQ.js";
29
- import "../chunk-ADQ5MQ54.js";
26
+ } from "../chunk-Z6FNBOTC.js";
27
+ import "../chunk-SLV4LAKX.js";
28
+ import "../chunk-R233SLY3.js";
29
+ import "../chunk-O6EJ6WTI.js";
30
30
 
31
31
  // src/history/active.ts
32
32
  function withHistory() {
@@ -27,15 +27,21 @@ __export(i18n_exports, {
27
27
  LocaleNotSpecifiedError: () => LocaleNotSpecifiedError,
28
28
  MissingTranslationError: () => MissingTranslationError,
29
29
  ReservedCollectionNameError: () => ReservedCollectionNameError,
30
+ ScriptViolationError: () => ScriptViolationError,
30
31
  TranslatorNotConfiguredError: () => TranslatorNotConfiguredError,
31
32
  applyI18nLocale: () => applyI18nLocale,
32
33
  dictCollectionName: () => dictCollectionName,
33
34
  dictKey: () => dictKey,
35
+ enforceScript: () => enforceScript,
36
+ getAtPath: () => getAtPath,
34
37
  i18nText: () => i18nText,
38
+ inferScripts: () => inferScripts,
35
39
  isDictCollectionName: () => isDictCollectionName,
36
40
  isDictKeyDescriptor: () => isDictKeyDescriptor,
37
41
  isI18nTextDescriptor: () => isI18nTextDescriptor,
38
42
  resolveI18nText: () => resolveI18nText,
43
+ resolvePolicy: () => resolvePolicy,
44
+ setAtPathInPlace: () => setAtPathInPlace,
39
45
  validateI18nTextValue: () => validateI18nTextValue,
40
46
  withI18n: () => withI18n
41
47
  });
@@ -150,6 +156,27 @@ var LocaleNotSpecifiedError = class extends NoydbError {
150
156
  this.field = field;
151
157
  }
152
158
  };
159
+ var ScriptViolationError = class extends NoydbError {
160
+ /** The field whose value violated its script constraint. */
161
+ field;
162
+ /** The locale slot (e.g. `'en'`) that was checked. */
163
+ locale;
164
+ /** The Unicode scripts allowed for this slot. */
165
+ expected;
166
+ /** A short sample of the offending characters, for diagnostics. */
167
+ sample;
168
+ constructor(field, locale, expected, sample, message) {
169
+ super(
170
+ "SCRIPT_VIOLATION",
171
+ message ?? `Field "${field}" slot "${locale}" expects script(s) [${expected.join(", ")}] but contains disallowed character(s): "${sample}".`
172
+ );
173
+ this.name = "ScriptViolationError";
174
+ this.field = field;
175
+ this.locale = locale;
176
+ this.expected = expected;
177
+ this.sample = sample;
178
+ }
179
+ };
153
180
  var TranslatorNotConfiguredError = class extends NoydbError {
154
181
  /** The field that requested auto-translation. */
155
182
  field;
@@ -166,6 +193,14 @@ var TranslatorNotConfiguredError = class extends NoydbError {
166
193
  }
167
194
  };
168
195
 
196
+ // src/i18n/policy.ts
197
+ function resolvePolicy(onMissing, layer) {
198
+ const explicit = onMissing && typeof onMissing === "object" ? onMissing[layer] : void 0;
199
+ const scalar = typeof onMissing === "string" ? onMissing : void 0;
200
+ const layerDefault = layer === "guard" ? "substitute" : void 0;
201
+ return explicit ?? layerDefault ?? scalar ?? "throw";
202
+ }
203
+
169
204
  // src/i18n/core.ts
170
205
  function i18nText(options) {
171
206
  return { _noydbI18nText: true, options };
@@ -229,7 +264,21 @@ function validateI18nTextValue(value, field, descriptor) {
229
264
  }
230
265
  }
231
266
  }
232
- function resolveI18nText(value, locale, fallback, field) {
267
+ function toChain(fallback) {
268
+ return Array.isArray(fallback) ? fallback : fallback ? [fallback] : [];
269
+ }
270
+ function pickFromChain(value, chain) {
271
+ for (const fb of chain) {
272
+ if (fb === "any") {
273
+ const any = Object.values(value).find((v) => v !== "");
274
+ if (any !== void 0) return any;
275
+ } else if (value[fb] !== void 0 && value[fb] !== "") {
276
+ return value[fb];
277
+ }
278
+ }
279
+ return void 0;
280
+ }
281
+ function resolveI18nText(value, locale, fallback, field, opts) {
233
282
  if (locale === "raw") {
234
283
  return value;
235
284
  }
@@ -239,34 +288,102 @@ function resolveI18nText(value, locale, fallback, field) {
239
288
  if (value[locale] !== void 0 && value[locale] !== "") {
240
289
  return value[locale];
241
290
  }
242
- const chain = Array.isArray(fallback) ? fallback : fallback ? [fallback] : [];
243
- for (const fb of chain) {
244
- if (fb === "any") {
245
- const any = Object.values(value).find((v) => v !== "");
246
- if (any !== void 0) return any;
247
- } else if (value[fb] !== void 0 && value[fb] !== "") {
248
- return value[fb];
249
- }
291
+ const policy = opts?.policy ?? "throw";
292
+ const callerChain = toChain(fallback);
293
+ const callerHit = pickFromChain(value, callerChain);
294
+ if (callerHit !== void 0) return callerHit;
295
+ if (policy === "substitute") {
296
+ const subHit = pickFromChain(value, toChain(opts?.substitute));
297
+ if (subHit !== void 0) return subHit;
250
298
  }
251
- throw new LocaleNotSpecifiedError(
252
- field ?? "<unknown>",
253
- `No translation available for locale "${locale}"` + (chain.length > 0 ? ` or fallback chain [${chain.join(", ")}]` : "") + "."
254
- );
299
+ if (policy === "throw") {
300
+ throw new LocaleNotSpecifiedError(
301
+ field ?? "<unknown>",
302
+ `No translation available for locale "${locale}"` + (callerChain.length > 0 ? ` or fallback chain [${callerChain.join(", ")}]` : "") + "."
303
+ );
304
+ }
305
+ return null;
306
+ }
307
+ function getAtPath(obj, path) {
308
+ const arrayIdx = path.indexOf("[].");
309
+ if (arrayIdx !== -1) {
310
+ const arrayKey = path.slice(0, arrayIdx);
311
+ const restPath = path.slice(arrayIdx + 3);
312
+ const arr = obj[arrayKey];
313
+ if (!Array.isArray(arr)) return [];
314
+ return arr.flatMap((item) => {
315
+ if (!item || typeof item !== "object" || Array.isArray(item)) return [];
316
+ return getAtPath(item, restPath);
317
+ });
318
+ }
319
+ const dotIdx = path.indexOf(".");
320
+ if (dotIdx !== -1) {
321
+ const head = path.slice(0, dotIdx);
322
+ const rest = path.slice(dotIdx + 1);
323
+ const nested = obj[head];
324
+ if (!nested || typeof nested !== "object" || Array.isArray(nested)) return [];
325
+ return getAtPath(nested, rest);
326
+ }
327
+ const val = obj[path];
328
+ return val !== void 0 ? [val] : [];
329
+ }
330
+ function setAtPathInPlace(obj, path, value) {
331
+ const dotIdx = path.indexOf(".");
332
+ if (dotIdx !== -1) {
333
+ const head = path.slice(0, dotIdx);
334
+ const rest = path.slice(dotIdx + 1);
335
+ const nested = obj[head];
336
+ if (!nested || typeof nested !== "object" || Array.isArray(nested)) return;
337
+ setAtPathInPlace(nested, rest, value);
338
+ return;
339
+ }
340
+ obj[path] = value;
341
+ }
342
+ function applyAtPath(obj, path, locale, fallback, opts) {
343
+ const arrayIdx = path.indexOf("[].");
344
+ if (arrayIdx !== -1) {
345
+ const arrayKey = path.slice(0, arrayIdx);
346
+ const restPath = path.slice(arrayIdx + 3);
347
+ const arr = obj[arrayKey];
348
+ if (!Array.isArray(arr)) return obj;
349
+ return {
350
+ ...obj,
351
+ [arrayKey]: arr.map((item) => {
352
+ if (!item || typeof item !== "object" || Array.isArray(item)) return item;
353
+ return applyAtPath(item, restPath, locale, fallback, opts);
354
+ })
355
+ };
356
+ }
357
+ const dotIdx = path.indexOf(".");
358
+ if (dotIdx !== -1) {
359
+ const head = path.slice(0, dotIdx);
360
+ const rest = path.slice(dotIdx + 1);
361
+ const nested = obj[head];
362
+ if (!nested || typeof nested !== "object" || Array.isArray(nested)) return obj;
363
+ return {
364
+ ...obj,
365
+ [head]: applyAtPath(nested, rest, locale, fallback, opts)
366
+ };
367
+ }
368
+ const raw = obj[path];
369
+ if (raw === void 0 || raw === null) return obj;
370
+ if (typeof raw !== "object" || Array.isArray(raw)) return obj;
371
+ return {
372
+ ...obj,
373
+ [path]: resolveI18nText(raw, locale, fallback, path, opts)
374
+ };
255
375
  }
256
- function applyI18nLocale(record, i18nFields, locale, fallback) {
376
+ function applyI18nLocale(record, i18nFields, locale, fallback, layer = "read") {
257
377
  const fieldNames = Object.keys(i18nFields);
258
378
  if (fieldNames.length === 0) return record;
259
- const result = { ...record };
260
- for (const field of fieldNames) {
261
- const raw = result[field];
262
- if (raw === void 0 || raw === null) continue;
263
- if (typeof raw !== "object" || Array.isArray(raw)) continue;
264
- result[field] = resolveI18nText(
265
- raw,
266
- locale,
267
- fallback,
268
- field
269
- );
379
+ let result = record;
380
+ for (const [field, descriptor] of Object.entries(i18nFields)) {
381
+ const { onMissing, substitute } = descriptor.options;
382
+ const opts = {
383
+ policy: resolvePolicy(onMissing, layer),
384
+ ...substitute !== void 0 ? { substitute } : {}
385
+ };
386
+ result = applyAtPath(result, field, locale, fallback, opts);
270
387
  }
271
388
  return result;
272
389
  }
@@ -452,8 +569,14 @@ function dictCollectionName(dictionaryName) {
452
569
  function isDictCollectionName(name) {
453
570
  return name.startsWith(DICT_COLLECTION_PREFIX);
454
571
  }
455
- function dictKey(name, keys) {
456
- return { _noydbDictKey: true, name, keys };
572
+ function dictKey(name, keys, opts) {
573
+ return {
574
+ _noydbDictKey: true,
575
+ name,
576
+ keys,
577
+ ...opts?.onMissing !== void 0 ? { onMissing: opts.onMissing } : {},
578
+ ...opts?.substitute !== void 0 ? { substitute: opts.substitute } : {}
579
+ };
457
580
  }
458
581
  function isDictKeyDescriptor(x) {
459
582
  return typeof x === "object" && x !== null && x._noydbDictKey === true;
@@ -795,11 +918,142 @@ var DictionaryHandle = class {
795
918
  }
796
919
  };
797
920
 
921
+ // src/i18n/script.ts
922
+ var LATIN_BASE = /* @__PURE__ */ new Set([
923
+ "en",
924
+ "fr",
925
+ "de",
926
+ "es",
927
+ "it",
928
+ "pt",
929
+ "nl",
930
+ "sv",
931
+ "no",
932
+ "da",
933
+ "fi",
934
+ "is",
935
+ "pl",
936
+ "cs",
937
+ "sk",
938
+ "hu",
939
+ "ro",
940
+ "hr",
941
+ "sl",
942
+ "et",
943
+ "lv",
944
+ "lt",
945
+ "tr",
946
+ "vi",
947
+ "id",
948
+ "ms",
949
+ "tl",
950
+ "sw",
951
+ "af",
952
+ "ca",
953
+ "gl",
954
+ "eu",
955
+ "cy",
956
+ "ga"
957
+ ]);
958
+ var SCRIPT_TABLE = {
959
+ th: ["Thai"],
960
+ ko: ["Hangul", "Han"],
961
+ ja: ["Han", "Hiragana", "Katakana"],
962
+ zh: ["Han"],
963
+ ar: ["Arabic"],
964
+ fa: ["Arabic"],
965
+ ur: ["Arabic"],
966
+ ru: ["Cyrillic"],
967
+ uk: ["Cyrillic"],
968
+ bg: ["Cyrillic"],
969
+ sr: ["Cyrillic"],
970
+ he: ["Hebrew"],
971
+ el: ["Greek"],
972
+ hi: ["Devanagari"],
973
+ ta: ["Tamil"],
974
+ km: ["Khmer"],
975
+ lo: ["Lao"],
976
+ my: ["Myanmar"]
977
+ };
978
+ var SUBTAG_SCRIPTS = {
979
+ Latn: ["Latin"],
980
+ Cyrl: ["Cyrillic", "Latin"],
981
+ Hans: ["Han", "Latin"],
982
+ Hant: ["Han", "Latin"],
983
+ Thai: ["Thai", "Latin"],
984
+ Arab: ["Arabic", "Latin"]
985
+ };
986
+ function inferScripts(locale) {
987
+ const parts = locale.split("-");
988
+ const subtag = parts.find((t) => /^[A-Z][a-z]{3}$/.test(t));
989
+ if (subtag && SUBTAG_SCRIPTS[subtag]) return SUBTAG_SCRIPTS[subtag];
990
+ const base = (parts[0] ?? "").toLowerCase();
991
+ if (LATIN_BASE.has(base)) return ["Latin"];
992
+ const primary = SCRIPT_TABLE[base];
993
+ if (primary) return [...primary, "Latin"];
994
+ return ["Latin"];
995
+ }
996
+ function allowedFor(descriptor, locale) {
997
+ const script = descriptor.options.script;
998
+ if (script && script !== "auto") {
999
+ const explicit = script[locale];
1000
+ if (explicit) return explicit;
1001
+ }
1002
+ return inferScripts(locale);
1003
+ }
1004
+ var BASELINE = String.raw`\p{White_Space}\p{Script=Common}\p{Script=Inherited}\p{Mark}`;
1005
+ function fullMatcher(scripts) {
1006
+ const cls = scripts.map((s) => `\\p{Script=${s}}`).join("");
1007
+ return new RegExp(`^[${BASELINE}${cls}]*$`, "u");
1008
+ }
1009
+ function charMatcher(scripts) {
1010
+ const cls = scripts.map((s) => `\\p{Script=${s}}`).join("");
1011
+ return new RegExp(`[${BASELINE}${cls}]`, "u");
1012
+ }
1013
+ function offendingSample(str, scripts) {
1014
+ const ok = charMatcher(scripts);
1015
+ const bad = [];
1016
+ for (const ch of str) {
1017
+ if (!ok.test(ch)) bad.push(ch);
1018
+ if (bad.length >= 8) break;
1019
+ }
1020
+ return bad.join("");
1021
+ }
1022
+ function stripDisallowed(str, scripts) {
1023
+ const ok = charMatcher(scripts);
1024
+ let out = "";
1025
+ for (const ch of str) if (ok.test(ch)) out += ch;
1026
+ return out;
1027
+ }
1028
+ function enforceScript(value, field, descriptor) {
1029
+ const opt = descriptor.options;
1030
+ if (!opt.script) return { value, warnings: [] };
1031
+ const mode = opt.onScriptViolation ?? "reject";
1032
+ const warnings = [];
1033
+ let out = value;
1034
+ for (const [locale, raw] of Object.entries(value)) {
1035
+ if (typeof raw !== "string") continue;
1036
+ const allowed = allowedFor(descriptor, locale);
1037
+ if (fullMatcher(allowed).test(raw)) continue;
1038
+ const sample = offendingSample(raw, allowed);
1039
+ if (mode === "reject") {
1040
+ throw new ScriptViolationError(field, locale, allowed, sample);
1041
+ }
1042
+ warnings.push({ field, locale, expected: allowed, sample });
1043
+ if (mode === "filter") {
1044
+ if (out === value) out = { ...value };
1045
+ out[locale] = stripDisallowed(raw, allowed);
1046
+ }
1047
+ }
1048
+ return { value: out, warnings };
1049
+ }
1050
+
798
1051
  // src/i18n/active.ts
799
1052
  function withI18n() {
800
1053
  return {
801
1054
  applyI18nLocale,
802
1055
  validateI18nTextValue,
1056
+ enforceScript,
803
1057
  buildDictionaryHandle(opts) {
804
1058
  return new DictionaryHandle(
805
1059
  opts.adapter,
@@ -825,15 +1079,21 @@ function withI18n() {
825
1079
  LocaleNotSpecifiedError,
826
1080
  MissingTranslationError,
827
1081
  ReservedCollectionNameError,
1082
+ ScriptViolationError,
828
1083
  TranslatorNotConfiguredError,
829
1084
  applyI18nLocale,
830
1085
  dictCollectionName,
831
1086
  dictKey,
1087
+ enforceScript,
1088
+ getAtPath,
832
1089
  i18nText,
1090
+ inferScripts,
833
1091
  isDictCollectionName,
834
1092
  isDictKeyDescriptor,
835
1093
  isI18nTextDescriptor,
836
1094
  resolveI18nText,
1095
+ resolvePolicy,
1096
+ setAtPathInPlace,
837
1097
  validateI18nTextValue,
838
1098
  withI18n
839
1099
  });