@es-joy/jsoe 0.13.7 → 0.14.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 (67) hide show
  1. package/.eslintrc.cjs +5 -0
  2. package/.nyc_output/out.json +13027 -11984
  3. package/CHANGES.md +10 -0
  4. package/README.md +5 -4
  5. package/demo/index.js +68 -2
  6. package/dist/formats/structuredCloning.d.ts.map +1 -1
  7. package/dist/fundamentalTypes/BooleanObjectType.d.ts.map +1 -1
  8. package/dist/fundamentalTypes/NumberObjectType.d.ts.map +1 -1
  9. package/dist/fundamentalTypes/StringObjectType.d.ts.map +1 -1
  10. package/dist/fundamentalTypes/arrayType.d.ts.map +1 -1
  11. package/dist/fundamentalTypes/blobType.d.ts.map +1 -1
  12. package/dist/fundamentalTypes/dateType.d.ts.map +1 -1
  13. package/dist/fundamentalTypes/fileType.d.ts.map +1 -1
  14. package/dist/fundamentalTypes/filelistType.d.ts.map +1 -1
  15. package/dist/fundamentalTypes/mapType.d.ts.map +1 -1
  16. package/dist/fundamentalTypes/noneditableType.d.ts +6 -0
  17. package/dist/fundamentalTypes/noneditableType.d.ts.map +1 -0
  18. package/dist/fundamentalTypes/objectReferenceType.d.ts.map +1 -1
  19. package/dist/fundamentalTypes/objectType.d.ts.map +1 -1
  20. package/dist/fundamentalTypes/setType.d.ts.map +1 -1
  21. package/dist/fundamentalTypes/sparseUndefinedType.d.ts.map +1 -1
  22. package/dist/fundamentalTypes/undefinedType.d.ts.map +1 -1
  23. package/dist/index.js +436 -109
  24. package/dist/superTypes/SpecialNumberType.d.ts +2 -10
  25. package/dist/superTypes/SpecialNumberType.d.ts.map +1 -1
  26. package/dist/superTypes/SpecialRealNumberType.d.ts +2 -2
  27. package/dist/superTypes/SpecialRealNumberType.d.ts.map +1 -1
  28. package/dist/superTypes/dommatrixType.d.ts +6 -0
  29. package/dist/superTypes/dommatrixType.d.ts.map +1 -0
  30. package/dist/superTypes/dompointType.d.ts +6 -0
  31. package/dist/superTypes/dompointType.d.ts.map +1 -0
  32. package/dist/superTypes/domrectType.d.ts +6 -0
  33. package/dist/superTypes/domrectType.d.ts.map +1 -0
  34. package/dist/superTypes/errorsSpecialType.d.ts +2 -2
  35. package/dist/superTypes/errorsSpecialType.d.ts.map +1 -1
  36. package/dist/types.d.ts +27 -14
  37. package/dist/types.d.ts.map +1 -1
  38. package/dist/utils/media.d.ts.map +1 -1
  39. package/dist/vendor-imports.d.ts +1 -1
  40. package/package.json +13 -13
  41. package/src/formats/structuredCloning.js +49 -6
  42. package/src/fundamentalTypes/BooleanObjectType.js +3 -1
  43. package/src/fundamentalTypes/NumberObjectType.js +3 -1
  44. package/src/fundamentalTypes/StringObjectType.js +3 -1
  45. package/src/fundamentalTypes/arrayType.js +4 -2
  46. package/src/fundamentalTypes/blobType.js +17 -13
  47. package/src/fundamentalTypes/dateType.js +6 -2
  48. package/src/fundamentalTypes/fileType.js +14 -12
  49. package/src/fundamentalTypes/filelistType.js +3 -1
  50. package/src/fundamentalTypes/mapType.js +3 -1
  51. package/src/fundamentalTypes/noneditableType.js +87 -0
  52. package/src/fundamentalTypes/objectReferenceType.js +3 -1
  53. package/src/fundamentalTypes/objectType.js +3 -1
  54. package/src/fundamentalTypes/setType.js +3 -1
  55. package/src/fundamentalTypes/sparseUndefinedType.js +3 -1
  56. package/src/fundamentalTypes/undefinedType.js +3 -1
  57. package/src/subTypes/blobHTMLType.js +1 -1
  58. package/src/superTypes/SpecialNumberType.js +2 -8
  59. package/src/superTypes/SpecialRealNumberType.js +2 -2
  60. package/src/{fundamentalTypes → superTypes}/dommatrixType.js +63 -10
  61. package/src/{fundamentalTypes → superTypes}/dompointType.js +60 -7
  62. package/src/{fundamentalTypes → superTypes}/domrectType.js +59 -7
  63. package/src/superTypes/errorsSpecialType.js +1 -1
  64. package/src/types.js +40 -17
  65. package/src/utils/media.js +3 -2
  66. package/src/vendor-imports.js +2 -1
  67. package/vendor/typeson-registry/dist/index.js +90 -28
@@ -1,14 +1,6 @@
1
1
  export default SpecialNumberSuperType;
2
- export type SuperTypeObject = import('../types.js').TypeObject & {
3
- childTypes: string[];
4
- };
5
2
  /**
6
- * @typedef {import('../types.js').TypeObject & {
7
- * childTypes: string[]
8
- * }} SuperTypeObject
3
+ * @type {import('../types.js').SuperTypeObject}
9
4
  */
10
- /**
11
- * @type {SuperTypeObject}
12
- */
13
- declare const SpecialNumberSuperType: SuperTypeObject;
5
+ declare const SpecialNumberSuperType: import('../types.js').SuperTypeObject;
14
6
  //# sourceMappingURL=SpecialNumberType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpecialNumberType.d.ts","sourceRoot":"","sources":["../../src/superTypes/SpecialNumberType.js"],"names":[],"mappings":";8BAGa,OAAO,aAAa,EAAE,UAAU,GAAG;IAC/C,UAAc,EAAE,MAAM,EAAE,CAAA;CACrB;AAHJ;;;;GAIG;AAEH;;GAEG;AACH,sCAFU,eAAe,CAgEvB"}
1
+ {"version":3,"file":"SpecialNumberType.d.ts","sourceRoot":"","sources":["../../src/superTypes/SpecialNumberType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,sCAFU,OAAO,aAAa,EAAE,eAAe,CAgE7C"}
@@ -1,6 +1,6 @@
1
1
  export default SpecialRealNumberSuperType;
2
2
  /**
3
- * @type {import('./SpecialNumberType.js').SuperTypeObject}
3
+ * @type {import('../types.js').SuperTypeObject}
4
4
  */
5
- declare const SpecialRealNumberSuperType: import('./SpecialNumberType.js').SuperTypeObject;
5
+ declare const SpecialRealNumberSuperType: import('../types.js').SuperTypeObject;
6
6
  //# sourceMappingURL=SpecialRealNumberType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpecialRealNumberType.d.ts","sourceRoot":"","sources":["../../src/superTypes/SpecialRealNumberType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,0CAFU,OAAO,wBAAwB,EAAE,eAAe,CAyDxD"}
1
+ {"version":3,"file":"SpecialRealNumberType.d.ts","sourceRoot":"","sources":["../../src/superTypes/SpecialRealNumberType.js"],"names":[],"mappings":";AAEA;;GAEG;AACH,0CAFU,OAAO,aAAa,EAAE,eAAe,CAyD7C"}
@@ -0,0 +1,6 @@
1
+ export default dommatrixType;
2
+ /**
3
+ * @type {import('../types.js').SuperTypeObject}
4
+ */
5
+ declare const dommatrixType: import('../types.js').SuperTypeObject;
6
+ //# sourceMappingURL=dommatrixType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dommatrixType.d.ts","sourceRoot":"","sources":["../../src/superTypes/dommatrixType.js"],"names":[],"mappings":";AAKA;;GAEG;AACH,6BAFU,OAAO,aAAa,EAAE,eAAe,CAkZ7C"}
@@ -0,0 +1,6 @@
1
+ export default dompointType;
2
+ /**
3
+ * @type {import('../types.js').SuperTypeObject}
4
+ */
5
+ declare const dompointType: import('../types.js').SuperTypeObject;
6
+ //# sourceMappingURL=dompointType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dompointType.d.ts","sourceRoot":"","sources":["../../src/superTypes/dompointType.js"],"names":[],"mappings":";AAKA;;GAEG;AACH,4BAFU,OAAO,aAAa,EAAE,eAAe,CAqJ7C"}
@@ -0,0 +1,6 @@
1
+ export default domrectType;
2
+ /**
3
+ * @type {import('../types.js').SuperTypeObject}
4
+ */
5
+ declare const domrectType: import('../types.js').SuperTypeObject;
6
+ //# sourceMappingURL=domrectType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domrectType.d.ts","sourceRoot":"","sources":["../../src/superTypes/domrectType.js"],"names":[],"mappings":";AAKA;;GAEG;AACH,2BAFU,OAAO,aAAa,EAAE,eAAe,CAoJ7C"}
@@ -2,7 +2,7 @@ export default errorsSpecialType;
2
2
  export type Integer = number;
3
3
  export type SpecialErrorType = ErrorConstructor | AggregateErrorConstructor;
4
4
  /**
5
- * @type {import('./SpecialNumberType.js').SuperTypeObject}
5
+ * @type {import('../types.js').SuperTypeObject}
6
6
  */
7
- declare const errorsSpecialType: import('./SpecialNumberType.js').SuperTypeObject;
7
+ declare const errorsSpecialType: import('../types.js').SuperTypeObject;
8
8
  //# sourceMappingURL=errorsSpecialType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorsSpecialType.d.ts","sourceRoot":"","sources":["../../src/superTypes/errorsSpecialType.js"],"names":[],"mappings":";sBAOa,MAAM;+BAaN,gBAAgB,GAAC,yBAAyB;AAyBvD;;GAEG;AACH,iCAFU,OAAO,wBAAwB,EAAE,eAAe,CAstBxD"}
1
+ {"version":3,"file":"errorsSpecialType.d.ts","sourceRoot":"","sources":["../../src/superTypes/errorsSpecialType.js"],"names":[],"mappings":";sBAOa,MAAM;+BAaN,gBAAgB,GAAC,yBAAyB;AAyBvD;;GAEG;AACH,iCAFU,OAAO,aAAa,EAAE,eAAe,CAstB7C"}
package/dist/types.d.ts CHANGED
@@ -125,6 +125,11 @@ export type TypeObjectSetValue = (info: {
125
125
  root: HTMLDivElement;
126
126
  value: StructuredCloneValue;
127
127
  }) => void;
128
+ export type ToValue = (s: string, info?: RootInfo) => {
129
+ value?: StructuredCloneValue;
130
+ remnant?: string;
131
+ assign?: false;
132
+ };
128
133
  export type TypeObject = {
129
134
  /**
130
135
  * Creates the option HTML. May set an option `title` or `value`
@@ -200,11 +205,7 @@ export type TypeObject = {
200
205
  * Converts from string to value. May use
201
206
  * `stringRegex` to find components.
202
207
  */
203
- toValue: (s: string, info?: RootInfo) => {
204
- value?: StructuredCloneValue;
205
- remnant?: string;
206
- assign?: false;
207
- };
208
+ toValue?: ToValue | undefined;
208
209
  /**
209
210
  * Gets the value for the type
210
211
  */
@@ -283,7 +284,10 @@ export type TypeObject = {
283
284
  };
284
285
  } | undefined;
285
286
  };
286
- export type AvailableType = "null" | "true" | "false" | "number" | "bigint" | "string" | "arrayReference" | "objectReference" | "array" | "object" | "date" | "userObject" | "undef" | "SpecialRealNumber" | "SpecialNumber" | "regexp" | "BooleanObject" | "NumberObject" | "StringObject" | "map" | "set" | "file" | "filelist" | "blobHTML" | "arraybuffer" | "arraybufferview" | "dataview" | "imagedata" | "imagebitmap" | "int8array" | "uint8array" | "uint8clampedarray" | "int16array" | "uint16array" | "int32array" | "uint32array" | "float32array" | "float64array" | "ValidDate" | "arrayNonindexKeys" | "error" | "errors" | "blob" | "domexception" | "domrect" | "dompoint" | "dommatrix";
287
+ export type AvailableType = "null" | "true" | "false" | "number" | "bigint" | "string" | "arrayReference" | "objectReference" | "array" | "object" | "date" | "userObject" | "undef" | "SpecialRealNumber" | "SpecialNumber" | "regexp" | "BooleanObject" | "NumberObject" | "StringObject" | "map" | "set" | "file" | "filelist" | "blobHTML" | "arraybuffer" | "arraybufferview" | "dataview" | "imagedata" | "imagebitmap" | "int8array" | "uint8array" | "uint8clampedarray" | "int16array" | "uint16array" | "int32array" | "uint32array" | "float32array" | "float64array" | "ValidDate" | "arrayNonindexKeys" | "error" | "errors" | "blob" | "domexception" | "domrect" | "dompoint" | "dommatrix" | "resurrectable";
288
+ export type SuperTypeObject = TypeObject & {
289
+ childTypes: string[];
290
+ };
287
291
  /**
288
292
  * Any other possibilities than `div`?
289
293
  * @typedef {HTMLDivElement} RootElement
@@ -461,6 +465,15 @@ export type AvailableType = "null" | "true" | "false" | "number" | "bigint" | "s
461
465
  * }
462
466
  * ) => void} TypeObjectSetValue
463
467
  */
468
+ /**
469
+ * @typedef {(
470
+ * s: string, info?: RootInfo
471
+ * ) => {
472
+ * value?: StructuredCloneValue,
473
+ * remnant?: string,
474
+ * assign?: false
475
+ * }} ToValue
476
+ */
464
477
  /**
465
478
  * @typedef {object} TypeObject
466
479
  * @property {[
@@ -490,13 +503,7 @@ export type AvailableType = "null" | "true" | "false" | "number" | "bigint" | "s
490
503
  * check whether this subtype matches
491
504
  * @property {string} [superType] The greater fundamental type to which
492
505
  * the type belongs
493
- * @property {(
494
- * s: string, info?: RootInfo
495
- * ) => {
496
- * value?: StructuredCloneValue,
497
- * remnant?: string,
498
- * assign?: false
499
- * }} toValue Converts from string to value. May use
506
+ * @property {ToValue} [toValue] Converts from string to value. May use
500
507
  * `stringRegex` to find components.
501
508
  * @property {(info: {
502
509
  * root: HTMLDivElement,
@@ -564,8 +571,13 @@ export type AvailableType = "null" | "true" | "false" | "number" | "bigint" | "s
564
571
  * "int8array"|"uint8array"|"uint8clampedarray"|"int16array"|"uint16array"|
565
572
  * "int32array"|"uint32array"|"float32array"|"float64array"|"ValidDate"|
566
573
  * "arrayNonindexKeys"|"error"|"errors"|"blob"|"domexception"|"domrect"|
567
- * "dompoint"|"dommatrix"} AvailableType
574
+ * "dompoint"|"dommatrix"|"resurrectable"} AvailableType
568
575
  */
576
+ /**
577
+ * @typedef {TypeObject & {
578
+ * childTypes: string[]
579
+ * }} SuperTypeObject
580
+ */
569
581
  /**
570
582
  *
571
583
  */
@@ -626,6 +638,7 @@ declare class Types {
626
638
  domrect: string[] | Partial<TypeObject>;
627
639
  dompoint: string[] | Partial<TypeObject>;
628
640
  dommatrix: string[] | Partial<TypeObject>;
641
+ resurrectable: string[] | Partial<TypeObject>;
629
642
  };
630
643
  /**
631
644
  * @type {{
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.js"],"names":[],"mappings":"AAiDO,mDAHI,iBAAiB,GACf,MAAM,CAmBlB;;;;;0BAIY,cAAc;;;;oCAMf,WAAW,YACV,MAAM;;;;;qCAOR,WAAW,2EAGT,oBAAoB;;;;2CAMtB,WAAW,KACT,IAAI,GAChB,gBAAoB,GAAC,mBAAmB,GAAC,iBAAiB,GAAC,iBAAiB;;;;iDAMlE,MAAM,GAAC,WAAW,yCAEhB,oBAAoB;uDAKtB,MAAM,GAAC,WAAW,KAChB,IAAI,GAAC,gBAAgB,GAAC,mBAAmB,GAAC,iBAAiB,GACvE,iBAAqB;sCAKX,aAAa,KACX,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,aAAa,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;uDAKlD,OAAO,cAAc,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KAAS,EAAE,oBAAoB,CAAC;QAChC,QAAY,EAAE,OAAO,CAAC;QACtB,QAAY,CAAC,EAAE,oBAAoB,CAAC;KACjC,GAAK,WAAW,CAAA;IAaP,2BAAM;QAClB,OAAW,EAAE,WAAW,CAAA;KACrB,GAAK,IAAI,CAAA;IAIA,cAAM;QAClB,IAAQ,EAAE,aAAa,CAAC;QACxB,IAAQ,EAAE,WAAW,CAAC;QACtB,OAAW,CAAC,EAAE,WAAW,CAAA;KACtB,GAAK,OAAO,CAAA;IAIH,cAAM;QAClB,IAAQ,EAAE,aAAa,CAAC;QACxB,IAAQ,EAAE,WAAW,CAAC;QACtB,KAAS,EAAE,oBAAoB,CAAC;KAC7B,GAAK,IAAI,CAAA;IAIA,qBAAI,MAAM;gBACV,OAAO,cAAc,EAAE,eAAe;;;;;;;;;;;QAY1C;QACT,KAAS,EAAE,oBAAoB;QAC/B,OAAW,EAAE,MAAM;QACnB,SAAa,EAAE,OAAO;QACtB,MAAU,EAAE,OAAO;KAChB,CAAA;IAssBD;;;OAGG;IACH,oBAHW,aAAa,GACX,QAAQ,UAAU,CAAC,GAAC,MAAM,EAAE,CAIxC;CACF;;IAl2BE,6DAGF;IAkGY;;;;gBAIG;;oBArLI,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/utils/media.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,kCALW,WAAW,UACX,iBAAiB,GAEf,IAAI,CA4DhB;AAGD;;;GAGG;AACH,0CAHW,sBAAsB,GACpB,QAAQ,WAAW,GAAC,IAAI,CAAC,CAYrC;AAED;;;GAGG;AACH,wDAHW,yBAAyB,GAAC,SAAS,GACjC,QAAQ,WAAW,GAAC,IAAI,CAAC,CAarC"}
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/utils/media.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,kCALW,WAAW,UACX,iBAAiB,GAEf,IAAI,CA4DhB;AAGD;;;GAGG;AACH,0CAHW,sBAAsB,GACpB,QAAQ,WAAW,GAAC,IAAI,CAAC,CAarC;AAED;;;GAGG;AACH,wDAHW,yBAAyB,GAAC,SAAS,GACjC,QAAQ,WAAW,GAAC,IAAI,CAAC,CAarC"}
@@ -1,3 +1,3 @@
1
1
  export { jml, body, nbsp, $ } from "jamilih";
2
- export { getJSONType, Typeson, unescapeKeyPathComponent, structuredCloningThrowing } from "typeson-registry";
2
+ export { getJSONType, Typeson, unescapeKeyPathComponent, structuredCloningThrowing, resurrectable, toStringTag } from "typeson-registry";
3
3
  //# sourceMappingURL=vendor-imports.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@es-joy/jsoe",
3
- "version": "0.13.7",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./src/index.js",
@@ -51,25 +51,25 @@
51
51
  "@brettz9/node-static": "^0.1.1",
52
52
  "jamilih": "0.58.2",
53
53
  "sceditor": "3.2.0",
54
- "typeson-registry": "9.1.1"
54
+ "typeson-registry": "9.2.1"
55
55
  },
56
56
  "devDependencies": {
57
- "@babel/core": "^7.23.3",
57
+ "@babel/core": "^7.23.6",
58
58
  "@babel/plugin-transform-modules-commonjs": "^7.23.3",
59
- "@babel/preset-env": "^7.23.3",
59
+ "@babel/preset-env": "^7.23.6",
60
60
  "@babel/register": "^7.22.15",
61
61
  "@brettz9/eslint-plugin": "^1.0.4",
62
- "@cypress/code-coverage": "^3.12.11",
62
+ "@cypress/code-coverage": "^3.12.13",
63
63
  "@rollup/plugin-babel": "^6.0.4",
64
64
  "@rollup/plugin-commonjs": "^25.0.7",
65
65
  "@rollup/plugin-node-resolve": "^15.2.3",
66
- "@stylistic/eslint-plugin": "^1.4.1",
66
+ "@stylistic/eslint-plugin": "^1.5.1",
67
67
  "@types/jsdom": "^21.1.6",
68
- "@types/node": "^20.10.0",
68
+ "@types/node": "^20.10.4",
69
69
  "axe-core": "^4.8.2",
70
- "cypress": "^13.6.0",
70
+ "cypress": "^13.6.1",
71
71
  "cypress-axe": "^1.5.0",
72
- "eslint": "^8.54.0",
72
+ "eslint": "^8.55.0",
73
73
  "eslint-config-ash-nazg": "^35.1.0",
74
74
  "eslint-config-standard": "^17.1.0",
75
75
  "eslint-plugin-array-func": "^4.0.0",
@@ -78,9 +78,9 @@
78
78
  "eslint-plugin-eslint-comments": "^3.2.0",
79
79
  "eslint-plugin-html": "^7.1.0",
80
80
  "eslint-plugin-import": "^2.29.0",
81
- "eslint-plugin-jsdoc": "^46.9.0",
81
+ "eslint-plugin-jsdoc": "^46.9.1",
82
82
  "eslint-plugin-markdown": "^3.0.1",
83
- "eslint-plugin-n": "^16.3.1",
83
+ "eslint-plugin-n": "^16.4.0",
84
84
  "eslint-plugin-no-unsanitized": "^4.0.2",
85
85
  "eslint-plugin-no-use-extend-native": "^0.5.0",
86
86
  "eslint-plugin-promise": "^6.1.1",
@@ -93,10 +93,10 @@
93
93
  "nyc": "^15.1.0",
94
94
  "open-cli": "^7.2.0",
95
95
  "rimraf": "^5.0.5",
96
- "rollup": "4.6.0",
96
+ "rollup": "4.9.0",
97
97
  "rollup-plugin-istanbul": "^5.0.0",
98
98
  "rollup-plugin-node-builtins": "^2.1.2",
99
- "typescript": "^5.3.2",
99
+ "typescript": "^5.3.3",
100
100
  "typeson": "^9.0.3",
101
101
  "webappfind-demos-samples": "^0.7.0"
102
102
  },
@@ -1,5 +1,6 @@
1
1
  import {
2
- Typeson, unescapeKeyPathComponent, structuredCloningThrowing
2
+ Typeson, unescapeKeyPathComponent, structuredCloningThrowing,
3
+ resurrectable as noneditable, toStringTag
3
4
  } from '../vendor-imports.js';
4
5
 
5
6
  import {buildTypeChoices} from '../typeChoices.js';
@@ -9,6 +10,15 @@ import {
9
10
 
10
11
  import json from './json.js';
11
12
 
13
+ // We modify resurrectable in hopes an including application doesn't need it
14
+ /** @type {import('typeson').TypeSpecSet} */ (
15
+ noneditable.resurrectable
16
+ ).test = /** @type {import('typeson').Tester} */ (x) => {
17
+ return x && typeof x === 'object' && !Array.isArray(x) &&
18
+ // Could be a user object with a string tag, but we can't tell
19
+ toStringTag(x) !== 'Object';
20
+ };
21
+
12
22
  /**
13
23
  * @typedef {(info: {
14
24
  * propName: string,
@@ -91,8 +101,6 @@ const encapsulateObserver = (stateObj) => {
91
101
  return;
92
102
  }
93
103
 
94
- // console.log('observerObj', observerObj);
95
-
96
104
  /** @type {import('../types.js').AvailableType} */
97
105
  let newType;
98
106
  let newValue = value;
@@ -396,15 +404,49 @@ const canonicalToAvailableType = (
396
404
  const structuredCloning = {
397
405
  iterate (records, stateObj) {
398
406
  // console.log('records', records);
407
+ /* istanbul ignore if -- Just a guard */
399
408
  if (!stateObj.format) {
400
409
  stateObj.format = 'structuredCloning';
401
410
  }
402
411
  // Todo: Replace this with async typeson?
403
412
  // eslint-disable-next-line promise/avoid-new
404
413
  return new Promise((resolve, reject) => {
414
+ const structuredCloningFixed = structuredCloningThrowing.filter(
415
+ (typeSpecSet) => {
416
+ return ![
417
+ // Not yet supported within JSOE
418
+ 'imagedata',
419
+ 'imagebitmap',
420
+ 'arraybuffer',
421
+ 'dataview',
422
+ 'cryptokey',
423
+ 'domquad',
424
+
425
+ 'bigint64array',
426
+ 'biguint64array',
427
+ 'float32array',
428
+ 'float64array',
429
+ 'int8array',
430
+ 'int16array',
431
+ 'int32array',
432
+ 'uint8array',
433
+ 'uint8clampedarray',
434
+ 'uint16array',
435
+ 'uint32array'
436
+ ].some((prop) => {
437
+ return Object.hasOwn(typeSpecSet, prop);
438
+ });
439
+ }
440
+ );
441
+ structuredCloningFixed.splice(
442
+ // Add after userObjects
443
+ 1,
444
+ 0,
445
+ noneditable
446
+ );
405
447
  const typeson = new Typeson({
406
448
  encapsulateObserver: encapsulateObserver(stateObj)
407
- }).register(structuredCloningThrowing);
449
+ }).register(structuredCloningFixed);
408
450
  typeson.encapsulate(records);
409
451
  // Todo (low): We might want to run async encapsulate for
410
452
  // async types (and put this after Promise resolves)
@@ -482,11 +524,12 @@ const structuredCloning = {
482
524
  'domexception',
483
525
  'domrect',
484
526
  'dompoint',
485
- 'dommatrix'
527
+ 'dommatrix',
528
+ 'resurrectable'
486
529
 
487
530
  // Ok, but will need some work and/or decisions on how to present:
488
531
  // 'cryptokey',
489
-
532
+ // 'domquad',
490
533
  // 'arraybuffer',
491
534
  // 'dataview', 'imagedata', 'imagebitmap',
492
535
  /*
@@ -16,7 +16,9 @@ const BooleanObjectType = {
16
16
  return /** @type {HTMLInputElement} */ ($e(root, 'input'));
17
17
  },
18
18
  getValue ({root}) {
19
- return this.toValue(String(/** @type {HTMLInputElement} */ (
19
+ return /** @type {import('../types.js').ToValue} */ (
20
+ this.toValue
21
+ )(String(/** @type {HTMLInputElement} */ (
20
22
  this.getInput({root})
21
23
  ).checked)).value;
22
24
  },
@@ -20,7 +20,9 @@ const NumberObjectType = {
20
20
  return /** @type {HTMLInputElement} */ ($e(root, 'input'));
21
21
  },
22
22
  getValue ({root}) {
23
- return this.toValue(this.getInput({root}).value).value;
23
+ return /** @type {import('../types.js').ToValue} */ (
24
+ this.toValue
25
+ )(this.getInput({root}).value).value;
24
26
  },
25
27
  setValue ({root, value}) {
26
28
  this.getInput({root}).value = String(value);
@@ -15,7 +15,9 @@ const StringObjectType = {
15
15
  return /** @type {HTMLTextAreaElement} */ ($e(root, 'textarea'));
16
16
  },
17
17
  getValue ({root}) {
18
- return this.toValue(this.getInput({root}).value).value;
18
+ return /** @type {import('../types.js').ToValue} */ (
19
+ this.toValue
20
+ )(this.getInput({root}).value).value;
19
21
  },
20
22
  setValue ({root, value}) {
21
23
  this.getInput({root}).value = value;
@@ -1723,7 +1723,9 @@ const arrayType = {
1723
1723
  // and object reference checking?
1724
1724
  if (![
1725
1725
  'checkbox', 'radio', 'file',
1726
- 'datetime-local'
1726
+ 'datetime-local',
1727
+ // For label radio clicks
1728
+ undefined
1727
1729
  ].includes(target.type)) {
1728
1730
  e.preventDefault();
1729
1731
  }
@@ -1744,7 +1746,7 @@ const arrayType = {
1744
1746
  * @this {HTMLInputElement}
1745
1747
  */
1746
1748
  change () {
1747
- /* c8 ignore next 3 */
1749
+ /* istanbul ignore if */
1748
1750
  if (!this.files) {
1749
1751
  return;
1750
1752
  }
@@ -110,7 +110,7 @@ function binaryButton (value, editable) {
110
110
  ['textarea', {
111
111
  class: 'view-binary'
112
112
  }, [
113
- /* c8 ignore next */
113
+ /* istanbul ignore next */
114
114
  /** @type {string|null} */ (reader.result) ?? ''
115
115
  ]]
116
116
  ])]
@@ -118,12 +118,13 @@ function binaryButton (value, editable) {
118
118
  });
119
119
  });
120
120
  // Seems not feasible to accurately simulate
121
- /* c8 ignore next 10 */
122
121
  reader.addEventListener(
123
122
  'error',
124
- /* c8 ignore next 6 */
123
+ /* istanbul ignore next */
125
124
  async function () {
125
+ /* istanbul ignore next */
126
126
  console.error(reader.error);
127
+ /* istanbul ignore next */
127
128
  await dialogs.alert(/** @type {string} */ (
128
129
  /** @type {DOMException} */ (reader.error).message
129
130
  ));
@@ -191,18 +192,19 @@ const blobType = {
191
192
  'Text source',
192
193
  ['br'],
193
194
  ['textarea', {class: 'view-text'}, [
194
- /* c8 ignore next */
195
+ /* istanbul ignore next */
195
196
  /** @type {string|null} */ (reader.result) ?? ''
196
197
  ]]
197
198
  ]));
198
199
  });
199
200
  // Seems not feasible to accurately simulate
200
- /* c8 ignore next 10 */
201
201
  reader.addEventListener(
202
202
  'error',
203
- /* c8 ignore next 6 */
203
+ /* istanbul ignore next */
204
204
  function () {
205
+ /* istanbul ignore next */
205
206
  console.error(reader.error);
207
+ /* istanbul ignore next */
206
208
  div.append(
207
209
  /** @type {DOMException} */ (reader.error).message
208
210
  );
@@ -379,7 +381,7 @@ const blobType = {
379
381
  blob
380
382
  ).slice(8, -1) === 'Blob'
381
383
  ? /** @type {Blob} */ (blob)
382
- /* c8 ignore next */
384
+ /* istanbul ignore next */
383
385
  : undefined;
384
386
  }
385
387
  }
@@ -449,7 +451,7 @@ const blobType = {
449
451
  * @this {HTMLInputElement}
450
452
  */
451
453
  change () {
452
- /* c8 ignore next 3 -- TS */
454
+ /* istanbul ignore if -- TS */
453
455
  if (!this.files) {
454
456
  return;
455
457
  }
@@ -601,7 +603,7 @@ const blobType = {
601
603
 
602
604
  if (constraints) {
603
605
  const mediaStream = await getUserMedia(constraints);
604
- /* c8 ignore next 4 */
606
+ /* istanbul ignore if */
605
607
  if (!mediaStream) {
606
608
  await dialogs.alert('Error getting user media');
607
609
  return;
@@ -649,7 +651,7 @@ const blobType = {
649
651
  const mediaStream = await startScreenCapture(
650
652
  screenShareConstraints
651
653
  );
652
- /* c8 ignore next 4 */
654
+ /* istanbul ignore if */
653
655
  if (!mediaStream) {
654
656
  await dialogs.alert('Error getting user media');
655
657
  return;
@@ -734,7 +736,7 @@ const blobType = {
734
736
  'video.previewMedia'
735
737
  ));
736
738
 
737
- /* c8 ignore next 4 */
739
+ /* istanbul ignore if */
738
740
  if (!previewMedia.srcObject) {
739
741
  dialogs.alert('No stream found to record');
740
742
  return;
@@ -767,9 +769,11 @@ const blobType = {
767
769
 
768
770
  try {
769
771
  mediaRecorder.start();
770
- /* c8 ignore next 4 */
772
+ /* istanbul ignore next */
771
773
  } catch (err) {
774
+ /* istanbul ignore next */
772
775
  dialogs.alert('Error starting media recorder');
776
+ /* istanbul ignore next */
773
777
  return;
774
778
  }
775
779
  mediaRecorder.addEventListener('stop', () => {
@@ -900,7 +904,7 @@ const blobType = {
900
904
  ($e(videoContainer, 'img.photo'));
901
905
 
902
906
  canvas.toBlob((blob) => {
903
- /* c8 ignore next 4 */
907
+ /* istanbul ignore if */
904
908
  if (!blob) {
905
909
  dialogs.alert('Error converting canvas to Blob');
906
910
  return;
@@ -75,9 +75,13 @@ const dateType = {
75
75
  },
76
76
  getValue ({root}) {
77
77
  if (this.isInvalid({root})) {
78
- return this.toValue('NaN').value;
78
+ return /** @type {import('../types.js').ToValue} */ (
79
+ this.toValue
80
+ )('NaN').value;
79
81
  }
80
- return this.toValue(this.getInput({root}).value).value;
82
+ return /** @type {import('../types.js').ToValue} */ (
83
+ this.toValue
84
+ )(this.getInput({root}).value).value;
81
85
  },
82
86
  isValueInvalid (value) {
83
87
  return value && Number.isNaN(value.getTime());