@loaders.gl/wkt 4.0.0-beta.3 → 4.0.0-beta.4

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/dist.dev.js CHANGED
@@ -197,7 +197,6 @@ var __exports__ = (() => {
197
197
  worker: true,
198
198
  extensions: [],
199
199
  mimeTypes: ["text/plain"],
200
- // category: 'json',
201
200
  text: true,
202
201
  options: {
203
202
  "wkt-crs": {}
@@ -210,16 +209,7 @@ var __exports__ = (() => {
210
209
  // src/lib/parse-wkt.ts
211
210
  var numberRegexp = /[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/;
212
211
  var tuples = new RegExp("^" + numberRegexp.source + "(\\s" + numberRegexp.source + "){1,}");
213
- var WKT_MAGIC_STRINGS = [
214
- "POINT(",
215
- "LINESTRING(",
216
- "POLYGON(",
217
- "MULTIPOINT(",
218
- "MULTILINESTRING(",
219
- "MULTIPOLYGON(",
220
- "GEOMETRYCOLLECTION("
221
- // We only support this "geojson" subset of the OGC simple features standard
222
- ];
212
+ var WKT_MAGIC_STRINGS = ["POINT(", "LINESTRING(", "POLYGON(", "MULTIPOINT(", "MULTILINESTRING(", "MULTIPOLYGON(", "GEOMETRYCOLLECTION("];
223
213
  function isWKT(input) {
224
214
  return WKT_MAGIC_STRINGS.some((magicString) => input.startsWith(magicString));
225
215
  }
@@ -322,7 +312,6 @@ var __exports__ = (() => {
322
312
  white(state);
323
313
  return {
324
314
  type: "MultiLineString",
325
- // @ts-expect-error
326
315
  coordinates: c
327
316
  };
328
317
  }
@@ -337,7 +326,6 @@ var __exports__ = (() => {
337
326
  }
338
327
  return {
339
328
  type: "Polygon",
340
- // @ts-expect-error
341
329
  coordinates: c
342
330
  };
343
331
  }
@@ -352,7 +340,6 @@ var __exports__ = (() => {
352
340
  }
353
341
  return {
354
342
  type: "MultiPolygon",
355
- // @ts-expect-error
356
343
  coordinates: c
357
344
  };
358
345
  }
@@ -522,7 +509,6 @@ var __exports__ = (() => {
522
509
  module: "wkt",
523
510
  version: VERSION,
524
511
  extensions: ["wkt"],
525
- // @ts-expect-error
526
512
  encodeSync: encodeWKT,
527
513
  options: {
528
514
  wkt: {}
@@ -634,7 +620,7 @@ var __exports__ = (() => {
634
620
  var EWKB_FLAG_M = 1073741824;
635
621
  var EWKB_FLAG_SRID = 536870912;
636
622
  var MAX_SRID = 1e4;
637
- var WKBGeometryType = /* @__PURE__ */ function(WKBGeometryType2) {
623
+ var WKBGeometryType = function(WKBGeometryType2) {
638
624
  WKBGeometryType2[WKBGeometryType2["Point"] = 1] = "Point";
639
625
  WKBGeometryType2[WKBGeometryType2["LineString"] = 2] = "LineString";
640
626
  WKBGeometryType2[WKBGeometryType2["Polygon"] = 3] = "Polygon";
@@ -1006,7 +992,6 @@ var __exports__ = (() => {
1006
992
  category: "geometry",
1007
993
  extensions: ["wkb"],
1008
994
  mimeTypes: [],
1009
- // TODO can we define static, serializable tests, eg. some binary strings?
1010
995
  tests: [isWKB],
1011
996
  options: {
1012
997
  wkb: {
@@ -1102,7 +1087,6 @@ var __exports__ = (() => {
1102
1087
  this.dataView.setFloat64(this.byteOffset, value, BE);
1103
1088
  this.byteOffset += 8;
1104
1089
  }
1105
- /** A varint uses a variable number of bytes */
1106
1090
  writeVarInt(value) {
1107
1091
  let length = 1;
1108
1092
  while ((value & 4294967168) !== 0) {
@@ -1113,14 +1097,12 @@ var __exports__ = (() => {
1113
1097
  this.writeUInt8(value & 127);
1114
1098
  return length;
1115
1099
  }
1116
- /** Append another ArrayBuffer to this ArrayBuffer */
1117
1100
  writeBuffer(arrayBuffer) {
1118
1101
  this._ensureSize(arrayBuffer.byteLength);
1119
1102
  const tempArray = new Uint8Array(this.arrayBuffer);
1120
1103
  tempArray.set(new Uint8Array(arrayBuffer), this.byteOffset);
1121
1104
  this.byteOffset += arrayBuffer.byteLength;
1122
1105
  }
1123
- /** Resizes this.arrayBuffer if not enough space */
1124
1106
  _ensureSize(size) {
1125
1107
  if (this.arrayBuffer.byteLength < this.byteOffset + size) {
1126
1108
  if (this.allowResize) {
@@ -1136,7 +1118,7 @@ var __exports__ = (() => {
1136
1118
  };
1137
1119
 
1138
1120
  // src/lib/encode-wkb.ts
1139
- var WKB = /* @__PURE__ */ function(WKB2) {
1121
+ var WKB = function(WKB2) {
1140
1122
  WKB2[WKB2["Point"] = 1] = "Point";
1141
1123
  WKB2[WKB2["LineString"] = 2] = "LineString";
1142
1124
  WKB2[WKB2["Polygon"] = 3] = "Polygon";
@@ -1451,7 +1433,6 @@ var __exports__ = (() => {
1451
1433
  options: WKBLoader.options,
1452
1434
  text: true,
1453
1435
  testText: isHexWKB,
1454
- // TODO - encoding here seems wasteful - extend hex transcoder?
1455
1436
  parse: async (arrayBuffer) => parseHexWKB(new TextDecoder().decode(arrayBuffer)),
1456
1437
  parseTextSync: parseHexWKB
1457
1438
  };
@@ -1800,7 +1781,6 @@ var __exports__ = (() => {
1800
1781
  category: "geometry",
1801
1782
  extensions: ["twkb"],
1802
1783
  mimeTypes: [],
1803
- // TODO can we define static, serializable tests, eg. some binary strings?
1804
1784
  tests: [isTWKB],
1805
1785
  options: {
1806
1786
  wkb: {
@@ -2000,13 +1980,9 @@ var __exports__ = (() => {
2000
1980
  module: "wkt",
2001
1981
  version: VERSION,
2002
1982
  extensions: ["twkb"],
2003
- // @ts-expect-error not implemented yet
2004
1983
  encodeSync: async (data, options) => encodeTWKB,
2005
1984
  options: {
2006
- twkb: {
2007
- // hasZ: false,
2008
- // hasM: false
2009
- }
1985
+ twkb: {}
2010
1986
  }
2011
1987
  };
2012
1988
  return __toCommonJS(src_exports);
@@ -200,7 +200,7 @@
200
200
  }
201
201
 
202
202
  // src/lib/utils/version.ts
203
- var VERSION = true ? "4.0.0-beta.3" : "latest";
203
+ var VERSION = true ? "4.0.0-beta.4" : "latest";
204
204
 
205
205
  // src/lib/parse-wkt.ts
206
206
  var numberRegexp = /[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@loaders.gl/wkt",
3
3
  "description": "Loader and Writer for the WKT (Well Known Text) Format",
4
- "version": "4.0.0-beta.3",
4
+ "version": "4.0.0-beta.4",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "publishConfig": {
@@ -43,8 +43,8 @@
43
43
  "fuzzer": "^0.2.1"
44
44
  },
45
45
  "dependencies": {
46
- "@loaders.gl/loader-utils": "4.0.0-beta.3",
47
- "@loaders.gl/schema": "4.0.0-beta.3"
46
+ "@loaders.gl/loader-utils": "4.0.0-beta.4",
47
+ "@loaders.gl/schema": "4.0.0-beta.4"
48
48
  },
49
- "gitHead": "7ba9621cc51c7a26c407086ac86171f35b8712af"
49
+ "gitHead": "848c20b474532d301f2c3f8d4e1fb9bf262b86d4"
50
50
  }