@openhistoricalmap/map-styles 0.9.14 → 0.9.16

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.
@@ -0,0 +1,70 @@
1
+ name: Release to npm
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ bump:
7
+ description: 'Version bump'
8
+ type: choice
9
+ options:
10
+ - patch
11
+ - minor
12
+ - major
13
+ default: patch
14
+
15
+ concurrency:
16
+ group: release
17
+ cancel-in-progress: false
18
+
19
+ jobs:
20
+ release:
21
+ if: github.ref_name == 'staging'
22
+ runs-on: ubuntu-latest
23
+ permissions:
24
+ contents: write
25
+ id-token: write
26
+ steps:
27
+ - name: Verify staging branch
28
+ run: |
29
+ if [ "${{ github.ref_name }}" != "staging" ]; then
30
+ echo "::error::Releases can only be triggered from the 'staging' branch (got: ${{ github.ref_name }})"
31
+ exit 1
32
+ fi
33
+
34
+ - uses: actions/checkout@v4
35
+ with:
36
+ ref: staging
37
+ fetch-depth: 0
38
+
39
+ - uses: actions/setup-node@v4
40
+ with:
41
+ node-version-file: '.nvmrc'
42
+ registry-url: 'https://registry.npmjs.org'
43
+
44
+ - name: Upgrade npm (required for Trusted Publishers)
45
+ run: npm install -g npm@latest
46
+
47
+ - run: npm ci
48
+
49
+ - name: Configure git identity
50
+ run: |
51
+ git config user.name "github-actions[bot]"
52
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
53
+
54
+ - name: Bump version, rebuild /dist, commit and tag
55
+ run: |
56
+ NEW_VERSION=$(npm version ${{ inputs.bump }} --no-git-tag-version)
57
+ NEW_VERSION="${NEW_VERSION#v}"
58
+ npm run build
59
+ git add package.json package-lock.json dist/
60
+ git commit -m "Packaging ${NEW_VERSION} with rebuilt /dist"
61
+ git tag -a "v${NEW_VERSION}" -m "v${NEW_VERSION}"
62
+ echo "NEW_VERSION=${NEW_VERSION}" >> "$GITHUB_ENV"
63
+
64
+ - name: Push to GitHub
65
+ run: |
66
+ git push origin staging
67
+ git push origin "v${NEW_VERSION}"
68
+
69
+ - name: Publish to npm with provenance
70
+ run: npm publish --provenance --access public
@@ -0,0 +1,25 @@
1
+ name: Validate build
2
+
3
+ on:
4
+ push:
5
+ branches-ignore:
6
+ - staging
7
+
8
+ jobs:
9
+ validate:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version-file: '.nvmrc'
17
+ registry-url: 'https://registry.npmjs.org'
18
+
19
+ - run: npm ci
20
+
21
+ - name: Build /dist
22
+ run: npm run build
23
+
24
+ - name: Validate npm package (dry-run)
25
+ run: npm publish --dry-run
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v22.13.0
1
+ v22.22.3
package/README.md CHANGED
@@ -70,6 +70,27 @@ Miscellaneous notes:
70
70
 
71
71
  ## Versioning and publishing to npm
72
72
 
73
+ Releases are **manually triggered** via the [Release to npm](https://github.com/OpenHistoricalMap/map-styles/actions/workflows/release.yml) GitHub Action. Authentication uses npm [Trusted Publishers](https://docs.npmjs.com/trusted-publishers) (OIDC) — no tokens required.
74
+
75
+ ### How to release
76
+
77
+ 1. Make sure your changes are merged into `staging` (PRs are validated automatically by [`validate.yml`](.github/workflows/validate.yml) on every push).
78
+ 2. Go to [Actions → "Release to npm" → Run workflow](https://github.com/OpenHistoricalMap/map-styles/actions/workflows/release.yml).
79
+ 3. Pick the branch `staging` and the bump type (`patch` / `minor` / `major`), then click **Run workflow**.
80
+ 4. The workflow rebuilds `/dist`, creates a single commit `Packaging X.Y.Z with rebuilt /dist`, tags it `vX.Y.Z`, pushes to `staging`, and publishes to npm with verified provenance.
81
+ 5. Update the OHM properties that depend on `map-styles`. For `ohm-website`, [Dependabot](https://docs.github.com/en/code-security/dependabot) runs daily and will automatically open a PR bumping the `yarn.lock` within ~24 hours of the publish — just review and merge it. The manual fallback steps are documented in the [ohm-website](#ohm-website) section below.
82
+
83
+ ### Why manual?
84
+
85
+ Manual triggering lets us:
86
+ - Batch multiple PRs into a single release (no version churn).
87
+ - Choose `patch` / `minor` / `major` per release.
88
+ - Avoid publishing on irrelevant changes (README edits, refactors, etc.).
89
+
90
+ ### Manual fallback (without the workflow)
91
+
92
+ If the GitHub Action is unavailable, the release can be done locally:
93
+
73
94
  1. increment the version in `package.json`, e.g., `0.9.7`
74
95
  1. commit your style changes, including `/dist/*` & `package.json`, push to GitHub, and [create a corresponding release](https://github.com/OpenHistoricalMap/map-styles/releases/new), e.g., `v0.9.7`
75
96
  1. publish to npm using `npm publish`
@@ -844,7 +844,6 @@
844
844
  [
845
845
  "literal",
846
846
  [
847
- "grave_yard",
848
847
  "picnic_site",
849
848
  "camp_site",
850
849
  "playground",
@@ -873,8 +872,6 @@
873
872
  "get",
874
873
  "type"
875
874
  ],
876
- "grave_yard",
877
- "rgba(214, 222, 210, 1)",
878
875
  "picnic_site",
879
876
  "rgba(208, 220, 174, 1)",
880
877
  "camp_site",
@@ -914,6 +911,34 @@
914
911
  ]
915
912
  }
916
913
  },
914
+ {
915
+ "id": "landuse_areas_cemetery_pattern",
916
+ "type": "fill",
917
+ "source": "ohm",
918
+ "source-layer": "landuse_areas",
919
+ "minzoom": 11,
920
+ "maxzoom": 24,
921
+ "filter": [
922
+ "in",
923
+ [
924
+ "get",
925
+ "type"
926
+ ],
927
+ [
928
+ "literal",
929
+ [
930
+ "cemetery"
931
+ ]
932
+ ]
933
+ ],
934
+ "layout": {
935
+ "visibility": "visible"
936
+ },
937
+ "paint": {
938
+ "fill-pattern": "cross_space_18px",
939
+ "fill-opacity": 0.3
940
+ }
941
+ },
917
942
  {
918
943
  "id": "parking_lots",
919
944
  "type": "fill",
@@ -1094,7 +1119,8 @@
1094
1119
  "literal",
1095
1120
  [
1096
1121
  "school",
1097
- "university"
1122
+ "university",
1123
+ "grave_yard"
1098
1124
  ]
1099
1125
  ]
1100
1126
  ],
@@ -1102,7 +1128,39 @@
1102
1128
  "visibility": "visible"
1103
1129
  },
1104
1130
  "paint": {
1105
- "fill-color": "rgba(226, 214, 205, 1)"
1131
+ "fill-color": [
1132
+ "match",
1133
+ [
1134
+ "get",
1135
+ "type"
1136
+ ],
1137
+ "grave_yard",
1138
+ "rgba(214, 222, 210, 1)",
1139
+ "rgba(226, 214, 205, 1)"
1140
+ ]
1141
+ }
1142
+ },
1143
+ {
1144
+ "id": "amenity_areas_grave_yard_pattern",
1145
+ "type": "fill",
1146
+ "source": "ohm",
1147
+ "source-layer": "amenity_areas",
1148
+ "minzoom": 11,
1149
+ "maxzoom": 24,
1150
+ "filter": [
1151
+ "==",
1152
+ [
1153
+ "get",
1154
+ "type"
1155
+ ],
1156
+ "grave_yard"
1157
+ ],
1158
+ "layout": {
1159
+ "visibility": "visible"
1160
+ },
1161
+ "paint": {
1162
+ "fill-pattern": "grave_yard_space_18px",
1163
+ "fill-opacity": 0.3
1106
1164
  }
1107
1165
  },
1108
1166
  {
@@ -1566,7 +1624,7 @@
1566
1624
  "id": "water_lines_cliff_line",
1567
1625
  "type": "line",
1568
1626
  "source": "ohm",
1569
- "source-layer": "water_lines",
1627
+ "source-layer": "natural_lines",
1570
1628
  "minzoom": 15,
1571
1629
  "maxzoom": 24,
1572
1630
  "filter": [
@@ -1608,7 +1666,7 @@
1608
1666
  "id": "water_lines_cliff_line_triangles",
1609
1667
  "type": "line",
1610
1668
  "source": "ohm",
1611
- "source-layer": "water_lines",
1669
+ "source-layer": "natural_lines",
1612
1670
  "minzoom": 15,
1613
1671
  "maxzoom": 24,
1614
1672
  "filter": [
@@ -1652,7 +1710,7 @@
1652
1710
  "id": "water_lines_waterfall_triangle",
1653
1711
  "type": "line",
1654
1712
  "source": "ohm",
1655
- "source-layer": "water_lines",
1713
+ "source-layer": "natural_lines",
1656
1714
  "minzoom": 15,
1657
1715
  "maxzoom": 24,
1658
1716
  "filter": [
@@ -2582,7 +2640,7 @@
2582
2640
  "type": "line",
2583
2641
  "source": "ohm",
2584
2642
  "source-layer": "transport_lines",
2585
- "minzoom": 5,
2643
+ "minzoom": 6,
2586
2644
  "maxzoom": 20,
2587
2645
  "filter": [
2588
2646
  "all",
@@ -2819,7 +2877,7 @@
2819
2877
  "type": "line",
2820
2878
  "source": "ohm",
2821
2879
  "source-layer": "transport_lines",
2822
- "minzoom": 5,
2880
+ "minzoom": 6,
2823
2881
  "maxzoom": 20,
2824
2882
  "filter": [
2825
2883
  "all",
@@ -3345,12 +3403,16 @@
3345
3403
  "construction"
3346
3404
  ],
3347
3405
  [
3348
- "==",
3406
+ "!=",
3349
3407
  [
3350
- "get",
3351
- "bridge"
3408
+ "coalesce",
3409
+ [
3410
+ "get",
3411
+ "bridge"
3412
+ ],
3413
+ 0
3352
3414
  ],
3353
- 0
3415
+ 1
3354
3416
  ],
3355
3417
  [
3356
3418
  "==",
@@ -3402,12 +3464,16 @@
3402
3464
  "construction"
3403
3465
  ],
3404
3466
  [
3405
- "==",
3467
+ "!=",
3406
3468
  [
3407
- "get",
3408
- "bridge"
3469
+ "coalesce",
3470
+ [
3471
+ "get",
3472
+ "bridge"
3473
+ ],
3474
+ 0
3409
3475
  ],
3410
- 0
3476
+ 1
3411
3477
  ],
3412
3478
  [
3413
3479
  "in",
@@ -5607,7 +5673,7 @@
5607
5673
  "type": "line",
5608
5674
  "source": "ohm",
5609
5675
  "source-layer": "transport_lines",
5610
- "minzoom": 9,
5676
+ "minzoom": 6,
5611
5677
  "maxzoom": 20,
5612
5678
  "filter": [
5613
5679
  "all",
@@ -5812,7 +5878,7 @@
5812
5878
  "type": "line",
5813
5879
  "source": "ohm",
5814
5880
  "source-layer": "transport_lines",
5815
- "minzoom": 5,
5881
+ "minzoom": 6,
5816
5882
  "maxzoom": 20,
5817
5883
  "filter": [
5818
5884
  "all",
@@ -7486,7 +7552,19 @@
7486
7552
  "line-join": "round"
7487
7553
  },
7488
7554
  "paint": {
7489
- "line-color": "#ffffff",
7555
+ "line-color": [
7556
+ "interpolate",
7557
+ [
7558
+ "linear"
7559
+ ],
7560
+ [
7561
+ "zoom"
7562
+ ],
7563
+ 10,
7564
+ "rgba(240, 240, 240, 1)",
7565
+ 12,
7566
+ "#ffffff"
7567
+ ],
7490
7568
  "line-width": [
7491
7569
  "interpolate",
7492
7570
  [
@@ -7815,12 +7893,16 @@
7815
7893
  ]
7816
7894
  ],
7817
7895
  [
7818
- "==",
7896
+ "!=",
7819
7897
  [
7820
- "get",
7821
- "tunnel"
7898
+ "coalesce",
7899
+ [
7900
+ "get",
7901
+ "tunnel"
7902
+ ],
7903
+ 0
7822
7904
  ],
7823
- 0
7905
+ 1
7824
7906
  ]
7825
7907
  ],
7826
7908
  "layout": {
@@ -8061,12 +8143,16 @@
8061
8143
  ]
8062
8144
  ],
8063
8145
  [
8064
- "==",
8146
+ "!=",
8065
8147
  [
8066
- "get",
8067
- "tunnel"
8148
+ "coalesce",
8149
+ [
8150
+ "get",
8151
+ "tunnel"
8152
+ ],
8153
+ 0
8068
8154
  ],
8069
- 0
8155
+ 1
8070
8156
  ]
8071
8157
  ],
8072
8158
  "layout": {
@@ -8253,12 +8339,16 @@
8253
8339
  "main"
8254
8340
  ],
8255
8341
  [
8256
- "==",
8342
+ "!=",
8257
8343
  [
8258
- "get",
8259
- "tunnel"
8344
+ "coalesce",
8345
+ [
8346
+ "get",
8347
+ "tunnel"
8348
+ ],
8349
+ 0
8260
8350
  ],
8261
- 0
8351
+ 1
8262
8352
  ]
8263
8353
  ],
8264
8354
  "layout": {
@@ -8570,12 +8660,16 @@
8570
8660
  "main"
8571
8661
  ],
8572
8662
  [
8573
- "==",
8663
+ "!=",
8574
8664
  [
8575
- "get",
8576
- "tunnel"
8665
+ "coalesce",
8666
+ [
8667
+ "get",
8668
+ "tunnel"
8669
+ ],
8670
+ 0
8577
8671
  ],
8578
- 0
8672
+ 1
8579
8673
  ]
8580
8674
  ],
8581
8675
  "layout": {
@@ -8664,12 +8758,16 @@
8664
8758
  "main"
8665
8759
  ],
8666
8760
  [
8667
- "==",
8761
+ "!=",
8668
8762
  [
8669
- "get",
8670
- "tunnel"
8763
+ "coalesce",
8764
+ [
8765
+ "get",
8766
+ "tunnel"
8767
+ ],
8768
+ 0
8671
8769
  ],
8672
- 0
8770
+ 1
8673
8771
  ]
8674
8772
  ],
8675
8773
  "layout": {
@@ -8885,12 +8983,16 @@
8885
8983
  "main"
8886
8984
  ],
8887
8985
  [
8888
- "==",
8986
+ "!=",
8889
8987
  [
8890
- "get",
8891
- "tunnel"
8988
+ "coalesce",
8989
+ [
8990
+ "get",
8991
+ "tunnel"
8992
+ ],
8993
+ 0
8892
8994
  ],
8893
- 0
8995
+ 1
8894
8996
  ]
8895
8997
  ],
8896
8998
  "layout": {
@@ -10853,7 +10955,7 @@
10853
10955
  "id": "water_lines_labels_cliff",
10854
10956
  "type": "symbol",
10855
10957
  "source": "ohm",
10856
- "source-layer": "water_lines",
10958
+ "source-layer": "natural_lines",
10857
10959
  "filter": [
10858
10960
  "==",
10859
10961
  [
@@ -12649,7 +12751,18 @@
12649
12751
  ],
12650
12752
  "layout": {
12651
12753
  "icon-image": "airport-18",
12652
- "icon-size": [
12754
+ "icon-offset": [
12755
+ -1,
12756
+ 0
12757
+ ],
12758
+ "text-font": [
12759
+ "OpenHistorical"
12760
+ ],
12761
+ "text-field": [
12762
+ "get",
12763
+ "ref"
12764
+ ],
12765
+ "text-size": [
12653
12766
  "interpolate",
12654
12767
  [
12655
12768
  "linear"
@@ -12657,13 +12770,43 @@
12657
12770
  [
12658
12771
  "zoom"
12659
12772
  ],
12660
- 10,
12661
- 1.2,
12773
+ 11.99,
12774
+ 12,
12775
+ 13,
12662
12776
  14,
12663
- 1.5
12777
+ 14,
12778
+ 14,
12779
+ 14.01,
12780
+ 0
12664
12781
  ],
12665
- "text-font": [
12666
- "OpenHistorical"
12782
+ "text-anchor": "left",
12783
+ "text-offset": [
12784
+ 1,
12785
+ 0
12786
+ ],
12787
+ "visibility": "visible"
12788
+ },
12789
+ "paint": {
12790
+ "text-color": "rgba(80, 80, 80, 1)",
12791
+ "text-halo-color": "rgba(255, 255, 255, 1)",
12792
+ "text-halo-width": 0.5,
12793
+ "text-halo-blur": 1,
12794
+ "text-opacity": [
12795
+ "interpolate",
12796
+ [
12797
+ "linear"
12798
+ ],
12799
+ [
12800
+ "zoom"
12801
+ ],
12802
+ 11.99,
12803
+ 0,
12804
+ 12,
12805
+ 0.8,
12806
+ 14,
12807
+ 0.8,
12808
+ 14.01,
12809
+ 0
12667
12810
  ]
12668
12811
  }
12669
12812
  },
@@ -13147,7 +13290,7 @@
13147
13290
  "literal",
13148
13291
  [
13149
13292
  "hamlet",
13150
- "neighborhood",
13293
+ "neighbourhood",
13151
13294
  "suburb",
13152
13295
  "village"
13153
13296
  ]
@@ -377,6 +377,13 @@
377
377
  "x": 48,
378
378
  "y": 166
379
379
  },
380
+ "cross_space_18px": {
381
+ "height": 18,
382
+ "pixelRatio": 1,
383
+ "width": 18,
384
+ "x": 0,
385
+ "y": 256
386
+ },
380
387
  "dentist-18": {
381
388
  "height": 17,
382
389
  "pixelRatio": 1,
@@ -559,6 +566,13 @@
559
566
  "x": 33,
560
567
  "y": 130
561
568
  },
569
+ "grave_yard_space_18px": {
570
+ "height": 18,
571
+ "pixelRatio": 1,
572
+ "width": 18,
573
+ "x": 18,
574
+ "y": 256
575
+ },
562
576
  "grocery-18": {
563
577
  "height": 15,
564
578
  "pixelRatio": 1,
@@ -377,6 +377,13 @@
377
377
  "x": 48,
378
378
  "y": 166
379
379
  },
380
+ "cross_space_18px": {
381
+ "height": 18,
382
+ "pixelRatio": 1,
383
+ "width": 18,
384
+ "x": 0,
385
+ "y": 256
386
+ },
380
387
  "dentist-18": {
381
388
  "height": 17,
382
389
  "pixelRatio": 1,
@@ -559,6 +566,13 @@
559
566
  "x": 33,
560
567
  "y": 130
561
568
  },
569
+ "grave_yard_space_18px": {
570
+ "height": 18,
571
+ "pixelRatio": 1,
572
+ "width": 18,
573
+ "x": 18,
574
+ "y": 256
575
+ },
562
576
  "grocery-18": {
563
577
  "height": 15,
564
578
  "pixelRatio": 1,
@@ -1832,12 +1832,16 @@
1832
1832
  ]
1833
1833
  ],
1834
1834
  [
1835
- "==",
1835
+ "!=",
1836
1836
  [
1837
- "get",
1838
- "bridge"
1837
+ "coalesce",
1838
+ [
1839
+ "get",
1840
+ "bridge"
1841
+ ],
1842
+ 0
1839
1843
  ],
1840
- 0
1844
+ 1
1841
1845
  ]
1842
1846
  ],
1843
1847
  "layout": {