@tak-ps/cloudtak 13.77.0 → 13.77.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.
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import type { Position } from '@capacitor/geolocation';
|
|
2
2
|
import type { DevicePermissionContext } from './types.ts';
|
|
3
|
+
/**
|
|
4
|
+
* When set, the native layer POSTs each fix to `url` directly, independent of
|
|
5
|
+
* the WebView - iOS suspends the WebContent process in the background, so
|
|
6
|
+
* bridge-delivered fixes stop flowing while native delivery keeps working.
|
|
7
|
+
*/
|
|
8
|
+
export type NativeDeliveryOptions = {
|
|
9
|
+
url: string;
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
/** Minimum ms between native POSTs (and the Android update interval). */
|
|
12
|
+
minIntervalMs?: number;
|
|
13
|
+
};
|
|
3
14
|
export declare class GeolocationPermission {
|
|
4
15
|
private readonly context;
|
|
5
16
|
constructor(context: DevicePermissionContext);
|
|
@@ -7,16 +18,22 @@ export declare class GeolocationPermission {
|
|
|
7
18
|
private watchGeneration;
|
|
8
19
|
private lastLocationTimestamp;
|
|
9
20
|
private locationCallback;
|
|
10
|
-
private static readonly DISTANCE_FILTER_M;
|
|
11
21
|
private static readonly SEED_TIMEOUT_MS;
|
|
12
22
|
private static readonly SEED_MAX_AGE_MS;
|
|
13
23
|
static supportsLocationRequests(): boolean;
|
|
14
24
|
refreshStatus(): Promise<void>;
|
|
25
|
+
private refreshBackgroundStatus;
|
|
15
26
|
request(onGranted?: () => void): Promise<void>;
|
|
16
27
|
initializeSubscription(onGranted?: () => void): Promise<void>;
|
|
17
|
-
startWatch(onLocation: (position: Position) => void): Promise<void>;
|
|
28
|
+
startWatch(onLocation: (position: Position) => void, native?: NativeDeliveryOptions): Promise<void>;
|
|
18
29
|
private seedImmediateFix;
|
|
19
30
|
stopWatch(): Promise<void>;
|
|
20
31
|
private startBackgroundWatch;
|
|
32
|
+
/**
|
|
33
|
+
* Point native POST delivery at a rotated auth token. Best-effort: the
|
|
34
|
+
* watch restarts with fresh headers on the next app boot regardless.
|
|
35
|
+
*/
|
|
36
|
+
static updateNativeHeaders(headers: Record<string, string>): Promise<void>;
|
|
37
|
+
openNativeSettings(): Promise<void>;
|
|
21
38
|
private static backgroundLocationToPosition;
|
|
22
39
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type BrowserPermissionState = PermissionState | 'unsupported' | 'unknown';
|
|
2
|
-
export type BrowserPermissionType = 'location' | 'notification' | 'orientation' | 'storage' | 'camera' | 'wakeLock' | 'fileSystem';
|
|
1
|
+
export type BrowserPermissionState = PermissionState | 'when_in_use' | 'unsupported' | 'unknown';
|
|
2
|
+
export type BrowserPermissionType = 'location' | 'backgroundLocation' | 'notification' | 'orientation' | 'storage' | 'camera' | 'wakeLock' | 'fileSystem';
|
|
3
3
|
export type FileSystemAccessHandle = FileSystemHandle & {
|
|
4
4
|
queryPermission?: (descriptor?: {
|
|
5
5
|
mode?: 'read' | 'readwrite';
|
|
@@ -13,6 +13,7 @@ export type { BrowserPermissionState, BrowserPermissionType } from './device/typ
|
|
|
13
13
|
export { CameraPermission } from './device/camera.ts';
|
|
14
14
|
export { FileSystemPermission } from './device/file-system.ts';
|
|
15
15
|
export { GeolocationPermission } from './device/geolocation.ts';
|
|
16
|
+
export type { NativeDeliveryOptions } from './device/geolocation.ts';
|
|
16
17
|
export { BrowserNotificationPermission } from './device/notification.ts';
|
|
17
18
|
export type { PushNotificationData } from './device/notification.ts';
|
|
18
19
|
export { OrientationPermission } from './device/orientation.ts';
|
|
@@ -27,6 +28,7 @@ export declare const useDeviceStore: import("pinia").SetupStoreDefinition<"devic
|
|
|
27
28
|
storage: BrowserPermissionState;
|
|
28
29
|
orientation: BrowserPermissionState;
|
|
29
30
|
location: BrowserPermissionState;
|
|
31
|
+
backgroundLocation: BrowserPermissionState;
|
|
30
32
|
camera: BrowserPermissionState;
|
|
31
33
|
wakeLock: BrowserPermissionState;
|
|
32
34
|
fileSystem: BrowserPermissionState;
|
|
@@ -13,7 +13,6 @@ import * as mapgl from 'maplibre-gl';
|
|
|
13
13
|
import type Atlas from '../workers/atlas.ts';
|
|
14
14
|
import type { Feature } from '../types.ts';
|
|
15
15
|
import type { LngLat, Point, MapGeoJSONFeature } from 'maplibre-gl';
|
|
16
|
-
import type { Position } from '@capacitor/geolocation';
|
|
17
16
|
export type TAKNotification = {
|
|
18
17
|
type: string;
|
|
19
18
|
name: string;
|
|
@@ -37,7 +36,6 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
37
36
|
};
|
|
38
37
|
_overlayReconcile?: Promise<void>;
|
|
39
38
|
_overlayReconcileQueued?: boolean;
|
|
40
|
-
_lastLocationHttpSubmit?: number;
|
|
41
39
|
channel: BroadcastChannel;
|
|
42
40
|
toImport: Feature[];
|
|
43
41
|
locked: Array<string>;
|
|
@@ -159,7 +157,6 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
159
157
|
*/
|
|
160
158
|
resumeFromBackground: () => Promise<void>;
|
|
161
159
|
init: (container: HTMLElement) => Promise<void>;
|
|
162
|
-
submitLocationHttp: (position: Position) => Promise<void>;
|
|
163
160
|
initOverlays: () => Promise<void>;
|
|
164
161
|
/**
|
|
165
162
|
* Reconcile the loaded map overlays against the local overlay
|