@es-joy/jsoe 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +2 -0
- package/.nyc_output/out.json +16273 -6832
- package/CHANGES.md +9 -0
- package/README.md +6 -18
- package/demo/index-instrumented.js +644 -0
- package/demo/index.js +3 -421
- package/dist/formats/indexedDBKey.d.ts.map +1 -1
- package/dist/formats/structuredCloning.d.ts.map +1 -1
- package/dist/index.js +1472 -54
- package/dist/superTypes/buffersourceType.d.ts +8 -0
- package/dist/superTypes/buffersourceType.d.ts.map +1 -0
- package/dist/types.d.ts +3 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +28 -29
- package/rollup.config.js +1 -1
- package/src/formats/indexedDBKey.js +2 -3
- package/src/formats/structuredCloning.js +3 -29
- package/src/fundamentalTypes/regexpType.js +1 -1
- package/src/jsoe.css +64 -0
- package/src/superTypes/buffersourceType.js +1455 -0
- package/src/types.js +3 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default buffersourceType;
|
|
2
|
+
export type TypedArray = "Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt64Array" | "BigUint64Array";
|
|
3
|
+
export type TypedArrayInstance = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
|
|
4
|
+
/**
|
|
5
|
+
* @type {import('../types.js').SuperTypeObject}
|
|
6
|
+
*/
|
|
7
|
+
declare const buffersourceType: import('../types.js').SuperTypeObject;
|
|
8
|
+
//# sourceMappingURL=buffersourceType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffersourceType.d.ts","sourceRoot":"","sources":["../../src/superTypes/buffersourceType.js"],"names":[],"mappings":";yBA4Da,WAAW,GAAC,YAAY,GAAC,mBAAmB,GACxD,YAAgB,GAAC,aAAa,GAAC,YAAY,GAAC,aAAa,GACzD,cAAkB,GAAC,cAAc,GAAC,eAAe,GACjD,gBAAoB;iCAIR,SAAS,GAAC,UAAU,GAAC,iBAAiB,GAClD,UAAc,GAAC,WAAW,GAAC,UAAU,GAAC,WAAW,GAClD,YAAgB,GAAC,YAAY,GAAC,aAAa,GAC3C,cAAkB;AA4ClB;;GAEG;AACH,gCAFU,OAAO,aAAa,EAAE,eAAe,CAyzC7C"}
|
package/dist/types.d.ts
CHANGED
|
@@ -284,7 +284,7 @@ export type TypeObject = {
|
|
|
284
284
|
};
|
|
285
285
|
} | undefined;
|
|
286
286
|
};
|
|
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" | "
|
|
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" | "buffersource" | "dataview" | "imagedata" | "imagebitmap" | "int8array" | "uint8array" | "uint8clampedarray" | "int16array" | "uint16array" | "int32array" | "uint32array" | "float32array" | "float64array" | "ValidDate" | "arrayNonindexKeys" | "error" | "errors" | "blob" | "domexception" | "domrect" | "dompoint" | "dommatrix" | "resurrectable";
|
|
288
288
|
export type SuperTypeObject = TypeObject & {
|
|
289
289
|
childTypes: string[];
|
|
290
290
|
};
|
|
@@ -567,7 +567,7 @@ export type SuperTypeObject = TypeObject & {
|
|
|
567
567
|
* "objectReference"|"array"|"object"|"date"|"userObject"|"undef"|
|
|
568
568
|
* "SpecialRealNumber"|"SpecialNumber"|"regexp"|"BooleanObject"|
|
|
569
569
|
* "NumberObject"|"StringObject"|"map"|"set"|"file"|"filelist"|"blobHTML"|
|
|
570
|
-
* "
|
|
570
|
+
* "buffersource"|"dataview"|"imagedata"|"imagebitmap"|
|
|
571
571
|
* "int8array"|"uint8array"|"uint8clampedarray"|"int16array"|"uint16array"|
|
|
572
572
|
* "int32array"|"uint32array"|"float32array"|"float64array"|"ValidDate"|
|
|
573
573
|
* "arrayNonindexKeys"|"error"|"errors"|"blob"|"domexception"|"domrect"|
|
|
@@ -600,7 +600,6 @@ declare class Types {
|
|
|
600
600
|
false: string[] | Partial<TypeObject>;
|
|
601
601
|
error: string[] | Partial<TypeObject>;
|
|
602
602
|
file: string[] | Partial<TypeObject>;
|
|
603
|
-
arraybuffer: string[] | Partial<TypeObject>;
|
|
604
603
|
blob: string[] | Partial<TypeObject>;
|
|
605
604
|
date: string[] | Partial<TypeObject>;
|
|
606
605
|
null: string[] | Partial<TypeObject>;
|
|
@@ -618,7 +617,7 @@ declare class Types {
|
|
|
618
617
|
StringObject: string[] | Partial<TypeObject>;
|
|
619
618
|
filelist: string[] | Partial<TypeObject>;
|
|
620
619
|
blobHTML: string[] | Partial<TypeObject>;
|
|
621
|
-
|
|
620
|
+
buffersource: string[] | Partial<TypeObject>;
|
|
622
621
|
dataview: string[] | Partial<TypeObject>;
|
|
623
622
|
imagedata: string[] | Partial<TypeObject>;
|
|
624
623
|
imagebitmap: string[] | Partial<TypeObject>;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.js"],"names":[],"mappings":"AAmDO,mDAHI,iBAAiB,GACf,MAAM,CAmBlB;;;;;0BAIY,cAAc;;;;oCAMf,WAAW,YACV,MAAM;;;;;qCAOR,WAAW,2EAGT,oBAAoB;;;;2CAMtB,WAAW,KAC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AAE,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;IAisBD;;;OAGG;IACH,oBAHW,aAAa,GACX,QAAQ,UAAU,CAAC,GAAC,MAAM,EAAE,CAIxC;CACF;;IA71BE,6DAGF;IAkGY;;;;gBAIG;;oBAtLI,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@es-joy/jsoe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -11,32 +11,6 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"description": "Editing of arbitrary JavaScript objects",
|
|
14
|
-
"scripts": {
|
|
15
|
-
"tsc": "tsc",
|
|
16
|
-
"tsc-cypress": "tsc -p cypress/tsconfig.json",
|
|
17
|
-
"prepublishOnly": "run-p tsc rollup",
|
|
18
|
-
"eslint": "eslint .",
|
|
19
|
-
"lint": "npm run eslint --",
|
|
20
|
-
"coverage": "open-cli http://localhost:8087/coverage/lcov-report/",
|
|
21
|
-
"open": "open-cli http://localhost:8087/demo/",
|
|
22
|
-
"start": "node server 8087",
|
|
23
|
-
"start-instrumented": "node server 8087 instrumented",
|
|
24
|
-
"cypress:open": "cypress open",
|
|
25
|
-
"rollup": "rollup -c",
|
|
26
|
-
"instrument-add": "nyc instrument src instrumented",
|
|
27
|
-
"instrument-remove-cache": "rimraf node_modules/.cache",
|
|
28
|
-
"instrument-remove-instrumented": "rimraf instrumented",
|
|
29
|
-
"instrument-remove": "run-p -c instrument-remove-cache instrument-remove-instrumented",
|
|
30
|
-
"copy-pages": "cp node_modules/sceditor/minified/themes/default.min.css vendor/sceditor/minified/themes/default.min.css && cp node_modules/sceditor/minified/sceditor.min.js vendor/sceditor/minified/sceditor.min.js && cp node_modules/sceditor/minified/formats/bbcode.js vendor/sceditor/minified/formats/bbcode.js && cp node_modules/sceditor/minified/formats/xhtml.js vendor/sceditor/minified/formats/xhtml.js",
|
|
31
|
-
"copy-index": "echo \"Copy our index.html file too? \"",
|
|
32
|
-
"copy-jamilih": "cp node_modules/jamilih/dist/jml-es.js vendor/jamilih/dist/jml-es.js",
|
|
33
|
-
"copy-typeson-registry": "cp node_modules/typeson-registry/dist/index.js vendor/typeson-registry/dist/index.js",
|
|
34
|
-
"copy": "run-p copy-jamilih copy-typeson-registry",
|
|
35
|
-
"instrument": "run-s -c instrument-remove instrument-add copy-index rollup",
|
|
36
|
-
"cypress:log": "ELECTRON_ENABLE_LOGGING=1 cypress run; nyc report",
|
|
37
|
-
"cypress": "cypress run; nyc report",
|
|
38
|
-
"test": "npm run eslint && npm run rollup && npm run cypress"
|
|
39
|
-
},
|
|
40
14
|
"browserslist": [
|
|
41
15
|
"cover 100%"
|
|
42
16
|
],
|
|
@@ -116,5 +90,30 @@
|
|
|
116
90
|
},
|
|
117
91
|
"bugs": "https://github.com/es-joy/jsoe/issues",
|
|
118
92
|
"license": "MIT",
|
|
119
|
-
"homepage": "https://github.com/es-joy/jsoe#readme"
|
|
120
|
-
|
|
93
|
+
"homepage": "https://github.com/es-joy/jsoe#readme",
|
|
94
|
+
"scripts": {
|
|
95
|
+
"tsc": "tsc",
|
|
96
|
+
"tsc-cypress": "tsc -p cypress/tsconfig.json",
|
|
97
|
+
"eslint": "eslint .",
|
|
98
|
+
"lint": "npm run eslint --",
|
|
99
|
+
"coverage": "open-cli http://localhost:8087/coverage/lcov-report/",
|
|
100
|
+
"open": "open-cli http://localhost:8087/demo/",
|
|
101
|
+
"start": "node server 8087",
|
|
102
|
+
"start-instrumented": "node server 8087 instrumented",
|
|
103
|
+
"cypress:open": "cypress open",
|
|
104
|
+
"rollup": "rollup -c",
|
|
105
|
+
"instrument-add": "nyc instrument src instrumented",
|
|
106
|
+
"instrument-remove-cache": "rimraf node_modules/.cache",
|
|
107
|
+
"instrument-remove-instrumented": "rimraf instrumented",
|
|
108
|
+
"instrument-remove": "run-p -c instrument-remove-cache instrument-remove-instrumented",
|
|
109
|
+
"copy-pages": "cp node_modules/sceditor/minified/themes/default.min.css vendor/sceditor/minified/themes/default.min.css && cp node_modules/sceditor/minified/sceditor.min.js vendor/sceditor/minified/sceditor.min.js && cp node_modules/sceditor/minified/formats/bbcode.js vendor/sceditor/minified/formats/bbcode.js && cp node_modules/sceditor/minified/formats/xhtml.js vendor/sceditor/minified/formats/xhtml.js",
|
|
110
|
+
"copy-index": "echo \"Copy our index.html file too? \"",
|
|
111
|
+
"copy-jamilih": "cp node_modules/jamilih/dist/jml-es.js vendor/jamilih/dist/jml-es.js",
|
|
112
|
+
"copy-typeson-registry": "cp node_modules/typeson-registry/dist/index.js vendor/typeson-registry/dist/index.js",
|
|
113
|
+
"copy": "run-p copy-jamilih copy-typeson-registry",
|
|
114
|
+
"instrument": "run-s -c instrument-remove instrument-add copy-index rollup",
|
|
115
|
+
"cypress:log": "ELECTRON_ENABLE_LOGGING=1 cypress run; nyc report",
|
|
116
|
+
"cypress": "cypress run; nyc report",
|
|
117
|
+
"test": "npm run eslint && npm run rollup && npm run cypress"
|
|
118
|
+
}
|
|
119
|
+
}
|
package/rollup.config.js
CHANGED
|
@@ -3,7 +3,8 @@ import structuredCloning from './structuredCloning.js';
|
|
|
3
3
|
/** @type {import('../formats.js').Format} */
|
|
4
4
|
const indexedDBKey = {
|
|
5
5
|
types: () => [
|
|
6
|
-
'number', 'SpecialRealNumber', 'string', 'ValidDate', 'array'
|
|
6
|
+
'number', 'SpecialRealNumber', 'string', 'ValidDate', 'array',
|
|
7
|
+
'buffersource'
|
|
7
8
|
],
|
|
8
9
|
// A hack until we simply pass in our own types or do own parsing
|
|
9
10
|
testInvalid (newType, value) {
|
|
@@ -41,8 +42,6 @@ const indexedDBKey = {
|
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
|
|
44
|
-
// Todo (low): Support ArrayBuffer
|
|
45
|
-
|
|
46
45
|
/**
|
|
47
46
|
* @type {Map<import('../types.js').AvailableType,
|
|
48
47
|
* import('../types.js').AvailableType>
|
|
@@ -417,22 +417,8 @@ const structuredCloning = {
|
|
|
417
417
|
// Not yet supported within JSOE
|
|
418
418
|
'imagedata',
|
|
419
419
|
'imagebitmap',
|
|
420
|
-
'arraybuffer',
|
|
421
|
-
'dataview',
|
|
422
420
|
'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'
|
|
421
|
+
'domquad'
|
|
436
422
|
].some((prop) => {
|
|
437
423
|
return Object.hasOwn(typeSpecSet, prop);
|
|
438
424
|
});
|
|
@@ -525,25 +511,13 @@ const structuredCloning = {
|
|
|
525
511
|
'domrect',
|
|
526
512
|
'dompoint',
|
|
527
513
|
'dommatrix',
|
|
514
|
+
'buffersource',
|
|
528
515
|
'resurrectable'
|
|
529
516
|
|
|
530
517
|
// Ok, but will need some work and/or decisions on how to present:
|
|
531
518
|
// 'cryptokey',
|
|
532
519
|
// 'domquad',
|
|
533
|
-
// '
|
|
534
|
-
// 'dataview', 'imagedata', 'imagebitmap',
|
|
535
|
-
/*
|
|
536
|
-
// Typed Arrays
|
|
537
|
-
'int8array',
|
|
538
|
-
'uint8array',
|
|
539
|
-
'uint8clampedarray',
|
|
540
|
-
'int16array',
|
|
541
|
-
'uint16array',
|
|
542
|
-
'int32array',
|
|
543
|
-
'uint32array',
|
|
544
|
-
'float32array',
|
|
545
|
-
'float64array',
|
|
546
|
-
*/
|
|
520
|
+
// 'imagedata', 'imagebitmap',
|
|
547
521
|
];
|
|
548
522
|
}
|
|
549
523
|
};
|
package/src/jsoe.css
CHANGED
|
@@ -105,6 +105,70 @@ video.recordedMedia {
|
|
|
105
105
|
background-color: lightgray;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
[data-type="buffersource"] {
|
|
109
|
+
background-color: beige;
|
|
110
|
+
}
|
|
111
|
+
|
|
108
112
|
[class^="propertyName-"] {
|
|
109
113
|
background-color: yellow;
|
|
110
114
|
}
|
|
115
|
+
|
|
116
|
+
.typedArrayArea {
|
|
117
|
+
overflow: auto;
|
|
118
|
+
max-height: 250px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* -128 to 127 */
|
|
122
|
+
.typedArray-Int8Array {
|
|
123
|
+
width: 45px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* 0 to 255 */
|
|
127
|
+
.typedArray-Uint8Array {
|
|
128
|
+
width: 45px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* 0 to 255 */
|
|
132
|
+
.typedArray-Uint8ClampedArray {
|
|
133
|
+
width: 45px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* -32768 to 32767 */
|
|
137
|
+
.typedArray-Int16Array {
|
|
138
|
+
width: 65px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* 0 to 65535 */
|
|
142
|
+
.typedArray-Uint16Array {
|
|
143
|
+
width: 65px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* -2147483648 to 2147483647 */
|
|
147
|
+
.typedArray-Int32Array {
|
|
148
|
+
width: 100px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* 0 to 4294967295 */
|
|
152
|
+
.typedArray-Uint32Array {
|
|
153
|
+
width: 100px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* -3.4e38 to 3.4e38 */
|
|
157
|
+
.typedArray-Float32Array {
|
|
158
|
+
width: 120px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* -1.8e308 to 1.8e308 */
|
|
162
|
+
.typedArray-Float64Array {
|
|
163
|
+
width: 120px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* -2^63 to 2^63 - 1 */
|
|
167
|
+
.typedArray-BigInt64Array {
|
|
168
|
+
width: 120px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* 0 to 2^64 - 1 */
|
|
172
|
+
.typedArray-BigUint64Array {
|
|
173
|
+
width: 120px;
|
|
174
|
+
}
|