@es-joy/jsoe 0.24.2 → 0.25.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 (525) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/.ncurc.cjs +2 -2
  3. package/CHANGES.md +51 -0
  4. package/README.md +23 -13
  5. package/badges/coverage-badge.svg +1 -1
  6. package/dist/eslint.config.d.ts +3 -0
  7. package/dist/eslint.config.d.ts.map +1 -0
  8. package/dist/formatAndTypeChoices.d.ts +28 -30
  9. package/dist/formatAndTypeChoices.d.ts.map +1 -1
  10. package/dist/formats/indexedDBKey.d.ts.map +1 -1
  11. package/dist/formats/schema.d.ts +46 -3
  12. package/dist/formats/schema.d.ts.map +1 -1
  13. package/dist/formats/structuredCloning.d.ts +3 -0
  14. package/dist/formats/structuredCloning.d.ts.map +1 -1
  15. package/dist/formats.d.ts +24 -6
  16. package/dist/formats.d.ts.map +1 -1
  17. package/dist/fundamentalTypes/BooleanObjectType.d.ts.map +1 -1
  18. package/dist/fundamentalTypes/NumberObjectType.d.ts.map +1 -1
  19. package/dist/fundamentalTypes/StringObjectType.d.ts.map +1 -1
  20. package/dist/fundamentalTypes/arrayReferenceType.d.ts.map +1 -1
  21. package/dist/fundamentalTypes/arrayType.d.ts +7 -0
  22. package/dist/fundamentalTypes/arrayType.d.ts.map +1 -1
  23. package/dist/fundamentalTypes/bigintObjectType.d.ts.map +1 -1
  24. package/dist/fundamentalTypes/bigintType.d.ts +10 -0
  25. package/dist/fundamentalTypes/bigintType.d.ts.map +1 -1
  26. package/dist/fundamentalTypes/blobType.d.ts.map +1 -1
  27. package/dist/fundamentalTypes/booleanType.d.ts.map +1 -1
  28. package/dist/fundamentalTypes/catchType.d.ts +2 -2
  29. package/dist/fundamentalTypes/catchType.d.ts.map +1 -1
  30. package/dist/fundamentalTypes/dateType.d.ts.map +1 -1
  31. package/dist/fundamentalTypes/domexceptionType.d.ts.map +1 -1
  32. package/dist/fundamentalTypes/enumType.d.ts +2 -2
  33. package/dist/fundamentalTypes/enumType.d.ts.map +1 -1
  34. package/dist/fundamentalTypes/errorType.d.ts.map +1 -1
  35. package/dist/fundamentalTypes/fileType.d.ts +6 -0
  36. package/dist/fundamentalTypes/fileType.d.ts.map +1 -1
  37. package/dist/fundamentalTypes/functionType.d.ts.map +1 -1
  38. package/dist/fundamentalTypes/literalType.d.ts +3 -2
  39. package/dist/fundamentalTypes/literalType.d.ts.map +1 -1
  40. package/dist/fundamentalTypes/looseRecordType.d.ts +6 -0
  41. package/dist/fundamentalTypes/looseRecordType.d.ts.map +1 -0
  42. package/dist/fundamentalTypes/nanType.d.ts.map +1 -1
  43. package/dist/fundamentalTypes/neverType.d.ts +2 -2
  44. package/dist/fundamentalTypes/neverType.d.ts.map +1 -1
  45. package/dist/fundamentalTypes/noneditableType.d.ts.map +1 -1
  46. package/dist/fundamentalTypes/nullType.d.ts.map +1 -1
  47. package/dist/fundamentalTypes/numberType.d.ts.map +1 -1
  48. package/dist/fundamentalTypes/promiseType.d.ts.map +1 -1
  49. package/dist/fundamentalTypes/regexpType.d.ts.map +1 -1
  50. package/dist/fundamentalTypes/stringType.d.ts.map +1 -1
  51. package/dist/fundamentalTypes/symbolType.d.ts.map +1 -1
  52. package/dist/fundamentalTypes/undefinedType.d.ts.map +1 -1
  53. package/dist/fundamentalTypes/voidType.d.ts +2 -2
  54. package/dist/fundamentalTypes/voidType.d.ts.map +1 -1
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +6 -1
  57. package/dist/index.js.map +1 -1
  58. package/dist/rollup.config.d.ts +30 -0
  59. package/dist/rollup.config.d.ts.map +1 -0
  60. package/dist/server.d.ts +2 -0
  61. package/dist/server.d.ts.map +1 -0
  62. package/dist/src/formatAndTypeChoices.d.ts +108 -0
  63. package/dist/src/formatAndTypeChoices.d.ts.map +1 -0
  64. package/dist/src/formats/arbitraryJS.d.ts +4 -0
  65. package/dist/src/formats/arbitraryJS.d.ts.map +1 -0
  66. package/dist/src/formats/indexedDBKey.d.ts +4 -0
  67. package/dist/src/formats/indexedDBKey.d.ts.map +1 -0
  68. package/dist/src/formats/json.d.ts +4 -0
  69. package/dist/src/formats/json.d.ts.map +1 -0
  70. package/dist/src/formats/schema.d.ts +17 -0
  71. package/dist/src/formats/schema.d.ts.map +1 -0
  72. package/dist/src/formats/structuredCloning.d.ts +19 -0
  73. package/dist/src/formats/structuredCloning.d.ts.map +1 -0
  74. package/dist/src/formats.d.ts +135 -0
  75. package/dist/src/formats.d.ts.map +1 -0
  76. package/dist/src/fundamentalTypes/BooleanObjectType.d.ts +8 -0
  77. package/dist/src/fundamentalTypes/BooleanObjectType.d.ts.map +1 -0
  78. package/dist/src/fundamentalTypes/NumberObjectType.d.ts +6 -0
  79. package/dist/src/fundamentalTypes/NumberObjectType.d.ts.map +1 -0
  80. package/dist/src/fundamentalTypes/StringObjectType.d.ts +6 -0
  81. package/dist/src/fundamentalTypes/StringObjectType.d.ts.map +1 -0
  82. package/dist/src/fundamentalTypes/arrayReferenceType.d.ts +8 -0
  83. package/dist/src/fundamentalTypes/arrayReferenceType.d.ts.map +1 -0
  84. package/dist/src/fundamentalTypes/arrayType.d.ts +29 -0
  85. package/dist/src/fundamentalTypes/arrayType.d.ts.map +1 -0
  86. package/dist/src/fundamentalTypes/bigintObjectType.d.ts +6 -0
  87. package/dist/src/fundamentalTypes/bigintObjectType.d.ts.map +1 -0
  88. package/dist/src/fundamentalTypes/bigintType.d.ts +6 -0
  89. package/dist/src/fundamentalTypes/bigintType.d.ts.map +1 -0
  90. package/dist/src/fundamentalTypes/blobType.d.ts +11 -0
  91. package/dist/src/fundamentalTypes/blobType.d.ts.map +1 -0
  92. package/dist/src/fundamentalTypes/booleanType.d.ts +8 -0
  93. package/dist/src/fundamentalTypes/booleanType.d.ts.map +1 -0
  94. package/dist/src/fundamentalTypes/catchType.d.ts +6 -0
  95. package/dist/src/fundamentalTypes/catchType.d.ts.map +1 -0
  96. package/dist/src/fundamentalTypes/dateType.d.ts +26 -0
  97. package/dist/src/fundamentalTypes/dateType.d.ts.map +1 -0
  98. package/dist/src/fundamentalTypes/domexceptionType.d.ts +6 -0
  99. package/dist/src/fundamentalTypes/domexceptionType.d.ts.map +1 -0
  100. package/dist/src/fundamentalTypes/enumType.d.ts +6 -0
  101. package/dist/src/fundamentalTypes/enumType.d.ts.map +1 -0
  102. package/dist/src/fundamentalTypes/errorType.d.ts +6 -0
  103. package/dist/src/fundamentalTypes/errorType.d.ts.map +1 -0
  104. package/dist/src/fundamentalTypes/fileType.d.ts +13 -0
  105. package/dist/src/fundamentalTypes/fileType.d.ts.map +1 -0
  106. package/dist/src/fundamentalTypes/filelistType.d.ts +6 -0
  107. package/dist/src/fundamentalTypes/filelistType.d.ts.map +1 -0
  108. package/dist/src/fundamentalTypes/functionType.d.ts +7 -0
  109. package/dist/src/fundamentalTypes/functionType.d.ts.map +1 -0
  110. package/dist/src/fundamentalTypes/literalType.d.ts +6 -0
  111. package/dist/src/fundamentalTypes/literalType.d.ts.map +1 -0
  112. package/dist/src/fundamentalTypes/mapType.d.ts +6 -0
  113. package/dist/src/fundamentalTypes/mapType.d.ts.map +1 -0
  114. package/dist/src/fundamentalTypes/nanType.d.ts +6 -0
  115. package/dist/src/fundamentalTypes/nanType.d.ts.map +1 -0
  116. package/dist/src/fundamentalTypes/neverType.d.ts +6 -0
  117. package/dist/src/fundamentalTypes/neverType.d.ts.map +1 -0
  118. package/dist/src/fundamentalTypes/noneditableType.d.ts +6 -0
  119. package/dist/src/fundamentalTypes/noneditableType.d.ts.map +1 -0
  120. package/dist/src/fundamentalTypes/nullType.d.ts +6 -0
  121. package/dist/src/fundamentalTypes/nullType.d.ts.map +1 -0
  122. package/dist/src/fundamentalTypes/numberType.d.ts +6 -0
  123. package/dist/src/fundamentalTypes/numberType.d.ts.map +1 -0
  124. package/dist/src/fundamentalTypes/objectReferenceType.d.ts +8 -0
  125. package/dist/src/fundamentalTypes/objectReferenceType.d.ts.map +1 -0
  126. package/dist/src/fundamentalTypes/objectType.d.ts +6 -0
  127. package/dist/src/fundamentalTypes/objectType.d.ts.map +1 -0
  128. package/dist/src/fundamentalTypes/promiseType.d.ts +6 -0
  129. package/dist/src/fundamentalTypes/promiseType.d.ts.map +1 -0
  130. package/dist/src/fundamentalTypes/recordType.d.ts +6 -0
  131. package/dist/src/fundamentalTypes/recordType.d.ts.map +1 -0
  132. package/dist/src/fundamentalTypes/regexpType.d.ts +8 -0
  133. package/dist/src/fundamentalTypes/regexpType.d.ts.map +1 -0
  134. package/dist/src/fundamentalTypes/setType.d.ts +6 -0
  135. package/dist/src/fundamentalTypes/setType.d.ts.map +1 -0
  136. package/dist/src/fundamentalTypes/sparseUndefinedType.d.ts +6 -0
  137. package/dist/src/fundamentalTypes/sparseUndefinedType.d.ts.map +1 -0
  138. package/dist/src/fundamentalTypes/stringType.d.ts +6 -0
  139. package/dist/src/fundamentalTypes/stringType.d.ts.map +1 -0
  140. package/dist/src/fundamentalTypes/symbolType.d.ts +8 -0
  141. package/dist/src/fundamentalTypes/symbolType.d.ts.map +1 -0
  142. package/dist/src/fundamentalTypes/tupleType.d.ts +6 -0
  143. package/dist/src/fundamentalTypes/tupleType.d.ts.map +1 -0
  144. package/dist/src/fundamentalTypes/undefinedType.d.ts +6 -0
  145. package/dist/src/fundamentalTypes/undefinedType.d.ts.map +1 -0
  146. package/dist/src/fundamentalTypes/voidType.d.ts +6 -0
  147. package/dist/src/fundamentalTypes/voidType.d.ts.map +1 -0
  148. package/dist/src/index.d.ts +12 -0
  149. package/dist/src/index.d.ts.map +1 -0
  150. package/dist/src/subTypes/blobHTMLType.d.ts +20 -0
  151. package/dist/src/subTypes/blobHTMLType.d.ts.map +1 -0
  152. package/dist/src/subTypes/falseType.d.ts +8 -0
  153. package/dist/src/subTypes/falseType.d.ts.map +1 -0
  154. package/dist/src/subTypes/trueType.d.ts +8 -0
  155. package/dist/src/subTypes/trueType.d.ts.map +1 -0
  156. package/dist/src/superTypes/SpecialNumberType.d.ts +6 -0
  157. package/dist/src/superTypes/SpecialNumberType.d.ts.map +1 -0
  158. package/dist/src/superTypes/SpecialRealNumberType.d.ts +6 -0
  159. package/dist/src/superTypes/SpecialRealNumberType.d.ts.map +1 -0
  160. package/dist/src/superTypes/buffersourceType.d.ts +8 -0
  161. package/dist/src/superTypes/buffersourceType.d.ts.map +1 -0
  162. package/dist/src/superTypes/dommatrixType.d.ts +6 -0
  163. package/dist/src/superTypes/dommatrixType.d.ts.map +1 -0
  164. package/dist/src/superTypes/dompointType.d.ts +6 -0
  165. package/dist/src/superTypes/dompointType.d.ts.map +1 -0
  166. package/dist/src/superTypes/domrectType.d.ts +6 -0
  167. package/dist/src/superTypes/domrectType.d.ts.map +1 -0
  168. package/dist/src/superTypes/errorsSpecialType.d.ts +8 -0
  169. package/dist/src/superTypes/errorsSpecialType.d.ts.map +1 -0
  170. package/dist/src/typeChoices.d.ts +140 -0
  171. package/dist/src/typeChoices.d.ts.map +1 -0
  172. package/dist/src/types.d.ts +758 -0
  173. package/dist/src/types.d.ts.map +1 -0
  174. package/dist/src/utils/FileList.d.ts +26 -0
  175. package/dist/src/utils/FileList.d.ts.map +1 -0
  176. package/dist/src/utils/dialogs.d.ts +111 -0
  177. package/dist/src/utils/dialogs.d.ts.map +1 -0
  178. package/dist/src/utils/jsonPointer.d.ts +46 -0
  179. package/dist/src/utils/jsonPointer.d.ts.map +1 -0
  180. package/dist/src/utils/media.d.ts +18 -0
  181. package/dist/src/utils/media.d.ts.map +1 -0
  182. package/dist/src/utils/objects.d.ts +16 -0
  183. package/dist/src/utils/objects.d.ts.map +1 -0
  184. package/dist/src/utils/templateUtils.d.ts +59 -0
  185. package/dist/src/utils/templateUtils.d.ts.map +1 -0
  186. package/dist/src/utils/types.d.ts +2 -0
  187. package/dist/src/utils/types.d.ts.map +1 -0
  188. package/dist/src/vendor-imports.d.ts +4 -0
  189. package/dist/src/vendor-imports.d.ts.map +1 -0
  190. package/dist/subTypes/blobHTMLType.d.ts.map +1 -1
  191. package/dist/superTypes/SpecialRealNumberType.d.ts.map +1 -1
  192. package/dist/superTypes/buffersourceType.d.ts.map +1 -1
  193. package/dist/superTypes/dommatrixType.d.ts.map +1 -1
  194. package/dist/superTypes/dompointType.d.ts.map +1 -1
  195. package/dist/superTypes/domrectType.d.ts.map +1 -1
  196. package/dist/superTypes/errorsSpecialType.d.ts.map +1 -1
  197. package/dist/typeChoices.d.ts +21 -87
  198. package/dist/typeChoices.d.ts.map +1 -1
  199. package/dist/types.d.ts +90 -64
  200. package/dist/types.d.ts.map +1 -1
  201. package/dist/utils/FileList.d.ts +4 -3
  202. package/dist/utils/FileList.d.ts.map +1 -1
  203. package/dist/utils/dialogs.d.ts +4 -4
  204. package/dist/utils/dialogs.d.ts.map +1 -1
  205. package/dist/utils/media.d.ts.map +1 -1
  206. package/dist/utils/schemaMeta.d.ts +92 -0
  207. package/dist/utils/schemaMeta.d.ts.map +1 -0
  208. package/dist/utils/templateUtils.d.ts +3 -3
  209. package/dist/utils/templateUtils.d.ts.map +1 -1
  210. package/dist/utils/timing.d.ts +2 -0
  211. package/dist/utils/timing.d.ts.map +1 -0
  212. package/dist/utils/types.d.ts +1 -0
  213. package/dist/utils/types.d.ts.map +1 -1
  214. package/dist/vendor-imports.d.ts +3 -1
  215. package/docs/proposals/schema-meta.md +233 -0
  216. package/eslint.config.js +51 -4
  217. package/licenseInfo.json +1 -1
  218. package/package.json +52 -42
  219. package/pnpm-workspace.yaml +57 -0
  220. package/rollup.config.js +20 -18
  221. package/server.js +3 -3
  222. package/src/deepEqual.js +77 -66
  223. package/src/deepEqual.js.map +1 -1
  224. package/src/formatAndTypeChoices.js +62 -58
  225. package/src/formats/indexedDBKey.js +3 -4
  226. package/src/formats/schema.js +824 -475
  227. package/src/formats/structuredCloning.js +189 -80
  228. package/src/formats.js +17 -5
  229. package/src/fundamentalTypes/BooleanObjectType.js +4 -5
  230. package/src/fundamentalTypes/NumberObjectType.js +4 -4
  231. package/src/fundamentalTypes/StringObjectType.js +3 -4
  232. package/src/fundamentalTypes/arrayReferenceType.js +0 -2
  233. package/src/fundamentalTypes/arrayType.js +624 -389
  234. package/src/fundamentalTypes/bigintObjectType.js +3 -2
  235. package/src/fundamentalTypes/bigintType.js +79 -17
  236. package/src/fundamentalTypes/blobType.js +35 -35
  237. package/src/fundamentalTypes/booleanType.js +16 -8
  238. package/src/fundamentalTypes/dateType.js +6 -8
  239. package/src/fundamentalTypes/domexceptionType.js +5 -4
  240. package/src/fundamentalTypes/errorType.js +39 -32
  241. package/src/fundamentalTypes/fileType.js +238 -52
  242. package/src/fundamentalTypes/functionType.js +61 -41
  243. package/src/fundamentalTypes/nanType.js +5 -4
  244. package/src/fundamentalTypes/noneditableType.js +4 -3
  245. package/src/fundamentalTypes/nullType.js +3 -2
  246. package/src/fundamentalTypes/numberType.js +72 -20
  247. package/src/fundamentalTypes/promiseType.js +16 -40
  248. package/src/fundamentalTypes/regexpType.js +7 -13
  249. package/src/fundamentalTypes/stringType.js +176 -110
  250. package/src/fundamentalTypes/symbolType.js +3 -2
  251. package/src/fundamentalTypes/undefinedType.js +3 -2
  252. package/src/index.js +6 -5
  253. package/src/jsoe.css +107 -8
  254. package/src/subTypes/blobHTMLType.js +23 -10
  255. package/src/superTypes/SpecialNumberType.js +6 -6
  256. package/src/superTypes/SpecialRealNumberType.js +10 -9
  257. package/src/superTypes/buffersourceType.js +86 -75
  258. package/src/superTypes/dommatrixType.js +6 -5
  259. package/src/superTypes/dompointType.js +6 -5
  260. package/src/superTypes/domrectType.js +6 -5
  261. package/src/superTypes/errorsSpecialType.js +54 -35
  262. package/src/typeChoices.js +373 -53
  263. package/src/types.js +157 -97
  264. package/src/utils/FileList.js +3 -3
  265. package/src/utils/dialogs.js +5 -7
  266. package/src/utils/jsonPointer.js +1 -1
  267. package/src/utils/media.js +1 -0
  268. package/src/utils/schemaMeta.js +257 -0
  269. package/src/utils/templateUtils.js +3 -3
  270. package/src/utils/timing.js +12 -0
  271. package/src/utils/types.js +19 -0
  272. package/src/vendor-imports.js +10 -2
  273. package/tsconfig.json +2 -0
  274. package/vendor/acorn/dist/acorn.d.mts +46 -5
  275. package/vendor/acorn/dist/acorn.d.ts +46 -5
  276. package/vendor/acorn/dist/acorn.js +394 -117
  277. package/vendor/acorn/dist/acorn.mjs +394 -117
  278. package/vendor/acorn/dist/bin.js +1 -1
  279. package/vendor/jamilih/dist/{jml-es.js → jml.mjs} +590 -312
  280. package/vendor/jamilih/package.json +1 -1
  281. package/vendor/mime/dist/types/other.js +719 -0
  282. package/vendor/mime/dist/types/standard.js +366 -0
  283. package/vendor/typeson-registry/dist/index.js +519 -99
  284. package/vendor/zod/classic/checks.d.ts +1 -0
  285. package/vendor/zod/classic/checks.js +1 -0
  286. package/vendor/zod/classic/coerce.d.ts +17 -0
  287. package/vendor/zod/classic/coerce.js +17 -0
  288. package/vendor/zod/classic/compat.d.ts +48 -0
  289. package/vendor/zod/classic/compat.js +31 -0
  290. package/vendor/zod/classic/deep-partial.d.ts +14 -0
  291. package/vendor/zod/classic/deep-partial.js +13 -0
  292. package/vendor/zod/classic/errors.d.ts +29 -0
  293. package/vendor/zod/classic/errors.js +57 -0
  294. package/vendor/zod/classic/external.d.ts +19 -0
  295. package/vendor/zod/classic/external.js +17 -0
  296. package/vendor/zod/classic/from-json-schema.d.ts +12 -0
  297. package/vendor/zod/classic/from-json-schema.js +660 -0
  298. package/vendor/zod/classic/in-out.d.ts +8 -0
  299. package/vendor/zod/classic/in-out.js +36 -0
  300. package/vendor/zod/classic/index.d.ts +3 -0
  301. package/vendor/zod/classic/index.js +4 -0
  302. package/vendor/zod/classic/iso.d.ts +7 -0
  303. package/vendor/zod/classic/iso.js +15 -0
  304. package/vendor/zod/classic/package.json +7 -0
  305. package/vendor/zod/classic/parse.d.ts +44 -0
  306. package/vendor/zod/classic/parse.js +16 -0
  307. package/vendor/zod/classic/schemas.d.ts +802 -0
  308. package/vendor/zod/classic/schemas.js +1491 -0
  309. package/vendor/zod/core/api.d.ts +329 -0
  310. package/vendor/zod/core/api.js +1104 -0
  311. package/vendor/zod/core/checks.d.ts +278 -0
  312. package/vendor/zod/core/checks.js +581 -0
  313. package/vendor/zod/core/compile.d.ts +51 -0
  314. package/vendor/zod/core/compile.js +1783 -0
  315. package/vendor/zod/core/core.d.ts +82 -0
  316. package/vendor/zod/core/core.js +141 -0
  317. package/vendor/zod/core/doc.d.ts +16 -0
  318. package/vendor/zod/core/doc.js +33 -0
  319. package/vendor/zod/core/errors.d.ts +225 -0
  320. package/vendor/zod/core/errors.js +270 -0
  321. package/vendor/zod/core/index.d.ts +19 -0
  322. package/vendor/zod/core/index.js +19 -0
  323. package/vendor/zod/core/json-schema-generator.d.ts +65 -0
  324. package/vendor/zod/core/json-schema-generator.js +99 -0
  325. package/vendor/zod/core/json-schema-processors.d.ts +49 -0
  326. package/vendor/zod/core/json-schema-processors.js +747 -0
  327. package/vendor/zod/core/json-schema.d.ts +89 -0
  328. package/vendor/zod/core/memoizer.d.ts +15 -0
  329. package/vendor/zod/core/memoizer.js +265 -0
  330. package/vendor/zod/core/package.json +7 -0
  331. package/vendor/zod/core/parse.d.ts +52 -0
  332. package/vendor/zod/core/parse.js +154 -0
  333. package/vendor/zod/core/regexes.d.ts +87 -0
  334. package/vendor/zod/core/regexes.js +150 -0
  335. package/vendor/zod/core/registries.d.ts +35 -0
  336. package/vendor/zod/core/registries.js +51 -0
  337. package/vendor/zod/core/schemas.d.ts +1253 -0
  338. package/vendor/zod/core/schemas.js +2440 -0
  339. package/vendor/zod/core/standard-schema.d.ts +126 -0
  340. package/vendor/zod/core/to-json-schema.d.ts +153 -0
  341. package/vendor/zod/core/to-json-schema.js +650 -0
  342. package/vendor/zod/core/util.d.ts +257 -0
  343. package/vendor/zod/core/util.js +846 -0
  344. package/vendor/zod/core/versions.d.ts +5 -0
  345. package/vendor/zod/core/versions.js +5 -0
  346. package/vendor/zod/core/visit.d.ts +30 -0
  347. package/vendor/zod/core/visit.js +169 -0
  348. package/vendor/zod/index.d.ts +3 -0
  349. package/vendor/zod/index.js +4 -0
  350. package/vendor/zod/locales/ar.d.ts +4 -0
  351. package/vendor/zod/locales/ar.js +109 -0
  352. package/vendor/zod/locales/az.d.ts +4 -0
  353. package/vendor/zod/locales/az.js +108 -0
  354. package/vendor/zod/locales/be.d.ts +4 -0
  355. package/vendor/zod/locales/be.js +166 -0
  356. package/vendor/zod/locales/bg.d.ts +4 -0
  357. package/vendor/zod/locales/bg.js +123 -0
  358. package/vendor/zod/locales/bn.d.ts +4 -0
  359. package/vendor/zod/locales/bn.js +111 -0
  360. package/vendor/zod/locales/ca.d.ts +4 -0
  361. package/vendor/zod/locales/ca.js +110 -0
  362. package/vendor/zod/locales/ckb.d.ts +4 -0
  363. package/vendor/zod/locales/ckb.js +131 -0
  364. package/vendor/zod/locales/cs.d.ts +4 -0
  365. package/vendor/zod/locales/cs.js +114 -0
  366. package/vendor/zod/locales/da.d.ts +4 -0
  367. package/vendor/zod/locales/da.js +118 -0
  368. package/vendor/zod/locales/de.d.ts +4 -0
  369. package/vendor/zod/locales/de.js +111 -0
  370. package/vendor/zod/locales/el.d.ts +4 -0
  371. package/vendor/zod/locales/el.js +110 -0
  372. package/vendor/zod/locales/en.d.ts +4 -0
  373. package/vendor/zod/locales/en.js +123 -0
  374. package/vendor/zod/locales/eo.d.ts +4 -0
  375. package/vendor/zod/locales/eo.js +112 -0
  376. package/vendor/zod/locales/es.d.ts +4 -0
  377. package/vendor/zod/locales/es.js +134 -0
  378. package/vendor/zod/locales/fa.d.ts +4 -0
  379. package/vendor/zod/locales/fa.js +117 -0
  380. package/vendor/zod/locales/fi.d.ts +4 -0
  381. package/vendor/zod/locales/fi.js +115 -0
  382. package/vendor/zod/locales/fr-CA.d.ts +4 -0
  383. package/vendor/zod/locales/fr-CA.js +110 -0
  384. package/vendor/zod/locales/fr.d.ts +4 -0
  385. package/vendor/zod/locales/fr.js +127 -0
  386. package/vendor/zod/locales/gu.d.ts +4 -0
  387. package/vendor/zod/locales/gu.js +111 -0
  388. package/vendor/zod/locales/he.d.ts +4 -0
  389. package/vendor/zod/locales/he.js +219 -0
  390. package/vendor/zod/locales/hi.d.ts +4 -0
  391. package/vendor/zod/locales/hi.js +109 -0
  392. package/vendor/zod/locales/hr.d.ts +4 -0
  393. package/vendor/zod/locales/hr.js +124 -0
  394. package/vendor/zod/locales/hu.d.ts +4 -0
  395. package/vendor/zod/locales/hu.js +111 -0
  396. package/vendor/zod/locales/hy.d.ts +4 -0
  397. package/vendor/zod/locales/hy.js +156 -0
  398. package/vendor/zod/locales/id.d.ts +4 -0
  399. package/vendor/zod/locales/id.js +109 -0
  400. package/vendor/zod/locales/index.d.ts +62 -0
  401. package/vendor/zod/locales/index.js +62 -0
  402. package/vendor/zod/locales/is.d.ts +4 -0
  403. package/vendor/zod/locales/is.js +112 -0
  404. package/vendor/zod/locales/it.d.ts +4 -0
  405. package/vendor/zod/locales/it.js +111 -0
  406. package/vendor/zod/locales/ja.d.ts +4 -0
  407. package/vendor/zod/locales/ja.js +110 -0
  408. package/vendor/zod/locales/ka.d.ts +4 -0
  409. package/vendor/zod/locales/ka.js +115 -0
  410. package/vendor/zod/locales/kh.d.ts +5 -0
  411. package/vendor/zod/locales/kh.js +5 -0
  412. package/vendor/zod/locales/km.d.ts +4 -0
  413. package/vendor/zod/locales/km.js +113 -0
  414. package/vendor/zod/locales/kn.d.ts +4 -0
  415. package/vendor/zod/locales/kn.js +114 -0
  416. package/vendor/zod/locales/ko.d.ts +4 -0
  417. package/vendor/zod/locales/ko.js +114 -0
  418. package/vendor/zod/locales/lt.d.ts +4 -0
  419. package/vendor/zod/locales/lt.js +205 -0
  420. package/vendor/zod/locales/mk.d.ts +4 -0
  421. package/vendor/zod/locales/mk.js +112 -0
  422. package/vendor/zod/locales/ms.d.ts +4 -0
  423. package/vendor/zod/locales/ms.js +110 -0
  424. package/vendor/zod/locales/ne.d.ts +4 -0
  425. package/vendor/zod/locales/ne.js +109 -0
  426. package/vendor/zod/locales/nl.d.ts +4 -0
  427. package/vendor/zod/locales/nl.js +113 -0
  428. package/vendor/zod/locales/nn.d.ts +4 -0
  429. package/vendor/zod/locales/nn.js +111 -0
  430. package/vendor/zod/locales/no.d.ts +4 -0
  431. package/vendor/zod/locales/no.js +111 -0
  432. package/vendor/zod/locales/ota.d.ts +4 -0
  433. package/vendor/zod/locales/ota.js +112 -0
  434. package/vendor/zod/locales/package.json +7 -0
  435. package/vendor/zod/locales/pl.d.ts +4 -0
  436. package/vendor/zod/locales/pl.js +112 -0
  437. package/vendor/zod/locales/ps.d.ts +4 -0
  438. package/vendor/zod/locales/ps.js +117 -0
  439. package/vendor/zod/locales/pt-BR.d.ts +4 -0
  440. package/vendor/zod/locales/pt-BR.js +141 -0
  441. package/vendor/zod/locales/pt.d.ts +4 -0
  442. package/vendor/zod/locales/pt.js +140 -0
  443. package/vendor/zod/locales/ro.d.ts +4 -0
  444. package/vendor/zod/locales/ro.js +120 -0
  445. package/vendor/zod/locales/ru.d.ts +4 -0
  446. package/vendor/zod/locales/ru.js +166 -0
  447. package/vendor/zod/locales/sk.d.ts +4 -0
  448. package/vendor/zod/locales/sk.js +114 -0
  449. package/vendor/zod/locales/sl.d.ts +4 -0
  450. package/vendor/zod/locales/sl.js +112 -0
  451. package/vendor/zod/locales/sv.d.ts +4 -0
  452. package/vendor/zod/locales/sv.js +113 -0
  453. package/vendor/zod/locales/ta.d.ts +4 -0
  454. package/vendor/zod/locales/ta.js +113 -0
  455. package/vendor/zod/locales/th.d.ts +4 -0
  456. package/vendor/zod/locales/th.js +113 -0
  457. package/vendor/zod/locales/tk.d.ts +4 -0
  458. package/vendor/zod/locales/tk.js +105 -0
  459. package/vendor/zod/locales/tr.d.ts +4 -0
  460. package/vendor/zod/locales/tr.js +108 -0
  461. package/vendor/zod/locales/ua.d.ts +5 -0
  462. package/vendor/zod/locales/ua.js +5 -0
  463. package/vendor/zod/locales/uk.d.ts +4 -0
  464. package/vendor/zod/locales/uk.js +111 -0
  465. package/vendor/zod/locales/ur.d.ts +4 -0
  466. package/vendor/zod/locales/ur.js +113 -0
  467. package/vendor/zod/locales/uz.d.ts +4 -0
  468. package/vendor/zod/locales/uz.js +111 -0
  469. package/vendor/zod/locales/vi.d.ts +4 -0
  470. package/vendor/zod/locales/vi.js +111 -0
  471. package/vendor/zod/locales/yo.d.ts +4 -0
  472. package/vendor/zod/locales/yo.js +110 -0
  473. package/vendor/zod/locales/zh-CN.d.ts +4 -0
  474. package/vendor/zod/locales/zh-CN.js +112 -0
  475. package/vendor/zod/locales/zh-TW.d.ts +4 -0
  476. package/vendor/zod/locales/zh-TW.js +110 -0
  477. package/vendor/zod/mini/checks.d.ts +1 -0
  478. package/vendor/zod/mini/checks.js +1 -0
  479. package/vendor/zod/mini/coerce.d.ts +7 -0
  480. package/vendor/zod/mini/coerce.js +22 -0
  481. package/vendor/zod/mini/deep-partial.d.ts +14 -0
  482. package/vendor/zod/mini/deep-partial.js +13 -0
  483. package/vendor/zod/mini/external.d.ts +16 -0
  484. package/vendor/zod/mini/external.js +16 -0
  485. package/vendor/zod/mini/in-out.d.ts +8 -0
  486. package/vendor/zod/mini/in-out.js +36 -0
  487. package/vendor/zod/mini/index.d.ts +3 -0
  488. package/vendor/zod/mini/index.js +3 -0
  489. package/vendor/zod/mini/iso.d.ts +22 -0
  490. package/vendor/zod/mini/iso.js +34 -0
  491. package/vendor/zod/mini/package.json +7 -0
  492. package/vendor/zod/mini/parse.d.ts +1 -0
  493. package/vendor/zod/mini/parse.js +1 -0
  494. package/vendor/zod/mini/schemas.d.ts +475 -0
  495. package/vendor/zod/mini/schemas.js +987 -0
  496. package/vendor/zod/package.json +7 -0
  497. package/vendor/zodexy/dist/esm/index.js +1274 -0
  498. package/vendor/zodexy/dist/index.js +1088 -0
  499. package/vendor/zodexy/dist/schema.zodexy.json +1036 -0
  500. package/dist/fundamentalTypes/nativeEnumType.d.ts +0 -6
  501. package/dist/fundamentalTypes/nativeEnumType.d.ts.map +0 -1
  502. package/src/fundamentalTypes/catchType.js +0 -140
  503. package/src/fundamentalTypes/enumType.js +0 -52
  504. package/src/fundamentalTypes/literalType.js +0 -81
  505. package/src/fundamentalTypes/nativeEnumType.js +0 -157
  506. package/src/fundamentalTypes/neverType.js +0 -49
  507. package/src/fundamentalTypes/recordType.js +0 -42
  508. package/src/fundamentalTypes/tupleType.js +0 -39
  509. package/src/fundamentalTypes/voidType.js +0 -48
  510. package/vendor/zod/lib/index.mjs +0 -4236
  511. package/vendor/zodex/dist/esm/dezerialize.d.ts +0 -26
  512. package/vendor/zodex/dist/esm/dezerialize.js +0 -393
  513. package/vendor/zodex/dist/esm/index.d.ts +0 -9
  514. package/vendor/zodex/dist/esm/index.js +0 -4
  515. package/vendor/zodex/dist/esm/infer.d.ts +0 -29
  516. package/vendor/zodex/dist/esm/package.json +0 -1
  517. package/vendor/zodex/dist/esm/types.d.ts +0 -201
  518. package/vendor/zodex/dist/esm/types.js +0 -13
  519. package/vendor/zodex/dist/esm/ui.d.ts +0 -23
  520. package/vendor/zodex/dist/esm/ui.js +0 -10
  521. package/vendor/zodex/dist/esm/zerialize.d.ts +0 -50
  522. package/vendor/zodex/dist/esm/zerialize.js +0 -417
  523. package/vendor/zodex/dist/esm/zod-types.d.ts +0 -11
  524. /package/vendor/{zodex/dist/esm/infer.js → zod/core/json-schema.js} +0 -0
  525. /package/vendor/{zodex/dist/esm/zod-types.js → zod/core/standard-schema.js} +0 -0
@@ -0,0 +1,233 @@
1
+ # Proposal: surfacing schema `meta` in viewUI / editUI
2
+
3
+ Status: draft / accepted for implementation
4
+
5
+ ## Goal
6
+
7
+ Reveal the Zodexy `meta` bag carried on serialized schemas (`meta.title`,
8
+ `meta.description`, `meta.id`, `meta.deprecated`, and custom keys) in both
9
+ viewUI and editUI, move the primary "label" role from the schema's top-level
10
+ `description` to `meta.title`, and reserve `meta.description` for longer
11
+ explanatory prose shown only on hover.
12
+
13
+ The schema driving a given editUI session, and its metadata, are
14
+ developer-supplied inputs. The end user edits **data** that conforms to that
15
+ driving schema. (That data may itself be a schema — e.g. when jsoe is driven by
16
+ `vendor/zodexy/dist/schema.zodexy.json` to author a Zodexy schema — but the
17
+ schema *guiding* the session is still not user-editable.) Nothing in this
18
+ proposal makes the driving schema or its metadata editable in that session;
19
+ the metadata affordance renders in edit mode too, but strictly read-only, so
20
+ the person entering a value can see field guidance.
21
+
22
+ ## 1. What the serialized schema gives us
23
+
24
+ Zodexy's `zerialize` emits metadata in two places on each `SzType`:
25
+
26
+ | Author writes | Serialized output | Notes |
27
+ |---|---|---|
28
+ | `.describe('x')` / `.meta({description:'x'})` (nothing else) | top-level `description: 'x'` **only** | `meta` is suppressed when it is exactly `{description}` |
29
+ | `.meta({title, description, id, deprecated, …custom})` | `meta: {…}` (plus a top-level `description` mirror if `description` is among the keys) | the full bag survives round-trip via `dezerializeRefs` |
30
+
31
+ Consequence that drives the design: **a bare `description` is ambiguous** —
32
+ jsoe cannot tell whether the author meant a short label or long prose. The
33
+ distinction only becomes real once `meta.title` (or another `meta` key) is
34
+ present, which is what forces `meta` to be serialized in full. Therefore:
35
+
36
+ - `meta.title` present → it is the visible label; `meta.description` is now
37
+ free to be long-form / tooltip-only.
38
+ - only top-level `description` → keep treating it as the visible label
39
+ (today's behavior, unchanged).
40
+
41
+ Today jsoe reads `schemaObject.description` in ~40 places
42
+ (`src/fundamentalTypes/arrayType.js`, the `title=` attributes in every leaf
43
+ type's `viewUI`/`editUI`, and the type pull-down label in
44
+ `src/types.js` `getOptionForType`). There is **no** `meta` handling anywhere.
45
+
46
+ ### Canonical example: `schema.zodexy.json`
47
+
48
+ Zodexy's own meta-schema (`vendor/zodexy/dist/schema.zodexy.json`, which drives
49
+ schema-editing sessions) has already migrated: ~51 nodes now carry
50
+ `meta: {title: …}` instead of a bare `description`. It also models the `meta`
51
+ bag itself as `{id?, title?, description?, deprecated?} & record<string,
52
+ unknown>` — i.e. exactly the reserved keys below plus arbitrary custom keys, so
53
+ `RESERVED` in the resolver matches Zodexy's own definition. This file is the
54
+ natural integration fixture: exercising the schema demo already drives the new
55
+ label path.
56
+
57
+ One carry-over: Zodexy uses the sentinel string `"Modifiers"` (previously a
58
+ `description`, now `meta.title`) that `formats/schema.js` `mergeSchema` already
59
+ filters out of intersection merges — see §5.
60
+
61
+ ## 2. One resolver, one render point
62
+
63
+ ### `src/utils/schemaMeta.js`
64
+
65
+ Normalize the metadata bag and centralize precedence:
66
+
67
+ ```js
68
+ const RESERVED = new Set(['title', 'description', 'id', 'deprecated']);
69
+
70
+ /**
71
+ * @param {import('../formats/schema.js').ZodexSchema} [s]
72
+ * @returns {{
73
+ * label: string|undefined, // short, visible
74
+ * longText: string|undefined, // prose for the tooltip only
75
+ * id: string|undefined,
76
+ * deprecated: boolean|string|undefined,
77
+ * custom: [string, unknown][], // everything else in meta
78
+ * jsoe: object|undefined, // meta.jsoe directive bag (see §7)
79
+ * rows: [string, string][], // key→value for the popover table
80
+ * hasAny: boolean
81
+ * }}
82
+ */
83
+ export function resolveSchemaMeta (s) { /* … */ }
84
+
85
+ /** Terse call-site sugar used by arrayType.js child labels. */
86
+ export const schemaLabel = (s, fallback) =>
87
+ resolveSchemaMeta(s).label ?? fallback;
88
+ ```
89
+
90
+ Precedence:
91
+
92
+ - `label` = `meta.title` ?? `meta.description` ?? top-level `description`
93
+ (drop the last term once `.description` on the schema is finally removed).
94
+ - `longText` = `meta.description` **only when** `meta.title` exists (otherwise
95
+ `meta.description` is already serving as the label; don't repeat it).
96
+ - `id`, `deprecated`, `custom` never become visible labels — tooltip table only.
97
+ - `custom` = `Object.entries(meta)` minus `RESERVED` minus `jsoe`.
98
+
99
+ ### Render point
100
+
101
+ `src/types.js` `getUIForModeAndType` wraps every type root for both modes and
102
+ already does `this.schemasForRoots.set(root, specificSchemaObject)`. Immediately
103
+ after building `root`, append a single metadata affordance when
104
+ `resolveSchemaMeta(specificSchemaObject).hasAny`. Universal coverage from one
105
+ edit — every fundamental/super/sub type, view and edit, nested or root —
106
+ instead of touching 40 call sites. Deprecated schemas additionally get
107
+ `root.classList.add('schema-deprecated')` for a CSS strikethrough on the
108
+ legend.
109
+
110
+ ## 3. The affordance: a toggled metadata table
111
+
112
+ The `ⓘ` marker is a `span[role="button"]` (not a real `<button>`, so bare
113
+ `getInput` selectors such as `$e(root, 'button')` in `arrayType`/`noneditable`
114
+ never mistake it for the type's own control) that toggles a
115
+ `<table class="schema-meta-table">` of key→value rows, in the spirit of the
116
+ `+`/`-` show/hide toggler in `arrayType.js`.
117
+
118
+ As implemented (`src/utils/schemaMeta.js`, `appendSchemaMeta`):
119
+
120
+ - The marker glyph comes from CSS (`.schema-meta-toggle::before {content:"\24D8"}`),
121
+ not a text node, so an untouched affordance adds **no text** to the type root
122
+ — existing `.text()` / `have.text` assertions and a11y snapshots stay stable.
123
+ - The table is built **lazily on first activation** and appended after the
124
+ marker; `click` and `keydown` (Enter/Space) both toggle it, keeping
125
+ `aria-expanded` in sync.
126
+ - `metaTooltipText(rows)` fills the marker's `title=` so all rows are available
127
+ on hover without opening the table (same technique as
128
+ `src/fundamentalTypes/functionType.js`).
129
+ - `metaTable(rows)` builds the rows in order: Title, Description, `ID`,
130
+ `Deprecated`, each custom key, then `jsoe.<key>` entries.
131
+ - The affordance is **appended as the last child** of the type root, not
132
+ prepended: tests and internal code select the type's label via
133
+ `root > span` / `root > *:first-child`. The two `arrayType.js` helpers that
134
+ walk a root from its end (`$getArrayItems`, `$getAddArrayElement`) use a new
135
+ `lastTypeChild(el)` helper (also in `schemaMeta.js`) that skips a trailing
136
+ `.schema-meta`.
137
+ - New CSS in `src/jsoe.css`: `.schema-meta`, `.schema-meta-toggle`
138
+ (+`::before` glyph), `.schema-meta-table` (small, bordered,
139
+ `border-collapse`).
140
+ - **Deprecation** shows in both modes. `appendSchemaMeta` adds
141
+ `.schema-deprecated` to the type root and, since a type's own root is
142
+ usually not where its label lives, the always-present toggle carries the
143
+ reliable signal: a muted-red glyph plus a CSS `::after` "deprecated" tag
144
+ (pseudo-element, so no `.text()` pollution). The label itself is struck
145
+ through where the class lands on an element that *is* a label — an inline
146
+ leaf root (`span`/`b`/`i`) in viewUI, and in editUI the property/item
147
+ `<legend>`, which `arrayType.js`'s `buildLegend` marks via
148
+ `deprecatedClassSuffix(schema)` (from `schemaMeta.js`, alongside
149
+ `isDeprecated`).
150
+
151
+ This is also the seam where **constraint display** (`min`/`max`/`kind`/
152
+ `format` — the existing README to-do "show more schema data in viewUI") later
153
+ plugs in: `metaTable` gains a few rows sourced from the schema object itself
154
+ rather than from `meta`.
155
+
156
+ ## 4. Targeted edits beyond the central one
157
+
158
+ | Location | Change |
159
+ |---|---|
160
+ | `types.js` `getOptionForType` | `schemaContent.description` → `resolveSchemaMeta(schemaContent).label`; keep the `(…)` parens |
161
+ | `arrayType.js` ~40 `?.description` reads (record key/value, tuple items/rest, object property names, element labels) | mechanical swap to `schemaLabel(x, propName)`; long `meta.description` for these children already shows via each child root's own `ⓘ` marker |
162
+ | Leaf `viewUI`/`editUI` (`stringType`, `numberType`, …) | `title: specificSchemaObject?.description ?? 'String'` → `title: schemaLabel(specificSchemaObject, 'String')`; the metadata `ⓘ` is added by the wrapper, not here |
163
+
164
+ The `arrayType.js` sweep must preserve every current visible label and tooltip
165
+ exactly for schemas that only carry a top-level `description`.
166
+
167
+ ## 5. `formats/schema.js` plumbing so `meta` survives composition
168
+
169
+ - **`addModifiers`** — add a `meta` branch next to the existing `description`
170
+ one: shallow-merge the wrapper's `meta` into each option; concatenate
171
+ `meta.title` / `meta.description` with `" and "` exactly as `description` is
172
+ concatenated today. Without this, `z.union([...]).meta({...})` drops its
173
+ metadata.
174
+ - **`mergeSchema`** (intersection) — explicit key-wise `meta` merge: union of
175
+ custom keys, `title`/`description` concatenated with `" and "` like
176
+ `description` already is. Extend the existing `val !== 'Modifiers'` guard
177
+ (currently only on `description`) to `meta.title` as well, since Zodexy moved
178
+ that sentinel from `description` to `meta.title`.
179
+ - `splitConstrainedSchema` — `...schema` spread already carries `meta`; no
180
+ change.
181
+ - `dezerialize` / `getValidationSchema` — no change; Zodexy already strips and
182
+ re-applies `meta` cleanly, and `parseValue` is unaffected.
183
+
184
+ ## 6. `meta.description` → `meta.title` migration
185
+
186
+ - `vendor/zodexy/dist/schema.zodexy.json` is already migrated (§1) — no work,
187
+ and it becomes the reference for the pattern.
188
+ - Fixtures in `demo/*.js`: where `description` is a short noun (`'Emoji'`,
189
+ `'Container'`, `'A number'`) → `meta: {title: …}`; where it is genuine prose
190
+ → `meta: {description: …}`.
191
+ - Because the resolver falls back `title ?? description ?? description`, every
192
+ existing schema keeps rendering identically until it is migrated.
193
+ - `CHANGES.md` + `README.md` schema section: announce `meta` support, the `ⓘ`
194
+ affordance, and the deprecation of `.description` directly on the schema
195
+ (prefer `meta.description`).
196
+
197
+ ## 7. Reserved namespace: `meta.jsoe`
198
+
199
+ Custom `meta` keys are shown in the tooltip table as-is. The single key
200
+ `meta.jsoe` is **reserved** for jsoe's own layout/UI directives, so user
201
+ metadata never collides with them.
202
+
203
+ Implemented now: `meta.jsoe.*` entries are surfaced in the metadata table
204
+ (prefixed `jsoe.<key>`) so a schema author can see them round-trip. Acting on
205
+ them is a follow-up — e.g. `meta.jsoe.tableView` to flatten an
206
+ array-of-arrays into a table (currently the normal Array controls still
207
+ render).
208
+
209
+ ## 8. Out of scope
210
+
211
+ - Editing the schema that drives the current editUI session, or its `meta` —
212
+ jsoe edits data conforming to that schema (which may itself be a schema), not
213
+ the schema guiding the session.
214
+ - Folding constraint display (`min`/`max`/`kind`/`format`) into the metadata
215
+ table — a follow-up once the table ships (see §3).
216
+ - Acting on `meta.jsoe` directives (e.g. `tableView`) — surfaced but not yet
217
+ wired to rendering (see §7).
218
+
219
+ ## 9. Tests
220
+
221
+ - Extend `cypress/e2e/fundamentalTypes/array.cy.js` and siblings: assert the
222
+ visible label comes from `meta.title`, the `ⓘ` marker's `title` contains
223
+ `id` / `deprecated` / custom rows, and a `deprecated` schema adds
224
+ `.schema-deprecated`.
225
+ - Keep `schemaMeta.js` free of stray `console.log(obj)` lines — several specs
226
+ stub `window.console.log`.
227
+
228
+ ## Summary of the change surface
229
+
230
+ One new util (`src/utils/schemaMeta.js`), one insertion in
231
+ `getUIForModeAndType`, one label-precedence change in `getOptionForType`, a
232
+ mechanical `schemaLabel()` sweep through `arrayType.js`, and `meta` merge logic
233
+ in `formats/schema.js`. Existing schemas are unaffected until migrated.
package/eslint.config.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import ashNazg from 'eslint-config-ash-nazg';
2
+ // import {
3
+ // parser as typescriptEslintParser
4
+ // } from 'typescript-eslint';
2
5
 
3
6
  export default [
4
7
  {
@@ -10,9 +13,25 @@ export default [
10
13
  'src/deepEqual.js',
11
14
  'vendor',
12
15
  'typings/**',
13
- 'dist'
16
+ 'dist',
17
+ 'docs'
14
18
  ]
15
19
  },
20
+ // {
21
+ // languageOptions: {
22
+ // parser: typescriptEslintParser,
23
+ // parserOptions: {
24
+ // projectService: {
25
+ // // eslint-disable-next-line camelcase -- API
26
+ // maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 500,
27
+ // allowDefaultProject: [
28
+ // '*.js', '.ncurc.cjs', 'demo/*.js'
29
+ // ]
30
+ // },
31
+ // tsconfigRootDir: import.meta.dirname
32
+ // }
33
+ // }
34
+ // },
16
35
  ...ashNazg(['sauron', 'browser']),
17
36
  {
18
37
  name: 'JSOE/Coverage',
@@ -31,7 +50,13 @@ export default [
31
50
  name: 'JSOE/Cypress',
32
51
  files: ['cypress/**'],
33
52
  rules: {
34
- 'unicorn/no-empty-file': 'off'
53
+ 'unicorn/no-empty-file': 'off',
54
+ // Cypress auto-handles
55
+ 'mocha/no-async-in-sync-tests': 0,
56
+ // Redundant
57
+ 'sonarjs/no-fixed-wait-in-tests': 0,
58
+ 'sonarjs/assertions-in-tests': 0,
59
+ 'sonarjs/no-empty-test-file': 0 // Bug
35
60
  }
36
61
  },
37
62
  {
@@ -40,8 +65,17 @@ export default [
40
65
  'no-console': 0,
41
66
  'no-shadow': 0,
42
67
 
68
+ // For now
69
+ 'jsdoc/reject-any-type': 0,
70
+ 'jsdoc/reject-function-type': 0,
71
+ 'unicorn/no-this-outside-of-class': 0,
72
+ 'sonarjs/prefer-regexp-exec': 0,
73
+
74
+ // Too cumbersome with @type casts
75
+ '@stylistic/max-len': 0,
76
+
43
77
  '@stylistic/quotes': ['error', 'single', {
44
- avoidEscape: true, allowTemplateLiterals: true
78
+ avoidEscape: true, allowTemplateLiterals: 'always'
45
79
  }],
46
80
 
47
81
  'jsdoc/require-jsdoc': ['warn', {
@@ -68,7 +102,20 @@ export default [
68
102
  'prefer-named-capture-group': 0,
69
103
  // Disable; waiting on https://github.com/mysticatea/eslint-plugin-node/issues/162
70
104
  'n/no-unpublished-import': 0,
71
- 'unicorn/no-this-assignment': 0
105
+ 'unicorn/no-this-assignment': 0,
106
+
107
+ // Disable in ash-nazg?
108
+ 'unicorn/no-top-level-assignment-in-function': 0,
109
+ 'unicorn/no-top-level-side-effects': 0
110
+
111
+ // Good but slow
112
+ // 'jsdoc/no-unnecessary-type-assertion': ['error', {
113
+ // checkLiteralConstAssertions: false,
114
+ // treatAnyAsRedundant: false,
115
+ // typesToIgnore: [
116
+ // `import('../types.js').SuperTypeObject`
117
+ // ]
118
+ // }]
72
119
  }
73
120
  }
74
121
  ];
package/licenseInfo.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "bundledRootPackages": ["jamilih", "typeson-registry", "zod", "zodex"],
2
+ "bundledRootPackages": ["jamilih", "typeson-registry", "zod", "zodexy"],
3
3
  "filesByLicense": {}
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@es-joy/jsoe",
3
- "version": "0.24.2",
3
+ "version": "0.25.0",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./src/index.js",
@@ -10,9 +10,15 @@
10
10
  "import": "./src/index.js"
11
11
  }
12
12
  },
13
+ "imports": {
14
+ "#jsoe/*": {
15
+ "types": "./src/*",
16
+ "default": "./instrumented/*"
17
+ }
18
+ },
13
19
  "description": "Editing of arbitrary JavaScript objects",
14
20
  "browserslist": [
15
- "defaults, not op_mini all"
21
+ "baseline widely available, not op_mini all"
16
22
  ],
17
23
  "nyc": {
18
24
  "excludeAfterRemap": true,
@@ -22,46 +28,48 @@
22
28
  ]
23
29
  },
24
30
  "dependencies": {
25
- "@brettz9/node-static": "^0.1.1",
26
- "acorn": "^8.12.1",
27
- "jamilih": "0.60.0",
28
- "sceditor": "3.2.0",
29
- "typeson-registry": "11.1.0",
30
- "zod": "^3.23.8",
31
- "zodex": "github:brettz9/zodex#browser-dist"
31
+ "@node-static/node-static": "^0.9.1",
32
+ "acorn": "^8.18.0",
33
+ "jamilih": "0.69.0",
34
+ "mime": "^4.1.0",
35
+ "sceditor": "3.2.1",
36
+ "typeson-registry": "14.5.0",
37
+ "zod": "^4.5.4",
38
+ "zodexy": "^0.30.1"
32
39
  },
33
40
  "devDependencies": {
34
- "@babel/core": "^7.25.2",
35
- "@babel/plugin-transform-modules-commonjs": "^7.24.8",
36
- "@babel/preset-env": "^7.25.4",
37
- "@babel/register": "^7.24.6",
38
- "@cypress/code-coverage": "^3.12.47",
39
- "@rollup/plugin-babel": "^6.0.4",
40
- "@rollup/plugin-commonjs": "^26.0.1",
41
- "@rollup/plugin-node-resolve": "^15.2.3",
42
- "@rollup/plugin-terser": "^0.4.4",
43
- "@types/jsdom": "^21.1.7",
44
- "@types/node": "^22.5.4",
45
- "axe-core": "^4.10.0",
41
+ "@babel/core": "^8.0.1",
42
+ "@babel/plugin-transform-modules-commonjs": "^8.0.1",
43
+ "@babel/preset-env": "^8.0.2",
44
+ "@babel/register": "^8.0.1",
45
+ "@cypress/code-coverage": "^4.0.3",
46
+ "@rollup/plugin-babel": "^7.1.0",
47
+ "@rollup/plugin-commonjs": "^29.0.3",
48
+ "@rollup/plugin-json": "^6.1.0",
49
+ "@rollup/plugin-node-resolve": "^16.0.3",
50
+ "@rollup/plugin-terser": "^1.0.0",
51
+ "@types/jsdom": "^30.0.0",
52
+ "@types/node": "^26.4.1",
53
+ "axe-core": "^4.13.0",
46
54
  "coveradge": "^0.8.2",
47
- "cypress": "^13.14.2",
48
- "cypress-axe": "^1.5.0",
49
- "cypress-terminal-report": "^6.1.3",
50
- "eslint": "^9.10.0",
51
- "eslint-config-ash-nazg": "^36.16.1",
55
+ "cypress": "^16.0.0",
56
+ "cypress-axe": "^1.7.0",
57
+ "cypress-terminal-report": "^7.3.3",
58
+ "eslint": "^10.9.1",
59
+ "eslint-config-ash-nazg": "^43.1.6",
52
60
  "fast-deep-equal": "^3.1.3",
53
- "jsdom": "^25.0.0",
54
- "license-badger": "^0.21.1",
61
+ "jsdom": "^30.0.1",
62
+ "license-badger": "^0.23.0",
55
63
  "npm-run-all": "^4.1.5",
56
- "nyc": "^17.0.0",
57
- "open-cli": "^8.0.0",
58
- "rimraf": "^6.0.1",
59
- "rollup": "4.21.2",
64
+ "nyc": "^18.0.0",
65
+ "open-cli": "^9.0.0",
66
+ "rimraf": "^6.1.3",
67
+ "rollup": "4.63.1",
60
68
  "rollup-plugin-istanbul": "^5.0.0",
61
- "rollup-plugin-no-op": "^1.0.2",
62
69
  "rollup-plugin-node-builtins": "^2.1.2",
63
- "typescript": "^5.5.4",
64
- "typeson": "^9.0.3",
70
+ "typescript": "^6.0.3",
71
+ "typescript-eslint": "^8.69.0",
72
+ "typeson": "^10.3.0",
65
73
  "webappfind-demos-samples": "^0.7.0"
66
74
  },
67
75
  "repository": {
@@ -76,13 +84,14 @@
76
84
  "author": "Brett Zamir",
77
85
  "contributors": [],
78
86
  "engines": {
79
- "node": ">=18.0.0"
87
+ "node": "^20.11.0 || >= 22.0.0"
80
88
  },
81
89
  "bugs": "https://github.com/es-joy/jsoe/issues",
82
90
  "license": "MIT",
83
91
  "homepage": "https://github.com/es-joy/jsoe#readme",
84
92
  "scripts": {
85
93
  "tsc": "tsc",
94
+ "tsc:ts7": "npx -y -p typescript@^7 -c \"tsc\"",
86
95
  "tsc-cypress": "tsc -p cypress/tsconfig.json",
87
96
  "license-badge": "license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg",
88
97
  "eslint": "eslint .",
@@ -99,13 +108,14 @@
99
108
  "instrument-remove": "run-p -c instrument-remove-cache instrument-remove-instrumented",
100
109
  "copy-pages": "cp node_modules/sceditor/minified/themes/default.min.css vendor/sceditor/minified/themes/default.min.css && cp node_modules/sceditor/minified/sceditor.min.js vendor/sceditor/minified/sceditor.min.js && cp node_modules/sceditor/minified/formats/bbcode.js vendor/sceditor/minified/formats/bbcode.js && cp node_modules/sceditor/minified/formats/xhtml.js vendor/sceditor/minified/formats/xhtml.js",
101
110
  "copy-index": "echo \"Copy our index.html file too? \"",
102
- "copy-jamilih": "cp node_modules/jamilih/dist/jml-es.js vendor/jamilih/dist/jml-es.js",
111
+ "copy-jamilih": "cp node_modules/jamilih/dist/jml.mjs vendor/jamilih/dist/jml.mjs",
103
112
  "copy-typeson-registry": "cp node_modules/typeson-registry/dist/index.js vendor/typeson-registry/dist/index.js",
104
- "copy-zod": "cp node_modules/zod/lib/index.mjs vendor/zod/lib/index.mjs",
105
- "copy-zodex": "cp -R node_modules/zodex/dist/esm vendor/zodex/dist",
106
- "copy-acorn": "cp -R node_modules/acorn/dist vendor/acorn/dist",
107
- "copy": "run-p copy-jamilih copy-typeson-registry copy-zod copy-zodex copy-acorn",
108
- "instrument": "run-s -c instrument-remove instrument-add copy-index rollup",
113
+ "copy-zod": "rimraf vendor/zod && cp -R node_modules/zod/v4 vendor/zod && rimraf -g vendor/zod/**/*.cjs && rimraf -g vendor/zod/**/*.cts && rimraf -g vendor/zod/*.cjs && rimraf -g vendor/zod/*.cts",
114
+ "copy-zodexy": "cp -R node_modules/zodexy/dist/esm vendor/zodexy/dist && cp node_modules/zodexy/dist/schema.zodexy.json vendor/zodexy/dist/schema.zodexy.json",
115
+ "copy-acorn": "cp -R node_modules/acorn/dist vendor/acorn",
116
+ "copy-mime": "mkdir -p vendor/mime/dist/types && cp node_modules/mime/dist/types/standard.js vendor/mime/dist/types/standard.js && cp node_modules/mime/dist/types/other.js vendor/mime/dist/types/other.js",
117
+ "copy": "run-p copy-jamilih copy-typeson-registry copy-zod copy-zodexy copy-acorn copy-mime",
118
+ "instrument": "NODE_OPTIONS=--max-old-space-size=8192 run-s -c instrument-remove instrument-add copy-index rollup",
109
119
  "coveradge": "coveradge badges/coverage-badge.svg",
110
120
  "cypress:log": "ELECTRON_ENABLE_LOGGING=1 cypress run; npm run report",
111
121
  "cypress": "cypress run --spec cypress/e2e/all.cy.js; npm run report && npm run coveradge",
@@ -0,0 +1,57 @@
1
+ allowBuilds:
2
+ core-js-bundle: true
3
+ cypress: true
4
+ es5-ext: true
5
+ is-hidden-file: true
6
+ unrs-resolver: true
7
+
8
+ minimumReleaseAgeExclude:
9
+ - jamilih@0.68.0 || 0.68.1 || 0.69.0
10
+ - cypress@15.20.1 || 15.21.0 || 16.0.0
11
+ - '@es-joy/jsdoccomment@0.95.0 || 0.95.1'
12
+ - '@typescript-eslint/types@8.67.0 || 8.69.0'
13
+ - eslint-config-ash-nazg@42.3.0 || 42.5.0 || 43.0.1 || 43.1.0 || 43.1.2 || 43.1.5 || 43.1.6
14
+ - eslint-plugin-jsdoc@64.1.0 || 64.2.1 || 64.3.0 || 64.3.2 || 64.3.3
15
+ - jsdoc-type-pratt-parser@9.1.1 || 9.1.2
16
+ - zodexy@0.21.1 || 0.21.2 || 0.22.0 || 0.23.0 || 0.24.0 || 0.24.1 || 0.25.0 || 0.26.0 || 0.26.1 || 0.27.0 || 0.30.0 || 0.30.1
17
+ - typeson-registry@13.0.1 || 13.1.0 || 14.4.0 || 14.5.0
18
+ - typeson@10.1.1 || 10.2.0 || 10.3.0
19
+ - '@rollup/rollup-android-arm-eabi@4.63.1'
20
+ - '@rollup/rollup-android-arm64@4.63.1'
21
+ - '@rollup/rollup-darwin-arm64@4.63.1'
22
+ - '@rollup/rollup-darwin-x64@4.63.1'
23
+ - '@rollup/rollup-freebsd-arm64@4.63.1'
24
+ - '@rollup/rollup-freebsd-x64@4.63.1'
25
+ - '@rollup/rollup-linux-arm-gnueabihf@4.63.1'
26
+ - '@rollup/rollup-linux-arm-musleabihf@4.63.1'
27
+ - '@rollup/rollup-linux-arm64-gnu@4.63.1'
28
+ - '@rollup/rollup-linux-arm64-musl@4.63.1'
29
+ - '@rollup/rollup-linux-loong64-gnu@4.63.1'
30
+ - '@rollup/rollup-linux-loong64-musl@4.63.1'
31
+ - '@rollup/rollup-linux-ppc64-gnu@4.63.1'
32
+ - '@rollup/rollup-linux-ppc64-musl@4.63.1'
33
+ - '@rollup/rollup-linux-riscv64-gnu@4.63.1'
34
+ - '@rollup/rollup-linux-riscv64-musl@4.63.1'
35
+ - '@rollup/rollup-linux-s390x-gnu@4.63.1'
36
+ - '@rollup/rollup-linux-x64-gnu@4.63.1'
37
+ - '@rollup/rollup-linux-x64-musl@4.63.1'
38
+ - '@rollup/rollup-openbsd-x64@4.63.1'
39
+ - '@rollup/rollup-openharmony-arm64@4.63.1'
40
+ - '@rollup/rollup-win32-arm64-msvc@4.63.1'
41
+ - '@rollup/rollup-win32-ia32-msvc@4.63.1'
42
+ - '@rollup/rollup-win32-x64-gnu@4.63.1'
43
+ - '@rollup/rollup-win32-x64-msvc@4.63.1'
44
+ - eslint-plugin-escompat@3.11.6 || 3.12.0
45
+ - rollup@4.63.1
46
+ - zod@4.5.2 || 4.5.4
47
+ - '@typescript-eslint/eslint-plugin@8.69.0'
48
+ - '@typescript-eslint/parser@8.69.0'
49
+ - '@typescript-eslint/project-service@8.69.0'
50
+ - '@typescript-eslint/scope-manager@8.69.0'
51
+ - '@typescript-eslint/tsconfig-utils@8.69.0'
52
+ - '@typescript-eslint/type-utils@8.69.0'
53
+ - '@typescript-eslint/typescript-estree@8.69.0'
54
+ - '@typescript-eslint/utils@8.69.0'
55
+ - '@typescript-eslint/visitor-keys@8.69.0'
56
+ - typescript-eslint@8.69.0
57
+ - '@types/node@26.4.1'
package/rollup.config.js CHANGED
@@ -3,18 +3,19 @@ import {nodeResolve} from '@rollup/plugin-node-resolve';
3
3
  import commonjs from '@rollup/plugin-commonjs';
4
4
  // import babel from 'rollup-plugin-babel';
5
5
  import terser from '@rollup/plugin-terser';
6
+ import json from '@rollup/plugin-json';
6
7
  import istanbul from 'rollup-plugin-istanbul';
7
- import noOp from 'rollup-plugin-no-op';
8
8
 
9
9
  export default [{
10
10
  input: 'src/index.js',
11
- external: ['react'], // Todo: remove when removed from Zodex
12
11
  output: {
13
12
  sourcemap: true,
14
13
  file: 'dist/index.js',
15
14
  format: 'es'
16
15
  },
17
16
  plugins: [
17
+ builtins(),
18
+ json(),
18
19
  terser({
19
20
  /* eslint-disable camelcase -- API */
20
21
  // Needed for Typeson's `Undefined` and other constructor detection
@@ -22,7 +23,7 @@ export default [{
22
23
  keep_classnames: true // Keep in case implementing above as classes
23
24
  /* eslint-enable camelcase -- API */
24
25
  }),
25
- nodeResolve(),
26
+ nodeResolve({browser: true}),
26
27
  commonjs()
27
28
  ]
28
29
  }, {
@@ -32,9 +33,10 @@ export default [{
32
33
  format: 'es'
33
34
  },
34
35
  plugins: [
35
- noOp({ids: ['react']}), // todo: remove when Zodex may remove dep.
36
- istanbul(),
37
- nodeResolve(),
36
+ builtins(),
37
+ json(),
38
+ istanbul({exclude: ['node_modules/**']}),
39
+ nodeResolve({browser: true}),
38
40
  commonjs()
39
41
  ]
40
42
  }, {
@@ -44,9 +46,9 @@ export default [{
44
46
  format: 'es'
45
47
  },
46
48
  plugins: [
47
- noOp({ids: ['react']}), // todo: remove when Zodex may remove dep.
48
- istanbul(),
49
- nodeResolve(),
49
+ builtins(),
50
+ istanbul({exclude: ['node_modules/**']}),
51
+ nodeResolve({browser: true}),
50
52
  commonjs()
51
53
  ]
52
54
  }, {
@@ -56,9 +58,9 @@ export default [{
56
58
  format: 'es'
57
59
  },
58
60
  plugins: [
59
- noOp({ids: ['react']}), // todo: remove when Zodex may remove dep.
60
- istanbul(),
61
- nodeResolve(),
61
+ builtins(),
62
+ istanbul({exclude: ['node_modules/**']}),
63
+ nodeResolve({browser: true}),
62
64
  commonjs()
63
65
  ]
64
66
  }, {
@@ -68,9 +70,9 @@ export default [{
68
70
  format: 'es'
69
71
  },
70
72
  plugins: [
71
- noOp({ids: ['react']}), // todo: remove when Zodex may remove dep.
72
- istanbul(),
73
- nodeResolve(),
73
+ builtins(),
74
+ istanbul({exclude: ['node_modules/**']}),
75
+ nodeResolve({browser: true}),
74
76
  commonjs()
75
77
  ]
76
78
  }, {
@@ -80,9 +82,9 @@ export default [{
80
82
  format: 'es'
81
83
  },
82
84
  plugins: [
83
- noOp({ids: ['react']}), // todo: remove when Zodex may remove dep.
84
- istanbul(),
85
- nodeResolve(),
85
+ builtins(),
86
+ istanbul({exclude: ['node_modules/**']}),
87
+ nodeResolve({browser: true}),
86
88
  commonjs()
87
89
  ]
88
90
  }, {
package/server.js CHANGED
@@ -1,11 +1,11 @@
1
- import http from 'http';
2
- import statik from '@brettz9/node-static';
1
+ import http from 'node:http';
2
+ import {Server} from '@node-static/node-static';
3
3
 
4
4
  const port = process.argv[2];
5
5
 
6
6
  const instrumented = process.argv[3];
7
7
 
8
- const fileServer = new statik.Server();
8
+ const fileServer = new Server();
9
9
 
10
10
  http.createServer(function (request, response) {
11
11
  request.addListener('end', function () {