mapshaper 0.7.62 → 0.7.64

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
@@ -1284,6 +1284,26 @@ body.simplify .layer-control-btn {
1284
1284
  cursor: pointer;
1285
1285
  }
1286
1286
 
1287
+ .map-frame-section {
1288
+ border-top: 1px solid #ddd;
1289
+ margin-top: 8px;
1290
+ padding-top: 7px;
1291
+ }
1292
+
1293
+ .map-frame-heading h3 {
1294
+ margin: 0 0 1px 0;
1295
+ }
1296
+
1297
+ .map-frame-list .layer-item {
1298
+ cursor: pointer;
1299
+ }
1300
+
1301
+ .map-frame-empty {
1302
+ cursor: pointer;
1303
+ font-size: 12px;
1304
+ padding: 7px 4px 4px;
1305
+ }
1306
+
1287
1307
  .pin-all img,
1288
1308
  .layer-item img
1289
1309
  {
@@ -2046,6 +2066,41 @@ body.pan.panning .map-layers:not(.drawing) {
2046
2066
  overflow: visible;
2047
2067
  }
2048
2068
 
2069
+ .map-layers > svg.preview-overlay {
2070
+ top: 0;
2071
+ left: 0;
2072
+ z-index: 15;
2073
+ pointer-events: none;
2074
+ overflow: hidden;
2075
+ }
2076
+
2077
+ .map-layers > svg.preview-background-overlay {
2078
+ top: 0;
2079
+ left: 0;
2080
+ pointer-events: none;
2081
+ overflow: hidden;
2082
+ }
2083
+
2084
+ .preview-outside-mask {
2085
+ fill: rgba(24, 28, 32, 0.38);
2086
+ fill: #999;
2087
+ fill: #000;
2088
+ opacity: 0.85;
2089
+ opacity: 0.3;
2090
+ fill-rule: evenodd;
2091
+ }
2092
+
2093
+ .preview-page-border {
2094
+ fill: none;
2095
+ stroke: rgba(30, 30, 30, 0.9);
2096
+ stroke-width: 1.5px;
2097
+ vector-effect: non-scaling-stroke;
2098
+ }
2099
+
2100
+ .preview-page-neatline {
2101
+ pointer-events: none;
2102
+ }
2103
+
2049
2104
  .ruler-line {
2050
2105
  fill: none;
2051
2106
  stroke: #cc35a5;
@@ -2335,12 +2390,12 @@ body.pan.panning .map-layers:not(.drawing) {
2335
2390
  position: relative;
2336
2391
  cursor:pointer;
2337
2392
  /* padding: 3px 3px 5px 3px; */
2338
- padding: 4px 5px;
2393
+ padding: 3px 4px;
2339
2394
  line-height: 1;
2340
2395
  }
2341
2396
 
2342
2397
  .nav-btn.menu-btn {
2343
- padding-top: 3px;
2398
+ padding-top: 2px;
2344
2399
  }
2345
2400
 
2346
2401
  .nav-btn.selected {
@@ -2357,6 +2412,85 @@ body.pan.panning .map-layers:not(.drawing) {
2357
2412
  fill: white;
2358
2413
  }
2359
2414
 
2415
+ .nav-btn.preview-toggle {
2416
+ align-items: center;
2417
+ box-sizing: border-box;
2418
+ display: flex;
2419
+ height: 28px;
2420
+ justify-content: center;
2421
+ margin-top: 2px;
2422
+ padding-bottom: 0;
2423
+ padding-top: 1px;
2424
+ }
2425
+
2426
+ .preview-toggle svg {
2427
+ display: block;
2428
+ height: 16px;
2429
+ transform: translateY(-1px);
2430
+ width: 16px;
2431
+ }
2432
+
2433
+ .preview-readout {
2434
+ position: absolute;
2435
+ z-index: 20;
2436
+ top: 6px;
2437
+ left: 50%;
2438
+ transform: translateX(-50%);
2439
+ background: rgba(255, 255, 255, 0.96);
2440
+ border: 1px solid #ddd;
2441
+ border-radius: 5px;
2442
+ box-shadow: 0 1px 5px rgba(0,0,0,0.12);
2443
+ color: #333;
2444
+ cursor: pointer;
2445
+ font-size: 12px;
2446
+ line-height: 15px;
2447
+ padding: 3px 7px;
2448
+ white-space: nowrap;
2449
+ }
2450
+
2451
+ .preview-readout-arrow {
2452
+ color: #777;
2453
+ font-size: 16px;
2454
+ font-weight: bold;
2455
+ line-height: 9px;
2456
+ margin-left: 6px;
2457
+ position: relative;
2458
+ top: -1px;
2459
+ }
2460
+
2461
+ .preview-scale-menu {
2462
+ position: absolute;
2463
+ z-index: 1;
2464
+ display: none;
2465
+ pointer-events: none;
2466
+ padding: 5px 0;
2467
+ background-color: white;
2468
+ top: calc(100% + 4px);
2469
+ right: 0;
2470
+ text-align: right;
2471
+ white-space: nowrap;
2472
+ border-radius: 6px;
2473
+ border: 1px solid #ddd;
2474
+ box-shadow: 0 1px 7px rgba(0,0,0,0.12);
2475
+ }
2476
+
2477
+ .preview-readout.open .preview-scale-menu {
2478
+ display: block;
2479
+ pointer-events: inherit;
2480
+ }
2481
+
2482
+ .preview-scale-menu-item {
2483
+ color: #555;
2484
+ padding: 3px 9px;
2485
+ white-space: nowrap;
2486
+ cursor: pointer;
2487
+ }
2488
+
2489
+ .preview-scale-menu-item:hover {
2490
+ color: black;
2491
+ background: var(--lt-theme-col);
2492
+ }
2493
+
2360
2494
  .label-style-panel {
2361
2495
  /* The shape of a field in every style panel: the label panel set them,
2362
2496
  and the line, polygon and circle panels are drawn from the same parts.
@@ -2401,6 +2535,178 @@ body.pan.panning .map-layers:not(.drawing) {
2401
2535
  font-size: 16px; /* close button icon */
2402
2536
  }
2403
2537
 
2538
+ .frame-properties-popup {
2539
+ width: 264px;
2540
+ }
2541
+
2542
+ .frame-properties-form.label-style-panel,
2543
+ .frame-create-form.label-style-panel {
2544
+ background: transparent;
2545
+ border: 0;
2546
+ border-radius: 0;
2547
+ box-shadow: none;
2548
+ box-sizing: border-box;
2549
+ max-height: none;
2550
+ overflow: visible;
2551
+ padding: 0;
2552
+ position: static;
2553
+ width: 100%;
2554
+ }
2555
+
2556
+ /* Three columns on the appearance rows: the neatline's width sits with the
2557
+ colour and opacity it applies to, and the background row leaves the last
2558
+ column empty rather than pushing a lone field onto a line of its own. */
2559
+ .frame-properties-form .label-split-row {
2560
+ column-gap: 8px;
2561
+ grid-template-columns: 1fr 54px 54px;
2562
+ }
2563
+
2564
+ /* Wide enough for "Aspect ratio", and fixed rather than auto so that the ratio
2565
+ at the top of the panel lines up with the details at the bottom, which are a
2566
+ separate grid. */
2567
+ .frame-property-detail-row {
2568
+ display: grid;
2569
+ font-size: 12px;
2570
+ gap: 6px;
2571
+ grid-template-columns: 66px 1fr;
2572
+ margin-top: 6px;
2573
+ }
2574
+
2575
+ .frame-property-detail-row > span:first-child {
2576
+ color: #555;
2577
+ }
2578
+
2579
+ .frame-property-detail-value {
2580
+ overflow-wrap: anywhere;
2581
+ }
2582
+
2583
+ .frame-create-popup {
2584
+ width: 264px;
2585
+ }
2586
+
2587
+ /* The field tips are drawn above the "?" that opens them, which the box's own
2588
+ overflow would clip. The dialog is three rows and two buttons and never has
2589
+ anything to scroll. */
2590
+ .alert-box.frame-create-box {
2591
+ overflow: visible;
2592
+ }
2593
+
2594
+ /* A field and the "?" beside it. The field itself is a .frame-field-row, shared
2595
+ with Frame properties, so that the dialog that creates a frame and the panel
2596
+ that edits it look like one program. The gap matches the option rows below,
2597
+ so that every field ends on the same vertical and the tips line up. */
2598
+ .frame-create-row {
2599
+ align-items: center;
2600
+ display: flex;
2601
+ gap: 8px;
2602
+ margin-top: 6px;
2603
+ }
2604
+
2605
+ .frame-create-row > .frame-field-row {
2606
+ flex: 1;
2607
+ min-width: 0;
2608
+ }
2609
+
2610
+ /* float is what the static tips in index.html are placed with; here the row is
2611
+ a flex container, which ignores it. */
2612
+ .frame-create-popup .tip-button {
2613
+ flex: none;
2614
+ float: none;
2615
+ margin-top: 0;
2616
+ margin-left: 0;
2617
+ width: 12px;
2618
+ }
2619
+
2620
+ /* The button names what it does and is as wide as its name, so the two options
2621
+ are left-aligned at a common width rather than sized by their labels. */
2622
+ .frame-create-option-row {
2623
+ align-items: center;
2624
+ display: flex;
2625
+ gap: 8px;
2626
+ margin-top: 6px;
2627
+ }
2628
+
2629
+ /* flex: none, or the margin field beside the first button shrinks it and the
2630
+ two options stop looking like peers. */
2631
+ .frame-create-option-row > .dialog-btn {
2632
+ box-sizing: border-box;
2633
+ flex: none;
2634
+ margin: 0;
2635
+ text-align: center;
2636
+ width: 130px;
2637
+ }
2638
+
2639
+ /* Stretches so that the margin field ends where the fields above it do: the
2640
+ row is shorter than they are, and a ragged right edge reads as unfinished
2641
+ rather than as deliberate grouping. */
2642
+ .frame-create-margin {
2643
+ align-items: center;
2644
+ display: flex;
2645
+ flex: 1;
2646
+ gap: 6px;
2647
+ min-width: 0; /* a flex item defaults to min-width:auto and will not shrink below its field */
2648
+ }
2649
+
2650
+ .frame-create-margin > span {
2651
+ color: #555;
2652
+ font-size: 12px;
2653
+ }
2654
+
2655
+ .frame-create-margin > input {
2656
+ box-sizing: border-box;
2657
+ flex: 1;
2658
+ min-width: 0;
2659
+ }
2660
+
2661
+ .frame-field-row {
2662
+ align-items: center;
2663
+ display: flex;
2664
+ gap: 8px;
2665
+ }
2666
+
2667
+ .frame-field-row > span {
2668
+ flex: 0 0 82px;
2669
+ }
2670
+
2671
+ .frame-field-row > input,
2672
+ .frame-field-row > select {
2673
+ flex: 1;
2674
+ min-width: 0;
2675
+ }
2676
+
2677
+ .frame-field-row > .label-panel-action-btn {
2678
+ flex: none;
2679
+ }
2680
+
2681
+ /* Two class names, because .label-style-row's display:block is declared later
2682
+ in this file and a single class would lose to it -- which is what stacked
2683
+ width and height down the panel at full width instead of pairing them. */
2684
+ .label-style-row.frame-size-row {
2685
+ align-items: end;
2686
+ display: grid;
2687
+ gap: 6px;
2688
+ grid-template-columns: 1fr 1fr 54px;
2689
+ }
2690
+
2691
+ .frame-input-cell > span {
2692
+ color: #555;
2693
+ font-size: 12px;
2694
+ }
2695
+
2696
+ .frame-input-cell > input {
2697
+ box-sizing: border-box;
2698
+ width: 100%;
2699
+ }
2700
+
2701
+ .frame-units-select {
2702
+ width: 54px;
2703
+ }
2704
+
2705
+ .export-frame-info {
2706
+ color: #555;
2707
+ font-size: 12px;
2708
+ margin: 8px 0 12px;
2709
+ }
2404
2710
 
2405
2711
  .label-style-panel select,
2406
2712
  .label-saved-style-btn {
@@ -3065,11 +3371,6 @@ body.pan.panning .map-layers:not(.drawing) {
3065
3371
  opacity: 0.45;
3066
3372
  }
3067
3373
 
3068
- .label-color-row .label-color-picker {
3069
- left: auto;
3070
- right: 0;
3071
- }
3072
-
3073
3374
  .label-color-row .label-color-picker input[type="text"] {
3074
3375
  width: 45px;
3075
3376
  }
@@ -3109,11 +3410,14 @@ body.pan.panning .map-layers:not(.drawing) {
3109
3410
  color: #555;
3110
3411
  }
3111
3412
 
3413
+ /* Fixed rather than absolute so that a panel inside a scrolling box cannot trap
3414
+ the picker: Frame properties lives in an .alert-box that scrolls its
3415
+ overflow, which clipped the picker into the panel instead of letting it float
3416
+ over it. ColorPicker sets top/left from the field it belongs to when it
3417
+ opens. */
3112
3418
  .label-color-picker {
3113
- position: absolute;
3419
+ position: fixed;
3114
3420
  z-index: 25;
3115
- top: 48px;
3116
- right: 0;
3117
3421
  padding: 8px;
3118
3422
  background: white;
3119
3423
  border: 1px solid #ddd;
@@ -3654,6 +3958,16 @@ body.dragging-color-picker * {
3654
3958
  height: 24px;
3655
3959
  }
3656
3960
 
3961
+ .floating-toolbar-btn.text-btn {
3962
+ font-size: 12px;
3963
+ padding: 0 7px;
3964
+ width: auto;
3965
+ /* The toolbar is a flex row, which would otherwise squeeze a two-word
3966
+ label onto two lines and leave the button taller than its neighbours. */
3967
+ flex: none;
3968
+ white-space: nowrap;
3969
+ }
3970
+
3657
3971
  .floating-toolbar-btn svg * {
3658
3972
  fill: var(--theme-col);
3659
3973
  transition: fill 100ms ease;
@@ -3680,6 +3994,21 @@ body.dragging-color-picker * {
3680
3994
  fill: #166689;
3681
3995
  }
3682
3996
 
3997
+ /* An icon button's blue wash goes with its themed icon, but a text button is
3998
+ grey and takes the grey the panels' action buttons use. A selected button
3999
+ keeps its own background while hovered rather than flashing back to grey. */
4000
+ .floating-toolbar-btn.text-btn:hover:not(.disabled):not(.selected) {
4001
+ background-color: #f0f0f0;
4002
+ }
4003
+
4004
+ .floating-toolbar-btn.text-btn:active:not(.disabled):not(.selected) {
4005
+ background-color: #e5e5e5;
4006
+ }
4007
+
4008
+ .floating-toolbar-btn.text-btn.selected {
4009
+ background-color: #e5e5e5;
4010
+ }
4011
+
3683
4012
  .floating-toolbar-btn.disabled {
3684
4013
  cursor: default;
3685
4014
  }
@@ -3688,8 +4017,83 @@ body.dragging-color-picker * {
3688
4017
  fill: #b8c4ca;
3689
4018
  }
3690
4019
 
3691
- /* Tooltip shown above the button on hover */
3692
- .floating-toolbar-btn[data-tooltip]:hover:not(.disabled)::after {
4020
+ /* A captioned control: a segmented mode switch or a short typed value. The
4021
+ caption is what lets the control be read at a glance, so it is always shown
4022
+ rather than hidden behind a tooltip. */
4023
+ .floating-toolbar-group {
4024
+ position: relative;
4025
+ display: flex;
4026
+ align-items: center;
4027
+ flex: none;
4028
+ gap: 5px;
4029
+ margin: 0 4px;
4030
+ }
4031
+
4032
+ .floating-toolbar-caption {
4033
+ font-size: 12px;
4034
+ color: #808080;
4035
+ white-space: nowrap;
4036
+ user-select: none;
4037
+ }
4038
+
4039
+ /* Both modes stay visible inside a single outlined well, so the lit one reads
4040
+ as the current state rather than as the result of clicking. */
4041
+ .floating-toolbar-segments {
4042
+ display: flex;
4043
+ align-items: center;
4044
+ background-color: #f0f0f0;
4045
+ border-radius: 6px;
4046
+ padding: 2px;
4047
+ gap: 2px;
4048
+ }
4049
+
4050
+ .floating-toolbar-segments .floating-toolbar-btn {
4051
+ height: 22px;
4052
+ border-radius: 4px;
4053
+ }
4054
+
4055
+ /* A segment sits on the well rather than on the toolbar, so its hover has to
4056
+ darken past the well's own grey to register. */
4057
+ .floating-toolbar-segments .floating-toolbar-btn:hover:not(.disabled):not(.selected) {
4058
+ background-color: #e4e4e4;
4059
+ }
4060
+
4061
+ .floating-toolbar-segments .floating-toolbar-btn.selected {
4062
+ background-color: #fff;
4063
+ color: #166689;
4064
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
4065
+ }
4066
+
4067
+ .floating-toolbar-field {
4068
+ cursor: default;
4069
+ }
4070
+
4071
+ .floating-toolbar-field input[type=text] {
4072
+ width: 48px;
4073
+ height: 22px;
4074
+ box-sizing: border-box;
4075
+ font-size: 12px;
4076
+ padding: 0 5px;
4077
+ border: 1px solid #ddd;
4078
+ border-radius: 4px;
4079
+ background-color: #fff;
4080
+ color: var(--dark-text-col);
4081
+ -webkit-appearance: none;
4082
+ appearance: none;
4083
+ outline: none;
4084
+ }
4085
+
4086
+ /* The same flat focus as the panels: the border turns gold and the global
4087
+ input rule's glow is suppressed. */
4088
+ .floating-toolbar-field input[type=text]:focus {
4089
+ border-color: #d3aa00;
4090
+ box-shadow: none;
4091
+ outline: none;
4092
+ }
4093
+
4094
+ /* Tooltip shown above the button (or captioned control) on hover */
4095
+ .floating-toolbar-btn[data-tooltip]:hover:not(.disabled)::after,
4096
+ .floating-toolbar-group[data-tooltip]:hover::after {
3693
4097
  content: attr(data-tooltip);
3694
4098
  position: absolute;
3695
4099
  bottom: calc(100% + 8px);