Merge origin/main: Google Street View, KartaView and Panoramax on the slim Street Level

Main gained three imagery providers (Google Street View, KartaView,
Panoramax), shared line-coverage, cone and photo-viewer modules, one source
lit at a time and the translated interface. Their shared modules still
carried what this branch removes, so the merge ports them onto it:

- lineCoverage.js is this branch's coverage.js made provider-neutral
  (draped lines near the ground only, the selection drawn over them, key
  and rate-limit blocking); sequenceCones.js is sequences.js the same way.
  Mapillary, KartaView and Panoramax all build on them; Mapillary moves
  back to providers/mapillary/ beside the others.
- No ground casting, mesh sampling, surface modes, FOLLOW, legend, prewarm,
  orbit overview points (Panoramax's density dots included), stale-tile
  swaps or water-filled point budget come back.
- Kept from main because the new providers need them: requiresMapStack and
  attachMapStackController (Street View on Google 3D only), ground clicks,
  openNearest with an optional provider nearestImage, openImage {frame},
  reportError, the view-cone marker (now an SVG glyph), filters /
  coverageLabel / sinceBasis, OPEN STREET VIEW, keyAlternatives and i18n.
- photoViewer.js treats the viewer as expanded when its wrap is full screen
  or the iPhone popover, as EXPAND now is.
- The fixture browser gate keeps its 8 steps and adds one each for
  KartaView and Panoramax; catalogs, docs, boundaries and format scope
  follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-19 13:51:45 +04:00
commit 6390a3346f
809 files changed
+81825 -6035

No files matched your search

+103
View File
@@ -0,0 +1,103 @@
// Shell toasts, prompts and launcher labels: pin that they are marked in the
// code, present in every shipped catalog, and that no bare literal is left at
// the call sites (`window.prompt/confirm` and constants are invisible to the
// unmarked-text checker).
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import {
extractMessages,
readCatalog,
shippedLocales,
} from '../../scripts/i18n.mjs';
import { setLocale } from '../i18n/index.js';
import {
beginDeferredNavigation,
reassertNavigationHandoff,
runExplicitNavigation,
} from '../navigationPolicy.js';
const KEYS = [
'Tilted view',
'Straight-down view',
'North up',
'Exit cockpit to fly to a camera',
'Exit cockpit to fly to a location',
'Exit cockpit to fly to a photo',
'Exit cockpit to fly to a shared view',
'Go to expanded Radio section',
'Expand Radio section in Context',
'New scene name',
'Delete scene "{scene}" and all shots?',
'Detailed outline unavailable',
];
const messages = extractMessages();
for (const key of KEYS) {
test(`marked for translation: ${key}`, () => {
assert.ok(messages.has(key), `not marked with t()/msg(): ${key}`);
});
for (const locale of shippedLocales()) {
test(`${locale} catalog translates: ${key}`, () => {
const value = readCatalog(locale)[key];
assert.ok(value, `missing in ${locale}.json`);
assert.notEqual(value, key);
});
}
}
test('no bare literal reaches showToast in the orientation and navigation code', () => {
for (const file of [
'../ui/cameraOrientationControls.js',
'../navigationPolicy.js',
'../ui/locationNavigation.js',
'../ui/panelPositionControls.js',
]) {
const source = readFileSync(
fileURLToPath(new URL(file, import.meta.url)),
'utf8',
);
assert.doesNotMatch(
source,
/_?showToast\??\.?\(\s*['"`]/,
`${file} passes a bare literal to showToast`,
);
}
});
test.afterEach(() => setLocale('en'));
test('the Cockpit refusal keeps its English wording per noun', () => {
setLocale('en');
const log = [];
const showToast = (text) => log.push(text);
runExplicitNavigation({ cockpitActive: true, noun: 'camera', showToast });
beginDeferredNavigation({ cockpitActive: true, showToast });
reassertNavigationHandoff({
generation: 1,
currentGeneration: 1,
cockpitActive: true,
showToast,
});
assert.deepEqual(log, [
'Exit cockpit to fly to a camera',
'Exit cockpit to fly to a location',
'Exit cockpit to fly to a location',
]);
});
for (const locale of ['es', 'ru']) {
test(`${locale}: the Cockpit refusal is translated`, () => {
setLocale(locale);
const log = [];
runExplicitNavigation({
cockpitActive: true,
noun: 'camera',
showToast: (text) => log.push(text),
});
assert.equal(log.length, 1);
assert.doesNotMatch(log[0], /Exit cockpit/);
});
}