flight-indicators 0.0.0-stage → 1.0.1
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/LICENSE +21 -0
- package/README.md +133 -2
- package/dist/index.cjs +414 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +83 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.js +383 -0
- package/dist/index.js.map +1 -0
- package/package.json +78 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/utils.ts
|
|
4
|
+
import { useEffect, useId, useRef } from "react";
|
|
5
|
+
var CENTER = 200;
|
|
6
|
+
var DEFAULT_ANIMATION_MS = 300;
|
|
7
|
+
var clamp = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
8
|
+
var finite = (value, fallback = 0) => typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
9
|
+
var round = (n) => Math.round(n * 100) / 100;
|
|
10
|
+
function polar(r, deg, cx = CENTER, cy = CENTER) {
|
|
11
|
+
const a = deg * Math.PI / 180;
|
|
12
|
+
return [round(cx + r * Math.sin(a)), round(cy - r * Math.cos(a))];
|
|
13
|
+
}
|
|
14
|
+
function arcPath(r, startDeg, endDeg) {
|
|
15
|
+
const [x1, y1] = polar(r, startDeg);
|
|
16
|
+
const [x2, y2] = polar(r, endDeg);
|
|
17
|
+
const largeArc = Math.abs(endDeg - startDeg) > 180 ? 1 : 0;
|
|
18
|
+
const sweep = endDeg >= startDeg ? 1 : 0;
|
|
19
|
+
return `M ${x1} ${y1} A ${r} ${r} 0 ${largeArc} ${sweep} ${x2} ${y2}`;
|
|
20
|
+
}
|
|
21
|
+
function tickPath(r1, r2, deg) {
|
|
22
|
+
const [x1, y1] = polar(r1, deg);
|
|
23
|
+
const [x2, y2] = polar(r2, deg);
|
|
24
|
+
return `M ${x1} ${y1} L ${x2} ${y2}`;
|
|
25
|
+
}
|
|
26
|
+
function range(start, end, step) {
|
|
27
|
+
const out = [];
|
|
28
|
+
for (let v = start; v <= end + 1e-9; v += step) out.push(round(v));
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
function motionStyle(transform, durationMs, originX = CENTER, originY = CENTER) {
|
|
32
|
+
return {
|
|
33
|
+
transform,
|
|
34
|
+
transformOrigin: `${originX}px ${originY}px`,
|
|
35
|
+
transformBox: "view-box",
|
|
36
|
+
transition: durationMs > 0 ? `transform ${durationMs}ms ease-out` : void 0
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function useContinuousAngle(angle) {
|
|
40
|
+
const previous = useRef(null);
|
|
41
|
+
let next = angle;
|
|
42
|
+
if (previous.current !== null) {
|
|
43
|
+
const delta = ((angle - previous.current) % 360 + 540) % 360 - 180;
|
|
44
|
+
next = previous.current + delta;
|
|
45
|
+
}
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
previous.current = next;
|
|
48
|
+
});
|
|
49
|
+
return next;
|
|
50
|
+
}
|
|
51
|
+
function useSvgId(prefix) {
|
|
52
|
+
return `${prefix}-${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// src/components/Instrument.tsx
|
|
56
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
57
|
+
var SCREWS = [
|
|
58
|
+
[32, 32],
|
|
59
|
+
[368, 32],
|
|
60
|
+
[32, 368],
|
|
61
|
+
[368, 368]
|
|
62
|
+
];
|
|
63
|
+
function InstrumentFrame({
|
|
64
|
+
size = 200,
|
|
65
|
+
showBox = true,
|
|
66
|
+
className,
|
|
67
|
+
style,
|
|
68
|
+
title,
|
|
69
|
+
label,
|
|
70
|
+
children
|
|
71
|
+
}) {
|
|
72
|
+
const titleId = useSvgId("fi-title");
|
|
73
|
+
const bezelId = useSvgId("fi-bezel");
|
|
74
|
+
return /* @__PURE__ */ jsxs(
|
|
75
|
+
"svg",
|
|
76
|
+
{
|
|
77
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
78
|
+
viewBox: "0 0 400 400",
|
|
79
|
+
width: size,
|
|
80
|
+
height: size,
|
|
81
|
+
role: "img",
|
|
82
|
+
"aria-labelledby": titleId,
|
|
83
|
+
className,
|
|
84
|
+
style: { display: "inline-block", userSelect: "none", ...style },
|
|
85
|
+
fontFamily: "'Helvetica Neue', Arial, sans-serif",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsx("title", { id: titleId, children: title ?? label }),
|
|
88
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: bezelId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
89
|
+
/* @__PURE__ */ jsx("stop", { offset: "0", stopColor: "#5a5a5a" }),
|
|
90
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#1a1a1a" })
|
|
91
|
+
] }) }),
|
|
92
|
+
showBox && /* @__PURE__ */ jsxs("g", { children: [
|
|
93
|
+
/* @__PURE__ */ jsx("rect", { x: "2", y: "2", width: "396", height: "396", rx: "36", fill: "#232323", stroke: "#0d0d0d", strokeWidth: "4" }),
|
|
94
|
+
SCREWS.map(([x, y]) => /* @__PURE__ */ jsxs("g", { children: [
|
|
95
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: "12", fill: "#3a3a3a", stroke: "#111", strokeWidth: "2" }),
|
|
96
|
+
/* @__PURE__ */ jsx("path", { d: `M ${x - 8} ${y + 3} L ${x + 8} ${y - 3}`, stroke: "#111", strokeWidth: "3" })
|
|
97
|
+
] }, `${x}-${y}`))
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsx("circle", { cx: CENTER, cy: CENTER, r: "196", fill: `url(#${bezelId})` }),
|
|
100
|
+
/* @__PURE__ */ jsx("circle", { cx: CENTER, cy: CENTER, r: "182", fill: "#111", stroke: "#000", strokeWidth: "4" }),
|
|
101
|
+
children
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function Hub({ r = 14 }) {
|
|
107
|
+
return /* @__PURE__ */ jsx("circle", { cx: CENTER, cy: CENTER, r, fill: "#2a2a2a", stroke: "#555", strokeWidth: "2" });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/components/AttitudeIndicator.tsx
|
|
111
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
112
|
+
var PX_PER_DEG = 4;
|
|
113
|
+
var FACE_R = 180;
|
|
114
|
+
var ROLL_MARKS = [
|
|
115
|
+
[10, 12],
|
|
116
|
+
[20, 12],
|
|
117
|
+
[30, 22],
|
|
118
|
+
[45, 12],
|
|
119
|
+
[60, 22]
|
|
120
|
+
];
|
|
121
|
+
function AttitudeIndicator({ roll = 0, pitch = 0, pitchLimit = 40, ...props }) {
|
|
122
|
+
const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;
|
|
123
|
+
const limit = Math.abs(finite(pitchLimit, 40));
|
|
124
|
+
const safeRoll = finite(roll);
|
|
125
|
+
const safePitch = clamp(finite(pitch), -limit, limit);
|
|
126
|
+
const displayRoll = useContinuousAngle(safeRoll);
|
|
127
|
+
const clipId = useSvgId("fi-ai-clip");
|
|
128
|
+
const ladder = range(-90, 90, 5).filter((d) => d !== 0);
|
|
129
|
+
return /* @__PURE__ */ jsxs2(
|
|
130
|
+
InstrumentFrame,
|
|
131
|
+
{
|
|
132
|
+
...props,
|
|
133
|
+
label: `Attitude indicator: pitch ${Math.round(safePitch)}\xB0, roll ${Math.round(safeRoll)}\xB0`,
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsx2("defs", { children: /* @__PURE__ */ jsx2("clipPath", { id: clipId, children: /* @__PURE__ */ jsx2("circle", { cx: CENTER, cy: CENTER, r: FACE_R }) }) }),
|
|
136
|
+
/* @__PURE__ */ jsxs2("g", { clipPath: `url(#${clipId})`, children: [
|
|
137
|
+
/* @__PURE__ */ jsxs2(
|
|
138
|
+
"g",
|
|
139
|
+
{
|
|
140
|
+
"data-testid": "attitude-horizon",
|
|
141
|
+
style: motionStyle(`rotate(${-displayRoll}deg) translate(0px, ${safePitch * PX_PER_DEG}px)`, duration),
|
|
142
|
+
children: [
|
|
143
|
+
/* @__PURE__ */ jsx2("rect", { x: -400, y: -600, width: 1200, height: 800, fill: "#3b8fd6" }),
|
|
144
|
+
/* @__PURE__ */ jsx2("rect", { x: -400, y: CENTER, width: 1200, height: 800, fill: "#8a5a2b" }),
|
|
145
|
+
/* @__PURE__ */ jsx2("line", { x1: -400, y1: CENTER, x2: 800, y2: CENTER, stroke: "#fff", strokeWidth: "3" }),
|
|
146
|
+
ladder.map((d) => {
|
|
147
|
+
const y = CENTER - d * PX_PER_DEG;
|
|
148
|
+
const major = d % 10 === 0;
|
|
149
|
+
const half = major ? 50 : 22;
|
|
150
|
+
return /* @__PURE__ */ jsxs2("g", { children: [
|
|
151
|
+
/* @__PURE__ */ jsx2("line", { x1: CENTER - half, y1: y, x2: CENTER + half, y2: y, stroke: "#fff", strokeWidth: major ? 3 : 2 }),
|
|
152
|
+
major && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
153
|
+
/* @__PURE__ */ jsx2("text", { x: CENTER - half - 8, y: y + 6, fill: "#fff", fontSize: "17", fontWeight: "bold", textAnchor: "end", children: Math.abs(d) }),
|
|
154
|
+
/* @__PURE__ */ jsx2("text", { x: CENTER + half + 8, y: y + 6, fill: "#fff", fontSize: "17", fontWeight: "bold", children: Math.abs(d) })
|
|
155
|
+
] })
|
|
156
|
+
] }, d);
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsx2("g", { stroke: "#fff", strokeWidth: "4", strokeLinecap: "round", children: ROLL_MARKS.flatMap(([deg, len]) => [
|
|
162
|
+
/* @__PURE__ */ jsx2("path", { d: tickPath(FACE_R - 2, FACE_R - 2 - len, -deg) }, `l${deg}`),
|
|
163
|
+
/* @__PURE__ */ jsx2("path", { d: tickPath(FACE_R - 2, FACE_R - 2 - len, deg) }, `r${deg}`)
|
|
164
|
+
]) }),
|
|
165
|
+
/* @__PURE__ */ jsx2("path", { d: `M ${CENTER} ${CENTER - 158} l -10 -18 h 20 z`, fill: "#fff" }),
|
|
166
|
+
/* @__PURE__ */ jsx2("g", { "data-testid": "attitude-roll-pointer", style: motionStyle(`rotate(${-displayRoll}deg)`, duration), children: /* @__PURE__ */ jsx2("path", { d: `M ${CENTER} ${CENTER - 156} l -10 18 h 20 z`, fill: "#ffb000" }) })
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ jsxs2("g", { fill: "none", stroke: "#ffb000", strokeWidth: "8", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
169
|
+
/* @__PURE__ */ jsx2("path", { d: `M ${CENTER - 110} ${CENTER} H ${CENTER - 40} l 14 16` }),
|
|
170
|
+
/* @__PURE__ */ jsx2("path", { d: `M ${CENTER + 110} ${CENTER} H ${CENTER + 40} l -14 16` })
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ jsx2("circle", { cx: CENTER, cy: CENTER, r: "6", fill: "#ffb000" })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// src/components/HeadingIndicator.tsx
|
|
179
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
180
|
+
var CARDINALS = { 0: "N", 90: "E", 180: "S", 270: "W" };
|
|
181
|
+
function HeadingIndicator({ heading = 0, ...props }) {
|
|
182
|
+
const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;
|
|
183
|
+
const safeHeading = finite(heading);
|
|
184
|
+
const normalised = (Math.round(safeHeading) % 360 + 360) % 360;
|
|
185
|
+
const displayHeading = useContinuousAngle(safeHeading);
|
|
186
|
+
return /* @__PURE__ */ jsxs3(InstrumentFrame, { ...props, label: `Heading indicator: ${String(normalised).padStart(3, "0")}\xB0`, children: [
|
|
187
|
+
/* @__PURE__ */ jsxs3("g", { "data-testid": "heading-card", style: motionStyle(`rotate(${-displayHeading}deg)`, duration), children: [
|
|
188
|
+
/* @__PURE__ */ jsx3("g", { stroke: "#fff", strokeLinecap: "round", children: range(0, 355, 5).map((a) => /* @__PURE__ */ jsx3("path", { d: tickPath(176, a % 10 === 0 ? 152 : 164, a), strokeWidth: a % 10 === 0 ? 3 : 2 }, a)) }),
|
|
189
|
+
range(0, 330, 30).map((a) => {
|
|
190
|
+
const [x, y] = polar(132, a);
|
|
191
|
+
const label = CARDINALS[a] ?? String(a / 10);
|
|
192
|
+
return /* @__PURE__ */ jsx3(
|
|
193
|
+
"text",
|
|
194
|
+
{
|
|
195
|
+
x,
|
|
196
|
+
y,
|
|
197
|
+
transform: `rotate(${a} ${x} ${y})`,
|
|
198
|
+
fill: a % 90 === 0 ? "#ffb000" : "#fff",
|
|
199
|
+
fontSize: a % 90 === 0 ? 30 : 26,
|
|
200
|
+
fontWeight: "bold",
|
|
201
|
+
textAnchor: "middle",
|
|
202
|
+
dominantBaseline: "central",
|
|
203
|
+
children: label
|
|
204
|
+
},
|
|
205
|
+
a
|
|
206
|
+
);
|
|
207
|
+
})
|
|
208
|
+
] }),
|
|
209
|
+
/* @__PURE__ */ jsx3("g", { stroke: "#ffb000", strokeWidth: "4", strokeLinecap: "round", children: [45, 135, 225, 315].map((a) => /* @__PURE__ */ jsx3("path", { d: tickPath(192, 178, a) }, a)) }),
|
|
210
|
+
/* @__PURE__ */ jsx3("path", { d: `M ${CENTER} ${CENTER - 150} l -9 -26 h 18 z`, fill: "#ffb000" }),
|
|
211
|
+
/* @__PURE__ */ jsx3(
|
|
212
|
+
"path",
|
|
213
|
+
{
|
|
214
|
+
d: "M200 135 c6 0 8 8 8 16 v30 l52 18 v12 l-52 -8 v34 l18 12 v10 l-26 -6 l-26 6 v-10 l18 -12 v-34 l-52 8 v-12 l52 -18 v-30 c0 -8 2 -16 8 -16 z",
|
|
215
|
+
fill: "#ffb000",
|
|
216
|
+
stroke: "#000",
|
|
217
|
+
strokeWidth: "2"
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
] });
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// src/components/Airspeed.tsx
|
|
224
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
225
|
+
var SWEEP = 320;
|
|
226
|
+
var DEFAULT_ARCS = { white: [33, 85], green: [44, 129], yellow: [129, 163], red: 163 };
|
|
227
|
+
function labelStep(max) {
|
|
228
|
+
const raw = max / 10;
|
|
229
|
+
const steps = [5, 10, 20, 25, 50, 100, 200, 250, 500];
|
|
230
|
+
return steps.find((s) => s >= raw) ?? Math.ceil(raw / 100) * 100;
|
|
231
|
+
}
|
|
232
|
+
function Airspeed({ speed = 0, max = 200, arcs = DEFAULT_ARCS, unit = "KNOTS", ...props }) {
|
|
233
|
+
const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;
|
|
234
|
+
const safeMax = Math.max(1, finite(max, 200));
|
|
235
|
+
const safeSpeed = clamp(finite(speed), 0, safeMax);
|
|
236
|
+
const angle = (v) => clamp(v, 0, safeMax) / safeMax * SWEEP;
|
|
237
|
+
const step = labelStep(safeMax);
|
|
238
|
+
const minor = step / (step % 4 === 0 ? 4 : 5);
|
|
239
|
+
return /* @__PURE__ */ jsxs4(InstrumentFrame, { ...props, label: `Airspeed indicator: ${Math.round(safeSpeed)} ${unit.toLowerCase()}`, children: [
|
|
240
|
+
/* @__PURE__ */ jsxs4("g", { fill: "none", children: [
|
|
241
|
+
arcs.white && /* @__PURE__ */ jsx4("path", { d: arcPath(150, angle(arcs.white[0]), angle(arcs.white[1])), stroke: "#fff", strokeWidth: "8" }),
|
|
242
|
+
arcs.green && /* @__PURE__ */ jsx4("path", { d: arcPath(166, angle(arcs.green[0]), angle(arcs.green[1])), stroke: "#2fb54a", strokeWidth: "12" }),
|
|
243
|
+
arcs.yellow && /* @__PURE__ */ jsx4("path", { d: arcPath(166, angle(arcs.yellow[0]), angle(arcs.yellow[1])), stroke: "#f2c200", strokeWidth: "12" }),
|
|
244
|
+
arcs.red !== void 0 && /* @__PURE__ */ jsx4("path", { d: tickPath(178, 146, angle(arcs.red)), stroke: "#e02020", strokeWidth: "6" })
|
|
245
|
+
] }),
|
|
246
|
+
/* @__PURE__ */ jsx4("g", { stroke: "#fff", strokeLinecap: "round", children: range(0, safeMax, minor).map((v) => {
|
|
247
|
+
const major = Math.abs(v % step) < 1e-9;
|
|
248
|
+
return /* @__PURE__ */ jsx4("path", { d: tickPath(178, major ? 150 : 162, angle(v)), strokeWidth: major ? 3 : 2 }, v);
|
|
249
|
+
}) }),
|
|
250
|
+
range(0, safeMax, step).map((v) => {
|
|
251
|
+
const [x, y] = polar(124, angle(v));
|
|
252
|
+
return /* @__PURE__ */ jsx4("text", { x, y, fill: "#fff", fontSize: "24", fontWeight: "bold", textAnchor: "middle", dominantBaseline: "central", children: v }, v);
|
|
253
|
+
}),
|
|
254
|
+
/* @__PURE__ */ jsx4("text", { x: CENTER, y: CENTER - 42, fill: "#ccc", fontSize: "18", textAnchor: "middle", children: "AIRSPEED" }),
|
|
255
|
+
/* @__PURE__ */ jsx4("text", { x: CENTER, y: CENTER + 56, fill: "#ccc", fontSize: "16", textAnchor: "middle", children: unit }),
|
|
256
|
+
/* @__PURE__ */ jsx4("g", { "data-testid": "airspeed-needle", style: motionStyle(`rotate(${angle(safeSpeed)}deg)`, duration), children: /* @__PURE__ */ jsx4("path", { d: `M ${CENTER - 5} ${CENTER + 30} L ${CENTER - 4} ${CENTER - 140} L ${CENTER} ${CENTER - 165} L ${CENTER + 4} ${CENTER - 140} L ${CENTER + 5} ${CENTER + 30} Z`, fill: "#fff" }) }),
|
|
257
|
+
/* @__PURE__ */ jsx4(Hub, {})
|
|
258
|
+
] });
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// src/components/Altimeter.tsx
|
|
262
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
263
|
+
var STANDARD = { hPa: 1013, inHg: 29.92 };
|
|
264
|
+
function Altimeter({ altitude = 0, pressure, pressureUnit = "hPa", ...props }) {
|
|
265
|
+
const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;
|
|
266
|
+
const alt = finite(altitude);
|
|
267
|
+
const qnh = finite(pressure, STANDARD[pressureUnit]);
|
|
268
|
+
const qnhText = pressureUnit === "inHg" ? qnh.toFixed(2) : Math.round(qnh).toString();
|
|
269
|
+
return /* @__PURE__ */ jsxs5(InstrumentFrame, { ...props, label: `Altimeter: ${Math.round(alt)} feet, ${qnhText} ${pressureUnit}`, children: [
|
|
270
|
+
/* @__PURE__ */ jsx5("g", { stroke: "#fff", strokeLinecap: "round", children: range(0, 49, 1).map((i) => /* @__PURE__ */ jsx5("path", { d: tickPath(178, i % 5 === 0 ? 150 : 164, i * 7.2), strokeWidth: i % 5 === 0 ? 4 : 2 }, i)) }),
|
|
271
|
+
range(0, 9, 1).map((n) => {
|
|
272
|
+
const [x, y] = polar(126, n * 36);
|
|
273
|
+
return /* @__PURE__ */ jsx5("text", { x, y, fill: "#fff", fontSize: "32", fontWeight: "bold", textAnchor: "middle", dominantBaseline: "central", children: n }, n);
|
|
274
|
+
}),
|
|
275
|
+
/* @__PURE__ */ jsx5("text", { x: CENTER, y: CENTER - 58, fill: "#ccc", fontSize: "16", textAnchor: "middle", children: "ALT" }),
|
|
276
|
+
/* @__PURE__ */ jsx5("text", { x: CENTER, y: CENTER - 40, fill: "#ccc", fontSize: "12", textAnchor: "middle", children: "100 FEET" }),
|
|
277
|
+
/* @__PURE__ */ jsx5("rect", { x: CENTER + 30, y: CENTER - 16, width: "74", height: "32", rx: "4", fill: "#000", stroke: "#666", strokeWidth: "2" }),
|
|
278
|
+
/* @__PURE__ */ jsx5("text", { "data-testid": "altimeter-pressure", x: CENTER + 67, y: CENTER + 1, fill: "#fff", fontSize: "20", fontFamily: "monospace", textAnchor: "middle", dominantBaseline: "central", children: qnhText }),
|
|
279
|
+
/* @__PURE__ */ jsx5("text", { x: CENTER + 67, y: CENTER + 30, fill: "#ccc", fontSize: "12", textAnchor: "middle", children: pressureUnit }),
|
|
280
|
+
/* @__PURE__ */ jsxs5("g", { "data-testid": "altimeter-10000", style: motionStyle(`rotate(${alt / 1e5 * 360}deg)`, duration), children: [
|
|
281
|
+
/* @__PURE__ */ jsx5("path", { d: `M ${CENTER} ${CENTER} L ${CENTER} ${CENTER - 150}`, stroke: "#fff", strokeWidth: "3" }),
|
|
282
|
+
/* @__PURE__ */ jsx5("path", { d: `M ${CENTER} ${CENTER - 178} l -10 22 h 20 z`, fill: "#fff" })
|
|
283
|
+
] }),
|
|
284
|
+
/* @__PURE__ */ jsx5("g", { "data-testid": "altimeter-1000", style: motionStyle(`rotate(${alt / 1e4 * 360}deg)`, duration), children: /* @__PURE__ */ jsx5("path", { d: `M ${CENTER - 9} ${CENTER + 14} L ${CENTER - 12} ${CENTER - 70} L ${CENTER} ${CENTER - 100} L ${CENTER + 12} ${CENTER - 70} L ${CENTER + 9} ${CENTER + 14} Z`, fill: "#fff", stroke: "#000", strokeWidth: "1.5" }) }),
|
|
285
|
+
/* @__PURE__ */ jsx5("g", { "data-testid": "altimeter-100", style: motionStyle(`rotate(${alt / 1e3 * 360}deg)`, duration), children: /* @__PURE__ */ jsx5("path", { d: `M ${CENTER - 5} ${CENTER + 30} L ${CENTER - 4} ${CENTER - 140} L ${CENTER} ${CENTER - 168} L ${CENTER + 4} ${CENTER - 140} L ${CENTER + 5} ${CENTER + 30} Z`, fill: "#fff", stroke: "#000", strokeWidth: "1.5" }) }),
|
|
286
|
+
/* @__PURE__ */ jsx5(Hub, {})
|
|
287
|
+
] });
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// src/components/VerticalSpeed.tsx
|
|
291
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
292
|
+
var HALF_SWEEP = 170;
|
|
293
|
+
var formatThousands = (v) => {
|
|
294
|
+
const s = String(Math.abs(v) / 1e3);
|
|
295
|
+
return s.startsWith("0.") ? s.slice(1) : s;
|
|
296
|
+
};
|
|
297
|
+
function VerticalSpeed({ verticalSpeed = 0, max = 2e3, ...props }) {
|
|
298
|
+
const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;
|
|
299
|
+
const safeMax = Math.max(100, Math.abs(finite(max, 2e3)));
|
|
300
|
+
const vs = clamp(finite(verticalSpeed), -safeMax, safeMax);
|
|
301
|
+
const angle = (v) => -90 + v / safeMax * HALF_SWEEP;
|
|
302
|
+
const step = safeMax <= 2e3 ? 500 : 1e3;
|
|
303
|
+
const minor = step / 5;
|
|
304
|
+
return /* @__PURE__ */ jsxs6(InstrumentFrame, { ...props, label: `Vertical speed indicator: ${Math.round(vs)} feet per minute`, children: [
|
|
305
|
+
/* @__PURE__ */ jsx6("g", { stroke: "#fff", strokeLinecap: "round", children: range(-safeMax, safeMax, minor).map((v) => {
|
|
306
|
+
const major = Math.abs(v % step) < 1e-9;
|
|
307
|
+
return /* @__PURE__ */ jsx6("path", { d: tickPath(178, major ? 150 : 164, angle(v)), strokeWidth: major ? 4 : 2 }, v);
|
|
308
|
+
}) }),
|
|
309
|
+
range(-safeMax, safeMax, step).map((v) => {
|
|
310
|
+
const [x, y] = polar(124, angle(v));
|
|
311
|
+
return /* @__PURE__ */ jsx6("text", { x, y, fill: "#fff", fontSize: "28", fontWeight: "bold", textAnchor: "middle", dominantBaseline: "central", children: v === 0 ? "0" : formatThousands(v) }, v);
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ jsx6("text", { x: CENTER - 80, y: CENTER - 40, fill: "#ccc", fontSize: "18", textAnchor: "middle", children: "UP" }),
|
|
314
|
+
/* @__PURE__ */ jsx6("text", { x: CENTER - 80, y: CENTER + 50, fill: "#ccc", fontSize: "18", textAnchor: "middle", children: "DN" }),
|
|
315
|
+
/* @__PURE__ */ jsx6("text", { x: CENTER + 10, y: CENTER - 75, fill: "#ccc", fontSize: "13", textAnchor: "middle", children: "VERTICAL SPEED" }),
|
|
316
|
+
/* @__PURE__ */ jsx6("text", { x: CENTER + 10, y: CENTER + 82, fill: "#ccc", fontSize: "12", textAnchor: "middle", children: "1000 FT PER MIN" }),
|
|
317
|
+
/* @__PURE__ */ jsx6("g", { "data-testid": "vsi-needle", style: motionStyle(`rotate(${angle(vs)}deg)`, duration), children: /* @__PURE__ */ jsx6("path", { d: `M ${CENTER - 5} ${CENTER + 30} L ${CENTER - 4} ${CENTER - 140} L ${CENTER} ${CENTER - 165} L ${CENTER + 4} ${CENTER - 140} L ${CENTER + 5} ${CENTER + 30} Z`, fill: "#fff" }) }),
|
|
318
|
+
/* @__PURE__ */ jsx6(Hub, {})
|
|
319
|
+
] });
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// src/components/TurnCoordinator.tsx
|
|
323
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
324
|
+
var STANDARD_RATE = 3;
|
|
325
|
+
var STANDARD_RATE_TILT = 20;
|
|
326
|
+
var MAX_TILT = 35;
|
|
327
|
+
var TUBE_CY = 40;
|
|
328
|
+
var TUBE_R = 240;
|
|
329
|
+
var TUBE_SPAN = 16;
|
|
330
|
+
var BALL_TRAVEL = 13;
|
|
331
|
+
function tubePoint(deg) {
|
|
332
|
+
const a = deg * Math.PI / 180;
|
|
333
|
+
return [CENTER + TUBE_R * Math.sin(a), TUBE_CY + TUBE_R * Math.cos(a)];
|
|
334
|
+
}
|
|
335
|
+
function TurnCoordinator({ turnRate = 0, slip = 0, ...props }) {
|
|
336
|
+
const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;
|
|
337
|
+
const rate = finite(turnRate);
|
|
338
|
+
const ball = clamp(finite(slip), -1, 1);
|
|
339
|
+
const tilt = clamp(rate / STANDARD_RATE * STANDARD_RATE_TILT, -MAX_TILT, MAX_TILT);
|
|
340
|
+
const [tx1, ty1] = tubePoint(-TUBE_SPAN);
|
|
341
|
+
const [tx2, ty2] = tubePoint(TUBE_SPAN);
|
|
342
|
+
const wireOffset = 3.6;
|
|
343
|
+
return /* @__PURE__ */ jsxs7(InstrumentFrame, { ...props, label: `Turn coordinator: ${rate.toFixed(1)}\xB0 per second, slip ${ball.toFixed(2)}`, children: [
|
|
344
|
+
/* @__PURE__ */ jsx7("g", { stroke: "#fff", strokeWidth: "6", strokeLinecap: "round", children: [-90 - STANDARD_RATE_TILT, -90, 90, 90 + STANDARD_RATE_TILT].map((a) => /* @__PURE__ */ jsx7("path", { d: tickPath(178, 150, a) }, a)) }),
|
|
345
|
+
/* @__PURE__ */ jsx7("text", { ...xy(polar(128, -90 - STANDARD_RATE_TILT - 8)), fill: "#fff", fontSize: "26", fontWeight: "bold", textAnchor: "middle", dominantBaseline: "central", children: "L" }),
|
|
346
|
+
/* @__PURE__ */ jsx7("text", { ...xy(polar(128, 90 + STANDARD_RATE_TILT + 8)), fill: "#fff", fontSize: "26", fontWeight: "bold", textAnchor: "middle", dominantBaseline: "central", children: "R" }),
|
|
347
|
+
/* @__PURE__ */ jsx7("text", { x: CENTER, y: CENTER - 92, fill: "#ccc", fontSize: "16", textAnchor: "middle", children: "TURN COORDINATOR" }),
|
|
348
|
+
/* @__PURE__ */ jsx7("text", { x: CENTER, y: CENTER + 130, fill: "#ccc", fontSize: "16", textAnchor: "middle", children: "2 MIN" }),
|
|
349
|
+
/* @__PURE__ */ jsx7("text", { x: CENTER, y: CENTER + 150, fill: "#999", fontSize: "10", textAnchor: "middle", children: "NO PITCH INFORMATION" }),
|
|
350
|
+
/* @__PURE__ */ jsx7(
|
|
351
|
+
"path",
|
|
352
|
+
{
|
|
353
|
+
d: `M ${tx1} ${ty1} A ${TUBE_R} ${TUBE_R} 0 0 0 ${tx2} ${ty2}`,
|
|
354
|
+
fill: "none",
|
|
355
|
+
stroke: "#dcdcdc",
|
|
356
|
+
strokeWidth: "30",
|
|
357
|
+
strokeLinecap: "round"
|
|
358
|
+
}
|
|
359
|
+
),
|
|
360
|
+
/* @__PURE__ */ jsx7("g", { stroke: "#111", strokeWidth: "3", children: [-wireOffset, wireOffset].map((d) => {
|
|
361
|
+
const [x1, y1] = tubePoint(d);
|
|
362
|
+
return /* @__PURE__ */ jsx7("path", { d: `M ${x1} ${y1 - 15} V ${y1 + 15}` }, d);
|
|
363
|
+
}) }),
|
|
364
|
+
/* @__PURE__ */ jsx7("g", { "data-testid": "turn-ball", style: motionStyle(`rotate(${-ball * BALL_TRAVEL}deg)`, duration, CENTER, TUBE_CY), children: /* @__PURE__ */ jsx7("circle", { cx: CENTER, cy: TUBE_CY + TUBE_R, r: "13", fill: "#111" }) }),
|
|
365
|
+
/* @__PURE__ */ jsxs7("g", { "data-testid": "turn-aircraft", style: motionStyle(`rotate(${tilt}deg)`, duration), children: [
|
|
366
|
+
/* @__PURE__ */ jsx7("path", { d: `M ${CENTER - 140} ${CENTER} H ${CENTER + 140}`, stroke: "#fff", strokeWidth: "10", strokeLinecap: "round" }),
|
|
367
|
+
/* @__PURE__ */ jsx7("path", { d: `M ${CENTER} ${CENTER} V ${CENTER - 40}`, stroke: "#fff", strokeWidth: "6", strokeLinecap: "round" }),
|
|
368
|
+
/* @__PURE__ */ jsx7("path", { d: `M ${CENTER - 30} ${CENTER - 8} H ${CENTER + 30}`, stroke: "#fff", strokeWidth: "6", strokeLinecap: "round" }),
|
|
369
|
+
/* @__PURE__ */ jsx7("circle", { cx: CENTER, cy: CENTER, r: "18", fill: "#fff" })
|
|
370
|
+
] }),
|
|
371
|
+
/* @__PURE__ */ jsx7(Hub, { r: 8 })
|
|
372
|
+
] });
|
|
373
|
+
}
|
|
374
|
+
var xy = ([x, y]) => ({ x, y });
|
|
375
|
+
export {
|
|
376
|
+
Airspeed,
|
|
377
|
+
Altimeter,
|
|
378
|
+
AttitudeIndicator,
|
|
379
|
+
HeadingIndicator,
|
|
380
|
+
TurnCoordinator,
|
|
381
|
+
VerticalSpeed
|
|
382
|
+
};
|
|
383
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils.ts","../src/components/Instrument.tsx","../src/components/AttitudeIndicator.tsx","../src/components/HeadingIndicator.tsx","../src/components/Airspeed.tsx","../src/components/Altimeter.tsx","../src/components/VerticalSpeed.tsx","../src/components/TurnCoordinator.tsx"],"sourcesContent":["import { useEffect, useId, useRef, type CSSProperties } from 'react';\n\n/** All instruments are drawn in a 400×400 viewBox centred on (200, 200). */\nexport const CENTER = 200;\nexport const DEFAULT_ANIMATION_MS = 300;\n\nexport const clamp = (value: number, min: number, max: number): number =>\n Math.min(max, Math.max(min, value));\n\n/** Returns `value` if it is a finite number, otherwise `fallback` (guards against NaN/undefined/Infinity). */\nexport const finite = (value: number | undefined | null, fallback = 0): number =>\n typeof value === 'number' && Number.isFinite(value) ? value : fallback;\n\nconst round = (n: number): number => Math.round(n * 100) / 100;\n\n/** Point at radius `r` and angle `deg`, measured clockwise from 12 o'clock. */\nexport function polar(r: number, deg: number, cx = CENTER, cy = CENTER): [number, number] {\n const a = (deg * Math.PI) / 180;\n return [round(cx + r * Math.sin(a)), round(cy - r * Math.cos(a))];\n}\n\n/** SVG path for an arc of radius `r` going clockwise from `startDeg` to `endDeg`. */\nexport function arcPath(r: number, startDeg: number, endDeg: number): string {\n const [x1, y1] = polar(r, startDeg);\n const [x2, y2] = polar(r, endDeg);\n const largeArc = Math.abs(endDeg - startDeg) > 180 ? 1 : 0;\n const sweep = endDeg >= startDeg ? 1 : 0;\n return `M ${x1} ${y1} A ${r} ${r} 0 ${largeArc} ${sweep} ${x2} ${y2}`;\n}\n\n/** Radial tick line between radii `r1` and `r2` at angle `deg`. */\nexport function tickPath(r1: number, r2: number, deg: number): string {\n const [x1, y1] = polar(r1, deg);\n const [x2, y2] = polar(r2, deg);\n return `M ${x1} ${y1} L ${x2} ${y2}`;\n}\n\n/** Inclusive numeric range. */\nexport function range(start: number, end: number, step: number): number[] {\n const out: number[] = [];\n for (let v = start; v <= end + 1e-9; v += step) out.push(round(v));\n return out;\n}\n\n/** CSS transform style for an animated group; transform-origin is in viewBox units. */\nexport function motionStyle(\n transform: string,\n durationMs: number,\n originX = CENTER,\n originY = CENTER,\n): CSSProperties {\n return {\n transform,\n transformOrigin: `${originX}px ${originY}px`,\n transformBox: 'view-box',\n transition: durationMs > 0 ? `transform ${durationMs}ms ease-out` : undefined,\n };\n}\n\n/**\n * Makes a cyclic angle continuous so CSS transitions take the shortest path.\n * Without this, going from 359° to 1° animates the long way round (358° backwards).\n */\nexport function useContinuousAngle(angle: number): number {\n const previous = useRef<number | null>(null);\n let next = angle;\n if (previous.current !== null) {\n const delta = ((((angle - previous.current) % 360) + 540) % 360) - 180;\n next = previous.current + delta;\n }\n useEffect(() => {\n previous.current = next;\n });\n return next;\n}\n\n/** useId() output sanitised for use in `url(#id)` references (React ids contain `:` or `«»`). */\nexport function useSvgId(prefix: string): string {\n return `${prefix}-${useId().replace(/[^a-zA-Z0-9_-]/g, '')}`;\n}\n","import type { CSSProperties, ReactNode } from 'react';\nimport { CENTER, useSvgId } from '../utils';\n\n/** Props shared by every instrument. */\nexport interface InstrumentProps {\n /** Rendered width/height. Number = pixels, or any CSS length (e.g. `\"100%\"`). Default `200`. */\n size?: number | string;\n /** Draw the square mounting plate with screws behind the dial. Default `true`. */\n showBox?: boolean;\n /** Needle/card animation duration in ms. `0` disables animation. Default `300`. */\n animationDuration?: number;\n className?: string;\n style?: CSSProperties;\n /** Accessible label; defaults to the instrument name plus its current reading. */\n title?: string;\n}\n\ninterface FrameProps extends InstrumentProps {\n label: string;\n children: ReactNode;\n}\n\nconst SCREWS: Array<[number, number]> = [\n [32, 32],\n [368, 32],\n [32, 368],\n [368, 368],\n];\n\n/** Common SVG shell: mounting plate, bezel and dial face. */\nexport function InstrumentFrame({\n size = 200,\n showBox = true,\n className,\n style,\n title,\n label,\n children,\n}: FrameProps) {\n const titleId = useSvgId('fi-title');\n const bezelId = useSvgId('fi-bezel');\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 400 400\"\n width={size}\n height={size}\n role=\"img\"\n aria-labelledby={titleId}\n className={className}\n style={{ display: 'inline-block', userSelect: 'none', ...style }}\n fontFamily=\"'Helvetica Neue', Arial, sans-serif\"\n >\n <title id={titleId}>{title ?? label}</title>\n <defs>\n <linearGradient id={bezelId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0\" stopColor=\"#5a5a5a\" />\n <stop offset=\"1\" stopColor=\"#1a1a1a\" />\n </linearGradient>\n </defs>\n\n {showBox && (\n <g>\n <rect x=\"2\" y=\"2\" width=\"396\" height=\"396\" rx=\"36\" fill=\"#232323\" stroke=\"#0d0d0d\" strokeWidth=\"4\" />\n {SCREWS.map(([x, y]) => (\n <g key={`${x}-${y}`}>\n <circle cx={x} cy={y} r=\"12\" fill=\"#3a3a3a\" stroke=\"#111\" strokeWidth=\"2\" />\n <path d={`M ${x - 8} ${y + 3} L ${x + 8} ${y - 3}`} stroke=\"#111\" strokeWidth=\"3\" />\n </g>\n ))}\n </g>\n )}\n\n <circle cx={CENTER} cy={CENTER} r=\"196\" fill={`url(#${bezelId})`} />\n <circle cx={CENTER} cy={CENTER} r=\"182\" fill=\"#111\" stroke=\"#000\" strokeWidth=\"4\" />\n {children}\n </svg>\n );\n}\n\n/** Centre hub drawn on top of needles. */\nexport function Hub({ r = 14 }: { r?: number }) {\n return <circle cx={CENTER} cy={CENTER} r={r} fill=\"#2a2a2a\" stroke=\"#555\" strokeWidth=\"2\" />;\n}\n","import { CENTER, DEFAULT_ANIMATION_MS, clamp, finite, motionStyle, range, tickPath, useContinuousAngle, useSvgId } from '../utils';\nimport { InstrumentFrame, type InstrumentProps } from './Instrument';\n\nexport interface AttitudeIndicatorProps extends InstrumentProps {\n /** Bank angle in degrees. Positive = right wing down. */\n roll?: number;\n /** Pitch angle in degrees. Positive = nose up. Clamped to ±`pitchLimit`. */\n pitch?: number;\n /** Maximum displayed pitch in degrees. Default `40`. */\n pitchLimit?: number;\n}\n\nconst PX_PER_DEG = 4;\nconst FACE_R = 180;\nconst ROLL_MARKS: Array<[number, number]> = [\n [10, 12],\n [20, 12],\n [30, 22],\n [45, 12],\n [60, 22],\n];\n\nexport function AttitudeIndicator({ roll = 0, pitch = 0, pitchLimit = 40, ...props }: AttitudeIndicatorProps) {\n const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;\n const limit = Math.abs(finite(pitchLimit, 40));\n const safeRoll = finite(roll);\n const safePitch = clamp(finite(pitch), -limit, limit);\n const displayRoll = useContinuousAngle(safeRoll);\n const clipId = useSvgId('fi-ai-clip');\n\n const ladder = range(-90, 90, 5).filter((d) => d !== 0);\n\n return (\n <InstrumentFrame\n {...props}\n label={`Attitude indicator: pitch ${Math.round(safePitch)}°, roll ${Math.round(safeRoll)}°`}\n >\n <defs>\n <clipPath id={clipId}>\n <circle cx={CENTER} cy={CENTER} r={FACE_R} />\n </clipPath>\n </defs>\n\n <g clipPath={`url(#${clipId})`}>\n {/* Horizon ball: rotates with roll, translates with pitch (in the rotated frame). */}\n <g\n data-testid=\"attitude-horizon\"\n style={motionStyle(`rotate(${-displayRoll}deg) translate(0px, ${safePitch * PX_PER_DEG}px)`, duration)}\n >\n <rect x={-400} y={-600} width={1200} height={800} fill=\"#3b8fd6\" />\n <rect x={-400} y={CENTER} width={1200} height={800} fill=\"#8a5a2b\" />\n <line x1={-400} y1={CENTER} x2={800} y2={CENTER} stroke=\"#fff\" strokeWidth=\"3\" />\n {ladder.map((d) => {\n const y = CENTER - d * PX_PER_DEG;\n const major = d % 10 === 0;\n const half = major ? 50 : 22;\n return (\n <g key={d}>\n <line x1={CENTER - half} y1={y} x2={CENTER + half} y2={y} stroke=\"#fff\" strokeWidth={major ? 3 : 2} />\n {major && (\n <>\n <text x={CENTER - half - 8} y={y + 6} fill=\"#fff\" fontSize=\"17\" fontWeight=\"bold\" textAnchor=\"end\">\n {Math.abs(d)}\n </text>\n <text x={CENTER + half + 8} y={y + 6} fill=\"#fff\" fontSize=\"17\" fontWeight=\"bold\">\n {Math.abs(d)}\n </text>\n </>\n )}\n </g>\n );\n })}\n </g>\n\n {/* Bank scale fixed to the case. */}\n <g stroke=\"#fff\" strokeWidth=\"4\" strokeLinecap=\"round\">\n {ROLL_MARKS.flatMap(([deg, len]) => [\n <path key={`l${deg}`} d={tickPath(FACE_R - 2, FACE_R - 2 - len, -deg)} />,\n <path key={`r${deg}`} d={tickPath(FACE_R - 2, FACE_R - 2 - len, deg)} />,\n ])}\n </g>\n <path d={`M ${CENTER} ${CENTER - 158} l -10 -18 h 20 z`} fill=\"#fff\" />\n\n {/* Sky pointer: rolls with the horizon. */}\n <g data-testid=\"attitude-roll-pointer\" style={motionStyle(`rotate(${-displayRoll}deg)`, duration)}>\n <path d={`M ${CENTER} ${CENTER - 156} l -10 18 h 20 z`} fill=\"#ffb000\" />\n </g>\n </g>\n\n {/* Fixed miniature aircraft. */}\n <g fill=\"none\" stroke=\"#ffb000\" strokeWidth=\"8\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d={`M ${CENTER - 110} ${CENTER} H ${CENTER - 40} l 14 16`} />\n <path d={`M ${CENTER + 110} ${CENTER} H ${CENTER + 40} l -14 16`} />\n </g>\n <circle cx={CENTER} cy={CENTER} r=\"6\" fill=\"#ffb000\" />\n </InstrumentFrame>\n );\n}\n","import { CENTER, DEFAULT_ANIMATION_MS, finite, motionStyle, polar, range, tickPath, useContinuousAngle } from '../utils';\nimport { InstrumentFrame, type InstrumentProps } from './Instrument';\n\nexport interface HeadingIndicatorProps extends InstrumentProps {\n /** Magnetic/true heading in degrees (any value; normalised to 0–359). */\n heading?: number;\n}\n\nconst CARDINALS: Record<number, string> = { 0: 'N', 90: 'E', 180: 'S', 270: 'W' };\n\nexport function HeadingIndicator({ heading = 0, ...props }: HeadingIndicatorProps) {\n const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;\n const safeHeading = finite(heading);\n const normalised = ((Math.round(safeHeading) % 360) + 360) % 360;\n const displayHeading = useContinuousAngle(safeHeading);\n\n return (\n <InstrumentFrame {...props} label={`Heading indicator: ${String(normalised).padStart(3, '0')}°`}>\n {/* Rotating compass card. */}\n <g data-testid=\"heading-card\" style={motionStyle(`rotate(${-displayHeading}deg)`, duration)}>\n <g stroke=\"#fff\" strokeLinecap=\"round\">\n {range(0, 355, 5).map((a) => (\n <path key={a} d={tickPath(176, a % 10 === 0 ? 152 : 164, a)} strokeWidth={a % 10 === 0 ? 3 : 2} />\n ))}\n </g>\n {range(0, 330, 30).map((a) => {\n const [x, y] = polar(132, a);\n const label = CARDINALS[a] ?? String(a / 10);\n return (\n <text\n key={a}\n x={x}\n y={y}\n transform={`rotate(${a} ${x} ${y})`}\n fill={a % 90 === 0 ? '#ffb000' : '#fff'}\n fontSize={a % 90 === 0 ? 30 : 26}\n fontWeight=\"bold\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n >\n {label}\n </text>\n );\n })}\n </g>\n\n {/* Fixed 45° reference marks and lubber line. */}\n <g stroke=\"#ffb000\" strokeWidth=\"4\" strokeLinecap=\"round\">\n {[45, 135, 225, 315].map((a) => (\n <path key={a} d={tickPath(192, 178, a)} />\n ))}\n </g>\n <path d={`M ${CENTER} ${CENTER - 150} l -9 -26 h 18 z`} fill=\"#ffb000\" />\n\n {/* Fixed aircraft silhouette. */}\n <path\n d=\"M200 135 c6 0 8 8 8 16 v30 l52 18 v12 l-52 -8 v34 l18 12 v10 l-26 -6 l-26 6 v-10 l18 -12 v-34 l-52 8 v-12 l52 -18 v-30 c0 -8 2 -16 8 -16 z\"\n fill=\"#ffb000\"\n stroke=\"#000\"\n strokeWidth=\"2\"\n />\n </InstrumentFrame>\n );\n}\n","import { CENTER, DEFAULT_ANIMATION_MS, arcPath, clamp, finite, motionStyle, polar, range, tickPath } from '../utils';\nimport { Hub, InstrumentFrame, type InstrumentProps } from './Instrument';\n\nexport interface AirspeedArcs {\n /** Flap operating range [Vs0, Vfe]. */\n white?: [number, number];\n /** Normal operating range [Vs1, Vno]. */\n green?: [number, number];\n /** Caution range [Vno, Vne]. */\n yellow?: [number, number];\n /** Never-exceed speed (Vne). */\n red?: number;\n}\n\nexport interface AirspeedProps extends InstrumentProps {\n /** Indicated airspeed in knots. Clamped to 0…`max`. */\n speed?: number;\n /** Top of the scale in knots. Default `200`. */\n max?: number;\n /** Coloured V-speed arcs. Defaults roughly match a Cessna 172. Pass `{}` to hide. */\n arcs?: AirspeedArcs;\n /** Unit text printed on the dial. Default `\"KNOTS\"`. */\n unit?: string;\n}\n\nconst SWEEP = 320;\nconst DEFAULT_ARCS: AirspeedArcs = { white: [33, 85], green: [44, 129], yellow: [129, 163], red: 163 };\n\nfunction labelStep(max: number): number {\n const raw = max / 10;\n const steps = [5, 10, 20, 25, 50, 100, 200, 250, 500];\n return steps.find((s) => s >= raw) ?? Math.ceil(raw / 100) * 100;\n}\n\nexport function Airspeed({ speed = 0, max = 200, arcs = DEFAULT_ARCS, unit = 'KNOTS', ...props }: AirspeedProps) {\n const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;\n const safeMax = Math.max(1, finite(max, 200));\n const safeSpeed = clamp(finite(speed), 0, safeMax);\n const angle = (v: number) => (clamp(v, 0, safeMax) / safeMax) * SWEEP;\n\n const step = labelStep(safeMax);\n const minor = step / (step % 4 === 0 ? 4 : 5);\n\n return (\n <InstrumentFrame {...props} label={`Airspeed indicator: ${Math.round(safeSpeed)} ${unit.toLowerCase()}`}>\n <g fill=\"none\">\n {arcs.white && <path d={arcPath(150, angle(arcs.white[0]), angle(arcs.white[1]))} stroke=\"#fff\" strokeWidth=\"8\" />}\n {arcs.green && <path d={arcPath(166, angle(arcs.green[0]), angle(arcs.green[1]))} stroke=\"#2fb54a\" strokeWidth=\"12\" />}\n {arcs.yellow && <path d={arcPath(166, angle(arcs.yellow[0]), angle(arcs.yellow[1]))} stroke=\"#f2c200\" strokeWidth=\"12\" />}\n {arcs.red !== undefined && <path d={tickPath(178, 146, angle(arcs.red))} stroke=\"#e02020\" strokeWidth=\"6\" />}\n </g>\n\n <g stroke=\"#fff\" strokeLinecap=\"round\">\n {range(0, safeMax, minor).map((v) => {\n const major = Math.abs(v % step) < 1e-9;\n return <path key={v} d={tickPath(178, major ? 150 : 162, angle(v))} strokeWidth={major ? 3 : 2} />;\n })}\n </g>\n {range(0, safeMax, step).map((v) => {\n const [x, y] = polar(124, angle(v));\n return (\n <text key={v} x={x} y={y} fill=\"#fff\" fontSize=\"24\" fontWeight=\"bold\" textAnchor=\"middle\" dominantBaseline=\"central\">\n {v}\n </text>\n );\n })}\n\n <text x={CENTER} y={CENTER - 42} fill=\"#ccc\" fontSize=\"18\" textAnchor=\"middle\">AIRSPEED</text>\n <text x={CENTER} y={CENTER + 56} fill=\"#ccc\" fontSize=\"16\" textAnchor=\"middle\">{unit}</text>\n\n <g data-testid=\"airspeed-needle\" style={motionStyle(`rotate(${angle(safeSpeed)}deg)`, duration)}>\n <path d={`M ${CENTER - 5} ${CENTER + 30} L ${CENTER - 4} ${CENTER - 140} L ${CENTER} ${CENTER - 165} L ${CENTER + 4} ${CENTER - 140} L ${CENTER + 5} ${CENTER + 30} Z`} fill=\"#fff\" />\n </g>\n <Hub />\n </InstrumentFrame>\n );\n}\n","import { CENTER, DEFAULT_ANIMATION_MS, finite, motionStyle, polar, range, tickPath } from '../utils';\nimport { Hub, InstrumentFrame, type InstrumentProps } from './Instrument';\n\nexport type PressureUnit = 'hPa' | 'inHg';\n\nexport interface AltimeterProps extends InstrumentProps {\n /** Indicated altitude in feet (negative values allowed). */\n altitude?: number;\n /** Altimeter setting shown in the Kollsman window. Defaults to standard pressure in `pressureUnit`. */\n pressure?: number;\n /** Unit of `pressure`. Default `\"hPa\"`. */\n pressureUnit?: PressureUnit;\n}\n\nconst STANDARD: Record<PressureUnit, number> = { hPa: 1013, inHg: 29.92 };\n\nexport function Altimeter({ altitude = 0, pressure, pressureUnit = 'hPa', ...props }: AltimeterProps) {\n const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;\n const alt = finite(altitude);\n const qnh = finite(pressure, STANDARD[pressureUnit]);\n const qnhText = pressureUnit === 'inHg' ? qnh.toFixed(2) : Math.round(qnh).toString();\n\n return (\n <InstrumentFrame {...props} label={`Altimeter: ${Math.round(alt)} feet, ${qnhText} ${pressureUnit}`}>\n <g stroke=\"#fff\" strokeLinecap=\"round\">\n {range(0, 49, 1).map((i) => (\n <path key={i} d={tickPath(178, i % 5 === 0 ? 150 : 164, i * 7.2)} strokeWidth={i % 5 === 0 ? 4 : 2} />\n ))}\n </g>\n {range(0, 9, 1).map((n) => {\n const [x, y] = polar(126, n * 36);\n return (\n <text key={n} x={x} y={y} fill=\"#fff\" fontSize=\"32\" fontWeight=\"bold\" textAnchor=\"middle\" dominantBaseline=\"central\">\n {n}\n </text>\n );\n })}\n\n <text x={CENTER} y={CENTER - 58} fill=\"#ccc\" fontSize=\"16\" textAnchor=\"middle\">ALT</text>\n <text x={CENTER} y={CENTER - 40} fill=\"#ccc\" fontSize=\"12\" textAnchor=\"middle\">100 FEET</text>\n\n {/* Kollsman window */}\n <rect x={CENTER + 30} y={CENTER - 16} width=\"74\" height=\"32\" rx=\"4\" fill=\"#000\" stroke=\"#666\" strokeWidth=\"2\" />\n <text data-testid=\"altimeter-pressure\" x={CENTER + 67} y={CENTER + 1} fill=\"#fff\" fontSize=\"20\" fontFamily=\"monospace\" textAnchor=\"middle\" dominantBaseline=\"central\">\n {qnhText}\n </text>\n <text x={CENTER + 67} y={CENTER + 30} fill=\"#ccc\" fontSize=\"12\" textAnchor=\"middle\">{pressureUnit}</text>\n\n {/* 10,000 ft pointer */}\n <g data-testid=\"altimeter-10000\" style={motionStyle(`rotate(${(alt / 100000) * 360}deg)`, duration)}>\n <path d={`M ${CENTER} ${CENTER} L ${CENTER} ${CENTER - 150}`} stroke=\"#fff\" strokeWidth=\"3\" />\n <path d={`M ${CENTER} ${CENTER - 178} l -10 22 h 20 z`} fill=\"#fff\" />\n </g>\n {/* 1,000 ft hand */}\n <g data-testid=\"altimeter-1000\" style={motionStyle(`rotate(${(alt / 10000) * 360}deg)`, duration)}>\n <path d={`M ${CENTER - 9} ${CENTER + 14} L ${CENTER - 12} ${CENTER - 70} L ${CENTER} ${CENTER - 100} L ${CENTER + 12} ${CENTER - 70} L ${CENTER + 9} ${CENTER + 14} Z`} fill=\"#fff\" stroke=\"#000\" strokeWidth=\"1.5\" />\n </g>\n {/* 100 ft hand */}\n <g data-testid=\"altimeter-100\" style={motionStyle(`rotate(${(alt / 1000) * 360}deg)`, duration)}>\n <path d={`M ${CENTER - 5} ${CENTER + 30} L ${CENTER - 4} ${CENTER - 140} L ${CENTER} ${CENTER - 168} L ${CENTER + 4} ${CENTER - 140} L ${CENTER + 5} ${CENTER + 30} Z`} fill=\"#fff\" stroke=\"#000\" strokeWidth=\"1.5\" />\n </g>\n <Hub />\n </InstrumentFrame>\n );\n}\n","import { CENTER, DEFAULT_ANIMATION_MS, clamp, finite, motionStyle, polar, range, tickPath } from '../utils';\nimport { Hub, InstrumentFrame, type InstrumentProps } from './Instrument';\n\nexport interface VerticalSpeedProps extends InstrumentProps {\n /** Vertical speed in feet per minute. Positive = climb. Clamped to ±`max`. */\n verticalSpeed?: number;\n /** Full-scale value in ft/min. Default `2000`. */\n max?: number;\n}\n\n/** Degrees of needle travel either side of zero (zero is at 9 o'clock). */\nconst HALF_SWEEP = 170;\n\nconst formatThousands = (v: number): string => {\n const s = String(Math.abs(v) / 1000);\n return s.startsWith('0.') ? s.slice(1) : s;\n};\n\nexport function VerticalSpeed({ verticalSpeed = 0, max = 2000, ...props }: VerticalSpeedProps) {\n const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;\n const safeMax = Math.max(100, Math.abs(finite(max, 2000)));\n const vs = clamp(finite(verticalSpeed), -safeMax, safeMax);\n const angle = (v: number) => -90 + (v / safeMax) * HALF_SWEEP;\n\n const step = safeMax <= 2000 ? 500 : 1000;\n const minor = step / 5;\n\n return (\n <InstrumentFrame {...props} label={`Vertical speed indicator: ${Math.round(vs)} feet per minute`}>\n <g stroke=\"#fff\" strokeLinecap=\"round\">\n {range(-safeMax, safeMax, minor).map((v) => {\n const major = Math.abs(v % step) < 1e-9;\n return <path key={v} d={tickPath(178, major ? 150 : 164, angle(v))} strokeWidth={major ? 4 : 2} />;\n })}\n </g>\n {range(-safeMax, safeMax, step).map((v) => {\n const [x, y] = polar(124, angle(v));\n return (\n <text key={v} x={x} y={y} fill=\"#fff\" fontSize=\"28\" fontWeight=\"bold\" textAnchor=\"middle\" dominantBaseline=\"central\">\n {v === 0 ? '0' : formatThousands(v)}\n </text>\n );\n })}\n\n <text x={CENTER - 80} y={CENTER - 40} fill=\"#ccc\" fontSize=\"18\" textAnchor=\"middle\">UP</text>\n <text x={CENTER - 80} y={CENTER + 50} fill=\"#ccc\" fontSize=\"18\" textAnchor=\"middle\">DN</text>\n <text x={CENTER + 10} y={CENTER - 75} fill=\"#ccc\" fontSize=\"13\" textAnchor=\"middle\">VERTICAL SPEED</text>\n <text x={CENTER + 10} y={CENTER + 82} fill=\"#ccc\" fontSize=\"12\" textAnchor=\"middle\">1000 FT PER MIN</text>\n\n <g data-testid=\"vsi-needle\" style={motionStyle(`rotate(${angle(vs)}deg)`, duration)}>\n <path d={`M ${CENTER - 5} ${CENTER + 30} L ${CENTER - 4} ${CENTER - 140} L ${CENTER} ${CENTER - 165} L ${CENTER + 4} ${CENTER - 140} L ${CENTER + 5} ${CENTER + 30} Z`} fill=\"#fff\" />\n </g>\n <Hub />\n </InstrumentFrame>\n );\n}\n","import { CENTER, DEFAULT_ANIMATION_MS, clamp, finite, motionStyle, polar, tickPath } from '../utils';\nimport { Hub, InstrumentFrame, type InstrumentProps } from './Instrument';\n\nexport interface TurnCoordinatorProps extends InstrumentProps {\n /** Rate of turn in degrees per second. Positive = right. 3°/s is a standard-rate (2 minute) turn. */\n turnRate?: number;\n /** Inclinometer ball deflection from -1 (full left) to 1 (full right). */\n slip?: number;\n}\n\nconst STANDARD_RATE = 3;\n/** Symbol bank (degrees) that lines the wings up with the standard-rate marks. */\nconst STANDARD_RATE_TILT = 20;\nconst MAX_TILT = 35;\n\n/** The inclinometer tube is an arc of a circle centred above the dial. */\nconst TUBE_CY = 40;\nconst TUBE_R = 240;\nconst TUBE_SPAN = 16;\nconst BALL_TRAVEL = 13;\n\nfunction tubePoint(deg: number): [number, number] {\n const a = (deg * Math.PI) / 180;\n return [CENTER + TUBE_R * Math.sin(a), TUBE_CY + TUBE_R * Math.cos(a)];\n}\n\nexport function TurnCoordinator({ turnRate = 0, slip = 0, ...props }: TurnCoordinatorProps) {\n const duration = props.animationDuration ?? DEFAULT_ANIMATION_MS;\n const rate = finite(turnRate);\n const ball = clamp(finite(slip), -1, 1);\n const tilt = clamp((rate / STANDARD_RATE) * STANDARD_RATE_TILT, -MAX_TILT, MAX_TILT);\n\n const [tx1, ty1] = tubePoint(-TUBE_SPAN);\n const [tx2, ty2] = tubePoint(TUBE_SPAN);\n const wireOffset = 3.6;\n\n return (\n <InstrumentFrame {...props} label={`Turn coordinator: ${rate.toFixed(1)}° per second, slip ${ball.toFixed(2)}`}>\n {/* Wings-level and standard-rate reference marks. */}\n <g stroke=\"#fff\" strokeWidth=\"6\" strokeLinecap=\"round\">\n {[-90 - STANDARD_RATE_TILT, -90, 90, 90 + STANDARD_RATE_TILT].map((a) => (\n <path key={a} d={tickPath(178, 150, a)} />\n ))}\n </g>\n <text {...xy(polar(128, -90 - STANDARD_RATE_TILT - 8))} fill=\"#fff\" fontSize=\"26\" fontWeight=\"bold\" textAnchor=\"middle\" dominantBaseline=\"central\">L</text>\n <text {...xy(polar(128, 90 + STANDARD_RATE_TILT + 8))} fill=\"#fff\" fontSize=\"26\" fontWeight=\"bold\" textAnchor=\"middle\" dominantBaseline=\"central\">R</text>\n <text x={CENTER} y={CENTER - 92} fill=\"#ccc\" fontSize=\"16\" textAnchor=\"middle\">TURN COORDINATOR</text>\n <text x={CENTER} y={CENTER + 130} fill=\"#ccc\" fontSize=\"16\" textAnchor=\"middle\">2 MIN</text>\n <text x={CENTER} y={CENTER + 150} fill=\"#999\" fontSize=\"10\" textAnchor=\"middle\">NO PITCH INFORMATION</text>\n\n {/* Inclinometer */}\n <path\n d={`M ${tx1} ${ty1} A ${TUBE_R} ${TUBE_R} 0 0 0 ${tx2} ${ty2}`}\n fill=\"none\"\n stroke=\"#dcdcdc\"\n strokeWidth=\"30\"\n strokeLinecap=\"round\"\n />\n <g stroke=\"#111\" strokeWidth=\"3\">\n {[-wireOffset, wireOffset].map((d) => {\n const [x1, y1] = tubePoint(d);\n return <path key={d} d={`M ${x1} ${y1 - 15} V ${y1 + 15}`} />;\n })}\n </g>\n <g data-testid=\"turn-ball\" style={motionStyle(`rotate(${-ball * BALL_TRAVEL}deg)`, duration, CENTER, TUBE_CY)}>\n <circle cx={CENTER} cy={TUBE_CY + TUBE_R} r=\"13\" fill=\"#111\" />\n </g>\n\n {/* Miniature aircraft, rear view. */}\n <g data-testid=\"turn-aircraft\" style={motionStyle(`rotate(${tilt}deg)`, duration)}>\n <path d={`M ${CENTER - 140} ${CENTER} H ${CENTER + 140}`} stroke=\"#fff\" strokeWidth=\"10\" strokeLinecap=\"round\" />\n <path d={`M ${CENTER} ${CENTER} V ${CENTER - 40}`} stroke=\"#fff\" strokeWidth=\"6\" strokeLinecap=\"round\" />\n <path d={`M ${CENTER - 30} ${CENTER - 8} H ${CENTER + 30}`} stroke=\"#fff\" strokeWidth=\"6\" strokeLinecap=\"round\" />\n <circle cx={CENTER} cy={CENTER} r=\"18\" fill=\"#fff\" />\n </g>\n <Hub r={8} />\n </InstrumentFrame>\n );\n}\n\nconst xy = ([x, y]: [number, number]) => ({ x, y });\n"],"mappings":";;;AAAA,SAAS,WAAW,OAAO,cAAkC;AAGtD,IAAM,SAAS;AACf,IAAM,uBAAuB;AAE7B,IAAM,QAAQ,CAAC,OAAe,KAAa,QAChD,KAAK,I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,MAAM,MAAM,SAAS,EAAE,IAAI,QAAO,QAAO,aAAY,KAAI,eAAc,SAAQ;AAAA,MACvG,gBAAAA,KAAC,UAAK,GAAG,KAAK,SAAS,EAAE,IAAI,SAAS,CAAC,MAAM,SAAS,EAAE,IAAI,QAAO,QAAO,aAAY,KAAI,eAAc,SAAQ;AAAA,MAChH,gBAAAA,KAAC,YAAO,IAAI,QAAQ,IAAI,QAAQ,GAAE,MAAK,MAAK,QAAO;AAAA,OACrD;AAAA,IACA,gBAAAA,KAAC,OAAI,GAAG,GAAG;AAAA,KACb;AAEJ;AAEA,IAAM,KAAK,CAAC,CAAC,GAAG,CAAC,OAAyB,EAAE,GAAG,EAAE;","names":["jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,80 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flight-indicators",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Modern, dependency-free SVG flight instruments for React: attitude, heading, airspeed, altimeter, vertical speed and turn coordinator.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"flight",
|
|
8
|
+
"aviation",
|
|
9
|
+
"instruments",
|
|
10
|
+
"indicators",
|
|
11
|
+
"attitude",
|
|
12
|
+
"altimeter",
|
|
13
|
+
"airspeed",
|
|
14
|
+
"heading",
|
|
15
|
+
"variometer",
|
|
16
|
+
"turn-coordinator",
|
|
17
|
+
"svg",
|
|
18
|
+
"gauge"
|
|
19
|
+
],
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "./dist/index.cjs",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"import": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./dist/index.d.cts",
|
|
33
|
+
"default": "./dist/index.cjs"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"README.md",
|
|
41
|
+
"LICENSE"
|
|
42
|
+
],
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "vite",
|
|
49
|
+
"build": "tsup",
|
|
50
|
+
"typecheck": "tsc --noEmit",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"test:watch": "vitest",
|
|
53
|
+
"prepublishOnly": "npm run typecheck && npm run test && npm run build"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": ">=18",
|
|
57
|
+
"react-dom": ">=18"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@testing-library/react": "^16.3.3",
|
|
61
|
+
"@types/react": "^19.3.0",
|
|
62
|
+
"@types/react-dom": "^19.3.0",
|
|
63
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
64
|
+
"jsdom": "^30.1.1",
|
|
65
|
+
"react": "^19.3.0",
|
|
66
|
+
"react-dom": "^19.3.0",
|
|
67
|
+
"tsup": "^8.5.1",
|
|
68
|
+
"typescript": "^5.9.3",
|
|
69
|
+
"vite": "^8.3.2",
|
|
70
|
+
"vitest": "^5.0.3"
|
|
71
|
+
},
|
|
72
|
+
"repository": {
|
|
73
|
+
"type": "git",
|
|
74
|
+
"url": "git+https://github.com/fordnox/flight-indicators.git"
|
|
75
|
+
},
|
|
76
|
+
"homepage": "https://github.com/fordnox/flight-indicators#readme",
|
|
77
|
+
"bugs": {
|
|
78
|
+
"url": "https://github.com/fordnox/flight-indicators/issues"
|
|
79
|
+
}
|
|
80
|
+
}
|