@orbat-mapper/control-measures 0.2.0-alpha.8 → 0.2.0

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