@tak-ps/cloudtak 13.76.0 → 13.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/src/base/overlay-class.d.ts +9 -1
- package/dist/types/src/base/overlay.d.ts +2 -3
- package/dist/types/src/stores/map.d.ts +3 -2
- package/dist/types/src/stores/modules/tilejson.d.ts +10 -0
- package/dist/types/src/types.d.ts +1 -0
- package/dist/types/src/utils/tilejson.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ProfileOverlay, ProfileOverlay_Create } from '../types.ts';
|
|
2
2
|
import type { LayerSpecification, MapLayerMouseEvent } from 'maplibre-gl';
|
|
3
3
|
import { type DBOverlay } from '../database.ts';
|
|
4
|
+
import { type OverlayTileJSON } from '../stores/modules/tilejson.ts';
|
|
4
5
|
export default class Overlay {
|
|
5
6
|
_destroyed: boolean;
|
|
6
7
|
_internal: boolean;
|
|
@@ -37,6 +38,7 @@ export default class Overlay {
|
|
|
37
38
|
url?: string;
|
|
38
39
|
styles: Array<LayerSpecification>;
|
|
39
40
|
token: string | null;
|
|
41
|
+
tilejson: OverlayTileJSON | null;
|
|
40
42
|
static create(body: ProfileOverlay | ProfileOverlay_Create, opts?: {
|
|
41
43
|
internal?: boolean;
|
|
42
44
|
skipSave?: boolean;
|
|
@@ -64,6 +66,12 @@ export default class Overlay {
|
|
|
64
66
|
internal?: boolean;
|
|
65
67
|
});
|
|
66
68
|
healthy(): boolean;
|
|
69
|
+
isTiled(): boolean;
|
|
70
|
+
private sourceSpec;
|
|
71
|
+
applyTerrain(opts?: {
|
|
72
|
+
ease?: boolean;
|
|
73
|
+
}): void;
|
|
74
|
+
private disableTerrain;
|
|
67
75
|
hasBounds(): boolean;
|
|
68
76
|
zoomTo(): Promise<void>;
|
|
69
77
|
addLayers(before?: string): Promise<void>;
|
|
@@ -92,6 +100,7 @@ export default class Overlay {
|
|
|
92
100
|
attribution?: string;
|
|
93
101
|
url?: string;
|
|
94
102
|
token?: string;
|
|
103
|
+
tilejson?: OverlayTileJSON | null;
|
|
95
104
|
styles?: Array<LayerSpecification>;
|
|
96
105
|
}, opts?: {
|
|
97
106
|
before?: string;
|
|
@@ -110,7 +119,6 @@ export default class Overlay {
|
|
|
110
119
|
pos?: number;
|
|
111
120
|
visible?: boolean;
|
|
112
121
|
opacity?: number;
|
|
113
|
-
encoding?: 'mapbox' | 'terrarium' | null;
|
|
114
122
|
}): Promise<void>;
|
|
115
123
|
save(): Promise<void>;
|
|
116
124
|
toDBOverlay(): DBOverlay;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type Observable } from 'dexie';
|
|
2
2
|
import { type DBOverlay } from '../database.ts';
|
|
3
3
|
import type { paths } from '@cloudtak/api-types';
|
|
4
|
-
import type { ProfileOverlay } from '../types.ts';
|
|
5
4
|
import BaseInterface from './interface.ts';
|
|
6
5
|
import Overlay from './overlay-class.ts';
|
|
7
6
|
import type { BaseInterface_ListOptions, BaseInterface_FromOptions } from './interface.ts';
|
|
@@ -65,8 +64,8 @@ export default class OverlayManager extends BaseInterface {
|
|
|
65
64
|
} ? Overlay_Page : DBOverlay[]>;
|
|
66
65
|
static from(id: string, opts?: BaseInterface_FromOptions): Promise<DBOverlay | undefined>;
|
|
67
66
|
static liveFrom(id: string): Observable<DBOverlay | undefined>;
|
|
68
|
-
static get(id: string | number): Promise<
|
|
69
|
-
static generate(body: paths['/api/profile/overlay']['post']['requestBody']['content']['application/json']): Promise<
|
|
67
|
+
static get(id: string | number): Promise<DBOverlay>;
|
|
68
|
+
static generate(body: paths['/api/profile/overlay']['post']['requestBody']['content']['application/json']): Promise<DBOverlay>;
|
|
70
69
|
static update(id: string, body: paths['/api/profile/overlay/{:overlay}']['patch']['requestBody']['content']['application/json']): Promise<void>;
|
|
71
70
|
static sync(): Promise<void>;
|
|
72
71
|
static delete(id: string, opts?: Overlay_DeleteOptions): Promise<void>;
|
|
@@ -7,6 +7,7 @@ import COT from '../base/cot.ts';
|
|
|
7
7
|
import RoutingControl from '../lib/routing/main.ts';
|
|
8
8
|
import type { NavigationState, NavigationDirection } from '../lib/routing/main.ts';
|
|
9
9
|
import { LocationState } from '../utils/events.ts';
|
|
10
|
+
import Overlay from '../base/overlay-class.ts';
|
|
10
11
|
import Subscription from '../base/subscription.ts';
|
|
11
12
|
import * as mapgl from 'maplibre-gl';
|
|
12
13
|
import type Atlas from '../workers/atlas.ts';
|
|
@@ -119,8 +120,8 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
|
|
|
119
120
|
startWorker: () => void;
|
|
120
121
|
destroy: () => Promise<void>;
|
|
121
122
|
makeActiveMission: (mission?: Subscription) => Promise<void>;
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
terrainOverlay: () => Overlay | undefined;
|
|
124
|
+
toggleTerrain: () => Promise<void>;
|
|
124
125
|
returnHome: () => Promise<void>;
|
|
125
126
|
/**
|
|
126
127
|
* Trigger a rerender of the underlying GeoJSON Features
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OverlayTileJSON } from '../../types.ts';
|
|
2
|
+
export type { OverlayTileJSON };
|
|
3
|
+
type TileJSONEntry = {
|
|
4
|
+
url: string;
|
|
5
|
+
tilejson: OverlayTileJSON | null;
|
|
6
|
+
};
|
|
7
|
+
export declare function tileJSONSourceUrl(id: number): string;
|
|
8
|
+
export declare function setOverlayTileJSON(id: number, entry: TileJSONEntry): void;
|
|
9
|
+
export declare function clearOverlayTileJSON(id: number): void;
|
|
10
|
+
export declare function registerTileJSONProtocol(): void;
|
|
@@ -169,6 +169,7 @@ export type ProfileOverlay = paths["/api/profile/overlay/{:overlay}"]["get"]["re
|
|
|
169
169
|
export type ProfileOverlayList = paths["/api/profile/overlay"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
170
170
|
export type ProfileOverlay_Create = paths["/api/profile/overlay"]["post"]["requestBody"]["content"]["application/json"];
|
|
171
171
|
export type ProfileOverlay_Update = paths["/api/profile/overlay/{:overlay}"]["patch"]["requestBody"]["content"]["application/json"];
|
|
172
|
+
export type OverlayTileJSON = NonNullable<ProfileOverlay["tilejson"]>;
|
|
172
173
|
export type ProfileTokenList = paths["/api/profile/token"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
173
174
|
export type ProfileToken = ProfileTokenList["items"][0];
|
|
174
175
|
export type ProfilePagingList = paths["/api/profile/paging"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Append the session token to tile URLs on CloudTAK hosts only - never third
|
|
3
|
+
* party tile servers. String-edited: `URL` percent-encodes `{z}/{x}/{y}`.
|
|
4
|
+
*/
|
|
5
|
+
export declare function authorizeTileJSON<T extends {
|
|
6
|
+
tiles: string[];
|
|
7
|
+
}>(tilejson: T, token: string | undefined, hosts: Iterable<string>): T;
|