@emberbox/ui 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emberbox/ui",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Shared look and building blocks of the Emberbox tools, built on Nuxt UI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -40,6 +40,7 @@ export {
40
40
  type TacticalSignSpec, type VehicleBody,
41
41
  } from './symbols/signs'
42
42
  export {CATALOG_SOURCE, TACTICAL_SIGN_CATALOG, catalogSignTree, type CatalogEntry} from './symbols/catalog'
43
+ export {ABILITIES, type Ability, type AbilityName, type AbilityPart} from './symbols/abilities'
43
44
 
44
45
  /**
45
46
  * Vue plugin that installs Nuxt UI in the Emberbox style. Icons come only from the bundled set; a
@@ -0,0 +1,156 @@
1
+ /**
2
+ * The symbols of chapter 4 of the recommendations "Taktische Zeichen im Bevölkerungsschutz" (BBK,
3
+ * 2024): what a unit, vehicle or place can do. Each is drawn on its own 100 × 60 box, which a sign
4
+ * scales into the inside of its basic form; several abilities stack from the bottom up, the main
5
+ * one lowest, as 6.1 asks. The drawings follow the system of the recommendations without copying
6
+ * their artwork.
7
+ */
8
+
9
+ /** One stroke, filled shape or piece of writing of an ability, on the 100 × 60 box. */
10
+ export type AbilityPart =
11
+ | {d: string, filled?: boolean, width?: number}
12
+ | {circle: [number, number, number], filled?: boolean}
13
+ | {text: string, x: number, y: number, size: number}
14
+
15
+ /** An ability of chapter 4 with its number, name after the recommendations and printed page. */
16
+ export interface Ability {
17
+ number: string
18
+ name: string
19
+ page: number
20
+ parts: readonly AbilityPart[]
21
+ /** Spans the whole inside of the form, as annex C draws firefighting and the CBRN cross, instead of keeping its proportions. */
22
+ stretch?: boolean
23
+ }
24
+
25
+ const CBRN: AbilityPart[] = [{circle: [34, 10, 6], filled: true}, {circle: [66, 10, 6], filled: true}, {d: 'M34 10 L68 54 M66 10 L32 54'}]
26
+ /** A wavy line at a height, from one x to another in waves of 10. */
27
+ function waves(y: number, from = 30, to = 70): AbilityPart {
28
+ const more = Math.max(0, Math.round((to - from) / 10) - 1)
29
+ return {d: `M${from} ${y} q5 -5 10 0${' t10 0'.repeat(more)}`}
30
+ }
31
+ const DIAMOND = (cx: number, cy: number, r: number): AbilityPart => ({d: `M${cx} ${cy - r} L${cx + r} ${cy} L${cx} ${cy + r} L${cx - r} ${cy} Z`})
32
+ const VET: AbilityPart = {d: 'M36 6 H44 L56 54 L68 6 H76'}
33
+ const ARROW_HEAD = (x: number, y: number, dx: number, dy: number): AbilityPart => ({d: `M${x - dx * 6 - dy * 4} ${y - dy * 6 + dx * 4} L${x} ${y} L${x - dx * 6 + dy * 4} ${y - dy * 6 - dx * 4}`})
34
+
35
+ /** The abilities of chapter 4, keyed by a short English name. */
36
+ export const ABILITIES = {
37
+ 'cbrn': {number: '4.1.1', name: 'Abwehr gefährlicher Stoffe und Güter, ABC-/CBRN-Schutz', page: 22, parts: CBRN, stretch: true},
38
+ 'cbrn-measuring': {number: '4.1.2', name: 'Messen, Spüren, Detektieren', page: 22, parts: [...CBRN, {d: 'M14 46 L86 20'}], stretch: true},
39
+ 'decontamination': {number: '4.1.3', name: 'Dekontaminieren', page: 22, parts: [...CBRN, ARROW_HEAD(32, 54, -0.6, 0.8), ARROW_HEAD(68, 54, 0.6, 0.8)], stretch: true},
40
+ 'water-pollution': {number: '4.1.4', name: 'Beseitigen von Umweltschäden auf Gewässern', page: 22,
41
+ parts: [{circle: [36, 6, 5], filled: true}, {circle: [64, 6, 5], filled: true}, {d: 'M36 6 L62 36 M64 6 L38 36'}, ARROW_HEAD(38, 36, -0.6, 0.8), ARROW_HEAD(62, 36, 0.6, 0.8), waves(46), waves(54)]},
42
+ 'water-treatment': {number: '4.1.5', name: 'Trinkwasseraufbereitung', page: 22,
43
+ parts: [{d: 'M32 14 A20 20 0 0 0 36 50'}, {d: 'M64 10 A20 20 0 0 1 68 46'}, ARROW_HEAD(36, 50, 0.3, 1), ARROW_HEAD(68, 46, -0.2, 1), {d: 'M38 30 q4 -4 8 0 t8 0 t8 0 M40 38 H58 M54 38 V44'}]},
44
+ 'radiological': {number: '4.1.6', name: 'Atomare (radiologische/nukleare) Stoffe', page: 23,
45
+ parts: [{circle: [50, 30, 4], filled: true}, {d: 'M50 38 L56 50 A21 21 0 0 1 44 50 Z M43 26 L30 26 A21 21 0 0 1 36 15 Z M57 26 L64 15 A21 21 0 0 1 70 26 Z', filled: true}]},
46
+ 'biological': {number: '4.1.7', name: 'Biologische Stoffe', page: 23,
47
+ parts: [{circle: [50, 20, 12]}, {circle: [40, 38, 12]}, {circle: [60, 38, 12]}]},
48
+ 'chemical': {number: '4.1.8', name: 'Chemische Stoffe', page: 23, parts: [{d: 'M44 4 V22 L32 56 H68 L56 22 V4'}]},
49
+ 'care': {number: '4.2.1', name: 'Grundzeichen Betreuung', page: 23, parts: [{d: 'M30 56 L50 4 L70 56'}]},
50
+ 'psychosocial': {number: '4.2.2', name: 'Psychosoziale Notfallversorgung, Notfallbegleitung, Krisenintervention', page: 23,
51
+ parts: [{d: 'M32 44 L50 4 L68 44'}, {text: 'PSNV', x: 50, y: 52, size: 12}]},
52
+ 'pastoral': {number: '4.2.3', name: 'Seelsorge (religiös/interkonfessionell)', page: 23, parts: [{d: 'M44 4 V56 M56 4 V56 M34 18 H66 M34 28 H66'}]},
53
+ 'rest': {number: '4.2.4', name: 'Temporäre (Not-)Unterbringung/Versorgung mit Ruhemöglichkeit (einschl. Sitzgelegenheiten)', page: 23,
54
+ parts: [{d: 'M26 14 V50 M74 14 V50 M26 38 H74 M26 34 Q50 20 74 34'}]},
55
+ 'seating': {number: '4.2.5', name: 'Temporäre (Not-)Unterbringung/Versorgung mit Sitzgelegenheit', page: 24, parts: [{d: 'M40 6 V54 M40 28 H62 V54'}]},
56
+ 'firefighting': {number: '4.3.1', name: 'Brandbekämpfung, Löscheinsatz (einschl. Retten)', page: 24, parts: [{d: 'M4 30 H96 M66 30 L96 4 M66 30 L96 56'}], stretch: true},
57
+ 'extinguishing-water': {number: '4.3.2', name: 'Löschwasser, (Brauch-)Wasser', page: 24, parts: [{d: 'M26 34 q6 -12 12 0 t12 0 t12 0 t12 0'}]},
58
+ 'foam': {number: '4.3.3', name: 'Schaummittel', page: 24, parts: [{d: 'M38 16 H62 L50 44 Z', filled: true}]},
59
+ 'solid-agent': {number: '4.3.4', name: 'Sonderlöschmittel fest', page: 24, parts: [{d: 'M38 18 H62 V42 H38 Z', filled: true}]},
60
+ 'gaseous-agent': {number: '4.3.5', name: 'Sonderlöschmittel gasförmig', page: 24, parts: [{circle: [50, 30, 11], filled: true}]},
61
+ 'breathing-protection': {number: '4.3.6', name: 'Atemschutz (umluftunabhängig)', page: 24,
62
+ parts: [{d: 'M42 6 H58 V38 Q58 46 50 48 Q42 46 42 38 Z M50 48 V52'}, {circle: [50, 55, 3]}]},
63
+ 'reconnaissance': {number: '4.4.1', name: 'Erkunden, Beobachten, Überwachen', page: 24, parts: [{d: 'M24 54 L76 6'}], stretch: true},
64
+ 'locating-biological': {number: '4.4.2', name: 'Orten, biologisch', page: 25,
65
+ parts: [{d: 'M20 46 L34 22 M34 46 L20 22 M27 22 H64 M58 46 L64 22 L70 46 M64 22 L76 8 L82 22 Z'}]},
66
+ 'locating-technical': {number: '4.4.3', name: 'Orten, technisch', page: 25,
67
+ parts: [{d: 'M26 30 Q34 6 58 12'}, {d: 'M34 34 L48 46 L52 36 L72 54'}, ARROW_HEAD(72, 54, 0.7, 0.7)]},
68
+ 'salvage': {number: '4.5.1', name: 'Bergen, Bergung', page: 25, parts: [{d: 'M20 18 H34 A16 16 0 0 0 66 18 H80'}]},
69
+ 'ladder': {number: '4.5.2', name: 'Retten aus Höhen und Tiefen mit tragbaren Leitern', page: 25, parts: [{d: 'M40 4 V56 M60 4 V56 M40 16 H60 M40 30 H60 M40 44 H60'}]},
70
+ 'turntable-ladder': {number: '4.5.3', name: 'Retten aus Höhen und Tiefen mit Drehleiter', page: 25, parts: [{d: 'M28 56 L60 24 M60 12 H74 V26 H60 Z'}]},
71
+ 'aerial-platform': {number: '4.5.4', name: 'Retten aus Höhen und Tiefen mit Hubarbeitsbühne/Teleskopgelenkmast', page: 25,
72
+ parts: [{d: 'M30 56 L36 34 L60 26 M60 12 H74 V26 H60 Z'}]},
73
+ 'boats': {number: '4.5.5', name: 'Einsatz von Wasserfahrzeugen', page: 25,
74
+ parts: [{d: 'M42 24 H58 A8 8 0 0 1 42 24'}, waves(26, 22, 38), waves(26, 62, 78), waves(32, 22, 38), waves(32, 62, 78)]},
75
+ 'mountain-rescue': {number: '4.5.6', name: 'Bergrettung', page: 25, parts: [DIAMOND(50, 18, 12), {d: 'M50 32 L62 54 H38 Z', filled: true}]},
76
+ 'special-rescue': {number: '4.5.7', name: 'Spezielle Rettung aus Höhen und Tiefen', page: 25,
77
+ parts: [DIAMOND(50, 30, 12), {d: 'M50 16 V4 M50 44 V56'}, ARROW_HEAD(50, 4, 0, -1), ARROW_HEAD(50, 56, 0, 1)]},
78
+ 'water-rescue': {number: '4.5.8', name: 'Wasserrettung (einschl. Tauchen)', page: 25, parts: [waves(10), waves(18), DIAMOND(50, 40, 14)]},
79
+ 'medical': {number: '4.6.1', name: 'Grundzeichen Sanität', page: 26, parts: [{d: 'M50 4 V56 M24 30 H76'}]},
80
+ 'nursing': {number: '4.6.2', name: 'Pflege', page: 26, parts: [{d: 'M50 4 V56 M24 30 H76 M36 24 V36'}]},
81
+ 'emergency-medicine': {number: '4.6.3', name: 'Rettungswesen, Intensivmedizin/Notfallmedizin', page: 26, parts: [{d: 'M50 4 V56 M24 30 H76 M64 24 V36'}]},
82
+ 'doctors': {number: '4.6.4', name: 'Arztwesen', page: 26, parts: [{d: 'M50 4 V56 M24 30 H76 M44 46 H56'}]},
83
+ 'patient-transport': {number: '4.6.5', name: 'Patiententransport', page: 26,
84
+ parts: [{circle: [50, 30, 14]}, {d: 'M40 20 L60 40 M60 20 L40 40 M50 4 V56 M24 30 H76'}]},
85
+ 'hospital': {number: '4.6.6', name: 'Krankenhaus, stationäre Versorgung', page: 26,
86
+ parts: [{d: 'M24 20 L50 6 L76 20 V56 H24 Z M24 20 H76 M24 38 H76 M37 28 V48 M50 28 V48 M63 28 V48'}]},
87
+ 'flood-defence': {number: '4.7.1', name: 'Abwehr von Wassergefahren, Deichverteidigung', page: 26,
88
+ parts: [waves(14, 26, 46), waves(20, 26, 46), {d: 'M26 52 H44 L56 16 H70 L74 28'}]},
89
+ 'excavator': {number: '4.7.2', name: 'Baggerarbeiten', page: 26, parts: [{d: 'M32 56 L44 16 L58 8 L72 20 L66 28'}]},
90
+ 'lighting': {number: '4.7.3', name: 'Beleuchten', page: 27, parts: [{d: 'M42 56 V16 Q42 6 54 8'}, {circle: [58, 16, 7]}]},
91
+ 'ventilating': {number: '4.7.4', name: 'Belüften', page: 27, parts: [{d: 'M24 12 Q44 12 50 26 H76 M24 48 Q44 48 50 34 H76 M50 4 V20 M50 40 V56'}, ARROW_HEAD(76, 26, 1, 0), ARROW_HEAD(76, 34, 1, 0)]},
92
+ 'extracting': {number: '4.7.5', name: 'Entlüften', page: 27, parts: [{d: 'M24 26 H50 Q56 12 76 12 M24 34 H50 Q56 48 76 48 M50 4 V20 M50 40 V56'}, ARROW_HEAD(76, 12, 1, 0), ARROW_HEAD(76, 48, 1, 0)]},
93
+ 'ordnance-disposal': {number: '4.7.6', name: 'Entschärfen, Kampfmittelräumung', page: 27,
94
+ parts: [{circle: [50, 30, 18]}, {circle: [50, 30, 10], filled: true}, {d: 'M50 6 V12 M50 48 V54 M26 30 H32 M68 30 H74'}]},
95
+ 'hand-tools': {number: '4.7.7', name: 'Einsatz von Handwerkzeugen/Handarbeit', page: 27,
96
+ parts: [{d: 'M32 8 L68 52 M68 8 L32 52'}, {d: 'M26 4 L38 10 L34 16 Z', filled: true}, {d: 'M70 4 Q80 8 74 16 Q66 14 70 4 Z', filled: true}]},
97
+ 'forklift': {number: '4.7.8', name: 'Hebearbeit, Umschlagen von Lasten', page: 27, parts: [{d: 'M40 4 V56 M46 10 V48 H66'}]},
98
+ 'crane': {number: '4.7.9', name: 'Hebearbeit, Heben von Lasten', page: 27, parts: [{d: 'M38 56 V8 H62 V16 Q62 22 56 20'}]},
99
+ 'lifting': {number: '4.7.10', name: '(An-)Heben von Personen oder Lasten', page: 27, parts: [DIAMOND(50, 38, 12), {d: 'M50 26 V6'}, ARROW_HEAD(50, 6, 0, -1)]},
100
+ 'telehandler': {number: '4.7.11', name: 'Kombinationsarbeit Heben/Räumen', page: 27, parts: [{d: 'M28 56 L56 24 H72 M56 24 V12'}]},
101
+ 'manipulating': {number: '4.7.12', name: '(Fern-)Manipulieren, mechanisch/mit Greifwerkzeug', page: 27, parts: [{d: 'M24 30 H50 L62 18 L72 22 M50 30 L62 42 L72 38'}]},
102
+ 'chainsaw': {number: '4.7.13', name: 'Motorsägearbeiten', page: 27,
103
+ parts: [{d: 'M36 20 H68 Q76 20 76 30 Q76 40 68 40 H36 Z M36 24 H30 V36 H36'}]},
104
+ 'pumping': {number: '4.7.14', name: 'Pumpen, Lenzen, Beseitigen von Wasserschäden', page: 28,
105
+ parts: [{circle: [50, 30, 12]}, {d: 'M50 18 Q60 8 68 14 M62 30 Q72 40 66 48 M50 42 Q40 52 32 46 M38 30 Q28 20 34 12'}]},
106
+ 'clearing': {number: '4.7.15', name: 'Räumarbeiten mit Maschine', page: 28, parts: [{d: 'M26 40 H54 M54 26 V40 H74'}]},
107
+ 'protection': {number: '4.7.16', name: 'Sicherheit, Schutz vor Einwirkungen', page: 28, parts: [{d: 'M36 8 Q50 2 64 8 V34 Q64 50 50 56 Q36 50 36 34 Z'}]},
108
+ 'blasting': {number: '4.7.17', name: 'Sprengen, Sprengkörper, Blindgänger', page: 28, parts: [{d: 'M42 6 H58 V36 Q58 54 50 56 Q42 54 42 36 Z', filled: true}]},
109
+ 'technical-rescue': {number: '4.7.18', name: 'Technische Hilfeleistung (einschl. Retten)', page: 28,
110
+ parts: [{d: 'M38 24 H62 V36 H38 Z M38 30 H28 L20 22 M28 30 L18 36 M22 26 L16 30 M62 30 H72 L80 22 M72 30 L82 38'}]},
111
+ 'transporting': {number: '4.7.19', name: 'Transportieren', page: 28,
112
+ parts: [{circle: [50, 30, 22]}, {d: 'M50 8 V52 M28 30 H72 M34 14 L66 46 M66 14 L34 46'}]},
113
+ 'door-opening': {number: '4.7.20', name: 'Türöffnung', page: 28, parts: [{d: 'M38 6 H62 V54 H38 Z M38 6 L50 12 V58 L38 54'}]},
114
+ 'heights': {number: '4.7.21', name: 'Höhenunterschiede überwinden', page: 28,
115
+ parts: [{d: 'M50 10 H74 M50 10 V50 M26 50 H50'}, ARROW_HEAD(50, 50, 0, 1), ARROW_HEAD(50, 10, 0, -1)]},
116
+ 'securing': {number: '4.7.22', name: 'Absicherung', page: 28, parts: [{d: 'M30 54 H70 L56 6 H44 Z M40 22 H60 M36 38 H64'}]},
117
+ 'optical-warning': {number: '4.7.23', name: 'Warnen/Informieren mit optischen Anzeigen', page: 28,
118
+ parts: [{d: 'M30 8 H70 V44 H30 Z M50 44 V52 M40 52 H60'}, {text: 'i', x: 50, y: 27, size: 22}]},
119
+ 'loudspeaker': {number: '4.7.24', name: 'Warnen mit Lautsprecherdurchsagen', page: 28,
120
+ parts: [{d: 'M30 22 H40 L58 10 V50 L40 38 H30 Z M64 20 Q70 30 64 40 M70 14 Q80 30 70 46'}]},
121
+ 'siren': {number: '4.7.25', name: 'Warnen mit Sirene', page: 28, parts: [{d: 'M28 24 Q50 0 72 24 Z M50 24 V56'}]},
122
+ 'water-conveying': {number: '4.7.26', name: 'Wasserförderung', page: 29, parts: [{d: 'M30 22 q5 -8 10 0 t10 0 t10 0 M26 38 H74'}, {circle: [26, 38, 3]}, ARROW_HEAD(74, 38, 1, 0)]},
123
+ 'water-retention': {number: '4.7.27', name: 'Wasserrückhaltung, Wasserbevorratung', page: 29, parts: [{d: 'M28 52 H72 V12 M34 30 q4 -8 8 0 t8 0 t8 0 t8 0'}]},
124
+ 'pulling': {number: '4.7.28', name: 'Ziehen von Lasten', page: 29, parts: [{d: 'M24 18 H44 V42 H24 Z M44 30 H76'}, ARROW_HEAD(76, 30, 1, 0)]},
125
+ 'container': {number: '4.8.1', name: '(Transport-)Behälter', page: 29, parts: [{d: 'M30 6 V54 H70 V6'}]},
126
+ 'consumables': {number: '4.8.2', name: 'Betriebsstoffe und Verbrauchsgüter', page: 29, parts: [{d: 'M30 6 H70 L54 24 V56 M46 56 V24 L30 6'}]},
127
+ 'bridge': {number: '4.8.3', name: 'Brücke/Übergang, Übergabe', page: 29, parts: [{d: 'M24 10 L32 18 H68 L76 10 M24 50 L32 42 H68 L76 50'}]},
128
+ 'temporary-bridge': {number: '4.8.4', name: 'Behelfsbrückenbau', page: 29,
129
+ parts: [{d: 'M24 6 L32 12 H68 L76 6 M24 30 L32 24 H68 L76 30'}, {d: 'M38 56 V40 H62 V56 M50 40 V56', width: 5}]},
130
+ 'disposal': {number: '4.8.5', name: 'Entsorgung', page: 29, parts: [{d: 'M36 12 H64 M46 8 H54 M38 12 V54 H62 V12 M44 20 V48 M50 20 V48 M56 20 V48'}]},
131
+ 'maintenance': {number: '4.8.6', name: 'Instandhaltung, Instandsetzung, materielle Infrastruktur', page: 29,
132
+ parts: [{d: 'M28 16 Q38 30 28 44 M38 30 H62 M72 16 Q62 30 72 44'}]},
133
+ 'sandbag': {number: '4.8.7', name: 'Sandsack', page: 29, parts: [{d: 'M44 6 H56 L54 12 Q66 16 64 34 Q64 54 50 56 Q36 54 36 34 Q34 16 46 12 Z'}]},
134
+ 'sandbag-filling': {number: '4.8.8', name: 'Sandsackbefüllung', page: 30, parts: [{d: 'M30 54 V6 H70 V54 M30 6 L42 22 H58 L70 6 M42 22 V34 H58 V22'}]},
135
+ 'shower': {number: '4.8.9', name: 'Sanitäre Einrichtung, Dusch-, Waschmöglichkeit(en)', page: 30,
136
+ parts: [{d: 'M58 54 V16 Q58 6 48 6 Q38 6 38 16 M32 16 H44 M34 24 V30 M38 24 V30 M42 24 V30'}]},
137
+ 'toilets': {number: '4.8.10', name: 'Sanitäre Einrichtung, WC/sanitäre Anlagen', page: 30, parts: [{text: 'WC', x: 50, y: 32, size: 26}]},
138
+ 'power': {number: '4.8.11', name: 'Stromversorgung', page: 30, parts: [{d: 'M56 4 L40 30 L58 30 L44 56'}, ARROW_HEAD(44, 56, -0.5, 1)]},
139
+ 'drinking-water': {number: '4.8.12', name: 'Trinkwasser', page: 30, parts: [{d: 'M24 26 H66 Q74 26 74 36 M50 26 V20 M44 20 H56'}]},
140
+ 'catering': {number: '4.8.13', name: 'Verpflegung', page: 30, parts: [{d: 'M68 18 A18 18 0 1 0 68 42 L50 30 Z'}]},
141
+ 'cooking': {number: '4.8.14', name: 'Zubereiten von Verpflegung', page: 30,
142
+ parts: [{d: 'M74 18 A18 18 0 1 0 74 42 L56 30 Z'}, {d: 'M30 6 Q38 6 38 16 Q38 24 32 26 V56 H28 V26 Q22 24 22 16 Q22 6 30 6 Z', filled: true}]},
143
+ 'tent': {number: '4.8.15', name: 'Zelt, Schnelleinsatzzelt', page: 30, parts: [{d: 'M30 56 V22 L40 8 H60 L70 22 V56'}]},
144
+ 'pole-tent': {number: '4.8.16', name: 'Zelt, Stangengerüstzelt', page: 30, parts: [{d: 'M26 56 L54 8 M74 56 L46 8 M26 56 H74'}]},
145
+ 'communication': {number: '4.9.1', name: 'Information und Kommunikation (IuK)/Fernmeldewesen', page: 30, parts: [{d: 'M24 16 L44 44 L52 22 L76 50'}]},
146
+ 'veterinary': {number: '4.10.1', name: 'Veterinärwesen', page: 31, parts: [VET]},
147
+ 'slaughtering': {number: '4.10.2', name: '(Not-)Schlachten, Keulen', page: 31, parts: [{d: 'M24 26 H76 M24 40 L30 30 L36 40 Z'}]},
148
+ 'poultry': {number: '4.10.3', name: 'Geflügel', page: 31, parts: [VET, {d: 'M30 52 V42 L34 46 L36 38 L40 46 L44 40 V52 Z'}]},
149
+ 'horses': {number: '4.10.4', name: 'Pferd', page: 31, parts: [VET, {d: 'M28 52 H32 V46 A6 6 0 1 1 40 46 V52 H44'}]},
150
+ 'cattle': {number: '4.10.5', name: 'Rind', page: 31, parts: [VET, {d: 'M28 44 L32 52 L36 44 L40 52 L44 44'}]},
151
+ 'sheep': {number: '4.10.6', name: 'Schaf', page: 31, parts: [VET, {d: 'M28 48 q2 -8 8 -6 q6 -4 8 4 q4 6 -2 10 q-6 4 -10 0 q-6 0 -4 -8 Z'}]},
152
+ 'pigs': {number: '4.10.7', name: 'Schwein', page: 31, parts: [VET, {d: 'M26 48 A10 7 0 1 0 46 48 A10 7 0 1 0 26 48 Z'}, {circle: [32, 48, 2], filled: true}, {circle: [40, 48, 2], filled: true}]},
153
+ } as const satisfies Record<string, Ability>
154
+
155
+ /** An ability of chapter 4. */
156
+ export type AbilityName = keyof typeof ABILITIES
@@ -1,3 +1,4 @@
1
+ import {ABILITIES, type AbilityName} from './abilities'
1
2
  import {tacticalSignTree, type TacticalSignSpec} from './signs'
2
3
  import type {SvgElement} from './svg'
3
4
  import {markSymbolTree, type MarkKind} from './tactical'
@@ -41,9 +42,11 @@ export function catalogSignTree(entry: CatalogEntry): SvgElement {
41
42
  const FIRE = {organisation: 'fire'} as const
42
43
 
43
44
  /**
44
- * The signs of chapters 1, 2, 3 and 5.1, 5.4 and 5.5 of the recommendations, in their order, then
45
- * the library's own water supply marks. Chapter 1 is drawn black on white as printed; colours are
46
- * shown on a tactical formation, supplements, vehicles and sizes in fire service red.
45
+ * The signs of chapters 1 to 4, 5.1, 5.4, 5.5 and annex C of the recommendations, in their order,
46
+ * then the library's own water supply marks. Chapter 1 is drawn black on white as printed, chapter 4
47
+ * on a plain formation; colours are shown on a tactical formation, supplements, vehicles and sizes
48
+ * in fire service red. Letters that annex C writes inside a symbol ("P", "G", "ATF") stand in field A
49
+ * here, and the flying line of C.1.13 sits under the form as in 5.1.4.
47
50
  */
48
51
  export const TACTICAL_SIGN_CATALOG: readonly CatalogEntry[] = [
49
52
  entry('1.1', 'Taktische Formation', 14, {form: 'formation'}),
@@ -75,6 +78,7 @@ export const TACTICAL_SIGN_CATALOG: readonly CatalogEntry[] = [
75
78
  entry('3.5', 'Zweirad, Fahrrad', 20, {form: 'formation', ...FIRE, supplements: ['bicycle']}),
76
79
  entry('3.6', 'Zweirad, Kraftrad', 21, {form: 'formation', ...FIRE, supplements: ['motorcycle']}),
77
80
  entry('3.7', 'Temporär ortsfeste Struktur (mit festem Dach)', 21, {form: 'place', ...FIRE, supplements: ['roof']}),
81
+ ...Object.entries(ABILITIES).map(([name, ability]) => entry(ability.number, ability.name, ability.page, {form: 'formation', abilities: [name as AbilityName]})),
78
82
  entry('5.1.1', 'Fahrzeug, ungeschützt', 32, {form: 'land-vehicle', ...FIRE}, '5.1.1-unprotected'),
79
83
  entry('5.1.2', 'Fahrzeug, geschützt', 32, {form: 'land-vehicle', ...FIRE, protected: true}, '5.1.2-protected'),
80
84
  entry('5.1.1.1', 'Kraftfahrzeug, straßenfähig (Kategorie 1)', 32, {form: 'land-vehicle', ...FIRE, drive: 'road'}),
@@ -105,6 +109,52 @@ export const TACTICAL_SIGN_CATALOG: readonly CatalogEntry[] = [
105
109
  entry('5.5.1', 'Bereitschaft (Verband I)', 37, {form: 'formation', ...FIRE, size: 'association-1'}),
106
110
  entry('5.5.2', 'Abteilung (Verband II)', 37, {form: 'formation', ...FIRE, size: 'association-2'}),
107
111
  entry('5.5.3', 'Großverband (Verband III)', 37, {form: 'formation', ...FIRE, size: 'association-3'}),
112
+ entry('C.1.1', 'Löschstaffel (Staffellöschfahrzeug)', 71, {form: 'formation', ...FIRE, size: 'section', abilities: ['firefighting']}),
113
+ entry('C.1.2', 'Löschgruppe (Löschgruppenfahrzeug)', 71, {form: 'formation', ...FIRE, size: 'group', abilities: ['firefighting']}),
114
+ entry('C.1.3', 'Löschzug einer Feuerwehr', 71, {form: 'formation', ...FIRE, size: 'platoon', abilities: ['firefighting']}),
115
+ entry('C.1.4', 'Rüstzug einer Feuerwehr', 71, {form: 'formation', ...FIRE, size: 'platoon', abilities: ['technical-rescue']}),
116
+ entry('C.1.5', 'Fachzug', 71, {form: 'formation', ...FIRE, size: 'platoon', designation: 'FZ-'}),
117
+ entry('C.1.6', 'Fachdienst Brandschutz', 71, {form: 'formation', ...FIRE, size: 'association-1', abilities: ['firefighting'], designation: 'FD'}),
118
+ entry('C.1.7', 'CBRN-Erkundungstrupp (CBRN-ErkKW)', 71, {form: 'formation', ...FIRE, size: 'squad', abilities: ['cbrn-measuring']}),
119
+ entry('C.1.8', 'Staffel Dekontamination von Personal (GW-Dekon P)', 71, {form: 'formation', ...FIRE, size: 'section', abilities: ['decontamination'], designation: 'P'}),
120
+ entry('C.1.9', 'ABC-Erkundungsgruppe einer Feuerwehr', 71, {form: 'formation', ...FIRE, size: 'group', abilities: ['cbrn-measuring']}),
121
+ entry('C.1.10', 'Dekontaminationsgruppe Gerät einer Feuerwehr', 71, {form: 'formation', ...FIRE, size: 'group', abilities: ['decontamination'], designation: 'G'}),
122
+ entry('C.1.11', 'Gefahrstoffzug/ABC-Zug/CBRN-Zug einer Feuerwehr', 72, {form: 'formation', ...FIRE, size: 'platoon', abilities: ['cbrn']}),
123
+ entry('C.1.12', 'Analytische Task Force (ATF)', 72, {form: 'formation', ...FIRE, size: 'platoon', abilities: ['cbrn-measuring'], designation: 'ATF'}),
124
+ entry('C.1.13', 'Flugdrohnentrupp einer Feuerwehr', 72, {form: 'formation', ...FIRE, size: 'squad', supplements: ['uncrewed'], flight: 'flying'}),
125
+ entry('C.1.14', 'Drohnentrupp einer Feuerwehr (allgemein)', 72, {form: 'formation', ...FIRE, size: 'squad', supplements: ['uncrewed']}),
126
+ entry('C.1.15', 'Tauchergruppe einer Feuerwehr', 72, {form: 'formation', ...FIRE, size: 'group', abilities: ['water-rescue']}),
127
+ entry('C.2.1', 'Kommandowagen', 72, {form: 'land-vehicle', ...FIRE, drive: 'road', supplements: ['command'], designation: 'KdoW'}),
128
+ entry('C.2.2', 'Einsatzleitwagen 1', 72, {form: 'land-vehicle', ...FIRE, drive: 'road', supplements: ['command'], designation: 'ELW 1'}),
129
+ entry('C.2.3', 'Einsatzleitwagen 2', 72, {form: 'land-vehicle', ...FIRE, drive: 'road', supplements: ['command'], designation: 'ELW 2'}),
130
+ entry('C.2.4', 'Tragkraftspritzenfahrzeug', 72, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: 'TSF'}),
131
+ entry('C.2.5', 'Tragkraftspritzenfahrzeug mit Wasser', 72, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: 'TSF-W'}),
132
+ entry('C.2.6', 'Kleinlöschfahrzeug', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: 'KLF'}),
133
+ entry('C.2.7', 'Mittleres Löschfahrzeug', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: 'MLF'}),
134
+ entry('C.2.8', '(Hilfeleistungs-)Löschfahrzeug 10', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: '(H)LF 10'}),
135
+ entry('C.2.9', '(Hilfeleistungs-)Löschfahrzeug 20', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: '(H)LF 20'}),
136
+ entry('C.2.10', 'Löschgruppenfahrzeug 20 Katastrophenschutz', 73, {form: 'land-vehicle', ...FIRE, drive: 'offroad', abilities: ['firefighting'], designation: 'LF 20 KatS'}),
137
+ entry('C.2.11', 'Tanklöschfahrzeug 2.000', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: 'TLF 2.000'}),
138
+ entry('C.2.12', 'Tanklöschfahrzeug 3.000', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: 'TLF 3.000'}),
139
+ entry('C.2.13', 'Tanklöschfahrzeug 4.000', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['firefighting'], designation: 'TLF 4.000'}),
140
+ entry('C.2.14', 'Automatikdrehleiter mit Rettungskorb 12/9', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['turntable-ladder'], designation: 'DLAK 12/9'}),
141
+ entry('C.2.15', 'Automatikdrehleiter mit Rettungskorb 18/12', 73, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['turntable-ladder'], designation: 'DLAK 18/12'}),
142
+ entry('C.2.16', 'Automatikdrehleiter mit Rettungskorb 23/12', 74, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['turntable-ladder'], designation: 'DLAK 23/12'}),
143
+ entry('C.2.17', 'Hubarbeitsbühne (HAB) oder Teleskopgelenkmast (TGM)', 74, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['aerial-platform'], designation: 'HAB'}),
144
+ entry('C.2.18', 'Rüstwagen', 74, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['technical-rescue']}),
145
+ entry('C.2.19', 'Wechselladerfahrzeug', 74, {form: 'land-vehicle', ...FIRE, drive: 'road', body: 'swap-loader'}),
146
+ entry('C.2.20', 'Gerätewagen Gefahrgut', 74, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['cbrn'], designation: 'GW-G'}),
147
+ entry('C.2.21', 'Gerätewagen Logistik 1', 74, {form: 'land-vehicle', ...FIRE, drive: 'road', supplements: ['logistics'], designation: 'GW-L1'}),
148
+ entry('C.2.22', 'Gerätewagen Logistik 2', 74, {form: 'land-vehicle', ...FIRE, drive: 'road', supplements: ['logistics'], designation: 'GW-L2'}),
149
+ entry('C.2.23', 'Mannschaftstransportfahrzeug, 9-sitzig', 75, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['transporting'], designation: 'MTF'}),
150
+ entry('C.2.24', 'CBRN-Erkundungswagen', 75, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['cbrn-measuring'], designation: 'CBRN ErkW'}),
151
+ entry('C.2.25', 'Gerätewagen Dekontamination Personal', 75, {form: 'land-vehicle', ...FIRE, drive: 'offroad', abilities: ['decontamination'], designation: 'GW Dekon P'}),
152
+ entry('C.2.26', 'Schlauchwagen Katastrophenschutz', 75, {form: 'land-vehicle', ...FIRE, drive: 'offroad', abilities: ['water-conveying'], designation: 'SW KatS'}),
153
+ entry('C.2.27', 'Feuerwehrkran 30', 75, {form: 'land-vehicle', ...FIRE, drive: 'road', abilities: ['crane'], designation: 'FwK 30'}),
154
+ entry('C.2.28', 'Teleskoplader', 75, {form: 'land-vehicle', ...FIRE, drive: 'offroad', abilities: ['telehandler'], designation: 'Telelader'}),
155
+ entry('C.2.29', 'Tragkraftspritzenanhänger', 76, {form: 'land-vehicle', ...FIRE, body: 'trailer', drive: 'towed-by-car', abilities: ['firefighting']}),
156
+ entry('C.2.30', 'Feuerwehr Netzersatzanlage 120 kVA', 76, {form: 'land-vehicle', ...FIRE, body: 'trailer', drive: 'towed-by-car', supplements: ['logistics'], abilities: ['power'], designation: '120'}),
157
+ entry('C.2.31', 'Geschützte Löschdrohne/Löschroboter auf Kettenfahrgestell', 76, {form: 'land-vehicle', ...FIRE, protected: true, drive: 'tracked', supplements: ['uncrewed'], abilities: ['firefighting']}),
108
158
  ownMark('W.1', 'Unterflurhydrant', 'hydrant-underground'),
109
159
  ownMark('W.2', 'Überflurhydrant', 'hydrant-pillar'),
110
160
  ownMark('W.3', 'Offenes Gewässer', 'open-water'),
@@ -16,7 +16,8 @@
16
16
  * marks sit inside the roof, since the canvas has no room above it.
17
17
  */
18
18
 
19
- import {canvas, element, group, label, renderSvg, type SvgElement} from './svg'
19
+ import {ABILITIES, type Ability, type AbilityName, type AbilityPart} from './abilities'
20
+ import {SIGN_FONT, canvas, element, group, label, renderSvg, type SvgElement} from './svg'
20
21
 
21
22
  /** The basic forms of chapter 1, in its order. */
22
23
  export const BASIC_FORMS = [
@@ -81,6 +82,10 @@ export interface TacticalSignSpec {
81
82
  drive?: Drive
82
83
  body?: VehicleBody
83
84
  flight?: Flight
85
+ /** Abilities of chapter 4 drawn inside the form, the main one first; they stack from the bottom up (6.1). */
86
+ abilities?: readonly AbilityName[]
87
+ /** A short designation in the upper left corner (field A), such as "ELW 1", as annex C shows it. */
88
+ designation?: string
84
89
  /** Writing inside the form, such as a function or a vehicle name. */
85
90
  text?: string
86
91
  /** Shows the organisation's short name, which chapter 2 asks for whenever colour is missing. */
@@ -89,7 +94,7 @@ export interface TacticalSignSpec {
89
94
 
90
95
  /** The colour, its writing colour and short name of each organisation, after chapter 2 and annex O. */
91
96
  export const ORGANISATION_COLOURS: Readonly<Record<SignOrganisation, Readonly<{fill: string, text: string, abbreviation: string}>>> = {
92
- fire: {fill: '#FA321E', text: '#FFFFFF', abbreviation: 'Fw'},
97
+ fire: {fill: '#FA321E', text: '#000000', abbreviation: 'Fw'},
93
98
  aid: {fill: '#FFFFFF', text: '#000000', abbreviation: 'HiOrg'},
94
99
  thw: {fill: '#003399', text: '#FFFFFF', abbreviation: 'THW'},
95
100
  command: {fill: '#FAFA00', text: '#000000', abbreviation: ''},
@@ -213,6 +218,73 @@ function sizeMark(size: SignSize, above: number): SvgElement[] {
213
218
  }
214
219
  }
215
220
 
221
+ const ABILITY_STROKE = 2.5
222
+
223
+ /** One part of an ability, drawn in its 100 × 60 box; `width` is the stroke width in that box. */
224
+ function abilityPart(part: AbilityPart, colour: string, width: number): SvgElement {
225
+ const stroke = {stroke: colour, 'stroke-width': round(width), 'stroke-linecap': 'round', 'stroke-linejoin': 'round'}
226
+ if ('text' in part) {
227
+ return {tag: 'text', attributes: {x: part.x, y: part.y, fill: colour, 'font-size': part.size, ...SIGN_FONT,
228
+ 'text-anchor': 'middle', 'dominant-baseline': 'central'}, text: part.text}
229
+ }
230
+ const fill = part.filled ? colour : 'none'
231
+ if ('circle' in part) return element('circle', {cx: part.circle[0], cy: part.circle[1], r: part.circle[2], fill, ...stroke})
232
+ return element('path', {d: part.d, fill, ...stroke, ...(part.width ? {'stroke-width': round(part.width * width / ABILITY_STROKE)} : {})})
233
+ }
234
+
235
+ /** The room inside a form that abilities may take, clear of the designation and the command and logistics bars. */
236
+ function abilityRoom(spec: TacticalSignSpec, form: Layout): {left: number, top: number, width: number, height: number} {
237
+ const supplements = spec.supplements ?? []
238
+ const top = form.top + (supplements.includes('command') ? 12 : 4) + (spec.designation ? 10 : 0)
239
+ const bottom = form.bottom - (supplements.includes('logistics') ? 12 : 4)
240
+ return {left: form.left + 6, top, width: form.right - form.left - 12, height: bottom - top}
241
+ }
242
+
243
+ /**
244
+ * The abilities inside a form: each gets an equal slice of the room, the first (main) one at the
245
+ * bottom, and is scaled evenly into it. A single ability that stretches spans the whole room
246
+ * instead, below a designation if there is one, as annex C draws it; its paths are stretched, its
247
+ * dots stay round.
248
+ * Stroke widths are set in each box so the lines keep the weight of the form's outline.
249
+ */
250
+ function abilityMarks(spec: TacticalSignSpec, form: Layout, colour: string): SvgElement[] {
251
+ const names = spec.abilities ?? []
252
+ const room = abilityRoom(spec, form)
253
+ const only = names.length === 1 ? (ABILITIES[names[0]!] as Ability) : undefined
254
+ if (only?.stretch) {
255
+ const sx = room.width / 100
256
+ const sy = room.height / 60
257
+ const lines = only.parts.filter(part => !('circle' in part)).map(part => abilityPart(part, colour, ABILITY_STROKE / Math.min(sx, sy)))
258
+ const dots = only.parts.flatMap(part => 'circle' in part
259
+ ? [element('circle', {cx: round(room.left + part.circle[0] * sx), cy: round(room.top + part.circle[1] * sy),
260
+ r: round(part.circle[2] * Math.min(sx, sy)), fill: part.filled ? colour : 'none', stroke: colour, 'stroke-width': ABILITY_STROKE})]
261
+ : [])
262
+ return [group(lines, {transform: `translate(${round(room.left)} ${round(room.top)}) scale(${round(sx)} ${round(sy)})`}), ...dots]
263
+ }
264
+ const slot = room.height / names.length
265
+ return names.map((name, index) => {
266
+ const scale = Math.min(room.width / 100, slot / 60)
267
+ const x = room.left + (room.width - 100 * scale) / 2
268
+ const y = room.top + slot * (names.length - 1 - index) + (slot - 60 * scale) / 2
269
+ const parts = ABILITIES[name].parts.map(part => abilityPart(part, colour, ABILITY_STROKE / scale))
270
+ return group(parts, {transform: `translate(${round(x)} ${round(y)}) scale(${round(scale)})`})
271
+ })
272
+ }
273
+
274
+ function round(value: number): number {
275
+ return Math.round(value * 1000) / 1000
276
+ }
277
+
278
+ /** The designation in the upper left corner of a form (field A), below a command bar if there is one. */
279
+ function designation(spec: TacticalSignSpec, text: string, form: Layout, colour: string): SvgElement {
280
+ const below = (spec.supplements ?? []).includes('command') ? 12 : 0
281
+ return {
282
+ tag: 'text',
283
+ attributes: {x: form.left + 5, y: form.top + 8 + below, fill: colour, 'font-size': 10, ...SIGN_FONT, 'dominant-baseline': 'central'},
284
+ text,
285
+ }
286
+ }
287
+
216
288
  /** A line of the given colour and width. */
217
289
  function line(d: string, colour: string, width = STROKE): SvgElement {
218
290
  return element('path', {d, fill: 'none', stroke: colour, 'stroke-width': width, 'stroke-linecap': 'round', 'stroke-linejoin': 'round'})
@@ -337,6 +409,8 @@ export function tacticalSignTree(spec: TacticalSignSpec): SvgElement {
337
409
  if (spec.flight) parts.push(...flightMarks(spec.flight, form, colours.line))
338
410
  for (const kind of supplements) parts.push(...supplement(kind, form, colours.line))
339
411
  if (spec.size) parts.push(...sizeMark(spec.size, form.top))
412
+ if (spec.abilities?.length) parts.push(...abilityMarks(spec, form, colours.text))
413
+ if (spec.designation) parts.push(designation(spec, spec.designation, form, colours.text))
340
414
  if (spec.text) parts.push(label(spec.text, 60, form.textY, colours.text, form.textWidth))
341
415
  const short = spec.abbreviation && spec.organisation ? ORGANISATION_COLOURS[spec.organisation].abbreviation : ''
342
416
  if (short) parts.push(label(short, form.short.x, form.short.y, form.short.inside ? colours.text : BLACK, 24, 10))
@@ -51,6 +51,9 @@ export function renderSvg(node: SvgElement): string {
51
51
  return content ? `<${node.tag}${attributes}>${content}</${node.tag}>` : `<${node.tag}${attributes}/>`
52
52
  }
53
53
 
54
+ /** The type every piece of writing in a symbol is set in. */
55
+ export const SIGN_FONT: Attributes = {'font-weight': 700, 'font-family': 'Barlow Condensed, Barlow, sans-serif'}
56
+
54
57
  /** Writing at a point, squeezed to `maxWidth` when it is long. */
55
58
  export function label(text: string, x: number, y: number, colour: string, maxWidth = MAX_TEXT_WIDTH, size?: number): SvgElement {
56
59
  const fontSize = size ?? (text.length > 8 ? 17 : 22)
@@ -60,8 +63,7 @@ export function label(text: string, x: number, y: number, colour: string, maxWid
60
63
  return {
61
64
  tag: 'text',
62
65
  attributes: {
63
- x, y, fill: colour, 'font-size': fontSize, 'font-weight': 700,
64
- 'font-family': 'Barlow Condensed, Barlow, sans-serif', 'text-anchor': 'middle',
66
+ x, y, fill: colour, 'font-size': fontSize, ...SIGN_FONT, 'text-anchor': 'middle',
65
67
  'dominant-baseline': 'central', ...squeeze,
66
68
  },
67
69
  text,