@orbat-mapper/control-measures 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{index-B9foUCfy.d.mts → index-DCgWC2Q8.d.mts} +30 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/preview/index.d.mts +1 -1
- package/dist/preview/index.mjs +1 -1
- package/dist/{renderControlMeasure-Jv6k67sO.mjs → renderControlMeasure-D6VScGE0.mjs} +206 -51
- package/media/sector.svg +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -222,6 +222,7 @@ code.
|
|
|
222
222
|
| <img src="media/polygon.svg" width="96" height="48" alt=""> | `polygon` | Polygon | `990102` |
|
|
223
223
|
| <img src="media/rectangle.svg" width="96" height="48" alt=""> | `rectangle` | Rectangle | `990103` |
|
|
224
224
|
| <img src="media/circle.svg" width="96" height="48" alt=""> | `circle` | Circle | `990104` |
|
|
225
|
+
| <img src="media/sector.svg" width="96" height="48" alt=""> | `sector` | Sector | `990105` |
|
|
225
226
|
| <img src="media/text.svg" width="96" height="48" alt=""> | `text` | Text | `990201` |
|
|
226
227
|
|
|
227
228
|
<!-- /AUTO-GENERATED:measures-table -->
|
|
@@ -43,6 +43,12 @@ interface ControlMeasureDrawRule {
|
|
|
43
43
|
* end when it needs to provide its own closed guide geometry.
|
|
44
44
|
*/
|
|
45
45
|
guidePoints?(points: readonly Position[]): Position[];
|
|
46
|
+
/**
|
|
47
|
+
* Snap an actively drawn or reshaped point to the rule's angular contract.
|
|
48
|
+
* TacticalDraw invokes this while Shift is held. Implementations must retain
|
|
49
|
+
* any non-angular dimensions they own (for example, a Sector point's range).
|
|
50
|
+
*/
|
|
51
|
+
constrainAngles?(points: readonly Position[], activePointIndex: number): Position[];
|
|
46
52
|
/**
|
|
47
53
|
* Number of trailing slots in the canonical control-point array that are
|
|
48
54
|
* NOT user-clicked spine vertices. For Axis1, this is 1 (the width handle
|
|
@@ -212,7 +218,7 @@ declare function normalizeTextAmplifiers(input: TextAmplifiers | undefined): Can
|
|
|
212
218
|
//#region src/metadata.d.ts
|
|
213
219
|
type ControlMeasureGeometryType = Geometry["type"];
|
|
214
220
|
type ControlMeasureGeometry = "point" | "line" | "area";
|
|
215
|
-
declare const DRAW_RULE_IDS: readonly ["Area1", "Area7", "Area8", "Area11", "Area12", "Area15", "Area17", "Area21", "Axis1", "Line1", "Line3", "Line9", "Line10", "Line23", "Line24", "Line26", "Line27", "Line29", "Point1", "Point2", "Point12", "Rectangle"];
|
|
221
|
+
declare const DRAW_RULE_IDS: readonly ["Area1", "Area7", "Area8", "Area11", "Area12", "Area15", "Area17", "Area21", "Axis1", "Line1", "Line3", "Line9", "Line10", "Line23", "Line24", "Line26", "Line27", "Line29", "Point1", "Point2", "Point12", "Rectangle", "Sector"];
|
|
216
222
|
type DrawRuleId = (typeof DRAW_RULE_IDS)[number];
|
|
217
223
|
declare const PARAMETER_PRESENTATION_TIERS: readonly ["primary", "standard", "advanced"];
|
|
218
224
|
type ParameterPresentationTier = (typeof PARAMETER_PRESENTATION_TIERS)[number];
|
|
@@ -596,6 +602,11 @@ declare const unproject: (x: number, y: number) => Position;
|
|
|
596
602
|
* so its ring and this readout agree exactly.
|
|
597
603
|
*/
|
|
598
604
|
declare const haversineDistance: (a: Position, b: Position) => number;
|
|
605
|
+
/**
|
|
606
|
+
* Initial great-circle bearing from `a` to `b`, in radians clockwise from
|
|
607
|
+
* north (0 = north, π/2 = east).
|
|
608
|
+
*/
|
|
609
|
+
declare const sphericalBearing: (a: Position, b: Position) => number;
|
|
599
610
|
//#endregion
|
|
600
611
|
//#region src/internal/sketch.d.ts
|
|
601
612
|
/**
|
|
@@ -1702,6 +1713,10 @@ interface FilledAreaOptions {
|
|
|
1702
1713
|
/** Fill the polygon interior; false renders only its outline. */
|
|
1703
1714
|
filled?: boolean;
|
|
1704
1715
|
}
|
|
1716
|
+
interface ArcResolutionOptions {
|
|
1717
|
+
/** Number of segments in a full 360° sweep. */
|
|
1718
|
+
resolution?: number;
|
|
1719
|
+
}
|
|
1705
1720
|
//#endregion
|
|
1706
1721
|
//#region src/generators/cm99-generic-graphics/line.d.ts
|
|
1707
1722
|
type GenericLineOptions = SmoothPathOptions;
|
|
@@ -1725,13 +1740,21 @@ declare function createGenericRectangle(coordinates: Position[], options?: Gener
|
|
|
1725
1740
|
}>;
|
|
1726
1741
|
//#endregion
|
|
1727
1742
|
//#region src/generators/cm99-generic-graphics/circle.d.ts
|
|
1728
|
-
|
|
1743
|
+
interface GenericCircleOptions extends FilledAreaOptions, ArcResolutionOptions {}
|
|
1729
1744
|
declare const DEFAULT_GENERIC_CIRCLE_OPTIONS: Required<GenericCircleOptions>;
|
|
1730
1745
|
declare function createGenericCircle(coordinates: Position[], options?: GenericCircleOptions): FeatureCollection<Polygon, {
|
|
1731
1746
|
part: string;
|
|
1732
1747
|
fill: boolean;
|
|
1733
1748
|
}>;
|
|
1734
1749
|
//#endregion
|
|
1750
|
+
//#region src/generators/cm99-generic-graphics/sector.d.ts
|
|
1751
|
+
interface GenericSectorOptions extends FilledAreaOptions, ArcResolutionOptions {}
|
|
1752
|
+
declare const DEFAULT_GENERIC_SECTOR_OPTIONS: Required<GenericSectorOptions>;
|
|
1753
|
+
declare function createGenericSector(coordinates: Position[], options?: GenericSectorOptions): FeatureCollection<Polygon, {
|
|
1754
|
+
part: string;
|
|
1755
|
+
fill: boolean;
|
|
1756
|
+
}>;
|
|
1757
|
+
//#endregion
|
|
1735
1758
|
//#region src/generators/cm99-generic-graphics/text.d.ts
|
|
1736
1759
|
/** Configuration options for the generic Text control measure. */
|
|
1737
1760
|
interface GenericTextOptions {
|
|
@@ -2804,6 +2827,7 @@ declare const DEFINITIONS: {
|
|
|
2804
2827
|
polygon: ControlMeasureDefinition<"polygon", typeof createGenericPolygon>;
|
|
2805
2828
|
rectangle: ControlMeasureDefinition<"rectangle", typeof createGenericRectangle>;
|
|
2806
2829
|
circle: ControlMeasureDefinition<"circle", typeof createGenericCircle>;
|
|
2830
|
+
sector: ControlMeasureDefinition<"sector", typeof createGenericSector>;
|
|
2807
2831
|
text: ControlMeasureDefinition<"text", typeof createGenericText>;
|
|
2808
2832
|
"airborne-attack": ControlMeasureDefinition<"airborne-attack", typeof createAirborneAttack>;
|
|
2809
2833
|
"attack-helicopter": ControlMeasureDefinition<"attack-helicopter", typeof createAttackHelicopter>;
|
|
@@ -3228,6 +3252,9 @@ declare const axis1DrawRule: ControlMeasureDrawRule;
|
|
|
3228
3252
|
//#region src/draw-rules/rectangle.d.ts
|
|
3229
3253
|
declare const rectangleDrawRule: ControlMeasureDrawRule;
|
|
3230
3254
|
//#endregion
|
|
3255
|
+
//#region src/draw-rules/sector.d.ts
|
|
3256
|
+
declare const sectorDrawRule: ControlMeasureDrawRule;
|
|
3257
|
+
//#endregion
|
|
3231
3258
|
//#region src/generators/cm14-maneuver-lines/ambush.d.ts
|
|
3232
3259
|
/**
|
|
3233
3260
|
* Configuration options for the Ambush tactical symbol.
|
|
@@ -3248,4 +3275,4 @@ interface AmbushOptions {
|
|
|
3248
3275
|
}
|
|
3249
3276
|
declare const DEFAULT_AMBUSH_OPTIONS: Required<AmbushOptions>;
|
|
3250
3277
|
//#endregion
|
|
3251
|
-
export {
|
|
3278
|
+
export { getControlMeasureMetadataByValue as $, GenericLineOptions as $n, EngineerWorkLineOptions as $r, DelayOptions as $t, BaselineFrameOrigin as A, TextAmplifierField as Ai, DEFAULT_PHASE_LINE_OPTIONS as An, FeaturePartProps as Ar, AntitankDitchOptions as At, foldsBoxTransformOptions as B, AirborneAttackOptions as Bn, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS as Br, DEFAULT_RETIRE_OPTIONS as Bt, createMidpointPerpendicularDrawRule as C, resolveParameterSemanticRole as Ci, ReleaseLineOptions as Cn, AreaDefenseOptions as Cr, FrontalAttackOptions as Ct, BaselineFrame as D, GeneratedLabelKey as Di, DEFAULT_BRIDGEHEAD_LINE_OPTIONS as Dn, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS as Dr, FortifiedLineOptions as Dt, snapToMidpointPerpendicular as E, CanonicalTextAmplifiers as Ei, BridgeheadLineOptions as En, EncirclementOptions as Er, DEFAULT_FORTIFIED_LINE_OPTIONS as Et, SimpleStyleProps as F, resolveAmplifierPlacement as Fi, DEFAULT_ATTACK_BY_FIRE_OPTIONS as Fn, SecondaryDirectionOfFireOptions as Fr, WithdrawOptions as Ft, cloneControlMeasure as G, GenericSectorOptions as Gn, StrongPointOptions as Gr, PenetrateOptions as Gt, RenderOptions as H, DEFAULT_GENERIC_TEXT_OPTIONS as Hn, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS as Hr, DEFAULT_REARWARD_PASSAGE_OF_LINES_OPTIONS as Ht, SimpleStyleRender as I, AnchorTransformEvent as Ii, DEFAULT_SUPPORT_BY_FIRE_OPTIONS as In, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS as Ir, DEFAULT_SEIZE_OPTIONS as It, CONTROL_MEASURE_METADATA as J, DEFAULT_GENERIC_RECTANGLE_OPTIONS as Jn, ControlMeasureStyle as Jr, DEFAULT_DISRUPT_MISSION_TASK_OPTIONS as Jt, isKind as K, DEFAULT_GENERIC_CIRCLE_OPTIONS as Kn, BattlePositionOptions as Kr, DEFAULT_GUARD_OPTIONS as Kt, toSimpleStyle as L, ControlMeasureDrawRule as Li, SupportByFireOptions as Ln, PrincipalDirectionOfFireOptions as Lr, SeizeOptions as Lt, EPSILON as M, TextAmplifiers as Mi, DEFAULT_FLOT_OPTIONS as Mn, controlMeasureIdFromFeature as Mr, DEFAULT_WITHDRAW_UNDER_PRESSURE_OPTIONS as Mt, getMetersPerPixel as N, canonicalTextAmplifierKey as Ni, FLOTOptions as Nn, DEFAULT_SECONDARY_DIRECTION_OF_FIRE_OPTIONS as Nr, WithdrawUnderPressureOptions as Nt, BaselineFrameNormal as O, LabelPlacementOverride as Oi, DEFAULT_FORWARD_EDGE_OF_BATTLE_AREA_OPTIONS as On, FinalProtectiveFireOptions as Or, AntitankWallOptions as Ot, roundToFixed as P, normalizeTextAmplifiers as Pi, AttackByFireOptions as Pn, SECONDARY_DIRECTION_OF_FIRE_DASH as Pr, DEFAULT_WITHDRAW_OPTIONS as Pt, getControlMeasureMetadata as Q, DEFAULT_GENERIC_LINE_OPTIONS as Qn, DEFAULT_ENGINEER_WORK_LINE_OPTIONS as Qr, DEFAULT_DELAY_OPTIONS as Qt, resolveStyleHints as R, AttackHelicopterOptions as Rn, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS as Rr, DEFAULT_SCREEN_OPTIONS as Rt, computeDefaultMidpointPerpendicularPoint as S, resolveParameterPresentationTier as Si, DEFAULT_RELEASE_LINE_OPTIONS as Sn, DEFAULT_ASSEMBLY_AREA_OPTIONS as Sr, DEFAULT_FRONTAL_ATTACK_OPTIONS as St, pointOnMidpointPerpendicularAxis as T, AmplifierPlacements as Ti, HoldingLineOptions as Tn, DEFAULT_ENCIRCLEMENT_OPTIONS as Tr, FortifiedAreaOptions as Tt, renderControlMeasure as U, GenericTextOptions as Un, DirectionOfAttackAviationOptions as Ur, RearwardPassageOfLinesOptions as Ut, freezeOrientationOptions as V, DEFAULT_AIRBORNE_ATTACK_OPTIONS as Vn, DirectionOfMainAttackOptions as Vr, RetireOptions as Vt, ControlMeasure as W, DEFAULT_GENERIC_SECTOR_OPTIONS as Wn, DEFAULT_STRONG_POINT_OPTIONS as Wr, DEFAULT_PENETRATE_OPTIONS as Wt, ControlMeasureKind as X, DEFAULT_GENERIC_POLYGON_OPTIONS as Xn, DEFAULT_GENERIC_C2_LINE_OPTIONS as Xr, DEFAULT_DISENGAGE_OPTIONS as Xt, ControlMeasureId as Y, GenericRectangleOptions as Yn, FillPattern as Yr, DisruptMissionTaskOptions as Yt, OptionsByKind as Z, GenericPolygonOptions as Zn, GenericC2LineOptions as Zr, DisengageOptions as Zt, penetrateDrawRule as _, ParamDescriptor as _i, DEFAULT_BLOCK_MISSION_TASK_OPTIONS as _n, DEFAULT_LANDING_ZONE_OPTIONS as _r, DisruptOptions as _t, axis1DrawRule as a, project as ai, DEFAULT_COUNTERATTACK_BY_FIRE_OPTIONS as an, DEFAULT_CLASSIC_ARROW_OPTIONS as ar, ObstacleBypassDifficultOptions as at, blockDrawRule as b, TextAmplifierDescriptor as bi, DEFAULT_HANDOVER_LINE_OPTIONS as bn, JointTacticalActionAreaOptions as br, DEFAULT_TURNING_MOVEMENT_OPTIONS as bt, line26DrawRule as c, BoundaryOptions as ci, ClearOptions as cn, DEFAULT_MAIN_ATTACK_OPTIONS as cr, DEFAULT_MINEFIELD_OPTIONS as ct, turnDrawRule as d, ControlMeasureFillCapability as di, DEFAULT_CANALIZE_OPTIONS as dn, computeInitialWidthPoint as dr, TurnOptions as dt, DEFAULT_LIGHT_LINE_OPTIONS as ei, CoverOptions as en, BlockArrowHeadStyle as er, getDefaultOptions as et, line1DrawRule as f, ControlMeasureGeometry as fi, BypassOptions as fn, AreaOfOperationsOptions as fr, DEFAULT_FIX_MISSION_TASK_OPTIONS as ft, point12DrawRule as g, PARAMETER_PRESENTATION_TIERS as gi, BlockMissionTaskOptions as gn, MineType as gr, DEFAULT_DISRUPT_OPTIONS as gt, staticPointDrawRule as h, ControlMeasurePaintCapability as hi, DEFAULT_BREACH_OPTIONS as hn, PickupZoneOptions as hr, FixOptions as ht, rectangleDrawRule as i, haversineDistance as ii, CounterattackByFireOptions as in, ClassicArrowOptions as ir, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS as it, createBaselineFrame as j, TextAmplifierKey as ji, PhaseLineOptions as jn, StyleHints as jr, DEFAULT_ANTITANK_DITCH_OPTIONS as jt, BaselineFrameOptions as k, TEXT_AMPLIFIER_FIELDS as ki, ForwardEdgeOfBattleAreaOptions as kn, ControlMeasureRender as kr, DEFAULT_ANTITANK_WALL_OPTIONS as kt, line24DrawRule as l, DEFAULT_BOUNDARY_OPTIONS as li, DEFAULT_CLEAR_OPTIONS as ln, MainAttackOptions as lr, MinefieldOptions as lt, attackByFireDrawRule as m, ControlMeasureMetadata as mi, BreachOptions as mn, DEFAULT_PICKUP_ZONE_OPTIONS as mr, DEFAULT_FIX_OPTIONS as mt, DEFAULT_AMBUSH_OPTIONS as n, LabelSizeOptions as ni, DEFAULT_TACTICAL_ARROW_OPTIONS as nn, DEFAULT_BLOCK_ARROW_OPTIONS as nr, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS as nt, supportByFireDrawRule as o, sphericalBearing as oi, CounterattackOptions as on, DEFAULT_SUPPORTING_ATTACK_OPTIONS as or, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS as ot, ambushDrawRule as p, ControlMeasureGeometryType as pi, DEFAULT_BYPASS_OPTIONS as pn, DEFAULT_AREA_OF_OPERATIONS_OPTIONS as pr, FixMissionTaskOptions as pt, CONTROL_MEASURE_IDS as q, GenericCircleOptions as qn, DEFAULT_BATTLE_POSITION_OPTIONS as qr, GuardOptions as qt, sectorDrawRule as r, Point2D as ri, TacticalArrowOptions as rn, ClassicArrowHeadStyle as rr, ObstacleBypassImpossibleOptions as rt, line27DrawRule as s, unproject as si, DEFAULT_COUNTERATTACK_OPTIONS as sn, SupportingAttackOptions as sr, ObstacleBypassEasyOptions as st, AmbushOptions as t, LightLineOptions as ti, DEFAULT_COVER_OPTIONS as tn, BlockArrowOptions as tr, listControlMeasureMetadata as tt, line23DrawRule as u, BoxTransformDelta as ui, CanalizeOptions as un, calculateMetrics as ur, DEFAULT_TURN_OPTIONS as ut, centerRadiusDrawRule as v, ParameterPresentationTier as vi, BattleHandoverLineOptions as vn, LandingZoneOptions as vr, BlockOptions as vt, getMidpointPerpendicularSignedDistance as w, AmplifierPlacement as wi, DEFAULT_HOLDING_LINE_OPTIONS as wn, DEFAULT_AREA_DEFENSE_OPTIONS as wr, DEFAULT_FORTIFIED_AREA_OPTIONS as wt, MidpointPerpendicularDrawRuleOptions as x, parameterPresentationTierRank as xi, HandoverLineOptions as xn, AssemblyAreaOptions as xr, TurningMovementOptions as xt, disruptDrawRule as y, ParameterSemanticRole as yi, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS as yn, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS as yr, DEFAULT_BLOCK_OPTIONS as yt, applyBoxTransformOptions as z, DEFAULT_ATTACK_HELICOPTER_OPTIONS as zn, DirectionOfSupportingAttackOptions as zr, ScreenOptions as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
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 BridgeheadLineOptions, type BypassOptions, CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, type CanalizeOptions, type CanonicalTextAmplifiers, type ClassicArrowHeadStyle, type ClassicArrowOptions, type ClearOptions, type ControlMeasure, type ControlMeasureDrawRule, type ControlMeasureFillCapability, type ControlMeasureGeometry, type ControlMeasureGeometryType, type ControlMeasureId, type ControlMeasureKind, type ControlMeasureMetadata, type ControlMeasurePaintCapability, type ControlMeasureRender, type ControlMeasureStyle, type CounterattackByFireOptions, type CounterattackOptions, 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_BRIDGEHEAD_LINE_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLASSIC_ARROW_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_COUNTERATTACK_BY_FIRE_OPTIONS, DEFAULT_COUNTERATTACK_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_DISENGAGE_OPTIONS, DEFAULT_DISRUPT_MISSION_TASK_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_ENGINEER_WORK_LINE_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_MISSION_TASK_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_FORWARD_EDGE_OF_BATTLE_AREA_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_HOLDING_LINE_OPTIONS, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, DEFAULT_LANDING_ZONE_OPTIONS, DEFAULT_LIGHT_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_MINEFIELD_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PENETRATE_OPTIONS, DEFAULT_PHASE_LINE_OPTIONS, DEFAULT_PICKUP_ZONE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_REARWARD_PASSAGE_OF_LINES_OPTIONS, DEFAULT_RELEASE_LINE_OPTIONS, DEFAULT_RETIRE_OPTIONS, DEFAULT_SCREEN_OPTIONS, DEFAULT_SECONDARY_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SEIZE_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, DEFAULT_WITHDRAW_OPTIONS, DEFAULT_WITHDRAW_UNDER_PRESSURE_OPTIONS, type DelayOptions, type DirectionOfAttackAviationOptions, type DirectionOfMainAttackOptions, type DirectionOfSupportingAttackOptions, type DisengageOptions, type DisruptMissionTaskOptions, type DisruptOptions, EPSILON, type EncirclementOptions, type EngineerWorkLineOptions, type FLOTOptions, type FeaturePartProps, type FillPattern, type FinalProtectiveFireOptions, type FixMissionTaskOptions, type FixOptions, type FortifiedAreaOptions, type FortifiedLineOptions, type ForwardEdgeOfBattleAreaOptions, type FrontalAttackOptions, type GeneratedLabelKey, type GenericC2LineOptions, type GenericCircleOptions, type GenericLineOptions, type GenericPolygonOptions, type GenericRectangleOptions, type GenericTextOptions, type GuardOptions, type HandoverLineOptions, type HoldingLineOptions, type JointTacticalActionAreaOptions, type LabelPlacementOverride, type LabelSizeOptions, type LandingZoneOptions, type LightLineOptions, type MainAttackOptions, type MidpointPerpendicularDrawRuleOptions, type MineType, type MinefieldOptions, type ObstacleBypassDifficultOptions, type ObstacleBypassEasyOptions, type ObstacleBypassImpossibleOptions, type OptionsByKind, PARAMETER_PRESENTATION_TIERS, type ParamDescriptor, type ParameterPresentationTier, type ParameterSemanticRole, type PenetrateOptions, type PhaseLineOptions, type PickupZoneOptions, type Point2D, type PrincipalDirectionOfFireOptions, type RearwardPassageOfLinesOptions, type ReleaseLineOptions, type RenderOptions, type RetireOptions, SECONDARY_DIRECTION_OF_FIRE_DASH, type ScreenOptions, type SecondaryDirectionOfFireOptions, type SeizeOptions, 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, type WithdrawOptions, type WithdrawUnderPressureOptions, ambushDrawRule, applyBoxTransformOptions, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, foldsBoxTransformOptions, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, haversineDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, line27DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, parameterPresentationTierRank, penetrateDrawRule, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveParameterPresentationTier, resolveParameterSemanticRole, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, staticPointDrawRule, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
|
1
|
+
import { $ as getControlMeasureMetadataByValue, $n as GenericLineOptions, $r as EngineerWorkLineOptions, $t as DelayOptions, A as BaselineFrameOrigin, Ai as TextAmplifierField, An as DEFAULT_PHASE_LINE_OPTIONS, Ar as FeaturePartProps, At as AntitankDitchOptions, B as foldsBoxTransformOptions, Bn as AirborneAttackOptions, Br as DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, Bt as DEFAULT_RETIRE_OPTIONS, C as createMidpointPerpendicularDrawRule, Ci as resolveParameterSemanticRole, Cn as ReleaseLineOptions, Cr as AreaDefenseOptions, Ct as FrontalAttackOptions, D as BaselineFrame, Di as GeneratedLabelKey, Dn as DEFAULT_BRIDGEHEAD_LINE_OPTIONS, Dr as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, Dt as FortifiedLineOptions, E as snapToMidpointPerpendicular, Ei as CanonicalTextAmplifiers, En as BridgeheadLineOptions, Er as EncirclementOptions, Et as DEFAULT_FORTIFIED_LINE_OPTIONS, F as SimpleStyleProps, Fi as resolveAmplifierPlacement, Fn as DEFAULT_ATTACK_BY_FIRE_OPTIONS, Fr as SecondaryDirectionOfFireOptions, Ft as WithdrawOptions, G as cloneControlMeasure, Gn as GenericSectorOptions, Gr as StrongPointOptions, Gt as PenetrateOptions, H as RenderOptions, Hn as DEFAULT_GENERIC_TEXT_OPTIONS, Hr as DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, Ht as DEFAULT_REARWARD_PASSAGE_OF_LINES_OPTIONS, I as SimpleStyleRender, Ii as AnchorTransformEvent, In as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, Ir as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, It as DEFAULT_SEIZE_OPTIONS, J as CONTROL_MEASURE_METADATA, Jn as DEFAULT_GENERIC_RECTANGLE_OPTIONS, Jr as ControlMeasureStyle, Jt as DEFAULT_DISRUPT_MISSION_TASK_OPTIONS, K as isKind, Kn as DEFAULT_GENERIC_CIRCLE_OPTIONS, Kr as BattlePositionOptions, Kt as DEFAULT_GUARD_OPTIONS, L as toSimpleStyle, Li as ControlMeasureDrawRule, Ln as SupportByFireOptions, Lr as PrincipalDirectionOfFireOptions, Lt as SeizeOptions, M as EPSILON, Mi as TextAmplifiers, Mn as DEFAULT_FLOT_OPTIONS, Mr as controlMeasureIdFromFeature, Mt as DEFAULT_WITHDRAW_UNDER_PRESSURE_OPTIONS, N as getMetersPerPixel, Ni as canonicalTextAmplifierKey, Nn as FLOTOptions, Nr as DEFAULT_SECONDARY_DIRECTION_OF_FIRE_OPTIONS, Nt as WithdrawUnderPressureOptions, O as BaselineFrameNormal, Oi as LabelPlacementOverride, On as DEFAULT_FORWARD_EDGE_OF_BATTLE_AREA_OPTIONS, Or as FinalProtectiveFireOptions, Ot as AntitankWallOptions, P as roundToFixed, Pi as normalizeTextAmplifiers, Pn as AttackByFireOptions, Pr as SECONDARY_DIRECTION_OF_FIRE_DASH, Pt as DEFAULT_WITHDRAW_OPTIONS, Q as getControlMeasureMetadata, Qn as DEFAULT_GENERIC_LINE_OPTIONS, Qr as DEFAULT_ENGINEER_WORK_LINE_OPTIONS, Qt as DEFAULT_DELAY_OPTIONS, R as resolveStyleHints, Rn as AttackHelicopterOptions, Rr as DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, Rt as DEFAULT_SCREEN_OPTIONS, S as computeDefaultMidpointPerpendicularPoint, Si as resolveParameterPresentationTier, Sn as DEFAULT_RELEASE_LINE_OPTIONS, Sr as DEFAULT_ASSEMBLY_AREA_OPTIONS, St as DEFAULT_FRONTAL_ATTACK_OPTIONS, T as pointOnMidpointPerpendicularAxis, Ti as AmplifierPlacements, Tn as HoldingLineOptions, Tr as DEFAULT_ENCIRCLEMENT_OPTIONS, Tt as FortifiedAreaOptions, U as renderControlMeasure, Un as GenericTextOptions, Ur as DirectionOfAttackAviationOptions, Ut as RearwardPassageOfLinesOptions, V as freezeOrientationOptions, Vn as DEFAULT_AIRBORNE_ATTACK_OPTIONS, Vr as DirectionOfMainAttackOptions, Vt as RetireOptions, W as ControlMeasure, Wn as DEFAULT_GENERIC_SECTOR_OPTIONS, Wr as DEFAULT_STRONG_POINT_OPTIONS, Wt as DEFAULT_PENETRATE_OPTIONS, X as ControlMeasureKind, Xn as DEFAULT_GENERIC_POLYGON_OPTIONS, Xr as DEFAULT_GENERIC_C2_LINE_OPTIONS, Xt as DEFAULT_DISENGAGE_OPTIONS, Y as ControlMeasureId, Yn as GenericRectangleOptions, Yr as FillPattern, Yt as DisruptMissionTaskOptions, Z as OptionsByKind, Zn as GenericPolygonOptions, Zr as GenericC2LineOptions, Zt as DisengageOptions, _ as penetrateDrawRule, _i as ParamDescriptor, _n as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, _r as DEFAULT_LANDING_ZONE_OPTIONS, _t as DisruptOptions, a as axis1DrawRule, ai as project, an as DEFAULT_COUNTERATTACK_BY_FIRE_OPTIONS, ar as DEFAULT_CLASSIC_ARROW_OPTIONS, at as ObstacleBypassDifficultOptions, b as blockDrawRule, bi as TextAmplifierDescriptor, bn as DEFAULT_HANDOVER_LINE_OPTIONS, br as JointTacticalActionAreaOptions, bt as DEFAULT_TURNING_MOVEMENT_OPTIONS, c as line26DrawRule, ci as BoundaryOptions, cn as ClearOptions, cr as DEFAULT_MAIN_ATTACK_OPTIONS, ct as DEFAULT_MINEFIELD_OPTIONS, d as turnDrawRule, di as ControlMeasureFillCapability, dn as DEFAULT_CANALIZE_OPTIONS, dr as computeInitialWidthPoint, dt as TurnOptions, ei as DEFAULT_LIGHT_LINE_OPTIONS, en as CoverOptions, er as BlockArrowHeadStyle, et as getDefaultOptions, f as line1DrawRule, fi as ControlMeasureGeometry, fn as BypassOptions, fr as AreaOfOperationsOptions, ft as DEFAULT_FIX_MISSION_TASK_OPTIONS, g as point12DrawRule, gi as PARAMETER_PRESENTATION_TIERS, gn as BlockMissionTaskOptions, gr as MineType, gt as DEFAULT_DISRUPT_OPTIONS, h as staticPointDrawRule, hi as ControlMeasurePaintCapability, hn as DEFAULT_BREACH_OPTIONS, hr as PickupZoneOptions, ht as FixOptions, i as rectangleDrawRule, ii as haversineDistance, in as CounterattackByFireOptions, ir as ClassicArrowOptions, it as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, j as createBaselineFrame, ji as TextAmplifierKey, jn as PhaseLineOptions, jr as StyleHints, jt as DEFAULT_ANTITANK_DITCH_OPTIONS, k as BaselineFrameOptions, ki as TEXT_AMPLIFIER_FIELDS, kn as ForwardEdgeOfBattleAreaOptions, kr as ControlMeasureRender, kt as DEFAULT_ANTITANK_WALL_OPTIONS, l as line24DrawRule, li as DEFAULT_BOUNDARY_OPTIONS, ln as DEFAULT_CLEAR_OPTIONS, lr as MainAttackOptions, lt as MinefieldOptions, m as attackByFireDrawRule, mi as ControlMeasureMetadata, mn as BreachOptions, mr as DEFAULT_PICKUP_ZONE_OPTIONS, mt as DEFAULT_FIX_OPTIONS, n as DEFAULT_AMBUSH_OPTIONS, ni as LabelSizeOptions, nn as DEFAULT_TACTICAL_ARROW_OPTIONS, nr as DEFAULT_BLOCK_ARROW_OPTIONS, nt as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, o as supportByFireDrawRule, oi as sphericalBearing, on as CounterattackOptions, or as DEFAULT_SUPPORTING_ATTACK_OPTIONS, ot as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, p as ambushDrawRule, pi as ControlMeasureGeometryType, pn as DEFAULT_BYPASS_OPTIONS, pr as DEFAULT_AREA_OF_OPERATIONS_OPTIONS, pt as FixMissionTaskOptions, q as CONTROL_MEASURE_IDS, qn as GenericCircleOptions, qr as DEFAULT_BATTLE_POSITION_OPTIONS, qt as GuardOptions, r as sectorDrawRule, ri as Point2D, rn as TacticalArrowOptions, rr as ClassicArrowHeadStyle, rt as ObstacleBypassImpossibleOptions, s as line27DrawRule, si as unproject, sn as DEFAULT_COUNTERATTACK_OPTIONS, sr as SupportingAttackOptions, st as ObstacleBypassEasyOptions, t as AmbushOptions, ti as LightLineOptions, tn as DEFAULT_COVER_OPTIONS, tr as BlockArrowOptions, tt as listControlMeasureMetadata, u as line23DrawRule, ui as BoxTransformDelta, un as CanalizeOptions, ur as calculateMetrics, ut as DEFAULT_TURN_OPTIONS, v as centerRadiusDrawRule, vi as ParameterPresentationTier, vn as BattleHandoverLineOptions, vr as LandingZoneOptions, vt as BlockOptions, w as getMidpointPerpendicularSignedDistance, wi as AmplifierPlacement, wn as DEFAULT_HOLDING_LINE_OPTIONS, wr as DEFAULT_AREA_DEFENSE_OPTIONS, wt as DEFAULT_FORTIFIED_AREA_OPTIONS, x as MidpointPerpendicularDrawRuleOptions, xi as parameterPresentationTierRank, xn as HandoverLineOptions, xr as AssemblyAreaOptions, xt as TurningMovementOptions, y as disruptDrawRule, yi as ParameterSemanticRole, yn as DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, yr as DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, yt as DEFAULT_BLOCK_OPTIONS, z as applyBoxTransformOptions, zn as DEFAULT_ATTACK_HELICOPTER_OPTIONS, zr as DirectionOfSupportingAttackOptions, zt as ScreenOptions } from "./index-DCgWC2Q8.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 BridgeheadLineOptions, type BypassOptions, CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, type CanalizeOptions, type CanonicalTextAmplifiers, type ClassicArrowHeadStyle, type ClassicArrowOptions, type ClearOptions, type ControlMeasure, type ControlMeasureDrawRule, type ControlMeasureFillCapability, type ControlMeasureGeometry, type ControlMeasureGeometryType, type ControlMeasureId, type ControlMeasureKind, type ControlMeasureMetadata, type ControlMeasurePaintCapability, type ControlMeasureRender, type ControlMeasureStyle, type CounterattackByFireOptions, type CounterattackOptions, 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_BRIDGEHEAD_LINE_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLASSIC_ARROW_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_COUNTERATTACK_BY_FIRE_OPTIONS, DEFAULT_COUNTERATTACK_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_DISENGAGE_OPTIONS, DEFAULT_DISRUPT_MISSION_TASK_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_ENGINEER_WORK_LINE_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_MISSION_TASK_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_FORWARD_EDGE_OF_BATTLE_AREA_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_SECTOR_OPTIONS, DEFAULT_GENERIC_TEXT_OPTIONS, DEFAULT_GUARD_OPTIONS, DEFAULT_HANDOVER_LINE_OPTIONS, DEFAULT_HOLDING_LINE_OPTIONS, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, DEFAULT_LANDING_ZONE_OPTIONS, DEFAULT_LIGHT_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_MINEFIELD_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PENETRATE_OPTIONS, DEFAULT_PHASE_LINE_OPTIONS, DEFAULT_PICKUP_ZONE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_REARWARD_PASSAGE_OF_LINES_OPTIONS, DEFAULT_RELEASE_LINE_OPTIONS, DEFAULT_RETIRE_OPTIONS, DEFAULT_SCREEN_OPTIONS, DEFAULT_SECONDARY_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SEIZE_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, DEFAULT_WITHDRAW_OPTIONS, DEFAULT_WITHDRAW_UNDER_PRESSURE_OPTIONS, type DelayOptions, type DirectionOfAttackAviationOptions, type DirectionOfMainAttackOptions, type DirectionOfSupportingAttackOptions, type DisengageOptions, type DisruptMissionTaskOptions, type DisruptOptions, EPSILON, type EncirclementOptions, type EngineerWorkLineOptions, type FLOTOptions, type FeaturePartProps, type FillPattern, type FinalProtectiveFireOptions, type FixMissionTaskOptions, type FixOptions, type FortifiedAreaOptions, type FortifiedLineOptions, type ForwardEdgeOfBattleAreaOptions, type FrontalAttackOptions, type GeneratedLabelKey, type GenericC2LineOptions, type GenericCircleOptions, type GenericLineOptions, type GenericPolygonOptions, type GenericRectangleOptions, type GenericSectorOptions, type GenericTextOptions, type GuardOptions, type HandoverLineOptions, type HoldingLineOptions, type JointTacticalActionAreaOptions, type LabelPlacementOverride, type LabelSizeOptions, type LandingZoneOptions, type LightLineOptions, type MainAttackOptions, type MidpointPerpendicularDrawRuleOptions, type MineType, type MinefieldOptions, type ObstacleBypassDifficultOptions, type ObstacleBypassEasyOptions, type ObstacleBypassImpossibleOptions, type OptionsByKind, PARAMETER_PRESENTATION_TIERS, type ParamDescriptor, type ParameterPresentationTier, type ParameterSemanticRole, type PenetrateOptions, type PhaseLineOptions, type PickupZoneOptions, type Point2D, type PrincipalDirectionOfFireOptions, type RearwardPassageOfLinesOptions, type ReleaseLineOptions, type RenderOptions, type RetireOptions, SECONDARY_DIRECTION_OF_FIRE_DASH, type ScreenOptions, type SecondaryDirectionOfFireOptions, type SeizeOptions, 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, type WithdrawOptions, type WithdrawUnderPressureOptions, ambushDrawRule, applyBoxTransformOptions, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, foldsBoxTransformOptions, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, haversineDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, line27DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, parameterPresentationTierRank, penetrateDrawRule, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveParameterPresentationTier, resolveParameterSemanticRole, resolveStyleHints, roundToFixed, sectorDrawRule, snapToMidpointPerpendicular, sphericalBearing, staticPointDrawRule, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as DEFAULT_TACTICAL_ARROW_OPTIONS, $t as
|
|
1
|
+
import { $ as DEFAULT_TACTICAL_ARROW_OPTIONS, $t as centerRadiusDrawRule, A as DEFAULT_REARWARD_PASSAGE_OF_LINES_OPTIONS, At as DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS, B as DEFAULT_BRIDGEHEAD_LINE_OPTIONS, Bt as axis1DrawRule, C as DEFAULT_LANDING_ZONE_OPTIONS, Ct as DEFAULT_ATTACK_BY_FIRE_OPTIONS, D as DEFAULT_SEIZE_OPTIONS, Dt as DEFAULT_AREA_OF_OPERATIONS_OPTIONS, E as DEFAULT_WITHDRAW_OPTIONS, Et as DEFAULT_ASSEMBLY_AREA_OPTIONS, F as DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS, Ft as resolveAmplifierPlacement, G as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, Gt as line23DrawRule, H as DEFAULT_FLOT_OPTIONS, Ht as line27DrawRule, I as DEFAULT_HANDOVER_LINE_OPTIONS, It as DEFAULT_AMBUSH_OPTIONS, J as DEFAULT_GUARD_OPTIONS, Jt as ambushDrawRule, K as DEFAULT_ENCIRCLEMENT_OPTIONS, Kt as turnDrawRule, L as DEFAULT_FORWARD_EDGE_OF_BATTLE_AREA_OPTIONS, Lt as DEFAULT_AIRBORNE_ATTACK_OPTIONS, M as DEFAULT_FRONTAL_ATTACK_OPTIONS, Mt as TEXT_AMPLIFIER_FIELDS, N as DEFAULT_FORTIFIED_AREA_OPTIONS, Nt as canonicalTextAmplifierKey, O as DEFAULT_SCREEN_OPTIONS, Ot as DEFAULT_AREA_DEFENSE_OPTIONS, P as DEFAULT_FORTIFIED_LINE_OPTIONS, Pt as normalizeTextAmplifiers, Q as DEFAULT_COVER_OPTIONS, Qt as penetrateDrawRule, R as DEFAULT_RELEASE_LINE_OPTIONS, Rt as sectorDrawRule, S as DEFAULT_MAIN_ATTACK_OPTIONS, St as DEFAULT_ATTACK_HELICOPTER_OPTIONS, T as DEFAULT_WITHDRAW_UNDER_PRESSURE_OPTIONS, Tt as DEFAULT_ANTITANK_DITCH_OPTIONS, U as DEFAULT_FIX_MISSION_TASK_OPTIONS, Ut as line26DrawRule, V as DEFAULT_PHASE_LINE_OPTIONS, Vt as supportByFireDrawRule, W as DEFAULT_FIX_OPTIONS, Wt as line24DrawRule, X as DEFAULT_DISENGAGE_OPTIONS, Xt as staticPointDrawRule, Y as DEFAULT_DISRUPT_MISSION_TASK_OPTIONS, Yt as attackByFireDrawRule, Z as DEFAULT_DELAY_OPTIONS, Zt as point12DrawRule, _ as DEFAULT_PICKUP_ZONE_OPTIONS, _t as DEFAULT_LIGHT_LINE_OPTIONS, a as DEFINITIONS, an as pointOnMidpointPerpendicularAxis, at as DEFAULT_GENERIC_SECTOR_OPTIONS, b as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, bt as DEFAULT_BLOCK_OPTIONS, c as getDefaultOptions, cn as calculateMetrics, ct as DEFAULT_GENERIC_LINE_OPTIONS, d as DEFAULT_TURN_OPTIONS, dn as project, dt as DEFAULT_CANALIZE_OPTIONS, en as disruptDrawRule, et as DEFAULT_COUNTERATTACK_BY_FIRE_OPTIONS, f as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, fn as sphericalBearing, ft as DEFAULT_BYPASS_OPTIONS, g as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, gn as roundToFixed, gt as DEFAULT_ENGINEER_WORK_LINE_OPTIONS, h as SECONDARY_DIRECTION_OF_FIRE_DASH, hn as getMetersPerPixel, ht as DEFAULT_GENERIC_C2_LINE_OPTIONS, i as CONTROL_MEASURE_METADATA, in as getMidpointPerpendicularSignedDistance, it as DEFAULT_GENERIC_TEXT_OPTIONS, j as DEFAULT_PENETRATE_OPTIONS, jt as DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS, k as DEFAULT_RETIRE_OPTIONS, kt as DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS, l as listControlMeasureMetadata, ln as computeInitialWidthPoint, lt as DEFAULT_GENERIC_CIRCLE_OPTIONS, m as DEFAULT_SECONDARY_DIRECTION_OF_FIRE_OPTIONS, mn as EPSILON, mt as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, n as resolveStyleHints, nn as computeDefaultMidpointPerpendicularPoint, nt as DEFAULT_SUPPORTING_ATTACK_OPTIONS, o as getControlMeasureMetadata, on as snapToMidpointPerpendicular, ot as DEFAULT_GENERIC_RECTANGLE_OPTIONS, p as DEFAULT_STRONG_POINT_OPTIONS, pn as unproject, pt as DEFAULT_BREACH_OPTIONS, q as DEFAULT_DISRUPT_OPTIONS, qt as line1DrawRule, r as CONTROL_MEASURE_IDS, rn as createMidpointPerpendicularDrawRule, rt as DEFAULT_CLEAR_OPTIONS, s as getControlMeasureMetadataByValue, sn as createBaselineFrame, st as DEFAULT_GENERIC_POLYGON_OPTIONS, t as renderControlMeasure, tn as blockDrawRule, tt as DEFAULT_COUNTERATTACK_OPTIONS, u as DEFAULT_TURNING_MOVEMENT_OPTIONS, un as haversineDistance, ut as DEFAULT_CLASSIC_ARROW_OPTIONS, v as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, vt as DEFAULT_BOUNDARY_OPTIONS, w as DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, wt as DEFAULT_ANTITANK_WALL_OPTIONS, x as DEFAULT_MINEFIELD_OPTIONS, xt as DEFAULT_BATTLE_POSITION_OPTIONS, y as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, yt as DEFAULT_BLOCK_ARROW_OPTIONS, z as DEFAULT_HOLDING_LINE_OPTIONS, zt as rectangleDrawRule } from "./renderControlMeasure-D6VScGE0.mjs";
|
|
2
2
|
//#region src/metadata.ts
|
|
3
3
|
const PARAMETER_PRESENTATION_TIERS = [
|
|
4
4
|
"primary",
|
|
@@ -156,4 +156,4 @@ function toHexChannel(value) {
|
|
|
156
156
|
return Math.max(0, Math.min(255, Math.round(value))).toString(16).padStart(2, "0");
|
|
157
157
|
}
|
|
158
158
|
//#endregion
|
|
159
|
-
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_BRIDGEHEAD_LINE_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLASSIC_ARROW_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_COUNTERATTACK_BY_FIRE_OPTIONS, DEFAULT_COUNTERATTACK_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_DISENGAGE_OPTIONS, DEFAULT_DISRUPT_MISSION_TASK_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_ENGINEER_WORK_LINE_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_MISSION_TASK_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_FORWARD_EDGE_OF_BATTLE_AREA_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_HOLDING_LINE_OPTIONS, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, DEFAULT_LANDING_ZONE_OPTIONS, DEFAULT_LIGHT_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_MINEFIELD_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PENETRATE_OPTIONS, DEFAULT_PHASE_LINE_OPTIONS, DEFAULT_PICKUP_ZONE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_REARWARD_PASSAGE_OF_LINES_OPTIONS, DEFAULT_RELEASE_LINE_OPTIONS, DEFAULT_RETIRE_OPTIONS, DEFAULT_SCREEN_OPTIONS, DEFAULT_SECONDARY_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SEIZE_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, DEFAULT_WITHDRAW_OPTIONS, DEFAULT_WITHDRAW_UNDER_PRESSURE_OPTIONS, EPSILON, PARAMETER_PRESENTATION_TIERS, SECONDARY_DIRECTION_OF_FIRE_DASH, TEXT_AMPLIFIER_FIELDS, ambushDrawRule, applyBoxTransformOptions, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, foldsBoxTransformOptions, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, haversineDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, line27DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, parameterPresentationTierRank, penetrateDrawRule, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveParameterPresentationTier, resolveParameterSemanticRole, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, staticPointDrawRule, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
|
159
|
+
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_BRIDGEHEAD_LINE_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLASSIC_ARROW_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_COUNTERATTACK_BY_FIRE_OPTIONS, DEFAULT_COUNTERATTACK_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_DISENGAGE_OPTIONS, DEFAULT_DISRUPT_MISSION_TASK_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_ENGINEER_WORK_LINE_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_MISSION_TASK_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_FORWARD_EDGE_OF_BATTLE_AREA_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_SECTOR_OPTIONS, DEFAULT_GENERIC_TEXT_OPTIONS, DEFAULT_GUARD_OPTIONS, DEFAULT_HANDOVER_LINE_OPTIONS, DEFAULT_HOLDING_LINE_OPTIONS, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS, DEFAULT_LANDING_ZONE_OPTIONS, DEFAULT_LIGHT_LINE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_MINEFIELD_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PENETRATE_OPTIONS, DEFAULT_PHASE_LINE_OPTIONS, DEFAULT_PICKUP_ZONE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_REARWARD_PASSAGE_OF_LINES_OPTIONS, DEFAULT_RELEASE_LINE_OPTIONS, DEFAULT_RETIRE_OPTIONS, DEFAULT_SCREEN_OPTIONS, DEFAULT_SECONDARY_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_SEIZE_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, DEFAULT_WITHDRAW_OPTIONS, DEFAULT_WITHDRAW_UNDER_PRESSURE_OPTIONS, EPSILON, PARAMETER_PRESENTATION_TIERS, SECONDARY_DIRECTION_OF_FIRE_DASH, TEXT_AMPLIFIER_FIELDS, ambushDrawRule, applyBoxTransformOptions, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, foldsBoxTransformOptions, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, haversineDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, line27DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, parameterPresentationTierRank, penetrateDrawRule, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveParameterPresentationTier, resolveParameterSemanticRole, resolveStyleHints, roundToFixed, sectorDrawRule, snapToMidpointPerpendicular, sphericalBearing, staticPointDrawRule, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
package/dist/preview/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mi as TextAmplifiers, Y as ControlMeasureId, Yr as FillPattern } from "../index-DCgWC2Q8.mjs";
|
|
2
2
|
import { FeatureCollection, Geometry } from "geojson";
|
|
3
3
|
|
|
4
4
|
//#region src/preview/index.d.ts
|
package/dist/preview/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-
|
|
1
|
+
import { a as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-D6VScGE0.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;
|
|
@@ -560,7 +560,7 @@ function samePosition(a, b) {
|
|
|
560
560
|
}
|
|
561
561
|
//#endregion
|
|
562
562
|
//#region src/draw-rules/area1.ts
|
|
563
|
-
function derive$
|
|
563
|
+
function derive$12(points) {
|
|
564
564
|
return clonePositions(points);
|
|
565
565
|
}
|
|
566
566
|
/**
|
|
@@ -580,9 +580,9 @@ const area1DrawRule = {
|
|
|
580
580
|
id: "area1",
|
|
581
581
|
minimumUserPoints: 3,
|
|
582
582
|
closedRing: true,
|
|
583
|
-
derive: derive$
|
|
583
|
+
derive: derive$12,
|
|
584
584
|
transform(event) {
|
|
585
|
-
return derive$
|
|
585
|
+
return derive$12(event.next);
|
|
586
586
|
}
|
|
587
587
|
};
|
|
588
588
|
//#endregion
|
|
@@ -608,14 +608,14 @@ const disruptDrawRule = createMidpointPerpendicularDrawRule({
|
|
|
608
608
|
* that fixes both the radius and the bearing of the symbol's opening. Both
|
|
609
609
|
* points are user-clicked, so the canonical array is just the (clamped) input.
|
|
610
610
|
*/
|
|
611
|
-
function derive$
|
|
611
|
+
function derive$11(points) {
|
|
612
612
|
return clonePositions(points.slice(0, 2));
|
|
613
613
|
}
|
|
614
614
|
const centerRadiusDrawRule = {
|
|
615
615
|
id: "area15:center-radius",
|
|
616
616
|
minimumUserPoints: 2,
|
|
617
617
|
canonicalPointCount: 2,
|
|
618
|
-
derive: derive$
|
|
618
|
+
derive: derive$11,
|
|
619
619
|
transform(event) {
|
|
620
620
|
const { previous, next, activePointIndex } = event;
|
|
621
621
|
if (activePointIndex === 0 && previous.length >= 2 && next.length >= 2) {
|
|
@@ -624,7 +624,7 @@ const centerRadiusDrawRule = {
|
|
|
624
624
|
const origin = previous[1];
|
|
625
625
|
return [clonePosition(next[0]), [origin[0] + dx, origin[1] + dy]];
|
|
626
626
|
}
|
|
627
|
-
return derive$
|
|
627
|
+
return derive$11(next);
|
|
628
628
|
}
|
|
629
629
|
};
|
|
630
630
|
/** Backward-compatible doctrinal name for Area15's shared center-radius rule. */
|
|
@@ -660,16 +660,16 @@ const point12DrawRule = createMidpointPerpendicularDrawRule({ id: "point12:obsta
|
|
|
660
660
|
* Point1 — a single anchor point (e.g. Text's center). One user click commits
|
|
661
661
|
* the measure; dragging the point simply translates it.
|
|
662
662
|
*/
|
|
663
|
-
function derive$
|
|
663
|
+
function derive$10(points) {
|
|
664
664
|
return clonePositions(points.slice(0, 1));
|
|
665
665
|
}
|
|
666
666
|
const pointDrawRule = {
|
|
667
667
|
id: "point1:anchor",
|
|
668
668
|
minimumUserPoints: 1,
|
|
669
669
|
canonicalPointCount: 1,
|
|
670
|
-
derive: derive$
|
|
670
|
+
derive: derive$10,
|
|
671
671
|
transform(event) {
|
|
672
|
-
return derive$
|
|
672
|
+
return derive$10(event.next);
|
|
673
673
|
}
|
|
674
674
|
};
|
|
675
675
|
//#endregion
|
|
@@ -716,20 +716,20 @@ const ambushDrawRule = createMidpointPerpendicularDrawRule({
|
|
|
716
716
|
});
|
|
717
717
|
//#endregion
|
|
718
718
|
//#region src/draw-rules/line1.ts
|
|
719
|
-
function derive$
|
|
719
|
+
function derive$9(points) {
|
|
720
720
|
return clonePositions(points);
|
|
721
721
|
}
|
|
722
722
|
const line1DrawRule = {
|
|
723
723
|
id: "line1",
|
|
724
724
|
minimumUserPoints: 2,
|
|
725
|
-
derive: derive$
|
|
725
|
+
derive: derive$9,
|
|
726
726
|
transform(event) {
|
|
727
|
-
return derive$
|
|
727
|
+
return derive$9(event.next);
|
|
728
728
|
}
|
|
729
729
|
};
|
|
730
730
|
//#endregion
|
|
731
731
|
//#region src/draw-rules/line3.ts
|
|
732
|
-
function derive$
|
|
732
|
+
function derive$8(points) {
|
|
733
733
|
return clonePositions(points);
|
|
734
734
|
}
|
|
735
735
|
/**
|
|
@@ -744,23 +744,23 @@ const line3DrawRule = {
|
|
|
744
744
|
id: "line3",
|
|
745
745
|
minimumUserPoints: 3,
|
|
746
746
|
canonicalPointCount: 3,
|
|
747
|
-
derive: derive$
|
|
747
|
+
derive: derive$8,
|
|
748
748
|
transform(event) {
|
|
749
|
-
return derive$
|
|
749
|
+
return derive$8(event.next);
|
|
750
750
|
}
|
|
751
751
|
};
|
|
752
752
|
//#endregion
|
|
753
753
|
//#region src/draw-rules/line9.ts
|
|
754
|
-
function derive$
|
|
754
|
+
function derive$7(points) {
|
|
755
755
|
return clonePositions(points);
|
|
756
756
|
}
|
|
757
757
|
const line9DrawRule = {
|
|
758
758
|
id: "line9",
|
|
759
759
|
minimumUserPoints: 2,
|
|
760
760
|
canonicalPointCount: 2,
|
|
761
|
-
derive: derive$
|
|
761
|
+
derive: derive$7,
|
|
762
762
|
transform(event) {
|
|
763
|
-
return derive$
|
|
763
|
+
return derive$7(event.next);
|
|
764
764
|
}
|
|
765
765
|
};
|
|
766
766
|
//#endregion
|
|
@@ -867,7 +867,7 @@ const line24DrawRule = createMidpointPerpendicularDrawRule({
|
|
|
867
867
|
});
|
|
868
868
|
//#endregion
|
|
869
869
|
//#region src/draw-rules/line26.ts
|
|
870
|
-
function derive$
|
|
870
|
+
function derive$6(points) {
|
|
871
871
|
if (points.length === 2) {
|
|
872
872
|
const [p1, p2] = points;
|
|
873
873
|
const dx = p2[0] - p1[0];
|
|
@@ -906,9 +906,9 @@ const line26DrawRule = {
|
|
|
906
906
|
minimumUserPoints: 4,
|
|
907
907
|
minimumPreviewPoints: 2,
|
|
908
908
|
canonicalPointCount: 4,
|
|
909
|
-
derive: derive$
|
|
909
|
+
derive: derive$6,
|
|
910
910
|
transform(event) {
|
|
911
|
-
return derive$
|
|
911
|
+
return derive$6(event.next);
|
|
912
912
|
}
|
|
913
913
|
};
|
|
914
914
|
//#endregion
|
|
@@ -921,7 +921,7 @@ function deriveArcPoint(p1, p2, p4) {
|
|
|
921
921
|
if (!arc) return [(p2[0] + p4[0]) / 2, (p2[1] + p4[1]) / 2];
|
|
922
922
|
return unproject(arc.midpoint[0], arc.midpoint[1]);
|
|
923
923
|
}
|
|
924
|
-
function derive$
|
|
924
|
+
function derive$5(points) {
|
|
925
925
|
if (points.length < 2) return clonePositions(points);
|
|
926
926
|
const [p1, p2] = points;
|
|
927
927
|
if (points.length === 2) {
|
|
@@ -960,7 +960,7 @@ const line27DrawRule = {
|
|
|
960
960
|
minimumUserPoints: 3,
|
|
961
961
|
minimumPreviewPoints: 2,
|
|
962
962
|
canonicalPointCount: 4,
|
|
963
|
-
derive: derive$
|
|
963
|
+
derive: derive$5,
|
|
964
964
|
transform(event) {
|
|
965
965
|
const { previous, next, activePointIndex } = event;
|
|
966
966
|
if (activePointIndex === 0 && previous.length >= 4 && next.length >= 4) {
|
|
@@ -993,7 +993,7 @@ const line27DrawRule = {
|
|
|
993
993
|
};
|
|
994
994
|
//#endregion
|
|
995
995
|
//#region src/draw-rules/area8.ts
|
|
996
|
-
function derive$
|
|
996
|
+
function derive$4(points) {
|
|
997
997
|
if (points.length < 2) return clonePositions(points);
|
|
998
998
|
if (points.length !== 2) return clonePositions(points.slice(0, 4));
|
|
999
999
|
const p1 = clonePosition(points[0]);
|
|
@@ -1017,16 +1017,16 @@ const supportByFireDrawRule = {
|
|
|
1017
1017
|
id: "area8:support-by-fire",
|
|
1018
1018
|
minimumUserPoints: 2,
|
|
1019
1019
|
canonicalPointCount: 4,
|
|
1020
|
-
derive: derive$
|
|
1020
|
+
derive: derive$4,
|
|
1021
1021
|
transform(event) {
|
|
1022
1022
|
const { next } = event;
|
|
1023
1023
|
if (next.length === 4) return clonePositions(next);
|
|
1024
|
-
return derive$
|
|
1024
|
+
return derive$4(next);
|
|
1025
1025
|
}
|
|
1026
1026
|
};
|
|
1027
1027
|
//#endregion
|
|
1028
1028
|
//#region src/draw-rules/axis1.ts
|
|
1029
|
-
function derive$
|
|
1029
|
+
function derive$3(points) {
|
|
1030
1030
|
if (points.length < 2) return clonePositions(points);
|
|
1031
1031
|
if (points.length === 2) {
|
|
1032
1032
|
const tip = clonePosition(points[0]);
|
|
@@ -1064,10 +1064,10 @@ const axis1DrawRule = {
|
|
|
1064
1064
|
id: "axis1",
|
|
1065
1065
|
minimumUserPoints: 2,
|
|
1066
1066
|
trailingFixedSlots: 1,
|
|
1067
|
-
derive: derive$
|
|
1067
|
+
derive: derive$3,
|
|
1068
1068
|
transform(event) {
|
|
1069
1069
|
const { previous, next, activePointIndex } = event;
|
|
1070
|
-
if (next.length < 3 || previous.length < 3) return derive$
|
|
1070
|
+
if (next.length < 3 || previous.length < 3) return derive$3(next);
|
|
1071
1071
|
if (!(activePointIndex === 0 || activePointIndex === 1)) return clonePositions(next);
|
|
1072
1072
|
const metrics = calculateMetrics(previous);
|
|
1073
1073
|
if (!metrics) return clonePositions(next);
|
|
@@ -1120,7 +1120,7 @@ const counterattackByFireDrawRule = {
|
|
|
1120
1120
|
};
|
|
1121
1121
|
//#endregion
|
|
1122
1122
|
//#region src/draw-rules/area21.ts
|
|
1123
|
-
function derive$
|
|
1123
|
+
function derive$2(points) {
|
|
1124
1124
|
if (points.length === 2) return clonePositions([
|
|
1125
1125
|
points[0],
|
|
1126
1126
|
points[1],
|
|
@@ -1133,9 +1133,9 @@ const searchAreaDrawRule = {
|
|
|
1133
1133
|
minimumUserPoints: 3,
|
|
1134
1134
|
minimumPreviewPoints: 2,
|
|
1135
1135
|
canonicalPointCount: 3,
|
|
1136
|
-
derive: derive$
|
|
1136
|
+
derive: derive$2,
|
|
1137
1137
|
transform(event) {
|
|
1138
|
-
return derive$
|
|
1138
|
+
return derive$2(event.next);
|
|
1139
1139
|
}
|
|
1140
1140
|
};
|
|
1141
1141
|
//#endregion
|
|
@@ -1145,7 +1145,7 @@ const searchAreaDrawRule = {
|
|
|
1145
1145
|
* edge. P3 is the next corner, constrained to the perpendicular through P2.
|
|
1146
1146
|
* The generator derives the fourth corner.
|
|
1147
1147
|
*/
|
|
1148
|
-
function derive(points) {
|
|
1148
|
+
function derive$1(points) {
|
|
1149
1149
|
if (points.length < 2) return clonePositions(points);
|
|
1150
1150
|
const p1 = clonePosition(points[0]);
|
|
1151
1151
|
const p2 = clonePosition(points[1]);
|
|
@@ -1164,8 +1164,8 @@ function derive(points) {
|
|
|
1164
1164
|
frame?.pointAtNormalDistance(frame.signedNormalDistance(points[2])) ?? clonePosition(points[2])
|
|
1165
1165
|
];
|
|
1166
1166
|
}
|
|
1167
|
-
function guidePoints(points) {
|
|
1168
|
-
const canonical = derive(points);
|
|
1167
|
+
function guidePoints$1(points) {
|
|
1168
|
+
const canonical = derive$1(points);
|
|
1169
1169
|
if (canonical.length < 3) return canonical;
|
|
1170
1170
|
const [c1, c2, c3] = canonical;
|
|
1171
1171
|
if (!c1 || !c2 || !c3) return canonical;
|
|
@@ -1191,16 +1191,16 @@ const rectangleDrawRule = {
|
|
|
1191
1191
|
minimumPreviewPoints: 2,
|
|
1192
1192
|
canonicalPointCount: 3,
|
|
1193
1193
|
showGuide: true,
|
|
1194
|
-
guidePoints,
|
|
1195
|
-
derive,
|
|
1194
|
+
guidePoints: guidePoints$1,
|
|
1195
|
+
derive: derive$1,
|
|
1196
1196
|
transform(event) {
|
|
1197
1197
|
const { previous, next, activePointIndex } = event;
|
|
1198
|
-
if (previous.length < 3 || next.length < 3) return derive(next);
|
|
1198
|
+
if (previous.length < 3 || next.length < 3) return derive$1(next);
|
|
1199
1199
|
const frame = createBaselineFrame(previous[0], previous[1], {
|
|
1200
1200
|
origin: "p2",
|
|
1201
1201
|
normal: "right"
|
|
1202
1202
|
});
|
|
1203
|
-
if (!frame) return derive(next);
|
|
1203
|
+
if (!frame) return derive$1(next);
|
|
1204
1204
|
if (activePointIndex === 0) return [
|
|
1205
1205
|
snapToAxis(next[0], frame.p2, frame.direction),
|
|
1206
1206
|
clonePosition(previous[1]),
|
|
@@ -1225,6 +1225,53 @@ const rectangleDrawRule = {
|
|
|
1225
1225
|
p3
|
|
1226
1226
|
];
|
|
1227
1227
|
}
|
|
1228
|
+
return derive$1(next);
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
//#endregion
|
|
1232
|
+
//#region src/draw-rules/sector.ts
|
|
1233
|
+
const SECTOR_ANGLE_SNAP_RADIANS = Math.PI / 36;
|
|
1234
|
+
/**
|
|
1235
|
+
* Sector — anchor + inner-left edge + outer-right edge. The two radial points
|
|
1236
|
+
* independently control a radius and a true-north azimuth. Dragging the anchor
|
|
1237
|
+
* translates both edge points so the sector retains its size and orientation.
|
|
1238
|
+
*/
|
|
1239
|
+
function derive(points) {
|
|
1240
|
+
return clonePositions(points.slice(0, 3));
|
|
1241
|
+
}
|
|
1242
|
+
function guidePoints(points) {
|
|
1243
|
+
return points.length < 3 ? clonePositions(points) : [];
|
|
1244
|
+
}
|
|
1245
|
+
function constrainAngles(points, activePointIndex) {
|
|
1246
|
+
const next = clonePositions(points);
|
|
1247
|
+
if (activePointIndex !== 1 && activePointIndex !== 2) return next;
|
|
1248
|
+
const anchor = next[0];
|
|
1249
|
+
const point = next[activePointIndex];
|
|
1250
|
+
if (!anchor || !point) return next;
|
|
1251
|
+
const range = haversineDistance(anchor, point);
|
|
1252
|
+
const bearing = sphericalBearing(anchor, point);
|
|
1253
|
+
next[activePointIndex] = [...destinationPoint(anchor, range, Math.round(bearing / SECTOR_ANGLE_SNAP_RADIANS) * SECTOR_ANGLE_SNAP_RADIANS), ...point.slice(2)];
|
|
1254
|
+
return next;
|
|
1255
|
+
}
|
|
1256
|
+
const sectorDrawRule = {
|
|
1257
|
+
id: "sector:anchor-radii",
|
|
1258
|
+
minimumUserPoints: 3,
|
|
1259
|
+
canonicalPointCount: 3,
|
|
1260
|
+
showGuide: true,
|
|
1261
|
+
guidePoints,
|
|
1262
|
+
constrainAngles,
|
|
1263
|
+
derive,
|
|
1264
|
+
transform(event) {
|
|
1265
|
+
const { previous, next, activePointIndex } = event;
|
|
1266
|
+
if (activePointIndex === 0 && previous.length >= 3 && next.length >= 3) {
|
|
1267
|
+
const dx = next[0][0] - previous[0][0];
|
|
1268
|
+
const dy = next[0][1] - previous[0][1];
|
|
1269
|
+
return [
|
|
1270
|
+
clonePosition(next[0]),
|
|
1271
|
+
[previous[1][0] + dx, previous[1][1] + dy],
|
|
1272
|
+
[previous[2][0] + dx, previous[2][1] + dy]
|
|
1273
|
+
];
|
|
1274
|
+
}
|
|
1228
1275
|
return derive(next);
|
|
1229
1276
|
}
|
|
1230
1277
|
};
|
|
@@ -4078,7 +4125,7 @@ const AREA_DEFENSE_METADATA = {
|
|
|
4078
4125
|
function pointOnCircle(center, radius, angle) {
|
|
4079
4126
|
return vecAdd(center, [radius * Math.cos(angle), radius * Math.sin(angle)]);
|
|
4080
4127
|
}
|
|
4081
|
-
function sampleArc(center, radius, start, end) {
|
|
4128
|
+
function sampleArc$1(center, radius, start, end) {
|
|
4082
4129
|
const span = end - start;
|
|
4083
4130
|
const segments = Math.max(8, Math.round(48 * Math.abs(span) / Math.PI));
|
|
4084
4131
|
return Array.from({ length: segments + 1 }, (_, index) => pointOnCircle(center, radius, start + span * index / segments));
|
|
@@ -4112,8 +4159,8 @@ function createAreaDefense(coordinates, options = {}) {
|
|
|
4112
4159
|
const upperEnd = upperTipAngle;
|
|
4113
4160
|
const lowerStart = labelCenter - labelHalf;
|
|
4114
4161
|
const lowerEnd = upperTipAngle + arrowHalf * 2 - Math.PI * 2;
|
|
4115
|
-
const upperArc = sampleArc(center, radius, upperStart, upperEnd);
|
|
4116
|
-
const lowerArc = sampleArc(center, radius, lowerStart, lowerEnd);
|
|
4162
|
+
const upperArc = sampleArc$1(center, radius, upperStart, upperEnd);
|
|
4163
|
+
const lowerArc = sampleArc$1(center, radius, lowerStart, lowerEnd);
|
|
4117
4164
|
const arrowLength = radius * Math.max(0, resolved.arrowheadLengthRatio);
|
|
4118
4165
|
const upperDirection = [-Math.sin(upperEnd), Math.cos(upperEnd)];
|
|
4119
4166
|
const lowerDirection = [Math.sin(lowerEnd), -Math.cos(lowerEnd)];
|
|
@@ -7465,8 +7512,20 @@ function normalizeSmoothResolution(value) {
|
|
|
7465
7512
|
if (!Number.isFinite(value)) return DEFAULT_SMOOTH_RESOLUTION$3;
|
|
7466
7513
|
return Math.min(MAX_SMOOTH_RESOLUTION, Math.max(MIN_SMOOTH_RESOLUTION, Math.round(value)));
|
|
7467
7514
|
}
|
|
7468
|
-
|
|
7469
|
-
|
|
7515
|
+
function normalizeArcResolution(value) {
|
|
7516
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return 64;
|
|
7517
|
+
return Math.min(360, Math.max(4, Math.round(value)));
|
|
7518
|
+
}
|
|
7519
|
+
const ARC_RESOLUTION_PARAMS = [{
|
|
7520
|
+
key: "resolution",
|
|
7521
|
+
presentationTier: "advanced",
|
|
7522
|
+
label: "Resolution",
|
|
7523
|
+
description: "Number of segments in a full 360° sweep.",
|
|
7524
|
+
type: "number",
|
|
7525
|
+
min: 4,
|
|
7526
|
+
max: 360,
|
|
7527
|
+
step: 1
|
|
7528
|
+
}];
|
|
7470
7529
|
const SMOOTH_PATH_PARAMS = [{
|
|
7471
7530
|
key: "smooth",
|
|
7472
7531
|
label: "Smooth",
|
|
@@ -7491,7 +7550,6 @@ const FILLED_AREA_PARAMS = [{
|
|
|
7491
7550
|
}];
|
|
7492
7551
|
//#endregion
|
|
7493
7552
|
//#region src/generators/cm99-generic-graphics/circle.ts
|
|
7494
|
-
const CIRCLE_SEGMENTS$1 = 64;
|
|
7495
7553
|
const MAX_SEGMENT_ANGLE = 6;
|
|
7496
7554
|
const MAX_SUBDIVISION_DEPTH = 5;
|
|
7497
7555
|
/**
|
|
@@ -7517,7 +7575,10 @@ const densifySegment = (center, radius, bearingA, posA, bearingB, posB, depth, o
|
|
|
7517
7575
|
densifySegment(center, radius, midBearing, midPos, bearingB, posB, depth + 1, out);
|
|
7518
7576
|
} else out.push(posA);
|
|
7519
7577
|
};
|
|
7520
|
-
const DEFAULT_GENERIC_CIRCLE_OPTIONS = {
|
|
7578
|
+
const DEFAULT_GENERIC_CIRCLE_OPTIONS = {
|
|
7579
|
+
filled: false,
|
|
7580
|
+
resolution: 64
|
|
7581
|
+
};
|
|
7521
7582
|
const GENERIC_CIRCLE_METADATA = {
|
|
7522
7583
|
id: "circle",
|
|
7523
7584
|
name: "Circle",
|
|
@@ -7536,7 +7597,7 @@ const GENERIC_CIRCLE_METADATA = {
|
|
|
7536
7597
|
text: false
|
|
7537
7598
|
},
|
|
7538
7599
|
drawRule: "Area15",
|
|
7539
|
-
params: FILLED_AREA_PARAMS
|
|
7600
|
+
params: [...FILLED_AREA_PARAMS, ...ARC_RESOLUTION_PARAMS]
|
|
7540
7601
|
};
|
|
7541
7602
|
function createGenericCircle(coordinates, options = {}) {
|
|
7542
7603
|
const center = coordinates[0];
|
|
@@ -7546,12 +7607,13 @@ function createGenericCircle(coordinates, options = {}) {
|
|
|
7546
7607
|
type: "FeatureCollection",
|
|
7547
7608
|
features: []
|
|
7548
7609
|
};
|
|
7610
|
+
const resolution = normalizeArcResolution(options.resolution);
|
|
7549
7611
|
const startBearing = sphericalBearing(center, radiusPoint);
|
|
7550
7612
|
const ring = [];
|
|
7551
7613
|
let previousBearing = startBearing;
|
|
7552
7614
|
let previousPoint = destinationPoint(center, radius, previousBearing);
|
|
7553
|
-
for (let index = 1; index <=
|
|
7554
|
-
const bearing = startBearing - index /
|
|
7615
|
+
for (let index = 1; index <= resolution; index++) {
|
|
7616
|
+
const bearing = startBearing - index / resolution * 2 * Math.PI;
|
|
7555
7617
|
const point = destinationPoint(center, radius, bearing);
|
|
7556
7618
|
densifySegment(center, radius, previousBearing, previousPoint, bearing, point, 0, ring);
|
|
7557
7619
|
previousBearing = bearing;
|
|
@@ -7800,6 +7862,97 @@ const GENERIC_RECTANGLE = defineControlMeasure({
|
|
|
7800
7862
|
] }
|
|
7801
7863
|
});
|
|
7802
7864
|
//#endregion
|
|
7865
|
+
//#region src/generators/cm99-generic-graphics/sector.ts
|
|
7866
|
+
const DEFAULT_GENERIC_SECTOR_OPTIONS = {
|
|
7867
|
+
filled: false,
|
|
7868
|
+
resolution: 64
|
|
7869
|
+
};
|
|
7870
|
+
const GENERIC_SECTOR_METADATA = {
|
|
7871
|
+
id: "sector",
|
|
7872
|
+
name: "Sector",
|
|
7873
|
+
description: "A non-doctrinal range-fan sector defined by an anchor and two radial edge points.",
|
|
7874
|
+
entity: "Generic Graphics",
|
|
7875
|
+
entityType: "Basic Shape",
|
|
7876
|
+
entitySubtype: "Sector",
|
|
7877
|
+
value: "990105",
|
|
7878
|
+
minCoordinates: 3,
|
|
7879
|
+
maxCoordinates: 3,
|
|
7880
|
+
geometry: "area",
|
|
7881
|
+
geometryTypes: ["Polygon"],
|
|
7882
|
+
paints: {
|
|
7883
|
+
stroke: true,
|
|
7884
|
+
fill: "user",
|
|
7885
|
+
text: false
|
|
7886
|
+
},
|
|
7887
|
+
drawRule: "Sector",
|
|
7888
|
+
params: [...FILLED_AREA_PARAMS, ...ARC_RESOLUTION_PARAMS]
|
|
7889
|
+
};
|
|
7890
|
+
function clockwiseSweepDegrees(leftAzimuth, rightAzimuth) {
|
|
7891
|
+
const rawSweep = rightAzimuth - leftAzimuth;
|
|
7892
|
+
const sweep = normalizeDegrees(rawSweep);
|
|
7893
|
+
return sweep === 0 && rawSweep !== 0 ? 360 : sweep;
|
|
7894
|
+
}
|
|
7895
|
+
function sampleArc(anchor, radius, leftAzimuth, sweepDegrees, resolution) {
|
|
7896
|
+
const segmentCount = Math.max(1, Math.ceil(sweepDegrees / 360 * resolution));
|
|
7897
|
+
return Array.from({ length: segmentCount + 1 }, (_, index) => {
|
|
7898
|
+
return destinationPoint(anchor, radius, (leftAzimuth + index / segmentCount * sweepDegrees) * Math.PI / 180);
|
|
7899
|
+
});
|
|
7900
|
+
}
|
|
7901
|
+
function createGenericSector(coordinates, options = {}) {
|
|
7902
|
+
const anchor = coordinates[0];
|
|
7903
|
+
const innerLeftPoint = coordinates[1];
|
|
7904
|
+
const outerRightPoint = coordinates[2];
|
|
7905
|
+
if (!anchor || !innerLeftPoint || !outerRightPoint) return {
|
|
7906
|
+
type: "FeatureCollection",
|
|
7907
|
+
features: []
|
|
7908
|
+
};
|
|
7909
|
+
const innerRadius = haversineDistance(anchor, innerLeftPoint);
|
|
7910
|
+
const outerRadius = haversineDistance(anchor, outerRightPoint);
|
|
7911
|
+
const leftAzimuth = normalizeDegrees(sphericalBearing(anchor, innerLeftPoint) * 180 / Math.PI);
|
|
7912
|
+
const rightAzimuth = normalizeDegrees(sphericalBearing(anchor, outerRightPoint) * 180 / Math.PI);
|
|
7913
|
+
if (outerRadius <= innerRadius || innerRadius < 1e-6 || outerRadius < 1e-6) return {
|
|
7914
|
+
type: "FeatureCollection",
|
|
7915
|
+
features: []
|
|
7916
|
+
};
|
|
7917
|
+
const sweepDegrees = clockwiseSweepDegrees(leftAzimuth, rightAzimuth);
|
|
7918
|
+
if (sweepDegrees === 0) return {
|
|
7919
|
+
type: "FeatureCollection",
|
|
7920
|
+
features: []
|
|
7921
|
+
};
|
|
7922
|
+
const resolution = normalizeArcResolution(options.resolution);
|
|
7923
|
+
const outerArc = sampleArc(anchor, outerRadius, leftAzimuth, sweepDegrees, resolution);
|
|
7924
|
+
const ring = [
|
|
7925
|
+
...outerArc,
|
|
7926
|
+
...sampleArc(anchor, innerRadius, leftAzimuth, sweepDegrees, resolution).reverse(),
|
|
7927
|
+
outerArc[0]
|
|
7928
|
+
];
|
|
7929
|
+
return {
|
|
7930
|
+
type: "FeatureCollection",
|
|
7931
|
+
features: [{
|
|
7932
|
+
type: "Feature",
|
|
7933
|
+
properties: {
|
|
7934
|
+
part: "sector",
|
|
7935
|
+
fill: options.filled ?? DEFAULT_GENERIC_SECTOR_OPTIONS.filled
|
|
7936
|
+
},
|
|
7937
|
+
geometry: {
|
|
7938
|
+
type: "Polygon",
|
|
7939
|
+
coordinates: [ring]
|
|
7940
|
+
}
|
|
7941
|
+
}]
|
|
7942
|
+
};
|
|
7943
|
+
}
|
|
7944
|
+
const GENERIC_SECTOR = defineControlMeasure({
|
|
7945
|
+
metadata: GENERIC_SECTOR_METADATA,
|
|
7946
|
+
generator: createGenericSector,
|
|
7947
|
+
defaultOptions: DEFAULT_GENERIC_SECTOR_OPTIONS,
|
|
7948
|
+
rule: sectorDrawRule,
|
|
7949
|
+
previewSample: { controlPoints: [
|
|
7950
|
+
[-.8, -.7],
|
|
7951
|
+
[-.5, .2],
|
|
7952
|
+
[.7, -.1]
|
|
7953
|
+
] }
|
|
7954
|
+
});
|
|
7955
|
+
//#endregion
|
|
7803
7956
|
//#region src/generators/cm99-generic-graphics/text.ts
|
|
7804
7957
|
const DEFAULT_GENERIC_TEXT_OPTIONS = {
|
|
7805
7958
|
text: "Text",
|
|
@@ -8853,7 +9006,8 @@ function createTacticalArrow(origin, tip, opposite, options) {
|
|
|
8853
9006
|
const amplitude = totalLegLength * options.zigzagAmplitudeRatio;
|
|
8854
9007
|
const zigzagPointA = vecAdd(vecAdd(origin, vecScale(leg, options.zigzagStart)), vecScale(normal, amplitude));
|
|
8855
9008
|
const zigzagPointB = vecAdd(vecAdd(origin, vecScale(leg, options.zigzagEnd)), vecScale(normal, -amplitude));
|
|
8856
|
-
const
|
|
9009
|
+
const finalSegmentLength = vecMag(vecSub(tip, zigzagPointB));
|
|
9010
|
+
const arrowhead = arrowheadAt(finalSegmentLength >= 1e-6 ? zigzagPointB : origin, tip, finalSegmentLength >= 1e-6 ? totalLegLength * options.arrowheadLengthRatio / finalSegmentLength : options.arrowheadLengthRatio, options.arrowheadWidthRatio);
|
|
8857
9011
|
if (!arrowhead) return void 0;
|
|
8858
9012
|
return [[
|
|
8859
9013
|
origin,
|
|
@@ -14513,6 +14667,7 @@ const DEFINITIONS = {
|
|
|
14513
14667
|
polygon: GENERIC_POLYGON,
|
|
14514
14668
|
rectangle: GENERIC_RECTANGLE,
|
|
14515
14669
|
circle: GENERIC_CIRCLE,
|
|
14670
|
+
sector: GENERIC_SECTOR,
|
|
14516
14671
|
text: GENERIC_TEXT,
|
|
14517
14672
|
"airborne-attack": AIRBORNE_ATTACK,
|
|
14518
14673
|
"attack-helicopter": ATTACK_HELICOPTER,
|
|
@@ -14944,4 +15099,4 @@ function assertNever(value) {
|
|
|
14944
15099
|
throw new Error(`Unhandled control measure kind: ${String(value)}`);
|
|
14945
15100
|
}
|
|
14946
15101
|
//#endregion
|
|
14947
|
-
export { DEFAULT_TACTICAL_ARROW_OPTIONS as $,
|
|
15102
|
+
export { DEFAULT_TACTICAL_ARROW_OPTIONS as $, centerRadiusDrawRule as $t, DEFAULT_REARWARD_PASSAGE_OF_LINES_OPTIONS as A, DEFAULT_DIRECTION_OF_MAIN_ATTACK_OPTIONS as At, DEFAULT_BRIDGEHEAD_LINE_OPTIONS as B, axis1DrawRule as Bt, DEFAULT_LANDING_ZONE_OPTIONS as C, DEFAULT_ATTACK_BY_FIRE_OPTIONS as Ct, DEFAULT_SEIZE_OPTIONS as D, DEFAULT_AREA_OF_OPERATIONS_OPTIONS as Dt, DEFAULT_WITHDRAW_OPTIONS as E, DEFAULT_ASSEMBLY_AREA_OPTIONS as Et, DEFAULT_BATTLE_HANDOVER_LINE_OPTIONS as F, resolveAmplifierPlacement as Ft, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS as G, line23DrawRule as Gt, DEFAULT_FLOT_OPTIONS as H, line27DrawRule as Ht, DEFAULT_HANDOVER_LINE_OPTIONS as I, DEFAULT_AMBUSH_OPTIONS as It, DEFAULT_GUARD_OPTIONS as J, ambushDrawRule as Jt, DEFAULT_ENCIRCLEMENT_OPTIONS as K, turnDrawRule as Kt, DEFAULT_FORWARD_EDGE_OF_BATTLE_AREA_OPTIONS as L, DEFAULT_AIRBORNE_ATTACK_OPTIONS as Lt, DEFAULT_FRONTAL_ATTACK_OPTIONS as M, TEXT_AMPLIFIER_FIELDS as Mt, DEFAULT_FORTIFIED_AREA_OPTIONS as N, canonicalTextAmplifierKey as Nt, DEFAULT_SCREEN_OPTIONS as O, DEFAULT_AREA_DEFENSE_OPTIONS as Ot, DEFAULT_FORTIFIED_LINE_OPTIONS as P, normalizeTextAmplifiers as Pt, DEFAULT_COVER_OPTIONS as Q, penetrateDrawRule as Qt, DEFAULT_RELEASE_LINE_OPTIONS as R, sectorDrawRule as Rt, DEFAULT_MAIN_ATTACK_OPTIONS as S, DEFAULT_ATTACK_HELICOPTER_OPTIONS as St, DEFAULT_WITHDRAW_UNDER_PRESSURE_OPTIONS as T, DEFAULT_ANTITANK_DITCH_OPTIONS as Tt, DEFAULT_FIX_MISSION_TASK_OPTIONS as U, line26DrawRule as Ut, DEFAULT_PHASE_LINE_OPTIONS as V, supportByFireDrawRule as Vt, DEFAULT_FIX_OPTIONS as W, line24DrawRule as Wt, DEFAULT_DISENGAGE_OPTIONS as X, staticPointDrawRule as Xt, DEFAULT_DISRUPT_MISSION_TASK_OPTIONS as Y, attackByFireDrawRule as Yt, DEFAULT_DELAY_OPTIONS as Z, point12DrawRule as Zt, DEFAULT_PICKUP_ZONE_OPTIONS as _, DEFAULT_LIGHT_LINE_OPTIONS as _t, DEFINITIONS as a, pointOnMidpointPerpendicularAxis as an, DEFAULT_GENERIC_SECTOR_OPTIONS as at, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS as b, DEFAULT_BLOCK_OPTIONS as bt, getDefaultOptions as c, calculateMetrics as cn, DEFAULT_GENERIC_LINE_OPTIONS as ct, DEFAULT_TURN_OPTIONS as d, project as dn, DEFAULT_CANALIZE_OPTIONS as dt, disruptDrawRule as en, DEFAULT_COUNTERATTACK_BY_FIRE_OPTIONS as et, DEFAULT_SUPPORT_BY_FIRE_OPTIONS as f, sphericalBearing as fn, DEFAULT_BYPASS_OPTIONS as ft, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS as g, roundToFixed as gn, DEFAULT_ENGINEER_WORK_LINE_OPTIONS as gt, SECONDARY_DIRECTION_OF_FIRE_DASH as h, getMetersPerPixel as hn, DEFAULT_GENERIC_C2_LINE_OPTIONS as ht, CONTROL_MEASURE_METADATA as i, getMidpointPerpendicularSignedDistance as in, DEFAULT_GENERIC_TEXT_OPTIONS as it, DEFAULT_PENETRATE_OPTIONS as j, DEFAULT_DIRECTION_OF_ATTACK_AVIATION_OPTIONS as jt, DEFAULT_RETIRE_OPTIONS as k, DEFAULT_DIRECTION_OF_SUPPORTING_ATTACK_OPTIONS as kt, listControlMeasureMetadata as l, computeInitialWidthPoint as ln, DEFAULT_GENERIC_CIRCLE_OPTIONS as lt, DEFAULT_SECONDARY_DIRECTION_OF_FIRE_OPTIONS as m, EPSILON as mn, DEFAULT_BLOCK_MISSION_TASK_OPTIONS as mt, resolveStyleHints as n, computeDefaultMidpointPerpendicularPoint as nn, DEFAULT_SUPPORTING_ATTACK_OPTIONS as nt, getControlMeasureMetadata as o, snapToMidpointPerpendicular as on, DEFAULT_GENERIC_RECTANGLE_OPTIONS as ot, DEFAULT_STRONG_POINT_OPTIONS as p, unproject as pn, DEFAULT_BREACH_OPTIONS as pt, DEFAULT_DISRUPT_OPTIONS as q, line1DrawRule as qt, CONTROL_MEASURE_IDS as r, createMidpointPerpendicularDrawRule as rn, DEFAULT_CLEAR_OPTIONS as rt, getControlMeasureMetadataByValue as s, createBaselineFrame as sn, DEFAULT_GENERIC_POLYGON_OPTIONS as st, renderControlMeasure as t, blockDrawRule as tn, DEFAULT_COUNTERATTACK_OPTIONS as tt, DEFAULT_TURNING_MOVEMENT_OPTIONS as u, haversineDistance as un, DEFAULT_CLASSIC_ARROW_OPTIONS as ut, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS as v, DEFAULT_BOUNDARY_OPTIONS as vt, DEFAULT_JOINT_TACTICAL_ACTION_AREA_OPTIONS as w, DEFAULT_ANTITANK_WALL_OPTIONS as wt, DEFAULT_MINEFIELD_OPTIONS as x, DEFAULT_BATTLE_POSITION_OPTIONS as xt, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS as y, DEFAULT_BLOCK_ARROW_OPTIONS as yt, DEFAULT_HOLDING_LINE_OPTIONS as z, rectangleDrawRule as zt };
|
package/media/sector.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 48" width="96" height="48" role="img" aria-label="Sector"><rect x="0" y="0" width="96" height="48" rx="6" fill="#f8fafc" stroke="#e2e8f0"/><path d="M30.17 5.00 L34.61 6.05 L38.92 7.53 L43.07 9.41 L47.02 11.67 L50.74 14.31 L54.19 17.29 L57.34 20.59 L60.16 24.16 L62.62 28.00 L64.71 32.06 L66.40 36.29 L67.67 40.66 L57.94 43.00 L56.93 39.54 L55.60 36.20 L53.95 33.00 L52.00 29.97 L49.78 27.15 L47.29 24.54 L44.57 22.19 L41.63 20.11 L38.51 18.32 L35.23 16.83 L31.83 15.67 L28.33 14.84 L30.17 5.00 Z" fill="#1e293b" fill-opacity="0" stroke="#1e293b" stroke-width="1.25" stroke-linejoin="round"/></svg>
|
package/package.json
CHANGED