@orbat-mapper/control-measures 0.2.0-alpha.7 → 0.2.0-alpha.9
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 +9 -3
- package/dist/{index-DUGzYzPy.d.mts → index-26Xb77jE.d.mts} +189 -30
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +5 -5
- package/dist/preview/index.d.mts +1 -1
- package/dist/preview/index.mjs +1 -1
- package/dist/{renderControlMeasure-DGWf44sn.mjs → renderControlMeasure-CFdgTURO.mjs} +318 -121
- package/media/battle-position.svg +1 -1
- package/media/circle.svg +1 -0
- package/media/encirclement.svg +1 -0
- package/media/line.svg +1 -0
- package/media/polygon.svg +1 -0
- package/media/rectangle.svg +1 -0
- package/media/strong-point.svg +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,8 +75,8 @@ controls how invalid coordinate input is handled:
|
|
|
75
75
|
|
|
76
76
|
- `validationMode: "silent" | "warn" | "throw"`
|
|
77
77
|
|
|
78
|
-
When omitted, validation
|
|
79
|
-
useful for strict integrations and tests.
|
|
78
|
+
When omitted, validation defaults to `silent` mode — invalid input yields an
|
|
79
|
+
empty render. `"throw"` is useful for strict integrations and tests.
|
|
80
80
|
|
|
81
81
|
## Supported control measures
|
|
82
82
|
|
|
@@ -107,10 +107,12 @@ code.
|
|
|
107
107
|
| --- | --- | --- | --- |
|
|
108
108
|
| <img src="media/fortified-area.svg" width="96" height="48" alt=""> | `fortified-area` | Fortified Area | `151000` |
|
|
109
109
|
| <img src="media/battle-position.svg" width="96" height="48" alt=""> | `battle-position` | Battle Position | `151200` |
|
|
110
|
+
| <img src="media/strong-point.svg" width="96" height="48" alt=""> | `strong-point` | Strong Point | `151203` |
|
|
110
111
|
| <img src="media/airborne-attack.svg" width="96" height="48" alt=""> | `airborne-attack` | Airborne Attack | `151401` |
|
|
111
112
|
| <img src="media/attack-helicopter.svg" width="96" height="48" alt=""> | `attack-helicopter` | Attack Helicopter | `151402` |
|
|
112
113
|
| <img src="media/main-attack.svg" width="96" height="48" alt=""> | `main-attack` | Main Attack | `151403` |
|
|
113
114
|
| <img src="media/supporting-attack.svg" width="96" height="48" alt=""> | `supporting-attack` | Supporting Attack | `151404` |
|
|
115
|
+
| <img src="media/encirclement.svg" width="96" height="48" alt=""> | `encirclement` | Encirclement | `151800` |
|
|
114
116
|
| <img src="media/attack-by-fire.svg" width="96" height="48" alt=""> | `attack-by-fire` | Attack by Fire | `152000` |
|
|
115
117
|
| <img src="media/support-by-fire.svg" width="96" height="48" alt=""> | `support-by-fire` | Support By Fire | `152100` |
|
|
116
118
|
| <img src="media/search-area.svg" width="96" height="48" alt=""> | `search-area` | Search Area | `152200` |
|
|
@@ -148,12 +150,16 @@ code.
|
|
|
148
150
|
| <img src="media/delay.svg" width="96" height="48" alt=""> | `delay` | Delay | `340800` |
|
|
149
151
|
| <img src="media/isolate.svg" width="96" height="48" alt=""> | `isolate` | Isolate | `341500` |
|
|
150
152
|
|
|
151
|
-
### Generic
|
|
153
|
+
### Generic Graphics
|
|
152
154
|
|
|
153
155
|
| Preview | `kind` | Measure | 2525E Value |
|
|
154
156
|
| --- | --- | --- | --- |
|
|
155
157
|
| <img src="media/block-arrow.svg" width="96" height="48" alt=""> | `block-arrow` | Block Arrow | `990001` |
|
|
156
158
|
| <img src="media/classic-arrow.svg" width="96" height="48" alt=""> | `classic-arrow` | Classic Arrow | `990002` |
|
|
159
|
+
| <img src="media/line.svg" width="96" height="48" alt=""> | `line` | Line | `990101` |
|
|
160
|
+
| <img src="media/polygon.svg" width="96" height="48" alt=""> | `polygon` | Polygon | `990102` |
|
|
161
|
+
| <img src="media/rectangle.svg" width="96" height="48" alt=""> | `rectangle` | Rectangle | `990103` |
|
|
162
|
+
| <img src="media/circle.svg" width="96" height="48" alt=""> | `circle` | Circle | `990104` |
|
|
157
163
|
|
|
158
164
|
<!-- /AUTO-GENERATED:measures-table -->
|
|
159
165
|
|
|
@@ -59,6 +59,118 @@ interface ControlMeasureDrawRule {
|
|
|
59
59
|
transform(event: AnchorTransformEvent): Position[];
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
|
+
//#region src/text-amplifiers.d.ts
|
|
63
|
+
/**
|
|
64
|
+
* MIL-STD-2525E Appendix L Table L-II text amplifier fields.
|
|
65
|
+
*
|
|
66
|
+
* A control measure instance carries free-text amplifier fields (unique
|
|
67
|
+
* designation, country, date-time group, …) keyed by their doctrinal field
|
|
68
|
+
* code. Repeated fields use numbered suffixes per the standard (`T`, `T1`,
|
|
69
|
+
* `AS1`, `W1`, …). Graphic amplifiers (echelon `B`, direction of movement `Q`,
|
|
70
|
+
* offset location `BA`) are deliberately excluded — they are geometry
|
|
71
|
+
* concerns, rendered from generator options rather than free text.
|
|
72
|
+
*
|
|
73
|
+
* This module is a leaf: it imports nothing from `./metadata` or
|
|
74
|
+
* `./registry`, so both can depend on it without a cycle.
|
|
75
|
+
*/
|
|
76
|
+
type Suffix = "" | "1" | "2";
|
|
77
|
+
/** Doctrinal text amplifier field codes (Table L-II); graphic amplifier fields excluded. */
|
|
78
|
+
type TextAmplifierField = "C" | "H" | "N" | "T" | "V" | "W" | "X" | "Y" | "AM" | "AN" | "AP" | "AS";
|
|
79
|
+
/** A doctrinal field code with its optional repetition suffix, e.g. `"T1"`. */
|
|
80
|
+
type TextAmplifierKey = `${TextAmplifierField}${Suffix}`;
|
|
81
|
+
/**
|
|
82
|
+
* The vocabulary of text amplifier fields: doctrinal code, milsymbol-style
|
|
83
|
+
* friendly alias, and a human-readable label. The single source of truth for
|
|
84
|
+
* both the runtime catalog and the derived alias→code lookup used by
|
|
85
|
+
* {@link normalizeTextAmplifiers}.
|
|
86
|
+
*/
|
|
87
|
+
declare const TEXT_AMPLIFIER_FIELDS: {
|
|
88
|
+
readonly C: {
|
|
89
|
+
readonly alias: "quantity";
|
|
90
|
+
readonly label: "Quantity";
|
|
91
|
+
};
|
|
92
|
+
readonly H: {
|
|
93
|
+
readonly alias: "additionalInformation";
|
|
94
|
+
readonly label: "Additional information";
|
|
95
|
+
};
|
|
96
|
+
readonly N: {
|
|
97
|
+
readonly alias: "hostile";
|
|
98
|
+
readonly label: "Hostile (ENY) marker";
|
|
99
|
+
};
|
|
100
|
+
readonly T: {
|
|
101
|
+
readonly alias: "uniqueDesignation";
|
|
102
|
+
readonly label: "Unique designation";
|
|
103
|
+
};
|
|
104
|
+
readonly V: {
|
|
105
|
+
readonly alias: "type";
|
|
106
|
+
readonly label: "Equipment/type";
|
|
107
|
+
};
|
|
108
|
+
readonly W: {
|
|
109
|
+
readonly alias: "dtg";
|
|
110
|
+
readonly label: "Date-time group / O/O";
|
|
111
|
+
};
|
|
112
|
+
readonly X: {
|
|
113
|
+
readonly alias: "altitudeDepth";
|
|
114
|
+
readonly label: "Altitude/depth";
|
|
115
|
+
};
|
|
116
|
+
readonly Y: {
|
|
117
|
+
readonly alias: "location";
|
|
118
|
+
readonly label: "Location";
|
|
119
|
+
};
|
|
120
|
+
readonly AM: {
|
|
121
|
+
readonly alias: "distance";
|
|
122
|
+
readonly label: "Distance/range/radius";
|
|
123
|
+
};
|
|
124
|
+
readonly AN: {
|
|
125
|
+
readonly alias: "azimuth";
|
|
126
|
+
readonly label: "Azimuth";
|
|
127
|
+
};
|
|
128
|
+
readonly AP: {
|
|
129
|
+
readonly alias: "targetNumber";
|
|
130
|
+
readonly label: "Target number";
|
|
131
|
+
};
|
|
132
|
+
readonly AS: {
|
|
133
|
+
readonly alias: "country";
|
|
134
|
+
readonly label: "Country code";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
/** The milsymbol-style friendly alias for a text amplifier field, e.g. `"uniqueDesignation"`. */
|
|
138
|
+
type FriendlyName = (typeof TEXT_AMPLIFIER_FIELDS)[TextAmplifierField]["alias"];
|
|
139
|
+
/** A friendly alias with its optional repetition suffix, e.g. `"country1"`. */
|
|
140
|
+
type FriendlyKey = `${FriendlyName}${Suffix}`;
|
|
141
|
+
/**
|
|
142
|
+
* User-facing amplifier input: either canonical doctrinal keys (`T`, `AS1`,
|
|
143
|
+
* …) or friendly aliases (`uniqueDesignation`, `country1`, …), optionally
|
|
144
|
+
* mixed. Values are free text; see {@link normalizeTextAmplifiers} for how
|
|
145
|
+
* this is resolved to canonical form.
|
|
146
|
+
*/
|
|
147
|
+
type TextAmplifiers = Partial<Record<TextAmplifierKey | FriendlyKey, string>>;
|
|
148
|
+
/** Amplifier values resolved to canonical doctrinal keys, as generators receive them. */
|
|
149
|
+
type CanonicalTextAmplifiers = Readonly<Partial<Record<TextAmplifierKey, string>>>;
|
|
150
|
+
/**
|
|
151
|
+
* Resolves any accepted key (canonical or friendly alias, with an optional
|
|
152
|
+
* `1`/`2` suffix) to its canonical key, or `undefined` if unknown — e.g.
|
|
153
|
+
* `"T"` → `"T"`, `"uniqueDesignation1"` → `"T1"`, `"bogus"` → `undefined`.
|
|
154
|
+
*/
|
|
155
|
+
declare function canonicalTextAmplifierKey(key: string): TextAmplifierKey | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Resolves a `TextAmplifiers` record (canonical keys, friendly aliases, or a
|
|
158
|
+
* mix) to `CanonicalTextAmplifiers` keyed purely by doctrinal field code.
|
|
159
|
+
*
|
|
160
|
+
* - Friendly aliases (with an optional `1`/`2` suffix) map to their canonical
|
|
161
|
+
* code (e.g. `country1` → `AS1`).
|
|
162
|
+
* - Values are trimmed; entries that are empty/whitespace-only after
|
|
163
|
+
* trimming, or not strings, are dropped.
|
|
164
|
+
* - When both a canonical key and its friendly alias are present for the same
|
|
165
|
+
* field + suffix, the **canonical key wins** regardless of insertion order.
|
|
166
|
+
* This holds even for an empty/whitespace canonical value: it suppresses
|
|
167
|
+
* (clears) the alias entry rather than letting the alias survive.
|
|
168
|
+
* - Unknown keys are ignored.
|
|
169
|
+
*
|
|
170
|
+
* `undefined` or an empty input returns a shared frozen empty object.
|
|
171
|
+
*/
|
|
172
|
+
declare function normalizeTextAmplifiers(input: TextAmplifiers | undefined): CanonicalTextAmplifiers;
|
|
173
|
+
//#endregion
|
|
62
174
|
//#region src/metadata.d.ts
|
|
63
175
|
type ControlMeasureGeometryType = Geometry["type"];
|
|
64
176
|
type ControlMeasureGeometry = "point" | "line" | "area";
|
|
@@ -96,6 +208,15 @@ interface TextParamDescriptor extends BaseParamDescriptor {
|
|
|
96
208
|
maxLength?: number;
|
|
97
209
|
}
|
|
98
210
|
type ParamDescriptor = NumberParamDescriptor | BooleanParamDescriptor | ColorParamDescriptor | TextParamDescriptor | EnumParamDescriptor;
|
|
211
|
+
/** Editor-facing description of one text amplifier field a measure accepts. */
|
|
212
|
+
interface TextAmplifierDescriptor {
|
|
213
|
+
key: TextAmplifierKey;
|
|
214
|
+
label: string;
|
|
215
|
+
description?: string;
|
|
216
|
+
placeholder?: string;
|
|
217
|
+
/** Editor hint only — the renderer never truncates the value. */
|
|
218
|
+
maxLength?: number;
|
|
219
|
+
}
|
|
99
220
|
interface ControlMeasureMetadata {
|
|
100
221
|
id: string;
|
|
101
222
|
name: string;
|
|
@@ -117,6 +238,8 @@ interface ControlMeasureMetadata {
|
|
|
117
238
|
*/
|
|
118
239
|
rule?: ControlMeasureDrawRule;
|
|
119
240
|
params?: readonly ParamDescriptor[];
|
|
241
|
+
/** Text amplifier fields (MIL-STD-2525E Appendix L Table L-II) this measure accepts. */
|
|
242
|
+
textAmplifiers?: readonly TextAmplifierDescriptor[];
|
|
120
243
|
/**
|
|
121
244
|
* Marks a measure that emits a text label whose pixel size should be captured
|
|
122
245
|
* once at draw-commit time (rather than re-resolved on every zoom). Hosts use
|
|
@@ -140,8 +263,12 @@ type AnyFeatureCollection = FeatureCollection<Geometry, Record<string, unknown>
|
|
|
140
263
|
* `(o: BlockOptions) => …` is assignable to `(o: never) => …`. The actual
|
|
141
264
|
* options type is recovered covariantly via {@link OptsOf}, never through this
|
|
142
265
|
* bound. See ADR-0013.
|
|
266
|
+
*
|
|
267
|
+
* The optional third parameter carries the instance's normalized text
|
|
268
|
+
* amplifiers (ADR-0027); a generator that ignores text amplifiers just omits
|
|
269
|
+
* the parameter — fewer params is still assignable to this bound.
|
|
143
270
|
*/
|
|
144
|
-
type ControlMeasureGenerator = (controlPoints: Position[], options: never) => AnyFeatureCollection;
|
|
271
|
+
type ControlMeasureGenerator = (controlPoints: Position[], options: never, textAmplifiers?: CanonicalTextAmplifiers) => AnyFeatureCollection;
|
|
145
272
|
/**
|
|
146
273
|
* Everything that defines one control measure, co-located with its generator.
|
|
147
274
|
* `registry.ts` collects these into the single `DEFINITIONS` map, from which
|
|
@@ -270,14 +397,31 @@ interface BoundaryOptions {
|
|
|
270
397
|
* @default 1
|
|
271
398
|
*/
|
|
272
399
|
labelSpacing?: number;
|
|
273
|
-
/**
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
400
|
+
/**
|
|
401
|
+
* Clearance between the line/echelon glyph and the unit labels, as a ratio
|
|
402
|
+
* of the echelon glyph height (like `echelonPadding`). In `"along"` mode
|
|
403
|
+
* (and on `"standard"` east–west segments) it grows the labels'
|
|
404
|
+
* perpendicular offset from the line; in a `"standard"` north–south crossing
|
|
405
|
+
* row it grows each label's gap to the echelon glyph. Negative values clamp
|
|
406
|
+
* to 0.
|
|
407
|
+
* @default 0.4
|
|
408
|
+
*/
|
|
409
|
+
labelPadding?: number;
|
|
410
|
+
/**
|
|
411
|
+
* How the T/AS unit labels and the echelon glyph are oriented:
|
|
412
|
+
*
|
|
413
|
+
* - `"along"` — text runs along the line, offset perpendicular to it, and
|
|
414
|
+
* the echelon glyph turns with the segment (the default).
|
|
415
|
+
* - `"standard"` — MIL-STD-2525E Appendix L §L.5.5.2 / Figure L-10
|
|
416
|
+
* placement. On mostly east–west segments this reads exactly like
|
|
417
|
+
* `"along"`. On mostly north–south segments the whole group rotates to run
|
|
418
|
+
* *perpendicular* to the line instead: a single row of
|
|
419
|
+
* `<unit 1> <echelon> <unit 2>` crossing it (unit 1 on its left-of-travel
|
|
420
|
+
* side), each label aligned away from the glyph so long designations never
|
|
421
|
+
* overlap the line.
|
|
422
|
+
* @default "along"
|
|
423
|
+
*/
|
|
424
|
+
labelOrientation?: "along" | "standard";
|
|
281
425
|
/**
|
|
282
426
|
* Round the boundary's corners by curving it through the control points
|
|
283
427
|
* (centripetal Catmull-Rom spline). The spline preserves the endpoints, so
|
|
@@ -292,6 +436,8 @@ interface BoundaryOptions {
|
|
|
292
436
|
*/
|
|
293
437
|
smoothResolution?: number;
|
|
294
438
|
}
|
|
439
|
+
/** Default options for the Boundary control measure. */
|
|
440
|
+
declare const DEFAULT_BOUNDARY_OPTIONS: BoundaryOptions;
|
|
295
441
|
/**
|
|
296
442
|
* Creates a Boundary control measure: a polyline through `positions` carrying
|
|
297
443
|
* repeated echelon + unit-designator labels.
|
|
@@ -299,8 +445,10 @@ interface BoundaryOptions {
|
|
|
299
445
|
* @param positions - Boundary anchor points (≥2); the input contract is
|
|
300
446
|
* enforced at the render seam (ADR-0014).
|
|
301
447
|
* @param options - {@link BoundaryOptions}.
|
|
448
|
+
* @param textAmplifiers - Normalized text amplifiers (ADR-0027): `T`/`AS` label
|
|
449
|
+
* unit 1 (left-of-travel side), `T1`/`AS1` label unit 2 (right-of-travel side).
|
|
302
450
|
*/
|
|
303
|
-
declare function createBoundary(positions: Position[], options?: BoundaryOptions): FeatureCollection<MultiLineString | MultiPolygon | Point>;
|
|
451
|
+
declare function createBoundary(positions: Position[], options?: BoundaryOptions, textAmplifiers?: CanonicalTextAmplifiers): FeatureCollection<MultiLineString | MultiPolygon | Point>;
|
|
304
452
|
//#endregion
|
|
305
453
|
//#region src/generators/cm15-maneuver-areas/battlePosition.d.ts
|
|
306
454
|
/** Configuration options for the Battle Position control measure. */
|
|
@@ -378,6 +526,8 @@ interface BattlePositionOptions {
|
|
|
378
526
|
*/
|
|
379
527
|
smoothResolution?: number;
|
|
380
528
|
}
|
|
529
|
+
/** Default options for the Battle Position control measure. */
|
|
530
|
+
declare const DEFAULT_BATTLE_POSITION_OPTIONS: BattlePositionOptions;
|
|
381
531
|
/**
|
|
382
532
|
* Creates a Battle Position control measure: a closed area through `positions`
|
|
383
533
|
* carrying a single echelon (Field B) glyph straddling its boundary — anchored
|
|
@@ -447,7 +597,7 @@ interface FinalProtectiveFireOptions {
|
|
|
447
597
|
* Blade height (its perpendicular reach into the inside of the V) relative
|
|
448
598
|
* to the bladed arm's own length (default: 0.03).
|
|
449
599
|
*/
|
|
450
|
-
|
|
600
|
+
bladeHeightRatio?: number;
|
|
451
601
|
}
|
|
452
602
|
declare const DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS: Required<FinalProtectiveFireOptions>;
|
|
453
603
|
type FpfProps = {
|
|
@@ -512,8 +662,8 @@ declare const unproject: (x: number, y: number) => Position;
|
|
|
512
662
|
//#region src/attack-utils.d.ts
|
|
513
663
|
interface AttackOptions {
|
|
514
664
|
shaftWidthRatio?: number;
|
|
515
|
-
|
|
516
|
-
|
|
665
|
+
smooth?: boolean;
|
|
666
|
+
smoothResolution?: number;
|
|
517
667
|
}
|
|
518
668
|
/**
|
|
519
669
|
* Calculates the relative metrics (longitudinal and lateral) of the width point
|
|
@@ -607,6 +757,7 @@ interface ClassicArrowOptions {
|
|
|
607
757
|
/** Arrowhead base width as a fraction of the total path length. */
|
|
608
758
|
arrowheadWidthRatio?: number;
|
|
609
759
|
}
|
|
760
|
+
declare const DEFAULT_CLASSIC_ARROW_OPTIONS: Required<ClassicArrowOptions>;
|
|
610
761
|
/**
|
|
611
762
|
* Generates a GeoJSON FeatureCollection for the Classic Arrow: a shaft
|
|
612
763
|
* LineString (trimmed so it doesn't poke through the head) plus a head feature
|
|
@@ -638,7 +789,7 @@ declare function createClassicArrow(coordinates: Position[], options?: ClassicAr
|
|
|
638
789
|
type BlockArrowHeadStyle = "triangle" | "barbed" | "concave" | "diamond" | "harpoon" | "swallowtail" | "tee";
|
|
639
790
|
interface BlockArrowOptions {
|
|
640
791
|
/** Shaft band width as a fraction of the total path length. */
|
|
641
|
-
|
|
792
|
+
shaftWidthRatio?: number;
|
|
642
793
|
/** Arrowhead silhouette. */
|
|
643
794
|
arrowheadStyle?: BlockArrowHeadStyle;
|
|
644
795
|
/** Arrowhead base width as a fraction of the total path length. */
|
|
@@ -652,6 +803,7 @@ interface BlockArrowOptions {
|
|
|
652
803
|
/** Fill the body solid; when false the arrow is drawn as an outline only. */
|
|
653
804
|
filled?: boolean;
|
|
654
805
|
}
|
|
806
|
+
declare const DEFAULT_BLOCK_ARROW_OPTIONS: Required<BlockArrowOptions>;
|
|
655
807
|
/**
|
|
656
808
|
* Generates a GeoJSON FeatureCollection for the Block Arrow: a single filled
|
|
657
809
|
* Polygon whose outline runs up the left side of the shaft, around the head
|
|
@@ -742,8 +894,8 @@ declare function createAttackHelicopter(coordinates: Position[], options?: Attac
|
|
|
742
894
|
//#region src/generators/cm15-maneuver-areas/supportByFire.d.ts
|
|
743
895
|
interface SupportByFireOptions {
|
|
744
896
|
arrowheadWidthRatio?: number;
|
|
745
|
-
|
|
746
|
-
|
|
897
|
+
rearLineLengthRatio?: number;
|
|
898
|
+
rearLineAngle?: number;
|
|
747
899
|
}
|
|
748
900
|
declare const DEFAULT_SUPPORT_BY_FIRE_OPTIONS: Required<SupportByFireOptions>;
|
|
749
901
|
/**
|
|
@@ -760,8 +912,8 @@ declare function createSupportByFire(coordinates: Position[], options?: SupportB
|
|
|
760
912
|
//#region src/generators/cm15-maneuver-areas/attackByFire.d.ts
|
|
761
913
|
interface AttackByFireOptions {
|
|
762
914
|
arrowheadWidthRatio?: number;
|
|
763
|
-
|
|
764
|
-
|
|
915
|
+
rearLineLengthRatio?: number;
|
|
916
|
+
rearLineAngle?: number;
|
|
765
917
|
}
|
|
766
918
|
declare const DEFAULT_ATTACK_BY_FIRE_OPTIONS: Required<AttackByFireOptions>;
|
|
767
919
|
/**
|
|
@@ -810,7 +962,7 @@ interface FLOTOptions {
|
|
|
810
962
|
* Higher values create smoother arcs.
|
|
811
963
|
* @default 16
|
|
812
964
|
*/
|
|
813
|
-
|
|
965
|
+
arcSegments?: number;
|
|
814
966
|
}
|
|
815
967
|
/**
|
|
816
968
|
* Default options for the FLOT graphic.
|
|
@@ -831,7 +983,7 @@ declare const DEFAULT_FLOT_OPTIONS: Required<Omit<FLOTOptions, "metersPerPixel">
|
|
|
831
983
|
* ```typescript
|
|
832
984
|
* const flot = createFLOT(
|
|
833
985
|
* [[-122.4194, 37.7749], [-122.4100, 37.7800], [-122.4000, 37.7750]],
|
|
834
|
-
* { radius: 100,
|
|
986
|
+
* { radius: 100, arcSegments: 20 }
|
|
835
987
|
* );
|
|
836
988
|
* ```
|
|
837
989
|
*/
|
|
@@ -1126,21 +1278,21 @@ interface FortifiedLineOptions {
|
|
|
1126
1278
|
/**
|
|
1127
1279
|
* The size of the square teeth in meters.
|
|
1128
1280
|
* This controls both the width and height of the castellated pattern.
|
|
1129
|
-
* This is ignored if
|
|
1281
|
+
* This is ignored if toothSizePixels is provided along with metersPerPixel.
|
|
1130
1282
|
* @default 50
|
|
1131
1283
|
*/
|
|
1132
|
-
|
|
1284
|
+
toothSize?: number;
|
|
1133
1285
|
/**
|
|
1134
1286
|
* The size of the square teeth in pixels.
|
|
1135
1287
|
* When provided along with metersPerPixel, the actual meter size is calculated
|
|
1136
1288
|
* dynamically to maintain consistent visual size on screen.
|
|
1137
|
-
* Takes precedence over
|
|
1289
|
+
* Takes precedence over toothSize when metersPerPixel is also provided.
|
|
1138
1290
|
* @default 10
|
|
1139
1291
|
*/
|
|
1140
|
-
|
|
1292
|
+
toothSizePixels?: number;
|
|
1141
1293
|
/**
|
|
1142
1294
|
* The meters-per-pixel ratio at the current zoom level and latitude.
|
|
1143
|
-
* Required when using
|
|
1295
|
+
* Required when using toothSizePixels for zoom-aware sizing.
|
|
1144
1296
|
*/
|
|
1145
1297
|
metersPerPixel?: number;
|
|
1146
1298
|
/**
|
|
@@ -1442,6 +1594,8 @@ interface ControlMeasure<K extends ControlMeasureKind = ControlMeasureKind> {
|
|
|
1442
1594
|
options?: OptionsByKind[K];
|
|
1443
1595
|
style?: ControlMeasureStyle;
|
|
1444
1596
|
properties?: Record<string, unknown>;
|
|
1597
|
+
/** Free-text amplifier fields (MIL-STD-2525E Appendix L Table L-II); see `./text-amplifiers`. */
|
|
1598
|
+
textAmplifiers?: TextAmplifiers;
|
|
1445
1599
|
schemaVersion?: 1;
|
|
1446
1600
|
}
|
|
1447
1601
|
declare function isKind<K extends ControlMeasureKind>(cm: ControlMeasure, kind: K): cm is ControlMeasure<K>;
|
|
@@ -1449,9 +1603,9 @@ declare function isKind<K extends ControlMeasureKind>(cm: ControlMeasure, kind:
|
|
|
1449
1603
|
* Deep-clone a `ControlMeasure` so held references survive mutations to the
|
|
1450
1604
|
* original (and vice versa). Used by the session façade to build the
|
|
1451
1605
|
* `measure` half of `ControlMeasureSnapshot`. Nested values inside
|
|
1452
|
-
* `options`, `style`, and `
|
|
1453
|
-
* `Record<string, unknown>` and may carry arbitrary host
|
|
1454
|
-
* shallow copy would leak shared references.
|
|
1606
|
+
* `options`, `style`, `properties`, and `textAmplifiers` are cloned too —
|
|
1607
|
+
* `properties` is `Record<string, unknown>` and may carry arbitrary host
|
|
1608
|
+
* metadata, so a shallow copy would leak shared references.
|
|
1455
1609
|
*
|
|
1456
1610
|
* Backed by `structuredClone`: only structured-cloneable values are
|
|
1457
1611
|
* supported (no functions, DOM nodes, class instances). Absent optional
|
|
@@ -1495,6 +1649,11 @@ interface FeaturePartProps {
|
|
|
1495
1649
|
text?: string;
|
|
1496
1650
|
/** Label rotation in radians, emitted by generators. */
|
|
1497
1651
|
rotation?: number;
|
|
1652
|
+
/**
|
|
1653
|
+
* Horizontal text alignment relative to the label point: `"start"` = the
|
|
1654
|
+
* text begins at the point, `"end"` = it ends there. Absent = centered.
|
|
1655
|
+
*/
|
|
1656
|
+
textAnchor?: "start" | "end";
|
|
1498
1657
|
/** Label size in CSS pixels at the draw/reference zoom. */
|
|
1499
1658
|
textSizePixels?: number;
|
|
1500
1659
|
/** Map zoom at which textSizePixels was captured. */
|
|
@@ -1787,7 +1946,7 @@ declare const rectangleDrawRule: ControlMeasureDrawRule;
|
|
|
1787
1946
|
*/
|
|
1788
1947
|
interface AmbushOptions {
|
|
1789
1948
|
/** Number of segments used to draw the quadratic curve (default: 30) */
|
|
1790
|
-
|
|
1949
|
+
arcSegments?: number;
|
|
1791
1950
|
/** Size of arrowhead relative to chord span (default: 0.15) */
|
|
1792
1951
|
arrowheadLengthRatio?: number;
|
|
1793
1952
|
/** Width of arrowhead wings relative to its length (default: 0.5) */
|
|
@@ -1822,4 +1981,4 @@ interface TacticalArrowOptions {
|
|
|
1822
1981
|
*/
|
|
1823
1982
|
declare const DEFAULT_TACTICAL_ARROW_OPTIONS: Required<TacticalArrowOptions>;
|
|
1824
1983
|
//#endregion
|
|
1825
|
-
export { getControlMeasureMetadata as $, DEFAULT_GENERIC_LINE_OPTIONS as $t, getMetersPerPixel as A, DEFAULT_CANALIZE_OPTIONS as At, ControlMeasureSnapshot as B, DEFAULT_ATTACK_BY_FIRE_OPTIONS as Bt, snapToMidpointPerpendicular as C,
|
|
1984
|
+
export { getControlMeasureMetadata as $, DEFAULT_GENERIC_LINE_OPTIONS as $t, getMetersPerPixel as A, ControlMeasureMetadata as An, DEFAULT_CANALIZE_OPTIONS as At, ControlMeasureSnapshot as B, AnchorTransformEvent as Bn, DEFAULT_ATTACK_BY_FIRE_OPTIONS as Bt, snapToMidpointPerpendicular as C, StrongPointOptions as Cn, AntitankDitchOptions as Ct, BaselineFrameOrigin as D, DEFAULT_BOUNDARY_OPTIONS as Dn, ClearOptions as Dt, BaselineFrameOptions as E, BoundaryOptions as En, DelayOptions as Et, resolveStyleHints as F, TextAmplifierField as Fn, BlockMissionTaskOptions as Ft, cloneControlMeasure as G, AirborneAttackOptions as Gt, StyleHints as H, SupportByFireOptions as Ht, freezeOrientationOptions as I, TextAmplifierKey as In, DEFAULT_BLOCK_MISSION_TASK_OPTIONS as It, CONTROL_MEASURE_IDS as J, GenericCircleOptions as Jt, isKind as K, DEFAULT_AIRBORNE_ATTACK_OPTIONS as Kt, RenderOptions as L, TextAmplifiers as Ln, DEFAULT_FLOT_OPTIONS as Lt, SimpleStyleProps as M, TextAmplifierDescriptor as Mn, DEFAULT_BYPASS_OPTIONS as Mt, SimpleStyleRender as N, CanonicalTextAmplifiers as Nn, BreachOptions as Nt, createBaselineFrame as O, ControlMeasureGeometry as On, DEFAULT_CLEAR_OPTIONS as Ot, toSimpleStyle as P, TEXT_AMPLIFIER_FIELDS as Pn, DEFAULT_BREACH_OPTIONS as Pt, OptionsByKind as Q, GenericPolygonOptions as Qt, renderControlMeasure as R, canonicalTextAmplifierKey as Rn, FLOTOptions as Rt, pointOnMidpointPerpendicularAxis as S, DEFAULT_STRONG_POINT_OPTIONS as Sn, DEFAULT_ANTITANK_WALL_OPTIONS as St, BaselineFrameNormal as T, DEFAULT_BATTLE_POSITION_OPTIONS as Tn, DEFAULT_DELAY_OPTIONS as Tt, controlMeasureIdFromFeature as U, AttackHelicopterOptions as Ut, FeaturePartProps as V, ControlMeasureDrawRule as Vn, DEFAULT_SUPPORT_BY_FIRE_OPTIONS as Vt, ControlMeasure as W, DEFAULT_ATTACK_HELICOPTER_OPTIONS as Wt, ControlMeasureId as X, GenericRectangleOptions as Xt, CONTROL_MEASURE_METADATA as Y, DEFAULT_GENERIC_RECTANGLE_OPTIONS as Yt, ControlMeasureKind as Z, DEFAULT_GENERIC_POLYGON_OPTIONS as Zt, blockDrawRule as _, EncirclementOptions as _n, DEFAULT_FORTIFIED_AREA_OPTIONS as _t, rectangleDrawRule as a, ClassicArrowOptions as an, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS as at, createMidpointPerpendicularDrawRule as b, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS as bn, FortifiedLineOptions as bt, line24DrawRule as c, SupportingAttackOptions as cn, ObstacleBypassEasyOptions as ct, line1DrawRule as d, calculateMetrics as dn, DEFAULT_FIX_OPTIONS as dt, GenericLineOptions as en, getControlMeasureMetadataByValue as et, ambushDrawRule as f, computeInitialWidthPoint as fn, FixOptions as ft, disruptDrawRule as g, DEFAULT_ENCIRCLEMENT_OPTIONS as gn, DEFAULT_BLOCK_OPTIONS as gt, centerRadiusDrawRule as h, unproject as hn, BlockOptions as ht, DEFAULT_AMBUSH_OPTIONS as i, ClassicArrowHeadStyle as in, ObstacleBypassImpossibleOptions as it, roundToFixed as j, ParamDescriptor as jn, BypassOptions as jt, EPSILON as k, ControlMeasureGeometryType as kn, CanalizeOptions as kt, line23DrawRule as l, DEFAULT_MAIN_ATTACK_OPTIONS as ln, DEFAULT_TURN_OPTIONS as lt, point12DrawRule as m, project as mn, DisruptOptions as mt, TacticalArrowOptions as n, BlockArrowOptions as nn, listControlMeasureMetadata as nt, axis1DrawRule as o, DEFAULT_CLASSIC_ARROW_OPTIONS as on, ObstacleBypassDifficultOptions as ot, attackByFireDrawRule as p, Point2D as pn, DEFAULT_DISRUPT_OPTIONS as pt, ControlMeasureStyle as q, DEFAULT_GENERIC_CIRCLE_OPTIONS as qt, AmbushOptions as r, DEFAULT_BLOCK_ARROW_OPTIONS as rn, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS as rt, supportByFireDrawRule as s, DEFAULT_SUPPORTING_ATTACK_OPTIONS as sn, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS as st, DEFAULT_TACTICAL_ARROW_OPTIONS as t, BlockArrowHeadStyle as tn, getDefaultOptions as tt, turnDrawRule as u, MainAttackOptions as un, TurnOptions as ut, MidpointPerpendicularDrawRuleOptions as v, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS as vn, FortifiedAreaOptions as vt, BaselineFrame as w, BattlePositionOptions as wn, DEFAULT_ANTITANK_DITCH_OPTIONS as wt, getMidpointPerpendicularSignedDistance as x, PrincipalDirectionOfFireOptions as xn, AntitankWallOptions as xt, computeDefaultMidpointPerpendicularPoint as y, FinalProtectiveFireOptions as yn, DEFAULT_FORTIFIED_LINE_OPTIONS as yt, ControlMeasureRender as z, normalizeTextAmplifiers as zn, AttackByFireOptions as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as getControlMeasureMetadata, $t as DEFAULT_GENERIC_LINE_OPTIONS, A as getMetersPerPixel, At as DEFAULT_CANALIZE_OPTIONS, B as ControlMeasureSnapshot, Bt as DEFAULT_ATTACK_BY_FIRE_OPTIONS, C as snapToMidpointPerpendicular, Cn as
|
|
2
|
-
export { type AirborneAttackOptions, type AmbushOptions, type AnchorTransformEvent, type AntitankDitchOptions, type AntitankWallOptions, type AttackByFireOptions, type AttackHelicopterOptions, type BaselineFrame, type BaselineFrameNormal, type BaselineFrameOptions, type BaselineFrameOrigin, type BlockMissionTaskOptions, type BlockOptions, type BreachOptions, type BypassOptions, CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, type CanalizeOptions, type ClearOptions, type ControlMeasure, type ControlMeasureDrawRule, type ControlMeasureGeometry, type ControlMeasureGeometryType, type ControlMeasureId, type ControlMeasureKind, type ControlMeasureMetadata, type ControlMeasureRender, type ControlMeasureSnapshot, type ControlMeasureStyle, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_OPTIONS, DEFAULT_BLOCK_MISSION_TASK_OPTIONS, DEFAULT_BLOCK_OPTIONS, DEFAULT_BREACH_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_DELAY_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_GENERIC_CIRCLE_OPTIONS, DEFAULT_GENERIC_LINE_OPTIONS, DEFAULT_GENERIC_POLYGON_OPTIONS, DEFAULT_GENERIC_RECTANGLE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURN_OPTIONS, type DelayOptions, type DisruptOptions, EPSILON, type EncirclementOptions, type FLOTOptions, type FeaturePartProps, type FinalProtectiveFireOptions, type FixOptions, type FortifiedAreaOptions, type FortifiedLineOptions, type GenericCircleOptions, type GenericLineOptions, type GenericPolygonOptions, type GenericRectangleOptions, type MainAttackOptions, type MidpointPerpendicularDrawRuleOptions, type ObstacleBypassDifficultOptions, type ObstacleBypassEasyOptions, type ObstacleBypassImpossibleOptions, type OptionsByKind, type ParamDescriptor, type Point2D, type PrincipalDirectionOfFireOptions, type RenderOptions, type SimpleStyleProps, type SimpleStyleRender, type StrongPointOptions, type StyleHints, type SupportByFireOptions, type SupportingAttackOptions, type TacticalArrowOptions, type TurnOptions, ambushDrawRule, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, listControlMeasureMetadata, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
|
1
|
+
import { $ as getControlMeasureMetadata, $t as DEFAULT_GENERIC_LINE_OPTIONS, A as getMetersPerPixel, An as ControlMeasureMetadata, At as DEFAULT_CANALIZE_OPTIONS, B as ControlMeasureSnapshot, Bn as AnchorTransformEvent, Bt as DEFAULT_ATTACK_BY_FIRE_OPTIONS, C as snapToMidpointPerpendicular, Cn as StrongPointOptions, Ct as AntitankDitchOptions, D as BaselineFrameOrigin, Dn as DEFAULT_BOUNDARY_OPTIONS, Dt as ClearOptions, E as BaselineFrameOptions, En as BoundaryOptions, Et as DelayOptions, F as resolveStyleHints, Fn as TextAmplifierField, Ft as BlockMissionTaskOptions, G as cloneControlMeasure, Gt as AirborneAttackOptions, H as StyleHints, Ht as SupportByFireOptions, I as freezeOrientationOptions, In as TextAmplifierKey, It as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, J as CONTROL_MEASURE_IDS, Jt as GenericCircleOptions, K as isKind, Kt as DEFAULT_AIRBORNE_ATTACK_OPTIONS, L as RenderOptions, Ln as TextAmplifiers, Lt as DEFAULT_FLOT_OPTIONS, M as SimpleStyleProps, Mn as TextAmplifierDescriptor, Mt as DEFAULT_BYPASS_OPTIONS, N as SimpleStyleRender, Nn as CanonicalTextAmplifiers, Nt as BreachOptions, O as createBaselineFrame, On as ControlMeasureGeometry, Ot as DEFAULT_CLEAR_OPTIONS, P as toSimpleStyle, Pn as TEXT_AMPLIFIER_FIELDS, Pt as DEFAULT_BREACH_OPTIONS, Q as OptionsByKind, Qt as GenericPolygonOptions, R as renderControlMeasure, Rn as canonicalTextAmplifierKey, Rt as FLOTOptions, S as pointOnMidpointPerpendicularAxis, Sn as DEFAULT_STRONG_POINT_OPTIONS, St as DEFAULT_ANTITANK_WALL_OPTIONS, T as BaselineFrameNormal, Tn as DEFAULT_BATTLE_POSITION_OPTIONS, Tt as DEFAULT_DELAY_OPTIONS, U as controlMeasureIdFromFeature, Ut as AttackHelicopterOptions, V as FeaturePartProps, Vn as ControlMeasureDrawRule, Vt as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, W as ControlMeasure, Wt as DEFAULT_ATTACK_HELICOPTER_OPTIONS, X as ControlMeasureId, Xt as GenericRectangleOptions, Y as CONTROL_MEASURE_METADATA, Yt as DEFAULT_GENERIC_RECTANGLE_OPTIONS, Z as ControlMeasureKind, Zt as DEFAULT_GENERIC_POLYGON_OPTIONS, _ as blockDrawRule, _n as EncirclementOptions, _t as DEFAULT_FORTIFIED_AREA_OPTIONS, a as rectangleDrawRule, an as ClassicArrowOptions, at as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, b as createMidpointPerpendicularDrawRule, bn as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, bt as FortifiedLineOptions, c as line24DrawRule, cn as SupportingAttackOptions, ct as ObstacleBypassEasyOptions, d as line1DrawRule, dn as calculateMetrics, dt as DEFAULT_FIX_OPTIONS, en as GenericLineOptions, et as getControlMeasureMetadataByValue, f as ambushDrawRule, fn as computeInitialWidthPoint, ft as FixOptions, g as disruptDrawRule, gn as DEFAULT_ENCIRCLEMENT_OPTIONS, gt as DEFAULT_BLOCK_OPTIONS, h as centerRadiusDrawRule, hn as unproject, ht as BlockOptions, i as DEFAULT_AMBUSH_OPTIONS, in as ClassicArrowHeadStyle, it as ObstacleBypassImpossibleOptions, j as roundToFixed, jn as ParamDescriptor, jt as BypassOptions, k as EPSILON, kn as ControlMeasureGeometryType, kt as CanalizeOptions, l as line23DrawRule, ln as DEFAULT_MAIN_ATTACK_OPTIONS, lt as DEFAULT_TURN_OPTIONS, m as point12DrawRule, mn as project, mt as DisruptOptions, n as TacticalArrowOptions, nn as BlockArrowOptions, nt as listControlMeasureMetadata, o as axis1DrawRule, on as DEFAULT_CLASSIC_ARROW_OPTIONS, ot as ObstacleBypassDifficultOptions, p as attackByFireDrawRule, pn as Point2D, pt as DEFAULT_DISRUPT_OPTIONS, q as ControlMeasureStyle, qt as DEFAULT_GENERIC_CIRCLE_OPTIONS, r as AmbushOptions, rn as DEFAULT_BLOCK_ARROW_OPTIONS, rt as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, s as supportByFireDrawRule, sn as DEFAULT_SUPPORTING_ATTACK_OPTIONS, st as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, t as DEFAULT_TACTICAL_ARROW_OPTIONS, tn as BlockArrowHeadStyle, tt as getDefaultOptions, u as turnDrawRule, un as MainAttackOptions, ut as TurnOptions, v as MidpointPerpendicularDrawRuleOptions, vn as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, vt as FortifiedAreaOptions, w as BaselineFrame, wn as BattlePositionOptions, wt as DEFAULT_ANTITANK_DITCH_OPTIONS, x as getMidpointPerpendicularSignedDistance, xn as PrincipalDirectionOfFireOptions, xt as AntitankWallOptions, y as computeDefaultMidpointPerpendicularPoint, yn as FinalProtectiveFireOptions, yt as DEFAULT_FORTIFIED_LINE_OPTIONS, z as ControlMeasureRender, zn as normalizeTextAmplifiers, zt as AttackByFireOptions } from "./index-26Xb77jE.mjs";
|
|
2
|
+
export { type AirborneAttackOptions, type AmbushOptions, type AnchorTransformEvent, type AntitankDitchOptions, type AntitankWallOptions, type AttackByFireOptions, type AttackHelicopterOptions, type BaselineFrame, type BaselineFrameNormal, type BaselineFrameOptions, type BaselineFrameOrigin, 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 ControlMeasureSnapshot, type ControlMeasureStyle, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_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_DELAY_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_GENERIC_CIRCLE_OPTIONS, DEFAULT_GENERIC_LINE_OPTIONS, DEFAULT_GENERIC_POLYGON_OPTIONS, DEFAULT_GENERIC_RECTANGLE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURN_OPTIONS, type DelayOptions, type DisruptOptions, EPSILON, type EncirclementOptions, type FLOTOptions, type FeaturePartProps, type FinalProtectiveFireOptions, type FixOptions, type FortifiedAreaOptions, type FortifiedLineOptions, type GenericCircleOptions, type GenericLineOptions, type GenericPolygonOptions, type GenericRectangleOptions, type MainAttackOptions, type MidpointPerpendicularDrawRuleOptions, type ObstacleBypassDifficultOptions, type ObstacleBypassEasyOptions, type ObstacleBypassImpossibleOptions, type OptionsByKind, type ParamDescriptor, type Point2D, type PrincipalDirectionOfFireOptions, type RenderOptions, 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, ambushDrawRule, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, canonicalTextAmplifierKey, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, listControlMeasureMetadata, normalizeTextAmplifiers, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as supportByFireDrawRule, A as DEFAULT_DELAY_OPTIONS, B as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, C as DEFAULT_FORTIFIED_AREA_OPTIONS, D as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, E as DEFAULT_FIX_OPTIONS, F as DEFAULT_GENERIC_CIRCLE_OPTIONS, G as DEFAULT_ATTACK_HELICOPTER_OPTIONS, H as DEFAULT_BLOCK_ARROW_OPTIONS, I as DEFAULT_CLASSIC_ARROW_OPTIONS, J as DEFAULT_ANTITANK_DITCH_OPTIONS, K as DEFAULT_ATTACK_BY_FIRE_OPTIONS, L as DEFAULT_CANALIZE_OPTIONS, M as DEFAULT_GENERIC_RECTANGLE_OPTIONS, N as DEFAULT_GENERIC_POLYGON_OPTIONS, O as DEFAULT_ENCIRCLEMENT_OPTIONS, P as DEFAULT_GENERIC_LINE_OPTIONS, Q as axis1DrawRule, R as DEFAULT_BYPASS_OPTIONS, S as DEFAULT_MAIN_ATTACK_OPTIONS, St as roundToFixed, T as DEFAULT_FLOT_OPTIONS, U as DEFAULT_BLOCK_OPTIONS, V as DEFAULT_BOUNDARY_OPTIONS, W as DEFAULT_BATTLE_POSITION_OPTIONS, X as DEFAULT_AIRBORNE_ATTACK_OPTIONS, Y as DEFAULT_AMBUSH_OPTIONS, Z as rectangleDrawRule, _ as DEFAULT_TACTICAL_ARROW_OPTIONS, _t as computeInitialWidthPoint, a as resolveStyleHints, at as attackByFireDrawRule, b as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, bt as EPSILON, c as DEFINITIONS, ct as disruptDrawRule, d as getDefaultOptions, dt as createMidpointPerpendicularDrawRule, et as line24DrawRule, f as listControlMeasureMetadata, ft as getMidpointPerpendicularSignedDistance, g as DEFAULT_STRONG_POINT_OPTIONS, gt as calculateMetrics, h as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, ht as createBaselineFrame, i as normalizeTextAmplifiers, it as ambushDrawRule, j as DEFAULT_CLEAR_OPTIONS, k as DEFAULT_DISRUPT_OPTIONS, l as getControlMeasureMetadata, lt as blockDrawRule, m as DEFAULT_SUPPORTING_ATTACK_OPTIONS, mt as snapToMidpointPerpendicular, n as TEXT_AMPLIFIER_FIELDS, nt as turnDrawRule, o as CONTROL_MEASURE_IDS, ot as point12DrawRule, p as DEFAULT_TURN_OPTIONS, pt as pointOnMidpointPerpendicularAxis, q as DEFAULT_ANTITANK_WALL_OPTIONS, r as canonicalTextAmplifierKey, rt as line1DrawRule, s as CONTROL_MEASURE_METADATA, st as centerRadiusDrawRule, t as renderControlMeasure, tt as line23DrawRule, u as getControlMeasureMetadataByValue, ut as computeDefaultMidpointPerpendicularPoint, v as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, vt as project, w as DEFAULT_FORTIFIED_LINE_OPTIONS, x as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, xt as getMetersPerPixel, y as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, yt as unproject, z as DEFAULT_BREACH_OPTIONS } from "./renderControlMeasure-CFdgTURO.mjs";
|
|
2
2
|
//#region src/freeze-orientation.ts
|
|
3
3
|
/**
|
|
4
4
|
* Dispatches to a measure kind's `freezeOrientation` hook (see
|
|
@@ -22,9 +22,9 @@ function isKind(cm, kind) {
|
|
|
22
22
|
* Deep-clone a `ControlMeasure` so held references survive mutations to the
|
|
23
23
|
* original (and vice versa). Used by the session façade to build the
|
|
24
24
|
* `measure` half of `ControlMeasureSnapshot`. Nested values inside
|
|
25
|
-
* `options`, `style`, and `
|
|
26
|
-
* `Record<string, unknown>` and may carry arbitrary host
|
|
27
|
-
* shallow copy would leak shared references.
|
|
25
|
+
* `options`, `style`, `properties`, and `textAmplifiers` are cloned too —
|
|
26
|
+
* `properties` is `Record<string, unknown>` and may carry arbitrary host
|
|
27
|
+
* metadata, so a shallow copy would leak shared references.
|
|
28
28
|
*
|
|
29
29
|
* Backed by `structuredClone`: only structured-cloneable values are
|
|
30
30
|
* supported (no functions, DOM nodes, class instances). Absent optional
|
|
@@ -114,4 +114,4 @@ function toHexChannel(value) {
|
|
|
114
114
|
return Math.max(0, Math.min(255, Math.round(value))).toString(16).padStart(2, "0");
|
|
115
115
|
}
|
|
116
116
|
//#endregion
|
|
117
|
-
export { CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_OPTIONS, DEFAULT_BLOCK_MISSION_TASK_OPTIONS, DEFAULT_BLOCK_OPTIONS, DEFAULT_BREACH_OPTIONS, DEFAULT_BYPASS_OPTIONS, DEFAULT_CANALIZE_OPTIONS, DEFAULT_CLEAR_OPTIONS, DEFAULT_DELAY_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_GENERIC_CIRCLE_OPTIONS, DEFAULT_GENERIC_LINE_OPTIONS, DEFAULT_GENERIC_POLYGON_OPTIONS, DEFAULT_GENERIC_RECTANGLE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_OPTIONS, DEFAULT_TURN_OPTIONS, EPSILON, ambushDrawRule, attackByFireDrawRule, axis1DrawRule, blockDrawRule, calculateMetrics, centerRadiusDrawRule, cloneControlMeasure, computeDefaultMidpointPerpendicularPoint, computeInitialWidthPoint, controlMeasureIdFromFeature, createBaselineFrame, createMidpointPerpendicularDrawRule, disruptDrawRule, freezeOrientationOptions, getControlMeasureMetadata, getControlMeasureMetadataByValue, getDefaultOptions, getMetersPerPixel, getMidpointPerpendicularSignedDistance, isKind, line1DrawRule, line23DrawRule, line24DrawRule, listControlMeasureMetadata, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
|
117
|
+
export { CONTROL_MEASURE_IDS, CONTROL_MEASURE_METADATA, DEFAULT_AIRBORNE_ATTACK_OPTIONS, DEFAULT_AMBUSH_OPTIONS, DEFAULT_ANTITANK_DITCH_OPTIONS, DEFAULT_ANTITANK_WALL_OPTIONS, DEFAULT_ATTACK_BY_FIRE_OPTIONS, DEFAULT_ATTACK_HELICOPTER_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_DELAY_OPTIONS, DEFAULT_DISRUPT_OPTIONS, DEFAULT_ENCIRCLEMENT_OPTIONS, DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, DEFAULT_FIX_OPTIONS, DEFAULT_FLOT_OPTIONS, DEFAULT_FORTIFIED_AREA_OPTIONS, DEFAULT_FORTIFIED_LINE_OPTIONS, DEFAULT_GENERIC_CIRCLE_OPTIONS, DEFAULT_GENERIC_LINE_OPTIONS, DEFAULT_GENERIC_POLYGON_OPTIONS, DEFAULT_GENERIC_RECTANGLE_OPTIONS, DEFAULT_MAIN_ATTACK_OPTIONS, DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, DEFAULT_STRONG_POINT_OPTIONS, DEFAULT_SUPPORTING_ATTACK_OPTIONS, DEFAULT_SUPPORT_BY_FIRE_OPTIONS, DEFAULT_TACTICAL_ARROW_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, listControlMeasureMetadata, normalizeTextAmplifiers, point12DrawRule, pointOnMidpointPerpendicularAxis, project, rectangleDrawRule, renderControlMeasure, resolveStyleHints, roundToFixed, snapToMidpointPerpendicular, supportByFireDrawRule, toSimpleStyle, turnDrawRule, unproject };
|
package/dist/preview/index.d.mts
CHANGED
package/dist/preview/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-CFdgTURO.mjs";
|
|
2
2
|
//#region src/preview/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* Unitless `previewSample` points (~`[-1, 1]`) are scaled by this degree offset
|