@oxog/vld 2.0.2 → 2.1.0

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 (450) hide show
  1. package/CHANGELOG.md +75 -1
  2. package/LICENSE +20 -20
  3. package/README.md +101 -37
  4. package/dist/chunks/errors-core-BeiFUtZM.js +81 -0
  5. package/dist/chunks/{index-CETyGkrv.js → index-0R2ntSud.js} +16 -402
  6. package/dist/chunks/index-BvH403Yy.js +88 -0
  7. package/dist/chunks/security-B0Pd_vSY.js +35 -0
  8. package/dist/chunks/string-BJRQod3t.js +530 -0
  9. package/dist/cjs/chunks/errors-core-DWxLFs2f.cjs +83 -0
  10. package/dist/cjs/chunks/index-BkI37108.cjs +538 -0
  11. package/dist/cjs/chunks/index-Cc3bjUMX.cjs +91 -0
  12. package/dist/cjs/chunks/security-Dc3Jh13T.cjs +37 -0
  13. package/dist/cjs/chunks/string-BKZrc4hs.cjs +533 -0
  14. package/dist/cjs/cli/bin.cjs +506 -0
  15. package/dist/cjs/cli/index.cjs +209 -0
  16. package/dist/cjs/codecs/index.cjs +45 -0
  17. package/dist/{chunks/date-ODue_rtq.js → cjs/coercion/index.cjs} +185 -103
  18. package/dist/cjs/compat/emitter.cjs +184 -0
  19. package/dist/cjs/compat/result.cjs +189 -0
  20. package/dist/cjs/errors.cjs +6 -213
  21. package/dist/cjs/index.cjs +1558 -9647
  22. package/dist/cjs/kernel.cjs +415 -0
  23. package/dist/cjs/locales/af.cjs +108 -0
  24. package/dist/cjs/locales/ar.cjs +108 -0
  25. package/dist/cjs/locales/bn.cjs +108 -0
  26. package/dist/cjs/locales/da.cjs +108 -0
  27. package/dist/cjs/locales/de.cjs +108 -0
  28. package/dist/cjs/locales/en.cjs +108 -0
  29. package/dist/cjs/locales/es-MX.cjs +107 -0
  30. package/dist/cjs/locales/es.cjs +96 -0
  31. package/dist/cjs/locales/fi.cjs +108 -0
  32. package/dist/cjs/locales/fr.cjs +96 -0
  33. package/dist/cjs/locales/hi.cjs +108 -0
  34. package/dist/cjs/locales/id.cjs +108 -0
  35. package/dist/cjs/locales/index.cjs +41 -2875
  36. package/dist/cjs/locales/it.cjs +108 -0
  37. package/dist/cjs/locales/ja.cjs +108 -0
  38. package/dist/cjs/locales/ko.cjs +108 -0
  39. package/dist/cjs/locales/lazy.cjs +42 -3023
  40. package/dist/cjs/locales/nl.cjs +108 -0
  41. package/dist/cjs/locales/no.cjs +108 -0
  42. package/dist/cjs/locales/pl.cjs +108 -0
  43. package/dist/cjs/locales/pt-BR.cjs +108 -0
  44. package/dist/cjs/locales/pt.cjs +108 -0
  45. package/dist/cjs/locales/ru.cjs +108 -0
  46. package/dist/cjs/locales/runtime.cjs +51 -0
  47. package/dist/cjs/locales/sv.cjs +108 -0
  48. package/dist/cjs/locales/sw.cjs +108 -0
  49. package/dist/cjs/locales/th.cjs +108 -0
  50. package/dist/cjs/locales/tr.cjs +108 -0
  51. package/dist/cjs/locales/vi.cjs +108 -0
  52. package/dist/cjs/locales/zh.cjs +108 -0
  53. package/dist/cjs/mini.cjs +121 -7208
  54. package/dist/cjs/pigment.cjs +207 -0
  55. package/dist/cjs/plugins/index.cjs +12 -0
  56. package/dist/cjs/registry.cjs +37 -0
  57. package/dist/cjs/v3/index.cjs +425 -0
  58. package/dist/cjs/v4/core/index.cjs +894 -0
  59. package/dist/cjs/v4/index.cjs +425 -0
  60. package/dist/cjs/v4/locales/index.cjs +130 -0
  61. package/dist/cjs/v4/mini/index.cjs +509 -0
  62. package/dist/cjs/v4-mini/index.cjs +532 -0
  63. package/dist/cjs/validators/any.cjs +40 -0
  64. package/dist/cjs/validators/array.cjs +283 -0
  65. package/dist/cjs/validators/base.cjs +887 -0
  66. package/dist/cjs/validators/base64.cjs +73 -0
  67. package/dist/cjs/validators/bigint.cjs +232 -0
  68. package/dist/cjs/validators/boolean.cjs +146 -0
  69. package/dist/cjs/validators/codec.cjs +205 -0
  70. package/dist/cjs/validators/custom.cjs +71 -0
  71. package/dist/cjs/validators/date.cjs +278 -0
  72. package/dist/cjs/validators/discriminated-union.cjs +130 -0
  73. package/dist/cjs/validators/enum.cjs +154 -0
  74. package/dist/cjs/validators/file.cjs +130 -0
  75. package/dist/cjs/validators/function.cjs +63 -0
  76. package/dist/cjs/validators/hex.cjs +70 -0
  77. package/dist/cjs/validators/index.cjs +123 -0
  78. package/dist/cjs/validators/intersection.cjs +120 -0
  79. package/dist/cjs/validators/json.cjs +70 -0
  80. package/dist/cjs/validators/lazy.cjs +53 -0
  81. package/dist/cjs/validators/literal.cjs +64 -0
  82. package/dist/cjs/validators/map.cjs +218 -0
  83. package/dist/cjs/validators/nan.cjs +41 -0
  84. package/dist/cjs/validators/never.cjs +36 -0
  85. package/dist/cjs/validators/null.cjs +43 -0
  86. package/dist/cjs/validators/number.cjs +427 -0
  87. package/dist/cjs/validators/object.cjs +868 -0
  88. package/dist/cjs/validators/promise.cjs +115 -0
  89. package/dist/cjs/validators/record.cjs +262 -0
  90. package/dist/cjs/validators/set.cjs +203 -0
  91. package/dist/cjs/validators/string-bool.cjs +124 -0
  92. package/dist/cjs/validators/string-formats.cjs +168 -0
  93. package/dist/cjs/validators/string.cjs +12 -0
  94. package/dist/cjs/validators/symbol.cjs +62 -0
  95. package/dist/cjs/validators/template-literal.cjs +108 -0
  96. package/dist/cjs/validators/tuple.cjs +187 -0
  97. package/dist/cjs/validators/uint8array.cjs +106 -0
  98. package/dist/cjs/validators/undefined.cjs +43 -0
  99. package/dist/cjs/validators/union.cjs +191 -0
  100. package/dist/cjs/validators/unknown.cjs +40 -0
  101. package/dist/cjs/validators/void.cjs +48 -0
  102. package/dist/cjs/validators/xor.cjs +69 -0
  103. package/dist/cli/bin.d.ts +0 -1
  104. package/dist/cli/bin.js +407 -0
  105. package/dist/cli/commands/benchmark.d.ts +1 -2
  106. package/dist/cli/commands/validate.d.ts +1 -2
  107. package/dist/cli/index.d.ts +0 -1
  108. package/dist/cli/index.js +205 -0
  109. package/dist/codecs/index.d.ts +21 -4
  110. package/dist/codecs/index.js +11 -4
  111. package/dist/coercion/bigint.d.ts +2 -3
  112. package/dist/coercion/boolean.d.ts +3 -3
  113. package/dist/coercion/date.d.ts +3 -3
  114. package/dist/coercion/index.d.ts +5 -6
  115. package/dist/coercion/index.js +473 -5
  116. package/dist/coercion/number.d.ts +2 -3
  117. package/dist/coercion/string.d.ts +2 -3
  118. package/dist/compat/emitter.d.ts +0 -1
  119. package/dist/compat/emitter.js +0 -1
  120. package/dist/compat/index.d.ts +4 -5
  121. package/dist/compat/result.d.ts +1 -2
  122. package/dist/compat/result.js +0 -1
  123. package/dist/errors-core.d.ts +39 -0
  124. package/dist/errors.d.ts +4 -54
  125. package/dist/errors.js +4 -68
  126. package/dist/events.d.ts +3 -4
  127. package/dist/index.d.ts +1195 -600
  128. package/dist/index.js +1262 -44
  129. package/dist/kernel.d.ts +2 -3
  130. package/dist/kernel.js +10 -6
  131. package/dist/locales/af.d.ts +1 -2
  132. package/dist/locales/af.js +0 -1
  133. package/dist/locales/ar.d.ts +1 -2
  134. package/dist/locales/ar.js +0 -1
  135. package/dist/locales/bn.d.ts +1 -2
  136. package/dist/locales/bn.js +0 -1
  137. package/dist/locales/da.d.ts +1 -2
  138. package/dist/locales/da.js +0 -1
  139. package/dist/locales/de.d.ts +1 -2
  140. package/dist/locales/de.js +0 -1
  141. package/dist/locales/en.d.ts +1 -2
  142. package/dist/locales/en.js +0 -1
  143. package/dist/locales/es-MX.d.ts +1 -2
  144. package/dist/locales/es-MX.js +0 -1
  145. package/dist/locales/es.d.ts +1 -2
  146. package/dist/locales/es.js +0 -1
  147. package/dist/locales/fi.d.ts +1 -2
  148. package/dist/locales/fi.js +0 -1
  149. package/dist/locales/fr.d.ts +1 -2
  150. package/dist/locales/fr.js +0 -1
  151. package/dist/locales/hi.d.ts +1 -2
  152. package/dist/locales/hi.js +0 -1
  153. package/dist/locales/id.d.ts +1 -2
  154. package/dist/locales/id.js +0 -1
  155. package/dist/locales/index.d.ts +10 -15
  156. package/dist/locales/index.js +28 -2
  157. package/dist/locales/it.d.ts +1 -2
  158. package/dist/locales/it.js +0 -1
  159. package/dist/locales/ja.d.ts +1 -2
  160. package/dist/locales/ja.js +0 -1
  161. package/dist/locales/ko.d.ts +1 -2
  162. package/dist/locales/ko.js +0 -1
  163. package/dist/locales/lazy.d.ts +4 -26
  164. package/dist/locales/lazy.js +12 -55
  165. package/dist/locales/nl.d.ts +1 -2
  166. package/dist/locales/nl.js +0 -1
  167. package/dist/locales/no.d.ts +1 -2
  168. package/dist/locales/no.js +0 -1
  169. package/dist/locales/pl.d.ts +1 -2
  170. package/dist/locales/pl.js +0 -1
  171. package/dist/locales/pt-BR.d.ts +1 -2
  172. package/dist/locales/pt-BR.js +0 -1
  173. package/dist/locales/pt.d.ts +1 -2
  174. package/dist/locales/pt.js +0 -1
  175. package/dist/locales/ru.d.ts +1 -2
  176. package/dist/locales/ru.js +0 -1
  177. package/dist/locales/runtime.d.ts +10 -0
  178. package/dist/locales/runtime.js +41 -0
  179. package/dist/locales/sv.d.ts +1 -2
  180. package/dist/locales/sv.js +0 -1
  181. package/dist/locales/sw.d.ts +1 -2
  182. package/dist/locales/sw.js +0 -1
  183. package/dist/locales/th.d.ts +1 -2
  184. package/dist/locales/th.js +0 -1
  185. package/dist/locales/tr.d.ts +1 -2
  186. package/dist/locales/tr.js +0 -1
  187. package/dist/locales/types.d.ts +0 -1
  188. package/dist/locales/vi.d.ts +1 -2
  189. package/dist/locales/vi.js +0 -1
  190. package/dist/locales/zh.d.ts +1 -2
  191. package/dist/locales/zh.js +0 -1
  192. package/dist/logger.d.ts +0 -1
  193. package/dist/mini.d.ts +64 -65
  194. package/dist/mini.js +31 -7
  195. package/dist/pigment.d.ts +0 -1
  196. package/dist/pigment.js +6 -4
  197. package/dist/plugins/index.d.ts +2 -3
  198. package/dist/plugins/index.js +1 -0
  199. package/dist/plugins/types.d.ts +4 -5
  200. package/dist/registry.d.ts +23 -0
  201. package/dist/registry.js +34 -0
  202. package/dist/utils/codec-utils.d.ts +0 -1
  203. package/dist/utils/deep-merge.d.ts +0 -1
  204. package/dist/utils/ip-validation.d.ts +0 -1
  205. package/dist/utils/json-schema.d.ts +77 -0
  206. package/dist/utils/security.d.ts +2 -6
  207. package/dist/v3/index.d.ts +2 -0
  208. package/dist/v3/index.js +46 -0
  209. package/dist/v4/core/index.d.ts +260 -0
  210. package/dist/v4/core/index.js +277 -0
  211. package/dist/v4/index.d.ts +4 -0
  212. package/dist/v4/index.js +50 -0
  213. package/dist/v4/locales/index.d.ts +53 -0
  214. package/dist/v4/locales/index.js +77 -0
  215. package/dist/v4/mini/index.d.ts +2 -0
  216. package/dist/v4/mini/index.js +47 -0
  217. package/dist/v4-mini/index.d.ts +22 -0
  218. package/dist/v4-mini/index.js +75 -0
  219. package/dist/validators/any.d.ts +7 -2
  220. package/dist/validators/any.js +37 -0
  221. package/dist/validators/array.d.ts +9 -2
  222. package/dist/validators/array.js +279 -0
  223. package/dist/validators/base.d.ts +228 -5
  224. package/dist/validators/base.js +868 -0
  225. package/dist/validators/base64.d.ts +1 -2
  226. package/dist/validators/base64.js +68 -0
  227. package/dist/validators/bigint.d.ts +21 -3
  228. package/dist/validators/bigint.js +228 -0
  229. package/dist/validators/boolean.d.ts +13 -4
  230. package/dist/validators/boolean.js +142 -0
  231. package/dist/validators/codec.d.ts +9 -2
  232. package/dist/validators/codec.js +200 -0
  233. package/dist/validators/custom.d.ts +15 -2
  234. package/dist/validators/custom.js +67 -0
  235. package/dist/validators/date.d.ts +19 -3
  236. package/dist/validators/date.js +274 -0
  237. package/dist/validators/discriminated-union.d.ts +4 -3
  238. package/dist/validators/discriminated-union.js +123 -0
  239. package/dist/validators/enum.d.ts +10 -7
  240. package/dist/validators/enum.js +150 -0
  241. package/dist/validators/file.d.ts +7 -2
  242. package/dist/validators/file.js +125 -0
  243. package/dist/validators/function.d.ts +11 -5
  244. package/dist/validators/function.js +58 -0
  245. package/dist/validators/hex.d.ts +1 -2
  246. package/dist/validators/hex.js +65 -0
  247. package/dist/validators/index.d.ts +38 -38
  248. package/dist/validators/index.js +35 -5
  249. package/dist/validators/intersection.d.ts +1 -2
  250. package/dist/validators/intersection.js +116 -0
  251. package/dist/validators/json.d.ts +1 -2
  252. package/dist/validators/json.js +66 -0
  253. package/dist/validators/lazy.d.ts +5 -9
  254. package/dist/validators/lazy.js +50 -0
  255. package/dist/validators/literal.d.ts +2 -2
  256. package/dist/validators/literal.js +60 -0
  257. package/dist/validators/map.d.ts +15 -2
  258. package/dist/validators/map.js +214 -0
  259. package/dist/validators/nan.d.ts +2 -3
  260. package/dist/validators/nan.js +38 -0
  261. package/dist/validators/never.d.ts +1 -2
  262. package/dist/validators/never.js +32 -0
  263. package/dist/validators/null.d.ts +3 -3
  264. package/dist/validators/null.js +40 -0
  265. package/dist/validators/number.d.ts +80 -21
  266. package/dist/validators/number.js +423 -0
  267. package/dist/validators/object.d.ts +30 -9
  268. package/dist/validators/object.js +864 -0
  269. package/dist/validators/promise.d.ts +58 -0
  270. package/dist/validators/promise.js +111 -0
  271. package/dist/validators/record.d.ts +11 -2
  272. package/dist/validators/record.js +258 -0
  273. package/dist/validators/set.d.ts +11 -2
  274. package/dist/validators/set.js +199 -0
  275. package/dist/validators/string-bool.d.ts +7 -10
  276. package/dist/validators/string-bool.js +120 -0
  277. package/dist/validators/string-formats.d.ts +13 -4
  278. package/dist/validators/string-formats.js +135 -0
  279. package/dist/validators/string.d.ts +39 -18
  280. package/dist/validators/string.js +4 -0
  281. package/dist/validators/symbol.d.ts +8 -3
  282. package/dist/validators/symbol.js +58 -0
  283. package/dist/validators/template-literal.d.ts +1 -2
  284. package/dist/validators/template-literal.js +103 -0
  285. package/dist/validators/tuple.d.ts +15 -2
  286. package/dist/validators/tuple.js +183 -0
  287. package/dist/validators/uint8array.d.ts +3 -4
  288. package/dist/validators/uint8array.js +101 -0
  289. package/dist/validators/undefined.d.ts +3 -3
  290. package/dist/validators/undefined.js +40 -0
  291. package/dist/validators/union.d.ts +7 -4
  292. package/dist/validators/union.js +187 -0
  293. package/dist/validators/unknown.d.ts +7 -2
  294. package/dist/{chunks/unknown-SLIH1VCf.js → validators/unknown.js} +12 -3
  295. package/dist/validators/void.d.ts +3 -2
  296. package/dist/validators/void.js +44 -0
  297. package/dist/validators/xor.d.ts +2 -3
  298. package/dist/validators/xor.js +66 -0
  299. package/package.json +116 -31
  300. package/dist/chunks/bigint-DgsCr2dC.js +0 -1709
  301. package/dist/chunks/bigint-DgsCr2dC.js.map +0 -1
  302. package/dist/chunks/date-ODue_rtq.js.map +0 -1
  303. package/dist/chunks/index-BZqWZvVe.js +0 -426
  304. package/dist/chunks/index-BZqWZvVe.js.map +0 -1
  305. package/dist/chunks/index-CETyGkrv.js.map +0 -1
  306. package/dist/chunks/json-o20GFhTh.js +0 -2021
  307. package/dist/chunks/json-o20GFhTh.js.map +0 -1
  308. package/dist/chunks/unknown-SLIH1VCf.js.map +0 -1
  309. package/dist/cjs/errors.cjs.map +0 -1
  310. package/dist/cjs/index.cjs.map +0 -1
  311. package/dist/cjs/locales/index.cjs.map +0 -1
  312. package/dist/cjs/locales/lazy.cjs.map +0 -1
  313. package/dist/cjs/mini.cjs.map +0 -1
  314. package/dist/cli/bin.d.ts.map +0 -1
  315. package/dist/cli/commands/benchmark.d.ts.map +0 -1
  316. package/dist/cli/commands/validate.d.ts.map +0 -1
  317. package/dist/cli/index.d.ts.map +0 -1
  318. package/dist/codecs/index.d.ts.map +0 -1
  319. package/dist/codecs/index.js.map +0 -1
  320. package/dist/coercion/bigint.d.ts.map +0 -1
  321. package/dist/coercion/boolean.d.ts.map +0 -1
  322. package/dist/coercion/date.d.ts.map +0 -1
  323. package/dist/coercion/index.d.ts.map +0 -1
  324. package/dist/coercion/index.js.map +0 -1
  325. package/dist/coercion/number.d.ts.map +0 -1
  326. package/dist/coercion/string.d.ts.map +0 -1
  327. package/dist/compat/emitter.d.ts.map +0 -1
  328. package/dist/compat/emitter.js.map +0 -1
  329. package/dist/compat/index.d.ts.map +0 -1
  330. package/dist/compat/result.d.ts.map +0 -1
  331. package/dist/compat/result.js.map +0 -1
  332. package/dist/errors.d.ts.map +0 -1
  333. package/dist/errors.js.map +0 -1
  334. package/dist/events.d.ts.map +0 -1
  335. package/dist/index.d.ts.map +0 -1
  336. package/dist/index.js.map +0 -1
  337. package/dist/kernel.d.ts.map +0 -1
  338. package/dist/kernel.js.map +0 -1
  339. package/dist/locales/af.d.ts.map +0 -1
  340. package/dist/locales/af.js.map +0 -1
  341. package/dist/locales/ar.d.ts.map +0 -1
  342. package/dist/locales/ar.js.map +0 -1
  343. package/dist/locales/backup-en.d.ts +0 -3
  344. package/dist/locales/backup-en.d.ts.map +0 -1
  345. package/dist/locales/bn.d.ts.map +0 -1
  346. package/dist/locales/bn.js.map +0 -1
  347. package/dist/locales/da.d.ts.map +0 -1
  348. package/dist/locales/da.js.map +0 -1
  349. package/dist/locales/de.d.ts.map +0 -1
  350. package/dist/locales/de.js.map +0 -1
  351. package/dist/locales/en.d.ts.map +0 -1
  352. package/dist/locales/en.js.map +0 -1
  353. package/dist/locales/es-MX.d.ts.map +0 -1
  354. package/dist/locales/es-MX.js.map +0 -1
  355. package/dist/locales/es.d.ts.map +0 -1
  356. package/dist/locales/es.js.map +0 -1
  357. package/dist/locales/fi.d.ts.map +0 -1
  358. package/dist/locales/fi.js.map +0 -1
  359. package/dist/locales/fr.d.ts.map +0 -1
  360. package/dist/locales/fr.js.map +0 -1
  361. package/dist/locales/hi.d.ts.map +0 -1
  362. package/dist/locales/hi.js.map +0 -1
  363. package/dist/locales/id.d.ts.map +0 -1
  364. package/dist/locales/id.js.map +0 -1
  365. package/dist/locales/index.d.ts.map +0 -1
  366. package/dist/locales/index.js.map +0 -1
  367. package/dist/locales/it.d.ts.map +0 -1
  368. package/dist/locales/it.js.map +0 -1
  369. package/dist/locales/ja.d.ts.map +0 -1
  370. package/dist/locales/ja.js.map +0 -1
  371. package/dist/locales/ko.d.ts.map +0 -1
  372. package/dist/locales/ko.js.map +0 -1
  373. package/dist/locales/lazy.d.ts.map +0 -1
  374. package/dist/locales/lazy.js.map +0 -1
  375. package/dist/locales/nl.d.ts.map +0 -1
  376. package/dist/locales/nl.js.map +0 -1
  377. package/dist/locales/no.d.ts.map +0 -1
  378. package/dist/locales/no.js.map +0 -1
  379. package/dist/locales/pl.d.ts.map +0 -1
  380. package/dist/locales/pl.js.map +0 -1
  381. package/dist/locales/pt-BR.d.ts.map +0 -1
  382. package/dist/locales/pt-BR.js.map +0 -1
  383. package/dist/locales/pt.d.ts.map +0 -1
  384. package/dist/locales/pt.js.map +0 -1
  385. package/dist/locales/ru.d.ts.map +0 -1
  386. package/dist/locales/ru.js.map +0 -1
  387. package/dist/locales/sv.d.ts.map +0 -1
  388. package/dist/locales/sv.js.map +0 -1
  389. package/dist/locales/sw.d.ts.map +0 -1
  390. package/dist/locales/sw.js.map +0 -1
  391. package/dist/locales/th.d.ts.map +0 -1
  392. package/dist/locales/th.js.map +0 -1
  393. package/dist/locales/tr.d.ts.map +0 -1
  394. package/dist/locales/tr.js.map +0 -1
  395. package/dist/locales/types.d.ts.map +0 -1
  396. package/dist/locales/vi.d.ts.map +0 -1
  397. package/dist/locales/vi.js.map +0 -1
  398. package/dist/locales/zh.d.ts.map +0 -1
  399. package/dist/locales/zh.js.map +0 -1
  400. package/dist/logger.d.ts.map +0 -1
  401. package/dist/mini.d.ts.map +0 -1
  402. package/dist/mini.js.map +0 -1
  403. package/dist/pigment.d.ts.map +0 -1
  404. package/dist/pigment.js.map +0 -1
  405. package/dist/plugins/index.d.ts.map +0 -1
  406. package/dist/plugins/types.d.ts.map +0 -1
  407. package/dist/utils/codec-utils.d.ts.map +0 -1
  408. package/dist/utils/deep-merge.d.ts.map +0 -1
  409. package/dist/utils/ip-validation.d.ts.map +0 -1
  410. package/dist/utils/security.d.ts.map +0 -1
  411. package/dist/validators/any.d.ts.map +0 -1
  412. package/dist/validators/array.d.ts.map +0 -1
  413. package/dist/validators/base.d.ts.map +0 -1
  414. package/dist/validators/base64.d.ts.map +0 -1
  415. package/dist/validators/bigint.d.ts.map +0 -1
  416. package/dist/validators/boolean.d.ts.map +0 -1
  417. package/dist/validators/codec.d.ts.map +0 -1
  418. package/dist/validators/custom.d.ts.map +0 -1
  419. package/dist/validators/date.d.ts.map +0 -1
  420. package/dist/validators/discriminated-union.d.ts.map +0 -1
  421. package/dist/validators/enum.d.ts.map +0 -1
  422. package/dist/validators/file.d.ts.map +0 -1
  423. package/dist/validators/function.d.ts.map +0 -1
  424. package/dist/validators/hex.d.ts.map +0 -1
  425. package/dist/validators/index.d.ts.map +0 -1
  426. package/dist/validators/index.js.map +0 -1
  427. package/dist/validators/intersection.d.ts.map +0 -1
  428. package/dist/validators/json.d.ts.map +0 -1
  429. package/dist/validators/lazy.d.ts.map +0 -1
  430. package/dist/validators/literal.d.ts.map +0 -1
  431. package/dist/validators/map.d.ts.map +0 -1
  432. package/dist/validators/nan.d.ts.map +0 -1
  433. package/dist/validators/never.d.ts.map +0 -1
  434. package/dist/validators/null.d.ts.map +0 -1
  435. package/dist/validators/number.d.ts.map +0 -1
  436. package/dist/validators/object.d.ts.map +0 -1
  437. package/dist/validators/record.d.ts.map +0 -1
  438. package/dist/validators/set.d.ts.map +0 -1
  439. package/dist/validators/string-bool.d.ts.map +0 -1
  440. package/dist/validators/string-formats.d.ts.map +0 -1
  441. package/dist/validators/string.d.ts.map +0 -1
  442. package/dist/validators/symbol.d.ts.map +0 -1
  443. package/dist/validators/template-literal.d.ts.map +0 -1
  444. package/dist/validators/tuple.d.ts.map +0 -1
  445. package/dist/validators/uint8array.d.ts.map +0 -1
  446. package/dist/validators/undefined.d.ts.map +0 -1
  447. package/dist/validators/union.d.ts.map +0 -1
  448. package/dist/validators/unknown.d.ts.map +0 -1
  449. package/dist/validators/void.d.ts.map +0 -1
  450. package/dist/validators/xor.d.ts.map +0 -1
@@ -1,44 +1,44 @@
1
1
  /**
2
2
  * Main entry point for all validators
3
3
  */
4
- export { VldBase, ParseResult, VldRefine, VldTransform, VldDefault, VldCatch, VldOptional, VldNullable, VldNullish, VldPipe, VldReadonly, VldBrand, SuperRefineContext, VldSuperRefine, VldPreprocess } from './base';
5
- export { VldString } from './string';
6
- export { VldNumber } from './number';
7
- export { VldBoolean } from './boolean';
8
- export { VldDate } from './date';
9
- export { VldStringBool } from './string-bool';
10
- export { VldArray } from './array';
11
- export { VldObject } from './object';
12
- export { VldUnion } from './union';
13
- export { VldIntersection } from './intersection';
14
- export { VldLiteral } from './literal';
15
- export { VldEnum } from './enum';
16
- export { VldTuple } from './tuple';
17
- export { VldRecord } from './record';
18
- export { VldSet } from './set';
19
- export { VldMap } from './map';
20
- export { VldBigInt } from './bigint';
21
- export { VldSymbol } from './symbol';
22
- export { VldAny } from './any';
23
- export { VldUnknown } from './unknown';
24
- export { VldVoid } from './void';
25
- export { VldNever } from './never';
26
- export { VldNull } from './null';
27
- export { VldUndefined } from './undefined';
28
- export { VldNan } from './nan';
29
- export { VldLazy } from './lazy';
30
- export { VldDiscriminatedUnion } from './discriminated-union';
31
- export { VldXor } from './xor';
32
- export { VldJson } from './json';
33
- export { VldTemplateLiteral, templateLiteral } from './template-literal';
34
- export { VldCustom, custom } from './custom';
35
- export type { CustomValidatorOptions } from './custom';
36
- export { VldFile, file } from './file';
37
- export type { VldFileValue } from './file';
38
- export { VldFunction, functionValidator } from './function';
39
- export { email, uuid, uuidv4, hostname, emoji, base64, base64url, hex, jwt, nanoid, cuid, cuid2, ulid, ipv4, ipv6, mac, cidrv4, e164, hash, iso, stringFormat, regexes } from './string-formats';
40
- import { VldBase } from './base';
4
+ export { VldBase, ParseResult, VldRefine, VldTransform, VldDefault, VldCatch, VldOptional, VldExactOptional, VldNullable, VldNullish, VldPipe, VldReadonly, VldBrand, SuperRefineContext, VldSuperRefine, VldPreprocess } from './base.js';
5
+ export { VldString } from './string.js';
6
+ export { VldNumber } from './number.js';
7
+ export { VldBoolean } from './boolean.js';
8
+ export { VldDate } from './date.js';
9
+ export { VldStringBool } from './string-bool.js';
10
+ export { VldArray } from './array.js';
11
+ export { VldObject } from './object.js';
12
+ export { VldUnion } from './union.js';
13
+ export { VldIntersection } from './intersection.js';
14
+ export { VldLiteral } from './literal.js';
15
+ export { VldEnum } from './enum.js';
16
+ export { VldTuple } from './tuple.js';
17
+ export { VldRecord } from './record.js';
18
+ export { VldSet } from './set.js';
19
+ export { VldMap } from './map.js';
20
+ export { VldBigInt } from './bigint.js';
21
+ export { VldSymbol } from './symbol.js';
22
+ export { VldAny } from './any.js';
23
+ export { VldUnknown } from './unknown.js';
24
+ export { VldVoid } from './void.js';
25
+ export { VldNever } from './never.js';
26
+ export { VldNull } from './null.js';
27
+ export { VldUndefined } from './undefined.js';
28
+ export { VldNan } from './nan.js';
29
+ export { VldLazy } from './lazy.js';
30
+ export { VldDiscriminatedUnion } from './discriminated-union.js';
31
+ export { VldXor } from './xor.js';
32
+ export { VldJson } from './json.js';
33
+ export { VldTemplateLiteral, templateLiteral } from './template-literal.js';
34
+ export { VldCustom, custom } from './custom.js';
35
+ export type { CustomValidatorOptions } from './custom.js';
36
+ export { VldFile, file } from './file.js';
37
+ export type { VldFileValue } from './file.js';
38
+ export { VldFunction, functionValidator } from './function.js';
39
+ export { VldPromise, promise } from './promise.js';
40
+ export { email, uuid, uuidv4, hostname, emoji, base64, base64url, hex, jwt, nanoid, cuid, cuid2, ulid, ipv4, ipv6, mac, cidrv4, cidrv6, e164, hash, iso, stringFormat, regexes, xid, guid, httpUrl } from './string-formats.js';
41
+ import { VldBase } from './base.js';
41
42
  export type Infer<T extends VldBase<any, any>> = T extends VldBase<any, infer U> ? U : never;
42
43
  export type Input<T extends VldBase<any, any>> = T extends VldBase<infer I, any> ? I : never;
43
44
  export type Output<T extends VldBase<any, any>> = T extends VldBase<any, infer O> ? O : never;
44
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,35 @@
1
- export { i as VldBase, d as VldBigInt, b as VldBoolean, p as VldBrand, m as VldCatch, c as VldDate, l as VldDefault, f as VldNullable, g as VldNullish, a as VldNumber, e as VldOptional, n as VldPipe, h as VldPreprocess, o as VldReadonly, j as VldRefine, V as VldString, q as VldSuperRefine, k as VldTransform } from '../chunks/bigint-DgsCr2dC.js';
2
- export { n as VldAny, b as VldArray, j as VldDiscriminatedUnion, m as VldEnum, i as VldIntersection, u as VldJson, t as VldLazy, l as VldLiteral, g as VldMap, s as VldNan, p as VldNever, q as VldNull, c as VldObject, e as VldRecord, f as VldSet, a as VldStringBool, V as VldSymbol, d as VldTuple, r as VldUndefined, h as VldUnion, o as VldVoid, k as VldXor } from '../chunks/json-o20GFhTh.js';
3
- export { V as VldUnknown } from '../chunks/unknown-SLIH1VCf.js';
4
- export { A as VldCustom, B as VldFile, C as VldFunction, V as VldTemplateLiteral, o as base64, l as base64url, a as cidrv4, g as cuid, f as cuid2, z as custom, e as e164, w as email, p as emoji, y as file, x as functionValidator, h as hash, k as hex, q as hostname, d as ipv4, b as ipv6, i as iso, j as jwt, m as mac, n as nanoid, R as regexes, s as stringFormat, t as templateLiteral, u as ulid, v as uuid, r as uuidv4 } from '../chunks/index-BZqWZvVe.js';
5
- //# sourceMappingURL=index.js.map
1
+ export { VldBase, VldBrand, VldCatch, VldDefault, VldExactOptional, VldNullable, VldNullish, VldOptional, VldPipe, VldPreprocess, VldReadonly, VldRefine, VldSuperRefine, VldTransform } from './base.js';
2
+ export { V as VldString } from '../chunks/string-BJRQod3t.js';
3
+ export { VldNumber } from './number.js';
4
+ export { VldBoolean } from './boolean.js';
5
+ export { VldDate } from './date.js';
6
+ export { VldStringBool } from './string-bool.js';
7
+ export { VldArray } from './array.js';
8
+ export { VldObject } from './object.js';
9
+ export { VldUnion } from './union.js';
10
+ export { VldIntersection } from './intersection.js';
11
+ export { VldLiteral } from './literal.js';
12
+ export { VldEnum } from './enum.js';
13
+ export { VldTuple } from './tuple.js';
14
+ export { VldRecord } from './record.js';
15
+ export { VldSet } from './set.js';
16
+ export { VldMap } from './map.js';
17
+ export { VldBigInt } from './bigint.js';
18
+ export { VldSymbol } from './symbol.js';
19
+ export { VldAny } from './any.js';
20
+ export { VldUnknown } from './unknown.js';
21
+ export { VldVoid } from './void.js';
22
+ export { VldNever } from './never.js';
23
+ export { VldNull } from './null.js';
24
+ export { VldUndefined } from './undefined.js';
25
+ export { VldNan } from './nan.js';
26
+ export { VldLazy } from './lazy.js';
27
+ export { VldDiscriminatedUnion } from './discriminated-union.js';
28
+ export { VldXor } from './xor.js';
29
+ export { VldJson } from './json.js';
30
+ export { VldTemplateLiteral, templateLiteral } from './template-literal.js';
31
+ export { VldCustom, custom } from './custom.js';
32
+ export { VldFile, file } from './file.js';
33
+ export { VldFunction, functionValidator } from './function.js';
34
+ export { VldPromise, promise } from './promise.js';
35
+ export { base64, base64url, cidrv4, cidrv6, cuid, cuid2, e164, email, emoji, guid, hash, hex, hostname, httpUrl, ipv4, ipv6, iso, jwt, mac, nanoid, regexes, stringFormat, ulid, uuid, uuidv4, xid } from './string-formats.js';
@@ -1,4 +1,4 @@
1
- import { VldBase, ParseResult } from './base';
1
+ import { VldBase, ParseResult } from './base.js';
2
2
  /**
3
3
  * Immutable intersection validator for combining validators
4
4
  */
@@ -22,4 +22,3 @@ export declare class VldIntersection<A, B> extends VldBase<unknown, A & B> {
22
22
  */
23
23
  safeParse(value: unknown): ParseResult<A & B>;
24
24
  }
25
- //# sourceMappingURL=intersection.d.ts.map
@@ -0,0 +1,116 @@
1
+ import { VldBase, VLD_VALIDATOR_TYPES } from './base.js';
2
+ import { i as isDangerousKey } from '../chunks/security-B0Pd_vSY.js';
3
+ import { getMessages } from '../locales/runtime.js';
4
+ import { V as VldError } from '../chunks/errors-core-BeiFUtZM.js';
5
+
6
+ /**
7
+ * Type guard to check if a value is a plain object
8
+ */
9
+ function isPlainObject(obj) {
10
+ return (obj !== null &&
11
+ typeof obj === 'object' &&
12
+ obj.constructor === Object &&
13
+ Object.prototype.toString.call(obj) === '[object Object]');
14
+ }
15
+ /**
16
+ * Safely deep merge two objects without prototype pollution vulnerability
17
+ * Optimized for performance with minimal object allocations
18
+ * BUG-NEW-020 FIX: Use comprehensive dangerous key protection from shared utility
19
+ * @param target The target object
20
+ * @param source The source object to merge from
21
+ * @returns A new merged object
22
+ */
23
+ function deepMerge(target, source) {
24
+ // Create a new object to avoid mutations (only once)
25
+ const result = { ...target };
26
+ // Get source keys directly for better performance
27
+ const sourceKeys = Object.keys(source);
28
+ for (let i = 0; i < sourceKeys.length; i++) {
29
+ const key = sourceKeys[i];
30
+ // Skip dangerous keys that could lead to prototype pollution
31
+ if (isDangerousKey(key)) {
32
+ continue;
33
+ }
34
+ // Only process own properties (redundant with Object.keys but safe)
35
+ if (!Object.prototype.hasOwnProperty.call(source, key)) {
36
+ continue;
37
+ }
38
+ const sourceValue = source[key];
39
+ const targetValue = target[key];
40
+ // If both values are plain objects, merge them recursively
41
+ if (isPlainObject(sourceValue) && isPlainObject(targetValue)) {
42
+ result[key] = deepMerge(targetValue, sourceValue);
43
+ }
44
+ else {
45
+ // Otherwise, use the source value (including undefined)
46
+ result[key] = sourceValue;
47
+ }
48
+ }
49
+ return result;
50
+ }
51
+
52
+ function createIntersectionError(message) {
53
+ return new VldError([{ code: 'invalid_type', path: [], message }]);
54
+ }
55
+ /**
56
+ * Immutable intersection validator for combining validators
57
+ */
58
+ class VldIntersection extends VldBase {
59
+ /**
60
+ * Private constructor to enforce immutability
61
+ */
62
+ constructor(validatorA, validatorB) {
63
+ super(VLD_VALIDATOR_TYPES.INTERSECTION);
64
+ this.validatorA = validatorA;
65
+ this.validatorB = validatorB;
66
+ }
67
+ /**
68
+ * Create a new intersection validator
69
+ */
70
+ static create(validatorA, validatorB) {
71
+ return new VldIntersection(validatorA, validatorB);
72
+ }
73
+ /**
74
+ * Parse and validate a value against both validators
75
+ */
76
+ parse(value) {
77
+ try {
78
+ // Both validators must pass
79
+ const resultA = this.validatorA.parse(value);
80
+ const resultB = this.validatorB.parse(value);
81
+ // BUG-NEW-015 FIX: Check type consistency before merging
82
+ const aIsObject = isPlainObject(resultA);
83
+ const bIsObject = isPlainObject(resultB);
84
+ // Both are objects - safe to merge
85
+ if (aIsObject && bIsObject) {
86
+ return deepMerge(resultA, resultB);
87
+ }
88
+ // Neither are objects - must be identical primitives
89
+ if (!aIsObject && !bIsObject) {
90
+ if (resultA === resultB) {
91
+ return resultA;
92
+ }
93
+ throw new Error('Values must be identical for intersection of primitive types');
94
+ }
95
+ // One is object, one is primitive - invalid intersection
96
+ throw new Error('Cannot create intersection of object and primitive types. ' +
97
+ 'Both validators must produce the same type category.');
98
+ }
99
+ catch (error) {
100
+ throw new Error(getMessages().intersectionError(error.message));
101
+ }
102
+ }
103
+ /**
104
+ * Safely parse and validate a value against both validators
105
+ */
106
+ safeParse(value) {
107
+ try {
108
+ return { success: true, data: this.parse(value) };
109
+ }
110
+ catch (error) {
111
+ return { success: false, error: createIntersectionError(error.message) };
112
+ }
113
+ }
114
+ }
115
+
116
+ export { VldIntersection };
@@ -1,4 +1,4 @@
1
- import { VldBase, ParseResult } from './base';
1
+ import { VldBase, ParseResult } from './base.js';
2
2
  /**
3
3
  * Immutable JSON validator that validates and parses JSON strings
4
4
  * Accepts both strings (which are parsed) and already-parsed objects
@@ -23,4 +23,3 @@ export declare class VldJson<T = unknown> extends VldBase<unknown, T> {
23
23
  */
24
24
  withSchema<U>(schema: VldBase<unknown, U>): VldJson<U>;
25
25
  }
26
- //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1,66 @@
1
+ import { VldBase, VLD_VALIDATOR_TYPES } from './base.js';
2
+ import { getMessages } from '../locales/runtime.js';
3
+
4
+ /**
5
+ * Immutable JSON validator that validates and parses JSON strings
6
+ * Accepts both strings (which are parsed) and already-parsed objects
7
+ */
8
+ class VldJson extends VldBase {
9
+ constructor(schema) {
10
+ super(VLD_VALIDATOR_TYPES.JSON);
11
+ this.schema = schema;
12
+ }
13
+ /**
14
+ * Create a new JSON validator
15
+ */
16
+ static create(schema) {
17
+ return new VldJson(schema);
18
+ }
19
+ /**
20
+ * Parse and validate a JSON value
21
+ */
22
+ parse(value) {
23
+ let parsed;
24
+ // If it's a string, try to parse it as JSON first
25
+ if (typeof value === 'string') {
26
+ try {
27
+ parsed = JSON.parse(value);
28
+ }
29
+ catch {
30
+ throw new Error(getMessages().invalidJson);
31
+ }
32
+ }
33
+ else {
34
+ // Not a string - assume it's already parsed
35
+ parsed = value;
36
+ }
37
+ // If we have a schema, validate against it
38
+ if (this.schema) {
39
+ return this.schema.parse(parsed);
40
+ }
41
+ // No schema - just return the parsed value
42
+ return parsed;
43
+ }
44
+ /**
45
+ * Safely parse and validate a JSON value
46
+ */
47
+ safeParse(value) {
48
+ try {
49
+ return { success: true, data: this.parse(value) };
50
+ }
51
+ catch (error) {
52
+ return {
53
+ success: false,
54
+ error: error
55
+ };
56
+ }
57
+ }
58
+ /**
59
+ * Create a new JSON validator with a schema for validation
60
+ */
61
+ withSchema(schema) {
62
+ return new VldJson(schema);
63
+ }
64
+ }
65
+
66
+ export { VldJson };
@@ -3,25 +3,22 @@
3
3
  * Part of Zod 4 API parity implementation
4
4
  * Allows schemas that reference themselves (e.g., tree structures, nested categories)
5
5
  */
6
- import { VldBase } from './base';
7
- import type { ParseResult } from './base';
6
+ import { VldBase } from './base.js';
7
+ import type { ParseResult } from './base.js';
8
8
  /**
9
9
  * Lazy validator - defers schema evaluation until runtime
10
10
  * Essential for recursive and self-referencing types
11
11
  *
12
- * MEMORY OPTIMIZATION: Uses WeakRef for the cached schema to allow garbage collection
13
- * when the validator is no longer in use. This prevents memory leaks in long-running
14
- * applications with dynamically created schemas.
12
+ * Caches the resolved schema after first use. This keeps recursive schemas stable
13
+ * and avoids re-running the schema getter on hot parse paths.
15
14
  */
16
15
  export declare class VldLazy<TInput, TOutput> extends VldBase<TInput, TOutput> {
17
16
  private readonly _schemaGetter;
18
- private _cachedSchemaRef;
19
- private _strongRef;
17
+ private _cachedSchema;
20
18
  private constructor();
21
19
  static create<TInput, TOutput>(schemaGetter: () => VldBase<TInput, TOutput>): VldLazy<TInput, TOutput>;
22
20
  /**
23
21
  * Get the actual schema, caching it after first retrieval
24
- * Uses WeakRef to allow garbage collection when validator is not in use
25
22
  */
26
23
  private _getSchema;
27
24
  /**
@@ -32,4 +29,3 @@ export declare class VldLazy<TInput, TOutput> extends VldBase<TInput, TOutput> {
32
29
  parse(value: unknown): TOutput;
33
30
  safeParse(value: unknown): ParseResult<TOutput>;
34
31
  }
35
- //# sourceMappingURL=lazy.d.ts.map
@@ -0,0 +1,50 @@
1
+ import { VldBase, VLD_VALIDATOR_TYPES } from './base.js';
2
+
3
+ /**
4
+ * VldLazy - Lazy evaluation for recursive schemas
5
+ * Part of Zod 4 API parity implementation
6
+ * Allows schemas that reference themselves (e.g., tree structures, nested categories)
7
+ */
8
+ /**
9
+ * Lazy validator - defers schema evaluation until runtime
10
+ * Essential for recursive and self-referencing types
11
+ *
12
+ * Caches the resolved schema after first use. This keeps recursive schemas stable
13
+ * and avoids re-running the schema getter on hot parse paths.
14
+ */
15
+ class VldLazy extends VldBase {
16
+ constructor(_schemaGetter) {
17
+ super(VLD_VALIDATOR_TYPES.LAZY);
18
+ this._schemaGetter = _schemaGetter;
19
+ this._cachedSchema = null;
20
+ }
21
+ static create(schemaGetter) {
22
+ return new VldLazy(schemaGetter);
23
+ }
24
+ /**
25
+ * Get the actual schema, caching it after first retrieval
26
+ */
27
+ _getSchema() {
28
+ if (this._cachedSchema) {
29
+ return this._cachedSchema;
30
+ }
31
+ const schema = this._schemaGetter();
32
+ this._cachedSchema = schema;
33
+ return schema;
34
+ }
35
+ /**
36
+ * Get the inner schema (unwrap)
37
+ * Returns a strong reference that will keep the schema alive
38
+ */
39
+ unwrap() {
40
+ return this._getSchema();
41
+ }
42
+ parse(value) {
43
+ return this._getSchema().parse(value);
44
+ }
45
+ safeParse(value) {
46
+ return this._getSchema().safeParse(value);
47
+ }
48
+ }
49
+
50
+ export { VldLazy };
@@ -1,4 +1,4 @@
1
- import { VldBase, ParseResult } from './base';
1
+ import { VldBase, ParseResult } from './base.js';
2
2
  /**
3
3
  * Immutable literal validator for exact value matching
4
4
  */
@@ -13,6 +13,7 @@ export declare class VldLiteral<T extends string | number | boolean | null | und
13
13
  * Get the literal value
14
14
  */
15
15
  get literal(): T;
16
+ get isSimple(): boolean;
16
17
  /**
17
18
  * Create a new literal validator
18
19
  */
@@ -26,4 +27,3 @@ export declare class VldLiteral<T extends string | number | boolean | null | und
26
27
  */
27
28
  safeParse(value: unknown): ParseResult<T>;
28
29
  }
29
- //# sourceMappingURL=literal.d.ts.map
@@ -0,0 +1,60 @@
1
+ import { VldBase, VLD_VALIDATOR_TYPES } from './base.js';
2
+ import { getMessages } from '../locales/runtime.js';
3
+ import { V as VldError } from '../chunks/errors-core-BeiFUtZM.js';
4
+
5
+ function createLiteralError(message) {
6
+ return new VldError([{ code: 'invalid_literal', path: [], message }]);
7
+ }
8
+ /**
9
+ * Immutable literal validator for exact value matching
10
+ */
11
+ class VldLiteral extends VldBase {
12
+ /**
13
+ * Private constructor to enforce immutability
14
+ */
15
+ constructor(_literal, errorMessage) {
16
+ super(VLD_VALIDATOR_TYPES.LITERAL);
17
+ this._literal = _literal;
18
+ this.errorMessage = errorMessage;
19
+ }
20
+ /**
21
+ * Get the literal value
22
+ */
23
+ get literal() {
24
+ return this._literal;
25
+ }
26
+ get isSimple() {
27
+ return true;
28
+ }
29
+ /**
30
+ * Create a new literal validator
31
+ */
32
+ static create(literal) {
33
+ return new VldLiteral(literal);
34
+ }
35
+ /**
36
+ * Parse and validate a literal value
37
+ */
38
+ parse(value) {
39
+ if (value !== this._literal) {
40
+ throw new Error(this.errorMessage ||
41
+ getMessages().literalExpected(JSON.stringify(this._literal), JSON.stringify(value)));
42
+ }
43
+ return this._literal;
44
+ }
45
+ /**
46
+ * Safely parse and validate a literal value
47
+ */
48
+ safeParse(value) {
49
+ if (value === this._literal) {
50
+ return { success: true, data: this._literal };
51
+ }
52
+ return {
53
+ success: false,
54
+ error: createLiteralError(this.errorMessage ||
55
+ getMessages().literalExpected(JSON.stringify(this._literal), JSON.stringify(value)))
56
+ };
57
+ }
58
+ }
59
+
60
+ export { VldLiteral };
@@ -1,4 +1,4 @@
1
- import { VldBase, ParseResult } from './base';
1
+ import { VldBase, ParseResult } from './base.js';
2
2
  /**
3
3
  * Immutable Map validator
4
4
  */
@@ -10,17 +10,30 @@ export declare class VldMap<K, V> extends VldBase<unknown, Map<K, V>> {
10
10
  * Private constructor to enforce immutability
11
11
  */
12
12
  private constructor();
13
+ private readonly _simpleKeyMode;
14
+ private readonly _simpleValueMode;
15
+ private readonly _simpleKeyValue;
16
+ private readonly _simpleValueValue;
17
+ get keySchema(): VldBase<unknown, K>;
18
+ get valueSchema(): VldBase<unknown, V>;
13
19
  /**
14
20
  * Create a new Map validator
15
21
  */
16
22
  static create<K, V>(keyValidator: VldBase<unknown, K>, valueValidator: VldBase<unknown, V>): VldMap<K, V>;
23
+ private getSimpleItemMode;
24
+ private getSimpleItemError;
25
+ private parseSimpleItem;
17
26
  /**
18
27
  * Parse and validate a Map value
19
28
  */
20
29
  parse(value: unknown): Map<K, V>;
30
+ /**
31
+ * Parse a value that has already passed the Map instance guard.
32
+ * @internal Used by object validators to avoid duplicate hot-path checks.
33
+ */
34
+ parseKnownMap(value: Map<unknown, unknown>): Map<K, V>;
21
35
  /**
22
36
  * Safely parse and validate a Map value
23
37
  */
24
38
  safeParse(value: unknown): ParseResult<Map<K, V>>;
25
39
  }
26
- //# sourceMappingURL=map.d.ts.map