@orbat-mapper/control-measures 0.2.0-alpha.0 → 0.2.0-alpha.2

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.
Files changed (43) hide show
  1. package/README.md +90 -34
  2. package/dist/index-D7uBPw7l.d.mts +1653 -0
  3. package/dist/index.d.mts +1 -1353
  4. package/dist/index.mjs +1 -4964
  5. package/dist/preview/index.d.mts +45 -0
  6. package/dist/preview/index.mjs +211 -0
  7. package/dist/renderControlMeasure-C7pY-TcL.mjs +6465 -0
  8. package/media/airborne-attack.svg +1 -0
  9. package/media/ambush.svg +1 -0
  10. package/media/antitank-ditch-completed.svg +1 -0
  11. package/media/antitank-ditch-under-construction.svg +1 -0
  12. package/media/antitank-wall.svg +1 -0
  13. package/media/attack-by-fire.svg +1 -0
  14. package/media/attack-helicopter.svg +1 -0
  15. package/media/battle-position.svg +1 -0
  16. package/media/block-arrow.svg +1 -0
  17. package/media/block-mission-task.svg +1 -0
  18. package/media/block.svg +1 -0
  19. package/media/boundary.svg +1 -0
  20. package/media/breach.svg +1 -0
  21. package/media/bypass.svg +1 -0
  22. package/media/canalize.svg +1 -0
  23. package/media/classic-arrow.svg +1 -0
  24. package/media/clear.svg +1 -0
  25. package/media/delay.svg +1 -0
  26. package/media/disrupt.svg +1 -0
  27. package/media/final-protective-fire-left.svg +1 -0
  28. package/media/final-protective-fire-right.svg +1 -0
  29. package/media/fix.svg +1 -0
  30. package/media/flot.svg +1 -0
  31. package/media/fortified-area.svg +1 -0
  32. package/media/fortified-line.svg +1 -0
  33. package/media/isolate.svg +1 -0
  34. package/media/main-attack.svg +1 -0
  35. package/media/obstacle-bypass-difficult.svg +1 -0
  36. package/media/obstacle-bypass-easy.svg +1 -0
  37. package/media/obstacle-bypass-impossible.svg +1 -0
  38. package/media/principal-direction-of-fire.svg +1 -0
  39. package/media/search-area.svg +1 -0
  40. package/media/support-by-fire.svg +1 -0
  41. package/media/supporting-attack.svg +1 -0
  42. package/media/turn.svg +1 -0
  43. package/package.json +8 -2
package/README.md CHANGED
@@ -1,14 +1,13 @@
1
1
  # @orbat-mapper/control-measures
2
2
 
3
- A TypeScript library for generating tactical control measures as GeoJSON, according to MIL-STD-2525 and APP-6 conventions.
3
+ Generates tactical control measures as GeoJSON, following MIL-STD-2525 and
4
+ APP-6 conventions.
4
5
 
5
- ## Features
6
-
7
- - Framework-agnostic: outputs plain GeoJSON.
8
- - Type-safe: full TypeScript typings.
9
- - Map-friendly: works with Leaflet, MapLibre, OpenLayers, or any GeoJSON consumer.
10
- - Registry-driven: a single `renderControlMeasure(cm, options)` entry point, plus a metadata catalog for discovering every measure and its options.
11
- - Validation controls: optional `validationMode` per render.
6
+ The output is plain GeoJSON, so it drops into Leaflet, MapLibre, OpenLayers,
7
+ or any other consumer without a mapping dependency of its own. Everything
8
+ goes through one entry point, `renderControlMeasure(cm, options)`, backed by
9
+ a metadata catalog for discovering the available measures and their options,
10
+ plus an optional `validationMode` per render for catching bad input.
12
11
 
13
12
  ## Installation
14
13
 
@@ -22,8 +21,8 @@ pnpm add @orbat-mapper/control-measures
22
21
 
23
22
  ## Quick Start
24
23
 
25
- The library is registry-driven. Describe a control measure as a `ControlMeasure`
26
- object — its `kind`, `controlPoints`, and optional `options` — then render it:
24
+ Describe a control measure as a `ControlMeasure` object — `kind`,
25
+ `controlPoints`, and optional `options` — then render it:
27
26
 
28
27
  ```ts
29
28
  import { renderControlMeasure, type ControlMeasure } from "@orbat-mapper/control-measures";
@@ -49,8 +48,7 @@ const render = renderControlMeasure(mainAttack, { validationMode: "warn" });
49
48
 
50
49
  ## Discovering measures and options
51
50
 
52
- Rather than importing per-measure generators, use the catalog to enumerate the
53
- available control measures and their parameters:
51
+ Skip the per-measure imports and query the catalog instead:
54
52
 
55
53
  ```ts
56
54
  import {
@@ -82,28 +80,86 @@ useful for strict integrations and tests.
82
80
 
83
81
  ## Supported control measures
84
82
 
85
- | `kind` | Measure |
86
- | --- | --- |
87
- | `ambush` | Ambush |
88
- | `search-area` | Search Area |
89
- | `main-attack` | Main Attack |
90
- | `supporting-attack` | Supporting Attack |
91
- | `airborne-attack` | Airborne Attack |
92
- | `attack-helicopter` | Attack Helicopter |
93
- | `support-by-fire` | Support by Fire |
94
- | `attack-by-fire` | Attack by Fire |
95
- | `flot` | FLOT (Forward Line of Own Troops) |
96
- | `breach` | Breach |
97
- | `bypass` | Bypass |
98
- | `canalize` | Canalize |
99
- | `fortified-line` | Fortified Line |
100
- | `fortified-area` | Fortified Area |
101
- | `block` | Block |
102
- | `disrupt` | Disrupt |
103
- | `fix` | Fix |
104
- | `obstacle-bypass-easy` | Obstacle Bypass (Easy) |
105
- | `obstacle-bypass-difficult` | Obstacle Bypass (Difficult) |
106
- | `obstacle-bypass-impossible` | Obstacle Bypass (Impossible) |
83
+ Grouped by APP-6/MIL-STD-2525 entity type, with each measure's 2525E symbol
84
+ code.
85
+
86
+ <!-- AUTO-GENERATED:measures-table -->
87
+
88
+ ### Command and Control Lines
89
+
90
+ | Preview | `kind` | Measure | 2525E Value |
91
+ | --- | --- | --- | --- |
92
+ | <img src="media/boundary.svg" width="96" height="48" alt=""> | `boundary` | Boundary | `110100` |
93
+
94
+ ### Maneuver Lines
95
+
96
+ | Preview | `kind` | Measure | 2525E Value |
97
+ | --- | --- | --- | --- |
98
+ | <img src="media/flot.svg" width="96" height="48" alt=""> | `flot` | Forward line of own troops (FLOT) | `140100` |
99
+ | <img src="media/final-protective-fire-left.svg" width="96" height="48" alt=""> | `final-protective-fire-left` | Final Protective Fire (Left) | `140501` |
100
+ | <img src="media/final-protective-fire-right.svg" width="96" height="48" alt=""> | `final-protective-fire-right` | Final Protective Fire (Right) | `140502` |
101
+ | <img src="media/principal-direction-of-fire.svg" width="96" height="48" alt=""> | `principal-direction-of-fire` | Principal Direction of Fire | `140503` |
102
+ | <img src="media/ambush.svg" width="96" height="48" alt=""> | `ambush` | Ambush | `141700` |
103
+
104
+ ### Maneuver Areas
105
+
106
+ | Preview | `kind` | Measure | 2525E Value |
107
+ | --- | --- | --- | --- |
108
+ | <img src="media/fortified-area.svg" width="96" height="48" alt=""> | `fortified-area` | Fortified Area | `151000` |
109
+ | <img src="media/battle-position.svg" width="96" height="48" alt=""> | `battle-position` | Battle Position | `151200` |
110
+ | <img src="media/airborne-attack.svg" width="96" height="48" alt=""> | `airborne-attack` | Airborne Attack | `151401` |
111
+ | <img src="media/attack-helicopter.svg" width="96" height="48" alt=""> | `attack-helicopter` | Attack Helicopter | `151402` |
112
+ | <img src="media/main-attack.svg" width="96" height="48" alt=""> | `main-attack` | Main Attack | `151403` |
113
+ | <img src="media/supporting-attack.svg" width="96" height="48" alt=""> | `supporting-attack` | Supporting Attack | `151404` |
114
+ | <img src="media/attack-by-fire.svg" width="96" height="48" alt=""> | `attack-by-fire` | Attack by Fire | `152000` |
115
+ | <img src="media/support-by-fire.svg" width="96" height="48" alt=""> | `support-by-fire` | Support By Fire | `152100` |
116
+ | <img src="media/search-area.svg" width="96" height="48" alt=""> | `search-area` | Search Area | `152200` |
117
+
118
+ ### Protection Areas
119
+
120
+ | Preview | `kind` | Measure | 2525E Value |
121
+ | --- | --- | --- | --- |
122
+ | <img src="media/block.svg" width="96" height="48" alt=""> | `block` | Block | `270501` |
123
+ | <img src="media/disrupt.svg" width="96" height="48" alt=""> | `disrupt` | Disrupt | `270502` |
124
+ | <img src="media/fix.svg" width="96" height="48" alt=""> | `fix` | Fix | `270503` |
125
+ | <img src="media/turn.svg" width="96" height="48" alt=""> | `turn` | Turn | `270504` |
126
+ | <img src="media/obstacle-bypass-easy.svg" width="96" height="48" alt=""> | `obstacle-bypass-easy` | Obstacle Bypass Easy | `270601` |
127
+ | <img src="media/obstacle-bypass-difficult.svg" width="96" height="48" alt=""> | `obstacle-bypass-difficult` | Obstacle Bypass Difficult | `270602` |
128
+ | <img src="media/obstacle-bypass-impossible.svg" width="96" height="48" alt=""> | `obstacle-bypass-impossible` | Obstacle Bypass Impossible | `270603` |
129
+
130
+ ### Protection Lines
131
+
132
+ | Preview | `kind` | Measure | 2525E Value |
133
+ | --- | --- | --- | --- |
134
+ | <img src="media/antitank-ditch-under-construction.svg" width="96" height="48" alt=""> | `antitank-ditch-under-construction` | Ditch - Under Construction | `290201` |
135
+ | <img src="media/antitank-ditch-completed.svg" width="96" height="48" alt=""> | `antitank-ditch-completed` | Ditch - Completed | `290202` |
136
+ | <img src="media/antitank-wall.svg" width="96" height="48" alt=""> | `antitank-wall` | Antitank Wall | `290204` |
137
+ | <img src="media/fortified-line.svg" width="96" height="48" alt=""> | `fortified-line` | Fortified Line | `290900` |
138
+
139
+ ### Mission Tasks
140
+
141
+ | Preview | `kind` | Measure | 2525E Value |
142
+ | --- | --- | --- | --- |
143
+ | <img src="media/block-mission-task.svg" width="96" height="48" alt=""> | `block-mission-task` | Block | `340100` |
144
+ | <img src="media/breach.svg" width="96" height="48" alt=""> | `breach` | Breach | `340200` |
145
+ | <img src="media/bypass.svg" width="96" height="48" alt=""> | `bypass` | Bypass | `340300` |
146
+ | <img src="media/canalize.svg" width="96" height="48" alt=""> | `canalize` | Canalize | `340400` |
147
+ | <img src="media/clear.svg" width="96" height="48" alt=""> | `clear` | Clear | `340500` |
148
+ | <img src="media/delay.svg" width="96" height="48" alt=""> | `delay` | Delay | `340800` |
149
+ | <img src="media/isolate.svg" width="96" height="48" alt=""> | `isolate` | Isolate | `341500` |
150
+
151
+ ### Generic Arrows
152
+
153
+ | Preview | `kind` | Measure | 2525E Value |
154
+ | --- | --- | --- | --- |
155
+ | <img src="media/block-arrow.svg" width="96" height="48" alt=""> | `block-arrow` | Block Arrow | `990001` |
156
+ | <img src="media/classic-arrow.svg" width="96" height="48" alt=""> | `classic-arrow` | Classic Arrow | `990002` |
157
+
158
+ <!-- /AUTO-GENERATED:measures-table -->
159
+
160
+ This table and the preview SVGs are generated; run
161
+ `pnpm --filter @orbat-mapper/control-measures generate-docs` after adding or
162
+ changing a measure to refresh both.
107
163
 
108
164
  ## License
109
165