react-native-cn-maps 0.1.0
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.
- package/CnMaps.podspec +21 -0
- package/LICENSE +20 -0
- package/README.md +89 -0
- package/android/build.gradle +68 -0
- package/android/src/main/AndroidManifest.xml +7 -0
- package/android/src/main/java/com/cnmaps/MapView.kt +368 -0
- package/android/src/main/java/com/cnmaps/MapViewManager.kt +112 -0
- package/android/src/main/java/com/cnmaps/MapsPackage.kt +17 -0
- package/ios/RNMapsMapView.h +14 -0
- package/ios/RNMapsMapView.mm +291 -0
- package/lib/module/MapMarker.js +8 -0
- package/lib/module/MapMarker.js.map +1 -0
- package/lib/module/MapView.js +111 -0
- package/lib/module/MapView.js.map +1 -0
- package/lib/module/MapViewNativeComponent.ts +79 -0
- package/lib/module/coordinate.js +72 -0
- package/lib/module/coordinate.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/MapMarker.d.ts +8 -0
- package/lib/typescript/src/MapMarker.d.ts.map +1 -0
- package/lib/typescript/src/MapView.d.ts +145 -0
- package/lib/typescript/src/MapView.d.ts.map +1 -0
- package/lib/typescript/src/MapViewNativeComponent.d.ts +55 -0
- package/lib/typescript/src/MapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/coordinate.d.ts +8 -0
- package/lib/typescript/src/coordinate.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +50 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +182 -0
- package/src/MapMarker.tsx +14 -0
- package/src/MapView.tsx +201 -0
- package/src/MapViewNativeComponent.ts +79 -0
- package/src/coordinate.ts +123 -0
- package/src/index.tsx +15 -0
- package/src/types.ts +59 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CoordinateSystem, MapProvider, MapViewHandle, RegionChangeEvent } from './types';
|
|
3
|
+
export declare const MapView: React.ForwardRefExoticComponent<Readonly<Omit<Readonly<{
|
|
4
|
+
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
|
|
5
|
+
onAccessibilityTap?: (() => unknown) | undefined;
|
|
6
|
+
onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
|
|
7
|
+
onMagicTap?: (() => unknown) | undefined;
|
|
8
|
+
onAccessibilityEscape?: (() => unknown) | undefined;
|
|
9
|
+
}>, "onMoveShouldSetResponder" | "onMoveShouldSetResponderCapture" | "onResponderGrant" | "onResponderMove" | "onResponderReject" | "onResponderRelease" | "onResponderStart" | "onResponderEnd" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "onStartShouldSetResponderCapture" | "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
10
|
+
onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
11
|
+
onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
12
|
+
onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
|
|
13
|
+
onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
14
|
+
onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
15
|
+
onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
16
|
+
onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
17
|
+
onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
18
|
+
onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
19
|
+
onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
20
|
+
onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
21
|
+
onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
22
|
+
}>, "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
23
|
+
onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
|
|
24
|
+
onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
|
|
25
|
+
}>, "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
26
|
+
onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
27
|
+
onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
28
|
+
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
29
|
+
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
30
|
+
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
31
|
+
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
32
|
+
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
33
|
+
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
34
|
+
onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
35
|
+
onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
36
|
+
onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
37
|
+
onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
38
|
+
onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
39
|
+
onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
40
|
+
onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
41
|
+
onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
42
|
+
onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
43
|
+
onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
44
|
+
onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
45
|
+
onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
46
|
+
onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
47
|
+
onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
48
|
+
}>, "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
49
|
+
onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
|
|
50
|
+
onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
|
|
51
|
+
onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
|
|
52
|
+
onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
|
|
53
|
+
}>, "onClick" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
54
|
+
onKeyDown?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
|
|
55
|
+
onKeyDownCapture?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
|
|
56
|
+
onKeyUp?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
|
|
57
|
+
onKeyUpCapture?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
|
|
58
|
+
}>, "onClick" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
59
|
+
onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
60
|
+
onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
61
|
+
onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
62
|
+
onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
63
|
+
onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
64
|
+
onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
65
|
+
onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
66
|
+
onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
67
|
+
}>, "onClick" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
68
|
+
nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
|
|
69
|
+
nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
|
|
70
|
+
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
71
|
+
hasTVPreferredFocus?: boolean | undefined;
|
|
72
|
+
nextFocusDown?: number | undefined;
|
|
73
|
+
nextFocusForward?: number | undefined;
|
|
74
|
+
nextFocusLeft?: number | undefined;
|
|
75
|
+
nextFocusRight?: number | undefined;
|
|
76
|
+
nextFocusUp?: number | undefined;
|
|
77
|
+
focusable?: boolean | undefined;
|
|
78
|
+
tabIndex?: 0 | -1;
|
|
79
|
+
onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
|
|
80
|
+
}>, "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
81
|
+
shouldRasterizeIOS?: boolean | undefined;
|
|
82
|
+
}>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<Omit<Readonly<{
|
|
83
|
+
accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
|
|
84
|
+
"aria-labelledby"?: string | undefined;
|
|
85
|
+
accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
|
|
86
|
+
"aria-live"?: ("polite" | "assertive" | "off") | undefined;
|
|
87
|
+
importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
|
|
88
|
+
screenReaderFocusable?: boolean;
|
|
89
|
+
}>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & Omit<Readonly<{
|
|
90
|
+
accessibilityIgnoresInvertColors?: boolean | undefined;
|
|
91
|
+
accessibilityViewIsModal?: boolean | undefined;
|
|
92
|
+
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
93
|
+
accessibilityLargeContentTitle?: string | undefined;
|
|
94
|
+
"aria-modal"?: boolean | undefined;
|
|
95
|
+
accessibilityElementsHidden?: boolean | undefined;
|
|
96
|
+
accessibilityLanguage?: string | undefined;
|
|
97
|
+
accessibilityRespondsToUserInteraction?: boolean | undefined;
|
|
98
|
+
}>, "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & {
|
|
99
|
+
accessible?: boolean | undefined;
|
|
100
|
+
accessibilityLabel?: string | undefined;
|
|
101
|
+
accessibilityHint?: string | undefined;
|
|
102
|
+
"aria-label"?: string | undefined;
|
|
103
|
+
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
104
|
+
role?: import("react-native").Role | undefined;
|
|
105
|
+
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
106
|
+
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
107
|
+
"aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
|
|
108
|
+
"aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
|
|
109
|
+
"aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
|
|
110
|
+
"aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
|
|
111
|
+
accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
|
|
112
|
+
"aria-busy"?: boolean | undefined;
|
|
113
|
+
"aria-checked"?: (boolean | undefined) | "mixed";
|
|
114
|
+
"aria-disabled"?: boolean | undefined;
|
|
115
|
+
"aria-expanded"?: boolean | undefined;
|
|
116
|
+
"aria-selected"?: boolean | undefined;
|
|
117
|
+
"aria-hidden"?: boolean | undefined;
|
|
118
|
+
}>, "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
119
|
+
children?: React.ReactNode;
|
|
120
|
+
style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
|
|
121
|
+
collapsable?: boolean | undefined;
|
|
122
|
+
collapsableChildren?: boolean | undefined;
|
|
123
|
+
id?: string;
|
|
124
|
+
testID?: string | undefined;
|
|
125
|
+
nativeID?: string | undefined;
|
|
126
|
+
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
127
|
+
hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
|
|
128
|
+
pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
|
|
129
|
+
removeClippedSubviews?: boolean | undefined;
|
|
130
|
+
experimental_accessibilityOrder?: Array<string> | undefined;
|
|
131
|
+
}>, never>> & {
|
|
132
|
+
provider?: MapProvider;
|
|
133
|
+
coordinateSystem?: CoordinateSystem;
|
|
134
|
+
initialRegion?: import("./types").Region;
|
|
135
|
+
region?: import("./types").Region;
|
|
136
|
+
showsUserLocation?: boolean;
|
|
137
|
+
zoomEnabled?: boolean;
|
|
138
|
+
scrollEnabled?: boolean;
|
|
139
|
+
rotateEnabled?: boolean;
|
|
140
|
+
pitchEnabled?: boolean;
|
|
141
|
+
children?: React.ReactNode;
|
|
142
|
+
onRegionChange?: (event: RegionChangeEvent) => void;
|
|
143
|
+
onRegionChangeComplete?: (event: RegionChangeEvent) => void;
|
|
144
|
+
} & React.RefAttributes<MapViewHandle>>;
|
|
145
|
+
//# sourceMappingURL=MapView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../src/MapView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,aAAa,EAIb,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAsBjB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCA4JnB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type CodegenTypes, type HostComponent, type ViewProps } from 'react-native';
|
|
2
|
+
export type NativeRegion = Readonly<{
|
|
3
|
+
latitude: CodegenTypes.Double;
|
|
4
|
+
longitude: CodegenTypes.Double;
|
|
5
|
+
latitudeDelta: CodegenTypes.Double;
|
|
6
|
+
longitudeDelta: CodegenTypes.Double;
|
|
7
|
+
}>;
|
|
8
|
+
export type NativeMarker = Readonly<{
|
|
9
|
+
identifier: string;
|
|
10
|
+
latitude: CodegenTypes.Double;
|
|
11
|
+
longitude: CodegenTypes.Double;
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
pinColor?: string;
|
|
15
|
+
draggable?: CodegenTypes.WithDefault<boolean, false>;
|
|
16
|
+
}>;
|
|
17
|
+
export type NativeRegionChangeEvent = Readonly<{
|
|
18
|
+
region: Readonly<{
|
|
19
|
+
latitude: CodegenTypes.Double;
|
|
20
|
+
longitude: CodegenTypes.Double;
|
|
21
|
+
latitudeDelta: CodegenTypes.Double;
|
|
22
|
+
longitudeDelta: CodegenTypes.Double;
|
|
23
|
+
}>;
|
|
24
|
+
isGesture?: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
export type NativeMarkerPressEvent = Readonly<{
|
|
27
|
+
identifier: string;
|
|
28
|
+
coordinate: Readonly<{
|
|
29
|
+
latitude: CodegenTypes.Double;
|
|
30
|
+
longitude: CodegenTypes.Double;
|
|
31
|
+
}>;
|
|
32
|
+
}>;
|
|
33
|
+
export interface NativeProps extends ViewProps {
|
|
34
|
+
provider?: CodegenTypes.WithDefault<string, 'amap'>;
|
|
35
|
+
coordinateSystem?: CodegenTypes.WithDefault<string, 'gcj02'>;
|
|
36
|
+
initialRegion?: NativeRegion;
|
|
37
|
+
region?: NativeRegion;
|
|
38
|
+
markers?: ReadonlyArray<NativeMarker>;
|
|
39
|
+
showsUserLocation?: CodegenTypes.WithDefault<boolean, false>;
|
|
40
|
+
zoomEnabled?: CodegenTypes.WithDefault<boolean, true>;
|
|
41
|
+
scrollEnabled?: CodegenTypes.WithDefault<boolean, true>;
|
|
42
|
+
rotateEnabled?: CodegenTypes.WithDefault<boolean, true>;
|
|
43
|
+
pitchEnabled?: CodegenTypes.WithDefault<boolean, true>;
|
|
44
|
+
onRegionChange?: CodegenTypes.DirectEventHandler<NativeRegionChangeEvent>;
|
|
45
|
+
onRegionChangeComplete?: CodegenTypes.DirectEventHandler<NativeRegionChangeEvent>;
|
|
46
|
+
onMarkerPress?: CodegenTypes.DirectEventHandler<NativeMarkerPressEvent>;
|
|
47
|
+
}
|
|
48
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
49
|
+
interface NativeCommands {
|
|
50
|
+
animateToRegion: (viewRef: React.ElementRef<ComponentType>, latitude: CodegenTypes.Double, longitude: CodegenTypes.Double, latitudeDelta: CodegenTypes.Double, longitudeDelta: CodegenTypes.Double, duration: CodegenTypes.Int32) => void;
|
|
51
|
+
}
|
|
52
|
+
export declare const Commands: NativeCommands;
|
|
53
|
+
declare const _default: ComponentType;
|
|
54
|
+
export default _default;
|
|
55
|
+
//# sourceMappingURL=MapViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/MapViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9B,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC;IAC/B,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declare function wgs84ToGcj02(coordinate: LatLng): LatLng;
|
|
3
|
+
export declare function gcj02ToWgs84(coordinate: LatLng): LatLng;
|
|
4
|
+
export declare function toProviderCoordinate(coordinate: LatLng, coordinateSystem: CoordinateSystem): LatLng;
|
|
5
|
+
export declare function fromProviderCoordinate(coordinate: LatLng, coordinateSystem: CoordinateSystem): LatLng;
|
|
6
|
+
export declare function toProviderRegion(region: Region | undefined, coordinateSystem: CoordinateSystem): Region | undefined;
|
|
7
|
+
export declare function fromProviderRegion(region: Region, coordinateSystem: CoordinateSystem): Region;
|
|
8
|
+
//# sourceMappingURL=coordinate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinate.d.ts","sourceRoot":"","sources":["../../../src/coordinate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAuDhE,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAoBvD;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,gBAAgB,GACjC,MAAM,CAER;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,gBAAgB,GACjC,MAAM,CAER;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,gBAAgB,EAAE,gBAAgB,GACjC,MAAM,GAAG,SAAS,CASpB;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,GACjC,MAAM,CAKR"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { MapView as default, MapView } from './MapView';
|
|
2
|
+
export { default as Marker, Marker as MapMarker } from './MapMarker';
|
|
3
|
+
export type { MapMarkerProps } from './MapMarker';
|
|
4
|
+
export type { CoordinateSystem, LatLng, MapEvent, MapProvider, MapViewHandle, MapViewProps, MarkerPressEvent, MarkerProps, Region, RegionChangeEvent, } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EACV,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,MAAM,EACN,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ColorValue, ViewProps } from 'react-native';
|
|
3
|
+
export type MapProvider = 'amap' | 'baidu' | 'tencent';
|
|
4
|
+
export type CoordinateSystem = 'gcj02' | 'wgs84';
|
|
5
|
+
export type LatLng = {
|
|
6
|
+
latitude: number;
|
|
7
|
+
longitude: number;
|
|
8
|
+
};
|
|
9
|
+
export type Region = LatLng & {
|
|
10
|
+
latitudeDelta: number;
|
|
11
|
+
longitudeDelta: number;
|
|
12
|
+
};
|
|
13
|
+
export type MapEvent<T = Record<string, unknown>> = {
|
|
14
|
+
nativeEvent: T;
|
|
15
|
+
};
|
|
16
|
+
export type RegionChangeEvent = MapEvent<{
|
|
17
|
+
region: Region;
|
|
18
|
+
isGesture?: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
export type MarkerPressEvent = MapEvent<{
|
|
21
|
+
coordinate: LatLng;
|
|
22
|
+
identifier: string;
|
|
23
|
+
}>;
|
|
24
|
+
export type MapViewProps = ViewProps & {
|
|
25
|
+
provider?: MapProvider;
|
|
26
|
+
coordinateSystem?: CoordinateSystem;
|
|
27
|
+
initialRegion?: Region;
|
|
28
|
+
region?: Region;
|
|
29
|
+
showsUserLocation?: boolean;
|
|
30
|
+
zoomEnabled?: boolean;
|
|
31
|
+
scrollEnabled?: boolean;
|
|
32
|
+
rotateEnabled?: boolean;
|
|
33
|
+
pitchEnabled?: boolean;
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
onRegionChange?: (event: RegionChangeEvent) => void;
|
|
36
|
+
onRegionChangeComplete?: (event: RegionChangeEvent) => void;
|
|
37
|
+
};
|
|
38
|
+
export type MarkerProps = ViewProps & {
|
|
39
|
+
coordinate: LatLng;
|
|
40
|
+
identifier?: string;
|
|
41
|
+
title?: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
pinColor?: ColorValue;
|
|
44
|
+
draggable?: boolean;
|
|
45
|
+
onPress?: (event: MarkerPressEvent) => void;
|
|
46
|
+
};
|
|
47
|
+
export type MapViewHandle = {
|
|
48
|
+
animateToRegion: (region: Region, duration?: number) => void;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjD,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MA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,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9D,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-cn-maps",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React Native Map components for iOS + Android",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"example": "yarn workspace react-native-cn-maps-example",
|
|
36
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
37
|
+
"prepare": "bob build",
|
|
38
|
+
"typecheck": "tsc",
|
|
39
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
|
+
"test": "jest",
|
|
41
|
+
"release": "release-it --only-version",
|
|
42
|
+
"web": "vite",
|
|
43
|
+
"build:web": "vite build"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"react-native",
|
|
47
|
+
"ios",
|
|
48
|
+
"android"
|
|
49
|
+
],
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/popsiclelmlm/react-native-cn-maps.git"
|
|
53
|
+
},
|
|
54
|
+
"author": "popsiclelmlm <no_7seven@163.com> (https://github.com/popsiclelmlm)",
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/popsiclelmlm/react-native-cn-maps/issues"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://github.com/popsiclelmlm/react-native-cn-maps#readme",
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"registry": "https://registry.npmjs.org/"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
65
|
+
"@eslint/compat": "^2.0.3",
|
|
66
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
67
|
+
"@eslint/js": "^10.0.1",
|
|
68
|
+
"@jest/globals": "^29.7.0",
|
|
69
|
+
"@react-native/babel-preset": "0.85.0",
|
|
70
|
+
"@react-native/eslint-config": "0.85.0",
|
|
71
|
+
"@react-native/jest-preset": "0.85.0",
|
|
72
|
+
"@release-it/conventional-changelog": "^10.0.6",
|
|
73
|
+
"@types/react": "^19.2.0",
|
|
74
|
+
"commitlint": "^20.5.0",
|
|
75
|
+
"del-cli": "^7.0.0",
|
|
76
|
+
"eslint": "^9.39.4",
|
|
77
|
+
"eslint-config-prettier": "^10.1.8",
|
|
78
|
+
"eslint-plugin-ft-flow": "^3.0.11",
|
|
79
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
80
|
+
"jest": "^29.7.0",
|
|
81
|
+
"lefthook": "^2.1.4",
|
|
82
|
+
"prettier": "^3.8.1",
|
|
83
|
+
"react": "19.2.3",
|
|
84
|
+
"react-native": "0.85.0",
|
|
85
|
+
"react-native-builder-bob": "^0.41.0",
|
|
86
|
+
"react-native-web": "~0.21.1",
|
|
87
|
+
"release-it": "^19.2.4",
|
|
88
|
+
"turbo": "^2.8.21",
|
|
89
|
+
"typescript": "^6.0.2"
|
|
90
|
+
},
|
|
91
|
+
"peerDependencies": {
|
|
92
|
+
"react": "*",
|
|
93
|
+
"react-native": "*"
|
|
94
|
+
},
|
|
95
|
+
"workspaces": [
|
|
96
|
+
"example"
|
|
97
|
+
],
|
|
98
|
+
"packageManager": "yarn@4.11.0",
|
|
99
|
+
"react-native-builder-bob": {
|
|
100
|
+
"source": "src",
|
|
101
|
+
"output": "lib",
|
|
102
|
+
"targets": [
|
|
103
|
+
[
|
|
104
|
+
"module",
|
|
105
|
+
{
|
|
106
|
+
"esm": true
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
"typescript",
|
|
111
|
+
{
|
|
112
|
+
"project": "tsconfig.build.json"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"codegenConfig": {
|
|
118
|
+
"name": "RNMapsSpecs",
|
|
119
|
+
"type": "all",
|
|
120
|
+
"jsSrcsDir": "src",
|
|
121
|
+
"android": {
|
|
122
|
+
"javaPackageName": "com.cnmaps"
|
|
123
|
+
},
|
|
124
|
+
"ios": {
|
|
125
|
+
"components": {
|
|
126
|
+
"RNMapsMapView": {
|
|
127
|
+
"className": "RNMapsMapView"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"prettier": {
|
|
133
|
+
"quoteProps": "consistent",
|
|
134
|
+
"singleQuote": true,
|
|
135
|
+
"tabWidth": 2,
|
|
136
|
+
"trailingComma": "es5",
|
|
137
|
+
"useTabs": false
|
|
138
|
+
},
|
|
139
|
+
"jest": {
|
|
140
|
+
"preset": "@react-native/jest-preset",
|
|
141
|
+
"modulePathIgnorePatterns": [
|
|
142
|
+
"<rootDir>/example/node_modules",
|
|
143
|
+
"<rootDir>/lib/"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"commitlint": {
|
|
147
|
+
"extends": [
|
|
148
|
+
"@commitlint/config-conventional"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"release-it": {
|
|
152
|
+
"git": {
|
|
153
|
+
"commitMessage": "chore: release ${version}",
|
|
154
|
+
"tagName": "v${version}"
|
|
155
|
+
},
|
|
156
|
+
"npm": {
|
|
157
|
+
"publish": true
|
|
158
|
+
},
|
|
159
|
+
"github": {
|
|
160
|
+
"release": true
|
|
161
|
+
},
|
|
162
|
+
"plugins": {
|
|
163
|
+
"@release-it/conventional-changelog": {
|
|
164
|
+
"preset": {
|
|
165
|
+
"name": "angular"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"create-react-native-library": {
|
|
171
|
+
"type": "fabric-view",
|
|
172
|
+
"languages": "kotlin-objc",
|
|
173
|
+
"tools": [
|
|
174
|
+
"eslint",
|
|
175
|
+
"jest",
|
|
176
|
+
"lefthook",
|
|
177
|
+
"release-it",
|
|
178
|
+
"vite"
|
|
179
|
+
],
|
|
180
|
+
"version": "0.62.0"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { MarkerProps } from './types';
|
|
2
|
+
|
|
3
|
+
export type MarkerComponent = ((props: MarkerProps) => null) & {
|
|
4
|
+
__MAP_MARKER: true;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const Marker: MarkerComponent = function Marker(_props: MarkerProps) {
|
|
8
|
+
return null;
|
|
9
|
+
} as MarkerComponent;
|
|
10
|
+
|
|
11
|
+
Marker.__MAP_MARKER = true;
|
|
12
|
+
|
|
13
|
+
export default Marker;
|
|
14
|
+
export type { MarkerProps as MapMarkerProps };
|