@es-joy/jsoe 0.16.0 → 0.17.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 (208) hide show
  1. package/.ncurc.cjs +4 -5
  2. package/CHANGES.md +4 -0
  3. package/README.md +27 -3
  4. package/badges/licenses-badge.svg +1 -0
  5. package/dist/formatAndTypeChoices.d.ts +39 -19
  6. package/dist/formatAndTypeChoices.d.ts.map +1 -1
  7. package/dist/formats/indexedDBKey.d.ts +1 -1
  8. package/dist/formats/indexedDBKey.d.ts.map +1 -1
  9. package/dist/formats/json.d.ts +1 -1
  10. package/dist/formats/json.d.ts.map +1 -1
  11. package/dist/formats/schema.d.ts +11 -0
  12. package/dist/formats/schema.d.ts.map +1 -0
  13. package/dist/formats/structuredCloning.d.ts +11 -13
  14. package/dist/formats/structuredCloning.d.ts.map +1 -1
  15. package/dist/formats.d.ts +86 -25
  16. package/dist/formats.d.ts.map +1 -1
  17. package/dist/fundamentalTypes/BooleanObjectType.d.ts +1 -1
  18. package/dist/fundamentalTypes/BooleanObjectType.d.ts.map +1 -1
  19. package/dist/fundamentalTypes/NumberObjectType.d.ts +1 -1
  20. package/dist/fundamentalTypes/NumberObjectType.d.ts.map +1 -1
  21. package/dist/fundamentalTypes/StringObjectType.d.ts +1 -1
  22. package/dist/fundamentalTypes/StringObjectType.d.ts.map +1 -1
  23. package/dist/fundamentalTypes/arrayReferenceType.d.ts +1 -1
  24. package/dist/fundamentalTypes/arrayType.d.ts +3 -3
  25. package/dist/fundamentalTypes/arrayType.d.ts.map +1 -1
  26. package/dist/fundamentalTypes/bigintObjectType.d.ts +6 -0
  27. package/dist/fundamentalTypes/bigintObjectType.d.ts.map +1 -0
  28. package/dist/fundamentalTypes/bigintType.d.ts +1 -1
  29. package/dist/fundamentalTypes/bigintType.d.ts.map +1 -1
  30. package/dist/fundamentalTypes/blobType.d.ts +1 -1
  31. package/dist/fundamentalTypes/blobType.d.ts.map +1 -1
  32. package/dist/fundamentalTypes/booleanType.d.ts +8 -0
  33. package/dist/fundamentalTypes/booleanType.d.ts.map +1 -0
  34. package/dist/fundamentalTypes/catchType.d.ts +6 -0
  35. package/dist/fundamentalTypes/catchType.d.ts.map +1 -0
  36. package/dist/fundamentalTypes/dateType.d.ts +4 -4
  37. package/dist/fundamentalTypes/dateType.d.ts.map +1 -1
  38. package/dist/fundamentalTypes/domexceptionType.d.ts +1 -1
  39. package/dist/fundamentalTypes/domexceptionType.d.ts.map +1 -1
  40. package/dist/fundamentalTypes/enumType.d.ts +6 -0
  41. package/dist/fundamentalTypes/enumType.d.ts.map +1 -0
  42. package/dist/fundamentalTypes/errorType.d.ts +1 -1
  43. package/dist/fundamentalTypes/errorType.d.ts.map +1 -1
  44. package/dist/fundamentalTypes/fileType.d.ts +1 -1
  45. package/dist/fundamentalTypes/fileType.d.ts.map +1 -1
  46. package/dist/fundamentalTypes/filelistType.d.ts +1 -1
  47. package/dist/fundamentalTypes/filelistType.d.ts.map +1 -1
  48. package/dist/fundamentalTypes/functionType.d.ts +6 -0
  49. package/dist/fundamentalTypes/functionType.d.ts.map +1 -0
  50. package/dist/fundamentalTypes/literalType.d.ts +6 -0
  51. package/dist/fundamentalTypes/literalType.d.ts.map +1 -0
  52. package/dist/fundamentalTypes/mapType.d.ts +1 -1
  53. package/dist/fundamentalTypes/mapType.d.ts.map +1 -1
  54. package/dist/fundamentalTypes/nanType.d.ts +6 -0
  55. package/dist/fundamentalTypes/nanType.d.ts.map +1 -0
  56. package/dist/fundamentalTypes/nativeEnumType.d.ts +6 -0
  57. package/dist/fundamentalTypes/nativeEnumType.d.ts.map +1 -0
  58. package/dist/fundamentalTypes/neverType.d.ts +6 -0
  59. package/dist/fundamentalTypes/neverType.d.ts.map +1 -0
  60. package/dist/fundamentalTypes/noneditableType.d.ts +1 -1
  61. package/dist/fundamentalTypes/noneditableType.d.ts.map +1 -1
  62. package/dist/fundamentalTypes/nullType.d.ts +1 -1
  63. package/dist/fundamentalTypes/nullType.d.ts.map +1 -1
  64. package/dist/fundamentalTypes/numberType.d.ts +1 -1
  65. package/dist/fundamentalTypes/numberType.d.ts.map +1 -1
  66. package/dist/fundamentalTypes/objectReferenceType.d.ts +1 -1
  67. package/dist/fundamentalTypes/objectType.d.ts +1 -1
  68. package/dist/fundamentalTypes/objectType.d.ts.map +1 -1
  69. package/dist/fundamentalTypes/promiseType.d.ts +6 -0
  70. package/dist/fundamentalTypes/promiseType.d.ts.map +1 -0
  71. package/dist/fundamentalTypes/recordType.d.ts +6 -0
  72. package/dist/fundamentalTypes/recordType.d.ts.map +1 -0
  73. package/dist/fundamentalTypes/regexpType.d.ts +1 -1
  74. package/dist/fundamentalTypes/regexpType.d.ts.map +1 -1
  75. package/dist/fundamentalTypes/setType.d.ts +1 -1
  76. package/dist/fundamentalTypes/setType.d.ts.map +1 -1
  77. package/dist/fundamentalTypes/sparseUndefinedType.d.ts +1 -1
  78. package/dist/fundamentalTypes/sparseUndefinedType.d.ts.map +1 -1
  79. package/dist/fundamentalTypes/stringType.d.ts +1 -1
  80. package/dist/fundamentalTypes/stringType.d.ts.map +1 -1
  81. package/dist/fundamentalTypes/symbolType.d.ts +8 -0
  82. package/dist/fundamentalTypes/symbolType.d.ts.map +1 -0
  83. package/dist/fundamentalTypes/tupleType.d.ts +6 -0
  84. package/dist/fundamentalTypes/tupleType.d.ts.map +1 -0
  85. package/dist/fundamentalTypes/undefinedType.d.ts +1 -1
  86. package/dist/fundamentalTypes/undefinedType.d.ts.map +1 -1
  87. package/dist/fundamentalTypes/voidType.d.ts +6 -0
  88. package/dist/fundamentalTypes/voidType.d.ts.map +1 -0
  89. package/dist/index.d.ts +2 -2
  90. package/dist/index.d.ts.map +1 -1
  91. package/dist/index.js +9660 -1586
  92. package/dist/subTypes/blobHTMLType.d.ts.map +1 -1
  93. package/dist/subTypes/falseType.d.ts +1 -1
  94. package/dist/subTypes/trueType.d.ts +1 -1
  95. package/dist/superTypes/SpecialNumberType.d.ts +1 -1
  96. package/dist/superTypes/SpecialRealNumberType.d.ts +1 -1
  97. package/dist/superTypes/SpecialRealNumberType.d.ts.map +1 -1
  98. package/dist/superTypes/buffersourceType.d.ts +1 -1
  99. package/dist/superTypes/buffersourceType.d.ts.map +1 -1
  100. package/dist/superTypes/dommatrixType.d.ts +1 -1
  101. package/dist/superTypes/dommatrixType.d.ts.map +1 -1
  102. package/dist/superTypes/dompointType.d.ts +1 -1
  103. package/dist/superTypes/dompointType.d.ts.map +1 -1
  104. package/dist/superTypes/domrectType.d.ts +1 -1
  105. package/dist/superTypes/domrectType.d.ts.map +1 -1
  106. package/dist/superTypes/errorsSpecialType.d.ts +1 -1
  107. package/dist/superTypes/errorsSpecialType.d.ts.map +1 -1
  108. package/dist/typeChoices.d.ts +33 -16
  109. package/dist/typeChoices.d.ts.map +1 -1
  110. package/dist/types.d.ts +161 -157
  111. package/dist/types.d.ts.map +1 -1
  112. package/dist/utils/dialogs.d.ts +3 -3
  113. package/dist/utils/dialogs.d.ts.map +1 -1
  114. package/dist/utils/jsonPointer.d.ts.map +1 -1
  115. package/dist/utils/media.d.ts.map +1 -1
  116. package/dist/utils/objects.d.ts +16 -0
  117. package/dist/utils/objects.d.ts.map +1 -0
  118. package/dist/utils/types.d.ts +1 -1
  119. package/dist/utils/types.d.ts.map +1 -1
  120. package/dist/vendor-imports.d.ts +1 -1
  121. package/eslint.config.js +74 -0
  122. package/licenseInfo.json +4 -0
  123. package/package.json +33 -42
  124. package/rollup.config.js +15 -0
  125. package/src/formatAndTypeChoices.js +68 -54
  126. package/src/formats/indexedDBKey.js +9 -4
  127. package/src/formats/json.js +7 -4
  128. package/src/formats/schema.js +772 -0
  129. package/src/formats/structuredCloning.js +187 -86
  130. package/src/formats.js +61 -26
  131. package/src/fundamentalTypes/BooleanObjectType.js +18 -6
  132. package/src/fundamentalTypes/NumberObjectType.js +18 -5
  133. package/src/fundamentalTypes/StringObjectType.js +20 -8
  134. package/src/fundamentalTypes/arrayType.js +1241 -533
  135. package/src/fundamentalTypes/bigintObjectType.js +64 -0
  136. package/src/fundamentalTypes/bigintType.js +31 -5
  137. package/src/fundamentalTypes/blobType.js +201 -190
  138. package/src/fundamentalTypes/booleanType.js +63 -0
  139. package/src/fundamentalTypes/catchType.js +140 -0
  140. package/src/fundamentalTypes/dateType.js +57 -19
  141. package/src/fundamentalTypes/domexceptionType.js +61 -63
  142. package/src/fundamentalTypes/enumType.js +52 -0
  143. package/src/fundamentalTypes/errorType.js +20 -7
  144. package/src/fundamentalTypes/fileType.js +195 -189
  145. package/src/fundamentalTypes/filelistType.js +4 -0
  146. package/src/fundamentalTypes/functionType.js +150 -0
  147. package/src/fundamentalTypes/literalType.js +81 -0
  148. package/src/fundamentalTypes/mapType.js +4 -0
  149. package/src/fundamentalTypes/nanType.js +41 -0
  150. package/src/fundamentalTypes/nativeEnumType.js +155 -0
  151. package/src/fundamentalTypes/neverType.js +44 -0
  152. package/src/fundamentalTypes/noneditableType.js +19 -5
  153. package/src/fundamentalTypes/nullType.js +16 -6
  154. package/src/fundamentalTypes/numberType.js +49 -6
  155. package/src/fundamentalTypes/objectType.js +10 -2
  156. package/src/fundamentalTypes/promiseType.js +60 -0
  157. package/src/fundamentalTypes/recordType.js +42 -0
  158. package/src/fundamentalTypes/regexpType.js +51 -33
  159. package/src/fundamentalTypes/setType.js +4 -0
  160. package/src/fundamentalTypes/sparseUndefinedType.js +3 -0
  161. package/src/fundamentalTypes/stringType.js +254 -6
  162. package/src/fundamentalTypes/symbolType.js +81 -0
  163. package/src/fundamentalTypes/tupleType.js +39 -0
  164. package/src/fundamentalTypes/undefinedType.js +14 -4
  165. package/src/fundamentalTypes/voidType.js +48 -0
  166. package/src/jsoe.css +37 -3
  167. package/src/subTypes/blobHTMLType.js +33 -24
  168. package/src/superTypes/SpecialRealNumberType.js +22 -6
  169. package/src/superTypes/buffersourceType.js +86 -30
  170. package/src/superTypes/dommatrixType.js +24 -7
  171. package/src/superTypes/dompointType.js +27 -7
  172. package/src/superTypes/domrectType.js +33 -7
  173. package/src/superTypes/errorsSpecialType.js +30 -14
  174. package/src/typeChoices.js +115 -44
  175. package/src/types.js +129 -45
  176. package/src/utils/FileList.js +3 -3
  177. package/src/utils/dialogs.js +6 -8
  178. package/src/utils/objects.js +22 -0
  179. package/src/vendor-imports.js +1 -1
  180. package/tsconfig.json +2 -2
  181. package/vendor/jamilih/dist/jml-es.js +23 -6
  182. package/vendor/typeson-registry/dist/index.js +77 -47
  183. package/vendor/zod/lib/index.mjs +4236 -0
  184. package/vendor/zodex/dist/esm/dezerialize.d.ts +26 -0
  185. package/vendor/zodex/dist/esm/dezerialize.js +393 -0
  186. package/vendor/zodex/dist/esm/index.d.ts +9 -0
  187. package/vendor/zodex/dist/esm/index.js +4 -0
  188. package/vendor/zodex/dist/esm/infer.d.ts +29 -0
  189. package/vendor/zodex/dist/esm/infer.js +1 -0
  190. package/vendor/zodex/dist/esm/package.json +1 -0
  191. package/vendor/zodex/dist/esm/types.d.ts +201 -0
  192. package/vendor/zodex/dist/esm/types.js +13 -0
  193. package/vendor/zodex/dist/esm/ui.d.ts +23 -0
  194. package/vendor/zodex/dist/esm/ui.js +10 -0
  195. package/vendor/zodex/dist/esm/zerialize.d.ts +50 -0
  196. package/vendor/zodex/dist/esm/zerialize.js +417 -0
  197. package/vendor/zodex/dist/esm/zod-types.d.ts +11 -0
  198. package/vendor/zodex/dist/esm/zod-types.js +1 -0
  199. package/.eslintignore +0 -13
  200. package/.eslintrc.cjs +0 -145
  201. package/.nyc_output/out.json +0 -117370
  202. package/cypress.config.ts +0 -15
  203. package/demo/index-instrumented.html +0 -29
  204. package/demo/index-instrumented.js +0 -644
  205. package/demo/index.html +0 -29
  206. package/demo/index.js +0 -215
  207. package/src/formats/schemaAndArbitrary.js +0 -20
  208. package/src/formats/schemaOnly.js +0 -539
package/.ncurc.cjs CHANGED
@@ -1,9 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- reject: [
5
- // Todo: Try again after some time as caused number of tests to fail
6
- // for typeson-registry, whether in Node 18 or 20
7
- 'jsdom'
8
- ]
4
+ reject: [
5
+ // todo[engine:node@>=20]: Can remove
6
+ 'rimraf'
7
+ ]
9
8
  };
package/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGES TO `@es-joy/jsoe`
2
2
 
3
+ ## 0.17.0
4
+
5
+ - feat: Zodex schema support
6
+
3
7
  ## 0.16.0
4
8
 
5
9
  - feat(regexp): support v flag
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
+ [![Licenses badge](https://raw.githubusercontent.com/brettz9/integrity-matters/master/badges/licenses-badge.svg?sanitize=true)](badges/licenses-badge.svg)
2
+
1
3
  # @es-joy/jsoe
2
4
 
3
5
  JavaScript Object Editor.
4
6
 
5
- Editing of arbitrary JavaScript objects.
7
+ Editing and viewing of arbitrary JavaScript objects.
6
8
 
7
9
  See a [demo](https://es-joy.github.io/jsoe/demo/) of this tool or
8
10
  [a demo](https://brettz9.github.io/idb-manager/index-pages.html) of an
@@ -14,6 +16,7 @@ Formats are a collection of allowed types.
14
16
 
15
17
  Supported formats include:
16
18
 
19
+ - Schemas (using [zodex](https://github.com/commonbaseapp/zodex) serialization of [Zod](https://github.com/colinhacks/zod))
17
20
  - Structured Cloning (using [typeson](https://github.com/dfahlander/typeson)) (e.g., IndexedDB values)
18
21
  - JSON
19
22
  - IndexedDB keys
@@ -27,6 +30,7 @@ Supported types include:
27
30
  - Array reference (for cyclic arrays)
28
31
  - Array
29
32
  - `BigInt`
33
+ - `bigintObject`
30
34
  - `Blob`
31
35
  - `Boolean` object
32
36
  - `Date`
@@ -50,6 +54,21 @@ Supported types include:
50
54
  - string
51
55
  - `undefined`
52
56
 
57
+ There are also the following fundamental (Zodex) schema types:
58
+
59
+ - `boolean` (using in place of true/false when schema specifies)
60
+ - `catch`
61
+ - `enum`
62
+ - `function` (not structured cloning)
63
+ - `literal`
64
+ - `nan` (standalone in Zodex)
65
+ - `nativeEnum`
66
+ - `promise` (not structured cloning)
67
+ - `record`
68
+ - `symbol` (not structured cloning)
69
+ - `tuple`
70
+ - `void` (preferred in Zodex when specified as such)
71
+
53
72
  ## Subtypes
54
73
 
55
74
  These map to a subset of JavaScript language structures. Note that false and true were common and limited enough in number to justify their own subtype for the sake of having a quick pull-down entry.
@@ -84,12 +103,17 @@ Supported supertypes include:
84
103
  - Certain cyclical structures may have issues
85
104
  - `typeson-registry`'s structured cloning should throw on more objects, so
86
105
  bad data doesn't end up stored
106
+ - Currently requires `SpecialRealNumber` for `Infinity`/`-Infinity` despite
107
+ Zodex number type supporting a `finite` schema property.
108
+ - Currently doesn't support using `isNullable`; instead just use `null` with
109
+ a `union`.
87
110
  - Lacks support for certain Structured Cloning types. See to-dos below.
111
+ - Excessive use of `reportValidity` (e.g., in BufferSource, as seen by
112
+ index-instrumented demo) causing focus of element; should only be triggered by
113
+ event (and only if not auto-triggered event)
88
114
 
89
115
  ## To-dos
90
116
 
91
- 1. Add tests of demo (lower priority as have tests in `idb-manager`)
92
- 1. Support Schemas based on a JSON serialization of Zod
93
117
  1. Expand fundamental types
94
118
  1. Not in typeson-registry
95
119
  1. Structured Cloning
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="300" height="44"><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="navy" d="M0 0h227v44H0z"/><path fill="green" d="M227 0h73v44h-73z"/><path fill="url(#smooth)" d="M0 0h300v44H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">License types</text><text class="high" x="5" y="14">License types</text><text class="shadow" x="5.5" y="27">(project, deps, and bundled devDeps)</text><text class="high" x="5" y="26">(project, deps, and bundled devDeps)</text><text class="shadow" x="232.5" y="15">Permissive</text><text class="high" x="232" y="14">Permissive</text><text class="shadow" x="232.5" y="39">1. MIT</text><text class="high" x="232" y="38">1. MIT</text></g></svg>
@@ -4,11 +4,15 @@
4
4
  * @param {import('./types.js').StateObject} stateObj
5
5
  * @returns {Promise<void>}
6
6
  */
7
+ /**
8
+ * @typedef {import('./formats/schema.js').ZodexSchema} ZodexSchema
9
+ */
7
10
  /**
8
11
  * Builds a selector and container for types.
9
12
  * @param {object} cfg
10
- * @param {string} [cfg.schema] The schema name (NOT IN USE)
11
- * @param {object} [cfg.schemaContent] The schema content (NOT IN USE)
13
+ * @param {string[]} [cfg.schemas] The schema names
14
+ * @param {(schema: string) => Promise<ZodexSchema>} [cfg.getSchemaContent] The
15
+ * schema content retriever
12
16
  * @param {boolean} [cfg.hasValue] Set to `true` if you are supplying
13
17
  * your own value. If `false` and `hasKeyPath` is `true`,
14
18
  * will initialize with an object.
@@ -20,9 +24,10 @@
20
24
  * plain object).
21
25
  * @param {string} [cfg.typeNamespace] Used to prevent conflicts with other
22
26
  * instances of typeChoices on the page
27
+ * @param {string} [cfg.selectedSchema]
23
28
  * @param {import('./formats.js').default} [cfg.formats]
24
29
  * @param {import('./types.js').default} [cfg.types]
25
- * @returns {{
30
+ * @returns {Promise<{
26
31
  * formatChoices: FormatChoices,
27
32
  * typesHolder: TypesHolder,
28
33
  * domArray: [formatChoices: FormatChoices, typesHolder: TypesHolder],
@@ -33,40 +38,55 @@
33
38
  * setValue: SetValue,
34
39
  * formats: import('./formats.js').default,
35
40
  * types: import('./types.js').default
36
- * }} The selector for types and the container for them. Both should be
41
+ * }>} The selector for types and the container for them. Both should be
37
42
  * added to the page.
38
43
  */
39
- export function formatAndTypeChoices({ schema, schemaContent, hasValue, singleValue, hasKeyPath, typeNamespace, formats, types }: {
40
- schema?: string | undefined;
41
- schemaContent?: object | undefined;
44
+ export function formatAndTypeChoices({ schemas, getSchemaContent, hasValue, singleValue, hasKeyPath, typeNamespace, selectedSchema, formats, types }: {
45
+ schemas?: string[] | undefined;
46
+ getSchemaContent?: ((schema: string) => Promise<ZodexSchema>) | undefined;
42
47
  hasValue?: boolean | undefined;
43
48
  singleValue?: boolean | undefined;
44
49
  hasKeyPath?: boolean | undefined;
45
50
  typeNamespace?: string | undefined;
51
+ selectedSchema?: string | undefined;
46
52
  formats?: Formats | undefined;
47
53
  types?: Types | undefined;
48
- }): {
54
+ }): Promise<{
49
55
  formatChoices: HTMLSelectElement & {
50
- $setFormat: (valueFormat: string) => void;
51
- $buildTypeChoices: () => void;
56
+ $setFormat: (this: HTMLSelectElement & {
57
+ $buildTypeChoices: (this: HTMLSelectElement & {
58
+ $buildTypeChoices: any;
59
+ }) => Promise<void>;
60
+ }, valueFormat: string) => Promise<void>;
61
+ $buildTypeChoices: (this: HTMLSelectElement & {
62
+ $buildTypeChoices: any;
63
+ }) => Promise<void>;
52
64
  };
53
65
  typesHolder: HTMLDivElement;
54
66
  domArray: [formatChoices: HTMLSelectElement & {
55
- $setFormat: (valueFormat: string) => void;
56
- $buildTypeChoices: () => void;
67
+ $setFormat: (this: HTMLSelectElement & {
68
+ $buildTypeChoices: (this: HTMLSelectElement & {
69
+ $buildTypeChoices: any;
70
+ }) => Promise<void>;
71
+ }, valueFormat: string) => Promise<void>;
72
+ $buildTypeChoices: (this: HTMLSelectElement & {
73
+ $buildTypeChoices: any;
74
+ }) => Promise<void>;
57
75
  }, typesHolder: HTMLDivElement];
58
- getValue: (stateObj: import('./types.js').StateObject, currentPath: string) => import('./formats.js').StructuredCloneValue;
76
+ getValue: (stateObj: import("./types.js").StateObject, currentPath: string) => import("./formats.js").StructuredCloneValue;
59
77
  getType: () => string;
60
78
  validValuesSet: () => boolean;
61
79
  setValue: SetValue;
62
- formats: import('./formats.js').default;
63
- types: import('./types.js').default;
64
- };
65
- export function getFormatAndSchemaChoices({ schema, hasKeyPath }?: {
66
- schema?: string | undefined;
80
+ formats: import("./formats.js").default;
81
+ types: import("./types.js").default;
82
+ }>;
83
+ export function getFormatAndSchemaChoices({ schemas, selectedSchema, hasKeyPath }?: {
84
+ schemas?: string[] | undefined;
85
+ selectedSchema?: string | undefined;
67
86
  hasKeyPath?: boolean | undefined;
68
87
  }): DocumentFragment;
69
- export type SetValue = (value: import('./formats.js').StructuredCloneValue, stateObj: import('./types.js').StateObject) => Promise<void>;
88
+ export type SetValue = (value: import("./formats.js").StructuredCloneValue, stateObj: import("./types.js").StateObject) => Promise<void>;
89
+ export type ZodexSchema = import("./formats/schema.js").ZodexSchema;
70
90
  export type TypeRootGetter = () => HTMLDivElement | null;
71
91
  import Formats from './formats.js';
72
92
  import Types from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"formatAndTypeChoices.d.ts","sourceRoot":"","sources":["../src/formatAndTypeChoices.js"],"names":[],"mappings":"AAqEA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IA7BwB,MAAM;IACN,aAAa;IACZ,QAAQ;IAGR,WAAW;IACX,UAAU;IAKX,aAAa;IAEW,OAAO;IACT,KAAK;;;kCAkClC,MAAM,KACJ,IAAI;iCAMJ,IAAI;;;;kCAPN,MAAM,KACJ,IAAI;iCAMJ,IAAI;;yBApCG,OAAO,YAAY,EAAE,WAAW,eACtC,MAAM,KAAK,OAAO,cAAc,EAAE,oBAAoB;aAC5D,MAAM,MAAM;oBACL,MAAM,OAAO;cACnB,QAAQ;aACT,OAAO,cAAc,EAAE,OAAO;WAChC,OAAO,YAAY,EAAE,OAAO;EAyMvC;AA5RM;IANiB,MAAM;IACL,UAAU;IAGtB,gBAAgB,CAgD5B;+BAIU,OAAO,cAAc,EAAE,oBAAoB,YAC3C,OAAO,YAAY,EAAE,WAAW,KAC9B,QAAQ,IAAI,CAAC;mCAjEb,cAAc,GAAC,IAAI;oBALZ,cAAc;kBADhB,YAAY"}
1
+ {"version":3,"file":"formatAndTypeChoices.d.ts","sourceRoot":"","sources":["../src/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cAAc;kBADhB,YAAY"}
@@ -1,4 +1,4 @@
1
1
  export default indexedDBKey;
2
2
  /** @type {import('../formats.js').Format} */
3
- declare const indexedDBKey: import('../formats.js').Format;
3
+ declare const indexedDBKey: import("../formats.js").Format;
4
4
  //# sourceMappingURL=indexedDBKey.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"indexedDBKey.d.ts","sourceRoot":"","sources":["../../src/formats/indexedDBKey.js"],"names":[],"mappings":";AAEA,6CAA6C;AAC7C,4BADW,OAAO,eAAe,EAAE,MAAM,CAwCvC"}
1
+ {"version":3,"file":"indexedDBKey.d.ts","sourceRoot":"","sources":["../../src/formats/indexedDBKey.js"],"names":[],"mappings":";AAEA,6CAA6C;AAC7C,4BADW,OAAO,eAAe,EAAE,MAAM,CA6CvC"}
@@ -1,4 +1,4 @@
1
1
  export default json;
2
2
  /** @type {import('../formats.js').Format} */
3
- declare const json: import('../formats.js').Format;
3
+ declare const json: import("../formats.js").Format;
4
4
  //# sourceMappingURL=json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/formats/json.js"],"names":[],"mappings":";AAWA,6CAA6C;AAC7C,oBADW,OAAO,eAAe,EAAE,MAAM,CAwCvC"}
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/formats/json.js"],"names":[],"mappings":";AAWA,6CAA6C;AAC7C,oBADW,OAAO,eAAe,EAAE,MAAM,CA2CvC"}
@@ -0,0 +1,11 @@
1
+ export default schema;
2
+ export type ZodexSchema = import("zodex").SzType;
3
+ export type NestedObject = import("../utils/objects.js").NestedObject;
4
+ /**
5
+ * <T>
6
+ */
7
+ export type ValueOf<T> = T[keyof T];
8
+ export type AvailableZodexType = ValueOf<Pick<import("zodex").SzType, "type">>;
9
+ /** @type {import('../formats.js').Format} */
10
+ declare const schema: import("../formats.js").Format;
11
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/formats/schema.js"],"names":[],"mappings":";0BA2Da,OAAO,OAAO,EAAE,MAAM;2BAGtB,OAAO,qBAAqB,EAAE,YAAY;;;;oBAnD1C,CAAC,IADD,CAAC,CAAC,MAAM,CAAC,CAAC;iCAMV,OAAO,CAChB,IAAI,CAAC,OAAO,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CACrC;AAsiBH,6CAA6C;AAC7C,sBADW,OAAO,eAAe,EAAE,MAAM,CAyMvC"}
@@ -1,21 +1,19 @@
1
1
  export default structuredCloning;
2
+ /**
3
+ * Delegates data-based UI building to method for adding child elements (a
4
+ * method which is housed in the array type object).
5
+ */
2
6
  export type AddAndSetArrayElement = (info: {
3
7
  propName: string;
4
- type: import('../types.js').AvailableType;
5
- value: import('../formats.js').StructuredCloneValue;
8
+ type: import("../types.js").AvailableType;
9
+ value: import("../formats.js").StructuredCloneValue;
6
10
  bringIntoFocus?: boolean;
7
11
  setAValue?: boolean;
8
- schemaContent?: object;
9
- schemaState?: import('../types.js').GetPossibleSchemasForPathAndType;
12
+ schemaContent?: import("../formats/schema.js").ZodexSchema;
13
+ mustBeOptional?: boolean;
14
+ schemaIdx?: number;
10
15
  }) => HTMLElement | null;
11
- export type EncapsulateObserver = import('typeson-registry').EncapsulateObserver;
12
- export type FormatIterator = (records: import('../formats.js').StructuredCloneValue, stateObj: import('../types.js').StateObject) => Promise<Element>;
13
- /**
14
- * @callback FormatIterator
15
- * @param {import('../formats.js').StructuredCloneValue} records
16
- * @param {import('../types.js').StateObject} stateObj
17
- * @returns {Promise<Element>}
18
- */
16
+ export type EncapsulateObserver = import("typeson-registry").EncapsulateObserver;
19
17
  /** @type {import('../formats.js').Format} */
20
- declare const structuredCloning: import('../formats.js').Format;
18
+ declare const structuredCloning: import("../formats.js").Format;
21
19
  //# sourceMappingURL=structuredCloning.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"structuredCloning.d.ts","sourceRoot":"","sources":["../../src/formats/structuredCloning.js"],"names":[],"mappings":";2CAsBoB;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,MAAM,CAAC;IAC3B,WAAe,CAAC,EAAE,OAAO,aAAa,EAAE,gCAAgC,CAAA;CACrE,KAAK,WAAW,GAAC,IAAI;kCAIZ,OAAO,kBAAkB,EAAE,mBAAmB;uCA2WhD,OAAO,eAAe,EAAE,oBAAoB,YAC5C,OAAO,aAAa,EAAE,WAAW,KAC/B,QAAQ,OAAO,CAAC;AAJ7B;;;;;GAKG;AAEH,6CAA6C;AAC7C,iCADW,OAAO,eAAe,EAAE,MAAM,CAwHvC"}
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,CA2IvC"}
package/dist/formats.d.ts CHANGED
@@ -3,45 +3,106 @@ export default Formats;
3
3
  * An arbitrary Structured Clone, JSON, etc. value.
4
4
  */
5
5
  export type StructuredCloneValue = any;
6
- export type GetTypesForFormatAndState = (types: import('./types.js').default, format: AvailableFormat, state?: string | undefined) => import('./types.js').AvailableType[] | undefined;
7
- export type AvailableFormat = "indexedDBKey" | "json" | "structuredCloning";
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";
8
+ export type TypesAndSchemaObjects = {
9
+ types: (import("./types.js").AvailableType)[];
10
+ schemaObjects: import("./formats/schema.js").ZodexSchema[];
11
+ };
12
+ /**
13
+ * Responsible for traversing over data (along with state information) to build
14
+ * and return a relevant UI element.
15
+ */
16
+ export type FormatIterator = (records: StructuredCloneValue, stateObj: import("./types.js").StateObject) => Promise<Required<import("./types.js").StateObject>>;
8
17
  export type Format = {
9
- types: () => (import('./types.js').AvailableType)[];
18
+ /**
19
+ * Returns list
20
+ * of types generally available to structured cloning. See
21
+ * {@link getTypesAndSchemasForState} for context-dependent method.
22
+ */
23
+ types: () => (import("./types.js").AvailableType)[];
24
+ /**
25
+ * Traverses over data to build and return
26
+ * a relevant UI element.
27
+ */
28
+ iterate: FormatIterator;
29
+ /**
30
+ * Gets the
31
+ * specific types (and schemas) relevant to a given state.
32
+ */
33
+ getTypesAndSchemasForState: (types: import("./types.js").default, state?: string, schemaObject?: import("./formatAndTypeChoices.js").ZodexSchema | undefined, schemaOriginal?: import("./formatAndTypeChoices.js").ZodexSchema | undefined) => TypesAndSchemaObjects | undefined;
10
34
  testInvalid?: ((newType: string, value: Date | Array<StructuredCloneValue>) => boolean | undefined) | undefined;
11
- convertFromTypeson?: ((typesonType: import('./types.js').AvailableType) => import('./types.js').AvailableType | undefined) | undefined;
12
- iterate: import('./formats/structuredCloning.js').FormatIterator;
13
- getTypesForState: (types: import('./types.js').default, state?: string) => undefined | (import('./types.js').AvailableType)[];
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;
37
+ schema?: import("zodex").SzType | undefined;
38
+ mustBeOptional?: boolean;
39
+ schemaIdx?: number;
40
+ }) | undefined;
14
41
  };
15
42
  /**
16
43
  * An arbitrary Structured Clone, JSON, etc. value.
17
44
  * @typedef {any} StructuredCloneValue
18
45
  */
19
46
  /**
20
- * @callback GetTypesForFormatAndState
47
+ * @callback GetTypesAndSchemasForFormatAndState
21
48
  * @param {import('./types.js').default} types
22
49
  * @param {AvailableFormat} format
23
50
  * @param {string} [state]
24
- * @returns {import('./types.js').AvailableType[]|undefined}
51
+ * @param {import('./formatAndTypeChoices.js').ZodexSchema|
52
+ * undefined} [schemaObject]
53
+ * @param {import('./formatAndTypeChoices.js').ZodexSchema|
54
+ * undefined} [schemaOriginal]
55
+ * @returns {TypesAndSchemaObjects|undefined}
25
56
  */
26
57
  /**
27
- * @typedef {"indexedDBKey"|"json"|"structuredCloning"} AvailableFormat
58
+ * @typedef {"indexedDBKey"|"json"|"structuredCloning"|"schema"} AvailableFormat
28
59
  */
29
60
  /**
30
61
  * @typedef {{
31
- * types: () => (import('./types.js').AvailableType)[],
32
- * testInvalid?: (
62
+ * types: (import('./types.js').AvailableType)[],
63
+ * schemaObjects: import('./formats/schema.js').ZodexSchema[]
64
+ * }} TypesAndSchemaObjects
65
+ */
66
+ /**
67
+ * Responsible for traversing over data (along with state information) to build
68
+ * and return a relevant UI element.
69
+ * @callback FormatIterator
70
+ * @param {StructuredCloneValue} records
71
+ * @param {import('./types.js').StateObject} stateObj
72
+ * @returns {Promise<Required<import('./types.js').StateObject>>}
73
+ */
74
+ /**
75
+ * @typedef {object} Format
76
+ * @property {() => (import('./types.js').AvailableType)[]} types Returns list
77
+ * of types generally available to structured cloning. See
78
+ * {@link getTypesAndSchemasForState} for context-dependent method.
79
+ * @property {FormatIterator} iterate Traverses over data to build and return
80
+ * a relevant UI element.
81
+ * @property {(
82
+ * types: import('./types.js').default,
83
+ * state?: string,
84
+ * schemaObject?: import('./formatAndTypeChoices.js').ZodexSchema|
85
+ * undefined,
86
+ * schemaOriginal?: import('./formatAndTypeChoices.js').ZodexSchema|
87
+ * undefined
88
+ * ) => TypesAndSchemaObjects|undefined} getTypesAndSchemasForState Gets the
89
+ * specific types (and schemas) relevant to a given state.
90
+ * @property {(
33
91
  * newType: string, value: Date|Array<StructuredCloneValue>
34
- * ) => boolean|undefined,
35
- * convertFromTypeson?: (
36
- * typesonType: import('./types.js').AvailableType
37
- * ) => import('./types.js').AvailableType|undefined,
38
- * iterate: import('./formats/structuredCloning.js').FormatIterator,
39
- * getTypesForState: (
40
- * types: import('./types.js').default,
41
- * state?: string
42
- * ) => undefined|
43
- * (import('./types.js').AvailableType)[]
44
- * }} Format
92
+ * ) => boolean|undefined} [testInvalid]
93
+ * @property {(
94
+ * typesonType: import('./types.js').AvailableType,
95
+ * types: import('./types.js').default,
96
+ * v?: import('./formats.js').StructuredCloneValue,
97
+ * arrayOrObjectPropertyName?: string,
98
+ * parentSchema?: [import('zodex').SzType, number|undefined]|undefined,
99
+ * stateObj?: import('./types.js').StateObject,
100
+ * ) => {
101
+ * type: import('./types.js').AvailableType|undefined
102
+ * schema?: import('zodex').SzType|undefined,
103
+ * mustBeOptional?: boolean,
104
+ * schemaIdx?: number
105
+ * }} [convertFromTypeson]
45
106
  */
46
107
  /**
47
108
  * Class for processing multiple formats.
@@ -55,10 +116,10 @@ declare class Formats {
55
116
  * @param {AvailableFormat} format
56
117
  * @param {StructuredCloneValue} record
57
118
  * @param {import('./types.js').StateObject} stateObj
58
- * @returns {Promise<Element>}
119
+ * @returns {Promise<Required<import('./types.js').StateObject>>}
59
120
  */
60
- getControlsForFormatAndValue(types: import('./types.js').default, format: AvailableFormat, record: StructuredCloneValue, stateObj: import('./types.js').StateObject): Promise<Element>;
61
- getTypesForFormatAndState(types: import('./types.js').default, format: AvailableFormat, state?: string | undefined): import('./types.js').AvailableType[] | undefined;
121
+ getControlsForFormatAndValue(types: import("./types.js").default, format: AvailableFormat, record: StructuredCloneValue, stateObj: import("./types.js").StateObject): Promise<Required<import("./types.js").StateObject>>;
122
+ 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;
62
123
  /**
63
124
  * @param {AvailableFormat} format
64
125
  * @returns {Format}
@@ -1 +1 @@
1
- {"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../src/formats.js"],"names":[],"mappings":";;;;mCAMa,GAAG;gDAKL,OAAO,YAAY,EAAE,OAAO,UAC5B,eAAe,iCAEb,OAAO,YAAY,EAAE,aAAa,EAAE,GAAC,SAAS;8BAa9C,cAAc,GAAC,MAAM,GAAC,mBAAmB;;WAK1C,MAAM,CAAC,OAAO,YAAY,EAAE,aAAa,CAAC,EAAE;6BAExC,MAAM,SAAS,IAAI,GAAC,MAAM,oBAAoB,CAAC,KACrD,OAAO,GAAC,SAAS;wCAEP,OAAO,YAAY,EAAE,aAAa,KAC5C,OAAO,YAAY,EAAE,aAAa,GAAC,SAAS;aACxC,OAAO,gCAAgC,EAAE,cAAc;8BAEvD,OAAO,YAAY,EAAE,OAAO,UAC3B,MAAM,KACX,SAAS,GAClB,CAAO,OAAO,YAAY,EAAE,aAAa,CAAC,EAAE;;AAxC7C;;;GAGG;AAEH;;;;;;GAMG;AAWH;;GAEG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH;IA4BI;;MASE;IAGJ;;;;;;OAMG;IACH,oCANW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;wCAET,OAAO,YAAY,EAAE,aAAa,SACxC,OAAO,YAAY,EAAE,OAAO,MAC/B,OAAO,cAAc,EAAE,oBAAoB,8BACnB,MAAM,iBACnB,CAAC,OAAO,OAAO,EAAE,MAAM,EAAE,MAAM,GAAC,SAAS,CAAC,GAAC,SAAS,aACxD,OAAO,YAAY,EAAE,WAAW,KACxC;QACP,IAAQ,EAAE,OAAO,YAAY,EAAE,aAAa,GAAC,SAAS,CAAA;QACtD,MAAU,CAAC,EAAE,OAAO,OAAO,EAAE,MAAM,GAAC,SAAS,CAAC;QAC9C,cAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,SAAa,CAAC,EAAE,MAAM,CAAA;KACnB;;AA7EJ;;;GAGG;AAEH;;;;;;;;;;GAUG;AAWH;;GAEG;AAEH;;;;;GAKG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;GAEG;AACH;IA4BI;;MAKE;IAGJ;;;;;;OAMG;IACH,oCANW,OAAO,YAAY,EAAE,OAAO,UAC5B,eAAe,UACf,oBAAoB,YACpB,OAAO,YAAY,EAAE,WAAW,GAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,YAAY,EAAE,WAAW,CAAC,CAAC,CAY/D;IAlIA,2CACQ,OAAO,YAAY,EAAE,OAAO,UAC5B,eAAe,6CAEf,OAAO,2BAA2B,EAAE,WAAW,GACzD,SAAa,mBACH,OAAO,2BAA2B,EAAE,WAAW,GACzD,SAAa,GACD,qBAAqB,GAAC,SAAS,CAC3C;IAsIC;;;OAGG;IACH,2BAHW,eAAe,GACb,MAAM,CAIlB;CACF"}
@@ -2,7 +2,7 @@ export default BooleanObjectType;
2
2
  /**
3
3
  * @type {import('../types.js').TypeObject & {ct: number}}
4
4
  */
5
- declare const BooleanObjectType: import('../types.js').TypeObject & {
5
+ declare const BooleanObjectType: import("../types.js").TypeObject & {
6
6
  ct: number;
7
7
  };
8
8
  //# sourceMappingURL=BooleanObjectType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BooleanObjectType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/BooleanObjectType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,iCAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,CAqDvD"}
1
+ {"version":3,"file":"BooleanObjectType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/BooleanObjectType.js"],"names":[],"mappings":";AAGA;;GAEG;AACH,iCAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,CAgEvD"}
@@ -2,5 +2,5 @@ export default NumberObjectType;
2
2
  /**
3
3
  * @type {import('../types.js').TypeObject}
4
4
  */
5
- declare const NumberObjectType: import('../types.js').TypeObject;
5
+ declare const NumberObjectType: import("../types.js").TypeObject;
6
6
  //# sourceMappingURL=NumberObjectType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NumberObjectType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/NumberObjectType.js"],"names":[],"mappings":";AAGA;;GAEG;AACH,gCAFU,OAAO,aAAa,EAAE,UAAU,CAsCxC"}
1
+ {"version":3,"file":"NumberObjectType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/NumberObjectType.js"],"names":[],"mappings":";AAIA;;GAEG;AACH,gCAFU,OAAO,aAAa,EAAE,UAAU,CAkDxC"}
@@ -2,5 +2,5 @@ export default StringObjectType;
2
2
  /**
3
3
  * @type {import('../types.js').TypeObject}
4
4
  */
5
- declare const StringObjectType: import('../types.js').TypeObject;
5
+ declare const StringObjectType: import("../types.js").TypeObject;
6
6
  //# sourceMappingURL=StringObjectType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringObjectType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/StringObjectType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,gCAFU,OAAO,aAAa,EAAE,UAAU,CAiCxC"}
1
+ {"version":3,"file":"StringObjectType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/StringObjectType.js"],"names":[],"mappings":";AAGA;;GAEG;AACH,gCAFU,OAAO,aAAa,EAAE,UAAU,CA4CxC"}
@@ -2,7 +2,7 @@ export default arrayReferenceType;
2
2
  /**
3
3
  * @type {import('../types.js').TypeObject & {type: "array"}}
4
4
  */
5
- declare const arrayReferenceType: import('../types.js').TypeObject & {
5
+ declare const arrayReferenceType: import("../types.js").TypeObject & {
6
6
  type: "array";
7
7
  };
8
8
  //# sourceMappingURL=arrayReferenceType.d.ts.map
@@ -1,9 +1,9 @@
1
1
  export default arrayType;
2
2
  export type Integer = number;
3
- export type ParseInt = () => any;
3
+ export type ParseInt = (this: HTMLInputElement) => false | Integer;
4
4
  export type InputsExceedingLength = () => HTMLInputElement[];
5
5
  export type GetMapKeySelects = () => (HTMLSelectElement & {
6
- $getValue: import('../typeChoices.js').GetValue;
6
+ $getValue: import("../typeChoices.js").GetValue;
7
7
  })[];
8
8
  export type ValidateMapKey = () => void;
9
9
  export type GetPropertyInputs = () => HTMLInputElement[];
@@ -23,7 +23,7 @@ export type AnyValue = any;
23
23
  /**
24
24
  * @type {import('../types.js').TypeObject & {sparse?: boolean|undefined}}
25
25
  */
26
- declare const arrayType: import('../types.js').TypeObject & {
26
+ declare const arrayType: import("../types.js").TypeObject & {
27
27
  sparse?: boolean | undefined;
28
28
  };
29
29
  //# sourceMappingURL=arrayType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrayType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/arrayType.js"],"names":[],"mappings":";sBAWa,MAAM;;oCAQN,MAAM,gBAAgB,EAAE;+BAGxB,MAAM,CAAC,iBAAiB,GAAG;IACvC,SAAa,EAAE,OAAO,mBAAmB,EAAE,QAAQ,CAAA;CAChD,CAAC,EAAE;6BAGM,MAAM,IAAI;sCAIV,gBAAgB,EAAE;qCAKlB,IA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jectType;
2
+ /**
3
+ * @type {import('../types.js').TypeObject}
4
+ */
5
+ declare const bigintObjectType: import("../types.js").TypeObject;
6
+ //# sourceMappingURL=bigintObjectType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bigintObjectType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/bigintObjectType.js"],"names":[],"mappings":";AAGA;;GAEG;AACH,gCAFU,OAAO,aAAa,EAAE,UAAU,CAyDxC"}
@@ -2,5 +2,5 @@ export default bigintType;
2
2
  /**
3
3
  * @type {import('../types.js').TypeObject}
4
4
  */
5
- declare const bigintType: import('../types.js').TypeObject;
5
+ declare const bigintType: import("../types.js").TypeObject;
6
6
  //# sourceMappingURL=bigintType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bigintType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/bigintType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,CA+CxC"}
1
+ {"version":3,"file":"bigintType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/bigintType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,0BAFU,OAAO,aAAa,EAAE,UAAU,CAyExC"}
@@ -7,5 +7,5 @@ export type SetValue = (blob: BlobInfo) => void;
7
7
  /**
8
8
  * @type {import('../types.js').TypeObject}
9
9
  */
10
- declare const blobType: import('../types.js').TypeObject;
10
+ declare const blobType: import("../types.js").TypeObject;
11
11
  //# sourceMappingURL=blobType.d.ts.map
@@ -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;8BAIgB,QAAQ,KAAK,IAAI;AAkIrC;;GAEG;AACH,wBAFU,OAAO,aAAa,EAAE,UAAU,CA21BxC"}
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"}
@@ -0,0 +1,8 @@
1
+ export default booleanType;
2
+ /**
3
+ * @type {import('../types.js').TypeObject & {ct: number}}
4
+ */
5
+ declare const booleanType: import("../types.js").TypeObject & {
6
+ ct: number;
7
+ };
8
+ //# sourceMappingURL=booleanType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"booleanType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/booleanType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,2BAFU,OAAO,aAAa,EAAE,UAAU,GAAG;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,CAyDvD"}
@@ -0,0 +1,6 @@
1
+ export default catchType;
2
+ /**
3
+ * @type {import('../types.js').TypeObject}
4
+ */
5
+ declare const catchType: import("../types.js").TypeObject;
6
+ //# sourceMappingURL=catchType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catchType.d.ts","sourceRoot":"","sources":["../../src/fundamentalTypes/catchType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,yBAFU,OAAO,aAAa,EAAE,UAAU,CAsIxC"}
@@ -1,8 +1,8 @@
1
1
  export default dateType;
2
- export type SetValidity = (legitimateInvalid?: true | undefined) => void;
2
+ export type SetValidity = (legitimateInvalid?: boolean | undefined) => void;
3
3
  /**
4
4
  * @typedef {(
5
- * legitimateInvalid?: true|undefined
5
+ * legitimateInvalid?: boolean|undefined
6
6
  * ) => void} SetValidity
7
7
  */
8
8
  /**
@@ -20,7 +20,7 @@ declare const dateType: import("../types.js").TypeObject & {
20
20
  isInvalid: (cfg: {
21
21
  root: HTMLDivElement;
22
22
  }) => boolean;
23
- isValueInvalid: (value: import('../formats.js').StructuredCloneValue) => boolean;
24
- valid?: true | undefined;
23
+ isValueInvalid: (value: import("../formats.js").StructuredCloneValue) => boolean;
24
+ valid?: true;
25
25
  };
26
26
  //# sourceMappingURL=dateType.d.ts.map