@es-joy/jsoe 0.23.1 → 0.24.1

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 (54) hide show
  1. package/CHANGES.md +10 -0
  2. package/README.md +25 -1
  3. package/badges/coverage-badge.svg +1 -1
  4. package/dist/formatAndTypeChoices.d.ts +9 -2
  5. package/dist/formatAndTypeChoices.d.ts.map +1 -1
  6. package/dist/formats/arbitraryJS.d.ts +4 -0
  7. package/dist/formats/arbitraryJS.d.ts.map +1 -0
  8. package/dist/formats/schema.d.ts.map +1 -1
  9. package/dist/formats/structuredCloning.d.ts +1 -1
  10. package/dist/formats/structuredCloning.d.ts.map +1 -1
  11. package/dist/formats.d.ts +13 -10
  12. package/dist/formats.d.ts.map +1 -1
  13. package/dist/fundamentalTypes/blobType.d.ts.map +1 -1
  14. package/dist/fundamentalTypes/fileType.d.ts.map +1 -1
  15. package/dist/fundamentalTypes/functionType.d.ts +1 -0
  16. package/dist/fundamentalTypes/functionType.d.ts.map +1 -1
  17. package/dist/fundamentalTypes/promiseType.d.ts.map +1 -1
  18. package/dist/fundamentalTypes/stringType.d.ts.map +1 -1
  19. package/dist/fundamentalTypes/symbolType.d.ts.map +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/types.d.ts +33 -27
  23. package/dist/types.d.ts.map +1 -1
  24. package/dist/vendor-imports.d.ts +2 -1
  25. package/package.json +13 -14
  26. package/rollup.config.js +12 -0
  27. package/src/formatAndTypeChoices.js +32 -7
  28. package/src/formats/arbitraryJS.js +27 -0
  29. package/src/formats/indexedDBKey.js +1 -1
  30. package/src/formats/json.js +1 -1
  31. package/src/formats/schema.js +17 -13
  32. package/src/formats/structuredCloning.js +37 -8
  33. package/src/formats.js +15 -7
  34. package/src/fundamentalTypes/arrayReferenceType.js +1 -1
  35. package/src/fundamentalTypes/bigintObjectType.js +1 -1
  36. package/src/fundamentalTypes/bigintType.js +1 -1
  37. package/src/fundamentalTypes/blobType.js +11 -3
  38. package/src/fundamentalTypes/fileType.js +9 -4
  39. package/src/fundamentalTypes/functionType.js +237 -69
  40. package/src/fundamentalTypes/numberType.js +3 -3
  41. package/src/fundamentalTypes/objectReferenceType.js +1 -1
  42. package/src/fundamentalTypes/promiseType.js +144 -15
  43. package/src/fundamentalTypes/stringType.js +8 -7
  44. package/src/fundamentalTypes/symbolType.js +14 -6
  45. package/src/subTypes/blobHTMLType.js +1 -1
  46. package/src/types.js +31 -25
  47. package/src/vendor-imports.js +6 -1
  48. package/vendor/acorn/dist/acorn.d.mts +856 -0
  49. package/vendor/acorn/dist/acorn.d.ts +856 -0
  50. package/vendor/acorn/dist/acorn.js +6065 -0
  51. package/vendor/acorn/dist/acorn.mjs +6036 -0
  52. package/vendor/acorn/dist/bin.js +90 -0
  53. package/vendor/jamilih/dist/jml-es.js +9 -14
  54. package/vendor/typeson-registry/dist/index.js +70 -26
package/CHANGES.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # CHANGES TO `@es-joy/jsoe`
2
2
 
3
+ ## 0.24.1
4
+
5
+ - fix: Safari bug with `revokeObjectURL` and videos
6
+ - fix: switch to mp4 recording for now over webm for sake of Safari
7
+ - fix: set path for now to sceditor as relative to root
8
+
9
+ ## 0.24.0
10
+
11
+ - feat: Support for non-structured cloning types (symbol, promise, function)
12
+
3
13
  ## 0.23.1
4
14
 
5
15
  - fix(blob HTML): truncating file size at comma
package/README.md CHANGED
@@ -68,7 +68,7 @@ Zodex) schema types:
68
68
  - `tuple`
69
69
  - `void` (preferred in Zodex when specified as such)
70
70
 
71
- Work has begun on the following non-structured-cloning Zodex schema types:
71
+ And there are the following non-structured-cloning Zodex schema types:
72
72
 
73
73
  - `function`
74
74
  - `promise`
@@ -147,3 +147,27 @@ Supported supertypes include:
147
147
  1. Implement as Custom Elements?
148
148
  1. Add drag-and-drop support for `File` type
149
149
  1. Import CSV as array
150
+ 1. **Schema-driven search**
151
+ 1. Objects: "Has property <property pull-down>" (avoid listing required)
152
+ 1. Arrays, Set, FileList, tuple with rest: "Has length/size of <number>"; arrays: "Is/Is not sparse"
153
+ 1. Union/Discriminated Union: "Has type <type pull-down>" (including when union is part of a key to records, maps, discriminator of discriminated union, etc.)
154
+ 1. undefined/void, null, NaN, Effect, Non-editable (no variants to allow for distinct search; if optional, would be in union); non-editable might allow arbitrary JS query against it, but...
155
+ 1. boolean, BooleanObject: true or false
156
+ 1. number, NumberObject: OR Ranges/Is Not Range, Is/Is Not Integer
157
+ 1. bigint, bigint object: OR Ranges/Is Not Range
158
+ 1. BufferSource: OR Range/IS Not Range
159
+ 1. string, StringObject, Blob, File, regexp (source), symbol (description): OR literal or regex search/Does Not contain search; regexp gets multiple select search of flags or regex search?
160
+ 1. Blob HTML:
161
+ 1. XPath (ideally JS like jtlt for XSLT-like JS or doc() and collection() as part of $for in FLWOR shorthand for XQuery-like JS)
162
+ 2. CSS selectors
163
+ 3. Full text search
164
+ 4. Regex search of raw HTML
165
+ 1. Special number: multiple select of "Infinity", "-Negativity", "NaN"
166
+ 1. date: OR date range, Is Not Range
167
+ 1. Enum, Native Enum: multiple select; native enum also can search key vs. value
168
+ 1. promise, Literal, catch: pass on children
169
+ 1. function; pass on args, return type
170
+ 1. Error, Special Errors, DOMException: Literal/Regex search of child string properties, numeric of number children; also pull-down of name for DOMException
171
+ 1. DOMRect, DOMPoint, DOMMatrix: numeric search ranges for children; "Is/Is not Readonly"; DOMMatrix: "Is/Is not 3d"
172
+ 1. Map, Record: string-type searches of keys, values; ideally would allow search to insist on match of key and value (e.g., has key 2-4 and value 7-9)
173
+ 1. Tuple (with rest has size search as with arrays): otherwise just passes on children
@@ -1 +1 @@
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 99.84%</text><text class="high" x="5" y="14">Statements 99.84%</text><text class="shadow" x="125.5" y="15">Branches 99.49%</text><text class="high" x="125" y="14">Branches 99.49%</text><text class="shadow" x="234.5" y="15">Lines 99.84%</text><text class="high" x="234" y="14">Lines 99.84%</text><text class="shadow" x="321.5" y="15">Functions 99.87%</text><text class="high" x="321" y="14">Functions 99.87%</text></g></svg>
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 99.08%</text><text class="high" x="5" y="14">Statements 99.08%</text><text class="shadow" x="125.5" y="15">Branches 98.86%</text><text class="high" x="125" y="14">Branches 98.86%</text><text class="shadow" x="234.5" y="15">Lines 99.07%</text><text class="high" x="234" y="14">Lines 99.07%</text><text class="shadow" x="321.5" y="15">Functions 98.59%</text><text class="high" x="321" y="14">Functions 98.59%</text></g></svg>
@@ -22,11 +22,14 @@
22
22
  * will be set and required at the root level. This option will also
23
23
  * prevent selection of indexedDB key at root (since a key cannot be a
24
24
  * plain object).
25
+ * @param {boolean} [cfg.arbitraryJS] Whether to allow the choice of
26
+ * arbitrary JavaScript
25
27
  * @param {string} [cfg.typeNamespace] Used to prevent conflicts with other
26
28
  * instances of typeChoices on the page
27
29
  * @param {string} [cfg.selectedSchema]
28
30
  * @param {import('./formats.js').default} [cfg.formats]
29
31
  * @param {import('./types.js').default} [cfg.types]
32
+ * @param {boolean} [cfg.preselectSchema]
30
33
  * @returns {Promise<{
31
34
  * formatChoices: FormatChoices,
32
35
  * typesHolder: TypesHolder,
@@ -41,16 +44,18 @@
41
44
  * }>} The selector for types and the container for them. Both should be
42
45
  * added to the page.
43
46
  */
44
- export function formatAndTypeChoices({ schemas, getSchemaContent, hasValue, singleValue, hasKeyPath, typeNamespace, selectedSchema, formats, types }: {
47
+ export function formatAndTypeChoices({ schemas, getSchemaContent, hasValue, singleValue, hasKeyPath, arbitraryJS, preselectSchema, typeNamespace, selectedSchema, formats, types }: {
45
48
  schemas?: string[] | undefined;
46
49
  getSchemaContent?: ((schema: string) => Promise<ZodexSchema>) | undefined;
47
50
  hasValue?: boolean | undefined;
48
51
  singleValue?: boolean | undefined;
49
52
  hasKeyPath?: boolean | undefined;
53
+ arbitraryJS?: boolean | undefined;
50
54
  typeNamespace?: string | undefined;
51
55
  selectedSchema?: string | undefined;
52
56
  formats?: Formats | undefined;
53
57
  types?: Types | undefined;
58
+ preselectSchema?: boolean | undefined;
54
59
  }): Promise<{
55
60
  formatChoices: HTMLSelectElement & {
56
61
  $setFormat: (this: HTMLSelectElement & {
@@ -88,10 +93,12 @@ export function formatAndTypeChoices({ schemas, getSchemaContent, hasValue, sing
88
93
  formats: import("./formats.js").default;
89
94
  types: import("./types.js").default;
90
95
  }>;
91
- export function getFormatAndSchemaChoices({ schemas, selectedSchema, hasKeyPath }?: {
96
+ export function getFormatAndSchemaChoices({ schemas, selectedSchema, hasKeyPath, preselectSchema, arbitraryJS }?: {
92
97
  schemas?: string[] | undefined;
93
98
  selectedSchema?: string | undefined;
94
99
  hasKeyPath?: boolean | undefined;
100
+ arbitraryJS?: boolean | undefined;
101
+ preselectSchema?: boolean | undefined;
95
102
  }): DocumentFragment;
96
103
  export type SetValue = (value: import("./formats.js").StructuredCloneValue, stateObj: import("./types.js").StateObject) => Promise<void>;
97
104
  export type ZodexSchema = import("./formats/schema.js").ZodexSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"formatAndTypeChoices.d.ts","sourceRoot":"","sources":["../src/formatAndTypeChoices.js"],"names":[],"mappings":"AAuDA;;;;;GAKG;AAEH;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,sJA/BG;IAAuB,OAAO;IACyB,gBAAgB,aAAtD,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC;IAE1B,QAAQ;IAGR,WAAW;IACX,UAAU;IAKX,aAAa;IAEb,cAAc;IACU,OAAO;IACT,KAAK;CAChD,GAAU,OAAO,CAAC;IACpB,aAAiB;;;;qDAmDC,OAAO,CAAC,IAAI,CAAC;gBAlBf;YACV,WAAe,CAAC,EAAE,OAAO,cAAc,EAAE,eAAe,CAAC;YACzD,WAAe,EAAE,OAAO,CAAC;YACzB,MAAU,CAAC,EAAE,MAAM,CAAA;SAChB,KAIS,OAAO,CAAC,IAAI,CAAC;;;iDAUb,OAAO,CAAC,IAAI,CAAC;MAnDE;IACjC,WAAe,iBAAc;IAC7B,QAAY,EAAE,CAAC,aAAa;;;;qDAiDV,OAAO,CAAC,IAAI,CAAC;gBAlBf;YACV,WAAe,CAAC,EAAE,OAAO,cAAc,EAAE,eAAe,CAAC;YACzD,WAAe,EAAE,OAAO,CAAC;YACzB,MAAU,CAAC,EAAE,MAAM,CAAA;SAChB,KAIS,OAAO,CAAC,IAAI,CAAC;;;iDAUb,OAAO,CAAC,IAAI,CAAC;KAjDY,EAAE,WAAW,gBAAa,CAAC,CAAC;IACvE,QAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,YAAY,EAA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,QAAY,EAAE,CAAC,aAAa;;;;qDAuDV,OAAO,CAAC,IAAI,CAAC;gBAlBf;YACV,WAAe,CAAC,EAAE,OAAO,cAAc,EAAE,eAAe,CAAC;YACzD,WAAe,EAAE,OAAO,CAAC;YACzB,MAAU,CAAC,EAAE,MAAM,CAAA;SAChB,KAIS,OAAO,CAAC,IAAI,CAAC;;;iDAUb,OAAO,CAAC,IAAI,CAAC;KAvDY,EAAE,WAAW,gBAAa,CAAC,CAAC;IACvE,QAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,YAAY,EAAE,WAAW,EACnD,WAAW,EAAE,MAAM,KAAK,OAAO,cAAc,EAAE,oBAAoB,CAAC;IAC1E,OAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,cAAkB,EAAE,MAAM,OAAO,CAAC;IAClC,QAAY,EAAE,QAAQ,CAAC;IACvB,OAAW,EAAE,OAAO,cAAc,EAAE,OAAO,CAAC;IAC5C,KAAS,EAAE,OAAO,YAAY,EAAE,OAAO,CAAA;CACpC,CAAC,CAuPJ;AA9UM,kHAVJ;IAAuB,OAAO;IACT,cAAc;IACb,UAAU;IAGV,WAAW;IAEX,eAAe;CACrC,GAAU,gBAAgB,CA0C5B;+BAIU,OAAO,cAAc,EAAE,oBAAoB,YAC3C,OAAO,YAAY,EAAE,WAAW,KAC9B,OAAO,CAAC,IAAI,CAAC;0BAIb,OAAO,qBAAqB,EAAE,WAAW;mCAnEzC,cAAc,GAAC,IAAI;oBALZ,cAAc;kBADhB,YAAY"}
@@ -0,0 +1,4 @@
1
+ export default arbitraryJS;
2
+ /** @type {import('../formats.js').Format} */
3
+ declare const arbitraryJS: import("../formats.js").Format;
4
+ //# sourceMappingURL=arbitraryJS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arbitraryJS.d.ts","sourceRoot":"","sources":["../../src/formats/arbitraryJS.js"],"names":[],"mappings":";AAEA,6CAA6C;AAC7C,2BADW,OAAO,eAAe,EAAE,MAAM,CAsBvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/formats/schema.js"],"names":[],"mappings":"AAuMA;;;;GAIG;AACH,gDAJW,WAAW,gBACX,WAAW,GACT,GAAG,CAAC,WAAW,CAAC,CAiX5B;;0BAjgBY,OAAO,OAAO,EAAE,MAAM;2BAGtB,OAAO,qBAAqB,EAAE,YAAY;;;;oBAlD1C,CAAC,IADD,CAAC,CAAC,MAAM,CAAC,CAAC;iCAMV,OAAO,CAChB,IAAI,CAAC,OAAO,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CACrC;AA2iBH,6CAA6C;AAC7C,sBADW,OAAO,eAAe,EAAE,MAAM,CA8MvC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/formats/schema.js"],"names":[],"mappings":"AA4MA;;;;GAIG;AACH,gDAJW,WAAW,gBACX,WAAW,GACT,GAAG,CAAC,WAAW,CAAC,CAiX5B;;0BAjgBY,OAAO,OAAO,EAAE,MAAM;2BAGtB,OAAO,qBAAqB,EAAE,YAAY;;;;oBAvD1C,CAAC,IADD,CAAC,CAAC,MAAM,CAAC,CAAC;iCAMV,OAAO,CAChB,IAAI,CAAC,OAAO,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CACrC;AAgjBH,6CAA6C;AAC7C,sBADW,OAAO,eAAe,EAAE,MAAM,CA6MvC"}
@@ -5,7 +5,7 @@ export default structuredCloning;
5
5
  */
6
6
  export type AddAndSetArrayElement = (info: {
7
7
  propName: string;
8
- type: import("../types.js").AvailableType;
8
+ type: import("../types.js").AvailableArbitraryType;
9
9
  value: import("../formats.js").StructuredCloneValue;
10
10
  bringIntoFocus?: boolean;
11
11
  setAValue?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"structuredCloning.d.ts","sourceRoot":"","sources":["../../src/formats/structuredCloning.js"],"names":[],"mappings":";;;;;oCAwBa,CAAC,IAAI,EAAE;IACnB,QAAY,EAAE,MAAM,CAAC;IACrB,IAAQ,EAAE,OAAO,aAAa,EAAE,aAAa,CAAC;IAC9C,KAAS,EAAE,OAAO,eAAe,EAAE,oBAAoB,CAAC;IACxD,cAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAiB,CAAC,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;IAC/D,cAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAa,CAAC,EAAE,MAAM,CAAA;CACnB,KAAK,WAAW,GAAC,IAAI;kCAIZ,OAAO,kBAAkB,EAAE,mBAAmB;AA+b3D,6CAA6C;AAC7C,iCADW,OAAO,eAAe,EAAE,MAAM,CAyIvC"}
1
+ {"version":3,"file":"structuredCloning.d.ts","sourceRoot":"","sources":["../../src/formats/structuredCloning.js"],"names":[],"mappings":";;;;;oCAwBa,CAAC,IAAI,EAAE;IACnB,QAAY,EAAE,MAAM,CAAC;IACrB,IAAQ,EAAE,OAAO,aAAa,EAAE,sBAAsB,CAAC;IACvD,KAAS,EAAE,OAAO,eAAe,EAAE,oBAAoB,CAAC;IACxD,cAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAiB,CAAC,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;IAC/D,cAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAa,CAAC,EAAE,MAAM,CAAA;CACnB,KAAK,WAAW,GAAC,IAAI;kCAIZ,OAAO,kBAAkB,EAAE,mBAAmB;AAgc3D,6CAA6C;AAC7C,iCADW,OAAO,eAAe,EAAE,MAAM,CAqKvC"}
package/dist/formats.d.ts CHANGED
@@ -4,9 +4,9 @@ export default Formats;
4
4
  */
5
5
  export type StructuredCloneValue = any;
6
6
  export type GetTypesAndSchemasForFormatAndState = (types: import("./types.js").default, format: AvailableFormat, state?: string | undefined, schemaObject?: import("./formatAndTypeChoices.js").ZodexSchema | undefined, schemaOriginal?: import("./formatAndTypeChoices.js").ZodexSchema | undefined) => TypesAndSchemaObjects | undefined;
7
- export type AvailableFormat = "indexedDBKey" | "json" | "structuredCloning" | "schema";
7
+ export type AvailableFormat = "indexedDBKey" | "json" | "structuredCloning" | "arbitraryJS" | "schema";
8
8
  export type TypesAndSchemaObjects = {
9
- types: (import("./types.js").AvailableType)[];
9
+ types: (import("./types.js").AvailableArbitraryType)[];
10
10
  schemaObjects: import("./formats/schema.js").ZodexSchema[];
11
11
  };
12
12
  /**
@@ -20,7 +20,7 @@ export type Format = {
20
20
  * of types generally available to structured cloning. See
21
21
  * {@link getTypesAndSchemasForState} for context-dependent method.
22
22
  */
23
- types: () => (import("./types.js").AvailableType)[];
23
+ types: () => (import("./types.js").AvailableArbitraryType)[];
24
24
  /**
25
25
  * Traverses over data to build and return
26
26
  * a relevant UI element.
@@ -32,8 +32,8 @@ export type Format = {
32
32
  */
33
33
  getTypesAndSchemasForState: (types: import("./types.js").default, state?: string, schemaObject?: import("./formatAndTypeChoices.js").ZodexSchema | undefined, schemaOriginal?: import("./formatAndTypeChoices.js").ZodexSchema | undefined) => TypesAndSchemaObjects | undefined;
34
34
  testInvalid?: ((newType: string, value: Date | Array<StructuredCloneValue>) => boolean | undefined) | undefined;
35
- convertFromTypeson?: ((typesonType: import("./types.js").AvailableType, types: import("./types.js").default, v?: import("./formats.js").StructuredCloneValue, arrayOrObjectPropertyName?: string, parentSchema?: [import("zodex").SzType, number | undefined] | undefined, stateObj?: import("./types.js").StateObject) => {
36
- type: import("./types.js").AvailableType | undefined;
35
+ convertFromTypeson?: ((typesonType: import("./types.js").AvailableArbitraryType, types: import("./types.js").default, v?: import("./formats.js").StructuredCloneValue, arrayOrObjectPropertyName?: string, parentSchema?: [import("zodex").SzType, number | undefined] | undefined, stateObj?: import("./types.js").StateObject) => {
36
+ type: import("./types.js").AvailableArbitraryType | undefined;
37
37
  schema?: import("zodex").SzType | undefined;
38
38
  mustBeOptional?: boolean;
39
39
  schemaIdx?: number;
@@ -55,11 +55,12 @@ export type Format = {
55
55
  * @returns {TypesAndSchemaObjects|undefined}
56
56
  */
57
57
  /**
58
- * @typedef {"indexedDBKey"|"json"|"structuredCloning"|"schema"} AvailableFormat
58
+ * @typedef {"indexedDBKey"|"json"|"structuredCloning"|
59
+ * "arbitraryJS"|"schema"} AvailableFormat
59
60
  */
60
61
  /**
61
62
  * @typedef {{
62
- * types: (import('./types.js').AvailableType)[],
63
+ * types: (import('./types.js').AvailableArbitraryType)[],
63
64
  * schemaObjects: import('./formats/schema.js').ZodexSchema[]
64
65
  * }} TypesAndSchemaObjects
65
66
  */
@@ -73,7 +74,9 @@ export type Format = {
73
74
  */
74
75
  /**
75
76
  * @typedef {object} Format
76
- * @property {() => (import('./types.js').AvailableType)[]} types Returns list
77
+ * @property {() => (
78
+ * import('./types.js').AvailableArbitraryType
79
+ * )[]} types Returns list
77
80
  * of types generally available to structured cloning. See
78
81
  * {@link getTypesAndSchemasForState} for context-dependent method.
79
82
  * @property {FormatIterator} iterate Traverses over data to build and return
@@ -91,14 +94,14 @@ export type Format = {
91
94
  * newType: string, value: Date|Array<StructuredCloneValue>
92
95
  * ) => boolean|undefined} [testInvalid]
93
96
  * @property {(
94
- * typesonType: import('./types.js').AvailableType,
97
+ * typesonType: import('./types.js').AvailableArbitraryType,
95
98
  * types: import('./types.js').default,
96
99
  * v?: import('./formats.js').StructuredCloneValue,
97
100
  * arrayOrObjectPropertyName?: string,
98
101
  * parentSchema?: [import('zodex').SzType, number|undefined]|undefined,
99
102
  * stateObj?: import('./types.js').StateObject,
100
103
  * ) => {
101
- * type: import('./types.js').AvailableType|undefined
104
+ * type: import('./types.js').AvailableArbitraryType|undefined
102
105
  * schema?: import('zodex').SzType|undefined,
103
106
  * mustBeOptional?: boolean,
104
107
  * schemaIdx?: number
@@ -1 +1 @@
1
- {"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../src/formats.js"],"names":[],"mappings":";;;;mCAOa,GAAG;0DAKL,OAAO,YAAY,EAAE,OAA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BAA2B,EAAE,WAAW,GACzD,SAAa,mBACH,OAAO,2BAA2B,EAAE,WAAW,GACzD,SAAa,GACD,qBAAqB,GAAC,SAAS,CAC3C;IA6IC;;;OAGG;IACH,2BAHW,eAAe,GACb,MAAM,CAIlB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"blobType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/blobType.js"],"names":[],"mappings":";uBAMa,IAAI,GAAC;IACjB,IAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAC3B;uBAIS,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;AAsIrC;;GAEG;AACH,wBAFU,OAAO,aAAa,EAAE,UAAU,CAk2BxC"}
1
+ {"version":3,"file":"blobType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/blobType.js"],"names":[],"mappings":";uBAMa,IAAI,GAAC;IACjB,IAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAC3B;uBAIS,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;AAsIrC;;GAEG;AACH,wBAFU,OAAO,aAAa,EAAE,UAAU,CA02BxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fileType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/fileType.js"],"names":[],"mappings":";uBAMa,IAAI,GAAC;IACjB,IAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAC7C,YAAgB,EAAE,MAAM,CAAA;CACrB;uBAIS,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;AAuJrC;;GAEG;AACH,wBAFU,OAAO,aAAa,EAAE,UAAU,CAs7BxC"}
1
+ {"version":3,"file":"fileType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/fileType.js"],"names":[],"mappings":";uBAMa,IAAI,GAAC;IACjB,IAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAC7C,YAAgB,EAAE,MAAM,CAAA;CACrB;uBAIS,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;AAuJrC;;GAEG;AACH,wBAFU,OAAO,aAAa,EAAE,UAAU,CA27BxC"}
@@ -1,4 +1,5 @@
1
1
  export default functionType;
2
+ export type ArbitraryFunction = Function;
2
3
  /**
3
4
  * @type {import('../types.js').TypeObject}
4
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"functionType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/functionType.js"],"names":[],"mappings":";AAGA;;GAEG;AACH,4BAFU,OAAO,aAAa,EAAE,UAAU,CA+IxC"}
1
+ {"version":3,"file":"functionType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/functionType.js"],"names":[],"mappings":";;AAkKA;;GAEG;AACH,4BAFU,OAAO,aAAa,EAAE,UAAU,CAwJxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"promiseType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/promiseType.js"],"names":[],"mappings":";AAGA;;GAEG;AACH,2BAFU,OAAO,aAAa,EAAE,UAAU,CAqDxC"}
1
+ {"version":3,"file":"promiseType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/promiseType.js"],"names":[],"mappings":";AAsDA;;GAEG;AACH,2BAFU,OAAO,aAAa,EAAE,UAAU,CAmIxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"stringType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/stringType.js"],"names":[],"mappings":";AAoDA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,CA+NxC"}
1
+ {"version":3,"file":"stringType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/stringType.js"],"names":[],"mappings":";AAqDA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,CA+NxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"symbolType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/symbolType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,CA2EvD"}
1
+ {"version":3,"file":"symbolType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/symbolType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,CAmFvD"}