drone-path 0.12.0 → 0.12.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/CHANGELOG.md +26 -0
- package/dist/config.js +14 -0
- package/dist/manual/cliref.js +2 -1
- package/dist/manual/markdown.js +6 -1
- package/dist/renderer/dom.js +12 -1
- package/dist/renderer/scene.js +25 -3
- package/dist/renderer/tilesources.js +14 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# drone-path
|
|
2
2
|
|
|
3
|
+
## 0.12.1
|
|
4
|
+
|
|
5
|
+
- **Fixed:** The Export video dialog handles every outcome cleanly: a
|
|
6
|
+
failed or canceled run returns to the form with the outcome sentence
|
|
7
|
+
as a notice, so retry stays one click away, and a canceled run always
|
|
8
|
+
reads "Export canceled; its unfinished file was removed." The export
|
|
9
|
+
summary now reports the media duration (frames at the frame rate)
|
|
10
|
+
instead of the encode wall time, which read as a wrong duration
|
|
11
|
+
between the media specs.
|
|
12
|
+
- **Fixed:** Exported frames carry the heading pill: the HDG readout
|
|
13
|
+
joins ALT and SPD in the top-left HUD column, toggled by the heading
|
|
14
|
+
readout setting, exactly as the Map appearance preview shows it. The
|
|
15
|
+
preview pills use the export's placement and stacking, and on-video
|
|
16
|
+
pills read HDG/ALT/SPD.
|
|
17
|
+
- **Fixed:** Selected controls keep their accent selection marker while
|
|
18
|
+
hovered: HUD chips, map style tiles, trail swatches and structure bar
|
|
19
|
+
segments no longer read unselected under the cursor. Disabled HUD
|
|
20
|
+
chips dim to the disabled look instead of the "off" look, and select
|
|
21
|
+
and text fields lighten their border on hover like number fields.
|
|
22
|
+
- **Fixed:** A failed "Reveal in folder" in the Export telemetry dialog
|
|
23
|
+
no longer leaves its error notice behind after a successful retry;
|
|
24
|
+
every reveal attempt clears the previous error first.
|
|
25
|
+
- **Fixed:** The PiP overlay's map strip shows the zoom level and
|
|
26
|
+
announces refused zoom steps, so the `+` and `-` hotkeys give
|
|
27
|
+
feedback in every layout instead of silently re-pinning the zoom.
|
|
28
|
+
|
|
3
29
|
## 0.12.0
|
|
4
30
|
|
|
5
31
|
- **New:** The flight map zooms in and out with a small `−`/`+` pill
|
package/dist/config.js
CHANGED
|
@@ -427,6 +427,20 @@ const LOOK_SETTINGS_KEYS = [
|
|
|
427
427
|
];
|
|
428
428
|
const ENCODE_SETTINGS_KEYS = ['codec', 'quality', 'preset'];
|
|
429
429
|
export const SETTINGS_KEYS = [...LOOK_SETTINGS_KEYS, ...ENCODE_SETTINGS_KEYS];
|
|
430
|
+
/** The look projection every consumer shares; hud is cloned so no caller can
|
|
431
|
+
leak chip state into another owner. */
|
|
432
|
+
export function appearanceOf(config) {
|
|
433
|
+
return {
|
|
434
|
+
style: config.style,
|
|
435
|
+
view: config.view,
|
|
436
|
+
zoom: config.zoom,
|
|
437
|
+
zoomOut: config.zoomOut,
|
|
438
|
+
hud: { ...config.hud },
|
|
439
|
+
introSec: config.introSec,
|
|
440
|
+
outroSec: config.outroSec,
|
|
441
|
+
trailColor: config.trailColor,
|
|
442
|
+
};
|
|
443
|
+
}
|
|
430
444
|
export function settingsPatchOf(config) {
|
|
431
445
|
return {
|
|
432
446
|
style: config.style,
|
package/dist/manual/cliref.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CONFIG_FILE_OPTION, CONFIG_OPTIONS, TELEMETRY_JSON_ALIAS, cliDefaultOf, } from '../config.js';
|
|
2
|
+
import { escapeAngleBrackets } from './markdown.js';
|
|
2
3
|
function defaultCell(key) {
|
|
3
4
|
const value = cliDefaultOf(key);
|
|
4
5
|
if (typeof value === 'boolean')
|
|
@@ -6,7 +7,7 @@ function defaultCell(key) {
|
|
|
6
7
|
return value === '' ? '—' : `\`${value}\``;
|
|
7
8
|
}
|
|
8
9
|
function describe(row) {
|
|
9
|
-
const help = row.cli.help
|
|
10
|
+
const help = escapeAngleBrackets(row.cli.help);
|
|
10
11
|
return row.cli.choices ? `${help} (choices: ${row.cli.choices.join(', ')})` : help;
|
|
11
12
|
}
|
|
12
13
|
export function generateCliReference() {
|
package/dist/manual/markdown.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Marked } from 'marked';
|
|
2
2
|
import { createSlugger } from './anchors.js';
|
|
3
3
|
import { isExternalTarget, parseImageRef, parsePageLink } from './links.js';
|
|
4
|
+
/** Angle brackets only — for help text that carries no entities (the CLI
|
|
5
|
+
reference renders these as literal angle brackets). */
|
|
6
|
+
export function escapeAngleBrackets(value) {
|
|
7
|
+
return value.replace(/</g, '<').replace(/>/g, '>');
|
|
8
|
+
}
|
|
4
9
|
function escapeHtml(value) {
|
|
5
|
-
return value.replace(/&/g, '&')
|
|
10
|
+
return escapeAngleBrackets(value.replace(/&/g, '&'));
|
|
6
11
|
}
|
|
7
12
|
function escapeAttr(value) {
|
|
8
13
|
return escapeHtml(value).replace(/"/g, '"');
|
package/dist/renderer/dom.js
CHANGED
|
@@ -64,7 +64,15 @@ function chipCss(at, theme, scale) {
|
|
|
64
64
|
font-size: 0.55em; font-weight: 700; letter-spacing: 1.2px;
|
|
65
65
|
color: ${theme.core}; opacity: 0.95;
|
|
66
66
|
}
|
|
67
|
-
${at} .chip .unit { font-weight: 500; opacity: 0.72; font-size: 0.68em; }
|
|
67
|
+
${at} .chip .unit { font-weight: 500; opacity: 0.72; font-size: 0.68em; }
|
|
68
|
+
${at} .chip .chip-arrow {
|
|
69
|
+
/* The heading arrow lives in a fixed square slot like the preview chip's,
|
|
70
|
+
so its ink never crowds the pill padding at any rotation angle. */
|
|
71
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
72
|
+
width: ${Math.round(24 * scale)}px; height: ${Math.round(24 * scale)}px;
|
|
73
|
+
font-size: ${Math.round(19 * scale)}px; line-height: 1;
|
|
74
|
+
color: ${theme.core};
|
|
75
|
+
}`;
|
|
68
76
|
}
|
|
69
77
|
function attrCss(at, scale) {
|
|
70
78
|
return `
|
|
@@ -106,6 +114,9 @@ export function sceneCss(src, theme, width, height, scale, scope) {
|
|
|
106
114
|
}
|
|
107
115
|
export function hudMarkup(hud) {
|
|
108
116
|
const chips = [];
|
|
117
|
+
if (hud.heading) {
|
|
118
|
+
chips.push('<div class="chip" id="chip-heading"><span class="label">HDG</span><span class="chip-arrow">▲</span><span class="num">--</span></div>');
|
|
119
|
+
}
|
|
109
120
|
if (hud.alt) {
|
|
110
121
|
chips.push('<div class="chip" id="chip-alt"><span class="label">ALT</span><span class="num">--</span><span class="unit">m</span></div>');
|
|
111
122
|
}
|
package/dist/renderer/scene.js
CHANGED
|
@@ -36,6 +36,7 @@ class SceneState {
|
|
|
36
36
|
bb;
|
|
37
37
|
layout;
|
|
38
38
|
decor;
|
|
39
|
+
headingChip = null;
|
|
39
40
|
altChip = null;
|
|
40
41
|
speedChip = null;
|
|
41
42
|
/** Chip container: inside the map frame for exports, or an external strip. */
|
|
@@ -253,10 +254,14 @@ class SceneState {
|
|
|
253
254
|
}
|
|
254
255
|
rebuildHud() {
|
|
255
256
|
// Scoped to the chip container so an external strip and a second scene
|
|
256
|
-
// (the export preview) can never cross-write.
|
|
257
|
+
// (the export preview) can never cross-write. A scene whose caller
|
|
258
|
+
// overlays its own pills draws none of its own (#283).
|
|
257
259
|
this.hudRoot.innerHTML = this.externalHud
|
|
258
260
|
? stripReadoutMarkup(this.data.hud)
|
|
259
|
-
:
|
|
261
|
+
: this.data.hudPills === false
|
|
262
|
+
? ''
|
|
263
|
+
: hudMarkup(this.data.hud);
|
|
264
|
+
this.headingChip = this.hudRoot.querySelector('#chip-heading');
|
|
260
265
|
this.altChip = this.hudRoot.querySelector('#chip-alt');
|
|
261
266
|
this.speedChip = this.hudRoot.querySelector('#chip-speed');
|
|
262
267
|
if (this.decor.arrowEl) {
|
|
@@ -288,6 +293,23 @@ class SceneState {
|
|
|
288
293
|
// "--" placeholder instead of a value (#272 review).
|
|
289
294
|
this.setReadout(this.altChip, this.data.hud.alt ? this.data.alt[i] : null, (a) => String(Math.round(a)));
|
|
290
295
|
this.setReadout(this.speedChip, this.data.hud.speed ? this.data.speed[i] : null, (s) => s.toFixed(1));
|
|
296
|
+
this.setHeading(this.headingChip, this.data.headingDeg[i]);
|
|
297
|
+
}
|
|
298
|
+
/** The heading pill rotates its arrow like the marker does; a missing
|
|
299
|
+
sample falls back to the dimmed "--", matching the preview chip (#283). */
|
|
300
|
+
setHeading(chip, deg) {
|
|
301
|
+
if (!chip)
|
|
302
|
+
return;
|
|
303
|
+
const missing = deg === null || deg === undefined;
|
|
304
|
+
const arrow = chip.querySelector('.chip-arrow');
|
|
305
|
+
const num = chip.querySelector('.num');
|
|
306
|
+
if (arrow) {
|
|
307
|
+
arrow.style.display = missing ? 'none' : '';
|
|
308
|
+
if (!missing)
|
|
309
|
+
arrow.style.transform = 'rotate(' + deg + 'deg)';
|
|
310
|
+
}
|
|
311
|
+
if (num)
|
|
312
|
+
num.style.display = missing ? '' : 'none';
|
|
291
313
|
}
|
|
292
314
|
setReadout(chip, value, format) {
|
|
293
315
|
if (!chip)
|
|
@@ -345,7 +367,7 @@ class SceneState {
|
|
|
345
367
|
next.height !== prev.height;
|
|
346
368
|
if (decorInvalidated)
|
|
347
369
|
this.rebuildDecor();
|
|
348
|
-
if (!hudEq(prev.hud, next.hud))
|
|
370
|
+
if (!hudEq(prev.hud, next.hud) || next.hudPills !== prev.hudPills)
|
|
349
371
|
this.rebuildHud();
|
|
350
372
|
this.layoutMap();
|
|
351
373
|
return this.setFrame(this.curIdx);
|
|
@@ -22,3 +22,17 @@ export const TILE_SOURCES = {
|
|
|
22
22
|
maxNativeZoom: 17,
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
|
+
/** Leaflet wants HTML and the map style thumbnails plain text; the thumbnail
|
|
26
|
+
credits derive from these attributions so the wording can never drift. */
|
|
27
|
+
function plainCredit(html) {
|
|
28
|
+
return html
|
|
29
|
+
.replaceAll('©', '©')
|
|
30
|
+
.replace(/<a [^>]+>/g, '')
|
|
31
|
+
.replaceAll('</a>', '')
|
|
32
|
+
.split(' | ')
|
|
33
|
+
.map((part) => part.replace('Style: ', 'Style ')); // the thumbnail wording drops the colon
|
|
34
|
+
}
|
|
35
|
+
export const TILE_CREDITS = [
|
|
36
|
+
...plainCredit(TILE_SOURCES.satellite.attribution),
|
|
37
|
+
...plainCredit(TILE_SOURCES.topo.attribution),
|
|
38
|
+
].join(' · ');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drone-path",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Render flight-path map overlay videos (exactly the source frame rate and frame count) from DJI drone recordings - telemetry from the embedded CAM-meta (DVTM) stream or the .SRT sidecar.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "app/main.mjs",
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"concurrently": "~10.0.7",
|
|
85
85
|
"electron": "~45.3.1",
|
|
86
86
|
"electron-builder": "~26.18.0",
|
|
87
|
-
"eslint": "~10.
|
|
87
|
+
"eslint": "~10.15.0",
|
|
88
88
|
"eslint-plugin-react-hooks": "~7.1.1",
|
|
89
89
|
"jsdom": "~31.0.1",
|
|
90
|
-
"lucide-react": "~1.
|
|
90
|
+
"lucide-react": "~1.73.0",
|
|
91
91
|
"marked": "~18.2.0",
|
|
92
92
|
"next": "~16.4.6",
|
|
93
93
|
"react": "~19.3.1",
|