@orbat-mapper/control-measures 0.2.0-alpha.21 → 0.2.0-alpha.22
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 +46 -0
- package/dist/{index-COV2WtCq.d.mts → index-BTViqLbA.d.mts} +72 -37
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/preview/index.d.mts +29 -2
- package/dist/preview/index.mjs +44 -5
- package/dist/{renderControlMeasure-BG9DzU2W.mjs → renderControlMeasure-Bc0d45Iv.mjs} +248 -1
- package/media/airfield-zone.svg +1 -0
- package/media/area-defense.svg +1 -0
- package/media/area-of-operations.svg +1 -1
- package/media/area.svg +1 -0
- package/media/assault-position.svg +1 -0
- package/media/assembly-area.svg +1 -1
- package/media/attack-position.svg +1 -0
- package/media/base-camp.svg +1 -0
- package/media/battle-handover-line.svg +1 -1
- package/media/battle-position.svg +1 -1
- package/media/block-arrow.svg +1 -1
- package/media/block-mission-task.svg +1 -1
- package/media/boundary.svg +1 -1
- package/media/breach.svg +1 -1
- package/media/bypass.svg +1 -1
- package/media/canalize.svg +1 -1
- package/media/clear.svg +1 -1
- package/media/cover.svg +1 -0
- package/media/delay.svg +1 -1
- package/media/direction-of-attack-aviation.svg +1 -0
- package/media/direction-of-main-attack.svg +1 -0
- package/media/direction-of-supporting-attack.svg +1 -0
- package/media/drop-zone.svg +1 -0
- package/media/encirclement.svg +1 -1
- package/media/engineer-work-line.svg +1 -1
- package/media/extraction-zone.svg +1 -0
- package/media/fortified-area.svg +1 -1
- package/media/frontal-attack.svg +1 -0
- package/media/generic-c2-area.svg +1 -0
- package/media/generic-c2-line.svg +1 -1
- package/media/guard.svg +1 -0
- package/media/guerrilla-base.svg +1 -0
- package/media/handover-line.svg +1 -1
- package/media/joint-tactical-action-area.svg +1 -1
- package/media/landing-zone.svg +1 -1
- package/media/light-line.svg +1 -1
- package/media/limited-access-area.svg +1 -0
- package/media/named-area-of-interest.svg +1 -0
- package/media/no-fire-area-irregular.svg +1 -0
- package/media/objective-area.svg +1 -0
- package/media/phase-line.svg +1 -1
- package/media/pickup-zone.svg +1 -1
- package/media/screen.svg +1 -0
- package/media/strong-point.svg +1 -1
- package/media/submarine-action-area.svg +1 -0
- package/media/submarine-generated-action-area.svg +1 -0
- package/media/target-area-of-interest.svg +1 -0
- package/media/turning-movement.svg +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,32 +90,75 @@ code.
|
|
|
90
90
|
| Preview | `kind` | Measure | 2525E Value |
|
|
91
91
|
| --- | --- | --- | --- |
|
|
92
92
|
| <img src="media/boundary.svg" width="96" height="48" alt=""> | `boundary` | Boundary | `110100` |
|
|
93
|
+
| <img src="media/light-line.svg" width="96" height="48" alt=""> | `light-line` | Light line | `110200` |
|
|
94
|
+
| <img src="media/engineer-work-line.svg" width="96" height="48" alt=""> | `engineer-work-line` | Engineer work line | `110300` |
|
|
95
|
+
| <img src="media/generic-c2-line.svg" width="96" height="48" alt=""> | `generic-c2-line` | Generic command and control line | `110400` |
|
|
96
|
+
|
|
97
|
+
### Command and Control Areas
|
|
98
|
+
|
|
99
|
+
| Preview | `kind` | Measure | 2525E Value |
|
|
100
|
+
| --- | --- | --- | --- |
|
|
101
|
+
| <img src="media/area-of-operations.svg" width="96" height="48" alt=""> | `area-of-operations` | Area of operations | `120100` |
|
|
102
|
+
| <img src="media/named-area-of-interest.svg" width="96" height="48" alt=""> | `named-area-of-interest` | Named area of interest | `120200` |
|
|
103
|
+
| <img src="media/target-area-of-interest.svg" width="96" height="48" alt=""> | `target-area-of-interest` | Target area of interest | `120300` |
|
|
104
|
+
| <img src="media/airfield-zone.svg" width="96" height="48" alt=""> | `airfield-zone` | Airfield zone | `120400` |
|
|
105
|
+
| <img src="media/base-camp.svg" width="96" height="48" alt=""> | `base-camp` | Base camp | `120500` |
|
|
106
|
+
| <img src="media/guerrilla-base.svg" width="96" height="48" alt=""> | `guerrilla-base` | Guerrilla base | `120600` |
|
|
107
|
+
| <img src="media/generic-c2-area.svg" width="96" height="48" alt=""> | `generic-c2-area` | Generic command and control area | `120700` |
|
|
93
108
|
|
|
94
109
|
### Maneuver Lines
|
|
95
110
|
|
|
96
111
|
| Preview | `kind` | Measure | 2525E Value |
|
|
97
112
|
| --- | --- | --- | --- |
|
|
98
113
|
| <img src="media/flot.svg" width="96" height="48" alt=""> | `flot` | Forward line of own troops (FLOT) | `140100` |
|
|
114
|
+
| <img src="media/phase-line.svg" width="96" height="48" alt=""> | `phase-line` | Phase line | `140300` |
|
|
99
115
|
| <img src="media/final-protective-fire-left.svg" width="96" height="48" alt=""> | `final-protective-fire-left` | Final Protective Fire (Left) | `140501` |
|
|
100
116
|
| <img src="media/final-protective-fire-right.svg" width="96" height="48" alt=""> | `final-protective-fire-right` | Final Protective Fire (Right) | `140502` |
|
|
101
117
|
| <img src="media/principal-direction-of-fire.svg" width="96" height="48" alt=""> | `principal-direction-of-fire` | Principal Direction of Fire | `140503` |
|
|
118
|
+
| <img src="media/direction-of-attack-aviation.svg" width="96" height="48" alt=""> | `direction-of-attack-aviation` | Direction of Attack — Airborne/Aviation | `140601` |
|
|
119
|
+
| <img src="media/direction-of-main-attack.svg" width="96" height="48" alt=""> | `direction-of-main-attack` | Direction of Main Attack | `140602` |
|
|
120
|
+
| <img src="media/direction-of-supporting-attack.svg" width="96" height="48" alt=""> | `direction-of-supporting-attack` | Direction of Supporting Attack | `140603` |
|
|
102
121
|
| <img src="media/ambush.svg" width="96" height="48" alt=""> | `ambush` | Ambush | `141700` |
|
|
122
|
+
| <img src="media/handover-line.svg" width="96" height="48" alt=""> | `handover-line` | Handover line | `141800` |
|
|
123
|
+
| <img src="media/battle-handover-line.svg" width="96" height="48" alt=""> | `battle-handover-line` | Battle handover line | `141900` |
|
|
103
124
|
|
|
104
125
|
### Maneuver Areas
|
|
105
126
|
|
|
106
127
|
| Preview | `kind` | Measure | 2525E Value |
|
|
107
128
|
| --- | --- | --- | --- |
|
|
129
|
+
| <img src="media/area.svg" width="96" height="48" alt=""> | `area` | Area | `150100` |
|
|
130
|
+
| <img src="media/assembly-area.svg" width="96" height="48" alt=""> | `assembly-area` | Assembly area | `150200` |
|
|
131
|
+
| <img src="media/joint-tactical-action-area.svg" width="96" height="48" alt=""> | `joint-tactical-action-area` | Joint tactical action area | `150501` |
|
|
132
|
+
| <img src="media/submarine-action-area.svg" width="96" height="48" alt=""> | `submarine-action-area` | Submarine action area | `150502` |
|
|
133
|
+
| <img src="media/submarine-generated-action-area.svg" width="96" height="48" alt=""> | `submarine-generated-action-area` | Submarine-generated action area | `150503` |
|
|
134
|
+
| <img src="media/drop-zone.svg" width="96" height="48" alt=""> | `drop-zone` | Drop zone | `150600` |
|
|
135
|
+
| <img src="media/extraction-zone.svg" width="96" height="48" alt=""> | `extraction-zone` | Extraction zone | `150700` |
|
|
136
|
+
| <img src="media/landing-zone.svg" width="96" height="48" alt=""> | `landing-zone` | Landing zone | `150800` |
|
|
137
|
+
| <img src="media/pickup-zone.svg" width="96" height="48" alt=""> | `pickup-zone` | Pickup zone | `150900` |
|
|
108
138
|
| <img src="media/fortified-area.svg" width="96" height="48" alt=""> | `fortified-area` | Fortified Area | `151000` |
|
|
139
|
+
| <img src="media/limited-access-area.svg" width="96" height="48" alt=""> | `limited-access-area` | Limited Access Area | `151100` |
|
|
109
140
|
| <img src="media/battle-position.svg" width="96" height="48" alt=""> | `battle-position` | Battle Position | `151200` |
|
|
110
141
|
| <img src="media/strong-point.svg" width="96" height="48" alt=""> | `strong-point` | Strong Point | `151203` |
|
|
111
142
|
| <img src="media/airborne-attack.svg" width="96" height="48" alt=""> | `airborne-attack` | Airborne Attack | `151401` |
|
|
112
143
|
| <img src="media/attack-helicopter.svg" width="96" height="48" alt=""> | `attack-helicopter` | Attack Helicopter | `151402` |
|
|
113
144
|
| <img src="media/main-attack.svg" width="96" height="48" alt=""> | `main-attack` | Main Attack | `151403` |
|
|
114
145
|
| <img src="media/supporting-attack.svg" width="96" height="48" alt=""> | `supporting-attack` | Supporting Attack | `151404` |
|
|
146
|
+
| <img src="media/assault-position.svg" width="96" height="48" alt=""> | `assault-position` | Assault position | `151500` |
|
|
147
|
+
| <img src="media/attack-position.svg" width="96" height="48" alt=""> | `attack-position` | Attack position | `151600` |
|
|
148
|
+
| <img src="media/objective-area.svg" width="96" height="48" alt=""> | `objective-area` | Objective area | `151700` |
|
|
115
149
|
| <img src="media/encirclement.svg" width="96" height="48" alt=""> | `encirclement` | Encirclement | `151800` |
|
|
116
150
|
| <img src="media/attack-by-fire.svg" width="96" height="48" alt=""> | `attack-by-fire` | Attack by Fire | `152000` |
|
|
117
151
|
| <img src="media/support-by-fire.svg" width="96" height="48" alt=""> | `support-by-fire` | Support By Fire | `152100` |
|
|
118
152
|
| <img src="media/search-area.svg" width="96" height="48" alt=""> | `search-area` | Search Area | `152200` |
|
|
153
|
+
| <img src="media/area-defense.svg" width="96" height="48" alt=""> | `area-defense` | Area Defense | `152600` |
|
|
154
|
+
| <img src="media/frontal-attack.svg" width="96" height="48" alt=""> | `frontal-attack` | Frontal Attack | `152700` |
|
|
155
|
+
| <img src="media/turning-movement.svg" width="96" height="48" alt=""> | `turning-movement` | Turning Movement | `152900` |
|
|
156
|
+
|
|
157
|
+
### Fire Areas
|
|
158
|
+
|
|
159
|
+
| Preview | `kind` | Measure | 2525E Value |
|
|
160
|
+
| --- | --- | --- | --- |
|
|
161
|
+
| <img src="media/no-fire-area-irregular.svg" width="96" height="48" alt=""> | `no-fire-area-irregular` | No Fire Area (NFA) – Irregular | `240301` |
|
|
119
162
|
|
|
120
163
|
### Protection Areas
|
|
121
164
|
|
|
@@ -149,6 +192,9 @@ code.
|
|
|
149
192
|
| <img src="media/clear.svg" width="96" height="48" alt=""> | `clear` | Clear | `340500` |
|
|
150
193
|
| <img src="media/delay.svg" width="96" height="48" alt=""> | `delay` | Delay | `340800` |
|
|
151
194
|
| <img src="media/isolate.svg" width="96" height="48" alt=""> | `isolate` | Isolate | `341500` |
|
|
195
|
+
| <img src="media/cover.svg" width="96" height="48" alt=""> | `cover` | Cover | `342201` |
|
|
196
|
+
| <img src="media/guard.svg" width="96" height="48" alt=""> | `guard` | Guard | `342202` |
|
|
197
|
+
| <img src="media/screen.svg" width="96" height="48" alt=""> | `screen` | Screen | `342203` |
|
|
152
198
|
|
|
153
199
|
### Generic Graphics
|
|
154
200
|
|
|
@@ -505,6 +505,15 @@ declare const project: (lon: number, lat: number) => Point2D;
|
|
|
505
505
|
* Unproject Web Mercator (Meters) back to WGS84 (Lon/Lat).
|
|
506
506
|
*/
|
|
507
507
|
declare const unproject: (x: number, y: number) => Position;
|
|
508
|
+
/**
|
|
509
|
+
* Great-circle distance in meters between two lon/lat positions (haversine on
|
|
510
|
+
* 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.
|
|
515
|
+
*/
|
|
516
|
+
declare const haversineDistance: (a: Position, b: Position) => number;
|
|
508
517
|
//#endregion
|
|
509
518
|
//#region src/internal/sketch.d.ts
|
|
510
519
|
/**
|
|
@@ -651,6 +660,42 @@ declare const DEFAULT_GENERIC_C2_LINE_OPTIONS: GenericC2LineOptions;
|
|
|
651
660
|
*/
|
|
652
661
|
declare function createGenericC2Line(positions: Position[], options?: GenericC2LineOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<LineString | Point>;
|
|
653
662
|
//#endregion
|
|
663
|
+
//#region src/style.d.ts
|
|
664
|
+
/**
|
|
665
|
+
* Framework-agnostic style hints attached to a `ControlMeasure`.
|
|
666
|
+
*
|
|
667
|
+
* Mirrors the per-feature subset of what map adapters render. The renderer
|
|
668
|
+
* fans these into each emitted feature's `properties.style` ([[StyleHints]]).
|
|
669
|
+
* Adapters merge them over their layer-level style; generator-emitted hints
|
|
670
|
+
* on individual features win over both.
|
|
671
|
+
*/
|
|
672
|
+
interface ControlMeasureStyle {
|
|
673
|
+
/**
|
|
674
|
+
* The single symbol color. Control measures are monocolor: one color paints
|
|
675
|
+
* every part, stroked or filled. Input-only — resolved into concrete
|
|
676
|
+
* `strokeColor` / `fillColor` per feature by the renderer and never emitted
|
|
677
|
+
* on output. `strokeColor` / `fillColor` act as optional per-channel
|
|
678
|
+
* overrides. See ADR-0011.
|
|
679
|
+
*/
|
|
680
|
+
color?: string;
|
|
681
|
+
strokeColor?: string;
|
|
682
|
+
strokeWidth?: number;
|
|
683
|
+
strokeDash?: number[];
|
|
684
|
+
fillColor?: string;
|
|
685
|
+
/**
|
|
686
|
+
* How a filled part's interior is painted. `"solid"` is explicit so a
|
|
687
|
+
* measure can override a patterned layer default (e.g. a hachure fill set
|
|
688
|
+
* at the façade). Pattern lines are drawn in the resolved fill color —
|
|
689
|
+
* alpha included, there is no separate opacity field. Renderers that
|
|
690
|
+
* cannot draw a pattern degrade to solid.
|
|
691
|
+
*/
|
|
692
|
+
fillPattern?: FillPattern;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* How a filled part's interior is painted. See `ControlMeasureStyle.fillPattern`.
|
|
696
|
+
*/
|
|
697
|
+
type FillPattern = "solid" | "hachure" | "backhachure" | "cross";
|
|
698
|
+
//#endregion
|
|
654
699
|
//#region src/internal/area-labels.d.ts
|
|
655
700
|
/** Shared placement options for the centered-label area measures. */
|
|
656
701
|
interface AreaLabelOptions extends LabelSizeOptions {
|
|
@@ -863,42 +908,6 @@ declare const DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS: Required<PrincipalDir
|
|
|
863
908
|
*/
|
|
864
909
|
declare function createPrincipalDirectionOfFire(coordinates: Position[], options?: PrincipalDirectionOfFireOptions): FeatureCollection<MultiLineString, Record<string, never>>;
|
|
865
910
|
//#endregion
|
|
866
|
-
//#region src/style.d.ts
|
|
867
|
-
/**
|
|
868
|
-
* Framework-agnostic style hints attached to a `ControlMeasure`.
|
|
869
|
-
*
|
|
870
|
-
* Mirrors the per-feature subset of what map adapters render. The renderer
|
|
871
|
-
* fans these into each emitted feature's `properties.style` ([[StyleHints]]).
|
|
872
|
-
* Adapters merge them over their layer-level style; generator-emitted hints
|
|
873
|
-
* on individual features win over both.
|
|
874
|
-
*/
|
|
875
|
-
interface ControlMeasureStyle {
|
|
876
|
-
/**
|
|
877
|
-
* The single symbol color. Control measures are monocolor: one color paints
|
|
878
|
-
* every part, stroked or filled. Input-only — resolved into concrete
|
|
879
|
-
* `strokeColor` / `fillColor` per feature by the renderer and never emitted
|
|
880
|
-
* on output. `strokeColor` / `fillColor` act as optional per-channel
|
|
881
|
-
* overrides. See ADR-0011.
|
|
882
|
-
*/
|
|
883
|
-
color?: string;
|
|
884
|
-
strokeColor?: string;
|
|
885
|
-
strokeWidth?: number;
|
|
886
|
-
strokeDash?: number[];
|
|
887
|
-
fillColor?: string;
|
|
888
|
-
/**
|
|
889
|
-
* How a filled part's interior is painted. `"solid"` is explicit so a
|
|
890
|
-
* measure can override a patterned layer default (e.g. a hachure fill set
|
|
891
|
-
* at the façade). Pattern lines are drawn in the resolved fill color —
|
|
892
|
-
* alpha included, there is no separate opacity field. Renderers that
|
|
893
|
-
* cannot draw a pattern degrade to solid.
|
|
894
|
-
*/
|
|
895
|
-
fillPattern?: FillPattern;
|
|
896
|
-
}
|
|
897
|
-
/**
|
|
898
|
-
* How a filled part's interior is painted. See `ControlMeasureStyle.fillPattern`.
|
|
899
|
-
*/
|
|
900
|
-
type FillPattern = "solid" | "hachure" | "backhachure" | "cross";
|
|
901
|
-
//#endregion
|
|
902
911
|
//#region src/rendered.d.ts
|
|
903
912
|
/**
|
|
904
913
|
* Per-feature style hints carried on `properties.style`.
|
|
@@ -940,6 +949,8 @@ interface FeaturePartProps {
|
|
|
940
949
|
* text begins at the point, `"end"` = it ends there. Absent = centered.
|
|
941
950
|
*/
|
|
942
951
|
textAnchor?: "start" | "end";
|
|
952
|
+
/** Render an opaque light backdrop behind text placed over patterned geometry. */
|
|
953
|
+
textBackground?: boolean;
|
|
943
954
|
/** Canonical field key for a text-amplifier label that may be repositioned. */
|
|
944
955
|
amplifierField?: TextAmplifierKey;
|
|
945
956
|
/** Stable key used to persist a user-adjusted anchor for any rendered label. */
|
|
@@ -1157,6 +1168,28 @@ declare const DEFAULT_LANDING_ZONE_OPTIONS: LandingZoneOptions;
|
|
|
1157
1168
|
*/
|
|
1158
1169
|
declare function createLandingZone(positions: Position[], options?: LandingZoneOptions, textAmplifiers?: CanonicalTextAmplifiers, context?: ControlMeasureGeneratorContext): FeatureCollection<Polygon | MultiLineString | Point>;
|
|
1159
1170
|
//#endregion
|
|
1171
|
+
//#region src/generators/cm15-maneuver-areas/limitedAccessArea.d.ts
|
|
1172
|
+
/** Configuration options for the Limited Access Area control measure. */
|
|
1173
|
+
interface LimitedAccessAreaOptions extends AreaLabelOptions {
|
|
1174
|
+
/** Round the area's corners through its control points. */
|
|
1175
|
+
smooth?: boolean;
|
|
1176
|
+
/** Number of samples per segment when smoothing is enabled. */
|
|
1177
|
+
smoothResolution?: number;
|
|
1178
|
+
}
|
|
1179
|
+
/** Creates a back-hatched free area with a movable "LAA" label, centered by default. */
|
|
1180
|
+
declare function createLimitedAccessArea(positions: Position[], options?: LimitedAccessAreaOptions, textAmplifiers?: CanonicalTextAmplifiers, context?: ControlMeasureGeneratorContext): FeatureCollection<Polygon | MultiLineString | Point>;
|
|
1181
|
+
//#endregion
|
|
1182
|
+
//#region src/generators/cm24-fire-areas/noFireAreaIrregular.d.ts
|
|
1183
|
+
/** Configuration options for the irregular No Fire Area control measure. */
|
|
1184
|
+
interface NoFireAreaIrregularOptions extends AreaLabelOptions {
|
|
1185
|
+
/** Round the area's corners through its control points. */
|
|
1186
|
+
smooth?: boolean;
|
|
1187
|
+
/** Number of samples per segment when smoothing is enabled. */
|
|
1188
|
+
smoothResolution?: number;
|
|
1189
|
+
}
|
|
1190
|
+
/** Creates a back-hatched irregular NFA with its centered movable label fields. */
|
|
1191
|
+
declare function createNoFireAreaIrregular(positions: Position[], options?: NoFireAreaIrregularOptions, textAmplifiers?: CanonicalTextAmplifiers, context?: ControlMeasureGeneratorContext): FeatureCollection<Polygon | MultiLineString | Point>;
|
|
1192
|
+
//#endregion
|
|
1160
1193
|
//#region src/generators/cm15-maneuver-areas/pickupZone.d.ts
|
|
1161
1194
|
/** Configuration options for the Pickup zone control measure. */
|
|
1162
1195
|
type PickupZoneOptions = LabeledAreaOptions;
|
|
@@ -2337,6 +2370,8 @@ declare const DEFINITIONS: {
|
|
|
2337
2370
|
"drop-zone": ControlMeasureDefinition<"drop-zone", typeof createDropZone>;
|
|
2338
2371
|
"extraction-zone": ControlMeasureDefinition<"extraction-zone", typeof createExtractionZone>;
|
|
2339
2372
|
"landing-zone": ControlMeasureDefinition<"landing-zone", typeof createLandingZone>;
|
|
2373
|
+
"limited-access-area": ControlMeasureDefinition<"limited-access-area", typeof createLimitedAccessArea>;
|
|
2374
|
+
"no-fire-area-irregular": ControlMeasureDefinition<"no-fire-area-irregular", typeof createNoFireAreaIrregular>;
|
|
2340
2375
|
"pickup-zone": ControlMeasureDefinition<"pickup-zone", typeof createPickupZone>;
|
|
2341
2376
|
"assault-position": ControlMeasureDefinition<"assault-position", typeof createAssaultPosition>;
|
|
2342
2377
|
"attack-position": ControlMeasureDefinition<"attack-position", typeof createAttackPosition>;
|
|
@@ -2728,4 +2763,4 @@ interface AmbushOptions {
|
|
|
2728
2763
|
}
|
|
2729
2764
|
declare const DEFAULT_AMBUSH_OPTIONS: Required<AmbushOptions>;
|
|
2730
2765
|
//#endregion
|
|
2731
|
-
export { ObstacleBypassDifficultOptions as $,
|
|
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ObstacleBypassDifficultOptions, $n 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 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, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
|
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 };
|
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
|
|
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";
|
|
2
2
|
//#region src/freeze-orientation.ts
|
|
3
3
|
/**
|
|
4
4
|
* Dispatches to a measure kind's `freezeOrientation` hook (see
|
|
@@ -115,4 +115,4 @@ function toHexChannel(value) {
|
|
|
115
115
|
return Math.max(0, Math.min(255, Math.round(value))).toString(16).padStart(2, "0");
|
|
116
116
|
}
|
|
117
117
|
//#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, isKind, line1DrawRule, line23DrawRule, line24DrawRule, line26DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveAmplifierPlacement, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
|
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 };
|
package/dist/preview/index.d.mts
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
import { U as ControlMeasureId,
|
|
1
|
+
import { Ar as TextAmplifiers, U as ControlMeasureId, rr as FillPattern } from "../index-BTViqLbA.mjs";
|
|
2
2
|
import { FeatureCollection, Geometry } from "geojson";
|
|
3
3
|
|
|
4
4
|
//#region src/preview/index.d.ts
|
|
5
|
+
/** The hatch fill patterns a preview can render — the `FillPattern` vocabulary
|
|
6
|
+
* minus `"solid"` (a plain fill, not a pattern). */
|
|
7
|
+
type PreviewFillPattern = Exclude<FillPattern, "solid">;
|
|
8
|
+
/** Side length (SVG units) of the repeating hatch tile in {@link PREVIEW_FILL_PATTERNS}. */
|
|
9
|
+
declare const PREVIEW_PATTERN_TILE = 8;
|
|
10
|
+
/**
|
|
11
|
+
* SVG `<pattern>` tile geometry every preview consumer (docs catalog, sidebar
|
|
12
|
+
* thumbnail, README/`media` generator) renders so a `fillPattern` shape looks
|
|
13
|
+
* identical everywhere; the `d` paths mirror the leaflet adapter's fill-pattern
|
|
14
|
+
* tiles over a {@link PREVIEW_PATTERN_TILE}-unit tile. Kept here as the single
|
|
15
|
+
* source so a new pattern is defined once, not copied per renderer.
|
|
16
|
+
*/
|
|
17
|
+
declare const PREVIEW_FILL_PATTERNS: readonly {
|
|
18
|
+
readonly id: PreviewFillPattern;
|
|
19
|
+
readonly paths: readonly string[];
|
|
20
|
+
}[];
|
|
5
21
|
/**
|
|
6
22
|
* Renders a measure's representative preview to GeoJSON. Pure — no map engine,
|
|
7
23
|
* so it runs identically at build time (docs catalog, README generator) and in
|
|
@@ -28,6 +44,8 @@ interface PreviewShape {
|
|
|
28
44
|
cy?: number;
|
|
29
45
|
/** Whether a `polygon` is a doctrinal solid (arrowhead) vs an area outline. */
|
|
30
46
|
filled?: boolean;
|
|
47
|
+
/** Pattern requested by a filled polygon. */
|
|
48
|
+
fillPattern?: PreviewFillPattern;
|
|
31
49
|
/** Glyph text for `text` (e.g. breach's "B"). */
|
|
32
50
|
text?: string;
|
|
33
51
|
/** Generator-frame rotation (radians) for `text`. */
|
|
@@ -48,6 +66,8 @@ interface PreviewShape {
|
|
|
48
66
|
* feature's `textAnchor` — `"start"`/`"end"` anchor the text at the point
|
|
49
67
|
* instead of centering it. Undefined = centered. */
|
|
50
68
|
textAnchor?: "start" | "end";
|
|
69
|
+
/** Whether the text needs an opaque readability backdrop. */
|
|
70
|
+
textBackground?: boolean;
|
|
51
71
|
}
|
|
52
72
|
/** Target viewBox the geometry is fit into. */
|
|
53
73
|
interface ProjectDimensions {
|
|
@@ -65,6 +85,13 @@ declare function projectRenderToShapes(fc: FeatureCollection<Geometry, unknown>,
|
|
|
65
85
|
shapes: PreviewShape[];
|
|
66
86
|
ok: boolean;
|
|
67
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* On-screen width (SVG units) of a `textBackground` label's readability box at
|
|
90
|
+
* `fontSize`: the glyph run (via {@link CHAR_WIDTH_RATIO}) or the font size,
|
|
91
|
+
* whichever is wider, plus a small horizontal pad. Shared by every preview
|
|
92
|
+
* consumer that paints the backdrop rect so the box width stays consistent.
|
|
93
|
+
*/
|
|
94
|
+
declare function previewLabelBackgroundWidth(text: string | undefined, fontSize: number): number;
|
|
68
95
|
/**
|
|
69
96
|
* Grows a viewBox to include every `text` shape's estimated on-screen box —
|
|
70
97
|
* {@link projectRenderToShapes} fits geometry coordinates only, so an
|
|
@@ -112,4 +139,4 @@ declare function viewBoxString(shapes: PreviewShape[], dims: {
|
|
|
112
139
|
*/
|
|
113
140
|
declare function svgTextTransform(s: PreviewShape): string | undefined;
|
|
114
141
|
//#endregion
|
|
115
|
-
export { PreviewShape, ProjectDimensions, projectRenderToShapes, renderRepresentative, svgTextTransform, viewBoxString, viewBoxWithLabels };
|
|
142
|
+
export { PREVIEW_FILL_PATTERNS, PREVIEW_PATTERN_TILE, PreviewFillPattern, PreviewShape, ProjectDimensions, previewLabelBackgroundWidth, projectRenderToShapes, renderRepresentative, svgTextTransform, viewBoxString, viewBoxWithLabels };
|
package/dist/preview/index.mjs
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
import { a as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-
|
|
1
|
+
import { a as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-Bc0d45Iv.mjs";
|
|
2
2
|
//#region src/preview/index.ts
|
|
3
|
+
/** Side length (SVG units) of the repeating hatch tile in {@link PREVIEW_FILL_PATTERNS}. */
|
|
4
|
+
const PREVIEW_PATTERN_TILE = 8;
|
|
5
|
+
/**
|
|
6
|
+
* SVG `<pattern>` tile geometry every preview consumer (docs catalog, sidebar
|
|
7
|
+
* thumbnail, README/`media` generator) renders so a `fillPattern` shape looks
|
|
8
|
+
* identical everywhere; the `d` paths mirror the leaflet adapter's fill-pattern
|
|
9
|
+
* tiles over a {@link PREVIEW_PATTERN_TILE}-unit tile. Kept here as the single
|
|
10
|
+
* source so a new pattern is defined once, not copied per renderer.
|
|
11
|
+
*/
|
|
12
|
+
const PREVIEW_FILL_PATTERNS = [
|
|
13
|
+
{
|
|
14
|
+
id: "hachure",
|
|
15
|
+
paths: ["M-1,-1 L9,9 M7,-1 L9,1 M-1,7 L1,9"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "backhachure",
|
|
19
|
+
paths: ["M9,-1 L-1,9 M1,-1 L-1,1 M9,7 L7,9"]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "cross",
|
|
23
|
+
paths: ["M-1,-1 L9,9 M7,-1 L9,1 M-1,7 L1,9", "M9,-1 L-1,9 M1,-1 L-1,1 M9,7 L7,9"]
|
|
24
|
+
}
|
|
25
|
+
];
|
|
3
26
|
/**
|
|
4
27
|
* Unitless `previewSample` points (~`[-1, 1]`) are scaled by this degree offset
|
|
5
28
|
* before reaching a generator. Most generators operate in projected meters, so
|
|
@@ -143,6 +166,15 @@ const METERS_PER_DEGREE = 111320;
|
|
|
143
166
|
* not to lay out real text. */
|
|
144
167
|
const CHAR_WIDTH_RATIO = .62;
|
|
145
168
|
/**
|
|
169
|
+
* On-screen width (SVG units) of a `textBackground` label's readability box at
|
|
170
|
+
* `fontSize`: the glyph run (via {@link CHAR_WIDTH_RATIO}) or the font size,
|
|
171
|
+
* whichever is wider, plus a small horizontal pad. Shared by every preview
|
|
172
|
+
* consumer that paints the backdrop rect so the box width stays consistent.
|
|
173
|
+
*/
|
|
174
|
+
function previewLabelBackgroundWidth(text, fontSize) {
|
|
175
|
+
return Math.max(fontSize, (text?.length ?? 0) * fontSize * CHAR_WIDTH_RATIO) + 6;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
146
178
|
* Glyph-width ratio for {@link viewBoxWithLabels}' extent boxes. Deliberately
|
|
147
179
|
* wider than {@link CHAR_WIDTH_RATIO}: the average slightly undershoots bold
|
|
148
180
|
* uppercase strings ("PL ECHO"), and an extent estimate that undershoots crops
|
|
@@ -298,6 +330,10 @@ function collectShapes(g, tx, out, bboxArea, textLimits, props) {
|
|
|
298
330
|
const labelText = typeof labelProps.text === "string" ? labelProps.text : void 0;
|
|
299
331
|
const labelRotation = typeof labelProps.rotation === "number" ? labelProps.rotation : void 0;
|
|
300
332
|
const labelAnchor = labelProps.textAnchor === "start" || labelProps.textAnchor === "end" ? labelProps.textAnchor : void 0;
|
|
333
|
+
const textBackground = labelProps.textBackground === true ? true : void 0;
|
|
334
|
+
const styleProps = labelProps.style && typeof labelProps.style === "object" ? labelProps.style : {};
|
|
335
|
+
const fillPattern = PREVIEW_FILL_PATTERNS.some((p) => p.id === styleProps.fillPattern) ? styleProps.fillPattern : void 0;
|
|
336
|
+
const explicitlyFilled = typeof styleProps.fillColor === "string";
|
|
301
337
|
const polygonFilled = (ring) => bboxArea > 0 && ringArea(ring) / bboxArea < .25;
|
|
302
338
|
switch (g.type) {
|
|
303
339
|
case "Point": {
|
|
@@ -311,7 +347,8 @@ function collectShapes(g, tx, out, bboxArea, textLimits, props) {
|
|
|
311
347
|
text: labelText,
|
|
312
348
|
rotation: labelRotation,
|
|
313
349
|
heightPx,
|
|
314
|
-
textAnchor: labelAnchor
|
|
350
|
+
textAnchor: labelAnchor,
|
|
351
|
+
textBackground
|
|
315
352
|
});
|
|
316
353
|
} else out.push({
|
|
317
354
|
type: "circle",
|
|
@@ -346,14 +383,16 @@ function collectShapes(g, tx, out, bboxArea, textLimits, props) {
|
|
|
346
383
|
g.coordinates.forEach((ring) => out.push({
|
|
347
384
|
type: "polygon",
|
|
348
385
|
d: pathFromRing(ring, tx, true),
|
|
349
|
-
filled: polygonFilled(ring)
|
|
386
|
+
filled: explicitlyFilled || polygonFilled(ring),
|
|
387
|
+
fillPattern
|
|
350
388
|
}));
|
|
351
389
|
break;
|
|
352
390
|
case "MultiPolygon":
|
|
353
391
|
g.coordinates.forEach((poly) => poly.forEach((ring) => out.push({
|
|
354
392
|
type: "polygon",
|
|
355
393
|
d: pathFromRing(ring, tx, true),
|
|
356
|
-
filled: polygonFilled(ring)
|
|
394
|
+
filled: polygonFilled(ring),
|
|
395
|
+
fillPattern
|
|
357
396
|
})));
|
|
358
397
|
break;
|
|
359
398
|
case "GeometryCollection":
|
|
@@ -362,4 +401,4 @@ function collectShapes(g, tx, out, bboxArea, textLimits, props) {
|
|
|
362
401
|
}
|
|
363
402
|
}
|
|
364
403
|
//#endregion
|
|
365
|
-
export { projectRenderToShapes, renderRepresentative, svgTextTransform, viewBoxString, viewBoxWithLabels };
|
|
404
|
+
export { PREVIEW_FILL_PATTERNS, PREVIEW_PATTERN_TILE, previewLabelBackgroundWidth, projectRenderToShapes, renderRepresentative, svgTextTransform, viewBoxString, viewBoxWithLabels };
|