@tak-ps/cloudtak 12.94.0 → 12.102.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 +156 -0
- package/dist/types/src/base/chatroom-chats.d.ts +19 -0
- package/dist/types/src/base/chatroom.d.ts +49 -0
- package/dist/types/src/base/config.d.ts +17 -0
- package/dist/types/src/base/contact.d.ts +14 -0
- package/dist/types/src/base/cot.d.ts +95 -0
- package/dist/types/src/base/database.d.ts +192 -0
- package/dist/types/src/base/events.d.ts +32 -0
- package/dist/types/src/base/filter.d.ts +41 -0
- package/dist/types/src/base/group.d.ts +27 -0
- package/dist/types/src/base/handler.d.ts +9 -0
- package/dist/types/src/base/icon.d.ts +4 -0
- package/dist/types/src/base/mission-template-logs.d.ts +9 -0
- package/dist/types/src/base/mission-template.d.ts +20 -0
- package/dist/types/src/base/notification.d.ts +37 -0
- package/dist/types/src/base/overlay.d.ts +94 -0
- package/dist/types/src/base/profile.d.ts +20 -0
- package/dist/types/src/base/server.d.ts +9 -0
- package/dist/types/src/base/subscription-changes.d.ts +18 -0
- package/dist/types/src/base/subscription-chat.d.ts +23 -0
- package/dist/types/src/base/subscription-contents.d.ts +27 -0
- package/dist/types/src/base/subscription-feature.d.ts +49 -0
- package/dist/types/src/base/subscription-log.d.ts +34 -0
- package/dist/types/src/base/subscription.d.ts +128 -0
- package/dist/types/src/base/utils/styles.d.ts +11 -0
- package/dist/types/src/base/validators.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/ActiveMission.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/CoTView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/DrawTools.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/GenericBottomPane.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Inputs/BufferInput.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/Inputs/CoordInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Inputs/GeoJSONInput.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/Inputs/RangeInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Inputs/RangeRingsInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/MainMenu.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/MainMenuContents.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Map.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/MapLoading.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Basemaps/EditModal.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Debugger.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Iconset/EditModal.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuBasemaps.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChannels.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChat.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChats.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuConnections.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuContacts.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeatView.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeatures.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFiles.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuHistory.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuIcon.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuIconset.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuIconsets.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImport.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImports.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuItemCard.vue.d.ts +103 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMission.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMissions.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlays.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackage.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackages.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutes.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutesNew.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettings.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsTokens.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideos.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideosRemote.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionChanges.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionChats.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionContents.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionCreate.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInfo.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayers.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLog.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLogs.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionUsers.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/PendingInvites.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/DeleteModal.vue.d.ts +39 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeCots.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeMission.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeVector.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Settings/TokenModal.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Notifications.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Query/Magnetic.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Reverse.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Query/Sun.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Weather.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/QueryView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/RadialMenu/RadialMenu.vue.d.ts +22 -0
- package/dist/types/src/components/CloudTAK/util/Breadcrumb.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/ChannelInfo.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/util/Contact.vue.d.ts +38 -0
- package/dist/types/src/components/CloudTAK/util/ContactPuck.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/Coordinate.vue.d.ts +67 -0
- package/dist/types/src/components/CloudTAK/util/CoordinateType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +122 -0
- package/dist/types/src/components/CloudTAK/util/DrawOverlay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/util/EmptyInfo.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/FeatureIcon.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/FeatureRow.vue.d.ts +81 -0
- package/dist/types/src/components/CloudTAK/util/FloatingAttachment.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/util/FloatingGeneric.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/util/FloatingPane.vue.d.ts +31 -0
- package/dist/types/src/components/CloudTAK/util/FloatingVideo.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/GenericChat.vue.d.ts +34 -0
- package/dist/types/src/components/CloudTAK/util/GenericSelect.vue.d.ts +34 -0
- package/dist/types/src/components/CloudTAK/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/Icons.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/JSONModal.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/Keywords.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/LineLength.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/MenuTemplate.vue.d.ts +89 -0
- package/dist/types/src/components/CloudTAK/util/MultipleSelect.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/NotificationIcon.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/NotificationToast.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PolygonArea.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/PropertyAttachments.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBattery.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBearing.vue.d.ts +58 -0
- package/dist/types/src/components/CloudTAK/util/PropertyCreator.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyDistance.vue.d.ts +54 -0
- package/dist/types/src/components/CloudTAK/util/PropertyElevation.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/PropertyEmail.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyGeofence.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/PropertyLinks.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMetadata.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMilSym.vue.d.ts +25 -0
- package/dist/types/src/components/CloudTAK/util/PropertyPhone.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertySensor.vue.d.ts +18 -0
- package/dist/types/src/components/CloudTAK/util/PropertySpeed.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/PropertyStyle.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyTimes.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/SearchBox.vue.d.ts +46 -0
- package/dist/types/src/components/CloudTAK/util/SelectFeats.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/SettingsCallsign.vue.d.ts +28 -0
- package/dist/types/src/components/CloudTAK/util/Share.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/ShareToMission.vue.d.ts +53 -0
- package/dist/types/src/components/CloudTAK/util/ShareToPackage.vue.d.ts +62 -0
- package/dist/types/src/components/CloudTAK/util/SlideDownHeader.vue.d.ts +41 -0
- package/dist/types/src/components/CloudTAK/util/StandardItem.vue.d.ts +18 -0
- package/dist/types/src/components/CloudTAK/util/Subscriptions.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/TagEntry.vue.d.ts +51 -0
- package/dist/types/src/components/CloudTAK/util/UserClientSelect.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/util/VideoLeaseSourceType.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/WarnChannels.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/WarnConfiguration.vue.d.ts +7 -0
- package/dist/types/src/components/Configure.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/AgencyBadge.vue.d.ts +8 -0
- package/dist/types/src/components/ETL/Connection/CertificateP12.vue.d.ts +13 -0
- package/dist/types/src/components/ETL/Connection/StatusDot.vue.d.ts +13 -0
- package/dist/types/src/components/ETL/Styling/Layer.vue.d.ts +24 -0
- package/dist/types/src/components/Login.vue.d.ts +7 -0
- package/dist/types/src/components/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/util/IconSelect.vue.d.ts +29 -0
- package/dist/types/src/components/util/StatusDot.vue.d.ts +8 -0
- package/dist/types/src/components/util/Upload.vue.d.ts +46 -0
- package/dist/types/src/components/util/UploadLogo.vue.d.ts +14 -0
- package/dist/types/src/router.d.ts +3 -0
- package/dist/types/src/std.d.ts +19 -0
- package/dist/types/src/stores/float.d.ts +42 -0
- package/dist/types/src/stores/map.d.ts +126 -0
- package/dist/types/src/stores/modules/draw.d.ts +61 -0
- package/dist/types/src/stores/modules/icons.d.ts +38 -0
- package/dist/types/src/stores/modules/menu.d.ts +39 -0
- package/dist/types/src/timediff.d.ts +1 -0
- package/dist/types/src/types.d.ts +169 -0
- package/dist/types/src/workers/atlas-breadcrumb.d.ts +65 -0
- package/dist/types/src/workers/atlas-connection.d.ts +14 -0
- package/dist/types/src/workers/atlas-database.d.ts +137 -0
- package/dist/types/src/workers/atlas-profile.d.ts +44 -0
- package/dist/types/src/workers/atlas.d.ts +18 -0
- package/package.json +12 -6
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import DrawTool from './modules/draw.ts';
|
|
2
|
+
import IconManager from './modules/icons.ts';
|
|
3
|
+
import MenuManager from './modules/menu.ts';
|
|
4
|
+
import * as Comlink from 'comlink';
|
|
5
|
+
import COT from '../base/cot.ts';
|
|
6
|
+
import type { DatabaseType } from '../base/database.ts';
|
|
7
|
+
import { LocationState } from '../base/events.ts';
|
|
8
|
+
import Overlay from '../base/overlay.ts';
|
|
9
|
+
import Subscription from '../base/subscription.ts';
|
|
10
|
+
import mapgl from 'maplibre-gl';
|
|
11
|
+
import type Atlas from '../workers/atlas.ts';
|
|
12
|
+
import type { Basemap, APIList, Feature, ConfigMap } from '../types.ts';
|
|
13
|
+
import type { LngLat, Point, MapGeoJSONFeature } from 'maplibre-gl';
|
|
14
|
+
export type TAKNotification = {
|
|
15
|
+
type: string;
|
|
16
|
+
name: string;
|
|
17
|
+
body: string;
|
|
18
|
+
url: string;
|
|
19
|
+
created: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
22
|
+
_map?: any;
|
|
23
|
+
_draw?: any;
|
|
24
|
+
_icons?: any;
|
|
25
|
+
_menu?: any;
|
|
26
|
+
_boundOnOnline?: () => void;
|
|
27
|
+
_boundOnOffline?: () => void;
|
|
28
|
+
_boundOnDeviceOrientation?: (event: DeviceOrientationEvent) => void;
|
|
29
|
+
_boundOnVisibilityChange?: () => Promise<void>;
|
|
30
|
+
db: DatabaseType;
|
|
31
|
+
channel: BroadcastChannel;
|
|
32
|
+
toImport: Feature[];
|
|
33
|
+
locked: Array<string>;
|
|
34
|
+
callsign: string;
|
|
35
|
+
zoom: string;
|
|
36
|
+
location: LocationState;
|
|
37
|
+
distanceUnit: string;
|
|
38
|
+
manualLocationMode: boolean;
|
|
39
|
+
isMobileDetected: boolean;
|
|
40
|
+
gpsWatchId: number | null;
|
|
41
|
+
toastOffset: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
permissions: {
|
|
46
|
+
location: boolean;
|
|
47
|
+
notification: boolean;
|
|
48
|
+
};
|
|
49
|
+
_rawWorker: Worker;
|
|
50
|
+
worker: Comlink.Remote<Atlas>;
|
|
51
|
+
mission: Subscription | undefined;
|
|
52
|
+
mapConfig: ConfigMap;
|
|
53
|
+
container?: HTMLElement;
|
|
54
|
+
hasTerrain: boolean;
|
|
55
|
+
hasSnapping: boolean;
|
|
56
|
+
hasNoChannels: boolean;
|
|
57
|
+
isTerrainEnabled: boolean;
|
|
58
|
+
isLoaded: boolean;
|
|
59
|
+
isOpen: boolean;
|
|
60
|
+
isOnline: boolean;
|
|
61
|
+
userOrientationMode: boolean;
|
|
62
|
+
pitch: number;
|
|
63
|
+
bearing: number;
|
|
64
|
+
selected: Map<string, COT>;
|
|
65
|
+
select: {
|
|
66
|
+
mode?: string;
|
|
67
|
+
feats: Array<COT | MapGeoJSONFeature>;
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
popup?: mapgl.Popup;
|
|
71
|
+
};
|
|
72
|
+
viewedFeature?: Feature | MapGeoJSONFeature;
|
|
73
|
+
radial: {
|
|
74
|
+
mode: string | undefined;
|
|
75
|
+
cot: Feature | MapGeoJSONFeature | undefined;
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
lngLat?: LngLat;
|
|
79
|
+
};
|
|
80
|
+
overlays: Array<Overlay>;
|
|
81
|
+
}, {
|
|
82
|
+
map: () => mapgl.Map;
|
|
83
|
+
draw: () => DrawTool;
|
|
84
|
+
icons: () => IconManager;
|
|
85
|
+
menu: () => MenuManager;
|
|
86
|
+
}, {
|
|
87
|
+
destroy: () => Promise<void>;
|
|
88
|
+
getOverlayBeforeId: () => string | undefined;
|
|
89
|
+
addOverlay: (overlay: Overlay) => void;
|
|
90
|
+
removeOverlay: (overlay: Overlay) => Promise<void>;
|
|
91
|
+
makeActiveMission: (mission?: Subscription) => Promise<void>;
|
|
92
|
+
getOverlayById(id: number): Overlay | null;
|
|
93
|
+
getOverlayByName(name: string): Overlay | null;
|
|
94
|
+
getOverlayByMode(mode: string, mode_id: string): Overlay | null;
|
|
95
|
+
listTerrain: () => Promise<APIList<Basemap>>;
|
|
96
|
+
addTerrain: () => Promise<void>;
|
|
97
|
+
removeTerrain: () => void;
|
|
98
|
+
returnHome: () => void;
|
|
99
|
+
/**
|
|
100
|
+
* Trigger a rerender of the underlying GeoJSON Features
|
|
101
|
+
*/
|
|
102
|
+
refresh: () => Promise<void>;
|
|
103
|
+
updateCOT: () => Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Given a mission Guid, attempt to refresh the Map Layer, loading the mission if it isn't already loaded
|
|
106
|
+
* @returns {boolean} True if successful, false if not
|
|
107
|
+
*/
|
|
108
|
+
loadMission: (guid: string, opts?: {
|
|
109
|
+
reload: boolean;
|
|
110
|
+
}) => Promise<Subscription | null>;
|
|
111
|
+
init: (container: HTMLElement) => Promise<void>;
|
|
112
|
+
startGPSWatch: () => void;
|
|
113
|
+
initOverlays: () => Promise<void>;
|
|
114
|
+
updateIconRotation: (enabled: boolean) => void;
|
|
115
|
+
updateDistanceUnit: (unit: string) => void;
|
|
116
|
+
updateAttribution: () => Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Determine if the feature is from the CoT store or a clicked VT feature
|
|
119
|
+
*/
|
|
120
|
+
featureSource: (feat: MapGeoJSONFeature | Feature) => string | void;
|
|
121
|
+
radialClick: (feat: MapGeoJSONFeature | Feature, opts: {
|
|
122
|
+
lngLat: LngLat;
|
|
123
|
+
point: Point;
|
|
124
|
+
mode?: string;
|
|
125
|
+
}) => Promise<void>;
|
|
126
|
+
}>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as terraDraw from 'terra-draw';
|
|
2
|
+
import { TerraRoute } from 'terra-route';
|
|
3
|
+
import { Routing } from 'terra-draw-route-snap-mode';
|
|
4
|
+
import type { GeoJSONFeatureId } from 'maplibre-gl';
|
|
5
|
+
import type COT from '../../base/cot.ts';
|
|
6
|
+
import type { paths } from '../../derived-types.ts';
|
|
7
|
+
type AugmentedBasemapResponse = paths['/api/basemap']['get']['responses']['200']['content']['application/json']['items'][0];
|
|
8
|
+
import type { LineString, FeatureCollection as GeoJSONFeatureCollection } from 'geojson';
|
|
9
|
+
import type { useMapStore } from '../map.ts';
|
|
10
|
+
export declare enum DrawToolMode {
|
|
11
|
+
STATIC = "static",
|
|
12
|
+
FREEHAND = "freehand",
|
|
13
|
+
SELECT = "select",
|
|
14
|
+
POINT = "point",
|
|
15
|
+
LINESTRING = "linestring",
|
|
16
|
+
SNAPPING = "routesnap",
|
|
17
|
+
POLYGON = "polygon",
|
|
18
|
+
RECTANGLE = "angled-rectangle",
|
|
19
|
+
CIRCLE = "circle",
|
|
20
|
+
SECTOR = "sector"
|
|
21
|
+
}
|
|
22
|
+
export default class DrawTool {
|
|
23
|
+
private draw;
|
|
24
|
+
editing: COT | null;
|
|
25
|
+
mode: DrawToolMode;
|
|
26
|
+
route: {
|
|
27
|
+
graph: Routing;
|
|
28
|
+
finder: TerraRoute & {
|
|
29
|
+
setNetwork: (network: GeoJSONFeatureCollection<LineString>) => void;
|
|
30
|
+
expandNetwork: (network: GeoJSONFeatureCollection<LineString>) => void;
|
|
31
|
+
};
|
|
32
|
+
tiles: Map<string, GeoJSONFeatureCollection<LineString>>;
|
|
33
|
+
zoom: number;
|
|
34
|
+
layer: string;
|
|
35
|
+
definitions: Map<string, AugmentedBasemapResponse>;
|
|
36
|
+
};
|
|
37
|
+
private mapStore;
|
|
38
|
+
snapping: Set<[number, number]>;
|
|
39
|
+
point: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
lasso: {
|
|
43
|
+
loading: boolean;
|
|
44
|
+
overlay: string;
|
|
45
|
+
};
|
|
46
|
+
snappingOptions: string[];
|
|
47
|
+
get snappingLayer(): string;
|
|
48
|
+
set snappingLayer(layer: string);
|
|
49
|
+
constructor(mapStore: ReturnType<typeof useMapStore>);
|
|
50
|
+
populateSnappingLayers(): Promise<void>;
|
|
51
|
+
updateGraph(opts?: {
|
|
52
|
+
expand?: boolean;
|
|
53
|
+
}): Promise<void>;
|
|
54
|
+
removeNetwork(): Promise<void>;
|
|
55
|
+
start(mode: DrawToolMode): Promise<void>;
|
|
56
|
+
stop(refresh?: boolean): Promise<void>;
|
|
57
|
+
edit(cot: COT): Promise<void>;
|
|
58
|
+
getFeature(id: GeoJSONFeatureId): terraDraw.GeoJSONStoreFeatures<terraDraw.GeoJSONStoreGeometries> | undefined;
|
|
59
|
+
removeFeature(id: GeoJSONFeatureId): void;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { type DBIconset } from '../../base/database.ts';
|
|
3
|
+
export default class IconManager {
|
|
4
|
+
private cache;
|
|
5
|
+
private map;
|
|
6
|
+
constructor(map: MapLibreMap);
|
|
7
|
+
static from(uid: string): Promise<DBIconset | undefined>;
|
|
8
|
+
addIconset(uid: string): Promise<void>;
|
|
9
|
+
removeIconset(uid: string): Promise<void>;
|
|
10
|
+
static sprites(): Promise<Array<{
|
|
11
|
+
id: string;
|
|
12
|
+
url: string;
|
|
13
|
+
}>>;
|
|
14
|
+
updateImages(): Promise<void>;
|
|
15
|
+
onStyleImageMissing(e: {
|
|
16
|
+
id: string;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Get or create a colored version of an icon
|
|
20
|
+
*/
|
|
21
|
+
getColoredIcon(iconId: string, color: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Create a colored version of an icon and add it to the map
|
|
24
|
+
*/
|
|
25
|
+
private createColoredIcon;
|
|
26
|
+
/**
|
|
27
|
+
* Replace white/light pixels with the target color
|
|
28
|
+
*/
|
|
29
|
+
private recolorWhitePixels;
|
|
30
|
+
/**
|
|
31
|
+
* Check if a pixel is considered "white" (should be recolored)
|
|
32
|
+
*/
|
|
33
|
+
private isWhitePixel;
|
|
34
|
+
/**
|
|
35
|
+
* Convert hex color to RGB values
|
|
36
|
+
*/
|
|
37
|
+
private hexToRgb;
|
|
38
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Component, Ref, ComputedRef } from "vue";
|
|
2
|
+
import type { Profile } from '../../types.ts';
|
|
3
|
+
export type MenuItemConfig = {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
route: string;
|
|
7
|
+
routeExternal?: boolean;
|
|
8
|
+
tooltip: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
icon: Component;
|
|
11
|
+
badge?: string;
|
|
12
|
+
visibility?: string;
|
|
13
|
+
requiresSystemAdmin?: boolean;
|
|
14
|
+
requiresAgencyAdmin?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Manage Pluggable Menu
|
|
18
|
+
*/
|
|
19
|
+
export default class MenuManager {
|
|
20
|
+
mapStore: any;
|
|
21
|
+
filter: Ref<string>;
|
|
22
|
+
preferredLayout: Ref<'list' | 'tiles'>;
|
|
23
|
+
onlineContactsCount: Ref<number>;
|
|
24
|
+
unreadChatsCount: Ref<number>;
|
|
25
|
+
isSystemAdmin: Ref<boolean>;
|
|
26
|
+
isAgencyAdmin: Ref<boolean>;
|
|
27
|
+
pluginMenuItems: Ref<MenuItemConfig[]>;
|
|
28
|
+
preferenceOrder: Ref<Profile['menu_order']>;
|
|
29
|
+
constructor(mapStore: any);
|
|
30
|
+
init(): Promise<void>;
|
|
31
|
+
get baseMenuItems(): MenuItemConfig[];
|
|
32
|
+
get items(): ComputedRef<MenuItemConfig[]>;
|
|
33
|
+
get filteredItems(): ComputedRef<MenuItemConfig[]>;
|
|
34
|
+
setLayout(mode: 'list' | 'tiles'): void;
|
|
35
|
+
addMenuItem(item: MenuItemConfig): void;
|
|
36
|
+
removeMenuItem(key: string): void;
|
|
37
|
+
setOrder(keys: string[]): Promise<void>;
|
|
38
|
+
setVisibility(key: string, visible: "full" | "partial" | "hidden"): Promise<void>;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (updated: string | number): string;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { paths } from './derived-types.js';
|
|
2
|
+
import type { Origin } from './base/cot.ts';
|
|
3
|
+
import type { Geometry } from 'geojson';
|
|
4
|
+
export type APIError = {
|
|
5
|
+
status: number;
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
export type APIList<T> = {
|
|
9
|
+
total: number;
|
|
10
|
+
items: Array<T>;
|
|
11
|
+
};
|
|
12
|
+
export type COTTypeList = paths["/api/type/cot"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
13
|
+
export type COTType = paths["/api/type/cot/{:type}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
14
|
+
export type Search = paths["/api/search"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
15
|
+
export type SearchSuggest = paths["/api/search/suggest"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
16
|
+
export type SearchForward = paths["/api/search/forward"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
17
|
+
export type VideoLease = paths["/api/video/lease/{:lease}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
18
|
+
export type VideoLeaseList = paths["/api/video/lease"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
19
|
+
export type VideoLeaseMetadata = paths["/api/video/lease/{:lease}/metadata"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
20
|
+
export type VideoLeaseProtocols = paths["/api/video/lease/{:lease}/metadata"]["get"]["responses"]["200"]["content"]["application/json"]["protocols"];
|
|
21
|
+
export type VideoLeaseResponse = paths["/api/video/lease/{:lease}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
22
|
+
export type Subscription = paths["/api/marti/subscription/{:clientuid}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
23
|
+
export type Group = paths["/api/marti/group"]["get"]["responses"]["200"]["content"]["application/json"]["data"][0];
|
|
24
|
+
export type GroupChannel = Omit<Group, 'direction'> & {
|
|
25
|
+
direction: string[];
|
|
26
|
+
};
|
|
27
|
+
export type User = paths["/api/user/{:username}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
28
|
+
export type UserList = paths["/api/user"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
29
|
+
export type Contact = paths["/api/marti/api/contacts/all"]["get"]["responses"]["200"]["content"]["application/json"][0];
|
|
30
|
+
export type ContactList = paths["/api/marti/api/contacts/all"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
31
|
+
export type Content = paths["/api/marti/package"]["put"]["responses"]["200"]["content"]["application/json"];
|
|
32
|
+
export type VideoConnection = paths["/api/marti/video/{:uid}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
33
|
+
export type VideoConnectionFeed = paths["/api/marti/video/{:uid}"]["get"]["responses"]["200"]["content"]["application/json"]["feeds"][0];
|
|
34
|
+
export type VideoConnection_Create = paths["/api/marti/video"]["post"]["requestBody"]["content"]["application/json"];
|
|
35
|
+
export type VideoConnectionList = paths["/api/marti/video"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
36
|
+
export type Mission = paths["/api/marti/missions/{:name}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
37
|
+
export type Mission_Create = paths["/api/marti/mission"]["post"]["requestBody"]["content"]["application/json"];
|
|
38
|
+
export type MissionList = paths["/api/marti/mission"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
39
|
+
export type MissionInvite = paths["/api/marti/mission"]["get"]["responses"]["200"]["content"]["application/json"]["invites"][0];
|
|
40
|
+
export type MissionRole = paths["/api/marti/missions/{:name}/role"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
41
|
+
export type MissionLog = paths["/api/marti/missions/{:name}/log/{:logid}"]["patch"]["responses"]["200"]["content"]["application/json"]["data"];
|
|
42
|
+
export type MissionLogList = paths["/api/marti/missions/{:name}/log"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
43
|
+
export type MissionLayer = paths["/api/marti/missions/{:name}/layer/{:layerid}"]["get"]["responses"]["200"]["content"]["application/json"]["data"];
|
|
44
|
+
export type MissionLayer_Create = paths["/api/marti/missions/{:name}/layer"]["post"]["requestBody"]["content"]["application/json"];
|
|
45
|
+
export type MissionLayer_Update = paths["/api/marti/missions/{:name}/layer/{:uid}"]["patch"]["requestBody"]["content"]["application/json"];
|
|
46
|
+
export type MissionLayerList = paths["/api/marti/missions/{:name}/layer"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
47
|
+
export type MissionChanges = paths["/api/marti/missions/{:name}/changes"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
48
|
+
export type MissionChange = MissionChanges["data"][0];
|
|
49
|
+
export type MissionSubscriptions = paths["/api/marti/missions/{:name}/subscriptions/roles"]["get"]["responses"]["200"]["content"]["application/json"]["data"];
|
|
50
|
+
export type Server_Update = paths["/api/server"]["patch"]["requestBody"]["content"]["application/json"];
|
|
51
|
+
export type Server = paths["/api/server"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
52
|
+
export type Login = paths["/api/login"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
53
|
+
export type Login_Create = paths["/api/login"]["post"]["requestBody"]["content"]["application/json"];
|
|
54
|
+
export type Login_CreateRes = paths["/api/login"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
55
|
+
export type Import = paths["/api/import/{:import}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
56
|
+
export type ImportList = paths["/api/import"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
57
|
+
export type Package = paths["/api/marti/package/{:uid}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
58
|
+
export type PackageList = paths["/api/marti/package"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
59
|
+
export type ServerAdminVideoList = paths["/api/server/video"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
60
|
+
export type Iconset = paths["/api/iconset/{:iconset}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
61
|
+
export type IconsetList = paths["/api/iconset"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
62
|
+
export type Icon = paths["/api/iconset/{:iconset}/icon/{:icon}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
63
|
+
export type IconList = paths["/api/icon"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
64
|
+
export type AttachmentList = paths["/api/attachment"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
65
|
+
export type Attachment = paths["/api/attachment"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
|
|
66
|
+
export type TileJSON = paths["/api/basemap/{:basemapid}/tiles"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
67
|
+
export type Basemap = paths["/api/basemap/{:basemapid}"]["patch"]["responses"]["200"]["content"]["application/json"];
|
|
68
|
+
export type BasemapList = paths["/api/basemap"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
69
|
+
export type Palette = paths["/api/palette/{:palette}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
70
|
+
export type Chat = {
|
|
71
|
+
chatroom: string;
|
|
72
|
+
messageId: string;
|
|
73
|
+
from: {
|
|
74
|
+
callsign: string;
|
|
75
|
+
uid: string;
|
|
76
|
+
};
|
|
77
|
+
message: string;
|
|
78
|
+
time: string;
|
|
79
|
+
};
|
|
80
|
+
export type APIProfileChat = {
|
|
81
|
+
id: number;
|
|
82
|
+
read: boolean;
|
|
83
|
+
username: string;
|
|
84
|
+
chatroom: string;
|
|
85
|
+
sender_callsign: string;
|
|
86
|
+
sender_uid: string;
|
|
87
|
+
created: string;
|
|
88
|
+
updated: string;
|
|
89
|
+
message_id: string;
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
export type PaletteList = paths["/api/palette"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
93
|
+
export type PaletteFeature = paths["/api/palette/{:palette}/feature/{:feature}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
94
|
+
export type MissionTemplate = paths["/api/template/mission/{:mission}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
95
|
+
export type MissionTemplateList = paths["/api/template/mission"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
96
|
+
export type MissionTemplateLog = paths["/api/template/mission/{:mission}/log/{:log}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
97
|
+
export type MissionTemplateLogList = paths["/api/template/mission/{:mission}/log"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
98
|
+
export type Profile = paths["/api/profile"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
99
|
+
export type Profile_Update = paths["/api/profile"]["patch"]["requestBody"]["content"]["application/json"];
|
|
100
|
+
export type ProfileChatroomList = paths["/api/profile/chatroom"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
101
|
+
export type ProfileChatList = paths["/api/profile/chatroom/{:chatroom}/chat"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
102
|
+
export type ProfileVideoList = paths["/api/profile/video"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
103
|
+
export type ProfileVideo = paths["/api/profile/video/{:id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
104
|
+
export type ProfileFileList = paths["/api/profile/asset"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
105
|
+
export type ProfileFile = ProfileFileList["items"][0];
|
|
106
|
+
export type Feature = Omit<paths["/api/profile/feature/{:id}"]["get"]["responses"]["200"]["content"]["application/json"], "geometry"> & {
|
|
107
|
+
origin?: Origin;
|
|
108
|
+
properties: {
|
|
109
|
+
'id': string;
|
|
110
|
+
'icon-opacity'?: number;
|
|
111
|
+
'circle-opacity'?: number;
|
|
112
|
+
[index: string]: unknown;
|
|
113
|
+
};
|
|
114
|
+
geometry: Geometry;
|
|
115
|
+
};
|
|
116
|
+
export type InputFeature = Omit<paths["/api/profile/feature/{:id}"]["get"]["responses"]["200"]["content"]["application/json"], "geometry"> & {
|
|
117
|
+
origin?: Origin;
|
|
118
|
+
properties: {
|
|
119
|
+
'id'?: string;
|
|
120
|
+
'icon-opacity'?: number;
|
|
121
|
+
'circle-opacity'?: number;
|
|
122
|
+
[index: string]: unknown;
|
|
123
|
+
};
|
|
124
|
+
geometry: Geometry;
|
|
125
|
+
};
|
|
126
|
+
export type FeaturePropertyCreator = Exclude<Feature["properties"]["creator"], undefined>;
|
|
127
|
+
export type FeatureCollection = {
|
|
128
|
+
type: string;
|
|
129
|
+
features: Array<Feature>;
|
|
130
|
+
};
|
|
131
|
+
export type ProfileOverlay = paths["/api/profile/overlay/{:overlay}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
132
|
+
export type ProfileOverlayList = paths["/api/profile/overlay"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
133
|
+
export type ProfileOverlay_Create = paths["/api/profile/overlay"]["post"]["requestBody"]["content"]["application/json"];
|
|
134
|
+
export type ProfileOverlay_Update = paths["/api/profile/overlay/{:overlay}"]["patch"]["requestBody"]["content"]["application/json"];
|
|
135
|
+
export type ProfileTokenList = paths["/api/profile/token"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
136
|
+
export type ProfileToken = ProfileTokenList["items"][0];
|
|
137
|
+
export type SearchReverse = paths["/api/search/reverse/{:longitude}/{:latitude}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
138
|
+
export type ETLLdapChannel = paths["/api/ldap/channel"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
|
|
139
|
+
export type ETLLdapChannelList = paths["/api/ldap/channel"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
140
|
+
export type ETLLdapUser = paths["/api/ldap/user"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
141
|
+
export type ETLConnectionList = paths["/api/connection"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
142
|
+
export type ETLConnection = paths["/api/connection/{:connectionid}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
143
|
+
export type ETLConnectionVideoLeaseList = paths["/api/connection/{:connectionid}/video/lease"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
144
|
+
export type ETLConnectionToken = paths["/api/connection/{:connectionid}/token"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
|
|
145
|
+
export type ETLConnectionTokenList = paths["/api/connection/{:connectionid}/token"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
146
|
+
export type ETLConnectionAssetList = paths["/api/connection/{:connectionid}/asset"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
147
|
+
export type ETLAgencyList = paths["/api/agency"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
148
|
+
export type ETLAgency = paths["/api/agency/{:agencyid}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
149
|
+
export type ETLLayer = paths["/api/connection/{:connectionid}/layer/{:layerid}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
150
|
+
export type ETLLayerList = paths["/api/connection/{:connectionid}/layer"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
151
|
+
export type ETLLayerTask = paths["/api/connection/{:connectionid}/layer/{:layerid}/task"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
152
|
+
export type ETLLayerTaskCapabilities = paths["/api/connection/{:connectionid}/layer/{:layerid}/task/capabilities"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
153
|
+
export type ETLLayerIncoming = paths["/api/connection/{:connectionid}/layer/{:layerid}/incoming"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
154
|
+
export type ETLLayerOutgoing = paths["/api/connection/{:connectionid}/layer/{:layerid}/outgoing"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
155
|
+
export type ETLData = paths["/api/connection/{:connectionid}/data/{:dataid}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
156
|
+
export type VideoService = paths["/api/video/service"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
157
|
+
export type InjectorList = paths["/api/server/injector"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
158
|
+
export type Injector = paths["/api/server/injector"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
|
|
159
|
+
export type RepeaterList = paths["/api/server/repeater"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
160
|
+
export type Repeater = paths["/api/server/repeater"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
|
|
161
|
+
export type ETLRawTaskList = {
|
|
162
|
+
total: number;
|
|
163
|
+
items: Record<string, string[]>;
|
|
164
|
+
};
|
|
165
|
+
export type ETLTaskVersions = paths["/api/task/raw/{:task}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
166
|
+
export type Config = paths["/api/config"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
167
|
+
export type ConfigLogin = paths["/api/config/login"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
168
|
+
export type ConfigMap = paths["/api/config/map"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
169
|
+
export type ConfigGroups = paths["/api/config/group"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type COT from '../base/cot.ts';
|
|
2
|
+
import type AtlasDatabase from './atlas-database.ts';
|
|
3
|
+
export default class AtlasBreadcrumb {
|
|
4
|
+
db: AtlasDatabase;
|
|
5
|
+
enabled: Set<string>;
|
|
6
|
+
pending: Map<string, number[]>;
|
|
7
|
+
constructor(db: AtlasDatabase);
|
|
8
|
+
/**
|
|
9
|
+
* Enable or disable live breadcrumb trail recording for a given CoT UID.
|
|
10
|
+
* When enabled, each incoming Point position update for that UID will
|
|
11
|
+
* incrementally extend a companion LineString stored under the ID
|
|
12
|
+
* `<uid>.track`.
|
|
13
|
+
*
|
|
14
|
+
* @param uid - The CoT UID to toggle
|
|
15
|
+
* @param enabled - True to start recording, false to stop (trail is kept)
|
|
16
|
+
*/
|
|
17
|
+
set(uid: string, enabled: boolean): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Returns whether live breadcrumb recording is currently enabled for the given UID
|
|
20
|
+
*/
|
|
21
|
+
get(uid: string): Promise<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns all CoT UIDs that currently have live breadcrumb recording enabled.
|
|
24
|
+
* Queries the persistent Dexie store so the result survives page reloads.
|
|
25
|
+
*/
|
|
26
|
+
listEnabled(): Promise<string[]>;
|
|
27
|
+
/**
|
|
28
|
+
* On startup, restore all persisted breadcrumb LineStrings from Dexie
|
|
29
|
+
* into the in-memory cots Map so they are rendered on the map.
|
|
30
|
+
* Also restores the in-memory `enabled` Set from entries that have live: true.
|
|
31
|
+
*/
|
|
32
|
+
load(): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Build the InputFeature used to add/update a breadcrumb in the cots Map.
|
|
35
|
+
*/
|
|
36
|
+
private _buildFeature;
|
|
37
|
+
/**
|
|
38
|
+
* Merge a set of historical coordinates into the `<uid>.track` LineString.
|
|
39
|
+
* Historical coordinates are prepended so the trail reads oldest → newest.
|
|
40
|
+
*
|
|
41
|
+
* Handles both orderings:
|
|
42
|
+
*
|
|
43
|
+
* • History loaded first, live enabled later — no existing track yet.
|
|
44
|
+
* The history seeds the LineString. If live was already enabled and one
|
|
45
|
+
* position has been buffered in `pending` (waiting for a second coord to
|
|
46
|
+
* form the initial LineString) it is flushed to the end of the seed so it
|
|
47
|
+
* is not lost. Subsequent live positions are appended normally by update().
|
|
48
|
+
* Note: if significant time passes between the last historical position and
|
|
49
|
+
* the first live position the rendered trail will include a straight
|
|
50
|
+
* connecting line across that gap — a LineString cannot represent breaks. *
|
|
51
|
+
* • Live enabled first, history loaded later — existing track already
|
|
52
|
+
* contains live positions. History is prepended. Any single pending coord
|
|
53
|
+
* is never reachable here (the status of pending is irrelevant once a
|
|
54
|
+
* track LineString exists).
|
|
55
|
+
*
|
|
56
|
+
* @param uid - The CoT UID whose trail should be updated
|
|
57
|
+
* @param coordinates - Ordered array of [lng, lat] (or [lng, lat, alt]) positions
|
|
58
|
+
*/
|
|
59
|
+
merge(uid: string, coordinates: number[][]): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Called after every add() to extend the breadcrumb LineString for a Point
|
|
62
|
+
* feature whose UID is in `enabled`.
|
|
63
|
+
*/
|
|
64
|
+
update(cot: COT): Promise<void>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type Atlas from './atlas.ts';
|
|
2
|
+
export default class AtlasConnection {
|
|
3
|
+
atlas: Atlas;
|
|
4
|
+
isDestroyed: boolean;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
ws: WebSocket | undefined;
|
|
7
|
+
reconnectAttempts: number;
|
|
8
|
+
version: string;
|
|
9
|
+
constructor(atlas: Atlas);
|
|
10
|
+
reconnect(connection: string): void;
|
|
11
|
+
connect(connection: string): void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
sendCOT(data: object, type?: string): void;
|
|
14
|
+
}
|