@orbat-mapper/tactical-draw 0.33.0 → 0.35.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/index.d.mts +1934 -766
- package/dist/index.mjs +14196 -9022
- package/dist/map-adapter-De1DC6Zy.d.mts +1536 -0
- package/dist/testing.d.mts +1 -1
- package/dist/testing.mjs +15 -2
- package/package.json +3 -2
- package/dist/map-adapter-g2v5Ok3Y.d.mts +0 -832
|
@@ -0,0 +1,1536 @@
|
|
|
1
|
+
import { ControlMeasureStyle, HighlightAppearance, PatternId, TextAmplifiers } from "@orbat-mapper/control-measures";
|
|
2
|
+
import { Feature, Position } from "geojson";
|
|
3
|
+
|
|
4
|
+
//#region src/pin-presentation.d.ts
|
|
5
|
+
/** View preferences, never part of an authored PointSymbol snapshot. */
|
|
6
|
+
interface PinPresentation {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
mode: "screen" | "world";
|
|
9
|
+
liftPixels: number;
|
|
10
|
+
heightMeters: number;
|
|
11
|
+
sizePixels: number;
|
|
12
|
+
occlusion: "none" | "terrain";
|
|
13
|
+
prioritizePins: boolean;
|
|
14
|
+
/** Paint whole pins far to near by camera depth; ties retain layer order. Default on. */
|
|
15
|
+
depthSort: boolean;
|
|
16
|
+
stem: {
|
|
17
|
+
color: string;
|
|
18
|
+
width: number;
|
|
19
|
+
opacity: number;
|
|
20
|
+
};
|
|
21
|
+
dot: {
|
|
22
|
+
color: string;
|
|
23
|
+
radius: number;
|
|
24
|
+
opacity: number;
|
|
25
|
+
};
|
|
26
|
+
halo: {
|
|
27
|
+
color: string;
|
|
28
|
+
width: number;
|
|
29
|
+
opacity: number;
|
|
30
|
+
};
|
|
31
|
+
symbolHalo: {
|
|
32
|
+
color: string;
|
|
33
|
+
width: number;
|
|
34
|
+
opacity: number;
|
|
35
|
+
};
|
|
36
|
+
plate: {
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
color: string;
|
|
39
|
+
borderColor: string;
|
|
40
|
+
borderWidth: number;
|
|
41
|
+
padding: number;
|
|
42
|
+
radius: number;
|
|
43
|
+
opacity: number;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* View-wide zoom-out shrinking of the screen-space pin (symbol, plate, halos,
|
|
47
|
+
* dot and screen lift; stem width stays constant). Below `fullSizeZoom` the
|
|
48
|
+
* pin is multiplied by `falloff` per zoom level; `sizeLimits` sets the floor.
|
|
49
|
+
*/
|
|
50
|
+
zoomScale: {
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
fullSizeZoom: number;
|
|
53
|
+
falloff: number;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* View-wide perspective sizing: pins nearer the camera than the view center
|
|
57
|
+
* grow and farther ones shrink, by `(centerDepth / pinDepth) ^ strength`
|
|
58
|
+
* (1 = true perspective). Multiplies with `zoomScale`; scales the same parts.
|
|
59
|
+
*/
|
|
60
|
+
distanceScale: {
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
strength: number;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* View-wide bounds on the pin scale (zoom × distance), applied only while either
|
|
66
|
+
* scaling mode is enabled: the one place that decides how small or large pins get.
|
|
67
|
+
* If `minScale` exceeds `maxScale`, `maxScale` wins.
|
|
68
|
+
*/
|
|
69
|
+
sizeLimits: {
|
|
70
|
+
minScale: number;
|
|
71
|
+
maxScale: number;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** Nested settings, merged key by key rather than replaced by a patch. */
|
|
75
|
+
declare const sections: readonly ["stem", "dot", "halo", "symbolHalo", "plate", "zoomScale", "distanceScale", "sizeLimits"];
|
|
76
|
+
type PinSection = (typeof sections)[number];
|
|
77
|
+
declare const viewWideKeys: readonly ["mode", "occlusion", "prioritizePins", "depthSort", "zoomScale", "distanceScale", "sizeLimits"];
|
|
78
|
+
type PinPresentationPatch = Partial<Omit<PinPresentation, PinSection>> & { [K in PinSection]?: Partial<PinPresentation[K]> };
|
|
79
|
+
/** Per-unit appearance and dimensions; spatial rules belong to the view. */
|
|
80
|
+
type PinOverridePatch = Omit<PinPresentationPatch, (typeof viewWideKeys)[number]>;
|
|
81
|
+
interface PinPresentationState {
|
|
82
|
+
defaults: PinPresentationPatch;
|
|
83
|
+
overrides: Record<string, PinOverridePatch>;
|
|
84
|
+
}
|
|
85
|
+
type PinPresentationStatus = "supported" | "unsupported" | "loading" | "waiting-for-elevation" | "unavailable";
|
|
86
|
+
interface PinPresentationCapability {
|
|
87
|
+
status: PinPresentationStatus;
|
|
88
|
+
reason?: string;
|
|
89
|
+
}
|
|
90
|
+
interface PinPresentationStatusEvent extends PinPresentationCapability {
|
|
91
|
+
graphicIds: readonly string[];
|
|
92
|
+
}
|
|
93
|
+
/** Render payload for one atomic graphic; shared icon resources retain HQ staff. */
|
|
94
|
+
interface PinRender {
|
|
95
|
+
id: string;
|
|
96
|
+
position: Position;
|
|
97
|
+
resource: IconResource;
|
|
98
|
+
octagonSize: number;
|
|
99
|
+
presentation: PinPresentation;
|
|
100
|
+
opacity: number;
|
|
101
|
+
/** Absolute clockwise bearing in radians, independent of billboard orientation. */
|
|
102
|
+
direction?: number;
|
|
103
|
+
/** Selection chrome only, on the host highlight/handles surface. */
|
|
104
|
+
highlightOnly?: boolean;
|
|
105
|
+
}
|
|
106
|
+
interface PinFootprint {
|
|
107
|
+
ground: PixelCoordinate;
|
|
108
|
+
attachment: PixelCoordinate;
|
|
109
|
+
min: PixelCoordinate;
|
|
110
|
+
max: PixelCoordinate;
|
|
111
|
+
}
|
|
112
|
+
declare const DEFAULT_PIN_PRESENTATION: Readonly<PinPresentation>;
|
|
113
|
+
/**
|
|
114
|
+
* Multiplier for screen-space pin dimensions at `zoom`, never above 1; 1 when zoom
|
|
115
|
+
* scaling is off. Unbounded below: combinePinScale applies `sizeLimits`.
|
|
116
|
+
*/
|
|
117
|
+
declare function pinZoomScale(presentation: PinPresentation, zoom: number): number;
|
|
118
|
+
/**
|
|
119
|
+
* Perspective multiplier for a pin at camera depth `depth` (clip-space w), relative
|
|
120
|
+
* to the view center at `referenceDepth`; 1 when distance scaling is off. Unbounded:
|
|
121
|
+
* combinePinScale applies `sizeLimits`. Engines that scale on the GPU must mirror
|
|
122
|
+
* this formula in their shader.
|
|
123
|
+
*/
|
|
124
|
+
declare function pinDistanceScale(presentation: PinPresentation, depth: number, referenceDepth: number): number;
|
|
125
|
+
/**
|
|
126
|
+
* Combined screen-space pin scale from the two mode factors (as returned by
|
|
127
|
+
* pinZoomScale and pinDistanceScale), bounded by `sizeLimits` while either mode is
|
|
128
|
+
* enabled; if its `minScale` exceeds `maxScale`, `maxScale` wins. Engines that
|
|
129
|
+
* scale on the GPU must mirror this in their shader.
|
|
130
|
+
*/
|
|
131
|
+
declare function combinePinScale(presentation: PinPresentation, zoomScale: number, distanceScale: number): number;
|
|
132
|
+
/**
|
|
133
|
+
* Whether `value` is an acceptable number for the pin setting named `key`.
|
|
134
|
+
* Exported so a host's input handling can reject a value with the same rules
|
|
135
|
+
* the store enforces, rather than re-encoding the bounds and drifting from it.
|
|
136
|
+
*/
|
|
137
|
+
declare function isValidPinNumber(key: string, value: unknown): value is number;
|
|
138
|
+
declare function resolvePinPresentation(...patches: readonly PinPresentationPatch[]): PinPresentation;
|
|
139
|
+
/** Replacing patches makes omitted override properties inherit again. */
|
|
140
|
+
declare class PinPresentationStore {
|
|
141
|
+
private state;
|
|
142
|
+
/** Monotonic stamp source for {@link revision}. */
|
|
143
|
+
private revisions;
|
|
144
|
+
private defaultsRevision;
|
|
145
|
+
private readonly overrideRevisions;
|
|
146
|
+
private readonly emitter;
|
|
147
|
+
getState(): PinPresentationState;
|
|
148
|
+
resolve(id: string): PinPresentation;
|
|
149
|
+
/**
|
|
150
|
+
* @internal A stamp that changes whenever {@link resolve} may return a
|
|
151
|
+
* different presentation for `id`, so a renderer can keep reusing the pins
|
|
152
|
+
* whose presentation a change left alone.
|
|
153
|
+
*/
|
|
154
|
+
revision(id: string): number;
|
|
155
|
+
replace(state: PinPresentationState): void;
|
|
156
|
+
setDefaults(patch: PinPresentationPatch): void;
|
|
157
|
+
setOverride(id: string, patch: PinOverridePatch): void;
|
|
158
|
+
resetOverride(id: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* Set several overrides, and with `null` reset them, as one validated change
|
|
161
|
+
* and one `onChange` emit. Each patch replaces that id's previous patch, as
|
|
162
|
+
* {@link setOverride} does; ids not named keep theirs. An invalid patch
|
|
163
|
+
* throws and leaves every override unchanged.
|
|
164
|
+
*/
|
|
165
|
+
setOverrides(patches: Readonly<Record<string, PinOverridePatch | null>>): void;
|
|
166
|
+
onChange(listener: (state: PinPresentationState) => void): () => void;
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/gestures/types.d.ts
|
|
170
|
+
interface PointerEventInfo {
|
|
171
|
+
/** Per-event hit-tolerance override (e.g. larger for touch). */
|
|
172
|
+
hitTolerance?: number;
|
|
173
|
+
/**
|
|
174
|
+
* Whether Alt/Option was held. Modifiers are populated on mouse
|
|
175
|
+
* pointer-down; touch leaves them undefined. Which gesture reads which key
|
|
176
|
+
* is set by `TacticalDrawOptions.editModifiers` and `offsetDragModifier`.
|
|
177
|
+
*/
|
|
178
|
+
altKey?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Whether Shift was held for this pointer event. Constrain gestures read
|
|
181
|
+
* their key (Shift by default) live, on every move.
|
|
182
|
+
*/
|
|
183
|
+
shiftKey?: boolean;
|
|
184
|
+
/** Whether Control was held for this pointer event. */
|
|
185
|
+
ctrlKey?: boolean;
|
|
186
|
+
/** Whether Meta/Command was held for this pointer event. */
|
|
187
|
+
metaKey?: boolean;
|
|
188
|
+
/** Engine-native event, for drivers that need to call preventDefault etc. */
|
|
189
|
+
native?: unknown;
|
|
190
|
+
}
|
|
191
|
+
interface PointerCallback {
|
|
192
|
+
(pixel: PixelCoordinate, info?: PointerEventInfo): void;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Engine-agnostic pointer driver consumed by `TacticalDraw`'s edit controller.
|
|
196
|
+
* The controller owns handle rendering and hit-tests handles in lonLat space;
|
|
197
|
+
* the driver only carries raw pointer events, drag-pan toggle, and pixel
|
|
198
|
+
* projection.
|
|
199
|
+
*/
|
|
200
|
+
interface EditPointerDriver {
|
|
201
|
+
onPointerDown(cb: PointerCallback): () => void;
|
|
202
|
+
onPointerMove(cb: PointerCallback): () => void;
|
|
203
|
+
onPointerUp(cb: PointerCallback): () => void;
|
|
204
|
+
/**
|
|
205
|
+
* `false` holds the engine's own drag gestures for the duration of an edit
|
|
206
|
+
* drag — its drag-pan, and any other drag the engine binds to the same
|
|
207
|
+
* pointer (MapLibre's drag-rotate) — so the drag moves only the handle;
|
|
208
|
+
* `true` restores the ones the host had enabled. Despite the name it is not
|
|
209
|
+
* limited to panning.
|
|
210
|
+
*/
|
|
211
|
+
setDragPanEnabled(enabled: boolean): void;
|
|
212
|
+
toPixel(lonLat: Position): PixelCoordinate | null;
|
|
213
|
+
fromPixel(pixel: PixelCoordinate): Position;
|
|
214
|
+
/** Idempotent. */
|
|
215
|
+
dispose(): void;
|
|
216
|
+
}
|
|
217
|
+
//#endregion
|
|
218
|
+
//#region src/tactical-draw/edit-modifiers.d.ts
|
|
219
|
+
/** A keyboard modifier a pointer gesture can read. */
|
|
220
|
+
type ModifierKey = "alt" | "shift" | "ctrl" | "meta";
|
|
221
|
+
/**
|
|
222
|
+
* Which modifier keys the editor's gestures listen for (#652). Each role takes
|
|
223
|
+
* a key or `false` to turn the gesture off; omitted roles keep their current
|
|
224
|
+
* key. See {@link TacticalDrawOptions.editModifiers}.
|
|
225
|
+
*/
|
|
226
|
+
interface EditModifiers {
|
|
227
|
+
/**
|
|
228
|
+
* Drag a vertex with this key held to hand the gesture to the definition's
|
|
229
|
+
* `modifierDrag` hook (e.g. a Flow Arrow split or merge). Any key in a list
|
|
230
|
+
* starts it. Held while pressing an option handle, it lets the definition
|
|
231
|
+
* widen that drag or reset (e.g. sizing every Split Arrow head at once).
|
|
232
|
+
* @default ["ctrl", "meta"]
|
|
233
|
+
*/
|
|
234
|
+
modifierDrag?: ModifierKey | readonly ModifierKey[] | false;
|
|
235
|
+
/**
|
|
236
|
+
* Click a vertex with this key held to delete it, or an option handle to
|
|
237
|
+
* reset its option. Must not share a key with `modifierDrag`.
|
|
238
|
+
* @default "alt"
|
|
239
|
+
*/
|
|
240
|
+
deleteOrReset?: ModifierKey | false;
|
|
241
|
+
/**
|
|
242
|
+
* Hold to constrain angles while drawing or dragging a vertex, and to step
|
|
243
|
+
* rotations in 15° increments.
|
|
244
|
+
* @default "shift"
|
|
245
|
+
*/
|
|
246
|
+
constrain?: ModifierKey | false;
|
|
247
|
+
/**
|
|
248
|
+
* Click a point, a midpoint or the body of a graphic with parts (e.g. a Flow
|
|
249
|
+
* Arrow's flows) with this key held to toggle that part in or out of the
|
|
250
|
+
* edit session's part selection instead of selecting it alone (see
|
|
251
|
+
* `EditSession.selectedParts`). A drag with the key held is a plain
|
|
252
|
+
* drag, so it may share the `constrain` key (Shift-drag constrains,
|
|
253
|
+
* Shift-click extends). Must not share a key with `modifierDrag` or
|
|
254
|
+
* `deleteOrReset`, which act on the same press. Point and midpoint presses
|
|
255
|
+
* read the key from the edit pointer events; a body click reads it from the
|
|
256
|
+
* engine's click event.
|
|
257
|
+
*
|
|
258
|
+
* Off by default: a host that synthesises the constrain key on every event
|
|
259
|
+
* (to make constraining persistent) would otherwise extend on every click.
|
|
260
|
+
* @default false
|
|
261
|
+
*/
|
|
262
|
+
extendPartSelection?: ModifierKey | false;
|
|
263
|
+
}
|
|
264
|
+
/** {@link EditModifiers} with every role filled in, as `getEditModifiers()` returns it. */
|
|
265
|
+
interface ResolvedEditModifiers {
|
|
266
|
+
modifierDrag: readonly ModifierKey[] | false;
|
|
267
|
+
deleteOrReset: ModifierKey | false;
|
|
268
|
+
constrain: ModifierKey | false;
|
|
269
|
+
extendPartSelection: ModifierKey | false;
|
|
270
|
+
}
|
|
271
|
+
declare const DEFAULT_EDIT_MODIFIERS: ResolvedEditModifiers;
|
|
272
|
+
/**
|
|
273
|
+
* Modifier keys held during a pick, normalised across engines (#754).
|
|
274
|
+
* `primary` is the platform's command key: Meta (⌘) on Apple platforms,
|
|
275
|
+
* Ctrl elsewhere.
|
|
276
|
+
*/
|
|
277
|
+
interface PickModifiers {
|
|
278
|
+
alt: boolean;
|
|
279
|
+
shift: boolean;
|
|
280
|
+
ctrl: boolean;
|
|
281
|
+
meta: boolean;
|
|
282
|
+
primary: boolean;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Read the modifier keys from an engine pick or pointer event without
|
|
286
|
+
* assuming its type: a DOM event, an engine wrapper with an `originalEvent`,
|
|
287
|
+
* or nothing at all (every key `false`).
|
|
288
|
+
*/
|
|
289
|
+
declare function readPickModifiers(originalEvent: unknown): PickModifiers;
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/marker.d.ts
|
|
292
|
+
/** Displayed icon height; same pixel/meter contract as point-symbol sizes. */
|
|
293
|
+
type MarkerSize = PointSymbolSize;
|
|
294
|
+
interface MarkerStyle {
|
|
295
|
+
/** Host-interpreted tint, handed to {@link MarkerCapability.render}. */
|
|
296
|
+
color?: string;
|
|
297
|
+
/** 0–1 display multiplier applied by TacticalDraw. */
|
|
298
|
+
opacity?: number;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Persisted generic marker (e.g. a pin) whose icon is supplied by the
|
|
302
|
+
* host application. TacticalDraw treats `symbolId` as opaque (ADR-0059).
|
|
303
|
+
*/
|
|
304
|
+
interface Marker {
|
|
305
|
+
id: string;
|
|
306
|
+
kind: "marker";
|
|
307
|
+
/** Host-defined icon identifier resolved by the {@link MarkerCapability}. */
|
|
308
|
+
symbolId: string;
|
|
309
|
+
position: Position;
|
|
310
|
+
/** Normalized radians clockwise from geographic north, around the icon anchor. */
|
|
311
|
+
rotation: number;
|
|
312
|
+
size: MarkerSize;
|
|
313
|
+
/** Optional text; the capability decides whether and how to draw it. */
|
|
314
|
+
label?: string;
|
|
315
|
+
style?: MarkerStyle;
|
|
316
|
+
properties?: Record<string, unknown>;
|
|
317
|
+
schemaVersion: 1;
|
|
318
|
+
}
|
|
319
|
+
interface MarkerAnchor {
|
|
320
|
+
x: number;
|
|
321
|
+
y: number;
|
|
322
|
+
}
|
|
323
|
+
/** Host-prepared marker icon in canonical SVG units. */
|
|
324
|
+
interface MarkerIcon {
|
|
325
|
+
/**
|
|
326
|
+
* Content-derived identity for adapter-wide icon reuse: equal ids must mean
|
|
327
|
+
* identical SVG. Include anything that changes the drawing (symbol, color, label).
|
|
328
|
+
*/
|
|
329
|
+
resourceId: string;
|
|
330
|
+
/** Self-contained SVG markup. Producing safe content is the host's responsibility. */
|
|
331
|
+
svg: string;
|
|
332
|
+
width: number;
|
|
333
|
+
height: number;
|
|
334
|
+
/** Point placed at `Marker.position` (e.g. a pin's tip); rotation and scale pivot here. */
|
|
335
|
+
anchor: MarkerAnchor;
|
|
336
|
+
}
|
|
337
|
+
interface MarkerRender extends MarkerIcon {
|
|
338
|
+
/** False when the capability did not recognize `symbolId` and a placeholder is shown. */
|
|
339
|
+
available: boolean;
|
|
340
|
+
}
|
|
341
|
+
interface MarkerCapability {
|
|
342
|
+
/** Return `undefined` for an unknown `symbolId`; TacticalDraw renders a placeholder. */
|
|
343
|
+
render(marker: Marker): MarkerIcon | undefined;
|
|
344
|
+
/** Monotonic host-owned revision; bump it when icon resolution changes. */
|
|
345
|
+
readonly generation?: number;
|
|
346
|
+
/**
|
|
347
|
+
* Optional collocation member support (ADR-0063). Without it a Marker
|
|
348
|
+
* stands in the Bracket, drawn from its ordinary icon.
|
|
349
|
+
*/
|
|
350
|
+
readonly collocation?: CollocationMemberSupport<CollocationMarker>;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* One `MarkerCapability` from several, such as a badge catalog and the host's
|
|
354
|
+
* own icons: each marker gets the icon of the first capability that recognises
|
|
355
|
+
* its symbol id. `generation` is the sum of the parts' generations, so it still
|
|
356
|
+
* increases when any part bumps its own.
|
|
357
|
+
*/
|
|
358
|
+
declare function composeMarkerCapabilities(...capabilities: readonly MarkerCapability[]): MarkerCapability;
|
|
359
|
+
declare function isMarker(graphic: unknown): graphic is Marker;
|
|
360
|
+
declare function cloneMarker(marker: Marker): Marker;
|
|
361
|
+
declare function markerOpacity(marker: Marker): number;
|
|
362
|
+
declare function validateMarker(marker: Marker): void;
|
|
363
|
+
declare function normalizeMarker(marker: Marker): Marker;
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/collocation.d.ts
|
|
366
|
+
/** The two parts a collocation arranges its members in (ADR-0063). */
|
|
367
|
+
type CollocationPart = "staff" | "bracket";
|
|
368
|
+
/**
|
|
369
|
+
* A graphic embedded in a collocation: a point symbol or Marker whose own
|
|
370
|
+
* position is optional. Without one it stands at the collocation's location.
|
|
371
|
+
* Its `size`, `offset` and `rotation` are kept in data but ignored while it is
|
|
372
|
+
* a member: the collocation's own `size` sizes every member.
|
|
373
|
+
*/
|
|
374
|
+
type CollocationMemberGraphic = CollocationPointSymbol | CollocationMarker;
|
|
375
|
+
/** A point symbol as a collocation member: its position and size are optional. */
|
|
376
|
+
type CollocationPointSymbol = Omit<PointSymbol, "position" | "size"> & {
|
|
377
|
+
position?: Position; /** Kept but ignored while a member: the collocation's `size` applies. */
|
|
378
|
+
size?: PointSymbolSize;
|
|
379
|
+
};
|
|
380
|
+
/** A Marker as a collocation member: its position and size are optional. */
|
|
381
|
+
type CollocationMarker = Omit<Marker, "position" | "size"> & {
|
|
382
|
+
position?: Position; /** Kept but ignored while a member: the collocation's `size` applies. */
|
|
383
|
+
size?: PointSymbolSize;
|
|
384
|
+
};
|
|
385
|
+
interface CollocationMember {
|
|
386
|
+
/** The embedded graphic; its `id` is the member id, unique within this collocation only. */
|
|
387
|
+
graphic: CollocationMemberGraphic;
|
|
388
|
+
/** Always wins over the capability's role and `options.parts`. */
|
|
389
|
+
part?: CollocationPart;
|
|
390
|
+
/** Draw this member in the app-wide Highlight appearance. */
|
|
391
|
+
highlight?: boolean;
|
|
392
|
+
}
|
|
393
|
+
type CollocationLocate = "bounds-center" | "centroid" | "first";
|
|
394
|
+
/**
|
|
395
|
+
* How a collocation edit stores a dragged part (`EditOptions.partDrag`):
|
|
396
|
+
* `"keep"` keeps a ground part on the ground and makes anything else
|
|
397
|
+
* screen-relative; `"ground"` and `"screen-relative"` always store that mode.
|
|
398
|
+
*/
|
|
399
|
+
type CollocationPartDrag = "keep" | "ground" | "screen-relative";
|
|
400
|
+
/**
|
|
401
|
+
* Default `EditOptions.screenRelativeReach`: the farthest, in CSS px at
|
|
402
|
+
* collocation scale 1 from the location to a part's registration, that
|
|
403
|
+
* `partDrag: "keep"` stores a dragged part screen-relative. A part dragged
|
|
404
|
+
* further is stored on the ground, so its leader is a ground line rather than
|
|
405
|
+
* a long screen-space line drawn into the part image.
|
|
406
|
+
*/
|
|
407
|
+
declare const COLLOCATION_SCREEN_RELATIVE_REACH = 200;
|
|
408
|
+
/**
|
|
409
|
+
* Style of the spread area. Defaults: `line.strokeColor` at 1 px, dashed
|
|
410
|
+
* `[6, 4]`; filled in the stroke color, or `fillColor`, at `fillOpacity` 0.1.
|
|
411
|
+
*/
|
|
412
|
+
type CollocationAreaStyle = Pick<ControlMeasureStyle, "strokeColor" | "strokeWidth" | "strokeDash" | "fillColor" | "fillPattern"> & {
|
|
413
|
+
/** 0–1; default 0.1, whatever `fillColor` is, as a plate's is 0.85. */fillOpacity?: number;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* A line a collocation draws that can be shown or hidden: `show: false`
|
|
417
|
+
* draws none but keeps the style for when it shows again. Widths and dashes
|
|
418
|
+
* are CSS px at collocation scale 1.
|
|
419
|
+
*/
|
|
420
|
+
interface CollocationStroke {
|
|
421
|
+
show?: boolean;
|
|
422
|
+
strokeColor?: string;
|
|
423
|
+
strokeWidth?: number;
|
|
424
|
+
strokeDash?: number[];
|
|
425
|
+
}
|
|
426
|
+
/** What a collocation draws on the ground beneath its parts. Every field is optional. */
|
|
427
|
+
interface CollocationGround {
|
|
428
|
+
/**
|
|
429
|
+
* Default `{ mark: "auto" }`: no mark where a Staff's foot or a leader
|
|
430
|
+
* already ends at the location, as on a paper map, else a ring.
|
|
431
|
+
*/
|
|
432
|
+
location?: {
|
|
433
|
+
mark?: "auto" | "ring" | "dot" | "cross" | "none";
|
|
434
|
+
color?: string;
|
|
435
|
+
size?: number;
|
|
436
|
+
};
|
|
437
|
+
/** Default `{ mark: "none" }`. */
|
|
438
|
+
memberPositions?: {
|
|
439
|
+
mark?: "dot" | "cross" | "none";
|
|
440
|
+
color?: string;
|
|
441
|
+
size?: number;
|
|
442
|
+
};
|
|
443
|
+
/**
|
|
444
|
+
* Lines from each positioned member to the location. Hidden by default;
|
|
445
|
+
* `{ show: true }` is 1 px solid in `memberPositions.color`.
|
|
446
|
+
*/
|
|
447
|
+
ties?: CollocationStroke;
|
|
448
|
+
/**
|
|
449
|
+
* Default `{ shape: "none" }`; `padding` in true ground metres, default 100.
|
|
450
|
+
* `"hull"` is the convex hull; `"concave"` hugs the members instead, the
|
|
451
|
+
* way a hand-drawn outline would: a padded circle round each member,
|
|
452
|
+
* groups apart joined by a band one padding wide, inner corners rounded.
|
|
453
|
+
*/
|
|
454
|
+
spread?: {
|
|
455
|
+
shape?: "none" | "hull" | "concave" | "circle" | "box";
|
|
456
|
+
padding?: number;
|
|
457
|
+
style?: CollocationAreaStyle;
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
/** The outline of a collocation's Bracket (see {@link CollocationOptions.bracket}). */
|
|
461
|
+
type CollocationBracketShape = "square" | "brace" | "bar" | "box" | "none";
|
|
462
|
+
/**
|
|
463
|
+
* A Bracket's part placement. With `bracket.side: "auto"`, `side` records the
|
|
464
|
+
* side the Bracket stands on, which the layout keeps wherever the placement
|
|
465
|
+
* points (only a part drag turns it, past a dead zone around the diagonal),
|
|
466
|
+
* and marks a screen-relative placement as holding the members'
|
|
467
|
+
* middle rather than the tick root, so a side switch never moves them; that
|
|
468
|
+
* holds whatever `bracket.side` is now, so setting a fixed side afterwards
|
|
469
|
+
* doesn't move them either. Editors write it from the layout's part `side`
|
|
470
|
+
* and `placedAt`. A placement without `side` holds the tick root, so
|
|
471
|
+
* switching a placed Bracket to auto leaves it where it is.
|
|
472
|
+
*
|
|
473
|
+
* **Hosts must carry `side` along** whenever they copy, move or rewrite a
|
|
474
|
+
* placement: spread the old placement (`{ ...placement, offset }`) rather
|
|
475
|
+
* than building a new one from `mode`, `offset` and `position`. Dropping
|
|
476
|
+
* `side` changes what `offset` anchors to (the tick root instead of the
|
|
477
|
+
* members' middle), so the Bracket jumps.
|
|
478
|
+
*
|
|
479
|
+
* `via` bends the leader: it runs location → `via` → tick root, in the
|
|
480
|
+
* placement's own frame, a lon/lat position for a ground placement and CSS px
|
|
481
|
+
* at collocation scale 1 from the location (as `offset`) for a
|
|
482
|
+
* screen-relative one. The `"bend"` grip writes it on the line of the tick,
|
|
483
|
+
* so the leader reaches the Bracket along it, but any point draws. A ground
|
|
484
|
+
* bend is a ground point, so a ground-placed Bracket stays pinned at every
|
|
485
|
+
* zoom however long the bend; `bracket.tick` stays the short stub drawn with
|
|
486
|
+
* the Bracket. A part drag drops it. Malformed, it is ignored.
|
|
487
|
+
*/
|
|
488
|
+
type CollocationBracketPlacement = PointSymbolPlacement & {
|
|
489
|
+
side?: "left" | "top" | "bottom";
|
|
490
|
+
via?: Position;
|
|
491
|
+
};
|
|
492
|
+
/** Where a collocation's Bracket stands against its members. */
|
|
493
|
+
type CollocationBracketSide = "left" | "top" | "bottom" | "auto";
|
|
494
|
+
/**
|
|
495
|
+
* A plate behind a part's members (`staff.plate`, `bracket.plate`), hidden by
|
|
496
|
+
* default: `{ show: true }` is white at 0.85 opacity. `border` strokes its
|
|
497
|
+
* edge, hidden by default: `{ show: true }` is `line.strokeColor` at 1 px (px
|
|
498
|
+
* at scale 1). Plate and border are display only: clicks on them don't pick
|
|
499
|
+
* the part.
|
|
500
|
+
*/
|
|
501
|
+
interface CollocationPlate {
|
|
502
|
+
show?: boolean;
|
|
503
|
+
fillColor?: string;
|
|
504
|
+
/** 0–1; default 0.85. */
|
|
505
|
+
fillOpacity?: number;
|
|
506
|
+
border?: {
|
|
507
|
+
show?: boolean;
|
|
508
|
+
strokeColor?: string;
|
|
509
|
+
strokeWidth?: number;
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* The `options.memberOptions` bag types by member kind, for a capability
|
|
514
|
+
* package to declare its own through declaration merging, so hosts get its
|
|
515
|
+
* options typed:
|
|
516
|
+
*
|
|
517
|
+
* ```ts
|
|
518
|
+
* declare module "@orbat-mapper/tactical-draw" {
|
|
519
|
+
* interface CollocationMemberOptionTypes {
|
|
520
|
+
* pointSymbol: MyCollocationOptions;
|
|
521
|
+
* }
|
|
522
|
+
* }
|
|
523
|
+
* ```
|
|
524
|
+
*
|
|
525
|
+
* A kind nobody declares takes any `Record<string, unknown>`.
|
|
526
|
+
*/
|
|
527
|
+
interface CollocationMemberOptionTypes {}
|
|
528
|
+
type MemberOptionsOf<K extends string> = K extends keyof CollocationMemberOptionTypes ? CollocationMemberOptionTypes[K] : Record<string, unknown>;
|
|
529
|
+
/** Kind-keyed bags handed, unread, to each member kind's capability. */
|
|
530
|
+
interface CollocationMemberOptions {
|
|
531
|
+
pointSymbol?: MemberOptionsOf<"pointSymbol">;
|
|
532
|
+
marker?: MemberOptionsOf<"marker">;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* The halo behind a collocation's line work and leaders (`line.halo`), hidden
|
|
536
|
+
* by default: `{ show: true }` is white, 3 px wider than each line it backs.
|
|
537
|
+
* `show: false` keeps the style for when it shows again. The halo is always
|
|
538
|
+
* solid, even behind a dashed leader.
|
|
539
|
+
*/
|
|
540
|
+
interface CollocationHalo {
|
|
541
|
+
show?: boolean;
|
|
542
|
+
/** Default `#ffffff`. */
|
|
543
|
+
strokeColor?: string;
|
|
544
|
+
/**
|
|
545
|
+
* How much wider the halo is than each line it backs (the line's own
|
|
546
|
+
* width plus this), CSS px at collocation scale 1, so half of it shows on
|
|
547
|
+
* either side; default 3. Ground leaders keep it unscaled, as their width.
|
|
548
|
+
*/
|
|
549
|
+
strokeWidth?: number;
|
|
550
|
+
}
|
|
551
|
+
/** Collocation-wide options. Every field is optional (ADR-0063, #634). */
|
|
552
|
+
interface CollocationOptions {
|
|
553
|
+
/** Default part for members without `part`; default `"role"` (each capability's role). */
|
|
554
|
+
parts?: "role" | CollocationPart;
|
|
555
|
+
/** How the location is derived when `position` is absent; default `"bounds-center"`. */
|
|
556
|
+
locate?: CollocationLocate;
|
|
557
|
+
/** CSS px at collocation scale 1; a number sets both axes. Default `{ x: 12, y: 10 }`. */
|
|
558
|
+
gap?: number | {
|
|
559
|
+
x?: number;
|
|
560
|
+
y?: number;
|
|
561
|
+
};
|
|
562
|
+
staff?: {
|
|
563
|
+
/**
|
|
564
|
+
* How far the Staff runs below the lowest flag's frame, in size
|
|
565
|
+
* references (as milsymbol's `hqStaffLength`, measured from the frame's
|
|
566
|
+
* bottom wherever the staff leaves it); default 1.
|
|
567
|
+
*/
|
|
568
|
+
tail?: number;
|
|
569
|
+
/**
|
|
570
|
+
* Staff line px at scale 1, or `"frame"` (default): the lowest flag's own
|
|
571
|
+
* frame stroke at the collocation's size, so the Staff looks like the
|
|
572
|
+
* staff it replaces. A lowest flag that reports no frame stroke (a
|
|
573
|
+
* Marker, say) falls back to `line.strokeWidth`.
|
|
574
|
+
*/
|
|
575
|
+
strokeWidth?: number | "frame";
|
|
576
|
+
/**
|
|
577
|
+
* Staff line color, or `"frame"` (default): the lowest flag's own frame
|
|
578
|
+
* color, so the Staff looks like the staff it replaces. A lowest flag that
|
|
579
|
+
* reports no frame color falls back to `line.strokeColor`.
|
|
580
|
+
*/
|
|
581
|
+
strokeColor?: "frame" | (string & {});
|
|
582
|
+
/**
|
|
583
|
+
* A plate behind the Staff's flags, 4 px past everything they draw,
|
|
584
|
+
* labels and echelons included (see {@link CollocationPlate}).
|
|
585
|
+
*/
|
|
586
|
+
plate?: CollocationPlate;
|
|
587
|
+
};
|
|
588
|
+
bracket?: {
|
|
589
|
+
/**
|
|
590
|
+
* The Bracket's default spot, where it stands without a placement: CSS
|
|
591
|
+
* px at collocation scale 1 from the location to its tick root, joined
|
|
592
|
+
* to the location by a leader. Default `[80, -40]` (right and up) for an
|
|
593
|
+
* `"auto"` Bracket, so it starts as a left one; `[40, -80]` (up and
|
|
594
|
+
* right) for a `"left"` or `"bottom"` Bracket; `[40, 80]` (down and
|
|
595
|
+
* right) for a `"top"` Bracket, so the leader comes from above. `[0, 0]`
|
|
596
|
+
* puts the tick root on the location with no leader.
|
|
597
|
+
*/
|
|
598
|
+
defaultOffset?: [number, number];
|
|
599
|
+
/**
|
|
600
|
+
* Where the Bracket stands against its members. `"left"`: a
|
|
601
|
+
* vertical spine left of them, mirrored to their right when the location
|
|
602
|
+
* lies right of it. `"top"` / `"bottom"`: a horizontal spine above or
|
|
603
|
+
* below a row of members, the leader meeting it from that side. Every
|
|
604
|
+
* shape, `align`, `attach` (`"top"` meets the first column) and `plate`
|
|
605
|
+
* work the same way turned on its side, while the members keep the left
|
|
606
|
+
* Bracket's grid (rows of `columns`, left to right, top to bottom);
|
|
607
|
+
* `gap` and `padding` keep their screen axes. `"auto"` picks the side from
|
|
608
|
+
* where the Bracket stands, switching as it is dragged: mostly above the
|
|
609
|
+
* location `"bottom"`, mostly below `"top"`, otherwise `"left"`. Default
|
|
610
|
+
* `"auto"`.
|
|
611
|
+
*/
|
|
612
|
+
side?: CollocationBracketSide;
|
|
613
|
+
columns?: number;
|
|
614
|
+
align?: "left" | "center"; /** Length of the square shape's caps, and the brace's curl. Default 7. */
|
|
615
|
+
cap?: number; /** Length of the tick, from where the leader meets it to the spine. Default 14. */
|
|
616
|
+
tick?: number;
|
|
617
|
+
/**
|
|
618
|
+
* The Bracket's outline; default `"square"` (a spine with caps). `"brace"`
|
|
619
|
+
* curls its ends by `cap` and points back into the tick, `"bar"` is the
|
|
620
|
+
* spine alone, `"box"` frames the members, and `"none"` draws no outline,
|
|
621
|
+
* the tick running to the members, or to the plate's edge with a plate.
|
|
622
|
+
*/
|
|
623
|
+
shape?: CollocationBracketShape;
|
|
624
|
+
/**
|
|
625
|
+
* Where the leader meets the Bracket: its `"middle"` (default) or its
|
|
626
|
+
* `"top"` row (with a `"top"` or `"bottom"` side, its first column).
|
|
627
|
+
*/
|
|
628
|
+
attach?: "middle" | "top";
|
|
629
|
+
/**
|
|
630
|
+
* A plate behind the Bracket's members, from the spine to `padding` past
|
|
631
|
+
* their far edge (see {@link CollocationPlate}).
|
|
632
|
+
*/
|
|
633
|
+
plate?: CollocationPlate;
|
|
634
|
+
/**
|
|
635
|
+
* Space between the Bracket and its members, CSS px at collocation scale
|
|
636
|
+
* 1, as CSS padding: `x` left and right of them, `y` above and below; a
|
|
637
|
+
* number sets both. For a left Bracket, `x` is the space from the spine
|
|
638
|
+
* to the members (labels sit inside it) and, for the box and plate, past
|
|
639
|
+
* their far edge; `y` is how far the outline reaches past the first and
|
|
640
|
+
* last row (frames for the square, brace and bar; everything drawn for
|
|
641
|
+
* the box and plate). A top or bottom Bracket keeps the screen axes, so
|
|
642
|
+
* there `y` is the spine side. Unset, the spine side follows `cap`, so
|
|
643
|
+
* the caps just reach the members, and every other side is 4.
|
|
644
|
+
*/
|
|
645
|
+
padding?: number | {
|
|
646
|
+
x?: number;
|
|
647
|
+
y?: number;
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
/**
|
|
651
|
+
* Shared by Staff, Bracket and leaders; default `#000000`, 2 px, no halo
|
|
652
|
+
* (see {@link CollocationHalo}).
|
|
653
|
+
*/
|
|
654
|
+
line?: {
|
|
655
|
+
strokeColor?: string;
|
|
656
|
+
strokeWidth?: number;
|
|
657
|
+
halo?: CollocationHalo;
|
|
658
|
+
};
|
|
659
|
+
/**
|
|
660
|
+
* The leaders joining parts to the location, on screen and on the ground.
|
|
661
|
+
* `show: false` draws none, nor the Bracket's tick they would meet (the
|
|
662
|
+
* style is kept for when they show again; the members don't move);
|
|
663
|
+
* a part off its location then stands unconnected, and only its line work
|
|
664
|
+
* and members pick it. `strokeColor` and `strokeWidth` default to
|
|
665
|
+
* `line`'s, `strokeDash` to solid. The halo follows `line.halo`.
|
|
666
|
+
*/
|
|
667
|
+
leader?: CollocationStroke;
|
|
668
|
+
ground?: CollocationGround;
|
|
669
|
+
/** Kind-keyed bags handed, unread, to each member kind's capability. */
|
|
670
|
+
memberOptions?: CollocationMemberOptions;
|
|
671
|
+
}
|
|
672
|
+
/** Display style of a whole collocation. */
|
|
673
|
+
interface CollocationStyle {
|
|
674
|
+
/**
|
|
675
|
+
* 0–1 multiplier on everything the collocation draws: ground marks, part
|
|
676
|
+
* line work, members and Highlight, on top of each member's own opacity
|
|
677
|
+
* (e.g. a host's layer opacity). Display only; picking is unchanged.
|
|
678
|
+
* Default 1; values out of range are clamped and a non-finite value counts
|
|
679
|
+
* as 1.
|
|
680
|
+
*/
|
|
681
|
+
opacity?: number;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* A fifth Graphic kind: several point symbols and Markers presented as standing
|
|
685
|
+
* together at one location, in a Staff and a Bracket (ADR-0063).
|
|
686
|
+
*/
|
|
687
|
+
interface Collocation {
|
|
688
|
+
id: string;
|
|
689
|
+
kind: "collocation";
|
|
690
|
+
/** The location, if the host owns one; otherwise derived from member positions. */
|
|
691
|
+
position?: Position;
|
|
692
|
+
/** Host order. */
|
|
693
|
+
members: CollocationMember[];
|
|
694
|
+
placements?: {
|
|
695
|
+
staff?: PointSymbolPlacement;
|
|
696
|
+
bracket?: CollocationBracketPlacement;
|
|
697
|
+
};
|
|
698
|
+
/**
|
|
699
|
+
* The size every member is drawn at, in the shape of a point symbol's:
|
|
700
|
+
* screen-sized in `pixels`, or ground-sized in `meters` with optional
|
|
701
|
+
* `minPixels` / `maxPixels`. Members' own sizes are ignored. Absent or
|
|
702
|
+
* invalid, the point-symbol capability's `defaultSize` applies.
|
|
703
|
+
*/
|
|
704
|
+
size?: PointSymbolSize;
|
|
705
|
+
options?: CollocationOptions;
|
|
706
|
+
style?: CollocationStyle;
|
|
707
|
+
properties?: Record<string, unknown>;
|
|
708
|
+
schemaVersion: 1;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* What one committed step of a collocation edit changed (#761). Only the keys
|
|
712
|
+
* the step changed are present; a key present as `undefined` was cleared.
|
|
713
|
+
* Covers what gestures and part commands edit: an `updateGraphic` step that
|
|
714
|
+
* changes anything else (style, properties, other options, member graphics
|
|
715
|
+
* beyond their positions) reports only the covered keys.
|
|
716
|
+
*/
|
|
717
|
+
interface CollocationCommitChanges {
|
|
718
|
+
placements?: Collocation["placements"];
|
|
719
|
+
size?: PointSymbolSize;
|
|
720
|
+
/**
|
|
721
|
+
* The options the step changed, as a patch for
|
|
722
|
+
* {@link patchCollocationOptions}: `bracket.columns`, `undefined` when
|
|
723
|
+
* cleared.
|
|
724
|
+
*/
|
|
725
|
+
options?: CollocationOptions;
|
|
726
|
+
/**
|
|
727
|
+
* Member order and each member's `part` (`undefined`: its role decides),
|
|
728
|
+
* when either changed. Lists only the members the engine was given.
|
|
729
|
+
*/
|
|
730
|
+
members?: {
|
|
731
|
+
order: string[];
|
|
732
|
+
parts: Record<string, CollocationPart | undefined>;
|
|
733
|
+
};
|
|
734
|
+
/** The new position of each member whose position changed; `undefined` when cleared. */
|
|
735
|
+
memberPositions?: Record<string, Position | undefined>;
|
|
736
|
+
position?: Position;
|
|
737
|
+
}
|
|
738
|
+
/** A collocation member's image, in canonical SVG units. */
|
|
739
|
+
interface CollocationMemberIcon {
|
|
740
|
+
/** Content-derived identity reconciled as an ADR-0030 icon resource. */
|
|
741
|
+
resourceId: string;
|
|
742
|
+
svg: string;
|
|
743
|
+
width: number;
|
|
744
|
+
height: number;
|
|
745
|
+
}
|
|
746
|
+
/** What a capability is told when it draws one collocation member. */
|
|
747
|
+
interface CollocationMemberRenderContext {
|
|
748
|
+
/** The part the member stands in. */
|
|
749
|
+
part: CollocationPart;
|
|
750
|
+
/** This member kind's own `options.memberOptions` bag, unread by the engine. */
|
|
751
|
+
options?: Record<string, unknown>;
|
|
752
|
+
/**
|
|
753
|
+
* The app-wide Highlight appearance, every field resolved, when the member
|
|
754
|
+
* is highlighted; the capability draws it in the member's own shape. Widths
|
|
755
|
+
* are CSS pixels at the member's display size.
|
|
756
|
+
*/
|
|
757
|
+
highlight?: Required<HighlightAppearance>;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* A capability's drawing of one collocation member. Every coordinate is in
|
|
761
|
+
* canonical SVG units relative to the icon's top-left.
|
|
762
|
+
*/
|
|
763
|
+
interface CollocationMemberRender {
|
|
764
|
+
icon: CollocationMemberIcon;
|
|
765
|
+
/** What the layout aligns and stacks on (the frame). */
|
|
766
|
+
box: PointSymbolRect;
|
|
767
|
+
/** Everything drawn, labels included. */
|
|
768
|
+
extent: PointSymbolRect;
|
|
769
|
+
/** Where the Staff meets a flag; defaults to the box's left edge halfway down. */
|
|
770
|
+
attachment?: PointSymbolAnchor;
|
|
771
|
+
/**
|
|
772
|
+
* The width of the member's frame line in canonical units, which a Staff
|
|
773
|
+
* with `staff.strokeWidth: "frame"` matches. Absent for a member without a frame.
|
|
774
|
+
*/
|
|
775
|
+
strokeWidth?: number;
|
|
776
|
+
/** The color of the member's frame line, which a `staff.strokeColor: "frame"` Staff matches. */
|
|
777
|
+
strokeColor?: string;
|
|
778
|
+
/**
|
|
779
|
+
* The point Bracket rows line up on; defaults to the ordinary render's
|
|
780
|
+
* `octagonAnchor` for point symbols and the box centre for Markers.
|
|
781
|
+
*/
|
|
782
|
+
registration?: PointSymbolAnchor;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Optional collocation support on a member kind's capability (ADR-0063). The
|
|
786
|
+
* engine reads only role, box, extent, attachment, registration and size
|
|
787
|
+
* reference; it never reads a SIDC.
|
|
788
|
+
*/
|
|
789
|
+
interface CollocationMemberSupport<G> {
|
|
790
|
+
/** The part a member stands in unless its entry or `options.parts` says otherwise. */
|
|
791
|
+
role(graphic: G): CollocationPart;
|
|
792
|
+
render(graphic: G, context: CollocationMemberRenderContext): CollocationMemberRender;
|
|
793
|
+
/**
|
|
794
|
+
* Canonical SVG units the member's `size` maps to: the octagon height for
|
|
795
|
+
* point symbols, the icon height for Markers.
|
|
796
|
+
*/
|
|
797
|
+
sizeReference(graphic: G): number;
|
|
798
|
+
}
|
|
799
|
+
/** A member render with every engine fallback filled in. */
|
|
800
|
+
interface ResolvedCollocationMemberRender extends CollocationMemberRender {
|
|
801
|
+
attachment: PointSymbolAnchor;
|
|
802
|
+
registration: PointSymbolAnchor;
|
|
803
|
+
sizeReference: number;
|
|
804
|
+
/**
|
|
805
|
+
* The member is highlighted but its capability has no collocation support,
|
|
806
|
+
* so the engine cases its box in the Highlight appearance inside the part image.
|
|
807
|
+
*/
|
|
808
|
+
highlightCasing: boolean;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* The closed member kind → capability table (ADR-0063). Keys are the
|
|
812
|
+
* camelCase graphic kinds, as in `options.memberOptions`; a new member kind
|
|
813
|
+
* joins only by an engine change.
|
|
814
|
+
*/
|
|
815
|
+
interface CollocationMemberCapabilities {
|
|
816
|
+
pointSymbol?: PointSymbolCapability;
|
|
817
|
+
marker?: MarkerCapability;
|
|
818
|
+
}
|
|
819
|
+
/** Per-member inputs of a {@link CollocationRender}. */
|
|
820
|
+
interface CollocationRenderMember {
|
|
821
|
+
memberId: string;
|
|
822
|
+
part: CollocationPart;
|
|
823
|
+
/** Absent when the member's kind has no capability. */
|
|
824
|
+
render?: ResolvedCollocationMemberRender;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* ADR-0031 snapshot render for a collocation. It holds inputs only: the
|
|
828
|
+
* source graphic, the resolved location and each member's assigned part and
|
|
829
|
+
* render. Layout is recomputed from these per view.
|
|
830
|
+
*/
|
|
831
|
+
interface CollocationRender {
|
|
832
|
+
graphic: Collocation;
|
|
833
|
+
/** `undefined` when the collocation has no location and draws nothing. */
|
|
834
|
+
location?: Position;
|
|
835
|
+
/** The size every member is drawn at: {@link resolveCollocationSize}. */
|
|
836
|
+
size: PointSymbolSize;
|
|
837
|
+
members: CollocationRenderMember[];
|
|
838
|
+
}
|
|
839
|
+
declare function isCollocation(graphic: unknown): graphic is Collocation;
|
|
840
|
+
declare function cloneCollocation(collocation: Collocation): Collocation;
|
|
841
|
+
/**
|
|
842
|
+
* Throws a `TypeError` naming the first malformed field: an empty `id`, a
|
|
843
|
+
* `schemaVersion` other than 1, `members` not an array or a member without a
|
|
844
|
+
* graphic id, a non-finite `position`, or `options` not an object. Malformed
|
|
845
|
+
* option values don't throw: they resolve to their defaults, and
|
|
846
|
+
* {@link sanitizeCollocationOptions} drops them.
|
|
847
|
+
*/
|
|
848
|
+
declare function validateCollocation(collocation: Collocation): void;
|
|
849
|
+
/**
|
|
850
|
+
* A validated copy of `collocation` ({@link validateCollocation}) with
|
|
851
|
+
* `style.opacity` clamped to 0–1 (a non-finite one is 1) and malformed option
|
|
852
|
+
* values dropped by {@link sanitizeCollocationOptions}.
|
|
853
|
+
*/
|
|
854
|
+
declare function normalizeCollocation(collocation: Collocation): Collocation;
|
|
855
|
+
/** `style.opacity` clamped to 0–1; 1 when absent or not finite. */
|
|
856
|
+
declare function collocationOpacity(collocation: Pick<Collocation, "style">): number;
|
|
857
|
+
/**
|
|
858
|
+
* `previous` when it is structurally equal to `next`, else `next`. A host that
|
|
859
|
+
* rebuilds its collocations on every render (members referenced from its own
|
|
860
|
+
* symbols, not stored in the collocation) passes each one through this so an
|
|
861
|
+
* unchanged collocation keeps its object identity, and TacticalDraw's
|
|
862
|
+
* per-graphic render cache, which is keyed by identity, still hits:
|
|
863
|
+
*
|
|
864
|
+
* ```ts
|
|
865
|
+
* const next = buildCollocation(entry, symbols);
|
|
866
|
+
* const graphic = stableCollocation(previousById.get(next.id), next);
|
|
867
|
+
* previousById.set(graphic.id, graphic);
|
|
868
|
+
* ```
|
|
869
|
+
*
|
|
870
|
+
* Reused member graphics short-circuit the comparison, so it stays cheap. The
|
|
871
|
+
* comparison is key-set sensitive: `{ position: undefined }` differs from a
|
|
872
|
+
* missing `position`, so build the collocation the same way every time.
|
|
873
|
+
*/
|
|
874
|
+
declare function stableCollocation(previous: Collocation | undefined, next: Collocation): Collocation;
|
|
875
|
+
/**
|
|
876
|
+
* Deep-merge `patch` into `options` and return the result; neither argument
|
|
877
|
+
* is changed. Plain objects merge key by key, so one nested field changes in
|
|
878
|
+
* one call:
|
|
879
|
+
*
|
|
880
|
+
* ```ts
|
|
881
|
+
* options = patchCollocationOptions(options, { ground: { location: { mark: "dot" } } });
|
|
882
|
+
* ```
|
|
883
|
+
*
|
|
884
|
+
* Arrays and scalars replace, as does an object over a scalar (`gap: { x: 8 }`
|
|
885
|
+
* over `gap: 6`). A field set to
|
|
886
|
+
* `undefined` is removed, so it falls back to its default: every
|
|
887
|
+
* `CollocationOptions` field resolves an absent or invalid value to its
|
|
888
|
+
* default. Branches the patch doesn't touch keep their identity.
|
|
889
|
+
*/
|
|
890
|
+
declare function patchCollocationOptions(options: CollocationOptions | undefined, patch: CollocationOptions): CollocationOptions;
|
|
891
|
+
/**
|
|
892
|
+
* The collocation's location: `position` if given, else derived from its
|
|
893
|
+
* positioned members by `options.locate` in Web Mercator, with longitudes
|
|
894
|
+
* unwrapped against the first position so an antimeridian collocation doesn't
|
|
895
|
+
* centre on the far side. The result stays in the first position's world
|
|
896
|
+
* copy. `undefined` means no location: the collocation draws nothing.
|
|
897
|
+
*/
|
|
898
|
+
declare function resolveCollocationLocation(collocation: Collocation): Position | undefined;
|
|
899
|
+
/**
|
|
900
|
+
* The size every member of `collocation` is drawn at: its own `size`, else
|
|
901
|
+
* the point-symbol capability's `defaultSize`, else the Marker draw default.
|
|
902
|
+
* An invalid `size` (not finite or not positive) counts as absent.
|
|
903
|
+
*/
|
|
904
|
+
declare function resolveCollocationSize(collocation: Pick<Collocation, "size">, capabilities?: CollocationMemberCapabilities): PointSymbolSize;
|
|
905
|
+
/**
|
|
906
|
+
* The part `member` stands in, as {@link buildCollocationRender} assigns it:
|
|
907
|
+
* {@link assignCollocationPart} with the capability's role asked at the
|
|
908
|
+
* collocation's size. Pass `{ graphic }` alone for the part it would get
|
|
909
|
+
* without a `part` of its own.
|
|
910
|
+
*/
|
|
911
|
+
declare function collocationMemberPart(collocation: Collocation, member: CollocationMember, capabilities?: CollocationMemberCapabilities): CollocationPart;
|
|
912
|
+
/** Options for {@link buildCollocationRender}. */
|
|
913
|
+
interface BuildCollocationRenderOptions {
|
|
914
|
+
/** The app-wide Highlight appearance handed to highlighted members. */
|
|
915
|
+
highlight?: HighlightAppearance;
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Build the input-only {@link CollocationRender} snapshot: the resolved
|
|
919
|
+
* location and size and, per member, its part and its member render from the
|
|
920
|
+
* member kind's capability, with the engine fallback for a capability without
|
|
921
|
+
* `collocation` support. Capabilities see each member with the collocation's
|
|
922
|
+
* size in place of its own. A member whose kind has no capability is left
|
|
923
|
+
* unrendered. Each capability sees only its own `options.memberOptions` bag.
|
|
924
|
+
*/
|
|
925
|
+
declare function buildCollocationRender(collocation: Collocation, capabilities?: CollocationMemberCapabilities, options?: BuildCollocationRenderOptions): CollocationRender;
|
|
926
|
+
//#endregion
|
|
927
|
+
//#region src/point-symbol.d.ts
|
|
928
|
+
type PointSymbolSize = {
|
|
929
|
+
value: number;
|
|
930
|
+
unit: "pixels";
|
|
931
|
+
} | {
|
|
932
|
+
value: number;
|
|
933
|
+
unit: "meters"; /** Floor for the on-screen projection of the ground-based size; none when omitted. */
|
|
934
|
+
minPixels?: number; /** Cap on the on-screen projection of the ground-based size — typically the pixel size the symbol had when anchored to ground; unclamped when omitted. */
|
|
935
|
+
maxPixels?: number;
|
|
936
|
+
};
|
|
937
|
+
interface PointSymbolGraphicModifiers {
|
|
938
|
+
/** Radians clockwise, relative to the point symbol's own orientation. */
|
|
939
|
+
direction?: number;
|
|
940
|
+
}
|
|
941
|
+
interface PointSymbolColors {
|
|
942
|
+
fill?: string;
|
|
943
|
+
frame?: string;
|
|
944
|
+
icon?: string;
|
|
945
|
+
info?: string;
|
|
946
|
+
outline?: string;
|
|
947
|
+
}
|
|
948
|
+
interface PointSymbolStyle {
|
|
949
|
+
colors?: PointSymbolColors;
|
|
950
|
+
monoColor?: string;
|
|
951
|
+
opacity?: number;
|
|
952
|
+
/** 0–1 multiplier applied to both body and connector opacity; defaults to 1. */
|
|
953
|
+
overallOpacity?: number;
|
|
954
|
+
outlineWidth?: number;
|
|
955
|
+
fill?: boolean;
|
|
956
|
+
frame?: boolean;
|
|
957
|
+
icon?: boolean;
|
|
958
|
+
}
|
|
959
|
+
type PointSymbolPlacement = {
|
|
960
|
+
mode: "screen-relative";
|
|
961
|
+
offset: [number, number];
|
|
962
|
+
} | {
|
|
963
|
+
mode: "ground";
|
|
964
|
+
position: Position;
|
|
965
|
+
};
|
|
966
|
+
/**
|
|
967
|
+
* Modifier that temporarily activates offset placement for a body drag.
|
|
968
|
+
* @deprecated Use {@link ModifierKey}; kept as an alias.
|
|
969
|
+
*/
|
|
970
|
+
type OffsetDragModifier = ModifierKey;
|
|
971
|
+
type PointSymbolConnector = "auto" | "direct";
|
|
972
|
+
/** Optional connector overrides; omitted properties inherit symbol styling. */
|
|
973
|
+
interface PointSymbolOffsetStyle {
|
|
974
|
+
strokeColor?: string;
|
|
975
|
+
/** 0–1, independent of the body opacity. */
|
|
976
|
+
opacity?: number;
|
|
977
|
+
/** Fixed CSS-pixel width, independent of symbol size. */
|
|
978
|
+
strokeWidth?: number;
|
|
979
|
+
/** Alternating dash/gap lengths in CSS pixels; [] means solid. */
|
|
980
|
+
strokeDash?: number[];
|
|
981
|
+
}
|
|
982
|
+
interface PointSymbolOffset {
|
|
983
|
+
/** Gap at the symbol attachment end, measured along the line in CSS pixels; defaults to 0. */
|
|
984
|
+
anchorPadding?: number;
|
|
985
|
+
style?: PointSymbolOffsetStyle;
|
|
986
|
+
placement: PointSymbolPlacement;
|
|
987
|
+
connector: PointSymbolConnector;
|
|
988
|
+
/** Authored indicator length as a multiple of the displayed octagon size. */
|
|
989
|
+
indicatorLength?: number;
|
|
990
|
+
}
|
|
991
|
+
interface PointSymbol {
|
|
992
|
+
id: string;
|
|
993
|
+
kind: "point-symbol";
|
|
994
|
+
sidc: string;
|
|
995
|
+
position: Position;
|
|
996
|
+
/** Normalized radians clockwise from geographic north. */
|
|
997
|
+
rotation: number;
|
|
998
|
+
/** Milsymbol's octagon-based L dimension. */
|
|
999
|
+
size: PointSymbolSize;
|
|
1000
|
+
offset?: PointSymbolOffset;
|
|
1001
|
+
textAmplifiers?: TextAmplifiers;
|
|
1002
|
+
graphicModifiers?: PointSymbolGraphicModifiers;
|
|
1003
|
+
style?: PointSymbolStyle;
|
|
1004
|
+
rendererOptions?: {
|
|
1005
|
+
milsymbol?: Record<string, unknown>;
|
|
1006
|
+
};
|
|
1007
|
+
properties?: Record<string, unknown>;
|
|
1008
|
+
schemaVersion?: 1;
|
|
1009
|
+
}
|
|
1010
|
+
interface PointSymbolAnchor {
|
|
1011
|
+
x: number;
|
|
1012
|
+
y: number;
|
|
1013
|
+
}
|
|
1014
|
+
interface PointSymbolRect {
|
|
1015
|
+
x: number;
|
|
1016
|
+
y: number;
|
|
1017
|
+
width: number;
|
|
1018
|
+
height: number;
|
|
1019
|
+
}
|
|
1020
|
+
/** Canonical-size, renderer-neutral point-symbol output. */
|
|
1021
|
+
interface PointSymbolRender {
|
|
1022
|
+
/** Content-derived identity for adapter-wide native-resource reuse. */
|
|
1023
|
+
resourceId: string;
|
|
1024
|
+
svg: string;
|
|
1025
|
+
/** Renderer-space octagon size used to interpret persisted symbol size. */
|
|
1026
|
+
octagonSize: number;
|
|
1027
|
+
width: number;
|
|
1028
|
+
height: number;
|
|
1029
|
+
/**
|
|
1030
|
+
* Visible content box in canonical SVG units, relative to the image's
|
|
1031
|
+
* top-left. Footprints, hit tests and edit boxes use it, so transparent
|
|
1032
|
+
* padding (e.g. room for a soft halo) is not clickable; the image itself is
|
|
1033
|
+
* still drawn at `width × height`. Defaults to the full image.
|
|
1034
|
+
*/
|
|
1035
|
+
contentBounds?: PointSymbolRect;
|
|
1036
|
+
anchor: PointSymbolAnchor;
|
|
1037
|
+
octagonAnchor: PointSymbolAnchor;
|
|
1038
|
+
valid: boolean;
|
|
1039
|
+
validation?: unknown;
|
|
1040
|
+
/** Optional body/attachment capability. All coordinates are canonical SVG units. */
|
|
1041
|
+
offset?: {
|
|
1042
|
+
body: PointSymbolRender; /** Body registration in the ordinary image, preserving natural HQ placement. */
|
|
1043
|
+
ordinaryRegistration: PointSymbolAnchor;
|
|
1044
|
+
attachment: PointSymbolAnchor;
|
|
1045
|
+
indicator?: {
|
|
1046
|
+
direction: PointSymbolAnchor;
|
|
1047
|
+
length: number;
|
|
1048
|
+
minLength?: number;
|
|
1049
|
+
};
|
|
1050
|
+
strokeColor: string;
|
|
1051
|
+
strokeWidth: number;
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
interface PointSymbolCapability {
|
|
1055
|
+
readonly defaultSize: PointSymbolSize;
|
|
1056
|
+
readonly defaultRotation: number;
|
|
1057
|
+
render(symbol: PointSymbol): PointSymbolRender;
|
|
1058
|
+
invalidate(): void;
|
|
1059
|
+
/**
|
|
1060
|
+
* Monotonic counter that increments on each `invalidate()` call. Consumers
|
|
1061
|
+
* (e.g. a render cache keyed on graphic snapshot identity) may read this to
|
|
1062
|
+
* detect that previously rendered point-symbol output is stale even though
|
|
1063
|
+
* the graphic snapshot itself is unchanged. Optional — when absent,
|
|
1064
|
+
* invalidation cannot be detected by cache layers, so they must not attempt
|
|
1065
|
+
* to key on it.
|
|
1066
|
+
*/
|
|
1067
|
+
readonly generation?: number;
|
|
1068
|
+
/**
|
|
1069
|
+
* Optional collocation member support (ADR-0063). Without it a point symbol
|
|
1070
|
+
* stands in the Bracket, drawn from its ordinary render. Collocation member
|
|
1071
|
+
* images come from `collocation.render`, not `render`: a wrapper around a
|
|
1072
|
+
* capability must forward this member, and wrap its `render` too if the
|
|
1073
|
+
* wrapper changes how symbols look.
|
|
1074
|
+
*/
|
|
1075
|
+
readonly collocation?: CollocationMemberSupport<CollocationPointSymbol>;
|
|
1076
|
+
}
|
|
1077
|
+
declare function isPointSymbol(graphic: unknown): graphic is PointSymbol;
|
|
1078
|
+
declare function clonePointSymbol(symbol: PointSymbol): PointSymbol;
|
|
1079
|
+
/**
|
|
1080
|
+
* Replace a point-symbol size value as a user-driven resize. Ground-size display
|
|
1081
|
+
* bounds scale with the value so they continue to constrain zoom changes rather
|
|
1082
|
+
* than preventing the resize itself.
|
|
1083
|
+
*/
|
|
1084
|
+
declare function resizePointSymbolSize(size: PointSymbolSize, value: number): PointSymbolSize;
|
|
1085
|
+
//#endregion
|
|
1086
|
+
//#region src/fill-pattern.d.ts
|
|
1087
|
+
/**
|
|
1088
|
+
* Shared hatch fill-pattern tiles for area control-measure fills (ADR-0035
|
|
1089
|
+
* `FillPattern`, excluding `"solid"` which every adapter already renders as a
|
|
1090
|
+
* flat color). Both the MapLibre adapter (raster `addImage` pattern) and the
|
|
1091
|
+
* OpenLayers adapter (canvas `Pattern` fill) need the *same* diagonal-hatch
|
|
1092
|
+
* texture, so it is rasterized once here in pure math — no `HTMLCanvasElement`
|
|
1093
|
+
* — so it works in adapter code and in jsdom/node tests alike.
|
|
1094
|
+
*/
|
|
1095
|
+
type HatchPattern = PatternId;
|
|
1096
|
+
/**
|
|
1097
|
+
* Every non-solid `FillPattern` as a runtime list — the value-level companion
|
|
1098
|
+
* to {@link HatchPattern}, so adapters can test membership and build filter
|
|
1099
|
+
* expressions without re-spelling the pattern vocabulary.
|
|
1100
|
+
*/
|
|
1101
|
+
declare const HATCH_PATTERNS: readonly HatchPattern[];
|
|
1102
|
+
/** Tile edge, CSS px, of the mine-pictogram family (they use the full 32-unit tile). */
|
|
1103
|
+
declare const MINE_PATTERN_TILE_SIZE: number;
|
|
1104
|
+
/** True for the mine-pictogram family — a screen-space glyph texture rather than a repeating hatch. */
|
|
1105
|
+
declare function isMinePattern(pattern: HatchPattern): pattern is MinePattern;
|
|
1106
|
+
interface Rgba {
|
|
1107
|
+
r: number;
|
|
1108
|
+
g: number;
|
|
1109
|
+
b: number;
|
|
1110
|
+
a: number;
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Stable id for a rasterized tile, keyed by pattern and color. Adapters use
|
|
1114
|
+
* this as the image-registry key (MapLibre `addImage` id, OpenLayers pattern
|
|
1115
|
+
* cache key) so the same color+pattern never gets rasterized twice. Color is
|
|
1116
|
+
* lowercased so `"#FF0000"` and `"#ff0000"` share one texture.
|
|
1117
|
+
*/
|
|
1118
|
+
declare function fillPatternImageId(color: string, pattern: HatchPattern): string;
|
|
1119
|
+
/**
|
|
1120
|
+
* Tile edge length in device pixels for a given `pixelRatio`. Must be a power
|
|
1121
|
+
* of two — MapLibre requires POT dimensions for seamless WebGL texture wrap —
|
|
1122
|
+
* and scales linearly with `pixelRatio` for the ratios that matter in
|
|
1123
|
+
* practice (1x/2x displays: 32 -> 64, both already POT). Non-POT products
|
|
1124
|
+
* (e.g. a 3x ratio, 32*3=96) round up to the next POT rather than losing the
|
|
1125
|
+
* power-of-two guarantee.
|
|
1126
|
+
*/
|
|
1127
|
+
declare function fillPatternImageDimension(pixelRatio: number): number;
|
|
1128
|
+
/**
|
|
1129
|
+
* Parse a hex (`#rgb`, `#rgba`, `#rrggbb`, `#rrggbbaa`) or `rgb()`/`rgba()`
|
|
1130
|
+
* color string into normalized channels, alpha in `[0, 1]`. Unparseable input
|
|
1131
|
+
* falls back to opaque black rather than throwing, since a mis-themed fill
|
|
1132
|
+
* should still render *something*. Shared by every renderer that needs CSS
|
|
1133
|
+
* colors as numbers — hatch fills here, billboard pins in the MapLibre
|
|
1134
|
+
* adapter — so the accepted syntax stays identical across them.
|
|
1135
|
+
*/
|
|
1136
|
+
declare function parseColor(color: string): Rgba;
|
|
1137
|
+
/** The mine-pictogram members of {@link HatchPattern}, derived so the family stays in one place. */
|
|
1138
|
+
type MinePattern = Extract<HatchPattern, `mine-${string}`>;
|
|
1139
|
+
/** Coverage from the canonical command interpreter, exposed only for focused conformance tests. */
|
|
1140
|
+
/**
|
|
1141
|
+
* Rasterize one seamless hatch tile as a straight RGBA pixel buffer — no
|
|
1142
|
+
* canvas involved, so this runs identically in a browser adapter and in
|
|
1143
|
+
* jsdom/node tests. Every command, tile dimension, stroke, fill, and dash is
|
|
1144
|
+
* read from the public renderer-neutral pattern definition.
|
|
1145
|
+
*/
|
|
1146
|
+
declare function makeFillPatternImage(color: string, pattern: HatchPattern, pixelRatio?: number): {
|
|
1147
|
+
width: number;
|
|
1148
|
+
height: number;
|
|
1149
|
+
data: Uint8ClampedArray;
|
|
1150
|
+
};
|
|
1151
|
+
//#endregion
|
|
1152
|
+
//#region src/map-adapter.d.ts
|
|
1153
|
+
type PixelCoordinate = [number, number];
|
|
1154
|
+
type MapCursor = "" | "default" | "crosshair" | "grab" | "grabbing" | "pointer" | "move";
|
|
1155
|
+
interface MapEvent {
|
|
1156
|
+
type: string;
|
|
1157
|
+
coordinate: Position;
|
|
1158
|
+
pixel: PixelCoordinate;
|
|
1159
|
+
originalEvent: unknown;
|
|
1160
|
+
}
|
|
1161
|
+
type MapEventHandler = (event: MapEvent) => void;
|
|
1162
|
+
interface StyleOptions {
|
|
1163
|
+
strokeColor?: string;
|
|
1164
|
+
strokeWidth?: number;
|
|
1165
|
+
strokeDash?: number[];
|
|
1166
|
+
fillColor?: string;
|
|
1167
|
+
pointFillColor?: string;
|
|
1168
|
+
pointRadius?: number;
|
|
1169
|
+
text?: TextStyleOptions;
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Text (label) style for a layer. When `labelProperty` is set, adapters also
|
|
1173
|
+
* read per-feature label properties: `rotation` (radians, rendered as
|
|
1174
|
+
* `π − rotation`), the size anchor's `textSizeMeters` (ground) or
|
|
1175
|
+
* `textSizePixels` (screen) (ADR-0028), `textAnchor` (`"start"` = text
|
|
1176
|
+
* begins at the label point, `"end"` = text ends there; absent = centered),
|
|
1177
|
+
* and the screen-space offset `textAnchorGap`/`textBaselineShift` (ems of the
|
|
1178
|
+
* rendered size, applied after rotation in the text's own frame; read it as
|
|
1179
|
+
* `[right, down]` with `labelTextOffsetEms`, ADR-0068).
|
|
1180
|
+
* A ground-anchored label renders at `textSizeMeters / resolution`, pinned at
|
|
1181
|
+
* `textSizeMaxPixels` and faded out then hidden below `textSizeMinPixels`
|
|
1182
|
+
* (`resolveTextAppearance`, ADR-0060); a screen-anchored one at a constant
|
|
1183
|
+
* `textSizePixels`, unclamped.
|
|
1184
|
+
*/
|
|
1185
|
+
interface TextStyleOptions {
|
|
1186
|
+
text?: string;
|
|
1187
|
+
labelProperty?: string;
|
|
1188
|
+
font?: string;
|
|
1189
|
+
fillColor?: string;
|
|
1190
|
+
strokeColor?: string;
|
|
1191
|
+
strokeWidth?: number;
|
|
1192
|
+
rotation?: number;
|
|
1193
|
+
/**
|
|
1194
|
+
* Lower edge of the ground-anchored label band (ADR-0060): zoomed out past
|
|
1195
|
+
* it, a label keeps shrinking with its graphic while it fades out, then
|
|
1196
|
+
* hides, so it never outgrows the area it names.
|
|
1197
|
+
* @default 4
|
|
1198
|
+
*/
|
|
1199
|
+
textSizeMinPixels?: number;
|
|
1200
|
+
/**
|
|
1201
|
+
* Upper edge of the ground-anchored label band (ADR-0028): text never
|
|
1202
|
+
* renders above this pixel size, however far the view zooms in.
|
|
1203
|
+
* @default 24
|
|
1204
|
+
*/
|
|
1205
|
+
textSizeMaxPixels?: number;
|
|
1206
|
+
}
|
|
1207
|
+
/**
|
|
1208
|
+
* Per-feature style for edit handles (vertex / midpoint / translate / rotate).
|
|
1209
|
+
* The producer (`TacticalDraw`) rides this on `properties.style`; the adapter
|
|
1210
|
+
* reads it back when rendering the handle, so it is part of the adapter
|
|
1211
|
+
* contract rather than the tactical-draw authoring surface. `pointRadius` is a
|
|
1212
|
+
* UI affordance not present on `ControlMeasureStyle`. See ADR-0006.
|
|
1213
|
+
*/
|
|
1214
|
+
interface HandleStyle {
|
|
1215
|
+
strokeColor?: string;
|
|
1216
|
+
strokeWidth?: number;
|
|
1217
|
+
strokeDash?: readonly number[];
|
|
1218
|
+
fillColor?: string;
|
|
1219
|
+
/**
|
|
1220
|
+
* How `fillColor` paints a filled part's interior. Absent or `"solid"` is
|
|
1221
|
+
* today's flat fill; `"hatch"`/`"reverse-hatch"`/`"cross-hatch"`/`"horizontal"`/`"vertical"`/`"dots"` request the shared pattern texture
|
|
1222
|
+
* ({@link makeFillPatternImage}). Alpha rides in `fillColor` — there is no
|
|
1223
|
+
* separate opacity field. Adapters that cannot rasterize a pattern degrade
|
|
1224
|
+
* to solid. Per-feature only: layer-level `StyleOptions` has no equivalent.
|
|
1225
|
+
*/
|
|
1226
|
+
fillPattern?: "solid" | HatchPattern;
|
|
1227
|
+
pointRadius?: number;
|
|
1228
|
+
/**
|
|
1229
|
+
* Highlight casing color for a line or area part (the renderer's resolved
|
|
1230
|
+
* `style.highlight`, opacity already folded in). Adapters paint a solid
|
|
1231
|
+
* casing `highlightCasingWidth(strokeWidth)` wide along the geometry —
|
|
1232
|
+
* outline only for an area — beneath every fill and stroke of the
|
|
1233
|
+
* feature's group, even when the stroke itself is transparent. The casing
|
|
1234
|
+
* is display-only: it never widens the feature's hit area. Per-feature
|
|
1235
|
+
* only: layer-level `StyleOptions` has no equivalent. Not to be confused
|
|
1236
|
+
* with the transient passive outline of `setPassiveOutlines`.
|
|
1237
|
+
*/
|
|
1238
|
+
highlightColor?: string;
|
|
1239
|
+
/**
|
|
1240
|
+
* Casing reach past each side of the stroke in CSS pixels (the renderer's
|
|
1241
|
+
* resolved `HighlightAppearance.width`); absent means
|
|
1242
|
+
* `HIGHLIGHT_CASING_OUTSET_CSS_PIXELS`, and `0` paints no casing.
|
|
1243
|
+
*/
|
|
1244
|
+
highlightWidth?: number;
|
|
1245
|
+
/**
|
|
1246
|
+
* Glow reach past the casing in CSS pixels (the renderer's resolved
|
|
1247
|
+
* `HighlightAppearance.glow`); absent means no glow. Adapters paint the
|
|
1248
|
+
* `HIGHLIGHT_GLOW_BANDS` beneath every casing of the group, as plain
|
|
1249
|
+
* translucent strokes. Display-only like the casing.
|
|
1250
|
+
*/
|
|
1251
|
+
highlightGlow?: number;
|
|
1252
|
+
}
|
|
1253
|
+
type LayerId = string;
|
|
1254
|
+
/** Canonical SVG resource shared by point features through `iconId`. */
|
|
1255
|
+
interface IconResource {
|
|
1256
|
+
id: string;
|
|
1257
|
+
svg: string;
|
|
1258
|
+
width: number;
|
|
1259
|
+
height: number;
|
|
1260
|
+
anchor: [number, number];
|
|
1261
|
+
/**
|
|
1262
|
+
* Visible content box in unscaled canvas coordinates. Icon picks and their
|
|
1263
|
+
* footprints use it instead of the full canvas, so transparent padding is not
|
|
1264
|
+
* hit area; the icon is still drawn at `width × height`. Defaults to the full
|
|
1265
|
+
* canvas.
|
|
1266
|
+
*/
|
|
1267
|
+
contentRect?: PointSymbolRect;
|
|
1268
|
+
/**
|
|
1269
|
+
* Direct visible mark used to rank icon picks, in unscaled canvas coordinates.
|
|
1270
|
+
* Hits elsewhere in the full canvas measure their distance from this rectangle;
|
|
1271
|
+
* omit it to preserve whole-canvas distance-zero behavior.
|
|
1272
|
+
*/
|
|
1273
|
+
coreRect?: PointSymbolRect;
|
|
1274
|
+
/**
|
|
1275
|
+
* Line work that is the icon's only hit area, in unscaled canvas
|
|
1276
|
+
* coordinates: a pick hits within the tolerance plus half of `width` (both
|
|
1277
|
+
* scaled with the icon) of one of these polylines, and nowhere else in the
|
|
1278
|
+
* image. Used for drawings that are mostly empty canvas, such as a
|
|
1279
|
+
* collocation's Staff or Bracket (ADR-0063). Overrides `contentRect` and
|
|
1280
|
+
* `coreRect` for picking.
|
|
1281
|
+
*/
|
|
1282
|
+
hitLines?: readonly IconHitLine[];
|
|
1283
|
+
}
|
|
1284
|
+
/** One polyline of {@link IconResource.hitLines}. */
|
|
1285
|
+
interface IconHitLine {
|
|
1286
|
+
points: readonly (readonly [number, number])[];
|
|
1287
|
+
/** Stroke width in canvas units. */
|
|
1288
|
+
width: number;
|
|
1289
|
+
}
|
|
1290
|
+
/** A self-contained image fixed to four geographic corners, ordered TL/TR/BR/BL. */
|
|
1291
|
+
interface ImageOverlayResource {
|
|
1292
|
+
id: string;
|
|
1293
|
+
url: string;
|
|
1294
|
+
width: number;
|
|
1295
|
+
height: number;
|
|
1296
|
+
coordinates: readonly [Position, Position, Position, Position];
|
|
1297
|
+
opacity: number;
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* One stable, atomic unit in a logical layer's bottom-to-top paint stack.
|
|
1301
|
+
*
|
|
1302
|
+
* Features paint in array order inside the group. A filled feature paints its
|
|
1303
|
+
* interior before its outline, and text or icon content paints at that
|
|
1304
|
+
* feature's array position. An empty group is valid and keeps its identity and
|
|
1305
|
+
* stack position.
|
|
1306
|
+
*
|
|
1307
|
+
* Any feature may carry these generic seam fields (ADR-0063), read through the
|
|
1308
|
+
* helpers in `feature-seam-fields.ts`:
|
|
1309
|
+
* - `iconOffset: [x, y]` — on an icon feature, the offset from its point to the
|
|
1310
|
+
* resource anchor, in resource units; it scales with the icon's display size
|
|
1311
|
+
* and turns with its rotation (MapLibre `icon-offset`, OpenLayers and
|
|
1312
|
+
* Leaflet a shifted anchor). See `resolveIconAnchor`. Pair it with
|
|
1313
|
+
* `iconScreenRotation`, not a non-zero `iconRotation`, when the map may
|
|
1314
|
+
* turn: MapLibre draws icons with `icon-rotation-alignment: viewport`, so
|
|
1315
|
+
* an `iconRotation` there holds its angle on screen while OpenLayers and
|
|
1316
|
+
* the shared picker turn it (and the offset with it) with the bearing.
|
|
1317
|
+
* - `iconScreenRotation` — on an icon feature, a rotation in radians clockwise
|
|
1318
|
+
* on screen that replaces `iconRotation` and ignores the map bearing, so the
|
|
1319
|
+
* icon keeps that angle however the map turns (OpenLayers
|
|
1320
|
+
* `rotateWithView: false`). See `resolveIconScreenRotation`.
|
|
1321
|
+
* - `hitArea: false` — the feature is drawn but never picked; the shared
|
|
1322
|
+
* screen-space picker drops it, so picks fall through to what lies beneath.
|
|
1323
|
+
*/
|
|
1324
|
+
interface FeatureGroup {
|
|
1325
|
+
/** Optional view-only point-symbol presentation; ordinary features are the fallback. */
|
|
1326
|
+
pin?: PinRender;
|
|
1327
|
+
id: string;
|
|
1328
|
+
features: readonly Feature[];
|
|
1329
|
+
iconResources: readonly IconResource[];
|
|
1330
|
+
/**
|
|
1331
|
+
* Ground-anchored rasters painted atomically with this Graphic.
|
|
1332
|
+
*
|
|
1333
|
+
* Each overlay also needs a feature in `features` whose `properties.imageOverlayId`
|
|
1334
|
+
* is the overlay's `id`, with a polygon whose ring starts TL, TR, BR, BL. OpenLayers
|
|
1335
|
+
* paints an overlay only through the feature that names it, positioned from that
|
|
1336
|
+
* feature's geometry rather than `coordinates`, and silently drops an overlay no
|
|
1337
|
+
* feature names. MapLibre and Leaflet don't read the property, so such a bug shows
|
|
1338
|
+
* only on OpenLayers.
|
|
1339
|
+
*/
|
|
1340
|
+
imageOverlays?: readonly ImageOverlayResource[];
|
|
1341
|
+
/**
|
|
1342
|
+
* Monotonic stamp identifying this group's rendered content, when the
|
|
1343
|
+
* producer supplies one. Two groups with the same `id` and the same
|
|
1344
|
+
* `revision` carry byte-identical `features` and `iconResources`, so an
|
|
1345
|
+
* adapter may skip any diff or upload work for them. A missing `revision`
|
|
1346
|
+
* means "unknown" — adapters must fall back to their own comparison and
|
|
1347
|
+
* must never treat two absent stamps as equal.
|
|
1348
|
+
*/
|
|
1349
|
+
revision?: number;
|
|
1350
|
+
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Click-style hit event delivered by {@link MapAdapter.onPick}.
|
|
1353
|
+
*
|
|
1354
|
+
* `id` is the control measure id, already split off the feature id by the
|
|
1355
|
+
* adapter (see `controlMeasureIdFromFeature`).
|
|
1356
|
+
*
|
|
1357
|
+
* `originalEvent` is whatever the engine surfaces — OpenLayers normalises to
|
|
1358
|
+
* `PointerEvent`, MapLibre delivers `MouseEvent`, Leaflet delivers
|
|
1359
|
+
* `MouseEvent | TouchEvent`. Do not narrow to `PointerEvent` at the consumer.
|
|
1360
|
+
*/
|
|
1361
|
+
interface PickEvent {
|
|
1362
|
+
id: string;
|
|
1363
|
+
feature: Feature;
|
|
1364
|
+
pixel: PixelCoordinate;
|
|
1365
|
+
coordinate: Position;
|
|
1366
|
+
originalEvent: MouseEvent | PointerEvent | TouchEvent;
|
|
1367
|
+
/**
|
|
1368
|
+
* Set by `TacticalDraw` when the hit is part of a collocation (ADR-0063):
|
|
1369
|
+
* the part, plus `memberId` for a member image. Part line work and its
|
|
1370
|
+
* in-image leader report `part` only; ground marks are never hit. `id`
|
|
1371
|
+
* stays the collocation's id. Adapters never set it.
|
|
1372
|
+
*/
|
|
1373
|
+
collocation?: {
|
|
1374
|
+
part: "staff" | "bracket";
|
|
1375
|
+
memberId?: string;
|
|
1376
|
+
};
|
|
1377
|
+
}
|
|
1378
|
+
type PickHandler = (event: PickEvent) => void;
|
|
1379
|
+
interface PickOptions {
|
|
1380
|
+
signal?: AbortSignal;
|
|
1381
|
+
}
|
|
1382
|
+
interface MapAdapter {
|
|
1383
|
+
onPinPresentationStatusChange?(handler: (event: PinPresentationStatusEvent) => void): () => void;
|
|
1384
|
+
getPinPresentationCapability?(graphicId?: string): PinPresentationCapability;
|
|
1385
|
+
getPinFootprint?(graphicId: string): PinFootprint | null;
|
|
1386
|
+
pickPin?(graphicId: string, pixel: PixelCoordinate, tolerance: number): boolean;
|
|
1387
|
+
/** Invert a pinned attachment for a location drag, preserving pointer grab. */
|
|
1388
|
+
movePinFromPixel?(graphicId: string, attachment: PixelCoordinate): Position | null;
|
|
1389
|
+
/**
|
|
1390
|
+
* Add a vector layer to the map.
|
|
1391
|
+
* @returns unique layer ID
|
|
1392
|
+
*/
|
|
1393
|
+
addVectorLayer(options?: {
|
|
1394
|
+
style?: StyleOptions;
|
|
1395
|
+
}): LayerId;
|
|
1396
|
+
/**
|
|
1397
|
+
* Remove a layer from the map.
|
|
1398
|
+
*/
|
|
1399
|
+
removeLayer(layerId: LayerId): void;
|
|
1400
|
+
/**
|
|
1401
|
+
* Set the style for a specific layer.
|
|
1402
|
+
*/
|
|
1403
|
+
setLayerStyle(layerId: LayerId, style: StyleOptions): void;
|
|
1404
|
+
/**
|
|
1405
|
+
* Reconcile one complete bottom-to-top desired state for a logical layer.
|
|
1406
|
+
*
|
|
1407
|
+
* Group IDs must be non-empty and unique within the layer. Every feature
|
|
1408
|
+
* must have an ID that is unique across all groups in the layer. Invalid
|
|
1409
|
+
* desired state throws synchronously before cache, resource, or engine
|
|
1410
|
+
* mutation.
|
|
1411
|
+
*/
|
|
1412
|
+
setLayerFeatureGroups(layerId: LayerId, groups: readonly FeatureGroup[]): void;
|
|
1413
|
+
/**
|
|
1414
|
+
* Subscribe to click-style "pick" events for a specific layer. Basemap and
|
|
1415
|
+
* other-layer clicks never fire the handler.
|
|
1416
|
+
*
|
|
1417
|
+
* For control-measure features, adapters must set `PickEvent.id` to the
|
|
1418
|
+
* originating control-measure id (not the rendered part's feature id).
|
|
1419
|
+
* Features that do not satisfy the control-measure feature-id contract must
|
|
1420
|
+
* be ignored rather than dispatched.
|
|
1421
|
+
*
|
|
1422
|
+
* Bound to the engine's tap-suppressing click event (OL `singleclick`,
|
|
1423
|
+
* MapLibre `click`, Leaflet `click`) so the handler does not fire at the
|
|
1424
|
+
* end of a pan or pinch-zoom gesture.
|
|
1425
|
+
*
|
|
1426
|
+
* Hit tolerance is pointer-type aware: 4 px for mouse/pen, 12 px for touch.
|
|
1427
|
+
* Outline-only polygon interiors additionally have bounded inward selection
|
|
1428
|
+
* reach from visible viewport-clipped boundaries: 24 px for mouse/pen and
|
|
1429
|
+
* 36 px for touch. A visible solid or patterned fill owns its full interior.
|
|
1430
|
+
* For grouped desired state, comparable hits follow authoritative group
|
|
1431
|
+
* order even when the engine reports another native order. A fully opaque
|
|
1432
|
+
* solid fill in a higher group suppresses lower candidates beneath its
|
|
1433
|
+
* interior; translucent and patterned fills leave visible lower marks
|
|
1434
|
+
* eligible.
|
|
1435
|
+
*
|
|
1436
|
+
* Returns an unsubscribe function. The returned function and the optional
|
|
1437
|
+
* `signal` are both honoured; either teardown path stops further events,
|
|
1438
|
+
* and both are idempotent.
|
|
1439
|
+
*/
|
|
1440
|
+
onPick(layerId: LayerId, handler: PickHandler, opts?: PickOptions): () => void;
|
|
1441
|
+
/**
|
|
1442
|
+
* Map Event Listeners
|
|
1443
|
+
*
|
|
1444
|
+
* Ordering contract: a `"click"` handler and the `onPick` handlers for the
|
|
1445
|
+
* same user click MUST observe the pick first — adapters deliver picks and
|
|
1446
|
+
* `"click"` from the same underlying engine event, in registration order.
|
|
1447
|
+
* The draw/edit controllers register their pick subscriptions before their
|
|
1448
|
+
* click handler and read the stashed pick inside it (click-away close /
|
|
1449
|
+
* close-then-pick re-dispatch); an adapter that fires `"click"` from an
|
|
1450
|
+
* earlier engine event than its picks breaks that contract (e.g. OL
|
|
1451
|
+
* `click` vs `singleclick`).
|
|
1452
|
+
*/
|
|
1453
|
+
on(eventType: "click" | "pointermove" | "dblclick", handler: MapEventHandler): void;
|
|
1454
|
+
off(eventType: "click" | "pointermove" | "dblclick", handler: MapEventHandler): void;
|
|
1455
|
+
/**
|
|
1456
|
+
* Projection / Coordinate Utilities
|
|
1457
|
+
*/
|
|
1458
|
+
toLonLat(coordinate: number[]): Position;
|
|
1459
|
+
fromLonLat(position: Position): number[];
|
|
1460
|
+
getPixelFromCoordinate(position: Position): PixelCoordinate | null;
|
|
1461
|
+
/**
|
|
1462
|
+
* Convert a viewport pixel to longitude/latitude. Optional so third-party
|
|
1463
|
+
* adapters compiled against an older ABI remain valid.
|
|
1464
|
+
*/
|
|
1465
|
+
getCoordinateFromPixel?(pixel: PixelCoordinate): Position | null;
|
|
1466
|
+
/**
|
|
1467
|
+
* Get current viewport size in CSS pixels.
|
|
1468
|
+
*/
|
|
1469
|
+
getViewportSize(): {
|
|
1470
|
+
width: number;
|
|
1471
|
+
height: number;
|
|
1472
|
+
};
|
|
1473
|
+
/**
|
|
1474
|
+
* Pan the map by pixel delta.
|
|
1475
|
+
* Positive delta means desired on-screen feature shift (right/down).
|
|
1476
|
+
*/
|
|
1477
|
+
panByPixels(delta: PixelCoordinate, options?: {
|
|
1478
|
+
durationMs?: number;
|
|
1479
|
+
}): void;
|
|
1480
|
+
/**
|
|
1481
|
+
* Set the map viewport cursor. Pass an empty string to restore engine default styling.
|
|
1482
|
+
*/
|
|
1483
|
+
setCursor(cursor: MapCursor): void;
|
|
1484
|
+
/**
|
|
1485
|
+
* Toggle the engine's native double-click-to-zoom gesture. `TacticalDraw`
|
|
1486
|
+
* disables this for the lifetime of a variable-length draw so the commit
|
|
1487
|
+
* `dblclick` doesn't also zoom the map.
|
|
1488
|
+
*/
|
|
1489
|
+
setDoubleClickZoomEnabled(enabled: boolean): void;
|
|
1490
|
+
/**
|
|
1491
|
+
* Get current view resolution (meters per pixel at center or generally).
|
|
1492
|
+
* returns undefined if not supported or not ready.
|
|
1493
|
+
*/
|
|
1494
|
+
getResolution(): number | undefined;
|
|
1495
|
+
/**
|
|
1496
|
+
* Get current map zoom level
|
|
1497
|
+
*/
|
|
1498
|
+
getZoom(): number | undefined;
|
|
1499
|
+
/**
|
|
1500
|
+
* Get current view bearing, radians — the clockwise-from-north compass
|
|
1501
|
+
* direction that screen-up points to (MapLibre-bearing semantics). `0` for
|
|
1502
|
+
* engines/views that don't rotate.
|
|
1503
|
+
*/
|
|
1504
|
+
getBearing(): number;
|
|
1505
|
+
/**
|
|
1506
|
+
* Listen for view changes (zoom/resolution)
|
|
1507
|
+
*/
|
|
1508
|
+
onViewChange(handler: () => void): void;
|
|
1509
|
+
offViewChange(handler: () => void): void;
|
|
1510
|
+
/**
|
|
1511
|
+
* The engine evaluates the meters→pixels clamp for ground-sized point
|
|
1512
|
+
* symbols inside its own style layer, so meters-sized point symbols don't
|
|
1513
|
+
* need view-change re-renders for size.
|
|
1514
|
+
*/
|
|
1515
|
+
readonly scalesGroundPointSymbolsNatively?: boolean;
|
|
1516
|
+
/**
|
|
1517
|
+
* Construct an {@link EditPointerDriver} for `TacticalDraw`'s edit
|
|
1518
|
+
* controller. The controller subscribes to pointer events on the returned
|
|
1519
|
+
* driver to wire handle drags (vertex / midpoint / translate / rotate).
|
|
1520
|
+
*/
|
|
1521
|
+
createEditPointerDriver(): EditPointerDriver;
|
|
1522
|
+
/**
|
|
1523
|
+
* Release all adapter-owned map resources. Adapters must not be used after
|
|
1524
|
+
* destruction.
|
|
1525
|
+
*/
|
|
1526
|
+
destroy(): void;
|
|
1527
|
+
/**
|
|
1528
|
+
* Returns the features currently set on the layer — the adapter-side cache
|
|
1529
|
+
* of the last grouped mutation, flattened in bottom-to-top group
|
|
1530
|
+
* order. Empty array for an unknown layer. The private ordered group cache is
|
|
1531
|
+
* not exposed. Callers must not mutate the returned array or features.
|
|
1532
|
+
*/
|
|
1533
|
+
getLayerFeatures(layerId: LayerId): readonly Feature[];
|
|
1534
|
+
}
|
|
1535
|
+
//#endregion
|
|
1536
|
+
export { CollocationLocate as $, DEFAULT_PIN_PRESENTATION as $t, PointSymbolColors as A, validateCollocation as At, clonePointSymbol as B, isMarker as Bt, isMinePattern as C, collocationOpacity as Ct, PointSymbol as D, resolveCollocationLocation as Dt, OffsetDragModifier as E, patchCollocationOptions as Et, PointSymbolPlacement as F, MarkerRender as Ft, Collocation as G, EditModifiers as Gt, resizePointSymbolSize as H, normalizeMarker as Ht, PointSymbolRect as I, MarkerSize as It, CollocationBracketShape as J, ResolvedEditModifiers as Jt, CollocationAreaStyle as K, ModifierKey as Kt, PointSymbolRender as L, MarkerStyle as Lt, PointSymbolGraphicModifiers as M, MarkerAnchor as Mt, PointSymbolOffset as N, MarkerCapability as Nt, PointSymbolAnchor as O, resolveCollocationSize as Ot, PointSymbolOffsetStyle as P, MarkerIcon as Pt, CollocationHalo as Q, PointerEventInfo as Qt, PointSymbolSize as R, cloneMarker as Rt, fillPatternImageId as S, collocationMemberPart as St, parseColor as T, normalizeCollocation as Tt, BuildCollocationRenderOptions as U, validateMarker as Ut, isPointSymbol as V, markerOpacity as Vt, COLLOCATION_SCREEN_RELATIVE_REACH as W, DEFAULT_EDIT_MODIFIERS as Wt, CollocationCommitChanges as X, EditPointerDriver as Xt, CollocationBracketSide as Y, readPickModifiers as Yt, CollocationGround as Z, PointerCallback as Zt, HATCH_PATTERNS as _, CollocationStroke as _t, ImageOverlayResource as a, PinPresentationState as an, CollocationMemberOptionTypes as at, Rgba as b, buildCollocationRender as bt, MapCursor as c, PinPresentationStore as cn, CollocationMemberRenderContext as ct, PickEvent as d, isValidPinNumber as dn, CollocationPart as dt, PinFootprint as en, CollocationMarker as et, PickHandler as f, pinDistanceScale as fn, CollocationPartDrag as ft, TextStyleOptions as g, CollocationRenderMember as gt, StyleOptions as h, CollocationRender as ht, IconResource as i, PinPresentationPatch as in, CollocationMemberIcon as it, PointSymbolConnector as j, Marker as jt, PointSymbolCapability as k, stableCollocation as kt, MapEvent as l, PinRender as ln, CollocationMemberSupport as lt, PixelCoordinate as m, resolvePinPresentation as mn, CollocationPointSymbol as mt, HandleStyle as n, PinPresentation as nn, CollocationMemberCapabilities as nt, LayerId as o, PinPresentationStatus as on, CollocationMemberOptions as ot, PickOptions as p, pinZoomScale as pn, CollocationPlate as pt, CollocationBracketPlacement as q, PickModifiers as qt, IconHitLine as r, PinPresentationCapability as rn, CollocationMemberGraphic as rt, MapAdapter as s, PinPresentationStatusEvent as sn, CollocationMemberRender as st, FeatureGroup as t, PinOverridePatch as tn, CollocationMember as tt, MapEventHandler as u, combinePinScale as un, CollocationOptions as ut, HatchPattern as v, CollocationStyle as vt, makeFillPatternImage as w, isCollocation as wt, fillPatternImageDimension as x, cloneCollocation as xt, MINE_PATTERN_TILE_SIZE as y, ResolvedCollocationMemberRender as yt, PointSymbolStyle as z, composeMarkerCapabilities as zt };
|