typeson-registry 14.5.0 → 14.6.1
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/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -10
- 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 +102 -13
- package/dist/index.umd.cjs.map +1 -1
- package/dist/index.umd.min.cjs +1 -1
- package/dist/index.umd.min.cjs.map +1 -1
- package/dist/polyfills/IDBKeyRange.d.ts +30 -0
- package/dist/polyfills/IDBKeyRange.d.ts.map +1 -0
- package/dist/polyfills/index.d.ts +1 -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.umd.cjs +1 -1
- package/dist/presets/structured-cloning.umd.cjs.map +1 -1
- package/dist/types/idbkeyrange.d.ts +6 -0
- package/dist/types/idbkeyrange.d.ts.map +1 -0
- package/dist/types/idbkeyrange.umd.cjs +2 -0
- package/dist/types/idbkeyrange.umd.cjs.map +1 -0
- package/dist/types/quotaexceedederror.d.ts.map +1 -1
- package/dist/types/quotaexceedederror.umd.cjs +1 -1
- package/dist/types/quotaexceedederror.umd.cjs.map +1 -1
- package/dist/types/webtransporterror.d.ts.map +1 -1
- package/dist/types/webtransporterror.umd.cjs +1 -1
- package/dist/types/webtransporterror.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/polyfills/IDBKeyRange.js +42 -0
- package/polyfills/index.cjs +45 -0
- package/polyfills/index.cjs.map +1 -1
- package/polyfills/index.js +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ 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 idbkeyrange from './types/idbkeyrange.js';
|
|
22
23
|
import imagebitmap from './types/imagebitmap.js';
|
|
23
24
|
import imagedata from './types/imagedata.js';
|
|
24
25
|
import infinity from './types/infinity.js';
|
|
@@ -52,5 +53,5 @@ import structuredCloningThrowing from './presets/structured-cloning-throwing.js'
|
|
|
52
53
|
import structuredCloning from './presets/structured-cloning.js';
|
|
53
54
|
import undefPreset from './presets/undef.js';
|
|
54
55
|
import universal from './presets/universal.js';
|
|
55
|
-
export { arraybuffer, audiodata, bigintObject, bigint, blob, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, encodedaudiochunk, encodedvideochunk, error, errors, file, filelist, 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 };
|
|
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 };
|
|
56
57
|
//# 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;wBAClB,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"}
|
|
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;wBAClB,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
|
@@ -1051,6 +1051,26 @@ const filelist = {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
};
|
|
1053
1053
|
|
|
1054
|
+
/* globals IDBKeyRange -- Polyfill needed */
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* @type {import('typeson').TypeSpecSet}
|
|
1059
|
+
*/
|
|
1060
|
+
const idbkeyrange = {
|
|
1061
|
+
idbkeyrange: {
|
|
1062
|
+
test (x) {
|
|
1063
|
+
return toStringTag(x) === 'IDBKeyRange';
|
|
1064
|
+
},
|
|
1065
|
+
replace ({lower, upper, lowerOpen, upperOpen}) {
|
|
1066
|
+
return {lower, upper, lowerOpen, upperOpen};
|
|
1067
|
+
},
|
|
1068
|
+
revive ({lower, upper, lowerOpen, upperOpen}) {
|
|
1069
|
+
return IDBKeyRange.bound(lower, upper, lowerOpen, upperOpen);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1054
1074
|
/* globals document, OffscreenCanvas, createImageBitmap -- Polyfills */
|
|
1055
1075
|
// `ImageBitmap` is browser / DOM specific. It also can only work
|
|
1056
1076
|
// same-domain (or CORS)
|
|
@@ -1432,10 +1452,18 @@ const promise = {
|
|
|
1432
1452
|
const quotaexceedederror = {
|
|
1433
1453
|
quotaexceedederror: {
|
|
1434
1454
|
test (x) { return toStringTag(x) === 'QuotaExceededError'; },
|
|
1435
|
-
replace ({
|
|
1436
|
-
|
|
1455
|
+
replace ({
|
|
1456
|
+
message, quota, requested,
|
|
1457
|
+
cause, stack, fileName, lineNumber, columnNumber
|
|
1458
|
+
}) {
|
|
1459
|
+
return {
|
|
1460
|
+
message, quota, requested,
|
|
1461
|
+
cause, stack, fileName, lineNumber, columnNumber
|
|
1462
|
+
};
|
|
1437
1463
|
},
|
|
1438
|
-
revive (
|
|
1464
|
+
revive (obj) {
|
|
1465
|
+
const {message, quota, requested} = obj;
|
|
1466
|
+
|
|
1439
1467
|
/** @type {{quota?: number, requested?: number}} */
|
|
1440
1468
|
const options = {};
|
|
1441
1469
|
if (quota !== null && quota !== undefined) {
|
|
@@ -1444,7 +1472,26 @@ const quotaexceedederror = {
|
|
|
1444
1472
|
if (requested !== null && requested !== undefined) {
|
|
1445
1473
|
options.requested = requested;
|
|
1446
1474
|
}
|
|
1447
|
-
|
|
1475
|
+
const e = /**
|
|
1476
|
+
* @type {{
|
|
1477
|
+
* name: string,
|
|
1478
|
+
* cause: Error,
|
|
1479
|
+
* stack: string,
|
|
1480
|
+
* fileName?: string,
|
|
1481
|
+
* lineNumber?: import('typeson').Integer,
|
|
1482
|
+
* columnNumber?: import('typeson').Integer
|
|
1483
|
+
* }}
|
|
1484
|
+
*/ (
|
|
1485
|
+
new QuotaExceededError(message, options)
|
|
1486
|
+
);
|
|
1487
|
+
|
|
1488
|
+
e.cause = obj.cause;
|
|
1489
|
+
e.stack = obj.stack;
|
|
1490
|
+
e.fileName = obj.fileName;
|
|
1491
|
+
e.lineNumber = obj.lineNumber;
|
|
1492
|
+
e.columnNumber = obj.columnNumber;
|
|
1493
|
+
|
|
1494
|
+
return e;
|
|
1448
1495
|
}
|
|
1449
1496
|
}
|
|
1450
1497
|
};
|
|
@@ -1824,15 +1871,41 @@ const webtransporterror = {
|
|
|
1824
1871
|
test (x) { return toStringTag(x) === 'WebTransportError'; },
|
|
1825
1872
|
// Note that we can't support the `source` property (defaults
|
|
1826
1873
|
// to `stream` instead of `session`)
|
|
1827
|
-
replace ({
|
|
1828
|
-
|
|
1874
|
+
replace ({
|
|
1875
|
+
message, streamErrorCode,
|
|
1876
|
+
cause, stack, fileName, lineNumber, columnNumber
|
|
1877
|
+
}) {
|
|
1878
|
+
return {
|
|
1879
|
+
message, streamErrorCode,
|
|
1880
|
+
cause, stack, fileName, lineNumber, columnNumber
|
|
1881
|
+
};
|
|
1829
1882
|
},
|
|
1830
|
-
revive (
|
|
1883
|
+
revive (obj) {
|
|
1884
|
+
const {message, streamErrorCode} = obj;
|
|
1831
1885
|
// TS lib still models the older two-argument
|
|
1832
1886
|
// `(message, options)` form; browsers implement a single
|
|
1833
1887
|
// `init` object (which also carries `message`).
|
|
1834
|
-
|
|
1835
|
-
|
|
1888
|
+
const e = /**
|
|
1889
|
+
* @type {{
|
|
1890
|
+
* name: string,
|
|
1891
|
+
* cause: Error,
|
|
1892
|
+
* stack: string,
|
|
1893
|
+
* fileName?: string,
|
|
1894
|
+
* lineNumber?: import('typeson').Integer,
|
|
1895
|
+
* columnNumber?: import('typeson').Integer
|
|
1896
|
+
* }}
|
|
1897
|
+
*/ (
|
|
1898
|
+
// @ts-expect-error - More recent API
|
|
1899
|
+
new WebTransportError({message, streamErrorCode})
|
|
1900
|
+
);
|
|
1901
|
+
|
|
1902
|
+
e.cause = obj.cause;
|
|
1903
|
+
e.stack = obj.stack;
|
|
1904
|
+
e.fileName = obj.fileName;
|
|
1905
|
+
e.lineNumber = obj.lineNumber;
|
|
1906
|
+
e.columnNumber = obj.columnNumber;
|
|
1907
|
+
|
|
1908
|
+
return e;
|
|
1836
1909
|
}
|
|
1837
1910
|
}
|
|
1838
1911
|
};
|
|
@@ -2256,5 +2329,5 @@ const universal = [
|
|
|
2256
2329
|
// built-in into ecmasript standard.
|
|
2257
2330
|
];
|
|
2258
2331
|
|
|
2259
|
-
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, 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 };
|
|
2332
|
+
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 };
|
|
2260
2333
|
//# sourceMappingURL=index.js.map
|