@nullix/zod-mongoose-studio 3.3.1 → 3.3.3

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 (325) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BCIlnd0g.js → 5ZXm4f56.js} +1 -1
  3. package/.output/public/_nuxt/{DcJ7oPvZ.js → B2fcLSyW.js} +1 -1
  4. package/.output/public/_nuxt/{B0N6xv5E.js → BBN7l5Hn.js} +1 -1
  5. package/.output/public/_nuxt/BBTTtb8r.js +41 -0
  6. package/.output/public/_nuxt/{5Tu2WUJz.js → BDbISGvP.js} +1 -1
  7. package/.output/public/_nuxt/{D87QMS6j.js → BijI4RNx.js} +1 -1
  8. package/.output/public/_nuxt/{C2BHp-MG.js → Bp9qkJ9m.js} +1 -1
  9. package/.output/public/_nuxt/{I3Ucam2s.js → Bu3-sqCf.js} +1 -1
  10. package/.output/public/_nuxt/{BO4hqv6q.js → C-FtTvwz.js} +1 -1
  11. package/.output/public/_nuxt/C02JV0Aj.js +1 -0
  12. package/.output/public/_nuxt/{sKEJiAHO.js → C1UkIsDc.js} +1 -1
  13. package/.output/public/_nuxt/{CKULsFUz.js → CJT28r6J.js} +1 -1
  14. package/.output/public/_nuxt/{BNDnV2op.js → CL7qtgl2.js} +3 -3
  15. package/.output/public/_nuxt/{DA0pQuyP.js → CRMd2YH2.js} +3 -3
  16. package/.output/public/_nuxt/{DpKrXpkK.js → CRkdQgFz.js} +1 -1
  17. package/.output/public/_nuxt/{B0cUlOSM.js → Cw1XFOz5.js} +1 -1
  18. package/.output/public/_nuxt/{CzbCpNnc.js → D5yWk6Ly.js} +1 -1
  19. package/.output/public/_nuxt/{BOsJJ_ZU.js → DA9GjKpR.js} +1 -1
  20. package/.output/public/_nuxt/{Dce9SnGa.js → DaWAlZhp.js} +1 -1
  21. package/.output/public/_nuxt/{tqQNlhT9.js → DafLMUHo.js} +1 -1
  22. package/.output/public/_nuxt/{ypRHVLFO.js → Dyaldc-t.js} +1 -1
  23. package/.output/public/_nuxt/{o-NCh2rp.js → UU9fpRNQ.js} +1 -1
  24. package/.output/public/_nuxt/builds/latest.json +1 -1
  25. package/.output/public/_nuxt/builds/meta/717459d8-0da1-42ed-af0b-9ec5395e8fdc.json +1 -0
  26. package/.output/public/_nuxt/entry.CDPplHzk.css +1 -0
  27. package/.output/public/_nuxt/error-404.hPtlUQpd.css +1 -0
  28. package/.output/public/_nuxt/error-500.E-PXUb6B.css +1 -0
  29. package/.output/public/_nuxt/{CMH9iX_E.js → kFZJW2-u.js} +2 -2
  30. package/.output/public/_nuxt/{DsnIpnT9.js → u3DlT5Mh.js} +1 -1
  31. package/.output/server/chunks/_/error-500.mjs.map +1 -1
  32. package/.output/server/chunks/_/parse-request.mjs +29 -0
  33. package/.output/server/chunks/_/parse-request.mjs.map +1 -0
  34. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  35. package/.output/server/chunks/build/{error-404-KRkA0DPI.mjs → error-404-aQ5PiVuX.mjs} +6 -12
  36. package/.output/server/chunks/build/error-404-aQ5PiVuX.mjs.map +1 -0
  37. package/.output/server/chunks/build/error-404-styles.DIZfBVBR.mjs +8 -0
  38. package/.output/server/chunks/build/error-404-styles.DIZfBVBR.mjs.map +1 -0
  39. package/.output/server/chunks/build/{error-500-DIIFf55p.mjs → error-500-BY6ZAZZ2.mjs} +6 -12
  40. package/.output/server/chunks/build/error-500-BY6ZAZZ2.mjs.map +1 -0
  41. package/.output/server/chunks/build/error-500-styles.BZXgEzR5.mjs +8 -0
  42. package/.output/server/chunks/build/error-500-styles.BZXgEzR5.mjs.map +1 -0
  43. package/.output/server/chunks/build/index-57_mtIua.mjs +235 -0
  44. package/.output/server/chunks/build/index-57_mtIua.mjs.map +1 -0
  45. package/.output/server/chunks/build/{index-CB1N4gax.mjs → index-Qa-4KqCB.mjs} +7 -13
  46. package/.output/server/chunks/build/index-Qa-4KqCB.mjs.map +1 -0
  47. package/.output/server/chunks/build/server.mjs +3913 -3378
  48. package/.output/server/chunks/build/server.mjs.map +1 -1
  49. package/.output/server/chunks/build/styles.mjs +4 -4
  50. package/.output/server/chunks/nitro/nitro.mjs +652 -2278
  51. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  52. package/.output/server/chunks/routes/api/editor-types.get.mjs +91 -28
  53. package/.output/server/chunks/routes/api/editor-types.get.mjs.map +1 -1
  54. package/.output/server/chunks/routes/api/parse.post.mjs +1599 -7
  55. package/.output/server/chunks/routes/api/parse.post.mjs.map +1 -1
  56. package/.output/server/chunks/routes/api/resolve.get.mjs +0 -6
  57. package/.output/server/chunks/routes/api/resolve.get.mjs.map +1 -1
  58. package/.output/server/chunks/routes/api/studio/run.post.mjs +50 -12
  59. package/.output/server/chunks/routes/api/studio/run.post.mjs.map +1 -1
  60. package/.output/server/chunks/routes/renderer.mjs +21 -44
  61. package/.output/server/chunks/routes/renderer.mjs.map +1 -1
  62. package/.output/server/index.mjs +1 -7
  63. package/.output/server/index.mjs.map +1 -1
  64. package/.output/server/node_modules/.nitro/@vue/compiler-core@3.5.43/dist/compiler-core.cjs.prod.js +6801 -0
  65. package/.output/server/node_modules/.nitro/@vue/compiler-core@3.5.43/package.json +58 -0
  66. package/.output/server/node_modules/.nitro/@vue/compiler-dom@3.5.43/dist/compiler-dom.cjs.prod.js +692 -0
  67. package/.output/server/node_modules/.nitro/@vue/compiler-dom@3.5.43/package.json +57 -0
  68. package/.output/server/node_modules/.nitro/@vue/reactivity@3.5.43/dist/reactivity.cjs.prod.js +1905 -0
  69. package/.output/server/node_modules/.nitro/@vue/reactivity@3.5.43/package.json +55 -0
  70. package/.output/server/node_modules/.nitro/@vue/runtime-core@3.5.43/dist/runtime-core.cjs.prod.js +7006 -0
  71. package/.output/server/node_modules/.nitro/@vue/runtime-core@3.5.43/package.json +52 -0
  72. package/.output/server/node_modules/.nitro/@vue/runtime-dom@3.5.43/dist/runtime-dom.cjs.prod.js +1867 -0
  73. package/.output/server/node_modules/.nitro/@vue/runtime-dom@3.5.43/package.json +60 -0
  74. package/.output/server/node_modules/.nitro/@vue/shared@3.5.43/dist/shared.cjs.prod.js +655 -0
  75. package/.output/server/node_modules/.nitro/@vue/shared@3.5.43/package.json +47 -0
  76. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/array-set.js +121 -0
  77. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/base64-vlq.js +140 -0
  78. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/base64.js +67 -0
  79. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/binary-search.js +111 -0
  80. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/mapping-list.js +79 -0
  81. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/quick-sort.js +141 -0
  82. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-map-consumer.js +1236 -0
  83. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-map-generator.js +446 -0
  84. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-node.js +420 -0
  85. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/util.js +594 -0
  86. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/package.json +71 -0
  87. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/source-map.js +8 -0
  88. package/.output/server/node_modules/.nitro/vue@3.5.43/dist/vue.cjs.js +80 -0
  89. package/.output/server/node_modules/.nitro/vue@3.5.43/dist/vue.cjs.prod.js +66 -0
  90. package/.output/server/node_modules/.nitro/vue@3.5.43/index.js +7 -0
  91. package/.output/server/node_modules/.nitro/vue@3.5.43/index.mjs +1 -0
  92. package/.output/server/node_modules/.nitro/vue@3.5.43/package.json +112 -0
  93. package/.output/server/node_modules/@babel/parser/lib/index.js +55 -21
  94. package/.output/server/node_modules/@babel/parser/package.json +7 -7
  95. package/.output/server/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  96. package/.output/server/node_modules/@esbuild/linux-x64/package.json +1 -1
  97. package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +19 -16
  98. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +3 -4
  99. package/.output/server/node_modules/@iconify/utils/lib/css/common.js +16 -16
  100. package/.output/server/node_modules/@iconify/utils/lib/css/format.js +1 -2
  101. package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +11 -14
  102. package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +13 -16
  103. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +1 -2
  104. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +1 -3
  105. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +2 -5
  106. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +1 -3
  107. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +4 -5
  108. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +1 -3
  109. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +9 -11
  110. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +1 -2
  111. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +1 -3
  112. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +1 -3
  113. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +12 -18
  114. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +3 -4
  115. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +5 -7
  116. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +1 -8
  117. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +11 -12
  118. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +5 -7
  119. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +1 -3
  120. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +1 -3
  121. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +7 -7
  122. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +2 -4
  123. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +5 -9
  124. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +3 -5
  125. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +2 -4
  126. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +7 -8
  127. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +1 -2
  128. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +1 -3
  129. package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +3 -4
  130. package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +1 -2
  131. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +1 -2
  132. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +10 -15
  133. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +1 -3
  134. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +3 -5
  135. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +1 -3
  136. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +1 -3
  137. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +1 -3
  138. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +1 -2
  139. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +1 -3
  140. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +21 -13
  141. package/.output/server/node_modules/@iconify/utils/lib/index.js +1 -2
  142. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +3 -3
  143. package/.output/server/node_modules/@iconify/utils/lib/loader/hmr-utils.js +33 -0
  144. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +22 -22
  145. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +7 -22
  146. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +60 -16
  147. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +1 -2
  148. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +1 -2
  149. package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +1 -2
  150. package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +9 -11
  151. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +1 -2
  152. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +1 -3
  153. package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +1 -2
  154. package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +1 -2
  155. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +1 -2
  156. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +3 -5
  157. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +5 -4
  158. package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +1 -2
  159. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +1 -2
  160. package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +1 -2
  161. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +2 -3
  162. package/.output/server/node_modules/@iconify/utils/package.json +15 -13
  163. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +8 -1
  164. package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
  165. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +34 -13
  166. package/.output/server/node_modules/@vue/server-renderer/package.json +4 -6
  167. package/.output/server/node_modules/devalue/index.js +15 -2
  168. package/.output/server/node_modules/devalue/package.json +5 -3
  169. package/.output/server/node_modules/devalue/src/base64.js +46 -96
  170. package/.output/server/node_modules/devalue/src/constants.js +5 -0
  171. package/.output/server/node_modules/devalue/src/operations.js +221 -0
  172. package/.output/server/node_modules/devalue/src/parse.js +76 -62
  173. package/.output/server/node_modules/devalue/src/stringify.js +164 -81
  174. package/.output/server/node_modules/devalue/src/uneval.js +312 -104
  175. package/.output/server/node_modules/devalue/src/utils.js +61 -19
  176. package/.output/server/node_modules/esbuild/lib/main.js +12 -8
  177. package/.output/server/node_modules/esbuild/package.json +50 -50
  178. package/.output/server/node_modules/hookable/dist/index.mjs +2 -11
  179. package/.output/server/node_modules/hookable/package.json +23 -22
  180. package/.output/server/node_modules/ip-address/dist/ipv4.js +7 -0
  181. package/.output/server/node_modules/ip-address/package.json +1 -1
  182. package/.output/server/node_modules/zod/package.json +20 -8
  183. package/.output/server/node_modules/zod/v4/classic/checks.js +1 -1
  184. package/.output/server/node_modules/zod/v4/classic/deep-partial.js +13 -0
  185. package/.output/server/node_modules/zod/v4/classic/errors.js +44 -35
  186. package/.output/server/node_modules/zod/v4/classic/external.js +5 -8
  187. package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +375 -78
  188. package/.output/server/node_modules/zod/v4/classic/in-out.js +36 -0
  189. package/.output/server/node_modules/zod/v4/classic/index.js +2 -2
  190. package/.output/server/node_modules/zod/v4/classic/iso.js +2 -17
  191. package/.output/server/node_modules/zod/v4/classic/package.json +2 -1
  192. package/.output/server/node_modules/zod/v4/classic/parse.js +1 -0
  193. package/.output/server/node_modules/zod/v4/classic/schemas.js +601 -223
  194. package/.output/server/node_modules/zod/v4/core/api.js +51 -26
  195. package/.output/server/node_modules/zod/v4/core/checks.js +68 -127
  196. package/.output/server/node_modules/zod/v4/core/compile.js +1858 -0
  197. package/.output/server/node_modules/zod/v4/core/core.js +87 -22
  198. package/.output/server/node_modules/zod/v4/core/doc.js +12 -9
  199. package/.output/server/node_modules/zod/v4/core/errors.js +127 -42
  200. package/.output/server/node_modules/zod/v4/core/index.js +3 -0
  201. package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  202. package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +413 -175
  203. package/.output/server/node_modules/zod/v4/core/memoizer.js +311 -0
  204. package/.output/server/node_modules/zod/v4/core/package.json +2 -1
  205. package/.output/server/node_modules/zod/v4/core/parse.js +130 -48
  206. package/.output/server/node_modules/zod/v4/core/regexes.js +39 -16
  207. package/.output/server/node_modules/zod/v4/core/registries.js +2 -2
  208. package/.output/server/node_modules/zod/v4/core/schemas.js +895 -382
  209. package/.output/server/node_modules/zod/v4/core/to-json-schema.js +253 -39
  210. package/.output/server/node_modules/zod/v4/core/util.js +383 -175
  211. package/.output/server/node_modules/zod/v4/core/versions.js +2 -2
  212. package/.output/server/node_modules/zod/v4/core/visit.js +169 -0
  213. package/.output/server/node_modules/zod/v4/index.js +3 -2
  214. package/.output/server/node_modules/zod/v4/locales/ar.js +5 -0
  215. package/.output/server/node_modules/zod/v4/locales/az.js +5 -0
  216. package/.output/server/node_modules/zod/v4/locales/be.js +12 -0
  217. package/.output/server/node_modules/zod/v4/locales/bg.js +5 -0
  218. package/.output/server/node_modules/zod/v4/locales/bn.js +113 -0
  219. package/.output/server/node_modules/zod/v4/locales/ca.js +5 -0
  220. package/.output/server/node_modules/zod/v4/locales/ckb.js +133 -0
  221. package/.output/server/node_modules/zod/v4/locales/cs.js +5 -0
  222. package/.output/server/node_modules/zod/v4/locales/da.js +7 -2
  223. package/.output/server/node_modules/zod/v4/locales/de.js +5 -0
  224. package/.output/server/node_modules/zod/v4/locales/el.js +112 -0
  225. package/.output/server/node_modules/zod/v4/locales/en.js +20 -4
  226. package/.output/server/node_modules/zod/v4/locales/eo.js +5 -0
  227. package/.output/server/node_modules/zod/v4/locales/es.js +4 -0
  228. package/.output/server/node_modules/zod/v4/locales/fa.js +5 -0
  229. package/.output/server/node_modules/zod/v4/locales/fi.js +5 -0
  230. package/.output/server/node_modules/zod/v4/locales/fr-CA.js +5 -0
  231. package/.output/server/node_modules/zod/v4/locales/fr.js +38 -17
  232. package/.output/server/node_modules/zod/v4/locales/gu.js +113 -0
  233. package/.output/server/node_modules/zod/v4/locales/he.js +7 -0
  234. package/.output/server/node_modules/zod/v4/locales/hi.js +111 -0
  235. package/.output/server/node_modules/zod/v4/locales/hr.js +126 -0
  236. package/.output/server/node_modules/zod/v4/locales/hu.js +5 -0
  237. package/.output/server/node_modules/zod/v4/locales/hy.js +11 -0
  238. package/.output/server/node_modules/zod/v4/locales/id.js +5 -0
  239. package/.output/server/node_modules/zod/v4/locales/index.js +14 -0
  240. package/.output/server/node_modules/zod/v4/locales/is.js +5 -0
  241. package/.output/server/node_modules/zod/v4/locales/it.js +6 -1
  242. package/.output/server/node_modules/zod/v4/locales/ja.js +5 -0
  243. package/.output/server/node_modules/zod/v4/locales/ka.js +13 -8
  244. package/.output/server/node_modules/zod/v4/locales/km.js +5 -0
  245. package/.output/server/node_modules/zod/v4/locales/kn.js +116 -0
  246. package/.output/server/node_modules/zod/v4/locales/ko.js +5 -0
  247. package/.output/server/node_modules/zod/v4/locales/lt.js +4 -0
  248. package/.output/server/node_modules/zod/v4/locales/mk.js +5 -0
  249. package/.output/server/node_modules/zod/v4/locales/ms.js +5 -0
  250. package/.output/server/node_modules/zod/v4/locales/ne.js +111 -0
  251. package/.output/server/node_modules/zod/v4/locales/nl.js +5 -0
  252. package/.output/server/node_modules/zod/v4/locales/nn.js +113 -0
  253. package/.output/server/node_modules/zod/v4/locales/no.js +7 -2
  254. package/.output/server/node_modules/zod/v4/locales/ota.js +5 -0
  255. package/.output/server/node_modules/zod/v4/locales/package.json +2 -1
  256. package/.output/server/node_modules/zod/v4/locales/pl.js +5 -0
  257. package/.output/server/node_modules/zod/v4/locales/ps.js +5 -0
  258. package/.output/server/node_modules/zod/v4/locales/pt-BR.js +143 -0
  259. package/.output/server/node_modules/zod/v4/locales/pt.js +89 -55
  260. package/.output/server/node_modules/zod/v4/locales/ro.js +122 -0
  261. package/.output/server/node_modules/zod/v4/locales/ru.js +12 -0
  262. package/.output/server/node_modules/zod/v4/locales/sk.js +116 -0
  263. package/.output/server/node_modules/zod/v4/locales/sl.js +5 -0
  264. package/.output/server/node_modules/zod/v4/locales/sv.js +7 -2
  265. package/.output/server/node_modules/zod/v4/locales/ta.js +5 -0
  266. package/.output/server/node_modules/zod/v4/locales/tg.js +117 -0
  267. package/.output/server/node_modules/zod/v4/locales/th.js +5 -0
  268. package/.output/server/node_modules/zod/v4/locales/tk.js +107 -0
  269. package/.output/server/node_modules/zod/v4/locales/tr.js +5 -0
  270. package/.output/server/node_modules/zod/v4/locales/uk.js +5 -0
  271. package/.output/server/node_modules/zod/v4/locales/ur.js +5 -0
  272. package/.output/server/node_modules/zod/v4/locales/uz.js +4 -0
  273. package/.output/server/node_modules/zod/v4/locales/vi.js +5 -0
  274. package/.output/server/node_modules/zod/v4/locales/yo.js +5 -0
  275. package/.output/server/node_modules/zod/v4/locales/zh-CN.js +5 -0
  276. package/.output/server/node_modules/zod/v4/locales/zh-TW.js +5 -0
  277. package/.output/server/node_modules/zod/v4/package.json +2 -1
  278. package/.output/server/package.json +18 -18
  279. package/README.md +12 -1
  280. package/package.json +10 -9
  281. package/server/api/editor-types.get.ts +2 -23
  282. package/server/api/studio/run.post.ts +18 -6
  283. package/server/utils/editor-types.json +1 -0
  284. package/.output/public/_nuxt/B9paGgN0.js +0 -33
  285. package/.output/public/_nuxt/builds/meta/51f1351c-0667-4235-9ddc-16582a51ce03.json +0 -1
  286. package/.output/public/_nuxt/entry.B-vs1tRH.css +0 -1
  287. package/.output/public/_nuxt/error-404.CTSXlFYa.css +0 -1
  288. package/.output/public/_nuxt/error-500.DqEfQnVZ.css +0 -1
  289. package/.output/server/chunks/build/error-404-KRkA0DPI.mjs.map +0 -1
  290. package/.output/server/chunks/build/error-404-styles.I0NYw-Bn.mjs +0 -8
  291. package/.output/server/chunks/build/error-404-styles.I0NYw-Bn.mjs.map +0 -1
  292. package/.output/server/chunks/build/error-500-DIIFf55p.mjs.map +0 -1
  293. package/.output/server/chunks/build/error-500-styles.D1cs9hQy.mjs +0 -8
  294. package/.output/server/chunks/build/error-500-styles.D1cs9hQy.mjs.map +0 -1
  295. package/.output/server/chunks/build/index-CB1N4gax.mjs.map +0 -1
  296. /package/.output/server/node_modules/{@vue/compiler-core → .nitro/@vue/compiler-core@3.5.32}/dist/compiler-core.cjs.prod.js +0 -0
  297. /package/.output/server/node_modules/{@vue/compiler-core → .nitro/@vue/compiler-core@3.5.32}/package.json +0 -0
  298. /package/.output/server/node_modules/{@vue/compiler-dom → .nitro/@vue/compiler-dom@3.5.32}/dist/compiler-dom.cjs.prod.js +0 -0
  299. /package/.output/server/node_modules/{@vue/compiler-dom → .nitro/@vue/compiler-dom@3.5.32}/package.json +0 -0
  300. /package/.output/server/node_modules/{@vue/reactivity → .nitro/@vue/reactivity@3.5.32}/dist/reactivity.cjs.prod.js +0 -0
  301. /package/.output/server/node_modules/{@vue/reactivity → .nitro/@vue/reactivity@3.5.32}/package.json +0 -0
  302. /package/.output/server/node_modules/{@vue/runtime-core → .nitro/@vue/runtime-core@3.5.32}/dist/runtime-core.cjs.prod.js +0 -0
  303. /package/.output/server/node_modules/{@vue/runtime-core → .nitro/@vue/runtime-core@3.5.32}/package.json +0 -0
  304. /package/.output/server/node_modules/{@vue/runtime-dom → .nitro/@vue/runtime-dom@3.5.32}/dist/runtime-dom.cjs.prod.js +0 -0
  305. /package/.output/server/node_modules/{@vue/runtime-dom → .nitro/@vue/runtime-dom@3.5.32}/package.json +0 -0
  306. /package/.output/server/node_modules/{@vue/shared → .nitro/@vue/shared@3.5.32}/dist/shared.cjs.prod.js +0 -0
  307. /package/.output/server/node_modules/{@vue/shared → .nitro/@vue/shared@3.5.32}/package.json +0 -0
  308. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/array-set.js +0 -0
  309. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/base64-vlq.js +0 -0
  310. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/base64.js +0 -0
  311. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/binary-search.js +0 -0
  312. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/mapping-list.js +0 -0
  313. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/quick-sort.js +0 -0
  314. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-map-consumer.js +0 -0
  315. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-map-generator.js +0 -0
  316. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-node.js +0 -0
  317. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/util.js +0 -0
  318. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/package.json +0 -0
  319. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/source-map.js +0 -0
  320. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/dist/vue.cjs.js +0 -0
  321. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/dist/vue.cjs.prod.js +0 -0
  322. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/index.js +0 -0
  323. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/index.mjs +0 -0
  324. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/package.json +0 -0
  325. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.43}/server-renderer/index.mjs +0 -0
@@ -1,4 +1,15 @@
1
1
  import { globalRegistry } from "./registries.js";
2
+ import { assignProp } from "./util.js";
3
+ function assignProps(target, ...sources) {
4
+ for (const source of sources) {
5
+ for (const key of Reflect.ownKeys(source)) {
6
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) {
7
+ assignProp(target, key, source[key]);
8
+ }
9
+ }
10
+ }
11
+ return target;
12
+ }
2
13
  // function initializeContext<T extends schemas.$ZodType>(inputs: JSONSchemaGeneratorParams<T>): ToJSONSchemaContext<T> {
3
14
  // return {
4
15
  // processor: inputs.processor,
@@ -23,12 +34,33 @@ export function initializeContext(params) {
23
34
  io: params?.io ?? "output",
24
35
  counter: 0,
25
36
  seen: new Map(),
37
+ sharedDefsExtractedFor: undefined,
38
+ sharedEmitDoneFor: undefined,
26
39
  cycles: params?.cycles ?? "ref",
27
40
  reused: params?.reused ?? "inline",
41
+ intersections: [],
42
+ deferred: [],
28
43
  external: params?.external ?? undefined,
29
44
  };
30
45
  }
31
- export function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
46
+ /**
47
+ * Applies the `unrepresentable` setting at a site that has no JSON Schema equivalent. Throws
48
+ * `message` unless the setting (or the handler's return value) says otherwise. Returns `true` if a
49
+ * custom JSON Schema was written into `json`, in which case the caller must not write its own.
50
+ */
51
+ export function handleUnrepresentable(schema, ctx, json, params, message) {
52
+ const result = typeof ctx.unrepresentable === "function"
53
+ ? ctx.unrepresentable({ zodSchema: schema, path: params.path, message })
54
+ : ctx.unrepresentable;
55
+ if (result === "any")
56
+ return false;
57
+ if (result === undefined || result === "throw")
58
+ throw new Error(message);
59
+ Object.assign(json, result);
60
+ return true;
61
+ }
62
+ // never rename this back to `process`: bundler polyfills inject a top-level `const process` that a lexical declaration of the same name collides with (#6397)
63
+ export function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
32
64
  var _a;
33
65
  const def = schema._zod.def;
34
66
  // check for schema in seens
@@ -45,6 +77,8 @@ export function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
45
77
  // initialize
46
78
  const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };
47
79
  ctx.seen.set(schema, result);
80
+ ctx.sharedDefsExtractedFor = undefined;
81
+ ctx.sharedEmitDoneFor = undefined;
48
82
  // custom method overrides default behavior
49
83
  const overrideSchema = schema._zod.toJSONSchema?.();
50
84
  if (overrideSchema) {
@@ -72,27 +106,33 @@ export function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
72
106
  // Also set ref if processor didn't (for inheritance)
73
107
  if (!result.ref)
74
108
  result.ref = parent;
75
- process(parent, ctx, params);
109
+ processSchema(parent, ctx, params);
76
110
  ctx.seen.get(parent).isParent = true;
77
111
  }
78
112
  }
79
113
  // metadata
80
114
  const meta = ctx.metadataRegistry.get(schema);
81
115
  if (meta)
82
- Object.assign(result.schema, meta);
116
+ assignProps(result.schema, meta);
83
117
  if (ctx.io === "input" && isTransforming(schema)) {
84
118
  // examples/defaults only apply to output type of pipe
85
119
  delete result.schema.examples;
86
120
  delete result.schema.default;
87
121
  }
88
122
  // set prefault as default
89
- if (ctx.io === "input" && result.schema._prefault)
123
+ if (ctx.io === "input" && "_prefault" in result.schema)
90
124
  (_a = result.schema).default ?? (_a.default = result.schema._prefault);
91
125
  delete result.schema._prefault;
92
126
  // pulling fresh from ctx.seen in case it was overwritten
93
127
  const _result = ctx.seen.get(schema);
94
128
  return _result.schema;
95
129
  }
130
+ /** @deprecated Renamed to `processSchema`. An export alias declares no binding, so it is safe to keep. */
131
+ export { processSchema as process };
132
+ // Escape a reference token for use in a JSON Pointer fragment (RFC 6901): `~` becomes `~0` and `/` becomes `~1`. The `~` replacement must run first.
133
+ function encodeJSONPointerSegment(segment) {
134
+ return segment.replace(/~/g, "~0").replace(/\//g, "~1");
135
+ }
96
136
  export function extractDefs(ctx, schema
97
137
  // params: EmitParams
98
138
  ) {
@@ -100,6 +140,9 @@ export function extractDefs(ctx, schema
100
140
  const root = ctx.seen.get(schema);
101
141
  if (!root)
102
142
  throw new Error("Unprocessed schema. This is a bug in Zod.");
143
+ // With `external` set, every registered schema resolves through the external branch of `makeURI`, so the root branch below produces the same ref the external branch would — this pass is identical whichever schema it is called with, and only needs to run once.
144
+ if (ctx.external && ctx.sharedDefsExtractedFor === ctx.external)
145
+ return;
103
146
  // Track ids to detect duplicates across different schemas
104
147
  const idToSchema = new Map();
105
148
  for (const entry of ctx.seen.entries()) {
@@ -112,12 +155,9 @@ export function extractDefs(ctx, schema
112
155
  idToSchema.set(id, entry[0]);
113
156
  }
114
157
  }
115
- // returns a ref to the schema
116
- // defId will be empty if the ref points to an external schema (or #)
158
+ // returns a ref to the schema defId will be empty if the ref points to an external schema (or #)
117
159
  const makeURI = (entry) => {
118
- // comparing the seen objects because sometimes
119
- // multiple schemas map to the same seen object.
120
- // e.g. lazy
160
+ // comparing the seen objects because sometimes multiple schemas map to the same seen object. e.g. lazy
121
161
  // external is configured
122
162
  const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
123
163
  if (ctx.external) {
@@ -130,19 +170,19 @@ export function extractDefs(ctx, schema
130
170
  // otherwise, add to __shared
131
171
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
132
172
  entry[1].defId = id; // set defId so it will be reused if needed
133
- return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
134
- }
135
- if (entry[1] === root) {
136
- return { ref: "#" };
173
+ return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${encodeJSONPointerSegment(id)}` };
137
174
  }
138
- // self-contained schema
139
175
  const uriPrefix = `#`;
140
176
  const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
177
+ // an id-less root has nowhere to be extracted to, so it stays inline and self-references as `#`
178
+ if (entry[1] === root && !entry[1].schema.id) {
179
+ return { ref: uriPrefix };
180
+ }
181
+ // self-contained schema
141
182
  const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
142
- return { defId, ref: defUriPrefix + defId };
183
+ return { defId, ref: defUriPrefix + encodeJSONPointerSegment(defId) };
143
184
  };
144
- // stored cached version in `def` property
145
- // remove all properties, set $ref
185
+ // stored cached version in `def` property remove all properties, set $ref
146
186
  const extractToDef = (entry) => {
147
187
  // if the schema is already a reference, do not extract it
148
188
  if (entry[1].schema.$ref) {
@@ -151,8 +191,7 @@ export function extractDefs(ctx, schema
151
191
  const seen = entry[1];
152
192
  const { ref, defId } = makeURI(entry);
153
193
  seen.def = { ...seen.schema };
154
- // defId won't be set if the schema is a reference to an external schema
155
- // or if the schema is the root schema
194
+ // defId won't be set if the schema is a reference to an external schema or if the schema is the root schema
156
195
  if (defId)
157
196
  seen.defId = defId;
158
197
  // wipe away all properties except $ref
@@ -206,11 +245,146 @@ export function extractDefs(ctx, schema
206
245
  if (seen.count > 1) {
207
246
  if (ctx.reused === "ref") {
208
247
  extractToDef(entry);
209
- // biome-ignore lint:
248
+ }
249
+ }
250
+ }
251
+ if (ctx.external)
252
+ ctx.sharedDefsExtractedFor = ctx.external;
253
+ }
254
+ /** Rewrites `anyOf: [{type: "a"}, {type: "b"}]` to `type: ["a", "b"]`, which every JSON Schema draft treats as equivalent and most consumers render far better for the nullable case. Only branches that are a bare type assertion qualify — anything carrying a constraint, `$ref`, `const` or metadata is left alone. Runs after `flattenRef`, so a branch an override decorated or `$defs` extraction turned into a `$ref` is no longer bare and correctly stays in `anyOf`. `oneOf` is excluded: `integer` and `number` overlap, so "exactly one" and "at least one" are not the same there. OpenAPI 3.0 is excluded: its `type` must be a single string. */
255
+ function compactTypeUnion(schema) {
256
+ const options = schema.anyOf;
257
+ if (!Array.isArray(options) || options.length === 0 || schema.type !== undefined)
258
+ return;
259
+ const types = [];
260
+ for (const option of options) {
261
+ if (!option || typeof option !== "object")
262
+ return;
263
+ // A branch that is itself a compactible union folds into this one — nested `anyOf` and a flat `type` array say the same thing. Compacting it first also makes the result independent of the order this pass walks the seen map in.
264
+ compactTypeUnion(option);
265
+ const keys = Object.keys(option);
266
+ if (keys.length !== 1 || keys[0] !== "type")
267
+ return;
268
+ const type = option.type;
269
+ for (const member of Array.isArray(type) ? type : [type]) {
270
+ if (typeof member !== "string")
271
+ return;
272
+ if (!types.includes(member))
273
+ types.push(member);
274
+ }
275
+ }
276
+ delete schema.anyOf;
277
+ // A `type` array must be non-empty and unique (metaschema); a single member is spelled as a bare string.
278
+ schema.type = types.length === 1 ? types[0] : types;
279
+ }
280
+ /** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,
281
+ * an annotation like `description` — makes a member unfoldable, so a constraint this does not
282
+ * understand leaves the `allOf` alone instead of being silently dropped or misattributed. */
283
+ const FOLDABLE_KEYS = new Set(["type", "properties", "required", "additionalProperties"]);
284
+ const UNION_KEYS = ["oneOf", "anyOf"];
285
+ /** A member's constraint on a key it does not declare itself. A `catchall` states one; `false`, an absent `additionalProperties`, and the empty schema a loose object emits state nothing. */
286
+ function undeclaredConstraint(member) {
287
+ const extra = member.additionalProperties;
288
+ if (extra === undefined || extra === false || typeof extra !== "object" || extra === null)
289
+ return null;
290
+ return Object.keys(extra).length ? extra : null;
291
+ }
292
+ /** Combines object members into the single object they describe together, or returns `null` if any of them carries a keyword outside {@link FOLDABLE_KEYS}. */
293
+ function foldObjects(members) {
294
+ const objects = [];
295
+ for (const member of members) {
296
+ // A boolean subschema is legal JSON Schema and carries no keywords to fold.
297
+ if (typeof member !== "object" || member.type !== "object")
298
+ return null;
299
+ for (const key in member) {
300
+ if (!FOLDABLE_KEYS.has(key))
301
+ return null;
302
+ }
303
+ objects.push(member);
304
+ }
305
+ const properties = {};
306
+ const required = new Set();
307
+ for (const object of objects) {
308
+ for (const key in object.properties) {
309
+ // `in` would report a `__proto__` key as already present via the prototype chain and skip it.
310
+ if (Object.prototype.hasOwnProperty.call(properties, key))
210
311
  continue;
312
+ // Every member constrains this key: the ones that declare it say how, and a `catchall` member constrains it too even though it does not name it. The key has to satisfy all of them, which is the same intersection one level down.
313
+ const parts = [];
314
+ for (const other of objects) {
315
+ const part = other.properties?.[key] ?? undeclaredConstraint(other);
316
+ if (part === null || part === undefined)
317
+ continue;
318
+ if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part)))
319
+ parts.push(part);
211
320
  }
321
+ const merged = parts.length === 1
322
+ ? parts[0]
323
+ : (foldObjects(parts) ?? { allOf: parts });
324
+ assignProp(properties, key, merged);
212
325
  }
326
+ for (const key of object.required ?? [])
327
+ required.add(key);
213
328
  }
329
+ const folded = { type: "object", properties };
330
+ if (required.size)
331
+ folded.required = [...required];
332
+ // A key no member declares is rejected only when every member rejects it, so the fold is closed only when every member is. Otherwise it carries whatever the `catchall` members demand of such a key.
333
+ if (objects.every((object) => object.additionalProperties === false)) {
334
+ folded.additionalProperties = false;
335
+ }
336
+ else {
337
+ const constraints = [];
338
+ for (const object of objects) {
339
+ const constraint = undeclaredConstraint(object);
340
+ if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint)))
341
+ constraints.push(constraint);
342
+ }
343
+ if (constraints.length === 1)
344
+ folded.additionalProperties = constraints[0];
345
+ else if (constraints.length > 1)
346
+ folded.additionalProperties = { allOf: constraints };
347
+ }
348
+ return folded;
349
+ }
350
+ /** `additionalProperties` in an `allOf` member sees only that member's own `properties`, so two
351
+ * closed object members reject each other's keys and the schema validates nothing. Zod's parser
352
+ * pools the key sets instead — `handleIntersectionResults` reports a key as unrecognized only when
353
+ * *every* side rejects it — so the emitted schema has to pool them too, and folding the members
354
+ * into one object is the encoding that says so on every target.
355
+ *
356
+ * This runs from `finalize`, after `extractDefs`, which is what keeps it clear of the `$ref`
357
+ * machinery: a member extracted into `$defs` is already a `$ref` by now and declines to fold, so it
358
+ * keeps its reference and its own closedness rather than being inlined as a stale copy. */
359
+ function foldIntersection(json) {
360
+ const allOf = json.allOf;
361
+ if (!Array.isArray(allOf) || allOf.length < 2)
362
+ return;
363
+ // An `override` runs before this pass and may have written object keywords onto the intersection itself. Those are deliberate, so decline rather than overwrite them.
364
+ for (const key of FOLDABLE_KEYS)
365
+ if (key in json)
366
+ return;
367
+ // An intersection distributes over a union: `A & (X | Y)` is `(A & X) | (A & Y)`. Only the first union is distributed over; a second one stays among the members every branch folds against, where it fails the object check and declines the whole intersection rather than multiplying out.
368
+ const unions = allOf.filter((m) => UNION_KEYS.some((k) => Array.isArray(m[k])));
369
+ let folded = null;
370
+ if (!unions.length) {
371
+ folded = foldObjects(allOf);
372
+ }
373
+ else {
374
+ const union = unions[0];
375
+ const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));
376
+ if (Object.keys(union).length !== 1)
377
+ return;
378
+ const rest = allOf.filter((m) => m !== union);
379
+ const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));
380
+ if (branches.some((b) => !b))
381
+ return;
382
+ folded = { [keyword]: branches };
383
+ }
384
+ if (!folded)
385
+ return;
386
+ delete json.allOf;
387
+ assignProps(json, folded);
214
388
  }
215
389
  export function finalize(ctx, schema) {
216
390
  const root = ctx.seen.get(schema);
@@ -237,10 +411,10 @@ export function finalize(ctx, schema) {
237
411
  schema.allOf.push(refSchema);
238
412
  }
239
413
  else {
240
- Object.assign(schema, refSchema);
414
+ assignProps(schema, refSchema);
241
415
  }
242
416
  // restore child's own properties (child wins)
243
- Object.assign(schema, _cached);
417
+ assignProps(schema, _cached);
244
418
  const isParentRef = zodSchema._zod.parent === ref;
245
419
  // For parent chain, child is a refinement - remove parent-only properties
246
420
  if (isParentRef) {
@@ -263,9 +437,7 @@ export function finalize(ctx, schema) {
263
437
  }
264
438
  }
265
439
  }
266
- // If parent was extracted (has $ref), propagate $ref to this schema
267
- // This handles cases like: readonly().meta({id}).describe()
268
- // where processor sets ref to innerType but parent should be referenced
440
+ // If parent was extracted (has $ref), propagate $ref to this schema. This handles cases like: readonly().meta({id}).describe() where processor sets ref to innerType but parent should be referenced
269
441
  const parent = zodSchema._zod.parent;
270
442
  if (parent && parent !== ref) {
271
443
  // Ensure parent is processed first so its def has inherited properties
@@ -292,8 +464,38 @@ export function finalize(ctx, schema) {
292
464
  path: seen.path ?? [],
293
465
  });
294
466
  };
295
- for (const entry of [...ctx.seen.entries()].reverse()) {
296
- flattenRef(entry[0]);
467
+ // Flattening walks the whole map and clears each `ref` as it goes, so a second call over the same map is a no-op scan. Skip it outright once it has run for a registry conversion.
468
+ if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {
469
+ for (const entry of [...ctx.seen.entries()].reverse()) {
470
+ flattenRef(entry[0]);
471
+ }
472
+ if (ctx.target !== "openapi-3.0") {
473
+ for (const entry of ctx.seen.entries()) {
474
+ compactTypeUnion(entry[1].def ?? entry[1].schema);
475
+ }
476
+ }
477
+ for (const rewrite of ctx.deferred)
478
+ rewrite();
479
+ // After flattening, every member that was extracted is a `$ref`, so the fold sees the final shape. A schema that inherits an intersection — through `z.lazy`, or any `ref` chain — holds the same `allOf` array, so fold by array identity to catch every copy.
480
+ if (ctx.intersections.length) {
481
+ const carriers = new Map();
482
+ for (const seen of ctx.seen.values()) {
483
+ for (const json of [seen.schema, seen.def]) {
484
+ const allOf = json?.allOf;
485
+ if (!Array.isArray(allOf))
486
+ continue;
487
+ const existing = carriers.get(allOf);
488
+ if (existing)
489
+ existing.push(json);
490
+ else
491
+ carriers.set(allOf, [json]);
492
+ }
493
+ }
494
+ for (const allOf of ctx.intersections) {
495
+ for (const json of carriers.get(allOf) ?? [])
496
+ foldIntersection(json);
497
+ }
498
+ }
297
499
  }
298
500
  const result = {};
299
501
  if (ctx.target === "draft-2020-12") {
@@ -317,15 +519,26 @@ export function finalize(ctx, schema) {
317
519
  throw new Error("Schema is missing an `id` property");
318
520
  result.$id = ctx.external.uri(id);
319
521
  }
320
- Object.assign(result, root.def ?? root.schema);
321
- // build defs object
522
+ // when the root was extracted into $defs, `root.schema` is the `$ref` wrapper and `root.def` is the body that now lives under $defs
523
+ assignProps(result, root.defId ? root.schema : (root.def ?? root.schema));
524
+ // The `id` in `.meta()` is a Zod-specific registration tag used to extract schemas into $defs — it is not user-facing JSON Schema metadata. Strip it from the output body where it would otherwise leak. The id is preserved implicitly via the $defs key (and via $ref paths).
525
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
526
+ if (rootMetaId !== undefined && result.id === rootMetaId)
527
+ delete result.id;
528
+ // build defs object. With `external`, `defs` is the shared object every schema writes into, so the same entries are reassigned on every call. Without it, `defs` is fresh per call and must be rebuilt.
322
529
  const defs = ctx.external?.defs ?? {};
323
- for (const entry of ctx.seen.entries()) {
324
- const seen = entry[1];
325
- if (seen.def && seen.defId) {
326
- defs[seen.defId] = seen.def;
530
+ if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {
531
+ for (const entry of ctx.seen.entries()) {
532
+ const seen = entry[1];
533
+ if (seen.def && seen.defId) {
534
+ if (seen.def.id === seen.defId)
535
+ delete seen.def.id;
536
+ assignProp(defs, seen.defId, seen.def);
537
+ }
327
538
  }
328
539
  }
540
+ if (ctx.external)
541
+ ctx.sharedEmitDoneFor = ctx.external;
329
542
  // set definitions in result
330
543
  if (ctx.external) {
331
544
  }
@@ -340,9 +553,7 @@ export function finalize(ctx, schema) {
340
553
  }
341
554
  }
342
555
  try {
343
- // this "finalizes" this schema and ensures all cycles are removed
344
- // each call to finalize() is functionally independent
345
- // though the seen map is shared
556
+ // this "finalizes" this schema and ensures all cycles are removed each call to finalize() is functionally independent though the seen map is shared
346
557
  const finalized = JSON.parse(JSON.stringify(result));
347
558
  Object.defineProperty(finalized, "~standard", {
348
559
  value: {
@@ -381,7 +592,8 @@ function isTransforming(_schema, _ctx) {
381
592
  def.type === "nullable" ||
382
593
  def.type === "readonly" ||
383
594
  def.type === "default" ||
384
- def.type === "prefault") {
595
+ def.type === "prefault" ||
596
+ def.type === "catch") {
385
597
  return isTransforming(def.innerType, ctx);
386
598
  }
387
599
  if (def.type === "intersection") {
@@ -391,6 +603,8 @@ function isTransforming(_schema, _ctx) {
391
603
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
392
604
  }
393
605
  if (def.type === "pipe") {
606
+ if (_schema._zod.traits.has("$ZodCodec"))
607
+ return true;
394
608
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
395
609
  }
396
610
  if (def.type === "object") {
@@ -424,14 +638,14 @@ function isTransforming(_schema, _ctx) {
424
638
  */
425
639
  export const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
426
640
  const ctx = initializeContext({ ...params, processors });
427
- process(schema, ctx);
641
+ processSchema(schema, ctx);
428
642
  extractDefs(ctx, schema);
429
643
  return finalize(ctx, schema);
430
644
  };
431
645
  export const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
432
646
  const { libraryOptions, target } = params ?? {};
433
647
  const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });
434
- process(schema, ctx);
648
+ processSchema(schema, ctx);
435
649
  extractDefs(ctx, schema);
436
650
  return finalize(ctx, schema);
437
651
  };