@tak-ps/cloudtak 13.2.0 → 13.4.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/base/capacitor.d.ts +0 -9
- package/dist/types/src/base/events.d.ts +1 -0
- package/dist/types/src/base/icon.d.ts +0 -5
- package/dist/types/src/base/iconset.d.ts +27 -5
- package/dist/types/src/base/interface.d.ts +2 -2
- package/dist/types/src/base/kv.d.ts +17 -0
- package/dist/types/src/base/overlay-class.d.ts +101 -0
- package/dist/types/src/base/overlay.d.ts +67 -97
- package/dist/types/src/components/CloudTAK/Menu/Basemaps/TypeSelectorBase.vue.d.ts +2 -2
- package/dist/types/src/components/CloudTAK/Menu/Basemaps/TypeSelectorFeatureServer.vue.d.ts +2 -2
- package/dist/types/src/components/CloudTAK/Menu/Basemaps/TypeSelectorImageServer.vue.d.ts +2 -2
- package/dist/types/src/components/CloudTAK/Menu/Basemaps/TypeSelectorMapServer.vue.d.ts +2 -2
- package/dist/types/src/components/CloudTAK/Menu/Basemaps/TypeSelectorZxy.vue.d.ts +2 -2
- package/dist/types/src/components/CloudTAK/Menu/Basemaps/TypeSelectorZxy_Upload.vue.d.ts +0 -1
- package/dist/types/src/components/CloudTAK/Menu/MenuFilesRow.vue.d.ts +4 -4
- package/dist/types/src/components/CloudTAK/Menu/Overlays/DeleteModal.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeCots.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeMission.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +2 -2
- package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +4 -4
- package/dist/types/src/components/CloudTAK/util/EmptyInfo.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/GenericChat.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/GenericSelect.vue.d.ts +1 -0
- package/dist/types/src/components/CloudTAK/util/IconSelectOffline.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/InlineExpiration.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/InlineGroupSelect.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/Keywords.vue.d.ts +1 -1
- package/dist/types/src/components/CloudTAK/util/TagEntry.vue.d.ts +2 -2
- package/dist/types/src/components/CloudTAK/util/featureCut.d.ts +3 -3
- package/dist/types/src/components/util/HandleForm.vue.d.ts +2 -2
- package/dist/types/src/components/util/Upload.vue.d.ts +4 -4
- package/dist/types/src/database.d.ts +8 -1
- package/dist/types/src/router.d.ts +1 -1
- package/dist/types/src/std.d.ts +10 -1
- package/dist/types/src/stores/device/camera.d.ts +9 -0
- package/dist/types/src/stores/device/file-system.d.ts +7 -0
- package/dist/types/src/stores/device/geolocation.d.ts +15 -0
- package/dist/types/src/stores/device/index.d.ts +264 -0
- package/dist/types/src/stores/device/notification.d.ts +15 -0
- package/dist/types/src/stores/device/orientation.d.ts +15 -0
- package/dist/types/src/stores/device/shared.d.ts +2 -0
- package/dist/types/src/stores/device/storage.d.ts +7 -0
- package/dist/types/src/stores/device/types.d.ts +23 -0
- package/dist/types/src/stores/device/wake-lock.d.ts +10 -0
- package/dist/types/src/stores/map.d.ts +1 -8
- package/dist/types/src/stores/modules/icons.d.ts +4 -7
- package/dist/types/src/workers/atlas.d.ts +0 -2
- package/package.json +7 -6
- package/dist/types/src/stores/modules/permissions.d.ts +0 -37
- package/dist/types/src/workers/atlas-icons.d.ts +0 -14
|
@@ -38,8 +38,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
38
38
|
onCancel?: (() => any) | undefined;
|
|
39
39
|
onDisplayClick?: (() => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
|
-
label: string;
|
|
42
41
|
value: string | null;
|
|
42
|
+
label: string;
|
|
43
43
|
gap: string;
|
|
44
44
|
background: string;
|
|
45
45
|
shadow: boolean;
|
|
@@ -36,9 +36,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
36
36
|
onSave?: ((value: string[]) => any) | undefined;
|
|
37
37
|
onCancel?: (() => any) | undefined;
|
|
38
38
|
}>, {
|
|
39
|
-
label: string;
|
|
40
39
|
direction: string;
|
|
41
40
|
active: boolean;
|
|
41
|
+
label: string;
|
|
42
42
|
gap: string;
|
|
43
43
|
background: string;
|
|
44
44
|
shadow: boolean;
|
|
@@ -4,8 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
tone?: 'muted' | 'accent';
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
-
placeholder: string;
|
|
8
7
|
keywords: string[];
|
|
8
|
+
placeholder: string;
|
|
9
9
|
tone: "muted" | "accent";
|
|
10
10
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
@@ -23,13 +23,13 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
23
23
|
"on-limit": () => any;
|
|
24
24
|
"on-error": (error: Error) => any;
|
|
25
25
|
"on-focus": (event: FocusEvent) => any;
|
|
26
|
-
"on-blur": (event:
|
|
26
|
+
"on-blur": (event: KeyboardEvent | FocusEvent) => any;
|
|
27
27
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
28
28
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
29
29
|
"onOn-limit"?: (() => any) | undefined;
|
|
30
30
|
"onOn-error"?: ((error: Error) => any) | undefined;
|
|
31
31
|
"onOn-focus"?: ((event: FocusEvent) => any) | undefined;
|
|
32
|
-
"onOn-blur"?: ((event:
|
|
32
|
+
"onOn-blur"?: ((event: KeyboardEvent | FocusEvent) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
34
|
modelValue: string[];
|
|
35
35
|
disabled: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Feature } from 'geojson';
|
|
2
2
|
import type { MapGeoJSONFeature } from 'maplibre-gl';
|
|
3
3
|
import type { useMapStore } from '../../../stores/map.ts';
|
|
4
|
-
import type Overlay from '../../../base/overlay.ts';
|
|
4
|
+
import type Overlay from '../../../base/overlay-class.ts';
|
|
5
5
|
type FeatureLike = Feature | MapGeoJSONFeature;
|
|
6
6
|
type MapStore = ReturnType<typeof useMapStore>;
|
|
7
|
-
export declare function getFeatureOverlay(
|
|
8
|
-
export declare function canCutOverlayFeature(
|
|
7
|
+
export declare function getFeatureOverlay(feature?: FeatureLike): Overlay | null;
|
|
8
|
+
export declare function canCutOverlayFeature(feature?: FeatureLike): boolean;
|
|
9
9
|
export declare function cutOverlayFeature(mapStore: MapStore, feature?: FeatureLike): Promise<void>;
|
|
10
10
|
export {};
|
|
@@ -17,13 +17,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
label: string;
|
|
21
20
|
description: string;
|
|
21
|
+
schema: SchemaNode;
|
|
22
|
+
label: string;
|
|
22
23
|
modelValue: string | number;
|
|
23
24
|
disabled: boolean;
|
|
24
25
|
rows: number | string;
|
|
25
26
|
placeholder: string;
|
|
26
|
-
schema: SchemaNode;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -21,24 +21,24 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {
|
|
|
21
21
|
refresh: typeof refresh;
|
|
22
22
|
upload: typeof upload;
|
|
23
23
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
-
done: (response: unknown) => any;
|
|
25
24
|
error: (response: Error) => any;
|
|
25
|
+
done: (response: unknown) => any;
|
|
26
26
|
cancel: () => any;
|
|
27
27
|
staged: (response: {
|
|
28
28
|
name: string;
|
|
29
29
|
}) => any;
|
|
30
30
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
31
|
-
onDone?: ((response: unknown) => any) | undefined;
|
|
32
31
|
onError?: ((response: Error) => any) | undefined;
|
|
32
|
+
onDone?: ((response: unknown) => any) | undefined;
|
|
33
33
|
onCancel?: (() => any) | undefined;
|
|
34
34
|
onStaged?: ((response: {
|
|
35
35
|
name: string;
|
|
36
36
|
}) => any) | undefined;
|
|
37
37
|
}>, {
|
|
38
|
-
label: string;
|
|
39
38
|
method: string;
|
|
40
|
-
format: "formdata" | "raw";
|
|
41
39
|
headers: Record<string, string>;
|
|
40
|
+
label: string;
|
|
41
|
+
format: "formdata" | "raw";
|
|
42
42
|
cancel: boolean;
|
|
43
43
|
autoupload: boolean;
|
|
44
44
|
mimetype: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Dexie, { type EntityTable } from 'dexie';
|
|
2
|
-
import type { Feature, GroupChannel, Mission, MissionRole, MissionChange, MissionLog, Contact, Server } from './types.ts';
|
|
2
|
+
import type { Feature, GroupChannel, Mission, MissionRole, MissionChange, MissionLog, Contact, Server, ProfileOverlayList } from './types.ts';
|
|
3
3
|
export interface DBIcon {
|
|
4
4
|
/** Maplibre image id, e.g. "<iconsetUid>:<icon-path-without-extension>" */
|
|
5
5
|
name: string;
|
|
@@ -56,6 +56,7 @@ export interface DBIconset {
|
|
|
56
56
|
default_unknown: string | null;
|
|
57
57
|
skip_resize: boolean;
|
|
58
58
|
}
|
|
59
|
+
export type DBOverlay = ProfileOverlayList["items"][number];
|
|
59
60
|
export interface DBFilter {
|
|
60
61
|
id: string;
|
|
61
62
|
external: string;
|
|
@@ -82,6 +83,10 @@ export interface DBNotification {
|
|
|
82
83
|
read: boolean;
|
|
83
84
|
created: string;
|
|
84
85
|
}
|
|
86
|
+
export interface DBKV {
|
|
87
|
+
key: string;
|
|
88
|
+
value: string;
|
|
89
|
+
}
|
|
85
90
|
export interface DBVideo {
|
|
86
91
|
id: string;
|
|
87
92
|
created: string;
|
|
@@ -183,6 +188,7 @@ export interface DBSprite {
|
|
|
183
188
|
export type DatabaseType = Dexie & {
|
|
184
189
|
icon: EntityTable<DBIcon, 'name'>;
|
|
185
190
|
iconset: EntityTable<DBIconset, 'uid'>;
|
|
191
|
+
overlay: EntityTable<DBOverlay, 'id'>;
|
|
186
192
|
sprite: EntityTable<DBSprite, 'id'>;
|
|
187
193
|
group: EntityTable<GroupChannel, 'name'>;
|
|
188
194
|
video: EntityTable<DBVideo, 'id'>;
|
|
@@ -201,6 +207,7 @@ export type DatabaseType = Dexie & {
|
|
|
201
207
|
subscription_chat: EntityTable<DBSubscriptionChat, 'id'>;
|
|
202
208
|
mission_template: EntityTable<DBMissionTemplate, 'id'>;
|
|
203
209
|
mission_template_log: EntityTable<DBMissionTemplateLog, 'id'>;
|
|
210
|
+
kv: EntityTable<DBKV, 'key'>;
|
|
204
211
|
profile: EntityTable<DBProfileConfig, 'key'>;
|
|
205
212
|
config: EntityTable<DBConfig, 'key'>;
|
|
206
213
|
cache: EntityTable<DBCache, 'key'>;
|
package/dist/types/src/std.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { paths } from '@cloudtak/api-types';
|
|
2
2
|
import type { Router } from 'vue-router';
|
|
3
|
+
export declare const serverUrl: string;
|
|
3
4
|
export declare const server: import("openapi-fetch").Client<paths, `${string}/${string}`>;
|
|
5
|
+
export declare function getServer(): Promise<import("openapi-fetch").Client<paths, `${string}/${string}`>>;
|
|
6
|
+
export declare function getRuntimeToken(): Promise<string | undefined>;
|
|
4
7
|
export declare function stdurl(url: string | URL): URL;
|
|
5
8
|
/**
|
|
6
9
|
* Standardize interactions with the backend API
|
|
@@ -15,5 +18,11 @@ export declare function std(url: string | URL, opts?: {
|
|
|
15
18
|
body?: unknown;
|
|
16
19
|
method?: string;
|
|
17
20
|
}): Promise<unknown>;
|
|
18
|
-
export declare function
|
|
21
|
+
export declare function downloadBlob(blob: Blob, response: Response, fallbackName: string): void;
|
|
22
|
+
export declare function downloadUrl(url: string | URL, opts?: {
|
|
23
|
+
filename?: string;
|
|
24
|
+
token?: boolean;
|
|
25
|
+
native?: boolean;
|
|
26
|
+
}): Promise<void>;
|
|
19
27
|
export declare function stdclick($router: Router, event: MouseEvent | KeyboardEvent, path: string): void;
|
|
28
|
+
export declare function humanSeconds(seconds: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DevicePermissionContext } from './types.ts';
|
|
2
|
+
export declare function checkNativeCameraPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
|
|
3
|
+
export declare function requestNativeCameraPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
|
|
4
|
+
export declare class CameraPermission {
|
|
5
|
+
private readonly context;
|
|
6
|
+
constructor(context: DevicePermissionContext);
|
|
7
|
+
refreshStatus(): Promise<void>;
|
|
8
|
+
request(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CallbackID, Position, PositionOptions } from '@capacitor/geolocation';
|
|
2
|
+
import type { DevicePermissionContext } from './types.ts';
|
|
3
|
+
export declare function supportsLocationRequests(): boolean;
|
|
4
|
+
export declare function checkNativeLocationPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
|
|
5
|
+
export declare function requestNativeLocationPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
|
|
6
|
+
export declare function getCurrentLocation(options?: PositionOptions): Promise<Position>;
|
|
7
|
+
export declare function watchLocation(options: PositionOptions, callback: (position: Position | null, err?: unknown) => void): Promise<CallbackID>;
|
|
8
|
+
export declare function clearLocationWatch(id: CallbackID): Promise<void>;
|
|
9
|
+
export declare class GeolocationPermission {
|
|
10
|
+
private readonly context;
|
|
11
|
+
constructor(context: DevicePermissionContext);
|
|
12
|
+
refreshStatus(): Promise<void>;
|
|
13
|
+
request(onGranted?: () => void): Promise<void>;
|
|
14
|
+
initializeSubscription(onGranted?: () => void): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { CameraPermission } from './camera.ts';
|
|
2
|
+
import { FileSystemPermission } from './file-system.ts';
|
|
3
|
+
import { GeolocationPermission } from './geolocation.ts';
|
|
4
|
+
import { BrowserNotificationPermission } from './notification.ts';
|
|
5
|
+
import { OrientationPermission } from './orientation.ts';
|
|
6
|
+
import { StoragePermission } from './storage.ts';
|
|
7
|
+
import { WakeLockPermission } from './wake-lock.ts';
|
|
8
|
+
import type { BrowserPermissionState, BrowserPermissionType } from './types.ts';
|
|
9
|
+
export type { BrowserPermissionState, BrowserPermissionType } from './types.ts';
|
|
10
|
+
export { CameraPermission } from './camera.ts';
|
|
11
|
+
export { FileSystemPermission } from './file-system.ts';
|
|
12
|
+
export { GeolocationPermission } from './geolocation.ts';
|
|
13
|
+
export { BrowserNotificationPermission } from './notification.ts';
|
|
14
|
+
export { OrientationPermission } from './orientation.ts';
|
|
15
|
+
export { StoragePermission } from './storage.ts';
|
|
16
|
+
export { WakeLockPermission } from './wake-lock.ts';
|
|
17
|
+
export declare const usePermissionStore: import("pinia").StoreDefinition<"permissions", Pick<{
|
|
18
|
+
permissions: {
|
|
19
|
+
notification: BrowserPermissionState;
|
|
20
|
+
orientation: BrowserPermissionState;
|
|
21
|
+
location: BrowserPermissionState;
|
|
22
|
+
storage: BrowserPermissionState;
|
|
23
|
+
camera: BrowserPermissionState;
|
|
24
|
+
wakeLock: BrowserPermissionState;
|
|
25
|
+
fileSystem: BrowserPermissionState;
|
|
26
|
+
};
|
|
27
|
+
geolocation: import("vue").Raw<GeolocationPermission>;
|
|
28
|
+
notification: import("vue").Raw<BrowserNotificationPermission>;
|
|
29
|
+
orientation: import("vue").Raw<OrientationPermission>;
|
|
30
|
+
storage: import("vue").Raw<StoragePermission>;
|
|
31
|
+
camera: import("vue").Raw<CameraPermission>;
|
|
32
|
+
wakeLock: import("vue").Raw<WakeLockPermission>;
|
|
33
|
+
fileSystem: import("vue").Raw<FileSystemPermission>;
|
|
34
|
+
setPermissionStatus: (type: BrowserPermissionType, state: BrowserPermissionState) => void;
|
|
35
|
+
refreshPermissionStatuses: () => Promise<void>;
|
|
36
|
+
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
37
|
+
hasOrientationSupport: () => boolean;
|
|
38
|
+
hasOrientationPermissionRequest: () => boolean;
|
|
39
|
+
getOrientationEventName: () => "deviceorientation" | "deviceorientationabsolute";
|
|
40
|
+
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
41
|
+
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
42
|
+
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
43
|
+
refreshLocationPermissionStatus: () => Promise<void>;
|
|
44
|
+
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
45
|
+
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
46
|
+
refreshStoragePermissionStatus: () => Promise<void>;
|
|
47
|
+
refreshCameraPermissionStatus: () => Promise<void>;
|
|
48
|
+
refreshWakeLockPermissionStatus: () => Promise<void>;
|
|
49
|
+
refreshFileSystemPermissionStatus: () => Promise<void>;
|
|
50
|
+
requestLocationPermission: (onGranted?: () => void) => Promise<void>;
|
|
51
|
+
requestNotificationPermission: () => Promise<void>;
|
|
52
|
+
requestOrientationPermission: () => Promise<void>;
|
|
53
|
+
requestStoragePermission: () => Promise<void>;
|
|
54
|
+
requestCameraPermission: () => Promise<void>;
|
|
55
|
+
requestWakeLockPermission: () => Promise<void>;
|
|
56
|
+
requestFileSystemPermission: () => Promise<void>;
|
|
57
|
+
releaseWakeLockSentinel: () => Promise<void>;
|
|
58
|
+
}, "notification" | "orientation" | "storage" | "permissions" | "camera" | "geolocation" | "wakeLock" | "fileSystem">, Pick<{
|
|
59
|
+
permissions: {
|
|
60
|
+
notification: BrowserPermissionState;
|
|
61
|
+
orientation: BrowserPermissionState;
|
|
62
|
+
location: BrowserPermissionState;
|
|
63
|
+
storage: BrowserPermissionState;
|
|
64
|
+
camera: BrowserPermissionState;
|
|
65
|
+
wakeLock: BrowserPermissionState;
|
|
66
|
+
fileSystem: BrowserPermissionState;
|
|
67
|
+
};
|
|
68
|
+
geolocation: import("vue").Raw<GeolocationPermission>;
|
|
69
|
+
notification: import("vue").Raw<BrowserNotificationPermission>;
|
|
70
|
+
orientation: import("vue").Raw<OrientationPermission>;
|
|
71
|
+
storage: import("vue").Raw<StoragePermission>;
|
|
72
|
+
camera: import("vue").Raw<CameraPermission>;
|
|
73
|
+
wakeLock: import("vue").Raw<WakeLockPermission>;
|
|
74
|
+
fileSystem: import("vue").Raw<FileSystemPermission>;
|
|
75
|
+
setPermissionStatus: (type: BrowserPermissionType, state: BrowserPermissionState) => void;
|
|
76
|
+
refreshPermissionStatuses: () => Promise<void>;
|
|
77
|
+
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
78
|
+
hasOrientationSupport: () => boolean;
|
|
79
|
+
hasOrientationPermissionRequest: () => boolean;
|
|
80
|
+
getOrientationEventName: () => "deviceorientation" | "deviceorientationabsolute";
|
|
81
|
+
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
82
|
+
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
83
|
+
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
84
|
+
refreshLocationPermissionStatus: () => Promise<void>;
|
|
85
|
+
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
86
|
+
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
87
|
+
refreshStoragePermissionStatus: () => Promise<void>;
|
|
88
|
+
refreshCameraPermissionStatus: () => Promise<void>;
|
|
89
|
+
refreshWakeLockPermissionStatus: () => Promise<void>;
|
|
90
|
+
refreshFileSystemPermissionStatus: () => Promise<void>;
|
|
91
|
+
requestLocationPermission: (onGranted?: () => void) => Promise<void>;
|
|
92
|
+
requestNotificationPermission: () => Promise<void>;
|
|
93
|
+
requestOrientationPermission: () => Promise<void>;
|
|
94
|
+
requestStoragePermission: () => Promise<void>;
|
|
95
|
+
requestCameraPermission: () => Promise<void>;
|
|
96
|
+
requestWakeLockPermission: () => Promise<void>;
|
|
97
|
+
requestFileSystemPermission: () => Promise<void>;
|
|
98
|
+
releaseWakeLockSentinel: () => Promise<void>;
|
|
99
|
+
}, never>, Pick<{
|
|
100
|
+
permissions: {
|
|
101
|
+
notification: BrowserPermissionState;
|
|
102
|
+
orientation: BrowserPermissionState;
|
|
103
|
+
location: BrowserPermissionState;
|
|
104
|
+
storage: BrowserPermissionState;
|
|
105
|
+
camera: BrowserPermissionState;
|
|
106
|
+
wakeLock: BrowserPermissionState;
|
|
107
|
+
fileSystem: BrowserPermissionState;
|
|
108
|
+
};
|
|
109
|
+
geolocation: import("vue").Raw<GeolocationPermission>;
|
|
110
|
+
notification: import("vue").Raw<BrowserNotificationPermission>;
|
|
111
|
+
orientation: import("vue").Raw<OrientationPermission>;
|
|
112
|
+
storage: import("vue").Raw<StoragePermission>;
|
|
113
|
+
camera: import("vue").Raw<CameraPermission>;
|
|
114
|
+
wakeLock: import("vue").Raw<WakeLockPermission>;
|
|
115
|
+
fileSystem: import("vue").Raw<FileSystemPermission>;
|
|
116
|
+
setPermissionStatus: (type: BrowserPermissionType, state: BrowserPermissionState) => void;
|
|
117
|
+
refreshPermissionStatuses: () => Promise<void>;
|
|
118
|
+
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
119
|
+
hasOrientationSupport: () => boolean;
|
|
120
|
+
hasOrientationPermissionRequest: () => boolean;
|
|
121
|
+
getOrientationEventName: () => "deviceorientation" | "deviceorientationabsolute";
|
|
122
|
+
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
123
|
+
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
124
|
+
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
125
|
+
refreshLocationPermissionStatus: () => Promise<void>;
|
|
126
|
+
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
127
|
+
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
128
|
+
refreshStoragePermissionStatus: () => Promise<void>;
|
|
129
|
+
refreshCameraPermissionStatus: () => Promise<void>;
|
|
130
|
+
refreshWakeLockPermissionStatus: () => Promise<void>;
|
|
131
|
+
refreshFileSystemPermissionStatus: () => Promise<void>;
|
|
132
|
+
requestLocationPermission: (onGranted?: () => void) => Promise<void>;
|
|
133
|
+
requestNotificationPermission: () => Promise<void>;
|
|
134
|
+
requestOrientationPermission: () => Promise<void>;
|
|
135
|
+
requestStoragePermission: () => Promise<void>;
|
|
136
|
+
requestCameraPermission: () => Promise<void>;
|
|
137
|
+
requestWakeLockPermission: () => Promise<void>;
|
|
138
|
+
requestFileSystemPermission: () => Promise<void>;
|
|
139
|
+
releaseWakeLockSentinel: () => Promise<void>;
|
|
140
|
+
}, "setPermissionStatus" | "refreshPermissionStatuses" | "initializePermissionSubscriptions" | "hasOrientationSupport" | "hasOrientationPermissionRequest" | "getOrientationEventName" | "getOrientationHeading" | "addOrientationListener" | "removeOrientationListener" | "refreshLocationPermissionStatus" | "refreshNotificationPermissionStatus" | "refreshOrientationPermissionStatus" | "refreshStoragePermissionStatus" | "refreshCameraPermissionStatus" | "refreshWakeLockPermissionStatus" | "refreshFileSystemPermissionStatus" | "requestLocationPermission" | "requestNotificationPermission" | "requestOrientationPermission" | "requestStoragePermission" | "requestCameraPermission" | "requestWakeLockPermission" | "requestFileSystemPermission" | "releaseWakeLockSentinel">>;
|
|
141
|
+
export declare const useDeviceStore: import("pinia").StoreDefinition<"permissions", Pick<{
|
|
142
|
+
permissions: {
|
|
143
|
+
notification: BrowserPermissionState;
|
|
144
|
+
orientation: BrowserPermissionState;
|
|
145
|
+
location: BrowserPermissionState;
|
|
146
|
+
storage: BrowserPermissionState;
|
|
147
|
+
camera: BrowserPermissionState;
|
|
148
|
+
wakeLock: BrowserPermissionState;
|
|
149
|
+
fileSystem: BrowserPermissionState;
|
|
150
|
+
};
|
|
151
|
+
geolocation: import("vue").Raw<GeolocationPermission>;
|
|
152
|
+
notification: import("vue").Raw<BrowserNotificationPermission>;
|
|
153
|
+
orientation: import("vue").Raw<OrientationPermission>;
|
|
154
|
+
storage: import("vue").Raw<StoragePermission>;
|
|
155
|
+
camera: import("vue").Raw<CameraPermission>;
|
|
156
|
+
wakeLock: import("vue").Raw<WakeLockPermission>;
|
|
157
|
+
fileSystem: import("vue").Raw<FileSystemPermission>;
|
|
158
|
+
setPermissionStatus: (type: BrowserPermissionType, state: BrowserPermissionState) => void;
|
|
159
|
+
refreshPermissionStatuses: () => Promise<void>;
|
|
160
|
+
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
161
|
+
hasOrientationSupport: () => boolean;
|
|
162
|
+
hasOrientationPermissionRequest: () => boolean;
|
|
163
|
+
getOrientationEventName: () => "deviceorientation" | "deviceorientationabsolute";
|
|
164
|
+
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
165
|
+
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
166
|
+
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
167
|
+
refreshLocationPermissionStatus: () => Promise<void>;
|
|
168
|
+
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
169
|
+
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
170
|
+
refreshStoragePermissionStatus: () => Promise<void>;
|
|
171
|
+
refreshCameraPermissionStatus: () => Promise<void>;
|
|
172
|
+
refreshWakeLockPermissionStatus: () => Promise<void>;
|
|
173
|
+
refreshFileSystemPermissionStatus: () => Promise<void>;
|
|
174
|
+
requestLocationPermission: (onGranted?: () => void) => Promise<void>;
|
|
175
|
+
requestNotificationPermission: () => Promise<void>;
|
|
176
|
+
requestOrientationPermission: () => Promise<void>;
|
|
177
|
+
requestStoragePermission: () => Promise<void>;
|
|
178
|
+
requestCameraPermission: () => Promise<void>;
|
|
179
|
+
requestWakeLockPermission: () => Promise<void>;
|
|
180
|
+
requestFileSystemPermission: () => Promise<void>;
|
|
181
|
+
releaseWakeLockSentinel: () => Promise<void>;
|
|
182
|
+
}, "notification" | "orientation" | "storage" | "permissions" | "camera" | "geolocation" | "wakeLock" | "fileSystem">, Pick<{
|
|
183
|
+
permissions: {
|
|
184
|
+
notification: BrowserPermissionState;
|
|
185
|
+
orientation: BrowserPermissionState;
|
|
186
|
+
location: BrowserPermissionState;
|
|
187
|
+
storage: BrowserPermissionState;
|
|
188
|
+
camera: BrowserPermissionState;
|
|
189
|
+
wakeLock: BrowserPermissionState;
|
|
190
|
+
fileSystem: BrowserPermissionState;
|
|
191
|
+
};
|
|
192
|
+
geolocation: import("vue").Raw<GeolocationPermission>;
|
|
193
|
+
notification: import("vue").Raw<BrowserNotificationPermission>;
|
|
194
|
+
orientation: import("vue").Raw<OrientationPermission>;
|
|
195
|
+
storage: import("vue").Raw<StoragePermission>;
|
|
196
|
+
camera: import("vue").Raw<CameraPermission>;
|
|
197
|
+
wakeLock: import("vue").Raw<WakeLockPermission>;
|
|
198
|
+
fileSystem: import("vue").Raw<FileSystemPermission>;
|
|
199
|
+
setPermissionStatus: (type: BrowserPermissionType, state: BrowserPermissionState) => void;
|
|
200
|
+
refreshPermissionStatuses: () => Promise<void>;
|
|
201
|
+
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
202
|
+
hasOrientationSupport: () => boolean;
|
|
203
|
+
hasOrientationPermissionRequest: () => boolean;
|
|
204
|
+
getOrientationEventName: () => "deviceorientation" | "deviceorientationabsolute";
|
|
205
|
+
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
206
|
+
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
207
|
+
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
208
|
+
refreshLocationPermissionStatus: () => Promise<void>;
|
|
209
|
+
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
210
|
+
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
211
|
+
refreshStoragePermissionStatus: () => Promise<void>;
|
|
212
|
+
refreshCameraPermissionStatus: () => Promise<void>;
|
|
213
|
+
refreshWakeLockPermissionStatus: () => Promise<void>;
|
|
214
|
+
refreshFileSystemPermissionStatus: () => Promise<void>;
|
|
215
|
+
requestLocationPermission: (onGranted?: () => void) => Promise<void>;
|
|
216
|
+
requestNotificationPermission: () => Promise<void>;
|
|
217
|
+
requestOrientationPermission: () => Promise<void>;
|
|
218
|
+
requestStoragePermission: () => Promise<void>;
|
|
219
|
+
requestCameraPermission: () => Promise<void>;
|
|
220
|
+
requestWakeLockPermission: () => Promise<void>;
|
|
221
|
+
requestFileSystemPermission: () => Promise<void>;
|
|
222
|
+
releaseWakeLockSentinel: () => Promise<void>;
|
|
223
|
+
}, never>, Pick<{
|
|
224
|
+
permissions: {
|
|
225
|
+
notification: BrowserPermissionState;
|
|
226
|
+
orientation: BrowserPermissionState;
|
|
227
|
+
location: BrowserPermissionState;
|
|
228
|
+
storage: BrowserPermissionState;
|
|
229
|
+
camera: BrowserPermissionState;
|
|
230
|
+
wakeLock: BrowserPermissionState;
|
|
231
|
+
fileSystem: BrowserPermissionState;
|
|
232
|
+
};
|
|
233
|
+
geolocation: import("vue").Raw<GeolocationPermission>;
|
|
234
|
+
notification: import("vue").Raw<BrowserNotificationPermission>;
|
|
235
|
+
orientation: import("vue").Raw<OrientationPermission>;
|
|
236
|
+
storage: import("vue").Raw<StoragePermission>;
|
|
237
|
+
camera: import("vue").Raw<CameraPermission>;
|
|
238
|
+
wakeLock: import("vue").Raw<WakeLockPermission>;
|
|
239
|
+
fileSystem: import("vue").Raw<FileSystemPermission>;
|
|
240
|
+
setPermissionStatus: (type: BrowserPermissionType, state: BrowserPermissionState) => void;
|
|
241
|
+
refreshPermissionStatuses: () => Promise<void>;
|
|
242
|
+
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
243
|
+
hasOrientationSupport: () => boolean;
|
|
244
|
+
hasOrientationPermissionRequest: () => boolean;
|
|
245
|
+
getOrientationEventName: () => "deviceorientation" | "deviceorientationabsolute";
|
|
246
|
+
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
247
|
+
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
248
|
+
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
249
|
+
refreshLocationPermissionStatus: () => Promise<void>;
|
|
250
|
+
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
251
|
+
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
252
|
+
refreshStoragePermissionStatus: () => Promise<void>;
|
|
253
|
+
refreshCameraPermissionStatus: () => Promise<void>;
|
|
254
|
+
refreshWakeLockPermissionStatus: () => Promise<void>;
|
|
255
|
+
refreshFileSystemPermissionStatus: () => Promise<void>;
|
|
256
|
+
requestLocationPermission: (onGranted?: () => void) => Promise<void>;
|
|
257
|
+
requestNotificationPermission: () => Promise<void>;
|
|
258
|
+
requestOrientationPermission: () => Promise<void>;
|
|
259
|
+
requestStoragePermission: () => Promise<void>;
|
|
260
|
+
requestCameraPermission: () => Promise<void>;
|
|
261
|
+
requestWakeLockPermission: () => Promise<void>;
|
|
262
|
+
requestFileSystemPermission: () => Promise<void>;
|
|
263
|
+
releaseWakeLockSentinel: () => Promise<void>;
|
|
264
|
+
}, "setPermissionStatus" | "refreshPermissionStatuses" | "initializePermissionSubscriptions" | "hasOrientationSupport" | "hasOrientationPermissionRequest" | "getOrientationEventName" | "getOrientationHeading" | "addOrientationListener" | "removeOrientationListener" | "refreshLocationPermissionStatus" | "refreshNotificationPermissionStatus" | "refreshOrientationPermissionStatus" | "refreshStoragePermissionStatus" | "refreshCameraPermissionStatus" | "refreshWakeLockPermissionStatus" | "refreshFileSystemPermissionStatus" | "requestLocationPermission" | "requestNotificationPermission" | "requestOrientationPermission" | "requestStoragePermission" | "requestCameraPermission" | "requestWakeLockPermission" | "requestFileSystemPermission" | "releaseWakeLockSentinel">>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DevicePermissionContext } from './types.ts';
|
|
2
|
+
export declare class BrowserNotificationPermission {
|
|
3
|
+
private readonly context;
|
|
4
|
+
private messagingToken;
|
|
5
|
+
private tokenListener;
|
|
6
|
+
constructor(context: DevicePermissionContext);
|
|
7
|
+
refreshStatus(): Promise<void>;
|
|
8
|
+
request(): Promise<void>;
|
|
9
|
+
initializeSubscription(): Promise<void>;
|
|
10
|
+
getMessagingToken(): string | null;
|
|
11
|
+
refreshMessagingToken(): Promise<string | null>;
|
|
12
|
+
deleteMessagingToken(): Promise<void>;
|
|
13
|
+
private refreshNativeStatus;
|
|
14
|
+
private initializeNativeMessaging;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DevicePermissionContext } from './types.ts';
|
|
2
|
+
type DeviceOrientationEventName = 'deviceorientationabsolute' | 'deviceorientation';
|
|
3
|
+
export declare class OrientationPermission {
|
|
4
|
+
private readonly context;
|
|
5
|
+
constructor(context: DevicePermissionContext);
|
|
6
|
+
hasSupport(): boolean;
|
|
7
|
+
hasPermissionRequest(): boolean;
|
|
8
|
+
getEventName(): DeviceOrientationEventName;
|
|
9
|
+
getHeading(event: DeviceOrientationEvent): number | null;
|
|
10
|
+
addListener(listener: (event: DeviceOrientationEvent) => void): void;
|
|
11
|
+
removeListener(listener: (event: DeviceOrientationEvent) => void): void;
|
|
12
|
+
refreshStatus(): Promise<void>;
|
|
13
|
+
request(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type BrowserPermissionState = PermissionState | 'unsupported' | 'unknown';
|
|
2
|
+
export type BrowserPermissionType = 'location' | 'notification' | 'orientation' | 'storage' | 'camera' | 'wakeLock' | 'fileSystem';
|
|
3
|
+
export type FileSystemAccessHandle = FileSystemHandle & {
|
|
4
|
+
queryPermission?: (descriptor?: {
|
|
5
|
+
mode?: 'read' | 'readwrite';
|
|
6
|
+
}) => Promise<PermissionState>;
|
|
7
|
+
requestPermission?: (descriptor?: {
|
|
8
|
+
mode?: 'read' | 'readwrite';
|
|
9
|
+
}) => Promise<PermissionState>;
|
|
10
|
+
};
|
|
11
|
+
export type WindowWithFilePicker = Window & {
|
|
12
|
+
showOpenFilePicker?: (options?: {
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
}) => Promise<FileSystemAccessHandle[]>;
|
|
15
|
+
};
|
|
16
|
+
export interface DevicePermissionContext {
|
|
17
|
+
permissions: Record<BrowserPermissionType, BrowserPermissionState>;
|
|
18
|
+
setPermissionStatus: (type: BrowserPermissionType, state: BrowserPermissionState) => void;
|
|
19
|
+
getWakeLockSentinel: () => WakeLockSentinel | null;
|
|
20
|
+
setWakeLockSentinel: (sentinel: WakeLockSentinel | null) => void;
|
|
21
|
+
getFileSystemHandle: () => FileSystemAccessHandle | null;
|
|
22
|
+
setFileSystemHandle: (handle: FileSystemAccessHandle | null) => void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DevicePermissionContext } from './types.ts';
|
|
2
|
+
export declare class WakeLockPermission {
|
|
3
|
+
private readonly context;
|
|
4
|
+
constructor(context: DevicePermissionContext);
|
|
5
|
+
refreshStatus(): Promise<void>;
|
|
6
|
+
request(): Promise<void>;
|
|
7
|
+
releaseSentinel(): Promise<void>;
|
|
8
|
+
private isSupported;
|
|
9
|
+
private isKeptAwake;
|
|
10
|
+
}
|
|
@@ -6,7 +6,6 @@ import * as Comlink from 'comlink';
|
|
|
6
6
|
import COT from '../base/cot.ts';
|
|
7
7
|
import type { DatabaseType } from '../database.ts';
|
|
8
8
|
import { LocationState } from '../base/events.ts';
|
|
9
|
-
import Overlay from '../base/overlay.ts';
|
|
10
9
|
import Subscription from '../base/subscription.ts';
|
|
11
10
|
import * as mapgl from 'maplibre-gl';
|
|
12
11
|
import type Atlas from '../workers/atlas.ts';
|
|
@@ -56,6 +55,7 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
56
55
|
};
|
|
57
56
|
timer: ReturnType<typeof setInterval> | null;
|
|
58
57
|
_rawWorker: Worker;
|
|
58
|
+
_workerReady: Promise<void>;
|
|
59
59
|
worker: Comlink.Remote<Atlas>;
|
|
60
60
|
mission: Subscription | undefined;
|
|
61
61
|
terrainEnabled: boolean;
|
|
@@ -84,7 +84,6 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
84
84
|
y: number;
|
|
85
85
|
lngLat?: LngLat;
|
|
86
86
|
};
|
|
87
|
-
overlays: Array<Overlay>;
|
|
88
87
|
}, {
|
|
89
88
|
map: () => mapgl.Map;
|
|
90
89
|
draw: () => DrawTool;
|
|
@@ -93,13 +92,7 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
93
92
|
bottomBar: () => BottomBarManager;
|
|
94
93
|
}, {
|
|
95
94
|
destroy: () => Promise<void>;
|
|
96
|
-
getOverlayBeforeId: () => string | undefined;
|
|
97
|
-
addOverlay: (overlay: Overlay) => void;
|
|
98
|
-
removeOverlay: (overlay: Overlay) => Promise<void>;
|
|
99
95
|
makeActiveMission: (mission?: Subscription) => Promise<void>;
|
|
100
|
-
getOverlayById(id: number): Overlay | null;
|
|
101
|
-
getOverlayByName(name: string): Overlay | null;
|
|
102
|
-
getOverlayByMode(mode: string, mode_id: string): Overlay | null;
|
|
103
96
|
addTerrain: () => Promise<void>;
|
|
104
97
|
removeTerrain: () => void;
|
|
105
98
|
returnHome: () => Promise<void>;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import type { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
-
import type * as Comlink from 'comlink';
|
|
3
|
-
import type Atlas from '../../workers/atlas.ts';
|
|
4
2
|
import { type DBIconset } from '../../database.ts';
|
|
5
3
|
export default class IconManager {
|
|
6
4
|
private cache;
|
|
7
5
|
private map;
|
|
8
|
-
private worker;
|
|
9
6
|
private loggedMissingImageIds;
|
|
10
7
|
private loggedErrors;
|
|
11
8
|
private inflightImage;
|
|
12
9
|
private fallbackBitmap;
|
|
13
10
|
private requestedIconsetImageIds;
|
|
14
|
-
constructor(map: MapLibreMap
|
|
11
|
+
constructor(map: MapLibreMap);
|
|
15
12
|
private logWarnOnce;
|
|
16
13
|
private logErrorOnce;
|
|
17
14
|
static from(uid: string): Promise<DBIconset | undefined>;
|
|
@@ -39,9 +36,8 @@ export default class IconManager {
|
|
|
39
36
|
/**
|
|
40
37
|
* Hydrate the local Dexie icon cache from the API.
|
|
41
38
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* concerns like purging stale MapLibre images.
|
|
39
|
+
* This method also handles main-thread concerns like purging stale MapLibre
|
|
40
|
+
* images when the local Dexie cache changes.
|
|
45
41
|
*/
|
|
46
42
|
hydrate(opts?: {
|
|
47
43
|
force?: boolean;
|
|
@@ -55,6 +51,7 @@ export default class IconManager {
|
|
|
55
51
|
force?: boolean;
|
|
56
52
|
}): Promise<void>;
|
|
57
53
|
removeIconset(uid: string): Promise<void>;
|
|
54
|
+
deleteIconset(uid: string): Promise<void>;
|
|
58
55
|
private applyHydrateResult;
|
|
59
56
|
private purgeMapImagesForIconset;
|
|
60
57
|
onStyleImageMissing(e: {
|