@maplibre/maplibre-react-native 11.0.0-alpha.44 → 11.0.0-alpha.46

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.
Files changed (135) hide show
  1. package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +1 -1
  2. package/android/src/main/java/org/maplibre/reactnative/components/{layers → layer}/MLRNLayer.kt +3 -3
  3. package/android/src/main/java/org/maplibre/reactnative/components/{layers → layer}/MLRNLayerManager.kt +1 -1
  4. package/android/src/main/java/org/maplibre/reactnative/components/{layers → layer}/style/MLRNStyle.java +1 -1
  5. package/android/src/main/java/org/maplibre/reactnative/components/{layers → layer}/style/MLRNStyleFactory.java +1 -1
  6. package/android/src/main/java/org/maplibre/reactnative/components/{layers → layer}/style/MLRNStyleFunctionParser.java +1 -1
  7. package/android/src/main/java/org/maplibre/reactnative/components/{layers → layer}/style/MLRNStyleValue.java +1 -1
  8. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.kt +3 -3
  9. package/android/src/main/java/org/maplibre/reactnative/components/sources/MLRNSource.kt +1 -1
  10. package/ios/components/{layers → layer}/MLRNLayerComponentView.mm +3 -3
  11. package/ios/utils/MLRNPropConvert.h +17 -0
  12. package/lib/commonjs/components/layer/Layer.js +192 -0
  13. package/lib/commonjs/components/layer/Layer.js.map +1 -0
  14. package/lib/commonjs/components/map/Map.js +6 -5
  15. package/lib/commonjs/components/map/Map.js.map +1 -1
  16. package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js +2 -1
  17. package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
  18. package/lib/commonjs/components/sources/geojson-source/GeoJSONSourceNativeComponent.ts +1 -1
  19. package/lib/commonjs/components/sources/vector-source/VectorSource.js +2 -2
  20. package/lib/commonjs/components/sources/vector-source/VectorSource.js.map +1 -1
  21. package/lib/commonjs/components/user-location/UserLocationPuck.js +1 -1
  22. package/lib/commonjs/components/user-location/UserLocationPuck.js.map +1 -1
  23. package/lib/commonjs/components/user-location/UserLocationPuckHeading.js +1 -1
  24. package/lib/commonjs/components/user-location/UserLocationPuckHeading.js.map +1 -1
  25. package/lib/commonjs/index.js +1 -1
  26. package/lib/commonjs/index.js.map +1 -1
  27. package/lib/commonjs/utils/animated/Animated.js +1 -1
  28. package/lib/commonjs/utils/convertStyleSpec.js +58 -0
  29. package/lib/commonjs/utils/convertStyleSpec.js.map +1 -0
  30. package/lib/commonjs/utils/getNativeFilter.js +16 -0
  31. package/lib/commonjs/utils/getNativeFilter.js.map +1 -0
  32. package/lib/module/components/layer/Layer.js +186 -0
  33. package/lib/module/components/layer/Layer.js.map +1 -0
  34. package/lib/module/components/map/Map.js +6 -5
  35. package/lib/module/components/map/Map.js.map +1 -1
  36. package/lib/module/components/sources/geojson-source/GeoJSONSource.js +2 -1
  37. package/lib/module/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
  38. package/lib/module/components/sources/geojson-source/GeoJSONSourceNativeComponent.ts +1 -1
  39. package/lib/module/components/sources/vector-source/VectorSource.js +2 -2
  40. package/lib/module/components/sources/vector-source/VectorSource.js.map +1 -1
  41. package/lib/module/components/user-location/UserLocationPuck.js +1 -1
  42. package/lib/module/components/user-location/UserLocationPuck.js.map +1 -1
  43. package/lib/module/components/user-location/UserLocationPuckHeading.js +1 -1
  44. package/lib/module/components/user-location/UserLocationPuckHeading.js.map +1 -1
  45. package/lib/module/index.js +1 -1
  46. package/lib/module/index.js.map +1 -1
  47. package/lib/module/utils/animated/Animated.js +1 -1
  48. package/lib/module/utils/animated/Animated.js.map +1 -1
  49. package/lib/module/utils/convertStyleSpec.js +53 -0
  50. package/lib/module/utils/convertStyleSpec.js.map +1 -0
  51. package/lib/module/utils/getNativeFilter.js +12 -0
  52. package/lib/module/utils/getNativeFilter.js.map +1 -0
  53. package/lib/typescript/commonjs/src/components/layer/Layer.d.ts +198 -0
  54. package/lib/typescript/commonjs/src/components/layer/Layer.d.ts.map +1 -0
  55. package/lib/typescript/commonjs/src/components/layer/LayerNativeComponent.d.ts.map +1 -0
  56. package/lib/typescript/commonjs/src/components/map/Map.d.ts +4 -4
  57. package/lib/typescript/commonjs/src/components/map/Map.d.ts.map +1 -1
  58. package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSource.d.ts +3 -5
  59. package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +1 -1
  61. package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +1 -1
  62. package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSource.d.ts +2 -2
  63. package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSource.d.ts.map +1 -1
  64. package/lib/typescript/commonjs/src/index.d.ts +2 -1
  65. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  66. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts +0 -1
  67. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts.map +1 -1
  68. package/lib/typescript/commonjs/src/utils/convertStyleSpec.d.ts +16 -0
  69. package/lib/typescript/commonjs/src/utils/convertStyleSpec.d.ts.map +1 -0
  70. package/lib/typescript/commonjs/src/utils/getNativeFilter.d.ts +3 -0
  71. package/lib/typescript/commonjs/src/utils/getNativeFilter.d.ts.map +1 -0
  72. package/lib/typescript/module/src/components/layer/Layer.d.ts +198 -0
  73. package/lib/typescript/module/src/components/layer/Layer.d.ts.map +1 -0
  74. package/lib/typescript/module/src/components/layer/LayerNativeComponent.d.ts.map +1 -0
  75. package/lib/typescript/module/src/components/map/Map.d.ts +4 -4
  76. package/lib/typescript/module/src/components/map/Map.d.ts.map +1 -1
  77. package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSource.d.ts +3 -5
  78. package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -1
  79. package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +1 -1
  80. package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +1 -1
  81. package/lib/typescript/module/src/components/sources/vector-source/VectorSource.d.ts +2 -2
  82. package/lib/typescript/module/src/components/sources/vector-source/VectorSource.d.ts.map +1 -1
  83. package/lib/typescript/module/src/index.d.ts +2 -1
  84. package/lib/typescript/module/src/index.d.ts.map +1 -1
  85. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts +0 -1
  86. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts.map +1 -1
  87. package/lib/typescript/module/src/utils/convertStyleSpec.d.ts +16 -0
  88. package/lib/typescript/module/src/utils/convertStyleSpec.d.ts.map +1 -0
  89. package/lib/typescript/module/src/utils/getNativeFilter.d.ts +3 -0
  90. package/lib/typescript/module/src/utils/getNativeFilter.d.ts.map +1 -0
  91. package/package.json +2 -2
  92. package/src/components/layer/Layer.tsx +314 -0
  93. package/src/components/map/Map.tsx +16 -12
  94. package/src/components/sources/geojson-source/GeoJSONSource.tsx +8 -7
  95. package/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.ts +1 -1
  96. package/src/components/sources/vector-source/VectorSource.tsx +5 -5
  97. package/src/components/user-location/UserLocationPuck.tsx +1 -1
  98. package/src/components/user-location/UserLocationPuckHeading.tsx +1 -1
  99. package/src/index.ts +34 -2
  100. package/src/types/MapLibreRNStyles.ts +0 -2
  101. package/src/utils/animated/Animated.tsx +1 -1
  102. package/src/utils/convertStyleSpec.ts +61 -0
  103. package/src/utils/getNativeFilter.ts +15 -0
  104. package/lib/commonjs/components/layers/Layer.js +0 -121
  105. package/lib/commonjs/components/layers/Layer.js.map +0 -1
  106. package/lib/commonjs/utils/getFilter.js +0 -13
  107. package/lib/commonjs/utils/getFilter.js.map +0 -1
  108. package/lib/module/components/layers/Layer.js +0 -115
  109. package/lib/module/components/layers/Layer.js.map +0 -1
  110. package/lib/module/utils/getFilter.js +0 -9
  111. package/lib/module/utils/getFilter.js.map +0 -1
  112. package/lib/typescript/commonjs/src/components/layers/Layer.d.ts +0 -149
  113. package/lib/typescript/commonjs/src/components/layers/Layer.d.ts.map +0 -1
  114. package/lib/typescript/commonjs/src/components/layers/LayerNativeComponent.d.ts.map +0 -1
  115. package/lib/typescript/commonjs/src/utils/getFilter.d.ts +0 -3
  116. package/lib/typescript/commonjs/src/utils/getFilter.d.ts.map +0 -1
  117. package/lib/typescript/module/src/components/layers/Layer.d.ts +0 -149
  118. package/lib/typescript/module/src/components/layers/Layer.d.ts.map +0 -1
  119. package/lib/typescript/module/src/components/layers/LayerNativeComponent.d.ts.map +0 -1
  120. package/lib/typescript/module/src/utils/getFilter.d.ts +0 -3
  121. package/lib/typescript/module/src/utils/getFilter.d.ts.map +0 -1
  122. package/src/components/layers/Layer.tsx +0 -219
  123. package/src/utils/getFilter.ts +0 -11
  124. /package/ios/components/{layers → layer}/MLRNLayer.h +0 -0
  125. /package/ios/components/{layers → layer}/MLRNLayer.m +0 -0
  126. /package/ios/components/{layers → layer}/MLRNLayerComponentView.h +0 -0
  127. /package/ios/components/{layers → layer}/style/MLRNStyle.h +0 -0
  128. /package/ios/components/{layers → layer}/style/MLRNStyle.m +0 -0
  129. /package/ios/components/{layers → layer}/style/MLRNStyleValue.h +0 -0
  130. /package/ios/components/{layers → layer}/style/MLRNStyleValue.m +0 -0
  131. /package/lib/commonjs/components/{layers → layer}/LayerNativeComponent.ts +0 -0
  132. /package/lib/module/components/{layers → layer}/LayerNativeComponent.ts +0 -0
  133. /package/lib/typescript/commonjs/src/components/{layers → layer}/LayerNativeComponent.d.ts +0 -0
  134. /package/lib/typescript/module/src/components/{layers → layer}/LayerNativeComponent.d.ts +0 -0
  135. /package/src/components/{layers → layer}/LayerNativeComponent.ts +0 -0
@@ -12,7 +12,7 @@ import org.maplibre.reactnative.components.annotations.pointannotation.MLRNPoint
12
12
  import org.maplibre.reactnative.components.camera.MLRNCameraManager
13
13
  import org.maplibre.reactnative.components.camera.MLRNCameraModule
14
14
  import org.maplibre.reactnative.components.images.MLRNImagesManager
15
- import org.maplibre.reactnative.components.layers.MLRNLayerManager
15
+ import org.maplibre.reactnative.components.layer.MLRNLayerManager
16
16
  import org.maplibre.reactnative.components.location.MLRNNativeUserLocationManager
17
17
  import org.maplibre.reactnative.components.mapview.MLRNAndroidTextureMapViewManager
18
18
  import org.maplibre.reactnative.components.mapview.MLRNMapViewManager
@@ -1,4 +1,4 @@
1
- package org.maplibre.reactnative.components.layers
1
+ package org.maplibre.reactnative.components.layer
2
2
 
3
3
  import android.content.Context
4
4
  import com.facebook.common.logging.FLog
@@ -20,8 +20,8 @@ import org.maplibre.android.style.layers.PropertyFactory
20
20
  import org.maplibre.android.style.layers.RasterLayer
21
21
  import org.maplibre.android.style.layers.SymbolLayer
22
22
  import org.maplibre.reactnative.components.AbstractMapFeature
23
- import org.maplibre.reactnative.components.layers.style.MLRNStyle
24
- import org.maplibre.reactnative.components.layers.style.MLRNStyleFactory
23
+ import org.maplibre.reactnative.components.layer.style.MLRNStyle
24
+ import org.maplibre.reactnative.components.layer.style.MLRNStyleFactory
25
25
  import org.maplibre.reactnative.components.mapview.MLRNMapView
26
26
  import org.maplibre.reactnative.components.mapview.MLRNMapView.FoundLayerCallback
27
27
  import org.maplibre.reactnative.utils.ExpressionParser.from
@@ -1,4 +1,4 @@
1
- package org.maplibre.reactnative.components.layers
1
+ package org.maplibre.reactnative.components.layer
2
2
 
3
3
  import com.facebook.react.bridge.ReadableArray
4
4
  import com.facebook.react.bridge.ReadableMap
@@ -1,4 +1,4 @@
1
- package org.maplibre.reactnative.components.layers.style;
1
+ package org.maplibre.reactnative.components.layer.style;
2
2
 
3
3
  import android.content.Context;
4
4
  import androidx.annotation.NonNull;
@@ -1,7 +1,7 @@
1
1
  // DO NOT MODIFY
2
2
  // This file is auto-generated from scripts/templates/MLRNStyleFactory.java.ejs
3
3
 
4
- package org.maplibre.reactnative.components.layers.style;
4
+ package org.maplibre.reactnative.components.layer.style;
5
5
 
6
6
  import org.maplibre.android.style.layers.BackgroundLayer;
7
7
  import org.maplibre.android.style.layers.CircleLayer;
@@ -1,4 +1,4 @@
1
- package org.maplibre.reactnative.components.layers.style;
1
+ package org.maplibre.reactnative.components.layer.style;
2
2
 
3
3
  import com.facebook.react.bridge.Dynamic;
4
4
  import com.facebook.react.bridge.NoSuchKeyException;
@@ -1,4 +1,4 @@
1
- package org.maplibre.reactnative.components.layers.style;
1
+ package org.maplibre.reactnative.components.layer.style;
2
2
 
3
3
  import androidx.annotation.NonNull;
4
4
 
@@ -49,9 +49,9 @@ import org.maplibre.reactnative.components.annotations.markerview.MarkerViewMana
49
49
  import org.maplibre.reactnative.components.annotations.pointannotation.MLRNPointAnnotation
50
50
  import org.maplibre.reactnative.components.camera.MLRNCamera
51
51
  import org.maplibre.reactnative.components.images.MLRNImages
52
- import org.maplibre.reactnative.components.layers.MLRNLayer
53
- import org.maplibre.reactnative.components.layers.style.MLRNStyle
54
- import org.maplibre.reactnative.components.layers.style.MLRNStyleFactory
52
+ import org.maplibre.reactnative.components.layer.MLRNLayer
53
+ import org.maplibre.reactnative.components.layer.style.MLRNStyle
54
+ import org.maplibre.reactnative.components.layer.style.MLRNStyleFactory
55
55
  import org.maplibre.reactnative.components.location.LocationComponentManager
56
56
  import org.maplibre.reactnative.components.location.MLRNNativeUserLocation
57
57
  import org.maplibre.reactnative.components.mapview.helpers.CameraChangeTracker
@@ -10,7 +10,7 @@ import org.maplibre.android.maps.MapLibreMap
10
10
  import org.maplibre.android.maps.Style
11
11
  import org.maplibre.android.style.sources.Source
12
12
  import org.maplibre.reactnative.components.AbstractMapFeature
13
- import org.maplibre.reactnative.components.layers.MLRNLayer
13
+ import org.maplibre.reactnative.components.layer.MLRNLayer
14
14
  import org.maplibre.reactnative.components.mapview.MLRNMapView
15
15
 
16
16
  abstract class MLRNSource<T : Source?>(
@@ -10,8 +10,8 @@
10
10
  #import <MapLibre/MapLibre.h>
11
11
  #import <React/RCTBridge+Private.h>
12
12
  #import <React/RCTConversions.h>
13
- #import "MLRNFollyConvert.h"
14
13
  #import "MLRNLayer.h"
14
+ #import "MLRNPropConvert.h"
15
15
 
16
16
  using namespace facebook::react;
17
17
 
@@ -95,11 +95,11 @@ using namespace facebook::react;
95
95
  }
96
96
 
97
97
  if (oldViewProps.filter != newViewProps.filter) {
98
- _view.filter = convertFollyDynamicToId(newViewProps.filter);
98
+ _view.filter = MLRN_DYNAMIC_TO_ARRAY(newViewProps.filter);
99
99
  }
100
100
 
101
101
  if (oldViewProps.reactStyle != newViewProps.reactStyle) {
102
- _view.reactStyle = convertFollyDynamicToId(newViewProps.reactStyle);
102
+ _view.reactStyle = MLRN_DYNAMIC_TO_DICT(newViewProps.reactStyle);
103
103
  }
104
104
 
105
105
  [super updateProps:props oldProps:oldProps];
@@ -0,0 +1,17 @@
1
+ #pragma once
2
+
3
+ #import "MLRNFollyConvert.h"
4
+
5
+ /**
6
+ * Macros for safely converting folly::dynamic props to Objective-C types.
7
+ *
8
+ * In the New Architecture, missing optional props may be passed as null
9
+ * (folly::dynamic::Type::NULLT) which convertFollyDynamicToId() converts to
10
+ * NSNull instead of nil. These macros check for null before conversion.
11
+ */
12
+
13
+ // Convert object-type props (NSDictionary), returns nil for null/non-object
14
+ #define MLRN_DYNAMIC_TO_DICT(prop) ((!prop.isNull() && prop.isObject()) ? convertFollyDynamicToId(prop) : nil)
15
+
16
+ // Convert array-type props (NSArray), returns nil for null/non-array
17
+ #define MLRN_DYNAMIC_TO_ARRAY(prop) ((!prop.isNull() && prop.isArray()) ? convertFollyDynamicToId(prop) : nil)
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Layer = void 0;
7
+ var _react = require("react");
8
+ var _LayerNativeComponent = _interopRequireDefault(require("./LayerNativeComponent"));
9
+ var _useFrozenId = require("../../hooks/useFrozenId.js");
10
+ var _StyleValue = require("../../utils/StyleValue.js");
11
+ var _convertStyleSpec = require("../../utils/convertStyleSpec.js");
12
+ var _getNativeFilter = require("../../utils/getNativeFilter.js");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ /**
16
+ * Additional props specific to maplibre-react-native.
17
+ */
18
+
19
+ // Utility types following react-map-gl pattern
20
+ // See: https://github.com/microsoft/TypeScript/issues/39556#issuecomment-656925230
21
+
22
+ /**
23
+ * Base layer props from style spec with optional id/source.
24
+ * Matches react-map-gl's LayerProps pattern.
25
+ */
26
+
27
+ /**
28
+ * Common props shared by all layer types.
29
+ *
30
+ * @deprecated Use `paint` and `layout` props instead of `style`. Will be removed in v12.
31
+ */
32
+
33
+ /**
34
+ * @deprecated Use LayerProps instead.
35
+ */
36
+
37
+ // ============================================================================
38
+ // DEPRECATED: Legacy type exports for backwards compatibility
39
+ // These will be removed in v12. Use LayerProps with paint/layout instead.
40
+ // ============================================================================
41
+
42
+ /**
43
+ * @deprecated Use LayerProps with type="background" instead.
44
+ */
45
+
46
+ /**
47
+ * @deprecated Use LayerProps with type="fill" instead.
48
+ */
49
+
50
+ /**
51
+ * @deprecated Use LayerProps with type="line" instead.
52
+ */
53
+
54
+ /**
55
+ * @deprecated Use LayerProps with type="symbol" instead.
56
+ */
57
+
58
+ /**
59
+ * @deprecated Use LayerProps with type="circle" instead.
60
+ */
61
+
62
+ /**
63
+ * @deprecated Use LayerProps with type="heatmap" instead.
64
+ */
65
+
66
+ /**
67
+ * @deprecated Use LayerProps with type="fill-extrusion" instead.
68
+ */
69
+
70
+ /**
71
+ * @deprecated Use LayerProps with type="raster" instead.
72
+ */
73
+
74
+ /**
75
+ * Layer component props.
76
+ * Combines style spec LayerSpecification with MLRN-specific props.
77
+ *
78
+ * The `paint` and `layout` props come directly from LayerSpecification
79
+ * and use kebab-case property names per the MapLibre Style Spec.
80
+ *
81
+ * @example
82
+ * ```tsx
83
+ * // Style spec compliant (recommended)
84
+ * <Layer
85
+ * type="fill"
86
+ * id="parks"
87
+ * source="parks-source"
88
+ * paint={{ "fill-color": "green", "fill-opacity": 0.5 }}
89
+ * layout={{ "visibility": "visible" }}
90
+ * />
91
+ *
92
+ * // Deprecated (still works)
93
+ * <Layer
94
+ * type="fill"
95
+ * id="parks"
96
+ * source="parks-source"
97
+ * style={{ fillColor: "green", fillOpacity: 0.5 }}
98
+ * />
99
+ * ```
100
+ */
101
+
102
+ /**
103
+ * Layer is a style layer that renders geospatial data on the map.
104
+ *
105
+ * This is a unified, type-safe layer component that supports all layer types.
106
+ * Use the style-spec compliant `paint` and `layout` props with kebab-case keys.
107
+ *
108
+ * @example
109
+ * ```tsx
110
+ * // Style spec compliant (recommended)
111
+ * <Layer
112
+ * type="fill"
113
+ * id="parks"
114
+ * source="parks-source"
115
+ * paint={{ "fill-color": "green", "fill-opacity": 0.5 }}
116
+ * layout={{ visibility: "visible" }}
117
+ * />
118
+ *
119
+ * // With expressions
120
+ * <Layer
121
+ * type="fill"
122
+ * id="parks"
123
+ * source="parks-source"
124
+ * paint={{
125
+ * "fill-color": ["interpolate", ["linear"], ["get", "elevation"], 0, "blue", 100, "red"],
126
+ * }}
127
+ * />
128
+ *
129
+ * // Deprecated style prop (still works but will be removed in v12)
130
+ * <Layer
131
+ * type="fill"
132
+ * id="parks"
133
+ * source="parks-source"
134
+ * style={{ fillColor: "green", fillOpacity: 0.5 }}
135
+ * />
136
+ * ```
137
+ */
138
+ const Layer = ({
139
+ id,
140
+ ...props
141
+ }) => {
142
+ const frozenId = (0, _useFrozenId.useFrozenId)(id);
143
+ const nativeProps = (0, _react.useMemo)(() => {
144
+ const {
145
+ type: layerType,
146
+ "source-layer": sourceLayer,
147
+ filter,
148
+ style,
149
+ paint,
150
+ layout,
151
+ beforeId,
152
+ afterId,
153
+ layerIndex,
154
+ ...rest
155
+ } = {
156
+ "source-layer": undefined,
157
+ filter: undefined,
158
+ paint: undefined,
159
+ layout: undefined,
160
+ ...props
161
+ };
162
+
163
+ // Warn if using deprecated style prop (only in development)
164
+ if (__DEV__ && style) {
165
+ if (paint || layout) {
166
+ console.warn("@maplibre/maplibre-react-native: Using both `style` and `paint`/`layout` props. " + "The `style` prop is deprecated and will be removed in v12. " + "Properties from `paint`/`layout` take precedence.");
167
+ } else {
168
+ console.warn("@maplibre/maplibre-react-native: The `style` prop is deprecated. " + "Use `paint` and `layout` props instead. Will be removed in v12.");
169
+ }
170
+ }
171
+
172
+ // Merge paint/layout (new API) with style (deprecated API)
173
+ const mergedStyle = (0, _convertStyleSpec.mergeStyleProps)(paint, layout, style);
174
+ return {
175
+ ...rest,
176
+ layerType,
177
+ sourceLayer,
178
+ beforeId,
179
+ afterId,
180
+ layerIndex,
181
+ filter: (0, _getNativeFilter.getNativeFilter)(filter),
182
+ reactStyle: (0, _StyleValue.transformStyle)(mergedStyle)
183
+ };
184
+ }, [props]);
185
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LayerNativeComponent.default, {
186
+ id: frozenId,
187
+ testID: `mlrn-${props.type}-layer`,
188
+ ...nativeProps
189
+ });
190
+ };
191
+ exports.Layer = Layer;
192
+ //# sourceMappingURL=Layer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_LayerNativeComponent","_interopRequireDefault","_useFrozenId","_StyleValue","_convertStyleSpec","_getNativeFilter","_jsxRuntime","e","__esModule","default","Layer","id","props","frozenId","useFrozenId","nativeProps","useMemo","type","layerType","sourceLayer","filter","style","paint","layout","beforeId","afterId","layerIndex","rest","undefined","__DEV__","console","warn","mergedStyle","mergeStyleProps","getNativeFilter","reactStyle","transformStyle","jsx","testID","exports"],"sourceRoot":"../../../../src","sources":["components/layer/Layer.tsx"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAYA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAA8D,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9D;AACA;AACA;;AAkBA;AACA;;AAQA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;;AAsBA;AACA;AACA;;AAOA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,KAAK,GAAGA,CAAC;EAAEC,EAAE;EAAE,GAAGC;AAAkB,CAAC,KAAK;EACrD,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAACH,EAAE,CAAC;EAEhC,MAAMI,WAAW,GAAG,IAAAC,cAAO,EAAC,MAAM;IAChC,MAAM;MACJC,IAAI,EAAEC,SAAS;MACf,cAAc,EAAEC,WAAW;MAC3BC,MAAM;MACNC,KAAK;MACLC,KAAK;MACLC,MAAM;MACNC,QAAQ;MACRC,OAAO;MACPC,UAAU;MACV,GAAGC;IACL,CAAC,GAAG;MACF,cAAc,EAAEC,SAAS;MACzBR,MAAM,EAAEQ,SAAS;MACjBN,KAAK,EAAEM,SAAS;MAChBL,MAAM,EAAEK,SAAS;MACjB,GAAGhB;IACL,CAAC;;IAED;IACA,IAAIiB,OAAO,IAAIR,KAAK,EAAE;MACpB,IAAIC,KAAK,IAAIC,MAAM,EAAE;QACnBO,OAAO,CAACC,IAAI,CACV,kFAAkF,GAChF,6DAA6D,GAC7D,mDACJ,CAAC;MACH,CAAC,MAAM;QACLD,OAAO,CAACC,IAAI,CACV,mEAAmE,GACjE,iEACJ,CAAC;MACH;IACF;;IAEA;IACA,MAAMC,WAAW,GAAG,IAAAC,iCAAe,EACjCX,KAAK,EACLC,MAAM,EACNF,KACF,CAAC;IAED,OAAO;MACL,GAAGM,IAAI;MACPT,SAAS;MACTC,WAAW;MACXK,QAAQ;MACRC,OAAO;MACPC,UAAU;MACVN,MAAM,EAAE,IAAAc,gCAAe,EAACd,MAA6B,CAAC;MACtDe,UAAU,EAAE,IAAAC,0BAAc,EAACJ,WAAW;IACxC,CAAC;EACH,CAAC,EAAE,CAACpB,KAAK,CAAC,CAAC;EAEX,oBACE,IAAAN,WAAA,CAAA+B,GAAA,EAACrC,qBAAA,CAAAS,OAAoB;IACnBE,EAAE,EAAEE,QAAS;IACbyB,MAAM,EAAE,QAAQ1B,KAAK,CAACK,IAAI,QAAS;IAAA,GAC/BF;EAAW,CAChB,CAAC;AAEN,CAAC;AAACwB,OAAA,CAAA7B,KAAA,GAAAA,KAAA","ignoreList":[]}
@@ -11,8 +11,9 @@ var _MapViewNativeComponent = _interopRequireDefault(require("./MapViewNativeCom
11
11
  var _NativeMapViewModule = _interopRequireDefault(require("./NativeMapViewModule.js"));
12
12
  var _LogManager = require("../../modules/log/LogManager.js");
13
13
  var _StyleValue = require("../../utils/StyleValue.js");
14
+ var _convertStyleSpec = require("../../utils/convertStyleSpec.js");
14
15
  var _findNodeHandle = require("../../utils/findNodeHandle.js");
15
- var _getFilter = require("../../utils/getFilter.js");
16
+ var _getNativeFilter = require("../../utils/getNativeFilter.js");
16
17
  var _jsxRuntime = require("react/jsx-runtime");
17
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
19
  const styles = _reactNative.StyleSheet.create({
@@ -41,11 +42,11 @@ const Map = exports.Map = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.
41
42
  unproject: point => _NativeMapViewModule.default.unproject((0, _findNodeHandle.findNodeHandle)(nativeRef.current), point),
42
43
  queryRenderedFeatures: async (pixelPointOrPixelPointBoundsOrOptions, options) => {
43
44
  if (pixelPointOrPixelPointBoundsOrOptions && Array.isArray(pixelPointOrPixelPointBoundsOrOptions) && (value => typeof value[0] === "number" && typeof value[1] === "number")(pixelPointOrPixelPointBoundsOrOptions)) {
44
- return await _NativeMapViewModule.default.queryRenderedFeaturesWithPoint((0, _findNodeHandle.findNodeHandle)(nativeRef.current), pixelPointOrPixelPointBoundsOrOptions, options?.layers ?? [], (0, _getFilter.getFilter)(options?.filter));
45
+ return await _NativeMapViewModule.default.queryRenderedFeaturesWithPoint((0, _findNodeHandle.findNodeHandle)(nativeRef.current), pixelPointOrPixelPointBoundsOrOptions, options?.layers ?? [], (0, _getNativeFilter.getNativeFilter)(options?.filter));
45
46
  } else if (pixelPointOrPixelPointBoundsOrOptions && Array.isArray(pixelPointOrPixelPointBoundsOrOptions) && (value => Array.isArray(value[0]) && Array.isArray(value[1]))(pixelPointOrPixelPointBoundsOrOptions)) {
46
- return await _NativeMapViewModule.default.queryRenderedFeaturesWithBounds((0, _findNodeHandle.findNodeHandle)(nativeRef.current), pixelPointOrPixelPointBoundsOrOptions, options?.layers ?? [], (0, _getFilter.getFilter)(options?.filter));
47
+ return await _NativeMapViewModule.default.queryRenderedFeaturesWithBounds((0, _findNodeHandle.findNodeHandle)(nativeRef.current), pixelPointOrPixelPointBoundsOrOptions, options?.layers ?? [], (0, _getNativeFilter.getNativeFilter)(options?.filter));
47
48
  } else {
48
- return await _NativeMapViewModule.default.queryRenderedFeaturesWithBounds((0, _findNodeHandle.findNodeHandle)(nativeRef.current), null, pixelPointOrPixelPointBoundsOrOptions?.layers ?? [], (0, _getFilter.getFilter)(pixelPointOrPixelPointBoundsOrOptions?.filter));
49
+ return await _NativeMapViewModule.default.queryRenderedFeaturesWithBounds((0, _findNodeHandle.findNodeHandle)(nativeRef.current), null, pixelPointOrPixelPointBoundsOrOptions?.layers ?? [], (0, _getNativeFilter.getNativeFilter)(pixelPointOrPixelPointBoundsOrOptions?.filter));
49
50
  }
50
51
  },
51
52
  createStaticMapImage: options => _NativeMapViewModule.default.createStaticMapImage((0, _findNodeHandle.findNodeHandle)(nativeRef.current), options.output),
@@ -71,7 +72,7 @@ const Map = exports.Map = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.
71
72
  ref: nativeRef,
72
73
  style: styles.flex1,
73
74
  mapStyle: typeof mapStyle === "object" ? JSON.stringify(mapStyle) : mapStyle,
74
- light: props.light ? (0, _StyleValue.transformStyle)(props.light) : undefined
75
+ light: props.light ? (0, _StyleValue.transformStyle)((0, _convertStyleSpec.convertToInternalStyle)(props.light)) : undefined
75
76
  };
76
77
  }, [props]);
77
78
  let map = null;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_AndroidTextureMapViewNativeComponent","_interopRequireDefault","_MapViewNativeComponent","_NativeMapViewModule","_LogManager","_StyleValue","_findNodeHandle","_getFilter","_jsxRuntime","e","__esModule","default","styles","StyleSheet","create","flex1","flex","Map","exports","memo","forwardRef","androidView","style","props","ref","isReady","setIsReady","useState","nativeRef","useRef","useImperativeHandle","getCenter","NativeMapViewModule","findNodeHandle","current","getZoom","getBearing","getPitch","getBounds","getViewState","project","lngLat","unproject","point","queryRenderedFeatures","pixelPointOrPixelPointBoundsOrOptions","options","Array","isArray","value","queryRenderedFeaturesWithPoint","layers","getFilter","filter","queryRenderedFeaturesWithBounds","createStaticMapImage","output","setSourceVisibility","visible","source","sourceLayer","showAttribution","useLayoutEffect","LogManager","start","stop","nativeProps","useMemo","mapStyle","light","otherProps","JSON","stringify","transformStyle","undefined","map","NativeMapView","Platform","OS","AndroidTextureMapViewNativeComponent","MapViewNativeComponent","jsx","View","onLayout","testID","children"],"sourceRoot":"../../../../src","sources":["components/map/Map.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAaA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,qCAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,oBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAaA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AAAkD,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAG,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElD,MAAMG,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,KAAK,EAAE;IAAEC,IAAI,EAAE;EAAE;AACnB,CAAC,CAAC;AAuaF;AACA;AACA;AACO,MAAMC,GAAG,GAAAC,OAAA,CAAAD,GAAA,gBAAG,IAAAE,WAAI,eACrB,IAAAC,iBAAU,EACR,CAAC;EAAEC,WAAW,GAAG,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACrD,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAE7C,MAAMC,SAAS,GAAG,IAAAC,aAAM,EAGtB,IAAI,CAAC;EAEP,IAAAC,0BAAmB,EAACN,GAAG,EAAE,OAAO;IAC9BO,SAAS,EAAEA,CAAA,KACTC,4BAAmB,CAACD,SAAS,CAAC,IAAAE,8BAAc,EAACL,SAAS,CAACM,OAAO,CAAC,CAAC;IAElEC,OAAO,EAAEA,CAAA,KACPH,4BAAmB,CAACG,OAAO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[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_AndroidTextureMapViewNativeComponent","_interopRequireDefault","_MapViewNativeComponent","_NativeMapViewModule","_LogManager","_StyleValue","_convertStyleSpec","_findNodeHandle","_getNativeFilter","_jsxRuntime","e","__esModule","default","styles","StyleSheet","create","flex1","flex","Map","exports","memo","forwardRef","androidView","style","props","ref","isReady","setIsReady","useState","nativeRef","useRef","useImperativeHandle","getCenter","NativeMapViewModule","findNodeHandle","current","getZoom","getBearing","getPitch","getBounds","getViewState","project","lngLat","unproject","point","queryRenderedFeatures","pixelPointOrPixelPointBoundsOrOptions","options","Array","isArray","value","queryRenderedFeaturesWithPoint","layers","getNativeFilter","filter","queryRenderedFeaturesWithBounds","createStaticMapImage","output","setSourceVisibility","visible","source","sourceLayer","showAttribution","useLayoutEffect","LogManager","start","stop","nativeProps","useMemo","mapStyle","light","otherProps","JSON","stringify","transformStyle","convertToInternalStyle","undefined","map","NativeMapView","Platform","OS","AndroidTextureMapViewNativeComponent","MapViewNativeComponent","jsx","View","onLayout","testID","children"],"sourceRoot":"../../../../src","sources":["components/map/Map.tsx"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,OAAA;AAaA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,qCAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,oBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AASA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AACA,IAAAU,gBAAA,GAAAV,OAAA;AAA8D,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAG,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9D,MAAMG,MAAM,G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EACH,CAAC,EAAE,CAACpD,KAAK,CAAC,CAAC;EAEX,IAAIqD,GAAwB,GAAG,IAAI;EACnC,IAAInD,OAAO,EAAE;IACX,MAAMoD,aAAa,GACjBC,qBAAQ,CAACC,EAAE,KAAK,SAAS,IAAI1D,WAAW,KAAK,SAAS,GAClD2D,6CAAoC,GACpCC,+BAAsB;IAE5BL,GAAG,gBAAG,IAAApE,WAAA,CAAA0E,GAAA,EAACL,aAAa;MAAA,GAAKX;IAAW,CAAG,CAAC;EAC1C;EAEA,oBACE,IAAA1D,WAAA,CAAA0E,GAAA,EAACpF,YAAA,CAAAqF,IAAI;IACHC,QAAQ,EAAEA,CAAA,KAAM1D,UAAU,CAAC,IAAI,CAAE;IACjCJ,KAAK,EAAEA,KAAK,IAAIV,MAAM,CAACG,KAAM;IAC7BsE,MAAM,EAAEnB,WAAW,CAACmB,MAAM,GAAG,GAAGnB,WAAW,CAACmB,MAAM,OAAO,GAAGV,SAAU;IAAAW,QAAA,EAErEV;EAAG,CACA,CAAC;AAEX,CACF,CACF,CAAC","ignoreList":[]}
@@ -10,6 +10,7 @@ var _NativeGeoJSONSourceModule = _interopRequireDefault(require("./NativeGeoJSON
10
10
  var _useFrozenId = require("../../../hooks/useFrozenId.js");
11
11
  var _index = require("../../../utils/index.js");
12
12
  var _findNodeHandle = require("../../../utils/findNodeHandle.js");
13
+ var _getNativeFilter = require("../../../utils/getNativeFilter.js");
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
16
  /**
@@ -25,7 +26,7 @@ const GeoJSONSource = exports.GeoJSONSource = /*#__PURE__*/(0, _react.memo)(/*#_
25
26
  const frozenId = (0, _useFrozenId.useFrozenId)(id);
26
27
  (0, _react.useImperativeHandle)(ref, () => ({
27
28
  getData: async filter => {
28
- return _NativeGeoJSONSourceModule.default.getData((0, _findNodeHandle.findNodeHandle)(nativeRef.current), filter);
29
+ return _NativeGeoJSONSourceModule.default.getData((0, _findNodeHandle.findNodeHandle)(nativeRef.current), (0, _getNativeFilter.getNativeFilter)(filter));
29
30
  },
30
31
  getClusterExpansionZoom: async clusterId => {
31
32
  return _NativeGeoJSONSourceModule.default.getClusterExpansionZoom((0, _findNodeHandle.findNodeHandle)(nativeRef.current), clusterId);
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_GeoJSONSourceNativeComponent","_interopRequireDefault","_NativeGeoJSONSourceModule","_useFrozenId","_index","_findNodeHandle","_jsxRuntime","e","__esModule","default","GeoJSONSource","exports","memo","forwardRef","id","data","props","ref","nativeRef","useRef","frozenId","useFrozenId","useImperativeHandle","getData","filter","NativeGeoJSONSourceModule","findNodeHandle","current","getClusterExpansionZoom","clusterId","getClusterLeaves","limit","offset","getClusterChildren","jsx","JSON","stringify","hasOnPress","onPress","children","cloneReactChildrenWithProps","source"],"sourceRoot":"../../../../../src","sources":["components/sources/geojson-source/GeoJSONSource.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,6BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAOA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAA+D,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAyI/D;AACA;AACA;AACA;AACO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,gBAAG,IAAAE,WAAI,eAC/B,IAAAC,iBAAU,EACR,CAAC;EAAEC,EAAE;EAAEC,IAAI;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC/B,MAAMC,SAAS,GAAG,IAAAC,aAAM,EAGtB,IAAI,CAAC;EAEP,MAAMC,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ACF,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_GeoJSONSourceNativeComponent","_interopRequireDefault","_NativeGeoJSONSourceModule","_useFrozenId","_index","_findNodeHandle","_getNativeFilter","_jsxRuntime","e","__esModule","default","GeoJSONSource","exports","memo","forwardRef","id","data","props","ref","nativeRef","useRef","frozenId","useFrozenId","useImperativeHandle","getData","filter","NativeGeoJSONSourceModule","findNodeHandle","current","getNativeFilter","getClusterExpansionZoom","clusterId","getClusterLeaves","limit","offset","getClusterChildren","jsx","JSON","stringify","hasOnPress","onPress","children","cloneReactChildrenWithProps","source"],"sourceRoot":"../../../../../src","sources":["components/sources/geojson-source/GeoJSONSource.tsx"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,6BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAGA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AAAiE,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAyIjE;AACA;AACA;AACA;AACO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,gBAAG,IAAAE,WAAI,eAC/B,IAAAC,iBAAU,EACR,CAAC;EAAEC,EAAE;EAAEC,IAAI;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC/B,MAAMC,SAAS,GAAG,IAAAC,aAAM,EAGtB,IAAI,CAAC;EAEP,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAACP,EAAE,CAAC;EAEhC,IAAAQ,0BAAmB,EAACL,GAAG,EAAE,OAAO;IAC9BM,OAAO,EAAE,MAAOC,MAAM,IAAK;MACzB,OAAOC,kCAAyB,CAACF,OAAO,CACtC,IAAAG,8BAAc,EAACR,SAAS,CAACS,OAAO,CAAC,EACjC,IAAAC,gCAAe,EAACJ,MAAM,CACxB,CAAC;IACH,CAAC;IAEDK,uBAAuB,EAAE,MAAOC,SAAS,IAAK;MAC5C,OAAOL,kCAAyB,CAACI,uBAAuB,CACtD,IAAAH,8BAAc,EAACR,SAAS,CAACS,OAAO,CAAC,EACjCG,SACF,CAAC;IACH,CAAC;IAEDC,gBAAgB,EAAE,MAAAA,CAChBD,SAAiB,EACjBE,KAAa,EACbC,MAAc,KACX;MACH,OAAOR,kCAAyB,CAACM,gBAAgB,CAC/C,IAAAL,8BAAc,EAACR,SAAS,CAACS,OAAO,CAAC,EACjCG,SAAS,EACTE,KAAK,EACLC,MACF,CAAC;IACH,CAAC;IAEDC,kBAAkB,EAAE,MAAOJ,SAAiB,IAAK;MAC/C,OAAOL,kCAAyB,CAACS,kBAAkB,CACjD,IAAAR,8BAAc,EAACR,SAAS,CAACS,OAAO,CAAC,EACjCG,SACF,CAAC;IACH;EACF,CAAC,CAAC,CAAC;EAEH,oBACE,IAAAxB,WAAA,CAAA6B,GAAA,EAACpC,6BAAA,CAAAU,OAA4B;IAC3BQ,GAAG,EAAEC,SAAU;IACfJ,EAAE,EAAEM,QAAS;IACbL,IAAI,EAAE,OAAOA,IAAI,KAAK,QAAQ,GAAGA,IAAI,GAAGqB,IAAI,CAACC,SAAS,CAACtB,IAAI,CAAE;IAC7DuB,UAAU,EAAE,CAAC,CAACtB,KAAK,CAACuB,OAAQ;IAAA,GACxBvB,KAAK;IAAAwB,QAAA,EAER,IAAAC,kCAA2B,EAACzB,KAAK,CAACwB,QAAQ,EAAE;MAC3CE,MAAM,EAAEtB;IACV,CAAC;EAAC,CAC0B,CAAC;AAEnC,CACF,CACF,CAAC","ignoreList":[]}
@@ -35,7 +35,7 @@ export interface NativeProps extends ViewProps {
35
35
  clusterRadius?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
36
36
  clusterMaxZoom?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
37
37
  clusterMinPoints?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
38
- clusterProperties?: UnsafeMixed<object>;
38
+ clusterProperties?: UnsafeMixed<unknown>;
39
39
 
40
40
  hitbox?: NativeHitbox;
41
41
  hasOnPress: boolean;
@@ -10,7 +10,7 @@ var _VectorSourceNativeComponent = _interopRequireDefault(require("./VectorSourc
10
10
  var _useFrozenId = require("../../../hooks/useFrozenId.js");
11
11
  var _index = require("../../../utils/index.js");
12
12
  var _findNodeHandle = require("../../../utils/findNodeHandle.js");
13
- var _getFilter = require("../../../utils/getFilter.js");
13
+ var _getNativeFilter = require("../../../utils/getNativeFilter.js");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
16
  /**
@@ -28,7 +28,7 @@ const VectorSource = exports.VectorSource = /*#__PURE__*/(0, _react.memo)(/*#__P
28
28
  sourceLayer,
29
29
  filter
30
30
  }) => {
31
- return _NativeVectorSourceModule.default.querySourceFeatures((0, _findNodeHandle.findNodeHandle)(nativeRef.current), sourceLayer, (0, _getFilter.getFilter)(filter));
31
+ return _NativeVectorSourceModule.default.querySourceFeatures((0, _findNodeHandle.findNodeHandle)(nativeRef.current), sourceLayer, (0, _getNativeFilter.getNativeFilter)(filter));
32
32
  }
33
33
  }));
34
34
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VectorSourceNativeComponent.default, {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_NativeVectorSourceModule","_interopRequireDefault","_VectorSourceNativeComponent","_useFrozenId","_index","_findNodeHandle","_getFilter","_jsxRuntime","e","__esModule","default","VectorSource","exports","memo","forwardRef","id","props","ref","nativeRef","useRef","frozenId","useFrozenId","useImperativeHandle","querySourceFeatures","sourceLayer","filter","NativeVectorSourceModule","findNodeHandle","current","getFilter","jsx","hasOnPress","onPress","children","cloneReactChildrenWithProps","source"],"sourceRoot":"../../../../../src","sources":["components/sources/vector-source/VectorSource.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,yBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAIA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAAqD,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAmErD;AACA;AACA;AACA;AACO,MAAMG,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,WAAI,eAC9B,IAAAC,iBAAU,EAAqC,CAAC;EAAEC,EAAE;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACxE,MAAMC,SAAS,GAAG,IAAAC,aAAM,EAGtB,IAAI,CAAC;EAEP,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAACN,EAAE,CAAC;EAEhC,IAAAO,0BAAmB,EAACL,GAAG,EAAE,OAAO;IAC9BM,mBAAmB,EAAE,MAAAA,CAAO;MAC1BC,WAAW;MACXC;IAIF,CAAC,KAAiC;MAChC,OAAOC,iCAAwB,CAACH,mBAAmB,CACjD,IAAAI,8BAAc,EAACT,SAAS,CAACU,OAAO,CAAC,EACjCJ,WAAW,EACX,IAAAK,oBAAS,EAACJ,MAAM,CAClB,CAAC;IACH;EACF,CAAC,CAAC,CAAC;EAEH,oBACE,IAAAlB,WAAA,CAAAuB,GAAA,EAAC5B,4BAAA,CAAAQ,OAA2B;IAC1BO,GAAG,EAAEC,SAAU;IACfH,EAAE,EAAEK,QAAS;IACbW,UAAU,EAAE,CAAC,CAACf,KAAK,CAACgB,OAAQ;IAAA,GACxBhB,KAAK;IAAAiB,QAAA,EAER,IAAAC,kCAA2B,EAAClB,KAAK,CAACiB,QAAQ,EAAE;MAC3CE,MAAM,EAAEf;IACV,CAAC;EAAC,CACyB,CAAC;AAElC,CAAC,CACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_NativeVectorSourceModule","_interopRequireDefault","_VectorSourceNativeComponent","_useFrozenId","_index","_findNodeHandle","_getNativeFilter","_jsxRuntime","e","__esModule","default","VectorSource","exports","memo","forwardRef","id","props","ref","nativeRef","useRef","frozenId","useFrozenId","useImperativeHandle","querySourceFeatures","sourceLayer","filter","NativeVectorSourceModule","findNodeHandle","current","getNativeFilter","jsx","hasOnPress","onPress","children","cloneReactChildrenWithProps","source"],"sourceRoot":"../../../../../src","sources":["components/sources/vector-source/VectorSource.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,yBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAGA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AAAiE,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAmEjE;AACA;AACA;AACA;AACO,MAAMG,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,WAAI,eAC9B,IAAAC,iBAAU,EAAqC,CAAC;EAAEC,EAAE;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACxE,MAAMC,SAAS,GAAG,IAAAC,aAAM,EAGtB,IAAI,CAAC;EAEP,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAACN,EAAE,CAAC;EAEhC,IAAAO,0BAAmB,EAACL,GAAG,EAAE,OAAO;IAC9BM,mBAAmB,EAAE,MAAAA,CAAO;MAC1BC,WAAW;MACXC;IAIF,CAAC,KAAiC;MAChC,OAAOC,iCAAwB,CAACH,mBAAmB,CACjD,IAAAI,8BAAc,EAACT,SAAS,CAACU,OAAO,CAAC,EACjCJ,WAAW,EACX,IAAAK,gCAAe,EAACJ,MAAM,CACxB,CAAC;IACH;EACF,CAAC,CAAC,CAAC;EAEH,oBACE,IAAAlB,WAAA,CAAAuB,GAAA,EAAC5B,4BAAA,CAAAQ,OAA2B;IAC1BO,GAAG,EAAEC,SAAU;IACfH,EAAE,EAAEK,QAAS;IACbW,UAAU,EAAE,CAAC,CAACf,KAAK,CAACgB,OAAQ;IAAA,GACxBhB,KAAK;IAAAiB,QAAA,EAER,IAAAC,kCAA2B,EAAClB,KAAK,CAACiB,QAAQ,EAAE;MAC3CE,MAAM,EAAEf;IACV,CAAC;EAAC,CACyB,CAAC;AAElC,CAAC,CACH,CAAC","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.UserLocationPuck = void 0;
7
7
  var _react = require("react");
8
8
  var _UserLocationPuckHeading = require("./UserLocationPuckHeading.js");
9
- var _Layer = require("../layers/Layer.js");
9
+ var _Layer = require("../layer/Layer.js");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  const blue = "#33B5E5";
12
12
  const layerStyles = {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_UserLocationPuckHeading","_Layer","_jsxRuntime","blue","layerStyles","accuracy","circleColor","circleOpacity","circlePitchAlignment","circleRadiusTransition","duration","delay","white","circleRadius","UserLocationPuck","exports","memo","source","heading","jsxs","Fragment","children","jsx","Layer","type","id","testID","style","UserLocationPuckHeading","beforeId"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocationPuck.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA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AAG,GAAG;MAEnD;IAAE,CACH,CACF,eACD,IAAAH,WAAA,CAAAoB,GAAA,EAACrB,MAAA,CAAAsB,KAAK;MACJC,IAAI,EAAC,QAAQ;MACbC,EAAE,EAAC,+BAA+B;MAClCC,MAAM,EAAC,+BAA+B;MACtCT,MAAM,EAAEA,MAAO;MACfU,KAAK,EAAEvB,WAAW,CAACQ;IAAM,CAC1B,CAAC,eACF,IAAAV,WAAA,CAAAoB,GAAA,EAACrB,MAAA,CAAAsB,KAAK;MACJC,IAAI,EAAC,QAAQ;MACbC,EAAE,EAAC,8BAA8B;MACjCC,MAAM,EAAC,8BAA8B;MACrCT,MAAM,EAAEA,MAAO;MACfU,KAAK,EAAEvB,WAAW,CAACD;IAAK,CACzB,CAAC,EACD,OAAOe,OAAO,KAAK,QAAQ,iBAC1B,IAAAhB,WAAA,CAAAoB,GAAA,EAACtB,wBAAA,CAAA4B,uBAAuB;MACtBX,MAAM,EAAEA,MAAO;MACfY,QAAQ,EAAC,+BAA+B;MACxCX,OAAO,EAAEA;IAAQ,CAClB,CACF;EAAA,CACD,CAAC;AAEP,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_UserLocationPuckHeading","_Layer","_jsxRuntime","blue","layerStyles","accuracy","circleColor","circleOpacity","circlePitchAlignment","circleRadiusTransition","duration","delay","white","circleRadius","UserLocationPuck","exports","memo","source","heading","jsxs","Fragment","children","jsx","Layer","type","id","testID","style","UserLocationPuckHeading","beforeId"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocationPuck.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAAuC,IAAAG,WAAA,GAAAH,OAAA;AAEvC,MAAMI,IAAI,GAAG,SAAS;AAEtB,MAAMC,WAAW,GAAG;EAClBC,QAAQ,EAAE;IACRC,WAAW,EAAEH,IAAI;IACjBI,aAAa,EAAE,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W,CAACQ;IAAM,CAC1B,CAAC,eACF,IAAAV,WAAA,CAAAoB,GAAA,EAACrB,MAAA,CAAAsB,KAAK;MACJC,IAAI,EAAC,QAAQ;MACbC,EAAE,EAAC,8BAA8B;MACjCC,MAAM,EAAC,8BAA8B;MACrCT,MAAM,EAAEA,MAAO;MACfU,KAAK,EAAEvB,WAAW,CAACD;IAAK,CACzB,CAAC,EACD,OAAOe,OAAO,KAAK,QAAQ,iBAC1B,IAAAhB,WAAA,CAAAoB,GAAA,EAACtB,wBAAA,CAAA4B,uBAAuB;MACtBX,MAAM,EAAEA,MAAO;MACfY,QAAQ,EAAC,+BAA+B;MACxCX,OAAO,EAAEA;IAAQ,CAClB,CACF;EAAA,CACD,CAAC;AAEP,CACF,CAAC","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.UserLocationPuckHeading = void 0;
7
7
  var _react = require("react");
8
8
  var _heading = _interopRequireDefault(require("../../assets/heading.png"));
9
- var _Layer = require("../layers/Layer.js");
9
+ var _Layer = require("../layer/Layer.js");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  const layerStyle = {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_heading","_interopRequireDefault","_Layer","_jsxRuntime","e","__esModule","default","layerStyle","iconImage","headingIcon","iconAllowOverlap","iconPitchAlignment","iconRotationAlignment","UserLocationPuckHeading","exports","memo","source","beforeId","heading","jsx","Layer","type","id","testID","style","iconRotate"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocationPuckHeading.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,MAAA,GAAAH,OAAA;AAAwC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAExC,MAAMG,UAA4B,GAAG;EACnCC,SAAS,EAAEC,gBAAW;EACtBC,gBAAgB,EAAE,IAAI;EACtBC,kBAAkB,EAAE,KAAK;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAQM,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,gBAAG,IAAAE,WAAI,EACzC,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,kBAC1D,IAAAf,WAAA,CAAAgB,GAAA,EAACjB,MAAA,CAAAkB,KAAK;EACJC,IAAI,EAAC,QAAQ;EACbC,EAAE,EAAC,iCAAiC;EACpCC,MAAM,EAAC,iCAAiC;EACxCP,MAAM,EAAEA,MAAO;EACfC,QAAQ,EAAEA,QAAS;EACnBO,KAAK,EAAE;IACL,GAAGjB,UAAU;IACbkB,UAAU,EAAEP;EACd;AAAE,CACH,CAEL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_heading","_interopRequireDefault","_Layer","_jsxRuntime","e","__esModule","default","layerStyle","iconImage","headingIcon","iconAllowOverlap","iconPitchAlignment","iconRotationAlignment","UserLocationPuckHeading","exports","memo","source","beforeId","heading","jsx","Layer","type","id","testID","style","iconRotate"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocationPuckHeading.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,MAAA,GAAAH,OAAA;AAAuC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvC,MAAMG,UAA4B,GAAG;EACnCC,SAAS,EAAEC,gBAAW;EACtBC,gBAAgB,EAAE,IAAI;EACtBC,kBAAkB,EAAE,KAAK;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAQM,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,gBAAG,IAAAE,WAAI,EACzC,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,kBAC1D,IAAAf,WAAA,CAAAgB,GAAA,EAACjB,MAAA,CAAAkB,KAAK;EACJC,IAAI,EAAC,QAAQ;EACbC,EAAE,EAAC,iCAAiC;EACpCC,MAAM,EAAC,iCAAiC;EACxCP,MAAM,EAAEA,MAAO;EACfC,QAAQ,EAAEA,QAAS;EACnBO,KAAK,EAAE;IACL,GAAGjB,UAAU;IACbkB,UAAU,EAAEP;EACd;AAAE,CACH,CAEL,CAAC","ignoreList":[]}
@@ -147,7 +147,7 @@ var _ImageSource = require("./components/sources/image-source/ImageSource.js");
147
147
  var _GeoJSONSource = require("./components/sources/geojson-source/GeoJSONSource.js");
148
148
  var _RasterSource = require("./components/sources/raster-source/RasterSource.js");
149
149
  var _VectorSource = require("./components/sources/vector-source/VectorSource.js");
150
- var _Layer = require("./components/layers/Layer.js");
150
+ var _Layer = require("./components/layer/Layer.js");
151
151
  var _Images = require("./components/images/Images.js");
152
152
  var _Marker = require("./components/annotations/marker/Marker.js");
153
153
  var _LocationManager = require("./modules/location/LocationManager.js");
@@ -1 +1 @@
1
- {"version":3,"names":["_Camera","require","_Map","_ViewAnnotation","_LayerAnnotation","_Callout","_UserLocation","_NativeUserLocation","_useCurrentPosition","_ImageSource","_GeoJSONSource","_RasterSource","_VectorSource","_Layer","_Images","_Marker","_LocationManager","_LogManager","_NetworkManager","_OfflineManager","_OfflinePack","_StaticMapManager","_Animated"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAiBA,IAAAC,IAAA,GAAAD,OAAA;AAQA,IAAAE,eAAA,GAAAF,OAAA;AAOA,IAAAG,gBAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAEA,IAAAQ,YAAA,GAAAR,OAAA;AAKA,IAAAS,cAAA,GAAAT,OAAA;AAMA,IAAAU,aAAA,GAAAV,OAAA;AAKA,IAAAW,aAAA,GAAAX,OAAA;AAMA,IAAAY,MAAA,GAAAZ,OAAA;AAeA,IAAAa,OAAA,GAAAb,OAAA;AAOA,IAAAc,OAAA,GAAAd,OAAA;AAKA,IAAAe,gBAAA,GAAAf,OAAA;AAKA,IAAAgB,WAAA,GAAAhB,OAAA;AAEA,IAAAiB,eAAA,GAAAjB,OAAA;AAEA,IAAAkB,eAAA,GAAAlB,OAAA;AAQA,IAAAmB,YAAA,GAAAnB,OAAA;AAKA,IAAAoB,iBAAA,GAAApB,OAAA;AA8BA,IAAAqB,SAAA,GAAArB,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_Camera","require","_Map","_ViewAnnotation","_LayerAnnotation","_Callout","_UserLocation","_NativeUserLocation","_useCurrentPosition","_ImageSource","_GeoJSONSource","_RasterSource","_VectorSource","_Layer","_Images","_Marker","_LocationManager","_LogManager","_NetworkManager","_OfflineManager","_OfflinePack","_StaticMapManager","_Animated"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAiBA,IAAAC,IAAA,GAAAD,OAAA;AAQA,IAAAE,eAAA,GAAAF,OAAA;AAOA,IAAAG,gBAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAEA,IAAAQ,YAAA,GAAAR,OAAA;AAKA,IAAAS,cAAA,GAAAT,OAAA;AAMA,IAAAU,aAAA,GAAAV,OAAA;AAKA,IAAAW,aAAA,GAAAX,OAAA;AAMA,IAAAY,MAAA,GAAAZ,OAAA;AA+CA,IAAAa,OAAA,GAAAb,OAAA;AAOA,IAAAc,OAAA,GAAAd,OAAA;AAKA,IAAAe,gBAAA,GAAAf,OAAA;AAKA,IAAAgB,WAAA,GAAAhB,OAAA;AAEA,IAAAiB,eAAA,GAAAjB,OAAA;AAEA,IAAAkB,eAAA,GAAAlB,OAAA;AAQA,IAAAmB,YAAA,GAAAnB,OAAA;AAKA,IAAAoB,iBAAA,GAAApB,OAAA;AA8BA,IAAAqB,SAAA,GAAArB,OAAA","ignoreList":[]}
@@ -10,7 +10,7 @@ var _AnimatedExtractCoordinateFromArray = require("./AnimatedExtractCoordinateFr
10
10
  var _AnimatedGeoJSON = require("./AnimatedGeoJSON.js");
11
11
  var _AnimatedRouteCoordinatesArray = require("./AnimatedRouteCoordinatesArray.js");
12
12
  var _Marker = require("../../components/annotations/marker/Marker.js");
13
- var _Layer = require("../../components/layers/Layer.js");
13
+ var _Layer = require("../../components/layer/Layer.js");
14
14
  var _GeoJSONSource = require("../../components/sources/geojson-source/GeoJSONSource.js");
15
15
  var _ImageSource = require("../../components/sources/image-source/ImageSource.js");
16
16
  const Animated = exports.Animated = {
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.convertToInternalStyle = convertToInternalStyle;
7
+ exports.mergeStyleProps = mergeStyleProps;
8
+ /**
9
+ * Converts a kebab-case string to camelCase.
10
+ *
11
+ * @example
12
+ * kebabToCamel('fill-color') // Returns: 'fillColor'
13
+ * kebabToCamel('line-gap-width') // Returns: 'lineGapWidth'
14
+ */
15
+ function kebabToCamel(str) {
16
+ return str.replace(/-([a-z])/g, (_, char) => char.toUpperCase());
17
+ }
18
+
19
+ /**
20
+ * Converts style spec compliant paint/layout objects (kebab-case)
21
+ * to internal style format (camelCase).
22
+ *
23
+ * @example
24
+ * convertToInternalStyle({ 'fill-color': 'red' })
25
+ * // Returns: { fillColor: 'red' }
26
+ */
27
+ function convertToInternalStyle(specStyle) {
28
+ if (!specStyle) {
29
+ return undefined;
30
+ }
31
+ const result = {};
32
+ for (const key of Object.keys(specStyle)) {
33
+ result[kebabToCamel(key)] = specStyle[key];
34
+ }
35
+ return result;
36
+ }
37
+
38
+ /**
39
+ * Merges paint and layout props into a single internal style object.
40
+ * Priority order (highest to lowest): paint > layout > style (deprecated)
41
+ */
42
+ function mergeStyleProps(paint, layout, deprecatedStyle) {
43
+ const convertedPaint = convertToInternalStyle(paint);
44
+ const convertedLayout = convertToInternalStyle(layout);
45
+
46
+ // If nothing provided, return undefined
47
+ if (!convertedPaint && !convertedLayout && !deprecatedStyle) {
48
+ return undefined;
49
+ }
50
+
51
+ // Merge: deprecated style has lowest precedence
52
+ return {
53
+ ...deprecatedStyle,
54
+ ...convertedLayout,
55
+ ...convertedPaint
56
+ };
57
+ }
58
+ //# sourceMappingURL=convertStyleSpec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["kebabToCamel","str","replace","_","char","toUpperCase","convertToInternalStyle","specStyle","undefined","result","key","Object","keys","mergeStyleProps","paint","layout","deprecatedStyle","convertedPaint","convertedLayout"],"sourceRoot":"../../../src","sources":["utils/convertStyleSpec.ts"],"mappings":";;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAYA,CAACC,GAAW,EAAU;EACzC,OAAOA,GAAG,CAACC,OAAO,CAAC,WAAW,EAAE,CAACC,CAAC,EAAEC,IAAI,KAAKA,IAAI,CAACC,WAAW,CAAC,CAAC,CAAC;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CACpCC,SAA8C,EACV;EACpC,IAAI,CAACA,SAAS,EAAE;IACd,OAAOC,SAAS;EAClB;EAEA,MAAMC,MAA+B,GAAG,CAAC,CAAC;EAE1C,KAAK,MAAMC,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACL,SAAS,CAAC,EAAE;IACxCE,MAAM,CAACT,YAAY,CAACU,GAAG,CAAC,CAAC,GAAGH,SAAS,CAACG,GAAG,CAAC;EAC5C;EAEA,OAAOD,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACO,SAASI,eAAeA,CAC7BC,KAA0C,EAC1CC,MAA2C,EAC3CC,eAA0C,EACf;EAC3B,MAAMC,cAAc,GAAGX,sBAAsB,CAACQ,KAAK,CAAC;EACpD,MAAMI,eAAe,GAAGZ,sBAAsB,CAACS,MAAM,CAAC;;EAEtD;EACA,IAAI,CAACE,cAAc,IAAI,CAACC,eAAe,IAAI,CAACF,eAAe,EAAE;IAC3D,OAAOR,SAAS;EAClB;;EAEA;EACA,OAAO;IACL,GAAGQ,eAAe;IAClB,GAAGE,eAAe;IAClB,GAAGD;EACL,CAAC;AACH","ignoreList":[]}