@es-joy/jsoe 0.26.0 → 0.27.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.
- package/.gitignore +10 -0
- package/.npmignore +9 -0
- package/CHANGES.md +53 -0
- package/README.md +3 -3
- package/badges/coverage-badge.svg +1 -1
- package/dist/formats/schema.d.ts.map +1 -1
- package/dist/fundamentalTypes/arrayReferenceType.d.ts.map +1 -1
- package/dist/fundamentalTypes/arrayType.d.ts.map +1 -1
- package/dist/fundamentalTypes/regexpType.d.ts.map +1 -1
- package/dist/fundamentalTypes/stringType.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/typeChoices.d.ts.map +1 -1
- package/dist/types.d.ts +12 -3
- package/dist/types.d.ts.map +1 -1
- package/eslint.config.js +36 -26
- package/package.json +13 -11
- package/pnpm-workspace.yaml +3 -2
- package/src/formatAndTypeChoices.js +9 -9
- package/src/formats/schema.js +70 -19
- package/src/fundamentalTypes/arrayReferenceType.js +3 -2
- package/src/fundamentalTypes/arrayType.js +34 -9
- package/src/fundamentalTypes/regexpType.js +9 -1
- package/src/fundamentalTypes/stringType.js +5 -0
- package/src/typeChoices.js +17 -8
- package/src/types.js +19 -8
- package/vendor/typeson-registry/dist/index.js +83 -10
- package/vendor/zod/classic/checks.d.ts +1 -1
- package/vendor/zod/classic/checks.js +1 -1
- package/vendor/zod/classic/external.d.ts +1 -1
- package/vendor/zod/classic/external.js +1 -1
- package/vendor/zod/classic/from-json-schema.js +245 -24
- package/vendor/zod/classic/schemas.d.ts +17 -1
- package/vendor/zod/classic/schemas.js +77 -29
- package/vendor/zod/core/api.d.ts +6 -4
- package/vendor/zod/core/api.js +17 -2
- package/vendor/zod/core/checks.d.ts +1 -1
- package/vendor/zod/core/checks.js +0 -96
- package/vendor/zod/core/compile.d.ts +18 -4
- package/vendor/zod/core/compile.js +146 -67
- package/vendor/zod/core/doc.js +7 -2
- package/vendor/zod/core/errors.js +2 -5
- package/vendor/zod/core/json-schema-generator.js +2 -2
- package/vendor/zod/core/json-schema-processors.d.ts +17 -0
- package/vendor/zod/core/json-schema-processors.js +195 -64
- package/vendor/zod/core/memoizer.js +72 -23
- package/vendor/zod/core/parse.js +37 -16
- package/vendor/zod/core/regexes.d.ts +2 -0
- package/vendor/zod/core/regexes.js +8 -4
- package/vendor/zod/core/schemas.d.ts +42 -7
- package/vendor/zod/core/schemas.js +301 -94
- package/vendor/zod/core/to-json-schema.d.ts +7 -3
- package/vendor/zod/core/to-json-schema.js +8 -7
- package/vendor/zod/core/util.d.ts +25 -4
- package/vendor/zod/core/util.js +160 -143
- package/vendor/zod/core/versions.d.ts +1 -1
- package/vendor/zod/core/versions.js +2 -2
- package/vendor/zod/core/visit.js +12 -0
- package/vendor/zod/locales/ar.js +1 -0
- package/vendor/zod/locales/az.js +1 -0
- package/vendor/zod/locales/be.js +1 -0
- package/vendor/zod/locales/bg.js +1 -0
- package/vendor/zod/locales/bn.js +1 -0
- package/vendor/zod/locales/ca.js +1 -0
- package/vendor/zod/locales/ckb.js +1 -0
- package/vendor/zod/locales/cs.js +1 -0
- package/vendor/zod/locales/da.js +1 -0
- package/vendor/zod/locales/de.js +1 -0
- package/vendor/zod/locales/el.js +1 -0
- package/vendor/zod/locales/en.js +1 -0
- package/vendor/zod/locales/eo.js +1 -0
- package/vendor/zod/locales/es.js +1 -0
- package/vendor/zod/locales/fa.js +1 -0
- package/vendor/zod/locales/fi.js +1 -0
- package/vendor/zod/locales/fr-CA.js +1 -0
- package/vendor/zod/locales/fr.js +1 -0
- package/vendor/zod/locales/gu.js +1 -0
- package/vendor/zod/locales/he.js +1 -0
- package/vendor/zod/locales/hi.js +1 -0
- package/vendor/zod/locales/hr.js +1 -0
- package/vendor/zod/locales/hu.js +1 -0
- package/vendor/zod/locales/hy.js +1 -0
- package/vendor/zod/locales/id.js +1 -0
- package/vendor/zod/locales/index.d.ts +1 -0
- package/vendor/zod/locales/index.js +1 -0
- package/vendor/zod/locales/is.js +1 -0
- package/vendor/zod/locales/it.js +1 -0
- package/vendor/zod/locales/ja.js +1 -0
- package/vendor/zod/locales/ka.js +1 -0
- package/vendor/zod/locales/km.js +1 -0
- package/vendor/zod/locales/kn.js +1 -0
- package/vendor/zod/locales/ko.js +1 -0
- package/vendor/zod/locales/lt.js +1 -0
- package/vendor/zod/locales/mk.js +1 -0
- package/vendor/zod/locales/ms.js +1 -0
- package/vendor/zod/locales/ne.js +1 -0
- package/vendor/zod/locales/nl.js +1 -0
- package/vendor/zod/locales/nn.js +1 -0
- package/vendor/zod/locales/no.js +1 -0
- package/vendor/zod/locales/ota.js +1 -0
- package/vendor/zod/locales/pl.js +1 -0
- package/vendor/zod/locales/ps.js +1 -0
- package/vendor/zod/locales/pt-BR.js +1 -0
- package/vendor/zod/locales/pt.js +1 -0
- package/vendor/zod/locales/ro.js +1 -0
- package/vendor/zod/locales/ru.js +1 -0
- package/vendor/zod/locales/sk.js +1 -0
- package/vendor/zod/locales/sl.js +1 -0
- package/vendor/zod/locales/sv.js +1 -0
- package/vendor/zod/locales/ta.js +1 -0
- package/vendor/zod/locales/tg.d.ts +4 -0
- package/vendor/zod/locales/tg.js +116 -0
- package/vendor/zod/locales/th.js +1 -0
- package/vendor/zod/locales/tk.js +1 -0
- package/vendor/zod/locales/tr.js +1 -0
- package/vendor/zod/locales/uk.js +1 -0
- package/vendor/zod/locales/ur.js +1 -0
- package/vendor/zod/locales/uz.js +1 -0
- package/vendor/zod/locales/vi.js +1 -0
- package/vendor/zod/locales/yo.js +1 -0
- package/vendor/zod/locales/zh-CN.js +1 -0
- package/vendor/zod/locales/zh-TW.js +1 -0
- package/vendor/zod/mini/checks.d.ts +1 -1
- package/vendor/zod/mini/checks.js +1 -1
- package/vendor/zod/mini/external.d.ts +1 -1
- package/vendor/zod/mini/external.js +1 -1
- package/vendor/zod/mini/schemas.d.ts +8 -0
- package/vendor/zod/mini/schemas.js +19 -2
- package/vendor/zodexy/dist/esm/index.js +34 -1
- package/vendor/zodexy/dist/schema.zodexy.json +18 -0
package/.gitignore
ADDED
package/.npmignore
ADDED
package/CHANGES.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# CHANGES TO `@es-joy/jsoe`
|
|
2
2
|
|
|
3
|
+
## 0.27.0
|
|
4
|
+
|
|
5
|
+
- feat: add `properties` schema support: a zodexy `{type: 'properties'}` node
|
|
6
|
+
(Zod 4.5+ `z.properties()`) is now edited, viewed, and preloaded through the
|
|
7
|
+
same `object` UI, differing from `object` in that it has no `catchall` and
|
|
8
|
+
does not strip properties outside its declared shape.
|
|
9
|
+
- `{type: 'properties'}` maps to the fundamental `object` type
|
|
10
|
+
(`zodexToStructuredCloningTypeMap`), so it reuses the object editor;
|
|
11
|
+
`getTypesForSchema` handles it alongside `object`.
|
|
12
|
+
- A preloaded key that is *not* in the declared shape is kept (not
|
|
13
|
+
stripped) and rendered as a free property offered the unconstrained
|
|
14
|
+
type choice, the same treatment a `looseRecord`'s non-conforming entry
|
|
15
|
+
gets. `convertFromTypeson` (`formats/schema.js`) and `getChildSchema`
|
|
16
|
+
(`fundamentalTypes/arrayType.js`) return `{type: 'unknown'}` for such a
|
|
17
|
+
key. See the related `fix:` below for why.
|
|
18
|
+
- Because it renders as an `object`, a `properties` node would otherwise be
|
|
19
|
+
an indistinguishable "Object" in the type pull-down (`types.js`
|
|
20
|
+
`getOptionForType`) and the edit-mode container-heading tooltip
|
|
21
|
+
(`arrayType.js`); it is now named "Properties" when the schema carries
|
|
22
|
+
no `meta` label of its own. `xor`-branch labels
|
|
23
|
+
(`typeChoices.js` `deriveXorBranchLabel`) likewise treat it as a
|
|
24
|
+
property bag.
|
|
25
|
+
- A new `isPropertyBagType` helper (`object` or `properties`) lets
|
|
26
|
+
`mergeSchema` merge the declared property schemas of two intersected
|
|
27
|
+
`properties` nodes — the previous `type !== 'object'` guard returned
|
|
28
|
+
early and silently dropped the right branch's properties — and lets
|
|
29
|
+
`isValueValidationRequired` treat `properties` like `object` (its
|
|
30
|
+
per-property controls already carry their own schemas, so no
|
|
31
|
+
value-level reparse is needed).
|
|
32
|
+
- fix: a preloaded property outside an `object` schema's declared shape, when
|
|
33
|
+
the schema has no `catchall`, is now edited through the unconstrained type
|
|
34
|
+
choice (`{type: 'unknown'}`) instead of an "unschema'd" control. Previously
|
|
35
|
+
`convertFromTypeson` returned the value's bare runtime type while
|
|
36
|
+
`getChildSchema` returned `undefined`, so the type-chooser was built with
|
|
37
|
+
no `schemaContent` and could render an extra, stray control (e.g. a number
|
|
38
|
+
widget beside the string input). `{type: 'unknown'}` expands to the full
|
|
39
|
+
candidate-type set, so the lossless-match pass picks the single control
|
|
40
|
+
matching the value and still offers the `<select>` to change it — the same
|
|
41
|
+
handling `properties` and a `looseRecord`'s non-conforming entry get. A
|
|
42
|
+
strict `object` still strips the key on parse; this governs only how it is
|
|
43
|
+
edited.
|
|
44
|
+
- feat: add `iban` string kind
|
|
45
|
+
|
|
46
|
+
## 0.26.1
|
|
47
|
+
|
|
48
|
+
- fix: validate invalid regexp source edits
|
|
49
|
+
- fix: schema editor readiness and zodexy schema rendering
|
|
50
|
+
- Fixed programmatic schema branch selection so `$setType({specificSchema})` builds the supplied schema-specific UI branch.
|
|
51
|
+
- Made `setValue()` readiness wait for deferred nested control builds before resolving.
|
|
52
|
+
- Preserved `avoidReport` through reference validation during programmatic setup.
|
|
53
|
+
- Fixed validation of flattened schema branches containing `$ref` children by retaining the original schema document for reference resolution.
|
|
54
|
+
- Added Cypress coverage for programmatic schema branch selection and rendering existing schema values with record entries.
|
|
55
|
+
|
|
3
56
|
## 0.26.0
|
|
4
57
|
|
|
5
58
|
- feat: awaitable readiness for deferred type/editor builds
|
package/README.md
CHANGED
|
@@ -119,7 +119,7 @@ Supported supertypes include:
|
|
|
119
119
|
|
|
120
120
|
## To-dos
|
|
121
121
|
|
|
122
|
-
1. Ability to replace content with raw
|
|
122
|
+
1. Ability to replace content with raw [JSON6](https://github.com/d3x0r/JSON6)/Typeson/Safe Eval (no functions in default mode, etc.)/AI (including speech-to-text) if it validates
|
|
123
123
|
1. Expand fundamental types
|
|
124
124
|
1. Not in typeson-registry
|
|
125
125
|
1. Structured Cloning
|
|
@@ -129,11 +129,11 @@ Supported supertypes include:
|
|
|
129
129
|
1. Structured Cloning
|
|
130
130
|
1. (JavaScript types already complete)
|
|
131
131
|
1. Web/API types
|
|
132
|
+
1. quotaexceedederror
|
|
133
|
+
1. webtransporterror
|
|
132
134
|
1. imagedata
|
|
133
135
|
1. imagebitmap
|
|
134
136
|
1. domquad
|
|
135
|
-
1. quotaexceedederror
|
|
136
|
-
1. webtransporterror
|
|
137
137
|
1. cryptokey
|
|
138
138
|
1. audiodata
|
|
139
139
|
1. encodedaudiochunk
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="428" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="orange" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h112v20H316z"/><path fill="url(#smooth)" d="M0 0h428v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 97.51%</text><text class="high" x="5" y="14">Statements 97.51%</text><text class="shadow" x="125.5" y="15">Branches 94.24%</text><text class="high" x="125" y="14">Branches 94.24%</text><text class="shadow" x="234.5" y="15">Lines 97.57%</text><text class="high" x="234" y="14">Lines 97.57%</text><text class="shadow" x="321.5" y="15">Functions 98.07%</text><text class="high" x="321" y="14">Functions 98.07%</text></g></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/formats/schema.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/formats/schema.js"],"names":[],"mappings":"AAyOA;;;;;;;;;;;;;GAaG;AACH,yCALW,YAAY,CAAC,cAAc,aAAa,EAAE,OAAO,CAAC,aAClD,WAAW,GAAC,SAAS,OACrB,MAAM,GAAC,MAAM,GAAC,SAAS,GACrB,OAAO,CAenB;AAED;;;;;;;;GAQG;AACH,6CALW,YAAY,CAAC,cAAc,aAAa,EAAE,OAAO,CAAC,aAClD,OAAO,QAAQ,EAAE,OAAO,SACxB,OAAO,GACL;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAW5C;AAED;;;;;;;;GAQG;AACH,0CALW,YAAY,CAAC,cAAc,aAAa,EAAE,OAAO,CAAC,UAClD,WAAW,SACX,OAAO,GACL,OAAO,CAInB;AAiDD;;;GAGG;AACH,kDAHW,WAAW,GACT,WAAW,CAIvB;AAsOD;;;;GAIG;AACH,gDAJW,WAAW,gBACX,WAAW,GACT,GAAG,CAAC,WAAW,CAAC,CA8R5B;;;;;oBAt1BY,CAAC,IADD,CAAC,CAAC,MAAM,CAAC,CAAC;iCAKV,OAAO,CACf,IAAI,CAAC,OAAO,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CACtC;0BA4SS,OAAO,QAAQ,EAAE,MAAM;2BAGvB,OAAO,qBAAqB,EAAE,YAAY;AAmiBvD,6CAA6C;AAC7C,sBADW,OAAO,eAAe,EAAE,MAAM,CA0TvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayReferenceType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/arrayReferenceType.js"],"names":[],"mappings":";AAMA;;GAEG;AACH,kCAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,IAAI,EAAE,OAAO,CAAA;CAAC,
|
|
1
|
+
{"version":3,"file":"arrayReferenceType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/arrayReferenceType.js"],"names":[],"mappings":";AAMA;;GAEG;AACH,kCAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,IAAI,EAAE,OAAO,CAAA;CAAC,CAkN1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/arrayType.js"],"names":[],"mappings":";0CAoBW;IACN,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,aAAa,EAAE,aAAa,CAAC;IAC1C,KAAK,EAAE,OAAO,eAAe,EAAE,oBAAoB,CAAC;IACpD,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;CAC3D,KACS,OAAO;sBAIP,MAAM;mDAKN,KAAK,GAAC,OAAO;oCAGb,MAAM,gBAAgB,EAAE;+BAGxB,MAAM,CAAC,iBAAiB,GAAG;IACnC,SAAS,EAAE,OAAO,mBAAmB,EAAE,QAAQ,CAAA;CAChD,CAAC,EAAE;6BAGM,MAAM,IAAI;sCAIV,gBAAgB,EAAE;qCAKlB,IAAI;4BAGJ,MAAM,cAAc,GAAG;IAC/B,sBAAsB,EAAE,qBAAqB,CAAC;IAC9C,kBAAkB,EAAE,iBAAiB,CAAC;IACtC,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,iBAAiB,EAAE,gBAAgB,CAAA;CACpC;uBAGS,MAAM,OAAO,CAAC,IAAI,CAAC;2BAKrB;IAAC,WAAW,CAAC,EAAE,IAAI,CAAA;CAAC,KAClB,IAAI;+BAIJ,MAAM,gBAAgB,GAAC,SAAS;uBAIhC,GAAG;AAmBhB;;GAEG;AACH,yBAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,MAAM,CAAC,EAAE,OAAO,GAAC,SAAS,CAAA;CAAC,
|
|
1
|
+
{"version":3,"file":"arrayType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/arrayType.js"],"names":[],"mappings":";0CAoBW;IACN,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,aAAa,EAAE,aAAa,CAAC;IAC1C,KAAK,EAAE,OAAO,eAAe,EAAE,oBAAoB,CAAC;IACpD,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;CAC3D,KACS,OAAO;sBAIP,MAAM;mDAKN,KAAK,GAAC,OAAO;oCAGb,MAAM,gBAAgB,EAAE;+BAGxB,MAAM,CAAC,iBAAiB,GAAG;IACnC,SAAS,EAAE,OAAO,mBAAmB,EAAE,QAAQ,CAAA;CAChD,CAAC,EAAE;6BAGM,MAAM,IAAI;sCAIV,gBAAgB,EAAE;qCAKlB,IAAI;4BAGJ,MAAM,cAAc,GAAG;IAC/B,sBAAsB,EAAE,qBAAqB,CAAC;IAC9C,kBAAkB,EAAE,iBAAiB,CAAC;IACtC,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,iBAAiB,EAAE,gBAAgB,CAAA;CACpC;uBAGS,MAAM,OAAO,CAAC,IAAI,CAAC;2BAKrB;IAAC,WAAW,CAAC,EAAE,IAAI,CAAA;CAAC,KAClB,IAAI;+BAIJ,MAAM,gBAAgB,GAAC,SAAS;uBAIhC,GAAG;AAmBhB;;GAEG;AACH,yBAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,MAAM,CAAC,EAAE,OAAO,GAAC,SAAS,CAAA;CAAC,CA2mFvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regexpType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/regexpType.js"],"names":[],"mappings":";AAIA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,
|
|
1
|
+
{"version":3,"file":"regexpType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/regexpType.js"],"names":[],"mappings":";AAIA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CA+HnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/stringType.js"],"names":[],"mappings":";AAMA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"stringType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/stringType.js"],"names":[],"mappings":";AAMA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,CAqVxC"}
|