@tak-ps/cloudtak 13.84.2 → 13.85.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/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/Icons.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/InlineGroupSelect.vue.d.ts +1 -1
- package/dist/types/src/components/util/Upload.vue.d.ts +1 -1
- package/dist/types/src/components/util/VideoPlayer.vue.d.ts +2 -2
- package/dist/types/src/database.d.ts +26 -5
- package/dist/types/src/stores/app.d.ts +0 -1
- package/dist/types/src/stores/map.d.ts +15 -11
- package/dist/types/src/utils/capacitor.d.ts +9 -0
- package/dist/types/src/utils/worker-boot.d.ts +11 -0
- package/dist/types/src/workers/atlas-connection.d.ts +0 -8
- package/dist/types/src/workers/atlas-database.d.ts +5 -0
- package/dist/types/src/workers/atlas-profile.d.ts +2 -0
- package/dist/types/src/workers/atlas.d.ts +8 -4
- package/package.json +1 -1
|
@@ -33,8 +33,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
33
33
|
default: number;
|
|
34
34
|
};
|
|
35
35
|
}>> & Readonly<{}>, {
|
|
36
|
-
stroke: number;
|
|
37
36
|
size: number;
|
|
37
|
+
stroke: number;
|
|
38
38
|
title: string;
|
|
39
39
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
40
|
declare const _default: typeof __VLS_export;
|
|
@@ -101,9 +101,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
101
101
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
102
102
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
103
103
|
}>, {
|
|
104
|
-
stroke: number;
|
|
105
104
|
mode: string;
|
|
106
105
|
size: number;
|
|
106
|
+
stroke: number;
|
|
107
107
|
label: string;
|
|
108
108
|
rows: number;
|
|
109
109
|
hover: boolean;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
25
25
|
default: number;
|
|
26
26
|
};
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
|
-
labels: boolean;
|
|
29
28
|
iconset: string;
|
|
29
|
+
labels: boolean;
|
|
30
30
|
refreshKey: number;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
@@ -36,8 +36,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
36
36
|
onEdit?: (() => any) | undefined;
|
|
37
37
|
onSave?: ((value: string[]) => any) | undefined;
|
|
38
38
|
}>, {
|
|
39
|
-
direction: string;
|
|
40
39
|
active: boolean;
|
|
40
|
+
direction: string;
|
|
41
41
|
label: string;
|
|
42
42
|
gap: string;
|
|
43
43
|
background: string;
|
|
@@ -34,8 +34,8 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {
|
|
|
34
34
|
name: string;
|
|
35
35
|
}) => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
|
-
method: string;
|
|
38
37
|
cancel: boolean;
|
|
38
|
+
method: string;
|
|
39
39
|
headers: Record<string, string>;
|
|
40
40
|
label: string;
|
|
41
41
|
format: "formdata" | "raw";
|
|
@@ -12,12 +12,12 @@ type __VLS_Props = {
|
|
|
12
12
|
lease?: number;
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
-
metadata: (metadata: VideoPlayerMetadata) => any;
|
|
16
15
|
error: (error: Error) => any;
|
|
16
|
+
metadata: (metadata: VideoPlayerMetadata) => any;
|
|
17
17
|
protocol: (protocol: PlaybackProtocol) => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
-
onMetadata?: ((metadata: VideoPlayerMetadata) => any) | undefined;
|
|
20
19
|
onError?: ((error: Error) => any) | undefined;
|
|
20
|
+
onMetadata?: ((metadata: VideoPlayerMetadata) => any) | undefined;
|
|
21
21
|
onProtocol?: ((protocol: PlaybackProtocol) => any) | undefined;
|
|
22
22
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -242,12 +242,33 @@ export type DatabaseType = Dexie & {
|
|
|
242
242
|
};
|
|
243
243
|
export declare const db: DatabaseType;
|
|
244
244
|
export declare function ensureDatabase(): Promise<void>;
|
|
245
|
+
/** Thrown for any IndexedDB access while suspendDatabase() is in effect */
|
|
246
|
+
export declare class DatabaseSuspendedError extends Error {
|
|
247
|
+
constructor(message?: string);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* The storage process did not answer a bounded probe. Every read and write
|
|
251
|
+
* would hang forever; only a fresh WebView (or app process) recovers.
|
|
252
|
+
*/
|
|
253
|
+
export declare class DatabaseUnavailableError extends Error {
|
|
254
|
+
constructor(message: string);
|
|
255
|
+
}
|
|
256
|
+
export declare function isDatabaseSuspended(): boolean;
|
|
245
257
|
/**
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* probe forces an explicit close before reopening.
|
|
258
|
+
* Reject every IndexedDB transaction synchronously, before an
|
|
259
|
+
* IDBTransaction is opened, so nothing is ever in flight while the app is
|
|
260
|
+
* backgrounded. A closed database is not reopened until resumeDatabase().
|
|
250
261
|
*/
|
|
251
|
-
export declare function
|
|
262
|
+
export declare function suspendDatabase(): void;
|
|
263
|
+
export declare function resumeDatabase(): void;
|
|
264
|
+
export declare function deferFeaturePersist(id: string): void;
|
|
265
|
+
export declare function takeDeferredFeatureIds(): string[];
|
|
252
266
|
export declare function isTransientDbError(err: unknown): boolean;
|
|
253
267
|
export declare function withDbRetry<T>(fn: () => Promise<T>, attempts?: number): Promise<T>;
|
|
268
|
+
/**
|
|
269
|
+
* Bounded round trip to the storage process. A wedged IndexedDB (see
|
|
270
|
+
* suspendDatabase()) never answers, so callers on a boot path use this to
|
|
271
|
+
* fail in seconds with a DatabaseUnavailableError instead of hanging until
|
|
272
|
+
* their own, much longer, stage timeout.
|
|
273
|
+
*/
|
|
274
|
+
export declare function probeDatabase(timeoutMs: number): Promise<void>;
|
|
@@ -12,7 +12,6 @@ export declare const useAppStore: import("pinia").StoreDefinition<"cloudtak-app"
|
|
|
12
12
|
loadingStage: string;
|
|
13
13
|
}, {}, {
|
|
14
14
|
setServerUrl(serverUrl: string): Promise<void>;
|
|
15
|
-
mirrorServerUrl(serverUrl: string): Promise<void>;
|
|
16
15
|
persistSession(opts: {
|
|
17
16
|
token: string;
|
|
18
17
|
username: string;
|
|
@@ -28,9 +28,8 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
28
28
|
_menu?: unknown;
|
|
29
29
|
_bottomBar?: unknown;
|
|
30
30
|
_removeOrientationListener?: () => Promise<void>;
|
|
31
|
-
_resumeRecovery?: Promise<void>;
|
|
32
31
|
_cotResync?: Promise<void>;
|
|
33
|
-
|
|
32
|
+
_destroying?: Promise<void>;
|
|
34
33
|
_removePushTokenListener?: () => void;
|
|
35
34
|
_overlaySubscription?: {
|
|
36
35
|
unsubscribe: () => void;
|
|
@@ -67,13 +66,13 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
67
66
|
coordFormat: string;
|
|
68
67
|
defaultPointType: string;
|
|
69
68
|
manualLocationMode: boolean;
|
|
70
|
-
isBackgrounded: boolean;
|
|
71
69
|
lastUpdateCOTErrorSignature: string | null;
|
|
72
70
|
toastOffset: {
|
|
73
71
|
x: number;
|
|
74
72
|
y: number;
|
|
75
73
|
};
|
|
76
74
|
timer: ReturnType<typeof setInterval> | null;
|
|
75
|
+
backgrounded: boolean;
|
|
77
76
|
_rawWorker?: Worker;
|
|
78
77
|
_workerReady?: Promise<void>;
|
|
79
78
|
_worker?: Comlink.Remote<Atlas>;
|
|
@@ -127,7 +126,17 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
127
126
|
reverseNavigation: () => void;
|
|
128
127
|
openSelfFeature: () => Promise<void>;
|
|
129
128
|
startWorker: () => void;
|
|
129
|
+
startRefreshTimer: () => void;
|
|
130
|
+
/**
|
|
131
|
+
* Native app moved to the background: stop every IndexedDB touch on
|
|
132
|
+
* both threads. iOS kills WKWebView's storage process under a
|
|
133
|
+
* backgrounded app and a request caught in flight wedges storage for
|
|
134
|
+
* the life of the WebView - see suspendDatabase().
|
|
135
|
+
*/
|
|
136
|
+
suspend: () => Promise<void>;
|
|
137
|
+
resume: () => Promise<void>;
|
|
130
138
|
destroy: () => Promise<void>;
|
|
139
|
+
_destroy: () => Promise<void>;
|
|
131
140
|
makeActiveMission: (mission?: Subscription) => Promise<void>;
|
|
132
141
|
terrainOverlay: () => Overlay | undefined;
|
|
133
142
|
toggleTerrain: () => Promise<void>;
|
|
@@ -145,9 +154,9 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
145
154
|
updateCOT: () => Promise<void>;
|
|
146
155
|
/**
|
|
147
156
|
* Rebuild the CoT GeoJSON source wholesale from the worker's full
|
|
148
|
-
* feature state.
|
|
149
|
-
*
|
|
150
|
-
*
|
|
157
|
+
* feature state. Recovery whenever an incremental diff was consumed
|
|
158
|
+
* from the worker but failed to apply - without this those features
|
|
159
|
+
* would never render again.
|
|
151
160
|
*/
|
|
152
161
|
resyncCOT: () => Promise<void>;
|
|
153
162
|
/**
|
|
@@ -162,11 +171,6 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
162
171
|
loadMission: (guid: string, opts?: {
|
|
163
172
|
reload: boolean;
|
|
164
173
|
}) => Promise<Subscription | null>;
|
|
165
|
-
/**
|
|
166
|
-
* Recover IndexedDB connections and the TAK WebSocket after the app
|
|
167
|
-
* returns to the foreground.
|
|
168
|
-
*/
|
|
169
|
-
resumeFromBackground: () => Promise<void>;
|
|
170
174
|
init: (container: HTMLElement) => Promise<void>;
|
|
171
175
|
initOverlays: () => Promise<void>;
|
|
172
176
|
/**
|
|
@@ -21,3 +21,12 @@ export declare function addBackButtonListener(handler: () => void): Promise<() =
|
|
|
21
21
|
export declare function minimizeApp(): Promise<void>;
|
|
22
22
|
export declare function openExternalUrl(url: string | URL): Promise<void>;
|
|
23
23
|
export declare function openSecondaryView(url: string | URL): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Subscribe to native background (pause) and foreground (resume)
|
|
26
|
+
* transitions. Unlike appStateChange these do not fire for transient
|
|
27
|
+
* inactivity such as Control Center. Returns a no-op remover on web.
|
|
28
|
+
*/
|
|
29
|
+
export declare function addAppLifecycleListeners(handlers: {
|
|
30
|
+
pause?: () => void;
|
|
31
|
+
resume?: () => void;
|
|
32
|
+
}): Promise<() => void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session handed to a dedicated worker through `Worker.name`, readable
|
|
3
|
+
* synchronously as `self.name` during module evaluation. The Atlas worker
|
|
4
|
+
* used to resolve its server URL from IndexedDB at import time, which on
|
|
5
|
+
* native could hang the worker before it ever signalled ready.
|
|
6
|
+
*/
|
|
7
|
+
export type WorkerBootConfig = {
|
|
8
|
+
serverUrl?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function serializeWorkerBootConfig(config: WorkerBootConfig): string;
|
|
11
|
+
export declare function parseWorkerBootConfig(name: string | null | undefined): WorkerBootConfig | undefined;
|
|
@@ -10,14 +10,6 @@ export default class AtlasConnection {
|
|
|
10
10
|
version: string;
|
|
11
11
|
private reconnectTimer;
|
|
12
12
|
constructor(atlas: Atlas);
|
|
13
|
-
reconnect(connection: string): void;
|
|
14
|
-
/**
|
|
15
|
-
* Called when the app returns to the foreground. iOS suspension can kill
|
|
16
|
-
* the TCP connection with no FIN reaching the client (NAT/LB idle
|
|
17
|
-
* timeout), so no close event ever fires and `isOpen` cannot be trusted -
|
|
18
|
-
* always rebuild the socket unless the user has logged out.
|
|
19
|
-
*/
|
|
20
|
-
resume(connection: string): void;
|
|
21
13
|
connect(connection: string): void;
|
|
22
14
|
private scheduleReconnect;
|
|
23
15
|
private isAuthRejected;
|
|
@@ -106,6 +106,11 @@ export default class AtlasDatabase {
|
|
|
106
106
|
* still in flight is never removed.
|
|
107
107
|
*/
|
|
108
108
|
loadArchive(): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Persist features whose IndexedDB write was skipped while the database
|
|
111
|
+
* was suspended (app backgrounded on native). Returns the number written.
|
|
112
|
+
*/
|
|
113
|
+
flushDeferred(): Promise<number>;
|
|
109
114
|
/**
|
|
110
115
|
* Remove a given CoT from the store
|
|
111
116
|
*
|
|
@@ -33,6 +33,8 @@ export default class AtlasProfile {
|
|
|
33
33
|
hasNoConfiguration(): boolean;
|
|
34
34
|
hasNoChannels(): Promise<boolean>;
|
|
35
35
|
destroy(): void;
|
|
36
|
+
/** Stop the periodic self CoT; setupTimer() restarts it */
|
|
37
|
+
pauseTimer(): void;
|
|
36
38
|
setupTimer(): void;
|
|
37
39
|
loadServer(): Promise<Server>;
|
|
38
40
|
load(): Promise<void>;
|
|
@@ -10,6 +10,7 @@ export default class Atlas {
|
|
|
10
10
|
token: string;
|
|
11
11
|
username: string;
|
|
12
12
|
initialized: boolean;
|
|
13
|
+
suspended: boolean;
|
|
13
14
|
db: AtlasDatabase & Comlink.ProxyMarked;
|
|
14
15
|
conn: AtlasConnection & Comlink.ProxyMarked;
|
|
15
16
|
profile: AtlasProfile & Comlink.ProxyMarked;
|
|
@@ -17,11 +18,14 @@ export default class Atlas {
|
|
|
17
18
|
tiles: AtlasTiles & Comlink.ProxyMarked;
|
|
18
19
|
constructor();
|
|
19
20
|
postMessage(msg: WorkerMessage): Promise<void>;
|
|
21
|
+
init(authToken: string): Promise<void>;
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
+
* Native background: keep the WebSocket, stop every IndexedDB touch.
|
|
24
|
+
* iOS kills WKWebView's storage process under a backgrounded app and a
|
|
25
|
+
* request caught in flight wedges storage for the life of the WebView.
|
|
26
|
+
* Features that arrive meanwhile stay in memory and persist on resume.
|
|
23
27
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
suspend(): void;
|
|
29
|
+
resume(): Promise<void>;
|
|
26
30
|
destroy(): void;
|
|
27
31
|
}
|