@tak-ps/cloudtak 12.55.0 → 12.94.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/cloudtak",
3
3
  "type": "module",
4
- "version": "12.55.0",
4
+ "version": "12.94.0",
5
5
  "types": "dist/types/plugin.d.ts",
6
6
  "files": [
7
7
  "dist/types"
@@ -20,15 +20,16 @@
20
20
  "check": "vue-tsc",
21
21
  "build:types": "vue-tsc -p tsconfig.build.json",
22
22
  "build": "vite build",
23
- "lint": "eslint ./src/ ./public/ ./plugins/",
23
+ "lint": "eslint --config eslint.config.js ./src/ ./public/ ./plugins/",
24
24
  "test": "exit 0"
25
25
  },
26
26
  "dependencies": {
27
+ "@mapbox/tile-cover": "^3.0.2",
27
28
  "@react-hookz/deep-equal": "^3.0.3",
28
29
  "@tabler/core": "^1.4.0",
29
30
  "@tabler/icons-vue": "^3.0.0",
30
- "@tak-ps/node-cot": "^14.0.0",
31
- "@tak-ps/vue-tabler": "^4.2.1",
31
+ "@tak-ps/node-cot": "^14.20.0",
32
+ "@tak-ps/vue-tabler": "^4.5.0",
32
33
  "@turf/area": "^7.2.0",
33
34
  "@turf/bbox": "^7.1.0",
34
35
  "@turf/boolean-point-in-polygon": "^7.3.1",
@@ -41,11 +42,10 @@
41
42
  "@turf/length": "^7.2.0",
42
43
  "@turf/meta": "^7.2.0",
43
44
  "@turf/point-on-feature": "^7.0.0",
44
- "@vueuse/core": "^13.0.0",
45
+ "@vueuse/core": "^14.0.0",
45
46
  "autosize": "^6.0.1",
46
47
  "comlink": "^4.4.2",
47
48
  "cronstrue": "^3.0.0",
48
- "deep-equal": "^2.2.3",
49
49
  "dexie": "^4.2.1",
50
50
  "dropzone": "^6.0.0-beta.2",
51
51
  "floating-vue": "^2.0.0-beta.17",
@@ -57,7 +57,7 @@
57
57
  "maplibre-gl": "^5.15.0",
58
58
  "milsymbol": "^3.0.2",
59
59
  "moment": "^2.29.3",
60
- "openapi-fetch": "^0.15.0",
60
+ "openapi-fetch": "^0.17.0",
61
61
  "p12-pem": "^1.0.5",
62
62
  "phone": "^3.1.59",
63
63
  "pinia": "^3.0.0",
@@ -66,36 +66,41 @@
66
66
  "swagger-ui-dist": "^5.30.2",
67
67
  "terra-draw": "^1.22.0",
68
68
  "terra-draw-maplibre-gl-adapter": "^1.1.1",
69
+ "terra-draw-route-snap-mode": "^0.4.1",
70
+ "terra-route": "^0.0.14",
69
71
  "uuid": "^13.0.0",
70
72
  "vue": "^3.2.31",
71
73
  "vue-component-type-helpers": "^3.0.7",
72
74
  "vue-mention": "^2.0.0-alpha.3",
73
- "vue-router": "^4.0.14"
75
+ "vue-router": "^5.0.0",
76
+ "yaml": "^2.8.2"
74
77
  },
75
78
  "devDependencies": {
76
- "@eslint/js": "^9.18.0",
79
+ "@eslint/js": "^10.0.0",
77
80
  "@testing-library/vue": "^8.1.0",
81
+ "@types/mapbox__tile-cover": "^3.0.4",
78
82
  "@types/sortablejs": "^1.15.8",
79
83
  "@types/swagger-ui": "^5.21.1",
80
84
  "@vitejs/plugin-vue": "^6.0.0",
81
- "@vitest/ui": "^4.0.0",
85
+ "@vitest/ui": "4.1.0-beta.5",
82
86
  "@vue/test-utils": "^2.4.6",
83
87
  "@vueuse/rxjs": "^14.1.0",
84
88
  "babel-preset-vite": "^1.1.3",
85
- "eslint": "^9.0.0",
89
+ "eslint": "^10.0.0",
86
90
  "eslint-plugin-vue": "^10.0.0",
91
+ "globals": "^17.3.0",
87
92
  "happy-dom": "^20.0.0",
88
- "jsdom": "^27.0.0",
93
+ "jsdom": "^28.0.0",
89
94
  "openapi-typescript": "^7.0.0",
90
95
  "sass-embedded": "^1.86.0",
91
96
  "typescript": "^5.7.0",
92
97
  "typescript-eslint": "^8.20.0",
93
- "vite": "^7.0.0",
94
- "vitest": "^4.0.0",
98
+ "vite": "8.0.0-beta.16",
99
+ "vitest": "4.1.0-beta.5",
95
100
  "vue-tsc": "^3.0.0-alpha.10"
96
101
  },
97
102
  "browserslist": [
98
103
  "> 1%",
99
104
  "last 2 versions"
100
105
  ]
101
- }
106
+ }
@@ -1,99 +0,0 @@
1
- import type { App } from 'vue';
2
- import type { Router, RouteRecordRaw } from 'vue-router';
3
- import type { Pinia } from 'pinia';
4
- import type { MenuItemConfig } from './src/stores/modules/menu.ts';
5
- import { type DBFeature } from './src/base/database.ts';
6
- import { type Observable } from 'rxjs';
7
- import mapgl from 'maplibre-gl';
8
- export type { MenuItemConfig };
9
- export interface PluginInstance {
10
- /**
11
- * Called after `install` if the server has the plugin enabled by default
12
- * or if the user has opted in to the plugin functionality
13
- */
14
- enable(): Promise<void>;
15
- /**
16
- * Called if the user disables the plugin, the plugin must
17
- * remove all functionality from the user facing app
18
- */
19
- disable(): Promise<void>;
20
- }
21
- export interface PluginStatic {
22
- /**
23
- * Hook called on init, note the plugin should not make itself
24
- * usable unless enable() is called.
25
- */
26
- install(app: App, api: PluginAPI): PluginInstance | Promise<PluginInstance>;
27
- }
28
- /**
29
- * The Main Plugin API for managing CloudTAK UI functions
30
- */
31
- export declare class PluginAPI {
32
- /**
33
- * The Vue App instance
34
- */
35
- app: App;
36
- /**
37
- * The Vue Router instance
38
- */
39
- router: Router;
40
- /**
41
- * The Pinia Store instance
42
- */
43
- pinia: Pinia;
44
- /**
45
- * @param app The Vue App instance
46
- * @param router The Vue Router instance
47
- * @param pinia The Pinia Store instance
48
- */
49
- constructor(app: App, router: Router, pinia: Pinia);
50
- /**
51
- * Manage the Main Menu
52
- */
53
- get menu(): {
54
- /**
55
- * Add a new item to the main menu
56
- * @param item The menu item configuration
57
- */
58
- add: (item: MenuItemConfig) => void;
59
- /**
60
- * Remove an item from the main menu
61
- * @param key The key of the menu item to remove
62
- */
63
- remove: (key: string) => void;
64
- };
65
- /**
66
- * Manage Application Routes
67
- */
68
- get routes(): {
69
- /**
70
- * Add a new route to the application
71
- * @param route The route configuration
72
- * @param parentName The name of the parent route to add this route to (optional)
73
- */
74
- add: (route: RouteRecordRaw, parentName?: string) => void;
75
- };
76
- /**
77
- * Map Accessors
78
- */
79
- get map(): mapgl.Map;
80
- /**
81
- * Manage Features
82
- */
83
- get feature(): {
84
- /**
85
- * List features from the local database
86
- * @param opts Filter options
87
- */
88
- list: (opts?: {
89
- filter?: (feature: DBFeature) => boolean;
90
- }) => Promise<DBFeature[]>;
91
- /**
92
- * Stream features from the local database
93
- * @param opts Filter options
94
- */
95
- stream: (opts?: {
96
- filter?: (feature: DBFeature) => boolean;
97
- }) => Observable<DBFeature[]>;
98
- };
99
- }
@@ -1,17 +0,0 @@
1
- import type { DBChatroomChat } from './database.ts';
2
- import type Atlas from '../workers/atlas.ts';
3
- export default class ChatroomChats {
4
- chatroom: string;
5
- constructor(chatroom: string);
6
- refresh(): Promise<void>;
7
- list(opts?: {
8
- refresh?: boolean;
9
- }): Promise<Array<DBChatroomChat>>;
10
- send(message: string, sender: {
11
- uid: string;
12
- callsign: string;
13
- }, worker: Atlas, recipient?: {
14
- uid: string;
15
- callsign: string;
16
- }): Promise<void>;
17
- }
@@ -1,47 +0,0 @@
1
- import type { DBChatroom } from './database.ts';
2
- import ChatroomChats from './chatroom-chats.ts';
3
- import type { ProfileChatroomList, ProfileChatList } from '../types.ts';
4
- /**
5
- * High Level Wrapper around the Profile Chatroom API
6
- *
7
- * @property {string} name - The name of the chatroom
8
- */
9
- export default class Chatroom {
10
- name: string;
11
- chats: ChatroomChats;
12
- constructor(name: string);
13
- /**
14
- * Return a Chatroom instance if one already exists in the local DB,
15
- */
16
- static from(name: string): Promise<Chatroom | undefined>;
17
- /**
18
- * Loads an existing Chatroom from the local DB and refresh it,
19
- *
20
- * @param name - The unique identifier for the chatroom
21
- * @param opts - Options for loading the chatroom
22
- * @param opts.reload - Whether to reload the chatroom from the local DB
23
- */
24
- static load(name: string, opts?: {
25
- reload?: boolean;
26
- }): Promise<Chatroom>;
27
- static delete(names: string[]): Promise<void>;
28
- /**
29
- * Reload the Chatroom from the local Database
30
- */
31
- reload(): Promise<void>;
32
- /**
33
- * Perform a hard refresh of the Chatroom from the Server
34
- */
35
- refresh(): Promise<void>;
36
- fetch(): Promise<void>;
37
- getChats(): Promise<ProfileChatList>;
38
- deleteChats(ids: string[]): Promise<void>;
39
- /**
40
- * List all locally stored chatrooms
41
- */
42
- static localList(): Promise<Set<{
43
- name: string;
44
- }>>;
45
- static list(filter?: string): Promise<DBChatroom[]>;
46
- static sync(): Promise<ProfileChatroomList>;
47
- }
@@ -1,94 +0,0 @@
1
- import type { Remote } from 'comlink';
2
- import type Atlas from '../workers/atlas.ts';
3
- import type { Feature, Subscription } from '../types.ts';
4
- import type { BBox as GeoJSONBBox, Feature as GeoJSONFeature, Geometry as GeoJSONGeometry } from 'geojson';
5
- export interface Origin {
6
- mode: OriginMode;
7
- mode_id?: string;
8
- }
9
- export declare enum OriginMode {
10
- CONNECTION = "Connection",
11
- MISSION = "Mission"
12
- }
13
- export declare const RENDERED_PROPERTIES: string[];
14
- export default class COT {
15
- id: string;
16
- instance: string;
17
- _path: string;
18
- _properties: Feature["properties"];
19
- _geometry: Feature["geometry"];
20
- _remote: BroadcastChannel | null;
21
- _atlas: Atlas | Remote<Atlas>;
22
- _username?: string;
23
- origin: Origin;
24
- static load(atlas: Atlas, feat: Feature, origin?: Origin, opts?: {
25
- skipSave?: boolean;
26
- remote?: boolean;
27
- }): Promise<COT>;
28
- constructor(atlas: Atlas | Remote<Atlas>, feat: Feature, origin?: Origin, opts?: {
29
- skipSave?: boolean;
30
- remote?: boolean;
31
- });
32
- /**
33
- * Begin listening for remote updates
34
- * This is a seperate function due to the issues outlined in: https://stackoverflow.com/q/70184129
35
- */
36
- reactivity(): void;
37
- set path(path: string);
38
- get path(): string;
39
- set properties(properties: Feature["properties"]);
40
- get properties(): Feature["properties"];
41
- set geometry(geometry: Feature["geometry"]);
42
- get geometry(): Feature["geometry"];
43
- /**
44
- * Update the COT and return a boolean as to whether the COT needs to be re-rendered
45
- */
46
- update(update: {
47
- path?: string;
48
- properties?: Feature["properties"];
49
- geometry?: Feature["geometry"];
50
- }, opts?: {
51
- skipSave?: boolean;
52
- }): Promise<boolean>;
53
- /**
54
- * Attempt to save the CoT to the database if necessary
55
- */
56
- save(): Promise<void>;
57
- get is_skittle(): boolean;
58
- get is_self(): boolean;
59
- get is_archivable(): boolean;
60
- /**
61
- * Determines if the COT type allows editing
62
- * But does not determine if a COT is part of a Misison Sync, if the mission allows editing
63
- */
64
- get is_editable(): boolean;
65
- subscription(): Promise<Subscription>;
66
- username(): Promise<string>;
67
- /**
68
- * Returns a proxy that will correctly call the internal update function if changes are made
69
- * Warning: Cannot be used with Vue3's reactivity system
70
- */
71
- as_proxy(): COT;
72
- as_feature(opts?: {
73
- clone?: boolean;
74
- }): Feature;
75
- as_rendered(): GeoJSONFeature<GeoJSONGeometry, Record<string, unknown>>;
76
- /**
77
- * The slimmer we can get the Features, the better
78
- * This returns the minium feature we need to actually style the COT in the vector tiles
79
- */
80
- static as_rendered(input: Feature): GeoJSONFeature<GeoJSONGeometry, Record<string, unknown>>;
81
- vectorId(): number;
82
- /**
83
- * string hash function to convert the COT ID into a number for use as a vector tile feature ID
84
- */
85
- static vectorId(id: string): number;
86
- length(): number;
87
- bounds(): GeoJSONBBox;
88
- flyTo(): Promise<void>;
89
- static style(feat: Feature): Promise<Feature>;
90
- /**
91
- * Consistent feature manipulation between add & update
92
- */
93
- static styleProperties(type: string, properties: Feature["properties"]): Promise<Feature["properties"]>;
94
- }
@@ -1,115 +0,0 @@
1
- import Dexie, { type EntityTable } from 'dexie';
2
- import type { Feature, Mission, MissionRole } from '../types.ts';
3
- export interface DBIcon {
4
- name: string;
5
- }
6
- export interface DBFeature {
7
- id: string;
8
- path: string;
9
- properties: Feature["properties"];
10
- geometry: Feature["geometry"];
11
- }
12
- export interface DBChatroom {
13
- id: string;
14
- name: string;
15
- created: string;
16
- updated: string;
17
- last_read: string | null;
18
- }
19
- export interface DBChatroomChat {
20
- id: string;
21
- chatroom: string;
22
- sender: string;
23
- sender_uid: string;
24
- message: string;
25
- created: string;
26
- }
27
- export interface DBIconset {
28
- uid: string;
29
- created: string;
30
- updated: string;
31
- version: number;
32
- name: string;
33
- username: string | null;
34
- default_group: string | null;
35
- default_friendly: string | null;
36
- default_hostile: string | null;
37
- default_neutral: string | null;
38
- default_unknown: string | null;
39
- skip_resize: boolean;
40
- }
41
- export interface DBFilter {
42
- id: string;
43
- external: string;
44
- name: string;
45
- source: string;
46
- internal: boolean;
47
- query: string;
48
- }
49
- export declare enum NotificationType {
50
- Contact = "Contact",
51
- Import = "Import",
52
- Alert = "Alert",
53
- Medical = "Medical",
54
- Mission = "Mission",
55
- Chat = "Chat"
56
- }
57
- export interface DBNotification {
58
- id: string;
59
- type: NotificationType;
60
- name: string;
61
- body: string;
62
- url: string;
63
- toast: boolean;
64
- read: boolean;
65
- created: string;
66
- }
67
- export interface DBVideo {
68
- id: string;
69
- created: string;
70
- updated: string;
71
- lease: number;
72
- username: string;
73
- }
74
- export interface DBSubscriptionFeature {
75
- id: string;
76
- path: string;
77
- mission: string;
78
- properties: Feature["properties"];
79
- geometry: Feature["geometry"];
80
- }
81
- export interface DBSubscription {
82
- guid: string;
83
- name: string;
84
- meta: Mission;
85
- role: MissionRole;
86
- token?: string;
87
- dirty: boolean;
88
- subscribed: boolean;
89
- }
90
- export interface DBSubscriptionLog {
91
- id: string;
92
- dtg?: string;
93
- missionNames: string[];
94
- created: string;
95
- servertime: string;
96
- mission: string;
97
- content: string;
98
- creatorUid: string;
99
- contentHashes: unknown[];
100
- keywords: string[];
101
- }
102
- export type DatabaseType = Dexie & {
103
- icon: EntityTable<DBIcon, 'name'>;
104
- iconset: EntityTable<DBIconset, 'uid'>;
105
- video: EntityTable<DBVideo, 'id'>;
106
- filter: EntityTable<DBFilter, 'id'>;
107
- feature: EntityTable<DBFeature, 'id'>;
108
- chatroom: EntityTable<DBChatroom, 'id'>;
109
- chatroom_chats: EntityTable<DBChatroomChat, 'id'>;
110
- notification: EntityTable<DBNotification, 'id'>;
111
- subscription: EntityTable<DBSubscription, 'guid'>;
112
- subscription_log: EntityTable<DBSubscriptionLog, 'id'>;
113
- subscription_feature: EntityTable<DBSubscriptionFeature, 'id'>;
114
- };
115
- export declare const db: DatabaseType;
@@ -1,30 +0,0 @@
1
- export declare enum WorkerMessageType {
2
- Map_FlyTo = "cloudtak:map:flyto",
3
- Map_FitBounds = "cloudtak:map:fitbounds",
4
- Map_Projection = "cloudtak:map:projection",
5
- Profile_Callsign = "cloudtak:profile:callsign",
6
- Profile_Display_Zoom = "cloudtak:profile:display:zoom",
7
- Profile_Icon_Rotation = "cloudtak:profile:icon:rotation",
8
- Profile_Distance_Unit = "cloudtak:profile:distance:unit",
9
- Profile_Location_Coordinates = "cloudtak:profile:location:coordinates",
10
- Profile_Location_Source = "cloudtak:profile:location:source",
11
- Feature_Archived_Added = "cloudtak:feature:archived:added",
12
- Feature_Archived_Removed = "cloudtak:feature:archived:removed",
13
- Channels_None = "channels:none",
14
- Channels_List = "channels:list",
15
- Contact_Change = "contact:change",
16
- Connection_Open = "connection:open",
17
- Connection_Close = "connection:close",
18
- Mission_Change_Feature = "mission:change:feature",
19
- Mission_Invite = "mission:invite"
20
- }
21
- export type WorkerMessage = {
22
- type: WorkerMessageType;
23
- body?: any;
24
- };
25
- export declare enum LocationState {
26
- Loading = 0,
27
- Disabled = 1,
28
- Preset = 2,
29
- Live = 3
30
- }
@@ -1,41 +0,0 @@
1
- import type { Feature } from '../types.ts';
2
- import jsonata from 'jsonata';
3
- /**
4
- * High Level Wrapper around the Data Filters
5
- *
6
- * TODO: Once all COTs are in IndexDB, apply the filter on to a new field in the COT
7
- * called "filtered": [ <filterid>, ... ] so we don't have to re-evaluate the filter each time
8
- *
9
- * @property {string} id - The unique identifier for the filter
10
- * @property {string} external - The external ID of the filter
11
- * @property {string} name - The name of the filter
12
- * @property {string} source - The source of the filter
13
- * @property {boolean} internal - Whether the filter is internal
14
- * @property {string} query - The JSONata query string for the filter
15
- */
16
- export default class Filter {
17
- id: string;
18
- external: string;
19
- name: string;
20
- source: string;
21
- internal: boolean;
22
- query: string;
23
- expression: jsonata.Expression;
24
- constructor(name: string, external: string, source: string, internal: boolean, query: string);
25
- test(feature: Feature): Promise<boolean>;
26
- static list(): Promise<Filter[]>;
27
- static from(id: string): Promise<Filter | null>;
28
- update(body: {
29
- name?: string;
30
- external?: string;
31
- source?: string;
32
- internal?: boolean;
33
- query?: string;
34
- }): Promise<void>;
35
- static create(name: string, external: string, source: string, internal: boolean, query: string): Promise<Filter>;
36
- delete(): Promise<void>;
37
- static delete(id: {
38
- id?: string;
39
- external?: string;
40
- }): Promise<void>;
41
- }
@@ -1,11 +0,0 @@
1
- import COT from '../base/cot.ts';
2
- import type Atlas from '../workers/atlas.ts';
3
- import type { Remote, TransferHandler } from 'comlink';
4
- import type { Feature } from '../types.ts';
5
- export declare class CloudTAKTransferHandler {
6
- atlas: Atlas | Remote<Atlas>;
7
- remote: boolean;
8
- constructor(atlas: Atlas | Remote<Atlas>, transferHandlers: Map<string, TransferHandler<unknown, unknown>>, remote: boolean);
9
- cots: TransferHandler<Set<COT>, Array<Feature>>;
10
- cot: TransferHandler<COT, Feature>;
11
- }
@@ -1,4 +0,0 @@
1
- export default class Icon {
2
- static has(icon: string): Promise<boolean>;
3
- static populate(icons: string[]): Promise<void>;
4
- }
@@ -1,37 +0,0 @@
1
- import { NotificationType } from './database.ts';
2
- import type { DBNotification } from './database.ts';
3
- export { NotificationType };
4
- export default class TAKNotification {
5
- id: string;
6
- type: NotificationType;
7
- name: string;
8
- body: string;
9
- url: string;
10
- created: string;
11
- toast: boolean;
12
- read: boolean;
13
- constructor(id: string, type: NotificationType, name: string, body: string, url: string, opts?: {
14
- read?: boolean;
15
- toast?: boolean;
16
- created?: string;
17
- });
18
- /**
19
- * Return a Notification instance if one already exists in the local DB,
20
- */
21
- static from(id: string): Promise<TAKNotification | null>;
22
- static create(type: NotificationType, name: string, body: string, url: string, toast?: boolean): Promise<TAKNotification>;
23
- static update(id: string, opts: {
24
- read?: boolean;
25
- toast?: boolean;
26
- }): Promise<void>;
27
- update(opts: {
28
- read?: boolean;
29
- toast?: boolean;
30
- }): Promise<void>;
31
- popup(): Promise<void>;
32
- static clear(): Promise<void>;
33
- static delete(id: string): Promise<void>;
34
- delete(): Promise<void>;
35
- static count(): Promise<number>;
36
- static list(): Promise<DBNotification[]>;
37
- }