react-native-pointr 9.1.0 → 9.3.1
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/API_REFERENCE.md +887 -0
- package/CHANGELOG.md +35 -0
- package/EXTENDING.md +419 -0
- package/README.md +221 -117
- package/WAYFINDING_EVENTS.md +243 -0
- package/android/build.gradle +3 -16
- package/android/src/main/java/com/pointr/PTRCoreExtensions.kt +126 -0
- package/android/src/main/java/com/pointr/PTRMapWidgetCommandType.kt +3 -1
- package/android/src/main/java/com/pointr/PTRMapWidgetManager.kt +160 -11
- package/android/src/main/java/com/pointr/PointrModule.kt +106 -3
- package/example/pointr_rn_demo/.bundle/config +2 -0
- package/example/pointr_rn_demo/.eslintrc.js +4 -0
- package/example/pointr_rn_demo/.prettierrc.js +5 -0
- package/example/pointr_rn_demo/.watchmanconfig +1 -0
- package/example/pointr_rn_demo/App.tsx +323 -0
- package/example/pointr_rn_demo/Gemfile +16 -0
- package/example/pointr_rn_demo/Gemfile.lock +111 -0
- package/example/pointr_rn_demo/README.md +188 -0
- package/example/pointr_rn_demo/__tests__/App.test.tsx +13 -0
- package/example/pointr_rn_demo/android/app/build.gradle +119 -0
- package/example/pointr_rn_demo/android/app/debug.keystore +0 -0
- package/example/pointr_rn_demo/android/app/proguard-rules.pro +10 -0
- package/example/pointr_rn_demo/android/app/src/main/AndroidManifest.xml +27 -0
- package/example/pointr_rn_demo/android/app/src/main/java/com/pointr_rn_demo/MainActivity.kt +22 -0
- package/example/pointr_rn_demo/android/app/src/main/java/com/pointr_rn_demo/MainApplication.kt +27 -0
- package/example/pointr_rn_demo/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/values/strings.xml +3 -0
- package/example/pointr_rn_demo/android/app/src/main/res/values/styles.xml +9 -0
- package/example/pointr_rn_demo/android/build.gradle +32 -0
- package/example/pointr_rn_demo/android/gradle.properties +44 -0
- package/example/pointr_rn_demo/android/settings.gradle +6 -0
- package/example/pointr_rn_demo/app.json +4 -0
- package/example/pointr_rn_demo/babel.config.js +3 -0
- package/example/pointr_rn_demo/index.js +16 -0
- package/example/pointr_rn_demo/ios/.xcode.env +11 -0
- package/example/pointr_rn_demo/ios/Podfile +40 -0
- package/example/pointr_rn_demo/ios/Podfile.lock +2767 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo/AppDelegate.swift +48 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo/Images.xcassets/Contents.json +6 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo/Info.plist +63 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo/LaunchScreen.storyboard +47 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo/PrivacyInfo.xcprivacy +37 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo.xcodeproj/project.pbxproj +496 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo.xcodeproj/xcshareddata/xcschemes/pointr_rn_demo.xcscheme +88 -0
- package/example/pointr_rn_demo/ios/pointr_rn_demo.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/pointr_rn_demo/jest.config.js +3 -0
- package/example/pointr_rn_demo/metro.config.js +22 -0
- package/example/pointr_rn_demo/package-lock.json +11747 -0
- package/example/pointr_rn_demo/package.json +46 -0
- package/example/pointr_rn_demo/prepare-demo-distribution.sh +103 -0
- package/example/pointr_rn_demo/tsconfig.json +5 -0
- package/ios/PTRMapWidgetContainerView.swift +59 -7
- package/ios/PTRMapWidgetManager-Bridging.m +65 -1
- package/ios/PTRMapWidgetManager.swift +185 -144
- package/ios/PTRNativeLibrary-Bridging.m +4 -0
- package/ios/PTRNativeLibrary.swift +244 -18
- package/package.json +16 -2
- package/prepare-distribution.sh +84 -0
- package/react-native-pointr.podspec +1 -1
- package/src/PTRCommand.ts +34 -1
- package/src/PTRMapWidgetUtils.ts +105 -5
- package/src/PTRPoiManager.ts +20 -0
- package/src/index.tsx +40 -1
- package/src/types/PTRGeometry.ts +70 -0
- package/src/types/PTRPoi.ts +49 -0
- package/src/types/PTRPosition.ts +22 -0
- package/src/types/PTRWayfindingEvent.ts +18 -0
package/src/index.tsx
CHANGED
|
@@ -17,4 +17,43 @@ const PTRNativePointrLibrary = NativeModules.PTRNativePointrLibrary
|
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
// Export the native library as default
|
|
21
|
+
export default PTRNativePointrLibrary;
|
|
22
|
+
|
|
23
|
+
// Export POI Manager functions
|
|
24
|
+
export { getPois } from './PTRPoiManager';
|
|
25
|
+
|
|
26
|
+
// Export Map Widget utilities
|
|
27
|
+
export { showMapWidget } from './PTRMapWidgetUtils';
|
|
28
|
+
|
|
29
|
+
// Export PTR Commands
|
|
30
|
+
export {
|
|
31
|
+
PTRCommandType,
|
|
32
|
+
PTRCommand,
|
|
33
|
+
PTRSiteCommand,
|
|
34
|
+
PTRBuildingCommand,
|
|
35
|
+
PTRLevelCommand,
|
|
36
|
+
PTRPoiCommand,
|
|
37
|
+
PTRPathCommand,
|
|
38
|
+
PTRStaticPathCommand,
|
|
39
|
+
PTRStaticWayfindingCommand,
|
|
40
|
+
PTRMarkMyCarLevelCommand,
|
|
41
|
+
PTRMarkMyCarSiteCommand,
|
|
42
|
+
PTRShowMyCarSiteCommand,
|
|
43
|
+
PTRStartAndFocusCommand,
|
|
44
|
+
} from './PTRCommand';
|
|
45
|
+
|
|
46
|
+
// Export types
|
|
47
|
+
export type { PTRPoi, PTRPoiAttributes } from './types/PTRPoi';
|
|
48
|
+
export type { PTRPosition } from './types/PTRPosition';
|
|
49
|
+
export type { PTRWayfindingEvent } from './types/PTRWayfindingEvent';
|
|
50
|
+
export type {
|
|
51
|
+
PTRGeometry,
|
|
52
|
+
PTRGeoPoint,
|
|
53
|
+
PTRGeoPolygon,
|
|
54
|
+
PTRGeoMultiPoint,
|
|
55
|
+
PTRGeoLineString,
|
|
56
|
+
PTRGeoMultiLineString,
|
|
57
|
+
PTRGeoMultiPolygon,
|
|
58
|
+
PTRGeoCircle,
|
|
59
|
+
} from './types/PTRGeometry';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base point with latitude and longitude
|
|
3
|
+
*/
|
|
4
|
+
export interface PTRGeoPoint {
|
|
5
|
+
type: 'Point';
|
|
6
|
+
lat: number;
|
|
7
|
+
lon: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Polygon geometry with outer and inner rings
|
|
12
|
+
*/
|
|
13
|
+
export interface PTRGeoPolygon {
|
|
14
|
+
type: 'Polygon';
|
|
15
|
+
outer: PTRGeoPoint[];
|
|
16
|
+
inners: PTRGeoPoint[][];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Multi-point geometry
|
|
21
|
+
*/
|
|
22
|
+
export interface PTRGeoMultiPoint {
|
|
23
|
+
type: 'MultiPoint';
|
|
24
|
+
points: PTRGeoPoint[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Line string geometry
|
|
29
|
+
*/
|
|
30
|
+
export interface PTRGeoLineString {
|
|
31
|
+
type: 'LineString';
|
|
32
|
+
points: PTRGeoPoint[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Multi-line string geometry
|
|
37
|
+
*/
|
|
38
|
+
export interface PTRGeoMultiLineString {
|
|
39
|
+
type: 'MultiLineString';
|
|
40
|
+
lines: PTRGeoPoint[][];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Multi-polygon geometry
|
|
45
|
+
*/
|
|
46
|
+
export interface PTRGeoMultiPolygon {
|
|
47
|
+
type: 'MultiPolygon';
|
|
48
|
+
polygons: PTRGeoPolygon[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Circle geometry
|
|
53
|
+
*/
|
|
54
|
+
export interface PTRGeoCircle {
|
|
55
|
+
type: 'Circle';
|
|
56
|
+
center: PTRGeoPoint;
|
|
57
|
+
radius: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Union of all supported geometry types
|
|
62
|
+
*/
|
|
63
|
+
export type PTRGeometry =
|
|
64
|
+
| PTRGeoPoint
|
|
65
|
+
| PTRGeoPolygon
|
|
66
|
+
| PTRGeoMultiPoint
|
|
67
|
+
| PTRGeoLineString
|
|
68
|
+
| PTRGeoMultiLineString
|
|
69
|
+
| PTRGeoMultiPolygon
|
|
70
|
+
| PTRGeoCircle;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PTRPosition } from './PTRPosition';
|
|
2
|
+
import { PTRGeometry } from './PTRGeometry';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* POI attributes containing additional metadata
|
|
6
|
+
*/
|
|
7
|
+
export interface PTRPoiAttributes {
|
|
8
|
+
/** Logo URL */
|
|
9
|
+
logo?: string;
|
|
10
|
+
|
|
11
|
+
/** Array of image URLs */
|
|
12
|
+
images?: string[];
|
|
13
|
+
|
|
14
|
+
/** Description text */
|
|
15
|
+
description?: string;
|
|
16
|
+
|
|
17
|
+
/** Extra data as key-value pairs */
|
|
18
|
+
extra?: Record<string, any>;
|
|
19
|
+
|
|
20
|
+
/** Any other custom attributes */
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Point of Interest (POI) data structure
|
|
26
|
+
* Represents a feature from the Pointr SDK with location, geometry, and metadata
|
|
27
|
+
*/
|
|
28
|
+
export interface PTRPoi {
|
|
29
|
+
/** Internal unique identifier */
|
|
30
|
+
identifier: string;
|
|
31
|
+
|
|
32
|
+
/** External identifier for API references */
|
|
33
|
+
externalIdentifier: string;
|
|
34
|
+
|
|
35
|
+
/** Display name of the POI */
|
|
36
|
+
name: string;
|
|
37
|
+
|
|
38
|
+
/** POI type code (e.g., "lobby", "room", "building-outline") */
|
|
39
|
+
typeCode: string;
|
|
40
|
+
|
|
41
|
+
/** Geographic position with site, building, and level information */
|
|
42
|
+
position: PTRPosition;
|
|
43
|
+
|
|
44
|
+
/** Geometry data (point, polygon, etc.) */
|
|
45
|
+
geometry: PTRGeometry;
|
|
46
|
+
|
|
47
|
+
/** Additional POI attributes and metadata */
|
|
48
|
+
attributes: PTRPoiAttributes;
|
|
49
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geographic position with site, building, and level information
|
|
3
|
+
*/
|
|
4
|
+
export interface PTRPosition {
|
|
5
|
+
/** Latitude */
|
|
6
|
+
lat: number;
|
|
7
|
+
|
|
8
|
+
/** Longitude */
|
|
9
|
+
lon: number;
|
|
10
|
+
|
|
11
|
+
/** Whether the position is valid */
|
|
12
|
+
isValid: boolean;
|
|
13
|
+
|
|
14
|
+
/** Site identifier */
|
|
15
|
+
sid: string;
|
|
16
|
+
|
|
17
|
+
/** Building identifier */
|
|
18
|
+
bid: string;
|
|
19
|
+
|
|
20
|
+
/** Level index */
|
|
21
|
+
lvl: number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PTRPoi } from './PTRPoi';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Wayfinding event data structure
|
|
5
|
+
* Fired during wayfinding operations to track navigation state
|
|
6
|
+
*/
|
|
7
|
+
export interface PTRWayfindingEvent {
|
|
8
|
+
/**
|
|
9
|
+
* Event type:
|
|
10
|
+
* -1 = Cancelled (user cancelled the navigation)
|
|
11
|
+
* 0 = Started (wayfinding navigation has started)
|
|
12
|
+
* 1 = Ended (user completed or closed the navigation)
|
|
13
|
+
*/
|
|
14
|
+
type: number;
|
|
15
|
+
|
|
16
|
+
/** Destination Point of Interest */
|
|
17
|
+
poi: PTRPoi;
|
|
18
|
+
}
|