@tak-ps/cloudtak 13.23.0 → 13.25.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.
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/src/base/push.d.ts +17 -0
- package/dist/types/src/geolocate/main.d.ts +93 -0
- package/dist/types/src/stores/app.d.ts +2 -0
- package/dist/types/src/stores/device/camera.d.ts +0 -3
- package/dist/types/src/stores/device/geolocation.d.ts +6 -14
- package/dist/types/src/stores/device/notification.d.ts +7 -2
- package/dist/types/src/stores/device/orientation.d.ts +11 -6
- package/dist/types/src/stores/device/shared.d.ts +6 -0
- package/dist/types/src/stores/device.d.ts +14 -17
- package/dist/types/src/stores/map.d.ts +4 -1
- package/dist/types/src/stores/modules/icons.d.ts +18 -0
- package/package.json +4 -2
package/dist/types/plugin.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { MenuItemConfig } from './src/stores/modules/menu.ts';
|
|
|
6
6
|
import type { BottomBarItemConfig } from './src/stores/modules/bottombar.ts';
|
|
7
7
|
import { type DBFeature } from './src/database.ts';
|
|
8
8
|
import { type Observable } from 'rxjs';
|
|
9
|
-
import mapgl from 'maplibre-gl';
|
|
9
|
+
import * as mapgl from 'maplibre-gl';
|
|
10
10
|
export type { MenuItemConfig };
|
|
11
11
|
export type { BottomBarItemConfig };
|
|
12
12
|
export type { DBFeature };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register (or refresh) this device's FCM token as a `push` paging source.
|
|
3
|
+
* Safe to call repeatedly — it only writes to the server when the token
|
|
4
|
+
* changes. No-op on non-native platforms or when no token is available.
|
|
5
|
+
*
|
|
6
|
+
* Concurrent calls are serialized through an in-flight promise chain so that
|
|
7
|
+
* each caller awaits a real sync attempt (rather than being dropped while
|
|
8
|
+
* another sync is in progress). The stored-token comparison inside the sync
|
|
9
|
+
* coalesces redundant server writes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function syncPushToken(token: string | null): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Remove this device's locally tracked push registration. Used when a user
|
|
14
|
+
* deletes the current device's registration so it is not re-created on the
|
|
15
|
+
* next launch.
|
|
16
|
+
*/
|
|
17
|
+
export declare function forgetPushToken(token: string | null): Promise<void>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { Map as MapLibreMap, IControl, ControlPosition } from 'maplibre-gl';
|
|
2
|
+
export type GeolocateControlOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Draw a translucent circle representing the reported GPS accuracy.
|
|
5
|
+
* @defaultValue `true`
|
|
6
|
+
*/
|
|
7
|
+
showAccuracyCircle?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Draw the user location puck.
|
|
10
|
+
* @defaultValue `true`
|
|
11
|
+
*/
|
|
12
|
+
showUserLocation?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Draw a heading cone on the puck driven by the device compass.
|
|
15
|
+
* @defaultValue `true`
|
|
16
|
+
*/
|
|
17
|
+
showHeading?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Invoked when the user clicks the puck.
|
|
20
|
+
*/
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A MapLibre {@link IControl} that renders a live user-location puck (dot,
|
|
25
|
+
* accuracy circle and compass heading cone).
|
|
26
|
+
*
|
|
27
|
+
* Unlike the stock MapLibre `GeolocateControl`, this control does not own a
|
|
28
|
+
* geolocation watch. Position, accuracy and heading are pushed in via
|
|
29
|
+
* {@link GeolocateControl.setLocation} and {@link GeolocateControl.setHeading}
|
|
30
|
+
* so the existing CloudTAK location pipeline (Capacitor Geolocation in the
|
|
31
|
+
* device store) remains the single source of truth. The control renders a
|
|
32
|
+
* non-interactive puck only; recentring the camera is handled elsewhere.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* import GeolocateControl from './geolocate/main.ts';
|
|
37
|
+
*
|
|
38
|
+
* const control = new GeolocateControl();
|
|
39
|
+
* map.addControl(control, 'top-right');
|
|
40
|
+
* control.setLocation({ lng, lat }, accuracy);
|
|
41
|
+
* control.setHeading(headingDegrees);
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare class GeolocateControl implements IControl {
|
|
45
|
+
private readonly options;
|
|
46
|
+
private map?;
|
|
47
|
+
private container?;
|
|
48
|
+
private puckElement?;
|
|
49
|
+
private dotElement?;
|
|
50
|
+
private headingElement?;
|
|
51
|
+
private circleElement?;
|
|
52
|
+
private dotMarker?;
|
|
53
|
+
private accuracyMarker?;
|
|
54
|
+
private lastLngLat;
|
|
55
|
+
private accuracy;
|
|
56
|
+
private heading;
|
|
57
|
+
private color;
|
|
58
|
+
constructor(options?: GeolocateControlOptions);
|
|
59
|
+
onAdd(map: MapLibreMap): HTMLElement;
|
|
60
|
+
onRemove(): void;
|
|
61
|
+
getDefaultPosition(): ControlPosition;
|
|
62
|
+
/**
|
|
63
|
+
* Update the puck position and accuracy. Pass `null` to remove the puck
|
|
64
|
+
* (e.g. when location reporting is disabled).
|
|
65
|
+
*/
|
|
66
|
+
setLocation(position: {
|
|
67
|
+
lng: number;
|
|
68
|
+
lat: number;
|
|
69
|
+
} | null, accuracy?: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* Update the compass heading (degrees clockwise from true north) used to
|
|
72
|
+
* orient the puck's heading cone. Pass `null` to hide the cone.
|
|
73
|
+
*/
|
|
74
|
+
setHeading(heading: number | null): void;
|
|
75
|
+
/**
|
|
76
|
+
* Set the puck colour from a TAK team/group name (e.g. `"Cyan"`). Unknown or
|
|
77
|
+
* missing teams fall back to white, matching the rendered self CoT marker.
|
|
78
|
+
*/
|
|
79
|
+
setTeam(team?: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Set the puck colour directly as a `#rrggbb` hex string.
|
|
82
|
+
*/
|
|
83
|
+
setColor(color: string): void;
|
|
84
|
+
private setupMarkers;
|
|
85
|
+
private render;
|
|
86
|
+
private updateCircleRadius;
|
|
87
|
+
private updateHeadingRotation;
|
|
88
|
+
private onMapUpdate;
|
|
89
|
+
private applyColor;
|
|
90
|
+
private static rgba;
|
|
91
|
+
private static injectStyles;
|
|
92
|
+
}
|
|
93
|
+
export default GeolocateControl;
|
|
@@ -15,7 +15,9 @@ export declare const useAppStore: import("pinia").StoreDefinition<"cloudtak-app"
|
|
|
15
15
|
persistSession(opts: {
|
|
16
16
|
token: string;
|
|
17
17
|
username: string;
|
|
18
|
+
session: string;
|
|
18
19
|
}): Promise<void>;
|
|
20
|
+
getSessionId(): Promise<string | undefined>;
|
|
19
21
|
getUsername(): Promise<string | undefined>;
|
|
20
22
|
clearSession(): Promise<void>;
|
|
21
23
|
destroySession(): Promise<void>;
|
|
@@ -2,9 +2,6 @@ import type { DevicePermissionContext } from './types.ts';
|
|
|
2
2
|
export declare class CameraPermission {
|
|
3
3
|
private readonly context;
|
|
4
4
|
constructor(context: DevicePermissionContext);
|
|
5
|
-
private static normalizeNativeCameraPermission;
|
|
6
|
-
static checkNativeCameraPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
|
|
7
|
-
static requestNativeCameraPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
|
|
8
5
|
refreshStatus(): Promise<void>;
|
|
9
6
|
request(): Promise<void>;
|
|
10
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Position } from '@capacitor/geolocation';
|
|
2
2
|
import type { DevicePermissionContext } from './types.ts';
|
|
3
3
|
export declare class GeolocationPermission {
|
|
4
4
|
private readonly context;
|
|
@@ -6,21 +6,13 @@ export declare class GeolocationPermission {
|
|
|
6
6
|
private watchId;
|
|
7
7
|
private backgroundWatchActive;
|
|
8
8
|
private locationCallback;
|
|
9
|
-
private static normalizeNativeLocationPermission;
|
|
10
9
|
static supportsLocationRequests(): boolean;
|
|
11
|
-
static checkNativeLocationPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
|
|
12
|
-
static requestNativeLocationPermission(): Promise<PermissionState | 'prompt' | 'unknown'>;
|
|
13
|
-
static getCurrentLocation(options?: PositionOptions): Promise<Position>;
|
|
14
|
-
static watchLocation(options: PositionOptions, callback: (position: Position | null, err?: unknown) => void): Promise<CallbackID>;
|
|
15
|
-
static startBackgroundLocation(callback: (position: Position | null, err?: unknown) => void): Promise<void>;
|
|
16
|
-
static clearLocationWatch(id: CallbackID): Promise<void>;
|
|
17
|
-
static stopBackgroundLocation(): Promise<void>;
|
|
18
|
-
private static backgroundLocationToPosition;
|
|
19
|
-
stopWatch(): Promise<void>;
|
|
20
|
-
startWatch(onLocation: (position: Position) => void): Promise<void>;
|
|
21
|
-
private startForegroundWatch;
|
|
22
|
-
private startBackgroundWatch;
|
|
23
10
|
refreshStatus(): Promise<void>;
|
|
24
11
|
request(onGranted?: () => void): Promise<void>;
|
|
25
12
|
initializeSubscription(onGranted?: () => void): Promise<void>;
|
|
13
|
+
startWatch(onLocation: (position: Position) => void): Promise<void>;
|
|
14
|
+
stopWatch(): Promise<void>;
|
|
15
|
+
private startForegroundWatch;
|
|
16
|
+
private startBackgroundWatch;
|
|
17
|
+
private static backgroundLocationToPosition;
|
|
26
18
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type { DevicePermissionContext } from './types.ts';
|
|
2
2
|
export declare class BrowserNotificationPermission {
|
|
3
3
|
private readonly context;
|
|
4
|
-
private static normalizeNotificationPermission;
|
|
5
|
-
private static normalizeNativeNotificationPermission;
|
|
6
4
|
private static supportsNotifications;
|
|
7
5
|
private messagingToken;
|
|
8
6
|
private tokenListener;
|
|
7
|
+
private readonly tokenSubscribers;
|
|
9
8
|
constructor(context: DevicePermissionContext);
|
|
9
|
+
private setMessagingToken;
|
|
10
|
+
/**
|
|
11
|
+
* Subscribe to FCM token changes (initial registration and rotations).
|
|
12
|
+
* Returns a function that removes the subscription.
|
|
13
|
+
*/
|
|
14
|
+
onToken(listener: (token: string | null) => void): () => void;
|
|
10
15
|
refreshStatus(): Promise<void>;
|
|
11
16
|
request(): Promise<void>;
|
|
12
17
|
initializeSubscription(): Promise<void>;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import type { DevicePermissionContext } from './types.ts';
|
|
2
|
-
type DeviceOrientationEventName = 'deviceorientationabsolute' | 'deviceorientation';
|
|
3
2
|
export declare class OrientationPermission {
|
|
4
3
|
private readonly context;
|
|
5
4
|
constructor(context: DevicePermissionContext);
|
|
6
5
|
hasSupport(): boolean;
|
|
7
6
|
hasPermissionRequest(): boolean;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Register a listener that fires with the compass heading (degrees clockwise
|
|
9
|
+
* from true/magnetic north, 0–360) whenever the device orientation changes.
|
|
10
|
+
* On native (iOS/Android) the @capgo/capacitor-compass plugin is used; on
|
|
11
|
+
* web the DeviceOrientationEvent fallback is used.
|
|
12
|
+
*
|
|
13
|
+
* Returns an async cleanup function — call it to stop listening.
|
|
14
|
+
*/
|
|
15
|
+
addListener(callback: (heading: number | null) => void): Promise<() => Promise<void>>;
|
|
12
16
|
refreshStatus(): Promise<void>;
|
|
13
17
|
request(): Promise<void>;
|
|
18
|
+
private webGetEventName;
|
|
19
|
+
private webGetHeading;
|
|
14
20
|
}
|
|
15
|
-
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import type { BrowserPermissionState } from './types.ts';
|
|
1
2
|
export declare class PermissionQuery {
|
|
2
3
|
static hasPermissionQuery(): boolean;
|
|
3
4
|
static queryPermissionStatus(name: string, warning: string): Promise<PermissionStatus | null>;
|
|
4
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Normalize a native plugin or web permission state into a BrowserPermissionState.
|
|
8
|
+
* Handles Capacitor's `prompt-with-rationale` and the web Notification API's `default`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function normalizePermissionState(state: string | null | undefined): BrowserPermissionState;
|
|
@@ -21,8 +21,8 @@ export declare const useDeviceStore: import("pinia").StoreDefinition<"device", P
|
|
|
21
21
|
notification: BrowserPermissionState;
|
|
22
22
|
orientation: BrowserPermissionState;
|
|
23
23
|
location: BrowserPermissionState;
|
|
24
|
-
camera: BrowserPermissionState;
|
|
25
24
|
storage: BrowserPermissionState;
|
|
25
|
+
camera: BrowserPermissionState;
|
|
26
26
|
wakeLock: BrowserPermissionState;
|
|
27
27
|
fileSystem: BrowserPermissionState;
|
|
28
28
|
};
|
|
@@ -39,12 +39,11 @@ export declare const useDeviceStore: import("pinia").StoreDefinition<"device", P
|
|
|
39
39
|
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
40
40
|
hasOrientationSupport: () => boolean;
|
|
41
41
|
hasOrientationPermissionRequest: () => boolean;
|
|
42
|
-
getOrientationEventName: () => "deviceorientationabsolute" | "deviceorientation";
|
|
43
|
-
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
44
|
-
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
45
|
-
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
46
42
|
refreshLocationPermissionStatus: () => Promise<void>;
|
|
47
43
|
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
44
|
+
getMessagingToken: () => string | null;
|
|
45
|
+
refreshMessagingToken: () => Promise<string | null>;
|
|
46
|
+
onMessagingToken: (listener: (token: string | null) => void) => () => void;
|
|
48
47
|
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
49
48
|
refreshStoragePermissionStatus: () => Promise<void>;
|
|
50
49
|
refreshCameraPermissionStatus: () => Promise<void>;
|
|
@@ -58,13 +57,13 @@ export declare const useDeviceStore: import("pinia").StoreDefinition<"device", P
|
|
|
58
57
|
requestWakeLockPermission: () => Promise<void>;
|
|
59
58
|
requestFileSystemPermission: () => Promise<void>;
|
|
60
59
|
releaseWakeLockSentinel: () => Promise<void>;
|
|
61
|
-
}, "notification" | "orientation" | "
|
|
60
|
+
}, "notification" | "orientation" | "storage" | "camera" | "wakeLock" | "fileSystem" | "permissions" | "geolocation" | "network">, Pick<{
|
|
62
61
|
permissions: {
|
|
63
62
|
notification: BrowserPermissionState;
|
|
64
63
|
orientation: BrowserPermissionState;
|
|
65
64
|
location: BrowserPermissionState;
|
|
66
|
-
camera: BrowserPermissionState;
|
|
67
65
|
storage: BrowserPermissionState;
|
|
66
|
+
camera: BrowserPermissionState;
|
|
68
67
|
wakeLock: BrowserPermissionState;
|
|
69
68
|
fileSystem: BrowserPermissionState;
|
|
70
69
|
};
|
|
@@ -81,12 +80,11 @@ export declare const useDeviceStore: import("pinia").StoreDefinition<"device", P
|
|
|
81
80
|
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
82
81
|
hasOrientationSupport: () => boolean;
|
|
83
82
|
hasOrientationPermissionRequest: () => boolean;
|
|
84
|
-
getOrientationEventName: () => "deviceorientationabsolute" | "deviceorientation";
|
|
85
|
-
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
86
|
-
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
87
|
-
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
88
83
|
refreshLocationPermissionStatus: () => Promise<void>;
|
|
89
84
|
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
85
|
+
getMessagingToken: () => string | null;
|
|
86
|
+
refreshMessagingToken: () => Promise<string | null>;
|
|
87
|
+
onMessagingToken: (listener: (token: string | null) => void) => () => void;
|
|
90
88
|
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
91
89
|
refreshStoragePermissionStatus: () => Promise<void>;
|
|
92
90
|
refreshCameraPermissionStatus: () => Promise<void>;
|
|
@@ -105,8 +103,8 @@ export declare const useDeviceStore: import("pinia").StoreDefinition<"device", P
|
|
|
105
103
|
notification: BrowserPermissionState;
|
|
106
104
|
orientation: BrowserPermissionState;
|
|
107
105
|
location: BrowserPermissionState;
|
|
108
|
-
camera: BrowserPermissionState;
|
|
109
106
|
storage: BrowserPermissionState;
|
|
107
|
+
camera: BrowserPermissionState;
|
|
110
108
|
wakeLock: BrowserPermissionState;
|
|
111
109
|
fileSystem: BrowserPermissionState;
|
|
112
110
|
};
|
|
@@ -123,12 +121,11 @@ export declare const useDeviceStore: import("pinia").StoreDefinition<"device", P
|
|
|
123
121
|
initializePermissionSubscriptions: (onLocationGranted?: () => void) => Promise<void>;
|
|
124
122
|
hasOrientationSupport: () => boolean;
|
|
125
123
|
hasOrientationPermissionRequest: () => boolean;
|
|
126
|
-
getOrientationEventName: () => "deviceorientationabsolute" | "deviceorientation";
|
|
127
|
-
getOrientationHeading: (event: DeviceOrientationEvent) => number | null;
|
|
128
|
-
addOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
129
|
-
removeOrientationListener: (listener: (event: DeviceOrientationEvent) => void) => void;
|
|
130
124
|
refreshLocationPermissionStatus: () => Promise<void>;
|
|
131
125
|
refreshNotificationPermissionStatus: () => Promise<void>;
|
|
126
|
+
getMessagingToken: () => string | null;
|
|
127
|
+
refreshMessagingToken: () => Promise<string | null>;
|
|
128
|
+
onMessagingToken: (listener: (token: string | null) => void) => () => void;
|
|
132
129
|
refreshOrientationPermissionStatus: () => Promise<void>;
|
|
133
130
|
refreshStoragePermissionStatus: () => Promise<void>;
|
|
134
131
|
refreshCameraPermissionStatus: () => Promise<void>;
|
|
@@ -142,4 +139,4 @@ export declare const useDeviceStore: import("pinia").StoreDefinition<"device", P
|
|
|
142
139
|
requestWakeLockPermission: () => Promise<void>;
|
|
143
140
|
requestFileSystemPermission: () => Promise<void>;
|
|
144
141
|
releaseWakeLockSentinel: () => Promise<void>;
|
|
145
|
-
}, "setPermissionStatus" | "refreshPermissionStatuses" | "initializePermissionSubscriptions" | "hasOrientationSupport" | "hasOrientationPermissionRequest" | "
|
|
142
|
+
}, "setPermissionStatus" | "refreshPermissionStatuses" | "initializePermissionSubscriptions" | "hasOrientationSupport" | "hasOrientationPermissionRequest" | "refreshLocationPermissionStatus" | "refreshNotificationPermissionStatus" | "getMessagingToken" | "refreshMessagingToken" | "onMessagingToken" | "refreshOrientationPermissionStatus" | "refreshStoragePermissionStatus" | "refreshCameraPermissionStatus" | "refreshWakeLockPermissionStatus" | "refreshFileSystemPermissionStatus" | "requestLocationPermission" | "requestNotificationPermission" | "requestOrientationPermission" | "requestStoragePermission" | "requestCameraPermission" | "requestWakeLockPermission" | "requestFileSystemPermission" | "releaseWakeLockSentinel">>;
|
|
@@ -24,9 +24,10 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
24
24
|
_icons?: IconManager;
|
|
25
25
|
_menu?: unknown;
|
|
26
26
|
_bottomBar?: unknown;
|
|
27
|
-
|
|
27
|
+
_removeOrientationListener?: () => Promise<void>;
|
|
28
28
|
_boundOnVisibilityChange?: () => Promise<void>;
|
|
29
29
|
_removeBackgroundStateListener?: () => void;
|
|
30
|
+
_removePushTokenListener?: () => void;
|
|
30
31
|
channel: BroadcastChannel;
|
|
31
32
|
toImport: Feature[];
|
|
32
33
|
locked: Array<string>;
|
|
@@ -88,6 +89,8 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
88
89
|
worker: () => Comlink.Remote<Atlas>;
|
|
89
90
|
}, {
|
|
90
91
|
startLocationWatch: () => Promise<void>;
|
|
92
|
+
syncGeolocateControl: () => void;
|
|
93
|
+
openSelfFeature: () => Promise<void>;
|
|
91
94
|
startWorker: () => void;
|
|
92
95
|
destroy: () => Promise<void>;
|
|
93
96
|
makeActiveMission: (mission?: Subscription) => Promise<void>;
|
|
@@ -62,6 +62,24 @@ export default class IconManager {
|
|
|
62
62
|
* MapLibre. Falls back to a generic point icon when the icon isn't cached.
|
|
63
63
|
*/
|
|
64
64
|
private loadIconsetImage;
|
|
65
|
+
/**
|
|
66
|
+
* Decode an iconset blob into an `ImageBitmap`.
|
|
67
|
+
*
|
|
68
|
+
* Raster formats (PNG/JPEG/...) decode directly via `createImageBitmap`.
|
|
69
|
+
* SVG blobs need special handling: `createImageBitmap` cannot decode
|
|
70
|
+
* `image/svg+xml` blobs in some browsers (notably Firefox, which rejects
|
|
71
|
+
* with a `DOMException`), so those are rasterized through an
|
|
72
|
+
* `HTMLImageElement` + `<canvas>` instead.
|
|
73
|
+
*/
|
|
74
|
+
private decodeIconBlob;
|
|
75
|
+
/**
|
|
76
|
+
* Rasterize an SVG blob into an `ImageBitmap` via an `HTMLImageElement`
|
|
77
|
+
* drawn onto a `<canvas>`. Many iconset SVGs only declare a `viewBox` and
|
|
78
|
+
* no intrinsic `width`/`height`; without an explicit size browsers fall
|
|
79
|
+
* back to a 300x150 default, so the size is derived from the viewBox and
|
|
80
|
+
* set explicitly before rasterizing.
|
|
81
|
+
*/
|
|
82
|
+
private decodeSvgBlob;
|
|
65
83
|
private reloadIconsetImages;
|
|
66
84
|
private reloadRequestedIconsetImage;
|
|
67
85
|
private removeRequestedImagesForIconset;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tak-ps/cloudtak",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "13.
|
|
4
|
+
"version": "13.25.1",
|
|
5
5
|
"types": "dist/types/plugin.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist/types"
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@capacitor/preferences": "^8.0.1",
|
|
44
44
|
"@capacitor/status-bar": "^8.0.2",
|
|
45
45
|
"@capgo/background-geolocation": "^8.0.39",
|
|
46
|
+
"@capgo/capacitor-compass": "^8.1.17",
|
|
46
47
|
"@mapbox/tile-cover": "^3.0.2",
|
|
47
48
|
"@simplewebauthn/browser": "^13.3.0",
|
|
48
49
|
"@tabler/core": "^1.4.0",
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
"hls.js": "^1.6.5",
|
|
82
83
|
"imask": "^6.0.0",
|
|
83
84
|
"jsonata": "^2.0.4",
|
|
84
|
-
"maplibre-gl": "
|
|
85
|
+
"maplibre-gl": "v6.0.0-17",
|
|
85
86
|
"milsymbol": "^3.0.2",
|
|
86
87
|
"openapi-fetch": "^0.17.0",
|
|
87
88
|
"phone": "^3.1.59",
|
|
@@ -96,6 +97,7 @@
|
|
|
96
97
|
"uuid": "^14.0.0",
|
|
97
98
|
"vue": "^3.2.31",
|
|
98
99
|
"vue-component-type-helpers": "^3.0.7",
|
|
100
|
+
"vue-eslint-parser": "^10.4.1",
|
|
99
101
|
"vue-mention": "^2.0.0-alpha.3",
|
|
100
102
|
"vue-router": "^5.0.0",
|
|
101
103
|
"yaml": "^2.8.2"
|