@tak-ps/cloudtak 13.87.0 → 13.87.2
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/dist/types/src/base/cot.d.ts +2 -0
- package/dist/types/src/components/CloudTAK/Property/PropertyOrigin.vue.d.ts +8 -0
- package/dist/types/src/stores/device/network.d.ts +2 -0
- package/dist/types/src/stores/map.d.ts +6 -0
- package/dist/types/src/utils/events.d.ts +9 -0
- package/dist/types/src/workers/atlas-connection.d.ts +19 -0
- package/dist/types/src/workers/atlas-database.d.ts +2 -0
- package/dist/types/src/workers/atlas-profile.d.ts +1 -0
- package/dist/types/src/workers/atlas-sync.d.ts +13 -0
- package/package.json +1 -1
|
@@ -68,6 +68,8 @@ export default class COT {
|
|
|
68
68
|
*/
|
|
69
69
|
update(update: COTUpdate, opts?: {
|
|
70
70
|
skipSave?: boolean;
|
|
71
|
+
/** Called once the in-memory COT is current, before it is persisted */
|
|
72
|
+
onApplied?: (visuallyChanged: boolean) => void;
|
|
71
73
|
}): Promise<boolean>;
|
|
72
74
|
/**
|
|
73
75
|
* Attempt to save the CoT to the database if necessary
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type Subscription from '../../../base/subscription.ts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The Mission Subscription the CoT originates from */
|
|
4
|
+
subscription: Subscription;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -13,6 +13,7 @@ export declare class NetworkStatus {
|
|
|
13
13
|
private ultraConstrained;
|
|
14
14
|
private reachable;
|
|
15
15
|
private listener;
|
|
16
|
+
private channel;
|
|
16
17
|
get isOnline(): boolean;
|
|
17
18
|
get type(): ConnectionType;
|
|
18
19
|
/**
|
|
@@ -38,5 +39,6 @@ export declare class NetworkStatus {
|
|
|
38
39
|
get isInternetReachable(): boolean | null;
|
|
39
40
|
init(): Promise<void>;
|
|
40
41
|
destroy(): Promise<void>;
|
|
42
|
+
private broadcast;
|
|
41
43
|
private update;
|
|
42
44
|
}
|
|
@@ -7,6 +7,7 @@ import COT from '../base/cot.ts';
|
|
|
7
7
|
import RoutingControl from '../lib/routing/main.ts';
|
|
8
8
|
import type { NavigationState, NavigationDirection, NavigationMode } from '../lib/routing/main.ts';
|
|
9
9
|
import { LocationState } from '../utils/events.ts';
|
|
10
|
+
import type { SyncTriggerReason } from '../utils/events.ts';
|
|
10
11
|
import Overlay from '../base/overlay-class.ts';
|
|
11
12
|
import Subscription from '../base/subscription.ts';
|
|
12
13
|
import * as mapgl from 'maplibre-gl';
|
|
@@ -87,6 +88,11 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
87
88
|
isMapLoadedFully: boolean;
|
|
88
89
|
loadingStage: string;
|
|
89
90
|
isOpen: boolean;
|
|
91
|
+
isOnline: boolean;
|
|
92
|
+
syncTrigger: {
|
|
93
|
+
reason: SyncTriggerReason;
|
|
94
|
+
at: number;
|
|
95
|
+
} | null;
|
|
90
96
|
userOrientationMode: boolean;
|
|
91
97
|
pitch: number;
|
|
92
98
|
bearing: number;
|
|
@@ -25,6 +25,8 @@ export declare enum WorkerMessageType {
|
|
|
25
25
|
Profile_Update = "cloudtak:profile:update",
|
|
26
26
|
Sync_Start = "cloudtak:sync:start",
|
|
27
27
|
Sync_Complete = "cloudtak:sync:complete",
|
|
28
|
+
Sync_Trigger = "cloudtak:sync:trigger",
|
|
29
|
+
Network_Change = "cloudtak:network:change",
|
|
28
30
|
Iconset_Change = "cloudtak:iconset:change",
|
|
29
31
|
Tiles_Downloaded = "cloudtak:tiles:downloaded",
|
|
30
32
|
Tiles_Removed = "cloudtak:tiles:removed",
|
|
@@ -32,6 +34,13 @@ export declare enum WorkerMessageType {
|
|
|
32
34
|
VideoWall_Pong = "cloudtak:videowall:pong",
|
|
33
35
|
VideoWall_Refresh = "cloudtak:videowall:refresh"
|
|
34
36
|
}
|
|
37
|
+
export type SyncTriggerReason = 'network' | 'connection';
|
|
38
|
+
export type SyncTriggerBody = {
|
|
39
|
+
reason: SyncTriggerReason;
|
|
40
|
+
};
|
|
41
|
+
export type NetworkChangeBody = {
|
|
42
|
+
online: boolean;
|
|
43
|
+
};
|
|
35
44
|
export type WorkerMessage = {
|
|
36
45
|
type: WorkerMessageType;
|
|
37
46
|
body?: any;
|
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
import type Atlas from './atlas.ts';
|
|
2
|
+
import type { SyncTriggerReason } from '../utils/events.ts';
|
|
2
3
|
export default class AtlasConnection {
|
|
3
4
|
atlas: Atlas;
|
|
4
5
|
isDestroyed: boolean;
|
|
5
6
|
isOpen: boolean;
|
|
6
7
|
hasConnected: boolean;
|
|
8
|
+
isOnline: boolean;
|
|
7
9
|
authFailure: boolean;
|
|
8
10
|
ws: WebSocket | undefined;
|
|
9
11
|
reconnectAttempts: number;
|
|
10
12
|
version: string;
|
|
11
13
|
private reconnectTimer;
|
|
14
|
+
private connection;
|
|
15
|
+
private syncTimer;
|
|
16
|
+
private syncReason;
|
|
17
|
+
private syncListeners;
|
|
12
18
|
constructor(atlas: Atlas);
|
|
19
|
+
/**
|
|
20
|
+
* Apply a device network status change. Coming back online skips the
|
|
21
|
+
* remaining reconnect backoff and fires a sync trigger.
|
|
22
|
+
*/
|
|
23
|
+
setOnline(online: boolean): void;
|
|
24
|
+
/**
|
|
25
|
+
* Subscribe within the worker to sync triggers. The BroadcastChannel does
|
|
26
|
+
* not deliver a message to the context that posted it, so worker-side
|
|
27
|
+
* consumers register here instead.
|
|
28
|
+
*/
|
|
29
|
+
onSync(listener: (reason: SyncTriggerReason) => void): () => void;
|
|
30
|
+
private triggerSync;
|
|
31
|
+
private clearSyncTimer;
|
|
13
32
|
connect(connection: string): void;
|
|
14
33
|
private scheduleReconnect;
|
|
15
34
|
private isAuthRejected;
|
|
@@ -45,6 +45,8 @@ export default class AtlasDatabase {
|
|
|
45
45
|
* Generate a GeoJSONDiff on existing COT Features
|
|
46
46
|
*/
|
|
47
47
|
diff(): Promise<GeoJSONSourceDiff>;
|
|
48
|
+
/** Current display_stale setting from the in-memory profile cache */
|
|
49
|
+
displayStale(): string;
|
|
48
50
|
/**
|
|
49
51
|
* Has a CoT's stale time exceeded the user's configured display window
|
|
50
52
|
*/
|
|
@@ -27,6 +27,7 @@ export default class AtlasProfile {
|
|
|
27
27
|
profile_loc_freq?: ProfileConfig<'tak_loc_freq'>;
|
|
28
28
|
profile_created?: ProfileConfig<'created'>;
|
|
29
29
|
profile_updated?: ProfileConfig<'updated'>;
|
|
30
|
+
display_stale?: ProfileConfig<'display_stale'>;
|
|
30
31
|
constructor(atlas: Atlas);
|
|
31
32
|
init(): Promise<string>;
|
|
32
33
|
creator(): Promise<FeaturePropertyCreator>;
|
|
@@ -31,6 +31,8 @@ export default class AtlasSync {
|
|
|
31
31
|
lastSync: number | null;
|
|
32
32
|
lastErrors: string[];
|
|
33
33
|
private current;
|
|
34
|
+
private missions;
|
|
35
|
+
private offSync;
|
|
34
36
|
private queue;
|
|
35
37
|
private timer;
|
|
36
38
|
private flushing;
|
|
@@ -40,6 +42,16 @@ export default class AtlasSync {
|
|
|
40
42
|
* kicking off the initial full synchronization with the TAK Server
|
|
41
43
|
*/
|
|
42
44
|
start(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Connectivity restored - refresh every subscribed mission since change
|
|
47
|
+
* events that fired while offline or disconnected were not replayed
|
|
48
|
+
*/
|
|
49
|
+
private onTrigger;
|
|
50
|
+
/**
|
|
51
|
+
* Refresh every subscribed mission (Data Sync) from the server.
|
|
52
|
+
* Concurrent calls coalesce onto the in-flight sync.
|
|
53
|
+
*/
|
|
54
|
+
syncMissions(): Promise<void>;
|
|
43
55
|
/**
|
|
44
56
|
* Perform a full synchronization of all data types. Concurrent calls
|
|
45
57
|
* coalesce onto the in-flight sync.
|
|
@@ -52,6 +64,7 @@ export default class AtlasSync {
|
|
|
52
64
|
*/
|
|
53
65
|
event(event: SyncEvent): Promise<void>;
|
|
54
66
|
destroy(): void;
|
|
67
|
+
private runMissionSync;
|
|
55
68
|
private runFullSync;
|
|
56
69
|
/**
|
|
57
70
|
* Hydrate the Dexie icon cache (iconset metadata, icon blobs and built-in
|