mapshaper 0.7.64 → 0.7.66

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
@@ -82789,7 +82789,7 @@ ${svg}
82789
82789
  return name == 'rectangle' || name == 'rectangles' || name == 'filter' && opts.cleanup;
82790
82790
  }
82791
82791
 
82792
- var version = "0.7.64";
82792
+ var version = "0.7.66";
82793
82793
 
82794
82794
  // Parse command line args into commands and run them
82795
82795
  // Function takes an optional Node-style callback. A Promise is returned if no callback is given.
package/www/page.css CHANGED
@@ -2259,6 +2259,19 @@ body.pan.panning .map-layers:not(.drawing) {
2259
2259
  vector-effect: non-scaling-stroke;
2260
2260
  }
2261
2261
 
2262
+ /* The cue for a selection too large to outline label by label -- selecting a
2263
+ whole layer to restyle it. A halo in the selection's own blue, the same
2264
+ treatment the older styling mode uses in yellow: at that size the question
2265
+ is which labels are in the selection, not where each one's anchor is. */
2266
+ .map-layers > svg text.label-cue-marked {
2267
+ stroke: #3a7ddc;
2268
+ stroke-opacity: 0.3;
2269
+ paint-order: stroke fill;
2270
+ stroke-width: 4px;
2271
+ stroke-linecap: round;
2272
+ stroke-linejoin: round;
2273
+ }
2274
+
2262
2275
  /* Transparent rather than fill:none / stroke:none, because an unpainted shape
2263
2276
  is not hit-testable. */
2264
2277
  .label-edit-hit-area {
@@ -2412,6 +2425,28 @@ body.pan.panning .map-layers:not(.drawing) {
2412
2425
  fill: white;
2413
2426
  }
2414
2427
 
2428
+ /* Tooltip shown to the left of a nav button on hover. It borrows the type of
2429
+ .nav-menu-item so the strip reads as one family, but stays a flat label --
2430
+ no border, radius or shadow -- so it is not mistaken for the arrow menu.
2431
+ The translucent white wash keeps it legible over dark map content. */
2432
+ .nav-btn[data-tooltip]:hover:not(.disabled)::after {
2433
+ content: attr(data-tooltip);
2434
+ position: absolute;
2435
+ /* Below .nav-sub-menu, which is at -1 and lingers for a moment after the
2436
+ pointer leaves the arrow button: the tooltip must pass behind it. */
2437
+ z-index: -2;
2438
+ top: 50%;
2439
+ right: calc(100% + 2px);
2440
+ transform: translateY(-50%);
2441
+ pointer-events: none;
2442
+ background-color: rgba(255, 255, 255, 0.85);
2443
+ color: var(--colored-text);
2444
+ font-size: 13px;
2445
+ line-height: 13px;
2446
+ padding: 3px 6px 4px 6px;
2447
+ white-space: nowrap;
2448
+ }
2449
+
2415
2450
  .nav-btn.preview-toggle {
2416
2451
  align-items: center;
2417
2452
  box-sizing: border-box;
@@ -3215,7 +3250,8 @@ body.pan.panning .map-layers:not(.drawing) {
3215
3250
 
3216
3251
  /* A switch, because whether the label has a symbol at all is a yes/no that the
3217
3252
  four shapes below it then qualify. Off is a pale track with the knob left,
3218
- on a dark one with the knob right. */
3253
+ on a dark one with the knob right, and mixed -- some of the selected labels
3254
+ on, some off -- is both halves at once with the knob over the join. */
3219
3255
  .label-toggle {
3220
3256
  position: relative;
3221
3257
  flex: none;
@@ -3248,6 +3284,16 @@ body.pan.panning .map-layers:not(.drawing) {
3248
3284
  left: 13px;
3249
3285
  }
3250
3286
 
3287
+ /* The hard edge is the point: a gradient stop rather than a blend, so that the
3288
+ track reads as one half on and one half off rather than as a third colour. */
3289
+ .label-toggle.mixed {
3290
+ background: linear-gradient(to right, #333 50%, #ccc 50%);
3291
+ }
3292
+
3293
+ .label-toggle.mixed .label-toggle-knob {
3294
+ left: 7.5px;
3295
+ }
3296
+
3251
3297
  .label-toggle.disabled {
3252
3298
  opacity: 0.45;
3253
3299
  cursor: default;
@@ -3349,6 +3395,13 @@ body.pan.panning .map-layers:not(.drawing) {
3349
3395
  border-radius: 2px;
3350
3396
  }
3351
3397
 
3398
+ /* A swatch for a selection whose colours disagree: split rather than empty,
3399
+ because empty is how the swatch says the colour is unset. Two greys, so that
3400
+ it cannot be read as one of the colours in the selection. */
3401
+ .label-style-panel .label-color-field .label-color-chit.mixed {
3402
+ background-image: linear-gradient(135deg, #d9d9d9 0 50%, #8c8c8c 50% 100%);
3403
+ }
3404
+
3352
3405
  .label-style-panel .label-color-field input[type="text"] {
3353
3406
  flex: 1;
3354
3407
  width: auto;
@@ -3761,21 +3814,35 @@ body.dragging-color-picker * {
3761
3814
  .contextmenu-item {
3762
3815
  background-color: #fff;
3763
3816
  white-space: nowrap;
3764
- padding: 3px 10px 4px 10px;
3817
+ /* padding: 3px 10px 4px 10px; */
3818
+ margin: 1px 10px;
3819
+ padding: 2px 0;
3765
3820
  cursor: pointer;
3766
- font-size: 13px;
3821
+ font-size: 12px;
3767
3822
  line-height: 13px;
3768
3823
  }
3769
3824
 
3770
3825
  .contextmenu-label {
3771
3826
  color: #999;
3772
3827
  white-space: nowrap;
3773
- padding: 4px 10px 1px 10px;
3828
+ padding: 5px 10px 1px 10px;
3774
3829
  font-size: 12px;
3775
3830
  line-height: 12px;
3776
3831
  margin-top: -2px;
3777
3832
  }
3778
3833
 
3834
+ /* How many labels a "select" item would select. In the grey of a menu heading
3835
+ rather than the item's own colour: it qualifies what the item says rather
3836
+ than being part of it. */
3837
+ .contextmenu-count {
3838
+ font-size: 10px;
3839
+ color: #999;
3840
+ }
3841
+
3842
+ .contextmenu-item:hover .contextmenu-count {
3843
+ color: #777;
3844
+ }
3845
+
3779
3846
  /* color tile shown instead of a bullet in the raster color readout */
3780
3847
  .contextmenu-swatch {
3781
3848
  display: inline-block;