react-native-maps 1.21.0-alpha.95 → 1.21.0-alpha.97

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 (62) hide show
  1. package/lib/{MapMarker.d.ts → src/MapMarker.d.ts} +1 -1
  2. package/lib/{MapMarker.js → src/MapMarker.js} +1 -1
  3. package/lib/{MapView.js → src/MapView.js} +2 -2
  4. package/lib/{createFabricMap.d.ts → src/createFabricMap.d.ts} +2 -2
  5. package/lib/{createFabricMap.js → src/createFabricMap.js} +1 -1
  6. package/lib/{decorateMapComponent.js → src/decorateMapComponent.js} +6 -6
  7. package/package.json +4 -8
  8. package/specs/NativeAirMapsModule.ts +36 -0
  9. package/specs/NativeComponentCallout.ts +63 -0
  10. package/specs/NativeComponentCircle.ts +94 -0
  11. package/specs/NativeComponentGoogleMapView.ts +916 -0
  12. package/specs/NativeComponentGooglePolygon.ts +94 -0
  13. package/specs/NativeComponentMapView.ts +1071 -0
  14. package/specs/NativeComponentMarker.ts +326 -0
  15. package/specs/NativeComponentOverlay.ts +89 -0
  16. package/specs/NativeComponentPolyline.ts +124 -0
  17. /package/lib/{AnimatedRegion.d.ts → src/AnimatedRegion.d.ts} +0 -0
  18. /package/lib/{AnimatedRegion.js → src/AnimatedRegion.js} +0 -0
  19. /package/lib/{Geojson.d.ts → src/Geojson.d.ts} +0 -0
  20. /package/lib/{Geojson.js → src/Geojson.js} +0 -0
  21. /package/lib/{MapCallout.d.ts → src/MapCallout.d.ts} +0 -0
  22. /package/lib/{MapCallout.js → src/MapCallout.js} +0 -0
  23. /package/lib/{MapCalloutSubview.d.ts → src/MapCalloutSubview.d.ts} +0 -0
  24. /package/lib/{MapCalloutSubview.js → src/MapCalloutSubview.js} +0 -0
  25. /package/lib/{MapCircle.d.ts → src/MapCircle.d.ts} +0 -0
  26. /package/lib/{MapCircle.js → src/MapCircle.js} +0 -0
  27. /package/lib/{MapHeatmap.d.ts → src/MapHeatmap.d.ts} +0 -0
  28. /package/lib/{MapHeatmap.js → src/MapHeatmap.js} +0 -0
  29. /package/lib/{MapLocalTile.d.ts → src/MapLocalTile.d.ts} +0 -0
  30. /package/lib/{MapLocalTile.js → src/MapLocalTile.js} +0 -0
  31. /package/lib/{MapMarkerNativeComponent.d.ts → src/MapMarkerNativeComponent.d.ts} +0 -0
  32. /package/lib/{MapMarkerNativeComponent.js → src/MapMarkerNativeComponent.js} +0 -0
  33. /package/lib/{MapOverlay.d.ts → src/MapOverlay.d.ts} +0 -0
  34. /package/lib/{MapOverlay.js → src/MapOverlay.js} +0 -0
  35. /package/lib/{MapPolygon.d.ts → src/MapPolygon.d.ts} +0 -0
  36. /package/lib/{MapPolygon.js → src/MapPolygon.js} +0 -0
  37. /package/lib/{MapPolygon.types.d.ts → src/MapPolygon.types.d.ts} +0 -0
  38. /package/lib/{MapPolygon.types.js → src/MapPolygon.types.js} +0 -0
  39. /package/lib/{MapPolyline.d.ts → src/MapPolyline.d.ts} +0 -0
  40. /package/lib/{MapPolyline.js → src/MapPolyline.js} +0 -0
  41. /package/lib/{MapUrlTile.d.ts → src/MapUrlTile.d.ts} +0 -0
  42. /package/lib/{MapUrlTile.js → src/MapUrlTile.js} +0 -0
  43. /package/lib/{MapView.d.ts → src/MapView.d.ts} +0 -0
  44. /package/lib/{MapView.types.d.ts → src/MapView.types.d.ts} +0 -0
  45. /package/lib/{MapView.types.js → src/MapView.types.js} +0 -0
  46. /package/lib/{MapView.web.d.ts → src/MapView.web.d.ts} +0 -0
  47. /package/lib/{MapView.web.js → src/MapView.web.js} +0 -0
  48. /package/lib/{MapViewNativeComponent.d.ts → src/MapViewNativeComponent.d.ts} +0 -0
  49. /package/lib/{MapViewNativeComponent.js → src/MapViewNativeComponent.js} +0 -0
  50. /package/lib/{MapWMSTile.d.ts → src/MapWMSTile.d.ts} +0 -0
  51. /package/lib/{MapWMSTile.js → src/MapWMSTile.js} +0 -0
  52. /package/lib/{ProviderConstants.d.ts → src/ProviderConstants.d.ts} +0 -0
  53. /package/lib/{ProviderConstants.js → src/ProviderConstants.js} +0 -0
  54. /package/lib/{decorateMapComponent.d.ts → src/decorateMapComponent.d.ts} +0 -0
  55. /package/lib/{fixImageProp.d.ts → src/fixImageProp.d.ts} +0 -0
  56. /package/lib/{fixImageProp.js → src/fixImageProp.js} +0 -0
  57. /package/lib/{index.d.ts → src/index.d.ts} +0 -0
  58. /package/lib/{index.js → src/index.js} +0 -0
  59. /package/lib/{sharedTypes.d.ts → src/sharedTypes.d.ts} +0 -0
  60. /package/lib/{sharedTypes.js → src/sharedTypes.js} +0 -0
  61. /package/lib/{sharedTypesInternal.d.ts → src/sharedTypesInternal.d.ts} +0 -0
  62. /package/lib/{sharedTypesInternal.js → src/sharedTypesInternal.js} +0 -0
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { Animated, ViewProps, ImageURISource, ImageRequireSource } from 'react-native';
3
3
  import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
4
4
  import { MapMarkerNativeComponentType } from './MapMarkerNativeComponent';
5
- import type { AppleMarkerPriority } from './specs/NativeComponentMarker';
5
+ import type { AppleMarkerPriority } from '../specs/NativeComponentMarker';
6
6
  import { CalloutPressEvent, LatLng, MarkerDeselectEvent, MarkerDragEvent, MarkerDragStartEndEvent, MarkerPressEvent, MarkerSelectEvent, Point } from './sharedTypes';
7
7
  import { Modify } from './sharedTypesInternal';
8
8
  type AppleMarkerVisibility = 'hidden' | 'adaptive' | 'visible';
@@ -28,7 +28,7 @@ const React = __importStar(require("react"));
28
28
  const react_native_1 = require("react-native");
29
29
  const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
30
30
  const MapMarkerNativeComponent_1 = require("./MapMarkerNativeComponent");
31
- const NativeComponentMarker_1 = require("./specs/NativeComponentMarker");
31
+ const NativeComponentMarker_1 = require("../specs/NativeComponentMarker");
32
32
  const ProviderConstants_1 = require("./ProviderConstants");
33
33
  const fixImageProp_1 = require("./fixImageProp");
34
34
  class MapMarker extends React.Component {
@@ -31,8 +31,8 @@ const React = __importStar(require("react"));
31
31
  const react_native_1 = require("react-native");
32
32
  const decorateMapComponent_1 = require("./decorateMapComponent");
33
33
  const MapViewNativeComponent_1 = require("./MapViewNativeComponent");
34
- const NativeComponentMapView_1 = __importStar(require("./specs/NativeComponentMapView"));
35
- const NativeComponentGoogleMapView_1 = __importStar(require("./specs/NativeComponentGoogleMapView"));
34
+ const NativeComponentMapView_1 = __importStar(require("../specs/NativeComponentMapView"));
35
+ const NativeComponentGoogleMapView_1 = __importStar(require("../specs/NativeComponentGoogleMapView"));
36
36
  const createFabricMap_1 = __importDefault(require("./createFabricMap"));
37
37
  const FabricMap = (0, createFabricMap_1.default)(NativeComponentMapView_1.default, NativeComponentMapView_1.Commands);
38
38
  var FabricGoogleMap = null;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { LatLng, Point, Region } from './sharedTypes';
3
3
  import type { Address, Camera, EdgePadding, SnapshotOptions } from './MapView.types';
4
- import { MapBoundaries } from './specs/NativeAirMapsModule';
5
- import { MapFabricNativeProps } from './specs/NativeComponentMapView';
4
+ import { MapBoundaries } from '../specs/NativeAirMapsModule';
5
+ import { MapFabricNativeProps } from '../specs/NativeComponentMapView';
6
6
  export type FabricMapViewProps = MapFabricNativeProps;
7
7
  export interface FabricMapHandle {
8
8
  getCamera: () => Promise<Camera>;
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
30
  const react_native_1 = require("react-native");
31
- const NativeAirMapsModule_1 = __importDefault(require("./specs/NativeAirMapsModule"));
31
+ const NativeAirMapsModule_1 = __importDefault(require("../specs/NativeAirMapsModule"));
32
32
  const createFabricMap = (ViewComponent, Commands) => {
33
33
  return (0, react_1.forwardRef)((props, ref) => {
34
34
  const fabricRef = (0, react_1.useRef)(null);
@@ -7,12 +7,12 @@ exports.googleMapIsInstalled = exports.createNotSupportedComponent = exports.get
7
7
  const react_1 = require("react");
8
8
  const react_native_1 = require("react-native");
9
9
  const ProviderConstants_1 = require("./ProviderConstants");
10
- const NativeComponentGooglePolygon_1 = __importDefault(require("./specs/NativeComponentGooglePolygon"));
11
- const NativeComponentMarker_1 = __importDefault(require("./specs/NativeComponentMarker"));
12
- const NativeComponentCallout_1 = __importDefault(require("./specs/NativeComponentCallout"));
13
- const NativeComponentPolyline_1 = __importDefault(require("./specs/NativeComponentPolyline"));
14
- const NativeComponentCircle_1 = __importDefault(require("./specs/NativeComponentCircle"));
15
- const NativeComponentOverlay_1 = __importDefault(require("./specs/NativeComponentOverlay"));
10
+ const NativeComponentGooglePolygon_1 = __importDefault(require("../specs/NativeComponentGooglePolygon"));
11
+ const NativeComponentMarker_1 = __importDefault(require("../specs/NativeComponentMarker"));
12
+ const NativeComponentCallout_1 = __importDefault(require("../specs/NativeComponentCallout"));
13
+ const NativeComponentPolyline_1 = __importDefault(require("../specs/NativeComponentPolyline"));
14
+ const NativeComponentCircle_1 = __importDefault(require("../specs/NativeComponentCircle"));
15
+ const NativeComponentOverlay_1 = __importDefault(require("../specs/NativeComponentOverlay"));
16
16
  exports.SUPPORTED = 'SUPPORTED';
17
17
  exports.USES_DEFAULT_IMPLEMENTATION = 'USES_DEFAULT_IMPLEMENTATION';
18
18
  exports.NOT_SUPPORTED = 'NOT_SUPPORTED';
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "main": "lib/index.js",
6
6
  "author": "Leland Richardson <leland.m.richardson@gmail.com>",
7
7
  "homepage": "https://github.com/react-native-maps/react-native-maps#readme",
8
- "version": "1.21.0-alpha.95",
8
+ "version": "1.21.0-alpha.97",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",
@@ -17,11 +17,11 @@
17
17
  "release": "semantic-release",
18
18
  "bundle-install": "cd example && bundle install",
19
19
  "pod-install": "cd example/ios && bundle exec pod install",
20
- "bootstrap": "yarn --cwd example && yarn && yarn bundle-install && yarn pod-install",
21
- "prepack": "node updateCodegenConfig.js"
20
+ "bootstrap": "yarn --cwd example && yarn && yarn bundle-install && yarn pod-install"
22
21
  },
23
22
  "files": [
24
23
  "lib",
24
+ "specs",
25
25
  "android",
26
26
  "ios",
27
27
  "react-native-maps.podspec",
@@ -94,11 +94,7 @@
94
94
  "codegenConfig": {
95
95
  "name": "RNMapsSpecs",
96
96
  "type": "all",
97
- "jsSrcsDir": "./lib/specs",
98
- "outputDir": {
99
- "ios": "ios/generated",
100
- "android": "android/generated"
101
- },
97
+ "jsSrcsDir": "./specs",
102
98
  "android": {
103
99
  "javaPackageName": "com.rnmaps.fabric"
104
100
  }
@@ -0,0 +1,36 @@
1
+ import type {TurboModule} from 'react-native';
2
+ import {TurboModuleRegistry} from 'react-native';
3
+ import type {Double} from 'react-native/Libraries/Types/CodegenTypes';
4
+ import type {Camera} from './NativeComponentMapView';
5
+ import {Address} from 'react-native-maps';
6
+
7
+ type LatLng = {
8
+ latitude: Double;
9
+ longitude: Double;
10
+ };
11
+
12
+ type Point = Readonly<{
13
+ x: Double; // Non-nullable Double for x
14
+ y: Double; // Non-nullable Double for y
15
+ }>;
16
+
17
+ export type Region = Readonly<
18
+ LatLng & {
19
+ latitudeDelta: Double; // Non-nullable Double for latitudeDelta
20
+ longitudeDelta: Double; // Non-nullable Double for longitudeDelta
21
+ }
22
+ >;
23
+
24
+ export type MapBoundaries = {northEast: LatLng; southWest: LatLng};
25
+
26
+ export interface Spec extends TurboModule {
27
+ getCamera(tag: Double): Promise<Camera>;
28
+ getMarkersFrames(tag: Double, onlyVisible: boolean): Promise<unknown>;
29
+ getMapBoundaries(tag: Double): Promise<MapBoundaries>;
30
+ takeSnapshot(tag: Double, config: string): Promise<string>;
31
+ getAddressFromCoordinates(tag: Double, coordinate: LatLng): Promise<Address>;
32
+ getPointForCoordinate(tag: Double, coordinate: LatLng): Promise<Point>;
33
+ getCoordinateForPoint(tag: Double, point: Point): Promise<LatLng>;
34
+ }
35
+
36
+ export default TurboModuleRegistry.getEnforcing<Spec>('RNMapsAirModule');
@@ -0,0 +1,63 @@
1
+ import type {HostComponent, ViewProps} from 'react-native';
2
+
3
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4
+ import {
5
+ Double,
6
+ BubblingEventHandler,
7
+ } from 'react-native/Libraries/Types/CodegenTypes';
8
+
9
+ export type LatLng = Readonly<{
10
+ latitude: Double; // Non-nullable Double for latitude
11
+ longitude: Double; // Non-nullable Double for longitude
12
+ }>;
13
+
14
+ export type CalloutPressEvent = BubblingEventHandler<
15
+ Readonly<{
16
+ action?: string;
17
+ id: string;
18
+ coordinate: {
19
+ latitude: Double; // Inlined LatLng
20
+ longitude: Double;
21
+ };
22
+ position?: {
23
+ x: Double; // Inlined Point
24
+ y: Double;
25
+ }; // Optional position for Android
26
+ }>
27
+ >;
28
+
29
+ export interface CalloutFabricNativeProps extends ViewProps {
30
+ /**
31
+ * If `true`, clicks on transparent areas in callout will be passed to map.
32
+ *
33
+ * @default false
34
+ * @platform iOS: Supported
35
+ * @platform Android: Not supported
36
+ */
37
+ alphaHitTest?: boolean;
38
+
39
+ /**
40
+ * Callback that is called when the user presses on the callout
41
+ *
42
+ * @platform iOS: Apple Maps only
43
+ * @platform Android: Supported
44
+ */
45
+ onPress?: CalloutPressEvent;
46
+
47
+ /**
48
+ * If `false`, a default "tooltip" bubble window will be drawn around this callouts children.
49
+ * If `true`, the child views can fully customize their appearance, including any "bubble" like styles.
50
+ *
51
+ * @default false
52
+ * @platform iOS: Supported
53
+ * @platform Android: Supported
54
+ */
55
+ tooltip?: boolean;
56
+ }
57
+
58
+ export default codegenNativeComponent<CalloutFabricNativeProps>(
59
+ 'RNMapsCallout',
60
+ {
61
+ excludedPlatforms: ['iOS'],
62
+ },
63
+ ) as HostComponent<CalloutFabricNativeProps>;
@@ -0,0 +1,94 @@
1
+ import type {HostComponent, ViewProps, ColorValue} from 'react-native';
2
+
3
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4
+ import {
5
+ Double,
6
+ Float,
7
+ BubblingEventHandler,
8
+ } from 'react-native/Libraries/Types/CodegenTypes';
9
+
10
+ export type LatLng = Readonly<{
11
+ latitude: Double; // Non-nullable Double for latitude
12
+ longitude: Double; // Non-nullable Double for longitude
13
+ }>;
14
+
15
+ export type CirclePressEventHandler = BubblingEventHandler<
16
+ Readonly<{
17
+ action?: string;
18
+ id: string;
19
+ coordinate: {
20
+ latitude: Double; // Inlined LatLng
21
+ longitude: Double;
22
+ };
23
+ position?: {
24
+ x: Double; // Inlined Point
25
+ y: Double;
26
+ }; // Optional position for Android
27
+ }>
28
+ >;
29
+
30
+ export interface CircleFabricNativeProps extends ViewProps {
31
+ /**
32
+ * The coordinates of the center of the circle.
33
+ *
34
+ * @platform iOS: Supported
35
+ * @platform Android: Supported
36
+ */
37
+ center: LatLng;
38
+
39
+ /**
40
+ * The stroke color to use for the path.
41
+ *
42
+ * @default `#000`, `rgba(r,g,b,0.5)`
43
+ * @platform iOS: Supported
44
+ * @platform Android: Supported
45
+ */
46
+ fillColor?: ColorValue;
47
+
48
+ /**
49
+ * The radius of the circle to be drawn (in meters)
50
+ *
51
+ * @platform iOS: Supported
52
+ * @platform Android: Supported
53
+ */
54
+ radius: Double;
55
+
56
+ /**
57
+ * The stroke color to use for the path.
58
+ *
59
+ * @default `#000`, `rgba(r,g,b,0.5)`
60
+ * @platform iOS: Supported
61
+ * @platform Android: Supported
62
+ */
63
+ strokeColor?: ColorValue;
64
+
65
+ /**
66
+ * Callback that is called when user taps on the map.
67
+ *
68
+ * @platform iOS: Supported
69
+ * @platform Android: Supported
70
+ */
71
+ onPress?: CirclePressEventHandler;
72
+
73
+ /**
74
+ * The stroke width to use for the path.
75
+ *
76
+ * @default 1
77
+ * @platform iOS: Supported
78
+ * @platform Android: Supported
79
+ */
80
+ strokeWidth?: Float;
81
+
82
+ /**
83
+ * Boolean to allow a polygon to be tappable and use the onPress function.
84
+ *
85
+ * @platform iOS: Google Maps only
86
+ * @platform Android: Supported
87
+ */
88
+ tappable?: boolean;
89
+ }
90
+
91
+ export default codegenNativeComponent<CircleFabricNativeProps>(
92
+ 'RNMapsCircle',
93
+ {},
94
+ ) as HostComponent<CircleFabricNativeProps>;