From d04939b813da2e9d5f4a0bc3e056616d78a57c90 Mon Sep 17 00:00:00 2001 From: Gaurav Patidar Date: Wed, 9 Sep 2026 13:23:59 +0530 Subject: [PATCH 001/237] fix:docs --- CONTRIBUTING.md | 19 +++++++++++++++++++ DATA_SOURCES.md | 30 ++++++++++++++++++++++++++++++ docs/KNOWN-ISSUES.md | 6 +++--- 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6760dfdf1b..029b535148 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,6 +27,25 @@ through Pinokio; the terminal path above remains the contributor path. Open `http://localhost:4173`. Before sending a PR run `npm run build`, `npm test`, and `npm run test:track` (dev server must be up) — **all three must stay green.** +### Test prerequisites + +- **`npm test`** — unit tests. Runs standalone; no dev server or credentials + required. Exit code is the gate. +- **`npm run test:track`** — the 3D flight-tracking regression harness. It + drives the **real app** in headless Chromium, so it **requires a running + dev server** on the default port (`http://localhost:4173`). Pass + `--url ` to point it at another instance (e.g. + `node scripts/track-regression.mjs --url http://localhost:4272`). It does not + depend on live OpenSky / adsb.lol / AISStream (those are optional or + rate-limited locally); it installs a persistent `fetch` shim that returns + synthetic aircraft in the exact upstream payload shapes the layers parse. +- **`npm run build`** — production Vite build. No server or credentials + required; it validates that the client bundle compiles cleanly. + +If you change runtime behavior, update `docs/CURRENT-STATE.md` and +`CHANGELOG.md` in the same PR. For a deeper catalog of what each harness +checks and what it needs to run, see [TESTING.md](TESTING.md). + ## Good first contributions The highest-leverage places to jump in: diff --git a/DATA_SOURCES.md b/DATA_SOURCES.md index faa351dca3..bb06261171 100644 --- a/DATA_SOURCES.md +++ b/DATA_SOURCES.md @@ -125,6 +125,36 @@ the retrieval date (2026-07-30), exact download URL, license evidence, and the deterministic transform (`scripts/build-sf-neighborhoods.mjs`: `nhood` → `name`, ~2 m Douglas-Peucker simplification, 6-decimal rounding). +### Pilot CCTV source packs (`config/`) + +`config/cctv_sources.shinjuku.json` is a **demo source pack** (3 cameras: +Shinjuku Crossing, Shinjuku Station West, Shibuya Scramble) used for +projection-pipeline testing. The feeds are Google-hosted sample MP4 videos +(`storage.googleapis.com/gtv-videos-bucket/sample/`), not live public cameras. +Camera poses (coordinates, heading, pitch, FOV, mount height) are fabricated +priors placed at recognizable Tokyo intersections. + +Use the pack by setting: + +```bash +CCTV_SOURCES_FILE=config/cctv_sources.shinjuku.json npm run dev +``` + +Or equivalently, via `./scripts/dev-cctv.sh`: + +```bash +CCTV_SOURCES_FILE=config/cctv_sources.shinjuku.json ./scripts/dev-cctv.sh +``` + +The pack exercises the same CCTV registration and frustum-projection pipeline +as live city packs without requiring network access to a camera catalog. It is +**not** a live data source and carries no external attribution requirement. The +sample videos are publicly available Google test media. + +`config/cctv_sources.austin.json` is the reference live pack. Custom source +packs follow the same JSON schema (see either file); `CCTV_SOURCES_JSON` +accepts inline JSON as an alternative to a file path. + --- ## In-app attribution diff --git a/docs/KNOWN-ISSUES.md b/docs/KNOWN-ISSUES.md index 33c665f39f..ca46d2ef0f 100644 --- a/docs/KNOWN-ISSUES.md +++ b/docs/KNOWN-ISSUES.md @@ -57,9 +57,9 @@ Status: Open (owner-accepted 2026-07-08, documented) a few stragglers take one more poll. - **Born-grounded first poll:** a contact first seen on the ground with no altitude data renders at the geoid for ≤1 poll until its floor cell warms. -- Full context, improvement ideas, and the verification oracle - (`scripts/qa-floor-verify.mjs`): - `docs/superpowers/reports/2026-07-08-height-datum-handover.md`. +- Verify floor-placement behavior with `scripts/qa-floor-verify.mjs` against a + running local app; set `QA_BASE_URL` when it is not on the default port + (`http://localhost:4173`). --- From e3772f806f660ade51817707208250c7b7dd9a51 Mon Sep 17 00:00:00 2001 From: Gaurav Patidar Date: Fri, 11 Sep 2026 00:55:57 +0530 Subject: [PATCH 002/237] Clarify test:track command usage in CONTRIBUTING.md Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- CONTRIBUTING.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 029b535148..eef422a849 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,9 +33,8 @@ Open `http://localhost:4173`. Before sending a PR run `npm run build`, `npm test required. Exit code is the gate. - **`npm run test:track`** — the 3D flight-tracking regression harness. It drives the **real app** in headless Chromium, so it **requires a running - dev server** on the default port (`http://localhost:4173`). Pass - `--url ` to point it at another instance (e.g. - `node scripts/track-regression.mjs --url http://localhost:4272`). It does not + dev server** (default `http://localhost:4173`). To target another instance, + run `npm run test:track -- --url ` (or `node scripts/track-regression.mjs --url `). depend on live OpenSky / adsb.lol / AISStream (those are optional or rate-limited locally); it installs a persistent `fetch` shim that returns synthetic aircraft in the exact upstream payload shapes the layers parse. From 8e68a29c5079a58fe133dd4589ea0ec764d4b701 Mon Sep 17 00:00:00 2001 From: Aliciawque <166712943+Aliciawque@users.noreply.github.com> Date: Mon, 12 Oct 2026 21:36:55 -0700 Subject: [PATCH 003/237] fix(cables): preserve feature ownership across multipart geometry Associate expanded cable and landing entities through a copied source index, retain one reference stem per feature, and cover duplicate IDs, bundled segments and frozen provider inputs with real Cesium regressions. --- CHANGELOG.md | 4 + docs/CURRENT-STATE.md | 8 + .../telegeographySubmarineCables.test.mjs | 249 ++++++++++++++++++ src/layers/submarineCables/ingestion.js | 34 ++- 4 files changed, 291 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b24ac95ed3..f45d71d230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +- Keep every submarine-cable segment associated with its source feature after + Cesium expands multipart geometry, correcting segment colors, click destinations + and horizon culling while retaining one reference stem per feature. + - Treat explicitly current, complete empty vessel coverage as a successful update, clearing obsolete contacts while retaining stale or incomplete snapshots. diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 26d56e66bf..33e4c36b40 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -5002,6 +5002,14 @@ three Cesium data sources; enabling rebuilds from the accepted parsed cache, and destroying clears it. Load ownership prevents cancelled work from adding entities after teardown. +Multipart cable and landing-point geometry retains its source feature on every +Cesium entity, including generated IDs and IDs that collide with Cesium's +multipart suffixes. Each segment receives its own feature's styling, click +destination and horizon-culling reference; each source feature has one reference +stem. Source collections and their properties are not modified. The copied input +adds `__gevSourceFeatureIndex`, which remains observable in Cesium properties +and default descriptions. + Natural Earth regions and neighborhood polygon lookup are package exports. Their existing lazy loaders, retry behavior, bundled datasets and attribution are unchanged. The cable dataset remains CC BY-NC-SA 3.0 and is not covered by diff --git a/src/data/telegeographySubmarineCables.test.mjs b/src/data/telegeographySubmarineCables.test.mjs index 3850748dc8..110f65f18b 100644 --- a/src/data/telegeographySubmarineCables.test.mjs +++ b/src/data/telegeographySubmarineCables.test.mjs @@ -1754,3 +1754,252 @@ test('another GeoJSON source renders with its own label and rebuilds from accept env.layer.destroy(env.viewer); } }); + +function multipartCableFixture() { + return [ + { + type: 'Feature', + properties: { + id: 'alpha', + name: 'Alpha cable', + color: '#ff0000', + coordinates: [-40, 35], + }, + geometry: { + type: 'MultiLineString', + coordinates: [ + [ + [-40, 35], + [-39, 36], + ], + [ + [-38, 37], + [-37, 38], + ], + [ + [-36, 39], + [-35, 40], + ], + ], + }, + }, + { + type: 'Feature', + properties: { + id: 'beta', + name: 'Beta cable', + color: '#0000ff', + coordinates: [140, -35], + }, + geometry: { + type: 'LineString', + coordinates: [ + [140, -35], + [141, -34], + ], + }, + }, + ]; +} + +function geometrySource(cables, landingPoints = []) { + return { + label: 'Multipart test source', + async fetch() { + return { + cables: { type: 'FeatureCollection', features: cables }, + landingPoints: { type: 'FeatureCollection', features: landingPoints }, + }; + }, + }; +} + +test('multipart association accepts frozen provider collections without modifying properties', async () => { + const payload = { + cables: { type: 'FeatureCollection', features: multipartCableFixture() }, + landingPoints: { + type: 'FeatureCollection', + features: multipartCableFixture(), + }, + }; + payload.cables.features[0].properties.__gevSourceFeatureIndex = + 'provider value'; + const before = structuredClone(payload); + const freeze = (value) => { + if (value && typeof value === 'object') { + for (const child of Object.values(value)) freeze(child); + Object.freeze(value); + } + return value; + }; + freeze(payload); + const env = await createRealCableLayerHarness({ + source: { label: 'Frozen multipart source', fetch: async () => payload }, + }); + try { + for (const dataSource of env.dataSources.slice(0, 2)) { + assert.deepEqual( + dataSource.entities.values.map( + (entity) => entity.__gevTeleGeography?.label, + ), + ['Alpha cable', 'Alpha cable', 'Alpha cable', 'Beta cable'], + ); + } + assert.equal(env.dataSources[2].entities.values.length, 4); + assert.deepEqual(payload, before); + const entity = env.dataSources[0].entities.values[0]; + assert.equal(entity.properties.__gevSourceFeatureIndex.getValue(), 0); + assert.match(entity.description.getValue(), /__gevSourceFeatureIndex/); + } finally { + env.layer.destroy(env.viewer); + } +}); + +test('multipart cables retain their own styling, picking and culling on every segment', async () => { + const features = multipartCableFixture(); + const before = JSON.stringify(features); + const env = await createRealCableLayerHarness({ + source: geometrySource(features), + }); + try { + const entities = env.dataSources[0].entities.values; + assert.equal(entities.length, 4); + for (const [index, entity] of entities.entries()) { + const feature = features[index < 3 ? 0 : 1]; + const info = entity.__gevTeleGeography; + assert.equal(info?.label, feature.properties.name, entity.id); + assert.deepEqual(info.reference, { + lon: feature.properties.coordinates[0], + lat: feature.properties.coordinates[1], + }); + assert.deepEqual( + entity.polyline.material.color.getValue(), + Cesium.Color.fromCssColorString(feature.properties.color).withAlpha( + 0.92, + ), + ); + assert.equal(entity.polyline.width.getValue(), 2.5); + } + env.raiseSweep(); + assert.deepEqual( + entities.map((entity) => entity.show), + [true, true, true, false], + ); + assert.equal( + env.dataSources[2].entities.values.length, + 2, + 'one reference per feature', + ); + assert.equal( + JSON.stringify(features), + before, + 'source features stay unchanged', + ); + } finally { + env.layer.destroy(env.viewer); + } +}); + +test('multipart association supports missing and repeated IDs without guessing Cesium suffixes', async () => { + const features = multipartCableFixture(); + features[1].id = 'alpha_2'; + delete features[1].properties.id; + const generated = structuredClone(features[1]); + delete generated.id; + generated.properties.name = 'Generated cable'; + features.push(generated); + const repeated = structuredClone(features[1]); + repeated.properties.id = 'alpha'; + repeated.properties.name = 'Repeated ID cable'; + features.push(repeated); + const env = await createRealCableLayerHarness({ + source: geometrySource(features), + }); + try { + const entities = env.dataSources[0].entities.values; + assert.deepEqual( + entities.map((entity) => entity.id), + ['alpha', 'alpha_2', 'alpha_3', 'alpha_2_2', 'cable-2', 'alpha_4'], + ); + assert.deepEqual( + entities.map((entity) => entity.__gevTeleGeography?.label), + [ + 'Alpha cable', + 'Alpha cable', + 'Alpha cable', + 'Beta cable', + 'Generated cable', + 'Repeated ID cable', + ], + ); + assert.deepEqual( + env.dataSources[2].entities.values.map( + (entity) => entity.__gevTeleGeography.featureId, + ), + ['alpha', 'alpha_2', 'cable-2', 'alpha'], + ); + } finally { + env.layer.destroy(env.viewer); + } +}); + +test('multipart landing geometry keeps every pick with one reference per feature', async () => { + const features = multipartCableFixture(); + const env = await createRealCableLayerHarness({ + source: geometrySource([], features), + }); + try { + const entities = env.dataSources[1].entities.values; + assert.deepEqual( + entities.map((entity) => entity.__gevTeleGeography?.label), + ['Alpha cable', 'Alpha cable', 'Alpha cable', 'Beta cable'], + ); + assert.ok( + entities.every( + (entity) => entity.__gevTeleGeography.kind === 'landing-point', + ), + ); + assert.equal(env.dataSources[2].entities.values.length, 2); + } finally { + env.layer.destroy(env.viewer); + } +}); + +test('every bundled cable segment is associated with its source feature', async () => { + const { features } = JSON.parse( + readFileSync( + new URL( + './local_data/telegeography_submarine_cables/cable-geo.json', + import.meta.url, + ), + 'utf8', + ), + ); + // Some bundled features share a cable ID but have different references. + const expandedFeatures = features.flatMap((feature) => + feature.geometry.coordinates.map(() => feature), + ); + assert.ok(expandedFeatures.length > features.length); + const env = await createRealCableLayerHarness({ + source: geometrySource(features), + }); + try { + const entities = env.dataSources[0].entities.values; + assert.equal(entities.length, expandedFeatures.length); + for (const [index, entity] of entities.entries()) { + const feature = expandedFeatures[index]; + assert.equal( + entity.__gevTeleGeography?.label, + feature.properties.name, + entity.id, + ); + assert.deepEqual(entity.__gevTeleGeography.reference, { + lon: feature.properties.coordinates[0], + lat: feature.properties.coordinates[1], + }); + } + assert.equal(env.dataSources[2].entities.values.length, features.length); + } finally { + env.layer.destroy(env.viewer); + } +}); diff --git a/src/layers/submarineCables/ingestion.js b/src/layers/submarineCables/ingestion.js index eaefbeb39a..3779af9c9c 100644 --- a/src/layers/submarineCables/ingestion.js +++ b/src/layers/submarineCables/ingestion.js @@ -5,6 +5,21 @@ import { } from './geometry.js'; import * as Cesium from 'cesium'; +const SOURCE_FEATURE_INDEX = '__gevSourceFeatureIndex'; + +function indexedCollection(features) { + return { + type: 'FeatureCollection', + features: features.map((feature, index) => ({ + ...feature, + properties: { + ...feature.properties, + [SOURCE_FEATURE_INDEX]: index, + }, + })), + }; +} + export function createIngestion({ state, parts, source }) { async function load(viewer) { if (state._loading || state._loaded) return; @@ -48,7 +63,7 @@ export function createIngestion({ state, parts, source }) { const landingFeatures = normalizeFeatures(landingJson, 'landing'); const cableDataSource = await Cesium.GeoJsonDataSource.load( - { type: 'FeatureCollection', features: cableFeatures }, + indexedCollection(cableFeatures), { clampToGround: true, stroke: state.cableColor.withAlpha(0.95), @@ -60,7 +75,7 @@ export function createIngestion({ state, parts, source }) { ); if (!owns()) return; const landingDataSource = await Cesium.GeoJsonDataSource.load( - { type: 'FeatureCollection', features: landingFeatures }, + indexedCollection(landingFeatures), { clampToGround: true, stroke: state.landingColor.withAlpha(0.9), @@ -130,7 +145,12 @@ export function createIngestion({ state, parts, source }) { state._referenceRecords = []; state._surfaceRecords = []; - cableEntities.forEach((entity, index) => { + // Cesium expands multipart geometry into several entities and suffixes + // colliding IDs. Its copied properties retain this source index even + // when a provider has no ID, so every segment keeps the right owner. + const cableReferences = new Set(); + cableEntities.forEach((entity) => { + const index = entity.properties?.[SOURCE_FEATURE_INDEX]?.getValue(); const feature = cableFeatures[index]; const reference = featureReference(feature); if (!reference) return; @@ -145,6 +165,8 @@ export function createIngestion({ state, parts, source }) { entity, base: Cesium.Cartesian3.fromDegrees(reference.lon, reference.lat, 0), }); + if (cableReferences.has(index)) return; + cableReferences.add(index); parts.rendering.addReferenceStem({ reference, label: featureLabel(feature), @@ -154,7 +176,9 @@ export function createIngestion({ state, parts, source }) { }); }); - landingEntities.forEach((entity, index) => { + const landingReferences = new Set(); + landingEntities.forEach((entity) => { + const index = entity.properties?.[SOURCE_FEATURE_INDEX]?.getValue(); const feature = landingFeatures[index]; const reference = featureReference(feature); if (!reference) return; @@ -169,6 +193,8 @@ export function createIngestion({ state, parts, source }) { entity, base: Cesium.Cartesian3.fromDegrees(reference.lon, reference.lat, 0), }); + if (landingReferences.has(index)) return; + landingReferences.add(index); parts.rendering.addReferenceStem({ reference, label: featureLabel(feature), From a856d54bba46424571e40227997eb576c9351396 Mon Sep 17 00:00:00 2001 From: John Leshan Date: Sat, 17 Oct 2026 13:07:04 +0300 Subject: [PATCH 004/237] docs: add cloud setup path via GitHub Codespaces --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index c49c53ece4..75f7967240 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,38 @@ the container. +### Path 4 — GitHub Codespaces (cloud, no local GPU) + +Runs the same dev server in a cloud workspace, so integrated graphics and a +local GPU never come into it. GitHub Free includes 120 core-hours a month with +no card on file — about 60 hours on the default 2-core machine. Org and +Enterprise plans include no free quota; current terms and quotas apply. + +1. Fork this repository, then open **your fork** on GitHub. +2. Click the green **Code** button, the **Codespaces** tab, then **Create codespace on main**. +3. In the codespace terminal: + ```bash + nvm install 24 && nvm use 24 + npm ci + npm run doctor + GEV_ALLOWED_HOSTS="$CODESPACE_NAME-4173.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN" npm run dev + ``` +4. Open the **Ports** tab, find `4173`, and click the globe icon to open it in + the browser. The port is private by default, so the URL asks for your GitHub + login. + +`GEV_ALLOWED_HOSTS` there is required, not optional. The dev server answers only +the hostnames it trusts, and a forwarded port arrives on +`$CODESPACE_NAME-4173.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN`. Without it the +page is `Blocked request. This host is not allowed.` Leading-dot wildcards are +ignored on purpose, so pass that exact name. + +⚠️ **A codespace is reachable from the internet.** Treat it as the +wider-publish case in [Sharing an instance](#-sharing-an-instance): leave +Provider Settings closed to strangers, and put keys in the workspace `.env` by +hand. `.env` is gitignored — never commit it. [SECURITY.md](SECURITY.md) has the +threat model. + ### Then power it up — in the app, not in a file Keys are upgrades, not prerequisites. When you want one, click the **POWER UP** From 295e164fc3dac706ad51a47013e41e4f95441bd8 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Mon, 19 Oct 2026 14:31:09 +0100 Subject: [PATCH 005/237] docs(readme): say Codespaces moves the server, not the rendering The globe renders in the viewer's own browser, so a codespace does not remove the need for local graphics. Retitle Path 4 accordingly. Co-Authored-By: Claude Opus 5.5 --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0e1f6ffe75..ce2e97ab9f 100644 --- a/README.md +++ b/README.md @@ -219,12 +219,14 @@ the container. -### Path 4 — GitHub Codespaces (cloud, no local GPU) +### Path 4 — GitHub Codespaces (cloud, no local install) -Runs the same dev server in a cloud workspace, so integrated graphics and a -local GPU never come into it. GitHub Free includes 120 core-hours a month with -no card on file — about 60 hours on the default 2-core machine. Org and -Enterprise plans include no free quota; current terms and quotas apply. +Runs the same dev server in a cloud workspace, so Node and the dependencies +never touch your machine. The globe still renders in your own browser, so it +needs the same graphics there as any other path. GitHub Free includes 120 +core-hours a month with no card on file — about 60 hours on the default 2-core +machine. Org and Enterprise plans include no free quota; current terms and +quotas apply. 1. Fork this repository, then open **your fork** on GitHub. 2. Click the green **Code** button, the **Codespaces** tab, then **Create codespace on main**. From 58a41759b52e795268e1be6cb2d1fa84547b2630 Mon Sep 17 00:00:00 2001 From: Aliciawque <166712943+Aliciawque@users.noreply.github.com> Date: Thu, 22 Oct 2026 13:13:59 +0800 Subject: [PATCH 006/237] test: resolve sky texture file URLs on Windows --- src/tooling/skyAssets.paintOut.test.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tooling/skyAssets.paintOut.test.mjs b/src/tooling/skyAssets.paintOut.test.mjs index ddb57589a8..78a91519eb 100644 --- a/src/tooling/skyAssets.paintOut.test.mjs +++ b/src/tooling/skyAssets.paintOut.test.mjs @@ -1,5 +1,6 @@ import assert from 'node:assert/strict'; import test from 'node:test'; +import { fileURLToPath } from 'node:url'; import sharp from 'sharp'; import { CUBE_FACES, @@ -24,7 +25,7 @@ test('painted-out planets leave no disc brighter than the sky around them', asyn })); for (const face of CUBE_FACES) { const { data, info } = await sharp( - new URL(`milkyway_${FACE_FILE_SUFFIX[face]}.webp`, SKY).pathname, + fileURLToPath(new URL(`milkyway_${FACE_FILE_SUFFIX[face]}.webp`, SKY)), ) .raw() .toBuffer({ resolveWithObject: true }); From d58199a21497f3f71b2ef211965c5b14c7045872 Mon Sep 17 00:00:00 2001 From: Aditya <205600203+Rohilalala@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:54:28 +0530 Subject: [PATCH 007/237] =?UTF-8?q?fix(vessels):=20show=20a=20359.7=C2=B0?= =?UTF-8?q?=20course=20as=200=C2=B0,=20not=20360=C2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vessel cards and the AIS HUD rounded the direction without wrapping, so a vessel reporting no heading and a course over ground of 359.5° or more read "360°" on its cards and "HDG: 360DEG" in the HUD. The rounded direction now wraps to 0°. --- docs/CURRENT-STATE.md | 4 +++- src/data/aisLiveVessels.test.mjs | 21 +++++++++++++++++++++ src/layers/vessels/cards.js | 9 ++++++--- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 0cb46940c0..11bc07655b 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -503,7 +503,9 @@ those reports arrive as 102.3 knots and 360 degrees. Both are stored as unknown, and vessel cards, the HUD and analyst queries show a missing measurement rather than a reading. Heading keeps its existing separate check for its own sentinel. Genuine readings are unchanged, including a stopped vessel's zero and the -highest speed and course the fields can encode. +highest speed and course the fields can encode. Vessel cards and the HUD wrap +the direction after rounding to whole degrees, so a course of 359.5° or more +reads `0°` (`0DEG` in the HUD) rather than `360°`. For an already tracked vessel, AISStream static messages update name, type, destination and IMO without changing its position, motion, fix timestamps, diff --git a/src/data/aisLiveVessels.test.mjs b/src/data/aisLiveVessels.test.mjs index 96a5cd105b..85abb9323c 100644 --- a/src/data/aisLiveVessels.test.mjs +++ b/src/data/aisLiveVessels.test.mjs @@ -1322,6 +1322,27 @@ test('buildVesselCard: heading falls back to course; missing parts are omitted', assert.deepEqual(bare.details, []); }); +test('vessel cards read a course that rounds to north as 0°, not 360°', () => { + const card = (course) => buildVesselCard(makeRecord({ heading: null, course })).details[0]; + assert.equal(card(359.4), 'CONTAINER SHIP · 14.5KT · 359°'); + assert.equal(card(359.7), 'CONTAINER SHIP · 14.5KT · 0°'); + assert.equal( + buildSelectedVesselCard(makeRecord({ heading: null, course: 359.7 })).details[0], + 'CONTAINER SHIP · 14.5KT · 0°', + ); +}); + +test('the vessel HUD reads a course that rounds to north as HDG 0DEG', () => { + const harness = installWireHarness(undefined, { selectedRecord: null }); + try { + Object.assign(harness.record, { heading: null, course: 359.7 }); + assert.equal(aisLiveVesselsLayer.selectById(harness.record.mmsi), true); + assert.match(harness.hud.textContent, /HDG: 0DEG/); + } finally { + harness.cleanup(); + } +}); + test('buildVesselCard: unnamed vessels title as MMSI; long names truncate', () => { const unnamed = buildVesselCard(makeRecord({ name: 'VESSEL' })); assert.equal(unnamed.title, 'MMSI 353136000'); diff --git a/src/layers/vessels/cards.js b/src/layers/vessels/cards.js index 64e1156372..a5671ae54e 100644 --- a/src/layers/vessels/cards.js +++ b/src/layers/vessels/cards.js @@ -60,7 +60,10 @@ export function createCards({ if (record.speed !== null && record.speed !== undefined) parts.push(formatSpeed(record.speed)); const direction = record.heading ?? record.course; - if (Number.isFinite(direction)) parts.push(`${Math.round(direction)}°`); + // A course of 359.5° and above rounds to north; modulo keeps it from + // printing 360°. The selected card and the HUD wrap the same way. + if (Number.isFinite(direction)) + parts.push(`${Math.round(direction) % 360}°`); return { id: vesselOverlayEntryId(record), actionable: Boolean(record?.mmsi), @@ -91,7 +94,7 @@ export function createCards({ [ vesselTypeShort(record) || t('VESSEL'), formatSpeed(record.speed), - Number.isFinite(direction) ? `${Math.round(direction)}°` : '--°', + Number.isFinite(direction) ? `${Math.round(direction) % 360}°` : '--°', ].join(' · '), ]; const destination = String(record.destination || '').trim(); @@ -181,7 +184,7 @@ export function createCards({ function formatHeading(heading) { return t('{heading}DEG', { - heading: Number.isFinite(heading) ? Math.round(heading) : '--', + heading: Number.isFinite(heading) ? Math.round(heading) % 360 : '--', }); } From ea1b0d8d5506722e5672d685b5b0fe251e6ce3d0 Mon Sep 17 00:00:00 2001 From: Aditya <205600203+Rohilalala@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:54:36 +0530 Subject: [PATCH 008/237] fix(voice): leave out an unreported altitude instead of saying 0 feet select_nearest_aircraft passes altitudeM: null for an airborne contact without a barometric altitude (military rows from adsb.lol can lack alt_baro). The speech builder coerced it with Number(), and Number(null) is 0, so the reply said "..., 0 feet." and the voice card showed "Altitude 0 feet". Read the altitude only when it is a finite number, so an unknown one is left out as the builder already intends. --- docs/CURRENT-STATE.md | 2 ++ src/voice/speech.js | 6 +++--- src/voice/speech.test.mjs | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 0cb46940c0..2a77faaf09 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -5115,6 +5115,8 @@ and unreachable upstream (502/504) separately from road geometry. cannot race the nearest-aircraft query ahead of layer enablement. A healthy fallback feed is queried normally and its source is returned with the selection; fallback with no airborne records remains an honest no-data result, not an enable failure. + The spoken reply and the card leave out an altitude the feed did not report + rather than reading it as 0 feet. - Voice treats the parent Context panel and Contacts as separate intents. An explicit request to open Context expands only `global-context-panel`; it does not choose a mode. An explicit request to open Contacts expands that parent diff --git a/src/voice/speech.js b/src/voice/speech.js index c538815957..d698d863e6 100644 --- a/src/voice/speech.js +++ b/src/voice/speech.js @@ -74,9 +74,9 @@ function listPhrase(items) { } function feetRounded(meters) { - const value = Number(meters); - return Number.isFinite(value) - ? Math.round((value * 3.28084) / 100) * 100 + // A missing altitude is unknown, not sea level: Number(null) is 0. + return Number.isFinite(meters) + ? Math.round((meters * 3.28084) / 100) * 100 : null; } diff --git a/src/voice/speech.test.mjs b/src/voice/speech.test.mjs index 36482290d6..b280b2ebc6 100644 --- a/src/voice/speech.test.mjs +++ b/src/voice/speech.test.mjs @@ -217,6 +217,20 @@ test('nearest-aircraft results name the aircraft, distance and altitude briefly' assert.equal(stale.say, 'Selected AAL1, 3.3 km from Austin, stale.'); }); +test('nearest-aircraft results leave out an altitude the feed did not report', () => { + // gevActions sends `altitudeM: null` for an airborne military contact + // without a barometric altitude; that is unknown, not sea level. + const unknown = envelope('select_nearest_aircraft', { + ok: true, + location: 'Ramstein', + layerId: 'military', + feed: { state: 'nominal' }, + aircraft: { callsign: 'RCH123', altitudeM: null, distanceKm: 8.2 }, + }); + assert.equal(unknown.say, 'Selected RCH123, 8.2 km from Ramstein.'); + assert.deepEqual(unknown.display.lines, ['8.2\u00a0km from Ramstein']); +}); + test('frame_overhead keeps the essential scope audible and lists referents', () => { const framed = envelope('frame_overhead', { ok: true, From 83c4388e6412724bc5bb96394b50a5a2a6ca387c Mon Sep 17 00:00:00 2001 From: Aditya <205600203+Rohilalala@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:55:30 +0530 Subject: [PATCH 009/237] fix(awareness): show a 999.6 m contact marker as 1.0 km, not 1000 m The on-globe Contacts markers picked metres before rounding, so a contact 999.5 m or more away read "1000 m" while the Contacts panel read "1.0 km". The marker label now rounds first, as the panel does. --- docs/CURRENT-STATE.md | 5 +++-- src/data/militaryAwarenessEngine.js | 6 ++++-- src/data/militaryAwarenessEngine.test.mjs | 6 ++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 0cb46940c0..71803280c9 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -4461,8 +4461,9 @@ silent for five minutes are removed. Credits appear when the feed is used. coordinator, but it is not a user-visible Data Layers entry. Its visible entry point is the right-side `CONTEXT` chooser's `CONTACTS` mode. -Contacts distance labels select metres or kilometres after rounding to the -nearest metre, so a 999.5-metre contact displays as `1.0 km`, not `1000 m`. +Contacts distance labels, in the panel and on the globe's contact markers, +select metres or kilometres after rounding to the nearest metre, so a +999.5-metre contact displays as `1.0 km`, not `1000 m`. At global scale, ambient Radio cluster badges are hard-opacity shared-host entries: count/category updates and identity replacement do not run keyhole or diff --git a/src/data/militaryAwarenessEngine.js b/src/data/militaryAwarenessEngine.js index 0f889d53fc..059d6d4371 100644 --- a/src/data/militaryAwarenessEngine.js +++ b/src/data/militaryAwarenessEngine.js @@ -47,8 +47,10 @@ export function findByDoublingRadius( /** @param {number} meters @returns {string} */ export function formatAwarenessDistance(meters) { if (!Number.isFinite(meters) || meters < 0) return '—'; - return meters < 1000 - ? `${Math.round(meters)} m` + // Round before the kilometre cut. 999.6 m was printed as "1000 m". + const wholeMeters = Math.round(meters); + return wholeMeters < 1000 + ? `${wholeMeters} m` : `${(meters / 1000).toFixed(meters < 10000 ? 1 : 0)} km`; } diff --git a/src/data/militaryAwarenessEngine.test.mjs b/src/data/militaryAwarenessEngine.test.mjs index 3415fd5d7a..2fc57d0f6a 100644 --- a/src/data/militaryAwarenessEngine.test.mjs +++ b/src/data/militaryAwarenessEngine.test.mjs @@ -24,6 +24,12 @@ test('awareness formatters preserve valid zeroes and replace missing or invalid assert.equal(formatAwarenessLabel(undefined), '—'); }); +test('a contact marker moves a distance that rounds to 1,000 m into kilometres', () => { + assert.equal(formatAwarenessDistance(999.4), '999 m'); + assert.equal(formatAwarenessDistance(999.6), '1.0 km'); + assert.equal(formatAwarenessDistance(4600), '4.6 km'); +}); + test('awareness cohorts sort nearest-first and do not turn empty data into out of range', () => { const result = summarizeAwarenessCohort([{ id: 'far', distance: 9000 }, { id: 'near', distanceM: 1000 }]); assert.equal(result.relationship, 'NEARBY'); From 4f7b1bc01594cd57b75664e6840fb6352823808d Mon Sep 17 00:00:00 2001 From: Aditya <205600203+Rohilalala@users.noreply.github.com> Date: Tue, 27 Oct 2026 16:45:33 +0530 Subject: [PATCH 010/237] fix(military): read a GNSS-sourced vertical rate when no baro rate is sent readsb reports an aircraft's vertical rate as geom_rate instead of baro_rate when its source is GNSS. The military normaliser read only baro_rate, so about one in six live /v2/mil contacts had a null vertical rate in analyst and tracked-aircraft data. Fall back to geom_rate, as the adsb.lol flights fallback already does; a sent baro_rate still wins. --- docs/CURRENT-STATE.md | 3 ++- src/sources/live/aircraft.js | 3 ++- src/sources/live/contract.test.mjs | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 0cb46940c0..c5d66ce8e0 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -1058,7 +1058,8 @@ The tracked-aircraft descriptor both flight layers hand to the cockpit carries `verticalRate` and military records as `verticalRateMps`; the query seam maps both to one name, so `resolveTrackedAircraftInfo` returns a single shape for either layer. The rate is reported, never derived: a blank poll keeps the last transmitted value and an -absent rate stays null rather than reading as level flight. +absent rate stays null rather than reading as level flight. A military readsb row +without `baro_rate` reports its GNSS rate as `geom_rate`, which is used instead. ## Transponder emergency highlighting diff --git a/src/sources/live/aircraft.js b/src/sources/live/aircraft.js index 1af1f6b473..9da4f7a5f4 100644 --- a/src/sources/live/aircraft.js +++ b/src/sources/live/aircraft.js @@ -48,7 +48,8 @@ export function normalizeReadsbAircraft(row, snapshotTimeMs) { const baroFt = finite(row.alt_baro), geoFt = finite(row.alt_geom); const speedKts = finite(row.gs), - rateFtMin = finite(row.baro_rate); + // readsb sends a GNSS-sourced rate as geom_rate instead of baro_rate. + rateFtMin = finite(row.baro_rate) ?? finite(row.geom_rate); const seen = finite(row.seen), seenPos = finite(row.seen_pos); return { diff --git a/src/sources/live/contract.test.mjs b/src/sources/live/contract.test.mjs index b8b1787da3..79626f6b3c 100644 --- a/src/sources/live/contract.test.mjs +++ b/src/sources/live/contract.test.mjs @@ -145,6 +145,20 @@ test('readsb units and position/contact ages are normalized once against the sou ); }); +test('readsb vertical rate falls back to the GNSS rate when no baro rate is sent', () => { + // readsb reports the rate under geom_rate when the aircraft's source is + // GNSS; 26 of 157 positioned rows in a live /v2/mil fetch had only that. + const row = { hex: 'ae638d', lat: 20.3, lon: -158.5, geom_rate: -2432 }; + assert.equal( + normalizeReadsbAircraft(row, now).verticalRateMps, + -2432 * 0.00508, + ); + assert.equal( + normalizeReadsbAircraft({ ...row, baro_rate: -2400 }, now).verticalRateMps, + -2400 * 0.00508, + ); +}); + test('vessel identity, opaque reference and heading/course remain distinct, unknowns stay null', () => { const row = normalizeVesselObservation( { From accb8983ca0fd55eeb0c475612d1cfa5457b911d Mon Sep 17 00:00:00 2001 From: Sunil56224972 Date: Tue, 27 Oct 2026 18:02:32 +0530 Subject: [PATCH 011/237] fix(security): add cross-site gate to military-installations proxy The /api/military-installations endpoint was the last keyless proxy without the admitSameSite gate that protects terrain, CCTV, traffic, places, and Celestrak. A cross-site , foreign Origin, opaque origin, or reverse-proxy-forwarded request now receives 403 before any Overpass query. Same-origin app requests and bare tool requests continue to work. Adds 4 integration tests (cross-site refused, same-origin admitted, bare tool admitted, proxied refused) following the terrainHeightsBounds test pattern. --- ...-military-installations-cross-site-gate.md | 6 + pr-body.md | 75 +++++++++ scripts/package-boundaries.json | 4 +- server/providers/military-installations.js | 2 + src/militaryInstallationsGate.test.mjs | 147 ++++++++++++++++++ 5 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1427-military-installations-cross-site-gate.md create mode 100644 pr-body.md create mode 100644 src/militaryInstallationsGate.test.mjs diff --git a/changelog.d/1427-military-installations-cross-site-gate.md b/changelog.d/1427-military-installations-cross-site-gate.md new file mode 100644 index 0000000000..3665da022b --- /dev/null +++ b/changelog.d/1427-military-installations-cross-site-gate.md @@ -0,0 +1,6 @@ +- The military-installations proxy (`/api/military-installations`) now refuses + cross-site browser requests with the same `admitSameSite` gate that protects + the terrain, CCTV, traffic, places, and Celestrak proxies. A cross-site + ``, a foreign `Origin`, an opaque origin, or a reverse-proxy-forwarded + request receives 403 before any Overpass query runs. Same-origin app requests + and bare tool requests (curl, Node harness) continue to work. (Sunil56224972) diff --git a/pr-body.md b/pr-body.md new file mode 100644 index 0000000000..28e73decc2 --- /dev/null +++ b/pr-body.md @@ -0,0 +1,75 @@ +## Summary + +Adds the `admitSameSite` cross-site gate to `/api/military-installations`, as offered in the [#975 merge comment](https://github.com/bilawalsidhu/gods-eye-view/pull/975#issuecomment-6357981946). + +This was the last keyless proxy endpoint without the gate. After this change, every proxy that sends queries upstream now refuses cross-site browser requests before doing any work. + +| Endpoint | Gate before this PR | Gate after | +|----------|-------------------|------------| +| `/api/terrain/heights` | ✅ admitSameSite (#975) | ✅ | +| `/api/cctv/frame/:id` | ✅ admitSameSite (#922) | ✅ | +| `/api/traffic/*` | ✅ admitSameSite | ✅ | +| `/api/google/*` | ✅ admitSameSite | ✅ | +| `/api/gemini/*` | ✅ admitSameSite | ✅ | +| `/api/space/satellites` | ✅ admitSameSite | ✅ | +| `/api/overpass` | ✅ admitSameSite | ✅ | +| `/api/military-installations` | ❌ **none** | ✅ admitSameSite | + +## The problem + +A cross-site page (or an `` tag from any website) can query `/api/military-installations` and trigger upstream Overpass requests on the user's behalf. The endpoint has a rate limiter (90/min), but no cross-site gate — so a hostile page can burn through the user's Overpass quota and exfiltrate the response data. + +Every other proxy in the codebase already refuses these shapes. Military-installations was the gap. + +## The fix + +Two lines in `server/providers/military-installations.js`: + +```diff + import { makeRateLimiter, clientKey } from './common/rate-limit.js'; ++import { admitSameSite } from './common/same-site.js'; +``` + +```diff + if (req.method !== 'GET') { + res.writeHead(405, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ error: 'Method Not Allowed' })); + return; + } ++ if (admitSameSite(req, res)) return; + const url = new URL(req.url, 'http://localhost'); +``` + +Same pattern as terrain.js, cctv.js, traffic.js, google.js, etc. Gate runs before the rate limiter, so refused requests never consume quota. + +`scripts/package-boundaries.json` updated to declare `server/providers/common/same-site.js` and `src/localRequestGate.mjs` as owned modules of `military-installations-provider`. + +## Tests + +New file: `src/militaryInstallationsGate.test.mjs` — 4 integration tests following the `terrainHeightsBounds.test.mjs` pattern: + +``` +✔ cross-site browser requests are refused with 403 (2.4ms) +✔ same-origin browser request is admitted (not 403) (5.3ms) +✔ bare tool request (no Origin, no Sec-Fetch) is admitted (0.9ms) +✔ proxied same-origin requests are refused (proxy headers present) (0.5ms) +``` + +Tested shapes: +- `Sec-Fetch-Site: cross-site` (the `` case) → 403 +- `Sec-Fetch-Site: same-site` (cross-origin sibling) → 403 +- `Origin: https://evil.example` (fetch from hostile page) → 403 +- `Origin: null` (sandboxed iframe) → 403 +- `X-Forwarded-For` + `Sec-Fetch-Site: cross-site` (proxied cross-site) → 403 +- Same-origin with matching `Origin` → admitted +- No `Origin`, no `Sec-Fetch` (curl / Node) → admitted +- Proxy headers with `same-origin` → 403 + +All 4 tests fail on `main` and pass with the fix. + +## Validation + +- `node --test src/localRequestGate.test.mjs src/militaryInstallationsGate.test.mjs`: **18 tests, 18 pass, 0 fail** +- `npm run check:boundaries`: **pass** (military-installations-provider: 15 owned modules) +- `npm run check:import-directions`: pass +- Changelog fragment in `changelog.d/military-installations-cross-site-gate.md` diff --git a/scripts/package-boundaries.json b/scripts/package-boundaries.json index b42d90fdc8..4219b311c6 100644 --- a/scripts/package-boundaries.json +++ b/scripts/package-boundaries.json @@ -298,7 +298,9 @@ "server/providers/overpass/transport.js", "src/sources/httpBody.js", "src/i18n/marker.js", - "src/sources/rateLimit.js" + "src/sources/rateLimit.js", + "server/providers/common/same-site.js", + "src/localRequestGate.mjs" ], "external": [] }, diff --git a/server/providers/military-installations.js b/server/providers/military-installations.js index 7d252b8eda..1b6c82107c 100644 --- a/server/providers/military-installations.js +++ b/server/providers/military-installations.js @@ -1,4 +1,5 @@ import { makeRateLimiter, clientKey } from './common/rate-limit.js'; +import { admitSameSite } from './common/same-site.js'; import { MILITARY_INSTALLATION_ELEMENT_CAP, MILITARY_INSTALLATION_MAX_RESPONSE_BYTES, @@ -97,6 +98,7 @@ function militaryInstallationsProxy() { res.end(JSON.stringify({ error: 'Method Not Allowed' })); return; } + if (admitSameSite(req, res)) return; const url = new URL(req.url, 'http://localhost'); const requested = validMilitaryInstallationBox(url.searchParams); if (!requested) { diff --git a/src/militaryInstallationsGate.test.mjs b/src/militaryInstallationsGate.test.mjs new file mode 100644 index 0000000000..4451c384b4 --- /dev/null +++ b/src/militaryInstallationsGate.test.mjs @@ -0,0 +1,147 @@ +// Military-installations cross-site gate — verifies that the admitSameSite +// gate added in this PR actually refuses the same request shapes the terrain +// and CCTV proxies already refuse, and admits same-origin and bare-tool +// requests. +// +// Run with: npm test +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { militaryInstallationsProxy } from '../server/providers/military-installations.js'; + +function install(plugin) { + const routes = new Map(); + plugin.configureServer({ + middlewares: { + use(path, handler) { + routes.set(path, handler); + }, + }, + }); + return routes; +} + +function request( + handler, + { url = '/', method = 'GET', remoteAddress = '127.0.0.1', reqHeaders = {} } = {}, +) { + return new Promise((resolve, reject) => { + const headers = new Map(); + const req = { + method, + url, + headers: reqHeaders, + socket: { remoteAddress }, + }; + const res = { + statusCode: 200, + headersSent: false, + setHeader(name, value) { + headers.set(String(name).toLowerCase(), String(value)); + }, + writeHead(status, hdrs = {}) { + this.statusCode = status; + this.headersSent = true; + for (const [name, value] of Object.entries(hdrs)) + headers.set(String(name).toLowerCase(), String(value)); + }, + end(body = '') { + let parsed = null; + try { + parsed = body ? JSON.parse(String(body)) : null; + } catch { + parsed = String(body); + } + resolve({ + statusCode: this.statusCode, + headers: Object.fromEntries(headers), + body: parsed, + }); + }, + }; + Promise.resolve(handler(req, res)).catch(reject); + }); +} + +// A valid bbox query string for military-installations. +const VALID_BBOX = '?south=48.8&west=2.2&north=48.9&east=2.4'; +const HOST = 'localhost:5173'; + +test('cross-site browser requests are refused with 403', async () => { + const route = install(militaryInstallationsProxy()).get( + '/api/military-installations', + ); + const refused = [ + // from any web page + { host: HOST, 'sec-fetch-site': 'cross-site' }, + // same-site but cross-origin sibling + { host: HOST, 'sec-fetch-site': 'same-site' }, + // fetch from another page + { host: HOST, origin: 'https://evil.example' }, + // sandboxed frame + { host: HOST, origin: 'null' }, + // behind a reverse proxy with cross-site + { host: HOST, 'x-forwarded-for': '203.0.113.9', 'sec-fetch-site': 'cross-site' }, + ]; + for (const reqHeaders of refused) { + const answer = await request(route, { url: VALID_BBOX, reqHeaders }); + assert.equal( + answer.statusCode, + 403, + `expected 403 for headers ${JSON.stringify(reqHeaders)}, got ${answer.statusCode}`, + ); + } +}); + +test('same-origin browser request is admitted (not 403)', async () => { + const route = install(militaryInstallationsProxy()).get( + '/api/military-installations', + ); + // Same-origin with matching origin header + const answer = await request(route, { + url: VALID_BBOX, + reqHeaders: { + host: HOST, + origin: `http://${HOST}`, + 'sec-fetch-site': 'same-origin', + }, + }); + // Should get past the gate — may be 200, 429, or 503 depending on Overpass config, + // but never 403. + assert.notEqual(answer.statusCode, 403, 'same-origin request should not be refused'); +}); + +test('bare tool request (no Origin, no Sec-Fetch) is admitted', async () => { + const route = install(militaryInstallationsProxy()).get( + '/api/military-installations', + ); + // curl / Node harness — no browser headers at all + const answer = await request(route, { + url: VALID_BBOX, + reqHeaders: { host: HOST }, + }); + assert.notEqual(answer.statusCode, 403, 'bare tool request should not be refused'); +}); + +test('proxied same-origin requests are refused (proxy headers present)', async () => { + const route = install(militaryInstallationsProxy()).get( + '/api/military-installations', + ); + const proxied = [ + { host: HOST, 'sec-fetch-site': 'same-origin', 'x-forwarded-for': '203.0.113.9' }, + { host: HOST, 'sec-fetch-site': 'same-origin', 'cf-connecting-ip': '203.0.113.9' }, + { + host: HOST, + 'sec-fetch-site': 'same-origin', + forwarded: 'for=203.0.113.9;proto=https', + via: '1.1 caddy', + }, + ]; + for (const reqHeaders of proxied) { + const answer = await request(route, { url: VALID_BBOX, reqHeaders }); + assert.equal( + answer.statusCode, + 403, + `expected 403 for proxied headers ${JSON.stringify(reqHeaders)}, got ${answer.statusCode}`, + ); + } +}); From 003a622602c72b7edc8e3245478d4c7473e83212 Mon Sep 17 00:00:00 2001 From: Aditya <205600203+Rohilalala@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:57:12 +0530 Subject: [PATCH 012/237] docs(changelog): add #1432 fragment --- changelog.d/1432-vessel-course-north.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/1432-vessel-course-north.md diff --git a/changelog.d/1432-vessel-course-north.md b/changelog.d/1432-vessel-course-north.md new file mode 100644 index 0000000000..45d9e58455 --- /dev/null +++ b/changelog.d/1432-vessel-course-north.md @@ -0,0 +1,3 @@ +- Show a vessel course of 359.5° or more as 0°. Vessel cards and the AIS HUD + rounded the course without wrapping, so a ship with no reported heading on + a 359.7° course read "360°" and "HDG: 360DEG" (Aditya, @Rohilalala, #1432). From 7a1a9cc7064707651921eee7f790bca5bd81fc88 Mon Sep 17 00:00:00 2001 From: Aditya <205600203+Rohilalala@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:57:20 +0530 Subject: [PATCH 013/237] docs(changelog): add #1433 fragment --- changelog.d/1433-awareness-marker-kilometre.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/1433-awareness-marker-kilometre.md diff --git a/changelog.d/1433-awareness-marker-kilometre.md b/changelog.d/1433-awareness-marker-kilometre.md new file mode 100644 index 0000000000..86cfbd4312 --- /dev/null +++ b/changelog.d/1433-awareness-marker-kilometre.md @@ -0,0 +1,3 @@ +- Show a Contacts marker 999.5 m or more away as 1.0 km. The on-globe marker + chose metres before rounding, so 999.6 m read "1000 m" while the panel read + "1.0 km" (Aditya, @Rohilalala, #1433). From 5d9264e65f4c4c8d2e527a0e2ad9e1ab1ab4739a Mon Sep 17 00:00:00 2001 From: Aditya <205600203+Rohilalala@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:57:27 +0530 Subject: [PATCH 014/237] docs(changelog): add #1434 fragment --- changelog.d/1434-voice-unknown-altitude.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/1434-voice-unknown-altitude.md diff --git a/changelog.d/1434-voice-unknown-altitude.md b/changelog.d/1434-voice-unknown-altitude.md new file mode 100644 index 0000000000..229d318001 --- /dev/null +++ b/changelog.d/1434-voice-unknown-altitude.md @@ -0,0 +1,3 @@ +- Selecting the nearest aircraft by voice no longer says "0 feet" for a contact + whose feed reported no altitude; the reply and card leave the altitude out + (Aditya, @Rohilalala, #1434). From ffbb0f9d6512346b0424c64930a9335632a78746 Mon Sep 17 00:00:00 2001 From: Aditya <205600203+Rohilalala@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:57:42 +0530 Subject: [PATCH 015/237] docs(changelog): add #1436 fragment --- changelog.d/1436-military-geom-vertical-rate.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/1436-military-geom-vertical-rate.md diff --git a/changelog.d/1436-military-geom-vertical-rate.md b/changelog.d/1436-military-geom-vertical-rate.md new file mode 100644 index 0000000000..ddeb5b4aa9 --- /dev/null +++ b/changelog.d/1436-military-geom-vertical-rate.md @@ -0,0 +1,3 @@ +- Military aircraft whose transponders report a GNSS vertical rate now carry it + in analyst and tracked-aircraft data instead of null (Aditya, @Rohilalala, + #1436). From 8785f4c886e971c274a2497911b6496d9ff70352 Mon Sep 17 00:00:00 2001 From: Enzo Abyie Date: Wed, 28 Oct 2026 12:37:14 +0400 Subject: [PATCH 016/237] i18n(ar): Arabic strings from #915 The Arabic locale by abiyeenzo (#915), converted from its namespaced JS catalogs to the English-keyed ar.json: 852 entries whose English still matches the current UI. --- src/i18n/locales/ar.json | 903 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 903 insertions(+) create mode 100644 src/i18n/locales/ar.json diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json new file mode 100644 index 0000000000..fdf764b5d8 --- /dev/null +++ b/src/i18n/locales/ar.json @@ -0,0 +1,903 @@ +{ + "NO PLACE LEFT BEHIND": "لا مكان يُترك خلفنا", + "Initializing photorealistic world...": "جارٍ تهيئة العالم الواقعي...", + "Configuring viewer...": "جارٍ إعداد العارض...", + "Google 3D Tiles unavailable ({detail}). Loading the keyless globe...": "بلاطات Google 3D Tiles غير متاحة ({detail}). جارٍ تحميل الكرة الأرضية بلا مفتاح...", + "Flying to Austin, TX...": "جارٍ الانتقال إلى أوستن، تكساس...", + "Restoring shared view...": "جارٍ استعادة العرض المشترك...", + "LOADING LIVE DATA": "جارٍ تحميل البيانات الحية", + "LOAD COMPLETE": "اكتمل التحميل", + "LOAD FAILED": "فشل التحميل", + "LOAD CANCELLED": "أُلغي التحميل", + "syncing road network": "مزامنة شبكة الطرق", + "retrying in {seconds}s": "إعادة المحاولة خلال {seconds} ث", + "retry pending": "إعادة المحاولة معلّقة", + "Clear selected data layers": "مسح طبقات البيانات المحددة", + "Turn off all selected data layers": "إيقاف جميع طبقات البيانات المحددة", + "Copy share link": "نسخ رابط المشاركة", + "Reset to full globe view": "العودة إلى عرض الكرة الأرضية كاملة", + "DATA LAYERS": "طبقات البيانات", + "Collapse panel": "طي اللوحة", + "Navigation, voice, and visual preset controls": "عناصر التنقل والتحكم الصوتي والأنماط البصرية", + "Globe actions": "إجراءات الكرة الأرضية", + "Reset camera and return to full globe view": "إعادة ضبط الكاميرا والعودة إلى عرض الكرة الأرضية كاملة", + "loading frames": "جارٍ تحميل الإطارات", + "Loading Google 3D Tiles...": "جارٍ تحميل بلاطات Google 3D Tiles...", + "Loading the keyless globe...": "جارٍ تحميل الكرة الأرضية بلا مفتاح...", + "Initializing systems...": "جارٍ تهيئة الأنظمة...", + "LIVE DATA OFF": "البيانات الحية متوقفة", + "MAPPED SITES LOADED": "تم تحميل المواقع المرسومة", + "RETRYING MAPPED SITES": "إعادة محاولة المواقع المرسومة", + "FETCHING MAPPED SITES": "جارٍ جلب المواقع المرسومة", + "TURNING OFF LIVE DATA": "جارٍ إيقاف البيانات الحية", + "REFRESHING LIVE DATA": "جارٍ تحديث البيانات الحية", + "Close data attribution": "إغلاق إسناد البيانات", + "MISSION CONTROL · FIRST LAUNCH": "مركز التحكم · أول تشغيل", + "Choose your first view": "اختر عرضك الأول", + "LIVE CONTACTS": "الأهداف الحية", + "Don't show this again": "لا تعرض هذا مرة أخرى", + "POWER UP": "تشغيل", + "GROUND STATION · PROVIDER SETTINGS": "المحطة الأرضية · إعدادات المزوّدين", + "Power up the globe": "شغّل الكرة الأرضية", + "SAVE KEYS": "حفظ المفاتيح", + "Saving…": "جارٍ الحفظ…", + "It feels like a forbidden cockpit—then you realize the sources are public and the data is real.": "يبدو الأمر كقمرة قيادة محظورة—ثم تدرك أن المصادر عامة والبيانات حقيقية.", + "Aircraft, vessels and nearby intelligence": "طائرات وسفن ومعلومات استخباراتية قريبة", + "SPACE MISSIONS": "المهام الفضائية", + "Launches, spacecraft and orbital context": "عمليات إطلاق ومركبات وسياق مداري", + "EXPLORE MANUALLY": "استكشاف يدوي", + "Begin with a clean globe": "ابدأ بكرة أرضية نظيفة", + "ESC to dismiss": "اضغط ESC للإغلاق", + "Tip: the GEV MIC button in the dock lets you talk to the map.": "نصيحة: زر GEV MIC في الشريط السفلي يتيح لك التحدث إلى الخريطة.", + "Close key setup": "إغلاق إعداد المفاتيح", + "The globe already flies keyless. Every key below switches on another real feed — paste one and it's saved into this app's local configuration, then the server restarts itself. Server-side keys stay on this machine; Google Maps and Cesium ion run in the browser and must be provider-restricted. Keys you configured elsewhere are shown but never touched.": "تعمل الكرة الأرضية بلا مفاتيح أصلًا. كل مفتاح أدناه يفعّل مصدرًا حقيقيًا إضافيًا: الصق مفتاحًا فيُحفظ في إعدادات هذا التطبيق المحلية، ثم يعيد الخادم تشغيل نفسه. تبقى مفاتيح الخادم على هذا الجهاز، أما Google Maps وCesium ion فتعملان في المتصفح ويجب تقييدهما بحسب المزوّد. المفاتيح التي أعددتها في مكان آخر تظهر دون أن تُمَسّ.", + "ESC to close": "اضغط ESC للإغلاق", + "The Google Maps key buys the photorealistic planet — everything else stacks on top.": "مفتاح Google Maps يمنحك الكوكب الواقعي، وكل ما سواه يُضاف فوقه.", + "SCENES": "المشاهد", + "Scene recipe": "قالب المشهد", + "NEW": "جديد", + "DEL": "حذف", + "CAPTURE SHOT": "التقاط لقطة", + "UPDATE SHOT": "تحديث اللقطة", + "START": "بدء", + "STOP": "إيقاف", + "NEXT": "التالي", + "EXPORT PRESETS": "تصدير الإعدادات المسبقة", + "IMPORT": "استيراد", + "RUN LOG": "سجل التشغيل", + "Ready": "جاهز", + "Starting live contacts…": "جارٍ تشغيل الأهداف الحية…", + "Opening space missions…": "جارٍ فتح المهام الفضائية…", + "Scanning active events…": "جارٍ مسح الأحداث النشطة…", + "Working…": "جارٍ العمل…", + "Could not open that mission{detail}. Retry or explore manually.": "تعذّر فتح تلك المهمة{detail}. أعد المحاولة أو استكشف يدويًا.", + "This browser is blocking storage, so that could not be saved.": "هذا المتصفح يحظر التخزين، لذا تعذّر الحفظ.", + "Live earthquakes and active fires, from USGS and NASA": "زلازل وحرائق نشطة حية، من USGS وNASA", + "ENVIRONMENTAL": "البيئة", + "EARTH WATCH": "مراقبة الأرض", + "ACTIVE EVENTS": "الأحداث النشطة", + "POWER UP · {count} KEYS WAITING": { + "zero": "تشغيل · لا مفاتيح في الانتظار ({count})", + "one": "تشغيل · مفتاح واحد في الانتظار ({count})", + "two": "تشغيل · مفتاحان في الانتظار ({count})", + "few": "تشغيل · {count} مفاتيح في الانتظار", + "many": "تشغيل · {count} مفتاحًا في الانتظار", + "other": "تشغيل · {count} مفتاح في الانتظار" + }, + "POWERED UP": "تم التشغيل", + "Save failed ({status}).": "فشل الحفظ ({status}).", + "Save failed: {detail}": "فشل الحفظ: {detail}", + "Paste at least one key first.": "الصق مفتاحًا واحدًا على الأقل أولًا.", + "Saved to {store}. Restarting — this page reloads itself.": "تم الحفظ في {store}. جارٍ إعادة التشغيل — ستُحمَّل هذه الصفحة من جديد تلقائيًا.", + "Removed from {store}. Restarting — this page reloads itself.": "تمت الإزالة من {store}. جارٍ إعادة التشغيل — ستُحمَّل هذه الصفحة من جديد تلقائيًا.", + "your app configuration": "إعدادات التطبيق لديك", + "your local .env": "ملف .env المحلي لديك", + "Remove this key from your saved configuration?": "إزالة هذا المفتاح من إعداداتك المحفوظة؟", + "This map stack": "حزمة الخرائط هذه", + "{label} is unavailable": "{label} غير متاحة", + "{label} unavailable: {hint}": "{label} غير متاحة: {hint}", + "Global Flights Radar": "رادار الرحلات العالمي", + "Orbital Watch": "المراقبة المدارية", + "Thermal Threat Board": "لوحة التهديدات الحرارية", + "City Overload": "ازدحام المدينة", + "Omniscience Pullback": "الإطلالة الشاملة", + "OFF": "متوقف", + "CONNECTING": "جارٍ الاتصال", + "ERROR": "خطأ", + "Session ended — cost cap {cost}": "انتهت الجلسة — بلغت حد التكلفة {cost}", + "VOICE STANDBY": "الصوت في وضع الاستعداد", + "VOICE ACTIVE": "الصوت نشط", + "VOICE UNAVAILABLE": "الصوت غير متاح", + "WebRTC microphone support unavailable": "دعم ميكروفون WebRTC غير متاح", + "Requesting microphone": "جارٍ طلب الميكروفون", + "Hold Space to talk": "اضغط مطولًا على Space للتحدث", + "Release Space to send": "حرّر Space للإرسال", + "Ask or command": "اسأل أو أصدر أمرًا", + "Voice off": "الصوت متوقف", + "Running command": "جارٍ تنفيذ الأمر", + "Radio did not start": "لم يبدأ الراديو", + "Hold Space to speak · tap Space to activate focused controls": "اضغط مطولًا على Space للتحدث · اضغط Space مرة واحدة لتفعيل العنصر المحدد", + "Voice session could not be started.": "تعذّر بدء الجلسة الصوتية.", + "VOICE SYSTEM ERROR": "خطأ في النظام الصوتي", + "DISMISS": "تجاهل", + "Check microphone permission and network access, then try again.": "تحقق من إذن الميكروفون والاتصال بالشبكة، ثم أعد المحاولة.", + "AI AGENT": "وكيل ذكاء اصطناعي", + "VOICE CONTROL": "التحكم الصوتي", + "{tier} applies next session": "{tier} يسري في الجلسة التالية", + "Voice model tier — applies next session": "فئة النموذج الصوتي — تسري في الجلسة التالية", + "Estimated session cost": "التكلفة التقديرية للجلسة", + "Voice control — activate to toggle voice; hold Space to speak": "التحكم الصوتي — فعّله لتشغيل الصوت أو إيقافه، واضغط مطولًا على Space للتحدث", + "Cannot capture shot: camera not ready": "تعذّر التقاط اللقطة: الكاميرا غير جاهزة", + "Shot {n}": "لقطة {n}", + "Captured: {scene} / {shot}": "تم الالتقاط: {scene} / {shot}", + "Select a shot first": "اختر لقطة أولًا", + "Updated: {scene} / {shot}": "تم التحديث: {scene} / {shot}", + "Delete shot \"{shot}\"?": "حذف اللقطة \"{shot}\"؟", + "Loaded: {scene} / {shot}": "تم التحميل: {scene} / {shot}", + "Camera unavailable — exit cockpit first": "الكاميرا غير متاحة — اخرج من قمرة القيادة أولًا", + "No shots to run": "لا توجد لقطات للتشغيل", + "Running {index}/{total}: {scene} / {shot}": "جارٍ التشغيل {index}/{total}: {scene} / {shot}", + "Scene run complete": "اكتمل تشغيل المشهد", + "Error: {message}": "خطأ: {message}", + "Could not exit {mode} — scene layers may be refused": "تعذّر الخروج من {mode} — قد تُرفض طبقات المشهد", + "REMOVE": "إزالة", + "Remove {title} from this app's saved keys": "إزالة {title} من مفاتيح هذا التطبيق المحفوظة", + "Needs {envVars} — add it in Provider Settings": "يحتاج إلى {envVars} — أضفه في إعدادات المزوّدين", + "Places context + Street View fallback; optional separate key": "سياق الأماكن + بديل Street View؛ مفتاح منفصل اختياري", + "Live ships, worldwide": "السفن الحية حول العالم", + "Live active-fire detections": "رصد الحرائق النشطة مباشرة", + "Real live traffic (keyless runs a simulation)": "حركة مرور حية حقيقية (بدون مفتاح تُعرض محاكاة)", + "Bing imagery map stacks + world terrain": "حزم خرائط صور Bing + تضاريس العالم", + "More flight-polling credits (anonymous works without)": "رصيد أكبر لاستعلام الرحلات (يعمل دونه بصفة مجهولة)", + "Scene action failed": "فشل إجراء المشهد", + "Project exported": "تم تصدير المشروع", + "Next session: {pendingId} — this session stays on {modelId}": "الجلسة التالية: {pendingId} — تبقى هذه الجلسة على {modelId}", + "Voice model: {pendingId} — click to switch to {target}; applies next session": "النموذج الصوتي: {pendingId} — انقر للتبديل إلى {target}؛ يسري في الجلسة التالية", + "Estimated session cost on {modelId} — {responses} response(s). Warns at {warn}, ends the session at {cap}.": "التكلفة التقديرية للجلسة على {modelId} — عدد الاستجابات: {responses}. تنبيه عند {warn}، وتنتهي الجلسة عند {cap}.", + "Aircraft cockpit view": "عرض قمرة قيادة الطائرة", + "EXIT COCKPIT": "الخروج من القمرة", + "GROUND SPEED": "السرعة الأرضية", + "ALTITUDE": "الارتفاع", + "CONTACT": "الهدف", + "CONTACTS · 250 KM": "الأهداف · 250 KM", + "LIVE SIGNALS": "إشارات حية", + "OBSERVED / MAPPED PINGS": "إشارات مرصودة / مرسومة", + "CURRENT": "الحالي", + "READY": "جاهز", + "ACTIVE STYLE": "النمط النشط", + "Return UI controls": "إعادة عناصر التحكم", + "EXIT CLEAN VIEW": "الخروج من العرض النظيف", + "Expand Visual Presets": "توسيع الأنماط البصرية", + "VISUAL PRESETS": "الأنماط البصرية", + "Pin visual presets": "تثبيت الأنماط البصرية", + "Keep visual presets open": "إبقاء الأنماط البصرية مفتوحة", + "Show the globe without a visual filter.": "عرض الكرة الأرضية دون مرشح بصري.", + "Normal": "عادي", + "Emulate a green phosphor CRT with scanlines and screen curvature.": "محاكاة شاشة CRT فوسفورية خضراء مع خطوط المسح وانحناء الشاشة.", + "CRT": "CRT", + "Simulate night-vision goggles with green intensification and a tube vignette.": "محاكاة نظارات الرؤية الليلية بتضخيم أخضر وتعتيم أطراف الأنبوب.", + "NVG": "NVG", + "Simulate FLIR-style thermal contrast. Turn up Ironbow for color.": "محاكاة تباين حراري بأسلوب FLIR. ارفع Ironbow لإظهار الألوان.", + "FLIR": "FLIR", + "Apply bright cel-shaded color and illustrated outlines.": "تطبيق ألوان زاهية مظلّلة بخطوط رسم توضيحية.", + "Anime": "أنمي", + "Apply high-contrast monochrome film-noir grading.": "تطبيق تدرج أحادي اللون عالي التباين بأسلوب الفيلم نوار.", + "Noir": "نوار", + "Add a cold, snowy whiteout treatment to the scene.": "إضافة تأثير بياض ثلجي بارد إلى المشهد.", + "Snow": "ثلج", + "MAP SOURCE": "مصدر الخريطة", + "Map source": "مصدر الخريطة", + "Style": "النمط", + "DISPLAY": "العرض", + "Intelligence HUD (H)": "لوحة المعلومات الاستخباراتية (H)", + "Layout": "التخطيط", + "HUD layout": "تخطيط اللوحة", + "Tactical": "تكتيكي", + "Operator": "المشغّل", + "Minimal": "مبسّط", + "Detection Overlay (D)": "طبقة الكشف (D)", + "Detection overlay": "طبقة الكشف", + "DETECT": "كشف", + "Density": "الكثافة", + "Detection label density": "كثافة تسميات الكشف", + "Allocation": "التوزيع", + "Detection label allocation": "توزيع تسميات الكشف", + "Elastic": "مرن", + "Weighted": "مرجّح", + "Fade": "التلاشي", + "Detection fade distance": "مسافة تلاشي الكشف", + "World-overlay fade distance outside the keyhole as a percentage of its radius": "مسافة تلاشي طبقة العالم خارج الفتحة كنسبة مئوية من نصف قطرها", + "Outside": "الخارج", + "Detection opacity outside the keyhole": "عتامة الكشف خارج الفتحة", + "World-overlay label and card opacity beyond the fade distance": "عتامة التسميات والبطاقات في طبقة العالم بعد مسافة التلاشي", + "PARAMETERS": "المعاملات", + "3D aircraft — flat icons zoomed out, 3D models up close": "طائرات ثلاثية الأبعاد — أيقونات مسطحة عند التصغير ونماذج ثلاثية الأبعاد عن قرب", + "Models": "النماذج", + "3D model coverage": "تغطية النماذج ثلاثية الأبعاد", + "Proximity": "القريبة", + "All": "الكل", + "Scope — the circular viewport mask": "المنظار — قناع منفذ العرض الدائري", + "Scope": "المنظار", + "Feather": "التنعيم", + "Scope edge feather as a percentage of the keyhole radius": "تنعيم حافة المنظار كنسبة مئوية من نصف قطر الفتحة", + "Celestial ring — reveal the full globe": "الحلقة السماوية — إظهار الكرة الأرضية كاملة", + "Celestial": "سماوي", + "Hide UI chrome": "إخفاء عناصر الواجهة", + "Clean UI": "واجهة نظيفة", + "Bloom / Glow": "التوهج / الإضاءة", + "Bloom": "التوهج", + "Sharpening": "زيادة الحدة", + "Sharpen": "الحدة", + "LOCATION": "الموقع", + "Pin location tray": "تثبيت درج المواقع", + "Keep location tray open": "إبقاء درج المواقع مفتوحًا", + "📍 Location: --": "📍 الموقع: --", + "Landmark: --": "المَعلم: --", + "Search any location": "البحث عن أي موقع", + "Search any location...": "ابحث عن أي موقع...", + "LEVEL": "المستوى", + "Estimated destination direction": "اتجاه الوجهة التقديري", + "DEST ---°": "الوجهة ---°", + "OPTICAL PLANE · 01": "المستوى البصري · 01", + "VISOR LOCK · ACTIVE": "قفل الحاجب · نشط", + "FIRST PERSON": "منظور الشخص الأول", + "LIVE TRACK · COURSE ALIGNED": "تتبع حي · المسار متوافق", + "Cockpit vision style": "نمط رؤية القمرة", + "Current aircraft heading": "اتجاه الطائرة الحالي", + "GROUND SPEED · KTS": "السرعة الأرضية · KTS", + "ALTITUDE · FT": "الارتفاع · FT", + "PREV": "السابق", + "Previous cockpit vision style": "نمط رؤية القمرة السابق", + "Previous vision style": "نمط الرؤية السابق", + "Current cockpit vision style: NORMAL. Activate for next style.": "نمط رؤية القمرة الحالي: NORMAL. فعّل للانتقال إلى النمط التالي.", + "Current style: NORMAL — click for next": "النمط الحالي: NORMAL — انقر للتالي", + "Next cockpit vision style": "نمط رؤية القمرة التالي", + "Next vision style": "نمط الرؤية التالي", + "View switcher": "مبدّل العرض", + "Reset cockpit to full globe view": "إعادة القمرة إلى عرض الكرة الأرضية كاملة", + "Exit cockpit and return to full globe view": "الخروج من القمرة والعودة إلى عرض الكرة الأرضية كاملة", + "RESET": "إعادة ضبط", + "Exit cockpit view": "الخروج من عرض القمرة", + "Estimated flight plan": "خطة الرحلة التقديرية", + "ESTIMATED FLIGHT PLAN": "خطة الرحلة التقديرية", + "ROUTE DATA UNAVAILABLE": "بيانات المسار غير متاحة", + "FROM": "من", + "TO": "إلى", + "UNKNOWN": "غير معروف", + "Cockpit briefing carousel": "شريط الإحاطة في القمرة", + "Cockpit briefing controls": "عناصر التحكم في إحاطة القمرة", + "Previous briefing page": "صفحة الإحاطة السابقة", + "Next briefing page": "صفحة الإحاطة التالية", + "Cycle briefing pages automatically every 9 seconds (Signals → News → Local). Pauses while you hover or focus the panel. Live signal data refreshes continuously either way.": "تدوير صفحات الإحاطة تلقائيًا كل 9 ثوانٍ (الإشارات ← الأخبار ← المحلي). يتوقف أثناء تمرير المؤشر أو التركيز على اللوحة. تتجدد بيانات الإشارات الحية باستمرار في الحالتين.", + "Collapse cockpit briefing panel": "طي لوحة إحاطة القمرة", + "Collapse briefing panel": "طي لوحة الإحاطة", + "Live signals": "الإشارات الحية", + "Latest regional news": "آخر الأخبار الإقليمية", + "Location-based information": "معلومات بحسب الموقع", + "ACQUIRING REGIONAL NEWS": "جارٍ جلب الأخبار الإقليمية", + "RESOLVING REGION": "جارٍ تحديد المنطقة", + "TEMP": "الحرارة", + "WIND": "الرياح", + "SKY": "السماء", + "PRECIP": "الهطول", + "SOURCE-BACKED EVENTS · NO SYNTHETIC NEWS": "أحداث موثّقة المصدر · بلا أخبار مصطنعة", + "Show Live Signals": "عرض الإشارات الحية", + "Show Regional News": "عرض الأخبار الإقليمية", + "Show Local Info": "عرض المعلومات المحلية", + "Contact cockpit summary": "ملخص الهدف في القمرة", + "Contact navigation": "التنقل بين الأهداف", + "Previous — prior visited contact in the 250 km window": "السابق — الهدف الذي زرته قبل هذا ضمن نطاق 250 km", + "Next — nearest unvisited contact in the 250 km window": "التالي — أقرب هدف لم تزره ضمن نطاق 250 km", + "Collapse Contact panel": "طي لوحة الهدف", + "Collapse contact panel": "طي لوحة الهدف", + "CONTEXT ONLY": "للسياق فقط", + "Nearby cohort counts": "أعداد المجموعات القريبة", + "NEAREST OBSERVED / MAPPED": "الأقرب المرصود / المرسوم", + "NO AVAILABLE EXAMPLE": "لا يوجد مثال متاح", + "AVAILABLE INPUTS ONLY · NOT AN ALL-CLEAR": "المدخلات المتاحة فقط · لا يعني أن الوضع آمن", + "Enable cockpit weather effects": "تفعيل مؤثرات الطقس في القمرة", + "CONTEXT": "السياق", + "Expand panel": "توسيع اللوحة", + "Context mode": "وضع السياق", + "CONTACTS": "الأهداف", + "Cycles the nearest contacts of whatever type you select — planes, vessels, installations. Satellites track independently.": "يتنقل بين أقرب الأهداف من أي نوع تختاره: طائرات أو سفن أو منشآت. أما الأقمار الصناعية فتُتتبَّع بشكل مستقل.", + "SELECT CONTEXT": "اختر السياق", + "Contact Context actions": "إجراءات سياق الهدف", + "COCKPIT": "القمرة", + "SEARCH NEARBY SITES": "البحث عن المواقع القريبة", + "Reclassify tracked contact as TR-3B": "إعادة تصنيف الهدف المتتبَّع إلى TR-3B", + "Reclassify as TR-3B": "إعادة التصنيف إلى TR-3B", + "CONTACTS CONTEXT OFF": "سياق الأهداف متوقف", + "SELECT CONTACTS TO LOAD OBSERVED / MAPPED PROXIMITY": "اختر الأهداف لتحميل القرب المرصود / المرسوم", + "Available Space Missions": "المهام الفضائية المتاحة", + "AVAILABLE MISSIONS": "المهام المتاحة", + "SELECT A MISSION TO INSPECT": "اختر مهمة لفحصها", + "LOADING 30-DAY MISSION INDEX": "جارٍ تحميل فهرس مهام 30 يومًا", + "Open compact Radio controls": "فتح عناصر تحكم الراديو المصغّرة", + "Compact Radio controls": "عناصر تحكم الراديو المصغّرة", + "RADIO": "الراديو", + "RADIO READY": "الراديو جاهز", + "Open detailed Radio controls": "فتح عناصر تحكم الراديو التفصيلية", + "Close compact Radio controls": "إغلاق عناصر تحكم الراديو المصغّرة", + "ENABLE": "تفعيل", + "Previous filtered radio station": "محطة الراديو السابقة في القائمة المصفّاة", + "Previous station": "المحطة السابقة", + "Play selected radio station": "تشغيل محطة الراديو المحددة", + "Play": "تشغيل", + "Next filtered radio station": "محطة الراديو التالية في القائمة المصفّاة", + "Next station": "المحطة التالية", + "VOLUME": "الصوت", + "Compact Radio volume": "مستوى صوت الراديو المصغّر", + "Cockpit display and Radio controls": "عناصر تحكم العرض والراديو في القمرة", + "Expand Cockpit display options": "توسيع خيارات عرض القمرة", + "Cockpit display options": "خيارات عرض القمرة", + "Expand Cockpit Radio controls": "توسيع عناصر تحكم الراديو في القمرة", + "Cockpit compact Radio controls": "عناصر تحكم الراديو المصغّرة في القمرة", + "Cockpit Radio volume": "مستوى صوت راديو القمرة", + "Expand {name}": "توسيع {name}", + "Collapse {name}": "طي {name}", + "panel": "اللوحة", + "Collapse Radio": "طي الراديو", + "Collapse Radio section": "طي قسم الراديو", + "Searched location": "الموقع المبحوث عنه", + "Disable cockpit weather effects": "إيقاف مؤثرات الطقس في القمرة", + "ON": "تشغيل", + "Restore real aircraft": "استعادة الطائرة الحقيقية", + "Night vision": "رؤية ليلية", + "Thermal": "حراري", + "Current cockpit vision style: {style}. Activate for next style.": "نمط رؤية القمرة الحالي: {style}. فعّل للانتقال إلى النمط التالي.", + "Current style: {style} — click for next": "النمط الحالي: {style} — انقر للتالي", + "TRACK ACQUIRED": "تم التقاط المسار", + "{label} · COURSE {heading}°": "{label} · المسار {heading}°", + "Select flight {title}": "اختيار الرحلة {title}", + "CONTEXT STANDBY": "السياق في وضع الاستعداد", + "ENABLE GLOBAL CONTEXT FOR PROXIMITY PINGS": "فعّل السياق العالمي لإشارات القرب", + "CONTACT LOST · {subject}": "فُقد الهدف · {subject}", + "SUBJECT LEFT ITS FEED · READOUT HOLDING LAST KNOWN": "غادر الهدف مصدر بياناته · القراءة تحتفظ بآخر قيمة معروفة", + "MILITARY FLIGHT": "رحلة عسكرية", + "COMMERCIAL FLIGHT": "رحلة تجارية", + "{aircraftClass} · CURRENT": "{aircraftClass} · الحالي", + "{aircraftClass} · {distance}": "{aircraftClass} · {distance}", + "DISTANCE UNKNOWN": "المسافة غير معروفة", + "{count} INPUTS UNKNOWN": { + "zero": "لا مدخلات مجهولة ({count})", + "one": "مدخل واحد مجهول ({count})", + "two": "مدخلان مجهولان ({count})", + "few": "{count} مدخلات مجهولة", + "many": "{count} مدخلًا مجهولًا", + "other": "{count} مدخل مجهول" + }, + "SOURCE STATUS UNAVAILABLE": "حالة المصدر غير متاحة", + "AIRCRAFT": "طائرة", + "MILITARY": "عسكرية", + "COMMERCIAL": "تجارية", + "ACQUIRING SURFACE": "جارٍ التقاط السطح", + "SURFACE FALLBACK": "سطح بديل", + "STALE FEED": "بيانات متقادمة", + "LIVE TRACK": "تتبع حي", + "{aircraftClass} · {feedState} · COURSE ALIGNED": "{aircraftClass} · {feedState} · المسار متوافق", + "ARROW · ESTIMATED DIRECTION": "سهم · اتجاه تقديري", + "DEST {bearing}": "الوجهة {bearing}", + "CONTACT LOST · LAST KNOWN READOUT · NOT AN ALL-CLEAR": "فُقد الهدف · آخر قراءة معروفة · لا يعني أن الوضع آمن", + "{count} INPUTS UNKNOWN · NOT AN ALL-CLEAR": { + "zero": "لا مدخلات مجهولة ({count}) · لا يعني أن الوضع آمن", + "one": "مدخل واحد مجهول ({count}) · لا يعني أن الوضع آمن", + "two": "مدخلان مجهولان ({count}) · لا يعني أن الوضع آمن", + "few": "{count} مدخلات مجهولة · لا يعني أن الوضع آمن", + "many": "{count} مدخلًا مجهولًا · لا يعني أن الوضع آمن", + "other": "{count} مدخل مجهول · لا يعني أن الوضع آمن" + }, + "AVAILABLE INPUTS CURRENT · NOT AN ALL-CLEAR": "المدخلات المتاحة محدّثة · لا يعني أن الوضع آمن", + "{cohort} · {contact}": "{cohort} · {contact}", + "{cohort}, Unavailable": "{cohort}، غير متاح", + "BRG —": "BRG —", + "AHEAD": "أمامك", + "{side} {angle}": "{side} {angle}", + "L": "يسار", + "R": "يمين", + "Expand Contact panel": "توسيع لوحة الهدف", + "Expand contact panel": "توسيع لوحة الهدف", + "Expand cockpit briefing panel": "توسيع لوحة إحاطة القمرة", + "Expand briefing panel": "توسيع لوحة الإحاطة", + "CYCLE ON": "التدوير مفعّل", + "CYCLE OFF": "التدوير متوقف", + "Stop automatic page cycling. Previous, Next, and the SIG/NEWS/LOCAL tabs stay available.": "إيقاف التدوير التلقائي للصفحات. تبقى أزرار السابق والتالي وتبويبات SIG/NEWS/LOCAL متاحة.", + "REGIONAL NEWS": "أخبار إقليمية", + "LOCAL INFO": "معلومات محلية", + "LATEST LOCATION-MATCHED REPORTING": "أحدث التقارير المطابقة للموقع", + "PLACE / CONDITIONS / POSITION": "المكان / الأحوال / الموضع", + "POSITION UNAVAILABLE": "الموضع غير متاح", + "REGIONAL NEWS UNAVAILABLE": "الأخبار الإقليمية غير متاحة", + "REGION UNAVAILABLE": "المنطقة غير متاحة", + "NO RECENT LOCATION MATCHES": "لا توجد تقارير حديثة مطابقة للموقع", + "SOURCE": "المصدر", + "{domain} · {age}": "{domain} · {age}", + "{source} · LOCATION QUERY": "{source} · استعلام الموقع", + "TIME UNKNOWN": "الوقت غير معروف", + "{count}M AGO": "قبل {count} د", + "{count}H AGO": "قبل {count} س", + "{count}D AGO": "قبل {count} يوم", + "DIR UNKNOWN": "الاتجاه غير معروف", + "CLOUD {pct}%": "الغيوم {pct}%", + "CLOUD UNKNOWN": "الغيوم غير معروفة", + "Panel layout updated — positions reset to new defaults": "تم تحديث تخطيط اللوحات — أُعيدت المواضع إلى الإعدادات الافتراضية الجديدة", + "Link copied!": "تم نسخ الرابط!", + "Copy failed": "تعذّر النسخ", + "Location not found": "الموقع غير موجود", + "Search failed": "فشل البحث", + "Fly to a POI first": "انتقل إلى معلم أولًا", + "Clearing selected data layers": "جارٍ مسح طبقات البيانات المحددة", + "Selected data layers could not be cleared": "تعذّر مسح طبقات البيانات المحددة", + "ACQUIRING": "جارٍ الالتقاط", + "entity": "عنصر", + "SHARED {subject}": "مشاركة: {subject}", + "Shared {subject} follow expired": "انتهت متابعة المشاركة: {subject}", + "Shared {subject} could not be restored — feed unavailable": "تعذّرت استعادة المشاركة — المصدر غير متاح: {subject}", + "Shared {subject} is unavailable": "المشاركة غير متاحة: {subject}", + "Context": "السياق", + "Space Missions": "المهام الفضائية", + "{mode} could not start because another layer did not stop cleanly": "تعذّر بدء {mode} لأن طبقة أخرى لم تتوقف بشكل سليم", + "Contacts could not complete the requested transition; try again": "تعذّر على الأهداف إكمال الانتقال المطلوب؛ أعد المحاولة", + "Space Missions could not complete the requested transition; try again": "تعذّر على المهام الفضائية إكمال الانتقال المطلوب؛ أعد المحاولة", + "Nearby installations could not be refreshed; try again": "تعذّر تحديث المنشآت القريبة؛ أعد المحاولة", + "Context could not restore every layer; try again": "تعذّر على السياق استعادة كل الطبقات؛ أعد المحاولة", + "Zoom in to search mapped installations": "قرّب الخريطة للبحث في المنشآت المرسومة", + "Nearby installations refreshed": "تم تحديث المنشآت القريبة", + "That layer is unavailable in the current Context mode": "هذه الطبقة غير متاحة في وضع السياق الحالي", + "start": "بدء", + "stop": "إيقاف", + "{layerId} could not {action} cleanly": "تعذّر {action} {layerId} بشكل سليم", + "Radio could not {action} cleanly": "تعذّر {action} الراديو بشكل سليم", + "camera grid ready": "شبكة الكاميرات جاهزة", + "CCTV calibration saved": "تم حفظ معايرة CCTV", + "CCTV calibration reset": "تمت إعادة ضبط معايرة CCTV", + "CCTV layer unavailable": "طبقة CCTV غير متاحة", + "MAP": "خريطة", + "CONTACTS — nearest planes · vessels · sites": "الأهداف — أقرب الطائرات · السفن · المواقع", + "SPACE MISSIONS — launches & orbital assets": "المهام الفضائية — عمليات الإطلاق والأصول المدارية", + "Space Missions cancellation could not restore the previous layer state": "تعذّر على إلغاء المهام الفضائية استعادة حالة الطبقة السابقة", + "Collapse Cockpit display options": "طي خيارات عرض القمرة", + "Collapse Cockpit Radio controls": "طي عناصر تحكم الراديو في القمرة", + "SYNC": "مزامنة", + "{category} BAND": "نطاق {category}", + "NO STATIONS": "لا محطات", + "{name}, station {index} of {total}": "{name}، المحطة {index} من {total}", + "No station available": "لا توجد محطة متاحة", + "OFF AIR": "خارج البث", + "STATION UNAVAILABLE": "المحطة غير متاحة", + "Pause": "إيقاف مؤقت", + "Resume": "استئناف", + "selected": "المحددة", + "nearest": "الأقرب", + "{action} {target} radio station": "{action} محطة الراديو {target}", + "RADIO STATE UNCERTAIN": "حالة الراديو غير مؤكدة", + "SYNCING DIRECTORY": "جارٍ مزامنة الدليل", + "SYNCING": "جارٍ المزامنة", + "station": "محطة", + "VIEWSHED ON": "مجال الرؤية مفعّل", + "FRAME · LOADING": "الإطار · جارٍ التحميل", + "FRAME · UNAVAILABLE": "الإطار · غير متاح", + "CAL · EDITED (UNSAVED)": "CAL · معدّل (غير محفوظ)", + "CAL · {badge}": "CAL · {badge}", + "CALIBRATED": "معايَر", + "CURATED": "منتقى", + "RAW PRIOR": "تقدير أولي خام", + "MONITOR": "شاشة", + "{city} · HDG {heading} · FOV {fov} · RANGE {range}m · {projection}{calBadge} · {provider}{status}": "{city} · HDG {heading} · FOV {fov} · المدى {range}m · {projection}{calBadge} · {provider}{status}", + "{count} cameras loaded · click a camera to activate": { + "zero": "لا كاميرات محمّلة ({count}) · انقر على كاميرا لتفعيلها", + "one": "كاميرا واحدة محمّلة ({count}) · انقر عليها لتفعيلها", + "two": "كاميرتان محمّلتان ({count}) · انقر على كاميرا لتفعيلها", + "few": "{count} كاميرات محمّلة · انقر على كاميرا لتفعيلها", + "many": "{count} كاميرا محمّلة · انقر على كاميرا لتفعيلها", + "other": "{count} كاميرا محمّلة · انقر على كاميرا لتفعيلها" + }, + "{count} cameras loaded · enable CCTV to activate": { + "zero": "لا كاميرات محمّلة ({count}) · فعّل CCTV للتفعيل", + "one": "كاميرا واحدة محمّلة ({count}) · فعّل CCTV للتفعيل", + "two": "كاميرتان محمّلتان ({count}) · فعّل CCTV للتفعيل", + "few": "{count} كاميرات محمّلة · فعّل CCTV للتفعيل", + "many": "{count} كاميرا محمّلة · فعّل CCTV للتفعيل", + "other": "{count} كاميرا محمّلة · فعّل CCTV للتفعيل" + }, + "No summary available.": "لا يتوفر ملخص.", + "Celestial ring — available in Normal style": "الحلقة السماوية — متاحة في النمط العادي", + "Detection overlay: {mode}": "طبقة الكشف: {mode}", + "Detection overlay: off": "طبقة الكشف: متوقفة", + "SPARSE": "متفرّق", + "BALANCED": "متوازن", + "DENSE": "كثيف", + "Resetting to full globe view": "جارٍ العودة إلى عرض الكرة الأرضية كاملة", + "Resetting cockpit to full globe view": "جارٍ إعادة القمرة إلى عرض الكرة الأرضية كاملة", + "ORBIT": "مدار", + "SUMMARY": "الملخص", + "Awaiting telemetry...": "بانتظار بيانات القياس عن بُعد...", + "REC": "REC", + "Scope edge feather": "تنعيم حافة المنظار", + "Bloom intensity": "شدة التوهج", + "Sharpen intensity": "شدة الحدة", + "Search location by name or coordinates": "البحث عن موقع بالاسم أو الإحداثيات", + "Expand LOCATION": "توسيع الموقع", + "UNAVAILABLE": "غير متاح", + "Live Flights": "الرحلات الحية", + "Earthquakes (24h)": "الزلازل (24 ساعة)", + "No selected data layers": "لا توجد طبقات بيانات محددة", + "Cleared {count} data layers": { + "zero": "لم تُمسح أي طبقة بيانات ({count})", + "one": "تم مسح طبقة بيانات واحدة ({count})", + "two": "تم مسح طبقتَي بيانات ({count})", + "few": "تم مسح {count} طبقات بيانات", + "many": "تم مسح {count} طبقة بيانات", + "other": "تم مسح {count} طبقة بيانات" + }, + "{count} data layers could not be cleared": { + "zero": "لا طبقات بيانات تعذّر مسحها ({count})", + "one": "تعذّر مسح طبقة بيانات واحدة ({count})", + "two": "تعذّر مسح طبقتَي بيانات ({count})", + "few": "تعذّر مسح {count} طبقات بيانات", + "many": "تعذّر مسح {count} طبقة بيانات", + "other": "تعذّر مسح {count} طبقة بيانات" + }, + "Visible map targets": "أهداف الخريطة المرئية", + "CCTV": "CCTV", + "SOURCE · UNKNOWN": "المصدر · غير معروف", + "Enable CCTV to load camera intersections": "فعّل CCTV لتحميل تقاطعات الكاميرات", + "CCTV OFF": "CCTV متوقف", + "NEAREST": "الأقرب", + "CCTV camera": "كاميرا CCTV", + "FOCUS": "تركيز", + "COVERAGE OFF": "التغطية متوقفة", + "AUTO HOP OFF": "التنقل التلقائي متوقف", + "PROJECTION ON": "الإسقاط مفعّل", + "CALIBRATION": "المعايرة", + "ADJUST": "ضبط", + "Drag the camera in the world: rings rotate, arrows move, handles set range/FOV": "اسحب الكاميرا في العالم: تدور الحلقات وتحرّك الأسهم الموضع وتضبط المقابض المدى وزاوية الرؤية", + "Camera pose — click a value to type": "وضع الكاميرا — انقر على قيمة لكتابتها", + "Heading (compass °) — click to type": "الاتجاه (بوصلة °) — انقر للكتابة", + "Pitch (° up/down) — click to type": "الميل (° أعلى/أسفل) — انقر للكتابة", + "Horizontal FOV (°) — click to type": "زاوية الرؤية الأفقية (°) — انقر للكتابة", + "Range / monitor-plane distance (m) — click to type": "المدى / بُعد مستوى الشاشة (م) — انقر للكتابة", + "Mount height above ground (m) — click to type": "ارتفاع التركيب فوق الأرض (م) — انقر للكتابة", + "North offset from catalog position (m) — click to type": "الإزاحة شمالًا عن موضع الفهرس (م) — انقر للكتابة", + "East offset from catalog position (m) — click to type": "الإزاحة شرقًا عن موضع الفهرس (م) — انقر للكتابة", + "SAVE CAL": "حفظ المعايرة", + "RESET CAL": "إعادة ضبط المعايرة", + "SCENE SUMMARY": "ملخص المشهد", + "Enable CCTV to start camera-linked intelligence summaries.": "فعّل CCTV لبدء الملخصات الاستخباراتية المرتبطة بالكاميرات.", + "Internet radio and local SDR": "راديو الإنترنت وSDR المحلي", + "Expand Radio": "توسيع الراديو", + "Expand Radio section": "توسيع قسم الراديو", + "STATION TAG": "وسم المحطة", + "Filter stations by station tag": "تصفية المحطات بحسب وسم المحطة", + "NO STATION SELECTED": "لم تُحدَّد محطة", + "Enable Radio, then choose a globe marker or use next.": "فعّل الراديو، ثم اختر علامة على الكرة الأرضية أو استخدم التالي.", + "DIRECTORY BAND": "نطاق الدليل", + "DRAG TO TUNE": "اسحب للضبط", + "ALL · DRAG THE NEEDLE": "الكل · اسحب المؤشر", + "SNAPS TO AVAILABLE STATIONS": "يتوقف عند المحطات المتاحة", + "Radio playback": "تشغيل الراديو", + "Previous filtered station": "المحطة السابقة في القائمة المصفّاة", + "PLAY": "تشغيل", + "Play selected station": "تشغيل المحطة المحددة", + "Next filtered station": "المحطة التالية في القائمة المصفّاة", + "Stop radio playback": "إيقاف تشغيل الراديو", + "Radio volume": "مستوى صوت الراديو", + "Radio off": "الراديو متوقف", + "STATION SITE": "موقع المحطة", + "Audio connects directly to the broadcaster after you press play. Your IP is visible to that broadcaster.": "يتصل الصوت مباشرة بالمحطة المُذيعة بعد الضغط على تشغيل. عنوان IP الخاص بك ظاهر لتلك المحطة.", + "LOADING": "جارٍ التحميل", + "DEGRADED": "متدهور", + "STALE": "قديم", + "FALLBACK": "بديل", + "PARTIAL": "جزئي", + "UNCERTAIN": "غير مؤكد", + "ENABLING": "جارٍ التفعيل", + "DISABLING": "جارٍ الإيقاف", + "Military Flights": "الرحلات العسكرية", + "Satellites": "الأقمار الصناعية", + "Space Missions (30d)": "المهام الفضائية (30 يومًا)", + "Street Traffic": "حركة مرور الشوارع", + "Radio": "الراديو", + "Bikeshare": "الدراجات المشتركة", + "Live AIS Vessels": "سفن AIS الحية", + "Mapped Installations": "المنشآت المرسومة", + "Global Context": "السياق العالمي", + "Datacenters": "مراكز البيانات", + "Dams": "السدود", + "Submarine Cables": "الكابلات البحرية", + "FIRMS Active Fires": "حرائق FIRMS النشطة", + "just now": "الآن", + "{count}s ago": "قبل {count} ث", + "{count}m ago": "قبل {count} د", + "{count}h ago": "قبل {count} س", + "never": "أبدًا", + "loading...": "جارٍ التحميل...", + "UNCERTAIN · {source} · lifecycle state requires reconciliation": "غير مؤكد · {source} · حالة دورة التشغيل تحتاج إلى مطابقة", + "{state} · {source}": "{state} · {source}", + "{state} · {source} · {detail} · retry {seconds}s": "{state} · {source} · {detail} · إعادة المحاولة {seconds} ث", + "{state} · {source} · {detail}": "{state} · {source} · {detail}", + "{state} · {source} · {ago}": "{state} · {source} · {ago}", + "{state} · {source} · {ago} · retrying in {seconds}s": "{state} · {source} · {ago} · إعادة المحاولة خلال {seconds} ث", + "{source} · {loadingLabel}": "{source} · {loadingLabel}", + "{source} · {ago}": "{source} · {ago}", + "{accepted} of {raw} records accepted": "قُبل {accepted} من {raw} سجل", + "incomplete snapshot": "لقطة غير مكتملة", + "{state} · {source} · {detail} · {ago}": "{state} · {source} · {detail} · {ago}", + "{name}: {state}": "{name}: {state}", + "Type unknown": "النوع غير معروف", + "Reg unknown": "رقم التسجيل غير معروف", + "Operator unknown": "المشغّل غير معروف", + "Alt unknown": "الارتفاع غير معروف", + "FISHING": "صيد", + "TOWING": "قطر", + "DREDGER": "كراكة", + "DIVE OPS": "عمليات غوص", + "SAILING": "شراعية", + "PLEASURE": "ترفيهية", + "PILOT": "إرشاد", + "SAR": "بحث وإنقاذ", + "TUG": "قاطرة", + "PORT TENDER": "خدمات الميناء", + "ANTI-POLLUTION": "مكافحة التلوث", + "LAW ENFORCE": "إنفاذ القانون", + "MEDICAL": "طبية", + "HIGH-SPEED": "عالية السرعة", + "PASSENGER": "ركاب", + "CARGO": "شحن", + "TANKER": "ناقلة", + "OTHER": "أخرى", + "VESSEL": "سفينة", + "POS: LIVE": "الموضع: حي", + "POS: {time}Z": "الموضع: {time}Z", + "AIS: --": "AIS: --", + "AIS: {name}": "AIS: {name}", + "{type} SPD: {speed} HDG: {heading}": "{type} السرعة: {speed} HDG: {heading}", + "awaiting first AIS position…": "بانتظار أول موضع AIS…", + "CCTV ON": "CCTV يعمل", + "COVERAGE ON": "التغطية مفعّلة", + "AUTO HOP ON": "التنقل التلقائي مفعّل", + "PROJECTION OFF": "الإسقاط متوقف", + "ADJUST ON": "الضبط مفعّل", + "{count} CAMERAS STANDING BY · NO CAMERA SELECTED · CLICK A CAMERA TO ACTIVATE": "{count} كاميرا في وضع الاستعداد · لم تُحدَّد كاميرا · انقر على كاميرا لتفعيلها", + "No cameras available in catalog.": "لا توجد كاميرات متاحة في الفهرس.", + "{city} CCTV": "CCTV {city}", + "HDG {value}°": "HDG {value}°", + "HDG {value}° (ESTIMATED)": "HDG {value}° (تقديري)", + "FOV {value}°": "FOV {value}°", + "COVERAGE {value}km²": "التغطية {value}km²", + "OVERLAP {count} cams": "تداخل {count} كاميرا", + "ISOLATED VIEW": "منظور معزول", + "PROJ MONITOR": "إسقاط على شاشة", + "PROJ OFF": "إسقاط متوقف", + "VIEWSHED": "مجال الرؤية", + "CAL {value}": "CAL {value}", + "SRC {value}": "SRC {value}", + "{value} CONTEXT": "السياق {value}", + "News": "أخبار", + "Talk": "حوارية", + "Weather / Emergency": "الطقس / الطوارئ", + "Public Safety": "السلامة العامة", + "Aviation / Marine": "الطيران / البحرية", + "Traffic / Transit": "المرور / النقل", + "Music": "موسيقى", + "Other": "أخرى", + "Alternative": "بديل", + "Ambient": "أمبيانت", + "Blues": "بلوز", + "Classical": "كلاسيكية", + "Country": "كانتري", + "Dance": "رقص", + "Electronic": "إلكترونية", + "Folk": "فولك", + "Funk": "فانك", + "Hip-Hop": "هيب هوب", + "House": "هاوس", + "Indie": "إندي", + "Jazz": "جاز", + "Latin": "لاتينية", + "Metal": "ميتال", + "Oldies": "أغانٍ قديمة", + "Pop": "بوب", + "Punk": "بانك", + "R&B": "R&B", + "Reggae": "ريغي", + "Rock": "روك", + "Soul": "سول", + "Techno": "تكنو", + "Trance": "ترانس", + "World": "موسيقى العالم", + "NEWS": "أخبار", + "WEATHER": "طقس", + "NO STATION AVAILABLE": "لا توجد محطة متاحة", + "DISABLE": "إيقاف", + "RECONCILE": "مطابقة", + "Enable Radio": "تفعيل الراديو", + "Disable Radio": "إيقاف الراديو", + "Reconcile Radio — lifecycle uncertain": "مطابقة الراديو — حالة دورة التشغيل غير مؤكدة", + "Loading station directory…": "جارٍ تحميل دليل المحطات…", + "Directory metadata only": "بيانات وصفية للدليل فقط", + "Choose a globe marker or use next.": "اختر علامة على الكرة الأرضية أو استخدم التالي.", + "TAGS · {tags}": "الوسوم · {tags}", + "Ready — playback starts only from your action": "جاهز — لا يبدأ التشغيل إلا بإجراء منك", + "Connecting directly to broadcaster…": "جارٍ الاتصال مباشرة بالمحطة…", + "Buffering broadcaster stream…": "جارٍ تخزين بث المحطة مؤقتًا…", + "Playing {station}": "يجري تشغيل {station}", + "Paused {station}": "تم إيقاف {station} مؤقتًا", + "Broadcaster stream unavailable": "بث المحطة غير متاح", + " · degraded directory": " · دليل متدهور", + " · stale directory": " · دليل قديم", + " · stale/degraded directory": " · دليل قديم/متدهور", + " · outside current filter": " · خارج المرشح الحالي", + " · muted during voice interaction": " · مكتوم أثناء التفاعل الصوتي", + " · restoring volume after voice": " · جارٍ استعادة الصوت بعد التفاعل الصوتي", + " · static indicates no broadcaster audio": " · التشويش يعني عدم وصول صوت من المحطة", + " · tuning static until broadcaster starts": " · تشويش الضبط حتى تبدأ المحطة", + "Station unavailable after directory refresh — choose another channel": "المحطة غير متاحة بعد تحديث الدليل — اختر قناة أخرى", + "Radio is enabling…": "جارٍ تفعيل الراديو…", + "Radio is disabling…": "جارٍ إيقاف الراديو…", + "Radio lifecycle is uncertain — use Enable or Disable to reconcile": "حالة دورة تشغيل الراديو غير مؤكدة — استخدم تفعيل أو إيقاف للمطابقة", + "LAUNCH SITE": "موقع الإطلاق", + "LAUNCH SITE · {site}": "موقع الإطلاق · {site}", + "SELECTED SPACE MISSION": "المهمة الفضائية المحددة", + "Show all missions": "عرض كل المهام", + "Deselect mission": "إلغاء تحديد المهمة", + "MISSION": "المهمة", + "STATUS · ": "الحالة · ", + "LAUNCH SITE · ": "موقع الإطلاق · ", + "LAUNCH TIME · ": "وقت الإطلاق · ", + "ORBIT · ": "المدار · ", + "ASCENT PATH · ": "مسار الصعود · ", + "CURRENT DISTANCE FROM EARTH · ": "المسافة الحالية عن الأرض · ", + "SATELLITE SPEED · ": "سرعة القمر الصناعي · ", + "PAYLOAD": "الحمولة", + "NAME": "الاسم", + "TYPE": "النوع", + "DESTINATION": "الوجهة", + "STAGE / RE-ENTRY / RECOVERY": "المراحل / العودة للغلاف الجوي / الاسترجاع", + "STAGE": "المرحلة", + "STATUS": "الحالة", + "FINAL POSITION": "الموضع النهائي", + "Previous mission": "المهمة السابقة", + "Next mission": "المهمة التالية", + "SHOW ALL / DESELECT": "عرض الكل / إلغاء التحديد", + "NO MISSIONS AVAILABLE IN THE CURRENT 30-DAY WINDOW": "لا توجد مهام متاحة في نافذة الـ30 يومًا الحالية", + "{count} / 30D": "{count} / 30D", + "DATE UNAVAILABLE": "التاريخ غير متاح", + "UNSPECIFIED OPERATOR": "مشغّل غير محدد", + "Select {mission}": "اختيار {mission}", + "+{count} additional payload records": "سجلات حمولة إضافية: +{count}", + "PAYLOAD DATA UNAVAILABLE": "بيانات الحمولة غير متاحة", + "NO STAGE RE-ENTRY / RECOVERY DATA": "لا توجد بيانات عن عودة المراحل للغلاف الجوي / استرجاعها", + "UNSPECIFIED": "غير محدد", + "FLIGHT {count}": "الرحلة {count}", + "REUSED": "أُعيد استخدامها", + "{value} KM DOWNRANGE": "{value} KM في اتجاه المسار", + "PLANNED · ": "مخطط · ", + "SUPPLIED TRAJECTORY POINTS": "نقاط مسار مزوَّدة", + "RECONSTRUCTED ESTIMATE": "تقدير مُعاد بناؤه", + "{value} KM": "{value} KM", + "{value} KM/S": "{value} KM/S", + "REPLAY ASCENT": "إعادة عرض الصعود", + "Replay the estimated ascent with a following camera": "إعادة عرض الصعود التقديري بكاميرا مرافقة", + "Pause replay": "إيقاف إعادة العرض مؤقتًا", + "Resume replay": "استئناف إعادة العرض", + "Cancel replay": "إلغاء إعادة العرض", + "REPLAY SPEED": "سرعة إعادة العرض", + "Replay speed multiplier": "مضاعف سرعة إعادة العرض", + "T−{time} · {mission}": "T−{time} · {mission}", + "LAUNCH STANDBY": "الإطلاق في وضع الاستعداد", + "LIFTOFF · {mission}": "الإقلاع · {mission}", + "ASCENT REPLAY · {mission}": "إعادة عرض الصعود · {mission}", + "ASCENT ESTIMATE · {mission}": "تقدير الصعود · {mission}", + "STAGE RE-ENTRY / RECOVERY · {mission}": "عودة المراحل للغلاف الجوي / الاسترجاع · {mission}", + "ORBIT REPLAY · {mission}": "إعادة عرض المدار · {mission}", + "PAUSED · {title}": "متوقف مؤقتًا · {title}", + "T minus {seconds}": "T ناقص {seconds}", + "Preparing launch site": "تجهيز موقع الإطلاق", + "Liftoff": "الإقلاع", + "Ascent replay": "إعادة عرض الصعود", + "Orbit replay": "إعادة عرض المدار", + ", paused": "، متوقف مؤقتًا", + "DENSE ···": "كثيف ···", + "DENSE ✕": "كثيف ✕", + "Add the full Starlink broadband shell (thousands of extra points)": "إضافة غلاف Starlink للنطاق العريض كاملًا (آلاف النقاط الإضافية)", + "Loading the Starlink shell…": "جارٍ تحميل غلاف Starlink…", + "Starlink {detail} — click to retry": "Starlink {detail} — انقر لإعادة المحاولة", + "load failed": "فشل التحميل", + "Showing the full Starlink shell — click for the core catalog only": "يُعرض غلاف Starlink كاملًا — انقر للعودة إلى الفهرس الأساسي فقط", + "STATION": "محطات", + "Crewed stations and their visiting vehicles": "المحطات المأهولة والمركبات الزائرة لها", + "NAV": "ملاحة", + "GNSS navigation — GPS, GLONASS, Galileo": "ملاحة GNSS — GPS وGLONASS وGalileo", + "GEO": "GEO", + "Geostationary belt — comms and weather, fixed over the equator": "الحزام الثابت بالنسبة للأرض — اتصالات وطقس، ثابتة فوق خط الاستواء", + "VISUAL": "مرئية", + "Brightest naked-eye objects — CelesTrak visual group": "ألمع الأجرام المرئية بالعين المجردة — مجموعة CelesTrak المرئية", + "COMMS": "اتصالات", + "Broadband constellation shell — shown only in DENSE mode": "غلاف كوكبة النطاق العريض — يظهر في وضع الكثيف فقط", + "refreshing...": "جارٍ التحديث...", + "KEY REQUIRED": "المفتاح مطلوب", + "STALE · cached {age}": "قديم · مخزّن {age}", + "LIVE · updated {age}": "حي · حُدّث {age}", + "<1m ago": "قبل أقل من دقيقة", + "FIRE · {frp} MW": "حريق · {frp} MW", + "▲ {frp} MW": "▲ {frp} MW", + "FIRE": "حريق", + "FIRES": "حرائق", + "{value} conf": "ثقة {value}", + "{value} ago": "قبل {value}", + "max {value} MW": "الأقصى {value} MW", + "new {value}": "جديد {value}", + "NIGHT": "ليلًا", + "sensor n/a": "المستشعر غير متاح", + "Focus fire detection {title}, {details}": "التركيز على رصد الحريق {title}، {details}", + "Syncing flow · Roads: OpenStreetMap · Flow: TomTom · Unmatched: simulated": "مزامنة التدفق · الطرق: OpenStreetMap · التدفق: TomTom · غير المطابق: محاكى", + "LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov": "حي · الطرق: OpenStreetMap · التدفق: TomTom · تغطية {percent}%", + "LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov · Unmatched: simulated": "حي · الطرق: OpenStreetMap · التدفق: TomTom · تغطية {percent}% · غير المطابق: محاكى", + "SIMULATED · Roads: OpenStreetMap · Flow: TomTom (no matches)": "محاكى · الطرق: OpenStreetMap · التدفق: TomTom (لا تطابقات)", + "Syncing flow · Roads: {source}": "مزامنة التدفق · الطرق: {source}", + "LIVE · Roads: {source} · Roads without flow hidden": "حي · الطرق: {source} · الطرق بلا بيانات تدفق مخفية", + "LIVE · Roads: {source} · No flow roads in view": "حي · الطرق: {source} · لا طرق بها بيانات تدفق في العرض", + "LIVE · Roads: {source} · Flow {percent}%": "حي · الطرق: {source} · التدفق {percent}%", + "SIMULATED · Roads: {source} · Flow {percent}%": "محاكى · الطرق: {source} · التدفق {percent}%", + "SIMULATED — traffic service unreachable": "محاكى — خدمة المرور غير متاحة", + "SIMULATED — add TomTom key for live": "محاكى — أضف مفتاح TomTom للبيانات الحية", + "syncing {count} city feeds...": "جارٍ مزامنة {count} من مصادر المدن...", + "scanning nearby systems...": "جارٍ فحص الأنظمة القريبة...", + "🚲 {bikes} avail · {docks} docks · {capacity} cap": "🚲 المتاح {bikes} · المرابط {docks} · السعة {capacity}", + "⚠️ Not installed": "⚠️ غير مثبتة", + "⚠️ Not renting": "⚠️ لا تؤجّر", + "⚠️ Not returning": "⚠️ لا تستقبل الإرجاع", + "Station": "محطة", + "Station {id}": "المحطة {id}", + "MAPPED INSTALLATION": "منشأة مرسومة", + "loading mapped installation context": "جارٍ تحميل سياق المنشأة المرسومة", + "Overpass rate-limited": "Overpass قيّد معدل الطلبات", + "Overpass timed out": "انتهت مهلة Overpass", + "Overpass could not complete the query": "تعذّر على Overpass إكمال الاستعلام", + "Overpass temporarily unavailable": "Overpass غير متاح مؤقتًا", + "Retrying mapped sites…": "إعادة محاولة المواقع المرسومة…", + "Fetching mapped sites…": "جارٍ جلب المواقع المرسومة…", + "{reason} — retrying in {seconds}s": "{reason} — إعادة المحاولة خلال {seconds} ث", + "{reason} — retry pending": "{reason} — إعادة المحاولة معلّقة", + "Showing cached mapped sites": "عرض المواقع المرسومة المخزّنة", + "Mapped sites not loaded": "لم تُحمَّل المواقع المرسومة", + "Mapped sites loaded": "تم تحميل المواقع المرسومة", + "CONTEXT READY": "السياق جاهز", + "GLOBAL CONTEXT OFF": "السياق العالمي متوقف", + "SELECT A FLIGHT, VESSEL, OR MAPPED INSTALLATION": "اختر رحلة أو سفينة أو منشأة مرسومة", + "ENABLE TO LOAD OBSERVED / MAPPED PROXIMITY": "فعّل لتحميل القرب المرصود / المرسوم", + "Global Context navigation": "التنقل في السياق العالمي", + "PREVIOUS": "السابق", + "Open-source mapped/observed context. Missing broadcasts, unloaded map areas, or unmapped sites are not evidence of absence.": "سياق مرسوم/مرصود من مصادر مفتوحة. غياب البث أو عدم تحميل مناطق الخريطة أو وجود مواقع غير مرسومة لا يدل على عدم الوجود.", + "Unavailable": "غير متاح", + "Focus {label}": "التركيز على {label}", + "Flights": "الرحلات", + "Military flights": "الرحلات العسكرية", + "AIS vessels": "سفن AIS", + "Mapped installations": "المنشآت المرسومة", + "CURRENT VIEWPORT ONLY": "منفذ العرض الحالي فقط", + "WITHIN {km} KM": "ضمن {km} KM", + "BRG {value}°": "BRG {value}°", + "CRS {value}°": "CRS {value}°", + "feed unavailable": "المصدر غير متاح", + "feed stale": "المصدر قديم", + "observed or mapped nearby context": "سياق مرصود أو مرسوم قريب", + "no observed or mapped objects in current feeds": "لا توجد أجسام مرصودة أو مرسومة في المصادر الحالية", + "CONDITIONS UNKNOWN": "الأحوال غير معروفة", + "CLEAR": "صافٍ", + "PARTLY CLOUDY": "غائم جزئيًا", + "OVERCAST": "ملبّد بالغيوم", + "FOG": "ضباب", + "DRIZZLE": "رذاذ", + "RAIN": "مطر", + "SNOW": "ثلج", + "RAIN SHOWERS": "زخات مطر", + "SNOW SHOWERS": "زخات ثلج", + "THUNDERSTORM": "عاصفة رعدية", + "MIXED CONDITIONS": "أحوال متفرقة", + "TAB PREVIEWS · ENTER / SPACE SELECTS": "TAB للمعاينة · ENTER / SPACE للاختيار", + "awaiting usable AIS positions…": "بانتظار مواضع AIS صالحة…", + "awaiting first AIS message…": "بانتظار أول رسالة AIS…", + "EST. DOWNRANGE": "المسافة التقديرية في اتجاه المسار" +} From 94dc2736e1ef6aedf153d4763e0c0a773cb85ac9 Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Wed, 28 Oct 2026 12:55:12 +0400 Subject: [PATCH 017/237] i18n(ar): translate the remaining Arabic strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Translate the 1,875 strings #915 did not cover (2,727 in all), with all six CLDR plural forms where tn() asks for them. - Review pass on the #915 entries: LIVE reads مباشر (not حي, "alive"), STALE reads متقادم, ON/OFF pair as مفعّل/متوقف; distances and speeds use Arabic units (كم، م، قدم، عقدة) instead of Latin KM/FT/KTS; HUD stays HUD; quotes are «» and a few clumsy count phrasings are rebuilt. Co-Authored-By: Claude Opus 5.5 --- src/i18n/locales/ar.json | 2409 +++++++++++++++++++++++++++++++++++++- 1 file changed, 2359 insertions(+), 50 deletions(-) diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json index fdf764b5d8..fbc0e3187f 100644 --- a/src/i18n/locales/ar.json +++ b/src/i18n/locales/ar.json @@ -5,7 +5,7 @@ "Google 3D Tiles unavailable ({detail}). Loading the keyless globe...": "بلاطات Google 3D Tiles غير متاحة ({detail}). جارٍ تحميل الكرة الأرضية بلا مفتاح...", "Flying to Austin, TX...": "جارٍ الانتقال إلى أوستن، تكساس...", "Restoring shared view...": "جارٍ استعادة العرض المشترك...", - "LOADING LIVE DATA": "جارٍ تحميل البيانات الحية", + "LOADING LIVE DATA": "جارٍ تحميل البيانات المباشرة", "LOAD COMPLETE": "اكتمل التحميل", "LOAD FAILED": "فشل التحميل", "LOAD CANCELLED": "أُلغي التحميل", @@ -25,16 +25,16 @@ "Loading Google 3D Tiles...": "جارٍ تحميل بلاطات Google 3D Tiles...", "Loading the keyless globe...": "جارٍ تحميل الكرة الأرضية بلا مفتاح...", "Initializing systems...": "جارٍ تهيئة الأنظمة...", - "LIVE DATA OFF": "البيانات الحية متوقفة", + "LIVE DATA OFF": "البيانات المباشرة متوقفة", "MAPPED SITES LOADED": "تم تحميل المواقع المرسومة", "RETRYING MAPPED SITES": "إعادة محاولة المواقع المرسومة", "FETCHING MAPPED SITES": "جارٍ جلب المواقع المرسومة", - "TURNING OFF LIVE DATA": "جارٍ إيقاف البيانات الحية", - "REFRESHING LIVE DATA": "جارٍ تحديث البيانات الحية", + "TURNING OFF LIVE DATA": "جارٍ إيقاف البيانات المباشرة", + "REFRESHING LIVE DATA": "جارٍ تحديث البيانات المباشرة", "Close data attribution": "إغلاق إسناد البيانات", "MISSION CONTROL · FIRST LAUNCH": "مركز التحكم · أول تشغيل", "Choose your first view": "اختر عرضك الأول", - "LIVE CONTACTS": "الأهداف الحية", + "LIVE CONTACTS": "الأهداف المباشرة", "Don't show this again": "لا تعرض هذا مرة أخرى", "POWER UP": "تشغيل", "GROUND STATION · PROVIDER SETTINGS": "المحطة الأرضية · إعدادات المزوّدين", @@ -48,7 +48,7 @@ "EXPLORE MANUALLY": "استكشاف يدوي", "Begin with a clean globe": "ابدأ بكرة أرضية نظيفة", "ESC to dismiss": "اضغط ESC للإغلاق", - "Tip: the GEV MIC button in the dock lets you talk to the map.": "نصيحة: زر GEV MIC في الشريط السفلي يتيح لك التحدث إلى الخريطة.", + "Tip: the GEV MIC button in the dock lets you talk to the map.": "نصيحة: يتيح لك زر GEV MIC في الشريط السفلي التحدث إلى الخريطة.", "Close key setup": "إغلاق إعداد المفاتيح", "The globe already flies keyless. Every key below switches on another real feed — paste one and it's saved into this app's local configuration, then the server restarts itself. Server-side keys stay on this machine; Google Maps and Cesium ion run in the browser and must be provider-restricted. Keys you configured elsewhere are shown but never touched.": "تعمل الكرة الأرضية بلا مفاتيح أصلًا. كل مفتاح أدناه يفعّل مصدرًا حقيقيًا إضافيًا: الصق مفتاحًا فيُحفظ في إعدادات هذا التطبيق المحلية، ثم يعيد الخادم تشغيل نفسه. تبقى مفاتيح الخادم على هذا الجهاز، أما Google Maps وCesium ion فتعملان في المتصفح ويجب تقييدهما بحسب المزوّد. المفاتيح التي أعددتها في مكان آخر تظهر دون أن تُمَسّ.", "ESC to close": "اضغط ESC للإغلاق", @@ -72,7 +72,7 @@ "Working…": "جارٍ العمل…", "Could not open that mission{detail}. Retry or explore manually.": "تعذّر فتح تلك المهمة{detail}. أعد المحاولة أو استكشف يدويًا.", "This browser is blocking storage, so that could not be saved.": "هذا المتصفح يحظر التخزين، لذا تعذّر الحفظ.", - "Live earthquakes and active fires, from USGS and NASA": "زلازل وحرائق نشطة حية، من USGS وNASA", + "Live earthquakes and active fires, from USGS and NASA": "الزلازل والحرائق النشطة مباشرةً، من USGS وNASA", "ENVIRONMENTAL": "البيئة", "EARTH WATCH": "مراقبة الأرض", "ACTIVE EVENTS": "الأحداث النشطة", @@ -132,7 +132,7 @@ "Captured: {scene} / {shot}": "تم الالتقاط: {scene} / {shot}", "Select a shot first": "اختر لقطة أولًا", "Updated: {scene} / {shot}": "تم التحديث: {scene} / {shot}", - "Delete shot \"{shot}\"?": "حذف اللقطة \"{shot}\"؟", + "Delete shot \"{shot}\"?": "حذف اللقطة «{shot}»؟", "Loaded: {scene} / {shot}": "تم التحميل: {scene} / {shot}", "Camera unavailable — exit cockpit first": "الكاميرا غير متاحة — اخرج من قمرة القيادة أولًا", "No shots to run": "لا توجد لقطات للتشغيل", @@ -144,9 +144,9 @@ "Remove {title} from this app's saved keys": "إزالة {title} من مفاتيح هذا التطبيق المحفوظة", "Needs {envVars} — add it in Provider Settings": "يحتاج إلى {envVars} — أضفه في إعدادات المزوّدين", "Places context + Street View fallback; optional separate key": "سياق الأماكن + بديل Street View؛ مفتاح منفصل اختياري", - "Live ships, worldwide": "السفن الحية حول العالم", + "Live ships, worldwide": "السفن مباشرةً حول العالم", "Live active-fire detections": "رصد الحرائق النشطة مباشرة", - "Real live traffic (keyless runs a simulation)": "حركة مرور حية حقيقية (بدون مفتاح تُعرض محاكاة)", + "Real live traffic (keyless runs a simulation)": "حركة مرور مباشرة حقيقية (بدون مفتاح تُعرض محاكاة)", "Bing imagery map stacks + world terrain": "حزم خرائط صور Bing + تضاريس العالم", "More flight-polling credits (anonymous works without)": "رصيد أكبر لاستعلام الرحلات (يعمل دونه بصفة مجهولة)", "Scene action failed": "فشل إجراء المشهد", @@ -159,8 +159,8 @@ "GROUND SPEED": "السرعة الأرضية", "ALTITUDE": "الارتفاع", "CONTACT": "الهدف", - "CONTACTS · 250 KM": "الأهداف · 250 KM", - "LIVE SIGNALS": "إشارات حية", + "CONTACTS · 250 KM": "الأهداف · 250 كم", + "LIVE SIGNALS": "إشارات مباشرة", "OBSERVED / MAPPED PINGS": "إشارات مرصودة / مرسومة", "CURRENT": "الحالي", "READY": "جاهز", @@ -189,9 +189,9 @@ "Map source": "مصدر الخريطة", "Style": "النمط", "DISPLAY": "العرض", - "Intelligence HUD (H)": "لوحة المعلومات الاستخباراتية (H)", + "Intelligence HUD (H)": "HUD الاستخباراتي (H)", "Layout": "التخطيط", - "HUD layout": "تخطيط اللوحة", + "HUD layout": "تخطيط HUD", "Tactical": "تكتيكي", "Operator": "المشغّل", "Minimal": "مبسّط", @@ -241,11 +241,11 @@ "OPTICAL PLANE · 01": "المستوى البصري · 01", "VISOR LOCK · ACTIVE": "قفل الحاجب · نشط", "FIRST PERSON": "منظور الشخص الأول", - "LIVE TRACK · COURSE ALIGNED": "تتبع حي · المسار متوافق", + "LIVE TRACK · COURSE ALIGNED": "تتبع مباشر · المسار متوافق", "Cockpit vision style": "نمط رؤية القمرة", "Current aircraft heading": "اتجاه الطائرة الحالي", - "GROUND SPEED · KTS": "السرعة الأرضية · KTS", - "ALTITUDE · FT": "الارتفاع · FT", + "GROUND SPEED · KTS": "السرعة الأرضية · عقدة", + "ALTITUDE · FT": "الارتفاع · قدم", "PREV": "السابق", "Previous cockpit vision style": "نمط رؤية القمرة السابق", "Previous vision style": "نمط الرؤية السابق", @@ -268,10 +268,10 @@ "Cockpit briefing controls": "عناصر التحكم في إحاطة القمرة", "Previous briefing page": "صفحة الإحاطة السابقة", "Next briefing page": "صفحة الإحاطة التالية", - "Cycle briefing pages automatically every 9 seconds (Signals → News → Local). Pauses while you hover or focus the panel. Live signal data refreshes continuously either way.": "تدوير صفحات الإحاطة تلقائيًا كل 9 ثوانٍ (الإشارات ← الأخبار ← المحلي). يتوقف أثناء تمرير المؤشر أو التركيز على اللوحة. تتجدد بيانات الإشارات الحية باستمرار في الحالتين.", + "Cycle briefing pages automatically every 9 seconds (Signals → News → Local). Pauses while you hover or focus the panel. Live signal data refreshes continuously either way.": "تدوير صفحات الإحاطة تلقائيًا كل 9 ثوانٍ (الإشارات ← الأخبار ← المحلي). يتوقف أثناء تمرير المؤشر فوق اللوحة أو التركيز عليها. تتجدد بيانات الإشارات المباشرة باستمرار في الحالتين.", "Collapse cockpit briefing panel": "طي لوحة إحاطة القمرة", "Collapse briefing panel": "طي لوحة الإحاطة", - "Live signals": "الإشارات الحية", + "Live signals": "الإشارات المباشرة", "Latest regional news": "آخر الأخبار الإقليمية", "Location-based information": "معلومات بحسب الموقع", "ACQUIRING REGIONAL NEWS": "جارٍ جلب الأخبار الإقليمية", @@ -281,13 +281,13 @@ "SKY": "السماء", "PRECIP": "الهطول", "SOURCE-BACKED EVENTS · NO SYNTHETIC NEWS": "أحداث موثّقة المصدر · بلا أخبار مصطنعة", - "Show Live Signals": "عرض الإشارات الحية", + "Show Live Signals": "عرض الإشارات المباشرة", "Show Regional News": "عرض الأخبار الإقليمية", "Show Local Info": "عرض المعلومات المحلية", "Contact cockpit summary": "ملخص الهدف في القمرة", "Contact navigation": "التنقل بين الأهداف", - "Previous — prior visited contact in the 250 km window": "السابق — الهدف الذي زرته قبل هذا ضمن نطاق 250 km", - "Next — nearest unvisited contact in the 250 km window": "التالي — أقرب هدف لم تزره ضمن نطاق 250 km", + "Previous — prior visited contact in the 250 km window": "السابق — الهدف الذي زرته قبل هذا ضمن نطاق 250 كم", + "Next — nearest unvisited contact in the 250 km window": "التالي — أقرب هدف لم تزره ضمن نطاق 250 كم", "Collapse Contact panel": "طي لوحة الهدف", "Collapse contact panel": "طي لوحة الهدف", "CONTEXT ONLY": "للسياق فقط", @@ -341,7 +341,7 @@ "Collapse Radio section": "طي قسم الراديو", "Searched location": "الموقع المبحوث عنه", "Disable cockpit weather effects": "إيقاف مؤثرات الطقس في القمرة", - "ON": "تشغيل", + "ON": "مفعّل", "Restore real aircraft": "استعادة الطائرة الحقيقية", "Night vision": "رؤية ليلية", "Thermal": "حراري", @@ -373,8 +373,8 @@ "COMMERCIAL": "تجارية", "ACQUIRING SURFACE": "جارٍ التقاط السطح", "SURFACE FALLBACK": "سطح بديل", - "STALE FEED": "بيانات متقادمة", - "LIVE TRACK": "تتبع حي", + "STALE FEED": "مصدر متقادم", + "LIVE TRACK": "تتبع مباشر", "{aircraftClass} · {feedState} · COURSE ALIGNED": "{aircraftClass} · {feedState} · المسار متوافق", "ARROW · ESTIMATED DIRECTION": "سهم · اتجاه تقديري", "DEST {bearing}": "الوجهة {bearing}", @@ -483,7 +483,7 @@ "CURATED": "منتقى", "RAW PRIOR": "تقدير أولي خام", "MONITOR": "شاشة", - "{city} · HDG {heading} · FOV {fov} · RANGE {range}m · {projection}{calBadge} · {provider}{status}": "{city} · HDG {heading} · FOV {fov} · المدى {range}m · {projection}{calBadge} · {provider}{status}", + "{city} · HDG {heading} · FOV {fov} · RANGE {range}m · {projection}{calBadge} · {provider}{status}": "{city} · HDG {heading} · FOV {fov} · المدى {range} م · {projection}{calBadge} · {provider}{status}", "{count} cameras loaded · click a camera to activate": { "zero": "لا كاميرات محمّلة ({count}) · انقر على كاميرا لتفعيلها", "one": "كاميرا واحدة محمّلة ({count}) · انقر عليها لتفعيلها", @@ -519,7 +519,7 @@ "Search location by name or coordinates": "البحث عن موقع بالاسم أو الإحداثيات", "Expand LOCATION": "توسيع الموقع", "UNAVAILABLE": "غير متاح", - "Live Flights": "الرحلات الحية", + "Live Flights": "الرحلات المباشرة", "Earthquakes (24h)": "الزلازل (24 ساعة)", "No selected data layers": "لا توجد طبقات بيانات محددة", "Cleared {count} data layers": { @@ -587,7 +587,7 @@ "Audio connects directly to the broadcaster after you press play. Your IP is visible to that broadcaster.": "يتصل الصوت مباشرة بالمحطة المُذيعة بعد الضغط على تشغيل. عنوان IP الخاص بك ظاهر لتلك المحطة.", "LOADING": "جارٍ التحميل", "DEGRADED": "متدهور", - "STALE": "قديم", + "STALE": "متقادم", "FALLBACK": "بديل", "PARTIAL": "جزئي", "UNCERTAIN": "غير مؤكد", @@ -599,7 +599,7 @@ "Street Traffic": "حركة مرور الشوارع", "Radio": "الراديو", "Bikeshare": "الدراجات المشتركة", - "Live AIS Vessels": "سفن AIS الحية", + "Live AIS Vessels": "سفن AIS المباشرة", "Mapped Installations": "المنشآت المرسومة", "Global Context": "السياق العالمي", "Datacenters": "مراكز البيانات", @@ -620,7 +620,7 @@ "{state} · {source} · {ago} · retrying in {seconds}s": "{state} · {source} · {ago} · إعادة المحاولة خلال {seconds} ث", "{source} · {loadingLabel}": "{source} · {loadingLabel}", "{source} · {ago}": "{source} · {ago}", - "{accepted} of {raw} records accepted": "قُبل {accepted} من {raw} سجل", + "{accepted} of {raw} records accepted": "السجلات المقبولة: {accepted} من {raw}", "incomplete snapshot": "لقطة غير مكتملة", "{state} · {source} · {detail} · {ago}": "{state} · {source} · {detail} · {ago}", "{name}: {state}": "{name}: {state}", @@ -647,7 +647,7 @@ "TANKER": "ناقلة", "OTHER": "أخرى", "VESSEL": "سفينة", - "POS: LIVE": "الموضع: حي", + "POS: LIVE": "الموضع: مباشر", "POS: {time}Z": "الموضع: {time}Z", "AIS: --": "AIS: --", "AIS: {name}": "AIS: {name}", @@ -664,7 +664,7 @@ "HDG {value}°": "HDG {value}°", "HDG {value}° (ESTIMATED)": "HDG {value}° (تقديري)", "FOV {value}°": "FOV {value}°", - "COVERAGE {value}km²": "التغطية {value}km²", + "COVERAGE {value}km²": "التغطية {value} كم²", "OVERLAP {count} cams": "تداخل {count} كاميرا", "ISOLATED VIEW": "منظور معزول", "PROJ MONITOR": "إسقاط على شاشة", @@ -725,8 +725,8 @@ "Paused {station}": "تم إيقاف {station} مؤقتًا", "Broadcaster stream unavailable": "بث المحطة غير متاح", " · degraded directory": " · دليل متدهور", - " · stale directory": " · دليل قديم", - " · stale/degraded directory": " · دليل قديم/متدهور", + " · stale directory": " · دليل متقادم", + " · stale/degraded directory": " · دليل متقادم/متدهور", " · outside current filter": " · خارج المرشح الحالي", " · muted during voice interaction": " · مكتوم أثناء التفاعل الصوتي", " · restoring volume after voice": " · جارٍ استعادة الصوت بعد التفاعل الصوتي", @@ -761,7 +761,7 @@ "Next mission": "المهمة التالية", "SHOW ALL / DESELECT": "عرض الكل / إلغاء التحديد", "NO MISSIONS AVAILABLE IN THE CURRENT 30-DAY WINDOW": "لا توجد مهام متاحة في نافذة الـ30 يومًا الحالية", - "{count} / 30D": "{count} / 30D", + "{count} / 30D": "{count} / 30 يومًا", "DATE UNAVAILABLE": "التاريخ غير متاح", "UNSPECIFIED OPERATOR": "مشغّل غير محدد", "Select {mission}": "اختيار {mission}", @@ -771,12 +771,12 @@ "UNSPECIFIED": "غير محدد", "FLIGHT {count}": "الرحلة {count}", "REUSED": "أُعيد استخدامها", - "{value} KM DOWNRANGE": "{value} KM في اتجاه المسار", + "{value} KM DOWNRANGE": "{value} كم على امتداد المسار", "PLANNED · ": "مخطط · ", "SUPPLIED TRAJECTORY POINTS": "نقاط مسار مزوَّدة", "RECONSTRUCTED ESTIMATE": "تقدير مُعاد بناؤه", - "{value} KM": "{value} KM", - "{value} KM/S": "{value} KM/S", + "{value} KM": "{value} كم", + "{value} KM/S": "{value} كم/ث", "REPLAY ASCENT": "إعادة عرض الصعود", "Replay the estimated ascent with a following camera": "إعادة عرض الصعود التقديري بكاميرا مرافقة", "Pause replay": "إيقاف إعادة العرض مؤقتًا", @@ -792,7 +792,7 @@ "STAGE RE-ENTRY / RECOVERY · {mission}": "عودة المراحل للغلاف الجوي / الاسترجاع · {mission}", "ORBIT REPLAY · {mission}": "إعادة عرض المدار · {mission}", "PAUSED · {title}": "متوقف مؤقتًا · {title}", - "T minus {seconds}": "T ناقص {seconds}", + "T minus {seconds}": "العد التنازلي: {seconds}", "Preparing launch site": "تجهيز موقع الإطلاق", "Liftoff": "الإقلاع", "Ascent replay": "إعادة عرض الصعود", @@ -817,8 +817,8 @@ "Broadband constellation shell — shown only in DENSE mode": "غلاف كوكبة النطاق العريض — يظهر في وضع الكثيف فقط", "refreshing...": "جارٍ التحديث...", "KEY REQUIRED": "المفتاح مطلوب", - "STALE · cached {age}": "قديم · مخزّن {age}", - "LIVE · updated {age}": "حي · حُدّث {age}", + "STALE · cached {age}": "متقادم · مخزّن {age}", + "LIVE · updated {age}": "مباشر · حُدّث {age}", "<1m ago": "قبل أقل من دقيقة", "FIRE · {frp} MW": "حريق · {frp} MW", "▲ {frp} MW": "▲ {frp} MW", @@ -832,16 +832,16 @@ "sensor n/a": "المستشعر غير متاح", "Focus fire detection {title}, {details}": "التركيز على رصد الحريق {title}، {details}", "Syncing flow · Roads: OpenStreetMap · Flow: TomTom · Unmatched: simulated": "مزامنة التدفق · الطرق: OpenStreetMap · التدفق: TomTom · غير المطابق: محاكى", - "LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov": "حي · الطرق: OpenStreetMap · التدفق: TomTom · تغطية {percent}%", - "LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov · Unmatched: simulated": "حي · الطرق: OpenStreetMap · التدفق: TomTom · تغطية {percent}% · غير المطابق: محاكى", + "LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov": "مباشر · الطرق: OpenStreetMap · التدفق: TomTom · تغطية {percent}%", + "LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov · Unmatched: simulated": "مباشر · الطرق: OpenStreetMap · التدفق: TomTom · تغطية {percent}% · غير المطابق: محاكى", "SIMULATED · Roads: OpenStreetMap · Flow: TomTom (no matches)": "محاكى · الطرق: OpenStreetMap · التدفق: TomTom (لا تطابقات)", "Syncing flow · Roads: {source}": "مزامنة التدفق · الطرق: {source}", - "LIVE · Roads: {source} · Roads without flow hidden": "حي · الطرق: {source} · الطرق بلا بيانات تدفق مخفية", - "LIVE · Roads: {source} · No flow roads in view": "حي · الطرق: {source} · لا طرق بها بيانات تدفق في العرض", - "LIVE · Roads: {source} · Flow {percent}%": "حي · الطرق: {source} · التدفق {percent}%", + "LIVE · Roads: {source} · Roads without flow hidden": "مباشر · الطرق: {source} · الطرق بلا بيانات تدفق مخفية", + "LIVE · Roads: {source} · No flow roads in view": "مباشر · الطرق: {source} · لا طرق بها بيانات تدفق في نطاق العرض", + "LIVE · Roads: {source} · Flow {percent}%": "مباشر · الطرق: {source} · التدفق {percent}%", "SIMULATED · Roads: {source} · Flow {percent}%": "محاكى · الطرق: {source} · التدفق {percent}%", "SIMULATED — traffic service unreachable": "محاكى — خدمة المرور غير متاحة", - "SIMULATED — add TomTom key for live": "محاكى — أضف مفتاح TomTom للبيانات الحية", + "SIMULATED — add TomTom key for live": "محاكى — أضف مفتاح TomTom للبيانات المباشرة", "syncing {count} city feeds...": "جارٍ مزامنة {count} من مصادر المدن...", "scanning nearby systems...": "جارٍ فحص الأنظمة القريبة...", "🚲 {bikes} avail · {docks} docks · {capacity} cap": "🚲 المتاح {bikes} · المرابط {docks} · السعة {capacity}", @@ -877,11 +877,11 @@ "AIS vessels": "سفن AIS", "Mapped installations": "المنشآت المرسومة", "CURRENT VIEWPORT ONLY": "منفذ العرض الحالي فقط", - "WITHIN {km} KM": "ضمن {km} KM", + "WITHIN {km} KM": "ضمن {km} كم", "BRG {value}°": "BRG {value}°", "CRS {value}°": "CRS {value}°", "feed unavailable": "المصدر غير متاح", - "feed stale": "المصدر قديم", + "feed stale": "المصدر متقادم", "observed or mapped nearby context": "سياق مرصود أو مرسوم قريب", "no observed or mapped objects in current feeds": "لا توجد أجسام مرصودة أو مرسومة في المصادر الحالية", "CONDITIONS UNKNOWN": "الأحوال غير معروفة", @@ -899,5 +899,2314 @@ "TAB PREVIEWS · ENTER / SPACE SELECTS": "TAB للمعاينة · ENTER / SPACE للاختيار", "awaiting usable AIS positions…": "بانتظار مواضع AIS صالحة…", "awaiting first AIS message…": "بانتظار أول رسالة AIS…", - "EST. DOWNRANGE": "المسافة التقديرية في اتجاه المسار" + "EST. DOWNRANGE": "المسافة التقديرية على امتداد المسار", + "Pick a shape, then click the map.": "اختر شكلًا، ثم انقر على الخريطة.", + "Enter to place the pin, Esc to cancel.": "Enter لوضع الدبوس، وEsc للإلغاء.", + "Click where the pin goes.": "انقر حيث تريد وضع الدبوس.", + "Click {count} more points.": { + "zero": "انقر على {count} نقطة أخرى.", + "one": "انقر على نقطة واحدة أخرى ({count}).", + "two": "انقر على نقطتين أخريين ({count}).", + "few": "انقر على {count} نقاط أخرى.", + "many": "انقر على {count} نقطة أخرى.", + "other": "انقر على {count} نقطة أخرى." + }, + "Those points are in a line — move one off it to enclose an area.": "هذه النقاط على خط واحد — أزح إحداها عنه لتحيط بمساحة.", + "That line has no length — click somewhere further away.": "هذا الخط بلا طول — انقر في موضع أبعد.", + " · {max}-point limit reached": " · بلغت الحد الأقصى للنقاط: {max}", + "{measure} · double-click or Enter to finish, Backspace undoes, Esc cancels.{full}": "{measure} · انقر نقرًا مزدوجًا أو اضغط Enter للإنهاء، وBackspace للتراجع، وEsc للإلغاء.{full}", + "drawings on the map": "الرسوم على الخريطة", + "That shape already has {count} points — finish it or press Backspace.": "عدد نقاط هذا الشكل بلغ {count} — أنهِه أو اضغط Backspace.", + "That point is off the globe — click on the world.": "هذه النقطة خارج الكرة الأرضية — انقر على سطح الأرض.", + "That shape could not be placed.": "تعذّر وضع هذا الشكل.", + "Could not place the shape: {error}": "تعذّر وضع الشكل: {error}", + "Board cleared.": "تم مسح اللوحة.", + "{owner} is using the pointer — close it first.": "المؤشر مستخدم من قِبل «{owner}» — أغلقه أولًا.", + "{label} · Detailed outline unavailable": "{label} · المخطط التفصيلي غير متاح", + "Space Missions isolates replay data. Exit the mode to enable {layer}.": "وضع المهام الفضائية يعزل بيانات إعادة العرض. اخرج من الوضع لتفعيل طبقة «{layer}».", + "Data attribution": "إسناد البيانات", + "Data provided by:": "البيانات مقدَّمة من:", + "Light aircraft": "طائرة خفيفة", + "Glider": "طائرة شراعية", + "Turboprop": "طائرة مروحية توربينية", + "Airliner": "طائرة ركاب", + "Widebody": "طائرة عريضة البدن", + "Four-engine jet": "نفاثة رباعية المحركات", + "Helicopter": "مروحية", + "Fast jet": "نفاثة سريعة", + "Business jet": "طائرة رجال أعمال", + "Drone": "طائرة مسيّرة", + "General emergency": "طوارئ عامة", + "Unlawful interference": "تدخل غير مشروع", + "Radio failure": "عطل في الاتصال اللاسلكي", + "Downed aircraft": "طائرة سقطت", + "Minimum fuel": "الحد الأدنى من الوقود", + "Lifeguard (medical priority)": "إسعاف جوي (أولوية طبية)", + "Rasuwagadhi witness video": "فيديو شاهد عيان في Rasuwagadhi", + "Bhote Koshi valley footage": "لقطات وادي Bhote Koshi", + "Flood footage": "لقطات الفيضان", + "Compilation and casualty claims": "مقاطع مجمّعة وادعاءات بشأن الضحايا", + "SOURCE GEOCONFIRMED · WORLD-PINNED": "موقع المصدر مؤكَّد جغرافيًا · مثبَّت على الخريطة", + "SOURCE CREDITED · LOCATION UNRESOLVED": "المصدر منسوب · الموقع غير محدَّد", + "REFERENCE ONLY · CLAIMS UNVERIFIED": "للمرجعية فقط · ادعاءات غير موثَّقة", + "SOURCE GEOCONFIRMED": "موقع المصدر مؤكَّد جغرافيًا", + "2021 historical reference versus 2026 post-event imagery; changes are cumulative and include the July 2025 Rasuwagadhi flood. Schematic downstream progression, not modeled arrival time; not an official hazard model.": "صورة مرجعية تاريخية من 2021 مقابل صور 2026 بعد الحدث؛ التغيرات تراكمية وتشمل فيضان Rasuwagadhi في يوليو 2025. تقدّم تخطيطي باتجاه المصب، لا زمن وصول منمذج؛ وليس نموذجًا رسميًا للمخاطر.", + "Immediate collapse viewpoint": "نقطة مشاهدة الانهيار مباشرة", + "Collapse viewpoint": "نقطة مشاهدة الانهيار", + "Debris-dammed lake": "بحيرة سدّها الركام", + "Dammed lake": "بحيرة مسدودة", + "Second landslide": "الانهيار الأرضي الثاني", + "Gyirong border gate": "المعبر الحدودي في Gyirong", + "Border gate": "المعبر الحدودي", + "Timure evidence cluster": "مجموعة أدلة Timure", + "Mailung / Upper Trishuli bridge": "Mailung / جسر Upper Trishuli", + "Dandagaun viewpoint restaurant": "مطعم الإطلالة في Dandagaun", + "Dandagaun viewpoint": "نقطة الإطلالة في Dandagaun", + "Bidur - Trishuli bridge": "جسر Bidur - Trishuli", + "Bidur bridge": "جسر Bidur", + "Devighat / Taadi Khola Bridge": "Devighat / جسر Taadi Khola", + "Devighat bridge": "جسر Devighat", + "Facebook player API did not initialize.": "لم تبدأ واجهة API لمشغّل Facebook.", + "Facebook player API could not load.": "تعذّر تحميل واجهة API لمشغّل Facebook.", + "Facebook player API timed out.": "انتهت مهلة واجهة API لمشغّل Facebook.", + "X embed API did not initialize.": "لم تبدأ واجهة API لتضمين X.", + "X embed could not load.": "تعذّر تحميل تضمين X.", + "X embed timed out.": "انتهت مهلة تضمين X.", + "TIMEOUT": "انتهت المهلة", + "BLOCKED": "محظور", + "Facebook embed unavailable. The post may be private, removed, region-restricted, or blocked.": "تضمين Facebook غير متاح. قد يكون المنشور خاصًا أو محذوفًا أو مقيّدًا جغرافيًا أو محظورًا.", + "Preloading {provider} media": "جارٍ التحميل المسبق لوسائط {provider}", + "LOADING X POST…": "جارٍ تحميل منشور X…", + "The X post is unavailable or cannot be embedded.": "منشور X غير متاح أو لا يمكن تضمينه.", + "X POST · PROVIDER CONTROLS": "منشور X · عناصر تحكم المنصة", + "{reason} OPEN ORIGINAL.": "{reason} افتح الأصل.", + "X embed unavailable": "تضمين X غير متاح", + "FACEBOOK · PROVIDER CONTROLS": "FACEBOOK · عناصر تحكم المنصة", + "Facebook embed unavailable": "تضمين Facebook غير متاح", + "AUTOPLAY BLOCKED · USE PROVIDER CONTROLS": "التشغيل التلقائي محظور · استخدم عناصر تحكم المنصة", + "Embedded {provider} media for {source}": "وسائط {provider} مضمَّنة: {source}", + "witness source": "مصدر شاهد عيان", + "Witness source": "مصدر شاهد عيان", + "{provider} · EMBEDDED SOURCE": "{provider} · مصدر مضمَّن", + "OPEN ORIGINAL ↗": "فتح الأصل ↗", + "{provider} media: {source}": "وسائط {provider}: {source}", + "{provider} · PROVIDER CONTROLS": "{provider} · عناصر تحكم المنصة", + "YOUTUBE {state} · OPEN ORIGINAL": "YOUTUBE {state} · فتح الأصل", + "INITIATION": "البداية", + "DAMMING": "الانسداد", + "SECONDARY FAILURE": "انهيار ثانوي", + "BORDER ARRIVAL": "الوصول إلى الحدود", + "PROPAGATION": "الانتشار", + "DOWNSTREAM PASSAGE": "العبور باتجاه المصب", + "CONSEQUENCE": "العواقب", + "DOWNSTREAM CONSEQUENCE": "العواقب باتجاه المصب", + "EVIDENCE": "الأدلة", + "{year} HISTORICAL REFERENCE": "مرجع تاريخي {year}", + "{year} POST-EVENT": "بعد الحدث {year}", + "{count} GEOLOCATED SOURCE-MAP PLACEMENTS": { + "zero": "{count} موضع محدَّد جغرافيًا على خريطة المصادر", + "one": "موضع واحد محدَّد جغرافيًا على خريطة المصادر ({count})", + "two": "موضعان محدَّدان جغرافيًا على خريطة المصادر ({count})", + "few": "{count} مواضع محدَّدة جغرافيًا على خريطة المصادر", + "many": "{count} موضعًا محدَّدًا جغرافيًا على خريطة المصادر", + "other": "{count} موضع محدَّد جغرافيًا على خريطة المصادر" + }, + "NO PREVIEW": "لا معاينة", + "YouTube source": "مصدر YouTube", + "Facebook source": "مصدر Facebook", + "SOURCE LINK": "رابط المصدر", + "{publisher} / OPEN": "{publisher} / فتح", + "Bhote Koshi flood reconstruction controls": "عناصر التحكم في إعادة بناء فيضان Bhote Koshi", + "EVENT RECONSTRUCTION · 26 AUG 2026": "إعادة بناء الحدث · 26 أغسطس 2026", + "BHOTE KOSHI OUTBURST FLOOD": "فيضان Bhote Koshi الانفجاري", + "Close event layer": "إغلاق طبقة الحدث", + "OBSERVED IMAGERY": "صور مرصودة", + "SCHEMATIC CORRIDOR": "ممر تخطيطي", + "2021 HISTORICAL REFERENCE / 2026 POST-EVENT": "مرجع تاريخي 2021 / بعد الحدث 2026", + "Historical reference and post-event image split": "مقارنة الصورة المرجعية التاريخية بصورة ما بعد الحدث", + "RECONSTRUCTION CLOCK": "توقيت إعادة البناء", + "Schematic downstream progression": "تقدّم تخطيطي باتجاه المصب", + "Story beat navigation": "التنقل بين مراحل القصة", + "Previous story beat": "مرحلة القصة السابقة", + "CAUSE": "السبب", + "CAPTURE TIME UNVERIFIED": "وقت الالتقاط غير موثَّق", + "Next story beat": "مرحلة القصة التالية", + "▶ PLAY": "▶ تشغيل", + "Play the next shot and continue through this scene": "تشغيل اللقطة التالية ومتابعة هذا المشهد", + "▶ PLAY SCENE": "▶ تشغيل المشهد", + "◉ CINEMATIC": "◉ سينمائي", + "↺ FULL STORY": "↺ القصة كاملة", + "↗ OPEN ORIGINAL": "↗ فتح الأصل", + "⌖ LOWER GORGE": "⌖ الخانق السفلي", + "FIELD REPORTS · {count}": "تقارير ميدانية · {count}", + "GEOLOCATIONS · {credit}": "تحديدات جغرافية · {credit}", + "↗ OPEN PUBLIC MAP": "↗ فتح الخريطة العامة", + " Clouds are preserved from the source imagery.": " الغيوم كما هي في الصور المصدرية.", + "Rasuwagadhi witness": "شاهد عيان في Rasuwagadhi", + "Open original source for {source}; capture time unverified": "فتح المصدر الأصلي: {source}؛ وقت الالتقاط غير موثَّق", + "Historical reference and post-event image divider": "فاصل الصورة المرجعية التاريخية وصورة ما بعد الحدث", + "A historical reference {before} percent, B post-event {after} percent": "A مرجع تاريخي {before}%، B بعد الحدث {after}%", + "■ RELEASE CAMERA": "■ تحرير الكاميرا", + "Seek Nepal scene clock": "التنقل في توقيت مشهد نيبال", + "NEPAL SCENE CLOCK": "توقيت مشهد نيبال", + "… PLAYING SHOT": "… تشغيل اللقطة", + "▶ PLAY SHOT": "▶ تشغيل اللقطة", + "Ⅱ PAUSE": "Ⅱ إيقاف مؤقت", + "↺ REPLAY CINEMATIC": "↺ إعادة العرض السينمائي", + "↺ REPLAY": "↺ إعادة", + "… PLAYING SCENE": "… تشغيل المشهد", + "Continue {scene} from next shot": "متابعة «{scene}» من اللقطة التالية", + "current scene": "المشهد الحالي", + "Replay the full reconstruction": "إعادة تشغيل إعادة البناء كاملة", + "SCENE SHOT": "لقطة المشهد", + "TIME UNVERIFIED": "الوقت غير موثَّق", + "{count} SOURCES": { + "zero": "{count} مصدر", + "one": "مصدر واحد ({count})", + "two": "مصدران ({count})", + "few": "{count} مصادر", + "many": "{count} مصدرًا", + "other": "{count} مصدر" + }, + "OUTSIDE IMAGERY SWIPE": "خارج مقارنة الصور", + "{scene} / AUTHORED SHOT": "{scene} / لقطة معدّة", + "NEPAL FLOOD INCIDENT": "حادثة فيضان نيبال", + "Play {shot}": "تشغيل «{shot}»", + "current scene shot": "لقطة المشهد الحالية", + "Play reconstruction": "تشغيل إعادة البناء", + "Load previous scene shot": "تحميل لقطة المشهد السابقة", + "Load next scene shot": "تحميل لقطة المشهد التالية", + "SCHEMATIC CORRIDOR, NOT MODELED ARRIVAL TIME.": "ممر تخطيطي، لا زمن وصول منمذج.", + "Rasuwa · 26 Aug 2026": "Rasuwa · 26 أغسطس 2026", + "Event reconstruction": "إعادة بناء الحدث", + "BHOTE KOSHI FLOOD INCIDENT": "حادثة فيضان Bhote Koshi", + "NEPAL · 26 AUG 2026": "نيبال · 26 أغسطس 2026", + "USGS INITIAL REPORT": "التقرير الأولي من USGS", + "26 AUG 2026 · 08:37 NPT": "26 أغسطس 2026 · 08:37 NPT", + "28.2710° N · 85.5150° E": "28.2710° ش · 85.5150° ق", + "INITIAL M4.4 · RECLASSIFIED M5.2 LANDSLIDE": "M4.4 مبدئيًا · أُعيد تصنيفه انهيارًا أرضيًا M5.2", + "USGS EVENT us7000tbwb · OPEN SOURCE": "حدث USGS us7000tbwb · فتح المصدر", + "Open the USGS initial report for the 26 August 2026 Nepal landslide": "فتح التقرير الأولي من USGS عن الانهيار الأرضي في نيبال في 26 أغسطس 2026", + "Show the Nepal context callout without a border or country fill": "عرض بطاقة سياق نيبال دون حدود أو تعبئة للدولة", + "Introduce Nepal, draw its border, then reveal the Bhote Koshi incident": "تقديم نيبال ورسم حدودها، ثم إظهار حادثة Bhote Koshi", + "CITIES": "المدن", + "Keep the regional incident context and introduce nearby city labels": "الإبقاء على السياق الإقليمي للحادثة وإضافة أسماء المدن القريبة", + "PLACES": "الأماكن", + "Introduce the reconstruction scene key places from trigger to downstream": "تقديم الأماكن الرئيسية في مشهد إعادة البناء من نقطة البداية حتى المصب", + "PATH": "المسار", + "Animate the sourced cyan river-centerline route to Trishuli Bazaar": "تحريك المسار السماوي الموثَّق على امتداد محور النهر حتى Trishuli Bazaar", + "OVERVIEW": "نظرة عامة", + "Keep the completed flood path and location labels visible": "إبقاء مسار الفيضان المكتمل وأسماء المواقع ظاهرة", + "RECORD": "السجل", + "Reveal the trigger record while making a slow camera approach": "إظهار سجل الحدث المسبِّب مع اقتراب بطيء للكاميرا", + "{speed} kn": "{speed} عقدة", + "That file is not valid JSON.": "هذا الملف ليس JSON صالحًا.", + "That JSON file is not GeoJSON.": "ملف JSON هذا ليس GeoJSON.", + "That FeatureCollection has no features list.": "لا تحتوي FeatureCollection هذه على قائمة features.", + "Every GeoJSON feature must have type Feature.": "يجب أن يكون نوع كل عنصر GeoJSON هو Feature.", + "That GeoJSON has invalid geometries.": "يحتوي GeoJSON هذا على أشكال هندسية غير صالحة.", + "That GeoJSON contains an unsupported geometry.": "يحتوي GeoJSON هذا على شكل هندسي غير مدعوم.", + "That GeoJSON has invalid coordinates.": "يحتوي GeoJSON هذا على إحداثيات غير صالحة.", + "That file creates more than {limit} map objects (the limit).": "ينشئ هذا الملف عناصر على الخريطة تتجاوز الحد المسموح ({limit}).", + "That file has more than {limit} style definitions and image links after cleanup (the limit).": "بعد التنظيف، يحتوي هذا الملف على تعريفات أنماط وروابط صور تتجاوز الحد المسموح ({limit}).", + "That file has more than {limit} features (the limit).": "يحتوي هذا الملف على عناصر تتجاوز الحد المسموح ({limit}).", + "That file has more than {limit} points (the limit) across {features} features.": "يحتوي هذا الملف على نقاط تتجاوز الحد المسموح ({limit}) موزّعة على {features} عنصر.", + "That file has more than {limit} points (the limit).": "يحتوي هذا الملف على نقاط تتجاوز الحد المسموح ({limit}).", + "That KMZ unpacks to more than the import limit.": "حجم ملف KMZ هذا بعد فك ضغطه يتجاوز حد الاستيراد.", + "That KMZ is damaged and could not be unpacked.": "ملف KMZ هذا تالف وتعذّر فك ضغطه.", + "That KMZ is not a readable zip archive.": "ملف KMZ هذا ليس أرشيف zip قابلًا للقراءة.", + "That KMZ uses a zip format this import does not read.": "يستخدم ملف KMZ هذا صيغة zip لا يقرؤها الاستيراد.", + "That KMZ is encrypted.": "ملف KMZ هذا مشفّر.", + "That KMZ uses a compression method this import does not read.": "يستخدم ملف KMZ هذا طريقة ضغط لا يقرؤها الاستيراد.", + "That KML has invalid geometry bounds.": "يحتوي ملف KML هذا على حدود هندسية غير صالحة.", + "That KML has invalid coordinates.": "يحتوي ملف KML هذا على إحداثيات غير صالحة.", + "That GPX file has no document.": "لا يحتوي ملف GPX هذا على مستند .", + "That {format} file is not valid XML.": "ملف {format} هذا ليس XML صالحًا.", + "That file has an unreadable image or exceeds the 16-megapixel image limit.": "يحتوي هذا الملف على صورة غير قابلة للقراءة أو تتجاوز حد 16 ميغابكسل.", + "That KML could not be read.": "تعذّرت قراءة ملف KML هذا.", + "That file has invalid point coordinates.": "يحتوي هذا الملف على إحداثيات نقاط غير صالحة.", + "Ground heights are not available for that file. Try again when the map has loaded.": "ارتفاعات الأرض غير متاحة لهذا الملف. أعد المحاولة بعد تحميل الخريطة.", + "That file took too long to read.": "استغرقت قراءة هذا الملف وقتًا طويلًا جدًا.", + "Nothing to import.": "لا يوجد ما يُستورد.", + "That file is larger than {size} MiB.": "حجم هذا الملف أكبر من {size} MiB.", + "Only GeoJSON, KML, KMZ and GPX files can be imported.": "لا يمكن استيراد سوى ملفات GeoJSON وKML وKMZ وGPX.", + "That file has nothing to draw.": "لا يحتوي هذا الملف على ما يمكن رسمه.", + "That KMZ holds no KML document.": "لا يحتوي ملف KMZ هذا على مستند KML.", + "That {format} file could not be read.": "تعذّرت قراءة ملف {format} هذا.", + "That file has {count} map objects; the limit is {limit}.": "عدد عناصر الخريطة في هذا الملف {count}، والحد المسموح {limit}.", + "Ground heights could not be read. Try that file again.": "تعذّرت قراءة ارتفاعات الأرض. أعد استيراد الملف.", + "That file has invalid point graphics.": "يحتوي هذا الملف على رسومات نقاط غير صالحة.", + "Map tiles temporarily unavailable": "بلاطات الخريطة غير متاحة مؤقتًا", + "Mapped names temporarily unavailable": "أسماء المواقع المرسومة غير متاحة مؤقتًا", + "Military airfield": "مطار عسكري", + "Naval base": "قاعدة بحرية", + "Firing range": "ميدان رماية", + "Military land": "أرض عسكرية", + "Mapped installation": "منشأة مرسومة", + "Military area": "منطقة عسكرية", + "flight": "رحلة", + "military flight": "رحلة عسكرية", + "satellite": "قمر صناعي", + "Draw": "الرسم", + "Directions": "الاتجاهات", + "Recent imagery": "الصور الحديثة", + "Included in bundle": "مضمَّن في الحزمة", + "Missing bundle file — reimport its bundle": "ملف الحزمة مفقود — أعد استيراد حزمته", + "Source configured; file checked when loaded": "المصدر مُعَدّ؛ يُفحص الملف عند التحميل", + "Source unavailable": "المصدر غير متاح", + "NORMAL": "عادي", + "ANIME": "أنمي", + "NOIR": "نوار", + "ARCTIC": "القطب الشمالي", + "ANTARCTIC": "القطب الجنوبي", + "NORTH AMERICA": "أمريكا الشمالية", + "SOUTH AMERICA": "أمريكا الجنوبية", + "EUROPE": "أوروبا", + "AFRICA": "أفريقيا", + "ASIA": "آسيا", + "OCEANIA": "أوقيانوسيا", + "NORTHERN OCEANIC GRID": "الشبكة المحيطية الشمالية", + "SOUTHERN OCEANIC GRID": "الشبكة المحيطية الجنوبية", + "{state} {layers}": "{state}: {layers}", + "view band|STREET": "شارع", + "view band|CITY": "مدينة", + "view band|METRO": "حاضرة", + "view band|REGIONAL": "إقليمي", + "view band|GLOBAL": "عالمي", + "N/A": "غ/م", + "{mode} {band} {locality} | {region} | ALT {alt} | WINDOW {window} | SUN {sun}° | ONA {ona}° | {zone}": "{mode} {band} {locality} | {region} | الارتفاع {alt} | النافذة {window} | الشمس {sun}° | ONA {ona}° | {zone}", + "NEAR {poi} ({city}) {distance}": "قرب {poi} ({city}) {distance}", + "SECTOR {lat} {lon}": "القطاع {lat} {lon}", + "hemisphere|N": "ش", + "hemisphere|S": "ج", + "hemisphere|E": "ق", + "hemisphere|W": "غ", + "Provider Settings does not answer proxied requests": "لا تستجيب «إعدادات المزوّدين» للطلبات عبر الوكيل", + "Provider Settings is disabled while sharing is enabled": "«إعدادات المزوّدين» معطّلة ما دامت المشاركة مفعّلة", + "Provider Settings answers only the machine running the server": "لا تستجيب «إعدادات المزوّدين» إلا للجهاز الذي يشغّل الخادم", + "Provider Settings answers only local hostnames": "لا تستجيب «إعدادات المزوّدين» إلا لأسماء المضيفين المحلية", + "Provider Settings requires an exact local Origin": "تتطلب «إعدادات المزوّدين» قيمة Origin محلية مطابقة تمامًا", + "Unrecognized Origin refused": "رُفض Origin غير معروف", + "Cross-origin requests are refused": "تُرفض الطلبات من أصل مختلف", + "Content-Type must be application/json": "يجب أن يكون Content-Type هو application/json", + "Method not allowed": "الطريقة غير مسموح بها", + "Request too large": "الطلب كبير جدًا", + "Invalid JSON": "JSON غير صالح", + "Body must be a JSON object of {ENV_VAR: value}": "يجب أن يكون متن الطلب كائن JSON بالشكل {ENV_VAR: value}", + "No keys provided": "لم تُقدَّم أي مفاتيح", + "At most {limit} keys per save": "الحد الأقصى للمفاتيح في كل عملية حفظ: {limit}", + "Unknown key: {name}": "مفتاح غير معروف: {name}", + "{name} must be a string": "{name}: يجب أن تكون القيمة نصًا", + "{name} is empty": "{name}: القيمة فارغة", + "{name} is longer than any real key ({limit} max)": "{name}: القيمة أطول من أي مفتاح حقيقي (الحد الأقصى {limit})", + "{name} may only contain printable characters with no spaces": "{name}: يُسمح فقط بالأحرف القابلة للطباعة دون مسافات", + "{name} contains a character that is not valid in a key (#, quotes, $, \\, or backtick)": "{name}: يحتوي على حرف غير صالح في المفتاح (#، أو علامات الاقتباس، أو $، أو \\، أو العلامة المائلة الخلفية `)", + "{name} is configured outside Provider Settings and can only be changed where it was set": "{name}: مُعَدّ خارج «إعدادات المزوّدين» ولا يمكن تغييره إلا حيث ضُبط", + "The key was not saved: could not restrict the credential file to your account; nothing was saved": "لم يُحفظ المفتاح: تعذّر قصر الوصول إلى ملف بيانات الاعتماد على حسابك؛ لم يُحفظ شيء", + "The key was not saved: the existing configuration could not be read, so nothing was changed": "لم يُحفظ المفتاح: تعذّرت قراءة الإعدادات الحالية، لذا لم يتغيّر شيء", + "Could not write the {store} store": "تعذّرت الكتابة في مخزن {store}", + "OAuth check failed: {detail}": "فشل التحقق من OAuth: {detail}", + "Could not check ChatGPT sign-in. Try again.": "تعذّر التحقق من تسجيل الدخول إلى ChatGPT. أعد المحاولة.", + "VOICE AUTH · CHATGPT OAUTH": "مصادقة الصوت · CHATGPT OAUTH", + "VOICE AUTH · API KEY": "مصادقة الصوت · مفتاح API", + "USE API KEY": "استخدام مفتاح API", + "USE CHATGPT OAUTH": "استخدام CHATGPT OAUTH", + "Use OPENAI_API_KEY for the next cloud voice session": "استخدام OPENAI_API_KEY في الجلسة الصوتية السحابية التالية", + "Use the signed-in local ChatGPT/Codex OAuth session for the next cloud voice session": "استخدام جلسة OAuth المحلية المسجَّل دخولها في ChatGPT/Codex للجلسة الصوتية السحابية التالية", + "Metered — a billing-enabled account": "مدفوع حسب الاستخدام — يتطلب حسابًا مفعَّل الفوترة", + "Optional paid token — public access works without one": "رمز مدفوع اختياري — الوصول العام يعمل بدونه", + "Free key — register, paste, done": "مفتاح مجاني — سجّل، والصق، وانتهى الأمر", + "browser-side": "في المتصفح", + "This key runs in the browser by design — restrict it at the provider (see SECURITY.md)": "يعمل هذا المفتاح في المتصفح بحكم التصميم — قيّده لدى المزوّد (راجع SECURITY.md)", + "configured externally": "مُعَدّ خارجيًا", + "Supplied by your environment, Keychain, or launcher — change it where it was set": "مقدَّم من بيئتك أو Keychain أو المشغِّل — غيّره حيث ضُبط", + "MANAGE ↗": "إدارة ↗", + "GET KEY ↗": "الحصول على مفتاح ↗", + "{envVar} saved — paste to replace": "تم حفظ {envVar} — الصق لاستبداله", + "paste {envVar}": "الصق {envVar}", + "unsaved provider keys": "مفاتيح مزوّدين غير محفوظة", + "Project keys: {status}": "مفاتيح المشروع: {status}", + "Cloud voice will use OPENAI_API_KEY on the next session.": "سيستخدم الصوت السحابي OPENAI_API_KEY في الجلسة التالية.", + "Checking local ChatGPT OAuth sign-in…": "جارٍ التحقق من تسجيل الدخول المحلي إلى ChatGPT عبر OAuth…", + "Could not check ChatGPT sign-in.": "تعذّر التحقق من تسجيل الدخول إلى ChatGPT.", + "ChatGPT OAuth selected for cloud voice. Your API key stays saved and available.": "تم اختيار ChatGPT OAuth للصوت السحابي. يبقى مفتاح API محفوظًا ومتاحًا.", + "ChatGPT sign-in expired. Opening sign-in again…": "انتهت صلاحية تسجيل الدخول إلى ChatGPT. جارٍ فتح تسجيل الدخول مجددًا…", + "Opening ChatGPT sign-in in your browser…": "جارٍ فتح تسجيل الدخول إلى ChatGPT في متصفحك…", + "Could not start ChatGPT sign-in on this machine.": "تعذّر بدء تسجيل الدخول إلى ChatGPT على هذا الجهاز.", + "Finish ChatGPT sign-in in the browser. Waiting for it to complete…": "أكمل تسجيل الدخول إلى ChatGPT في المتصفح. بانتظار اكتماله…", + "ChatGPT sign-in timed out. Click {button} to try again.": "انتهت مهلة تسجيل الدخول إلى ChatGPT. انقر «{button}» لإعادة المحاولة.", + "ChatGPT sign-in complete. OAuth will be used for the next cloud voice session.": "اكتمل تسجيل الدخول إلى ChatGPT. سيُستخدم OAuth في الجلسة الصوتية السحابية التالية.", + "The photorealistic 3D planet, place search + Street View": "الكوكب الواقعي ثلاثي الأبعاد، والبحث عن الأماكن + Street View", + "Voice control — API key or ChatGPT OAuth": "التحكم الصوتي — مفتاح API أو ChatGPT OAuth", + "Gemini Live voice control": "التحكم الصوتي عبر Gemini Live", + "Street-level imagery and coverage in the Street Level layer. Free: register an app in the Mapillary developer dashboard and paste its Client Token": "صور على مستوى الشارع وتغطيتها في طبقة «مستوى الشارع». مجاني: سجّل تطبيقًا في لوحة مطوّري Mapillary والصق رمز Client Token الخاص به", + "Public space-missions access needs no key. Leave blank for standard use; paid tokens only raise request limits.": "الوصول العام إلى بيانات المهام الفضائية لا يحتاج إلى مفتاح. اتركه فارغًا للاستخدام العادي؛ الرموز المدفوعة ترفع حدود الطلبات فقط.", + "Air quality request failed": "فشل طلب بيانات جودة الهواء", + "No readings available": "لا توجد قراءات متاحة", + "No current readings": "لا توجد قراءات حالية", + "{count} stations reporting": { + "zero": "{count} محطة تُرسل بيانات", + "one": "محطة واحدة تُرسل بيانات ({count})", + "two": "محطتان تُرسلان بيانات ({count})", + "few": "{count} محطات تُرسل بيانات", + "many": "{count} محطة تُرسل بيانات", + "other": "{count} محطة تُرسل بيانات" + }, + "Highest air-quality readings in view": "أعلى قراءات جودة الهواء في نطاق العرض", + "Low": "منخفض", + "Low health risk": "خطر صحي منخفض", + "Moderate": "متوسط", + "Moderate health risk": "خطر صحي متوسط", + "High": "مرتفع", + "High health risk": "خطر صحي مرتفع", + "Very High": "مرتفع جدًا", + "Very High health risk": "خطر صحي مرتفع جدًا", + "Air quality": "جودة الهواء", + "Canada only · ECCC AQHI network": "كندا فقط · شبكة AQHI التابعة لـ ECCC", + "ECCC request timed out": "انتهت مهلة طلب ECCC", + "Malformed AQHI station response": "استجابة محطات AQHI مشوّهة", + "No AQHI stations available": "لا توجد محطات AQHI متاحة", + "Malformed AQHI observation response": "استجابة أرصاد AQHI مشوّهة", + "Camera source temporarily unavailable": "مصدر الكاميرات غير متاح مؤقتًا", + "Mapped camera locations": "مواقع الكاميرات المرسومة", + "SHOW NEAREST": "عرض الأقرب", + "Stop following the current object before navigating to a camera": "أوقف متابعة العنصر الحالي قبل الانتقال إلى كاميرا", + "Move to the nearest loaded camera and show its details": "الانتقال إلى أقرب كاميرا محمّلة وعرض تفاصيلها", + "Camera badges": "شارات الكاميرات", + "Cyan cameras turn coral when selected. Wedges illustrate mapped direction, not measured coverage. Nearby cameras may be outside the screen.": "تتحول الكاميرات السماوية إلى اللون المرجاني عند تحديدها. توضّح القطاعات الاتجاه المرسوم لا التغطية المقيسة. قد تكون الكاميرات القريبة خارج الشاشة.", + "{count} nearby · {onScreen} on screen": { + "zero": "القريبة: {count} · على الشاشة: {onScreen}", + "one": "القريبة: {count} · على الشاشة: {onScreen}", + "two": "القريبة: {count} · على الشاشة: {onScreen}", + "few": "القريبة: {count} · على الشاشة: {onScreen}", + "many": "القريبة: {count} · على الشاشة: {onScreen}", + "other": "القريبة: {count} · على الشاشة: {onScreen}" + }, + "{count} nearby": { + "zero": "القريبة: {count}", + "one": "القريبة: {count}", + "two": "القريبة: {count}", + "few": "القريبة: {count}", + "many": "القريبة: {count}", + "other": "القريبة: {count}" + }, + "retrying mapped ALPR cameras": "إعادة محاولة تحميل كاميرات ALPR المرسومة", + "loading mapped ALPR cameras": "جارٍ تحميل كاميرات ALPR المرسومة", + "No ALPR data for this area — US and Canada only": "لا توجد بيانات ALPR لهذه المنطقة — الولايات المتحدة وكندا فقط", + "Zoom in to load mapped cameras": "قرّب الخريطة لتحميل الكاميرات المرسومة", + "Showing cached locations": "عرض المواقع المخزّنة", + "Coverage limited — zoom in": "التغطية محدودة — قرّب الخريطة", + "No ALPR data for this area": "لا توجد بيانات ALPR لهذه المنطقة", + "None on screen — nearby cameras are outside the view": "لا شيء على الشاشة — الكاميرات القريبة خارج نطاق العرض", + "ALPR camera": "كاميرا ALPR", + "Camera coverage unavailable": "تغطية الكاميرات غير متاحة", + "OpenStreetMap · community mapped": "OpenStreetMap · رسمها المجتمع", + "Overpass returned an incomplete camera response": "أعاد Overpass استجابة غير مكتملة عن الكاميرات", + "At least {count}": "{count} على الأقل", + "Named areas ({n})": "مناطق مسمّاة ({n})", + "{distance} FLIGHT / VESSEL WINDOW": "نطاق الرحلات / السفن {distance}", + "mapped matches within {km} km of the subject": "تطابقات مرسومة ضمن {km} كم من الهدف", + "none mapped within {km} km; not a complete 250 km survey": "لا شيء مرسوم ضمن {km} كم؛ ليس مسحًا كاملًا لنطاق 250 كم", + "mapped matches from the loaded viewport": "تطابقات مرسومة من منفذ العرض المحمَّل", + "viewport feed is not a complete 250 km survey": "بيانات منفذ العرض ليست مسحًا كاملًا لنطاق 250 كم", + "GBFS fetch error": "خطأ في جلب GBFS", + "FOV {value}° (DATASHEET)": "FOV {value}° (ورقة البيانات)", + "SPEC FOV {span}° (CAPABILITY)": "FOV حسب المواصفات {span}° (القدرة)", + "{spec} · SPECS: CCTV-DATABASE.COM": "{spec} · المواصفات: CCTV-DATABASE.COM", + "Atlantic and eastern/central North Pacific; not worldwide cyclone coverage.": "الأطلسي وشرق/وسط شمال المحيط الهادئ؛ ليست تغطية عالمية للأعاصير.", + "Cyclone advisories unavailable": "نشرات الأعاصير غير متاحة", + "Cyclone data unavailable": "بيانات الأعاصير غير متاحة", + "Potential tropical cyclone": "إعصار مداري محتمل", + "Post-tropical cyclone": "إعصار ما بعد مداري", + "Hurricane": "إعصار", + "Tropical storm": "عاصفة مدارية", + "Tropical depression": "منخفض مداري", + "Subtropical storm": "عاصفة شبه مدارية", + "Subtropical depression": "منخفض شبه مداري", + "Track and cone match this advisory": "المسار والمخروط مطابقان لهذه النشرة", + "Track/cone awaiting advisory {number}": "المسار/المخروط بانتظار النشرة رقم {number}", + "Track/cone unavailable": "المسار/المخروط غير متاح", + "Cached advisory · stale source": "نشرة مخزّنة · المصدر متقادم", + "Loading advisories…": "جارٍ تحميل النشرات…", + "{count} active storms": { + "zero": "{count} عاصفة نشطة", + "one": "عاصفة نشطة واحدة ({count})", + "two": "عاصفتان نشطتان ({count})", + "few": "{count} عواصف نشطة", + "many": "{count} عاصفة نشطة", + "other": "{count} عاصفة نشطة" + }, + "Position as of {time}": "الموضع حتى {time}", + "Maximum sustained wind: {wind} · Pressure: {pressure}": "أقصى رياح مستمرة: {wind} · الضغط: {pressure}", + "{name} · {classification} · Advisory {number} · issued {time}": "{name} · {classification} · النشرة رقم {number} · صدرت {time}", + "No active NHC/CPHC systems": "لا توجد أنظمة NHC/CPHC نشطة", + "Advisories unavailable": "النشرات غير متاحة", + "Cyclones · NHC / CPHC": "الأعاصير · NHC / CPHC", + "Atlantic · E/C Pacific": "الأطلسي · شرق/وسط الهادئ", + "{storms} · {name} selected": "{storms} · المحدد: {name}", + "Official advisory ↗": "النشرة الرسمية ↗", + "Active NHC and CPHC cyclone advisories": "نشرات الأعاصير النشطة من NHC وCPHC", + "Wind unavailable": "الرياح غير متاحة", + "Advisory center / forecast track": "المركز حسب النشرة / المسار المتوقع", + "Center-track uncertainty cone": "مخروط عدم اليقين لمسار المركز", + "Select a storm on the map, or choose a storm in the list to select it and move the camera. Click empty map space to clear the selection. NOAA NHC/CPHC advisory context. The cone describes forecast center-track uncertainty, not storm size or the full hazard area. Forecast point labels are source lead hours, not times computed from advisory issuance. Geometry follows the surface; height is not weather altitude. Consult the official advisory.": "حدّد عاصفة على الخريطة، أو اخترها من القائمة لتحديدها وتحريك الكاميرا إليها. انقر على مساحة فارغة من الخريطة لإلغاء التحديد. سياق نشرات NOAA NHC/CPHC. يصف المخروط عدم اليقين في المسار المتوقع للمركز، لا حجم العاصفة ولا كامل منطقة الخطر. تسميات نقاط التوقع هي ساعات المهلة في المصدر، لا أوقات محسوبة من صدور النشرة. تتبع الأشكال الهندسية السطح؛ والارتفاع لا يمثل ارتفاع الظواهر الجوية. راجع النشرة الرسمية.", + "DRIVE": "قيادة", + "Drive": "بالسيارة", + "WALK": "مشي", + "Walk": "سيرًا", + "BIKE": "دراجة", + "Bike": "بالدراجة", + "rate limited": "تجاوز حد الطلبات", + "routing service is rate limited": "خدمة التوجيه تجاوزت حد الطلبات", + "route leg too long": "مقطع المسار طويل جدًا", + "route too long": "المسار طويل جدًا", + "{error} — try again in a moment": "{error} — أعد المحاولة بعد قليل", + "Routing is rate limited — try again in a moment": "التوجيه تجاوز حد الطلبات — أعد المحاولة بعد قليل", + "Routing unavailable (HTTP {status})": "التوجيه غير متاح (HTTP {status})", + "Routing unavailable": "التوجيه غير متاح", + "direction|left": "يسارًا", + "direction|right": "يمينًا", + "direction|slightly left": "قليلًا إلى اليسار", + "direction|slightly right": "قليلًا إلى اليمين", + "direction|sharply left": "بحدة إلى اليسار", + "direction|sharply right": "بحدة إلى اليمين", + "direction|straight": "إلى الأمام", + "direction|around": "للخلف", + "fork direction|left": "اليسار", + "fork direction|right": "اليمين", + "fork direction|slightly left": "اليسار قليلًا", + "fork direction|slightly right": "اليمين قليلًا", + "fork direction|sharply left": "أقصى اليسار", + "fork direction|sharply right": "أقصى اليمين", + "fork direction|straight": "الاتجاه المستقيم", + "lane direction|left": "اليسرى", + "lane direction|right": "اليمنى", + "lane direction|slightly left": "اليسرى", + "lane direction|slightly right": "اليمنى", + "lane direction|sharply left": "الأقصى يسارًا", + "lane direction|sharply right": "الأقصى يمينًا", + "lane direction|straight": "الوسطى", + "ordinal|{number}st": "رقم {number}", + "ordinal|{number}nd": "رقم {number}", + "ordinal|{number}rd": "رقم {number}", + "ordinal|{number}th": "رقم {number}", + "Head out on {road}": "انطلق على {road}", + "Head out": "انطلق", + "Arrive at your destination, on the left": "وصلت إلى وجهتك، على اليسار", + "Arrive at your destination, on the right": "وصلت إلى وجهتك، على اليمين", + "Arrive at your destination": "وصلت إلى وجهتك", + "Make a U-turn onto {road}": "استدر للخلف إلى {road}", + "Make a U-turn": "استدر للخلف", + "Continue straight onto {road}": "تابع إلى الأمام على {road}", + "Continue straight": "تابع إلى الأمام", + "Turn {direction} onto {road}": "انعطف {direction} إلى {road}", + "Turn {direction}": "انعطف {direction}", + "Turn onto {road}": "انعطف إلى {road}", + "maneuver|Turn": "انعطف", + "Continue {direction} onto {road}": "تابع {direction} على {road}", + "Continue {direction}": "تابع {direction}", + "At the end of the road, turn {direction} onto {road}": "في نهاية الطريق، انعطف {direction} إلى {road}", + "At the end of the road, turn {direction}": "في نهاية الطريق، انعطف {direction}", + "At the end of the road, continue onto {road}": "في نهاية الطريق، تابع على {road}", + "At the end of the road, continue": "في نهاية الطريق، تابع", + "Keep {direction} at the fork onto {road}": "عند التفرّع الزم {direction} إلى {road}", + "Keep {direction} at the fork": "عند التفرّع الزم {direction}", + "Continue at the fork onto {road}": "عند التفرّع تابع على {road}", + "Continue at the fork": "عند التفرّع تابع", + "Merge {direction} onto {road}": "اندمج {direction} في {road}", + "Merge {direction}": "اندمج {direction}", + "Merge onto {road}": "اندمج في {road}", + "maneuver|Merge": "اندمج", + "Take the ramp on the {direction} onto {road}": "اسلك المنحدر {direction} إلى {road}", + "Take the ramp on the {direction}": "اسلك المنحدر {direction}", + "Take the ramp {direction} onto {road}": "اسلك المنحدر {direction} إلى {road}", + "Take the ramp {direction}": "اسلك المنحدر {direction}", + "Take the ramp onto {road}": "اسلك المنحدر إلى {road}", + "Take the ramp": "اسلك المنحدر", + "Take the exit on the {direction} onto {road}": "اسلك المخرج {direction} إلى {road}", + "Take the exit on the {direction}": "اسلك المخرج {direction}", + "Take the exit {direction} onto {road}": "اسلك المخرج {direction} إلى {road}", + "Take the exit {direction}": "اسلك المخرج {direction}", + "Take the exit onto {road}": "اسلك المخرج إلى {road}", + "Take the exit": "اسلك المخرج", + "At the roundabout, take the {exit} exit onto {road}": "عند الدوّار، اسلك المخرج {exit} إلى {road}", + "At the roundabout, take the {exit} exit": "عند الدوّار، اسلك المخرج {exit}", + "Enter the roundabout onto {road}": "ادخل الدوّار باتجاه {road}", + "Enter the roundabout": "ادخل الدوّار", + "At the roundabout, turn {direction} onto {road}": "عند الدوّار، انعطف {direction} إلى {road}", + "At the roundabout, turn {direction}": "عند الدوّار، انعطف {direction}", + "At the roundabout, continue onto {road}": "عند الدوّار، تابع على {road}", + "At the roundabout, continue": "عند الدوّار، تابع", + "Exit the roundabout onto {road}": "اخرج من الدوّار إلى {road}", + "Exit the roundabout": "اخرج من الدوّار", + "Use the {direction} lane onto {road}": "استخدم الحارة {direction} إلى {road}", + "Use the {direction} lane": "استخدم الحارة {direction}", + "Continue onto {road}": "تابع على {road}", + "maneuver|Continue": "تابع", + "{mode} — reroute for {modeLower}": "{mode} — إعادة حساب المسار: {modeLower}", + "CLICK MAP": "انقر على الخريطة", + "SET A": "تعيين A", + "Click a spot on the globe to place A (click again to cancel)": "انقر على موضع في الكرة الأرضية لوضع A (انقر مجددًا للإلغاء)", + "Then click the globe to place the start": "ثم انقر على الكرة الأرضية لوضع نقطة البداية", + "SET B": "تعيين B", + "Click a spot on the globe to place B (click again to cancel)": "انقر على موضع في الكرة الأرضية لوضع B (انقر مجددًا للإلغاء)", + "Then click the globe to place the destination": "ثم انقر على الكرة الأرضية لوضع الوجهة", + "Swap A and B": "تبديل A وB", + "FLY ···": "تحليق ···", + "FLYING": "يحلّق", + "FLY": "تحليق", + "Fly the camera along the route": "تحليق الكاميرا على امتداد المسار", + "Place A and B first": "ضع A وB أولًا", + "action|CLEAR": "مسح", + "Remove the route and both markers": "إزالة المسار والعلامتين", + "press Escape twice to leave Draw": "اضغط Esc مرتين للخروج من «الرسم»", + "{name} is active — turn {name} off, then set {endpoint}": "«{name}» نشط — أوقف «{name}»، ثم عيّن {endpoint}", + "{name} is active — {leave}, then set {endpoint}": "«{name}» نشط — {leave}، ثم عيّن {endpoint}", + "Only the first {count} turns of this route are shown": "لا يُعرض من هذا المسار سوى أول {count} انعطافات", + "Turn-by-turn directions": "إرشادات خطوة بخطوة", + "Another map tool is using clicks — close it, then SET A again": "أداة خريطة أخرى تستخدم النقرات — أغلقها، ثم اضغط «تعيين A» مجددًا", + "Routing…": "جارٍ حساب المسار…", + "No route found": "لم يُعثر على مسار", + "{distance} · {duration} · {mode} · first {count} turns": "{distance} · {duration} · {mode} · أول {count} انعطافات", + "{distance} · {duration} · {mode}": "{distance} · {duration} · {mode}", + "Click the globe to place {endpoint}": "انقر على الكرة الأرضية لوضع {endpoint}", + "SET B, then click the globe": "اضغط «تعيين B»، ثم انقر على الكرة الأرضية", + "SET A, then click the globe": "اضغط «تعيين A»، ثم انقر على الكرة الأرضية", + "Step {step} of {total} · then {leg}": "الخطوة {step} من {total} · ثم {leg}", + "Step {step} of {total}": "الخطوة {step} من {total}", + "Then: {instruction}": "ثم: {instruction}", + "No route found between A and B": "لم يُعثر على مسار بين A وB", + "Routing failed: {error}": "فشل حساب المسار: {error}", + "Routing timed out": "انتهت مهلة حساب المسار", + "Routing unavailable — no response from the routing service": "التوجيه غير متاح — لا استجابة من خدمة التوجيه", + "Earthquake source unavailable": "مصدر بيانات الزلازل غير متاح", + "live feed unavailable": "البث المباشر للبيانات غير متاح", + "{value}°N": "{value}° ش", + "{value}°S": "{value}° ج", + "{value}°E": "{value}° ق", + "{value}°W": "{value}° غ", + "fire confidence|high": "عالية", + "fire confidence|nominal": "متوسطة", + "fire confidence|low": "منخفضة", + "age|<1h": "<1 س", + "age|{count}h": "{count} س", + "age|{count}d": "{count} يوم", + "Source snapshot time unavailable": "وقت لقطة المصدر غير متاح", + "Live data unavailable": "البيانات المباشرة غير متاحة", + "Intel Picture": "الصورة الاستخباراتية", + "Kinetic 30d": "العمليات القتالية 30 يومًا", + "Border Crisis": "أزمة الحدود", + "Iran Picture": "صورة إيران", + "Iran Kinetic": "العمليات القتالية في إيران", + "Yemen FLOT": "خط الجبهة في اليمن", + "Latest Drop": "أحدث إصدار", + "GhostMaps file could not be read": "تعذّرت قراءة ملف GhostMaps", + "{count} source links ↗ · click card to open the first": { + "zero": "{count} رابط مصدر ↗ · انقر على البطاقة لفتح الأول", + "one": "رابط مصدر واحد ({count}) ↗ · انقر على البطاقة لفتحه", + "two": "رابطا مصدر ({count}) ↗ · انقر على البطاقة لفتح الأول", + "few": "{count} روابط مصادر ↗ · انقر على البطاقة لفتح الأول", + "many": "{count} رابط مصدر ↗ · انقر على البطاقة لفتح الأول", + "other": "{count} رابط مصدر ↗ · انقر على البطاقة لفتح الأول" + }, + "S2 · {name}": "S2 · {name}", + "Report": "التقرير", + "Open the source for {title}": "فتح مصدر «{title}»", + "GhostMaps catalog unavailable": "فهرس GhostMaps غير متاح", + "LIVE · GitHub {commit} · {message} · checked every {seconds}s": "مباشر · GitHub {commit} · {message} · فحص كل {seconds} ث", + "GitHub {commit} · {message} · reconnecting for live updates": "GitHub {commit} · {message} · إعادة الاتصال للتحديثات المباشرة", + "Connecting to the S2 GhostMaps repository…": "جارٍ الاتصال بمستودع S2 GhostMaps…", + "{count} placemarks": { + "zero": "{count} علامة", + "one": "علامة واحدة ({count})", + "two": "علامتان ({count})", + "few": "{count} علامات", + "many": "{count} علامة", + "other": "{count} علامة" + }, + "S2 Underground publishes these KMZ products to GitHub. New uploads are detected within seconds and replace the previous edition automatically. Click a marker for its report.": "تنشر S2 Underground منتجات KMZ هذه على GitHub. تُكتشف الملفات الجديدة خلال ثوانٍ وتحل محل الإصدار السابق تلقائيًا. انقر على علامة لعرض تقريرها.", + "Malformed GhostMaps catalog": "فهرس GhostMaps مشوّه", + "Low-accuracy score < 2%": "مؤشر ضعف الدقة < 2%", + "Low-accuracy score 2–10%": "مؤشر ضعف الدقة 2–10%", + "Low-accuracy score > 10%": "مؤشر ضعف الدقة > 10%", + "GNSS integrity source unavailable": "مصدر سلامة GNSS غير متاح", + "Regional sample · 250 nm radius · cells from visited views over 30 min": "عيّنة إقليمية · نصف قطر 250 ميلًا بحريًا · خلايا من المناظر التي زرتها خلال 30 دقيقة", + "Retrying automatically at {time} UTC": "إعادة المحاولة تلقائيًا عند {time} UTC", + "Retrying automatically after provider cooldown": "إعادة المحاولة تلقائيًا بعد انتهاء مهلة المزوّد", + "Updates automatically after pan or zoom and once a minute. The public feed covers a 250-nautical-mile circle around the view centre; zooming out does not make it a worldwide snapshot. Blank cells are outside sampled coverage or have insufficient observations.": "يتحدّث تلقائيًا بعد التحريك أو التكبير/التصغير ومرة كل دقيقة. يغطي المصدر العام دائرة نصف قطرها 250 ميلًا بحريًا حول مركز العرض؛ والتصغير لا يجعله لقطة عالمية. الخلايا الفارغة خارج نطاق العيّنة أو أرصادها غير كافية.", + "Low-accuracy score = 100 × max(0, bad − 1) / total: one aircraft is discounted, so this is not the raw share. Cells need {aircraft} aircraft over {minutes} minutes. Navigation-integrity anomalies are not a detection of jamming or spoofing.": "مؤشر ضعف الدقة = 100 × max(0, الضعيفة − 1) / الإجمالي: تُستبعد طائرة واحدة، لذا فهو ليس النسبة الخام. تحتاج كل خلية إلى {aircraft} طائرة خلال {minutes} دقيقة. شذوذ سلامة الملاحة ليس كشفًا للتشويش أو الانتحال.", + "GNSS snapshot needs a view anchor": "لقطة GNSS تحتاج إلى نقطة ارتكاز للعرض", + "GNSS feed rate limited (HTTP 429)": "مصدر GNSS تجاوز حد الطلبات (HTTP 429)", + "Malformed GNSS integrity snapshot": "لقطة سلامة GNSS مشوّهة", + "GNSS integrity snapshot has no observation time": "لقطة سلامة GNSS بلا وقت رصد", + "installation class|AIRFIELD": "مطار", + "installation class|NAVAL BASE": "قاعدة بحرية", + "installation class|RANGE": "ميدان رماية", + "installation class|MILITARY LAND": "أرض عسكرية", + "installation class|BASE": "قاعدة", + "installation class|BARRACKS": "ثكنات", + "installation class|TRAINING AREA": "منطقة تدريب", + "installation class|PLACES CANDIDATE": "مرشَّح من Places", + "installation class|INSTALLATION": "منشأة", + "No mapped sites within {km} km of the contact": "لا توجد مواقع مرسومة ضمن {km} كم من الهدف", + "{count} mapped sites within {km} km of the contact": { + "zero": "{count} موقع مرسوم ضمن {km} كم من الهدف", + "one": "موقع مرسوم واحد ({count}) ضمن {km} كم من الهدف", + "two": "موقعان مرسومان ({count}) ضمن {km} كم من الهدف", + "few": "{count} مواقع مرسومة ضمن {km} كم من الهدف", + "many": "{count} موقعًا مرسومًا ضمن {km} كم من الهدف", + "other": "{count} موقع مرسوم ضمن {km} كم من الهدف" + }, + "No mapped sites in view": "لا توجد مواقع مرسومة في نطاق العرض", + "{count} mapped sites in view": { + "zero": "{count} موقع مرسوم في نطاق العرض", + "one": "موقع مرسوم واحد ({count}) في نطاق العرض", + "two": "موقعان مرسومان ({count}) في نطاق العرض", + "few": "{count} مواقع مرسومة في نطاق العرض", + "many": "{count} موقعًا مرسومًا في نطاق العرض", + "other": "{count} موقع مرسوم في نطاق العرض" + }, + "Too many mapped sites in view to list them all": "المواقع المرسومة في نطاق العرض أكثر من أن تُدرج كلها", + "Installation context unavailable": "سياق المنشآت غير متاح", + "Unknown": "غير معروف", + "Selected Space Mission": "المهمة الفضائية المحددة", + "Malformed launch snapshot": "لقطة الإطلاقات مشوّهة", + "Heard by your receiver": "التقطه جهاز الاستقبال لديك", + "1090 MHz": "1090 MHz", + "978 MHz UAT": "978 MHz UAT", + "browser SDR": "SDR في المتصفح", + "decoder feed": "مصدر المفكّك", + "Your RTL-SDR receiver and decoder feed": "جهاز استقبال RTL-SDR لديك ومصدر المفكّك", + "Your decoder feed": "مصدر المفكّك لديك", + "Your RTL-SDR receiver": "جهاز استقبال RTL-SDR لديك", + "NO CALLSIGN": "بلا نداء", + "ALT {altitude} FT · GS {speed} KT · TRK {track}": "الارتفاع {altitude} قدم · GS {speed} عقدة · TRK {track}", + "V/S {rate}": "V/S {rate}", + "V/S {rate} FPM": "V/S {rate} قدم/د", + "POSITION {age}": "الموضع {age}", + "POSITION {seconds} S AGO": "الموضع قبل {seconds} ث", + "{count} MSGS": { + "zero": "{count} رسالة", + "one": "رسالة واحدة ({count})", + "two": "رسالتان ({count})", + "few": "{count} رسائل", + "many": "{count} رسالة", + "other": "{count} رسالة" + }, + "Decoder feeds": "مصادر المفكّك", + "WebUSB + decoder feeds": "WebUSB + مصادر المفكّك", + "opening receiver": "جارٍ فتح جهاز الاستقبال", + "checking decoder feeds": "جارٍ فحص مصادر المفكّك", + "WebUSB needs desktop Chrome or Edge": "يتطلب WebUSB متصفح Chrome أو Edge على سطح المكتب", + "connect a receiver in Radio": "وصّل جهاز استقبال في «الراديو»", + "receiver is in FM mode": "جهاز الاستقبال في وضع FM", + "listening": "استماع", + "USB error": "خطأ USB", + "${amount}K": "{amount} ألف $", + "${amount}M": "{amount} مليون $", + "${amount}B": "{amount} مليار $", + "fire cause|Human": "بشري", + "fire cause|Natural": "طبيعي", + "fire cause|Undetermined": "غير محدد", + "fire cause|Unknown": "غير معروف", + "fire behavior|Minimal": "نشاط ضئيل", + "fire behavior|Moderate": "نشاط معتدل", + "fire behavior|Active": "نشاط مرتفع", + "fire behavior|Extreme": "نشاط شديد", + "Type {level} Incident": "حادث من النوع {level}", + "age|{count}m": "{count} د", + "{acres} ac": { + "zero": "{acres} فدان", + "one": "{acres} فدان", + "two": "{acres} فدان", + "few": "{acres} فدادين", + "many": "{acres} فدانًا", + "other": "{acres} فدان" + }, + "{percent}% contained": "تمت السيطرة على {percent}%", + "containment unknown": "نسبة السيطرة غير معروفة", + "{cause} cause": "السبب: {cause}", + "{personnel} personnel": { + "zero": "{personnel} فرد", + "one": "{personnel} فرد", + "two": "{personnel} فرد", + "few": "{personnel} أفراد", + "many": "{personnel} فردًا", + "other": "{personnel} فرد" + }, + "{county} County": "مقاطعة {county}", + "{cost} to date": "{cost} حتى الآن", + "discovered {age} ago": "اكتُشف قبل {age}", + "updated {age} ago": "حُدِّث قبل {age}", + "part of {complex}": "جزء من {complex}", + "InciWeb ↗ · click card to open": "InciWeb ↗ · انقر على البطاقة للفتح", + "FIRE · {name}": "حريق · {name}", + "Unnamed incident": "حادث بلا اسم", + "Open {title} on InciWeb": "فتح «{title}» على InciWeb", + "Perimeter source unavailable": "مصدر محيطات الحرائق غير متاح", + "Not contained or unknown": "غير مسيطر عليه أو غير معروف", + "Under 50% contained": "السيطرة أقل من 50%", + "50–99% contained": "السيطرة 50–99%", + "Fully contained": "مسيطر عليه بالكامل", + "Colour shows reported containment. Perimeters are simplified to about 100 m.": "يبيّن اللون نسبة السيطرة المُبلَّغ عنها. المحيطات مبسّطة إلى نحو 100 م.", + "Malformed perimeter snapshot": "لقطة المحيطات مشوّهة", + "radio tag|All": "الكل", + "Directory refresh degraded; showing the previous station catalog.": "تحديث الدليل متدهور؛ يُعرض فهرس المحطات السابق.", + "Radio directory coverage is degraded.": "تغطية دليل الراديو متدهورة.", + "Directory refresh failed; showing the previous station catalog.": "فشل تحديث الدليل؛ يُعرض فهرس المحطات السابق.", + "Radio directory is temporarily unavailable.": "دليل الراديو غير متاح مؤقتًا.", + "radio|NEWS": "أخبار", + "radio|TALK": "حوارية", + "radio|WEATHER": "طقس", + "radio|SAFETY": "سلامة", + "radio|AIR / SEA": "جو / بحر", + "radio|TRANSIT": "نقل", + "radio|MUSIC": "موسيقى", + "radio|OTHER": "أخرى", + "Broadcaster stream is unavailable or blocked by the browser.": "بث المحطة غير متاح أو يحظره المتصفح.", + "Playback requires a direct click or tap.": "يتطلب التشغيل نقرة أو لمسة مباشرة.", + "Broadcaster stream could not be started.": "تعذّر بدء بث المحطة.", + "overview": "نظرة عامة", + "cloud unknown": "الغيوم غير معروفة", + "{percent}% scene cloud": "غيوم المشهد {percent}%", + "{min}–{max}% scene cloud": "غيوم المشهد {min}–{max}%", + "Comparison in use by another scene": "المقارنة مستخدمة في مشهد آخر", + "Esri map unavailable · no swipe": "خريطة Esri غير متاحة · لا مقارنة بالسحب", + "Swipe needs a globe map": "المقارنة بالسحب تتطلب خريطة كروية", + "Imagery stays on Esri · CLEAR to use Google 3D": "تبقى الصور على Esri · اضغط «مسح» لاستخدام Google 3D", + "Imagery catalog unavailable": "فهرس الصور غير متاح", + "Catalog truncated · a newer clear day may exist": "الفهرس مقتطع · قد يوجد يوم صافٍ أحدث", + "{label} catalog unavailable · {detail}": "فهرس {label} غير متاح · {detail}", + "Daily overview for today may still be empty until the pass": "قد تبقى النظرة العامة اليومية لهذا اليوم فارغة حتى مرور القمر الصناعي", + "Box and images cleared": "تم مسح المنطقة والصور", + "MORE DETAIL · 30 m": "تفاصيل أكثر · 30 م", + "Sentinel-2 and Landsat via HLS, 30 m, every 2–6 days": "Sentinel-2 وLandsat عبر HLS، بدقة 30 م، كل 2–6 أيام", + "DAILY OVERVIEW · 250 m": "نظرة عامة يومية · 250 م", + "VIIRS daily mosaic, 250 m, follows broad changes; little detail under 25 km": "فسيفساء VIIRS اليومية، بدقة 250 م، تتابع التغيرات الواسعة؛ تفاصيل قليلة دون 25 كم", + "Sentinel-2": "Sentinel-2", + "Sentinel-2 via HLS": "Sentinel-2 عبر HLS", + "Landsat 8/9": "Landsat 8/9", + "Landsat 8/9 via HLS": "Landsat 8/9 عبر HLS", + "Daily overview": "نظرة عامة يومية", + "Box edges must be finite": "يجب أن تكون حدود المنطقة قيمًا محدودة", + "Longitudes must be within ±180°": "يجب أن تكون خطوط الطول ضمن ±180°", + "Select one side of the dateline": "اختر جانبًا واحدًا من خط التاريخ الدولي", + "Box must enclose an area": "يجب أن تحيط المنطقة بمساحة", + "CelesTrak unreachable": "تعذّر الوصول إلى CelesTrak", + "DOCKED · {name} · +{extra}": "ملتحم · {name} · +{extra}", + "DOCKED · {name}": "ملتحم · {name}", + "{name} needs the Google 3D map: choose it under MAP SOURCE": "يحتاج «{name}» إلى خريطة Google 3D: اخترها من «مصدر الخريطة»", + "zoom in to a street to open {name}": "قرّب إلى شارع لفتح «{name}»", + "loading coverage...": "جارٍ تحميل التغطية...", + "No street-level imagery within {radius} m of that point": "لا توجد صور على مستوى الشارع ضمن {radius} م من تلك النقطة", + "No street-level imagery within {radius} m of the view centre": "لا توجد صور على مستوى الشارع ضمن {radius} م من مركز العرض", + "Zoom in to see street-level coverage": "قرّب لرؤية تغطية الصور على مستوى الشارع", + "Point the camera at the ground for street-level coverage": "وجّه الكاميرا نحو الأرض لرؤية تغطية الصور على مستوى الشارع", + "Coverage tile failed": "فشل تحميل بلاطة التغطية", + "The photo could not be loaded": "تعذّر تحميل الصورة", + "{name} photo. ← and → step along the sequence. On a 360° photo, drag or use Shift+← →, ↑ ↓ to look around, and + − to zoom": "صورة {name}. ← و→ للتنقل في التسلسل. في الصور 360°، اسحب أو استخدم Shift+← →، ↑ ↓ للنظر حولك، و+ − للتكبير والتصغير", + "{name} street-level photo": "صورة على مستوى الشارع من {name}", + "Previous photo in this sequence (←)": "الصورة السابقة في هذا التسلسل (←)", + "Next photo in this sequence (→)": "الصورة التالية في هذا التسلسل (→)", + "Aim the middle of the view at a street to look for imagery there": "وجّه منتصف العرض نحو شارع للبحث عن صور هناك", + "KEY REJECTED": "المفتاح مرفوض", + "GOOGLE_MAPS_API_KEY is not set": "GOOGLE_MAPS_API_KEY غير مضبوط", + "The Google Maps JavaScript API could not load": "تعذّر تحميل Google Maps JavaScript API", + "Google Street View": "Google Street View", + "GOOGLE STREET VIEW": "GOOGLE STREET VIEW", + "Google refused GOOGLE_MAPS_API_KEY for Street View — check that the Maps JavaScript API is enabled for it and this site is an allowed referrer": "رفضت Google المفتاح GOOGLE_MAPS_API_KEY لـ Street View — تحقّق من تفعيل Maps JavaScript API له ومن أن هذا الموقع ضمن المُحيلين المسموح بهم", + "Street View did not answer — check the network, and that the Maps JavaScript API is enabled for GOOGLE_MAPS_API_KEY": "لم يستجب Street View — تحقّق من الشبكة ومن تفعيل Maps JavaScript API للمفتاح GOOGLE_MAPS_API_KEY", + "click a street to open Street View": "انقر على شارع لفتح Street View", + "Street View has no imagery for this place": "لا تتوفر صور Street View لهذا المكان", + "KartaView has no position for this photo": "لا يملك KartaView موضعًا لهذه الصورة", + "The KartaView photo could not be loaded": "تعذّر تحميل صورة KartaView", + "zoom in to see KartaView coverage": "قرّب لرؤية تغطية KartaView", + "no KartaView photos in view": "لا توجد صور KartaView في نطاق العرض", + "KartaView is rate-limiting requests — they resume on their own": "يقيّد KartaView معدل الطلبات — ستُستأنف تلقائيًا", + "KartaView’s photos here are archived and cannot be shown": "صور KartaView هنا مؤرشفة ولا يمكن عرضها", + "KartaView did not filter this area in time — move the map to ask again": "لم يُصفِّ KartaView هذه المنطقة في الوقت المحدد — حرّك الخريطة لإعادة الطلب", + "None of KartaView’s photos here pass the imagery filter": "لا تجتاز أي من صور KartaView هنا مرشح الصور", + "KartaView did not answer in time — try again": "لم يستجب KartaView في الوقت المحدد — أعد المحاولة", + "KartaView could not be reached — check the network": "تعذّر الوصول إلى KartaView — تحقّق من الشبكة", + "KartaView sent an answer that could not be read": "أرسل KartaView استجابة تعذّرت قراءتها", + "KartaView is rate-limiting requests": "يقيّد KartaView معدل الطلبات", + "KartaView sent too much data": "أرسل KartaView بيانات أكثر من اللازم", + "KartaView is rate-limiting requests — try again in a moment": "يقيّد KartaView معدل الطلبات — أعد المحاولة بعد قليل", + "KartaView has no such photo": "لا توجد صورة كهذه لدى KartaView", + "Mapillary rejected MAPILLARY_CLIENT_TOKEN — replace it in Provider Settings": "رفض Mapillary الرمز MAPILLARY_CLIENT_TOKEN — استبدله في «إعدادات المزوّدين»", + "Coverage requests are being rate-limited — they resume on their own": "طلبات التغطية مقيّدة المعدل — ستُستأنف تلقائيًا", + "The Panoramax photo could not be loaded": "تعذّر تحميل صورة Panoramax", + "Panoramax is busy — coverage resumes on its own": "Panoramax مشغول — ستُستأنف التغطية تلقائيًا", + "no Panoramax photos in view": "لا توجد صور Panoramax في نطاق العرض", + "no Panoramax photos here match the filters": "لا توجد صور Panoramax هنا تطابق المرشحات", + "Panoramax sent a map tile that could not be read": "أرسل Panoramax بلاطة خريطة تعذّرت قراءتها", + "This Panoramax photo is no longer available": "صورة Panoramax هذه لم تعد متاحة", + "zoom in to see Panoramax coverage": "قرّب لرؤية تغطية Panoramax", + "Panoramax did not answer in time — try again": "لم يستجب Panoramax في الوقت المحدد — أعد المحاولة", + "Panoramax could not be reached — check the connection": "تعذّر الوصول إلى Panoramax — تحقّق من الاتصال", + "Panoramax sent too much data": "أرسل Panoramax بيانات أكثر من اللازم", + "Panoramax is busy": "Panoramax مشغول", + "Panoramax sent an unreadable answer": "أرسل Panoramax استجابة غير مقروءة", + "Sequence images unavailable": "صور التسلسل غير متاحة", + "No street-level imagery providers configured": "لم يُعَدّ أي مزوّد لصور مستوى الشارع", + "(by upload date)": "(حسب تاريخ الرفع)", + "Open the Street Level panel to view imagery": "افتح لوحة «مستوى الشارع» لعرض الصور", + "Image could not be opened": "تعذّر فتح الصورة", + "TeleGeography load failed": "فشل تحميل بيانات TeleGeography", + "UNAVAILABLE · {source} · Roads unavailable": "غير متاح · {source} · الطرق غير متاحة", + "Roads: {source}": "الطرق: {source}", + "TomTom roads unavailable while the traffic service is unreachable": "طرق TomTom غير متاحة ما دامت خدمة المرور لا تستجيب", + "Hybrid unavailable while the traffic service is unreachable": "الوضع الهجين غير متاح ما دامت خدمة المرور لا تستجيب", + "TomTom roads need a TomTom key": "طرق TomTom تحتاج إلى مفتاح TomTom", + "Hybrid needs a TomTom key": "الوضع الهجين يحتاج إلى مفتاح TomTom", + "Local surface still loading": "السطح المحلي ما زال قيد التحميل", + "Partial coverage": "تغطية جزئية", + "Detailed roads unavailable": "الطرق التفصيلية غير متاحة", + "Reduced detail coverage": "تغطية بتفاصيل أقل", + "TomTom roads only, each with its live flow": "طرق TomTom فقط، لكلٍّ منها تدفقه المباشر", + "TomTom roads only, each with its live flow (needs a TomTom key)": "طرق TomTom فقط، لكلٍّ منها تدفقه المباشر (يحتاج إلى مفتاح TomTom)", + "OpenStreetMap roads, with TomTom flow matched when available": "طرق OpenStreetMap، مع مطابقة تدفق TomTom عند توفره", + "TomTom roads first; OpenStreetMap fills the rest, simulated": "طرق TomTom أولًا؛ ويكمل OpenStreetMap الباقي بتدفق محاكى", + "TomTom roads first; OpenStreetMap fills the rest, simulated (needs a TomTom key)": "طرق TomTom أولًا؛ ويكمل OpenStreetMap الباقي بتدفق محاكى (يحتاج إلى مفتاح TomTom)", + "Hybrid": "هجين", + "TomTom key unavailable": "مفتاح TomTom غير متاح", + "TomTom daily budget reached": "بلغت الحصة اليومية لـ TomTom", + "TomTom upstream unreachable": "تعذّر الوصول إلى خادم TomTom", + "TomTom flow unavailable": "تدفق TomTom غير متاح", + "SIMULATED — {reason}": "محاكى — {reason}", + "OpenFreeMap tiles rate-limited": "بلاطات OpenFreeMap تجاوزت حد الطلبات", + "OpenFreeMap tiles timed out": "انتهت مهلة بلاطات OpenFreeMap", + "OpenFreeMap tiles unavailable": "بلاطات OpenFreeMap غير متاحة", + "occupancy|empty": "فارغة", + "occupancy|many seats available": "مقاعد كثيرة متاحة", + "occupancy|few seats available": "مقاعد قليلة متاحة", + "occupancy|standing room only": "وقوفًا فقط", + "occupancy|crushed standing room only": "مكتظة، وقوفًا فقط", + "occupancy|full": "ممتلئة", + "occupancy|not accepting passengers": "لا تقبل ركابًا", + "occupancy|not boardable": "الصعود غير ممكن", + "Route {route}": "الخط {route}", + "Vehicle {vehicle}": "المركبة {vehicle}", + "vehicle motion|Stopped": "متوقفة", + "No recent fix": "لا موضع حديث", + "Waiting for update": "بانتظار التحديث", + "Moving": "تتحرك", + "reported {speed} km/h": "مُبلَّغ: {speed} كم/س", + "reported hdg {heading}°": "اتجاه مُبلَّغ {heading}°", + "Last report: stopped at stop {stop}": "آخر تقرير: متوقفة عند المحطة {stop}", + "Last report: arriving at stop {stop}": "آخر تقرير: تصل إلى المحطة {stop}", + "Last report: next stop {stop}": "آخر تقرير: المحطة التالية {stop}", + "Shown at street level · depth not in the feed": "معروضة على مستوى الشارع · العمق غير متوفر في المصدر", + "Reported {seconds} s ago": "أُبلغ قبل {seconds} ث", + "Reported {minutes} min ago": "أُبلغ قبل {minutes} د", + "shown {seconds} s behind": "معروض بتأخير {seconds} ث", + "{reported} (feed time)": "{reported} (وقت المصدر)", + "Available trail: {minutes} min (limited)": "الأثر المتاح: {minutes} د (محدود)", + "Available trail: {minutes} min": "الأثر المتاح: {minutes} د", + "Bus": "حافلة", + "Tram": "ترام", + "Subway": "مترو", + "Train": "قطار", + "Ferry": "عبّارة", + "Transit vehicle": "مركبة نقل عام", + "{speed}KT": "{speed} عقدة", + "{heading}DEG": "{heading}°", + "AIS live load failed": "فشل تحميل AIS المباشر", + "AISSTREAM_API_KEY not set": "AISSTREAM_API_KEY غير مضبوط", + "live feed unsupported": "البث المباشر للبيانات غير مدعوم", + "connecting to feed…": "جارٍ الاتصال بالمصدر…", + "feed disconnected": "المصدر منقطع", + "feed down": "المصدر متعطل", + "feed idle": "المصدر خامل", + "API key rejected — check AISSTREAM_API_KEY": "مفتاح API مرفوض — تحقّق من AISSTREAM_API_KEY", + "feed silent {seconds}s — no AIS data": "المصدر صامت منذ {seconds} ث — لا بيانات AIS", + "feed silent — no AIS data": "المصدر صامت — لا بيانات AIS", + "feed down — retrying slowly (attempt {attempt})": "المصدر متعطل — إعادة المحاولة على فترات أطول (المحاولة {attempt})", + "reconnecting to feed… (attempt {attempt})": "جارٍ إعادة الاتصال بالمصدر… (المحاولة {attempt})", + "feed down — retrying slowly": "المصدر متعطل — إعادة المحاولة على فترات أطول", + "reconnecting to feed…": "جارٍ إعادة الاتصال بالمصدر…", + "Focus vessel {name}, MMSI {mmsi}": "التركيز على السفينة {name}، MMSI {mmsi}", + "Hidden by this map source · choose a globe map": "مخفي بسبب مصدر الخريطة هذا · اختر خريطة كروية", + "Weather image HTTP {status}": "صورة الطقس: HTTP {status}", + "Weather HTTP {status}": "الطقس: HTTP {status}", + "Frame unavailable; previous observation retained": "الإطار غير متاح؛ أُبقي على الرصد السابق", + "Weather imagery unavailable": "صور الطقس غير متاحة", + "Weather source unavailable; previous observation retained": "مصدر الطقس غير متاح؛ أُبقي على الرصد السابق", + "Weather unavailable": "الطقس غير متاح", + "No frame within {gap} min of {time}": "لا يوجد إطار ضمن {gap} د من {time}", + "No frame within {gap} h of {time}": "لا يوجد إطار ضمن {gap} س من {time}", + "{hours}h {minutes}m ago": "قبل {hours} س {minutes} د", + "{minutes}m ago": "قبل {minutes} د", + "{state} · {time} · {lag}": "{state} · {time} · {lag}", + "Observed": "مرصود", + "History": "السجل", + "Observation unavailable": "الرصد غير متاح", + "Waiting for observation": "بانتظار الرصد", + "{detail} · synced": "{detail} · متزامن", + "{detail} · nearest": "{detail} · الأقرب", + "RADAR REFLECTIVITY · dBZ": "انعكاسية الرادار · dBZ", + "LIGHTNING DENSITY · 15 min accumulation": "كثافة البرق · تراكم 15 دقيقة", + "GLOBAL INFRARED · hourly": "الأشعة تحت الحمراء العالمية · كل ساعة", + "GOES INFRARED · ~5 min": "الأشعة تحت الحمراء GOES · ~5 د", + "{state}: {time}": "{state}: {time}", + "Latest observation": "أحدث رصد", + "frame {index}/{total}": "الإطار {index}/{total}", + "loading": "جارٍ التحميل", + "Observation: unavailable": "الرصد: غير متاح", + "Contiguous US · gaps ≠ no rain": "الولايات المتحدة المتجاورة · الفجوات ≠ انعدام المطر", + "Americas + Pacific · not individual strikes": "الأمريكتان + المحيط الهادئ · ليست ضربات منفردة", + "Color: strikes/km²/min ×10³": "اللون: ضربات/كم²/د ×10³", + "60°S–60°N · typically 2–3 h delayed": "60° ج–60° ش · بتأخير 2–3 س عادةً", + "North America · infrared imagery": "أمريكا الشمالية · صور بالأشعة تحت الحمراء", + "Reduced motion · history playback unavailable": "تقليل الحركة · تشغيل السجل غير متاح", + "Reduced motion · manual history available": "تقليل الحركة · التصفح اليدوي للسجل متاح", + "Rain radar · US": "رادار الأمطار · الولايات المتحدة", + "Lightning density · 15 min": "كثافة البرق · 15 د", + "Satellite clouds": "الغيوم من الأقمار الصناعية", + "Americas + Pacific": "الأمريكتان + المحيط الهادئ", + "Global · 60°S–60°N": "عالمي · 60° ج–60° ش", + "North America": "أمريكا الشمالية", + "Source observations delayed": "أرصاد المصدر متأخرة", + "Stale source": "المصدر متقادم", + "Loading next frame…": "جارٍ تحميل الإطار التالي…", + "Map center outside coverage": "مركز الخريطة خارج التغطية", + "strikes/km²/min ×10³": "ضربات/كم²/د ×10³", + "N. America": "أمريكا الشمالية", + "Global": "عالمي", + "Hourly global mosaic; usually 2–3 hours delayed": "فسيفساء عالمية كل ساعة؛ بتأخير 2–3 ساعات عادةً", + "GOES regional clouds; approximately 5-minute updates": "غيوم إقليمية من GOES؛ تحديث كل 5 دقائق تقريبًا", + "Clouds only": "الغيوم فقط", + "Apply the full cloud brightness key; 100% filter strength": "تطبيق مفتاح سطوع الغيوم كاملًا؛ قوة المرشح 100%", + "Full": "كامل", + "Show the complete infrared image; 0% filter strength": "عرض صورة الأشعة تحت الحمراء كاملة؛ قوة المرشح 0%", + "Soft": "ناعم", + "Vivid": "زاهٍ", + "Image opacity; does not alter the observed values": "عتامة الصورة؛ لا تغيّر القيم المرصودة", + "View US radar": "عرض رادار الولايات المتحدة", + "View Americas & Pacific": "عرض الأمريكتين والمحيط الهادئ", + "View coverage": "عرض التغطية", + "{value} strikes/km²/min ×10³ (15-minute density)": "{value} ضربة/كم²/د ×10³ (كثافة 15 دقيقة)", + "{value} dBZ radar reflectivity": "انعكاسية الرادار {value} dBZ", + "STALE · cached source metadata": "متقادم · بيانات وصفية مخزّنة للمصدر", + "Map center is outside source coverage": "مركز الخريطة خارج تغطية المصدر", + "NOAA/NWS 15-minute lightning density derived from Vaisala NLDN/GLD360. Coverage 110°E across the Pacific/Americas to 0°, 25°S–80°N. Not a live strike count, global coverage or a safety warning.": "كثافة البرق لكل 15 دقيقة من NOAA/NWS مشتقة من Vaisala NLDN/GLD360. التغطية من 110° ق عبر المحيط الهادئ والأمريكتين حتى 0°، و25° ج–80° ش. ليست عدًّا مباشرًا للضربات ولا تغطية عالمية ولا تحذيرًا للسلامة.", + "NOAA MRMS radar echoes indicate precipitation patterns, not rain rate, a storm warning or a future forecast. Native source approximately 1 km; display is limited to level 6. Frames use exact advertised observation times.": "تشير أصداء رادار NOAA MRMS إلى أنماط الهطول، لا إلى معدل المطر ولا إلى تحذير من عاصفة ولا إلى توقع مستقبلي. دقة المصدر الأصلية نحو 1 كم؛ والعرض محدود بالمستوى 6. تستخدم الإطارات أوقات الرصد المعلنة بدقة.", + "GOES-19/18 longwave infrared Band 14 regional; NESDIS global longwave mosaic. Clouds only dims everything but bright, cold cloud tops; a brightness filter, not a cloud mask. Coverage and freshness differ by region.": "النطاق 14 للأشعة تحت الحمراء طويلة الموجة من GOES-19/18 إقليميًا؛ وفسيفساء NESDIS العالمية طويلة الموجة. وضع «الغيوم فقط» يعتّم كل شيء عدا قمم الغيوم الساطعة الباردة؛ إنه مرشح سطوع لا قناع غيوم. تختلف التغطية والحداثة بحسب المنطقة.", + "REGION": "المنطقة", + "IMAGE": "الصورة", + "FILTER": "المرشح", + "Cloud filter strength": "قوة مرشح الغيوم", + "OPACITY": "العتامة", + "Infrared decode failed": "فشل فك ترميز صورة الأشعة تحت الحمراء", + "Weather prefetch unavailable": "الجلب المسبق للطقس غير متاح", + "Weather tiles unavailable · previous frame retained": "بلاطات الطقس غير متاحة · أُبقي على الإطار السابق", + "Some weather tiles unavailable": "بعض بلاطات الطقس غير متاحة", + "Malformed weather manifest": "بيان الطقس مشوّه", + "Weather request timed out": "انتهت مهلة طلب الطقس", + "Temperature field unavailable": "حقل درجة الحرارة غير متاح", + "Mean sea level pressure field unavailable": "حقل الضغط عند متوسط مستوى سطح البحر غير متاح", + "Wind upstream unavailable": "مصدر بيانات الرياح غير متاح", + "{source} HTTP {status}": "{source} HTTP {status}", + "Wind": "الرياح", + "Wind source unavailable": "مصدر الرياح غير متاح", + "Forecast · does not follow history": "توقع · لا يتبع السجل", + "Wind motion": "حركة الرياح", + "Wind speed": "سرعة الرياح", + "Sea-level pressure": "الضغط عند مستوى سطح البحر", + "Air temperature · 2 m": "درجة حرارة الهواء · 2 م", + "Global · 1° grid": "عالمي · شبكة 1°", + "{model} forecast · {time}": "توقع {model} · {time}", + "Loading forecast": "جارٍ تحميل التوقع", + "Preparing flow": "جارٍ تجهيز التدفق", + "Selected field unavailable": "الحقل المحدد غير متاح", + "Cached forecast · stale": "توقع مخزّن · متقادم", + "ECMWF IFS surface forecast": "توقع سطحي من ECMWF IFS", + "NOAA GFS surface forecast": "توقع سطحي من NOAA GFS", + "Reduced motion": "تقليل الحركة", + "Pause visual flow; forecast time does not advance with animation": "إيقاف التدفق المرئي مؤقتًا؛ وقت التوقع لا يتقدم مع الحركة", + "None": "بلا", + "Speed": "السرعة", + "Pressure": "الضغط", + "Temperature": "الحرارة", + "Wind trails with no field shading": "مسارات الرياح دون تظليل الحقل", + "How hard the surface wind is blowing": "مدى شدة هبوب الرياح السطحية", + "Sea-level air pressure: broad highs and lows": "ضغط الهواء عند مستوى سطح البحر: المرتفعات والمنخفضات الواسعة", + "Air temperature two meters above the surface": "درجة حرارة الهواء على ارتفاع مترين فوق السطح", + "Wind speed units": "وحدات سرعة الرياح", + "Read wind at map center": "قراءة الرياح في مركز الخريطة", + "Read the forecast at the center of the map without changing selection": "قراءة التوقع في مركز الخريطة دون تغيير التحديد", + "{model} forecast · {field} ({unit})": "توقع {model} · {field} ({unit})", + "Valid: {time}": "صالح حتى: {time}", + "preparing": "جارٍ التجهيز", + "Issued: {time}": "صدر: {time}", + "Selected field unavailable · wind remains visible": "الحقل المحدد غير متاح · تبقى الرياح ظاهرة", + "{error} · wind remains visible": "{error} · تبقى الرياح ظاهرة", + "Surface wind at 10 m. Approximately 1° global grid. Curves follow the 10 m wind field, lifted 12 km for visibility; display height is not weather altitude. View lighting is for readability. Animation shows flow through one fixed forecast; it does not advance time. Color fields drape the globe basemap or the active photorealistic 3D Tiles.": "الرياح السطحية على ارتفاع 10 م. شبكة عالمية بدقة 1° تقريبًا. تتبع المنحنيات حقل الرياح عند 10 م، مرفوعة 12 كم لتسهيل الرؤية؛ ارتفاع العرض ليس ارتفاع الظواهر الجوية. إضاءة العرض لتسهيل القراءة. تعرض الحركة التدفق ضمن توقع ثابت واحد؛ ولا تُقدّم الوقت. تُفرد الحقول اللونية على الخريطة الأساسية للكرة الأرضية أو على 3D Tiles الواقعية النشطة.", + "MODEL": "النموذج", + "FIELD": "الحقل", + "UNITS": "الوحدات", + "MOTION": "الحركة", + "Forecast": "التوقع", + "N": "شمال", + "NNE": "شمال شمال شرق", + "NE": "شمال شرق", + "ENE": "شرق شمال شرق", + "E": "شرق", + "ESE": "شرق جنوب شرق", + "SE": "جنوب شرق", + "SSE": "جنوب جنوب شرق", + "S": "جنوب", + "SSW": "جنوب جنوب غرب", + "SW": "جنوب غرب", + "WSW": "غرب جنوب غرب", + "W": "غرب", + "WNW": "غرب شمال غرب", + "NW": "شمال غرب", + "NNW": "شمال شمال غرب", + "No surface reading": "لا قراءة سطحية", + "Aim the map center at Earth": "وجّه مركز الخريطة نحو الأرض", + "A location reading needs a loaded forecast and the Earth at the center of the view.": "تتطلب قراءة الموقع توقعًا محمّلًا ووجود الأرض في مركز العرض.", + "Interpolated model forecast on an approximately 1° grid. Broad weather patterns, not a street-level measurement.": "توقع نموذجي مستكمَل على شبكة بدقة 1° تقريبًا. أنماط طقس عامة، لا قياس على مستوى الشارع.", + " · calm": " · سكون", + " from {direction}": " من {direction}", + "WIND AT {coordinates}": "الرياح عند {coordinates}", + "{model} · valid {time}": "{model} · صالح حتى {time}", + "Wind speed field unavailable": "حقل سرعة الرياح غير متاح", + "Globe imagery unavailable": "صور الكرة الأرضية غير متاحة", + "Globe field image unavailable": "صورة الحقل على الكرة الأرضية غير متاحة", + "Unknown wind model": "نموذج رياح غير معروف", + "Unknown weather overlay": "طبقة طقس غير معروفة", + "Wind request timed out": "انتهت مهلة طلب الرياح", + "Malformed wind manifest": "بيان الرياح مشوّه", + "Malformed wind grid": "شبكة الرياح مشوّهة", + "Google 3D tiles unavailable — check the key's API restrictions, quota, or network": "بلاطات Google 3D غير متاحة — تحقّق من قيود API للمفتاح أو الحصة أو الشبكة", + "Needs {envVars} — add it in Provider Settings — or a Cesium ion token for the ion-hosted route": "يحتاج إلى {envVars} — أضفه في «إعدادات المزوّدين» — أو إلى رمز Cesium ion للمسار المستضاف على ion", + "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": "اخرج من القمرة للانتقال إلى عرض مشترك", + "Exit cockpit to fly to a target": "اخرج من القمرة للانتقال إلى هدف", + "Exit cockpit to fly to a vessel": "اخرج من القمرة للانتقال إلى سفينة", + "Exit cockpit to fly to a fire": "اخرج من القمرة للانتقال إلى حريق", + "Exit cockpit to fly to a route": "اخرج من القمرة للانتقال إلى مسار", + "Exit cockpit to fly to a file": "اخرج من القمرة للانتقال إلى ملف", + "Exit cockpit to fly to a scene": "اخرج من القمرة للانتقال إلى مشهد", + "Exit cockpit to view weather coverage": "اخرج من القمرة لعرض تغطية الطقس", + "Exit cockpit to fly to a cyclone": "اخرج من القمرة للانتقال إلى إعصار", + "Exit cockpit to fly to an aircraft": "اخرج من القمرة للانتقال إلى طائرة", + "Exit cockpit to fly to a satellite": "اخرج من القمرة للانتقال إلى قمر صناعي", + "Exit cockpit to frame contacts": "اخرج من القمرة لإظهار الأهداف في الإطار", + "Focusing {label}": "جارٍ التركيز على {label}", + "Source": "المصدر", + "Camera ownership changed": "تغيّرت جهة التحكم في الكاميرا", + "Saved project could not be read; storage preserved. Import a valid file to resume saving.": "تعذّرت قراءة المشروع المحفوظ؛ لم يُمَسّ التخزين. استورد ملفًا صالحًا لاستئناف الحفظ.", + "Scene layer turned off": "أُوقفت طبقة المشهد", + "Stopped": "متوقف", + "Scene not saved — existing saved project could not be read. Export edits or import a valid file.": "لم يُحفظ المشهد — تعذّرت قراءة المشروع المحفوظ. صدّر التعديلات أو استورد ملفًا صالحًا.", + "Scene not saved — {reason}": "لم يُحفظ المشهد — {reason}", + "Scene not saved — browser storage unavailable": "لم يُحفظ المشهد — تخزين المتصفح غير متاح", + "Cannot update {scene}: shot inventory changed": "تعذّر تحديث {scene}: تغيّرت قائمة اللقطات", + "Cannot update {scene}: evidence beats changed": "تعذّر تحديث {scene}: تغيّرت مراحل الأدلة", + "Cannot update {scene}: shot bindings are incomplete": "تعذّر تحديث {scene}: روابط اللقطات غير مكتملة", + "Updated {count} shots: {scene}": { + "zero": "حُدِّثت {count} لقطة: {scene}", + "one": "حُدِّثت لقطة واحدة ({count}): {scene}", + "two": "حُدِّثت لقطتان ({count}): {scene}", + "few": "حُدِّثت {count} لقطات: {scene}", + "many": "حُدِّثت {count} لقطة: {scene}", + "other": "حُدِّثت {count} لقطة: {scene}" + }, + "Appended {count} shots: {scene}": { + "zero": "أُضيفت {count} لقطة: {scene}", + "one": "أُضيفت لقطة واحدة ({count}): {scene}", + "two": "أُضيفت لقطتان ({count}): {scene}", + "few": "أُضيفت {count} لقطات: {scene}", + "many": "أُضيفت {count} لقطة: {scene}", + "other": "أُضيفت {count} لقطة: {scene}" + }, + "Could not leave scene: {scene}": "تعذّر الخروج من المشهد: {scene}", + "Seeked: {scene} / {shot}": "تم الانتقال: {scene} / {shot}", + "Seeking scene clock": "جارٍ الانتقال في توقيت المشهد", + "Scene transition limit reached — load a shot to reset": "بلغت حد انتقالات المشهد — حمّل لقطة لإعادة الضبط", + "Export failed: {error}": "فشل التصدير: {error}", + "Importing project": "جارٍ استيراد المشروع", + "Imported {file}": "تم استيراد {file}", + "Import failed: {error}": "فشل الاستيراد: {error}", + "Import failed (could not read JSON file)": "فشل الاستيراد (تعذّرت قراءة ملف JSON)", + "Layers refused: {layers}": "طبقات مرفوضة: {layers}", + "Camera move interrupted": "انقطعت حركة الكاميرا", + "Scene media timed out": "انتهت مهلة وسائط المشهد", + "Action complete": "اكتمل الإجراء", + "Action unavailable or cancelled": "الإجراء غير متاح أو أُلغي", + "Scene actions": "إجراءات المشهد", + "Select a feature or use Tab and Enter to choose an action.": "حدّد عنصرًا أو استخدم Tab وEnter لاختيار إجراء.", + "Selected feature: {feature}. Choose an action.": "العنصر المحدد: {feature}. اختر إجراءً.", + "Bhote Koshi Evidence Sequence": "تسلسل أدلة Bhote Koshi", + "Nepal Flood Incident": "حادثة فيضان نيبال", + "Global Incident Context": "السياق العالمي للحادثة", + "Nepal-Focused Globe Rotation": "تدوير الكرة الأرضية نحو نيبال", + "Bhote Koshi Regional Approach": "الاقتراب الإقليمي من Bhote Koshi", + "Bhote Koshi Nearby Cities": "المدن القريبة من Bhote Koshi", + "Bhote Koshi Incident Corridor": "ممر حادثة Bhote Koshi", + "Bhote Koshi Flood Path": "مسار فيضان Bhote Koshi", + "Bhote Koshi Corridor Overview": "نظرة عامة على ممر Bhote Koshi", + "Bhote Koshi Upper Valley": "الوادي العلوي لـ Bhote Koshi", + "Upper Valley Collapse": "انهيار الوادي العلوي", + "Debris-Dammed Lake": "بحيرة سدّها الركام", + "Nepal-China Border Gate": "المعبر الحدودي بين نيبال والصين", + "Timure Evidence Cluster": "مجموعة أدلة Timure", + "Syabru Besi Passage": "العبور عند Syabru Besi", + "Bidur / Trishuli Consequence": "العواقب في Bidur / Trishuli", + "Final view": "العرض النهائي", + "Scene {n}": "المشهد {n}", + "the title of scene {scene} is empty or longer than {max} characters": "عنوان المشهد {scene} فارغ أو يتجاوز {max} حرفًا", + "the title of shot {shot} in scene {scene} is empty or longer than {max} characters": "عنوان اللقطة {shot} في المشهد {scene} فارغ أو يتجاوز {max} حرفًا", + "the project is larger than 5 MiB": "حجم المشروع أكبر من 5 MiB", + "the project has too many shots": "يحتوي المشروع على لقطات كثيرة جدًا", + "the scene data failed validation": "فشل التحقق من بيانات المشهد", + "Could not complete this action. Check the file, references and selected assets.": "تعذّر إكمال هذا الإجراء. تحقّق من الملف والمراجع والموارد المحددة.", + "{count} scenes": { + "zero": "{count} مشهد", + "one": "مشهد واحد ({count})", + "two": "مشهدان ({count})", + "few": "{count} مشاهد", + "many": "{count} مشهدًا", + "other": "{count} مشهد" + }, + "{count} shots": { + "zero": "{count} لقطة", + "one": "لقطة واحدة ({count})", + "two": "لقطتان ({count})", + "few": "{count} لقطات", + "many": "{count} لقطة", + "other": "{count} لقطة" + }, + "{count} data packs": { + "zero": "{count} حزمة بيانات", + "one": "حزمة بيانات واحدة ({count})", + "two": "حزمتا بيانات ({count})", + "few": "{count} حزم بيانات", + "many": "{count} حزمة بيانات", + "other": "{count} حزمة بيانات" + }, + "{scene} / {pack}: {status}. File: {path}. {attribution} · {license}": "{scene} / {pack}: {status}. الملف: {path}. {attribution} · {license}", + "Unavailable layers: {layers}": "طبقات غير متاحة: {layers}", + "Uses registered content or linked media. Those external files are not included in a scene bundle. Their original notices still apply.": "يستخدم محتوى مسجّلًا أو وسائط مرتبطة. هذه الملفات الخارجية غير مضمَّنة في حزمة المشهد، وتبقى إشعاراتها الأصلية سارية.", + "{bytes} bundled bytes verified. Files stay in memory for this session. Reimport the bundle after reloading the app.": "تم التحقق من {bytes} بايت في الحزمة. تبقى الملفات في الذاكرة طوال هذه الجلسة. أعد استيراد الحزمة بعد إعادة تحميل التطبيق.", + "Review scene import": "مراجعة استيراد المشهد", + "Nothing is loaded or changed until you apply this file.": "لا يُحمَّل أو يتغيّر شيء حتى تطبّق هذا الملف.", + "Ready to import": "جاهز للاستيراد", + "Apply replaces the current project. Export your current project first if you want to keep both.": "التطبيق يستبدل المشروع الحالي. صدّر مشروعك الحالي أولًا إن أردت الاحتفاظ بكليهما.", + "Apply import": "تطبيق الاستيراد", + "Import was not applied. The current project may have changed.": "لم يُطبَّق الاستيراد. ربما تغيّر المشروع الحالي.", + "Select a scene and shot first": "اختر مشهدًا ولقطة أولًا", + "Edit scene details": "تعديل تفاصيل المشهد", + "Camera positions use degrees and meters above the ellipsoid. Drafts are validated before they replace your saved scene.": "تُحدَّد مواضع الكاميرا بالدرجات وبالأمتار فوق الإهليلج. يُتحقّق من المسودات قبل أن تحل محل مشهدك المحفوظ.", + "Anchors and data packs": "نقاط الارتكاز وحزم البيانات", + "Shot camera, timing, packs and actions": "كاميرا اللقطة والتوقيت والحزم والإجراءات", + "New anchor ID": "معرّف نقطة الارتكاز الجديدة", + "Capture camera as anchor": "حفظ الكاميرا كنقطة ارتكاز", + "Anchor added to draft": "أُضيفت نقطة الارتكاز إلى المسودة", + "Set move start to current camera": "تعيين بداية الحركة إلى الكاميرا الحالية", + "Move added to draft; destination remains the shot camera": "أُضيفت الحركة إلى المسودة؛ تبقى كاميرا اللقطة هي الوجهة", + "Use ordinary flight": "استخدام انتقال عادي", + "Invalid shot JSON": "JSON اللقطة غير صالح", + "Apply details": "تطبيق التفاصيل", + "Select a scene first": "اختر مشهدًا أولًا", + "Share selected scene": "مشاركة المشهد المحدد", + "Scene JSON preserves authored settings and attribution. It does not include asset files. Bundles include only pack files you choose here or previously imported bundle files.": "يحفظ JSON المشهد الإعدادات المعدّة والإسناد، لكنه لا يتضمن ملفات الموارد. لا تتضمن الحزم إلا ملفات الحزم التي تختارها هنا أو ملفات حزم مستوردة سابقًا.", + "Download scene JSON": "تنزيل JSON المشهد", + "Choose data-pack files": "اختر ملفات حزمة البيانات", + "Or choose a data-pack folder": "أو اختر مجلد حزمة بيانات", + "Download asset bundle": "تنزيل حزمة الموارد", + "Asset bundle downloaded": "تم تنزيل حزمة الموارد", + "No RTL-SDR device selected": "لم يُحدَّد جهاز RTL-SDR", + "WebUSB requires desktop Chrome or Edge on localhost/HTTPS": "يتطلب WebUSB متصفح Chrome أو Edge على سطح المكتب عبر localhost/HTTPS", + "RTL-SDR access failed; close other SDR apps and check USB permissions": "فشل الوصول إلى RTL-SDR؛ أغلق تطبيقات SDR الأخرى وتحقّق من أذونات USB", + "RTL-SDR connection failed": "فشل الاتصال بـ RTL-SDR", + "Receiving 1090 MHz ADS-B": "استقبال ADS-B على 1090 MHz", + "Receiving broadcast FM": "استقبال بث FM", + "Connect an RTL-SDR to begin.": "وصّل جهاز RTL-SDR للبدء.", + "WebUSB is unavailable in this browser": "WebUSB غير متاح في هذا المتصفح", + "USB work abandoned after a stalled transfer": "أُوقف عمل USB بعد تعثّر نقل البيانات", + "SDR decoder worker failed": "فشل عامل مفكّك SDR", + "SDR decoder did not start; receiver stopped": "لم يبدأ مفكّك SDR؛ توقف جهاز الاستقبال", + "SDR decoder stopped responding; receiver stopped": "توقف مفكّك SDR عن الاستجابة؛ توقف جهاز الاستقبال", + "SDR decoder fell behind; receiver stopped": "تأخّر مفكّك SDR عن المواكبة؛ توقف جهاز الاستقبال", + "WebUSB requires desktop Chrome or Edge": "يتطلب WebUSB متصفح Chrome أو Edge على سطح المكتب", + "Waiting for an RTL-SDR device…": "بانتظار جهاز RTL-SDR…", + "Browser audio is suspended; press Connect again to resume it": "صوت المتصفح معلّق؛ اضغط «اتصال» مجددًا لاستئنافه", + "RTL-SDR sample stream stopped": "توقف تدفق عيّنات RTL-SDR", + "Switching to {mode}…": "جارٍ التبديل إلى {mode}…", + "Browser audio is suspended; select FM again to resume it": "صوت المتصفح معلّق؛ اختر FM مجددًا لاستئنافه", + "RTL-SDR gain change failed": "فشل تغيير كسب RTL-SDR", + "Tuned to {mhz} MHz FM": "مضبوط على FM {mhz} MHz", + "Seeking up…": "جارٍ البحث صعودًا…", + "Seeking down…": "جارٍ البحث نزولًا…", + "Seek stopped": "توقف البحث", + "Scanning {mhz} MHz…": "جارٍ مسح {mhz} MHz…", + "Found {mhz} MHz · {snr} dB": "عُثر على {mhz} MHz · {snr} dB", + "FM signal found at {mhz} MHz": "عُثر على إشارة FM عند {mhz} MHz", + "No FM signal found": "لم يُعثر على إشارة FM", + "Browser location is unavailable": "موقع المتصفح غير متاح", + "Receiver location was not granted": "لم يُمنح إذن موقع جهاز الاستقبال", + "RTL-SDR disconnected": "انقطع اتصال RTL-SDR", + "Upstream response too large": "استجابة المصدر كبيرة جدًا", + "Vector tile request timed out": "انتهت مهلة طلب البلاطات المتجهية", + "Vector tiles unavailable": "البلاطات المتجهية غير متاحة", + "Vector tile metadata unavailable": "البيانات الوصفية للبلاطات المتجهية غير متاحة", + "Zoom in for vector tile coverage": "قرّب لتحميل تغطية البلاطات المتجهية", + "Saturation": "التشبّع", + "Edge Thickness": "سماكة الحواف", + "Contrast": "التباين", + "Grain": "الحبيبات", + "Vignette": "تعتيم الأطراف", + "Pixelation": "البكسلة", + "Distortion": "التشويه", + "Instability": "عدم الثبات", + "Gain": "الكسب", + "Scanlines": "خطوط المسح", + "Sensitivity": "الحساسية", + "WHOT/BHOT": "WHOT/BHOT", + "Ironbow": "Ironbow", + "unsaved CCTV calibration": "معايرة CCTV غير محفوظة", + "the open cockpit": "القمرة المفتوحة", + "Switching language reloads the page. This will be lost: {items}. Switch anyway?": "تبديل اللغة يعيد تحميل الصفحة. سيُفقد ما يلي: {items}. هل تريد التبديل رغم ذلك؟", + "Link shared": "تمت مشاركة الرابط", + "Return map to straight-down view": "إعادة الخريطة إلى العرض العمودي", + "Tilt map to oblique view": "إمالة الخريطة إلى عرض مائل", + "Reset map to north up. Current heading {heading} degrees": "إعادة توجيه الخريطة بحيث يكون الشمال للأعلى. الاتجاه الحالي {heading} درجة", + "Tilted view": "عرض مائل", + "Straight-down view": "عرض عمودي", + "North up": "الشمال للأعلى", + "HDG": "HDG", + "PITCH": "الميل", + "FOV": "FOV", + "RANGE": "المدى", + "HGT": "الارتفاع", + "ΔN": "Δش", + "ΔE": "Δق", + "{value}m": "{value} م", + "SNAPSHOT": "لقطة", + "LIVE": "مباشر", + "UPSTREAM": "المصدر", + "SYNTHETIC": "محاكاة", + "CONFIGURED": "مُعَدّ", + "SEED": "الفهرس", + "OK": "سليم", + "Live HLS connected": "بث HLS المباشر متصل", + "Live HLS unavailable": "بث HLS المباشر غير متاح", + "No stream URL configured": "لم يُضبط عنوان URL للبث", + "Live stream connected": "البث المباشر متصل", + "Snapshot feed connected": "مصدر اللقطات متصل", + "Media fetch failed": "فشل جلب الوسائط", + "Upstream snapshot active": "لقطة المصدر نشطة", + "Fallback Street View frame": "إطار بديل من Street View", + "Upstream unavailable": "المصدر غير متاح", + "No source configured": "لم يُعَدّ أي مصدر", + "Configured source": "المصدر المُعَدّ", + "Configured Source": "المصدر المُعَدّ", + "Synthetic fallback": "بديل محاكى", + "Upstream HTTP {status}": "المصدر: HTTP {status}", + "Unexpected media type {type}": "نوع وسائط غير متوقع: {type}", + "{value} KM/H": "{value} كم/س", + "{label} · {radius} AIR/SEA WINDOW": "{label} · نطاق جو/بحر {radius}", + "{scope} · INSTALLATIONS {coverage}": "{scope} · المنشآت {coverage}", + "SQUAWK {code} · {status}": "SQUAWK {code} · {status}", + "ADS-B PRIORITY · {status}": "أولوية ADS-B · {status}", + "ADS-B EMERGENCY · {status}": "طوارئ ADS-B · {status}", + "{aircraftClass} · {emergency} · {feedState}": "{aircraftClass} · {emergency} · {feedState}", + "{source} · LOCATION QUERY · RECENT": "{source} · استعلام الموقع · حديث", + "Rendered globe frames per second · toggle with `": "إطارات الكرة الأرضية المعروضة في الثانية · بدّل بالمفتاح `", + "imported map files": "ملفات الخريطة المستوردة", + "Ground heights could not be refreshed. Try the file again when the map has loaded.": "تعذّر تحديث ارتفاعات الأرض. أعد استيراد الملف بعد تحميل الخريطة.", + "{count} map objects": { + "zero": "{count} عنصر على الخريطة", + "one": "عنصر واحد على الخريطة ({count})", + "two": "عنصران على الخريطة ({count})", + "few": "{count} عناصر على الخريطة", + "many": "{count} عنصرًا على الخريطة", + "other": "{count} عنصر على الخريطة" + }, + ", drawn with its own styles": "، مرسوم بأنماطه الخاصة", + "Hide {name}": "إخفاء {name}", + "Show {name}": "إظهار {name}", + "Fly to {name}": "الانتقال إلى {name}", + "Remove {name}": "إزالة {name}", + "At most {count} files at once — remove one first.": "الحد الأقصى {count} ملفات في آن واحد — أزل ملفًا أولًا.", + "Reading {name}…": "جارٍ قراءة {name}…", + "That file could not be read.": "تعذّرت قراءة هذا الملف.", + "Added {count} files.": { + "zero": "أُضيف {count} ملف.", + "one": "أُضيف ملف واحد ({count}).", + "two": "أُضيف ملفان ({count}).", + "few": "أُضيفت {count} ملفات.", + "many": "أُضيف {count} ملفًا.", + "other": "أُضيف {count} ملف." + }, + "{count} files could not be added ({name}: {error})": { + "zero": "تعذّرت إضافة {count} ملف ({name}: {error})", + "one": "تعذّرت إضافة ملف واحد ({count}) ({name}: {error})", + "two": "تعذّرت إضافة ملفين ({count}) ({name}: {error})", + "few": "تعذّرت إضافة {count} ملفات ({name}: {error})", + "many": "تعذّرت إضافة {count} ملفًا ({name}: {error})", + "other": "تعذّرت إضافة {count} ملف ({name}: {error})" + }, + "Some KML content was left out.": "أُغفل جزء من محتوى KML.", + "Press on the ground, not the sky": "اضغط على الأرض لا على السماء", + "Drag to size the box": "اسحب لتحديد حجم المنطقة", + "light {source} to use your {name} key": "فعّل {source} لاستخدام مفتاح {name} الخاص بك", + "light {source}": "فعّل {source}", + ", or ": "، أو ", + "{requirement}, or {offer}": "{requirement}، أو {offer}", + "Local ADS-B": "ADS-B المحلي", + "Transit": "النقل العام", + "Recent Imagery": "الصور الحديثة", + "Fire Perimeters": "محيطات الحرائق", + "GNSS Integrity": "سلامة GNSS", + "S2 GhostMaps": "S2 GhostMaps", + "Rain radar": "رادار الأمطار", + "Lightning density": "كثافة البرق", + "Cyclone advisories": "نشرات الأعاصير", + "ALPR Cameras": "كاميرات ALPR", + "Live Vessels": "السفن المباشرة", + "Bike Share": "الدراجات المشتركة", + "Cameras": "الكاميرات", + "Street Level": "مستوى الشارع", + "Mapped ALPR Cameras": "كاميرات ALPR المرسومة", + "Data Centers": "مراكز البيانات", + "Active Fires": "الحرائق النشطة", + "Military aircraft": "الطائرات العسكرية", + "Vessels": "السفن", + "CCTV + Street View fallback": "CCTV + بديل Street View", + "OpenStreetMap + optional Google Maps Places": "OpenStreetMap + Google Maps Places (اختياري)", + "GFS / ECMWF IFS · FORECAST": "GFS / ECMWF IFS · توقع", + "NOAA nowCOAST · OBSERVED": "NOAA nowCOAST · مرصود", + "NASA FIRMS · LIVE": "NASA FIRMS · مباشر", + "OSM routing": "توجيه OSM", + "data source|Local": "محلي", + "Movement": "الحركة", + "Infrastructure": "البنية التحتية", + "Events": "الأحداث", + "Weather": "الطقس", + "Utilities": "الأدوات", + "Other layers": "طبقات أخرى", + "status chip|UNAVAILABLE": "غير متاح", + "Data source unavailable": "مصدر البيانات غير متاح", + "Local FM stopped: internet radio started": "توقف FM المحلي: بدأ راديو الإنترنت", + "IDLE": "خامل", + "TUNING": "ضبط", + "STREAMING": "استقبال", + "UNSUPPORTED": "غير مدعوم", + "idle": "خامل", + "running": "يعمل", + "suspended": "معلّق", + "closed": "مغلق", + "feed status|live": "مباشر", + "feed status|stale": "متقادم", + "feed status|unreachable": "يتعذّر الوصول إليه", + "feed status|invalid": "غير صالح", + "waiting for IQ": "بانتظار IQ", + "{count} messages": { + "zero": "{count} رسالة", + "one": "رسالة واحدة ({count})", + "two": "رسالتان ({count})", + "few": "{count} رسائل", + "many": "{count} رسالة", + "other": "{count} رسالة" + }, + "DSP {count} blocks": { + "zero": "DSP: {count} كتلة", + "one": "DSP: كتلة واحدة ({count})", + "two": "DSP: كتلتان ({count})", + "few": "DSP: {count} كتل", + "many": "DSP: {count} كتلة", + "other": "DSP: {count} كتلة" + }, + "DSP waiting": "DSP بالانتظار", + "{level} dBFS audio": "الصوت {level} dBFS", + "audio signal --": "إشارة الصوت --", + "audio {state}": "الصوت: {state}", + "{count} HEARD": { + "zero": "المسموعة: {count}", + "one": "المسموعة: {count}", + "two": "المسموعة: {count}", + "few": "المسموعة: {count}", + "many": "المسموعة: {count}", + "other": "المسموعة: {count}" + }, + "DISCONNECT": "قطع الاتصال", + "CONNECT": "اتصال", + "LOCATING…": "جارٍ تحديد الموقع…", + "LOCATED": "تم تحديد الموقع", + "LOCATE": "تحديد الموقع", + " · read while Local ADS-B is on": " · تُقرأ ما دامت طبقة «ADS-B المحلي» مفعّلة", + "Decoder feeds: {feeds}": "مصادر المفكّك: {feeds}", + "Language: {language}": "اللغة: {language}", + "Change the interface language": "تغيير لغة الواجهة", + "Interface language": "لغة الواجهة", + "Search languages": "البحث عن لغة", + "No matching languages": "لا توجد لغات مطابقة", + "Check the spelling and press Enter to search again.": "تحقّق من الإملاء واضغط Enter لإعادة البحث.", + "Press Enter to try again.": "اضغط Enter لإعادة المحاولة.", + "Detailed outline unavailable": "المخطط التفصيلي غير متاح", + "Layers": "الطبقات", + "Search": "البحث", + "More": "المزيد", + "Panels": "اللوحات", + "Austin": "أوستن", + "San Francisco": "سان فرانسيسكو", + "New York": "نيويورك", + "Tokyo": "طوكيو", + "London": "لندن", + "Paris": "باريس", + "Dubai": "دبي", + "Washington DC": "واشنطن العاصمة", + "Tallinn": "تالين", + "Los Angeles": "لوس أنجلوس", + "CH {index} / {total}": "القناة {index} / {total}", + "Station unavailable after directory refresh": "المحطة غير متاحة بعد تحديث الدليل", + "Go to expanded Radio section": "الانتقال إلى قسم الراديو الموسَّع", + "Expand Radio section in Context": "توسيع قسم الراديو في «السياق»", + "{category} ({count})": "{category} ({count})", + "PAUSE": "إيقاف مؤقت", + "RESUME": "استئناف", + "Clear reading": "مسح القراءة", + "Earlier observation": "رصد أسبق", + "Observed history": "سجل الأرصاد", + "Later observation": "رصد لاحق", + "Latest": "الأحدث", + "Newest frame per product": "أحدث إطار لكل منتج", + "Replay observed history": "إعادة تشغيل سجل الأرصاد", + "Imagery on Esri · Google 3D returns when cleared": "الصور على Esri · تعود Google 3D عند المسح", + "Point the camera at the ground to use the view": "وجّه الكاميرا نحو الأرض لاستخدام العرض", + "That point cannot anchor a box": "لا يمكن تثبيت منطقة على تلك النقطة", + "Imagery stops at ±{limit}° latitude": "تتوقف الصور عند خط العرض ±{limit}°", + "{owner} is using the pointer — close it first": "المؤشر مستخدم من قِبل «{owner}» — أغلقه أولًا", + "Box is {size} wide · limit {limit}": "عرض المنطقة {size} · الحد {limit}", + "View is {size} wide · limit {limit}": "عرض المنظر {size} · الحد {limit}", + "VS BASEMAP": "مقابل الخريطة الأساسية", + "A / B": "A / B", + "Newest low-cloud day for this box · scene cloud, not box cloud": "أحدث يوم قليل الغيوم لهذه المنطقة · غيوم المشهد كله لا المنطقة", + "Newest day covering this box · cloudier than 20%": "أحدث يوم يغطي هذه المنطقة · غيوم أكثر من 20%", + "Newest day with imagery for this box · partial coverage": "أحدث يوم فيه صور لهذه المنطقة · تغطية جزئية", + "Newest daily overview for this box": "أحدث نظرة عامة يومية لهذه المنطقة", + "newest clear day": "أحدث يوم صافٍ", + "newest day (cloudy)": "أحدث يوم (غائم)", + "newest day (partial coverage)": "أحدث يوم (تغطية جزئية)", + "newest overview": "أحدث نظرة عامة", + "No imagery": "لا صور", + "Loading": "جارٍ التحميل", + "coverage|full": "كاملة", + "coverage|partial": "جزئية", + "unknown": "غير معروف", + "no imagery": "لا صور", + "{percent}% cloud": "غيوم {percent}%", + "{min}–{max}% cloud": "غيوم {min}–{max}%", + "NO BOX": "لا منطقة", + "SEARCHING": "جارٍ البحث", + "{count} DAYS": { + "zero": "{count} يوم", + "one": "يوم واحد ({count})", + "two": "يومان ({count})", + "few": "{count} أيام", + "many": "{count} يومًا", + "other": "{count} يوم" + }, + "Zoom in or draw a smaller box": "قرّب أو ارسم منطقة أصغر", + "Select a box or use the view": "حدّد منطقة أو استخدم العرض الحالي", + "Searching the last 30 days": "جارٍ البحث في آخر 30 يومًا", + "No days to show for this box": "لا أيام لعرضها لهذه المنطقة", + "Drag the divider · SWAP trades sides": "اسحب الفاصل · «تبديل» يبادل الجانبين", + "← → preview · A or B pins the focused day": "← → معاينة · A أو B يثبّت اليوم المحدد", + "← → preview the other side · A or B pins it": "← → معاينة الجانب الآخر · A أو B يثبّته", + "S on another day replaces it · × unpins": "S على يوم آخر يستبدله · × يلغي التثبيت", + "← → preview · S shows the focused day": "← → معاينة · S يعرض اليوم المحدد", + "ZOOM IN": "تكبير", + "Fly in until the view fits the 1,000 km limit": "اقترب حتى يتسع العرض ضمن حد 1,000 كم", + "Imagery days, newest first · arrows move, S or A and B pin": "أيام الصور، الأحدث أولًا · الأسهم للتنقل، وS أو A وB للتثبيت", + "On the map": "على الخريطة", + "Mode": "الوضع", + "Imagery opacity": "عتامة الصور", + "SWAP": "تبديل", + "Trade the two sides of the divider": "تبديل جانبَي الفاصل", + "SELECT BOX": "تحديد منطقة", + "Drag a box on the map (Esc cancels)": "اسحب لرسم منطقة على الخريطة (Esc للإلغاء)", + "USE VIEW": "استخدام العرض", + "Use the current view as the box": "استخدام العرض الحالي كمنطقة", + "Forget the box and its images": "تجاهل المنطقة وصورها", + "START HERE": "ابدأ هنا", + "Checking": "جارٍ الفحص", + "PREVIEW": "معاينة", + "Newest day with imagery for this box": "أحدث يوم فيه صور لهذه المنطقة", + "SHOW": "عرض", + "Pin {day} as {slot}": "تثبيت {day} في {slot}", + "Show {day}": "عرض {day}", + "pinned {slot}": "مثبَّت في {slot}", + "shown": "معروض", + "preview": "معاينة", + "start here": "ابدأ هنا", + "No box": "لا منطقة", + "Searching": "جارٍ البحث", + "Every day is empty here": "كل الأيام فارغة هنا", + "Sources off": "المصادر متوقفة", + "VS": "مقابل", + "Not set": "غير معيَّن", + "Basemap": "الخريطة الأساسية", + "Source off": "المصدر متوقف", + "Unpin {slot}": "إلغاء تثبيت {slot}", + "Unpin the image": "إلغاء تثبيت الصورة", + "EXPORT {slot}": "تصدير {slot}", + "EXPORT": "تصدير", + "Download {slot} as a PNG": "تنزيل {slot} بصيغة PNG", + "Download the image as a PNG": "تنزيل الصورة بصيغة PNG", + "Box {width} × {height} km": "المنطقة {width} × {height} كم", + "Acquired {time}": "التُقطت {time}", + "Coverage {coverage}": "التغطية {coverage}", + "START HERE · {reason}": "ابدأ هنا · {reason}", + "Daily overview shows little detail in a box this small": "النظرة العامة اليومية قليلة التفاصيل في منطقة بهذا الصغر", + "Imagery: NASA GIBS and Worldview · HLS (Sentinel-2, Landsat 8/9) and VIIRS": "الصور: NASA GIBS وWorldview · HLS (Sentinel-2 وLandsat 8/9) وVIIRS", + "Details": "التفاصيل", + "Times, coverage, sources": "الأوقات والتغطية والمصادر", + "HIDE EMPTY DAYS": "إخفاء الأيام الفارغة", + "SHOW EMPTY DAYS · {count}": "عرض الأيام الفارغة · {count}", + "Days the probe found empty in this box": "الأيام التي وجدها الفحص فارغة في هذه المنطقة", + "image": "الصورة", + "BASEMAP": "الخريطة الأساسية", + "The basemap": "الخريطة الأساسية", + "basemap": "الخريطة الأساسية", + "Recent imagery against the basemap divider": "فاصل الصور الحديثة مقابل الخريطة الأساسية", + "Recent imagery A and B divider": "فاصل الصورتين الحديثتين A وB", + "{before} {left} percent, {after} {right} percent": "{before} {left}%، {after} {right}%", + "Export failed · {error}": "فشل التصدير · {error}", + "New scene name": "اسم المشهد الجديد", + "Delete scene \"{scene}\" and all shots?": "حذف المشهد «{scene}» وكل لقطاته؟", + "Stopped (Esc)": "متوقف (Esc)", + "No shots yet. Use CAPTURE SHOT to save current look.": "لا لقطات بعد. استخدم «التقاط لقطة» لحفظ المنظر الحالي.", + "Double-click to rename": "انقر نقرًا مزدوجًا لإعادة التسمية", + "Shot name": "اسم اللقطة", + "LOAD": "تحميل", + "{duration}s + {hold}s": "{duration} ث + {hold} ث", + "Choose files": "اختيار ملفات", + "{count} files selected": { + "zero": "الملفات المحددة: {count}", + "one": "الملفات المحددة: {count}", + "two": "الملفات المحددة: {count}", + "few": "الملفات المحددة: {count}", + "many": "الملفات المحددة: {count}", + "other": "الملفات المحددة: {count}" + }, + "No file chosen": "لم يُختر أي ملف", + "Cancel": "إلغاء", + "EDIT DETAILS": "تعديل التفاصيل", + "SHARE SCENE": "مشاركة المشهد", + "Shared flight follow expired": "انتهت متابعة الرحلة المشتركة", + "Shared military flight follow expired": "انتهت متابعة الرحلة العسكرية المشتركة", + "Shared satellite follow expired": "انتهت متابعة القمر الصناعي المشترك", + "Shared flight could not be restored — feed unavailable": "تعذّرت استعادة الرحلة المشتركة — المصدر غير متاح", + "Shared military flight could not be restored — feed unavailable": "تعذّرت استعادة الرحلة العسكرية المشتركة — المصدر غير متاح", + "Shared satellite could not be restored — feed unavailable": "تعذّرت استعادة القمر الصناعي المشترك — المصدر غير متاح", + "Shared flight is unavailable": "الرحلة المشتركة غير متاحة", + "Shared military flight is unavailable": "الرحلة العسكرية المشتركة غير متاحة", + "Shared satellite is unavailable": "القمر الصناعي المشترك غير متاح", + "{id} isn't reporting now — showing where it was last seen": "{id} لا يرسل بيانات الآن — يُعرض آخر موضع شوهد فيه", + "{id} isn't reporting now — showing where it was at {time}": "{id} لا يرسل بيانات الآن — يُعرض موضعه عند {time}", + "This share link can't be opened": "لا يمكن فتح رابط المشاركة هذا", + "Shared vessel is unavailable": "السفينة المشتركة غير متاحة", + "subject": "الهدف", + "RETRYING ALPR CAMERAS": "إعادة محاولة كاميرات ALPR", + "FETCHING ALPR CAMERAS": "جارٍ جلب كاميرات ALPR", + "OVERPASS TEMPORARILY UNAVAILABLE": "OVERPASS غير متاح مؤقتًا", + "OVERPASS RATE-LIMITED": "OVERPASS قيّد معدل الطلبات", + "OVERPASS TIMED OUT": "انتهت مهلة OVERPASS", + "OVERPASS COULD NOT COMPLETE THE QUERY": "تعذّر على OVERPASS إكمال الاستعلام", + "MAP TILES TEMPORARILY UNAVAILABLE": "بلاطات الخريطة غير متاحة مؤقتًا", + "MAPPED NAMES TEMPORARILY UNAVAILABLE": "أسماء المواقع المرسومة غير متاحة مؤقتًا", + "ALPR cameras": "كاميرات ALPR", + "OpenSky OAuth client missing/invalid": "عميل OAuth لـ OpenSky مفقود أو غير صالح", + "OpenSky OAuth rejected credentials": "رفض OpenSky OAuth بيانات الاعتماد", + "OpenSky username/password rejected": "رفض OpenSky اسم المستخدم أو كلمة المرور", + "OpenSky auth missing": "بيانات مصادقة OpenSky مفقودة", + "OpenSky auth required": "OpenSky يتطلب المصادقة", + "OpenSky auth invalid": "بيانات مصادقة OpenSky غير صالحة", + "OpenSky auth failed": "فشلت مصادقة OpenSky", + "KartaView answered HTTP {status}": "استجاب KartaView بـ HTTP {status}", + "Panoramax answered HTTP {status}": "استجاب Panoramax بـ HTTP {status}", + "KartaView refused the request (code {code})": "رفض KartaView الطلب (الرمز {code})", + "Vector tiles unavailable (HTTP {status})": "البلاطات المتجهية غير متاحة (HTTP {status})", + "GNSS feed unavailable (HTTP {status})": "مصدر GNSS غير متاح (HTTP {status})", + "{count} CelesTrak groups unavailable": { + "zero": "{count} مجموعة CelesTrak غير متاحة", + "one": "مجموعة CelesTrak واحدة غير متاحة ({count})", + "two": "مجموعتا CelesTrak غير متاحتين ({count})", + "few": "{count} مجموعات CelesTrak غير متاحة", + "many": "{count} مجموعة CelesTrak غير متاحة", + "other": "{count} مجموعة CelesTrak غير متاحة" + }, + "{feed} feed unavailable": "مصدر {feed} غير متاح", + "Source snapshot {minutes} min old": "عمر لقطة المصدر {minutes} د", + "{source} rate limited (anonymous)": "{source}: تجاوز حد الطلبات (مجهول الهوية)", + "{source} rate limited": "{source}: تجاوز حد الطلبات", + "{source} network error": "{source}: خطأ في الشبكة", + "Malformed {source} aircraft rows": "{source}: سجلات طائرات مشوّهة", + "Malformed {source} response": "{source}: استجابة مشوّهة", + "entry {n}": "الإدخال {n}", + "feeds {names} stale": { + "zero": "المصادر {names} متقادمة", + "one": "المصدر {names} متقادم", + "two": "المصدران {names} متقادمان", + "few": "المصادر {names} متقادمة", + "many": "المصادر {names} متقادمة", + "other": "المصادر {names} متقادمة" + }, + "feeds {names} unreachable": { + "zero": "يتعذّر الوصول إلى المصادر {names}", + "one": "يتعذّر الوصول إلى المصدر {names}", + "two": "يتعذّر الوصول إلى المصدرين {names}", + "few": "يتعذّر الوصول إلى المصادر {names}", + "many": "يتعذّر الوصول إلى المصادر {names}", + "other": "يتعذّر الوصول إلى المصادر {names}" + }, + "feeds {names} invalid": { + "zero": "المصادر {names} غير صالحة", + "one": "المصدر {names} غير صالح", + "two": "المصدران {names} غير صالحين", + "few": "المصادر {names} غير صالحة", + "many": "المصادر {names} غير صالحة", + "other": "المصادر {names} غير صالحة" + }, + "Loading {feeds}": "جارٍ تحميل {feeds}", + "{count} heard": { + "zero": "المسموعة: {count}", + "one": "المسموعة: {count}", + "two": "المسموعة: {count}", + "few": "المسموعة: {count}", + "many": "المسموعة: {count}", + "other": "المسموعة: {count}" + }, + "USB {rate} msg/s": "USB {rate} رسالة/ث", + "{rate} msg/s": "{rate} رسالة/ث", + "{count} feeds live": { + "zero": "المصادر المباشرة: {count}", + "one": "المصادر المباشرة: {count}", + "two": "المصادر المباشرة: {count}", + "few": "المصادر المباشرة: {count}", + "many": "المصادر المباشرة: {count}", + "other": "المصادر المباشرة: {count}" + }, + "{feed} {count} ({seconds}s old)": "{feed} {count} (قبل {seconds} ث)", + "Street Level toggle failed": "فشل تبديل «مستوى الشارع»", + "Street Level could not start": "تعذّر بدء «مستوى الشارع»", + "SHRINK": "تصغير", + "EXPAND": "توسيع", + "Shrink": "تصغير", + "Expand": "توسيع", + "ANY DATE": "أي تاريخ", + "LAST 10 YEARS": "آخر 10 سنوات", + "LAST 5 YEARS": "آخر 5 سنوات", + "LAST 3 YEARS": "آخر 3 سنوات", + "LAST 2 YEARS": "آخر سنتين", + "LAST YEAR": "آخر سنة", + "LAST 6 MONTHS": "آخر 6 أشهر", + "LAST 3 MONTHS": "آخر 3 أشهر", + "LAST MONTH": "آخر شهر", + "LAST {count} DAYS": { + "zero": "آخر {count} يوم", + "one": "آخر يوم ({count})", + "two": "آخر يومين ({count})", + "few": "آخر {count} أيام", + "many": "آخر {count} يومًا", + "other": "آخر {count} يوم" + }, + "{window} · SINCE {date}": "{window} · منذ {date}", + "Turn Street Level off": "إيقاف «مستوى الشارع»", + "Turn Street Level on": "تشغيل «مستوى الشارع»", + "{name} imagery on": "صور {name} مفعّلة", + "{name} imagery off": "صور {name} متوقفة", + "Image by {creator}": "الصورة من: {creator}", + " or ": " أو ", + "OPEN {labels}": "فتح {labels}", + "Open {names} at the centre of the view": "فتح {names} في مركز العرض", + "Zoom in to a street to open {names} here": "قرّب إلى شارع لفتح {names} هنا", + "Switch Street Level on to draw its coverage.": "شغّل «مستوى الشارع» لرسم تغطيته.", + "Every provider is switched off: light a chip to draw its coverage.": "كل المزوّدين متوقفون: فعّل أحدهم لرسم تغطيته.", + "Loading this sequence…": "جارٍ تحميل هذا التسلسل…", + "{n} images in this sequence · Esc clears": { + "zero": "{n} صورة في هذا التسلسل · Esc للمسح", + "one": "صورة واحدة ({n}) في هذا التسلسل · Esc للمسح", + "two": "صورتان ({n}) في هذا التسلسل · Esc للمسح", + "few": "{n} صور في هذا التسلسل · Esc للمسح", + "many": "{n} صورة في هذا التسلسل · Esc للمسح", + "other": "{n} صورة في هذا التسلسل · Esc للمسح" + }, + "No sequences in view match the filter": "لا توجد تسلسلات في نطاق العرض تطابق المرشح", + "No coverage in view": "لا تغطية في نطاق العرض", + "{n} streets in view · click a line for its nearest photo": { + "zero": "{n} شارع في نطاق العرض · انقر على خط لأقرب صورة له", + "one": "شارع واحد ({n}) في نطاق العرض · انقر على خط لأقرب صورة له", + "two": "شارعان ({n}) في نطاق العرض · انقر على خط لأقرب صورة له", + "few": "{n} شوارع في نطاق العرض · انقر على خط لأقرب صورة له", + "many": "{n} شارعًا في نطاق العرض · انقر على خط لأقرب صورة له", + "other": "{n} شارع في نطاق العرض · انقر على خط لأقرب صورة له" + }, + "{n} sequences in view · click a line for its nearest photo": { + "zero": "{n} تسلسل في نطاق العرض · انقر على خط لأقرب صورة له", + "one": "تسلسل واحد ({n}) في نطاق العرض · انقر على خط لأقرب صورة له", + "two": "تسلسلان ({n}) في نطاق العرض · انقر على خط لأقرب صورة له", + "few": "{n} تسلسلات في نطاق العرض · انقر على خط لأقرب صورة له", + "many": "{n} تسلسلًا في نطاق العرض · انقر على خط لأقرب صورة له", + "other": "{n} تسلسل في نطاق العرض · انقر على خط لأقرب صورة له" + }, + "{n} sequences in view · click a line for its photos": { + "zero": "{n} تسلسل في نطاق العرض · انقر على خط لعرض صوره", + "one": "تسلسل واحد ({n}) في نطاق العرض · انقر على خط لعرض صوره", + "two": "تسلسلان ({n}) في نطاق العرض · انقر على خط لعرض صوره", + "few": "{n} تسلسلات في نطاق العرض · انقر على خط لعرض صوره", + "many": "{n} تسلسلًا في نطاق العرض · انقر على خط لعرض صوره", + "other": "{n} تسلسل في نطاق العرض · انقر على خط لعرض صوره" + }, + "km/h": "كم/س", + "m/s": "م/ث", + "mph": "ميل/س", + "hPa": "hPa", + "kt": "عقدة", + "kts": "عقدة", + "ft": "قدم", + "km": "كم", + "m": "م", + "h": "س", + "min": "د", + "s": "ث", + "dB": "dB", + "{time} · {minutes} min ago": "{time} · قبل {minutes} د", + "Active weather": "الطقس النشط", + "LATEST · newest per product": "الأحدث · آخر إطار لكل منتج", + "Forecast · valid {valid} · issued {issued}": "توقع · صالح حتى {valid} · صدر {issued}", + "{detail} · Does not follow history": "{detail} · لا يتبع السجل", + "Forecast · valid {valid}": "توقع · صالح حتى {valid}", + "voice|OFF": "متوقف", + "voice|CONNECTING": "جارٍ الاتصال", + "voice|LISTENING": "يستمع", + "voice|EXECUTING": "ينفّذ", + "voice|ERROR": "خطأ", + "Voice provider": "مزوّد الصوت", + "Changing provider reconnects voice if it is on.": "تغيير المزوّد يعيد اتصال الصوت إن كان مفعّلًا.", + "Voice Settings": "إعدادات الصوت", + "STD": "قياسي", + "ON/OFF": "تشغيل/إيقاف", + "VOICE": "الصوت", + "Preview": "معاينة", + "Settings": "الإعدادات", + "Close voice panel": "إغلاق لوحة الصوت", + "Voice replies appear here.": "تظهر الردود الصوتية هنا.", + "Voice assistant": "المساعد الصوتي", + "Dismiss voice card": "إغلاق بطاقة الصوت", + "YOU": "أنت", + "THIS": "المُشار إليه", + "Plan": "الخطة", + "Referenced items": "العناصر المشار إليها", + "NOTES & SOURCES": "الملاحظات والمصادر", + "Show Voice Preview": "عرض معاينة الصوت", + "Voice inactivity timeout": "مهلة خمول الصوت", + "Minutes": "الدقائق", + "Custom": "مخصص", + "These preferences stay in this browser.": "تبقى هذه التفضيلات في هذا المتصفح.", + "Gemini returned an oversized audio chunk": "أعاد Gemini مقطعًا صوتيًا كبيرًا جدًا", + "Gemini returned an unsupported audio format": "أعاد Gemini صيغة صوت غير مدعومة", + "Gemini returned an invalid audio sample rate": "أعاد Gemini معدل عيّنات صوت غير صالح", + "Gemini returned incomplete PCM audio": "أعاد Gemini صوت PCM غير مكتمل", + "This browser does not support Gemini microphone audio": "لا يدعم هذا المتصفح صوت الميكروفون لـ Gemini", + "Microphone audio processing failed": "فشلت معالجة صوت الميكروفون", + "Gemini audio playback fell behind. Reconnect to continue.": "تأخّر تشغيل صوت Gemini. أعد الاتصال للمتابعة.", + "Gemini token response did not include an ephemeral credential": "لم تتضمن استجابة رمز Gemini بيانات اعتماد مؤقتة", + "Invalid Gemini connection endpoint": "نقطة اتصال Gemini غير صالحة", + "Gemini voice could not connect. Try again.": "تعذّر اتصال صوت Gemini. أعد المحاولة.", + "Gemini voice requires a same-origin app request": "يتطلب صوت Gemini طلبًا من أصل التطبيق نفسه", + "Add a Gemini API key in Provider Settings": "أضف مفتاح Gemini API في «إعدادات المزوّدين»", + "The Gemini Live model configuration is invalid": "إعدادات نموذج Gemini Live غير صالحة", + "Gemini voice is starting too often. Try again shortly.": "يبدأ صوت Gemini بشكل متكرر جدًا. أعد المحاولة بعد قليل.", + "Gemini quota is unavailable. Try again later.": "حصة Gemini غير متاحة. أعد المحاولة لاحقًا.", + "Gemini access was refused. Check the API key and model access.": "رُفض الوصول إلى Gemini. تحقّق من مفتاح API ومن صلاحية الوصول إلى النموذج.", + "Gemini Live is unavailable for the configured model.": "Gemini Live غير متاح للنموذج المُعَدّ.", + "Token request is too large": "طلب الرمز كبير جدًا", + "Use an empty JSON token request": "استخدم طلب رمز بكائن JSON فارغ", + "Voice command context is too large": "سياق الأمر الصوتي كبير جدًا", + "Gemini reliable transport exceeded its queue limit. Start voice again.": "تجاوز النقل الموثوق لـ Gemini حد قائمة الانتظار. ابدأ الصوت مجددًا.", + "Gemini reliable transport did not drain. Start voice again.": "لم تُفرَّغ قائمة النقل الموثوق لـ Gemini. ابدأ الصوت مجددًا.", + "Gemini token request failed (HTTP {status})": "فشل طلب رمز Gemini (HTTP {status})", + "Gemini token response did not include a valid model": "لم تتضمن استجابة رمز Gemini نموذجًا صالحًا", + "Gemini token response did not include session settings": "لم تتضمن استجابة رمز Gemini إعدادات الجلسة", + "Gemini session settings do not match the input mode": "إعدادات جلسة Gemini لا تطابق وضع الإدخال", + "Gemini could not submit this input. Start voice again.": "تعذّر على Gemini إرسال هذا الإدخال. ابدأ الصوت مجددًا.", + "Connecting to Gemini": "جارٍ الاتصال بـ Gemini", + "Gemini returned an oversized message": "أعاد Gemini رسالة كبيرة جدًا", + "Gemini Live connection failed. Check network access, then start voice again.": "فشل الاتصال بـ Gemini Live. تحقّق من الوصول إلى الشبكة، ثم ابدأ الصوت مجددًا.", + "Gemini Live connection ended. Start voice again for a new conversation.": "انتهى الاتصال بـ Gemini Live. ابدأ الصوت مجددًا لمحادثة جديدة.", + "Gemini Live could not start. Start voice again to request a fresh session.": "تعذّر بدء Gemini Live. ابدأ الصوت مجددًا لطلب جلسة جديدة.", + "Start voice again for a fresh token and a new conversation.": "ابدأ الصوت مجددًا للحصول على رمز جديد ومحادثة جديدة.", + "Start voice again to request a fresh session credential.": "ابدأ الصوت مجددًا لطلب بيانات اعتماد جلسة جديدة.", + "Microphone permission was denied. Allow microphone access and try again.": "رُفض إذن الميكروفون. اسمح بالوصول إلى الميكروفون وأعد المحاولة.", + "Gemini connection timed out. Try again.": "انتهت مهلة الاتصال بـ Gemini. أعد المحاولة.", + "Gemini voice could not start": "تعذّر بدء صوت Gemini", + "Gemini did not finish the interrupted reply. Start voice again.": "لم يُكمل Gemini الرد المقطوع. ابدأ الصوت مجددًا.", + "Gemini session expiring; finishing the current reply": "جلسة Gemini توشك على الانتهاء؛ جارٍ إكمال الرد الحالي", + "Gemini rejected the voice session. Start voice again to request a fresh session.": "رفض Gemini الجلسة الصوتية. ابدأ الصوت مجددًا لطلب جلسة جديدة.", + "Start voice again for a fresh session credential. If it repeats, check Gemini model and API access.": "ابدأ الصوت مجددًا للحصول على بيانات اعتماد جلسة جديدة. إن تكرر ذلك، فتحقّق من نموذج Gemini ومن الوصول إلى API.", + "Gemini action history is full. Start voice again for a fresh session.": "سجل إجراءات Gemini ممتلئ. ابدأ الصوت مجددًا لجلسة جديدة.", + "Gemini requested too many simultaneous actions": "طلب Gemini إجراءات متزامنة كثيرة جدًا", + "Voice text command is too long": "نص الأمر الصوتي طويل جدًا", + "Gemini voice is not connected": "صوت Gemini غير متصل", + "Gemini interrupted input exceeded its buffer or wait limit. Start voice again.": "تجاوز الإدخال المقطوع لـ Gemini حد المخزن المؤقت أو الانتظار. ابدأ الصوت مجددًا.", + "Gemini Live connection is expiring. Start voice again for a new conversation.": "اتصال Gemini Live يوشك على الانتهاء. ابدأ الصوت مجددًا لمحادثة جديدة.", + "Gemini voice sessions have a time limit. When a session expires, start voice again for a new conversation.": "للجلسات الصوتية في Gemini حد زمني. عند انتهاء الجلسة، ابدأ الصوت مجددًا لمحادثة جديدة.", + "Stopped by voice": "أُوقف بأمر صوتي", + "Automatic stop is unavailable for this voice connection.": "الإيقاف التلقائي غير متاح لهذا الاتصال الصوتي.", + "Preview is off.": "المعاينة متوقفة.", + "Your choice applies now, but could not be saved.": "طُبّق اختيارك الآن، لكن تعذّر حفظه.", + "MINI": "مصغّر", + "standard": "القياسي", + "mini": "المصغّر", + "COST UNKNOWN": "التكلفة غير معروفة", + "ChatGPT OAuth session: {responses} response(s), {input} input and {output} output tokens, {captions} caption transcription(s) reported.": "جلسة ChatGPT OAuth: الاستجابات: {responses}، رموز الإدخال: {input}، رموز الإخراج: {output}، نسخ التسميات التوضيحية: {captions}.", + "USD cost and the API spend cap are unavailable for this auth mode.": "التكلفة بالدولار وحد إنفاق API غير متاحين في وضع المصادقة هذا.", + "Usage is incomplete because a response was still in flight when the session ended.": "بيانات الاستخدام غير مكتملة لأن استجابة كانت ما تزال قيد الإرسال عند انتهاء الجلسة.", + "Estimate is incomplete — a response was still in flight when the session ended, so its usage was never reported.": "التقدير غير مكتمل — كانت استجابة ما تزال قيد الإرسال عند انتهاء الجلسة، فلم يُبلَّغ عن استخدامها.", + "STANDARD": "قياسي", + "MIC": "ميكروفون", + "{n} aircraft": { + "zero": "{n} طائرة", + "one": "طائرة واحدة ({n})", + "two": "طائرتان ({n})", + "few": "{n} طائرات", + "many": "{n} طائرة", + "other": "{n} طائرة" + }, + "{n} military aircraft": { + "zero": "{n} طائرة عسكرية", + "one": "طائرة عسكرية واحدة ({n})", + "two": "طائرتان عسكريتان ({n})", + "few": "{n} طائرات عسكرية", + "many": "{n} طائرة عسكرية", + "other": "{n} طائرة عسكرية" + }, + "{n} ships": { + "zero": "{n} سفينة", + "one": "سفينة واحدة ({n})", + "two": "سفينتان ({n})", + "few": "{n} سفن", + "many": "{n} سفينة", + "other": "{n} سفينة" + }, + "{n} satellites": { + "zero": "{n} قمر صناعي", + "one": "قمر صناعي واحد ({n})", + "two": "قمران صناعيان ({n})", + "few": "{n} أقمار صناعية", + "many": "{n} قمرًا صناعيًا", + "other": "{n} قمر صناعي" + }, + "{n} launches": { + "zero": "{n} عملية إطلاق", + "one": "عملية إطلاق واحدة ({n})", + "two": "عمليتا إطلاق ({n})", + "few": "{n} عمليات إطلاق", + "many": "{n} عملية إطلاق", + "other": "{n} عملية إطلاق" + }, + "{n} earthquakes": { + "zero": "{n} زلزال", + "one": "زلزال واحد ({n})", + "two": "زلزالان ({n})", + "few": "{n} زلازل", + "many": "{n} زلزالًا", + "other": "{n} زلزال" + }, + "{n} fires": { + "zero": "{n} حريق", + "one": "حريق واحد ({n})", + "two": "حريقان ({n})", + "few": "{n} حرائق", + "many": "{n} حريقًا", + "other": "{n} حريق" + }, + "{n} fire perimeters": { + "zero": "{n} محيط حريق", + "one": "محيط حريق واحد ({n})", + "two": "محيطا حريق ({n})", + "few": "{n} محيطات حرائق", + "many": "{n} محيط حريق", + "other": "{n} محيط حريق" + }, + "{n} cyclones": { + "zero": "{n} إعصار", + "one": "إعصار واحد ({n})", + "two": "إعصاران ({n})", + "few": "{n} أعاصير", + "many": "{n} إعصارًا", + "other": "{n} إعصار" + }, + "{n} buses": { + "zero": "{n} حافلة", + "one": "حافلة واحدة ({n})", + "two": "حافلتان ({n})", + "few": "{n} حافلات", + "many": "{n} حافلة", + "other": "{n} حافلة" + }, + "{n} bike share": { + "zero": "{n} محطة دراجات مشتركة", + "one": "محطة دراجات مشتركة واحدة ({n})", + "two": "محطتا دراجات مشتركة ({n})", + "few": "{n} محطات دراجات مشتركة", + "many": "{n} محطة دراجات مشتركة", + "other": "{n} محطة دراجات مشتركة" + }, + "{n} flock cameras": { + "zero": "{n} كاميرا ALPR", + "one": "كاميرا ALPR واحدة ({n})", + "two": "كاميرتا ALPR ({n})", + "few": "{n} كاميرات ALPR", + "many": "{n} كاميرا ALPR", + "other": "{n} كاميرا ALPR" + }, + "{n} military bases": { + "zero": "{n} قاعدة عسكرية", + "one": "قاعدة عسكرية واحدة ({n})", + "two": "قاعدتان عسكريتان ({n})", + "few": "{n} قواعد عسكرية", + "many": "{n} قاعدة عسكرية", + "other": "{n} قاعدة عسكرية" + }, + "{n} datacenters": { + "zero": "{n} مركز بيانات", + "one": "مركز بيانات واحد ({n})", + "two": "مركزا بيانات ({n})", + "few": "{n} مراكز بيانات", + "many": "{n} مركز بيانات", + "other": "{n} مركز بيانات" + }, + "{n} dams": { + "zero": "{n} سد", + "one": "سد واحد ({n})", + "two": "سدّان ({n})", + "few": "{n} سدود", + "many": "{n} سدًا", + "other": "{n} سد" + }, + "{n} air quality": { + "zero": "{n} محطة جودة هواء", + "one": "محطة جودة هواء واحدة ({n})", + "two": "محطتا جودة هواء ({n})", + "few": "{n} محطات جودة هواء", + "many": "{n} محطة جودة هواء", + "other": "{n} محطة جودة هواء" + }, + "{n} results": { + "zero": "{n} نتيجة", + "one": "نتيجة واحدة ({n})", + "two": "نتيجتان ({n})", + "few": "{n} نتائج", + "many": "{n} نتيجة", + "other": "{n} نتيجة" + }, + "anywhere in the loaded data": "في أي مكان ضمن البيانات المحمّلة", + "in view": "في نطاق العرض", + "within {radius} of the view centre": "ضمن {radius} من مركز العرض", + "within {radius} of {place} (Contacts window)": "ضمن {radius} من {place} (نطاق «الأهداف»)", + "within {radius} of {place}": "ضمن {radius} من {place}", + "within {radius}": "ضمن {radius}", + "over {region}": "فوق {region}", + "At least {items}": "{items} على الأقل", + "{items} {scope}": "{items} {scope}", + "last 24 h": "آخر 24 س", + "past 30 d and upcoming": "آخر 30 يومًا والقادمة", + "the flights layer loads by viewport": "طبقة الرحلات تُحمَّل حسب منفذ العرض", + "distance is ground distance, not overhead": "المسافة أرضية حتى النقطة تحت القمر الصناعي، لا حتى القمر نفسه", + "the count is a lower bound because at least one layer reached its retained limit.": "العدد حد أدنى لأن طبقة واحدة على الأقل بلغت حد السجلات المحفوظة.", + "{label} off": "{label}: متوقف", + "{label} loading": "{label}: جارٍ التحميل", + "{label} error": "{label}: خطأ", + "counted the first {returned} loaded records": "احتُسبت أول {returned} من السجلات المحمّلة", + "counted {returned} of {total} loaded records": "احتُسب {returned} من {total} سجلًا محمّلًا", + "{layers} just turned on — still loading, counts will rise": "{layers}: فُعّل للتو — ما زال قيد التحميل، وستزداد الأعداد", + "Contacts panel snapshot at {time} — the same retained cohort supplies the card, speech, and follow-up memory": "لقطة لوحة «الأهداف» عند {time} — المجموعة المحفوظة نفسها تغذّي البطاقة والكلام وذاكرة الأسئلة اللاحقة", + "Contacts panel snapshot — the same retained cohort supplies the card, speech, and follow-up memory": "لقطة لوحة «الأهداف» — المجموعة المحفوظة نفسها تغذّي البطاقة والكلام وذاكرة الأسئلة اللاحقة", + "Fly below {km} km to a covered region": "انخفض إلى ما دون {km} كم فوق منطقة مغطاة", + "No feed here yet · {n} regions available": { + "zero": "لا مصدر بيانات هنا بعد · {n} منطقة متاحة", + "one": "لا مصدر بيانات هنا بعد · منطقة واحدة متاحة ({n})", + "two": "لا مصدر بيانات هنا بعد · منطقتان متاحتان ({n})", + "few": "لا مصدر بيانات هنا بعد · {n} مناطق متاحة", + "many": "لا مصدر بيانات هنا بعد · {n} منطقة متاحة", + "other": "لا مصدر بيانات هنا بعد · {n} منطقة متاحة" + }, + "degraded": "متدهور", + "stale": "متقادم", + "partial": "جزئي", + "fallback": "بديل", + "unavailable": "غير متاح", + "Not answered: {layers}": "بلا استجابة: {layers}", + "Toggle voice control": "تشغيل التحكم الصوتي أو إيقافه", + "Activate to toggle voice": "فعّل لتشغيل الصوت أو إيقافه", + "Voice active": "الصوت نشط", + "Voice could not be started.": "تعذّر بدء الصوت.", + "the active voice session": "الجلسة الصوتية النشطة", + "{value} feet": "{value} قدم", + "Fire · FRP {frp} MW": "حريق · FRP {frp} MW", + "The flights layer is not enabled": "طبقة الرحلات غير مفعّلة", + "The military layer is not enabled": "طبقة الرحلات العسكرية غير مفعّلة", + "The satellites layer is not enabled": "طبقة الأقمار الصناعية غير مفعّلة", + "The ais-live-vessels layer is not enabled": "طبقة سفن AIS غير مفعّلة", + "Could not enable the requested layer": "تعذّر تفعيل الطبقة المطلوبة", + "Could not disable the requested layer": "تعذّر إيقاف الطبقة المطلوبة", + "Radio layer unavailable": "طبقة الراديو غير متاحة", + "Camera navigation is unavailable in the current view": "التنقل بالكاميرا غير متاح في العرض الحالي", + "Camera navigation policy unavailable": "سياسة التنقل بالكاميرا غير متاحة", + "Nearest-aircraft selection supports Flights or Military Flights only": "اختيار أقرب طائرة يدعم الرحلات أو الرحلات العسكرية فقط", + "Nearest-aircraft selection needs a preset, place name, or latitude and longitude": "اختيار أقرب طائرة يحتاج إلى إعداد مسبق أو اسم مكان أو خطَّي عرض وطول", + "Could not arrive at the requested place": "تعذّر الوصول إلى المكان المطلوب", + "The nearest airborne aircraft could not be selected": "تعذّر اختيار أقرب طائرة في الجو", + "No flights within {radius} of the current view": "لا توجد رحلات ضمن {radius} من العرض الحالي", + "No military within {radius} of the current view": "لا توجد رحلات عسكرية ضمن {radius} من العرض الحالي", + "No satellites within {radius} of the current view": "لا توجد أقمار صناعية ضمن {radius} من العرض الحالي", + "No vessels within {radius} of the current view": "لا توجد سفن ضمن {radius} من العرض الحالي", + "{layer} is enabled on the {source} feed, but no airborne aircraft is loaded in the {place} view yet": "«{layer}» مفعّلة على مصدر {source}، لكن لم تُحمَّل بعد أي طائرة في الجو في عرض «{place}»", + "{layer} is enabled, but no airborne aircraft is loaded in the {place} view yet": "«{layer}» مفعّلة، لكن لم تُحمَّل بعد أي طائرة في الجو في عرض «{place}»", + "{layer} is enabled, but its aircraft feed is unavailable": "«{layer}» مفعّلة، لكن مصدر بيانات الطائرات الخاص بها غير متاح", + "{layer} is enabled, but its destination refresh did not complete": "«{layer}» مفعّلة، لكن تحديثها عند الوجهة لم يكتمل", + "{layer} is enabled, but {source} is unavailable": "«{layer}» مفعّلة، لكن {source} غير متاح", + "Could not arrive at {place}": "تعذّر الوصول إلى {place}", + "{name} is no longer loaded": "{name} لم يعد محمَّلًا", + "Unknown target layer: {target}": "طبقة هدف غير معروفة: {target}", + "nominal": "طبيعي", + "{label} on": "{label}: مفعّل", + "Frame aircraft": "إظهار الطائرات في الإطار", + "Frame military aircraft": "إظهار الطائرات العسكرية في الإطار", + "Frame ships": "إظهار السفن في الإطار", + "Frame satellites": "إظهار الأقمار الصناعية في الإطار", + "Frame contacts": "إظهار الأهداف في الإطار", + "{count} aircraft in frame": { + "zero": "{count} طائرة في الإطار", + "one": "طائرة واحدة ({count}) في الإطار", + "two": "طائرتان ({count}) في الإطار", + "few": "{count} طائرات في الإطار", + "many": "{count} طائرة في الإطار", + "other": "{count} طائرة في الإطار" + }, + "{count} military aircraft in frame": { + "zero": "{count} طائرة عسكرية في الإطار", + "one": "طائرة عسكرية واحدة ({count}) في الإطار", + "two": "طائرتان عسكريتان ({count}) في الإطار", + "few": "{count} طائرات عسكرية في الإطار", + "many": "{count} طائرة عسكرية في الإطار", + "other": "{count} طائرة عسكرية في الإطار" + }, + "{count} ships in frame": { + "zero": "{count} سفينة في الإطار", + "one": "سفينة واحدة ({count}) في الإطار", + "two": "سفينتان ({count}) في الإطار", + "few": "{count} سفن في الإطار", + "many": "{count} سفينة في الإطار", + "other": "{count} سفينة في الإطار" + }, + "{count} satellites in frame": { + "zero": "{count} قمر صناعي في الإطار", + "one": "قمر صناعي واحد ({count}) في الإطار", + "two": "قمران صناعيان ({count}) في الإطار", + "few": "{count} أقمار صناعية في الإطار", + "many": "{count} قمرًا صناعيًا في الإطار", + "other": "{count} قمر صناعي في الإطار" + }, + "{count} contacts in frame": { + "zero": "{count} هدف في الإطار", + "one": "هدف واحد ({count}) في الإطار", + "two": "هدفان ({count}) في الإطار", + "few": "{count} أهداف في الإطار", + "many": "{count} هدفًا في الإطار", + "other": "{count} هدف في الإطار" + }, + "Nearest military aircraft": "أقرب الطائرات العسكرية", + "Nearest ships": "أقرب السفن", + "Nearest satellites": "أقرب الأقمار الصناعية", + "Nearest aircraft": "أقرب الطائرات", + "{first} and {second}": "{first} و{second}", + "Layer": "الطبقة", + "there": "هناك", + "Camera range {range}": "مدى الكاميرا {range}", + "Within {radius} of the view": "ضمن {radius} من العرض", + "Labels on": "التسميات مفعّلة", + "Framing uses the nearest 80 loaded contacts": "يعتمد الإطار على أقرب 80 هدفًا محمّلًا", + "{distance} from {location}": "{distance} من {location}", + "Altitude {altitude}": "الارتفاع {altitude}", + "{origin} to {destination}": "{origin} ← {destination}", + "from {origin}": "من {origin}", + "to {destination}": "إلى {destination}", + "Registration {registration}": "رقم التسجيل {registration}", + "View state": "حالة العرض", + "Marked {count} places": { + "zero": "عُلِّم {count} مكان", + "one": "عُلِّم مكان واحد ({count})", + "two": "عُلِّم مكانان ({count})", + "few": "عُلِّمت {count} أماكن", + "many": "عُلِّم {count} مكانًا", + "other": "عُلِّم {count} مكان" + }, + "Nothing marked": "لم يُعلَّم شيء", + "Not found: {places}": "لم يُعثر على: {places}", + "Tracing outlines": "جارٍ رسم المخططات", + "Frame flights": "إظهار الرحلات في الإطار", + "Frame military": "إظهار الرحلات العسكرية في الإطار", + "Frame vessels": "إظهار السفن في الإطار", + "Frame {target}": "إظهار {target} في الإطار", + "Zoom out to globe": "التصغير إلى الكرة الأرضية", + "Open data layers": "فتح طبقات البيانات", + "Open or close a panel": "فتح لوحة أو إغلاقها", + "Change context mode": "تغيير وضع السياق", + "Control cockpit": "التحكم في القمرة", + "Change visual style": "تغيير النمط البصري", + "Adjust HUD": "ضبط HUD", + "Adjust cyber sonar": "ضبط السونار السيبراني", + "Adjust detection overlay": "ضبط طبقة الكشف", + "Change map stack": "تغيير حزمة الخرائط", + "Adjust post-processing": "ضبط المعالجة اللاحقة", + "Control scene": "التحكم في المشهد", + "Control CCTV": "التحكم في CCTV", + "Control radio": "التحكم في الراديو", + "Track contact": "تتبّع الهدف", + "Stop tracking": "إيقاف التتبّع", + "Clear marks": "مسح العلامات", + "Move camera": "تحريك الكاميرا", + "Fly route": "التحليق على المسار", + "Analyst query": "استعلام تحليلي", + "Next ISS pass": "المرور التالي لمحطة الفضاء الدولية", + "Next satellite pass": "المرور التالي للقمر الصناعي", + "Mark the map": "التعليم على الخريطة", + "Mark {targets} +{more}": "تعليم {targets} +{more}", + "Mark {targets}": "تعليم {targets}", + "Fly to {place}": "الانتقال إلى {place}", + "Fly to Location": "الانتقال إلى موقع", + "Nearest aircraft to {place}": "أقرب طائرة إلى {place}", + "Nearest aircraft to Here": "أقرب طائرة إلى هنا", + "Layer on": "الطبقة مفعّلة", + "Layer off": "الطبقة متوقفة", + "Zoom out": "تصغير", + "Zoom in": "تكبير", + "Read the view": "قراءة العرض", + "Check view state": "التحقق من حالة العرض", + "Action": "الإجراء", + "Finding places": "جارٍ البحث عن الأماكن", + "Tracing outline": "جارٍ رسم المخطط", + "Looking up place": "جارٍ البحث عن المكان", + "Flying": "جارٍ الانتقال", + "Turning on layer": "جارٍ تفعيل الطبقة", + "Loading aircraft": "جارٍ تحميل الطائرات", + "Picking nearest": "جارٍ اختيار الأقرب", + "Working": "قيد التنفيذ", + "in progress": "قيد التنفيذ", + "done": "تم", + "failed": "فشل", + "cancelled": "أُلغي", + "Outline traced": "تم رسم المخطط", + "Outline unavailable": "المخطط غير متاح", + "Source: {label}": "المصدر: {label}", + "WORKING": "قيد التنفيذ", + "DONE": "تم", + "Recent speech": "الكلام الأخير", + "HERE": "هنا", + "KTS": "عقدة", + "FT": "قدم", + "FLT": "رحلات", + "MIL": "عسكري", + "SITE": "مواقع", + "WX": "طقس", + "MM": "مم", + "Weather data by Open-Meteo.com": "بيانات الطقس من Open-Meteo.com", + "Cockpit briefing pages": "صفحات إحاطة القمرة", + "SIG": "إشارات", + "LOCAL": "محلي", + "ESC EXIT": "ESC خروج", + "C TOGGLE": "C تبديل", + "Active weather products": "منتجات الطقس النشطة", + "RECENT IMAGERY": "الصور الحديثة", + "Imagery days in the box": "أيام الصور في المنطقة", + "Tune available internet radio stations": "ضبط محطات راديو الإنترنت المتاحة", + "DIRECTORY: RADIO BROWSER": "الدليل: RADIO BROWSER", + "Local RTL-SDR receiver": "جهاز استقبال RTL-SDR المحلي", + "LOCAL RTL-SDR": "RTL-SDR المحلي", + "Chrome/Edge · WebUSB · one local tuner shared by FM and the Local ADS-B layer.": "Chrome/Edge · WebUSB · موالف محلي واحد مشترك بين FM وطبقة «ADS-B المحلي».", + "Use your location for faster ADS-B position decoding": "استخدم موقعك لتسريع فك ترميز مواضع ADS-B", + "CHANGE DEVICE": "تغيير الجهاز", + "Choose a different RTL-SDR or receiver channel": "اختر جهاز RTL-SDR آخر أو قناة استقبال أخرى", + "RTL-SDR receiver mode": "وضع جهاز استقبال RTL-SDR", + "GAIN": "الكسب", + "RTL-SDR tuner gain for the current mode": "كسب موالف RTL-SDR للوضع الحالي", + "AUTO": "تلقائي", + "MSG/S": "رسالة/ث", + "HEARD": "المسموعة", + "POSITIONED": "محددة الموضع", + "FM MHZ": "FM MHz", + "TUNE": "ضبط", + "Seek broadcast FM stations": "البحث عن محطات بث FM", + "◀ SEEK": "◀ بحث", + "SEEK ▶": "بحث ▶", + "SDR VOL": "صوت SDR", + "Local SDR volume": "مستوى صوت SDR المحلي", + "Cyber": "سيبراني", + "Sonar": "السونار", + "Cyber sonar contact scanner": "ماسح الأهداف بالسونار السيبراني", + "Rings": "الحلقات", + "Sonar ring count": "عدد حلقات السونار", + "Range": "المدى", + "Sonar ring range": "مدى حلقات السونار", + "Power": "القوة", + "Sonar intensity": "شدة السونار", + "Opacity": "العتامة", + "Cyber contact and label opacity": "عتامة الأهداف والتسميات في النمط السيبراني", + "Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "الحد الأدنى لعتامة نقاط الخريطة والأيقونات والنماذج والأقواس والتسميات بين مرّات السونار", + "Sector": "القطاع", + "Sonar sector width": "عرض قطاع السونار", + "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "ارسم على العالم — انقر على الرؤوس، وانقر نقرًا مزدوجًا أو اضغط Enter للإنهاء، وEsc للإلغاء", + "Shape": "الشكل", + "Shape to draw": "الشكل المراد رسمه", + "Area": "مساحة", + "Line": "خط", + "Pin": "دبوس", + "Label (optional)": "التسمية (اختيارية)", + "Label for the drawn shape": "تسمية الشكل المرسوم", + "Colour of the drawn shape": "لون الشكل المرسوم", + "Primary": "أساسي", + "Amber": "كهرماني", + "Cyan": "سماوي", + "Green": "أخضر", + "Red": "أحمر", + "Clear": "مسح", + "Remove every mark from the board": "إزالة كل العلامات من اللوحة", + "Show your own GeoJSON, KML, KMZ or GPX files on the globe (or drop them onto it). File bytes stay on this device; overlays can appear in map screenshots shared with voice.": "اعرض ملفات GeoJSON أو KML أو KMZ أو GPX الخاصة بك على الكرة الأرضية (أو أفلتها عليها). تبقى بيانات الملفات على هذا الجهاز؛ وقد تظهر الطبقات في لقطات الخريطة التي تُشارك مع المساعد الصوتي.", + "Import": "استيراد", + "Choose GeoJSON, KML, KMZ or GPX files": "اختر ملفات GeoJSON أو KML أو KMZ أو GPX", + "Imported files": "الملفات المستوردة", + "ACQUIRING FRAME": "جارٍ التقاط الإطار", + "STREET LEVEL": "مستوى الشارع", + "Turn Street Level on or off": "تشغيل «مستوى الشارع» أو إيقافه", + "Show the street-level view full screen (Esc shrinks it)": "عرض صورة مستوى الشارع بملء الشاشة (Esc للتصغير)", + "Image fit": "ملاءمة الصورة", + "FIT": "احتواء", + "Fit: show the whole photo, with dark bars where its shape differs from the frame": "احتواء: عرض الصورة كاملة، مع أشرطة داكنة حيث يختلف شكلها عن الإطار", + "FILL": "ملء", + "Fill: fill the frame edge to edge, cropping the photo": "ملء: ملء الإطار من حافة إلى حافة مع اقتصاص الصورة", + "Close the image and deselect it on the map": "إغلاق الصورة وإلغاء تحديدها على الخريطة", + "Close the street-level image": "إغلاق صورة مستوى الشارع", + "Street-level viewer": "عارض مستوى الشارع", + "Open this image on the provider's site": "فتح هذه الصورة على موقع المزوّد", + "Imagery providers": "مزوّدو الصور", + "PROVIDERS": "المزوّدون", + "Imagery filters": "مرشحات الصور", + "IMAGERY": "الصور", + "Panorama filter": "مرشح البانوراما", + "ALL": "الكل", + "FLAT": "مسطحة", + "SINCE": "منذ", + "Toggle straight-down and tilted map views": "التبديل بين العرض العمودي والمائل للخريطة", + "Reset map to north up": "إعادة توجيه الخريطة بحيث يكون الشمال للأعلى", + "Reset map bearing to north": "إعادة اتجاه الخريطة إلى الشمال" } From 0b928b6810a046c598c89d1bd04e314fbe2dcbd5 Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Wed, 28 Oct 2026 12:55:20 +0400 Subject: [PATCH 018/237] i18n(ar): register Arabic as the first right-to-left language MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add ar to LOCALES (picker name العربية) and RTL_LOCALES, so turns rtl; any ar-* tag maps to it. - Intl formatters get ar-u-nu-latn: numbers and dates keep Western digits like the catalog, whatever the browser's ICU picks for Arabic regions. - HUD quantities keep a space before an Arabic unit (2069.0 كم), as in Chinese, instead of running digits into the word. - Codes and product names that stay Latin go to same-as-english.json. Co-Authored-By: Claude Opus 5.5 --- scripts/package-boundaries.json | 43 ++++++++++++++ src/hudLocalityFormat.js | 8 ++- src/i18n/ar-display.test.mjs | 101 ++++++++++++++++++++++++++++++++ src/i18n/i18n.test.mjs | 7 +++ src/i18n/index.js | 12 +++- src/i18n/locale.js | 26 +++++++- src/i18n/same-as-english.json | 34 +++++++++++ src/ui/localePicker.test.mjs | 16 ++++- 8 files changed, 239 insertions(+), 8 deletions(-) create mode 100644 src/i18n/ar-display.test.mjs diff --git a/scripts/package-boundaries.json b/scripts/package-boundaries.json index 9f06f73f69..3470c1e8f8 100644 --- a/scripts/package-boundaries.json +++ b/scripts/package-boundaries.json @@ -439,6 +439,7 @@ "src/ui/slider.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -479,6 +480,7 @@ "src/localRequestGate.mjs", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -509,6 +511,7 @@ "src/data/layerSnapshot.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -531,6 +534,7 @@ "src/app/stateChannel.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -548,6 +552,7 @@ "src/ui/radioTunerModel.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -568,6 +573,7 @@ "src/ui/cctvPresentation.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -595,6 +601,7 @@ "src/ui/panelRailGeometry.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -630,6 +637,7 @@ "src/ui/panelRailGeometry.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -647,6 +655,7 @@ "src/ui/actionButton.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -806,6 +815,7 @@ "src/data/cameraArrival.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -928,6 +938,7 @@ "src/data/cameraArrival.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -996,6 +1007,7 @@ "src/data/modelEligibility.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1045,6 +1057,7 @@ "src/data/modelEligibility.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1108,6 +1121,7 @@ "src/data/inputOwnership.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1138,6 +1152,7 @@ "src/maps/imageryHost.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1169,6 +1184,7 @@ "src/data/inputOwnership.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1200,6 +1216,7 @@ "src/data/inputOwnership.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1234,6 +1251,7 @@ "src/data/inputOwnership.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1277,6 +1295,7 @@ "src/data/infrastructureOverlayEntry.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1314,6 +1333,7 @@ "src/ui/panelRailGeometry.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1365,6 +1385,7 @@ "src/layers/traffic/roadModes.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1395,6 +1416,7 @@ "src/data/cameraSensitivity.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1444,6 +1466,7 @@ "src/layers/cctv/sourcePolicy.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1508,6 +1531,7 @@ "scripts/qa-street-level.mjs", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1538,6 +1562,7 @@ "src/layers/alpr/floors.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1579,6 +1604,7 @@ "src/data/inputOwnership.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1602,6 +1628,7 @@ "src/data/inputOwnership.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1659,6 +1686,7 @@ "src/maps/imageryHost.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -1722,6 +1750,7 @@ "src/voice/pointerReticle.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -2605,6 +2634,7 @@ "src/app/embed.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3190,6 +3220,7 @@ "src/sources/infrastructureData.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3301,6 +3332,7 @@ "src/app/stateChannel.js", "src/data/cameraArrival.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3325,6 +3357,7 @@ "src/ui/uiLifetime.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3362,6 +3395,7 @@ "src/i18n/marker.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3389,6 +3423,7 @@ "src/ui/uiLifetime.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3481,6 +3516,7 @@ "src/data/routeSteps.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3537,6 +3573,7 @@ "src/voice/pointerReticle.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3792,6 +3829,7 @@ "src/sources/capability.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3836,6 +3874,7 @@ "src/sources/transitHistory.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3890,6 +3929,7 @@ "src/layers/perimeters/inciweb.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3907,6 +3947,7 @@ "src/layers/gnss/records.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -3967,6 +4008,7 @@ "src/i18n/marker.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", @@ -4164,6 +4206,7 @@ "src/i18n/marker.js", "src/i18n/index.js", "src/i18n/locale.js", + "src/i18n/locales/ar.json", "src/i18n/locales/es.json", "src/i18n/locales/ru.json", "src/i18n/locales/zh-CN.json", diff --git a/src/hudLocalityFormat.js b/src/hudLocalityFormat.js index 697075a82e..23eea0ddd3 100644 --- a/src/hudLocalityFormat.js +++ b/src/hudLocalityFormat.js @@ -8,6 +8,12 @@ import { formatNumber, getLocale, t } from './i18n/index.js'; import { unitLabel } from './ui/unitLabels.js'; import { localizePlaceName } from './ui/placeNames.js'; +/** + * Scripts without letter case keep a space before the unit: `13 km`, `13 كم`. + * Arabic would otherwise run the digits into the word. + */ +const UNCASED_UNITS = /^(?:zh-|ar$)/; + /** An upper-case HUD quantity such as `13KM` / `13КМ`, in the active language. */ export function hudQuantity(value, unit, digits = 0) { const number = formatNumber(value, { @@ -16,7 +22,7 @@ export function hudQuantity(value, unit, digits = 0) { maximumFractionDigits: digits, }); const label = unitLabel(unit); - if (getLocale().startsWith('zh-')) + if (UNCASED_UNITS.test(getLocale())) return label ? `${number} ${label}` : number; return `${number}${label.toUpperCase()}`; } diff --git a/src/i18n/ar-display.test.mjs b/src/i18n/ar-display.test.mjs new file mode 100644 index 0000000000..c481fc70da --- /dev/null +++ b/src/i18n/ar-display.test.mjs @@ -0,0 +1,101 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { formatDate, formatNumber, getLocale, setLocale, t, tn } from './index.js'; +import { + applyDocumentLanguage, + intlLocale, + LOCALE_STORAGE_KEY, + resolveLocale, +} from './locale.js'; +import { hudQuantity, LOCALIZED_LOCALITY } from '../hudLocalityFormat.js'; +import { formatCockpitDistance } from '../ui/cockpitPresentation.js'; +import { READOUT_WORDS } from '../layers/recentImagery/display.js'; + +test('Arabic resolves from URL, saved preference and browser language', () => { + assert.equal( + resolveLocale({ + location: { search: '?lang=ar-EG' }, + storage: { getItem: () => 'en' }, + languages: ['en'], + }), + 'ar', + ); + assert.equal( + resolveLocale({ + location: { search: '' }, + storage: { + getItem: (key) => (key === LOCALE_STORAGE_KEY ? 'ar' : null), + }, + languages: ['en'], + }), + 'ar', + ); + assert.equal( + resolveLocale({ + location: { search: '' }, + storage: { getItem: () => null }, + languages: ['ar-SA', 'en'], + }), + 'ar', + ); +}); + +test('Arabic turns the page right-to-left; other languages stay left-to-right', () => { + const doc = { documentElement: {} }; + applyDocumentLanguage(doc, 'ar'); + assert.deepEqual(doc.documentElement, { lang: 'ar', dir: 'rtl' }); + applyDocumentLanguage(doc, 'zh-CN'); + assert.deepEqual(doc.documentElement, { lang: 'zh-CN', dir: 'ltr' }); +}); + +test('Arabic formats with Western digits whatever ICU defaults to', () => { + assert.equal(intlLocale('ar'), 'ar-u-nu-latn'); + assert.equal(intlLocale('ru'), 'ru'); + const previous = getLocale(); + try { + setLocale('ar'); + assert.equal(formatNumber(1234.5), '1,234.5'); + assert.equal( + formatDate(Date.UTC(2026, 7, 26), { + day: 'numeric', + month: 'long', + year: 'numeric', + timeZone: 'UTC', + }), + '26 أغسطس 2026', + ); + assert.doesNotMatch(formatNumber(9876543210), /[٠-٩]/); + } finally { + setLocale(previous); + } +}); + +test('Arabic uses all six plural forms and spaced HUD units', () => { + const previous = getLocale(); + try { + setLocale('ar'); + assert.deepEqual( + [0, 1, 2, 3, 11, 100].map((n) => + tn(n, '{count} SOURCE', '{count} SOURCES'), + ), + [ + '0 مصدر', + 'مصدر واحد (1)', + 'مصدران (2)', + '3 مصادر', + '11 مصدرًا', + '100 مصدر', + ], + ); + assert.equal(hudQuantity(2069, 'km', 1), '2069.0 كم'); + assert.equal(formatCockpitDistance(14000), '14 كم'); + assert.equal( + LOCALIZED_LOCALITY.sector({ latDeg: 21.33, lonDeg: -77.5 }), + 'القطاع 21.33ش 77.50غ', + ); + assert.equal(READOUT_WORDS.daysAgo(9), 'قبل 9 أيام'); + assert.equal(t('SAVE KEYS'), 'حفظ المفاتيح'); + } finally { + setLocale(previous); + } +}); diff --git a/src/i18n/i18n.test.mjs b/src/i18n/i18n.test.mjs index 1b421f2ff7..225034b85b 100644 --- a/src/i18n/i18n.test.mjs +++ b/src/i18n/i18n.test.mjs @@ -47,6 +47,9 @@ test('normalizeLocale folds regional variants and rejects unshipped tags', () => assert.equal(normalizeLocale('zh-Hant-CN'), 'zh-Hant'); assert.equal(normalizeLocale('zh_HK'), 'zh-Hant'); assert.equal(normalizeLocale('zh-MO'), 'zh-Hant'); + assert.equal(normalizeLocale('ar'), 'ar'); + assert.equal(normalizeLocale('ar-EG'), 'ar'); + assert.equal(normalizeLocale(' AR_sa '), 'ar'); assert.equal(normalizeLocale(undefined), null); }); @@ -102,6 +105,10 @@ test('applyDocumentLanguage sets lang and dir', () => { const doc = { documentElement: {} }; applyDocumentLanguage(doc, 'ru-RU'); assert.deepEqual(doc.documentElement, { lang: 'ru', dir: 'ltr' }); + applyDocumentLanguage(doc, 'ar-EG'); + assert.deepEqual(doc.documentElement, { lang: 'ar', dir: 'rtl' }); + applyDocumentLanguage(doc, 'en'); + assert.deepEqual(doc.documentElement, { lang: 'en', dir: 'ltr' }); }); test('t() returns English text in English and translates in Russian', () => { diff --git a/src/i18n/index.js b/src/i18n/index.js index 6fc4becc96..8e1b248396 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -13,15 +13,23 @@ // `npm run i18n` keeps the catalogs in step with the code. Guide: docs/I18N.md. import { DEFAULT_LOCALE, + intlLocale, normalizeLocale, writeStoredLocale, } from './locale.js'; +import ar from './locales/ar.json' with { type: 'json' }; import es from './locales/es.json' with { type: 'json' }; import ru from './locales/ru.json' with { type: 'json' }; import zhCN from './locales/zh-CN.json' with { type: 'json' }; import zhHant from './locales/zh-Hant.json' with { type: 'json' }; -const CATALOGS = Object.freeze({ es, ru, 'zh-CN': zhCN, 'zh-Hant': zhHant }); +const CATALOGS = Object.freeze({ + ar, + es, + ru, + 'zh-CN': zhCN, + 'zh-Hant': zhHant, +}); let currentLocale = DEFAULT_LOCALE; @@ -157,7 +165,7 @@ function cachedFormatter(kind, Constructor, options) { const cacheKey = `${kind}|${currentLocale}|${options ? JSON.stringify(options) : ''}`; let formatter = formatterCache.get(cacheKey); if (!formatter) { - formatter = new Constructor(currentLocale, options); + formatter = new Constructor(intlLocale(currentLocale), options); formatterCache.set(cacheKey, formatter); } return formatter; diff --git a/src/i18n/locale.js b/src/i18n/locale.js index 55ed711634..23a3e0349f 100644 --- a/src/i18n/locale.js +++ b/src/i18n/locale.js @@ -8,11 +8,19 @@ export const LOCALE_STORAGE_KEY = 'gev:locale:v1'; export const DEFAULT_LOCALE = 'en'; /** Shipped locales; order does not matter. Adding one: docs/TRANSLATORS.md. */ -export const LOCALES = Object.freeze(['en', 'es', 'ru', 'zh-CN', 'zh-Hant']); +export const LOCALES = Object.freeze([ + 'en', + 'ar', + 'es', + 'ru', + 'zh-CN', + 'zh-Hant', +]); /** Each locale named in its own language, for the selector. */ export const LOCALE_NAMES = Object.freeze({ en: 'English', + ar: 'العربية', es: 'Español', ru: 'Русский', 'zh-CN': '中文(简体)', @@ -20,10 +28,24 @@ export const LOCALE_NAMES = Object.freeze({ }); /** Right-to-left locales. */ -const RTL_LOCALES = Object.freeze([]); +const RTL_LOCALES = Object.freeze(['ar']); + +/** + * Tags for Intl formatters where the locale code alone is not enough. Arabic + * keeps Western digits (0–9) like its catalog: ICU picks Arabic-Indic digits + * (٠–٩) for some Arabic regions and browsers, and a HUD that mixes both + * misreads. + */ +const INTL_TAGS = Object.freeze({ ar: 'ar-u-nu-latn' }); + +/** The tag to hand Intl.NumberFormat, DateTimeFormat and the like. */ +export function intlLocale(locale) { + return INTL_TAGS[locale] ?? locale; +} /** * Map any language tag to a shipped locale: 'ru-RU' and 'RU' → 'ru', + * 'ar-EG' and 'ar-SA' → 'ar', * 'zh', 'zh-CN' and 'zh-Hans-SG' → 'zh-CN'; * 'zh-Hant', 'zh-TW', 'zh-HK' and 'zh-MO' → 'zh-Hant'. * @returns {string|null} diff --git a/src/i18n/same-as-english.json b/src/i18n/same-as-english.json index 83c8897d83..e556245541 100644 --- a/src/i18n/same-as-english.json +++ b/src/i18n/same-as-english.json @@ -1,4 +1,38 @@ { + "ar": [ + "1090 MHz", + "978 MHz UAT", + "AIS: --", + "AIS: {name}", + "BRG {value}°", + "BRG —", + "CAL {value}", + "CAL · {badge}", + "CCTV", + "CRS {value}°", + "CRT", + "FLIR", + "FOV", + "FOV {value}°", + "GEO", + "GOOGLE STREET VIEW", + "Google Street View", + "HDG", + "HDG {value}°", + "Ironbow", + "Landsat 8/9", + "NVG", + "REC", + "S2 GhostMaps", + "SQUAWK {code} · {status}", + "SRC {value}", + "Sentinel-2", + "WHOT/BHOT", + "dB", + "hPa", + "{source} HTTP {status}", + "▲ {frp} MW" + ], "es": [ "1090 MHz", "978 MHz UAT", diff --git a/src/ui/localePicker.test.mjs b/src/ui/localePicker.test.mjs index 0576428272..630d954924 100644 --- a/src/ui/localePicker.test.mjs +++ b/src/ui/localePicker.test.mjs @@ -40,7 +40,7 @@ test('the current language comes first, the rest by their own names', () => { nativeNames: LOCALE_NAMES, }), ), - ['ru', 'en', 'es', 'zh-CN', 'zh-Hant'], + ['ru', 'en', 'es', 'ar', 'zh-CN', 'zh-Hant'], ); assert.deepEqual( codes( @@ -50,7 +50,7 @@ test('the current language comes first, the rest by their own names', () => { nativeNames: LOCALE_NAMES, }), ), - ['es', 'en', 'ru', 'zh-CN', 'zh-Hant'], + ['es', 'en', 'ru', 'ar', 'zh-CN', 'zh-Hant'], ); assert.deepEqual( codes( @@ -60,7 +60,17 @@ test('the current language comes first, the rest by their own names', () => { nativeNames: LOCALE_NAMES, }), ), - ['en', 'es', 'ru', 'zh-CN', 'zh-Hant'], + ['en', 'es', 'ru', 'ar', 'zh-CN', 'zh-Hant'], + ); + assert.deepEqual( + codes( + buildLocaleOptions({ + locales: LOCALES, + current: 'ar', + nativeNames: LOCALE_NAMES, + }), + ), + ['ar', 'en', 'es', 'ru', 'zh-CN', 'zh-Hant'], ); const rows = buildLocaleOptions({ locales: MANY, From 06370d8676d6325756d6c82bb3dd12067d74f2da Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Wed, 28 Oct 2026 13:28:23 +0400 Subject: [PATCH 019/237] i18n(ar): mirror the layout right to left MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The title, style indicator and both rails swap sides in RTL through logical properties (inset-inline-*, margin-inline-*, border-inline-start); LTR computes the same values. The Display/Context rail keeps its physical `right` for the credit-clearance model and swaps in rtl.css above 720px. - rtl.css: no letter-spacing on Arabic (it tears joined letters apart); Noto Sans Arabic leads the Arabic font stacks so words are not set in a fixed-pitch fallback; the intel HUD and cockpit instruments stay a left-to-right instrument overlay; media transport and the radio dial stay left to right; feed headlines and station names take their own direction; the moved rail's arrows flip. - isolate(): a quantity in RTL text (2.7 كم, -18.0°) is wrapped in first-strong isolates so its digits do not join a neighbouring Latin run. Co-Authored-By: Claude Opus 5.5 --- index.html | 2 +- src/i18n/ar-display.test.mjs | 10 ++- src/i18n/index.js | 10 +++ src/i18n/locale.js | 5 ++ src/ui/cctvCalibration.js | 7 +- src/ui/cyberTheme.test.mjs | 4 +- src/ui/styles/cockpit.css | 19 +++--- src/ui/styles/cyber.css | 14 ++-- src/ui/styles/foundation.css | 8 +-- src/ui/styles/layers.css | 12 ++-- src/ui/styles/mobile-shell.css | 2 +- src/ui/styles/responsive.css | 6 +- src/ui/styles/rtl.css | 118 +++++++++++++++++++++++++++++++++ src/ui/unitLabels.js | 4 +- style.css | 1 + 15 files changed, 183 insertions(+), 39 deletions(-) create mode 100644 src/ui/styles/rtl.css diff --git a/index.html b/index.html index 26cf734fb7..86e5fd6933 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@ - + + + +

SHOTS

- - + +
+

Click a shot to select it, double-click to rename.

+

PREVIEW

- - - + + +
-
- - - +

SAVE & SHARE

+
+ + +
0%
-
Ready
+
Ready
From 452292001ad0d3b5a060be3ee87ee65aa33dde10 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 29 Oct 2026 11:32:27 +0000 Subject: [PATCH 073/237] Add the changelog fragment for the Authoring panel --- changelog.d/1472-authoring-panel.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog.d/1472-authoring-panel.md diff --git a/changelog.d/1472-authoring-panel.md b/changelog.d/1472-authoring-panel.md new file mode 100644 index 0000000000..cec54b18ed --- /dev/null +++ b/changelog.d/1472-authoring-panel.md @@ -0,0 +1,4 @@ +- Rename the Scenes panel to Authoring and lay it out in steps (Scene, Shots, + Preview, Save & share) with larger, higher-contrast text, numbered shots, a + tooltip on every action and buttons that are disabled when they would do + nothing (asturksever, #1472). From 4192a6f87d965b6b96395250543bf7396178d7c1 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 29 Oct 2026 11:48:52 +0000 Subject: [PATCH 074/237] Keep Authoring within its stack and theme, and cover its wiring - Keep the documented 72px / flex-grow 1 action sizing and the 360px panel width; the larger type applies to the Authoring panel only, so CCTV and Street Level buttons are unchanged. - Scope the primary and file-row styles to the panel so Cyber's shared button surface no longer overrides them. - Shorten the scene PLAY in Spanish and Russian so it does not break mid-word, and fix two translation inconsistencies. - Map the spoken name "authoring" to the panel. - Clear the has-shots marker when the controls are destroyed. - Test the idle button states through published changes, the PLAY translation context, and where the sharing row is placed. --- docs/CURRENT-STATE.md | 3 +- src/i18n/locales/es.json | 4 +- src/i18n/locales/ru.json | 2 +- src/i18n/locales/zh-Hant.json | 2 +- src/ui/sceneControls.js | 1 + src/ui/sceneControls.test.mjs | 141 ++++++++++++++++++++++++++++++++++ src/ui/styles/scenes.css | 18 ++--- src/voice/gevActions.js | 1 + 8 files changed, 157 insertions(+), 15 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 0e98ce774d..42865a09d9 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -1176,7 +1176,8 @@ The panel is titled Authoring and is laid out in four labelled steps: SCENE (picker on its own row, NEW SCENE, DELETE), SHOTS (+ CAPTURE SHOT, UPDATE SHOT, the numbered shot list and a select/rename hint), PREVIEW (PLAY, STOP, NEXT) and SAVE & SHARE (EXPORT, IMPORT, RUN LOG, then the EDIT DETAILS / SHARE SCENE row). -Every action has a tooltip, and the status line is a polite live region. Outside +Every button in the panel's step rows has a tooltip, and the status line is a +polite live region. Outside playback a button that would do nothing is disabled: DELETE and CAPTURE SHOT without a scene, UPDATE SHOT without a selected shot, PLAY and NEXT on a scene with no shots. During playback everything but STOP stays disabled as before. diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 6fd845182c..e9ec5a1c6f 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -3012,9 +3012,9 @@ "Add the current view, style and layers as the next shot": "Añade la vista, el estilo y las capas actuales como el siguiente plano", "Replace the selected shot with the current view": "Sustituye el plano seleccionado por la vista actual", "Click a shot to select it, double-click to rename.": "Haz clic en un plano para seleccionarlo y doble clic para cambiarle el nombre.", - "scene|PLAY": "REPRODUCIR", + "scene|PLAY": "REPROD.", "Play the whole scene from its first shot": "Reproduce toda la escena desde su primer plano", - "Stop playback (Esc)": "Detiene la reproducción (Esc)", + "Stop playback (Esc)": "Detén la reproducción (Esc)", "Play only the shot after the selected one": "Reproduce solo el plano posterior al seleccionado", "SAVE & SHARE": "GUARDAR Y COMPARTIR", "Download every scene as a JSON file you can import later": "Descarga todas las escenas como un archivo JSON que puedes importar más tarde", diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index eacad5511f..8d0ed1f241 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -3081,7 +3081,7 @@ "Add the current view, style and layers as the next shot": "Добавить текущий вид, стиль и слои следующим кадром", "Replace the selected shot with the current view": "Заменить выбранный кадр текущим видом", "Click a shot to select it, double-click to rename.": "Щёлкните кадр, чтобы выбрать его, дважды — чтобы переименовать.", - "scene|PLAY": "ВОСПРОИЗВЕСТИ", + "scene|PLAY": "ПУСК", "Play the whole scene from its first shot": "Воспроизвести всю сцену с первого кадра", "Stop playback (Esc)": "Остановить воспроизведение (Esc)", "Play only the shot after the selected one": "Воспроизвести только кадр после выбранного", diff --git a/src/i18n/locales/zh-Hant.json b/src/i18n/locales/zh-Hant.json index 17a98338d1..33316d6ed0 100644 --- a/src/i18n/locales/zh-Hant.json +++ b/src/i18n/locales/zh-Hant.json @@ -2862,7 +2862,7 @@ "routing busy — too many routes at once": "路線服務繁忙:同時請求的路線過多", "route proxy error": "路線代理出錯", "AUTHORING": "創作", - "Create and edit scenes": "建立和編輯場景", + "Create and edit scenes": "創建和編輯場景", "SCENE": "場景", "Scene": "場景", "NEW SCENE": "新建場景", diff --git a/src/ui/sceneControls.js b/src/ui/sceneControls.js index 3be960b9d4..5976c2c059 100644 --- a/src/ui/sceneControls.js +++ b/src/ui/sceneControls.js @@ -272,6 +272,7 @@ export class SceneControls { ]) remove(); if (this.elements.shots) this.elements.shots.textContent = ''; + this.elements.panel?.classList.toggle('has-shots', false); presentSceneRuntime(this.elements.runtime, ''); this.setPlaybackActive(false); } diff --git a/src/ui/sceneControls.test.mjs b/src/ui/sceneControls.test.mjs index b150d36ed6..b31a1a6814 100644 --- a/src/ui/sceneControls.test.mjs +++ b/src/ui/sceneControls.test.mjs @@ -3,6 +3,8 @@ import assert from 'node:assert/strict'; import { createStateChannel } from '../app/stateChannel.js'; import { SceneControls } from './sceneControls.js'; import { SceneDirector } from '../scenes/director.js'; +import { mountSceneSharing } from './sceneSharing.js'; +import { setLocale } from '../i18n/index.js'; function fixture() { class Element extends EventTarget { @@ -466,3 +468,142 @@ test('Scene controls consume current state, preserve rows on progress, and unsub f.restore(); } }); + +test('Authoring refreshes idle buttons from published changes', () => { + const f = fixture(); + try { + f.owner.destroy(); + const channel = createStateChannel(() => f.state); + const owner = new SceneControls({ + read: () => f.state, + actions: f.actions, + elements: f.elements, + subscribe: (listener) => channel.subscribe(listener), + }); + const disabled = (name) => f.elements[name].disabled; + assert.equal(disabled('start'), false); + assert.equal(f.elements.panel.classList.contains('has-shots'), true); + + f.state.selectedShotId = null; + channel.publish({ type: 'selection-changed' }); + assert.equal(disabled('update'), true); + + f.state.scenes[0].shots = []; + channel.publish({ type: 'shot-deleted' }); + assert.equal(disabled('start'), true); + assert.equal(disabled('next'), true); + assert.equal(f.elements.panel.classList.contains('has-shots'), false); + + // A run that ends hands the buttons back with the idle rules applied. + f.state.running = true; + channel.publish({ type: 'buttons-changed' }); + assert.equal(disabled('capture'), true); + assert.equal(disabled('stop'), false); + f.state.running = false; + channel.publish({ type: 'buttons-changed' }); + assert.equal(disabled('capture'), false); + assert.equal(disabled('start'), true); + + f.state.scenes = []; + f.state.selectedSceneId = null; + channel.publish({ type: 'scene-deleted' }); + assert.equal(disabled('delete'), true); + assert.equal(disabled('capture'), true); + assert.equal(disabled('new'), false); + + f.state.scenes = [{ id: 'scene-b', title: 'B', shots: [{ id: 's' }] }]; + f.state.selectedSceneId = 'scene-b'; + f.state.selectedShotId = 's'; + channel.publish({ type: 'project-imported' }); + assert.equal(disabled('start'), false); + assert.equal(f.elements.panel.classList.contains('has-shots'), true); + + owner.destroy(); + assert.equal(f.elements.panel.classList.contains('has-shots'), false); + channel.destroy(); + } finally { + f.restore(); + } +}); + +test('Authoring PLAY uses the scene context, not the radio PLAY', (context) => { + context.after(() => setLocale('en')); + setLocale('es'); + const f = fixture(); + try { + assert.equal(f.elements.start.textContent, 'REPROD.'); + } finally { + f.restore(); + } +}); + +test('The sharing row sits under SAVE & SHARE, after the file row', () => { + const saved = globalThis.document; + const node = (className = '') => { + const element = { + className, + children: [], + dataset: {}, + parent: null, + addEventListener() {}, + removeEventListener() {}, + append(...items) { + for (const item of items) { + item.parent = element; + element.children.push(item); + } + }, + appendChild(item) { + element.append(item); + }, + after(item) { + const siblings = element.parent.children; + item.parent = element.parent; + siblings.splice(siblings.indexOf(element) + 1, 0, item); + }, + remove() { + const siblings = element.parent?.children; + if (siblings) siblings.splice(siblings.indexOf(element), 1); + }, + querySelector(selector) { + const name = selector.slice(1); + const walk = (at) => { + for (const child of at.children) { + if (child.className.split(' ').includes(name)) return child; + const found = walk(child); + if (found) return found; + } + return null; + }; + return walk(element); + }, + }; + return element; + }; + globalThis.document = { createElement: () => node() }; + try { + const panel = node(); + const inner = node('scene-panel-inner'); + const fileRow = node('scene-controls scene-file-controls'); + const status = node('scene-status'); + panel.append(inner); + inner.append(fileRow, status); + const dispose = mountSceneSharing({ edit() {}, share() {} }, panel); + const bar = inner.children[1]; + assert.equal(bar.className, 'scene-controls'); + assert.equal(inner.children[2], status); + assert.ok(bar.children.every((button) => button.title)); + dispose(); + assert.deepEqual(inner.children, [fileRow, status]); + + // Without the file row, the bar still lands inside the panel. + const plain = node(); + const plainInner = node('scene-panel-inner'); + plain.append(plainInner); + mountSceneSharing({ edit() {}, share() {} }, plain)(); + mountSceneSharing({ edit() {}, share() {} }, plain); + assert.equal(plainInner.children.length, 1); + } finally { + globalThis.document = saved; + } +}); diff --git a/src/ui/styles/scenes.css b/src/ui/styles/scenes.css index 975f37a574..f2bec04d9b 100644 --- a/src/ui/styles/scenes.css +++ b/src/ui/styles/scenes.css @@ -1,6 +1,6 @@ /* ── Scene Director Panel ───────────────────── */ #scene-panel { - --panel-expanded-width: 372px; + --panel-expanded-width: 360px; /* Secondary text in Authoring: dimmer than labels, but legible on the globe. */ --scene-quiet: rgba(232, 234, 237, 0.62); position: fixed; @@ -179,6 +179,9 @@ html:not([lang='en']) #scene-panel .scene-controls .scene-btn { .scene-btn { flex: 1; min-width: 72px; +} + +#scene-panel .scene-btn { font-size: 10px; padding: 8px 10px; } @@ -206,21 +209,16 @@ html:not([lang='en']) #scene-panel .scene-controls .scene-btn { margin-top: 2px; } -/* One primary action per step: CAPTURE SHOT and PLAY. */ -.scene-btn-primary:not(:disabled) { +/* One primary action per step: CAPTURE SHOT and PLAY. The panel id keeps + this above Cyber's shared button surface. */ +#scene-panel .scene-btn-primary:not(:disabled) { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); } -#scene-capture-btn { - flex: 2 1 0; -} - /* The file row is housekeeping; it stays quieter than the steps above. */ -.scene-file-controls .scene-btn { - flex: 1 1 0; - min-width: 0; +#scene-panel .scene-file-controls .scene-btn { font-size: 9px; background: transparent; } diff --git a/src/voice/gevActions.js b/src/voice/gevActions.js index 0a43f02f19..f0afc95279 100644 --- a/src/voice/gevActions.js +++ b/src/voice/gevActions.js @@ -98,6 +98,7 @@ const PANEL_ALIASES = new Map([ ['global context', 'global-context-panel'], ['right context', 'global-context-panel'], ['context right panel', 'global-context-panel'], + ['authoring', 'scene-panel'], ['scenes', 'scene-panel'], ['scene', 'scene-panel'], ['post processing', 'pp-toggles'], From 8543b7be43265f1c1b889e501f6b49975004c309 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 29 Oct 2026 11:53:15 +0000 Subject: [PATCH 075/237] Keep Directions reachable and tested in the Utilities panel Voice show_data_layers_menu opens the panel that holds the row, so asking for Directions opens UTILITIES and reports that panel, not a hidden row under Data Layers. In Cockpit the panel stays with Directions alone, as Data Layers does; only Draw and Import step aside there. Draw's options sit flat under its name instead of keeping the card that hung under a DISPLAY button, and its Shape label no longer takes DISPLAY's label column in other languages. Cyber marks Draw on with its red edge. LayerPanel routing, the voice panel choice, and the panel's order, mode and phone-sheet CSS gain tests that fail on the earlier code. The form-field and segmented-control gates open Utilities for Draw's controls, measuring Scenes and Utilities in turn since the left rail fits one tall panel. README, CONTRIBUTING, the PR template, CURRENT-STATE and comments now say UTILITIES for Draw and Import and list the Audio group, and two files outside the format scope lose an unrelated reflow. --- .github/pull_request_template.md | 3 +- CONTRIBUTING.md | 5 +- README.md | 4 +- docs/CURRENT-STATE.md | 16 +++-- scripts/qa-draw-tool.mjs | 4 +- scripts/qa-form-fields.mjs | 99 +++++++++++++++++---------- scripts/qa-geo-import.mjs | 4 +- scripts/qa-segmented-controls.mjs | 14 ++-- src/annotations/drawTool.js | 2 +- src/annotations/drawTool.test.mjs | 12 ++-- src/app/tools.js | 4 +- src/cockpitMarkup.test.mjs | 1 + src/panelStackLayout.test.mjs | 13 ++++ src/ui/cyberTheme.test.mjs | 17 +---- src/ui/geoFileImport.test.mjs | 2 +- src/ui/layerPanel.test.mjs | 109 ++++++++++++++++++++++++++++++ src/ui/styles/cockpit.css | 6 +- src/ui/styles/controls.css | 4 +- src/ui/styles/cyber.css | 12 +++- src/ui/styles/layers.css | 19 +++++- src/voice/gevActions.js | 19 ++++-- src/voice/gevActions.test.mjs | 47 +++++++++++++ 22 files changed, 319 insertions(+), 97 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e8c9f8bdfe..e1638adf1e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -34,7 +34,8 @@ If it's bigger, link to it instead. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7fe8ab766..9e285bdb09 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -170,8 +170,9 @@ template has a section for them. instead of attaching it. 3. **The proposed category.** Say which layer-panel group the layer belongs in. The groups are defined in `PANEL_GROUPS` in `src/ui/layerPanel.js` (today: - Movement, Cameras, Infrastructure, Events, Weather and Utilities). A layer - that isn't listed there falls under "Other layers". If none of the groups + Movement, Cameras, Infrastructure, Events, Weather and Audio, plus Utilities, + whose rows render in the separate UTILITIES panel). A layer that isn't + listed there falls under "Other layers". If none of the groups fits, propose a new one and explain why. 4. **The data source and licence.** Name the provider and endpoint, link its licence or terms, give the attribution shown in the app, and say whether it diff --git a/README.md b/README.md index 0a7509efad..2f47216a84 100644 --- a/README.md +++ b/README.md @@ -357,7 +357,7 @@ camera input stops rotation. > 🗣️ _"Outline the state of Texas."_ · _"Annotate the Texas State Capitol and its grounds"_ — it draws the **actual enclosing boundary**, not a circle. · _"How far is the Eiffel Tower from the Louvre?"_ — a connector arrow appears and it speaks the distance. Everything persists until you say _"clear the map."_ -**✍️ Or draw it yourself** — DISPLAY ▸ **Draw**: pick Area, Line or Pin, click the vertices on the real world, double-click to finish, label it. Same whiteboard, same persistence, no microphone needed. +**✍️ Or draw it yourself** — UTILITIES ▸ **Draw**: pick Area, Line or Pin, click the vertices on the real world, double-click to finish, label it. Same whiteboard, same persistence, no microphone needed. ![Zilker Park and Lady Bird Lake drawing onto the 3D city as persistent vector annotations, by voice](docs/media/01-voice-annotate-zilker.gif) @@ -415,7 +415,7 @@ Twenty layers and map sources. **Eighteen have a keyless path.** Some offer addi **Weather, keyless.** **Wind** animates 10 m forecast flow from NOAA GFS or ECMWF IFS, with an optional color field and a reading at map center. **Rain radar**, **Satellite clouds** and **Lightning density** are observations on one history timeline in the **WEATHER** panel (step back, **Play**, **Latest**); **Cyclone advisories** draw NHC and CPHC positions, forecast tracks and cones. On Google 3D Tiles the observed layers float above the city as translucent shells, sharpened around your view. -In the app, **Data Layers** groups them as Movement, Cameras, Infrastructure, Events, Weather and Utilities. +In the app, **Data Layers** groups them as Movement, Cameras, Infrastructure, Events, Weather and Audio; Directions sits in the separate **Utilities** panel with Draw and Import. **The basemap ladder — what each tier buys you:** diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 0c32219452..15c74e9267 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -133,17 +133,19 @@ field. Existing whole-link size limits still apply. ## Utilities panel — October 29, 2026 -UTILITIES is its own panel in the left column, after Data Layers and CCTV and -above Scenes (`#utilities-panel` in `src/ui/templates/layer-panels.html`). It +UTILITIES is its own panel in the left column, between Data Layers and Scenes +(`#utilities-panel` in `src/ui/templates/layer-panels.html`). It holds the Directions layer row, which `LayerPanel` renders into `#utilities-toggles` instead of the Data Layers list, and Draw and Import, which moved there from DISPLAY with their ids unchanged. Radio, formerly the other row under the Data Layers "Utilities" heading, stays in Data Layers under "Audio". The panel collapses and remembers its state like the other left -panels; share links do not carry it. It hides in clean view, recording and -Cockpit, and on a phone it sits collapsed in the Layers sheet under Data -Layers. The Directions, Draw and Import QA gates open it to reach their -controls. +panels; share links do not carry it. It hides in clean view and recording. In +Cockpit it stays with Directions alone, as Data Layers does; Draw and Import +hide there, as DISPLAY always did. Voice `show_data_layers_menu` for +Directions opens Utilities. On a phone it sits collapsed in the Layers sheet +under Data Layers. The Directions, Draw, Import, form-field and +segmented-control QA gates open it to reach their controls. ## God's Eye View in conversations — October 2, 2026 @@ -5411,7 +5413,7 @@ request viewbox and continues searching without that geographic preference. ### Manual Whiteboard Drawing (September 2026) - UTILITIES ▸ **Draw** turns the globe into a whiteboard drawn by hand. Pick a shape (Area, Line, Pin), click the vertices on the real world, type an optional label and pick a colour, and finish. **Keyboard contract, live only while Draw is on and never while you are typing in another field:** Enter finishes the shape (as does a double-click, and the two cannot both submit it — the session is replaced before the annotate call is awaited); Backspace removes the last vertex; Esc cancels the shape in progress, and a second Esc — Esc on an empty session — leaves draw mode. Typing in the label field keeps Backspace; Enter there also finishes. **Clear** wipes the board (the shape in progress and every placed mark), so removing marks does not require the console or the microphone. -- Runtime entry: `createApplicationTools` (`src/app/tools.js`, behind the `src/standalone/tools.js` shim) calls `initDrawTool({ viewer, annotations })` after `initAnnotations` and defers its `destroy()`, so disposing the shell returns every DOM listener, the Cesium handler, the preview data source, the borrowed click actions and the `window.__gevDrawTool` handle. Its markup is a DISPLAY-rail component template (`src/ui/templates/display-controls.html`), assembled into `index.html` at build time. That handle (`setActive`, `setShape`, `addVertex(lon, lat)`, `finish`, `cancel`, `clearAll`, `diagnostics`) is the no-mouse test seam. +- Runtime entry: `createApplicationTools` (`src/app/tools.js`, behind the `src/standalone/tools.js` shim) calls `initDrawTool({ viewer, annotations })` after `initAnnotations` and defers its `destroy()`, so disposing the shell returns every DOM listener, the Cesium handler, the preview data source, the borrowed click actions and the `window.__gevDrawTool` handle. Its markup lives in the UTILITIES panel's component template (`src/ui/templates/layer-panels.html`), assembled into `index.html` at build time. That handle (`setActive`, `setShape`, `addVertex(lon, lat)`, `finish`, `cancel`, `clearAll`, `diagnostics`) is the no-mouse test seam. - Contract: a finished shape is submitted through the SAME `annotationEngine.annotate()` the voice agent uses, with geometry supplied and `manual: true` (`type: area` + `ring`, `type: route` + `path`, `type: pin` + coordinates). `resolveSpec` short-circuits manual specs (`resolveManualSpec`) so no geocoder, Places or Overpass call is made. A drawn area is a real (not synthesized) outline and drapes solid; a drawn line is a `route` with `mode: 'manual'`, labelled with its length and never a travel time; a pin is a point. Drawn marks therefore render with the whiteboard look, persist, de-dup, appear in `.list()`, and clear with `clear_annotations` / `.clear()`. - **A vertex is a lon/lat, and the mark is DRAPED.** Clicks are picked through `pickWorldFromScreen` — one of two scene helpers the annotation resolver factory (`src/annotations/resolver.js`) exposes alongside `sampleGroundHeight`, so the app has ONE depth-aware pick cascade rather than a second written beside it — which returns the height the pick landed on as well as the coordinate, so the live preview hangs on the roof or hillside under the pointer instead of sinking to sea level. The world renderer draws areas and routes with `clampToGround`, so the height is dropped at finish in one place (`finishSpec`) rather than being carried downstream and discarded silently: what you get is the outline you drew, lying on the surface beneath it. - **Draped marks classify onto `ClassificationType.BOTH`** — terrain AND 3D tiles — not onto 3D tiles alone. With only `CESIUM_3D_TILE`, every area fill, area outline, route and arrow rendered to nothing on a keyless boot, where Cesium's own globe carries Esri/OSM imagery and there are no tiles to classify against; the labels appeared and the geometry did not. That hit spoken annotations exactly as hard as hand-drawn ones. `scripts/qa-draw-tool.mjs` counts the mark's own colour in the rendered frame before and after a shape is finished, on a keyed AND a keyless server, so "the board says there is a mark" can no longer pass for "the mark is on screen". diff --git a/scripts/qa-draw-tool.mjs b/scripts/qa-draw-tool.mjs index e055f4a8f7..8a9a01b0ef 100644 --- a/scripts/qa-draw-tool.mjs +++ b/scripts/qa-draw-tool.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -/** Rendered acceptance for DISPLAY ▸ Draw: real clicks, real keys, real teardown. */ +/** Rendered acceptance for UTILITIES ▸ Draw: real clicks, real keys, real teardown. */ import fs from 'node:fs'; import path from 'node:path'; import puppeteer from 'puppeteer'; @@ -212,7 +212,7 @@ try { { timeout: 10_000 }, ); check( - 'the Draw control is on the DISPLAY rail and starts off', + 'the Draw control is in the UTILITIES panel and starts off', await page.evaluate(() => { const toggle = document.getElementById('draw-toggle'); return ( diff --git a/scripts/qa-form-fields.mjs b/scripts/qa-form-fields.mjs index 11bdffc2bb..52cd059b75 100644 --- a/scripts/qa-form-fields.mjs +++ b/scripts/qa-form-fields.mjs @@ -275,6 +275,25 @@ try { await page.evaluate(() => window.__qaFormCalls.length === 2), ); + // The left rail fits one tall panel at a time, so Scenes and Utilities + // take turns: each field is measured with its own panel open. + const LEFT_PANEL_FIELDS = [ + [ + 'scene-panel', + ['scene-select', 'cctv-camera-select', 'hud-layout-select'], + ], + ['utilities-panel', ['draw-color-select']], + ]; + const showLeftPanel = (open) => + page.evaluate((open) => { + for (const panel of ['scene-panel', 'utilities-panel']) + window.__godsEyeView.styleManager.setPanelCollapsed( + panel, + panel !== open, + { persist: false, syncShare: false }, + ); + }, open); + await page.evaluate(() => { for (const panel of [ 'pp-toggles', @@ -287,6 +306,7 @@ try { syncShare: false, }); }); + await showLeftPanel('utilities-panel'); if ( await page.$eval( '#draw-toggle', @@ -300,25 +320,31 @@ try { }, lang); for (const width of [1440, 620, 390]) { await page.setViewport({ width, height: 900 }); - const layout = await page.evaluate(() => { - const ids = [ - 'scene-select', - 'cctv-camera-select', - 'hud-layout-select', - 'draw-color-select', - ]; - return ids.map((id) => { - const node = document.getElementById(id), - rect = node.getBoundingClientRect(), - panel = node.closest('.panel-collapsible')?.getBoundingClientRect(); - return { - id, - width: rect.width, - fits: rect.width > 0 && rect.width <= (panel?.width || innerWidth), - radius: getComputedStyle(node).borderRadius, - }; - }); - }); + const layout = []; + for (const [open, ids] of LEFT_PANEL_FIELDS) { + await showLeftPanel(open); + layout.push( + ...(await page.evaluate( + (ids) => + ids.map((id) => { + const node = document.getElementById(id), + rect = node.getBoundingClientRect(), + panel = node + .closest('.panel-collapsible') + ?.getBoundingClientRect(); + return { + id, + width: rect.width, + fits: + rect.width > 0 && + rect.width <= (panel?.width || innerWidth), + radius: getComputedStyle(node).borderRadius, + }; + }), + ids, + )), + ); + } check( `${lang} fields fit their panels at ${width}px`, layout.every((item) => item.fits), @@ -360,6 +386,7 @@ try { ); // Scene selection can restore application settings. Exercise it after the // fixture-owned CCTV phase so those asynchronous effects cannot replace ports. + await showLeftPanel('scene-panel'); page.once('dialog', (dialog) => dialog.accept('Baseline selection fixture')); await page.click('#scene-new-btn'); await page.waitForFunction(() => @@ -447,6 +474,7 @@ try { syncShare: false, }); }); + await showLeftPanel('utilities-panel'); if ( await page.$eval( '#draw-toggle', @@ -454,23 +482,22 @@ try { ) ) await page.click('#draw-toggle'); - const translated = await page.evaluate(() => { - const nodes = [ - 'scene-select', - 'cctv-camera-select', - 'hud-layout-select', - 'draw-color-select', - ].map((id) => document.getElementById(id)); - return ( - document.documentElement.lang === 'ru' && - nodes.every( - (node) => - node.clientWidth > 0 && - node.getBoundingClientRect().width <= - node.closest('.panel-collapsible').getBoundingClientRect().width, - ) - ); - }); + let translated = true; + for (const [open, ids] of LEFT_PANEL_FIELDS) { + await showLeftPanel(open); + translated &&= await page.evaluate((ids) => { + const nodes = ids.map((id) => document.getElementById(id)); + return ( + document.documentElement.lang === 'ru' && + nodes.every( + (node) => + node.clientWidth > 0 && + node.getBoundingClientRect().width <= + node.closest('.panel-collapsible').getBoundingClientRect().width, + ) + ); + }, ids); + } check('real Russian labels and fields fit at 390px', translated); await page.screenshot({ path: 'qa-shots/form-fields/ru-390.png' }); check('no uncaught browser errors', errors.length === 0, errors); diff --git a/scripts/qa-geo-import.mjs b/scripts/qa-geo-import.mjs index c744b48258..88a3c4d131 100644 --- a/scripts/qa-geo-import.mjs +++ b/scripts/qa-geo-import.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node /** - * Rendered acceptance for DISPLAY ▸ Import: real files through the real file + * Rendered acceptance for UTILITIES ▸ Import: real files through the real file * input and a real drop, parsed by Cesium in the page. * * Proves: GeoJSON, KML, KMZ (with a packed icon and ground overlay) and GPX @@ -285,7 +285,7 @@ try { ); const before = await state(); check( - 'Import is on the DISPLAY rail with an empty, hidden list', + 'Import is in the UTILITIES panel with an empty, hidden list', before.rows === 0 && !(await page.evaluate(() => document diff --git a/scripts/qa-segmented-controls.mjs b/scripts/qa-segmented-controls.mjs index 8612c2f231..5f8bbbe6d8 100644 --- a/scripts/qa-segmented-controls.mjs +++ b/scripts/qa-segmented-controls.mjs @@ -35,12 +35,14 @@ try { document.getElementById('loading-screen')?.classList.contains('hidden'), { timeout: 60000 }, ); - await page.evaluate(() => - window.__godsEyeView.styleManager.setPanelCollapsed('pp-toggles', false, { - persist: false, - syncShare: false, - }), - ); + // DISPLAY holds most segmented controls; Draw's shape group is in UTILITIES. + await page.evaluate(() => { + for (const panel of ['pp-toggles', 'utilities-panel']) + window.__godsEyeView.styleManager.setPanelCollapsed(panel, false, { + persist: false, + syncShare: false, + }); + }); const surface = await page.evaluate(() => { const groups = [...document.querySelectorAll('[role="radiogroup"]')]; diff --git a/src/annotations/drawTool.js b/src/annotations/drawTool.js index 9467406dd1..b123c0695f 100644 --- a/src/annotations/drawTool.js +++ b/src/annotations/drawTool.js @@ -1,7 +1,7 @@ /** * Manual whiteboard drawing: the Cesium + DOM half. * - * DISPLAY ▸ Draw turns the globe into a whiteboard you draw on by hand: pick a + * UTILITIES ▸ Draw turns the globe into a whiteboard you draw on by hand: pick a * shape (area, line or pin), click the vertices on the real world, double-click * or press Enter to finish, type a label. Each finished shape goes through the * SAME `annotationEngine.annotate()` the voice agent uses, with its geometry diff --git a/src/annotations/drawTool.test.mjs b/src/annotations/drawTool.test.mjs index 2ba88d3dd4..c1a1b7681e 100644 --- a/src/annotations/drawTool.test.mjs +++ b/src/annotations/drawTool.test.mjs @@ -138,12 +138,14 @@ test('nothing promises a GeoJSON export for drawn shapes', () => { `${file} still claims a GeoJSON export`, ); } - for (const file of ['README.md', 'CHANGELOG.md', 'docs/CURRENT-STATE.md']) { + // Draw lives in UTILITIES; only the changelog's history still says DISPLAY. + for (const [file, heading] of [ + ['README.md', 'UTILITIES ▸ **Draw**'], + ['CHANGELOG.md', 'DISPLAY ▸ Draw'], + ['docs/CURRENT-STATE.md', 'UTILITIES ▸ **Draw**'], + ]) { const source = read(file); - const start = - ['UTILITIES ▸ **Draw**', 'DISPLAY ▸ **Draw**', 'DISPLAY ▸ Draw'] - .map((text) => source.indexOf(text)) - .find((at) => at >= 0) ?? -1; + const start = source.indexOf(heading); assert.ok(start >= 0, `${file} should describe the Draw control`); const section = source.slice(start, start + 1200); assert.doesNotMatch( diff --git a/src/app/tools.js b/src/app/tools.js index 7aea39c22b..b69a933bfe 100644 --- a/src/app/tools.js +++ b/src/app/tools.js @@ -53,12 +53,12 @@ export function createApplicationTools({ if (window.__gevAnnotations === annotations) delete window.__gevAnnotations; annotations.destroy(); }); - // DISPLAY ▸ Draw: the same whiteboard, drawn by hand. It claims the pointer + // UTILITIES ▸ Draw: the same whiteboard, drawn by hand. It claims the pointer // while a session is open, so its teardown belongs to the application // lifetime rather than to whoever last pressed the button. const drawTool = initDrawTool({ viewer, annotations }); defer(() => drawTool?.destroy()); - // DISPLAY ▸ Import: the person's own GeoJSON/KML/KMZ/GPX files, each its + // UTILITIES ▸ Import: the person's own GeoJSON/KML/KMZ/GPX files, each its // own data source. They live for the page session, so the application // lifetime removes them and the drop listeners on the viewer container. const geoFileImport = initGeoFileImport({ diff --git a/src/cockpitMarkup.test.mjs b/src/cockpitMarkup.test.mjs index 0b376d9fc1..0512060536 100644 --- a/src/cockpitMarkup.test.mjs +++ b/src/cockpitMarkup.test.mjs @@ -680,6 +680,7 @@ test('fresh Cockpit entry temporarily collapses map panels and exit restores the for (const panelId of [ 'data-panel', 'cctv-panel', + 'utilities-panel', 'scene-panel', 'pp-toggles', 'global-context-panel', diff --git a/src/panelStackLayout.test.mjs b/src/panelStackLayout.test.mjs index a13f5c04b3..617609bad9 100644 --- a/src/panelStackLayout.test.mjs +++ b/src/panelStackLayout.test.mjs @@ -294,3 +294,16 @@ test('expanded right panels highlight the title divider without changing collaps /#param-slider-panel:not\(\.collapsed\) \.param-panel-divider\s*\{[\s\S]*?linear-gradient\(\s*90deg,\s*rgb\(0 212 255 \/ 28%\),\s*rgba\(0, 212, 255, 0\.18\) 58%,\s*transparent\s*\);/, ); }); + +test('Utilities sits between Data Layers and Scenes and follows the left panels through every mode', () => { + const css = readStylesheet(new URL('../style.css', import.meta.url)); + const order = (id) => Number(new RegExp(`#left-panel-stack > #${id} \\{\\s*order: (\\d+);`).exec(css)?.[1]); + assert.ok(order('data-panel') < order('utilities-panel')); + assert.ok(order('utilities-panel') < order('scene-panel')); + assert.match(css, /body\.ui-clean-view #utilities-panel,/); + assert.match(css, /body\.recording-mode #utilities-panel,/); + // Directions stays reachable in Cockpit; only Draw and Import step aside. + assert.match(css, /body\.cockpit-mode #utilities-panel \.utilities-tools \{\s*display: none !important;/); + assert.doesNotMatch(css, /body\.cockpit-mode #left-panel-stack > #utilities-panel[,\s{]/); + assert.match(css, /body\.mobile-shell\[data-mobile-sheet='layers'\]\s+#left-panel-stack\s+> #utilities-panel,/); +}); diff --git a/src/ui/cyberTheme.test.mjs b/src/ui/cyberTheme.test.mjs index 686ee9af26..569fbc11c9 100644 --- a/src/ui/cyberTheme.test.mjs +++ b/src/ui/cyberTheme.test.mjs @@ -1,9 +1,4 @@ -import { - getScopeMaskFeather, - isScopeMaskEnabled, - setScopeMaskEnabled, - setScopeMaskFeather, -} from '../scopeMask.js'; +import { getScopeMaskFeather, isScopeMaskEnabled, setScopeMaskEnabled, setScopeMaskFeather } from '../scopeMask.js'; import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; import test from 'node:test'; @@ -279,14 +274,8 @@ test('Display and voice HUD routes preserve explicit Cyber entry and exit author test('scope choice and expanded feather survive every HUD layout and both restore paths', async (t) => { const { owner } = styleOwner(t, 'tactical'); - const previous = { - enabled: isScopeMaskEnabled(), - feather: getScopeMaskFeather(), - }; - t.after(() => { - setScopeMaskEnabled(previous.enabled); - setScopeMaskFeather(previous.feather); - }); + const previous = { enabled: isScopeMaskEnabled(), feather: getScopeMaskFeather() }; + t.after(() => { setScopeMaskEnabled(previous.enabled); setScopeMaskFeather(previous.feather); }); Object.assign(owner.services, { setScopeMaskEnabled, setScopeMaskFeather }); owner._scopeBtn = { checked: true }; owner._scopeFeatherSlider = { value: '11', disabled: false }; diff --git a/src/ui/geoFileImport.test.mjs b/src/ui/geoFileImport.test.mjs index d78731af51..bc764ef483 100644 --- a/src/ui/geoFileImport.test.mjs +++ b/src/ui/geoFileImport.test.mjs @@ -1,4 +1,4 @@ -// Behavioral tests for DISPLAY ▸ Import: the controller is driven against +// Behavioral tests for UTILITIES ▸ Import: the controller is driven against // fake DOM and viewer doubles with an injected loader, and its observable // effects are asserted — data sources added and removed, list rows, the hint, // drop handling, the file limit, and what destroy() gives back. Real parsing diff --git a/src/ui/layerPanel.test.mjs b/src/ui/layerPanel.test.mjs index bd90f07779..ddf3b884eb 100644 --- a/src/ui/layerPanel.test.mjs +++ b/src/ui/layerPanel.test.mjs @@ -378,3 +378,112 @@ test('the Weather readout receives enabled air-quality alongside weather layers' ], ); }); + +// Directions renders in the Utilities panel's list; Data Layers keeps the rest. +async function utilitiesFixture({ withUtilities = true } = {}) { + const { LayerPanel } = await import('./layerPanel.js'); + const { railFixture } = await import('./railTestFixture.mjs'); + const f = railFixture(); + // Rows are looked up by layer id on refresh; a render clears with innerHTML. + const findable = (node) => { + Object.defineProperty(node, 'innerHTML', { + set(html) { + if (html === '') for (const child of [...node.children]) child.remove(); + }, + }); + const querySelector = node.querySelector.bind(node); + node.querySelector = (selector) => { + const id = /^\[data-layer-id="(.+)"\]$/.exec(selector)?.[1]; + return id + ? f.find((child) => child.dataset?.layerId === id, node) + : querySelector(selector); + }; + return node; + }; + findable(f.container); + const utilities = findable(f.document.createElement('div')); + f.document.getElementById = (id) => + withUtilities && id === 'utilities-toggles' ? utilities : null; + const previousDocument = globalThis.document; + globalThis.document = f.document; + const layers = ['radio', 'directions', 'flights'].map((id) => ({ + id, + name: id, + icon: '*', + source: 'S', + enabled: false, + showInTogglePanel: true, + stats: {}, + })); + const panel = new LayerPanel({ + getLayers: () => layers, + isEnabled: (id) => layers.find((layer) => layer.id === id).enabled, + setEnabled() {}, + setLayerParams() {}, + getRowControls: () => null, + hasRowControls: () => false, + subscribeRowControls: () => () => {}, + }); + panel.mount(f.container); + const headings = (root) => + root.children + .filter((node) => node.tagName === 'H3') + .map((node) => node.textContent); + const rowIds = (root) => + root.children + .filter((node) => node.dataset?.layerId) + .map((node) => node.dataset.layerId); + const restore = () => { + panel.destroy(); + globalThis.document = previousDocument; + }; + return { f, panel, utilities, layers, headings, rowIds, restore }; +} + +test('Directions renders in the Utilities list without a heading, and Radio under Audio', async () => { + const { f, panel, utilities, headings, rowIds, restore } = + await utilitiesFixture(); + try { + assert.deepEqual(rowIds(utilities), ['directions']); + assert.deepEqual(headings(utilities), []); + assert.deepEqual(rowIds(f.container), ['flights', 'radio']); + assert.deepEqual(headings(f.container), ['Movement', 'Audio']); + panel.mount(f.container); + assert.deepEqual( + rowIds(utilities), + ['directions'], + 'a remount replaces it', + ); + } finally { + restore(); + } +}); + +test('a refresh updates the Directions row in the Utilities list', async () => { + const { f, panel, utilities, layers, restore } = await utilitiesFixture(); + try { + const row = f.find( + (node) => node.dataset?.layerId === 'directions', + utilities, + ); + const toggle = row.querySelector('.data-toggle-btn'); + assert.ok(!toggle.className.includes('active')); + layers.find(({ id }) => id === 'directions').enabled = true; + panel._refreshTogglePanel(); + assert.ok(toggle.className.includes('active')); + } finally { + restore(); + } +}); + +test('without the Utilities list, Directions stays in Data Layers under Utilities', async () => { + const { f, headings, rowIds, restore } = await utilitiesFixture({ + withUtilities: false, + }); + try { + assert.deepEqual(rowIds(f.container), ['flights', 'directions', 'radio']); + assert.deepEqual(headings(f.container), ['Movement', 'Utilities', 'Audio']); + } finally { + restore(); + } +}); diff --git a/src/ui/styles/cockpit.css b/src/ui/styles/cockpit.css index 6736ae193a..587f6c0412 100644 --- a/src/ui/styles/cockpit.css +++ b/src/ui/styles/cockpit.css @@ -2007,10 +2007,14 @@ body.cockpit-mode #left-panel-stack { max-height: none; transition: none; } -body.cockpit-mode #left-panel-stack > #utilities-panel, body.cockpit-mode #left-panel-stack > #scene-panel { display: none !important; } +/* Directions stays reachable in Cockpit, as in Data Layers; Draw and Import + were never there (DISPLAY sits in the hidden right rail). */ +body.cockpit-mode #utilities-panel .utilities-tools { + display: none !important; +} body.cockpit-mode #right-context-rail { display: none !important; } diff --git a/src/ui/styles/controls.css b/src/ui/styles/controls.css index 8279ef30cb..15d8bb48dd 100644 --- a/src/ui/styles/controls.css +++ b/src/ui/styles/controls.css @@ -750,7 +750,7 @@ html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label { min-width: 0; } -/* DISPLAY ▸ Draw: shape segment, label field, colour, and the one-line hint */ +/* UTILITIES ▸ Draw: shape segment, label field, colour, and the one-line hint */ #draw-mode-row { min-width: 184px; } @@ -801,7 +801,7 @@ body.gev-drawing #cesiumContainer canvas { cursor: crosshair; } -/* DISPLAY ▸ Import: one row per imported file, and the drop-target outline */ +/* UTILITIES ▸ Import: one row per imported file, and the drop-target outline */ .geo-import-list { display: none; flex-direction: column; diff --git a/src/ui/styles/cyber.css b/src/ui/styles/cyber.css index 715917b6e9..64510af6c3 100644 --- a/src/ui/styles/cyber.css +++ b/src/ui/styles/cyber.css @@ -519,6 +519,14 @@ color: #f7f8f7; } +:root[data-ui-theme='cyber'] + #utilities-panel + .utilities-tools + .pp-toggle-btn:is([aria-pressed='true'], .active) { + background: rgba(64, 45, 46, 0.94); + box-shadow: 3px 0 0 var(--cyber-red) inset; +} + :root[data-ui-theme='cyber'] .pp-toggle-btn.active .pp-label { color: #f5f7f6; } @@ -1662,9 +1670,7 @@ :root[data-ui-theme='cyber'] body:not(.cockpit-mode) #left-panel-stack:has(> [data-panel-id]:not(.collapsed)) - > :is(#data-panel, #cctv-panel, #utilities-panel, #scene-panel):not( - .collapsed - ) { + > :is(#data-panel, #cctv-panel, #utilities-panel, #scene-panel):not(.collapsed) { flex: 1 1 auto; height: auto; max-height: none; diff --git a/src/ui/styles/layers.css b/src/ui/styles/layers.css index 2f4de3d187..a787c2b3d4 100644 --- a/src/ui/styles/layers.css +++ b/src/ui/styles/layers.css @@ -1478,7 +1478,8 @@ body.recording-mode #right-context-rail > [data-panel-id] { color: var(--text-primary); } -/* Draw reads as on with the accent of an enabled layer row. */ +/* Draw marks its on state with an accent edge, like an active DISPLAY + button; Cyber swaps in its red edge (cyber.css). */ #utilities-panel .utilities-tools .pp-toggle-btn:is([aria-pressed='true'], .active) { @@ -1493,6 +1494,18 @@ body.recording-mode #right-context-rail > [data-panel-id] { margin-right: 10px; } -#utilities-panel.collapsed .utilities-tools { - display: none; +/* Draw's options sit flat under its name, like a layer row's controls, not + as the card that hangs under a DISPLAY button. DISPLAY's shared label + column means nothing here, so the Shape label takes its own width. */ +#utilities-panel .utilities-tools .pp-slider-row { + padding: 4px 0; + background: none; + border: 0; + border-radius: 0; + backdrop-filter: none; + -webkit-backdrop-filter: none; +} + +#utilities-panel .utilities-tools .pp-slider-mini-label { + min-width: 0; } diff --git a/src/voice/gevActions.js b/src/voice/gevActions.js index c67e1be169..0ee73ab9e9 100644 --- a/src/voice/gevActions.js +++ b/src/voice/gevActions.js @@ -1046,15 +1046,18 @@ export function createGevActionRunner({ if (name === 'show_data_layers_menu') { const layerId = normalizeLayerId(args.layerId || args.layer); - setPanelOpen(styleManager, 'data-panel', true); - const focusedLayer = + const row = layerId && dataManager.layers.has(layerId) - ? focusDataLayerRow(layerId) + ? findDataLayerRow(layerId) : null; + // Open the panel that holds the row: Directions lives in Utilities. + const panelId = row?.closest('[data-panel-id]')?.id || 'data-panel'; + setPanelOpen(styleManager, panelId, true); + const focusedLayer = row ? focusDataLayerRow(row, layerId) : null; return { ok: true, action: 'show_data_layers_menu', - panelId: 'data-panel', + panelId, focusedLayer, layers: dataManager .getAll() @@ -3190,12 +3193,14 @@ function normalizeCockpitAction(value) { return null; } -function focusDataLayerRow(layerId) { +function findDataLayerRow(layerId) { const selector = `[data-layer-id="${CSS.escape(layerId)}"]`; - const row = document.querySelector( + return document.querySelector( `#data-toggles ${selector}, #utilities-toggles ${selector}`, ); - if (!row) return null; +} + +function focusDataLayerRow(row, layerId) { row.scrollIntoView({ block: 'center', behavior: 'smooth' }); row.classList.remove('gev-voice-focus'); void row.offsetWidth; diff --git a/src/voice/gevActions.test.mjs b/src/voice/gevActions.test.mjs index 4a3a8ec727..1866b0b8aa 100644 --- a/src/voice/gevActions.test.mjs +++ b/src/voice/gevActions.test.mjs @@ -743,6 +743,53 @@ test('Data Layers voice inventory hides the Context coordinator while current-vi assert.deepEqual(current.cockpit, { active: false, entryAllowed: true }); }); +test('showing a layer opens the panel that holds its row: Directions lives in Utilities', async () => { + globalThis.window = globalThis.window || { clearTimeout, setTimeout, requestIdleCallback: null }; + const previous = { document: globalThis.document, CSS: globalThis.CSS }; + const focused = []; + const rowIn = (panelId) => ({ + dataset: { layerName: panelId === 'utilities-panel' ? 'Directions' : 'Live Flights' }, + classList: { add: (name) => focused.push(name), remove() {} }, + scrollIntoView() {}, + closest: (selector) => (selector === '[data-panel-id]' ? { id: panelId } : null), + }); + const rows = { directions: rowIn('utilities-panel'), flights: rowIn('data-panel') }; + globalThis.CSS = { escape: (value) => value }; + globalThis.document = { + querySelector: (selector) => rows[/data-layer-id="([^"]+)"/.exec(selector)?.[1]] || null, + }; + try { + const opened = []; + const layers = [ + { id: 'flights', name: 'Live Flights', enabled: false, showInTogglePanel: true, stats: {} }, + { id: 'directions', name: 'Directions', enabled: false, showInTogglePanel: true, stats: {} }, + ]; + const dataManager = { + layers: new Map(layers.map((layer) => [layer.id, { module: {} }])), + getAll: () => layers, + }; + const styleManager = { + setPanelCollapsed: (panelId, collapsed) => opened.push([panelId, collapsed]), + }; + const viewer = { + clock: { onTick: { addEventListener: () => () => {} } }, + scene: { canvas: { addEventListener() {}, removeEventListener() {} } }, + camera: { moveEnd: { addEventListener() {} } }, + }; + const runner = createGevActionRunner({ viewer, styleManager, dataManager }); + const directions = await runner('show_data_layers_menu', { layerId: 'directions' }); + assert.equal(directions.panelId, 'utilities-panel'); + assert.deepEqual(directions.focusedLayer, { id: 'directions', name: 'Directions' }); + const flights = await runner('show_data_layers_menu', { layerId: 'flights' }); + assert.equal(flights.panelId, 'data-panel'); + assert.deepEqual(opened, [['utilities-panel', false], ['data-panel', false]]); + assert.deepEqual(focused, ['gev-voice-focus', 'gev-voice-focus']); + } finally { + globalThis.document = previous.document; + globalThis.CSS = previous.CSS; + } +}); + test('generic layer visibility forwards cancellation and reports semantic failure', async () => { globalThis.window = globalThis.window || { clearTimeout, setTimeout, requestIdleCallback: null }; const viewer = { From 8de75b172a941825413cb99441e66b124fe7b2bd Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 29 Oct 2026 12:29:11 +0000 Subject: [PATCH 076/237] Keep two shot rows visible in Authoring on shorter windows The step headings make the panel taller, so the left stack squeezed the shot list down to one row at about 1000px of window height. Its minimum now holds two rows; the panel scrolls when space is short. --- src/ui/styles/scenes.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/styles/scenes.css b/src/ui/styles/scenes.css index f2bec04d9b..9893061e1e 100644 --- a/src/ui/styles/scenes.css +++ b/src/ui/styles/scenes.css @@ -245,7 +245,8 @@ html:not([lang='en']) #scene-panel .scene-controls .scene-btn { flex-direction: column; gap: 6px; max-height: 260px; - min-height: 72px; + /* Two shot rows stay visible; the panel scrolls when space is short. */ + min-height: 128px; flex: 1; overflow-y: auto; padding: 4px 2px 6px; From 95ed686da5234690bf09acf193f93d0e083ac7f1 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 29 Oct 2026 12:41:12 +0000 Subject: [PATCH 077/237] List drawn shapes under Draw, with icon shapes and colour swatches Each shape drawn by hand gets a row under Draw, as Import's files do: its colour swatch, its name, and show/hide, fly-to and remove. A shape is named in its row, and its swatch opens the five colours there, so labelling and colouring happen after a shape is drawn and can be seen, instead of in a field filled in beforehand. Area, Line and Pin become icon buttons, named for screen readers and tooltips, and the colour for the next shape is a row of swatches instead of a dropdown. The annotation engine gains per-mark remove, setHidden, restyle and frame, and onChange so the list follows the board. A hidden mark stays on the board at alpha 0, a renamed line keeps its length, and fly-to frames a line by its whole path. Voice marks are not listed. The Draw, form-field and segmented-control gates drive the new controls; swatches are checked as chips, not segments. --- README.md | 2 +- docs/CURRENT-STATE.md | 5 +- index.html | 2 +- scripts/format-scope.json | 2 + scripts/package-boundaries.json | 1 + scripts/qa-draw-tool.mjs | 88 +++++-- scripts/qa-form-fields.mjs | 133 +++------- scripts/qa-segmented-controls.mjs | 31 ++- src/annotations/annotationEngine.js | 111 ++++++++ src/annotations/annotationEngine.test.mjs | 73 ++++++ src/annotations/drawMarkList.js | 259 +++++++++++++++++++ src/annotations/drawMarkList.test.mjs | 280 +++++++++++++++++++++ src/annotations/drawTool.js | 63 +++-- src/annotations/drawTool.test.mjs | 25 +- src/annotations/drawToolBehaviour.test.mjs | 3 +- src/i18n/locales/es.json | 9 +- src/i18n/locales/ru.json | 9 +- src/i18n/locales/zh-CN.json | 9 +- src/i18n/locales/zh-Hant.json | 9 +- src/ui/styles/controls.css | 125 +++++++-- src/ui/styles/english-css-parity.test.mjs | 2 - src/ui/styles/layers.css | 7 +- src/ui/templates/layer-panels.html | 27 +- 23 files changed, 1061 insertions(+), 214 deletions(-) create mode 100644 src/annotations/drawMarkList.js create mode 100644 src/annotations/drawMarkList.test.mjs diff --git a/README.md b/README.md index 2f47216a84..494fcda469 100644 --- a/README.md +++ b/README.md @@ -357,7 +357,7 @@ camera input stops rotation. > 🗣️ _"Outline the state of Texas."_ · _"Annotate the Texas State Capitol and its grounds"_ — it draws the **actual enclosing boundary**, not a circle. · _"How far is the Eiffel Tower from the Louvre?"_ — a connector arrow appears and it speaks the distance. Everything persists until you say _"clear the map."_ -**✍️ Or draw it yourself** — UTILITIES ▸ **Draw**: pick Area, Line or Pin, click the vertices on the real world, double-click to finish, label it. Same whiteboard, same persistence, no microphone needed. +**✍️ Or draw it yourself** — UTILITIES ▸ **Draw**: pick Area, Line or Pin and a colour, click the vertices on the real world, double-click to finish, then name, recolour, hide or fly to each shape from its row. Same whiteboard, same persistence, no microphone needed. ![Zilker Park and Lady Bird Lake drawing onto the 3D city as persistent vector annotations, by voice](docs/media/01-voice-annotate-zilker.gif) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 15c74e9267..f32d50acb0 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -5412,7 +5412,8 @@ request viewbox and continues searching without that geographic preference. ### Manual Whiteboard Drawing (September 2026) -- UTILITIES ▸ **Draw** turns the globe into a whiteboard drawn by hand. Pick a shape (Area, Line, Pin), click the vertices on the real world, type an optional label and pick a colour, and finish. **Keyboard contract, live only while Draw is on and never while you are typing in another field:** Enter finishes the shape (as does a double-click, and the two cannot both submit it — the session is replaced before the annotate call is awaited); Backspace removes the last vertex; Esc cancels the shape in progress, and a second Esc — Esc on an empty session — leaves draw mode. Typing in the label field keeps Backspace; Enter there also finishes. **Clear** wipes the board (the shape in progress and every placed mark), so removing marks does not require the console or the microphone. +- UTILITIES ▸ **Draw** turns the globe into a whiteboard drawn by hand. Pick a shape (icon buttons for Area, Line and Pin) and a colour swatch for the next shape, click the vertices on the real world, and finish. **Keyboard contract, live only while Draw is on and never while you are typing in another field:** Enter finishes the shape (as does a double-click, and the two cannot both submit it — the session is replaced before the annotate call is awaited); Backspace removes the last vertex; Esc cancels the shape in progress, and a second Esc — Esc on an empty session — leaves draw mode. **Clear** wipes the board (the shape in progress and every placed mark), so removing marks does not require the console or the microphone. +- **Drawn shapes are listed under Draw like Import's files** (`src/annotations/drawMarkList.js`): one row per hand-drawn mark (`manual: true`; voice marks are not listed) with its colour swatch, its name, and show/hide, fly-to and remove. The name is typed in the row (Enter or leaving the field saves it, Esc restores it and stays in the field); an unnamed shape shows its kind, and an unnamed line its length. The swatch opens the five colours in the row. The list reads the engine's board and redraws on `onChange`; it asks for changes through the engine's per-mark `remove`, `setHidden`, `frame` and `restyle`. A hidden mark stays on the board at alpha 0, so it keeps its place and comes back at once; `restyle` re-adds the mark with the new name or colour, and a renamed line keeps its length (`Name — 1.2 km`). Fly-to frames a line by its whole path, not its first point. - Runtime entry: `createApplicationTools` (`src/app/tools.js`, behind the `src/standalone/tools.js` shim) calls `initDrawTool({ viewer, annotations })` after `initAnnotations` and defers its `destroy()`, so disposing the shell returns every DOM listener, the Cesium handler, the preview data source, the borrowed click actions and the `window.__gevDrawTool` handle. Its markup lives in the UTILITIES panel's component template (`src/ui/templates/layer-panels.html`), assembled into `index.html` at build time. That handle (`setActive`, `setShape`, `addVertex(lon, lat)`, `finish`, `cancel`, `clearAll`, `diagnostics`) is the no-mouse test seam. - Contract: a finished shape is submitted through the SAME `annotationEngine.annotate()` the voice agent uses, with geometry supplied and `manual: true` (`type: area` + `ring`, `type: route` + `path`, `type: pin` + coordinates). `resolveSpec` short-circuits manual specs (`resolveManualSpec`) so no geocoder, Places or Overpass call is made. A drawn area is a real (not synthesized) outline and drapes solid; a drawn line is a `route` with `mode: 'manual'`, labelled with its length and never a travel time; a pin is a point. Drawn marks therefore render with the whiteboard look, persist, de-dup, appear in `.list()`, and clear with `clear_annotations` / `.clear()`. - **A vertex is a lon/lat, and the mark is DRAPED.** Clicks are picked through `pickWorldFromScreen` — one of two scene helpers the annotation resolver factory (`src/annotations/resolver.js`) exposes alongside `sampleGroundHeight`, so the app has ONE depth-aware pick cascade rather than a second written beside it — which returns the height the pick landed on as well as the coordinate, so the live preview hangs on the roof or hillside under the pointer instead of sinking to sea level. The world renderer draws areas and routes with `clampToGround`, so the height is dropped at finish in one place (`finishSpec`) rather than being carried downstream and discarded silently: what you get is the outline you drew, lying on the surface beneath it. @@ -5424,7 +5425,7 @@ request viewbox and continues searching without that geographic preference. - Pointer ownership: while a session is open the tool holds the single pointer claim (`claimPointer('draw')`, `src/data/inputOwnership.js`) and **every** ambient scene selection handler — the shared tracking click gesture behind flights, military and CCTV, plus vessels, satellites, launches, fires, installations, bikeshare, radio, submarine cables, the bundled GeoJSON layers and the CCTV calibration gizmo — returns before picking. A vertex over an aircraft is a vertex, not a selection. - **The claim is a LEASE.** `claimPointer(owner)` returns an opaque token or `null`; `releasePointer(lease)` takes that token. A second claim fails even under the same owner name, because two live instances of one tool — an old one mid-teardown and its replacement — are two owners; releasing by name let the old instance free the claim its successor was holding, and every layer started selecting through the live session's vertices. A superseded lease now releases nothing. - **Cesium's own click actions are borrowed too.** The Viewer binds a selecting LEFT_CLICK and a tracking LEFT_DOUBLE_CLICK on its own handler, outside every layer and therefore outside the shared claim — guarding the layers alone still left a drawn vertex selecting the entity under it. Both are removed for the session and restored, as the same function objects, when it ends or the tool is destroyed. -- **Enter belongs to whatever has the keyboard.** The finish key is taken only from the canvas, the page body and the tool's own label field. With a control focused — Clear, a shape button — Enter activates that control, as a keyboard user expects; it does not quietly finish the shape. +- **Enter belongs to whatever has the keyboard.** The finish key is taken only from the canvas and the page body. With a control focused — Clear, a shape button — Enter activates that control, as a keyboard user expects; it does not quietly finish the shape. - Pure half: `src/annotations/drawMode.js` (session, minimum vertices, double-click de-dup at 0.5 m, vertex ceiling, degenerate-geometry refusal, ring closing, dateline-safe length/area/centroid, hint text). Regression surface: `src/annotations/drawMode.test.mjs` and `src/data/inputOwnership.test.mjs` (pure), `src/annotations/drawToolBehaviour.test.mjs` (the tool driven against DOM and viewer doubles — leases, borrowed input actions, teardown, the Enter key, preview heights), `src/annotations/drawTool.test.mjs` (structural: where files live, which ids the markup carries, what the docs may claim), and the rendered harness `scripts/qa-draw-tool.mjs`. - The annotation tree is a declared ownership group: `./annotations` → `src/annotations/index.js` in `package.json`, with its module graph listed in `scripts/package-boundaries.json`, so an annotation module reaching outside that graph is a gate failure rather than a surprise in a layer's bundle. `drawMode.js`, `drawTool.js` and their tests are in `scripts/format-scope.json`. diff --git a/index.html b/index.html index 26cf734fb7..f8b73362de 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ with the sources: src/materialSymbolsSubset.test.mjs fails when a source names a glyph this list is missing, because a missing glyph does not draw a box — the ligature never forms and the element renders the literal word. --> - + diff --git a/scripts/format-scope.json b/scripts/format-scope.json index 5947f8811c..10ecace711 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -29,6 +29,8 @@ "src/data/localGeojsonCore.js", "src/data/localGeojsonLod.js", "src/data/inputOwnership.js", + "src/annotations/drawMarkList.js", + "src/annotations/drawMarkList.test.mjs", "src/annotations/drawMode.js", "src/annotations/drawMode.test.mjs", "src/annotations/drawTool.js", diff --git a/scripts/package-boundaries.json b/scripts/package-boundaries.json index 4b63663ce0..7bcaa1e2d7 100644 --- a/scripts/package-boundaries.json +++ b/scripts/package-boundaries.json @@ -2371,6 +2371,7 @@ "src/layers/vessels/recordPolicy.js", "src/layers/vessels/snapshotRenderer.js", "src/data/inputOwnership.js", + "src/annotations/drawMarkList.js", "src/annotations/drawMode.js", "src/annotations/drawTool.js", "src/data/geoFileImport.js", diff --git a/scripts/qa-draw-tool.mjs b/scripts/qa-draw-tool.mjs index 8a9a01b0ef..7e22dc0723 100644 --- a/scripts/qa-draw-tool.mjs +++ b/scripts/qa-draw-tool.mjs @@ -300,8 +300,6 @@ try { // ── a pin, finished with Enter ────────────────────────────────────────── await page.click('#draw-toggle'); await page.click('.pp-mode-btn[data-shape="pin"]'); - await page.click('#draw-label-input'); - await page.keyboard.type('Pin one'); await clickWorld(520, 330); check( 'the pointer is claimed while a session is open', @@ -328,16 +326,9 @@ try { `${beforeBackspace} → ${afterBackspace}`, ); await clickWorld(640, 500); - await page.click('#draw-label-input'); - await page.keyboard.type('Market St'); await page.keyboard.press('Enter'); - check( - 'a line finished from the label field lands on the board', - await waitForMarks(2), - ); - const lineMark = (await marks()).find((mark) => - mark.label?.startsWith('Market St'), - ); + check('a line finished with Enter lands on the board', await waitForMarks(2)); + const lineMark = (await marks()).find((mark) => mark.type === 'route'); check( 'a drawn line reports its length and never a travel time', Boolean(lineMark) && @@ -349,10 +340,8 @@ try { // ── an area, coloured and labelled, finished with a double-click ──────── await page.click('.pp-mode-btn[data-shape="area"]'); - await page.select('#draw-color-select', 'amber'); + await page.click('.draw-color[data-color="amber"]'); const amberBefore = await amberPixels(); - await page.click('#draw-label-input'); - await page.keyboard.type('Civic Center block'); await clickWorld(400, 280); await clickWorld(700, 290); await clickWorld(720, 520); @@ -375,14 +364,34 @@ try { afterDoubleClick === 3, `${afterDoubleClick} marks`, ); + // ── each drawn shape gets a row: named, recoloured, hidden from there ── + const rowIds = () => + page.evaluate(() => + [...document.querySelectorAll('#draw-mark-list [data-mark-id]')].map( + (row) => row.dataset.markId, + ), + ); + const ids = await rowIds(); + check('every drawn shape has a row under Draw', ids.length === 3, ids); + const areaId = ids[2]; + const rowControl = (id, control) => + `#draw-mark-list [data-mark-id="${id}"] [data-control="${control}"]`; + await page.click(rowControl(areaId, 'name')); + await page.keyboard.type('Civic Center block'); + await page.keyboard.press('Enter'); + await wait(300); const areaMark = (await marks()).find( (mark) => mark.label === 'Civic Center block', ); check( - 'the label and colour chosen in the panel are what is drawn', + 'the name typed in its row and the colour picked before drawing are what is drawn', areaMark?.color === 'amber', JSON.stringify(areaMark), ); + check( + 'naming a shape keeps Draw on and the shape in progress untouched', + (await drawState()).active === true, + ); await wait(1200); const amberAfter = await amberPixels(); check( @@ -391,6 +400,49 @@ try { `${amberBefore} → ${amberAfter} amber pixels (+${amberAfter - amberBefore})`, ); await shot('01-area-with-label'); + + // ── the row's own controls: recolour, hide and show, fly to ───────────── + const markState = (id) => + page.evaluate((id) => { + const mark = window.__gevAnnotations.list().find((m) => m.id === id); + return ( + mark && { color: mark.color, hidden: mark.hidden, alpha: mark.alpha } + ); + }, id); + await page.click(rowControl(areaId, 'swatch')); + await page.click(rowControl(areaId, 'color-green')); + await wait(300); + check( + 'a colour picked in the row recolours that shape', + (await markState(areaId))?.color === 'green', + ); + await page.click(rowControl(areaId, 'toggle')); + await wait(600); + const hidden = await markState(areaId); + check( + 'hiding a shape keeps it on the board but draws it at zero alpha', + hidden?.hidden === true && hidden.alpha === 0, + JSON.stringify(hidden), + ); + await page.click(rowControl(areaId, 'toggle')); + await wait(600); + check( + 'showing it again brings it straight back', + (await markState(areaId))?.alpha === 1, + ); + const cameraAt = () => + page.evaluate(() => { + const p = window.__godsEyeView.viewer.camera.positionWC; + return [p.x, p.y, p.z]; + }); + const beforeFly = await cameraAt(); + await page.click(rowControl(ids[1], 'fly')); + await wait(2600); + const afterFly = await cameraAt(); + check( + 'fly to frames that shape', + Math.hypot(...afterFly.map((v, i) => v - beforeFly[i])) > 1, + ); await shot('03-pins-and-shapes'); // ── Escape cancels the shape, a second Escape leaves draw mode ────────── @@ -421,6 +473,12 @@ try { afterSecondEscape.marks === 3, `${afterSecondEscape.marks} marks`, ); + await page.click(rowControl(ids[0], 'remove')); + await waitForMarks(2); + check( + 'remove in a row takes that one shape off the board and out of the list', + (await rowIds()).join() === ids.slice(1).join(), + ); // ── a click that would select something selects nothing while drawing ─── const target = await findClickableTarget(); diff --git a/scripts/qa-form-fields.mjs b/scripts/qa-form-fields.mjs index 52cd059b75..c2d3af6e52 100644 --- a/scripts/qa-form-fields.mjs +++ b/scripts/qa-form-fields.mjs @@ -39,14 +39,13 @@ try { 'scene-select', 'cctv-camera-select', 'hud-layout-select', - 'draw-color-select', 'radio-filter', 'sdr-gain-select', ].map((id) => document.getElementById(id)); return { ids: selects.map((node) => node.id), shared: - selects.length === 6 && + selects.length === 5 && selects.every((node) => node.classList.contains('gev-field')), native: selects.every( (node) => @@ -58,7 +57,7 @@ try { }; }); check( - 'all six panel dropdowns retain native select semantics and shared surface', + 'all five panel dropdowns retain native select semantics and shared surface', inventory.shared && inventory.native, inventory, ); @@ -275,76 +274,33 @@ try { await page.evaluate(() => window.__qaFormCalls.length === 2), ); - // The left rail fits one tall panel at a time, so Scenes and Utilities - // take turns: each field is measured with its own panel open. - const LEFT_PANEL_FIELDS = [ - [ - 'scene-panel', - ['scene-select', 'cctv-camera-select', 'hud-layout-select'], - ], - ['utilities-panel', ['draw-color-select']], - ]; - const showLeftPanel = (open) => - page.evaluate((open) => { - for (const panel of ['scene-panel', 'utilities-panel']) - window.__godsEyeView.styleManager.setPanelCollapsed( - panel, - panel !== open, - { persist: false, syncShare: false }, - ); - }, open); - await page.evaluate(() => { - for (const panel of [ - 'pp-toggles', - 'utilities-panel', - 'scene-panel', - 'cctv-panel', - ]) + for (const panel of ['pp-toggles', 'scene-panel', 'cctv-panel']) window.__godsEyeView.styleManager.setPanelCollapsed(panel, false, { persist: false, syncShare: false, }); }); - await showLeftPanel('utilities-panel'); - if ( - await page.$eval( - '#draw-toggle', - (node) => node.getAttribute('aria-pressed') !== 'true', - ) - ) - await page.click('#draw-toggle'); for (const lang of ['en']) { await page.evaluate((lang) => { document.documentElement.lang = lang; }, lang); for (const width of [1440, 620, 390]) { await page.setViewport({ width, height: 900 }); - const layout = []; - for (const [open, ids] of LEFT_PANEL_FIELDS) { - await showLeftPanel(open); - layout.push( - ...(await page.evaluate( - (ids) => - ids.map((id) => { - const node = document.getElementById(id), - rect = node.getBoundingClientRect(), - panel = node - .closest('.panel-collapsible') - ?.getBoundingClientRect(); - return { - id, - width: rect.width, - fits: - rect.width > 0 && - rect.width <= (panel?.width || innerWidth), - radius: getComputedStyle(node).borderRadius, - }; - }), - ids, - )), - ); - } + const layout = await page.evaluate(() => { + const ids = ['scene-select', 'cctv-camera-select', 'hud-layout-select']; + return ids.map((id) => { + const node = document.getElementById(id), + rect = node.getBoundingClientRect(), + panel = node.closest('.panel-collapsible')?.getBoundingClientRect(); + return { + id, + width: rect.width, + fits: rect.width > 0 && rect.width <= (panel?.width || innerWidth), + radius: getComputedStyle(node).borderRadius, + }; + }); + }); check( `${lang} fields fit their panels at ${width}px`, layout.every((item) => item.fits), @@ -386,7 +342,6 @@ try { ); // Scene selection can restore application settings. Exercise it after the // fixture-owned CCTV phase so those asynchronous effects cannot replace ports. - await showLeftPanel('scene-panel'); page.once('dialog', (dialog) => dialog.accept('Baseline selection fixture')); await page.click('#scene-new-btn'); await page.waitForFunction(() => @@ -451,53 +406,35 @@ try { { timeout: 60000 }, ); await page.evaluate(() => { - for (const panel of [ - 'pp-toggles', - 'utilities-panel', - 'scene-panel', - 'cctv-panel', - ]) + for (const panel of ['pp-toggles', 'scene-panel', 'cctv-panel']) window.__godsEyeView.styleManager.setPanelCollapsed(panel, false, { persist: false, syncShare: false, }); }); await page.evaluate(() => { - for (const panel of [ - 'pp-toggles', - 'utilities-panel', - 'scene-panel', - 'cctv-panel', - ]) + for (const panel of ['pp-toggles', 'scene-panel', 'cctv-panel']) window.__godsEyeView.styleManager.setPanelCollapsed(panel, false, { persist: false, syncShare: false, }); }); - await showLeftPanel('utilities-panel'); - if ( - await page.$eval( - '#draw-toggle', - (node) => node.getAttribute('aria-pressed') !== 'true', - ) - ) - await page.click('#draw-toggle'); - let translated = true; - for (const [open, ids] of LEFT_PANEL_FIELDS) { - await showLeftPanel(open); - translated &&= await page.evaluate((ids) => { - const nodes = ids.map((id) => document.getElementById(id)); - return ( - document.documentElement.lang === 'ru' && - nodes.every( - (node) => - node.clientWidth > 0 && - node.getBoundingClientRect().width <= - node.closest('.panel-collapsible').getBoundingClientRect().width, - ) - ); - }, ids); - } + const translated = await page.evaluate(() => { + const nodes = [ + 'scene-select', + 'cctv-camera-select', + 'hud-layout-select', + ].map((id) => document.getElementById(id)); + return ( + document.documentElement.lang === 'ru' && + nodes.every( + (node) => + node.clientWidth > 0 && + node.getBoundingClientRect().width <= + node.closest('.panel-collapsible').getBoundingClientRect().width, + ) + ); + }); check('real Russian labels and fields fit at 390px', translated); await page.screenshot({ path: 'qa-shots/form-fields/ru-390.png' }); check('no uncaught browser errors', errors.length === 0, errors); diff --git a/scripts/qa-segmented-controls.mjs b/scripts/qa-segmented-controls.mjs index 5f8bbbe6d8..d60b574fdf 100644 --- a/scripts/qa-segmented-controls.mjs +++ b/scripts/qa-segmented-controls.mjs @@ -45,7 +45,11 @@ try { }); const surface = await page.evaluate(() => { - const groups = [...document.querySelectorAll('[role="radiogroup"]')]; + // Colour swatches are one-of-many too, but chips, not segments: they are + // checked on their own below. + const groups = [ + ...document.querySelectorAll('[role="radiogroup"]:not(.draw-colors)'), + ]; const buttons = groups.flatMap((group) => [ ...group.querySelectorAll('[role="radio"]'), ]); @@ -71,6 +75,31 @@ try { JSON.stringify(surface), ); + const swatches = await page.evaluate(() => { + const group = document.getElementById('draw-colors'); + const chips = [...(group?.querySelectorAll('[role="radio"]') || [])]; + return { + count: chips.length, + round: chips.every( + (chip) => getComputedStyle(chip).borderRadius === '50%', + ), + colours: new Set( + chips.map((chip) => getComputedStyle(chip).backgroundColor), + ).size, + checked: chips.filter( + (chip) => chip.getAttribute('aria-checked') === 'true', + ).length, + }; + }); + check( + "Draw's colour swatches are five round chips, one checked", + swatches.count === 5 && + swatches.round && + swatches.colours === 5 && + swatches.checked === 1, + JSON.stringify(swatches), + ); + await page.evaluate(() => document.getElementById('models3d-mode-all').click(), ); diff --git a/src/annotations/annotationEngine.js b/src/annotations/annotationEngine.js index b0622579d5..4125986ad4 100644 --- a/src/annotations/annotationEngine.js +++ b/src/annotations/annotationEngine.js @@ -144,6 +144,17 @@ export function createAnnotationEngine({ // task with the FINAL outcome — resolved or failed — so narration that said // "tracing the boundary now" can later honestly confirm or correct itself. const outlineListeners = new Set(); + // Told whenever the set of marks, or one mark's look, changes (Draw's list). + const changeListeners = new Set(); + const notifyChange = () => { + for (const listener of changeListeners) { + try { + listener(); + } catch { + /* one listener's failure must not stop the others */ + } + } + }; function emitOutlineEvent(evt) { for (const listener of outlineListeners) { @@ -219,6 +230,7 @@ export function createAnnotationEngine({ const now = performance.now(); let changed = false; let pending = false; // any mark still fading in / out, or with a TTL fade ahead + let expired = false; for (const anno of annotations.values()) { const next = computeAlpha(anno, now); if (next !== anno.alpha) { @@ -229,6 +241,7 @@ export function createAnnotationEngine({ annotations.delete(anno.id); renderer.remove(anno); changed = true; + expired = true; continue; } if (pendingAnimation(anno, now)) pending = true; @@ -237,6 +250,7 @@ export function createAnnotationEngine({ renderer.sync(annotations); syncAnnotationHold(); } + if (expired) notifyChange(); // Stop once the board is STABLE — persistent marks (persist=true is the default) // finish fading in after ~260ms and never change again, so without this the loop // would spin O(N) every frame forever. ensureTicking() restarts on the next @@ -466,6 +480,7 @@ export function createAnnotationEngine({ if (ids.length) { renderer.sync(annotations); ensureTicking(); + notifyChange(); } if (opts.flyTo && firstAnchor) frameAnnotation(firstAnchor); else if (ids.length) ensureMarksVisible(ids); @@ -885,6 +900,11 @@ export function createAnnotationEngine({ alpha: 0, // animate in bornAt: now, expiring: false, + // Drawn by hand (drawTool.js): listed under Draw, renamed and recoloured + // there. `name` is the person's own label, before any distance is added. + manual: spec?.manual === true, + name: spec?.manual === true ? cleanLabel(spec?.label) || null : null, + hidden: false, }; if (type === 'route') { @@ -970,6 +990,85 @@ export function createAnnotationEngine({ annotations.clear(); renderer.sync(annotations); syncAnnotationHold(); + notifyChange(); + } + + /** Take one mark off the board at once. */ + function remove(id) { + const anno = annotations.get(id); + if (!anno) return false; + annotations.delete(id); + renderer.remove(anno); + renderer.sync(annotations); + syncAnnotationHold(); + notifyChange(); + return true; + } + + /** Hide or show one mark; a hidden mark stays on the board at alpha 0. */ + function setHidden(id, hidden) { + const anno = annotations.get(id); + if (!anno) return false; + anno.hidden = Boolean(hidden); + // Skip the fade-in, so showing it again is immediate. + anno.bornAt = Math.min(anno.bornAt, performance.now() - 260); + ensureTicking(); + notifyChange(); + return true; + } + + /** + * Rename or recolour a hand-drawn mark. The renderers build a mark's look + * when it is added, so the mark is added again with the new look. + */ + function restyle(id, { name, color } = {}) { + const anno = annotations.get(id); + if (!anno?.manual) return false; + if (name !== undefined) { + anno.name = cleanLabel(name) || null; + anno.label = + anno.type === 'route' + ? composeRouteLabel(anno.name, anno.distanceM, null, 'manual', false) + : anno.name; + } + if (color !== undefined && COLORS.has(color)) anno.color = color; + renderer.remove(anno); + try { + renderer.add(anno); + } catch (error) { + rollbackRendererState(anno); + annotations.delete(id); + syncAnnotationHold(); + notifyChange(); + throw error; + } + renderer.sync(annotations); + ensureTicking(); + notifyChange(); + return true; + } + + /** Fly the camera to one mark; a line is framed whole, not by its start. */ + function frame(id) { + const anno = annotations.get(id); + if (!anno) return false; + if (anno.type === 'route' && anno.path?.length) { + const ring = anno.path.map((p) => [p.lon, p.lat]); + const lons = ring.map(([lon]) => lon); + const lats = ring.map(([, lat]) => lat); + frameAnnotation({ + ...anno, + to: null, + ring, + polygons: null, + anchor: { + lon: (Math.min(...lons) + Math.max(...lons)) / 2, + lat: (Math.min(...lats) + Math.max(...lats)) / 2, + height: 0, + }, + }); + } else frameAnnotation(anno); + return true; } /** Begin a graceful fade-out of everything, then remove. */ @@ -1100,6 +1199,16 @@ export function createAnnotationEngine({ const engine = { annotate, clear, + remove, + setHidden, + restyle, + frame, + /** Subscribe to board changes; returns an unsubscribe fn. */ + onChange(listener) { + if (destroyed || typeof listener !== 'function') return () => {}; + changeListeners.add(listener); + return () => changeListeners.delete(listener); + }, destroy() { if (destroyed) return; destroyed = true; @@ -1109,6 +1218,7 @@ export function createAnnotationEngine({ if (tickHandle != null) cancelAnimationFrame(tickHandle); tickHandle = null; outlineListeners.clear(); + changeListeners.clear(); releaseContinuousRender('annotations'); renderer.destroy(); } @@ -1364,6 +1474,7 @@ function normalizeType(type) { } function computeAlpha(anno, now) { + if (anno.hidden) return 0; const inT = (now - anno.bornAt) / 260; const fadeIn = inT >= 1 ? 1 : Math.max(0, inT); diff --git a/src/annotations/annotationEngine.test.mjs b/src/annotations/annotationEngine.test.mjs index 5f39a077a9..6e435fcd44 100644 --- a/src/annotations/annotationEngine.test.mjs +++ b/src/annotations/annotationEngine.test.mjs @@ -730,3 +730,76 @@ test('only an explicit navigation request permits resolving distant annotation t assert.deepEqual(received.map(options => options.allowDistant), [false, true]); engine.destroy(); }); + +// Draw's list works one hand-drawn mark at a time: hide, rename, recolour, +// frame and remove it, and hear about every change to the board. +test('hand-drawn marks: one mark can be hidden, renamed, recoloured, framed and removed', async (t) => { + installAnimationFrameStubs(t); + _resetRenderGovernorForTest(); + t.after(() => _resetRenderGovernorForTest()); + const { renderer, calls } = fakeRenderer(); + const flights = []; + const engine = createAnnotationEngine({ + viewer: { camera: { heading: 0, flyToBoundingSphere: (sphere) => flights.push(sphere) } }, + renderer, + }); + let changes = 0; + const unsubscribe = engine.onChange(() => { changes += 1; }); + + const drawn = await engine.annotate([ + { type: 'route', manual: true, path: [[-97.75, 30.26], [-97.73, 30.27]], label: '' }, + { type: 'pin', manual: true, latitude: 30.27, longitude: -97.74, label: 'Camp', color: 'amber' }, + ], { persist: true }); + assert.equal(drawn.drawn, 2); + assert.equal(changes, 1, 'one annotate, one change'); + const [line, pin] = engine.list(); + assert.equal(line.manual, true); + assert.equal(line.name, null); + assert.match(line.label, /km|m$/, 'an unnamed line is labelled by its length'); + assert.equal(pin.name, 'Camp'); + + assert.equal(engine.setHidden(pin.id, true), true); + assert.equal(pin.hidden, true); + assert.equal(changes, 2); + + const addsBefore = calls.add; + assert.equal(engine.restyle(line.id, { name: 'Ridge walk', color: 'green' }), true); + assert.equal(line.name, 'Ridge walk'); + assert.match(line.label, /^Ridge walk — /, 'a renamed line keeps its length'); + assert.equal(line.color, 'green'); + assert.equal(calls.add, addsBefore + 1, 'the new look is drawn again'); + assert.equal(engine.restyle(line.id, { color: 'not-a-colour' }), true); + assert.equal(line.color, 'green', 'an unknown colour is ignored'); + + assert.equal(engine.frame(line.id), true); + assert.equal(flights.length, 1); + assert.equal(engine.frame('anno-missing'), false); + + assert.equal(engine.remove(pin.id), true); + assert.deepEqual(engine.list().map(({ id }) => id), [line.id]); + assert.equal(engine.remove(pin.id), false); + + engine.clear(); + assert.equal(engine.list().length, 0); + const seen = changes; + unsubscribe(); + await engine.annotate([{ type: 'pin', manual: true, latitude: 1, longitude: 1 }], { persist: true }); + assert.equal(changes, seen, 'an unsubscribed listener hears nothing'); +}); + +test('hand-drawn marks: only a manual mark can be restyled', async (t) => { + installAnimationFrameStubs(t); + _resetRenderGovernorForTest(); + t.after(() => _resetRenderGovernorForTest()); + const { renderer } = fakeRenderer(); + const engine = createAnnotationEngine({ + viewer: {}, + renderer, + resolveTarget: async () => ({ ...FIXED_POINT }), + }); + await engine.annotate([{ type: 'point', target: 'Texas Capitol', label: 'Capitol' }]); + const [voiceMark] = engine.list(); + assert.equal(voiceMark.manual, false); + assert.equal(engine.restyle(voiceMark.id, { name: 'Renamed' }), false); + assert.equal(voiceMark.label, 'Capitol'); +}); diff --git a/src/annotations/drawMarkList.js b/src/annotations/drawMarkList.js new file mode 100644 index 0000000000..dc6c24a729 --- /dev/null +++ b/src/annotations/drawMarkList.js @@ -0,0 +1,259 @@ +/** + * The shapes drawn by hand, listed under Draw the way Import lists its files: + * one row per shape with its colour, its name, and show/hide, fly-to and + * remove. The name is edited in place and the colour picked from the row, so + * a shape is labelled and coloured after it is drawn, when it can be seen. + * + * The board is the annotation engine's: this list only reads `list()`, asks + * for changes through `remove`, `setHidden`, `frame` and `restyle`, and + * re-renders on `onChange`. Voice marks are not listed; only `manual` ones. + */ +import { msg, t } from '../i18n/index.js'; + +export const DRAW_COLORS = Object.freeze([ + 'primary', + 'amber', + 'cyan', + 'green', + 'red', +]); +/** The swatch for each colour, matching the preview and the drawn shape. */ +export const DRAW_COLOR_CSS = Object.freeze({ + primary: '#8be9ff', + amber: '#ffb547', + cyan: '#39d0ff', + green: '#5dff9f', + red: '#ff6b6b', +}); +const COLOR_NAMES = Object.freeze({ + primary: msg('Primary'), + amber: msg('Amber'), + cyan: msg('Cyan'), + green: msg('Green'), + red: msg('Red'), +}); +const SHAPE_NAMES = Object.freeze({ + area: msg('Area'), + route: msg('Line'), + pin: msg('Pin'), +}); + +/** What a row calls a shape that has no name of its own. */ +export function drawMarkFallbackName(mark) { + const shape = t(SHAPE_NAMES[mark?.type] || SHAPE_NAMES.pin); + // An unnamed line's label is its length; keep it, it is the useful part. + return mark?.type === 'route' && !mark.name && mark.label + ? `${shape} · ${mark.label}` + : shape; +} + +/** + * @param {{ + * listEl: HTMLElement, + * annotations: {list: Function, remove: Function, setHidden: Function, + * frame: Function, restyle: Function, onChange?: Function}, + * listen: (target: EventTarget, type: string, listener: Function, options?: object) => void, + * }} deps + * @returns {{render: Function, marks: Function, destroy: Function}} + */ +export function createDrawMarkList({ listEl, annotations, listen }) { + const doc = listEl.ownerDocument; + let destroyed = false; + let picking = null; // the id whose colour picker is open + + const marks = () => + (annotations.list?.() || []).filter((mark) => mark?.manual === true); + const find = (id) => marks().find((mark) => mark.id === id) || null; + + /** Which row control has focus, so a re-render can give it back. */ + function focusedControl() { + const active = doc.activeElement; + if (!active || !listEl.contains?.(active)) return null; + const row = active.closest?.('[data-mark-id]'); + return row + ? { id: row.dataset.markId, control: active.dataset?.control } + : null; + } + + function restoreFocus(was) { + if (!was) return; + const row = [...listEl.querySelectorAll('[data-mark-id]')].find( + (node) => node.dataset.markId === was.id, + ); + row?.querySelector?.(`[data-control="${was.control}"]`)?.focus?.(); + } + + function actionButton(icon, label, control) { + const button = doc.createElement('button'); + button.type = 'button'; + button.className = 'geo-import-action'; + button.dataset.control = control; + button.title = label; + button.setAttribute('aria-label', label); + const glyph = doc.createElement('span'); + glyph.className = 'material-symbols-outlined'; + glyph.setAttribute('aria-hidden', 'true'); + glyph.textContent = icon; + button.append(glyph); + return button; + } + + function colorPicker(mark) { + const picker = doc.createElement('div'); + picker.className = 'draw-colors draw-mark-colors'; + picker.setAttribute('role', 'radiogroup'); + picker.setAttribute( + 'aria-label', + t('Colour of {name}', { name: label(mark) }), + ); + for (const color of DRAW_COLORS) { + const swatch = doc.createElement('button'); + swatch.type = 'button'; + swatch.className = `draw-color${color === mark.color ? ' active' : ''}`; + swatch.dataset.color = color; + swatch.dataset.control = `color-${color}`; + swatch.setAttribute('role', 'radio'); + swatch.setAttribute('aria-checked', String(color === mark.color)); + const name = t(COLOR_NAMES[color]); + swatch.title = name; + swatch.setAttribute('aria-label', name); + picker.append(swatch); + } + return picker; + } + + const label = (mark) => mark.name || drawMarkFallbackName(mark); + + function render() { + if (destroyed) return; + const keep = focusedControl(); + const list = marks(); + if (picking && !list.some((mark) => mark.id === picking)) picking = null; + listEl.replaceChildren( + ...list.map((mark) => { + const row = doc.createElement('li'); + row.className = 'geo-import-row draw-mark-row'; + row.dataset.markId = mark.id; + if (mark.hidden) row.classList.add('hidden-mark'); + + const swatch = doc.createElement('button'); + swatch.type = 'button'; + swatch.className = 'geo-import-swatch draw-mark-swatch'; + swatch.dataset.control = 'swatch'; + swatch.style.background = DRAW_COLOR_CSS[mark.color] || ''; + const swatchLabel = t('Change the colour of {name}', { + name: label(mark), + }); + swatch.title = swatchLabel; + swatch.setAttribute('aria-label', swatchLabel); + swatch.setAttribute('aria-expanded', String(picking === mark.id)); + + // textContent and value only, never markup: the name is typed text. + const name = doc.createElement('input'); + name.type = 'text'; + name.className = 'geo-import-name draw-mark-name'; + name.dataset.control = 'name'; + name.maxLength = 120; + name.autocomplete = 'off'; + name.spellcheck = false; + name.value = mark.name || ''; + name.placeholder = drawMarkFallbackName(mark); + name.setAttribute( + 'aria-label', + t('Name of {name}', { name: label(mark) }), + ); + + const visible = !mark.hidden; + const toggle = actionButton( + visible ? 'visibility' : 'visibility_off', + visible + ? t('Hide {name}', { name: label(mark) }) + : t('Show {name}', { name: label(mark) }), + 'toggle', + ); + toggle.setAttribute('aria-pressed', String(visible)); + row.append( + swatch, + name, + toggle, + actionButton( + 'my_location', + t('Fly to {name}', { name: label(mark) }), + 'fly', + ), + actionButton( + 'close', + t('Remove {name}', { name: label(mark) }), + 'remove', + ), + ); + if (picking === mark.id) row.append(colorPicker(mark)); + return row; + }), + ); + listEl.classList.toggle('visible', list.length > 0); + restoreFocus(keep); + } + + const rowId = (node) => node?.closest?.('[data-mark-id]')?.dataset.markId; + + /** Commit a typed name; an unchanged one costs nothing. */ + function commitName(input) { + const id = rowId(input); + const mark = id && find(id); + if (!mark) return; + const next = input.value.trim(); + if (next === (mark.name || '')) return; + annotations.restyle(id, { name: next }); + } + + listen(listEl, 'click', (event) => { + const control = event.target?.closest?.('[data-control]'); + const id = rowId(control); + if (!control || !id) return; + const kind = control.dataset.control; + if (kind === 'swatch') { + picking = picking === id ? null : id; + render(); + } else if (kind.startsWith('color-')) { + picking = null; + annotations.restyle(id, { color: control.dataset.color }); + render(); + } else if (kind === 'toggle') annotations.setHidden(id, !find(id)?.hidden); + else if (kind === 'fly') annotations.frame(id); + else if (kind === 'remove') annotations.remove(id); + }); + listen(listEl, 'keydown', (event) => { + const input = event.target; + if (input?.dataset?.control !== 'name') return; + if (event.key === 'Enter') { + event.preventDefault(); + commitName(input); + input.blur?.(); + } else if (event.key === 'Escape') { + // Escape undoes the edit; it must not also leave Draw or cancel a shape. + event.preventDefault(); + event.stopPropagation(); + input.value = find(rowId(input))?.name || ''; + input.blur?.(); + } + }); + listen(listEl, 'focusout', (event) => { + if (event.target?.dataset?.control === 'name') commitName(event.target); + }); + + const unsubscribe = annotations.onChange?.(render) || (() => {}); + render(); + + return { + render, + marks, + destroy() { + if (destroyed) return; + destroyed = true; + unsubscribe(); + listEl.replaceChildren(); + listEl.classList.remove('visible'); + }, + }; +} diff --git a/src/annotations/drawMarkList.test.mjs b/src/annotations/drawMarkList.test.mjs new file mode 100644 index 0000000000..fb7567e606 --- /dev/null +++ b/src/annotations/drawMarkList.test.mjs @@ -0,0 +1,280 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { createDrawMarkList, drawMarkFallbackName } from './drawMarkList.js'; + +/** Just enough DOM for the list: rows, inputs, buttons, attributes, focus. */ +function fakeDocument() { + const doc = { activeElement: null }; + const matches = (node, selector) => { + const attr = /^\[data-([a-z-]+)(?:="([^"]*)")?\]$/.exec(selector); + if (!attr) return false; + const key = attr[1].replace(/-([a-z])/g, (_, c) => c.toUpperCase()); + return attr[2] === undefined + ? node.dataset[key] !== undefined + : node.dataset[key] === attr[2]; + }; + doc.createElement = (tag) => { + const classes = new Set(); + const node = { + tagName: tag.toUpperCase(), + ownerDocument: doc, + parent: null, + children: [], + dataset: {}, + style: {}, + attributes: new Map(), + value: '', + placeholder: '', + title: '', + textContent: '', + classList: { + add: (name) => classes.add(name), + remove: (name) => classes.delete(name), + contains: (name) => classes.has(name), + toggle: (name, on) => (on ? classes.add(name) : classes.delete(name)), + }, + set className(value) { + classes.clear(); + for (const name of String(value).split(/\s+/).filter(Boolean)) + classes.add(name); + }, + get className() { + return [...classes].join(' '); + }, + setAttribute(key, value) { + this.attributes.set(key, String(value)); + }, + getAttribute(key) { + return this.attributes.get(key) ?? null; + }, + append(...nodes) { + for (const child of nodes) { + child.parent = this; + this.children.push(child); + } + }, + replaceChildren(...nodes) { + this.children = []; + this.append(...nodes); + }, + closest(selector) { + let node = this; + while (node && !matches(node, selector)) node = node.parent; + return node || null; + }, + querySelectorAll(selector) { + const found = []; + const walk = (node) => { + for (const child of node.children) { + if (matches(child, selector)) found.push(child); + walk(child); + } + }; + walk(this); + return found; + }, + querySelector(selector) { + return this.querySelectorAll(selector)[0] || null; + }, + contains(other) { + for (let node = other; node; node = node.parent) + if (node === this) return true; + return false; + }, + focus() { + doc.activeElement = this; + }, + blur() { + if (doc.activeElement === this) doc.activeElement = null; + }, + }; + return node; + }; + return doc; +} + +function harness(initial) { + const doc = fakeDocument(); + const listEl = doc.createElement('ul'); + const listeners = {}; + const listen = (target, type, listener) => { + listeners[type] = listener; + }; + let marks = initial.map((mark) => ({ hidden: false, ...mark })); + const changeListeners = new Set(); + const changed = () => changeListeners.forEach((listener) => listener()); + const calls = []; + const annotations = { + list: () => marks, + onChange: (listener) => { + changeListeners.add(listener); + return () => changeListeners.delete(listener); + }, + remove(id) { + calls.push(['remove', id]); + marks = marks.filter((mark) => mark.id !== id); + changed(); + }, + setHidden(id, hidden) { + calls.push(['hide', id, hidden]); + marks.find((mark) => mark.id === id).hidden = hidden; + changed(); + }, + frame(id) { + calls.push(['frame', id]); + }, + restyle(id, change) { + calls.push(['restyle', id, change]); + Object.assign( + marks.find((mark) => mark.id === id), + change, + ); + changed(); + }, + }; + const list = createDrawMarkList({ listEl, annotations, listen }); + const rows = () => listEl.children; + const control = (row, name) => row.querySelector(`[data-control="${name}"]`); + const click = (target) => listeners.click({ target }); + return { list, listEl, listeners, rows, control, click, calls, changed }; +} + +const LINE = { + id: 'a1', + type: 'route', + manual: true, + name: null, + label: '1.2 km', + color: 'primary', +}; +const PIN = { + id: 'a2', + type: 'pin', + manual: true, + name: 'Camp', + label: 'Camp', + color: 'amber', +}; +const VOICE = { + id: 'a3', + type: 'area', + manual: false, + label: 'Texas', + color: 'primary', +}; + +test('lists only hand-drawn marks, named or by shape, with Import-style actions', () => { + const { rows, control, listEl } = harness([LINE, PIN, VOICE]); + assert.deepEqual( + rows().map((row) => row.dataset.markId), + ['a1', 'a2'], + ); + assert.ok(listEl.classList.contains('visible')); + const [line, pin] = rows(); + assert.equal(control(line, 'name').value, ''); + assert.equal(control(line, 'name').placeholder, 'Line · 1.2 km'); + assert.equal(control(pin, 'name').value, 'Camp'); + assert.equal(control(pin, 'swatch').style.background, '#ffb547'); + assert.equal(control(pin, 'toggle').getAttribute('aria-pressed'), 'true'); + assert.equal(control(pin, 'fly').getAttribute('aria-label'), 'Fly to Camp'); + assert.equal( + control(pin, 'remove').getAttribute('aria-label'), + 'Remove Camp', + ); +}); + +test('show/hide, fly to and remove act on that one mark', () => { + const { rows, control, click, calls } = harness([LINE, PIN]); + click(control(rows()[1], 'toggle')); + assert.deepEqual(calls.at(-1), ['hide', 'a2', true]); + assert.equal( + control(rows()[1], 'toggle').getAttribute('aria-pressed'), + 'false', + ); + assert.ok(rows()[1].classList.contains('hidden-mark')); + click(control(rows()[0], 'fly')); + assert.deepEqual(calls.at(-1), ['frame', 'a1']); + click(control(rows()[0], 'remove')); + assert.deepEqual(calls.at(-1), ['remove', 'a1']); + assert.deepEqual( + rows().map((row) => row.dataset.markId), + ['a2'], + ); +}); + +test('the swatch opens a colour picker in the row; a colour restyles the mark', () => { + const { rows, control, click, calls } = harness([LINE]); + click(control(rows()[0], 'swatch')); + assert.equal( + control(rows()[0], 'swatch').getAttribute('aria-expanded'), + 'true', + ); + const red = control(rows()[0], 'color-red'); + assert.ok(red, 'the picker offers every colour'); + click(red); + assert.deepEqual(calls.at(-1), ['restyle', 'a1', { color: 'red' }]); + assert.equal( + control(rows()[0], 'color-red'), + null, + 'choosing closes the picker', + ); + assert.equal(control(rows()[0], 'swatch').style.background, '#ff6b6b'); +}); + +test('a name is committed on Enter or blur, and Escape undoes the edit without leaving Draw', () => { + const { rows, control, listeners, calls } = harness([LINE, PIN]); + const name = control(rows()[0], 'name'); + name.value = ' Ridge walk '; + listeners.keydown({ key: 'Enter', target: name, preventDefault() {} }); + assert.deepEqual(calls.at(-1), ['restyle', 'a1', { name: 'Ridge walk' }]); + + const pinName = control(rows()[1], 'name'); + pinName.value = 'Base'; + let stopped = false; + listeners.keydown({ + key: 'Escape', + target: pinName, + preventDefault() {}, + stopPropagation() { + stopped = true; + }, + }); + assert.equal(pinName.value, 'Camp', 'Escape restores the name'); + assert.ok(stopped, 'Escape stays in the field'); + + const count = calls.length; + listeners.focusout({ target: control(rows()[1], 'name') }); + assert.equal(calls.length, count, 'an unchanged name costs nothing'); + control(rows()[1], 'name').value = 'Base'; + listeners.focusout({ target: control(rows()[1], 'name') }); + assert.deepEqual(calls.at(-1), ['restyle', 'a2', { name: 'Base' }]); +}); + +test('a re-render keeps focus on the same control, and destroy stops listening', () => { + const { rows, control, list, listEl, changed } = harness([LINE]); + control(rows()[0], 'fly').focus(); + changed(); + assert.equal(listEl.ownerDocument.activeElement, control(rows()[0], 'fly')); + list.destroy(); + assert.equal(rows().length, 0); + assert.ok(!listEl.classList.contains('visible')); + changed(); + assert.equal(rows().length, 0, 'a destroyed list does not re-render'); +}); + +test('an unnamed shape is called by its kind', () => { + assert.equal(drawMarkFallbackName({ type: 'area' }), 'Area'); + assert.equal(drawMarkFallbackName({ type: 'pin' }), 'Pin'); + assert.equal( + drawMarkFallbackName({ type: 'route', label: '300 m' }), + 'Line · 300 m', + ); + assert.equal( + drawMarkFallbackName({ + type: 'route', + name: 'Walk', + label: 'Walk — 300 m', + }), + 'Line', + ); +}); diff --git a/src/annotations/drawTool.js b/src/annotations/drawTool.js index b123c0695f..c352f26e8f 100644 --- a/src/annotations/drawTool.js +++ b/src/annotations/drawTool.js @@ -3,7 +3,8 @@ * * UTILITIES ▸ Draw turns the globe into a whiteboard you draw on by hand: pick a * shape (area, line or pin), click the vertices on the real world, double-click - * or press Enter to finish, type a label. Each finished shape goes through the + * or press Enter to finish, then name and colour it in its row. Each finished + * shape goes through the * SAME `annotationEngine.annotate()` the voice agent uses, with its geometry * supplied and `manual: true`, so it renders with the whiteboard look, * persists, de-dups, shows up in `.list()`, and clears with the board. @@ -50,19 +51,18 @@ import { removeLastVertex, } from './drawMode.js'; +import { + DRAW_COLORS, + DRAW_COLOR_CSS, + createDrawMarkList, +} from './drawMarkList.js'; + import { msg, registerUnsavedWork, t, translateKnown } from '../i18n/index.js'; /** The id this tool claims the pointer under. */ const DRAW_POINTER_OWNER = 'draw'; const PREVIEW_DATA_SOURCE_NAME = 'gev-draw-preview'; -const COLORS = ['primary', 'amber', 'cyan', 'green', 'red']; -const PREVIEW = { - primary: '#8be9ff', - amber: '#ffb547', - cyan: '#39d0ff', - green: '#5dff9f', - red: '#ff6b6b', -}; +const PREVIEW = DRAW_COLOR_CSS; /** * Wire the Draw control. Returns a handle with a `destroy()` the application @@ -74,8 +74,8 @@ export function initDrawTool({ viewer, annotations }) { const toggle = document.getElementById('draw-toggle'); const modeRow = document.getElementById('draw-mode-row'); const labelRow = document.getElementById('draw-label-row'); - const labelInput = document.getElementById('draw-label-input'); - const colorSelect = document.getElementById('draw-color-select'); + const colorRow = document.getElementById('draw-colors'); + const markListEl = document.getElementById('draw-mark-list'); const clearButton = document.getElementById('draw-clear'); const hint = document.getElementById('draw-hint'); if (!viewer || !annotations || !toggle) return null; @@ -238,14 +238,14 @@ export function initDrawTool({ viewer, annotations }) { if (reason !== 'too-few') setHint(drawHint(session)); return null; } - const spec = finishSpec(session, { label: labelInput?.value || '', color }); + // Named afterwards, in the shape's row. + const spec = finishSpec(session, { label: '', color }); if (!spec) return null; // Start a fresh session BEFORE awaiting, so a second Enter or the second // half of a double-click cannot submit the same shape twice. session = createDrawSession(shape); cursor = null; syncPreview(); - if (labelInput) labelInput.value = ''; const attempt = generation; try { const result = await annotations.annotate([spec], { @@ -285,7 +285,7 @@ export function initDrawTool({ viewer, annotations }) { // ---- keys: only while drawing, never while typing in another field ---- const typingElsewhere = (event) => { const t = event.target; - if (!t || t === labelInput) return false; + if (!t) return false; return ( t.tagName === 'INPUT' || t.tagName === 'TEXTAREA' || t.isContentEditable ); @@ -293,12 +293,12 @@ export function initDrawTool({ viewer, annotations }) { /** * Enter is the finish key, but on a focused control Enter means "press this * control". Keyboard-focusing Clear and pressing Enter must clear the board, - * not finish the shape — so the finish key is only taken from the canvas, - * the page body, or the label field this tool owns. + * not finish the shape — so the finish key is only taken from the canvas or + * the page body. */ const enterBelongsToDrawing = (event) => { const t = event.target; - if (!t || t === labelInput) return true; + if (!t) return true; if ( typeof t.closest === 'function' && t.closest('button, a, select, [role="button"], [role="radio"]') @@ -328,7 +328,7 @@ export function initDrawTool({ viewer, annotations }) { else setActive(false); return; } - if (event.key === 'Backspace' && event.target !== labelInput) { + if (event.key === 'Backspace') { if (removeLastVertex(session)) { event.preventDefault(); syncPreview(); @@ -448,18 +448,21 @@ export function initDrawTool({ viewer, annotations }) { } }, }); - listen(colorSelect, 'change', () => { - color = COLORS.includes(colorSelect.value) ? colorSelect.value : 'primary'; - syncPreview(); + const colorControl = createSegmentedControl({ + buttons: [...(colorRow?.querySelectorAll('.draw-color[data-color]') || [])], + valueOf: (button) => button.dataset.color, + listen, + onChange: (value) => { + color = DRAW_COLORS.includes(value) ? value : 'primary'; + colorControl.update(color); + syncPreview(); + }, }); listen(clearButton, 'click', clearAll); - listen(labelInput, 'keydown', (event) => { - if (event.key === 'Enter' && session?.vertices?.length) { - event.preventDefault(); - void finish(); - } - }); setHint(drawHint(null)); + const markList = markListEl + ? createDrawMarkList({ listEl: markListEl, annotations, listen }) + : null; const api = { get active() { @@ -488,6 +491,11 @@ export function initDrawTool({ viewer, annotations }) { finish, cancel, clearAll, + /** The hand-drawn marks the list shows. */ + marks: () => markList?.marks() || [], + setColor(next) { + colorRow?.querySelector(`.draw-color[data-color="${next}"]`)?.click(); + }, shapes: DRAW_SHAPES, /** What this tool currently holds — for teardown and leak assertions. */ diagnostics() { @@ -527,6 +535,7 @@ export function initDrawTool({ viewer, annotations }) { if (active) setActive(false); destroyed = true; unregisterUnsavedWork(); + markList?.destroy(); releaseSceneHandler(); releasePointer(lease); lease = null; diff --git a/src/annotations/drawTool.test.mjs b/src/annotations/drawTool.test.mjs index c1a1b7681e..709004200e 100644 --- a/src/annotations/drawTool.test.mjs +++ b/src/annotations/drawTool.test.mjs @@ -69,8 +69,8 @@ test('the Draw control markup carries the ids the tool binds to', () => { 'draw-toggle', 'draw-mode-row', 'draw-label-row', - 'draw-label-input', - 'draw-color-select', + 'draw-colors', + 'draw-mark-list', 'draw-clear', 'draw-hint', ]; @@ -81,13 +81,25 @@ test('the Draw control markup carries the ids the tool binds to', () => { `#${id} missing from index.html`, ); } - for (const shape of ['area', 'line', 'pin']) { + // Shapes are icons, named for screen readers and tooltips. + for (const [shape, name] of [ + ['area', 'Area'], + ['line', 'Line'], + ['pin', 'Pin'], + ]) { assert.match( html, - new RegExp(`data-shape="${shape}"`), + new RegExp( + `data-shape="${shape}"[^>]*aria-label="${name}"[^>]*title="${name}"`, + ), `shape button ${shape} missing`, ); } + for (const color of ['primary', 'amber', 'cyan', 'green', 'red']) + assert.match( + html, + new RegExp(`class="draw-color[^"]*" type="button" data-color="${color}"`), + ); for (const id of ids) { assert.match( tool(), @@ -108,14 +120,15 @@ test('the DISPLAY rail styles live in their current owner, not the shim', () => ); assert.doesNotMatch( shim, - /draw-hint|pp-text-input/, + /draw-hint|draw-color/, 'draw styles belong to a component stylesheet', ); const controls = read('src/ui/styles/controls.css'); for (const rule of [ '#draw-mode-row', '#draw-label-row', - '.pp-text-input', + '.draw-color', + '.draw-mark-name', '.draw-clear-btn', '.draw-hint', 'body.gev-drawing', diff --git a/src/annotations/drawToolBehaviour.test.mjs b/src/annotations/drawToolBehaviour.test.mjs index f8b9afcd19..fad1cc41d7 100644 --- a/src/annotations/drawToolBehaviour.test.mjs +++ b/src/annotations/drawToolBehaviour.test.mjs @@ -116,8 +116,7 @@ function fakeDom() { modeRow.children.push(button); } make('draw-label-row'); - make('draw-label-input', 'INPUT'); - make('draw-color-select', 'SELECT'); + make('draw-colors'); make('draw-clear', 'BUTTON'); make('draw-hint', 'SPAN'); diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 9fdfac1b15..b3631bff20 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -902,14 +902,15 @@ "Board cleared.": "Tablero borrado.", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "Dibuja sobre el mundo: haz clic en los vértices, doble clic o Enter para terminar, Esc para cancelar", "Draw": "Dibujo", - "Shape": "Forma", "Shape to draw": "Forma a dibujar", "Area": "Área", "Line": "Línea", "Pin": "Marcador", - "Label (optional)": "Etiqueta (opcional)", - "Label for the drawn shape": "Etiqueta de la forma dibujada", - "Colour of the drawn shape": "Color de la forma dibujada", + "Colour of {name}": "Color de {name}", + "Change the colour of {name}": "Cambiar el color de {name}", + "Name of {name}": "Nombre de {name}", + "Colour of the next shape": "Color de la próxima forma", + "Drawn shapes": "Formas dibujadas", "Primary": "Principal", "Amber": "Ámbar", "Cyan": "Cian", diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index baf98e27c0..e62edc23d3 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -910,14 +910,15 @@ "Board cleared.": "Доска очищена.", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "Рисовать на карте мира — щёлкайте по вершинам, двойной щелчок или Enter — завершить, Esc — отменить", "Draw": "Рисование", - "Shape": "Фигура", "Shape to draw": "Фигура для рисования", "Area": "Зона", "Line": "Линия", "Pin": "Метка", - "Label (optional)": "Подпись (необязательно)", - "Label for the drawn shape": "Подпись нарисованной фигуры", - "Colour of the drawn shape": "Цвет нарисованной фигуры", + "Colour of {name}": "Цвет: {name}", + "Change the colour of {name}": "Изменить цвет: {name}", + "Name of {name}": "Название: {name}", + "Colour of the next shape": "Цвет следующей фигуры", + "Drawn shapes": "Нарисованные фигуры", "Primary": "Основной", "Amber": "Янтарный", "Cyan": "Голубой", diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index d869e077a7..9ea6d3b005 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -2657,14 +2657,15 @@ "Scope edge feather": "视域边缘羽化", "Scope edge feather as a percentage of the keyhole radius": "视域边缘羽化,以视域半径的百分比表示", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "在地球上绘制——单击放置顶点,双击或按 Enter 完成,按 Esc 取消", - "Shape": "形状", "Shape to draw": "要绘制的形状", "Area": "面", "Line": "线", "Pin": "图钉", - "Label (optional)": "标签(可选)", - "Label for the drawn shape": "绘制形状的标签", - "Colour of the drawn shape": "绘制形状的颜色", + "Colour of {name}": "{name} 的颜色", + "Change the colour of {name}": "更改 {name} 的颜色", + "Name of {name}": "{name} 的名称", + "Colour of the next shape": "下一个形状的颜色", + "Drawn shapes": "已绘制的形状", "Primary": "主题色", "Amber": "琥珀色", "Cyan": "青色", diff --git a/src/i18n/locales/zh-Hant.json b/src/i18n/locales/zh-Hant.json index 4e98cf9d6a..47770da7b2 100644 --- a/src/i18n/locales/zh-Hant.json +++ b/src/i18n/locales/zh-Hant.json @@ -2645,14 +2645,15 @@ "Scope edge feather": "視域邊緣羽化", "Scope edge feather as a percentage of the keyhole radius": "視域邊緣羽化,以視域半徑的百分比表示", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "在地球上繪製——單擊放置頂點,雙擊或按 Enter 完成,按 Esc 取消", - "Shape": "形狀", "Shape to draw": "要繪製的形狀", "Area": "面", "Line": "線", "Pin": "圖釘", - "Label (optional)": "標籤(可選)", - "Label for the drawn shape": "繪製形狀的標籤", - "Colour of the drawn shape": "繪製形狀的顏色", + "Colour of {name}": "{name} 的顏色", + "Change the colour of {name}": "更改 {name} 的顏色", + "Name of {name}": "{name} 的名稱", + "Colour of the next shape": "下一個形狀的顏色", + "Drawn shapes": "已繪製的形狀", "Primary": "主題色", "Amber": "琥珀色", "Cyan": "青色", diff --git a/src/ui/styles/controls.css b/src/ui/styles/controls.css index 15d8bb48dd..df214e5cde 100644 --- a/src/ui/styles/controls.css +++ b/src/ui/styles/controls.css @@ -750,38 +750,117 @@ html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label { min-width: 0; } -/* UTILITIES ▸ Draw: shape segment, label field, colour, and the one-line hint */ +/* UTILITIES ▸ Draw: shape icons and colour swatches for the next shape, the + hint with Clear, then one row per drawn shape (named and recoloured there) */ #draw-mode-row { - min-width: 184px; -} -#draw-label-row { flex-wrap: wrap; row-gap: 6px; + column-gap: 10px; } -.pp-text-input { - flex: 1 1 110px; - min-width: 0; - height: 24px; - background: rgba(255, 255, 255, 0.06); - border: 1px solid rgba(255, 255, 255, 0.14); - border-radius: 6px; - color: var(--text-primary); - font-family: var(--font-mono); - font-size: 10px; - letter-spacing: 0.6px; - padding: 2px 6px; +#draw-mode-row .draw-shape-seg { + flex: 0 0 auto; +} +#draw-mode-row .draw-shape-seg .gev-segment { + min-width: 30px; + padding: 3px 6px; +} +.draw-shape-seg .material-symbols-outlined { + display: block; + font-size: 16px; + line-height: 1; +} +.draw-colors { + display: flex; + align-items: center; + gap: 6px; +} +#utilities-panel .draw-color { + flex: 0 0 auto; + width: 16px; + height: 16px; + padding: 0; + border: 1px solid rgba(0, 0, 0, 0.45); + border-radius: 50%; + cursor: pointer; +} +#utilities-panel .draw-color[data-color='primary'] { + background: #8be9ff; +} +#utilities-panel .draw-color[data-color='amber'] { + background: #ffb547; +} +#utilities-panel .draw-color[data-color='cyan'] { + background: #39d0ff; +} +#utilities-panel .draw-color[data-color='green'] { + background: #5dff9f; +} +#utilities-panel .draw-color[data-color='red'] { + background: #ff6b6b; +} +/* The swatch keeps its own colour in every theme; only a ring marks it. */ +#utilities-panel .draw-color:is(.active, :hover, :focus-visible) { + border-color: rgba(0, 0, 0, 0.45); + box-shadow: none; +} +#utilities-panel .draw-color.active, +#utilities-panel .draw-color:focus-visible { + outline: 2px solid var(--text-primary); + outline-offset: 2px; +} +#draw-label-row { + justify-content: space-between; + gap: 8px; +} +#draw-label-row .draw-hint { + flex: 1 1 auto; +} +.draw-mark-row { + flex-wrap: wrap; +} +.draw-mark-swatch { + flex: 0 0 10px; + width: 10px; + height: 10px; + padding: 0; + border: 0; + border-radius: 3px; + cursor: pointer; +} +.draw-mark-swatch:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; +} +/* The name reads as text until it is clicked into, and gives way so the + row's buttons stay on its line. */ +.draw-mark-row .draw-mark-name { + flex: 1 1 0; + width: 0; + height: 22px; + padding: 0 4px; + background: transparent; + border: 1px solid transparent; + border-radius: 5px; outline: none; } -.pp-text-input:focus { +.draw-mark-name::placeholder { + color: var(--text-primary); + opacity: 0.85; +} +.draw-mark-name:hover { + border-color: rgba(255, 255, 255, 0.14); +} +.draw-mark-name:focus { border-color: var(--accent); + background: rgba(255, 255, 255, 0.06); } -.draw-color-select { - flex: 0 0 74px; +.draw-mark-row.hidden-mark .draw-mark-name, +.draw-mark-row.hidden-mark .draw-mark-swatch { + opacity: 0.45; } -/* Sized to its longest colour name so a translated one is never clipped. */ -html:not([lang='en']) .draw-color-select { - flex: 0 0 auto; - min-width: 74px; +.draw-mark-colors { + flex-basis: 100%; + padding: 2px 0 4px 16px; } .draw-clear-btn { flex: 0 0 auto; diff --git a/src/ui/styles/english-css-parity.test.mjs b/src/ui/styles/english-css-parity.test.mjs index 7d9a1ae4c4..e06926c03e 100644 --- a/src/ui/styles/english-css-parity.test.mjs +++ b/src/ui/styles/english-css-parity.test.mjs @@ -105,8 +105,6 @@ test('Display and parameter rows keep their English layout', () => { assert.equal(unguardedRules(source, '#param-sliders').length, 0); const [row] = unguardedRules(source, '.param-slider-row'); assert.equal(declaration(row, 'display'), 'flex'); - const [color] = unguardedRules(source, '.draw-color-select'); - assert.equal(declaration(color, 'flex'), '0 0 74px'); }); test('weather setting rows keep the 56px English label column', () => { diff --git a/src/ui/styles/layers.css b/src/ui/styles/layers.css index a787c2b3d4..9d8b66166f 100644 --- a/src/ui/styles/layers.css +++ b/src/ui/styles/layers.css @@ -1495,8 +1495,7 @@ body.recording-mode #right-context-rail > [data-panel-id] { } /* Draw's options sit flat under its name, like a layer row's controls, not - as the card that hangs under a DISPLAY button. DISPLAY's shared label - column means nothing here, so the Shape label takes its own width. */ + as the card that hangs under a DISPLAY button. */ #utilities-panel .utilities-tools .pp-slider-row { padding: 4px 0; background: none; @@ -1505,7 +1504,3 @@ body.recording-mode #right-context-rail > [data-panel-id] { backdrop-filter: none; -webkit-backdrop-filter: none; } - -#utilities-panel .utilities-tools .pp-slider-mini-label { - min-width: 0; -} diff --git a/src/ui/templates/layer-panels.html b/src/ui/templates/layer-panels.html index eb7f7dcfd6..c5284d97d8 100644 --- a/src/ui/templates/layer-panels.html +++ b/src/ui/templates/layer-panels.html @@ -159,25 +159,24 @@ Draw
- Shape -
- - - +
+ + + +
+
+ + + + +
- - - +
+
    + - +

    SAVE & SHARE

    diff --git a/src/voice/gevActions.test.mjs b/src/voice/gevActions.test.mjs index 4a3a8ec727..6145a998d6 100644 --- a/src/voice/gevActions.test.mjs +++ b/src/voice/gevActions.test.mjs @@ -3931,3 +3931,26 @@ test('analyst-only lookup distinguishes duplicate names and uses canonical aircr assert.equal(plane.ok, true); assert.equal(plane.latitude, 36, 'canonical ID resolves the current position, not old coordinates'); }); + +test('set_panel_open accepts the Authoring name for the scene panel', async () => { + const calls = []; + const runner = createGevActionRunner({ + viewer: { + clock: { onTick: { addEventListener: () => () => {} } }, + scene: { canvas: { addEventListener() {}, removeEventListener() {} } }, + camera: { + moveEnd: { addEventListener() {} }, + positionWC: Cesium.Cartesian3.fromDegrees(-97.7, 30.2, 1000), + }, + }, + styleManager: { + setPanelCollapsed: (...args) => calls.push(args), + }, + dataManager: { layers: new Map(), isEnabled: () => false, getAll: () => [] }, + }); + for (const panel of ['authoring', 'Authoring', 'scenes']) { + const result = await runner('set_panel_open', { panelId: panel, open: true }); + assert.equal(result.panelId, 'scene-panel'); + } + assert.deepEqual(calls.at(-1), ['scene-panel', false, { explicit: true }]); +}); From a4820315d9ac091753e22faab192050711434a23 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 29 Oct 2026 18:47:56 +0000 Subject: [PATCH 083/237] Translate Authoring for the six new languages and fit long words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the Authoring labels and tooltips to the de, fr, it, ja, pt and uk catalogs that arrived from main, and prunes the retired SCENES-era entries there. The file row's tighter padding and letter spacing keep one long translated word per line in the narrow Cyber panel (IMPORTIEREN, ESECUZIONE, ІМПОРТУВАТИ, EJECUCIÓN). --- src/i18n/locales/de.json | 31 ++++++++++++++++++++++++------- src/i18n/locales/fr.json | 31 ++++++++++++++++++++++++------- src/i18n/locales/it.json | 31 ++++++++++++++++++++++++------- src/i18n/locales/ja.json | 31 ++++++++++++++++++++++++------- src/i18n/locales/pt.json | 31 ++++++++++++++++++++++++------- src/i18n/locales/uk.json | 31 ++++++++++++++++++++++++------- src/ui/styles/scenes.css | 3 +++ 7 files changed, 147 insertions(+), 42 deletions(-) diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index 874fd5f312..3c5618b5b8 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -833,13 +833,7 @@ "SAVE CAL": "KAL. SPEICHERN", "RESET CAL": "KAL. ZURÜCKSETZEN", "SCENE SUMMARY": "SZENEN-ÜBERSICHT", - "SCENES": "SZENEN", - "Scene recipe": "Szenenrezept", - "NEW": "NEU", - "CAPTURE SHOT": "AUFNAHME SPEICHERN", "UPDATE SHOT": "AUFNAHME AKTUALISIEREN", - "START": "START", - "EXPORT PRESETS": "PRESETS EXPORTIEREN", "IMPORT": "IMPORTIEREN", "RUN LOG": "PROTOKOLL", "POWER UP": "STARTKLAR", @@ -2922,5 +2916,28 @@ "Malformed cyclone snapshot": "Fehlerhafter Wirbelsturm-Snapshot", "STALE · Roads: {source} · Flow: cached TomTom tiles": "VERALTET · Straßen: {source} · Verkehrsfluss: TomTom-Kacheln aus dem Cache", "routing busy — too many routes at once": "Routing-Dienst ausgelastet – zu viele Routen gleichzeitig", - "route proxy error": "Fehler des Routen-Proxys" + "route proxy error": "Fehler des Routen-Proxys", + "scene|PLAY": "START", + "AUTHORING": "ERSTELLUNG", + "Create and edit scenes": "Szenen erstellen und bearbeiten", + "SCENE": "SZENE", + "Scene": "Szene", + "NEW SCENE": "NEUE SZENE", + "Start a new, empty scene": "Neue, leere Szene beginnen", + "DELETE": "LÖSCHEN", + "Delete this scene and all of its shots": "Diese Szene mit allen Aufnahmen löschen", + "SHOTS": "AUFNAHMEN", + "+ CAPTURE SHOT": "+ AUFNAHME SPEICHERN", + "Add the current view, style and layers as the next shot": "Aktuelle Ansicht, Stil und Ebenen als nächste Aufnahme hinzufügen", + "Replace the selected shot with the current view": "Ausgewählte Aufnahme durch die aktuelle Ansicht ersetzen", + "Click a shot to select it, double-click to rename.": "Aufnahme anklicken zum Auswählen, Doppelklick zum Umbenennen.", + "Play from this scene through the rest of the project": "Ab dieser Szene bis zum Ende des Projekts abspielen", + "Stop playback (Esc)": "Wiedergabe stoppen (Esc)", + "Play the shot after the selected one, moving on to the next scene when needed": "Aufnahme nach der ausgewählten abspielen, bei Bedarf in der nächsten Szene", + "SAVE & SHARE": "SPEICHERN & TEILEN", + "Download every scene as a JSON file you can import later": "Alle Szenen als JSON-Datei zum späteren Import herunterladen", + "Load scenes from an exported JSON file": "Szenen aus einer exportierten JSON-Datei laden", + "Download the timing log of the last play": "Zeitprotokoll der letzten Wiedergabe herunterladen", + "Edit anchors, data packs and shot details": "Anker, Datenpakete und Aufnahmedetails bearbeiten", + "Download this scene as JSON or an asset bundle": "Diese Szene als JSON oder Asset-Bundle herunterladen" } diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 005a224176..9fbe322645 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -2954,13 +2954,7 @@ "ALL": "TOUTES", "FLAT": "CLASSIQUES", "SINCE": "DEPUIS", - "SCENES": "SCÈNES", - "Scene recipe": "Recette de scène", - "NEW": "NOUV.", - "CAPTURE SHOT": "CAPTURER UN PLAN", "UPDATE SHOT": "MAJ DU PLAN", - "START": "LANCER", - "EXPORT PRESETS": "EXPORTER LES PRÉRÉGLAGES", "IMPORT": "IMPORTER", "RUN LOG": "JOURNAL", "POWER UP": "ALLUMER", @@ -2991,5 +2985,28 @@ "ESC to dismiss": "ESC pour fermer", "Tip: the GEV MIC button in the dock lets you talk to the map.": "Astuce : le bouton GEV MIC du dock permet de parler à la carte.", "Malformed cyclone snapshot": "Instantané cyclonique mal formé", - "Cyclone request timed out": "Délai dépassé pour la requête cyclonique" + "Cyclone request timed out": "Délai dépassé pour la requête cyclonique", + "scene|PLAY": "LIRE", + "AUTHORING": "CRÉATION", + "Create and edit scenes": "Créer et modifier des scènes", + "SCENE": "SCÈNE", + "Scene": "Scène", + "NEW SCENE": "NOUVELLE SCÈNE", + "Start a new, empty scene": "Commencer une nouvelle scène vide", + "DELETE": "SUPPRIMER", + "Delete this scene and all of its shots": "Supprimer cette scène et tous ses plans", + "SHOTS": "PLANS", + "+ CAPTURE SHOT": "+ CAPTURER UN PLAN", + "Add the current view, style and layers as the next shot": "Ajouter la vue, le style et les couches actuels comme plan suivant", + "Replace the selected shot with the current view": "Remplacer le plan sélectionné par la vue actuelle", + "Click a shot to select it, double-click to rename.": "Cliquez sur un plan pour le sélectionner, double-cliquez pour le renommer.", + "Play from this scene through the rest of the project": "Lire de cette scène jusqu'à la fin du projet", + "Stop playback (Esc)": "Arrêter la lecture (Esc)", + "Play the shot after the selected one, moving on to the next scene when needed": "Lire le plan qui suit la sélection, en passant à la scène suivante si besoin", + "SAVE & SHARE": "ENREGISTRER ET PARTAGER", + "Download every scene as a JSON file you can import later": "Télécharger toutes les scènes dans un fichier JSON à importer plus tard", + "Load scenes from an exported JSON file": "Charger des scènes depuis un fichier JSON exporté", + "Download the timing log of the last play": "Télécharger le journal de minutage de la dernière lecture", + "Edit anchors, data packs and shot details": "Modifier les ancres, les paquets de données et les détails des plans", + "Download this scene as JSON or an asset bundle": "Télécharger cette scène en JSON ou en archive de ressources" } diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index bc9732d67d..42938ab2ef 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -2954,13 +2954,7 @@ "ALL": "TUTTE", "FLAT": "PIATTE", "SINCE": "DAL", - "SCENES": "SCENE", - "Scene recipe": "Ricetta della scena", - "NEW": "NUOVA", - "CAPTURE SHOT": "CATTURA SCATTO", "UPDATE SHOT": "AGGIORNA SCATTO", - "START": "AVVIA", - "EXPORT PRESETS": "ESPORTA PRESET", "IMPORT": "IMPORTA", "RUN LOG": "LOG ESECUZIONE", "POWER UP": "ACCENDI", @@ -2991,5 +2985,28 @@ "ESC to dismiss": "ESC per chiudere", "Tip: the GEV MIC button in the dock lets you talk to the map.": "Suggerimento: il pulsante GEV MIC nel dock ti permette di parlare con la mappa.", "Malformed cyclone snapshot": "Snapshot dei cicloni non valido", - "Cyclone request timed out": "La richiesta dei cicloni è andata in timeout" + "Cyclone request timed out": "La richiesta dei cicloni è andata in timeout", + "scene|PLAY": "AVVIA", + "AUTHORING": "CREAZIONE", + "Create and edit scenes": "Crea e modifica le scene", + "SCENE": "SCENA", + "Scene": "Scena", + "NEW SCENE": "NUOVA SCENA", + "Start a new, empty scene": "Inizia una nuova scena vuota", + "DELETE": "ELIMINA", + "Delete this scene and all of its shots": "Elimina questa scena e tutti i suoi scatti", + "SHOTS": "SCATTI", + "+ CAPTURE SHOT": "+ CATTURA SCATTO", + "Add the current view, style and layers as the next shot": "Aggiungi la vista, lo stile e i livelli attuali come scatto successivo", + "Replace the selected shot with the current view": "Sostituisci lo scatto selezionato con la vista attuale", + "Click a shot to select it, double-click to rename.": "Fai clic su uno scatto per selezionarlo, doppio clic per rinominarlo.", + "Play from this scene through the rest of the project": "Riproduci da questa scena fino alla fine del progetto", + "Stop playback (Esc)": "Interrompi la riproduzione (Esc)", + "Play the shot after the selected one, moving on to the next scene when needed": "Riproduci lo scatto dopo quello selezionato, passando alla scena successiva se serve", + "SAVE & SHARE": "SALVA E CONDIVIDI", + "Download every scene as a JSON file you can import later": "Scarica tutte le scene in un file JSON da importare in seguito", + "Load scenes from an exported JSON file": "Carica le scene da un file JSON esportato", + "Download the timing log of the last play": "Scarica il log dei tempi dell'ultima riproduzione", + "Edit anchors, data packs and shot details": "Modifica ancore, pacchetti dati e dettagli degli scatti", + "Download this scene as JSON or an asset bundle": "Scarica questa scena come JSON o pacchetto di risorse" } diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 7ac2840f61..34e4ffaf52 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -2814,13 +2814,7 @@ "ALL": "すべて", "FLAT": "平面", "SINCE": "期間", - "SCENES": "シーン", - "Scene recipe": "シーンレシピ", - "NEW": "新規", - "CAPTURE SHOT": "ショット取得", "UPDATE SHOT": "ショット更新", - "START": "開始", - "EXPORT PRESETS": "エクスポート", "IMPORT": "インポート", "RUN LOG": "実行ログ", "POWER UP": "パワーアップ", @@ -2853,5 +2847,28 @@ "routing busy — too many routes at once": "ルート検索サービスが混雑しています。同時に要求されたルートが多すぎます", "route proxy error": "ルート検索プロキシでエラーが発生しました", "Malformed cyclone snapshot": "サイクロンのスナップショットの形式が不正です", - "Cyclone request timed out": "サイクロンのリクエストがタイムアウトしました" + "Cyclone request timed out": "サイクロンのリクエストがタイムアウトしました", + "scene|PLAY": "再生", + "AUTHORING": "作成", + "Create and edit scenes": "シーンを作成・編集", + "SCENE": "シーン", + "Scene": "シーン", + "NEW SCENE": "新規シーン", + "Start a new, empty scene": "空の新しいシーンを作成", + "DELETE": "削除", + "Delete this scene and all of its shots": "このシーンとすべてのショットを削除", + "SHOTS": "ショット", + "+ CAPTURE SHOT": "+ ショット取得", + "Add the current view, style and layers as the next shot": "現在の視点・スタイル・レイヤーを次のショットとして追加", + "Replace the selected shot with the current view": "選択中のショットを現在の視点で置き換え", + "Click a shot to select it, double-click to rename.": "ショットをクリックして選択、ダブルクリックで名前を変更します。", + "Play from this scene through the rest of the project": "このシーンからプロジェクトの最後まで再生", + "Stop playback (Esc)": "再生を停止(Esc)", + "Play the shot after the selected one, moving on to the next scene when needed": "選択中の次のショットを再生(必要に応じて次のシーンへ進む)", + "SAVE & SHARE": "保存と共有", + "Download every scene as a JSON file you can import later": "すべてのシーンを、後でインポートできるJSONファイルとしてダウンロード", + "Load scenes from an exported JSON file": "書き出したJSONファイルからシーンを読み込む", + "Download the timing log of the last play": "前回の再生のタイミングログをダウンロード", + "Edit anchors, data packs and shot details": "アンカー、データパック、ショットの詳細を編集", + "Download this scene as JSON or an asset bundle": "このシーンをJSONまたはアセットバンドルとしてダウンロード" } diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index 5e9a9a3ffd..e4fe30626c 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -2956,13 +2956,7 @@ "ALL": "TODAS", "FLAT": "PLANAS", "SINCE": "DESDE", - "SCENES": "CENAS", - "Scene recipe": "Receita de cena", - "NEW": "NOVA", - "CAPTURE SHOT": "CAPTURAR PLANO", "UPDATE SHOT": "ATUALIZAR PLANO", - "START": "INICIAR", - "EXPORT PRESETS": "EXPORTAR PREDEF.", "IMPORT": "IMPORTAR", "RUN LOG": "REGISTRO", "POWER UP": "ATIVAR", @@ -2991,5 +2985,28 @@ "Begin with a clean globe": "Comece com um globo limpo", "Don't show this again": "Não mostrar novamente", "ESC to dismiss": "ESC para fechar", - "Tip: the GEV MIC button in the dock lets you talk to the map.": "Dica: o botão GEV MIC no dock permite falar com o mapa." + "Tip: the GEV MIC button in the dock lets you talk to the map.": "Dica: o botão GEV MIC no dock permite falar com o mapa.", + "scene|PLAY": "INICIAR", + "AUTHORING": "CRIAÇÃO", + "Create and edit scenes": "Criar e editar cenas", + "SCENE": "CENA", + "Scene": "Cena", + "NEW SCENE": "NOVA CENA", + "Start a new, empty scene": "Começar uma nova cena vazia", + "DELETE": "EXCLUIR", + "Delete this scene and all of its shots": "Excluir esta cena e todos os seus planos", + "SHOTS": "PLANOS", + "+ CAPTURE SHOT": "+ CAPTURAR PLANO", + "Add the current view, style and layers as the next shot": "Adicionar a vista, o estilo e as camadas atuais como próximo plano", + "Replace the selected shot with the current view": "Substituir o plano selecionado pela vista atual", + "Click a shot to select it, double-click to rename.": "Clique em um plano para selecioná-lo e clique duas vezes para renomeá-lo.", + "Play from this scene through the rest of the project": "Reproduzir desta cena até o fim do projeto", + "Stop playback (Esc)": "Parar a reprodução (Esc)", + "Play the shot after the selected one, moving on to the next scene when needed": "Reproduzir o plano após o selecionado, passando à próxima cena se necessário", + "SAVE & SHARE": "SALVAR E COMPARTILHAR", + "Download every scene as a JSON file you can import later": "Baixar todas as cenas em um arquivo JSON para importar depois", + "Load scenes from an exported JSON file": "Carregar cenas de um arquivo JSON exportado", + "Download the timing log of the last play": "Baixar o registro de tempos da última reprodução", + "Edit anchors, data packs and shot details": "Editar âncoras, pacotes de dados e detalhes dos planos", + "Download this scene as JSON or an asset bundle": "Baixar esta cena como JSON ou pacote de recursos" } diff --git a/src/i18n/locales/uk.json b/src/i18n/locales/uk.json index f87454f1a6..28fab0d406 100644 --- a/src/i18n/locales/uk.json +++ b/src/i18n/locales/uk.json @@ -3023,13 +3023,7 @@ "ALL": "УСІ", "FLAT": "ПЛОСКІ", "SINCE": "З ДАТИ", - "SCENES": "СЦЕНИ", - "Scene recipe": "Рецепт сцени", - "NEW": "НОВА", - "CAPTURE SHOT": "ЗНЯТИ КАДР", "UPDATE SHOT": "ОНОВИТИ КАДР", - "START": "СТАРТ", - "EXPORT PRESETS": "ЕКСПОРТУВАТИ ПРЕСЕТИ", "IMPORT": "ІМПОРТУВАТИ", "RUN LOG": "ЖУРНАЛ ВІДТВОРЕННЯ", "POWER UP": "ЗАПУСК", @@ -3060,5 +3054,28 @@ "ESC to dismiss": "ESC — приховати", "Tip: the GEV MIC button in the dock lets you talk to the map.": "Порада: кнопка МІК у доку дає змогу говорити з картою.", "Malformed cyclone snapshot": "Некоректний знімок циклонів", - "Cyclone request timed out": "Минув час очікування запиту циклонів" + "Cyclone request timed out": "Минув час очікування запиту циклонів", + "scene|PLAY": "СТАРТ", + "AUTHORING": "РЕДАКТОР", + "Create and edit scenes": "Створення й редагування сцен", + "SCENE": "СЦЕНА", + "Scene": "Сцена", + "NEW SCENE": "НОВА СЦЕНА", + "Start a new, empty scene": "Створити нову порожню сцену", + "DELETE": "ВИДАЛИТИ", + "Delete this scene and all of its shots": "Видалити цю сцену з усіма кадрами", + "SHOTS": "КАДРИ", + "+ CAPTURE SHOT": "+ ЗНЯТИ КАДР", + "Add the current view, style and layers as the next shot": "Додати поточний вигляд, стиль і шари як наступний кадр", + "Replace the selected shot with the current view": "Замінити вибраний кадр поточним виглядом", + "Click a shot to select it, double-click to rename.": "Натисніть кадр, щоб вибрати його, двічі — щоб перейменувати.", + "Play from this scene through the rest of the project": "Відтворити від цієї сцени до кінця проєкту", + "Stop playback (Esc)": "Зупинити відтворення (Esc)", + "Play the shot after the selected one, moving on to the next scene when needed": "Відтворити кадр після вибраного, за потреби перейшовши до наступної сцени", + "SAVE & SHARE": "ЗБЕРЕГТИ Й ПОДІЛИТИСЯ", + "Download every scene as a JSON file you can import later": "Завантажити всі сцени файлом JSON для подальшого імпорту", + "Load scenes from an exported JSON file": "Завантажити сцени з експортованого файлу JSON", + "Download the timing log of the last play": "Завантажити журнал таймінгів останнього відтворення", + "Edit anchors, data packs and shot details": "Змінити якорі, пакети даних і параметри кадрів", + "Download this scene as JSON or an asset bundle": "Завантажити цю сцену у форматі JSON або архівом ресурсів" } diff --git a/src/ui/styles/scenes.css b/src/ui/styles/scenes.css index 441bbbf65a..726d7507a6 100644 --- a/src/ui/styles/scenes.css +++ b/src/ui/styles/scenes.css @@ -220,6 +220,9 @@ html:not([lang='en']) #scene-panel .scene-controls .scene-btn { /* The file row is housekeeping; it stays quieter than the steps above. */ #scene-panel .scene-file-controls .scene-btn { font-size: 9px; + /* Room for one long translated word (IMPORTIEREN, ІМПОРТУВАТИ) per line. */ + padding: 8px 4px; + letter-spacing: 0.6px; background: transparent; } From 44f9138d1e71827b34c4a2812ab7f2d802a6ddc6 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Fri, 30 Oct 2026 13:05:33 +0000 Subject: [PATCH 084/237] Keep panel titles inside their cards and scope the hover Collapsed Recent Imagery (English) and Data Layers (Portuguese) pushed their toggles out of the card. Collapsed rail launchers now drop the divider and pack closer, translated collapsed titles use compact type, and any title that still does not fit ends in an ellipsis. The hover now matches the dock trays' hover rather than their pinned look, only on pointers that can hover, and recolours only the hovered panel's own header, so Radio and body labels keep their colours. The cyber theme keeps main's gutters and Display toggle size, the dock and rails share --dock-label-* tokens, and the dimmed open Context title rule is gone. --- changelog.d/1466-panel-chrome-consistency.md | 7 +- docs/CURRENT-STATE.md | 2 +- src/contextTabKeyboard.test.mjs | 8 +- src/ui/railPanelChrome.test.mjs | 193 ++++++++++++++++++ src/ui/styles/command-dock-trays.css | 8 +- src/ui/styles/controls.css | 194 ++++++++++++------- src/ui/styles/foundation.css | 5 + src/ui/styles/layers.css | 22 +-- 8 files changed, 345 insertions(+), 94 deletions(-) create mode 100644 src/ui/railPanelChrome.test.mjs diff --git a/changelog.d/1466-panel-chrome-consistency.md b/changelog.d/1466-panel-chrome-consistency.md index 64aefd6070..c7f1f28a17 100644 --- a/changelog.d/1466-panel-chrome-consistency.md +++ b/changelog.d/1466-panel-chrome-consistency.md @@ -1,4 +1,5 @@ - Give the side panels one look. Every panel title now uses the command dock's - label type in a brighter colour, collapsed or open; a panel lights up with a - blue edge and an accent title on hover, as the dock does; and every collapse - button sits the same distance from its panel's edge (asturksever, #1466). + label type in a brighter colour; a panel's edge and title light up on hover, + as the dock's trays do; and in the default theme each collapse button sits + 19px from its panel's edge (plus the scrollbar's width in an open, scrolling + panel where the system always shows scrollbars) (asturksever, #1466). diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 966bb38786..73c984471f 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -4797,7 +4797,7 @@ silently demoting every later lookup for the session. - If a civilian or military aircraft is already tracked when `CONTACTS` becomes operational, that source-owned track is adopted as the Context subject before nearest-contact autofocus. Context rechecks the tracker after its dependencies settle, so a newer selection wins, while an explicit clear during activation prevents fallback from silently selecting a replacement. Cockpit entry remains unavailable until that Context transaction has settled, so its camera takeover cannot clear Cesium tracking before adoption. Adoption does not recreate tracking or transfer camera ownership; it initializes the normal 250 km ring, history, proximity results, and Cockpit Previous/Next state for the original aircraft. - `SEARCH NEARBY SITES` retains the bounded OSM results and makes one user-initiated, view-biased Google Maps Places text search for “military installation.” Google results are source-stamped, deduplicated against OSM by rounded location/name, and remain mapped context rather than operational claims. If Places is unavailable or the API is not enabled for the supplied key, OSM context remains available. A view across the antimeridian is searched around its own centre, with a radius from its real width. - The Context header holds only its title and collapse control. It no longer carries a Radio shortcut or a compact Radio player: Radio is the `RADIO` section inside the panel, with its own disclosure and the single `ENABLE` power control. Cockpit keeps its own compact Radio utility. -- Context is set for reading in every theme: mode, standby and action labels are 10 px, and the panel draws no glow halo. Outside Cyber, the two modes form one segmented control, the standby guidance is plain left-aligned text rather than a dashed placeholder, and the expanded panel's section titles use `--text-secondary`. Cyber keeps its separately framed mode buttons, its red panel titles, and in layout-focus a framed, centred standby card over its radar art. +- Context is set for reading in every theme: mode, standby and action labels are 10 px, and the panel draws no glow halo. Outside Cyber, the two modes form one segmented control, the standby guidance is plain left-aligned text rather than a dashed placeholder, and the panel's section titles share the side panels' dock-label colour. Cyber keeps its separately framed mode buttons, its red panel titles, and in layout-focus a framed, centred standby card over its radar art. - The expanded desktop header omits the redundant `ON` label; the active mode button carries state. Expanded Contact results also omit the duplicate `GLOBAL CONTEXT` / `CONTEXT ONLY` status row and begin with the selected subject and its 250 km scope. Global Context does not fabricate a selected-entity model preview: the provisional hand-authored aircraft wireframe was removed because it was not geometry extracted from the selected entity's actual asset. - Dependency ownership is reversible: disabling Global Context releases only dependencies it enabled, while user-enabled layers remain on. This also removes the Military-layer suppression handoff when Global Context owned Military, allowing an already-enabled civilian Flights layer to resume its normal mixed rendering. If OpenSky is unavailable and has no last-good cache, Flights requests a capped 250 nm adsb.lol point snapshot around the current view anchor and labels that provenance explicitly; it never relabels military-feed rows as civilian data. If both inputs fail, Flights remains `UNKNOWN`. - Space Missions is replay-isolated: Rocket Launches and Satellites are the only Data Layers permitted while the mode is active. Direct UI and voice entry capture the same pre-entry snapshot; internal dependency and restoration enables do not create a user-owned Context session. Entry waits for incompatible layers to shut down, direct incompatible enables are blocked before lifecycle work, and the entry gate remains active through the complete Rocket Launches enable. A newer same-target ON request takes ownership of the pending entry without releasing its isolation snapshot, including when it arrives while the prior request is awaiting the adoption guard. A caller abort, resource cancellation, newer OFF, or layer teardown waits for exact manager settlement and restores that snapshot without resurrecting Rocket Launches. If an abort lands after only part of a restore settles, Context completes the same exact target without the stale caller signal and then replays newer explicit layer intent. Dedicated Voice Context cancellation reports a stable cancelled result plus the current Context state; generic layer visibility additionally exposes manager phase, reason, successor, and lifecycle details. Once an exact voice visibility intent commits, a newer voice turn cannot relabel it as cancelled while Context settlement completes; pre-commit aborts remain cancellable and final lifecycle mismatches remain failures. Clear Selected Layers reserves its complete captured OFF set before sequential teardown; a newer absolute request of any origin supersedes only its layer reservation and remains authoritative. A rejected layer teardown retains the truthful enabled state, rolls already-stopped siblings back to the captured pre-entry set, and aborts replay; rapid exit/re-entry serializes the full Satellite enabled-state and parameter restore before a new snapshot is taken. Contacts remains additive and restores user-enabled layers normally. diff --git a/src/contextTabKeyboard.test.mjs b/src/contextTabKeyboard.test.mjs index ca44d4c254..528341dd4d 100644 --- a/src/contextTabKeyboard.test.mjs +++ b/src/contextTabKeyboard.test.mjs @@ -172,10 +172,10 @@ test('Context reads as one segmented control with legible type and no halo', () assert.ok(px(standby, 'font') >= 10, 'standby guidance must stay at least 10px'); assert.doesNotMatch(standby, /dashed/); assert.ok(px(rule('.global-context-actions .panel-layer-toggle'), 'font-size') >= 10); - // Default theme only, expanded only: Cyber keeps its red titles and the - // collapsed launcher matches its sibling launchers. - assert.match( + // The shared rail title colour (brighter than --text-secondary) keeps the + // open Context title legible; no Context-only rule dims it again. + assert.equal( rule(":root:not([data-ui-theme='cyber']) #global-context-panel:not(.collapsed) .panel-title"), - /color:\s*var\(--text-secondary\)/, + '', ); }); diff --git a/src/ui/railPanelChrome.test.mjs b/src/ui/railPanelChrome.test.mjs new file mode 100644 index 0000000000..bfcd7845e5 --- /dev/null +++ b/src/ui/railPanelChrome.test.mjs @@ -0,0 +1,193 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { readStylesheet } from '../testSupport/readStylesheet.mjs'; + +const css = readStylesheet(new URL('../../style.css', import.meta.url)); +const clean = (selector) => + selector + .replace(/\/\*[\s\S]*?\*\//g, '') + .replace(/\s+/g, ' ') + .trim(); +const rules = [...css.matchAll(/([^{}]+)\{([^{}]*)\}/g)].map( + ([, selector, body]) => ({ selector: clean(selector), body }), +); +const railRules = rules.filter(({ selector }) => + selector.includes('#left-panel-stack, #right-context-rail'), +); +const hoverBlock = + css.match( + /@media \(hover: hover\) and \(pointer: fine\) \{((?:[^{}]*\{[^{}]*\})*)\s*\}/g, + ) || []; + +test('a side panel lights up on hover only where a pointer can hover', () => { + const lit = railRules.filter(({ selector }) => selector.includes(':hover')); + assert.ok(lit.length > 0, 'the rail hover rule is missing'); + for (const { selector } of lit) { + assert.ok( + hoverBlock.some((block) => clean(block).includes(selector)), + `${selector} must sit inside @media (hover: hover) and (pointer: fine)`, + ); + } +}); + +test('hover matches the dock tray hover, not its pinned look', () => { + const [hover] = railRules.filter(({ selector }) => + selector.endsWith(':hover'), + ); + assert.ok(hover, 'the rail surface hover rule is missing'); + assert.match(hover.body, /border-color:\s*var\(--glass-border-hover\)/); + assert.doesNotMatch(hover.body, /box-shadow/); + assert.match(hover.body, /--rail-label-hover:\s*var\(--accent\)/); + // A low-specificity list: no ID or state selector inside it lifts the rule. + assert.match(hover.selector, /:where\(/); +}); + +test('hover recolours only the hovered panel header, never nested sections', () => { + for (const { selector } of railRules) { + assert.ok( + !/\.radio-panel-inner/.test(selector), + `Radio sits inside Context and must not light up as its own panel: ${selector}`, + ); + assert.doesNotMatch( + selector, + /:hover\s+:is\(/, + 'a descendant colour list would reach labels in the panel body', + ); + } + const colour = railRules.find( + ({ body }) => /--rail-label-hover/.test(body) && /color:/.test(body), + ); + assert.ok(colour, 'the rail title colour rule is missing'); + assert.match(colour.selector, /\.panel-header > \.panel-title/); + const radio = rules.find(({ selector }) => selector === '#radio-panel'); + assert.match(radio?.body || '', /--rail-label-hover:\s*initial/); +}); + +test('no later rule dims the open Context title below its siblings', () => { + const dimmed = rules.filter( + ({ selector, body }) => + /#global-context-panel:not\(\.collapsed\) \.panel-title$/.test( + selector, + ) && /color:/.test(body), + ); + assert.deepEqual(dimmed, []); +}); + +test('collapsed launchers on both rails keep titles inside the card', () => { + const ellipsis = railRules.find( + ({ selector, body }) => + selector.endsWith( + ':is(.panel-header > .panel-title, .pp-header-label)', + ) && /text-overflow:\s*ellipsis/.test(body), + ); + assert.ok( + ellipsis, + 'rail titles must end in an ellipsis rather than overflow', + ); + assert.match(ellipsis.body, /min-width:\s*0/); + + const translated = rules.find( + ({ selector }) => + selector.startsWith("html:not([lang='en'])") && + selector.includes('#left-panel-stack, #right-context-rail') && + selector.includes('.panel-collapsible.collapsed'), + ); + assert.ok(translated, 'translated collapsed titles must fit on both rails'); + assert.match(translated.body, /font-size:\s*8px/); +}); + +test('the default theme geometry change leaves cyber gutters alone', () => { + for (const surface of ['.data-panel-inner', '.global-context-panel-inner']) { + const base = rules.find( + ({ selector, body }) => selector === surface && /padding:/.test(body), + ); + assert.match(base?.body || '', /padding:\s*14px 16px 12px/, surface); + } + const display = rules.find( + ({ selector }) => + selector === '#pp-toggles > .pp-header-row .pp-collapse-btn', + ); + assert.match(display?.body || '', /font-size:\s*12px/); +}); + +test('rail titles and dock labels share one set of label tokens', () => { + // command-dock-trays.css sets the dock's label type; earlier dock rules + // for the same selector are overridden by it. + const dock = rules.find( + ({ selector, body }) => + selector === + '#command-dock .panel-title, #command-dock .location-toolbar-label' && + /--dock-label-/.test(body), + ); + const rail = railRules.find(({ body }) => + /--dock-label-font-size/.test(body), + ); + for (const body of [dock?.body, rail?.body]) { + assert.match(body || '', /font-size:\s*var\(--dock-label-font-size\)/); + assert.match( + body || '', + /letter-spacing:\s*var\(--dock-label-letter-spacing\)/, + ); + } +}); + +test('default theme overrides never reach the cyber theme', () => { + const notCyber = ":root:not([data-ui-theme='cyber'])"; + const padding = rules.find( + ({ selector, body }) => + selector.endsWith( + ':is(.data-panel-inner, .global-context-panel-inner)', + ) && /padding-left:\s*14px/.test(body), + ); + assert.ok( + padding?.selector.startsWith(notCyber), + 'the 14px gutters must skip cyber', + ); + const display = rules.find( + ({ selector, body }) => + selector.endsWith('#pp-toggles > .pp-header-row .pp-collapse-btn') && + /font-size:\s*13px/.test(body), + ); + assert.ok( + display?.selector.startsWith(notCyber), + "Display's 22px toggle must skip cyber", + ); + // Cyber draws its title marker at left: -8px; a clip on the title would cut it. + for (const { selector, body } of rules) { + if (!/\.panel-title/.test(selector) || !/overflow:\s*hidden/.test(body)) + continue; + if (!/#left-panel-stack|#right-context-rail/.test(selector)) continue; + assert.ok( + selector.startsWith(notCyber), + `${selector} clips the cyber title marker`, + ); + } +}); + +test('launcher compaction and header colour stay on the rail panels themselves', () => { + const compact = railRules.filter(({ selector }) => + /\.collapsed > \[class\$='-panel-inner'\] > \.panel-header/.test(selector), + ); + assert.equal(compact.length, 3); + for (const { selector } of compact) { + // Each launcher is a direct child of its rail: Radio, nested inside + // Context, is not a launcher. The header must not itself be required to + // be a rail child. + assert.match( + selector, + /#right-context-rail\) > \.panel-collapsible\.collapsed > \[class\$='-panel-inner'\] > \.panel-header/, + ); + assert.match( + selector, + /#right-context-rail\) > #pp-toggles\.collapsed > \.pp-header-row/, + ); + } + const colour = railRules.find(({ body }) => + /--rail-label-hover, /.test(body), + ); + assert.match( + colour.selector, + /:is\(\.panel-header, \.pp-header-row\) > \.panel-collapse-btn/, + ); + assert.doesNotMatch(colour.selector, /, \.panel-collapse-btn\)/); +}); diff --git a/src/ui/styles/command-dock-trays.css b/src/ui/styles/command-dock-trays.css index e3607a8ce6..ecc6bc432b 100644 --- a/src/ui/styles/command-dock-trays.css +++ b/src/ui/styles/command-dock-trays.css @@ -17,10 +17,10 @@ display: inline-flex; align-items: center; gap: 0.42rem; - color: rgba(206, 232, 239, 0.72); - font-size: 0.58rem; - font-weight: 500; - letter-spacing: 0.13rem; + color: var(--dock-label-color); + font-size: var(--dock-label-font-size); + font-weight: var(--dock-label-font-weight); + letter-spacing: var(--dock-label-letter-spacing); } #command-dock .dock-label-icon { diff --git a/src/ui/styles/controls.css b/src/ui/styles/controls.css index 58f7560393..936f095df3 100644 --- a/src/ui/styles/controls.css +++ b/src/ui/styles/controls.css @@ -86,28 +86,92 @@ :is(#left-panel-stack, #right-context-rail) :is(.panel-header > .panel-title, .pp-header-label) { font-family: var(--font-mono); - font-size: 0.58rem; - font-weight: 500; - letter-spacing: 0.13rem; + font-size: var(--dock-label-font-size); + font-weight: var(--dock-label-font-weight); + letter-spacing: var(--dock-label-letter-spacing); text-transform: uppercase; } +/* A hovered panel sets --rail-label-hover on itself (see below); its own + header picks it up. Radio sits inside Context and keeps its own colour. */ +:root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + :is( + .panel-header > .panel-title, + .pp-header-label, + :is(.panel-header, .pp-header-row) > .panel-collapse-btn + ) { + color: var(--rail-label-hover, var(--dock-label-color)); +} + +#radio-panel { + --rail-label-hover: initial; +} + +/* A title never pushes its toggle out of the card: one that does not fit + ends in an ellipsis. Cyber draws a marker left of the title, which a clip + would cut, and keeps its own header layout. */ +:root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + :is(.panel-header > .panel-title, .pp-header-label) { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; +} + +/* A collapsed launcher is 176px wide and its divider has no room to draw, + so the header drops it and packs closer. English titles such as Recent + Imagery then fit whole. Only the rail's own launchers: Radio, nested in + Context, keeps its divider. */ +:root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + > .panel-collapsible.collapsed + > [class$='-panel-inner'] + > .panel-header, +:root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + > #pp-toggles.collapsed + > .pp-header-row { + gap: 8px; +} + :root:not([data-ui-theme='cyber']) :is(#left-panel-stack, #right-context-rail) - :is(.panel-header > .panel-title, .pp-header-label, .panel-collapse-btn) { - color: rgba(206, 232, 239, 0.72); + > .panel-collapsible.collapsed + > [class$='-panel-inner'] + > .panel-header + > .panel-divider, +:root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + > #pp-toggles.collapsed + > .pp-header-row + > .panel-divider { + display: none; } -/* A longer translated title in a collapsed rail launcher tightens its - tracking rather than pushing the disclosure button out of the card. */ +:root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + > .panel-collapsible.collapsed + > [class$='-panel-inner'] + > .panel-header + > .panel-collapse-btn, +:root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + > #pp-toggles.collapsed + > .pp-header-row + > .panel-collapse-btn { + margin-left: auto; +} + +/* Translated titles run longer (Aktuelle Bilddaten), so a collapsed rail + launcher sets them in compact type rather than pushing the disclosure + button out of the card or cutting the word short. */ html:not([lang='en']) - #right-context-rail + :is(#left-panel-stack, #right-context-rail) .panel-collapsible.collapsed .panel-title { - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - letter-spacing: 1.5px; + font-size: 8px; + letter-spacing: 1px; } .panel-divider { @@ -141,64 +205,42 @@ html:not([lang='en']) background: rgba(255, 255, 255, 0.07); } -/* A side panel answers the pointer as the command dock does: a blue edge, - a soft glow and an accent title. */ -:root:not([data-ui-theme='cyber']) - :is(#left-panel-stack, #right-context-rail) - :is( - .data-panel-inner, - .scene-panel-inner, - .cctv-panel-inner, - .radio-panel-inner, - .weather-panel-inner, - .recent-imagery-panel-inner, - .street-level-panel-inner, - .global-context-panel-inner, - #pp-toggles:not(.collapsed), - #pp-toggles.collapsed > .pp-header-row - ) { - transition: - border-color 160ms ease, - box-shadow 160ms ease; -} +/* A side panel answers the pointer as the command dock's trays do: a + brighter edge and an accent title and toggle. Touch screens have no hover, + so a tap must not leave a panel lit. */ +@media (hover: hover) and (pointer: fine) { + :root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + :where( + .data-panel-inner, + .scene-panel-inner, + .cctv-panel-inner, + .weather-panel-inner, + .recent-imagery-panel-inner, + .street-level-panel-inner, + .global-context-panel-inner, + #pp-toggles:not(.collapsed), + #pp-toggles.collapsed > .pp-header-row + ) { + transition: border-color var(--transition-fast); + } -:root:not([data-ui-theme='cyber']) - :is(#left-panel-stack, #right-context-rail) - :is( - .data-panel-inner, - .scene-panel-inner, - .cctv-panel-inner, - .radio-panel-inner, - .weather-panel-inner, - .recent-imagery-panel-inner, - .street-level-panel-inner, - .global-context-panel-inner, - #pp-toggles:not(.collapsed), - #pp-toggles.collapsed > .pp-header-row - ):hover { - border-color: rgba(0, 212, 255, 0.55); - box-shadow: - 0 8px 32px rgba(0, 0, 0, 0.5), - 0 0 0 1px rgba(0, 212, 255, 0.08) inset, - 0 0 1rem rgba(0, 212, 255, 0.12); -} - -:root:not([data-ui-theme='cyber']) - :is(#left-panel-stack, #right-context-rail) - :is( - .data-panel-inner, - .scene-panel-inner, - .cctv-panel-inner, - .radio-panel-inner, - .weather-panel-inner, - .recent-imagery-panel-inner, - .street-level-panel-inner, - .global-context-panel-inner, - #pp-toggles:not(.collapsed), - #pp-toggles.collapsed > .pp-header-row - ):hover - :is(.panel-title, .pp-header-label, .panel-collapse-btn) { - color: var(--accent); + :root:not([data-ui-theme='cyber']) + :is(#left-panel-stack, #right-context-rail) + :where( + .data-panel-inner, + .scene-panel-inner, + .cctv-panel-inner, + .weather-panel-inner, + .recent-imagery-panel-inner, + .street-level-panel-inner, + .global-context-panel-inner, + #pp-toggles:not(.collapsed), + #pp-toggles.collapsed > .pp-header-row + ):hover { + --rail-label-hover: var(--accent); + border-color: var(--glass-border-hover); + } } /* ── Button Grid ──────────────────────────────── */ @@ -521,11 +563,21 @@ html:not([lang='en']) } #pp-toggles > .pp-header-row .pp-collapse-btn { + width: 20px; + height: 20px; + border-radius: 6px; + font-size: 12px; + padding: 0; +} + +/* In the default theme Display's toggle matches the other panels' 22px. */ +:root:not([data-ui-theme='cyber']) + #pp-toggles + > .pp-header-row + .pp-collapse-btn { width: 22px; height: 22px; - border-radius: 6px; font-size: 13px; - padding: 0; } #pp-toggles.collapsed { diff --git a/src/ui/styles/foundation.css b/src/ui/styles/foundation.css index 2c2006094a..185b256af7 100644 --- a/src/ui/styles/foundation.css +++ b/src/ui/styles/foundation.css @@ -21,6 +21,11 @@ --panel-radius: 16px; --btn-radius: 10px; --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1); + /* Label type shared by the command dock and the side panel titles. */ + --dock-label-color: rgba(206, 232, 239, 0.72); + --dock-label-font-size: 0.58rem; + --dock-label-font-weight: 500; + --dock-label-letter-spacing: 0.13rem; --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1); --left-stack-x: 52px; --right-rail-x: 52px; diff --git a/src/ui/styles/layers.css b/src/ui/styles/layers.css index a51bdc0525..0f8ed55228 100644 --- a/src/ui/styles/layers.css +++ b/src/ui/styles/layers.css @@ -58,7 +58,7 @@ background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--panel-radius); - padding: 14px 14px 12px; + padding: 14px 16px 12px; backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); box-shadow: @@ -253,8 +253,6 @@ } #right-context-rail #global-context-panel.collapsed .panel-header { margin: 0; - /* Room for the radio button between the title and the toggle. */ - gap: 8px; } #right-context-rail.layout-focus { height: var(--right-stack-max-height); @@ -991,19 +989,12 @@ #global-context-panel .panel-glow { display: none; } -/* Expanded, its section titles (Context, Radio) stay legible over bright - imagery. Cyber keeps its own red titles; collapsed launchers match siblings. */ -:root:not([data-ui-theme='cyber']) - #global-context-panel:not(.collapsed) - .panel-title { - color: var(--text-secondary); -} .global-context-panel-inner { position: relative; display: flex; min-height: 0; flex-direction: column; - padding: 14px 14px 12px; + padding: 14px 16px 12px; border: 1px solid var(--glass-border); border-radius: var(--panel-radius); background: var(--glass-bg); @@ -1013,6 +1004,15 @@ backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); } + +/* Data Layers and Context share the 14px side padding of the other default + theme panels, so every title and toggle sits 19px from its edge. Cyber + keeps its own gutters. */ +:root:not([data-ui-theme='cyber']) + :is(.data-panel-inner, .global-context-panel-inner) { + padding-right: 14px; + padding-left: 14px; +} .global-context-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); From 94470ff00e0e6f09ee60ae6a79e0a327857b79cb Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Fri, 30 Oct 2026 15:18:11 +0000 Subject: [PATCH 085/237] Translate the Utilities panel and Draw list strings in de, fr, it, ja, pt and uk --- src/i18n/locales/de.json | 13 ++++++++----- src/i18n/locales/fr.json | 13 ++++++++----- src/i18n/locales/it.json | 13 ++++++++----- src/i18n/locales/ja.json | 13 ++++++++----- src/i18n/locales/pt.json | 13 ++++++++----- src/i18n/locales/uk.json | 13 ++++++++----- src/i18n/same-as-english.json | 3 +++ 7 files changed, 51 insertions(+), 30 deletions(-) diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index 8e383aded5..c28967f233 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -2879,14 +2879,10 @@ "Sector": "Sektor", "Sonar sector width": "Breite des Sonarsektors", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "Auf die Welt zeichnen – Eckpunkte anklicken, Doppelklick oder Enter zum Beenden, Esc zum Abbrechen", - "Shape": "Form", "Shape to draw": "Zu zeichnende Form", "Area": "Fläche", "Line": "Linie", "Pin": "Pin", - "Label (optional)": "Beschriftung (optional)", - "Label for the drawn shape": "Beschriftung der gezeichneten Form", - "Colour of the drawn shape": "Farbe der gezeichneten Form", "Primary": "Primär", "Amber": "Bernstein", "Cyan": "Cyan", @@ -2926,5 +2922,12 @@ "Malformed cyclone snapshot": "Fehlerhafter Wirbelsturm-Snapshot", "STALE · Roads: {source} · Flow: cached TomTom tiles": "VERALTET · Straßen: {source} · Verkehrsfluss: TomTom-Kacheln aus dem Cache", "routing busy — too many routes at once": "Routing-Dienst ausgelastet – zu viele Routen gleichzeitig", - "route proxy error": "Fehler des Routen-Proxys" + "route proxy error": "Fehler des Routen-Proxys", + "Colour of {name}": "Farbe von {name}", + "Change the colour of {name}": "Farbe von {name} ändern", + "Name of {name}": "Name von {name}", + "Audio": "Audio", + "UTILITIES": "WERKZEUGE", + "Colour of the next shape": "Farbe der nächsten Form", + "Drawn shapes": "Gezeichnete Formen" } diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 931e7c3ff9..507f6ac964 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -2892,14 +2892,10 @@ "Scope edge feather": "Adoucissement du bord de la lunette", "Scope edge feather as a percentage of the keyhole radius": "Adoucissement du bord de la lunette, en pourcentage du rayon de l'ouverture", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "Dessinez sur le monde — cliquez sur les sommets, double-clic ou Enter pour terminer, Esc pour annuler", - "Shape": "Forme", "Shape to draw": "Forme à dessiner", "Area": "Zone", "Line": "Ligne", "Pin": "Épingle", - "Label (optional)": "Étiquette (facultative)", - "Label for the drawn shape": "Étiquette de la forme dessinée", - "Colour of the drawn shape": "Couleur de la forme dessinée", "Primary": "Principale", "Amber": "Ambre", "Cyan": "Cyan", @@ -2996,5 +2992,12 @@ "ESC to dismiss": "ESC pour fermer", "Tip: the GEV MIC button in the dock lets you talk to the map.": "Astuce : le bouton GEV MIC du dock permet de parler à la carte.", "Malformed cyclone snapshot": "Instantané cyclonique mal formé", - "Cyclone request timed out": "Délai dépassé pour la requête cyclonique" + "Cyclone request timed out": "Délai dépassé pour la requête cyclonique", + "Colour of {name}": "Couleur de {name}", + "Change the colour of {name}": "Changer la couleur de {name}", + "Name of {name}": "Nom de {name}", + "Audio": "Audio", + "UTILITIES": "OUTILS", + "Colour of the next shape": "Couleur de la prochaine forme", + "Drawn shapes": "Formes dessinées" } diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index 62c9931c1d..ef0928f95b 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -2892,14 +2892,10 @@ "Scope edge feather": "Sfumatura del bordo dello scope", "Scope edge feather as a percentage of the keyhole radius": "Sfumatura del bordo dello scope, come percentuale del raggio del foro", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "Disegna sul mondo: fai clic sui vertici, doppio clic o Enter per finire, Esc per annullare", - "Shape": "Forma", "Shape to draw": "Forma da disegnare", "Area": "Area", "Line": "Linea", "Pin": "Segnaposto", - "Label (optional)": "Etichetta (opzionale)", - "Label for the drawn shape": "Etichetta della forma disegnata", - "Colour of the drawn shape": "Colore della forma disegnata", "Primary": "Principale", "Amber": "Ambra", "Cyan": "Ciano", @@ -2996,5 +2992,12 @@ "ESC to dismiss": "ESC per chiudere", "Tip: the GEV MIC button in the dock lets you talk to the map.": "Suggerimento: il pulsante GEV MIC nel dock ti permette di parlare con la mappa.", "Malformed cyclone snapshot": "Snapshot dei cicloni non valido", - "Cyclone request timed out": "La richiesta dei cicloni è andata in timeout" + "Cyclone request timed out": "La richiesta dei cicloni è andata in timeout", + "Colour of {name}": "Colore di {name}", + "Change the colour of {name}": "Cambia il colore di {name}", + "Name of {name}": "Nome di {name}", + "Audio": "Audio", + "UTILITIES": "STRUMENTI", + "Colour of the next shape": "Colore della prossima forma", + "Drawn shapes": "Forme disegnate" } diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 5a48dc8867..5b583fc30f 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -2750,14 +2750,10 @@ "Scope edge feather": "スコープ縁のぼかし", "Scope edge feather as a percentage of the keyhole radius": "スコープ縁のぼかし(キーホール半径に対する割合)", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "地球上に描画:クリックで頂点を追加、ダブルクリックまたはEnterで完了、Escでキャンセル", - "Shape": "図形", "Shape to draw": "描画する図形", "Area": "範囲", "Line": "線", "Pin": "ピン", - "Label (optional)": "ラベル(任意)", - "Label for the drawn shape": "描画した図形のラベル", - "Colour of the drawn shape": "描画した図形の色", "Primary": "プライマリー", "Amber": "アンバー", "Cyan": "シアン", @@ -2856,5 +2852,12 @@ "routing busy — too many routes at once": "ルート検索サービスが混雑しています。同時に要求されたルートが多すぎます", "route proxy error": "ルート検索プロキシでエラーが発生しました", "Malformed cyclone snapshot": "サイクロンのスナップショットの形式が不正です", - "Cyclone request timed out": "サイクロンのリクエストがタイムアウトしました" + "Cyclone request timed out": "サイクロンのリクエストがタイムアウトしました", + "Colour of {name}": "{name}の色", + "Change the colour of {name}": "{name}の色を変更", + "Name of {name}": "{name}の名前", + "Audio": "オーディオ", + "UTILITIES": "ユーティリティ", + "Colour of the next shape": "次の図形の色", + "Drawn shapes": "描いた図形" } diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index de42b5aab1..4397fc49cc 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -2894,14 +2894,10 @@ "Scope edge feather": "Suavização da borda da mira", "Scope edge feather as a percentage of the keyhole radius": "Suavização da borda da mira, em porcentagem do raio do visor", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "Desenhar sobre o mundo — clique nos vértices, clique duplo ou Enter para concluir, Esc para cancelar", - "Shape": "Forma", "Shape to draw": "Forma a desenhar", "Area": "Área", "Line": "Linha", "Pin": "Marcador", - "Label (optional)": "Rótulo (opcional)", - "Label for the drawn shape": "Rótulo da forma desenhada", - "Colour of the drawn shape": "Cor da forma desenhada", "Primary": "Principal", "Amber": "Âmbar", "Cyan": "Ciano", @@ -2996,5 +2992,12 @@ "Begin with a clean globe": "Comece com um globo limpo", "Don't show this again": "Não mostrar novamente", "ESC to dismiss": "ESC para fechar", - "Tip: the GEV MIC button in the dock lets you talk to the map.": "Dica: o botão GEV MIC no dock permite falar com o mapa." + "Tip: the GEV MIC button in the dock lets you talk to the map.": "Dica: o botão GEV MIC no dock permite falar com o mapa.", + "Colour of {name}": "Cor de {name}", + "Change the colour of {name}": "Mudar a cor de {name}", + "Name of {name}": "Nome de {name}", + "Audio": "Áudio", + "UTILITIES": "UTILITÁRIOS", + "Colour of the next shape": "Cor da próxima forma", + "Drawn shapes": "Formas desenhadas" } diff --git a/src/i18n/locales/uk.json b/src/i18n/locales/uk.json index 6041d339fd..aa5f9dba97 100644 --- a/src/i18n/locales/uk.json +++ b/src/i18n/locales/uk.json @@ -2962,14 +2962,10 @@ "Scope edge feather": "Розмиття краю прицілу", "Scope edge feather as a percentage of the keyhole radius": "Розмиття краю прицілу у відсотках від його радіуса", "Draw on the world — click vertices, double-click or Enter to finish, Esc to cancel": "Малювати на карті світу — клацайте вершини, подвійне клацання або Enter — завершити, Esc — скасувати", - "Shape": "Фігура", "Shape to draw": "Фігура для малювання", "Area": "Зона", "Line": "Лінія", "Pin": "Мітка", - "Label (optional)": "Підпис (необовʼязково)", - "Label for the drawn shape": "Підпис намальованої фігури", - "Colour of the drawn shape": "Колір намальованої фігури", "Primary": "Основний", "Amber": "Бурштиновий", "Cyan": "Блакитний", @@ -3066,5 +3062,12 @@ "ESC to dismiss": "ESC — приховати", "Tip: the GEV MIC button in the dock lets you talk to the map.": "Порада: кнопка МІК у доку дає змогу говорити з картою.", "Malformed cyclone snapshot": "Некоректний знімок циклонів", - "Cyclone request timed out": "Минув час очікування запиту циклонів" + "Cyclone request timed out": "Минув час очікування запиту циклонів", + "Colour of {name}": "Колір: {name}", + "Change the colour of {name}": "Змінити колір: {name}", + "Name of {name}": "Назва: {name}", + "Audio": "Аудіо", + "UTILITIES": "ІНСТРУМЕНТИ", + "Colour of the next shape": "Колір наступної фігури", + "Drawn shapes": "Намальовані фігури" } diff --git a/src/i18n/same-as-english.json b/src/i18n/same-as-english.json index 8e35e13031..1bf1e98bfc 100644 --- a/src/i18n/same-as-english.json +++ b/src/i18n/same-as-english.json @@ -9,6 +9,7 @@ "Alternative", "Ambient", "Anime", + "Audio", "Austin", "BRG {value}°", "BRG —", @@ -303,6 +304,7 @@ "Altitude {altitude}", "Ambient", "Anime", + "Audio", "Austin", "Aviation / Marine", "BRG {value}°", @@ -486,6 +488,7 @@ "Ambient", "Anime", "Area", + "Audio", "Austin", "BRG {value}°", "BRG —", From bdbbc3d7673561f56ee7ff487ec72f59796e8660 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Fri, 30 Oct 2026 15:23:56 +0000 Subject: [PATCH 086/237] Keep Draw rows in place across board changes, and frame lines across the antimeridian The shape list rebuilt every row on each board change. A name being typed was lost when a voice mark landed or expired, and a click right after typing only committed the name, because the button under the pointer was replaced. Rows are now updated in place, a re-entrant render is deferred, picking a colour or Esc returns focus to the swatch, and keys on the list no longer reach Draw. Fly-to on a line across the antimeridian flew to longitude 0. A drawn mark and a voice mark are no longer deduplicated into one another, so a voice TTL cannot expire a drawn pin, and a new pin on a hidden one is drawn. The engine tests now check effects (renderer calls, alpha, notifications on clear and expiry, the framed centre), not only return values. --- docs/CURRENT-STATE.md | 4 +- src/annotations/annotationEngine.js | 14 +- src/annotations/annotationEngine.test.mjs | 168 +++++++++++++++ src/annotations/drawMarkList.js | 237 +++++++++++++--------- src/annotations/drawMarkList.test.mjs | 110 +++++++++- src/annotations/drawTool.js | 3 + 6 files changed, 428 insertions(+), 108 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 5286affe34..93489dd5ed 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -5420,8 +5420,8 @@ request viewbox and continues searching without that geographic preference. ### Manual Whiteboard Drawing (September 2026) - UTILITIES ▸ **Draw** turns the globe into a whiteboard drawn by hand. Pick a shape (icon buttons for Area, Line and Pin) and a colour swatch for the next shape, click the vertices on the real world, and finish. **Keyboard contract, live only while Draw is on and never while you are typing in another field:** Enter finishes the shape (as does a double-click, and the two cannot both submit it — the session is replaced before the annotate call is awaited); Backspace removes the last vertex; Esc cancels the shape in progress, and a second Esc — Esc on an empty session — leaves draw mode. **Clear** wipes the board (the shape in progress and every placed mark), so removing marks does not require the console or the microphone. -- **Drawn shapes are listed under Draw like Import's files** (`src/annotations/drawMarkList.js`): one row per hand-drawn mark (`manual: true`; voice marks are not listed) with its colour swatch, its name, and show/hide, fly-to and remove. The name is typed in the row (Enter or leaving the field saves it, Esc restores it and stays in the field); an unnamed shape shows its kind, and an unnamed line its length. The swatch opens the five colours in the row. The list reads the engine's board and redraws on `onChange`; it asks for changes through the engine's per-mark `remove`, `setHidden`, `frame` and `restyle`. A hidden mark stays on the board at alpha 0, so it keeps its place and comes back at once; `restyle` re-adds the mark with the new name or colour, and a renamed line keeps its length (`Name — 1.2 km`). Fly-to frames a line by its whole path, not its first point. -- Runtime entry: `createApplicationTools` (`src/app/tools.js`, behind the `src/standalone/tools.js` shim) calls `initDrawTool({ viewer, annotations })` after `initAnnotations` and defers its `destroy()`, so disposing the shell returns every DOM listener, the Cesium handler, the preview data source, the borrowed click actions and the `window.__gevDrawTool` handle. Its markup lives in the UTILITIES panel's component template (`src/ui/templates/layer-panels.html`), assembled into `index.html` at build time. That handle (`setActive`, `setShape`, `addVertex(lon, lat)`, `finish`, `cancel`, `clearAll`, `diagnostics`) is the no-mouse test seam. +- **Drawn shapes are listed under Draw like Import's files** (`src/annotations/drawMarkList.js`): one row per hand-drawn mark (`manual: true`; voice marks are not listed) with its colour swatch, its name, and show/hide, fly-to and remove. The name is typed in the row (Enter or leaving the field saves it, Esc restores it and leaves the field without leaving Draw); an unnamed shape shows its kind, and an unnamed line its length. The swatch opens the five colours in the row; choosing one, or Esc, closes them and returns focus to the swatch. The list reads the engine's board on `onChange` and updates its rows in place rather than rebuilding them, so a click that is half done, or a name being typed, survives a board change; keys on the list's controls are the list's, not the drawing's. it asks for changes through the engine's per-mark `remove`, `setHidden`, `frame` and `restyle`. A hidden mark stays on the board at alpha 0, so it keeps its place and comes back at once; `restyle` re-adds the mark with the new name or colour, and a renamed line keeps its length (`Name — 1.2 km`). Fly-to frames a line by its whole path, not its first point, and centres a line across the antimeridian there. A drawn mark and a voice mark are never deduplicated into one another, and a hidden mark is never refreshed by a new one. +- Runtime entry: `createApplicationTools` (`src/app/tools.js`, behind the `src/standalone/tools.js` shim) calls `initDrawTool({ viewer, annotations })` after `initAnnotations` and defers its `destroy()`, so disposing the shell returns every DOM listener, the Cesium handler, the preview data source, the borrowed click actions and the `window.__gevDrawTool` handle. Its markup lives in the UTILITIES panel's component template (`src/ui/templates/layer-panels.html`), assembled into `index.html` at build time. That handle (`setActive`, `setShape`, `addVertex(lon, lat)`, `finish`, `cancel`, `clearAll`, `marks`, `setColor`, `diagnostics`) is the no-mouse test seam. - Contract: a finished shape is submitted through the SAME `annotationEngine.annotate()` the voice agent uses, with geometry supplied and `manual: true` (`type: area` + `ring`, `type: route` + `path`, `type: pin` + coordinates). `resolveSpec` short-circuits manual specs (`resolveManualSpec`) so no geocoder, Places or Overpass call is made. A drawn area is a real (not synthesized) outline and drapes solid; a drawn line is a `route` with `mode: 'manual'`, labelled with its length and never a travel time; a pin is a point. Drawn marks therefore render with the whiteboard look, persist, de-dup, appear in `.list()`, and clear with `clear_annotations` / `.clear()`. - **A vertex is a lon/lat, and the mark is DRAPED.** Clicks are picked through `pickWorldFromScreen` — one of two scene helpers the annotation resolver factory (`src/annotations/resolver.js`) exposes alongside `sampleGroundHeight`, so the app has ONE depth-aware pick cascade rather than a second written beside it — which returns the height the pick landed on as well as the coordinate, so the live preview hangs on the roof or hillside under the pointer instead of sinking to sea level. The world renderer draws areas and routes with `clampToGround`, so the height is dropped at finish in one place (`finishSpec`) rather than being carried downstream and discarded silently: what you get is the outline you drew, lying on the surface beneath it. - **Draped marks classify onto `ClassificationType.BOTH`** — terrain AND 3D tiles — not onto 3D tiles alone. With only `CESIUM_3D_TILE`, every area fill, area outline, route and arrow rendered to nothing on a keyless boot, where Cesium's own globe carries Esri/OSM imagery and there are no tiles to classify against; the labels appeared and the geometry did not. That hit spoken annotations exactly as hard as hand-drawn ones. `scripts/qa-draw-tool.mjs` counts the mark's own colour in the rendered frame before and after a shape is finished, on a keyed AND a keyless server, so "the board says there is a mark" can no longer pass for "the mark is on screen". diff --git a/src/annotations/annotationEngine.js b/src/annotations/annotationEngine.js index 4125986ad4..a3d7267011 100644 --- a/src/annotations/annotationEngine.js +++ b/src/annotations/annotationEngine.js @@ -828,6 +828,10 @@ export function createAnnotationEngine({ }; for (const ex of annotations.values()) { if (ex.type !== anno.type || !ex.anchor) continue; + // A shape drawn by hand and a voice mark are never the same mark: a + // match would let a voice TTL expire the drawn one, or replace it. A + // hidden mark is not refreshed either; a new shape there is new. + if (Boolean(ex.manual) !== Boolean(anno.manual) || ex.hidden) continue; // Identity is GEOMETRY, not label: "Marina" and "Marina District" resolve to the SAME // polygon/anchor and must collapse to one mark (the caller replaces label/color in place // so the latest caption wins). Resolution is deterministic, so the same place re-resolves @@ -1054,15 +1058,21 @@ export function createAnnotationEngine({ if (!anno) return false; if (anno.type === 'route' && anno.path?.length) { const ring = anno.path.map((p) => [p.lon, p.lat]); - const lons = ring.map(([lon]) => lon); + // Unwrap around the first vertex, as ringRange does, so a line across + // the antimeridian is centred on it, not on the far side of the globe. + const ref = ring[0][0]; + const lons = ring.map( + ([lon]) => lon - 360 * Math.round((lon - ref) / 360), + ); const lats = ring.map(([, lat]) => lat); + const midLon = (Math.min(...lons) + Math.max(...lons)) / 2; frameAnnotation({ ...anno, to: null, ring, polygons: null, anchor: { - lon: (Math.min(...lons) + Math.max(...lons)) / 2, + lon: ((((midLon + 180) % 360) + 360) % 360) - 180, lat: (Math.min(...lats) + Math.max(...lats)) / 2, height: 0, }, diff --git a/src/annotations/annotationEngine.test.mjs b/src/annotations/annotationEngine.test.mjs index 6e435fcd44..3c5dd82bb9 100644 --- a/src/annotations/annotationEngine.test.mjs +++ b/src/annotations/annotationEngine.test.mjs @@ -12,6 +12,7 @@ import { createStandalonePlaceSearch } from '../standalone/placeSearch.js'; // // Run with: npm test (node --test) import { test } from 'node:test'; +import * as Cesium from 'cesium'; import assert from 'node:assert/strict'; import { createAnnotationEngine, @@ -787,6 +788,173 @@ test('hand-drawn marks: one mark can be hidden, renamed, recoloured, framed and assert.equal(changes, seen, 'an unsubscribed listener hears nothing'); }); +// The list trusts these calls to change the globe, not just the list: each +// is checked by its effect (renderer calls, alpha, camera, notifications). +test('hand-drawn marks: remove, hide, clear, expiry and framing have their effect', async (t) => { + const frames = []; + const originalRequestAnimationFrame = globalThis.requestAnimationFrame; + const originalCancelAnimationFrame = globalThis.cancelAnimationFrame; + globalThis.requestAnimationFrame = (callback) => frames.push(callback); + globalThis.cancelAnimationFrame = () => {}; + let now = 1_000_000; + t.mock.method(performance, 'now', () => now); + _resetRenderGovernorForTest(); + t.after(() => { + globalThis.requestAnimationFrame = originalRequestAnimationFrame; + globalThis.cancelAnimationFrame = originalCancelAnimationFrame; + _resetRenderGovernorForTest(); + }); + const runFrames = () => { + for (let i = 0; i < 5 && frames.length; i += 1) frames.shift()(); + }; + const { renderer, calls } = fakeRenderer(); + const flights = []; + const engine = createAnnotationEngine({ + viewer: { + camera: { + heading: 0, + flyToBoundingSphere: (sphere) => flights.push(sphere), + }, + }, + renderer, + }); + let changes = 0; + engine.onChange(() => { + changes += 1; + }); + + await engine.annotate( + [ + { + type: 'pin', + manual: true, + latitude: 30.27, + longitude: -97.74, + label: 'Camp', + }, + { + type: 'pin', + manual: true, + latitude: 30.3, + longitude: -97.7, + label: 'Base', + }, + ], + { persist: true }, + ); + now += 1000; + runFrames(); + const [camp, base] = engine.list(); + assert.equal(camp.alpha, 1); + + engine.setHidden(camp.id, true); + runFrames(); + assert.equal(camp.alpha, 0, 'a hidden mark is drawn at alpha 0'); + assert.ok(engine.list().includes(camp), 'and stays on the board'); + engine.setHidden(camp.id, false); + runFrames(); + assert.equal(camp.alpha, 1, 'showing it again is immediate, with no fade-in'); + + const removes = calls.remove; + let seen = changes; + engine.remove(base.id); + assert.equal(calls.remove, removes + 1, 'remove takes it off the globe'); + assert.equal(changes, seen + 1, 'and tells the list'); + + seen = changes; + engine.clear(); + assert.equal(changes, seen + 1, 'a clear tells the list'); + + // A voice mark with a TTL: its expiry must reach the list too. + await engine.annotate( + [{ type: 'pin', latitude: 1, longitude: 1, label: 'Brief' }], + { + persist: false, + ttlMs: 2000, + }, + ); + seen = changes; + now += 60_000; + runFrames(); + assert.equal(engine.list().length, 0, 'the mark expired'); + assert.equal(changes, seen + 1, 'expiry tells the list'); + + // A line across the antimeridian is framed there, not on the far side. + await engine.annotate( + [ + { + type: 'route', + manual: true, + path: [ + [179.9, -17], + [-179.9, -17.1], + ], + label: '', + }, + ], + { persist: true }, + ); + const [line] = engine.list(); + engine.frame(line.id); + const centre = Cesium.Cartographic.fromCartesian(flights.at(-1).center); + assert.ok( + Math.abs(Math.abs(Cesium.Math.toDegrees(centre.longitude)) - 180) < 0.5, + `framed at ${Cesium.Math.toDegrees(centre.longitude)}°, not near 180°`, + ); +}); + +test('hand-drawn marks: a voice mark or a hidden mark is not taken as their duplicate', async (t) => { + installAnimationFrameStubs(t); + _resetRenderGovernorForTest(); + t.after(() => _resetRenderGovernorForTest()); + const { renderer } = fakeRenderer(); + const engine = createAnnotationEngine({ viewer: {}, renderer }); + await engine.annotate( + [ + { + type: 'pin', + manual: true, + latitude: 30.27, + longitude: -97.74, + label: 'Camp', + }, + ], + { persist: true }, + ); + const [drawn] = engine.list(); + // The agent marks the same spot with the same label, briefly. + await engine.annotate( + [{ type: 'pin', latitude: 30.27, longitude: -97.74, label: 'Camp' }], + { + persist: false, + }, + ); + assert.equal(engine.list().length, 2, 'the voice mark is its own mark'); + assert.equal(drawn.ttlMs, null, 'the drawn pin keeps persisting'); + assert.equal(drawn.manual, true); + + engine.setHidden(drawn.id, true); + const again = await engine.annotate( + [ + { + type: 'pin', + manual: true, + latitude: 30.27, + longitude: -97.74, + label: 'Camp', + }, + ], + { persist: true }, + ); + assert.equal(again.drawn, 1); + const visible = engine.list().filter((mark) => mark.manual && !mark.hidden); + assert.equal( + visible.length, + 1, + 'a pin dropped on a hidden one is a new, visible pin', + ); +}); + test('hand-drawn marks: only a manual mark can be restyled', async (t) => { installAnimationFrameStubs(t); _resetRenderGovernorForTest(); diff --git a/src/annotations/drawMarkList.js b/src/annotations/drawMarkList.js index dc6c24a729..6706f1b2ab 100644 --- a/src/annotations/drawMarkList.js +++ b/src/annotations/drawMarkList.js @@ -60,36 +60,20 @@ export function createDrawMarkList({ listEl, annotations, listen }) { const doc = listEl.ownerDocument; let destroyed = false; let picking = null; // the id whose colour picker is open + /** @type {Map} each listed mark's row nodes */ + const rows = new Map(); + let rendering = false; + let rerender = false; const marks = () => (annotations.list?.() || []).filter((mark) => mark?.manual === true); const find = (id) => marks().find((mark) => mark.id === id) || null; - /** Which row control has focus, so a re-render can give it back. */ - function focusedControl() { - const active = doc.activeElement; - if (!active || !listEl.contains?.(active)) return null; - const row = active.closest?.('[data-mark-id]'); - return row - ? { id: row.dataset.markId, control: active.dataset?.control } - : null; - } - - function restoreFocus(was) { - if (!was) return; - const row = [...listEl.querySelectorAll('[data-mark-id]')].find( - (node) => node.dataset.markId === was.id, - ); - row?.querySelector?.(`[data-control="${was.control}"]`)?.focus?.(); - } - - function actionButton(icon, label, control) { + function actionButton(icon, control) { const button = doc.createElement('button'); button.type = 'button'; button.className = 'geo-import-action'; button.dataset.control = control; - button.title = label; - button.setAttribute('aria-label', label); const glyph = doc.createElement('span'); glyph.className = 'material-symbols-outlined'; glyph.setAttribute('aria-hidden', 'true'); @@ -98,25 +82,24 @@ export function createDrawMarkList({ listEl, annotations, listen }) { return button; } - function colorPicker(mark) { + function setLabel(node, label) { + node.title = label; + node.setAttribute('aria-label', label); + } + + function colorPicker() { const picker = doc.createElement('div'); picker.className = 'draw-colors draw-mark-colors'; + picker.dataset.control = 'picker'; picker.setAttribute('role', 'radiogroup'); - picker.setAttribute( - 'aria-label', - t('Colour of {name}', { name: label(mark) }), - ); for (const color of DRAW_COLORS) { const swatch = doc.createElement('button'); swatch.type = 'button'; - swatch.className = `draw-color${color === mark.color ? ' active' : ''}`; + swatch.className = 'draw-color'; swatch.dataset.color = color; swatch.dataset.control = `color-${color}`; swatch.setAttribute('role', 'radio'); - swatch.setAttribute('aria-checked', String(color === mark.color)); - const name = t(COLOR_NAMES[color]); - swatch.title = name; - swatch.setAttribute('aria-label', name); + setLabel(swatch, t(COLOR_NAMES[color])); picker.append(swatch); } return picker; @@ -124,75 +107,118 @@ export function createDrawMarkList({ listEl, annotations, listen }) { const label = (mark) => mark.name || drawMarkFallbackName(mark); + /** One row's nodes, built once and kept while its mark is on the board. */ + function createRow(id) { + const row = doc.createElement('li'); + row.className = 'geo-import-row draw-mark-row'; + row.dataset.markId = id; + + const swatch = doc.createElement('button'); + swatch.type = 'button'; + swatch.className = 'geo-import-swatch draw-mark-swatch'; + swatch.dataset.control = 'swatch'; + + // textContent and value only, never markup: the name is typed text. + const name = doc.createElement('input'); + name.type = 'text'; + name.className = 'geo-import-name draw-mark-name'; + name.dataset.control = 'name'; + name.maxLength = 120; + name.autocomplete = 'off'; + name.spellcheck = false; + + const toggle = actionButton('visibility', 'toggle'); + const fly = actionButton('my_location', 'fly'); + const remove = actionButton('close', 'remove'); + row.append(swatch, name, toggle, fly, remove); + return { row, swatch, name, toggle, fly, remove, picker: null }; + } + + function updateRow(nodes, mark) { + const { row, swatch, name, toggle, fly, remove } = nodes; + const title = label(mark); + row.classList.toggle('hidden-mark', Boolean(mark.hidden)); + swatch.style.background = DRAW_COLOR_CSS[mark.color] || ''; + setLabel(swatch, t('Change the colour of {name}', { name: title })); + swatch.setAttribute('aria-expanded', String(picking === mark.id)); + // A name being typed is the person's draft: a board change elsewhere + // must not overwrite it. + if (doc.activeElement !== name) name.value = mark.name || ''; + name.placeholder = drawMarkFallbackName(mark); + name.setAttribute('aria-label', t('Name of {name}', { name: title })); + const visible = !mark.hidden; + toggle.children[0].textContent = visible ? 'visibility' : 'visibility_off'; + setLabel( + toggle, + visible + ? t('Hide {name}', { name: title }) + : t('Show {name}', { name: title }), + ); + toggle.setAttribute('aria-pressed', String(visible)); + setLabel(fly, t('Fly to {name}', { name: title })); + setLabel(remove, t('Remove {name}', { name: title })); + + if (picking === mark.id) { + nodes.picker ||= colorPicker(); + nodes.picker.setAttribute( + 'aria-label', + t('Colour of {name}', { name: title }), + ); + for (const button of nodes.picker.children) { + const on = button.dataset.color === mark.color; + button.classList.toggle('active', on); + button.setAttribute('aria-checked', String(on)); + } + if (nodes.picker.parentNode !== row) row.append(nodes.picker); + } else if (nodes.picker) { + nodes.picker.remove(); + nodes.picker = null; + } + } + + /** + * Bring the rows in line with the board. Rows are updated in place, never + * rebuilt: a rebuild would detach the button under a click that is half + * done, and the name field someone is typing in. + */ function render() { if (destroyed) return; - const keep = focusedControl(); + if (rendering) { + rerender = true; + return; + } + rendering = true; + try { + do { + rerender = false; + reconcile(); + } while (rerender && !destroyed); + } finally { + rendering = false; + } + } + + function reconcile() { const list = marks(); if (picking && !list.some((mark) => mark.id === picking)) picking = null; - listEl.replaceChildren( - ...list.map((mark) => { - const row = doc.createElement('li'); - row.className = 'geo-import-row draw-mark-row'; - row.dataset.markId = mark.id; - if (mark.hidden) row.classList.add('hidden-mark'); - - const swatch = doc.createElement('button'); - swatch.type = 'button'; - swatch.className = 'geo-import-swatch draw-mark-swatch'; - swatch.dataset.control = 'swatch'; - swatch.style.background = DRAW_COLOR_CSS[mark.color] || ''; - const swatchLabel = t('Change the colour of {name}', { - name: label(mark), - }); - swatch.title = swatchLabel; - swatch.setAttribute('aria-label', swatchLabel); - swatch.setAttribute('aria-expanded', String(picking === mark.id)); - - // textContent and value only, never markup: the name is typed text. - const name = doc.createElement('input'); - name.type = 'text'; - name.className = 'geo-import-name draw-mark-name'; - name.dataset.control = 'name'; - name.maxLength = 120; - name.autocomplete = 'off'; - name.spellcheck = false; - name.value = mark.name || ''; - name.placeholder = drawMarkFallbackName(mark); - name.setAttribute( - 'aria-label', - t('Name of {name}', { name: label(mark) }), - ); - - const visible = !mark.hidden; - const toggle = actionButton( - visible ? 'visibility' : 'visibility_off', - visible - ? t('Hide {name}', { name: label(mark) }) - : t('Show {name}', { name: label(mark) }), - 'toggle', - ); - toggle.setAttribute('aria-pressed', String(visible)); - row.append( - swatch, - name, - toggle, - actionButton( - 'my_location', - t('Fly to {name}', { name: label(mark) }), - 'fly', - ), - actionButton( - 'close', - t('Remove {name}', { name: label(mark) }), - 'remove', - ), - ); - if (picking === mark.id) row.append(colorPicker(mark)); - return row; - }), - ); + const live = new Set(list.map((mark) => mark.id)); + for (const [id, nodes] of rows) { + if (live.has(id)) continue; + nodes.row.remove(); + rows.delete(id); + } + list.forEach((mark, index) => { + let nodes = rows.get(mark.id); + if (!nodes) { + nodes = createRow(mark.id); + rows.set(mark.id, nodes); + } + updateRow(nodes, mark); + // Move a row only when it is out of place, so a focused one stays put. + if (listEl.children[index] !== nodes.row) + listEl.insertBefore(nodes.row, listEl.children[index] || null); + }); listEl.classList.toggle('visible', list.length > 0); - restoreFocus(keep); } const rowId = (node) => node?.closest?.('[data-mark-id]')?.dataset.markId; @@ -203,10 +229,18 @@ export function createDrawMarkList({ listEl, annotations, listen }) { const mark = id && find(id); if (!mark) return; const next = input.value.trim(); + input.value = next; if (next === (mark.name || '')) return; annotations.restyle(id, { name: next }); } + /** Close a row's colour picker and give focus back to its swatch. */ + function closePicker(id) { + picking = null; + render(); + rows.get(id)?.swatch.focus?.(); + } + listen(listEl, 'click', (event) => { const control = event.target?.closest?.('[data-control]'); const id = rowId(control); @@ -216,15 +250,23 @@ export function createDrawMarkList({ listEl, annotations, listen }) { picking = picking === id ? null : id; render(); } else if (kind.startsWith('color-')) { + const color = control.dataset.color; picking = null; - annotations.restyle(id, { color: control.dataset.color }); - render(); + if (find(id)?.color !== color) annotations.restyle(id, { color }); + closePicker(id); } else if (kind === 'toggle') annotations.setHidden(id, !find(id)?.hidden); else if (kind === 'fly') annotations.frame(id); else if (kind === 'remove') annotations.remove(id); }); listen(listEl, 'keydown', (event) => { const input = event.target; + if (event.key === 'Escape' && picking && rowId(input) === picking) { + // Escape closes the picker; it must not also leave Draw. + event.preventDefault(); + event.stopPropagation(); + closePicker(picking); + return; + } if (input?.dataset?.control !== 'name') return; if (event.key === 'Enter') { event.preventDefault(); @@ -252,6 +294,7 @@ export function createDrawMarkList({ listEl, annotations, listen }) { if (destroyed) return; destroyed = true; unsubscribe(); + rows.clear(); listEl.replaceChildren(); listEl.classList.remove('visible'); }, diff --git a/src/annotations/drawMarkList.test.mjs b/src/annotations/drawMarkList.test.mjs index fb7567e606..68334b5c07 100644 --- a/src/annotations/drawMarkList.test.mjs +++ b/src/annotations/drawMarkList.test.mjs @@ -47,14 +47,31 @@ function fakeDocument() { getAttribute(key) { return this.attributes.get(key) ?? null; }, + get parentNode() { + return this.parent; + }, append(...nodes) { - for (const child of nodes) { - child.parent = this; - this.children.push(child); - } + for (const child of nodes) this.insertBefore(child, null); + }, + insertBefore(child, before) { + child.remove(); + child.parent = this; + const at = before ? this.children.indexOf(before) : -1; + if (at < 0) this.children.push(child); + else this.children.splice(at, 0, child); + }, + remove() { + // Like a browser, taking the focused node out of the page blurs it. + if (doc.activeElement && this.contains(doc.activeElement)) + doc.activeElement = null; + if (this.parent) + this.parent.children = this.parent.children.filter( + (node) => node !== this, + ); + this.parent = null; }, replaceChildren(...nodes) { - this.children = []; + for (const child of [...this.children]) child.remove(); this.append(...nodes); }, closest(selector) { @@ -136,7 +153,22 @@ function harness(initial) { const rows = () => listEl.children; const control = (row, name) => row.querySelector(`[data-control="${name}"]`); const click = (target) => listeners.click({ target }); - return { list, listEl, listeners, rows, control, click, calls, changed }; + const addMark = (mark) => { + marks = [...marks, { hidden: false, ...mark }]; + changed(); + }; + return { + list, + listEl, + listeners, + rows, + control, + click, + calls, + changed, + addMark, + changeListeners, + }; } const LINE = { @@ -251,11 +283,14 @@ test('a name is committed on Enter or blur, and Escape undoes the edit without l }); test('a re-render keeps focus on the same control, and destroy stops listening', () => { - const { rows, control, list, listEl, changed } = harness([LINE]); + const { rows, control, list, listEl, changed, changeListeners } = harness([ + LINE, + ]); control(rows()[0], 'fly').focus(); changed(); assert.equal(listEl.ownerDocument.activeElement, control(rows()[0], 'fly')); list.destroy(); + assert.equal(changeListeners.size, 0, 'destroy unsubscribes from the board'); assert.equal(rows().length, 0); assert.ok(!listEl.classList.contains('visible')); changed(); @@ -278,3 +313,64 @@ test('an unnamed shape is called by its kind', () => { 'Line', ); }); + +test('a board change while a name is being typed keeps the draft and the row', () => { + const { rows, control, listEl, addMark, calls } = harness([LINE, PIN]); + const name = control(rows()[0], 'name'); + name.focus(); + name.value = 'Half-typ'; + // A voice mark lands, and another hand-drawn one: neither may wipe the draft. + addMark(VOICE); + addMark({ ...PIN, id: 'a4', name: null, label: '' }); + assert.equal(control(rows()[0], 'name'), name, 'the row is not rebuilt'); + assert.equal(name.value, 'Half-typ', 'the typed text survives'); + assert.equal(listEl.ownerDocument.activeElement, name, 'focus stays'); + assert.equal(calls.length, 0, 'nothing is committed early'); + assert.deepEqual( + rows().map((row) => row.dataset.markId), + ['a1', 'a2', 'a4'], + ); +}); + +test('a click right after typing a name still reaches its button', () => { + const { rows, control, listeners, click, calls } = harness([LINE, PIN]); + const name = control(rows()[0], 'name'); + name.focus(); + name.value = 'Home'; + const hide = control(rows()[1], 'toggle'); + const remove = control(rows()[0], 'remove'); + // mousedown on a button blurs the field first, which commits the name. + name.blur(); + listeners.focusout({ target: name }); + assert.deepEqual(calls.at(-1), ['restyle', 'a1', { name: 'Home' }]); + assert.equal(control(rows()[1], 'toggle'), hide, 'the button is still there'); + click(hide); + assert.deepEqual(calls.at(-1), ['hide', 'a2', true]); + click(remove); + assert.deepEqual(calls.at(-1), ['remove', 'a1']); +}); + +test('picking a colour returns focus to the swatch; Escape closes the picker', () => { + const { rows, control, click, listeners, listEl, calls } = harness([LINE]); + const doc = listEl.ownerDocument; + click(control(rows()[0], 'swatch')); + click(control(rows()[0], 'color-primary')); + assert.equal(calls.length, 0, 'the colour it already has costs nothing'); + assert.equal(doc.activeElement, control(rows()[0], 'swatch')); + + click(control(rows()[0], 'swatch')); + const amber = control(rows()[0], 'color-amber'); + amber.focus(); + let stopped = false; + listeners.keydown({ + key: 'Escape', + target: amber, + preventDefault() {}, + stopPropagation() { + stopped = true; + }, + }); + assert.ok(stopped, 'Escape does not reach Draw'); + assert.equal(control(rows()[0], 'color-amber'), null, 'the picker closed'); + assert.equal(doc.activeElement, control(rows()[0], 'swatch')); +}); diff --git a/src/annotations/drawTool.js b/src/annotations/drawTool.js index c352f26e8f..75419764a2 100644 --- a/src/annotations/drawTool.js +++ b/src/annotations/drawTool.js @@ -310,6 +310,9 @@ export function initDrawTool({ viewer, annotations }) { }; const onKey = (event) => { if (!active || destroyed || typingElsewhere(event)) return; + // Keys on the shape list's own controls are the list's (Esc closes a + // colour picker there), not the drawing's. + if (markListEl?.contains?.(event.target)) return; // Enter goes to finish() once a shape has been started; finish() owns the // decision and says WHY it refused. Swallowing the key on a degenerate // shape left the person pressing Enter at a silent panel. A focused button From ab1239d3ed9feae0efdfcec052a61b186df77b2c Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Fri, 30 Oct 2026 15:26:21 +0000 Subject: [PATCH 087/237] Cap rail title size and keep compact type to launchers The rail titles took the dock's rem type inside fixed 176px launchers, so a larger browser font cut collapsed titles such as Recent Imagery short. Cap the rail type at its 16px-root size. The compact type for translated titles now skips Chinese and Japanese, which fit at full size and keep their 9px floor, and reaches only the rail's own launchers, so Radio inside Context keeps its type. Tests now check the launcher divider, gap, toggle margin and flex-shrink rules by their declarations, not only their selectors. --- src/ui/railPanelChrome.test.mjs | 77 ++++++++++++++++++++++++++++----- src/ui/styles/controls.css | 21 ++++++--- 2 files changed, 81 insertions(+), 17 deletions(-) diff --git a/src/ui/railPanelChrome.test.mjs b/src/ui/railPanelChrome.test.mjs index bfcd7845e5..3b79bbcc54 100644 --- a/src/ui/railPanelChrome.test.mjs +++ b/src/ui/railPanelChrome.test.mjs @@ -9,7 +9,10 @@ const clean = (selector) => .replace(/\s+/g, ' ') .trim(); const rules = [...css.matchAll(/([^{}]+)\{([^{}]*)\}/g)].map( - ([, selector, body]) => ({ selector: clean(selector), body }), + ([, selector, body]) => ({ + selector: clean(selector), + body: body.replace(/\/\*[\s\S]*?\*\//g, ''), + }), ); const railRules = rules.filter(({ selector }) => selector.includes('#left-panel-stack, #right-context-rail'), @@ -94,6 +97,47 @@ test('collapsed launchers on both rails keep titles inside the card', () => { ); assert.ok(translated, 'translated collapsed titles must fit on both rails'); assert.match(translated.body, /font-size:\s*8px/); + // Chinese and Japanese titles fit at full size; 8px would put them under + // the 9px CJK floor in cjk.css. + assert.match(translated.selector, /:not\(:lang\(zh\)\):not\(:lang\(ja\)\)/); + // Only the rail's own launchers: Radio, nested in Context, keeps its type. + assert.match( + translated.selector, + /#right-context-rail\) > \.panel-collapsible\.collapsed > \[class\$='-panel-inner'\] > \.panel-header > \.panel-title$/, + ); +}); + +test('a collapsed launcher drops its divider so English titles fit whole', () => { + const launcher = (tail) => + railRules.filter(({ selector }) => + selector + .split(/,(?![^(]*\))/) + .some((part) => + part + .trim() + .endsWith( + `.collapsed > [class$='-panel-inner'] > .panel-header${tail}`, + ), + ), + ); + const [header] = launcher(''); + const [divider] = launcher(' > .panel-divider'); + const [toggle] = launcher(' > .panel-collapse-btn'); + assert.match(header?.body || '', /gap:\s*8px/, 'the launcher header gap'); + assert.match(divider?.body || '', /display:\s*none/, 'the launcher divider'); + assert.match( + toggle?.body || '', + /margin-left:\s*auto/, + 'the launcher toggle', + ); + const button = rules.find( + ({ selector }) => selector === '.panel-collapse-btn', + ); + assert.match( + button?.body || '', + /flex-shrink:\s*0/, + 'a long title must not squeeze the toggle', + ); }); test('the default theme geometry change leaves cyber gutters alone', () => { @@ -122,13 +166,21 @@ test('rail titles and dock labels share one set of label tokens', () => { const rail = railRules.find(({ body }) => /--dock-label-font-size/.test(body), ); - for (const body of [dock?.body, rail?.body]) { - assert.match(body || '', /font-size:\s*var\(--dock-label-font-size\)/); - assert.match( - body || '', - /letter-spacing:\s*var\(--dock-label-letter-spacing\)/, - ); - } + assert.match(dock?.body || '', /font-size:\s*var\(--dock-label-font-size\)/); + assert.match( + dock?.body || '', + /letter-spacing:\s*var\(--dock-label-letter-spacing\)/, + ); + // The dock's rem type, capped at its 16px-root size: a collapsed launcher + // is a fixed 176px, so a larger browser font must not cut titles short. + assert.match( + rail?.body || '', + /font-size:\s*min\(var\(--dock-label-font-size\),\s*9\.28px\)/, + ); + assert.match( + rail?.body || '', + /letter-spacing:\s*min\(var\(--dock-label-letter-spacing\),\s*2\.08px\)/, + ); }); test('default theme overrides never reach the cyber theme', () => { @@ -165,8 +217,13 @@ test('default theme overrides never reach the cyber theme', () => { }); test('launcher compaction and header colour stay on the rail panels themselves', () => { - const compact = railRules.filter(({ selector }) => - /\.collapsed > \[class\$='-panel-inner'\] > \.panel-header/.test(selector), + // The divider, gap and toggle rules; the translated type rule is checked + // above. + const compact = railRules.filter( + ({ selector }) => + /\.collapsed > \[class\$='-panel-inner'\] > \.panel-header/.test( + selector, + ) && !selector.startsWith('html:'), ); assert.equal(compact.length, 3); for (const { selector } of compact) { diff --git a/src/ui/styles/controls.css b/src/ui/styles/controls.css index 936f095df3..b50e9c2a10 100644 --- a/src/ui/styles/controls.css +++ b/src/ui/styles/controls.css @@ -82,13 +82,16 @@ } /* Side panel titles read like the command dock's labels: one type for every - panel, collapsed or open, and bright enough to read over the globe. */ + panel, collapsed or open, and bright enough to read over the globe. The + dock's type is in rem, but a collapsed launcher is a fixed 176px, so the + rail caps it at its 16px-root size: a larger browser font must not cut + Recent Imagery short. */ :is(#left-panel-stack, #right-context-rail) :is(.panel-header > .panel-title, .pp-header-label) { font-family: var(--font-mono); - font-size: var(--dock-label-font-size); + font-size: min(var(--dock-label-font-size), 9.28px); font-weight: var(--dock-label-font-weight); - letter-spacing: var(--dock-label-letter-spacing); + letter-spacing: min(var(--dock-label-letter-spacing), 2.08px); text-transform: uppercase; } @@ -165,11 +168,15 @@ /* Translated titles run longer (Aktuelle Bilddaten), so a collapsed rail launcher sets them in compact type rather than pushing the disclosure - button out of the card or cutting the word short. */ -html:not([lang='en']) + button out of the card or cutting the word short. Chinese and Japanese + titles fit at full size and stay at or above their 9px floor (cjk.css); + Radio, nested in Context, is not a launcher. */ +html:not([lang='en']):not(:lang(zh)):not(:lang(ja)) :is(#left-panel-stack, #right-context-rail) - .panel-collapsible.collapsed - .panel-title { + > .panel-collapsible.collapsed + > [class$='-panel-inner'] + > .panel-header + > .panel-title { font-size: 8px; letter-spacing: 1px; } From 6d6df9d83b9115fdef1fa295cd9635407867f177 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 30 Oct 2026 16:03:44 -0700 Subject: [PATCH 088/237] docs: plan the Vue migration and the panel rail --- docs/VUE-MIGRATION.md | 76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 docs/VUE-MIGRATION.md diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md new file mode 100644 index 0000000000..f5846c99c0 --- /dev/null +++ b/docs/VUE-MIGRATION.md @@ -0,0 +1,76 @@ +# Vue migration + +The application UI moves from static templates plus imperative DOM wiring to +Vue 3 components with Pinia stores. The migration keeps the experience the +same: element ids, classes, the global stylesheet, translations, keyboard +shortcuts, voice actions, share links and the phone layout all behave as +before. The one intended change is the panel rail described below. + +## Goals + +- Views are Vue single-file components; state that several views read lives in + Pinia stores rather than in DOM classes. +- The owners listed in [UI-OWNERSHIP.md](UI-OWNERSHIP.md) keep their + responsibilities. A component replaces DOM construction; it does not add a + second owner of the same state. +- Public methods used by layers, scene playback, voice and host applications + (`setPanelCollapsed`, `setContextMode`, `setStyle`, share and location + subscriptions) keep their signatures. +- Ids and classes used by browser QA and host applications stay stable until a + host can use an explicit extension point instead. + +## The panel rail + +Each desktop sidebar gets a floating icon rail that lists every panel available +on that side. Selecting an icon opens that panel; selecting it again closes it. +One panel is open per side at a time, so the rail replaces the accordion +stacking. Panels that are not available in the current mode (for example +Weather before a weather layer is active) are shown disabled or omitted as the +panel's own availability rule dictates. The rail hides with the rest of the +chrome in Cockpit, scene playback, recording and the clean view. + +Phones keep the existing bottom tab bar and sheets; the rail is desktop only. + +Voice and keyboard openings go through the same panel store, so they follow the +one-panel rule too. Share links continue to record which panels are open. + +## Component kit + +`src/ui/kit/` holds the generic components (`UiRail`, `UiPanel`, `UiButton`, +`UiChip`, `UiTooltip` and so on). Names, props and events follow Halfpixel's +`ui-vue` kit so the two can converge later, but the components are written for +this repository and styled by its existing stylesheet and custom properties. +They contain no application state. + +## Phases + +1. **Foundation.** Vue, Pinia and the Vite Vue plugin join the browser build + (`build/vite.js`, so host applications receive them too). One Vue app is + mounted beside the existing markup with a shared Pinia instance. Stores + mirror the state that owners already publish: panel disclosure, the UI + theme, exclusive surfaces (Cockpit, scene playback, recording, clean view), + share state and location. The existing `gev:*` window events feed them. + Nothing visible changes. +2. **Rail.** The panel store becomes the authority for which panel is open on + each side, enforcing one panel per side, and the rail renders from it. +3. **Panels.** Each template and its wiring become a component, keeping ids, + classes, `data-i18n` text and CSS. Order: Scenes, Weather, Recent imagery, + Street level, CCTV, Layers, Display, Context and Radio, the command dock, + the phone shell, then Cockpit. Layers that write into the right rail + directly gain a slot instead. +4. **Cleanup.** The build-time template expansion and the attribute + translation pass are retired once nothing uses them. Hosts register panels + and rail items through an explicit API instead of editing markup. + Markup-string tests are replaced by component tests. + +## Verification + +- Unit tests: stores and components run under `npm test`. Single-file + components are compiled by a test loader; component tests render with + `@vue/test-utils` and `happy-dom`. +- Visual parity: before/after screenshots of every panel at desktop and phone + widths, in the default and Cyber themes, with the rail as the only expected + difference. +- Browser QA: the selector-based `scripts/qa-*.mjs` suites keep passing. +- `npm run format:check`, `npm run check:boundaries`, `npm run i18n` and + `npm run build`. From c13c487dcffa74393e2aea1e3822ddfc82337ca7 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 30 Oct 2026 16:06:15 -0700 Subject: [PATCH 089/237] build: add Vue and Pinia to the browser build and unit tests --- build/vite.js | 3 + package-lock.json | 608 +++++++++++++++++++++++++++++++- package.json | 7 +- scripts/package-boundaries.json | 2 +- scripts/run-unit-tests.mjs | 8 +- src/testSupport/registerVue.mjs | 4 + src/testSupport/vueLoader.mjs | 39 ++ src/tooling/viteBuild.test.mjs | 7 +- 8 files changed, 658 insertions(+), 20 deletions(-) create mode 100644 src/testSupport/registerVue.mjs create mode 100644 src/testSupport/vueLoader.mjs diff --git a/build/vite.js b/build/vite.js index 9606038149..a1c9c403b9 100644 --- a/build/vite.js +++ b/build/vite.js @@ -1,6 +1,7 @@ import { fileURLToPath } from 'node:url'; import { applicationHtmlPlugin } from './application-html.js'; import cesium from 'vite-plugin-cesium'; +import vue from '@vitejs/plugin-vue'; import { DEFAULT_ALLOWED_HOSTS, hostCheckPlugin } from './allowedHosts.js'; import { embedFramingPlugin } from './embed-framing.js'; import { panelBuildPlugin } from './panel.js'; @@ -156,6 +157,8 @@ export function createBrowserViteConfig({ hostCheckPlugin(), cesium(), applicationHtmlPlugin(), + // Application views are Vue single-file components. + vue(), ...plugins, embedFramingPlugin(), panelBuildPlugin(), diff --git a/package-lock.json b/package-lock.json index 3db3374423..263fd793d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,9 +19,14 @@ "mapillary-js": "^4.1.2", "mgrs": "^2.1.0", "pbf": "^5.1.2", - "satellite.js": "^6.0.2" + "pinia": "^2.3.1", + "satellite.js": "^6.0.2", + "vue": "^3.5.44" }, "devDependencies": { + "@vitejs/plugin-vue": "^5.2.4", + "@vue/test-utils": "^2.5.1", + "happy-dom": "^20.14.6", "prettier": "3.9.6", "puppeteer": "^25.16.0", "sharp": "^0.35.4", @@ -33,6 +38,52 @@ "node": ">=24.14.0 <25 || >=26 <27" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.11", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.11.tgz", + "integrity": "sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.12", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.12.tgz", + "integrity": "sha512-WJ7JBp/Q4+z/ImydtI7jS6NVco5++632ExBemSX+Ysb+G1lCwQ5BVo3SY+jGGOcZXI4ZccbZSUSJLNBW6eEpJg==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.11" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.11.tgz", + "integrity": "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.11", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@cesium/engine": { "version": "22.3.0", "resolved": "https://registry.npmjs.org/@cesium/engine/-/engine-22.3.0.tgz", @@ -1064,6 +1115,12 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "license": "MIT" + }, "node_modules/@jtarrio/signals": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/@jtarrio/signals/-/signals-0.10.1.tgz", @@ -1115,6 +1172,13 @@ "node": ">=24.0.0" } }, + "node_modules/@one-ini/wasm": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.2.1.tgz", + "integrity": "sha512-TUqERXGNTifZ9y2g3wPxQrw3HpHv/02DsW3D90T9x0hhonrL1ZqpSmNrU2XkoIq0fP1N6gZfVQzy2Fw1ZvGBNg==", + "dev": true, + "license": "MIT" + }, "node_modules/@puppeteer/browsers": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.6.tgz", @@ -1556,6 +1620,16 @@ "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", "license": "MIT" }, + "node_modules/@types/node": { + "version": "26.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", + "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, "node_modules/@types/pako": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.7.tgz", @@ -1605,6 +1679,171 @@ "integrity": "sha512-Qu3Nn6JFuF4+sHKYl+IcX9vYiI40ogleXzFFSxoE1W94rG98o/kXs8uJ0QSfFzuwBCZWlGfUGpPkgwuuX4PchA==", "license": "MIT" }, + "node_modules/@types/whatwg-mimetype": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-mimetype/-/whatwg-mimetype-3.0.2.tgz", + "integrity": "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vitejs/plugin-vue": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz", + "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.44.tgz", + "integrity": "sha512-k34nCytbK8PQ1gR2mGROYOw6Pnv/mumqIdrZ3x2tbyXZDWm7ViKGLTfdB+DRrWqEQsLgGJvn0WN9jBif5zCTLQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.9", + "@vue/shared": "3.5.44", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.2" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.44.tgz", + "integrity": "sha512-W5AoBFWdw1lQAKiHowkfgFKFab82oSRT6sGsPfw/q1GRjsy/ZJFLHGhJyBRIFN9APLTUduDH9U2JAiPOIyKuYg==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.44.tgz", + "integrity": "sha512-dzHmQ4jXTpdr5FjIQUeykVakN/uzqFbUo9/C5ikBFg3a3PeM6uRxeczx1ZbXBML0/zJstEh3ygYipzR5Z7b2Pw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.9", + "@vue/compiler-core": "3.5.44", + "@vue/compiler-dom": "3.5.44", + "@vue/compiler-ssr": "3.5.44", + "@vue/shared": "3.5.44", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.29", + "source-map-js": "^1.2.2" + } + }, + "node_modules/@vue/compiler-sfc/node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.44.tgz", + "integrity": "sha512-xr5gb1JVHlfXJwSlRz1FeP6uxoazdzHuMTVLE7up+4Vrqxk219CvxLPxD9NXBt47yvZW7+p4DXfyp4O1fkByIA==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", + "license": "MIT" + }, + "node_modules/@vue/reactivity": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.44.tgz", + "integrity": "sha512-u+QJdKeBBEADkPdevsL+6E12QlYVfBD8Zcw5qjDQKtamI6l14KyqazJMobhCKelhWN5zpyKUiEDoTyHE93cqWw==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.44.tgz", + "integrity": "sha512-uEa/ndwjhrrhnOfb2p+sZy6zeoamJOISqaLSJGk/8R6nABT1ZldpzcJoPzKj+zHVomVBPcmQYyC2r4LtvDV6CQ==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.44.tgz", + "integrity": "sha512-3fc4ARcXVhVBaJ3ujWiNZJARD6pkyRcwG+ZYhMzjKtKUp7MAY0HLwr7r3Smep3Li6ZaWT6ewdmx8XqdaD5oNZg==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.44", + "@vue/runtime-core": "3.5.44", + "@vue/shared": "3.5.44", + "csstype": "^3.2.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.44.tgz", + "integrity": "sha512-R4S1UoH4h5Frrauv8Z5XE5TxV9oBiUSgWIC4TyVK1FK+RocRnOLwFA5Xcmo2011RlgJp+AbZCnw6afrhlgRuUQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.44", + "@vue/runtime-dom": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.44.tgz", + "integrity": "sha512-H82XLH0DjmSOdbEwO15x3QTo1f5PWEtv237eLpYKc0mqLu+B8hnq16lFWmuBmNurkeiG3wr+oM1FhOll/YVFRg==", + "license": "MIT" + }, + "node_modules/@vue/test-utils": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-2.5.1.tgz", + "integrity": "sha512-V/4a99odJ7hapr0bRt35XxljGk8hefq31gSOnlKTcEq2fUeoj2qb+FcpJYfQu4qfYhW9Ug+O2+CZ3QmZ7gXDzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-beautify": "^2.0.0", + "vue-component-type-helpers": "^3.0.0" + }, + "peerDependencies": { + "@vue/compiler-dom": "3.x", + "@vue/server-renderer": "3.x", + "vue": "3.x" + }, + "peerDependenciesMeta": { + "@vue/server-renderer": { + "optional": true + } + } + }, "node_modules/@zip.js/zip.js": { "version": "2.8.18", "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.18.tgz", @@ -1619,6 +1858,16 @@ "node": ">=18.0.0" } }, + "node_modules/abbrev": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-5.0.0.tgz", + "integrity": "sha512-/XrFJgzQQQHpti1raDJC6m4ws6aNktmjBlhk8Fdlk7LwCEuDoieEJJY9OFHjfiFJFFRM2tK+Ky/IsfbbmlMu1w==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, "node_modules/ansi-regex": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.4.0.tgz", @@ -1667,18 +1916,54 @@ "pnpm": ">=10.10.0" } }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, "node_modules/bitmap-sdf": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/bitmap-sdf/-/bitmap-sdf-1.0.4.tgz", "integrity": "sha512-1G3U4n5JE6RAiALMxu0p1XmeZkTeCwGKykzsLTCqVzfSDaN6S7fKnkIkfejogz+iwqBWc0UYAIKnKHNN7pSfDg==", "license": "MIT" }, + "node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/browser-split": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/browser-split/-/browser-split-0.0.1.tgz", "integrity": "sha512-JhvgRb2ihQhsljNda3BI8/UcRHVzrVwo3Q+P8vDtSiyobXuFpuZ9mq+MbRGMnC22CjW3RrfXdg6j6ITX8M+7Ow==", "license": "MIT" }, + "node_modules/buffer-image-size": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/buffer-image-size/-/buffer-image-size-0.6.4.tgz", + "integrity": "sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/camelize": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", @@ -1762,6 +2047,23 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1843,6 +2145,35 @@ "integrity": "sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ==", "license": "ISC" }, + "node_modules/editorconfig": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-3.0.2.tgz", + "integrity": "sha512-T0ix8GhtxyKVfUFEcvdNDt3YGqlwkFHbD4/5bgFUDgFmxhI/cSRAeJ87/Sz//Cq8Eam6JX/e23RkoFO71P7aAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@one-ini/wasm": "0.2.1", + "commander": "^14.0.3", + "minimatch": "~10.2.4", + "semver": "^7.7.4" + }, + "bin": { + "editorconfig": "bin/editorconfig" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/editorconfig/node_modules/commander": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", + "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -1880,6 +2211,18 @@ "node": ">= 0.8" } }, + "node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/error": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/error/-/error-4.4.0.tgz", @@ -1953,7 +2296,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, "license": "MIT" }, "node_modules/etag": { @@ -2056,6 +2398,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/global": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", @@ -2079,6 +2439,25 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "license": "MIT" }, + "node_modules/happy-dom": { + "version": "20.14.6", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.14.6.tgz", + "integrity": "sha512-5DDsf4QmEIlRL6NkCv/fxSjYHHkZceL/IaYQdJc2h3G7DRTEai++VTjbfL0LB9geW2VrA3+vrjF3Efx+OTtX0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": ">=20.0.0", + "@types/whatwg-mimetype": "^3.0.2", + "@types/ws": "^8.18.1", + "buffer-image-size": "^0.6.4", + "entities": "^7.0.1", + "whatwg-mimetype": "^3.0.0", + "ws": "^8.21.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/hls.js": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.7.3.tgz", @@ -2138,6 +2517,13 @@ "dev": true, "license": "ISC" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, "node_modules/is-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", @@ -2157,6 +2543,35 @@ "@types/estree": "*" } }, + "node_modules/js-beautify": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-2.0.3.tgz", + "integrity": "sha512-cyFbh3tkPhknnTD/0bLf0T0yy2ZIbqL05mttzbt4y1Zfr7NxqXQZ62dkBLKs3oHH/lpjmDRAnciJiSUyOy8XwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "config-chain": "^1.1.13", + "editorconfig": "^3.0.2", + "glob": "^13.0.6", + "js-cookie": "^3.0.8", + "nopt": "^10.0.1" + }, + "bin": { + "css-beautify": "js/bin/css-beautify.js", + "html-beautify": "js/bin/html-beautify.js", + "js-beautify": "js/bin/js-beautify.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/js-cookie": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.8.tgz", + "integrity": "sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw==", + "dev": true, + "license": "MIT" + }, "node_modules/jsep": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", @@ -2216,6 +2631,16 @@ "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", "license": "Apache-2.0" }, + "node_modules/lru-cache": { + "version": "11.5.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/magic-string": { "version": "0.25.9", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", @@ -2343,6 +2768,32 @@ "dom-walk": "^0.1.0" } }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -2368,10 +2819,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.19", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz", - "integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==", - "dev": true, + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "funding": [ { "type": "github", @@ -2392,6 +2842,22 @@ "integrity": "sha512-f7h4svPtl+QidoBv4taKXUjJ70G2asaZ8G28nS0OkqaalX8dwwrtWtyxEDPK62AC00ur/+/E0pUwBwY5EPn15Q==", "license": "MIT" }, + "node_modules/nopt": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-10.0.1.tgz", + "integrity": "sha512-df3sBr/6ax9hSGuC3CspvLlbnX8cP5L5nZwXF8cGN8l0zSWR6BvzmQ6jPUKjvo6+/xdpkNvEcucBNUdBeeV13g==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "^5.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, "node_modules/nosleep.js": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/nosleep.js/-/nosleep.js-0.12.0.tgz", @@ -2427,6 +2893,23 @@ "node": ">= 0.8" } }, + "node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/pbf": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/pbf/-/pbf-5.1.2.tgz", @@ -2443,7 +2926,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -2459,6 +2941,28 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pinia": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.3.1.tgz", + "integrity": "sha512-khUlZSwt9xXCaTbbxFYBKDc/bWAGWJjOgvxETwkTN7KRm66EeT1ZdZj6i2ceh9sP2Pzqsbc704r2yngBrxBVug==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.6.3", + "vue-demi": "^0.14.10" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "typescript": ">=4.4.4", + "vue": "^2.7.0 || ^3.5.11" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/polylabel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/polylabel/-/polylabel-1.1.0.tgz", @@ -2475,10 +2979,9 @@ "license": "ISC" }, "node_modules/postcss": { - "version": "8.5.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", - "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", - "dev": true, + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", "funding": [ { "type": "opencollective", @@ -2495,9 +2998,9 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.18", + "nanoid": "^3.3.20", "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" + "source-map-js": "^1.2.2" }, "engines": { "node": "^10 || ^12 || >=14" @@ -2528,6 +3031,13 @@ "node": ">= 0.6.0" } }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true, + "license": "ISC" + }, "node_modules/protobufjs": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-8.8.0.tgz", @@ -2825,7 +3335,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", - "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -2959,6 +3468,13 @@ "dev": true, "license": "MIT" }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, "node_modules/universalify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", @@ -3115,6 +3631,60 @@ "rollup": "^2.25.0" } }, + "node_modules/vue": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.44.tgz", + "integrity": "sha512-dvvmaOCG7lAMkJTPqPwWeGMsPS6DIsFsfZDUgBp9V6mHf9b3+/wyVwYR4Es+WV6uJC0FKRxp81Obcq0ZwUcGFQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.44", + "@vue/compiler-sfc": "3.5.44", + "@vue/runtime-dom": "3.5.44", + "@vue/server-renderer": "3.5.44", + "@vue/shared": "3.5.44" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-component-type-helpers": { + "version": "3.3.14", + "resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-3.3.14.tgz", + "integrity": "sha512-Pq3+OnbCiPCHk0R7KSZrx+j/XXaUn2kSQ1epxq60w8CPbByLjC1EJgV51n4WY851sTXUVzsNMuitywdkdVyKjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/vue-demi": { + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/web-worker": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.5.0.tgz", @@ -3128,6 +3698,16 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/wrap-ansi": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", diff --git a/package.json b/package.json index f0b329a90f..138867968c 100644 --- a/package.json +++ b/package.json @@ -66,9 +66,14 @@ "mapillary-js": "^4.1.2", "mgrs": "^2.1.0", "pbf": "^5.1.2", - "satellite.js": "^6.0.2" + "pinia": "^2.3.1", + "satellite.js": "^6.0.2", + "vue": "^3.5.44" }, "devDependencies": { + "@vitejs/plugin-vue": "^5.2.4", + "@vue/test-utils": "^2.5.1", + "happy-dom": "^20.14.6", "prettier": "3.9.6", "puppeteer": "^25.16.0", "sharp": "^0.35.4", diff --git a/scripts/package-boundaries.json b/scripts/package-boundaries.json index 7a54243657..9a82fa11ee 100644 --- a/scripts/package-boundaries.json +++ b/scripts/package-boundaries.json @@ -42,7 +42,7 @@ "build/embed-framing.js", "build/panel.js" ], - "external": ["vite-plugin-cesium"] + "external": ["vite-plugin-cesium", "@vitejs/plugin-vue"] }, "live-providers": { "runtime": "node", diff --git a/scripts/run-unit-tests.mjs b/scripts/run-unit-tests.mjs index 3712df28e5..6cdd6f1d00 100644 --- a/scripts/run-unit-tests.mjs +++ b/scripts/run-unit-tests.mjs @@ -71,8 +71,14 @@ export function allocationTestArgs(file) { return ['--expose-gc', '--test', '--test-concurrency=1', file]; } +/** Node flags every unit-test process receives. */ +export const UNIT_TEST_NODE_FLAGS = Object.freeze([ + // Single-file components compile on import. + '--import=./src/testSupport/registerVue.mjs', +]); + function runTests(args) { - const result = spawnSync(process.execPath, args, { + const result = spawnSync(process.execPath, [...UNIT_TEST_NODE_FLAGS, ...args], { cwd: process.cwd(), stdio: 'inherit', env: process.env, diff --git a/src/testSupport/registerVue.mjs b/src/testSupport/registerVue.mjs new file mode 100644 index 0000000000..76725e274b --- /dev/null +++ b/src/testSupport/registerVue.mjs @@ -0,0 +1,4 @@ +import { register } from 'node:module'; + +// Lets unit tests import single-file components (`node --import`). +register('./vueLoader.mjs', import.meta.url); diff --git a/src/testSupport/vueLoader.mjs b/src/testSupport/vueLoader.mjs new file mode 100644 index 0000000000..5aa340b5e4 --- /dev/null +++ b/src/testSupport/vueLoader.mjs @@ -0,0 +1,39 @@ +import { readFile } from 'node:fs/promises'; +import { fileURLToPath } from 'node:url'; +import { compileScript, compileTemplate, parse } from 'vue/compiler-sfc'; + +/** + * Compile a single-file component to an ES module for Node's test runner. + * Styles are dropped: tests read the global stylesheet separately. + */ +export function compileVueModule(source, filename) { + const { descriptor, errors } = parse(source, { filename }); + if (errors.length) throw errors[0]; + const id = filename; + if (descriptor.scriptSetup) { + return compileScript(descriptor, { id, inlineTemplate: true }).content; + } + const script = descriptor.script + ? compileScript(descriptor, { id }).content.replace( + 'export default', + 'const __sfc__ =', + ) + : 'const __sfc__ = {};'; + const template = descriptor.template + ? compileTemplate({ source: descriptor.template.content, filename, id }) + .code + : ''; + return `${script}\n${template}\n__sfc__.render = typeof render === 'function' ? render : __sfc__.render;\nexport default __sfc__;\n`; +} + +/** Node module hook: load `.vue` files as compiled modules. */ +export async function load(url, context, nextLoad) { + if (!url.endsWith('.vue')) return nextLoad(url, context); + const filename = fileURLToPath(url); + const source = await readFile(filename, 'utf8'); + return { + format: 'module', + source: compileVueModule(source, filename), + shortCircuit: true, + }; +} diff --git a/src/tooling/viteBuild.test.mjs b/src/tooling/viteBuild.test.mjs index a9e8c53989..61e28eef76 100644 --- a/src/tooling/viteBuild.test.mjs +++ b/src/tooling/viteBuild.test.mjs @@ -29,7 +29,8 @@ test('explicit build inputs preserve browser-only defines, plugin order and loop assert.equal(config.plugins[0].enforce, 'pre'); assert.equal(config.plugins[1].name, 'host-check'); assert.equal(config.plugins[1].enforce, 'pre'); - assert.equal(config.plugins[4], plugin); + assert.equal(config.plugins[4].name, 'vite:vue'); + assert.equal(config.plugins[5], plugin); assert.equal(config.server.host, 'localhost'); assert.equal(config.server.port, 4173); assert.deepEqual(config.server.allowedHosts, ['localhost', '127.0.0.1']); @@ -103,7 +104,7 @@ test('build helper does not discover environment values or construct local provi undefined, ); assert.deepEqual( - config.plugins.slice(4).map((plugin) => plugin.name), + config.plugins.slice(5).map((plugin) => plugin.name), ['embed-framing', 'panel-build'], ); } finally { @@ -117,7 +118,7 @@ test('root config retains existing named exports and standalone provider order', assert.equal(compatibility[name], value, name); const config = standaloneConfig({ mode: 'test' }); const standaloneProviders = config.plugins - .slice(4, -6) + .slice(5, -6) .map((plugin) => plugin.name); assert.equal( standaloneProviders.filter((name) => name === 'gemini-live-proxy').length, From 7307c11c74a995113dcbec56fec2b18b01e817bd Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 30 Oct 2026 16:11:48 -0700 Subject: [PATCH 090/237] feat(ui): add the Vue component kit with UiRail, UiTooltip and UiIcon --- package-lock.json | 15 +++++ package.json | 1 + scripts/format-scope.json | 6 +- scripts/format.mjs | 2 +- src/materialSymbolsSubset.test.mjs | 5 +- src/testSupport/vueDom.mjs | 10 +++ src/ui/kit/UiIcon.vue | 16 +++++ src/ui/kit/UiRail.test.mjs | 73 +++++++++++++++++++++ src/ui/kit/UiRail.vue | 52 +++++++++++++++ src/ui/kit/UiTooltip.vue | 50 +++++++++++++++ src/ui/kit/rail.js | 12 ++++ src/ui/styles/kit.css | 100 +++++++++++++++++++++++++++++ style.css | 1 + 13 files changed, 340 insertions(+), 3 deletions(-) create mode 100644 src/testSupport/vueDom.mjs create mode 100644 src/ui/kit/UiIcon.vue create mode 100644 src/ui/kit/UiRail.test.mjs create mode 100644 src/ui/kit/UiRail.vue create mode 100644 src/ui/kit/UiTooltip.vue create mode 100644 src/ui/kit/rail.js create mode 100644 src/ui/styles/kit.css diff --git a/package-lock.json b/package-lock.json index 263fd793d6..6430491c1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "vue": "^3.5.44" }, "devDependencies": { + "@happy-dom/global-registrator": "^20.14.6", "@vitejs/plugin-vue": "^5.2.4", "@vue/test-utils": "^2.5.1", "happy-dom": "^20.14.6", @@ -588,6 +589,20 @@ "node": ">=18" } }, + "node_modules/@happy-dom/global-registrator": { + "version": "20.14.6", + "resolved": "https://registry.npmjs.org/@happy-dom/global-registrator/-/global-registrator-20.14.6.tgz", + "integrity": "sha512-Xd2FwCdm0cAZ+EG0upp69tpxBT9jtvVxaZv1lnbgWsNaZyEuPs0PojYgvCmtQ1RRdRCYCyWTeLjn3Z0aSxDchA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": ">=20.0.0", + "happy-dom": "^20.14.6" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@img/colour": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", diff --git a/package.json b/package.json index 138867968c..44316183c6 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "vue": "^3.5.44" }, "devDependencies": { + "@happy-dom/global-registrator": "^20.14.6", "@vitejs/plugin-vue": "^5.2.4", "@vue/test-utils": "^2.5.1", "happy-dom": "^20.14.6", diff --git a/scripts/format-scope.json b/scripts/format-scope.json index 2522f91c78..6197aa43c0 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1118,5 +1118,9 @@ "src/testSupport/shareViewFixtures.mjs", "src/ui/shareLinks.test.mjs", "src/ui/shareButton.test.mjs", - "src/share/shareLinkPath.test.mjs" + "src/share/shareLinkPath.test.mjs", + "src/ui/kit/UiRail.test.mjs", + "src/testSupport/vueDom.mjs", + "src/testSupport/vueLoader.mjs", + "src/testSupport/registerVue.mjs" ] diff --git a/scripts/format.mjs b/scripts/format.mjs index 25311ba299..e91cf527b2 100644 --- a/scripts/format.mjs +++ b/scripts/format.mjs @@ -39,7 +39,7 @@ export async function discoverRuntimeFormatFiles(root) { const files = []; for (const name of new Set(candidates)) { if ( - !/\.[cm]?js$/.test(name) || + !/\.([cm]?js|vue)$/.test(name) || /\.test\.[cm]?js$/.test(name) || !existsSync(path.join(root, name)) ) diff --git a/src/materialSymbolsSubset.test.mjs b/src/materialSymbolsSubset.test.mjs index ec9ffe2f08..e6352502a6 100644 --- a/src/materialSymbolsSubset.test.mjs +++ b/src/materialSymbolsSubset.test.mjs @@ -14,6 +14,8 @@ const SPAN_TEXT = /** A whole `textContent =` statement, across lines, so a multi-line ternary is read once. */ const TEXT_ASSIGNMENT = /(?:textContent|innerText)\s*=\s*([^;]{0,400})/gs; const STRING_LITERAL = /['"`]([a-z0-9_]{2,})['"`]/g; +/** A rail or menu item's glyph: `{ icon: 'layers' }`, rendered by `UiIcon`. */ +const ICON_PROPERTY = /\bicon:\s*['"]([a-z0-9_]+)['"]/g; /** * Files that SHIP markup. Tests assert on markup, they do not render it. @@ -29,7 +31,7 @@ function sourceFiles(directory = SRC_ROOT) { if (entry.isDirectory()) files.push(...sourceFiles(absolute)); else if ( entry.isFile() && - /\.(js|mjs|html)$/.test(entry.name) && + /\.(js|mjs|html|vue)$/.test(entry.name) && !entry.name.endsWith('.test.mjs') ) { files.push(absolute); @@ -62,6 +64,7 @@ function referencedGlyphs() { if (!found.has(glyph)) found.set(glyph, relative); }; for (const match of source.matchAll(SPAN_TEXT)) add(match[1]); + for (const match of source.matchAll(ICON_PROPERTY)) add(match[1]); for (const match of source.matchAll(TEXT_ASSIGNMENT)) { const statement = match[1].replaceAll('?.', '.'); const assigned = statement.includes('?') diff --git a/src/testSupport/vueDom.mjs b/src/testSupport/vueDom.mjs new file mode 100644 index 0000000000..3fd138513c --- /dev/null +++ b/src/testSupport/vueDom.mjs @@ -0,0 +1,10 @@ +import { GlobalRegistrator } from '@happy-dom/global-registrator'; + +/** + * Give a component test a browser document; returns the teardown. + * Call it from `before`/`after`, since other suites assert there is no DOM. + */ +export function installVueDom() { + GlobalRegistrator.register({ url: 'http://localhost/' }); + return () => GlobalRegistrator.unregister(); +} diff --git a/src/ui/kit/UiIcon.vue b/src/ui/kit/UiIcon.vue new file mode 100644 index 0000000000..4f34f29e4b --- /dev/null +++ b/src/ui/kit/UiIcon.vue @@ -0,0 +1,16 @@ + + + diff --git a/src/ui/kit/UiRail.test.mjs b/src/ui/kit/UiRail.test.mjs new file mode 100644 index 0000000000..6c443286a2 --- /dev/null +++ b/src/ui/kit/UiRail.test.mjs @@ -0,0 +1,73 @@ +import { after, before, test } from 'node:test'; +import assert from 'node:assert/strict'; +import { installVueDom } from '../../testSupport/vueDom.mjs'; + +let mount; +let UiRail; +let uninstall; +before(async () => { + uninstall = installVueDom(); + ({ mount } = await import('@vue/test-utils')); + UiRail = (await import('./UiRail.vue')).default; +}); +after(() => uninstall()); + +const items = [ + { id: 'layers', label: 'DATA LAYERS', icon: 'layers' }, + { id: 'scenes', label: 'AUTHORING', icon: 'movie', separatorBefore: true }, + { id: 'cctv', label: 'CCTV', icon: 'videocam', disabled: true, badge: 3 }, +]; + +function mountRail(props = {}) { + return mount(UiRail, { + props: { items, side: 'left', label: 'Left panels', ...props }, + }); +} + +test('the rail is a named nav with one pressed button per item', () => { + const wrapper = mountRail({ active: 'scenes' }); + const nav = wrapper.get('nav'); + assert.equal(nav.attributes('aria-label'), 'Left panels'); + assert.ok(nav.classes().includes('ui-rail--left')); + const buttons = wrapper.findAll('button'); + assert.deepEqual( + buttons.map((button) => button.attributes('data-rail-item')), + ['layers', 'scenes', 'cctv'], + ); + assert.deepEqual( + buttons.map((button) => button.attributes('aria-pressed')), + ['false', 'true', 'false'], + ); + assert.equal(buttons[0].attributes('aria-label'), 'DATA LAYERS'); + assert.equal(buttons[0].get('.material-symbols-outlined').text(), 'layers'); + assert.ok(buttons[1].classes().includes('ui-rail__item--on')); + assert.equal(wrapper.findAll('.ui-rail__sep').length, 1); + assert.equal(buttons[2].attributes('disabled'), ''); + assert.equal(buttons[2].get('.ui-rail__badge').text(), '3'); +}); + +test('selecting an item emits its id', async () => { + const wrapper = mountRail(); + await wrapper.get('[data-rail-item="scenes"]').trigger('click'); + assert.deepEqual(wrapper.emitted('select'), [['scenes']]); +}); + +test('tips open toward the screen, and not for the open panel', async () => { + const wrapper = mountRail({ + side: 'right', + active: 'layers', + panelOpen: true, + }); + const [open, other] = wrapper.findAll('.ui-tooltip'); + await open.trigger('focusin'); + assert.equal(wrapper.find('[role="tooltip"]').exists(), false); + await other.trigger('focusin'); + // Over an open panel the other tips wait for the pointer to rest. + assert.equal(wrapper.find('[role="tooltip"]').exists(), false); + await new Promise((resolve) => setTimeout(resolve, 450)); + const tip = wrapper.get('[role="tooltip"]'); + assert.equal(tip.text(), 'AUTHORING'); + assert.ok(tip.classes().includes('ui-tooltip__tip--left')); + await other.trigger('focusout'); + assert.equal(wrapper.find('[role="tooltip"]').exists(), false); +}); diff --git a/src/ui/kit/UiRail.vue b/src/ui/kit/UiRail.vue new file mode 100644 index 0000000000..af740aae32 --- /dev/null +++ b/src/ui/kit/UiRail.vue @@ -0,0 +1,52 @@ + + + diff --git a/src/ui/kit/UiTooltip.vue b/src/ui/kit/UiTooltip.vue new file mode 100644 index 0000000000..4c63f23169 --- /dev/null +++ b/src/ui/kit/UiTooltip.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/ui/kit/rail.js b/src/ui/kit/rail.js new file mode 100644 index 0000000000..4986287706 --- /dev/null +++ b/src/ui/kit/rail.js @@ -0,0 +1,12 @@ +/** + * @typedef {object} UiRailItem + * @property {string} id Item identity, emitted on selection. + * @property {string} label Translated name, shown as the tooltip and accessible name. + * @property {string} icon Material Symbols glyph. + * @property {boolean} [disabled] Shown but not selectable. + * @property {boolean} [separatorBefore] Draw a divider above this item. + * @property {string|number} [badge] Small count or marker on the icon. + */ + +/** How long the pointer rests on an item before its tip shows over an open panel. */ +export const RAIL_PANEL_OPEN_TOOLTIP_DELAY_MS = 400; diff --git a/src/ui/styles/kit.css b/src/ui/styles/kit.css new file mode 100644 index 0000000000..ef65c1215b --- /dev/null +++ b/src/ui/styles/kit.css @@ -0,0 +1,100 @@ +/* Generic components in src/ui/kit. Names follow Halfpixel's ui-vue kit; the + surfaces use this application's glass, accent and type tokens. */ + +.ui-icon { + display: inline-block; + line-height: 1; + font-variation-settings: + 'FILL' 0, + 'wght' 400, + 'GRAD' 0, + 'opsz' 20; + user-select: none; +} + +.ui-tooltip { + position: relative; + display: inline-flex; +} +.ui-tooltip__tip { + position: absolute; + top: 50%; + z-index: 1; + padding: 4px 8px; + border: 1px solid var(--glass-border); + border-radius: 6px; + background: var(--menu-bg); + color: var(--dock-label-color); + font: var(--dock-label-font-weight) var(--dock-label-font-size) / 1.4 + var(--font-sans); + letter-spacing: var(--dock-label-letter-spacing); + white-space: nowrap; + pointer-events: none; + transform: translateY(-50%); +} +.ui-tooltip__tip--right { + left: calc(100% + 10px); +} +.ui-tooltip__tip--left { + right: calc(100% + 10px); +} + +.ui-rail { + display: flex; + flex-direction: column; + gap: 2px; + padding: 4px; + border: 1px solid var(--glass-border); + border-radius: calc(var(--btn-radius) + 4px); + background: var(--glass-bg); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + pointer-events: auto; +} +.ui-rail__sep { + height: 1px; + margin: 3px 6px; + background: var(--glass-border); +} +.ui-rail__item { + position: relative; + display: grid; + place-items: center; + width: 32px; + height: 32px; + border: 1px solid transparent; + border-radius: var(--btn-radius); + background: transparent; + color: var(--text-secondary); + cursor: pointer; + transition: + color var(--transition-fast), + background var(--transition-fast), + border-color var(--transition-fast); +} +.ui-rail__item:hover:not(:disabled) { + color: var(--text-primary); + background: rgba(255, 255, 255, 0.05); +} +.ui-rail__item--on, +.ui-rail__item--on:hover:not(:disabled) { + border-color: var(--accent-dim); + background: var(--accent-dim); + color: var(--accent); +} +.ui-rail__item:disabled { + opacity: 0.35; + cursor: default; +} +.ui-rail__badge { + position: absolute; + top: 1px; + right: 1px; + min-width: 14px; + padding: 0 3px; + border-radius: 7px; + background: var(--accent); + color: var(--bg-dark); + font: 600 9px/14px var(--font-mono); + text-align: center; +} diff --git a/style.css b/style.css index 1b55c459f7..f887debb1f 100644 --- a/style.css +++ b/style.css @@ -32,6 +32,7 @@ @import './src/ui/styles/weather.css'; @import './src/ui/styles/panel-surfaces.css'; @import './src/ui/styles/segmented-control.css'; +@import './src/ui/styles/kit.css'; @import './src/ui/styles/cjk.css'; @import './src/ui/styles/mobile-shell.css'; @import './src/ui/styles/cyber.css'; From 2035c767ce845d4b43cb01a750f0a7921d75663b Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 30 Oct 2026 16:28:08 -0700 Subject: [PATCH 091/237] feat(ui): keep one side panel open per desktop sidebar in every HUD layout The Cyber accordion now applies to both sidebars and every HUD layout: opening a side panel collapses its peers, the layout normalizes restored state to one owner, and collapsed panels are hidden on desktop. Phones keep showing several panels per sheet. --- src/panelStackLayout.test.mjs | 4 +- src/rightRailPolicy.js | 2 - src/rightRailPolicy.test.mjs | 52 ++----- src/ui/leftPanelRail.js | 49 ++++-- src/ui/mobileShell.js | 2 +- src/ui/panelChrome.js | 37 ++--- src/ui/panelRailGeometry.js | 16 -- src/ui/panelRails.js | 5 +- src/ui/panelRails.test.mjs | 139 +++++++++--------- src/ui/rightPanelRail.js | 33 ++--- ....test.mjs => sidePanelDisclosure.test.mjs} | 50 ++++--- src/ui/styles/layers.css | 3 + 12 files changed, 178 insertions(+), 214 deletions(-) rename src/ui/{cyberPanelDisclosure.test.mjs => sidePanelDisclosure.test.mjs} (60%) diff --git a/src/panelStackLayout.test.mjs b/src/panelStackLayout.test.mjs index a13f5c04b3..ecccd21a14 100644 --- a/src/panelStackLayout.test.mjs +++ b/src/panelStackLayout.test.mjs @@ -188,7 +188,7 @@ test('desktop panel lanes use per-panel allocations and presentation-only auto-c 'focus mode must hide every collapsed sibling, including presentation-only auto-collapses', ); assert.doesNotMatch(css, /layout-focus > \[data-panel-id\]\.collapsed:not\(\.layout-auto-collapsed\)/); - assert.match(leftRail, /const hiddenSibling =\s*shouldFocus && panel\.classList\.contains\('collapsed'\);/); + assert.match(leftRail, /if \(exclusive && panel\.classList\.contains\('collapsed'\)\)\s*panel\.setAttribute\('aria-hidden', 'true'\)/); }); test('share-panel state excludes responsive collapse and preserves recipient preferences', () => { @@ -198,7 +198,7 @@ test('share-panel state excludes responsive collapse and preserves recipient pre assert.match( ui, - /const collapsed =[\s\S]*?panelEl\.classList\.contains\('layout-auto-collapsed'\)[\s\S]*?panelEl\.classList\.contains\('cyber-accordion-collapsed'\)[\s\S]*?\? false\s*: panelEl\.classList\.contains\('collapsed'\);/, + /const collapsed =[\s\S]*?panelEl\.classList\.contains\('layout-auto-collapsed'\)[\s\S]*?panelEl\.classList\.contains\('accordion-collapsed'\)[\s\S]*?\? false\s*: panelEl\.classList\.contains\('collapsed'\);/, 'responsive auto-collapse must serialize the explicit expanded preference', ); assert.match( diff --git a/src/rightRailPolicy.js b/src/rightRailPolicy.js index 02d7972c48..08eab4fb09 100644 --- a/src/rightRailPolicy.js +++ b/src/rightRailPolicy.js @@ -1,5 +1,3 @@ -export { shouldHideCollapsedRightPanels } from './ui/panelRailGeometry.js'; - const GLOBAL_CONTEXT_EXPLICIT_ACTIONS = new Set([ 'contacts', 'space-missions', diff --git a/src/rightRailPolicy.test.mjs b/src/rightRailPolicy.test.mjs index 2254ea24e0..dde4c64bed 100644 --- a/src/rightRailPolicy.test.mjs +++ b/src/rightRailPolicy.test.mjs @@ -2,50 +2,20 @@ import { readStylesheet } from './testSupport/readStylesheet.mjs'; import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; import test from 'node:test'; -import { - shouldExpandGlobalContextPanel, - shouldHideCollapsedRightPanels, -} from './rightRailPolicy.js'; +import { shouldExpandGlobalContextPanel } from './rightRailPolicy.js'; -test('Tactical HUD hides collapsed right-rail siblings while one panel is expanded', () => { - assert.equal(shouldHideCollapsedRightPanels({ - hudVariant: 'tactical', - hasExpandedPanel: true, - }), true); -}); - -test('collapsed launchers remain when Tactical has no expanded panel', () => { - assert.equal(shouldHideCollapsedRightPanels({ - hudVariant: 'tactical', - hasExpandedPanel: false, - }), false); -}); - -test('other HUD layouts keep collapsed right-rail launchers visible', () => { - assert.equal(shouldHideCollapsedRightPanels({ - hudVariant: 'minimal', - hasExpandedPanel: true, - }), false); - assert.equal(shouldHideCollapsedRightPanels({ - hudVariant: 'full', - hasExpandedPanel: true, - }), false); -}); - -test('desktop Display participates in Tactical exclusivity without changing mobile Display behavior', () => { - const ui = readFileSync(new URL('./ui/rightPanelRail.js', import.meta.url), 'utf8'); +test('desktop side rails hide collapsed panels in every HUD layout, never on phones', () => { + const right = readFileSync(new URL('./ui/rightPanelRail.js', import.meta.url), 'utf8'); + const left = readFileSync(new URL('./ui/leftPanelRail.js', import.meta.url), 'utf8'); const css = readStylesheet(new URL('../style.css', import.meta.url)); - assert.match(ui, /const isMobile = windowRef\.matchMedia\('\(max-width: 720px\)'\)\.matches/); - assert.match( - ui, - /!panel\.classList\.contains\('collapsed'\)\s*&&\s*\(!isMobile \|\| panel\.id !== 'pp-toggles'\)/, - ); - assert.doesNotMatch( - ui, - /panel\.id !== 'pp-toggles' && !panel\.classList\.contains\('collapsed'\)/, - ); - assert.match(ui, /if \(exclusive && panel\.classList\.contains\('collapsed'\)\)\s*panel\.setAttribute\('aria-hidden', 'true'\)/); + for (const ui of [right, left]) { + assert.match(ui, /const isMobile = windowRef\.matchMedia\('\(max-width: 720px\)'\)\.matches/); + assert.match(ui, /const exclusive = !isMobile;/); + assert.match(ui, /if \(exclusive && panel\.classList\.contains\('collapsed'\)\)\s*panel\.setAttribute\('aria-hidden', 'true'\)/); + assert.doesNotMatch(ui, /hud\.variant === 'cyber'/); + } assert.match(css, /#right-context-rail\.layout-exclusive > \[data-panel-id\]\.collapsed \{/); + assert.match(css, /#left-panel-stack\.layout-exclusive > \[data-panel-id\]\.collapsed \{/); }); test('explicit Contacts, Space Missions, and Cockpit actions expand Global Context after success', () => { diff --git a/src/ui/leftPanelRail.js b/src/ui/leftPanelRail.js index 607e130836..a0de82746c 100644 --- a/src/ui/leftPanelRail.js +++ b/src/ui/leftPanelRail.js @@ -21,6 +21,7 @@ import { measurePanelNaturalHeight } from './panelMeasurement.js'; * @param {Function} [options.getComputedStyle] Optional DOM style reader override. * @param {Map} options.collapsedHeights Caller-owned measurement cache. * @param {Function} options.onAligned Notify the caller after the left rail moves. + * @param {Document} [options.documentRef] Document supplying current keyboard focus. */ export function layoutLeftPanelRail({ stack, @@ -32,6 +33,7 @@ export function layoutLeftPanelRail({ onRetry, collapsedHeights, onAligned, + documentRef = stack?.ownerDocument, getComputedStyle = (element) => windowRef.getComputedStyle(element), }) { if (!stack) return; @@ -49,20 +51,49 @@ export function layoutLeftPanelRail({ // The existing narrow-screen composition has its own full-width stack. // Keep this desktop lane engine from fighting those dedicated rules. - if (windowRef.matchMedia('(max-width: 720px)').matches) { + const isMobile = windowRef.matchMedia('(max-width: 720px)').matches; + if (isMobile) { stack.classList.remove('layout-focus'); stack.classList.remove('layout-tail'); stack.style.removeProperty('--left-stack-safe-top'); stack.style.removeProperty('--left-stack-safe-bottom'); stack.style.removeProperty('--left-stack-centered-height'); + stack.classList.remove('layout-exclusive'); stack.dataset.layoutMode = 'mobile'; for (const panel of panels) { + if (panel.classList.contains('accordion-collapsed')) { + panel.classList.remove('collapsed', 'accordion-collapsed'); + onCollapse(panel); + } panel.removeAttribute('aria-hidden'); panel.style.removeProperty('--left-panel-allocated-height'); } return; } + // One panel is open per desktop side and the panel rail lists the others, + // so collapsed panels are hidden. Normalize restored state without + // overwriting saved panel preferences. + const expandedBeforeAccordion = panels.filter( + (panel) => !panel.classList.contains('collapsed'), + ); + const accordionOwner = + expandedBeforeAccordion.find((panel) => panel.id === preferredPanelId) || + expandedBeforeAccordion.find((panel) => + panel.contains(documentRef?.activeElement), + ) || + expandedBeforeAccordion[0]; + for (const panel of expandedBeforeAccordion) { + if (panel === accordionOwner) continue; + panel.classList.add('collapsed', 'accordion-collapsed'); + onCollapse(panel); + } + const exclusive = !isMobile; + stack.classList.toggle('layout-exclusive', exclusive); + const laidOutPanels = panels.filter( + (panel) => !exclusive || !panel.classList.contains('collapsed'), + ); + const viewportHeight = Math.max(1, windowRef.innerHeight); const stackRect = stack.getBoundingClientRect(); const baseTop = viewportHeight * 0.26; @@ -162,7 +193,7 @@ export function layoutLeftPanelRail({ (sum, height) => sum + height, 0, ); - const siblingHeight = panels.reduce((total, panel) => { + const siblingHeight = laidOutPanels.reduce((total, panel) => { if (!panel.classList.contains('collapsed')) return total; const measured = collapsedHeights.get(panel.id); return total + (measured || panel.getBoundingClientRect().height || 0); @@ -170,12 +201,8 @@ export function layoutLeftPanelRail({ let requiredHeight = siblingHeight; const rowGap = parseFloat(getComputedStyle(stack).rowGap) || 0; - if (expandedPanels.length) { - requiredHeight += naturalExpandedHeight; - requiredHeight += rowGap * Math.max(0, panels.length - 1); - } else { - requiredHeight += rowGap * Math.max(0, panels.length - 1); - } + if (expandedPanels.length) requiredHeight += naturalExpandedHeight; + requiredHeight += rowGap * Math.max(0, laidOutPanels.length - 1); const wasFocused = stack.classList.contains('layout-focus'); const wasTail = stack.classList.contains('layout-tail'); @@ -189,7 +216,7 @@ export function layoutLeftPanelRail({ const tailRequiredHeight = naturalExpandedHeight + siblingHeight + - rowGap * Math.max(0, panels.length - 1); + rowGap * Math.max(0, laidOutPanels.length - 1); // A compact expansion should not make the whole control stack jump down // merely to center a few short rows. Preserve the normal top anchor when // the centered stack would begin below it; tall stacks can still grow @@ -296,8 +323,8 @@ export function layoutLeftPanelRail({ // CockpitView.syncSignalLayout() owns `--cockpit-utility-top` instead. for (const panel of panels) { - const hiddenSibling = shouldFocus && panel.classList.contains('collapsed'); - if (hiddenSibling) panel.setAttribute('aria-hidden', 'true'); + if (exclusive && panel.classList.contains('collapsed')) + panel.setAttribute('aria-hidden', 'true'); else panel.removeAttribute('aria-hidden'); } // The right controls share this top baseline; update them after the left diff --git a/src/ui/mobileShell.js b/src/ui/mobileShell.js index 2363fd9ede..07c21a46b9 100644 --- a/src/ui/mobileShell.js +++ b/src/ui/mobileShell.js @@ -208,7 +208,7 @@ export function initMobileShell({ return ( classes.contains('collapsed') && !classes.contains('layout-auto-collapsed') && - !classes.contains('cyber-accordion-collapsed') + !classes.contains('accordion-collapsed') ); }; diff --git a/src/ui/panelChrome.js b/src/ui/panelChrome.js index bcf730f609..4596949673 100644 --- a/src/ui/panelChrome.js +++ b/src/ui/panelChrome.js @@ -362,7 +362,7 @@ export class PanelChrome { // restore the user's explicit expanded preference at its own viewport. const collapsed = panelEl.classList.contains('layout-auto-collapsed') || - panelEl.classList.contains('cyber-accordion-collapsed') + panelEl.classList.contains('accordion-collapsed') ? false : panelEl.classList.contains('collapsed'); // A panel the phone shell only borrowed for a sheet shares its own state. @@ -420,19 +420,22 @@ export class PanelChrome { const nextCollapsed = Boolean(collapsed); const wasAutoCollapsed = panelEl.classList.contains('layout-auto-collapsed') || - panelEl.classList.contains('cyber-accordion-collapsed'); - // A user opening a Cyber rail panel owns the whole accordion, including - // peers that were only presentation-collapsed during a saved-state restore. + panelEl.classList.contains('accordion-collapsed'); + // One panel is open per desktop side: a user opening a side panel owns + // the whole accordion, including peers that were only + // presentation-collapsed during a saved-state restore. + const sideStack = [this._leftPanelStack, this._rightPanelStack].find( + (stack) => stack && panelEl.parentElement === stack, + ); if ( explicit && !restore && !nextCollapsed && - document.documentElement?.dataset.uiTheme === 'cyber' && - panelEl.parentElement === this._rightPanelStack && + sideStack && // Phone sheets show several rail panels at once. !document.body?.classList?.contains('mobile-shell') ) { - for (const peer of this._rightPanelStack.children) { + for (const peer of sideStack.children) { if ( peer !== panelEl && peer.matches('[data-panel-id]') && @@ -480,7 +483,6 @@ export class PanelChrome { // Reveal Radio's owner before the no-op check: the nested section may // already be expanded while its Context parent is closed. if ( - document.documentElement?.dataset.uiTheme === 'cyber' && !nextCollapsed && panelId === 'radio-panel' && document @@ -507,10 +509,7 @@ export class PanelChrome { } return; } - panelEl.classList.remove( - 'layout-auto-collapsed', - 'cyber-accordion-collapsed', - ); + panelEl.classList.remove('layout-auto-collapsed', 'accordion-collapsed'); if ( !nextCollapsed && this.cockpitView?.active && @@ -522,20 +521,6 @@ export class PanelChrome { this.cockpitView.setContextCollapsed(true); } } - if ( - !nextCollapsed && - panelId === 'radio-panel' && - document.documentElement?.dataset.uiTheme !== 'cyber' && - document - .getElementById('global-context-panel') - ?.classList.contains('collapsed') - ) { - this.setPanelCollapsed('global-context-panel', false, { - restore, - persist, - syncShare, - }); - } if (!nextCollapsed && !restore && panelId === 'location-bar') { const otherPanel = document.getElementById('control-panel'); if (otherPanel && !otherPanel.classList.contains('dock-pinned')) { diff --git a/src/ui/panelRailGeometry.js b/src/ui/panelRailGeometry.js index 8045286b07..b5a129c211 100644 --- a/src/ui/panelRailGeometry.js +++ b/src/ui/panelRailGeometry.js @@ -60,19 +60,3 @@ export function resolveHudRailLayout({ constrained: panelHeight > availableHeight, }; } - -/** - * Tactical HUD gives an expanded right-rail panel the whole control lane. - * Other HUD layouts keep collapsed launchers visible for quick switching. - * - * @param {object} input Current rail state. - * @param {string} input.hudVariant Active HUD layout variant. - * @param {boolean} input.hasExpandedPanel Whether any rail panel is expanded. - * @returns {boolean} Whether collapsed sibling launchers should be hidden. - */ -export function shouldHideCollapsedRightPanels({ - hudVariant, - hasExpandedPanel, -}) { - return hudVariant === 'tactical' && Boolean(hasExpandedPanel); -} diff --git a/src/ui/panelRails.js b/src/ui/panelRails.js index a67371cc7c..e447d63028 100644 --- a/src/ui/panelRails.js +++ b/src/ui/panelRails.js @@ -1,10 +1,7 @@ export { layoutLeftPanelRail } from './leftPanelRail.js'; export { layoutRightPanelRail } from './rightPanelRail.js'; export { measurePanelNaturalHeight } from './panelMeasurement.js'; -export { - resolveHudRailLayout, - shouldHideCollapsedRightPanels, -} from './panelRailGeometry.js'; +export { resolveHudRailLayout } from './panelRailGeometry.js'; export { allocatePanelStackHeights, panelStackAutoCollapseIndices, diff --git a/src/ui/panelRails.test.mjs b/src/ui/panelRails.test.mjs index 546cad87b7..e7f0d07cf8 100644 --- a/src/ui/panelRails.test.mjs +++ b/src/ui/panelRails.test.mjs @@ -20,61 +20,57 @@ test('Display uses an inner scroll body only in Cyber', () => { assert.equal(displayPanelScroller(null), null); }); -test('Cyber restores one expanded owner, keeps launchers, and restores other theme preferences', () => { - for (const mobile of [false]) { - const f = fixture('right', { - mobile, - hud: { visible: true, variant: 'cyber' }, - }); +for (const side of ['left', 'right']) { + test(`${side} desktop rail keeps one expanded owner in every HUD layout`, () => { + for (const variant of ['tactical', 'minimal', 'cyber']) { + const f = fixture(side, { hud: { visible: true, variant } }); + f.expand(f.first, 250); + f.expand(f.second, 250); + f.options.preferredPanelId = f.second.id; + f.run(); + assert.equal(f.first.classList.contains('accordion-collapsed'), true); + assert.equal(f.second.classList.contains('collapsed'), false); + assert.equal(f.stack.classList.contains('layout-exclusive'), true); + assert.equal(f.first.getAttribute('aria-hidden'), 'true'); + assert.equal(f.retries(), 0, 'the accordion needs no auto-collapse pass'); + f.run(); + assert.equal( + f.first.classList.contains('collapsed'), + true, + 'layout does not reopen a peer', + ); + // Phone sheets restore the presentation-only collapse. + f.options.windowRef.matchMedia = () => ({ matches: true }); + f.run(); + assert.equal(f.first.classList.contains('collapsed'), false); + assert.equal(f.first.classList.contains('accordion-collapsed'), false); + assert.equal(f.stack.classList.contains('layout-exclusive'), false); + } + }); + + test(`${side} rail keeps no accordion on phones, where it is presented as tab sheets`, () => { + // A sheet (for example Cameras: CCTV with Street Level) shows several of the + // rail's panels at once; the accordion would collapse all but one. + const f = fixture(side, { mobile: true }); f.expand(f.first, 250); f.expand(f.second, 250); f.options.preferredPanelId = f.second.id; f.run(); - assert.equal(f.first.classList.contains('cyber-accordion-collapsed'), true); - assert.equal(f.second.classList.contains('collapsed'), false); - assert.equal(f.first.getAttribute('aria-hidden'), undefined); - f.run(); - assert.equal( - f.first.classList.contains('collapsed'), - true, - 'layout does not reopen a peer', - ); - f.options.hud.variant = 'minimal'; - f.run(); assert.equal(f.first.classList.contains('collapsed'), false); - assert.equal( - f.first.classList.contains('cyber-accordion-collapsed'), - false, - ); + assert.equal(f.first.classList.contains('accordion-collapsed'), false); assert.equal(f.second.classList.contains('collapsed'), false); - } -}); - -test('Cyber keeps no accordion on phones, where the rail is presented as tab sheets', () => { - // A sheet (for example Cameras: CCTV with Street Level) shows several of the - // rail's panels at once; the accordion would collapse all but one. - const f = fixture('right', { - mobile: true, - hud: { visible: true, variant: 'cyber' }, }); - f.expand(f.first, 250); - f.expand(f.second, 250); - f.options.preferredPanelId = f.second.id; - f.run(); - assert.equal(f.first.classList.contains('collapsed'), false); - assert.equal(f.first.classList.contains('cyber-accordion-collapsed'), false); - assert.equal(f.second.classList.contains('collapsed'), false); -}); -test('Cyber restored accordion prefers keyboard focus when no explicit owner exists', () => { - const f = fixture('right', { hud: { visible: true, variant: 'cyber' } }); - f.expand(f.first, 250); - f.expand(f.second, 250); - f.options.documentRef.activeElement = f.second; - f.run(); - assert.equal(f.first.classList.contains('collapsed'), true); - assert.equal(f.second.classList.contains('collapsed'), false); -}); + test(`${side} restored accordion prefers keyboard focus when no explicit owner exists`, () => { + const f = fixture(side); + f.expand(f.first, 250); + f.expand(f.second, 250); + f.options.documentRef.activeElement = f.second; + f.run(); + assert.equal(f.first.classList.contains('collapsed'), true); + assert.equal(f.second.classList.contains('collapsed'), false); + }); +} function element( id, @@ -250,16 +246,16 @@ for (const side of ['left', 'right']) { ); assert.equal(f.first.getAttribute('aria-hidden'), undefined); }); - test(`${side} constrained layout preserves the preferred panel and requests another pass`, () => { + test(`${side} constrained layout keeps the preferred panel without another pass`, () => { const f = fixture(side); f.expand(f.first, 900); f.expand(f.second, 900); f.options.preferredPanelId = 'second'; f.run(); assert.equal(f.second.classList.contains('collapsed'), false); - assert.equal(f.first.classList.contains('layout-auto-collapsed'), true); + assert.equal(f.first.classList.contains('accordion-collapsed'), true); assert.deepEqual(f.collapsed, ['first']); - assert.equal(f.retries(), 1); + assert.equal(f.retries(), 0); }); test(`${side} hidden HUD restores automatic collapse without altering manual collapse`, () => { const f = fixture(side, { hud: { visible: false, variant: 'tactical' } }); @@ -277,7 +273,7 @@ test('right layout uses keyboard focus when there is no preferred panel', () => f.expand(f.second, 900); f.options.documentRef.activeElement = f.second; f.run(); - assert.equal(f.first.classList.contains('layout-auto-collapsed'), true); + assert.equal(f.first.classList.contains('accordion-collapsed'), true); assert.equal(f.second.classList.contains('collapsed'), false); }); @@ -532,26 +528,27 @@ test('right rail enters focus only above available height and leaves below the f assert.equal(f.stack.classList.contains('layout-focus'), false); }); -test('right rail auto-collapse requests only one retry and settles within two passes', () => { +test('right rail settles a second tall panel through the accordion in one pass', () => { const f = thrashingRightRail({ weatherOpen: true }); const modes = []; for (let pass = 0; pass < 10; pass++) { f.run(); - modes.push(f.stack.classList.contains('layout-focus')); + modes.push(f.stack.dataset.layoutMode); } assert.deepEqual(f.collapsed, ['weather-panel']); - assert.equal(f.retries(), 1); - assert.deepEqual(modes.slice(1), Array(9).fill(true)); + assert.equal(f.weather.classList.contains('accordion-collapsed'), true); + assert.equal(f.retries(), 0); + assert.deepEqual(modes.slice(1), Array(9).fill(modes[0])); }); -test('right rail retry cannot enqueue another retry even if disclosure changes before it runs', () => { +test('right rail reopening a peer outside the rail keeps one owner without retrying', () => { const f = thrashingRightRail({ weatherOpen: true }); f.run(); - assert.equal(f.retries(), 1); - f.weather.classList.remove('collapsed', 'layout-auto-collapsed'); + f.weather.classList.remove('collapsed', 'accordion-collapsed'); f.run(); - assert.equal(f.retries(), 1); - assert.equal(f.stack.dataset.layoutMode, 'focus'); + assert.equal(f.retries(), 0); + assert.equal(f.weather.classList.contains('collapsed'), true); + assert.equal(f.cctv.classList.contains('collapsed'), false); }); test('right rail restores presentation even when intrinsic measurement throws', () => { @@ -595,14 +592,14 @@ test('right rail measuring pass keeps an opted-in scroller position', () => { }); for (const variant of ['minimal', 'full']) { - test(`right rail does not retry collapse that the ${variant} HUD immediately restores`, () => { + test(`right rail settles two tall panels without retrying in the ${variant} HUD`, () => { const f = fixture('right', { hud: { visible: true, variant } }); f.expand(f.first, 900); f.expand(f.second, 900); for (let pass = 0; pass < 10; pass++) f.run(); assert.equal(f.retries(), 0); assert.equal(f.first.classList.contains('collapsed'), false); - assert.equal(f.second.classList.contains('collapsed'), false); + assert.equal(f.second.classList.contains('accordion-collapsed'), true); }); } // ── Narrow-screen rail overflow pin ────────────────────────────────────────── @@ -699,10 +696,11 @@ test('right layout ignores a CSS-hidden expanded panel when deciding exclusivity f.run(); - assert.equal(f.stack.classList.contains('layout-exclusive'), false); + // The rail lists the collapsed panels; the CSS-hidden one claims nothing. + assert.equal(f.stack.classList.contains('layout-exclusive'), true); assert.equal(f.stack.dataset.expandedCount, '0'); - assert.equal(f.first.getAttribute('aria-hidden'), undefined); - assert.equal(f.second.getAttribute('aria-hidden'), undefined); + assert.equal(weather.classList.contains('collapsed'), false); + assert.equal(weather.getAttribute('aria-hidden'), undefined); assert.equal( weather.style.getPropertyValue('--right-panel-allocated-height'), '', @@ -730,9 +728,10 @@ test('right layout still restores panels that exclusive presentation hides', () f.options.hud.visible = false; f.run(); - assert.equal(f.second.classList.contains('collapsed'), false); + // Restored from the space-based collapse, it yields to the accordion owner. assert.equal(f.second.classList.contains('layout-auto-collapsed'), false); - assert.deepEqual(f.collapsed, ['second']); + assert.equal(f.second.classList.contains('accordion-collapsed'), true); + assert.equal(f.first.classList.contains('collapsed'), false); }); test('right layout ignores a hidden panel: no lane, no gap, no auto-collapse', () => { @@ -766,10 +765,10 @@ test('right layout ignores a hidden panel: no lane, no gap, no auto-collapse', ( const retriesBefore = f.retries(); f.run(); assert.ok( - f.collapsed.includes('recent-imagery-panel'), - 'focus mode collapses the later panel and asks for another pass', + imagery.classList.contains('accordion-collapsed'), + 'the accordion keeps the first panel and collapses the later one', ); - assert.equal(f.retries(), retriesBefore + 1); + assert.equal(f.retries(), retriesBefore); f.run(); assert.equal(f.stack.dataset.expandedCount, '1'); assert.ok( diff --git a/src/ui/rightPanelRail.js b/src/ui/rightPanelRail.js index 5d3e5e40c1..5afdce2b7e 100644 --- a/src/ui/rightPanelRail.js +++ b/src/ui/rightPanelRail.js @@ -2,10 +2,7 @@ import { allocatePanelStackHeights, panelStackAutoCollapseIndices, } from '../panelStackLayout.js'; -import { - resolveHudRailLayout, - shouldHideCollapsedRightPanels, -} from './panelRailGeometry.js'; +import { resolveHudRailLayout } from './panelRailGeometry.js'; import { displayPanelScroller } from './displayPanelScroll.js'; @@ -89,11 +86,12 @@ export function layoutRightPanelRail({ onCollapse(panel); } } - // Normalize restored state and theme entry without overwriting saved panel - // preferences. This marker is distinct from Tactical's space-based collapse. - // Phones present the rail as tab sheets that show several panels at once. + // One panel is open per desktop side. Normalize restored state without + // overwriting saved panel preferences; this marker is distinct from + // Tactical's space-based collapse. Phones present the rail as tab sheets + // that show several panels at once. const isMobile = windowRef.matchMedia('(max-width: 720px)').matches; - if (hud.variant === 'cyber' && !isMobile) { + if (!isMobile) { const expanded = panels.filter( (panel) => !panel.classList.contains('collapsed'), ); @@ -103,29 +101,20 @@ export function layoutRightPanelRail({ expanded[0]; for (const panel of expanded) { if (panel === owner) continue; - panel.classList.add('collapsed', 'cyber-accordion-collapsed'); + panel.classList.add('collapsed', 'accordion-collapsed'); onCollapse(panel); } } else { for (const panel of panels) { - if (!panel.classList.contains('cyber-accordion-collapsed')) continue; - panel.classList.remove('collapsed', 'cyber-accordion-collapsed'); + if (!panel.classList.contains('accordion-collapsed')) continue; + panel.classList.remove('collapsed', 'accordion-collapsed'); onCollapse(panel); } } - const hasExpandedPanel = panels.some( - (panel) => - !panel.classList.contains('collapsed') && - (!isMobile || panel.id !== 'pp-toggles'), - ); + // The desktop panel rail lists every panel, so collapsed ones are hidden. // Phones present the rail as tab sheets (mobileShell.js), which choose what // shows; hiding collapsed siblings would empty a sheet and its a11y tree. - const exclusive = - !isMobile && - shouldHideCollapsedRightPanels({ - hudVariant: hud.variant, - hasExpandedPanel, - }); + const exclusive = !isMobile; stack.classList.toggle('layout-exclusive', exclusive); for (const panel of panels) { if (exclusive && panel.classList.contains('collapsed')) diff --git a/src/ui/cyberPanelDisclosure.test.mjs b/src/ui/sidePanelDisclosure.test.mjs similarity index 60% rename from src/ui/cyberPanelDisclosure.test.mjs rename to src/ui/sidePanelDisclosure.test.mjs index e2a666ba51..41b0977f7d 100644 --- a/src/ui/cyberPanelDisclosure.test.mjs +++ b/src/ui/sidePanelDisclosure.test.mjs @@ -19,6 +19,10 @@ function fixture(theme = 'cyber') { nodes.set(id, value); return value; }; + const left = node('left-stack'); + const layers = node('data-panel', false), scenes = node('scene-panel'); + left.children = [layers, scenes]; + for (const panel of left.children) panel.parentElement = left; const rail = node('rail'); const display = node('pp-toggles'), context = node('global-context-panel'), cctv = node('cctv-panel'), radio = node('radio-panel'); rail.children = [display, context, cctv]; @@ -27,6 +31,7 @@ function fixture(theme = 'cyber') { radio.parentElement = context; const saved = [], claimed = []; const owner = { + _leftPanelStack: left, _rightPanelStack: rail, _panelLayout: {}, _lifetime: { frame() {} }, @@ -36,29 +41,36 @@ function fixture(theme = 'cyber') { shareLinkManager: { claimRestoreLane: (...args) => claimed.push(args), onPanelStateChange() {} }, }; owner.setPanelCollapsed = PanelChrome.prototype.setPanelCollapsed.bind(owner); - return { display, context, cctv, radio, owner, saved, claimed, + return { layers, scenes, display, context, cctv, radio, owner, saved, claimed, doc: { documentElement: { dataset: { uiTheme: theme } }, getElementById: (id) => nodes.get(id) }, }; } -test('explicit Cyber opening collapses peers and claims their restoration lanes', () => { - const f = fixture(), prior = globalThis.document; - globalThis.document = f.doc; - try { - f.owner.setPanelCollapsed('global-context-panel', false, { explicit: true }); - f.owner.setPanelCollapsed('pp-toggles', false, { explicit: true }); - assert.equal(f.display.classList.contains('collapsed'), false); - assert.equal(f.context.classList.contains('collapsed'), true); - assert.ok(f.saved.some(([id, collapsed]) => id === 'global-context-panel' && collapsed)); - assert.ok(f.claimed.some(([, id]) => id === 'global-context-panel')); - f.cctv.classList.add('cyber-accordion-collapsed'); - f.owner.setPanelCollapsed('cctv-panel', true, { explicit: true }); - assert.equal(f.cctv.classList.contains('cyber-accordion-collapsed'), false); - } finally { globalThis.document = prior; } +test('explicit opening collapses side peers and claims their restoration lanes in every theme', () => { + for (const theme of ['tactical', 'minimal', 'cyber']) { + const f = fixture(theme), prior = globalThis.document; + globalThis.document = f.doc; + try { + f.owner.setPanelCollapsed('global-context-panel', false, { explicit: true }); + f.owner.setPanelCollapsed('pp-toggles', false, { explicit: true }); + assert.equal(f.display.classList.contains('collapsed'), false); + assert.equal(f.context.classList.contains('collapsed'), true); + assert.ok(f.saved.some(([id, collapsed]) => id === 'global-context-panel' && collapsed)); + assert.ok(f.claimed.some(([, id]) => id === 'global-context-panel')); + f.cctv.classList.add('accordion-collapsed'); + f.owner.setPanelCollapsed('cctv-panel', true, { explicit: true }); + assert.equal(f.cctv.classList.contains('accordion-collapsed'), false); + // The left side has its own accordion; the right side is untouched. + f.owner.setPanelCollapsed('scene-panel', false, { explicit: true }); + assert.equal(f.scenes.classList.contains('collapsed'), false); + assert.equal(f.layers.classList.contains('collapsed'), true); + assert.equal(f.display.classList.contains('collapsed'), false); + } finally { globalThis.document = prior; } + } }); test('opening already-expanded Radio reveals Context and closes Display', () => { - const f = fixture(), prior = globalThis.document; + const f = fixture('tactical'), prior = globalThis.document; globalThis.document = f.doc; try { f.owner.setPanelCollapsed('radio-panel', false, { explicit: true }); @@ -71,17 +83,17 @@ test('opening already-expanded Radio reveals Context and closes Display', () => } finally { globalThis.document = prior; } }); -test('non-Cyber explicit panels and restored preferences retain their existing policy', () => { +test('restored preferences keep every saved panel open for the layout to normalize', () => { for (const theme of ['tactical', 'minimal', 'cyber']) { const f = fixture(theme), prior = globalThis.document; globalThis.document = f.doc; try { - const options = theme === 'cyber' ? { restore: true, persist: false } : { explicit: true }; + const options = { restore: true, persist: false }; f.owner.setPanelCollapsed('pp-toggles', false, options); f.owner.setPanelCollapsed('cctv-panel', false, options); assert.equal(f.display.classList.contains('collapsed'), false); assert.equal(f.cctv.classList.contains('collapsed'), false); - if (theme === 'cyber') assert.deepEqual(f.saved, []); + assert.deepEqual(f.saved, []); } finally { globalThis.document = prior; } } }); diff --git a/src/ui/styles/layers.css b/src/ui/styles/layers.css index 0f8ed55228..e71cd381cc 100644 --- a/src/ui/styles/layers.css +++ b/src/ui/styles/layers.css @@ -260,6 +260,9 @@ #right-context-rail.layout-exclusive > [data-panel-id].collapsed { display: none; } +#left-panel-stack.layout-exclusive > [data-panel-id].collapsed { + display: none; +} #right-context-rail.layout-focus > [data-panel-id].collapsed { display: block; flex: 0 0 auto; From eed7657516a6668e63bd3b155c568ee6ba01dace Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 30 Oct 2026 16:41:29 -0700 Subject: [PATCH 092/237] fix(ui): let revealed panels own their side and keep Cockpit's left strip A panel a feature opens (Street Level's viewer, a selected radio station) now becomes its side's open panel instead of being collapsed again by the next layout pass. Cockpit keeps showing its collapsed Data Layers strip, which Cyber's Cockpit layout aligns to, and Cyber's focus layout no longer re-shows collapsed left panels. Both sidebars share one accordion helper. --- scripts/package-boundaries.json | 12 ++++++--- src/rightRailPolicy.test.mjs | 9 +++++-- src/ui/leftPanelRail.js | 36 ++++++++++--------------- src/ui/panelAccordion.js | 41 +++++++++++++++++++++++++++++ src/ui/panelChrome.js | 12 ++++----- src/ui/panelRails.test.mjs | 14 ++++++++++ src/ui/rightPanelRail.js | 34 +++++++----------------- src/ui/sidePanelDisclosure.test.mjs | 17 ++++++++++++ src/ui/styles/cyber.css | 7 +++++ 9 files changed, 124 insertions(+), 58 deletions(-) create mode 100644 src/ui/panelAccordion.js diff --git a/scripts/package-boundaries.json b/scripts/package-boundaries.json index 9a82fa11ee..29476fb6fa 100644 --- a/scripts/package-boundaries.json +++ b/scripts/package-boundaries.json @@ -426,7 +426,8 @@ "src/ui/rightPanelRail.js", "src/ui/panelMeasurement.js", "src/ui/panelRailGeometry.js", - "src/panelStackLayout.js" + "src/panelStackLayout.js", + "src/ui/panelAccordion.js" ], "external": [] }, @@ -874,7 +875,8 @@ "src/ui/statusText.js", "src/ui/statusBadge.js", "src/scopeMaskPolicy.js", - "src/visualStylePolicy.js" + "src/visualStylePolicy.js", + "src/ui/panelAccordion.js" ], "external": ["cesium"] }, @@ -2810,7 +2812,8 @@ "src/ui/statusBadge.js", "src/sceneCommandRelease.js", "src/scopeMaskPolicy.js", - "src/visualStylePolicy.js" + "src/visualStylePolicy.js", + "src/ui/panelAccordion.js" ], "external": [ "hls.js", @@ -3603,7 +3606,8 @@ "src/i18n/locales/ru.json", "src/i18n/locales/uk.json", "src/i18n/locales/zh-CN.json", - "src/i18n/locales/zh-Hant.json" + "src/i18n/locales/zh-Hant.json", + "src/ui/panelAccordion.js" ], "external": [] }, diff --git a/src/rightRailPolicy.test.mjs b/src/rightRailPolicy.test.mjs index dde4c64bed..89e5b4d737 100644 --- a/src/rightRailPolicy.test.mjs +++ b/src/rightRailPolicy.test.mjs @@ -4,16 +4,21 @@ import { readFileSync } from 'node:fs'; import test from 'node:test'; import { shouldExpandGlobalContextPanel } from './rightRailPolicy.js'; -test('desktop side rails hide collapsed panels in every HUD layout, never on phones', () => { +test('desktop side rails hide collapsed panels in every HUD layout, never on phones or beside Cockpit', () => { const right = readFileSync(new URL('./ui/rightPanelRail.js', import.meta.url), 'utf8'); const left = readFileSync(new URL('./ui/leftPanelRail.js', import.meta.url), 'utf8'); const css = readStylesheet(new URL('../style.css', import.meta.url)); for (const ui of [right, left]) { assert.match(ui, /const isMobile = windowRef\.matchMedia\('\(max-width: 720px\)'\)\.matches/); - assert.match(ui, /const exclusive = !isMobile;/); assert.match(ui, /if \(exclusive && panel\.classList\.contains\('collapsed'\)\)\s*panel\.setAttribute\('aria-hidden', 'true'\)/); assert.doesNotMatch(ui, /hud\.variant === 'cyber'/); } + assert.match(right, /const exclusive = !isMobile;/); + // Cockpit keeps its collapsed Data Layers strip, which its layout aligns to. + assert.match( + left, + /const exclusive =\s*!isMobile && !documentRef\?\.body\?\.classList\?\.contains\('cockpit-mode'\);/, + ); assert.match(css, /#right-context-rail\.layout-exclusive > \[data-panel-id\]\.collapsed \{/); assert.match(css, /#left-panel-stack\.layout-exclusive > \[data-panel-id\]\.collapsed \{/); }); diff --git a/src/ui/leftPanelRail.js b/src/ui/leftPanelRail.js index a0de82746c..d9930676aa 100644 --- a/src/ui/leftPanelRail.js +++ b/src/ui/leftPanelRail.js @@ -5,6 +5,7 @@ import { resolvePanelStackCorridor, } from '../panelStackLayout.js'; import { measurePanelNaturalHeight } from './panelMeasurement.js'; +import { settleSideAccordion } from './panelAccordion.js'; /** * Measure and place the left panel rail for one synchronous layout pass. @@ -60,35 +61,26 @@ export function layoutLeftPanelRail({ stack.style.removeProperty('--left-stack-centered-height'); stack.classList.remove('layout-exclusive'); stack.dataset.layoutMode = 'mobile'; + settleSideAccordion({ panels, enabled: false, onCollapse }); for (const panel of panels) { - if (panel.classList.contains('accordion-collapsed')) { - panel.classList.remove('collapsed', 'accordion-collapsed'); - onCollapse(panel); - } panel.removeAttribute('aria-hidden'); panel.style.removeProperty('--left-panel-allocated-height'); } return; } - // One panel is open per desktop side and the panel rail lists the others, - // so collapsed panels are hidden. Normalize restored state without - // overwriting saved panel preferences. - const expandedBeforeAccordion = panels.filter( - (panel) => !panel.classList.contains('collapsed'), - ); - const accordionOwner = - expandedBeforeAccordion.find((panel) => panel.id === preferredPanelId) || - expandedBeforeAccordion.find((panel) => - panel.contains(documentRef?.activeElement), - ) || - expandedBeforeAccordion[0]; - for (const panel of expandedBeforeAccordion) { - if (panel === accordionOwner) continue; - panel.classList.add('collapsed', 'accordion-collapsed'); - onCollapse(panel); - } - const exclusive = !isMobile; + // One panel is open per desktop side, and the panel rail lists the others, + // so collapsed panels are hidden. Cockpit keeps its collapsed Data Layers + // strip, which its layout aligns to, and shows no rail. + settleSideAccordion({ + panels, + enabled: true, + preferredPanelId, + documentRef, + onCollapse, + }); + const exclusive = + !isMobile && !documentRef?.body?.classList?.contains('cockpit-mode'); stack.classList.toggle('layout-exclusive', exclusive); const laidOutPanels = panels.filter( (panel) => !exclusive || !panel.classList.contains('collapsed'), diff --git a/src/ui/panelAccordion.js b/src/ui/panelAccordion.js new file mode 100644 index 0000000000..5690bf71af --- /dev/null +++ b/src/ui/panelAccordion.js @@ -0,0 +1,41 @@ +/** + * Keep one side panel open on desktop, and on phones put back the collapse + * this applied, since a sheet shows several panels at once. The owner is the + * most recently opened panel, then the one holding keyboard focus, then the + * first. `accordion-collapsed` marks the collapse as presentation only, so + * saved and shared preferences still report the panel as the user left it. + * @param {object} options + * @param {HTMLElement[]} options.panels The side's laid-out panels. + * @param {boolean} options.enabled Whether the one-panel rule applies. + * @param {string} [options.preferredPanelId] Most recently opened panel. + * @param {Document} [options.documentRef] Document supplying keyboard focus. + * @param {Function} options.onCollapse Update a panel's disclosure chrome. + */ +export function settleSideAccordion({ + panels, + enabled, + preferredPanelId, + documentRef, + onCollapse, +}) { + if (!enabled) { + for (const panel of panels) { + if (!panel.classList.contains('accordion-collapsed')) continue; + panel.classList.remove('collapsed', 'accordion-collapsed'); + onCollapse(panel); + } + return; + } + const expanded = panels.filter( + (panel) => !panel.classList.contains('collapsed'), + ); + const owner = + expanded.find((panel) => panel.id === preferredPanelId) || + expanded.find((panel) => panel.contains(documentRef?.activeElement)) || + expanded[0]; + for (const panel of expanded) { + if (panel === owner) continue; + panel.classList.add('collapsed', 'accordion-collapsed'); + onCollapse(panel); + } +} diff --git a/src/ui/panelChrome.js b/src/ui/panelChrome.js index 4596949673..8f8bd219ff 100644 --- a/src/ui/panelChrome.js +++ b/src/ui/panelChrome.js @@ -421,14 +421,14 @@ export class PanelChrome { const wasAutoCollapsed = panelEl.classList.contains('layout-auto-collapsed') || panelEl.classList.contains('accordion-collapsed'); - // One panel is open per desktop side: a user opening a side panel owns - // the whole accordion, including peers that were only - // presentation-collapsed during a saved-state restore. + // One panel is open per desktop side: opening a side panel, whether the + // user asked or a feature revealed it (Street Level's viewer, a selected + // radio station), owns the whole accordion, including peers that were + // only presentation-collapsed during a saved-state restore. const sideStack = [this._leftPanelStack, this._rightPanelStack].find( (stack) => stack && panelEl.parentElement === stack, ); if ( - explicit && !restore && !nextCollapsed && sideStack && @@ -460,7 +460,7 @@ export class PanelChrome { : null; const priorLeftOwner = this._panelLayout._leftStackPreferredPanelId; const priorRightOwner = this._panelLayout._rightStackPreferredPanelId; - if (explicit && !restore && !nextCollapsed && leftOwnerPanel) { + if (!restore && !nextCollapsed && leftOwnerPanel) { this._panelLayout._leftStackPreferredPanelId = leftOwnerPanel.id; } else if ( explicit && @@ -470,7 +470,7 @@ export class PanelChrome { ) { this._panelLayout._leftStackPreferredPanelId = null; } - if (explicit && !restore && !nextCollapsed && rightOwnerPanel) { + if (!restore && !nextCollapsed && rightOwnerPanel) { this._panelLayout._rightStackPreferredPanelId = rightOwnerPanel.id; } else if ( explicit && diff --git a/src/ui/panelRails.test.mjs b/src/ui/panelRails.test.mjs index e7f0d07cf8..291eaac6c0 100644 --- a/src/ui/panelRails.test.mjs +++ b/src/ui/panelRails.test.mjs @@ -777,3 +777,17 @@ test('right layout ignores a hidden panel: no lane, no gap, no auto-collapse', ( ) <= alone, ); }); + +test('left rail keeps collapsed panels shown beside Cockpit, still one open', () => { + const f = fixture('left'); + f.options.documentRef.body = { + classList: { contains: (name) => name === 'cockpit-mode' }, + }; + f.expand(f.first, 250); + f.expand(f.second, 250); + f.options.preferredPanelId = f.second.id; + f.run(); + assert.equal(f.first.classList.contains('accordion-collapsed'), true); + assert.equal(f.stack.classList.contains('layout-exclusive'), false); + assert.equal(f.first.getAttribute('aria-hidden'), undefined); +}); diff --git a/src/ui/rightPanelRail.js b/src/ui/rightPanelRail.js index 5afdce2b7e..1dcd4460fc 100644 --- a/src/ui/rightPanelRail.js +++ b/src/ui/rightPanelRail.js @@ -5,6 +5,7 @@ import { import { resolveHudRailLayout } from './panelRailGeometry.js'; import { displayPanelScroller } from './displayPanelScroll.js'; +import { settleSideAccordion } from './panelAccordion.js'; const pendingCollapseRetries = new WeakSet(); @@ -86,31 +87,16 @@ export function layoutRightPanelRail({ onCollapse(panel); } } - // One panel is open per desktop side. Normalize restored state without - // overwriting saved panel preferences; this marker is distinct from - // Tactical's space-based collapse. Phones present the rail as tab sheets - // that show several panels at once. + // One panel is open per desktop side; this marker is distinct from + // Tactical's space-based collapse. const isMobile = windowRef.matchMedia('(max-width: 720px)').matches; - if (!isMobile) { - const expanded = panels.filter( - (panel) => !panel.classList.contains('collapsed'), - ); - const owner = - expanded.find((panel) => panel.id === preferredPanelId) || - expanded.find((panel) => panel.contains(documentRef?.activeElement)) || - expanded[0]; - for (const panel of expanded) { - if (panel === owner) continue; - panel.classList.add('collapsed', 'accordion-collapsed'); - onCollapse(panel); - } - } else { - for (const panel of panels) { - if (!panel.classList.contains('accordion-collapsed')) continue; - panel.classList.remove('collapsed', 'accordion-collapsed'); - onCollapse(panel); - } - } + settleSideAccordion({ + panels, + enabled: !isMobile, + preferredPanelId, + documentRef, + onCollapse, + }); // The desktop panel rail lists every panel, so collapsed ones are hidden. // Phones present the rail as tab sheets (mobileShell.js), which choose what // shows; hiding collapsed siblings would empty a sheet and its a11y tree. diff --git a/src/ui/sidePanelDisclosure.test.mjs b/src/ui/sidePanelDisclosure.test.mjs index 41b0977f7d..7badbd4640 100644 --- a/src/ui/sidePanelDisclosure.test.mjs +++ b/src/ui/sidePanelDisclosure.test.mjs @@ -97,3 +97,20 @@ test('restored preferences keep every saved panel open for the layout to normali } finally { globalThis.document = prior; } } }); + +test('a feature revealing a side panel makes it the side owner', () => { + const f = fixture('tactical'), prior = globalThis.document; + globalThis.document = f.doc; + try { + f.owner.setPanelCollapsed('pp-toggles', false, { explicit: true }); + f.claimed.length = 0; + // Street Level's viewer or a selected radio station opens its panel + // without an explicit user disclosure. + f.owner.setPanelCollapsed('radio-panel', false); + assert.equal(f.context.classList.contains('collapsed'), false); + assert.equal(f.display.classList.contains('collapsed'), true); + assert.equal(f.owner._panelLayout._rightStackPreferredPanelId, 'global-context-panel'); + // Only a user's choice claims restoration lanes. + assert.deepEqual(f.claimed, []); + } finally { globalThis.document = prior; } +}); diff --git a/src/ui/styles/cyber.css b/src/ui/styles/cyber.css index 4dd7de5b38..b625b9f814 100644 --- a/src/ui/styles/cyber.css +++ b/src/ui/styles/cyber.css @@ -1674,6 +1674,13 @@ flex: 0 0 auto; } + /* The panel rail lists the collapsed panels. */ + :root[data-ui-theme='cyber'] + #left-panel-stack.layout-focus.layout-exclusive + > [data-panel-id].collapsed { + display: none; + } + :root[data-ui-theme='cyber'] #left-panel-stack > :is(#data-panel, #scene-panel) { From 3d5d3ef014714bb58c45d755d795c81108ccace1 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 30 Oct 2026 16:41:29 -0700 Subject: [PATCH 093/237] feat(ui): add a desktop panel rail to each sidebar Each side stack hosts a Vue rail listing its panels; selecting one opens it through PanelChrome. The shell owns one Vue runtime and Pinia instance, and a panel store mirrors each side's panels from the DOM. The rail hides with its stack, in Cockpit, clean view and recording, and on phones. Panels without a catalog entry get a generic item, and Data Layers leaves the rail while the f shortcut hides it. --- CHANGELOG.md | 6 ++ docs/CURRENT-STATE.md | 31 +++++- docs/UI-OWNERSHIP.md | 1 + docs/VUE-MIGRATION.md | 19 ++-- index.html | 2 +- scripts/check-package-boundaries.mjs | 12 ++- scripts/format-scope.json | 4 +- scripts/i18n.mjs | 1 + scripts/package-boundaries.json | 25 ++++- src/i18n/locales/de.json | 4 +- src/i18n/locales/es.json | 4 +- src/i18n/locales/fr.json | 4 +- src/i18n/locales/it.json | 4 +- src/i18n/locales/ja.json | 4 +- src/i18n/locales/pt.json | 4 +- src/i18n/locales/ru.json | 4 +- src/i18n/locales/uk.json | 4 +- src/i18n/locales/zh-CN.json | 4 +- src/i18n/locales/zh-Hant.json | 4 +- src/ui/PanelRailView.vue | 47 +++++++++ src/ui/applicationShell.js | 13 +++ src/ui/panelLayoutController.js | 7 +- src/ui/panelNavigation.js | 123 +++++++++++++++++++++++ src/ui/panelNavigation.test.mjs | 140 +++++++++++++++++++++++++++ src/ui/panelRailCatalog.js | 41 ++++++++ src/ui/stores/panels.js | 57 +++++++++++ src/ui/stores/panels.test.mjs | 27 ++++++ src/ui/styles/layers.css | 27 ++++++ src/ui/vueRuntime.js | 36 +++++++ 29 files changed, 627 insertions(+), 32 deletions(-) create mode 100644 src/ui/PanelRailView.vue create mode 100644 src/ui/panelNavigation.js create mode 100644 src/ui/panelNavigation.test.mjs create mode 100644 src/ui/panelRailCatalog.js create mode 100644 src/ui/stores/panels.js create mode 100644 src/ui/stores/panels.test.mjs create mode 100644 src/ui/vueRuntime.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 356289841a..1340329691 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +- Each desktop sidebar has an icon rail that lists every panel on that side + and opens one with a click. One panel is open per side in every HUD layout, + so the collapsed panel headers no longer take up the sidebars. Phones keep + the bottom tab bar. The rail is the first view built with Vue and Pinia, + which now ship with the app; see docs/VUE-MIGRATION.md (samehkhamis). + ## [0.3.0] — 2026-10-27 — Street Level, On Your Phone, in Your Language - Show a Street Level view facing 359.5° or more as 0°. The viewer caption diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index bfdc069045..3c18bf83d5 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -1545,6 +1545,28 @@ The right rail skips panels hidden by other CSS (computed `display: none`), but keeps the collapsed panels its own exclusive presentation hides, so automatic collapse can still be undone. +## Panel rails + +On desktop each side stack has a floating icon rail (`src/ui/panelNavigation.js`, +rendered by the Vue `PanelRailView` and the kit's `UiRail`) in the screen-edge +gutter beside it. The rail lists every panel the side currently offers, in stack +order: Data Layers and Authoring on the left; Display, CCTV, Weather and Recent +Imagery (while shown), Street Level and Context on the right. Selecting an item +opens its panel through `setPanelCollapsed(id, false, {explicit: true})`; +selecting the open panel's item closes it. The item of the open panel is +pressed (`aria-pressed`), and its tooltip is suppressed while the panel is open. + +One panel is open per desktop side, in every HUD layout. Opening a side panel +by any route (rail, header, keyboard, voice) collapses its peers; restored or +shared state that opens several is normalized by the layout pass, which keeps +the most recently opened panel, then the one holding keyboard focus, then the +first, and marks the others `accordion-collapsed` (presentation only, so share +links still report the saved preference). Collapsed panels are hidden +(`layout-exclusive`) because the rail lists them. The rail lives inside its +stack, so it hides with it in Cockpit (where Authoring's item is also hidden), +recording and clean view. The panel store (`src/ui/stores/panels.js`) mirrors +each side's panels from the DOM; `PanelChrome` remains the disclosure owner. + ## Phone layout At 720px and narrower, `src/ui/mobileShell.js` keeps the globe full screen and @@ -1580,8 +1602,9 @@ sheet before a panel's own Escape handling, and the dock's hover auto-close does not apply inside a sheet. Cockpit, recording and clean view close the sheet and hide the tab bar; scene playback keeps both so its STOP control in the Authoring panel stays reachable. The -right rail neither hides collapsed siblings nor applies Cyber's one-panel -accordion at these widths, since the sheet chooses what shows. The Cesium and Google attribution stays visible above the +side rails neither hide collapsed siblings nor apply the desktop one-panel +accordion at these widths, and the panel rails are hidden, since the sheet +chooses what shows. The Cesium and Google attribution stays visible above the voice control, and above an open sheet. The page draws under the notch and system bars (`viewport-fit=cover`) and the shell's chrome uses safe-area insets. Wider viewports are unchanged, and crossing to them closes any open sheet. @@ -5622,7 +5645,7 @@ apply to `public/` assets or built-preview serving. - GEV MIC control is a glass capsule (var(--glass-bg), blur(24px) saturate(1.4), 999px radius; panel radius in error state). - The desktop right rail (`#right-context-rail`) owns `DISPLAY`, `CCTV`, its active parameter controls, and `GLOBAL CONTEXT` as one fixed responsive stack in that order. Its compact buttons use the same 176 px width as the left accordion and one consistent 50 px height, share the left stack's 52 px edge inset and measured top baseline across HUD variants, then constrain themselves against visible HUD/chrome rectangles and the remaining vertical corridor. `DISPLAY` is no longer draggable and legacy saved coordinates are ignored. - The right rail is labeled **DISPLAY** (formerly "MOVE") and groups, in order, HUD, DETECT, Bloom, Sharpen, 3D, Clean-UI (HUD + DETECT promoted to the top). Its expanded controls retain the same compact 176 px width as the right-side tabs instead of growing to the wider Context detail-card width. It starts expanded on first run and respects the user's later `v6` collapse choice. Collapses/expands with directional chevrons (`◀` collapsed, `▶` expanded). -- Display and Context use matching 330 px expanded widths and matching compact tab dimensions. The parameter panel is part of Display's expanded content. DISPLAY may remain open beside one contextual panel; CCTV and Context are mutually exclusive. In Tactical HUD, expanding CCTV or Context hides the other contextual launcher while DISPLAY remains independently available. The most recently opened right-rail panel owns the constrained lane even when it appears later in DOM order; passive restoration and automatic disclosure do not replace that explicit owner. Minimal and other HUD layouts retain the collapsed launchers; when their active panel exceeds the measured corridor, the rail reserves sibling heights and gaps and scrolls the active panel internally. +- Display and Context use matching 330 px expanded widths and matching compact tab dimensions. The parameter panel is part of Display's expanded content. One right-rail panel is open at a time in every HUD layout and collapsed launchers are hidden; the panel rail beside the stack switches between them (see Panel rails). The most recently opened right-rail panel owns the lane even when it appears later in DOM order; passive restoration and automatic disclosure do not replace that explicit owner. When the open panel exceeds the measured corridor, it scrolls internally. - At 720px and below both panel stacks (`#left-panel-stack`, `#right-context-rail`) go edge-to-edge and scroll vertically. Every hosted panel's decorative `.panel-glow` is pinned to its panel box there (`inset: 0` in `src/ui/styles/responsive.css`): on desktop the glow overhangs the panel by 18–20 px as harmless paint, but inside a scroll container that overhang is scrollable overflow on both axes and drew a horizontal scrollbar band plus a vertical scrollbar that scrolled nothing but glow whenever CCTV, Context, Data Layers or Authoring was expanded. The glow's blur is ink overflow and never scrolls, so the look is unchanged. Do not fix this by clipping the stacks: `overflow-x: clip` would not remove the vertical scrollbar. Context draws no glow at all (`display: none`), so it is not part of that pin. Pinned by `src/ui/panelRails.test.mjs` against every `(max-width: 720px)` block in the flattened stylesheet. - `STYLE PRESETS` and `LOCATIONS` start collapsed, expand on intentional hover/click, and auto-collapse after hover leave delay. - Collapsed mini-status indicators show active style and active location/landmark. @@ -6055,7 +6078,7 @@ After the initial broadside launch profile, the ascent chase camera stays in a r During orbit replay, the camera continues following the selected vehicle but eases its look-at target down toward the vehicle's sub-satellite globe anchor. The range expands when necessary for high-altitude missions, keeping both Earth and the tracked label visible through the full revolution. The active replay clock clamps at the final orbital sample rather than wrapping to ascent progress zero; replay completion therefore leaves the final globe/orbit framing in place and does not return to the launch site. Reconstructed mission orbits use a small downrange launch-to-insertion arc, so their estimated ground track is not artificially drawn directly over the launch pad in top-down views. The ascent remains connected to the ring at its selected insertion point. -Collapsed right-rail controls use the same 176 px width as collapsed left-rail controls, while expanded right-side detail panels retain their independent widths. DISPLAY starts expanded only on first run and then respects persistence; DISPLAY may remain open beside CCTV or Context, while CCTV and Context remain mutually exclusive without persisting forced collapses. Selecting a dedicated Context mode opens its right-side surface and clears unrelated layers after first snapshotting their exact state. Final exit restores the original enabled set and changed parameters. Cockpit View hides the right-side CCTV control because CCTV is not part of the cockpit rail. Airborne cockpit altitude uses the tracked aircraft's reported aviation MSL altitude, never the potentially negative Cesium terrain/ellipsoid render height; confirmed grounded contacts display `0 ft` without rewriting that source field. A cold photoreal floor shows `ACQUIRING SURFACE` for at most five seconds, then uses the source target-height fallback instead of freezing the camera indefinitely. +Collapsed right-rail controls use the same 176 px width as collapsed left-rail controls, while expanded right-side detail panels retain their independent widths. DISPLAY starts expanded only on first run and then respects persistence; one right-side panel is open at a time, without persisting the collapses that rule forces. Selecting a dedicated Context mode opens its right-side surface and clears unrelated layers after first snapshotting their exact state. Final exit restores the original enabled set and changed parameters. Cockpit View hides the right-side CCTV control because CCTV is not part of the cockpit rail. Airborne cockpit altitude uses the tracked aircraft's reported aviation MSL altitude, never the potentially negative Cesium terrain/ellipsoid render height; confirmed grounded contacts display `0 ft` without rewriting that source field. A cold photoreal floor shows `ACQUIRING SURFACE` for at most five seconds, then uses the source target-height fallback instead of freezing the camera indefinitely. Replay transport uses one Play/Pause toggle plus Cancel. During ascent only the active thrust ring is visible; stage-recovery handoff uses a pulsing dot. ## Tooling Snapshot diff --git a/docs/UI-OWNERSHIP.md b/docs/UI-OWNERSHIP.md index 8d24215c75..4132c47793 100644 --- a/docs/UI-OWNERSHIP.md +++ b/docs/UI-OWNERSHIP.md @@ -11,6 +11,7 @@ scene playback and voice. It delegates; new behavior belongs with its owner. | `cockpitCoordinator.js` | Cockpit entry/rollback, readouts and the single Display portal | | `visualSettings.js` | Effects, detection overrides, visual restoration and render-loop lifetime | | `panelChrome.js` | Disclosure, docking, layout and Cockpit panel restoration | +| `panelNavigation.js` | Desktop panel rails: each side's offered panels and the open one | | `aircraftDisplay.js` | Shared commercial/military 3D display preferences and controls | | `layerBindings.js` | Data-manager attachment, selected-tracker adoption and camera-entry listeners | | `displayBindings.js` | Keyboard/display subscriptions and frame-rate monitor lifetime | diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index f5846c99c0..e865626994 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -45,14 +45,13 @@ They contain no application state. ## Phases 1. **Foundation.** Vue, Pinia and the Vite Vue plugin join the browser build - (`build/vite.js`, so host applications receive them too). One Vue app is - mounted beside the existing markup with a shared Pinia instance. Stores - mirror the state that owners already publish: panel disclosure, the UI - theme, exclusive surfaces (Cockpit, scene playback, recording, clean view), - share state and location. The existing `gev:*` window events feed them. - Nothing visible changes. -2. **Rail.** The panel store becomes the authority for which panel is open on - each side, enforcing one panel per side, and the rail renders from it. + (`build/vite.js`, so host applications receive them too). One Vue runtime is + created by the shell (`src/ui/vueRuntime.js`) with one Pinia instance that + every view shares; disposing the shell unmounts them. Stores are added + when a view needs one, mirroring state an owner already publishes, so + there is never a second owner of the same state. +2. **Rail.** `PanelChrome` enforces one panel per side; the panel store + mirrors each side's panels and the rail renders from it. Done. 3. **Panels.** Each template and its wiring become a component, keeping ids, classes, `data-i18n` text and CSS. Order: Scenes, Weather, Recent imagery, Street level, CCTV, Layers, Display, Context and Radio, the command dock, @@ -67,7 +66,9 @@ They contain no application state. - Unit tests: stores and components run under `npm test`. Single-file components are compiled by a test loader; component tests render with - `@vue/test-utils` and `happy-dom`. + `@vue/test-utils` and `happy-dom`. `npm test` registers the loader; to run + one file that reaches a component (including anything importing the + shell), use `node --import=./src/testSupport/registerVue.mjs --test `. - Visual parity: before/after screenshots of every panel at desktop and phone widths, in the default and Cyber themes, with the rail as the only expected difference. diff --git a/index.html b/index.html index 26cf734fb7..373bbdd3a6 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ with the sources: src/materialSymbolsSubset.test.mjs fails when a source names a glyph this list is missing, because a missing glyph does not draw a box — the ligature never forms and the element renders the literal word. --> - + diff --git a/scripts/check-package-boundaries.mjs b/scripts/check-package-boundaries.mjs index 28627e4ac2..e019efe06b 100644 --- a/scripts/check-package-boundaries.mjs +++ b/scripts/check-package-boundaries.mjs @@ -1,6 +1,7 @@ import { readFile, realpath } from 'node:fs/promises'; import path from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; +import vue from '@vitejs/plugin-vue'; import { build, normalizePath } from 'vite'; /** Build each browser or Node export group and reject imports outside its declared ownership. */ @@ -99,15 +100,20 @@ export async function checkPackageBoundaries(root) { ssr: node ? { noExternal: true } : undefined, logLevel: 'silent', plugins: [ + vue(), { name: 'check-package-ownership', moduleParsed(info) { - if (!allowed.has(info.id)) { + // Plugin helpers are virtual; a single-file component's style and + // template blocks belong to the component file itself. + if (info.id.startsWith('\0')) return; + const id = info.id.split('?')[0]; + if (!allowed.has(id)) { throw new Error( - `Package boundary ${name} imports an unowned module: ${path.relative(root, info.id)}`, + `Package boundary ${name} imports an unowned module: ${path.relative(root, id)}`, ); } - seen.add(info.id); + seen.add(id); }, }, ], diff --git a/scripts/format-scope.json b/scripts/format-scope.json index 6197aa43c0..7e20adca73 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1122,5 +1122,7 @@ "src/ui/kit/UiRail.test.mjs", "src/testSupport/vueDom.mjs", "src/testSupport/vueLoader.mjs", - "src/testSupport/registerVue.mjs" + "src/testSupport/registerVue.mjs", + "src/ui/panelNavigation.test.mjs", + "src/ui/stores/panels.test.mjs" ] diff --git a/scripts/i18n.mjs b/scripts/i18n.mjs index c035c6bb25..d19dc60679 100644 --- a/scripts/i18n.mjs +++ b/scripts/i18n.mjs @@ -433,6 +433,7 @@ function sourceFiles() { 'src/*.mjs', 'src/**/*.js', 'src/**/*.mjs', + 'src/**/*.vue', ).filter( (file) => !file.startsWith('src/i18n/') && diff --git a/scripts/package-boundaries.json b/scripts/package-boundaries.json index 29476fb6fa..e74c561e87 100644 --- a/scripts/package-boundaries.json +++ b/scripts/package-boundaries.json @@ -876,9 +876,18 @@ "src/ui/statusBadge.js", "src/scopeMaskPolicy.js", "src/visualStylePolicy.js", + "src/ui/stores/panels.js", + "src/ui/panelRailCatalog.js", + "src/ui/vueRuntime.js", + "src/ui/kit/UiIcon.vue", + "src/ui/kit/rail.js", + "src/ui/kit/UiTooltip.vue", + "src/ui/kit/UiRail.vue", + "src/ui/PanelRailView.vue", + "src/ui/panelNavigation.js", "src/ui/panelAccordion.js" ], - "external": ["cesium"] + "external": ["cesium", "vue", "pinia"] }, "ui-styles": { "exports": ["./ui/styles"], @@ -2813,6 +2822,15 @@ "src/sceneCommandRelease.js", "src/scopeMaskPolicy.js", "src/visualStylePolicy.js", + "src/ui/stores/panels.js", + "src/ui/panelRailCatalog.js", + "src/ui/vueRuntime.js", + "src/ui/kit/UiIcon.vue", + "src/ui/kit/UiTooltip.vue", + "src/ui/kit/rail.js", + "src/ui/kit/UiRail.vue", + "src/ui/PanelRailView.vue", + "src/ui/panelNavigation.js", "src/ui/panelAccordion.js" ], "external": [ @@ -2824,7 +2842,9 @@ "pbf", "satellite.js", "mapillary-js", - "@jtarrio/webrtlsdr" + "@jtarrio/webrtlsdr", + "vue", + "pinia" ] }, "application-catalog": { @@ -3607,6 +3627,7 @@ "src/i18n/locales/uk.json", "src/i18n/locales/zh-CN.json", "src/i18n/locales/zh-Hant.json", + "src/ui/panelRailCatalog.js", "src/ui/panelAccordion.js" ], "external": [] diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index 938fb20bc5..9bf61dd277 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -2943,5 +2943,7 @@ "Load scenes from an exported JSON file": "Szenen aus einer exportierten JSON-Datei laden", "Download the timing log of the last play": "Zeitprotokoll der letzten Wiedergabe herunterladen", "Edit anchors, data packs and shot details": "Anker, Datenpakete und Aufnahmedetails bearbeiten", - "Download this scene as JSON or an asset bundle": "Diese Szene als JSON oder Asset-Bundle herunterladen" + "Download this scene as JSON or an asset bundle": "Diese Szene als JSON oder Asset-Bundle herunterladen", + "Left panels": "Linke Panels", + "Right panels": "Rechte Panels" } diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 5b893a0cb6..f579e2af42 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -3013,5 +3013,7 @@ "Play from this scene through the rest of the project": "Reproduce desde esta escena hasta el resto del proyecto", "Play the shot after the selected one, moving on to the next scene when needed": "Reproduce el plano posterior al seleccionado y pasa a la siguiente escena si hace falta", "Edit anchors, data packs and shot details": "Edita anclas, paquetes de datos y detalles de los planos", - "Download this scene as JSON or an asset bundle": "Descarga esta escena como JSON o como paquete de recursos" + "Download this scene as JSON or an asset bundle": "Descarga esta escena como JSON o como paquete de recursos", + "Left panels": "Paneles izquierdos", + "Right panels": "Paneles derechos" } diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 895b121eb8..0d63ef1daa 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -3013,5 +3013,7 @@ "Load scenes from an exported JSON file": "Charger des scènes depuis un fichier JSON exporté", "Download the timing log of the last play": "Télécharger le journal de minutage de la dernière lecture", "Edit anchors, data packs and shot details": "Modifier les ancres, les paquets de données et les détails des plans", - "Download this scene as JSON or an asset bundle": "Télécharger cette scène en JSON ou en archive de ressources" + "Download this scene as JSON or an asset bundle": "Télécharger cette scène en JSON ou en archive de ressources", + "Left panels": "Panneaux de gauche", + "Right panels": "Panneaux de droite" } diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index ccce863d43..864f1f56ab 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -3013,5 +3013,7 @@ "Load scenes from an exported JSON file": "Carica le scene da un file JSON esportato", "Download the timing log of the last play": "Scarica il log dei tempi dell'ultima riproduzione", "Edit anchors, data packs and shot details": "Modifica ancore, pacchetti dati e dettagli degli scatti", - "Download this scene as JSON or an asset bundle": "Scarica questa scena come JSON o pacchetto di risorse" + "Download this scene as JSON or an asset bundle": "Scarica questa scena come JSON o pacchetto di risorse", + "Left panels": "Pannelli a sinistra", + "Right panels": "Pannelli a destra" } diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index edd9c079fa..5eea0a9fe1 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -2873,5 +2873,7 @@ "Load scenes from an exported JSON file": "書き出したJSONファイルからシーンを読み込む", "Download the timing log of the last play": "前回の再生のタイミングログをダウンロード", "Edit anchors, data packs and shot details": "アンカー、データパック、ショットの詳細を編集", - "Download this scene as JSON or an asset bundle": "このシーンをJSONまたはアセットバンドルとしてダウンロード" + "Download this scene as JSON or an asset bundle": "このシーンをJSONまたはアセットバンドルとしてダウンロード", + "Left panels": "左パネル", + "Right panels": "右パネル" } diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index c3f4bcf909..69aab858ae 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -3013,5 +3013,7 @@ "Load scenes from an exported JSON file": "Carregar cenas de um arquivo JSON exportado", "Download the timing log of the last play": "Baixar o registro de tempos da última reprodução", "Edit anchors, data packs and shot details": "Editar âncoras, pacotes de dados e detalhes dos planos", - "Download this scene as JSON or an asset bundle": "Baixar esta cena como JSON ou pacote de recursos" + "Download this scene as JSON or an asset bundle": "Baixar esta cena como JSON ou pacote de recursos", + "Left panels": "Painéis à esquerda", + "Right panels": "Painéis à direita" } diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index fe8338c3fc..e7ef05f5bf 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -3083,5 +3083,7 @@ "Play from this scene through the rest of the project": "Воспроизвести с этой сцены и далее по всему проекту", "Play the shot after the selected one, moving on to the next scene when needed": "Воспроизвести кадр после выбранного, при необходимости перейдя к следующей сцене", "Edit anchors, data packs and shot details": "Изменить якоря, пакеты данных и параметры кадров", - "Download this scene as JSON or an asset bundle": "Скачать эту сцену в формате JSON или архивом ресурсов" + "Download this scene as JSON or an asset bundle": "Скачать эту сцену в формате JSON или архивом ресурсов", + "Left panels": "Левые панели", + "Right panels": "Правые панели" } diff --git a/src/i18n/locales/uk.json b/src/i18n/locales/uk.json index 37e55b9618..f9067a2b83 100644 --- a/src/i18n/locales/uk.json +++ b/src/i18n/locales/uk.json @@ -3083,5 +3083,7 @@ "Load scenes from an exported JSON file": "Завантажити сцени з експортованого файлу JSON", "Download the timing log of the last play": "Завантажити журнал таймінгів останнього відтворення", "Edit anchors, data packs and shot details": "Змінити якорі, пакети даних і параметри кадрів", - "Download this scene as JSON or an asset bundle": "Завантажити цю сцену у форматі JSON або архівом ресурсів" + "Download this scene as JSON or an asset bundle": "Завантажити цю сцену у форматі JSON або архівом ресурсів", + "Left panels": "Ліві панелі", + "Right panels": "Праві панелі" } diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 8dc28b3084..6dab5ce522 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -2873,5 +2873,7 @@ "Play from this scene through the rest of the project": "从此场景开始播放项目中的其余场景", "Play the shot after the selected one, moving on to the next scene when needed": "播放所选镜头的下一个镜头,必要时进入下一个场景", "Edit anchors, data packs and shot details": "编辑锚点、数据包和镜头详情", - "Download this scene as JSON or an asset bundle": "将此场景下载为 JSON 或资源包" + "Download this scene as JSON or an asset bundle": "将此场景下载为 JSON 或资源包", + "Left panels": "左侧面板", + "Right panels": "右侧面板" } diff --git a/src/i18n/locales/zh-Hant.json b/src/i18n/locales/zh-Hant.json index c821312233..cc57752c71 100644 --- a/src/i18n/locales/zh-Hant.json +++ b/src/i18n/locales/zh-Hant.json @@ -2873,5 +2873,7 @@ "Play from this scene through the rest of the project": "從此場景開始播放項目中的其餘場景", "Play the shot after the selected one, moving on to the next scene when needed": "播放所選鏡頭的下一個鏡頭,必要時進入下一個場景", "Edit anchors, data packs and shot details": "編輯錨點、數據包和鏡頭詳情", - "Download this scene as JSON or an asset bundle": "將此場景下載為 JSON 或資源包" + "Download this scene as JSON or an asset bundle": "將此場景下載為 JSON 或資源包", + "Left panels": "左側面板", + "Right panels": "右側面板" } diff --git a/src/ui/PanelRailView.vue b/src/ui/PanelRailView.vue new file mode 100644 index 0000000000..8f43dabb26 --- /dev/null +++ b/src/ui/PanelRailView.vue @@ -0,0 +1,47 @@ + + + diff --git a/src/ui/applicationShell.js b/src/ui/applicationShell.js index 140073e9ec..cbbd0a7bdc 100644 --- a/src/ui/applicationShell.js +++ b/src/ui/applicationShell.js @@ -51,6 +51,8 @@ import { t, } from '../i18n/index.js'; import { applyLocaleChoice, mountLocalePicker } from './localePicker.js'; +import { PanelNavigation } from './panelNavigation.js'; +import { createUiRuntime } from './vueRuntime.js'; /** * Central UI orchestrator for the God's Eye View application. @@ -133,6 +135,8 @@ export class StyleManager extends ShellFacade { readSharedCollapsed: (panelId) => this._mobileShell?.sharedCollapsed(panelId), }); + // Vue views share this runtime and its stores; dispose unmounts them. + this._ui = createUiRuntime(); this._feedback = new ShellFeedback({ readLayers: () => this._dataManager?.getAll?.() || [], }); @@ -594,6 +598,13 @@ export class StyleManager extends ShellFacade { // Headers first: panel chrome builds its toggle labels from them. this._applyRuntimeStaticHeaderText(); this._initPanelChrome(); + this._panelNavigation = new PanelNavigation({ + ui: this._ui, + stacks: { left: this._leftPanelStack, right: this._rightPanelStack }, + setPanelCollapsed: (...args) => + this._panelChrome.setPanelCollapsed(...args), + }); + this._panelNavigation.init(); this._initLocaleSelector(); this._sizeDisplayLabelColumn(); this._initLeftPanelAdaptiveLayout(); @@ -1776,6 +1787,8 @@ export class StyleManager extends ShellFacade { this._localePicker = null; this._recording.destroy(); this._mobileShell?.destroy(); + this._panelNavigation?.destroy(); + this._ui.destroy(); this._panelChrome.destroy(); this._feedback.destroy(); diff --git a/src/ui/panelLayoutController.js b/src/ui/panelLayoutController.js index 0c2a2ad3ae..9d9057fa0a 100644 --- a/src/ui/panelLayoutController.js +++ b/src/ui/panelLayoutController.js @@ -1,6 +1,7 @@ /** Own rail measurement, layout scheduling and dock tray observation. */ import { layoutLeftPanelRail, layoutRightPanelRail } from './panelRails.js'; import { syncRadioPanelPlacement } from './radioPanelPlacement.js'; +import { isPanelRailMutation } from './panelRailCatalog.js'; const COCKPIT_LAYOUT_SETTLE_MS = 240; /** * Fixed UI regions that can occupy the left accordion's vertical lane. @@ -233,7 +234,8 @@ export class PanelLayoutController { } if (typeof MutationObserver !== 'undefined') { - this._rightStackMutationObserver = new MutationObserver(() => { + this._rightStackMutationObserver = new MutationObserver((records) => { + if (records.every(isPanelRailMutation)) return; this._scheduleRightPanelLayout(); }); this._rightStackMutationObserver.observe(stack, { @@ -334,7 +336,8 @@ export class PanelLayoutController { } if (typeof MutationObserver !== 'undefined') { - this._leftStackMutationObserver = new MutationObserver(() => { + this._leftStackMutationObserver = new MutationObserver((records) => { + if (records.every(isPanelRailMutation)) return; this._scheduleLeftPanelLayout(); }); this._leftStackMutationObserver.observe(stack, { diff --git a/src/ui/panelNavigation.js b/src/ui/panelNavigation.js new file mode 100644 index 0000000000..5ef84c53a3 --- /dev/null +++ b/src/ui/panelNavigation.js @@ -0,0 +1,123 @@ +import PanelRailView from './PanelRailView.vue'; +import { PANEL_RAIL_HOST_CLASS, PANEL_RAIL_ITEMS } from './panelRailCatalog.js'; +import { usePanelStore } from './stores/panels.js'; + +/** + * Own the desktop panel rails: publish each side's panels to the panel store + * and open or close a panel when its rail item is selected. Disclosure itself + * stays with PanelChrome, which enforces one open panel per side. + */ +export class PanelNavigation { + /** + * @param {object} options + * @param {{pinia: object, mount: Function}} options.ui Shell Vue runtime. + * @param {{left: HTMLElement|null, right: HTMLElement|null}} options.stacks Side panel stacks. + * @param {Function} options.setPanelCollapsed PanelChrome's disclosure operation. + */ + constructor({ ui, stacks, setPanelCollapsed }) { + this._ui = ui; + this._stacks = stacks; + this._setPanelCollapsed = setPanelCollapsed; + this._store = usePanelStore(ui.pinia); + this._unmounts = []; + this._hosts = []; + this._observer = null; + this._destroyed = false; + } + + init() { + if (this._destroyed) return; + for (const side of ['left', 'right']) { + const stack = this._stacks[side]; + if (!stack) continue; + // Inside the stack, the rail shows and hides with its panels in every + // presentation mode (Cockpit, clean view, recording, phone sheets). + const host = stack.ownerDocument.createElement('div'); + host.className = `${PANEL_RAIL_HOST_CLASS} ${PANEL_RAIL_HOST_CLASS}--${side}`; + stack.prepend(host); + this._hosts.push(host); + this._unmounts.push( + this._ui.mount(PanelRailView, host, { + side, + onSelect: (panelId) => this.select(panelId), + }), + ); + } + if (typeof MutationObserver !== 'undefined') { + // Only the panels themselves matter: their order, disclosure and + // availability, not changes inside them or inside the rails. + this._observer = new MutationObserver((records) => { + if (records.some((record) => this._isPanelRecord(record))) this.sync(); + }); + for (const stack of Object.values(this._stacks)) { + if (!stack) continue; + this._observer.observe(stack, { + childList: true, + subtree: true, + attributes: true, + attributeFilter: ['class', 'hidden'], + }); + } + } + this.sync(); + } + + /** Publish both sides' panels in display order. */ + sync() { + if (this._destroyed) return; + for (const side of ['left', 'right']) { + const stack = this._stacks[side]; + const panels = stack + ? [...stack.children] + .filter((panel) => panel.matches('[data-panel-id]')) + .map((panel) => { + const shownBy = PANEL_RAIL_ITEMS[panel.id]?.shownBy; + return { + id: panel.id, + title: + panel + .querySelector('.panel-title, .pp-header-label') + ?.textContent.trim() || panel.id, + open: !panel.classList.contains('collapsed'), + available: + !panel.hidden && + (!shownBy || panel.classList.contains(shownBy)), + }; + }) + : []; + this._store.setSide(side, panels); + } + } + + /** + * Toggle a panel from its rail item. + * @param {string} panelId Panel element id. + */ + select(panelId) { + if (this._destroyed) return; + this._setPanelCollapsed(panelId, this._store.isOpen(panelId), { + explicit: true, + }); + } + + _isPanelRecord(record) { + const stacks = Object.values(this._stacks); + return record.type === 'childList' + ? stacks.includes(record.target) && + [...record.addedNodes, ...record.removedNodes].some( + (node) => !this._hosts.includes(node), + ) + : stacks.includes(record.target.parentElement); + } + + destroy() { + if (this._destroyed) return; + this._destroyed = true; + this._observer?.disconnect(); + this._observer = null; + for (const unmount of this._unmounts) unmount(); + this._unmounts = []; + for (const host of this._hosts) host.remove(); + this._hosts = []; + } +} diff --git a/src/ui/panelNavigation.test.mjs b/src/ui/panelNavigation.test.mjs new file mode 100644 index 0000000000..ec6cc8882a --- /dev/null +++ b/src/ui/panelNavigation.test.mjs @@ -0,0 +1,140 @@ +import { after, before, test } from 'node:test'; +import assert from 'node:assert/strict'; +import { installVueDom } from '../testSupport/vueDom.mjs'; + +let PanelNavigation; +let createUiRuntime; +let nextTick; +let uninstall; +before(async () => { + uninstall = installVueDom(); + ({ nextTick } = await import('vue')); + ({ PanelNavigation } = await import('./panelNavigation.js')); + ({ createUiRuntime } = await import('./vueRuntime.js')); +}); +after(() => uninstall()); + +function panel(id, { collapsed = true, hidden = false, title = '' } = {}) { + const element = document.createElement('div'); + element.id = id; + element.dataset.panelId = id; + element.className = collapsed + ? 'panel-collapsible collapsed' + : 'panel-collapsible'; + // Data Layers shows only while `active` (the `f` shortcut toggles it). + if (id === 'data-panel') element.classList.add('active'); + element.hidden = hidden; + if (title) element.innerHTML = `${title}`; + return element; +} + +function setup() { + document.body.innerHTML = ''; + const left = document.createElement('div'); + left.id = 'left-panel-stack'; + left.append(panel('data-panel', { collapsed: false }), panel('scene-panel')); + const right = document.createElement('div'); + right.id = 'right-context-rail'; + right.append( + panel('pp-toggles'), + panel('weather-panel', { hidden: true }), + panel('global-context-panel'), + panel('host-panel', { title: 'HOST' }), + ); + document.body.append(left, right); + const calls = []; + const ui = createUiRuntime(); + const navigation = new PanelNavigation({ + ui, + stacks: { left, right }, + setPanelCollapsed: (...args) => calls.push(args), + }); + navigation.init(); + return { left, right, calls, ui, navigation }; +} + +const railItems = (stack) => + [...stack.querySelectorAll('.gev-panel-rail [data-rail-item]')].map( + (button) => [button.dataset.railItem, button.getAttribute('aria-pressed')], + ); + +test('each stack gets a rail of its offered panels, marking the open one', async () => { + const { left, right, ui, navigation } = setup(); + await nextTick(); + assert.equal( + left.firstElementChild.className, + 'gev-panel-rail gev-panel-rail--left', + ); + assert.deepEqual(railItems(left), [ + ['data-panel', 'true'], + ['scene-panel', 'false'], + ]); + // Hidden panels are not offered; a host's panel gets a generic item. + assert.deepEqual(railItems(right), [ + ['pp-toggles', 'false'], + ['global-context-panel', 'false'], + ['host-panel', 'false'], + ]); + assert.equal( + right + .querySelector('[data-rail-item="host-panel"]') + .getAttribute('aria-label'), + 'HOST', + ); + assert.equal( + left.querySelector('nav').getAttribute('aria-label'), + 'Left panels', + ); + navigation.destroy(); + ui.destroy(); +}); + +test('selecting an item toggles its panel explicitly', async () => { + const { left, calls, ui, navigation } = setup(); + await nextTick(); + left.querySelector('[data-rail-item="scene-panel"]').click(); + left.querySelector('[data-rail-item="data-panel"]').click(); + assert.deepEqual(calls, [ + ['scene-panel', false, { explicit: true }], + ['data-panel', true, { explicit: true }], + ]); + navigation.destroy(); + ui.destroy(); +}); + +test('the rails follow disclosure and availability changes', async () => { + const { left, right, ui, navigation } = setup(); + document.getElementById('data-panel').classList.add('collapsed'); + document.getElementById('scene-panel').classList.remove('collapsed'); + document.getElementById('weather-panel').hidden = false; + await new Promise((resolve) => setTimeout(resolve, 0)); + await nextTick(); + assert.deepEqual(railItems(left), [ + ['data-panel', 'false'], + ['scene-panel', 'true'], + ]); + assert.deepEqual(railItems(right), [ + ['pp-toggles', 'false'], + ['weather-panel', 'false'], + ['global-context-panel', 'false'], + ['host-panel', 'false'], + ]); + // `f` hides Data Layers outright, so the rail stops offering it. + document.getElementById('data-panel').classList.remove('active'); + await new Promise((resolve) => setTimeout(resolve, 0)); + await nextTick(); + assert.deepEqual(railItems(left), [['scene-panel', 'true']]); + navigation.destroy(); + ui.destroy(); +}); + +test('destroy removes the rails and stops following the stacks', async () => { + const { left, right, calls, ui, navigation } = setup(); + navigation.destroy(); + navigation.destroy(); + assert.equal(left.querySelector('.gev-panel-rail'), null); + assert.equal(right.querySelector('.gev-panel-rail'), null); + navigation.select('data-panel'); + assert.deepEqual(calls, []); + ui.destroy(); +}); diff --git a/src/ui/panelRailCatalog.js b/src/ui/panelRailCatalog.js new file mode 100644 index 0000000000..e6613d0018 --- /dev/null +++ b/src/ui/panelRailCatalog.js @@ -0,0 +1,41 @@ +import { msg } from '../i18n/index.js'; + +/** Class of the element each side stack hosts its rail in. */ +export const PANEL_RAIL_HOST_CLASS = 'gev-panel-rail'; + +/** Glyph for a panel without a catalog entry, such as one a host adds. */ +export const PANEL_RAIL_FALLBACK_ICON = 'more_horiz'; + +/** + * How each side panel appears on its rail. Labels are the panels' own titles. + * `shownBy` names a class the panel needs to be shown at all (`f` toggles + * Data Layers' `active`). + */ +export const PANEL_RAIL_ITEMS = Object.freeze({ + 'data-panel': { + icon: 'layers', + label: msg('DATA LAYERS'), + shownBy: 'active', + }, + 'scene-panel': { icon: 'movie', label: msg('AUTHORING') }, + 'pp-toggles': { icon: 'tune', label: msg('DISPLAY') }, + 'cctv-panel': { icon: 'videocam', label: msg('CCTV') }, + 'weather-panel': { icon: 'partly_cloudy_day', label: msg('WEATHER') }, + 'recent-imagery-panel': { + icon: 'satellite_alt', + label: msg('RECENT IMAGERY'), + }, + 'street-level-panel': { icon: 'streetview', label: msg('STREET LEVEL') }, + 'global-context-panel': { icon: 'radar', label: msg('CONTEXT') }, +}); + +/** + * Whether a mutation happened inside a panel rail, which no stack layout or + * panel state depends on. + * @param {MutationRecord} record Observed mutation. + */ +export function isPanelRailMutation(record) { + const target = + record.target.nodeType === 1 ? record.target : record.target.parentElement; + return Boolean(target?.closest?.(`.${PANEL_RAIL_HOST_CLASS}`)); +} diff --git a/src/ui/stores/panels.js b/src/ui/stores/panels.js new file mode 100644 index 0000000000..2fc5d2ac34 --- /dev/null +++ b/src/ui/stores/panels.js @@ -0,0 +1,57 @@ +import { defineStore } from 'pinia'; +import { reactive } from 'vue'; + +/** + * @typedef {object} RailPanel + * @property {string} id Panel element id. + * @property {string} title The panel's translated title. + * @property {boolean} open Whether the panel is expanded. + * @property {boolean} available Whether the panel is offered (not `hidden`). + */ + +const samePanels = (a, b) => + a.length === b.length && + a.every( + (panel, index) => + panel.id === b[index].id && + panel.title === b[index].title && + panel.open === b[index].open && + panel.available === b[index].available, + ); + +/** + * The desktop side panels as the rails present them. Panel disclosure stays + * with PanelChrome; this store publishes each side's panels in order. + */ +export const usePanelStore = defineStore('gev-panels', () => { + /** @type {{left: RailPanel[], right: RailPanel[]}} */ + const sides = reactive({ left: [], right: [] }); + + /** + * Replace one side's panels, keeping the array when nothing changed. + * @param {'left'|'right'} side Sidebar. + * @param {RailPanel[]} panels Panels in display order. + */ + function setSide(side, panels) { + if (!samePanels(sides[side], panels)) sides[side] = panels; + } + + /** + * @param {'left'|'right'} side Sidebar. + * @returns {string|null} The open panel's id. + */ + function openPanelId(side) { + return ( + sides[side].find((panel) => panel.open && panel.available)?.id ?? null + ); + } + + /** @param {string} id Panel id. */ + function isOpen(id) { + return [...sides.left, ...sides.right].some( + (panel) => panel.id === id && panel.open, + ); + } + + return { sides, setSide, openPanelId, isOpen }; +}); diff --git a/src/ui/stores/panels.test.mjs b/src/ui/stores/panels.test.mjs new file mode 100644 index 0000000000..87ec34094b --- /dev/null +++ b/src/ui/stores/panels.test.mjs @@ -0,0 +1,27 @@ +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { createPinia } from 'pinia'; +import { usePanelStore } from './panels.js'; + +test('the panel store reports each side’s open panel and keeps unchanged sides', () => { + const store = usePanelStore(createPinia()); + const left = [ + { id: 'data-panel', open: false, available: true }, + { id: 'scene-panel', open: true, available: true }, + ]; + store.setSide('left', left); + store.setSide('right', [ + { id: 'weather-panel', open: true, available: false }, + ]); + assert.equal(store.openPanelId('left'), 'scene-panel'); + // An open panel that is not offered is not the side's open panel. + assert.equal(store.openPanelId('right'), null); + assert.equal(store.isOpen('scene-panel'), true); + assert.equal(store.isOpen('data-panel'), false); + const published = store.sides.left; + store.setSide( + 'left', + left.map((panel) => ({ ...panel })), + ); + assert.equal(store.sides.left, published); +}); diff --git a/src/ui/styles/layers.css b/src/ui/styles/layers.css index e71cd381cc..13694b20de 100644 --- a/src/ui/styles/layers.css +++ b/src/ui/styles/layers.css @@ -263,6 +263,33 @@ #left-panel-stack.layout-exclusive > [data-panel-id].collapsed { display: none; } + +/* Panel rails (src/ui/panelNavigation.js). Each rail lives inside its stack, + so it shows and hides with the stack, and floats in the screen-edge gutter. */ +.gev-panel-rail { + position: absolute; + top: 0; + z-index: 1; + pointer-events: auto; +} +.gev-panel-rail--left { + right: calc(100% + 6px); +} +.gev-panel-rail--right { + left: calc(100% + 6px); +} +body.mobile-shell #left-panel-stack > .gev-panel-rail, +body.mobile-shell #right-context-rail > .gev-panel-rail, +body.cockpit-mode .gev-panel-rail { + display: none; +} +/* Clean view and recording hide the panels one by one, not their stacks. */ +body.ui-clean-view .gev-panel-rail, +body.recording-mode .gev-panel-rail { + opacity: 0 !important; + visibility: hidden !important; + pointer-events: none !important; +} #right-context-rail.layout-focus > [data-panel-id].collapsed { display: block; flex: 0 0 auto; diff --git a/src/ui/vueRuntime.js b/src/ui/vueRuntime.js new file mode 100644 index 0000000000..1a6ea00914 --- /dev/null +++ b/src/ui/vueRuntime.js @@ -0,0 +1,36 @@ +import { createApp } from 'vue'; +import { createPinia } from 'pinia'; + +/** + * Create the application's Vue runtime: one Pinia instance shared by every + * view the shell mounts, and the mounts themselves for teardown. + * @returns {{pinia: import('pinia').Pinia, mount: Function, destroy: Function}} + */ +export function createUiRuntime() { + const pinia = createPinia(); + const apps = new Set(); + return { + pinia, + /** + * Mount a root component into a host element. + * @param {object} component Root component. + * @param {Element} host Element the view renders into. + * @param {object} [props] Root props. + * @returns {Function} Unmount this view. + */ + mount(component, host, props = {}) { + const app = createApp(component, props); + app.use(pinia); + app.mount(host); + apps.add(app); + return () => { + if (!apps.delete(app)) return; + app.unmount(); + }; + }, + destroy() { + for (const app of apps) app.unmount(); + apps.clear(); + }, + }; +} From b7e7058a5c757abb052f5eae064dbcc6c6e0ab53 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 30 Oct 2026 16:41:29 -0700 Subject: [PATCH 094/237] test: compile option-API components and report template errors in the Vue test loader --- src/testSupport/vueLoader.mjs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/testSupport/vueLoader.mjs b/src/testSupport/vueLoader.mjs index 5aa340b5e4..3a3bb3cd9a 100644 --- a/src/testSupport/vueLoader.mjs +++ b/src/testSupport/vueLoader.mjs @@ -14,16 +14,19 @@ export function compileVueModule(source, filename) { return compileScript(descriptor, { id, inlineTemplate: true }).content; } const script = descriptor.script - ? compileScript(descriptor, { id }).content.replace( - 'export default', - 'const __sfc__ =', - ) + ? compileScript(descriptor, { id, genDefaultAs: '__sfc__' }).content : 'const __sfc__ = {};'; - const template = descriptor.template - ? compileTemplate({ source: descriptor.template.content, filename, id }) - .code - : ''; - return `${script}\n${template}\n__sfc__.render = typeof render === 'function' ? render : __sfc__.render;\nexport default __sfc__;\n`; + let template = ''; + if (descriptor.template) { + const compiled = compileTemplate({ + source: descriptor.template.content, + filename, + id, + }); + if (compiled.errors.length) throw compiled.errors[0]; + template = compiled.code; + } + return `${script}\n${template}\nif (typeof render === 'function') __sfc__.render = render;\nexport default __sfc__;\n`; } /** Node module hook: load `.vue` files as compiled modules. */ From 9d249451438f30f020a3ce2e3725eb9a8d70fd28 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 30 Oct 2026 17:23:45 -0700 Subject: [PATCH 095/237] feat(ui): render application templates as Vue views mounted before wiring Templates listed in build/applicationViews.js expand to mount hosts, and mountApplicationViews() renders them before translation and wiring. Markup tests read the page through a server-side render helper, the i18n scanner reads view templates, and Vue preserves whitespace so views keep the exact DOM. No template is converted yet. --- build/application-html.js | 12 +++++++++ build/applicationViews.js | 7 +++++ build/vite.js | 3 ++- build/vueOptions.js | 11 ++++++++ docs/VUE-MIGRATION.md | 12 ++++++++- scripts/check-package-boundaries.mjs | 3 ++- scripts/i18n.mjs | 28 ++++++++++++++----- scripts/package-boundaries.json | 12 ++++++--- src/app/application.js | 3 +++ src/cockpitMarkup.test.mjs | 4 +-- src/contextTabKeyboard.test.mjs | 4 +-- src/data/detectionPolicy.test.mjs | 4 +-- src/data/layerState.test.mjs | 4 +-- src/firstRunExperience.test.mjs | 10 +++---- src/hudA11y.test.mjs | 4 +-- src/loadingFeedback.test.mjs | 6 ++--- src/mapSourceFocus.test.mjs | 4 +-- src/mapStackChips.test.mjs | 6 ++--- src/overlays/worldOverlay.test.mjs | 6 ++--- src/panelStackLayout.test.mjs | 10 +++---- src/radioMarkup.test.mjs | 4 +-- src/reasonableDefaults.test.mjs | 4 +-- src/standalone/application.js | 3 +++ src/streetLevelMarkup.test.mjs | 4 +-- src/testSupport/applicationHtml.mjs | 40 ++++++++++++++++++++++++++++ src/testSupport/vueLoader.mjs | 8 +++++- src/tooling/applicationHtml.test.mjs | 29 ++++++++++++++++---- src/ui/applicationShell.js | 4 +-- src/ui/localSdrMarkup.test.mjs | 4 +-- src/ui/styles/kit.css | 6 +++++ src/ui/views/index.js | 27 +++++++++++++++++++ src/ui/vueRuntime.js | 20 +++++++++++--- 32 files changed, 243 insertions(+), 63 deletions(-) create mode 100644 build/applicationViews.js create mode 100644 build/vueOptions.js create mode 100644 src/testSupport/applicationHtml.mjs create mode 100644 src/ui/views/index.js diff --git a/build/application-html.js b/build/application-html.js index b14210a569..27cec5fbae 100644 --- a/build/application-html.js +++ b/build/application-html.js @@ -1,4 +1,5 @@ import { readFileSync } from 'node:fs'; +import { APPLICATION_VIEW_NAMES } from './applicationViews.js'; export const APPLICATION_TEMPLATES = Object.freeze([ 'scene-chrome', @@ -12,6 +13,16 @@ export const APPLICATION_TEMPLATES = Object.freeze([ 'hud-loading', ]); const allowed = new Set(APPLICATION_TEMPLATES); +const views = new Set(APPLICATION_VIEW_NAMES); + +/** + * The element a Vue view renders into. `display: contents` keeps the view's + * own elements laid out as children of the page. + * @param {string} name Application template name. + */ +export function applicationViewHost(name) { + return `
    \n`; +} /** Expand only known component templates; markers cannot name filesystem paths. */ export function expandApplicationHtml(html) { @@ -20,6 +31,7 @@ export function expandApplicationHtml(html) { (_, name) => { if (!allowed.has(name)) throw new Error(`Unknown application template: ${name}`); + if (views.has(name)) return applicationViewHost(name); return readFileSync( new URL(`../src/ui/templates/${name}.html`, import.meta.url), 'utf8', diff --git a/build/applicationViews.js b/build/applicationViews.js new file mode 100644 index 0000000000..c277d8b341 --- /dev/null +++ b/build/applicationViews.js @@ -0,0 +1,7 @@ +/** + * Application templates that are now Vue views (src/ui/views). Their markers + * expand to a mount host instead of static markup, and + * `mountApplicationViews()` renders them before the page is wired. The + * loading screen stays static so it paints before any script runs. + */ +export const APPLICATION_VIEW_NAMES = Object.freeze([]); diff --git a/build/vite.js b/build/vite.js index a1c9c403b9..3dacdfdaa2 100644 --- a/build/vite.js +++ b/build/vite.js @@ -2,6 +2,7 @@ import { fileURLToPath } from 'node:url'; import { applicationHtmlPlugin } from './application-html.js'; import cesium from 'vite-plugin-cesium'; import vue from '@vitejs/plugin-vue'; +import { VUE_PLUGIN_OPTIONS } from './vueOptions.js'; import { DEFAULT_ALLOWED_HOSTS, hostCheckPlugin } from './allowedHosts.js'; import { embedFramingPlugin } from './embed-framing.js'; import { panelBuildPlugin } from './panel.js'; @@ -158,7 +159,7 @@ export function createBrowserViteConfig({ cesium(), applicationHtmlPlugin(), // Application views are Vue single-file components. - vue(), + vue(VUE_PLUGIN_OPTIONS), ...plugins, embedFramingPlugin(), panelBuildPlugin(), diff --git a/build/vueOptions.js b/build/vueOptions.js new file mode 100644 index 0000000000..c1c5c1b72b --- /dev/null +++ b/build/vueOptions.js @@ -0,0 +1,11 @@ +/** + * Template compiler options shared by the browser build, the boundary check + * and the unit-test loader. Whitespace is preserved so a view renders exactly + * the DOM its static markup did: inline layouts depend on text between nodes. + */ +export const VUE_COMPILER_OPTIONS = Object.freeze({ whitespace: 'preserve' }); + +/** `@vitejs/plugin-vue` options for application builds. */ +export const VUE_PLUGIN_OPTIONS = Object.freeze({ + template: { compilerOptions: VUE_COMPILER_OPTIONS }, +}); diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index e865626994..84892e3e96 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -53,7 +53,17 @@ They contain no application state. 2. **Rail.** `PanelChrome` enforces one panel per side; the panel store mirrors each side's panels and the rail renders from it. Done. 3. **Panels.** Each template and its wiring become a component, keeping ids, - classes, `data-i18n` text and CSS. Order: Scenes, Weather, Recent imagery, + classes, `data-i18n` text and CSS. A converted template is listed in + `build/applicationViews.js`; its `gev:template` marker then expands to a + `.gev-view` host (`display: contents`), and `mountApplicationViews()` + (`src/ui/views/index.js`) renders the view into it before the page is + translated and wired. `createApplication()` calls it too, so host pages + need no change. Views belong to the page and are never unmounted. The + loading screen stays static so it paints before any script runs. Markup + tests read `renderApplicationHtml()` from `src/testSupport`, which renders + the views on the server. Vue preserves template whitespace so a view's DOM + matches its template exactly. First the markup moves, unchanged; + then each view takes over its wiring. Order: Scenes, Weather, Recent imagery, Street level, CCTV, Layers, Display, Context and Radio, the command dock, the phone shell, then Cockpit. Layers that write into the right rail directly gain a slot instead. diff --git a/scripts/check-package-boundaries.mjs b/scripts/check-package-boundaries.mjs index e019efe06b..700dc9a1a1 100644 --- a/scripts/check-package-boundaries.mjs +++ b/scripts/check-package-boundaries.mjs @@ -2,6 +2,7 @@ import { readFile, realpath } from 'node:fs/promises'; import path from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; import vue from '@vitejs/plugin-vue'; +import { VUE_PLUGIN_OPTIONS } from '../build/vueOptions.js'; import { build, normalizePath } from 'vite'; /** Build each browser or Node export group and reject imports outside its declared ownership. */ @@ -100,7 +101,7 @@ export async function checkPackageBoundaries(root) { ssr: node ? { noExternal: true } : undefined, logLevel: 'silent', plugins: [ - vue(), + vue(VUE_PLUGIN_OPTIONS), { name: 'check-package-ownership', moduleParsed(info) { diff --git a/scripts/i18n.mjs b/scripts/i18n.mjs index d19dc60679..f88b6549dc 100644 --- a/scripts/i18n.mjs +++ b/scripts/i18n.mjs @@ -119,10 +119,10 @@ export function extractMessages() { } } - const markup = trackedFiles('index.html', 'src/ui/templates/*.html'); + const markup = markupFiles(); const TAG = /<([a-zA-Z][\w-]*)(\s[^>]*?)\/?>([^<]*)/gs; for (const file of markup) { - const html = readFileSync(path.join(ROOT, file), 'utf8'); + const html = readMarkup(file); for (const [, tag, attrs, text] of html.matchAll(TAG)) { const where = `${file} <${tag}>`; if (/\sdata-i18n(\s|=|$)/.test(attrs)) { @@ -404,10 +404,8 @@ export function unmarkedScript(file, original) { */ export function findUnmarked() { const found = []; - for (const file of trackedFiles('index.html', 'src/ui/templates/*.html')) - found.push( - ...unmarkedMarkup(file, readFileSync(path.join(ROOT, file), 'utf8')), - ); + for (const file of markupFiles()) + found.push(...unmarkedMarkup(file, readMarkup(file))); for (const file of sourceFiles().filter( (name) => !NOT_UI.some((pattern) => pattern.test(name)), )) @@ -423,6 +421,24 @@ export function findUnmarked() { }); } +/** Static markup opted in with data-i18n*: the page, its templates and views. */ +function markupFiles() { + return trackedFiles( + 'index.html', + 'src/ui/templates/*.html', + 'src/ui/views/*.vue', + ); +} + +/** A file's markup; for a single-file component, its template block. */ +function readMarkup(file) { + const source = readFileSync(path.join(ROOT, file), 'utf8'); + if (!file.endsWith('.vue')) return source; + const start = source.indexOf(''); + return start === -1 ? '' : source.slice(start + '