@orbat-mapper/control-measures 0.2.0-alpha.0 → 0.2.0-alpha.10

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.
Files changed (49) hide show
  1. package/README.md +98 -36
  2. package/dist/index-D3uCYKe3.d.mts +2304 -0
  3. package/dist/index.d.mts +2 -1354
  4. package/dist/index.mjs +16 -4964
  5. package/dist/preview/index.d.mts +60 -0
  6. package/dist/preview/index.mjs +254 -0
  7. package/dist/renderControlMeasure-BblcXXLp.mjs +8964 -0
  8. package/media/airborne-attack.svg +1 -0
  9. package/media/ambush.svg +1 -0
  10. package/media/antitank-ditch-completed.svg +1 -0
  11. package/media/antitank-ditch-under-construction.svg +1 -0
  12. package/media/antitank-wall.svg +1 -0
  13. package/media/attack-by-fire.svg +1 -0
  14. package/media/attack-helicopter.svg +1 -0
  15. package/media/battle-position.svg +1 -0
  16. package/media/block-arrow.svg +1 -0
  17. package/media/block-mission-task.svg +1 -0
  18. package/media/block.svg +1 -0
  19. package/media/boundary.svg +1 -0
  20. package/media/breach.svg +1 -0
  21. package/media/bypass.svg +1 -0
  22. package/media/canalize.svg +1 -0
  23. package/media/circle.svg +1 -0
  24. package/media/classic-arrow.svg +1 -0
  25. package/media/clear.svg +1 -0
  26. package/media/delay.svg +1 -0
  27. package/media/disrupt.svg +1 -0
  28. package/media/encirclement.svg +1 -0
  29. package/media/final-protective-fire-left.svg +1 -0
  30. package/media/final-protective-fire-right.svg +1 -0
  31. package/media/fix.svg +1 -0
  32. package/media/flot.svg +1 -0
  33. package/media/fortified-area.svg +1 -0
  34. package/media/fortified-line.svg +1 -0
  35. package/media/isolate.svg +1 -0
  36. package/media/line.svg +1 -0
  37. package/media/main-attack.svg +1 -0
  38. package/media/obstacle-bypass-difficult.svg +1 -0
  39. package/media/obstacle-bypass-easy.svg +1 -0
  40. package/media/obstacle-bypass-impossible.svg +1 -0
  41. package/media/polygon.svg +1 -0
  42. package/media/principal-direction-of-fire.svg +1 -0
  43. package/media/rectangle.svg +1 -0
  44. package/media/search-area.svg +1 -0
  45. package/media/strong-point.svg +1 -0
  46. package/media/support-by-fire.svg +1 -0
  47. package/media/supporting-attack.svg +1 -0
  48. package/media/turn.svg +1 -0
  49. package/package.json +8 -2
@@ -0,0 +1,2304 @@
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
+ * Opt a fixed-length draw into the standard dashed interaction guide. Fixed
28
+ * shapes suppress guides by default because their generator preview is
29
+ * normally sufficient. Use this when the guide communicates an incomplete
30
+ * construction state, such as Rectangle's P1-P2 baseline.
31
+ */
32
+ readonly showGuide?: boolean;
33
+ /**
34
+ * Convert raw draw points into the spine rendered by the interaction guide.
35
+ * Defaults to the raw points. A rule may return the first point again at the
36
+ * end when it needs to provide its own closed guide geometry.
37
+ */
38
+ guidePoints?(points: readonly Position[]): Position[];
39
+ /**
40
+ * Number of trailing slots in the canonical control-point array that are
41
+ * NOT user-clicked spine vertices. For Axis1, this is 1 (the width handle
42
+ * at index N-1). Drives four behaviors in TacticalDraw:
43
+ * 1. New clicks insert at `length - trailingFixedSlots` (not appended).
44
+ * 2. Midpoint handles render only between segments inside
45
+ * [0 .. length - 1 - trailingFixedSlots].
46
+ * 3. The "click the last added point to commit" hit test uses
47
+ * `committed[length - 1 - trailingFixedSlots]`.
48
+ * 4. `canCommit` evaluates `length - trailingFixedSlots >= minimumUserPoints`.
49
+ * Defaults to 0 (the entire array is user-clicked spine). See ADR-0008.
50
+ */
51
+ readonly trailingFixedSlots?: number;
52
+ /**
53
+ * The user-spine points form a closed ring even though the first point is not
54
+ * duplicated at the end. TacticalDraw uses this to treat the last→first edge
55
+ * like every other edge for completion and midpoint insertion.
56
+ */
57
+ readonly closedRing?: boolean;
58
+ derive(points: readonly Position[]): Position[];
59
+ transform(event: AnchorTransformEvent): Position[];
60
+ }
61
+ //#endregion
62
+ //#region src/text-amplifiers.d.ts
63
+ /**
64
+ * MIL-STD-2525E Appendix L Table L-II text amplifier fields.
65
+ *
66
+ * A control measure instance carries free-text amplifier fields (unique
67
+ * designation, country, date-time group, …) keyed by their doctrinal field
68
+ * code. Repeated fields use numbered suffixes per the standard (`T`, `T1`,
69
+ * `AS1`, `W1`, …). Graphic amplifiers (echelon `B`, direction of movement `Q`,
70
+ * offset location `BA`) are deliberately excluded — they are geometry
71
+ * concerns, rendered from generator options rather than free text.
72
+ *
73
+ * This module is a leaf: it imports nothing from `./metadata` or
74
+ * `./registry`, so both can depend on it without a cycle.
75
+ */
76
+ type Suffix = "" | "1" | "2";
77
+ /** Doctrinal text amplifier field codes (Table L-II); graphic amplifier fields excluded. */
78
+ type TextAmplifierField = "C" | "H" | "N" | "T" | "V" | "W" | "X" | "Y" | "AM" | "AN" | "AP" | "AS";
79
+ /** A doctrinal field code with its optional repetition suffix, e.g. `"T1"`. */
80
+ type TextAmplifierKey = `${TextAmplifierField}${Suffix}`;
81
+ /**
82
+ * The vocabulary of text amplifier fields: doctrinal code, milsymbol-style
83
+ * friendly alias, and a human-readable label. The single source of truth for
84
+ * both the runtime catalog and the derived alias→code lookup used by
85
+ * {@link normalizeTextAmplifiers}.
86
+ */
87
+ declare const TEXT_AMPLIFIER_FIELDS: {
88
+ readonly C: {
89
+ readonly alias: "quantity";
90
+ readonly label: "Quantity";
91
+ };
92
+ readonly H: {
93
+ readonly alias: "additionalInformation";
94
+ readonly label: "Additional information";
95
+ };
96
+ readonly N: {
97
+ readonly alias: "hostile";
98
+ readonly label: "Hostile (ENY) marker";
99
+ };
100
+ readonly T: {
101
+ readonly alias: "uniqueDesignation";
102
+ readonly label: "Unique designation";
103
+ };
104
+ readonly V: {
105
+ readonly alias: "type";
106
+ readonly label: "Equipment/type";
107
+ };
108
+ readonly W: {
109
+ readonly alias: "dtg";
110
+ readonly label: "Date-time group / O/O";
111
+ };
112
+ readonly X: {
113
+ readonly alias: "altitudeDepth";
114
+ readonly label: "Altitude/depth";
115
+ };
116
+ readonly Y: {
117
+ readonly alias: "location";
118
+ readonly label: "Location";
119
+ };
120
+ readonly AM: {
121
+ readonly alias: "distance";
122
+ readonly label: "Distance/range/radius";
123
+ };
124
+ readonly AN: {
125
+ readonly alias: "azimuth";
126
+ readonly label: "Azimuth";
127
+ };
128
+ readonly AP: {
129
+ readonly alias: "targetNumber";
130
+ readonly label: "Target number";
131
+ };
132
+ readonly AS: {
133
+ readonly alias: "country";
134
+ readonly label: "Country code";
135
+ };
136
+ };
137
+ /** The milsymbol-style friendly alias for a text amplifier field, e.g. `"uniqueDesignation"`. */
138
+ type FriendlyName = (typeof TEXT_AMPLIFIER_FIELDS)[TextAmplifierField]["alias"];
139
+ /** A friendly alias with its optional repetition suffix, e.g. `"country1"`. */
140
+ type FriendlyKey = `${FriendlyName}${Suffix}`;
141
+ /**
142
+ * User-facing amplifier input: either canonical doctrinal keys (`T`, `AS1`,
143
+ * …) or friendly aliases (`uniqueDesignation`, `country1`, …), optionally
144
+ * mixed. Values are free text; see {@link normalizeTextAmplifiers} for how
145
+ * this is resolved to canonical form.
146
+ */
147
+ type TextAmplifiers = Partial<Record<TextAmplifierKey | FriendlyKey, string>>;
148
+ /** Amplifier values resolved to canonical doctrinal keys, as generators receive them. */
149
+ type CanonicalTextAmplifiers = Readonly<Partial<Record<TextAmplifierKey, string>>>;
150
+ /**
151
+ * Resolves any accepted key (canonical or friendly alias, with an optional
152
+ * `1`/`2` suffix) to its canonical key, or `undefined` if unknown — e.g.
153
+ * `"T"` → `"T"`, `"uniqueDesignation1"` → `"T1"`, `"bogus"` → `undefined`.
154
+ */
155
+ declare function canonicalTextAmplifierKey(key: string): TextAmplifierKey | undefined;
156
+ /**
157
+ * Resolves a `TextAmplifiers` record (canonical keys, friendly aliases, or a
158
+ * mix) to `CanonicalTextAmplifiers` keyed purely by doctrinal field code.
159
+ *
160
+ * - Friendly aliases (with an optional `1`/`2` suffix) map to their canonical
161
+ * code (e.g. `country1` → `AS1`).
162
+ * - Values are trimmed; entries that are empty/whitespace-only after
163
+ * trimming, or not strings, are dropped.
164
+ * - When both a canonical key and its friendly alias are present for the same
165
+ * field + suffix, the **canonical key wins** regardless of insertion order.
166
+ * This holds even for an empty/whitespace canonical value: it suppresses
167
+ * (clears) the alias entry rather than letting the alias survive.
168
+ * - Unknown keys are ignored.
169
+ *
170
+ * `undefined` or an empty input returns a shared frozen empty object.
171
+ */
172
+ declare function normalizeTextAmplifiers(input: TextAmplifiers | undefined): CanonicalTextAmplifiers;
173
+ //#endregion
174
+ //#region src/metadata.d.ts
175
+ type ControlMeasureGeometryType = Geometry["type"];
176
+ type ControlMeasureGeometry = "point" | "line" | "area";
177
+ declare const DRAW_RULE_IDS: readonly ["Area1", "Area7", "Area8", "Area11", "Area12", "Area15", "Area21", "Axis1", "Line1", "Line3", "Line9", "Line10", "Line23", "Line24", "Line29", "Point12", "Rectangle"];
178
+ type DrawRuleId = (typeof DRAW_RULE_IDS)[number];
179
+ interface BaseParamDescriptor {
180
+ key: string;
181
+ label: string;
182
+ description?: string;
183
+ visibleWhen?: (opts: Record<string, unknown>) => boolean;
184
+ }
185
+ interface NumberParamDescriptor extends BaseParamDescriptor {
186
+ type: "number";
187
+ min?: number;
188
+ max?: number;
189
+ step?: number;
190
+ unit?: string;
191
+ }
192
+ interface BooleanParamDescriptor extends BaseParamDescriptor {
193
+ type: "boolean";
194
+ }
195
+ interface ColorParamDescriptor extends BaseParamDescriptor {
196
+ type: "color";
197
+ }
198
+ interface EnumParamDescriptor extends BaseParamDescriptor {
199
+ type: "enum";
200
+ options: readonly {
201
+ label: string;
202
+ value: string | number | boolean;
203
+ }[];
204
+ }
205
+ interface TextParamDescriptor extends BaseParamDescriptor {
206
+ type: "text";
207
+ placeholder?: string;
208
+ maxLength?: number;
209
+ }
210
+ type ParamDescriptor = NumberParamDescriptor | BooleanParamDescriptor | ColorParamDescriptor | TextParamDescriptor | EnumParamDescriptor;
211
+ /** Editor-facing description of one text amplifier field a measure accepts. */
212
+ interface TextAmplifierDescriptor {
213
+ key: TextAmplifierKey;
214
+ label: string;
215
+ description?: string;
216
+ placeholder?: string;
217
+ /** Editor hint only — the renderer never truncates the value. */
218
+ maxLength?: number;
219
+ }
220
+ interface ControlMeasureMetadata {
221
+ id: string;
222
+ name: string;
223
+ description: string;
224
+ entity: string;
225
+ entityType: string;
226
+ entitySubtype?: string;
227
+ value: string;
228
+ geometry: ControlMeasureGeometry;
229
+ minCoordinates?: number;
230
+ maxCoordinates?: number;
231
+ geometryTypes?: readonly ControlMeasureGeometryType[];
232
+ drawRule?: DrawRuleId;
233
+ /**
234
+ * Resolved draw rule object (anchor contract) attached by the registry when
235
+ * the kind's `drawRule` id has an implementation. Consumed by the
236
+ * `TacticalDraw` façade to drive click accumulation during draw and
237
+ * vertex-snap during edit — see ADR-0005.
238
+ */
239
+ rule?: ControlMeasureDrawRule;
240
+ params?: readonly ParamDescriptor[];
241
+ /** Text amplifier fields (MIL-STD-2525E Appendix L Table L-II) this measure accepts. */
242
+ textAmplifiers?: readonly TextAmplifierDescriptor[];
243
+ /**
244
+ * Marks a measure that emits a text label whose pixel size should be captured
245
+ * once at draw-commit time (rather than re-resolved on every zoom). Hosts use
246
+ * this to stamp default label sizing onto the committed measure — see
247
+ * `withCommittedAdapterMeasureOptions` in `tactical-draw`. Keeping it on the
248
+ * definition means adding such a measure stays a one-file change (ADR-0013).
249
+ */
250
+ capturesLabelSize?: boolean;
251
+ }
252
+ //#endregion
253
+ //#region src/define.d.ts
254
+ /**
255
+ * The loosest `FeatureCollection` a control-measure generator may emit: any
256
+ * geometry, with per-feature properties that the renderer normalizes.
257
+ */
258
+ type AnyFeatureCollection = FeatureCollection<Geometry, Record<string, unknown> | null>;
259
+ /**
260
+ * A generator's call signature, constrained only by its inputs and output. The
261
+ * options parameter is typed `never` so that a generator with *any* concrete
262
+ * options type satisfies the bound — function parameters are contravariant, so
263
+ * `(o: BlockOptions) => …` is assignable to `(o: never) => …`. The actual
264
+ * options type is recovered covariantly via {@link OptsOf}, never through this
265
+ * bound. See ADR-0013.
266
+ *
267
+ * The optional third parameter carries the instance's normalized text
268
+ * amplifiers (ADR-0027); a generator that ignores text amplifiers just omits
269
+ * the parameter — fewer params is still assignable to this bound.
270
+ */
271
+ type ControlMeasureGenerator = (controlPoints: Position[], options: never, textAmplifiers?: CanonicalTextAmplifiers) => AnyFeatureCollection;
272
+ /**
273
+ * Everything that defines one control measure, co-located with its generator.
274
+ * `registry.ts` collects these into the single `DEFINITIONS` map, from which
275
+ * the `ControlMeasureId` union, `OptionsByKind`, the generator dispatch, the
276
+ * default options, and rule resolution are all derived rather than maintained
277
+ * as parallel tables. See ADR-0013.
278
+ */
279
+ interface ControlMeasureDefinition<Id extends string, G extends ControlMeasureGenerator> {
280
+ /** Catalog metadata; `id` is pinned to the record's literal key. */
281
+ metadata: ControlMeasureMetadata & {
282
+ id: Id;
283
+ };
284
+ /** Pure generator: control points (+ options) → GeoJSON features. */
285
+ generator: G;
286
+ /** Default options, tied to the generator's own options parameter. */
287
+ defaultOptions: NonNullable<Parameters<G>[1]>;
288
+ /**
289
+ * Resolved draw-rule object, merged back onto metadata by the registry. The
290
+ * doctrinal `drawRule` spec id stays on `metadata` (ADR-0005); the registry
291
+ * guards that `rule` agrees with it. See ADR-0013.
292
+ */
293
+ rule?: ControlMeasureDrawRule;
294
+ /**
295
+ * Representative sample used only by the static catalog/thumbnail previews
296
+ * (the `/preview` subpath). Most measures omit it and fall back to a generic
297
+ * layout keyed off `geometry`/`minCoordinates`/`entityType`; a measure whose
298
+ * symbol needs special framing co-locates the override here rather than in a
299
+ * central per-id switch. Points are **unitless** (~`[-1, 1]`); the resolver
300
+ * scales them to the small degree offsets the projected-meter generators
301
+ * expect. `options` is type-checked against this measure's own options. See
302
+ * ADR-0025.
303
+ */
304
+ previewSample?: PreviewSample<NonNullable<Parameters<G>[1]>>;
305
+ /**
306
+ * Pins orientation-derived defaults — options whose default value depends on
307
+ * the shape's current screen orientation (e.g. Battle Position's echelon
308
+ * anchor, which defaults to the bottom edge) — to their current concrete
309
+ * values. Returns an options patch to merge onto the working options, or
310
+ * `undefined` when there is nothing to freeze (already frozen, or nothing
311
+ * visible to pin). Called by edit hosts when a rotate gesture starts, so a
312
+ * subsequent rigid rotation of the control points preserves the rendered
313
+ * appearance instead of an orientation-relative default silently re-deriving
314
+ * against the new orientation. See ADR-0023.
315
+ */
316
+ freezeOrientation?: (controlPoints: Position[], options: NonNullable<Parameters<G>[1]>) => Partial<NonNullable<Parameters<G>[1]>> | undefined;
317
+ }
318
+ /**
319
+ * A measure's representative preview input. Shared between the typed
320
+ * {@link ControlMeasureDefinition} field and the erased
321
+ * {@link AnyControlMeasureDefinition}; `Options` is the measure's own options
322
+ * type (or `unknown` once erased). See ADR-0025.
323
+ */
324
+ interface PreviewSample<Options> {
325
+ controlPoints: readonly (readonly [number, number])[];
326
+ options?: Partial<Options>;
327
+ /**
328
+ * Sample text amplifiers (ADR-0027) rendered onto the representative
329
+ * preview, for measures whose doctrinal appearance is carried by amplifier
330
+ * text (e.g. Boundary-style end/center labels) rather than options alone.
331
+ */
332
+ textAmplifiers?: TextAmplifiers;
333
+ }
334
+ /**
335
+ * Extracts a definition's options type covariantly from its generator's
336
+ * (optional) second parameter — robust where inferring through the
337
+ * contravariant parameter position is not. See ADR-0013.
338
+ */
339
+ type OptsOf<D> = D extends {
340
+ generator: (points: Position[], options?: infer O) => unknown;
341
+ } ? O : never;
342
+ //#endregion
343
+ //#region src/generators/cm11-command-control-lines/boundary.d.ts
344
+ /** Configuration options for the Boundary control measure. */
345
+ interface BoundaryOptions {
346
+ /**
347
+ * Field B echelon. One of the keys in {@link ECHELONS} (e.g. `"battalion"`,
348
+ * `"division"`) or an equivalent symbol form (`"II"`, `"XX"`). `"none"`,
349
+ * empty, or unknown renders no glyph and leaves the line continuous.
350
+ * @default "battalion"
351
+ */
352
+ echelon?: string;
353
+ /**
354
+ * Echelon glyph height in meters (ground-anchored). Ignored when
355
+ * `echelonSizePixels` is supplied together with `metersPerPixel`.
356
+ * @default 750
357
+ */
358
+ echelonSize?: number;
359
+ /**
360
+ * Echelon glyph height in screen pixels (screen-anchored). Resolved to meters
361
+ * against `metersPerPixel`; bakes to a meter size on draw/edit commit
362
+ * (ADR-0020).
363
+ * @default 16
364
+ */
365
+ echelonSizePixels?: number;
366
+ /**
367
+ * Gap left on each side of the echelon glyph, as a ratio of the glyph height.
368
+ * `0` butts the line against the glyph; larger values widen the break.
369
+ * @default 0.3
370
+ */
371
+ echelonPadding?: number;
372
+ /**
373
+ * Meters-per-pixel at the current zoom/latitude. Stamped by the host when the
374
+ * measure is screen-anchored; required to resolve `echelonSizePixels` and to
375
+ * lock the T/AS text size to the glyph height.
376
+ */
377
+ metersPerPixel?: number;
378
+ /**
379
+ * Map zoom captured at draw-commit (`capturesLabelSize`). Forwarded onto the
380
+ * T/AS labels as `textSizeZoom` so a ground-anchored boundary's text scales
381
+ * with zoom like its meter-baked echelon glyph (maplibre).
382
+ */
383
+ labelSizeZoom?: number;
384
+ /**
385
+ * Map resolution (meters-per-pixel) captured at draw-commit
386
+ * (`capturesLabelSize`). Forwarded onto the T/AS labels as `textSizeResolution`
387
+ * so a ground-anchored boundary's text scales with zoom (OpenLayers), and used
388
+ * as the reference resolution that sizes the text to the glyph height.
389
+ */
390
+ labelSizeResolution?: number;
391
+ /**
392
+ * Number of label groups (echelon + designators), spaced evenly by cumulative
393
+ * arc length along the whole boundary. `1` places a single group at the
394
+ * midpoint of the total length (which may fall on any segment).
395
+ * @default 1
396
+ */
397
+ labelRepetitions?: number;
398
+ /**
399
+ * Spacing between label groups when `labelRepetitions > 1`, relative to an even
400
+ * spread across the whole boundary. `1` spreads them evenly end-to-end; `<1`
401
+ * clusters them toward the midpoint; `>1` pushes them toward the ends
402
+ * (clamped to the boundary). No effect for a single group.
403
+ * @default 1
404
+ */
405
+ labelSpacing?: number;
406
+ /**
407
+ * Clearance between the line/echelon glyph and the unit labels, as a ratio
408
+ * of the echelon glyph height (like `echelonPadding`). In `"along"` mode
409
+ * (and on `"standard"` east–west segments) it grows the labels'
410
+ * perpendicular offset from the line; in a `"standard"` north–south crossing
411
+ * row it grows each label's gap to the echelon glyph. Negative values clamp
412
+ * to 0.
413
+ * @default 0.4
414
+ */
415
+ labelPadding?: number;
416
+ /**
417
+ * How the T/AS unit labels and the echelon glyph are oriented:
418
+ *
419
+ * - `"along"` — text runs along the line, offset perpendicular to it, and
420
+ * the echelon glyph turns with the segment (the default).
421
+ * - `"standard"` — MIL-STD-2525E Appendix L §L.5.5.2 / Figure L-10
422
+ * placement. On mostly east–west segments this reads exactly like
423
+ * `"along"`. On mostly north–south segments the whole group rotates to run
424
+ * *perpendicular* to the line instead: a single row of
425
+ * `<unit 1> <echelon> <unit 2>` crossing it (unit 1 on its left-of-travel
426
+ * side), each label aligned away from the glyph so long designations never
427
+ * overlap the line.
428
+ * @default "along"
429
+ */
430
+ labelOrientation?: "along" | "standard";
431
+ /**
432
+ * Round the boundary's corners by curving it through the control points
433
+ * (centripetal Catmull-Rom spline). The spline preserves the endpoints, so
434
+ * the line still meets its drawn anchors.
435
+ * @default false
436
+ */
437
+ smooth?: boolean;
438
+ /**
439
+ * Number of samples per segment when `smooth` is enabled. Higher values yield
440
+ * a denser, smoother curve.
441
+ * @default 12
442
+ */
443
+ smoothResolution?: number;
444
+ }
445
+ /** Default options for the Boundary control measure. */
446
+ declare const DEFAULT_BOUNDARY_OPTIONS: BoundaryOptions;
447
+ /**
448
+ * Creates a Boundary control measure: a polyline through `positions` carrying
449
+ * repeated echelon + unit-designator labels.
450
+ *
451
+ * @param positions - Boundary anchor points (≥2); the input contract is
452
+ * enforced at the render seam (ADR-0014).
453
+ * @param options - {@link BoundaryOptions}.
454
+ * @param textAmplifiers - Normalized text amplifiers (ADR-0027): `T`/`AS` label
455
+ * unit 1 (left-of-travel side), `T1`/`AS1` label unit 2 (right-of-travel side).
456
+ */
457
+ declare function createBoundary(positions: Position[], options?: BoundaryOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<MultiLineString | MultiPolygon | Point>;
458
+ //#endregion
459
+ //#region src/projection.d.ts
460
+ type Point2D = [number, number];
461
+ /**
462
+ * Project WGS84 (Lon/Lat) to Web Mercator (Meters).
463
+ */
464
+ declare const project: (lon: number, lat: number) => Point2D;
465
+ /**
466
+ * Unproject Web Mercator (Meters) back to WGS84 (Lon/Lat).
467
+ */
468
+ declare const unproject: (x: number, y: number) => Position;
469
+ //#endregion
470
+ //#region src/internal/line-labels.d.ts
471
+ /** Captured label-size inputs (draw/edit time), as forwarded on generator options. */
472
+ interface LabelSizeOptions {
473
+ labelSizePixels?: number;
474
+ labelSizeZoom?: number;
475
+ labelSizeResolution?: number;
476
+ }
477
+ /** Shared placement options for the fixed-end-label line measures. */
478
+ interface LineLabelOptions extends LabelSizeOptions {
479
+ /**
480
+ * Extra clearance between the line and its labels, as a ratio of the
481
+ * label's resolved text height (`labelSizePixels × labelSizeResolution`),
482
+ * like Boundary's `labelPadding`. Negative values clamp to 0. Only
483
+ * effective when a live label size is captured — the no-size fallback
484
+ * offset is a fixed meter value, unaffected by this ratio.
485
+ * @default 0
486
+ */
487
+ labelPadding?: number;
488
+ }
489
+ //#endregion
490
+ //#region src/generators/cm11-command-control-lines/light-line.d.ts
491
+ /** Configuration options for the Light line control measure. */
492
+ interface LightLineOptions extends LineLabelOptions {
493
+ /**
494
+ * Optional phase line naming: renders `PL <name>` just beyond each end of
495
+ * the line, additive to the fixed "LL" labels. Empty or whitespace-only
496
+ * renders no label.
497
+ * @default none
498
+ */
499
+ phaseLineName?: string;
500
+ /**
501
+ * Prefix the `phaseLineName` label with "PL" (`"PL DAVID"`, or a bare
502
+ * "DAVID" when `false`). No effect when `phaseLineName` is empty — unlike
503
+ * Phase Line itself, this measure already carries its own fixed "LL"
504
+ * label, so there is no bare "PL" fallback.
505
+ * @default true
506
+ */
507
+ includePrefix?: boolean;
508
+ }
509
+ /** Default options for the Light line control measure. */
510
+ declare const DEFAULT_LIGHT_LINE_OPTIONS: LightLineOptions;
511
+ /**
512
+ * Creates a Light line control measure: a polyline through `positions`
513
+ * labeled "LL" above the line near each end.
514
+ */
515
+ declare function createLightLine(positions: Position[], options?: LightLineOptions): FeatureCollection<LineString | Point>;
516
+ //#endregion
517
+ //#region src/generators/cm11-command-control-lines/engineer-work-line.d.ts
518
+ /** Configuration options for the Engineer work line control measure. */
519
+ interface EngineerWorkLineOptions extends LineLabelOptions {
520
+ /**
521
+ * Optional phase line naming: renders `PL <name>` just beyond each end of
522
+ * the line, additive to the fixed "EWL" labels. Empty or whitespace-only
523
+ * renders no label.
524
+ * @default none
525
+ */
526
+ phaseLineName?: string;
527
+ /**
528
+ * Prefix the `phaseLineName` label with "PL" (`"PL DAVID"`, or a bare
529
+ * "DAVID" when `false`). No effect when `phaseLineName` is empty — unlike
530
+ * Phase Line itself, this measure already carries its own fixed "EWL"
531
+ * label, so there is no bare "PL" fallback.
532
+ * @default true
533
+ */
534
+ includePrefix?: boolean;
535
+ }
536
+ /** Default options for the Engineer work line control measure. */
537
+ declare const DEFAULT_ENGINEER_WORK_LINE_OPTIONS: EngineerWorkLineOptions;
538
+ /**
539
+ * Creates an Engineer work line control measure: a polyline through
540
+ * `positions` labeled "EWL" above the line near each end, plus one center
541
+ * label group at the midpoint of the total arc length carrying the
542
+ * responsible units' Field T/AS designator+country (left-of-travel side
543
+ * above the line, T1/AS1 below). No center group is emitted when all four
544
+ * amplifiers are empty.
545
+ */
546
+ declare function createEngineerWorkLine(positions: Position[], options?: EngineerWorkLineOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<LineString | Point>;
547
+ //#endregion
548
+ //#region src/generators/cm11-command-control-lines/generic-c2-line.d.ts
549
+ /** Configuration options for the Generic command and control line. */
550
+ interface GenericC2LineOptions extends LineLabelOptions {
551
+ /**
552
+ * Optional phase line naming: renders `PL <name>` just beyond each end of
553
+ * the line, additive to the H/T/W/W1 amplifier labels. Empty or
554
+ * whitespace-only renders no label.
555
+ * @default none
556
+ */
557
+ phaseLineName?: string;
558
+ /**
559
+ * Prefix the `phaseLineName` label with "PL" (`"PL DAVID"`, or a bare
560
+ * "DAVID" when `false`). No effect when `phaseLineName` is empty — this
561
+ * measure already carries its own H/T/W/W1 amplifier labels, so there is
562
+ * no bare "PL" fallback.
563
+ * @default true
564
+ */
565
+ includePrefix?: boolean;
566
+ }
567
+ /** Default options for the Generic command and control line. */
568
+ declare const DEFAULT_GENERIC_C2_LINE_OPTIONS: GenericC2LineOptions;
569
+ /**
570
+ * Creates a Generic command and control line: a polyline through `positions`
571
+ * with optional near-end text — `H`/`T` joined above the line, `W`/`W1`
572
+ * joined as a "from - to" range below it. Both rows share the per-tip
573
+ * placement from {@link import("../../internal/line-labels").aboveEndFrames}
574
+ * (inset from the tip, anchored toward the line's interior), one at
575
+ * `base + perp·offset` and the other at `base − perp·offset`.
576
+ */
577
+ declare function createGenericC2Line(positions: Position[], options?: GenericC2LineOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<LineString | Point>;
578
+ //#endregion
579
+ //#region src/internal/area-labels.d.ts
580
+ /** Shared placement options for the centered-label area measures. */
581
+ interface AreaLabelOptions extends LabelSizeOptions {
582
+ /**
583
+ * Extra row leading (and ENY inset), as a ratio of the label's resolved
584
+ * text height, like the labeled line measures' own `labelPadding`.
585
+ * Negative values clamp to 0.
586
+ * @default 0
587
+ */
588
+ labelPadding?: number;
589
+ }
590
+ /** Options for {@link labeledAreaFeatures}: {@link buildClosedRing}'s
591
+ * smoothing knobs plus the shared {@link AreaLabelOptions} label placement. */
592
+ interface LabeledAreaOptions extends AreaLabelOptions {
593
+ /**
594
+ * Round the area's corners by curving the boundary through the control
595
+ * points (closed centripetal Catmull-Rom spline).
596
+ * @default false
597
+ */
598
+ smooth?: boolean;
599
+ /**
600
+ * Number of samples per segment when `smooth` is enabled.
601
+ * @default 16
602
+ */
603
+ smoothResolution?: number;
604
+ }
605
+ //#endregion
606
+ //#region src/generators/cm15-maneuver-areas/battlePosition.d.ts
607
+ /**
608
+ * Configuration options for the Battle Position control measure. Also
609
+ * carries the shared {@link AreaLabelOptions} placement for its centered
610
+ * Field T (designator) label.
611
+ */
612
+ interface BattlePositionOptions extends AreaLabelOptions {
613
+ /**
614
+ * Field B echelon. One of the keys in the echelon vocabulary (e.g.
615
+ * `"battalion"`, `"division"`) or an equivalent symbol form (`"II"`, `"XX"`).
616
+ * `"none"`, empty, or unknown renders no glyph and leaves the boundary
617
+ * continuous.
618
+ * @default "battalion"
619
+ */
620
+ echelon?: string;
621
+ /**
622
+ * Echelon glyph height in meters (ground-anchored). Ignored when
623
+ * `echelonSizePixels` is supplied together with `metersPerPixel`.
624
+ * @default 750
625
+ */
626
+ echelonSize?: number;
627
+ /**
628
+ * Echelon glyph height in screen pixels (screen-anchored). Resolved to meters
629
+ * against `metersPerPixel`; bakes to a meter size on draw/edit commit
630
+ * (ADR-0020).
631
+ * @default 16
632
+ */
633
+ echelonSizePixels?: number;
634
+ /**
635
+ * Gap left on each side of the echelon glyph, as a ratio of the glyph height.
636
+ * `0` butts the boundary against the glyph; larger values widen the break.
637
+ * @default 0.3
638
+ */
639
+ echelonPadding?: number;
640
+ /**
641
+ * Slides the echelon along the boundary, as a signed fraction of the total
642
+ * perimeter measured from its default anchor on the bottom edge. `0` keeps it
643
+ * centered on the bottom; positive/negative values move it around the ring in
644
+ * either direction (wrapping at the seam).
645
+ * @default 0
646
+ */
647
+ echelonPosition?: number;
648
+ /**
649
+ * Absolute anchor for the echelon glyph, as a fraction of the total
650
+ * perimeter measured from the ring seam (the ring's first vertex), wrapped
651
+ * into `[0, 1)`. When omitted, the anchor is "auto": the bottom edge's
652
+ * midpoint (the side opposite the front), recomputed from the current
653
+ * geometry on every render — the long-standing default behavior.
654
+ * `echelonPosition` still applies on top of this anchor as a signed offset,
655
+ * exactly as it does against the auto anchor.
656
+ *
657
+ * Edit controllers freeze this from "auto" to a concrete fraction the
658
+ * moment a rotate gesture starts (see `freezeEchelonAnchor` /
659
+ * `freezeOrientationOptions`): the transform box rotates only the control
660
+ * points and re-renders, so without a pinned anchor the "bottom edge" would
661
+ * keep re-deriving against the rotated geometry and the glyph would jump to
662
+ * a different edge each time a new edge becomes lowest. Freezing the anchor
663
+ * first makes the rotation rigid — the glyph turns with the shape instead.
664
+ * See ADR-0023.
665
+ */
666
+ echelonAnchor?: number;
667
+ /**
668
+ * Meters-per-pixel at the current zoom/latitude. Stamped by the host when the
669
+ * measure is screen-anchored; required to resolve `echelonSizePixels`.
670
+ */
671
+ metersPerPixel?: number;
672
+ /**
673
+ * Round the area's corners by curving the boundary through the control points
674
+ * (closed centripetal Catmull-Rom spline), matching the rounded shape in the
675
+ * APP-6 template.
676
+ * @default false
677
+ */
678
+ smooth?: boolean;
679
+ /**
680
+ * Number of samples per segment when `smooth` is enabled. Higher values yield
681
+ * a denser, smoother curve.
682
+ * @default 16
683
+ */
684
+ smoothResolution?: number;
685
+ }
686
+ /** Default options for the Battle Position control measure. */
687
+ declare const DEFAULT_BATTLE_POSITION_OPTIONS: BattlePositionOptions;
688
+ /**
689
+ * Creates a Battle Position control measure: a closed area through `positions`
690
+ * carrying a single echelon (Field B) glyph straddling its boundary — anchored
691
+ * to the bottom edge by default, slidable via `echelonPosition`.
692
+ *
693
+ * @param positions - Area anchor points (≥3); the input contract is enforced at
694
+ * the render seam (ADR-0014).
695
+ * @param options - {@link BattlePositionOptions}.
696
+ * @param textAmplifiers - Field T only, centered in the area (no H/W rows —
697
+ * this measure's template pairs the designation with the Field B glyph,
698
+ * not the plain L-15 boundary template).
699
+ */
700
+ declare function createBattlePosition(positions: Position[], options?: BattlePositionOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<MultiLineString | MultiPolygon | Point>;
701
+ //#endregion
702
+ //#region src/generators/cm15-maneuver-areas/strongPoint.d.ts
703
+ /** Configuration options for the Strong Point control measure. */
704
+ type StrongPointOptions = BattlePositionOptions;
705
+ /** Default options for the Strong Point control measure. */
706
+ declare const DEFAULT_STRONG_POINT_OPTIONS: StrongPointOptions;
707
+ /**
708
+ * Creates a Strong Point control measure: a Battle Position boundary/echelon
709
+ * with outward tics whose length and spacing are the Field B echelon height.
710
+ * Shares the perimeter and echelon placement with Battle Position via the
711
+ * `area-echelon` primitive (single source of truth for ring and gap).
712
+ *
713
+ * @param positions - Area anchor points (>=3); the input contract is enforced
714
+ * at the render seam (ADR-0014).
715
+ * @param options - {@link StrongPointOptions}.
716
+ * @param textAmplifiers - Field T only, centered in the area, same as Battle
717
+ * Position.
718
+ */
719
+ declare function createStrongPoint(positions: Position[], options?: StrongPointOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<MultiLineString | MultiPolygon | Point>;
720
+ //#endregion
721
+ //#region src/generators/cm14-maneuver-lines/principalDirectionOfFire.d.ts
722
+ /**
723
+ * Configuration options for the Principal Direction of Fire tactical symbol.
724
+ */
725
+ interface PrincipalDirectionOfFireOptions {
726
+ /** Arrowhead length relative to each arm's own length (default: 0.07) */
727
+ arrowheadLengthRatio?: number;
728
+ /** Arrowhead wing spread relative to the arrowhead length (default: 0.67) */
729
+ arrowheadWidthRatio?: number;
730
+ }
731
+ declare const DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS: Required<PrincipalDirectionOfFireOptions>;
732
+ /**
733
+ * Generates a GeoJSON FeatureCollection for a PRINCIPAL DIRECTION OF FIRE
734
+ * tactical symbol: a "V" of arms from the vertex out to the (independent) tips,
735
+ * each ending in an open arrowhead.
736
+ *
737
+ * Renders one arm per tip, so two points (vertex + one tip) draws the single
738
+ * arm being placed — the live feedback after PT 1 — and three points draws the
739
+ * full V. Points beyond the third are ignored (input contract, ADR-0014).
740
+ *
741
+ * @param coordinates - [PT 1 (vertex), PT 2 (tip), PT 3 (tip)]
742
+ * @param options - Arrowhead sizing parameters
743
+ */
744
+ declare function createPrincipalDirectionOfFire(coordinates: Position[], options?: PrincipalDirectionOfFireOptions): FeatureCollection<MultiLineString, Record<string, never>>;
745
+ //#endregion
746
+ //#region src/generators/cm14-maneuver-lines/finalProtectiveFire.d.ts
747
+ /**
748
+ * Configuration options for the Final Protective Fire tactical symbols.
749
+ *
750
+ * Identical to Principal Direction of Fire (arrowhead sizing), plus a filled
751
+ * "blade" running along the inside of one arm.
752
+ */
753
+ interface FinalProtectiveFireOptions {
754
+ /** Arrowhead length relative to each arm's own length (default: 0.07) */
755
+ arrowheadLengthRatio?: number;
756
+ /** Arrowhead wing spread relative to the arrowhead length (default: 0.67) */
757
+ arrowheadWidthRatio?: number;
758
+ /**
759
+ * Blade height (its perpendicular reach into the inside of the V) relative
760
+ * to the bladed arm's own length (default: 0.03).
761
+ */
762
+ bladeHeightRatio?: number;
763
+ }
764
+ declare const DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS: Required<FinalProtectiveFireOptions>;
765
+ type FpfProps = {
766
+ part?: string;
767
+ fill?: true;
768
+ };
769
+ declare function createFinalProtectiveFireLeft(coordinates: Position[], options?: FinalProtectiveFireOptions): FeatureCollection<MultiLineString | Polygon, FpfProps>;
770
+ declare function createFinalProtectiveFireRight(coordinates: Position[], options?: FinalProtectiveFireOptions): FeatureCollection<MultiLineString | Polygon, FpfProps>;
771
+ //#endregion
772
+ //#region src/generators/cm15-maneuver-areas/encirclement.d.ts
773
+ /**
774
+ * Configuration options for the Encirclement control measure. Also carries
775
+ * the shared {@link AreaLabelOptions} label placement for its Field N (ENY)
776
+ * marker — the doctrinal example shows only the hostile marker, no name/H/W
777
+ * rows.
778
+ */
779
+ interface EncirclementOptions extends AreaLabelOptions {
780
+ /**
781
+ * Spacing between adjacent barbs as a ratio of the symbol's mean radius;
782
+ * smaller values pack the barbs more densely. The barbs are then distributed
783
+ * evenly so they close the ring exactly.
784
+ * @default 0.4
785
+ */
786
+ barbSpacingRatio?: number;
787
+ /**
788
+ * Barb length (height/amplitude) as a ratio of the symbol's mean radius.
789
+ * @default 0.16
790
+ */
791
+ barbLengthRatio?: number;
792
+ /**
793
+ * Round the boundary by curving it through the control points (closed
794
+ * centripetal Catmull-Rom) before tracing the barbs.
795
+ * @default true
796
+ */
797
+ smooth?: boolean;
798
+ /**
799
+ * Number of samples per segment when `smooth` is enabled.
800
+ * @default 16
801
+ */
802
+ smoothResolution?: number;
803
+ }
804
+ /**
805
+ * Default options for the Encirclement control measure. Not `Required<...>`
806
+ * — the inherited label-size options ({@link AreaLabelOptions}) have no
807
+ * static default, so this covers only the barb/smoothing options.
808
+ */
809
+ declare const DEFAULT_ENCIRCLEMENT_OPTIONS: EncirclementOptions;
810
+ /**
811
+ * Creates an Encirclement tactical graphic: a complete smooth boundary ring
812
+ * with outward arrowhead barbs resting on it. The boundary is an unfilled
813
+ * Polygon; the barbs are open "V" strokes (a MultiLineString) whose base is the
814
+ * boundary arc itself. When a Field N (ENY) marker is set, it sits ON the
815
+ * boundary and masks it with a knockout gap (mirroring Field B's echelon
816
+ * glyph, ADR-0023) — the boundary becomes a gapped MultiLineString instead of
817
+ * a closed Polygon, and any barb whose center falls inside the gap is
818
+ * suppressed; the no-`N` case is unaffected.
819
+ *
820
+ * @param positions - Area anchor points (>=3); the input contract is enforced
821
+ * at the render seam (ADR-0014).
822
+ * @param options - {@link EncirclementOptions}.
823
+ * @param textAmplifiers - Field N only — rendered as "ENY" markers at the
824
+ * ring's west and east edges, per the doctrinal hostile example.
825
+ */
826
+ declare function createEncirclement(positions: Position[], options?: EncirclementOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<Polygon | MultiLineString | Point>;
827
+ //#endregion
828
+ //#region src/generators/cm15-maneuver-areas/assemblyArea.d.ts
829
+ /** Configuration options for the Assembly area control measure. */
830
+ type AssemblyAreaOptions = LabeledAreaOptions;
831
+ /** Default options for the Assembly area control measure. */
832
+ declare const DEFAULT_ASSEMBLY_AREA_OPTIONS: AssemblyAreaOptions;
833
+ /**
834
+ * Creates an Assembly area control measure: a closed area through
835
+ * `positions` labeled at its center with "AA "-prefixed `T` (Field T) plus
836
+ * `H`/`W`/`W1`/`N` amplifier rows, per {@link labeledAreaFeatures}.
837
+ */
838
+ declare function createAssemblyArea(positions: Position[], options?: AssemblyAreaOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<Polygon | MultiLineString | Point>;
839
+ //#endregion
840
+ //#region src/generators/cm15-maneuver-areas/jointTacticalActionArea.d.ts
841
+ /** Configuration options for the Joint tactical action area control measure. */
842
+ type JointTacticalActionAreaOptions = LabeledAreaOptions;
843
+ /** Default options for the Joint tactical action area control measure. */
844
+ declare const DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS: JointTacticalActionAreaOptions;
845
+ /**
846
+ * Creates a Joint tactical action area control measure: a closed area
847
+ * through `positions` labeled at its center with "JTAA -"-prefixed `T`
848
+ * (Field T) plus `H`/`W`/`W1`/`N` amplifier rows, per
849
+ * {@link labeledAreaFeatures}.
850
+ */
851
+ declare function createJointTacticalActionArea(positions: Position[], options?: JointTacticalActionAreaOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<Polygon | MultiLineString | Point>;
852
+ //#endregion
853
+ //#region src/generators/cm15-maneuver-areas/landingZone.d.ts
854
+ /** Configuration options for the Landing zone control measure. */
855
+ type LandingZoneOptions = LabeledAreaOptions;
856
+ /** Default options for the Landing zone control measure. */
857
+ declare const DEFAULT_LANDING_ZONE_OPTIONS: LandingZoneOptions;
858
+ /**
859
+ * Creates a Landing zone control measure: a closed area through `positions`
860
+ * labeled at its center with "LZ "-prefixed `T` (Field T) plus `H`/`W`/`W1`/`N`
861
+ * amplifier rows, per {@link labeledAreaFeatures}.
862
+ */
863
+ declare function createLandingZone(positions: Position[], options?: LandingZoneOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<Polygon | MultiLineString | Point>;
864
+ //#endregion
865
+ //#region src/generators/cm15-maneuver-areas/pickupZone.d.ts
866
+ /** Configuration options for the Pickup zone control measure. */
867
+ type PickupZoneOptions = LabeledAreaOptions;
868
+ /** Default options for the Pickup zone control measure. */
869
+ declare const DEFAULT_PICKUP_ZONE_OPTIONS: PickupZoneOptions;
870
+ /**
871
+ * Creates a Pickup zone control measure: a closed area through `positions`
872
+ * labeled at its center with "PZ "-prefixed `T` (Field T) plus `H`/`W`/`W1`/`N`
873
+ * amplifier rows, per {@link labeledAreaFeatures}.
874
+ */
875
+ declare function createPickupZone(positions: Position[], options?: PickupZoneOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<Polygon | MultiLineString | Point>;
876
+ //#endregion
877
+ //#region src/generators/cm12-command-control-areas/area-of-operations.d.ts
878
+ /** Configuration options for the Area of operations control measure. */
879
+ type AreaOfOperationsOptions = LabeledAreaOptions;
880
+ /** Default options for the Area of operations control measure. */
881
+ declare const DEFAULT_AREA_OF_OPERATIONS_OPTIONS: AreaOfOperationsOptions;
882
+ /**
883
+ * Creates an Area of operations control measure: a closed area through
884
+ * `positions` labeled at its center with "AO "-prefixed `T` (Field T) plus
885
+ * `H`/`W`/`W1`/`N` amplifier rows, per {@link labeledAreaFeatures}.
886
+ */
887
+ declare function createAreaOfOperations(positions: Position[], options?: AreaOfOperationsOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<Polygon | MultiLineString | Point>;
888
+ //#endregion
889
+ //#region src/attack-utils.d.ts
890
+ interface AttackOptions {
891
+ shaftWidthRatio?: number;
892
+ smooth?: boolean;
893
+ smoothResolution?: number;
894
+ }
895
+ /**
896
+ * Calculates the relative metrics (longitudinal and lateral) of the width point
897
+ * relative to the Tip-Neck axis.
898
+ *
899
+ * @param pts - Array of positions [Tip, Neck, ..., WidthPoint]
900
+ * @returns { longitudinal: number, lateral: number } | null
901
+ */
902
+ declare function calculateMetrics(pts: Position[]): {
903
+ longitudinal: number;
904
+ lateral: number;
905
+ } | null;
906
+ /**
907
+ * Computes an initial Width Point based on the Tip and Neck positions.
908
+ * It places the point perpendicular to the neck at a default distance relative to the length.
909
+ *
910
+ * @param tip - Tip position (Lon/Lat)
911
+ * @param neck - Neck position (Lon/Lat)
912
+ * @returns Width Point position (Lon/Lat)
913
+ */
914
+ declare function computeInitialWidthPoint(tip: Position, neck: Position): Position;
915
+ //#endregion
916
+ //#region src/generators/cm15-maneuver-areas/mainAttack.d.ts
917
+ declare const DEFAULT_MAIN_ATTACK_OPTIONS: Required<AttackOptions>;
918
+ type MainAttackOptions = AttackOptions;
919
+ /**
920
+ * Generates a GeoJSON FeatureCollection for a Main Attack tactical symbol.
921
+ *
922
+ * The symbol consists of a single MultiLineString feature containing:
923
+ * 1. **Arrowhead**: A line forming a "chevron" or "roof" shape.
924
+ * 2. **Shaft**: Two parallel lines behind the arrow.
925
+ *
926
+ * The shaft is calculated to terminate exactly where it touches the inner walls
927
+ * of the arrowhead, creating a seamless connection.
928
+ *
929
+ * @param coordinates - An array of GeoJSON Positions (Lon/Lat).
930
+ * Minimum 3 points required.
931
+ * **Order matters:** * - Index 0: **Tip** (The sharp point of the arrow)
932
+ * - Index 1 to N-2: **Spine** (The path the shaft follows)
933
+ * - Index N-1: **Width Control** (Determines the width of the arrowhead)
934
+ * @param options - Configuration for ratios and properties.
935
+ * @returns A GeoJSON FeatureCollection containing a single MultiLineString.
936
+ */
937
+ declare function createMainAttack(coordinates: Position[], options?: MainAttackOptions): FeatureCollection<MultiLineString>;
938
+ //#endregion
939
+ //#region src/generators/cm15-maneuver-areas/supportingAttack.d.ts
940
+ type SupportingAttackOptions = AttackOptions;
941
+ declare const DEFAULT_SUPPORTING_ATTACK_OPTIONS: Required<SupportingAttackOptions>;
942
+ /**
943
+ * Generates a GeoJSON FeatureCollection for a Supporting Attack tactical symbol.
944
+ *
945
+ * The symbol differs from Main Attack in that it is a single LineString
946
+ * outlining the arrow shape, rather than a filled Polygon header + Shaft lines.
947
+ *
948
+ * @param coordinates - An array of GeoJSON Positions.
949
+ * @param options - Configuration options.
950
+ * @returns A GeoJSON FeatureCollection<LineString>.
951
+ */
952
+ declare function createSupportingAttack(coordinates: Position[], options?: SupportingAttackOptions): FeatureCollection<LineString>;
953
+ //#endregion
954
+ //#region src/generators/cm99-generic-arrows/classicArrow.d.ts
955
+ /**
956
+ * A plain, clean arrow for illustrations — not a doctrinal symbol. The shaft is
957
+ * a straight polyline through the drawn control points (Line1 contract) and the
958
+ * tip carries a solid triangular arrowhead. No wobble, no curve: the canonical
959
+ * "draw an arrow" graphic.
960
+ */
961
+ /**
962
+ * Arrowhead silhouette:
963
+ * - `triangle` — solid triangle with a flat back (the default).
964
+ * - `barbed` — swept-back barbs with a forward notch (classic arrowhead).
965
+ * - `concave` — a sharper barbed head with a deep forward notch.
966
+ * - `diamond` — a rhombus, widest at its middle.
967
+ * - `harpoon` — an asymmetric single-sided barb.
968
+ * - `swallowtail` — barbs that sweep back into two trailing tails.
969
+ * - `chevron` — a thick hollow "V".
970
+ * - `circle` — a round dot terminator.
971
+ * - `tee` — a flat crossbar terminator (no point).
972
+ * - `open` — an unfilled "V", drawn as two strokes meeting at the tip.
973
+ */
974
+ type ClassicArrowHeadStyle = "triangle" | "barbed" | "concave" | "diamond" | "harpoon" | "swallowtail" | "chevron" | "circle" | "tee" | "open";
975
+ interface ClassicArrowOptions {
976
+ /** Arrowhead silhouette. */
977
+ arrowheadStyle?: ClassicArrowHeadStyle;
978
+ /** Round the shaft's corners by curving it through the control points. */
979
+ smooth?: boolean;
980
+ /** Number of samples per segment when smooth mode is enabled. */
981
+ smoothResolution?: number;
982
+ /** Arrowhead length as a fraction of the total path length. */
983
+ arrowheadLengthRatio?: number;
984
+ /** Arrowhead base width as a fraction of the total path length. */
985
+ arrowheadWidthRatio?: number;
986
+ }
987
+ declare const DEFAULT_CLASSIC_ARROW_OPTIONS: Required<ClassicArrowOptions>;
988
+ /**
989
+ * Generates a GeoJSON FeatureCollection for the Classic Arrow: a shaft
990
+ * LineString (trimmed so it doesn't poke through the head) plus a head feature
991
+ * whose silhouette follows `arrowheadStyle` — a filled Polygon for the solid heads,
992
+ * or an open "V" LineString for `open`.
993
+ */
994
+ declare function createClassicArrow(coordinates: Position[], options?: ClassicArrowOptions): FeatureCollection<LineString | Polygon, {
995
+ part: "shaft" | "head";
996
+ fill?: boolean;
997
+ }>;
998
+ //#endregion
999
+ //#region src/generators/cm99-generic-arrows/blockArrow.d.ts
1000
+ /**
1001
+ * A solid "block" arrow for illustrations — not a doctrinal symbol. The whole
1002
+ * arrow is one filled polygon: a shaft band of controllable width that runs
1003
+ * through the drawn Axis1 spine and flares into a wider triangular head at the
1004
+ * tip. Axis1 control points are ordered `[tip, neck, ...spine, width]`.
1005
+ */
1006
+ /**
1007
+ * Arrowhead silhouette (all carved from the one filled body):
1008
+ * - `triangle` — a flat-backed triangular head (the default).
1009
+ * - `barbed` — swept-back barbs with the shaft entering at a forward notch.
1010
+ * - `concave` — a sharper barbed head with a deeper notch.
1011
+ * - `diamond` — a kite that flares to its widest mid-head.
1012
+ * - `harpoon` — an asymmetric single-sided barb.
1013
+ * - `swallowtail` — barbs that sweep back into two trailing tails.
1014
+ * - `tee` — a flat crossbar terminator (no point).
1015
+ */
1016
+ type BlockArrowHeadStyle = "triangle" | "barbed" | "concave" | "diamond" | "harpoon" | "swallowtail" | "tee";
1017
+ interface BlockArrowOptions {
1018
+ /** Shaft band width as a fraction of the total path length. */
1019
+ shaftWidthRatio?: number;
1020
+ /** Arrowhead silhouette. */
1021
+ arrowheadStyle?: BlockArrowHeadStyle;
1022
+ /** Arrowhead base width as a fraction of the total path length. */
1023
+ arrowheadWidthRatio?: number;
1024
+ /** Arrowhead length as a fraction of the total path length. */
1025
+ arrowheadLengthRatio?: number;
1026
+ /** Round the shaft's corners by curving it through the control points. */
1027
+ smooth?: boolean;
1028
+ /** Number of samples per segment when smooth mode is enabled. */
1029
+ smoothResolution?: number;
1030
+ /** Fill the body solid; when false the arrow is drawn as an outline only. */
1031
+ filled?: boolean;
1032
+ }
1033
+ declare const DEFAULT_BLOCK_ARROW_OPTIONS: Required<BlockArrowOptions>;
1034
+ /**
1035
+ * Generates a GeoJSON FeatureCollection for the Block Arrow: a single filled
1036
+ * Polygon whose outline runs up the left side of the shaft, around the head
1037
+ * (whose silhouette follows `arrowheadStyle`) to the tip and back, then down the
1038
+ * right side of the shaft.
1039
+ */
1040
+ declare function createBlockArrow(coordinates: Position[], options?: BlockArrowOptions): FeatureCollection<Polygon, {
1041
+ part: "body";
1042
+ fill: boolean;
1043
+ }>;
1044
+ //#endregion
1045
+ //#region src/generators/cm99-generic-graphics/params.d.ts
1046
+ interface SmoothPathOptions {
1047
+ /** Curve the rendered path through the unchanged control points. */
1048
+ smooth?: boolean;
1049
+ /** Number of samples per segment when smoothing is enabled. */
1050
+ smoothResolution?: number;
1051
+ }
1052
+ interface FilledAreaOptions {
1053
+ /** Fill the polygon interior; false renders only its outline. */
1054
+ filled?: boolean;
1055
+ }
1056
+ //#endregion
1057
+ //#region src/generators/cm99-generic-graphics/line.d.ts
1058
+ type GenericLineOptions = SmoothPathOptions;
1059
+ declare const DEFAULT_GENERIC_LINE_OPTIONS: Required<GenericLineOptions>;
1060
+ declare function createGenericLine(coordinates: Position[], options?: GenericLineOptions): FeatureCollection<LineString>;
1061
+ //#endregion
1062
+ //#region src/generators/cm99-generic-graphics/polygon.d.ts
1063
+ interface GenericPolygonOptions extends SmoothPathOptions, FilledAreaOptions {}
1064
+ declare const DEFAULT_GENERIC_POLYGON_OPTIONS: Required<GenericPolygonOptions>;
1065
+ declare function createGenericPolygon(coordinates: Position[], options?: GenericPolygonOptions): FeatureCollection<Polygon, {
1066
+ part: string;
1067
+ fill: boolean;
1068
+ }>;
1069
+ //#endregion
1070
+ //#region src/generators/cm99-generic-graphics/rectangle.d.ts
1071
+ type GenericRectangleOptions = FilledAreaOptions;
1072
+ declare const DEFAULT_GENERIC_RECTANGLE_OPTIONS: Required<GenericRectangleOptions>;
1073
+ declare function createGenericRectangle(coordinates: Position[], options?: GenericRectangleOptions): FeatureCollection<Polygon, {
1074
+ part: string;
1075
+ fill: boolean;
1076
+ }>;
1077
+ //#endregion
1078
+ //#region src/generators/cm99-generic-graphics/circle.d.ts
1079
+ type GenericCircleOptions = FilledAreaOptions;
1080
+ declare const DEFAULT_GENERIC_CIRCLE_OPTIONS: Required<GenericCircleOptions>;
1081
+ declare function createGenericCircle(coordinates: Position[], options?: GenericCircleOptions): FeatureCollection<Polygon, {
1082
+ part: string;
1083
+ fill: boolean;
1084
+ }>;
1085
+ //#endregion
1086
+ //#region src/generators/cm15-maneuver-areas/airborneAttack.d.ts
1087
+ type AirborneAttackOptions = AttackOptions;
1088
+ declare const DEFAULT_AIRBORNE_ATTACK_OPTIONS: Required<AirborneAttackOptions>;
1089
+ /**
1090
+ * Generates a GeoJSON FeatureCollection for an Airborne Attack tactical symbol.
1091
+ *
1092
+ * The symbol is similar to Supporting Attack but features a crossover point
1093
+ * between the shaft and the head (Points 1 and 2/Neck).
1094
+ *
1095
+ * @param coordinates - An array of GeoJSON Positions.
1096
+ * @param options - Configuration options.
1097
+ * @returns A GeoJSON FeatureCollection<LineString>.
1098
+ */
1099
+ declare function createAirborneAttack(coordinates: Position[], options?: AirborneAttackOptions): FeatureCollection<LineString>;
1100
+ //#endregion
1101
+ //#region src/generators/cm15-maneuver-areas/attackHelicopter.d.ts
1102
+ interface AttackHelicopterOptions extends AttackOptions {
1103
+ symbolHeightRatio?: number;
1104
+ triangleSizeRatio?: number;
1105
+ bottomBarWidthRatio?: number;
1106
+ bowtieWidthRatio?: number;
1107
+ }
1108
+ declare const DEFAULT_ATTACK_HELICOPTER_OPTIONS: Required<AttackHelicopterOptions>;
1109
+ /**
1110
+ * Generates a GeoJSON FeatureCollection for an Attack Helicopter tactical symbol.
1111
+ *
1112
+ * The symbol is based on the Airborne Attack (bow tie) geometry but features
1113
+ * an additional symbol (vertical line + triangle) at the crossover point.
1114
+ *
1115
+ * @param coordinates - An array of GeoJSON Positions.
1116
+ * @param options - Configuration options.
1117
+ * @returns A GeoJSON FeatureCollection containing the main graphic and the symbol.
1118
+ */
1119
+ declare function createAttackHelicopter(coordinates: Position[], options?: AttackHelicopterOptions): FeatureCollection<LineString | Polygon>;
1120
+ //#endregion
1121
+ //#region src/generators/cm15-maneuver-areas/supportByFire.d.ts
1122
+ interface SupportByFireOptions {
1123
+ arrowheadWidthRatio?: number;
1124
+ rearLineLengthRatio?: number;
1125
+ rearLineAngle?: number;
1126
+ }
1127
+ declare const DEFAULT_SUPPORT_BY_FIRE_OPTIONS: Required<SupportByFireOptions>;
1128
+ /**
1129
+ * Generates a GeoJSON FeatureCollection for a Support By Fire tactical graphic.
1130
+ *
1131
+ * Input:
1132
+ * - PT1: Left Base
1133
+ * - PT2: Right Base
1134
+ * - PT3: Left Tip
1135
+ * - PT4: Right Tip
1136
+ */
1137
+ declare function createSupportByFire(coordinates: Position[], options?: SupportByFireOptions): FeatureCollection<LineString>;
1138
+ //#endregion
1139
+ //#region src/generators/cm15-maneuver-areas/attackByFire.d.ts
1140
+ interface AttackByFireOptions {
1141
+ arrowheadWidthRatio?: number;
1142
+ rearLineLengthRatio?: number;
1143
+ rearLineAngle?: number;
1144
+ }
1145
+ declare const DEFAULT_ATTACK_BY_FIRE_OPTIONS: Required<AttackByFireOptions>;
1146
+ /**
1147
+ * Generates a GeoJSON FeatureCollection for an Attack By Fire tactical graphic.
1148
+ *
1149
+ * Input:
1150
+ * - PT1: Arrow Tip (Target)
1151
+ * - PT2: Left Base
1152
+ * - PT3: Right Base
1153
+ *
1154
+ * Logic:
1155
+ * - Shaft: Midpoint(PT2, PT3) -> PT1
1156
+ * - Base Line: PT2 -> PT3
1157
+ * - Wings: Splayed out from PT2 and PT3
1158
+ */
1159
+ declare function createAttackByFire(coordinates: Position[], options?: AttackByFireOptions): FeatureCollection<LineString>;
1160
+ //#endregion
1161
+ //#region src/generators/cm14-maneuver-lines/flot.d.ts
1162
+ /**
1163
+ * Configuration options for the FLOT (Forward Line of Own Troops) geometry.
1164
+ */
1165
+ interface FLOTOptions {
1166
+ /**
1167
+ * The radius of the semicircular arcs in meters.
1168
+ * Semicircles are placed tangent to each other (diameter = 2 * radius).
1169
+ * This is ignored if radiusPixels is provided along with metersPerPixel.
1170
+ * @default 50
1171
+ */
1172
+ radius?: number;
1173
+ /**
1174
+ * The radius of the semi-circular arcs in pixels.
1175
+ * When provided along with metersPerPixel, the actual meter radius is calculated
1176
+ * dynamically to maintain consistent visual size on screen.
1177
+ * Takes precedence over radius when metersPerPixel is also provided.
1178
+ * @default 10
1179
+ */
1180
+ radiusPixels?: number;
1181
+ /**
1182
+ * The meters-per-pixel ratio at the current zoom level and latitude.
1183
+ * Required when using radiusPixels for zoom-aware sizing.
1184
+ * Can be obtained from the map view's resolution or calculated using getMetersPerPixel().
1185
+ */
1186
+ metersPerPixel?: number;
1187
+ /**
1188
+ * The number of points used to render each individual semi-circle.
1189
+ * Higher values create smoother arcs.
1190
+ * @default 16
1191
+ */
1192
+ arcSegments?: number;
1193
+ }
1194
+ /**
1195
+ * Default options for the FLOT graphic.
1196
+ */
1197
+ declare const DEFAULT_FLOT_OPTIONS: Required<Omit<FLOTOptions, "metersPerPixel">>;
1198
+ /**
1199
+ * Creates a FLOT (Forward Line of Own Troops) tactical graphic.
1200
+ *
1201
+ * Generates a scalloped/arc line representing the forward edge of friendly forces.
1202
+ * The line consists of semi-circular arcs that bulge perpendicular to the base path,
1203
+ * creating a distinctive visual pattern used in military tactical graphics.
1204
+ *
1205
+ * @param positions - Array of GeoJSON positions defining the base path
1206
+ * @param options - Configuration options for the graphic
1207
+ * @returns A GeoJSON FeatureCollection containing the scalloped LineString
1208
+ *
1209
+ * @example
1210
+ * ```typescript
1211
+ * const flot = createFLOT(
1212
+ * [[-122.4194, 37.7749], [-122.4100, 37.7800], [-122.4000, 37.7750]],
1213
+ * { radius: 100, arcSegments: 20 }
1214
+ * );
1215
+ * ```
1216
+ */
1217
+ declare function createFLOT(positions: Position[], options?: FLOTOptions): FeatureCollection<LineString>;
1218
+ //#endregion
1219
+ //#region src/generators/cm14-maneuver-lines/phase-line.d.ts
1220
+ /** Configuration options for the Phase line control measure. */
1221
+ interface PhaseLineOptions extends LineLabelOptions {
1222
+ /**
1223
+ * Prefix the end labels with "PL" (`"PL ECHO"`, or a bare `"PL"` when no
1224
+ * designation is set). When `false`, the label is the bare designation
1225
+ * (`Field T`) alone, and the line carries no label at all when `T` is empty.
1226
+ * @default true
1227
+ */
1228
+ includePrefix?: boolean;
1229
+ }
1230
+ /** Default options for the Phase line control measure. */
1231
+ declare const DEFAULT_PHASE_LINE_OPTIONS: PhaseLineOptions;
1232
+ /**
1233
+ * Creates a Phase line control measure: a polyline through `positions`
1234
+ * labeled at each end with `T` (optionally "PL"-prefixed).
1235
+ */
1236
+ declare function createPhaseLine(positions: Position[], options?: PhaseLineOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<LineString | Point>;
1237
+ //#endregion
1238
+ //#region src/generators/cm14-maneuver-lines/handover-line.d.ts
1239
+ /** Configuration options for the Handover line control measure. */
1240
+ interface HandoverLineOptions extends LineLabelOptions {
1241
+ /**
1242
+ * Optional phase line naming: renders `PL <name>` just beyond each end of
1243
+ * the line, additive to the fixed "HOL" labels. Empty or whitespace-only
1244
+ * renders no label.
1245
+ * @default none
1246
+ */
1247
+ phaseLineName?: string;
1248
+ /**
1249
+ * Prefix the `phaseLineName` label with "PL" (`"PL DAVID"`, or a bare
1250
+ * "DAVID" when `false`). No effect when `phaseLineName` is empty — unlike
1251
+ * Phase Line itself, this measure already carries its own fixed "HOL"
1252
+ * label, so there is no bare "PL" fallback.
1253
+ * @default true
1254
+ */
1255
+ includePrefix?: boolean;
1256
+ }
1257
+ /** Default options for the Handover line control measure. */
1258
+ declare const DEFAULT_HANDOVER_LINE_OPTIONS: HandoverLineOptions;
1259
+ /**
1260
+ * Creates a Handover line control measure: a polyline through `positions`
1261
+ * labeled "HOL" above the line near each end.
1262
+ */
1263
+ declare function createHandoverLine(positions: Position[], options?: HandoverLineOptions): FeatureCollection<LineString | Point>;
1264
+ //#endregion
1265
+ //#region src/generators/cm14-maneuver-lines/battle-handover-line.d.ts
1266
+ /** Configuration options for the Battle handover line control measure. */
1267
+ interface BattleHandoverLineOptions extends LineLabelOptions {
1268
+ /**
1269
+ * Optional phase line naming: renders `PL <name>` just beyond each end of
1270
+ * the line, additive to the fixed "BHL" labels. Empty or whitespace-only
1271
+ * renders no label.
1272
+ * @default none
1273
+ */
1274
+ phaseLineName?: string;
1275
+ /**
1276
+ * Prefix the `phaseLineName` label with "PL" (`"PL DAVID"`, or a bare
1277
+ * "DAVID" when `false`). No effect when `phaseLineName` is empty — unlike
1278
+ * Phase Line itself, this measure already carries its own fixed "BHL"
1279
+ * label, so there is no bare "PL" fallback.
1280
+ * @default true
1281
+ */
1282
+ includePrefix?: boolean;
1283
+ }
1284
+ /** Default options for the Battle handover line control measure. */
1285
+ declare const DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS: BattleHandoverLineOptions;
1286
+ /**
1287
+ * Creates a Battle handover line control measure: a polyline through
1288
+ * `positions` labeled "BHL" above the line near each end.
1289
+ */
1290
+ declare function createBattleHandoverLine(positions: Position[], options?: BattleHandoverLineOptions): FeatureCollection<LineString | Point>;
1291
+ //#endregion
1292
+ //#region src/generators/cm34-mission-tasks/block.d.ts
1293
+ interface BlockMissionTaskOptions {
1294
+ /** Gap for the 'B' label as a ratio of the front length (default: 0.2) */
1295
+ labelGapRatio?: number;
1296
+ /** Label height in CSS pixels at the draw/reference zoom. */
1297
+ labelSizePixels?: number;
1298
+ /** Map zoom at which labelSizePixels was captured. */
1299
+ labelSizeZoom?: number;
1300
+ /** Map resolution at which labelSizePixels was captured. */
1301
+ labelSizeResolution?: number;
1302
+ }
1303
+ declare const DEFAULT_BLOCK_MISSION_TASK_OPTIONS: Required<Omit<BlockMissionTaskOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
1304
+ /**
1305
+ * Generates a GeoJSON FeatureCollection for a BLOCK mission task symbol (340100).
1306
+ *
1307
+ * Uses the same T-shape geometry as the protection-area Block symbol, with a
1308
+ * "B" label centered on the shaft.
1309
+ *
1310
+ * @param coordinates - [PT. 1, PT. 2, optional PT. 3] as Position arrays
1311
+ * @param options - Configuration options
1312
+ * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
1313
+ */
1314
+ declare function createBlockMissionTaskSymbol(coordinates: Position[], options?: BlockMissionTaskOptions): FeatureCollection<MultiLineString | Point>;
1315
+ //#endregion
1316
+ //#region src/generators/cm34-mission-tasks/breach.d.ts
1317
+ /**
1318
+ * Configuration options for the BREACH tactical symbol.
1319
+ */
1320
+ interface BreachOptions {
1321
+ /** Tick mark length ratio relative to front opening (default: 0.15) */
1322
+ tickLengthRatio?: number;
1323
+ /** Tick mark angle in degrees from perpendicular (default: 45) */
1324
+ tickAngle?: number;
1325
+ /** Gap for the 'B' label as a ratio of the front length (default: 0.2) */
1326
+ labelGapRatio?: number;
1327
+ /** Label height in CSS pixels at the draw/reference zoom. */
1328
+ labelSizePixels?: number;
1329
+ /** Map zoom at which labelSizePixels was captured. */
1330
+ labelSizeZoom?: number;
1331
+ /** Map resolution at which labelSizePixels was captured. */
1332
+ labelSizeResolution?: number;
1333
+ }
1334
+ /**
1335
+ * Default options for the BREACH symbol.
1336
+ */
1337
+ declare const DEFAULT_BREACH_OPTIONS: Required<Omit<BreachOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
1338
+ /**
1339
+ * Generates a GeoJSON FeatureCollection for a BREACH mission task symbol (340200).
1340
+ *
1341
+ * A three-sided bracket (see {@link createBracketSymbol}) whose front opening
1342
+ * endpoints terminate in tick marks pointing **outward** (away from the rear
1343
+ * "B" line).
1344
+ *
1345
+ * @param coordinates - [PT. 1, PT. 2, PT. 3] as Position arrays
1346
+ * @param options - Configuration options
1347
+ * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
1348
+ */
1349
+ declare function createBreachSymbol(coordinates: Position[], options?: BreachOptions): FeatureCollection<MultiLineString | Point>;
1350
+ //#endregion
1351
+ //#region src/generators/cm34-mission-tasks/bypass.d.ts
1352
+ /**
1353
+ * Configuration options for the BYPASS tactical symbol.
1354
+ */
1355
+ interface BypassOptions {
1356
+ /** Arrowhead length ratio relative to front opening (default: 0.2) */
1357
+ arrowheadLengthRatio?: number;
1358
+ /** Gap for the 'B' label as a ratio of the front length (default: 0.2) */
1359
+ labelGapRatio?: number;
1360
+ /** Label height in CSS pixels at the draw/reference zoom. */
1361
+ labelSizePixels?: number;
1362
+ /** Map zoom at which labelSizePixels was captured. */
1363
+ labelSizeZoom?: number;
1364
+ /** Map resolution at which labelSizePixels was captured. */
1365
+ labelSizeResolution?: number;
1366
+ }
1367
+ /**
1368
+ * Default options for the BYPASS symbol.
1369
+ */
1370
+ declare const DEFAULT_BYPASS_OPTIONS: Required<Omit<BypassOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
1371
+ /**
1372
+ * Generates a GeoJSON FeatureCollection for a BYPASS mission task symbol (340300).
1373
+ *
1374
+ * A three-sided bracket (see {@link createBracketSymbol}) with a "B" label on
1375
+ * the rear line, whose front opening endpoints terminate in outward-flaring
1376
+ * chevron arrowheads instead of tick marks.
1377
+ *
1378
+ * @param coordinates - [PT. 1, PT. 2, PT. 3] as Position arrays
1379
+ * @param options - Configuration options
1380
+ * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
1381
+ */
1382
+ declare function createBypassSymbol(coordinates: Position[], options?: BypassOptions): FeatureCollection<MultiLineString | Point>;
1383
+ //#endregion
1384
+ //#region src/generators/cm34-mission-tasks/canalize.d.ts
1385
+ /**
1386
+ * Configuration options for the CANALIZE tactical symbol.
1387
+ */
1388
+ interface CanalizeOptions {
1389
+ /** Tick mark length ratio relative to front opening (default: 0.15) */
1390
+ tickLengthRatio?: number;
1391
+ /** Tick mark angle in degrees from perpendicular (default: 45) */
1392
+ tickAngle?: number;
1393
+ /** Gap for the 'C' label as a ratio of the front length (default: 0.2) */
1394
+ labelGapRatio?: number;
1395
+ /** Label height in CSS pixels at the draw/reference zoom. */
1396
+ labelSizePixels?: number;
1397
+ /** Map zoom at which labelSizePixels was captured. */
1398
+ labelSizeZoom?: number;
1399
+ /** Map resolution at which labelSizePixels was captured. */
1400
+ labelSizeResolution?: number;
1401
+ }
1402
+ /**
1403
+ * Default options for the CANALIZE symbol.
1404
+ */
1405
+ declare const DEFAULT_CANALIZE_OPTIONS: Required<Omit<CanalizeOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
1406
+ /**
1407
+ * Generates a GeoJSON FeatureCollection for a CANALIZE mission task symbol (340400).
1408
+ *
1409
+ * A three-sided bracket (see {@link createBracketSymbol}) whose front opening
1410
+ * endpoints terminate in tick marks pointing **inward** (toward the rear "C"
1411
+ * line), opposite BREACH's outward-facing ticks.
1412
+ *
1413
+ * @param coordinates - [PT. 1, PT. 2, PT. 3] as Position arrays
1414
+ * @param options - Configuration options
1415
+ * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
1416
+ */
1417
+ declare function createCanalizeSymbol(coordinates: Position[], options?: CanalizeOptions): FeatureCollection<MultiLineString | Point>;
1418
+ //#endregion
1419
+ //#region src/generators/cm34-mission-tasks/clear.d.ts
1420
+ /**
1421
+ * Configuration options for the CLEAR tactical mission task symbol.
1422
+ */
1423
+ interface ClearOptions {
1424
+ /**
1425
+ * Padding between the vertical line's endpoints and the outer arrows, as a
1426
+ * ratio of the symbol height. Insets the top and bottom arrows so they sit
1427
+ * clear of PT. 1 / PT. 2 (default: 0.15).
1428
+ */
1429
+ arrowInsetRatio?: number;
1430
+ /** Arrowhead depth (toward the rear) as a ratio of the symbol height (default: 0.15). */
1431
+ arrowheadLengthRatio?: number;
1432
+ /** Arrowhead width (along the vertical line) as a ratio of the symbol height (default: 0.2). */
1433
+ arrowheadWidthRatio?: number;
1434
+ /** Gap for the 'C' label as a ratio of the shaft length (default: 0.2). */
1435
+ labelGapRatio?: number;
1436
+ /** Label height in CSS pixels at the draw/reference zoom. */
1437
+ labelSizePixels?: number;
1438
+ /** Map zoom at which labelSizePixels was captured. */
1439
+ labelSizeZoom?: number;
1440
+ /** Map resolution at which labelSizePixels was captured. */
1441
+ labelSizeResolution?: number;
1442
+ }
1443
+ /**
1444
+ * Default options for the CLEAR symbol.
1445
+ */
1446
+ declare const DEFAULT_CLEAR_OPTIONS: Required<Omit<ClearOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
1447
+ /**
1448
+ * Generates a GeoJSON FeatureCollection for a CLEAR mission task symbol (340500).
1449
+ *
1450
+ * A vertical line (PT. 1 → PT. 2) with three arrows pointing at it,
1451
+ * perpendicular to the line. The arrows come from the rear — the side PT. 3
1452
+ * sits on — and their tips touch the vertical line; each carries a shaft
1453
+ * reaching back to the rear. The arrows are evenly spaced along the line, so
1454
+ * the middle arrow's tip sits at the midpoint of the vertical line and its
1455
+ * shaft carries the 'C' glyph. The arrows stay perpendicular to the vertical
1456
+ * line at any rotation.
1457
+ *
1458
+ * Input Points:
1459
+ * - PT. 1: Top endpoint of the vertical line
1460
+ * - PT. 2: Bottom endpoint of the vertical line — defines height with PT. 1
1461
+ * - PT. 3: Rear point — defines the shaft length (and which side the arrows
1462
+ * come from)
1463
+ *
1464
+ * @param coordinates - [PT. 1, PT. 2, PT. 3] as Position arrays
1465
+ * @param options - Configuration options
1466
+ * @returns GeoJSON FeatureCollection containing MultiLineString and Point features
1467
+ */
1468
+ declare function createClearSymbol(coordinates: Position[], options?: ClearOptions): FeatureCollection<MultiLineString | Point>;
1469
+ //#endregion
1470
+ //#region src/generators/cm34-mission-tasks/delay.d.ts
1471
+ interface DelayOptions {
1472
+ /** Arrowhead depth as a ratio of the straight-line length (default: 0.12). */
1473
+ arrowheadLengthRatio?: number;
1474
+ /** Arrowhead width as a ratio of the straight-line length (default: 0.12). */
1475
+ arrowheadWidthRatio?: number;
1476
+ /** Gap for the 'D' label as a ratio of the straight-line length (default: 0.18). */
1477
+ labelGapRatio?: number;
1478
+ /** Number of segments used to approximate the 180-degree arc (default: 32). */
1479
+ arcSegments?: number;
1480
+ /** Label height in CSS pixels at the draw/reference zoom. */
1481
+ labelSizePixels?: number;
1482
+ /** Map zoom at which labelSizePixels was captured. */
1483
+ labelSizeZoom?: number;
1484
+ /** Map resolution at which labelSizePixels was captured. */
1485
+ labelSizeResolution?: number;
1486
+ }
1487
+ declare const DEFAULT_DELAY_OPTIONS: Required<Omit<DelayOptions, "labelSizePixels" | "labelSizeZoom" | "labelSizeResolution">>;
1488
+ declare function createDelaySymbol(coordinates: Position[], options?: DelayOptions): FeatureCollection<MultiLineString | Point>;
1489
+ //#endregion
1490
+ //#region src/generators/cm34-mission-tasks/isolate.d.ts
1491
+ /**
1492
+ * Configuration options for the ISOLATE tactical mission task symbol.
1493
+ */
1494
+ interface IsolateOptions {
1495
+ /** Angular size of the opening on the friendly side, in degrees (default: 30). */
1496
+ openingAngle?: number;
1497
+ /** Number of inward-pointing arrowhead barbs spaced around the closed arc (default: 9). */
1498
+ barbCount?: number;
1499
+ /** Barb length as a ratio of the symbol radius (default: 0.18). */
1500
+ barbLengthRatio?: number;
1501
+ }
1502
+ /**
1503
+ * Generates a GeoJSON FeatureCollection for an ISOLATE mission task symbol (341500).
1504
+ *
1505
+ * A near-complete circle centered on PT. 1 whose radius reaches PT. 2. The arc
1506
+ * starts (bare) at PT. 2's bearing and sweeps clockwise around the closed
1507
+ * portion to a single arrow tip at the far end; the wedge-shaped gap (default
1508
+ * 30°) between that arrow tip and PT. 2 is the opening — the "friendly side".
1509
+ * Inward-pointing arrowhead barbs are spaced along the closed arc, set in from
1510
+ * both ends so they never touch PT. 2 or the arrow tip, conveying the
1511
+ * sealing-off of the enclosed force. Unlike the bracket mission tasks, isolate
1512
+ * carries no glyph label.
1513
+ *
1514
+ * Input Points:
1515
+ * - PT. 1: Center point
1516
+ * - PT. 2: Start point — fixes the radius and the bearing of the opening
1517
+ *
1518
+ * @param coordinates - [PT. 1, PT. 2] as Position arrays
1519
+ * @param options - Configuration options
1520
+ * @returns GeoJSON FeatureCollection containing a single MultiLineString feature
1521
+ */
1522
+ declare function createIsolateSymbol(coordinates: Position[], options?: IsolateOptions): FeatureCollection<MultiLineString>;
1523
+ //#endregion
1524
+ //#region src/generators/cm29-protection-lines/antitankDitch.d.ts
1525
+ interface AntitankDitchOptions {
1526
+ /**
1527
+ * The tooth depth in meters. Target tooth spacing is roughly 1.15x this depth.
1528
+ * Ignored when toothHeightPixels is provided with metersPerPixel.
1529
+ * @default 50
1530
+ */
1531
+ toothHeight?: number;
1532
+ /**
1533
+ * The tooth depth in pixels. When provided with metersPerPixel, the meter
1534
+ * size is calculated dynamically to maintain a consistent visual size.
1535
+ * @default 10
1536
+ */
1537
+ toothHeightPixels?: number;
1538
+ /**
1539
+ * The target base span of each triangular tooth as a multiple of tooth depth.
1540
+ * Lower values make sharper, denser teeth; higher values make flatter teeth.
1541
+ * @default 1.15
1542
+ */
1543
+ toothWidthRatio?: number;
1544
+ /**
1545
+ * The meters-per-pixel ratio at the current zoom level and latitude. Required
1546
+ * when using toothHeightPixels for zoom-aware sizing.
1547
+ */
1548
+ metersPerPixel?: number;
1549
+ }
1550
+ declare const DEFAULT_ANTITANK_DITCH_OPTIONS: Required<Omit<AntitankDitchOptions, "metersPerPixel">>;
1551
+ declare function createAntitankDitchUnderConstruction(positions: Position[], options?: AntitankDitchOptions): FeatureCollection<MultiLineString, {
1552
+ part: "ditch";
1553
+ }>;
1554
+ declare function createAntitankDitchCompleted(positions: Position[], options?: AntitankDitchOptions): FeatureCollection<MultiPolygon, {
1555
+ part: "teeth";
1556
+ fill: boolean;
1557
+ }>;
1558
+ //#endregion
1559
+ //#region src/generators/cm29-protection-lines/antitankWall.d.ts
1560
+ interface AntitankWallOptions extends AntitankDitchOptions {
1561
+ /**
1562
+ * The total gap between consecutive tooth bases as a multiple of tooth base
1563
+ * width. Use 0 for touching teeth; higher values create wider gaps.
1564
+ * @default 1.35
1565
+ */
1566
+ toothSpacingRatio?: number;
1567
+ }
1568
+ declare const DEFAULT_ANTITANK_WALL_OPTIONS: Required<Omit<AntitankWallOptions, "metersPerPixel">>;
1569
+ declare function createAntitankWall(positions: Position[], options?: AntitankWallOptions): FeatureCollection<MultiLineString, {
1570
+ part: "wall";
1571
+ }>;
1572
+ //#endregion
1573
+ //#region src/generators/cm29-protection-lines/fortifiedLine.d.ts
1574
+ /**
1575
+ * Configuration options for the Fortified Line geometry.
1576
+ */
1577
+ interface FortifiedLineOptions {
1578
+ /**
1579
+ * The size of the square teeth in meters.
1580
+ * This controls both the width and height of the castellated pattern.
1581
+ * This is ignored if toothSizePixels is provided along with metersPerPixel.
1582
+ * @default 50
1583
+ */
1584
+ toothSize?: number;
1585
+ /**
1586
+ * The size of the square teeth in pixels.
1587
+ * When provided along with metersPerPixel, the actual meter size is calculated
1588
+ * dynamically to maintain consistent visual size on screen.
1589
+ * Takes precedence over toothSize when metersPerPixel is also provided.
1590
+ * @default 10
1591
+ */
1592
+ toothSizePixels?: number;
1593
+ /**
1594
+ * The meters-per-pixel ratio at the current zoom level and latitude.
1595
+ * Required when using toothSizePixels for zoom-aware sizing.
1596
+ */
1597
+ metersPerPixel?: number;
1598
+ /**
1599
+ * Round the line's corners by curving the base path through the control
1600
+ * points (centripetal Catmull-Rom spline) before generating the castellated
1601
+ * teeth, matching the rounded shape option on the Fortified Area and Battle
1602
+ * Position measures. With fewer than three control points the path is left
1603
+ * unchanged (a single segment cannot be smoothed).
1604
+ * @default false
1605
+ */
1606
+ smooth?: boolean;
1607
+ /**
1608
+ * Number of samples per segment when `smooth` is enabled. Higher values yield
1609
+ * a denser, smoother curve.
1610
+ * @default 16
1611
+ */
1612
+ smoothResolution?: number;
1613
+ }
1614
+ /**
1615
+ * Default options for the Fortified Line graphic.
1616
+ */
1617
+ declare const DEFAULT_FORTIFIED_LINE_OPTIONS: Required<Omit<FortifiedLineOptions, "metersPerPixel">>;
1618
+ /**
1619
+ * Creates a Fortified Line tactical graphic.
1620
+ *
1621
+ * Generates a castellated/square-wave line representing a fortified line.
1622
+ * The line consists of square "teeth" that project perpendicular to the base path.
1623
+ *
1624
+ * @param positions - Array of GeoJSON positions defining the base path
1625
+ * @param options - Configuration options for the graphic
1626
+ * @returns A GeoJSON FeatureCollection containing the castellated LineString
1627
+ */
1628
+ declare function createFortifiedLine(positions: Position[], options?: FortifiedLineOptions): FeatureCollection<LineString>;
1629
+ //#endregion
1630
+ //#region src/generators/cm15-maneuver-areas/fortifiedArea.d.ts
1631
+ /**
1632
+ * Configuration options for the Fortified Area. Inherits the Fortified Line
1633
+ * options (including `smooth`/`smoothResolution`) unchanged; the area applies
1634
+ * the smoothing as a closed Catmull-Rom ring rather than an open spline. Also
1635
+ * carries the shared {@link AreaLabelOptions} label placement (a plain
1636
+ * intersection, not a re-derivation, so the aliased
1637
+ * {@link DEFAULT_FORTIFIED_AREA_OPTIONS} default still typechecks unchanged —
1638
+ * `AreaLabelOptions`'s fields are all optional).
1639
+ */
1640
+ type FortifiedAreaOptions = FortifiedLineOptions & AreaLabelOptions;
1641
+ declare const DEFAULT_FORTIFIED_AREA_OPTIONS: FortifiedAreaOptions;
1642
+ /**
1643
+ * Creates a Fortified Area tactical graphic.
1644
+ *
1645
+ * Generates a polygon with a castellated/square-wave boundary representing a fortified area.
1646
+ * The boundary consists of square "teeth" that project perpendicular to the path.
1647
+ *
1648
+ * @param positions - Array of GeoJSON positions defining the area boundary.
1649
+ * The first and last positions should match to close the polygon,
1650
+ * or it will be closed automatically.
1651
+ * @param options - Configuration options for the graphic
1652
+ * @param textAmplifiers - Field T (bare, no prefix — "TANGO", not "FA TANGO")
1653
+ * plus Field H/W/W1, centered on the pre-teeth boundary ring (see
1654
+ * `boundaryInput` below); no Field N — Fortified Area's L-15 template
1655
+ * carries no ENY marker.
1656
+ * @returns A GeoJSON FeatureCollection containing the castellated Polygon
1657
+ * plus any label Points
1658
+ */
1659
+ declare function createFortifiedArea(positions: Position[], options?: FortifiedAreaOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<Polygon | Point>;
1660
+ //#endregion
1661
+ //#region src/generators/cm27-protection-areas/block.d.ts
1662
+ type BlockOptions = Record<never, never>;
1663
+ declare const DEFAULT_BLOCK_OPTIONS: BlockOptions;
1664
+ /**
1665
+ * Generates a GeoJSON FeatureCollection for a "Block" tactical symbol (T-shape).
1666
+ *
1667
+ * @param coordinates - An array of GeoJSON Positions (Lon/Lat).
1668
+ * Expects exactly 3 points:
1669
+ * - PT1 & PT2: Endpoints of the vertical line.
1670
+ * - PT3: Defines the endpoint of the horizontal line (stem).
1671
+ * @param options - Configuration options.
1672
+ * @returns A GeoJSON FeatureCollection containing a LineString.
1673
+ */
1674
+ declare function createBlock(coordinates: Position[], _options?: BlockOptions): FeatureCollection<LineString>;
1675
+ //#endregion
1676
+ //#region src/generators/cm27-protection-areas/disrupt.d.ts
1677
+ interface DisruptOptions {
1678
+ middleArrowLengthRatio?: number;
1679
+ bottomArrowLengthRatio?: number;
1680
+ shaftLengthRatio?: number;
1681
+ arrowheadLengthRatio?: number;
1682
+ arrowheadWidthRatio?: number;
1683
+ }
1684
+ declare const DEFAULT_DISRUPT_OPTIONS: Required<DisruptOptions>;
1685
+ /**
1686
+ * Generates a GeoJSON FeatureCollection for a DISRUPT tactical symbol.
1687
+ *
1688
+ * Input:
1689
+ * - PT1: Top endpoint of the vertical spine
1690
+ * - PT2: Bottom endpoint of the vertical spine
1691
+ * - PT3: Reference point used to determine the longest-arrow offset
1692
+ *
1693
+ * Geometry:
1694
+ * - Spine: PT1 -> PT2
1695
+ * - PT2 -> PT1 defines the baseline orientation; arrow direction is constrained to its perpendicular axis
1696
+ * - PT3 is decomposed and projected onto the perpendicular axis through PT1 to derive a valid longest-arrow tip
1697
+ * - Three arrows placed at PT1, midpoint(PT1, PT2), and PT2
1698
+ * - Center shaft extends opposite arrow direction from midpoint with the same length as the middle arrow
1699
+ * - Top arrow is longest
1700
+ * - Middle and bottom arrows are proportional to the longest arrow
1701
+ * - Arrow heads are returned as filled triangle polygons
1702
+ */
1703
+ declare function createDisrupt(coordinates: Position[], options?: DisruptOptions): FeatureCollection<MultiLineString | MultiPolygon>;
1704
+ //#endregion
1705
+ //#region src/generators/cm27-protection-areas/fix.d.ts
1706
+ interface FixOptions {
1707
+ arrowheadAngle?: number;
1708
+ arrowheadLengthRatio?: number;
1709
+ endSegmentRatio?: number;
1710
+ }
1711
+ declare const DEFAULT_FIX_OPTIONS: Required<FixOptions>;
1712
+ /**
1713
+ * Generates a GeoJSON FeatureCollection for a FIX tactical symbol.
1714
+ *
1715
+ * Input:
1716
+ * - PT1: Arrow tip end
1717
+ * - PT2: Opposite end
1718
+ *
1719
+ * Notes:
1720
+ * - Requires exactly two points.
1721
+ * - Produces one MultiLineString feature containing the zigzag body and open arrowhead wings.
1722
+ */
1723
+ declare function createFix(coordinates: Position[], options?: FixOptions): FeatureCollection<MultiLineString>;
1724
+ //#endregion
1725
+ //#region src/generators/cm27-protection-areas/turn.d.ts
1726
+ interface TurnOptions {
1727
+ arrowheadLengthRatio?: number;
1728
+ arrowheadWidthRatio?: number;
1729
+ arcSegments?: number;
1730
+ }
1731
+ declare const DEFAULT_TURN_OPTIONS: Required<TurnOptions>;
1732
+ /**
1733
+ * Generates a quarter-circle shaft from PT2 (rear) to the arrowhead base.
1734
+ * The arrowhead continues tangent to the arc and places its tip at PT1.
1735
+ * PT3 selects which side of the PT2 -> PT1 chord contains the arc.
1736
+ */
1737
+ declare function createTurn(coordinates: Position[], options?: TurnOptions): FeatureCollection<MultiLineString | MultiPolygon>;
1738
+ //#endregion
1739
+ //#region src/generators/cm27-protection-areas/obstacleBypassEasy.d.ts
1740
+ interface ObstacleBypassEasyOptions {
1741
+ arrowheadLengthRatio?: number;
1742
+ arrowheadWidthRatio?: number;
1743
+ defaultLengthRatio?: number;
1744
+ }
1745
+ declare const DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS: Required<ObstacleBypassEasyOptions>;
1746
+ /**
1747
+ * Generates a GeoJSON FeatureCollection for an "Obstacle Bypass Easy" symbol.
1748
+ *
1749
+ * Input:
1750
+ * - PT1 and PT2 define the tips of the two arrowheads (opening and symbol height)
1751
+ * - PT3 defines signed symbol length along the perpendicular axis through midpoint(PT1, PT2)
1752
+ *
1753
+ * Geometry:
1754
+ * - Rear line is parallel to opening(PT1-PT2) and has equal length
1755
+ * - Two side rails run from rear endpoints to the arrowheads and are parallel to each other
1756
+ * - Rear line is perpendicular to both side rails
1757
+ * - Arrow heads are filled triangle polygons at PT1 and PT2
1758
+ */
1759
+ declare function createObstacleBypassEasy(coordinates: Position[], options?: ObstacleBypassEasyOptions): FeatureCollection<MultiLineString | MultiPolygon>;
1760
+ //#endregion
1761
+ //#region src/generators/cm27-protection-areas/obstacleBypassDifficult.d.ts
1762
+ interface ObstacleBypassDifficultOptions {
1763
+ arrowheadLengthRatio?: number;
1764
+ arrowheadWidthRatio?: number;
1765
+ defaultLengthRatio?: number;
1766
+ zigzagAmplitudeRatio?: number;
1767
+ zigzagSpacingRatio?: number;
1768
+ }
1769
+ declare const DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS: Required<ObstacleBypassDifficultOptions>;
1770
+ declare function createObstacleBypassDifficult(coordinates: Position[], options?: ObstacleBypassDifficultOptions): FeatureCollection<MultiLineString | MultiPolygon>;
1771
+ //#endregion
1772
+ //#region src/generators/cm27-protection-areas/obstacleBypassImpossible.d.ts
1773
+ interface ObstacleBypassImpossibleOptions {
1774
+ arrowheadLengthRatio?: number;
1775
+ arrowheadWidthRatio?: number;
1776
+ defaultLengthRatio?: number;
1777
+ rearBarLengthRatio?: number;
1778
+ rearGapRatio?: number;
1779
+ }
1780
+ declare const DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS: Required<ObstacleBypassImpossibleOptions>;
1781
+ /**
1782
+ * Generates a GeoJSON FeatureCollection for an "Obstacle Bypass Impossible" symbol.
1783
+ *
1784
+ * Input:
1785
+ * - PT1 and PT2 define the tips of the two arrowheads (opening and symbol height)
1786
+ * - PT3 defines signed symbol length along the perpendicular axis through midpoint(PT1, PT2)
1787
+ *
1788
+ * Geometry:
1789
+ * - Same base as obstacle bypass easy
1790
+ * - Rear line has two short perpendicular bars on the rear side
1791
+ */
1792
+ declare function createObstacleBypassImpossible(coordinates: Position[], options?: ObstacleBypassImpossibleOptions): FeatureCollection<MultiLineString | MultiPolygon>;
1793
+ //#endregion
1794
+ //#region src/registry.d.ts
1795
+ /**
1796
+ * The single source of truth for the catalog: one **control measure
1797
+ * definition** record per measure, co-located with its generator and collected
1798
+ * here. The `ControlMeasureId` union, `OptionsByKind`, the generator dispatch,
1799
+ * the default options, and rule resolution are all *derived* from this map
1800
+ * rather than maintained as parallel tables. Adding a measure is a one-file
1801
+ * change plus one line here. See ADR-0013.
1802
+ */
1803
+ declare const DEFINITIONS: {
1804
+ boundary: ControlMeasureDefinition<"boundary", typeof createBoundary>;
1805
+ "light-line": ControlMeasureDefinition<"light-line", typeof createLightLine>;
1806
+ "engineer-work-line": ControlMeasureDefinition<"engineer-work-line", typeof createEngineerWorkLine>;
1807
+ "generic-c2-line": ControlMeasureDefinition<"generic-c2-line", typeof createGenericC2Line>;
1808
+ "battle-position": ControlMeasureDefinition<"battle-position", typeof createBattlePosition>;
1809
+ "strong-point": ControlMeasureDefinition<"strong-point", typeof createStrongPoint>;
1810
+ ambush: ControlMeasureDefinition<"ambush", (controlPoints: import("geojson").Position[], options?: AmbushOptions) => import("geojson").FeatureCollection<import("geojson").MultiLineString, Record<string, never>>>;
1811
+ "principal-direction-of-fire": ControlMeasureDefinition<"principal-direction-of-fire", typeof createPrincipalDirectionOfFire>;
1812
+ "final-protective-fire-left": ControlMeasureDefinition<"final-protective-fire-left", typeof createFinalProtectiveFireLeft>;
1813
+ "final-protective-fire-right": ControlMeasureDefinition<"final-protective-fire-right", typeof createFinalProtectiveFireRight>;
1814
+ "search-area": ControlMeasureDefinition<"search-area", (controlPoints: import("geojson").Position[], options?: TacticalArrowOptions) => import("geojson").FeatureCollection<import("geojson").MultiLineString | import("geojson").MultiPolygon, {
1815
+ part: "shaft" | "head";
1816
+ fill?: boolean;
1817
+ }>>;
1818
+ encirclement: ControlMeasureDefinition<"encirclement", typeof createEncirclement>;
1819
+ "assembly-area": ControlMeasureDefinition<"assembly-area", typeof createAssemblyArea>;
1820
+ "joint-tactical-action-area": ControlMeasureDefinition<"joint-tactical-action-area", typeof createJointTacticalActionArea>;
1821
+ "landing-zone": ControlMeasureDefinition<"landing-zone", typeof createLandingZone>;
1822
+ "pickup-zone": ControlMeasureDefinition<"pickup-zone", typeof createPickupZone>;
1823
+ "area-of-operations": ControlMeasureDefinition<"area-of-operations", typeof createAreaOfOperations>;
1824
+ "main-attack": ControlMeasureDefinition<"main-attack", typeof createMainAttack>;
1825
+ "supporting-attack": ControlMeasureDefinition<"supporting-attack", typeof createSupportingAttack>;
1826
+ "classic-arrow": ControlMeasureDefinition<"classic-arrow", typeof createClassicArrow>;
1827
+ "block-arrow": ControlMeasureDefinition<"block-arrow", typeof createBlockArrow>;
1828
+ line: ControlMeasureDefinition<"line", typeof createGenericLine>;
1829
+ polygon: ControlMeasureDefinition<"polygon", typeof createGenericPolygon>;
1830
+ rectangle: ControlMeasureDefinition<"rectangle", typeof createGenericRectangle>;
1831
+ circle: ControlMeasureDefinition<"circle", typeof createGenericCircle>;
1832
+ "airborne-attack": ControlMeasureDefinition<"airborne-attack", typeof createAirborneAttack>;
1833
+ "attack-helicopter": ControlMeasureDefinition<"attack-helicopter", typeof createAttackHelicopter>;
1834
+ "support-by-fire": ControlMeasureDefinition<"support-by-fire", typeof createSupportByFire>;
1835
+ "attack-by-fire": ControlMeasureDefinition<"attack-by-fire", typeof createAttackByFire>;
1836
+ flot: ControlMeasureDefinition<"flot", typeof createFLOT>;
1837
+ "phase-line": ControlMeasureDefinition<"phase-line", typeof createPhaseLine>;
1838
+ "handover-line": ControlMeasureDefinition<"handover-line", typeof createHandoverLine>;
1839
+ "battle-handover-line": ControlMeasureDefinition<"battle-handover-line", typeof createBattleHandoverLine>;
1840
+ "block-mission-task": ControlMeasureDefinition<"block-mission-task", typeof createBlockMissionTaskSymbol>;
1841
+ breach: ControlMeasureDefinition<"breach", typeof createBreachSymbol>;
1842
+ bypass: ControlMeasureDefinition<"bypass", typeof createBypassSymbol>;
1843
+ canalize: ControlMeasureDefinition<"canalize", typeof createCanalizeSymbol>;
1844
+ clear: ControlMeasureDefinition<"clear", typeof createClearSymbol>;
1845
+ delay: ControlMeasureDefinition<"delay", typeof createDelaySymbol>;
1846
+ isolate: ControlMeasureDefinition<"isolate", typeof createIsolateSymbol>;
1847
+ "antitank-ditch-under-construction": ControlMeasureDefinition<"antitank-ditch-under-construction", typeof createAntitankDitchUnderConstruction>;
1848
+ "antitank-ditch-completed": ControlMeasureDefinition<"antitank-ditch-completed", typeof createAntitankDitchCompleted>;
1849
+ "antitank-wall": ControlMeasureDefinition<"antitank-wall", typeof createAntitankWall>;
1850
+ "fortified-line": ControlMeasureDefinition<"fortified-line", typeof createFortifiedLine>;
1851
+ "fortified-area": ControlMeasureDefinition<"fortified-area", typeof createFortifiedArea>;
1852
+ block: ControlMeasureDefinition<"block", typeof createBlock>;
1853
+ disrupt: ControlMeasureDefinition<"disrupt", typeof createDisrupt>;
1854
+ fix: ControlMeasureDefinition<"fix", typeof createFix>;
1855
+ turn: ControlMeasureDefinition<"turn", typeof createTurn>;
1856
+ "obstacle-bypass-easy": ControlMeasureDefinition<"obstacle-bypass-easy", typeof createObstacleBypassEasy>;
1857
+ "obstacle-bypass-difficult": ControlMeasureDefinition<"obstacle-bypass-difficult", typeof createObstacleBypassDifficult>;
1858
+ "obstacle-bypass-impossible": ControlMeasureDefinition<"obstacle-bypass-impossible", typeof createObstacleBypassImpossible>;
1859
+ };
1860
+ type Definitions = typeof DEFINITIONS;
1861
+ /** Stable string id of a control measure — the keys of {@link DEFINITIONS}. */
1862
+ type ControlMeasureId = keyof Definitions;
1863
+ /**
1864
+ * The discriminant for {@link ControlMeasure}. Identical to
1865
+ * {@link ControlMeasureId}; kept as a distinct name for the `<K extends
1866
+ * ControlMeasureKind>` generics threaded through rendering and edit sessions.
1867
+ */
1868
+ type ControlMeasureKind = ControlMeasureId;
1869
+ /** Strips the internal `validationMode` knob from a public options surface. */
1870
+ type PublicOptions<T> = Omit<T, "validationMode">;
1871
+ /**
1872
+ * The per-kind public options map, derived covariantly from each definition's
1873
+ * generator (see {@link OptsOf}). Empty-options kinds resolve to `{}` — exactly
1874
+ * as loose as the former hand-written table. See ADR-0013.
1875
+ */
1876
+ type OptionsByKind = { [K in keyof Definitions]: PublicOptions<OptsOf<Definitions[K]>> };
1877
+ /** Insertion-ordered list of every control-measure id. */
1878
+ declare const CONTROL_MEASURE_IDS: readonly ControlMeasureId[];
1879
+ declare const CONTROL_MEASURE_METADATA: Readonly<Record<ControlMeasureId, ControlMeasureMetadata>>;
1880
+ declare function listControlMeasureMetadata(): readonly ControlMeasureMetadata[];
1881
+ declare function getControlMeasureMetadata(id: ControlMeasureId): ControlMeasureMetadata;
1882
+ declare function getControlMeasureMetadataByValue(value: string): ControlMeasureMetadata | undefined;
1883
+ declare function getDefaultOptions<K extends ControlMeasureKind>(kind: K): OptionsByKind[K];
1884
+ //#endregion
1885
+ //#region src/style.d.ts
1886
+ /**
1887
+ * Framework-agnostic style hints attached to a `ControlMeasure`.
1888
+ *
1889
+ * Mirrors the per-feature subset of what map adapters render. The renderer
1890
+ * fans these into each emitted feature's `properties.style` ([[StyleHints]]).
1891
+ * Adapters merge them over their layer-level style; generator-emitted hints
1892
+ * on individual features win over both.
1893
+ */
1894
+ interface ControlMeasureStyle {
1895
+ /**
1896
+ * The single symbol color. Control measures are monocolor: one color paints
1897
+ * every part, stroked or filled. Input-only — resolved into concrete
1898
+ * `strokeColor` / `fillColor` per feature by the renderer and never emitted
1899
+ * on output. `strokeColor` / `fillColor` act as optional per-channel
1900
+ * overrides. See ADR-0011.
1901
+ */
1902
+ color?: string;
1903
+ strokeColor?: string;
1904
+ strokeWidth?: number;
1905
+ strokeDash?: number[];
1906
+ fillColor?: string;
1907
+ }
1908
+ //#endregion
1909
+ //#region src/instance.d.ts
1910
+ interface ControlMeasure<K extends ControlMeasureKind = ControlMeasureKind> {
1911
+ id: string;
1912
+ kind: K;
1913
+ controlPoints: Position[];
1914
+ options?: OptionsByKind[K];
1915
+ style?: ControlMeasureStyle;
1916
+ properties?: Record<string, unknown>;
1917
+ /** Free-text amplifier fields (MIL-STD-2525E Appendix L Table L-II); see `./text-amplifiers`. */
1918
+ textAmplifiers?: TextAmplifiers;
1919
+ schemaVersion?: 1;
1920
+ }
1921
+ declare function isKind<K extends ControlMeasureKind>(cm: ControlMeasure, kind: K): cm is ControlMeasure<K>;
1922
+ /**
1923
+ * Deep-clone a `ControlMeasure` so held references survive mutations to the
1924
+ * original (and vice versa). Used by the session façade to build the
1925
+ * `measure` half of `ControlMeasureSnapshot`. Nested values inside
1926
+ * `options`, `style`, `properties`, and `textAmplifiers` are cloned too —
1927
+ * `properties` is `Record<string, unknown>` and may carry arbitrary host
1928
+ * metadata, so a shallow copy would leak shared references.
1929
+ *
1930
+ * Backed by `structuredClone`: only structured-cloneable values are
1931
+ * supported (no functions, DOM nodes, class instances). Absent optional
1932
+ * fields stay absent on the clone.
1933
+ */
1934
+ declare function cloneControlMeasure<K extends ControlMeasureKind>(cm: ControlMeasure<K>): ControlMeasure<K>;
1935
+ //#endregion
1936
+ //#region src/rendered.d.ts
1937
+ /**
1938
+ * Per-feature style hints carried on `properties.style`.
1939
+ *
1940
+ * These are *resolved*: `renderControlMeasure` cascades `graphicsStyle` →
1941
+ * `cm.style` → any generator pattern hint, then expands the monocolor `color`
1942
+ * into concrete `strokeColor` / `fillColor` per feature (see ADR-0011 and
1943
+ * `resolveSymbolColor`). Output therefore carries concrete colors, never the
1944
+ * input-only `color` key, and a `fillColor` only on parts the generator
1945
+ * marked filled.
1946
+ *
1947
+ * Generators contribute paint *role* and *pattern* (a part is filled; a
1948
+ * sub-line is dashed regardless of the user's stroke), never a hue. Adapters
1949
+ * merge the resulting `StyleHints` over their layer-level style at draw time.
1950
+ */
1951
+ interface StyleHints extends ControlMeasureStyle {}
1952
+ /**
1953
+ * Per-feature properties emitted by `renderControlMeasure`.
1954
+ *
1955
+ * Stable-id contract — every feature produced by the renderer has:
1956
+ * - `feature.id` of the form `${cmId}:${part}:${index}`
1957
+ * - `properties.part` matching the `part` segment of the id
1958
+ * - `properties.index` matching the `index` segment of the id
1959
+ *
1960
+ * Adapters rely on this contract to diff renders in place without keeping
1961
+ * their own bookkeeping. Use `controlMeasureIdFromFeature` to recover the
1962
+ * `cmId` from a picked feature.
1963
+ */
1964
+ interface FeaturePartProps {
1965
+ part: string;
1966
+ index: number;
1967
+ style?: StyleHints;
1968
+ /** Label text emitted by generators (e.g. breach "B"). */
1969
+ text?: string;
1970
+ /** Label rotation in radians, emitted by generators. */
1971
+ rotation?: number;
1972
+ /**
1973
+ * Horizontal text alignment relative to the label point: `"start"` = the
1974
+ * text begins at the point, `"end"` = it ends there. Absent = centered.
1975
+ */
1976
+ textAnchor?: "start" | "end";
1977
+ /** Label size in CSS pixels at the draw/reference zoom. */
1978
+ textSizePixels?: number;
1979
+ /** Map zoom at which textSizePixels was captured. */
1980
+ textSizeZoom?: number;
1981
+ /** Map resolution at which textSizePixels was captured. */
1982
+ textSizeResolution?: number;
1983
+ }
1984
+ /**
1985
+ * Output of `renderControlMeasure`. A GeoJSON `FeatureCollection` whose
1986
+ * features satisfy the `FeaturePartProps` stable-id contract. See ADR-0010.
1987
+ */
1988
+ type ControlMeasureRender = FeatureCollection<Geometry, FeaturePartProps>;
1989
+ /**
1990
+ * A `ControlMeasure` paired with its `Render` at a single point in time.
1991
+ *
1992
+ * The unit delivered to `EditChangeEvent` listeners (as `measure` and
1993
+ * `previous`) and resolved from `TacticalDraw.draw()` / `.edit()`. The
1994
+ * `measure` half is a defensive clone (see `cloneControlMeasure`) so held
1995
+ * references remain valid after the originating session has closed.
1996
+ *
1997
+ * See ADR-0010.
1998
+ */
1999
+ interface ControlMeasureSnapshot<K extends ControlMeasureKind = ControlMeasureKind> {
2000
+ measure: ControlMeasure<K>;
2001
+ render: ControlMeasureRender;
2002
+ }
2003
+ /**
2004
+ * Recover the originating control measure id (`cmId`) from a feature emitted
2005
+ * by `renderControlMeasure`. The feature id must match the stable-id contract
2006
+ * `${cmId}:${part}:${index}`; otherwise this throws.
2007
+ */
2008
+ declare function controlMeasureIdFromFeature(feature: Feature<Geometry, FeaturePartProps> | {
2009
+ id?: string | number;
2010
+ }): string;
2011
+ //#endregion
2012
+ //#region src/renderControlMeasure.d.ts
2013
+ interface RenderOptions {
2014
+ validationMode?: ValidationMode;
2015
+ /**
2016
+ * Façade-level default style (third / lowest-priority layer). Merged
2017
+ * shallowly under `cm.style` and any per-feature generator hint. When
2018
+ * omitted, style resolution matches the prior two-layer behavior.
2019
+ */
2020
+ graphicsStyle?: ControlMeasureStyle;
2021
+ }
2022
+ /**
2023
+ * Pure render: `ControlMeasure` → `ControlMeasureRender` (a
2024
+ * `FeatureCollection` of `FeaturePartProps`-typed features). Per-feature
2025
+ * stable ids follow `${cm.id}:${part}:${index}`. Style is resolved from the
2026
+ * three layers (graphicsStyle, cm.style, generator hint) and stamped on
2027
+ * `properties.style` when non-empty.
2028
+ */
2029
+ declare function renderControlMeasure<K extends ControlMeasureKind>(cm: ControlMeasure<K>, opts?: RenderOptions): ControlMeasureRender;
2030
+ //#endregion
2031
+ //#region src/freeze-orientation.d.ts
2032
+ /**
2033
+ * Dispatches to a measure kind's `freezeOrientation` hook (see
2034
+ * {@link import("./define").ControlMeasureDefinition.freezeOrientation}),
2035
+ * pinning orientation-derived option defaults to their current concrete
2036
+ * values ahead of a rigid rotation of `controlPoints`. Returns `undefined`
2037
+ * when the kind declares no hook, or when the hook itself finds nothing to
2038
+ * freeze. Edit hosts call this when a rotate gesture starts (ADR-0023).
2039
+ */
2040
+ declare function freezeOrientationOptions<K extends ControlMeasureKind>(kind: K, controlPoints: Position[], options: OptionsByKind[K] | undefined): Partial<OptionsByKind[K]> | undefined;
2041
+ //#endregion
2042
+ //#region src/styleResolver.d.ts
2043
+ /**
2044
+ * Three-layer style precedence for `renderControlMeasure`.
2045
+ *
2046
+ * Lower-priority → higher-priority: `graphicsStyle` (façade default) →
2047
+ * `measureStyle` (`cm.style`) → `generatorStyle` (per-feature hint emitted
2048
+ * by a generator). Merge is shallow and per-property; higher-priority layers
2049
+ * win key by key. Explicit `null` / `undefined` in a higher-priority layer
2050
+ * is treated as "no opinion" and does not clear a lower-priority key.
2051
+ *
2052
+ * Returns `undefined` when all three layers are absent so the renderer can
2053
+ * omit `properties.style` entirely — keeps the no-style case byte-identical
2054
+ * to a property-less feature.
2055
+ *
2056
+ * Pure function: inputs are never mutated; the returned object is always a
2057
+ * fresh allocation when defined.
2058
+ */
2059
+ declare function resolveStyleHints(graphicsStyle: ControlMeasureStyle | undefined, measureStyle: ControlMeasureStyle | undefined, generatorStyle: StyleHints | undefined): StyleHints | undefined;
2060
+ //#endregion
2061
+ //#region src/toSimpleStyle.d.ts
2062
+ /**
2063
+ * simplestyle-spec properties (the subset this library can express), flat on
2064
+ * `properties`. All keys are optional.
2065
+ *
2066
+ * @see https://github.com/mapbox/simplestyle-spec
2067
+ */
2068
+ interface SimpleStyleProps extends FeaturePartProps {
2069
+ stroke?: string;
2070
+ "stroke-width"?: number;
2071
+ "stroke-opacity"?: number;
2072
+ fill?: string;
2073
+ "fill-opacity"?: number;
2074
+ }
2075
+ /**
2076
+ * A `FeatureCollection` whose features carry simplestyle-spec keys instead of
2077
+ * the nested `properties.style` slot. The `FeaturePartProps` stable-id
2078
+ * contract (`part`, `index`, `feature.id`) is preserved.
2079
+ */
2080
+ type SimpleStyleRender = FeatureCollection<Geometry, SimpleStyleProps>;
2081
+ /**
2082
+ * Lossy interop transform: `ControlMeasureRender` → a `FeatureCollection`
2083
+ * whose features carry simplestyle-spec keys. Operates on the already-resolved
2084
+ * per-feature `style`, so it composes after `renderControlMeasure`'s
2085
+ * three-layer merge and stays a pure post-processing step.
2086
+ *
2087
+ * Lossy mapping, by design:
2088
+ * - `strokeDash` has no simplestyle equivalent and is dropped — dashed
2089
+ * doctrinal sub-lines render solid in simplestyle consumers.
2090
+ * - colors must be hex or `rgb()/rgba()`; alpha becomes `*-opacity`. Other
2091
+ * color forms (named, `hsl()`) are omitted rather than guessed.
2092
+ */
2093
+ declare function toSimpleStyle(render: ControlMeasureRender): SimpleStyleRender;
2094
+ //#endregion
2095
+ //#region src/internal/graphics-utils.d.ts
2096
+ /**
2097
+ * Small value used to avoid division by zero and floating-point precision issues.
2098
+ */
2099
+ declare const EPSILON = 0.000001;
2100
+ /**
2101
+ * Rounds a number to a specified number of decimal places.
2102
+ */
2103
+ declare const roundToFixed: (v: number, precision?: number) => number;
2104
+ /**
2105
+ * Calculates the meters-per-pixel ratio at a given latitude and zoom level.
2106
+ *
2107
+ * This is essential for maintaining consistent visual sizes on the map
2108
+ * regardless of zoom level. The formula accounts for:
2109
+ * - The Web Mercator projection's tile-based structure
2110
+ * - The latitude-dependent scale distortion in Mercator projection
2111
+ *
2112
+ * @param latitude - The latitude in degrees (affects scale due to projection)
2113
+ * @param zoomLevel - The current map zoom level
2114
+ * @returns The number of meters represented by one pixel at the given location and zoom
2115
+ *
2116
+ * @example
2117
+ * ```typescript
2118
+ * // At zoom 10, latitude 45°
2119
+ * const mpp = getMetersPerPixel(45, 10);
2120
+ * // To get a 20-pixel radius in meters:
2121
+ * const radiusMeters = 20 * mpp;
2122
+ * ```
2123
+ */
2124
+ declare const getMetersPerPixel: (latitude: number, zoomLevel: number) => number;
2125
+ //#endregion
2126
+ //#region src/draw-rules/baseline-frame.d.ts
2127
+ type BaselineFrameOrigin = "p1" | "p2" | "midpoint";
2128
+ type BaselineFrameNormal = "right" | "left";
2129
+ interface BaselineFrameOptions {
2130
+ origin?: BaselineFrameOrigin;
2131
+ normal?: BaselineFrameNormal;
2132
+ }
2133
+ interface BaselineFrame {
2134
+ readonly p1: Point2D;
2135
+ readonly p2: Point2D;
2136
+ readonly origin: Point2D;
2137
+ readonly direction: Point2D;
2138
+ readonly normal: Point2D;
2139
+ readonly length: number;
2140
+ signedNormalDistance(point: Position): number;
2141
+ pointAtNormalDistance(distance: number): Position | null;
2142
+ }
2143
+ declare function createBaselineFrame(p1: Position, p2: Position, options?: BaselineFrameOptions): BaselineFrame | null;
2144
+ //#endregion
2145
+ //#region src/draw-rules/midpoint-perpendicular.d.ts
2146
+ interface MidpointPerpendicularDrawRuleOptions {
2147
+ id: string;
2148
+ defaultDistanceRatio?: number;
2149
+ /** User clicks required to commit. Defaults to `2` (the third point is auto-derived). */
2150
+ minimumUserPoints?: number;
2151
+ /** Raw points at which a live preview can be derived. See {@link ControlMeasureDrawRule}. */
2152
+ minimumPreviewPoints?: number;
2153
+ /**
2154
+ * Index of the slot whose point is constrained to the perpendicular axis
2155
+ * through the configured origin of the other two ("baseline") slots. Must be
2156
+ * `0` or `2`. Defaults to `2`.
2157
+ *
2158
+ * Area11 (Block) and Point12 (obstacle-bypass) use `2`: P1/P2 are the free
2159
+ * baseline endpoints and P3 is constrained. Area7 (Attack-By-Fire) uses `0`:
2160
+ * P1 is the constrained arrowhead tip and P2/P3 are the free back-line
2161
+ * endpoints.
2162
+ */
2163
+ constrainedIndex?: 0 | 2;
2164
+ /** Frame origin for the perpendicular axis. Defaults to `"midpoint"`. */
2165
+ origin?: BaselineFrameOrigin;
2166
+ /** Side the positive normal points to. Defaults to `"right"`. */
2167
+ normal?: BaselineFrameNormal;
2168
+ }
2169
+ declare function createMidpointPerpendicularDrawRule(options: MidpointPerpendicularDrawRuleOptions): ControlMeasureDrawRule;
2170
+ declare function computeDefaultMidpointPerpendicularPoint(p1: Position, p2: Position, distanceRatio?: number): Position | null;
2171
+ declare function getMidpointPerpendicularSignedDistance(p1: Position, p2: Position, controlPoint: Position): number | null;
2172
+ declare function pointOnMidpointPerpendicularAxis(p1: Position, p2: Position, distance: number | null): Position | null;
2173
+ declare function snapToMidpointPerpendicular(p1: Position, p2: Position, controlPoint: Position): Position | null;
2174
+ //#endregion
2175
+ //#region src/draw-rules/area11.d.ts
2176
+ declare const blockDrawRule: ControlMeasureDrawRule;
2177
+ //#endregion
2178
+ //#region src/draw-rules/area12.d.ts
2179
+ /**
2180
+ * Area12 anchor draw rule for Disrupt.
2181
+ *
2182
+ * P1/P2 are the free spine endpoints. P3 is the longest-arrow tip, constrained
2183
+ * to the perpendicular axis through P1 (not the baseline midpoint).
2184
+ */
2185
+ declare const disruptDrawRule: ControlMeasureDrawRule;
2186
+ //#endregion
2187
+ //#region src/draw-rules/area15.d.ts
2188
+ declare const centerRadiusDrawRule: ControlMeasureDrawRule;
2189
+ //#endregion
2190
+ //#region src/draw-rules/point12.d.ts
2191
+ /**
2192
+ * Point12 anchor draw rule for the obstacle-bypass family.
2193
+ *
2194
+ * Shared by `obstacle-bypass-easy`, `obstacle-bypass-difficult`, and
2195
+ * `obstacle-bypass-impossible`: P1/P2 are the arrowhead tips and define the
2196
+ * opening; P3 is constrained to the perpendicular axis through
2197
+ * `midpoint(P1, P2)` and defines the rear of the symbol. Rear-line decoration
2198
+ * (plain, zigzag, barrier marks) is a generator concern, not a draw-rule one.
2199
+ */
2200
+ declare const point12DrawRule: ControlMeasureDrawRule;
2201
+ //#endregion
2202
+ //#region src/draw-rules/area7.d.ts
2203
+ /**
2204
+ * Area7 anchor draw rule for Attack By Fire.
2205
+ *
2206
+ * P2/P3 are the free back-line endpoints; P1 (slot index 0) is the arrowhead
2207
+ * tip, constrained to the perpendicular axis through `midpoint(P2, P3)`.
2208
+ */
2209
+ declare const attackByFireDrawRule: ControlMeasureDrawRule;
2210
+ //#endregion
2211
+ //#region src/draw-rules/line29.d.ts
2212
+ /**
2213
+ * Line29 anchor draw rule for Ambush.
2214
+ *
2215
+ * P2/P3 are the free back-line endpoints; P1 (slot index 0) is the arrowhead
2216
+ * tip, constrained to the perpendicular axis through `midpoint(P2, P3)`.
2217
+ */
2218
+ declare const ambushDrawRule: ControlMeasureDrawRule;
2219
+ //#endregion
2220
+ //#region src/draw-rules/line1.d.ts
2221
+ declare const line1DrawRule: ControlMeasureDrawRule;
2222
+ //#endregion
2223
+ //#region src/draw-rules/line10.d.ts
2224
+ /**
2225
+ * Line10 — PT1 is the arrow tip, PT2 is the rear, and derived PT3 selects
2226
+ * which side of the PT2 -> PT1 chord contains the 90-degree arc.
2227
+ */
2228
+ declare const turnDrawRule: ControlMeasureDrawRule;
2229
+ //#endregion
2230
+ //#region src/draw-rules/line23.d.ts
2231
+ /**
2232
+ * Line23 anchor draw rule for the Clear mission task.
2233
+ *
2234
+ * P1/P2 are the endpoints of the symbol's vertical line (its height); P3 is
2235
+ * constrained to the perpendicular axis through `midpoint(P1, P2)` and defines
2236
+ * the rear of the symbol (the shaft length). Geometrically identical to the
2237
+ * obstacle-bypass `Point12` rule, but kept as its own spec id to match the
2238
+ * doctrinal draw rule for Clear.
2239
+ */
2240
+ declare const line23DrawRule: ControlMeasureDrawRule;
2241
+ //#endregion
2242
+ //#region src/draw-rules/line24.d.ts
2243
+ /**
2244
+ * Line24 anchor draw rule for the Delay mission task.
2245
+ *
2246
+ * PT. 1 and PT. 2 are the free straight-line endpoints. PT. 3 is constrained to
2247
+ * the perpendicular axis through PT. 2, where its signed distance from PT. 2
2248
+ * defines the semicircular arc diameter and side. Unlike the sibling Line23
2249
+ * (Clear) rule, the third point must be placed explicitly (three user clicks),
2250
+ * with a two-point live preview before commit.
2251
+ */
2252
+ declare const line24DrawRule: ControlMeasureDrawRule;
2253
+ //#endregion
2254
+ //#region src/draw-rules/area8.d.ts
2255
+ declare const supportByFireDrawRule: ControlMeasureDrawRule;
2256
+ //#endregion
2257
+ //#region src/draw-rules/axis1.d.ts
2258
+ declare const axis1DrawRule: ControlMeasureDrawRule;
2259
+ //#endregion
2260
+ //#region src/draw-rules/rectangle.d.ts
2261
+ declare const rectangleDrawRule: ControlMeasureDrawRule;
2262
+ //#endregion
2263
+ //#region src/generators/cm14-maneuver-lines/ambush.d.ts
2264
+ /**
2265
+ * Configuration options for the Ambush tactical symbol.
2266
+ */
2267
+ interface AmbushOptions {
2268
+ /** Number of segments used to draw the quadratic curve (default: 30) */
2269
+ arcSegments?: number;
2270
+ /** Size of arrowhead relative to chord span (default: 0.15) */
2271
+ arrowheadLengthRatio?: number;
2272
+ /** Width of arrowhead wings relative to its length (default: 0.5) */
2273
+ arrowheadWidthRatio?: number;
2274
+ /** Length of parallel hatches relative to chord span (default: 0.15) */
2275
+ hatchLengthRatio?: number;
2276
+ /** Number of parallel hatches along the curve (default: 5) */
2277
+ hatchCount?: number;
2278
+ /** Depth of the curve toward PT 1 relative to chord span (default: 0.25) */
2279
+ curveDepthRatio?: number;
2280
+ }
2281
+ declare const DEFAULT_AMBUSH_OPTIONS: Required<AmbushOptions>;
2282
+ //#endregion
2283
+ //#region src/generators/cm15-maneuver-areas/searchArea.d.ts
2284
+ /**
2285
+ * Configuration options to tweak the tactical arrow's geometry.
2286
+ */
2287
+ interface TacticalArrowOptions {
2288
+ /** Ratio of arrowhead length to total leg length (default: 0.12) */
2289
+ arrowheadLengthRatio?: number;
2290
+ /** Width multiplier for the arrowhead wings (default: 0.5) */
2291
+ arrowheadWidthRatio?: number;
2292
+ /** Percentage along the leg where the zigzag begins, 0.0-1.0 (default: 0.55) */
2293
+ zigzagStart?: number;
2294
+ /** Percentage along the leg where the zigzag returns, 0.0-1.0 (default: 0.45) */
2295
+ zigzagEnd?: number;
2296
+ /** Perpendicular offset for the lightning "kink", relative to leg length (default: 0.07) */
2297
+ zigzagAmplitudeRatio?: number;
2298
+ }
2299
+ /**
2300
+ * Default options for the tactical arrow.
2301
+ */
2302
+ declare const DEFAULT_TACTICAL_ARROW_OPTIONS: Required<TacticalArrowOptions>;
2303
+ //#endregion
2304
+ export { getControlMeasureMetadata as $, ControlMeasureMetadata as $n, DEFAULT_GENERIC_CIRCLE_OPTIONS as $t, getMetersPerPixel as A, EncirclementOptions as An, DEFAULT_CANALIZE_OPTIONS as At, ControlMeasureSnapshot as B, GenericC2LineOptions as Bn, HandoverLineOptions as Bt, snapToMidpointPerpendicular as C, DEFAULT_LANDING_ZONE_OPTIONS as Cn, AntitankDitchOptions as Ct, BaselineFrameOrigin as D, AssemblyAreaOptions as Dn, ClearOptions as Dt, BaselineFrameOptions as E, JointTacticalActionAreaOptions as En, DelayOptions as Et, resolveStyleHints as F, DEFAULT_STRONG_POINT_OPTIONS as Fn, BlockMissionTaskOptions as Ft, cloneControlMeasure as G, LabelSizeOptions as Gn, AttackByFireOptions as Gt, StyleHints as H, EngineerWorkLineOptions as Hn, PhaseLineOptions as Ht, freezeOrientationOptions as I, StrongPointOptions as In, DEFAULT_BLOCK_MISSION_TASK_OPTIONS as It, CONTROL_MEASURE_IDS as J, unproject as Jn, SupportByFireOptions as Jt, isKind as K, Point2D as Kn, DEFAULT_ATTACK_BY_FIRE_OPTIONS as Kt, RenderOptions as L, BattlePositionOptions as Ln, BattleHandoverLineOptions as Lt, SimpleStyleProps as M, FinalProtectiveFireOptions as Mn, DEFAULT_BYPASS_OPTIONS as Mt, SimpleStyleRender as N, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS as Nn, BreachOptions as Nt, createBaselineFrame as O, DEFAULT_ASSEMBLY_AREA_OPTIONS as On, DEFAULT_CLEAR_OPTIONS as Ot, toSimpleStyle as P, PrincipalDirectionOfFireOptions as Pn, DEFAULT_BREACH_OPTIONS as Pt, OptionsByKind as Q, ControlMeasureGeometryType as Qn, DEFAULT_AIRBORNE_ATTACK_OPTIONS as Qt, renderControlMeasure as R, DEFAULT_BATTLE_POSITION_OPTIONS as Rn, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS as Rt, pointOnMidpointPerpendicularAxis as S, PickupZoneOptions as Sn, DEFAULT_ANTITANK_WALL_OPTIONS as St, BaselineFrameNormal as T, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS as Tn, DEFAULT_DELAY_OPTIONS as Tt, controlMeasureIdFromFeature as U, DEFAULT_LIGHT_LINE_OPTIONS as Un, DEFAULT_FLOT_OPTIONS as Ut, FeaturePartProps as V, DEFAULT_ENGINEER_WORK_LINE_OPTIONS as Vn, DEFAULT_PHASE_LINE_OPTIONS as Vt, ControlMeasure as W, LightLineOptions as Wn, FLOTOptions as Wt, ControlMeasureId as X, DEFAULT_BOUNDARY_OPTIONS as Xn, DEFAULT_ATTACK_HELICOPTER_OPTIONS as Xt, CONTROL_MEASURE_METADATA as Y, BoundaryOptions as Yn, AttackHelicopterOptions as Yt, ControlMeasureKind as Z, ControlMeasureGeometry as Zn, AirborneAttackOptions as Zt, blockDrawRule as _, calculateMetrics as _n, DEFAULT_FORTIFIED_AREA_OPTIONS as _t, rectangleDrawRule as a, DEFAULT_GENERIC_LINE_OPTIONS as an, TextAmplifierKey as ar, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS as at, createMidpointPerpendicularDrawRule as b, DEFAULT_AREA_OF_OPERATIONS_OPTIONS as bn, FortifiedLineOptions as bt, line24DrawRule as c, BlockArrowOptions as cn, normalizeTextAmplifiers as cr, ObstacleBypassEasyOptions as ct, line1DrawRule as d, ClassicArrowOptions as dn, DEFAULT_FIX_OPTIONS as dt, GenericCircleOptions as en, ParamDescriptor as er, getControlMeasureMetadataByValue as et, ambushDrawRule as f, DEFAULT_CLASSIC_ARROW_OPTIONS as fn, FixOptions as ft, disruptDrawRule as g, MainAttackOptions as gn, DEFAULT_BLOCK_OPTIONS as gt, centerRadiusDrawRule as h, DEFAULT_MAIN_ATTACK_OPTIONS as hn, BlockOptions as ht, DEFAULT_AMBUSH_OPTIONS as i, GenericPolygonOptions as in, TextAmplifierField as ir, ObstacleBypassImpossibleOptions as it, roundToFixed as j, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS as jn, BypassOptions as jt, EPSILON as k, DEFAULT_ENCIRCLEMENT_OPTIONS as kn, CanalizeOptions as kt, line23DrawRule as l, DEFAULT_BLOCK_ARROW_OPTIONS as ln, AnchorTransformEvent as lr, DEFAULT_TURN_OPTIONS as lt, point12DrawRule as m, SupportingAttackOptions as mn, DisruptOptions as mt, TacticalArrowOptions as n, GenericRectangleOptions as nn, CanonicalTextAmplifiers as nr, listControlMeasureMetadata as nt, axis1DrawRule as o, GenericLineOptions as on, TextAmplifiers as or, ObstacleBypassDifficultOptions as ot, attackByFireDrawRule as p, DEFAULT_SUPPORTING_ATTACK_OPTIONS as pn, DEFAULT_DISRUPT_OPTIONS as pt, ControlMeasureStyle as q, project as qn, DEFAULT_SUPPORT_BY_FIRE_OPTIONS as qt, AmbushOptions as r, DEFAULT_GENERIC_POLYGON_OPTIONS as rn, TEXT_AMPLIFIER_FIELDS as rr, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS as rt, supportByFireDrawRule as s, BlockArrowHeadStyle as sn, canonicalTextAmplifierKey as sr, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS as st, DEFAULT_TACTICAL_ARROW_OPTIONS as t, DEFAULT_GENERIC_RECTANGLE_OPTIONS as tn, TextAmplifierDescriptor as tr, getDefaultOptions as tt, turnDrawRule as u, ClassicArrowHeadStyle as un, ControlMeasureDrawRule as ur, TurnOptions as ut, MidpointPerpendicularDrawRuleOptions as v, computeInitialWidthPoint as vn, FortifiedAreaOptions as vt, BaselineFrame as w, LandingZoneOptions as wn, DEFAULT_ANTITANK_DITCH_OPTIONS as wt, getMidpointPerpendicularSignedDistance as x, DEFAULT_PICKUP_ZONE_OPTIONS as xn, AntitankWallOptions as xt, computeDefaultMidpointPerpendicularPoint as y, AreaOfOperationsOptions as yn, DEFAULT_FORTIFIED_LINE_OPTIONS as yt, ControlMeasureRender as z, DEFAULT_GENERIC_C2_LINE_OPTIONS as zn, DEFAULT_HANDOVER_LINE_OPTIONS as zt };