@tak-ps/cloudtak 13.97.0 → 13.98.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/cot.d.ts +5 -0
- package/dist/types/src/base/icon.d.ts +9 -1
- package/dist/types/src/base/iconset.d.ts +2 -0
- package/dist/types/src/components/CloudTAK/Query/Reverse.vue.d.ts +2 -0
- package/dist/types/src/database.d.ts +3 -0
- package/dist/types/src/stores/modules/icons.d.ts +5 -0
- package/dist/types/src/types.d.ts +11 -0
- package/dist/types/src/utils/milsymbol.d.ts +16 -0
- package/package.json +1 -1
|
@@ -31,6 +31,11 @@ export declare const MILSYM_ICON: RegExp;
|
|
|
31
31
|
* `usericon` iconsetpath
|
|
32
32
|
*/
|
|
33
33
|
export declare function renderedIcon(properties: Feature["properties"]): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The style image id the map's icon layer requests for a Feature. Must agree
|
|
36
|
+
* with the `icon-image` expression in utils/styles.ts (cot-icon.spec.ts asserts it).
|
|
37
|
+
*/
|
|
38
|
+
export declare function renderedIconImage(properties: Feature["properties"]): string | undefined;
|
|
34
39
|
export default class COT {
|
|
35
40
|
id: string;
|
|
36
41
|
instance: string;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { type DBIcon } from '../database.ts';
|
|
1
|
+
import { type DBIcon, type DBIconset } from '../database.ts';
|
|
2
|
+
import type { Iconset } from '../types.ts';
|
|
2
3
|
export interface IconHydrateResult {
|
|
3
4
|
added: string[];
|
|
4
5
|
/** Iconsets refetched because the remote `version`/`updated` differs. */
|
|
5
6
|
updated: string[];
|
|
6
7
|
/** Iconsets that were removed locally because they no longer exist remotely. */
|
|
7
8
|
removed: string[];
|
|
9
|
+
/** Iconsets whose icon fetch failed; they are retried on the next hydrate. */
|
|
10
|
+
failed: string[];
|
|
8
11
|
}
|
|
9
12
|
export default class Icon {
|
|
10
13
|
static has(icon: string): Promise<boolean>;
|
|
@@ -17,6 +20,11 @@ export default class Icon {
|
|
|
17
20
|
* Return all icons belonging to a given iconset uid, ordered by path.
|
|
18
21
|
*/
|
|
19
22
|
static list(iconsetUid: string): Promise<DBIcon[]>;
|
|
23
|
+
/**
|
|
24
|
+
* True when the icons cached for an iconset don't match `remote`
|
|
25
|
+
* (defaults to the cached metadata itself).
|
|
26
|
+
*/
|
|
27
|
+
static stale(cached: DBIconset | undefined, remote?: Pick<Iconset, 'version' | 'updated'> | undefined): boolean;
|
|
20
28
|
/**
|
|
21
29
|
* Diff the server iconset list against Dexie and refetch icons for any
|
|
22
30
|
* iconsets that are new or whose `version`/`updated` differs. Concurrent
|
|
@@ -32,6 +32,8 @@ export default class IconsetManager extends BaseInterface {
|
|
|
32
32
|
} ? Iconset_Page : DBIconset[]>;
|
|
33
33
|
static from(uid: string, opts?: BaseInterface_FromOptions): Promise<DBIconset | undefined>;
|
|
34
34
|
static liveFrom(uid: string): Observable<DBIconset | undefined>;
|
|
35
|
+
/** Write a server row, keeping the icon sync marker set by base/icon.ts */
|
|
36
|
+
static put(remote: Iconset): Promise<void>;
|
|
35
37
|
static get(uid: string): Promise<Iconset>;
|
|
36
38
|
static generate(body: paths['/api/iconset']['post']['requestBody']['content']['application/json']): Promise<Iconset>;
|
|
37
39
|
static update(uid: string, body: paths['/api/iconset/{:iconset}']['patch']['requestBody']['content']['application/json']): Promise<void>;
|
|
@@ -4,12 +4,14 @@ type __VLS_Props = {
|
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
6
|
reverse: (reverse: {
|
|
7
|
+
type?: "address" | "street" | "poi" | "trailhead" | "parking" | "hospital" | "police" | "park" | "peak" | "locality" | "region" | "postal";
|
|
7
8
|
LongLabel: string;
|
|
8
9
|
ShortLabel: string;
|
|
9
10
|
Addr_type: string;
|
|
10
11
|
} | null) => any;
|
|
11
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
13
|
onReverse?: ((reverse: {
|
|
14
|
+
type?: "address" | "street" | "poi" | "trailhead" | "parking" | "hospital" | "police" | "park" | "peak" | "locality" | "region" | "postal";
|
|
13
15
|
LongLabel: string;
|
|
14
16
|
ShortLabel: string;
|
|
15
17
|
Addr_type: string;
|
|
@@ -72,6 +72,9 @@ export interface DBIconset {
|
|
|
72
72
|
default_neutral: string | null;
|
|
73
73
|
default_unknown: string | null;
|
|
74
74
|
skip_resize: boolean;
|
|
75
|
+
/** version/updated of the iconset whose icons are cached in db.icon */
|
|
76
|
+
icons_version?: number;
|
|
77
|
+
icons_updated?: string;
|
|
75
78
|
}
|
|
76
79
|
export type DBOverlay = ProfileOverlayList["items"][number];
|
|
77
80
|
/** Profile asset metadata retained for files downloaded for offline use */
|
|
@@ -45,6 +45,11 @@ export default class IconManager {
|
|
|
45
45
|
* and renders the feature without an icon).
|
|
46
46
|
*/
|
|
47
47
|
resolve(id: string): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Whether an image id is one this manager generates on demand, as opposed
|
|
50
|
+
* to a built-in spritesheet icon the style loads up front
|
|
51
|
+
*/
|
|
52
|
+
resolvable(id: string): boolean;
|
|
48
53
|
private resolveImage;
|
|
49
54
|
/**
|
|
50
55
|
* Resolve an `<iconsetUid>:<path>` image id from Dexie, falling back to
|
|
@@ -15,6 +15,17 @@ export type COTType = paths["/api/type/cot/{:type}"]["get"]["responses"]["200"][
|
|
|
15
15
|
export type COT2525EList = paths["/api/type/2525e"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
16
16
|
export type COT2525EType = COT2525EList["items"][number];
|
|
17
17
|
export type Search = paths["/api/search"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
18
|
+
export type SearchProviderStatus = {
|
|
19
|
+
active: boolean;
|
|
20
|
+
default: boolean;
|
|
21
|
+
forward: boolean;
|
|
22
|
+
reverse: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type RoutingProviderStatus = {
|
|
25
|
+
active: boolean;
|
|
26
|
+
default: boolean;
|
|
27
|
+
modes: number;
|
|
28
|
+
};
|
|
18
29
|
export type SearchSuggest = paths["/api/search/suggest"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
19
30
|
export type SearchForward = paths["/api/search/forward"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
20
31
|
export type VideoLease = paths["/api/video/lease/{:lease}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MIL-STD symbol generation shared by the map's Icon Manager and DOM previews
|
|
3
|
+
* so a symbol looks the same wherever it is drawn
|
|
4
|
+
*/
|
|
5
|
+
/** Render size (px) of a generated symbol */
|
|
6
|
+
export declare const SYMBOL_SIZE = 24;
|
|
7
|
+
export declare function isMilsymIcon(id: string): boolean;
|
|
8
|
+
/** @param id A bare SIDC or a `2525<Variant>:<SIDC>` icon id */
|
|
9
|
+
export declare function symbolCanvas(id: string): HTMLCanvasElement;
|
|
10
|
+
/**
|
|
11
|
+
* Cached per SIDC and size so a list of Features sharing a symbol renders it
|
|
12
|
+
* once rather than once per instance
|
|
13
|
+
*
|
|
14
|
+
* @param id A bare SIDC or a `2525<Variant>:<SIDC>` icon id
|
|
15
|
+
*/
|
|
16
|
+
export declare function symbolDataURL(id: string, size?: number): string;
|