@tak-ps/cloudtak 12.117.0 → 12.118.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.
@@ -3,10 +3,12 @@ import type { Component } from 'vue';
3
3
  import type { Router, RouteRecordRaw } from 'vue-router';
4
4
  import type { Pinia } from 'pinia';
5
5
  import type { MenuItemConfig } from './src/stores/modules/menu.ts';
6
+ import type { BottomBarItemConfig } from './src/stores/modules/bottombar.ts';
6
7
  import { type DBFeature } from './src/base/database.ts';
7
8
  import { type Observable } from 'rxjs';
8
9
  import mapgl from 'maplibre-gl';
9
10
  export type { MenuItemConfig };
11
+ export type { BottomBarItemConfig };
10
12
  export type { DBFeature };
11
13
  /**
12
14
  * Configuration stored with a floating pane created by the plugin API
@@ -173,4 +175,19 @@ export declare class PluginAPI {
173
175
  */
174
176
  has: (uid: string) => boolean;
175
177
  };
178
+ /**
179
+ * Manage the Map Status Bar
180
+ */
181
+ get bottomBar(): {
182
+ /**
183
+ * Add a component to the centre of the bottom status bar
184
+ * @param item The bottom bar item configuration
185
+ */
186
+ add: (item: BottomBarItemConfig) => void;
187
+ /**
188
+ * Remove a previously registered bottom bar component by key
189
+ * @param key The key of the item to remove
190
+ */
191
+ remove: (key: string) => void;
192
+ };
176
193
  }
@@ -32,6 +32,8 @@ export default class TAKNotification {
32
32
  static clear(): Promise<void>;
33
33
  static delete(id: string): Promise<void>;
34
34
  delete(): Promise<void>;
35
+ static existsByUrl(url: string): Promise<boolean>;
36
+ static countByType(type: NotificationType): Promise<number>;
35
37
  static count(): Promise<number>;
36
38
  static list(): Promise<DBNotification[]>;
37
39
  }
@@ -0,0 +1,16 @@
1
+ export type CoordMode = 'dd' | 'dm' | 'dms' | 'mgrs' | 'utm';
2
+ export declare const COORD_MODES: Array<{
3
+ value: CoordMode;
4
+ label: string;
5
+ title: string;
6
+ }>;
7
+ /**
8
+ * Format a lat/lng coordinate pair as a string in the given mode.
9
+ * @param lat - latitude in decimal degrees
10
+ * @param lng - longitude in decimal degrees
11
+ * @param mode - target format
12
+ * @param truncate - optional decimal precision for DD mode
13
+ */
14
+ export declare function formatCoordPair(lat: number, lng: number, mode: CoordMode, truncate?: number): string;
15
+ export declare function parseCoordPair(text: string, mode?: CoordMode): [number, number];
16
+ export declare function validateCoordPair(text: string, mode?: CoordMode): string;
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ mode: string;
3
+ mouseCoord: {
4
+ lat: number;
5
+ lng: number;
6
+ } | null;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "set-location": (...args: any[]) => void;
10
+ "to-location": (...args: any[]) => void;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ "onSet-location"?: ((...args: any[]) => any) | undefined;
13
+ "onTo-location"?: ((...args: any[]) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ mode: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "set-location": (...args: any[]) => void;
6
+ "to-location": (...args: any[]) => void;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onSet-location"?: ((...args: any[]) => any) | undefined;
9
+ "onTo-location"?: ((...args: any[]) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ coord: {
3
+ lat: number;
4
+ lng: number;
5
+ } | null;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -1,3 +1,4 @@
1
+ import { type CoordMode } from '../../../base/utils/coordinateFormat.ts';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  label: {
3
4
  type: StringConstructor;
@@ -18,7 +19,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
18
19
  };
19
20
  modes: {
20
21
  type: ArrayConstructor;
21
- default: () => string[];
22
+ default: () => CoordMode[];
22
23
  };
23
24
  modelValue: {
24
25
  type: ArrayConstructor;
@@ -27,6 +28,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
27
28
  };
28
29
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
30
  "update:modelValue": (...args: any[]) => void;
31
+ submit: (...args: any[]) => void;
30
32
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
31
33
  label: {
32
34
  type: StringConstructor;
@@ -47,7 +49,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
47
49
  };
48
50
  modes: {
49
51
  type: ArrayConstructor;
50
- default: () => string[];
52
+ default: () => CoordMode[];
51
53
  };
52
54
  modelValue: {
53
55
  type: ArrayConstructor;
@@ -56,6 +58,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
56
58
  };
57
59
  }>> & Readonly<{
58
60
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
61
+ onSubmit?: ((...args: any[]) => any) | undefined;
59
62
  }>, {
60
63
  label: string;
61
64
  hover: boolean;
@@ -1,5 +1,5 @@
1
1
  export type ChatMessage = {
2
- id: string;
2
+ id: string | number;
3
3
  sender_uid: string;
4
4
  sender?: string;
5
5
  message: string;
@@ -13,18 +13,22 @@ type __VLS_Props = {
13
13
  canSend?: boolean;
14
14
  canDelete?: boolean;
15
15
  multiselect?: boolean;
16
+ placeholder?: string;
16
17
  };
17
18
  declare function scrollToBottom(): void;
18
19
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
19
20
  scrollToBottom: typeof scrollToBottom;
20
21
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
- delete: (ids: string[]) => any;
22
+ delete: (ids: (string | number)[]) => any;
22
23
  send: (message: string) => any;
24
+ "at-bottom": (atBottom: boolean) => any;
23
25
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
- onDelete?: ((ids: string[]) => any) | undefined;
26
+ onDelete?: ((ids: (string | number)[]) => any) | undefined;
25
27
  onSend?: ((message: string) => any) | undefined;
28
+ "onAt-bottom"?: ((atBottom: boolean) => any) | undefined;
26
29
  }>, {
27
30
  loading: boolean;
31
+ placeholder: string;
28
32
  error: Error;
29
33
  canSend: boolean;
30
34
  canDelete: boolean;
@@ -1,13 +1,6 @@
1
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- email: {
3
- type: StringConstructor;
4
- required: true;
5
- };
6
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
- email: {
8
- type: StringConstructor;
9
- required: true;
10
- };
11
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ type __VLS_Props = {
2
+ email: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
5
  declare const _default: typeof __VLS_export;
13
6
  export default _default;
@@ -1,13 +1,6 @@
1
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- phone: {
3
- type: StringConstructor;
4
- required: true;
5
- };
6
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
- phone: {
8
- type: StringConstructor;
9
- required: true;
10
- };
11
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ type __VLS_Props = {
2
+ phone: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
5
  declare const _default: typeof __VLS_export;
13
6
  export default _default;
@@ -1,6 +1,7 @@
1
1
  import DrawTool from './modules/draw.ts';
2
2
  import IconManager from './modules/icons.ts';
3
3
  import MenuManager from './modules/menu.ts';
4
+ import BottomBarManager from './modules/bottombar.ts';
4
5
  import * as Comlink from 'comlink';
5
6
  import COT from '../base/cot.ts';
6
7
  import type { DatabaseType } from '../base/database.ts';
@@ -19,10 +20,11 @@ export type TAKNotification = {
19
20
  created: string;
20
21
  };
21
22
  export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
22
- _map?: any;
23
- _draw?: any;
24
- _icons?: any;
25
- _menu?: any;
23
+ _map?: mapgl.Map;
24
+ _draw?: DrawTool;
25
+ _icons?: IconManager;
26
+ _menu?: unknown;
27
+ _bottomBar?: unknown;
26
28
  _boundOnOnline?: () => void;
27
29
  _boundOnOffline?: () => void;
28
30
  _boundOnDeviceOrientation?: (event: DeviceOrientationEvent) => void;
@@ -34,7 +36,9 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
34
36
  callsign: string;
35
37
  zoom: string;
36
38
  location: LocationState;
39
+ locationAccuracy: number | undefined;
37
40
  distanceUnit: string;
41
+ coordFormat: string;
38
42
  manualLocationMode: boolean;
39
43
  isMobileDetected: boolean;
40
44
  gpsWatchId: number | null;
@@ -82,6 +86,7 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
82
86
  draw: () => DrawTool;
83
87
  icons: () => IconManager;
84
88
  menu: () => MenuManager;
89
+ bottomBar: () => BottomBarManager;
85
90
  }, {
86
91
  destroy: () => Promise<void>;
87
92
  getOverlayBeforeId: () => string | undefined;
@@ -0,0 +1,22 @@
1
+ import type { Component, Ref } from 'vue';
2
+ export type BottomBarItemConfig = {
3
+ /** Unique identifier for the item */
4
+ key: string;
5
+ /** Vue component rendered in the centre of the bottom status bar */
6
+ component: Component;
7
+ };
8
+ /**
9
+ * Manages plugin-registered components displayed in the centre of the map status bar
10
+ */
11
+ export default class BottomBarManager {
12
+ pluginItems: Ref<BottomBarItemConfig[]>;
13
+ constructor();
14
+ /**
15
+ * Add a component to the centre of the bottom status bar
16
+ */
17
+ addItem(item: BottomBarItemConfig): void;
18
+ /**
19
+ * Remove a previously registered bottom bar component by key
20
+ */
21
+ removeItem(key: string): void;
22
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/cloudtak",
3
3
  "type": "module",
4
- "version": "12.117.0",
4
+ "version": "12.118.0",
5
5
  "types": "dist/types/plugin.d.ts",
6
6
  "files": [
7
7
  "dist/types"
@@ -34,7 +34,7 @@
34
34
  "@tabler/core": "^1.4.0",
35
35
  "@tabler/icons-vue": "^3.0.0",
36
36
  "@tak-ps/node-cot": "^14.20.0",
37
- "@tak-ps/vue-tabler": "^4.10.0",
37
+ "@tak-ps/vue-tabler": "^4.12.1",
38
38
  "@turf/area": "^7.2.0",
39
39
  "@turf/bbox": "^7.1.0",
40
40
  "@turf/boolean-point-in-polygon": "^7.3.1",
@@ -63,7 +63,7 @@
63
63
  "hls.js": "^1.6.5",
64
64
  "imask": "^6.0.0",
65
65
  "jsonata": "^2.0.4",
66
- "maplibre-gl": "5.21.1",
66
+ "maplibre-gl": "5.22.0",
67
67
  "milsymbol": "^3.0.2",
68
68
  "moment": "^2.29.3",
69
69
  "openapi-fetch": "^0.17.0",
@@ -101,7 +101,7 @@
101
101
  "jsdom": "^29.0.0",
102
102
  "sass-embedded": "^1.86.0",
103
103
  "typedoc": "^0.28.1",
104
- "typescript": "^5.7.0",
104
+ "typescript": "^6.0.0",
105
105
  "typescript-eslint": "^8.20.0",
106
106
  "vite": "8.0.0",
107
107
  "vitest": "^4.1.0",