mapshaper 0.6.18 → 0.6.19

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/www/modules.js CHANGED
@@ -9198,7 +9198,307 @@ if ("Ā" != "\u0100") {
9198
9198
  console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.");
9199
9199
  }
9200
9200
 
9201
- },{"../encodings":6,"./bom-handling":22,"./streams":23,"safer-buffer":39,"stream":2}],"kdbush":[function(require,module,exports){
9201
+ },{"../encodings":6,"./bom-handling":22,"./streams":23,"safer-buffer":39,"stream":2}],"idb-keyval":[function(require,module,exports){
9202
+ 'use strict';
9203
+
9204
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9205
+
9206
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9207
+
9208
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
9209
+
9210
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
9211
+
9212
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
9213
+
9214
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9215
+
9216
+ Object.defineProperty(exports, '__esModule', {
9217
+ value: true
9218
+ });
9219
+
9220
+ function promisifyRequest(request) {
9221
+ return new Promise(function (resolve, reject) {
9222
+ // @ts-ignore - file size hacks
9223
+ request.oncomplete = request.onsuccess = function () {
9224
+ return resolve(request.result);
9225
+ }; // @ts-ignore - file size hacks
9226
+
9227
+
9228
+ request.onabort = request.onerror = function () {
9229
+ return reject(request.error);
9230
+ };
9231
+ });
9232
+ }
9233
+
9234
+ function createStore(dbName, storeName) {
9235
+ var request = indexedDB.open(dbName);
9236
+
9237
+ request.onupgradeneeded = function () {
9238
+ return request.result.createObjectStore(storeName);
9239
+ };
9240
+
9241
+ var dbp = promisifyRequest(request);
9242
+ return function (txMode, callback) {
9243
+ return dbp.then(function (db) {
9244
+ return callback(db.transaction(storeName, txMode).objectStore(storeName));
9245
+ });
9246
+ };
9247
+ }
9248
+
9249
+ var defaultGetStoreFunc;
9250
+
9251
+ function defaultGetStore() {
9252
+ if (!defaultGetStoreFunc) {
9253
+ defaultGetStoreFunc = createStore('keyval-store', 'keyval');
9254
+ }
9255
+
9256
+ return defaultGetStoreFunc;
9257
+ }
9258
+ /**
9259
+ * Get a value by its key.
9260
+ *
9261
+ * @param key
9262
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9263
+ */
9264
+
9265
+
9266
+ function get(key) {
9267
+ var customStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetStore();
9268
+ return customStore('readonly', function (store) {
9269
+ return promisifyRequest(store.get(key));
9270
+ });
9271
+ }
9272
+ /**
9273
+ * Set a value with a key.
9274
+ *
9275
+ * @param key
9276
+ * @param value
9277
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9278
+ */
9279
+
9280
+
9281
+ function set(key, value) {
9282
+ var customStore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultGetStore();
9283
+ return customStore('readwrite', function (store) {
9284
+ store.put(value, key);
9285
+ return promisifyRequest(store.transaction);
9286
+ });
9287
+ }
9288
+ /**
9289
+ * Set multiple values at once. This is faster than calling set() multiple times.
9290
+ * It's also atomic – if one of the pairs can't be added, none will be added.
9291
+ *
9292
+ * @param entries Array of entries, where each entry is an array of `[key, value]`.
9293
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9294
+ */
9295
+
9296
+
9297
+ function setMany(entries) {
9298
+ var customStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetStore();
9299
+ return customStore('readwrite', function (store) {
9300
+ entries.forEach(function (entry) {
9301
+ return store.put(entry[1], entry[0]);
9302
+ });
9303
+ return promisifyRequest(store.transaction);
9304
+ });
9305
+ }
9306
+ /**
9307
+ * Get multiple values by their keys
9308
+ *
9309
+ * @param keys
9310
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9311
+ */
9312
+
9313
+
9314
+ function getMany(keys) {
9315
+ var customStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetStore();
9316
+ return customStore('readonly', function (store) {
9317
+ return Promise.all(keys.map(function (key) {
9318
+ return promisifyRequest(store.get(key));
9319
+ }));
9320
+ });
9321
+ }
9322
+ /**
9323
+ * Update a value. This lets you see the old value and update it as an atomic operation.
9324
+ *
9325
+ * @param key
9326
+ * @param updater A callback that takes the old value and returns a new value.
9327
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9328
+ */
9329
+
9330
+
9331
+ function update(key, updater) {
9332
+ var customStore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultGetStore();
9333
+ return customStore('readwrite', function (store) {
9334
+ return (// Need to create the promise manually.
9335
+ // If I try to chain promises, the transaction closes in browsers
9336
+ // that use a promise polyfill (IE10/11).
9337
+ new Promise(function (resolve, reject) {
9338
+ store.get(key).onsuccess = function () {
9339
+ try {
9340
+ store.put(updater(this.result), key);
9341
+ resolve(promisifyRequest(store.transaction));
9342
+ } catch (err) {
9343
+ reject(err);
9344
+ }
9345
+ };
9346
+ })
9347
+ );
9348
+ });
9349
+ }
9350
+ /**
9351
+ * Delete a particular key from the store.
9352
+ *
9353
+ * @param key
9354
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9355
+ */
9356
+
9357
+
9358
+ function del(key) {
9359
+ var customStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetStore();
9360
+ return customStore('readwrite', function (store) {
9361
+ store.delete(key);
9362
+ return promisifyRequest(store.transaction);
9363
+ });
9364
+ }
9365
+ /**
9366
+ * Delete multiple keys at once.
9367
+ *
9368
+ * @param keys List of keys to delete.
9369
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9370
+ */
9371
+
9372
+
9373
+ function delMany(keys) {
9374
+ var customStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetStore();
9375
+ return customStore('readwrite', function (store) {
9376
+ keys.forEach(function (key) {
9377
+ return store.delete(key);
9378
+ });
9379
+ return promisifyRequest(store.transaction);
9380
+ });
9381
+ }
9382
+ /**
9383
+ * Clear all values in the store.
9384
+ *
9385
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9386
+ */
9387
+
9388
+
9389
+ function clear() {
9390
+ var customStore = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultGetStore();
9391
+ return customStore('readwrite', function (store) {
9392
+ store.clear();
9393
+ return promisifyRequest(store.transaction);
9394
+ });
9395
+ }
9396
+
9397
+ function eachCursor(store, callback) {
9398
+ store.openCursor().onsuccess = function () {
9399
+ if (!this.result) return;
9400
+ callback(this.result);
9401
+ this.result.continue();
9402
+ };
9403
+
9404
+ return promisifyRequest(store.transaction);
9405
+ }
9406
+ /**
9407
+ * Get all keys in the store.
9408
+ *
9409
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9410
+ */
9411
+
9412
+
9413
+ function keys() {
9414
+ var customStore = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultGetStore();
9415
+ return customStore('readonly', function (store) {
9416
+ // Fast path for modern browsers
9417
+ if (store.getAllKeys) {
9418
+ return promisifyRequest(store.getAllKeys());
9419
+ }
9420
+
9421
+ var items = [];
9422
+ return eachCursor(store, function (cursor) {
9423
+ return items.push(cursor.key);
9424
+ }).then(function () {
9425
+ return items;
9426
+ });
9427
+ });
9428
+ }
9429
+ /**
9430
+ * Get all values in the store.
9431
+ *
9432
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9433
+ */
9434
+
9435
+
9436
+ function values() {
9437
+ var customStore = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultGetStore();
9438
+ return customStore('readonly', function (store) {
9439
+ // Fast path for modern browsers
9440
+ if (store.getAll) {
9441
+ return promisifyRequest(store.getAll());
9442
+ }
9443
+
9444
+ var items = [];
9445
+ return eachCursor(store, function (cursor) {
9446
+ return items.push(cursor.value);
9447
+ }).then(function () {
9448
+ return items;
9449
+ });
9450
+ });
9451
+ }
9452
+ /**
9453
+ * Get all entries in the store. Each entry is an array of `[key, value]`.
9454
+ *
9455
+ * @param customStore Method to get a custom store. Use with caution (see the docs).
9456
+ */
9457
+
9458
+
9459
+ function entries() {
9460
+ var customStore = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultGetStore();
9461
+ return customStore('readonly', function (store) {
9462
+ // Fast path for modern browsers
9463
+ // (although, hopefully we'll get a simpler path some day)
9464
+ if (store.getAll && store.getAllKeys) {
9465
+ return Promise.all([promisifyRequest(store.getAllKeys()), promisifyRequest(store.getAll())]).then(function (_ref) {
9466
+ var _ref2 = _slicedToArray(_ref, 2),
9467
+ keys = _ref2[0],
9468
+ values = _ref2[1];
9469
+
9470
+ return keys.map(function (key, i) {
9471
+ return [key, values[i]];
9472
+ });
9473
+ });
9474
+ }
9475
+
9476
+ var items = [];
9477
+ return customStore('readonly', function (store) {
9478
+ return eachCursor(store, function (cursor) {
9479
+ return items.push([cursor.key, cursor.value]);
9480
+ }).then(function () {
9481
+ return items;
9482
+ });
9483
+ });
9484
+ });
9485
+ }
9486
+
9487
+ exports.clear = clear;
9488
+ exports.createStore = createStore;
9489
+ exports.del = del;
9490
+ exports.delMany = delMany;
9491
+ exports.entries = entries;
9492
+ exports.get = get;
9493
+ exports.getMany = getMany;
9494
+ exports.keys = keys;
9495
+ exports.promisifyRequest = promisifyRequest;
9496
+ exports.set = set;
9497
+ exports.setMany = setMany;
9498
+ exports.update = update;
9499
+ exports.values = values;
9500
+
9501
+ },{}],"kdbush":[function(require,module,exports){
9202
9502
  (function (global, factory) {
9203
9503
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
9204
9504
  typeof define === 'function' && define.amd ? define(factory) :
package/www/page.css CHANGED
@@ -56,6 +56,8 @@ body {
56
56
  }
57
57
 
58
58
  .colored-text,
59
+ .save-menu-link,
60
+ .save-menu-btn,
59
61
  .nav-menu-item {
60
62
  color: #10699b;
61
63
  }
@@ -72,6 +74,10 @@ body {
72
74
  border-bottom: 1px dotted black;
73
75
  }
74
76
 
77
+ /*.nav-btn * {
78
+ fill: #1385B7;
79
+ }*/
80
+
75
81
  .nav-btn * {
76
82
  fill: #1385B7;
77
83
  }
@@ -1160,6 +1166,10 @@ div.basemap-style-btn.active img {
1160
1166
 
1161
1167
  /* --- MAP BUTTONS --- */
1162
1168
 
1169
+ .pointer-btn {
1170
+ z-index: 2;
1171
+ }
1172
+
1163
1173
  .nav-buttons {
1164
1174
  z-index: 20;
1165
1175
  position: absolute;
@@ -1188,16 +1198,19 @@ div.basemap-style-btn.active img {
1188
1198
  fill: black !important;
1189
1199
  }
1190
1200
 
1201
+ .save-btn .save-menu {
1202
+ top: 23px;
1203
+ }
1204
+
1191
1205
  .nav-sub-menu {
1192
1206
  position: absolute;
1193
- /* top: 5px;
1194
- right: 21px; */
1195
- z-index: -1;
1207
+ z-index: -1;
1196
1208
  display: none;
1197
1209
  pointer-events: none;
1198
1210
  padding-top: 4px;
1199
- top: 26px;
1211
+ top: 27px;
1200
1212
  right: -3px;
1213
+ white-space: nowrap;
1201
1214
  }
1202
1215
 
1203
1216
  .nav-btn.open .nav-sub-menu {
@@ -1205,21 +1218,22 @@ div.basemap-style-btn.active img {
1205
1218
  pointer-events: inherit;
1206
1219
  }
1207
1220
 
1208
-
1209
1221
  .nav-menu-item {
1210
1222
  background-color: #fff;
1211
1223
  float: right;
1212
1224
  clear: right;
1213
1225
  white-space: nowrap;
1214
1226
  display: inline-block;
1215
- padding: 4px 7px 5px 7px;
1227
+ padding: 5px 7px 5px 7px;
1216
1228
  line-height: 11px;
1217
1229
  cursor: pointer;
1218
1230
  }
1219
1231
 
1232
+
1220
1233
  .nav-menu-item:hover,
1221
1234
  .nav-btn:hover .nav-sub-menu:not(.active):not(:hover) .nav-menu-item[data-name=info] {
1222
1235
  font-weight: bold;
1236
+ background: #e6f7ff;
1223
1237
  }
1224
1238
 
1225
1239
  .nav-menu-item.selected {
@@ -1251,13 +1265,71 @@ div.basemap-style-btn.active img {
1251
1265
 
1252
1266
  .nav-btn:hover:not(.disabled) svg *,
1253
1267
  .nav-btn.hover.menu-btn:not(.disabled) svg * {
1254
- fill: #1A6A96;
1268
+ fill: #166689;
1255
1269
  }
1256
1270
 
1257
1271
  .nav-btn.menu-btn.selected:not(.disabled) svg * {
1258
1272
  fill: white;
1259
1273
  }
1260
1274
 
1275
+ .save-menu {
1276
+ text-align: right;
1277
+ }
1278
+
1279
+ .save-menu-entry {
1280
+ /* padding: 4px 7px 5px 7px; */
1281
+ line-height: 11px;
1282
+ padding: 4px 7px 5px 7px;
1283
+ display: inline-block;
1284
+ background: white;
1285
+ }
1286
+
1287
+ .save-menu-btn {
1288
+ display: inline-block;
1289
+ border-radius: 4px;
1290
+ border: 1px solid #aaa;
1291
+ font-size: 12px;
1292
+ margin-left: 2px;
1293
+ padding: 1px 2px 3px 2px;
1294
+ }
1295
+
1296
+ .save-menu-link,
1297
+ .save-menu-btn {
1298
+ cursor: pointer;
1299
+ }
1300
+
1301
+ .save-menu-btn:hover {
1302
+ background: #e6f7ff;
1303
+ color: black;
1304
+ }
1305
+
1306
+ .save-menu-link:hover {
1307
+ /* background: #e6f7ff; */
1308
+ font-weight: bold;
1309
+ }
1310
+
1311
+ .save-item-label {
1312
+ font-weight: bold;
1313
+ }
1314
+
1315
+ .save-item-size {
1316
+ /*color: #999;*/
1317
+ font-weight: bold;
1318
+ font-size: 11px;
1319
+ letter-spacing: 0.5;
1320
+ }
1321
+
1322
+ .save-menu-item {
1323
+ position: relative;
1324
+ right: 0;
1325
+ text-align: right;
1326
+ background-color: #fff;
1327
+ white-space: nowrap;
1328
+ padding: 2px 7px 0px 7px;
1329
+ line-height: 11px;
1330
+ cursor: pointer;
1331
+ }
1332
+
1261
1333
  .nav-btn.disabled {
1262
1334
  opacity: 0.4;
1263
1335
  cursor: default;