mapshaper 0.7.10 → 0.7.11

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/mapshaper.js CHANGED
@@ -17021,7 +17021,8 @@
17021
17021
  var groups = groupPolygonRings(obj.pathData, arcs, opts.invert_y);
17022
17022
  // invert_y is used internally for SVG generation
17023
17023
  // mapshaper's internal winding order is the opposite of RFC 7946
17024
- var reverse = opts.rfc7946 && !opts.invert_y;
17024
+ var rfc7946 = opts.rfc7946 === true;
17025
+ var reverse = rfc7946 !== !!opts.reverse_winding && !opts.invert_y;
17025
17026
  var coords = groups.map(function(paths) {
17026
17027
  return paths.map(function(path) {
17027
17028
  if (reverse) path.points.reverse();
@@ -26408,37 +26409,25 @@ ${svg}
26408
26409
  async function loadZstdLib() {
26409
26410
  var mod;
26410
26411
  if (runningInBrowser()) {
26411
- mod = require$1('zstd-codec');
26412
+ mod = require$1('@bokuweb/zstd-wasm');
26412
26413
  } else {
26413
26414
  if (!zstdPromise) {
26414
- zstdPromise = dynamicImportModule$1('zstd-codec');
26415
+ zstdPromise = dynamicImportModule$1('@bokuweb/zstd-wasm');
26415
26416
  }
26416
26417
  mod = await zstdPromise;
26417
26418
  }
26418
- if (mod && mod.default && !mod.ZstdCodec) {
26419
+ if (mod && mod.default && !mod.compress) {
26419
26420
  mod = mod.default;
26420
26421
  }
26421
- if (!mod || !mod.ZstdCodec || typeof mod.ZstdCodec.run != 'function') {
26422
+ if (!mod || typeof mod.init != 'function' || typeof mod.compress != 'function') {
26422
26423
  stop$1('GeoParquet ZSTD compressor is not loaded');
26423
26424
  }
26424
- return initZstdCodec(mod.ZstdCodec);
26425
+ await mod.init();
26426
+ return initZstdCodec(mod);
26425
26427
  }
26426
26428
 
26427
26429
  function initZstdCodec(codec) {
26428
- return new Promise(function(resolve, reject) {
26429
- try {
26430
- codec.run(function(zstd) {
26431
- var simple = new zstd.Simple();
26432
- resolve({
26433
- compress: function(bytes, level) {
26434
- return simple.compress(bytes, level);
26435
- }
26436
- });
26437
- });
26438
- } catch (e) {
26439
- reject(e);
26440
- }
26441
- });
26430
+ return codec;
26442
26431
  }
26443
26432
 
26444
26433
  function getOutputFormat(dataset, opts) {
@@ -29145,6 +29134,10 @@ ${svg}
29145
29134
  describe: '[GeoJSON] use original GeoJSON spec (not RFC 7946)',
29146
29135
  type: 'flag'
29147
29136
  })
29137
+ .option('reverse-winding', {
29138
+ describe: '[GeoJSON] reverse polygon winding order',
29139
+ type: 'flag'
29140
+ })
29148
29141
  .option('rfc7946', {
29149
29142
  // dummy option so old commands do not break
29150
29143
  type: 'flag'
@@ -34623,8 +34616,8 @@ ${svg}
34623
34616
  var candidates = getGeoParquetCrsStrings(crs);
34624
34617
  for (var i = 0; i < candidates.length; i++) {
34625
34618
  try {
34626
- parseCrsString$1(candidates[i]);
34627
34619
  await initProjLibrary({crs: candidates[i]});
34620
+ parseCrsString$1(candidates[i]);
34628
34621
  return candidates[i];
34629
34622
  } catch (e) {
34630
34623
  // Keep trying candidates; if none initialize, caller will warn.
@@ -55438,7 +55431,7 @@ ${svg}
55438
55431
  });
55439
55432
  }
55440
55433
 
55441
- var version = "0.7.10";
55434
+ var version = "0.7.11";
55442
55435
 
55443
55436
  // Parse command line args into commands and run them
55444
55437
  // Function takes an optional Node-style callback. A Promise is returned if no callback is given.
@@ -55496,8 +55489,10 @@ ${svg}
55496
55489
  var child = require$1('child_process').exec(command, {}, function(err, stdout, stderr) {
55497
55490
  opts.callback(err);
55498
55491
  });
55499
- child.stdout.pipe(process.stdout);
55500
- child.stderr.pipe(process.stderr);
55492
+ if (loggingEnabled()) {
55493
+ child.stdout.pipe(process.stdout);
55494
+ child.stderr.pipe(process.stderr);
55495
+ }
55501
55496
  if (opts.promise) return opts.promise;
55502
55497
  }
55503
55498
 
package/www/page.css CHANGED
@@ -13,6 +13,17 @@
13
13
  src: url('assets/iosevka-light.woff2') format('woff2');
14
14
  }
15
15
 
16
+ :root {
17
+ --bg-col: #eaf2f4; /* #f8fdff */
18
+ --xlt-theme-col: #f4f8f9;
19
+ --accent-col: #ffa; /* yellow logo text */
20
+ --theme-col: #1385B7; /* blue header / btn col */
21
+ --dk-theme-col: #1A6A96; /* btn hover col */
22
+ --lt-theme-col: #e6f7ff;
23
+ --colored-text: #10699b;
24
+ --normal-text: #333;
25
+ }
26
+
16
27
 
17
28
  html, body {
18
29
  height: 100%;
@@ -23,7 +34,7 @@ html, body {
23
34
 
24
35
  body {
25
36
  overflow: hidden;
26
- background-color: #f8fdff;
37
+ background-color: var(--bg-col);
27
38
  font: 14px/1.4 'SourceSans3', Arial, sans-serif;
28
39
  font-weight: 400;
29
40
  color: #444;
@@ -63,7 +74,7 @@ body.map-view {
63
74
  .page-header,
64
75
  .dialog-btn,
65
76
  .sidebar-btn {
66
- background-color: #1385B7;
77
+ background-color: var(--theme-col);
67
78
  }
68
79
 
69
80
  .colored-text,
@@ -73,11 +84,11 @@ body.map-view {
73
84
  .add-field-btn,
74
85
  .nav-menu-item,
75
86
  .edit-data-btn {
76
- color: #10699b;
87
+ color: var(--colored-text);
77
88
  }
78
89
 
79
90
  .dot-underline {
80
- border-color: #10699b;
91
+ border-color: var(--colored-text);
81
92
  }
82
93
 
83
94
  .dot-underline {
@@ -89,11 +100,11 @@ body.map-view {
89
100
  }
90
101
 
91
102
  /*.nav-btn * {
92
- fill: #1385B7;
103
+ fill: var(--theme-col);
93
104
  }*/
94
105
 
95
106
  .nav-btn * {
96
- fill: #1385B7;
107
+ fill: var(--theme-col);
97
108
  }
98
109
 
99
110
  .alert-btn + .alert-btn {
@@ -115,7 +126,7 @@ body.map-view {
115
126
  .btn.header-btn:hover,
116
127
  .dialog-btn.default-btn,
117
128
  .dialog-btn.selected-btn {
118
- background-color: #1A6A96;
129
+ background-color: var(--dk-theme-col);
119
130
  }
120
131
 
121
132
  .dialog-btn.disabled {
@@ -123,15 +134,15 @@ body.map-view {
123
134
  }
124
135
 
125
136
  .colored-text::selection {
126
- background-color: #e6f7ff;
137
+ background-color: var(--lt-theme-col);
127
138
  }
128
139
 
129
140
  .colored-text::-moz-selection {
130
- background-color: #e6f7ff;
141
+ background-color: var(--lt-theme-col);
131
142
  }
132
143
 
133
144
  .layer-item.active {
134
- background-color: #e6f7ff;
145
+ background-color: var(--lt-theme-col);
135
146
  }
136
147
 
137
148
  /* --- Page header --------------- */
@@ -153,7 +164,7 @@ body.map-view {
153
164
  }
154
165
 
155
166
  .mapshaper-logo .logo-highlight {
156
- color: #ffa;
167
+ color: var(--accent-col);
157
168
  }
158
169
 
159
170
  .page-header a {
@@ -212,7 +223,7 @@ body.map-view {
212
223
  }
213
224
 
214
225
  #sponsor-btn {
215
- color: #ffa;
226
+ color: var(--accent-col);
216
227
  }
217
228
 
218
229
  #sponsor-btn svg {
@@ -245,7 +256,7 @@ body.map-view {
245
256
  right: 0;
246
257
  min-width: 180px;
247
258
  background-color: #fff;
248
- color: #333;
259
+ color: var(--normal-text);
249
260
  border: 1px solid #ccc;
250
261
  border-radius: 3px;
251
262
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
@@ -260,7 +271,7 @@ body.map-view {
260
271
  .header-menu-item {
261
272
  display: block;
262
273
  padding: 4px 14px;
263
- color: #333;
274
+ color: var(--normal-text);
264
275
  font-size: 14px;
265
276
  line-height: 1.3;
266
277
  text-decoration: none;
@@ -270,7 +281,7 @@ body.map-view {
270
281
 
271
282
  .header-menu-item:hover,
272
283
  .header-menu-item:focus {
273
- background-color: #e6f7ff;
284
+ background-color: var(--lt-theme-col);
274
285
  color: #1A6A96;
275
286
  outline: none;
276
287
  }
@@ -286,7 +297,7 @@ body.map-view {
286
297
  }
287
298
 
288
299
  .history-menu-item {
289
- color: #333;
300
+ color: var(--normal-text);
290
301
  cursor: pointer;
291
302
  padding: 2px 0;
292
303
  white-space: nowrap;
@@ -475,7 +486,7 @@ div.alert-box {
475
486
  padding: 9px 11px 6px 11px;
476
487
  margin: 9px -1px 3px -1px;
477
488
  min-height: 130px;
478
- background: #f8fdff;
489
+ background: var(--xlt-theme-col);
479
490
  }
480
491
 
481
492
  .catalog-mode .file-catalog {
@@ -498,7 +509,7 @@ div.alert-box {
498
509
  overflow: hidden;
499
510
  border: 1.5px solid #aaa;
500
511
  border-radius: 19px;
501
- background-color: #f8fdff;
512
+ background-color: var(--bg-col);
502
513
  }
503
514
 
504
515
  .file-catalog table {
@@ -752,7 +763,7 @@ input[type="checkbox"]
752
763
  font-size: 15px;
753
764
  color: black;
754
765
  background-color: rgba(255, 255, 222, 0.85);
755
- border: 1px solid #333;
766
+ border: 1px solid var(--normal-text);
756
767
  }
757
768
 
758
769
  /* === Editing interface ========== */
@@ -820,7 +831,7 @@ body.console-open .map-area {
820
831
  z-index: 25;
821
832
  writing-mode: vertical-rl;
822
833
  transform: rotate(180deg);
823
- background-color: #1385B7;
834
+ background-color: var(--theme-col);
824
835
  color: white;
825
836
  padding: 9px 4px;
826
837
  border-radius: 5px 0 0 5px;
@@ -1500,7 +1511,7 @@ img.close-btn:hover,
1500
1511
  }
1501
1512
 
1502
1513
  .message-item .message-dismiss:hover {
1503
- color: #333;
1514
+ color: var(--normal-text);
1504
1515
  background-color: rgba(0, 0, 0, 0.05);
1505
1516
  }
1506
1517
 
@@ -1847,7 +1858,7 @@ body.pan.panning .map-layers:not(.drawing) {
1847
1858
  .contextmenu-item:hover,
1848
1859
  .nav-btn:hover .nav-sub-menu:not(.active):not(:hover) .nav-menu-item[data-name=info] {
1849
1860
  color: black;
1850
- background: #e6f7ff;
1861
+ background: var(--lt-theme-col);
1851
1862
  }
1852
1863
 
1853
1864
  .nav-menu-item.selected {
@@ -2007,12 +2018,12 @@ body.pan.panning .map-layers:not(.drawing) {
2007
2018
  }
2008
2019
 
2009
2020
  .floating-toolbar-btn svg * {
2010
- fill: #1385B7;
2021
+ fill: var(--theme-col);
2011
2022
  transition: fill 100ms ease;
2012
2023
  }
2013
2024
 
2014
2025
  .floating-toolbar-btn:hover:not(.disabled) {
2015
- background-color: #e6f7ff;
2026
+ background-color: var(--lt-theme-col);
2016
2027
  }
2017
2028
 
2018
2029
  .floating-toolbar-btn:hover:not(.disabled) svg * {
package/www/zstd.wasm ADDED
Binary file