@orbat-mapper/control-measures 0.2.0-alpha.22 → 0.2.0-alpha.24

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.
@@ -205,7 +205,7 @@ declare function normalizeTextAmplifiers(input: TextAmplifiers | undefined): Can
205
205
  //#region src/metadata.d.ts
206
206
  type ControlMeasureGeometryType = Geometry["type"];
207
207
  type ControlMeasureGeometry = "point" | "line" | "area";
208
- declare const DRAW_RULE_IDS: readonly ["Area1", "Area7", "Area8", "Area11", "Area12", "Area15", "Area21", "Axis1", "Line1", "Line3", "Line9", "Line10", "Line23", "Line24", "Line26", "Line29", "Point12", "Rectangle"];
208
+ declare const DRAW_RULE_IDS: readonly ["Area1", "Area7", "Area8", "Area11", "Area12", "Area15", "Area21", "Axis1", "Line1", "Line3", "Line9", "Line10", "Line23", "Line24", "Line26", "Line29", "Point1", "Point12", "Rectangle"];
209
209
  type DrawRuleId = (typeof DRAW_RULE_IDS)[number];
210
210
  interface BaseParamDescriptor {
211
211
  key: string;
@@ -245,6 +245,12 @@ interface TextParamDescriptor extends BaseParamDescriptor {
245
245
  * amplifier field.
246
246
  */
247
247
  field?: TextAmplifierField;
248
+ /**
249
+ * Whether the value may contain explicit line breaks that a metadata-driven
250
+ * editor should let the user enter directly (a multi-row textarea rather
251
+ * than a single-line input), e.g. the generic Text measure's `text` option.
252
+ */
253
+ multiline?: boolean;
248
254
  }
249
255
  type ParamDescriptor = NumberParamDescriptor | BooleanParamDescriptor | ColorParamDescriptor | TextParamDescriptor | EnumParamDescriptor;
250
256
  /** Editor-facing description of one text amplifier field a measure accepts. */
@@ -359,6 +365,30 @@ interface ControlMeasureDefinition<Id extends string, G extends ControlMeasureGe
359
365
  * against the new orientation. See ADR-0023.
360
366
  */
361
367
  freezeOrientation?: (controlPoints: Position[], options: NonNullable<Parameters<G>[1]>) => Partial<NonNullable<Parameters<G>[1]>> | undefined;
368
+ /**
369
+ * Folds a box transform gesture's screen-space delta into option values for a
370
+ * graphic that persists orientation and/or size as options rather than in its
371
+ * geometry — single-point graphics (e.g. Text) have no geometry to encode
372
+ * them. Returns an options patch to merge onto the working options, or
373
+ * `undefined` when the kind carries no such option (or the delta is inert).
374
+ * Edit hosts call this at a rotate/scale gesture's commit, alongside the rigid
375
+ * transform of the control points, so the persisted rotation/size follow the
376
+ * box. The measure owns the unit/sign conversion (e.g. Text stores degrees
377
+ * clockwise-on-screen while the delta is radians). See ADR-0017/0023.
378
+ */
379
+ transformOptions?: (options: NonNullable<Parameters<G>[1]>, delta: BoxTransformDelta) => Partial<NonNullable<Parameters<G>[1]>> | undefined;
380
+ }
381
+ /**
382
+ * A box transform gesture's screen-space delta, folded into orientation- and
383
+ * size-carrying options by {@link ControlMeasureDefinition.transformOptions}.
384
+ * The transform box (ADR-0017) is the source: `scale` is the uniform corner
385
+ * -scale factor (`1` = no scaling), `rotationRadians` the rotate-grip delta
386
+ * (positive = clockwise on screen, matching the box angle convention; `0` = no
387
+ * rotation). A body translate reports neither (`{ scale: 1, rotationRadians: 0 }`).
388
+ */
389
+ interface BoxTransformDelta {
390
+ scale: number;
391
+ rotationRadians: number;
362
392
  }
363
393
  /**
364
394
  * A measure's representative preview input. Shared between the typed
@@ -508,10 +538,11 @@ declare const unproject: (x: number, y: number) => Position;
508
538
  /**
509
539
  * Great-circle distance in meters between two lon/lat positions (haversine on
510
540
  * the WGS84 mean-radius sphere). Accurate at all scales — use this for
511
- * measurement readouts (segment lengths, radii). Note the deliberate
512
- * asymmetry with generation: generators build geometry in projected Web
513
- * Mercator meters, so at high latitudes a graphic's Mercator dimensions
514
- * exceed the true ground distance this returns.
541
+ * measurement readouts (segment lengths, radii). Most generators still build
542
+ * geometry in projected Web Mercator meters, so at high latitudes a graphic's
543
+ * Mercator dimensions can exceed the true ground distance this returns; the
544
+ * generic circle is the exception — it samples at constant geodesic radius,
545
+ * so its ring and this readout agree exactly.
515
546
  */
516
547
  declare const haversineDistance: (a: Position, b: Position) => number;
517
548
  //#endregion
@@ -967,6 +998,20 @@ interface FeaturePartProps {
967
998
  * their configured clamp band.
968
999
  */
969
1000
  textSizeMeters?: number;
1001
+ /**
1002
+ * Multi-line justification within the text block (Text's `textAlign`
1003
+ * option); the block itself stays centered on the anchor regardless of this
1004
+ * value — unrelated to the block-shifting `textAnchor`.
1005
+ */
1006
+ textJustify?: "left" | "center" | "right";
1007
+ /** Closed typography preset for a text label (Text's `textStyle` option). */
1008
+ textStyle?: "regular" | "italic" | "light" | "caps";
1009
+ /**
1010
+ * Hide threshold in CSS pixels: when the derived on-screen text size exceeds
1011
+ * this, adapters render nothing for the label instead of clamping (ADR-0037)
1012
+ * and skip the default 8-24px ground clamp band.
1013
+ */
1014
+ textMaxSizePixels?: number;
970
1015
  }
971
1016
  /**
972
1017
  * Output of `renderControlMeasure`. A GeoJSON `FeatureCollection` whose
@@ -1572,6 +1617,49 @@ declare function createGenericCircle(coordinates: Position[], options?: GenericC
1572
1617
  fill: boolean;
1573
1618
  }>;
1574
1619
  //#endregion
1620
+ //#region src/generators/cm99-generic-graphics/text.d.ts
1621
+ /** Configuration options for the generic Text control measure. */
1622
+ interface GenericTextOptions {
1623
+ /** Plain text; explicit `\n` breaks lines — never auto-wraps. @default "Text" */
1624
+ text?: string;
1625
+ /**
1626
+ * Placement of the text block relative to the anchor point, and the
1627
+ * justification of its lines. `left` puts the anchor at the block's left edge
1628
+ * (text extends rightward, lines left-justified); `right` puts the anchor at
1629
+ * the right edge (text extends leftward, lines right-justified); `center`
1630
+ * centers the block on the anchor (lines centered). Maps onto the existing
1631
+ * block-shifting `textAnchor` prop (`left` → `start`, `right` → `end`, `center`
1632
+ * → none) plus the `textJustify` prop; rotation always pivots at the anchor.
1633
+ * @default "center"
1634
+ */
1635
+ textAlign?: "left" | "center" | "right";
1636
+ /** Closed typography preset. `caps` uppercases `regular`; `light` is weight 300. @default "regular" */
1637
+ textStyle?: "regular" | "italic" | "light" | "caps";
1638
+ /** Clockwise rotation in degrees on screen. @default 0 */
1639
+ rotation?: number;
1640
+ /**
1641
+ * Text height (cap height) in projected meters — ground-anchored
1642
+ * (ADR-0020). Ignored whenever `sizePixels` is present.
1643
+ */
1644
+ sizeMeters?: number;
1645
+ /**
1646
+ * Text height in CSS pixels — screen-anchored (ADR-0020). A fresh draw is
1647
+ * authored in pixels and bakes to `sizeMeters` on commit.
1648
+ * @default 24
1649
+ */
1650
+ sizePixels?: number;
1651
+ /**
1652
+ * Hide threshold in CSS pixels: once the ground-derived on-screen size
1653
+ * exceeds this, adapters hide the text entirely instead of clamping it
1654
+ * (ADR-0037); there is no minimum, so the text just keeps shrinking on
1655
+ * zoom-out.
1656
+ * @default 200
1657
+ */
1658
+ maxSizePixels?: number;
1659
+ }
1660
+ declare const DEFAULT_GENERIC_TEXT_OPTIONS: GenericTextOptions;
1661
+ declare function createGenericText(coordinates: Position[], options?: GenericTextOptions): FeatureCollection<Point, Record<string, unknown>>;
1662
+ //#endregion
1575
1663
  //#region src/generators/cm15-maneuver-areas/airborneAttack.d.ts
1576
1664
  type AirborneAttackOptions = AttackOptions;
1577
1665
  declare const DEFAULT_AIRBORNE_ATTACK_OPTIONS: Required<AirborneAttackOptions>;
@@ -2391,6 +2479,7 @@ declare const DEFINITIONS: {
2391
2479
  polygon: ControlMeasureDefinition<"polygon", typeof createGenericPolygon>;
2392
2480
  rectangle: ControlMeasureDefinition<"rectangle", typeof createGenericRectangle>;
2393
2481
  circle: ControlMeasureDefinition<"circle", typeof createGenericCircle>;
2482
+ text: ControlMeasureDefinition<"text", typeof createGenericText>;
2394
2483
  "airborne-attack": ControlMeasureDefinition<"airborne-attack", typeof createAirborneAttack>;
2395
2484
  "attack-helicopter": ControlMeasureDefinition<"attack-helicopter", typeof createAttackHelicopter>;
2396
2485
  "support-by-fire": ControlMeasureDefinition<"support-by-fire", typeof createSupportByFire>;
@@ -2507,6 +2596,16 @@ declare function renderControlMeasure<K extends ControlMeasureKind>(cm: ControlM
2507
2596
  * freeze. Edit hosts call this when a rotate gesture starts (ADR-0023).
2508
2597
  */
2509
2598
  declare function freezeOrientationOptions<K extends ControlMeasureKind>(kind: K, controlPoints: Position[], options: OptionsByKind[K] | undefined): Partial<OptionsByKind[K]> | undefined;
2599
+ /**
2600
+ * Dispatches to a measure kind's `transformOptions` hook (see
2601
+ * {@link import("./define").ControlMeasureDefinition.transformOptions}), folding
2602
+ * a box transform gesture's `delta` (screen-space scale/rotation) into option
2603
+ * values for a graphic that persists orientation/size as options rather than in
2604
+ * geometry. Returns an options patch to merge, or `undefined` when the kind
2605
+ * declares no hook (or the hook finds nothing to fold). Edit hosts call this at
2606
+ * a rotate/scale gesture's commit (ADR-0017).
2607
+ */
2608
+ declare function applyBoxTransformOptions<K extends ControlMeasureKind>(kind: K, options: OptionsByKind[K] | undefined, delta: BoxTransformDelta): Partial<OptionsByKind[K]> | undefined;
2510
2609
  //#endregion
2511
2610
  //#region src/styleResolver.d.ts
2512
2611
  /**
@@ -2763,4 +2862,4 @@ interface AmbushOptions {
2763
2862
  }
2764
2863
  declare const DEFAULT_AMBUSH_OPTIONS: Required<AmbushOptions>;
2765
2864
  //#endregion
2766
- export { ObstacleBypassDifficultOptions as $, StrongPointOptions as $n, SupportByFireOptions as $t, roundToFixed as A, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS as An, TextAmplifiers as Ar, DEFAULT_TACTICAL_ARROW_OPTIONS as At, isKind as B, ControlMeasureRender as Bn, BlockMissionTaskOptions as Bt, BaselineFrame as C, computeInitialWidthPoint as Cn, AmplifierPlacements as Cr, ScreenOptions as Ct, createBaselineFrame as D, PickupZoneOptions as Dn, TEXT_AMPLIFIER_FIELDS as Dr, DelayOptions as Dt, BaselineFrameOrigin as E, DEFAULT_PICKUP_ZONE_OPTIONS as En, LabelPlacementOverride as Er, DEFAULT_DELAY_OPTIONS as Et, freezeOrientationOptions as F, DEFAULT_AREA_DEFENSE_OPTIONS as Fn, ControlMeasureDrawRule as Fr, DEFAULT_CANALIZE_OPTIONS as Ft, OptionsByKind as G, PrincipalDirectionOfFireOptions as Gn, HandoverLineOptions as Gt, CONTROL_MEASURE_METADATA as H, StyleHints as Hn, BattleHandoverLineOptions as Ht, RenderOptions as I, DEFAULT_ENCIRCLEMENT_OPTIONS as In, BypassOptions as It, getDefaultOptions as J, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS as Jn, DEFAULT_FLOT_OPTIONS as Jt, getControlMeasureMetadata as K, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS as Kn, DEFAULT_PHASE_LINE_OPTIONS as Kt, renderControlMeasure as L, EncirclementOptions as Ln, DEFAULT_BYPASS_OPTIONS as Lt, SimpleStyleRender as M, AssemblyAreaOptions as Mn, normalizeTextAmplifiers as Mr, ClearOptions as Mt, toSimpleStyle as N, DEFAULT_ASSEMBLY_AREA_OPTIONS as Nn, resolveAmplifierPlacement as Nr, DEFAULT_CLEAR_OPTIONS as Nt, EPSILON as O, DEFAULT_LANDING_ZONE_OPTIONS as On, TextAmplifierField as Or, CoverOptions as Ot, resolveStyleHints as P, AreaDefenseOptions as Pn, AnchorTransformEvent as Pr, CanalizeOptions as Pt, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS as Q, DEFAULT_STRONG_POINT_OPTIONS as Qn, DEFAULT_SUPPORT_BY_FIRE_OPTIONS as Qt, ControlMeasure as R, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS as Rn, BreachOptions as Rt, snapToMidpointPerpendicular as S, calculateMetrics as Sn, AmplifierPlacement as Sr, DEFAULT_SCREEN_OPTIONS as St, BaselineFrameOptions as T, DEFAULT_AREA_OF_OPERATIONS_OPTIONS as Tn, GeneratedLabelKey as Tr, GuardOptions as Tt, ControlMeasureId as U, controlMeasureIdFromFeature as Un, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS as Ut, CONTROL_MEASURE_IDS as V, FeaturePartProps as Vn, DEFAULT_BLOCK_MISSION_TASK_OPTIONS as Vt, ControlMeasureKind as W, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS as Wn, DEFAULT_HANDOVER_LINE_OPTIONS as Wt, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS as X, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS as Xn, AttackByFireOptions as Xt, listControlMeasureMetadata as Y, DirectionOfMainAttackOptions as Yn, FLOTOptions as Yt, ObstacleBypassImpossibleOptions as Z, DirectionOfAttackAviationOptions as Zn, DEFAULT_ATTACK_BY_FIRE_OPTIONS as Zt, MidpointPerpendicularDrawRuleOptions as _, DEFAULT_CLASSIC_ARROW_OPTIONS as _n, ControlMeasureGeometry as _r, FortifiedLineOptions as _t, supportByFireDrawRule as a, GenericCircleOptions as an, GenericC2LineOptions as ar, FixOptions as at, getMidpointPerpendicularSignedDistance as b, DEFAULT_MAIN_ATTACK_OPTIONS as bn, ParamDescriptor as br, AntitankDitchOptions as bt, line23DrawRule as c, DEFAULT_GENERIC_POLYGON_OPTIONS as cn, DEFAULT_LIGHT_LINE_OPTIONS as cr, BlockOptions as ct, ambushDrawRule as d, GenericLineOptions as dn, Point2D as dr, TurningMovementOptions as dt, AttackHelicopterOptions as en, BattlePositionOptions as er, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS as et, attackByFireDrawRule as f, BlockArrowHeadStyle as fn, haversineDistance as fr, DEFAULT_FRONTAL_ATTACK_OPTIONS as ft, blockDrawRule as g, ClassicArrowOptions as gn, DEFAULT_BOUNDARY_OPTIONS as gr, DEFAULT_FORTIFIED_LINE_OPTIONS as gt, disruptDrawRule as h, ClassicArrowHeadStyle as hn, BoundaryOptions as hr, FortifiedAreaOptions as ht, axis1DrawRule as i, DEFAULT_GENERIC_CIRCLE_OPTIONS as in, DEFAULT_GENERIC_C2_LINE_OPTIONS as ir, DEFAULT_FIX_OPTIONS as it, SimpleStyleProps as j, JointTacticalActionAreaOptions as jn, canonicalTextAmplifierKey as jr, TacticalArrowOptions as jt, getMetersPerPixel as k, LandingZoneOptions as kn, TextAmplifierKey as kr, DEFAULT_COVER_OPTIONS as kt, turnDrawRule as l, GenericPolygonOptions as ln, LightLineOptions as lr, DEFAULT_BLOCK_OPTIONS as lt, centerRadiusDrawRule as m, DEFAULT_BLOCK_ARROW_OPTIONS as mn, unproject as mr, DEFAULT_FORTIFIED_AREA_OPTIONS as mt, DEFAULT_AMBUSH_OPTIONS as n, AirborneAttackOptions as nn, ControlMeasureStyle as nr, DEFAULT_TURN_OPTIONS as nt, line26DrawRule as o, DEFAULT_GENERIC_RECTANGLE_OPTIONS as on, DEFAULT_ENGINEER_WORK_LINE_OPTIONS as or, DEFAULT_DISRUPT_OPTIONS as ot, point12DrawRule as p, BlockArrowOptions as pn, project as pr, FrontalAttackOptions as pt, getControlMeasureMetadataByValue as q, DirectionOfSupportingAttackOptions as qn, PhaseLineOptions as qt, rectangleDrawRule as r, DEFAULT_AIRBORNE_ATTACK_OPTIONS as rn, FillPattern as rr, TurnOptions as rt, line24DrawRule as s, GenericRectangleOptions as sn, EngineerWorkLineOptions as sr, DisruptOptions as st, AmbushOptions as t, DEFAULT_ATTACK_HELICOPTER_OPTIONS as tn, DEFAULT_BATTLE_POSITION_OPTIONS as tr, ObstacleBypassEasyOptions as tt, line1DrawRule as u, DEFAULT_GENERIC_LINE_OPTIONS as un, LabelSizeOptions as ur, DEFAULT_TURNING_MOVEMENT_OPTIONS as ut, computeDefaultMidpointPerpendicularPoint as v, DEFAULT_SUPPORTING_ATTACK_OPTIONS as vn, ControlMeasureGeometryType as vr, AntitankWallOptions as vt, BaselineFrameNormal as w, AreaOfOperationsOptions as wn, CanonicalTextAmplifiers as wr, DEFAULT_GUARD_OPTIONS as wt, pointOnMidpointPerpendicularAxis as x, MainAttackOptions as xn, TextAmplifierDescriptor as xr, DEFAULT_ANTITANK_DITCH_OPTIONS as xt, createMidpointPerpendicularDrawRule as y, SupportingAttackOptions as yn, ControlMeasureMetadata as yr, DEFAULT_ANTITANK_WALL_OPTIONS as yt, cloneControlMeasure as z, FinalProtectiveFireOptions as zn, DEFAULT_BREACH_OPTIONS as zt };
2865
+ export { DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS as $, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS as $n, DEFAULT_SUPPORT_BY_FIRE_OPTIONS as $t, roundToFixed as A, PickupZoneOptions as An, LabelPlacementOverride as Ar, DEFAULT_COVER_OPTIONS as At, cloneControlMeasure as B, EncirclementOptions as Bn, DEFAULT_BREACH_OPTIONS as Bt, BaselineFrame as C, DEFAULT_MAIN_ATTACK_OPTIONS as Cn, ControlMeasureMetadata as Cr, DEFAULT_SCREEN_OPTIONS as Ct, createBaselineFrame as D, AreaOfOperationsOptions as Dn, AmplifierPlacements as Dr, DEFAULT_DELAY_OPTIONS as Dt, BaselineFrameOrigin as E, computeInitialWidthPoint as En, AmplifierPlacement as Er, GuardOptions as Et, applyBoxTransformOptions as F, AssemblyAreaOptions as Fn, canonicalTextAmplifierKey as Fr, CanalizeOptions as Ft, ControlMeasureKind as G, StyleHints as Gn, DEFAULT_HANDOVER_LINE_OPTIONS as Gt, CONTROL_MEASURE_IDS as H, FinalProtectiveFireOptions as Hn, DEFAULT_BLOCK_MISSION_TASK_OPTIONS as Ht, freezeOrientationOptions as I, DEFAULT_ASSEMBLY_AREA_OPTIONS as In, normalizeTextAmplifiers as Ir, DEFAULT_CANALIZE_OPTIONS as It, getControlMeasureMetadataByValue as J, PrincipalDirectionOfFireOptions as Jn, PhaseLineOptions as Jt, OptionsByKind as K, controlMeasureIdFromFeature as Kn, HandoverLineOptions as Kt, RenderOptions as L, AreaDefenseOptions as Ln, resolveAmplifierPlacement as Lr, BypassOptions as Lt, SimpleStyleRender as M, LandingZoneOptions as Mn, TextAmplifierField as Mr, TacticalArrowOptions as Mt, toSimpleStyle as N, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS as Nn, TextAmplifierKey as Nr, ClearOptions as Nt, EPSILON as O, DEFAULT_AREA_OF_OPERATIONS_OPTIONS as On, CanonicalTextAmplifiers as Or, DelayOptions as Ot, resolveStyleHints as P, JointTacticalActionAreaOptions as Pn, TextAmplifiers as Pr, DEFAULT_CLEAR_OPTIONS as Pt, ObstacleBypassImpossibleOptions as Q, DirectionOfMainAttackOptions as Qn, DEFAULT_ATTACK_BY_FIRE_OPTIONS as Qt, renderControlMeasure as R, DEFAULT_AREA_DEFENSE_OPTIONS as Rn, AnchorTransformEvent as Rr, DEFAULT_BYPASS_OPTIONS as Rt, snapToMidpointPerpendicular as S, SupportingAttackOptions as Sn, ControlMeasureGeometryType as Sr, DEFAULT_ANTITANK_DITCH_OPTIONS as St, BaselineFrameOptions as T, calculateMetrics as Tn, TextAmplifierDescriptor as Tr, DEFAULT_GUARD_OPTIONS as Tt, CONTROL_MEASURE_METADATA as U, ControlMeasureRender as Un, BattleHandoverLineOptions as Ut, isKind as V, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS as Vn, BlockMissionTaskOptions as Vt, ControlMeasureId as W, FeaturePartProps as Wn, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS as Wt, listControlMeasureMetadata as X, DirectionOfSupportingAttackOptions as Xn, FLOTOptions as Xt, getDefaultOptions as Y, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS as Yn, DEFAULT_FLOT_OPTIONS as Yt, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS as Z, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS as Zn, AttackByFireOptions as Zt, MidpointPerpendicularDrawRuleOptions as _, DEFAULT_BLOCK_ARROW_OPTIONS as _n, unproject as _r, DEFAULT_FORTIFIED_LINE_OPTIONS as _t, supportByFireDrawRule as a, DEFAULT_GENERIC_TEXT_OPTIONS as an, ControlMeasureStyle as ar, DEFAULT_FIX_OPTIONS as at, getMidpointPerpendicularSignedDistance as b, DEFAULT_CLASSIC_ARROW_OPTIONS as bn, BoxTransformDelta as br, DEFAULT_ANTITANK_WALL_OPTIONS as bt, line23DrawRule as c, GenericCircleOptions as cn, GenericC2LineOptions as cr, DisruptOptions as ct, ambushDrawRule as d, DEFAULT_GENERIC_POLYGON_OPTIONS as dn, DEFAULT_LIGHT_LINE_OPTIONS as dr, DEFAULT_TURNING_MOVEMENT_OPTIONS as dt, SupportByFireOptions as en, DirectionOfAttackAviationOptions as er, ObstacleBypassDifficultOptions as et, attackByFireDrawRule as f, GenericPolygonOptions as fn, LightLineOptions as fr, TurningMovementOptions as ft, blockDrawRule as g, BlockArrowOptions as gn, project as gr, FortifiedAreaOptions as gt, disruptDrawRule as h, BlockArrowHeadStyle as hn, haversineDistance as hr, DEFAULT_FORTIFIED_AREA_OPTIONS as ht, axis1DrawRule as i, DEFAULT_AIRBORNE_ATTACK_OPTIONS as in, DEFAULT_BATTLE_POSITION_OPTIONS as ir, TurnOptions as it, SimpleStyleProps as j, DEFAULT_LANDING_ZONE_OPTIONS as jn, TEXT_AMPLIFIER_FIELDS as jr, DEFAULT_TACTICAL_ARROW_OPTIONS as jt, getMetersPerPixel as k, DEFAULT_PICKUP_ZONE_OPTIONS as kn, GeneratedLabelKey as kr, CoverOptions as kt, turnDrawRule as l, DEFAULT_GENERIC_RECTANGLE_OPTIONS as ln, DEFAULT_ENGINEER_WORK_LINE_OPTIONS as lr, BlockOptions as lt, centerRadiusDrawRule as m, GenericLineOptions as mn, Point2D as mr, FrontalAttackOptions as mt, DEFAULT_AMBUSH_OPTIONS as n, DEFAULT_ATTACK_HELICOPTER_OPTIONS as nn, StrongPointOptions as nr, ObstacleBypassEasyOptions as nt, line26DrawRule as o, GenericTextOptions as on, FillPattern as or, FixOptions as ot, point12DrawRule as p, DEFAULT_GENERIC_LINE_OPTIONS as pn, LabelSizeOptions as pr, DEFAULT_FRONTAL_ATTACK_OPTIONS as pt, getControlMeasureMetadata as q, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS as qn, DEFAULT_PHASE_LINE_OPTIONS as qt, rectangleDrawRule as r, AirborneAttackOptions as rn, BattlePositionOptions as rr, DEFAULT_TURN_OPTIONS as rt, line24DrawRule as s, DEFAULT_GENERIC_CIRCLE_OPTIONS as sn, DEFAULT_GENERIC_C2_LINE_OPTIONS as sr, DEFAULT_DISRUPT_OPTIONS as st, AmbushOptions as t, AttackHelicopterOptions as tn, DEFAULT_STRONG_POINT_OPTIONS as tr, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS as tt, line1DrawRule as u, GenericRectangleOptions as un, EngineerWorkLineOptions as ur, DEFAULT_BLOCK_OPTIONS as ut, computeDefaultMidpointPerpendicularPoint as v, ClassicArrowHeadStyle as vn, BoundaryOptions as vr, FortifiedLineOptions as vt, BaselineFrameNormal as w, MainAttackOptions as wn, ParamDescriptor as wr, ScreenOptions as wt, pointOnMidpointPerpendicularAxis as x, DEFAULT_SUPPORTING_ATTACK_OPTIONS as xn, ControlMeasureGeometry as xr, AntitankDitchOptions as xt, createMidpointPerpendicularDrawRule as y, ClassicArrowOptions as yn, DEFAULT_BOUNDARY_OPTIONS as yr, AntitankWallOptions as yt, ControlMeasure as z, DEFAULT_ENCIRCLEMENT_OPTIONS as zn, ControlMeasureDrawRule as zr, BreachOptions as zt };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as ObstacleBypassDifficultOptions, $n as StrongPointOptions, $t as SupportByFireOptions, A as roundToFixed, An as DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, Ar as TextAmplifiers, At as DEFAULT_TACTICAL_ARROW_OPTIONS, B as isKind, Bn as ControlMeasureRender, Bt as BlockMissionTaskOptions, C as BaselineFrame, Cn as computeInitialWidthPoint, Cr as AmplifierPlacements, Ct as ScreenOptions, D as createBaselineFrame, Dn as PickupZoneOptions, Dr as TEXT_AMPLIFIER_FIELDS, Dt as DelayOptions, E as BaselineFrameOrigin, En as DEFAULT_PICKUP_ZONE_OPTIONS, Er as LabelPlacementOverride, Et as DEFAULT_DELAY_OPTIONS, F as freezeOrientationOptions, Fn as DEFAULT_AREA_DEFENSE_OPTIONS, Fr as ControlMeasureDrawRule, Ft as DEFAULT_CANALIZE_OPTIONS, G as OptionsByKind, Gn as PrincipalDirectionOfFireOptions, Gt as HandoverLineOptions, H as CONTROL_MEASURE_METADATA, Hn as StyleHints, Ht as BattleHandoverLineOptions, I as RenderOptions, In as DEFAULT_ENCIRCLEMENT_OPTIONS, It as BypassOptions, J as getDefaultOptions, Jn as DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, Jt as DEFAULT_FLOT_OPTIONS, K as getControlMeasureMetadata, Kn as DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, Kt as DEFAULT_PHASE_LINE_OPTIONS, L as renderControlMeasure, Ln as EncirclementOptions, Lt as DEFAULT_BYPASS_OPTIONS, M as SimpleStyleRender, Mn as AssemblyAreaOptions, Mr as normalizeTextAmplifiers, Mt as ClearOptions, N as toSimpleStyle, Nn as DEFAULT_ASSEMBLY_AREA_OPTIONS, Nr as resolveAmplifierPlacement, Nt as DEFAULT_CLEAR_OPTIONS, O as EPSILON, On as DEFAULT_LANDING_ZONE_OPTIONS, Or as TextAmplifierField, Ot as CoverOptions, P as resolveStyleHints, Pn as AreaDefenseOptions, Pr as AnchorTransformEvent, Pt as CanalizeOptions, Q as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, Qn as DEFAULT_STRONG_POINT_OPTIONS, Qt as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, R as ControlMeasure, Rn as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, Rt as BreachOptions, S as snapToMidpointPerpendicular, Sn as calculateMetrics, Sr as AmplifierPlacement, St as DEFAULT_SCREEN_OPTIONS, T as BaselineFrameOptions, Tn as DEFAULT_AREA_OF_OPERATIONS_OPTIONS, Tr as GeneratedLabelKey, Tt as GuardOptions, U as ControlMeasureId, Un as controlMeasureIdFromFeature, Ut as DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, V as CONTROL_MEASURE_IDS, Vn as FeaturePartProps, Vt as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, W as ControlMeasureKind, Wn as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, Wt as DEFAULT_HANDOVER_LINE_OPTIONS, X as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, Xn as DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, Xt as AttackByFireOptions, Y as listControlMeasureMetadata, Yn as DirectionOfMainAttackOptions, Yt as FLOTOptions, Z as ObstacleBypassImpossibleOptions, Zn as DirectionOfAttackAviationOptions, Zt as DEFAULT_ATTACK_BY_FIRE_OPTIONS, _ as MidpointPerpendicularDrawRuleOptions, _n as DEFAULT_CLASSIC_ARROW_OPTIONS, _r as ControlMeasureGeometry, _t as FortifiedLineOptions, a as supportByFireDrawRule, an as GenericCircleOptions, ar as GenericC2LineOptions, at as FixOptions, b as getMidpointPerpendicularSignedDistance, bn as DEFAULT_MAIN_ATTACK_OPTIONS, br as ParamDescriptor, bt as AntitankDitchOptions, c as line23DrawRule, cn as DEFAULT_GENERIC_POLYGON_OPTIONS, cr as DEFAULT_LIGHT_LINE_OPTIONS, ct as BlockOptions, d as ambushDrawRule, dn as GenericLineOptions, dr as Point2D, dt as TurningMovementOptions, en as AttackHelicopterOptions, er as BattlePositionOptions, et as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, f as attackByFireDrawRule, fn as BlockArrowHeadStyle, fr as haversineDistance, ft as DEFAULT_FRONTAL_ATTACK_OPTIONS, g as blockDrawRule, gn as ClassicArrowOptions, gr as DEFAULT_BOUNDARY_OPTIONS, gt as DEFAULT_FORTIFIED_LINE_OPTIONS, h as disruptDrawRule, hn as ClassicArrowHeadStyle, hr as BoundaryOptions, ht as FortifiedAreaOptions, i as axis1DrawRule, in as DEFAULT_GENERIC_CIRCLE_OPTIONS, ir as DEFAULT_GENERIC_C2_LINE_OPTIONS, it as DEFAULT_FIX_OPTIONS, j as SimpleStyleProps, jn as JointTacticalActionAreaOptions, jr as canonicalTextAmplifierKey, jt as TacticalArrowOptions, k as getMetersPerPixel, kn as LandingZoneOptions, kr as TextAmplifierKey, kt as DEFAULT_COVER_OPTIONS, l as turnDrawRule, ln as GenericPolygonOptions, lr as LightLineOptions, lt as DEFAULT_BLOCK_OPTIONS, m as centerRadiusDrawRule, mn as DEFAULT_BLOCK_ARROW_OPTIONS, mr as unproject, mt as DEFAULT_FORTIFIED_AREA_OPTIONS, n as DEFAULT_AMBUSH_OPTIONS, nn as AirborneAttackOptions, nr as ControlMeasureStyle, nt as DEFAULT_TURN_OPTIONS, o as line26DrawRule, on as DEFAULT_GENERIC_RECTANGLE_OPTIONS, or as DEFAULT_ENGINEER_WORK_LINE_OPTIONS, ot as DEFAULT_DISRUPT_OPTIONS, p as point12DrawRule, pn as BlockArrowOptions, pr as project, pt as FrontalAttackOptions, q as getControlMeasureMetadataByValue, qn as DirectionOfSupportingAttackOptions, qt as PhaseLineOptions, r as rectangleDrawRule, rn as DEFAULT_AIRBORNE_ATTACK_OPTIONS, rr as FillPattern, rt as TurnOptions, s as line24DrawRule, sn as GenericRectangleOptions, sr as EngineerWorkLineOptions, st as DisruptOptions, t as AmbushOptions, tn as DEFAULT_ATTACK_HELICOPTER_OPTIONS, tr as DEFAULT_BATTLE_POSITION_OPTIONS, tt as ObstacleBypassEasyOptions, u as line1DrawRule, un as DEFAULT_GENERIC_LINE_OPTIONS, ur as LabelSizeOptions, ut as DEFAULT_TURNING_MOVEMENT_OPTIONS, v as computeDefaultMidpointPerpendicularPoint, vn as DEFAULT_SUPPORTING_ATTACK_OPTIONS, vr as ControlMeasureGeometryType, vt as AntitankWallOptions, w as BaselineFrameNormal, wn as AreaOfOperationsOptions, wr as CanonicalTextAmplifiers, wt as DEFAULT_GUARD_OPTIONS, x as pointOnMidpointPerpendicularAxis, xn as MainAttackOptions, xr as TextAmplifierDescriptor, xt as DEFAULT_ANTITANK_DITCH_OPTIONS, y as createMidpointPerpendicularDrawRule, yn as SupportingAttackOptions, yr as ControlMeasureMetadata, yt as DEFAULT_ANTITANK_WALL_OPTIONS, z as cloneControlMeasure, zn as FinalProtectiveFireOptions, zt as DEFAULT_BREACH_OPTIONS } from "./index-BTViqLbA.mjs";
2
- export { type AirborneAttackOptions, type AmbushOptions, type AmplifierPlacement, type AmplifierPlacements, type AnchorTransformEvent, type AntitankDitchOptions, type AntitankWallOptions, type AreaDefenseOptions, type AreaOfOperationsOptions, type AssemblyAreaOptions, type AttackByFireOptions, type AttackHelicopterOptions, type BaselineFrame, type BaselineFrameNormal, type BaselineFrameOptions, type BaselineFrameOrigin, type BattleHandoverLineOptions, type BattlePositionOptions, type BlockArrowHeadStyle, type BlockArrowOptions, type BlockMissionTaskOptions, type BlockOptions, type BoundaryOptions, type BreachOptions, type BypassOptions, CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, type CanalizeOptions, type CanonicalTextAmplifiers, type ClassicArrowHeadStyle, type ClassicArrowOptions, type ClearOptions, type ControlMeasure, type ControlMeasureDrawRule, type ControlMeasureGeometry, type ControlMeasureGeometryType, type ControlMeasureId, type ControlMeasureKind, type ControlMeasureMetadata, type ControlMeasureRender, type ControlMeasureStyle, type CoverOptions, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_AREA_DEFENSE_OPTIONS, DEFAULT_AREA_OF_OPERATIONS_OPTIONS, DEFAULT_ASSEMBLY_AREA_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_OPTIONS, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, DEFAULT_BATTLE_POSITION_OPTIONS, DEFAULT_BLOCK_ARROW_OPTIONS, DEFAULT_BLOCK_MISSION_TASK_OPTIONS, DEFAULT_BLOCK_OPTIONS, DEFAULT_BOUNDARY_OPTIONS, DEFAULT_BREACH_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLASSIC_ARROW_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_COVER_OPTIONS, DEFAULT_DELAY_OPTIONS, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_ENGINEER_WORK_LINE_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_FRONTAL_ATTACK_OPTIONS, DEFAULT_GENERIC_C2_LINE_OPTIONS, DEFAULT_GENERIC_CIRCLE_OPTIONS, DEFAULT_GENERIC_LINE_OPTIONS, DEFAULT_GENERIC_POLYGON_OPTIONS, DEFAULT_GENERIC_RECTANGLE_OPTIONS, DEFAULT_GUARD_OPTIONS, DEFAULT_HANDOVER_LINE_OPTIONS, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, DEFAULT_LANDING_ZONE_OPTIONS, DEFAULT_LIGHT_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PHASE_LINE_OPTIONS, DEFAULT_PICKUP_ZONE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SCREEN_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURNING_MOVEMENT_OPTIONS, DEFAULT_TURN_OPTIONS, type DelayOptions, type DirectionOfAttackAviationOptions, type DirectionOfMainAttackOptions, type DirectionOfSupportingAttackOptions, type DisruptOptions, EPSILON, type EncirclementOptions, type EngineerWorkLineOptions, type FLOTOptions, type FeaturePartProps, type FillPattern, type FinalProtectiveFireOptions, type FixOptions, type FortifiedAreaOptions, type FortifiedLineOptions, type FrontalAttackOptions, type GeneratedLabelKey, type GenericC2LineOptions, type GenericCircleOptions, type GenericLineOptions, type GenericPolygonOptions, type GenericRectangleOptions, type GuardOptions, type HandoverLineOptions, type JointTacticalActionAreaOptions, type LabelPlacementOverride, type LabelSizeOptions, type LandingZoneOptions, type LightLineOptions, type MainAttackOptions, type MidpointPerpendicularDrawRuleOptions, type ObstacleBypassDifficultOptions, type ObstacleBypassEasyOptions, type ObstacleBypassImpossibleOptions, type OptionsByKind, type ParamDescriptor, type PhaseLineOptions, type PickupZoneOptions, type Point2D, type PrincipalDirectionOfFireOptions, type RenderOptions, type ScreenOptions, type SimpleStyleProps, type SimpleStyleRender, type StrongPointOptions, type StyleHints, type SupportByFireOptions, type SupportingAttackOptions, TEXT_AMPLIFIER_FIELDS, type TacticalArrowOptions, type TextAmplifierDescriptor, type TextAmplifierField, type TextAmplifierKey, type TextAmplifiers, type TurnOptions, type TurningMovementOptions, ambushDrawRule, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, haversineDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
1
+ import { $ as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, $n as DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, $t as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, A as roundToFixed, An as PickupZoneOptions, Ar as LabelPlacementOverride, At as DEFAULT_COVER_OPTIONS, B as cloneControlMeasure, Bn as EncirclementOptions, Bt as DEFAULT_BREACH_OPTIONS, C as BaselineFrame, Cn as DEFAULT_MAIN_ATTACK_OPTIONS, Cr as ControlMeasureMetadata, Ct as DEFAULT_SCREEN_OPTIONS, D as createBaselineFrame, Dn as AreaOfOperationsOptions, Dr as AmplifierPlacements, Dt as DEFAULT_DELAY_OPTIONS, E as BaselineFrameOrigin, En as computeInitialWidthPoint, Er as AmplifierPlacement, Et as GuardOptions, F as applyBoxTransformOptions, Fn as AssemblyAreaOptions, Fr as canonicalTextAmplifierKey, Ft as CanalizeOptions, G as ControlMeasureKind, Gn as StyleHints, Gt as DEFAULT_HANDOVER_LINE_OPTIONS, H as CONTROL_MEASURE_IDS, Hn as FinalProtectiveFireOptions, Ht as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, I as freezeOrientationOptions, In as DEFAULT_ASSEMBLY_AREA_OPTIONS, Ir as normalizeTextAmplifiers, It as DEFAULT_CANALIZE_OPTIONS, J as getControlMeasureMetadataByValue, Jn as PrincipalDirectionOfFireOptions, Jt as PhaseLineOptions, K as OptionsByKind, Kn as controlMeasureIdFromFeature, Kt as HandoverLineOptions, L as RenderOptions, Ln as AreaDefenseOptions, Lr as resolveAmplifierPlacement, Lt as BypassOptions, M as SimpleStyleRender, Mn as LandingZoneOptions, Mr as TextAmplifierField, Mt as TacticalArrowOptions, N as toSimpleStyle, Nn as DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, Nr as TextAmplifierKey, Nt as ClearOptions, O as EPSILON, On as DEFAULT_AREA_OF_OPERATIONS_OPTIONS, Or as CanonicalTextAmplifiers, Ot as DelayOptions, P as resolveStyleHints, Pn as JointTacticalActionAreaOptions, Pr as TextAmplifiers, Pt as DEFAULT_CLEAR_OPTIONS, Q as ObstacleBypassImpossibleOptions, Qn as DirectionOfMainAttackOptions, Qt as DEFAULT_ATTACK_BY_FIRE_OPTIONS, R as renderControlMeasure, Rn as DEFAULT_AREA_DEFENSE_OPTIONS, Rr as AnchorTransformEvent, Rt as DEFAULT_BYPASS_OPTIONS, S as snapToMidpointPerpendicular, Sn as SupportingAttackOptions, Sr as ControlMeasureGeometryType, St as DEFAULT_ANTITANK_DITCH_OPTIONS, T as BaselineFrameOptions, Tn as calculateMetrics, Tr as TextAmplifierDescriptor, Tt as DEFAULT_GUARD_OPTIONS, U as CONTROL_MEASURE_METADATA, Un as ControlMeasureRender, Ut as BattleHandoverLineOptions, V as isKind, Vn as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, Vt as BlockMissionTaskOptions, W as ControlMeasureId, Wn as FeaturePartProps, Wt as DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, X as listControlMeasureMetadata, Xn as DirectionOfSupportingAttackOptions, Xt as FLOTOptions, Y as getDefaultOptions, Yn as DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, Yt as DEFAULT_FLOT_OPTIONS, Z as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, Zn as DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, Zt as AttackByFireOptions, _ as MidpointPerpendicularDrawRuleOptions, _n as DEFAULT_BLOCK_ARROW_OPTIONS, _r as unproject, _t as DEFAULT_FORTIFIED_LINE_OPTIONS, a as supportByFireDrawRule, an as DEFAULT_GENERIC_TEXT_OPTIONS, ar as ControlMeasureStyle, at as DEFAULT_FIX_OPTIONS, b as getMidpointPerpendicularSignedDistance, bn as DEFAULT_CLASSIC_ARROW_OPTIONS, br as BoxTransformDelta, bt as DEFAULT_ANTITANK_WALL_OPTIONS, c as line23DrawRule, cn as GenericCircleOptions, cr as GenericC2LineOptions, ct as DisruptOptions, d as ambushDrawRule, dn as DEFAULT_GENERIC_POLYGON_OPTIONS, dr as DEFAULT_LIGHT_LINE_OPTIONS, dt as DEFAULT_TURNING_MOVEMENT_OPTIONS, en as SupportByFireOptions, er as DirectionOfAttackAviationOptions, et as ObstacleBypassDifficultOptions, f as attackByFireDrawRule, fn as GenericPolygonOptions, fr as LightLineOptions, ft as TurningMovementOptions, g as blockDrawRule, gn as BlockArrowOptions, gr as project, gt as FortifiedAreaOptions, h as disruptDrawRule, hn as BlockArrowHeadStyle, hr as haversineDistance, ht as DEFAULT_FORTIFIED_AREA_OPTIONS, i as axis1DrawRule, in as DEFAULT_AIRBORNE_ATTACK_OPTIONS, ir as DEFAULT_BATTLE_POSITION_OPTIONS, it as TurnOptions, j as SimpleStyleProps, jn as DEFAULT_LANDING_ZONE_OPTIONS, jr as TEXT_AMPLIFIER_FIELDS, jt as DEFAULT_TACTICAL_ARROW_OPTIONS, k as getMetersPerPixel, kn as DEFAULT_PICKUP_ZONE_OPTIONS, kr as GeneratedLabelKey, kt as CoverOptions, l as turnDrawRule, ln as DEFAULT_GENERIC_RECTANGLE_OPTIONS, lr as DEFAULT_ENGINEER_WORK_LINE_OPTIONS, lt as BlockOptions, m as centerRadiusDrawRule, mn as GenericLineOptions, mr as Point2D, mt as FrontalAttackOptions, n as DEFAULT_AMBUSH_OPTIONS, nn as DEFAULT_ATTACK_HELICOPTER_OPTIONS, nr as StrongPointOptions, nt as ObstacleBypassEasyOptions, o as line26DrawRule, on as GenericTextOptions, or as FillPattern, ot as FixOptions, p as point12DrawRule, pn as DEFAULT_GENERIC_LINE_OPTIONS, pr as LabelSizeOptions, pt as DEFAULT_FRONTAL_ATTACK_OPTIONS, q as getControlMeasureMetadata, qn as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, qt as DEFAULT_PHASE_LINE_OPTIONS, r as rectangleDrawRule, rn as AirborneAttackOptions, rr as BattlePositionOptions, rt as DEFAULT_TURN_OPTIONS, s as line24DrawRule, sn as DEFAULT_GENERIC_CIRCLE_OPTIONS, sr as DEFAULT_GENERIC_C2_LINE_OPTIONS, st as DEFAULT_DISRUPT_OPTIONS, t as AmbushOptions, tn as AttackHelicopterOptions, tr as DEFAULT_STRONG_POINT_OPTIONS, tt as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, u as line1DrawRule, un as GenericRectangleOptions, ur as EngineerWorkLineOptions, ut as DEFAULT_BLOCK_OPTIONS, v as computeDefaultMidpointPerpendicularPoint, vn as ClassicArrowHeadStyle, vr as BoundaryOptions, vt as FortifiedLineOptions, w as BaselineFrameNormal, wn as MainAttackOptions, wr as ParamDescriptor, wt as ScreenOptions, x as pointOnMidpointPerpendicularAxis, xn as DEFAULT_SUPPORTING_ATTACK_OPTIONS, xr as ControlMeasureGeometry, xt as AntitankDitchOptions, y as createMidpointPerpendicularDrawRule, yn as ClassicArrowOptions, yr as DEFAULT_BOUNDARY_OPTIONS, yt as AntitankWallOptions, z as ControlMeasure, zn as DEFAULT_ENCIRCLEMENT_OPTIONS, zr as ControlMeasureDrawRule, zt as BreachOptions } from "./index-Nf6JP0Tz.mjs";
2
+ export { type AirborneAttackOptions, type AmbushOptions, type AmplifierPlacement, type AmplifierPlacements, type AnchorTransformEvent, type AntitankDitchOptions, type AntitankWallOptions, type AreaDefenseOptions, type AreaOfOperationsOptions, type AssemblyAreaOptions, type AttackByFireOptions, type AttackHelicopterOptions, type BaselineFrame, type BaselineFrameNormal, type BaselineFrameOptions, type BaselineFrameOrigin, type BattleHandoverLineOptions, type BattlePositionOptions, type BlockArrowHeadStyle, type BlockArrowOptions, type BlockMissionTaskOptions, type BlockOptions, type BoundaryOptions, type BoxTransformDelta, type BreachOptions, type BypassOptions, CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, type CanalizeOptions, type CanonicalTextAmplifiers, type ClassicArrowHeadStyle, type ClassicArrowOptions, type ClearOptions, type ControlMeasure, type ControlMeasureDrawRule, type ControlMeasureGeometry, type ControlMeasureGeometryType, type ControlMeasureId, type ControlMeasureKind, type ControlMeasureMetadata, type ControlMeasureRender, type ControlMeasureStyle, type CoverOptions, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_AREA_DEFENSE_OPTIONS, DEFAULT_AREA_OF_OPERATIONS_OPTIONS, DEFAULT_ASSEMBLY_AREA_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_OPTIONS, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, DEFAULT_BATTLE_POSITION_OPTIONS, DEFAULT_BLOCK_ARROW_OPTIONS, DEFAULT_BLOCK_MISSION_TASK_OPTIONS, DEFAULT_BLOCK_OPTIONS, DEFAULT_BOUNDARY_OPTIONS, DEFAULT_BREACH_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLASSIC_ARROW_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_COVER_OPTIONS, DEFAULT_DELAY_OPTIONS, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_ENGINEER_WORK_LINE_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_FRONTAL_ATTACK_OPTIONS, DEFAULT_GENERIC_C2_LINE_OPTIONS, DEFAULT_GENERIC_CIRCLE_OPTIONS, DEFAULT_GENERIC_LINE_OPTIONS, DEFAULT_GENERIC_POLYGON_OPTIONS, DEFAULT_GENERIC_RECTANGLE_OPTIONS, DEFAULT_GENERIC_TEXT_OPTIONS, DEFAULT_GUARD_OPTIONS, DEFAULT_HANDOVER_LINE_OPTIONS, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, DEFAULT_LANDING_ZONE_OPTIONS, DEFAULT_LIGHT_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PHASE_LINE_OPTIONS, DEFAULT_PICKUP_ZONE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SCREEN_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURNING_MOVEMENT_OPTIONS, DEFAULT_TURN_OPTIONS, type DelayOptions, type DirectionOfAttackAviationOptions, type DirectionOfMainAttackOptions, type DirectionOfSupportingAttackOptions, type DisruptOptions, EPSILON, type EncirclementOptions, type EngineerWorkLineOptions, type FLOTOptions, type FeaturePartProps, type FillPattern, type FinalProtectiveFireOptions, type FixOptions, type FortifiedAreaOptions, type FortifiedLineOptions, type FrontalAttackOptions, type GeneratedLabelKey, type GenericC2LineOptions, type GenericCircleOptions, type GenericLineOptions, type GenericPolygonOptions, type GenericRectangleOptions, type GenericTextOptions, type GuardOptions, type HandoverLineOptions, type JointTacticalActionAreaOptions, type LabelPlacementOverride, type LabelSizeOptions, type LandingZoneOptions, type LightLineOptions, type MainAttackOptions, type MidpointPerpendicularDrawRuleOptions, type ObstacleBypassDifficultOptions, type ObstacleBypassEasyOptions, type ObstacleBypassImpossibleOptions, type OptionsByKind, type ParamDescriptor, type PhaseLineOptions, type PickupZoneOptions, type Point2D, type PrincipalDirectionOfFireOptions, type RenderOptions, type ScreenOptions, type SimpleStyleProps, type SimpleStyleRender, type StrongPointOptions, type StyleHints, type SupportByFireOptions, type SupportingAttackOptions, TEXT_AMPLIFIER_FIELDS, type TacticalArrowOptions, type TextAmplifierDescriptor, type TextAmplifierField, type TextAmplifierKey, type TextAmplifiers, type TurnOptions, type TurningMovementOptions, ambushDrawRule, applyBoxTransformOptions, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, haversineDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as DEFAULT_BLOCK_ARROW_OPTIONS, A as DEFAULT_FLOT_OPTIONS, At as disruptDrawRule, B as DEFAULT_GENERIC_RECTANGLE_OPTIONS, Bt as haversineDistance, C as DEFAULT_SCREEN_OPTIONS, Ct as line23DrawRule, D as DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, Dt as attackByFireDrawRule, E as DEFAULT_FORTIFIED_LINE_OPTIONS, Et as ambushDrawRule, F as DEFAULT_GUARD_OPTIONS, Ft as pointOnMidpointPerpendicularAxis, G as DEFAULT_CANALIZE_OPTIONS, Gt as roundToFixed, H as DEFAULT_GENERIC_LINE_OPTIONS, Ht as unproject, I as DEFAULT_DELAY_OPTIONS, It as snapToMidpointPerpendicular, J as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, K as DEFAULT_BYPASS_OPTIONS, L as DEFAULT_COVER_OPTIONS, Lt as createBaselineFrame, M as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, Mt as computeDefaultMidpointPerpendicularPoint, N as DEFAULT_ENCIRCLEMENT_OPTIONS, Nt as createMidpointPerpendicularDrawRule, O as DEFAULT_HANDOVER_LINE_OPTIONS, Ot as point12DrawRule, P as DEFAULT_DISRUPT_OPTIONS, Pt as getMidpointPerpendicularSignedDistance, Q as DEFAULT_BOUNDARY_OPTIONS, R as DEFAULT_TACTICAL_ARROW_OPTIONS, Rt as calculateMetrics, S as DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, St as line24DrawRule, T as DEFAULT_FORTIFIED_AREA_OPTIONS, Tt as line1DrawRule, U as DEFAULT_GENERIC_CIRCLE_OPTIONS, Ut as EPSILON, V as DEFAULT_GENERIC_POLYGON_OPTIONS, Vt as project, W as DEFAULT_CLASSIC_ARROW_OPTIONS, Wt as getMetersPerPixel, X as DEFAULT_ENGINEER_WORK_LINE_OPTIONS, Y as DEFAULT_GENERIC_C2_LINE_OPTIONS, Z as DEFAULT_LIGHT_LINE_OPTIONS, _ as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, _t as DEFAULT_AIRBORNE_ATTACK_OPTIONS, a as DEFINITIONS, at as DEFAULT_ANTITANK_DITCH_OPTIONS, b as DEFAULT_MAIN_ATTACK_OPTIONS, bt as supportByFireDrawRule, c as getDefaultOptions, ct as DEFAULT_AREA_DEFENSE_OPTIONS, d as DEFAULT_TURN_OPTIONS, dt as normalizeTextAmplifiers, et as DEFAULT_BLOCK_OPTIONS, f as DEFAULT_SUPPORTING_ATTACK_OPTIONS, ft as resolveAmplifierPlacement, g as DEFAULT_PICKUP_ZONE_OPTIONS, gt as DEFAULT_AMBUSH_OPTIONS, h as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, ht as DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, i as CONTROL_MEASURE_METADATA, it as DEFAULT_ANTITANK_WALL_OPTIONS, j as DEFAULT_FIX_OPTIONS, jt as blockDrawRule, k as DEFAULT_PHASE_LINE_OPTIONS, kt as centerRadiusDrawRule, l as listControlMeasureMetadata, lt as TEXT_AMPLIFIER_FIELDS, m as DEFAULT_STRONG_POINT_OPTIONS, mt as DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, n as resolveStyleHints, nt as DEFAULT_ATTACK_HELICOPTER_OPTIONS, o as getControlMeasureMetadata, ot as DEFAULT_ASSEMBLY_AREA_OPTIONS, p as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, pt as DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, q as DEFAULT_BREACH_OPTIONS, r as CONTROL_MEASURE_IDS, rt as DEFAULT_ATTACK_BY_FIRE_OPTIONS, s as getControlMeasureMetadataByValue, st as DEFAULT_AREA_OF_OPERATIONS_OPTIONS, t as renderControlMeasure, tt as DEFAULT_BATTLE_POSITION_OPTIONS, u as DEFAULT_TURNING_MOVEMENT_OPTIONS, ut as canonicalTextAmplifierKey, v as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, vt as rectangleDrawRule, w as DEFAULT_FRONTAL_ATTACK_OPTIONS, wt as turnDrawRule, x as DEFAULT_LANDING_ZONE_OPTIONS, xt as line26DrawRule, y as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, yt as axis1DrawRule, z as DEFAULT_CLEAR_OPTIONS, zt as computeInitialWidthPoint } from "./renderControlMeasure-Bc0d45Iv.mjs";
1
+ import { $ as DEFAULT_BOUNDARY_OPTIONS, A as DEFAULT_FLOT_OPTIONS, At as centerRadiusDrawRule, B as DEFAULT_GENERIC_TEXT_OPTIONS, Bt as computeInitialWidthPoint, C as DEFAULT_SCREEN_OPTIONS, Ct as line24DrawRule, D as DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, Dt as ambushDrawRule, E as DEFAULT_FORTIFIED_LINE_OPTIONS, Et as line1DrawRule, F as DEFAULT_GUARD_OPTIONS, Ft as getMidpointPerpendicularSignedDistance, G as DEFAULT_CLASSIC_ARROW_OPTIONS, Gt as getMetersPerPixel, H as DEFAULT_GENERIC_POLYGON_OPTIONS, Ht as project, I as DEFAULT_DELAY_OPTIONS, It as pointOnMidpointPerpendicularAxis, J as DEFAULT_BREACH_OPTIONS, K as DEFAULT_CANALIZE_OPTIONS, Kt as roundToFixed, L as DEFAULT_COVER_OPTIONS, Lt as snapToMidpointPerpendicular, M as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, Mt as blockDrawRule, N as DEFAULT_ENCIRCLEMENT_OPTIONS, Nt as computeDefaultMidpointPerpendicularPoint, O as DEFAULT_HANDOVER_LINE_OPTIONS, Ot as attackByFireDrawRule, P as DEFAULT_DISRUPT_OPTIONS, Pt as createMidpointPerpendicularDrawRule, Q as DEFAULT_LIGHT_LINE_OPTIONS, R as DEFAULT_TACTICAL_ARROW_OPTIONS, Rt as createBaselineFrame, S as DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, St as line26DrawRule, T as DEFAULT_FORTIFIED_AREA_OPTIONS, Tt as turnDrawRule, U as DEFAULT_GENERIC_LINE_OPTIONS, Ut as unproject, V as DEFAULT_GENERIC_RECTANGLE_OPTIONS, Vt as haversineDistance, W as DEFAULT_GENERIC_CIRCLE_OPTIONS, Wt as EPSILON, X as DEFAULT_GENERIC_C2_LINE_OPTIONS, Y as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, Z as DEFAULT_ENGINEER_WORK_LINE_OPTIONS, _ as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, _t as DEFAULT_AMBUSH_OPTIONS, a as DEFINITIONS, at as DEFAULT_ANTITANK_WALL_OPTIONS, b as DEFAULT_MAIN_ATTACK_OPTIONS, bt as axis1DrawRule, c as getDefaultOptions, ct as DEFAULT_AREA_OF_OPERATIONS_OPTIONS, d as DEFAULT_TURN_OPTIONS, dt as canonicalTextAmplifierKey, et as DEFAULT_BLOCK_ARROW_OPTIONS, f as DEFAULT_SUPPORTING_ATTACK_OPTIONS, ft as normalizeTextAmplifiers, g as DEFAULT_PICKUP_ZONE_OPTIONS, gt as DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, h as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, ht as DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, i as CONTROL_MEASURE_METADATA, it as DEFAULT_ATTACK_BY_FIRE_OPTIONS, j as DEFAULT_FIX_OPTIONS, jt as disruptDrawRule, k as DEFAULT_PHASE_LINE_OPTIONS, kt as point12DrawRule, l as listControlMeasureMetadata, lt as DEFAULT_AREA_DEFENSE_OPTIONS, m as DEFAULT_STRONG_POINT_OPTIONS, mt as DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, n as resolveStyleHints, nt as DEFAULT_BATTLE_POSITION_OPTIONS, o as getControlMeasureMetadata, ot as DEFAULT_ANTITANK_DITCH_OPTIONS, p as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, pt as resolveAmplifierPlacement, q as DEFAULT_BYPASS_OPTIONS, r as CONTROL_MEASURE_IDS, rt as DEFAULT_ATTACK_HELICOPTER_OPTIONS, s as getControlMeasureMetadataByValue, st as DEFAULT_ASSEMBLY_AREA_OPTIONS, t as renderControlMeasure, tt as DEFAULT_BLOCK_OPTIONS, u as DEFAULT_TURNING_MOVEMENT_OPTIONS, ut as TEXT_AMPLIFIER_FIELDS, v as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, vt as DEFAULT_AIRBORNE_ATTACK_OPTIONS, w as DEFAULT_FRONTAL_ATTACK_OPTIONS, wt as line23DrawRule, x as DEFAULT_LANDING_ZONE_OPTIONS, xt as supportByFireDrawRule, y as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, yt as rectangleDrawRule, z as DEFAULT_CLEAR_OPTIONS, zt as calculateMetrics } from "./renderControlMeasure-TWiLtFXu.mjs";
2
2
  //#region src/freeze-orientation.ts
3
3
  /**
4
4
  * Dispatches to a measure kind's `freezeOrientation` hook (see
@@ -13,6 +13,20 @@ function freezeOrientationOptions(kind, controlPoints, options) {
13
13
  if (!definition.freezeOrientation) return void 0;
14
14
  return definition.freezeOrientation(controlPoints, options ?? {});
15
15
  }
16
+ /**
17
+ * Dispatches to a measure kind's `transformOptions` hook (see
18
+ * {@link import("./define").ControlMeasureDefinition.transformOptions}), folding
19
+ * a box transform gesture's `delta` (screen-space scale/rotation) into option
20
+ * values for a graphic that persists orientation/size as options rather than in
21
+ * geometry. Returns an options patch to merge, or `undefined` when the kind
22
+ * declares no hook (or the hook finds nothing to fold). Edit hosts call this at
23
+ * a rotate/scale gesture's commit (ADR-0017).
24
+ */
25
+ function applyBoxTransformOptions(kind, options, delta) {
26
+ const definition = DEFINITIONS[kind];
27
+ if (!definition.transformOptions) return void 0;
28
+ return definition.transformOptions(options ?? {}, delta);
29
+ }
16
30
  //#endregion
17
31
  //#region src/instance.ts
18
32
  function isKind(cm, kind) {
@@ -115,4 +129,4 @@ function toHexChannel(value) {
115
129
  return Math.max(0, Math.min(255, Math.round(value))).toString(16).padStart(2, "0");
116
130
  }
117
131
  //#endregion
118
- export { CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_AREA_DEFENSE_OPTIONS, DEFAULT_AREA_OF_OPERATIONS_OPTIONS, DEFAULT_ASSEMBLY_AREA_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_OPTIONS, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, DEFAULT_BATTLE_POSITION_OPTIONS, DEFAULT_BLOCK_ARROW_OPTIONS, DEFAULT_BLOCK_MISSION_TASK_OPTIONS, DEFAULT_BLOCK_OPTIONS, DEFAULT_BOUNDARY_OPTIONS, DEFAULT_BREACH_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLASSIC_ARROW_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_COVER_OPTIONS, DEFAULT_DELAY_OPTIONS, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_ENGINEER_WORK_LINE_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_FRONTAL_ATTACK_OPTIONS, DEFAULT_GENERIC_C2_LINE_OPTIONS, DEFAULT_GENERIC_CIRCLE_OPTIONS, DEFAULT_GENERIC_LINE_OPTIONS, DEFAULT_GENERIC_POLYGON_OPTIONS, DEFAULT_GENERIC_RECTANGLE_OPTIONS, DEFAULT_GUARD_OPTIONS, DEFAULT_HANDOVER_LINE_OPTIONS, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, DEFAULT_LANDING_ZONE_OPTIONS, DEFAULT_LIGHT_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PHASE_LINE_OPTIONS, DEFAULT_PICKUP_ZONE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SCREEN_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURNING_MOVEMENT_OPTIONS, DEFAULT_TURN_OPTIONS, EPSILON, TEXT_AMPLIFIER_FIELDS, ambushDrawRule, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, haversineDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
132
+ export { CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_AREA_DEFENSE_OPTIONS, DEFAULT_AREA_OF_OPERATIONS_OPTIONS, DEFAULT_ASSEMBLY_AREA_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_OPTIONS, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, DEFAULT_BATTLE_POSITION_OPTIONS, DEFAULT_BLOCK_ARROW_OPTIONS, DEFAULT_BLOCK_MISSION_TASK_OPTIONS, DEFAULT_BLOCK_OPTIONS, DEFAULT_BOUNDARY_OPTIONS, DEFAULT_BREACH_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLASSIC_ARROW_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_COVER_OPTIONS, DEFAULT_DELAY_OPTIONS, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_ENGINEER_WORK_LINE_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_FRONTAL_ATTACK_OPTIONS, DEFAULT_GENERIC_C2_LINE_OPTIONS, DEFAULT_GENERIC_CIRCLE_OPTIONS, DEFAULT_GENERIC_LINE_OPTIONS, DEFAULT_GENERIC_POLYGON_OPTIONS, DEFAULT_GENERIC_RECTANGLE_OPTIONS, DEFAULT_GENERIC_TEXT_OPTIONS, DEFAULT_GUARD_OPTIONS, DEFAULT_HANDOVER_LINE_OPTIONS, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, DEFAULT_LANDING_ZONE_OPTIONS, DEFAULT_LIGHT_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PHASE_LINE_OPTIONS, DEFAULT_PICKUP_ZONE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SCREEN_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURNING_MOVEMENT_OPTIONS, DEFAULT_TURN_OPTIONS, EPSILON, TEXT_AMPLIFIER_FIELDS, ambushDrawRule, applyBoxTransformOptions, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, haversineDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
@@ -1,4 +1,4 @@
1
- import { Ar as TextAmplifiers, U as ControlMeasureId, rr as FillPattern } from "../index-BTViqLbA.mjs";
1
+ import { Pr as TextAmplifiers, W as ControlMeasureId, or as FillPattern } from "../index-Nf6JP0Tz.mjs";
2
2
  import { FeatureCollection, Geometry } from "geojson";
3
3
 
4
4
  //#region src/preview/index.d.ts
@@ -68,6 +68,11 @@ interface PreviewShape {
68
68
  textAnchor?: "start" | "end";
69
69
  /** Whether the text needs an opaque readability backdrop. */
70
70
  textBackground?: boolean;
71
+ /** Multi-line justification within the text block, mirroring the label
72
+ * feature's `textJustify`. The block itself still centers on (`cx`, `cy`). */
73
+ textJustify?: "left" | "center" | "right";
74
+ /** Typography preset, mirroring the label feature's `textStyle`. */
75
+ textStyle?: "regular" | "italic" | "light" | "caps";
71
76
  }
72
77
  /** Target viewBox the geometry is fit into. */
73
78
  interface ProjectDimensions {
@@ -1,4 +1,4 @@
1
- import { a as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-Bc0d45Iv.mjs";
1
+ import { a as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-TWiLtFXu.mjs";
2
2
  //#region src/preview/index.ts
3
3
  /** Side length (SVG units) of the repeating hatch tile in {@link PREVIEW_FILL_PATTERNS}. */
4
4
  const PREVIEW_PATTERN_TILE = 8;
@@ -331,6 +331,8 @@ function collectShapes(g, tx, out, bboxArea, textLimits, props) {
331
331
  const labelRotation = typeof labelProps.rotation === "number" ? labelProps.rotation : void 0;
332
332
  const labelAnchor = labelProps.textAnchor === "start" || labelProps.textAnchor === "end" ? labelProps.textAnchor : void 0;
333
333
  const textBackground = labelProps.textBackground === true ? true : void 0;
334
+ const textJustify = labelProps.textJustify === "left" || labelProps.textJustify === "center" || labelProps.textJustify === "right" ? labelProps.textJustify : void 0;
335
+ const textStyle = labelProps.textStyle === "regular" || labelProps.textStyle === "italic" || labelProps.textStyle === "light" || labelProps.textStyle === "caps" ? labelProps.textStyle : void 0;
334
336
  const styleProps = labelProps.style && typeof labelProps.style === "object" ? labelProps.style : {};
335
337
  const fillPattern = PREVIEW_FILL_PATTERNS.some((p) => p.id === styleProps.fillPattern) ? styleProps.fillPattern : void 0;
336
338
  const explicitlyFilled = typeof styleProps.fillColor === "string";
@@ -348,7 +350,9 @@ function collectShapes(g, tx, out, bboxArea, textLimits, props) {
348
350
  rotation: labelRotation,
349
351
  heightPx,
350
352
  textAnchor: labelAnchor,
351
- textBackground
353
+ textBackground,
354
+ textJustify,
355
+ textStyle
352
356
  });
353
357
  } else out.push({
354
358
  type: "circle",
@@ -61,6 +61,7 @@ const getMetersPerPixel = (latitude, zoomLevel) => {
61
61
  };
62
62
  //#endregion
63
63
  //#region src/projection.ts
64
+ const EARTH_RADIUS = 6371008.8;
64
65
  /**
65
66
  * Project WGS84 (Lon/Lat) to Web Mercator (Meters).
66
67
  */
@@ -82,13 +83,13 @@ const unproject = (x, y) => {
82
83
  /**
83
84
  * Great-circle distance in meters between two lon/lat positions (haversine on
84
85
  * the WGS84 mean-radius sphere). Accurate at all scales — use this for
85
- * measurement readouts (segment lengths, radii). Note the deliberate
86
- * asymmetry with generation: generators build geometry in projected Web
87
- * Mercator meters, so at high latitudes a graphic's Mercator dimensions
88
- * exceed the true ground distance this returns.
86
+ * measurement readouts (segment lengths, radii). Most generators still build
87
+ * geometry in projected Web Mercator meters, so at high latitudes a graphic's
88
+ * Mercator dimensions can exceed the true ground distance this returns; the
89
+ * generic circle is the exception — it samples at constant geodesic radius,
90
+ * so its ring and this readout agree exactly.
89
91
  */
90
92
  const haversineDistance = (a, b) => {
91
- const R = 6371008.8;
92
93
  const [lon1, lat1] = a;
93
94
  const [lon2, lat2] = b;
94
95
  const φ1 = lat1 * Math.PI / 180;
@@ -96,7 +97,33 @@ const haversineDistance = (a, b) => {
96
97
  const Δφ = (lat2 - lat1) * Math.PI / 180;
97
98
  const Δλ = (lon2 - lon1) * Math.PI / 180;
98
99
  const h = Math.sin(Δφ / 2) * Math.sin(Δφ / 2) + Math.cos(φ1) * Math.cos(φ2) * Math.sin(Δλ / 2) * Math.sin(Δλ / 2);
99
- return 2 * R * Math.asin(Math.min(1, Math.sqrt(h)));
100
+ return 2 * EARTH_RADIUS * Math.asin(Math.min(1, Math.sqrt(h)));
101
+ };
102
+ /**
103
+ * Initial great-circle bearing from `a` to `b`, in radians clockwise from
104
+ * north (0 = north, π/2 = east).
105
+ */
106
+ const sphericalBearing = (a, b) => {
107
+ const [lon1, lat1] = a;
108
+ const [lon2, lat2] = b;
109
+ const φ1 = lat1 * Math.PI / 180;
110
+ const φ2 = lat2 * Math.PI / 180;
111
+ const Δλ = (lon2 - lon1) * Math.PI / 180;
112
+ return Math.atan2(Math.sin(Δλ) * Math.cos(φ2), Math.cos(φ1) * Math.sin(φ2) - Math.sin(φ1) * Math.cos(φ2) * Math.cos(Δλ));
113
+ };
114
+ /**
115
+ * Spherical forward (direct) solution: the position reached by travelling
116
+ * `distance` meters from `origin` along an initial `bearing` (radians
117
+ * clockwise from north), on the WGS84 mean-radius sphere.
118
+ */
119
+ const destinationPoint = (origin, distance, bearing) => {
120
+ const [lon1, lat1] = origin;
121
+ const φ1 = lat1 * Math.PI / 180;
122
+ const λ1 = lon1 * Math.PI / 180;
123
+ const δ = distance / EARTH_RADIUS;
124
+ const θ = bearing;
125
+ const φ2 = Math.asin(Math.sin(φ1) * Math.cos(δ) + Math.cos(φ1) * Math.sin(δ) * Math.cos(θ));
126
+ return [roundToFixed((λ1 + Math.atan2(Math.sin(θ) * Math.sin(δ) * Math.cos(φ1), Math.cos(δ) - Math.sin(φ1) * Math.sin(φ2))) * 180 / Math.PI), roundToFixed(φ2 * 180 / Math.PI)];
100
127
  };
101
128
  //#endregion
102
129
  //#region src/internal/vector-utils.ts
@@ -530,7 +557,7 @@ function samePosition(a, b) {
530
557
  }
531
558
  //#endregion
532
559
  //#region src/draw-rules/area1.ts
533
- function derive$9(points) {
560
+ function derive$10(points) {
534
561
  return clonePositions(points);
535
562
  }
536
563
  /**
@@ -550,9 +577,9 @@ const area1DrawRule = {
550
577
  id: "area1",
551
578
  minimumUserPoints: 3,
552
579
  closedRing: true,
553
- derive: derive$9,
580
+ derive: derive$10,
554
581
  transform(event) {
555
- return derive$9(event.next);
582
+ return derive$10(event.next);
556
583
  }
557
584
  };
558
585
  //#endregion
@@ -578,14 +605,14 @@ const disruptDrawRule = createMidpointPerpendicularDrawRule({
578
605
  * that fixes both the radius and the bearing of the symbol's opening. Both
579
606
  * points are user-clicked, so the canonical array is just the (clamped) input.
580
607
  */
581
- function derive$8(points) {
608
+ function derive$9(points) {
582
609
  return clonePositions(points.slice(0, 2));
583
610
  }
584
611
  const centerRadiusDrawRule = {
585
612
  id: "area15:center-radius",
586
613
  minimumUserPoints: 2,
587
614
  canonicalPointCount: 2,
588
- derive: derive$8,
615
+ derive: derive$9,
589
616
  transform(event) {
590
617
  const { previous, next, activePointIndex } = event;
591
618
  if (activePointIndex === 0 && previous.length >= 2 && next.length >= 2) {
@@ -594,7 +621,7 @@ const centerRadiusDrawRule = {
594
621
  const origin = previous[1];
595
622
  return [clonePosition(next[0]), [origin[0] + dx, origin[1] + dy]];
596
623
  }
597
- return derive$8(next);
624
+ return derive$9(next);
598
625
  }
599
626
  };
600
627
  /** Backward-compatible doctrinal name for Area15's shared center-radius rule. */
@@ -612,6 +639,24 @@ const isolateDrawRule = centerRadiusDrawRule;
612
639
  */
613
640
  const point12DrawRule = createMidpointPerpendicularDrawRule({ id: "point12:obstacle-bypass" });
614
641
  //#endregion
642
+ //#region src/draw-rules/point1.ts
643
+ /**
644
+ * Point1 — a single anchor point (e.g. Text's center). One user click commits
645
+ * the measure; dragging the point simply translates it.
646
+ */
647
+ function derive$8(points) {
648
+ return clonePositions(points.slice(0, 1));
649
+ }
650
+ const pointDrawRule = {
651
+ id: "point1:anchor",
652
+ minimumUserPoints: 1,
653
+ canonicalPointCount: 1,
654
+ derive: derive$8,
655
+ transform(event) {
656
+ return derive$8(event.next);
657
+ }
658
+ };
659
+ //#endregion
615
660
  //#region src/draw-rules/area7.ts
616
661
  /**
617
662
  * Area7 anchor draw rule for Attack By Fire.
@@ -6862,6 +6907,31 @@ const FILLED_AREA_PARAMS = [{
6862
6907
  //#endregion
6863
6908
  //#region src/generators/cm99-generic-graphics/circle.ts
6864
6909
  const CIRCLE_SEGMENTS = 64;
6910
+ const MAX_SEGMENT_ANGLE = 6;
6911
+ const MAX_SUBDIVISION_DEPTH = 5;
6912
+ /**
6913
+ * Lon/lat gap between two positions, wrapping the longitude difference to
6914
+ * (-180, 180] so it stays meaningful across the antimeridian.
6915
+ */
6916
+ const angularGap = (a, b) => {
6917
+ const wrappedLonDiff = Math.abs(((b[0] - a[0]) % 360 + 540) % 360 - 180);
6918
+ const latDiff = Math.abs(b[1] - a[1]);
6919
+ return Math.max(wrappedLonDiff, latDiff);
6920
+ };
6921
+ /**
6922
+ * Recursively bisects a bearing interval so consecutive ring vertices stay
6923
+ * within MAX_SEGMENT_ANGLE of each other, keeping straight polygon chords
6924
+ * close to the true geodesic circle near the poles. Only pushes the start of
6925
+ * each leaf segment; the caller supplies the final closing vertex.
6926
+ */
6927
+ const densifySegment = (center, radius, bearingA, posA, bearingB, posB, depth, out) => {
6928
+ if (depth < MAX_SUBDIVISION_DEPTH && angularGap(posA, posB) > MAX_SEGMENT_ANGLE) {
6929
+ const midBearing = (bearingA + bearingB) / 2;
6930
+ const midPos = destinationPoint(center, radius, midBearing);
6931
+ densifySegment(center, radius, bearingA, posA, midBearing, midPos, depth + 1, out);
6932
+ densifySegment(center, radius, midBearing, midPos, bearingB, posB, depth + 1, out);
6933
+ } else out.push(posA);
6934
+ };
6865
6935
  const DEFAULT_GENERIC_CIRCLE_OPTIONS = { filled: false };
6866
6936
  const GENERIC_CIRCLE_METADATA = {
6867
6937
  id: "circle",
@@ -6879,19 +6949,42 @@ const GENERIC_CIRCLE_METADATA = {
6879
6949
  params: FILLED_AREA_PARAMS
6880
6950
  };
6881
6951
  function createGenericCircle(coordinates, options = {}) {
6882
- const center = project(coordinates[0][0], coordinates[0][1]);
6883
- const radiusVector = vecSub(project(coordinates[1][0], coordinates[1][1]), center);
6884
- const radius = vecMag(radiusVector);
6952
+ const center = coordinates[0];
6953
+ const radiusPoint = coordinates[1];
6954
+ const radius = haversineDistance(center, radiusPoint);
6885
6955
  if (radius < 1e-6) return {
6886
6956
  type: "FeatureCollection",
6887
6957
  features: []
6888
6958
  };
6889
- const startAngle = Math.atan2(radiusVector[1], radiusVector[0]);
6959
+ const startBearing = sphericalBearing(center, radiusPoint);
6890
6960
  const ring = [];
6891
- for (let index = 0; index <= CIRCLE_SEGMENTS; index++) {
6892
- const angle = startAngle + index / CIRCLE_SEGMENTS * Math.PI * 2;
6893
- ring.push(unproject(center[0] + Math.cos(angle) * radius, center[1] + Math.sin(angle) * radius));
6894
- }
6961
+ let previousBearing = startBearing;
6962
+ let previousPoint = destinationPoint(center, radius, previousBearing);
6963
+ for (let index = 1; index <= CIRCLE_SEGMENTS; index++) {
6964
+ const bearing = startBearing - index / CIRCLE_SEGMENTS * 2 * Math.PI;
6965
+ const point = destinationPoint(center, radius, bearing);
6966
+ densifySegment(center, radius, previousBearing, previousPoint, bearing, point, 0, ring);
6967
+ previousBearing = bearing;
6968
+ previousPoint = point;
6969
+ }
6970
+ ring.push(previousPoint);
6971
+ const vertex0 = [ring[0][0], ring[0][1]];
6972
+ let poleLat = null;
6973
+ if (haversineDistance(center, [center[0], 90]) < radius) poleLat = 90;
6974
+ else if (haversineDistance(center, [center[0], -90]) < radius) poleLat = -90;
6975
+ if (poleLat !== null) {
6976
+ for (let index = 1; index < ring.length - 1; index++) {
6977
+ const previousLon = ring[index - 1][0];
6978
+ const lon = ring[index][0];
6979
+ ring[index] = [lon + 360 * Math.round((previousLon - lon) / 360), ring[index][1]];
6980
+ }
6981
+ const penultimateLon = ring[ring.length - 2][0];
6982
+ const unwrappedClosingLon = vertex0[0] + 360 * Math.round((penultimateLon - vertex0[0]) / 360);
6983
+ ring[ring.length - 1] = [unwrappedClosingLon, vertex0[1]];
6984
+ ring.push([unwrappedClosingLon, poleLat]);
6985
+ ring.push([vertex0[0], poleLat]);
6986
+ ring.push([vertex0[0], vertex0[1]]);
6987
+ } else ring[ring.length - 1] = [vertex0[0], vertex0[1]];
6895
6988
  return {
6896
6989
  type: "FeatureCollection",
6897
6990
  features: [{
@@ -7102,6 +7195,178 @@ const GENERIC_RECTANGLE = defineControlMeasure({
7102
7195
  ] }
7103
7196
  });
7104
7197
  //#endregion
7198
+ //#region src/generators/cm99-generic-graphics/text.ts
7199
+ /** Wrap a degree value into the canonical clockwise `[0, 360)` range. */
7200
+ function normalizeDegrees(degrees) {
7201
+ return (degrees % 360 + 360) % 360;
7202
+ }
7203
+ const DEFAULT_GENERIC_TEXT_OPTIONS = {
7204
+ text: "Text",
7205
+ textAlign: "center",
7206
+ textStyle: "regular",
7207
+ rotation: 0,
7208
+ sizePixels: 24,
7209
+ maxSizePixels: 200
7210
+ };
7211
+ const GENERIC_TEXT_METADATA = {
7212
+ id: "text",
7213
+ name: "Text",
7214
+ description: "A non-doctrinal free-standing text label anchored at a single point.",
7215
+ entity: "Generic Graphics",
7216
+ entityType: "Annotation",
7217
+ entitySubtype: "Text",
7218
+ value: "990201",
7219
+ minCoordinates: 1,
7220
+ maxCoordinates: 1,
7221
+ geometry: "point",
7222
+ geometryTypes: ["Point"],
7223
+ drawRule: "Point1",
7224
+ params: [
7225
+ {
7226
+ key: "text",
7227
+ label: "Text",
7228
+ description: "The text to render. Explicit line breaks are honored; it never auto-wraps.",
7229
+ type: "text",
7230
+ placeholder: "Text",
7231
+ multiline: true
7232
+ },
7233
+ {
7234
+ key: "textAlign",
7235
+ label: "Alignment",
7236
+ description: "Placement of the text block relative to the anchor: left/right put the anchor at that edge, center centers it; lines justify the same way.",
7237
+ type: "enum",
7238
+ options: [
7239
+ {
7240
+ label: "Left",
7241
+ value: "left"
7242
+ },
7243
+ {
7244
+ label: "Center",
7245
+ value: "center"
7246
+ },
7247
+ {
7248
+ label: "Right",
7249
+ value: "right"
7250
+ }
7251
+ ]
7252
+ },
7253
+ {
7254
+ key: "textStyle",
7255
+ label: "Style",
7256
+ description: "Typography preset.",
7257
+ type: "enum",
7258
+ options: [
7259
+ {
7260
+ label: "Regular",
7261
+ value: "regular"
7262
+ },
7263
+ {
7264
+ label: "Italic",
7265
+ value: "italic"
7266
+ },
7267
+ {
7268
+ label: "Light",
7269
+ value: "light"
7270
+ },
7271
+ {
7272
+ label: "Caps",
7273
+ value: "caps"
7274
+ }
7275
+ ]
7276
+ },
7277
+ {
7278
+ key: "rotation",
7279
+ label: "Rotation",
7280
+ description: "Clockwise rotation in degrees.",
7281
+ type: "number",
7282
+ min: 0,
7283
+ max: 360,
7284
+ step: 1,
7285
+ unit: "°"
7286
+ },
7287
+ {
7288
+ key: "sizePixels",
7289
+ label: "Size",
7290
+ description: "Text height in screen pixels.",
7291
+ type: "number",
7292
+ min: 8,
7293
+ max: 200,
7294
+ step: 1,
7295
+ unit: "px"
7296
+ },
7297
+ {
7298
+ key: "maxSizePixels",
7299
+ label: "Max size",
7300
+ description: "Hide the text once its on-screen size exceeds this.",
7301
+ type: "number",
7302
+ min: 8,
7303
+ max: 400,
7304
+ step: 1,
7305
+ unit: "px"
7306
+ }
7307
+ ]
7308
+ };
7309
+ function createGenericText(coordinates, options = {}) {
7310
+ const merged = {
7311
+ ...DEFAULT_GENERIC_TEXT_OPTIONS,
7312
+ ...options
7313
+ };
7314
+ const text = merged.text ?? "";
7315
+ if (text.trim().length === 0) return {
7316
+ type: "FeatureCollection",
7317
+ features: []
7318
+ };
7319
+ const anchor = coordinates[0];
7320
+ const rotation = normalizeRadians(Math.PI - (merged.rotation ?? 0) * Math.PI / 180);
7321
+ const sizeProps = options.sizePixels !== void 0 ? { textSizePixels: options.sizePixels } : options.sizeMeters !== void 0 ? { textSizeMeters: options.sizeMeters } : merged.sizePixels !== void 0 ? { textSizePixels: merged.sizePixels } : {};
7322
+ const textAlign = merged.textAlign ?? "center";
7323
+ const textAnchor = textAlign === "left" ? "start" : textAlign === "right" ? "end" : void 0;
7324
+ return {
7325
+ type: "FeatureCollection",
7326
+ features: [{
7327
+ type: "Feature",
7328
+ properties: {
7329
+ part: "text",
7330
+ labelPlacement: false,
7331
+ text,
7332
+ rotation,
7333
+ textJustify: textAlign,
7334
+ ...textAnchor !== void 0 ? { textAnchor } : {},
7335
+ textStyle: merged.textStyle ?? "regular",
7336
+ ...merged.maxSizePixels !== void 0 ? { textMaxSizePixels: merged.maxSizePixels } : {},
7337
+ ...sizeProps
7338
+ },
7339
+ geometry: {
7340
+ type: "Point",
7341
+ coordinates: anchor
7342
+ }
7343
+ }]
7344
+ };
7345
+ }
7346
+ const GENERIC_TEXT = defineControlMeasure({
7347
+ metadata: GENERIC_TEXT_METADATA,
7348
+ generator: createGenericText,
7349
+ defaultOptions: DEFAULT_GENERIC_TEXT_OPTIONS,
7350
+ rule: pointDrawRule,
7351
+ transformOptions(options, { scale, rotationRadians }) {
7352
+ const patch = {};
7353
+ if (rotationRadians !== 0) patch.rotation = normalizeDegrees((options.rotation ?? DEFAULT_GENERIC_TEXT_OPTIONS.rotation ?? 0) + rotationRadians * 180 / Math.PI);
7354
+ if (scale !== 1 && Number.isFinite(scale) && scale > 0) {
7355
+ if (options.sizePixels !== void 0) patch.sizePixels = options.sizePixels * scale;
7356
+ else if (options.sizeMeters !== void 0) patch.sizeMeters = options.sizeMeters * scale;
7357
+ }
7358
+ return Object.keys(patch).length > 0 ? patch : void 0;
7359
+ },
7360
+ previewSample: {
7361
+ controlPoints: [[0, 0]],
7362
+ options: {
7363
+ text: "Text",
7364
+ sizePixels: void 0,
7365
+ sizeMeters: 500
7366
+ }
7367
+ }
7368
+ });
7369
+ //#endregion
7105
7370
  //#region src/generators/cm34-mission-tasks/clear.ts
7106
7371
  /**
7107
7372
  * Default options for the CLEAR symbol.
@@ -11314,6 +11579,7 @@ const DEFINITIONS = {
11314
11579
  polygon: GENERIC_POLYGON,
11315
11580
  rectangle: GENERIC_RECTANGLE,
11316
11581
  circle: GENERIC_CIRCLE,
11582
+ text: GENERIC_TEXT,
11317
11583
  "airborne-attack": AIRBORNE_ATTACK,
11318
11584
  "attack-helicopter": ATTACK_HELICOPTER,
11319
11585
  "support-by-fire": SUPPORT_BY_FIRE,
@@ -11543,6 +11809,9 @@ function normalizeFeature(id, feature, index, generatedLabelOrdinal, measureStyl
11543
11809
  const textSizeMeters = typeof sourceProps.textSizeMeters === "number" ? sourceProps.textSizeMeters : void 0;
11544
11810
  const textAnchor = sourceProps.textAnchor === "start" || sourceProps.textAnchor === "end" ? sourceProps.textAnchor : void 0;
11545
11811
  const textBackground = sourceProps.textBackground === true ? true : void 0;
11812
+ const textJustify = sourceProps.textJustify === "left" || sourceProps.textJustify === "center" || sourceProps.textJustify === "right" ? sourceProps.textJustify : void 0;
11813
+ const textStyle = sourceProps.textStyle === "regular" || sourceProps.textStyle === "italic" || sourceProps.textStyle === "light" || sourceProps.textStyle === "caps" ? sourceProps.textStyle : void 0;
11814
+ const textMaxSizePixels = typeof sourceProps.textMaxSizePixels === "number" ? sourceProps.textMaxSizePixels : void 0;
11546
11815
  const amplifierField = typeof sourceProps.amplifierField === "string" ? canonicalTextAmplifierKey(sourceProps.amplifierField) : void 0;
11547
11816
  const labelPlacementKey = resolveLabelPlacementKey(sourceProps, amplifierField, text, feature.geometry.type, part, generatedLabelOrdinal);
11548
11817
  const resolvedPlacement = labelPlacementKey ? resolveAmplifierPlacement(amplifierPlacements?.[labelPlacementKey]) : void 0;
@@ -11565,7 +11834,10 @@ function normalizeFeature(id, feature, index, generatedLabelOrdinal, measureStyl
11565
11834
  ...amplifierField !== void 0 ? { amplifierField } : {},
11566
11835
  ...labelPlacementKey !== void 0 ? { labelPlacementKey } : {},
11567
11836
  ...textSizePixels !== void 0 ? { textSizePixels } : {},
11568
- ...textSizeMeters !== void 0 ? { textSizeMeters } : {}
11837
+ ...textSizeMeters !== void 0 ? { textSizeMeters } : {},
11838
+ ...textJustify !== void 0 ? { textJustify } : {},
11839
+ ...textStyle !== void 0 ? { textStyle } : {},
11840
+ ...textMaxSizePixels !== void 0 ? { textMaxSizePixels } : {}
11569
11841
  },
11570
11842
  geometry
11571
11843
  };
@@ -11616,4 +11888,4 @@ function assertNever(value) {
11616
11888
  throw new Error(`Unhandled control measure kind: ${String(value)}`);
11617
11889
  }
11618
11890
  //#endregion
11619
- export { DEFAULT_BLOCK_ARROW_OPTIONS as $, DEFAULT_FLOT_OPTIONS as A, disruptDrawRule as At, DEFAULT_GENERIC_RECTANGLE_OPTIONS as B, haversineDistance as Bt, DEFAULT_SCREEN_OPTIONS as C, line23DrawRule as Ct, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS as D, attackByFireDrawRule as Dt, DEFAULT_FORTIFIED_LINE_OPTIONS as E, ambushDrawRule as Et, DEFAULT_GUARD_OPTIONS as F, pointOnMidpointPerpendicularAxis as Ft, DEFAULT_CANALIZE_OPTIONS as G, roundToFixed as Gt, DEFAULT_GENERIC_LINE_OPTIONS as H, unproject as Ht, DEFAULT_DELAY_OPTIONS as I, snapToMidpointPerpendicular as It, DEFAULT_BLOCK_MISSION_TASK_OPTIONS as J, DEFAULT_BYPASS_OPTIONS as K, DEFAULT_COVER_OPTIONS as L, createBaselineFrame as Lt, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS as M, computeDefaultMidpointPerpendicularPoint as Mt, DEFAULT_ENCIRCLEMENT_OPTIONS as N, createMidpointPerpendicularDrawRule as Nt, DEFAULT_HANDOVER_LINE_OPTIONS as O, point12DrawRule as Ot, DEFAULT_DISRUPT_OPTIONS as P, getMidpointPerpendicularSignedDistance as Pt, DEFAULT_BOUNDARY_OPTIONS as Q, DEFAULT_TACTICAL_ARROW_OPTIONS as R, calculateMetrics as Rt, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS as S, line24DrawRule as St, DEFAULT_FORTIFIED_AREA_OPTIONS as T, line1DrawRule as Tt, DEFAULT_GENERIC_CIRCLE_OPTIONS as U, EPSILON as Ut, DEFAULT_GENERIC_POLYGON_OPTIONS as V, project as Vt, DEFAULT_CLASSIC_ARROW_OPTIONS as W, getMetersPerPixel as Wt, DEFAULT_ENGINEER_WORK_LINE_OPTIONS as X, DEFAULT_GENERIC_C2_LINE_OPTIONS as Y, DEFAULT_LIGHT_LINE_OPTIONS as Z, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS as _, DEFAULT_AIRBORNE_ATTACK_OPTIONS as _t, DEFINITIONS as a, DEFAULT_ANTITANK_DITCH_OPTIONS as at, DEFAULT_MAIN_ATTACK_OPTIONS as b, supportByFireDrawRule as bt, getDefaultOptions as c, DEFAULT_AREA_DEFENSE_OPTIONS as ct, DEFAULT_TURN_OPTIONS as d, normalizeTextAmplifiers as dt, DEFAULT_BLOCK_OPTIONS as et, DEFAULT_SUPPORTING_ATTACK_OPTIONS as f, resolveAmplifierPlacement as ft, DEFAULT_PICKUP_ZONE_OPTIONS as g, DEFAULT_AMBUSH_OPTIONS as gt, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS as h, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS as ht, CONTROL_MEASURE_METADATA as i, DEFAULT_ANTITANK_WALL_OPTIONS as it, DEFAULT_FIX_OPTIONS as j, blockDrawRule as jt, DEFAULT_PHASE_LINE_OPTIONS as k, centerRadiusDrawRule as kt, listControlMeasureMetadata as l, TEXT_AMPLIFIER_FIELDS as lt, DEFAULT_STRONG_POINT_OPTIONS as m, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS as mt, resolveStyleHints as n, DEFAULT_ATTACK_HELICOPTER_OPTIONS as nt, getControlMeasureMetadata as o, DEFAULT_ASSEMBLY_AREA_OPTIONS as ot, DEFAULT_SUPPORT_BY_FIRE_OPTIONS as p, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS as pt, DEFAULT_BREACH_OPTIONS as q, CONTROL_MEASURE_IDS as r, DEFAULT_ATTACK_BY_FIRE_OPTIONS as rt, getControlMeasureMetadataByValue as s, DEFAULT_AREA_OF_OPERATIONS_OPTIONS as st, renderControlMeasure as t, DEFAULT_BATTLE_POSITION_OPTIONS as tt, DEFAULT_TURNING_MOVEMENT_OPTIONS as u, canonicalTextAmplifierKey as ut, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS as v, rectangleDrawRule as vt, DEFAULT_FRONTAL_ATTACK_OPTIONS as w, turnDrawRule as wt, DEFAULT_LANDING_ZONE_OPTIONS as x, line26DrawRule as xt, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS as y, axis1DrawRule as yt, DEFAULT_CLEAR_OPTIONS as z, computeInitialWidthPoint as zt };
11891
+ export { DEFAULT_BOUNDARY_OPTIONS as $, DEFAULT_FLOT_OPTIONS as A, centerRadiusDrawRule as At, DEFAULT_GENERIC_TEXT_OPTIONS as B, computeInitialWidthPoint as Bt, DEFAULT_SCREEN_OPTIONS as C, line24DrawRule as Ct, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS as D, ambushDrawRule as Dt, DEFAULT_FORTIFIED_LINE_OPTIONS as E, line1DrawRule as Et, DEFAULT_GUARD_OPTIONS as F, getMidpointPerpendicularSignedDistance as Ft, DEFAULT_CLASSIC_ARROW_OPTIONS as G, getMetersPerPixel as Gt, DEFAULT_GENERIC_POLYGON_OPTIONS as H, project as Ht, DEFAULT_DELAY_OPTIONS as I, pointOnMidpointPerpendicularAxis as It, DEFAULT_BREACH_OPTIONS as J, DEFAULT_CANALIZE_OPTIONS as K, roundToFixed as Kt, DEFAULT_COVER_OPTIONS as L, snapToMidpointPerpendicular as Lt, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS as M, blockDrawRule as Mt, DEFAULT_ENCIRCLEMENT_OPTIONS as N, computeDefaultMidpointPerpendicularPoint as Nt, DEFAULT_HANDOVER_LINE_OPTIONS as O, attackByFireDrawRule as Ot, DEFAULT_DISRUPT_OPTIONS as P, createMidpointPerpendicularDrawRule as Pt, DEFAULT_LIGHT_LINE_OPTIONS as Q, DEFAULT_TACTICAL_ARROW_OPTIONS as R, createBaselineFrame as Rt, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS as S, line26DrawRule as St, DEFAULT_FORTIFIED_AREA_OPTIONS as T, turnDrawRule as Tt, DEFAULT_GENERIC_LINE_OPTIONS as U, unproject as Ut, DEFAULT_GENERIC_RECTANGLE_OPTIONS as V, haversineDistance as Vt, DEFAULT_GENERIC_CIRCLE_OPTIONS as W, EPSILON as Wt, DEFAULT_GENERIC_C2_LINE_OPTIONS as X, DEFAULT_BLOCK_MISSION_TASK_OPTIONS as Y, DEFAULT_ENGINEER_WORK_LINE_OPTIONS as Z, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS as _, DEFAULT_AMBUSH_OPTIONS as _t, DEFINITIONS as a, DEFAULT_ANTITANK_WALL_OPTIONS as at, DEFAULT_MAIN_ATTACK_OPTIONS as b, axis1DrawRule as bt, getDefaultOptions as c, DEFAULT_AREA_OF_OPERATIONS_OPTIONS as ct, DEFAULT_TURN_OPTIONS as d, canonicalTextAmplifierKey as dt, DEFAULT_BLOCK_ARROW_OPTIONS as et, DEFAULT_SUPPORTING_ATTACK_OPTIONS as f, normalizeTextAmplifiers as ft, DEFAULT_PICKUP_ZONE_OPTIONS as g, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS as gt, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS as h, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS as ht, CONTROL_MEASURE_METADATA as i, DEFAULT_ATTACK_BY_FIRE_OPTIONS as it, DEFAULT_FIX_OPTIONS as j, disruptDrawRule as jt, DEFAULT_PHASE_LINE_OPTIONS as k, point12DrawRule as kt, listControlMeasureMetadata as l, DEFAULT_AREA_DEFENSE_OPTIONS as lt, DEFAULT_STRONG_POINT_OPTIONS as m, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS as mt, resolveStyleHints as n, DEFAULT_BATTLE_POSITION_OPTIONS as nt, getControlMeasureMetadata as o, DEFAULT_ANTITANK_DITCH_OPTIONS as ot, DEFAULT_SUPPORT_BY_FIRE_OPTIONS as p, resolveAmplifierPlacement as pt, DEFAULT_BYPASS_OPTIONS as q, CONTROL_MEASURE_IDS as r, DEFAULT_ATTACK_HELICOPTER_OPTIONS as rt, getControlMeasureMetadataByValue as s, DEFAULT_ASSEMBLY_AREA_OPTIONS as st, renderControlMeasure as t, DEFAULT_BLOCK_OPTIONS as tt, DEFAULT_TURNING_MOVEMENT_OPTIONS as u, TEXT_AMPLIFIER_FIELDS as ut, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS as v, DEFAULT_AIRBORNE_ATTACK_OPTIONS as vt, DEFAULT_FRONTAL_ATTACK_OPTIONS as w, line23DrawRule as wt, DEFAULT_LANDING_ZONE_OPTIONS as x, supportByFireDrawRule as xt, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS as y, rectangleDrawRule as yt, DEFAULT_CLEAR_OPTIONS as z, calculateMetrics as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbat-mapper/control-measures",
3
- "version": "0.2.0-alpha.22",
3
+ "version": "0.2.0-alpha.24",
4
4
  "description": "Library for drawing tactical graphics and control measures according to MIL-STD-2525 and APP-6 standards.",
5
5
  "license": "MIT",
6
6
  "author": "Orbat Mapper",