@mappedin/blue-dot 6.0.1-beta.60 → 6.0.1-beta.62
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/lib/esm/chunk-TYUDBRNJ.js +1 -0
- package/lib/esm/index.d.ts +20692 -843
- package/lib/esm/index.js +1 -11
- package/lib/esm/react/index.d.ts +20659 -851
- package/lib/esm/react/index.js +1 -75
- package/lib/rn/blue-dot.d.ts +47 -9
- package/lib/rn/constants.d.ts +1 -0
- package/lib/rn/index-rn.js +5 -316
- package/lib/rn/model-manager.d.ts +2 -2
- package/lib/rn/types.d.ts +13 -1
- package/lib/rn/utils.d.ts +9 -0
- package/package.json +8 -6
- package/lib/blue-dot.iife.js.map +0 -7
- package/lib/esm/chunk-RONFZDXM.js +0 -1560
- package/lib/esm/chunk-RONFZDXM.js.map +0 -7
- package/lib/esm/index.js.map +0 -7
- package/lib/esm/react/index.js.map +0 -7
- package/lib/rn/index-rn.js.map +0 -7
|
@@ -12,8 +12,8 @@ export declare class BlueDotModelManager {
|
|
|
12
12
|
get options(): import("type-fest/source/readonly-deep").ReadonlyObjectDeep<import("./types").BlueDotState>;
|
|
13
13
|
getPosition(): Coordinate | undefined;
|
|
14
14
|
setPosition(value: Coordinate): void;
|
|
15
|
-
setAccuracy(value: GeolocationPositionExtended['coords']['accuracy'] | undefined): void;
|
|
16
|
-
setHeading(value: GeolocationPositionExtended['coords']['heading'] | undefined): void;
|
|
15
|
+
setAccuracy(value: GeolocationPositionExtended['coords']['accuracy'] | undefined, animate?: boolean): void;
|
|
16
|
+
setHeading(value: GeolocationPositionExtended['coords']['heading'] | undefined, animate?: boolean): void;
|
|
17
17
|
setAltitude(value: number | undefined): void;
|
|
18
18
|
/**
|
|
19
19
|
* Updates appearance of the BlueDot models based on a given status.
|
package/lib/rn/types.d.ts
CHANGED
|
@@ -42,7 +42,8 @@ export type FollowCameraOptions = {
|
|
|
42
42
|
};
|
|
43
43
|
export type BlueDotEventPayloads = {
|
|
44
44
|
/**
|
|
45
|
-
* Emitted when the Blue Dot's position is updated.
|
|
45
|
+
* Emitted when the Blue Dot's position is updated either from the device's geolocation API or by calling {@link BlueDot.update}.
|
|
46
|
+
* see {@link BlueDot.watchDevicePosition} for more details.
|
|
46
47
|
*/
|
|
47
48
|
'position-update': {
|
|
48
49
|
floor: Floor | undefined;
|
|
@@ -50,6 +51,13 @@ export type BlueDotEventPayloads = {
|
|
|
50
51
|
accuracy: GeolocationPosition['coords']['accuracy'] | undefined;
|
|
51
52
|
coordinate: Coordinate;
|
|
52
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Emitted when the device's orientation changes and the Blue Dot's heading is updated.
|
|
56
|
+
* see {@link BlueDot.watchDeviceOrientation} for more details.
|
|
57
|
+
*/
|
|
58
|
+
'device-orientation-update': {
|
|
59
|
+
heading: GeolocationPosition['coords']['heading'] | undefined;
|
|
60
|
+
};
|
|
53
61
|
/**
|
|
54
62
|
* Emitted when the Blue Dot's status changes.
|
|
55
63
|
*/
|
|
@@ -251,3 +259,7 @@ export type GeolocationPositionExtended = GeolocationPosition & {
|
|
|
251
259
|
readonly floorLevel?: number;
|
|
252
260
|
};
|
|
253
261
|
};
|
|
262
|
+
export type DeviceOrientationEventPermissionState = 'granted' | 'denied' | 'prompt';
|
|
263
|
+
export type DeviceOrientationEventWithRequestPermission = typeof DeviceOrientationEvent & {
|
|
264
|
+
requestPermission: () => Promise<DeviceOrientationEventPermissionState>;
|
|
265
|
+
};
|
package/lib/rn/utils.d.ts
CHANGED
|
@@ -73,3 +73,12 @@ export declare function interpolateAltitude(now: number, startTime: number | und
|
|
|
73
73
|
};
|
|
74
74
|
export declare function shouldShowHeadingCone(state: BlueDotStatus, heading: GeolocationPositionExtended['coords']['heading'] | undefined, displayWhenInactive: boolean): boolean;
|
|
75
75
|
export declare function shouldShowAccuracyRing(state: BlueDotStatus, accuracy: GeolocationPositionExtended['coords']['accuracy'] | undefined): boolean;
|
|
76
|
+
export declare function supportsDeviceOrientationEvent(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Request permission to access the device's orientation.
|
|
79
|
+
* This must be called in response to a user action such as a tap or click and cannot be called automatically.
|
|
80
|
+
* @see https://www.w3.org/TR/orientation-event/#dom-deviceorientationevent-requestpermission
|
|
81
|
+
*
|
|
82
|
+
* @returns True if permission is granted, false otherwise
|
|
83
|
+
*/
|
|
84
|
+
export declare function requestDeviceOrientationPermission(): Promise<boolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappedin/blue-dot",
|
|
3
|
-
"version": "6.0.1-beta.
|
|
3
|
+
"version": "6.0.1-beta.62",
|
|
4
4
|
"homepage": "https://developer.mappedin.com/",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/esm/index.js",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
46
|
-
"@mappedin/mappedin-js": "^6.
|
|
47
|
-
"@mappedin/react-
|
|
48
|
-
"@mappedin/react-sdk": "^6.
|
|
46
|
+
"@mappedin/mappedin-js": "^6.4.0",
|
|
47
|
+
"@mappedin/react-sdk": "^6.4.0",
|
|
48
|
+
"@mappedin/react-native-sdk": "^6.4.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@mappedin/react-native-sdk": {
|
|
@@ -66,13 +66,15 @@
|
|
|
66
66
|
"start": "pnpm build && concurrently \"node scripts/build.mjs --watchChanges\" \"node scripts/start.mjs\"",
|
|
67
67
|
"build:deps": "RN_BUILD=true npx turbo build --filter=@mappedin/blue-dot --ui stream",
|
|
68
68
|
"build": "pnpm clean && tsc -b tsconfig.build.json && node scripts/build.mjs",
|
|
69
|
-
"build:prod": "cross-env NODE_ENV=production
|
|
69
|
+
"build:prod": "cross-env NODE_ENV=production RN_BUILD=true pnpm build",
|
|
70
70
|
"build:rn": "cross-env RN_BUILD=true pnpm build",
|
|
71
|
+
"build:examples": "node ../scripts/build-examples.mjs blue-dot",
|
|
71
72
|
"types": "tsc -b",
|
|
72
73
|
"version:ci": "pnpm version --no-commit-hooks --no-git-tag-version",
|
|
73
74
|
"test": "pnpm -w test blue-dot",
|
|
74
75
|
"test:cov": "NODE_ENV=test jest --coverage",
|
|
75
76
|
"clean": "rm -rf lib/** && rm -rf examples/dist/**",
|
|
76
|
-
"docs": "pnpm build &&
|
|
77
|
+
"docs": "pnpm build && pnpm docs:build",
|
|
78
|
+
"docs:build": "typedoc"
|
|
77
79
|
}
|
|
78
80
|
}
|