mapshaper 0.7.9 → 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/bin/mapshaper-gui +1 -0
- package/mapshaper.js +1836 -75
- package/package.json +9 -6
- package/www/geoparquet.js +569 -3153
- package/www/index.html +16 -1
- package/www/mapshaper-gui.js +8532 -5406
- package/www/mapshaper.js +1836 -75
- package/www/page.css +106 -22
- package/www/zstd.wasm +0 -0
- package/www/ai-config.js +0 -62
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:
|
|
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:
|
|
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:
|
|
87
|
+
color: var(--colored-text);
|
|
77
88
|
}
|
|
78
89
|
|
|
79
90
|
.dot-underline {
|
|
80
|
-
border-color:
|
|
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:
|
|
103
|
+
fill: var(--theme-col);
|
|
93
104
|
}*/
|
|
94
105
|
|
|
95
106
|
.nav-btn * {
|
|
96
|
-
fill:
|
|
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:
|
|
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:
|
|
137
|
+
background-color: var(--lt-theme-col);
|
|
127
138
|
}
|
|
128
139
|
|
|
129
140
|
.colored-text::-moz-selection {
|
|
130
|
-
background-color:
|
|
141
|
+
background-color: var(--lt-theme-col);
|
|
131
142
|
}
|
|
132
143
|
|
|
133
144
|
.layer-item.active {
|
|
134
|
-
background-color:
|
|
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:
|
|
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:
|
|
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:
|
|
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);
|
|
@@ -253,23 +264,73 @@ body.map-view {
|
|
|
253
264
|
z-index: 50;
|
|
254
265
|
}
|
|
255
266
|
|
|
267
|
+
.history-menu-dropdown {
|
|
268
|
+
pointer-events: none;
|
|
269
|
+
}
|
|
270
|
+
|
|
256
271
|
.header-menu-item {
|
|
257
272
|
display: block;
|
|
258
273
|
padding: 4px 14px;
|
|
259
|
-
color:
|
|
274
|
+
color: var(--normal-text);
|
|
260
275
|
font-size: 14px;
|
|
261
276
|
line-height: 1.3;
|
|
262
277
|
text-decoration: none;
|
|
263
278
|
white-space: nowrap;
|
|
279
|
+
cursor: pointer;
|
|
264
280
|
}
|
|
265
281
|
|
|
266
282
|
.header-menu-item:hover,
|
|
267
283
|
.header-menu-item:focus {
|
|
268
|
-
background-color:
|
|
284
|
+
background-color: var(--lt-theme-col);
|
|
269
285
|
color: #1A6A96;
|
|
270
286
|
outline: none;
|
|
271
287
|
}
|
|
272
288
|
|
|
289
|
+
.header-menu-item.disabled {
|
|
290
|
+
color: #999;
|
|
291
|
+
pointer-events: none;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.history-menu-dropdown .info-box {
|
|
295
|
+
pointer-events: initial;
|
|
296
|
+
min-width: 230px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.history-menu-item {
|
|
300
|
+
color: var(--normal-text);
|
|
301
|
+
cursor: pointer;
|
|
302
|
+
padding: 2px 0;
|
|
303
|
+
white-space: nowrap;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.history-menu-item:hover,
|
|
307
|
+
.history-menu-item:focus {
|
|
308
|
+
color: #1A6A96;
|
|
309
|
+
outline: none;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.history-menu-item.disabled {
|
|
313
|
+
color: #999;
|
|
314
|
+
cursor: default;
|
|
315
|
+
opacity: 0.55;
|
|
316
|
+
pointer-events: none;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.history-menu-separator {
|
|
320
|
+
height: 1px;
|
|
321
|
+
background-color: #ddd;
|
|
322
|
+
margin: 6px 0 5px 0;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.history-menu-note {
|
|
326
|
+
color: #777;
|
|
327
|
+
font-size: 12px;
|
|
328
|
+
line-height: 1.25;
|
|
329
|
+
max-width: 215px;
|
|
330
|
+
padding: 0 0 5px 0;
|
|
331
|
+
white-space: normal;
|
|
332
|
+
}
|
|
333
|
+
|
|
273
334
|
.header-menu-item.header-menu-sponsor svg {
|
|
274
335
|
width: 12px;
|
|
275
336
|
height: 12px;
|
|
@@ -425,7 +486,7 @@ div.alert-box {
|
|
|
425
486
|
padding: 9px 11px 6px 11px;
|
|
426
487
|
margin: 9px -1px 3px -1px;
|
|
427
488
|
min-height: 130px;
|
|
428
|
-
background:
|
|
489
|
+
background: var(--xlt-theme-col);
|
|
429
490
|
}
|
|
430
491
|
|
|
431
492
|
.catalog-mode .file-catalog {
|
|
@@ -448,7 +509,7 @@ div.alert-box {
|
|
|
448
509
|
overflow: hidden;
|
|
449
510
|
border: 1.5px solid #aaa;
|
|
450
511
|
border-radius: 19px;
|
|
451
|
-
background-color:
|
|
512
|
+
background-color: var(--bg-col);
|
|
452
513
|
}
|
|
453
514
|
|
|
454
515
|
.file-catalog table {
|
|
@@ -702,7 +763,7 @@ input[type="checkbox"]
|
|
|
702
763
|
font-size: 15px;
|
|
703
764
|
color: black;
|
|
704
765
|
background-color: rgba(255, 255, 222, 0.85);
|
|
705
|
-
border: 1px solid
|
|
766
|
+
border: 1px solid var(--normal-text);
|
|
706
767
|
}
|
|
707
768
|
|
|
708
769
|
/* === Editing interface ========== */
|
|
@@ -763,6 +824,28 @@ body.console-open .map-area {
|
|
|
763
824
|
display: none;
|
|
764
825
|
}
|
|
765
826
|
|
|
827
|
+
.console-tab {
|
|
828
|
+
position: absolute;
|
|
829
|
+
top: 55px; /* below line intersection repair link */
|
|
830
|
+
left: 0;
|
|
831
|
+
z-index: 25;
|
|
832
|
+
writing-mode: vertical-rl;
|
|
833
|
+
transform: rotate(180deg);
|
|
834
|
+
background-color: var(--theme-col);
|
|
835
|
+
color: white;
|
|
836
|
+
padding: 9px 4px;
|
|
837
|
+
border-radius: 5px 0 0 5px;
|
|
838
|
+
font-size: 13px;
|
|
839
|
+
font-weight: 500;
|
|
840
|
+
cursor: pointer;
|
|
841
|
+
pointer-events: auto;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.console-tab:hover,
|
|
845
|
+
body.console-open .console-tab {
|
|
846
|
+
background-color: #1A6A96;
|
|
847
|
+
}
|
|
848
|
+
|
|
766
849
|
.console-window {
|
|
767
850
|
pointer-events: auto;
|
|
768
851
|
background-color: black;
|
|
@@ -1370,6 +1453,7 @@ img.close-btn:hover,
|
|
|
1370
1453
|
overflow: hidden;
|
|
1371
1454
|
overflow-y: auto;
|
|
1372
1455
|
margin: 0 -4px 6px -4px;
|
|
1456
|
+
user-select: text;
|
|
1373
1457
|
}
|
|
1374
1458
|
|
|
1375
1459
|
.message-item {
|
|
@@ -1427,7 +1511,7 @@ img.close-btn:hover,
|
|
|
1427
1511
|
}
|
|
1428
1512
|
|
|
1429
1513
|
.message-item .message-dismiss:hover {
|
|
1430
|
-
color:
|
|
1514
|
+
color: var(--normal-text);
|
|
1431
1515
|
background-color: rgba(0, 0, 0, 0.05);
|
|
1432
1516
|
}
|
|
1433
1517
|
|
|
@@ -1774,7 +1858,7 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
1774
1858
|
.contextmenu-item:hover,
|
|
1775
1859
|
.nav-btn:hover .nav-sub-menu:not(.active):not(:hover) .nav-menu-item[data-name=info] {
|
|
1776
1860
|
color: black;
|
|
1777
|
-
background:
|
|
1861
|
+
background: var(--lt-theme-col);
|
|
1778
1862
|
}
|
|
1779
1863
|
|
|
1780
1864
|
.nav-menu-item.selected {
|
|
@@ -1934,12 +2018,12 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
1934
2018
|
}
|
|
1935
2019
|
|
|
1936
2020
|
.floating-toolbar-btn svg * {
|
|
1937
|
-
fill:
|
|
2021
|
+
fill: var(--theme-col);
|
|
1938
2022
|
transition: fill 100ms ease;
|
|
1939
2023
|
}
|
|
1940
2024
|
|
|
1941
2025
|
.floating-toolbar-btn:hover:not(.disabled) {
|
|
1942
|
-
background-color:
|
|
2026
|
+
background-color: var(--lt-theme-col);
|
|
1943
2027
|
}
|
|
1944
2028
|
|
|
1945
2029
|
.floating-toolbar-btn:hover:not(.disabled) svg * {
|
package/www/zstd.wasm
ADDED
|
Binary file
|
package/www/ai-config.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
var defaultProvider = "anthropic";
|
|
3
|
-
|
|
4
|
-
var common = {
|
|
5
|
-
enabled: true,
|
|
6
|
-
mode: "direct",
|
|
7
|
-
label: "Ask Mapshaper",
|
|
8
|
-
title: "Ask Mapshaper",
|
|
9
|
-
staticContextUrls: [
|
|
10
|
-
"/docs/ai/bot-instructions.html.md",
|
|
11
|
-
"/docs/ai/command-cheatsheet.html.md",
|
|
12
|
-
"/llms-full.txt"
|
|
13
|
-
],
|
|
14
|
-
sendRuntimeContext: true,
|
|
15
|
-
sendSampleValues: false,
|
|
16
|
-
allowRunCommands: false
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
var providers = {
|
|
20
|
-
anthropic: {
|
|
21
|
-
provider: "anthropic",
|
|
22
|
-
apiKey: "",
|
|
23
|
-
model: "claude-sonnet-4-6",
|
|
24
|
-
cacheControl: {type: "ephemeral"},
|
|
25
|
-
cacheTtl: "1h"
|
|
26
|
-
},
|
|
27
|
-
openai: {
|
|
28
|
-
provider: "openai",
|
|
29
|
-
apiKey: "",
|
|
30
|
-
model: "gpt-4.1-mini"
|
|
31
|
-
},
|
|
32
|
-
gemini: {
|
|
33
|
-
provider: "gemini",
|
|
34
|
-
apiKey: "",
|
|
35
|
-
model: "gemini-3.1-pro-preview"
|
|
36
|
-
},
|
|
37
|
-
mock: {
|
|
38
|
-
mode: "mock",
|
|
39
|
-
provider: "mock"
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
function getSelectedProvider() {
|
|
44
|
-
var params = new URLSearchParams(window.location.search);
|
|
45
|
-
return params.get("ai") || defaultProvider;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function mergeConfig() {
|
|
49
|
-
var selected = getSelectedProvider();
|
|
50
|
-
var providerConfig = providers[selected] || providers[defaultProvider];
|
|
51
|
-
return Object.assign({
|
|
52
|
-
selectedProvider: providers[selected] ? selected : defaultProvider
|
|
53
|
-
}, common, providerConfig);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
window.mapshaperAIConfigs = {
|
|
57
|
-
defaultProvider: defaultProvider,
|
|
58
|
-
common: common,
|
|
59
|
-
providers: providers
|
|
60
|
-
};
|
|
61
|
-
window.mapshaperAI = mergeConfig();
|
|
62
|
-
})();
|