@es-joy/jsoe 0.4.3 → 0.4.5

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/dist/types.d.ts CHANGED
@@ -1,5 +1,86 @@
1
1
  export function getPropertyValueFromLegend(legend: HTMLLegendElement): string;
2
2
  export default Types;
3
+ /**
4
+ * Utility to retrieve the type out of a type root element.
5
+ */
6
+ export type GetTypeForRoot = (root: RootElement | null) => string | undefined | null;
7
+ /**
8
+ * Utility to get the value out of a type root element with a given
9
+ * state and path.
10
+ */
11
+ export type GetValueForRoot = (root: RootElement, stateObj?: StateObject | undefined, currentPath?: string | undefined) => StructuredCloneValue;
12
+ /**
13
+ * Utility to get the form control (e.g., input element) for a root.
14
+ */
15
+ export type GetFormControlForRoot = (root: RootElement) => null | HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement;
16
+ /**
17
+ * Utility to get the value for a root using its ancestor and state.
18
+ */
19
+ export type GetValueFromRootAncestor = (selOrEl: string | Element, stateObj: StateObject) => StructuredCloneValue;
20
+ export type GetFormControlFromRootAncestor = (selOrEl: string | Element) => null | HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement;
21
+ export type GetTypesForFormatAndState = (format: string, state?: string | undefined) => AvailableType[] | undefined;
22
+ export type GetOptionForType = (type: AvailableType) => [string, {
23
+ value: AvailableType;
24
+ title?: string;
25
+ }];
26
+ export type GetTypeOptionsForFormatAndState = (format: string, parserState?: string | undefined) => [string, {
27
+ value: AvailableType;
28
+ title?: string;
29
+ }][];
30
+ export type GetUIForModeAndType = (cfg: {
31
+ readonly?: boolean;
32
+ resultType?: "both" | "keys" | "values";
33
+ typeNamespace?: string;
34
+ type: AvailableType;
35
+ topRoot?: RootElement;
36
+ bringIntoFocus?: boolean | undefined;
37
+ buildTypeChoices?: import('./typeChoices.js').BuildTypeChoices;
38
+ format: import('./formats.js').AvailableFormat;
39
+ schemaContent?: object;
40
+ schemaState?: GetPossibleSchemasForPathAndType;
41
+ value: StructuredCloneValue;
42
+ hasValue: boolean;
43
+ replaced?: StructuredCloneValue;
44
+ }) => Element;
45
+ export type ValidValuesSet = (cfg: {
46
+ form: HTMLFormElement;
47
+ typeNamespace?: string;
48
+ keySelectClass?: string;
49
+ }) => boolean;
50
+ export type ValidateAllReferences = (cfg: {
51
+ topRoot: RootElement;
52
+ }) => void;
53
+ export type Validate = (cfg: {
54
+ type: AvailableType;
55
+ root: RootElement;
56
+ topRoot?: RootElement;
57
+ }) => boolean;
58
+ export type SetValue = (cfg: {
59
+ type: AvailableType;
60
+ root: RootElement;
61
+ value: StructuredCloneValue;
62
+ }) => void;
63
+ export type GetValueForString = (s: string, cfg: {
64
+ format: import('./formats.js').AvailableFormat;
65
+ state: string;
66
+ endMatchTypeObjs?: TypeObject[] | undefined;
67
+ firstRun?: boolean | undefined;
68
+ rootHolder?: [type: string, parent: {
69
+ [key: string]: any;
70
+ }, parentPath: string | number, path: string][] | undefined;
71
+ parent: {
72
+ [key: string]: any;
73
+ };
74
+ parentPath: string | number;
75
+ }) => [
76
+ value: StructuredCloneValue,
77
+ remnant: string,
78
+ beginOnly: boolean,
79
+ assign: boolean
80
+ ];
81
+ export type CustomValidateAllReferences = (info: {
82
+ topRoot: HTMLDivElement;
83
+ }) => void;
3
84
  export type StructuredCloneValue = import('./formats.js').StructuredCloneValue;
4
85
  export type JamilihArray = import('jamilih').JamilihArray;
5
86
  export type RootInfo = {
@@ -164,244 +245,388 @@ export type StateObject = {
164
245
  * Any other possibilities than `div`?
165
246
  */
166
247
  export type RootElement = HTMLDivElement;
167
- declare namespace Types {
168
- namespace availableTypes {
169
- export { nullType as null };
170
- export { trueType as true };
171
- export { falseType as false };
172
- export { numberType as number };
173
- export { bigintType as bigint };
174
- export { stringType as string };
175
- export { arrayReferenceType as arrayReference };
176
- export { objectReferenceType as objectReference };
177
- export { arrayType as array };
178
- export { objectType as object };
179
- export { dateType as date };
180
- export const userObject: string[];
181
- export { undefinedType as undef };
182
- export { SpecialRealNumberSuperType as SpecialRealNumber };
183
- export { SpecialNumberSuperType as SpecialNumber };
184
- export { regexpType as regexp };
185
- export { BooleanObjectType as BooleanObject };
186
- export { NumberObjectType as NumberObject };
187
- export { StringObjectType as StringObject };
188
- export namespace map {
189
- const option: string[];
190
- }
191
- export namespace set {
192
- const option_1: string[];
193
- export { option_1 as option };
194
- }
195
- export namespace file {
196
- const option_2: string[];
197
- export { option_2 as option };
198
- }
199
- export namespace filelist {
200
- const option_3: string[];
201
- export { option_3 as option };
202
- }
203
- export { blobHTMLType as blobHTML };
204
- export namespace arraybuffer {
205
- const option_4: string[];
206
- export { option_4 as option };
207
- }
208
- export namespace arraybufferview {
209
- const option_5: string[];
210
- export { option_5 as option };
211
- }
212
- export namespace dataview {
213
- const option_6: string[];
214
- export { option_6 as option };
215
- }
216
- export namespace imagedata {
217
- const option_7: string[];
218
- export { option_7 as option };
219
- }
220
- export namespace imagebitmap {
221
- const option_8: string[];
222
- export { option_8 as option };
223
- }
224
- export namespace int8array {
225
- const option_9: string[];
226
- export { option_9 as option };
227
- }
228
- export namespace uint8array {
229
- const option_10: string[];
230
- export { option_10 as option };
231
- }
232
- export namespace uint8clampedarray {
233
- const option_11: string[];
234
- export { option_11 as option };
235
- }
236
- export namespace int16array {
237
- const option_12: string[];
238
- export { option_12 as option };
239
- }
240
- export namespace uint16array {
241
- const option_13: string[];
242
- export { option_13 as option };
243
- }
244
- export namespace int32array {
245
- const option_14: string[];
246
- export { option_14 as option };
247
- }
248
- export namespace uint32array {
249
- const option_15: string[];
250
- export { option_15 as option };
251
- }
252
- export namespace float32array {
253
- const option_16: string[];
254
- export { option_16 as option };
255
- }
256
- export namespace float64array {
257
- const option_17: string[];
258
- export { option_17 as option };
259
- }
260
- export namespace IntlCollator {
261
- const option_18: string[];
262
- export { option_18 as option };
263
- }
264
- export namespace IntlDateTimeFormat {
265
- const option_19: string[];
266
- export { option_19 as option };
267
- }
268
- export namespace IntlNumberFormat {
269
- const option_20: string[];
270
- export { option_20 as option };
271
- }
272
- export { sparseUndefinedType as sparseUndefined };
273
- export namespace ValidDate {
274
- const valid: boolean;
275
- }
276
- export namespace arrayNonindexKeys {
277
- const sparse: boolean;
278
- }
279
- }
280
- /**
281
- * Utility to retrieve the type out of a type root element.
282
- * @public
283
- * @param {?RootElement} root
284
- * @returns {string|undefined|null} Why would it not exist?
285
- */
286
- function getTypeForRoot(root: HTMLDivElement | null): string | null | undefined;
287
- /**
288
- * @typedef {(
289
- * keypath: string,
290
- * parentPath: string,
291
- * arrayOrObjectPropertyName: string,
292
- * valueType: string
293
- * ) => StateObject} GetPossibleSchemasForPathAndType
294
- */
295
- /**
296
- * @typedef {{
297
- * typeNamespace?: string,
298
- * "readonly"?: boolean,
299
- * format?: import('./formats.js').AvailableFormat,
300
- * error?: Error,
301
- * rootUI?: Element,
302
- * schema?: string,
303
- * schemaContent?: object,
304
- * getPossibleSchemasForPathAndType?: GetPossibleSchemasForPathAndType,
305
- * paths?: {[currentPath: string]: {
306
- * referentPath: string,
307
- * expectArrayReferent: boolean
308
- * }},
309
- * handlingReference?: boolean
310
- * }} StateObject
311
- */
312
- /**
313
- * Utility to get the value out of a type root element with a given
314
- * state and path.
315
- * @public
316
- * @param {RootElement} root
317
- * @param {StateObject} stateObj
318
- * @param {string} [currentPath]
319
- * @returns {StructuredCloneValue}
320
- */
321
- function getValueForRoot(root: HTMLDivElement, stateObj: StateObject, currentPath?: string | undefined): any;
322
- /**
323
- * Utility to get the form control (e.g., input element) for a root.
324
- * @public
325
- * @param {RootElement} root
326
- * @returns {null|
327
- * HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement|HTMLButtonElement}
328
- */
329
- function getFormControlForRoot(root: HTMLDivElement): HTMLInputElement | HTMLButtonElement | HTMLSelectElement | HTMLTextAreaElement | null;
330
- /**
331
- * Utility to get the value for a root using its ancestor and state.
332
- * @public
333
- * @param {string|Element} selOrEl
334
- * @param {StateObject} stateObj
335
- * @returns {StructuredCloneValue}
336
- */
337
- function getValueFromRootAncestor(selOrEl: string | Element, stateObj: StateObject): any;
338
- /**
339
- * @public
340
- * @param {string|Element} selOrEl
341
- * @returns {null|HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement|
342
- * HTMLButtonElement}
343
- */
344
- function getFormControlFromRootAncestor(selOrEl: string | Element): HTMLInputElement | HTMLButtonElement | HTMLSelectElement | HTMLTextAreaElement | null;
345
- /**
346
- * @param {string} format
347
- * @param {string} [state]
348
- * @returns {AvailableType[]|undefined}
349
- */
350
- function getTypesForFormatAndState(format: string, state?: string | undefined): AvailableType[] | undefined;
351
- /**
352
- * @public
353
- * @param {AvailableType} type
354
- * @returns {[string, {value: AvailableType, title?: string}]}
355
- */
356
- function getOptionForType(type: AvailableType): [string, {
357
- value: AvailableType;
358
- title?: string | undefined;
359
- }];
360
- /**
361
- * @public
362
- * @param {string} format
363
- * @param {string} [parserState]
364
- * @returns {[string, {value: AvailableType, title?: string}][]}
365
- */
366
- function getTypeOptionsForFormatAndState(format: string, parserState?: string | undefined): [string, {
367
- value: AvailableType;
368
- title?: string | undefined;
369
- }][];
370
- /**
371
- * @public
372
- * @param {object} cfg
373
- * @param {boolean} [cfg.readonly]
374
- * @param {"both"|"keys"|"values"} [cfg.resultType]
375
- * @param {string} [cfg.typeNamespace]
376
- * @param {AvailableType} cfg.type
377
- * @param {RootElement} [cfg.topRoot]
378
- * @param {boolean|undefined} cfg.bringIntoFocus
379
- * @param {import('./typeChoices.js').BuildTypeChoices} [cfg.buildTypeChoices]
380
- * @param {import('./formats.js').AvailableFormat} cfg.format
381
- * @param {object} [cfg.schemaContent]
382
- * @param {GetPossibleSchemasForPathAndType} [cfg.schemaState] Not currently
383
- * in use
384
- * @param {StructuredCloneValue} cfg.value
385
- * @param {boolean} cfg.hasValue
386
- * @param {StructuredCloneValue} [cfg.replaced]
387
- * @returns {Element}
388
- */
389
- function getUIForModeAndType({ readonly, resultType, typeNamespace, type, topRoot, bringIntoFocus, buildTypeChoices, format, schemaContent, schemaState, value, hasValue, replaced }: {
390
- readonly?: boolean | undefined;
391
- resultType?: "keys" | "values" | "both" | undefined;
392
- typeNamespace?: string | undefined;
393
- type: AvailableType;
394
- topRoot?: HTMLDivElement | undefined;
395
- bringIntoFocus: boolean | undefined;
396
- buildTypeChoices?: import("./typeChoices.js").BuildTypeChoices | undefined;
397
- format: import("./formats.js").AvailableFormat;
398
- schemaContent?: object | undefined;
399
- schemaState?: GetPossibleSchemasForPathAndType | undefined;
400
- value: any;
401
- hasValue: boolean;
402
- replaced?: any;
403
- }): Element;
404
- const contexts: {
248
+ /**
249
+ * Utility to retrieve the type out of a type root element.
250
+ * @callback GetTypeForRoot
251
+ * @param {?RootElement} root
252
+ * @returns {string|undefined|null} Why would it not exist?
253
+ */
254
+ /**
255
+ * Utility to get the value out of a type root element with a given
256
+ * state and path.
257
+ * @callback GetValueForRoot
258
+ * @param {RootElement} root
259
+ * @param {StateObject} [stateObj]
260
+ * @param {string} [currentPath]
261
+ * @returns {StructuredCloneValue}
262
+ */
263
+ /**
264
+ * Utility to get the form control (e.g., input element) for a root.
265
+ * @callback GetFormControlForRoot
266
+ * @param {RootElement} root
267
+ * @returns {null|
268
+ * HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement|HTMLButtonElement}
269
+ */
270
+ /**
271
+ * Utility to get the value for a root using its ancestor and state.
272
+ * @callback GetValueFromRootAncestor
273
+ * @param {string|Element} selOrEl
274
+ * @param {StateObject} stateObj
275
+ * @returns {StructuredCloneValue}
276
+ */
277
+ /**
278
+ * @callback GetFormControlFromRootAncestor
279
+ * @param {string|Element} selOrEl
280
+ * @returns {null|HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement|
281
+ * HTMLButtonElement}
282
+ */
283
+ /**
284
+ * @callback GetTypesForFormatAndState
285
+ * @param {string} format
286
+ * @param {string} [state]
287
+ * @returns {AvailableType[]|undefined}
288
+ */
289
+ /**
290
+ * @callback GetOptionForType
291
+ * @param {AvailableType} type
292
+ * @returns {[string, {value: AvailableType, title?: string}]}
293
+ */
294
+ /**
295
+ * @callback GetTypeOptionsForFormatAndState
296
+ * @param {string} format
297
+ * @param {string} [parserState]
298
+ * @returns {[string, {value: AvailableType, title?: string}][]}
299
+ */
300
+ /**
301
+ * @typedef {(cfg: {
302
+ * readonly?: boolean,
303
+ * resultType?: "both"|"keys"|"values",
304
+ * typeNamespace?: string,
305
+ * type: AvailableType,
306
+ * topRoot?: RootElement,
307
+ * bringIntoFocus?: boolean|undefined,
308
+ * buildTypeChoices?: import('./typeChoices.js').BuildTypeChoices,
309
+ * format: import('./formats.js').AvailableFormat,
310
+ * schemaContent?: object
311
+ * schemaState?: GetPossibleSchemasForPathAndType,
312
+ * value: StructuredCloneValue,
313
+ * hasValue: boolean,
314
+ * replaced?: StructuredCloneValue,
315
+ * }) => Element} GetUIForModeAndType
316
+ */
317
+ /**
318
+ * @typedef {(cfg: {
319
+ * form: HTMLFormElement,
320
+ * typeNamespace?: string,
321
+ * keySelectClass?: string,
322
+ * }) => boolean} ValidValuesSet
323
+ */
324
+ /**
325
+ * @typedef {(cfg: {
326
+ * topRoot: RootElement
327
+ * }) => void} ValidateAllReferences
328
+ */
329
+ /**
330
+ * @typedef {(cfg: {
331
+ * type: AvailableType,
332
+ * root: RootElement,
333
+ * topRoot?: RootElement
334
+ * }) => boolean} Validate
335
+ */
336
+ /**
337
+ * @typedef {(cfg: {
338
+ * type: AvailableType,
339
+ * root: RootElement,
340
+ * value: StructuredCloneValue,
341
+ * }) => void} SetValue
342
+ */
343
+ /**
344
+ * @typedef {(s: string, cfg: {
345
+ * format: import('./formats.js').AvailableFormat,
346
+ * state: string,
347
+ * endMatchTypeObjs?: TypeObject[]
348
+ * firstRun?: boolean,
349
+ * rootHolder?: [
350
+ * type: string,
351
+ * parent: {[key: string]: any},
352
+ * parentPath: string|number,
353
+ * path: string
354
+ * ][],
355
+ * parent: {[key: string]: any},
356
+ * parentPath: string|number
357
+ * }) => [
358
+ * value: StructuredCloneValue,
359
+ * remnant: string,
360
+ * beginOnly: boolean,
361
+ * assign: boolean
362
+ * ]} GetValueForString
363
+ */
364
+ /**
365
+ * @typedef {(
366
+ * info: {topRoot: HTMLDivElement}
367
+ * ) => void} CustomValidateAllReferences
368
+ */
369
+ /**
370
+ * @type {{
371
+ * availableTypes: {
372
+ * [key in AvailableType]: Partial<TypeObject>|string[]|
373
+ * {valid: true}|{sparse: true}
374
+ * },
375
+ * getTypeForRoot: GetTypeForRoot,
376
+ * getValueForRoot: GetValueForRoot,
377
+ * getFormControlForRoot: GetFormControlForRoot,
378
+ * getValueFromRootAncestor: GetValueFromRootAncestor,
379
+ * getFormControlFromRootAncestor: GetFormControlFromRootAncestor,
380
+ * getTypesForFormatAndState: GetTypesForFormatAndState,
381
+ * getOptionForType: GetOptionForType,
382
+ * getTypeOptionsForFormatAndState: GetTypeOptionsForFormatAndState,
383
+ * getUIForModeAndType: GetUIForModeAndType,
384
+ * contexts: {
385
+ * [key: string]: {
386
+ * [key: string]: {type: AvailableType, after: AvailableType}[]
387
+ * }
388
+ * },
389
+ * validValuesSet: ValidValuesSet,
390
+ * validateAllReferences: ValidateAllReferences,
391
+ * validate: Validate,
392
+ * setValue: SetValue,
393
+ * getValueForString: GetValueForString,
394
+ * customValidateAllReferences?: CustomValidateAllReferences
395
+ * }}
396
+ */
397
+ declare const Types: {
398
+ availableTypes: {
399
+ string: string[] | Partial<TypeObject> | {
400
+ valid: true;
401
+ } | {
402
+ sparse: true;
403
+ };
404
+ number: string[] | Partial<TypeObject> | {
405
+ valid: true;
406
+ } | {
407
+ sparse: true;
408
+ };
409
+ bigint: string[] | Partial<TypeObject> | {
410
+ valid: true;
411
+ } | {
412
+ sparse: true;
413
+ };
414
+ object: string[] | Partial<TypeObject> | {
415
+ valid: true;
416
+ } | {
417
+ sparse: true;
418
+ };
419
+ map: string[] | Partial<TypeObject> | {
420
+ valid: true;
421
+ } | {
422
+ sparse: true;
423
+ };
424
+ set: string[] | Partial<TypeObject> | {
425
+ valid: true;
426
+ } | {
427
+ sparse: true;
428
+ };
429
+ file: string[] | Partial<TypeObject> | {
430
+ valid: true;
431
+ } | {
432
+ sparse: true;
433
+ };
434
+ arraybuffer: string[] | Partial<TypeObject> | {
435
+ valid: true;
436
+ } | {
437
+ sparse: true;
438
+ };
439
+ false: string[] | Partial<TypeObject> | {
440
+ valid: true;
441
+ } | {
442
+ sparse: true;
443
+ };
444
+ date: string[] | Partial<TypeObject> | {
445
+ valid: true;
446
+ } | {
447
+ sparse: true;
448
+ };
449
+ null: string[] | Partial<TypeObject> | {
450
+ valid: true;
451
+ } | {
452
+ sparse: true;
453
+ };
454
+ regexp: string[] | Partial<TypeObject> | {
455
+ valid: true;
456
+ } | {
457
+ sparse: true;
458
+ };
459
+ array: string[] | Partial<TypeObject> | {
460
+ valid: true;
461
+ } | {
462
+ sparse: true;
463
+ };
464
+ true: string[] | Partial<TypeObject> | {
465
+ valid: true;
466
+ } | {
467
+ sparse: true;
468
+ };
469
+ arrayReference: string[] | Partial<TypeObject> | {
470
+ valid: true;
471
+ } | {
472
+ sparse: true;
473
+ };
474
+ objectReference: string[] | Partial<TypeObject> | {
475
+ valid: true;
476
+ } | {
477
+ sparse: true;
478
+ };
479
+ userObject: string[] | Partial<TypeObject> | {
480
+ valid: true;
481
+ } | {
482
+ sparse: true;
483
+ };
484
+ undef: string[] | Partial<TypeObject> | {
485
+ valid: true;
486
+ } | {
487
+ sparse: true;
488
+ };
489
+ SpecialRealNumber: string[] | Partial<TypeObject> | {
490
+ valid: true;
491
+ } | {
492
+ sparse: true;
493
+ };
494
+ SpecialNumber: string[] | Partial<TypeObject> | {
495
+ valid: true;
496
+ } | {
497
+ sparse: true;
498
+ };
499
+ BooleanObject: string[] | Partial<TypeObject> | {
500
+ valid: true;
501
+ } | {
502
+ sparse: true;
503
+ };
504
+ NumberObject: string[] | Partial<TypeObject> | {
505
+ valid: true;
506
+ } | {
507
+ sparse: true;
508
+ };
509
+ StringObject: string[] | Partial<TypeObject> | {
510
+ valid: true;
511
+ } | {
512
+ sparse: true;
513
+ };
514
+ filelist: string[] | Partial<TypeObject> | {
515
+ valid: true;
516
+ } | {
517
+ sparse: true;
518
+ };
519
+ blobHTML: string[] | Partial<TypeObject> | {
520
+ valid: true;
521
+ } | {
522
+ sparse: true;
523
+ };
524
+ arraybufferview: string[] | Partial<TypeObject> | {
525
+ valid: true;
526
+ } | {
527
+ sparse: true;
528
+ };
529
+ dataview: string[] | Partial<TypeObject> | {
530
+ valid: true;
531
+ } | {
532
+ sparse: true;
533
+ };
534
+ imagedata: string[] | Partial<TypeObject> | {
535
+ valid: true;
536
+ } | {
537
+ sparse: true;
538
+ };
539
+ imagebitmap: string[] | Partial<TypeObject> | {
540
+ valid: true;
541
+ } | {
542
+ sparse: true;
543
+ };
544
+ int8array: string[] | Partial<TypeObject> | {
545
+ valid: true;
546
+ } | {
547
+ sparse: true;
548
+ };
549
+ uint8array: string[] | Partial<TypeObject> | {
550
+ valid: true;
551
+ } | {
552
+ sparse: true;
553
+ };
554
+ uint8clampedarray: string[] | Partial<TypeObject> | {
555
+ valid: true;
556
+ } | {
557
+ sparse: true;
558
+ };
559
+ int16array: string[] | Partial<TypeObject> | {
560
+ valid: true;
561
+ } | {
562
+ sparse: true;
563
+ };
564
+ uint16array: string[] | Partial<TypeObject> | {
565
+ valid: true;
566
+ } | {
567
+ sparse: true;
568
+ };
569
+ int32array: string[] | Partial<TypeObject> | {
570
+ valid: true;
571
+ } | {
572
+ sparse: true;
573
+ };
574
+ uint32array: string[] | Partial<TypeObject> | {
575
+ valid: true;
576
+ } | {
577
+ sparse: true;
578
+ };
579
+ float32array: string[] | Partial<TypeObject> | {
580
+ valid: true;
581
+ } | {
582
+ sparse: true;
583
+ };
584
+ float64array: string[] | Partial<TypeObject> | {
585
+ valid: true;
586
+ } | {
587
+ sparse: true;
588
+ };
589
+ IntlCollator: string[] | Partial<TypeObject> | {
590
+ valid: true;
591
+ } | {
592
+ sparse: true;
593
+ };
594
+ IntlDateTimeFormat: string[] | Partial<TypeObject> | {
595
+ valid: true;
596
+ } | {
597
+ sparse: true;
598
+ };
599
+ IntlNumberFormat: string[] | Partial<TypeObject> | {
600
+ valid: true;
601
+ } | {
602
+ sparse: true;
603
+ };
604
+ sparseUndefined: string[] | Partial<TypeObject> | {
605
+ valid: true;
606
+ } | {
607
+ sparse: true;
608
+ };
609
+ ValidDate: string[] | Partial<TypeObject> | {
610
+ valid: true;
611
+ } | {
612
+ sparse: true;
613
+ };
614
+ arrayNonindexKeys: string[] | Partial<TypeObject> | {
615
+ valid: true;
616
+ } | {
617
+ sparse: true;
618
+ };
619
+ };
620
+ getTypeForRoot: GetTypeForRoot;
621
+ getValueForRoot: GetValueForRoot;
622
+ getFormControlForRoot: GetFormControlForRoot;
623
+ getValueFromRootAncestor: GetValueFromRootAncestor;
624
+ getFormControlFromRootAncestor: GetFormControlFromRootAncestor;
625
+ getTypesForFormatAndState: GetTypesForFormatAndState;
626
+ getOptionForType: GetOptionForType;
627
+ getTypeOptionsForFormatAndState: GetTypeOptionsForFormatAndState;
628
+ getUIForModeAndType: GetUIForModeAndType;
629
+ contexts: {
405
630
  [key: string]: {
406
631
  [key: string]: {
407
632
  type: AvailableType;
@@ -409,115 +634,11 @@ declare namespace Types {
409
634
  }[];
410
635
  };
411
636
  };
412
- /**
413
- * @public
414
- * @param {object} cfg
415
- * @param {HTMLFormElement} cfg.form
416
- * @param {string} [cfg.typeNamespace]
417
- * @param {string} [cfg.keySelectClass]
418
- * @returns {boolean}
419
- */
420
- function validValuesSet({ form, typeNamespace, keySelectClass }: {
421
- form: HTMLFormElement;
422
- typeNamespace?: string | undefined;
423
- keySelectClass?: string | undefined;
424
- }): boolean;
425
- /**
426
- * Any other possibilities than `div`?
427
- * @typedef {HTMLDivElement} RootElement
428
- */
429
- /**
430
- * @public
431
- * @param {object} cfg
432
- * @param {RootElement} cfg.topRoot
433
- * @returns {void}
434
- */
435
- function validateAllReferences({ topRoot }: {
436
- topRoot: HTMLDivElement;
437
- }): void;
438
- const customValidateAllReferences: ((info: {
439
- topRoot: HTMLDivElement;
440
- }) => void) | null;
441
- /**
442
- * @public
443
- * @param {object} cfg
444
- * @param {AvailableType} cfg.type
445
- * @param {RootElement} cfg.root
446
- * @param {RootElement} [cfg.topRoot]
447
- * @returns {boolean}
448
- */
449
- function validate({ type, root, topRoot }: {
450
- type: AvailableType;
451
- root: HTMLDivElement;
452
- topRoot?: HTMLDivElement | undefined;
453
- }): boolean;
454
- /**
455
- * @param {object} cfg
456
- * @param {AvailableType} cfg.type
457
- * @param {RootElement} cfg.root
458
- * @param {StructuredCloneValue} cfg.value
459
- * @returns {void}
460
- */
461
- function setValue({ type, root, value }: {
462
- type: AvailableType;
463
- root: HTMLDivElement;
464
- value: any;
465
- }): void;
466
- /**
467
- * @public
468
- * @param {string} s
469
- * @param {object} cfg
470
- * @param {import('./formats.js').AvailableFormat} cfg.format
471
- * @param {string} cfg.state
472
- * @param {TypeObject[]} [cfg.endMatchTypeObjs=[]]
473
- * @param {boolean} [cfg.firstRun=true]
474
- * @param {[
475
- * type: string,
476
- * parent: {[key: string]: any},
477
- * parentPath: string|number,
478
- * path: string
479
- * ][]} [cfg.rootHolder=[]]
480
- * @param {{[key: string]: any}} cfg.parent
481
- * @param {string|number} cfg.parentPath
482
- * @returns {[
483
- * value: StructuredCloneValue,
484
- * remnant: string,
485
- * beginOnly: boolean,
486
- * assign: boolean
487
- * ]}
488
- */
489
- function getValueForString(s: string, { format, state, endMatchTypeObjs, firstRun, rootHolder, parent, parentPath }: {
490
- format: import("./formats.js").AvailableFormat;
491
- state: string;
492
- endMatchTypeObjs?: TypeObject[] | undefined;
493
- firstRun?: boolean | undefined;
494
- rootHolder?: [type: string, parent: {
495
- [key: string]: any;
496
- }, parentPath: string | number, path: string][] | undefined;
497
- parent: {
498
- [key: string]: any;
499
- };
500
- parentPath: string | number;
501
- }): [value: any, remnant: string, beginOnly: boolean, assign: boolean];
502
- }
503
- import nullType from './fundamentalTypes/nullType.js';
504
- import trueType from './subTypes/trueType.js';
505
- import falseType from './subTypes/falseType.js';
506
- import numberType from './fundamentalTypes/numberType.js';
507
- import bigintType from './fundamentalTypes/bigintType.js';
508
- import stringType from './fundamentalTypes/stringType.js';
509
- import arrayReferenceType from './fundamentalTypes/arrayReferenceType.js';
510
- import objectReferenceType from './fundamentalTypes/objectReferenceType.js';
511
- import arrayType from './fundamentalTypes/arrayType.js';
512
- import objectType from './fundamentalTypes/objectType.js';
513
- import dateType from './fundamentalTypes/dateType.js';
514
- import undefinedType from './fundamentalTypes/undefinedType.js';
515
- import SpecialRealNumberSuperType from './superTypes/SpecialRealNumberSuperType.js';
516
- import SpecialNumberSuperType from './superTypes/SpecialNumberSuperType.js';
517
- import regexpType from './fundamentalTypes/regexpType.js';
518
- import BooleanObjectType from './fundamentalTypes/BooleanObjectType.js';
519
- import NumberObjectType from './fundamentalTypes/NumberObjectType.js';
520
- import StringObjectType from './fundamentalTypes/StringObjectType.js';
521
- import blobHTMLType from './subTypes/blobHTMLType.js';
522
- import sparseUndefinedType from './fundamentalTypes/sparseUndefinedType.js';
637
+ validValuesSet: ValidValuesSet;
638
+ validateAllReferences: ValidateAllReferences;
639
+ validate: Validate;
640
+ setValue: SetValue;
641
+ getValueForString: GetValueForString;
642
+ customValidateAllReferences?: CustomValidateAllReferences | undefined;
643
+ };
523
644
  //# sourceMappingURL=types.d.ts.map