@versatiles/style 4.0.1 → 4.0.3

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/dist/lib/utils.js CHANGED
@@ -24,6 +24,8 @@ export function deepClone(obj) {
24
24
  // @ts-expect-error: Too complicated to handle
25
25
  return Color(obj);
26
26
  }
27
+ if (obj == null)
28
+ return obj;
27
29
  console.log('obj', obj);
28
30
  console.log('obj.prototype', Object.getPrototypeOf(obj));
29
31
  throw Error();
@@ -217,7 +217,7 @@ export default class Colorful extends StyleBuilder {
217
217
  color: colors.danger,
218
218
  fillOutlineColor: colors.danger,
219
219
  opacity: 0.3,
220
- image: 'pattern-warning-12',
220
+ image: 'pattern-warning',
221
221
  },
222
222
  'site-hospital': {
223
223
  color: colors.hospital,
@@ -225,12 +225,12 @@ export default class Colorful extends StyleBuilder {
225
225
  },
226
226
  'site-prison': {
227
227
  color: colors.prison,
228
- image: 'pattern-striped-12',
228
+ image: 'pattern-striped',
229
229
  opacity: 0.1,
230
230
  },
231
231
  'site-construction': {
232
232
  color: colors.construction,
233
- image: 'pattern-hatched-thin-12',
233
+ image: 'pattern-hatched_thin',
234
234
  opacity: 0.1,
235
235
  },
236
236
  'site-{university,college,school}': {
@@ -650,7 +650,7 @@ export default class Colorful extends StyleBuilder {
650
650
  // markings
651
651
  'marking-oneway{-reverse,}': {
652
652
  minzoom: 16,
653
- image: 'marking-arrow-15',
653
+ image: 'marking-arrow',
654
654
  opacity: { 16: 0, 17: 0.7 },
655
655
  font: fonts.regular,
656
656
  },
@@ -687,12 +687,12 @@ export default class Colorful extends StyleBuilder {
687
687
  },
688
688
  'symbol-transit-lightrail': {
689
689
  minzoom: 14,
690
- image: 'icon-rail-light',
690
+ image: 'icon-rail_light',
691
691
  iconSize: { 14: 0.5, 16: 1 },
692
692
  },
693
693
  'symbol-transit-subway': {
694
694
  minzoom: 14,
695
- image: 'icon-rail-metro',
695
+ image: 'icon-rail_metro',
696
696
  iconSize: { 14: 0.5, 16: 1 },
697
697
  },
698
698
  'symbol-transit-tram': {
@@ -755,7 +755,7 @@ export default class Colorful extends StyleBuilder {
755
755
  'place_of_worship', 'icon-place_of_worship',
756
756
  'playground', 'icon-playground',
757
757
  'police', 'icon-police',
758
- 'post_box', 'icon-post_box',
758
+ 'post_box', 'icon-postbox',
759
759
  'post_office', 'icon-post',
760
760
  'prison', 'icon-prison',
761
761
  'pub', 'icon-beer',
@@ -772,7 +772,7 @@ export default class Colorful extends StyleBuilder {
772
772
  'vending_machine', 'icon-vendingmachine',
773
773
  'veterinary', 'icon-veterinary',
774
774
  'waste_basket', 'icon-waste_basket',
775
- 'UNDEFINED',
775
+ 'unknown',
776
776
  ],
777
777
  },
778
778
  'poi-leisure': {
@@ -805,7 +805,7 @@ export default class Colorful extends StyleBuilder {
805
805
  //'theme_park', 'icon-theme_park',
806
806
  'viewpoint', 'icon-viewpoint',
807
807
  'zoo', 'icon-zoo',
808
- 'UNDEFINED',
808
+ 'unknown',
809
809
  ],
810
810
  },
811
811
  'poi-shop': {
@@ -863,7 +863,7 @@ export default class Colorful extends StyleBuilder {
863
863
  //'water_works', 'icon-water_works',
864
864
  'watermill', 'icon-watermill',
865
865
  'windmill', 'icon-windmill',
866
- 'UNDEFINED',
866
+ 'unknown',
867
867
  ],
868
868
  },
869
869
  'poi-historic': {
@@ -888,7 +888,7 @@ export default class Colorful extends StyleBuilder {
888
888
  'defibrillator', 'icon-defibrillator',
889
889
  'fire_hydrant', 'icon-hydrant',
890
890
  'phone', 'icon-emergency_phone',
891
- 'UNDEFINED',
891
+ 'unknown',
892
892
  ],
893
893
  },
894
894
  /*
@@ -896,14 +896,14 @@ export default class Colorful extends StyleBuilder {
896
896
  image: ['match',
897
897
  ['get', 'highway'],
898
898
  //'emergency_access_point', 'icon-emergency_access_point',
899
- 'UNDEFINED'
899
+ 'unknown'
900
900
  ]
901
901
  },
902
902
  'poi-office': {
903
903
  image: ['match',
904
904
  ['get', 'office'],
905
905
  //'diplomatic', 'icon-diplomatic',
906
- 'UNDEFINED'
906
+ 'unknown'
907
907
  ]
908
908
  },
909
909
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versatiles/style",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "Generate StyleJSON for MapLibre",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",