typeson-registry 15.0.0 → 15.2.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/README.md +3 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +163 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.cjs +226 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/index.umd.min.cjs +2 -2
- package/dist/index.umd.min.cjs.map +1 -1
- package/dist/polyfills/GPUPipelineError.d.ts +26 -0
- package/dist/polyfills/GPUPipelineError.d.ts.map +1 -0
- package/dist/polyfills/buildWebgpu.d.ts +12 -0
- package/dist/polyfills/buildWebgpu.d.ts.map +1 -0
- package/dist/polyfills/index.d.ts +2 -0
- package/dist/presets/structured-cloning-for-storage.umd.cjs +1 -1
- package/dist/presets/structured-cloning-for-storage.umd.cjs.map +1 -1
- package/dist/presets/structured-cloning-throwing.umd.cjs +1 -1
- package/dist/presets/structured-cloning-throwing.umd.cjs.map +1 -1
- package/dist/presets/structured-cloning.d.ts.map +1 -1
- package/dist/presets/structured-cloning.umd.cjs +1 -1
- package/dist/presets/structured-cloning.umd.cjs.map +1 -1
- package/dist/types/gpucompilationinfo.d.ts +6 -0
- package/dist/types/gpucompilationinfo.d.ts.map +1 -0
- package/dist/types/gpucompilationinfo.umd.cjs +2 -0
- package/dist/types/gpucompilationinfo.umd.cjs.map +1 -0
- package/dist/types/gpucompilationmessage.d.ts +6 -0
- package/dist/types/gpucompilationmessage.d.ts.map +1 -0
- package/dist/types/gpucompilationmessage.umd.cjs +2 -0
- package/dist/types/gpucompilationmessage.umd.cjs.map +1 -0
- package/dist/types/gpupipelineerror.d.ts +6 -0
- package/dist/types/gpupipelineerror.d.ts.map +1 -0
- package/dist/types/gpupipelineerror.umd.cjs +2 -0
- package/dist/types/gpupipelineerror.umd.cjs.map +1 -0
- package/package.json +11 -10
- package/polyfills/GPUPipelineError.js +42 -0
- package/polyfills/buildWebgpu.js +35 -0
- package/polyfills/index.cjs +82 -10
- package/polyfills/index.cjs.map +1 -1
- package/polyfills/index.js +2 -0
package/README.md
CHANGED
|
@@ -33,7 +33,8 @@ URL.createObjectURL = createObjectURL;
|
|
|
33
33
|
We have not added `jsdom` as a dependency, but it is required if this
|
|
34
34
|
polyfill is used.
|
|
35
35
|
|
|
36
|
-
Also exported: `QuotaExceededError`, `WebTransportError`, `
|
|
36
|
+
Also exported: `QuotaExceededError`, `WebTransportError`, `GPUPipelineError`,
|
|
37
|
+
`AudioData`, `EncodedAudioChunk`,
|
|
37
38
|
`EncodedVideoChunk`, `VideoFrame`, `DOMRect`,
|
|
38
39
|
`DOMRectReadOnly`, `DOMPoint`, `DOMPointReadOnly`, `DOMQuad`, `DOMMatrix`, `DOMMatrixReadOnly`,
|
|
39
40
|
`createImageBitmap`, `createObjectURL`, `revokeObjectURL`, `xmlHttpRequestOverrideMimeType`
|
|
@@ -248,6 +249,7 @@ Note that the type name corresponds to the file name in the following manner:
|
|
|
248
249
|
via deprecated means)
|
|
249
250
|
- `filelist` - HTML does not provide a means of creating a `FileList` object
|
|
250
251
|
dynamically, so we polyfill one for revival. This method also sets `File`
|
|
252
|
+
- `gpucompilationinfo` and `gpucompilationmessage`
|
|
251
253
|
- `imagebitmap` - Has sync and async revivers. If `OffscreenCanvas` is not
|
|
252
254
|
supported, the sync method does not produce a genuine `ImageBitmap`
|
|
253
255
|
but instead produces a canvas element which can frequently be used in
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ import error from './types/error.js';
|
|
|
19
19
|
import errors from './types/errors.js';
|
|
20
20
|
import file from './types/file.js';
|
|
21
21
|
import filelist from './types/filelist.js';
|
|
22
|
+
import gpucompilationinfo from './types/gpucompilationinfo.js';
|
|
23
|
+
import gpucompilationmessage from './types/gpucompilationmessage.js';
|
|
24
|
+
import gpupipelineerror from './types/gpupipelineerror.js';
|
|
22
25
|
import idbkeyrange from './types/idbkeyrange.js';
|
|
23
26
|
import imagebitmap from './types/imagebitmap.js';
|
|
24
27
|
import imagedata from './types/imagedata.js';
|
|
@@ -53,5 +56,5 @@ import structuredCloningThrowing from './presets/structured-cloning-throwing.js'
|
|
|
53
56
|
import structuredCloning from './presets/structured-cloning.js';
|
|
54
57
|
import undefPreset from './presets/undef.js';
|
|
55
58
|
import universal from './presets/universal.js';
|
|
56
|
-
export { arraybuffer, audiodata, bigintObject, bigint, blob, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, encodedaudiochunk, encodedvideochunk, error, errors, file, filelist, idbkeyrange, imagebitmap, imagedata, infinity, intlTypes, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, primitiveObjects, promise, quotaexceedederror, regexp, resurrectable, set, symbol, typedArraysSocketio, typedArrays, undef, userObject, videoframe, webtransporterror, arrayNonindexKeys, builtin, postmessage, socketio, sparseUndefined, specialNumbers, structuredCloningForStorage, structuredCloningThrowing, structuredCloning, undefPreset, universal };
|
|
59
|
+
export { arraybuffer, audiodata, bigintObject, bigint, blob, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, encodedaudiochunk, encodedvideochunk, error, errors, file, filelist, gpucompilationinfo, gpucompilationmessage, gpupipelineerror, idbkeyrange, imagebitmap, imagedata, infinity, intlTypes, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, primitiveObjects, promise, quotaexceedederror, regexp, resurrectable, set, symbol, typedArraysSocketio, typedArrays, undef, userObject, videoframe, webtransporterror, arrayNonindexKeys, builtin, postmessage, socketio, sparseUndefined, specialNumbers, structuredCloningForStorage, structuredCloningThrowing, structuredCloning, undefPreset, universal };
|
|
57
60
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";wBAGwB,wBAAwB;sBAC1B,sBAAsB;yBACnB,0BAA0B;mBAChC,mBAAmB;iBACrB,iBAAiB;sBACZ,sBAAsB;sBACtB,sBAAsB;qBACvB,qBAAqB;iBACzB,iBAAiB;yBACT,yBAAyB;sBAC5B,sBAAsB;qBACvB,qBAAqB;oBACtB,oBAAoB;oBACpB,oBAAoB;8BACV,8BAA8B;8BAC9B,8BAA8B;kBAC1C,kBAAkB;mBACjB,mBAAmB;iBACrB,iBAAiB;qBACb,qBAAqB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";wBAGwB,wBAAwB;sBAC1B,sBAAsB;yBACnB,0BAA0B;mBAChC,mBAAmB;iBACrB,iBAAiB;sBACZ,sBAAsB;sBACtB,sBAAsB;qBACvB,qBAAqB;iBACzB,iBAAiB;yBACT,yBAAyB;sBAC5B,sBAAsB;qBACvB,qBAAqB;oBACtB,oBAAoB;oBACpB,oBAAoB;8BACV,8BAA8B;8BAC9B,8BAA8B;kBAC1C,kBAAkB;mBACjB,mBAAmB;iBACrB,iBAAiB;qBACb,qBAAqB;+BACX,+BAA+B;kCAC5B,kCAAkC;6BACvC,6BAA6B;wBAClC,wBAAwB;wBACxB,wBAAwB;sBAC1B,sBAAsB;qBACvB,qBAAqB;sBACpB,uBAAuB;gBAC7B,gBAAgB;gBAChB,gBAAgB;6BACH,8BAA8B;yBAClC,0BAA0B;6BACtB,8BAA8B;6BAC9B,8BAA8B;oBACvC,oBAAoB;+BACT,+BAA+B;mBAC3C,mBAAmB;0BACZ,0BAA0B;gBACpC,gBAAgB;mBACb,mBAAmB;gCACN,kCAAkC;wBAC1C,yBAAyB;kBAC/B,kBAAkB;uBACb,wBAAwB;uBACxB,uBAAuB;8BAChB,8BAA8B;8BAG9B,kCAAkC;oBAC5C,sBAAsB;wBAClB,0BAA0B;qBAC7B,uBAAuB;4BAChB,+BAA+B;2BAChC,8BAA8B;wCAErD,6CAA6C;sCAE7C,0CAA0C;8BAChB,iCAAiC;wBACvC,oBAAoB;sBACtB,wBAAwB"}
|
package/dist/index.js
CHANGED
|
@@ -1043,6 +1043,161 @@ const filelist = {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
};
|
|
1045
1045
|
|
|
1046
|
+
/**
|
|
1047
|
+
* @type {import('typeson').TypeSpecSet}
|
|
1048
|
+
*/
|
|
1049
|
+
const gpucompilationinfo = {
|
|
1050
|
+
gpucompilationinfo: {
|
|
1051
|
+
test (x) {
|
|
1052
|
+
return toStringTag(x) === 'GPUCompilationInfo';
|
|
1053
|
+
},
|
|
1054
|
+
replace ({messages}) {
|
|
1055
|
+
return {messages};
|
|
1056
|
+
},
|
|
1057
|
+
revive ({messages}) {
|
|
1058
|
+
/* eslint-disable class-methods-use-this -- Don't need */
|
|
1059
|
+
/**
|
|
1060
|
+
* `GPUCompilationInfo` polyfill.
|
|
1061
|
+
*/
|
|
1062
|
+
class GPUCompilationInfo {
|
|
1063
|
+
/**
|
|
1064
|
+
* @returns {string}
|
|
1065
|
+
*/
|
|
1066
|
+
get [Symbol.toStringTag] () {
|
|
1067
|
+
return 'GPUCompilationInfo';
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* @returns {GPUCompilationMessage[]}
|
|
1071
|
+
*/
|
|
1072
|
+
get messages () {
|
|
1073
|
+
/* eslint-enable class-methods-use-this -- Don't need */
|
|
1074
|
+
return messages;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
return new GPUCompilationInfo();
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* @type {import('typeson').TypeSpecSet}
|
|
1084
|
+
*/
|
|
1085
|
+
const gpucompilationmessage = {
|
|
1086
|
+
gpucompilationmessage: {
|
|
1087
|
+
test (x) {
|
|
1088
|
+
return toStringTag(x) === 'GPUCompilationMessage';
|
|
1089
|
+
},
|
|
1090
|
+
replace ({length, lineNum, linePos, message, offset, type}) {
|
|
1091
|
+
return {length, lineNum, linePos, message, offset, type};
|
|
1092
|
+
},
|
|
1093
|
+
revive ({length, lineNum, linePos, message, offset, type}) {
|
|
1094
|
+
/* eslint-disable class-methods-use-this -- Don't need */
|
|
1095
|
+
/**
|
|
1096
|
+
* `GPUCompilationInfo` polyfill.
|
|
1097
|
+
*/
|
|
1098
|
+
class GPUCompilationMessage {
|
|
1099
|
+
/**
|
|
1100
|
+
* @returns {string}
|
|
1101
|
+
*/
|
|
1102
|
+
get [Symbol.toStringTag] () {
|
|
1103
|
+
return 'GPUCompilationMessage';
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* @returns {number}
|
|
1108
|
+
*/
|
|
1109
|
+
get length () {
|
|
1110
|
+
return length;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* @returns {number}
|
|
1115
|
+
*/
|
|
1116
|
+
get lineNum () {
|
|
1117
|
+
return lineNum;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* @returns {number}
|
|
1122
|
+
*/
|
|
1123
|
+
get linePos () {
|
|
1124
|
+
return linePos;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* @returns {string}
|
|
1129
|
+
*/
|
|
1130
|
+
get message () {
|
|
1131
|
+
return message;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* @returns {number}
|
|
1136
|
+
*/
|
|
1137
|
+
get offset () {
|
|
1138
|
+
return offset;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* @returns {"error"|"info"|"warning"}
|
|
1143
|
+
*/
|
|
1144
|
+
get type () {
|
|
1145
|
+
return type;
|
|
1146
|
+
}
|
|
1147
|
+
/* eslint-enable class-methods-use-this -- Don't need */
|
|
1148
|
+
}
|
|
1149
|
+
return new GPUCompilationMessage();
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
/* globals GPUPipelineError -- Newer API */
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* @type {import('typeson').TypeSpecSet}
|
|
1158
|
+
*/
|
|
1159
|
+
const gpupipelineerror = {
|
|
1160
|
+
gpupipelineerror: {
|
|
1161
|
+
test (x) { return toStringTag(x) === 'GPUPipelineError'; },
|
|
1162
|
+
// Note that we can't support the `source` property (defaults
|
|
1163
|
+
// to `stream` instead of `session`)
|
|
1164
|
+
replace ({
|
|
1165
|
+
message, reason,
|
|
1166
|
+
cause, stack, fileName, lineNumber, columnNumber
|
|
1167
|
+
}) {
|
|
1168
|
+
return {
|
|
1169
|
+
message, reason,
|
|
1170
|
+
cause, stack, fileName, lineNumber, columnNumber
|
|
1171
|
+
};
|
|
1172
|
+
},
|
|
1173
|
+
revive (obj) {
|
|
1174
|
+
const {message, reason} = obj;
|
|
1175
|
+
// TS lib still models the older two-argument
|
|
1176
|
+
// `(message, options)` form; browsers implement a single
|
|
1177
|
+
// `init` object (which also carries `message`).
|
|
1178
|
+
const e = /**
|
|
1179
|
+
* @type {{
|
|
1180
|
+
* name: string,
|
|
1181
|
+
* cause: Error,
|
|
1182
|
+
* stack: string,
|
|
1183
|
+
* fileName?: string,
|
|
1184
|
+
* lineNumber?: import('typeson').Integer,
|
|
1185
|
+
* columnNumber?: import('typeson').Integer
|
|
1186
|
+
* }}
|
|
1187
|
+
*/
|
|
1188
|
+
(new GPUPipelineError(message, {reason}));
|
|
1189
|
+
|
|
1190
|
+
e.cause = obj.cause;
|
|
1191
|
+
e.stack = obj.stack;
|
|
1192
|
+
e.fileName = obj.fileName;
|
|
1193
|
+
e.lineNumber = obj.lineNumber;
|
|
1194
|
+
e.columnNumber = obj.columnNumber;
|
|
1195
|
+
|
|
1196
|
+
return e;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1046
1201
|
/* globals IDBKeyRange -- Polyfill needed */
|
|
1047
1202
|
|
|
1048
1203
|
|
|
@@ -2141,7 +2296,13 @@ const expObj = [
|
|
|
2141
2296
|
/* c8 ignore next -- Later support */
|
|
2142
2297
|
typeof EncodedVideoChunk !== 'undefined' ? encodedvideochunk : [],
|
|
2143
2298
|
/* c8 ignore next -- Later support */
|
|
2144
|
-
typeof VideoFrame !== 'undefined' ? videoframe : []
|
|
2299
|
+
typeof VideoFrame !== 'undefined' ? videoframe : [],
|
|
2300
|
+
/* c8 ignore next -- Later support */
|
|
2301
|
+
typeof GPUCompilationInfo !== 'undefined' ? gpucompilationinfo : [],
|
|
2302
|
+
/* c8 ignore next -- Later support */
|
|
2303
|
+
typeof GPUCompilationMessage !== 'undefined' ? gpucompilationmessage : [],
|
|
2304
|
+
/* c8 ignore next -- Later support */
|
|
2305
|
+
typeof GPUPipelineError !== 'undefined' ? gpupipelineerror : []
|
|
2145
2306
|
);
|
|
2146
2307
|
|
|
2147
2308
|
/**
|
|
@@ -2347,5 +2508,5 @@ const universal = [
|
|
|
2347
2508
|
// built-in into ecmasript standard.
|
|
2348
2509
|
];
|
|
2349
2510
|
|
|
2350
|
-
export { c as JSON_TYPES, Typeson, TypesonPromise, Undefined, arrayNonindexKeys, arraybuffer, audiodata, bigint, bigintObject, blob, expObj$1 as builtin, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, encodedaudiochunk, encodedvideochunk, error, errors, escapeKeyPathComponent, file, filelist, getByKeyPath, getJSONType, hasConstructorOf, idbkeyrange, imagebitmap, imagedata, infinity, intlTypes, isObject, isPlainObject, isThenable, isUserObject, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, postmessage, primitiveObjects, promise, quotaexceedederror, regexp, resurrectable, set, setAtKeyPath, socketio, sparseUndefined, specialNumbers, expObj as structuredCloning, structuredCloningForStorage, structuredCloningThrowing, symbol, toStringTag, typedArrays, typedArraysSocketIO as typedArraysSocketio, undef$1 as undef, undef as undefPreset, unescapeKeyPathComponent, universal, userObject, videoframe, webtransporterror };
|
|
2511
|
+
export { c as JSON_TYPES, Typeson, TypesonPromise, Undefined, arrayNonindexKeys, arraybuffer, audiodata, bigint, bigintObject, blob, expObj$1 as builtin, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, encodedaudiochunk, encodedvideochunk, error, errors, escapeKeyPathComponent, file, filelist, getByKeyPath, getJSONType, gpucompilationinfo, gpucompilationmessage, gpupipelineerror, hasConstructorOf, idbkeyrange, imagebitmap, imagedata, infinity, intlTypes, isObject, isPlainObject, isThenable, isUserObject, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, postmessage, primitiveObjects, promise, quotaexceedederror, regexp, resurrectable, set, setAtKeyPath, socketio, sparseUndefined, specialNumbers, expObj as structuredCloning, structuredCloningForStorage, structuredCloningThrowing, symbol, toStringTag, typedArrays, typedArraysSocketIO as typedArraysSocketio, undef$1 as undef, undef as undefPreset, unescapeKeyPathComponent, universal, userObject, videoframe, webtransporterror };
|
|
2351
2512
|
//# sourceMappingURL=index.js.map
|