mapshaper 0.7.71 → 0.7.74

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/page.css CHANGED
@@ -945,7 +945,7 @@ body.sidebar-panels-resizing .sidebar-panels-resize-handle::before,
945
945
  }
946
946
 
947
947
  :root {
948
- --sidebar-strip-height: 33px;
948
+ --sidebar-strip-height: 34px;
949
949
  }
950
950
 
951
951
  /* Icon buttons for opening the sidebar, shown on the map while the sidebar is
@@ -1059,7 +1059,7 @@ body.sidebar-open .sidebar-panels {
1059
1059
  display: flex;
1060
1060
  align-items: center;
1061
1061
  gap: 5px;
1062
- padding: 2px 8px 2px 6px;
1062
+ padding: 3px 8px 3px 6px;
1063
1063
  border: 1px solid #cfdde4;
1064
1064
  border-radius: 12px;
1065
1065
  color: var(--theme-col);
@@ -1362,7 +1362,7 @@ body.simplify .layer-control-btn {
1362
1362
  starts a line has its dot pushed past the left edge of the row and clipped,
1363
1363
  so no line ends or begins with a stray dot. */
1364
1364
  .layer-add-links {
1365
- margin: 2px 0 2px 0;
1365
+ margin: 4px 0 8px 0;
1366
1366
  font-size: 13px;
1367
1367
  line-height: 1.2;
1368
1368
  overflow: hidden;
@@ -1414,20 +1414,20 @@ body.simplify .layer-control-btn {
1414
1414
  }
1415
1415
 
1416
1416
  .layer-menu .layer-list {
1417
- margin-top: -5px;
1418
- /* margin: 0 0 7px 0; */
1417
+ margin-top: -2px;
1419
1418
  }
1420
1419
 
1421
1420
  .layer-menu .layer-item {
1422
1421
  position: relative;
1423
1422
  margin-left: -14px;
1424
1423
  margin-right: 6px;
1425
- padding: 6px 14px;
1424
+ padding: 0 14px;
1426
1425
  width: 100%;
1427
1426
  }
1428
1427
 
1429
1428
  .layer-menu .layer-list .layer-item {
1430
1429
  cursor: pointer;
1430
+ padding: 6px 14px;
1431
1431
  }
1432
1432
 
1433
1433
  .map-frame-section {
@@ -1499,8 +1499,8 @@ img.close-btn {
1499
1499
 
1500
1500
  .pin-all img {
1501
1501
  position: absolute;
1502
- top: 11px;
1503
1502
  cursor: pointer;
1503
+ top: 0;
1504
1504
  }
1505
1505
 
1506
1506
 
@@ -3021,12 +3021,6 @@ body.pan.panning .map-layers:not(.drawing) {
3021
3021
  width: 54px;
3022
3022
  }
3023
3023
 
3024
- .export-frame-info {
3025
- color: #555;
3026
- font-size: 12px;
3027
- margin: 8px 0 12px;
3028
- }
3029
-
3030
3024
  .label-style-panel select,
3031
3025
  .label-saved-style-btn {
3032
3026
  background-image: var(--label-menu-chevron);
@@ -3479,6 +3473,14 @@ body.pan.panning .map-layers:not(.drawing) {
3479
3473
  align-self: center;
3480
3474
  }
3481
3475
 
3476
+ /* A layer with no features: every control is faded and inert, leaving the
3477
+ heading, the "Editing:" line that says why, and the close button. */
3478
+ .label-style-panel.no-targets .label-style-row:not(.label-style-selection-row),
3479
+ .label-style-panel.no-targets .label-style-section-title .label-toggle {
3480
+ opacity: 0.45;
3481
+ pointer-events: none;
3482
+ }
3483
+
3482
3484
  /* A section switched off shows only its heading (see setSectionCollapsed()). */
3483
3485
  .label-style-panel .label-style-section.collapsed > :not(.label-style-section-title) {
3484
3486
  display: none;
@@ -3667,6 +3669,7 @@ body.pan.panning .map-layers:not(.drawing) {
3667
3669
  color: var(--normal-text);
3668
3670
  cursor: pointer;
3669
3671
  user-select: none;
3672
+ margin-top: 4px;
3670
3673
  }
3671
3674
 
3672
3675
  .label-panel-action-btn:hover:not(.disabled) {
@@ -3685,6 +3688,16 @@ body.pan.panning .map-layers:not(.drawing) {
3685
3688
  gap: 4px 6px;
3686
3689
  }
3687
3690
 
3691
+ /* In the narrow column beside the fill's colour, level with it and as wide
3692
+ as the fields in that column. */
3693
+ .label-split-cell > .layer-palettes-btn {
3694
+ display: flex;
3695
+ justify-content: center;
3696
+ width: 100%;
3697
+ margin-top: 0;
3698
+ white-space: nowrap;
3699
+ }
3700
+
3688
3701
  .label-style-panel .label-color-field {
3689
3702
  display: flex;
3690
3703
  align-items: center;
@@ -3755,10 +3768,6 @@ body.pan.panning .map-layers:not(.drawing) {
3755
3768
  border-radius: 0;
3756
3769
  }
3757
3770
 
3758
- .label-color-row .label-color-picker input[type="text"] {
3759
- width: 45px;
3760
- }
3761
-
3762
3771
  .label-css-row input {
3763
3772
  width: 100%;
3764
3773
  box-sizing: border-box;
@@ -3805,6 +3814,13 @@ body.pan.panning .map-layers:not(.drawing) {
3805
3814
  box-shadow: 0 1px 7px rgba(0,0,0,0.18);
3806
3815
  }
3807
3816
 
3817
+ /* A style panel is a stacking context, below the floating toolbars (25), so a
3818
+ picker that opens low enough to reach them would be drawn under them. The
3819
+ panel comes forward while one of its pickers is open. */
3820
+ .label-style-panel.color-picker-open {
3821
+ z-index: 26;
3822
+ }
3823
+
3808
3824
  .label-color-picker canvas {
3809
3825
  display: block;
3810
3826
  width: 256px;
@@ -3873,27 +3889,24 @@ body.dragging-color-picker * {
3873
3889
  margin-top: 6px;
3874
3890
  }
3875
3891
 
3876
- .label-color-picker-fields label {
3877
- display: inline-flex;
3878
- align-items: center;
3879
- gap: 3px;
3880
- margin: 0;
3881
- color: #555;
3882
- }
3883
-
3884
- .label-color-picker-fields span {
3885
- display: inline;
3886
- margin: 0;
3887
- color: #555;
3888
- }
3889
-
3890
- .label-color-picker-fields input {
3891
- width: 34px;
3892
+ /* Like the panels' own buttons (.label-panel-action-btn) */
3893
+ .label-color-picker-fields button {
3892
3894
  box-sizing: border-box;
3895
+ height: var(--label-field-height, 22px);
3896
+ margin: 0 0 0 auto;
3897
+ padding: 0 8px;
3898
+ border: 1px solid var(--label-field-border, #c6c6c6);
3899
+ border-radius: var(--label-field-radius, 4px);
3900
+ background-color: white;
3901
+ box-shadow: none;
3902
+ font: inherit;
3903
+ font-size: 12px;
3904
+ color: var(--normal-text);
3905
+ cursor: pointer;
3893
3906
  }
3894
3907
 
3895
- .label-color-picker-fields button {
3896
- margin-left: auto;
3908
+ .label-color-picker-fields button:hover {
3909
+ background-color: #f0f0f0;
3897
3910
  }
3898
3911
 
3899
3912
  .label-style-selection-row {
@@ -3994,7 +4007,8 @@ body.dragging-color-picker * {
3994
4007
 
3995
4008
  /* Words, like the label panel's Fixed/Draggable, but splitting the group
3996
4009
  evenly so that it lines up with the shapes above. */
3997
- .layer-style-panel .layer-arrow-position-buttons .label-panel-btn {
4010
+ .layer-style-panel .layer-arrow-position-buttons .label-panel-btn,
4011
+ .layer-style-panel .layer-cap-buttons .label-panel-btn {
3998
4012
  display: flex;
3999
4013
  align-items: center;
4000
4014
  justify-content: center;
@@ -4350,6 +4364,12 @@ body.dragging-color-picker * {
4350
4364
  pointer-events: none;
4351
4365
  }
4352
4366
 
4367
+ /* Undo/redo stays at the bottom, below any mode toolbar, whichever toolbar
4368
+ happened to be created first. */
4369
+ .floating-toolbar-stack > .edit-toolbar {
4370
+ order: -1;
4371
+ }
4372
+
4353
4373
  .floating-toolbar {
4354
4374
  pointer-events: auto;
4355
4375
  display: flex;
@@ -4651,3 +4671,414 @@ body.dragging-color-picker * {
4651
4671
  .simplify-control .clicktext:focus {
4652
4672
  background: #fff;
4653
4673
  }
4674
+
4675
+ /* Color scheme panel (gui-color-scheme-panel.mjs): it opens in the polygon
4676
+ style panel's place, which is hidden until it closes. */
4677
+ .layer-style-panel.replaced {
4678
+ display: none;
4679
+ }
4680
+
4681
+ .color-scheme-note {
4682
+ font-size: 11px;
4683
+ line-height: 1.3;
4684
+ color: #555;
4685
+ }
4686
+
4687
+ .label-style-panel .color-scheme-select-row > span {
4688
+ margin-bottom: 2px;
4689
+ }
4690
+
4691
+ .color-scheme-palette-cell {
4692
+ position: relative;
4693
+ }
4694
+
4695
+ .color-scheme-palette-btn {
4696
+ display: flex;
4697
+ align-items: center;
4698
+ gap: 6px;
4699
+ box-sizing: border-box;
4700
+ height: var(--label-field-height);
4701
+ padding: 0 20px 0 4px;
4702
+ border: 1px solid var(--label-field-border);
4703
+ border-radius: var(--label-field-radius);
4704
+ background: white var(--label-menu-chevron) no-repeat right 6px center / 10px 7px;
4705
+ cursor: pointer;
4706
+ user-select: none;
4707
+ }
4708
+
4709
+ /* The background stops at the border: a gradient repeats under a border,
4710
+ which would show the first color along the far edge. */
4711
+ .color-scheme-strip {
4712
+ flex: none;
4713
+ width: 48px;
4714
+ height: 12px;
4715
+ border: 1px solid rgba(0,0,0,0.15);
4716
+ background-clip: padding-box;
4717
+ }
4718
+
4719
+ .label-style-panel .color-scheme-palette-btn > span,
4720
+ .label-style-panel .color-scheme-palette-item > span {
4721
+ display: inline;
4722
+ overflow: hidden;
4723
+ text-overflow: ellipsis;
4724
+ white-space: nowrap;
4725
+ font-size: 12px;
4726
+ color: var(--normal-text);
4727
+ }
4728
+
4729
+ .color-scheme-palette-menu {
4730
+ position: absolute;
4731
+ z-index: 2;
4732
+ top: 100%;
4733
+ left: 0;
4734
+ right: -84px;
4735
+ max-height: 260px;
4736
+ overflow-y: auto;
4737
+ margin-top: 2px;
4738
+ padding: 3px 0;
4739
+ background: white;
4740
+ border: 1px solid #ccc;
4741
+ border-radius: var(--label-field-radius);
4742
+ box-shadow: 0 2px 8px rgba(0,0,0,0.15);
4743
+ }
4744
+
4745
+ .color-scheme-palette-item {
4746
+ display: flex;
4747
+ align-items: center;
4748
+ gap: 8px;
4749
+ padding: 3px 8px;
4750
+ cursor: pointer;
4751
+ }
4752
+
4753
+ .color-scheme-palette-item:hover {
4754
+ background-color: #f0f0f0;
4755
+ }
4756
+
4757
+ .color-scheme-palette-item.selected {
4758
+ background-color: var(--lt-theme-col);
4759
+ }
4760
+
4761
+ .color-scheme-tile-row {
4762
+ margin-top: 10px;
4763
+ }
4764
+
4765
+ .color-scheme-tiles {
4766
+ position: relative;
4767
+ display: flex;
4768
+ gap: 3px;
4769
+ }
4770
+
4771
+ /* Where a dragged categorical swatch would go */
4772
+ .color-scheme-drop-marker {
4773
+ position: absolute;
4774
+ z-index: 1;
4775
+ width: 2px;
4776
+ margin-left: -0.5px;
4777
+ background-color: #000;
4778
+ pointer-events: none;
4779
+ }
4780
+
4781
+ .color-scheme-tiles.dragging .color-scheme-tile {
4782
+ cursor: grabbing;
4783
+ }
4784
+
4785
+ .color-scheme-tiles.dragging .color-scheme-tile:hover::after {
4786
+ display: none;
4787
+ }
4788
+
4789
+ .color-scheme-tile-cell.drag-source .color-scheme-tile {
4790
+ opacity: 0.35;
4791
+ }
4792
+
4793
+ .color-scheme-tiles.two-rows {
4794
+ flex-wrap: wrap;
4795
+ row-gap: 7px;
4796
+ }
4797
+
4798
+ .color-scheme-tiles.two-rows > .color-scheme-tile-cell {
4799
+ flex: none;
4800
+ width: calc((100% - (var(--tiles-per-row) - 1) * 3px) / var(--tiles-per-row));
4801
+ }
4802
+
4803
+ /* The pins' tooltips are placed against the cell, which ends at the pin */
4804
+ .color-scheme-tile-cell {
4805
+ position: relative;
4806
+ flex: 1;
4807
+ min-width: 0;
4808
+ }
4809
+
4810
+ .color-scheme-tile {
4811
+ position: relative;
4812
+ height: 26px;
4813
+ border-radius: 3px;
4814
+ box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
4815
+ cursor: pointer;
4816
+ touch-action: none;
4817
+ user-select: none;
4818
+ }
4819
+
4820
+ .color-scheme-tile.selected {
4821
+ box-shadow: 0 0 0 2px #000;
4822
+ }
4823
+
4824
+ /* A continuous ramp: the gradient over half-height tiles, which are its
4825
+ color stops. The script places each gradient over its tiles. */
4826
+ .color-scheme-gradient {
4827
+ position: relative;
4828
+ height: 12px;
4829
+ margin-bottom: 4px;
4830
+ }
4831
+
4832
+ .color-scheme-gradient-segment {
4833
+ position: absolute;
4834
+ top: 0;
4835
+ height: 100%;
4836
+ border-radius: 3px;
4837
+ box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
4838
+ }
4839
+
4840
+ .color-scheme-tiles.continuous .color-scheme-tile {
4841
+ height: 14px;
4842
+ }
4843
+
4844
+ /* A dot under each color the user set between the ends of a ramp; the ends
4845
+ are always pinned, so they have no dot. */
4846
+ .color-scheme-pin {
4847
+ width: 7px;
4848
+ height: 7px;
4849
+ margin: 4px auto 0;
4850
+ border-radius: 50%;
4851
+ }
4852
+
4853
+ .color-scheme-pin.pinned {
4854
+ background: #222;
4855
+ cursor: pointer;
4856
+ }
4857
+
4858
+ .label-color-picker-fields input.label-color-picker-input {
4859
+ flex: 1;
4860
+ width: auto;
4861
+ min-width: 0;
4862
+ font-family: Menlo, Consolas, monospace;
4863
+ font-size: 11.5px;
4864
+ }
4865
+
4866
+ /* Format tabs over a picker's color field, and the color palette panel's
4867
+ scheme types: a segmented control on a grey well, the chosen tab drawn like
4868
+ the panels' fields and buttons. */
4869
+ .label-color-format-tabs,
4870
+ .color-scheme-tabs {
4871
+ display: flex;
4872
+ margin-top: 6px;
4873
+ border-radius: var(--label-field-radius, 4px);
4874
+ background-color: #f0f0f0;
4875
+ }
4876
+
4877
+ .label-color-picker .label-color-format-tab,
4878
+ .color-scheme-tabs .color-scheme-tab {
4879
+ flex: 1;
4880
+ min-width: 0;
4881
+ box-sizing: border-box;
4882
+ height: var(--label-field-height, 22px);
4883
+ margin: 0;
4884
+ padding: 0 4px;
4885
+ border: 1px solid transparent;
4886
+ border-radius: var(--label-field-radius, 4px);
4887
+ background: transparent;
4888
+ box-shadow: none;
4889
+ font: inherit;
4890
+ font-size: 12px;
4891
+ color: #777;
4892
+ cursor: pointer;
4893
+ }
4894
+
4895
+ .label-color-picker .label-color-format-tab:hover:not(.selected),
4896
+ .color-scheme-tabs .color-scheme-tab:hover:not(.selected) {
4897
+ color: var(--normal-text);
4898
+ }
4899
+
4900
+ .label-color-picker .label-color-format-tab.selected,
4901
+ .color-scheme-tabs .color-scheme-tab.selected {
4902
+ border-color: var(--label-field-border, #c6c6c6);
4903
+ background-color: white;
4904
+ color: var(--normal-text);
4905
+ cursor: default;
4906
+ }
4907
+
4908
+ /* In the style panel, the scheme's colors take the place of the fill's swatch
4909
+ and hex value. */
4910
+ .label-style-panel .label-color-field.has-scheme .label-color-chit,
4911
+ .label-style-panel .label-color-field.has-scheme .label-color-input {
4912
+ display: none;
4913
+ }
4914
+
4915
+ .layer-scheme-strip {
4916
+ display: none;
4917
+ flex: 1;
4918
+ align-items: center;
4919
+ gap: 4px;
4920
+ min-width: 0;
4921
+ height: 100%;
4922
+ cursor: pointer;
4923
+ }
4924
+
4925
+ .label-color-field.has-scheme .layer-scheme-strip {
4926
+ display: flex;
4927
+ }
4928
+
4929
+ .layer-scheme-colors {
4930
+ flex: 1;
4931
+ height: 13px;
4932
+ border: 1px solid rgba(0,0,0,0.22);
4933
+ background-clip: padding-box;
4934
+ }
4935
+
4936
+ .layer-scheme-remove {
4937
+ flex: none;
4938
+ padding: 0 2px;
4939
+ font-size: 14px;
4940
+ line-height: 1;
4941
+ color: #777;
4942
+ }
4943
+
4944
+ .layer-scheme-remove:hover {
4945
+ color: #000;
4946
+ }
4947
+
4948
+ .layer-palettes-btn.selected {
4949
+ background-color: var(--lt-theme-col);
4950
+ }
4951
+
4952
+ .color-scheme-slider-row:not(.hidden) {
4953
+ display: flex;
4954
+ align-items: center;
4955
+ gap: 5px;
4956
+ }
4957
+
4958
+ .color-scheme-tile-row + .color-scheme-slider-row {
4959
+ margin-top: 6px;
4960
+ }
4961
+
4962
+ .color-scheme-slider-label,
4963
+ .color-scheme-hint-label {
4964
+ position: relative;
4965
+ flex: none;
4966
+ cursor: default;
4967
+ }
4968
+
4969
+ .color-scheme-slider-row input[type=range] {
4970
+ flex: 1;
4971
+ min-width: 0;
4972
+ margin: 0 5px 0 2px;
4973
+ accent-color: var(--theme-col);
4974
+ }
4975
+
4976
+ /* Presets have only the reverse button in the vibrance row */
4977
+ .color-scheme-slider-row.preset {
4978
+ justify-content: flex-end;
4979
+ }
4980
+
4981
+ .color-scheme-slider-row.preset > :not(.color-scheme-icon-btn),
4982
+ .color-scheme-slider-row.preset > .long-hue-btn {
4983
+ display: none;
4984
+ }
4985
+
4986
+ .color-scheme-icon-btn {
4987
+ position: relative;
4988
+ flex: none;
4989
+ display: inline-flex;
4990
+ align-items: center;
4991
+ justify-content: center;
4992
+ box-sizing: border-box;
4993
+ width: var(--label-field-height, 22px);
4994
+ height: var(--label-field-height, 22px);
4995
+ padding: 0;
4996
+ border: 1px solid var(--label-field-border);
4997
+ border-radius: var(--label-field-radius, 4px);
4998
+ background-color: white;
4999
+ color: var(--normal-text);
5000
+ font: inherit;
5001
+ cursor: pointer;
5002
+ }
5003
+
5004
+ .label-style-row .color-scheme-icon-btn {
5005
+ margin-right: 0;
5006
+ }
5007
+
5008
+ .color-scheme-icon-btn:hover {
5009
+ background-color: #f0f0f0;
5010
+ }
5011
+
5012
+ .color-scheme-icon-btn.selected {
5013
+ background-color: var(--lt-theme-col);
5014
+ }
5015
+
5016
+ /* A bar under the categorical swatches in use, joined across the gaps
5017
+ between them; diverging tiles have one under the tiles their classes use,
5018
+ above the pin dots */
5019
+ .color-scheme-pin.used,
5020
+ .color-scheme-bar.used {
5021
+ width: 100%;
5022
+ height: 3px;
5023
+ margin: 4px 0 0;
5024
+ border-radius: 0;
5025
+ background-color: #333;
5026
+ }
5027
+
5028
+ .color-scheme-pin.used.joined,
5029
+ .color-scheme-bar.used.joined {
5030
+ width: calc(100% + 3px);
5031
+ }
5032
+
5033
+ .color-scheme-bar {
5034
+ height: 3px;
5035
+ margin-top: 4px;
5036
+ }
5037
+
5038
+ .color-scheme-bar + .color-scheme-pin {
5039
+ margin-top: 2px;
5040
+ }
5041
+
5042
+ /* The pivot class switch, level with the select beside it */
5043
+ .color-scheme-toggle-line {
5044
+ display: flex;
5045
+ align-items: center;
5046
+ height: var(--label-field-height);
5047
+ }
5048
+
5049
+ /* Under an interpolated tile whose color was moved to fit the sRGB gamut,
5050
+ in place of a pin dot */
5051
+ .color-scheme-pin.adjusted {
5052
+ width: 0;
5053
+ height: 0;
5054
+ border-radius: 0;
5055
+ border-left: 4px solid transparent;
5056
+ border-right: 4px solid transparent;
5057
+ border-bottom: 7px solid #dd5555;
5058
+ }
5059
+
5060
+ /* In the floating toolbar's tooltip style, below the pins so as not to cover
5061
+ the tiles. A newline in the text breaks the line. --tooltip-shift is set
5062
+ on hover to keep the tooltip inside the window; the script reads the
5063
+ tooltip's width, so it is sized as a border box. */
5064
+ .color-scheme-pin[data-tooltip]:hover::after,
5065
+ .color-scheme-tile[data-tooltip]:hover::after,
5066
+ .color-scheme-slider-label[data-tooltip]:hover::after,
5067
+ .color-scheme-hint-label[data-tooltip]:hover::after,
5068
+ .color-scheme-icon-btn[data-tooltip]:hover::after {
5069
+ content: attr(data-tooltip);
5070
+ box-sizing: border-box;
5071
+ position: absolute;
5072
+ top: calc(100% + 5px);
5073
+ left: 50%;
5074
+ transform: translateX(calc(-50% + var(--tooltip-shift, 0px)));
5075
+ background-color: rgba(40, 40, 40, 0.92);
5076
+ color: #fff;
5077
+ font-size: 11px;
5078
+ line-height: 1.3;
5079
+ white-space: pre;
5080
+ padding: 5px 7px;
5081
+ border-radius: 4px;
5082
+ pointer-events: none;
5083
+ z-index: 1;
5084
+ }