@maplibre/maplibre-react-native 11.0.0-beta.27 → 11.0.0-beta.28

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 (131) 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/mapview/MLRNAndroidTextureMapViewManager.kt +0 -2
  3. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.kt +1 -5
  4. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewModule.kt +7 -0
  5. package/lib/commonjs/components/annotations/marker/Marker.js +4 -0
  6. package/lib/commonjs/components/annotations/marker/Marker.js.map +1 -1
  7. package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js +5 -0
  8. package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
  9. package/lib/commonjs/components/camera/Camera.js +48 -0
  10. package/lib/commonjs/components/camera/Camera.js.map +1 -1
  11. package/lib/commonjs/components/images/Images.js +9 -0
  12. package/lib/commonjs/components/images/Images.js.map +1 -1
  13. package/lib/commonjs/components/layer/Layer.js +19 -8
  14. package/lib/commonjs/components/layer/Layer.js.map +1 -1
  15. package/lib/commonjs/components/map/Map.js +25 -1
  16. package/lib/commonjs/components/map/Map.js.map +1 -1
  17. package/lib/commonjs/components/sources/vector-source/VectorSource.js.map +1 -1
  18. package/lib/commonjs/modules/offline/OfflineManager.js +46 -15
  19. package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -1
  20. package/lib/commonjs/modules/static-map/StaticMapManager.js +13 -5
  21. package/lib/commonjs/modules/static-map/StaticMapManager.js.map +1 -1
  22. package/lib/commonjs/modules/transform-request/TransformRequestManager.js +7 -2
  23. package/lib/commonjs/modules/transform-request/TransformRequestManager.js.map +1 -1
  24. package/lib/commonjs/types/PressableSourceProps.js.map +1 -0
  25. package/lib/module/components/annotations/marker/Marker.js +4 -0
  26. package/lib/module/components/annotations/marker/Marker.js.map +1 -1
  27. package/lib/module/components/annotations/view-annotation/ViewAnnotation.js +5 -0
  28. package/lib/module/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
  29. package/lib/module/components/camera/Camera.js +48 -0
  30. package/lib/module/components/camera/Camera.js.map +1 -1
  31. package/lib/module/components/images/Images.js +9 -0
  32. package/lib/module/components/images/Images.js.map +1 -1
  33. package/lib/module/components/layer/Layer.js +19 -8
  34. package/lib/module/components/layer/Layer.js.map +1 -1
  35. package/lib/module/components/map/Map.js +25 -1
  36. package/lib/module/components/map/Map.js.map +1 -1
  37. package/lib/module/components/sources/vector-source/VectorSource.js.map +1 -1
  38. package/lib/module/modules/offline/OfflineManager.js +46 -15
  39. package/lib/module/modules/offline/OfflineManager.js.map +1 -1
  40. package/lib/module/modules/static-map/StaticMapManager.js +13 -5
  41. package/lib/module/modules/static-map/StaticMapManager.js.map +1 -1
  42. package/lib/module/modules/transform-request/TransformRequestManager.js +7 -2
  43. package/lib/module/modules/transform-request/TransformRequestManager.js.map +1 -1
  44. package/lib/module/types/PressableSourceProps.js.map +1 -0
  45. package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts +3 -0
  46. package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts.map +1 -1
  47. package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts +3 -0
  48. package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -1
  49. package/lib/typescript/commonjs/components/camera/Camera.d.ts +70 -19
  50. package/lib/typescript/commonjs/components/camera/Camera.d.ts.map +1 -1
  51. package/lib/typescript/commonjs/components/images/Images.d.ts +7 -0
  52. package/lib/typescript/commonjs/components/images/Images.d.ts.map +1 -1
  53. package/lib/typescript/commonjs/components/layer/Layer.d.ts +19 -8
  54. package/lib/typescript/commonjs/components/layer/Layer.d.ts.map +1 -1
  55. package/lib/typescript/commonjs/components/map/Map.d.ts +76 -30
  56. package/lib/typescript/commonjs/components/map/Map.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts +1 -1
  58. package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -1
  59. package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts +9 -7
  60. package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts +47 -16
  62. package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/modules/static-map/StaticMapManager.d.ts +13 -5
  64. package/lib/typescript/commonjs/modules/static-map/StaticMapManager.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts +7 -2
  66. package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/types/BaseProps.d.ts +3 -0
  68. package/lib/typescript/commonjs/types/BaseProps.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/types/PressEvent.d.ts +3 -0
  70. package/lib/typescript/commonjs/types/PressEvent.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/types/PressEventWithFeatures.d.ts +3 -0
  72. package/lib/typescript/commonjs/types/PressEventWithFeatures.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/types/{sources/PressableSourceProps.d.ts → PressableSourceProps.d.ts} +5 -2
  74. package/lib/typescript/commonjs/types/PressableSourceProps.d.ts.map +1 -0
  75. package/lib/typescript/commonjs/types/ViewPadding.d.ts +3 -0
  76. package/lib/typescript/commonjs/types/ViewPadding.d.ts.map +1 -1
  77. package/lib/typescript/module/components/annotations/marker/Marker.d.ts +3 -0
  78. package/lib/typescript/module/components/annotations/marker/Marker.d.ts.map +1 -1
  79. package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts +3 -0
  80. package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -1
  81. package/lib/typescript/module/components/camera/Camera.d.ts +70 -19
  82. package/lib/typescript/module/components/camera/Camera.d.ts.map +1 -1
  83. package/lib/typescript/module/components/images/Images.d.ts +7 -0
  84. package/lib/typescript/module/components/images/Images.d.ts.map +1 -1
  85. package/lib/typescript/module/components/layer/Layer.d.ts +19 -8
  86. package/lib/typescript/module/components/layer/Layer.d.ts.map +1 -1
  87. package/lib/typescript/module/components/map/Map.d.ts +76 -30
  88. package/lib/typescript/module/components/map/Map.d.ts.map +1 -1
  89. package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts +1 -1
  90. package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -1
  91. package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts +9 -7
  92. package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts.map +1 -1
  93. package/lib/typescript/module/modules/offline/OfflineManager.d.ts +47 -16
  94. package/lib/typescript/module/modules/offline/OfflineManager.d.ts.map +1 -1
  95. package/lib/typescript/module/modules/static-map/StaticMapManager.d.ts +13 -5
  96. package/lib/typescript/module/modules/static-map/StaticMapManager.d.ts.map +1 -1
  97. package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts +7 -2
  98. package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts.map +1 -1
  99. package/lib/typescript/module/types/BaseProps.d.ts +3 -0
  100. package/lib/typescript/module/types/BaseProps.d.ts.map +1 -1
  101. package/lib/typescript/module/types/PressEvent.d.ts +3 -0
  102. package/lib/typescript/module/types/PressEvent.d.ts.map +1 -1
  103. package/lib/typescript/module/types/PressEventWithFeatures.d.ts +3 -0
  104. package/lib/typescript/module/types/PressEventWithFeatures.d.ts.map +1 -1
  105. package/lib/typescript/module/types/{sources/PressableSourceProps.d.ts → PressableSourceProps.d.ts} +5 -2
  106. package/lib/typescript/module/types/PressableSourceProps.d.ts.map +1 -0
  107. package/lib/typescript/module/types/ViewPadding.d.ts +3 -0
  108. package/lib/typescript/module/types/ViewPadding.d.ts.map +1 -1
  109. package/package.json +3 -1
  110. package/src/components/annotations/marker/Marker.tsx +3 -0
  111. package/src/components/annotations/view-annotation/ViewAnnotation.tsx +3 -0
  112. package/src/components/camera/Camera.tsx +70 -19
  113. package/src/components/images/Images.tsx +7 -0
  114. package/src/components/layer/Layer.tsx +19 -8
  115. package/src/components/map/Map.tsx +76 -30
  116. package/src/components/sources/geojson-source/GeoJSONSource.tsx +1 -1
  117. package/src/components/sources/vector-source/VectorSource.tsx +9 -7
  118. package/src/modules/offline/OfflineManager.ts +46 -15
  119. package/src/modules/static-map/StaticMapManager.ts +13 -5
  120. package/src/modules/transform-request/TransformRequestManager.ts +7 -2
  121. package/src/types/BaseProps.ts +3 -0
  122. package/src/types/PressEvent.ts +3 -0
  123. package/src/types/PressEventWithFeatures.ts +3 -0
  124. package/src/types/{sources/PressableSourceProps.ts → PressableSourceProps.ts} +5 -2
  125. package/src/types/ViewPadding.ts +3 -0
  126. package/lib/commonjs/types/sources/PressableSourceProps.js.map +0 -1
  127. package/lib/module/types/sources/PressableSourceProps.js.map +0 -1
  128. package/lib/typescript/commonjs/types/sources/PressableSourceProps.d.ts.map +0 -1
  129. package/lib/typescript/module/types/sources/PressableSourceProps.d.ts.map +0 -1
  130. /package/lib/commonjs/types/{sources/PressableSourceProps.js → PressableSourceProps.js} +0 -0
  131. /package/lib/module/types/{sources/PressableSourceProps.js → PressableSourceProps.js} +0 -0
@@ -147,8 +147,13 @@ declare class TransformRequestManager {
147
147
  * });
148
148
  * ```
149
149
  *
150
- * // Add apiKey to all requests (no match = applies to all)
151
- * TransformRequestManager.addUrlSearchParam({ name: "apiKey", value: "your-api-key" });
150
+ * @example Add apiKey to all requests (no match = applies to all)
151
+ * ```ts
152
+ * TransformRequestManager.addUrlSearchParam({
153
+ * name: "apiKey",
154
+ * value: "your-api-key",
155
+ * });
156
+ * ```
152
157
  */
153
158
  addUrlSearchParam(options: UrlSearchParamOptions): string;
154
159
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"TransformRequestManager.d.ts","sourceRoot":"","sources":["../../../../../src/modules/transform-request/TransformRequestManager.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IAEb,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IAEb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAM,uBAAuB;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM;IAarD;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIpC;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAI1B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IAazD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAItC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;IAazC;;OAEG;IACH,oBAAoB,IAAI,IAAI;IAI5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI9B;;OAEG;IACH,YAAY,IAAI,IAAI;IAIpB;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb,OAAO,CAAC,MAAM,CAAc;IAE5B,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,MAAM,CAAC,aAAa;CAgB7B;AAED,QAAA,MAAM,uBAAuB,yBAAgC,CAAC;AAE9D,OAAO,EAAE,uBAAuB,IAAI,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"TransformRequestManager.d.ts","sourceRoot":"","sources":["../../../../../src/modules/transform-request/TransformRequestManager.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IAEb,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IAEb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAM,uBAAuB;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM;IAarD;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIpC;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAI1B;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IAazD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAItC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;IAazC;;OAEG;IACH,oBAAoB,IAAI,IAAI;IAI5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI9B;;OAEG;IACH,YAAY,IAAI,IAAI;IAIpB;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb,OAAO,CAAC,MAAM,CAAc;IAE5B,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,MAAM,CAAC,aAAa;CAgB7B;AAED,QAAA,MAAM,uBAAuB,yBAAgC,CAAC;AAE9D,OAAO,EAAE,uBAAuB,IAAI,uBAAuB,EAAE,CAAC"}
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Base props supported by all components.
3
+ */
1
4
  export interface BaseProps {
2
5
  testID?: string;
3
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BaseProps.d.ts","sourceRoot":"","sources":["../../../../src/types/BaseProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"BaseProps.d.ts","sourceRoot":"","sources":["../../../../src/types/BaseProps.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1,5 +1,8 @@
1
1
  import type { LngLat } from "./LngLat";
2
2
  import type { PixelPoint } from "./PixelPoint";
3
+ /**
4
+ * Event data for map press interactions.
5
+ */
3
6
  export interface PressEvent {
4
7
  /**
5
8
  * Geographic coordinates of the touch event
@@ -1 +1 @@
1
- {"version":3,"file":"PressEvent.d.ts","sourceRoot":"","sources":["../../../../src/types/PressEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC;CACnB"}
1
+ {"version":3,"file":"PressEvent.d.ts","sourceRoot":"","sources":["../../../../src/types/PressEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC;CACnB"}
@@ -1,4 +1,7 @@
1
1
  import type { PressEvent } from "./PressEvent";
2
+ /**
3
+ * Press event data enriched with GeoJSON features at the pressed location.
4
+ */
2
5
  export interface PressEventWithFeatures extends PressEvent {
3
6
  features: GeoJSON.Feature[];
4
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PressEventWithFeatures.d.ts","sourceRoot":"","sources":["../../../../src/types/PressEventWithFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,sBAAuB,SAAQ,UAAU;IACxD,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;CAC7B"}
1
+ {"version":3,"file":"PressEventWithFeatures.d.ts","sourceRoot":"","sources":["../../../../src/types/PressEventWithFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,UAAU;IACxD,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;CAC7B"}
@@ -1,6 +1,9 @@
1
1
  import type { NativeSyntheticEvent } from "react-native";
2
- import type { PressEventWithFeatures } from "../PressEventWithFeatures";
3
- import type { ViewPadding } from "../ViewPadding";
2
+ import type { PressEventWithFeatures } from "./PressEventWithFeatures";
3
+ import type { ViewPadding } from "./ViewPadding";
4
+ /**
5
+ * Props shared by source components that support press interactions.
6
+ */
4
7
  export interface PressableSourceProps {
5
8
  /**
6
9
  * Emits on press when a child `Layer` within the hitbox has highest z-index
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PressableSourceProps.d.ts","sourceRoot":"","sources":["../../../../src/types/PressableSourceProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAExE;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB"}
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Pixel insets used for view padding.
3
+ */
1
4
  export type ViewPadding = {
2
5
  top?: number;
3
6
  right?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ViewPadding.d.ts","sourceRoot":"","sources":["../../../../src/types/ViewPadding.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
1
+ {"version":3,"file":"ViewPadding.d.ts","sourceRoot":"","sources":["../../../../src/types/ViewPadding.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maplibre/maplibre-react-native",
3
3
  "description": "React Native library for creating maps with MapLibre Native for Android & iOS",
4
- "version": "11.0.0-beta.27",
4
+ "version": "11.0.0-beta.28",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": true
@@ -25,6 +25,8 @@
25
25
  "url": "https://github.com/maplibre/maplibre-react-native/issues"
26
26
  },
27
27
  "scripts": {
28
+ "format:clang-format": "find ios -type f \\( -name \"*.h\" -o -name \"*.m\" -o -name \"*.mm\" \\) -exec clang-format -i {} +",
29
+ "format:ktlint": "ktlint --format \"android/src/**/*.kt\"",
28
30
  "lint": "yarn lint:tsc && yarn lint:eslint",
29
31
  "lint:tsc": "tsc --project ./ && tsc --project ./src/__tests__",
30
32
  "lint:eslint": "eslint ./ --max-warnings 0",
@@ -30,6 +30,9 @@ export type NativeMarkerRef = Component<
30
30
  > &
31
31
  ReactNativeElement;
32
32
 
33
+ /**
34
+ * Event emitted by a Marker on press.
35
+ */
33
36
  export type MarkerEvent = PressEvent & {
34
37
  id: string;
35
38
  };
@@ -40,6 +40,9 @@ export type NativeViewAnnotationRef = Component<
40
40
  > &
41
41
  ReactNativeElement;
42
42
 
43
+ /**
44
+ * Event emitted by a ViewAnnotation on press.
45
+ */
43
46
  export type ViewAnnotationEvent = PressEvent & {
44
47
  id: string;
45
48
  };
@@ -19,6 +19,9 @@ import type { LngLat } from "../../types/LngLat";
19
19
  import type { LngLatBounds } from "../../types/LngLatBounds";
20
20
  import type { ViewPadding } from "../../types/ViewPadding";
21
21
 
22
+ /**
23
+ * Camera viewport configuration: zoom, bearing, pitch, and padding.
24
+ */
22
25
  export interface CameraOptions {
23
26
  /**
24
27
  * The zoom level of the map.
@@ -41,8 +44,14 @@ export interface CameraOptions {
41
44
  padding?: ViewPadding;
42
45
  }
43
46
 
47
+ /**
48
+ * Easing function used for camera animations.
49
+ */
44
50
  export type CameraEasing = undefined | "linear" | "ease" | "fly";
45
51
 
52
+ /**
53
+ * Animation timing options for camera transitions.
54
+ */
46
55
  export interface CameraAnimationOptions {
47
56
  /**
48
57
  * The duration the map takes to animate to a new configuration.
@@ -55,6 +64,9 @@ export interface CameraAnimationOptions {
55
64
  easing?: CameraEasing;
56
65
  }
57
66
 
67
+ /**
68
+ * Camera center coordinate options.
69
+ */
58
70
  export interface CameraCenterOptions {
59
71
  /**
60
72
  * Geographic center coordinates of the map
@@ -62,6 +74,9 @@ export interface CameraCenterOptions {
62
74
  center: LngLat;
63
75
  }
64
76
 
77
+ /**
78
+ * Camera bounds options.
79
+ */
65
80
  export interface CameraBoundsOptions {
66
81
  /**
67
82
  * The corners of a box around which the map should bound.
@@ -69,14 +84,24 @@ export interface CameraBoundsOptions {
69
84
  bounds: LngLatBounds;
70
85
  }
71
86
 
87
+ /**
88
+ * Camera animation stop positioned by a center coordinate.
89
+ */
72
90
  export type CameraCenterStop = CameraOptions &
73
91
  CameraAnimationOptions &
74
92
  CameraCenterOptions;
75
93
 
94
+ /**
95
+ * Camera animation stop positioned by geographic bounds.
96
+ */
76
97
  export type CameraBoundsStop = CameraOptions &
77
98
  CameraAnimationOptions &
78
99
  CameraBoundsOptions;
79
100
 
101
+ /**
102
+ * A single camera animation stop — optionally positioned by center, bounds, or
103
+ * neither.
104
+ */
80
105
  export type CameraStop =
81
106
  | (CameraOptions &
82
107
  CameraAnimationOptions & {
@@ -86,6 +111,9 @@ export type CameraStop =
86
111
  | CameraCenterStop
87
112
  | CameraBoundsStop;
88
113
 
114
+ /**
115
+ * Initial camera state when the map first loads.
116
+ */
89
117
  export type InitialViewState =
90
118
  | (CameraOptions & {
91
119
  center?: never;
@@ -94,8 +122,14 @@ export type InitialViewState =
94
122
  | (CameraOptions & CameraCenterOptions)
95
123
  | (CameraOptions & CameraBoundsOptions);
96
124
 
125
+ /**
126
+ * User location tracking mode.
127
+ */
97
128
  export type TrackUserLocation = "default" | "heading" | "course";
98
129
 
130
+ /**
131
+ * Event emitted when the user location tracking mode changes.
132
+ */
99
133
  export type TrackUserLocationChangeEvent = {
100
134
  trackUserLocation: TrackUserLocation | null;
101
135
  };
@@ -104,18 +138,20 @@ export interface CameraRef {
104
138
  /**
105
139
  * Map camera will move to new coordinates at the same zoom level
106
140
  *
107
- * @example
108
- * cameraRef.current?.easeTo([lng, lat], 200) // eases camera to new location based on duration
109
- * cameraRef.current?.easeTo([lng, lat]) // snaps camera to new location without any easing
141
+ * @example Jump to a position
142
+ * ```ts
143
+ * cameraRef.current?.jumpTo({ center: [lng, lat] });
144
+ * ```
110
145
  */
111
146
  jumpTo(options: CameraCenterOptions & CameraOptions): void;
112
147
 
113
148
  /**
114
149
  * Map camera will move to new coordinates at the same zoom level
115
150
  *
116
- * @example
117
- * cameraRef.current?.easeTo([lng, lat], 200) // eases camera to new location based on duration
118
- * cameraRef.current?.easeTo([lng, lat]) // snaps camera to new location without any easing
151
+ * @example Eases camera to new location based on duration
152
+ * ```ts
153
+ * cameraRef.current?.easeTo({ center: [lng, lat], duration: 200 });
154
+ * ```
119
155
  */
120
156
  easeTo(
121
157
  options: CameraCenterOptions & CameraOptions & CameraAnimationOptions,
@@ -125,8 +161,9 @@ export interface CameraRef {
125
161
  * Map camera will fly to new coordinate
126
162
  *
127
163
  * @example
128
- * cameraRef.current?.flyTo([lng, lat])
129
- * cameraRef.current?.flyTo([lng, lat], 12000)
164
+ * ```ts
165
+ * cameraRef.current?.flyTo({ center: [lng, lat], duration: 12000 });
166
+ * ```
130
167
  */
131
168
  flyTo(
132
169
  options: CameraCenterOptions & CameraOptions & CameraAnimationOptions,
@@ -136,8 +173,13 @@ export interface CameraRef {
136
173
  * Map camera transitions to fit provided bounds
137
174
  *
138
175
  * @example
139
- * cameraRef.current?.fitBounds([west, south, east, north])
140
- * cameraRef.current?.fitBounds([west, south, east, north], { top: 20, right: 20, bottom: 20, left: 20 }, 1000)
176
+ * ```ts
177
+ * cameraRef.current?.fitBounds(
178
+ * [west, south, east, north],
179
+ * { top: 20, right: 20, bottom: 20, left: 20 },
180
+ * 1000,
181
+ * );
182
+ * ```
141
183
  */
142
184
  fitBounds(
143
185
  bounds: LngLatBounds,
@@ -151,8 +193,9 @@ export interface CameraRef {
151
193
  * @param options - Options
152
194
  *
153
195
  * @example
154
- * cameraRef.current?.zoomTo(16)
155
- * cameraRef.current?.zoomTo(16, 100)
196
+ * ```ts
197
+ * cameraRef.current?.zoomTo(16, { duration: 100 });
198
+ * ```
156
199
  */
157
200
  zoomTo(zoom: number, options?: CameraOptions & CameraAnimationOptions): void;
158
201
 
@@ -162,18 +205,23 @@ export interface CameraRef {
162
205
  * @param stop - Array of Camera stops
163
206
  *
164
207
  * @example
208
+ * ```ts
165
209
  * cameraRef.current?.setStop({
166
210
  * centerCoordinate: [lng, lat],
167
211
  * zoomLevel: 16,
168
212
  * duration: 2000,
169
- * })
213
+ * });
214
+ * ```
170
215
  *
216
+ * @example
217
+ * ```ts
171
218
  * cameraRef.current?.setStop({
172
219
  * stops: [
173
220
  * { pitch: 45, duration: 200 },
174
221
  * { heading: 180, duration: 300 },
175
- * ]
176
- * })
222
+ * ],
223
+ * });
224
+ * ```
177
225
  */
178
226
  setStop(stop: CameraStop): Promise<void>;
179
227
  }
@@ -203,10 +251,10 @@ export type CameraProps = BaseProps &
203
251
  /**
204
252
  * The mode used to track the user location on the map:
205
253
  *
206
- * - undefined: The user's location is not tracked
207
- * - "default": Centers the user's location
208
- * - "heading": Centers the user's location and uses the compass for bearing
209
- * - "course": Centers the user's location and uses the direction of travel for
254
+ * - `undefined`: The user's location is not tracked
255
+ * - `"default"`: Centers the user's location
256
+ * - `"heading"`: Centers the user's location and uses the compass for bearing
257
+ * - `"course"`: Centers the user's location and uses the direction of travel for
210
258
  * bearing
211
259
  *
212
260
  * @defaultValue undefined
@@ -226,6 +274,9 @@ export type CameraProps = BaseProps &
226
274
  ref?: Ref<CameraRef>;
227
275
  };
228
276
 
277
+ /**
278
+ * Controls the viewport of the Map.
279
+ */
229
280
  export const Camera = memo(
230
281
  ({
231
282
  testID,
@@ -12,11 +12,18 @@ import ImagesNativeComponent, {
12
12
  import "./NativeImagesModule";
13
13
  import { type BaseProps } from "../../types/BaseProps";
14
14
 
15
+ /**
16
+ * An image source with optional SDF (Signed Distance Field) rendering mode.
17
+ */
15
18
  export type ImageSourceWithSdf = {
16
19
  source: ImageSourcePropType;
17
20
  sdf?: boolean;
18
21
  };
19
22
 
23
+ /**
24
+ * A map image entry: a URL string, a native asset require, or an
25
+ * {@link ImageSourceWithSdf} object.
26
+ */
20
27
  export type ImageEntry = string | ImageRequireSource | ImageSourceWithSdf;
21
28
 
22
29
  export interface ImagesProps extends BaseProps {
@@ -182,28 +182,39 @@ export type LayerProps =
182
182
  /**
183
183
  * Layer is a style layer that renders geospatial data on the map.
184
184
  *
185
- * This is a unified, type-safe layer component that supports all layer types.
186
- * Use the style-spec compliant `paint` and `layout` props with kebab-case keys.
185
+ * Follow the [MapLibre Style
186
+ * Spec](https://maplibre.org/maplibre-style-spec/layers/) for Layer
187
+ * definitions.
187
188
  *
188
- * @example
189
+ * @example Basic Usage
189
190
  * ```tsx
190
- * // Style spec compliant (recommended)
191
191
  * <Layer
192
192
  * type="fill"
193
193
  * id="parks"
194
194
  * source="parks-source"
195
195
  * paint={{ "fill-color": "green", "fill-opacity": 0.5 }}
196
196
  * layout={{ visibility: "visible" }}
197
- * />
198
- * // With expressions
197
+ * />;
198
+ * ```
199
+ *
200
+ * @example Using Expressions
201
+ * ```tsx
199
202
  * <Layer
200
203
  * type="fill"
201
204
  * id="parks"
202
205
  * source="parks-source"
203
206
  * paint={{
204
- * "fill-color": ["interpolate", ["linear"], ["get", "elevation"], 0, "blue", 100, "red"],
207
+ * "fill-color": [
208
+ * "interpolate",
209
+ * ["linear"],
210
+ * ["get", "elevation"],
211
+ * 0,
212
+ * "blue",
213
+ * 100,
214
+ * "red",
215
+ * ],
205
216
  * }}
206
- * />
217
+ * />;
207
218
  * ```
208
219
  */
209
220
  export const Layer = ({ id, ...props }: LayerProps) => {