@tak-ps/cloudtak 13.11.3 → 13.11.4

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,4 +1,16 @@
1
1
  export declare function isNativePlatform(): boolean;
2
2
  export declare function supportsServiceWorker(): boolean;
3
+ /**
4
+ * Subscribe to foreground/background transitions in a way that is reliable on
5
+ * native platforms. On native we use Capacitor's `App.appStateChange`, which
6
+ * fires accurately when the app is suspended/resumed by the OS — unlike the web
7
+ * `document.hidden`/`visibilitychange` API, which is unreliable inside an iOS
8
+ * WebView. On web we fall back to the Page Visibility API.
9
+ *
10
+ * The handler is invoked with `true` when the app is backgrounded and `false`
11
+ * when it returns to the foreground. Returns a function that removes the
12
+ * listener.
13
+ */
14
+ export declare function addBackgroundStateListener(handler: (isBackgrounded: boolean) => void): Promise<() => void>;
3
15
  export declare function openExternalUrl(url: string | URL): Promise<void>;
4
16
  export declare function openSecondaryView(url: string | URL): Promise<void>;
@@ -3,12 +3,9 @@ import type { Contact as TAKContact } from '../types.ts';
3
3
  import BaseInterface from './interface.ts';
4
4
  import type { BaseInterface_ListOptions, BaseInterface_FromOptions } from './interface.ts';
5
5
  export type Contact_ListOptions = BaseInterface_ListOptions & {
6
- token?: string;
7
6
  filter?: string;
8
7
  };
9
- export type Contact_FromOptions = BaseInterface_FromOptions & {
10
- token?: string;
11
- };
8
+ export type Contact_FromOptions = BaseInterface_FromOptions;
12
9
  export default class ContactManager extends BaseInterface {
13
10
  static readonly listCacheKey = "contact";
14
11
  static count(): Promise<number>;
@@ -19,5 +16,5 @@ export default class ContactManager extends BaseInterface {
19
16
  static liveFrom(uid: string): Observable<TAKContact | undefined>;
20
17
  static getByCallsign(callsign: string): Promise<TAKContact | undefined>;
21
18
  static put(contact: TAKContact): Promise<void>;
22
- static sync(token?: string): Promise<void>;
19
+ static sync(): Promise<void>;
23
20
  }
@@ -2,8 +2,8 @@ import { type Observable } from 'dexie';
2
2
  import type { Server, Server_Update } from '../types.ts';
3
3
  export default class ServerManager {
4
4
  static live(): Observable<Server | undefined>;
5
- static get(token?: string): Promise<Server>;
6
- static sync(token?: string): Promise<Server>;
7
- static update(server: Server_Update, token?: string): Promise<Server>;
8
- static create(server: Server_Update, token?: string): Promise<Server>;
5
+ static get(): Promise<Server>;
6
+ static sync(): Promise<Server>;
7
+ static update(server: Server_Update): Promise<Server>;
8
+ static create(server: Server_Update): Promise<Server>;
9
9
  }
@@ -20,6 +20,7 @@ export default class SubscriptionContents {
20
20
  * Delete/detach a content entry from the mission and remove it from the local database
21
21
  */
22
22
  delete(hash: string): Promise<void>;
23
+ download(name: string, hash: string): Promise<void>;
23
24
  list(opts?: {
24
25
  refresh?: boolean;
25
26
  contents?: Mission['contents'];
@@ -6,8 +6,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
6
6
  default: () => never[];
7
7
  };
8
8
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- done: (...args: any[]) => void;
10
9
  close: (...args: any[]) => void;
10
+ done: (...args: any[]) => void;
11
11
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
12
  features: {
13
13
  type: () => InputFeature[];
@@ -15,8 +15,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
15
15
  default: () => never[];
16
16
  };
17
17
  }>> & Readonly<{
18
- onDone?: ((...args: any[]) => any) | undefined;
19
18
  onClose?: ((...args: any[]) => any) | undefined;
19
+ onDone?: ((...args: any[]) => any) | undefined;
20
20
  }>, {
21
21
  features: InputFeature[];
22
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ mission: {
3
+ name: string;
4
+ guid: string;
5
+ token: string;
6
+ authorUid: string;
7
+ tool: string;
8
+ type: string;
9
+ };
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ close: (...args: any[]) => void;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ onClose?: ((...args: any[]) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -4,11 +4,11 @@ type __VLS_Props = {
4
4
  basemaps?: number[];
5
5
  };
6
6
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- done: (...args: any[]) => void;
8
7
  close: (...args: any[]) => void;
8
+ done: (...args: any[]) => void;
9
9
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- onDone?: ((...args: any[]) => any) | undefined;
11
10
  onClose?: ((...args: any[]) => any) | undefined;
11
+ onDone?: ((...args: any[]) => any) | undefined;
12
12
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  declare const _default: typeof __VLS_export;
14
14
  export default _default;
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
18
18
  default: () => never[];
19
19
  };
20
20
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
- done: (...args: any[]) => void;
22
21
  close: (...args: any[]) => void;
22
+ done: (...args: any[]) => void;
23
23
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
24
  action: {
25
25
  type: StringConstructor;
@@ -38,15 +38,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
38
38
  default: () => never[];
39
39
  };
40
40
  }>> & Readonly<{
41
- onDone?: ((...args: any[]) => any) | undefined;
42
41
  onClose?: ((...args: any[]) => any) | undefined;
42
+ onDone?: ((...args: any[]) => any) | undefined;
43
43
  }>, {
44
- feats: Feature[];
45
44
  assets: {
46
45
  type: "profile";
47
46
  id: string;
48
47
  name: string;
49
48
  }[];
49
+ feats: Feature[];
50
50
  action: string;
51
51
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
52
52
  declare const _default: typeof __VLS_export;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
22
22
  default: () => never[];
23
23
  };
24
24
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
- done: (...args: any[]) => void;
26
25
  close: (...args: any[]) => void;
26
+ done: (...args: any[]) => void;
27
27
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
28
28
  name: {
29
29
  type: StringConstructor;
@@ -46,16 +46,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
46
46
  default: () => never[];
47
47
  };
48
48
  }>> & Readonly<{
49
- onDone?: ((...args: any[]) => any) | undefined;
50
49
  onClose?: ((...args: any[]) => any) | undefined;
50
+ onDone?: ((...args: any[]) => any) | undefined;
51
51
  }>, {
52
52
  name: string;
53
- feats: Feature[];
54
53
  assets: {
55
54
  type: "profile";
56
55
  id: number | string;
57
56
  name: string;
58
57
  }[];
58
+ feats: Feature[];
59
59
  upload: boolean;
60
60
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
61
61
  declare const _default: typeof __VLS_export;
@@ -22,15 +22,15 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {
22
22
  upload: typeof upload;
23
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
24
24
  error: (response: Error) => any;
25
- done: (response: unknown) => any;
26
25
  cancel: () => any;
26
+ done: (response: unknown) => any;
27
27
  staged: (response: {
28
28
  name: string;
29
29
  }) => any;
30
30
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
31
31
  onError?: ((response: Error) => any) | undefined;
32
- onDone?: ((response: unknown) => any) | undefined;
33
32
  onCancel?: (() => any) | undefined;
33
+ onDone?: ((response: unknown) => any) | undefined;
34
34
  onStaged?: ((response: {
35
35
  name: string;
36
36
  }) => any) | undefined;
@@ -38,8 +38,8 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {
38
38
  method: string;
39
39
  headers: Record<string, string>;
40
40
  label: string;
41
- format: "formdata" | "raw";
42
41
  cancel: boolean;
42
+ format: "formdata" | "raw";
43
43
  autoupload: boolean;
44
44
  mimetype: string;
45
45
  sizeWarning: boolean;
@@ -17,6 +17,8 @@ export declare function std(url: string | URL, opts?: {
17
17
  headers?: Record<string, string>;
18
18
  body?: unknown;
19
19
  method?: string;
20
+ signal?: AbortSignal;
21
+ timeout?: number;
20
22
  }): Promise<unknown>;
21
23
  export declare function downloadBlob(blob: Blob, response: Response, fallbackName: string): void;
22
24
  export declare function downloadUrl(url: string | URL, opts?: {
@@ -6,8 +6,6 @@ export declare class GeolocationPermission {
6
6
  private watchId;
7
7
  private backgroundWatchId;
8
8
  private locationCallback;
9
- private visibilityHandler;
10
- private isInBackground;
11
9
  private static normalizeNativeLocationPermission;
12
10
  static supportsLocationRequests(): boolean;
13
11
  static checkNativeLocationPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
@@ -20,14 +18,8 @@ export declare class GeolocationPermission {
20
18
  private static backgroundLocationToPosition;
21
19
  stopWatch(): Promise<void>;
22
20
  startWatch(onLocation: (position: Position) => void): Promise<void>;
23
- /**
24
- * Briefly starts and removes a background watcher solely to trigger
25
- * iOS's "Always Allow" location permission upgrade dialog in the foreground.
26
- */
27
- private requestBackgroundPermission;
28
21
  private startForegroundWatch;
29
22
  private startBackgroundWatch;
30
- private setupVisibilityListener;
31
23
  refreshStatus(): Promise<void>;
32
24
  request(onGranted?: () => void): Promise<void>;
33
25
  initializeSubscription(onGranted?: () => void): Promise<void>;
@@ -29,6 +29,7 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
29
29
  _boundOnOffline?: () => void;
30
30
  _boundOnDeviceOrientation?: (event: DeviceOrientationEvent) => void;
31
31
  _boundOnVisibilityChange?: () => Promise<void>;
32
+ _removeBackgroundStateListener?: () => void;
32
33
  db: DatabaseType;
33
34
  channel: BroadcastChannel;
34
35
  toImport: Feature[];
@@ -46,6 +47,7 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
46
47
  defaultPointType: string;
47
48
  manualLocationMode: boolean;
48
49
  isMobileDetected: boolean;
50
+ isBackgrounded: boolean;
49
51
  tokenExpiry: number | null;
50
52
  lastUpdateCOTErrorSignature: string | null;
51
53
  toastOffset: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/cloudtak",
3
3
  "type": "module",
4
- "version": "13.11.3",
4
+ "version": "13.11.4",
5
5
  "types": "dist/types/plugin.d.ts",
6
6
  "files": [
7
7
  "dist/types"
@@ -32,11 +32,14 @@
32
32
  "@capacitor-community/background-geolocation": "^1.2.26",
33
33
  "@capacitor-community/keep-awake": "^8.0.1",
34
34
  "@capacitor-firebase/messaging": "^8.2.0",
35
+ "@capacitor/app": "^8.1.0",
35
36
  "@capacitor/browser": "^8.0.1",
36
37
  "@capacitor/camera": "^8.2.0",
37
38
  "@capacitor/clipboard": "^8.0.1",
38
39
  "@capacitor/core": "^8.3.1",
39
40
  "@capacitor/geolocation": "^8.1.0",
41
+ "@capacitor/haptics": "^8.0.2",
42
+ "@capacitor/keyboard": "^8.0.3",
40
43
  "@capacitor/preferences": "^8.0.1",
41
44
  "@capacitor/status-bar": "^8.0.2",
42
45
  "@mapbox/tile-cover": "^3.0.2",