@math.gl/types 5.0.0-alpha.11 → 5.0.0-alpha.13
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/LICENSE +7 -0
- package/dist/array-types.js +1 -1
- package/dist/array-types.js.map +1 -1
- package/dist/bigint.js +1 -1
- package/dist/bigint.js.map +1 -1
- package/dist/bounds-types.js +1 -1
- package/dist/bounds-types.js.map +1 -1
- package/dist/float16.d.ts +6 -0
- package/dist/float16.d.ts.map +1 -1
- package/dist/float16.js +10 -1
- package/dist/float16.js.map +1 -1
- package/dist/index.cjs +15 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/is-array.d.ts +2 -0
- package/dist/is-array.d.ts.map +1 -1
- package/dist/is-array.js +6 -1
- package/dist/is-array.js.map +1 -1
- package/dist/spheroid.d.ts +8 -0
- package/dist/spheroid.d.ts.map +1 -0
- package/dist/spheroid.js +5 -0
- package/dist/spheroid.js.map +1 -0
- package/dist/typed-array-brand.d.ts +2 -0
- package/dist/typed-array-brand.d.ts.map +1 -0
- package/dist/typed-array-brand.js +10 -0
- package/dist/typed-array-brand.js.map +1 -0
- package/package.json +2 -2
- package/src/array-types.ts +1 -1
- package/src/bigint.ts +1 -1
- package/src/bounds-types.ts +1 -1
- package/src/float16.ts +11 -1
- package/src/index.ts +6 -3
- package/src/is-array.ts +7 -1
- package/src/spheroid.ts +11 -0
- package/src/typed-array-brand.ts +14 -0
package/LICENSE
CHANGED
|
@@ -138,3 +138,10 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
138
138
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
139
139
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
140
140
|
THE SOFTWARE.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
The shared numeric spheroid entry in @math.gl/core retains the existing
|
|
145
|
+
proj4js-derived forward geocentric and Hannover inverse arithmetic. The core
|
|
146
|
+
package includes its full upstream MIT notice in modules/core/PROJ4-LICENSE.md;
|
|
147
|
+
the projection package retains its corresponding PROJ4-LICENSE.md.
|
package/dist/array-types.js
CHANGED
package/dist/array-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-types.js","sourceRoot":"","sources":["../src/array-types.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"array-types.js","sourceRoot":"","sources":["../src/array-types.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAK5D,sDAAsD"}
|
package/dist/bigint.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
// BigInt compatibility layer
|
|
5
5
|
// Inspired by ArrowJS (under Apache2 license)
|
|
6
6
|
// https://github.com/apache/arrow/blob/master/js/src/util/compat.ts
|
package/dist/bigint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.js","sourceRoot":"","sources":["../src/bigint.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"bigint.js","sourceRoot":"","sources":["../src/bigint.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,6BAA6B;AAC7B,8CAA8C;AAC9C,oEAAoE;AACpE,gEAAgE;AAChE,uCAAuC;AAEvC,MAAM,sBAAsB,GAAG,6CAA6C,CAAC;AAE7E,SAAS,iBAAiB;IACxB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAC1C,CAAC;AACD,iBAAiB,CAAC,MAAM,GAAG,GAAG,EAAE;IAC9B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAC1C,CAAC,CAAC;AACF,iBAAiB,CAAC,OAAO,GAAG,GAAG,EAAE;IAC/B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,wBAAwB;IAC5B,MAAM,KAAK,iBAAiB;QAC1B,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,CAAC,EAAE;QACP,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,MAAM,CAAC,IAAI;QACT,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD;QACE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;CACF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AAC7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,aAAa,KAAK,WAAW,CAAC;AAC3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,cAAc,KAAK,WAAW,CAAC;AAE7E,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE;IACvB,OAAO,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACtD,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE;IAC9B,OAAO,sBAAsB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAC3E,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE;IAC/B,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC;AACjF,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,EAAC,UAAU,IAAI,MAAM,EAAC,CAAC;AAC9B,OAAO,EAAC,iBAAiB,IAAI,aAAa,EAAC,CAAC;AAC5C,OAAO,EAAC,kBAAkB,IAAI,cAAc,EAAC,CAAC"}
|
package/dist/bounds-types.js
CHANGED
package/dist/bounds-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bounds-types.js","sourceRoot":"","sources":["../src/bounds-types.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"bounds-types.js","sourceRoot":"","sources":["../src/bounds-types.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAa5D,2CAA2C;AAC3C,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,CAAC,CAAC,MAAM;QACR,CAAC,CAAC;YACE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC7B,CAAC;AACR,CAAC"}
|
package/dist/float16.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { TypedArrayConstructor } from "./array-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Checks for native Float16Array values, including arrays from other realms.
|
|
4
|
+
* Does not identify Uint16Array binary16 storage as a decoded Float16Array.
|
|
5
|
+
* Does not require a Float16Array constructor in the current realm.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isFloat16Array(value: unknown): value is Float16Array;
|
|
2
8
|
/**
|
|
3
9
|
* The native `Float16Array` constructor exposed by the current JavaScript runtime.
|
|
4
10
|
*
|
package/dist/float16.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"float16.d.ts","sourceRoot":"","sources":["../src/float16.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,qBAAqB,EAAC,yBAAsB;
|
|
1
|
+
{"version":3,"file":"float16.d.ts","sourceRoot":"","sources":["../src/float16.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,qBAAqB,EAAC,yBAAsB;AAGzD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,qBAAqB,GAAG,SAC3C,CAAC;AAE1B;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,qBAAqB,CAElE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEjE"}
|
package/dist/float16.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import { getTypedArrayName } from "./typed-array-brand.js";
|
|
5
|
+
/**
|
|
6
|
+
* Checks for native Float16Array values, including arrays from other realms.
|
|
7
|
+
* Does not identify Uint16Array binary16 storage as a decoded Float16Array.
|
|
8
|
+
* Does not require a Float16Array constructor in the current realm.
|
|
9
|
+
*/
|
|
10
|
+
export function isFloat16Array(value) {
|
|
11
|
+
return getTypedArrayName(value) === 'Float16Array';
|
|
12
|
+
}
|
|
4
13
|
/**
|
|
5
14
|
* The native `Float16Array` constructor exposed by the current JavaScript runtime.
|
|
6
15
|
*
|
package/dist/float16.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"float16.js","sourceRoot":"","sources":["../src/float16.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"float16.js","sourceRoot":"","sources":["../src/float16.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAG5D,OAAO,EAAC,iBAAiB,EAAC,+BAA4B;AAEtD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,iBAAiB,CAAC,KAAK,CAAC,KAAK,cAAc,CAAC;AACrD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,6BAA6B,GACxC,UAAU,CAAC,YAAY,CAAC;AAE1B;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,6BAA6B,IAAI,WAAW,CAAC;AACtD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAc;IACtD,OAAO,OAAO,CAAC,6BAA6B,IAAI,KAAK,KAAK,6BAA6B,CAAC,CAAC;AAC3F,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -21,14 +21,25 @@ var index_exports = {};
|
|
|
21
21
|
__export(index_exports, {
|
|
22
22
|
NativeFloat16ArrayConstructor: () => NativeFloat16ArrayConstructor,
|
|
23
23
|
getFloat16ArrayConstructor: () => getFloat16ArrayConstructor,
|
|
24
|
+
isFloat16Array: () => isFloat16Array,
|
|
24
25
|
isFloat16ArrayConstructor: () => isFloat16ArrayConstructor,
|
|
25
26
|
isNumberArray: () => isNumberArray,
|
|
26
27
|
isNumericArray: () => isNumericArray,
|
|
27
|
-
isTypedArray: () => isTypedArray
|
|
28
|
+
isTypedArray: () => isTypedArray,
|
|
29
|
+
isUint16Array: () => isUint16Array
|
|
28
30
|
});
|
|
29
31
|
module.exports = __toCommonJS(index_exports);
|
|
30
32
|
|
|
33
|
+
// dist/typed-array-brand.js
|
|
34
|
+
var typedArrayTagGetter = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get;
|
|
35
|
+
function getTypedArrayName(value) {
|
|
36
|
+
return ArrayBuffer.isView(value) ? typedArrayTagGetter.call(value) : void 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
// dist/is-array.js
|
|
40
|
+
function isUint16Array(value) {
|
|
41
|
+
return getTypedArrayName(value) === "Uint16Array";
|
|
42
|
+
}
|
|
32
43
|
function isTypedArray(value) {
|
|
33
44
|
return ArrayBuffer.isView(value) && !(value instanceof DataView);
|
|
34
45
|
}
|
|
@@ -43,6 +54,9 @@ function isNumericArray(value) {
|
|
|
43
54
|
}
|
|
44
55
|
|
|
45
56
|
// dist/float16.js
|
|
57
|
+
function isFloat16Array(value) {
|
|
58
|
+
return getTypedArrayName(value) === "Float16Array";
|
|
59
|
+
}
|
|
46
60
|
var NativeFloat16ArrayConstructor = globalThis.Float16Array;
|
|
47
61
|
function getFloat16ArrayConstructor() {
|
|
48
62
|
return NativeFloat16ArrayConstructor ?? Uint16Array;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/index.ts", "../src/is-array.ts", "../src/float16.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA
|
|
3
|
+
"sources": ["../src/index.ts", "../src/typed-array-brand.ts", "../src/is-array.ts", "../src/float16.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;ACMA,IAAM,sBAAsB,OAAO,yBACjC,OAAO,eAAe,WAAW,SAAS,GAC1C,OAAO,WAAW,EACjB;AAEG,SAAU,kBAAkB,OAAc;AAC9C,SAAO,YAAY,OAAO,KAAK,IAAI,oBAAoB,KAAK,KAAK,IAAI;AACvE;;;ACLM,SAAU,cAAc,OAAc;AAC1C,SAAO,kBAAkB,KAAK,MAAM;AACtC;AAOM,SAAU,aAAa,OAAc;AACzC,SAAO,YAAY,OAAO,KAAK,KAAK,EAAE,iBAAiB;AACzD;AAOM,SAAU,cAAc,OAAc;AAC1C,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,WAAO,MAAM,WAAW,KAAK,OAAO,MAAM,CAAC,MAAM;EACnD;AACA,SAAO;AACT;AAOM,SAAU,eAAe,OAAc;AAC3C,SAAO,aAAa,KAAK,KAAK,cAAc,KAAK;AACnD;;;AC5BM,SAAU,eAAe,OAAc;AAC3C,SAAO,kBAAkB,KAAK,MAAM;AACtC;AASO,IAAM,gCACX,WAAW;AASP,SAAU,6BAA0B;AACxC,SAAO,iCAAiC;AAC1C;AASM,SAAU,0BAA0B,OAAc;AACtD,SAAO,QAAQ,iCAAiC,UAAU,6BAA6B;AACzF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { TypedArray, TypedArrayConstructor, BigTypedArray, BigTypedArrayConstructor, NumberArray, NumberArray1, NumberArray2, NumberArray3, NumberArray4, NumberArray6, NumberArray8, NumberArray9, NumberArray12, NumberArray16, NumericArray, NumericArray1, NumericArray2, NumericArray3, NumericArray4, NumericArray6, NumericArray8, NumericArray9, NumericArray12, NumericArray16 } from "./array-types.js";
|
|
2
|
-
export { isTypedArray, isNumberArray, isNumericArray } from "./is-array.js";
|
|
3
|
-
export { NativeFloat16ArrayConstructor, getFloat16ArrayConstructor, isFloat16ArrayConstructor } from "./float16.js";
|
|
2
|
+
export { isTypedArray, isUint16Array, isNumberArray, isNumericArray } from "./is-array.js";
|
|
3
|
+
export { NativeFloat16ArrayConstructor, getFloat16ArrayConstructor, isFloat16ArrayConstructor, isFloat16Array } from "./float16.js";
|
|
4
4
|
export type { Bounds, Bounds2D, Bounds3D } from "./bounds-types.js";
|
|
5
|
+
export type { SpheroidParameters } from "./spheroid.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,YAAY,EAEV,UAAU,EACV,qBAAqB,EACrB,aAAa,EACb,wBAAwB,EAExB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EAEb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACf,yBAAsB;AAEvB,OAAO,EAAC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAC,sBAAmB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,YAAY,EAEV,UAAU,EACV,qBAAqB,EACrB,aAAa,EACb,wBAAwB,EAExB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EAEb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACf,yBAAsB;AAEvB,OAAO,EAAC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAC,sBAAmB;AACtF,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,cAAc,EACf,qBAAkB;AAEnB,YAAY,EAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAC,0BAAuB;AAE/D,YAAY,EAAC,kBAAkB,EAAC,sBAAmB"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
4
|
-
export { isTypedArray, isNumberArray, isNumericArray } from "./is-array.js";
|
|
5
|
-
export { NativeFloat16ArrayConstructor, getFloat16ArrayConstructor, isFloat16ArrayConstructor } from "./float16.js";
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
export { isTypedArray, isUint16Array, isNumberArray, isNumericArray } from "./is-array.js";
|
|
5
|
+
export { NativeFloat16ArrayConstructor, getFloat16ArrayConstructor, isFloat16ArrayConstructor, isFloat16Array } from "./float16.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAgC5D,OAAO,EAAC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAC,sBAAmB;AACtF,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,cAAc,EACf,qBAAkB"}
|
package/dist/is-array.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { TypedArray, NumericArray, NumberArray } from "./array-types.js";
|
|
2
|
+
/** Checks for unsigned 16-bit samples, including typed arrays from other realms. */
|
|
3
|
+
export declare function isUint16Array(value: unknown): value is Uint16Array;
|
|
2
4
|
/**
|
|
3
5
|
* Check is an array is a typed array
|
|
4
6
|
* @param value value to be tested
|
package/dist/is-array.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-array.d.ts","sourceRoot":"","sources":["../src/is-array.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAE,WAAW,EAAC,yBAAsB;
|
|
1
|
+
{"version":3,"file":"is-array.d.ts","sourceRoot":"","sources":["../src/is-array.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAE,WAAW,EAAC,yBAAsB;AAGpE,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAKlE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE"}
|
package/dist/is-array.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import { getTypedArrayName } from "./typed-array-brand.js";
|
|
5
|
+
/** Checks for unsigned 16-bit samples, including typed arrays from other realms. */
|
|
6
|
+
export function isUint16Array(value) {
|
|
7
|
+
return getTypedArrayName(value) === 'Uint16Array';
|
|
8
|
+
}
|
|
4
9
|
/**
|
|
5
10
|
* Check is an array is a typed array
|
|
6
11
|
* @param value value to be tested
|
package/dist/is-array.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-array.js","sourceRoot":"","sources":["../src/is-array.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"is-array.js","sourceRoot":"","sources":["../src/is-array.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAG5D,OAAO,EAAC,iBAAiB,EAAC,+BAA4B;AAEtD,oFAAoF;AACpF,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,iBAAiB,CAAC,KAAK,CAAC,KAAK,aAAa,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,YAAY,QAAQ,CAAC,CAAC;AACnE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;IAC5D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Geometry of a sphere or oblate spheroid, in metres. No datum, axes or epoch metadata.
|
|
2
|
+
* Both axes must be finite and positive, with semiMinorAxis <= semiMajorAxis.
|
|
3
|
+
*/
|
|
4
|
+
export type SpheroidParameters = {
|
|
5
|
+
readonly semiMajorAxis: number;
|
|
6
|
+
readonly semiMinorAxis: number;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=spheroid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spheroid.d.ts","sourceRoot":"","sources":["../src/spheroid.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,CAAC"}
|
package/dist/spheroid.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spheroid.js","sourceRoot":"","sources":["../src/spheroid.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-array-brand.d.ts","sourceRoot":"","sources":["../src/typed-array-brand.ts"],"names":[],"mappings":"AAWA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAEpE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// Use the intrinsic getter so constructor and Symbol.toStringTag overrides cannot
|
|
5
|
+
// disguise a typed array's element type. It also works for arrays from other realms.
|
|
6
|
+
const typedArrayTagGetter = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get;
|
|
7
|
+
export function getTypedArrayName(value) {
|
|
8
|
+
return ArrayBuffer.isView(value) ? typedArrayTagGetter.call(value) : undefined;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=typed-array-brand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-array-brand.js","sourceRoot":"","sources":["../src/typed-array-brand.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,kFAAkF;AAClF,qFAAqF;AACrF,MAAM,mBAAmB,GAAG,MAAM,CAAC,wBAAwB,CACzD,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,CAAC,EAC3C,MAAM,CAAC,WAAW,CAClB,CAAC,GAAI,CAAC;AAER,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACjF,CAAC"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
-
"version": "5.0.0-alpha.
|
|
9
|
+
"version": "5.0.0-alpha.13",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"typescript",
|
|
12
12
|
"javascript",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sideEffects": [
|
|
36
36
|
"./src/bigint.js"
|
|
37
37
|
],
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "4c52326098194bd1b290a72a512a328d10565bfd"
|
|
39
39
|
}
|
package/src/array-types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
// Float16Array is declared in a separate TypeScript library. Preserve this reference so
|
|
6
6
|
// published declarations remain self-contained without changing the target or emitting runtime code.
|
package/src/bigint.ts
CHANGED
package/src/bounds-types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
/** 2 dimensional bounds [[minX, minY], [maxX, maxY]] */
|
|
6
6
|
export type Bounds2D = [[number, number], [number, number]];
|
package/src/float16.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import type {TypedArrayConstructor} from './array-types';
|
|
6
|
+
import {getTypedArrayName} from './typed-array-brand';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Checks for native Float16Array values, including arrays from other realms.
|
|
10
|
+
* Does not identify Uint16Array binary16 storage as a decoded Float16Array.
|
|
11
|
+
* Does not require a Float16Array constructor in the current realm.
|
|
12
|
+
*/
|
|
13
|
+
export function isFloat16Array(value: unknown): value is Float16Array {
|
|
14
|
+
return getTypedArrayName(value) === 'Float16Array';
|
|
15
|
+
}
|
|
6
16
|
|
|
7
17
|
/**
|
|
8
18
|
* The native `Float16Array` constructor exposed by the current JavaScript runtime.
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
export type {
|
|
6
6
|
// typed arrays
|
|
@@ -32,11 +32,14 @@ export type {
|
|
|
32
32
|
NumericArray16
|
|
33
33
|
} from './array-types';
|
|
34
34
|
|
|
35
|
-
export {isTypedArray, isNumberArray, isNumericArray} from './is-array';
|
|
35
|
+
export {isTypedArray, isUint16Array, isNumberArray, isNumericArray} from './is-array';
|
|
36
36
|
export {
|
|
37
37
|
NativeFloat16ArrayConstructor,
|
|
38
38
|
getFloat16ArrayConstructor,
|
|
39
|
-
isFloat16ArrayConstructor
|
|
39
|
+
isFloat16ArrayConstructor,
|
|
40
|
+
isFloat16Array
|
|
40
41
|
} from './float16';
|
|
41
42
|
|
|
42
43
|
export type {Bounds, Bounds2D, Bounds3D} from './bounds-types';
|
|
44
|
+
|
|
45
|
+
export type {SpheroidParameters} from './spheroid';
|
package/src/is-array.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {TypedArray, NumericArray, NumberArray} from './array-types';
|
|
6
|
+
import {getTypedArrayName} from './typed-array-brand';
|
|
7
|
+
|
|
8
|
+
/** Checks for unsigned 16-bit samples, including typed arrays from other realms. */
|
|
9
|
+
export function isUint16Array(value: unknown): value is Uint16Array {
|
|
10
|
+
return getTypedArrayName(value) === 'Uint16Array';
|
|
11
|
+
}
|
|
6
12
|
|
|
7
13
|
/**
|
|
8
14
|
* Check is an array is a typed array
|
package/src/spheroid.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
/** Geometry of a sphere or oblate spheroid, in metres. No datum, axes or epoch metadata.
|
|
6
|
+
* Both axes must be finite and positive, with semiMinorAxis <= semiMajorAxis.
|
|
7
|
+
*/
|
|
8
|
+
export type SpheroidParameters = {
|
|
9
|
+
readonly semiMajorAxis: number;
|
|
10
|
+
readonly semiMinorAxis: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
// Use the intrinsic getter so constructor and Symbol.toStringTag overrides cannot
|
|
6
|
+
// disguise a typed array's element type. It also works for arrays from other realms.
|
|
7
|
+
const typedArrayTagGetter = Object.getOwnPropertyDescriptor(
|
|
8
|
+
Object.getPrototypeOf(Uint8Array.prototype),
|
|
9
|
+
Symbol.toStringTag
|
|
10
|
+
)!.get!;
|
|
11
|
+
|
|
12
|
+
export function getTypedArrayName(value: unknown): string | undefined {
|
|
13
|
+
return ArrayBuffer.isView(value) ? typedArrayTagGetter.call(value) : undefined;
|
|
14
|
+
}
|