@orbat-mapper/control-measures 0.2.0-alpha.3 → 0.2.0-alpha.4
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/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as getMidpointPerpendicularSignedDistance, A as DEFAULT_BYPASS_OPTIONS, B as axis1DrawRule, C as DEFAULT_FIX_OPTIONS, D as DEFAULT_DELAY_OPTIONS, E as DEFAULT_DISRUPT_OPTIONS, F as DEFAULT_ATTACK_BY_FIRE_OPTIONS, G as line1DrawRule, H as line24DrawRule, I as DEFAULT_ANTITANK_WALL_OPTIONS, J as point12DrawRule, K as ambushDrawRule, L as DEFAULT_ANTITANK_DITCH_OPTIONS, M as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, N as DEFAULT_BLOCK_OPTIONS, O as DEFAULT_CLEAR_OPTIONS, P as DEFAULT_ATTACK_HELICOPTER_OPTIONS, Q as createMidpointPerpendicularDrawRule, R as DEFAULT_AMBUSH_OPTIONS, S as DEFAULT_FLOT_OPTIONS, T as DEFAULT_ENCIRCLEMENT_OPTIONS, U as line23DrawRule, V as supportByFireDrawRule, W as turnDrawRule, X as blockDrawRule, Y as disruptDrawRule, Z as computeDefaultMidpointPerpendicularPoint, _ as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, at as project, b as DEFAULT_FORTIFIED_AREA_OPTIONS, c as getDefaultOptions, ct as getMetersPerPixel, d as DEFAULT_SUPPORTING_ATTACK_OPTIONS, et as pointOnMidpointPerpendicularAxis, f as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, g as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, h as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, i as CONTROL_MEASURE_METADATA, it as computeInitialWidthPoint, j as DEFAULT_BREACH_OPTIONS, k as DEFAULT_CANALIZE_OPTIONS, l as listControlMeasureMetadata, lt as roundToFixed, m as DEFAULT_TACTICAL_ARROW_OPTIONS, n as resolveStyleHints, nt as createBaselineFrame, o as getControlMeasureMetadata, ot as unproject, p as DEFAULT_STRONG_POINT_OPTIONS, q as attackByFireDrawRule, r as CONTROL_MEASURE_IDS, rt as calculateMetrics, s as getControlMeasureMetadataByValue, st as EPSILON, t as renderControlMeasure, tt as snapToMidpointPerpendicular, u as DEFAULT_TURN_OPTIONS, v as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, w as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, x as DEFAULT_FORTIFIED_LINE_OPTIONS, y as DEFAULT_MAIN_ATTACK_OPTIONS, z as DEFAULT_AIRBORNE_ATTACK_OPTIONS } from "./renderControlMeasure-
|
|
1
|
+
import { $ as getMidpointPerpendicularSignedDistance, A as DEFAULT_BYPASS_OPTIONS, B as axis1DrawRule, C as DEFAULT_FIX_OPTIONS, D as DEFAULT_DELAY_OPTIONS, E as DEFAULT_DISRUPT_OPTIONS, F as DEFAULT_ATTACK_BY_FIRE_OPTIONS, G as line1DrawRule, H as line24DrawRule, I as DEFAULT_ANTITANK_WALL_OPTIONS, J as point12DrawRule, K as ambushDrawRule, L as DEFAULT_ANTITANK_DITCH_OPTIONS, M as DEFAULT_BLOCK_MISSION_TASK_OPTIONS, N as DEFAULT_BLOCK_OPTIONS, O as DEFAULT_CLEAR_OPTIONS, P as DEFAULT_ATTACK_HELICOPTER_OPTIONS, Q as createMidpointPerpendicularDrawRule, R as DEFAULT_AMBUSH_OPTIONS, S as DEFAULT_FLOT_OPTIONS, T as DEFAULT_ENCIRCLEMENT_OPTIONS, U as line23DrawRule, V as supportByFireDrawRule, W as turnDrawRule, X as blockDrawRule, Y as disruptDrawRule, Z as computeDefaultMidpointPerpendicularPoint, _ as DEFAULT_OBSTACLE_BYPASS_EASY_OPTIONS, at as project, b as DEFAULT_FORTIFIED_AREA_OPTIONS, c as getDefaultOptions, ct as getMetersPerPixel, d as DEFAULT_SUPPORTING_ATTACK_OPTIONS, et as pointOnMidpointPerpendicularAxis, f as DEFAULT_SUPPORT_BY_FIRE_OPTIONS, g as DEFAULT_OBSTACLE_BYPASS_IMPOSSIBLE_OPTIONS, h as DEFAULT_PRINCIPAL_DIRECTION_OF_FIRE_OPTIONS, i as CONTROL_MEASURE_METADATA, it as computeInitialWidthPoint, j as DEFAULT_BREACH_OPTIONS, k as DEFAULT_CANALIZE_OPTIONS, l as listControlMeasureMetadata, lt as roundToFixed, m as DEFAULT_TACTICAL_ARROW_OPTIONS, n as resolveStyleHints, nt as createBaselineFrame, o as getControlMeasureMetadata, ot as unproject, p as DEFAULT_STRONG_POINT_OPTIONS, q as attackByFireDrawRule, r as CONTROL_MEASURE_IDS, rt as calculateMetrics, s as getControlMeasureMetadataByValue, st as EPSILON, t as renderControlMeasure, tt as snapToMidpointPerpendicular, u as DEFAULT_TURN_OPTIONS, v as DEFAULT_OBSTACLE_BYPASS_DIFFICULT_OPTIONS, w as DEFAULT_FINAL_PROTECTIVE_FIRE_OPTIONS, x as DEFAULT_FORTIFIED_LINE_OPTIONS, y as DEFAULT_MAIN_ATTACK_OPTIONS, z as DEFAULT_AIRBORNE_ATTACK_OPTIONS } from "./renderControlMeasure-CONa8M6M.mjs";
|
|
2
2
|
//#region src/instance.ts
|
|
3
3
|
function isKind(cm, kind) {
|
|
4
4
|
return cm.kind === kind;
|
package/dist/preview/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-
|
|
1
|
+
import { a as DEFINITIONS, t as renderControlMeasure } from "../renderControlMeasure-CONa8M6M.mjs";
|
|
2
2
|
//#region src/preview/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* Unitless `previewSample` points (~`[-1, 1]`) are scaled by this degree offset
|
|
@@ -483,6 +483,32 @@ function samePosition(a, b) {
|
|
|
483
483
|
return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];
|
|
484
484
|
}
|
|
485
485
|
//#endregion
|
|
486
|
+
//#region src/draw-rules/area1.ts
|
|
487
|
+
function derive$7(points) {
|
|
488
|
+
return clonePositions(points);
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Area1 anchor draw rule — a free closed area (Battle Position, Strong Point,
|
|
492
|
+
* Encirclement, Fortified Area).
|
|
493
|
+
*
|
|
494
|
+
* Every anchor is a fully free, user-clicked ring vertex; the rule imposes no
|
|
495
|
+
* constraint and derives no extra slots, so `derive`/`transform` pass the
|
|
496
|
+
* points through unchanged. It is the area analog of the free-line {@link
|
|
497
|
+
* line1DrawRule}: variable-length (no `canonicalPointCount`) with a three-point
|
|
498
|
+
* floor to close a polygon. Behaviorally a no-op over the bare variable-length
|
|
499
|
+
* path — it exists so these drawable areas expose a named rule on
|
|
500
|
+
* `metadata.rule` rather than leaving it `undefined`, matching every other
|
|
501
|
+
* doctrinal draw rule. Ring closure is a generator concern, not a draw-rule one.
|
|
502
|
+
*/
|
|
503
|
+
const area1DrawRule = {
|
|
504
|
+
id: "area1",
|
|
505
|
+
minimumUserPoints: 3,
|
|
506
|
+
derive: derive$7,
|
|
507
|
+
transform(event) {
|
|
508
|
+
return derive$7(event.next);
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
//#endregion
|
|
486
512
|
//#region src/draw-rules/area11.ts
|
|
487
513
|
const blockDrawRule = createMidpointPerpendicularDrawRule({ id: "area11:block" });
|
|
488
514
|
//#endregion
|
|
@@ -2470,6 +2496,7 @@ const BATTLE_POSITION = defineControlMeasure({
|
|
|
2470
2496
|
metadata: BATTLE_POSITION_METADATA,
|
|
2471
2497
|
generator: createBattlePosition,
|
|
2472
2498
|
defaultOptions: DEFAULT_BATTLE_POSITION_OPTIONS,
|
|
2499
|
+
rule: area1DrawRule,
|
|
2473
2500
|
previewSample: {
|
|
2474
2501
|
controlPoints: [
|
|
2475
2502
|
[-1, -.5],
|
|
@@ -4477,6 +4504,7 @@ const ENCIRCLEMENT = defineControlMeasure({
|
|
|
4477
4504
|
metadata: ENCIRCLEMENT_METADATA,
|
|
4478
4505
|
generator: createEncirclement,
|
|
4479
4506
|
defaultOptions: DEFAULT_ENCIRCLEMENT_OPTIONS,
|
|
4507
|
+
rule: area1DrawRule,
|
|
4480
4508
|
previewSample: {
|
|
4481
4509
|
controlPoints: [
|
|
4482
4510
|
[-1, -.5],
|
|
@@ -5243,6 +5271,7 @@ const FORTIFIED_AREA = defineControlMeasure({
|
|
|
5243
5271
|
metadata: FORTIFIED_AREA_METADATA,
|
|
5244
5272
|
generator: createFortifiedArea,
|
|
5245
5273
|
defaultOptions: DEFAULT_FORTIFIED_AREA_OPTIONS,
|
|
5274
|
+
rule: area1DrawRule,
|
|
5246
5275
|
previewSample: { controlPoints: [
|
|
5247
5276
|
[-1, -.5],
|
|
5248
5277
|
[1, -.5],
|
|
@@ -6271,6 +6300,7 @@ const STRONG_POINT = defineControlMeasure({
|
|
|
6271
6300
|
metadata: STRONG_POINT_METADATA,
|
|
6272
6301
|
generator: createStrongPoint,
|
|
6273
6302
|
defaultOptions: DEFAULT_STRONG_POINT_OPTIONS,
|
|
6303
|
+
rule: area1DrawRule,
|
|
6274
6304
|
previewSample: {
|
|
6275
6305
|
controlPoints: [
|
|
6276
6306
|
[-1, -.5],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbat-mapper/control-measures",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.4",
|
|
4
4
|
"description": "Library for drawing tactical graphics and control measures according to MIL-STD-2525 and APP-6 standards.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Orbat Mapper",
|