@orbat-mapper/control-measures 0.2.0-alpha.1 → 0.2.0-alpha.3

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 CHANGED
@@ -1,1441 +1,2 @@
1
- import { Feature, FeatureCollection, Geometry, LineString, MultiLineString, MultiPolygon, Point, Polygon, Position } from "geojson";
2
-
3
- //#region src/internal/api-utils.d.ts
4
- type ValidationMode = "silent" | "warn" | "throw";
5
- //#endregion
6
- //#region src/draw-rules/types.d.ts
7
- interface AnchorTransformEvent {
8
- previous: readonly Position[];
9
- next: readonly Position[];
10
- activePointIndex?: number;
11
- }
12
- interface ControlMeasureDrawRule {
13
- readonly id: string;
14
- readonly minimumUserPoints: number;
15
- readonly canonicalPointCount?: number;
16
- /**
17
- * Number of raw (clicked + rubber-band) points at which `derive` can already
18
- * produce a renderable canonical shape, so the draw controller renders a live
19
- * symbol preview instead of the bare vertex-marker outline. Lets a measure
20
- * show feedback before the full `minimumUserPoints` commit threshold is
21
- * reached — e.g. Area21 pads two points (first click + cursor) up to its
22
- * three-point search-area shape. Must be <= `minimumUserPoints`. Defaults to
23
- * `minimumUserPoints` (no early preview).
24
- */
25
- readonly minimumPreviewPoints?: number;
26
- /**
27
- * Number of trailing slots in the canonical control-point array that are
28
- * NOT user-clicked spine vertices. For Axis1, this is 1 (the width handle
29
- * at index N-1). Drives four behaviors in TacticalDraw:
30
- * 1. New clicks insert at `length - trailingFixedSlots` (not appended).
31
- * 2. Midpoint handles render only between segments inside
32
- * [0 .. length - 1 - trailingFixedSlots].
33
- * 3. The "click the last added point to commit" hit test uses
34
- * `committed[length - 1 - trailingFixedSlots]`.
35
- * 4. `canCommit` evaluates `length - trailingFixedSlots >= minimumUserPoints`.
36
- * Defaults to 0 (the entire array is user-clicked spine). See ADR-0008.
37
- */
38
- readonly trailingFixedSlots?: number;
39
- derive(points: readonly Position[]): Position[];
40
- transform(event: AnchorTransformEvent): Position[];
41
- }
42
- //#endregion
43
- //#region src/metadata.d.ts
44
- type ControlMeasureGeometryType = Geometry["type"];
45
- type ControlMeasureGeometry = "point" | "line" | "area";
46
- declare const DRAW_RULE_IDS: readonly ["Area1", "Area7", "Area8", "Area11", "Area12", "Area15", "Area21", "Axis1", "Line1", "Line3", "Line9", "Line10", "Line23", "Line24", "Line29", "Point12"];
47
- type DrawRuleId = (typeof DRAW_RULE_IDS)[number];
48
- interface BaseParamDescriptor {
49
- key: string;
50
- label: string;
51
- description?: string;
52
- visibleWhen?: (opts: Record<string, unknown>) => boolean;
53
- }
54
- interface NumberParamDescriptor extends BaseParamDescriptor {
55
- type: "number";
56
- min?: number;
57
- max?: number;
58
- step?: number;
59
- unit?: string;
60
- }
61
- interface BooleanParamDescriptor extends BaseParamDescriptor {
62
- type: "boolean";
63
- }
64
- interface ColorParamDescriptor extends BaseParamDescriptor {
65
- type: "color";
66
- }
67
- interface EnumParamDescriptor extends BaseParamDescriptor {
68
- type: "enum";
69
- options: readonly {
70
- label: string;
71
- value: string | number | boolean;
72
- }[];
73
- }
74
- type ParamDescriptor = NumberParamDescriptor | BooleanParamDescriptor | ColorParamDescriptor | EnumParamDescriptor;
75
- interface ControlMeasureMetadata {
76
- id: string;
77
- name: string;
78
- description: string;
79
- entity: string;
80
- entityType: string;
81
- entitySubtype?: string;
82
- value: string;
83
- geometry: ControlMeasureGeometry;
84
- minCoordinates?: number;
85
- maxCoordinates?: number;
86
- geometryTypes?: readonly ControlMeasureGeometryType[];
87
- drawRule?: DrawRuleId;
88
- /**
89
- * Resolved draw rule object (anchor contract) attached by the registry when
90
- * the kind's `drawRule` id has an implementation. Consumed by the
91
- * `TacticalDraw` façade to drive click accumulation during draw and
92
- * vertex-snap during edit — see ADR-0005.
93
- */
94
- rule?: ControlMeasureDrawRule;
95
- params?: readonly ParamDescriptor[];
96
- /**
97
- * Marks a measure that emits a text label whose pixel size should be captured
98
- * once at draw-commit time (rather than re-resolved on every zoom). Hosts use
99
- * this to stamp default label sizing onto the committed measure — see
100
- * `withCommittedAdapterMeasureOptions` in `tactical-draw`. Keeping it on the
101
- * definition means adding such a measure stays a one-file change (ADR-0013).
102
- */
103
- capturesLabelSize?: boolean;
104
- }
105
- //#endregion
106
- //#region src/define.d.ts
107
- /**
108
- * The loosest `FeatureCollection` a control-measure generator may emit: any
109
- * geometry, with per-feature properties that the renderer normalizes.
110
- */
111
- type AnyFeatureCollection = FeatureCollection<Geometry, Record<string, unknown> | null>;
112
- /**
113
- * A generator's call signature, constrained only by its inputs and output. The
114
- * options parameter is typed `never` so that a generator with *any* concrete
115
- * options type satisfies the bound — function parameters are contravariant, so
116
- * `(o: BlockOptions) => …` is assignable to `(o: never) => …`. The actual
117
- * options type is recovered covariantly via {@link OptsOf}, never through this
118
- * bound. See ADR-0013.
119
- */
120
- type ControlMeasureGenerator = (controlPoints: Position[], options: never) => AnyFeatureCollection;
121
- /**
122
- * Everything that defines one control measure, co-located with its generator.
123
- * `registry.ts` collects these into the single `DEFINITIONS` map, from which
124
- * the `ControlMeasureId` union, `OptionsByKind`, the generator dispatch, the
125
- * default options, and rule resolution are all derived rather than maintained
126
- * as parallel tables. See ADR-0013.
127
- */
128
- interface ControlMeasureDefinition<Id extends string, G extends ControlMeasureGenerator> {
129
- /** Catalog metadata; `id` is pinned to the record's literal key. */
130
- metadata: ControlMeasureMetadata & {
131
- id: Id;
132
- };
133
- /** Pure generator: control points (+ options) → GeoJSON features. */
134
- generator: G;
135
- /** Default options, tied to the generator's own options parameter. */
136
- defaultOptions: NonNullable<Parameters<G>[1]>;
137
- /**
138
- * Resolved draw-rule object, merged back onto metadata by the registry. The
139
- * doctrinal `drawRule` spec id stays on `metadata` (ADR-0005); the registry
140
- * guards that `rule` agrees with it. See ADR-0013.
141
- */
142
- rule?: ControlMeasureDrawRule;
143
- }
144
- /**
145
- * Extracts a definition's options type covariantly from its generator's
146
- * (optional) second parameter — robust where inferring through the
147
- * contravariant parameter position is not. See ADR-0013.
148
- */
149
- type OptsOf<D> = D extends {
150
- generator: (points: Position[], options?: infer O) => unknown;
151
- } ? O : never;
152
- //#endregion
153
- //#region src/generators/cm14-maneuver-lines/principalDirectionOfFire.d.ts
154
- /**
155
- * Configuration options for the Principal Direction of Fire tactical symbol.
156
- */
157
- interface PrincipalDirectionOfFireOptions {
158
- /** Arrowhead length relative to each arm's own length (default: 0.07) */
159
- hSize?: number;
160
- /** Arrowhead wing spread relative to the arrowhead length (default: 0.67) */
161
- hWidth?: number;
162
- }
163
- declare const DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS: Required<PrincipalDirectionOfFireOptions>;
164
- /**
165
- * Generates a GeoJSON FeatureCollection for a PRINCIPAL DIRECTION OF FIRE
166
- * tactical symbol: a "V" of arms from the vertex out to the (independent) tips,
167
- * each ending in an open arrowhead.
168
- *
169
- * Renders one arm per tip, so two points (vertex + one tip) draws the single
170
- * arm being placed — the live feedback after PT 1 — and three points draws the
171
- * full V. Points beyond the third are ignored (input contract, ADR-0014).
172
- *
173
- * @param coordinates - [PT 1 (vertex), PT 2 (tip), PT 3 (tip)]
174
- * @param options - Arrowhead sizing parameters
175
- */
176
- declare function createPrincipalDirectionOfFire(coordinates: Position[], options?: PrincipalDirectionOfFireOptions): FeatureCollection<MultiLineString, Record<string, never>>;
177
- //#endregion
178
- //#region src/generators/cm14-maneuver-lines/finalProtectiveFire.d.ts
179
- /**
180
- * Configuration options for the Final Protective Fire tactical symbols.
181
- *
182
- * Identical to Principal Direction of Fire (arrowhead sizing), plus a filled
183
- * "blade" running along the inside of one arm.
184
- */
185
- interface FinalProtectiveFireOptions {
186
- /** Arrowhead length relative to each arm's own length (default: 0.07) */
187
- hSize?: number;
188
- /** Arrowhead wing spread relative to the arrowhead length (default: 0.67) */
189
- hWidth?: number;
190
- /**
191
- * Blade height (its perpendicular reach into the inside of the V) relative
192
- * to the bladed arm's own length (default: 0.03).
193
- */
194
- bladeHeight?: number;
195
- }
196
- declare const DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS: Required<FinalProtectiveFireOptions>;
197
- type FpfProps = {
198
- part?: string;
199
- fill?: true;
200
- };
201
- declare function createFinalProtectiveFireLeft(coordinates: Position[], options?: FinalProtectiveFireOptions): FeatureCollection<MultiLineString | Polygon, FpfProps>;
202
- declare function createFinalProtectiveFireRight(coordinates: Position[], options?: FinalProtectiveFireOptions): FeatureCollection<MultiLineString | Polygon, FpfProps>;
203
- //#endregion
204
- //#region src/projection.d.ts
205
- type Point2D = [number, number];
206
- /**
207
- * Project WGS84 (Lon/Lat) to Web Mercator (Meters).
208
- */
209
- declare const project: (lon: number, lat: number) => Point2D;
210
- /**
211
- * Unproject Web Mercator (Meters) back to WGS84 (Lon/Lat).
212
- */
213
- declare const unproject: (x: number, y: number) => Position;
214
- //#endregion
215
- //#region src/attack-utils.d.ts
216
- interface AttackOptions {
217
- shaftWidthRatio?: number;
218
- roundedBends?: boolean;
219
- bendSegments?: number;
220
- }
221
- /**
222
- * Calculates the relative metrics (longitudinal and lateral) of the width point
223
- * relative to the Tip-Neck axis.
224
- *
225
- * @param pts - Array of positions [Tip, Neck, ..., WidthPoint]
226
- * @returns { longitudinal: number, lateral: number } | null
227
- */
228
- declare function calculateMetrics(pts: Position[]): {
229
- longitudinal: number;
230
- lateral: number;
231
- } | null;
232
- /**
233
- * Computes an initial Width Point based on the Tip and Neck positions.
234
- * It places the point perpendicular to the neck at a default distance relative to the length.
235
- *
236
- * @param tip - Tip position (Lon/Lat)
237
- * @param neck - Neck position (Lon/Lat)
238
- * @returns Width Point position (Lon/Lat)
239
- */
240
- declare function computeInitialWidthPoint(tip: Position, neck: Position): Position;
241
- //#endregion
242
- //#region src/generators/cm15-maneuver-areas/mainAttack.d.ts
243
- declare const DEFAULT_MAIN_ATTACK_OPTIONS: Required<AttackOptions>;
244
- type MainAttackOptions = AttackOptions;
245
- /**
246
- * Generates a GeoJSON FeatureCollection for a Main Attack tactical symbol.
247
- *
248
- * The symbol consists of a single MultiLineString feature containing:
249
- * 1. **Arrowhead**: A line forming a "chevron" or "roof" shape.
250
- * 2. **Shaft**: Two parallel lines behind the arrow.
251
- *
252
- * The shaft is calculated to terminate exactly where it touches the inner walls
253
- * of the arrowhead, creating a seamless connection.
254
- *
255
- * @param coordinates - An array of GeoJSON Positions (Lon/Lat).
256
- * Minimum 3 points required.
257
- * **Order matters:** * - Index 0: **Tip** (The sharp point of the arrow)
258
- * - Index 1 to N-2: **Spine** (The path the shaft follows)
259
- * - Index N-1: **Width Control** (Determines the width of the arrowhead)
260
- * @param options - Configuration for ratios and properties.
261
- * @returns A GeoJSON FeatureCollection containing a single MultiLineString.
262
- */
263
- declare function createMainAttack(coordinates: Position[], options?: MainAttackOptions): FeatureCollection<MultiLineString>;
264
- //#endregion
265
- //#region src/generators/cm15-maneuver-areas/supportingAttack.d.ts
266
- type SupportingAttackOptions = AttackOptions;
267
- declare const DEFAULT_SUPPORTING_ATTACK_OPTIONS: Required<SupportingAttackOptions>;
268
- /**
269
- * Generates a GeoJSON FeatureCollection for a Supporting Attack tactical symbol.
270
- *
271
- * The symbol differs from Main Attack in that it is a single LineString
272
- * outlining the arrow shape, rather than a filled Polygon header + Shaft lines.
273
- *
274
- * @param coordinates - An array of GeoJSON Positions.
275
- * @param options - Configuration options.
276
- * @returns A GeoJSON FeatureCollection<LineString>.
277
- */
278
- declare function createSupportingAttack(coordinates: Position[], options?: SupportingAttackOptions): FeatureCollection<LineString>;
279
- //#endregion
280
- //#region src/generators/cm99-generic-arrows/classicArrow.d.ts
281
- /**
282
- * A plain, clean arrow for illustrations — not a doctrinal symbol. The shaft is
283
- * a straight polyline through the drawn control points (Line1 contract) and the
284
- * tip carries a solid triangular arrowhead. No wobble, no curve: the canonical
285
- * "draw an arrow" graphic.
286
- */
287
- /**
288
- * Arrowhead silhouette:
289
- * - `triangle` — solid triangle with a flat back (the default).
290
- * - `barbed` — swept-back barbs with a forward notch (classic arrowhead).
291
- * - `concave` — a sharper barbed head with a deep forward notch.
292
- * - `diamond` — a rhombus, widest at its middle.
293
- * - `harpoon` — an asymmetric single-sided barb.
294
- * - `swallowtail` — barbs that sweep back into two trailing tails.
295
- * - `chevron` — a thick hollow "V".
296
- * - `circle` — a round dot terminator.
297
- * - `tee` — a flat crossbar terminator (no point).
298
- * - `open` — an unfilled "V", drawn as two strokes meeting at the tip.
299
- */
300
- type ClassicArrowHeadStyle = "triangle" | "barbed" | "concave" | "diamond" | "harpoon" | "swallowtail" | "chevron" | "circle" | "tee" | "open";
301
- interface ClassicArrowOptions {
302
- /** Arrowhead silhouette. */
303
- headStyle?: ClassicArrowHeadStyle;
304
- /** Round the shaft's corners by curving it through the control points. */
305
- smooth?: boolean;
306
- /** Arrowhead length as a fraction of the total path length. */
307
- headLength?: number;
308
- /** Arrowhead base width as a fraction of the total path length. */
309
- headWidth?: number;
310
- }
311
- /**
312
- * Generates a GeoJSON FeatureCollection for the Classic Arrow: a shaft
313
- * LineString (trimmed so it doesn't poke through the head) plus a head feature
314
- * whose silhouette follows `headStyle` — a filled Polygon for the solid heads,
315
- * or an open "V" LineString for `open`.
316
- */
317
- declare function createClassicArrow(coordinates: Position[], options?: ClassicArrowOptions): FeatureCollection<LineString | Polygon, {
318
- part: "shaft" | "head";
319
- fill?: boolean;
320
- }>;
321
- //#endregion
322
- //#region src/generators/cm99-generic-arrows/blockArrow.d.ts
323
- /**
324
- * A solid "block" arrow for illustrations — not a doctrinal symbol. The whole
325
- * arrow is one filled polygon: a shaft band of controllable width that runs
326
- * through the drawn control points (Line1 contract) and flares into a wider
327
- * triangular head at the tip.
328
- */
329
- /**
330
- * Arrowhead silhouette (all carved from the one filled body):
331
- * - `triangle` — a flat-backed triangular head (the default).
332
- * - `barbed` — swept-back barbs with the shaft entering at a forward notch.
333
- * - `concave` — a sharper barbed head with a deeper notch.
334
- * - `diamond` — a kite that flares to its widest mid-head.
335
- * - `harpoon` — an asymmetric single-sided barb.
336
- * - `swallowtail` — barbs that sweep back into two trailing tails.
337
- * - `tee` — a flat crossbar terminator (no point).
338
- */
339
- type BlockArrowHeadStyle = "triangle" | "barbed" | "concave" | "diamond" | "harpoon" | "swallowtail" | "tee";
340
- interface BlockArrowOptions {
341
- /** Shaft band width as a fraction of the total path length. */
342
- shaftWidth?: number;
343
- /** Arrowhead silhouette. */
344
- headStyle?: BlockArrowHeadStyle;
345
- /** Arrowhead base width as a fraction of the total path length. */
346
- headWidth?: number;
347
- /** Arrowhead length as a fraction of the total path length. */
348
- headLength?: number;
349
- /** Round the shaft's corners by curving it through the control points. */
350
- smooth?: boolean;
351
- /** Fill the body solid; when false the arrow is drawn as an outline only. */
352
- filled?: boolean;
353
- }
354
- /**
355
- * Generates a GeoJSON FeatureCollection for the Block Arrow: a single filled
356
- * Polygon whose outline runs up the left side of the shaft, around the head
357
- * (whose silhouette follows `headStyle`) to the tip and back, then down the
358
- * right side of the shaft.
359
- */
360
- declare function createBlockArrow(coordinates: Position[], options?: BlockArrowOptions): FeatureCollection<Polygon, {
361
- part: "body";
362
- fill: boolean;
363
- }>;
364
- //#endregion
365
- //#region src/generators/cm15-maneuver-areas/airborneAttack.d.ts
366
- type AirborneAttackOptions = AttackOptions;
367
- declare const DEFAULT_AIRBORNE_ATTACK_OPTIONS: Required<AirborneAttackOptions>;
368
- /**
369
- * Generates a GeoJSON FeatureCollection for an Airborne Attack tactical symbol.
370
- *
371
- * The symbol is similar to Supporting Attack but features a crossover point
372
- * between the shaft and the head (Points 1 and 2/Neck).
373
- *
374
- * @param coordinates - An array of GeoJSON Positions.
375
- * @param options - Configuration options.
376
- * @returns A GeoJSON FeatureCollection<LineString>.
377
- */
378
- declare function createAirborneAttack(coordinates: Position[], options?: AirborneAttackOptions): FeatureCollection<LineString>;
379
- //#endregion
380
- //#region src/generators/cm15-maneuver-areas/attackHelicopter.d.ts
381
- interface AttackHelicopterOptions extends AttackOptions {
382
- symbolHeightRatio?: number;
383
- triangleSizeRatio?: number;
384
- bottomBarWidthRatio?: number;
385
- bowtieWidthRatio?: number;
386
- }
387
- declare const DEFAULT_ATTACK_HELICOPTER_OPTIONS: Required<AttackHelicopterOptions>;
388
- /**
389
- * Generates a GeoJSON FeatureCollection for an Attack Helicopter tactical symbol.
390
- *
391
- * The symbol is based on the Airborne Attack (bow tie) geometry but features
392
- * an additional symbol (vertical line + triangle) at the crossover point.
393
- *
394
- * @param coordinates - An array of GeoJSON Positions.
395
- * @param options - Configuration options.
396
- * @returns A GeoJSON FeatureCollection containing the main graphic and the symbol.
397
- */
398
- declare function createAttackHelicopter(coordinates: Position[], options?: AttackHelicopterOptions): FeatureCollection<LineString | Polygon>;
399
- //#endregion
400
- //#region src/generators/cm15-maneuver-areas/supportByFire.d.ts
401
- interface SupportByFireOptions {
402
- arrowTipWidthRatio?: number;
403
- backLineLengthRatio?: number;
404
- backLineAngle?: number;
405
- }
406
- declare const DEFAULT_SUPPORT_BY_FIRE_OPTIONS: Required<SupportByFireOptions>;
407
- /**
408
- * Generates a GeoJSON FeatureCollection for a Support By Fire tactical graphic.
409
- *
410
- * Input:
411
- * - PT1: Left Base
412
- * - PT2: Right Base
413
- * - PT3: Left Tip
414
- * - PT4: Right Tip
415
- */
416
- declare function createSupportByFire(coordinates: Position[], options?: SupportByFireOptions): FeatureCollection<LineString>;
417
- //#endregion
418
- //#region src/generators/cm15-maneuver-areas/attackByFire.d.ts
419
- interface AttackByFireOptions {
420
- arrowTipWidthRatio?: number;
421
- backLineLengthRatio?: number;
422
- backLineAngle?: number;
423
- }
424
- declare const DEFAULT_ATTACK_BY_FIRE_OPTIONS: Required<AttackByFireOptions>;
425
- /**
426
- * Generates a GeoJSON FeatureCollection for an Attack By Fire tactical graphic.
427
- *
428
- * Input:
429
- * - PT1: Arrow Tip (Target)
430
- * - PT2: Left Base
431
- * - PT3: Right Base
432
- *
433
- * Logic:
434
- * - Shaft: Midpoint(PT2, PT3) -> PT1
435
- * - Base Line: PT2 -> PT3
436
- * - Wings: Splayed out from PT2 and PT3
437
- */
438
- declare function createAttackByFire(coordinates: Position[], options?: AttackByFireOptions): FeatureCollection<LineString>;
439
- //#endregion
440
- //#region src/generators/cm14-maneuver-lines/flot.d.ts
441
- /**
442
- * Configuration options for the FLOT (Forward Line of Own Troops) geometry.
443
- */
444
- interface FLOTOptions {
445
- /**
446
- * The radius of the semicircular arcs in meters.
447
- * Semicircles are placed tangent to each other (diameter = 2 * radius).
448
- * This is ignored if radiusPixels is provided along with metersPerPixel.
449
- * @default 50
450
- */
451
- radius?: number;
452
- /**
453
- * The radius of the semi-circular arcs in pixels.
454
- * When provided along with metersPerPixel, the actual meter radius is calculated
455
- * dynamically to maintain consistent visual size on screen.
456
- * Takes precedence over radius when metersPerPixel is also provided.
457
- * @default 10
458
- */
459
- radiusPixels?: number;
460
- /**
461
- * The meters-per-pixel ratio at the current zoom level and latitude.
462
- * Required when using radiusPixels for zoom-aware sizing.
463
- * Can be obtained from the map view's resolution or calculated using getMetersPerPixel().
464
- */
465
- metersPerPixel?: number;
466
- /**
467
- * The number of points used to render each individual semi-circle.
468
- * Higher values create smoother arcs.
469
- * @default 16
470
- */
471
- resolution?: number;
472
- }
473
- /**
474
- * Default options for the FLOT graphic.
475
- */
476
- declare const DEFAULT_FLOT_OPTIONS: Required<Omit<FLOTOptions, "metersPerPixel">>;
477
- /**
478
- * Creates a FLOT (Forward Line of Own Troops) tactical graphic.
479
- *
480
- * Generates a scalloped/arc line representing the forward edge of friendly forces.
481
- * The line consists of semi-circular arcs that bulge perpendicular to the base path,
482
- * creating a distinctive visual pattern used in military tactical graphics.
483
- *
484
- * @param positions - Array of GeoJSON positions defining the base path
485
- * @param options - Configuration options for the graphic
486
- * @returns A GeoJSON FeatureCollection containing the scalloped LineString
487
- *
488
- * @example
489
- * ```typescript
490
- * const flot = createFLOT(
491
- * [[-122.4194, 37.7749], [-122.4100, 37.7800], [-122.4000, 37.7750]],
492
- * { radius: 100, resolution: 20 }
493
- * );
494
- * ```
495
- */
496
- declare function createFLOT(positions: Position[], options?: FLOTOptions): FeatureCollection<LineString>;
497
- //#endregion
498
- //#region src/generators/cm34-mission-tasks/block.d.ts
499
- interface BlockMissionTaskOptions {
500
- /** Gap for the 'B' label as a ratio of the front length (default: 0.2) */
501
- labelGapRatio?: number;
502
- /** Label height in CSS pixels at the draw/reference zoom. */
503
- labelSizePixels?: number;
504
- /** Map zoom at which labelSizePixels was captured. */
505
- labelSizeZoom?: number;
506
- /** Map resolution at which labelSizePixels was captured. */
507
- labelSizeResolution?: number;
508
- }
509
- declare const DEFAULT_BLOCK_MISSION_TASK_OPTIONS: Required<Omit<BlockMissionTaskOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
510
- /**
511
- * Generates a GeoJSON FeatureCollection for a BLOCK mission task symbol (340100).
512
- *
513
- * Uses the same T-shape geometry as the protection-area Block symbol, with a
514
- * "B" label centered on the shaft.
515
- *
516
- * @param coordinates - [PT. 1, PT. 2, optional PT. 3] as Position arrays
517
- * @param options - Configuration options
518
- * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
519
- */
520
- declare function createBlockMissionTaskSymbol(coordinates: Position[], options?: BlockMissionTaskOptions): FeatureCollection<MultiLineString | Point>;
521
- //#endregion
522
- //#region src/generators/cm34-mission-tasks/breach.d.ts
523
- /**
524
- * Configuration options for the BREACH tactical symbol.
525
- */
526
- interface BreachOptions {
527
- /** Tick mark length ratio relative to front opening (default: 0.15) */
528
- tickLengthRatio?: number;
529
- /** Tick mark angle in degrees from perpendicular (default: 45) */
530
- tickAngle?: number;
531
- /** Gap for the 'B' label as a ratio of the front length (default: 0.2) */
532
- labelGapRatio?: number;
533
- /** Label height in CSS pixels at the draw/reference zoom. */
534
- labelSizePixels?: number;
535
- /** Map zoom at which labelSizePixels was captured. */
536
- labelSizeZoom?: number;
537
- /** Map resolution at which labelSizePixels was captured. */
538
- labelSizeResolution?: number;
539
- }
540
- /**
541
- * Default options for the BREACH symbol.
542
- */
543
- declare const DEFAULT_BREACH_OPTIONS: Required<Omit<BreachOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
544
- /**
545
- * Generates a GeoJSON FeatureCollection for a BREACH mission task symbol (340200).
546
- *
547
- * A three-sided bracket (see {@link createBracketSymbol}) whose front opening
548
- * endpoints terminate in tick marks pointing **outward** (away from the rear
549
- * "B" line).
550
- *
551
- * @param coordinates - [PT. 1, PT. 2, PT. 3] as Position arrays
552
- * @param options - Configuration options
553
- * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
554
- */
555
- declare function createBreachSymbol(coordinates: Position[], options?: BreachOptions): FeatureCollection<MultiLineString | Point>;
556
- //#endregion
557
- //#region src/generators/cm34-mission-tasks/bypass.d.ts
558
- /**
559
- * Configuration options for the BYPASS tactical symbol.
560
- */
561
- interface BypassOptions {
562
- /** Arrowhead length ratio relative to front opening (default: 0.2) */
563
- arrowHeadLengthRatio?: number;
564
- /** Gap for the 'B' label as a ratio of the front length (default: 0.2) */
565
- labelGapRatio?: number;
566
- /** Label height in CSS pixels at the draw/reference zoom. */
567
- labelSizePixels?: number;
568
- /** Map zoom at which labelSizePixels was captured. */
569
- labelSizeZoom?: number;
570
- /** Map resolution at which labelSizePixels was captured. */
571
- labelSizeResolution?: number;
572
- }
573
- /**
574
- * Default options for the BYPASS symbol.
575
- */
576
- declare const DEFAULT_BYPASS_OPTIONS: Required<Omit<BypassOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
577
- /**
578
- * Generates a GeoJSON FeatureCollection for a BYPASS mission task symbol (340300).
579
- *
580
- * A three-sided bracket (see {@link createBracketSymbol}) with a "B" label on
581
- * the rear line, whose front opening endpoints terminate in outward-flaring
582
- * chevron arrowheads instead of tick marks.
583
- *
584
- * @param coordinates - [PT. 1, PT. 2, PT. 3] as Position arrays
585
- * @param options - Configuration options
586
- * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
587
- */
588
- declare function createBypassSymbol(coordinates: Position[], options?: BypassOptions): FeatureCollection<MultiLineString | Point>;
589
- //#endregion
590
- //#region src/generators/cm34-mission-tasks/canalize.d.ts
591
- /**
592
- * Configuration options for the CANALIZE tactical symbol.
593
- */
594
- interface CanalizeOptions {
595
- /** Tick mark length ratio relative to front opening (default: 0.15) */
596
- tickLengthRatio?: number;
597
- /** Tick mark angle in degrees from perpendicular (default: 45) */
598
- tickAngle?: number;
599
- /** Gap for the 'C' label as a ratio of the front length (default: 0.2) */
600
- labelGapRatio?: number;
601
- /** Label height in CSS pixels at the draw/reference zoom. */
602
- labelSizePixels?: number;
603
- /** Map zoom at which labelSizePixels was captured. */
604
- labelSizeZoom?: number;
605
- /** Map resolution at which labelSizePixels was captured. */
606
- labelSizeResolution?: number;
607
- }
608
- /**
609
- * Default options for the CANALIZE symbol.
610
- */
611
- declare const DEFAULT_CANALIZE_OPTIONS: Required<Omit<CanalizeOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
612
- /**
613
- * Generates a GeoJSON FeatureCollection for a CANALIZE mission task symbol (340400).
614
- *
615
- * A three-sided bracket (see {@link createBracketSymbol}) whose front opening
616
- * endpoints terminate in tick marks pointing **inward** (toward the rear "C"
617
- * line), opposite BREACH's outward-facing ticks.
618
- *
619
- * @param coordinates - [PT. 1, PT. 2, PT. 3] as Position arrays
620
- * @param options - Configuration options
621
- * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
622
- */
623
- declare function createCanalizeSymbol(coordinates: Position[], options?: CanalizeOptions): FeatureCollection<MultiLineString | Point>;
624
- //#endregion
625
- //#region src/generators/cm34-mission-tasks/clear.d.ts
626
- /**
627
- * Configuration options for the CLEAR tactical mission task symbol.
628
- */
629
- interface ClearOptions {
630
- /**
631
- * Padding between the vertical line's endpoints and the outer arrows, as a
632
- * ratio of the symbol height. Insets the top and bottom arrows so they sit
633
- * clear of PT. 1 / PT. 2 (default: 0.15).
634
- */
635
- arrowInsetRatio?: number;
636
- /** Arrowhead depth (toward the rear) as a ratio of the symbol height (default: 0.15). */
637
- arrowheadLengthRatio?: number;
638
- /** Arrowhead width (along the vertical line) as a ratio of the symbol height (default: 0.2). */
639
- arrowheadWidthRatio?: number;
640
- /** Gap for the 'C' label as a ratio of the shaft length (default: 0.2). */
641
- labelGapRatio?: number;
642
- /** Label height in CSS pixels at the draw/reference zoom. */
643
- labelSizePixels?: number;
644
- /** Map zoom at which labelSizePixels was captured. */
645
- labelSizeZoom?: number;
646
- /** Map resolution at which labelSizePixels was captured. */
647
- labelSizeResolution?: number;
648
- }
649
- /**
650
- * Default options for the CLEAR symbol.
651
- */
652
- declare const DEFAULT_CLEAR_OPTIONS: Required<Omit<ClearOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
653
- /**
654
- * Generates a GeoJSON FeatureCollection for a CLEAR mission task symbol (340500).
655
- *
656
- * A vertical line (PT. 1 → PT. 2) with three arrows pointing at it,
657
- * perpendicular to the line. The arrows come from the rear — the side PT. 3
658
- * sits on — and their tips touch the vertical line; each carries a shaft
659
- * reaching back to the rear. The arrows are evenly spaced along the line, so
660
- * the middle arrow's tip sits at the midpoint of the vertical line and its
661
- * shaft carries the 'C' glyph. The arrows stay perpendicular to the vertical
662
- * line at any rotation.
663
- *
664
- * Input Points:
665
- * - PT. 1: Top endpoint of the vertical line
666
- * - PT. 2: Bottom endpoint of the vertical line — defines height with PT. 1
667
- * - PT. 3: Rear point — defines the shaft length (and which side the arrows
668
- * come from)
669
- *
670
- * @param coordinates - [PT. 1, PT. 2, PT. 3] as Position arrays
671
- * @param options - Configuration options
672
- * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
673
- */
674
- declare function createClearSymbol(coordinates: Position[], options?: ClearOptions): FeatureCollection<MultiLineString | Point>;
675
- //#endregion
676
- //#region src/generators/cm34-mission-tasks/delay.d.ts
677
- interface DelayOptions {
678
- /** Arrowhead depth as a ratio of the straight-line length (default: 0.12). */
679
- arrowheadLengthRatio?: number;
680
- /** Arrowhead width as a ratio of the straight-line length (default: 0.12). */
681
- arrowheadWidthRatio?: number;
682
- /** Gap for the 'D' label as a ratio of the straight-line length (default: 0.18). */
683
- labelGapRatio?: number;
684
- /** Number of segments used to approximate the 180-degree arc (default: 32). */
685
- arcSegments?: number;
686
- /** Label height in CSS pixels at the draw/reference zoom. */
687
- labelSizePixels?: number;
688
- /** Map zoom at which labelSizePixels was captured. */
689
- labelSizeZoom?: number;
690
- /** Map resolution at which labelSizePixels was captured. */
691
- labelSizeResolution?: number;
692
- }
693
- declare const DEFAULT_DELAY_OPTIONS: Required<Omit<DelayOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
694
- declare function createDelaySymbol(coordinates: Position[], options?: DelayOptions): FeatureCollection<MultiLineString | Point>;
695
- //#endregion
696
- //#region src/generators/cm34-mission-tasks/isolate.d.ts
697
- /**
698
- * Configuration options for the ISOLATE tactical mission task symbol.
699
- */
700
- interface IsolateOptions {
701
- /** Angular size of the opening on the friendly side, in degrees (default: 30). */
702
- openingDegrees?: number;
703
- /** Number of inward-pointing arrowhead barbs spaced around the closed arc (default: 9). */
704
- barbCount?: number;
705
- /** Barb length as a ratio of the symbol radius (default: 0.18). */
706
- barbLengthRatio?: number;
707
- }
708
- /**
709
- * Generates a GeoJSON FeatureCollection for an ISOLATE mission task symbol (341500).
710
- *
711
- * A near-complete circle centered on PT. 1 whose radius reaches PT. 2. The arc
712
- * starts (bare) at PT. 2's bearing and sweeps clockwise around the closed
713
- * portion to a single arrow tip at the far end; the wedge-shaped gap (default
714
- * 30°) between that arrow tip and PT. 2 is the opening — the "friendly side".
715
- * Inward-pointing arrowhead barbs are spaced along the closed arc, set in from
716
- * both ends so they never touch PT. 2 or the arrow tip, conveying the
717
- * sealing-off of the enclosed force. Unlike the bracket mission tasks, isolate
718
- * carries no glyph label.
719
- *
720
- * Input Points:
721
- * - PT. 1: Center point
722
- * - PT. 2: Start point — fixes the radius and the bearing of the opening
723
- *
724
- * @param coordinates - [PT. 1, PT. 2] as Position arrays
725
- * @param options - Configuration options
726
- * @returns GeoJSON FeatureCollection containing a single MultiLineString feature
727
- */
728
- declare function createIsolateSymbol(coordinates: Position[], options?: IsolateOptions): FeatureCollection<MultiLineString>;
729
- //#endregion
730
- //#region src/generators/cm29-protection-lines/antitankDitch.d.ts
731
- interface AntitankDitchOptions {
732
- /**
733
- * The tooth depth in meters. Target tooth spacing is roughly 1.15x this depth.
734
- * Ignored when toothHeightPixels is provided with metersPerPixel.
735
- * @default 50
736
- */
737
- toothHeight?: number;
738
- /**
739
- * The tooth depth in pixels. When provided with metersPerPixel, the meter
740
- * size is calculated dynamically to maintain a consistent visual size.
741
- * @default 10
742
- */
743
- toothHeightPixels?: number;
744
- /**
745
- * The target base span of each triangular tooth as a multiple of tooth depth.
746
- * Lower values make sharper, denser teeth; higher values make flatter teeth.
747
- * @default 1.15
748
- */
749
- toothWidthRatio?: number;
750
- /**
751
- * The meters-per-pixel ratio at the current zoom level and latitude. Required
752
- * when using toothHeightPixels for zoom-aware sizing.
753
- */
754
- metersPerPixel?: number;
755
- }
756
- declare const DEFAULT_ANTITANK_DITCH_OPTIONS: Required<Omit<AntitankDitchOptions, "metersPerPixel">>;
757
- declare function createAntitankDitchUnderConstruction(positions: Position[], options?: AntitankDitchOptions): FeatureCollection<MultiLineString, {
758
- part: "ditch";
759
- }>;
760
- declare function createAntitankDitchCompleted(positions: Position[], options?: AntitankDitchOptions): FeatureCollection<MultiPolygon, {
761
- part: "teeth";
762
- fill: boolean;
763
- }>;
764
- //#endregion
765
- //#region src/generators/cm29-protection-lines/antitankWall.d.ts
766
- interface AntitankWallOptions extends AntitankDitchOptions {
767
- /**
768
- * The total gap between consecutive tooth bases as a multiple of tooth base
769
- * width. Use 0 for touching teeth; higher values create wider gaps.
770
- * @default 1.35
771
- */
772
- toothSpacingRatio?: number;
773
- }
774
- declare const DEFAULT_ANTITANK_WALL_OPTIONS: Required<Omit<AntitankWallOptions, "metersPerPixel">>;
775
- declare function createAntitankWall(positions: Position[], options?: AntitankWallOptions): FeatureCollection<MultiLineString, {
776
- part: "wall";
777
- }>;
778
- //#endregion
779
- //#region src/generators/cm29-protection-lines/fortifiedLine.d.ts
780
- /**
781
- * Configuration options for the Fortified Line geometry.
782
- */
783
- interface FortifiedLineOptions {
784
- /**
785
- * The size of the square teeth in meters.
786
- * This controls both the width and height of the castellated pattern.
787
- * This is ignored if sizePixels is provided along with metersPerPixel.
788
- * @default 50
789
- */
790
- size?: number;
791
- /**
792
- * The size of the square teeth in pixels.
793
- * When provided along with metersPerPixel, the actual meter size is calculated
794
- * dynamically to maintain consistent visual size on screen.
795
- * Takes precedence over size when metersPerPixel is also provided.
796
- * @default 10
797
- */
798
- sizePixels?: number;
799
- /**
800
- * The meters-per-pixel ratio at the current zoom level and latitude.
801
- * Required when using sizePixels for zoom-aware sizing.
802
- */
803
- metersPerPixel?: number;
804
- }
805
- /**
806
- * Default options for the Fortified Line graphic.
807
- */
808
- declare const DEFAULT_FORTIFIED_LINE_OPTIONS: Required<Omit<FortifiedLineOptions, "metersPerPixel">>;
809
- /**
810
- * Creates a Fortified Line tactical graphic.
811
- *
812
- * Generates a castellated/square-wave line representing a fortified line.
813
- * The line consists of square "teeth" that project perpendicular to the base path.
814
- *
815
- * @param positions - Array of GeoJSON positions defining the base path
816
- * @param options - Configuration options for the graphic
817
- * @returns A GeoJSON FeatureCollection containing the castellated LineString
818
- */
819
- declare function createFortifiedLine(positions: Position[], options?: FortifiedLineOptions): FeatureCollection<LineString>;
820
- //#endregion
821
- //#region src/generators/cm15-maneuver-areas/fortifiedArea.d.ts
822
- /**
823
- * Configuration options for the Fortified Area are the same as Fortified Line.
824
- */
825
- type FortifiedAreaOptions = FortifiedLineOptions;
826
- declare const DEFAULT_FORTIFIED_AREA_OPTIONS: Required<Omit<FortifiedLineOptions, "metersPerPixel">>;
827
- /**
828
- * Creates a Fortified Area tactical graphic.
829
- *
830
- * Generates a polygon with a castellated/square-wave boundary representing a fortified area.
831
- * The boundary consists of square "teeth" that project perpendicular to the path.
832
- *
833
- * @param positions - Array of GeoJSON positions defining the area boundary.
834
- * The first and last positions should match to close the polygon,
835
- * or it will be closed automatically.
836
- * @param options - Configuration options for the graphic
837
- * @returns A GeoJSON FeatureCollection containing the castellated Polygon
838
- */
839
- declare function createFortifiedArea(positions: Position[], options?: FortifiedAreaOptions): FeatureCollection<Polygon>;
840
- //#endregion
841
- //#region src/generators/cm27-protection-areas/block.d.ts
842
- type BlockOptions = Record<never, never>;
843
- declare const DEFAULT_BLOCK_OPTIONS: BlockOptions;
844
- /**
845
- * Generates a GeoJSON FeatureCollection for a "Block" tactical symbol (T-shape).
846
- *
847
- * @param coordinates - An array of GeoJSON Positions (Lon/Lat).
848
- * Expects exactly 3 points:
849
- * - PT1 & PT2: Endpoints of the vertical line.
850
- * - PT3: Defines the endpoint of the horizontal line (stem).
851
- * @param options - Configuration options.
852
- * @returns A GeoJSON FeatureCollection containing a LineString.
853
- */
854
- declare function createBlock(coordinates: Position[], _options?: BlockOptions): FeatureCollection<LineString>;
855
- //#endregion
856
- //#region src/generators/cm27-protection-areas/disrupt.d.ts
857
- interface DisruptOptions {
858
- middleArrowLengthRatio?: number;
859
- bottomArrowLengthRatio?: number;
860
- shaftLengthRatio?: number;
861
- arrowHeadLengthRatio?: number;
862
- arrowHeadWidthRatio?: number;
863
- }
864
- declare const DEFAULT_DISRUPT_OPTIONS: Required<DisruptOptions>;
865
- /**
866
- * Generates a GeoJSON FeatureCollection for a DISRUPT tactical symbol.
867
- *
868
- * Input:
869
- * - PT1: Top endpoint of the vertical spine
870
- * - PT2: Bottom endpoint of the vertical spine
871
- * - PT3: Reference point used to determine the longest-arrow offset
872
- *
873
- * Geometry:
874
- * - Spine: PT1 -> PT2
875
- * - PT2 -> PT1 defines the baseline orientation; arrow direction is constrained to its perpendicular axis
876
- * - PT3 is decomposed and projected onto the perpendicular axis through PT1 to derive a valid longest-arrow tip
877
- * - Three arrows placed at PT1, midpoint(PT1, PT2), and PT2
878
- * - Center shaft extends opposite arrow direction from midpoint with the same length as the middle arrow
879
- * - Top arrow is longest
880
- * - Middle and bottom arrows are proportional to the longest arrow
881
- * - Arrow heads are returned as filled triangle polygons
882
- */
883
- declare function createDisrupt(coordinates: Position[], options?: DisruptOptions): FeatureCollection<MultiLineString | MultiPolygon>;
884
- //#endregion
885
- //#region src/generators/cm27-protection-areas/fix.d.ts
886
- interface FixOptions {
887
- arrowHeadAngle?: number;
888
- arrowHeadSizeRatio?: number;
889
- endSegmentRatio?: number;
890
- }
891
- declare const DEFAULT_FIX_OPTIONS: Required<FixOptions>;
892
- /**
893
- * Generates a GeoJSON FeatureCollection for a FIX tactical symbol.
894
- *
895
- * Input:
896
- * - PT1: Arrow tip end
897
- * - PT2: Opposite end
898
- *
899
- * Notes:
900
- * - Requires exactly two points.
901
- * - Produces one MultiLineString feature containing the zigzag body and open arrowhead wings.
902
- */
903
- declare function createFix(coordinates: Position[], options?: FixOptions): FeatureCollection<MultiLineString>;
904
- //#endregion
905
- //#region src/generators/cm27-protection-areas/turn.d.ts
906
- interface TurnOptions {
907
- arrowHeadLengthRatio?: number;
908
- arrowHeadWidthRatio?: number;
909
- arcSegments?: number;
910
- }
911
- declare const DEFAULT_TURN_OPTIONS: Required<TurnOptions>;
912
- /**
913
- * Generates a quarter-circle shaft from PT2 (rear) to the arrowhead base.
914
- * The arrowhead continues tangent to the arc and places its tip at PT1.
915
- * PT3 selects which side of the PT2 -> PT1 chord contains the arc.
916
- */
917
- declare function createTurn(coordinates: Position[], options?: TurnOptions): FeatureCollection<MultiLineString | MultiPolygon>;
918
- //#endregion
919
- //#region src/generators/cm27-protection-areas/obstacleBypassEasy.d.ts
920
- interface ObstacleBypassEasyOptions {
921
- arrowHeadLengthRatio?: number;
922
- arrowHeadWidthRatio?: number;
923
- defaultLengthRatio?: number;
924
- }
925
- declare const DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS: Required<ObstacleBypassEasyOptions>;
926
- /**
927
- * Generates a GeoJSON FeatureCollection for an "Obstacle Bypass Easy" symbol.
928
- *
929
- * Input:
930
- * - PT1 and PT2 define the tips of the two arrowheads (opening and symbol height)
931
- * - PT3 defines signed symbol length along the perpendicular axis through midpoint(PT1, PT2)
932
- *
933
- * Geometry:
934
- * - Rear line is parallel to opening(PT1-PT2) and has equal length
935
- * - Two side rails run from rear endpoints to the arrowheads and are parallel to each other
936
- * - Rear line is perpendicular to both side rails
937
- * - Arrow heads are filled triangle polygons at PT1 and PT2
938
- */
939
- declare function createObstacleBypassEasy(coordinates: Position[], options?: ObstacleBypassEasyOptions): FeatureCollection<MultiLineString | MultiPolygon>;
940
- //#endregion
941
- //#region src/generators/cm27-protection-areas/obstacleBypassDifficult.d.ts
942
- interface ObstacleBypassDifficultOptions {
943
- arrowHeadLengthRatio?: number;
944
- arrowHeadWidthRatio?: number;
945
- defaultLengthRatio?: number;
946
- zigzagAmplitudeRatio?: number;
947
- zigzagSpacingRatio?: number;
948
- }
949
- declare const DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS: Required<ObstacleBypassDifficultOptions>;
950
- declare function createObstacleBypassDifficult(coordinates: Position[], options?: ObstacleBypassDifficultOptions): FeatureCollection<MultiLineString | MultiPolygon>;
951
- //#endregion
952
- //#region src/generators/cm27-protection-areas/obstacleBypassImpossible.d.ts
953
- interface ObstacleBypassImpossibleOptions {
954
- arrowHeadLengthRatio?: number;
955
- arrowHeadWidthRatio?: number;
956
- defaultLengthRatio?: number;
957
- rearBarLengthRatio?: number;
958
- rearGapRatio?: number;
959
- }
960
- declare const DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS: Required<ObstacleBypassImpossibleOptions>;
961
- /**
962
- * Generates a GeoJSON FeatureCollection for an "Obstacle Bypass Impossible" symbol.
963
- *
964
- * Input:
965
- * - PT1 and PT2 define the tips of the two arrowheads (opening and symbol height)
966
- * - PT3 defines signed symbol length along the perpendicular axis through midpoint(PT1, PT2)
967
- *
968
- * Geometry:
969
- * - Same base as obstacle bypass easy
970
- * - Rear line has two short perpendicular bars on the rear side
971
- */
972
- declare function createObstacleBypassImpossible(coordinates: Position[], options?: ObstacleBypassImpossibleOptions): FeatureCollection<MultiLineString | MultiPolygon>;
973
- //#endregion
974
- //#region src/registry.d.ts
975
- /**
976
- * The single source of truth for the catalog: one **control measure
977
- * definition** record per measure, co-located with its generator and collected
978
- * here. The `ControlMeasureId` union, `OptionsByKind`, the generator dispatch,
979
- * the default options, and rule resolution are all *derived* from this map
980
- * rather than maintained as parallel tables. Adding a measure is a one-file
981
- * change plus one line here. See ADR-0013.
982
- */
983
- declare const DEFINITIONS: {
984
- ambush: ControlMeasureDefinition<"ambush", (controlPoints: import("geojson").Position[], options?: AmbushOptions) => import("geojson").FeatureCollection<import("geojson").MultiLineString, Record<string, never>>>;
985
- "principal-direction-of-fire": ControlMeasureDefinition<"principal-direction-of-fire", typeof createPrincipalDirectionOfFire>;
986
- "final-protective-fire-left": ControlMeasureDefinition<"final-protective-fire-left", typeof createFinalProtectiveFireLeft>;
987
- "final-protective-fire-right": ControlMeasureDefinition<"final-protective-fire-right", typeof createFinalProtectiveFireRight>;
988
- "search-area": ControlMeasureDefinition<"search-area", (controlPoints: import("geojson").Position[], options?: TacticalArrowOptions) => import("geojson").FeatureCollection<import("geojson").MultiLineString | import("geojson").MultiPolygon, {
989
- part: "shaft" | "head";
990
- fill?: boolean;
991
- }>>;
992
- "main-attack": ControlMeasureDefinition<"main-attack", typeof createMainAttack>;
993
- "supporting-attack": ControlMeasureDefinition<"supporting-attack", typeof createSupportingAttack>;
994
- "classic-arrow": ControlMeasureDefinition<"classic-arrow", typeof createClassicArrow>;
995
- "block-arrow": ControlMeasureDefinition<"block-arrow", typeof createBlockArrow>;
996
- "airborne-attack": ControlMeasureDefinition<"airborne-attack", typeof createAirborneAttack>;
997
- "attack-helicopter": ControlMeasureDefinition<"attack-helicopter", typeof createAttackHelicopter>;
998
- "support-by-fire": ControlMeasureDefinition<"support-by-fire", typeof createSupportByFire>;
999
- "attack-by-fire": ControlMeasureDefinition<"attack-by-fire", typeof createAttackByFire>;
1000
- flot: ControlMeasureDefinition<"flot", typeof createFLOT>;
1001
- "block-mission-task": ControlMeasureDefinition<"block-mission-task", typeof createBlockMissionTaskSymbol>;
1002
- breach: ControlMeasureDefinition<"breach", typeof createBreachSymbol>;
1003
- bypass: ControlMeasureDefinition<"bypass", typeof createBypassSymbol>;
1004
- canalize: ControlMeasureDefinition<"canalize", typeof createCanalizeSymbol>;
1005
- clear: ControlMeasureDefinition<"clear", typeof createClearSymbol>;
1006
- delay: ControlMeasureDefinition<"delay", typeof createDelaySymbol>;
1007
- isolate: ControlMeasureDefinition<"isolate", typeof createIsolateSymbol>;
1008
- "antitank-ditch-under-construction": ControlMeasureDefinition<"antitank-ditch-under-construction", typeof createAntitankDitchUnderConstruction>;
1009
- "antitank-ditch-completed": ControlMeasureDefinition<"antitank-ditch-completed", typeof createAntitankDitchCompleted>;
1010
- "antitank-wall": ControlMeasureDefinition<"antitank-wall", typeof createAntitankWall>;
1011
- "fortified-line": ControlMeasureDefinition<"fortified-line", typeof createFortifiedLine>;
1012
- "fortified-area": ControlMeasureDefinition<"fortified-area", typeof createFortifiedArea>;
1013
- block: ControlMeasureDefinition<"block", typeof createBlock>;
1014
- disrupt: ControlMeasureDefinition<"disrupt", typeof createDisrupt>;
1015
- fix: ControlMeasureDefinition<"fix", typeof createFix>;
1016
- turn: ControlMeasureDefinition<"turn", typeof createTurn>;
1017
- "obstacle-bypass-easy": ControlMeasureDefinition<"obstacle-bypass-easy", typeof createObstacleBypassEasy>;
1018
- "obstacle-bypass-difficult": ControlMeasureDefinition<"obstacle-bypass-difficult", typeof createObstacleBypassDifficult>;
1019
- "obstacle-bypass-impossible": ControlMeasureDefinition<"obstacle-bypass-impossible", typeof createObstacleBypassImpossible>;
1020
- };
1021
- type Definitions = typeof DEFINITIONS;
1022
- /** Stable string id of a control measure — the keys of {@link DEFINITIONS}. */
1023
- type ControlMeasureId = keyof Definitions;
1024
- /**
1025
- * The discriminant for {@link ControlMeasure}. Identical to
1026
- * {@link ControlMeasureId}; kept as a distinct name for the `<K extends
1027
- * ControlMeasureKind>` generics threaded through rendering and edit sessions.
1028
- */
1029
- type ControlMeasureKind = ControlMeasureId;
1030
- /** Strips the internal `validationMode` knob from a public options surface. */
1031
- type PublicOptions<T> = Omit<T, "validationMode">;
1032
- /**
1033
- * The per-kind public options map, derived covariantly from each definition's
1034
- * generator (see {@link OptsOf}). Empty-options kinds resolve to `{}` — exactly
1035
- * as loose as the former hand-written table. See ADR-0013.
1036
- */
1037
- type OptionsByKind = { [K in keyof Definitions]: PublicOptions<OptsOf<Definitions[K]>> };
1038
- /** Insertion-ordered list of every control-measure id. */
1039
- declare const CONTROL_MEASURE_IDS: readonly ControlMeasureId[];
1040
- declare const CONTROL_MEASURE_METADATA: Readonly<Record<ControlMeasureId, ControlMeasureMetadata>>;
1041
- declare function listControlMeasureMetadata(): readonly ControlMeasureMetadata[];
1042
- declare function getControlMeasureMetadata(id: ControlMeasureId): ControlMeasureMetadata;
1043
- declare function getControlMeasureMetadataByValue(value: string): ControlMeasureMetadata | undefined;
1044
- declare function getDefaultOptions<K extends ControlMeasureKind>(kind: K): OptionsByKind[K];
1045
- //#endregion
1046
- //#region src/style.d.ts
1047
- /**
1048
- * Framework-agnostic style hints attached to a `ControlMeasure`.
1049
- *
1050
- * Mirrors the per-feature subset of what map adapters render. The renderer
1051
- * fans these into each emitted feature's `properties.style` ([[StyleHints]]).
1052
- * Adapters merge them over their layer-level style; generator-emitted hints
1053
- * on individual features win over both.
1054
- */
1055
- interface ControlMeasureStyle {
1056
- /**
1057
- * The single symbol color. Control measures are monocolor: one color paints
1058
- * every part, stroked or filled. Input-only — resolved into concrete
1059
- * `strokeColor` / `fillColor` per feature by the renderer and never emitted
1060
- * on output. `strokeColor` / `fillColor` act as optional per-channel
1061
- * overrides. See ADR-0011.
1062
- */
1063
- color?: string;
1064
- strokeColor?: string;
1065
- strokeWidth?: number;
1066
- strokeDash?: number[];
1067
- fillColor?: string;
1068
- }
1069
- //#endregion
1070
- //#region src/instance.d.ts
1071
- interface ControlMeasure<K extends ControlMeasureKind = ControlMeasureKind> {
1072
- id: string;
1073
- kind: K;
1074
- controlPoints: Position[];
1075
- options?: OptionsByKind[K];
1076
- style?: ControlMeasureStyle;
1077
- properties?: Record<string, unknown>;
1078
- schemaVersion?: 1;
1079
- }
1080
- declare function isKind<K extends ControlMeasureKind>(cm: ControlMeasure, kind: K): cm is ControlMeasure<K>;
1081
- /**
1082
- * Deep-clone a `ControlMeasure` so held references survive mutations to the
1083
- * original (and vice versa). Used by the session façade to build the
1084
- * `measure` half of `ControlMeasureSnapshot`. Nested values inside
1085
- * `options`, `style`, and `properties` are cloned too — `properties` is
1086
- * `Record<string, unknown>` and may carry arbitrary host metadata, so a
1087
- * shallow copy would leak shared references.
1088
- *
1089
- * Backed by `structuredClone`: only structured-cloneable values are
1090
- * supported (no functions, DOM nodes, class instances). Absent optional
1091
- * fields stay absent on the clone.
1092
- */
1093
- declare function cloneControlMeasure<K extends ControlMeasureKind>(cm: ControlMeasure<K>): ControlMeasure<K>;
1094
- //#endregion
1095
- //#region src/rendered.d.ts
1096
- /**
1097
- * Per-feature style hints carried on `properties.style`.
1098
- *
1099
- * These are *resolved*: `renderControlMeasure` cascades `graphicsStyle` →
1100
- * `cm.style` → any generator pattern hint, then expands the monocolor `color`
1101
- * into concrete `strokeColor` / `fillColor` per feature (see ADR-0011 and
1102
- * `resolveSymbolColor`). Output therefore carries concrete colors, never the
1103
- * input-only `color` key, and a `fillColor` only on parts the generator
1104
- * marked filled.
1105
- *
1106
- * Generators contribute paint *role* and *pattern* (a part is filled; a
1107
- * sub-line is dashed regardless of the user's stroke), never a hue. Adapters
1108
- * merge the resulting `StyleHints` over their layer-level style at draw time.
1109
- */
1110
- interface StyleHints extends ControlMeasureStyle {}
1111
- /**
1112
- * Per-feature properties emitted by `renderControlMeasure`.
1113
- *
1114
- * Stable-id contract — every feature produced by the renderer has:
1115
- * - `feature.id` of the form `${cmId}:${part}:${index}`
1116
- * - `properties.part` matching the `part` segment of the id
1117
- * - `properties.index` matching the `index` segment of the id
1118
- *
1119
- * Adapters rely on this contract to diff renders in place without keeping
1120
- * their own bookkeeping. Use `controlMeasureIdFromFeature` to recover the
1121
- * `cmId` from a picked feature.
1122
- */
1123
- interface FeaturePartProps {
1124
- part: string;
1125
- index: number;
1126
- style?: StyleHints;
1127
- /** Label text emitted by generators (e.g. breach "B"). */
1128
- text?: string;
1129
- /** Label rotation in radians, emitted by generators. */
1130
- rotation?: number;
1131
- /** Label size in CSS pixels at the draw/reference zoom. */
1132
- textSizePixels?: number;
1133
- /** Map zoom at which textSizePixels was captured. */
1134
- textSizeZoom?: number;
1135
- /** Map resolution at which textSizePixels was captured. */
1136
- textSizeResolution?: number;
1137
- }
1138
- /**
1139
- * Output of `renderControlMeasure`. A GeoJSON `FeatureCollection` whose
1140
- * features satisfy the `FeaturePartProps` stable-id contract. See ADR-0010.
1141
- */
1142
- type ControlMeasureRender = FeatureCollection<Geometry, FeaturePartProps>;
1143
- /**
1144
- * A `ControlMeasure` paired with its `Render` at a single point in time.
1145
- *
1146
- * The unit delivered to `EditChangeEvent` listeners (as `measure` and
1147
- * `previous`) and resolved from `TacticalDraw.draw()` / `.edit()`. The
1148
- * `measure` half is a defensive clone (see `cloneControlMeasure`) so held
1149
- * references remain valid after the originating session has closed.
1150
- *
1151
- * See ADR-0010.
1152
- */
1153
- interface ControlMeasureSnapshot<K extends ControlMeasureKind = ControlMeasureKind> {
1154
- measure: ControlMeasure<K>;
1155
- render: ControlMeasureRender;
1156
- }
1157
- /**
1158
- * Recover the originating control measure id (`cmId`) from a feature emitted
1159
- * by `renderControlMeasure`. The feature id must match the stable-id contract
1160
- * `${cmId}:${part}:${index}`; otherwise this throws.
1161
- */
1162
- declare function controlMeasureIdFromFeature(feature: Feature<Geometry, FeaturePartProps> | {
1163
- id?: string | number;
1164
- }): string;
1165
- //#endregion
1166
- //#region src/renderControlMeasure.d.ts
1167
- interface RenderOptions {
1168
- validationMode?: ValidationMode;
1169
- /**
1170
- * Façade-level default style (third / lowest-priority layer). Merged
1171
- * shallowly under `cm.style` and any per-feature generator hint. When
1172
- * omitted, style resolution matches the prior two-layer behavior.
1173
- */
1174
- graphicsStyle?: ControlMeasureStyle;
1175
- }
1176
- /**
1177
- * Pure render: `ControlMeasure` → `ControlMeasureRender` (a
1178
- * `FeatureCollection` of `FeaturePartProps`-typed features). Per-feature
1179
- * stable ids follow `${cm.id}:${part}:${index}`. Style is resolved from the
1180
- * three layers (graphicsStyle, cm.style, generator hint) and stamped on
1181
- * `properties.style` when non-empty.
1182
- */
1183
- declare function renderControlMeasure<K extends ControlMeasureKind>(cm: ControlMeasure<K>, opts?: RenderOptions): ControlMeasureRender;
1184
- //#endregion
1185
- //#region src/styleResolver.d.ts
1186
- /**
1187
- * Three-layer style precedence for `renderControlMeasure`.
1188
- *
1189
- * Lower-priority → higher-priority: `graphicsStyle` (façade default) →
1190
- * `measureStyle` (`cm.style`) → `generatorStyle` (per-feature hint emitted
1191
- * by a generator). Merge is shallow and per-property; higher-priority layers
1192
- * win key by key. Explicit `null` / `undefined` in a higher-priority layer
1193
- * is treated as "no opinion" and does not clear a lower-priority key.
1194
- *
1195
- * Returns `undefined` when all three layers are absent so the renderer can
1196
- * omit `properties.style` entirely — keeps the no-style case byte-identical
1197
- * to a property-less feature.
1198
- *
1199
- * Pure function: inputs are never mutated; the returned object is always a
1200
- * fresh allocation when defined.
1201
- */
1202
- declare function resolveStyleHints(graphicsStyle: ControlMeasureStyle | undefined, measureStyle: ControlMeasureStyle | undefined, generatorStyle: StyleHints | undefined): StyleHints | undefined;
1203
- //#endregion
1204
- //#region src/toSimpleStyle.d.ts
1205
- /**
1206
- * simplestyle-spec properties (the subset this library can express), flat on
1207
- * `properties`. All keys are optional.
1208
- *
1209
- * @see https://github.com/mapbox/simplestyle-spec
1210
- */
1211
- interface SimpleStyleProps extends FeaturePartProps {
1212
- stroke?: string;
1213
- "stroke-width"?: number;
1214
- "stroke-opacity"?: number;
1215
- fill?: string;
1216
- "fill-opacity"?: number;
1217
- }
1218
- /**
1219
- * A `FeatureCollection` whose features carry simplestyle-spec keys instead of
1220
- * the nested `properties.style` slot. The `FeaturePartProps` stable-id
1221
- * contract (`part`, `index`, `feature.id`) is preserved.
1222
- */
1223
- type SimpleStyleRender = FeatureCollection<Geometry, SimpleStyleProps>;
1224
- /**
1225
- * Lossy interop transform: `ControlMeasureRender` → a `FeatureCollection`
1226
- * whose features carry simplestyle-spec keys. Operates on the already-resolved
1227
- * per-feature `style`, so it composes after `renderControlMeasure`'s
1228
- * three-layer merge and stays a pure post-processing step.
1229
- *
1230
- * Lossy mapping, by design:
1231
- * - `strokeDash` has no simplestyle equivalent and is dropped — dashed
1232
- * doctrinal sub-lines render solid in simplestyle consumers.
1233
- * - colors must be hex or `rgb()/rgba()`; alpha becomes `*-opacity`. Other
1234
- * color forms (named, `hsl()`) are omitted rather than guessed.
1235
- */
1236
- declare function toSimpleStyle(render: ControlMeasureRender): SimpleStyleRender;
1237
- //#endregion
1238
- //#region src/internal/graphics-utils.d.ts
1239
- /**
1240
- * Small value used to avoid division by zero and floating-point precision issues.
1241
- */
1242
- declare const EPSILON = 0.000001;
1243
- /**
1244
- * Rounds a number to a specified number of decimal places.
1245
- */
1246
- declare const roundToFixed: (v: number, precision?: number) => number;
1247
- /**
1248
- * Calculates the meters-per-pixel ratio at a given latitude and zoom level.
1249
- *
1250
- * This is essential for maintaining consistent visual sizes on the map
1251
- * regardless of zoom level. The formula accounts for:
1252
- * - The Web Mercator projection's tile-based structure
1253
- * - The latitude-dependent scale distortion in Mercator projection
1254
- *
1255
- * @param latitude - The latitude in degrees (affects scale due to projection)
1256
- * @param zoomLevel - The current map zoom level
1257
- * @returns The number of meters represented by one pixel at the given location and zoom
1258
- *
1259
- * @example
1260
- * ```typescript
1261
- * // At zoom 10, latitude 45°
1262
- * const mpp = getMetersPerPixel(45, 10);
1263
- * // To get a 20-pixel radius in meters:
1264
- * const radiusMeters = 20 * mpp;
1265
- * ```
1266
- */
1267
- declare const getMetersPerPixel: (latitude: number, zoomLevel: number) => number;
1268
- //#endregion
1269
- //#region src/draw-rules/baseline-frame.d.ts
1270
- type BaselineFrameOrigin = "p1" | "p2" | "midpoint";
1271
- type BaselineFrameNormal = "right" | "left";
1272
- interface BaselineFrameOptions {
1273
- origin?: BaselineFrameOrigin;
1274
- normal?: BaselineFrameNormal;
1275
- }
1276
- interface BaselineFrame {
1277
- readonly p1: Point2D;
1278
- readonly p2: Point2D;
1279
- readonly origin: Point2D;
1280
- readonly direction: Point2D;
1281
- readonly normal: Point2D;
1282
- readonly length: number;
1283
- signedNormalDistance(point: Position): number;
1284
- pointAtNormalDistance(distance: number): Position | null;
1285
- }
1286
- declare function createBaselineFrame(p1: Position, p2: Position, options?: BaselineFrameOptions): BaselineFrame | null;
1287
- //#endregion
1288
- //#region src/draw-rules/midpoint-perpendicular.d.ts
1289
- interface MidpointPerpendicularDrawRuleOptions {
1290
- id: string;
1291
- defaultDistanceRatio?: number;
1292
- /** User clicks required to commit. Defaults to `2` (the third point is auto-derived). */
1293
- minimumUserPoints?: number;
1294
- /** Raw points at which a live preview can be derived. See {@link ControlMeasureDrawRule}. */
1295
- minimumPreviewPoints?: number;
1296
- /**
1297
- * Index of the slot whose point is constrained to the perpendicular axis
1298
- * through the configured origin of the other two ("baseline") slots. Must be
1299
- * `0` or `2`. Defaults to `2`.
1300
- *
1301
- * Area11 (Block) and Point12 (obstacle-bypass) use `2`: P1/P2 are the free
1302
- * baseline endpoints and P3 is constrained. Area7 (Attack-By-Fire) uses `0`:
1303
- * P1 is the constrained arrowhead tip and P2/P3 are the free back-line
1304
- * endpoints.
1305
- */
1306
- constrainedIndex?: 0 | 2;
1307
- /** Frame origin for the perpendicular axis. Defaults to `"midpoint"`. */
1308
- origin?: BaselineFrameOrigin;
1309
- /** Side the positive normal points to. Defaults to `"right"`. */
1310
- normal?: BaselineFrameNormal;
1311
- }
1312
- declare function createMidpointPerpendicularDrawRule(options: MidpointPerpendicularDrawRuleOptions): ControlMeasureDrawRule;
1313
- declare function computeDefaultMidpointPerpendicularPoint(p1: Position, p2: Position, distanceRatio?: number): Position | null;
1314
- declare function getMidpointPerpendicularSignedDistance(p1: Position, p2: Position, controlPoint: Position): number | null;
1315
- declare function pointOnMidpointPerpendicularAxis(p1: Position, p2: Position, distance: number | null): Position | null;
1316
- declare function snapToMidpointPerpendicular(p1: Position, p2: Position, controlPoint: Position): Position | null;
1317
- //#endregion
1318
- //#region src/draw-rules/area11.d.ts
1319
- declare const blockDrawRule: ControlMeasureDrawRule;
1320
- //#endregion
1321
- //#region src/draw-rules/area12.d.ts
1322
- /**
1323
- * Area12 anchor draw rule for Disrupt.
1324
- *
1325
- * P1/P2 are the free spine endpoints. P3 is the longest-arrow tip, constrained
1326
- * to the perpendicular axis through P1 (not the baseline midpoint).
1327
- */
1328
- declare const disruptDrawRule: ControlMeasureDrawRule;
1329
- //#endregion
1330
- //#region src/draw-rules/point12.d.ts
1331
- /**
1332
- * Point12 anchor draw rule for the obstacle-bypass family.
1333
- *
1334
- * Shared by `obstacle-bypass-easy`, `obstacle-bypass-difficult`, and
1335
- * `obstacle-bypass-impossible`: P1/P2 are the arrowhead tips and define the
1336
- * opening; P3 is constrained to the perpendicular axis through
1337
- * `midpoint(P1, P2)` and defines the rear of the symbol. Rear-line decoration
1338
- * (plain, zigzag, barrier marks) is a generator concern, not a draw-rule one.
1339
- */
1340
- declare const point12DrawRule: ControlMeasureDrawRule;
1341
- //#endregion
1342
- //#region src/draw-rules/area7.d.ts
1343
- /**
1344
- * Area7 anchor draw rule for Attack By Fire.
1345
- *
1346
- * P2/P3 are the free back-line endpoints; P1 (slot index 0) is the arrowhead
1347
- * tip, constrained to the perpendicular axis through `midpoint(P2, P3)`.
1348
- */
1349
- declare const attackByFireDrawRule: ControlMeasureDrawRule;
1350
- //#endregion
1351
- //#region src/draw-rules/line29.d.ts
1352
- /**
1353
- * Line29 anchor draw rule for Ambush.
1354
- *
1355
- * P2/P3 are the free back-line endpoints; P1 (slot index 0) is the arrowhead
1356
- * tip, constrained to the perpendicular axis through `midpoint(P2, P3)`.
1357
- */
1358
- declare const ambushDrawRule: ControlMeasureDrawRule;
1359
- //#endregion
1360
- //#region src/draw-rules/line1.d.ts
1361
- declare const line1DrawRule: ControlMeasureDrawRule;
1362
- //#endregion
1363
- //#region src/draw-rules/line10.d.ts
1364
- /**
1365
- * Line10 — PT1 is the arrow tip, PT2 is the rear, and derived PT3 selects
1366
- * which side of the PT2 -> PT1 chord contains the 90-degree arc.
1367
- */
1368
- declare const turnDrawRule: ControlMeasureDrawRule;
1369
- //#endregion
1370
- //#region src/draw-rules/line23.d.ts
1371
- /**
1372
- * Line23 anchor draw rule for the Clear mission task.
1373
- *
1374
- * P1/P2 are the endpoints of the symbol's vertical line (its height); P3 is
1375
- * constrained to the perpendicular axis through `midpoint(P1, P2)` and defines
1376
- * the rear of the symbol (the shaft length). Geometrically identical to the
1377
- * obstacle-bypass `Point12` rule, but kept as its own spec id to match the
1378
- * doctrinal draw rule for Clear.
1379
- */
1380
- declare const line23DrawRule: ControlMeasureDrawRule;
1381
- //#endregion
1382
- //#region src/draw-rules/line24.d.ts
1383
- /**
1384
- * Line24 anchor draw rule for the Delay mission task.
1385
- *
1386
- * PT. 1 and PT. 2 are the free straight-line endpoints. PT. 3 is constrained to
1387
- * the perpendicular axis through PT. 2, where its signed distance from PT. 2
1388
- * defines the semicircular arc diameter and side. Unlike the sibling Line23
1389
- * (Clear) rule, the third point must be placed explicitly (three user clicks),
1390
- * with a two-point live preview before commit.
1391
- */
1392
- declare const line24DrawRule: ControlMeasureDrawRule;
1393
- //#endregion
1394
- //#region src/draw-rules/area8.d.ts
1395
- declare const supportByFireDrawRule: ControlMeasureDrawRule;
1396
- //#endregion
1397
- //#region src/draw-rules/axis1.d.ts
1398
- declare const axis1DrawRule: ControlMeasureDrawRule;
1399
- //#endregion
1400
- //#region src/generators/cm14-maneuver-lines/ambush.d.ts
1401
- /**
1402
- * Configuration options for the Ambush tactical symbol.
1403
- */
1404
- interface AmbushOptions {
1405
- /** Number of segments used to draw the quadratic curve (default: 30) */
1406
- resolution?: number;
1407
- /** Size of arrowhead relative to chord span (default: 0.15) */
1408
- hSize?: number;
1409
- /** Width of arrowhead wings relative to its length (default: 0.5) */
1410
- hWidth?: number;
1411
- /** Length of parallel hatches relative to chord span (default: 0.15) */
1412
- hLen?: number;
1413
- /** Number of parallel hatches along the curve (default: 5) */
1414
- hCount?: number;
1415
- /** Depth of the curve toward PT 1 relative to chord span (default: 0.25) */
1416
- cDepth?: number;
1417
- }
1418
- declare const DEFAULT_AMBUSH_OPTIONS: Required<AmbushOptions>;
1419
- //#endregion
1420
- //#region src/generators/cm15-maneuver-areas/searchArea.d.ts
1421
- /**
1422
- * Configuration options to tweak the tactical arrow's geometry.
1423
- */
1424
- interface TacticalArrowOptions {
1425
- /** Ratio of arrowhead length to total leg length (default: 0.12) */
1426
- headSizeRatio?: number;
1427
- /** Width multiplier for the arrowhead wings (default: 0.5) */
1428
- headWidthMultiplier?: number;
1429
- /** Percentage along the leg where the zigzag begins, 0.0-1.0 (default: 0.55) */
1430
- zigzagStart?: number;
1431
- /** Percentage along the leg where the zigzag returns, 0.0-1.0 (default: 0.45) */
1432
- zigzagEnd?: number;
1433
- /** Perpendicular distance for the lightning "kink", relative to leg length (default: 0.07) */
1434
- zigzagWidth?: number;
1435
- }
1436
- /**
1437
- * Default options for the tactical arrow.
1438
- */
1439
- declare const DEFAULT_TACTICAL_ARROW_OPTIONS: Required<TacticalArrowOptions>;
1440
- //#endregion
1441
- export { type AirborneAttackOptions, type AmbushOptions, type AnchorTransformEvent, type AntitankDitchOptions, type AntitankWallOptions, type AttackByFireOptions, type AttackHelicopterOptions, type BaselineFrame, type BaselineFrameNormal, type BaselineFrameOptions, type BaselineFrameOrigin, type BlockMissionTaskOptions, type BlockOptions, type BreachOptions, type BypassOptions, CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, type CanalizeOptions, type ClearOptions, type ControlMeasure, type ControlMeasureDrawRule, type ControlMeasureGeometry, type ControlMeasureGeometryType, type ControlMeasureId, type ControlMeasureKind, type ControlMeasureMetadata, type ControlMeasureRender, type ControlMeasureSnapshot, type ControlMeasureStyle, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_OPTIONS, DEFAULT_BLOCK_MISSION_TASK_OPTIONS, DEFAULT_BLOCK_OPTIONS, DEFAULT_BREACH_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_DELAY_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURN_OPTIONS, type DelayOptions, type DisruptOptions, EPSILON, type FLOTOptions, type FeaturePartProps, type FinalProtectiveFireOptions, type FixOptions, type FortifiedAreaOptions, type FortifiedLineOptions, type MainAttackOptions, type MidpointPerpendicularDrawRuleOptions, type ObstacleBypassDifficultOptions, type ObstacleBypassEasyOptions, type ObstacleBypassImpossibleOptions, type OptionsByKind, type ParamDescriptor, type Point2D, type PrincipalDirectionOfFireOptions, type RenderOptions, type SimpleStyleProps, type SimpleStyleRender, type StyleHints, type SupportByFireOptions, type SupportingAttackOptions, type TacticalArrowOptions, type TurnOptions, ambushDrawRule, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, listControlMeasureMetadata, point12DrawRule, pointOnMidpointPerpendicularAxis, project, renderControlMeasure, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
1
+ import { $ as listControlMeasureMetadata, $t as DEFAULT_ENCIRCLEMENT_OPTIONS, A as SimpleStyleProps, At as BreachOptions, B as controlMeasureIdFromFeature, Bt as AttackHelicopterOptions, C as BaselineFrameNormal, Ct as DelayOptions, D as EPSILON, Dt as DEFAULT_CANALIZE_OPTIONS, E as createBaselineFrame, Et as CanalizeOptions, F as renderControlMeasure, Ft as FLOTOptions, G as CONTROL_MEASURE_IDS, Gt as SupportingAttackOptions, H as cloneControlMeasure, Ht as AirborneAttackOptions, I as ControlMeasureRender, It as AttackByFireOptions, J as ControlMeasureKind, Jt as calculateMetrics, K as CONTROL_MEASURE_METADATA, Kt as DEFAULT_MAIN_ATTACK_OPTIONS, L as ControlMeasureSnapshot, Lt as DEFAULT_ATTACK_BY_FIRE_OPTIONS, M as toSimpleStyle, Mt as BlockMissionTaskOptions, N as resolveStyleHints, Nt as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, O as getMetersPerPixel, Ot as BypassOptions, P as RenderOptions, Pt as DEFAULT_FLOT_OPTIONS, Q as getDefaultOptions, Qt as unproject, R as FeaturePartProps, Rt as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, S as BaselineFrame, St as DEFAULT_DELAY_OPTIONS, T as BaselineFrameOrigin, Tt as DEFAULT_CLEAR_OPTIONS, U as isKind, Ut as DEFAULT_AIRBORNE_ATTACK_OPTIONS, V as ControlMeasure, Vt as DEFAULT_ATTACK_HELICOPTER_OPTIONS, W as ControlMeasureStyle, Wt as DEFAULT_SUPPORTING_ATTACK_OPTIONS, X as getControlMeasureMetadata, Xt as Point2D, Y as OptionsByKind, Yt as computeInitialWidthPoint, Z as getControlMeasureMetadataByValue, Zt as project, _ as computeDefaultMidpointPerpendicularPoint, _t as FortifiedLineOptions, a as axis1DrawRule, an as DEFAULT_STRONG_POINT_OPTIONS, at as ObstacleBypassEasyOptions, b as pointOnMidpointPerpendicularAxis, bt as AntitankDitchOptions, c as line23DrawRule, cn as ControlMeasureGeometryType, ct as DEFAULT_FIX_OPTIONS, d as ambushDrawRule, dn as AnchorTransformEvent, dt as DisruptOptions, en as EncirclementOptions, et as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, f as attackByFireDrawRule, fn as ControlMeasureDrawRule, ft as BlockOptions, g as MidpointPerpendicularDrawRuleOptions, gt as DEFAULT_FORTIFIED_LINE_OPTIONS, h as blockDrawRule, ht as FortifiedAreaOptions, i as DEFAULT_AMBUSH_OPTIONS, in as PrincipalDirectionOfFireOptions, it as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, j as SimpleStyleRender, jt as DEFAULT_BREACH_OPTIONS, k as roundToFixed, kt as DEFAULT_BYPASS_OPTIONS, l as turnDrawRule, ln as ControlMeasureMetadata, lt as FixOptions, m as disruptDrawRule, mt as DEFAULT_FORTIFIED_AREA_OPTIONS, n as TacticalArrowOptions, nn as FinalProtectiveFireOptions, nt as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, o as supportByFireDrawRule, on as StrongPointOptions, ot as DEFAULT_TURN_OPTIONS, p as point12DrawRule, pt as DEFAULT_BLOCK_OPTIONS, q as ControlMeasureId, qt as MainAttackOptions, r as AmbushOptions, rn as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, rt as ObstacleBypassDifficultOptions, s as line24DrawRule, sn as ControlMeasureGeometry, st as TurnOptions, t as DEFAULT_TACTICAL_ARROW_OPTIONS, tn as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, tt as ObstacleBypassImpossibleOptions, u as line1DrawRule, un as ParamDescriptor, ut as DEFAULT_DISRUPT_OPTIONS, v as createMidpointPerpendicularDrawRule, vt as AntitankWallOptions, w as BaselineFrameOptions, wt as ClearOptions, x as snapToMidpointPerpendicular, xt as DEFAULT_ANTITANK_DITCH_OPTIONS, y as getMidpointPerpendicularSignedDistance, yt as DEFAULT_ANTITANK_WALL_OPTIONS, z as StyleHints, zt as SupportByFireOptions } from "./index-BJYbQlzo.mjs";
2
+ export { type AirborneAttackOptions, type AmbushOptions, type AnchorTransformEvent, type AntitankDitchOptions, type AntitankWallOptions, type AttackByFireOptions, type AttackHelicopterOptions, type BaselineFrame, type BaselineFrameNormal, type BaselineFrameOptions, type BaselineFrameOrigin, type BlockMissionTaskOptions, type BlockOptions, type BreachOptions, type BypassOptions, CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, type CanalizeOptions, type ClearOptions, type ControlMeasure, type ControlMeasureDrawRule, type ControlMeasureGeometry, type ControlMeasureGeometryType, type ControlMeasureId, type ControlMeasureKind, type ControlMeasureMetadata, type ControlMeasureRender, type ControlMeasureSnapshot, type ControlMeasureStyle, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_OPTIONS, DEFAULT_BLOCK_MISSION_TASK_OPTIONS, DEFAULT_BLOCK_OPTIONS, DEFAULT_BREACH_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_DELAY_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURN_OPTIONS, type DelayOptions, type DisruptOptions, EPSILON, type EncirclementOptions, type FLOTOptions, type FeaturePartProps, type FinalProtectiveFireOptions, type FixOptions, type FortifiedAreaOptions, type FortifiedLineOptions, type MainAttackOptions, type MidpointPerpendicularDrawRuleOptions, type ObstacleBypassDifficultOptions, type ObstacleBypassEasyOptions, type ObstacleBypassImpossibleOptions, type OptionsByKind, type ParamDescriptor, type Point2D, type PrincipalDirectionOfFireOptions, type RenderOptions, type SimpleStyleProps, type SimpleStyleRender, type StrongPointOptions, type StyleHints, type SupportByFireOptions, type SupportingAttackOptions, type TacticalArrowOptions, type TurnOptions, ambushDrawRule, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, listControlMeasureMetadata, point12DrawRule, pointOnMidpointPerpendicularAxis, project, renderControlMeasure, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };