@rnmapbox/maps 10.1.0-beta.21 → 10.1.0-beta.22

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 (123) hide show
  1. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXCircleLayerManager.kt +8 -0
  2. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXFillLayerManager.kt +12 -5
  3. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXHeatmapLayerManager.kt +7 -0
  4. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXLayer.kt +25 -6
  5. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXLineLayerManager.kt +7 -0
  6. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXRasterLayer.kt +4 -0
  7. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXRasterLayerManager.kt +8 -2
  8. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSymbolLayerManager.kt +8 -0
  9. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/codeparts/LayerManagerCommonProps.codepart-kt.ejs +59 -0
  10. package/android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/Layer.kt +7 -0
  11. package/android/src/main/mapbox-v11-compat/v11/com/rnmapbox/rnmbx/v11compat/Layer.kt +3 -0
  12. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXCircleLayerManagerDelegate.java +9 -6
  13. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXCircleLayerManagerInterface.java +3 -2
  14. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXFillLayerManagerDelegate.java +9 -6
  15. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXFillLayerManagerInterface.java +3 -2
  16. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXHeatmapLayerManagerDelegate.java +9 -6
  17. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXHeatmapLayerManagerInterface.java +3 -2
  18. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXLineLayerManagerDelegate.java +9 -6
  19. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXLineLayerManagerInterface.java +3 -2
  20. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterLayerManagerDelegate.java +9 -6
  21. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterLayerManagerInterface.java +3 -2
  22. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXSymbolLayerManagerDelegate.java +9 -6
  23. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXSymbolLayerManagerInterface.java +3 -2
  24. package/ios/RNMBX/CommonLayerProperties.H +2 -0
  25. package/ios/RNMBX/RNMBXLayer.swift +27 -0
  26. package/lib/commonjs/components/CircleLayer.js +7 -2
  27. package/lib/commonjs/components/CircleLayer.js.map +1 -1
  28. package/lib/commonjs/components/FillLayer.js +7 -2
  29. package/lib/commonjs/components/FillLayer.js.map +1 -1
  30. package/lib/commonjs/components/HeatmapLayer.js +7 -2
  31. package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
  32. package/lib/commonjs/components/LineLayer.js +7 -2
  33. package/lib/commonjs/components/LineLayer.js.map +1 -1
  34. package/lib/commonjs/components/RasterLayer.js +7 -2
  35. package/lib/commonjs/components/RasterLayer.js.map +1 -1
  36. package/lib/commonjs/components/SkyLayer.js +2 -2
  37. package/lib/commonjs/components/SkyLayer.js.map +1 -1
  38. package/lib/commonjs/components/SymbolLayer.js +7 -2
  39. package/lib/commonjs/components/SymbolLayer.js.map +1 -1
  40. package/lib/commonjs/components/codeparts/LayerPropsCommon.codepart-tsx +62 -0
  41. package/lib/commonjs/specs/RNMBXCircleLayerNativeComponent.js +2 -0
  42. package/lib/commonjs/specs/RNMBXCircleLayerNativeComponent.js.map +1 -1
  43. package/lib/commonjs/specs/RNMBXFillLayerNativeComponent.js +2 -0
  44. package/lib/commonjs/specs/RNMBXFillLayerNativeComponent.js.map +1 -1
  45. package/lib/commonjs/specs/RNMBXHeatmapLayerNativeComponent.js +2 -0
  46. package/lib/commonjs/specs/RNMBXHeatmapLayerNativeComponent.js.map +1 -1
  47. package/lib/commonjs/specs/RNMBXLineLayerNativeComponent.js +2 -0
  48. package/lib/commonjs/specs/RNMBXLineLayerNativeComponent.js.map +1 -1
  49. package/lib/commonjs/specs/RNMBXRasterLayerNativeComponent.js +2 -0
  50. package/lib/commonjs/specs/RNMBXRasterLayerNativeComponent.js.map +1 -1
  51. package/lib/commonjs/specs/RNMBXSymbolLayerNativeComponent.js +2 -0
  52. package/lib/commonjs/specs/RNMBXSymbolLayerNativeComponent.js.map +1 -1
  53. package/lib/commonjs/specs/codeparts/CommonLayerNativeComponentsProps.codepart-ts +17 -0
  54. package/lib/module/components/CircleLayer.js +7 -2
  55. package/lib/module/components/CircleLayer.js.map +1 -1
  56. package/lib/module/components/FillLayer.js +7 -2
  57. package/lib/module/components/FillLayer.js.map +1 -1
  58. package/lib/module/components/HeatmapLayer.js +7 -2
  59. package/lib/module/components/HeatmapLayer.js.map +1 -1
  60. package/lib/module/components/LineLayer.js +7 -2
  61. package/lib/module/components/LineLayer.js.map +1 -1
  62. package/lib/module/components/RasterLayer.js +7 -2
  63. package/lib/module/components/RasterLayer.js.map +1 -1
  64. package/lib/module/components/SkyLayer.js +2 -2
  65. package/lib/module/components/SkyLayer.js.map +1 -1
  66. package/lib/module/components/SymbolLayer.js +7 -2
  67. package/lib/module/components/SymbolLayer.js.map +1 -1
  68. package/lib/module/components/codeparts/LayerPropsCommon.codepart-tsx +62 -0
  69. package/lib/module/specs/RNMBXCircleLayerNativeComponent.js +2 -1
  70. package/lib/module/specs/RNMBXCircleLayerNativeComponent.js.map +1 -1
  71. package/lib/module/specs/RNMBXFillLayerNativeComponent.js +2 -1
  72. package/lib/module/specs/RNMBXFillLayerNativeComponent.js.map +1 -1
  73. package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.js +2 -1
  74. package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.js.map +1 -1
  75. package/lib/module/specs/RNMBXLineLayerNativeComponent.js +2 -1
  76. package/lib/module/specs/RNMBXLineLayerNativeComponent.js.map +1 -1
  77. package/lib/module/specs/RNMBXRasterLayerNativeComponent.js +2 -1
  78. package/lib/module/specs/RNMBXRasterLayerNativeComponent.js.map +1 -1
  79. package/lib/module/specs/RNMBXSymbolLayerNativeComponent.js +2 -1
  80. package/lib/module/specs/RNMBXSymbolLayerNativeComponent.js.map +1 -1
  81. package/lib/module/specs/codeparts/CommonLayerNativeComponentsProps.codepart-ts +17 -0
  82. package/lib/typescript/src/components/CircleLayer.d.ts +11 -3
  83. package/lib/typescript/src/components/CircleLayer.d.ts.map +1 -1
  84. package/lib/typescript/src/components/FillLayer.d.ts +10 -1
  85. package/lib/typescript/src/components/FillLayer.d.ts.map +1 -1
  86. package/lib/typescript/src/components/HeatmapLayer.d.ts +12 -4
  87. package/lib/typescript/src/components/HeatmapLayer.d.ts.map +1 -1
  88. package/lib/typescript/src/components/LineLayer.d.ts +10 -1
  89. package/lib/typescript/src/components/LineLayer.d.ts.map +1 -1
  90. package/lib/typescript/src/components/MapView.d.ts +5 -1
  91. package/lib/typescript/src/components/MapView.d.ts.map +1 -1
  92. package/lib/typescript/src/components/RasterLayer.d.ts +11 -2
  93. package/lib/typescript/src/components/RasterLayer.d.ts.map +1 -1
  94. package/lib/typescript/src/components/SymbolLayer.d.ts +17 -5
  95. package/lib/typescript/src/components/SymbolLayer.d.ts.map +1 -1
  96. package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts +6 -3
  97. package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts.map +1 -1
  98. package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts +13 -10
  99. package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts.map +1 -1
  100. package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts +13 -10
  101. package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts.map +1 -1
  102. package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts +13 -10
  103. package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts.map +1 -1
  104. package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts +13 -10
  105. package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts.map +1 -1
  106. package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts +13 -10
  107. package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts.map +1 -1
  108. package/package.json +1 -1
  109. package/src/components/CircleLayer.tsx +17 -5
  110. package/src/components/FillLayer.tsx +16 -3
  111. package/src/components/HeatmapLayer.tsx +18 -6
  112. package/src/components/LineLayer.tsx +16 -3
  113. package/src/components/RasterLayer.tsx +17 -4
  114. package/src/components/SkyLayer.tsx +2 -2
  115. package/src/components/SymbolLayer.tsx +26 -7
  116. package/src/components/codeparts/LayerPropsCommon.codepart-tsx +62 -0
  117. package/src/specs/RNMBXCircleLayerNativeComponent.ts +9 -3
  118. package/src/specs/RNMBXFillLayerNativeComponent.ts +17 -11
  119. package/src/specs/RNMBXHeatmapLayerNativeComponent.ts +17 -11
  120. package/src/specs/RNMBXLineLayerNativeComponent.ts +17 -11
  121. package/src/specs/RNMBXRasterLayerNativeComponent.ts +17 -11
  122. package/src/specs/RNMBXSymbolLayerNativeComponent.ts +17 -11
  123. package/src/specs/codeparts/CommonLayerNativeComponentsProps.codepart-ts +17 -0
@@ -2,18 +2,21 @@ import type { HostComponent, ViewProps } from 'react-native';
2
2
  import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
3
  import type { UnsafeMixed } from './codegenUtils';
4
4
  declare type OptionalProp<T> = UnsafeMixed<T>;
5
- export interface NativeProps extends ViewProps {
6
- id: UnsafeMixed<string>;
7
- sourceID?: OptionalProp<string>;
8
- existing?: OptionalProp<boolean>;
5
+ declare type CommonProps = {
6
+ sourceID: OptionalProp<string>;
7
+ existing: OptionalProp<boolean>;
9
8
  filter: UnsafeMixed<any[]>;
10
- aboveLayerID?: OptionalProp<string>;
11
- belowLayerID?: OptionalProp<string>;
12
- layerIndex?: OptionalProp<Int32>;
9
+ aboveLayerID: OptionalProp<string>;
10
+ belowLayerID: OptionalProp<string>;
11
+ layerIndex: OptionalProp<Int32>;
12
+ maxZoomLevel: OptionalProp<Double>;
13
+ minZoomLevel: OptionalProp<Double>;
14
+ sourceLayerID: OptionalProp<string>;
15
+ slot: OptionalProp<string>;
16
+ };
17
+ export interface NativeProps extends ViewProps, CommonProps {
18
+ id?: OptionalProp<string>;
13
19
  reactStyle: UnsafeMixed<any>;
14
- maxZoomLevel?: OptionalProp<Double>;
15
- minZoomLevel?: OptionalProp<Double>;
16
- sourceLayerID?: OptionalProp<string>;
17
20
  }
18
21
  declare const _default: HostComponent<NativeProps>;
19
22
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RNMBXFillLayerNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXFillLayerNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,aAAK,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,EAAE,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,C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AAM,CAAC,CAAC;IACnC,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC5B,CAAC;AAGF,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,WAAW;IACzD,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;CAC9B;;AAED,wBAEgC"}
@@ -2,18 +2,21 @@ import type { HostComponent, ViewProps } from 'react-native';
2
2
  import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
3
  import type { UnsafeMixed } from './codegenUtils';
4
4
  declare type OptionalProp<T> = UnsafeMixed<T>;
5
- export interface NativeProps extends ViewProps {
6
- id: OptionalProp<string>;
7
- sourceID?: OptionalProp<string>;
8
- existing?: OptionalProp<boolean>;
5
+ declare type CommonProps = {
6
+ sourceID: OptionalProp<string>;
7
+ existing: OptionalProp<boolean>;
9
8
  filter: UnsafeMixed<any[]>;
10
- aboveLayerID?: OptionalProp<string>;
11
- belowLayerID?: OptionalProp<string>;
12
- layerIndex?: OptionalProp<Int32>;
9
+ aboveLayerID: OptionalProp<string>;
10
+ belowLayerID: OptionalProp<string>;
11
+ layerIndex: OptionalProp<Int32>;
12
+ maxZoomLevel: OptionalProp<Double>;
13
+ minZoomLevel: OptionalProp<Double>;
14
+ sourceLayerID: OptionalProp<string>;
15
+ slot: OptionalProp<string>;
16
+ };
17
+ export interface NativeProps extends ViewProps, CommonProps {
18
+ id?: OptionalProp<string>;
13
19
  reactStyle: UnsafeMixed<any>;
14
- maxZoomLevel?: OptionalProp<Double>;
15
- minZoomLevel?: OptionalProp<Double>;
16
- sourceLayerID?: OptionalProp<string>;
17
20
  }
18
21
  declare const _default: HostComponent<NativeProps>;
19
22
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RNMBXHeatmapLayerNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXHeatmapLayerNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,aAAK,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;IAE3B,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IACjC,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAE7B,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACtC;;AAED,wBAEgC"}
1
+ {"version":3,"file":"RNMBXHeatmapLayerNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXHeatmapLayerNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,aAAK,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEtC,aAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAChC,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;IAE3B,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IAEhC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC5B,CAAC;AAGF,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,WAAW;IACzD,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;CAC9B;;AAED,wBAEgC"}
@@ -2,18 +2,21 @@ import type { HostComponent, ViewProps } from 'react-native';
2
2
  import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
3
  import type { UnsafeMixed } from './codegenUtils';
4
4
  declare type OptionalProp<T> = UnsafeMixed<T>;
5
- export interface NativeProps extends ViewProps {
6
- id: UnsafeMixed<string>;
7
- sourceID?: OptionalProp<string>;
8
- existing?: OptionalProp<boolean>;
5
+ declare type CommonProps = {
6
+ sourceID: OptionalProp<string>;
7
+ existing: OptionalProp<boolean>;
9
8
  filter: UnsafeMixed<any[]>;
10
- aboveLayerID?: OptionalProp<string>;
11
- belowLayerID?: OptionalProp<string>;
12
- layerIndex?: OptionalProp<Int32>;
9
+ aboveLayerID: OptionalProp<string>;
10
+ belowLayerID: OptionalProp<string>;
11
+ layerIndex: OptionalProp<Int32>;
12
+ maxZoomLevel: OptionalProp<Double>;
13
+ minZoomLevel: OptionalProp<Double>;
14
+ sourceLayerID: OptionalProp<string>;
15
+ slot: OptionalProp<string>;
16
+ };
17
+ export interface NativeProps extends ViewProps, CommonProps {
18
+ id?: OptionalProp<string>;
13
19
  reactStyle: UnsafeMixed<any>;
14
- maxZoomLevel?: OptionalProp<Double>;
15
- minZoomLevel?: OptionalProp<Double>;
16
- sourceLayerID?: OptionalProp<string>;
17
20
  }
18
21
  declare const _default: HostComponent<NativeProps>;
19
22
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RNMBXLineLayerNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXLineLayerNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,aAAK,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,EAAE,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;IAE3B,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IACjC,UAAU,EAAE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AE,WAAW,CAAC,GAAG,CAAC,CAAC;CAC9B;;AAED,wBAEgC"}
@@ -2,18 +2,21 @@ import type { HostComponent, ViewProps } from 'react-native';
2
2
  import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
3
  import type { UnsafeMixed } from './codegenUtils';
4
4
  declare type OptionalProp<T> = UnsafeMixed<T>;
5
- export interface NativeProps extends ViewProps {
6
- id: OptionalProp<string>;
7
- sourceID?: OptionalProp<string>;
8
- existing?: OptionalProp<boolean>;
5
+ declare type CommonProps = {
6
+ sourceID: OptionalProp<string>;
7
+ existing: OptionalProp<boolean>;
9
8
  filter: UnsafeMixed<any[]>;
10
- aboveLayerID?: OptionalProp<string>;
11
- belowLayerID?: OptionalProp<string>;
12
- layerIndex?: OptionalProp<Int32>;
9
+ aboveLayerID: OptionalProp<string>;
10
+ belowLayerID: OptionalProp<string>;
11
+ layerIndex: OptionalProp<Int32>;
12
+ maxZoomLevel: OptionalProp<Double>;
13
+ minZoomLevel: OptionalProp<Double>;
14
+ sourceLayerID: OptionalProp<string>;
15
+ slot: OptionalProp<string>;
16
+ };
17
+ export interface NativeProps extends ViewProps, CommonProps {
18
+ id?: OptionalProp<string>;
13
19
  reactStyle: UnsafeMixed<any>;
14
- maxZoomLevel?: OptionalProp<Double>;
15
- minZoomLevel?: OptionalProp<Double>;
16
- sourceLayerID?: OptionalProp<string>;
17
20
  }
18
21
  declare const _default: HostComponent<NativeProps>;
19
22
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RNMBXRasterLayerNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXRasterLayerNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,aAAK,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EAAE,CAAC,CAAC;IAE3B,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IAEhC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC5B,CAAC;AAGF,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,WAAW;IACzD,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;CAC9B;;AAED,wBAEgC"}
@@ -2,18 +2,21 @@ import type { HostComponent, ViewProps } from 'react-native';
2
2
  import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
3
  import type { UnsafeMixed } from './codegenUtils';
4
4
  declare type OptionalProp<T> = UnsafeMixed<T>;
5
- export interface NativeProps extends ViewProps {
6
- id?: OptionalProp<string>;
7
- sourceID?: OptionalProp<string>;
8
- existing?: OptionalProp<boolean>;
5
+ declare type CommonProps = {
6
+ sourceID: OptionalProp<string>;
7
+ existing: OptionalProp<boolean>;
9
8
  filter: UnsafeMixed<any[]>;
10
- aboveLayerID?: OptionalProp<string>;
11
- belowLayerID?: OptionalProp<string>;
12
- layerIndex?: OptionalProp<Int32>;
9
+ aboveLayerID: OptionalProp<string>;
10
+ belowLayerID: OptionalProp<string>;
11
+ layerIndex: OptionalProp<Int32>;
12
+ maxZoomLevel: OptionalProp<Double>;
13
+ minZoomLevel: OptionalProp<Double>;
14
+ sourceLayerID: OptionalProp<string>;
15
+ slot: OptionalProp<string>;
16
+ };
17
+ export interface NativeProps extends ViewProps, CommonProps {
18
+ id?: OptionalProp<string>;
13
19
  reactStyle: UnsafeMixed<any>;
14
- maxZoomLevel?: OptionalProp<Double>;
15
- minZoomLevel?: OptionalProp<Double>;
16
- sourceLayerID?: OptionalProp<string>;
17
20
  }
18
21
  declare const _default: HostComponent<NativeProps>;
19
22
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RNMBXSymbolLayerNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXSymbolLayerNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,aAAK,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;IAE3B,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IACjC,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAE7B,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACtC;;AAED,wBAEgC"}
1
+ {"version":3,"file":"RNMBXSymbolLayerNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXSymbolLayerNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,aAAK,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEtC,aAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAChC,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;IAE3B,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IAEhC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC5B,CAAC;AAGF,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,WAAW;IACzD,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;CAC9B;;AAED,wBAEgC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rnmapbox/maps",
3
3
  "description": "A Mapbox react native module for creating custom maps",
4
- "version": "10.1.0-beta.21",
4
+ "version": "10.1.0-beta.22",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -7,9 +7,12 @@ import RNMBXCircleLayerNativeComponent from '../specs/RNMBXCircleLayerNativeComp
7
7
 
8
8
  import AbstractLayer from './AbstractLayer';
9
9
 
10
- const MapboxGL = NativeModules.RNMBXModule;
10
+ const Mapbox = NativeModules.RNMBXModule;
11
11
 
12
- export type Props = {
12
+ // @{codepart-replace-start(LayerPropsCommon.codepart-tsx)}
13
+ type Slot = 'bottom' | 'middle' | 'top';
14
+
15
+ type LayerPropsCommon = {
13
16
  /**
14
17
  * A string that uniquely identifies the source in the style to which it is added.
15
18
  */
@@ -28,8 +31,7 @@ export type Props = {
28
31
  sourceID?: string;
29
32
 
30
33
  /**
31
- * Identifier of the layer within the source identified by the sourceID property
32
- * from which the receiver obtains the data to style.
34
+ * Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
33
35
  */
34
36
  sourceLayerID?: string;
35
37
 
@@ -63,6 +65,16 @@ export type Props = {
63
65
  */
64
66
  maxZoomLevel?: number;
65
67
 
68
+ /**
69
+ * The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
70
+ *
71
+ * v11 only
72
+ */
73
+ slot?: Slot;
74
+ };
75
+ // @{codepart-replace-end}
76
+
77
+ export type Props = LayerPropsCommon & {
66
78
  /**
67
79
  * Customizable style attributes
68
80
  */
@@ -78,7 +90,7 @@ type NativeTypeProps = Omit<Props, 'style'> & {
78
90
  */
79
91
  class CircleLayer extends AbstractLayer<Props, NativeTypeProps> {
80
92
  static defaultProps = {
81
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
93
+ sourceID: Mapbox.StyleSource.DefaultSourceID,
82
94
  };
83
95
 
84
96
  render() {
@@ -7,9 +7,12 @@ import RNMBXFillLayerNativeComponent from '../specs/RNMBXFillLayerNativeComponen
7
7
 
8
8
  import AbstractLayer from './AbstractLayer';
9
9
 
10
- const MapboxGL = NativeModules.RNMBXModule;
10
+ const Mapbox = NativeModules.RNMBXModule;
11
11
 
12
- export type Props = {
12
+ // @{codepart-replace-start(LayerPropsCommon.codepart-tsx)}
13
+ type Slot = 'bottom' | 'middle' | 'top';
14
+
15
+ type LayerPropsCommon = {
13
16
  /**
14
17
  * A string that uniquely identifies the source in the style to which it is added.
15
18
  */
@@ -62,6 +65,16 @@ export type Props = {
62
65
  */
63
66
  maxZoomLevel?: number;
64
67
 
68
+ /**
69
+ * The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
70
+ *
71
+ * v11 only
72
+ */
73
+ slot?: Slot;
74
+ };
75
+ // @{codepart-replace-end}
76
+
77
+ export type Props = LayerPropsCommon & {
65
78
  /**
66
79
  * Customizable style attributes
67
80
  */
@@ -77,7 +90,7 @@ type NativeTypeProps = Omit<Props, 'style'> & {
77
90
  */
78
91
  class FillLayer extends AbstractLayer<Props, NativeTypeProps> {
79
92
  static defaultProps = {
80
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
93
+ sourceID: Mapbox.StyleSource.DefaultSourceID,
81
94
  };
82
95
 
83
96
  render() {
@@ -10,11 +10,14 @@ import RNMBXHeatmapLayerNativeComponent from '../specs/RNMBXHeatmapLayerNativeCo
10
10
 
11
11
  import AbstractLayer from './AbstractLayer';
12
12
 
13
- const MapboxGL = NativeModules.RNMBXModule;
13
+ const Mapbox = NativeModules.RNMBXModule;
14
14
 
15
- export type Props = {
15
+ // @{codepart-replace-start(LayerPropsCommon.codepart-tsx)}
16
+ type Slot = 'bottom' | 'middle' | 'top';
17
+
18
+ type LayerPropsCommon = {
16
19
  /**
17
- * A string that uniquely identifies the layer in the style to which it is added.
20
+ * A string that uniquely identifies the source in the style to which it is added.
18
21
  */
19
22
  id: string;
20
23
 
@@ -31,8 +34,7 @@ export type Props = {
31
34
  sourceID?: string;
32
35
 
33
36
  /**
34
- * Identifier of the layer within the source identified by the sourceID property
35
- * from which the receiver obtains the data to style.
37
+ * Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
36
38
  */
37
39
  sourceLayerID?: string;
38
40
 
@@ -66,6 +68,16 @@ export type Props = {
66
68
  */
67
69
  maxZoomLevel?: number;
68
70
 
71
+ /**
72
+ * The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
73
+ *
74
+ * v11 only
75
+ */
76
+ slot?: Slot;
77
+ };
78
+ // @{codepart-replace-end}
79
+
80
+ export type Props = LayerPropsCommon & {
69
81
  /**
70
82
  * Customizable style attributes
71
83
  */
@@ -81,7 +93,7 @@ type NativeTypeProps = Omit<Props, 'style'> & {
81
93
  */
82
94
  class HeatmapLayer extends AbstractLayer<Props, NativeTypeProps> {
83
95
  static defaultProps = {
84
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
96
+ sourceID: Mapbox.StyleSource.DefaultSourceID,
85
97
  };
86
98
 
87
99
  render() {
@@ -7,9 +7,12 @@ import RNMBXLineLayerNativeComponent from '../specs/RNMBXLineLayerNativeComponen
7
7
 
8
8
  import AbstractLayer from './AbstractLayer';
9
9
 
10
- const MapboxGL = NativeModules.RNMBXModule;
10
+ const Mapbox = NativeModules.RNMBXModule;
11
11
 
12
- export type Props = {
12
+ // @{codepart-replace-start(LayerPropsCommon.codepart-tsx)}
13
+ type Slot = 'bottom' | 'middle' | 'top';
14
+
15
+ type LayerPropsCommon = {
13
16
  /**
14
17
  * A string that uniquely identifies the source in the style to which it is added.
15
18
  */
@@ -62,6 +65,16 @@ export type Props = {
62
65
  */
63
66
  maxZoomLevel?: number;
64
67
 
68
+ /**
69
+ * The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
70
+ *
71
+ * v11 only
72
+ */
73
+ slot?: Slot;
74
+ };
75
+ // @{codepart-replace-end}
76
+
77
+ export type Props = LayerPropsCommon & {
65
78
  /**
66
79
  * Customizable style attributes
67
80
  */
@@ -77,7 +90,7 @@ type NativeTypeProps = Omit<Props, 'style'> & {
77
90
  */
78
91
  class LineLayer extends AbstractLayer<Props, NativeTypeProps> {
79
92
  static defaultProps = {
80
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
93
+ sourceID: Mapbox.StyleSource.DefaultSourceID,
81
94
  };
82
95
 
83
96
  render() {
@@ -7,11 +7,14 @@ import RNMBXRasterLayerNativeComponent from '../specs/RNMBXRasterLayerNativeComp
7
7
 
8
8
  import AbstractLayer from './AbstractLayer';
9
9
 
10
- const MapboxGL = NativeModules.RNMBXModule;
10
+ const Mapbox = NativeModules.RNMBXModule;
11
11
 
12
- export type Props = {
12
+ // @{codepart-replace-start(LayerPropsCommon.codepart-tsx)}
13
+ type Slot = 'bottom' | 'middle' | 'top';
14
+
15
+ type LayerPropsCommon = {
13
16
  /**
14
- * A string that uniquely identifies the layer in the style to which it is added.
17
+ * A string that uniquely identifies the source in the style to which it is added.
15
18
  */
16
19
  id: string;
17
20
 
@@ -62,6 +65,16 @@ export type Props = {
62
65
  */
63
66
  maxZoomLevel?: number;
64
67
 
68
+ /**
69
+ * The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
70
+ *
71
+ * v11 only
72
+ */
73
+ slot?: Slot;
74
+ };
75
+ // @{codepart-replace-end}
76
+
77
+ export type Props = LayerPropsCommon & {
65
78
  /**
66
79
  * Customizable style attributes
67
80
  */
@@ -74,7 +87,7 @@ type NativeTypeProps = Omit<Props, 'style'> & {
74
87
 
75
88
  class RasterLayer extends AbstractLayer<Props, NativeTypeProps> {
76
89
  static defaultProps = {
77
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
90
+ sourceID: Mapbox.StyleSource.DefaultSourceID,
78
91
  };
79
92
 
80
93
  render() {
@@ -7,7 +7,7 @@ import RNMBXSkyLayerNativeComponent from '../specs/RNMBXSkyLayerNativeComponent'
7
7
 
8
8
  import AbstractLayer from './AbstractLayer';
9
9
 
10
- const MapboxGL = NativeModules.RNMBXModule;
10
+ const Mapbox = NativeModules.RNMBXModule;
11
11
 
12
12
  export type Props = {
13
13
  /**
@@ -60,7 +60,7 @@ type NativeTypeProps = Omit<Props, 'style'> & {
60
60
  */
61
61
  class SkyLayer extends AbstractLayer<Props, NativeTypeProps> {
62
62
  static defaultProps = {
63
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
63
+ sourceID: Mapbox.StyleSource.DefaultSourceID,
64
64
  };
65
65
 
66
66
  render() {
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
2
  import { View, NativeModules } from 'react-native';
3
3
 
4
- import { Expression, type SymbolLayerStyleProps } from '../utils/MapboxStyles';
4
+ import {
5
+ type FilterExpression,
6
+ type SymbolLayerStyleProps,
7
+ } from '../utils/MapboxStyles';
5
8
  import { type StyleValue } from '../utils/StyleValue';
6
9
  import RNMBXSymbolLayerNativeComponent from '../specs/RNMBXSymbolLayerNativeComponent';
7
10
 
@@ -9,11 +12,14 @@ import AbstractLayer from './AbstractLayer';
9
12
 
10
13
  export const NATIVE_MODULE_NAME = 'RNMBXSymbolLayer';
11
14
 
12
- const MapboxGL = NativeModules.RNMBXModule;
15
+ const Mapbox = NativeModules.RNMBXModule;
13
16
 
14
- export type Props = {
17
+ // @{codepart-replace-start(LayerPropsCommon.codepart-tsx)}
18
+ type Slot = 'bottom' | 'middle' | 'top';
19
+
20
+ type LayerPropsCommon = {
15
21
  /**
16
- * A string that uniquely identifies the layer in the style to which it is added.
22
+ * A string that uniquely identifies the source in the style to which it is added.
17
23
  */
18
24
  id: string;
19
25
 
@@ -52,7 +58,7 @@ export type Props = {
52
58
  /**
53
59
  * Filter only the features in the source layer that satisfy a condition that you define
54
60
  */
55
- filter?: Expression;
61
+ filter?: FilterExpression;
56
62
 
57
63
  /**
58
64
  * The minimum zoom level at which the layer gets parsed and appears.
@@ -64,7 +70,20 @@ export type Props = {
64
70
  */
65
71
  maxZoomLevel?: number;
66
72
 
67
- style?: SymbolLayerStyleProps;
73
+ /**
74
+ * The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
75
+ *
76
+ * v11 only
77
+ */
78
+ slot?: Slot;
79
+ };
80
+ // @{codepart-replace-end}
81
+
82
+ export type Props = LayerPropsCommon & {
83
+ /**
84
+ * Customizable style attributes
85
+ */
86
+ style: SymbolLayerStyleProps;
68
87
 
69
88
  /**
70
89
  * @deprecated passed children used to create an image with id of symbol in style and also set the iconImageName property accordingly.
@@ -83,7 +102,7 @@ type NativeTypeProps = Omit<Props, 'style'> & {
83
102
  */
84
103
  export class SymbolLayer extends AbstractLayer<Props, NativeTypeProps> {
85
104
  static defaultProps = {
86
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
105
+ sourceID: Mapbox.StyleSource.DefaultSourceID,
87
106
  };
88
107
  deprecationLogged: { snapshot: boolean } = { snapshot: false };
89
108
 
@@ -0,0 +1,62 @@
1
+ type Slot = 'bottom' | 'middle' | 'top';
2
+
3
+ type LayerPropsCommon = {
4
+ /**
5
+ * A string that uniquely identifies the source in the style to which it is added.
6
+ */
7
+ id: string;
8
+
9
+ /**
10
+ * The id refers to en existing layer in the style. Does not create a new layer.
11
+ */
12
+ existing?: boolean;
13
+
14
+ /**
15
+ * The source from which to obtain the data to style.
16
+ * If the source has not yet been added to the current style, the behavior is undefined.
17
+ * Inferred from parent source only if the layer is a direct child to it.
18
+ */
19
+ sourceID?: string;
20
+
21
+ /**
22
+ * Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
23
+ */
24
+ sourceLayerID?: string;
25
+
26
+ /**
27
+ * Inserts a layer above aboveLayerID.
28
+ */
29
+ aboveLayerID?: string;
30
+
31
+ /**
32
+ * Inserts a layer below belowLayerID
33
+ */
34
+ belowLayerID?: string;
35
+
36
+ /**
37
+ * Inserts a layer at a specified index
38
+ */
39
+ layerIndex?: number;
40
+
41
+ /**
42
+ * Filter only the features in the source layer that satisfy a condition that you define
43
+ */
44
+ filter?: FilterExpression;
45
+
46
+ /**
47
+ * The minimum zoom level at which the layer gets parsed and appears.
48
+ */
49
+ minZoomLevel?: number;
50
+
51
+ /**
52
+ * The maximum zoom level at which the layer gets parsed and appears.
53
+ */
54
+ maxZoomLevel?: number;
55
+
56
+ /**
57
+ * The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
58
+ *
59
+ * v11 only
60
+ */
61
+ slot?: Slot;
62
+ };
@@ -4,11 +4,11 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
4
 
5
5
  import type { UnsafeMixed } from './codegenUtils';
6
6
 
7
+ // @{codepart-replace-start(CommonLayerNativeComponentsProps.codepart-ts)}
7
8
  // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
8
9
  type OptionalProp<T> = UnsafeMixed<T>;
9
10
 
10
- export interface NativeProps extends ViewProps {
11
- id: UnsafeMixed<string>;
11
+ type CommonProps = {
12
12
  sourceID: OptionalProp<string>;
13
13
  existing: OptionalProp<boolean>;
14
14
  filter: UnsafeMixed<any[]>;
@@ -16,11 +16,17 @@ export interface NativeProps extends ViewProps {
16
16
  aboveLayerID: OptionalProp<string>;
17
17
  belowLayerID: OptionalProp<string>;
18
18
  layerIndex: OptionalProp<Int32>;
19
- reactStyle: UnsafeMixed<any>;
20
19
 
21
20
  maxZoomLevel: OptionalProp<Double>;
22
21
  minZoomLevel: OptionalProp<Double>;
23
22
  sourceLayerID: OptionalProp<string>;
23
+ slot: OptionalProp<string>;
24
+ };
25
+ // @{codepart-replace-end}
26
+
27
+ export interface NativeProps extends ViewProps, CommonProps {
28
+ id?: OptionalProp<string>;
29
+ reactStyle: UnsafeMixed<any>;
24
30
  }
25
31
 
26
32
  export default codegenNativeComponent<NativeProps>(