@rnmapbox/maps 10.0.0-beta.74 → 10.0.0-beta.76

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 (196) hide show
  1. package/README.md +3 -3
  2. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraStop.kt +61 -46
  3. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/images/RCTMGLImagesManager.kt +5 -5
  4. package/ios/RCTMGL-v10/RCMTGLImage.swift +2 -1
  5. package/ios/RCTMGL-v10/RCTMGLImages.swift +57 -17
  6. package/ios/RCTMGL-v10/RCTMGLMapView.swift +11 -1
  7. package/ios/RCTMGL-v10/RCTMGLUtils.swift +14 -5
  8. package/javascript/MGLModule.ts +54 -0
  9. package/javascript/Mapbox.ts +97 -0
  10. package/javascript/classes/index.d.ts +20 -1
  11. package/javascript/components/Annotation.tsx +141 -0
  12. package/javascript/components/Callout.d.ts +35 -0
  13. package/javascript/components/ImageSource.tsx +81 -0
  14. package/javascript/components/Images.tsx +58 -6
  15. package/javascript/components/{MapView.js → MapView.tsx} +456 -383
  16. package/javascript/components/MarkerView.tsx +3 -2
  17. package/javascript/components/NativeBridgeComponent.tsx +1 -1
  18. package/javascript/components/PointAnnotation.tsx +4 -3
  19. package/javascript/components/RasterDemSource.tsx +105 -0
  20. package/javascript/components/RasterSource.tsx +124 -0
  21. package/javascript/components/ShapeSource.tsx +1 -1
  22. package/javascript/components/{Style.js → Style.tsx} +117 -35
  23. package/javascript/components/Terrain.tsx +8 -7
  24. package/javascript/components/{UserLocation.js → UserLocation.tsx} +105 -94
  25. package/javascript/components/VectorSource.tsx +1 -1
  26. package/javascript/index.ts +4 -0
  27. package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +21 -6
  28. package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +19 -4
  29. package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +81 -21
  30. package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +27 -3
  31. package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +2 -1
  32. package/javascript/types/Position.ts +1 -0
  33. package/javascript/utils/Logger.ts +1 -1
  34. package/javascript/utils/geoUtils.ts +56 -0
  35. package/javascript/utils/{index.js → index.ts} +41 -19
  36. package/lib/commonjs/MGLModule.js +37 -0
  37. package/lib/commonjs/MGLModule.js.map +1 -0
  38. package/lib/commonjs/Mapbox.js +372 -0
  39. package/lib/commonjs/Mapbox.js.map +1 -0
  40. package/lib/commonjs/classes/index.d.js +2 -0
  41. package/lib/commonjs/classes/index.d.js.map +1 -1
  42. package/lib/commonjs/components/{annotations/Annotation.js → Annotation.js} +26 -27
  43. package/lib/commonjs/components/Annotation.js.map +1 -0
  44. package/lib/commonjs/components/Callout.d.js +9 -0
  45. package/lib/commonjs/components/Callout.d.js.map +1 -0
  46. package/lib/commonjs/components/ImageSource.js +8 -25
  47. package/lib/commonjs/components/ImageSource.js.map +1 -1
  48. package/lib/commonjs/components/Images.js +17 -1
  49. package/lib/commonjs/components/Images.js.map +1 -1
  50. package/lib/commonjs/components/MapView.js +30 -289
  51. package/lib/commonjs/components/MapView.js.map +1 -1
  52. package/lib/commonjs/components/MarkerView.js.map +1 -1
  53. package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -1
  54. package/lib/commonjs/components/PointAnnotation.js.map +1 -1
  55. package/lib/commonjs/components/RasterDemSource.js +3 -37
  56. package/lib/commonjs/components/RasterDemSource.js.map +1 -1
  57. package/lib/commonjs/components/RasterSource.js +2 -46
  58. package/lib/commonjs/components/RasterSource.js.map +1 -1
  59. package/lib/commonjs/components/Style.js +11 -15
  60. package/lib/commonjs/components/Style.js.map +1 -1
  61. package/lib/commonjs/components/Terrain.js.map +1 -1
  62. package/lib/commonjs/components/UserLocation.js +26 -77
  63. package/lib/commonjs/components/UserLocation.js.map +1 -1
  64. package/lib/commonjs/index.js +16 -339
  65. package/lib/commonjs/index.js.map +1 -1
  66. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +2 -4
  67. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  68. package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
  69. package/lib/commonjs/modules/offline/offlineManager.js +7 -2
  70. package/lib/commonjs/modules/offline/offlineManager.js.map +1 -1
  71. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
  72. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -1
  73. package/lib/commonjs/types/Position.js +2 -0
  74. package/lib/commonjs/{utils/index.d.js.map → types/Position.js.map} +1 -1
  75. package/lib/commonjs/utils/animated/Animated.js.map +1 -1
  76. package/lib/commonjs/utils/geoUtils.js +12 -38
  77. package/lib/commonjs/utils/geoUtils.js.map +1 -1
  78. package/lib/commonjs/utils/index.js +3 -6
  79. package/lib/commonjs/utils/index.js.map +1 -1
  80. package/lib/module/MGLModule.js +19 -0
  81. package/lib/module/MGLModule.js.map +1 -0
  82. package/lib/module/Mapbox.js +59 -0
  83. package/lib/module/Mapbox.js.map +1 -0
  84. package/lib/module/classes/index.d.js +2 -0
  85. package/lib/module/classes/index.d.js.map +1 -1
  86. package/lib/module/components/{annotations/Annotation.js → Annotation.js} +26 -27
  87. package/lib/module/components/Annotation.js.map +1 -0
  88. package/lib/module/components/Callout.d.js +2 -0
  89. package/lib/module/components/Callout.d.js.map +1 -0
  90. package/lib/module/components/ImageSource.js +8 -25
  91. package/lib/module/components/ImageSource.js.map +1 -1
  92. package/lib/module/components/Images.js +17 -1
  93. package/lib/module/components/Images.js.map +1 -1
  94. package/lib/module/components/MapView.js +31 -290
  95. package/lib/module/components/MapView.js.map +1 -1
  96. package/lib/module/components/MarkerView.js.map +1 -1
  97. package/lib/module/components/NativeBridgeComponent.js.map +1 -1
  98. package/lib/module/components/PointAnnotation.js.map +1 -1
  99. package/lib/module/components/RasterDemSource.js +4 -38
  100. package/lib/module/components/RasterDemSource.js.map +1 -1
  101. package/lib/module/components/RasterSource.js +3 -47
  102. package/lib/module/components/RasterSource.js.map +1 -1
  103. package/lib/module/components/Style.js +11 -15
  104. package/lib/module/components/Style.js.map +1 -1
  105. package/lib/module/components/Terrain.js.map +1 -1
  106. package/lib/module/components/UserLocation.js +25 -76
  107. package/lib/module/components/UserLocation.js.map +1 -1
  108. package/lib/module/index.js +3 -108
  109. package/lib/module/index.js.map +1 -1
  110. package/lib/module/modules/offline/OfflineCreatePackOptions.js +2 -4
  111. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  112. package/lib/module/modules/offline/OfflinePack.js.map +1 -1
  113. package/lib/module/modules/offline/offlineManager.js +1 -1
  114. package/lib/module/modules/offline/offlineManager.js.map +1 -1
  115. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
  116. package/lib/module/modules/snapshot/snapshotManager.js.map +1 -1
  117. package/lib/module/types/Position.js +2 -0
  118. package/lib/module/{utils/index.d.js.map → types/Position.js.map} +1 -1
  119. package/lib/module/utils/animated/Animated.js.map +1 -1
  120. package/lib/module/utils/geoUtils.js +5 -32
  121. package/lib/module/utils/geoUtils.js.map +1 -1
  122. package/lib/module/utils/index.js +3 -5
  123. package/lib/module/utils/index.js.map +1 -1
  124. package/lib/typescript/MGLModule.d.ts +22 -0
  125. package/lib/typescript/MGLModule.d.ts.map +1 -0
  126. package/lib/typescript/Mapbox.d.ts +54 -0
  127. package/lib/typescript/Mapbox.d.ts.map +1 -0
  128. package/lib/typescript/components/Annotation.d.ts +34 -0
  129. package/lib/typescript/components/Annotation.d.ts.map +1 -0
  130. package/lib/typescript/components/ImageSource.d.ts +32 -0
  131. package/lib/typescript/components/ImageSource.d.ts.map +1 -0
  132. package/lib/typescript/components/Images.d.ts +24 -2
  133. package/lib/typescript/components/Images.d.ts.map +1 -1
  134. package/lib/typescript/components/MapView.d.ts +469 -0
  135. package/lib/typescript/components/MapView.d.ts.map +1 -0
  136. package/lib/typescript/components/MarkerView.d.ts +3 -2
  137. package/lib/typescript/components/MarkerView.d.ts.map +1 -1
  138. package/lib/typescript/components/NativeBridgeComponent.d.ts +1 -1
  139. package/lib/typescript/components/NativeBridgeComponent.d.ts.map +1 -1
  140. package/lib/typescript/components/PointAnnotation.d.ts +10 -4
  141. package/lib/typescript/components/PointAnnotation.d.ts.map +1 -1
  142. package/lib/typescript/components/RasterDemSource.d.ts +46 -0
  143. package/lib/typescript/components/RasterDemSource.d.ts.map +1 -0
  144. package/lib/typescript/components/RasterSource.d.ts +59 -0
  145. package/lib/typescript/components/RasterSource.d.ts.map +1 -0
  146. package/lib/typescript/components/ShapeSource.d.ts +2 -2
  147. package/lib/typescript/components/ShapeSource.d.ts.map +1 -1
  148. package/lib/typescript/components/Style.d.ts +74 -0
  149. package/lib/typescript/components/Style.d.ts.map +1 -0
  150. package/lib/typescript/components/Terrain.d.ts +2 -2
  151. package/lib/typescript/components/Terrain.d.ts.map +1 -1
  152. package/lib/typescript/components/UserLocation.d.ts +102 -0
  153. package/lib/typescript/components/UserLocation.d.ts.map +1 -0
  154. package/lib/typescript/components/VectorSource.d.ts +2 -2
  155. package/lib/typescript/components/VectorSource.d.ts.map +1 -1
  156. package/lib/typescript/index.d.ts +4 -0
  157. package/lib/typescript/index.d.ts.map +1 -0
  158. package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts +22 -0
  159. package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
  160. package/lib/typescript/modules/offline/OfflinePack.d.ts +24 -0
  161. package/lib/typescript/modules/offline/OfflinePack.d.ts.map +1 -0
  162. package/lib/typescript/modules/offline/offlineManager.d.ts +220 -0
  163. package/lib/typescript/modules/offline/offlineManager.d.ts.map +1 -0
  164. package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts +41 -0
  165. package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
  166. package/lib/typescript/modules/snapshot/snapshotManager.d.ts +52 -0
  167. package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +1 -0
  168. package/lib/typescript/types/Position.d.ts +2 -0
  169. package/lib/typescript/types/Position.d.ts.map +1 -0
  170. package/lib/typescript/utils/Logger.d.ts +1 -1
  171. package/lib/typescript/utils/Logger.d.ts.map +1 -1
  172. package/lib/typescript/utils/animated/Animated.d.ts +23 -0
  173. package/lib/typescript/utils/animated/Animated.d.ts.map +1 -0
  174. package/lib/typescript/utils/geoUtils.d.ts +15 -0
  175. package/lib/typescript/utils/geoUtils.d.ts.map +1 -0
  176. package/lib/typescript/utils/index.d.ts +48 -0
  177. package/lib/typescript/utils/index.d.ts.map +1 -0
  178. package/package.json +4 -4
  179. package/index.d.ts +0 -745
  180. package/javascript/components/ImageSource.js +0 -82
  181. package/javascript/components/RasterDemSource.js +0 -106
  182. package/javascript/components/RasterSource.js +0 -124
  183. package/javascript/components/annotations/Annotation.js +0 -122
  184. package/javascript/index.js +0 -162
  185. package/javascript/utils/geoUtils.d.ts +0 -10
  186. package/javascript/utils/geoUtils.js +0 -73
  187. package/javascript/utils/index.d.ts +0 -27
  188. package/lib/commonjs/components/annotations/Annotation.js.map +0 -1
  189. package/lib/commonjs/utils/geoUtils.d.js +0 -2
  190. package/lib/commonjs/utils/geoUtils.d.js.map +0 -1
  191. package/lib/commonjs/utils/index.d.js +0 -2
  192. package/lib/module/components/annotations/Annotation.js.map +0 -1
  193. package/lib/module/utils/geoUtils.d.js +0 -2
  194. package/lib/module/utils/geoUtils.d.js.map +0 -1
  195. package/lib/module/utils/index.d.js +0 -2
  196. /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
@@ -0,0 +1,220 @@
1
+ import { NativeEventEmitter, EventSubscription } from 'react-native';
2
+ export { default as OfflineCreatePackOptions, type OfflineCreatePackOptionsArgs, } from './OfflineCreatePackOptions';
3
+ import { type OfflineCreatePackOptionsArgs } from './OfflineCreatePackOptions';
4
+ import OfflinePack from './OfflinePack';
5
+ export declare const OfflineModuleEventEmitter: NativeEventEmitter;
6
+ export declare type OfflineProgressStatus = {
7
+ name: string;
8
+ state: number;
9
+ percentage: number;
10
+ completedResourceSize: number;
11
+ completedTileCount: number;
12
+ completedResourceCount: number;
13
+ requiredResourceCount: number;
14
+ completedTileSize: number;
15
+ };
16
+ export declare type OfflinePackError = {
17
+ name: string;
18
+ message: string;
19
+ };
20
+ declare type ErrorEvent = {
21
+ payload: OfflinePackError;
22
+ };
23
+ declare type ProgressEvent = {
24
+ payload: OfflineProgressStatus;
25
+ };
26
+ declare type ProgressListener = (pack: OfflinePack, status: OfflineProgressStatus) => void;
27
+ declare type ErrorListener = (pack: OfflinePack, err: OfflinePackError) => void;
28
+ /**
29
+ * OfflineManager implements a singleton (shared object) that manages offline packs.
30
+ * All of this class’s instance methods are asynchronous, reflecting the fact that offline resources are stored in a database.
31
+ * The shared object maintains a canonical collection of offline packs.
32
+ */
33
+ declare class OfflineManager {
34
+ private _hasInitialized;
35
+ private _offlinePacks;
36
+ private _progressListeners;
37
+ private _errorListeners;
38
+ subscriptionProgress: EventSubscription | null;
39
+ subscriptionError: EventSubscription | null;
40
+ constructor();
41
+ /**
42
+ * Creates and registers an offline pack that downloads the resources needed to use the given region offline.
43
+ *
44
+ * @example
45
+ *
46
+ * const progressListener = (offlineRegion, status) => console.log(offlineRegion, status);
47
+ * const errorListener = (offlineRegion, err) => console.log(offlineRegion, err);
48
+ *
49
+ * await MapboxGL.offlineManager.createPack({
50
+ * name: 'offlinePack',
51
+ * styleURL: 'mapbox://...',
52
+ * minZoom: 14,
53
+ * maxZoom: 20,
54
+ * bounds: [[neLng, neLat], [swLng, swLat]]
55
+ * }, progressListener, errorListener)
56
+ *
57
+ * @param {OfflineCreatePackOptions} options Create options for a offline pack that specifices zoom levels, style url, and the region to download.
58
+ * @param {Callback=} progressListener Callback that listens for status events while downloading the offline resource.
59
+ * @param {Callback=} errorListener Callback that listens for status events while downloading the offline resource.
60
+ * @return {void}
61
+ */
62
+ createPack(options: OfflineCreatePackOptionsArgs, progressListener: ProgressListener, errorListener?: ErrorListener): Promise<void>;
63
+ /**
64
+ * Invalidates the specified offline pack. This method checks that the tiles in the specified offline pack match those from the server. Local tiles that do not match the latest version on the server are updated.
65
+ *
66
+ * This is more efficient than deleting the offline pack and downloading it again. If the data stored locally matches that on the server, new data will not be downloaded.
67
+ *
68
+ * @example
69
+ * await MapboxGL.offlineManager.invalidatePack('packName')
70
+ *
71
+ * @param {String} name Name of the offline pack.
72
+ * @return {void}
73
+ */
74
+ invalidatePack(name: string): Promise<void>;
75
+ /**
76
+ * Unregisters the given offline pack and allows resources that are no longer required by any remaining packs to be potentially freed.
77
+ *
78
+ * @example
79
+ * await MapboxGL.offlineManager.deletePack('packName')
80
+ *
81
+ * @param {String} name Name of the offline pack.
82
+ * @return {void}
83
+ */
84
+ deletePack(name: string): Promise<void>;
85
+ /**
86
+ * Forces a revalidation of the tiles in the ambient cache and downloads a fresh version of the tiles from the tile server.
87
+ * This is the recommend method for clearing the cache.
88
+ * This is the most efficient method because tiles in the ambient cache are re-downloaded to remove outdated data from a device.
89
+ * It does not erase resources from the ambient cache or delete the database, which can be computationally expensive operations that may carry unintended side effects.
90
+ *
91
+ * @example
92
+ * await MapboxGL.offlineManager.invalidateAmbientCache();
93
+ *
94
+ * @return {void}
95
+ */
96
+ invalidateAmbientCache(): Promise<void>;
97
+ /**
98
+ * Erases resources from the ambient cache.
99
+ * This method clears the cache and decreases the amount of space that map resources take up on the device.
100
+ *
101
+ * @example
102
+ * await MapboxGL.offlineManager.clearAmbientCache();
103
+ *
104
+ * @return {void}
105
+ */
106
+ clearAmbientCache(): Promise<void>;
107
+ /**
108
+ * Migrates the offline cache from pre-v10 SDKs to the new v10 cache location
109
+ *
110
+ * @example
111
+ * await MapboxGL.offlineManager.migrateOfflineCache()
112
+ *
113
+ * @return {void}
114
+ */
115
+ migrateOfflineCache(): Promise<void>;
116
+ /**
117
+ * Sets the maximum size of the ambient cache in bytes. Disables the ambient cache if set to 0.
118
+ * This method may be computationally expensive because it will erase resources from the ambient cache if its size is decreased.
119
+ *
120
+ * @example
121
+ * await MapboxGL.offlineManager.setMaximumAmbientCacheSize(5000000);
122
+ *
123
+ * @param {Number} size Size of ambient cache.
124
+ * @return {void}
125
+ */
126
+ setMaximumAmbientCacheSize(size: number): Promise<void>;
127
+ /**
128
+ * Deletes the existing database, which includes both the ambient cache and offline packs, then reinitializes it.
129
+ *
130
+ * @example
131
+ * await MapboxGL.offlineManager.resetDatabase();
132
+ *
133
+ * @return {void}
134
+ */
135
+ resetDatabase(): Promise<void>;
136
+ /**
137
+ * Retrieves all the current offline packs that are stored in the database.
138
+ *
139
+ * @example
140
+ * const offlinePacks = await MapboxGL.offlineManager.getPacks();
141
+ *
142
+ * @return {Array<OfflinePack>}
143
+ */
144
+ getPacks(): Promise<OfflinePack[]>;
145
+ /**
146
+ * Retrieves an offline pack that is stored in the database by name.
147
+ *
148
+ * @example
149
+ * const offlinePack = await MapboxGL.offlineManager.getPack();
150
+ *
151
+ * @param {String} name Name of the offline pack.
152
+ * @return {OfflinePack}
153
+ */
154
+ getPack(name: string): Promise<OfflinePack | undefined>;
155
+ /**
156
+ * Sideloads offline db
157
+ *
158
+ * @example
159
+ * await MapboxGL.offlineManager.mergeOfflineRegions(path);
160
+ *
161
+ * @param {String} path Path to offline tile db on file system.
162
+ * @return {void}
163
+ */
164
+ mergeOfflineRegions(path: string): Promise<void>;
165
+ /**
166
+ * Sets the maximum number of Mapbox-hosted tiles that may be downloaded and stored on the current device.
167
+ * The Mapbox Terms of Service prohibit changing or bypassing this limit without permission from Mapbox.
168
+ *
169
+ * @example
170
+ * MapboxGL.offlineManager.setTileCountLimit(1000);
171
+ *
172
+ * @param {Number} limit Map tile limit count.
173
+ * @return {void}
174
+ */
175
+ setTileCountLimit(limit: number): void;
176
+ /**
177
+ * Sets the period at which download status events will be sent over the React Native bridge.
178
+ * The default is 300ms.
179
+ *
180
+ * @example
181
+ * MapboxGL.offlineManager.setProgressEventThrottle(500);
182
+ *
183
+ * @param {Number} throttleValue event throttle value in ms.
184
+ * @return {void}
185
+ */
186
+ setProgressEventThrottle(throttleValue: number): void;
187
+ /**
188
+ * Subscribe to download status/error events for the requested offline pack.
189
+ * Note that createPack calls this internally if listeners are provided.
190
+ *
191
+ * @example
192
+ * const progressListener = (offlinePack, status) => console.log(offlinePack, status)
193
+ * const errorListener = (offlinePack, err) => console.log(offlinePack, err)
194
+ * MapboxGL.offlineManager.subscribe('packName', progressListener, errorListener)
195
+ *
196
+ * @param {String} packName Name of the offline pack.
197
+ * @param {Callback} progressListener Callback that listens for status events while downloading the offline resource.
198
+ * @param {Callback} errorListener Callback that listens for status events while downloading the offline resource.
199
+ * @return {void}
200
+ */
201
+ subscribe(packName: string, progressListener: ProgressListener, errorListener?: ErrorListener): Promise<void>;
202
+ /**
203
+ * Unsubscribes any listeners associated with the offline pack.
204
+ * It's a good idea to call this on componentWillUnmount.
205
+ *
206
+ * @example
207
+ * MapboxGL.offlineManager.unsubscribe('packName')
208
+ *
209
+ * @param {String} packName Name of the offline pack.
210
+ * @return {void}
211
+ */
212
+ unsubscribe(packName: string): void;
213
+ _initialize(): Promise<boolean>;
214
+ _onProgress(e: ProgressEvent): void;
215
+ _onError(e: ErrorEvent): void;
216
+ _hasListeners(name: string, listenerMap: Record<string, ProgressListener> | Record<string, ErrorListener>): boolean;
217
+ }
218
+ declare const offlineManager: OfflineManager;
219
+ export default offlineManager;
220
+ //# sourceMappingURL=offlineManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offlineManager.d.ts","sourceRoot":"","sources":["../../../../javascript/modules/offline/offlineManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAItB,OAAO,EACL,OAAO,IAAI,wBAAwB,EACnC,KAAK,4BAA4B,GAClC,MAAM,4BAA4B,CAAC;AACpC,OAAiC,EAC/B,KAAK,4BAA4B,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,WAAW,M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,EAAE,UAAU,GAAG,IAAI;IAW7B,aAAa,CACX,IAAI,EAAE,MAAM,EACZ,WAAW,EACP,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAChC,OAAO;CAKX;AAED,QAAA,MAAM,cAAc,gBAAuB,CAAC;AAC5C,eAAe,cAAc,CAAC"}
@@ -0,0 +1,41 @@
1
+ export declare type SnapshotOptionsArgs = {
2
+ centerCoordinate?: GeoJSON.Position;
3
+ width?: number;
4
+ height?: number;
5
+ zoomLevel?: number;
6
+ pitch?: number;
7
+ heading?: number;
8
+ styleURL?: string;
9
+ writeToDisk?: boolean;
10
+ bounds?: number[][];
11
+ withLogo?: boolean;
12
+ };
13
+ declare class SnapshotOptions {
14
+ readonly styleURL: string;
15
+ readonly heading: number;
16
+ readonly pitch: number;
17
+ readonly zoomLevel: number;
18
+ readonly width: number;
19
+ readonly height: number;
20
+ readonly writeToDisk: boolean;
21
+ readonly withLogo: boolean;
22
+ readonly centerCoordinate: string | undefined;
23
+ readonly bounds: string | undefined;
24
+ constructor(options?: SnapshotOptionsArgs);
25
+ toJSON(): {
26
+ styleURL: string;
27
+ heading: number;
28
+ pitch: number;
29
+ zoomLevel: number;
30
+ width: number;
31
+ height: number;
32
+ writeToDisk: boolean;
33
+ centerCoordinate: string | undefined;
34
+ bounds: string | undefined;
35
+ withLogo: boolean;
36
+ };
37
+ _createCenterCoordPoint(centerCoordinate: number[]): string;
38
+ _createBoundsCollection(bounds: number[][]): string;
39
+ }
40
+ export default SnapshotOptions;
41
+ //# sourceMappingURL=SnapshotOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SnapshotOptions.d.ts","sourceRoot":"","sources":["../../../../javascript/modules/snapshot/SnapshotOptions.ts"],"names":[],"mappings":"AAOA,oBAAY,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,cAAM,eAAe;IACnB,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,WAAW,EAAE,OAAO,CAAC;IACrC,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAClC,SAAgB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrD,SAAgB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE/B,OAAO,GAAE,mBAAwB;IA2B7C,MAAM;;;;;;;;;;;;IAeN,uBAAuB,CAAC,gBAAgB,EAAE,MAAM,EAAE;IAKlD,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;CAS3C;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,52 @@
1
+ export type { default as SnapshotOptions } from './SnapshotOptions';
2
+ /**
3
+ * The snapshotManager generates static raster images of the map.
4
+ * Each snapshot image depicts a portion of a map defined by an SnapshotOptions object you provide.
5
+ * The snapshotter generates the snapshot asynchronous.
6
+ */
7
+ declare class SnapshotManager {
8
+ /**
9
+ * Takes a snapshot of the base map using the provided Snapshot options. NOTE pitch, heading, zoomLevel only works when centerCoordinate is set!
10
+ *
11
+ * @example
12
+ *
13
+ * // creates a temp file png of base map
14
+ * const uri = await MapboxGL.snapshotManager.takeSnap({
15
+ * centerCoordinate: [-74.126410, 40.797968],
16
+ * width: width,
17
+ * height: height,
18
+ * zoomLevel: 12,
19
+ * pitch: 30,
20
+ * heading: 20,
21
+ * styleURL: MapboxGL.StyleURL.Dark,
22
+ * writeToDisk: true, // Create a temporary file
23
+ * });
24
+ *
25
+ * // creates base64 png of base map without logo
26
+ * const uri = await MapboxGL.snapshotManager.takeSnap({
27
+ * centerCoordinate: [-74.126410, 40.797968],
28
+ * width: width,
29
+ * height: height,
30
+ * zoomLevel: 12,
31
+ * pitch: 30,
32
+ * heading: 20,
33
+ * styleURL: MapboxGL.StyleURL.Dark,
34
+ * withLogo: false, // Disable Mapbox logo (Android only)
35
+ * });
36
+ *
37
+ * // creates snapshot with bounds
38
+ * const uri = await MapboxGL.snapshotManager.takeSnap({
39
+ * bounds: [[-74.126410, 40.797968], [-74.143727, 40.772177]],
40
+ * width: width,
41
+ * height: height,
42
+ * styleURL: MapboxGL.StyleURL.Dark,
43
+ * });
44
+ *
45
+ * @param {SnapshotOptions} options Snapshot options for create a static image of the base map
46
+ * @return {Promise}
47
+ */
48
+ takeSnap(options?: {}): Promise<string>;
49
+ }
50
+ declare const snapshotManager: SnapshotManager;
51
+ export default snapshotManager;
52
+ //# sourceMappingURL=snapshotManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshotManager.d.ts","sourceRoot":"","sources":["../../../../javascript/modules/snapshot/snapshotManager.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKpE;;;;GAIG;AACH,cAAM,eAAe;IACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACG,QAAQ,CAAC,OAAO,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;CAM9C;AAED,QAAA,MAAM,eAAe,iBAAwB,CAAC;AAC9C,eAAe,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare type Position = [number, number] | number[];
2
+ //# sourceMappingURL=Position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Position.d.ts","sourceRoot":"","sources":["../../../javascript/types/Position.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { EmitterSubscription, NativeEventEmitter } from 'react-native';
2
- declare type LogLevel = 'error' | 'warning' | 'info' | 'debug' | 'verbose';
2
+ export declare type LogLevel = 'error' | 'warning' | 'info' | 'debug' | 'verbose';
3
3
  export interface LogObject {
4
4
  level: LogLevel;
5
5
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../javascript/utils/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAEnB,MAAM,cAAc,CAAC;AAGtB,aAAK,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,aAAK,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC;AAElD,cAAM,MAAM;IACV,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEtC,aAAa,EAAE,kBAAkB,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC,MAAM,CAAC,cAAc;;IAarB;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW;IAI9C;;;;OAIG;IACH,cAAc,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B,KAAK,CAAC,GAAG,EAAE,SAAS;CAarB;AAID,eAAe,MAAM,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { Animated as RNAnimated } from 'react-native';
2
+ import { ShapeSource } from '../../components/ShapeSource';
3
+ import ImageSource from '../../components/ImageSource';
4
+ import FillLayer from '../../components/FillLayer';
5
+ import FillExtrusionLayer from '../../components/FillExtrusionLayer';
6
+ import LineLayer from '../../components/LineLayer';
7
+ import CircleLayer from '../../components/CircleLayer';
8
+ import { SymbolLayer } from '../../components/SymbolLayer';
9
+ import RasterLayer from '../../components/RasterLayer';
10
+ import BackgroundLayer from '../../components/BackgroundLayer';
11
+ declare const Animated: {
12
+ ShapeSource: RNAnimated.AnimatedComponent<typeof ShapeSource>;
13
+ ImageSource: RNAnimated.AnimatedComponent<typeof ImageSource>;
14
+ FillLayer: RNAnimated.AnimatedComponent<typeof FillLayer>;
15
+ FillExtrusionLayer: RNAnimated.AnimatedComponent<typeof FillExtrusionLayer>;
16
+ LineLayer: RNAnimated.AnimatedComponent<typeof LineLayer>;
17
+ CircleLayer: RNAnimated.AnimatedComponent<typeof CircleLayer>;
18
+ SymbolLayer: RNAnimated.AnimatedComponent<typeof SymbolLayer>;
19
+ RasterLayer: RNAnimated.AnimatedComponent<typeof RasterLayer>;
20
+ BackgroundLayer: RNAnimated.AnimatedComponent<typeof BackgroundLayer>;
21
+ };
22
+ export default Animated;
23
+ //# sourceMappingURL=Animated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Animated.d.ts","sourceRoot":"","sources":["../../../../javascript/utils/animated/Animated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,kBAAkB,MAAM,qCAAqC,CAAC;AACrE,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,eAAe,MAAM,kCAAkC,CAAC;AAE/D,QAAA,MAAM,QAAQ;;;;;;;;;;CAab,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { point, feature, lineString, Position, Properties, Id, BBox, FeatureCollection, Geometry, Point, Feature } from '@turf/helpers';
2
+ import distance from '@turf/distance';
3
+ import along from '@turf/along';
4
+ export declare const makePoint: typeof point;
5
+ export declare const makeLineString: typeof lineString;
6
+ export declare function makeLatLngBounds(northEastCoordinates: Position, southWestCoordinates: Position): FeatureCollection<Point>;
7
+ export declare const makeFeature: typeof feature;
8
+ export declare function makeFeatureCollection<G = Geometry, P = Properties>(features?: Array<Feature<G, P>>, options?: {
9
+ bbox?: BBox;
10
+ id?: Id;
11
+ }): FeatureCollection<G, P>;
12
+ export declare function addToFeatureCollection(newFeatureCollection: FeatureCollection, newFeature: Feature): FeatureCollection;
13
+ export declare const calculateDistance: typeof distance;
14
+ export declare const pointAlongLine: typeof along;
15
+ //# sourceMappingURL=geoUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoUtils.d.ts","sourceRoot":"","sources":["../../../javascript/utils/geoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,EACV,EAAE,EACF,IAAI,EACJ,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,OAAO,EACR,MAAM,eAAe,CAAC;AACvB,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,eAAO,MAAM,SAAS,cAAQ,CAAC;AAE/B,eAAO,MAAM,cAAc,mBAAa,CAAC;AAEzC,wBAAgB,gBAAgB,CAC9B,oBAAoB,EAAE,QAAQ,EAC9B,oBAAoB,EAAE,QAAQ,GAC7B,iBAAiB,CAAC,KAAK,CAAC,CAK1B;AAED,eAAO,MAAM,WAAW,gBAAU,CAAC;AAEnC,wBAAgB,qBAAqB,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,GAAG,UAAU,EAChE,QAAQ,GAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAM,EACnC,OAAO,CAAC,EAAE;IACR,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,EAAE,CAAC,EAAE,EAAE,CAAC;CACT,2BAGF;AAED,wBAAgB,sBAAsB,CACpC,oBAAoB,EAAE,iBAAiB,EACvC,UAAU,EAAE,OAAO,GAClB,iBAAiB,CAKnB;AAED,eAAO,MAAM,iBAAiB,iBAAW,CAAC;AAE1C,eAAO,MAAM,cAAc,cAAQ,CAAC"}
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import { ImageSourcePropType } from 'react-native';
3
+ import PropTypes from 'prop-types';
4
+ export declare const ornamentPositionPropType: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
5
+ top: PropTypes.Requireable<number>;
6
+ left: PropTypes.Requireable<number>;
7
+ }> | PropTypes.InferProps<{
8
+ top: PropTypes.Requireable<number>;
9
+ right: PropTypes.Requireable<number>;
10
+ }> | PropTypes.InferProps<{
11
+ bottom: PropTypes.Requireable<number>;
12
+ left: PropTypes.Requireable<number>;
13
+ }> | PropTypes.InferProps<{
14
+ bottom: PropTypes.Requireable<number>;
15
+ right: PropTypes.Requireable<number>;
16
+ }> | null | undefined>>;
17
+ export declare function isAndroid(): boolean;
18
+ export declare function existenceChange(cur: boolean, next: boolean): boolean;
19
+ export declare function isFunction(fn: unknown): fn is boolean;
20
+ export declare function isNumber(num: unknown): num is number;
21
+ export declare function isUndefined(obj: unknown): obj is undefined;
22
+ export declare function isString(str: unknown): str is string;
23
+ export declare function isBoolean(bool: unknown): bool is boolean;
24
+ export declare function isPrimitive(value: unknown): value is string | number | boolean;
25
+ export declare type NativeArg = string | number | boolean | null | {
26
+ [k: string]: NativeArg;
27
+ } | NativeArg[];
28
+ export declare function runNativeCommand<ReturnType = NativeArg>(module: string, name: string, nativeRef: any, args: NativeArg[]): Promise<ReturnType>;
29
+ export declare function cloneReactChildrenWithProps(children: Parameters<typeof React.Children.map>[0], propsToAdd?: {
30
+ [key: string]: string;
31
+ }): any;
32
+ export declare function resolveImagePath(imageRef: ImageSourcePropType): string;
33
+ export declare function getIOSModuleName(moduleName: string): string;
34
+ export declare function toJSONString(json?: any): string;
35
+ export declare type OrnamentPositonProp = {
36
+ top: number;
37
+ left: number;
38
+ } | {
39
+ top: number;
40
+ right: number;
41
+ } | {
42
+ bottom: number;
43
+ left: number;
44
+ } | {
45
+ bottom: number;
46
+ right: number;
47
+ };
48
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../javascript/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,SAAS,MAAM,YAAY,CAAC;AAcnC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;uBAKnC,CAAC;AAEH,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAKpE;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE,IAAI,OAAO,CAErD;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAE1D;AAED,wBAAgB,QAAQ,CAAC,GAAG,E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A;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@rnmapbox/maps",
3
3
  "description": "A Mapbox react native module for creating custom maps",
4
- "version": "10.0.0-beta.74",
4
+ "version": "10.0.0-beta.76",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "author": "React Native Mapbox Team",
9
9
  "main": "lib/commonjs/index.js",
10
10
  "browser": "./javascript/index.web.js",
11
- "react-native": "javascript/index.js",
11
+ "react-native": "javascript/index.ts",
12
12
  "keywords": [
13
13
  "gl",
14
14
  "ios",
@@ -52,7 +52,6 @@
52
52
  }
53
53
  },
54
54
  "dependencies": {
55
- "@mapbox/geo-viewport": ">=0.4.0",
56
55
  "@turf/along": "6.5.0",
57
56
  "@turf/distance": "6.5.0",
58
57
  "@turf/helpers": "6.5.0",
@@ -70,6 +69,7 @@
70
69
  "@react-native-community/eslint-config": "^3.0.1",
71
70
  "@sinonjs/fake-timers": "^8.0.1",
72
71
  "@testing-library/react-native": "^11.0.0",
72
+ "@types/debounce": "^1.2.1",
73
73
  "@types/mapbox-gl": "^2.7.5",
74
74
  "@types/react-native": ">=0.59.9",
75
75
  "@typescript-eslint/eslint-plugin": "^5.37.0",
@@ -120,7 +120,7 @@
120
120
  "*.{js,jsx,ts,tsx}": "eslint --fix"
121
121
  },
122
122
  "module": "lib/module/index.js",
123
- "types": "index.d.ts",
123
+ "types": "lib/typescript/index.d.ts",
124
124
  "files": [
125
125
  "javascript",
126
126
  "lib",